/** * ZUI Theme Provider * Theme context and customization system */ import type { Theme, ThemeColors, ThemeTypography, ThemeSpacing, DeepPartial } from '../core/types'; /** * Default ZUI theme based on ZeppOS 3.0 design specifications */ export declare const defaultTheme: Theme; /** * Get current theme */ export declare function getTheme(): Theme; /** * Set theme (triggers all listeners) * @param theme - New theme */ export declare function setTheme(theme: Theme): void; /** * Subscribe to theme changes * @param listener - Callback function * @returns Unsubscribe function */ export declare function subscribeToTheme(listener: (theme: Theme) => void): () => void; /** * Create a custom theme by extending the default theme * @param customTheme - Partial theme overrides */ export declare function createTheme(customTheme: DeepPartial): Theme; /** * Create a theme with a custom primary color * @param primaryColor - Primary color (hex) */ export declare function createThemeWithPrimaryColor(primaryColor: string): Theme; /** * Get color from current theme * @param path - Color path (e.g., 'primary.blue', 'text.title') */ export declare function getThemeColor(path: string): string; /** * Get spacing from current theme * @param key - Spacing key or numeric value */ export declare function getThemeSpacing(key: keyof ThemeSpacing | number): number; /** * Get typography style from current theme * @param size - Size key */ export declare function getThemeTypography(size: keyof ThemeTypography['sizes']): { size: number; lineHeight: number; }; /** * Get icon size from current theme * @param size - Size key */ export declare function getThemeIconSize(size: keyof Theme['iconSizes']): number; /** * Get border radius from current theme * @param size - Size key */ export declare function getThemeBorderRadius(size: keyof Theme['borderRadius']): number; export interface ThemeProviderOptions { theme?: Theme; children?: unknown[]; } /** * Theme Provider for scoped theming * Allows different parts of the app to use different themes */ export declare class ThemeProvider { private theme; private previousTheme; constructor(options?: ThemeProviderOptions); /** * Apply this provider's theme */ apply(): void; /** * Restore previous theme */ restore(): void; /** * Update provider's theme */ setTheme(theme: Theme): void; /** * Get provider's theme */ getTheme(): Theme; } /** * Note: ZeppOS primarily uses dark backgrounds (AMOLED black) * This is mainly for apps that might want light mode support */ export declare const lightThemeOverrides: DeepPartial; /** * Create light theme variant */ export declare function createLightTheme(): Theme; export declare const theme: { readonly colors: ThemeColors; readonly typography: ThemeTypography; readonly spacing: ThemeSpacing; readonly iconSizes: Record; readonly borderRadius: Record; getColor: typeof getThemeColor; getSpacing: typeof getThemeSpacing; getTypography: typeof getThemeTypography; getIconSize: typeof getThemeIconSize; getBorderRadius: typeof getThemeBorderRadius; }; //# sourceMappingURL=ThemeProvider.d.ts.map