basalt-ui 1.41.0 → 2.0.1
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 +46 -43
- package/CHANGELOG.md +542 -518
- package/MIGRATING.md +964 -37
- package/README.md +171 -366
- 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 +16 -26
- package/agent/templates/DESIGN.md.tpl +1 -1
- package/agent/templates/__root.tpl +9 -16
- package/agent/templates/main.tpl +21 -0
- package/agent/templates/nav.tpl +18 -0
- package/configs/oxlint-basalt.json +4 -10
- package/configs/oxlint-plugin.js +465 -844
- package/configs/oxlint-plugin.test.ts +661 -709
- 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/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 +18 -43
- package/dist/cli/config.d.ts.map +1 -1
- package/dist/cli/config.js +6 -0
- package/dist/cli/doctor-upgrade.d.ts +43 -0
- package/dist/cli/doctor-upgrade.d.ts.map +1 -0
- package/dist/cli/doctor-upgrade.js +314 -0
- package/dist/cli/doctor.d.ts +14 -29
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +58 -9
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +2 -4
- package/dist/cli/index.d.ts +48 -172
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +39 -132
- package/dist/cli/init.d.ts.map +1 -1
- package/dist/cli/init.js +43 -37
- package/dist/cli/sync.d.ts +5 -21
- package/dist/cli/sync.d.ts.map +1 -1
- package/dist/cli/sync.js +4 -23
- 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/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 +80 -173
- 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/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 +26 -43
- package/src/cli/doctor-upgrade.ts +457 -0
- package/src/cli/doctor.ts +89 -72
- package/src/cli/help.ts +2 -4
- package/src/cli/index.ts +100 -384
- package/src/cli/init.ts +60 -51
- package/src/cli/sync.ts +13 -68
- 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/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 +36 -191
- 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/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
|
@@ -1,97 +1,42 @@
|
|
|
1
1
|
---
|
|
2
2
|
source: basalt-ui
|
|
3
|
-
description: The adapter batteries — query, forms,
|
|
3
|
+
description: The adapter batteries — query, forms, table, content, agent. Use the shipped seam.
|
|
4
4
|
paths:
|
|
5
5
|
- 'src/**'
|
|
6
6
|
- 'apps/**/src/**'
|
|
7
|
-
- '**/vite.config.ts'
|
|
8
|
-
- '**/index.html'
|
|
9
7
|
---
|
|
10
8
|
|
|
11
9
|
<!-- basalt:coverage -->
|
|
12
10
|
<!-- GENERATED from src/surfaces.ts — `bun scripts/check-coverage.ts --write`. Do not hand-edit. -->
|
|
13
|
-
<!-- backed by: guard kinds — none · oxlint rules — basalt/agent-no-raw-usechat, basalt/
|
|
11
|
+
<!-- backed by: guard kinds — none · oxlint rules — basalt/agent-no-raw-usechat, basalt/ai-sdk-major, basalt/forms-field-key, basalt/query-fn-unwrap -->
|
|
14
12
|
<!-- not guarded: — -->
|
|
15
13
|
<!-- /basalt:coverage -->
|
|
16
14
|
|
|
17
|
-
# Basalt Batteries
|
|
15
|
+
# Basalt Batteries
|
|
18
16
|
|
|
19
|
-
|
|
20
|
-
failure this rule prevents. Every peer is OPTIONAL — install before importing. Full API: the
|
|
21
|
-
shipped types, JSDoc and `llms.txt` at the install directory — this file is only what a reader gets
|
|
22
|
-
wrong without being told.
|
|
17
|
+
`.` requires react, Mantine and TanStack Router/Query; install a battery's own peer before importing its subpath.
|
|
23
18
|
|
|
24
|
-
|
|
25
|
-
guard kinds or oxlint rules — the `not guarded: —` line above is real, not aspirational. Nothing
|
|
26
|
-
fails a build if you re-roll one of these seams by hand; follow the doctrine below on trust.
|
|
19
|
+
## Query
|
|
27
20
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
binding). The replacement and removal minor are always in `MIGRATING.md` § Unreleased the moment
|
|
31
|
-
the deprecation ships — that file, not the warning text, is where you confirm what to migrate to.
|
|
32
|
-
Maintainer notes (`MAINTAINING.md` in the repo, not shipped): § Deprecation lifecycle.
|
|
21
|
+
- Wrap every `queryFn` response in `unwrap()`; it throws on the error branch and on `null` data. [basalt/query-fn-unwrap]
|
|
22
|
+
- The client comes from `createBasaltRouter`; extend it via its `query:` option. [type createBasaltRouter]
|
|
33
23
|
|
|
34
|
-
##
|
|
24
|
+
## Forms
|
|
35
25
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
loading → children). One factory per resource via `queryOptions`, never a raw string key.
|
|
26
|
+
- A field is two calls: `key={fieldKey(form, path)}` and `{...inputProps(form, path)}`, from `basalt-ui/forms`. [basalt/forms-field-key]
|
|
27
|
+
- `useBasaltForm` takes a Standard Schema validator, not a `ZodSchema`. [type useBasaltForm]
|
|
39
28
|
|
|
40
|
-
##
|
|
29
|
+
## Table
|
|
41
30
|
|
|
42
|
-
|
|
43
|
-
aliases, and a response schema on a streaming route (Eden #231) all silently degrade inference to
|
|
44
|
-
`any`. Check these three first when Eden types regress.
|
|
31
|
+
- Tables are `BasaltDataTable` with columns from `createColumnHelper` (`basalt-ui/table`, TanStack Table v9: `sortFn`, not v8's `sortingFn`); column `meta` is `{ align, numeral }`; a streamed table's fallback is the same table with `isLoading` and `skeletonRows`. [type createColumnHelper] [type BasaltDataTable]
|
|
45
32
|
|
|
46
|
-
##
|
|
33
|
+
## Content
|
|
47
34
|
|
|
48
|
-
`
|
|
49
|
-
`useFormSubmit`/`useFieldArray`/`FormErrorSummary`/`useFormDraft`. A field is two calls, never one
|
|
50
|
-
object (`basalt/forms-field-key` guards + autofixes it) — dropping `key` keeps stale text through
|
|
51
|
-
`form.reset()`.
|
|
35
|
+
- Render model or agent output with `contentTrust="untrusted"`; `streaming` is a rendering mode, not a trust claim. [type Markdown]
|
|
52
36
|
|
|
53
|
-
##
|
|
37
|
+
## Agent
|
|
54
38
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
## `./commands` — the command bus
|
|
60
|
-
|
|
61
|
-
`defineCommands`/`runCommand`, `defineOverlays`/`overlays.open` — call each factory once, at app
|
|
62
|
-
boot. Project via `toSpotlightActions`/`toShortcutList`/`toHotkeyBindings`, never a hand-authored
|
|
63
|
-
second list. `overlays.confirm`/`confirmDelete` need no registry entry.
|
|
64
|
-
|
|
65
|
-
## `./data/table` + `./data/virtual` — TanStack Table + Virtual (C1: no bare `./data`)
|
|
66
|
-
|
|
67
|
-
Read the props before hand-rolling anything (facets, pagination, `meta.align`/`meta.numeral`).
|
|
68
|
-
`manualPagination` imposes a contract on sorting/filtering/count — unresolved, it throws in dev.
|
|
69
|
-
`BasaltVirtualList` above a few hundred rows only.
|
|
70
|
-
|
|
71
|
-
## `./content` — prose, markdown, MDX
|
|
72
|
-
|
|
73
|
-
`Prose`/`Markdown`/`mdxComponents` share one typography layer. `streaming` is a rendering mode, not
|
|
74
|
-
a trust claim — any surface rendering agent/model output pins `contentTrust="untrusted"`. Every
|
|
75
|
-
optional peer degrades gracefully except the sanitizer, which is always on.
|
|
76
|
-
|
|
77
|
-
## `./agent` + `./agent-chat` — streaming chat
|
|
78
|
-
|
|
79
|
-
`./agent` is headless/Mantine-free; `./agent-chat` is the chrome. Every `AgentPart` switch ends
|
|
80
|
-
`default: return assertNever(part)`. `useAgentStream` runs one turn, `useAgentThreadRuns` runs N by
|
|
81
|
-
thread id. Stream resumption reconnects a MOUNT (page reload mid-stream), it never continues a
|
|
82
|
-
click — `retry()`/`regenerate()` always start a fresh stream from the cached input.
|
|
83
|
-
|
|
84
|
-
**Why the three lint guards exist** (a consumer's build fails on one of these; all honour
|
|
85
|
-
`basalt-agent-allow`, never `theme-allow`): `basalt/agent-resume-guard` — an unguarded
|
|
86
|
-
`resumeStream()`/`useChat({ resume: true })` re-fires under StrictMode with no dedup, use
|
|
87
|
-
`useAgentThreadRuns` instead. `basalt/agent-no-raw-usechat` — bypassing the basalt hooks loses the
|
|
88
|
-
unmount-abort and supersede guards. `basalt/ai-sdk-major` (+ `doctor`'s `ai-major-parity`) — a v5
|
|
89
|
-
stream parsed by a v7 reader throws; nothing else pins the `ai` major across packages.
|
|
90
|
-
|
|
91
|
-
## App bootstrapping — `./vite`, CSS order, `init`
|
|
92
|
-
|
|
93
|
-
`basaltViteConfig` is config-only; spread `basaltAppPlugin` into your own `plugins`. CSS layer
|
|
94
|
-
order is load-bearing: every `@mantine/*/styles.layer.css` first, then `basalt-ui/styles.css` — an
|
|
95
|
-
unlayered Mantine import outranks `@layer basalt` regardless of specificity. `init` on an existing
|
|
96
|
-
app is a lint-debt event, not a no-op — triage the new findings, don't blanket-disable a plugin.
|
|
97
|
-
Run `doctor` after and read it to the last line (`SKIPPED` exits non-zero on its own).
|
|
39
|
+
- Chat uses `basalt-ui/agent` (`useAgentThreadRuns`, `ThreadFeed`, `Composer`); never `useChat` or `Chat` from `@ai-sdk/react`. [basalt/agent-no-raw-usechat]
|
|
40
|
+
- Keep `ai` and `@ai-sdk/*` on one major across packages. [basalt/ai-sdk-major]
|
|
41
|
+
- End every switch over `AgentPart` with `default: return part satisfies never`. [type AgentPart]
|
|
42
|
+
- An intentional `ai` major split is waived with `basalt-agent-allow`, never `theme-allow`. [basalt/ai-sdk-major]
|
|
@@ -1,111 +1,37 @@
|
|
|
1
1
|
---
|
|
2
2
|
source: basalt-ui
|
|
3
|
-
description:
|
|
3
|
+
description: Charts on TanStack Charts — compose CartesianChart or a shipped kind, never the engine host.
|
|
4
4
|
paths:
|
|
5
5
|
- '**/charts/**'
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
<!-- basalt:coverage -->
|
|
9
9
|
<!-- GENERATED from src/surfaces.ts — `bun scripts/check-coverage.ts --write`. Do not hand-edit. -->
|
|
10
|
-
<!-- backed by: guard kinds —
|
|
10
|
+
<!-- backed by: guard kinds — raw-color-fn, raw-hex · oxlint rules — basalt/chart-engine-boundary, basalt/chart-in-raw-surface -->
|
|
11
11
|
<!-- not guarded: — -->
|
|
12
12
|
<!-- /basalt:coverage -->
|
|
13
13
|
|
|
14
|
-
# Basalt Charts
|
|
14
|
+
# Basalt Charts
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
shared assembly every chart drifts from every other one. **This file is the contract; the API is not
|
|
18
|
-
here** — read the shipped types and JSDoc, and `llms.txt` at the install directory, for props.
|
|
16
|
+
Every cartesian chart is `CartesianChart` or a kind built on it; props are in the shipped types.
|
|
19
17
|
|
|
20
|
-
##
|
|
18
|
+
## Composition
|
|
21
19
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
- Use a shipped kind (`Lines`, `Bars`, `Sparkline`, …) when one fits; otherwise compose `CartesianChart` with `marks`. [type CartesianChart]
|
|
21
|
+
- `ariaLabel` is required on every chart. [type CartesianChartProps]
|
|
22
|
+
- `marks(plot)` returns engine marks and nothing else; margins, scales, axes, grid, cursor, legend and tooltip are the host's. [type ChartMarks]
|
|
23
|
+
- Supply `series` once; legend entries and tooltip rows derive from it. [type ChartSeries]
|
|
24
|
+
- Draw `plot.rows(key)` and `plot.visible`, never the `series` prop, so a legend toggle hides the mark. [type PlotContext]
|
|
25
|
+
- A second axis is `y2` with a series `axis: 'right'`; there is no margin prop. [type CartesianChartProps]
|
|
26
|
+
- Size is `height` (a number or per container class); the host measures the width. [type ResponsiveChartHeight]
|
|
27
|
+
- A pending, failed or empty query is `state={{ pending, error, empty }}`, never `data ?? []`; a streamed chart's `<Suspense>` fallback is the same chart with `state={{ pending: true }}`, which fills the final box. [type ChartState]
|
|
28
|
+
- Zones, thresholds and reference lines are `zones`, `xZones` and `refLines` data. [type ZoneSpec]
|
|
29
|
+
- Extra tooltip rows are `tooltip.rows` data, never markup. [type ChartTooltipConfig]
|
|
30
|
+
- Charts share one cursor by default; `cursorGroup` isolates one, `chartCursor(group?)` reads it. [type chartCursor]
|
|
27
31
|
|
|
28
|
-
|
|
29
|
-
enforces this per NODE, waived one node at a time with `theme-allow hand-rolled-plot — <why>`.
|
|
32
|
+
## Boundaries
|
|
30
33
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
`
|
|
35
|
-
`Donut`/`Heatmap` render no assembly primitive, so nothing fires. A bespoke non-single-plot shape
|
|
36
|
-
declares itself the same way. `CartesianChart`'s own defining module is exempt definitionally.
|
|
37
|
-
|
|
38
|
-
**A documented limit:** the rule keys on visx primitives, so a DOM- or hand-`<svg>`-drawn chart is
|
|
39
|
-
structurally invisible to it. Compose the primitive because it's the contract, not because lint
|
|
40
|
-
catches you.
|
|
41
|
-
|
|
42
|
-
## `series` is the single source of truth
|
|
43
|
-
|
|
44
|
-
Legend entries and tooltip rows are **DERIVED** from `series` (`deriveLegend` / `deriveTooltipRows`,
|
|
45
|
-
or just let `ChartFrame`/`CartesianChart` do it), so a chart cannot show a row or a key it does not
|
|
46
|
-
draw. A hand-written array literal passed to `ChartLegend`'s `items` — or a `.map()` over some OTHER
|
|
47
|
-
array, because deriving from AN array is not deriving from THE series — is
|
|
48
|
-
`basalt/chart-legend-literal`.
|
|
49
|
-
|
|
50
|
-
**Corollary for mark renderers: draw `ctx.visible`, never the `series` prop.** `visible` is `series`
|
|
51
|
-
minus whatever the legend has toggled off, and the legend toggles by default at two or more entries
|
|
52
|
-
— hiding a series drops it from the plot, the tooltip AND the auto y-domain together. Drawing
|
|
53
|
-
`series` repaints the mark the reader just hid.
|
|
54
|
-
|
|
55
|
-
## Boundaries (three independent rules, no escape hatch)
|
|
56
|
-
|
|
57
|
-
- **`@visx/*` only inside a `charts/` path segment** (`basalt/visx-boundary`, shipped AND
|
|
58
|
-
repo-local) — import a raw visx primitive from `basalt-ui/charts`'s curated re-export instead.
|
|
59
|
-
- **`@visx/tooltip` is banned everywhere**, charts included (`basalt/visx-tooltip`) — use
|
|
60
|
-
`ChartTooltipFloat` + `TooltipHeader`/`TooltipRow`/`TooltipBody`. A plain `<div>` inside an
|
|
61
|
-
`<svg>` mounts in the SVG namespace, typechecks, lints, and never paints.
|
|
62
|
-
- **basalt's own `charts/`+`tokens/` import zero `@mantine/*`** (`basalt/token-layer-boundary`,
|
|
63
|
-
repo-local — a framework invariant, not an obligation on your app's own `charts/`-named dir). It
|
|
64
|
-
keeps the token layer upstream of Mantine and lets both subpaths resolve with no Mantine
|
|
65
|
-
installed.
|
|
66
|
-
- Mantine layout primitives are unreachable in a chart file, so `inline-display`/`raw-html-layout`
|
|
67
|
-
deliberately don't fire there — raw `<div>` is fine, `VX.*` tokens still mandatory
|
|
68
|
-
(`ChartCenter` to center).
|
|
69
|
-
- **Maps are not charts** — no map library is `@visx/*`, basalt ships no map kind; build one where
|
|
70
|
-
the rest of the app's non-chart UI lives, styled with `--vx-*`.
|
|
71
|
-
|
|
72
|
-
## Color, scheme and margins
|
|
73
|
-
|
|
74
|
-
- **Never a raw hex in a chart file**, never `localStorage.getItem('theme')`. Theme reactivity is
|
|
75
|
-
**pure CSS**: `--vx-*` redeclares per scheme, so toggling restyles every chart with no React
|
|
76
|
-
re-render.
|
|
77
|
-
- **Series color is consumer domain data** — one guard-exempt file per app, `defineSeries` →
|
|
78
|
-
`seriesTokens`/`groupTokens` → `buildPaletteCss` (basalt-tokens.md), each entry a `{light,dark}`
|
|
79
|
-
pair.
|
|
80
|
-
- **Margins are MEASURED, not hand-picked** — every axis's tick labels run through
|
|
81
|
-
`autoMargin`/`measureText` before layout, so `VX.margin` is a floor. Passing `y2` is what makes a
|
|
82
|
-
chart dual-axis; `margin={{ side: n }}` overrides last. Derive constants from `VX.margin` rather
|
|
83
|
-
than copying a number into three files.
|
|
84
|
-
- **Never fake an empty dataset for a pending query** — `data ?? []` collapses "not asked yet" into
|
|
85
|
-
"measured and absent". Pass `isPending`; every kind forwards it to one pending renderer.
|
|
86
|
-
- **`ChartFrame`'s container is `role="group"`, never `role="img"`** — every descendant of a
|
|
87
|
-
`role="img"` element is presentational, which would erase the hover overlay's `role="slider"`
|
|
88
|
-
from the accessibility tree silently (jsdom doesn't implement the pruning, so no test catches it).
|
|
89
|
-
|
|
90
|
-
## Adding a chart
|
|
91
|
-
|
|
92
|
-
1. **Fits a shipped kind?** Use it — declarative props (`data`, `chartId`, `getX`, `series`, one
|
|
93
|
-
`AxisConfig` per axis, zones/thresholds/refLines as plain arrays).
|
|
94
|
-
2. **Second instance of a shape with no kind?** Extract a kind (Rule of Three), migrating both call
|
|
95
|
-
sites; prove it by porting real call sites, ship the "still cannot express" list with it.
|
|
96
|
-
3. **Genuinely unique?** Stay bespoke, composing `CartesianChart`/`ChartFrame` directly in the
|
|
97
|
-
page's chart file, not in a shared kinds directory.
|
|
98
|
-
|
|
99
|
-
Sparklines are the one exemption (no legend, no tooltip, no `CartesianChart`) — still `VX.*` only.
|
|
100
|
-
**Anti-pattern:** a single `<Chart type="…" config={…} />` switching by kind — add a kind, don't
|
|
101
|
-
loosen the primitives.
|
|
102
|
-
|
|
103
|
-
## The x axis is categorical, and the API does not say so
|
|
104
|
-
|
|
105
|
-
`CartesianChart` builds x as a point scale over domain KEYS — N evenly spaced positions whatever
|
|
106
|
-
the values behind them. Wrong for an event-shaped series: a shared crosshair marks the wrong screen
|
|
107
|
-
x against a regularly-sampled sibling, and two events at the same instant collapse onto one
|
|
108
|
-
position. `getX` returning a date string reads like a time axis and is not one.
|
|
109
|
-
|
|
110
|
-
The cursor is **shared page-wide by default**, resolved domain-aware (nearest parsed date/number
|
|
111
|
-
within a chart's own step). `ChartCursorScope` ISOLATES a subtree — opts out of sharing, never in.
|
|
34
|
+
- `@visx/*` is banned. [basalt/chart-engine-boundary]
|
|
35
|
+
- Import engine marks only from `@tanstack/charts/{line,area,area-x,bar,rect,rule,dot,tick,text,vector,link,arrow,difference,stack,scales/*,transform/*,mark/decorative,d3/shape,types}`; the bare root and `@tanstack/charts/react` are errors. [basalt/chart-engine-boundary]
|
|
36
|
+
- Wrap a chart kind in `ChartCard`, never a raw `Card` or `Paper`. [basalt/chart-in-raw-surface]
|
|
37
|
+
- Series colors are `{ light, dark }` pairs from the app's series file (`defineSeries`); write no hex or `rgba()` in a chart file. [check-theme raw-hex] [check-theme raw-color-fn]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
source: basalt-ui
|
|
3
|
-
description: Where an interactive control
|
|
3
|
+
description: Where an interactive control lives and how it binds — homes, slots, store-bound filters and tabs, aside, sidebar blocks.
|
|
4
4
|
paths:
|
|
5
5
|
- 'src/**'
|
|
6
6
|
- 'apps/**/src/**'
|
|
@@ -15,140 +15,32 @@ paths:
|
|
|
15
15
|
<!-- not guarded: C12 — one shape for refresh/sync (SyncButton); only the alias table sees a renamed copy -->
|
|
16
16
|
<!-- /basalt:coverage -->
|
|
17
17
|
|
|
18
|
-
# Basalt Controls
|
|
18
|
+
# Basalt Controls
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
size tier and one persistence binding, and basalt owns all three. The API is in the shipped types and
|
|
22
|
-
`llms.txt`; this file is the law. Long form: `docs/CONTROLS-SPEC.md` in the basalt-ui repo.
|
|
20
|
+
A control has one home and takes its state from a store field; the home sets its size.
|
|
23
21
|
|
|
24
|
-
##
|
|
22
|
+
## Homes
|
|
25
23
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
| C8 | Every section, card or table title is a `WidgetHeader`; the page title is the breadcrumb (or `PageBar.title` with no shell). An in-body h1/h2 is an error. |
|
|
36
|
-
| C9 | A responsive swap belongs to the control — rendering the same control twice under `visibleFrom`/`hiddenFrom` is an error. |
|
|
37
|
-
| C10 | A nav link carrying a store field passes `store.linkSearch` by reference; a `search:` literal in a nav definition, or a literal `useSearch({ from })`, is an error. |
|
|
38
|
-
| C11 | Every table or list inside a section states its count in its header. |
|
|
39
|
-
| C12 | Refresh/sync has ONE shape, `SyncButton`, whose `scope` picks the home (`global` → the shell header, `page` → `PageBar.sync`). |
|
|
40
|
-
| C13 | Sidebar blocks are declared data (`SidebarBlock[]`), never `ReactNode` slots, so rail and More-sheet projection stay basalt's. |
|
|
41
|
-
| C14 | An empty home renders nothing, so no route pays for a reserved row. |
|
|
42
|
-
| C15 | Every touch target inside a home clears `--vx-hit` (44px under a coarse pointer). The mobile `Filters (n)` sheet draws no row of its own — it renders the same `PanelRow` the aside's panel surface does. |
|
|
43
|
-
| C16 | A new guard lands `warn` with a dated `promote` version, and the build fails once the package version reaches it while the rule is still `warn`. |
|
|
24
|
+
- A control lives in exactly one home: a `PageBar` slot (`actions`, `sync`, `filters`, `filtersEnd`, `tabs`), a `Section` slot (`actions`, `tabs`), a `WidgetHeader`/`ChartCard`/`StatCard`/`BasaltDataTable` `actions` slot, or a form row (`SettingsRow.control`, `FormRow`, `FormGroup`). [basalt/control-outside-home]
|
|
25
|
+
- A raw Mantine selection control (`Select`, `SegmentedControl`, …) in a home slot is a filter without a `field`. [basalt/hand-rolled-filter] [check-theme raw-selection-control]
|
|
26
|
+
- A basalt filter outside a slot, `FilterSet`, `PageAside` or form row has no home. [basalt/bound-control-outside-home]
|
|
27
|
+
- `PageBar` `actions` holds at most 5 entries with exactly one `primary`. [type PageBar]
|
|
28
|
+
- A `Section` holds at most 3 `actions`. [type Section]
|
|
29
|
+
- A control in a home slot carries no `size`, `w`, `fullWidth`, `visibleFrom` or `hiddenFrom`; the home sizes it. [basalt/control-size-literal]
|
|
30
|
+
- Never render the same control twice under `visibleFrom`/`hiddenFrom`; the control swaps itself in CSS. [basalt/responsive-twin]
|
|
31
|
+
- A section, card or table title is a `WidgetHeader`; no in-body `<Title order={1|2}>`. [basalt/in-body-page-title]
|
|
32
|
+
- An overlay rendered by the parent lives in a file named `*-{modal,drawer,popover,panel,form}.tsx`, or opts out with `theme-allow-file control-outside-home — overlay`. [basalt/control-outside-home]
|
|
44
33
|
|
|
45
|
-
|
|
34
|
+
## Binding
|
|
46
35
|
|
|
47
|
-
|
|
36
|
+
- A filter or tab takes `field={store.field.x}` and nothing else about state; `value`, `onChange` and `size` are type errors. [type ViewTabs]
|
|
37
|
+
- Filters are `RangeFilter`, `MultiSelectFilter`, `SelectFilter`, `SearchFilter`, `NumberFilter`, `ToggleFilter`, inside one `FilterSet` in `PageBar.filters`; `ViewTabs` goes in `PageBar.tabs`. [type FilterSet]
|
|
38
|
+
- `FilterSet` folds overflow and the mobile `Filters (n)` sheet itself; never build either. [type FilterSet]
|
|
39
|
+
- Import `DateRangePicker` from `basalt-ui/controls-dates` and pass it as `RangeFilter` `customPicker`; never import `@mantine/dates` in a shared module. [type RangeFilter]
|
|
40
|
+
- Refresh is `SyncButton`: `scope="page"` in `PageBar.sync`, `scope="global"` in the shell's `globalActions`. [type SyncButton]
|
|
41
|
+
- Actions are typed data (`BarAction[]`), never children. [type BarAction]
|
|
48
42
|
|
|
49
|
-
|
|
50
|
-
| --------------------------------------------------------------------------------- | -------------------------------------------------- | ------------ | ------------------------------------------ |
|
|
51
|
-
| `PageBar` | `actions`, `sync`, `filters`, `filtersEnd`, `tabs` | `ctl` | the page's filters, tabs, actions, refresh |
|
|
52
|
-
| `Section` | `actions`, `tabs` | `ctl` | that section's own controls and its count |
|
|
53
|
-
| `WidgetHeader` / `ChartCard` / `StatCard` / `BasaltDataTable` / `SettingsSection` | `actions` | `ctl` | that widget's own controls and its count |
|
|
54
|
-
| `SettingsRow` · `FormRow` / `FormGroup` (`basalt-ui/controls`) | `control` · children | Mantine `md` | ONE form field, or a labelled cluster |
|
|
43
|
+
## Aside and sidebar
|
|
55
44
|
|
|
56
|
-
-
|
|
57
|
-
|
|
58
|
-
- **The form row keeps Mantine's own `md` tier** — a raw `Select` in `SettingsRow.control` is the
|
|
59
|
-
right answer, `size` there is load-bearing. Neither `SettingsRow` nor `FormRow`/`FormGroup` is a
|
|
60
|
-
tiered slot; no filter or size rule applies to them.
|
|
61
|
-
- **A control's home is a decision about reach**: affects more than one widget → promote to the
|
|
62
|
-
page bar; formats one widget → stays in that widget's header.
|
|
63
|
-
- **An overlay rendered by the PARENT is exempt by FILENAME** — `*-{modal,drawer,popover,panel,form}.tsx`.
|
|
64
|
-
Outside that: `theme-allow-file control-outside-home — overlay`.
|
|
65
|
-
|
|
66
|
-
## The `ctl` tier — the home sizes the control
|
|
67
|
-
|
|
68
|
-
| Anchor | Mantine size | Where |
|
|
69
|
-
| --------------------- | ---------------------------------------------------------- | --------------------------------------------------- |
|
|
70
|
-
| `controlHeightTag` | count-tag `Badge` | inline chip, table cell |
|
|
71
|
-
| `controlHeightWidget` | `--ai-size-icon` (explicit `size="icon"`, ActionIcon only) | sidebar search actions — no home defaults to it |
|
|
72
|
-
| `controlHeightCtl` | `size="ctl"` | `PageBar`, `Section`, table toolbar, sidebar blocks |
|
|
73
|
-
| `--vx-hit` | hit area, 44px under `(pointer: coarse)` | every home |
|
|
74
|
-
| `controlHeight` | `size="md"` | forms — unchanged |
|
|
75
|
-
|
|
76
|
-
A home sizes its **slot**, never its body: a raw `Button` in `PageBar.actions` is already the right
|
|
77
|
-
height with no prop, and a `size="xs"` typed there is law C5 (`basalt/control-size-literal`).
|
|
78
|
-
Mantine's own `sm`/`xs` are NOT re-pointed. Exception: `ChartCard.actions` is Mantine-free, so it
|
|
79
|
-
carries only the tier attribute and its controls size themselves.
|
|
80
|
-
|
|
81
|
-
## Binding a control to a store
|
|
82
|
-
|
|
83
|
-
```tsx
|
|
84
|
-
import { FilterSet, RangeFilter, MultiSelectFilter, ViewTabs } from 'basalt-ui/controls'
|
|
85
|
-
import { DateRangePicker } from 'basalt-ui/controls-dates'
|
|
86
|
-
;<PageBar
|
|
87
|
-
tabs={<ViewTabs field={analytics.field.tab} />}
|
|
88
|
-
filters={
|
|
89
|
-
<FilterSet>
|
|
90
|
-
<RangeFilter field={analytics.field.range} customPicker={DateRangePicker} />
|
|
91
|
-
<MultiSelectFilter field={analytics.field.channels} label="All channels" noun="channels" />
|
|
92
|
-
</FilterSet>
|
|
93
|
-
}
|
|
94
|
-
/>
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
The store, its fields and their lanes are basalt-state.md. What this file adds: **the control takes
|
|
98
|
-
`field` and nothing else about state** — no `value`, no `onChange`, no `size`, so a wrong call site
|
|
99
|
-
is a tsc error. `ActionGroup`/`OverflowMenu`/`SyncButton` take typed action DATA, never children.
|
|
100
|
-
|
|
101
|
-
**The date picker is injected, never imported.** `basalt-ui/controls` resolves with no
|
|
102
|
-
`@mantine/dates`; `DateRangePicker` comes from `basalt-ui/controls-dates` through
|
|
103
|
-
`RangeFilter.customPicker`. Never import it in a shared module or reach for `DatePickerInput`.
|
|
104
|
-
|
|
105
|
-
## `FilterSet` owns the responsive story
|
|
106
|
-
|
|
107
|
-
Do not build one at the call site. Above `sm` it measures its own children and folds the tail into
|
|
108
|
-
a `+N` pill. Below `sm` the first `inline` children stay pills and one `Filters (n)` pill opens a
|
|
109
|
-
sheet where every child is full-width and answers one `Reset all`. **`n` and `Reset all` are
|
|
110
|
-
DERIVED** from whether each field differs from its fallback — a filter is one JSX line, no handler.
|
|
111
|
-
|
|
112
|
-
| Below `sm` | What basalt does |
|
|
113
|
-
| --------------- | ------------------------------------------------------------------------------------------------------------------------------ |
|
|
114
|
-
| `PageBar` row 1 | breadcrumb · the `primary` action as an icon · ONE kebab holding every `more` action |
|
|
115
|
-
| `PageBar` row 2 | line 1: `ViewTabs` full-width (a `Select` past three options) · line 2: one inline pill · `Filters (n)` · the aside's own pill |
|
|
116
|
-
|
|
117
|
-
Every swap is CSS inside the control (one mount), never a JS media query. Two mounts under
|
|
118
|
-
`visibleFrom`/`hiddenFrom` is `basalt/responsive-twin`.
|
|
119
|
-
|
|
120
|
-
## The aside
|
|
121
|
-
|
|
122
|
-
`PageAside` is a shell REGION, not a fourth home — C1 still names three, and its body IS one:
|
|
123
|
-
children scope to the `panel` surface, so a `SelectFilter` renders its ROW form there, not a pill.
|
|
124
|
-
|
|
125
|
-
```tsx
|
|
126
|
-
<PageAside title="Composition" persistKey="composition">
|
|
127
|
-
<PanelRow label="Weight">…</PanelRow>
|
|
128
|
-
</PageAside>
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
| In a `PageAside` | What it is |
|
|
132
|
-
| ---------------- | --------------------------------------------------------------------------------- |
|
|
133
|
-
| `title` | REQUIRED — the header text AND the region's accessible name; omitted, it THROWS |
|
|
134
|
-
| `persistKey` | persists the fold at `basalt:aside:<persistKey>`; omitted the fold is per-mount |
|
|
135
|
-
| `defaultFolded` | the fold on first render, honoured only while nothing is persisted |
|
|
136
|
-
| `classNames` | the three boxes it paints — `root` / `header` / `body` |
|
|
137
|
-
| an inspector row | `PanelRow` — label above, optional `hint`, mono `readout`, `end` slot |
|
|
138
|
-
| a bound slider | `SliderControl` — min/max/step come off the handle, never props |
|
|
139
|
-
| a facet list | `MultiSelectFilter` + `counts` (and `max`, past which the tail folds) |
|
|
140
|
-
| a group of rows | `Section` — flush inside the aside, which draws the rhythm itself |
|
|
141
|
-
| a choice | `PanelChoice` — a track only while ≤3 options AND every label fits, else `Select` |
|
|
142
|
-
|
|
143
|
-
- ONE per page, written AFTER the main content — tree position is reading order, not layout.
|
|
144
|
-
- Below `sm` it projects into `PageBar` row 2 as one pill carrying its own `title`, and that row
|
|
145
|
-
exists ONLY when the bar has `tabs`, `filters` or filter-end actions — without one, or with no
|
|
146
|
-
shell, it renders in flow at the BOTTOM of the page. One node either way (C9).
|
|
147
|
-
- A bound control outside all of this is `basalt/bound-control-outside-home` — a slot prop, a
|
|
148
|
-
`FilterSet`, a `PageAside` or a `PanelRow` is a home; nothing else is.
|
|
149
|
-
|
|
150
|
-
## Sidebar blocks
|
|
151
|
-
|
|
152
|
-
A non-destination list, a progress meter or a bespoke node in the sidebar is a `SidebarBlock` —
|
|
153
|
-
declared data, three kinds (`list`/`progress`/`custom`), placed `'nav'`/`'bottom'`; the rail and
|
|
154
|
-
More-sheet projections are basalt's from there (C13). A `custom` block is desktop-only, by design.
|
|
45
|
+
- `PageAside` is the shell's right region; it takes a required `title`. [type PageAside]
|
|
46
|
+
- A sidebar list, progress meter or custom node is a `SidebarBlock` in `BasaltShell sidebarBlocks`, never a `ReactNode`. [type SidebarBlock]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
source: basalt-ui
|
|
3
|
-
description: Mantine v9
|
|
3
|
+
description: Mantine v9 in a basalt-ui app — provider, shell, surfaces, scroll, breakpoints, motion.
|
|
4
4
|
paths:
|
|
5
5
|
- 'src/**'
|
|
6
6
|
- 'apps/**/src/**'
|
|
@@ -8,115 +8,42 @@ paths:
|
|
|
8
8
|
|
|
9
9
|
<!-- basalt:coverage -->
|
|
10
10
|
<!-- GENERATED from src/surfaces.ts — `bun scripts/check-coverage.ts --write`. Do not hand-edit. -->
|
|
11
|
-
<!-- backed by: guard kinds — card-with-border, hidden-inline-style, in-body-page-title, inline-display, inline-spacing, mantine-shade-index, raw-form-control, raw-html-layout, raw-media-query, raw-motion-value, raw-spacing, sub-16-input-font · oxlint rules — basalt/card-inset, basalt/
|
|
11
|
+
<!-- backed by: guard kinds — card-with-border, hidden-inline-style, in-body-page-title, inline-display, inline-spacing, mantine-shade-index, raw-form-control, raw-html-layout, raw-media-query, raw-motion-value, raw-spacing, sub-16-input-font · oxlint rules — basalt/card-inset, basalt/hand-rolled-shell, basalt/in-body-page-title, basalt/raw-breakpoint, basalt/raw-scroll-container, basalt/route-view-transition, basalt/shadow-basalt-export -->
|
|
12
12
|
<!-- not guarded: no second cssVariablesResolver — don't hand-build createTheme or re-add the resolver basalt already installs -->
|
|
13
13
|
<!-- /basalt:coverage -->
|
|
14
14
|
|
|
15
|
-
# Basalt Mantine
|
|
15
|
+
# Basalt Mantine
|
|
16
16
|
|
|
17
|
-
`
|
|
18
|
-
the part the framework cannot enforce in code. The identity itself and every color/spacing/type law
|
|
19
|
-
live in basalt-tokens.md — not restated here.
|
|
17
|
+
`BasaltProvider` and `BasaltShell` mount the whole app; compose them, never their parts.
|
|
20
18
|
|
|
21
|
-
## Provider
|
|
19
|
+
## Provider
|
|
22
20
|
|
|
23
|
-
Mount `BasaltProvider
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
canonical composition — `BasaltProvider > QueryClientProvider > BasaltOverlays > RouterProvider`,
|
|
27
|
-
and why that order is load-bearing — is the README's "Composition order" section; don't restate the
|
|
28
|
-
tree here. No `'use client'` directive ships in the package; a Next.js App Router consumer wraps
|
|
29
|
-
the composition in its own client file.
|
|
21
|
+
- Mount once: `createBasaltRouter({ routeTree })`, then `<BasaltProvider router={router} />`. It owns Mantine, Query, modals, notifications, Spotlight and the router. [type BasaltProvider]
|
|
22
|
+
- Never pass `cssVariablesResolver` to `BasaltProvider`; retune with `theme={createBasaltTheme(...)}`. [type BasaltProvider]
|
|
23
|
+
- Read and write the color scheme with `useMantineColorScheme()` only. [check-theme localstorage-theme]
|
|
30
24
|
|
|
31
|
-
|
|
32
|
-
`BasaltProvider`: it composes `ModalsProvider`, Spotlight (against basalt's own store), the command
|
|
33
|
-
hotkeys and `<Notifications>` in one place, each disableable with `false`. `ModalsProvider` mounts
|
|
34
|
-
as a **sibling** of `children`, not a wrapper — the imperative `modals.*`/`overlays.*` API works
|
|
35
|
-
untouched, but `useModals()`/`openContextModal` need real React context, which a sibling cannot
|
|
36
|
-
provide: pass `modals={false}` and mount your own `ModalsProvider` when you need either.
|
|
37
|
-
`<BasaltOverlays notifications />` is the ONE notifications mount; there is no standalone
|
|
38
|
-
component any more. Import the **layered** style bundle for every `@mantine/*` battery, then
|
|
39
|
-
`basalt-ui/styles.css` last.
|
|
25
|
+
## Shell
|
|
40
26
|
|
|
41
|
-
|
|
42
|
-
|
|
27
|
+
- One `BasaltShell nav={NAV}` in `__root.tsx` wraps `<Outlet />`; never build `AppShell.*` parts or a `Burger`, and never wrap `<Outlet />` in `<ViewTransition>` (the router animates route changes in nav order). [basalt/hand-rolled-shell] [basalt/route-view-transition]
|
|
28
|
+
- Shell extensions are typed data props (`globalActions`, `sidebarBlocks`, `brand`, `search`, `settingsMenuItems`, `account`), never `ReactNode` slots. [type BasaltShell]
|
|
29
|
+
- Pass no `renderNavLink`, `renderBreadcrumbLink` or `withBorder`; the shell resolves links against the router and draws region edges. [type BasaltShell]
|
|
30
|
+
- A page is named once, by its nav item's `label` (the breadcrumb), `PageBar.title` (no shell) or `PageTitle` (shell-less screen); no in-body `<Title order={1|2}>`. [basalt/in-body-page-title] [check-theme in-body-page-title]
|
|
31
|
+
- A nav item's mobile placement is its `mobile` field: `'tab'`, `'more'` or `'hidden'`. [type defineNav]
|
|
43
32
|
|
|
44
|
-
##
|
|
33
|
+
## Surfaces
|
|
45
34
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
35
|
+
- Never pass `withBorder` to `Card` or `Paper`; the theme draws the ring (`<Card.Section withBorder>` is fine). [check-theme card-with-border]
|
|
36
|
+
- Card/Paper insets are `py="xs" px="sm"` with the theme radius; no explicit `p`, `padding` or `radius`. [basalt/card-inset]
|
|
37
|
+
- Lay out with `Box`/`Flex`/`Grid`/`Stack`/`Group`, not a `<div>` with `style`. [check-theme raw-html-layout] [check-theme hidden-inline-style]
|
|
38
|
+
- No inline `display: flex|grid`; no inline spacing; spacing props take `xs..xl`. [check-theme inline-display] [check-theme inline-spacing] [check-theme raw-spacing]
|
|
39
|
+
- Inputs come from `@mantine/core`, never `<input>`, `<select>` or `<textarea>`. [check-theme raw-form-control]
|
|
40
|
+
- Never set a form control's font size below 16. [check-theme sub-16-input-font]
|
|
50
41
|
|
|
51
|
-
|
|
42
|
+
## Scroll and breakpoints
|
|
52
43
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
| `sections` | `SidebarSection[]` | the desktop sidebar AND the mobile bar (`projectMobileNav`) — one definition |
|
|
56
|
-
| `globalActions` | `GlobalAction[]` | header placement; the first two ride the mobile bar, the rest fold into ONE kebab |
|
|
57
|
-
| `sidebarBlocks` | `SidebarBlock[]` | rail projection (dot / ring), fold persistence, one More-sheet row per block (law C13) |
|
|
58
|
-
| `brand` | `BrandConfig & { menu? }` | a `Name ▾` workspace switcher when `menu` is present |
|
|
59
|
-
| `search` | `SidebarSearchConfig & { actions? }` | the ⌘K row plus one or two icon buttons (a tuple by type) |
|
|
60
|
-
| `settingsMenuItems` | `SettingsMenuItem[]` | flat footer rows at three or fewer, one gear menu above that |
|
|
61
|
-
| `account` | `BasaltAccountProps` | the footer row, below the settings menu |
|
|
44
|
+
- A scroll region is a Mantine `ScrollArea`, not a raw `overflow: auto` box. [basalt/raw-scroll-container]
|
|
45
|
+
- Never use `visibleFrom`/`hiddenFrom` or a raw `@media` width; chrome follows `useSizeClass()`, page layout follows container queries: `<SimpleGrid type="container" cols={{ base: 1, [CONTAINER_KEYS.regular]: 2 }} />` (`CONTAINER_KEYS` from `basalt-ui/tokens`), never `cols={{ base: 1, lg: 2 }}`. [basalt/raw-breakpoint] [check-theme raw-media-query]
|
|
62
46
|
|
|
63
|
-
|
|
64
|
-
is the consumer's `<Link>`; absent, the row falls back to `<a href>` + `onClick`. The
|
|
65
|
-
breadcrumb's equivalent is `parentAnchor`. No `renderNavLink`/`renderBreadcrumbLink` surface.
|
|
66
|
-
- **`AppBreadcrumbs` is prop-driven** (`section`/`parent`/`parentAnchor`/`parentHref`/`page`),
|
|
67
|
-
renders `null` without `page`; `useRouterBreadcrumbs` (basalt-state.md) sources a custom trail.
|
|
68
|
-
- **Collapse persists through `createPersistedState`**, keyed `basalt:<storageKey>` — read with
|
|
69
|
-
`readPersistedValue`, never a bare `localStorage.getItem`.
|
|
70
|
-
- **The account row is presentational, provider-agnostic** — no `./auth`. Authenticated leads with
|
|
71
|
-
initials from `identity.name` (never an avatar image); unauthenticated falls back to a glyph.
|
|
47
|
+
## Motion
|
|
72
48
|
|
|
73
|
-
|
|
74
|
-
dismiss, no full-height drawer. `projectMobileNav` is a PURE projection inferring the surface from
|
|
75
|
-
row count (0 drops the slot, 1 is a plain link, up to `menuMax` is a menu, more is a sheet).
|
|
76
|
-
`SidebarItem.mobile` (`'tab'`/`'more'`/`'hidden'`) is the per-destination placement. The active
|
|
77
|
-
indicator is a **neutral** ink tint behind the icon only (never the identity blue); the bar carries
|
|
78
|
-
**no** `env(safe-area-inset-bottom)` (Mantine's `AppShell.Footer` already grows the box). Region
|
|
79
|
-
edges come from `BasaltShell` itself (`--app-shell-border-color` → `--vx-divider`) — never draw a
|
|
80
|
-
border or pass `withBorder` to a shell region yourself.
|
|
81
|
-
|
|
82
|
-
## Surfaces, depth and shape
|
|
83
|
-
|
|
84
|
-
Depth-tier law (which token for which surface, why static, why the ring is inset) is
|
|
85
|
-
`docs/DESIGN-CORE.md` § Layout, elevation, shapes — not restated here. Mantine-specific facts only:
|
|
86
|
-
|
|
87
|
-
- **Never pass `withBorder` to a `Card`/`Paper`** — the theme pins bg/shadow/radius but does not
|
|
88
|
-
clear `border`, so `withBorder` draws a second real edge (`card-with-border` guard kind).
|
|
89
|
-
`<Card.Section withBorder>` is a section divider and fine.
|
|
90
|
-
- **The ring lands on the box carrying the surface's `border-radius`** — `ChartCard` puts the
|
|
91
|
-
shadow on a box with no background (an inner box paints the fill; `overflow: hidden` on the
|
|
92
|
-
shadowed box would clip the shadow otherwise).
|
|
93
|
-
- **Use Mantine primitives, not raw HTML** — `Box`/`Flex`/`Grid`/`Stack`/`Group`/`Paper`/`Card`
|
|
94
|
-
over a `<div>` with an inline style; a CSS module reading `var(--vx-*)` is the sanctioned second
|
|
95
|
-
fix in row code. Only Mantine-free `src/charts/**` uses raw `<div>` freely.
|
|
96
|
-
- **Inputs come from `@mantine/core`**, never a native `<select>` — the form tier's font size
|
|
97
|
-
clears the iOS zoom threshold via an `!important` floor (`sub-16-input-font` flags a smaller one).
|
|
98
|
-
- **Charts measure themselves** — pass `height`/`aspectRatio`/`fill` only; never `useElementSize`
|
|
99
|
-
in a chart file (Mantine is banned there), never raw `@visx/responsive` outside `charts/**`.
|
|
100
|
-
- **A page's layout keys on its container, not the viewport** (`type="container"` grids, `CONTAINER_CLASSES`).
|
|
101
|
-
`useSizeClass()`: shell chrome (and what stands in for it at `compact`), overlay form, `ViewTabs only: 'sm-down'` partners — flash-free under `createRoot`. Recipes: `MIGRATING.md`.
|
|
102
|
-
|
|
103
|
-
## Scroll regions
|
|
104
|
-
|
|
105
|
-
**A scroll region inside app chrome is a Mantine `ScrollArea`, not a raw `overflow: auto` box** —
|
|
106
|
-
it draws its own bar inside its root, so the bar floats instead of reflowing the column
|
|
107
|
-
(`AppSidebar`'s nav is the reference: `type="hover"`, `scrollbars="y"`). Raw `overflow: auto` stays
|
|
108
|
-
correct only where a library owns the node (`BasaltStickToBottom`, `BasaltVirtualList`) and for a
|
|
109
|
-
table body (`Table.ScrollContainer type="native"` — a `ScrollArea` viewport breaks a sticky `<thead>`).
|
|
110
|
-
|
|
111
|
-
## Interaction feedback and motion
|
|
112
|
-
|
|
113
|
-
Every action button confirms itself: the `loading` prop in flight, a brief label flip
|
|
114
|
-
(`Save → Saved`) via Mantine's `<Transition>`, and a toast ONLY for an outcome the user might miss.
|
|
115
|
-
Destructive actions confirm through `modals.openConfirmModal` first.
|
|
116
|
-
|
|
117
|
-
- **Timing is a token, never a literal** — `MOTION_DURATION`/`MOTION_SPRING`/`MOTION_EASE_STANDARD`
|
|
118
|
-
(`raw-motion-value` enforces it). Animate `transform`/`opacity`/`color`, never a layout property.
|
|
119
|
-
- **Import from `motion/react`, never `framer-motion`** — exact-pinned optional PEER. Mantine's
|
|
120
|
-
`<Transition>` for a mount fade; `motion` for a crossfade, spring or gesture.
|
|
121
|
-
- **Always branch on `useReducedMotion`** with a real unanimated path, not just `duration: 0`
|
|
122
|
-
(`ThemeToggle` is the pattern). Restraint applies to motion too — no looping idle animation.
|
|
49
|
+
- Animation timing comes from basalt's motion tokens, never a literal duration, spring or easing. [check-theme raw-motion-value]
|