()
| 7467 | /** Re-scan the themes dir and apply the result. Used after an in-app change |
| 7468 | * (e.g. deleting a theme) so the UI updates without waiting on the watcher. */ |
| 7469 | export function refreshCustomThemes(): void { |
| 7470 | const bridge = typeof window !== 'undefined' ? window.zen : undefined |
| 7471 | if (!bridge || typeof bridge.listCustomThemes !== 'function') return |
| 7472 | void bridge.listCustomThemes().then(applyCustomThemes).catch(() => {}) |
| 7473 | } |
| 7474 | |
| 7475 | /** |
| 7476 | * Load user themes from the config dir, inject their CSS, and keep both in sync |
no test coverage detected