import { ReactNode, ScriptHTMLAttributes, ComponentType, DependencyList, ImgHTMLAttributes } from 'react'; import { ScopedThemeProps } from './components/scoped-theme.js'; import { A as Attribute, b as StorageConfig, C as CookieOptions, e as TransitionConfig, d as ThemeState, a as SetThemeOptions } from './types-BAqJDAl9.js'; import { ThemeValueMap } from './hooks/use-theme-value.js'; import { T as ThemeContext } from './context-DsMFP6un.js'; interface ThemeProviderProps { children?: ReactNode; /** Available themes. Default: `['light', 'dark']`. */ themes?: string[]; /** Default theme used when nothing is stored. Default: `'system'`. */ defaultTheme?: string; /** If set, theme is locked to this value and cannot be changed. */ forcedTheme?: string; /** Enable automatic 'system' theme detection via `prefers-color-scheme`. Default: `true`. */ enableSystem?: boolean; /** Always track the OS preference, ignoring stored values. */ followSystem?: boolean; /** Attribute(s) used to apply the theme. Default: `'data-theme'`. */ attribute?: Attribute | Attribute[]; /** Optional map of logical theme name → attribute value (e.g. `{ dark: 'theme-dark' }`). */ value?: Record; /** Selector for the element that receives the attribute. Default: `'html'`. */ target?: string; /** * Storage backend. Either a mode string (`'hybrid'` | `'cookie'` | `'local'` * | `'session'` | `'none'`, default `'hybrid'`) or an object that bundles the * mode with its `key` and `cookieOptions`: * `storage={{ mode: 'cookie', cookieOptions: { maxAge: 31536000 } }}`. * When the object form supplies `key`/`cookieOptions`, the top-level * `storageKey`/`cookieOptions` props take precedence if also provided. */ storage?: StorageConfig; /** Key name for local/session storage and fallback cookie name. Default: `'theme'`. */ storageKey?: string; /** Overrides for the cookie channel. */ cookieOptions?: CookieOptions; /** Disable CSS transitions during theme change. Pass `true` or custom CSS. */ disableTransitionOnChange?: boolean | string; /** If true, `disableTransitionOnChange` is a no-op when user prefers reduced motion. Default: `true`. */ respectReducedMotion?: boolean; /** Sync `colorScheme` CSS on the target element. Default: `true`. */ enableColorScheme?: boolean; /** Sync a `` tag. Can be a fixed color or a map by theme. */ themeColor?: string | Record; /** Initial theme seeded by the server (e.g. from a cookie or user profile). */ initialTheme?: string; /** CSP nonce for the inline script. */ nonce?: string; /** * Extra props forwarded to the inline anti-FOUC `