basalt-ui 1.40.3 → 2.0.0
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.
- package/AGENTS.md +50 -45
- package/CHANGELOG.md +543 -513
- package/MIGRATING.md +969 -37
- package/README.md +172 -367
- package/agent/rules/basalt-batteries.md +19 -74
- package/agent/rules/basalt-charts.md +21 -95
- package/agent/rules/basalt-controls.md +23 -131
- package/agent/rules/basalt-mantine.md +26 -99
- package/agent/rules/basalt-state.md +21 -103
- package/agent/rules/basalt-tokens.md +33 -114
- package/agent/skills/basalt-app/SKILL.md +229 -72
- package/agent/skills/basalt-charts/SKILL.md +23 -57
- package/agent/skills/basalt-design/SKILL.md +12 -70
- package/agent/templates/AGENTS-block.md.tpl +30 -0
- package/agent/templates/DESIGN.md.tpl +2 -2
- package/agent/templates/__root.tpl +9 -16
- package/agent/templates/main.tpl +21 -0
- package/agent/templates/nav.tpl +18 -0
- package/configs/check.yml +1 -1
- package/configs/oxlint-basalt.json +4 -10
- package/configs/oxlint-plugin.js +468 -847
- package/configs/oxlint-plugin.test.ts +662 -710
- package/configs/oxlint.json +10 -2
- package/dist/agent/ai-sdk-transport.d.ts +19 -7
- package/dist/agent/ai-sdk-transport.d.ts.map +1 -1
- package/dist/agent/ai-sdk-transport.js +10 -7
- package/dist/{agent-chat → agent/chat}/composer.d.ts +16 -16
- package/dist/agent/chat/composer.d.ts.map +1 -0
- package/dist/{agent-chat → agent/chat}/composer.js +10 -9
- package/dist/{agent-chat → agent/chat}/message-affordances.d.ts +7 -6
- package/dist/agent/chat/message-affordances.d.ts.map +1 -0
- package/dist/agent/chat/relative-time.d.ts.map +1 -0
- package/dist/{agent-chat → agent/chat}/thread-feed-row.d.ts +18 -16
- package/dist/agent/chat/thread-feed-row.d.ts.map +1 -0
- package/dist/{agent-chat → agent/chat}/thread-feed-row.js +12 -11
- package/dist/{agent-chat → agent/chat}/thread-feed.d.ts +8 -8
- package/dist/agent/chat/thread-feed.d.ts.map +1 -0
- package/dist/{agent-chat → agent/chat}/thread-feed.js +12 -10
- package/dist/{agent-chat → agent/chat}/thread-message.d.ts +12 -9
- package/dist/agent/chat/thread-message.d.ts.map +1 -0
- package/dist/{agent-chat → agent/chat}/thread-message.js +15 -13
- package/dist/{agent-chat → agent/chat}/thread-outcome-card.d.ts +2 -2
- package/dist/agent/chat/thread-outcome-card.d.ts.map +1 -0
- package/dist/{agent-chat → agent/chat}/thread-outcome-card.js +3 -3
- package/dist/{agent-chat → agent/chat}/tool-chip.d.ts +5 -5
- package/dist/agent/chat/tool-chip.d.ts.map +1 -0
- package/dist/{agent-chat → agent/chat}/tool-chip.js +4 -4
- package/dist/agent/chat/use-keyboard-inset.d.ts.map +1 -0
- package/dist/{agent-chat → agent/chat}/use-keyboard-inset.js +1 -1
- package/dist/{agent-chat → agent/chat}/virtualize.d.ts +7 -7
- package/dist/agent/chat/virtualize.d.ts.map +1 -0
- package/dist/agent/error.d.ts +31 -0
- package/dist/agent/error.d.ts.map +1 -0
- package/dist/agent/error.js +18 -0
- package/dist/agent/foreign.d.ts +3 -2
- package/dist/agent/foreign.d.ts.map +1 -1
- package/dist/agent/history.d.ts +2 -36
- package/dist/agent/history.d.ts.map +1 -1
- package/dist/agent/history.js +0 -32
- package/dist/agent/id.d.ts +4 -5
- package/dist/agent/id.d.ts.map +1 -1
- package/dist/agent/index.d.ts +19 -52
- package/dist/agent/index.d.ts.map +1 -1
- package/dist/agent/index.js +10 -32
- package/dist/agent/outcome.d.ts +3 -14
- package/dist/agent/outcome.d.ts.map +1 -1
- package/dist/agent/outcome.js +0 -30
- package/dist/agent/part-list.d.ts +3 -3
- package/dist/agent/part-list.d.ts.map +1 -1
- package/dist/agent/parts.d.ts +23 -24
- package/dist/agent/parts.d.ts.map +1 -1
- package/dist/agent/run-committer.d.ts +23 -0
- package/dist/agent/run-committer.d.ts.map +1 -0
- package/dist/agent/run-committer.js +41 -0
- package/dist/agent/run-records.d.ts +77 -0
- package/dist/agent/run-records.d.ts.map +1 -0
- package/dist/agent/run-records.js +69 -0
- package/dist/agent/thread.d.ts +23 -47
- package/dist/agent/thread.d.ts.map +1 -1
- package/dist/agent/thread.js +3 -134
- package/dist/agent/transport.d.ts +6 -69
- package/dist/agent/transport.d.ts.map +1 -1
- package/dist/agent/transport.js +0 -18
- package/dist/agent/use-agent-thread-runs.d.ts +63 -26
- package/dist/agent/use-agent-thread-runs.d.ts.map +1 -1
- package/dist/agent/use-agent-thread-runs.js +202 -66
- package/dist/charts/BandStrip.d.ts +46 -0
- package/dist/charts/BandStrip.d.ts.map +1 -0
- package/dist/charts/BandStrip.js +151 -0
- package/dist/charts/Bars.d.ts +19 -0
- package/dist/charts/Bars.d.ts.map +1 -0
- package/dist/charts/Bars.js +77 -0
- package/dist/charts/CartesianChart.d.ts +57 -0
- package/dist/charts/CartesianChart.d.ts.map +1 -0
- package/dist/charts/CartesianChart.js +121 -0
- package/dist/charts/ChartCard.d.ts +34 -0
- package/dist/charts/ChartCard.d.ts.map +1 -0
- package/dist/charts/ChartCard.js +115 -0
- package/dist/charts/Donut.d.ts +25 -0
- package/dist/charts/Donut.d.ts.map +1 -0
- package/dist/charts/Donut.js +191 -0
- package/dist/charts/DualPanel.d.ts +47 -0
- package/dist/charts/DualPanel.d.ts.map +1 -0
- package/dist/charts/DualPanel.js +214 -0
- package/dist/charts/Heatmap.d.ts +41 -0
- package/dist/charts/Heatmap.d.ts.map +1 -0
- package/dist/charts/Heatmap.js +216 -0
- package/dist/charts/Lines.d.ts +11 -0
- package/dist/charts/Lines.d.ts.map +1 -0
- package/dist/charts/Lines.js +114 -0
- package/dist/charts/MirroredBars.d.ts +44 -0
- package/dist/charts/MirroredBars.d.ts.map +1 -0
- package/dist/charts/MirroredBars.js +190 -0
- package/dist/charts/Sparkline.d.ts +22 -0
- package/dist/charts/Sparkline.d.ts.map +1 -0
- package/dist/charts/Sparkline.js +129 -0
- package/dist/charts/StackedArea.d.ts +15 -0
- package/dist/charts/StackedArea.d.ts.map +1 -0
- package/dist/charts/StackedArea.js +46 -0
- package/dist/charts/box.d.ts +38 -0
- package/dist/charts/box.d.ts.map +1 -0
- package/dist/charts/box.js +72 -0
- package/dist/charts/card-context.d.ts +3 -0
- package/dist/charts/card-context.d.ts.map +1 -0
- package/dist/charts/card-context.js +7 -0
- package/dist/charts/chart-box.module.css +64 -0
- package/{src/content/article-card.module.css.d.ts → dist/charts/chart-box.module.css.d.ts} +5 -9
- package/dist/charts/chart-card.module.css +25 -0
- package/dist/{dashboard/widget-grid.module.css.d.ts → charts/chart-card.module.css.d.ts} +1 -3
- package/dist/charts/chart-legend.module.css +38 -0
- package/{src/dashboard/widget-grid.module.css.d.ts → dist/charts/chart-legend.module.css.d.ts} +3 -3
- package/dist/charts/compile.d.ts +62 -0
- package/dist/charts/compile.d.ts.map +1 -0
- package/dist/charts/compile.js +386 -0
- package/dist/charts/cursor.d.ts +50 -0
- package/dist/charts/cursor.d.ts.map +1 -0
- package/dist/charts/cursor.js +157 -0
- package/dist/charts/curves.d.ts +12 -0
- package/dist/charts/curves.d.ts.map +1 -0
- package/dist/charts/curves.js +86 -0
- package/dist/charts/donut.module.css +54 -0
- package/dist/{content/article-card.module.css.d.ts → charts/donut.module.css.d.ts} +2 -9
- package/dist/charts/host.d.ts +17 -0
- package/dist/charts/host.d.ts.map +1 -0
- package/dist/charts/host.js +35 -0
- package/dist/charts/index.d.ts +18 -53
- package/dist/charts/index.d.ts.map +1 -1
- package/dist/charts/index.js +17 -189
- package/dist/charts/legend.d.ts +23 -0
- package/dist/charts/legend.d.ts.map +1 -0
- package/dist/charts/legend.js +160 -0
- package/dist/charts/marks.d.ts +25 -0
- package/dist/charts/marks.d.ts.map +1 -0
- package/dist/charts/marks.js +128 -0
- package/dist/charts/panel.d.ts +56 -0
- package/dist/charts/panel.d.ts.map +1 -0
- package/dist/charts/panel.js +123 -0
- package/dist/charts/scales.d.ts +44 -0
- package/dist/charts/scales.d.ts.map +1 -0
- package/dist/charts/scales.js +163 -0
- package/dist/charts/sizing.d.ts +12 -0
- package/dist/charts/sizing.d.ts.map +1 -0
- package/dist/charts/sizing.js +33 -0
- package/dist/charts/state.d.ts +17 -0
- package/dist/charts/state.d.ts.map +1 -0
- package/dist/charts/state.js +53 -0
- package/dist/charts/theme.d.ts +38 -19
- package/dist/charts/theme.d.ts.map +1 -1
- package/dist/charts/theme.js +48 -26
- package/dist/charts/types.d.ts +227 -0
- package/dist/charts/types.d.ts.map +1 -0
- package/dist/charts/types.js +4 -0
- package/dist/cli/audit-allows.d.ts +4 -17
- package/dist/cli/audit-allows.d.ts.map +1 -1
- package/dist/cli/config.d.ts +14 -43
- package/dist/cli/config.d.ts.map +1 -1
- package/dist/cli/doctor-upgrade.d.ts +31 -0
- package/dist/cli/doctor-upgrade.d.ts.map +1 -0
- package/dist/cli/doctor-upgrade.js +269 -0
- package/dist/cli/doctor.d.ts +13 -26
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +79 -8
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +2 -4
- package/dist/cli/index.d.ts +68 -135
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +89 -76
- package/dist/cli/init.d.ts.map +1 -1
- package/dist/cli/init.js +43 -27
- package/dist/cli/sync.d.ts +5 -21
- package/dist/cli/sync.d.ts.map +1 -1
- package/dist/cli/sync.js +4 -6
- package/dist/cli/tokens-css.d.ts +7 -28
- package/dist/cli/tokens-css.d.ts.map +1 -1
- package/dist/commands/ShortcutsHelp.d.ts.map +1 -1
- package/dist/commands/ShortcutsHelp.js +4 -5
- package/dist/commands/define-commands.d.ts +15 -31
- package/dist/commands/define-commands.d.ts.map +1 -1
- package/dist/commands/define-commands.js +1 -11
- package/dist/commands/define-overlays.d.ts +5 -19
- package/dist/commands/define-overlays.d.ts.map +1 -1
- package/dist/commands/define-overlays.js +3 -11
- package/dist/commands/index.d.ts +10 -40
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +9 -46
- package/dist/{notifications → commands/notifications}/bell.d.ts +1 -1
- package/dist/commands/notifications/bell.d.ts.map +1 -0
- package/dist/{notifications → commands/notifications}/center.d.ts +2 -2
- package/dist/commands/notifications/center.d.ts.map +1 -0
- package/dist/{notifications → commands/notifications}/center.js +2 -2
- package/dist/{notifications → commands/notifications}/define-notifications.d.ts +3 -3
- package/dist/commands/notifications/define-notifications.d.ts.map +1 -0
- package/dist/commands/notifications/notify.d.ts +44 -0
- package/dist/commands/notifications/notify.d.ts.map +1 -0
- package/dist/commands/notifications/notify.js +79 -0
- package/dist/{notifications → commands/notifications}/store.d.ts +2 -0
- package/dist/commands/notifications/store.d.ts.map +1 -0
- package/dist/{notifications → commands/notifications}/store.js +4 -0
- package/dist/commands/projectors.d.ts +1 -131
- package/dist/commands/projectors.d.ts.map +1 -1
- package/dist/commands/projectors.js +2 -73
- package/dist/commands/shell-bridge.d.ts +3 -3
- package/dist/commands/shortcut-format.d.ts +5 -4
- package/dist/commands/shortcut-format.d.ts.map +1 -1
- package/dist/common/errors.d.ts +3 -3
- package/dist/common/use-measured-widths.d.ts.map +1 -1
- package/dist/common/use-measured-widths.js +5 -3
- package/dist/common/validate.d.ts +2 -2
- package/dist/content/article-layout.d.ts.map +1 -1
- package/dist/content/article-layout.js +3 -3
- package/dist/content/article-model.d.ts +1 -46
- package/dist/content/article-model.d.ts.map +1 -1
- package/dist/content/article-model.js +1 -29
- package/dist/content/copy-action.d.ts +1 -1
- package/dist/content/glyphs.d.ts +1 -1
- package/dist/content/index.d.ts +11 -41
- package/dist/content/index.d.ts.map +1 -1
- package/dist/content/index.js +3 -35
- package/dist/content/markdown.d.ts +1 -1
- package/dist/content/markdown.d.ts.map +1 -1
- package/dist/content/markdown.js +1 -1
- package/dist/content/mermaid.d.ts.map +1 -1
- package/dist/content/mermaid.js +7 -7
- package/dist/content/slug.d.ts +1 -8
- package/dist/content/slug.d.ts.map +1 -1
- package/dist/content/slug.js +1 -8
- package/dist/content/url-hardening.d.ts +2 -2
- package/dist/content/url-hardening.d.ts.map +1 -1
- package/dist/content/url-hardening.js +2 -0
- package/dist/controls/actions.d.ts +16 -1
- package/dist/controls/actions.d.ts.map +1 -1
- package/dist/controls/enum-filter.d.ts +1 -1
- package/dist/controls/enum-filter.d.ts.map +1 -1
- package/dist/controls/filter-context.d.ts.map +1 -1
- package/dist/controls/filter-context.js +3 -1
- package/dist/controls/filter-set.js +4 -6
- package/dist/controls/form-layout.d.ts +1 -1
- package/dist/controls/form-layout.d.ts.map +1 -1
- package/dist/controls/form-layout.js +1 -1
- package/dist/controls/glyphs.d.ts +0 -2
- package/dist/controls/glyphs.d.ts.map +1 -1
- package/dist/controls/glyphs.js +0 -7
- package/dist/controls/index.d.ts +12 -17
- package/dist/controls/index.d.ts.map +1 -1
- package/dist/controls/index.js +5 -39
- package/dist/controls/multi-select-filter.d.ts +4 -3
- package/dist/controls/multi-select-filter.d.ts.map +1 -1
- package/dist/controls/number-filter.d.ts +4 -3
- package/dist/controls/number-filter.d.ts.map +1 -1
- package/dist/controls/number-filter.js +3 -1
- package/dist/controls/range-filter.d.ts +4 -3
- package/dist/controls/range-filter.d.ts.map +1 -1
- package/dist/controls/search-filter.d.ts +4 -3
- package/dist/controls/search-filter.d.ts.map +1 -1
- package/dist/controls/search-filter.js +19 -14
- package/dist/controls/select-filter.d.ts +4 -3
- package/dist/controls/select-filter.d.ts.map +1 -1
- package/dist/controls/sync-button.d.ts.map +1 -1
- package/dist/controls/sync-button.js +12 -15
- package/dist/controls/toggle-filter.d.ts +4 -3
- package/dist/controls/toggle-filter.d.ts.map +1 -1
- package/dist/controls/uncontrolled.d.ts +12 -0
- package/dist/controls/uncontrolled.d.ts.map +1 -0
- package/dist/controls/view-tabs.d.ts +2 -2
- package/dist/controls/view-tabs.d.ts.map +1 -1
- package/dist/controls-dates/index.d.ts +0 -1
- package/dist/controls-dates/index.d.ts.map +1 -1
- package/dist/dashboard/index.d.ts +7 -9
- package/dist/dashboard/index.d.ts.map +1 -1
- package/dist/dashboard/index.js +3 -23
- package/dist/dashboard/section.d.ts +4 -6
- package/dist/dashboard/section.d.ts.map +1 -1
- package/dist/dashboard/section.js +4 -10
- package/dist/dashboard/stat-card.d.ts +4 -4
- package/dist/dashboard/stat-card.d.ts.map +1 -1
- package/dist/dashboard/stat-card.js +3 -3
- package/dist/dashboard/widget-header.module.css +9 -7
- package/dist/dev-dock.d.ts.map +1 -1
- package/dist/dev-dock.js +6 -1
- package/dist/format/date.d.ts +0 -34
- package/dist/format/date.d.ts.map +1 -1
- package/dist/format/date.js +0 -54
- package/dist/format/index.d.ts +7 -22
- package/dist/format/index.d.ts.map +1 -1
- package/dist/format/index.js +2 -43
- package/dist/format/number.d.ts +3 -14
- package/dist/format/number.d.ts.map +1 -1
- package/dist/format/number.js +0 -13
- package/dist/format/shared.d.ts +2 -3
- package/dist/format/shared.d.ts.map +1 -1
- package/dist/forms/index.d.ts +0 -11
- package/dist/forms/index.d.ts.map +1 -1
- package/dist/forms/index.js +1 -14
- package/dist/guard/index.d.ts +6 -21
- package/dist/guard/index.d.ts.map +1 -1
- package/dist/guard/index.js +27 -115
- package/dist/guard/types.d.ts +7 -18
- package/dist/guard/types.d.ts.map +1 -1
- package/dist/index.d.ts +16 -48
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -117
- package/dist/provider/create-router.d.ts +44 -0
- package/dist/provider/create-router.d.ts.map +1 -0
- package/dist/provider/create-router.js +62 -0
- package/dist/provider/hotkeys.d.ts +8 -0
- package/dist/provider/hotkeys.d.ts.map +1 -0
- package/dist/provider/hotkeys.js +50 -0
- package/dist/provider/index.d.ts +33 -110
- package/dist/provider/index.d.ts.map +1 -1
- package/dist/provider/index.js +182 -82
- package/dist/provider/lab-theme.d.ts.map +1 -1
- package/dist/provider/route-transition.d.ts +76 -0
- package/dist/provider/route-transition.d.ts.map +1 -0
- package/dist/provider/route-transition.js +98 -0
- package/dist/provider/spotlight-actions.d.ts +10 -0
- package/dist/provider/spotlight-actions.d.ts.map +1 -0
- package/dist/provider/spotlight-actions.js +55 -0
- package/dist/provider/test-router.d.ts +6 -0
- package/dist/provider/test-router.d.ts.map +1 -0
- package/dist/provider/test-router.js +18 -0
- package/dist/query-client.d.ts +4 -20
- package/dist/query-client.d.ts.map +1 -1
- package/dist/query-client.js +2 -2
- package/dist/router-tanstack/index.d.ts +18 -64
- package/dist/router-tanstack/index.d.ts.map +1 -1
- package/dist/router-tanstack/index.js +2 -16
- package/dist/router-tanstack/nav.d.ts +12 -1
- package/dist/router-tanstack/nav.d.ts.map +1 -1
- package/dist/router-tanstack/nav.js +8 -1
- package/dist/router-tanstack/search-store.d.ts +1 -1
- package/dist/router-tanstack/search-store.d.ts.map +1 -1
- package/dist/router-tanstack/use-nav.d.ts +8 -9
- package/dist/router-tanstack/use-nav.d.ts.map +1 -1
- package/dist/router-tanstack/use-nav.js +20 -1
- package/dist/shell/app-mobile-nav.d.ts.map +1 -1
- package/dist/shell/app-sidebar.js +1 -1
- package/dist/shell/index.d.ts +31 -10
- package/dist/shell/index.d.ts.map +1 -1
- package/dist/shell/index.js +14 -3
- package/dist/shell/page-aside.d.ts +2 -2
- package/dist/shell/page-aside.d.ts.map +1 -1
- package/dist/shell/page-aside.js +31 -12
- package/dist/shell/page-bar.d.ts +2 -2
- package/dist/shell/page-bar.d.ts.map +1 -1
- package/dist/shell/page-bar.js +1 -1
- package/dist/state.d.ts +10 -12
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +4 -6
- package/dist/styles.css +107 -7
- package/dist/surfaces.d.ts +28 -103
- package/dist/surfaces.d.ts.map +1 -1
- package/dist/surfaces.js +54 -143
- package/dist/{data → table}/data-table-state.d.ts +1 -1
- package/dist/table/data-table-state.d.ts.map +1 -0
- package/dist/{data → table}/data-table-state.js +4 -3
- package/dist/{data → table}/data-table.d.ts +28 -49
- package/dist/table/data-table.d.ts.map +1 -0
- package/dist/{data → table}/data-table.js +74 -60
- package/dist/table/index.d.ts +18 -0
- package/dist/table/index.d.ts.map +1 -0
- package/dist/{data/table.js → table/index.js} +1 -1
- package/dist/table/query-branch.d.ts.map +1 -0
- package/dist/table/table-features.d.ts +69 -0
- package/dist/table/table-features.d.ts.map +1 -0
- package/dist/table/table-features.js +49 -0
- package/dist/telemetry.d.ts +77 -0
- package/dist/telemetry.d.ts.map +1 -0
- package/dist/telemetry.js +33 -0
- package/dist/theme/index.d.ts +10 -21
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +3 -14
- package/dist/theme/theme-toggle.d.ts.map +1 -1
- package/dist/theme/theme-toggle.js +7 -33
- package/dist/theme/theme-toggle.module.css +30 -0
- package/dist/theme/theme-toggle.module.css.d.ts +10 -0
- package/dist/theme-lab/derive-controls.d.ts.map +1 -1
- package/dist/theme-lab/derive-controls.js +5 -3
- package/dist/theme-lab/derive-state.d.ts.map +1 -1
- package/dist/theme-lab/derive-state.js +2 -1
- package/dist/tokens/core.d.ts +360 -0
- package/dist/tokens/core.d.ts.map +1 -0
- package/dist/tokens/core.js +708 -0
- package/dist/tokens/derive.d.ts +1 -1
- package/dist/tokens/derive.d.ts.map +1 -1
- package/dist/tokens/index.d.ts +5 -373
- package/dist/tokens/index.d.ts.map +1 -1
- package/dist/tokens/index.js +8 -700
- package/dist/tokens/palette.d.ts +2 -6
- package/dist/tokens/palette.d.ts.map +1 -1
- package/dist/tokens/palette.js +1 -4
- package/dist/vite.d.ts +4 -3
- package/dist/vite.d.ts.map +1 -1
- package/llms.txt +43 -85
- package/package.json +77 -170
- package/src/agent/ai-sdk-transport.ts +57 -37
- package/src/{agent-chat → agent/chat}/composer.tsx +29 -30
- package/src/{agent-chat → agent/chat}/message-affordances.ts +8 -5
- package/src/{agent-chat → agent/chat}/thread-feed-row.tsx +30 -35
- package/src/{agent-chat → agent/chat}/thread-feed.tsx +40 -35
- package/src/{agent-chat → agent/chat}/thread-message.tsx +37 -35
- package/src/{agent-chat → agent/chat}/thread-outcome-card.tsx +5 -5
- package/src/{agent-chat → agent/chat}/tool-chip.tsx +12 -12
- package/src/{agent-chat → agent/chat}/use-keyboard-inset.ts +1 -1
- package/src/{agent-chat → agent/chat}/virtualize.ts +5 -5
- package/src/agent/error.ts +43 -0
- package/src/agent/foreign.ts +3 -2
- package/src/agent/history.ts +2 -107
- package/src/agent/id.ts +4 -5
- package/src/agent/index.ts +23 -112
- package/src/agent/outcome.ts +3 -56
- package/src/agent/part-list.tsx +3 -3
- package/src/agent/parts.ts +23 -22
- package/src/agent/run-committer.ts +64 -0
- package/src/agent/run-records.ts +147 -0
- package/src/agent/thread.ts +24 -231
- package/src/agent/transport.ts +6 -96
- package/src/agent/use-agent-thread-runs.ts +364 -199
- package/src/charts/BandStrip.tsx +276 -0
- package/src/charts/Bars.tsx +141 -0
- package/src/charts/CartesianChart.tsx +206 -0
- package/src/charts/ChartCard.tsx +178 -0
- package/src/charts/Donut.tsx +256 -0
- package/src/charts/DualPanel.tsx +326 -0
- package/src/charts/Heatmap.tsx +282 -0
- package/src/charts/Lines.tsx +151 -0
- package/src/charts/MirroredBars.tsx +303 -0
- package/src/charts/Sparkline.tsx +176 -0
- package/src/charts/StackedArea.tsx +80 -0
- package/src/charts/box.tsx +96 -0
- package/src/charts/card-context.ts +11 -0
- package/src/charts/chart-box.module.css +64 -0
- package/src/charts/chart-box.module.css.d.ts +12 -0
- package/src/charts/chart-card.module.css +25 -0
- package/src/charts/chart-card.module.css.d.ts +8 -0
- package/src/charts/chart-legend.module.css +38 -0
- package/src/charts/chart-legend.module.css.d.ts +10 -0
- package/src/charts/compile.ts +585 -0
- package/src/charts/cursor.ts +282 -0
- package/src/charts/curves.ts +111 -0
- package/src/charts/donut.module.css +54 -0
- package/src/charts/donut.module.css.d.ts +9 -0
- package/src/charts/host.tsx +60 -0
- package/src/charts/index.ts +41 -178
- package/src/charts/legend.tsx +204 -0
- package/src/charts/marks.ts +201 -0
- package/src/charts/panel.tsx +227 -0
- package/src/charts/scales.ts +237 -0
- package/src/charts/sizing.ts +47 -0
- package/src/charts/state.tsx +80 -0
- package/src/charts/theme.ts +65 -0
- package/src/charts/types.ts +242 -0
- package/src/cli/audit-allows.ts +8 -30
- package/src/cli/config.ts +14 -43
- package/src/cli/doctor-upgrade.ts +392 -0
- package/src/cli/doctor.ts +120 -68
- package/src/cli/help.ts +2 -4
- package/src/cli/index.ts +161 -276
- package/src/cli/init.ts +60 -37
- package/src/cli/sync.ts +13 -45
- package/src/cli/tokens-css.ts +7 -28
- package/src/commands/ShortcutsHelp.tsx +8 -9
- package/src/commands/define-commands.ts +16 -43
- package/src/commands/define-overlays.ts +12 -36
- package/src/commands/index.ts +11 -94
- package/src/{notifications → commands/notifications}/bell.tsx +2 -2
- package/src/{notifications → commands/notifications}/center.tsx +7 -5
- package/src/{notifications → commands/notifications}/define-notifications.ts +3 -3
- package/src/commands/notifications/notify.tsx +158 -0
- package/src/{notifications → commands/notifications}/store.ts +10 -2
- package/src/commands/projectors.ts +5 -225
- package/src/commands/shell-bridge.ts +5 -5
- package/src/commands/shortcut-format.ts +5 -4
- package/src/common/errors.ts +3 -3
- package/src/common/use-measured-widths.ts +6 -3
- package/src/common/validate.ts +2 -2
- package/src/content/article-layout.tsx +37 -38
- package/src/content/article-model.ts +1 -84
- package/src/content/copy-action.tsx +1 -1
- package/src/content/glyphs.tsx +1 -1
- package/src/content/index.ts +12 -83
- package/src/content/markdown.tsx +4 -3
- package/src/content/mermaid.tsx +9 -7
- package/src/content/slug.ts +1 -16
- package/src/content/url-hardening.ts +8 -2
- package/src/controls/actions.tsx +24 -1
- package/src/controls/enum-filter.tsx +1 -1
- package/src/controls/filter-context.tsx +3 -1
- package/src/controls/filter-set.tsx +5 -7
- package/src/controls/form-layout.tsx +2 -2
- package/src/controls/glyphs.tsx +0 -10
- package/src/controls/index.ts +13 -64
- package/src/controls/multi-select-filter.tsx +5 -4
- package/src/controls/number-filter.tsx +8 -4
- package/src/controls/range-filter.tsx +5 -4
- package/src/controls/search-filter.tsx +25 -19
- package/src/controls/select-filter.tsx +5 -4
- package/src/controls/sync-button.tsx +18 -20
- package/src/controls/toggle-filter.tsx +5 -4
- package/src/controls/uncontrolled.ts +12 -0
- package/src/controls/view-tabs.tsx +3 -3
- package/src/controls-dates/date-range-picker.tsx +1 -1
- package/src/controls-dates/index.ts +0 -1
- package/src/dashboard/index.ts +7 -48
- package/src/dashboard/section.tsx +11 -40
- package/src/dashboard/stat-card.tsx +14 -16
- package/src/dashboard/widget-header.module.css +9 -7
- package/src/dev-dock.tsx +14 -27
- package/src/format/date.ts +2 -92
- package/src/format/index.ts +7 -53
- package/src/format/number.ts +3 -26
- package/src/format/shared.ts +2 -3
- package/src/forms/index.ts +0 -23
- package/src/guard/index.ts +37 -192
- package/src/guard/types.ts +6 -19
- package/src/index.ts +30 -282
- package/src/provider/create-router.tsx +138 -0
- package/src/provider/hotkeys.ts +70 -0
- package/src/provider/index.tsx +260 -230
- package/src/provider/lab-theme.ts +3 -2
- package/src/provider/route-transition.ts +199 -0
- package/src/provider/spotlight-actions.tsx +69 -0
- package/src/provider/test-router.tsx +25 -0
- package/src/query-client.ts +4 -22
- package/src/router-tanstack/index.ts +18 -112
- package/src/router-tanstack/nav.ts +28 -2
- package/src/router-tanstack/search-store.ts +9 -2
- package/src/router-tanstack/use-nav.ts +47 -13
- package/src/shell/app-mobile-nav.tsx +3 -2
- package/src/shell/app-sidebar.tsx +1 -1
- package/src/shell/aside-docking.ts +1 -1
- package/src/shell/index.tsx +61 -20
- package/src/shell/page-aside.tsx +47 -23
- package/src/shell/page-bar.tsx +3 -3
- package/src/shell/page-title.tsx +1 -1
- package/src/state.ts +11 -37
- package/src/styles.css +107 -7
- package/src/surfaces.ts +56 -151
- package/src/{data → table}/data-table-state.ts +5 -4
- package/src/{data → table}/data-table.tsx +170 -161
- package/src/table/index.ts +18 -0
- package/src/table/table-features.ts +102 -0
- package/src/telemetry.ts +110 -0
- package/src/theme/index.ts +22 -47
- package/src/theme/theme-toggle.module.css +30 -0
- package/src/theme/theme-toggle.module.css.d.ts +10 -0
- package/src/theme/theme-toggle.tsx +15 -43
- package/src/theme-lab/derive-controls.tsx +5 -3
- package/src/theme-lab/derive-state.ts +2 -1
- package/src/tokens/core.ts +1163 -0
- package/src/tokens/derive.ts +1 -1
- package/src/tokens/index.ts +14 -1181
- package/src/tokens/palette.ts +3 -7
- package/src/vite.ts +3 -3
- package/agent/templates/CLAUDE-block.md.tpl +0 -40
- package/agent/templates/query-client.ts.tpl +0 -26
- package/dist/agent/adapter.d.ts +0 -150
- package/dist/agent/adapter.d.ts.map +0 -1
- package/dist/agent/adapter.js +0 -482
- package/dist/agent/use-agent-stream.d.ts +0 -35
- package/dist/agent/use-agent-stream.d.ts.map +0 -1
- package/dist/agent/use-agent-stream.js +0 -59
- package/dist/agent-chat/composer.d.ts.map +0 -1
- package/dist/agent-chat/index.d.ts +0 -31
- package/dist/agent-chat/index.d.ts.map +0 -1
- package/dist/agent-chat/index.js +0 -19
- package/dist/agent-chat/message-affordances.d.ts.map +0 -1
- package/dist/agent-chat/relative-time.d.ts.map +0 -1
- package/dist/agent-chat/thread-detail-panel.d.ts +0 -28
- package/dist/agent-chat/thread-detail-panel.d.ts.map +0 -1
- package/dist/agent-chat/thread-detail-panel.js +0 -115
- package/dist/agent-chat/thread-feed-row.d.ts.map +0 -1
- package/dist/agent-chat/thread-feed.d.ts.map +0 -1
- package/dist/agent-chat/thread-message.d.ts.map +0 -1
- package/dist/agent-chat/thread-outcome-card.d.ts.map +0 -1
- package/dist/agent-chat/thread-workspace.d.ts +0 -44
- package/dist/agent-chat/thread-workspace.d.ts.map +0 -1
- package/dist/agent-chat/thread-workspace.js +0 -153
- package/dist/agent-chat/tool-chip.d.ts.map +0 -1
- package/dist/agent-chat/use-keyboard-inset.d.ts.map +0 -1
- package/dist/agent-chat/virtualize.d.ts.map +0 -1
- package/dist/charts/cursor/resolve.d.ts +0 -75
- package/dist/charts/cursor/resolve.d.ts.map +0 -1
- package/dist/charts/cursor/resolve.js +0 -91
- package/dist/charts/cursor/scope.d.ts +0 -20
- package/dist/charts/cursor/scope.d.ts.map +0 -1
- package/dist/charts/cursor/scope.js +0 -20
- package/dist/charts/cursor/store.d.ts +0 -35
- package/dist/charts/cursor/store.d.ts.map +0 -1
- package/dist/charts/cursor/store.js +0 -25
- package/dist/charts/cursor/touch-pin.d.ts +0 -45
- package/dist/charts/cursor/touch-pin.d.ts.map +0 -1
- package/dist/charts/cursor/touch-pin.js +0 -79
- package/dist/charts/hooks/use-discrete-cursor.d.ts +0 -66
- package/dist/charts/hooks/use-discrete-cursor.d.ts.map +0 -1
- package/dist/charts/hooks/use-discrete-cursor.js +0 -198
- package/dist/charts/hooks/use-hysteresis.d.ts +0 -18
- package/dist/charts/hooks/use-hysteresis.d.ts.map +0 -1
- package/dist/charts/hooks/use-hysteresis.js +0 -12
- package/dist/charts/hooks/useBandPlot.d.ts +0 -145
- package/dist/charts/hooks/useBandPlot.d.ts.map +0 -1
- package/dist/charts/hooks/useBandPlot.js +0 -178
- package/dist/charts/hooks/useChartCursor.d.ts +0 -75
- package/dist/charts/hooks/useChartCursor.d.ts.map +0 -1
- package/dist/charts/hooks/useChartCursor.js +0 -200
- package/dist/charts/hooks/useChartSize.d.ts +0 -29
- package/dist/charts/hooks/useChartSize.d.ts.map +0 -1
- package/dist/charts/hooks/useChartSize.js +0 -8
- package/dist/charts/kinds/BandStrip.d.ts +0 -132
- package/dist/charts/kinds/BandStrip.d.ts.map +0 -1
- package/dist/charts/kinds/BandStrip.js +0 -241
- package/dist/charts/kinds/Bars.d.ts +0 -141
- package/dist/charts/kinds/Bars.d.ts.map +0 -1
- package/dist/charts/kinds/Bars.js +0 -343
- package/dist/charts/kinds/Donut.d.ts +0 -77
- package/dist/charts/kinds/Donut.d.ts.map +0 -1
- package/dist/charts/kinds/Donut.js +0 -245
- package/dist/charts/kinds/DualPanel.d.ts +0 -111
- package/dist/charts/kinds/DualPanel.d.ts.map +0 -1
- package/dist/charts/kinds/DualPanel.js +0 -471
- package/dist/charts/kinds/Heatmap.d.ts +0 -85
- package/dist/charts/kinds/Heatmap.d.ts.map +0 -1
- package/dist/charts/kinds/Heatmap.js +0 -243
- package/dist/charts/kinds/MirroredBars.d.ts +0 -98
- package/dist/charts/kinds/MirroredBars.d.ts.map +0 -1
- package/dist/charts/kinds/MirroredBars.js +0 -292
- package/dist/charts/kinds/MultiLine.d.ts +0 -87
- package/dist/charts/kinds/MultiLine.d.ts.map +0 -1
- package/dist/charts/kinds/MultiLine.js +0 -176
- package/dist/charts/kinds/StackedArea.d.ts +0 -73
- package/dist/charts/kinds/StackedArea.d.ts.map +0 -1
- package/dist/charts/kinds/StackedArea.js +0 -135
- package/dist/charts/kinds/ZonedLine.d.ts +0 -97
- package/dist/charts/kinds/ZonedLine.d.ts.map +0 -1
- package/dist/charts/kinds/ZonedLine.js +0 -155
- package/dist/charts/kinds/band-chrome.d.ts +0 -31
- package/dist/charts/kinds/band-chrome.d.ts.map +0 -1
- package/dist/charts/kinds/band-chrome.js +0 -71
- package/dist/charts/kinds/donut-layout.d.ts +0 -47
- package/dist/charts/kinds/donut-layout.d.ts.map +0 -1
- package/dist/charts/kinds/donut-layout.js +0 -52
- package/dist/charts/layout/auto-margin.d.ts +0 -122
- package/dist/charts/layout/auto-margin.d.ts.map +0 -1
- package/dist/charts/layout/auto-margin.js +0 -81
- package/dist/charts/layout/end-labels.d.ts +0 -64
- package/dist/charts/layout/end-labels.d.ts.map +0 -1
- package/dist/charts/layout/end-labels.js +0 -76
- package/dist/charts/layout/log-ticks.d.ts +0 -27
- package/dist/charts/layout/log-ticks.d.ts.map +0 -1
- package/dist/charts/layout/log-ticks.js +0 -42
- package/dist/charts/primitives/AreaGradient.d.ts +0 -18
- package/dist/charts/primitives/AreaGradient.d.ts.map +0 -1
- package/dist/charts/primitives/AreaGradient.js +0 -13
- package/dist/charts/primitives/Axes.d.ts +0 -83
- package/dist/charts/primitives/Axes.d.ts.map +0 -1
- package/dist/charts/primitives/Axes.js +0 -168
- package/dist/charts/primitives/CartesianChart.d.ts +0 -257
- package/dist/charts/primitives/CartesianChart.d.ts.map +0 -1
- package/dist/charts/primitives/CartesianChart.js +0 -549
- package/dist/charts/primitives/ChartCard.d.ts +0 -66
- package/dist/charts/primitives/ChartCard.d.ts.map +0 -1
- package/dist/charts/primitives/ChartCard.js +0 -143
- package/dist/charts/primitives/ChartFrame.d.ts +0 -156
- package/dist/charts/primitives/ChartFrame.d.ts.map +0 -1
- package/dist/charts/primitives/ChartFrame.js +0 -241
- package/dist/charts/primitives/ChartLegend.d.ts +0 -67
- package/dist/charts/primitives/ChartLegend.d.ts.map +0 -1
- package/dist/charts/primitives/ChartLegend.js +0 -292
- package/dist/charts/primitives/ChartPending.d.ts +0 -113
- package/dist/charts/primitives/ChartPending.d.ts.map +0 -1
- package/dist/charts/primitives/ChartPending.js +0 -117
- package/dist/charts/primitives/ChartTooltip.d.ts +0 -59
- package/dist/charts/primitives/ChartTooltip.d.ts.map +0 -1
- package/dist/charts/primitives/ChartTooltip.js +0 -197
- package/dist/charts/primitives/Crosshair.d.ts +0 -26
- package/dist/charts/primitives/Crosshair.d.ts.map +0 -1
- package/dist/charts/primitives/Crosshair.js +0 -23
- package/dist/charts/primitives/HatchPattern.d.ts +0 -31
- package/dist/charts/primitives/HatchPattern.d.ts.map +0 -1
- package/dist/charts/primitives/HatchPattern.js +0 -31
- package/dist/charts/primitives/HoverOverlay.d.ts +0 -45
- package/dist/charts/primitives/HoverOverlay.d.ts.map +0 -1
- package/dist/charts/primitives/HoverOverlay.js +0 -72
- package/dist/charts/primitives/HoverOverlay.module.css +0 -13
- package/dist/charts/primitives/HoverOverlay.module.css.d.ts +0 -8
- package/dist/charts/primitives/XZoneRects.d.ts +0 -54
- package/dist/charts/primitives/XZoneRects.d.ts.map +0 -1
- package/dist/charts/primitives/XZoneRects.js +0 -65
- package/dist/charts/primitives/ZoneRects.d.ts +0 -38
- package/dist/charts/primitives/ZoneRects.d.ts.map +0 -1
- package/dist/charts/primitives/ZoneRects.js +0 -30
- package/dist/charts/primitives/chart-card-context.d.ts +0 -33
- package/dist/charts/primitives/chart-card-context.d.ts.map +0 -1
- package/dist/charts/primitives/chart-card-context.js +0 -18
- package/dist/charts/primitives/chart-frame-layout.d.ts +0 -185
- package/dist/charts/primitives/chart-frame-layout.d.ts.map +0 -1
- package/dist/charts/primitives/chart-frame-layout.js +0 -175
- package/dist/charts/primitives/chart-layout.d.ts +0 -112
- package/dist/charts/primitives/chart-layout.d.ts.map +0 -1
- package/dist/charts/primitives/chart-layout.js +0 -175
- package/dist/charts/primitives/chart-tier.d.ts +0 -16
- package/dist/charts/primitives/chart-tier.d.ts.map +0 -1
- package/dist/charts/primitives/chart-tier.js +0 -44
- package/dist/charts/primitives/legend-disclosure.d.ts +0 -27
- package/dist/charts/primitives/legend-disclosure.d.ts.map +0 -1
- package/dist/charts/primitives/legend-disclosure.js +0 -153
- package/dist/charts/series.d.ts +0 -189
- package/dist/charts/series.d.ts.map +0 -1
- package/dist/charts/series.js +0 -84
- package/dist/charts/sparklines/BarSparkline.d.ts +0 -37
- package/dist/charts/sparklines/BarSparkline.d.ts.map +0 -1
- package/dist/charts/sparklines/BarSparkline.js +0 -53
- package/dist/charts/sparklines/LineSparkline.d.ts +0 -15
- package/dist/charts/sparklines/LineSparkline.d.ts.map +0 -1
- package/dist/charts/sparklines/LineSparkline.js +0 -51
- package/dist/charts/sparklines/index.d.ts +0 -3
- package/dist/charts/sparklines/index.d.ts.map +0 -1
- package/dist/charts/sparklines/index.js +0 -6
- package/dist/charts/utils/domain.d.ts +0 -35
- package/dist/charts/utils/domain.d.ts.map +0 -1
- package/dist/charts/utils/domain.js +0 -12
- package/dist/charts/utils/format.d.ts +0 -8
- package/dist/charts/utils/format.d.ts.map +0 -1
- package/dist/charts/utils/format.js +0 -20
- package/dist/charts/utils/measure-text.d.ts +0 -25
- package/dist/charts/utils/measure-text.d.ts.map +0 -1
- package/dist/charts/utils/measure-text.js +0 -64
- package/dist/charts/utils/ticks.d.ts +0 -103
- package/dist/charts/utils/ticks.d.ts.map +0 -1
- package/dist/charts/utils/ticks.js +0 -92
- package/dist/commands/overlays-mount.d.ts +0 -122
- package/dist/commands/overlays-mount.d.ts.map +0 -1
- package/dist/commands/overlays-mount.js +0 -125
- package/dist/commands/useCommandHotkeys.d.ts +0 -14
- package/dist/commands/useCommandHotkeys.d.ts.map +0 -1
- package/dist/commands/useCommandHotkeys.js +0 -45
- package/dist/content/article-actions.d.ts +0 -39
- package/dist/content/article-actions.d.ts.map +0 -1
- package/dist/content/article-actions.js +0 -28
- package/dist/content/article-card.d.ts +0 -58
- package/dist/content/article-card.d.ts.map +0 -1
- package/dist/content/article-card.js +0 -79
- package/dist/content/article-card.module.css +0 -111
- package/dist/content/mdx.d.ts +0 -20
- package/dist/content/mdx.d.ts.map +0 -1
- package/dist/content/mdx.js +0 -64
- package/dist/controls/compare-filter.d.ts +0 -42
- package/dist/controls/compare-filter.d.ts.map +0 -1
- package/dist/controls/compare-filter.js +0 -38
- package/dist/controls/slider-control.d.ts +0 -36
- package/dist/controls/slider-control.d.ts.map +0 -1
- package/dist/controls/slider-control.js +0 -64
- package/dist/dashboard/widget-grid.d.ts +0 -27
- package/dist/dashboard/widget-grid.d.ts.map +0 -1
- package/dist/dashboard/widget-grid.js +0 -40
- package/dist/dashboard/widget-grid.module.css +0 -69
- package/dist/data/data-table-state.d.ts.map +0 -1
- package/dist/data/data-table.d.ts.map +0 -1
- package/dist/data/query-branch.d.ts.map +0 -1
- package/dist/data/table.d.ts +0 -24
- package/dist/data/table.d.ts.map +0 -1
- package/dist/data/virtual-list.d.ts +0 -133
- package/dist/data/virtual-list.d.ts.map +0 -1
- package/dist/data/virtual-list.js +0 -157
- package/dist/data/virtual.d.ts +0 -21
- package/dist/data/virtual.d.ts.map +0 -1
- package/dist/data/virtual.js +0 -4
- package/dist/forms/FormErrorSummary.d.ts +0 -30
- package/dist/forms/FormErrorSummary.d.ts.map +0 -1
- package/dist/forms/FormErrorSummary.js +0 -30
- package/dist/forms/use-field-array.d.ts +0 -60
- package/dist/forms/use-field-array.d.ts.map +0 -1
- package/dist/forms/use-field-array.js +0 -20
- package/dist/forms/use-form-draft.d.ts +0 -76
- package/dist/forms/use-form-draft.d.ts.map +0 -1
- package/dist/forms/use-form-draft.js +0 -92
- package/dist/forms/use-form-submit.d.ts +0 -88
- package/dist/forms/use-form-submit.d.ts.map +0 -1
- package/dist/forms/use-form-submit.js +0 -63
- package/dist/notifications/bell.d.ts.map +0 -1
- package/dist/notifications/center.d.ts.map +0 -1
- package/dist/notifications/define-notifications.d.ts.map +0 -1
- package/dist/notifications/index.d.ts +0 -40
- package/dist/notifications/index.d.ts.map +0 -1
- package/dist/notifications/index.js +0 -54
- package/dist/notifications/mount-guard.d.ts +0 -8
- package/dist/notifications/mount-guard.d.ts.map +0 -1
- package/dist/notifications/mount-guard.js +0 -18
- package/dist/notifications/notify.d.ts +0 -149
- package/dist/notifications/notify.d.ts.map +0 -1
- package/dist/notifications/notify.js +0 -171
- package/dist/notifications/store.d.ts.map +0 -1
- package/dist/provider/connectivity-indicator.d.ts +0 -13
- package/dist/provider/connectivity-indicator.d.ts.map +0 -1
- package/dist/provider/connectivity-indicator.js +0 -205
- package/dist/provider/connectivity-provider.d.ts +0 -7
- package/dist/provider/connectivity-provider.d.ts.map +0 -1
- package/dist/provider/connectivity-provider.js +0 -128
- package/dist/provider/connectivity-types.d.ts +0 -36
- package/dist/provider/connectivity-types.d.ts.map +0 -1
- package/dist/provider/use-connectivity.d.ts +0 -3
- package/dist/provider/use-connectivity.d.ts.map +0 -1
- package/dist/provider/use-connectivity.js +0 -14
- package/dist/query-devtools.d.ts +0 -21
- package/dist/query-devtools.d.ts.map +0 -1
- package/dist/query-devtools.js +0 -13
- package/src/agent/adapter.ts +0 -945
- package/src/agent/use-agent-stream.ts +0 -154
- package/src/agent-chat/index.ts +0 -54
- package/src/agent-chat/thread-detail-panel.tsx +0 -201
- package/src/agent-chat/thread-workspace.tsx +0 -279
- package/src/charts/cursor/resolve.ts +0 -198
- package/src/charts/cursor/scope.tsx +0 -35
- package/src/charts/cursor/store.ts +0 -58
- package/src/charts/cursor/touch-pin.ts +0 -138
- package/src/charts/hooks/use-discrete-cursor.ts +0 -335
- package/src/charts/hooks/use-hysteresis.ts +0 -26
- package/src/charts/hooks/useBandPlot.ts +0 -383
- package/src/charts/hooks/useChartCursor.ts +0 -367
- package/src/charts/hooks/useChartSize.ts +0 -35
- package/src/charts/kinds/BandStrip.tsx +0 -449
- package/src/charts/kinds/Bars.tsx +0 -589
- package/src/charts/kinds/Donut.tsx +0 -368
- package/src/charts/kinds/DualPanel.tsx +0 -712
- package/src/charts/kinds/Heatmap.tsx +0 -396
- package/src/charts/kinds/MirroredBars.tsx +0 -469
- package/src/charts/kinds/MultiLine.tsx +0 -322
- package/src/charts/kinds/StackedArea.tsx +0 -267
- package/src/charts/kinds/ZonedLine.tsx +0 -301
- package/src/charts/kinds/band-chrome.tsx +0 -91
- package/src/charts/kinds/donut-layout.ts +0 -82
- package/src/charts/layout/auto-margin.ts +0 -242
- package/src/charts/layout/end-labels.ts +0 -135
- package/src/charts/layout/log-ticks.ts +0 -90
- package/src/charts/primitives/AreaGradient.tsx +0 -26
- package/src/charts/primitives/Axes.tsx +0 -271
- package/src/charts/primitives/CartesianChart.tsx +0 -1002
- package/src/charts/primitives/ChartCard.tsx +0 -280
- package/src/charts/primitives/ChartFrame.tsx +0 -493
- package/src/charts/primitives/ChartLegend.tsx +0 -422
- package/src/charts/primitives/ChartPending.tsx +0 -243
- package/src/charts/primitives/ChartTooltip.tsx +0 -265
- package/src/charts/primitives/Crosshair.tsx +0 -43
- package/src/charts/primitives/HatchPattern.tsx +0 -55
- package/src/charts/primitives/HoverOverlay.module.css +0 -13
- package/src/charts/primitives/HoverOverlay.module.css.d.ts +0 -8
- package/src/charts/primitives/HoverOverlay.tsx +0 -109
- package/src/charts/primitives/XZoneRects.tsx +0 -132
- package/src/charts/primitives/ZoneRects.tsx +0 -67
- package/src/charts/primitives/chart-card-context.ts +0 -46
- package/src/charts/primitives/chart-frame-layout.ts +0 -430
- package/src/charts/primitives/chart-layout.ts +0 -318
- package/src/charts/primitives/chart-tier.tsx +0 -76
- package/src/charts/primitives/legend-disclosure.tsx +0 -178
- package/src/charts/series.ts +0 -276
- package/src/charts/sparklines/BarSparkline.tsx +0 -94
- package/src/charts/sparklines/LineSparkline.tsx +0 -71
- package/src/charts/sparklines/index.ts +0 -2
- package/src/charts/theme.tsx +0 -53
- package/src/charts/utils/domain.ts +0 -41
- package/src/charts/utils/format.ts +0 -19
- package/src/charts/utils/measure-text.ts +0 -109
- package/src/charts/utils/ticks.ts +0 -239
- package/src/commands/overlays-mount.tsx +0 -333
- package/src/commands/useCommandHotkeys.ts +0 -114
- package/src/content/article-actions.ts +0 -72
- package/src/content/article-card.module.css +0 -111
- package/src/content/article-card.tsx +0 -174
- package/src/content/mdx.tsx +0 -127
- package/src/controls/compare-filter.tsx +0 -81
- package/src/controls/slider-control.tsx +0 -159
- package/src/dashboard/widget-grid.module.css +0 -69
- package/src/dashboard/widget-grid.tsx +0 -146
- package/src/data/table.ts +0 -39
- package/src/data/virtual-list.tsx +0 -356
- package/src/data/virtual.ts +0 -26
- package/src/forms/FormErrorSummary.tsx +0 -71
- package/src/forms/use-field-array.ts +0 -94
- package/src/forms/use-form-draft.ts +0 -262
- package/src/forms/use-form-submit.ts +0 -199
- package/src/notifications/index.ts +0 -88
- package/src/notifications/mount-guard.ts +0 -38
- package/src/notifications/notify.tsx +0 -379
- package/src/provider/connectivity-indicator.tsx +0 -267
- package/src/provider/connectivity-provider.tsx +0 -189
- package/src/provider/connectivity-types.ts +0 -42
- package/src/provider/use-connectivity.ts +0 -26
- package/src/query-devtools.tsx +0 -40
- /package/dist/{agent-chat → agent/chat}/message-affordances.js +0 -0
- /package/dist/{agent-chat → agent/chat}/relative-time.d.ts +0 -0
- /package/dist/{agent-chat → agent/chat}/relative-time.js +0 -0
- /package/dist/{agent-chat → agent/chat}/use-keyboard-inset.d.ts +0 -0
- /package/dist/{agent-chat → agent/chat}/virtualize.js +0 -0
- /package/dist/{notifications → commands/notifications}/bell.js +0 -0
- /package/dist/{notifications → commands/notifications}/define-notifications.js +0 -0
- /package/dist/{provider/connectivity-types.js → controls/uncontrolled.js} +0 -0
- /package/dist/{data → table}/data-table.module.css +0 -0
- /package/dist/{data → table}/data-table.module.css.d.ts +0 -0
- /package/dist/{data → table}/query-branch.d.ts +0 -0
- /package/dist/{data → table}/query-branch.js +0 -0
- /package/src/{agent-chat → agent/chat}/relative-time.ts +0 -0
- /package/src/{data → table}/data-table.module.css +0 -0
- /package/src/{data → table}/data-table.module.css.d.ts +0 -0
- /package/src/{data → table}/query-branch.ts +0 -0
|
@@ -0,0 +1,708 @@
|
|
|
1
|
+
import {
|
|
2
|
+
buildPaletteData,
|
|
3
|
+
RADIUS,
|
|
4
|
+
RADIUS_STEP,
|
|
5
|
+
ROW_LINE_HEIGHT,
|
|
6
|
+
SHADOW,
|
|
7
|
+
SPACE,
|
|
8
|
+
SPACE_SCALE,
|
|
9
|
+
SPACE_STEP
|
|
10
|
+
} from "./palette.js";
|
|
11
|
+
import { SIZE_CLASSES, sizeClassMaxEm } from "./size-classes.js";
|
|
12
|
+
import { HIT_COARSE, HIT_FINE } from "../common/hit-floor.js";
|
|
13
|
+
import { BASALT_VX_FAMILIES } from "../common/vx-families.js";
|
|
14
|
+
import { vxFamilyOf } from "../common/vx-family.js";
|
|
15
|
+
import { BP, p } from "./palette.js";
|
|
16
|
+
import { DEFAULT_DERIVE_CONFIG, deriveTokens, resolveDeriveConfig } from "./derive.js";
|
|
17
|
+
import { deriveRadius } from "./palette.js";
|
|
18
|
+
import { deriveSpacing } from "./palette.js";
|
|
19
|
+
import {
|
|
20
|
+
CONTAINER_CLASSES,
|
|
21
|
+
CONTAINER_GRID_BREAKPOINTS,
|
|
22
|
+
CONTAINER_KEYS,
|
|
23
|
+
resolveContainerClass,
|
|
24
|
+
SIZE_CLASSES as SIZE_CLASSES2
|
|
25
|
+
} from "./size-classes.js";
|
|
26
|
+
const alpha = (token, a) => `color-mix(in srgb, ${token} ${Math.round(a * 100)}%, transparent)`;
|
|
27
|
+
const TEXT = {
|
|
28
|
+
nano: 10,
|
|
29
|
+
// engraved/graphic label INSIDE a drawn object (a plate face, a dial, a chip) — never UI copy or prose
|
|
30
|
+
micro: 11,
|
|
31
|
+
// mono uppercase micro-label (table th, Menu.Label, sidebar/section headers, axis ticks)
|
|
32
|
+
xs: 12.5,
|
|
33
|
+
// delta badges, tooltip meta, dense chrome, StatCard labels
|
|
34
|
+
sm: 13.5,
|
|
35
|
+
// table/stat numerals, chart tooltip, legend
|
|
36
|
+
md: 15,
|
|
37
|
+
// BODY — nav rows, menu items, timeline, labels, prose; chart/card titles
|
|
38
|
+
lg: 16,
|
|
39
|
+
// breadcrumb current — ALSO the iOS input floor (do not lower)
|
|
40
|
+
xl: 18,
|
|
41
|
+
// section titles
|
|
42
|
+
h2: 21,
|
|
43
|
+
// article-density Prose h2 (docs/CONTENT-SPEC.md §5)
|
|
44
|
+
kpi: 24,
|
|
45
|
+
// the StatCard hero numeral (density pass: 31 → 24, tighter/less shouty)
|
|
46
|
+
h1: 26,
|
|
47
|
+
// article-density Prose h1 (docs/CONTENT-SPEC.md §5)
|
|
48
|
+
display: 30
|
|
49
|
+
// a numeral read at arm's length (a keypad readout, a timer, a kiosk figure) — not a heading
|
|
50
|
+
};
|
|
51
|
+
const VX = {
|
|
52
|
+
// Non-color sizing constants
|
|
53
|
+
// Stroke WEIGHTS, not spacing — deliberately fixed, never density-tracking (see
|
|
54
|
+
// `SPACE_STEP_BASE`'s "charts" group doc in tokens/palette.ts).
|
|
55
|
+
lineWidth: 2.5,
|
|
56
|
+
line2Width: 2,
|
|
57
|
+
axisFont: TEXT.micro,
|
|
58
|
+
// A discrete visual footprint (not a stroke weight), so — unlike `lineWidth`/`line2Width` above —
|
|
59
|
+
// it DOES track density; single-sourced from `SPACE_STEP.chartDotR` (see that constant's doc).
|
|
60
|
+
dotR: SPACE_STEP.chartDotR,
|
|
61
|
+
// The ONE dashed pattern — plotted stroke, legend swatch, tooltip swatch all read this.
|
|
62
|
+
dashArray: "6 4",
|
|
63
|
+
// Legend layout — single-sourced from `SPACE_STEP.chartLegendGap` (density-tracking; see that
|
|
64
|
+
// constant's doc). Still a raw number here (not `var()`) — the chart legend applies it via inline
|
|
65
|
+
// `style`, and this is the one static (level-0) value; `createBasaltTheme({ density })` has no
|
|
66
|
+
// wiring into chart render props yet, so this number does NOT move live with the knob (same
|
|
67
|
+
// "dev slider/production JS defaultProps" gap as Timeline's `bulletSize` — see `deriveSpacing`'s
|
|
68
|
+
// doc in tokens/palette.ts).
|
|
69
|
+
legendGap: SPACE_STEP.chartLegendGap,
|
|
70
|
+
legendFontSize: TEXT.sm,
|
|
71
|
+
// The type scale (px numbers — see TEXT above). Use in inline styles and visx SVG props;
|
|
72
|
+
// use `var(--vx-text-*)` in CSS modules.
|
|
73
|
+
text: TEXT,
|
|
74
|
+
// Single source for the card corner radius — shared by the Mantine-free ChartCard and the
|
|
75
|
+
// Mantine chrome (Card/Paper resolve to this SAME token). One knob, so cards never diverge.
|
|
76
|
+
radiusCard: "var(--vx-radius-card)",
|
|
77
|
+
// Single source for the control corner radius (inputs, search, buttons, segmented track).
|
|
78
|
+
radiusCtrl: "var(--vx-radius-ctrl)",
|
|
79
|
+
// Fully-rounded pill affordance (scroll-to-bottom button, chips) — fixed, does not track the
|
|
80
|
+
// radius knob (see `RADIUS_STEP.pill`'s doc in `tokens/palette.ts`).
|
|
81
|
+
radiusPill: "var(--vx-radius-pill)",
|
|
82
|
+
// The pointer-tier hit floor: 44px under `(pointer: coarse)` (WCAG 2.5.5), 24px otherwise
|
|
83
|
+
// (2.5.8). Density-exempt; `[data-basalt-hit]::after` in `styles.css` reads it.
|
|
84
|
+
hit: "var(--vx-hit)",
|
|
85
|
+
// Controls tier sizing (`docs/CONTROLS-SPEC.md` §5) — `var()` refs onto the density-tracking
|
|
86
|
+
// `--vx-space-*` declarations `spaceDecls` emits above (same ref pattern as `radiusCard`/
|
|
87
|
+
// `radiusCtrl`), so a home/control reads ONE source for its tier height whether it's Mantine
|
|
88
|
+
// chrome (`cssVariablesResolver`/`CTL_THEME`) or a Mantine-free composed layout.
|
|
89
|
+
space: {
|
|
90
|
+
controlHeightTag: "var(--vx-space-control-height-tag)",
|
|
91
|
+
controlHeightWidget: "var(--vx-space-control-height-widget)",
|
|
92
|
+
controlHeightCtl: "var(--vx-space-control-height-ctl)",
|
|
93
|
+
pageBarRowHeight: "var(--vx-space-page-bar-row-height)",
|
|
94
|
+
sectionHeaderHeight: "var(--vx-space-section-header-height)",
|
|
95
|
+
widgetHeaderHeight: "var(--vx-space-widget-header-height)",
|
|
96
|
+
sidebarBlockRowHeight: "var(--vx-space-sidebar-block-row-height)",
|
|
97
|
+
controlGap: "var(--vx-space-control-gap)",
|
|
98
|
+
sheetRowHeight: "var(--vx-space-sheet-row-height)"
|
|
99
|
+
},
|
|
100
|
+
// Secondary-line color (back-compat alias; now theme-aware via --vx-line2)
|
|
101
|
+
line2Dark: "var(--vx-line2)",
|
|
102
|
+
// Semantic fills — consistent opacity across all charts
|
|
103
|
+
good: "var(--vx-good)",
|
|
104
|
+
goodSoft: "var(--vx-good-soft)",
|
|
105
|
+
bad: "var(--vx-bad)",
|
|
106
|
+
warn: "var(--vx-warn)",
|
|
107
|
+
goodSolid: "var(--vx-good-solid)",
|
|
108
|
+
badSolid: "var(--vx-bad-solid)",
|
|
109
|
+
warnSolid: "var(--vx-warn-solid)",
|
|
110
|
+
// Reference/dashed lines for thresholds
|
|
111
|
+
goodRef: "var(--vx-good-ref)",
|
|
112
|
+
badRef: "var(--vx-bad-ref)",
|
|
113
|
+
warnRef: "var(--vx-warn-ref)",
|
|
114
|
+
// Neutral primary line/text color — the default for single-series, no-signal marks
|
|
115
|
+
// ("white/gray per theme"). Same value as the NEUTRAL.line pair.
|
|
116
|
+
line: "var(--vx-line)",
|
|
117
|
+
line2: "var(--vx-line2)",
|
|
118
|
+
// Axis label + axis stroke colors (theme-aware). Exposed as flat refs so a bespoke chart that
|
|
119
|
+
// renders raw <text> labels or axis lines (without the Axis* primitives) needs no hook.
|
|
120
|
+
axis: "var(--vx-axis)",
|
|
121
|
+
axisStroke: "var(--vx-axis-stroke)",
|
|
122
|
+
// Grid, hover, legend
|
|
123
|
+
grid: "var(--vx-grid)",
|
|
124
|
+
crosshair: "var(--vx-crosshair)",
|
|
125
|
+
dotStroke: "var(--vx-dot-stroke)",
|
|
126
|
+
legendText: "var(--vx-legend-text)",
|
|
127
|
+
// Tooltip chrome — muted (secondary) text inside a bespoke tooltip. The other tooltip vars
|
|
128
|
+
// (bg/text/border/shadow) reach the engine tooltip as `--ts-chart-tooltip-*` (`charts/theme.ts`);
|
|
129
|
+
// this one is flattened onto `VX` too because bespoke-tooltip authors reached for `VX.muted` (the
|
|
130
|
+
// general ink-ramp muted) instead and got the wrong token — same pattern as `VX.muted` below.
|
|
131
|
+
tooltipMuted: "var(--vx-tooltip-muted)",
|
|
132
|
+
// Base neutral for hairlines / muted text / overlays — apply opacity via alpha()
|
|
133
|
+
neutral: "var(--vx-neutral)",
|
|
134
|
+
// Ink text ramp (docs/DESIGN-SPEC.md §2) — primary/emphasis/secondary/tertiary body text.
|
|
135
|
+
ink: "var(--vx-ink)",
|
|
136
|
+
ink2: "var(--vx-ink2)",
|
|
137
|
+
muted: "var(--vx-muted)",
|
|
138
|
+
faint: "var(--vx-faint)",
|
|
139
|
+
// The accent as INK — primary series, active-nav icon, links, focus rings. Read against the PAGE,
|
|
140
|
+
// so it inverts across schemes (light on dark, deep on light).
|
|
141
|
+
accent: "var(--vx-accent)",
|
|
142
|
+
accentHover: "var(--vx-accent-hover)",
|
|
143
|
+
// The accent as SURFACE — a filled control that carries a label. Squeezed between white-text
|
|
144
|
+
// contrast and page contrast, so it is the same hex in both schemes (see ACCENT in palette.ts).
|
|
145
|
+
// Mantine's `--mantine-color-<primary>-filled` is bridged onto this, so it drives ALL filled
|
|
146
|
+
// chrome; a raw `--vx-accent` fill would be unreadable on dark. Fills use THIS, never `accent`.
|
|
147
|
+
accentFill: "var(--vx-accent-fill)",
|
|
148
|
+
accentFillHover: "var(--vx-accent-fill-hover)",
|
|
149
|
+
onAccent: "var(--vx-on-accent)",
|
|
150
|
+
// Layout separators (header bottom rule, sidebar child indent) — distinct from `surface.border`.
|
|
151
|
+
divider: "var(--vx-divider)",
|
|
152
|
+
// Depth shadows — a whisper shadow + a 1px ring baked into the value (never a `border` prop).
|
|
153
|
+
shadowCard: "var(--vx-shadow-card)",
|
|
154
|
+
shadowCtrl: "var(--vx-shadow-ctrl)",
|
|
155
|
+
// Raised interactive controls — drop + a 1px INSET edge, the one depth every raised Button/
|
|
156
|
+
// ActionIcon variant shares (works over a fill, a tint or a panel alike; see SHADOW.raised).
|
|
157
|
+
shadowRaised: "var(--vx-shadow-raised)",
|
|
158
|
+
// Floating-layer elevation (menus, popovers, tooltips, modals, drawers) — a real drop shadow.
|
|
159
|
+
shadowOverlay: "var(--vx-shadow-overlay)",
|
|
160
|
+
// App surfaces (cards, borders) — shared with the Mantine chrome
|
|
161
|
+
surface: {
|
|
162
|
+
bg: "var(--vx-surface-bg)",
|
|
163
|
+
panel: "var(--vx-surface-panel)",
|
|
164
|
+
panelHover: "var(--vx-surface-panel-hover)",
|
|
165
|
+
elevated: "var(--vx-surface-elevated)",
|
|
166
|
+
subtle: "var(--vx-surface-subtle)",
|
|
167
|
+
overlay: "var(--vx-surface-overlay)",
|
|
168
|
+
// floating layer (menus, popovers, modals, drawers)
|
|
169
|
+
field: "var(--vx-surface-field)",
|
|
170
|
+
// input field surface (slightly inset on a panel)
|
|
171
|
+
border: "var(--vx-surface-border)",
|
|
172
|
+
// "line" — strong border
|
|
173
|
+
hairline: "var(--vx-surface-hairline)"
|
|
174
|
+
// card ring only
|
|
175
|
+
},
|
|
176
|
+
// Score / zone status scale (excellent → poor)
|
|
177
|
+
status: {
|
|
178
|
+
excellent: "var(--vx-status-excellent)",
|
|
179
|
+
good: "var(--vx-status-good)",
|
|
180
|
+
warn: "var(--vx-status-warn)",
|
|
181
|
+
bad: "var(--vx-status-bad)",
|
|
182
|
+
neutral: "var(--vx-status-neutral)"
|
|
183
|
+
},
|
|
184
|
+
// Shared sizing — single-sourced from the `SPACE_STEP` chart-margin steps (density-tracking; same
|
|
185
|
+
// static-value/no-live-wiring note as `legendGap` above).
|
|
186
|
+
margin: {
|
|
187
|
+
top: SPACE_STEP.chartMarginTop,
|
|
188
|
+
right: SPACE_STEP.chartMarginRight,
|
|
189
|
+
bottom: SPACE_STEP.chartMarginBottom,
|
|
190
|
+
left: SPACE_STEP.chartMarginLeft
|
|
191
|
+
},
|
|
192
|
+
minPxPerTick: 55,
|
|
193
|
+
/**
|
|
194
|
+
* Floor on a chart's plot rect height, in px (the 1.x chart frame). A legend wrapping to five rows at
|
|
195
|
+
* phone width used to eat a fixed `height={240}` toward zero and the plot simply stopped
|
|
196
|
+
* rendering — the plot never shrinks past this, the frame grows instead (or, under `fill`, the
|
|
197
|
+
* legend rolls up).
|
|
198
|
+
*/
|
|
199
|
+
minPlotHeight: 120,
|
|
200
|
+
/** Every floating chart overlay portalled to `document.body` — a pinned tooltip, the legend's
|
|
201
|
+
* `All N` disclosure and its backdrop — shares one stacking value, so they always stack the same
|
|
202
|
+
* way relative to page chrome and to each other. */
|
|
203
|
+
zIndexFloating: 9999
|
|
204
|
+
};
|
|
205
|
+
const BREAKPOINTS = {
|
|
206
|
+
/**
|
|
207
|
+
* `content/article-layout.module.css` — below this the TOC rail is dropped and the article
|
|
208
|
+
* collapses to a single centred column. Well above the `sm` (52.5em/840px) shell breakpoint on
|
|
209
|
+
* purpose: the rail needs the prose measure PLUS its own width plus the column gap, which runs
|
|
210
|
+
* out long before the shell goes mobile.
|
|
211
|
+
*/
|
|
212
|
+
article: 1200
|
|
213
|
+
};
|
|
214
|
+
const decl = (name, value) => ` --vx-${name}: ${value};`;
|
|
215
|
+
function pxRem(px) {
|
|
216
|
+
return `${px / 16}rem`;
|
|
217
|
+
}
|
|
218
|
+
const groupSide = (prefix, map, side) => Object.entries(map).map(([key, pair]) => decl(`${prefix}${key}`, pair[side])).join("\n");
|
|
219
|
+
function frameworkPrimitivesAliases() {
|
|
220
|
+
return [
|
|
221
|
+
" /* Deprecated camelCase aliases \u2014 removed in a future minor; migrate to the kebab names above. */",
|
|
222
|
+
decl("goodSolid", "var(--vx-good-solid)"),
|
|
223
|
+
decl("badSolid", "var(--vx-bad-solid)"),
|
|
224
|
+
decl("warnSolid", "var(--vx-warn-solid)"),
|
|
225
|
+
decl("axisStroke", "var(--vx-axis-stroke)"),
|
|
226
|
+
decl("dotStroke", "var(--vx-dot-stroke)"),
|
|
227
|
+
decl("tooltipBg", "var(--vx-tooltip-bg)"),
|
|
228
|
+
decl("tooltipText", "var(--vx-tooltip-text)"),
|
|
229
|
+
decl("tooltipMuted", "var(--vx-tooltip-muted)"),
|
|
230
|
+
decl("tooltipBorder", "var(--vx-tooltip-border)"),
|
|
231
|
+
decl("tooltipShadow", "var(--vx-tooltip-shadow)"),
|
|
232
|
+
decl("legendText", "var(--vx-legend-text)"),
|
|
233
|
+
decl("accentHover", "var(--vx-accent-hover)"),
|
|
234
|
+
decl("accentFill", "var(--vx-accent-fill)"),
|
|
235
|
+
decl("accentFillHover", "var(--vx-accent-fill-hover)"),
|
|
236
|
+
decl("onAccent", "var(--vx-on-accent)"),
|
|
237
|
+
decl("surface-panelHover", "var(--vx-surface-panel-hover)")
|
|
238
|
+
].join("\n");
|
|
239
|
+
}
|
|
240
|
+
function frameworkPrimitives(side, data, legacyAliases) {
|
|
241
|
+
const n = data.NEUTRAL;
|
|
242
|
+
const s = data.SEMANTIC;
|
|
243
|
+
const su = data.SURFACE;
|
|
244
|
+
const ink = data.INK;
|
|
245
|
+
const ac = data.ACCENT;
|
|
246
|
+
const canonical = [
|
|
247
|
+
groupSide("status-", data.STATUS, side),
|
|
248
|
+
decl("good-solid", s.good[side]),
|
|
249
|
+
decl("bad-solid", s.bad[side]),
|
|
250
|
+
decl("warn-solid", s.warn[side]),
|
|
251
|
+
decl("neutral", n.neutral[side]),
|
|
252
|
+
decl("line", n.line[side]),
|
|
253
|
+
decl("line2", n.line2[side]),
|
|
254
|
+
decl("axis", n.axis[side]),
|
|
255
|
+
decl("axis-stroke", n.axisStroke[side]),
|
|
256
|
+
decl("grid", n.grid[side]),
|
|
257
|
+
decl("crosshair", n.crosshair[side]),
|
|
258
|
+
decl("dot-stroke", n.dotStroke[side]),
|
|
259
|
+
decl("tooltip-bg", n.tooltipBg[side]),
|
|
260
|
+
decl("tooltip-text", n.tooltipText[side]),
|
|
261
|
+
decl("tooltip-muted", n.tooltipMuted[side]),
|
|
262
|
+
decl("tooltip-border", n.tooltipBorder[side]),
|
|
263
|
+
decl("tooltip-shadow", n.tooltipShadow[side]),
|
|
264
|
+
decl("legend-text", n.legendText[side]),
|
|
265
|
+
decl("ink", ink.ink[side]),
|
|
266
|
+
decl("ink2", ink.ink2[side]),
|
|
267
|
+
decl("muted", ink.muted[side]),
|
|
268
|
+
decl("faint", ink.faint[side]),
|
|
269
|
+
decl("accent", ac.accent[side]),
|
|
270
|
+
decl("accent-hover", ac.accentHover[side]),
|
|
271
|
+
decl("accent-fill", ac.accentFill[side]),
|
|
272
|
+
decl("accent-fill-hover", ac.accentFillHover[side]),
|
|
273
|
+
decl("on-accent", ac.onAccent[side]),
|
|
274
|
+
decl("divider", su.divider[side]),
|
|
275
|
+
decl("shadow-card", SHADOW.card[side]),
|
|
276
|
+
decl("shadow-ctrl", SHADOW.ctrl[side]),
|
|
277
|
+
decl("shadow-raised", SHADOW.raised[side]),
|
|
278
|
+
decl("shadow-overlay", SHADOW.overlay[side]),
|
|
279
|
+
decl("surface-bg", su.bg[side]),
|
|
280
|
+
decl("surface-panel", su.panel[side]),
|
|
281
|
+
decl("surface-panel-hover", su.panelHover[side]),
|
|
282
|
+
decl("surface-elevated", su.elevated[side]),
|
|
283
|
+
decl("surface-subtle", su.subtle[side]),
|
|
284
|
+
decl("surface-overlay", su.overlay[side]),
|
|
285
|
+
decl("surface-field", su.field[side]),
|
|
286
|
+
decl("surface-border", su.border[side]),
|
|
287
|
+
decl("surface-hairline", su.hairline[side])
|
|
288
|
+
].join("\n");
|
|
289
|
+
return legacyAliases ? `${canonical}
|
|
290
|
+
${frameworkPrimitivesAliases()}` : canonical;
|
|
291
|
+
}
|
|
292
|
+
function spaceDecls(space) {
|
|
293
|
+
return [
|
|
294
|
+
decl("space-row-inset-x", `${space.anchors.rowInsetX}px`),
|
|
295
|
+
decl("space-row-inset-y", `${space.anchors.rowInsetY}px`),
|
|
296
|
+
// Additive law, not the multiplier — see `deriveSpacing`'s doc in `tokens/palette.ts`. No unit:
|
|
297
|
+
// `line-height` is a unitless CSS value.
|
|
298
|
+
decl("space-row-line-height", `${space.rowLineHeight}`),
|
|
299
|
+
// A `size: 'md'` Input's resolved height. Mantine's own `--input-height-md` is
|
|
300
|
+
// `calc(2.625rem * var(--mantine-scale))` (BOTH `styles.css` and `styles.layer.css`, verified
|
|
301
|
+
// in the installed package) — REM-relative to the root font size AND scale-aware, not a flat
|
|
302
|
+
// px. Emitting this in REM (via `pxRem`, not a bare `${…}px`) preserves the rem half; the
|
|
303
|
+
// `* var(--mantine-scale))` half is reconstructed at the Mantine-coupled call site
|
|
304
|
+
// (`theme/index.ts`'s `Input.extend` `vars`, which wraps this var in the matching `calc(...)`)
|
|
305
|
+
// — this module stays Mantine-free, so it cannot reference `--mantine-scale` itself. Flattening
|
|
306
|
+
// either half into a flat px would desync input height from the user's root font size (an
|
|
307
|
+
// accessibility regression) and from Mantine's global `--mantine-scale` knob.
|
|
308
|
+
decl("space-input-height", pxRem(space.anchors.inputHeight)),
|
|
309
|
+
// A `size: 'md'` Button's/ActionIcon's resolved height — SAME rem-plus-scale reasoning and
|
|
310
|
+
// reconstruction as `space-input-height` above (`theme/index.ts`'s `Button.extend`/
|
|
311
|
+
// `ActionIcon.extend` `vars`), single-sourced from the SAME `controlHeight` anchor
|
|
312
|
+
// `space-input-height` reads from (`SPACE_ANCHORS_BASE`'s doc in `tokens/palette.ts`).
|
|
313
|
+
decl("space-control-height", pxRem(space.anchors.controlHeight)),
|
|
314
|
+
// Controls tier heights (`docs/CONTROLS-SPEC.md` §5) — same rem-plus-`--mantine-scale`
|
|
315
|
+
// reconstruction as `space-input-height`/`space-control-height` above; `theme/ctl-theme.tsx`'s
|
|
316
|
+
// `CTL_THEME` and the `cssVariablesResolver`'s `-ctl`/`-icon` var sets both wrap these in the
|
|
317
|
+
// matching `calc(... * var(--mantine-scale))`.
|
|
318
|
+
decl("space-control-height-tag", pxRem(space.anchors.controlHeightTag)),
|
|
319
|
+
decl("space-control-height-widget", pxRem(space.anchors.controlHeightWidget)),
|
|
320
|
+
decl("space-control-height-ctl", pxRem(space.anchors.controlHeightCtl)),
|
|
321
|
+
decl("space-stack-xs", `${space.anchors.stackXs}px`),
|
|
322
|
+
decl("space-stack-sm", `${space.anchors.stackSm}px`),
|
|
323
|
+
decl("space-stack-md", `${space.anchors.stackMd}px`),
|
|
324
|
+
decl("space-stack-lg", `${space.anchors.stackLg}px`),
|
|
325
|
+
decl("space-stack-xl", `${space.anchors.stackXl}px`),
|
|
326
|
+
// The CSS-module spacing sweep's one-offs (docs/STATUS.md) — same single-source reasoning,
|
|
327
|
+
// grouped to match `SPACE_STEP_BASE`'s own grouping in tokens/palette.ts.
|
|
328
|
+
// ONE value at every viewport since 1.26.0 — the AppShell header is a single
|
|
329
|
+
// `appShellHeaderHeight` row (law C14), so the `-mobile` override of the old Decision-3
|
|
330
|
+
// responsive pair is gone.
|
|
331
|
+
decl("space-sticky-header-clearance", `${space.step.stickyHeaderClearance}px`),
|
|
332
|
+
decl("space-nav-icon-gap", `${space.step.navIconGap}px`),
|
|
333
|
+
decl("space-sidebar-region-gap", `${space.step.sidebarRegionGap}px`),
|
|
334
|
+
decl("space-prose-quote-inset-y", `${space.step.proseQuoteInsetY}px`),
|
|
335
|
+
decl("space-prose-quote-indent", `${space.step.proseQuoteIndent}px`),
|
|
336
|
+
decl("space-prose-inline-code-inset-y", `${space.step.proseInlineCodeInsetY}px`),
|
|
337
|
+
decl("space-prose-inline-code-inset-x", `${space.step.proseInlineCodeInsetX}px`),
|
|
338
|
+
decl("space-prose-code-block-inset-y", `${space.step.proseCodeBlockInsetY}px`),
|
|
339
|
+
decl("space-prose-code-block-inset-x", `${space.step.proseCodeBlockInsetX}px`),
|
|
340
|
+
decl("space-prose-heading-anchor-gap", `${space.step.proseHeadingAnchorGap}px`),
|
|
341
|
+
decl("space-prose-table-cell-inset-y", `${space.step.proseTableCellInsetY}px`),
|
|
342
|
+
decl("space-prose-table-cell-inset-x", `${space.step.proseTableCellInsetX}px`),
|
|
343
|
+
decl("space-prose-chat-list-gap-bottom", `${space.step.proseChatListGapBottom}px`),
|
|
344
|
+
decl("space-prose-chat-list-indent", `${space.step.proseChatListIndent}px`),
|
|
345
|
+
decl("space-prose-chat-list-item-gap", `${space.step.proseChatListItemGap}px`),
|
|
346
|
+
decl("space-prose-chat-nested-list-gap", `${space.step.proseChatNestedListGap}px`),
|
|
347
|
+
decl("space-prose-chat-heading-gap-top", `${space.step.proseChatHeadingGapTop}px`),
|
|
348
|
+
decl("space-prose-chat-heading-gap-bottom", `${space.step.proseChatHeadingGapBottom}px`),
|
|
349
|
+
decl("space-prose-article-paragraph-gap", `${space.step.proseArticleParagraphGap}px`),
|
|
350
|
+
decl("space-prose-article-list-gap-top", `${space.step.proseArticleListGapTop}px`),
|
|
351
|
+
decl("space-prose-article-list-gap-bottom", `${space.step.proseArticleListGapBottom}px`),
|
|
352
|
+
decl("space-prose-article-list-indent", `${space.step.proseArticleListIndent}px`),
|
|
353
|
+
decl("space-prose-article-h1-gap-top", `${space.step.proseArticleH1GapTop}px`),
|
|
354
|
+
decl("space-prose-article-h1-gap-bottom", `${space.step.proseArticleH1GapBottom}px`),
|
|
355
|
+
decl("space-prose-article-heading-gap-top", `${space.step.proseArticleHeadingGapTop}px`),
|
|
356
|
+
decl("space-prose-article-heading-gap-bottom", `${space.step.proseArticleHeadingGapBottom}px`),
|
|
357
|
+
decl("space-prose-article-h2-rule-gap", `${space.step.proseArticleH2RuleGap}px`),
|
|
358
|
+
decl("space-prose-article-block-gap", `${space.step.proseArticleBlockGap}px`),
|
|
359
|
+
decl("space-article-column-gap", `${space.step.articleColumnGap}px`),
|
|
360
|
+
decl("space-article-toc-rail-width", `${space.step.articleTocRailWidth}px`),
|
|
361
|
+
decl("space-article-header-gap", `${space.step.articleHeaderGap}px`),
|
|
362
|
+
decl("space-article-header-padding-bottom", `${space.step.articleHeaderPaddingBottom}px`),
|
|
363
|
+
decl("space-article-header-margin-bottom", `${space.step.articleHeaderMarginBottom}px`),
|
|
364
|
+
decl("space-article-meta-row-gap", `${space.step.articleMetaRowGap}px`),
|
|
365
|
+
decl("space-article-footer-gap", `${space.step.articleFooterGap}px`),
|
|
366
|
+
decl("space-article-footer-margin-top", `${space.step.articleFooterMarginTop}px`),
|
|
367
|
+
decl("space-article-footer-padding-top", `${space.step.articleFooterPaddingTop}px`),
|
|
368
|
+
decl("space-article-nav-target-gap", `${space.step.articleNavTargetGap}px`),
|
|
369
|
+
decl("space-code-block-header-gap", `${space.step.codeBlockHeaderGap}px`),
|
|
370
|
+
decl("space-code-block-header-inset-y", `${space.step.codeBlockHeaderInsetY}px`),
|
|
371
|
+
decl("space-code-block-header-inset-right", `${space.step.codeBlockHeaderInsetRight}px`),
|
|
372
|
+
decl("space-code-block-content-inset-x", `${space.step.codeBlockContentInsetX}px`),
|
|
373
|
+
decl("space-code-block-header-right-gap", `${space.step.codeBlockHeaderRightGap}px`),
|
|
374
|
+
decl("space-code-block-body-inset-y", `${space.step.codeBlockBodyInsetY}px`),
|
|
375
|
+
decl("space-code-block-floating-copy-offset", `${space.step.codeBlockFloatingCopyOffset}px`),
|
|
376
|
+
decl("space-callout-inset-y", `${space.step.calloutInsetY}px`),
|
|
377
|
+
decl("space-callout-inset-x", `${space.step.calloutInsetX}px`),
|
|
378
|
+
decl("space-callout-title-row-gap", `${space.step.calloutTitleRowGap}px`),
|
|
379
|
+
decl("space-toc-root-gap", `${space.step.tocRootGap}px`),
|
|
380
|
+
decl("space-toc-link-inset-y", `${space.step.tocLinkInsetY}px`),
|
|
381
|
+
decl("space-toc-link-indent", `${space.step.tocLinkIndent}px`),
|
|
382
|
+
decl("space-toc-sub-indent", `${space.step.tocSubIndent}px`),
|
|
383
|
+
decl("space-article-card-tags-gap", `${space.step.articleCardTagsGap}px`),
|
|
384
|
+
decl("space-article-card-tag-inset-y", `${space.step.articleCardTagInsetY}px`),
|
|
385
|
+
decl("space-article-card-tag-inset-x", `${space.step.articleCardTagInsetX}px`),
|
|
386
|
+
decl("space-article-card-meta-gap-top", `${space.step.articleCardMetaGapTop}px`),
|
|
387
|
+
decl("space-guide-body-gap-bottom", `${space.step.guideBodyGapBottom}px`),
|
|
388
|
+
decl("space-guide-footer-gap-top", `${space.step.guideFooterGapTop}px`),
|
|
389
|
+
decl("space-guide-footer-inset-top", `${space.step.guideFooterInsetTop}px`),
|
|
390
|
+
decl("space-sidebar-search-gap", `${space.step.sidebarSearchGap}px`),
|
|
391
|
+
decl("space-sidebar-search-trigger-height", `${space.step.sidebarSearchTriggerHeight}px`),
|
|
392
|
+
decl("space-settings-row-inset-y", `${space.step.settingsRowInsetY}px`),
|
|
393
|
+
decl("space-settings-row-gap", `${space.step.settingsRowGap}px`),
|
|
394
|
+
decl("space-mermaid-container-inset", `${space.step.mermaidContainerInset}px`),
|
|
395
|
+
decl("space-sidebar-brand-inset-x", `${space.step.sidebarBrandInsetX}px`),
|
|
396
|
+
decl("space-sidebar-section-gap", `${space.step.sidebarSectionGap}px`),
|
|
397
|
+
decl("space-sidebar-account-inset-top", `${space.step.sidebarAccountInsetTop}px`),
|
|
398
|
+
decl("space-sidebar-account-inset-x", `${space.step.sidebarAccountInsetX}px`),
|
|
399
|
+
decl("space-sidebar-account-inset-bottom", `${space.step.sidebarAccountInsetBottom}px`),
|
|
400
|
+
decl("space-sidebar-avatar-size", `${space.step.sidebarAvatarSize}px`),
|
|
401
|
+
decl("space-sidebar-section-label-gap", `${space.step.sidebarSectionLabelGap}px`),
|
|
402
|
+
decl("space-sidebar-child-list-gap-top", `${space.step.sidebarChildListGapTop}px`),
|
|
403
|
+
decl("space-sidebar-child-list-gap-bottom", `${space.step.sidebarChildListGapBottom}px`),
|
|
404
|
+
decl("space-sidebar-child-list-indent", `${space.step.sidebarChildListIndent}px`),
|
|
405
|
+
decl("space-sidebar-child-row-inset-y", `${space.step.sidebarChildRowInsetY}px`),
|
|
406
|
+
decl("space-sidebar-child-row-indent", `${space.step.sidebarChildRowIndent}px`),
|
|
407
|
+
// The page gutter — the ONE `appShell*` dimension that IS emitted, against the JS-number-only
|
|
408
|
+
// rule its five neighbours follow (see the note at the bottom of this list). It earns the
|
|
409
|
+
// exception because it is the most visible spacing number the framework ships — every page's
|
|
410
|
+
// left edge — and it was, until now, the one number the `--vx-*` layer did not expose at all, so
|
|
411
|
+
// a consumer retuning its identity through `createBasaltTheme` could not reach it and had to
|
|
412
|
+
// reach past the token layer into `AppShell.Main`'s own styles. Emitted in PLAIN PX, like every
|
|
413
|
+
// other inset/gap in this list and unlike the `pxRem` heights above it: the rem-plus-
|
|
414
|
+
// `var(--mantine-scale)` reconstruction exists so a CONTROL's box tracks the root font size and
|
|
415
|
+
// Mantine's global scale knob; a page gutter is a layout margin against a viewport, not a box
|
|
416
|
+
// sized to text, so scaling it with the font would make a large-type user's content column
|
|
417
|
+
// narrower rather than more legible.
|
|
418
|
+
decl("space-app-shell-inset", `${space.step.appShellInset}px`),
|
|
419
|
+
decl("space-app-shell-inset-mobile", `${space.step.appShellInsetMobile}px`),
|
|
420
|
+
// The header's breadcrumb floor — emitted for the same reason as the gutter pair above it and
|
|
421
|
+
// not for the JS-number reason its `appShell*` neighbours below are withheld for: this one has
|
|
422
|
+
// a real CSS consumer (`shell/app-header.module.css`'s `.lead`), which is the whole test this
|
|
423
|
+
// list applies. Plain px, like every other layout dimension here.
|
|
424
|
+
decl("space-app-shell-header-lead-min", `${space.step.appShellHeaderLeadMin}px`),
|
|
425
|
+
decl("space-mobile-nav-tab-gap", `${space.step.mobileNavTabGap}px`),
|
|
426
|
+
decl("space-mobile-nav-icon-size", `${space.step.mobileNavIconSize}px`),
|
|
427
|
+
decl("space-mobile-nav-tab-inset-y", `${space.step.mobileNavTabInsetY}px`),
|
|
428
|
+
decl("space-mobile-nav-tab-inset-x", `${space.step.mobileNavTabInsetX}px`),
|
|
429
|
+
decl("space-mobile-nav-row-height", `${space.step.mobileNavRowHeight}px`),
|
|
430
|
+
decl("space-agent-rail-inset-x", `${space.step.agentRailInsetX}px`),
|
|
431
|
+
decl("space-agent-part-gap-top", `${space.step.agentPartGapTop}px`),
|
|
432
|
+
decl("space-agent-code-inset", `${space.step.agentCodeInset}px`),
|
|
433
|
+
decl("space-agent-error-inset-y", `${space.step.agentErrorInsetY}px`),
|
|
434
|
+
decl("space-agent-error-inset-x", `${space.step.agentErrorInsetX}px`),
|
|
435
|
+
decl("space-agent-scroll-button-gap-top", `${space.step.agentScrollButtonGapTop}px`),
|
|
436
|
+
decl("space-agent-message-inset-y", `${space.step.agentMessageInsetY}px`),
|
|
437
|
+
decl("space-agent-message-inset-x", `${space.step.agentMessageInsetX}px`),
|
|
438
|
+
decl("space-agent-transcript-inset", `${space.step.agentTranscriptInset}px`),
|
|
439
|
+
decl("space-badge-inset-y", `${space.step.badgeInsetY}px`),
|
|
440
|
+
decl("space-badge-inset-x", `${space.step.badgeInsetX}px`),
|
|
441
|
+
decl("space-stat-card-gap", `${space.step.statCardGap}px`),
|
|
442
|
+
// The card/section inset ladder — the three values `spaceMobileDecls` below re-points at `< sm`
|
|
443
|
+
// (see its doc for where the law lives and why it lives there).
|
|
444
|
+
decl("space-card-inset-y", `${space.step.cardInsetY}px`),
|
|
445
|
+
decl("space-card-inset-x", `${space.step.cardInsetX}px`),
|
|
446
|
+
decl("space-section-gap", `${space.step.sectionGap}px`),
|
|
447
|
+
decl("space-virtual-row-inset-y", `${space.step.virtualRowInsetY}px`),
|
|
448
|
+
decl("space-virtual-row-inset-x", `${space.step.virtualRowInsetX}px`),
|
|
449
|
+
// Controls tier row/gap heights (`docs/CONTROLS-SPEC.md` §5) — the current commit's consumers
|
|
450
|
+
// are `theme/ctl-theme.tsx` (`--vx-space-control-gap`) and the wave-3/4 homes (`PageBar`,
|
|
451
|
+
// `WidgetHeader`, sidebar blocks, the mobile `Filters (n)` sheet) landing next.
|
|
452
|
+
decl("space-page-bar-row-height", pxRem(space.step.pageBarRowHeight)),
|
|
453
|
+
decl("space-section-header-height", pxRem(space.step.sectionHeaderHeight)),
|
|
454
|
+
decl("space-widget-header-height", pxRem(space.step.widgetHeaderHeight)),
|
|
455
|
+
decl("space-sidebar-block-row-height", pxRem(space.step.sidebarBlockRowHeight)),
|
|
456
|
+
decl("space-control-gap", `${space.step.controlGap}px`),
|
|
457
|
+
decl("space-sheet-row-height", pxRem(space.step.sheetRowHeight))
|
|
458
|
+
// `chartLegendGap`/`chartMarginTop`/`chartMarginRight`/`chartMarginBottom`/`chartMarginLeft`/
|
|
459
|
+
// `chartDotR`/`progressBarSize`/`timelineBullet` are DELIBERATELY absent — see this function's
|
|
460
|
+
// doc for why (JS-number-only consumers, zero `var()` reads). `appShellHeaderHeight`/
|
|
461
|
+
// `appShellNavbarWidth`/`appShellNavbarRailWidth`/`appShellAsideWidth`/`appShellAsideRailWidth`
|
|
462
|
+
// join that list — but NOT `appShellInset`/`appShellInsetMobile`/`appShellHeaderLeadMin`, which
|
|
463
|
+
// are emitted above and carry their own reason for the exception —
|
|
464
|
+
// `shell/index.tsx` reads all five as JS numbers via `useBasaltSpacing()` (Mantine's `AppShell`
|
|
465
|
+
// `header`/`navbar`/`aside` props take numbers, not `var()` strings), so a `--vx-space-app-shell-*`
|
|
466
|
+
// decl here would have had zero consumers, framework-wide, the same dead-weight shape this function's
|
|
467
|
+
// doc already calls out for the chart/Progress/Timeline group. `sidebarAccountMenuWidth`/
|
|
468
|
+
// `sidebarSettingsMenuWidth` join it too — `app-sidebar-account.tsx`/`app-sidebar.tsx` read both
|
|
469
|
+
// as JS numbers via `useBasaltSpacing()` (Mantine's `<Menu width={…}>` also takes a number).
|
|
470
|
+
];
|
|
471
|
+
}
|
|
472
|
+
const CORE_SPACE_VARS = new Set(
|
|
473
|
+
Object.keys(SPACE).map((key) => `space-${key.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`)}`)
|
|
474
|
+
);
|
|
475
|
+
function isCoreSpaceDecl(line) {
|
|
476
|
+
const name = /^ {2}--vx-([\w-]+):/.exec(line)?.[1];
|
|
477
|
+
return name !== void 0 && CORE_SPACE_VARS.has(name);
|
|
478
|
+
}
|
|
479
|
+
const DEFAULT_SPACE_VALUES = {
|
|
480
|
+
anchors: SPACE,
|
|
481
|
+
scale: SPACE_SCALE,
|
|
482
|
+
step: SPACE_STEP,
|
|
483
|
+
rowLineHeight: ROW_LINE_HEIGHT
|
|
484
|
+
};
|
|
485
|
+
function frameworkDerivedAliases(data) {
|
|
486
|
+
return [
|
|
487
|
+
" /* Deprecated camelCase aliases \u2014 removed in a future minor; migrate to the kebab names above. */",
|
|
488
|
+
...Object.keys(data.FILL).map(
|
|
489
|
+
(name) => decl(`fillHover-${name}`, `var(--vx-fill-hover-${name})`)
|
|
490
|
+
),
|
|
491
|
+
decl("goodSoft", "var(--vx-good-soft)"),
|
|
492
|
+
decl("goodRef", "var(--vx-good-ref)"),
|
|
493
|
+
decl("badRef", "var(--vx-bad-ref)"),
|
|
494
|
+
decl("warnRef", "var(--vx-warn-ref)")
|
|
495
|
+
].join("\n");
|
|
496
|
+
}
|
|
497
|
+
function frameworkDerived(data, only, legacyAliases) {
|
|
498
|
+
const space = spaceDecls(DEFAULT_SPACE_VALUES);
|
|
499
|
+
const canonical = [
|
|
500
|
+
decl("radius-card", `${RADIUS.card}px`),
|
|
501
|
+
decl("radius-ctrl", `${RADIUS.ctrl}px`),
|
|
502
|
+
// The two offset tiers (SegmentedControl indicator/Kbd/Code, Progress/scale-sm) — added so a
|
|
503
|
+
// component's inline `styles`/`style` can read the SAME source as `RADIUS_STEP.tight`/`.fine`
|
|
504
|
+
// instead of a hand-typed literal (see `theme/index.ts`'s component sweep).
|
|
505
|
+
decl("radius-tight", `${RADIUS_STEP.tight}px`),
|
|
506
|
+
decl("radius-fine", `${RADIUS_STEP.fine}px`),
|
|
507
|
+
// The floating tier (Modal/Tooltip/Popover/Notification, content code/mermaid blocks).
|
|
508
|
+
decl("radius-floating", `${RADIUS_STEP.floating}px`),
|
|
509
|
+
// The pill affordance (scroll-to-bottom button, chips) — fixed, level-invariant, so it lives
|
|
510
|
+
// only in this static block, never in `buildRadiusCss`'s dynamic override (see
|
|
511
|
+
// `RADIUS_STEP.pill`'s doc).
|
|
512
|
+
decl("radius-pill", `${RADIUS_STEP.pill}px`),
|
|
513
|
+
// The pointer tier's fine default — density-EXEMPT, so it lives only in this static block
|
|
514
|
+
// (same law as `radius-pill` above). `coarseHitBlock` re-points it to 44px.
|
|
515
|
+
decl("hit", `${HIT_FINE}px`),
|
|
516
|
+
...only === "core" ? space.filter(isCoreSpaceDecl) : space,
|
|
517
|
+
// Article-density Prose measure (docs/CONTENT-SPEC.md §5) — theme-independent, like the radii.
|
|
518
|
+
decl("prose-measure", "72ch"),
|
|
519
|
+
// The fill band (see FILL in palette.ts). Emitted on `:root`, NOT per scheme — a filled surface
|
|
520
|
+
// is the same hex in both, which is the whole point: it is squeezed between its white label and
|
|
521
|
+
// the page behind it, and only one luminance band satisfies both on both pages.
|
|
522
|
+
...Object.entries(data.FILL).map(([name, hex]) => decl(`fill-${name}`, hex)),
|
|
523
|
+
// Hover is DERIVED from the fill, so retuning a fill (in the theme lab, or here) carries its
|
|
524
|
+
// hover along instead of leaving a stale pair. 88% of the fill over black lands ~0.128 luminance:
|
|
525
|
+
// a visible press-darkening that still clears AA for the white label (~5.9:1).
|
|
526
|
+
...Object.keys(data.FILL).map(
|
|
527
|
+
(name) => decl(`fill-hover-${name}`, `color-mix(in srgb, var(--vx-fill-${name}) 88%, #000)`)
|
|
528
|
+
),
|
|
529
|
+
// The type scale, emitted from the SAME `TEXT` object `VX.text` reads — CSS modules and the
|
|
530
|
+
// Mantine theme consume these; inline styles / visx read the numbers. One ladder, two forms.
|
|
531
|
+
...Object.entries(TEXT).map(([step, px]) => decl(`text-${step}`, `${px}px`)),
|
|
532
|
+
decl("area-top", "22%"),
|
|
533
|
+
decl("area-bottom", "1%"),
|
|
534
|
+
decl("good", "color-mix(in srgb, var(--vx-good-solid) 18%, transparent)"),
|
|
535
|
+
decl("good-soft", "color-mix(in srgb, var(--vx-good-solid) 8%, transparent)"),
|
|
536
|
+
decl("bad", "color-mix(in srgb, var(--vx-bad-solid) 18%, transparent)"),
|
|
537
|
+
decl("warn", "color-mix(in srgb, var(--vx-warn-solid) 8%, transparent)"),
|
|
538
|
+
decl("good-ref", "color-mix(in srgb, var(--vx-good-solid) 30%, transparent)"),
|
|
539
|
+
decl("bad-ref", "color-mix(in srgb, var(--vx-bad-solid) 30%, transparent)"),
|
|
540
|
+
decl("warn-ref", "color-mix(in srgb, var(--vx-warn-solid) 20%, transparent)")
|
|
541
|
+
].join("\n");
|
|
542
|
+
return legacyAliases ? `${canonical}
|
|
543
|
+
${frameworkDerivedAliases(data)}` : canonical;
|
|
544
|
+
}
|
|
545
|
+
function assertConsumerVxName(name) {
|
|
546
|
+
const family = vxFamilyOf(name);
|
|
547
|
+
if (!BASALT_VX_FAMILIES.includes(family)) return;
|
|
548
|
+
throw new Error(
|
|
549
|
+
`[basalt] ${name} is inside basalt's own --vx-${family} family \u2014 name your series group something basalt does not own (groupTokens('app', \u2026)).`
|
|
550
|
+
);
|
|
551
|
+
}
|
|
552
|
+
function seriesTokens(map, prefix = "") {
|
|
553
|
+
const out = {};
|
|
554
|
+
for (const key of Object.keys(map)) {
|
|
555
|
+
if (process.env.NODE_ENV !== "production") assertConsumerVxName(`--vx-${prefix}${String(key)}`);
|
|
556
|
+
out[key] = `var(--vx-${prefix}${String(key)})`;
|
|
557
|
+
}
|
|
558
|
+
return out;
|
|
559
|
+
}
|
|
560
|
+
function defineSeries(map) {
|
|
561
|
+
return map;
|
|
562
|
+
}
|
|
563
|
+
const SERIES_GROUP = /* @__PURE__ */ Symbol("basalt.series-group");
|
|
564
|
+
function groupTokens(name, map) {
|
|
565
|
+
const refs = seriesTokens(map, `${name}-`);
|
|
566
|
+
Object.defineProperty(refs, SERIES_GROUP, { value: { prefix: `${name}-`, map } });
|
|
567
|
+
return refs;
|
|
568
|
+
}
|
|
569
|
+
const MANTINE_SCHEME_ATTRIBUTE = "data-mantine-color-scheme";
|
|
570
|
+
const indent = (block) => block.split("\n").map((line) => line === "" ? line : ` ${line}`).join("\n");
|
|
571
|
+
const MOBILE_MEDIA = `@media (max-width: ${sizeClassMaxEm(SIZE_CLASSES.medium)})`;
|
|
572
|
+
const coarseHitBlock = `@media (pointer: coarse) {
|
|
573
|
+
:root {
|
|
574
|
+
--vx-hit: ${HIT_COARSE}px;
|
|
575
|
+
}
|
|
576
|
+
}`;
|
|
577
|
+
function spaceMobileDecls(space) {
|
|
578
|
+
return [
|
|
579
|
+
decl("space-card-inset-x", `${space.scale.xs}px`),
|
|
580
|
+
decl("space-section-gap", `${space.anchors.stackSm}px`)
|
|
581
|
+
];
|
|
582
|
+
}
|
|
583
|
+
function mobileLadderBlock(space) {
|
|
584
|
+
return `${MOBILE_MEDIA} {
|
|
585
|
+
:root {
|
|
586
|
+
${indent(spaceMobileDecls(space).join("\n"))}
|
|
587
|
+
}
|
|
588
|
+
}`;
|
|
589
|
+
}
|
|
590
|
+
function buildPaletteCss(opts = {}, data = buildPaletteData()) {
|
|
591
|
+
const groups = opts.groups ?? [];
|
|
592
|
+
const legacyAliases = opts.legacyAliases ?? true;
|
|
593
|
+
const only = opts.only ?? "all";
|
|
594
|
+
const extraDerived = (opts.derived ?? []).map((d) => ` ${d}`).join("\n");
|
|
595
|
+
const derivedBlock = frameworkDerived(data, only, legacyAliases);
|
|
596
|
+
const derived = extraDerived ? `${derivedBlock}
|
|
597
|
+
${extraDerived}` : derivedBlock;
|
|
598
|
+
const side = (s) => {
|
|
599
|
+
const extra = groups.map((group) => groupSide(group[SERIES_GROUP].prefix, group[SERIES_GROUP].map, s)).join("\n");
|
|
600
|
+
const framework = frameworkPrimitives(s, data, legacyAliases);
|
|
601
|
+
return extra ? `${framework}
|
|
602
|
+
${extra}` : framework;
|
|
603
|
+
};
|
|
604
|
+
const rootBlock = only === "core" ? `:root {
|
|
605
|
+
${derived}
|
|
606
|
+
}
|
|
607
|
+
${coarseHitBlock}` : `:root {
|
|
608
|
+
${derived}
|
|
609
|
+
}
|
|
610
|
+
${mobileLadderBlock(DEFAULT_SPACE_VALUES)}
|
|
611
|
+
${coarseHitBlock}`;
|
|
612
|
+
if (opts.scheme === void 0 && opts.defaultScheme === void 0 && !opts.mediaFallback) {
|
|
613
|
+
return `${rootBlock}
|
|
614
|
+
:root,
|
|
615
|
+
html[data-mantine-color-scheme='dark'] {
|
|
616
|
+
${side("dark")}
|
|
617
|
+
}
|
|
618
|
+
html[data-mantine-color-scheme='light'] {
|
|
619
|
+
${side("light")}
|
|
620
|
+
}`;
|
|
621
|
+
}
|
|
622
|
+
const attribute = opts.scheme?.attribute ?? MANTINE_SCHEME_ATTRIBUTE;
|
|
623
|
+
const value = {
|
|
624
|
+
dark: opts.scheme?.darkValue ?? "dark",
|
|
625
|
+
light: opts.scheme?.lightValue ?? "light"
|
|
626
|
+
};
|
|
627
|
+
const defaultScheme = opts.defaultScheme ?? "dark";
|
|
628
|
+
const order = defaultScheme === "light" ? ["light", "dark"] : ["dark", "light"];
|
|
629
|
+
const blocks = [rootBlock];
|
|
630
|
+
for (const s of order) {
|
|
631
|
+
const selector = s === defaultScheme ? `:root,
|
|
632
|
+
:root[${attribute}='${value[s]}']` : `:root[${attribute}='${value[s]}']`;
|
|
633
|
+
if (opts.mediaFallback === true && s !== defaultScheme) {
|
|
634
|
+
blocks.push(`@media (prefers-color-scheme: ${s}) {
|
|
635
|
+
:root {
|
|
636
|
+
${indent(side(s))}
|
|
637
|
+
}
|
|
638
|
+
}`);
|
|
639
|
+
}
|
|
640
|
+
blocks.push(`${selector} {
|
|
641
|
+
${side(s)}
|
|
642
|
+
}`);
|
|
643
|
+
}
|
|
644
|
+
return blocks.join("\n");
|
|
645
|
+
}
|
|
646
|
+
const FONT_VAR_NAMES = {
|
|
647
|
+
sans: "--basalt-font-sans",
|
|
648
|
+
head: "--basalt-font-head",
|
|
649
|
+
mono: "--basalt-font-mono"
|
|
650
|
+
};
|
|
651
|
+
function buildFontsCss(fonts) {
|
|
652
|
+
if (!fonts) return "";
|
|
653
|
+
const decls = Object.keys(FONT_VAR_NAMES).filter((key) => fonts[key] !== void 0).map((key) => {
|
|
654
|
+
const value = fonts[key];
|
|
655
|
+
if (/[{};]|\/\*/.test(value)) {
|
|
656
|
+
throw new Error(
|
|
657
|
+
`Invalid fonts.${key}: a font-family stack must not contain "{", "}", ";" or "/*" \u2014 got ${JSON.stringify(value)}`
|
|
658
|
+
);
|
|
659
|
+
}
|
|
660
|
+
return ` ${FONT_VAR_NAMES[key]}: ${value};`;
|
|
661
|
+
});
|
|
662
|
+
if (decls.length === 0) return "";
|
|
663
|
+
return `:root {
|
|
664
|
+
${decls.join("\n")}
|
|
665
|
+
}`;
|
|
666
|
+
}
|
|
667
|
+
function buildRadiusCss(radius) {
|
|
668
|
+
if (!radius) return "";
|
|
669
|
+
return `:root {
|
|
670
|
+
--vx-radius-card: ${radius.card}px;
|
|
671
|
+
--vx-radius-ctrl: ${radius.ctrl}px;
|
|
672
|
+
--vx-radius-tight: ${radius.tight}px;
|
|
673
|
+
--vx-radius-fine: ${radius.fine}px;
|
|
674
|
+
--vx-radius-floating: ${radius.floating}px;
|
|
675
|
+
}`;
|
|
676
|
+
}
|
|
677
|
+
function buildDensityCss(space) {
|
|
678
|
+
if (!space) return "";
|
|
679
|
+
return `:root {
|
|
680
|
+
${spaceDecls(space).join("\n")}
|
|
681
|
+
}
|
|
682
|
+
${mobileLadderBlock(space)}`;
|
|
683
|
+
}
|
|
684
|
+
export {
|
|
685
|
+
BP,
|
|
686
|
+
BREAKPOINTS,
|
|
687
|
+
CONTAINER_CLASSES,
|
|
688
|
+
CONTAINER_GRID_BREAKPOINTS,
|
|
689
|
+
CONTAINER_KEYS,
|
|
690
|
+
DEFAULT_DERIVE_CONFIG,
|
|
691
|
+
SIZE_CLASSES2 as SIZE_CLASSES,
|
|
692
|
+
VX,
|
|
693
|
+
alpha,
|
|
694
|
+
buildDensityCss,
|
|
695
|
+
buildFontsCss,
|
|
696
|
+
buildPaletteCss,
|
|
697
|
+
buildRadiusCss,
|
|
698
|
+
defineSeries,
|
|
699
|
+
deriveRadius,
|
|
700
|
+
deriveSpacing,
|
|
701
|
+
deriveTokens,
|
|
702
|
+
groupTokens,
|
|
703
|
+
p,
|
|
704
|
+
pxRem,
|
|
705
|
+
resolveContainerClass,
|
|
706
|
+
resolveDeriveConfig,
|
|
707
|
+
seriesTokens
|
|
708
|
+
};
|