Skip to main content

Module themes

Module themes 

Source
Expand description

The built-in themes, compiled in (VAPP-92; mirrors src/themes.ts). neutral is stock shadcn and the ROOT the others extend; exponential is generated from the app’s design tokens; playful is the deliberately different test theme; orange is exponential with an orange primary (colours only, the brand reference). The generator embeds them already RESOLVED (BUILTIN_THEME_JSON), so they are parsed once, never re-flattened.

Constants§

BUILTIN_THEME_IDS
Source order = resolution order.
BUILTIN_THEME_NAMES
DEFAULT_THEME_ID

Functions§

builtin_refs
The registry a host passes as ThemeOptions::themes to extend a built-in.
builtin_theme
A built-in, parsed once per process; None for an unknown id.
builtin_themes
Every built-in, in source order.
default_theme
The default theme (exponential).
theme_or_default
Round 4 (VAPP-103): the theme a host paints with, NEVER a failure: a built-in id (a JSON string) or a theme file over the built-ins; anything unusable (an unknown id, a bad $schema, an unknown token, a missing value) falls back to default_theme with the issues saying why (TS themeOrDefault, Swift/Kotlin ThemeHandle.loadOrDefault).