import { PALETTES, type PaletteMode, resetPalette, setPalette, setTheme, usePalette, useTheme } from '@app/lib' import { type ReactNode, useMemo } from 'react' import { ThemeContext, type ThemeContextValue } from './theme-context' /** * Publishes the palette store to the tree. The store itself lives in * `shared/lib/palettes` (plain module + `useSyncExternalStore`), so themed * surfaces outside React — the injected `