/** * SSR Head Component - Framework-agnostic theme head injection. * * Combines {@link ThemeSSRStyle} (CSS variables) with FOUC prevention * and SSR metadata into a single composable `` fragment. * Works with any React SSR framework. * * @module ssr/ssr-head */ import { type IThemeSSRStyleProps } from './ssr-style'; import { type IFOUCScriptConfig } from '@mks2508/shadcn-basecoat-theme-manager'; /** Props for {@link ThemeSSRHead}. */ export interface IThemeSSRHeadProps { /** Current theme name (e.g. `'synthwave84'`). */ theme: string; /** Current mode preference. */ mode: 'light' | 'dark' | 'auto'; /** CSS custom properties from the theme's CSS file. */ cssVars: Record; /** Optional font family overrides. */ fonts?: IThemeSSRStyleProps['fonts']; /** * Whether to inject the FOUC prevention inline script. * @default true */ injectFOUCScript?: boolean; /** * Configuration for the FOUC script. * Defaults to cookie-based storage for SSR compatibility. */ foucConfig?: IFOUCScriptConfig; } /** * Render theme-related `` elements for SSR. * * Outputs: * 1. `