UNPKG

analytica-frontend-lib

Version:

Repositório público dos componentes utilizados nas plataformas da Analytica Ensino

75 lines 2.28 kB
export type ThemeMode = 'light' | 'dark' | 'system'; /** * Theme store state interface */ export interface ThemeState { /** * Current theme mode */ themeMode: ThemeMode; /** * Whether the current theme is dark */ isDark: boolean; } /** * Theme store actions interface */ export interface ThemeActions { /** * Apply theme based on the mode selected */ applyTheme: (mode: ThemeMode) => void; /** * Toggle between themes */ toggleTheme: () => void; /** * Set a specific theme mode */ setTheme: (mode: ThemeMode) => void; /** * Initialize theme on app start */ initializeTheme: () => void; /** * Handle system theme change */ handleSystemThemeChange: () => void; } export type ThemeStore = ThemeState & ThemeActions; /** * Theme store using Zustand with persistence */ export declare const useThemeStore: import("zustand").UseBoundStore<Omit<Omit<import("zustand").StoreApi<ThemeStore>, "setState" | "devtools"> & { setState(partial: ThemeStore | Partial<ThemeStore> | ((state: ThemeStore) => ThemeStore | Partial<ThemeStore>), replace?: false | undefined, action?: (string | { [x: string]: unknown; [x: number]: unknown; [x: symbol]: unknown; type: string; }) | undefined): void; setState(state: ThemeStore | ((state: ThemeStore) => ThemeStore), replace: true, action?: (string | { [x: string]: unknown; [x: number]: unknown; [x: symbol]: unknown; type: string; }) | undefined): void; devtools: { cleanup: () => void; }; }, "persist"> & { persist: { setOptions: (options: Partial<import("zustand/middleware").PersistOptions<ThemeStore, { themeMode: ThemeMode; }>>) => void; clearStorage: () => void; rehydrate: () => Promise<void> | void; hasHydrated: () => boolean; onHydrate: (fn: (state: ThemeStore) => void) => () => void; onFinishHydration: (fn: (state: ThemeStore) => void) => () => void; getOptions: () => Partial<import("zustand/middleware").PersistOptions<ThemeStore, { themeMode: ThemeMode; }>>; }; }>; //# sourceMappingURL=themeStore.d.ts.map