← Về thư mục
frontend/src/features/theme/theme.ts
- ThemeMode · type · L1-L1 — type ThemeMode = "light" | "dark" | "system";
- ApplyThemeOpts · type · L6-L6 — type ApplyThemeOpts = { instant?: boolean };
- MolViewer · type · L8-L11 — type MolViewer = { setBackgroundColor: (color: string) => void; render?: () => void; };
- HostWindow · type · L13-L18 — type HostWindow = Window & { S?: { _molViewer?: MolViewer }; t?: (key: string, interpolated?: string) => string; tOptional?: (key: string) => string | null; hint?: (message: string) => void; };
- hostWindow · function · L25-L27 — function hostWindow(): HostWindow
- isThemeMode · function · L29-L31 — function isThemeMode(value: string): value is ThemeMode
- storedTheme · function · L33-L41 — function storedTheme(): ThemeMode
- getTheme · function · L43-L46 — function getTheme(): ThemeMode
- themeIsDark · function · L48-L58 — function themeIsDark(): boolean
- rethemeMolViewer · function · L60-L70 — function rethemeMolViewer(dark: boolean): void
- refreshThemeToggle · function · L72-L99 — function refreshThemeToggle(): void
- applyTheme · function · L101-L121 — function applyTheme(mode: string, opts?: ApplyThemeOpts): void
- toastTheme · function · L123-L127 — function toastTheme(mode: ThemeMode): void
- setTheme · function · L129-L138 — function setTheme(mode: string): void
- cycleTheme · function · L140-L144 — function cycleTheme(): void
- watchSystemTheme · function · L146-L163 — function watchSystemTheme(): void
- onChange · function · L155-L157 — onChange = ()
- installTheme · function · L165-L168 — function installTheme(): void