Skip to content

ThemeManager

Defined in: src/theme.ts:167

Registry of Themes and the active selection; changing it re-renders the app. Use the shared ThemeManager.getInstance.

new ThemeManager(): ThemeManager

Defined in: src/theme.ts:181

ThemeManager

getActiveTheme(): Theme

Defined in: src/theme.ts:196

The currently active theme (falls back to default-dark).

Theme


getActiveThemeName(): string

Defined in: src/theme.ts:201

The active theme’s name.

string


getTheme(name): Theme | undefined

Defined in: src/theme.ts:191

Look up a registered theme by name.

string

Theme | undefined


listThemes(): Theme[]

Defined in: src/theme.ts:206

All registered themes, in registration order.

Theme[]


register(theme): void

Defined in: src/theme.ts:186

Register (or replace) a theme by name.

Theme

void


setTheme(name): void

Defined in: src/theme.ts:211

Switch the active theme (a no-op with a warning if name isn’t registered).

string

void


subscribe(cb): () => void

Defined in: src/theme.ts:224

Subscribe to theme changes; returns an unsubscribe function.

() => void

() => void


static getInstance(): ThemeManager

Defined in: src/theme.ts:174

The shared singleton (pre-seeded with the built-in themes).

ThemeManager