/** * Astryx theme template — every `defineTheme` field, with a note on what it * does and when to reach for it. * * Only `name` is required. Delete what you do not need: the values here are * placeholders that reproduce the built-in defaults, so a field you leave * untouched changes nothing. * * Each section names the CLI command that prints the authoritative reference * for it. These comments are a map; the CLI is the territory — it reads the * same source the components do. `astryx docs` lists every topic. * * ═══════════════════════════════════════════════════════════════════════ * HOW A THEME IS CONSUMED * ═══════════════════════════════════════════════════════════════════════ * * 1. WRAP THE APP. A theme does nothing until it is provided. * * import {Theme} from '@astryxdesign/core/theme'; * import {myTheme} from './theme'; * * // 'system' | 'light' | 'dark' * * * * `system` follows the OS. Nest a second `` to give one region its * own theme or mode — a dark sidebar inside a light page. * * 2. SHIP THE FONTS YOU NAME. Astryx sets the `--font-family-*` tokens; it * never loads a font file, so use whatever typeface the design needs and * load it yourself. Either add it to your app's : * * * * * or self-host it in your global CSS: * * @font-face { * font-family: 'Inter'; * src: url('/fonts/Inter.woff2') format('woff2'); * font-weight: 100 900; * font-display: swap; * } * * Always give `fallbacks` as well. A named family with no file loads * nothing and warns about nothing — the fallback silently becomes your * theme. * * 3. BUILD IT FOR PRODUCTION. * * astryx theme build src/theme.ts * * writes `.css` (tokens, component overrides and prose styles in * `@scope` rules), `.js` (the theme with `__built: true` and * pre-resolved values), `.d.ts`, and `.variants.d.ts` when the * theme adds custom prop values. Import the module and the CSS together: * * import {myThemeTheme} from './theme/my-theme'; * import './theme/my-theme.css'; * * Unbuilt, `` injects a