You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(theme): split theming into mode and palette axes
Introduce two independent theming axes: mode (light/dark/system) as the
end-user accessibility preference via useMode, and palette/theme
(default/cream/bloom) as a developer configuration via useTheme. Mode is
persisted; palette is prop-driven. The <html> element carries mode as the
.light/.dark class and palette as data-theme. The font axis is untouched.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Split theming into two independent axes — **mode** (`light` / `dark` / `system`) and **theme/palette** (`default` / `cream` / `bloom`) — so every palette works in both light and dark.
6
+
7
+
- New `useMode()` hook + `MODE_OPTIONS` for the end-user appearance control (light/dark/system). `useTheme()` now returns the color palette: `{ theme, setTheme }`. `ResolvedTheme` is replaced by `ResolvedMode`.
8
+
-`<AppShell>` gains `defaultMode` (default `"system"`, persisted as the user preference); `defaultTheme` now selects the palette (default `"default"`). The palette is a developer config driven by the prop — it is **not** persisted to localStorage, so a stale stored value can't shadow the configured brand. Only mode (and font) persist.
9
+
- DOM: `<html>` carries the mode as the `.light` / `.dark` class and the palette as `data-theme`.
10
+
- CSS: `light.css` + `dark.css` are merged into `default.css`; **Cream** and **Bloom** gain dark variants. The shell gradient is parameterized per mode.
11
+
- The appearance switcher now offers Light / Dark / System only — the palette is a developer configuration. The font axis is unchanged.
0 commit comments