import * as React from 'react'; /** * Theme selection for Strix. * * **Dark is the only theme** — CLAUDE.md rule 3. The Figma file is authored dark-only, so a * light palette is invention; `light.css` and `[data-theme="light"]` no longer exist. * * The provider is retained because Strix's portalling components render into `document.body`, * outside the element carrying `data-theme`, and read the active theme from here to stamp on * their own portal root. That contract is what a second theme would need again. */ /** * One member. A union rather than a bare string so adding a theme back is a type error at every * call site instead of a silent fallthrough to a `data-theme` value no rule matches. */ export type ThemeMode = 'dark'; /** Matches the token layer, where `dark.css` carries the bare `:root`. */ export declare const DEFAULT_THEME: ThemeMode; export interface ThemeContextValue { theme: ThemeMode; /** * Alias of `theme`. Kept because the portal-bearing components read * `resolvedTheme`, and because the name documents the intent: whatever * resolution happened — stored value, explicit prop, system preference — this is * the answer. There is no unresolved state to distinguish it from, since * `system` is never a stored value. */ resolvedTheme: ThemeMode; setTheme: (theme: ThemeMode) => void; } export interface ThemeProviderProps { children: React.ReactNode; /** * Theme to start from when nothing is persisted. * @default 'dark' */ initialTheme?: ThemeMode; /** * Persist the selection to `localStorage`. * @default true */ persistTheme?: boolean; /** * Key used when persisting. * @default 'theme-preference' */ storageKey?: string; } /** * Owns the active theme and applies it to a wrapper. * * @example * * * */ export declare function ThemeProvider({ children, initialTheme, persistTheme, storageKey, }: ThemeProviderProps): React.ReactElement; /** * Read and set the active theme. * * Throws outside a `ThemeProvider`. Application code that calls this means to be * themed, so a missing provider is a bug it should hear about rather than a silent * fallback to the default. */ export declare function useTheme(): ThemeContextValue; /** * Read the active theme, falling back to dark with a no-op setter when there is * no provider. * * This is what Strix's own components use. A consumer must not be forced to wrap * their tree in a provider merely to render a tooltip, so theming stays opt-in: * without a provider a component stamps `dark`, which is what the token layer * resolves to at `:root` anyway — so the fallback agrees with the page instead of fighting * it. */ export declare function useOptionalTheme(): ThemeContextValue; //# sourceMappingURL=theme.d.ts.map