site-themes/README.md
Natalie 47bf060b51 refactor: rename @cocotte/themes -> @cocotte/site-themes
Disambiguate from @cocotte/ui-theme (the theme engine). This package is the
site theme content/registry built on top of it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 15:50:55 -04:00

23 lines
1 KiB
Markdown

# @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)