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,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Resolve a `defineNav` definition into the two props `BasaltShell` renders from.
|
|
3
3
|
*
|
|
4
4
|
* One `defineNav([...])` in a leaf module produces the desktop sidebar AND the mobile bar: this
|
|
5
5
|
* hook resolves active state through the router and builds each destination's anchor, which is
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* No JSX — anchors are built with `createElement`, so `./router-tanstack` stays a headless,
|
|
10
10
|
* no-JSX `.ts` module per its own barrel contract.
|
|
11
11
|
*/
|
|
12
|
-
import { createElement, useMemo } from 'react'
|
|
13
|
-
import type { ElementType, ReactNode } from 'react'
|
|
12
|
+
import { createElement, forwardRef, useMemo } from 'react'
|
|
13
|
+
import type { AnchorHTMLAttributes, ElementType, ReactNode } from 'react'
|
|
14
14
|
import { Link, useMatchRoute, useRouterState } from '@tanstack/react-router'
|
|
15
15
|
import type { MobileNavConfig, NavAnchor, SidebarItem, SidebarSection } from '../shell/nav-types'
|
|
16
16
|
import { flattenNav } from './nav'
|
|
@@ -24,24 +24,54 @@ export type UseNavOptions<G extends ReadonlyArray<AnyNavGroup>> = {
|
|
|
24
24
|
*/
|
|
25
25
|
badges?: Partial<Record<NavItemId<G>, number | ReactNode>>
|
|
26
26
|
/** Override active detection entirely. */
|
|
27
|
-
isActive?: (item: AnyNavItem) => boolean
|
|
27
|
+
isActive?: (item: AnyNavItem & { id: NavItemId<G> }) => boolean
|
|
28
28
|
getScrollElement?: () => HTMLElement | null
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
type OverriddenAnchorProps = AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
32
|
+
'data-status'?: string
|
|
33
|
+
'data-basalt-current'?: 'page' | 'true'
|
|
34
|
+
_asChild?: unknown
|
|
35
|
+
}
|
|
33
36
|
|
|
34
37
|
/**
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
38
|
+
* The host `Link` renders as when `isActive` overrides the router. A `Link` computes its own
|
|
39
|
+
* `isActive` and spreads `aria-current="page"` + `data-status="active"` as the LAST props it
|
|
40
|
+
* applies (`@tanstack/react-router` 1.170.x `dist/esm/link.js`, `applyLinkState`), so under an
|
|
41
|
+
* override a router-matched loser would still claim the page. `Link` renders `props._asChild` as
|
|
42
|
+
* its host element in place of `'a'` (same file, `Link`: `const host = props._asChild || "a"`) —
|
|
43
|
+
* an underscore-prefixed, undocumented seam, so `MAINTAINING.md` names it for re-verification on
|
|
44
|
+
* every router bump. This host drops the router's two attributes and re-applies only basalt's own
|
|
45
|
+
* verdict, which the anchor smuggles through `data-basalt-current`; `data-status` is re-stamped
|
|
46
|
+
* for it so both paths expose the same hooks on the winner.
|
|
47
|
+
*/
|
|
48
|
+
const OverriddenAnchor = forwardRef<HTMLAnchorElement, OverriddenAnchorProps>((props, ref) => {
|
|
49
|
+
const {
|
|
50
|
+
'aria-current': _routerCurrent,
|
|
51
|
+
'data-status': _routerStatus,
|
|
52
|
+
'data-basalt-current': current,
|
|
53
|
+
_asChild: _host,
|
|
54
|
+
...rest
|
|
55
|
+
} = props
|
|
56
|
+
return createElement('a', {
|
|
57
|
+
...rest,
|
|
58
|
+
...(current !== undefined && { 'aria-current': current, 'data-status': 'active' }),
|
|
59
|
+
ref,
|
|
60
|
+
})
|
|
61
|
+
})
|
|
62
|
+
OverriddenAnchor.displayName = 'OverriddenAnchor'
|
|
63
|
+
|
|
64
|
+
/** What this resolver turns a definition into: `ShellFrame`'s sidebar sections and mobile-bar tuning. */
|
|
65
|
+
export type ResolvedNav = { sections: SidebarSection[]; mobileNav: MobileNavConfig }
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Resolve a nav definition against the live router into `BasaltShell`'s internal `ShellFrame`
|
|
69
|
+
* props. Shell-internal: a consumer passes `nav={NAV}` to `BasaltShell` and never calls this.
|
|
40
70
|
*/
|
|
41
71
|
export function useNav<
|
|
42
72
|
const G extends ReadonlyArray<AnyNavGroup>,
|
|
43
73
|
const T extends ReadonlyArray<NavTabId<G>>,
|
|
44
|
-
>(config: NavConfig<G, T>, opts?: UseNavOptions<G>):
|
|
74
|
+
>(config: NavConfig<G, T>, opts?: UseNavOptions<G>): ResolvedNav {
|
|
45
75
|
// `useMatchRoute` is `useCallback(fn, [router])` — a STABLE identity across renders — and it
|
|
46
76
|
// subscribes internally to `router.stores.matchRouteDeps`, so the component still re-renders on
|
|
47
77
|
// navigation. That makes it safe as a memo dep, and makes the memo below actually hit.
|
|
@@ -61,7 +91,7 @@ export function useNav<
|
|
|
61
91
|
// `active` on its own — it only says "on the path", and the pass below picks ONE winner
|
|
62
92
|
// across the whole definition so a parent and its child can no longer both read `active`.
|
|
63
93
|
const matchOf = (item: AnyNavItem): boolean =>
|
|
64
|
-
isActiveOverride?.(item) ??
|
|
94
|
+
isActiveOverride?.(item as AnyNavItem & { id: NavItemId<G> }) ??
|
|
65
95
|
Boolean(
|
|
66
96
|
matchRoute({
|
|
67
97
|
to: item.link.to,
|
|
@@ -138,6 +168,10 @@ export function useNav<
|
|
|
138
168
|
createElement(Link as ElementType, {
|
|
139
169
|
...item.link,
|
|
140
170
|
activeOptions: { exact: true, includeSearch: true },
|
|
171
|
+
...(isActiveOverride !== undefined && {
|
|
172
|
+
_asChild: OverriddenAnchor,
|
|
173
|
+
'data-basalt-current': props['aria-current'],
|
|
174
|
+
}),
|
|
141
175
|
...props,
|
|
142
176
|
})
|
|
143
177
|
|
|
@@ -295,8 +295,9 @@ export function MobileNav({
|
|
|
295
295
|
const [openKey, setOpenKey] = useState<string | null>(null)
|
|
296
296
|
// The nested block sheet, keyed the same way and for the same reason.
|
|
297
297
|
const [openBlockKey, setOpenBlockKey] = useState<string | null>(null)
|
|
298
|
-
// `
|
|
299
|
-
//
|
|
298
|
+
// `createBasaltTheme` sets `respectReducedMotion: true`, which covers Mantine's own `<Transition>`
|
|
299
|
+
// timing. `scrollTo({ behavior })` below is not Mantine's, so that read stays explicit here; the
|
|
300
|
+
// `duration` literals are kept as the belt to the theme's braces, not proven redundant.
|
|
300
301
|
const reduceMotion = useReducedMotion()
|
|
301
302
|
const { step } = useBasaltSpacing()
|
|
302
303
|
|
|
@@ -221,7 +221,7 @@ function NavLinkBody({
|
|
|
221
221
|
// default (which a consumer's `SidebarItem.Anchor` may compute independently) — mirrors
|
|
222
222
|
// `app-mobile-nav.tsx`'s identical pattern so both surfaces agree on what "active" means.
|
|
223
223
|
'aria-current': active ? ('page' as const) : undefined,
|
|
224
|
-
// `item.ancestor` (a parent on the winner's path —
|
|
224
|
+
// `item.ancestor` (a parent on the winner's path — the nav resolver's exclusivity pass) is NEVER
|
|
225
225
|
// active and never carries `aria-current`; it only earns a `data-ancestor` hook for CSS. A
|
|
226
226
|
// leaf item never has `ancestor` set, so this is a no-op there — shared here rather than
|
|
227
227
|
// duplicated per render path.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Aside docking (`docs/DESIGN-CORE.md` § Layout, elevation, shapes) — the pure decision `
|
|
2
|
+
* Aside docking (`docs/DESIGN-CORE.md` § Layout, elevation, shapes) — the pure decision `ShellBody`
|
|
3
3
|
* sizes `AppShell.Aside` from. An open aside pushes main only in `expanded` while main keeps
|
|
4
4
|
* `MAIN_MIN_WIDTH` beside the navbar; otherwise the region reserves just its rail and an open panel
|
|
5
5
|
* overlays main. Unclaimed, the region is zero-wide.
|
package/src/shell/index.tsx
CHANGED
|
@@ -10,12 +10,13 @@
|
|
|
10
10
|
* why the More surface must also carry the account and settings rows the sidebar footer holds on
|
|
11
11
|
* desktop.
|
|
12
12
|
*
|
|
13
|
-
* Router-
|
|
14
|
-
*
|
|
15
|
-
* `item.
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
13
|
+
* Router-coupled through ONE seam: `nav` (a `defineNav` definition) is resolved here against the
|
|
14
|
+
* TanStack Router — `useMatchRoute` active detection, each destination's `<Link>` as its
|
|
15
|
+
* `item.Anchor`, `badges` as `item.count`/`item.badge` — so the consumer wires no router callback.
|
|
16
|
+
* The pieces below (`ShellFrame`, the sidebar, the mobile bar) stay presentational and take already
|
|
17
|
+
* resolved `sections`. The breadcrumb is derived from the active item across those sections, not
|
|
18
|
+
* from a router hook. Collapse is persisted via basalt's own `createPersistedStore`
|
|
19
|
+
* (`../state/persisted`, `createPersistedState` plus an `isSet` flag) keyed
|
|
19
20
|
* by `storageKey` — see `collapseStore`. While nothing is persisted the size class picks the
|
|
20
21
|
* default (rail in `medium`); any stored value, `false` included, wins.
|
|
21
22
|
*/
|
|
@@ -48,6 +49,9 @@ import type {
|
|
|
48
49
|
} from './nav-types'
|
|
49
50
|
import { CtlSlot, useBasaltSpacing } from '../theme'
|
|
50
51
|
import { createPersistedStore } from '../state/persisted'
|
|
52
|
+
import { useNav } from '../router-tanstack/use-nav'
|
|
53
|
+
import type { UseNavOptions } from '../router-tanstack/use-nav'
|
|
54
|
+
import type { AnyNavGroup, NavConfig, NavTabId } from '../router-tanstack/nav'
|
|
51
55
|
import { SizeClassHintContext, useSizeClass } from './use-size-class'
|
|
52
56
|
import brandClasses from './app-brand.module.css'
|
|
53
57
|
import headerClasses from './app-header.module.css'
|
|
@@ -148,19 +152,13 @@ export type SettingsMenuItem = {
|
|
|
148
152
|
current?: 'selection' | 'page'
|
|
149
153
|
}
|
|
150
154
|
|
|
151
|
-
|
|
155
|
+
/** Everything `BasaltShell` and `ShellFrame` share — the nav arrives differently in each. */
|
|
156
|
+
export type ShellBaseProps = BasaltProps & {
|
|
152
157
|
/**
|
|
153
158
|
* Brand identity for the sidebar header. Supplying `menu` turns the brand row into a `Name ▾`
|
|
154
159
|
* workspace switcher — the rows are `AccountMenuItem`s, the shape the account menu already uses.
|
|
155
160
|
*/
|
|
156
161
|
brand: BrandConfig & { menu?: AccountMenuItem[] }
|
|
157
|
-
/** Grouped nav sections — the ONE definition, rendered as the sidebar and projected to the bar. */
|
|
158
|
-
sections: SidebarSection[]
|
|
159
|
-
/**
|
|
160
|
-
* Mobile bar tuning. Every field optional — the defaults ARE the design, and a nav with nothing
|
|
161
|
-
* configured still produces a working bar (see `projectMobileNav`'s zero-config fallback).
|
|
162
|
-
*/
|
|
163
|
-
mobileNav?: MobileNavConfig
|
|
164
162
|
/**
|
|
165
163
|
* Persistent, shell-owned header actions (timer, notifications, a global `SyncButton`) — DECLARED
|
|
166
164
|
* DATA, not a `ReactNode` slot, so basalt owns the mobile projection: the first two ride the bar,
|
|
@@ -247,6 +245,21 @@ export type BasaltShellProps = BasaltProps & {
|
|
|
247
245
|
children?: ReactNode
|
|
248
246
|
}
|
|
249
247
|
|
|
248
|
+
export type BasaltShellProps<
|
|
249
|
+
G extends ReadonlyArray<AnyNavGroup>,
|
|
250
|
+
T extends ReadonlyArray<NavTabId<G>>,
|
|
251
|
+
> = ShellBaseProps &
|
|
252
|
+
UseNavOptions<G> & {
|
|
253
|
+
/**
|
|
254
|
+
* The `defineNav` definition — the ONE nav, resolved against the router here: the sidebar, the
|
|
255
|
+
* mobile bar (its tuning rides `defineNav`'s `mobile`) and the breadcrumb all derive from it.
|
|
256
|
+
* Alongside it: `badges` (a `number` becomes `item.count`, anything else `item.badge`; hoist or
|
|
257
|
+
* memoize the object), `isActive` (override active detection) and `getScrollElement` (the
|
|
258
|
+
* mobile bar's scroll container).
|
|
259
|
+
*/
|
|
260
|
+
nav: NavConfig<G, T>
|
|
261
|
+
}
|
|
262
|
+
|
|
250
263
|
/** Active nav item across all sections → the breadcrumb's `{ section, parent?, …, page }`. */
|
|
251
264
|
function findActiveCrumb(sections: SidebarSection[]): ActiveCrumb | undefined {
|
|
252
265
|
for (const section of sections) {
|
|
@@ -325,10 +338,39 @@ function collapseStore(key: string): CollapseStore {
|
|
|
325
338
|
return store
|
|
326
339
|
}
|
|
327
340
|
|
|
341
|
+
/** The application shell. `nav` is resolved against the router; the rest is `ShellBaseProps`. */
|
|
342
|
+
export function BasaltShell<
|
|
343
|
+
const G extends ReadonlyArray<AnyNavGroup>,
|
|
344
|
+
const T extends ReadonlyArray<NavTabId<G>>,
|
|
345
|
+
>(props: BasaltShellProps<G, T>) {
|
|
346
|
+
assertRequiredProps('BasaltShell', props, ['brand', 'nav'])
|
|
347
|
+
const { nav, badges, isActive, getScrollElement, ...rest } = props
|
|
348
|
+
const { sections, mobileNav } = useNav(nav, {
|
|
349
|
+
...(badges !== undefined && { badges }),
|
|
350
|
+
...(isActive !== undefined && { isActive }),
|
|
351
|
+
...(getScrollElement !== undefined && { getScrollElement }),
|
|
352
|
+
})
|
|
353
|
+
return <ShellFrame {...rest} sections={sections} mobileNav={mobileNav} />
|
|
354
|
+
}
|
|
355
|
+
|
|
328
356
|
/**
|
|
357
|
+
* The resolved-nav shell: what `BasaltShell` renders once `nav` is a router-resolved `sections`.
|
|
358
|
+
*
|
|
359
|
+
* @internal
|
|
360
|
+
*/
|
|
361
|
+
export type ShellFrameProps = ShellBaseProps & {
|
|
362
|
+
/** Grouped nav sections — rendered as the sidebar and projected onto the mobile bar. */
|
|
363
|
+
sections: SidebarSection[]
|
|
364
|
+
/** Mobile bar tuning; every field optional (see `projectMobileNav`'s zero-config fallback). */
|
|
365
|
+
mobileNav?: MobileNavConfig
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* @internal Renders resolved `sections`; consumers use `BasaltShell nav` instead.
|
|
370
|
+
*
|
|
329
371
|
* The shell's two page-level regions are providers, and both wrap the frame rather than living
|
|
330
372
|
* inside it: `PageBarProvider` owns the header portal and the single-kebab claim, `AsideProvider`
|
|
331
|
-
* owns the aside portal, the region CLAIM and the claiming page's fold state — which `
|
|
373
|
+
* owns the aside portal, the region CLAIM and the claiming page's fold state — which `ShellBody`
|
|
332
374
|
* has to READ to size `AppShell.Aside`, so it cannot be the component that provides it.
|
|
333
375
|
*
|
|
334
376
|
* **Native title bar (opt-in CSS contract).** A desktop host with a macOS overlay title bar paints
|
|
@@ -338,18 +380,17 @@ function collapseStore(key: string): CollapseStore {
|
|
|
338
380
|
* the inset plus the collapse toggle, so the 48px rail pushes the toggle to the right of the lights
|
|
339
381
|
* instead of clipping it. The breadcrumb after a widened rail zone shifts right by the same amount.
|
|
340
382
|
*/
|
|
341
|
-
export function
|
|
342
|
-
assertRequiredProps('BasaltShell', props, ['brand', 'sections'])
|
|
383
|
+
export function ShellFrame(props: ShellFrameProps) {
|
|
343
384
|
return (
|
|
344
385
|
<PageBarProvider globalActions={props.globalActions ?? []}>
|
|
345
386
|
<AsideProvider>
|
|
346
|
-
<
|
|
387
|
+
<ShellBody {...props} />
|
|
347
388
|
</AsideProvider>
|
|
348
389
|
</PageBarProvider>
|
|
349
390
|
)
|
|
350
391
|
}
|
|
351
392
|
|
|
352
|
-
function
|
|
393
|
+
function ShellBody({
|
|
353
394
|
brand,
|
|
354
395
|
sections,
|
|
355
396
|
mobileNav,
|
|
@@ -366,7 +407,7 @@ function ShellFrame({
|
|
|
366
407
|
children,
|
|
367
408
|
className,
|
|
368
409
|
style,
|
|
369
|
-
}:
|
|
410
|
+
}: ShellFrameProps) {
|
|
370
411
|
// The active density level's resolved spacing — the AppShell dimensions below must track it
|
|
371
412
|
// (see `SPACE_STEP_BASE`'s "shell/index.tsx" group doc in `tokens/palette.ts`): their contents
|
|
372
413
|
// (controls, the search trigger/avatar, nav labels) already track density, so a fixed literal
|
package/src/shell/page-aside.tsx
CHANGED
|
@@ -46,7 +46,18 @@
|
|
|
46
46
|
* read stays in JS — through `useSyncExternalStore`, so SSR, hydration and the first paint agree.
|
|
47
47
|
* Recorded in `docs/CONTROLS-SPEC.md` §1 (C9) and `docs/ASIDE-SPEC.md` §0.
|
|
48
48
|
*/
|
|
49
|
-
import {
|
|
49
|
+
import {
|
|
50
|
+
Activity,
|
|
51
|
+
ViewTransition,
|
|
52
|
+
createContext,
|
|
53
|
+
startTransition,
|
|
54
|
+
useCallback,
|
|
55
|
+
useContext,
|
|
56
|
+
useDeferredValue,
|
|
57
|
+
useMemo,
|
|
58
|
+
useRef,
|
|
59
|
+
useState,
|
|
60
|
+
} from 'react'
|
|
50
61
|
import type { ReactNode } from 'react'
|
|
51
62
|
import { createPortal } from 'react-dom'
|
|
52
63
|
import { cx } from '../common/props'
|
|
@@ -74,7 +85,7 @@ type AsideRegion = {
|
|
|
74
85
|
publishFolded: (folded: boolean) => void
|
|
75
86
|
/**
|
|
76
87
|
* Bumped by `requestClose` — never 0 again once a close has been requested, so `PageAside` can
|
|
77
|
-
* treat "changed since mount" as "fold now" without a ref of its own. `
|
|
88
|
+
* treat "changed since mount" as "fold now" without a ref of its own. `ShellBody` is the one
|
|
78
89
|
* caller, on Escape while the aside renders as an overlay.
|
|
79
90
|
*/
|
|
80
91
|
closeSignal: number
|
|
@@ -141,7 +152,7 @@ export function useAsideRegion(): Pick<AsideRegion, 'claimed' | 'folded' | 'requ
|
|
|
141
152
|
|
|
142
153
|
/**
|
|
143
154
|
* Internal — whether an OPEN aside would push the main column (expanded, main keeps its floor)
|
|
144
|
-
* rather than overlay it. Provided by `
|
|
155
|
+
* rather than overlay it. Provided by `ShellBody`, which alone knows the navbar width, from the
|
|
145
156
|
* same render that computes it: a state published after mount would make the first pass read
|
|
146
157
|
* "cannot dock" and fold a default-open aside for one commit.
|
|
147
158
|
*/
|
|
@@ -255,11 +266,21 @@ export function PageAside(props: PageAsideProps): ReactNode {
|
|
|
255
266
|
// children. `useSizeClass` (`useSyncExternalStore`) keeps SSR, the hydration pass and the first
|
|
256
267
|
// client paint agreeing on which single node exists.
|
|
257
268
|
const isCompact = useSizeClass() === 'compact'
|
|
258
|
-
const [folded,
|
|
269
|
+
const [folded, storeFolded] = usePersistedOrLocal({
|
|
259
270
|
scope: 'aside',
|
|
260
271
|
persistKey,
|
|
261
272
|
initial: defaultFolded ?? !docks,
|
|
262
273
|
})
|
|
274
|
+
// V2-SPEC § 5: a fold runs in a transition so the region's `<ViewTransition>` fires. A persisted
|
|
275
|
+
// fold is a `useSyncExternalStore` read, which always commits synchronously and so never
|
|
276
|
+
// activates one; `useDeferredValue` re-renders at transition priority, which is what does.
|
|
277
|
+
// `folded` is the truth (the toggle's `aria-*`, the reserved width published to the shell);
|
|
278
|
+
// `shownFolded` only decides what is painted, one transition later.
|
|
279
|
+
const shownFolded = useDeferredValue(folded)
|
|
280
|
+
const setFolded = useCallback(
|
|
281
|
+
(next: boolean) => startTransition(() => storeFolded(next)),
|
|
282
|
+
[storeFolded],
|
|
283
|
+
)
|
|
263
284
|
|
|
264
285
|
const portalled = inShell && !isCompact
|
|
265
286
|
// Below `sm` the panel goes into the page bar's row 2 IF there is one. Without a row 2 there is
|
|
@@ -303,7 +324,7 @@ export function PageAside(props: PageAsideProps): ReactNode {
|
|
|
303
324
|
// fold before the user ever asked. `closeSignalBaseline` captures the value THIS instance mounted
|
|
304
325
|
// with, so only a change AFTER that point — a close requested while this instance is live — folds
|
|
305
326
|
// it; a later-mounted instance still respects its own `defaultFolded`/persisted state. Guarded on
|
|
306
|
-
// `portalled`, matching where `
|
|
327
|
+
// `portalled`, matching where `ShellBody` can even observe an overlay to escape out of.
|
|
307
328
|
//
|
|
308
329
|
// The baseline ADVANCES to every `closeSignal` it acts on — not just at mount. Without that, a
|
|
309
330
|
// portalled false→true transition (the aside leaving and rejoining the shell, e.g. a viewport
|
|
@@ -329,26 +350,29 @@ export function PageAside(props: PageAsideProps): ReactNode {
|
|
|
329
350
|
aria-label={title}
|
|
330
351
|
{...(style !== undefined && { style })}
|
|
331
352
|
>
|
|
332
|
-
{portalled &&
|
|
353
|
+
{portalled && shownFolded && (
|
|
333
354
|
<div className={classes.rail}>
|
|
334
|
-
<FoldButton folded onToggle={() => setFolded(false)} />
|
|
355
|
+
<FoldButton folded={folded} onToggle={() => setFolded(false)} />
|
|
335
356
|
</div>
|
|
336
|
-
) : (
|
|
337
|
-
<>
|
|
338
|
-
<div className={cx(classes.header, classNames?.header)} data-basalt-page-aside-header="">
|
|
339
|
-
<span className={classes.title}>{title}</span>
|
|
340
|
-
{portalled && <FoldButton folded={false} onToggle={() => setFolded(true)} />}
|
|
341
|
-
</div>
|
|
342
|
-
<div className={cx(classes.body, classNames?.body)}>
|
|
343
|
-
{/* The aside body IS a home (law C1) and a filter surface: `panel` is what turns every
|
|
344
|
-
bound control inside into an inspector row. `registry: null` because there is no
|
|
345
|
-
census here — no `Filters (n)`, no `Reset all`. */}
|
|
346
|
-
<FilterSetScope surface="panel" registry={null}>
|
|
347
|
-
{children}
|
|
348
|
-
</FilterSetScope>
|
|
349
|
-
</div>
|
|
350
|
-
</>
|
|
351
357
|
)}
|
|
358
|
+
{/* Hidden, not unmounted: scroll position, input values and `useState` survive a fold. A
|
|
359
|
+
hidden `Activity` runs the subtree's effect cleanups and re-runs the effects on re-show
|
|
360
|
+
(`agent/chat/thread-feed-row.tsx`), so a subscribing or streaming child resumes from its
|
|
361
|
+
own state, but anything an effect set up (a timer, a socket) is torn down while folded. */}
|
|
362
|
+
<Activity mode={portalled && shownFolded ? 'hidden' : 'visible'}>
|
|
363
|
+
<div className={cx(classes.header, classNames?.header)} data-basalt-page-aside-header="">
|
|
364
|
+
<span className={classes.title}>{title}</span>
|
|
365
|
+
{portalled && <FoldButton folded={false} onToggle={() => setFolded(true)} />}
|
|
366
|
+
</div>
|
|
367
|
+
<div className={cx(classes.body, classNames?.body)}>
|
|
368
|
+
{/* The aside body IS a home (law C1) and a filter surface: `panel` is what turns every
|
|
369
|
+
bound control inside into an inspector row. `registry: null` because there is no
|
|
370
|
+
census here — no `Filters (n)`, no `Reset all`. */}
|
|
371
|
+
<FilterSetScope surface="panel" registry={null}>
|
|
372
|
+
{children}
|
|
373
|
+
</FilterSetScope>
|
|
374
|
+
</div>
|
|
375
|
+
</Activity>
|
|
352
376
|
</section>
|
|
353
377
|
)
|
|
354
378
|
|
|
@@ -372,5 +396,5 @@ export function PageAside(props: PageAsideProps): ReactNode {
|
|
|
372
396
|
if (!portalled) return inShell && !settled ? null : panel
|
|
373
397
|
// `target` is null for the first commit only — the outlet's ref sets it.
|
|
374
398
|
if (target === null) return null
|
|
375
|
-
return createPortal(panel
|
|
399
|
+
return createPortal(<ViewTransition>{panel}</ViewTransition>, target)
|
|
376
400
|
}
|
package/src/shell/page-bar.tsx
CHANGED
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
import { FilterPill } from '../controls/filter-pill'
|
|
38
38
|
import { FilterSheet } from '../controls/filter-sheet'
|
|
39
39
|
import { SyncButton } from '../controls/sync-button'
|
|
40
|
-
import type {
|
|
40
|
+
import type { BarAction, GlobalAction, PageBarActions } from '../controls/actions'
|
|
41
41
|
import type { SyncButtonProps } from '../controls/sync-button'
|
|
42
42
|
import { useIsomorphicLayoutEffect } from '../common/isomorphic-layout-effect'
|
|
43
43
|
import classes from './page-bar.module.css'
|
|
@@ -267,7 +267,7 @@ export type PageBarProps = BasaltProps &
|
|
|
267
267
|
*/
|
|
268
268
|
title?: string
|
|
269
269
|
icon?: ReactNode
|
|
270
|
-
actions?:
|
|
270
|
+
actions?: PageBarActions
|
|
271
271
|
/** `scope` is fixed to `'page'` — a global sync belongs in the shell's `globalActions` (law C12). */
|
|
272
272
|
sync?: Omit<SyncButtonProps, 'scope'>
|
|
273
273
|
/** `FilterSet` descendants only (law C1). */
|
|
@@ -438,7 +438,7 @@ export function PageBar({
|
|
|
438
438
|
One `CtlSlot` for the whole row now, so the sync button and the buttons around it
|
|
439
439
|
resolve the tier from the same provider. */}
|
|
440
440
|
<BarActionRow
|
|
441
|
-
{...actions}
|
|
441
|
+
{...(actions !== undefined && { primary: actions[0], secondary: actions.slice(1) })}
|
|
442
442
|
host="page"
|
|
443
443
|
mobileOnly={filtersEndActions}
|
|
444
444
|
{...(sync !== undefined && { syncNode: <SyncButton {...sync} scope="page" /> })}
|
package/src/shell/page-title.tsx
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* `PageTitle` — the shell-less page-title primitive (C5 consolidation). Law C8
|
|
3
3
|
* (`docs/CONTROLS-SPEC.md` §2.2) names two sanctioned spots for a page's ONE name: the breadcrumb
|
|
4
4
|
* inside `BasaltShell`, or `PageBar.title` in a shell-less app — but neither fits a surface that
|
|
5
|
-
* has no `PageBar` at all, which is exactly what
|
|
5
|
+
* has no `PageBar` at all, which is exactly what the provider's `RootBoundary` default fallback and an
|
|
6
6
|
* auth gate ARE. Both were the two named `in-body-page-title` waivers this primitive closes
|
|
7
7
|
* (argo's `lib/error-boundary.tsx:36`, `lib/auth-gate.tsx:30` — each a bare `<Title order={2}>` +
|
|
8
8
|
* a muted subtitle line, hand-copied).
|
package/src/state.ts
CHANGED
|
@@ -1,49 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `basalt-ui/state` — the headless state surface: no Mantine, no
|
|
2
|
+
* `basalt-ui/state` — the headless state surface: no Mantine, no JSX. The persisted and local
|
|
3
|
+
* lanes are router-free; only `createSearchStore` reaches `@tanstack/react-router` (an optional peer).
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
+
* - `createPersistedState` — the versioned localStorage primitive every basalt module persists through.
|
|
6
|
+
* - `field.*`, `FieldHandle`, `EnumField`, `RangeWindow` and `createLocalStore` — the store field
|
|
7
|
+
* vocabulary and the router-free store.
|
|
8
|
+
* - `createSearchStore` — the URL-backed store (the store half of 1.x `./router-tanstack`).
|
|
5
9
|
*
|
|
6
|
-
*
|
|
7
|
-
* primitive every other basalt module persists through.
|
|
8
|
-
* - `./state/fields` — the store field vocabulary (`field.*`, `FieldHandle`, the lanes) and
|
|
9
|
-
* `createLocalStore`, the router-free store. `createSearchStore` (`basalt-ui/router-tanstack`)
|
|
10
|
-
* is the router-coupled factory over the same fields.
|
|
11
|
-
*
|
|
12
|
-
* The split is a file boundary, not a surface boundary: this barrel is what `package.json`'s
|
|
13
|
-
* `./state` export resolves to, and its named exports are pinned by `scripts/export-surface.json`.
|
|
10
|
+
* Internal consumers import the wider field types from `./state/fields`.
|
|
14
11
|
*/
|
|
15
12
|
|
|
16
|
-
export {
|
|
17
|
-
createPersistedState,
|
|
18
|
-
type PersistedStateOptions,
|
|
19
|
-
readPersistedValue,
|
|
20
|
-
} from './state/persisted'
|
|
13
|
+
export { createPersistedState } from './state/persisted'
|
|
21
14
|
|
|
22
15
|
export {
|
|
23
16
|
field,
|
|
24
17
|
createLocalStore,
|
|
25
|
-
type LocalStore,
|
|
26
|
-
// The field vocabulary
|
|
27
|
-
type FieldLane,
|
|
28
|
-
type ResolvedLane,
|
|
29
|
-
type ResolveLane,
|
|
30
|
-
type RangeValue,
|
|
31
|
-
type RangeParams,
|
|
32
|
-
type RangePresets,
|
|
33
|
-
type RangeWindow,
|
|
34
|
-
type RangeWindows,
|
|
35
|
-
type FieldFallback,
|
|
36
|
-
type FieldSetOptions,
|
|
37
18
|
type EnumField,
|
|
38
|
-
type MultiField,
|
|
39
|
-
type RangeField,
|
|
40
|
-
type NumberField,
|
|
41
|
-
type BooleanField,
|
|
42
|
-
type StringField,
|
|
43
|
-
type AnyField,
|
|
44
|
-
type FieldValue,
|
|
45
|
-
type FieldOption,
|
|
46
19
|
type FieldHandle,
|
|
47
|
-
type
|
|
48
|
-
type StoredValues,
|
|
20
|
+
type RangeWindow,
|
|
49
21
|
} from './state/fields'
|
|
22
|
+
|
|
23
|
+
export { createSearchStore } from './router-tanstack/search-store'
|
package/src/styles.css
CHANGED
|
@@ -8,13 +8,23 @@
|
|
|
8
8
|
/* Layer order — LOW to HIGH priority. Declared up front (a `@layer` statement is allowed before
|
|
9
9
|
* `@import`) so it holds no matter which order the consumer's bundler emits the stylesheets in.
|
|
10
10
|
*
|
|
11
|
-
* This is load-bearing, not decorative:
|
|
12
|
-
* never the plain
|
|
13
|
-
* unlayered author styles outrank EVERY layered rule regardless of specificity — so with
|
|
11
|
+
* This is load-bearing, not decorative: any Mantine CSS a consumer adds must be the `.layer.css`
|
|
12
|
+
* variant, never the plain `styles.css`. Mantine's default bundles are entirely UNLAYERED, and
|
|
13
|
+
* unlayered author styles outrank EVERY layered rule regardless of specificity — so with a plain
|
|
14
14
|
* bundle this whole `@layer basalt` block silently loses to Mantine, including the iOS input floor
|
|
15
|
-
* below. `basalt doctor` flags the
|
|
15
|
+
* below. This file already imports core, notifications and spotlight; `basalt doctor` flags the
|
|
16
|
+
* plain variant. */
|
|
16
17
|
@layer mantine, basalt;
|
|
17
18
|
|
|
19
|
+
/* Every Mantine layer bundle the provider mounts (core, Notifications, Spotlight; `@mantine/modals`
|
|
20
|
+
* ships no CSS), imported here so a consumer's one `import 'basalt-ui/styles.css'` carries them
|
|
21
|
+
* (docs/V2-SPEC.md § 1 Open). `@mantine/dates` is not here: only `./controls-dates` needs it, so it
|
|
22
|
+
* stays the consumer's import. After the `@layer` statement above on purpose: the order is already
|
|
23
|
+
* fixed, so the imports cannot reorder the layers whichever way the bundler emits them. */
|
|
24
|
+
@import '@mantine/core/styles.layer.css';
|
|
25
|
+
@import '@mantine/notifications/styles.layer.css';
|
|
26
|
+
@import '@mantine/spotlight/styles.layer.css';
|
|
27
|
+
|
|
18
28
|
/* The three-font system (docs/DESIGN-SPEC.md §3) — exact-pinned @fontsource-variable deps. Bare
|
|
19
29
|
* specifiers so consumer bundlers resolve them. */
|
|
20
30
|
@import '@fontsource-variable/nunito-sans';
|
|
@@ -99,9 +109,8 @@
|
|
|
99
109
|
authoring mistake at build time; this `!important` is the runtime backstop that makes it
|
|
100
110
|
un-defeatable even when a violation slips through.
|
|
101
111
|
|
|
102
|
-
`--basalt-input-fz-floor`
|
|
103
|
-
|
|
104
|
-
the 16px floor is only visual weight. Default stays 16px. */
|
|
112
|
+
`--basalt-input-fz-floor` defaults to 16px; the theme `inputs` option that lowered it is gone
|
|
113
|
+
(V2-SPEC § 4), so an app that never runs on iOS Safari can set the var itself. */
|
|
105
114
|
input,
|
|
106
115
|
select,
|
|
107
116
|
textarea {
|
|
@@ -269,3 +278,94 @@
|
|
|
269
278
|
}
|
|
270
279
|
}
|
|
271
280
|
}
|
|
281
|
+
|
|
282
|
+
/* View transitions (V2-SPEC § 5). React names the pseudo-elements and runs the UA cross-fade; under
|
|
283
|
+
* reduced motion we remove it, which React does not do itself. */
|
|
284
|
+
@layer basalt {
|
|
285
|
+
@media (prefers-reduced-motion: reduce) {
|
|
286
|
+
::view-transition-group(*),
|
|
287
|
+
::view-transition-old(*),
|
|
288
|
+
::view-transition-new(*) {
|
|
289
|
+
animation: none;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/* Route transitions: `createBasaltRouter` starts one per navigation and tags it with a type
|
|
295
|
+
* (`routeTransitionTypes`, provider/route-transition.ts). Only the content region moves — the shell
|
|
296
|
+
* chrome stays in the static `root` snapshot. The name is scoped to the route types so React's own
|
|
297
|
+
* transitions (the aside fold) never see a second named group. The animations sit in a
|
|
298
|
+
* `no-preference` query rather than relying on the `reduce` block above: its `::view-transition-*(*)`
|
|
299
|
+
* selectors are less specific than these, so a bare rule here would win and animate under reduce. */
|
|
300
|
+
@layer basalt {
|
|
301
|
+
:root:active-view-transition-type(basalt-forward, basalt-back, basalt-sibling)
|
|
302
|
+
[data-basalt-scrollport] {
|
|
303
|
+
view-transition-name: basalt-main;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
307
|
+
:root:active-view-transition-type(basalt-forward, basalt-back, basalt-sibling) {
|
|
308
|
+
&::view-transition-old(root),
|
|
309
|
+
&::view-transition-new(root) {
|
|
310
|
+
animation: none;
|
|
311
|
+
}
|
|
312
|
+
&::view-transition-old(basalt-main) {
|
|
313
|
+
animation: basalt-route-out 120ms ease-out both;
|
|
314
|
+
}
|
|
315
|
+
&::view-transition-new(basalt-main) {
|
|
316
|
+
animation: basalt-route-in 180ms ease-out both;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
:root:active-view-transition-type(basalt-forward) {
|
|
320
|
+
--basalt-route-shift: 8px;
|
|
321
|
+
}
|
|
322
|
+
:root:active-view-transition-type(basalt-back) {
|
|
323
|
+
--basalt-route-shift: -8px;
|
|
324
|
+
}
|
|
325
|
+
:root:active-view-transition-type(basalt-sibling) {
|
|
326
|
+
--basalt-route-shift: 0px;
|
|
327
|
+
}
|
|
328
|
+
/* Forward is toward the inline end, which is left in RTL. */
|
|
329
|
+
:root[dir='rtl']:active-view-transition-type(basalt-forward) {
|
|
330
|
+
--basalt-route-shift: -8px;
|
|
331
|
+
}
|
|
332
|
+
:root[dir='rtl']:active-view-transition-type(basalt-back) {
|
|
333
|
+
--basalt-route-shift: 8px;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
@keyframes basalt-route-out {
|
|
338
|
+
to {
|
|
339
|
+
opacity: 0;
|
|
340
|
+
transform: translateX(calc(var(--basalt-route-shift, 0px) * -1));
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
@keyframes basalt-route-in {
|
|
345
|
+
from {
|
|
346
|
+
opacity: 0;
|
|
347
|
+
transform: translateX(var(--basalt-route-shift, 0px));
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/* chart-engine:start — generated by scripts/gen-chart-css.ts from chartEngineCss() */
|
|
353
|
+
@layer basalt {
|
|
354
|
+
:root {
|
|
355
|
+
--ts-chart-1: var(--vx-line);
|
|
356
|
+
--ts-chart-2: var(--vx-accent);
|
|
357
|
+
--ts-chart-3: var(--vx-fill-cyan);
|
|
358
|
+
--ts-chart-4: var(--vx-fill-orange);
|
|
359
|
+
--ts-chart-5: var(--vx-fill-grape);
|
|
360
|
+
--ts-chart-6: var(--vx-fill-lime);
|
|
361
|
+
--ts-chart-tooltip-background: var(--vx-tooltip-bg);
|
|
362
|
+
--ts-chart-tooltip-color: var(--vx-tooltip-text);
|
|
363
|
+
--ts-chart-tooltip-border: var(--vx-tooltip-border);
|
|
364
|
+
--ts-chart-tooltip-shadow: var(--vx-tooltip-shadow);
|
|
365
|
+
--ts-chart-tooltip-border-radius: var(--vx-radius-ctrl);
|
|
366
|
+
--ts-chart-crosshair-label-halo: var(--vx-surface-panel);
|
|
367
|
+
--ts-chart-crosshair-marker-fill: var(--vx-surface-panel);
|
|
368
|
+
--ts-chart-focus-fill: var(--vx-surface-panel);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
/* chart-engine:end */
|