Overview
themeAtom and titleAtom live on MatesUtils — access them with utils (created by renderApp).
themeAtom stores 'light' | 'dark' | 'auto', persists to localStorage['mates-theme'], keeps <html data-theme> in sync, and exposes resolved plus helpers (setToLight, setToDark, setToAuto, toggle).
titleAtom mirrors document.title via an internal effect — set it and the tab title updates; read it reactively in templates.
themeAtom vs lsStore
|
API
|
Key
|
Role
|
|---|---|---|
themeAtom
| mates-theme | Dedicated theme chrome + DOM attribute sync. |
lsStore
| mates_storage | Generic JSON bag — not for theme helpers. |
themeAtom helpers
Switch light / dark / auto and toggle. resolved is always light or dark.
titleAtom → document.title
Editing the input updates titleAtom and the browser tab title (inside the playground iframe).