site-themes/README.md

24 lines
1 KiB
Markdown
Raw Permalink Normal View History

# @cocotte/site-themes
Site theme registry, resolver, and selectable theme families for Cocotte sites.
Extracted from `quinn.www/src/themes`. Ships:
- **luxe-dark** (`luxeDarkTheme`) — the default dark-luxe base (gold / cream / soft-pink).
- **Kuromi** family — `kuromiNeon`, `kuromiStark`, `kuromiDuo`.
- **Cali-Barbie** family — `barbieLight`, `barbieDark`.
- `THEME_REGISTRY`, `resolveSiteTheme()`, `applySiteThemeChrome()`, preview/custom-mod helpers.
- `installThemeSwitcher()` — runtime `window.__quinnTheme` console.
- `ThemeViewer` — React dev component for previewing the registry.
Each family is a `DeepPartial<ThemeInterface>` (from `@cocotte/ui-theme`) deep-merged
onto the base `luxe` adapter at runtime, so any styled-component reading `p.theme.*`
re-skins automatically.
## Selection precedence
1. `?theme=<name>` URL query (preview override, persisted to localStorage)
2. localStorage preview pin
3. `__PROVIDER_CONFIG__.theme.activeTheme` (brand/admin default)
4. `luxe-dark` (ultimate fallback)