@atom63/cli 0.1.0-beta.3 → 0.1.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3472,6 +3472,14 @@
3472
3472
  "appViewSlots",
3473
3473
  "appViewTopBarSpans",
3474
3474
  "appViewVisualArchetypes",
3475
+ "artPlateContract",
3476
+ "artPlateSafeAreas",
3477
+ "artPlateSizes",
3478
+ "artPlateSlots",
3479
+ "artPlateStates",
3480
+ "artPlateTones",
3481
+ "artPlateVeils",
3482
+ "artPlateVisualArchetypes",
3475
3483
  "autocompleteContract",
3476
3484
  "autocompleteSizeAliases",
3477
3485
  "autocompleteSizes",
@@ -3542,6 +3550,13 @@
3542
3550
  "carouselSlots",
3543
3551
  "carouselStates",
3544
3552
  "carouselVisualArchetypes",
3553
+ "chartColors",
3554
+ "chartContract",
3555
+ "chartSizes",
3556
+ "chartSlots",
3557
+ "chartStates",
3558
+ "chartTypes",
3559
+ "chartVisualArchetypes",
3545
3560
  "chatComposerContract",
3546
3561
  "chatComposerLayouts",
3547
3562
  "chatComposerSlots",
@@ -3703,6 +3718,12 @@
3703
3718
  "labelSlots",
3704
3719
  "labelStates",
3705
3720
  "labelVisualArchetypes",
3721
+ "layeredSceneContract",
3722
+ "layeredScenePlacements",
3723
+ "layeredSceneSlots",
3724
+ "layeredSceneStates",
3725
+ "layeredSceneVisualArchetypes",
3726
+ "layeredSceneWidths",
3706
3727
  "loadMoreTriggerContract",
3707
3728
  "loadMoreTriggerSlots",
3708
3729
  "loadMoreTriggerStates",
@@ -3981,6 +4002,7 @@
3981
4002
  "AlertTitle",
3982
4003
  "Amount",
3983
4004
  "AnimatedCheck",
4005
+ "ArtPlate",
3984
4006
  "Atom63Theme",
3985
4007
  "Autocomplete",
3986
4008
  "AutocompleteClear",
@@ -4200,6 +4222,11 @@
4200
4222
  "Kbd",
4201
4223
  "KbdGroup",
4202
4224
  "Label",
4225
+ "LayeredScene",
4226
+ "LayeredSceneContent",
4227
+ "LayeredSceneForeground",
4228
+ "LayeredScenePlate",
4229
+ "LayeredSceneStage",
4203
4230
  "LoadMoreTrigger",
4204
4231
  "Marquee",
4205
4232
  "Menubar",
@@ -4392,6 +4419,14 @@
4392
4419
  ],
4393
4420
  "sections": {}
4394
4421
  },
4422
+ {
4423
+ "module": "@atom63/ui-react/chart",
4424
+ "docs": "component-overview",
4425
+ "values": [
4426
+ "Chart"
4427
+ ],
4428
+ "sections": {}
4429
+ },
4395
4430
  {
4396
4431
  "module": "@atom63/ui-react/layout",
4397
4432
  "docs": "pattern-layout",
@@ -5633,6 +5668,7 @@
5633
5668
  "file": "packages/ui-react/src/components/autocomplete/autocomplete.stories.tsx",
5634
5669
  "names": [
5635
5670
  "Playground",
5671
+ "TriggerAndClearWithValue",
5636
5672
  "MenuAnatomy",
5637
5673
  "Empty",
5638
5674
  "Loading",
@@ -5644,7 +5680,7 @@
5644
5680
  "Endpoints",
5645
5681
  "ContractMetadata"
5646
5682
  ],
5647
- "source": "import { autocompleteContract, themes } from '@atom63/ui-foundation'\nimport {\n Autocomplete,\n AutocompleteEmpty,\n AutocompleteGroup,\n AutocompleteGroupLabel,\n AutocompleteInput,\n AutocompleteItem,\n AutocompleteList,\n AutocompletePopup,\n AutocompleteSeparator,\n AutocompleteStatus,\n UIProvider,\n} from '@atom63/ui-react'\nimport '@atom63/ui-react/styles.css'\nimport type { Meta, StoryObj } from '@storybook/react-vite'\n\nconst meta = {\n title: 'UI React/Autocomplete',\n component: Autocomplete,\n decorators: [\n Story => (\n <div style={{ padding: 'clamp(12px, 8vw, 48px)', width: 'min(320px, 100%)' }}>\n <Story />\n </div>\n ),\n ],\n} satisfies Meta<typeof Autocomplete>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\nconst fruits = [\n 'Apple',\n 'Apricot',\n 'Banana',\n 'Blackberry',\n 'Blueberry',\n 'Cherry',\n 'Grape',\n 'Mango',\n 'Orange',\n 'Peach',\n]\n\nconst groupedFruits = {\n Recent: ['Apple', 'Banana', 'Cherry'],\n Citrus: ['Grapefruit', 'Lemon', 'Orange'],\n Berries: ['Blackberry', 'Blueberry', 'Strawberry'],\n}\n\nfunction Demo({\n disabled,\n invalid,\n size,\n}: {\n disabled?: boolean\n invalid?: boolean\n size?: 'sm' | 'md' | 'lg' | number\n}) {\n return (\n <Autocomplete items={fruits}>\n <AutocompleteInput\n aria-label=\"Search fruit\"\n disabled={disabled}\n invalid={invalid}\n placeholder=\"Search fruit…\"\n showClear\n showTrigger\n size={size}\n />\n <AutocompletePopup>\n <AutocompleteEmpty>No fruit found.</AutocompleteEmpty>\n <AutocompleteList>\n {(fruit: string) => <AutocompleteItem key={fruit}>{fruit}</AutocompleteItem>}\n </AutocompleteList>\n </AutocompletePopup>\n </Autocomplete>\n )\n}\n\nfunction GroupedDemo({ open, size }: { open?: boolean; size?: 'sm' | 'md' | 'lg' }) {\n return (\n <Autocomplete\n autoHighlight={open ? 'always' : undefined}\n defaultOpen={open}\n items={Object.values(groupedFruits).flat()}\n >\n <AutocompleteInput placeholder=\"Search fruit…\" showClear showTrigger size={size} />\n <AutocompletePopup>\n <AutocompleteEmpty>No fruit found.</AutocompleteEmpty>\n <AutocompleteList>\n {Object.entries(groupedFruits).map(([group, values], index) => (\n <AutocompleteGroup key={group}>\n {index > 0 ? <AutocompleteSeparator /> : null}\n <AutocompleteGroupLabel>{group}</AutocompleteGroupLabel>\n {values.map(value => (\n <AutocompleteItem key={value} value={value}>\n {value}\n </AutocompleteItem>\n ))}\n </AutocompleteGroup>\n ))}\n </AutocompleteList>\n </AutocompletePopup>\n </Autocomplete>\n )\n}\n\nexport const Playground: Story = {\n render: () => <Demo />,\n}\n\n/** Open on load with the first item highlighted, so the visual and axe runs\n * capture the popup, its groups and the highlighted row. */\nexport const MenuAnatomy: Story = {\n render: () => <GroupedDemo open />,\n}\n\n/** A query with no match shows the empty message in the open popup. */\nexport const Empty: Story = {\n render: () => (\n <Autocomplete defaultOpen defaultValue=\"Kiwano\" items={fruits}>\n <AutocompleteInput aria-label=\"Search fruit\" placeholder=\"Search fruit…\" showClear />\n <AutocompletePopup>\n <AutocompleteEmpty>No fruit found.</AutocompleteEmpty>\n <AutocompleteList>\n {(fruit: string) => <AutocompleteItem key={fruit}>{fruit}</AutocompleteItem>}\n </AutocompleteList>\n </AutocompletePopup>\n </Autocomplete>\n ),\n}\n\n/** While results load, the popup shows the status line in place of the list. */\nexport const Loading: Story = {\n render: () => (\n <Autocomplete defaultOpen defaultValue=\"Ber\" items={[] as string[]}>\n <AutocompleteInput aria-label=\"Search fruit\" placeholder=\"Search fruit…\" />\n <AutocompletePopup>\n <AutocompleteStatus>Searching fruit…</AutocompleteStatus>\n <AutocompleteList>\n {(fruit: string) => <AutocompleteItem key={fruit}>{fruit}</AutocompleteItem>}\n </AutocompleteList>\n </AutocompletePopup>\n </Autocomplete>\n ),\n}\n\nexport const Disabled: Story = {\n render: () => <Demo disabled />,\n}\n\n/** `invalid` (or `aria-invalid`, which FormControl sets) draws the danger edge. */\nexport const Invalid: Story = {\n render: () => <Demo invalid />,\n}\n\n// The `size` prop on AutocompleteInput accepts named recipe sizes\n// ('sm' | 'md' | 'lg') OR a number. A numeric value is forwarded to the\n// native <input size> attribute for character-width sizing.\nexport const Sizes: Story = {\n render: () => (\n <div style={{ display: 'grid', gap: 16 }}>\n <div>\n <div style={{ fontSize: 12, color: 'var(--a63-text-secondary)', marginBottom: 6 }}>sm</div>\n <Demo size=\"sm\" />\n </div>\n <div>\n <div style={{ fontSize: 12, color: 'var(--a63-text-secondary)', marginBottom: 6 }}>md</div>\n <Demo size=\"md\" />\n </div>\n <div>\n <div style={{ fontSize: 12, color: 'var(--a63-text-secondary)', marginBottom: 6 }}>lg</div>\n <Demo size=\"lg\" />\n </div>\n <div>\n <div style={{ fontSize: 12, color: 'var(--a63-text-secondary)', marginBottom: 6 }}>\n size={'{'}12{'}'} (native char-width)\n </div>\n <Demo size={12} />\n </div>\n <div>\n <div style={{ fontSize: 12, color: 'var(--a63-text-secondary)', marginBottom: 6 }}>\n size={'{'}30{'}'} (native char-width)\n </div>\n <Demo size={30} />\n </div>\n </div>\n ),\n}\n\nexport const Themes: Story = {\n render: () => (\n <div style={{ display: 'grid', gap: 12 }}>\n {themes.map(theme =>\n (['light', 'dark'] as const).map(mode => (\n <UIProvider key={`${theme}-${mode}`} mode={mode} theme={theme}>\n <div\n style={{\n alignItems: 'center',\n background: 'var(--a63-surface-panel)',\n borderRadius: '0.75rem',\n color: 'var(--a63-text-primary)',\n display: 'flex',\n gap: 12,\n padding: '0.75rem',\n }}\n >\n <span style={{ fontSize: 12, color: 'var(--a63-text-secondary)', width: 96 }}>\n {theme} / {mode}\n </span>\n <Demo />\n </div>\n </UIProvider>\n ))\n )}\n </div>\n ),\n}\n\nexport const RadiusSpacing: Story = {\n render: () => (\n <div style={{ display: 'grid', gap: 12 }}>\n {[\n { label: 'Rounded items', radius: 'default' },\n { label: 'Flush square items', radius: 'none' },\n ].map(example => (\n <div\n key={example.radius}\n data-a63-radius={example.radius}\n style={{\n alignItems: 'center',\n background: 'var(--a63-surface-panel)',\n borderRadius: 'var(--radius-lg)',\n color: 'var(--a63-text-primary)',\n display: 'flex',\n gap: 12,\n padding: '0.75rem',\n }}\n >\n <span style={{ fontSize: 12, color: 'var(--a63-text-secondary)', width: 112 }}>\n {example.label}\n </span>\n <GroupedDemo />\n </div>\n ))}\n </div>\n ),\n}\n\n/* The same autocomplete reviewed against target host contexts. */\nexport const Endpoints: Story = {\n render: () => (\n <div style={{ display: 'grid', gap: 12 }}>\n {[\n {\n label: 'Web',\n props: { density: 'comfortable', designLanguage: 'web', input: 'pointer' } as const,\n },\n {\n label: 'iOS touch',\n props: { density: 'comfortable', designLanguage: 'ios', input: 'touch' } as const,\n },\n {\n label: 'Compact extension',\n props: {\n density: 'compact',\n designLanguage: 'web',\n input: 'pointer',\n surface: 'n2',\n } as const,\n },\n ].map(endpoint => (\n <UIProvider key={endpoint.label} {...endpoint.props}>\n <div\n style={{\n alignItems: 'center',\n background: 'var(--a63-surface-panel)',\n borderRadius: 'var(--radius-lg)',\n color: 'var(--a63-text-primary)',\n display: 'flex',\n gap: 12,\n padding: '0.75rem',\n }}\n >\n <span style={{ fontSize: 12, color: 'var(--a63-text-secondary)', width: 112 }}>\n {endpoint.label}\n </span>\n <GroupedDemo size={endpoint.label === 'Compact extension' ? 'sm' : 'md'} />\n </div>\n </UIProvider>\n ))}\n </div>\n ),\n}\n\nexport const ContractMetadata: Story = {\n render: () => (\n <pre style={{ fontSize: 12, margin: 0, whiteSpace: 'pre-wrap' }}>\n {JSON.stringify(autocompleteContract, null, 2)}\n </pre>\n ),\n}\n"
5683
+ "source": "import { autocompleteContract, themes } from '@atom63/ui-foundation'\nimport {\n Autocomplete,\n AutocompleteEmpty,\n AutocompleteGroup,\n AutocompleteGroupLabel,\n AutocompleteInput,\n AutocompleteItem,\n AutocompleteList,\n AutocompletePopup,\n AutocompleteSeparator,\n AutocompleteStatus,\n UIProvider,\n} from '@atom63/ui-react'\nimport '@atom63/ui-react/styles.css'\nimport type { Meta, StoryObj } from '@storybook/react-vite'\n\nconst meta = {\n title: 'UI React/Autocomplete',\n component: Autocomplete,\n decorators: [\n Story => (\n <div style={{ padding: 'clamp(12px, 8vw, 48px)', width: 'min(320px, 100%)' }}>\n <Story />\n </div>\n ),\n ],\n} satisfies Meta<typeof Autocomplete>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\nconst fruits = [\n 'Apple',\n 'Apricot',\n 'Banana',\n 'Blackberry',\n 'Blueberry',\n 'Cherry',\n 'Grape',\n 'Mango',\n 'Orange',\n 'Peach',\n]\n\nconst groupedFruits = {\n Recent: ['Apple', 'Banana', 'Cherry'],\n Citrus: ['Grapefruit', 'Lemon', 'Orange'],\n Berries: ['Blackberry', 'Blueberry', 'Strawberry'],\n}\n\nfunction Demo({\n disabled,\n invalid,\n size,\n}: {\n disabled?: boolean\n invalid?: boolean\n size?: 'sm' | 'md' | 'lg' | number\n}) {\n return (\n <Autocomplete items={fruits}>\n <AutocompleteInput\n aria-label=\"Search fruit\"\n disabled={disabled}\n invalid={invalid}\n placeholder=\"Search fruit…\"\n showClear\n showTrigger\n size={size}\n />\n <AutocompletePopup>\n <AutocompleteEmpty>No fruit found.</AutocompleteEmpty>\n <AutocompleteList>\n {(fruit: string) => <AutocompleteItem key={fruit}>{fruit}</AutocompleteItem>}\n </AutocompleteList>\n </AutocompletePopup>\n </Autocomplete>\n )\n}\n\nfunction GroupedDemo({ open, size }: { open?: boolean; size?: 'sm' | 'md' | 'lg' }) {\n return (\n <Autocomplete\n autoHighlight={open ? 'always' : undefined}\n defaultOpen={open}\n items={Object.values(groupedFruits).flat()}\n >\n <AutocompleteInput placeholder=\"Search fruit…\" showClear showTrigger size={size} />\n <AutocompletePopup>\n <AutocompleteEmpty>No fruit found.</AutocompleteEmpty>\n <AutocompleteList>\n {Object.entries(groupedFruits).map(([group, values], index) => (\n <AutocompleteGroup key={group}>\n {index > 0 ? <AutocompleteSeparator /> : null}\n <AutocompleteGroupLabel>{group}</AutocompleteGroupLabel>\n {values.map(value => (\n <AutocompleteItem key={value} value={value}>\n {value}\n </AutocompleteItem>\n ))}\n </AutocompleteGroup>\n ))}\n </AutocompleteList>\n </AutocompletePopup>\n </Autocomplete>\n )\n}\n\nexport const Playground: Story = {\n render: () => <Demo />,\n}\n\n/** With a typed value, the clear button sits beside the trigger: neither covers the other. */\nexport const TriggerAndClearWithValue: Story = {\n render: () => (\n <Autocomplete defaultValue=\"Apple\" items={fruits}>\n <AutocompleteInput\n aria-label=\"Search fruit\"\n placeholder=\"Search fruit…\"\n showClear\n showTrigger\n />\n <AutocompletePopup>\n <AutocompleteEmpty>No fruit found.</AutocompleteEmpty>\n <AutocompleteList>\n {(fruit: string) => <AutocompleteItem key={fruit}>{fruit}</AutocompleteItem>}\n </AutocompleteList>\n </AutocompletePopup>\n </Autocomplete>\n ),\n play: async ({ canvasElement }) => {\n const trigger = canvasElement.querySelector<HTMLElement>('[data-slot=\"autocomplete-trigger\"]')\n const clear = canvasElement.querySelector<HTMLElement>('[data-slot=\"autocomplete-clear\"]')\n const input = canvasElement.querySelector<HTMLInputElement>('[data-slot=\"autocomplete-input\"]')\n if (!trigger || !clear || !input)\n throw new Error('Expected the input, trigger and clear button')\n const a = trigger.getBoundingClientRect()\n const b = clear.getBoundingClientRect()\n if (a.left < b.right - 0.5 && b.left < a.right - 0.5) {\n throw new Error(\n `Expected the clear button beside the trigger (clear ${b.left}-${b.right}, trigger ${a.left}-${a.right})`\n )\n }\n const hit = document.elementFromPoint(a.left + a.width / 2, a.top + a.height / 2)\n if (!hit || !trigger.contains(hit)) throw new Error('Expected the trigger to take the pointer')\n const text =\n input.getBoundingClientRect().right - Number.parseFloat(getComputedStyle(input).paddingRight)\n if (text > b.left + 0.5) throw new Error('Expected the input to reserve room for both buttons')\n },\n}\n\n/** Open on load with the first item highlighted, so the visual and axe runs\n * capture the popup, its groups and the highlighted row. */\nexport const MenuAnatomy: Story = {\n render: () => <GroupedDemo open />,\n}\n\n/** A query with no match shows the empty message in the open popup. */\nexport const Empty: Story = {\n render: () => (\n <Autocomplete defaultOpen defaultValue=\"Kiwano\" items={fruits}>\n <AutocompleteInput aria-label=\"Search fruit\" placeholder=\"Search fruit…\" showClear />\n <AutocompletePopup>\n <AutocompleteEmpty>No fruit found.</AutocompleteEmpty>\n <AutocompleteList>\n {(fruit: string) => <AutocompleteItem key={fruit}>{fruit}</AutocompleteItem>}\n </AutocompleteList>\n </AutocompletePopup>\n </Autocomplete>\n ),\n}\n\n/** While results load, the popup shows the status line in place of the list. */\nexport const Loading: Story = {\n render: () => (\n <Autocomplete defaultOpen defaultValue=\"Ber\" items={[] as string[]}>\n <AutocompleteInput aria-label=\"Search fruit\" placeholder=\"Search fruit…\" />\n <AutocompletePopup>\n <AutocompleteStatus>Searching fruit…</AutocompleteStatus>\n <AutocompleteList>\n {(fruit: string) => <AutocompleteItem key={fruit}>{fruit}</AutocompleteItem>}\n </AutocompleteList>\n </AutocompletePopup>\n </Autocomplete>\n ),\n}\n\nexport const Disabled: Story = {\n render: () => <Demo disabled />,\n}\n\n/** `invalid` (or `aria-invalid`, which FormControl sets) draws the danger edge. */\nexport const Invalid: Story = {\n render: () => <Demo invalid />,\n}\n\n// The `size` prop on AutocompleteInput accepts named recipe sizes\n// ('sm' | 'md' | 'lg') OR a number. A numeric value is forwarded to the\n// native <input size> attribute for character-width sizing.\nexport const Sizes: Story = {\n render: () => (\n <div style={{ display: 'grid', gap: 16 }}>\n <div>\n <div style={{ fontSize: 12, color: 'var(--a63-text-secondary)', marginBottom: 6 }}>sm</div>\n <Demo size=\"sm\" />\n </div>\n <div>\n <div style={{ fontSize: 12, color: 'var(--a63-text-secondary)', marginBottom: 6 }}>md</div>\n <Demo size=\"md\" />\n </div>\n <div>\n <div style={{ fontSize: 12, color: 'var(--a63-text-secondary)', marginBottom: 6 }}>lg</div>\n <Demo size=\"lg\" />\n </div>\n <div>\n <div style={{ fontSize: 12, color: 'var(--a63-text-secondary)', marginBottom: 6 }}>\n size={'{'}12{'}'} (native char-width)\n </div>\n <Demo size={12} />\n </div>\n <div>\n <div style={{ fontSize: 12, color: 'var(--a63-text-secondary)', marginBottom: 6 }}>\n size={'{'}30{'}'} (native char-width)\n </div>\n <Demo size={30} />\n </div>\n </div>\n ),\n}\n\nexport const Themes: Story = {\n render: () => (\n <div style={{ display: 'grid', gap: 12 }}>\n {themes.map(theme =>\n (['light', 'dark'] as const).map(mode => (\n <UIProvider key={`${theme}-${mode}`} mode={mode} theme={theme}>\n <div\n style={{\n alignItems: 'center',\n background: 'var(--a63-surface-panel)',\n borderRadius: '0.75rem',\n color: 'var(--a63-text-primary)',\n display: 'flex',\n gap: 12,\n padding: '0.75rem',\n }}\n >\n <span style={{ fontSize: 12, color: 'var(--a63-text-secondary)', width: 96 }}>\n {theme} / {mode}\n </span>\n <Demo />\n </div>\n </UIProvider>\n ))\n )}\n </div>\n ),\n}\n\nexport const RadiusSpacing: Story = {\n render: () => (\n <div style={{ display: 'grid', gap: 12 }}>\n {[\n { label: 'Rounded items', radius: 'default' },\n { label: 'Flush square items', radius: 'none' },\n ].map(example => (\n <div\n key={example.radius}\n data-a63-radius={example.radius}\n style={{\n alignItems: 'center',\n background: 'var(--a63-surface-panel)',\n borderRadius: 'var(--radius-lg)',\n color: 'var(--a63-text-primary)',\n display: 'flex',\n gap: 12,\n padding: '0.75rem',\n }}\n >\n <span style={{ fontSize: 12, color: 'var(--a63-text-secondary)', width: 112 }}>\n {example.label}\n </span>\n <GroupedDemo />\n </div>\n ))}\n </div>\n ),\n}\n\n/* The same autocomplete reviewed against target host contexts. */\nexport const Endpoints: Story = {\n render: () => (\n <div style={{ display: 'grid', gap: 12 }}>\n {[\n {\n label: 'Web',\n props: { density: 'comfortable', designLanguage: 'web', input: 'pointer' } as const,\n },\n {\n label: 'iOS touch',\n props: { density: 'comfortable', designLanguage: 'ios', input: 'touch' } as const,\n },\n {\n label: 'Compact extension',\n props: {\n density: 'compact',\n designLanguage: 'web',\n input: 'pointer',\n surface: 'n2',\n } as const,\n },\n ].map(endpoint => (\n <UIProvider key={endpoint.label} {...endpoint.props}>\n <div\n style={{\n alignItems: 'center',\n background: 'var(--a63-surface-panel)',\n borderRadius: 'var(--radius-lg)',\n color: 'var(--a63-text-primary)',\n display: 'flex',\n gap: 12,\n padding: '0.75rem',\n }}\n >\n <span style={{ fontSize: 12, color: 'var(--a63-text-secondary)', width: 112 }}>\n {endpoint.label}\n </span>\n <GroupedDemo size={endpoint.label === 'Compact extension' ? 'sm' : 'md'} />\n </div>\n </UIProvider>\n ))}\n </div>\n ),\n}\n\nexport const ContractMetadata: Story = {\n render: () => (\n <pre style={{ fontSize: 12, margin: 0, whiteSpace: 'pre-wrap' }}>\n {JSON.stringify(autocompleteContract, null, 2)}\n </pre>\n ),\n}\n"
5648
5684
  },
5649
5685
  "summary": "Autocomplete combines text entry with a filtered, keyboard-navigable collection.",
5650
5686
  "usage": "Use it when typing should filter available values; use Select when scanning the list is enough.",
@@ -6985,7 +7021,7 @@
6985
7021
  "parity": "platform-adaptive",
6986
7022
  "platformAdaptations": {
6987
7023
  "react": [
6988
- "Uses a tab-backed segmented track with focus-visible feedback and an optional animated selection backplate."
7024
+ "Uses radiogroup and radio semantics on a segmented track, named by aria-label or aria-labelledby, with arrow-key selection, focus-visible feedback and an optional animated selection backplate."
6989
7025
  ],
6990
7026
  "swiftUI": [
6991
7027
  "Uses Picker with segmented style so geometry, typography, and selection feedback remain platform-native."
@@ -7042,7 +7078,7 @@
7042
7078
  ],
7043
7079
  "importPath": "@atom63/ui-react",
7044
7080
  "label": "Segmented Control",
7045
- "markdown": "# Segmented Control\n\nSegmented Control presents one active value on a shared track with a moving indicator.\n\n**Status:** Stable\n\n## Preview\n\nThe live documentation page renders the `Playground` story maintained with the component.\n\n## Guidance\n\n- Use it for a small set of peer choices and keep labels short enough to survive narrow widths.\n- Pair controls with persistent labels and explain errors beside the affected field.\n- Validate focus visibility, disabled state, invalid state, and touch input together.\n\n## Usage\n\n```tsx\nimport { SegmentedControl } from '@atom63/ui-react'\n```\n\n## API surface\n\n**Values:** `SegmentedControl`\n\n**Types:** `SegmentedControlItem`, `SegmentedControlProps`\n\nTypeScript remains the source of truth for complete prop contracts.\n\n## Contract\n\nSource: `packages/ui-foundation/contracts/components/segmented-control.json` (`segmentedControlContract` in `@atom63/ui-foundation`).\n\n| Axis | Values | Default |\n| --- | --- | --- |\n| `sizes` | `sm`, `md`, `lg` | `md` |\n| `tones` | `neutral`, `accent` | `neutral` |\n| `variants` | `icon`, `label` | `label` |\n\n**Slots:** `segmented-control`, `segmented-control-track`, `segmented-control-item`, `segmented-control-icon`, `segmented-control-label`, `segmented-control-indicator`\n\n**States:** `rest`, `hover`, `selected`, `disabled`, `focus-visible`\n\n**Visual archetype:** Segmented selection — One-of-many peer selections presented as a shared track or grouped row.\n\n### Web and iOS\n\nSwitch a compact local mode or view between a small set of mutually exclusive options. Rendered by `Picker(.segmented)` in SwiftUI, with `platform-adaptive` parity.\n\n**Required states:** `rest`, `selected`, `disabled`\n\n**Shared outcomes:**\n\n- One segment is selected at a time\n- Activation updates the selection once\n- Disabled segment prevents selection\n\n**Accessibility outcomes:**\n\n- Exposes each segment label\n- Exposes selected state\n- Preserves single selection semantics\n\n**Platform adaptations:**\n\n- React: Uses a tab-backed segmented track with focus-visible feedback and an optional animated selection backplate.\n- SwiftUI: Uses Picker with segmented style so geometry, typography, and selection feedback remain platform-native.\n\n## Related components\n\n- [Toggle Group](/components/component-toggle-group)\n- [Tabs](/components/component-tabs)\n- [Radio](/components/component-radio)\n",
7081
+ "markdown": "# Segmented Control\n\nSegmented Control presents one active value on a shared track with a moving indicator.\n\n**Status:** Stable\n\n## Preview\n\nThe live documentation page renders the `Playground` story maintained with the component.\n\n## Guidance\n\n- Use it for a small set of peer choices and keep labels short enough to survive narrow widths.\n- Pair controls with persistent labels and explain errors beside the affected field.\n- Validate focus visibility, disabled state, invalid state, and touch input together.\n\n## Usage\n\n```tsx\nimport { SegmentedControl } from '@atom63/ui-react'\n```\n\n## API surface\n\n**Values:** `SegmentedControl`\n\n**Types:** `SegmentedControlItem`, `SegmentedControlProps`\n\nTypeScript remains the source of truth for complete prop contracts.\n\n## Contract\n\nSource: `packages/ui-foundation/contracts/components/segmented-control.json` (`segmentedControlContract` in `@atom63/ui-foundation`).\n\n| Axis | Values | Default |\n| --- | --- | --- |\n| `sizes` | `sm`, `md`, `lg` | `md` |\n| `tones` | `neutral`, `accent` | `neutral` |\n| `variants` | `icon`, `label` | `label` |\n\n**Slots:** `segmented-control`, `segmented-control-track`, `segmented-control-item`, `segmented-control-icon`, `segmented-control-label`, `segmented-control-indicator`\n\n**States:** `rest`, `hover`, `selected`, `disabled`, `focus-visible`\n\n**Visual archetype:** Segmented selection — One-of-many peer selections presented as a shared track or grouped row.\n\n### Web and iOS\n\nSwitch a compact local mode or view between a small set of mutually exclusive options. Rendered by `Picker(.segmented)` in SwiftUI, with `platform-adaptive` parity.\n\n**Required states:** `rest`, `selected`, `disabled`\n\n**Shared outcomes:**\n\n- One segment is selected at a time\n- Activation updates the selection once\n- Disabled segment prevents selection\n\n**Accessibility outcomes:**\n\n- Exposes each segment label\n- Exposes selected state\n- Preserves single selection semantics\n\n**Platform adaptations:**\n\n- React: Uses radiogroup and radio semantics on a segmented track, named by aria-label or aria-labelledby, with arrow-key selection, focus-visible feedback and an optional animated selection backplate.\n- SwiftUI: Uses Picker with segmented style so geometry, typography, and selection feedback remain platform-native.\n\n## Related components\n\n- [Toggle Group](/components/component-toggle-group)\n- [Tabs](/components/component-tabs)\n- [Radio](/components/component-radio)\n",
7046
7082
  "related": [
7047
7083
  "toggle-group",
7048
7084
  "tabs",
@@ -7065,7 +7101,7 @@
7065
7101
  "Endpoints",
7066
7102
  "ContractMetadata"
7067
7103
  ],
7068
- "source": "import {\n segmentedControlContract,\n segmentedControlSizes,\n segmentedControlTones,\n segmentedControlVariants,\n themes,\n} from '@atom63/ui-foundation'\nimport { SegmentedControl, UIProvider } from '@atom63/ui-react'\nimport '@atom63/ui-react/styles.css'\nimport type { Meta, StoryObj } from '@storybook/react-vite'\nimport { GitBranch, Grid, List } from 'lucide-react'\nimport { type ReactNode, useState } from 'react'\n\nconst ITEMS = [\n { value: 'list', label: 'List' },\n { value: 'grid', label: 'Grid' },\n { value: 'tree', label: 'Tree' },\n]\n\nconst ICON_ITEMS = [\n { value: 'list', label: 'List', icon: <List /> },\n { value: 'grid', label: 'Grid', icon: <Grid /> },\n { value: 'tree', label: 'Tree', icon: <GitBranch /> },\n]\n\nconst LONG_ITEMS = [\n { value: 'list', label: 'Project overview' },\n { value: 'activity', label: 'Recent activity' },\n { value: 'permissions', label: 'Access permissions' },\n { value: 'integrations', label: 'Connected integrations' },\n]\n\nfunction Demo({\n animateBackplate,\n items = ITEMS,\n size,\n tabClassName,\n tone,\n variant,\n}: {\n animateBackplate?: boolean\n items?: typeof ITEMS\n size?: (typeof segmentedControlSizes)[number]\n tabClassName?: string\n tone?: (typeof segmentedControlTones)[number]\n variant?: (typeof segmentedControlVariants)[number]\n}) {\n const [value, setValue] = useState('list')\n return (\n <SegmentedControl\n animateBackplate={animateBackplate}\n items={items}\n onValueChange={setValue}\n size={size}\n tabClassName={tabClassName}\n tone={tone}\n value={value}\n variant={variant}\n />\n )\n}\n\nconst meta = {\n title: 'UI React/SegmentedControl',\n component: SegmentedControl,\n argTypes: {\n size: { control: 'inline-radio', options: segmentedControlSizes },\n variant: { control: 'inline-radio', options: segmentedControlVariants },\n tone: { control: 'inline-radio', options: segmentedControlTones },\n animateBackplate: { control: 'boolean' },\n },\n args: {\n size: 'md',\n tone: 'neutral',\n variant: 'label',\n animateBackplate: true,\n // Required props; every story renders its own items and state.\n items: [],\n value: '',\n onValueChange: () => {},\n },\n} satisfies Meta<typeof SegmentedControl>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\nexport const Playground: Story = {\n render: ({ animateBackplate, size, tone, variant }) => (\n <Demo animateBackplate={animateBackplate} size={size} tone={tone} variant={variant} />\n ),\n}\n\n// Documents `animateBackplate` (default true) — set false to drop the indicator's\n// sliding transition — and the `tabClassName` per-segment escape hatch.\nexport const Backplate: Story = {\n render: () => (\n <div style={{ display: 'flex', gap: 16, alignItems: 'center' }}>\n <Demo animateBackplate />\n <Demo animateBackplate={false} />\n <Demo tabClassName=\"uppercase\" />\n </div>\n ),\n}\n\nexport const Sizes: Story = {\n render: () => (\n <div style={{ display: 'flex', gap: 16, alignItems: 'center' }}>\n {segmentedControlSizes.map(size => (\n <Demo key={size} size={size} />\n ))}\n </div>\n ),\n}\n\nexport const MobileOverflow: Story = {\n tags: ['!manifest'],\n render: () => (\n <UIProvider input=\"touch\">\n <div style={{ maxWidth: 320, width: 'min(100%, calc(100vw - 2rem))' }}>\n <Demo items={LONG_ITEMS} />\n </div>\n </UIProvider>\n ),\n}\n\nexport const Variants: Story = {\n render: () => (\n <div style={{ display: 'flex', gap: 16, alignItems: 'center' }}>\n <Demo variant=\"label\" />\n <Demo items={ICON_ITEMS} variant=\"icon\" />\n </div>\n ),\n}\n\nexport const Tones: Story = {\n render: () => (\n <div style={{ display: 'flex', gap: 16, alignItems: 'center' }}>\n <Demo tone=\"neutral\" />\n <Demo tone=\"accent\" />\n </div>\n ),\n}\n\n/* Captured with forced colors on (Windows High Contrast): the selected segment\n of both tones takes the system selection colours. */\nexport const ForcedColors: Story = {\n render: () => (\n <div style={{ display: 'flex', gap: 16, alignItems: 'center' }}>\n <Demo tone=\"neutral\" />\n <Demo tone=\"accent\" />\n <Demo items={ICON_ITEMS} variant=\"icon\" />\n </div>\n ),\n}\n\nexport const Themes: Story = {\n render: () => (\n <div style={{ display: 'grid', gap: 12 }}>\n {themes.map(theme =>\n (['light', 'dark'] as const).map(mode => (\n <UIProvider key={`${theme}-${mode}`} mode={mode} theme={theme}>\n <div\n style={{\n alignItems: 'center',\n background: 'var(--a63-surface-panel)',\n borderRadius: 'var(--radius-lg)',\n color: 'var(--a63-text-primary)',\n display: 'flex',\n gap: 12,\n padding: '0.75rem',\n }}\n >\n <span style={{ fontSize: 12, color: 'var(--a63-text-secondary)', width: 96 }}>\n {theme} / {mode}\n </span>\n <Demo />\n <Demo tone=\"accent\" />\n </div>\n </UIProvider>\n ))\n )}\n </div>\n ),\n}\n\nfunction PreviewCard({ children, label }: { children: ReactNode; label: string }) {\n return (\n <div\n style={{\n background: 'var(--a63-surface-panel)',\n border: '1px solid var(--a63-border-subtle)',\n borderRadius: 'var(--radius-lg)',\n color: 'var(--a63-text-primary)',\n display: 'grid',\n gap: '0.875rem',\n padding: '1rem',\n }}\n >\n <div\n style={{\n color: 'var(--a63-text-secondary)',\n fontFamily: 'Geist Mono, monospace',\n fontSize: '0.75rem',\n }}\n >\n {label}\n </div>\n {children}\n </div>\n )\n}\n\nexport const Endpoints: Story = {\n render: () => (\n <div\n style={{\n display: 'grid',\n gap: '1rem',\n gridTemplateColumns: 'repeat(auto-fit, minmax(15rem, 1fr))',\n }}\n >\n <UIProvider designLanguage=\"web\" input=\"pointer\" mode=\"light\">\n <PreviewCard label=\"web / light / pointer\">\n <Demo />\n </PreviewCard>\n </UIProvider>\n <UIProvider designLanguage=\"web\" input=\"pointer\" mode=\"dark\">\n <PreviewCard label=\"web / dark / pointer\">\n <Demo />\n </PreviewCard>\n </UIProvider>\n <UIProvider designLanguage=\"ios\" input=\"touch\" mode=\"light\">\n <PreviewCard label=\"ios / light / touch\">\n <Demo />\n </PreviewCard>\n </UIProvider>\n <UIProvider designLanguage=\"ios\" input=\"touch\" mode=\"dark\">\n <PreviewCard label=\"ios / dark / touch\">\n <Demo />\n </PreviewCard>\n </UIProvider>\n <UIProvider density=\"compact\" designLanguage=\"web\" input=\"pointer\" mode=\"light\">\n <PreviewCard label=\"compact extension / light\">\n <Demo />\n </PreviewCard>\n </UIProvider>\n <UIProvider density=\"compact\" designLanguage=\"web\" input=\"pointer\" mode=\"dark\">\n <PreviewCard label=\"compact extension / dark\">\n <Demo />\n </PreviewCard>\n </UIProvider>\n </div>\n ),\n}\n\nexport const ContractMetadata: Story = {\n render: () => (\n <pre style={{ fontSize: 12, margin: 0, whiteSpace: 'pre-wrap' }}>\n {JSON.stringify(segmentedControlContract, null, 2)}\n </pre>\n ),\n}\n"
7104
+ "source": "import {\n segmentedControlContract,\n segmentedControlSizes,\n segmentedControlTones,\n segmentedControlVariants,\n themes,\n} from '@atom63/ui-foundation'\nimport { SegmentedControl, UIProvider } from '@atom63/ui-react'\nimport '@atom63/ui-react/styles.css'\nimport type { Meta, StoryObj } from '@storybook/react-vite'\nimport { GitBranch, Grid, List } from 'lucide-react'\nimport { type ReactNode, useState } from 'react'\n\nconst ITEMS = [\n { value: 'list', label: 'List' },\n { value: 'grid', label: 'Grid' },\n { value: 'tree', label: 'Tree' },\n]\n\nconst ICON_ITEMS = [\n { value: 'list', label: 'List', icon: <List /> },\n { value: 'grid', label: 'Grid', icon: <Grid /> },\n { value: 'tree', label: 'Tree', icon: <GitBranch /> },\n]\n\nconst LONG_ITEMS = [\n { value: 'list', label: 'Project overview' },\n { value: 'activity', label: 'Recent activity' },\n { value: 'permissions', label: 'Access permissions' },\n { value: 'integrations', label: 'Connected integrations' },\n]\n\nfunction Demo({\n animateBackplate,\n initialValue = 'list',\n items = ITEMS,\n size,\n tabClassName,\n tone,\n variant,\n}: {\n animateBackplate?: boolean\n initialValue?: string\n items?: typeof ITEMS\n size?: (typeof segmentedControlSizes)[number]\n tabClassName?: string\n tone?: (typeof segmentedControlTones)[number]\n variant?: (typeof segmentedControlVariants)[number]\n}) {\n const [value, setValue] = useState(initialValue)\n return (\n <SegmentedControl\n animateBackplate={animateBackplate}\n aria-label=\"View\"\n items={items}\n onValueChange={setValue}\n size={size}\n tabClassName={tabClassName}\n tone={tone}\n value={value}\n variant={variant}\n />\n )\n}\n\nconst meta = {\n title: 'UI React/SegmentedControl',\n component: SegmentedControl,\n argTypes: {\n size: { control: 'inline-radio', options: segmentedControlSizes },\n variant: { control: 'inline-radio', options: segmentedControlVariants },\n tone: { control: 'inline-radio', options: segmentedControlTones },\n animateBackplate: { control: 'boolean' },\n },\n args: {\n size: 'md',\n tone: 'neutral',\n variant: 'label',\n animateBackplate: true,\n // Required props; every story renders its own items and state.\n items: [],\n value: '',\n onValueChange: () => {},\n },\n} satisfies Meta<typeof SegmentedControl>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\n/* A radio group named \"View\": Tab enters at the selected segment and the arrow\n keys move and select. The APG radio pattern test plays this story, which\n starts on the second segment. */\nexport const Playground: Story = {\n render: ({ animateBackplate, size, tone, variant }) => (\n <Demo\n animateBackplate={animateBackplate}\n initialValue=\"grid\"\n size={size}\n tone={tone}\n variant={variant}\n />\n ),\n}\n\n// Documents `animateBackplate` (default true) — set false to drop the indicator's\n// sliding transition — and the `tabClassName` per-segment escape hatch.\nexport const Backplate: Story = {\n render: () => (\n <div style={{ display: 'flex', gap: 16, alignItems: 'center' }}>\n <Demo animateBackplate />\n <Demo animateBackplate={false} />\n <Demo tabClassName=\"uppercase\" />\n </div>\n ),\n}\n\nexport const Sizes: Story = {\n render: () => (\n <div style={{ display: 'flex', gap: 16, alignItems: 'center' }}>\n {segmentedControlSizes.map(size => (\n <Demo key={size} size={size} />\n ))}\n </div>\n ),\n}\n\nexport const MobileOverflow: Story = {\n tags: ['!manifest'],\n render: () => (\n <UIProvider input=\"touch\">\n <div style={{ maxWidth: 320, width: 'min(100%, calc(100vw - 2rem))' }}>\n <Demo items={LONG_ITEMS} />\n </div>\n </UIProvider>\n ),\n}\n\nexport const Variants: Story = {\n render: () => (\n <div style={{ display: 'flex', gap: 16, alignItems: 'center' }}>\n <Demo variant=\"label\" />\n <Demo items={ICON_ITEMS} variant=\"icon\" />\n </div>\n ),\n}\n\nexport const Tones: Story = {\n render: () => (\n <div style={{ display: 'flex', gap: 16, alignItems: 'center' }}>\n <Demo tone=\"neutral\" />\n <Demo tone=\"accent\" />\n </div>\n ),\n}\n\n/* Captured with forced colors on (Windows High Contrast): the selected segment\n of both tones takes the system selection colours. */\nexport const ForcedColors: Story = {\n render: () => (\n <div style={{ display: 'flex', gap: 16, alignItems: 'center' }}>\n <Demo tone=\"neutral\" />\n <Demo tone=\"accent\" />\n <Demo items={ICON_ITEMS} variant=\"icon\" />\n </div>\n ),\n}\n\nexport const Themes: Story = {\n render: () => (\n <div style={{ display: 'grid', gap: 12 }}>\n {themes.map(theme =>\n (['light', 'dark'] as const).map(mode => (\n <UIProvider key={`${theme}-${mode}`} mode={mode} theme={theme}>\n <div\n style={{\n alignItems: 'center',\n background: 'var(--a63-surface-panel)',\n borderRadius: 'var(--radius-lg)',\n color: 'var(--a63-text-primary)',\n display: 'flex',\n gap: 12,\n padding: '0.75rem',\n }}\n >\n <span style={{ fontSize: 12, color: 'var(--a63-text-secondary)', width: 96 }}>\n {theme} / {mode}\n </span>\n <Demo />\n <Demo tone=\"accent\" />\n </div>\n </UIProvider>\n ))\n )}\n </div>\n ),\n}\n\nfunction PreviewCard({ children, label }: { children: ReactNode; label: string }) {\n return (\n <div\n style={{\n background: 'var(--a63-surface-panel)',\n border: '1px solid var(--a63-border-subtle)',\n borderRadius: 'var(--radius-lg)',\n color: 'var(--a63-text-primary)',\n display: 'grid',\n gap: '0.875rem',\n padding: '1rem',\n }}\n >\n <div\n style={{\n color: 'var(--a63-text-secondary)',\n fontFamily: 'Geist Mono, monospace',\n fontSize: '0.75rem',\n }}\n >\n {label}\n </div>\n {children}\n </div>\n )\n}\n\nexport const Endpoints: Story = {\n render: () => (\n <div\n style={{\n display: 'grid',\n gap: '1rem',\n gridTemplateColumns: 'repeat(auto-fit, minmax(15rem, 1fr))',\n }}\n >\n <UIProvider designLanguage=\"web\" input=\"pointer\" mode=\"light\">\n <PreviewCard label=\"web / light / pointer\">\n <Demo />\n </PreviewCard>\n </UIProvider>\n <UIProvider designLanguage=\"web\" input=\"pointer\" mode=\"dark\">\n <PreviewCard label=\"web / dark / pointer\">\n <Demo />\n </PreviewCard>\n </UIProvider>\n <UIProvider designLanguage=\"ios\" input=\"touch\" mode=\"light\">\n <PreviewCard label=\"ios / light / touch\">\n <Demo />\n </PreviewCard>\n </UIProvider>\n <UIProvider designLanguage=\"ios\" input=\"touch\" mode=\"dark\">\n <PreviewCard label=\"ios / dark / touch\">\n <Demo />\n </PreviewCard>\n </UIProvider>\n <UIProvider density=\"compact\" designLanguage=\"web\" input=\"pointer\" mode=\"light\">\n <PreviewCard label=\"compact extension / light\">\n <Demo />\n </PreviewCard>\n </UIProvider>\n <UIProvider density=\"compact\" designLanguage=\"web\" input=\"pointer\" mode=\"dark\">\n <PreviewCard label=\"compact extension / dark\">\n <Demo />\n </PreviewCard>\n </UIProvider>\n </div>\n ),\n}\n\nexport const ContractMetadata: Story = {\n render: () => (\n <pre style={{ fontSize: 12, margin: 0, whiteSpace: 'pre-wrap' }}>\n {JSON.stringify(segmentedControlContract, null, 2)}\n </pre>\n ),\n}\n"
7069
7105
  },
7070
7106
  "summary": "Segmented Control presents one active value on a shared track with a moving indicator.",
7071
7107
  "usage": "Use it for a small set of peer choices and keep labels short enough to survive narrow widths.",
@@ -8123,6 +8159,7 @@
8123
8159
  },
8124
8160
  "exports": {
8125
8161
  "types": [
8162
+ "CommandDialogPopupProps",
8126
8163
  "CommandInputProps"
8127
8164
  ],
8128
8165
  "values": [
@@ -8158,7 +8195,7 @@
8158
8195
  ],
8159
8196
  "importPath": "@atom63/ui-react",
8160
8197
  "label": "Command",
8161
- "markdown": "# Command\n\nCommand provides a searchable command collection that can render inline or in a dialog.\n\n**Status:** Stable\n\n## Preview\n\nThe live documentation page renders the `Inline` story maintained with the component.\n\n## Guidance\n\n- Group actions by intent, expose empty results, and keep shortcuts supplementary to labels.\n- Preserve link, menu, command, or selection semantics instead of styling generic containers.\n- Expose current location when applicable and verify alternate input paths at narrow widths.\n\n## Usage\n\n```tsx\nimport { Command, CommandInput, CommandPanel, CommandList, CommandItem } from '@atom63/ui-react'\n```\n\n## API surface\n\n**Values:** `Command`, `CommandCollection`, `CommandCreateHandle`, `CommandDialog`, `CommandDialogBackdrop`, `CommandDialogPopup`, `CommandDialogPortal`, `CommandDialogTrigger`, `CommandDialogViewport`, `CommandEmpty`, `CommandFooter`, `CommandGroup`, `CommandGroupLabel`, `CommandInput`, `CommandItem`, `CommandList`, `CommandPanel`, `CommandSeparator`, `CommandShortcut`\n\n**Types:** `CommandInputProps`\n\nTypeScript remains the source of truth for complete prop contracts.\n\n## Contract\n\nSource: `packages/ui-foundation/contracts/components/command.json` (`commandContract` in `@atom63/ui-foundation`).\n\n**Slots:** `command`, `command-dialog-trigger`, `command-dialog-backdrop`, `command-dialog-viewport`, `command-dialog-popup`, `command-input-wrapper`, `command-input`, `command-input-end`, `command-panel`, `command-list`, `command-empty`, `command-group`, `command-group-label`, `command-collection`, `command-item`, `command-separator`, `command-shortcut`, `command-footer`\n\n**States:** `closed`, `open`, `empty`, `highlighted`, `disabled`, `focus-visible`\n\n**Visual archetype:** Overlay surfaces — Floating material above the page or current surface.; Static content surfaces — In-flow containers and content surfaces that do not inherently manipulate state.; Field controls — Editable or field-like data-entry surfaces.; Menus and option lists — Dense action or selection rows inside a floating or embedded list.\n\n## Related components\n\n- [Autocomplete](/components/component-autocomplete)\n- [Dialog](/components/component-dialog)\n- [Kbd](/components/component-kbd)\n",
8198
+ "markdown": "# Command\n\nCommand provides a searchable command collection that can render inline or in a dialog.\n\n**Status:** Stable\n\n## Preview\n\nThe live documentation page renders the `Inline` story maintained with the component.\n\n## Guidance\n\n- Group actions by intent, expose empty results, and keep shortcuts supplementary to labels.\n- Preserve link, menu, command, or selection semantics instead of styling generic containers.\n- Expose current location when applicable and verify alternate input paths at narrow widths.\n\n## Usage\n\n```tsx\nimport { Command, CommandInput, CommandPanel, CommandList, CommandItem } from '@atom63/ui-react'\n```\n\n## API surface\n\n**Values:** `Command`, `CommandCollection`, `CommandCreateHandle`, `CommandDialog`, `CommandDialogBackdrop`, `CommandDialogPopup`, `CommandDialogPortal`, `CommandDialogTrigger`, `CommandDialogViewport`, `CommandEmpty`, `CommandFooter`, `CommandGroup`, `CommandGroupLabel`, `CommandInput`, `CommandItem`, `CommandList`, `CommandPanel`, `CommandSeparator`, `CommandShortcut`\n\n**Types:** `CommandDialogPopupProps`, `CommandInputProps`\n\nTypeScript remains the source of truth for complete prop contracts.\n\n## Contract\n\nSource: `packages/ui-foundation/contracts/components/command.json` (`commandContract` in `@atom63/ui-foundation`).\n\n**Slots:** `command`, `command-dialog-trigger`, `command-dialog-backdrop`, `command-dialog-viewport`, `command-dialog-popup`, `command-input-wrapper`, `command-input`, `command-input-end`, `command-panel`, `command-list`, `command-empty`, `command-group`, `command-group-label`, `command-collection`, `command-item`, `command-separator`, `command-shortcut`, `command-footer`\n\n**States:** `closed`, `open`, `empty`, `highlighted`, `disabled`, `focus-visible`\n\n**Visual archetype:** Overlay surfaces — Floating material above the page or current surface.; Static content surfaces — In-flow containers and content surfaces that do not inherently manipulate state.; Field controls — Editable or field-like data-entry surfaces.; Menus and option lists — Dense action or selection rows inside a floating or embedded list.\n\n## Related components\n\n- [Autocomplete](/components/component-autocomplete)\n- [Dialog](/components/component-dialog)\n- [Kbd](/components/component-kbd)\n",
8162
8199
  "related": [
8163
8200
  "autocomplete",
8164
8201
  "dialog",
@@ -8174,12 +8211,13 @@
8174
8211
  "ForcedColors",
8175
8212
  "InputSlots",
8176
8213
  "Dialog",
8214
+ "DialogOpen",
8177
8215
  "ProgrammaticHandle",
8178
8216
  "Themes",
8179
8217
  "Endpoints",
8180
8218
  "ContractMetadata"
8181
8219
  ],
8182
- "source": "import { commandContract, themes } from '@atom63/ui-foundation'\nimport {\n Command,\n CommandCollection,\n CommandCreateHandle,\n CommandDialog,\n CommandDialogPopup,\n CommandDialogTrigger,\n CommandEmpty,\n CommandFooter,\n CommandGroup,\n CommandGroupLabel,\n CommandInput,\n CommandItem,\n CommandList,\n CommandPanel,\n CommandSeparator,\n CommandShortcut,\n Kbd,\n UIProvider,\n} from '@atom63/ui-react'\nimport '@atom63/ui-react/styles.css'\nimport type { Meta, StoryObj } from '@storybook/react-vite'\nimport { Filter } from 'lucide-react'\nimport { Fragment, useMemo, useState } from 'react'\n\nconst meta = {\n title: 'UI React/Command',\n component: Command,\n} satisfies Meta<typeof Command>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\ntype Item = { id: string; label: string; shortcut?: string; value: string }\ntype Group = { id: string; label: string; items: Item[] }\n\nconst groups: Group[] = [\n {\n id: 'navigate',\n label: 'Navigate',\n items: [\n { id: 'home', label: 'Home', value: 'Home /' },\n { id: 'blog', label: 'Blog', value: 'Blog /blog' },\n { id: 'timeline', label: 'Timeline', value: 'Timeline /timeline' },\n ],\n },\n {\n id: 'actions',\n label: 'Actions',\n items: [{ id: 'prefs', label: 'Preferences', shortcut: '⌘,', value: 'Preferences settings' }],\n },\n]\n\nfunction Palette() {\n return (\n <Command itemToStringValue={item => (item as Item).value} items={groups}>\n <CommandInput placeholder=\"Search pages and actions…\" />\n <CommandPanel>\n <CommandEmpty>No results found.</CommandEmpty>\n <CommandList>\n {(group: Group) => (\n <Fragment key={group.id}>\n <CommandGroup items={group.items}>\n <CommandGroupLabel>{group.label}</CommandGroupLabel>\n <CommandCollection>\n {(item: Item) => (\n <CommandItem key={item.id} value={item}>\n <span style={{ flex: 1, minWidth: 0 }}>{item.label}</span>\n {item.shortcut ? <CommandShortcut>{item.shortcut}</CommandShortcut> : null}\n </CommandItem>\n )}\n </CommandCollection>\n </CommandGroup>\n {group.id !== groups.at(-1)?.id ? <CommandSeparator /> : null}\n </Fragment>\n )}\n </CommandList>\n </CommandPanel>\n <CommandFooter>\n <span style={{ alignItems: 'center', display: 'flex', gap: 6 }}>\n <Kbd>↑↓</Kbd>\n <span>Navigate</span>\n </span>\n <CommandShortcut>⌘K</CommandShortcut>\n </CommandFooter>\n </Command>\n )\n}\n\n/* The palette on its own (no dialog) — useful for inspecting the panel chrome. */\nexport const Inline: Story = {\n render: () => (\n <div\n style={{\n border: '1px solid var(--a63-border-subtle)',\n borderRadius: 'var(--radius-2xl)',\n background: 'var(--a63-surface-overlay)',\n boxShadow: 'var(--a63-overlay-shadow)',\n maxWidth: 480,\n overflow: 'hidden',\n }}\n >\n <Palette />\n </div>\n ),\n}\n\n/* Captured with forced colors on (Windows High Contrast): focus stays in the\n input, so the highlighted option, the one Enter runs, takes the system\n selection colours. */\nexport const ForcedColors: Story = { render: Inline.render }\n\n/* The input's slots: a caller's icon in place of the search glyph, and a\n shortcut hint after the field, as in a filter menu. */\nexport const InputSlots: Story = {\n render: () => (\n <div\n style={{\n border: '1px solid var(--a63-border-subtle)',\n borderRadius: 'var(--radius-2xl)',\n background: 'var(--a63-surface-overlay)',\n maxWidth: 360,\n overflow: 'hidden',\n }}\n >\n <Command itemToStringValue={item => (item as Item).value} items={groups[0].items}>\n <CommandInput endAddon={<Kbd>F</Kbd>} icon={<Filter />} placeholder=\"Add filter…\" />\n <CommandPanel>\n <CommandEmpty>No filters found.</CommandEmpty>\n <CommandList>\n {(item: Item) => (\n <CommandItem key={item.id} value={item}>\n {item.label}\n </CommandItem>\n )}\n </CommandList>\n </CommandPanel>\n </Command>\n </div>\n ),\n}\n\nconst triggerStyle = {\n border: '1px solid var(--a63-border-control)',\n borderRadius: 'var(--a63-radius-control)',\n background: 'var(--a63-surface-control)',\n color: 'var(--a63-text-primary)',\n cursor: 'pointer',\n padding: '0.5rem 0.75rem',\n} as const\n\n/* The full modal (⌘K) shell — click to open the dialog. */\nexport const Dialog: Story = {\n render: () => {\n function Demo() {\n const [open, setOpen] = useState(false)\n return (\n <>\n <button onClick={() => setOpen(true)} style={triggerStyle} type=\"button\">\n Open command palette\n </button>\n <CommandDialog onOpenChange={setOpen} open={open}>\n <CommandDialogPopup>\n <Palette />\n </CommandDialogPopup>\n </CommandDialog>\n </>\n )\n }\n return <Demo />\n },\n}\n\n/*\n * Programmatic handle — CommandCreateHandle() builds a detached DialogHandle you\n * pass to CommandDialog via `handle`. Any button can then call handle.open(null)\n * imperatively (no open state to thread), and a detached CommandDialogTrigger wired\n * to the same handle stays in sync.\n */\nexport const ProgrammaticHandle: Story = {\n render: () => {\n function Demo() {\n // Create the handle once for this mounted tree.\n const handle = useMemo(() => CommandCreateHandle(), [])\n return (\n <div style={{ alignItems: 'center', display: 'flex', gap: 12 }}>\n {/* Imperative open — fired from an arbitrary event handler. */}\n <button onClick={() => handle.open(null)} style={triggerStyle} type=\"button\">\n Open via handle.open()\n </button>\n {/* A detached trigger bound to the same handle. */}\n <CommandDialogTrigger handle={handle} style={triggerStyle}>\n Open via detached trigger\n </CommandDialogTrigger>\n <CommandDialog handle={handle}>\n <CommandDialogPopup>\n <Palette />\n </CommandDialogPopup>\n </CommandDialog>\n </div>\n )\n }\n return <Demo />\n },\n}\n\n/* Every DS theme × light/dark — the inline palette chrome reads a63 overlay tokens. */\nexport const Themes: Story = {\n render: () => (\n <div style={{ display: 'grid', gap: 12 }}>\n {themes.map(theme =>\n (['light', 'dark'] as const).map(mode => (\n <UIProvider key={`${theme}-${mode}`} mode={mode} theme={theme}>\n <div\n style={{\n alignItems: 'center',\n background: 'var(--a63-surface-panel)',\n borderRadius: '0.75rem',\n color: 'var(--a63-text-primary)',\n display: 'flex',\n gap: 12,\n padding: '0.75rem',\n }}\n >\n <span style={{ fontSize: 12, color: 'var(--a63-text-secondary)', width: 96 }}>\n {theme} / {mode}\n </span>\n <div\n style={{\n background: 'var(--a63-surface-overlay)',\n border: '1px solid var(--a63-border-subtle)',\n borderRadius: 'var(--radius-2xl)',\n boxShadow: 'var(--a63-overlay-shadow)',\n flex: 1,\n maxWidth: 420,\n overflow: 'hidden',\n }}\n >\n <Palette />\n </div>\n </div>\n </UIProvider>\n ))\n )}\n </div>\n ),\n}\n\n/* The same command palette reviewed against target host contexts. */\nexport const Endpoints: Story = {\n render: () => (\n <div style={{ display: 'grid', gap: 12 }}>\n {[\n {\n label: 'Web',\n props: { density: 'comfortable', designLanguage: 'web', input: 'pointer' } as const,\n },\n {\n label: 'iOS touch',\n props: { density: 'comfortable', designLanguage: 'ios', input: 'touch' } as const,\n },\n {\n label: 'Compact extension',\n props: {\n density: 'compact',\n designLanguage: 'web',\n input: 'pointer',\n surface: 'n2',\n } as const,\n },\n ].map(endpoint => (\n <UIProvider key={endpoint.label} {...endpoint.props}>\n <div\n style={{\n alignItems: 'center',\n background: 'var(--a63-surface-panel)',\n borderRadius: 'var(--radius-lg)',\n color: 'var(--a63-text-primary)',\n display: 'flex',\n gap: 12,\n padding: '0.75rem',\n }}\n >\n <span style={{ fontSize: 12, color: 'var(--a63-text-secondary)', width: 112 }}>\n {endpoint.label}\n </span>\n <div\n style={{\n background: 'var(--a63-surface-overlay)',\n border: '1px solid var(--a63-border-subtle)',\n borderRadius: 'var(--radius-2xl)',\n boxShadow: 'var(--a63-overlay-shadow)',\n flex: 1,\n maxWidth: 420,\n overflow: 'hidden',\n }}\n >\n <Palette />\n </div>\n </div>\n </UIProvider>\n ))}\n </div>\n ),\n}\n\nexport const ContractMetadata: Story = {\n render: () => (\n <pre style={{ fontSize: 12, margin: 0, whiteSpace: 'pre-wrap' }}>\n {JSON.stringify(commandContract, null, 2)}\n </pre>\n ),\n}\n"
8220
+ "source": "import { commandContract, themes } from '@atom63/ui-foundation'\nimport {\n Command,\n CommandCollection,\n CommandCreateHandle,\n CommandDialog,\n CommandDialogPopup,\n CommandDialogTrigger,\n CommandEmpty,\n CommandFooter,\n CommandGroup,\n CommandGroupLabel,\n CommandInput,\n CommandItem,\n CommandList,\n CommandPanel,\n CommandSeparator,\n CommandShortcut,\n Kbd,\n UIProvider,\n} from '@atom63/ui-react'\nimport '@atom63/ui-react/styles.css'\nimport type { Meta, StoryObj } from '@storybook/react-vite'\nimport { Filter } from 'lucide-react'\nimport { Fragment, useMemo, useState } from 'react'\n\nconst meta = {\n title: 'UI React/Command',\n component: Command,\n} satisfies Meta<typeof Command>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\ntype Item = { id: string; label: string; shortcut?: string; value: string }\ntype Group = { id: string; label: string; items: Item[] }\n\nconst groups: Group[] = [\n {\n id: 'navigate',\n label: 'Navigate',\n items: [\n { id: 'home', label: 'Home', value: 'Home /' },\n { id: 'blog', label: 'Blog', value: 'Blog /blog' },\n { id: 'timeline', label: 'Timeline', value: 'Timeline /timeline' },\n ],\n },\n {\n id: 'actions',\n label: 'Actions',\n items: [{ id: 'prefs', label: 'Preferences', shortcut: '⌘,', value: 'Preferences settings' }],\n },\n]\n\nfunction Palette() {\n return (\n <Command itemToStringValue={item => (item as Item).value} items={groups}>\n <CommandInput placeholder=\"Search pages and actions…\" />\n <CommandPanel>\n <CommandEmpty>No results found.</CommandEmpty>\n <CommandList>\n {(group: Group) => (\n <Fragment key={group.id}>\n <CommandGroup items={group.items}>\n <CommandGroupLabel>{group.label}</CommandGroupLabel>\n <CommandCollection>\n {(item: Item) => (\n <CommandItem key={item.id} value={item}>\n <span style={{ flex: 1, minWidth: 0 }}>{item.label}</span>\n {item.shortcut ? <CommandShortcut>{item.shortcut}</CommandShortcut> : null}\n </CommandItem>\n )}\n </CommandCollection>\n </CommandGroup>\n {group.id !== groups.at(-1)?.id ? <CommandSeparator /> : null}\n </Fragment>\n )}\n </CommandList>\n </CommandPanel>\n <CommandFooter>\n <span style={{ alignItems: 'center', display: 'flex', gap: 6 }}>\n <Kbd>↑↓</Kbd>\n <span>Navigate</span>\n </span>\n <CommandShortcut>⌘K</CommandShortcut>\n </CommandFooter>\n </Command>\n )\n}\n\n/* The palette on its own (no dialog) — useful for inspecting the panel chrome. */\nexport const Inline: Story = {\n render: () => (\n <div\n style={{\n border: '1px solid var(--a63-border-subtle)',\n borderRadius: 'var(--radius-2xl)',\n background: 'var(--a63-surface-overlay)',\n boxShadow: 'var(--a63-overlay-shadow)',\n maxWidth: 480,\n overflow: 'hidden',\n }}\n >\n <Palette />\n </div>\n ),\n}\n\n/* Captured with forced colors on (Windows High Contrast): focus stays in the\n input, so the highlighted option, the one Enter runs, takes the system\n selection colours. */\nexport const ForcedColors: Story = { render: Inline.render }\n\n/* The input's slots: a caller's icon in place of the search glyph, and a\n shortcut hint after the field, as in a filter menu. */\nexport const InputSlots: Story = {\n render: () => (\n <div\n style={{\n border: '1px solid var(--a63-border-subtle)',\n borderRadius: 'var(--radius-2xl)',\n background: 'var(--a63-surface-overlay)',\n maxWidth: 360,\n overflow: 'hidden',\n }}\n >\n <Command itemToStringValue={item => (item as Item).value} items={groups[0].items}>\n <CommandInput endAddon={<Kbd>F</Kbd>} icon={<Filter />} placeholder=\"Add filter…\" />\n <CommandPanel>\n <CommandEmpty>No filters found.</CommandEmpty>\n <CommandList>\n {(item: Item) => (\n <CommandItem key={item.id} value={item}>\n {item.label}\n </CommandItem>\n )}\n </CommandList>\n </CommandPanel>\n </Command>\n </div>\n ),\n}\n\nconst triggerStyle = {\n border: '1px solid var(--a63-border-control)',\n borderRadius: 'var(--a63-radius-control)',\n background: 'var(--a63-surface-control)',\n color: 'var(--a63-text-primary)',\n cursor: 'pointer',\n padding: '0.5rem 0.75rem',\n} as const\n\n/* The full modal (⌘K) shell — click to open the dialog. */\nexport const Dialog: Story = {\n render: () => {\n function Demo() {\n const [open, setOpen] = useState(false)\n return (\n <>\n <button onClick={() => setOpen(true)} style={triggerStyle} type=\"button\">\n Open command palette\n </button>\n <CommandDialog onOpenChange={setOpen} open={open}>\n <CommandDialogPopup>\n <Palette />\n </CommandDialogPopup>\n </CommandDialog>\n </>\n )\n }\n return <Demo />\n },\n}\n\n/** The modal palette open as an app shows it, so axe and the visual test cover the dialog. */\nexport const DialogOpen: Story = {\n render: () => (\n <CommandDialog defaultOpen>\n <CommandDialogPopup>\n <Palette />\n </CommandDialogPopup>\n </CommandDialog>\n ),\n}\n\n/*\n * Programmatic handle —CommandCreateHandle() builds a detached DialogHandle you\n * pass to CommandDialog via `handle`. Any button can then call handle.open(null)\n * imperatively (no open state to thread), and a detached CommandDialogTrigger wired\n * to the same handle stays in sync.\n */\nexport const ProgrammaticHandle: Story = {\n render: () => {\n function Demo() {\n // Create the handle once for this mounted tree.\n const handle = useMemo(() => CommandCreateHandle(), [])\n return (\n <div style={{ alignItems: 'center', display: 'flex', gap: 12 }}>\n {/* Imperative open — fired from an arbitrary event handler. */}\n <button onClick={() => handle.open(null)} style={triggerStyle} type=\"button\">\n Open via handle.open()\n </button>\n {/* A detached trigger bound to the same handle. */}\n <CommandDialogTrigger handle={handle} style={triggerStyle}>\n Open via detached trigger\n </CommandDialogTrigger>\n <CommandDialog handle={handle}>\n <CommandDialogPopup>\n <Palette />\n </CommandDialogPopup>\n </CommandDialog>\n </div>\n )\n }\n return <Demo />\n },\n}\n\n/* Every DS theme × light/dark — the inline palette chrome reads a63 overlay tokens. */\nexport const Themes: Story = {\n render: () => (\n <div style={{ display: 'grid', gap: 12 }}>\n {themes.map(theme =>\n (['light', 'dark'] as const).map(mode => (\n <UIProvider key={`${theme}-${mode}`} mode={mode} theme={theme}>\n <div\n style={{\n alignItems: 'center',\n background: 'var(--a63-surface-panel)',\n borderRadius: '0.75rem',\n color: 'var(--a63-text-primary)',\n display: 'flex',\n gap: 12,\n padding: '0.75rem',\n }}\n >\n <span style={{ fontSize: 12, color: 'var(--a63-text-secondary)', width: 96 }}>\n {theme} / {mode}\n </span>\n <div\n style={{\n background: 'var(--a63-surface-overlay)',\n border: '1px solid var(--a63-border-subtle)',\n borderRadius: 'var(--radius-2xl)',\n boxShadow: 'var(--a63-overlay-shadow)',\n flex: 1,\n maxWidth: 420,\n overflow: 'hidden',\n }}\n >\n <Palette />\n </div>\n </div>\n </UIProvider>\n ))\n )}\n </div>\n ),\n}\n\n/* The same command palette reviewed against target host contexts. */\nexport const Endpoints: Story = {\n render: () => (\n <div style={{ display: 'grid', gap: 12 }}>\n {[\n {\n label: 'Web',\n props: { density: 'comfortable', designLanguage: 'web', input: 'pointer' } as const,\n },\n {\n label: 'iOS touch',\n props: { density: 'comfortable', designLanguage: 'ios', input: 'touch' } as const,\n },\n {\n label: 'Compact extension',\n props: {\n density: 'compact',\n designLanguage: 'web',\n input: 'pointer',\n surface: 'n2',\n } as const,\n },\n ].map(endpoint => (\n <UIProvider key={endpoint.label} {...endpoint.props}>\n <div\n style={{\n alignItems: 'center',\n background: 'var(--a63-surface-panel)',\n borderRadius: 'var(--radius-lg)',\n color: 'var(--a63-text-primary)',\n display: 'flex',\n gap: 12,\n padding: '0.75rem',\n }}\n >\n <span style={{ fontSize: 12, color: 'var(--a63-text-secondary)', width: 112 }}>\n {endpoint.label}\n </span>\n <div\n style={{\n background: 'var(--a63-surface-overlay)',\n border: '1px solid var(--a63-border-subtle)',\n borderRadius: 'var(--radius-2xl)',\n boxShadow: 'var(--a63-overlay-shadow)',\n flex: 1,\n maxWidth: 420,\n overflow: 'hidden',\n }}\n >\n <Palette />\n </div>\n </div>\n </UIProvider>\n ))}\n </div>\n ),\n}\n\nexport const ContractMetadata: Story = {\n render: () => (\n <pre style={{ fontSize: 12, margin: 0, whiteSpace: 'pre-wrap' }}>\n {JSON.stringify(commandContract, null, 2)}\n </pre>\n ),\n}\n"
8183
8221
  },
8184
8222
  "summary": "Command provides a searchable command collection that can render inline or in a dialog.",
8185
8223
  "usage": "Group actions by intent, expose empty results, and keep shortcuts supplementary to labels.",
@@ -8758,7 +8796,8 @@
8758
8796
  "source": "packages/ui-foundation/contracts/components/pagination.json",
8759
8797
  "states": [
8760
8798
  "rest",
8761
- "current"
8799
+ "current",
8800
+ "disabled"
8762
8801
  ],
8763
8802
  "tokenSlots": []
8764
8803
  },
@@ -8793,7 +8832,7 @@
8793
8832
  ],
8794
8833
  "importPath": "@atom63/ui-react",
8795
8834
  "label": "Pagination",
8796
- "markdown": "# Pagination\n\nPagination provides a navigation landmark and consistent previous, next, and page links.\n\n**Status:** Stable\n\n## Preview\n\nThe live documentation page renders the `Playground` story maintained with the component.\n\n## Guidance\n\n- Expose the current page and real link destinations so navigation works without client state.\n- Preserve link, menu, command, or selection semantics instead of styling generic containers.\n- Expose current location when applicable and verify alternate input paths at narrow widths.\n\n## Usage\n\n```tsx\nimport { Pagination, PaginationContent, PaginationItem, PaginationLink } from '@atom63/ui-react'\n```\n\n## API surface\n\n**Values:** `Pagination`, `PaginationContent`, `PaginationEllipsis`, `PaginationItem`, `PaginationLink`, `PaginationNext`, `PaginationPrevious`\n\n**Types:** `PaginationContentProps`, `PaginationEllipsisProps`, `PaginationItemProps`, `PaginationLinkProps`, `PaginationNextProps`, `PaginationPreviousProps`, `PaginationProps`\n\nTypeScript remains the source of truth for complete prop contracts.\n\n## Contract\n\nSource: `packages/ui-foundation/contracts/components/pagination.json` (`paginationContract` in `@atom63/ui-foundation`).\n\n| Axis | Values | Default |\n| --- | --- | --- |\n| `linkSizes` | `xs`, `sm`, `md`, `lg`, `xl`, `tile`, `icon-xs`, `icon-sm`, `icon`, `icon-lg`, `icon-xl` | `icon` |\n\n**Slots:** `pagination`, `pagination-content`, `pagination-item`, `pagination-link`, `pagination-ellipsis`\n\n**States:** `rest`, `current`\n\n**Visual archetype:** Action controls — Momentary controls that perform an action now.\n\n## Related components\n\n- [Breadcrumb](/components/component-breadcrumb)\n- [Button](/components/component-button)\n",
8835
+ "markdown": "# Pagination\n\nPagination provides a navigation landmark and consistent previous, next, and page links.\n\n**Status:** Stable\n\n## Preview\n\nThe live documentation page renders the `Playground` story maintained with the component.\n\n## Guidance\n\n- Expose the current page and real link destinations so navigation works without client state.\n- Preserve link, menu, command, or selection semantics instead of styling generic containers.\n- Expose current location when applicable and verify alternate input paths at narrow widths.\n\n## Usage\n\n```tsx\nimport { Pagination, PaginationContent, PaginationItem, PaginationLink } from '@atom63/ui-react'\n```\n\n## API surface\n\n**Values:** `Pagination`, `PaginationContent`, `PaginationEllipsis`, `PaginationItem`, `PaginationLink`, `PaginationNext`, `PaginationPrevious`\n\n**Types:** `PaginationContentProps`, `PaginationEllipsisProps`, `PaginationItemProps`, `PaginationLinkProps`, `PaginationNextProps`, `PaginationPreviousProps`, `PaginationProps`\n\nTypeScript remains the source of truth for complete prop contracts.\n\n## Contract\n\nSource: `packages/ui-foundation/contracts/components/pagination.json` (`paginationContract` in `@atom63/ui-foundation`).\n\n| Axis | Values | Default |\n| --- | --- | --- |\n| `linkSizes` | `xs`, `sm`, `md`, `lg`, `xl`, `tile`, `icon-xs`, `icon-sm`, `icon`, `icon-lg`, `icon-xl` | `icon` |\n\n**Slots:** `pagination`, `pagination-content`, `pagination-item`, `pagination-link`, `pagination-ellipsis`\n\n**States:** `rest`, `current`, `disabled`\n\n**Visual archetype:** Action controls — Momentary controls that perform an action now.\n\n## Related components\n\n- [Breadcrumb](/components/component-breadcrumb)\n- [Button](/components/component-button)\n",
8797
8836
  "related": [
8798
8837
  "breadcrumb",
8799
8838
  "button"
@@ -8805,11 +8844,12 @@
8805
8844
  "file": "packages/ui-react/src/components/pagination/pagination.stories.tsx",
8806
8845
  "names": [
8807
8846
  "Playground",
8847
+ "FirstPage",
8808
8848
  "Themes",
8809
8849
  "Endpoints",
8810
8850
  "ContractMetadata"
8811
8851
  ],
8812
- "source": "import { paginationContract, themes } from '@atom63/ui-foundation'\nimport {\n Pagination,\n PaginationContent,\n PaginationEllipsis,\n PaginationItem,\n PaginationLink,\n PaginationNext,\n PaginationPrevious,\n UIProvider,\n} from '@atom63/ui-react'\nimport '@atom63/ui-react/styles.css'\nimport type { Meta, StoryObj } from '@storybook/react-vite'\nimport { repeatedLandmarks } from '../story-probes'\n\nfunction Demo() {\n return (\n <Pagination>\n <PaginationContent>\n <PaginationItem>\n <PaginationPrevious href=\"#previous\" />\n </PaginationItem>\n <PaginationItem>\n <PaginationLink href=\"#page-1\">1</PaginationLink>\n </PaginationItem>\n <PaginationItem>\n <PaginationLink href=\"#page-2\" isActive>\n 2\n </PaginationLink>\n </PaginationItem>\n <PaginationItem>\n <PaginationLink href=\"#page-3\">3</PaginationLink>\n </PaginationItem>\n <PaginationItem>\n <PaginationEllipsis />\n </PaginationItem>\n <PaginationItem>\n <PaginationNext href=\"#next\" />\n </PaginationItem>\n </PaginationContent>\n </Pagination>\n )\n}\n\nconst meta = {\n title: 'UI React/Pagination',\n component: Pagination,\n} satisfies Meta<typeof Pagination>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\nexport const Playground: Story = {\n render: () => <Demo />,\n}\n\nexport const Themes: Story = {\n parameters: repeatedLandmarks,\n render: () => (\n <div style={{ display: 'grid', gap: 12 }}>\n {themes.map(theme =>\n (['light', 'dark'] as const).map(mode => (\n <UIProvider key={`${theme}-${mode}`} mode={mode} theme={theme}>\n <div\n style={{\n alignItems: 'center',\n background: 'var(--a63-surface-panel)',\n borderRadius: 'var(--a63-surface-radius, var(--radius-lg))',\n color: 'var(--a63-text-primary)',\n display: 'flex',\n gap: 12,\n padding: '0.75rem',\n }}\n >\n <span style={{ fontSize: 12, color: 'var(--a63-text-secondary)', width: 96 }}>\n {theme} / {mode}\n </span>\n <Demo />\n </div>\n </UIProvider>\n ))\n )}\n </div>\n ),\n}\n\nexport const Endpoints: Story = {\n parameters: repeatedLandmarks,\n render: () => (\n <div style={{ display: 'grid', gap: 12 }}>\n <UIProvider designLanguage=\"web\" input=\"pointer\">\n <EndpointPagination label=\"Web\" />\n </UIProvider>\n <UIProvider designLanguage=\"ios\" input=\"touch\">\n <EndpointPagination label=\"iOS touch\" />\n </UIProvider>\n <UIProvider density=\"compact\" designLanguage=\"web\" input=\"pointer\">\n <EndpointPagination label=\"Compact extension\" />\n </UIProvider>\n </div>\n ),\n}\n\nexport const ContractMetadata: Story = {\n render: () => (\n <pre style={{ fontSize: 12, margin: 0, whiteSpace: 'pre-wrap' }}>\n {JSON.stringify(paginationContract, null, 2)}\n </pre>\n ),\n}\n\nfunction EndpointPagination({ label }: { label: string }) {\n return (\n <div\n style={{\n alignItems: 'center',\n background: 'var(--a63-surface-panel)',\n color: 'var(--a63-text-primary)',\n display: 'flex',\n gap: 12,\n padding: 12,\n }}\n >\n <span style={{ fontSize: 12, color: 'var(--a63-text-secondary)', width: 112 }}>{label}</span>\n <div style={{ flex: 1 }}>\n <Demo />\n </div>\n </div>\n )\n}\n"
8852
+ "source": "import { paginationContract, themes } from '@atom63/ui-foundation'\nimport {\n Pagination,\n PaginationContent,\n PaginationEllipsis,\n PaginationItem,\n PaginationLink,\n PaginationNext,\n PaginationPrevious,\n UIProvider,\n} from '@atom63/ui-react'\nimport '@atom63/ui-react/styles.css'\nimport type { Meta, StoryObj } from '@storybook/react-vite'\nimport { repeatedLandmarks } from '../story-probes'\n\nfunction Demo() {\n return (\n <Pagination>\n <PaginationContent>\n <PaginationItem>\n <PaginationPrevious href=\"#previous\" />\n </PaginationItem>\n <PaginationItem>\n <PaginationLink href=\"#page-1\">1</PaginationLink>\n </PaginationItem>\n <PaginationItem>\n <PaginationLink href=\"#page-2\" isActive>\n 2\n </PaginationLink>\n </PaginationItem>\n <PaginationItem>\n <PaginationLink href=\"#page-3\">3</PaginationLink>\n </PaginationItem>\n <PaginationItem>\n <PaginationEllipsis />\n </PaginationItem>\n <PaginationItem>\n <PaginationNext href=\"#next\" />\n </PaginationItem>\n </PaginationContent>\n </Pagination>\n )\n}\n\nconst meta = {\n title: 'UI React/Pagination',\n component: Pagination,\n} satisfies Meta<typeof Pagination>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\nexport const Playground: Story = {\n render: () => <Demo />,\n}\n\n/** On the first page, Previous is disabled: no href, out of the tab order, announced as disabled. */\nexport const FirstPage: Story = {\n render: () => (\n <Pagination>\n <PaginationContent>\n <PaginationItem>\n <PaginationPrevious disabled />\n </PaginationItem>\n <PaginationItem>\n <PaginationLink href=\"#page-1\" isActive>\n 1\n </PaginationLink>\n </PaginationItem>\n <PaginationItem>\n <PaginationLink href=\"#page-2\">2</PaginationLink>\n </PaginationItem>\n <PaginationItem>\n <PaginationNext href=\"#next\" />\n </PaginationItem>\n </PaginationContent>\n </Pagination>\n ),\n play: async ({ canvasElement }) => {\n const previous = canvasElement.querySelector<HTMLElement>('[aria-label=\"Go to previous page\"]')\n if (!previous) throw new Error('Expected the Previous control')\n if (previous.hasAttribute('href')) throw new Error('Expected a disabled Previous without href')\n if (previous.getAttribute('aria-disabled') !== 'true') {\n throw new Error('Expected aria-disabled=\"true\" on the disabled Previous')\n }\n previous.focus()\n if (document.activeElement === previous) throw new Error('Expected Previous to be unfocusable')\n },\n}\n\nexport const Themes: Story = {\n parameters: repeatedLandmarks,\n render: () => (\n <div style={{ display: 'grid', gap: 12 }}>\n {themes.map(theme =>\n (['light', 'dark'] as const).map(mode => (\n <UIProvider key={`${theme}-${mode}`} mode={mode} theme={theme}>\n <div\n style={{\n alignItems: 'center',\n background: 'var(--a63-surface-panel)',\n borderRadius: 'var(--a63-surface-radius, var(--radius-lg))',\n color: 'var(--a63-text-primary)',\n display: 'flex',\n gap: 12,\n padding: '0.75rem',\n }}\n >\n <span style={{ fontSize: 12, color: 'var(--a63-text-secondary)', width: 96 }}>\n {theme} / {mode}\n </span>\n <Demo />\n </div>\n </UIProvider>\n ))\n )}\n </div>\n ),\n}\n\nexport const Endpoints: Story = {\n parameters: repeatedLandmarks,\n render: () => (\n <div style={{ display: 'grid', gap: 12 }}>\n <UIProvider designLanguage=\"web\" input=\"pointer\">\n <EndpointPagination label=\"Web\" />\n </UIProvider>\n <UIProvider designLanguage=\"ios\" input=\"touch\">\n <EndpointPagination label=\"iOS touch\" />\n </UIProvider>\n <UIProvider density=\"compact\" designLanguage=\"web\" input=\"pointer\">\n <EndpointPagination label=\"Compact extension\" />\n </UIProvider>\n </div>\n ),\n}\n\nexport const ContractMetadata: Story = {\n render: () => (\n <pre style={{ fontSize: 12, margin: 0, whiteSpace: 'pre-wrap' }}>\n {JSON.stringify(paginationContract, null, 2)}\n </pre>\n ),\n}\n\nfunction EndpointPagination({ label }: { label: string }) {\n return (\n <div\n style={{\n alignItems: 'center',\n background: 'var(--a63-surface-panel)',\n color: 'var(--a63-text-primary)',\n display: 'flex',\n gap: 12,\n padding: 12,\n }}\n >\n <span style={{ fontSize: 12, color: 'var(--a63-text-secondary)', width: 112 }}>{label}</span>\n <div style={{ flex: 1 }}>\n <Demo />\n </div>\n </div>\n )\n}\n"
8813
8853
  },
8814
8854
  "summary": "Pagination provides a navigation landmark and consistent previous, next, and page links.",
8815
8855
  "usage": "Expose the current page and real link destinations so navigation works without client state.",
@@ -9783,6 +9823,7 @@
9783
9823
  "file": "packages/ui-react/src/components/drawer/drawer.stories.tsx",
9784
9824
  "names": [
9785
9825
  "Playground",
9826
+ "Open",
9786
9827
  "PersistentSheet",
9787
9828
  "Directions",
9788
9829
  "RightToLeft",
@@ -9790,7 +9831,7 @@
9790
9831
  "Endpoints",
9791
9832
  "ContractMetadata"
9792
9833
  ],
9793
- "source": "import { drawerContract, drawerDirections, themes } from '@atom63/ui-foundation'\nimport {\n Button,\n Drawer,\n DrawerBody,\n DrawerClose,\n DrawerContent,\n DrawerDescription,\n DrawerFooter,\n DrawerHeader,\n DrawerTitle,\n DrawerTrigger,\n UIProvider,\n} from '@atom63/ui-react'\nimport '@atom63/ui-react/styles.css'\nimport type { Meta, StoryObj } from '@storybook/react-vite'\nimport { type ComponentProps, useState } from 'react'\n\nconst meta = {\n title: 'UI React/Drawer',\n component: Drawer,\n argTypes: {\n direction: { control: 'inline-radio', options: drawerDirections },\n },\n args: { direction: 'bottom' },\n} satisfies Meta<typeof Drawer>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\nfunction DrawerDemo({ portalContainer }: { portalContainer?: HTMLElement | null }) {\n return (\n <Drawer>\n <DrawerTrigger render={<Button variant=\"secondary\">Open drawer</Button>} />\n <DrawerContent portalProps={{ container: portalContainer }}>\n <DrawerHeader>\n <DrawerTitle>Appearance</DrawerTitle>\n <DrawerDescription>Drag the handle down to dismiss.</DrawerDescription>\n </DrawerHeader>\n <DrawerBody>\n The drawer body owns scrolling and keeps the header and actions anchored.\n </DrawerBody>\n <DrawerFooter>\n <DrawerClose render={<Button variant=\"primary\">Done</Button>} />\n </DrawerFooter>\n </DrawerContent>\n </Drawer>\n )\n}\n\ntype ProviderProps = Omit<ComponentProps<typeof UIProvider>, 'children'>\n\nfunction ReviewCell({ label, providerProps }: { label: string; providerProps: ProviderProps }) {\n const [portalContainer, setPortalContainer] = useState<HTMLDivElement | null>(null)\n\n return (\n <UIProvider {...providerProps}>\n <div\n ref={setPortalContainer}\n style={{\n alignItems: 'center',\n background: 'var(--a63-surface-panel)',\n borderRadius: 'var(--radius-lg)',\n color: 'var(--a63-text-primary)',\n display: 'flex',\n gap: 12,\n padding: '0.75rem',\n }}\n >\n <span style={{ fontSize: 12, color: 'var(--a63-text-secondary)', width: 112 }}>\n {label}\n </span>\n <DrawerDemo portalContainer={portalContainer} />\n </div>\n </UIProvider>\n )\n}\n\nexport const Playground: Story = {\n render: args => (\n <Drawer {...args}>\n <DrawerTrigger render={<Button variant=\"secondary\">Open drawer</Button>} />\n <DrawerContent>\n <DrawerHeader>\n <DrawerTitle>Appearance</DrawerTitle>\n <DrawerDescription>Drag the handle down to dismiss.</DrawerDescription>\n </DrawerHeader>\n <DrawerBody style={{ color: 'var(--a63-text-secondary)' }}>\n The sheet is a raised overlay surface. Content scrolls inside.\n </DrawerBody>\n <DrawerFooter>\n <DrawerClose render={<Button variant=\"primary\">Done</Button>} />\n </DrawerFooter>\n </DrawerContent>\n </Drawer>\n ),\n}\n\n/* A persistent bottom sheet over a map or photo: modal={false} keeps the page\n usable behind it, and snapPoints let it rest at a peek height or open fully. */\nexport const PersistentSheet: Story = {\n render: () => (\n <div\n style={{\n background: 'var(--a63-surface-muted)',\n borderRadius: 'var(--radius-xl)',\n color: 'var(--a63-text-secondary)',\n height: 420,\n padding: 16,\n width: 360,\n }}\n >\n The map stays usable behind the sheet.\n <Drawer defaultOpen modal={false} snapPoints={['148px', 1]}>\n <DrawerContent>\n <DrawerHeader>\n <DrawerTitle>Choose a ride</DrawerTitle>\n <DrawerDescription>Drag up for all options.</DrawerDescription>\n </DrawerHeader>\n <DrawerBody style={{ color: 'var(--a63-text-secondary)' }}>\n Standard · 4 min away\n </DrawerBody>\n </DrawerContent>\n </Drawer>\n </div>\n ),\n}\n\n/* The four drawer directions. */\nexport const Directions: Story = {\n render: () => (\n <div style={{ display: 'flex', gap: 12 }}>\n {drawerDirections.map(direction => (\n <Drawer direction={direction} key={direction}>\n <DrawerTrigger render={<Button variant=\"secondary\">{direction}</Button>} />\n <DrawerContent>\n <DrawerHeader>\n <DrawerTitle>{direction} drawer</DrawerTitle>\n </DrawerHeader>\n <DrawerBody>Direction: {direction}</DrawerBody>\n </DrawerContent>\n </Drawer>\n ))}\n </div>\n ),\n}\n\n/* Right-to-left: `left` and `right` are screen edges, so a left drawer still\n docks to the left edge, slides in from it and swipes back towards it, while\n its content reads right to left. */\nexport const RightToLeft: Story = {\n render: () => {\n const [portalContainer, setPortalContainer] = useState<HTMLDivElement | null>(null)\n return (\n <UIProvider dir=\"rtl\" lang=\"ar\" ref={setPortalContainer}>\n <Drawer defaultOpen direction=\"left\">\n <DrawerTrigger render={<Button variant=\"secondary\">فتح الدرج</Button>} />\n <DrawerContent portalProps={{ container: portalContainer }}>\n <DrawerHeader>\n <DrawerTitle>المظهر</DrawerTitle>\n <DrawerDescription>اسحب نحو الحافة اليسرى للإغلاق.</DrawerDescription>\n </DrawerHeader>\n <DrawerBody>يقرأ المحتوى من اليمين إلى اليسار.</DrawerBody>\n <DrawerFooter>\n <DrawerClose render={<Button variant=\"primary\">تم</Button>} />\n </DrawerFooter>\n </DrawerContent>\n </Drawer>\n </UIProvider>\n )\n },\n}\n\n/*\n * The drawer content renders in a portal (raised overlay surface), so a matrix of\n * open sheets would stack over the whole page rather than read per-theme. The\n * always-visible, in-flow part is the trigger, so each theme cell renders a live\n * drawer whose trigger shows the token-driven chrome across all 4 DS themes.\n */\nexport const Themes: Story = {\n render: () => (\n <div style={{ display: 'grid', gap: 12 }}>\n {themes.map(theme =>\n (['light', 'dark'] as const).map(mode => (\n <ReviewCell\n key={`${theme}-${mode}`}\n label={`${theme} / ${mode}`}\n providerProps={{ mode, theme }}\n />\n ))\n )}\n </div>\n ),\n}\n\nexport const Endpoints: Story = {\n render: () => (\n <div style={{ display: 'grid', gap: 12 }}>\n <ReviewCell\n label=\"Web\"\n providerProps={{ density: 'comfortable', designLanguage: 'web', input: 'pointer' }}\n />\n <ReviewCell\n label=\"iOS touch\"\n providerProps={{ density: 'comfortable', designLanguage: 'ios', input: 'touch' }}\n />\n <ReviewCell\n label=\"Compact extension\"\n providerProps={{\n density: 'compact',\n designLanguage: 'web',\n input: 'pointer',\n surface: 'n2',\n }}\n />\n </div>\n ),\n}\n\nexport const ContractMetadata: Story = {\n render: () => (\n <pre style={{ fontSize: 12, margin: 0, whiteSpace: 'pre-wrap' }}>\n {JSON.stringify(drawerContract, null, 2)}\n </pre>\n ),\n}\n"
9834
+ "source": "import { drawerContract, drawerDirections, themes } from '@atom63/ui-foundation'\nimport {\n Button,\n Drawer,\n DrawerBody,\n DrawerClose,\n DrawerContent,\n DrawerDescription,\n DrawerFooter,\n DrawerHeader,\n DrawerTitle,\n DrawerTrigger,\n UIProvider,\n} from '@atom63/ui-react'\nimport '@atom63/ui-react/styles.css'\nimport type { Meta, StoryObj } from '@storybook/react-vite'\nimport { type ComponentProps, useState } from 'react'\n\nconst meta = {\n title: 'UI React/Drawer',\n component: Drawer,\n argTypes: {\n direction: { control: 'inline-radio', options: drawerDirections },\n },\n args: { direction: 'bottom' },\n} satisfies Meta<typeof Drawer>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\nfunction DrawerDemo({ portalContainer }: { portalContainer?: HTMLElement | null }) {\n return (\n <Drawer>\n <DrawerTrigger render={<Button variant=\"secondary\">Open drawer</Button>} />\n <DrawerContent portalProps={{ container: portalContainer }}>\n <DrawerHeader>\n <DrawerTitle>Appearance</DrawerTitle>\n <DrawerDescription>Drag the handle down to dismiss.</DrawerDescription>\n </DrawerHeader>\n <DrawerBody>\n The drawer body owns scrolling and keeps the header and actions anchored.\n </DrawerBody>\n <DrawerFooter>\n <DrawerClose render={<Button variant=\"primary\">Done</Button>} />\n </DrawerFooter>\n </DrawerContent>\n </Drawer>\n )\n}\n\ntype ProviderProps = Omit<ComponentProps<typeof UIProvider>, 'children'>\n\nfunction ReviewCell({ label, providerProps }: { label: string; providerProps: ProviderProps }) {\n const [portalContainer, setPortalContainer] = useState<HTMLDivElement | null>(null)\n\n return (\n <UIProvider {...providerProps}>\n <div\n ref={setPortalContainer}\n style={{\n alignItems: 'center',\n background: 'var(--a63-surface-panel)',\n borderRadius: 'var(--radius-lg)',\n color: 'var(--a63-text-primary)',\n display: 'flex',\n gap: 12,\n padding: '0.75rem',\n }}\n >\n <span style={{ fontSize: 12, color: 'var(--a63-text-secondary)', width: 112 }}>\n {label}\n </span>\n <DrawerDemo portalContainer={portalContainer} />\n </div>\n </UIProvider>\n )\n}\n\nexport const Playground: Story = {\n render: args => (\n <Drawer {...args}>\n <DrawerTrigger render={<Button variant=\"secondary\">Open drawer</Button>} />\n <DrawerContent>\n <DrawerHeader>\n <DrawerTitle>Appearance</DrawerTitle>\n <DrawerDescription>Drag the handle down to dismiss.</DrawerDescription>\n </DrawerHeader>\n <DrawerBody style={{ color: 'var(--a63-text-secondary)' }}>\n The sheet is a raised overlay surface. Content scrolls inside.\n </DrawerBody>\n <DrawerFooter>\n <DrawerClose render={<Button variant=\"primary\">Done</Button>} />\n </DrawerFooter>\n </DrawerContent>\n </Drawer>\n ),\n}\n\n/** The drawer open as an app shows it: modal, over the whole page. */\nexport const Open: Story = {\n render: args => (\n <Drawer {...args} defaultOpen>\n <DrawerContent>\n <DrawerHeader>\n <DrawerTitle>Appearance</DrawerTitle>\n <DrawerDescription>Drag the handle down to dismiss.</DrawerDescription>\n </DrawerHeader>\n <DrawerBody style={{ color: 'var(--a63-text-secondary)' }}>\n The sheet is a raised overlay surface. Content scrolls inside.\n </DrawerBody>\n <DrawerFooter>\n <DrawerClose render={<Button variant=\"primary\">Done</Button>} />\n </DrawerFooter>\n </DrawerContent>\n </Drawer>\n ),\n}\n\n/* A persistent bottom sheet over a map or photo: modal={false} keeps the page\n usable behind it, and snapPoints let it rest at a peek height or open fully. */\nexport const PersistentSheet: Story = {\n render: () => (\n <div\n style={{\n background: 'var(--a63-surface-muted)',\n borderRadius: 'var(--radius-xl)',\n color: 'var(--a63-text-secondary)',\n height: 420,\n padding: 16,\n width: 360,\n }}\n >\n The map stays usable behind the sheet.\n <Drawer defaultOpen modal={false} snapPoints={['148px', 1]}>\n <DrawerContent>\n <DrawerHeader>\n <DrawerTitle>Choose a ride</DrawerTitle>\n <DrawerDescription>Drag up for all options.</DrawerDescription>\n </DrawerHeader>\n <DrawerBody style={{ color: 'var(--a63-text-secondary)' }}>\n Standard · 4 min away\n </DrawerBody>\n </DrawerContent>\n </Drawer>\n </div>\n ),\n}\n\n/* The four drawer directions. */\nexport const Directions: Story = {\n render: () => (\n <div style={{ display: 'flex', gap: 12 }}>\n {drawerDirections.map(direction => (\n <Drawer direction={direction} key={direction}>\n <DrawerTrigger render={<Button variant=\"secondary\">{direction}</Button>} />\n <DrawerContent>\n <DrawerHeader>\n <DrawerTitle>{direction} drawer</DrawerTitle>\n </DrawerHeader>\n <DrawerBody>Direction: {direction}</DrawerBody>\n </DrawerContent>\n </Drawer>\n ))}\n </div>\n ),\n}\n\n/* Right-to-left: `left` and `right` are screen edges, so a left drawer still\n docks to the left edge, slides in from it and swipes back towards it, while\n its content reads right to left. */\nexport const RightToLeft: Story = {\n render: () => {\n const [portalContainer, setPortalContainer] = useState<HTMLDivElement | null>(null)\n return (\n <UIProvider dir=\"rtl\" lang=\"ar\" ref={setPortalContainer}>\n <Drawer defaultOpen direction=\"left\">\n <DrawerTrigger render={<Button variant=\"secondary\">فتح الدرج</Button>} />\n <DrawerContent portalProps={{ container: portalContainer }}>\n <DrawerHeader>\n <DrawerTitle>المظهر</DrawerTitle>\n <DrawerDescription>اسحب نحو الحافة اليسرى للإغلاق.</DrawerDescription>\n </DrawerHeader>\n <DrawerBody>يقرأ المحتوى من اليمين إلى اليسار.</DrawerBody>\n <DrawerFooter>\n <DrawerClose render={<Button variant=\"primary\">تم</Button>} />\n </DrawerFooter>\n </DrawerContent>\n </Drawer>\n </UIProvider>\n )\n },\n}\n\n/*\n * The drawer content renders in a portal (raised overlay surface), so a matrix of\n * open sheets would stack over the whole page rather than read per-theme. The\n * always-visible, in-flow part is the trigger, so each theme cell renders a live\n * drawer whose trigger shows the token-driven chrome across all 4 DS themes.\n */\nexport const Themes: Story = {\n render: () => (\n <div style={{ display: 'grid', gap: 12 }}>\n {themes.map(theme =>\n (['light', 'dark'] as const).map(mode => (\n <ReviewCell\n key={`${theme}-${mode}`}\n label={`${theme} / ${mode}`}\n providerProps={{ mode, theme }}\n />\n ))\n )}\n </div>\n ),\n}\n\nexport const Endpoints: Story = {\n render: () => (\n <div style={{ display: 'grid', gap: 12 }}>\n <ReviewCell\n label=\"Web\"\n providerProps={{ density: 'comfortable', designLanguage: 'web', input: 'pointer' }}\n />\n <ReviewCell\n label=\"iOS touch\"\n providerProps={{ density: 'comfortable', designLanguage: 'ios', input: 'touch' }}\n />\n <ReviewCell\n label=\"Compact extension\"\n providerProps={{\n density: 'compact',\n designLanguage: 'web',\n input: 'pointer',\n surface: 'n2',\n }}\n />\n </div>\n ),\n}\n\nexport const ContractMetadata: Story = {\n render: () => (\n <pre style={{ fontSize: 12, margin: 0, whiteSpace: 'pre-wrap' }}>\n {JSON.stringify(drawerContract, null, 2)}\n </pre>\n ),\n}\n"
9794
9835
  },
9795
9836
  "summary": "Drawer presents modal content from a viewport edge with drag-aware behavior.",
9796
9837
  "usage": "Use it for a temporary edge surface, not as a replacement for persistent page navigation.",
@@ -10854,6 +10895,113 @@
10854
10895
  "AppView"
10855
10896
  ]
10856
10897
  },
10898
+ {
10899
+ "axisGuidance": null,
10900
+ "contract": {
10901
+ "archetypes": [
10902
+ {
10903
+ "description": "In-flow containers and content surfaces that do not inherently manipulate state.",
10904
+ "id": "surface",
10905
+ "label": "Static content surfaces"
10906
+ }
10907
+ ],
10908
+ "axes": [
10909
+ {
10910
+ "name": "sizes",
10911
+ "values": [
10912
+ "viewport",
10913
+ "band",
10914
+ "card"
10915
+ ],
10916
+ "default": "viewport"
10917
+ },
10918
+ {
10919
+ "name": "safeAreas",
10920
+ "values": [
10921
+ "top",
10922
+ "bottom",
10923
+ "center",
10924
+ "start",
10925
+ "end"
10926
+ ],
10927
+ "default": "top"
10928
+ },
10929
+ {
10930
+ "name": "tones",
10931
+ "values": [
10932
+ "page",
10933
+ "media"
10934
+ ],
10935
+ "default": "page"
10936
+ },
10937
+ {
10938
+ "name": "veils",
10939
+ "values": [
10940
+ "none",
10941
+ "soft",
10942
+ "strong"
10943
+ ],
10944
+ "default": "none"
10945
+ }
10946
+ ],
10947
+ "exportName": "artPlateContract",
10948
+ "slots": [
10949
+ "art-plate",
10950
+ "art-plate-image",
10951
+ "art-plate-content"
10952
+ ],
10953
+ "source": "packages/ui-foundation/contracts/components/art-plate.json",
10954
+ "states": [
10955
+ "rest"
10956
+ ],
10957
+ "tokenSlots": []
10958
+ },
10959
+ "exports": {
10960
+ "types": [
10961
+ "ArtPlateFocus",
10962
+ "ArtPlateProps"
10963
+ ],
10964
+ "values": [
10965
+ "ArtPlate"
10966
+ ]
10967
+ },
10968
+ "group": {
10969
+ "id": "content-and-surfaces",
10970
+ "title": "Content and surfaces"
10971
+ },
10972
+ "guidance": [
10973
+ "Use Art Plate for a landing hero, a section band or a portfolio cover where the picture leads and content sits in a calm region of it.",
10974
+ "Keep product data and fetching outside the presentational component.",
10975
+ "Test long, empty, and narrow content before adding local layout overrides."
10976
+ ],
10977
+ "importPath": "@atom63/ui-react",
10978
+ "label": "Art Plate",
10979
+ "markdown": "# Art Plate\n\nArt Plate shows a full-bleed picture that owns its crop and keeps a safe area for headline and product UI.\n\n**Status:** Preview\n\n## Preview\n\nThe live documentation page renders the `Playground` story maintained with the component.\n\n## Guidance\n\n- Use Art Plate for a landing hero, a section band or a portfolio cover where the picture leads and content sits in a calm region of it.\n- Keep product data and fetching outside the presentational component.\n- Test long, empty, and narrow content before adding local layout overrides.\n\n## Usage\n\n```tsx\nimport { ArtPlate } from '@atom63/ui-react'\n```\n\n## API surface\n\n**Values:** `ArtPlate`\n\n**Types:** `ArtPlateFocus`, `ArtPlateProps`\n\nTypeScript remains the source of truth for complete prop contracts.\n\n## Contract\n\nSource: `packages/ui-foundation/contracts/components/art-plate.json` (`artPlateContract` in `@atom63/ui-foundation`).\n\n| Axis | Values | Default |\n| --- | --- | --- |\n| `sizes` | `viewport`, `band`, `card` | `viewport` |\n| `safeAreas` | `top`, `bottom`, `center`, `start`, `end` | `top` |\n| `tones` | `page`, `media` | `page` |\n| `veils` | `none`, `soft`, `strong` | `none` |\n\n**Slots:** `art-plate`, `art-plate-image`, `art-plate-content`\n\n**States:** `rest`\n\n**Visual archetype:** Static content surfaces — In-flow containers and content surfaces that do not inherently manipulate state.\n\n## Related components\n\n- [Card](/components/component-card)\n- [Frame](/components/component-frame)\n- [Progressive Blur](/components/component-progressive-blur)\n",
10980
+ "related": [
10981
+ "card",
10982
+ "frame",
10983
+ "progressive-blur"
10984
+ ],
10985
+ "route": "/components/component-art-plate",
10986
+ "slug": "art-plate",
10987
+ "status": "preview",
10988
+ "stories": {
10989
+ "file": "packages/ui-react/src/components/art-plate/art-plate.stories.tsx",
10990
+ "names": [
10991
+ "Playground",
10992
+ "Viewport",
10993
+ "SafeAreas",
10994
+ "Card",
10995
+ "Themes"
10996
+ ],
10997
+ "source": "import {\n artPlateSafeAreas,\n artPlateSizes,\n artPlateTones,\n artPlateVeils,\n themes,\n} from '@atom63/ui-foundation'\nimport { ArtPlate, Button, UIProvider } from '@atom63/ui-react'\nimport '@atom63/ui-react/styles.css'\nimport type { Meta, StoryObj } from '@storybook/react-vite'\n\n// Remote pictures are pinned to one placeholder in the visual and craft runs.\nconst PLATE = 'https://picsum.photos/id/1018/1920/1080'\n\nconst meta = {\n title: 'UI React/ArtPlate',\n component: ArtPlate,\n parameters: { layout: 'fullscreen' },\n argTypes: {\n safeArea: { control: 'inline-radio', options: artPlateSafeAreas },\n size: { control: 'inline-radio', options: artPlateSizes },\n tone: { control: 'inline-radio', options: artPlateTones },\n veil: { control: 'inline-radio', options: artPlateVeils },\n },\n args: {\n alt: '',\n focus: { x: 0.5, y: 0.7 },\n safeArea: 'top',\n size: 'band',\n src: PLATE,\n tone: 'media',\n veil: 'soft',\n },\n} satisfies Meta<typeof ArtPlate>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\nfunction HeroCopy() {\n return (\n <div style={{ display: 'grid', gap: 'var(--a63-space-4)', maxInlineSize: '36rem' }}>\n <h1\n style={{\n margin: 0,\n fontSize: 'var(--a63-type-display-large-font-size)',\n lineHeight: 'var(--a63-type-display-large-line-height)',\n }}\n >\n Render at the speed of thought\n </h1>\n <p style={{ margin: 0 }}>A motion timeline that renders in the browser.</p>\n <div style={{ display: 'flex', gap: 'var(--a63-space-2)' }}>\n <Button>Start free</Button>\n <Button variant=\"outline\">Read the docs</Button>\n </div>\n </div>\n )\n}\n\nexport const Playground: Story = {\n render: args => (\n <ArtPlate {...args}>\n <HeroCopy />\n </ArtPlate>\n ),\n}\n\nexport const Viewport: Story = {\n args: { priority: true, size: 'viewport', safeArea: 'center' },\n render: args => (\n <ArtPlate {...args}>\n <HeroCopy />\n </ArtPlate>\n ),\n}\n\nexport const SafeAreas: Story = {\n render: args => (\n <div style={{ display: 'grid', gap: 'var(--a63-space-4)' }}>\n {artPlateSafeAreas.map(safeArea => (\n <ArtPlate key={safeArea} {...args} safeArea={safeArea}>\n <p style={{ margin: 0 }}>safeArea=&quot;{safeArea}&quot;</p>\n </ArtPlate>\n ))}\n </div>\n ),\n}\n\nexport const Card: Story = {\n args: { size: 'card', safeArea: 'bottom', veil: 'strong' },\n render: args => (\n <div style={{ padding: 'var(--a63-space-6)' }}>\n <ArtPlate {...args}>\n <p style={{ margin: 0 }}>Ship your next render tonight.</p>\n </ArtPlate>\n </div>\n ),\n}\n\nexport const Themes: Story = {\n render: () => (\n <div style={{ display: 'grid', gap: 'var(--a63-space-3)' }}>\n {themes.map(theme =>\n (['light', 'dark'] as const).map(mode => (\n <UIProvider key={`${theme}-${mode}`} mode={mode} theme={theme}>\n <div style={{ background: 'var(--a63-surface-page)', padding: 'var(--a63-space-3)' }}>\n <ArtPlate alt=\"\" safeArea=\"start\" size=\"card\" src={PLATE} tone=\"page\" veil=\"strong\">\n <p style={{ margin: 0 }}>\n {theme} / {mode}\n </p>\n </ArtPlate>\n </div>\n </UIProvider>\n ))\n )}\n </div>\n ),\n}\n"
10998
+ },
10999
+ "summary": "Art Plate shows a full-bleed picture that owns its crop and keeps a safe area for headline and product UI.",
11000
+ "usage": "Use Art Plate for a landing hero, a section band or a portfolio cover where the picture leads and content sits in a calm region of it.",
11001
+ "usageExports": [
11002
+ "ArtPlate"
11003
+ ]
11004
+ },
10857
11005
  {
10858
11006
  "axisGuidance": null,
10859
11007
  "contract": {
@@ -11533,6 +11681,122 @@
11533
11681
  "CarouselNext"
11534
11682
  ]
11535
11683
  },
11684
+ {
11685
+ "axisGuidance": {
11686
+ "size": {
11687
+ "md": "A 240px plot with five y-axis ticks, for a chart that leads a section.",
11688
+ "sm": "A 160px plot with three ticks, for a compact card."
11689
+ },
11690
+ "state": {
11691
+ "current": "A category picked by the pointer or the arrow keys; the tooltip shows its values.",
11692
+ "rest": "No category picked; only the marks, axes and legend show."
11693
+ }
11694
+ },
11695
+ "contract": {
11696
+ "archetypes": [
11697
+ {
11698
+ "description": "In-flow containers and content surfaces that do not inherently manipulate state.",
11699
+ "id": "surface",
11700
+ "label": "Static content surfaces"
11701
+ }
11702
+ ],
11703
+ "axes": [
11704
+ {
11705
+ "name": "types",
11706
+ "values": [
11707
+ "line",
11708
+ "area",
11709
+ "bar"
11710
+ ],
11711
+ "default": "line"
11712
+ },
11713
+ {
11714
+ "name": "sizes",
11715
+ "values": [
11716
+ "sm",
11717
+ "md"
11718
+ ],
11719
+ "default": "md"
11720
+ },
11721
+ {
11722
+ "name": "colors",
11723
+ "values": [
11724
+ "1",
11725
+ "2",
11726
+ "3",
11727
+ "4",
11728
+ "5"
11729
+ ]
11730
+ }
11731
+ ],
11732
+ "exportName": "chartContract",
11733
+ "slots": [
11734
+ "chart",
11735
+ "chart-legend",
11736
+ "chart-plot",
11737
+ "chart-y-axis",
11738
+ "chart-x-axis",
11739
+ "chart-tooltip",
11740
+ "chart-table",
11741
+ "chart-table-toggle"
11742
+ ],
11743
+ "source": "packages/ui-foundation/contracts/components/chart.json",
11744
+ "states": [
11745
+ "rest",
11746
+ "current"
11747
+ ],
11748
+ "tokenSlots": []
11749
+ },
11750
+ "exports": {
11751
+ "types": [
11752
+ "ChartLabels",
11753
+ "ChartProps",
11754
+ "ChartSeries"
11755
+ ],
11756
+ "values": [
11757
+ "Chart"
11758
+ ]
11759
+ },
11760
+ "group": {
11761
+ "id": "content-and-surfaces",
11762
+ "title": "Content and surfaces"
11763
+ },
11764
+ "guidance": [
11765
+ "Pass a `label`, the `categories` and up to five `series`; set `type` to line, area or bar and `stacked` to stack bars or areas. Series take --a63-chart-1 to 5 in order, which keep apart from the brand on every brand; give a series `color` to pin it. The plot is one tab stop: arrow keys, Home and End pick a category and show its tooltip. Every chart carries a data table of the same numbers, visually hidden unless `table=\"toggle\"` adds a button that shows it. For big or live data, zooming, scatter or pie charts, or values below zero, use a charting library; when the exact numbers matter more than the shape, use a Table.",
11766
+ "Keep product data and fetching outside the presentational component.",
11767
+ "Test long, empty, and narrow content before adding local layout overrides."
11768
+ ],
11769
+ "importPath": "@atom63/ui-react/chart",
11770
+ "label": "Chart",
11771
+ "markdown": "# Chart\n\nChart draws a small line, area or bar chart (grouped or stacked) of a few series over a categorical axis, with a tooltip, a legend and a data table for screen readers.\n\n**Status:** Preview\n\n## Preview\n\nThe live documentation page renders the `Playground` story maintained with the component.\n\n## Guidance\n\n- Pass a `label`, the `categories` and up to five `series`; set `type` to line, area or bar and `stacked` to stack bars or areas. Series take --a63-chart-1 to 5 in order, which keep apart from the brand on every brand; give a series `color` to pin it. The plot is one tab stop: arrow keys, Home and End pick a category and show its tooltip. Every chart carries a data table of the same numbers, visually hidden unless `table=\"toggle\"` adds a button that shows it. For big or live data, zooming, scatter or pie charts, or values below zero, use a charting library; when the exact numbers matter more than the shape, use a Table.\n- Keep product data and fetching outside the presentational component.\n- Test long, empty, and narrow content before adding local layout overrides.\n\n## Variants, sizes and states\n\n| Axis | Value | Guidance |\n| --- | --- | --- |\n| Size | `md` | A 240px plot with five y-axis ticks, for a chart that leads a section. |\n| Size | `sm` | A 160px plot with three ticks, for a compact card. |\n| State | `current` | A category picked by the pointer or the arrow keys; the tooltip shows its values. |\n| State | `rest` | No category picked; only the marks, axes and legend show. |\n\n## Usage\n\n```tsx\nimport { Chart } from '@atom63/ui-react/chart'\n```\n\n## API surface\n\n**Values:** `Chart`\n\n**Types:** `ChartLabels`, `ChartProps`, `ChartSeries`\n\nTypeScript remains the source of truth for complete prop contracts.\n\n## Contract\n\nSource: `packages/ui-foundation/contracts/components/chart.json` (`chartContract` in `@atom63/ui-foundation`).\n\n| Axis | Values | Default |\n| --- | --- | --- |\n| `types` | `line`, `area`, `bar` | `line` |\n| `sizes` | `sm`, `md` | `md` |\n| `colors` | `1`, `2`, `3`, `4`, `5` | — |\n\n**Slots:** `chart`, `chart-legend`, `chart-plot`, `chart-y-axis`, `chart-x-axis`, `chart-tooltip`, `chart-table`, `chart-table-toggle`\n\n**States:** `rest`, `current`\n\n**Visual archetype:** Static content surfaces — In-flow containers and content surfaces that do not inherently manipulate state.\n\n## Related components\n\n- [Table](/components/component-table)\n- [Progress](/components/component-progress)\n- [Card](/components/component-card)\n",
11772
+ "related": [
11773
+ "table",
11774
+ "progress",
11775
+ "card"
11776
+ ],
11777
+ "route": "/components/component-chart",
11778
+ "slug": "chart",
11779
+ "status": "preview",
11780
+ "stories": {
11781
+ "file": "packages/ui-react/src/components/chart/chart.stories.tsx",
11782
+ "names": [
11783
+ "Playground",
11784
+ "Types",
11785
+ "Keyboard",
11786
+ "DataTable",
11787
+ "Brands",
11788
+ "Themes",
11789
+ "ForcedColors",
11790
+ "RightToLeft"
11791
+ ],
11792
+ "source": "import { chartSizes, chartTypes, themes } from '@atom63/ui-foundation'\nimport { UIProvider } from '@atom63/ui-react'\nimport { Chart } from '@atom63/ui-react/chart'\nimport '@atom63/ui-react/styles.css'\nimport type { Meta, StoryObj } from '@storybook/react-vite'\n\nconst months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']\nconst usd = new Intl.NumberFormat('en-US', {\n currency: 'USD',\n maximumFractionDigits: 0,\n style: 'currency',\n})\nconst compact = new Intl.NumberFormat('en-US', {\n currency: 'USD',\n maximumFractionDigits: 1,\n notation: 'compact',\n style: 'currency',\n})\n\nconst mrr = [42, 44, 47, 46, 51, 55, 58, 61, 60, 66, 71, 74].map(value => value * 1000)\nconst movement = [\n { label: 'New', values: [6, 5, 7, 4, 8, 7, 6, 8, 5, 9, 8, 7].map(value => value * 1000) },\n { label: 'Expansion', values: [2, 3, 2, 3, 3, 4, 3, 2, 4, 3, 4, 5].map(value => value * 1000) },\n { label: 'Churned', values: [3, 2, 4, 5, 3, 3, 3, 2, 6, 3, 3, 4].map(value => value * 1000) },\n]\nconst plans = [\n { label: 'Starter', values: [8, 9, 9, 10] },\n { label: 'Growth', values: [12, 13, 15, 16] },\n { label: 'Scale', values: [9, 10, 10, 12] },\n { label: 'Enterprise', values: [14, 14, 16, 19] },\n { label: 'Partner', values: [3, 4, 4, 5] },\n]\n\nconst meta = {\n title: 'UI React/Chart',\n component: Chart,\n argTypes: {\n size: { control: 'inline-radio', options: chartSizes },\n type: { control: 'inline-radio', options: chartTypes },\n stacked: { control: 'boolean' },\n table: { control: 'inline-radio', options: ['hidden', 'toggle'] },\n },\n args: {\n categories: months,\n categoryLabel: 'Month',\n description: 'New revenue outpaces churn in every month but September.',\n formatTick: compact.format,\n formatValue: usd.format,\n label: 'MRR movement by month',\n series: movement,\n size: 'md',\n type: 'bar',\n },\n decorators: [\n Story => (\n <div style={{ maxWidth: 640 }}>\n <Story />\n </div>\n ),\n ],\n} satisfies Meta<typeof Chart>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\nexport const Playground: Story = {}\n\n/* Line, area, grouped bars and stacked bars, each from the same contract. */\nexport const Types: Story = {\n render: () => (\n <div style={{ display: 'grid', gap: 32 }}>\n <Chart\n categories={months}\n formatTick={compact.format}\n formatValue={usd.format}\n label=\"MRR by month\"\n series={[{ label: 'MRR', values: mrr }]}\n type=\"line\"\n />\n <Chart\n categories={months}\n formatTick={compact.format}\n formatValue={usd.format}\n label=\"MRR by month, as an area\"\n series={[{ label: 'MRR', values: mrr }]}\n type=\"area\"\n />\n <Chart\n categories={months}\n formatTick={compact.format}\n formatValue={usd.format}\n label=\"MRR movement by month\"\n series={movement}\n type=\"bar\"\n />\n <Chart\n categories={['Q1', 'Q2', 'Q3', 'Q4']}\n label=\"Accounts by plan and quarter\"\n series={plans}\n size=\"sm\"\n stacked\n type=\"bar\"\n />\n </div>\n ),\n}\n\n/* Pressing an arrow key on the plot picks a category and shows its tooltip. */\nexport const Keyboard: Story = {\n args: { type: 'line', series: movement.slice(0, 2) },\n play: ({ canvasElement }) => {\n const plot = canvasElement.querySelector<HTMLElement>('[data-slot=\"chart-plot\"]')\n if (!plot) throw new Error('The chart has no plot')\n plot.focus()\n plot.dispatchEvent(new KeyboardEvent('keydown', { bubbles: true, key: 'End' }))\n return new Promise<void>(resolve => requestAnimationFrame(() => resolve())).then(() => {\n const tooltip = canvasElement.querySelector('[data-slot=\"chart-tooltip\"]')\n if (!tooltip?.textContent?.includes('Dec')) {\n throw new Error(`Expected the tooltip to show Dec, got \"${tooltip?.textContent ?? ''}\"`)\n }\n })\n },\n}\n\n/* The data table, shown with the toggle. */\nexport const DataTable: Story = {\n args: { categories: months.slice(0, 4), series: movement, table: 'toggle' },\n}\n\n/* Five series on each brand: series 2 to 5 turn from the brand's hue, so none\n of them lands on it, the violet brand (b5) included. */\nexport const Brands: Story = {\n render: () => (\n <div style={{ display: 'grid', gap: 12 }}>\n {(['b1', 'b2', 'b3', 'b4', 'b5', 'b6'] as const).map(brand => (\n <UIProvider brand={brand} key={brand}>\n <div style={{ background: 'var(--a63-surface-panel)', padding: '0.75rem' }}>\n <Chart\n categories={['Q1', 'Q2', 'Q3', 'Q4']}\n label={`Accounts by plan, brand ${brand}`}\n series={plans}\n size=\"sm\"\n type=\"bar\"\n />\n </div>\n </UIProvider>\n ))}\n </div>\n ),\n}\n\nexport const Themes: Story = {\n render: () => (\n <div style={{ display: 'grid', gap: 12 }}>\n {themes.map(theme =>\n (['light', 'dark'] as const).map(mode => (\n <UIProvider key={`${theme}-${mode}`} mode={mode} theme={theme}>\n <div style={{ background: 'var(--a63-surface-panel)', padding: '0.75rem' }}>\n <Chart\n categories={months.slice(0, 6)}\n label={`MRR movement, ${theme} ${mode}`}\n series={movement}\n size=\"sm\"\n type=\"bar\"\n />\n <Chart\n categories={months.slice(0, 6)}\n label={`MRR, ${theme} ${mode}`}\n series={[{ label: 'MRR', values: mrr.slice(0, 6) }, movement[0]!]}\n size=\"sm\"\n type=\"area\"\n />\n </div>\n </UIProvider>\n ))\n )}\n </div>\n ),\n}\n\n/* Forced colours drop the series colours; lines dash and bars outline in a\n different pattern per series, and the legend keys follow. */\nexport const ForcedColors: Story = {\n render: () => (\n <div style={{ display: 'grid', gap: 24 }}>\n <Chart\n categories={months.slice(0, 6)}\n label=\"MRR movement\"\n series={movement}\n size=\"sm\"\n type=\"line\"\n />\n <Chart\n categories={['Q1', 'Q2', 'Q3', 'Q4']}\n label=\"Accounts by plan\"\n series={plans}\n size=\"sm\"\n type=\"bar\"\n />\n </div>\n ),\n}\n\n/* Right to left: the categories run from the right, and the arrow keys follow. */\nexport const RightToLeft: Story = {\n render: args => (\n <UIProvider dir=\"rtl\">\n <Chart {...args} />\n </UIProvider>\n ),\n}\n"
11793
+ },
11794
+ "summary": "Chart draws a small line, area or bar chart (grouped or stacked) of a few series over a categorical axis, with a tooltip, a legend and a data table for screen readers.",
11795
+ "usage": "Pass a `label`, the `categories` and up to five `series`; set `type` to line, area or bar and `stacked` to stack bars or areas. Series take --a63-chart-1 to 5 in order, which keep apart from the brand on every brand; give a series `color` to pin it. The plot is one tab stop: arrow keys, Home and End pick a category and show its tooltip. Every chart carries a data table of the same numbers, visually hidden unless `table=\"toggle\"` adds a button that shows it. For big or live data, zooming, scatter or pie charts, or values below zero, use a charting library; when the exact numbers matter more than the shape, use a Table.",
11796
+ "usageExports": [
11797
+ "Chart"
11798
+ ]
11799
+ },
11536
11800
  {
11537
11801
  "axisGuidance": null,
11538
11802
  "contract": {
@@ -12451,6 +12715,101 @@
12451
12715
  "ItemActions"
12452
12716
  ]
12453
12717
  },
12718
+ {
12719
+ "axisGuidance": null,
12720
+ "contract": {
12721
+ "archetypes": [
12722
+ {
12723
+ "description": "In-flow containers and content surfaces that do not inherently manipulate state.",
12724
+ "id": "surface",
12725
+ "label": "Static content surfaces"
12726
+ }
12727
+ ],
12728
+ "axes": [
12729
+ {
12730
+ "name": "placements",
12731
+ "values": [
12732
+ "center-bottom",
12733
+ "end-bottom",
12734
+ "start-bottom"
12735
+ ],
12736
+ "default": "center-bottom"
12737
+ },
12738
+ {
12739
+ "name": "widths",
12740
+ "values": [
12741
+ "wide",
12742
+ "half"
12743
+ ],
12744
+ "default": "wide"
12745
+ }
12746
+ ],
12747
+ "exportName": "layeredSceneContract",
12748
+ "slots": [
12749
+ "layered-scene",
12750
+ "layered-scene-content",
12751
+ "layered-scene-stage",
12752
+ "layered-scene-foreground"
12753
+ ],
12754
+ "source": "packages/ui-foundation/contracts/components/layered-scene.json",
12755
+ "states": [
12756
+ "rest"
12757
+ ],
12758
+ "tokenSlots": []
12759
+ },
12760
+ "exports": {
12761
+ "types": [
12762
+ "LayeredSceneForegroundProps",
12763
+ "LayeredScenePlateProps",
12764
+ "LayeredSceneProps"
12765
+ ],
12766
+ "values": [
12767
+ "LayeredScene",
12768
+ "LayeredSceneContent",
12769
+ "LayeredSceneForeground",
12770
+ "LayeredScenePlate",
12771
+ "LayeredSceneStage"
12772
+ ]
12773
+ },
12774
+ "group": {
12775
+ "id": "content-and-surfaces",
12776
+ "title": "Content and surfaces"
12777
+ },
12778
+ "guidance": [
12779
+ "Use Layered Scene for a landing or portfolio hero where live product UI floats on an ArtPlate and a cut-out of the scene passes in front of it.",
12780
+ "Keep product data and fetching outside the presentational component.",
12781
+ "Test long, empty, and narrow content before adding local layout overrides."
12782
+ ],
12783
+ "importPath": "@atom63/ui-react",
12784
+ "label": "Layered Scene",
12785
+ "markdown": "# Layered Scene\n\nLayered Scene stacks a plate, a stage of product UI and an inert foreground cut-out so the interface sits inside the picture.\n\n**Status:** Preview\n\n## Preview\n\nThe live documentation page renders the `Playground` story maintained with the component.\n\n## Guidance\n\n- Use Layered Scene for a landing or portfolio hero where live product UI floats on an ArtPlate and a cut-out of the scene passes in front of it.\n- Keep product data and fetching outside the presentational component.\n- Test long, empty, and narrow content before adding local layout overrides.\n\n## Usage\n\n```tsx\nimport { LayeredScene, LayeredScenePlate, LayeredSceneContent, LayeredSceneStage, LayeredSceneForeground } from '@atom63/ui-react'\n```\n\n## API surface\n\n**Values:** `LayeredScene`, `LayeredSceneContent`, `LayeredSceneForeground`, `LayeredScenePlate`, `LayeredSceneStage`\n\n**Types:** `LayeredSceneForegroundProps`, `LayeredScenePlateProps`, `LayeredSceneProps`\n\nTypeScript remains the source of truth for complete prop contracts.\n\n## Contract\n\nSource: `packages/ui-foundation/contracts/components/layered-scene.json` (`layeredSceneContract` in `@atom63/ui-foundation`).\n\n| Axis | Values | Default |\n| --- | --- | --- |\n| `placements` | `center-bottom`, `end-bottom`, `start-bottom` | `center-bottom` |\n| `widths` | `wide`, `half` | `wide` |\n\n**Slots:** `layered-scene`, `layered-scene-content`, `layered-scene-stage`, `layered-scene-foreground`\n\n**States:** `rest`\n\n**Visual archetype:** Static content surfaces — In-flow containers and content surfaces that do not inherently manipulate state.\n\n## Related components\n\n- [Art Plate](/components/component-art-plate)\n- [Frame](/components/component-frame)\n- [Card](/components/component-card)\n",
12786
+ "related": [
12787
+ "art-plate",
12788
+ "frame",
12789
+ "card"
12790
+ ],
12791
+ "route": "/components/component-layered-scene",
12792
+ "slug": "layered-scene",
12793
+ "status": "preview",
12794
+ "stories": {
12795
+ "file": "packages/ui-react/src/components/layered-scene/layered-scene.stories.tsx",
12796
+ "names": [
12797
+ "Playground",
12798
+ "EndPlacement",
12799
+ "WithoutForeground"
12800
+ ],
12801
+ "source": "import { layeredScenePlacements, layeredSceneWidths } from '@atom63/ui-foundation'\nimport {\n Badge,\n Button,\n Frame,\n FrameDescription,\n FrameHeader,\n FramePanel,\n FrameTitle,\n LayeredScene,\n LayeredSceneContent,\n LayeredSceneForeground,\n LayeredScenePlate,\n LayeredSceneStage,\n} from '@atom63/ui-react'\nimport '@atom63/ui-react/styles.css'\nimport type { Meta, StoryObj } from '@storybook/react-vite'\n\n// Remote pictures are pinned to one placeholder in the visual and craft runs.\nconst PLATE = 'https://picsum.photos/id/1018/1920/1080'\nconst FOCUS = { x: 0.5, y: 0.7 }\n\n// A stand-in cut-out: a ridge across the bottom eighth of the plate, transparent\n// above it. A real scene uses a cut-out of its own plate.\nconst RIDGE =\n 'data:image/svg+xml,' +\n encodeURIComponent(\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1920 1080\" preserveAspectRatio=\"xMidYMid slice\"><path fill-opacity=\"0.9\" d=\"M0 1000 L180 960 L360 990 L560 945 L760 985 L980 950 L1180 990 L1400 955 L1620 985 L1920 960 L1920 1080 L0 1080 Z\"/></svg>'\n )\n\nconst meta = {\n title: 'UI React/LayeredScene',\n component: LayeredScene,\n parameters: { layout: 'fullscreen' },\n argTypes: {\n placement: { control: 'inline-radio', options: layeredScenePlacements },\n width: { control: 'inline-radio', options: layeredSceneWidths },\n },\n args: { placement: 'center-bottom', width: 'wide' },\n} satisfies Meta<typeof LayeredScene>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\nfunction ProductWindow() {\n return (\n <Frame>\n <FrameHeader>\n <FrameTitle>Render queue</FrameTitle>\n <FrameDescription>3 jobs running on 4 workers</FrameDescription>\n </FrameHeader>\n <FramePanel>\n <div style={{ display: 'grid', gap: 'var(--a63-space-2)' }}>\n <span>title-sequence.mov · 72%</span>\n <span>logo-sting.mov · 40%</span>\n <span>lower-thirds.mov · queued</span>\n </div>\n {/* Empty room at the bottom of the window: the only part the cut-out may cover. */}\n <div style={{ blockSize: 'var(--spacing-24)' }} />\n </FramePanel>\n </Frame>\n )\n}\n\nfunction Copy() {\n return (\n <>\n <Badge variant=\"secondary\">Browser-native rendering</Badge>\n <h1\n style={{\n margin: 0,\n fontSize: 'var(--a63-type-display-large-font-size)',\n lineHeight: 'var(--a63-type-display-large-line-height)',\n maxInlineSize: '18ch',\n }}\n >\n Render at the speed of thought\n </h1>\n <p style={{ margin: 0 }}>A motion timeline that renders in the browser.</p>\n <div style={{ display: 'flex', gap: 'var(--a63-space-2)' }}>\n <Button>Start free</Button>\n <Button variant=\"outline\">Take a tour</Button>\n </div>\n </>\n )\n}\n\nexport const Playground: Story = {\n render: args => (\n <LayeredScene {...args}>\n <LayeredScenePlate alt=\"\" focus={FOCUS} priority src={PLATE} />\n <LayeredSceneContent>\n <Copy />\n </LayeredSceneContent>\n <LayeredSceneStage>\n <ProductWindow />\n </LayeredSceneStage>\n <LayeredSceneForeground focus={FOCUS} priority src={RIDGE} />\n </LayeredScene>\n ),\n}\n\nexport const EndPlacement: Story = {\n args: { placement: 'end-bottom', width: 'half' },\n render: Playground.render,\n}\n\nexport const WithoutForeground: Story = {\n render: args => (\n <LayeredScene {...args}>\n <LayeredScenePlate alt=\"\" focus={FOCUS} src={PLATE} />\n <LayeredSceneContent>\n <Copy />\n </LayeredSceneContent>\n <LayeredSceneStage>\n <ProductWindow />\n </LayeredSceneStage>\n </LayeredScene>\n ),\n}\n"
12802
+ },
12803
+ "summary": "Layered Scene stacks a plate, a stage of product UI and an inert foreground cut-out so the interface sits inside the picture.",
12804
+ "usage": "Use Layered Scene for a landing or portfolio hero where live product UI floats on an ArtPlate and a cut-out of the scene passes in front of it.",
12805
+ "usageExports": [
12806
+ "LayeredScene",
12807
+ "LayeredScenePlate",
12808
+ "LayeredSceneContent",
12809
+ "LayeredSceneStage",
12810
+ "LayeredSceneForeground"
12811
+ ]
12812
+ },
12454
12813
  {
12455
12814
  "axisGuidance": null,
12456
12815
  "contract": {
@@ -12930,13 +13289,16 @@
12930
13289
  "table-row",
12931
13290
  "table-head",
12932
13291
  "table-cell",
12933
- "table-caption"
13292
+ "table-caption",
13293
+ "table-sort-button"
12934
13294
  ],
12935
13295
  "source": "packages/ui-foundation/contracts/components/table.json",
12936
13296
  "states": [
12937
13297
  "rest",
12938
13298
  "row-hover",
12939
- "row-selected"
13299
+ "row-selected",
13300
+ "sort-ascending",
13301
+ "sort-descending"
12940
13302
  ],
12941
13303
  "tokenSlots": []
12942
13304
  },
@@ -12949,7 +13311,9 @@
12949
13311
  "TableHeadProps",
12950
13312
  "TableHeaderProps",
12951
13313
  "TableProps",
12952
- "TableRowProps"
13314
+ "TableRowProps",
13315
+ "TableSort",
13316
+ "TableSortDirection"
12953
13317
  ],
12954
13318
  "values": [
12955
13319
  "Table",
@@ -12973,7 +13337,7 @@
12973
13337
  ],
12974
13338
  "importPath": "@atom63/ui-react",
12975
13339
  "label": "Table",
12976
- "markdown": "# Table\n\nTable provides semantic table regions with shared typography, spacing, and states.\n\n**Status:** Stable\n\n## Preview\n\nThe live documentation page renders the `Playground` story maintained with the component.\n\n## Guidance\n\n- Keep header relationships intact and add horizontal containment for genuinely wide data. For a dense table (admin, payments, issues), pass size=\"sm\": rows are 33px, and a row checkbox or a 24px row menu (size=\"icon-xs\") keeps its hit area without making the row taller.\n- Keep product data and fetching outside the presentational component.\n- Test long, empty, and narrow content before adding local layout overrides.\n\n## Usage\n\n```tsx\nimport { Table, TableHeader, TableBody, TableRow, TableHead, TableCell } from '@atom63/ui-react'\n```\n\n## API surface\n\n**Values:** `Table`, `TableBody`, `TableCaption`, `TableCell`, `TableFooter`, `TableHead`, `TableHeader`, `TableRow`\n\n**Types:** `TableBodyProps`, `TableCaptionProps`, `TableCellProps`, `TableFooterProps`, `TableHeadProps`, `TableHeaderProps`, `TableProps`, `TableRowProps`\n\nTypeScript remains the source of truth for complete prop contracts.\n\n## Contract\n\nSource: `packages/ui-foundation/contracts/components/table.json` (`tableContract` in `@atom63/ui-foundation`).\n\n| Axis | Values | Default |\n| --- | --- | --- |\n| `variants` | `default`, `plain` | `default` |\n| `sizes` | `md`, `sm` | `md` |\n| `stickyEdges` | `start`, `end` | — |\n| `tones` | `neutral`, `accent` | `neutral` |\n\n**Deprecated aliases:** `default` → `md` (sizes)\n\n**Slots:** `table-container`, `table`, `table-header`, `table-body`, `table-footer`, `table-row`, `table-head`, `table-cell`, `table-caption`\n\n**States:** `rest`, `row-hover`, `row-selected`\n\n**Visual archetype:** Static content surfaces — In-flow containers and content surfaces that do not inherently manipulate state.\n\n## Related components\n\n- [Pagination](/components/component-pagination)\n- [Scroll Area](/components/component-scroll-area)\n",
13340
+ "markdown": "# Table\n\nTable provides semantic table regions with shared typography, spacing, and states.\n\n**Status:** Stable\n\n## Preview\n\nThe live documentation page renders the `Playground` story maintained with the component.\n\n## Guidance\n\n- Keep header relationships intact and add horizontal containment for genuinely wide data. For a dense table (admin, payments, issues), pass size=\"sm\": rows are 33px, and a row checkbox or a 24px row menu (size=\"icon-xs\") keeps its hit area without making the row taller.\n- Keep product data and fetching outside the presentational component.\n- Test long, empty, and narrow content before adding local layout overrides.\n\n## Usage\n\n```tsx\nimport { Table, TableHeader, TableBody, TableRow, TableHead, TableCell } from '@atom63/ui-react'\n```\n\n## API surface\n\n**Values:** `Table`, `TableBody`, `TableCaption`, `TableCell`, `TableFooter`, `TableHead`, `TableHeader`, `TableRow`\n\n**Types:** `TableBodyProps`, `TableCaptionProps`, `TableCellProps`, `TableFooterProps`, `TableHeadProps`, `TableHeaderProps`, `TableProps`, `TableRowProps`, `TableSort`, `TableSortDirection`\n\nTypeScript remains the source of truth for complete prop contracts.\n\n## Contract\n\nSource: `packages/ui-foundation/contracts/components/table.json` (`tableContract` in `@atom63/ui-foundation`).\n\n| Axis | Values | Default |\n| --- | --- | --- |\n| `variants` | `default`, `plain` | `default` |\n| `sizes` | `md`, `sm` | `md` |\n| `stickyEdges` | `start`, `end` | — |\n| `tones` | `neutral`, `accent` | `neutral` |\n\n**Deprecated aliases:** `default` → `md` (sizes)\n\n**Slots:** `table-container`, `table`, `table-header`, `table-body`, `table-footer`, `table-row`, `table-head`, `table-cell`, `table-caption`, `table-sort-button`\n\n**States:** `rest`, `row-hover`, `row-selected`, `sort-ascending`, `sort-descending`\n\n**Visual archetype:** Static content surfaces — In-flow containers and content surfaces that do not inherently manipulate state.\n\n## Related components\n\n- [Pagination](/components/component-pagination)\n- [Scroll Area](/components/component-scroll-area)\n",
12977
13341
  "related": [
12978
13342
  "pagination",
12979
13343
  "scroll-area"
@@ -12985,6 +13349,7 @@
12985
13349
  "file": "packages/ui-react/src/components/table/table.stories.tsx",
12986
13350
  "names": [
12987
13351
  "Playground",
13352
+ "SortableColumns",
12988
13353
  "Framed",
12989
13354
  "Sizes",
12990
13355
  "Plain",
@@ -12996,7 +13361,7 @@
12996
13361
  "Endpoints",
12997
13362
  "ContractMetadata"
12998
13363
  ],
12999
- "source": "import { tableContract, tableTones, themes } from '@atom63/ui-foundation'\nimport {\n Button,\n Checkbox,\n Table,\n TableBody,\n TableCaption,\n TableCell,\n TableFooter,\n TableHead,\n TableHeader,\n TableRow,\n UIProvider,\n} from '@atom63/ui-react'\nimport '@atom63/ui-react/styles.css'\nimport type { Meta, StoryObj } from '@storybook/react-vite'\nimport { Ellipsis } from 'lucide-react'\n\nconst meta = {\n title: 'UI React/Table',\n component: Table,\n} satisfies Meta<typeof Table>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\nconst rows = [\n { amount: '$250.00', invoice: 'INV001', method: 'Credit Card', status: 'Paid' },\n { amount: '$150.00', invoice: 'INV002', method: 'PayPal', status: 'Pending' },\n { amount: '$350.00', invoice: 'INV003', method: 'Bank Transfer', status: 'Unpaid' },\n]\n\nexport const Playground: Story = {\n render: () => (\n <div style={{ width: 480 }}>\n <Table>\n <TableCaption>A list of recent invoices.</TableCaption>\n <TableHeader>\n <TableRow>\n <TableHead>Invoice</TableHead>\n <TableHead>Status</TableHead>\n <TableHead>Method</TableHead>\n <TableHead>Amount</TableHead>\n </TableRow>\n </TableHeader>\n <TableBody>\n {rows.map(r => (\n <TableRow key={r.invoice} data-state={r.invoice === 'INV002' ? 'selected' : undefined}>\n <TableCell>{r.invoice}</TableCell>\n <TableCell>{r.status}</TableCell>\n <TableCell>{r.method}</TableCell>\n <TableCell>{r.amount}</TableCell>\n </TableRow>\n ))}\n </TableBody>\n <TableFooter>\n <TableRow>\n <TableCell>Total</TableCell>\n <TableCell />\n <TableCell />\n <TableCell>$750.00</TableCell>\n </TableRow>\n </TableFooter>\n </Table>\n </div>\n ),\n}\n\n/* A compact three-row table reused by the theme matrix. */\nfunction DemoTable() {\n return (\n <Table>\n <TableHeader>\n <TableRow>\n <TableHead>Invoice</TableHead>\n <TableHead>Status</TableHead>\n <TableHead>Amount</TableHead>\n </TableRow>\n </TableHeader>\n <TableBody>\n {rows.map(r => (\n <TableRow key={r.invoice} data-state={r.invoice === 'INV002' ? 'selected' : undefined}>\n <TableCell>{r.invoice}</TableCell>\n <TableCell>{r.status}</TableCell>\n <TableCell>{r.amount}</TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n )\n}\n\n/* Wrapping in a data-slot=\"frame\" ancestor switches on the bordered card. */\nexport const Framed: Story = {\n render: () => (\n <div data-slot=\"frame\" style={{ width: 480 }}>\n <Table>\n <TableHeader>\n <TableRow>\n <TableHead>Invoice</TableHead>\n <TableHead>Status</TableHead>\n <TableHead>Amount</TableHead>\n </TableRow>\n </TableHeader>\n <TableBody>\n {rows.map(r => (\n <TableRow key={r.invoice}>\n <TableCell>{r.invoice}</TableCell>\n <TableCell>{r.status}</TableCell>\n <TableCell>{r.amount}</TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </div>\n ),\n}\n\n/* `sm` takes its row padding from the density contract: compare it with the\n default rows, then under compact density. */\nexport const Sizes: Story = {\n render: () => (\n <div style={{ display: 'grid', gap: 24, width: 480 }}>\n {tableContract.sizes.map(size => (\n <div key={size}>\n <span style={{ color: 'var(--a63-text-secondary)', fontSize: 12 }}>size={size}</span>\n <Table size={size}>\n <TableHeader>\n <TableRow>\n <TableHead>Invoice</TableHead>\n <TableHead>Status</TableHead>\n <TableHead>Amount</TableHead>\n </TableRow>\n </TableHeader>\n <TableBody>\n {rows.map(r => (\n <TableRow key={r.invoice}>\n <TableCell>{r.invoice}</TableCell>\n <TableCell>{r.status}</TableCell>\n <TableCell>{r.amount}</TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </div>\n ))}\n <UIProvider density=\"compact\">\n <span style={{ color: 'var(--a63-text-secondary)', fontSize: 12 }}>\n size=sm, compact density\n </span>\n <Table size=\"sm\">\n <TableBody>\n {rows.map(r => (\n <TableRow key={r.invoice}>\n <TableCell>{r.invoice}</TableCell>\n <TableCell>{r.status}</TableCell>\n <TableCell>{r.amount}</TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </UIProvider>\n </div>\n ),\n}\n\n/* `plain` drops the dividers between body rows, for lists such as a track list. */\nexport const Plain: Story = {\n render: () => (\n <div style={{ width: 480 }}>\n <Table variant=\"plain\">\n <TableHeader>\n <TableRow>\n <TableHead>Invoice</TableHead>\n <TableHead>Status</TableHead>\n <TableHead>Amount</TableHead>\n </TableRow>\n </TableHeader>\n <TableBody>\n {rows.map(r => (\n <TableRow key={r.invoice}>\n <TableCell>{r.invoice}</TableCell>\n <TableCell>{r.status}</TableCell>\n <TableCell>{r.amount}</TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </div>\n ),\n}\n\n/* size=\"sm\" with row checkboxes: the checkbox keeps its hit area but no longer\n sets the row height. */\nexport const SelectableRows: Story = {\n render: () => (\n <div style={{ width: 480 }}>\n <Table size=\"sm\">\n <TableHeader>\n <TableRow>\n <TableHead>\n <Checkbox aria-label=\"Select all invoices\" />\n </TableHead>\n <TableHead>Invoice</TableHead>\n <TableHead>Status</TableHead>\n <TableHead>Amount</TableHead>\n </TableRow>\n </TableHeader>\n <TableBody>\n {rows.map(r => (\n <TableRow key={r.invoice}>\n <TableCell>\n <Checkbox aria-label={`Select ${r.invoice}`} />\n </TableCell>\n <TableCell>{r.invoice}</TableCell>\n <TableCell>{r.status}</TableCell>\n <TableCell>{r.amount}</TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </div>\n ),\n}\n\n/* size=\"sm\" with a row menu in each row: the 24px button keeps its size and hit\n area but counts as 1rem in the row, so the rows stay as dense as checkbox rows. */\nexport const DenseRowActions: Story = {\n render: () => (\n <div style={{ width: 480 }}>\n <Table size=\"sm\">\n <TableHeader>\n <TableRow>\n <TableHead>\n <Checkbox aria-label=\"Select all invoices\" />\n </TableHead>\n <TableHead>Invoice</TableHead>\n <TableHead>Status</TableHead>\n <TableHead>Amount</TableHead>\n <TableHead>\n <span className=\"sr-only\">Actions</span>\n </TableHead>\n </TableRow>\n </TableHeader>\n <TableBody>\n {rows.map(r => (\n <TableRow key={r.invoice}>\n <TableCell>\n <Checkbox aria-label={`Select ${r.invoice}`} />\n </TableCell>\n <TableCell>{r.invoice}</TableCell>\n <TableCell>{r.status}</TableCell>\n <TableCell>{r.amount}</TableCell>\n <TableCell style={{ textAlign: 'end' }}>\n <Button aria-label={`More actions for ${r.invoice}`} size=\"icon-xs\" variant=\"ghost\">\n <Ellipsis />\n </Button>\n </TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </div>\n ),\n play: ({ canvasElement }) => {\n const row = canvasElement.querySelector<HTMLElement>('[data-slot=\"table-body\"] tr')\n const button = row?.querySelector<HTMLElement>('button[aria-label^=\"More actions\"]')\n if (!row || !button) throw new Error('Expected a body row with a row menu')\n const rowHeight = row.getBoundingClientRect().height\n const buttonHeight = button.getBoundingClientRect().height\n if (rowHeight < 32 || rowHeight > 36) {\n throw new Error(`Expected a 32-36px dense row, got ${rowHeight}px`)\n }\n if (buttonHeight < 24) throw new Error(`Expected a 24px row button, got ${buttonHeight}px`)\n },\n}\n\n/* tone colours selected rows (data-state=\"selected\"): neutral (the default) is a\n muted fill with primary text, accent is the opt-in primary wash. */\nexport const Tones: Story = {\n render: () => (\n <div style={{ display: 'grid', gap: 24, width: 480 }}>\n {tableTones.map(tone => (\n <Table key={tone} size=\"sm\" tone={tone}>\n <TableCaption>tone=&quot;{tone}&quot;</TableCaption>\n <TableHeader>\n <TableRow>\n <TableHead>Invoice</TableHead>\n <TableHead>Status</TableHead>\n <TableHead>Amount</TableHead>\n </TableRow>\n </TableHeader>\n <TableBody>\n {rows.slice(0, 3).map((r, index) => (\n <TableRow data-state={index === 1 ? 'selected' : undefined} key={r.invoice}>\n <TableCell>{r.invoice}</TableCell>\n <TableCell>{r.status}</TableCell>\n <TableCell>{r.amount}</TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n ))}\n </div>\n ),\n}\n\nconst wideColumns = ['Customer', 'Method', 'Created', 'Refunded', 'Dispute', 'Reason']\n\n/* A table wider than its container: the invoice stays pinned at the start and\n the row menu at the end while the middle scrolls. */\nexport const StickyColumns: Story = {\n render: () => (\n <div style={{ width: 420 }}>\n <Table size=\"sm\">\n <TableHeader>\n <TableRow>\n <TableHead sticky=\"start\">Invoice</TableHead>\n {wideColumns.map(column => (\n <TableHead key={column}>{column}</TableHead>\n ))}\n <TableHead sticky=\"end\">Actions</TableHead>\n </TableRow>\n </TableHeader>\n <TableBody>\n {rows.map(r => (\n <TableRow key={r.invoice} data-state={r.invoice === 'INV002' ? 'selected' : undefined}>\n <TableCell sticky=\"start\">{r.invoice}</TableCell>\n {wideColumns.map(column => (\n <TableCell key={column}>{column === 'Method' ? r.method : '—'}</TableCell>\n ))}\n <TableCell sticky=\"end\">\n <Button aria-label={`Actions for ${r.invoice}`} size=\"icon-xs\" variant=\"ghost\">\n …\n </Button>\n </TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </div>\n ),\n}\n\nexport const Themes: Story = {\n render: () => (\n <div style={{ display: 'grid', gap: 12 }}>\n {themes.map(theme =>\n (['light', 'dark'] as const).map(mode => (\n <UIProvider key={`${theme}-${mode}`} mode={mode} theme={theme}>\n <div\n style={{\n alignItems: 'flex-start',\n background: 'var(--a63-surface-panel)',\n borderRadius: 'var(--radius-lg)',\n color: 'var(--a63-text-primary)',\n display: 'flex',\n gap: 12,\n padding: '0.75rem',\n }}\n >\n <span\n style={{\n flexShrink: 0,\n fontSize: 12,\n color: 'var(--a63-text-secondary)',\n width: 96,\n }}\n >\n {theme} / {mode}\n </span>\n <div data-slot=\"frame\" style={{ width: 360 }}>\n <DemoTable />\n </div>\n </div>\n </UIProvider>\n ))\n )}\n </div>\n ),\n}\n\nexport const Endpoints: Story = {\n render: () => (\n <div\n style={{\n display: 'grid',\n gap: '1rem',\n gridTemplateColumns: 'repeat(auto-fit, minmax(20rem, 1fr))',\n }}\n >\n <UIProvider designLanguage=\"web\" input=\"pointer\">\n <div style={{ background: 'var(--a63-surface-panel)', padding: '1rem' }}>\n <span style={{ color: 'var(--a63-text-secondary)', fontSize: 12 }}>web / pointer</span>\n <DemoTable />\n </div>\n </UIProvider>\n <UIProvider designLanguage=\"ios\" input=\"touch\">\n <div style={{ background: 'var(--a63-surface-panel)', padding: '1rem' }}>\n <span style={{ color: 'var(--a63-text-secondary)', fontSize: 12 }}>ios / touch</span>\n <DemoTable />\n </div>\n </UIProvider>\n <UIProvider density=\"compact\" designLanguage=\"web\" input=\"pointer\">\n <div style={{ background: 'var(--a63-surface-panel)', padding: '1rem' }}>\n <span style={{ color: 'var(--a63-text-secondary)', fontSize: 12 }}>\n extension / compact\n </span>\n <DemoTable />\n </div>\n </UIProvider>\n </div>\n ),\n}\n\nexport const ContractMetadata: Story = {\n render: () => (\n <pre style={{ fontSize: 12, margin: 0, whiteSpace: 'pre-wrap' }}>\n {JSON.stringify(tableContract, null, 2)}\n </pre>\n ),\n}\n"
13364
+ "source": "import { tableContract, tableTones, themes } from '@atom63/ui-foundation'\nimport {\n Button,\n Checkbox,\n Table,\n TableBody,\n TableCaption,\n TableCell,\n TableFooter,\n TableHead,\n TableHeader,\n TableRow,\n type TableSort,\n UIProvider,\n} from '@atom63/ui-react'\nimport '@atom63/ui-react/styles.css'\nimport type { Meta, StoryObj } from '@storybook/react-vite'\nimport { Ellipsis } from 'lucide-react'\nimport { useState } from 'react'\n\nconst meta = {\n title: 'UI React/Table',\n component: Table,\n} satisfies Meta<typeof Table>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\nconst rows = [\n { amount: '$250.00', invoice: 'INV001', method: 'Credit Card', status: 'Paid' },\n { amount: '$150.00', invoice: 'INV002', method: 'PayPal', status: 'Pending' },\n { amount: '$350.00', invoice: 'INV003', method: 'Bank Transfer', status: 'Unpaid' },\n]\n\nexport const Playground: Story = {\n render: () => (\n <div style={{ width: 480 }}>\n <Table>\n <TableCaption>A list of recent invoices.</TableCaption>\n <TableHeader>\n <TableRow>\n <TableHead>Invoice</TableHead>\n <TableHead>Status</TableHead>\n <TableHead>Method</TableHead>\n <TableHead>Amount</TableHead>\n </TableRow>\n </TableHeader>\n <TableBody>\n {rows.map(r => (\n <TableRow key={r.invoice} data-state={r.invoice === 'INV002' ? 'selected' : undefined}>\n <TableCell>{r.invoice}</TableCell>\n <TableCell>{r.status}</TableCell>\n <TableCell>{r.method}</TableCell>\n <TableCell>{r.amount}</TableCell>\n </TableRow>\n ))}\n </TableBody>\n <TableFooter>\n <TableRow>\n <TableCell>Total</TableCell>\n <TableCell />\n <TableCell />\n <TableCell>$750.00</TableCell>\n </TableRow>\n </TableFooter>\n </Table>\n </div>\n ),\n}\n\nconst amountOf = (row: (typeof rows)[number]) => Number(row.amount.replace(/[^0-9.]/g, ''))\n\nfunction SortableTable() {\n const [sort, setSort] = useState<TableSort | null>({ column: 'amount', direction: 'descending' })\n const sign = sort?.direction === 'ascending' ? 1 : -1\n const sorted = [...rows].sort((a, b) =>\n sort?.column === 'invoice'\n ? a.invoice.localeCompare(b.invoice) * sign\n : sort?.column === 'amount'\n ? (amountOf(a) - amountOf(b)) * sign\n : 0\n )\n return (\n <div style={{ width: 480 }}>\n <Table aria-label=\"Invoices\" onSortChange={setSort} sort={sort}>\n <TableHeader>\n <TableRow>\n <TableHead sortKey=\"invoice\">Invoice</TableHead>\n <TableHead>Status</TableHead>\n <TableHead\n firstSortDirection=\"descending\"\n sortKey=\"amount\"\n style={{ textAlign: 'end' }}\n >\n Amount\n </TableHead>\n </TableRow>\n </TableHeader>\n <TableBody>\n {sorted.map(r => (\n <TableRow key={r.invoice}>\n <TableCell>{r.invoice}</TableCell>\n <TableCell>{r.status}</TableCell>\n <TableCell style={{ textAlign: 'end' }}>{r.amount}</TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </div>\n )\n}\n\n/** Sortable heads: the caller owns `sort` and sorts the rows; the head shows the direction\n * with an icon and `aria-sort`, and pressing it asks for the next sort. */\nexport const SortableColumns: Story = {\n render: () => <SortableTable />,\n play: async ({ canvasElement }) => {\n const heads = canvasElement.querySelectorAll('th')\n if (heads[2]?.getAttribute('aria-sort') !== 'descending') {\n throw new Error('Expected the Amount column sorted descending')\n }\n const invoice = heads[0]?.querySelector('button')\n if (!invoice) throw new Error('Expected a sort button in the Invoice head')\n invoice.click()\n await new Promise(resolve => setTimeout(resolve, 0))\n if (\n heads[0]?.getAttribute('aria-sort') !== 'ascending' ||\n heads[2]?.hasAttribute('aria-sort')\n ) {\n throw new Error('Expected pressing Invoice to sort by it, ascending')\n }\n invoice.click()\n await new Promise(resolve => setTimeout(resolve, 0))\n const first = canvasElement.querySelector('tbody td')?.textContent\n if (first !== 'INV003') throw new Error(`Expected INV003 first when descending, got ${first}`)\n canvasElement.querySelector<HTMLButtonElement>('th:nth-child(3) button')?.click()\n },\n}\n\n/* A compact three-row table reused by the theme matrix. */\nfunction DemoTable() {\n return (\n <Table>\n <TableHeader>\n <TableRow>\n <TableHead>Invoice</TableHead>\n <TableHead>Status</TableHead>\n <TableHead>Amount</TableHead>\n </TableRow>\n </TableHeader>\n <TableBody>\n {rows.map(r => (\n <TableRow key={r.invoice} data-state={r.invoice === 'INV002' ? 'selected' : undefined}>\n <TableCell>{r.invoice}</TableCell>\n <TableCell>{r.status}</TableCell>\n <TableCell>{r.amount}</TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n )\n}\n\n/* Wrapping in a data-slot=\"frame\" ancestor switches on the bordered card. */\nexport const Framed: Story = {\n render: () => (\n <div data-slot=\"frame\" style={{ width: 480 }}>\n <Table>\n <TableHeader>\n <TableRow>\n <TableHead>Invoice</TableHead>\n <TableHead>Status</TableHead>\n <TableHead>Amount</TableHead>\n </TableRow>\n </TableHeader>\n <TableBody>\n {rows.map(r => (\n <TableRow key={r.invoice}>\n <TableCell>{r.invoice}</TableCell>\n <TableCell>{r.status}</TableCell>\n <TableCell>{r.amount}</TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </div>\n ),\n}\n\n/* `sm` takes its row padding from the density contract: compare it with the\n default rows, then under compact density. */\nexport const Sizes: Story = {\n render: () => (\n <div style={{ display: 'grid', gap: 24, width: 480 }}>\n {tableContract.sizes.map(size => (\n <div key={size}>\n <span style={{ color: 'var(--a63-text-secondary)', fontSize: 12 }}>size={size}</span>\n <Table size={size}>\n <TableHeader>\n <TableRow>\n <TableHead>Invoice</TableHead>\n <TableHead>Status</TableHead>\n <TableHead>Amount</TableHead>\n </TableRow>\n </TableHeader>\n <TableBody>\n {rows.map(r => (\n <TableRow key={r.invoice}>\n <TableCell>{r.invoice}</TableCell>\n <TableCell>{r.status}</TableCell>\n <TableCell>{r.amount}</TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </div>\n ))}\n <UIProvider density=\"compact\">\n <span style={{ color: 'var(--a63-text-secondary)', fontSize: 12 }}>\n size=sm, compact density\n </span>\n <Table size=\"sm\">\n <TableBody>\n {rows.map(r => (\n <TableRow key={r.invoice}>\n <TableCell>{r.invoice}</TableCell>\n <TableCell>{r.status}</TableCell>\n <TableCell>{r.amount}</TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </UIProvider>\n </div>\n ),\n}\n\n/* `plain` drops the dividers between body rows, for lists such as a track list. */\nexport const Plain: Story = {\n render: () => (\n <div style={{ width: 480 }}>\n <Table variant=\"plain\">\n <TableHeader>\n <TableRow>\n <TableHead>Invoice</TableHead>\n <TableHead>Status</TableHead>\n <TableHead>Amount</TableHead>\n </TableRow>\n </TableHeader>\n <TableBody>\n {rows.map(r => (\n <TableRow key={r.invoice}>\n <TableCell>{r.invoice}</TableCell>\n <TableCell>{r.status}</TableCell>\n <TableCell>{r.amount}</TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </div>\n ),\n}\n\n/* size=\"sm\" with row checkboxes: the checkbox keeps its hit area but no longer\n sets the row height. */\nexport const SelectableRows: Story = {\n render: () => (\n <div style={{ width: 480 }}>\n <Table size=\"sm\">\n <TableHeader>\n <TableRow>\n <TableHead>\n <Checkbox aria-label=\"Select all invoices\" />\n </TableHead>\n <TableHead>Invoice</TableHead>\n <TableHead>Status</TableHead>\n <TableHead>Amount</TableHead>\n </TableRow>\n </TableHeader>\n <TableBody>\n {rows.map(r => (\n <TableRow key={r.invoice}>\n <TableCell>\n <Checkbox aria-label={`Select ${r.invoice}`} />\n </TableCell>\n <TableCell>{r.invoice}</TableCell>\n <TableCell>{r.status}</TableCell>\n <TableCell>{r.amount}</TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </div>\n ),\n}\n\n/* size=\"sm\" with a row menu in each row: the 24px button keeps its size and hit\n area but counts as 1rem in the row, so the rows stay as dense as checkbox rows. */\nexport const DenseRowActions: Story = {\n render: () => (\n <div style={{ width: 480 }}>\n <Table size=\"sm\">\n <TableHeader>\n <TableRow>\n <TableHead>\n <Checkbox aria-label=\"Select all invoices\" />\n </TableHead>\n <TableHead>Invoice</TableHead>\n <TableHead>Status</TableHead>\n <TableHead>Amount</TableHead>\n <TableHead>\n <span className=\"sr-only\">Actions</span>\n </TableHead>\n </TableRow>\n </TableHeader>\n <TableBody>\n {rows.map(r => (\n <TableRow key={r.invoice}>\n <TableCell>\n <Checkbox aria-label={`Select ${r.invoice}`} />\n </TableCell>\n <TableCell>{r.invoice}</TableCell>\n <TableCell>{r.status}</TableCell>\n <TableCell>{r.amount}</TableCell>\n <TableCell style={{ textAlign: 'end' }}>\n <Button aria-label={`More actions for ${r.invoice}`} size=\"icon-xs\" variant=\"ghost\">\n <Ellipsis />\n </Button>\n </TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </div>\n ),\n play: ({ canvasElement }) => {\n const row = canvasElement.querySelector<HTMLElement>('[data-slot=\"table-body\"] tr')\n const button = row?.querySelector<HTMLElement>('button[aria-label^=\"More actions\"]')\n if (!row || !button) throw new Error('Expected a body row with a row menu')\n const rowHeight = row.getBoundingClientRect().height\n const buttonHeight = button.getBoundingClientRect().height\n if (rowHeight < 32 || rowHeight > 36) {\n throw new Error(`Expected a 32-36px dense row, got ${rowHeight}px`)\n }\n if (buttonHeight < 24) throw new Error(`Expected a 24px row button, got ${buttonHeight}px`)\n },\n}\n\n/* tone colours selected rows (data-state=\"selected\"): neutral (the default) is a\n muted fill with primary text, accent is the opt-in primary wash. */\nexport const Tones: Story = {\n render: () => (\n <div style={{ display: 'grid', gap: 24, width: 480 }}>\n {tableTones.map(tone => (\n <Table key={tone} size=\"sm\" tone={tone}>\n <TableCaption>tone=&quot;{tone}&quot;</TableCaption>\n <TableHeader>\n <TableRow>\n <TableHead>Invoice</TableHead>\n <TableHead>Status</TableHead>\n <TableHead>Amount</TableHead>\n </TableRow>\n </TableHeader>\n <TableBody>\n {rows.slice(0, 3).map((r, index) => (\n <TableRow data-state={index === 1 ? 'selected' : undefined} key={r.invoice}>\n <TableCell>{r.invoice}</TableCell>\n <TableCell>{r.status}</TableCell>\n <TableCell>{r.amount}</TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n ))}\n </div>\n ),\n}\n\nconst wideColumns = ['Customer', 'Method', 'Created', 'Refunded', 'Dispute', 'Reason']\n\n/* A table wider than its container: the invoice stays pinned at the start and\n the row menu at the end while the middle scrolls. */\nexport const StickyColumns: Story = {\n render: () => (\n <div style={{ width: 420 }}>\n <Table size=\"sm\">\n <TableHeader>\n <TableRow>\n <TableHead sticky=\"start\">Invoice</TableHead>\n {wideColumns.map(column => (\n <TableHead key={column}>{column}</TableHead>\n ))}\n <TableHead sticky=\"end\">Actions</TableHead>\n </TableRow>\n </TableHeader>\n <TableBody>\n {rows.map(r => (\n <TableRow key={r.invoice} data-state={r.invoice === 'INV002' ? 'selected' : undefined}>\n <TableCell sticky=\"start\">{r.invoice}</TableCell>\n {wideColumns.map(column => (\n <TableCell key={column}>{column === 'Method' ? r.method : '—'}</TableCell>\n ))}\n <TableCell sticky=\"end\">\n <Button aria-label={`Actions for ${r.invoice}`} size=\"icon-xs\" variant=\"ghost\">\n …\n </Button>\n </TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </div>\n ),\n}\n\nexport const Themes: Story = {\n render: () => (\n <div style={{ display: 'grid', gap: 12 }}>\n {themes.map(theme =>\n (['light', 'dark'] as const).map(mode => (\n <UIProvider key={`${theme}-${mode}`} mode={mode} theme={theme}>\n <div\n style={{\n alignItems: 'flex-start',\n background: 'var(--a63-surface-panel)',\n borderRadius: 'var(--radius-lg)',\n color: 'var(--a63-text-primary)',\n display: 'flex',\n gap: 12,\n padding: '0.75rem',\n }}\n >\n <span\n style={{\n flexShrink: 0,\n fontSize: 12,\n color: 'var(--a63-text-secondary)',\n width: 96,\n }}\n >\n {theme} / {mode}\n </span>\n <div data-slot=\"frame\" style={{ width: 360 }}>\n <DemoTable />\n </div>\n </div>\n </UIProvider>\n ))\n )}\n </div>\n ),\n}\n\nexport const Endpoints: Story = {\n render: () => (\n <div\n style={{\n display: 'grid',\n gap: '1rem',\n gridTemplateColumns: 'repeat(auto-fit, minmax(20rem, 1fr))',\n }}\n >\n <UIProvider designLanguage=\"web\" input=\"pointer\">\n <div style={{ background: 'var(--a63-surface-panel)', padding: '1rem' }}>\n <span style={{ color: 'var(--a63-text-secondary)', fontSize: 12 }}>web / pointer</span>\n <DemoTable />\n </div>\n </UIProvider>\n <UIProvider designLanguage=\"ios\" input=\"touch\">\n <div style={{ background: 'var(--a63-surface-panel)', padding: '1rem' }}>\n <span style={{ color: 'var(--a63-text-secondary)', fontSize: 12 }}>ios / touch</span>\n <DemoTable />\n </div>\n </UIProvider>\n <UIProvider density=\"compact\" designLanguage=\"web\" input=\"pointer\">\n <div style={{ background: 'var(--a63-surface-panel)', padding: '1rem' }}>\n <span style={{ color: 'var(--a63-text-secondary)', fontSize: 12 }}>\n extension / compact\n </span>\n <DemoTable />\n </div>\n </UIProvider>\n </div>\n ),\n}\n\nexport const ContractMetadata: Story = {\n render: () => (\n <pre style={{ fontSize: 12, margin: 0, whiteSpace: 'pre-wrap' }}>\n {JSON.stringify(tableContract, null, 2)}\n </pre>\n ),\n}\n"
13000
13365
  },
13001
13366
  "summary": "Table provides semantic table regions with shared typography, spacing, and states.",
13002
13367
  "usage": "Keep header relationships intact and add horizontal containment for genuinely wide data. For a dense table (admin, payments, issues), pass size=\"sm\": rows are 33px, and a row checkbox or a 24px row menu (size=\"icon-xs\") keeps its hit area without making the row taller.",
@@ -13339,10 +13704,11 @@
13339
13704
  "FailedTouch",
13340
13705
  "CustomChildren",
13341
13706
  "Themes",
13707
+ "FailedThemes",
13342
13708
  "Endpoints",
13343
13709
  "ContractMetadata"
13344
13710
  ],
13345
- "source": "import { loadMoreTriggerContract, loadMoreTriggerVariants, themes } from '@atom63/ui-foundation'\nimport { Button, LoadMoreTrigger, UIProvider } from '@atom63/ui-react'\nimport '@atom63/ui-react/styles.css'\nimport type { Meta, StoryObj } from '@storybook/react-vite'\n\nconst meta = {\n title: 'UI React/LoadMoreTrigger',\n component: LoadMoreTrigger,\n argTypes: {\n variant: { control: 'inline-radio', options: loadMoreTriggerVariants },\n state: {\n control: 'select',\n options: loadMoreTriggerContract.states.filter(state => state !== 'custom'),\n },\n hasMore: { control: 'boolean' },\n isLoading: { control: 'boolean' },\n },\n args: { hasMore: true, isLoading: false, variant: 'default' },\n} satisfies Meta<typeof LoadMoreTrigger>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\nexport const Playground: Story = {}\n\n/* Explicit state API uses the shared state-tone contract. */\nexport const States: Story = {\n render: () => (\n <div style={{ display: 'grid', gap: 12 }}>\n <LoadMoreTrigger state=\"idle\" />\n <LoadMoreTrigger state=\"loading\" />\n <LoadMoreTrigger onRetry={() => {}} state=\"failed\" />\n <LoadMoreTrigger state=\"exhausted\" />\n </div>\n ),\n}\n\nexport const Variants: Story = {\n render: () => (\n <div style={{ display: 'grid', gap: 12 }}>\n {loadMoreTriggerVariants.map(variant => (\n <LoadMoreTrigger hasMore isLoading key={variant} variant={variant} />\n ))}\n </div>\n ),\n}\n\nexport const Exhausted: Story = {\n args: { state: 'exhausted' },\n}\n\nexport const Failed: Story = {\n args: { onRetry: () => {}, state: 'failed' },\n}\n\n/* On a touch screen the Retry text keeps its size, and its hit area grows to the\n 44px touch target (--a63-control-min-target) around it. */\nexport const FailedTouch: Story = {\n play: ({ canvasElement }) => {\n const retry = canvasElement.querySelector<HTMLElement>('[data-slot=\"load-more-trigger-action\"]')\n if (!retry) throw new Error('Expected a Retry action')\n const hitArea = getComputedStyle(retry, '::before')\n const [width, height] = [parseFloat(hitArea.width), parseFloat(hitArea.height)]\n if (!(width >= 44 && height >= 44)) {\n throw new Error(`Retry hit area is ${width}×${height}px, expected at least 44×44`)\n }\n },\n render: () => (\n <UIProvider input=\"touch\">\n <LoadMoreTrigger onRetry={() => {}} state=\"failed\" />\n </UIProvider>\n ),\n}\n\n/* Custom children take over the row entirely (e.g. a manual \"Load more\" button). */\nexport const CustomChildren: Story = {\n render: () => (\n <LoadMoreTrigger hasMore isLoading={false}>\n <Button type=\"button\" variant=\"secondary\">\n Load more\n </Button>\n </LoadMoreTrigger>\n ),\n}\n\n/* The loading row (spinner + message) across all 4 DS themes × light/dark. */\nexport const Themes: Story = {\n render: () => (\n <div style={{ display: 'grid', gap: 12 }}>\n {themes.map(theme =>\n (['light', 'dark'] as const).map(mode => (\n <UIProvider key={`${theme}-${mode}`} mode={mode} theme={theme}>\n <div\n style={{\n alignItems: 'center',\n background: 'var(--a63-surface-panel)',\n borderRadius: 'var(--a63-surface-radius, var(--radius-lg))',\n color: 'var(--a63-text-primary)',\n display: 'flex',\n gap: 12,\n padding: '0.75rem',\n }}\n >\n <span style={{ fontSize: 12, color: 'var(--a63-text-secondary)', width: 96 }}>\n {theme} / {mode}\n </span>\n <LoadMoreTrigger hasMore isLoading />\n </div>\n </UIProvider>\n ))\n )}\n </div>\n ),\n}\n\nexport const Endpoints: Story = {\n render: () => (\n <div style={{ display: 'grid', gap: 12 }}>\n <UIProvider designLanguage=\"web\" input=\"pointer\">\n <EndpointTrigger label=\"Web\" />\n </UIProvider>\n <UIProvider designLanguage=\"ios\" input=\"touch\">\n <EndpointTrigger label=\"iOS touch\" />\n </UIProvider>\n <UIProvider density=\"compact\" designLanguage=\"web\" input=\"pointer\">\n <EndpointTrigger label=\"Compact extension\" />\n </UIProvider>\n </div>\n ),\n}\n\nexport const ContractMetadata: Story = {\n render: () => (\n <pre style={{ fontSize: 12, margin: 0, whiteSpace: 'pre-wrap' }}>\n {JSON.stringify(loadMoreTriggerContract, null, 2)}\n </pre>\n ),\n}\n\nfunction EndpointTrigger({ label }: { label: string }) {\n return (\n <div\n style={{\n alignItems: 'center',\n background: 'var(--a63-surface-panel)',\n color: 'var(--a63-text-primary)',\n display: 'flex',\n gap: 12,\n paddingInline: 12,\n }}\n >\n <span style={{ fontSize: 12, color: 'var(--a63-text-secondary)', width: 112 }}>{label}</span>\n <LoadMoreTrigger hasMore isLoading variant=\"prominent\" />\n </div>\n )\n}\n"
13711
+ "source": "import { loadMoreTriggerContract, loadMoreTriggerVariants, themes } from '@atom63/ui-foundation'\nimport { Button, LoadMoreTrigger, UIProvider } from '@atom63/ui-react'\nimport '@atom63/ui-react/styles.css'\nimport type { Meta, StoryObj } from '@storybook/react-vite'\n\nconst meta = {\n title: 'UI React/LoadMoreTrigger',\n component: LoadMoreTrigger,\n argTypes: {\n variant: { control: 'inline-radio', options: loadMoreTriggerVariants },\n state: {\n control: 'select',\n options: loadMoreTriggerContract.states.filter(state => state !== 'custom'),\n },\n hasMore: { control: 'boolean' },\n isLoading: { control: 'boolean' },\n },\n args: { hasMore: true, isLoading: false, variant: 'default' },\n} satisfies Meta<typeof LoadMoreTrigger>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\nexport const Playground: Story = {}\n\n/* Explicit state API uses the shared state-tone contract. */\nexport const States: Story = {\n render: () => (\n <div style={{ display: 'grid', gap: 12 }}>\n <LoadMoreTrigger state=\"idle\" />\n <LoadMoreTrigger state=\"loading\" />\n <LoadMoreTrigger onRetry={() => {}} state=\"failed\" />\n <LoadMoreTrigger state=\"exhausted\" />\n </div>\n ),\n}\n\nexport const Variants: Story = {\n render: () => (\n <div style={{ display: 'grid', gap: 12 }}>\n {loadMoreTriggerVariants.map(variant => (\n <LoadMoreTrigger hasMore isLoading key={variant} variant={variant} />\n ))}\n </div>\n ),\n}\n\nexport const Exhausted: Story = {\n args: { state: 'exhausted' },\n}\n\nexport const Failed: Story = {\n args: { onRetry: () => {}, state: 'failed' },\n}\n\n/* On a touch screen the Retry text keeps its size, and its hit area grows to the\n 44px touch target (--a63-control-min-target) around it. */\nexport const FailedTouch: Story = {\n play: ({ canvasElement }) => {\n const retry = canvasElement.querySelector<HTMLElement>('[data-slot=\"load-more-trigger-action\"]')\n if (!retry) throw new Error('Expected a Retry action')\n const hitArea = getComputedStyle(retry, '::before')\n const [width, height] = [parseFloat(hitArea.width), parseFloat(hitArea.height)]\n if (!(width >= 44 && height >= 44)) {\n throw new Error(`Retry hit area is ${width}×${height}px, expected at least 44×44`)\n }\n },\n render: () => (\n <UIProvider input=\"touch\">\n <LoadMoreTrigger onRetry={() => {}} state=\"failed\" />\n </UIProvider>\n ),\n}\n\n/* Custom children take over the row entirely (e.g. a manual \"Load more\" button). */\nexport const CustomChildren: Story = {\n render: () => (\n <LoadMoreTrigger hasMore isLoading={false}>\n <Button type=\"button\" variant=\"secondary\">\n Load more\n </Button>\n </LoadMoreTrigger>\n ),\n}\n\n/* The loading row (spinner + message) across all 4 DS themes × light/dark. */\nexport const Themes: Story = {\n render: () => (\n <div style={{ display: 'grid', gap: 12 }}>\n {themes.map(theme =>\n (['light', 'dark'] as const).map(mode => (\n <UIProvider key={`${theme}-${mode}`} mode={mode} theme={theme}>\n <div\n style={{\n alignItems: 'center',\n background: 'var(--a63-surface-panel)',\n borderRadius: 'var(--a63-surface-radius, var(--radius-lg))',\n color: 'var(--a63-text-primary)',\n display: 'flex',\n gap: 12,\n padding: '0.75rem',\n }}\n >\n <span style={{ fontSize: 12, color: 'var(--a63-text-secondary)', width: 96 }}>\n {theme} / {mode}\n </span>\n <LoadMoreTrigger hasMore isLoading />\n </div>\n </UIProvider>\n ))\n )}\n </div>\n ),\n}\n\n/* The sRGBA channels of a computed CSS colour, read back through a canvas so any\n colour syntax (oklch, color-mix) resolves the way the browser paints it. */\nfunction paintedRgba(color: string): [number, number, number, number] {\n const context = document.createElement('canvas').getContext('2d')\n if (!context) throw new Error('Expected a 2D canvas context')\n context.fillStyle = color\n context.fillRect(0, 0, 1, 1)\n const [r = 0, g = 0, b = 0, a = 0] = context.getImageData(0, 0, 1, 1).data\n return [r, g, b, a / 255]\n}\n\nfunction over(\n top: [number, number, number, number],\n base: [number, number, number]\n): [number, number, number] {\n const [r, g, b, a] = top\n return [r * a + base[0] * (1 - a), g * a + base[1] * (1 - a), b * a + base[2] * (1 - a)]\n}\n\n/* The colour an element sits on: its own and its ancestors' fills, composited\n from the first opaque one up. */\nfunction backdrop(element: HTMLElement): [number, number, number] {\n const layers: [number, number, number, number][] = []\n for (let node: HTMLElement | null = element; node; node = node.parentElement) {\n const fill = paintedRgba(getComputedStyle(node).backgroundColor)\n if (fill[3] > 0) layers.push(fill)\n if (fill[3] >= 0.99) break\n }\n return layers.reduceRight<[number, number, number]>(\n (base, layer) => over(layer, base),\n [255, 255, 255]\n )\n}\n\nfunction contrast(a: [number, number, number], b: [number, number, number]): number {\n const luminance = (rgb: [number, number, number]) => {\n const [r = 0, g = 0, b = 0] = rgb.map(channel => {\n const c = channel / 255\n return c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4\n })\n return 0.2126 * r + 0.7152 * g + 0.0722 * b\n }\n const [hi = 0, lo = 0] = [luminance(a), luminance(b)].sort((x, y) => y - x)\n return (hi + 0.05) / (lo + 0.05)\n}\n\n/* The failed row across all 4 DS themes × light/dark. The Retry label is text\n (WCAG 1.4.3, 4.5:1) and the error icon a graphic (1.4.11, 3:1). */\nexport const FailedThemes: Story = {\n play: ({ canvasElement }) => {\n const rows = canvasElement.querySelectorAll<HTMLElement>('[data-failed-row]')\n if (rows.length !== themes.length * 2)\n throw new Error('Expected a failed row per theme and mode')\n for (const row of rows) {\n const checks = [\n ['Retry label', row.querySelector<HTMLElement>('.a63-LoadMoreTrigger-action'), 4.5],\n ['error icon', row.querySelector<HTMLElement>('.a63-LoadMoreTrigger-icon'), 3],\n ] as const\n for (const [name, element, min] of checks) {\n if (!element) throw new Error(`${row.dataset.failedRow}: no ${name}`)\n const base = backdrop(element)\n const ratio = contrast(over(paintedRgba(getComputedStyle(element).color), base), base)\n if (ratio < min) {\n throw new Error(`${row.dataset.failedRow}: ${name} is ${ratio.toFixed(2)}:1 < ${min}:1`)\n }\n }\n }\n },\n render: () => (\n <div style={{ display: 'grid', gap: 12 }}>\n {themes.map(theme =>\n (['light', 'dark'] as const).map(mode => (\n <UIProvider key={`${theme}-${mode}`} mode={mode} theme={theme}>\n <div\n data-failed-row={`${theme}/${mode}`}\n style={{\n alignItems: 'center',\n background: 'var(--a63-surface-panel)',\n borderRadius: 'var(--a63-surface-radius, var(--radius-lg))',\n color: 'var(--a63-text-primary)',\n display: 'flex',\n gap: 12,\n padding: '0.75rem',\n }}\n >\n <span style={{ fontSize: 12, color: 'var(--a63-text-secondary)', width: 96 }}>\n {theme} / {mode}\n </span>\n <LoadMoreTrigger onRetry={() => {}} state=\"failed\" />\n </div>\n </UIProvider>\n ))\n )}\n </div>\n ),\n}\n\nexport const Endpoints: Story = {\n render: () => (\n <div style={{ display: 'grid', gap: 12 }}>\n <UIProvider designLanguage=\"web\" input=\"pointer\">\n <EndpointTrigger label=\"Web\" />\n </UIProvider>\n <UIProvider designLanguage=\"ios\" input=\"touch\">\n <EndpointTrigger label=\"iOS touch\" />\n </UIProvider>\n <UIProvider density=\"compact\" designLanguage=\"web\" input=\"pointer\">\n <EndpointTrigger label=\"Compact extension\" />\n </UIProvider>\n </div>\n ),\n}\n\nexport const ContractMetadata: Story = {\n render: () => (\n <pre style={{ fontSize: 12, margin: 0, whiteSpace: 'pre-wrap' }}>\n {JSON.stringify(loadMoreTriggerContract, null, 2)}\n </pre>\n ),\n}\n\nfunction EndpointTrigger({ label }: { label: string }) {\n return (\n <div\n style={{\n alignItems: 'center',\n background: 'var(--a63-surface-panel)',\n color: 'var(--a63-text-primary)',\n display: 'flex',\n gap: 12,\n paddingInline: 12,\n }}\n >\n <span style={{ fontSize: 12, color: 'var(--a63-text-secondary)', width: 112 }}>{label}</span>\n <LoadMoreTrigger hasMore isLoading variant=\"prominent\" />\n </div>\n )\n}\n"
13346
13712
  },
13347
13713
  "summary": "Load More Trigger is an observable sentinel row for incremental collection loading.",
13348
13714
  "usage": "Attach fetching to the forwarded ref and announce loading without turning the sentinel into a button.",
@@ -14135,7 +14501,7 @@
14135
14501
  {
14136
14502
  "area": "components",
14137
14503
  "label": "Segmented control",
14138
- "markdown": "# Segmented Control\n\nSegmented Control is a compact choice surface with one active value. It shares the segment archetype with Toggle Group and Button Group, but keeps its own moving indicator behavior.\n\n```tsx\nimport { SegmentedControl } from '@atom63/ui-react'\nimport { useState } from 'react'\n\n export function ThemeModeControl() {\n const [value, setValue] = useState('dark')\n\n return (\n <SegmentedControl\n items={[\n { label: 'Light', value: 'light' },\n { label: 'Dark', value: 'dark' },\n { label: 'Auto', value: 'auto' },\n ]}\n onValueChange={setValue}\n value={value}\n />\n )\n }\n```\n\nClick between segments to watch the backplate travel. `tone=\"accent\"` is the second row.\n\n## When to use\n\nUse Segmented Control for a small set of peer choices with one active value. In constrained containers, the default track stays on one line and scrolls horizontally while each item preserves its minimum target width. Set `fullWidth` when the track should fill its container and divide space equally; labels may then truncate. Use Tabs when the choices switch content panels.\n\nEach item label names its tab, but the current component API does not expose a name for the containing tab list. Treat group naming as an implementation gap rather than claiming a fully labeled pattern.\n\n## Contract shape\n\nSegmented Control is built on tab-like behavior. The component owns selection, indicator positioning, and item anatomy. The theme owns the track and selected material through `--a63-segment-*`.\n\n| Concern | Owner |\n|---------|-------|\n| Active value and keyboard behavior | Component / Base UI tabs behavior. |\n| Track geometry and item sizing | Segmented Control recipe. |\n| Material treatment | Segment contract tokens. |\n| Brand emphasis | `tone=\"accent\"` mapping to `--a63-segment-primary-*`. |\n\n## Key tokens\n\n| Token | Purpose |\n|-------|---------|\n| `--a63-segment-track-background` | Recessed shell fill. |\n| `--a63-segment-track-border` | Track border. |\n| `--a63-segment-track-shadow` | Recessed well treatment. |\n| `--a63-segment-foreground` | Resting item label color. |\n| `--a63-segment-hover-foreground` | Hover item label color. |\n| `--a63-segment-selected-background` | Neutral active plate. |\n| `--a63-segment-selected-foreground` | Text/icon on neutral active plate. |\n| `--a63-segment-primary-background` | Brand active plate. |\n| `--a63-segment-primary-foreground` | Text/icon on brand active plate. |\n\n## Design decisions\n\n### Active state can be neutral or accent\n\nMost settings controls should use a neutral active plate. A product-level mode switch or high-emphasis choice can use `tone=\"accent\"`. That choice is semantic; the theme only decides how the plate feels.\n\n### Track and plate are separate materials\n\nThe track should read as a seated well; the active plate should read as the chosen item. If both are equally loud, the control becomes a row of decorations instead of a selector.\n\n### Motion is behavior, not a theme\n\nThe moving backplate communicates spatial continuity between selected items. Themes do not control whether the indicator animates; consumers set `animateBackplate={false}` when a context needs a snap.\n\n## Usage\n\n```tsx\nimport { SegmentedControl } from '@atom63/ui-react'\n```\n\n## API surface\n\n**Values:** `SegmentedControl`\n\n**Types:** `SegmentedControlItem`, `SegmentedControlProps`\n\nTypeScript remains the source of truth for complete prop contracts.\n\n## Contract\n\nSource: `packages/ui-foundation/contracts/components/segmented-control.json` (`segmentedControlContract` in `@atom63/ui-foundation`).\n\n| Axis | Values | Default |\n| --- | --- | --- |\n| `sizes` | `sm`, `md`, `lg` | `md` |\n| `tones` | `neutral`, `accent` | `neutral` |\n| `variants` | `icon`, `label` | `label` |\n\n**Slots:** `segmented-control`, `segmented-control-track`, `segmented-control-item`, `segmented-control-icon`, `segmented-control-label`, `segmented-control-indicator`\n\n**States:** `rest`, `hover`, `selected`, `disabled`, `focus-visible`\n\n**Visual archetype:** Segmented selection — One-of-many peer selections presented as a shared track or grouped row.\n\n### Web and iOS\n\nSwitch a compact local mode or view between a small set of mutually exclusive options. Rendered by `Picker(.segmented)` in SwiftUI, with `platform-adaptive` parity.\n\n**Required states:** `rest`, `selected`, `disabled`\n\n**Shared outcomes:**\n\n- One segment is selected at a time\n- Activation updates the selection once\n- Disabled segment prevents selection\n\n**Accessibility outcomes:**\n\n- Exposes each segment label\n- Exposes selected state\n- Preserves single selection semantics\n\n**Platform adaptations:**\n\n- React: Uses a tab-backed segmented track with focus-visible feedback and an optional animated selection backplate.\n- SwiftUI: Uses Picker with segmented style so geometry, typography, and selection feedback remain platform-native.\n\n## Related components\n\n- [Toggle Group](/components/component-toggle-group)\n- [Tabs](/components/component-tabs)\n- [Radio](/components/component-radio)",
14504
+ "markdown": "# Segmented Control\n\nSegmented Control is a compact choice surface with one active value. It shares the segment archetype with Toggle Group and Button Group, but keeps its own moving indicator behavior.\n\n```tsx\nimport { SegmentedControl } from '@atom63/ui-react'\nimport { useState } from 'react'\n\n export function ThemeModeControl() {\n const [value, setValue] = useState('dark')\n\n return (\n <SegmentedControl\n aria-label=\"Appearance\"\n items={[\n { label: 'Light', value: 'light' },\n { label: 'Dark', value: 'dark' },\n { label: 'Auto', value: 'auto' },\n ]}\n onValueChange={setValue}\n value={value}\n />\n )\n }\n```\n\nClick between segments to watch the backplate travel. `tone=\"accent\"` is the second row.\n\n## When to use\n\nUse Segmented Control for a small set of peer choices with one active value. In constrained containers, the default track stays on one line and scrolls horizontally while each item preserves its minimum target width. Set `fullWidth` when the track should fill its container and divide space equally; labels may then truncate. Use Tabs when the choices switch content panels.\n\nSegmented Control is a radio group: the root has `role=\"radiogroup\"` and each segment is a `radio` named by its label. Name the group with `aria-label`, or with `aria-labelledby` pointing at a visible label. Tab moves focus to the selected segment, and the arrow keys move between segments and select as they go, as in the [APG Radio Group pattern](https://www.w3.org/WAI/ARIA/apg/patterns/radio/). It has no tab panels; when the choices switch content panels, use Tabs.\n\n## Contract shape\n\nSegmented Control is built on Base UI's radio group. The component owns selection, indicator positioning, and item anatomy. The theme owns the track and selected material through `--a63-segment-*`.\n\n| Concern | Owner |\n|---------|-------|\n| Active value and keyboard behavior | Component / Base UI radio group behavior. |\n| Track geometry and item sizing | Segmented Control recipe. |\n| Material treatment | Segment contract tokens. |\n| Brand emphasis | `tone=\"accent\"` mapping to `--a63-segment-primary-*`. |\n\n## Key tokens\n\n| Token | Purpose |\n|-------|---------|\n| `--a63-segment-track-background` | Recessed shell fill. |\n| `--a63-segment-track-border` | Track border. |\n| `--a63-segment-track-shadow` | Recessed well treatment. |\n| `--a63-segment-foreground` | Resting item label color. |\n| `--a63-segment-hover-foreground` | Hover item label color. |\n| `--a63-segment-selected-background` | Neutral active plate. |\n| `--a63-segment-selected-foreground` | Text/icon on neutral active plate. |\n| `--a63-segment-primary-background` | Brand active plate. |\n| `--a63-segment-primary-foreground` | Text/icon on brand active plate. |\n\n## Design decisions\n\n### Active state can be neutral or accent\n\nMost settings controls should use a neutral active plate. A product-level mode switch or high-emphasis choice can use `tone=\"accent\"`. That choice is semantic; the theme only decides how the plate feels.\n\n### Track and plate are separate materials\n\nThe track should read as a seated well; the active plate should read as the chosen item. If both are equally loud, the control becomes a row of decorations instead of a selector.\n\n### Motion is behavior, not a theme\n\nThe moving backplate communicates spatial continuity between selected items. Themes do not control whether the indicator animates; consumers set `animateBackplate={false}` when a context needs a snap.\n\n## Usage\n\n```tsx\nimport { SegmentedControl } from '@atom63/ui-react'\n```\n\n## API surface\n\n**Values:** `SegmentedControl`\n\n**Types:** `SegmentedControlItem`, `SegmentedControlProps`\n\nTypeScript remains the source of truth for complete prop contracts.\n\n## Contract\n\nSource: `packages/ui-foundation/contracts/components/segmented-control.json` (`segmentedControlContract` in `@atom63/ui-foundation`).\n\n| Axis | Values | Default |\n| --- | --- | --- |\n| `sizes` | `sm`, `md`, `lg` | `md` |\n| `tones` | `neutral`, `accent` | `neutral` |\n| `variants` | `icon`, `label` | `label` |\n\n**Slots:** `segmented-control`, `segmented-control-track`, `segmented-control-item`, `segmented-control-icon`, `segmented-control-label`, `segmented-control-indicator`\n\n**States:** `rest`, `hover`, `selected`, `disabled`, `focus-visible`\n\n**Visual archetype:** Segmented selection — One-of-many peer selections presented as a shared track or grouped row.\n\n### Web and iOS\n\nSwitch a compact local mode or view between a small set of mutually exclusive options. Rendered by `Picker(.segmented)` in SwiftUI, with `platform-adaptive` parity.\n\n**Required states:** `rest`, `selected`, `disabled`\n\n**Shared outcomes:**\n\n- One segment is selected at a time\n- Activation updates the selection once\n- Disabled segment prevents selection\n\n**Accessibility outcomes:**\n\n- Exposes each segment label\n- Exposes selected state\n- Preserves single selection semantics\n\n**Platform adaptations:**\n\n- React: Uses radiogroup and radio semantics on a segmented track, named by aria-label or aria-labelledby, with arrow-key selection, focus-visible feedback and an optional animated selection backplate.\n- SwiftUI: Uses Picker with segmented style so geometry, typography, and selection feedback remain platform-native.\n\n## Related components\n\n- [Toggle Group](/components/component-toggle-group)\n- [Tabs](/components/component-tabs)\n- [Radio](/components/component-radio)",
14139
14505
  "route": "/components/component-segmented-control",
14140
14506
  "slug": "component-segmented-control"
14141
14507
  },
@@ -14149,7 +14515,7 @@
14149
14515
  {
14150
14516
  "area": "foundations",
14151
14517
  "label": "Colors",
14152
- "markdown": "# Colors\n\nThe color system is built around executable indirection. **Foundation** owns the literal palette (`tokens/foundation/*`). **Semantics** (`--a63-*`) name UI jobs. **App JSX** may sketch with Tailwind/shadcn role utilities (`bg-background`, `text-muted-foreground`) because those adapters re-reference `--a63-*`. **Shared package recipes** consume `--a63-*` (and family contracts), not primitives and not raw shadcn CSS variables.\n\nAuthoring lanes: `docs/design-system/authoring-surfaces.md`.\n\nThe goal is simple: components describe the job a color performs, while `@atom63/styles` owns how that job resolves across mode, brand, neutral-surface, surface-tint, and theme axes.\n\n## Design intent\n\nThe Atom63-specific palette has six brand hues, six neutral families, and four status families. Foundation also carries the Tailwind named palette for fixed-hue cases. Both sit behind enough structure that changing an appearance axis does not require auditing every component:\n\n- **Foundation primitives** define stable palette material (the only place for new color dictionaries).\n- **Aliases** (brand / surface axes) select which primitive families a mood uses.\n- **Semantic roles** expose stable UI decisions through `--a63-*` variables.\n- **Themes** remap material/role resolution; they do not invent new palette ramps.\n- **Component recipes** consume those roles in React and CSS.\n\n## Layer stack\n\nImported in order from `@atom63/styles`:\n\n## Mental model\n\nColor moves from stable to contextual:\n\n```txt\nfoundation palette -> brand/surface alias -> a63 semantic role -> component recipe\n (values) (which family) (UI job) (wiring)\n```\n\nProduct theme skins (`modern` / `aqua` / …) sit beside this chain: they remap contract/semantic knobs, they are not a second palette dictionary.\n\nEach layer answers a different question:\n\n| Layer | Question | Example |\n|-------|----------|---------|\n| Foundation | What raw color exists? | `--color-b1-500`, `--color-n1-light-3` |\n| Alias | Which palette family does this mood use? | brand and surface aliases |\n| Semantic | What UI job does this color perform? | `--a63-surface-panel`, `--a63-action-primary`, `--a63-border-control` |\n| Component | How does the role appear in context? | button fill, input border, dialog surface |\n\nThis is the reason component code should feel boring. A component should say \"I need the primary action color\" or \"I need the subtle border color\", not \"I need this exact blue.\"\n\n## How the scale works\n\n### Semantic roles\n\nComponents use the `--a63-*` semantic layer. These variables are the design-system API for product UI.\n\n### Surface scale\n\n12-step neutral ramps (`surface-light-*` / `surface-dark-*`) form the backbone of the UI. Semantic tokens like `--a63-surface-page`, `--a63-surface-panel`, and `--a63-border-subtle` reference the appropriate steps. The default surface family is `n1`, a true neutral gray with no color cast.\n\n### Brand primitives\n\nSix brand hues (`b1`–`b6`), each with steps `50`–`950`, provide enough range for product accents, visualization, and expressive surfaces. The default primary action resolves through the brand alias layer rather than hardcoding a primitive in a component.\n\n### Neutral families\n\nSix neutral palettes (`n1`–`n6`) give the system different neutral personalities without creating one-off product palettes. The `data-a63-surface` axis remaps the aliases; components keep consuming the same semantic roles. Themes may separately re-skin semantic surfaces when material character requires it.\n\n### Status primitives\n\n`danger`, `success`, `warning`, and `info` carry fixed meaning. They can be tuned for contrast across modes, but they should not be repurposed as decorative brand colors.\n\n {STATUS_PRIMITIVES.map(({ id, utility }) => (\n ))}\n\n### Gradients\n\nFour gradient tokens follow the theme, brand and mode, so a hero or banner never needs a hand-written gradient:\n\n| Token | Draws | Use |\n|-------|-------|-----|\n| `--a63-gradient-brand` | Brand 500 to 700 at 135° | A saturated brand banner or card |\n| `--a63-gradient-brand-subtle` | Brand 50 to 100 at 135° | A quiet illustration or card background |\n| `--a63-gradient-brand-fade` | Brand 800 at the top, brand 700 at the end of the dark zone, then `--a63-surface-page` at the bottom | A hero that runs into the page, such as a banking home or a shop header |\n| `--a63-gradient-scrim` | Transparent to 60% black, top to bottom | Text laid over the foot of a photo |\n\n`--a63-gradient-brand-fade` has a **dark zone**: the top `--a63-gradient-brand-fade-dark-zone` (50%) of the hero, which stays at brand 700 or darker. White on-media text and overlay controls reach WCAG AA there on every brand, so the balance, its label and the row of round `overlay` buttons with their labels go in that zone. Below it the hero fades into the page: content there uses the page tokens (`--a63-text-primary`, `--a63-surface-panel`) and the default button variants, on its own `--a63-surface-panel` card while the fade is still running, since text straight on the mid-fade has neither the page's contrast nor the dark zone's. An `overlay` button or `--a63-on-media-foreground` label on the faded part becomes white on near white and disappears. Size the hero with a definite height so the zone lines up with its content, for example a grid with `grid-template-rows: var(--a63-gradient-brand-fade-dark-zone) 1fr`. The Button story `RoundOnBrandFade` shows the pattern. On iOS, `AtomThemeColors.brandFadeGradient(for:)` draws the same gradient and `AtomTokens.Gradient.brandFadeDarkZone` holds the zone.\n\nOverlay and on-media controls belong over dark or busy media (photos, video, `--a63-gradient-brand`, the dark zone of the fade), never over a light or faded background.\n\nThe gradient tokens hold whole `linear-gradient()` values, so they go in `background-image`\n(`bg-(image:--a63-gradient-brand)` in Tailwind), never in `background-color`. Text over a photo with\nthe scrim takes `--a63-on-media-foreground`. For a large amount on a hero, pair a gradient with the\ndisplay text roles on the Typography page.\n\n## Compatibility\n\nThe shadcn vocabulary (`background`, `primary`, `muted-foreground`, …) is an **opt-in adapter** (`@atom63/styles/compat/shadcn` + Tailwind theme keys). It re-references `--a63-*`; it does not own values (mirror rule).\n\nBoth the Tailwind theme keys and the compat variables are generated from one role table, `packages/styles/src/tailwind/roles.json` (`pnpm --filter @atom63/styles generate:roles`). Beyond the shadcn defaults it adds `destructive-foreground`, `info`/`success`/`warning` with `-foreground`, `surface-sunken`, `selected` with `-foreground` (the neutral selection) and `selected-accent` with `-foreground` (the opt-in accent selection), and `chart-1`–`chart-5`. Tinted chips use the `-subtle` pairs: `destructive-subtle`, `info-subtle`, `success-subtle` and `warning-subtle`, each with `-subtle-foreground`, and `category-<hue>` with `-subtle` and `-subtle-foreground` for the 22 palette hues (amber shares the warning ramp). Every tint is the same 14% wash. Media chrome uses `media-stage`, `media-surface` (an opaque dark neutral that does not follow the mode), `media-scrim` and the `on-media-*` roles, so controls over images need no arbitrary `bg-(--…)` classes. `accent` is the neutral hover and highlight plate, not the brand color; use `primary` for the brand.\n\n| Surface | Prefer | Avoid |\n|---------|--------|-------|\n| App / page JSX | Tailwind utilities: `bg-background`, `text-foreground`, `bg-primary`, … | Hardcoded hex; reaching into `--a63-control-*` for sketching |\n| Shared package recipes (`ui-react`, widgets, …) | `--a63-*` roles (+ family contracts) | Baking `var(--background)` / `var(--primary)` into package CSS |\n| Third-party / copy-pasted shadcn CSS | Compat aliases OK at the consumer boundary | Treating `--primary` as the system SSOT |\n\nCanonical design-system contract for shared UI is `--a63-*`. Tailwind/shadcn names are the **human design dialect** for product screens — not “legacy only.” See Designing in code and `docs/design-system/authoring-surfaces.md`.\n\n## Decisions worth knowing\n\n### Semantic-first, not palette-first\n\nShared components never use primitive color values directly. Not `--color-b1-500`, not `--color-n1-light-3`, and not one-off hex values. Shared UI consumes semantic roles such as `--a63-action-primary`, `--a63-text-primary`, `--a63-border-subtle`, and `--a63-surface-panel`. App JSX may use the equivalent Tailwind role utilities.\n\nThe exception is deliberate brand or visualization work that needs a fixed hue regardless of theme. Those cases should be explicit and rare. **Adding** a new hue step still happens in foundation.\n\n### Six neutrals, not one\n\nMost systems ship one neutral ramp. Atom63 has six because portfolio, docs, OS, and learning surfaces can need different neutral personalities. Having six families pre-built makes theme creation alias reassignment rather than palette generation.\n\n### Contrast as a contract\n\nEvery semantic foreground/background pair is designed together. `--a63-action-primary` and `--a63-action-primary-foreground` are a pair. Text roles and surface roles are reviewed together. If a component introduces a new semantic pair, the pair needs contrast review before it becomes part of the shared system.\n\n### Color should express role before personality\n\nThe palette can be expressive, but role comes first. A primary button is primary because it is the main action, not because blue looks good in that location. A muted panel is muted because it is secondary to the current task, not because the screen needs another shade.\n\n## Usage guidance\n\n| Need | In app JSX | In package recipes |\n|------|------------|--------------------|\n| App surfaces | `bg-background`, `bg-card`, `bg-muted` | `--a63-surface-page`, `--a63-surface-panel`, `--a63-surface-muted` |\n| Text | `text-foreground`, `text-muted-foreground`, `text-(--a63-text-tertiary)` | `--a63-text-primary`, `--a63-text-secondary`, `--a63-text-tertiary` |\n| Borders | `border-border` | `--a63-border-subtle`, `--a63-border-control` |\n| Primary actions | `bg-primary`, `text-primary-foreground` | `--a63-action-primary`, `--a63-action-primary-foreground` |\n| Feedback states | `text-destructive`, status utilities | `--a63-status-*`, `--a63-action-danger` |\n| Brand moments (fixed hue) | `bg-b1-500`, … | foundation `--color-b*` only when intentional |\n| Hero fading into the page | `bg-(image:--a63-gradient-brand-fade)` | `--a63-gradient-brand-fade`, controls in its dark zone |\n\nThere are three text greys. `--a63-text-primary` is for content, `--a63-text-secondary` for supporting text that is still content (descriptions, labels), and `--a63-text-tertiary` for placeholders, meta and timestamps. Tertiary keeps WCAG AA 4.5:1 on the page, the panel, the field fill and the muted fill in every theme and mode; every field placeholder uses it.\n\nFor a warm paper or document product (docs, notes, an editor), pick the warm `n6` neutral (`data-a63-surface=\"n6\"`) and put the content on a white page (`--a63-surface-panel` as the page ground) instead of the default grey `--a63-surface-page`.\n\n## Anti-patterns\n\n```tsx\n// Avoid: component owns a palette decision.\n<Button style={{ backgroundColor: 'var(--color-b1-500)' }} />\n```\n\nThe button now depends on one theme's brand hue and one foreground assumption.\n\n```tsx\n// Prefer: component owns a semantic role.\n<Button style={{ backgroundColor: 'var(--a63-action-primary)', color: 'var(--a63-action-primary-foreground)' }} />\n```\n\nThe component can survive theme changes because the semantic pair owns contrast.\n\n## Review checklist\n\nWhen reviewing color usage, ask:\n\n1. Is this a semantic role (Tailwind/shadcn utility or `--a63-*`), or a foundation palette value?\n2. If adding a new literal color, does it live in `tokens/foundation/*`?\n3. Does the foreground/background pair have a contrast contract?\n4. Would this still work if the brand hue changed?\n5. Is a status color being used for real status meaning?\n6. Is color the only cue for the state?",
14518
+ "markdown": "# Colors\n\nThe color system is built around executable indirection. **Foundation** owns the literal palette (`tokens/foundation/*`). **Semantics** (`--a63-*`) name UI jobs. **App JSX** may sketch with Tailwind/shadcn role utilities (`bg-background`, `text-muted-foreground`) because those adapters re-reference `--a63-*`. **Shared package recipes** consume `--a63-*` (and family contracts), not primitives and not raw shadcn CSS variables.\n\nAuthoring lanes: `docs/design-system/authoring-surfaces.md`.\n\nThe goal is simple: components describe the job a color performs, while `@atom63/styles` owns how that job resolves across mode, brand, neutral-surface, surface-tint, and theme axes.\n\n## Design intent\n\nThe Atom63-specific palette has six brand hues, six neutral families, and four status families. Foundation also carries the Tailwind named palette for fixed-hue cases. Both sit behind enough structure that changing an appearance axis does not require auditing every component:\n\n- **Foundation primitives** define stable palette material (the only place for new color dictionaries).\n- **Aliases** (brand / surface axes) select which primitive families a mood uses.\n- **Semantic roles** expose stable UI decisions through `--a63-*` variables.\n- **Themes** remap material/role resolution; they do not invent new palette ramps.\n- **Component recipes** consume those roles in React and CSS.\n\n## Layer stack\n\nImported in order from `@atom63/styles`:\n\n## Mental model\n\nColor moves from stable to contextual:\n\n```txt\nfoundation palette -> brand/surface alias -> a63 semantic role -> component recipe\n (values) (which family) (UI job) (wiring)\n```\n\nProduct theme skins (`modern` / `aqua` / …) sit beside this chain: they remap contract/semantic knobs, they are not a second palette dictionary.\n\nEach layer answers a different question:\n\n| Layer | Question | Example |\n|-------|----------|---------|\n| Foundation | What raw color exists? | `--color-b1-500`, `--color-n1-light-3` |\n| Alias | Which palette family does this mood use? | brand and surface aliases |\n| Semantic | What UI job does this color perform? | `--a63-surface-panel`, `--a63-action-primary`, `--a63-border-control` |\n| Component | How does the role appear in context? | button fill, input border, dialog surface |\n\nThis is the reason component code should feel boring. A component should say \"I need the primary action color\" or \"I need the subtle border color\", not \"I need this exact blue.\"\n\n## How the scale works\n\n### Semantic roles\n\nComponents use the `--a63-*` semantic layer. These variables are the design-system API for product UI.\n\n### Surface scale\n\n12-step neutral ramps (`surface-light-*` / `surface-dark-*`) form the backbone of the UI. Semantic tokens like `--a63-surface-page`, `--a63-surface-panel`, and `--a63-border-subtle` reference the appropriate steps. The default surface family is `n1`, a true neutral gray with no color cast.\n\n### Brand primitives\n\nSix brand hues (`b1`–`b6`), each with steps `50`–`950`, provide enough range for product accents, visualization, and expressive surfaces. The default primary action resolves through the brand alias layer rather than hardcoding a primitive in a component.\n\n### Neutral families\n\nSix neutral palettes (`n1`–`n6`) give the system different neutral personalities without creating one-off product palettes. The `data-a63-surface` axis remaps the aliases; components keep consuming the same semantic roles. Themes may separately re-skin semantic surfaces when material character requires it.\n\n### Status primitives\n\n`danger`, `success`, `warning`, and `info` carry fixed meaning. They can be tuned for contrast across modes, but they should not be repurposed as decorative brand colors.\n\n {STATUS_PRIMITIVES.map(({ id, utility }) => (\n ))}\n\n### Chart series\n\n`--a63-chart-1` to `--a63-chart-5` colour the series of a chart (the `Chart` component reads them in order). Series 1 is the brand: the primary on light surfaces, the brand's 400 step on dark ones. Series 2 to 5 turn the brand's hue by fixed steps at a set lightness and chroma, so none of them lands on the brand whatever it is, a violet brand or a wallpaper (`auto`) brand included. Each series reaches 3:1 against the page and the panel in every theme and mode; `chart-palette.browser.test.ts` checks that, and that every pair of series and every series and the brand stay apart, across brands × themes × modes.\n\n### Gradients\n\nFour gradient tokens follow the theme, brand and mode, so a hero or banner never needs a hand-written gradient:\n\n| Token | Draws | Use |\n|-------|-------|-----|\n| `--a63-gradient-brand` | Brand 500 to 700 at 135° | A saturated brand banner or card |\n| `--a63-gradient-brand-subtle` | Brand 50 to 100 at 135° | A quiet illustration or card background |\n| `--a63-gradient-brand-fade` | Brand 800 at the top, brand 700 at the end of the dark zone, then `--a63-surface-page` at the bottom | A hero that runs into the page, such as a banking home or a shop header |\n| `--a63-gradient-scrim` | Transparent to 60% black, top to bottom | Text laid over the foot of a photo |\n\n`--a63-gradient-brand-fade` has a **dark zone**: the top `--a63-gradient-brand-fade-dark-zone` (50%) of the hero, which stays at brand 700 or darker. White on-media text and overlay controls reach WCAG AA there on every brand, so the balance, its label and the row of round `overlay` buttons with their labels go in that zone. Below it the hero fades into the page: content there uses the page tokens (`--a63-text-primary`, `--a63-surface-panel`) and the default button variants, on its own `--a63-surface-panel` card while the fade is still running, since text straight on the mid-fade has neither the page's contrast nor the dark zone's. An `overlay` button or `--a63-on-media-foreground` label on the faded part becomes white on near white and disappears. Size the hero with a definite height so the zone lines up with its content, for example a grid with `grid-template-rows: var(--a63-gradient-brand-fade-dark-zone) 1fr`. The Button story `RoundOnBrandFade` shows the pattern. On iOS, `AtomThemeColors.brandFadeGradient(for:)` draws the same gradient and `AtomTokens.Gradient.brandFadeDarkZone` holds the zone.\n\nOverlay and on-media controls belong over dark or busy media (photos, video, `--a63-gradient-brand`, the dark zone of the fade), never over a light or faded background.\n\nThe gradient tokens hold whole `linear-gradient()` values, so they go in `background-image`\n(`bg-(image:--a63-gradient-brand)` in Tailwind), never in `background-color`. Text over a photo with\nthe scrim takes `--a63-on-media-foreground`. For a large amount on a hero, pair a gradient with the\ndisplay text roles on the Typography page.\n\n## Compatibility\n\nThe shadcn vocabulary (`background`, `primary`, `muted-foreground`, …) is an **opt-in adapter** (`@atom63/styles/compat/shadcn` + Tailwind theme keys). It re-references `--a63-*`; it does not own values (mirror rule).\n\nBoth the Tailwind theme keys and the compat variables are generated from one role table, `packages/styles/src/tailwind/roles.json` (`pnpm --filter @atom63/styles generate:roles`). Beyond the shadcn defaults it adds `destructive-foreground`, `info`/`success`/`warning` with `-foreground`, `surface-sunken`, `selected` with `-foreground` (the neutral selection) and `selected-accent` with `-foreground` (the opt-in accent selection), and `chart-1`–`chart-5`. Tinted chips use the `-subtle` pairs: `destructive-subtle`, `info-subtle`, `success-subtle` and `warning-subtle`, each with `-subtle-foreground`, and `category-<hue>` with `-subtle` and `-subtle-foreground` for the 22 palette hues (amber shares the warning ramp). Every tint is the same 14% wash. Media chrome uses `media-stage`, `media-surface` (an opaque dark neutral that does not follow the mode), `media-scrim` and the `on-media-*` roles, so controls over images need no arbitrary `bg-(--…)` classes. `accent` is the neutral hover and highlight plate, not the brand color; use `primary` for the brand.\n\n| Surface | Prefer | Avoid |\n|---------|--------|-------|\n| App / page JSX | Tailwind utilities: `bg-background`, `text-foreground`, `bg-primary`, … | Hardcoded hex; reaching into `--a63-control-*` for sketching |\n| Shared package recipes (`ui-react`, widgets, …) | `--a63-*` roles (+ family contracts) | Baking `var(--background)` / `var(--primary)` into package CSS |\n| Third-party / copy-pasted shadcn CSS | Compat aliases OK at the consumer boundary | Treating `--primary` as the system SSOT |\n\nCanonical design-system contract for shared UI is `--a63-*`. Tailwind/shadcn names are the **human design dialect** for product screens — not “legacy only.” See Designing in code and `docs/design-system/authoring-surfaces.md`.\n\n## Decisions worth knowing\n\n### Semantic-first, not palette-first\n\nShared components never use primitive color values directly. Not `--color-b1-500`, not `--color-n1-light-3`, and not one-off hex values. Shared UI consumes semantic roles such as `--a63-action-primary`, `--a63-text-primary`, `--a63-border-subtle`, and `--a63-surface-panel`. App JSX may use the equivalent Tailwind role utilities.\n\nThe exception is deliberate brand or visualization work that needs a fixed hue regardless of theme. Those cases should be explicit and rare. **Adding** a new hue step still happens in foundation.\n\n### Six neutrals, not one\n\nMost systems ship one neutral ramp. Atom63 has six because portfolio, docs, OS, and learning surfaces can need different neutral personalities. Having six families pre-built makes theme creation alias reassignment rather than palette generation.\n\n### Contrast as a contract\n\nEvery semantic foreground/background pair is designed together. `--a63-action-primary` and `--a63-action-primary-foreground` are a pair. Text roles and surface roles are reviewed together. If a component introduces a new semantic pair, the pair needs contrast review before it becomes part of the shared system.\n\n### Color should express role before personality\n\nThe palette can be expressive, but role comes first. A primary button is primary because it is the main action, not because blue looks good in that location. A muted panel is muted because it is secondary to the current task, not because the screen needs another shade.\n\n## Usage guidance\n\n| Need | In app JSX | In package recipes |\n|------|------------|--------------------|\n| App surfaces | `bg-background`, `bg-card`, `bg-muted` | `--a63-surface-page`, `--a63-surface-panel`, `--a63-surface-muted` |\n| Text | `text-foreground`, `text-muted-foreground`, `text-(--a63-text-tertiary)` | `--a63-text-primary`, `--a63-text-secondary`, `--a63-text-tertiary` |\n| Borders | `border-border` | `--a63-border-subtle`, `--a63-border-control` |\n| Primary actions | `bg-primary`, `text-primary-foreground` | `--a63-action-primary`, `--a63-action-primary-foreground` |\n| Feedback states | `text-destructive`, status utilities | `--a63-status-*`, `--a63-action-danger` |\n| Brand moments (fixed hue) | `bg-b1-500`, … | foundation `--color-b*` only when intentional |\n| Hero fading into the page | `bg-(image:--a63-gradient-brand-fade)` | `--a63-gradient-brand-fade`, controls in its dark zone |\n\nThere are three text greys. `--a63-text-primary` is for content, `--a63-text-secondary` for supporting text that is still content (descriptions, labels), and `--a63-text-tertiary` for placeholders, meta and timestamps. Tertiary keeps WCAG AA 4.5:1 on the page, the panel, the field fill and the muted fill in every theme and mode; every field placeholder uses it.\n\nFor a warm paper or document product (docs, notes, an editor), pick the warm `n6` neutral (`data-a63-surface=\"n6\"`) and put the content on a white page (`--a63-surface-panel` as the page ground) instead of the default grey `--a63-surface-page`.\n\n## Anti-patterns\n\n```tsx\n// Avoid: component owns a palette decision.\n<Button style={{ backgroundColor: 'var(--color-b1-500)' }} />\n```\n\nThe button now depends on one theme's brand hue and one foreground assumption.\n\n```tsx\n// Prefer: component owns a semantic role.\n<Button style={{ backgroundColor: 'var(--a63-action-primary)', color: 'var(--a63-action-primary-foreground)' }} />\n```\n\nThe component can survive theme changes because the semantic pair owns contrast.\n\n## Review checklist\n\nWhen reviewing color usage, ask:\n\n1. Is this a semantic role (Tailwind/shadcn utility or `--a63-*`), or a foundation palette value?\n2. If adding a new literal color, does it live in `tokens/foundation/*`?\n3. Does the foreground/background pair have a contrast contract?\n4. Would this still work if the brand hue changed?\n5. Is a status color being used for real status meaning?\n6. Is color the only cue for the state?",
14153
14519
  "route": "/foundations/foundation-colors",
14154
14520
  "slug": "foundation-colors"
14155
14521
  },
@@ -14191,7 +14557,7 @@
14191
14557
  {
14192
14558
  "area": "foundations",
14193
14559
  "label": "Personalization",
14194
- "markdown": "# Personalization\n\nPersonalization is not a theme picker bolted onto the UI. It is the shape of the foundation: independent axes stamped as `data-a63-*` attributes (plus one scalar tint token), resolving through one semantic `--a63-*` layer.\n\n## Axes, not presets\n\nPresets demo well and compose badly. The moment someone wants Aqua material with a different neutral family and sharper radius, a preset model becomes a matrix of one-offs.\n\nATOM63 uses axes instead. Each axis owns a distinct slice of the system. CSS-backed component recipes inherit the resolved tokens instead of branching on axis values; `iconTheme` is the explicit React-consumed exception.\n\nThe live registry lives in `@atom63/ui-foundation` → `personalizationAxes`. The table below mirrors it:\n\n| Axis | Values | Applied as | Owns |\n|------|--------|------------|------|\n| Design language | `web` · `ios` | `data-a63-design-language` | Control proportions and interaction feedback. |\n| Mode | `light` · `dark` · `system` | `.light` / `.dark` + `data-a63-mode` | Light/dark semantic color resolution. |\n| Theme | `modern` · `aqua` · `retro` · `terminal` | `data-a63-theme` | Material values: gloss, shadow, bevel, texture, blur. |\n| Brand | `auto` · `b1`–`b6` | `data-a63-brand` | Primary tonal ramp and focus color. |\n| Surface | `n1`–`n6` | `data-a63-surface` | Neutral surface palette. |\n| Surface tint | `0%`–`100%` | `--a63-surface-tint` | Continuous brand bend on semantic surfaces. |\n| Type scale | `compact` · `normal` · `comfortable` · `large` | `data-a63-type-scale` | Global typographic scale. |\n| Radius | `none` · `subtle` · `default` · `round` | `data-a63-radius` | Corner multiplier across the radius ramp. |\n| Font | `sans` · `serif` · `mono` · `pixel` | `data-a63-font` | Active type personality. |\n| Input | `touch` · `pointer` · `keyboard` | `data-a63-input` | Hit target ergonomics. |\n| Density | `compact` · `comfortable` | `data-a63-density` | Spacing rhythm and proportional control sizing. |\n| OS | `macos` · `windows` | `data-a63-os` | Shell chrome and platform framing. |\n| Icon theme | `realistic` · `color` · `neutral` · `primary` | `data-a63-icon-theme` | Icon rendering style (React-consumed). |\n\n`UIProvider` stamps design language, mode, theme, brand, input, density, and surface when those props are supplied. `applyPersonalization` / `PersonalizationController` stamps mode, theme, brand, surface, tint, type scale, radius, font, OS, and icon theme. Together they cover every live axis; neither stamper resets dimensions it does not own. The contract is attributes (or one scalar) in, tokens out.\n\nRuntime availability and implementation completeness answer different questions: an axis can be stampable while one of its owned token groups is still expanding. The live registry in `packages/ui-foundation/src/axes.ts` is the source of truth for that implementation metadata; public documentation describes the stable contract rather than duplicating the internal backlog.\n\n## Density\n\nDensity sets one number, the space unit (`--a63-space-unit`): 4px when comfortable, 3.5px when compact. The space steps, gaps, paddings, row padding and control heights are all built on it, so compact scales them once, by 0.875: a 32px control becomes 28px and a 16px gap 14px. Control heights and row padding round to whole pixels, so a 36px control becomes 32px rather than 31.5px. Text keeps its size; the type scale axis owns that.\n\nIt works the same on `<html>` and on a nested scope. Every token built on the unit is declared again on `[data-a63-density]`, so `<UIProvider density=\"compact\">` around one region recomputes them there, and a design-language or phone scope keeps its own height ramp at the compact unit.\n\nDensity is also a product choice, not only a user preference. Use compact for dense product screens, where rows of data are scanned and acted on: tables, inboxes, issue trackers, admin dashboards and file lists.\n\n```tsx\nimport { UIProvider } from '@atom63/ui-react'\n\n<UIProvider density=\"compact\">\n {/* the table, inbox or list */}\n</UIProvider>\n```\n\nFor a whole app, set `data-a63-density=\"compact\"` on `<html>`. `atom63 build` suggests it for these screens.\n\n## One semantic layer\n\nThe rule is deliberately small:\n\n> Axes set attributes. The cascade resolves `--a63-*`. Components read `--a63-*`.\n\nThat means no component writes `--primary`, `--background`, or raw `--surface-*` values inline to express personalization. Those names are either compatibility aliases or palette primitives; writing them directly freezes a value at the wrong layer.\n\n## Why surface tint is continuous\n\nBrand and surface are separate axes because color personality has two jobs: accent and neutrality. `data-a63-brand` chooses the accent ramp. `data-a63-surface` chooses the neutral family. `--a63-surface-tint` bends the semantic surfaces toward the brand hue without generating a bespoke palette for every tint value.\n\nThe implementation mixes a small set of semantic surface and border roles rather than every raw ramp stop. That is the practical tradeoff: fewer computed colors, more predictable UI, and enough expressiveness for product-level personalization.\n\n## OS is not a theme\n\nTheme is material character. OS is platform structure. I split them because \"Windows\" should not imply one permanent visual skin, and \"Terminal\" should not dictate where caption controls live.\n\nThis lets OS63 compose coordinates such as `theme=terminal` with `os=macos`, or `theme=aqua` with `os=windows`, without inventing new theme names.\n\nRadius, type scale, and font are also **not** theme — they are independent appearance axes so you can keep Aqua material while sharpening corners or enlarging type.\n\n## What this enables\n\n- A subtree can override one axis without resetting the others.\n- Theme work can happen in CSS without React conditionals.\n- Agents can reason from the axis table instead of guessing local conventions.\n- Public docs can explain the architecture at the same level the code enforces it.",
14560
+ "markdown": "# Personalization\n\nPersonalization is not a theme picker bolted onto the UI. It is the shape of the foundation: independent axes stamped as `data-a63-*` attributes (plus one scalar tint token), resolving through one semantic `--a63-*` layer.\n\n## Axes, not presets\n\nPresets demo well and compose badly. The moment someone wants Aqua material with a different neutral family and sharper radius, a preset model becomes a matrix of one-offs.\n\nATOM63 uses axes instead. Each axis owns a distinct slice of the system. CSS-backed component recipes inherit the resolved tokens instead of branching on axis values; `iconTheme` is the explicit React-consumed exception.\n\nThe live registry lives in `@atom63/ui-foundation` → `personalizationAxes`. The table below mirrors it:\n\n| Axis | Values | Applied as | Owns |\n|------|--------|------------|------|\n| Design language | `web` · `ios` | `data-a63-design-language` | Control proportions and interaction feedback. |\n| Mode | `light` · `dark` · `system` | `.light` / `.dark` + `data-a63-mode` | Light/dark semantic color resolution. |\n| Theme | `modern` · `aqua` · `retro` · `terminal` | `data-a63-theme` | Material values: gloss, shadow, bevel, texture, blur. |\n| Brand | `auto` · `b1`–`b6` | `data-a63-brand` | Primary tonal ramp and focus color. |\n| Surface | `n1`–`n6` | `data-a63-surface` | Neutral surface palette. |\n| Surface tint | `0%`–`100%` | `--a63-surface-tint` | Continuous brand bend on semantic surfaces. |\n| Type scale | `compact` · `normal` · `comfortable` · `large` | `data-a63-type-scale` | Global typographic scale. |\n| Radius | `none` · `subtle` · `default` · `round` | `data-a63-radius` | Corner multiplier across the radius ramp. |\n| Font | `sans` · `serif` · `mono` · `pixel` | `data-a63-font` | Active type personality. |\n| Input | `touch` · `pointer` · `keyboard` | `data-a63-input` | Hit target ergonomics. |\n| Density | `compact` · `comfortable` | `data-a63-density` | Spacing rhythm and proportional control sizing. |\n| OS | `macos` · `windows` | `data-a63-os` | Shell chrome and platform framing. |\n| Icon theme | `realistic` · `color` · `neutral` · `primary` | `data-a63-icon-theme` | Icon rendering style (React-consumed). |\n\n`UIProvider` stamps design language, mode, theme, brand, input, density, and surface when those props are supplied. `applyPersonalization` / `PersonalizationController` stamps mode, theme, brand, surface, tint, type scale, radius, font, OS, and icon theme. Together they cover every live axis; neither stamper resets dimensions it does not own. The contract is attributes (or one scalar) in, tokens out.\n\nRuntime availability and implementation completeness answer different questions: an axis can be stampable while one of its owned token groups is still expanding. The live registry in `packages/ui-foundation/src/axes.ts` is the source of truth for that implementation metadata; public documentation describes the stable contract rather than duplicating the internal backlog.\n\n## Density\n\nDensity sets one number, the space unit (`--a63-space-unit`): 4px when comfortable, 3.5px when compact. The space steps, gaps, paddings, row padding and control heights are all built on it, so compact scales them once, by 0.875: a 32px control becomes 28px and a 16px gap 14px. Control heights and row padding round to whole pixels, so a 36px control becomes 32px rather than 31.5px. Text keeps its size; the type scale axis owns that.\n\nIt works the same on `<html>` and on a nested scope. Every token built on the unit is declared again on `[data-a63-density]`, so `<UIProvider density=\"compact\">` around one region recomputes them there, and a design-language or phone scope keeps its own height ramp at the compact unit.\n\nDensity is also a product choice, not only a user preference. Use compact for dense product screens, where rows of data are scanned and acted on: tables, inboxes, issue trackers, admin dashboards and file lists.\n\n```tsx\nimport { UIProvider } from '@atom63/ui-react'\n\n<UIProvider density=\"compact\">\n {/* the table, inbox or list */}\n</UIProvider>\n```\n\nFor a whole app, set `data-a63-density=\"compact\"` on `<html>`. `atom63 build` suggests it for these screens.\n\n## One semantic layer\n\nThe rule is deliberately small:\n\n> Axes set attributes. The cascade resolves `--a63-*`. Components read `--a63-*`.\n\nThat means no component writes `--primary`, `--background`, or raw `--surface-*` values inline to express personalization. Those names are either compatibility aliases or palette primitives; writing them directly freezes a value at the wrong layer.\n\n## Why surface tint is continuous\n\nBrand and surface are separate axes because color personality has two jobs: accent and neutrality. `data-a63-brand` chooses the accent ramp. `data-a63-surface` chooses the neutral family. `--a63-surface-tint` bends the semantic surfaces toward the brand hue without generating a bespoke palette for every tint value.\n\nThe implementation mixes a small set of semantic surface and border roles rather than every raw ramp stop. That is the practical tradeoff: fewer computed colors, more predictable UI, and enough expressiveness for product-level personalization.\n\n## Plate scopes: a palette from a picture\n\nAn art landing page or a portfolio project takes its palette from its main picture, the plate. `pnpm plate:palette <image> --id <plate-id> --out <file.css>` reads the plate in headless Chromium, picks three roles (the page tone from the calm area where the headline sits, `--safe-area top` by default; the deep ink on the far side of it; the most chromatic cluster as the accent), checks WCAG AA, and writes one stylesheet for `[data-a63-plate='<plate-id>']`. It moves the ink and the secondary text along lightness until they pass, and refuses, writing nothing, when the primary action on the page tone or the text on that action fails.\n\n```html\n<link rel=\"stylesheet\" href=\"/plates/plate-01.css\" />\n<main data-a63-plate=\"plate-01\" data-a63-brand=\"auto\">\n …\n <section data-a63-mode=\"dark\">the dark band: page tone and ink swap</section>\n</main>\n```\n\nThe stylesheet stays inside the semantic layer. It writes the accent's ramp to `--color-auto-50…950`, which `data-a63-brand=\"auto\"` maps onto the brand ramp, so the primary action and every role derived from the ramp recompute on the scope like any nested `[data-a63-brand]`. It overrides only `--a63-surface-page`, `--a63-text-primary` and `--a63-text-secondary`, keyed to the `--a63-if-light` / `--a63-if-dark` switch of the nearest mode scope, so a nested `[data-a63-mode=\"dark\"]` section takes the ink as its surface and the page tone as its text. Everything else (panels, borders, status colours) stays on the theme's neutrals. Set the mode the script suggests on the scope or an ancestor. A plate with no chromatic cluster keeps the theme brand; drop `data-a63-brand=\"auto\"` then.\n\n## OS is not a theme\n\nTheme is material character. OS is platform structure. I split them because \"Windows\" should not imply one permanent visual skin, and \"Terminal\" should not dictate where caption controls live.\n\nThis lets OS63 compose coordinates such as `theme=terminal` with `os=macos`, or `theme=aqua` with `os=windows`, without inventing new theme names.\n\nRadius, type scale, and font are also **not** theme — they are independent appearance axes so you can keep Aqua material while sharpening corners or enlarging type.\n\n## What this enables\n\n- A subtree can override one axis without resetting the others.\n- Theme work can happen in CSS without React conditionals.\n- Agents can reason from the axis table instead of guessing local conventions.\n- Public docs can explain the architecture at the same level the code enforces it.",
14195
14561
  "route": "/foundations/foundation-personalization",
14196
14562
  "slug": "foundation-personalization"
14197
14563
  },
@@ -14212,7 +14578,7 @@
14212
14578
  {
14213
14579
  "area": "foundations",
14214
14580
  "label": "Typography",
14215
- "markdown": "# Typography\n\nThe type system targets dense information interfaces rather than marketing pages. Body text starts at 15px—between compact 14px UI conventions and the browser's 16px default—to balance information density with sustained reading.\n\n## Design intent\n\nI wanted a scale that serves three very different surfaces from the same tokens: portfolio pages with expressive display type, documentation with dense readable prose, and app panels with compact controls. The solution is one responsive scale plus an independent `--typography-scale` multiplier that any subtree can adjust.\n\nThe shipped scale is deliberately not fluid. It uses viewport breakpoints for pages and `data-window-size` overrides for OS windows, so a constrained window can use its own size band even on a wide viewport. The separate `data-a63-type-scale` axis adjusts the whole ramp for user preference.\n\n## Font families\n\n| CSS variable | Tailwind | Stack |\n|--------------|----------|-------|\n| `--font-family-sans` | `font-sans` | Geist, system UI |\n| `--font-family-serif` | `font-serif` | Brawler, Georgia |\n| `--font-family-mono` | `font-mono` | Geist Mono, monospace |\n\nI chose Geist because it's optimized for interfaces — generous x-height, clear at small sizes, and a mono companion that shares the same metrics. Brawler is reserved for rare editorial moments in the portfolio; the system defaults to sans everywhere.\n\n## How the scale works\n\nSixteen steps from `2xs` (11px) to `11xl` (56px). Up to `9xl` (39px at mobile, 49px at `768px+`) the scale grows at `640px` and `768px`, and `[data-window-size='xs'|'sm'|'md'|'lg'|'xl']` applies the same bands inside OS windows; the two display steps, `10xl` (40px) and `11xl` (56px), stay the same at every width.\n\n## Mental model\n\nTypography has three separate jobs:\n\n| Job | What it controls | Examples |\n|-----|------------------|----------|\n| Reading | Long-form comfort | Prose, docs, descriptions |\n| Hierarchy | Relative importance | Page titles, section headers, labels |\n| Density | How much interface fits | Sidebars, tables, controls, OS windows |\n\nDo not solve all three with one heading scale. A docs page, a compact sidebar, and a portfolio hero need different hierarchy even when they share the same tokens.\n\n### Line-height strategy\n\nBody text (`xs` through `lg`) uses a ~1.5× ratio for comfortable reading. Display sizes (`xl` and above) compress to ~1.25× — tighter line-height at large sizes prevents headings from floating away from their content.\n\n### The scale multiplier\n\n`--typography-scale` defaults to `1`. The shipped `data-a63-type-scale` values map to `0.9` (`compact`), `1` (`normal`), `1.1` (`comfortable`), and `1.2` (`large`). OS window width is handled separately by `data-window-size`; the multiplier is a personalization control, not the window breakpoint mechanism.\n\n## Decisions worth knowing\n\n### 15px base, not 16px\n\nMost systems use 16px because browsers default to it. I chose 15px after testing information-dense layouts — docs tables, prop references, sidebar navigation. At 16px, content felt loose and wasted space. At 14px, extended reading got fatiguing. 15px is the sweet spot for my use cases: dense enough for tool interfaces, comfortable enough for documentation prose.\n\nText without a size class takes the body role too, not the browser's 16px. `@atom63/styles` sets `--a63-type-body-font-size` and `--a63-type-body-line-height` (15/23) on `body` and on a phone scope (17/22 there), and the `@atom63/ui-react` reset sets them on `Atom63Theme` and `UIProvider`. `html` keeps the browser size, so `1rem` stays 16px and every rem-based token is unchanged. Set a size class or a text role where text should be smaller, such as `text-sm` in a dense table.\n\n### Breakpoints over fluid\n\nFluid typography (`clamp()`) assumes the viewport is the right proxy for text size. In the OS metaphor, multiple windows have arbitrary widths on one screen. Breakpoint jumps plus `data-window-size` attributes let window content follow its container band instead of the outer viewport.\n\n### No heading-element-to-scale mapping in CSS\n\nI don't automatically map `h1` to `9xl` or `h2` to `8xl` in the base tokens. Different surfaces need different heading scales — a docs `h2` should be smaller than a portfolio `h2`. The MDX variants handle heading sizing per context, and the raw scale stays available for explicit use via `text-*` utilities.\n\n### Visual hierarchy and semantics are separate\n\nA semantic `h2` does not always need to look like the second-largest text on the page. The `SectionHeader` pattern follows this rule: `variant` controls visual scale, while `level` can control document outline. That keeps accessibility and visual rhythm from fighting each other.\n\n## Text roles\n\nText roles name what text is for, after the Apple HIG text styles, so one intent works on every platform. Each role picks a step of the scale on the web and a `Font.TextStyle` (with Dynamic Type) on iOS. The source is `packages/styles/src/tokens/type-roles.resolver.json`; each role has `--a63-type-<role>-font-size`, `-line-height`, `-font-weight` and `-font-weight-strong`, and the Tailwind utilities `text-<role>` and `text-<role>-strong` set all three at once.\n\n| Role | Web step | iOS text style |\n|------|----------|----------------|\n| `display-large` | `11xl`, weight 600 | 56pt, scaled like `largeTitle` |\n| `display` | `10xl`, weight 600 | 40pt, scaled like `largeTitle` |\n| `large-title` | `6xl` | `largeTitle` |\n| `title-1` | `5xl` | `title` |\n| `title-2` | `3xl` | `title2` |\n| `title-3` | `2xl` | `title3` |\n| `headline` | `base`, weight 600 | `headline` |\n| `body` | `base` | `body` |\n| `callout` | `base` | `callout` |\n| `subhead` | `sm` | `subheadline` |\n| `footnote` | `xs` | `footnote` |\n| `caption-1` | `xs` | `caption` |\n| `caption-2` | `2xs` | `caption2` |\n\n`-strong` is the emphasized weight: bold for the display roles, `large-title`, `title-1` and `title-2`, semibold for the rest. The display roles are for balances, prices and hero headlines; iOS has no larger text style, so `AtomDisplayRole` draws them at the web size and scales it with Dynamic Type like `largeTitle`. For an amount such as `$13.25`, use `Amount` from `@atom63/ui-react` (`<Amount value={13.25} currency=\"USD\" />`, `size=\"lg\"` for `display-large`): it formats the value for the locale with `Intl.NumberFormat`, draws the fraction at half size and raised with tabular figures, and reads as one label. `fraction=\"baseline\"` keeps the half-size fraction on the baseline of the integer digits instead, as some banking apps draw a balance; `raised` is the default. Without the component, put the whole number in one `text-display tabular-nums` span and wrap the fraction in `amount-fraction`, which sets it at half size and raises it, or in `amount-fraction-baseline`, which sets it at half size on the baseline. On iOS, `AtomAmountText(13.25, currencyCode: \"USD\", role: .display)` formats the amount for the locale, draws the fraction the same way with monospaced digits and reads as one VoiceOver label, and `fraction: .baseline` keeps it on the baseline; `.atomDisplayFont()` sets a display role on any other text. Web sizes follow web conventions (body is 15px; iOS body is 17pt); the role is what stays the same. Size steps are fine while exploring; settled UI should use roles.\n\n## Phone screens\n\nThe web scale is set for pages and desktop apps: body is 15px and compact control labels are 12–13px. A phone app screen reads at the iOS sizes instead, so `[data-a63-form-factor=\"phone\"]` gives a subtree the type steps and control sizing of a phone. `AppView layout=\"phone\"` (from `@atom63/ui-react/layout`) stamps it on the screen; stamp it yourself on the root of a phone-only web app. Viewport width does not apply it, so a docs page or a marketing page on a phone keeps the web sizes.\n\n| Role | Web, under 640px | Phone (`data-a63-form-factor=\"phone\"`) | iOS text style |\n|------|------------------|-----------------------------------------|----------------|\n| `body`, `headline`, `callout` | 15px | 17px | `body` 17pt |\n| `subhead` | 13px | 15px | `subheadline` 15pt |\n| `footnote`, `caption-1` | 12px | 13px | `footnote` 13pt |\n| `caption-2` | 11px | 11px | `caption2` 11pt |\n| `title-3` | 19px | 20px | `title3` 20pt |\n| `title-2` | 21px | 22px | `title2` 22pt |\n| `title-1` | 26px | 28px | `title` 28pt |\n| `large-title` | 28px | 34px | `largeTitle` 34pt |\n| `display`, `display-large` | 40px, 56px | 40px, 56px | `AtomDisplayRole` |\n\nThe scope sets the steps themselves (`text-sm` is 15px and `text-base` 17px inside it), redeclares the text roles, and sizes controls the iOS way: heights of 36, 40, 44, 48 and 52px, and every standard control label (buttons, rows, fields, menus) at body size, with `xs` at footnote size for badges, shortcuts and initials. A Switch takes the iOS 26 shape: a pill knob 1.6 times as wide as it is tall (`--a63-switch-thumb-aspect`) on a track of about 63 by 28px. A grouped list (`ItemGroup variant=\"inset\"`) takes the iOS 26 Settings rows: its default and `sm` rows, static or interactive, are at least 52px tall (`--a63-inset-row-min-size`), so a 17px label sits in about 15px of space above and below, and the card has the `2xl` corner, 18px at defaults (`--a63-inset-group-radius`). Outside the phone scope neither variable is declared, and the group keeps its control-height rows and `--radius-lg` corner. The secondary line under a title or label (an Item, Field or Form description, a Frame or ConnectedPanel description) reads `--a63-control-font-size-secondary`, which the phone scope sets to subhead size (15px) so it stays below its 17px title; elsewhere it falls back to the control `sm` size. The type scale preference still multiplies the phone steps. Inside a phone screen, keep rows and labels on the component defaults or the text roles; shrinking them with `text-sm` or `text-xs` brings back the desktop sizes.\n\n## Usage guidance\n\n| Surface | Typical range | Scale multiplier |\n|---------|---------------|------------------|\n| Portfolio hero | `4xl`–`9xl` | Usually `normal`; user preference still applies |\n| Documentation prose | `sm`–`xl` | `1` |\n| App panels / OS windows | `xs`–`lg` | Window-size band + active type-scale axis |\n| Code blocks | `sm` mono | `1` |\n\n## Anti-patterns\n\n```tsx\n// Avoid: viewport-sized type inside a constrained panel.\n<aside className=\"w-80\">\n <h2 className=\"text-5xl\">Settings</h2>\n</aside>\n```\n\nThe panel is narrow even if the viewport is wide. The text should respond to the container's role, not the browser width.\n\n```tsx\n// Prefer: choose a scale for the surface.\n<aside className=\"w-80\">\n <h2 className=\"text-lg font-semibold\">Settings</h2>\n</aside>\n```\n\n## Review checklist\n\nWhen reviewing typography, ask:\n\n1. Is this text sized for its container, not only the viewport?\n2. Does the hierarchy still work if the content wraps?\n3. Is the line-height comfortable for the amount of reading?\n4. Are semantic heading levels valid independent of visual size?\n5. Is display type reserved for display moments?",
14581
+ "markdown": "# Typography\n\nThe type system targets dense information interfaces rather than marketing pages. Body text starts at 15px—between compact 14px UI conventions and the browser's 16px default—to balance information density with sustained reading.\n\n## Design intent\n\nI wanted a scale that serves three very different surfaces from the same tokens: portfolio pages with expressive display type, documentation with dense readable prose, and app panels with compact controls. The solution is one responsive scale plus an independent `--typography-scale` multiplier that any subtree can adjust.\n\nThe shipped scale is deliberately not fluid. It uses viewport breakpoints for pages and `data-window-size` overrides for OS windows, so a constrained window can use its own size band even on a wide viewport. The separate `data-a63-type-scale` axis adjusts the whole ramp for user preference.\n\n## Font families\n\n| CSS variable | Tailwind | Stack |\n|--------------|----------|-------|\n| `--font-family-sans` | `font-sans` | Geist, system UI |\n| `--font-family-serif` | `font-serif` | Brawler, Georgia |\n| `--font-family-mono` | `font-mono` | Geist Mono, monospace |\n\nI chose Geist because it's optimized for interfaces — generous x-height, clear at small sizes, and a mono companion that shares the same metrics. Brawler is reserved for rare editorial moments in the portfolio; the system defaults to sans everywhere.\n\n## How the scale works\n\nSixteen steps from `2xs` (11px) to `11xl` (56px). Up to `9xl` (39px at mobile, 49px at `768px+`) the scale grows at `640px` and `768px`, and `[data-window-size='xs'|'sm'|'md'|'lg'|'xl']` applies the same bands inside OS windows; the two display steps, `10xl` (40px) and `11xl` (56px), stay the same at every width.\n\n## Mental model\n\nTypography has three separate jobs:\n\n| Job | What it controls | Examples |\n|-----|------------------|----------|\n| Reading | Long-form comfort | Prose, docs, descriptions |\n| Hierarchy | Relative importance | Page titles, section headers, labels |\n| Density | How much interface fits | Sidebars, tables, controls, OS windows |\n\nDo not solve all three with one heading scale. A docs page, a compact sidebar, and a portfolio hero need different hierarchy even when they share the same tokens.\n\n### Line-height strategy\n\nBody text (`xs` through `lg`) uses a ~1.5× ratio for comfortable reading. Display sizes (`xl` and above) compress to ~1.25× — tighter line-height at large sizes prevents headings from floating away from their content.\n\n### The scale multiplier\n\n`--typography-scale` defaults to `1`. The shipped `data-a63-type-scale` values map to `0.9` (`compact`), `1` (`normal`), `1.1` (`comfortable`), and `1.2` (`large`). OS window width is handled separately by `data-window-size`; the multiplier is a personalization control, not the window breakpoint mechanism.\n\n## Decisions worth knowing\n\n### 15px base, not 16px\n\nMost systems use 16px because browsers default to it. I chose 15px after testing information-dense layouts — docs tables, prop references, sidebar navigation. At 16px, content felt loose and wasted space. At 14px, extended reading got fatiguing. 15px is the sweet spot for my use cases: dense enough for tool interfaces, comfortable enough for documentation prose.\n\nText without a size class takes the body role too, not the browser's 16px. `@atom63/styles` sets `--a63-type-body-font-size` and `--a63-type-body-line-height` (15/23) on `body` and on a phone scope (17/22 there), and the `@atom63/ui-react` reset sets them on `Atom63Theme` and `UIProvider`. `html` keeps the browser size, so `1rem` stays 16px and every rem-based token is unchanged. Set a size class or a text role where text should be smaller, such as `text-sm` in a dense table.\n\n### Breakpoints over fluid\n\nFluid typography (`clamp()`) assumes the viewport is the right proxy for text size. In the OS metaphor, multiple windows have arbitrary widths on one screen. Breakpoint jumps plus `data-window-size` attributes let window content follow its container band instead of the outer viewport.\n\n### No heading-element-to-scale mapping in CSS\n\nI don't automatically map `h1` to `9xl` or `h2` to `8xl` in the base tokens. Different surfaces need different heading scales — a docs `h2` should be smaller than a portfolio `h2`. The MDX variants handle heading sizing per context, and the raw scale stays available for explicit use via `text-*` utilities.\n\n### Visual hierarchy and semantics are separate\n\nA semantic `h2` does not always need to look like the second-largest text on the page. The `SectionHeader` pattern follows this rule: `variant` controls visual scale, while `level` can control document outline. That keeps accessibility and visual rhythm from fighting each other.\n\n## Text roles\n\nText roles name what text is for, after the Apple HIG text styles, so one intent works on every platform. Each role picks a step of the scale on the web and a `Font.TextStyle` (with Dynamic Type) on iOS. The source is `packages/styles/src/tokens/type-roles.resolver.json`; each role has `--a63-type-<role>-font-size`, `-line-height`, `-font-weight` and `-font-weight-strong`, and the Tailwind utilities `text-<role>` and `text-<role>-strong` set all three at once.\n\n| Role | Web step | iOS text style |\n|------|----------|----------------|\n| `display-hero` | fluid, `10xl` (40px) to 72px, weight 600 | none (web only; iOS uses `display-large`) |\n| `display-large` | `11xl`, weight 600 | 56pt, scaled like `largeTitle` |\n| `display` | `10xl`, weight 600 | 40pt, scaled like `largeTitle` |\n| `large-title` | `6xl` | `largeTitle` |\n| `title-1` | `5xl` | `title` |\n| `title-2` | `3xl` | `title2` |\n| `title-3` | `2xl` | `title3` |\n| `headline` | `base`, weight 600 | `headline` |\n| `body` | `base` | `body` |\n| `callout` | `base` | `callout` |\n| `subhead` | `sm` | `subheadline` |\n| `footnote` | `xs` | `footnote` |\n| `caption-1` | `xs` | `caption` |\n| `caption-2` | `2xs` | `caption2` |\n\n`-strong` is the emphasized weight: bold for the display roles, `large-title`, `title-1` and `title-2`, semibold for the rest. The display roles are for balances, prices and hero headlines; iOS has no larger text style, so `AtomDisplayRole` draws them at the web size and scales it with Dynamic Type like `largeTitle`. For an amount such as `$13.25`, use `Amount` from `@atom63/ui-react` (`<Amount value={13.25} currency=\"USD\" />`, `size=\"lg\"` for `display-large`): it formats the value for the locale with `Intl.NumberFormat`, draws the fraction at half size and raised with tabular figures, and reads as one label. `fraction=\"baseline\"` keeps the half-size fraction on the baseline of the integer digits instead, as some banking apps draw a balance; `raised` is the default. Without the component, put the whole number in one `text-display tabular-nums` span and wrap the fraction in `amount-fraction`, which sets it at half size and raises it, or in `amount-fraction-baseline`, which sets it at half size on the baseline. On iOS, `AtomAmountText(13.25, currencyCode: \"USD\", role: .display)` formats the amount for the locale, draws the fraction the same way with monospaced digits and reads as one VoiceOver label, and `fraction: .baseline` keeps it on the baseline; `.atomDisplayFont()` sets a display role on any other text. Web sizes follow web conventions (body is 15px; iOS body is 17pt); the role is what stays the same. Size steps are fine while exploring; settled UI should use roles.\n\n`display-hero` is for one marketing headline per page, such as a landing hero over an `ArtPlate`. It grows with the viewport from the `10xl` step on phones to 72px on wide screens (`clamp()`), with a line height of 1.05 times its size. The three display roles also carry `--a63-type-<role>-letter-spacing` (−0.03em for `display`, −0.04em for `display-large`, −0.045em for `display-hero`); set it with `letter-spacing` where the role is used, since the `text-<role>` utilities do not include it. Headlines take their face from `--a63-font-display`, which defaults to `--a63-font-app`; set it to `var(--font-family-serif)` on a page or a section for serif headlines over sans UI, and loosen the tracking towards −0.025em for the serif.\n\n## Phone screens\n\nThe web scale is set for pages and desktop apps: body is 15px and compact control labels are 12–13px. A phone app screen reads at the iOS sizes instead, so `[data-a63-form-factor=\"phone\"]` gives a subtree the type steps and control sizing of a phone. `AppView layout=\"phone\"` (from `@atom63/ui-react/layout`) stamps it on the screen; stamp it yourself on the root of a phone-only web app. Viewport width does not apply it, so a docs page or a marketing page on a phone keeps the web sizes.\n\n| Role | Web, under 640px | Phone (`data-a63-form-factor=\"phone\"`) | iOS text style |\n|------|------------------|-----------------------------------------|----------------|\n| `body`, `headline`, `callout` | 15px | 17px | `body` 17pt |\n| `subhead` | 13px | 15px | `subheadline` 15pt |\n| `footnote`, `caption-1` | 12px | 13px | `footnote` 13pt |\n| `caption-2` | 11px | 11px | `caption2` 11pt |\n| `title-3` | 19px | 20px | `title3` 20pt |\n| `title-2` | 21px | 22px | `title2` 22pt |\n| `title-1` | 26px | 28px | `title` 28pt |\n| `large-title` | 28px | 34px | `largeTitle` 34pt |\n| `display`, `display-large` | 40px, 56px | 40px, 56px | `AtomDisplayRole` |\n\nThe scope sets the steps themselves (`text-sm` is 15px and `text-base` 17px inside it), redeclares the text roles, and sizes controls the iOS way: heights of 36, 40, 44, 48 and 52px, and every standard control label (buttons, rows, fields, menus) at body size, with `xs` at footnote size for badges, shortcuts and initials. A Switch takes the iOS 26 shape: a pill knob 1.6 times as wide as it is tall (`--a63-switch-thumb-aspect`) on a track of about 63 by 28px. A grouped list (`ItemGroup variant=\"inset\"`) takes the iOS 26 Settings rows: its default and `sm` rows, static or interactive, are at least 52px tall (`--a63-inset-row-min-size`), so a 17px label sits in about 15px of space above and below, and the card has the `2xl` corner, 18px at defaults (`--a63-inset-group-radius`). Outside the phone scope neither variable is declared, and the group keeps its control-height rows and `--radius-lg` corner. The secondary line under a title or label (an Item, Field or Form description, a Frame or ConnectedPanel description) reads `--a63-control-font-size-secondary`, which the phone scope sets to subhead size (15px) so it stays below its 17px title; elsewhere it falls back to the control `sm` size. The type scale preference still multiplies the phone steps. Inside a phone screen, keep rows and labels on the component defaults or the text roles; shrinking them with `text-sm` or `text-xs` brings back the desktop sizes.\n\n## Usage guidance\n\n| Surface | Typical range | Scale multiplier |\n|---------|---------------|------------------|\n| Portfolio hero | `4xl`–`9xl` | Usually `normal`; user preference still applies |\n| Documentation prose | `sm`–`xl` | `1` |\n| App panels / OS windows | `xs`–`lg` | Window-size band + active type-scale axis |\n| Code blocks | `sm` mono | `1` |\n\n## Anti-patterns\n\n```tsx\n// Avoid: viewport-sized type inside a constrained panel.\n<aside className=\"w-80\">\n <h2 className=\"text-5xl\">Settings</h2>\n</aside>\n```\n\nThe panel is narrow even if the viewport is wide. The text should respond to the container's role, not the browser width.\n\n```tsx\n// Prefer: choose a scale for the surface.\n<aside className=\"w-80\">\n <h2 className=\"text-lg font-semibold\">Settings</h2>\n</aside>\n```\n\n## Review checklist\n\nWhen reviewing typography, ask:\n\n1. Is this text sized for its container, not only the viewport?\n2. Does the hierarchy still work if the content wraps?\n3. Is the line-height comfortable for the amount of reading?\n4. Are semantic heading levels valid independent of visual size?\n5. Is display type reserved for display moments?",
14216
14582
  "route": "/foundations/foundation-typography",
14217
14583
  "slug": "foundation-typography"
14218
14584
  },
@@ -14370,7 +14736,7 @@
14370
14736
  "files": [
14371
14737
  {
14372
14738
  "path": "pages/app-view/app-view.tsx",
14373
- "source": "import {\n Avatar,\n AvatarFallback,\n Button,\n Item,\n ItemContent,\n ItemDescription,\n ItemGroup,\n ItemTitle,\n SearchField,\n Slider,\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n Toggle,\n} from '@atom63/ui-react'\nimport { AppView } from '@atom63/ui-react/layout'\nimport {\n Bell,\n House,\n Library,\n ListMusic,\n Pause,\n Play,\n Repeat,\n Search,\n Shuffle,\n SkipBack,\n SkipForward,\n Volume2,\n} from 'lucide-react'\nimport { useState } from 'react'\n\nimport { TabBar } from '../../blocks/tab-bar/tab-bar'\n\nexport const template = {\n id: 'app-view',\n kind: 'page',\n title: 'App view',\n description:\n 'A full-window product view with no site header or footer, built on the AppView frame from @atom63/ui-react/layout: a top bar across the window, a side panel and the main region below it, and an optional bar docked at the bottom, such as a media player or a status bar. chrome=\"flush\" runs the columns to the window edges, split by borders, instead of rounded cards. layout=\"phone\" makes it a phone app screen: edge to edge, the top bar optional, safe-area aware, phone-sized type and controls (body 17px, 44px controls), and the tab-bar block docked at the bottom. overlay floats content over the main region, such as a scroll-to-bottom button. For a dense product view (a table, an inbox, an issue tracker, an admin dashboard, a file list), wrap it in <UIProvider density=\"compact\">. Import AppView; copy only the sample pages to adapt them.',\n category: 'layout',\n tags: [\n 'app',\n 'full window',\n 'workspace',\n 'library',\n 'player',\n 'media',\n 'docked bar',\n 'side panel',\n 'top bar',\n 'layout',\n 'phone',\n 'mobile',\n 'phone app',\n 'edge to edge',\n 'tab bar',\n 'bottom navigation',\n 'safe area',\n ],\n readiness: 'draft',\n} as const\n\nconst library = [\n { current: false, kind: 'Playlist', title: 'Morning rotation' },\n { current: true, kind: 'Album', title: 'Quiet hours' },\n { current: false, kind: 'Playlist', title: 'Late drive' },\n { current: false, kind: 'Artist', title: 'Mara Vale' },\n { current: false, kind: 'Album', title: 'Paper lanterns' },\n]\n\nconst tracks = [\n { length: '3:12', title: 'First light' },\n { length: '2:48', title: 'Low tide' },\n { length: '4:05', title: 'Window seat' },\n { length: '3:31', title: 'Long way home' },\n { length: '2:57', title: 'Afterglow' },\n]\n\n/* A sample app view: a music library with a docked player. */\nexport function AppViewPage() {\n const [query, setQuery] = useState('')\n const [playing, setPlaying] = useState(false)\n const [position, setPosition] = useState(35)\n const [volume, setVolume] = useState(70)\n\n return (\n <AppView\n bottomBar={\n <>\n <div className=\"hidden min-w-0 flex-1 sm:block\">\n <p className=\"truncate text-sm font-medium\">First light</p>\n <p className=\"text-muted-foreground truncate text-xs\">Mara Vale</p>\n </div>\n <div className=\"flex flex-[2] flex-col items-center gap-1\">\n <div className=\"flex items-center gap-1\">\n <Toggle aria-label=\"Shuffle\" size=\"sm\">\n <Shuffle aria-hidden />\n </Toggle>\n <Button aria-label=\"Previous track\" size=\"icon-sm\" variant=\"ghost\">\n <SkipBack aria-hidden />\n </Button>\n <Button\n aria-label={playing ? 'Pause' : 'Play'}\n onClick={() => setPlaying(!playing)}\n size=\"icon\"\n variant=\"primary\"\n >\n {playing ? <Pause aria-hidden /> : <Play aria-hidden />}\n </Button>\n <Button aria-label=\"Next track\" size=\"icon-sm\" variant=\"ghost\">\n <SkipForward aria-hidden />\n </Button>\n <Toggle aria-label=\"Repeat\" size=\"sm\">\n <Repeat aria-hidden />\n </Toggle>\n </div>\n <Slider\n aria-label=\"Position\"\n className=\"w-full max-w-md\"\n max={100}\n min={0}\n onValueChange={value => setPosition(Number(value))}\n value={position}\n />\n </div>\n <div className=\"hidden flex-1 items-center justify-end gap-2 md:flex\">\n <Volume2 aria-hidden className=\"text-muted-foreground size-4\" />\n <Slider\n aria-label=\"Volume\"\n className=\"w-28\"\n max={100}\n min={0}\n onValueChange={value => setVolume(Number(value))}\n value={volume}\n />\n </div>\n </>\n }\n panel={\n <>\n <h2 className=\"flex items-center gap-2 px-2 py-1 text-sm font-semibold\">\n <ListMusic aria-hidden className=\"size-4\" />\n Your library\n </h2>\n <ItemGroup>\n {library.map(entry => (\n <Item\n key={entry.title}\n render={\n <a aria-current={entry.current ? 'page' : undefined} href={`#${entry.title}`}>\n <ItemContent>\n <ItemTitle>{entry.title}</ItemTitle>\n <ItemDescription>{entry.kind}</ItemDescription>\n </ItemContent>\n </a>\n }\n size=\"xs\"\n />\n ))}\n </ItemGroup>\n </>\n }\n tabBar={\n <TabBar\n items={[\n { href: '#home', icon: <House aria-hidden />, label: 'Home' },\n { href: '#search', icon: <Search aria-hidden />, label: 'Search' },\n { current: true, href: '#library', icon: <Library aria-hidden />, label: 'Library' },\n ]}\n />\n }\n topBar={\n <>\n <Button aria-label=\"Home\" size=\"icon\" variant=\"ghost\">\n <House aria-hidden />\n </Button>\n <form\n className=\"max-w-md flex-1\"\n onSubmit={event => event.preventDefault()}\n role=\"search\"\n >\n <SearchField\n aria-label=\"Search the library\"\n onValueChange={setQuery}\n placeholder=\"What do you want to play?\"\n value={query}\n />\n </form>\n <div className=\"ms-auto flex items-center gap-2\">\n <Button aria-label=\"Notifications\" size=\"icon\" variant=\"ghost\">\n <Bell aria-hidden />\n </Button>\n <Avatar>\n <AvatarFallback>JL</AvatarFallback>\n </Avatar>\n </div>\n </>\n }\n >\n <div className=\"flex flex-col gap-6 p-6\">\n <div>\n <p className=\"text-muted-foreground text-sm\">Album · 2024 · 5 songs</p>\n <h1 className=\"font-heading text-3xl font-semibold\">Quiet hours</h1>\n </div>\n <Table>\n <TableHeader>\n <TableRow>\n <TableHead>#</TableHead>\n <TableHead>Title</TableHead>\n <TableHead className=\"text-end\">Length</TableHead>\n </TableRow>\n </TableHeader>\n <TableBody>\n {tracks.map((track, index) => (\n <TableRow key={track.title}>\n <TableCell className=\"text-muted-foreground\">{index + 1}</TableCell>\n <TableCell>{track.title}</TableCell>\n <TableCell className=\"text-muted-foreground text-end tabular-nums\">\n {track.length}\n </TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </div>\n </AppView>\n )\n}\n\n/*\n * The same app as a phone screen: layout=\"phone\" with no top bar, so the album\n * header reaches the top edge and pads itself for the status bar; a mini\n * player and the tab bar dock at the bottom.\n */\nexport function AppViewPhonePage() {\n const [playing, setPlaying] = useState(false)\n\n return (\n <AppView\n bottomBar={\n <>\n <div className=\"min-w-0 flex-1\">\n <p className=\"truncate text-sm font-medium\">First light</p>\n <p className=\"text-muted-foreground truncate text-xs\">Mara Vale</p>\n </div>\n <Button\n aria-label={playing ? 'Pause' : 'Play'}\n onClick={() => setPlaying(!playing)}\n size=\"icon\"\n variant=\"primary\"\n >\n {playing ? <Pause aria-hidden /> : <Play aria-hidden />}\n </Button>\n <Button aria-label=\"Next track\" size=\"icon\" variant=\"ghost\">\n <SkipForward aria-hidden />\n </Button>\n </>\n }\n layout=\"phone\"\n tabBar={\n <TabBar\n items={[\n { href: '#home', icon: <House aria-hidden />, label: 'Home' },\n { href: '#search', icon: <Search aria-hidden />, label: 'Search' },\n { current: true, href: '#library', icon: <Library aria-hidden />, label: 'Library' },\n ]}\n />\n }\n >\n <div className=\"flex flex-col gap-2 pt-[env(safe-area-inset-top)]\">\n <div className=\"px-4 pt-6\">\n <p className=\"text-muted-foreground text-sm\">Album · 2024 · 5 songs</p>\n <h1 className=\"font-heading text-3xl font-semibold\">Quiet hours</h1>\n </div>\n <ItemGroup>\n {tracks.map((track, index) => (\n <Item\n key={track.title}\n render={\n <a href={`#${track.title}`}>\n <ItemContent>\n <ItemTitle>{track.title}</ItemTitle>\n <ItemDescription>\n {index + 1} · {track.length}\n </ItemDescription>\n </ItemContent>\n </a>\n }\n size=\"sm\"\n />\n ))}\n </ItemGroup>\n </div>\n </AppView>\n )\n}\n"
14739
+ "source": "import {\n Avatar,\n AvatarFallback,\n Button,\n Item,\n ItemContent,\n ItemDescription,\n ItemGroup,\n ItemTitle,\n SearchField,\n Slider,\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n Toggle,\n} from '@atom63/ui-react'\nimport { AppView } from '@atom63/ui-react/layout'\nimport {\n Bell,\n House,\n Library,\n ListMusic,\n Pause,\n Play,\n Repeat,\n Search,\n Shuffle,\n SkipBack,\n SkipForward,\n Volume2,\n} from 'lucide-react'\nimport { useState } from 'react'\n\nimport { TabBar } from '../../blocks/tab-bar/tab-bar'\n\nexport const template = {\n id: 'app-view',\n kind: 'page',\n title: 'App view',\n description:\n 'A full-window product view with no site header or footer, built on the AppView frame from @atom63/ui-react/layout: a top bar across the window, a side panel and the main region below it, and an optional bar docked at the bottom, such as a media player or a status bar. chrome=\"flush\" runs the columns to the window edges, split by borders, instead of rounded cards. layout=\"phone\" makes it a phone app screen: edge to edge, the top bar optional, safe-area aware, phone-sized type and controls (body 17px, 44px controls), and the tab-bar block docked at the bottom. overlay floats content over the main region, such as a scroll-to-bottom button. For a dense product view (a table, an inbox, an issue tracker, an admin dashboard, a file list), wrap it in <UIProvider density=\"compact\">. Import AppView; copy only the sample pages to adapt them.',\n category: 'layout',\n tags: [\n 'app',\n 'full window',\n 'workspace',\n 'library',\n 'player',\n 'media',\n 'docked bar',\n 'side panel',\n 'top bar',\n 'layout',\n 'phone',\n 'mobile',\n 'phone app',\n 'edge to edge',\n 'tab bar',\n 'bottom navigation',\n 'safe area',\n ],\n readiness: 'draft',\n} as const\n\nconst library = [\n { current: false, kind: 'Playlist', title: 'Morning rotation' },\n { current: true, kind: 'Album', title: 'Quiet hours' },\n { current: false, kind: 'Playlist', title: 'Late drive' },\n { current: false, kind: 'Artist', title: 'Mara Vale' },\n { current: false, kind: 'Album', title: 'Paper lanterns' },\n]\n\nconst tracks = [\n { length: '3:12', title: 'First light' },\n { length: '2:48', title: 'Low tide' },\n { length: '4:05', title: 'Window seat' },\n { length: '3:31', title: 'Long way home' },\n { length: '2:57', title: 'Afterglow' },\n]\n\n/* A sample app view: a music library with a docked player. */\nexport function AppViewPage() {\n const [query, setQuery] = useState('')\n const [playing, setPlaying] = useState(false)\n const [position, setPosition] = useState(35)\n const [volume, setVolume] = useState(70)\n\n return (\n <AppView\n bottomBar={\n <>\n <div className=\"hidden min-w-0 flex-1 sm:block\">\n <p className=\"truncate text-sm font-medium\">First light</p>\n <p className=\"text-muted-foreground truncate text-xs\">Mara Vale</p>\n </div>\n <div className=\"flex flex-[2] flex-col items-center gap-1\">\n <div className=\"flex items-center gap-1\">\n <Toggle aria-label=\"Shuffle\" size=\"sm\">\n <Shuffle aria-hidden />\n </Toggle>\n <Button aria-label=\"Previous track\" size=\"icon-sm\" tone=\"muted\" variant=\"ghost\">\n <SkipBack aria-hidden />\n </Button>\n <Button\n aria-label={playing ? 'Pause' : 'Play'}\n onClick={() => setPlaying(!playing)}\n size=\"icon\"\n variant=\"primary\"\n >\n {playing ? <Pause aria-hidden /> : <Play aria-hidden />}\n </Button>\n <Button aria-label=\"Next track\" size=\"icon-sm\" tone=\"muted\" variant=\"ghost\">\n <SkipForward aria-hidden />\n </Button>\n <Toggle aria-label=\"Repeat\" size=\"sm\">\n <Repeat aria-hidden />\n </Toggle>\n </div>\n <Slider\n aria-label=\"Position\"\n className=\"w-full max-w-md\"\n max={100}\n min={0}\n onValueChange={value => setPosition(Number(value))}\n value={position}\n />\n </div>\n <div className=\"hidden flex-1 items-center justify-end gap-2 md:flex\">\n <Volume2 aria-hidden className=\"text-muted-foreground size-4\" />\n <Slider\n aria-label=\"Volume\"\n className=\"w-28\"\n max={100}\n min={0}\n onValueChange={value => setVolume(Number(value))}\n value={volume}\n />\n </div>\n </>\n }\n panel={\n <>\n <h2 className=\"flex items-center gap-2 px-2 py-1 text-sm font-semibold\">\n <ListMusic aria-hidden className=\"size-4\" />\n Your library\n </h2>\n <ItemGroup>\n {library.map(entry => (\n <Item\n key={entry.title}\n render={\n <a aria-current={entry.current ? 'page' : undefined} href={`#${entry.title}`}>\n <ItemContent>\n <ItemTitle>{entry.title}</ItemTitle>\n <ItemDescription>{entry.kind}</ItemDescription>\n </ItemContent>\n </a>\n }\n size=\"xs\"\n />\n ))}\n </ItemGroup>\n </>\n }\n tabBar={\n <TabBar\n items={[\n { href: '#home', icon: <House aria-hidden />, label: 'Home' },\n { href: '#search', icon: <Search aria-hidden />, label: 'Search' },\n { current: true, href: '#library', icon: <Library aria-hidden />, label: 'Library' },\n ]}\n />\n }\n topBar={\n <>\n <Button aria-label=\"Home\" size=\"icon\" tone=\"muted\" variant=\"ghost\">\n <House aria-hidden />\n </Button>\n <form\n className=\"max-w-md flex-1\"\n onSubmit={event => event.preventDefault()}\n role=\"search\"\n >\n <SearchField\n aria-label=\"Search the library\"\n onValueChange={setQuery}\n placeholder=\"What do you want to play?\"\n value={query}\n />\n </form>\n <div className=\"ms-auto flex items-center gap-2\">\n <Button aria-label=\"Notifications\" size=\"icon\" tone=\"muted\" variant=\"ghost\">\n <Bell aria-hidden />\n </Button>\n <Avatar>\n <AvatarFallback>JL</AvatarFallback>\n </Avatar>\n </div>\n </>\n }\n >\n <div className=\"flex flex-col gap-6 p-6\">\n <div>\n <p className=\"text-muted-foreground text-sm\">Album · 2024 · 5 songs</p>\n <h1 className=\"font-heading text-3xl font-semibold\">Quiet hours</h1>\n </div>\n <Table>\n <TableHeader>\n <TableRow>\n <TableHead>#</TableHead>\n <TableHead>Title</TableHead>\n <TableHead className=\"text-end\">Length</TableHead>\n </TableRow>\n </TableHeader>\n <TableBody>\n {tracks.map((track, index) => (\n <TableRow key={track.title}>\n <TableCell className=\"text-muted-foreground\">{index + 1}</TableCell>\n <TableCell>{track.title}</TableCell>\n <TableCell className=\"text-muted-foreground text-end tabular-nums\">\n {track.length}\n </TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </div>\n </AppView>\n )\n}\n\n/*\n * The same app as a phone screen: layout=\"phone\" with no top bar, so the album\n * header reaches the top edge and pads itself for the status bar; a mini\n * player and the tab bar dock at the bottom.\n */\nexport function AppViewPhonePage() {\n const [playing, setPlaying] = useState(false)\n\n return (\n <AppView\n bottomBar={\n <>\n <div className=\"min-w-0 flex-1\">\n <p className=\"truncate text-sm font-medium\">First light</p>\n <p className=\"text-muted-foreground truncate text-xs\">Mara Vale</p>\n </div>\n <Button\n aria-label={playing ? 'Pause' : 'Play'}\n onClick={() => setPlaying(!playing)}\n size=\"icon\"\n variant=\"default\"\n >\n {playing ? <Pause aria-hidden /> : <Play aria-hidden />}\n </Button>\n <Button aria-label=\"Next track\" size=\"icon\" tone=\"muted\" variant=\"ghost\">\n <SkipForward aria-hidden />\n </Button>\n </>\n }\n layout=\"phone\"\n tabBar={\n <TabBar\n items={[\n { href: '#home', icon: <House aria-hidden />, label: 'Home' },\n { href: '#search', icon: <Search aria-hidden />, label: 'Search' },\n { current: true, href: '#library', icon: <Library aria-hidden />, label: 'Library' },\n ]}\n />\n }\n >\n <div className=\"flex flex-col gap-2 pt-[env(safe-area-inset-top)]\">\n <div className=\"px-4 pt-6\">\n <p className=\"text-muted-foreground text-sm\">Album · 2024 · 5 songs</p>\n <h1 className=\"font-heading text-3xl font-semibold\">Quiet hours</h1>\n </div>\n <ItemGroup>\n {tracks.map((track, index) => (\n <Item\n key={track.title}\n render={\n <a href={`#${track.title}`}>\n <ItemContent>\n <ItemTitle>{track.title}</ItemTitle>\n <ItemDescription>\n {index + 1} · {track.length}\n </ItemDescription>\n </ItemContent>\n </a>\n }\n size=\"sm\"\n />\n ))}\n </ItemGroup>\n </div>\n </AppView>\n )\n}\n"
14374
14740
  }
14375
14741
  ]
14376
14742
  },
@@ -14410,7 +14776,7 @@
14410
14776
  "files": [
14411
14777
  {
14412
14778
  "path": "pages/chat-page/chat-page.tsx",
14413
- "source": "import type { ChatComposerStatus } from '@atom63/ui-foundation'\nimport {\n Button,\n Sidebar,\n SidebarContent,\n SidebarGroup,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInset,\n SidebarMenu,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarProvider,\n SidebarTrigger,\n} from '@atom63/ui-react'\nimport { SquarePen } from 'lucide-react'\nimport type { AnchorHTMLAttributes, ReactElement } from 'react'\n\nimport { type ChatPanelMessage, ChatThread } from '../../blocks/chat-panel/chat-panel'\n\nexport const template = {\n id: 'chat-page',\n kind: 'page',\n title: 'Chat page',\n description:\n 'A full-page AI assistant: past conversations in the sidebar with a new chat button, the open conversation in a 48rem reading column with replies at its full width, and the one-row composer at the bottom of the same column. With no messages it is the start screen: a large greeting, the composer and suggestion chips. Uses the chat-panel block for the conversation; wire it to @atom63/agent or any runtime through props.',\n category: 'ai',\n tags: [\n 'chat',\n 'assistant',\n 'ai',\n 'ai assistant',\n 'agent',\n 'copilot',\n 'conversation',\n 'history',\n 'start screen',\n 'suggestions',\n 'prompt',\n ],\n readiness: 'draft',\n} as const\n\nexport interface ChatConversation {\n current?: boolean\n href: string\n title: string\n}\n\nexport type ChatPageLinkProps = AnchorHTMLAttributes<HTMLAnchorElement> & { href: string }\n\nexport interface ChatPageProps {\n /** Past conversations, newest first. */\n conversations: readonly ChatConversation[]\n messages: readonly ChatPanelMessage[]\n onNewChat?: () => void\n onSend: (text: string) => void\n onStop?: () => void\n /** The product name at the top of the sidebar. */\n productName?: string\n /** Renders a conversation link, for a router's own link component; a plain anchor by default. */\n renderLink?: (props: ChatPageLinkProps) => ReactElement\n status?: ChatComposerStatus\n suggestions?: readonly string[]\n}\n\nconst anchor = ({ children, ...props }: ChatPageLinkProps) => <a {...props}>{children}</a>\n\n/*\n * The assistant as the whole page. On a phone the history becomes a sheet the\n * top-bar toggle opens. The open conversation is marked with aria-current.\n * The page holds no conversation state; see ChatThread for how to feed it.\n *\n * Each safe-area inset has one owner, as in AppView: the top bar takes the top\n * inset, and the page column takes the inline insets and the bottom one, so\n * the composer clears the home indicator.\n */\nexport function ChatPage({\n conversations,\n messages,\n onNewChat,\n onSend,\n onStop,\n productName = 'Assistant',\n renderLink = anchor,\n status,\n suggestions,\n}: ChatPageProps) {\n const current = conversations.find(conversation => conversation.current)\n return (\n <SidebarProvider>\n <Sidebar>\n <nav aria-label=\"Conversations\" className=\"contents\">\n <SidebarHeader>\n <div className=\"flex items-center gap-2 px-2\">\n <span className=\"font-heading text-foreground truncate font-semibold\">\n {productName}\n </span>\n <Button\n aria-label=\"New chat\"\n className=\"ms-auto\"\n onClick={onNewChat}\n size=\"icon-sm\"\n variant=\"ghost\"\n >\n <SquarePen aria-hidden />\n </Button>\n </div>\n </SidebarHeader>\n <SidebarContent>\n <SidebarGroup>\n <SidebarGroupLabel>Recent</SidebarGroupLabel>\n <SidebarGroupContent>\n <SidebarMenu>\n {conversations.map(conversation => (\n <SidebarMenuItem key={conversation.href}>\n <SidebarMenuButton\n isActive={conversation.current}\n render={renderLink({\n 'aria-current': conversation.current ? 'page' : undefined,\n children: <span className=\"truncate\">{conversation.title}</span>,\n href: conversation.href,\n })}\n />\n </SidebarMenuItem>\n ))}\n </SidebarMenu>\n </SidebarGroupContent>\n </SidebarGroup>\n </SidebarContent>\n </nav>\n </Sidebar>\n <SidebarInset className=\"flex h-svh min-h-0 flex-col px-[max(var(--a63-safe-area-left),var(--a63-safe-area-right))] pb-[var(--a63-safe-area-bottom)]\">\n <header className=\"border-border box-content flex h-14 shrink-0 items-center gap-2 border-b px-4 pt-[var(--a63-safe-area-top)]\">\n <SidebarTrigger />\n <h1 className=\"text-foreground truncate text-sm font-semibold\">\n {messages.length ? (current?.title ?? 'Chat') : 'New chat'}\n </h1>\n </header>\n <ChatThread\n greeting=\"What can I help with?\"\n layout=\"page\"\n messages={messages}\n onSend={onSend}\n onStop={onStop}\n status={status}\n suggestions={suggestions}\n />\n </SidebarInset>\n </SidebarProvider>\n )\n}\n"
14779
+ "source": "import type { ChatComposerStatus } from '@atom63/ui-foundation'\nimport {\n Button,\n Sidebar,\n SidebarContent,\n SidebarGroup,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInset,\n SidebarMenu,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarProvider,\n SidebarTrigger,\n} from '@atom63/ui-react'\nimport { SquarePen } from 'lucide-react'\nimport type { AnchorHTMLAttributes, ReactElement } from 'react'\n\nimport { type ChatPanelMessage, ChatThread } from '../../blocks/chat-panel/chat-panel'\n\nexport const template = {\n id: 'chat-page',\n kind: 'page',\n title: 'Chat page',\n description:\n 'A full-page AI assistant: past conversations in the sidebar with a new chat button, the open conversation in a 48rem reading column with replies at its full width, and the one-row composer at the bottom of the same column. With no messages it is the start screen: a large greeting, the composer and suggestion chips. Uses the chat-panel block for the conversation; wire it to @atom63/agent or any runtime through props.',\n category: 'ai',\n tags: [\n 'chat',\n 'assistant',\n 'ai',\n 'ai assistant',\n 'agent',\n 'copilot',\n 'conversation',\n 'history',\n 'start screen',\n 'suggestions',\n 'prompt',\n ],\n readiness: 'draft',\n} as const\n\nexport interface ChatConversation {\n current?: boolean\n href: string\n title: string\n}\n\nexport type ChatPageLinkProps = AnchorHTMLAttributes<HTMLAnchorElement> & { href: string }\n\nexport interface ChatPageProps {\n /** Past conversations, newest first. */\n conversations: readonly ChatConversation[]\n messages: readonly ChatPanelMessage[]\n onNewChat?: () => void\n onSend: (text: string) => void\n onStop?: () => void\n /** The product name at the top of the sidebar. */\n productName?: string\n /** Renders a conversation link, for a router's own link component; a plain anchor by default. */\n renderLink?: (props: ChatPageLinkProps) => ReactElement\n status?: ChatComposerStatus\n suggestions?: readonly string[]\n}\n\nconst anchor = ({ children, ...props }: ChatPageLinkProps) => <a {...props}>{children}</a>\n\n/*\n * The assistant as the whole page. On a phone the history becomes a sheet the\n * top-bar toggle opens. The open conversation is marked with aria-current.\n * The page holds no conversation state; see ChatThread for how to feed it.\n *\n * Each safe-area inset has one owner, as in AppView: the top bar takes the top\n * inset, and the page column takes the inline insets and the bottom one, so\n * the composer clears the home indicator.\n */\nexport function ChatPage({\n conversations,\n messages,\n onNewChat,\n onSend,\n onStop,\n productName = 'Assistant',\n renderLink = anchor,\n status,\n suggestions,\n}: ChatPageProps) {\n const current = conversations.find(conversation => conversation.current)\n return (\n <SidebarProvider>\n <Sidebar>\n <nav aria-label=\"Conversations\" className=\"contents\">\n <SidebarHeader>\n <div className=\"flex items-center gap-2 px-2\">\n <span className=\"font-heading text-foreground truncate font-semibold\">\n {productName}\n </span>\n <Button\n aria-label=\"New chat\"\n className=\"ms-auto\"\n onClick={onNewChat}\n size=\"icon-sm\"\n tone=\"muted\"\n variant=\"ghost\"\n >\n <SquarePen aria-hidden />\n </Button>\n </div>\n </SidebarHeader>\n <SidebarContent>\n <SidebarGroup>\n <SidebarGroupLabel>Recent</SidebarGroupLabel>\n <SidebarGroupContent>\n <SidebarMenu>\n {conversations.map(conversation => (\n <SidebarMenuItem key={conversation.href}>\n <SidebarMenuButton\n isActive={conversation.current}\n render={renderLink({\n 'aria-current': conversation.current ? 'page' : undefined,\n children: <span className=\"truncate\">{conversation.title}</span>,\n href: conversation.href,\n })}\n />\n </SidebarMenuItem>\n ))}\n </SidebarMenu>\n </SidebarGroupContent>\n </SidebarGroup>\n </SidebarContent>\n </nav>\n </Sidebar>\n <SidebarInset className=\"flex h-svh min-h-0 flex-col px-[max(var(--a63-safe-area-left),var(--a63-safe-area-right))] pb-[var(--a63-safe-area-bottom)]\">\n <header className=\"border-border box-content flex h-14 shrink-0 items-center gap-2 border-b px-4 pt-[var(--a63-safe-area-top)]\">\n <SidebarTrigger />\n <h1 className=\"text-foreground truncate text-sm font-semibold\">\n {messages.length ? (current?.title ?? 'Chat') : 'New chat'}\n </h1>\n </header>\n <ChatThread\n greeting=\"What can I help with?\"\n layout=\"page\"\n messages={messages}\n onSend={onSend}\n onStop={onStop}\n status={status}\n suggestions={suggestions}\n />\n </SidebarInset>\n </SidebarProvider>\n )\n}\n"
14414
14780
  }
14415
14781
  ]
14416
14782
  },
@@ -14450,7 +14816,7 @@
14450
14816
  "files": [
14451
14817
  {
14452
14818
  "path": "pages/dashboard-page/dashboard-page.tsx",
14453
- "source": "import { Badge, Button } from '@atom63/ui-react'\nimport { Container, SectionHeader } from '@atom63/ui-react/layout'\nimport { FileText, LayoutDashboard, Plus, Settings } from 'lucide-react'\n\nimport { type ActivityItem, ActivityList } from '../../blocks/activity-list/activity-list'\nimport { AppShell } from '../../blocks/app-shell/app-shell'\nimport {\n type DataTableColumn,\n DataTableSection,\n} from '../../blocks/data-table-section/data-table-section'\nimport { PageHeader } from '../../blocks/page-header/page-header'\nimport { type Stat, StatRow } from '../../blocks/stat-row/stat-row'\nimport { type Invoice, invoices } from '../list-page/list-page-data'\n\nexport const template = {\n id: 'dashboard-page',\n kind: 'page',\n title: 'Dashboard page',\n description:\n 'An overview inside the app shell: headline numbers, the most recent records and an activity feed, with one primary action.',\n category: 'data',\n tags: ['dashboard', 'overview', 'home', 'stats', 'metrics', 'activity', 'app shell'],\n readiness: 'ready',\n} as const\n\nconst nav = [\n { current: true, href: '#overview', icon: <LayoutDashboard aria-hidden />, label: 'Overview' },\n { href: '#invoices', icon: <FileText aria-hidden />, label: 'Invoices' },\n { href: '#settings', icon: <Settings aria-hidden />, label: 'Settings' },\n]\n\nconst stats: readonly Stat[] = [\n { change: { direction: 'up', text: '12%', tone: 'good' }, label: 'Revenue', value: '$48,200' },\n { change: { direction: 'down', text: '3', tone: 'good' }, label: 'Open invoices', value: '14' },\n { change: { direction: 'up', text: '2', tone: 'bad' }, label: 'Overdue', value: '5' },\n { label: 'Customers', value: '128' },\n]\n\nconst activity: readonly ActivityItem[] = [\n {\n action: 'paid',\n actor: 'Northwind Traders',\n dateTime: '2026-09-27T09:12:00Z',\n id: 'a1',\n target: 'INV-1042',\n time: '2 hours ago',\n },\n {\n action: 'sent',\n actor: 'Ada Park',\n dateTime: '2026-09-27T07:40:00Z',\n id: 'a2',\n target: 'INV-1049',\n time: '4 hours ago',\n },\n {\n action: 'added the customer',\n actor: 'Ada Park',\n dateTime: '2026-09-26T16:05:00Z',\n id: 'a3',\n target: 'Summit Outfitters',\n time: 'Yesterday',\n },\n {\n action: 'marked as overdue',\n actor: 'Tally',\n dateTime: '2026-09-26T00:00:00Z',\n id: 'a4',\n target: 'INV-1047',\n time: 'Yesterday',\n },\n]\n\nconst currency = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' })\nconst statusLabel = { open: 'Open', overdue: 'Overdue', paid: 'Paid' } as const\nconst statusVariant = { open: 'info', overdue: 'error', paid: 'success' } as const\n\nconst columns: readonly DataTableColumn<Invoice>[] = [\n { cell: invoice => invoice.id, header: 'Invoice', key: 'id' },\n { cell: invoice => invoice.customer, header: 'Customer', key: 'customer' },\n {\n cell: invoice => (\n <Badge variant={statusVariant[invoice.status]}>{statusLabel[invoice.status]}</Badge>\n ),\n header: 'Status',\n key: 'status',\n },\n {\n align: 'end',\n cell: invoice => currency.format(invoice.amount),\n header: 'Amount',\n key: 'amount',\n },\n]\n\nconst recent = [...invoices].sort((a, b) => b.issued.localeCompare(a.issued)).slice(0, 4)\n\nexport function DashboardContent() {\n return (\n <Container maxWidth=\"wide\" padding=\"none\">\n <PageHeader\n actions={\n <Button variant=\"primary\">\n <Plus aria-hidden />\n New invoice\n </Button>\n }\n description=\"September 2026 at a glance.\"\n title=\"Overview\"\n />\n <StatRow comparison=\"vs. August\" stats={stats} />\n <div className=\"grid gap-8 lg:grid-cols-[minmax(0,2fr)_minmax(0,1fr)]\">\n <section className=\"flex flex-col gap-4\">\n <SectionHeader level={2} title=\"Recent invoices\" variant=\"muted\" />\n <DataTableSection\n columns={columns}\n empty={{\n action: <Button variant=\"primary\">New invoice</Button>,\n description: 'Invoices you create appear here.',\n title: 'No invoices yet',\n }}\n getRowKey={invoice => invoice.id}\n headingLevel={3}\n label=\"Recent invoices\"\n rows={recent}\n summary={`The ${recent.length} most recent of ${invoices.length}`}\n />\n </section>\n <section className=\"flex flex-col gap-4\">\n <SectionHeader level={2} title=\"Activity\" variant=\"muted\" />\n <ActivityList items={activity} label=\"Recent activity\" />\n </section>\n </div>\n </Container>\n )\n}\n\n/* The page in its app shell. An app that renders the shell once, around its\n routes, renders `DashboardContent` inside it instead. */\nexport function DashboardPage() {\n return (\n <AppShell navItems={nav} productName=\"Tally\">\n <DashboardContent />\n </AppShell>\n )\n}\n"
14819
+ "source": "import { Badge, Button } from '@atom63/ui-react'\nimport { Container, SectionHeader } from '@atom63/ui-react/layout'\nimport { FileText, LayoutDashboard, Plus, Settings } from 'lucide-react'\n\nimport { type ActivityItem, ActivityList } from '../../blocks/activity-list/activity-list'\nimport { AppShell } from '../../blocks/app-shell/app-shell'\nimport {\n type DataTableColumn,\n DataTableSection,\n} from '../../blocks/data-table-section/data-table-section'\nimport { PageHeader } from '../../blocks/page-header/page-header'\nimport { type Stat, StatRow } from '../../blocks/stat-row/stat-row'\nimport { type Invoice, invoices } from '../list-page/list-page-data'\n\nexport const template = {\n id: 'dashboard-page',\n kind: 'page',\n title: 'Dashboard page',\n description:\n 'An overview inside the app shell: headline numbers, the most recent records and an activity feed, with one primary action.',\n category: 'data',\n tags: ['dashboard', 'overview', 'home', 'stats', 'metrics', 'activity', 'app shell'],\n readiness: 'ready',\n} as const\n\nconst nav = [\n { current: true, href: '#overview', icon: <LayoutDashboard aria-hidden />, label: 'Overview' },\n { href: '#invoices', icon: <FileText aria-hidden />, label: 'Invoices' },\n { href: '#settings', icon: <Settings aria-hidden />, label: 'Settings' },\n]\n\nconst stats: readonly Stat[] = [\n { change: { direction: 'up', text: '12%', tone: 'good' }, label: 'Revenue', value: '$48,200' },\n { change: { direction: 'down', text: '3', tone: 'good' }, label: 'Open invoices', value: '14' },\n { change: { direction: 'up', text: '2', tone: 'bad' }, label: 'Overdue', value: '5' },\n { label: 'Customers', value: '128' },\n]\n\nconst activity: readonly ActivityItem[] = [\n {\n action: 'paid',\n actor: 'Northwind Traders',\n dateTime: '2026-09-27T09:12:00Z',\n id: 'a1',\n target: 'INV-1042',\n time: '2 hours ago',\n },\n {\n action: 'sent',\n actor: 'Ada Park',\n dateTime: '2026-09-27T07:40:00Z',\n id: 'a2',\n target: 'INV-1049',\n time: '4 hours ago',\n },\n {\n action: 'added the customer',\n actor: 'Ada Park',\n dateTime: '2026-09-26T16:05:00Z',\n id: 'a3',\n target: 'Summit Outfitters',\n time: 'Yesterday',\n },\n {\n action: 'marked as overdue',\n actor: 'Tally',\n dateTime: '2026-09-26T00:00:00Z',\n id: 'a4',\n target: 'INV-1047',\n time: 'Yesterday',\n },\n]\n\nconst currency = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' })\nconst statusLabel = { open: 'Open', overdue: 'Overdue', paid: 'Paid' } as const\nconst statusVariant = { open: 'info', overdue: 'error', paid: 'success' } as const\n\nconst columns: readonly DataTableColumn<Invoice>[] = [\n { cell: invoice => invoice.id, header: 'Invoice', key: 'id' },\n { cell: invoice => invoice.customer, header: 'Customer', key: 'customer' },\n {\n cell: invoice => (\n <Badge variant={statusVariant[invoice.status]}>{statusLabel[invoice.status]}</Badge>\n ),\n header: 'Status',\n key: 'status',\n },\n {\n align: 'end',\n cell: invoice => currency.format(invoice.amount),\n header: 'Amount',\n key: 'amount',\n },\n]\n\nconst recent = [...invoices].sort((a, b) => b.issued.localeCompare(a.issued)).slice(0, 4)\n\nexport function DashboardContent() {\n return (\n <Container maxWidth=\"wide\" padding=\"none\">\n <PageHeader\n actions={\n <Button variant=\"primary\">\n <Plus aria-hidden />\n New invoice\n </Button>\n }\n description=\"September 2026 at a glance.\"\n title=\"Overview\"\n />\n <StatRow comparison=\"vs. August\" stats={stats} />\n <div className=\"grid gap-8 lg:grid-cols-[minmax(0,2fr)_minmax(0,1fr)]\">\n <section className=\"flex flex-col gap-4\">\n <SectionHeader level={2} title=\"Recent invoices\" variant=\"muted\" />\n <DataTableSection\n columns={columns}\n empty={{\n action: <Button variant=\"outline\">New invoice</Button>,\n description: 'Invoices you create appear here.',\n title: 'No invoices yet',\n }}\n getRowKey={invoice => invoice.id}\n headingLevel={3}\n label=\"Recent invoices\"\n rows={recent}\n summary={`The ${recent.length} most recent of ${invoices.length}`}\n />\n </section>\n <section className=\"flex flex-col gap-4\">\n <SectionHeader level={2} title=\"Activity\" variant=\"muted\" />\n <ActivityList items={activity} label=\"Recent activity\" />\n </section>\n </div>\n </Container>\n )\n}\n\n/* The page in its app shell. An app that renders the shell once, around its\n routes, renders `DashboardContent` inside it instead. */\nexport function DashboardPage() {\n return (\n <AppShell navItems={nav} productName=\"Tally\">\n <DashboardContent />\n </AppShell>\n )\n}\n"
14454
14820
  },
14455
14821
  {
14456
14822
  "path": "pages/list-page/list-page-data.ts",
@@ -14502,7 +14868,7 @@
14502
14868
  },
14503
14869
  {
14504
14870
  "path": "pages/list-page/list-page.tsx",
14505
- "source": "import {\n Badge,\n Button,\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n Item,\n ItemActions,\n ItemContent,\n ItemDescription,\n ItemTitle,\n} from '@atom63/ui-react'\nimport { Container } from '@atom63/ui-react/layout'\nimport { ChevronRight, Ellipsis, FileText, LayoutDashboard, Plus, Settings } from 'lucide-react'\nimport { useState, type ReactNode } from 'react'\n\nimport { AppShell } from '../../blocks/app-shell/app-shell'\nimport {\n type DataTableColumn,\n DataTableSection,\n} from '../../blocks/data-table-section/data-table-section'\nimport { DetailPanel } from '../../blocks/detail-panel/detail-panel'\nimport { FilterBar } from '../../blocks/filter-bar/filter-bar'\nimport { PageHeader } from '../../blocks/page-header/page-header'\nimport { type Invoice, type InvoiceStatus, invoices as sampleInvoices } from './list-page-data'\n\nexport const template = {\n id: 'list-page',\n kind: 'page',\n title: 'List page',\n description:\n 'A filterable collection page inside the app shell: a header with one primary action, a search and status filter, a table that becomes stacked rows on phones, and a detail sheet for one row.',\n category: 'collections',\n tags: ['list', 'detail', 'table', 'index', 'invoice', 'invoices', 'orders', 'filter', 'search'],\n readiness: 'ready',\n} as const\n\nconst nav = [\n { href: '#overview', icon: <LayoutDashboard aria-hidden />, label: 'Overview' },\n { current: true, href: '#invoices', icon: <FileText aria-hidden />, label: 'Invoices' },\n { href: '#settings', icon: <Settings aria-hidden />, label: 'Settings' },\n]\n\nconst statusOptions = [\n { label: 'All statuses', value: 'all' },\n { label: 'Paid', value: 'paid' },\n { label: 'Open', value: 'open' },\n { label: 'Overdue', value: 'overdue' },\n] as const\n\nconst statusBadge: Record<InvoiceStatus, { label: string; variant: 'success' | 'info' | 'error' }> =\n {\n paid: { label: 'Paid', variant: 'success' },\n open: { label: 'Open', variant: 'info' },\n overdue: { label: 'Overdue', variant: 'error' },\n }\n\nconst currency = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' })\nconst date = new Intl.DateTimeFormat('en-US', { dateStyle: 'medium', timeZone: 'UTC' })\n\nfunction StatusBadge({ status }: { status: InvoiceStatus }) {\n return <Badge variant={statusBadge[status].variant}>{statusBadge[status].label}</Badge>\n}\n\nconst columns: readonly DataTableColumn<Invoice>[] = [\n { cell: invoice => invoice.id, header: 'Invoice', key: 'id' },\n { cell: invoice => invoice.customer, header: 'Customer', key: 'customer' },\n { cell: invoice => <StatusBadge status={invoice.status} />, header: 'Status', key: 'status' },\n {\n cell: invoice => date.format(new Date(invoice.issued)),\n header: 'Issued',\n key: 'issued',\n showFrom: 'md',\n },\n {\n align: 'end',\n cell: invoice => currency.format(invoice.amount),\n header: 'Amount',\n key: 'amount',\n showFrom: 'lg',\n },\n]\n\nexport interface ListPageProps {\n /** Initial record shown in the detail sheet, useful for a routed selection. */\n defaultOpenId?: string\n /** Initial search text, useful when the URL restores filter state. */\n defaultQuery?: string\n /** The rows to list; the page filters them in memory. */\n invoices?: readonly Invoice[]\n /** A transient operation surface such as import progress or completion. */\n operationStatus?: ReactNode\n}\n\nexport function ListContent({\n defaultOpenId,\n defaultQuery = '',\n invoices = sampleInvoices,\n operationStatus,\n}: ListPageProps) {\n const [query, setQuery] = useState(defaultQuery)\n const [status, setStatus] = useState('all')\n const [openId, setOpenId] = useState<string | null>(defaultOpenId ?? null)\n const open = invoices.find(invoice => invoice.id === openId)\n\n const needle = query.trim().toLowerCase()\n const visible = invoices.filter(\n invoice =>\n (status === 'all' || invoice.status === status) &&\n (needle === '' ||\n invoice.id.toLowerCase().includes(needle) ||\n invoice.customer.toLowerCase().includes(needle))\n )\n const filtered = needle !== '' || status !== 'all'\n const clear = () => {\n setQuery('')\n setStatus('all')\n }\n const rowMenu = (invoice: Invoice) => (\n <DropdownMenu>\n <DropdownMenuTrigger\n render={\n <Button aria-label={`Actions for ${invoice.id}`} size=\"icon-sm\" variant=\"ghost\">\n <Ellipsis aria-hidden />\n </Button>\n }\n />\n <DropdownMenuContent align=\"end\">\n <DropdownMenuItem onClick={() => setOpenId(invoice.id)}>View invoice</DropdownMenuItem>\n <DropdownMenuItem>Download PDF</DropdownMenuItem>\n {invoice.status === 'paid' ? null : <DropdownMenuItem>Mark as paid</DropdownMenuItem>}\n <DropdownMenuSeparator />\n <DropdownMenuItem variant=\"destructive\">Void invoice</DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n )\n\n return (\n <>\n <Container maxWidth=\"wide\" padding=\"none\">\n <PageHeader\n actions={\n <Button variant=\"primary\">\n <Plus aria-hidden />\n New invoice\n </Button>\n }\n description=\"Track what customers owe and what has been paid.\"\n title=\"Invoices\"\n />\n <FilterBar\n filterLabel=\"Status\"\n filterOptions={statusOptions}\n filterValue={status}\n onClear={clear}\n onFilterChange={setStatus}\n onQueryChange={setQuery}\n query={query}\n searchLabel=\"Search invoices\"\n searchPlaceholder=\"Invoice number or customer\"\n showClear={filtered}\n />\n <DataTableSection\n columns={columns}\n empty={\n invoices.length === 0\n ? {\n action: <Button variant=\"primary\">New invoice</Button>,\n description: 'Invoices you create appear here, with their status and amount.',\n title: 'No invoices yet',\n }\n : {\n action: (\n <Button onClick={clear} variant=\"outline\">\n Clear filters\n </Button>\n ),\n description:\n 'No invoice matches this search and status. Clear the filters to see every invoice.',\n title: 'No matching invoices',\n }\n }\n getRowKey={invoice => invoice.id}\n label=\"Invoices\"\n renderPhoneRow={invoice => (\n <Item\n className=\"rounded-none\"\n data-selected={openId === invoice.id ? '' : undefined}\n size=\"sm\"\n >\n <ItemContent>\n <ItemTitle>{invoice.customer}</ItemTitle>\n <ItemDescription>\n {invoice.id} · {date.format(new Date(invoice.issued))}\n </ItemDescription>\n </ItemContent>\n <ItemActions className=\"gap-1\">\n <StatusBadge status={invoice.status} />\n <Button\n aria-label={`View ${invoice.id}`}\n onClick={() => setOpenId(invoice.id)}\n size=\"icon-sm\"\n variant=\"ghost\"\n >\n <ChevronRight aria-hidden />\n </Button>\n {rowMenu(invoice)}\n </ItemActions>\n </Item>\n )}\n rowActions={rowMenu}\n rows={visible}\n selectedRowKey={openId ?? undefined}\n summary={\n filtered\n ? `${visible.length} of ${invoices.length} invoices`\n : `${invoices.length} invoices`\n }\n />\n </Container>\n <DetailPanel\n actions={\n <>\n <Button variant=\"outline\">Download PDF</Button>\n {open?.status === 'paid' ? null : <Button variant=\"primary\">Mark as paid</Button>}\n </>\n }\n description={open?.customer}\n fields={\n open\n ? [\n { label: 'Status', value: <StatusBadge status={open.status} /> },\n { label: 'Issued', value: date.format(new Date(open.issued)) },\n { label: 'Amount', value: currency.format(open.amount) },\n ]\n : []\n }\n onOpenChange={next => {\n if (!next) setOpenId(null)\n }}\n open={open !== undefined}\n title={open?.id ?? ''}\n />\n {operationStatus}\n </>\n )\n}\n\n/* The page in its app shell. An app that renders the shell once, around its\n routes, renders `ListContent` inside it instead. */\nexport function ListPage(props: ListPageProps) {\n return (\n <AppShell navItems={nav} productName=\"Tally\">\n <ListContent {...props} />\n </AppShell>\n )\n}\n"
14871
+ "source": "import {\n Badge,\n Button,\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n Item,\n ItemActions,\n ItemContent,\n ItemDescription,\n ItemTitle,\n} from '@atom63/ui-react'\nimport { Container } from '@atom63/ui-react/layout'\nimport { ChevronRight, Ellipsis, FileText, LayoutDashboard, Plus, Settings } from 'lucide-react'\nimport { useState, type ReactNode } from 'react'\n\nimport { AppShell } from '../../blocks/app-shell/app-shell'\nimport {\n type DataTableColumn,\n DataTableSection,\n} from '../../blocks/data-table-section/data-table-section'\nimport { DetailPanel } from '../../blocks/detail-panel/detail-panel'\nimport { FilterBar } from '../../blocks/filter-bar/filter-bar'\nimport { PageHeader } from '../../blocks/page-header/page-header'\nimport { type Invoice, type InvoiceStatus, invoices as sampleInvoices } from './list-page-data'\n\nexport const template = {\n id: 'list-page',\n kind: 'page',\n title: 'List page',\n description:\n 'A filterable collection page inside the app shell: a header with one primary action, a search and status filter, a table that becomes stacked rows on phones, and a detail sheet for one row.',\n category: 'collections',\n tags: ['list', 'detail', 'table', 'index', 'invoice', 'invoices', 'orders', 'filter', 'search'],\n readiness: 'ready',\n} as const\n\nconst nav = [\n { href: '#overview', icon: <LayoutDashboard aria-hidden />, label: 'Overview' },\n { current: true, href: '#invoices', icon: <FileText aria-hidden />, label: 'Invoices' },\n { href: '#settings', icon: <Settings aria-hidden />, label: 'Settings' },\n]\n\nconst statusOptions = [\n { label: 'All statuses', value: 'all' },\n { label: 'Paid', value: 'paid' },\n { label: 'Open', value: 'open' },\n { label: 'Overdue', value: 'overdue' },\n] as const\n\nconst statusBadge: Record<InvoiceStatus, { label: string; variant: 'success' | 'info' | 'error' }> =\n {\n paid: { label: 'Paid', variant: 'success' },\n open: { label: 'Open', variant: 'info' },\n overdue: { label: 'Overdue', variant: 'error' },\n }\n\nconst currency = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' })\nconst date = new Intl.DateTimeFormat('en-US', { dateStyle: 'medium', timeZone: 'UTC' })\n\nfunction StatusBadge({ status }: { status: InvoiceStatus }) {\n return <Badge variant={statusBadge[status].variant}>{statusBadge[status].label}</Badge>\n}\n\nconst columns: readonly DataTableColumn<Invoice>[] = [\n { cell: invoice => invoice.id, header: 'Invoice', key: 'id' },\n { cell: invoice => invoice.customer, header: 'Customer', key: 'customer' },\n { cell: invoice => <StatusBadge status={invoice.status} />, header: 'Status', key: 'status' },\n {\n cell: invoice => date.format(new Date(invoice.issued)),\n header: 'Issued',\n key: 'issued',\n showFrom: 'md',\n },\n {\n align: 'end',\n cell: invoice => currency.format(invoice.amount),\n header: 'Amount',\n key: 'amount',\n showFrom: 'lg',\n },\n]\n\nexport interface ListPageProps {\n /** Initial record shown in the detail sheet, useful for a routed selection. */\n defaultOpenId?: string\n /** Initial search text, useful when the URL restores filter state. */\n defaultQuery?: string\n /** The rows to list; the page filters them in memory. */\n invoices?: readonly Invoice[]\n /** A transient operation surface such as import progress or completion. */\n operationStatus?: ReactNode\n}\n\nexport function ListContent({\n defaultOpenId,\n defaultQuery = '',\n invoices = sampleInvoices,\n operationStatus,\n}: ListPageProps) {\n const [query, setQuery] = useState(defaultQuery)\n const [status, setStatus] = useState('all')\n const [openId, setOpenId] = useState<string | null>(defaultOpenId ?? null)\n const open = invoices.find(invoice => invoice.id === openId)\n\n const needle = query.trim().toLowerCase()\n const visible = invoices.filter(\n invoice =>\n (status === 'all' || invoice.status === status) &&\n (needle === '' ||\n invoice.id.toLowerCase().includes(needle) ||\n invoice.customer.toLowerCase().includes(needle))\n )\n const filtered = needle !== '' || status !== 'all'\n const clear = () => {\n setQuery('')\n setStatus('all')\n }\n const rowMenu = (invoice: Invoice) => (\n <DropdownMenu>\n <DropdownMenuTrigger\n render={\n <Button\n aria-label={`Actions for ${invoice.id}`}\n size=\"icon-sm\"\n tone=\"muted\"\n variant=\"ghost\"\n >\n <Ellipsis aria-hidden />\n </Button>\n }\n />\n <DropdownMenuContent align=\"end\">\n <DropdownMenuItem onClick={() => setOpenId(invoice.id)}>View invoice</DropdownMenuItem>\n <DropdownMenuItem>Download PDF</DropdownMenuItem>\n {invoice.status === 'paid' ? null : <DropdownMenuItem>Mark as paid</DropdownMenuItem>}\n <DropdownMenuSeparator />\n <DropdownMenuItem variant=\"destructive\">Void invoice</DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n )\n\n return (\n <>\n <Container maxWidth=\"wide\" padding=\"none\">\n <PageHeader\n actions={\n <Button variant=\"primary\">\n <Plus aria-hidden />\n New invoice\n </Button>\n }\n description=\"Track what customers owe and what has been paid.\"\n title=\"Invoices\"\n />\n <FilterBar\n filterLabel=\"Status\"\n filterOptions={statusOptions}\n filterValue={status}\n onClear={clear}\n onFilterChange={setStatus}\n onQueryChange={setQuery}\n query={query}\n searchLabel=\"Search invoices\"\n searchPlaceholder=\"Invoice number or customer\"\n showClear={filtered}\n />\n <DataTableSection\n columns={columns}\n empty={\n invoices.length === 0\n ? {\n action: <Button variant=\"outline\">New invoice</Button>,\n description: 'Invoices you create appear here, with their status and amount.',\n title: 'No invoices yet',\n }\n : {\n action: (\n <Button onClick={clear} variant=\"outline\">\n Clear filters\n </Button>\n ),\n description:\n 'No invoice matches this search and status. Clear the filters to see every invoice.',\n title: 'No matching invoices',\n }\n }\n getRowKey={invoice => invoice.id}\n label=\"Invoices\"\n renderPhoneRow={invoice => (\n <Item\n className=\"rounded-none\"\n data-selected={openId === invoice.id ? '' : undefined}\n size=\"sm\"\n >\n <ItemContent>\n <ItemTitle>{invoice.customer}</ItemTitle>\n <ItemDescription>\n {invoice.id} · {date.format(new Date(invoice.issued))}\n </ItemDescription>\n </ItemContent>\n <ItemActions className=\"gap-1\">\n <StatusBadge status={invoice.status} />\n <Button\n aria-label={`View ${invoice.id}`}\n onClick={() => setOpenId(invoice.id)}\n size=\"icon-sm\"\n tone=\"muted\"\n variant=\"ghost\"\n >\n <ChevronRight aria-hidden />\n </Button>\n {rowMenu(invoice)}\n </ItemActions>\n </Item>\n )}\n rowActions={rowMenu}\n rows={visible}\n selectedRowKey={openId ?? undefined}\n summary={\n filtered\n ? `${visible.length} of ${invoices.length} invoices`\n : `${invoices.length} invoices`\n }\n />\n </Container>\n <DetailPanel\n actions={\n <>\n <Button variant=\"outline\">Download PDF</Button>\n {open?.status === 'paid' ? null : <Button variant=\"default\">Mark as paid</Button>}\n </>\n }\n description={open?.customer}\n fields={\n open\n ? [\n { label: 'Status', value: <StatusBadge status={open.status} /> },\n { label: 'Issued', value: date.format(new Date(open.issued)) },\n { label: 'Amount', value: currency.format(open.amount) },\n ]\n : []\n }\n onOpenChange={next => {\n if (!next) setOpenId(null)\n }}\n open={open !== undefined}\n title={open?.id ?? ''}\n />\n {operationStatus}\n </>\n )\n}\n\n/* The page in its app shell. An app that renders the shell once, around its\n routes, renders `ListContent` inside it instead. */\nexport function ListPage(props: ListPageProps) {\n return (\n <AppShell navItems={nav} productName=\"Tally\">\n <ListContent {...props} />\n </AppShell>\n )\n}\n"
14506
14872
  }
14507
14873
  ]
14508
14874
  },
@@ -14543,6 +14909,48 @@
14543
14909
  }
14544
14910
  ]
14545
14911
  },
14912
+ {
14913
+ "id": "reading-page",
14914
+ "kind": "page",
14915
+ "title": "Reading page",
14916
+ "description": "A long-form reading page for an article, a blog post or a docs page, built on ReaderLayout from @atom63/ui-react/layout: Page owns the main landmark, Container the width, Section the space around the document, and ReaderLayout a centred reading column with a table-of-contents rail beside it on wide screens. reserveAside keeps the column the same width on pages with no rail. Inside an app shell, give Page render={<div />} so the document keeps one main landmark.",
14917
+ "category": "layout",
14918
+ "tags": [
14919
+ "reading",
14920
+ "reader",
14921
+ "article",
14922
+ "blog",
14923
+ "blog post",
14924
+ "post",
14925
+ "docs",
14926
+ "documentation",
14927
+ "guide",
14928
+ "long-form",
14929
+ "essay",
14930
+ "table of contents",
14931
+ "rail",
14932
+ "reader layout",
14933
+ "prose"
14934
+ ],
14935
+ "readiness": "draft",
14936
+ "componentsUsed": [
14937
+ "Container",
14938
+ "Page",
14939
+ "ReaderLayout",
14940
+ "Section",
14941
+ "separator"
14942
+ ],
14943
+ "blocksUsed": [],
14944
+ "packages": [
14945
+ "@atom63/ui-react"
14946
+ ],
14947
+ "files": [
14948
+ {
14949
+ "path": "pages/reading-page/reading-page.tsx",
14950
+ "source": "import { Separator } from '@atom63/ui-react'\nimport { Container, Page, ReaderLayout, Section } from '@atom63/ui-react/layout'\n\nexport const template = {\n id: 'reading-page',\n kind: 'page',\n title: 'Reading page',\n description:\n 'A long-form reading page for an article, a blog post or a docs page, built on ReaderLayout from @atom63/ui-react/layout: Page owns the main landmark, Container the width, Section the space around the document, and ReaderLayout a centred reading column with a table-of-contents rail beside it on wide screens. reserveAside keeps the column the same width on pages with no rail. Inside an app shell, give Page render={<div />} so the document keeps one main landmark.',\n category: 'layout',\n tags: [\n 'reading',\n 'reader',\n 'article',\n 'blog',\n 'blog post',\n 'post',\n 'docs',\n 'documentation',\n 'guide',\n 'long-form',\n 'essay',\n 'table of contents',\n 'rail',\n 'reader layout',\n 'prose',\n ],\n readiness: 'draft',\n} as const\n\nexport interface ReadingSection {\n body: readonly string[]\n id: string\n title: string\n}\n\nconst sampleSections: readonly ReadingSection[] = [\n {\n body: [\n 'An invoice is a request to be paid. It names who owes what, for which work, and by when. Tally keeps every invoice you send in one list, with its status beside it, so you can see at a glance what is still open.',\n 'This guide walks through the life of one invoice, from the draft to the day it is paid.',\n ],\n id: 'overview',\n title: 'Overview',\n },\n {\n body: [\n 'Start from a customer, add the lines you are billing for, and set a due date. A draft stays private until you send it, so you can come back to it as often as you need.',\n 'Each line has a description, a quantity and a price. Tally adds the lines up and applies the tax rate you set for the customer.',\n ],\n id: 'drafting',\n title: 'Drafting an invoice',\n },\n {\n body: [\n 'When you send an invoice, the customer gets an email with a link to pay it. The invoice moves from draft to open, and its due date starts to count down.',\n 'If the due date passes before it is paid, the invoice is marked overdue and Tally sends one polite reminder.',\n ],\n id: 'sending',\n title: 'Sending and reminders',\n },\n {\n body: [\n 'A payment through the link marks the invoice as paid on its own. A payment that arrives another way, such as a bank transfer, you mark as paid yourself from the invoice.',\n ],\n id: 'getting-paid',\n title: 'Getting paid',\n },\n]\n\nexport interface ReadingPageProps {\n /** The article's sections; each one gets a heading and a link in the rail. */\n sections?: readonly ReadingSection[]\n}\n\n/* A sample reading page: a guide with a table-of-contents rail. */\nexport function ReadingPage({ sections = sampleSections }: ReadingPageProps) {\n return (\n <Page noPadding>\n <Container maxWidth=\"widest\" padding=\"none\">\n <Section gap={false} removeTopSpacing={false} spacing=\"tight\">\n <ReaderLayout\n aside={\n <nav aria-label=\"On this page\" className=\"sticky top-8 flex flex-col gap-3\">\n <p className=\"text-foreground text-sm font-semibold\">On this page</p>\n <ul className=\"flex flex-col gap-2\">\n {sections.map(section => (\n <li key={section.id}>\n <a\n className=\"text-muted-foreground hover:text-foreground focus-visible:outline-ring text-sm transition-colors focus-visible:outline-2 focus-visible:outline-offset-2\"\n href={`#${section.id}`}\n >\n {section.title}\n </a>\n </li>\n ))}\n </ul>\n </nav>\n }\n >\n <header className=\"flex flex-col gap-4\">\n <p className=\"text-muted-foreground text-sm font-medium\">Guides</p>\n <h1 className=\"font-heading text-foreground text-4xl font-semibold tracking-tight\">\n How invoicing works\n </h1>\n <p className=\"text-muted-foreground max-w-2xl text-lg leading-relaxed\">\n From the first draft to the day it is paid: what happens to an invoice, and what you\n can do at each step.\n </p>\n <p className=\"text-muted-foreground text-sm\">\n Updated 12 September 2026 · 4 min read\n </p>\n </header>\n <Separator />\n {sections.map(section => (\n <section className=\"flex flex-col gap-4\" key={section.id}>\n <h2\n className=\"font-heading text-foreground scroll-mt-8 text-2xl font-semibold\"\n id={section.id}\n >\n {section.title}\n </h2>\n {section.body.map(paragraph => (\n <p className=\"text-foreground max-w-2xl leading-relaxed\" key={paragraph}>\n {paragraph}\n </p>\n ))}\n </section>\n ))}\n </ReaderLayout>\n </Section>\n </Container>\n </Page>\n )\n}\n"
14951
+ }
14952
+ ]
14953
+ },
14546
14954
  {
14547
14955
  "id": "settings-page",
14548
14956
  "kind": "page",
@@ -14748,7 +15156,7 @@
14748
15156
  "files": [
14749
15157
  {
14750
15158
  "path": "blocks/chat-panel/chat-panel.tsx",
14751
- "source": "import type { ChatComposerStatus, ChatStepStatus } from '@atom63/ui-foundation'\nimport {\n Avatar,\n AvatarFallback,\n Button,\n ChatComposer,\n ChatMessage,\n ChatMessageList,\n ChatStep,\n ChatSteps,\n ChatTypingIndicator,\n CopyButton,\n} from '@atom63/ui-react'\nimport { Plus, Sparkles, SquarePen, ThumbsDown, ThumbsUp, X } from 'lucide-react'\nimport { type ReactNode, useEffect, useRef } from 'react'\n\nexport const template = {\n id: 'chat-panel',\n kind: 'block',\n title: 'Chat panel',\n description:\n 'An AI assistant beside the product: a side panel with a header, the transcript (user bubbles, plain assistant replies with tool steps, typing dots and copy and feedback actions), a start screen with suggestion chips when the conversation is empty, and the composer with send and stop and the AI disclaimer. ChatThread is the same conversation without the panel, for a full page. Wire it to @atom63/agent or any runtime through props.',\n category: 'ai',\n tags: [\n 'chat',\n 'assistant',\n 'ai',\n 'ai assistant',\n 'agent',\n 'copilot',\n 'conversation',\n 'messages',\n 'side panel',\n 'composer',\n 'prompt',\n 'suggestions',\n ],\n readiness: 'draft',\n} as const\n\nexport interface ChatPanelStep {\n label: string\n status: ChatStepStatus\n}\n\nexport interface ChatPanelMessage {\n from: 'assistant' | 'user'\n id: string\n /** Tool or thinking steps shown above an assistant reply. */\n steps?: readonly ChatPanelStep[]\n /** True while the reply is still arriving. */\n streaming?: boolean\n text: string\n}\n\nexport interface ChatThreadProps {\n /** A leading composer control, such as an attach button; a `+` button by default. */\n attach?: ReactNode\n /** The line under the composer. */\n disclaimer?: string\n /** The start screen's heading when there are no messages. */\n greeting?: string\n /**\n * `panel` fills a narrow column and gives replies an avatar; `page` centres a\n * 48rem reading column (the composer's width too) with replies at its full\n * width.\n */\n layout?: 'page' | 'panel'\n messages: readonly ChatPanelMessage[]\n /** Adds thumbs up and down to finished replies. */\n onFeedback?: (messageId: string, value: 'down' | 'up') => void\n onSend: (text: string) => void\n onStop?: () => void\n placeholder?: string\n /** `submitted` or `streaming` turns send into stop. */\n status?: ChatComposerStatus\n /** Starter prompts on the start screen; one tap sends it. */\n suggestions?: readonly string[]\n}\n\nconst assistantAvatar = (\n <Avatar size=\"sm\">\n <AvatarFallback>\n <Sparkles aria-hidden />\n </AvatarFallback>\n </Avatar>\n)\n\nfunction Reply({\n avatar,\n message,\n onFeedback,\n}: {\n avatar: boolean\n message: ChatPanelMessage\n onFeedback?: ChatThreadProps['onFeedback']\n}) {\n const running = message.steps?.some(step => step.status === 'running') ?? false\n const done = !message.streaming && message.text !== ''\n return (\n <ChatMessage\n actions={\n done ? (\n <>\n <CopyButton label=\"Copy reply\" size=\"icon-xs\" value={message.text} />\n {onFeedback ? (\n <>\n <Button\n aria-label=\"Good reply\"\n onClick={() => onFeedback(message.id, 'up')}\n size=\"icon-xs\"\n variant=\"ghost\"\n >\n <ThumbsUp aria-hidden />\n </Button>\n <Button\n aria-label=\"Bad reply\"\n onClick={() => onFeedback(message.id, 'down')}\n size=\"icon-xs\"\n variant=\"ghost\"\n >\n <ThumbsDown aria-hidden />\n </Button>\n </>\n ) : null}\n </>\n ) : null\n }\n avatar={avatar ? assistantAvatar : undefined}\n from=\"assistant\"\n streaming={message.streaming}\n >\n {message.steps?.length ? (\n <ChatSteps\n defaultOpen={running}\n label={running ? 'Working' : `Used ${message.steps.length} tools`}\n >\n {message.steps.map(step => (\n <ChatStep key={step.label} status={step.status}>\n {step.label}\n </ChatStep>\n ))}\n </ChatSteps>\n ) : null}\n {message.text === '' && message.streaming ? (\n <ChatTypingIndicator />\n ) : (\n <p className=\"whitespace-pre-wrap\">{message.text}</p>\n )}\n </ChatMessage>\n )\n}\n\n/*\n * The conversation: a scrolling transcript over the composer. With no\n * messages it shows the start screen, a greeting and suggestion chips. It\n * scrolls to the newest turn as turns arrive. It holds no conversation state:\n * the host passes the messages and status and handles send and stop, from\n * `@atom63/agent` (map each AgentMessage to { id, from: role, text:\n * getMessageText(message), streaming: status === 'streaming' }) or any other\n * runtime.\n */\nexport function ChatThread({\n attach,\n disclaimer = 'AI can make mistakes. Check important info.',\n greeting = 'How can I help?',\n layout = 'panel',\n messages,\n onFeedback,\n onSend,\n onStop,\n placeholder = 'Ask anything',\n status = 'idle',\n suggestions = [],\n}: ChatThreadProps) {\n const scroller = useRef<HTMLDivElement>(null)\n const last = messages.at(-1)\n const lastText = last?.text.length ?? 0\n\n useEffect(() => {\n const element = scroller.current\n if (element) element.scrollTop = element.scrollHeight\n }, [messages.length, lastText])\n\n const column = layout === 'page' ? 'mx-auto w-full max-w-3xl' : 'w-full'\n const composer = (\n <ChatComposer\n attach={\n attach ?? (\n <Button aria-label=\"Attach a file\" shape=\"round\" size=\"icon-sm\" variant=\"ghost\">\n <Plus aria-hidden />\n </Button>\n )\n }\n footnote={disclaimer}\n onStop={onStop}\n onSubmit={onSend}\n placeholder={placeholder}\n status={status}\n />\n )\n\n if (messages.length === 0) {\n return (\n <div className=\"flex min-h-0 flex-1 flex-col justify-center overflow-y-auto px-4 py-8\">\n <div className={`${column} flex flex-col gap-6`}>\n <h2\n className={`font-heading text-foreground text-center font-semibold ${\n layout === 'page' ? 'text-3xl' : 'text-xl'\n }`}\n >\n {greeting}\n </h2>\n {composer}\n {suggestions.length ? (\n <ul aria-label=\"Suggestions\" className=\"flex flex-wrap justify-center gap-2\">\n {suggestions.map(suggestion => (\n <li key={suggestion}>\n <Button\n onClick={() => onSend(suggestion)}\n shape=\"round\"\n size=\"sm\"\n variant=\"outline\"\n >\n {suggestion}\n </Button>\n </li>\n ))}\n </ul>\n ) : null}\n </div>\n </div>\n )\n }\n\n return (\n <div className=\"flex min-h-0 flex-1 flex-col\">\n <div className=\"min-h-0 flex-1 overflow-y-auto px-4 py-6\" ref={scroller}>\n <ChatMessageList aria-label=\"Conversation\" className={column} tabIndex={0}>\n {messages.map(message =>\n message.from === 'user' ? (\n <ChatMessage from=\"user\" key={message.id}>\n {message.text}\n </ChatMessage>\n ) : (\n <Reply\n avatar={layout === 'panel'}\n key={message.id}\n message={message}\n onFeedback={onFeedback}\n />\n )\n )}\n </ChatMessageList>\n </div>\n <div className=\"px-4 pb-4\">\n <div className={column}>{composer}</div>\n </div>\n </div>\n )\n}\n\nexport interface ChatPanelProps extends ChatThreadProps {\n /** Closes the panel; the close button is drawn only when it is given. */\n onClose?: () => void\n /** Starts a new conversation; the button is drawn only when it is given. */\n onNewChat?: () => void\n /** The panel's heading and the name of its region. */\n title?: string\n}\n\n/*\n * A side panel next to the product. The layout places it and sets its width\n * (about 24rem beside the page, or a Sheet on phones); it fills its height and\n * the transcript scrolls inside it.\n */\nexport function ChatPanel({ onClose, onNewChat, title = 'Assistant', ...thread }: ChatPanelProps) {\n return (\n <section\n aria-label={title}\n className=\"bg-background text-foreground flex h-full min-h-0 flex-col\"\n >\n <header className=\"border-border flex h-14 shrink-0 items-center gap-2 border-b px-4\">\n <Sparkles aria-hidden className=\"text-muted-foreground size-4\" />\n <h2 className=\"text-foreground text-sm font-semibold\">{title}</h2>\n <div className=\"ms-auto flex items-center gap-1\">\n {onNewChat ? (\n <Button aria-label=\"New chat\" onClick={onNewChat} size=\"icon-sm\" variant=\"ghost\">\n <SquarePen aria-hidden />\n </Button>\n ) : null}\n {onClose ? (\n <Button aria-label=\"Close assistant\" onClick={onClose} size=\"icon-sm\" variant=\"ghost\">\n <X aria-hidden />\n </Button>\n ) : null}\n </div>\n </header>\n <ChatThread {...thread} />\n </section>\n )\n}\n"
15159
+ "source": "import type { ChatComposerStatus, ChatStepStatus } from '@atom63/ui-foundation'\nimport {\n Avatar,\n AvatarFallback,\n Button,\n ChatComposer,\n ChatMessage,\n ChatMessageList,\n ChatStep,\n ChatSteps,\n ChatTypingIndicator,\n CopyButton,\n} from '@atom63/ui-react'\nimport { Plus, Sparkles, SquarePen, ThumbsDown, ThumbsUp, X } from 'lucide-react'\nimport { type ReactNode, useEffect, useRef } from 'react'\n\nexport const template = {\n id: 'chat-panel',\n kind: 'block',\n title: 'Chat panel',\n description:\n 'An AI assistant beside the product: a side panel with a header, the transcript (user bubbles, plain assistant replies with tool steps, typing dots and copy and feedback actions), a start screen with suggestion chips when the conversation is empty, and the composer with send and stop and the AI disclaimer. ChatThread is the same conversation without the panel, for a full page. Wire it to @atom63/agent or any runtime through props.',\n category: 'ai',\n tags: [\n 'chat',\n 'assistant',\n 'ai',\n 'ai assistant',\n 'agent',\n 'copilot',\n 'conversation',\n 'messages',\n 'side panel',\n 'composer',\n 'prompt',\n 'suggestions',\n ],\n readiness: 'draft',\n} as const\n\nexport interface ChatPanelStep {\n label: string\n status: ChatStepStatus\n}\n\nexport interface ChatPanelMessage {\n from: 'assistant' | 'user'\n id: string\n /** Tool or thinking steps shown above an assistant reply. */\n steps?: readonly ChatPanelStep[]\n /** True while the reply is still arriving. */\n streaming?: boolean\n text: string\n}\n\nexport interface ChatThreadProps {\n /** A leading composer control, such as an attach button; a `+` button by default. */\n attach?: ReactNode\n /** The line under the composer. */\n disclaimer?: string\n /** The start screen's heading when there are no messages. */\n greeting?: string\n /**\n * `panel` fills a narrow column and gives replies an avatar; `page` centres a\n * 48rem reading column (the composer's width too) with replies at its full\n * width.\n */\n layout?: 'page' | 'panel'\n messages: readonly ChatPanelMessage[]\n /** Adds thumbs up and down to finished replies. */\n onFeedback?: (messageId: string, value: 'down' | 'up') => void\n onSend: (text: string) => void\n onStop?: () => void\n placeholder?: string\n /** `submitted` or `streaming` turns send into stop. */\n status?: ChatComposerStatus\n /** Starter prompts on the start screen; one tap sends it. */\n suggestions?: readonly string[]\n}\n\nconst assistantAvatar = (\n <Avatar size=\"sm\">\n <AvatarFallback>\n <Sparkles aria-hidden />\n </AvatarFallback>\n </Avatar>\n)\n\nfunction Reply({\n avatar,\n message,\n onFeedback,\n}: {\n avatar: boolean\n message: ChatPanelMessage\n onFeedback?: ChatThreadProps['onFeedback']\n}) {\n const running = message.steps?.some(step => step.status === 'running') ?? false\n const done = !message.streaming && message.text !== ''\n return (\n <ChatMessage\n actions={\n done ? (\n <>\n <CopyButton label=\"Copy reply\" size=\"icon-xs\" value={message.text} />\n {onFeedback ? (\n <>\n <Button\n aria-label=\"Good reply\"\n onClick={() => onFeedback(message.id, 'up')}\n size=\"icon-xs\"\n tone=\"muted\"\n variant=\"ghost\"\n >\n <ThumbsUp aria-hidden />\n </Button>\n <Button\n aria-label=\"Bad reply\"\n onClick={() => onFeedback(message.id, 'down')}\n size=\"icon-xs\"\n tone=\"muted\"\n variant=\"ghost\"\n >\n <ThumbsDown aria-hidden />\n </Button>\n </>\n ) : null}\n </>\n ) : null\n }\n avatar={avatar ? assistantAvatar : undefined}\n from=\"assistant\"\n streaming={message.streaming}\n >\n {message.steps?.length ? (\n <ChatSteps\n defaultOpen={running}\n label={running ? 'Working' : `Used ${message.steps.length} tools`}\n >\n {message.steps.map(step => (\n <ChatStep key={step.label} status={step.status}>\n {step.label}\n </ChatStep>\n ))}\n </ChatSteps>\n ) : null}\n {message.text === '' && message.streaming ? (\n <ChatTypingIndicator />\n ) : (\n <p className=\"whitespace-pre-wrap\">{message.text}</p>\n )}\n </ChatMessage>\n )\n}\n\n/*\n * The conversation: a scrolling transcript over the composer. With no\n * messages it shows the start screen, a greeting and suggestion chips. It\n * scrolls to the newest turn as turns arrive. It holds no conversation state:\n * the host passes the messages and status and handles send and stop, from\n * `@atom63/agent` (map each AgentMessage to { id, from: role, text:\n * getMessageText(message), streaming: status === 'streaming' }) or any other\n * runtime.\n */\nexport function ChatThread({\n attach,\n disclaimer = 'AI can make mistakes. Check important info.',\n greeting = 'How can I help?',\n layout = 'panel',\n messages,\n onFeedback,\n onSend,\n onStop,\n placeholder = 'Ask anything',\n status = 'idle',\n suggestions = [],\n}: ChatThreadProps) {\n const scroller = useRef<HTMLDivElement>(null)\n const last = messages.at(-1)\n const lastText = last?.text.length ?? 0\n\n useEffect(() => {\n const element = scroller.current\n if (element) element.scrollTop = element.scrollHeight\n }, [messages.length, lastText])\n\n const column = layout === 'page' ? 'mx-auto w-full max-w-3xl' : 'w-full'\n const composer = (\n <ChatComposer\n attach={\n attach ?? (\n <Button\n aria-label=\"Attach a file\"\n shape=\"round\"\n size=\"icon-sm\"\n tone=\"muted\"\n variant=\"ghost\"\n >\n <Plus aria-hidden />\n </Button>\n )\n }\n footnote={disclaimer}\n onStop={onStop}\n onSubmit={onSend}\n placeholder={placeholder}\n status={status}\n />\n )\n\n if (messages.length === 0) {\n return (\n <div className=\"flex min-h-0 flex-1 flex-col justify-center overflow-y-auto px-4 py-8\">\n <div className={`${column} flex flex-col gap-6`}>\n <h2\n className={`font-heading text-foreground text-center font-semibold ${\n layout === 'page' ? 'text-3xl' : 'text-xl'\n }`}\n >\n {greeting}\n </h2>\n {composer}\n {suggestions.length ? (\n <ul aria-label=\"Suggestions\" className=\"flex flex-wrap justify-center gap-2\">\n {suggestions.map(suggestion => (\n <li key={suggestion}>\n <Button\n onClick={() => onSend(suggestion)}\n shape=\"round\"\n size=\"sm\"\n variant=\"outline\"\n >\n {suggestion}\n </Button>\n </li>\n ))}\n </ul>\n ) : null}\n </div>\n </div>\n )\n }\n\n return (\n <div className=\"flex min-h-0 flex-1 flex-col\">\n <div className=\"min-h-0 flex-1 overflow-y-auto px-4 py-6\" ref={scroller}>\n <ChatMessageList aria-label=\"Conversation\" className={column} tabIndex={0}>\n {messages.map(message =>\n message.from === 'user' ? (\n <ChatMessage from=\"user\" key={message.id}>\n {message.text}\n </ChatMessage>\n ) : (\n <Reply\n avatar={layout === 'panel'}\n key={message.id}\n message={message}\n onFeedback={onFeedback}\n />\n )\n )}\n </ChatMessageList>\n </div>\n <div className=\"px-4 pb-4\">\n <div className={column}>{composer}</div>\n </div>\n </div>\n )\n}\n\nexport interface ChatPanelProps extends ChatThreadProps {\n /** Closes the panel; the close button is drawn only when it is given. */\n onClose?: () => void\n /** Starts a new conversation; the button is drawn only when it is given. */\n onNewChat?: () => void\n /** The panel's heading and the name of its region. */\n title?: string\n}\n\n/*\n * A side panel next to the product. The layout places it and sets its width\n * (about 24rem beside the page, or a Sheet on phones); it fills its height and\n * the transcript scrolls inside it.\n */\nexport function ChatPanel({ onClose, onNewChat, title = 'Assistant', ...thread }: ChatPanelProps) {\n return (\n <section\n aria-label={title}\n className=\"bg-background text-foreground flex h-full min-h-0 flex-col\"\n >\n <header className=\"border-border flex h-14 shrink-0 items-center gap-2 border-b px-4\">\n <Sparkles aria-hidden className=\"text-muted-foreground size-4\" />\n <h2 className=\"text-foreground text-sm font-semibold\">{title}</h2>\n <div className=\"ms-auto flex items-center gap-1\">\n {onNewChat ? (\n <Button\n aria-label=\"New chat\"\n onClick={onNewChat}\n size=\"icon-sm\"\n tone=\"muted\"\n variant=\"ghost\"\n >\n <SquarePen aria-hidden />\n </Button>\n ) : null}\n {onClose ? (\n <Button\n aria-label=\"Close assistant\"\n onClick={onClose}\n size=\"icon-sm\"\n tone=\"muted\"\n variant=\"ghost\"\n >\n <X aria-hidden />\n </Button>\n ) : null}\n </div>\n </header>\n <ChatThread {...thread} />\n </section>\n )\n}\n"
14752
15160
  }
14753
15161
  ]
14754
15162
  },
@@ -14781,7 +15189,7 @@
14781
15189
  "files": [
14782
15190
  {
14783
15191
  "path": "blocks/data-table-section/data-table-section.tsx",
14784
- "source": "import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@atom63/ui-react'\nimport { SearchX } from 'lucide-react'\nimport type { ReactNode } from 'react'\n\nimport { EmptyState } from '../empty-state/empty-state'\n\nexport const template = {\n id: 'data-table-section',\n kind: 'block',\n title: 'Data table section',\n description:\n 'A collection shown as a table on wide screens and as stacked rows on phones, with a live result count, per-row actions and an empty state that offers a way out.',\n category: 'collections',\n tags: ['table', 'list', 'rows', 'responsive', 'empty state', 'results'],\n readiness: 'ready',\n} as const\n\nexport interface DataTableColumn<Row> {\n /** `end` for numbers and amounts, so digits line up. */\n align?: 'start' | 'end'\n cell: (row: Row) => ReactNode\n header: string\n key: string\n /** The table width at which this column first appears. */\n showFrom?: 'sm' | 'md' | 'lg'\n}\n\nexport interface DataTableEmpty {\n /** The next step, usually a button that clears the filters. */\n action?: ReactNode\n description: string\n title: string\n}\n\nexport interface DataTableSectionProps<Row> {\n /** Names the table and the phone list for assistive technology. */\n label: string\n /** The first column is the row's title in the phone layout. */\n columns: readonly DataTableColumn<Row>[]\n empty: DataTableEmpty\n getRowKey: (row: Row) => string\n /** Heading level of the empty state's title: one below the heading above the section. */\n headingLevel?: 2 | 3 | 4\n /** Product-specific phone composition; the table remains column-driven. */\n renderPhoneRow?: (row: Row) => ReactNode\n rowActions?: (row: Row) => ReactNode\n rows: readonly Row[]\n /** Highlights the open record without making the row itself interactive. */\n selectedRowKey?: string\n /** A short count such as \"12 of 25 invoices\", announced when it changes. */\n summary: string\n}\n\nconst alignClass = (align: DataTableColumn<unknown>['align']) =>\n align === 'end' ? 'text-end tabular-nums' : 'text-start'\n\nconst showFromClass = {\n sm: '',\n md: 'hidden md:table-cell',\n lg: 'hidden lg:table-cell',\n} as const\n\nconst columnClass = <Row,>(column: DataTableColumn<Row>) =>\n `${alignClass(column.align)} ${showFromClass[column.showFrom ?? 'sm']}`.trim()\n\n/*\n * A wide table does not fit a phone, so below `sm` each row becomes a stacked\n * item: the first column is its title and the rest are label and value pairs.\n * Only one layout is displayed at a time; the hidden one is out of the\n * accessibility tree.\n */\nexport function DataTableSection<Row>({\n columns,\n empty,\n getRowKey,\n headingLevel = 2,\n label,\n renderPhoneRow,\n rowActions,\n rows,\n selectedRowKey,\n summary,\n}: DataTableSectionProps<Row>) {\n const [titleColumn, ...detailColumns] = columns\n return (\n <div className=\"flex flex-col gap-3\">\n <p aria-live=\"polite\" className=\"text-muted-foreground text-sm\">\n {summary}\n </p>\n {rows.length === 0 ? (\n <EmptyState\n action={empty.action}\n description={empty.description}\n headingLevel={headingLevel}\n icon={<SearchX aria-hidden />}\n title={empty.title}\n />\n ) : (\n <>\n {/* A `frame` ancestor draws the table as a bordered card, like the phone list. */}\n <div className=\"hidden sm:block\" data-slot=\"frame\">\n <Table aria-label={label}>\n <TableHeader>\n <TableRow>\n {columns.map(column => (\n <TableHead className={columnClass(column)} key={column.key}>\n {column.header}\n </TableHead>\n ))}\n {rowActions ? (\n <TableHead className=\"w-0\">\n <span className=\"sr-only\">Actions</span>\n </TableHead>\n ) : null}\n </TableRow>\n </TableHeader>\n <TableBody>\n {rows.map(row => (\n <TableRow\n data-selected={getRowKey(row) === selectedRowKey ? '' : undefined}\n key={getRowKey(row)}\n >\n {columns.map(column => (\n <TableCell className={columnClass(column)} key={column.key}>\n {column.cell(row)}\n </TableCell>\n ))}\n {rowActions ? (\n <TableCell className=\"text-end\">{rowActions(row)}</TableCell>\n ) : null}\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </div>\n <ul\n aria-label={label}\n className=\"divide-border border-border flex flex-col divide-y rounded-lg border sm:hidden\"\n >\n {rows.map(row => (\n <li\n className={renderPhoneRow ? undefined : 'flex items-start gap-3 p-4'}\n key={getRowKey(row)}\n >\n {renderPhoneRow ? (\n renderPhoneRow(row)\n ) : (\n <>\n <div className=\"flex min-w-0 flex-1 flex-col gap-2\">\n {titleColumn ? (\n <div className=\"text-foreground font-medium\">{titleColumn.cell(row)}</div>\n ) : null}\n <dl className=\"grid grid-cols-[auto_minmax(0,1fr)] gap-x-4 gap-y-1 text-sm\">\n {detailColumns.map(column => (\n <div className=\"contents\" key={column.key}>\n <dt className=\"text-muted-foreground\">{column.header}</dt>\n <dd className={column.align === 'end' ? 'tabular-nums' : undefined}>\n {column.cell(row)}\n </dd>\n </div>\n ))}\n </dl>\n </div>\n {rowActions ? rowActions(row) : null}\n </>\n )}\n </li>\n ))}\n </ul>\n </>\n )}\n </div>\n )\n}\n"
15192
+ "source": "import {\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n type TableSort,\n type TableSortDirection,\n} from '@atom63/ui-react'\nimport { SearchX } from 'lucide-react'\nimport type { ReactNode } from 'react'\n\nimport { EmptyState } from '../empty-state/empty-state'\n\nexport const template = {\n id: 'data-table-section',\n kind: 'block',\n title: 'Data table section',\n description:\n 'A collection shown as a table on wide screens and as stacked rows on phones, with a live result count, per-row actions and an empty state that offers a way out.',\n category: 'collections',\n tags: ['table', 'list', 'rows', 'responsive', 'empty state', 'results'],\n readiness: 'ready',\n} as const\n\nexport interface DataTableColumn<Row> {\n /** `end` for numbers and amounts, so digits line up. */\n align?: 'start' | 'end'\n cell: (row: Row) => ReactNode\n header: string\n key: string\n /** Makes the header a sort button. Its `key` is the `sort.column` it reports; the caller\n * sorts the rows. */\n sortable?: boolean\n /** The direction a first press sorts this column in, such as `descending` for amounts. */\n firstSortDirection?: TableSortDirection\n /** The table width at which this column first appears. */\n showFrom?: 'sm' | 'md' | 'lg'\n}\n\nexport interface DataTableEmpty {\n /** The next step, usually a button that clears the filters. */\n action?: ReactNode\n description: string\n title: string\n}\n\nexport interface DataTableSectionProps<Row> {\n /** Names the table and the phone list for assistive technology. */\n label: string\n /** The first column is the row's title in the phone layout. */\n columns: readonly DataTableColumn<Row>[]\n empty: DataTableEmpty\n getRowKey: (row: Row) => string\n /** Heading level of the empty state's title: one below the heading above the section. */\n headingLevel?: 2 | 3 | 4\n /** Product-specific phone composition; the table remains column-driven. */\n renderPhoneRow?: (row: Row) => ReactNode\n rowActions?: (row: Row) => ReactNode\n rows: readonly Row[]\n /** Highlights the open record without making the row itself interactive. */\n selectedRowKey?: string\n /** A short count such as \"12 of 25 invoices\", announced when it changes. */\n summary: string\n /** The column the rows are sorted by (controlled). The caller sorts `rows`. */\n sort?: TableSort | null\n /** Called when a sortable header is pressed, with the sort to apply. */\n onSortChange?: (sort: TableSort) => void\n /** Shown under the rows in both layouts, usually a `Pagination`; the caller passes the page of\n * `rows` it shows. */\n pagination?: ReactNode\n}\n\nconst alignClass = (align: DataTableColumn<unknown>['align']) =>\n align === 'end' ? 'text-end tabular-nums' : 'text-start'\n\nconst showFromClass = {\n sm: '',\n md: 'hidden md:table-cell',\n lg: 'hidden lg:table-cell',\n} as const\n\nconst columnClass = <Row,>(column: DataTableColumn<Row>) =>\n `${alignClass(column.align)} ${showFromClass[column.showFrom ?? 'sm']}`.trim()\n\n/*\n * A wide table does not fit a phone, so below `sm` each row becomes a stacked\n * item: the first column is its title and the rest are label and value pairs.\n * Only one layout is displayed at a time; the hidden one is out of the\n * accessibility tree.\n */\nexport function DataTableSection<Row>({\n columns,\n empty,\n getRowKey,\n headingLevel = 2,\n label,\n onSortChange,\n pagination,\n renderPhoneRow,\n rowActions,\n rows,\n selectedRowKey,\n sort,\n summary,\n}: DataTableSectionProps<Row>) {\n const [titleColumn, ...detailColumns] = columns\n return (\n <div className=\"flex flex-col gap-3\">\n <p aria-live=\"polite\" className=\"text-muted-foreground text-sm\">\n {summary}\n </p>\n {rows.length === 0 ? (\n <EmptyState\n action={empty.action}\n description={empty.description}\n headingLevel={headingLevel}\n icon={<SearchX aria-hidden />}\n title={empty.title}\n />\n ) : (\n <>\n {/* A `frame` ancestor draws the table as a bordered card, like the phone list. */}\n <div className=\"hidden sm:block\" data-slot=\"frame\">\n <Table aria-label={label} onSortChange={onSortChange} sort={sort}>\n <TableHeader>\n <TableRow>\n {columns.map(column => (\n <TableHead\n className={columnClass(column)}\n firstSortDirection={column.firstSortDirection}\n key={column.key}\n sortKey={column.sortable ? column.key : undefined}\n >\n {column.header}\n </TableHead>\n ))}\n {rowActions ? (\n <TableHead className=\"w-0\">\n <span className=\"sr-only\">Actions</span>\n </TableHead>\n ) : null}\n </TableRow>\n </TableHeader>\n <TableBody>\n {rows.map(row => (\n <TableRow\n data-selected={getRowKey(row) === selectedRowKey ? '' : undefined}\n key={getRowKey(row)}\n >\n {columns.map(column => (\n <TableCell className={columnClass(column)} key={column.key}>\n {column.cell(row)}\n </TableCell>\n ))}\n {rowActions ? (\n <TableCell className=\"text-end\">{rowActions(row)}</TableCell>\n ) : null}\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </div>\n <ul\n aria-label={label}\n className=\"divide-border border-border flex flex-col divide-y rounded-lg border sm:hidden\"\n >\n {rows.map(row => (\n <li\n className={renderPhoneRow ? undefined : 'flex items-start gap-3 p-4'}\n key={getRowKey(row)}\n >\n {renderPhoneRow ? (\n renderPhoneRow(row)\n ) : (\n <>\n <div className=\"flex min-w-0 flex-1 flex-col gap-2\">\n {titleColumn ? (\n <div className=\"text-foreground font-medium\">{titleColumn.cell(row)}</div>\n ) : null}\n <dl className=\"grid grid-cols-[auto_minmax(0,1fr)] gap-x-4 gap-y-1 text-sm\">\n {detailColumns.map(column => (\n <div className=\"contents\" key={column.key}>\n <dt className=\"text-muted-foreground\">{column.header}</dt>\n <dd className={column.align === 'end' ? 'tabular-nums' : undefined}>\n {column.cell(row)}\n </dd>\n </div>\n ))}\n </dl>\n </div>\n {rowActions ? rowActions(row) : null}\n </>\n )}\n </li>\n ))}\n </ul>\n {pagination}\n </>\n )}\n </div>\n )\n}\n"
14785
15193
  }
14786
15194
  ]
14787
15195
  },
@@ -14872,7 +15280,7 @@
14872
15280
  "files": [
14873
15281
  {
14874
15282
  "path": "blocks/filter-bar/filter-bar.tsx",
14875
- "source": "import {\n Button,\n Field,\n FieldLabel,\n Input,\n Select,\n SelectItem,\n SelectPopup,\n SelectTrigger,\n SelectValue,\n} from '@atom63/ui-react'\nimport { useId } from 'react'\n\nexport const template = {\n id: 'filter-bar',\n kind: 'block',\n title: 'Filter bar',\n description:\n 'A labelled search field and one select filter above a collection, with a clear action that appears once a filter is set.',\n category: 'collections',\n tags: ['search', 'filter', 'toolbar', 'list', 'table'],\n readiness: 'ready',\n} as const\n\nexport interface FilterBarOption {\n label: string\n value: string\n}\n\nexport interface FilterBarProps {\n /** Shown as the filter's visible label, for example \"Status\". */\n filterLabel: string\n filterOptions: readonly FilterBarOption[]\n filterValue: string\n onClear: () => void\n onFilterChange: (value: string) => void\n onQueryChange: (query: string) => void\n query: string\n /** Shown as the search field's visible label, for example \"Search invoices\". */\n searchLabel: string\n searchPlaceholder?: string\n /** Whether any filter differs from its default; shows the clear action. */\n showClear: boolean\n}\n\n/*\n * Controls stack on a phone and sit on one row from `sm`, the search taking\n * the remaining width. Both fields keep a\n * visible label, the row is a search landmark, and the clear action is a\n * ghost button so the page's primary action stays the only strong one.\n */\nexport function FilterBar({\n filterLabel,\n filterOptions,\n filterValue,\n onClear,\n onFilterChange,\n onQueryChange,\n query,\n searchLabel,\n searchPlaceholder,\n showClear,\n}: FilterBarProps) {\n const searchId = useId()\n const filterLabelId = useId()\n return (\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-end\" role=\"search\">\n <Field className=\"sm:flex-1\">\n <FieldLabel htmlFor={searchId}>{searchLabel}</FieldLabel>\n <Input\n id={searchId}\n onChange={event => onQueryChange(event.target.value)}\n placeholder={searchPlaceholder}\n type=\"search\"\n value={query}\n />\n </Field>\n <Field className=\"sm:w-48\">\n <FieldLabel id={filterLabelId}>{filterLabel}</FieldLabel>\n <Select\n items={filterOptions}\n onValueChange={next => onFilterChange(next ?? filterOptions[0]?.value ?? '')}\n value={filterValue}\n >\n <SelectTrigger aria-labelledby={filterLabelId}>\n <SelectValue />\n </SelectTrigger>\n <SelectPopup>\n {filterOptions.map(option => (\n <SelectItem key={option.value} value={option.value}>\n {option.label}\n </SelectItem>\n ))}\n </SelectPopup>\n </Select>\n </Field>\n {showClear ? (\n <Button onClick={onClear} variant=\"ghost\">\n Clear filters\n </Button>\n ) : null}\n </div>\n )\n}\n"
15283
+ "source": "import {\n Button,\n Field,\n FieldLabel,\n Input,\n Select,\n SelectItem,\n SelectPopup,\n SelectTrigger,\n SelectValue,\n} from '@atom63/ui-react'\nimport { useId } from 'react'\n\nexport const template = {\n id: 'filter-bar',\n kind: 'block',\n title: 'Filter bar',\n description:\n 'A labelled search field and one select filter above a collection, with a clear action that appears once a filter is set.',\n category: 'collections',\n tags: ['search', 'filter', 'toolbar', 'list', 'table'],\n readiness: 'ready',\n} as const\n\nexport interface FilterBarOption {\n label: string\n value: string\n}\n\nexport interface FilterBarProps {\n /** Shown as the filter's visible label, for example \"Status\". */\n filterLabel: string\n filterOptions: readonly FilterBarOption[]\n filterValue: string\n onClear: () => void\n onFilterChange: (value: string) => void\n onQueryChange: (query: string) => void\n query: string\n /** Shown as the search field's visible label, for example \"Search invoices\". */\n searchLabel: string\n searchPlaceholder?: string\n /** Whether any filter differs from its default; shows the clear action. */\n showClear: boolean\n}\n\n/*\n * Controls stack on a phone and sit on one row from `sm`, the search taking\n * the remaining width. Both fields keep a\n * visible label, the row is a search landmark, and the clear action is a\n * ghost button so the page's primary action stays the only strong one.\n */\nexport function FilterBar({\n filterLabel,\n filterOptions,\n filterValue,\n onClear,\n onFilterChange,\n onQueryChange,\n query,\n searchLabel,\n searchPlaceholder,\n showClear,\n}: FilterBarProps) {\n const searchId = useId()\n const filterLabelId = useId()\n return (\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-end\" role=\"search\">\n <Field className=\"sm:flex-1\">\n <FieldLabel htmlFor={searchId}>{searchLabel}</FieldLabel>\n <Input\n id={searchId}\n onChange={event => onQueryChange(event.target.value)}\n placeholder={searchPlaceholder}\n type=\"search\"\n value={query}\n />\n </Field>\n <Field className=\"sm:w-48\">\n <FieldLabel id={filterLabelId}>{filterLabel}</FieldLabel>\n <Select\n items={filterOptions}\n onValueChange={next => onFilterChange(next ?? filterOptions[0]?.value ?? '')}\n value={filterValue}\n >\n <SelectTrigger aria-labelledby={filterLabelId}>\n <SelectValue />\n </SelectTrigger>\n <SelectPopup>\n {filterOptions.map(option => (\n <SelectItem key={option.value} value={option.value}>\n {option.label}\n </SelectItem>\n ))}\n </SelectPopup>\n </Select>\n </Field>\n {showClear ? (\n <Button onClick={onClear} tone=\"muted\" variant=\"ghost\">\n Clear filters\n </Button>\n ) : null}\n </div>\n )\n}\n"
14876
15284
  }
14877
15285
  ]
14878
15286
  },
@@ -15230,6 +15638,10 @@
15230
15638
  {
15231
15639
  "scope": ":root, .light, [data-a63-mode='light']",
15232
15640
  "value": "var(--color-danger-600)"
15641
+ },
15642
+ {
15643
+ "scope": "[data-a63-brand], [data-a63-surface]",
15644
+ "value": "var(--color-danger-600)"
15233
15645
  }
15234
15646
  ]
15235
15647
  },
@@ -15246,6 +15658,10 @@
15246
15658
  {
15247
15659
  "scope": ":root, .light, [data-a63-mode='light']",
15248
15660
  "value": "white"
15661
+ },
15662
+ {
15663
+ "scope": "[data-a63-brand], [data-a63-surface]",
15664
+ "value": "white"
15249
15665
  }
15250
15666
  ]
15251
15667
  },
@@ -15266,6 +15682,10 @@
15266
15682
  {
15267
15683
  "scope": ":root, .light, [data-a63-mode='light']",
15268
15684
  "value": "color-mix(in oklch, var(--a63-action-danger) 90%, transparent)"
15685
+ },
15686
+ {
15687
+ "scope": "[data-a63-brand], [data-a63-surface]",
15688
+ "value": "var( --a63-if-light, color-mix(in oklch, var(--a63-action-danger) 90%, transparent) ) var(--a63-if-dark, color-mix(in oklch, var(--a63-action-danger) 82%, white 8%))"
15269
15689
  }
15270
15690
  ]
15271
15691
  },
@@ -15286,6 +15706,10 @@
15286
15706
  {
15287
15707
  "scope": ":root, .light, [data-a63-mode='light']",
15288
15708
  "value": "color-mix(in oklab, var(--a63-action-danger) 14%, transparent)"
15709
+ },
15710
+ {
15711
+ "scope": "[data-a63-brand], [data-a63-surface]",
15712
+ "value": "color-mix(in oklab, var(--a63-action-danger) 14%, transparent)"
15289
15713
  }
15290
15714
  ]
15291
15715
  },
@@ -15306,6 +15730,10 @@
15306
15730
  {
15307
15731
  "scope": ":root, .light, [data-a63-mode='light']",
15308
15732
  "value": "var(--color-danger-700)"
15733
+ },
15734
+ {
15735
+ "scope": "[data-a63-brand], [data-a63-surface]",
15736
+ "value": "var(--a63-if-light, var(--color-danger-700)) var(--a63-if-dark, var(--color-danger-400))"
15309
15737
  }
15310
15738
  ]
15311
15739
  },
@@ -15326,6 +15754,10 @@
15326
15754
  {
15327
15755
  "scope": ":root, .light, [data-a63-mode='light']",
15328
15756
  "value": "var(--a63-surface-muted)"
15757
+ },
15758
+ {
15759
+ "scope": "[data-a63-brand], [data-a63-surface]",
15760
+ "value": "var(--a63-surface-muted)"
15329
15761
  }
15330
15762
  ]
15331
15763
  },
@@ -15346,6 +15778,10 @@
15346
15778
  {
15347
15779
  "scope": ":root, .light, [data-a63-mode='light']",
15348
15780
  "value": "var(--a63-border-subtle)"
15781
+ },
15782
+ {
15783
+ "scope": "[data-a63-brand], [data-a63-surface]",
15784
+ "value": "var(--a63-border-subtle)"
15349
15785
  }
15350
15786
  ]
15351
15787
  },
@@ -15366,6 +15802,10 @@
15366
15802
  {
15367
15803
  "scope": ":root, .light, [data-a63-mode='light']",
15368
15804
  "value": "var(--surface-light-9)"
15805
+ },
15806
+ {
15807
+ "scope": "[data-a63-brand], [data-a63-surface]",
15808
+ "value": "var(--a63-if-light, var(--surface-light-9)) var(--a63-if-dark, var(--surface-dark-9))"
15369
15809
  }
15370
15810
  ]
15371
15811
  },
@@ -15403,6 +15843,10 @@
15403
15843
  "scope": "[data-a63-theme='terminal']:is(.dark, [data-a63-mode='dark']), [data-a63-theme='terminal'] :is(.dark, [data-a63-mode='dark'])",
15404
15844
  "value": "color-mix( in oklab, var(--surface-dark-3) 86%, var(--a63-action-primary) 14% )"
15405
15845
  },
15846
+ {
15847
+ "scope": "[data-a63-theme='terminal']:is([data-a63-brand], [data-a63-surface]), [data-a63-theme='terminal'] :is([data-a63-brand], [data-a63-surface])",
15848
+ "value": "var(--a63-if-light, color-mix(in oklab, var(--surface-light-3) 60%, white)) var( --a63-if-dark, color-mix(in oklab, var(--surface-dark-3) 86%, var(--a63-action-primary) 14%) )"
15849
+ },
15406
15850
  {
15407
15851
  "scope": ":is(.dark, [data-a63-mode='dark'])",
15408
15852
  "value": "var(--surface-dark-12)"
@@ -15410,6 +15854,10 @@
15410
15854
  {
15411
15855
  "scope": ":root, .light, [data-a63-mode='light']",
15412
15856
  "value": "var(--surface-light-12)"
15857
+ },
15858
+ {
15859
+ "scope": "[data-a63-brand], [data-a63-surface]",
15860
+ "value": "var(--a63-if-light, var(--surface-light-12)) var(--a63-if-dark, var(--surface-dark-12))"
15413
15861
  }
15414
15862
  ]
15415
15863
  },
@@ -15431,6 +15879,10 @@
15431
15879
  "scope": "[data-a63-theme='terminal']:is(.dark, [data-a63-mode='dark']), [data-a63-theme='terminal'] :is(.dark, [data-a63-mode='dark'])",
15432
15880
  "value": "var(--a63-text-accent)"
15433
15881
  },
15882
+ {
15883
+ "scope": "[data-a63-theme='terminal']:is([data-a63-brand], [data-a63-surface]), [data-a63-theme='terminal'] :is([data-a63-brand], [data-a63-surface])",
15884
+ "value": "var( --a63-if-light, color-mix(in oklab, var(--a63-action-primary) 80%, var(--surface-light-12)) ) var(--a63-if-dark, var(--a63-text-accent))"
15885
+ },
15434
15886
  {
15435
15887
  "scope": ":is(.dark, [data-a63-mode='dark'])",
15436
15888
  "value": "var(--surface-dark-1)"
@@ -15438,6 +15890,10 @@
15438
15890
  {
15439
15891
  "scope": ":root, .light, [data-a63-mode='light']",
15440
15892
  "value": "var(--surface-light-2)"
15893
+ },
15894
+ {
15895
+ "scope": "[data-a63-brand], [data-a63-surface]",
15896
+ "value": "var(--a63-if-light, var(--surface-light-2)) var(--a63-if-dark, var(--surface-dark-1))"
15441
15897
  }
15442
15898
  ]
15443
15899
  },
@@ -15530,6 +15986,10 @@
15530
15986
  {
15531
15987
  "scope": ":root, .light, [data-a63-mode='light']",
15532
15988
  "value": "transparent"
15989
+ },
15990
+ {
15991
+ "scope": "[data-a63-brand], [data-a63-surface]",
15992
+ "value": "var(--a63-if-light, transparent) var(--a63-if-dark, color-mix(in oklab, var(--a63-surface-control) 32%, transparent))"
15533
15993
  }
15534
15994
  ]
15535
15995
  },
@@ -15582,6 +16042,10 @@
15582
16042
  {
15583
16043
  "scope": ":root, .light, [data-a63-mode='light']",
15584
16044
  "value": "var(--a63-category-amber)"
16045
+ },
16046
+ {
16047
+ "scope": "[data-a63-brand], [data-a63-surface]",
16048
+ "value": "var(--a63-category-amber)"
15585
16049
  }
15586
16050
  ]
15587
16051
  },
@@ -15602,6 +16066,10 @@
15602
16066
  {
15603
16067
  "scope": ":root, .light, [data-a63-mode='light']",
15604
16068
  "value": "var(--a63-category-amber-subtle-foreground)"
16069
+ },
16070
+ {
16071
+ "scope": "[data-a63-brand], [data-a63-surface]",
16072
+ "value": "var(--a63-category-amber-subtle-foreground)"
15605
16073
  }
15606
16074
  ]
15607
16075
  },
@@ -15622,6 +16090,10 @@
15622
16090
  {
15623
16091
  "scope": ":root, .light, [data-a63-mode='light']",
15624
16092
  "value": "var(--a63-category-blue)"
16093
+ },
16094
+ {
16095
+ "scope": "[data-a63-brand], [data-a63-surface]",
16096
+ "value": "var(--a63-category-blue)"
15625
16097
  }
15626
16098
  ]
15627
16099
  },
@@ -15642,6 +16114,10 @@
15642
16114
  {
15643
16115
  "scope": ":root, .light, [data-a63-mode='light']",
15644
16116
  "value": "var(--a63-category-blue-subtle-foreground)"
16117
+ },
16118
+ {
16119
+ "scope": "[data-a63-brand], [data-a63-surface]",
16120
+ "value": "var(--a63-category-blue-subtle-foreground)"
15645
16121
  }
15646
16122
  ]
15647
16123
  },
@@ -15662,6 +16138,10 @@
15662
16138
  {
15663
16139
  "scope": ":root, .light, [data-a63-mode='light']",
15664
16140
  "value": "var(--a63-category-cyan)"
16141
+ },
16142
+ {
16143
+ "scope": "[data-a63-brand], [data-a63-surface]",
16144
+ "value": "var(--a63-category-cyan)"
15665
16145
  }
15666
16146
  ]
15667
16147
  },
@@ -15682,6 +16162,10 @@
15682
16162
  {
15683
16163
  "scope": ":root, .light, [data-a63-mode='light']",
15684
16164
  "value": "var(--a63-category-cyan-subtle-foreground)"
16165
+ },
16166
+ {
16167
+ "scope": "[data-a63-brand], [data-a63-surface]",
16168
+ "value": "var(--a63-category-cyan-subtle-foreground)"
15685
16169
  }
15686
16170
  ]
15687
16171
  },
@@ -15702,6 +16186,10 @@
15702
16186
  {
15703
16187
  "scope": ":root, .light, [data-a63-mode='light']",
15704
16188
  "value": "var(--a63-category-emerald)"
16189
+ },
16190
+ {
16191
+ "scope": "[data-a63-brand], [data-a63-surface]",
16192
+ "value": "var(--a63-category-emerald)"
15705
16193
  }
15706
16194
  ]
15707
16195
  },
@@ -15722,6 +16210,10 @@
15722
16210
  {
15723
16211
  "scope": ":root, .light, [data-a63-mode='light']",
15724
16212
  "value": "var(--a63-category-emerald-subtle-foreground)"
16213
+ },
16214
+ {
16215
+ "scope": "[data-a63-brand], [data-a63-surface]",
16216
+ "value": "var(--a63-category-emerald-subtle-foreground)"
15725
16217
  }
15726
16218
  ]
15727
16219
  },
@@ -15742,6 +16234,10 @@
15742
16234
  {
15743
16235
  "scope": ":root, .light, [data-a63-mode='light']",
15744
16236
  "value": "var(--a63-action-danger-subtle-foreground)"
16237
+ },
16238
+ {
16239
+ "scope": "[data-a63-brand], [data-a63-surface]",
16240
+ "value": "var(--a63-action-danger-subtle-foreground)"
15745
16241
  }
15746
16242
  ]
15747
16243
  },
@@ -15762,6 +16258,10 @@
15762
16258
  {
15763
16259
  "scope": ":root, .light, [data-a63-mode='light']",
15764
16260
  "value": "var(--a63-category-fuchsia)"
16261
+ },
16262
+ {
16263
+ "scope": "[data-a63-brand], [data-a63-surface]",
16264
+ "value": "var(--a63-category-fuchsia)"
15765
16265
  }
15766
16266
  ]
15767
16267
  },
@@ -15782,6 +16282,10 @@
15782
16282
  {
15783
16283
  "scope": ":root, .light, [data-a63-mode='light']",
15784
16284
  "value": "var(--a63-category-fuchsia-subtle-foreground)"
16285
+ },
16286
+ {
16287
+ "scope": "[data-a63-brand], [data-a63-surface]",
16288
+ "value": "var(--a63-category-fuchsia-subtle-foreground)"
15785
16289
  }
15786
16290
  ]
15787
16291
  },
@@ -15802,6 +16306,10 @@
15802
16306
  {
15803
16307
  "scope": ":root, .light, [data-a63-mode='light']",
15804
16308
  "value": "var(--a63-category-green)"
16309
+ },
16310
+ {
16311
+ "scope": "[data-a63-brand], [data-a63-surface]",
16312
+ "value": "var(--a63-category-green)"
15805
16313
  }
15806
16314
  ]
15807
16315
  },
@@ -15822,6 +16330,10 @@
15822
16330
  {
15823
16331
  "scope": ":root, .light, [data-a63-mode='light']",
15824
16332
  "value": "var(--a63-category-green-subtle-foreground)"
16333
+ },
16334
+ {
16335
+ "scope": "[data-a63-brand], [data-a63-surface]",
16336
+ "value": "var(--a63-category-green-subtle-foreground)"
15825
16337
  }
15826
16338
  ]
15827
16339
  },
@@ -15842,6 +16354,10 @@
15842
16354
  {
15843
16355
  "scope": ":root, .light, [data-a63-mode='light']",
15844
16356
  "value": "var(--a63-category-indigo)"
16357
+ },
16358
+ {
16359
+ "scope": "[data-a63-brand], [data-a63-surface]",
16360
+ "value": "var(--a63-category-indigo)"
15845
16361
  }
15846
16362
  ]
15847
16363
  },
@@ -15862,6 +16378,10 @@
15862
16378
  {
15863
16379
  "scope": ":root, .light, [data-a63-mode='light']",
15864
16380
  "value": "var(--a63-category-indigo-subtle-foreground)"
16381
+ },
16382
+ {
16383
+ "scope": "[data-a63-brand], [data-a63-surface]",
16384
+ "value": "var(--a63-category-indigo-subtle-foreground)"
15865
16385
  }
15866
16386
  ]
15867
16387
  },
@@ -15882,6 +16402,10 @@
15882
16402
  {
15883
16403
  "scope": ":root, .light, [data-a63-mode='light']",
15884
16404
  "value": "var(--a63-status-info-subtle-foreground)"
16405
+ },
16406
+ {
16407
+ "scope": "[data-a63-brand], [data-a63-surface]",
16408
+ "value": "var(--a63-status-info-subtle-foreground)"
15885
16409
  }
15886
16410
  ]
15887
16411
  },
@@ -15902,6 +16426,10 @@
15902
16426
  {
15903
16427
  "scope": ":root, .light, [data-a63-mode='light']",
15904
16428
  "value": "var(--a63-category-lime)"
16429
+ },
16430
+ {
16431
+ "scope": "[data-a63-brand], [data-a63-surface]",
16432
+ "value": "var(--a63-category-lime)"
15905
16433
  }
15906
16434
  ]
15907
16435
  },
@@ -15922,6 +16450,10 @@
15922
16450
  {
15923
16451
  "scope": ":root, .light, [data-a63-mode='light']",
15924
16452
  "value": "var(--a63-category-lime-subtle-foreground)"
16453
+ },
16454
+ {
16455
+ "scope": "[data-a63-brand], [data-a63-surface]",
16456
+ "value": "var(--a63-category-lime-subtle-foreground)"
15925
16457
  }
15926
16458
  ]
15927
16459
  },
@@ -15942,6 +16474,10 @@
15942
16474
  {
15943
16475
  "scope": ":root, .light, [data-a63-mode='light']",
15944
16476
  "value": "var(--a63-category-neutral)"
16477
+ },
16478
+ {
16479
+ "scope": "[data-a63-brand], [data-a63-surface]",
16480
+ "value": "var(--a63-category-neutral)"
15945
16481
  }
15946
16482
  ]
15947
16483
  },
@@ -15962,6 +16498,10 @@
15962
16498
  {
15963
16499
  "scope": ":root, .light, [data-a63-mode='light']",
15964
16500
  "value": "var(--a63-category-neutral-subtle-foreground)"
16501
+ },
16502
+ {
16503
+ "scope": "[data-a63-brand], [data-a63-surface]",
16504
+ "value": "var(--a63-category-neutral-subtle-foreground)"
15965
16505
  }
15966
16506
  ]
15967
16507
  },
@@ -15982,6 +16522,10 @@
15982
16522
  {
15983
16523
  "scope": ":root, .light, [data-a63-mode='light']",
15984
16524
  "value": "var(--a63-category-orange)"
16525
+ },
16526
+ {
16527
+ "scope": "[data-a63-brand], [data-a63-surface]",
16528
+ "value": "var(--a63-category-orange)"
15985
16529
  }
15986
16530
  ]
15987
16531
  },
@@ -16002,6 +16546,10 @@
16002
16546
  {
16003
16547
  "scope": ":root, .light, [data-a63-mode='light']",
16004
16548
  "value": "var(--a63-category-orange-subtle-foreground)"
16549
+ },
16550
+ {
16551
+ "scope": "[data-a63-brand], [data-a63-surface]",
16552
+ "value": "var(--a63-category-orange-subtle-foreground)"
16005
16553
  }
16006
16554
  ]
16007
16555
  },
@@ -16022,6 +16570,10 @@
16022
16570
  {
16023
16571
  "scope": ":root, .light, [data-a63-mode='light']",
16024
16572
  "value": "var(--a63-category-pink)"
16573
+ },
16574
+ {
16575
+ "scope": "[data-a63-brand], [data-a63-surface]",
16576
+ "value": "var(--a63-category-pink)"
16025
16577
  }
16026
16578
  ]
16027
16579
  },
@@ -16042,6 +16594,10 @@
16042
16594
  {
16043
16595
  "scope": ":root, .light, [data-a63-mode='light']",
16044
16596
  "value": "var(--a63-category-pink-subtle-foreground)"
16597
+ },
16598
+ {
16599
+ "scope": "[data-a63-brand], [data-a63-surface]",
16600
+ "value": "var(--a63-category-pink-subtle-foreground)"
16045
16601
  }
16046
16602
  ]
16047
16603
  },
@@ -16062,6 +16618,10 @@
16062
16618
  {
16063
16619
  "scope": ":root, .light, [data-a63-mode='light']",
16064
16620
  "value": "var(--a63-category-purple)"
16621
+ },
16622
+ {
16623
+ "scope": "[data-a63-brand], [data-a63-surface]",
16624
+ "value": "var(--a63-category-purple)"
16065
16625
  }
16066
16626
  ]
16067
16627
  },
@@ -16082,6 +16642,10 @@
16082
16642
  {
16083
16643
  "scope": ":root, .light, [data-a63-mode='light']",
16084
16644
  "value": "var(--a63-category-purple-subtle-foreground)"
16645
+ },
16646
+ {
16647
+ "scope": "[data-a63-brand], [data-a63-surface]",
16648
+ "value": "var(--a63-category-purple-subtle-foreground)"
16085
16649
  }
16086
16650
  ]
16087
16651
  },
@@ -16102,6 +16666,10 @@
16102
16666
  {
16103
16667
  "scope": ":root, .light, [data-a63-mode='light']",
16104
16668
  "value": "var(--a63-category-red)"
16669
+ },
16670
+ {
16671
+ "scope": "[data-a63-brand], [data-a63-surface]",
16672
+ "value": "var(--a63-category-red)"
16105
16673
  }
16106
16674
  ]
16107
16675
  },
@@ -16122,6 +16690,10 @@
16122
16690
  {
16123
16691
  "scope": ":root, .light, [data-a63-mode='light']",
16124
16692
  "value": "var(--a63-category-red-subtle-foreground)"
16693
+ },
16694
+ {
16695
+ "scope": "[data-a63-brand], [data-a63-surface]",
16696
+ "value": "var(--a63-category-red-subtle-foreground)"
16125
16697
  }
16126
16698
  ]
16127
16699
  },
@@ -16142,6 +16714,10 @@
16142
16714
  {
16143
16715
  "scope": ":root, .light, [data-a63-mode='light']",
16144
16716
  "value": "var(--a63-category-rose)"
16717
+ },
16718
+ {
16719
+ "scope": "[data-a63-brand], [data-a63-surface]",
16720
+ "value": "var(--a63-category-rose)"
16145
16721
  }
16146
16722
  ]
16147
16723
  },
@@ -16162,6 +16738,10 @@
16162
16738
  {
16163
16739
  "scope": ":root, .light, [data-a63-mode='light']",
16164
16740
  "value": "var(--a63-category-rose-subtle-foreground)"
16741
+ },
16742
+ {
16743
+ "scope": "[data-a63-brand], [data-a63-surface]",
16744
+ "value": "var(--a63-category-rose-subtle-foreground)"
16165
16745
  }
16166
16746
  ]
16167
16747
  },
@@ -16182,6 +16762,10 @@
16182
16762
  {
16183
16763
  "scope": ":root, .light, [data-a63-mode='light']",
16184
16764
  "value": "var(--a63-category-sky)"
16765
+ },
16766
+ {
16767
+ "scope": "[data-a63-brand], [data-a63-surface]",
16768
+ "value": "var(--a63-category-sky)"
16185
16769
  }
16186
16770
  ]
16187
16771
  },
@@ -16202,6 +16786,10 @@
16202
16786
  {
16203
16787
  "scope": ":root, .light, [data-a63-mode='light']",
16204
16788
  "value": "var(--a63-category-sky-subtle-foreground)"
16789
+ },
16790
+ {
16791
+ "scope": "[data-a63-brand], [data-a63-surface]",
16792
+ "value": "var(--a63-category-sky-subtle-foreground)"
16205
16793
  }
16206
16794
  ]
16207
16795
  },
@@ -16222,6 +16810,10 @@
16222
16810
  {
16223
16811
  "scope": ":root, .light, [data-a63-mode='light']",
16224
16812
  "value": "var(--a63-status-success-subtle-foreground)"
16813
+ },
16814
+ {
16815
+ "scope": "[data-a63-brand], [data-a63-surface]",
16816
+ "value": "var(--a63-status-success-subtle-foreground)"
16225
16817
  }
16226
16818
  ]
16227
16819
  },
@@ -16242,6 +16834,10 @@
16242
16834
  {
16243
16835
  "scope": ":root, .light, [data-a63-mode='light']",
16244
16836
  "value": "var(--a63-category-teal)"
16837
+ },
16838
+ {
16839
+ "scope": "[data-a63-brand], [data-a63-surface]",
16840
+ "value": "var(--a63-category-teal)"
16245
16841
  }
16246
16842
  ]
16247
16843
  },
@@ -16262,6 +16858,10 @@
16262
16858
  {
16263
16859
  "scope": ":root, .light, [data-a63-mode='light']",
16264
16860
  "value": "var(--a63-category-teal-subtle-foreground)"
16861
+ },
16862
+ {
16863
+ "scope": "[data-a63-brand], [data-a63-surface]",
16864
+ "value": "var(--a63-category-teal-subtle-foreground)"
16265
16865
  }
16266
16866
  ]
16267
16867
  },
@@ -16282,6 +16882,10 @@
16282
16882
  {
16283
16883
  "scope": ":root, .light, [data-a63-mode='light']",
16284
16884
  "value": "var(--a63-category-violet)"
16885
+ },
16886
+ {
16887
+ "scope": "[data-a63-brand], [data-a63-surface]",
16888
+ "value": "var(--a63-category-violet)"
16285
16889
  }
16286
16890
  ]
16287
16891
  },
@@ -16302,6 +16906,10 @@
16302
16906
  {
16303
16907
  "scope": ":root, .light, [data-a63-mode='light']",
16304
16908
  "value": "var(--a63-category-violet-subtle-foreground)"
16909
+ },
16910
+ {
16911
+ "scope": "[data-a63-brand], [data-a63-surface]",
16912
+ "value": "var(--a63-category-violet-subtle-foreground)"
16305
16913
  }
16306
16914
  ]
16307
16915
  },
@@ -16322,6 +16930,10 @@
16322
16930
  {
16323
16931
  "scope": ":root, .light, [data-a63-mode='light']",
16324
16932
  "value": "var(--a63-status-warning-subtle-foreground)"
16933
+ },
16934
+ {
16935
+ "scope": "[data-a63-brand], [data-a63-surface]",
16936
+ "value": "var(--a63-status-warning-subtle-foreground)"
16325
16937
  }
16326
16938
  ]
16327
16939
  },
@@ -16342,6 +16954,10 @@
16342
16954
  {
16343
16955
  "scope": ":root, .light, [data-a63-mode='light']",
16344
16956
  "value": "var(--a63-category-yellow)"
16957
+ },
16958
+ {
16959
+ "scope": "[data-a63-brand], [data-a63-surface]",
16960
+ "value": "var(--a63-category-yellow)"
16345
16961
  }
16346
16962
  ]
16347
16963
  },
@@ -16362,6 +16978,10 @@
16362
16978
  {
16363
16979
  "scope": ":root, .light, [data-a63-mode='light']",
16364
16980
  "value": "var(--a63-category-yellow-subtle-foreground)"
16981
+ },
16982
+ {
16983
+ "scope": "[data-a63-brand], [data-a63-surface]",
16984
+ "value": "var(--a63-category-yellow-subtle-foreground)"
16365
16985
  }
16366
16986
  ]
16367
16987
  },
@@ -16383,6 +17003,10 @@
16383
17003
  "scope": "[data-a63-theme='terminal']:is(.dark, [data-a63-mode='dark']), [data-a63-theme='terminal'] :is(.dark, [data-a63-mode='dark'])",
16384
17004
  "value": "color-mix(in oklch, var(--a63-action-primary) 42%, transparent)"
16385
17005
  },
17006
+ {
17007
+ "scope": "[data-a63-theme='terminal']:is([data-a63-brand], [data-a63-surface]), [data-a63-theme='terminal'] :is([data-a63-brand], [data-a63-surface])",
17008
+ "value": "var( --a63-if-light, color-mix( in oklab, var(--a63-action-primary) 26%, color-mix(in oklab, var(--surface-light-5) 60%, white) ) ) var(--a63-if-dark, color-mix(in oklch, var(--a63-action-primary) 42%, transparent))"
17009
+ },
16386
17010
  {
16387
17011
  "scope": ":is(.dark, [data-a63-mode='dark'])",
16388
17012
  "value": "color-mix( in oklab, var(--surface-dark-7) calc(100% - var(--a63-surface-tint)), var(--a63-brand-500) var(--a63-surface-tint) )"
@@ -16390,6 +17014,34 @@
16390
17014
  {
16391
17015
  "scope": ":root, .light, [data-a63-mode='light']",
16392
17016
  "value": "color-mix( in oklab, var(--surface-light-5) calc(100% - var(--a63-surface-tint)), var(--a63-brand-400) var(--a63-surface-tint) )"
17017
+ },
17018
+ {
17019
+ "scope": "[data-a63-brand], [data-a63-surface]",
17020
+ "value": "var( --a63-if-light, color-mix( in oklab, var(--surface-light-5) calc(100% - var(--a63-surface-tint)), var(--a63-brand-400) var(--a63-surface-tint) ) ) var( --a63-if-dark, color-mix( in oklab, var(--surface-dark-7) calc(100% - var(--a63-surface-tint)), var(--a63-brand-500) var(--a63-surface-tint) ) )"
17021
+ }
17022
+ ]
17023
+ },
17024
+ {
17025
+ "cssVar": "--a63-border-danger",
17026
+ "figma": {
17027
+ "collection": "Semantic",
17028
+ "path": "border/danger"
17029
+ },
17030
+ "layer": "semantic",
17031
+ "swift": null,
17032
+ "type": "color",
17033
+ "values": [
17034
+ {
17035
+ "scope": ":is(.dark, [data-a63-mode='dark'])",
17036
+ "value": "var(--color-danger-500)"
17037
+ },
17038
+ {
17039
+ "scope": ":root, .light, [data-a63-mode='light']",
17040
+ "value": "color-mix(in oklch, var(--color-danger-600) 62%, transparent)"
17041
+ },
17042
+ {
17043
+ "scope": "[data-a63-brand], [data-a63-surface]",
17044
+ "value": "var( --a63-if-light, color-mix(in oklch, var(--color-danger-600) 62%, transparent) ) var(--a63-if-dark, var(--color-danger-500))"
16393
17045
  }
16394
17046
  ]
16395
17047
  },
@@ -16411,6 +17063,10 @@
16411
17063
  "scope": "[data-a63-theme='terminal']:is(.dark, [data-a63-mode='dark']), [data-a63-theme='terminal'] :is(.dark, [data-a63-mode='dark'])",
16412
17064
  "value": "color-mix(in oklch, var(--a63-text-accent) 60%, transparent)"
16413
17065
  },
17066
+ {
17067
+ "scope": "[data-a63-theme='terminal']:is([data-a63-brand], [data-a63-surface]), [data-a63-theme='terminal'] :is([data-a63-brand], [data-a63-surface])",
17068
+ "value": "var( --a63-if-light, color-mix(in oklab, var(--a63-action-primary) 70%, var(--surface-light-10)) ) var(--a63-if-dark, color-mix(in oklch, var(--a63-text-accent) 60%, transparent))"
17069
+ },
16414
17070
  {
16415
17071
  "scope": ":is(.dark, [data-a63-mode='dark'])",
16416
17072
  "value": "color-mix( in oklab, var(--surface-dark-9) calc(100% - var(--a63-surface-tint)), var(--a63-brand-500) var(--a63-surface-tint) )"
@@ -16418,6 +17074,10 @@
16418
17074
  {
16419
17075
  "scope": ":root, .light, [data-a63-mode='light']",
16420
17076
  "value": "color-mix( in oklab, var(--surface-light-10) calc(100% - var(--a63-surface-tint)), var(--a63-brand-500) var(--a63-surface-tint) )"
17077
+ },
17078
+ {
17079
+ "scope": "[data-a63-brand], [data-a63-surface]",
17080
+ "value": "var( --a63-if-light, color-mix( in oklab, var(--surface-light-10) calc(100% - var(--a63-surface-tint)), var(--a63-brand-500) var(--a63-surface-tint) ) ) var( --a63-if-dark, color-mix( in oklab, var(--surface-dark-9) calc(100% - var(--a63-surface-tint)), var(--a63-brand-500) var(--a63-surface-tint) ) )"
16421
17081
  }
16422
17082
  ]
16423
17083
  },
@@ -16439,6 +17099,10 @@
16439
17099
  "scope": "[data-a63-theme='terminal']:is(.dark, [data-a63-mode='dark']), [data-a63-theme='terminal'] :is(.dark, [data-a63-mode='dark'])",
16440
17100
  "value": "color-mix(in oklch, var(--a63-action-primary) 22%, transparent)"
16441
17101
  },
17102
+ {
17103
+ "scope": "[data-a63-theme='terminal']:is([data-a63-brand], [data-a63-surface]), [data-a63-theme='terminal'] :is([data-a63-brand], [data-a63-surface])",
17104
+ "value": "var( --a63-if-light, color-mix( in oklab, var(--a63-action-primary) 16%, color-mix(in oklab, var(--surface-light-6) 50%, white) ) ) var(--a63-if-dark, color-mix(in oklch, var(--a63-action-primary) 22%, transparent))"
17105
+ },
16442
17106
  {
16443
17107
  "scope": ":is(.dark, [data-a63-mode='dark'])",
16444
17108
  "value": "color-mix( in oklab, var(--surface-dark-6) calc(100% - var(--a63-surface-tint)), var(--a63-brand-600) var(--a63-surface-tint) )"
@@ -16446,6 +17110,10 @@
16446
17110
  {
16447
17111
  "scope": ":root, .light, [data-a63-mode='light']",
16448
17112
  "value": "color-mix( in oklab, var(--surface-light-4) calc(100% - var(--a63-surface-tint)), var(--a63-brand-300) var(--a63-surface-tint) )"
17113
+ },
17114
+ {
17115
+ "scope": "[data-a63-brand], [data-a63-surface]",
17116
+ "value": "var( --a63-if-light, color-mix( in oklab, var(--surface-light-4) calc(100% - var(--a63-surface-tint)), var(--a63-brand-300) var(--a63-surface-tint) ) ) var( --a63-if-dark, color-mix( in oklab, var(--surface-dark-6) calc(100% - var(--a63-surface-tint)), var(--a63-brand-600) var(--a63-surface-tint) ) )"
16449
17117
  }
16450
17118
  ]
16451
17119
  },
@@ -16970,6 +17638,10 @@
16970
17638
  {
16971
17639
  "scope": ":root, .light, [data-a63-mode='light']",
16972
17640
  "value": "var(--color-warning-800)"
17641
+ },
17642
+ {
17643
+ "scope": "[data-a63-brand], [data-a63-surface]",
17644
+ "value": "var(--a63-if-light, var(--color-warning-800)) var(--a63-if-dark, var(--color-warning-400))"
16973
17645
  }
16974
17646
  ]
16975
17647
  },
@@ -17022,6 +17694,10 @@
17022
17694
  {
17023
17695
  "scope": ":root, .light, [data-a63-mode='light']",
17024
17696
  "value": "var(--color-blue-700)"
17697
+ },
17698
+ {
17699
+ "scope": "[data-a63-brand], [data-a63-surface]",
17700
+ "value": "var(--a63-if-light, var(--color-blue-700)) var(--a63-if-dark, var(--color-blue-400))"
17025
17701
  }
17026
17702
  ]
17027
17703
  },
@@ -17074,6 +17750,10 @@
17074
17750
  {
17075
17751
  "scope": ":root, .light, [data-a63-mode='light']",
17076
17752
  "value": "var(--color-cyan-800)"
17753
+ },
17754
+ {
17755
+ "scope": "[data-a63-brand], [data-a63-surface]",
17756
+ "value": "var(--a63-if-light, var(--color-cyan-800)) var(--a63-if-dark, var(--color-cyan-400))"
17077
17757
  }
17078
17758
  ]
17079
17759
  },
@@ -17126,6 +17806,10 @@
17126
17806
  {
17127
17807
  "scope": ":root, .light, [data-a63-mode='light']",
17128
17808
  "value": "var(--color-emerald-800)"
17809
+ },
17810
+ {
17811
+ "scope": "[data-a63-brand], [data-a63-surface]",
17812
+ "value": "var(--a63-if-light, var(--color-emerald-800)) var(--a63-if-dark, var(--color-emerald-400))"
17129
17813
  }
17130
17814
  ]
17131
17815
  },
@@ -17178,6 +17862,10 @@
17178
17862
  {
17179
17863
  "scope": ":root, .light, [data-a63-mode='light']",
17180
17864
  "value": "var(--color-fuchsia-700)"
17865
+ },
17866
+ {
17867
+ "scope": "[data-a63-brand], [data-a63-surface]",
17868
+ "value": "var(--a63-if-light, var(--color-fuchsia-700)) var(--a63-if-dark, var(--color-fuchsia-400))"
17181
17869
  }
17182
17870
  ]
17183
17871
  },
@@ -17230,6 +17918,10 @@
17230
17918
  {
17231
17919
  "scope": ":root, .light, [data-a63-mode='light']",
17232
17920
  "value": "var(--color-gray-700)"
17921
+ },
17922
+ {
17923
+ "scope": "[data-a63-brand], [data-a63-surface]",
17924
+ "value": "var(--a63-if-light, var(--color-gray-700)) var(--a63-if-dark, var(--color-gray-400))"
17233
17925
  }
17234
17926
  ]
17235
17927
  },
@@ -17282,6 +17974,10 @@
17282
17974
  {
17283
17975
  "scope": ":root, .light, [data-a63-mode='light']",
17284
17976
  "value": "var(--color-green-800)"
17977
+ },
17978
+ {
17979
+ "scope": "[data-a63-brand], [data-a63-surface]",
17980
+ "value": "var(--a63-if-light, var(--color-green-800)) var(--a63-if-dark, var(--color-green-400))"
17285
17981
  }
17286
17982
  ]
17287
17983
  },
@@ -17334,6 +18030,10 @@
17334
18030
  {
17335
18031
  "scope": ":root, .light, [data-a63-mode='light']",
17336
18032
  "value": "var(--color-indigo-700)"
18033
+ },
18034
+ {
18035
+ "scope": "[data-a63-brand], [data-a63-surface]",
18036
+ "value": "var(--a63-if-light, var(--color-indigo-700)) var(--a63-if-dark, var(--color-indigo-400))"
17337
18037
  }
17338
18038
  ]
17339
18039
  },
@@ -17386,6 +18086,10 @@
17386
18086
  {
17387
18087
  "scope": ":root, .light, [data-a63-mode='light']",
17388
18088
  "value": "var(--color-lime-800)"
18089
+ },
18090
+ {
18091
+ "scope": "[data-a63-brand], [data-a63-surface]",
18092
+ "value": "var(--a63-if-light, var(--color-lime-800)) var(--a63-if-dark, var(--color-lime-400))"
17389
18093
  }
17390
18094
  ]
17391
18095
  },
@@ -17438,6 +18142,10 @@
17438
18142
  {
17439
18143
  "scope": ":root, .light, [data-a63-mode='light']",
17440
18144
  "value": "var(--color-neutral-700)"
18145
+ },
18146
+ {
18147
+ "scope": "[data-a63-brand], [data-a63-surface]",
18148
+ "value": "var(--a63-if-light, var(--color-neutral-700)) var(--a63-if-dark, var(--color-neutral-400))"
17441
18149
  }
17442
18150
  ]
17443
18151
  },
@@ -17490,6 +18198,10 @@
17490
18198
  {
17491
18199
  "scope": ":root, .light, [data-a63-mode='light']",
17492
18200
  "value": "var(--color-orange-800)"
18201
+ },
18202
+ {
18203
+ "scope": "[data-a63-brand], [data-a63-surface]",
18204
+ "value": "var(--a63-if-light, var(--color-orange-800)) var(--a63-if-dark, var(--color-orange-400))"
17493
18205
  }
17494
18206
  ]
17495
18207
  },
@@ -17542,6 +18254,10 @@
17542
18254
  {
17543
18255
  "scope": ":root, .light, [data-a63-mode='light']",
17544
18256
  "value": "var(--color-pink-700)"
18257
+ },
18258
+ {
18259
+ "scope": "[data-a63-brand], [data-a63-surface]",
18260
+ "value": "var(--a63-if-light, var(--color-pink-700)) var(--a63-if-dark, var(--color-pink-400))"
17545
18261
  }
17546
18262
  ]
17547
18263
  },
@@ -17594,6 +18310,10 @@
17594
18310
  {
17595
18311
  "scope": ":root, .light, [data-a63-mode='light']",
17596
18312
  "value": "var(--color-purple-700)"
18313
+ },
18314
+ {
18315
+ "scope": "[data-a63-brand], [data-a63-surface]",
18316
+ "value": "var(--a63-if-light, var(--color-purple-700)) var(--a63-if-dark, var(--color-purple-400))"
17597
18317
  }
17598
18318
  ]
17599
18319
  },
@@ -17646,6 +18366,10 @@
17646
18366
  {
17647
18367
  "scope": ":root, .light, [data-a63-mode='light']",
17648
18368
  "value": "var(--color-red-700)"
18369
+ },
18370
+ {
18371
+ "scope": "[data-a63-brand], [data-a63-surface]",
18372
+ "value": "var(--a63-if-light, var(--color-red-700)) var(--a63-if-dark, var(--color-red-400))"
17649
18373
  }
17650
18374
  ]
17651
18375
  },
@@ -17698,6 +18422,10 @@
17698
18422
  {
17699
18423
  "scope": ":root, .light, [data-a63-mode='light']",
17700
18424
  "value": "var(--color-rose-700)"
18425
+ },
18426
+ {
18427
+ "scope": "[data-a63-brand], [data-a63-surface]",
18428
+ "value": "var(--a63-if-light, var(--color-rose-700)) var(--a63-if-dark, var(--color-rose-400))"
17701
18429
  }
17702
18430
  ]
17703
18431
  },
@@ -17750,6 +18478,10 @@
17750
18478
  {
17751
18479
  "scope": ":root, .light, [data-a63-mode='light']",
17752
18480
  "value": "var(--color-sky-700)"
18481
+ },
18482
+ {
18483
+ "scope": "[data-a63-brand], [data-a63-surface]",
18484
+ "value": "var(--a63-if-light, var(--color-sky-700)) var(--a63-if-dark, var(--color-sky-400))"
17753
18485
  }
17754
18486
  ]
17755
18487
  },
@@ -17802,6 +18534,10 @@
17802
18534
  {
17803
18535
  "scope": ":root, .light, [data-a63-mode='light']",
17804
18536
  "value": "var(--color-slate-700)"
18537
+ },
18538
+ {
18539
+ "scope": "[data-a63-brand], [data-a63-surface]",
18540
+ "value": "var(--a63-if-light, var(--color-slate-700)) var(--a63-if-dark, var(--color-slate-400))"
17805
18541
  }
17806
18542
  ]
17807
18543
  },
@@ -17854,6 +18590,10 @@
17854
18590
  {
17855
18591
  "scope": ":root, .light, [data-a63-mode='light']",
17856
18592
  "value": "var(--color-stone-700)"
18593
+ },
18594
+ {
18595
+ "scope": "[data-a63-brand], [data-a63-surface]",
18596
+ "value": "var(--a63-if-light, var(--color-stone-700)) var(--a63-if-dark, var(--color-stone-400))"
17857
18597
  }
17858
18598
  ]
17859
18599
  },
@@ -17906,6 +18646,10 @@
17906
18646
  {
17907
18647
  "scope": ":root, .light, [data-a63-mode='light']",
17908
18648
  "value": "var(--color-teal-800)"
18649
+ },
18650
+ {
18651
+ "scope": "[data-a63-brand], [data-a63-surface]",
18652
+ "value": "var(--a63-if-light, var(--color-teal-800)) var(--a63-if-dark, var(--color-teal-400))"
17909
18653
  }
17910
18654
  ]
17911
18655
  },
@@ -17958,6 +18702,10 @@
17958
18702
  {
17959
18703
  "scope": ":root, .light, [data-a63-mode='light']",
17960
18704
  "value": "var(--color-violet-700)"
18705
+ },
18706
+ {
18707
+ "scope": "[data-a63-brand], [data-a63-surface]",
18708
+ "value": "var(--a63-if-light, var(--color-violet-700)) var(--a63-if-dark, var(--color-violet-400))"
17961
18709
  }
17962
18710
  ]
17963
18711
  },
@@ -18010,6 +18758,10 @@
18010
18758
  {
18011
18759
  "scope": ":root, .light, [data-a63-mode='light']",
18012
18760
  "value": "var(--color-yellow-800)"
18761
+ },
18762
+ {
18763
+ "scope": "[data-a63-brand], [data-a63-surface]",
18764
+ "value": "var(--a63-if-light, var(--color-yellow-800)) var(--a63-if-dark, var(--color-yellow-400))"
18013
18765
  }
18014
18766
  ]
18015
18767
  },
@@ -18062,6 +18814,10 @@
18062
18814
  {
18063
18815
  "scope": ":root, .light, [data-a63-mode='light']",
18064
18816
  "value": "var(--color-zinc-700)"
18817
+ },
18818
+ {
18819
+ "scope": "[data-a63-brand], [data-a63-surface]",
18820
+ "value": "var(--a63-if-light, var(--color-zinc-700)) var(--a63-if-dark, var(--color-zinc-400))"
18065
18821
  }
18066
18822
  ]
18067
18823
  },
@@ -18077,11 +18833,15 @@
18077
18833
  "values": [
18078
18834
  {
18079
18835
  "scope": ":is(.dark, [data-a63-mode='dark'])",
18080
- "value": "var(--a63-action-primary)"
18836
+ "value": "var(--a63-brand-400)"
18081
18837
  },
18082
18838
  {
18083
18839
  "scope": ":root, .light, [data-a63-mode='light']",
18084
18840
  "value": "var(--a63-action-primary)"
18841
+ },
18842
+ {
18843
+ "scope": "[data-a63-brand], [data-a63-surface]",
18844
+ "value": "var(--a63-if-light, var(--a63-action-primary)) var(--a63-if-dark, var(--a63-brand-400))"
18085
18845
  }
18086
18846
  ]
18087
18847
  },
@@ -18097,11 +18857,15 @@
18097
18857
  "values": [
18098
18858
  {
18099
18859
  "scope": ":is(.dark, [data-a63-mode='dark'])",
18100
- "value": "var(--color-teal-400)"
18860
+ "value": "oklch(from var(--a63-chart-1) 0.76 0.14 calc(h + 144))"
18101
18861
  },
18102
18862
  {
18103
18863
  "scope": ":root, .light, [data-a63-mode='light']",
18104
- "value": "var(--color-teal-500)"
18864
+ "value": "oklch(from var(--a63-chart-1) 0.6 0.15 calc(h + 144))"
18865
+ },
18866
+ {
18867
+ "scope": "[data-a63-brand], [data-a63-surface]",
18868
+ "value": "var(--a63-if-light, oklch(from var(--a63-chart-1) 0.6 0.15 calc(h + 144))) var(--a63-if-dark, oklch(from var(--a63-chart-1) 0.76 0.14 calc(h + 144)))"
18105
18869
  }
18106
18870
  ]
18107
18871
  },
@@ -18117,11 +18881,15 @@
18117
18881
  "values": [
18118
18882
  {
18119
18883
  "scope": ":is(.dark, [data-a63-mode='dark'])",
18120
- "value": "var(--color-amber-400)"
18884
+ "value": "oklch(from var(--a63-chart-1) 0.7 0.13 calc(h + 288))"
18121
18885
  },
18122
18886
  {
18123
18887
  "scope": ":root, .light, [data-a63-mode='light']",
18124
- "value": "var(--color-amber-500)"
18888
+ "value": "oklch(from var(--a63-chart-1) 0.54 0.13 calc(h + 288))"
18889
+ },
18890
+ {
18891
+ "scope": "[data-a63-brand], [data-a63-surface]",
18892
+ "value": "var(--a63-if-light, oklch(from var(--a63-chart-1) 0.54 0.13 calc(h + 288))) var(--a63-if-dark, oklch(from var(--a63-chart-1) 0.7 0.13 calc(h + 288)))"
18125
18893
  }
18126
18894
  ]
18127
18895
  },
@@ -18137,11 +18905,15 @@
18137
18905
  "values": [
18138
18906
  {
18139
18907
  "scope": ":is(.dark, [data-a63-mode='dark'])",
18140
- "value": "var(--color-violet-400)"
18908
+ "value": "oklch(from var(--a63-chart-1) 0.82 0.13 calc(h + 216))"
18141
18909
  },
18142
18910
  {
18143
18911
  "scope": ":root, .light, [data-a63-mode='light']",
18144
- "value": "var(--color-violet-500)"
18912
+ "value": "oklch(from var(--a63-chart-1) 0.58 0.14 calc(h + 216))"
18913
+ },
18914
+ {
18915
+ "scope": "[data-a63-brand], [data-a63-surface]",
18916
+ "value": "var(--a63-if-light, oklch(from var(--a63-chart-1) 0.58 0.14 calc(h + 216))) var(--a63-if-dark, oklch(from var(--a63-chart-1) 0.82 0.13 calc(h + 216)))"
18145
18917
  }
18146
18918
  ]
18147
18919
  },
@@ -18157,11 +18929,15 @@
18157
18929
  "values": [
18158
18930
  {
18159
18931
  "scope": ":is(.dark, [data-a63-mode='dark'])",
18160
- "value": "var(--color-rose-400)"
18932
+ "value": "oklch(from var(--a63-chart-1) 0.68 0.15 calc(h + 72))"
18161
18933
  },
18162
18934
  {
18163
18935
  "scope": ":root, .light, [data-a63-mode='light']",
18164
- "value": "var(--color-rose-500)"
18936
+ "value": "oklch(from var(--a63-chart-1) 0.5 0.16 calc(h + 72))"
18937
+ },
18938
+ {
18939
+ "scope": "[data-a63-brand], [data-a63-surface]",
18940
+ "value": "var(--a63-if-light, oklch(from var(--a63-chart-1) 0.5 0.16 calc(h + 72))) var(--a63-if-dark, oklch(from var(--a63-chart-1) 0.68 0.15 calc(h + 72)))"
18165
18941
  }
18166
18942
  ]
18167
18943
  },
@@ -18254,6 +19030,10 @@
18254
19030
  {
18255
19031
  "scope": ":root, .light, [data-a63-mode='light']",
18256
19032
  "value": "color-mix( in oklch, var(--a63-action-primary) 5%, transparent )"
19033
+ },
19034
+ {
19035
+ "scope": "[data-a63-brand], [data-a63-surface]",
19036
+ "value": "var( --a63-if-light, color-mix(in oklch, var(--a63-action-primary) 5%, transparent) ) var(--a63-if-dark, color-mix(in oklch, var(--a63-action-primary) 10%, transparent))"
18257
19037
  }
18258
19038
  ]
18259
19039
  },
@@ -18274,6 +19054,10 @@
18274
19054
  {
18275
19055
  "scope": ":root, .light, [data-a63-mode='light']",
18276
19056
  "value": "color-mix(in oklch, var(--a63-action-primary) 30%, transparent)"
19057
+ },
19058
+ {
19059
+ "scope": "[data-a63-brand], [data-a63-surface]",
19060
+ "value": "var( --a63-if-light, color-mix(in oklch, var(--a63-action-primary) 30%, transparent) ) var(--a63-if-dark, color-mix(in oklch, var(--a63-action-primary) 20%, transparent))"
18277
19061
  }
18278
19062
  ]
18279
19063
  },
@@ -19257,6 +20041,10 @@
19257
20041
  {
19258
20042
  "scope": ":root, .light, [data-a63-mode='light']",
19259
20043
  "value": "var(--a63-surface-panel)"
20044
+ },
20045
+ {
20046
+ "scope": "[data-a63-brand], [data-a63-surface]",
20047
+ "value": "var(--a63-if-light, var(--a63-surface-panel)) var(--a63-if-dark, color-mix(in oklab, var(--a63-border-control) 32%, transparent))"
19260
20048
  }
19261
20049
  ]
19262
20050
  },
@@ -19277,6 +20065,10 @@
19277
20065
  {
19278
20066
  "scope": ":root, .light, [data-a63-mode='light']",
19279
20067
  "value": "color-mix( in oklab, var(--a63-surface-control-hover) 50%, transparent )"
20068
+ },
20069
+ {
20070
+ "scope": "[data-a63-brand], [data-a63-surface]",
20071
+ "value": "var( --a63-if-light, color-mix(in oklab, var(--a63-surface-control-hover) 50%, transparent) ) var(--a63-if-dark, color-mix(in oklab, var(--a63-border-control) 64%, transparent))"
19280
20072
  }
19281
20073
  ]
19282
20074
  },
@@ -19297,6 +20089,10 @@
19297
20089
  {
19298
20090
  "scope": ":root, .light, [data-a63-mode='light']",
19299
20091
  "value": "var(--a63-border-subtle)"
20092
+ },
20093
+ {
20094
+ "scope": "[data-a63-brand], [data-a63-surface]",
20095
+ "value": "var(--a63-if-light, var(--a63-border-subtle)) var(--a63-if-dark, var(--a63-border-control))"
19300
20096
  }
19301
20097
  ]
19302
20098
  },
@@ -19670,6 +20466,10 @@
19670
20466
  {
19671
20467
  "scope": "[data-a63-theme='terminal']:is(.dark, [data-a63-mode='dark']), [data-a63-theme='terminal'] :is(.dark, [data-a63-mode='dark'])",
19672
20468
  "value": "color-mix(in oklab, var(--surface-dark-1) 90%, var(--a63-action-primary))"
20469
+ },
20470
+ {
20471
+ "scope": "[data-a63-theme='terminal']:is([data-a63-brand], [data-a63-surface]), [data-a63-theme='terminal'] :is([data-a63-brand], [data-a63-surface])",
20472
+ "value": "var( --a63-if-light, color-mix(in oklab, var(--surface-light-2) 86%, var(--a63-action-primary)) ) var(--a63-if-dark, color-mix(in oklab, var(--surface-dark-1) 90%, var(--a63-action-primary)))"
19673
20473
  }
19674
20474
  ]
19675
20475
  },
@@ -19722,6 +20522,10 @@
19722
20522
  {
19723
20523
  "scope": ":root, .light, [data-a63-mode='light']",
19724
20524
  "value": "var(--a63-brand-600)"
20525
+ },
20526
+ {
20527
+ "scope": "[data-a63-brand], [data-a63-surface]",
20528
+ "value": "var(--a63-if-light, var(--a63-brand-600)) var(--a63-if-dark, var(--a63-brand-400))"
19725
20529
  }
19726
20530
  ]
19727
20531
  },
@@ -19757,6 +20561,38 @@
19757
20561
  }
19758
20562
  ]
19759
20563
  },
20564
+ {
20565
+ "cssVar": "--a63-font-display",
20566
+ "figma": {
20567
+ "collection": "Semantic",
20568
+ "path": "font/display"
20569
+ },
20570
+ "layer": "semantic",
20571
+ "swift": null,
20572
+ "type": "typography",
20573
+ "values": [
20574
+ {
20575
+ "scope": ":root",
20576
+ "value": "var(--a63-font-app)"
20577
+ },
20578
+ {
20579
+ "scope": "[data-a63-font='mono']",
20580
+ "value": "var(--a63-font-app)"
20581
+ },
20582
+ {
20583
+ "scope": "[data-a63-font='pixel']",
20584
+ "value": "var(--a63-font-app)"
20585
+ },
20586
+ {
20587
+ "scope": "[data-a63-font='sans']",
20588
+ "value": "var(--a63-font-app)"
20589
+ },
20590
+ {
20591
+ "scope": "[data-a63-font='serif']",
20592
+ "value": "var(--a63-font-app)"
20593
+ }
20594
+ ]
20595
+ },
19760
20596
  {
19761
20597
  "cssVar": "--a63-gradient-brand",
19762
20598
  "figma": {
@@ -19790,6 +20626,10 @@
19790
20626
  {
19791
20627
  "scope": ":root, .light, [data-a63-mode='light']",
19792
20628
  "value": "linear-gradient( to bottom, var(--a63-brand-800), var(--a63-brand-700) var(--a63-gradient-brand-fade-dark-zone), var(--a63-surface-page) )"
20629
+ },
20630
+ {
20631
+ "scope": "[data-a63-brand], [data-a63-surface]",
20632
+ "value": "linear-gradient( to bottom, var(--a63-brand-800), var(--a63-brand-700) var(--a63-gradient-brand-fade-dark-zone), var(--a63-surface-page) )"
19793
20633
  }
19794
20634
  ]
19795
20635
  },
@@ -19838,6 +20678,40 @@
19838
20678
  }
19839
20679
  ]
19840
20680
  },
20681
+ {
20682
+ "cssVar": "--a63-if-dark",
20683
+ "figma": null,
20684
+ "layer": "semantic",
20685
+ "swift": null,
20686
+ "type": "string",
20687
+ "values": [
20688
+ {
20689
+ "scope": ":is(.dark, [data-a63-mode='dark'])",
20690
+ "value": "initial"
20691
+ },
20692
+ {
20693
+ "scope": ":root, .light, [data-a63-mode='light']",
20694
+ "value": ""
20695
+ }
20696
+ ]
20697
+ },
20698
+ {
20699
+ "cssVar": "--a63-if-light",
20700
+ "figma": null,
20701
+ "layer": "semantic",
20702
+ "swift": null,
20703
+ "type": "string",
20704
+ "values": [
20705
+ {
20706
+ "scope": ":is(.dark, [data-a63-mode='dark'])",
20707
+ "value": ""
20708
+ },
20709
+ {
20710
+ "scope": ":root, .light, [data-a63-mode='light']",
20711
+ "value": "initial"
20712
+ }
20713
+ ]
20714
+ },
19841
20715
  {
19842
20716
  "cssVar": "--a63-inset-group-radius",
19843
20717
  "figma": {
@@ -21024,6 +21898,10 @@
21024
21898
  "scope": "[data-a63-theme='aqua']:is(.dark, [data-a63-mode='dark'])",
21025
21899
  "value": "linear-gradient( 180deg, color-mix(in oklch, white 8%, transparent) 0%, color-mix(in oklch, white 2%, transparent) 48%, color-mix(in oklch, black 14%, transparent) 100% ), linear-gradient( 180deg, color-mix(in oklch, var(--a63-surface-panel) 88%, white) 0%, var(--a63-surface-muted) 100% )"
21026
21900
  },
21901
+ {
21902
+ "scope": "[data-a63-theme='aqua']:is([data-a63-brand], [data-a63-surface]), [data-a63-theme='aqua'] :is([data-a63-brand], [data-a63-surface])",
21903
+ "value": "var( --a63-if-light, linear-gradient( 180deg, color-mix(in oklch, white 10%, transparent) 0%, color-mix(in oklch, white 4%, transparent) 46%, color-mix(in oklch, black 6%, transparent) 54%, color-mix(in oklch, white 2%, transparent) 100% ), linear-gradient(180deg, var(--a63-surface-panel) 0%, var(--a63-surface-muted) 100%) ) var( --a63-if-dark, linear-gradient( 180deg, color-mix(in oklch, white 8%, transparent) 0%, color-mix(in oklch, white 2%, transparent) 48%, color-mix(in oklch, black 14%, transparent) 100% ), linear-gradient( 180deg, color-mix(in oklch, var(--a63-surface-panel) 88%, white) 0%, var(--a63-surface-muted) 100% ) )"
21904
+ },
21027
21905
  {
21028
21906
  "scope": "[data-a63-theme='modern']",
21029
21907
  "value": "none"
@@ -21128,6 +22006,10 @@
21128
22006
  "scope": "[data-a63-theme='aqua']:is(.dark, [data-a63-mode='dark'])",
21129
22007
  "value": "inset 0 1px 0 color-mix(in oklch, white 22%, transparent), inset 0 3px 10px color-mix(in oklch, black 42%, transparent)"
21130
22008
  },
22009
+ {
22010
+ "scope": "[data-a63-theme='aqua']:is([data-a63-brand], [data-a63-surface]), [data-a63-theme='aqua'] :is([data-a63-brand], [data-a63-surface])",
22011
+ "value": "var( --a63-if-light, inset 0 1px 0 color-mix(in oklch, white 28%, transparent), inset 0 2px 8px color-mix(in oklch, black 36%, transparent) ) var( --a63-if-dark, inset 0 1px 0 color-mix(in oklch, white 22%, transparent), inset 0 3px 10px color-mix(in oklch, black 42%, transparent) )"
22012
+ },
21131
22013
  {
21132
22014
  "scope": "[data-a63-theme='modern']",
21133
22015
  "value": "inset 0 1px 0 color-mix(in oklch, white 30%, transparent), 0 1px 2px color-mix(in oklch, black 16%, transparent)"
@@ -21245,6 +22127,10 @@
21245
22127
  "scope": "[data-a63-theme='aqua']:is(.dark, [data-a63-mode='dark'])",
21246
22128
  "value": "inset 0 1px 0 color-mix(in oklch, white 22%, transparent), inset 0 3px 8px color-mix(in oklch, black 28%, transparent)"
21247
22129
  },
22130
+ {
22131
+ "scope": "[data-a63-theme='aqua']:is([data-a63-brand], [data-a63-surface]), [data-a63-theme='aqua'] :is([data-a63-brand], [data-a63-surface])",
22132
+ "value": "var( --a63-if-light, inset 0 1px 0 color-mix(in oklch, white 35%, transparent), inset 0 2px 6px color-mix(in oklch, black 14%, transparent) ) var( --a63-if-dark, inset 0 1px 0 color-mix(in oklch, white 22%, transparent), inset 0 3px 8px color-mix(in oklch, black 28%, transparent) )"
22133
+ },
21248
22134
  {
21249
22135
  "scope": "[data-a63-theme='modern']",
21250
22136
  "value": "inset 0 1px 0 color-mix(in oklch, white 70%, transparent), 0 1px 2px color-mix(in oklch, black 12%, transparent), 0 1px 1px color-mix(in oklch, black 6%, transparent)"
@@ -21361,6 +22247,10 @@
21361
22247
  {
21362
22248
  "scope": ":root, .light, [data-a63-mode='light']",
21363
22249
  "value": "color-mix(in oklch, var(--a63-action-primary) 12%, transparent)"
22250
+ },
22251
+ {
22252
+ "scope": "[data-a63-brand], [data-a63-surface]",
22253
+ "value": "color-mix(in oklch, var(--a63-action-primary) 12%, transparent)"
21364
22254
  }
21365
22255
  ]
21366
22256
  },
@@ -21381,6 +22271,10 @@
21381
22271
  {
21382
22272
  "scope": ":root, .light, [data-a63-mode='light']",
21383
22273
  "value": "var(--a63-text-accent)"
22274
+ },
22275
+ {
22276
+ "scope": "[data-a63-brand], [data-a63-surface]",
22277
+ "value": "var(--a63-text-accent)"
21384
22278
  }
21385
22279
  ]
21386
22280
  },
@@ -21401,6 +22295,10 @@
21401
22295
  {
21402
22296
  "scope": ":root, .light, [data-a63-mode='light']",
21403
22297
  "value": "var(--a63-surface-muted)"
22298
+ },
22299
+ {
22300
+ "scope": "[data-a63-brand], [data-a63-surface]",
22301
+ "value": "var(--a63-surface-muted)"
21404
22302
  }
21405
22303
  ]
21406
22304
  },
@@ -21421,6 +22319,10 @@
21421
22319
  {
21422
22320
  "scope": ":root, .light, [data-a63-mode='light']",
21423
22321
  "value": "var(--a63-text-primary)"
22322
+ },
22323
+ {
22324
+ "scope": "[data-a63-brand], [data-a63-surface]",
22325
+ "value": "var(--a63-text-primary)"
21424
22326
  }
21425
22327
  ]
21426
22328
  },
@@ -21489,6 +22391,10 @@
21489
22391
  {
21490
22392
  "scope": ":root, .light, [data-a63-mode='light']",
21491
22393
  "value": "var(--a63-surface-muted)"
22394
+ },
22395
+ {
22396
+ "scope": "[data-a63-brand], [data-a63-surface]",
22397
+ "value": "var(--a63-surface-muted)"
21492
22398
  }
21493
22399
  ]
21494
22400
  },
@@ -21509,6 +22415,10 @@
21509
22415
  {
21510
22416
  "scope": ":root, .light, [data-a63-mode='light']",
21511
22417
  "value": "var(--color-white-60)"
22418
+ },
22419
+ {
22420
+ "scope": "[data-a63-brand], [data-a63-surface]",
22421
+ "value": "var(--a63-if-light, var(--color-white-60)) var(--a63-if-dark, var(--color-white-10))"
21512
22422
  }
21513
22423
  ]
21514
22424
  },
@@ -21753,6 +22663,10 @@
21753
22663
  {
21754
22664
  "scope": ":root, .light, [data-a63-mode='light']",
21755
22665
  "value": "var(--color-danger-600)"
22666
+ },
22667
+ {
22668
+ "scope": "[data-a63-brand], [data-a63-surface]",
22669
+ "value": "var(--a63-if-light, var(--color-danger-600)) var(--a63-if-dark, var(--color-danger-500))"
21756
22670
  }
21757
22671
  ]
21758
22672
  },
@@ -21769,6 +22683,10 @@
21769
22683
  {
21770
22684
  "scope": ":root, .light, [data-a63-mode='light']",
21771
22685
  "value": "oklch( from var(--a63-status-danger) clamp(0.15, (0.57 - l) * 1000, 0.985) calc(c * 0.06) h )"
22686
+ },
22687
+ {
22688
+ "scope": "[data-a63-brand], [data-a63-surface]",
22689
+ "value": "oklch( from var(--a63-status-danger) clamp(0.15, (0.57 - l) * 1000, 0.985) calc(c * 0.06) h )"
21772
22690
  }
21773
22691
  ]
21774
22692
  },
@@ -21789,6 +22707,10 @@
21789
22707
  {
21790
22708
  "scope": ":root, .light, [data-a63-mode='light']",
21791
22709
  "value": "color-mix(in oklab, var(--a63-status-danger) 14%, transparent)"
22710
+ },
22711
+ {
22712
+ "scope": "[data-a63-brand], [data-a63-surface]",
22713
+ "value": "color-mix(in oklab, var(--a63-status-danger) 14%, transparent)"
21792
22714
  }
21793
22715
  ]
21794
22716
  },
@@ -21809,6 +22731,10 @@
21809
22731
  {
21810
22732
  "scope": ":root, .light, [data-a63-mode='light']",
21811
22733
  "value": "var(--color-danger-700)"
22734
+ },
22735
+ {
22736
+ "scope": "[data-a63-brand], [data-a63-surface]",
22737
+ "value": "var(--a63-if-light, var(--color-danger-700)) var(--a63-if-dark, var(--color-danger-400))"
21812
22738
  }
21813
22739
  ]
21814
22740
  },
@@ -21829,6 +22755,10 @@
21829
22755
  {
21830
22756
  "scope": ":root, .light, [data-a63-mode='light']",
21831
22757
  "value": "var(--color-info-600)"
22758
+ },
22759
+ {
22760
+ "scope": "[data-a63-brand], [data-a63-surface]",
22761
+ "value": "var(--a63-if-light, var(--color-info-600)) var(--a63-if-dark, var(--color-info-500))"
21832
22762
  }
21833
22763
  ]
21834
22764
  },
@@ -21845,6 +22775,10 @@
21845
22775
  {
21846
22776
  "scope": ":root, .light, [data-a63-mode='light']",
21847
22777
  "value": "oklch( from var(--a63-status-info) clamp(0.15, (0.57 - l) * 1000, 0.985) calc(c * 0.06) h )"
22778
+ },
22779
+ {
22780
+ "scope": "[data-a63-brand], [data-a63-surface]",
22781
+ "value": "oklch( from var(--a63-status-info) clamp(0.15, (0.57 - l) * 1000, 0.985) calc(c * 0.06) h )"
21848
22782
  }
21849
22783
  ]
21850
22784
  },
@@ -21865,6 +22799,10 @@
21865
22799
  {
21866
22800
  "scope": ":root, .light, [data-a63-mode='light']",
21867
22801
  "value": "color-mix(in oklab, var(--a63-status-info) 14%, transparent)"
22802
+ },
22803
+ {
22804
+ "scope": "[data-a63-brand], [data-a63-surface]",
22805
+ "value": "color-mix(in oklab, var(--a63-status-info) 14%, transparent)"
21868
22806
  }
21869
22807
  ]
21870
22808
  },
@@ -21885,6 +22823,10 @@
21885
22823
  {
21886
22824
  "scope": ":root, .light, [data-a63-mode='light']",
21887
22825
  "value": "var(--color-info-700)"
22826
+ },
22827
+ {
22828
+ "scope": "[data-a63-brand], [data-a63-surface]",
22829
+ "value": "var(--a63-if-light, var(--color-info-700)) var(--a63-if-dark, var(--color-info-400))"
21888
22830
  }
21889
22831
  ]
21890
22832
  },
@@ -21905,6 +22847,10 @@
21905
22847
  {
21906
22848
  "scope": ":root, .light, [data-a63-mode='light']",
21907
22849
  "value": "var(--color-success-600)"
22850
+ },
22851
+ {
22852
+ "scope": "[data-a63-brand], [data-a63-surface]",
22853
+ "value": "var(--a63-if-light, var(--color-success-600)) var(--a63-if-dark, var(--color-success-500))"
21908
22854
  }
21909
22855
  ]
21910
22856
  },
@@ -21921,6 +22867,10 @@
21921
22867
  {
21922
22868
  "scope": ":root, .light, [data-a63-mode='light']",
21923
22869
  "value": "oklch( from var(--a63-status-success) clamp(0.15, (0.57 - l) * 1000, 0.985) calc(c * 0.06) h )"
22870
+ },
22871
+ {
22872
+ "scope": "[data-a63-brand], [data-a63-surface]",
22873
+ "value": "oklch( from var(--a63-status-success) clamp(0.15, (0.57 - l) * 1000, 0.985) calc(c * 0.06) h )"
21924
22874
  }
21925
22875
  ]
21926
22876
  },
@@ -21941,6 +22891,10 @@
21941
22891
  {
21942
22892
  "scope": ":root, .light, [data-a63-mode='light']",
21943
22893
  "value": "color-mix(in oklab, var(--a63-status-success) 14%, transparent)"
22894
+ },
22895
+ {
22896
+ "scope": "[data-a63-brand], [data-a63-surface]",
22897
+ "value": "color-mix(in oklab, var(--a63-status-success) 14%, transparent)"
21944
22898
  }
21945
22899
  ]
21946
22900
  },
@@ -21961,6 +22915,10 @@
21961
22915
  {
21962
22916
  "scope": ":root, .light, [data-a63-mode='light']",
21963
22917
  "value": "var(--color-success-700)"
22918
+ },
22919
+ {
22920
+ "scope": "[data-a63-brand], [data-a63-surface]",
22921
+ "value": "var(--a63-if-light, var(--color-success-700)) var(--a63-if-dark, var(--color-success-400))"
21964
22922
  }
21965
22923
  ]
21966
22924
  },
@@ -21981,6 +22939,10 @@
21981
22939
  {
21982
22940
  "scope": ":root, .light, [data-a63-mode='light']",
21983
22941
  "value": "var(--color-warning-600)"
22942
+ },
22943
+ {
22944
+ "scope": "[data-a63-brand], [data-a63-surface]",
22945
+ "value": "var(--a63-if-light, var(--color-warning-600)) var(--a63-if-dark, var(--color-warning-500))"
21984
22946
  }
21985
22947
  ]
21986
22948
  },
@@ -21997,6 +22959,10 @@
21997
22959
  {
21998
22960
  "scope": ":root, .light, [data-a63-mode='light']",
21999
22961
  "value": "oklch( from var(--a63-status-warning) clamp(0.15, (0.57 - l) * 1000, 0.985) calc(c * 0.06) h )"
22962
+ },
22963
+ {
22964
+ "scope": "[data-a63-brand], [data-a63-surface]",
22965
+ "value": "oklch( from var(--a63-status-warning) clamp(0.15, (0.57 - l) * 1000, 0.985) calc(c * 0.06) h )"
22000
22966
  }
22001
22967
  ]
22002
22968
  },
@@ -22017,6 +22983,10 @@
22017
22983
  {
22018
22984
  "scope": ":root, .light, [data-a63-mode='light']",
22019
22985
  "value": "color-mix(in oklab, var(--a63-status-warning) 14%, transparent)"
22986
+ },
22987
+ {
22988
+ "scope": "[data-a63-brand], [data-a63-surface]",
22989
+ "value": "color-mix(in oklab, var(--a63-status-warning) 14%, transparent)"
22020
22990
  }
22021
22991
  ]
22022
22992
  },
@@ -22037,6 +23007,10 @@
22037
23007
  {
22038
23008
  "scope": ":root, .light, [data-a63-mode='light']",
22039
23009
  "value": "var(--color-warning-800)"
23010
+ },
23011
+ {
23012
+ "scope": "[data-a63-brand], [data-a63-surface]",
23013
+ "value": "var(--a63-if-light, var(--color-warning-800)) var(--a63-if-dark, var(--color-warning-400))"
22040
23014
  }
22041
23015
  ]
22042
23016
  },
@@ -22117,6 +23091,10 @@
22117
23091
  {
22118
23092
  "scope": ":root, .light, [data-a63-mode='light']",
22119
23093
  "value": "color-mix( in oklab, var(--surface-light-1) calc(100% - var(--a63-surface-tint)), var(--a63-brand-50) var(--a63-surface-tint) )"
23094
+ },
23095
+ {
23096
+ "scope": "[data-a63-brand], [data-a63-surface]",
23097
+ "value": "var( --a63-if-light, color-mix( in oklab, var(--surface-light-1) calc(100% - var(--a63-surface-tint)), var(--a63-brand-50) var(--a63-surface-tint) ) ) var( --a63-if-dark, color-mix( in oklab, var(--surface-dark-1) calc(100% - var(--a63-surface-tint)), var(--a63-brand-950) var(--a63-surface-tint) ) )"
22120
23098
  }
22121
23099
  ]
22122
23100
  },
@@ -22137,6 +23115,10 @@
22137
23115
  {
22138
23116
  "scope": ":root, .light, [data-a63-mode='light']",
22139
23117
  "value": "color-mix( in srgb, color-mix( in oklab, var(--surface-light-4) calc(100% - var(--a63-surface-tint)), var(--a63-brand-300) var(--a63-surface-tint) ), transparent 20% )"
23118
+ },
23119
+ {
23120
+ "scope": "[data-a63-brand], [data-a63-surface]",
23121
+ "value": "var( --a63-if-light, color-mix( in srgb, color-mix( in oklab, var(--surface-light-4) calc(100% - var(--a63-surface-tint)), var(--a63-brand-300) var(--a63-surface-tint) ), transparent 20% ) ) var( --a63-if-dark, color-mix( in srgb, color-mix( in oklab, var(--surface-dark-6) calc(100% - var(--a63-surface-tint)), var(--a63-brand-600) var(--a63-surface-tint) ), transparent 20% ) )"
22140
23122
  }
22141
23123
  ]
22142
23124
  },
@@ -22233,6 +23215,10 @@
22233
23215
  {
22234
23216
  "scope": ":root, .light, [data-a63-mode='light']",
22235
23217
  "value": "color-mix( in oklab, var(--surface-light-3) calc(100% - var(--a63-surface-tint)), var(--a63-brand-200) var(--a63-surface-tint) )"
23218
+ },
23219
+ {
23220
+ "scope": "[data-a63-brand], [data-a63-surface]",
23221
+ "value": "var( --a63-if-light, color-mix( in oklab, var(--surface-light-3) calc(100% - var(--a63-surface-tint)), var(--a63-brand-200) var(--a63-surface-tint) ) ) var( --a63-if-dark, color-mix( in oklab, var(--surface-dark-3) calc(100% - var(--a63-surface-tint)), var(--a63-brand-800) var(--a63-surface-tint) ) )"
22236
23222
  }
22237
23223
  ]
22238
23224
  },
@@ -22253,6 +23239,10 @@
22253
23239
  {
22254
23240
  "scope": ":root, .light, [data-a63-mode='light']",
22255
23241
  "value": "color-mix( in oklab, var(--surface-light-1) calc(100% - var(--a63-surface-tint)), var(--a63-brand-50) var(--a63-surface-tint) )"
23242
+ },
23243
+ {
23244
+ "scope": "[data-a63-brand], [data-a63-surface]",
23245
+ "value": "var( --a63-if-light, color-mix( in oklab, var(--surface-light-1) calc(100% - var(--a63-surface-tint)), var(--a63-brand-50) var(--a63-surface-tint) ) ) var( --a63-if-dark, color-mix( in oklab, var(--surface-dark-4) calc(100% - var(--a63-surface-tint)), var(--a63-brand-800) var(--a63-surface-tint) ) )"
22256
23246
  }
22257
23247
  ]
22258
23248
  },
@@ -22274,6 +23264,10 @@
22274
23264
  "scope": "[data-a63-theme='aqua']:is(.dark, [data-a63-mode='dark'])",
22275
23265
  "value": "color-mix(in oklab, var(--surface-dark-1) 94%, var(--color-b1-500))"
22276
23266
  },
23267
+ {
23268
+ "scope": "[data-a63-theme='aqua']:is([data-a63-brand], [data-a63-surface]), [data-a63-theme='aqua'] :is([data-a63-brand], [data-a63-surface])",
23269
+ "value": "var( --a63-if-light, color-mix(in oklab, var(--surface-light-2) 95%, var(--color-b1-500)) ) var(--a63-if-dark, color-mix(in oklab, var(--surface-dark-1) 94%, var(--color-b1-500)))"
23270
+ },
22277
23271
  {
22278
23272
  "scope": "[data-a63-theme='terminal']:is(:root, .light, [data-a63-mode='light']), [data-a63-theme='terminal'] :is(.light, [data-a63-mode='light'])",
22279
23273
  "value": "color-mix(in oklab, var(--surface-light-1) 60%, white)"
@@ -22282,6 +23276,10 @@
22282
23276
  "scope": "[data-a63-theme='terminal']:is(.dark, [data-a63-mode='dark']), [data-a63-theme='terminal'] :is(.dark, [data-a63-mode='dark'])",
22283
23277
  "value": "color-mix(in oklab, var(--surface-dark-1) 92%, var(--a63-action-primary))"
22284
23278
  },
23279
+ {
23280
+ "scope": "[data-a63-theme='terminal']:is([data-a63-brand], [data-a63-surface]), [data-a63-theme='terminal'] :is([data-a63-brand], [data-a63-surface])",
23281
+ "value": "var(--a63-if-light, color-mix(in oklab, var(--surface-light-1) 60%, white)) var(--a63-if-dark, color-mix(in oklab, var(--surface-dark-1) 92%, var(--a63-action-primary)))"
23282
+ },
22285
23283
  {
22286
23284
  "scope": ":is(.dark, [data-a63-mode='dark'])",
22287
23285
  "value": "color-mix( in oklab, var(--surface-dark-1) calc(100% - var(--a63-surface-tint)), var(--a63-brand-950) var(--a63-surface-tint) )"
@@ -22289,6 +23287,10 @@
22289
23287
  {
22290
23288
  "scope": ":root, .light, [data-a63-mode='light']",
22291
23289
  "value": "color-mix( in oklab, var(--surface-light-2) calc(100% - var(--a63-surface-tint)), var(--a63-brand-100) var(--a63-surface-tint) )"
23290
+ },
23291
+ {
23292
+ "scope": "[data-a63-brand], [data-a63-surface]",
23293
+ "value": "var( --a63-if-light, color-mix( in oklab, var(--surface-light-2) calc(100% - var(--a63-surface-tint)), var(--a63-brand-100) var(--a63-surface-tint) ) ) var( --a63-if-dark, color-mix( in oklab, var(--surface-dark-1) calc(100% - var(--a63-surface-tint)), var(--a63-brand-950) var(--a63-surface-tint) ) )"
22292
23294
  }
22293
23295
  ]
22294
23296
  },
@@ -22310,6 +23312,10 @@
22310
23312
  "scope": "[data-a63-theme='aqua']:is(.dark, [data-a63-mode='dark'])",
22311
23313
  "value": "color-mix(in oklab, var(--surface-dark-2) 94%, var(--color-b1-500))"
22312
23314
  },
23315
+ {
23316
+ "scope": "[data-a63-theme='aqua']:is([data-a63-brand], [data-a63-surface]), [data-a63-theme='aqua'] :is([data-a63-brand], [data-a63-surface])",
23317
+ "value": "var( --a63-if-light, color-mix(in oklab, var(--surface-light-1) 96%, var(--color-b1-500)) ) var(--a63-if-dark, color-mix(in oklab, var(--surface-dark-2) 94%, var(--color-b1-500)))"
23318
+ },
22313
23319
  {
22314
23320
  "scope": "[data-a63-theme='terminal']:is(:root, .light, [data-a63-mode='light']), [data-a63-theme='terminal'] :is(.light, [data-a63-mode='light'])",
22315
23321
  "value": "color-mix(in oklab, var(--surface-light-2) 60%, white)"
@@ -22318,6 +23324,10 @@
22318
23324
  "scope": "[data-a63-theme='terminal']:is(.dark, [data-a63-mode='dark']), [data-a63-theme='terminal'] :is(.dark, [data-a63-mode='dark'])",
22319
23325
  "value": "color-mix(in oklab, var(--surface-dark-2) 92%, var(--a63-action-primary))"
22320
23326
  },
23327
+ {
23328
+ "scope": "[data-a63-theme='terminal']:is([data-a63-brand], [data-a63-surface]), [data-a63-theme='terminal'] :is([data-a63-brand], [data-a63-surface])",
23329
+ "value": "var(--a63-if-light, color-mix(in oklab, var(--surface-light-2) 60%, white)) var(--a63-if-dark, color-mix(in oklab, var(--surface-dark-2) 92%, var(--a63-action-primary)))"
23330
+ },
22321
23331
  {
22322
23332
  "scope": ":is(.dark, [data-a63-mode='dark'])",
22323
23333
  "value": "color-mix( in oklab, var(--surface-dark-2) calc(100% - var(--a63-surface-tint)), var(--a63-brand-900) var(--a63-surface-tint) )"
@@ -22325,6 +23335,10 @@
22325
23335
  {
22326
23336
  "scope": ":root, .light, [data-a63-mode='light']",
22327
23337
  "value": "color-mix( in oklab, var(--surface-light-1) calc(100% - var(--a63-surface-tint)), var(--a63-brand-50) var(--a63-surface-tint) )"
23338
+ },
23339
+ {
23340
+ "scope": "[data-a63-brand], [data-a63-surface]",
23341
+ "value": "var( --a63-if-light, color-mix( in oklab, var(--surface-light-1) calc(100% - var(--a63-surface-tint)), var(--a63-brand-50) var(--a63-surface-tint) ) ) var( --a63-if-dark, color-mix( in oklab, var(--surface-dark-2) calc(100% - var(--a63-surface-tint)), var(--a63-brand-900) var(--a63-surface-tint) ) )"
22328
23342
  }
22329
23343
  ]
22330
23344
  },
@@ -22373,6 +23387,10 @@
22373
23387
  {
22374
23388
  "scope": ":root, .light, [data-a63-mode='light']",
22375
23389
  "value": "var(--a63-surface-muted)"
23390
+ },
23391
+ {
23392
+ "scope": "[data-a63-brand], [data-a63-surface]",
23393
+ "value": "var(--a63-if-light, var(--a63-surface-muted)) var(--a63-if-dark, var(--a63-surface-page))"
22376
23394
  }
22377
23395
  ]
22378
23396
  },
@@ -22421,6 +23439,10 @@
22421
23439
  {
22422
23440
  "scope": ":root, .light, [data-a63-mode='light']",
22423
23441
  "value": "var(--a63-surface-muted)"
23442
+ },
23443
+ {
23444
+ "scope": "[data-a63-brand], [data-a63-surface]",
23445
+ "value": "var(--a63-if-light, var(--a63-surface-muted)) var(--a63-if-dark, var(--a63-surface-page))"
22424
23446
  }
22425
23447
  ]
22426
23448
  },
@@ -22541,6 +23563,10 @@
22541
23563
  {
22542
23564
  "scope": ":root, .light, [data-a63-mode='light']",
22543
23565
  "value": "var(--a63-brand-text)"
23566
+ },
23567
+ {
23568
+ "scope": "[data-a63-brand], [data-a63-surface]",
23569
+ "value": "var(--a63-if-light, var(--a63-brand-text)) var(--a63-if-dark, var(--a63-brand-400))"
22544
23570
  }
22545
23571
  ]
22546
23572
  },
@@ -22561,6 +23587,10 @@
22561
23587
  {
22562
23588
  "scope": ":root, .light, [data-a63-mode='light']",
22563
23589
  "value": "var(--color-danger-600)"
23590
+ },
23591
+ {
23592
+ "scope": "[data-a63-brand], [data-a63-surface]",
23593
+ "value": "var(--a63-if-light, var(--color-danger-600)) var(--a63-if-dark, var(--color-danger-400))"
22564
23594
  }
22565
23595
  ]
22566
23596
  },
@@ -22582,6 +23612,10 @@
22582
23612
  "scope": "[data-a63-theme='terminal']:is(.dark, [data-a63-mode='dark']), [data-a63-theme='terminal'] :is(.dark, [data-a63-mode='dark'])",
22583
23613
  "value": "color-mix(in oklch, var(--a63-action-primary) 62%, white)"
22584
23614
  },
23615
+ {
23616
+ "scope": "[data-a63-theme='terminal']:is([data-a63-brand], [data-a63-surface]), [data-a63-theme='terminal'] :is([data-a63-brand], [data-a63-surface])",
23617
+ "value": "var(--a63-if-light, color-mix(in oklch, var(--a63-action-primary) 70%, black)) var(--a63-if-dark, color-mix(in oklch, var(--a63-action-primary) 62%, white))"
23618
+ },
22585
23619
  {
22586
23620
  "scope": ":is(.dark, [data-a63-mode='dark'])",
22587
23621
  "value": "var(--surface-dark-12)"
@@ -22589,6 +23623,10 @@
22589
23623
  {
22590
23624
  "scope": ":root, .light, [data-a63-mode='light']",
22591
23625
  "value": "var(--surface-light-12)"
23626
+ },
23627
+ {
23628
+ "scope": "[data-a63-brand], [data-a63-surface]",
23629
+ "value": "var(--a63-if-light, var(--surface-light-12)) var(--a63-if-dark, var(--surface-dark-12))"
22592
23630
  }
22593
23631
  ]
22594
23632
  },
@@ -22610,13 +23648,21 @@
22610
23648
  "scope": "[data-a63-theme='terminal']:is(.dark, [data-a63-mode='dark']), [data-a63-theme='terminal'] :is(.dark, [data-a63-mode='dark'])",
22611
23649
  "value": "color-mix(in oklab, var(--a63-text-accent) 48%, var(--surface-dark-11))"
22612
23650
  },
23651
+ {
23652
+ "scope": "[data-a63-theme='terminal']:is([data-a63-brand], [data-a63-surface]), [data-a63-theme='terminal'] :is([data-a63-brand], [data-a63-surface])",
23653
+ "value": "var( --a63-if-light, color-mix(in oklch, var(--a63-action-primary) 52%, black) ) var(--a63-if-dark, color-mix(in oklab, var(--a63-text-accent) 48%, var(--surface-dark-11)))"
23654
+ },
22613
23655
  {
22614
23656
  "scope": ":is(.dark, [data-a63-mode='dark'])",
22615
- "value": "var(--surface-dark-11)"
23657
+ "value": "color-mix( in oklab, var(--surface-dark-11) calc(100% - var(--a63-surface-tint) * 0.3), var(--a63-brand-100) calc(var(--a63-surface-tint) * 0.3) )"
22616
23658
  },
22617
23659
  {
22618
23660
  "scope": ":root, .light, [data-a63-mode='light']",
22619
- "value": "var(--surface-light-11)"
23661
+ "value": "color-mix( in oklab, var(--surface-light-11) calc(100% - var(--a63-surface-tint) * 0.3), var(--a63-brand-800) calc(var(--a63-surface-tint) * 0.3) )"
23662
+ },
23663
+ {
23664
+ "scope": "[data-a63-brand], [data-a63-surface]",
23665
+ "value": "var( --a63-if-light, color-mix( in oklab, var(--surface-light-11) calc(100% - var(--a63-surface-tint) * 0.3), var(--a63-brand-800) calc(var(--a63-surface-tint) * 0.3) ) ) var( --a63-if-dark, color-mix( in oklab, var(--surface-dark-11) calc(100% - var(--a63-surface-tint) * 0.3), var(--a63-brand-100) calc(var(--a63-surface-tint) * 0.3) ) )"
22620
23666
  }
22621
23667
  ]
22622
23668
  },
@@ -22636,15 +23682,23 @@
22636
23682
  },
22637
23683
  {
22638
23684
  "scope": "[data-a63-theme='terminal']:is(.dark, [data-a63-mode='dark']), [data-a63-theme='terminal'] :is(.dark, [data-a63-mode='dark'])",
22639
- "value": "color-mix(in oklab, var(--a63-text-accent) 40%, var(--surface-dark-10))"
23685
+ "value": "color-mix( in oklab, color-mix(in oklab, var(--a63-text-accent) 40%, var(--surface-dark-10)) calc(100% - var(--a63-surface-tint) * 0.3), var(--a63-brand-100) calc(var(--a63-surface-tint) * 0.3) )"
23686
+ },
23687
+ {
23688
+ "scope": "[data-a63-theme='terminal']:is([data-a63-brand], [data-a63-surface]), [data-a63-theme='terminal'] :is([data-a63-brand], [data-a63-surface])",
23689
+ "value": "var( --a63-if-light, color-mix(in oklch, var(--a63-action-primary) 80%, black) ) var( --a63-if-dark, color-mix( in oklab, color-mix(in oklab, var(--a63-text-accent) 40%, var(--surface-dark-10)) calc(100% - var(--a63-surface-tint) * 0.3), var(--a63-brand-100) calc(var(--a63-surface-tint) * 0.3) ) )"
22640
23690
  },
22641
23691
  {
22642
23692
  "scope": ":is(.dark, [data-a63-mode='dark'])",
22643
- "value": "color-mix(in oklab, var(--surface-dark-11) 30%, var(--surface-dark-10))"
23693
+ "value": "color-mix( in oklab, color-mix(in oklab, var(--surface-dark-11) 30%, var(--surface-dark-10)) calc(100% - var(--a63-surface-tint) * 0.3), var(--a63-brand-100) calc(var(--a63-surface-tint) * 0.3) )"
22644
23694
  },
22645
23695
  {
22646
23696
  "scope": ":root, .light, [data-a63-mode='light']",
22647
- "value": "color-mix(in oklab, var(--surface-light-11) 70%, var(--surface-light-10))"
23697
+ "value": "color-mix( in oklab, color-mix(in oklab, var(--surface-light-11) 70%, var(--surface-light-10)) calc(100% - var(--a63-surface-tint) * 0.3), var(--a63-brand-800) calc(var(--a63-surface-tint) * 0.3) )"
23698
+ },
23699
+ {
23700
+ "scope": "[data-a63-brand], [data-a63-surface]",
23701
+ "value": "var( --a63-if-light, color-mix( in oklab, color-mix(in oklab, var(--surface-light-11) 70%, var(--surface-light-10)) calc(100% - var(--a63-surface-tint) * 0.3), var(--a63-brand-800) calc(var(--a63-surface-tint) * 0.3) ) ) var( --a63-if-dark, color-mix( in oklab, color-mix(in oklab, var(--surface-dark-11) 30%, var(--surface-dark-10)) calc(100% - var(--a63-surface-tint) * 0.3), var(--a63-brand-100) calc(var(--a63-surface-tint) * 0.3) ) )"
22648
23702
  }
22649
23703
  ]
22650
23704
  },
@@ -22734,6 +23788,10 @@
22734
23788
  "scope": ":root, .light, [data-a63-mode='light']",
22735
23789
  "value": "var(--a63-action-neutral)"
22736
23790
  },
23791
+ {
23792
+ "scope": "[data-a63-brand], [data-a63-surface]",
23793
+ "value": "var(--a63-action-neutral)"
23794
+ },
22737
23795
  {
22738
23796
  "scope": "[data-a63-theme='terminal']:is(:root, .light, [data-a63-mode='light']), [data-a63-theme='terminal'] :is(.light, [data-a63-mode='light'])",
22739
23797
  "value": "var(--a63-text-primary)"
@@ -22741,6 +23799,10 @@
22741
23799
  {
22742
23800
  "scope": "[data-a63-theme='terminal']:is(.dark, [data-a63-mode='dark']), [data-a63-theme='terminal'] :is(.dark, [data-a63-mode='dark'])",
22743
23801
  "value": "var(--a63-text-primary)"
23802
+ },
23803
+ {
23804
+ "scope": "[data-a63-theme='terminal']:is([data-a63-brand], [data-a63-surface]), [data-a63-theme='terminal'] :is([data-a63-brand], [data-a63-surface])",
23805
+ "value": "var(--a63-text-primary)"
22744
23806
  }
22745
23807
  ]
22746
23808
  },
@@ -22762,6 +23824,10 @@
22762
23824
  "scope": ":root, .light, [data-a63-mode='light']",
22763
23825
  "value": "var(--a63-action-neutral-foreground)"
22764
23826
  },
23827
+ {
23828
+ "scope": "[data-a63-brand], [data-a63-surface]",
23829
+ "value": "var(--a63-action-neutral-foreground)"
23830
+ },
22765
23831
  {
22766
23832
  "scope": "[data-a63-theme='terminal']:is(:root, .light, [data-a63-mode='light']), [data-a63-theme='terminal'] :is(.light, [data-a63-mode='light'])",
22767
23833
  "value": "var(--a63-surface-page)"
@@ -22769,6 +23835,10 @@
22769
23835
  {
22770
23836
  "scope": "[data-a63-theme='terminal']:is(.dark, [data-a63-mode='dark']), [data-a63-theme='terminal'] :is(.dark, [data-a63-mode='dark'])",
22771
23837
  "value": "var(--a63-surface-page)"
23838
+ },
23839
+ {
23840
+ "scope": "[data-a63-theme='terminal']:is([data-a63-brand], [data-a63-surface]), [data-a63-theme='terminal'] :is([data-a63-brand], [data-a63-surface])",
23841
+ "value": "var(--a63-surface-page)"
22772
23842
  }
22773
23843
  ]
22774
23844
  },
@@ -23316,6 +24386,86 @@
23316
24386
  }
23317
24387
  ]
23318
24388
  },
24389
+ {
24390
+ "cssVar": "--a63-type-display-hero-font-size",
24391
+ "figma": {
24392
+ "collection": "Semantic",
24393
+ "path": "type/display/hero/font/size"
24394
+ },
24395
+ "layer": "semantic",
24396
+ "swift": null,
24397
+ "type": "typography",
24398
+ "values": [
24399
+ {
24400
+ "scope": ":root, [data-window-size], [data-a63-form-factor]",
24401
+ "value": "clamp( var(--typography-10xl-font-size), calc(1.5rem + 3.4vw), calc(72px * var(--typography-scale, 1)) )"
24402
+ }
24403
+ ]
24404
+ },
24405
+ {
24406
+ "cssVar": "--a63-type-display-hero-font-weight",
24407
+ "figma": {
24408
+ "collection": "Semantic",
24409
+ "path": "type/display/hero/font/weight"
24410
+ },
24411
+ "layer": "semantic",
24412
+ "swift": null,
24413
+ "type": "typography",
24414
+ "values": [
24415
+ {
24416
+ "scope": ":root, [data-window-size], [data-a63-form-factor]",
24417
+ "value": "600"
24418
+ }
24419
+ ]
24420
+ },
24421
+ {
24422
+ "cssVar": "--a63-type-display-hero-font-weight-strong",
24423
+ "figma": {
24424
+ "collection": "Semantic",
24425
+ "path": "type/display/hero/font/weight/strong"
24426
+ },
24427
+ "layer": "semantic",
24428
+ "swift": null,
24429
+ "type": "typography",
24430
+ "values": [
24431
+ {
24432
+ "scope": ":root, [data-window-size], [data-a63-form-factor]",
24433
+ "value": "700"
24434
+ }
24435
+ ]
24436
+ },
24437
+ {
24438
+ "cssVar": "--a63-type-display-hero-letter-spacing",
24439
+ "figma": {
24440
+ "collection": "Semantic",
24441
+ "path": "type/display/hero/letter/spacing"
24442
+ },
24443
+ "layer": "semantic",
24444
+ "swift": null,
24445
+ "type": "typography",
24446
+ "values": [
24447
+ {
24448
+ "scope": ":root, [data-window-size], [data-a63-form-factor]",
24449
+ "value": "-0.045em"
24450
+ }
24451
+ ]
24452
+ },
24453
+ {
24454
+ "cssVar": "--a63-type-display-hero-line-height",
24455
+ "figma": {
24456
+ "collection": "Semantic",
24457
+ "path": "type/display/hero/line/height"
24458
+ },
24459
+ "layer": "semantic",
24460
+ "swift": null,
24461
+ "type": "typography",
24462
+ "values": [
24463
+ {
24464
+ "scope": ":root, [data-window-size], [data-a63-form-factor]",
24465
+ "value": "calc(var(--a63-type-display-hero-font-size) * 1.05)"
24466
+ }
24467
+ ]
24468
+ },
23319
24469
  {
23320
24470
  "cssVar": "--a63-type-display-large-font-size",
23321
24471
  "figma": {
@@ -23364,6 +24514,22 @@
23364
24514
  }
23365
24515
  ]
23366
24516
  },
24517
+ {
24518
+ "cssVar": "--a63-type-display-large-letter-spacing",
24519
+ "figma": {
24520
+ "collection": "Semantic",
24521
+ "path": "type/display/large/letter/spacing"
24522
+ },
24523
+ "layer": "semantic",
24524
+ "swift": null,
24525
+ "type": "typography",
24526
+ "values": [
24527
+ {
24528
+ "scope": ":root, [data-window-size], [data-a63-form-factor]",
24529
+ "value": "-0.04em"
24530
+ }
24531
+ ]
24532
+ },
23367
24533
  {
23368
24534
  "cssVar": "--a63-type-display-large-line-height",
23369
24535
  "figma": {
@@ -23380,6 +24546,22 @@
23380
24546
  }
23381
24547
  ]
23382
24548
  },
24549
+ {
24550
+ "cssVar": "--a63-type-display-letter-spacing",
24551
+ "figma": {
24552
+ "collection": "Semantic",
24553
+ "path": "type/display/letter/spacing"
24554
+ },
24555
+ "layer": "semantic",
24556
+ "swift": null,
24557
+ "type": "typography",
24558
+ "values": [
24559
+ {
24560
+ "scope": ":root, [data-window-size], [data-a63-form-factor]",
24561
+ "value": "-0.03em"
24562
+ }
24563
+ ]
24564
+ },
23383
24565
  {
23384
24566
  "cssVar": "--a63-type-display-line-height",
23385
24567
  "figma": {
@@ -23934,6 +25116,10 @@
23934
25116
  {
23935
25117
  "scope": "[data-a63-theme='terminal']:is(.dark, [data-a63-mode='dark']), [data-a63-theme='terminal'] :is(.dark, [data-a63-mode='dark'])",
23936
25118
  "value": "color-mix(in oklch, var(--a63-action-primary) 22%, black 78%)"
25119
+ },
25120
+ {
25121
+ "scope": "[data-a63-theme='terminal']:is([data-a63-brand], [data-a63-surface]), [data-a63-theme='terminal'] :is([data-a63-brand], [data-a63-surface])",
25122
+ "value": "var( --a63-if-light, color-mix(in oklch, var(--a63-action-primary) 34%, white 66%) ) var(--a63-if-dark, color-mix(in oklch, var(--a63-action-primary) 22%, black 78%))"
23937
25123
  }
23938
25124
  ]
23939
25125
  },
@@ -23955,6 +25141,10 @@
23955
25141
  "scope": "[data-a63-theme='aqua']:is(.dark, [data-a63-mode='dark'])",
23956
25142
  "value": "radial-gradient( 120% 90% at 10% 0%, color-mix(in oklab, white 18%, transparent), transparent 48% ), radial-gradient( 88% 110% at 100% 0%, color-mix(in oklab, var(--a63-action-primary) 30%, transparent), transparent 58% ), linear-gradient( 135deg, color-mix(in oklab, var(--a63-action-primary) 58%, var(--surface-dark-6) 42%), color-mix(in oklab, var(--a63-action-primary) 36%, var(--surface-dark-3) 64%) )"
23957
25143
  },
25144
+ {
25145
+ "scope": "[data-a63-theme='aqua']:is([data-a63-brand], [data-a63-surface]), [data-a63-theme='aqua'] :is([data-a63-brand], [data-a63-surface])",
25146
+ "value": "var( --a63-if-light, radial-gradient( 120% 90% at 10% 0%, color-mix(in oklch, white 28%, transparent), transparent 48% ), radial-gradient( 78% 100% at 100% 0%, color-mix(in oklch, var(--a63-action-primary) 32%, transparent), transparent 58% ), linear-gradient( 135deg, color-mix(in oklch, var(--a63-action-primary) 78%, white 10%), color-mix(in oklch, var(--a63-action-primary) 70%, var(--color-b1-900) 30%) ) ) var( --a63-if-dark, radial-gradient( 120% 90% at 10% 0%, color-mix(in oklab, white 18%, transparent), transparent 48% ), radial-gradient( 88% 110% at 100% 0%, color-mix(in oklab, var(--a63-action-primary) 30%, transparent), transparent 58% ), linear-gradient( 135deg, color-mix(in oklab, var(--a63-action-primary) 58%, var(--surface-dark-6) 42%), color-mix(in oklab, var(--a63-action-primary) 36%, var(--surface-dark-3) 64%) ) )"
25147
+ },
23958
25148
  {
23959
25149
  "scope": "[data-a63-theme='retro']",
23960
25150
  "value": "linear-gradient(135deg, color-mix(in oklab, white 22%, transparent), transparent 44%), linear-gradient( 135deg, color-mix(in oklab, var(--a63-action-primary) 58%, var(--a63-surface-panel)), color-mix(in oklab, var(--a63-action-primary) 68%, var(--a63-text-primary)) )"
@@ -23966,6 +25156,10 @@
23966
25156
  {
23967
25157
  "scope": "[data-a63-theme='terminal']:is(.dark, [data-a63-mode='dark']), [data-a63-theme='terminal'] :is(.dark, [data-a63-mode='dark'])",
23968
25158
  "value": "linear-gradient(color-mix(in oklch, var(--a63-action-primary) 12%, transparent), transparent), linear-gradient( 135deg, color-mix(in oklch, var(--a63-action-primary) 30%, black 70%), color-mix(in oklch, var(--a63-action-primary) 16%, black 84%) )"
25159
+ },
25160
+ {
25161
+ "scope": "[data-a63-theme='terminal']:is([data-a63-brand], [data-a63-surface]), [data-a63-theme='terminal'] :is([data-a63-brand], [data-a63-surface])",
25162
+ "value": "var( --a63-if-light, linear-gradient(color-mix(in oklch, var(--a63-action-primary) 18%, transparent), transparent), linear-gradient( 135deg, color-mix(in oklch, var(--a63-action-primary) 48%, white 52%), color-mix(in oklch, var(--a63-action-primary) 36%, white 64%) ) ) var( --a63-if-dark, linear-gradient(color-mix(in oklch, var(--a63-action-primary) 12%, transparent), transparent), linear-gradient( 135deg, color-mix(in oklch, var(--a63-action-primary) 30%, black 70%), color-mix(in oklch, var(--a63-action-primary) 16%, black 84%) ) )"
23969
25163
  }
23970
25164
  ]
23971
25165
  },
@@ -23991,6 +25185,10 @@
23991
25185
  "scope": "[data-a63-theme='aqua']:is(.dark, [data-a63-mode='dark'])",
23992
25186
  "value": "color-mix(in oklch, white 14%, transparent)"
23993
25187
  },
25188
+ {
25189
+ "scope": "[data-a63-theme='aqua']:is([data-a63-brand], [data-a63-surface]), [data-a63-theme='aqua'] :is([data-a63-brand], [data-a63-surface])",
25190
+ "value": "var( --a63-if-light, color-mix(in oklch, var(--a63-action-primary) 32%, transparent) ) var(--a63-if-dark, color-mix(in oklch, white 14%, transparent))"
25191
+ },
23994
25192
  {
23995
25193
  "scope": "[data-a63-theme='retro']",
23996
25194
  "value": "color-mix( in oklab, var(--a63-action-primary) 44%, var(--a63-border-subtle) )"
@@ -24190,6 +25388,10 @@
24190
25388
  {
24191
25389
  "scope": "[data-a63-theme='terminal']:is(.dark, [data-a63-mode='dark']), [data-a63-theme='terminal'] :is(.dark, [data-a63-mode='dark'])",
24192
25390
  "value": "color-mix(in oklch, var(--a63-action-primary) 36%, transparent)"
25391
+ },
25392
+ {
25393
+ "scope": "[data-a63-theme='terminal']:is([data-a63-brand], [data-a63-surface]), [data-a63-theme='terminal'] :is([data-a63-brand], [data-a63-surface])",
25394
+ "value": "var( --a63-if-light, color-mix(in oklch, var(--a63-action-primary) 38%, transparent) ) var(--a63-if-dark, color-mix(in oklch, var(--a63-action-primary) 36%, transparent))"
24193
25395
  }
24194
25396
  ]
24195
25397
  },
@@ -24222,6 +25424,10 @@
24222
25424
  {
24223
25425
  "scope": "[data-a63-theme='terminal']:is(.dark, [data-a63-mode='dark']), [data-a63-theme='terminal'] :is(.dark, [data-a63-mode='dark'])",
24224
25426
  "value": "color-mix(in oklch, var(--a63-action-primary) 26%, white 74%)"
25427
+ },
25428
+ {
25429
+ "scope": "[data-a63-theme='terminal']:is([data-a63-brand], [data-a63-surface]), [data-a63-theme='terminal'] :is([data-a63-brand], [data-a63-surface])",
25430
+ "value": "var( --a63-if-light, color-mix(in oklab, var(--a63-action-primary) 82%, var(--surface-light-12)) ) var(--a63-if-dark, color-mix(in oklch, var(--a63-action-primary) 26%, white 74%))"
24225
25431
  }
24226
25432
  ]
24227
25433
  },
@@ -24254,6 +25460,10 @@
24254
25460
  {
24255
25461
  "scope": "[data-a63-theme='terminal']:is(.dark, [data-a63-mode='dark']), [data-a63-theme='terminal'] :is(.dark, [data-a63-mode='dark'])",
24256
25462
  "value": "color-mix(in oklch, var(--a63-text-accent) 54%, white 46%)"
25463
+ },
25464
+ {
25465
+ "scope": "[data-a63-theme='terminal']:is([data-a63-brand], [data-a63-surface]), [data-a63-theme='terminal'] :is([data-a63-brand], [data-a63-surface])",
25466
+ "value": "var( --a63-if-light, color-mix(in oklab, var(--a63-action-primary) 58%, var(--surface-light-10)) ) var(--a63-if-dark, color-mix(in oklch, var(--a63-text-accent) 54%, white 46%))"
24257
25467
  }
24258
25468
  ]
24259
25469
  },
@@ -24286,6 +25496,10 @@
24286
25496
  {
24287
25497
  "scope": "[data-a63-theme='terminal']:is(.dark, [data-a63-mode='dark']), [data-a63-theme='terminal'] :is(.dark, [data-a63-mode='dark'])",
24288
25498
  "value": "0 0 8px color-mix(in oklch, var(--a63-action-primary) 38%, transparent)"
25499
+ },
25500
+ {
25501
+ "scope": "[data-a63-theme='terminal']:is([data-a63-brand], [data-a63-surface]), [data-a63-theme='terminal'] :is([data-a63-brand], [data-a63-surface])",
25502
+ "value": "var( --a63-if-light, 0 0 10px color-mix(in oklch, var(--a63-action-primary) 22%, transparent) ) var(--a63-if-dark, 0 0 8px color-mix(in oklch, var(--a63-action-primary) 38%, transparent))"
24289
25503
  }
24290
25504
  ]
24291
25505
  },
@@ -24456,6 +25670,10 @@
24456
25670
  {
24457
25671
  "scope": ":root, .light, [data-a63-mode='light']",
24458
25672
  "value": "0 0 0 1px color-mix(in oklch, black 8%, transparent), 0 1px 0 color-mix(in oklch, white 45%, transparent) inset, 0 10px 16px -10px color-mix(in oklch, black 22%, transparent), 0 22px 34px -16px color-mix(in oklch, black 26%, transparent)"
25673
+ },
25674
+ {
25675
+ "scope": "[data-a63-brand], [data-a63-surface]",
25676
+ "value": "var( --a63-if-light, 0 0 0 1px color-mix(in oklch, black 8%, transparent), 0 1px 0 color-mix(in oklch, white 45%, transparent) inset, 0 10px 16px -10px color-mix(in oklch, black 22%, transparent), 0 22px 34px -16px color-mix(in oklch, black 26%, transparent) ) var( --a63-if-dark, 0 0 0 1px color-mix(in oklch, white 10%, transparent), 0 1px 0 color-mix(in oklch, white 8%, transparent) inset, 0 10px 16px -10px color-mix(in oklch, black 50%, transparent), 0 22px 34px -16px color-mix(in oklch, black 62%, transparent) )"
24459
25677
  }
24460
25678
  ]
24461
25679
  },
@@ -24476,6 +25694,10 @@
24476
25694
  {
24477
25695
  "scope": ":root, .light, [data-a63-mode='light']",
24478
25696
  "value": "0 0 0 1px color-mix(in oklch, black 12%, transparent), 0 1px 0 color-mix(in oklch, white 60%, transparent) inset, 0 1px 1px color-mix(in oklch, black 12%, transparent), 0 14px 22px -10px color-mix(in oklch, black 26%, transparent), 0 32px 48px -18px color-mix(in oklch, black 30%, transparent)"
25697
+ },
25698
+ {
25699
+ "scope": "[data-a63-brand], [data-a63-surface]",
25700
+ "value": "var( --a63-if-light, 0 0 0 1px color-mix(in oklch, black 12%, transparent), 0 1px 0 color-mix(in oklch, white 60%, transparent) inset, 0 1px 1px color-mix(in oklch, black 12%, transparent), 0 14px 22px -10px color-mix(in oklch, black 26%, transparent), 0 32px 48px -18px color-mix(in oklch, black 30%, transparent) ) var( --a63-if-dark, 0 0 0 1px color-mix(in oklch, white 16%, transparent), 0 1px 0 color-mix(in oklch, white 12%, transparent) inset, 0 1px 1px color-mix(in oklch, black 35%, transparent), 0 14px 22px -10px color-mix(in oklch, black 58%, transparent), 0 32px 48px -18px color-mix(in oklch, black 72%, transparent) )"
24479
25701
  }
24480
25702
  ]
24481
25703
  },