MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / initCustomThemes

Function initCustomThemes

packages/app-core/src/store.ts:7479–7490  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7477 * as files change. Safe to call on web (no bridge → no-op).
7478 */
7479export function initCustomThemes(): void {
7480 const bridge = typeof window !== 'undefined' ? window.zen : undefined
7481 if (!bridge || typeof bridge.listCustomThemes !== 'function') return
7482 refreshCustomThemes()
7483 if (typeof bridge.onCustomThemesChange === 'function') {
7484 try {
7485 bridge.onCustomThemesChange(applyCustomThemes)
7486 } catch {
7487 /* ignore */
7488 }
7489 }
7490}
7491
7492let themeTweaksSaveTimer: ReturnType<typeof setTimeout> | null = null
7493/** Debounce persistence of theme tweaks so dragging a color picker (which fires

Callers 1

AppFunction · 0.90

Calls 2

refreshCustomThemesFunction · 0.85
onCustomThemesChangeMethod · 0.80

Tested by

no test coverage detected