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
package/src/content/markdown.tsx
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
* through (`./callout-alert`).
|
|
30
30
|
* - `a`/`img` — hardened via `allowedLinkPrefixes`/`allowedImagePrefixes`/`defaultOrigin`
|
|
31
31
|
* (`./url-hardening`); a disallowed URL (including remend's `streamdown:incomplete-link`
|
|
32
|
-
* sentinel) drops the `href`/`src`, and the component renders an unlinked span /
|
|
32
|
+
* sentinel) drops the `href`/`src`, and the component renders an unlinked span / the image's alt text.
|
|
33
33
|
*
|
|
34
34
|
* Streaming mode (`streaming`): `blockSplit` splits `children` into top-level blocks. Every block
|
|
35
35
|
* except the last renders through a memoized renderer (`React.memo`, referentially stable
|
|
@@ -183,8 +183,9 @@ function LinkRenderer({ href, children, node: _node, ...rest }: LinkProps) {
|
|
|
183
183
|
|
|
184
184
|
function ImageRenderer({ src, alt }: ImgProps) {
|
|
185
185
|
// A blocked src arrives as undefined OR '' depending on how urlTransform dropped it — an
|
|
186
|
-
// `<img src="">` renders the broken-image glyph, so both cases
|
|
187
|
-
|
|
186
|
+
// `<img src="">` renders the broken-image glyph, so both cases skip the element and keep the alt
|
|
187
|
+
// as plain text — the same "text, never a destination" degrade an unfinished link gets.
|
|
188
|
+
if (typeof src !== 'string' || src === '') return alt ? <span>{alt}</span> : null
|
|
188
189
|
return <img src={src} alt={alt ?? ''} loading="lazy" />
|
|
189
190
|
}
|
|
190
191
|
|
package/src/content/mermaid.tsx
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* <MermaidDiagram code={'graph TD\n A --> B'} />
|
|
21
21
|
*/
|
|
22
22
|
import type { CSSProperties, ReactNode } from 'react'
|
|
23
|
-
import { useEffect, useMemo,
|
|
23
|
+
import { useEffect, useMemo, useState } from 'react'
|
|
24
24
|
import { CodeBlock } from './code-block'
|
|
25
25
|
import classes from './mermaid.module.css'
|
|
26
26
|
|
|
@@ -67,7 +67,7 @@ export type MermaidDiagramProps = {
|
|
|
67
67
|
|
|
68
68
|
export function MermaidDiagram({ code, className, style, fallback }: MermaidDiagramProps) {
|
|
69
69
|
const [mod, setMod] = useState<MermaidModule | null | undefined>(undefined)
|
|
70
|
-
const
|
|
70
|
+
const [lastGood, setLastGood] = useState<string | null>(null)
|
|
71
71
|
|
|
72
72
|
useEffect(() => {
|
|
73
73
|
let cancelled = false
|
|
@@ -82,16 +82,18 @@ export function MermaidDiagram({ code, className, style, fallback }: MermaidDiag
|
|
|
82
82
|
|
|
83
83
|
// Pure and synchronous once `mod` is resolved — parse errors keep the last successfully
|
|
84
84
|
// rendered SVG (docs/CONTENT-SPEC.md §2 decision 4) instead of blanking a settled diagram.
|
|
85
|
-
|
|
85
|
+
// Three states: `null` = module not resolved yet, `undefined` = this `code` failed to parse (show
|
|
86
|
+
// the last good SVG), `string` = fresh SVG.
|
|
87
|
+
const rendered = useMemo(() => {
|
|
86
88
|
if (!mod) return null
|
|
87
89
|
try {
|
|
88
|
-
|
|
89
|
-
lastGoodRef.current = svg
|
|
90
|
-
return svg
|
|
90
|
+
return mod.renderMermaidSVG(code, MERMAID_THEME_OPTIONS)
|
|
91
91
|
} catch {
|
|
92
|
-
return
|
|
92
|
+
return undefined
|
|
93
93
|
}
|
|
94
94
|
}, [mod, code])
|
|
95
|
+
if (typeof rendered === 'string' && rendered !== lastGood) setLastGood(rendered)
|
|
96
|
+
const html = rendered === undefined ? lastGood : rendered
|
|
95
97
|
|
|
96
98
|
if (html === null) {
|
|
97
99
|
return (
|
package/src/content/slug.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* headingSlug +
|
|
2
|
+
* headingSlug + SlugTracker — small, pure, zero-dep utils for the content surface.
|
|
3
3
|
*
|
|
4
4
|
* `headingSlug` follows the github-slugger algorithm (lowercase, strip punctuation, spaces → `-`)
|
|
5
5
|
* so headings authored in `<Prose>`, markdown, or MDX land on the SAME anchor ids GitHub itself
|
|
@@ -44,18 +44,3 @@ export class SlugTracker {
|
|
|
44
44
|
return seen === 0 ? base : `${base}-${seen}`
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
|
|
48
|
-
/** The distilled reading-time estimate for a body of text. */
|
|
49
|
-
export type ReadingTime = {
|
|
50
|
-
readonly minutes: number
|
|
51
|
-
readonly words: number
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const WORDS_PER_MINUTE = 225
|
|
55
|
-
|
|
56
|
-
/** Estimate reading time at 225 wpm, rounded up to the nearest whole minute. */
|
|
57
|
-
export function readingTime(text: string): ReadingTime {
|
|
58
|
-
const words = text.trim().split(WHITESPACE_RE).filter(Boolean).length
|
|
59
|
-
const minutes = Math.ceil(words / WORDS_PER_MINUTE)
|
|
60
|
-
return { minutes, words }
|
|
61
|
-
}
|
|
@@ -11,6 +11,11 @@ import type { UrlTransform } from 'react-markdown'
|
|
|
11
11
|
|
|
12
12
|
const SCHEME_RE = /^[a-z][a-z0-9+.-]*:/i
|
|
13
13
|
|
|
14
|
+
// remend's repair sentinels (`[text](streamdown:incomplete-link)`, ``)
|
|
15
|
+
// are placeholders for a half-streamed URL, never a destination. Rejected before the allowlist so a
|
|
16
|
+
// permissive consumer prefix (`''`, `'streamdown:'`) can't turn one into a real `href`/`img src`.
|
|
17
|
+
const INCOMPLETE_SENTINEL_RE = /^streamdown:incomplete-(?:link|image)$/i
|
|
18
|
+
|
|
14
19
|
function isAllowedUrl(url: string, prefixes: readonly string[]): boolean {
|
|
15
20
|
return prefixes.some((prefix) => url.startsWith(prefix))
|
|
16
21
|
}
|
|
@@ -33,12 +38,13 @@ export type CreateUrlTransformOptions = {
|
|
|
33
38
|
|
|
34
39
|
/**
|
|
35
40
|
* Builds the `urlTransform` passed to `<ReactMarkdown>`. Disallowed URLs (including remend's
|
|
36
|
-
* `streamdown:incomplete-link`
|
|
41
|
+
* `streamdown:incomplete-link` / `streamdown:incomplete-image` sentinels, which no allowlist can admit) resolve to
|
|
37
42
|
* `null`, which react-markdown renders as an `href`/`src`-less element; the `a`/`img` component
|
|
38
|
-
* overrides in `./markdown` turn that into an unlinked span /
|
|
43
|
+
* overrides in `./markdown` turn that into an unlinked span / the image's alt text in a plain span.
|
|
39
44
|
*/
|
|
40
45
|
export function createUrlTransform(opts: CreateUrlTransformOptions): UrlTransform {
|
|
41
46
|
return (url, key) => {
|
|
47
|
+
if (INCOMPLETE_SENTINEL_RE.test(url)) return null
|
|
42
48
|
const prefixes = key === 'src' ? opts.allowedImagePrefixes : opts.allowedLinkPrefixes
|
|
43
49
|
if (!isAllowedUrl(url, prefixes)) return null
|
|
44
50
|
return resolveRelativeUrl(url, opts.defaultOrigin)
|
package/src/controls/actions.tsx
CHANGED
|
@@ -26,7 +26,7 @@ import classes from './actions.module.css'
|
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* A button-shaped action. `Anchor` is the router seam basalt HOSTS (the same seam `SidebarItem`
|
|
29
|
-
* uses — pass
|
|
29
|
+
* uses — pass your router's `Link`); `link` is the no-router fallback
|
|
30
30
|
* and only its `to` is honoured, since resolving `search`/`params` needs a router. Supply `Anchor`
|
|
31
31
|
* whenever the destination carries either.
|
|
32
32
|
*/
|
|
@@ -74,6 +74,29 @@ export type BarActionCustom = {
|
|
|
74
74
|
|
|
75
75
|
export type BarAction = BarActionItem | BarActionMenu | BarActionCustom
|
|
76
76
|
|
|
77
|
+
/** The one primary action of a page bar (law C6): the first tuple entry, flagged `primary: true`. */
|
|
78
|
+
type PrimaryBarAction = BarAction & { primary: true }
|
|
79
|
+
/** Every other page-bar action; `primary` may only be absent or `false`. */
|
|
80
|
+
type MoreBarAction = BarAction & { primary?: false }
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* `PageBar.actions`: exactly one primary first, then up to four more. Law C6 as a type — a missing
|
|
84
|
+
* or second primary and a sixth entry are tsc errors (`docs/V2-SPEC.md` §3).
|
|
85
|
+
*/
|
|
86
|
+
export type PageBarActions =
|
|
87
|
+
| [PrimaryBarAction]
|
|
88
|
+
| [PrimaryBarAction, MoreBarAction]
|
|
89
|
+
| [PrimaryBarAction, MoreBarAction, MoreBarAction]
|
|
90
|
+
| [PrimaryBarAction, MoreBarAction, MoreBarAction, MoreBarAction]
|
|
91
|
+
| [PrimaryBarAction, MoreBarAction, MoreBarAction, MoreBarAction, MoreBarAction]
|
|
92
|
+
|
|
93
|
+
/** `Section.actions`: at most three (law C6). */
|
|
94
|
+
export type SectionActions =
|
|
95
|
+
| []
|
|
96
|
+
| [BarAction]
|
|
97
|
+
| [BarAction, BarAction]
|
|
98
|
+
| [BarAction, BarAction, BarAction]
|
|
99
|
+
|
|
77
100
|
/**
|
|
78
101
|
* A home's `actions` slot. `primary` is SINGULAR by type — that is the whole enforcement of law
|
|
79
102
|
* C6's "exactly one primary"; there is no runtime check because a second one cannot be written.
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
import { Radio, Stack } from '@mantine/core'
|
|
30
30
|
import type { ReactNode } from 'react'
|
|
31
31
|
import type { BasaltProps } from '../common/props'
|
|
32
|
-
import type { FieldOption } from '../state'
|
|
32
|
+
import type { FieldOption } from '../state/fields'
|
|
33
33
|
import classes from './controls.module.css'
|
|
34
34
|
import { POPOVER_ROW_HIT_GAP, useFilterRegistration, useFilterSurface } from './filter-context'
|
|
35
35
|
import { FilterClearButton, FilterPill } from './filter-pill'
|
|
@@ -114,7 +114,9 @@ export function useFilterRegistration(isActive: boolean, reset: () => void): voi
|
|
|
114
114
|
// A ref, so a `reset` closure that is fresh every render does not re-run the effect (and so
|
|
115
115
|
// `Reset all` always calls the LATEST setter, not the one captured at registration).
|
|
116
116
|
const resetRef = useRef(reset)
|
|
117
|
-
|
|
117
|
+
useEffect(() => {
|
|
118
|
+
resetRef.current = reset
|
|
119
|
+
})
|
|
118
120
|
const stableReset = useCallback(() => {
|
|
119
121
|
resetRef.current()
|
|
120
122
|
}, [])
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* **Desktop.** One row, `wrap: nowrap`, and it NEVER scrolls (C7). When the measured pill widths
|
|
7
7
|
* exceed the container the tail folds into a `+N` menu pill — a `ResizeObserver` on the row plus
|
|
8
8
|
* per-slot `offsetWidth`, because the fold point depends on the labels actually painted (the same
|
|
9
|
-
* reasoning as the charts'
|
|
9
|
+
* reasoning as the charts' measured margins), not on a guessed pill width.
|
|
10
10
|
*
|
|
11
11
|
* **Mobile (`< sm`).** The first `inline` children stay pills; every child — inline ones included —
|
|
12
12
|
* also renders its full-width sheet form inside the `Filters (n)` Drawer — which exists only when
|
|
@@ -173,14 +173,12 @@ export function FilterSet({
|
|
|
173
173
|
function useOverflowFit(rowRef: RefObject<HTMLDivElement | null>, count: number): number {
|
|
174
174
|
const [fit, setFit] = useState(count)
|
|
175
175
|
const widths = useRef<number[]>([])
|
|
176
|
+
const canObserve = typeof ResizeObserver !== 'undefined'
|
|
176
177
|
|
|
177
178
|
useEffect(() => {
|
|
178
179
|
const row = rowRef.current
|
|
179
180
|
if (row === null) return
|
|
180
|
-
if (
|
|
181
|
-
setFit(count)
|
|
182
|
-
return
|
|
183
|
-
}
|
|
181
|
+
if (!canObserve) return
|
|
184
182
|
|
|
185
183
|
const measure = (): void => {
|
|
186
184
|
const slots = [...row.querySelectorAll<HTMLElement>('[data-filter-slot]')]
|
|
@@ -213,9 +211,9 @@ function useOverflowFit(rowRef: RefObject<HTMLDivElement | null>, count: number)
|
|
|
213
211
|
return () => {
|
|
214
212
|
observer.disconnect()
|
|
215
213
|
}
|
|
216
|
-
}, [rowRef, count])
|
|
214
|
+
}, [rowRef, count, canObserve])
|
|
217
215
|
|
|
218
|
-
return fit
|
|
216
|
+
return canObserve ? fit : count
|
|
219
217
|
}
|
|
220
218
|
|
|
221
219
|
function fitCount(
|
|
@@ -26,8 +26,8 @@ import type { BasaltProps, SlotStylesProps } from '../common/props'
|
|
|
26
26
|
import { assertRequiredProps } from '../common/validate'
|
|
27
27
|
import { BarActionSlot } from './actions'
|
|
28
28
|
import type { SlotActions } from './actions'
|
|
29
|
-
import { WidgetHeader } from '../dashboard'
|
|
30
|
-
import type { WidgetHeaderTitleProps } from '../dashboard'
|
|
29
|
+
import { WidgetHeader } from '../dashboard/widget-header'
|
|
30
|
+
import type { WidgetHeaderTitleProps } from '../dashboard/widget-header'
|
|
31
31
|
import { useFormState } from '../forms/form-state'
|
|
32
32
|
import classes from './form-layout.module.css'
|
|
33
33
|
|
package/src/controls/glyphs.tsx
CHANGED
|
@@ -47,16 +47,6 @@ export function CalendarGlyph(): ReactNode {
|
|
|
47
47
|
)
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
/** `CompareFilter`'s default leading icon — the arrows-swap glyph. */
|
|
51
|
-
export function SwapGlyph(): ReactNode {
|
|
52
|
-
return (
|
|
53
|
-
<Stroke>
|
|
54
|
-
<path d="M4 8h13l-3.5 -3.5" />
|
|
55
|
-
<path d="M20 16h-13l3.5 3.5" />
|
|
56
|
-
</Stroke>
|
|
57
|
-
)
|
|
58
|
-
}
|
|
59
|
-
|
|
60
50
|
/** The mobile `Filters (n)` pill's leading icon. */
|
|
61
51
|
export function FunnelGlyph(): ReactNode {
|
|
62
52
|
return (
|
package/src/controls/index.ts
CHANGED
|
@@ -2,70 +2,19 @@
|
|
|
2
2
|
* `basalt-ui/controls` — the Mantine-coupled control tier (`docs/CONTROLS-SPEC.md` §3).
|
|
3
3
|
*
|
|
4
4
|
* Every control here renders at the `ctl` tier from the home that hosts it and owns its own
|
|
5
|
-
* desktop/mobile swap in CSS (law C9).
|
|
6
|
-
* follows in wave 4.
|
|
5
|
+
* desktop/mobile swap in CSS (law C9).
|
|
7
6
|
*/
|
|
8
|
-
export {
|
|
9
|
-
|
|
10
|
-
OverflowMenu,
|
|
11
|
-
MOBILE_GLOBAL_BAR_MAX,
|
|
12
|
-
barActionMobile,
|
|
13
|
-
globalActionMobile,
|
|
14
|
-
type BarAction,
|
|
15
|
-
type BarActionItem,
|
|
16
|
-
type BarActionMenu,
|
|
17
|
-
type BarActionCustom,
|
|
18
|
-
type ActionGroupProps,
|
|
19
|
-
type GlobalAction,
|
|
20
|
-
type OverflowMenuProps,
|
|
21
|
-
} from './actions'
|
|
22
|
-
export { SyncButton, formatAge, AGE_REFRESH_MS, type SyncButtonProps } from './sync-button'
|
|
23
|
-
export { ControlGroup, type ControlGroupProps } from './control-group'
|
|
7
|
+
export { type BarAction, type GlobalAction } from './actions'
|
|
8
|
+
export { SyncButton } from './sync-button'
|
|
24
9
|
|
|
25
|
-
// ── Filters + tabs (wave 4) ───────────────────────────────────────────────────────────────────
|
|
26
10
|
// `FilterPill`, `FilterSheet` and the `EnumFilter` body are deliberately NOT here: reaching for
|
|
27
|
-
// them is hand-rolling a filter (`basalt/hand-rolled-filter`)
|
|
28
|
-
|
|
29
|
-
export {
|
|
30
|
-
export {
|
|
31
|
-
export {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
} from './
|
|
37
|
-
export {
|
|
38
|
-
SelectFilter,
|
|
39
|
-
type FilterOption,
|
|
40
|
-
type SelectFilterEnumProps,
|
|
41
|
-
type SelectFilterProps,
|
|
42
|
-
type SelectFilterStringProps,
|
|
43
|
-
} from './select-filter'
|
|
44
|
-
export { MultiSelectFilter, type MultiSelectFilterProps } from './multi-select-filter'
|
|
45
|
-
export { NumberFilter, type NumberFilterOption, type NumberFilterProps } from './number-filter'
|
|
46
|
-
export { SearchFilter, type SearchFilterProps } from './search-filter'
|
|
47
|
-
export { ToggleFilter, type ToggleFilterProps } from './toggle-filter'
|
|
48
|
-
export { ViewTabs, type ViewTabsOption, type ViewTabsProps } from './view-tabs'
|
|
49
|
-
|
|
50
|
-
// ── The `panel` surface (docs/ASIDE-SPEC.md wave 2) ───────────────────────────────────────────
|
|
51
|
-
// The two row-level primitives an aside body needs. `PanelRow` is the home (it wraps its slots in
|
|
52
|
-
// `CtlSlot`), and `SliderControl` is the one bound control that has no pill form at all — see their
|
|
53
|
-
// docs. The filters above render their own panel forms; there is nothing extra to import for them.
|
|
54
|
-
export { PanelRow, type PanelRowProps } from './panel-row'
|
|
55
|
-
export { SliderControl, type SliderControlProps } from './slider-control'
|
|
56
|
-
|
|
57
|
-
// ── The form layout (moved from ./forms in 1.36.0) ────────────────────────────────────────────
|
|
58
|
-
// Layout needs no `@mantine/form`, and `./forms`' barrel value-imports it — so a consumer rendering
|
|
59
|
-
// a `FormRow` had to install a peer it never used. `./forms` re-exports these until 1.39.0.
|
|
60
|
-
export {
|
|
61
|
-
FormSection,
|
|
62
|
-
FormRow,
|
|
63
|
-
FormGroup,
|
|
64
|
-
FormActions,
|
|
65
|
-
type FormSectionProps,
|
|
66
|
-
type FormSectionSlot,
|
|
67
|
-
type FormRowProps,
|
|
68
|
-
type FormRowSlot,
|
|
69
|
-
type FormGroupProps,
|
|
70
|
-
type FormActionsProps,
|
|
71
|
-
} from './form-layout'
|
|
11
|
+
// them is hand-rolling a filter (`basalt/hand-rolled-filter`).
|
|
12
|
+
export { FilterSet } from './filter-set'
|
|
13
|
+
export { RangeFilter } from './range-filter'
|
|
14
|
+
export { SelectFilter } from './select-filter'
|
|
15
|
+
export { MultiSelectFilter } from './multi-select-filter'
|
|
16
|
+
export { NumberFilter } from './number-filter'
|
|
17
|
+
export { SearchFilter } from './search-filter'
|
|
18
|
+
export { ToggleFilter } from './toggle-filter'
|
|
19
|
+
export { ViewTabs } from './view-tabs'
|
|
20
|
+
export { FormRow, FormGroup } from './form-layout'
|
|
@@ -25,21 +25,22 @@
|
|
|
25
25
|
import { Checkbox, Stack } from '@mantine/core'
|
|
26
26
|
import { useState } from 'react'
|
|
27
27
|
import type { CSSProperties, ReactNode } from 'react'
|
|
28
|
-
import type { BasaltProps } from '../common/props'
|
|
29
28
|
import { assertRequiredProps } from '../common/validate'
|
|
30
|
-
import type { FieldHandle
|
|
29
|
+
import type { FieldHandle } from '../state'
|
|
30
|
+
import type { MultiField } from '../state/fields'
|
|
31
31
|
import type { FilterOption } from './select-filter'
|
|
32
32
|
import classes from './controls.module.css'
|
|
33
33
|
import { POPOVER_ROW_HIT_GAP, useFilterRegistration, useFilterSurface } from './filter-context'
|
|
34
34
|
import { FilterClearButton, FilterPill } from './filter-pill'
|
|
35
35
|
import { CheckGlyph, useControlName } from './filter-sheet'
|
|
36
36
|
import { PanelRow } from './panel-row'
|
|
37
|
+
import type { UncontrolledProps } from './uncontrolled'
|
|
37
38
|
|
|
38
39
|
/** How many facet rows a panel shows before the rest fold behind `Show N more`. Six is the point at
|
|
39
40
|
* which a facet column stops being a list you scan and starts being one you scroll. */
|
|
40
41
|
const PANEL_FACET_MAX = 6
|
|
41
42
|
|
|
42
|
-
export type MultiSelectFilterProps<T extends string> =
|
|
43
|
+
export type MultiSelectFilterProps<T extends string> = UncontrolledProps & {
|
|
43
44
|
readonly field: FieldHandle<MultiField<T>>
|
|
44
45
|
readonly label: string
|
|
45
46
|
readonly icon?: ReactNode
|
|
@@ -75,7 +76,7 @@ export type MultiSelectFilterProps<T extends string> = BasaltProps & {
|
|
|
75
76
|
|
|
76
77
|
export function MultiSelectFilter<T extends string>(props: MultiSelectFilterProps<T>): ReactNode {
|
|
77
78
|
// F-ERR-1 — without this a missing `field` surfaces as `undefined is not an object
|
|
78
|
-
// (evaluating 'field.use')`, caught by `
|
|
79
|
+
// (evaluating 'field.use')`, caught by `RootBoundary`.
|
|
79
80
|
assertRequiredProps('MultiSelectFilter', props, ['field'], {
|
|
80
81
|
field: 'bind it to a store field (`store.field.<name>`), never a value/onChange pair.',
|
|
81
82
|
})
|
|
@@ -63,7 +63,8 @@ import { useEffect, useRef, useState } from 'react'
|
|
|
63
63
|
import type { ReactNode } from 'react'
|
|
64
64
|
import type { BasaltProps } from '../common/props'
|
|
65
65
|
import { assertRequiredProps } from '../common/validate'
|
|
66
|
-
import type { FieldHandle
|
|
66
|
+
import type { FieldHandle } from '../state'
|
|
67
|
+
import type { NumberField } from '../state/fields'
|
|
67
68
|
import classes from './controls.module.css'
|
|
68
69
|
import { EnumFilter } from './enum-filter'
|
|
69
70
|
import type { ChoiceHandle } from './enum-filter'
|
|
@@ -71,6 +72,7 @@ import { useFilterRegistration, useFilterSurface } from './filter-context'
|
|
|
71
72
|
import { FilterClearButton, FilterPill } from './filter-pill'
|
|
72
73
|
import { useControlName } from './filter-sheet'
|
|
73
74
|
import { PanelRow } from './panel-row'
|
|
75
|
+
import type { UncontrolledProps } from './uncontrolled'
|
|
74
76
|
|
|
75
77
|
/** One row of a numeric preset set. Narrower than `FilterOption` — a preset is never `disabled`:
|
|
76
78
|
* the set is declared at the call site, so a row that should not be offered is left out. */
|
|
@@ -79,7 +81,7 @@ export type NumberFilterOption = {
|
|
|
79
81
|
readonly label: string
|
|
80
82
|
}
|
|
81
83
|
|
|
82
|
-
export type NumberFilterProps =
|
|
84
|
+
export type NumberFilterProps = UncontrolledProps & {
|
|
83
85
|
readonly field: FieldHandle<NumberField>
|
|
84
86
|
/** The popover/sheet heading and the accessible name — never the pill text, which reads the
|
|
85
87
|
* VALUE (see `EnumFilter`'s doc for why a pill may only print what is selected). */
|
|
@@ -102,7 +104,7 @@ export type NumberFilterProps = BasaltProps & {
|
|
|
102
104
|
|
|
103
105
|
export function NumberFilter(props: NumberFilterProps): ReactNode {
|
|
104
106
|
// F-ERR-1 — without this a missing `field` surfaces as `undefined is not an object
|
|
105
|
-
// (evaluating 'field.use')`, caught by `
|
|
107
|
+
// (evaluating 'field.use')`, caught by `RootBoundary`.
|
|
106
108
|
assertRequiredProps('NumberFilter', props, ['field'], {
|
|
107
109
|
field: 'bind it to a store field (`store.field.<name>`), never a value/onChange pair.',
|
|
108
110
|
})
|
|
@@ -316,7 +318,9 @@ function useCommittedNumber(
|
|
|
316
318
|
const [draft, setDraft] = useState<number | string>(value)
|
|
317
319
|
const seen = useRef(value)
|
|
318
320
|
const commitRef = useRef(setValue)
|
|
319
|
-
|
|
321
|
+
useEffect(() => {
|
|
322
|
+
commitRef.current = setValue
|
|
323
|
+
})
|
|
320
324
|
|
|
321
325
|
useEffect(() => {
|
|
322
326
|
if (seen.current === value) return
|
|
@@ -30,15 +30,16 @@
|
|
|
30
30
|
import { SegmentedControl, Select, Stack } from '@mantine/core'
|
|
31
31
|
import { useEffect, useRef, useState } from 'react'
|
|
32
32
|
import type { ComponentType, ReactNode } from 'react'
|
|
33
|
-
import type { BasaltProps } from '../common/props'
|
|
34
33
|
import { assertRequiredProps } from '../common/validate'
|
|
35
|
-
import type { FieldHandle
|
|
34
|
+
import type { FieldHandle } from '../state'
|
|
35
|
+
import type { RangeField, RangeValue } from '../state/fields'
|
|
36
36
|
import classes from './controls.module.css'
|
|
37
37
|
import { useFilterRegistration, useFilterSurface } from './filter-context'
|
|
38
38
|
import { FilterPill } from './filter-pill'
|
|
39
39
|
import { CalendarGlyph } from './glyphs'
|
|
40
40
|
import { useControlName } from './filter-sheet'
|
|
41
41
|
import { PanelRow } from './panel-row'
|
|
42
|
+
import type { UncontrolledProps } from './uncontrolled'
|
|
42
43
|
|
|
43
44
|
/** Past four presets the track goes vertical. */
|
|
44
45
|
const VERTICAL_FROM = 5
|
|
@@ -81,7 +82,7 @@ export type RangeCustomPickerProps = {
|
|
|
81
82
|
}
|
|
82
83
|
|
|
83
84
|
/** Everything about the props that does not depend on the field's `custom` flag. */
|
|
84
|
-
type RangeFilterBase<P extends string, C extends boolean> =
|
|
85
|
+
type RangeFilterBase<P extends string, C extends boolean> = UncontrolledProps & {
|
|
85
86
|
/**
|
|
86
87
|
* A range handle from either store factory. Generic over the field's `custom` flag so a
|
|
87
88
|
* `field.range({ ... })` WITHOUT `custom` (whose handle is `RangeField<P, false>`, and whose
|
|
@@ -112,7 +113,7 @@ export function RangeFilter<P extends string, C extends boolean = boolean>(
|
|
|
112
113
|
props: RangeFilterProps<P, C>,
|
|
113
114
|
): ReactNode {
|
|
114
115
|
// F-ERR-1 — without this a missing `field` surfaces as `undefined is not an object
|
|
115
|
-
// (evaluating 'field.use')`, caught by `
|
|
116
|
+
// (evaluating 'field.use')`, caught by `RootBoundary`.
|
|
116
117
|
assertRequiredProps('RangeFilter', props, ['field'], {
|
|
117
118
|
field: 'bind it to a store field (`store.field.<name>`), never a value/onChange pair.',
|
|
118
119
|
})
|
|
@@ -13,19 +13,21 @@
|
|
|
13
13
|
* <SearchFilter field={table.field.q} placeholder="Search pages" />
|
|
14
14
|
*/
|
|
15
15
|
import { TextInput } from '@mantine/core'
|
|
16
|
+
import { useDebouncedCallback } from '@mantine/hooks'
|
|
16
17
|
import { useEffect, useRef, useState } from 'react'
|
|
17
18
|
import type { ReactNode } from 'react'
|
|
18
|
-
import type { BasaltProps } from '../common/props'
|
|
19
19
|
import { assertRequiredProps } from '../common/validate'
|
|
20
|
-
import type { FieldHandle
|
|
20
|
+
import type { FieldHandle } from '../state'
|
|
21
|
+
import type { StringField } from '../state/fields'
|
|
21
22
|
import { useFilterRegistration, useFilterSurface } from './filter-context'
|
|
22
23
|
import { useControlName } from './filter-sheet'
|
|
23
24
|
import { PanelRow } from './panel-row'
|
|
25
|
+
import type { UncontrolledProps } from './uncontrolled'
|
|
24
26
|
|
|
25
27
|
/** One navigation per typed phrase, not per keystroke. */
|
|
26
28
|
const DEBOUNCE_MS = 200
|
|
27
29
|
|
|
28
|
-
export type SearchFilterProps =
|
|
30
|
+
export type SearchFilterProps = UncontrolledProps & {
|
|
29
31
|
readonly field: FieldHandle<StringField>
|
|
30
32
|
readonly placeholder?: string
|
|
31
33
|
/** Sheet-form heading. @default 'Search' */
|
|
@@ -34,7 +36,7 @@ export type SearchFilterProps = BasaltProps & {
|
|
|
34
36
|
|
|
35
37
|
export function SearchFilter(props: SearchFilterProps): ReactNode {
|
|
36
38
|
// F-ERR-1 — without this a missing `field` surfaces as `undefined is not an object
|
|
37
|
-
// (evaluating 'field.use')`, caught by `
|
|
39
|
+
// (evaluating 'field.use')`, caught by `RootBoundary`.
|
|
38
40
|
assertRequiredProps('SearchFilter', props, ['field'], {
|
|
39
41
|
field: 'bind it to a store field (`store.field.<name>`), never a value/onChange pair.',
|
|
40
42
|
})
|
|
@@ -98,27 +100,31 @@ function useDebouncedField(
|
|
|
98
100
|
): { value: string; set: (next: string) => void } {
|
|
99
101
|
const [draft, setDraft] = useState(value)
|
|
100
102
|
const seen = useRef(value)
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
+
const held = useRef(value)
|
|
104
|
+
useEffect(() => {
|
|
105
|
+
held.current = value
|
|
106
|
+
})
|
|
107
|
+
const commit = useDebouncedCallback((next: string) => {
|
|
108
|
+
// A phrase typed and erased inside the window ends where it began: nothing to write.
|
|
109
|
+
if (next === held.current) return
|
|
110
|
+
seen.current = next
|
|
111
|
+
setValue(next)
|
|
112
|
+
}, DEBOUNCE_MS)
|
|
103
113
|
|
|
104
114
|
useEffect(() => {
|
|
105
115
|
if (seen.current === value) return
|
|
106
116
|
seen.current = value
|
|
107
117
|
setDraft(value)
|
|
108
|
-
|
|
118
|
+
commit.cancel()
|
|
119
|
+
}, [value, commit])
|
|
109
120
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
commit
|
|
115
|
-
},
|
|
116
|
-
|
|
117
|
-
clearTimeout(timer)
|
|
118
|
-
}
|
|
119
|
-
}, [draft, value])
|
|
120
|
-
|
|
121
|
-
return { value: draft, set: setDraft }
|
|
121
|
+
return {
|
|
122
|
+
value: draft,
|
|
123
|
+
set: (next) => {
|
|
124
|
+
setDraft(next)
|
|
125
|
+
commit(next)
|
|
126
|
+
},
|
|
127
|
+
}
|
|
122
128
|
}
|
|
123
129
|
|
|
124
130
|
function SearchIcon(): ReactNode {
|
|
@@ -30,10 +30,11 @@
|
|
|
30
30
|
* />
|
|
31
31
|
*/
|
|
32
32
|
import type { ReactNode } from 'react'
|
|
33
|
-
import type { BasaltProps } from '../common/props'
|
|
34
33
|
import { assertRequiredProps } from '../common/validate'
|
|
35
|
-
import type { EnumField, FieldHandle
|
|
34
|
+
import type { EnumField, FieldHandle } from '../state'
|
|
35
|
+
import type { StringField } from '../state/fields'
|
|
36
36
|
import { EnumFilter } from './enum-filter'
|
|
37
|
+
import type { UncontrolledProps } from './uncontrolled'
|
|
37
38
|
|
|
38
39
|
/**
|
|
39
40
|
* One row of a runtime catalogue. Wider than the store's own `FieldOption` by exactly one member:
|
|
@@ -47,7 +48,7 @@ export type FilterOption = {
|
|
|
47
48
|
readonly disabled?: boolean
|
|
48
49
|
}
|
|
49
50
|
|
|
50
|
-
type SelectFilterCommon =
|
|
51
|
+
type SelectFilterCommon = UncontrolledProps & {
|
|
51
52
|
readonly label: string
|
|
52
53
|
readonly icon?: ReactNode
|
|
53
54
|
/** Adds a `Clear` action that writes the field back to its fallback. */
|
|
@@ -82,7 +83,7 @@ export function SelectFilter(props: SelectFilterStringProps): ReactNode
|
|
|
82
83
|
export function SelectFilter<T extends string>(props: SelectFilterProps<T>): ReactNode {
|
|
83
84
|
// F-ERR-1: without this, a `field` that never arrived surfaces as
|
|
84
85
|
// `undefined is not an object (evaluating 'field.use')` from inside `EnumFilter`, caught by
|
|
85
|
-
// `
|
|
86
|
+
// `RootBoundary` and rendered as a blank subtree. `field` is not optional in the type, so
|
|
86
87
|
// this only ever fires on untyped JS, a `props` object built at runtime, or a store key that
|
|
87
88
|
// resolved to nothing — all three of which the message now names.
|
|
88
89
|
assertRequiredProps('SelectFilter', props, ['field'], {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* button relying on its visible children would be an unnamed icon on a phone.
|
|
22
22
|
*/
|
|
23
23
|
import { ActionIcon, Button, Tooltip } from '@mantine/core'
|
|
24
|
-
import {
|
|
24
|
+
import { useSyncExternalStore } from 'react'
|
|
25
25
|
import type { ReactNode } from 'react'
|
|
26
26
|
import { cx } from '../common/props'
|
|
27
27
|
import type { BasaltProps } from '../common/props'
|
|
@@ -73,30 +73,28 @@ function toMillis(at: number | Date | null | undefined): number | undefined {
|
|
|
73
73
|
* The age string, refreshed on an interval that exists ONLY while the component is mounted and
|
|
74
74
|
* only while there is an age to show — a sync control on a background route costs no timer.
|
|
75
75
|
*
|
|
76
|
-
* The clock is read
|
|
77
|
-
* renders inline in the shell header (no portal), so under SSR the
|
|
78
|
-
* a client hydrating a minute later would emit `1m ago` — a React
|
|
79
|
-
* subtree. Server and
|
|
80
|
-
*
|
|
76
|
+
* The clock is read through `useSyncExternalStore`, whose server snapshot omits the age. A global
|
|
77
|
+
* `SyncButton` in `globalActions` renders inline in the shell header (no portal), so under SSR the
|
|
78
|
+
* server would emit `just now` and a client hydrating a minute later would emit `1m ago` — a React
|
|
79
|
+
* text mismatch that discards the subtree. Server and hydrating paint both omit the age; React
|
|
80
|
+
* re-renders with the client snapshot right after. The snapshot is the formatted label, a bucketed
|
|
81
|
+
* string (`just now`, `1m ago`, …), so it is stable across calls within a bucket and a tick only
|
|
82
|
+
* re-renders when the label changes. With no timestamp there is no subscription and no timer.
|
|
81
83
|
*/
|
|
82
84
|
function useRelativeAge(at: number | Date | null | undefined): string | undefined {
|
|
83
|
-
const [age, setAge] = useState<string | undefined>(undefined)
|
|
84
85
|
const timestamp = toMillis(at)
|
|
86
|
+
return useSyncExternalStore(
|
|
87
|
+
timestamp === undefined ? subscribeNever : subscribeAgeTick,
|
|
88
|
+
() => (timestamp === undefined ? undefined : formatAge(Date.now() - timestamp)),
|
|
89
|
+
() => undefined,
|
|
90
|
+
)
|
|
91
|
+
}
|
|
85
92
|
|
|
86
|
-
|
|
87
|
-
if (timestamp === undefined) {
|
|
88
|
-
setAge(undefined)
|
|
89
|
-
return
|
|
90
|
-
}
|
|
91
|
-
const publish = (): void => {
|
|
92
|
-
setAge(formatAge(Date.now() - timestamp))
|
|
93
|
-
}
|
|
94
|
-
publish()
|
|
95
|
-
const id = setInterval(publish, AGE_REFRESH_MS)
|
|
96
|
-
return () => clearInterval(id)
|
|
97
|
-
}, [timestamp])
|
|
93
|
+
const subscribeNever = (): (() => void) => () => {}
|
|
98
94
|
|
|
99
|
-
|
|
95
|
+
function subscribeAgeTick(onTick: () => void): () => void {
|
|
96
|
+
const id = setInterval(onTick, AGE_REFRESH_MS)
|
|
97
|
+
return () => clearInterval(id)
|
|
100
98
|
}
|
|
101
99
|
|
|
102
100
|
function RefreshGlyph({ spinning }: { spinning: boolean }) {
|