/** * Theme context for sharing theme state across components */ import type { ColorScheme, ThemeConfig } from './tokens.js'; /** * Theme context key */ export declare const THEME_KEY: unique symbol; /** * Theme state interface */ export interface ThemeState { /** Current color scheme */ colorScheme: ColorScheme; /** Resolved color scheme (never 'system') */ resolvedScheme: 'light' | 'dark'; /** Whether dark mode is active */ isDark: boolean; /** Full theme configuration */ config: ThemeConfig; } /** * Theme context interface with methods */ export interface ThemeContext { /** Current theme state */ state: ThemeState; /** Set color scheme preference */ setColorScheme: (scheme: ColorScheme) => void; /** Toggle between light and dark */ toggleColorScheme: () => void; /** Update theme configuration */ updateConfig: (config: Partial) => void; } /** * Set theme context (used by ThemeProvider) */ export declare function setThemeContext(context: ThemeContext): void; /** * Get theme context * @throws If called outside of ThemeProvider */ export declare function getThemeContext(): ThemeContext; /** * Try to get theme context * Returns null if not available (doesn't throw) */ export declare function tryGetThemeContext(): ThemeContext | null; //# sourceMappingURL=context.d.ts.map