basalt-ui 1.40.3 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +50 -45
- package/CHANGELOG.md +543 -513
- package/MIGRATING.md +969 -37
- package/README.md +172 -367
- package/agent/rules/basalt-batteries.md +19 -74
- package/agent/rules/basalt-charts.md +21 -95
- package/agent/rules/basalt-controls.md +23 -131
- package/agent/rules/basalt-mantine.md +26 -99
- package/agent/rules/basalt-state.md +21 -103
- package/agent/rules/basalt-tokens.md +33 -114
- package/agent/skills/basalt-app/SKILL.md +229 -72
- package/agent/skills/basalt-charts/SKILL.md +23 -57
- package/agent/skills/basalt-design/SKILL.md +12 -70
- package/agent/templates/AGENTS-block.md.tpl +30 -0
- package/agent/templates/DESIGN.md.tpl +2 -2
- package/agent/templates/__root.tpl +9 -16
- package/agent/templates/main.tpl +21 -0
- package/agent/templates/nav.tpl +18 -0
- package/configs/check.yml +1 -1
- package/configs/oxlint-basalt.json +4 -10
- package/configs/oxlint-plugin.js +468 -847
- package/configs/oxlint-plugin.test.ts +662 -710
- package/configs/oxlint.json +10 -2
- package/dist/agent/ai-sdk-transport.d.ts +19 -7
- package/dist/agent/ai-sdk-transport.d.ts.map +1 -1
- package/dist/agent/ai-sdk-transport.js +10 -7
- package/dist/{agent-chat → agent/chat}/composer.d.ts +16 -16
- package/dist/agent/chat/composer.d.ts.map +1 -0
- package/dist/{agent-chat → agent/chat}/composer.js +10 -9
- package/dist/{agent-chat → agent/chat}/message-affordances.d.ts +7 -6
- package/dist/agent/chat/message-affordances.d.ts.map +1 -0
- package/dist/agent/chat/relative-time.d.ts.map +1 -0
- package/dist/{agent-chat → agent/chat}/thread-feed-row.d.ts +18 -16
- package/dist/agent/chat/thread-feed-row.d.ts.map +1 -0
- package/dist/{agent-chat → agent/chat}/thread-feed-row.js +12 -11
- package/dist/{agent-chat → agent/chat}/thread-feed.d.ts +8 -8
- package/dist/agent/chat/thread-feed.d.ts.map +1 -0
- package/dist/{agent-chat → agent/chat}/thread-feed.js +12 -10
- package/dist/{agent-chat → agent/chat}/thread-message.d.ts +12 -9
- package/dist/agent/chat/thread-message.d.ts.map +1 -0
- package/dist/{agent-chat → agent/chat}/thread-message.js +15 -13
- package/dist/{agent-chat → agent/chat}/thread-outcome-card.d.ts +2 -2
- package/dist/agent/chat/thread-outcome-card.d.ts.map +1 -0
- package/dist/{agent-chat → agent/chat}/thread-outcome-card.js +3 -3
- package/dist/{agent-chat → agent/chat}/tool-chip.d.ts +5 -5
- package/dist/agent/chat/tool-chip.d.ts.map +1 -0
- package/dist/{agent-chat → agent/chat}/tool-chip.js +4 -4
- package/dist/agent/chat/use-keyboard-inset.d.ts.map +1 -0
- package/dist/{agent-chat → agent/chat}/use-keyboard-inset.js +1 -1
- package/dist/{agent-chat → agent/chat}/virtualize.d.ts +7 -7
- package/dist/agent/chat/virtualize.d.ts.map +1 -0
- package/dist/agent/error.d.ts +31 -0
- package/dist/agent/error.d.ts.map +1 -0
- package/dist/agent/error.js +18 -0
- package/dist/agent/foreign.d.ts +3 -2
- package/dist/agent/foreign.d.ts.map +1 -1
- package/dist/agent/history.d.ts +2 -36
- package/dist/agent/history.d.ts.map +1 -1
- package/dist/agent/history.js +0 -32
- package/dist/agent/id.d.ts +4 -5
- package/dist/agent/id.d.ts.map +1 -1
- package/dist/agent/index.d.ts +19 -52
- package/dist/agent/index.d.ts.map +1 -1
- package/dist/agent/index.js +10 -32
- package/dist/agent/outcome.d.ts +3 -14
- package/dist/agent/outcome.d.ts.map +1 -1
- package/dist/agent/outcome.js +0 -30
- package/dist/agent/part-list.d.ts +3 -3
- package/dist/agent/part-list.d.ts.map +1 -1
- package/dist/agent/parts.d.ts +23 -24
- package/dist/agent/parts.d.ts.map +1 -1
- package/dist/agent/run-committer.d.ts +23 -0
- package/dist/agent/run-committer.d.ts.map +1 -0
- package/dist/agent/run-committer.js +41 -0
- package/dist/agent/run-records.d.ts +77 -0
- package/dist/agent/run-records.d.ts.map +1 -0
- package/dist/agent/run-records.js +69 -0
- package/dist/agent/thread.d.ts +23 -47
- package/dist/agent/thread.d.ts.map +1 -1
- package/dist/agent/thread.js +3 -134
- package/dist/agent/transport.d.ts +6 -69
- package/dist/agent/transport.d.ts.map +1 -1
- package/dist/agent/transport.js +0 -18
- package/dist/agent/use-agent-thread-runs.d.ts +63 -26
- package/dist/agent/use-agent-thread-runs.d.ts.map +1 -1
- package/dist/agent/use-agent-thread-runs.js +202 -66
- package/dist/charts/BandStrip.d.ts +46 -0
- package/dist/charts/BandStrip.d.ts.map +1 -0
- package/dist/charts/BandStrip.js +151 -0
- package/dist/charts/Bars.d.ts +19 -0
- package/dist/charts/Bars.d.ts.map +1 -0
- package/dist/charts/Bars.js +77 -0
- package/dist/charts/CartesianChart.d.ts +57 -0
- package/dist/charts/CartesianChart.d.ts.map +1 -0
- package/dist/charts/CartesianChart.js +121 -0
- package/dist/charts/ChartCard.d.ts +34 -0
- package/dist/charts/ChartCard.d.ts.map +1 -0
- package/dist/charts/ChartCard.js +115 -0
- package/dist/charts/Donut.d.ts +25 -0
- package/dist/charts/Donut.d.ts.map +1 -0
- package/dist/charts/Donut.js +191 -0
- package/dist/charts/DualPanel.d.ts +47 -0
- package/dist/charts/DualPanel.d.ts.map +1 -0
- package/dist/charts/DualPanel.js +214 -0
- package/dist/charts/Heatmap.d.ts +41 -0
- package/dist/charts/Heatmap.d.ts.map +1 -0
- package/dist/charts/Heatmap.js +216 -0
- package/dist/charts/Lines.d.ts +11 -0
- package/dist/charts/Lines.d.ts.map +1 -0
- package/dist/charts/Lines.js +114 -0
- package/dist/charts/MirroredBars.d.ts +44 -0
- package/dist/charts/MirroredBars.d.ts.map +1 -0
- package/dist/charts/MirroredBars.js +190 -0
- package/dist/charts/Sparkline.d.ts +22 -0
- package/dist/charts/Sparkline.d.ts.map +1 -0
- package/dist/charts/Sparkline.js +129 -0
- package/dist/charts/StackedArea.d.ts +15 -0
- package/dist/charts/StackedArea.d.ts.map +1 -0
- package/dist/charts/StackedArea.js +46 -0
- package/dist/charts/box.d.ts +38 -0
- package/dist/charts/box.d.ts.map +1 -0
- package/dist/charts/box.js +72 -0
- package/dist/charts/card-context.d.ts +3 -0
- package/dist/charts/card-context.d.ts.map +1 -0
- package/dist/charts/card-context.js +7 -0
- package/dist/charts/chart-box.module.css +64 -0
- package/{src/content/article-card.module.css.d.ts → dist/charts/chart-box.module.css.d.ts} +5 -9
- package/dist/charts/chart-card.module.css +25 -0
- package/dist/{dashboard/widget-grid.module.css.d.ts → charts/chart-card.module.css.d.ts} +1 -3
- package/dist/charts/chart-legend.module.css +38 -0
- package/{src/dashboard/widget-grid.module.css.d.ts → dist/charts/chart-legend.module.css.d.ts} +3 -3
- package/dist/charts/compile.d.ts +62 -0
- package/dist/charts/compile.d.ts.map +1 -0
- package/dist/charts/compile.js +386 -0
- package/dist/charts/cursor.d.ts +50 -0
- package/dist/charts/cursor.d.ts.map +1 -0
- package/dist/charts/cursor.js +157 -0
- package/dist/charts/curves.d.ts +12 -0
- package/dist/charts/curves.d.ts.map +1 -0
- package/dist/charts/curves.js +86 -0
- package/dist/charts/donut.module.css +54 -0
- package/dist/{content/article-card.module.css.d.ts → charts/donut.module.css.d.ts} +2 -9
- package/dist/charts/host.d.ts +17 -0
- package/dist/charts/host.d.ts.map +1 -0
- package/dist/charts/host.js +35 -0
- package/dist/charts/index.d.ts +18 -53
- package/dist/charts/index.d.ts.map +1 -1
- package/dist/charts/index.js +17 -189
- package/dist/charts/legend.d.ts +23 -0
- package/dist/charts/legend.d.ts.map +1 -0
- package/dist/charts/legend.js +160 -0
- package/dist/charts/marks.d.ts +25 -0
- package/dist/charts/marks.d.ts.map +1 -0
- package/dist/charts/marks.js +128 -0
- package/dist/charts/panel.d.ts +56 -0
- package/dist/charts/panel.d.ts.map +1 -0
- package/dist/charts/panel.js +123 -0
- package/dist/charts/scales.d.ts +44 -0
- package/dist/charts/scales.d.ts.map +1 -0
- package/dist/charts/scales.js +163 -0
- package/dist/charts/sizing.d.ts +12 -0
- package/dist/charts/sizing.d.ts.map +1 -0
- package/dist/charts/sizing.js +33 -0
- package/dist/charts/state.d.ts +17 -0
- package/dist/charts/state.d.ts.map +1 -0
- package/dist/charts/state.js +53 -0
- package/dist/charts/theme.d.ts +38 -19
- package/dist/charts/theme.d.ts.map +1 -1
- package/dist/charts/theme.js +48 -26
- package/dist/charts/types.d.ts +227 -0
- package/dist/charts/types.d.ts.map +1 -0
- package/dist/charts/types.js +4 -0
- package/dist/cli/audit-allows.d.ts +4 -17
- package/dist/cli/audit-allows.d.ts.map +1 -1
- package/dist/cli/config.d.ts +14 -43
- package/dist/cli/config.d.ts.map +1 -1
- package/dist/cli/doctor-upgrade.d.ts +31 -0
- package/dist/cli/doctor-upgrade.d.ts.map +1 -0
- package/dist/cli/doctor-upgrade.js +269 -0
- package/dist/cli/doctor.d.ts +13 -26
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +79 -8
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +2 -4
- package/dist/cli/index.d.ts +68 -135
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +89 -76
- package/dist/cli/init.d.ts.map +1 -1
- package/dist/cli/init.js +43 -27
- package/dist/cli/sync.d.ts +5 -21
- package/dist/cli/sync.d.ts.map +1 -1
- package/dist/cli/sync.js +4 -6
- package/dist/cli/tokens-css.d.ts +7 -28
- package/dist/cli/tokens-css.d.ts.map +1 -1
- package/dist/commands/ShortcutsHelp.d.ts.map +1 -1
- package/dist/commands/ShortcutsHelp.js +4 -5
- package/dist/commands/define-commands.d.ts +15 -31
- package/dist/commands/define-commands.d.ts.map +1 -1
- package/dist/commands/define-commands.js +1 -11
- package/dist/commands/define-overlays.d.ts +5 -19
- package/dist/commands/define-overlays.d.ts.map +1 -1
- package/dist/commands/define-overlays.js +3 -11
- package/dist/commands/index.d.ts +10 -40
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +9 -46
- package/dist/{notifications → commands/notifications}/bell.d.ts +1 -1
- package/dist/commands/notifications/bell.d.ts.map +1 -0
- package/dist/{notifications → commands/notifications}/center.d.ts +2 -2
- package/dist/commands/notifications/center.d.ts.map +1 -0
- package/dist/{notifications → commands/notifications}/center.js +2 -2
- package/dist/{notifications → commands/notifications}/define-notifications.d.ts +3 -3
- package/dist/commands/notifications/define-notifications.d.ts.map +1 -0
- package/dist/commands/notifications/notify.d.ts +44 -0
- package/dist/commands/notifications/notify.d.ts.map +1 -0
- package/dist/commands/notifications/notify.js +79 -0
- package/dist/{notifications → commands/notifications}/store.d.ts +2 -0
- package/dist/commands/notifications/store.d.ts.map +1 -0
- package/dist/{notifications → commands/notifications}/store.js +4 -0
- package/dist/commands/projectors.d.ts +1 -131
- package/dist/commands/projectors.d.ts.map +1 -1
- package/dist/commands/projectors.js +2 -73
- package/dist/commands/shell-bridge.d.ts +3 -3
- package/dist/commands/shortcut-format.d.ts +5 -4
- package/dist/commands/shortcut-format.d.ts.map +1 -1
- package/dist/common/errors.d.ts +3 -3
- package/dist/common/use-measured-widths.d.ts.map +1 -1
- package/dist/common/use-measured-widths.js +5 -3
- package/dist/common/validate.d.ts +2 -2
- package/dist/content/article-layout.d.ts.map +1 -1
- package/dist/content/article-layout.js +3 -3
- package/dist/content/article-model.d.ts +1 -46
- package/dist/content/article-model.d.ts.map +1 -1
- package/dist/content/article-model.js +1 -29
- package/dist/content/copy-action.d.ts +1 -1
- package/dist/content/glyphs.d.ts +1 -1
- package/dist/content/index.d.ts +11 -41
- package/dist/content/index.d.ts.map +1 -1
- package/dist/content/index.js +3 -35
- package/dist/content/markdown.d.ts +1 -1
- package/dist/content/markdown.d.ts.map +1 -1
- package/dist/content/markdown.js +1 -1
- package/dist/content/mermaid.d.ts.map +1 -1
- package/dist/content/mermaid.js +7 -7
- package/dist/content/slug.d.ts +1 -8
- package/dist/content/slug.d.ts.map +1 -1
- package/dist/content/slug.js +1 -8
- package/dist/content/url-hardening.d.ts +2 -2
- package/dist/content/url-hardening.d.ts.map +1 -1
- package/dist/content/url-hardening.js +2 -0
- package/dist/controls/actions.d.ts +16 -1
- package/dist/controls/actions.d.ts.map +1 -1
- package/dist/controls/enum-filter.d.ts +1 -1
- package/dist/controls/enum-filter.d.ts.map +1 -1
- package/dist/controls/filter-context.d.ts.map +1 -1
- package/dist/controls/filter-context.js +3 -1
- package/dist/controls/filter-set.js +4 -6
- package/dist/controls/form-layout.d.ts +1 -1
- package/dist/controls/form-layout.d.ts.map +1 -1
- package/dist/controls/form-layout.js +1 -1
- package/dist/controls/glyphs.d.ts +0 -2
- package/dist/controls/glyphs.d.ts.map +1 -1
- package/dist/controls/glyphs.js +0 -7
- package/dist/controls/index.d.ts +12 -17
- package/dist/controls/index.d.ts.map +1 -1
- package/dist/controls/index.js +5 -39
- package/dist/controls/multi-select-filter.d.ts +4 -3
- package/dist/controls/multi-select-filter.d.ts.map +1 -1
- package/dist/controls/number-filter.d.ts +4 -3
- package/dist/controls/number-filter.d.ts.map +1 -1
- package/dist/controls/number-filter.js +3 -1
- package/dist/controls/range-filter.d.ts +4 -3
- package/dist/controls/range-filter.d.ts.map +1 -1
- package/dist/controls/search-filter.d.ts +4 -3
- package/dist/controls/search-filter.d.ts.map +1 -1
- package/dist/controls/search-filter.js +19 -14
- package/dist/controls/select-filter.d.ts +4 -3
- package/dist/controls/select-filter.d.ts.map +1 -1
- package/dist/controls/sync-button.d.ts.map +1 -1
- package/dist/controls/sync-button.js +12 -15
- package/dist/controls/toggle-filter.d.ts +4 -3
- package/dist/controls/toggle-filter.d.ts.map +1 -1
- package/dist/controls/uncontrolled.d.ts +12 -0
- package/dist/controls/uncontrolled.d.ts.map +1 -0
- package/dist/controls/view-tabs.d.ts +2 -2
- package/dist/controls/view-tabs.d.ts.map +1 -1
- package/dist/controls-dates/index.d.ts +0 -1
- package/dist/controls-dates/index.d.ts.map +1 -1
- package/dist/dashboard/index.d.ts +7 -9
- package/dist/dashboard/index.d.ts.map +1 -1
- package/dist/dashboard/index.js +3 -23
- package/dist/dashboard/section.d.ts +4 -6
- package/dist/dashboard/section.d.ts.map +1 -1
- package/dist/dashboard/section.js +4 -10
- package/dist/dashboard/stat-card.d.ts +4 -4
- package/dist/dashboard/stat-card.d.ts.map +1 -1
- package/dist/dashboard/stat-card.js +3 -3
- package/dist/dashboard/widget-header.module.css +9 -7
- package/dist/dev-dock.d.ts.map +1 -1
- package/dist/dev-dock.js +6 -1
- package/dist/format/date.d.ts +0 -34
- package/dist/format/date.d.ts.map +1 -1
- package/dist/format/date.js +0 -54
- package/dist/format/index.d.ts +7 -22
- package/dist/format/index.d.ts.map +1 -1
- package/dist/format/index.js +2 -43
- package/dist/format/number.d.ts +3 -14
- package/dist/format/number.d.ts.map +1 -1
- package/dist/format/number.js +0 -13
- package/dist/format/shared.d.ts +2 -3
- package/dist/format/shared.d.ts.map +1 -1
- package/dist/forms/index.d.ts +0 -11
- package/dist/forms/index.d.ts.map +1 -1
- package/dist/forms/index.js +1 -14
- package/dist/guard/index.d.ts +6 -21
- package/dist/guard/index.d.ts.map +1 -1
- package/dist/guard/index.js +27 -115
- package/dist/guard/types.d.ts +7 -18
- package/dist/guard/types.d.ts.map +1 -1
- package/dist/index.d.ts +16 -48
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -117
- package/dist/provider/create-router.d.ts +44 -0
- package/dist/provider/create-router.d.ts.map +1 -0
- package/dist/provider/create-router.js +62 -0
- package/dist/provider/hotkeys.d.ts +8 -0
- package/dist/provider/hotkeys.d.ts.map +1 -0
- package/dist/provider/hotkeys.js +50 -0
- package/dist/provider/index.d.ts +33 -110
- package/dist/provider/index.d.ts.map +1 -1
- package/dist/provider/index.js +182 -82
- package/dist/provider/lab-theme.d.ts.map +1 -1
- package/dist/provider/route-transition.d.ts +76 -0
- package/dist/provider/route-transition.d.ts.map +1 -0
- package/dist/provider/route-transition.js +98 -0
- package/dist/provider/spotlight-actions.d.ts +10 -0
- package/dist/provider/spotlight-actions.d.ts.map +1 -0
- package/dist/provider/spotlight-actions.js +55 -0
- package/dist/provider/test-router.d.ts +6 -0
- package/dist/provider/test-router.d.ts.map +1 -0
- package/dist/provider/test-router.js +18 -0
- package/dist/query-client.d.ts +4 -20
- package/dist/query-client.d.ts.map +1 -1
- package/dist/query-client.js +2 -2
- package/dist/router-tanstack/index.d.ts +18 -64
- package/dist/router-tanstack/index.d.ts.map +1 -1
- package/dist/router-tanstack/index.js +2 -16
- package/dist/router-tanstack/nav.d.ts +12 -1
- package/dist/router-tanstack/nav.d.ts.map +1 -1
- package/dist/router-tanstack/nav.js +8 -1
- package/dist/router-tanstack/search-store.d.ts +1 -1
- package/dist/router-tanstack/search-store.d.ts.map +1 -1
- package/dist/router-tanstack/use-nav.d.ts +8 -9
- package/dist/router-tanstack/use-nav.d.ts.map +1 -1
- package/dist/router-tanstack/use-nav.js +20 -1
- package/dist/shell/app-mobile-nav.d.ts.map +1 -1
- package/dist/shell/app-sidebar.js +1 -1
- package/dist/shell/index.d.ts +31 -10
- package/dist/shell/index.d.ts.map +1 -1
- package/dist/shell/index.js +14 -3
- package/dist/shell/page-aside.d.ts +2 -2
- package/dist/shell/page-aside.d.ts.map +1 -1
- package/dist/shell/page-aside.js +31 -12
- package/dist/shell/page-bar.d.ts +2 -2
- package/dist/shell/page-bar.d.ts.map +1 -1
- package/dist/shell/page-bar.js +1 -1
- package/dist/state.d.ts +10 -12
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +4 -6
- package/dist/styles.css +107 -7
- package/dist/surfaces.d.ts +28 -103
- package/dist/surfaces.d.ts.map +1 -1
- package/dist/surfaces.js +54 -143
- package/dist/{data → table}/data-table-state.d.ts +1 -1
- package/dist/table/data-table-state.d.ts.map +1 -0
- package/dist/{data → table}/data-table-state.js +4 -3
- package/dist/{data → table}/data-table.d.ts +28 -49
- package/dist/table/data-table.d.ts.map +1 -0
- package/dist/{data → table}/data-table.js +74 -60
- package/dist/table/index.d.ts +18 -0
- package/dist/table/index.d.ts.map +1 -0
- package/dist/{data/table.js → table/index.js} +1 -1
- package/dist/table/query-branch.d.ts.map +1 -0
- package/dist/table/table-features.d.ts +69 -0
- package/dist/table/table-features.d.ts.map +1 -0
- package/dist/table/table-features.js +49 -0
- package/dist/telemetry.d.ts +77 -0
- package/dist/telemetry.d.ts.map +1 -0
- package/dist/telemetry.js +33 -0
- package/dist/theme/index.d.ts +10 -21
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +3 -14
- package/dist/theme/theme-toggle.d.ts.map +1 -1
- package/dist/theme/theme-toggle.js +7 -33
- package/dist/theme/theme-toggle.module.css +30 -0
- package/dist/theme/theme-toggle.module.css.d.ts +10 -0
- package/dist/theme-lab/derive-controls.d.ts.map +1 -1
- package/dist/theme-lab/derive-controls.js +5 -3
- package/dist/theme-lab/derive-state.d.ts.map +1 -1
- package/dist/theme-lab/derive-state.js +2 -1
- package/dist/tokens/core.d.ts +360 -0
- package/dist/tokens/core.d.ts.map +1 -0
- package/dist/tokens/core.js +708 -0
- package/dist/tokens/derive.d.ts +1 -1
- package/dist/tokens/derive.d.ts.map +1 -1
- package/dist/tokens/index.d.ts +5 -373
- package/dist/tokens/index.d.ts.map +1 -1
- package/dist/tokens/index.js +8 -700
- package/dist/tokens/palette.d.ts +2 -6
- package/dist/tokens/palette.d.ts.map +1 -1
- package/dist/tokens/palette.js +1 -4
- package/dist/vite.d.ts +4 -3
- package/dist/vite.d.ts.map +1 -1
- package/llms.txt +43 -85
- package/package.json +77 -170
- package/src/agent/ai-sdk-transport.ts +57 -37
- package/src/{agent-chat → agent/chat}/composer.tsx +29 -30
- package/src/{agent-chat → agent/chat}/message-affordances.ts +8 -5
- package/src/{agent-chat → agent/chat}/thread-feed-row.tsx +30 -35
- package/src/{agent-chat → agent/chat}/thread-feed.tsx +40 -35
- package/src/{agent-chat → agent/chat}/thread-message.tsx +37 -35
- package/src/{agent-chat → agent/chat}/thread-outcome-card.tsx +5 -5
- package/src/{agent-chat → agent/chat}/tool-chip.tsx +12 -12
- package/src/{agent-chat → agent/chat}/use-keyboard-inset.ts +1 -1
- package/src/{agent-chat → agent/chat}/virtualize.ts +5 -5
- package/src/agent/error.ts +43 -0
- package/src/agent/foreign.ts +3 -2
- package/src/agent/history.ts +2 -107
- package/src/agent/id.ts +4 -5
- package/src/agent/index.ts +23 -112
- package/src/agent/outcome.ts +3 -56
- package/src/agent/part-list.tsx +3 -3
- package/src/agent/parts.ts +23 -22
- package/src/agent/run-committer.ts +64 -0
- package/src/agent/run-records.ts +147 -0
- package/src/agent/thread.ts +24 -231
- package/src/agent/transport.ts +6 -96
- package/src/agent/use-agent-thread-runs.ts +364 -199
- package/src/charts/BandStrip.tsx +276 -0
- package/src/charts/Bars.tsx +141 -0
- package/src/charts/CartesianChart.tsx +206 -0
- package/src/charts/ChartCard.tsx +178 -0
- package/src/charts/Donut.tsx +256 -0
- package/src/charts/DualPanel.tsx +326 -0
- package/src/charts/Heatmap.tsx +282 -0
- package/src/charts/Lines.tsx +151 -0
- package/src/charts/MirroredBars.tsx +303 -0
- package/src/charts/Sparkline.tsx +176 -0
- package/src/charts/StackedArea.tsx +80 -0
- package/src/charts/box.tsx +96 -0
- package/src/charts/card-context.ts +11 -0
- package/src/charts/chart-box.module.css +64 -0
- package/src/charts/chart-box.module.css.d.ts +12 -0
- package/src/charts/chart-card.module.css +25 -0
- package/src/charts/chart-card.module.css.d.ts +8 -0
- package/src/charts/chart-legend.module.css +38 -0
- package/src/charts/chart-legend.module.css.d.ts +10 -0
- package/src/charts/compile.ts +585 -0
- package/src/charts/cursor.ts +282 -0
- package/src/charts/curves.ts +111 -0
- package/src/charts/donut.module.css +54 -0
- package/src/charts/donut.module.css.d.ts +9 -0
- package/src/charts/host.tsx +60 -0
- package/src/charts/index.ts +41 -178
- package/src/charts/legend.tsx +204 -0
- package/src/charts/marks.ts +201 -0
- package/src/charts/panel.tsx +227 -0
- package/src/charts/scales.ts +237 -0
- package/src/charts/sizing.ts +47 -0
- package/src/charts/state.tsx +80 -0
- package/src/charts/theme.ts +65 -0
- package/src/charts/types.ts +242 -0
- package/src/cli/audit-allows.ts +8 -30
- package/src/cli/config.ts +14 -43
- package/src/cli/doctor-upgrade.ts +392 -0
- package/src/cli/doctor.ts +120 -68
- package/src/cli/help.ts +2 -4
- package/src/cli/index.ts +161 -276
- package/src/cli/init.ts +60 -37
- package/src/cli/sync.ts +13 -45
- package/src/cli/tokens-css.ts +7 -28
- package/src/commands/ShortcutsHelp.tsx +8 -9
- package/src/commands/define-commands.ts +16 -43
- package/src/commands/define-overlays.ts +12 -36
- package/src/commands/index.ts +11 -94
- package/src/{notifications → commands/notifications}/bell.tsx +2 -2
- package/src/{notifications → commands/notifications}/center.tsx +7 -5
- package/src/{notifications → commands/notifications}/define-notifications.ts +3 -3
- package/src/commands/notifications/notify.tsx +158 -0
- package/src/{notifications → commands/notifications}/store.ts +10 -2
- package/src/commands/projectors.ts +5 -225
- package/src/commands/shell-bridge.ts +5 -5
- package/src/commands/shortcut-format.ts +5 -4
- package/src/common/errors.ts +3 -3
- package/src/common/use-measured-widths.ts +6 -3
- package/src/common/validate.ts +2 -2
- package/src/content/article-layout.tsx +37 -38
- package/src/content/article-model.ts +1 -84
- package/src/content/copy-action.tsx +1 -1
- package/src/content/glyphs.tsx +1 -1
- package/src/content/index.ts +12 -83
- package/src/content/markdown.tsx +4 -3
- package/src/content/mermaid.tsx +9 -7
- package/src/content/slug.ts +1 -16
- package/src/content/url-hardening.ts +8 -2
- package/src/controls/actions.tsx +24 -1
- package/src/controls/enum-filter.tsx +1 -1
- package/src/controls/filter-context.tsx +3 -1
- package/src/controls/filter-set.tsx +5 -7
- package/src/controls/form-layout.tsx +2 -2
- package/src/controls/glyphs.tsx +0 -10
- package/src/controls/index.ts +13 -64
- package/src/controls/multi-select-filter.tsx +5 -4
- package/src/controls/number-filter.tsx +8 -4
- package/src/controls/range-filter.tsx +5 -4
- package/src/controls/search-filter.tsx +25 -19
- package/src/controls/select-filter.tsx +5 -4
- package/src/controls/sync-button.tsx +18 -20
- package/src/controls/toggle-filter.tsx +5 -4
- package/src/controls/uncontrolled.ts +12 -0
- package/src/controls/view-tabs.tsx +3 -3
- package/src/controls-dates/date-range-picker.tsx +1 -1
- package/src/controls-dates/index.ts +0 -1
- package/src/dashboard/index.ts +7 -48
- package/src/dashboard/section.tsx +11 -40
- package/src/dashboard/stat-card.tsx +14 -16
- package/src/dashboard/widget-header.module.css +9 -7
- package/src/dev-dock.tsx +14 -27
- package/src/format/date.ts +2 -92
- package/src/format/index.ts +7 -53
- package/src/format/number.ts +3 -26
- package/src/format/shared.ts +2 -3
- package/src/forms/index.ts +0 -23
- package/src/guard/index.ts +37 -192
- package/src/guard/types.ts +6 -19
- package/src/index.ts +30 -282
- package/src/provider/create-router.tsx +138 -0
- package/src/provider/hotkeys.ts +70 -0
- package/src/provider/index.tsx +260 -230
- package/src/provider/lab-theme.ts +3 -2
- package/src/provider/route-transition.ts +199 -0
- package/src/provider/spotlight-actions.tsx +69 -0
- package/src/provider/test-router.tsx +25 -0
- package/src/query-client.ts +4 -22
- package/src/router-tanstack/index.ts +18 -112
- package/src/router-tanstack/nav.ts +28 -2
- package/src/router-tanstack/search-store.ts +9 -2
- package/src/router-tanstack/use-nav.ts +47 -13
- package/src/shell/app-mobile-nav.tsx +3 -2
- package/src/shell/app-sidebar.tsx +1 -1
- package/src/shell/aside-docking.ts +1 -1
- package/src/shell/index.tsx +61 -20
- package/src/shell/page-aside.tsx +47 -23
- package/src/shell/page-bar.tsx +3 -3
- package/src/shell/page-title.tsx +1 -1
- package/src/state.ts +11 -37
- package/src/styles.css +107 -7
- package/src/surfaces.ts +56 -151
- package/src/{data → table}/data-table-state.ts +5 -4
- package/src/{data → table}/data-table.tsx +170 -161
- package/src/table/index.ts +18 -0
- package/src/table/table-features.ts +102 -0
- package/src/telemetry.ts +110 -0
- package/src/theme/index.ts +22 -47
- package/src/theme/theme-toggle.module.css +30 -0
- package/src/theme/theme-toggle.module.css.d.ts +10 -0
- package/src/theme/theme-toggle.tsx +15 -43
- package/src/theme-lab/derive-controls.tsx +5 -3
- package/src/theme-lab/derive-state.ts +2 -1
- package/src/tokens/core.ts +1163 -0
- package/src/tokens/derive.ts +1 -1
- package/src/tokens/index.ts +14 -1181
- package/src/tokens/palette.ts +3 -7
- package/src/vite.ts +3 -3
- package/agent/templates/CLAUDE-block.md.tpl +0 -40
- package/agent/templates/query-client.ts.tpl +0 -26
- package/dist/agent/adapter.d.ts +0 -150
- package/dist/agent/adapter.d.ts.map +0 -1
- package/dist/agent/adapter.js +0 -482
- package/dist/agent/use-agent-stream.d.ts +0 -35
- package/dist/agent/use-agent-stream.d.ts.map +0 -1
- package/dist/agent/use-agent-stream.js +0 -59
- package/dist/agent-chat/composer.d.ts.map +0 -1
- package/dist/agent-chat/index.d.ts +0 -31
- package/dist/agent-chat/index.d.ts.map +0 -1
- package/dist/agent-chat/index.js +0 -19
- package/dist/agent-chat/message-affordances.d.ts.map +0 -1
- package/dist/agent-chat/relative-time.d.ts.map +0 -1
- package/dist/agent-chat/thread-detail-panel.d.ts +0 -28
- package/dist/agent-chat/thread-detail-panel.d.ts.map +0 -1
- package/dist/agent-chat/thread-detail-panel.js +0 -115
- package/dist/agent-chat/thread-feed-row.d.ts.map +0 -1
- package/dist/agent-chat/thread-feed.d.ts.map +0 -1
- package/dist/agent-chat/thread-message.d.ts.map +0 -1
- package/dist/agent-chat/thread-outcome-card.d.ts.map +0 -1
- package/dist/agent-chat/thread-workspace.d.ts +0 -44
- package/dist/agent-chat/thread-workspace.d.ts.map +0 -1
- package/dist/agent-chat/thread-workspace.js +0 -153
- package/dist/agent-chat/tool-chip.d.ts.map +0 -1
- package/dist/agent-chat/use-keyboard-inset.d.ts.map +0 -1
- package/dist/agent-chat/virtualize.d.ts.map +0 -1
- package/dist/charts/cursor/resolve.d.ts +0 -75
- package/dist/charts/cursor/resolve.d.ts.map +0 -1
- package/dist/charts/cursor/resolve.js +0 -91
- package/dist/charts/cursor/scope.d.ts +0 -20
- package/dist/charts/cursor/scope.d.ts.map +0 -1
- package/dist/charts/cursor/scope.js +0 -20
- package/dist/charts/cursor/store.d.ts +0 -35
- package/dist/charts/cursor/store.d.ts.map +0 -1
- package/dist/charts/cursor/store.js +0 -25
- package/dist/charts/cursor/touch-pin.d.ts +0 -45
- package/dist/charts/cursor/touch-pin.d.ts.map +0 -1
- package/dist/charts/cursor/touch-pin.js +0 -79
- package/dist/charts/hooks/use-discrete-cursor.d.ts +0 -66
- package/dist/charts/hooks/use-discrete-cursor.d.ts.map +0 -1
- package/dist/charts/hooks/use-discrete-cursor.js +0 -198
- package/dist/charts/hooks/use-hysteresis.d.ts +0 -18
- package/dist/charts/hooks/use-hysteresis.d.ts.map +0 -1
- package/dist/charts/hooks/use-hysteresis.js +0 -12
- package/dist/charts/hooks/useBandPlot.d.ts +0 -145
- package/dist/charts/hooks/useBandPlot.d.ts.map +0 -1
- package/dist/charts/hooks/useBandPlot.js +0 -178
- package/dist/charts/hooks/useChartCursor.d.ts +0 -75
- package/dist/charts/hooks/useChartCursor.d.ts.map +0 -1
- package/dist/charts/hooks/useChartCursor.js +0 -200
- package/dist/charts/hooks/useChartSize.d.ts +0 -29
- package/dist/charts/hooks/useChartSize.d.ts.map +0 -1
- package/dist/charts/hooks/useChartSize.js +0 -8
- package/dist/charts/kinds/BandStrip.d.ts +0 -132
- package/dist/charts/kinds/BandStrip.d.ts.map +0 -1
- package/dist/charts/kinds/BandStrip.js +0 -241
- package/dist/charts/kinds/Bars.d.ts +0 -141
- package/dist/charts/kinds/Bars.d.ts.map +0 -1
- package/dist/charts/kinds/Bars.js +0 -343
- package/dist/charts/kinds/Donut.d.ts +0 -77
- package/dist/charts/kinds/Donut.d.ts.map +0 -1
- package/dist/charts/kinds/Donut.js +0 -245
- package/dist/charts/kinds/DualPanel.d.ts +0 -111
- package/dist/charts/kinds/DualPanel.d.ts.map +0 -1
- package/dist/charts/kinds/DualPanel.js +0 -471
- package/dist/charts/kinds/Heatmap.d.ts +0 -85
- package/dist/charts/kinds/Heatmap.d.ts.map +0 -1
- package/dist/charts/kinds/Heatmap.js +0 -243
- package/dist/charts/kinds/MirroredBars.d.ts +0 -98
- package/dist/charts/kinds/MirroredBars.d.ts.map +0 -1
- package/dist/charts/kinds/MirroredBars.js +0 -292
- package/dist/charts/kinds/MultiLine.d.ts +0 -87
- package/dist/charts/kinds/MultiLine.d.ts.map +0 -1
- package/dist/charts/kinds/MultiLine.js +0 -176
- package/dist/charts/kinds/StackedArea.d.ts +0 -73
- package/dist/charts/kinds/StackedArea.d.ts.map +0 -1
- package/dist/charts/kinds/StackedArea.js +0 -135
- package/dist/charts/kinds/ZonedLine.d.ts +0 -97
- package/dist/charts/kinds/ZonedLine.d.ts.map +0 -1
- package/dist/charts/kinds/ZonedLine.js +0 -155
- package/dist/charts/kinds/band-chrome.d.ts +0 -31
- package/dist/charts/kinds/band-chrome.d.ts.map +0 -1
- package/dist/charts/kinds/band-chrome.js +0 -71
- package/dist/charts/kinds/donut-layout.d.ts +0 -47
- package/dist/charts/kinds/donut-layout.d.ts.map +0 -1
- package/dist/charts/kinds/donut-layout.js +0 -52
- package/dist/charts/layout/auto-margin.d.ts +0 -122
- package/dist/charts/layout/auto-margin.d.ts.map +0 -1
- package/dist/charts/layout/auto-margin.js +0 -81
- package/dist/charts/layout/end-labels.d.ts +0 -64
- package/dist/charts/layout/end-labels.d.ts.map +0 -1
- package/dist/charts/layout/end-labels.js +0 -76
- package/dist/charts/layout/log-ticks.d.ts +0 -27
- package/dist/charts/layout/log-ticks.d.ts.map +0 -1
- package/dist/charts/layout/log-ticks.js +0 -42
- package/dist/charts/primitives/AreaGradient.d.ts +0 -18
- package/dist/charts/primitives/AreaGradient.d.ts.map +0 -1
- package/dist/charts/primitives/AreaGradient.js +0 -13
- package/dist/charts/primitives/Axes.d.ts +0 -83
- package/dist/charts/primitives/Axes.d.ts.map +0 -1
- package/dist/charts/primitives/Axes.js +0 -168
- package/dist/charts/primitives/CartesianChart.d.ts +0 -257
- package/dist/charts/primitives/CartesianChart.d.ts.map +0 -1
- package/dist/charts/primitives/CartesianChart.js +0 -549
- package/dist/charts/primitives/ChartCard.d.ts +0 -66
- package/dist/charts/primitives/ChartCard.d.ts.map +0 -1
- package/dist/charts/primitives/ChartCard.js +0 -143
- package/dist/charts/primitives/ChartFrame.d.ts +0 -156
- package/dist/charts/primitives/ChartFrame.d.ts.map +0 -1
- package/dist/charts/primitives/ChartFrame.js +0 -241
- package/dist/charts/primitives/ChartLegend.d.ts +0 -67
- package/dist/charts/primitives/ChartLegend.d.ts.map +0 -1
- package/dist/charts/primitives/ChartLegend.js +0 -292
- package/dist/charts/primitives/ChartPending.d.ts +0 -113
- package/dist/charts/primitives/ChartPending.d.ts.map +0 -1
- package/dist/charts/primitives/ChartPending.js +0 -117
- package/dist/charts/primitives/ChartTooltip.d.ts +0 -59
- package/dist/charts/primitives/ChartTooltip.d.ts.map +0 -1
- package/dist/charts/primitives/ChartTooltip.js +0 -197
- package/dist/charts/primitives/Crosshair.d.ts +0 -26
- package/dist/charts/primitives/Crosshair.d.ts.map +0 -1
- package/dist/charts/primitives/Crosshair.js +0 -23
- package/dist/charts/primitives/HatchPattern.d.ts +0 -31
- package/dist/charts/primitives/HatchPattern.d.ts.map +0 -1
- package/dist/charts/primitives/HatchPattern.js +0 -31
- package/dist/charts/primitives/HoverOverlay.d.ts +0 -45
- package/dist/charts/primitives/HoverOverlay.d.ts.map +0 -1
- package/dist/charts/primitives/HoverOverlay.js +0 -72
- package/dist/charts/primitives/HoverOverlay.module.css +0 -13
- package/dist/charts/primitives/HoverOverlay.module.css.d.ts +0 -8
- package/dist/charts/primitives/XZoneRects.d.ts +0 -54
- package/dist/charts/primitives/XZoneRects.d.ts.map +0 -1
- package/dist/charts/primitives/XZoneRects.js +0 -65
- package/dist/charts/primitives/ZoneRects.d.ts +0 -38
- package/dist/charts/primitives/ZoneRects.d.ts.map +0 -1
- package/dist/charts/primitives/ZoneRects.js +0 -30
- package/dist/charts/primitives/chart-card-context.d.ts +0 -33
- package/dist/charts/primitives/chart-card-context.d.ts.map +0 -1
- package/dist/charts/primitives/chart-card-context.js +0 -18
- package/dist/charts/primitives/chart-frame-layout.d.ts +0 -185
- package/dist/charts/primitives/chart-frame-layout.d.ts.map +0 -1
- package/dist/charts/primitives/chart-frame-layout.js +0 -175
- package/dist/charts/primitives/chart-layout.d.ts +0 -112
- package/dist/charts/primitives/chart-layout.d.ts.map +0 -1
- package/dist/charts/primitives/chart-layout.js +0 -175
- package/dist/charts/primitives/chart-tier.d.ts +0 -16
- package/dist/charts/primitives/chart-tier.d.ts.map +0 -1
- package/dist/charts/primitives/chart-tier.js +0 -44
- package/dist/charts/primitives/legend-disclosure.d.ts +0 -27
- package/dist/charts/primitives/legend-disclosure.d.ts.map +0 -1
- package/dist/charts/primitives/legend-disclosure.js +0 -153
- package/dist/charts/series.d.ts +0 -189
- package/dist/charts/series.d.ts.map +0 -1
- package/dist/charts/series.js +0 -84
- package/dist/charts/sparklines/BarSparkline.d.ts +0 -37
- package/dist/charts/sparklines/BarSparkline.d.ts.map +0 -1
- package/dist/charts/sparklines/BarSparkline.js +0 -53
- package/dist/charts/sparklines/LineSparkline.d.ts +0 -15
- package/dist/charts/sparklines/LineSparkline.d.ts.map +0 -1
- package/dist/charts/sparklines/LineSparkline.js +0 -51
- package/dist/charts/sparklines/index.d.ts +0 -3
- package/dist/charts/sparklines/index.d.ts.map +0 -1
- package/dist/charts/sparklines/index.js +0 -6
- package/dist/charts/utils/domain.d.ts +0 -35
- package/dist/charts/utils/domain.d.ts.map +0 -1
- package/dist/charts/utils/domain.js +0 -12
- package/dist/charts/utils/format.d.ts +0 -8
- package/dist/charts/utils/format.d.ts.map +0 -1
- package/dist/charts/utils/format.js +0 -20
- package/dist/charts/utils/measure-text.d.ts +0 -25
- package/dist/charts/utils/measure-text.d.ts.map +0 -1
- package/dist/charts/utils/measure-text.js +0 -64
- package/dist/charts/utils/ticks.d.ts +0 -103
- package/dist/charts/utils/ticks.d.ts.map +0 -1
- package/dist/charts/utils/ticks.js +0 -92
- package/dist/commands/overlays-mount.d.ts +0 -122
- package/dist/commands/overlays-mount.d.ts.map +0 -1
- package/dist/commands/overlays-mount.js +0 -125
- package/dist/commands/useCommandHotkeys.d.ts +0 -14
- package/dist/commands/useCommandHotkeys.d.ts.map +0 -1
- package/dist/commands/useCommandHotkeys.js +0 -45
- package/dist/content/article-actions.d.ts +0 -39
- package/dist/content/article-actions.d.ts.map +0 -1
- package/dist/content/article-actions.js +0 -28
- package/dist/content/article-card.d.ts +0 -58
- package/dist/content/article-card.d.ts.map +0 -1
- package/dist/content/article-card.js +0 -79
- package/dist/content/article-card.module.css +0 -111
- package/dist/content/mdx.d.ts +0 -20
- package/dist/content/mdx.d.ts.map +0 -1
- package/dist/content/mdx.js +0 -64
- package/dist/controls/compare-filter.d.ts +0 -42
- package/dist/controls/compare-filter.d.ts.map +0 -1
- package/dist/controls/compare-filter.js +0 -38
- package/dist/controls/slider-control.d.ts +0 -36
- package/dist/controls/slider-control.d.ts.map +0 -1
- package/dist/controls/slider-control.js +0 -64
- package/dist/dashboard/widget-grid.d.ts +0 -27
- package/dist/dashboard/widget-grid.d.ts.map +0 -1
- package/dist/dashboard/widget-grid.js +0 -40
- package/dist/dashboard/widget-grid.module.css +0 -69
- package/dist/data/data-table-state.d.ts.map +0 -1
- package/dist/data/data-table.d.ts.map +0 -1
- package/dist/data/query-branch.d.ts.map +0 -1
- package/dist/data/table.d.ts +0 -24
- package/dist/data/table.d.ts.map +0 -1
- package/dist/data/virtual-list.d.ts +0 -133
- package/dist/data/virtual-list.d.ts.map +0 -1
- package/dist/data/virtual-list.js +0 -157
- package/dist/data/virtual.d.ts +0 -21
- package/dist/data/virtual.d.ts.map +0 -1
- package/dist/data/virtual.js +0 -4
- package/dist/forms/FormErrorSummary.d.ts +0 -30
- package/dist/forms/FormErrorSummary.d.ts.map +0 -1
- package/dist/forms/FormErrorSummary.js +0 -30
- package/dist/forms/use-field-array.d.ts +0 -60
- package/dist/forms/use-field-array.d.ts.map +0 -1
- package/dist/forms/use-field-array.js +0 -20
- package/dist/forms/use-form-draft.d.ts +0 -76
- package/dist/forms/use-form-draft.d.ts.map +0 -1
- package/dist/forms/use-form-draft.js +0 -92
- package/dist/forms/use-form-submit.d.ts +0 -88
- package/dist/forms/use-form-submit.d.ts.map +0 -1
- package/dist/forms/use-form-submit.js +0 -63
- package/dist/notifications/bell.d.ts.map +0 -1
- package/dist/notifications/center.d.ts.map +0 -1
- package/dist/notifications/define-notifications.d.ts.map +0 -1
- package/dist/notifications/index.d.ts +0 -40
- package/dist/notifications/index.d.ts.map +0 -1
- package/dist/notifications/index.js +0 -54
- package/dist/notifications/mount-guard.d.ts +0 -8
- package/dist/notifications/mount-guard.d.ts.map +0 -1
- package/dist/notifications/mount-guard.js +0 -18
- package/dist/notifications/notify.d.ts +0 -149
- package/dist/notifications/notify.d.ts.map +0 -1
- package/dist/notifications/notify.js +0 -171
- package/dist/notifications/store.d.ts.map +0 -1
- package/dist/provider/connectivity-indicator.d.ts +0 -13
- package/dist/provider/connectivity-indicator.d.ts.map +0 -1
- package/dist/provider/connectivity-indicator.js +0 -205
- package/dist/provider/connectivity-provider.d.ts +0 -7
- package/dist/provider/connectivity-provider.d.ts.map +0 -1
- package/dist/provider/connectivity-provider.js +0 -128
- package/dist/provider/connectivity-types.d.ts +0 -36
- package/dist/provider/connectivity-types.d.ts.map +0 -1
- package/dist/provider/use-connectivity.d.ts +0 -3
- package/dist/provider/use-connectivity.d.ts.map +0 -1
- package/dist/provider/use-connectivity.js +0 -14
- package/dist/query-devtools.d.ts +0 -21
- package/dist/query-devtools.d.ts.map +0 -1
- package/dist/query-devtools.js +0 -13
- package/src/agent/adapter.ts +0 -945
- package/src/agent/use-agent-stream.ts +0 -154
- package/src/agent-chat/index.ts +0 -54
- package/src/agent-chat/thread-detail-panel.tsx +0 -201
- package/src/agent-chat/thread-workspace.tsx +0 -279
- package/src/charts/cursor/resolve.ts +0 -198
- package/src/charts/cursor/scope.tsx +0 -35
- package/src/charts/cursor/store.ts +0 -58
- package/src/charts/cursor/touch-pin.ts +0 -138
- package/src/charts/hooks/use-discrete-cursor.ts +0 -335
- package/src/charts/hooks/use-hysteresis.ts +0 -26
- package/src/charts/hooks/useBandPlot.ts +0 -383
- package/src/charts/hooks/useChartCursor.ts +0 -367
- package/src/charts/hooks/useChartSize.ts +0 -35
- package/src/charts/kinds/BandStrip.tsx +0 -449
- package/src/charts/kinds/Bars.tsx +0 -589
- package/src/charts/kinds/Donut.tsx +0 -368
- package/src/charts/kinds/DualPanel.tsx +0 -712
- package/src/charts/kinds/Heatmap.tsx +0 -396
- package/src/charts/kinds/MirroredBars.tsx +0 -469
- package/src/charts/kinds/MultiLine.tsx +0 -322
- package/src/charts/kinds/StackedArea.tsx +0 -267
- package/src/charts/kinds/ZonedLine.tsx +0 -301
- package/src/charts/kinds/band-chrome.tsx +0 -91
- package/src/charts/kinds/donut-layout.ts +0 -82
- package/src/charts/layout/auto-margin.ts +0 -242
- package/src/charts/layout/end-labels.ts +0 -135
- package/src/charts/layout/log-ticks.ts +0 -90
- package/src/charts/primitives/AreaGradient.tsx +0 -26
- package/src/charts/primitives/Axes.tsx +0 -271
- package/src/charts/primitives/CartesianChart.tsx +0 -1002
- package/src/charts/primitives/ChartCard.tsx +0 -280
- package/src/charts/primitives/ChartFrame.tsx +0 -493
- package/src/charts/primitives/ChartLegend.tsx +0 -422
- package/src/charts/primitives/ChartPending.tsx +0 -243
- package/src/charts/primitives/ChartTooltip.tsx +0 -265
- package/src/charts/primitives/Crosshair.tsx +0 -43
- package/src/charts/primitives/HatchPattern.tsx +0 -55
- package/src/charts/primitives/HoverOverlay.module.css +0 -13
- package/src/charts/primitives/HoverOverlay.module.css.d.ts +0 -8
- package/src/charts/primitives/HoverOverlay.tsx +0 -109
- package/src/charts/primitives/XZoneRects.tsx +0 -132
- package/src/charts/primitives/ZoneRects.tsx +0 -67
- package/src/charts/primitives/chart-card-context.ts +0 -46
- package/src/charts/primitives/chart-frame-layout.ts +0 -430
- package/src/charts/primitives/chart-layout.ts +0 -318
- package/src/charts/primitives/chart-tier.tsx +0 -76
- package/src/charts/primitives/legend-disclosure.tsx +0 -178
- package/src/charts/series.ts +0 -276
- package/src/charts/sparklines/BarSparkline.tsx +0 -94
- package/src/charts/sparklines/LineSparkline.tsx +0 -71
- package/src/charts/sparklines/index.ts +0 -2
- package/src/charts/theme.tsx +0 -53
- package/src/charts/utils/domain.ts +0 -41
- package/src/charts/utils/format.ts +0 -19
- package/src/charts/utils/measure-text.ts +0 -109
- package/src/charts/utils/ticks.ts +0 -239
- package/src/commands/overlays-mount.tsx +0 -333
- package/src/commands/useCommandHotkeys.ts +0 -114
- package/src/content/article-actions.ts +0 -72
- package/src/content/article-card.module.css +0 -111
- package/src/content/article-card.tsx +0 -174
- package/src/content/mdx.tsx +0 -127
- package/src/controls/compare-filter.tsx +0 -81
- package/src/controls/slider-control.tsx +0 -159
- package/src/dashboard/widget-grid.module.css +0 -69
- package/src/dashboard/widget-grid.tsx +0 -146
- package/src/data/table.ts +0 -39
- package/src/data/virtual-list.tsx +0 -356
- package/src/data/virtual.ts +0 -26
- package/src/forms/FormErrorSummary.tsx +0 -71
- package/src/forms/use-field-array.ts +0 -94
- package/src/forms/use-form-draft.ts +0 -262
- package/src/forms/use-form-submit.ts +0 -199
- package/src/notifications/index.ts +0 -88
- package/src/notifications/mount-guard.ts +0 -38
- package/src/notifications/notify.tsx +0 -379
- package/src/provider/connectivity-indicator.tsx +0 -267
- package/src/provider/connectivity-provider.tsx +0 -189
- package/src/provider/connectivity-types.ts +0 -42
- package/src/provider/use-connectivity.ts +0 -26
- package/src/query-devtools.tsx +0 -40
- /package/dist/{agent-chat → agent/chat}/message-affordances.js +0 -0
- /package/dist/{agent-chat → agent/chat}/relative-time.d.ts +0 -0
- /package/dist/{agent-chat → agent/chat}/relative-time.js +0 -0
- /package/dist/{agent-chat → agent/chat}/use-keyboard-inset.d.ts +0 -0
- /package/dist/{agent-chat → agent/chat}/virtualize.js +0 -0
- /package/dist/{notifications → commands/notifications}/bell.js +0 -0
- /package/dist/{notifications → commands/notifications}/define-notifications.js +0 -0
- /package/dist/{provider/connectivity-types.js → controls/uncontrolled.js} +0 -0
- /package/dist/{data → table}/data-table.module.css +0 -0
- /package/dist/{data → table}/data-table.module.css.d.ts +0 -0
- /package/dist/{data → table}/query-branch.d.ts +0 -0
- /package/dist/{data → table}/query-branch.js +0 -0
- /package/src/{agent-chat → agent/chat}/relative-time.ts +0 -0
- /package/src/{data → table}/data-table.module.css +0 -0
- /package/src/{data → table}/data-table.module.css.d.ts +0 -0
- /package/src/{data → table}/query-branch.ts +0 -0
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* <Composer
|
|
26
26
|
* ref={composerRef}
|
|
27
27
|
* draftKey={`thread:${thread.id}`}
|
|
28
|
-
* streaming={
|
|
28
|
+
* streaming={run?.status === 'submitted' || run?.status === 'streaming'}
|
|
29
29
|
* onStop={() => runs.stop(thread.id)}
|
|
30
30
|
* leftSection={
|
|
31
31
|
* <VoiceRecordButton
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
*/
|
|
39
39
|
import { ActionIcon, Box, Group, Kbd, Stack, Text, Textarea } from '@mantine/core'
|
|
40
40
|
import type { ClipboardEvent, ComponentProps, JSX, KeyboardEvent, ReactNode, Ref } from 'react'
|
|
41
|
-
import { useImperativeHandle, useLayoutEffect, useRef, useSyncExternalStore } from 'react'
|
|
42
|
-
import { cx } from '
|
|
43
|
-
import type { BasaltProps, SlotStylesProps } from '
|
|
44
|
-
import { readPersistedValue } from '
|
|
45
|
-
import { VX } from '
|
|
41
|
+
import { useImperativeHandle, useLayoutEffect, useMemo, useRef, useSyncExternalStore } from 'react'
|
|
42
|
+
import { cx } from '../../common/props'
|
|
43
|
+
import type { BasaltProps, SlotStylesProps } from '../../common/props'
|
|
44
|
+
import { readPersistedValue } from '../../state/persisted'
|
|
45
|
+
import { VX } from '../../tokens'
|
|
46
46
|
import { useKeyboardInsetRef } from './use-keyboard-inset'
|
|
47
47
|
|
|
48
48
|
/** A minimal, dependency-free send-arrow glyph (icons are passed in as ReactNode elsewhere; this
|
|
@@ -275,7 +275,7 @@ export type ComposerSlot = 'root' | 'input' | 'actions'
|
|
|
275
275
|
export type ComposerProps = BasaltProps &
|
|
276
276
|
SlotStylesProps<ComposerSlot> & {
|
|
277
277
|
/** Imperative write/focus handle — see `ComposerHandle`. */
|
|
278
|
-
readonly ref?: Ref<ComposerHandle>
|
|
278
|
+
readonly ref?: Ref<ComposerHandle> | undefined
|
|
279
279
|
/**
|
|
280
280
|
* Called with the trimmed text plus the pending attachments. May return `void` (fire-and-forget,
|
|
281
281
|
* validated only synchronously) or a `Promise<void>` (its outcome is awaited, its timing is not).
|
|
@@ -298,41 +298,41 @@ export type ComposerProps = BasaltProps &
|
|
|
298
298
|
* A resolved promise clears and stays cleared, same as a `void` return.
|
|
299
299
|
*/
|
|
300
300
|
readonly onSubmit: (payload: ComposerSubmit) => void | Promise<void>
|
|
301
|
-
readonly placeholder?: string
|
|
301
|
+
readonly placeholder?: string | undefined
|
|
302
302
|
/** Autofocuses the textarea on mount. */
|
|
303
|
-
readonly autoFocus?: boolean
|
|
303
|
+
readonly autoFocus?: boolean | undefined
|
|
304
304
|
/** Autosize ceiling for the textarea. Default 6. */
|
|
305
|
-
readonly maxRows?: number
|
|
305
|
+
readonly maxRows?: number | undefined
|
|
306
306
|
/** Hard-disable, independent of streaming (e.g. offline). */
|
|
307
|
-
readonly disabled?: boolean
|
|
307
|
+
readonly disabled?: boolean | undefined
|
|
308
308
|
/** A run is in flight on this thread. */
|
|
309
|
-
readonly streaming?: boolean
|
|
309
|
+
readonly streaming?: boolean | undefined
|
|
310
310
|
/** Default false — preserves the historical `disabled={streaming}` behaviour. */
|
|
311
|
-
readonly allowSubmitWhileStreaming?: boolean
|
|
311
|
+
readonly allowSubmitWhileStreaming?: boolean | undefined
|
|
312
312
|
/** When given, the send action becomes a Stop action while `streaming`. */
|
|
313
|
-
readonly onStop?: () => void
|
|
313
|
+
readonly onStop?: (() => void) | undefined
|
|
314
314
|
/**
|
|
315
315
|
* Opaque slot rendered before the textarea (a voice recorder, a mode switch, …). Slot content
|
|
316
316
|
* that needs to WRITE into the composer — append a transcript, insert a suggestion — does so
|
|
317
317
|
* through the `ref` handle (`ComposerHandle`), not a callback prop here; see the file's
|
|
318
318
|
* `@example`.
|
|
319
319
|
*/
|
|
320
|
-
readonly leftSection?: ReactNode
|
|
320
|
+
readonly leftSection?: ReactNode | undefined
|
|
321
321
|
/** Opaque slot rendered between the textarea and the send action (an attach button, …). */
|
|
322
|
-
readonly rightSection?: ReactNode
|
|
322
|
+
readonly rightSection?: ReactNode | undefined
|
|
323
323
|
/**
|
|
324
324
|
* Pending attachments, owned by the caller. Composer only forwards them on submit and asks for a
|
|
325
325
|
* reset afterwards — rendering previews is the caller's job, via `leftSection`/`rightSection`.
|
|
326
326
|
*/
|
|
327
|
-
readonly attachments?: readonly ComposerAttachment[]
|
|
327
|
+
readonly attachments?: readonly ComposerAttachment[] | undefined
|
|
328
328
|
/**
|
|
329
329
|
* Called with `[]` optimistically the instant a submit goes out WITH pending attachments — a
|
|
330
330
|
* submit that had none to begin with skips the call rather than reporting a no-op change — and,
|
|
331
331
|
* subject to the restoration guards documented on `onSubmit`, with the original attachments
|
|
332
332
|
* again if that submit later rejects.
|
|
333
333
|
*/
|
|
334
|
-
readonly onAttachmentsChange?: (next: readonly ComposerAttachment[]) => void
|
|
335
|
-
readonly onPaste?: (event: ClipboardEvent<HTMLTextAreaElement>) => void
|
|
334
|
+
readonly onAttachmentsChange?: ((next: readonly ComposerAttachment[]) => void) | undefined
|
|
335
|
+
readonly onPaste?: ((event: ClipboardEvent<HTMLTextAreaElement>) => void) | undefined
|
|
336
336
|
/**
|
|
337
337
|
* Persists the unsent draft under `basalt:composer-draft:<key>`; switching keys swaps drafts, and
|
|
338
338
|
* the entry is removed (not blanked) on a successful submit.
|
|
@@ -341,9 +341,9 @@ export type ComposerProps = BasaltProps &
|
|
|
341
341
|
* that fails, synchronously or later over the network, restores this persisted draft instead of
|
|
342
342
|
* leaving it erased (subject to the restoration guards documented on `onSubmit`).
|
|
343
343
|
*/
|
|
344
|
-
readonly draftKey?: string
|
|
344
|
+
readonly draftKey?: string | undefined
|
|
345
345
|
/** Replaces the whole Enter/Shift+Enter hint row. Pass `null` to drop it entirely. */
|
|
346
|
-
readonly hint?: ReactNode
|
|
346
|
+
readonly hint?: ReactNode | undefined
|
|
347
347
|
}
|
|
348
348
|
|
|
349
349
|
/** The default footer: the Enter / Shift+Enter keyboard contract, in the mono micro-label voice. */
|
|
@@ -395,11 +395,9 @@ export function Composer({
|
|
|
395
395
|
classNames,
|
|
396
396
|
}: ComposerProps): JSX.Element {
|
|
397
397
|
// Per-instance fallback for the un-keyed case, so two keyless Composers never share a draft.
|
|
398
|
-
//
|
|
399
|
-
|
|
400
|
-
const
|
|
401
|
-
memoryStore.current ??= createDraftStore(null)
|
|
402
|
-
const store = draftKey === undefined ? memoryStore.current : persistedDraftStore(draftKey)
|
|
398
|
+
// Create-once state React never re-renders on; the store's own subscription drives updates.
|
|
399
|
+
const memoryStore = useMemo<DraftStore>(() => createDraftStore(null), [])
|
|
400
|
+
const store = draftKey === undefined ? memoryStore : persistedDraftStore(draftKey)
|
|
403
401
|
const value = useSyncExternalStore(
|
|
404
402
|
isServer ? noopSubscribe : store.subscribe,
|
|
405
403
|
isServer ? emptyDraft : store.get,
|
|
@@ -418,14 +416,15 @@ export function Composer({
|
|
|
418
416
|
// An attachment with no caption is a legitimate send; text-only callers behave exactly as before.
|
|
419
417
|
const hasPayload = trimmed.length > 0 || pending.length > 0
|
|
420
418
|
|
|
421
|
-
// "Latest ref" mirrors of two controlled inputs,
|
|
422
|
-
// derived — safe to do in the render body) so a submit's rejection handler — which fires long
|
|
419
|
+
// "Latest ref" mirrors of two controlled inputs, refreshed after every commit so a submit's rejection handler — which fires long
|
|
423
420
|
// after the render that started it — can read what is CURRENTLY true rather than what was true
|
|
424
421
|
// when it was created. Both feed the restoration guards in `submit()` below.
|
|
425
422
|
const attachmentsRef = useRef(pending)
|
|
426
|
-
attachmentsRef.current = pending
|
|
427
423
|
const draftKeyRef = useRef(draftKey)
|
|
428
|
-
|
|
424
|
+
useLayoutEffect(() => {
|
|
425
|
+
attachmentsRef.current = pending
|
|
426
|
+
draftKeyRef.current = draftKey
|
|
427
|
+
})
|
|
429
428
|
|
|
430
429
|
// ── Imperative handle (ComposerHandle) ────────────────────────────────────────
|
|
431
430
|
//
|
|
@@ -10,14 +10,15 @@
|
|
|
10
10
|
* stays internal — resolving unset fields is the components' job, not the consumer's.
|
|
11
11
|
*/
|
|
12
12
|
import type { ReactNode } from 'react'
|
|
13
|
-
import type { ChatMessage
|
|
13
|
+
import type { ChatMessage } from '../history'
|
|
14
|
+
import type { TranscriptPart } from '../foreign'
|
|
14
15
|
|
|
15
16
|
export type MessageAffordances = {
|
|
16
17
|
/**
|
|
17
18
|
* How the per-message timestamp renders.
|
|
18
19
|
* @default 'relative'
|
|
19
20
|
*/
|
|
20
|
-
readonly timestamp?: 'relative' | 'absolute' | 'none'
|
|
21
|
+
readonly timestamp?: 'relative' | 'absolute' | 'none' | undefined
|
|
21
22
|
/**
|
|
22
23
|
* Whether a copy action is offered on the hover row. Copies the message's COALESCED text (the
|
|
23
24
|
* same merged/de-duplicated text `coalesceParts` produces for display), not the raw `parts`
|
|
@@ -26,7 +27,7 @@ export type MessageAffordances = {
|
|
|
26
27
|
* assembled.
|
|
27
28
|
* @default true
|
|
28
29
|
*/
|
|
29
|
-
readonly copy?: boolean
|
|
30
|
+
readonly copy?: boolean | undefined
|
|
30
31
|
/**
|
|
31
32
|
* Regenerate action, shown on the LAST ASSISTANT message only (never on earlier turns, never on
|
|
32
33
|
* user messages). Receives that message's `id`. `useAgentThreadRuns`'s `retry` is
|
|
@@ -34,7 +35,7 @@ export type MessageAffordances = {
|
|
|
34
35
|
* whole thread — the consumer bridges this messageId-keyed callback to that thread-keyed retry;
|
|
35
36
|
* the framework only ever hands back the messageId, it does not know about threads.
|
|
36
37
|
*/
|
|
37
|
-
readonly onRegenerate?: (messageId: string) => void
|
|
38
|
+
readonly onRegenerate?: ((messageId: string) => void) | undefined
|
|
38
39
|
/**
|
|
39
40
|
* Extra actions appended to the hover row, after the built-in copy/regenerate actions.
|
|
40
41
|
*
|
|
@@ -48,7 +49,9 @@ export type MessageAffordances = {
|
|
|
48
49
|
* a long thread it is worth avoiding: wrap `actions` in the consumer's own `useCallback`, keyed
|
|
49
50
|
* on whatever state it actually reads.
|
|
50
51
|
*/
|
|
51
|
-
readonly actions?:
|
|
52
|
+
readonly actions?:
|
|
53
|
+
| ((ctx: { readonly message: ChatMessage<TranscriptPart> }) => ReactNode)
|
|
54
|
+
| undefined
|
|
52
55
|
}
|
|
53
56
|
|
|
54
57
|
/**
|
|
@@ -35,20 +35,15 @@
|
|
|
35
35
|
import { Box, Group, Stack, Text, UnstyledButton } from '@mantine/core'
|
|
36
36
|
import type { JSX, ReactNode } from 'react'
|
|
37
37
|
import { useState } from 'react'
|
|
38
|
-
import
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
} from '
|
|
47
|
-
import { BasaltStickToBottom } from '../agent'
|
|
48
|
-
import { cx } from '../common/props'
|
|
49
|
-
import type { BasaltProps, SlotStylesProps } from '../common/props'
|
|
50
|
-
import { assertRequiredProps } from '../common/validate'
|
|
51
|
-
import { VX } from '../tokens'
|
|
38
|
+
import { isLiveStatus } from '../thread'
|
|
39
|
+
import type { AgentThread, StreamStatus } from '../thread'
|
|
40
|
+
import type { ChatMessage } from '../history'
|
|
41
|
+
import type { ForeignPart, PartRenderer, PartRenderers, TranscriptPart } from '../foreign'
|
|
42
|
+
import { BasaltStickToBottom } from '../stick-to-bottom'
|
|
43
|
+
import { cx } from '../../common/props'
|
|
44
|
+
import type { BasaltProps, SlotStylesProps } from '../../common/props'
|
|
45
|
+
import { assertRequiredProps } from '../../common/validate'
|
|
46
|
+
import { VX } from '../../tokens'
|
|
52
47
|
import type { ComposerProps, ComposerSubmit } from './composer'
|
|
53
48
|
import { Composer } from './composer'
|
|
54
49
|
import type { MessageAffordances } from './message-affordances'
|
|
@@ -115,48 +110,48 @@ type ThreadFeedRowBase = {
|
|
|
115
110
|
* and never guessed client-side), pass it directly instead of forcing an outcome shape onto data
|
|
116
111
|
* that never had one.
|
|
117
112
|
*/
|
|
118
|
-
readonly title?: string
|
|
113
|
+
readonly title?: string | undefined
|
|
119
114
|
/** Header summary override, same fallback rule as `title` (`thread.outcome?.summary ?? ''`). */
|
|
120
|
-
readonly summary?: string
|
|
115
|
+
readonly summary?: string | undefined
|
|
121
116
|
/** Rendered at the START of the header row, before the title/summary stack — a pin icon, a type
|
|
122
117
|
* badge (argo's hermes-chat S5). Absent by default; renders nothing extra when omitted. */
|
|
123
|
-
readonly headerLeft?: ReactNode
|
|
118
|
+
readonly headerLeft?: ReactNode | undefined
|
|
124
119
|
/** Rendered at the END of the header row, before the timestamp and chevron — a collapsed-only
|
|
125
120
|
* streaming indicator (argo's hermes-chat S5). Absent by default; renders nothing extra when
|
|
126
121
|
* omitted. */
|
|
127
|
-
readonly headerRight?: ReactNode
|
|
122
|
+
readonly headerRight?: ReactNode | undefined
|
|
128
123
|
/**
|
|
129
124
|
* Overrides the transcript source: when provided, the row renders THESE messages instead of
|
|
130
125
|
* reading `thread.messages` directly (argo's hermes-chat S6 — the confirmed transcript is an
|
|
131
126
|
* optimistic-overlay MERGE over the store's messages, not the store's messages verbatim).
|
|
132
127
|
* Defaults to `thread.messages`.
|
|
133
128
|
*/
|
|
134
|
-
readonly messages?: readonly ChatMessage<TranscriptPart>[]
|
|
129
|
+
readonly messages?: readonly ChatMessage<TranscriptPart>[] | undefined
|
|
135
130
|
/** The live (in-flight) assistant turn's parts, when a run is streaming for this thread. */
|
|
136
|
-
readonly liveParts?: readonly TranscriptPart[]
|
|
131
|
+
readonly liveParts?: readonly TranscriptPart[] | undefined
|
|
137
132
|
/** The live run's status — drives the in-progress indicator on the live block. */
|
|
138
|
-
readonly liveStatus?: StreamStatus
|
|
133
|
+
readonly liveStatus?: StreamStatus | undefined
|
|
139
134
|
/** Consumer renderers keyed by part.type, forwarded to `ThreadTranscript`. */
|
|
140
|
-
readonly renderers?: PartRenderers
|
|
135
|
+
readonly renderers?: PartRenderers | undefined
|
|
141
136
|
/** Forwarded to `ThreadTranscript` — see its own prop doc. */
|
|
142
|
-
readonly fallbackRenderer?: PartRenderer<ForeignPart>
|
|
137
|
+
readonly fallbackRenderer?: PartRenderer<ForeignPart> | undefined
|
|
143
138
|
/**
|
|
144
139
|
* Per-message hover-row contract (timestamp/copy/regenerate/actions), forwarded verbatim to the
|
|
145
140
|
* row's `ThreadTranscript`. Shared with it via `message-affordances.ts` so the two cannot drift
|
|
146
141
|
* on what an unset field means.
|
|
147
142
|
*/
|
|
148
|
-
readonly affordances?: MessageAffordances
|
|
143
|
+
readonly affordances?: MessageAffordances | undefined
|
|
149
144
|
/** Forwarded to `ThreadTranscript` — suppresses role label + chrome on same-speaker runs.
|
|
150
145
|
* @default true */
|
|
151
|
-
readonly groupConsecutive?: boolean
|
|
146
|
+
readonly groupConsecutive?: boolean | undefined
|
|
152
147
|
/** Called with the composer's submit payload. */
|
|
153
148
|
readonly onSend: (payload: ComposerSubmit) => void
|
|
154
|
-
/** Shown as the composer's Stop action while `liveStatus
|
|
155
|
-
readonly onStop?: () => void
|
|
149
|
+
/** Shown as the composer's Stop action while `liveStatus` is `'submitted'` or `'streaming'`. */
|
|
150
|
+
readonly onStop?: (() => void) | undefined
|
|
156
151
|
/** Forwarded to the row's `Composer`, minus the three props this component always wires itself
|
|
157
152
|
* (`onSubmit`, `onStop`, and `streaming` — the last derived from `liveStatus` so a consumer can't
|
|
158
153
|
* pass one that disagrees with the row's own live status). */
|
|
159
|
-
readonly composerProps?: Omit<ComposerProps, 'onSubmit' | 'onStop' | 'streaming'>
|
|
154
|
+
readonly composerProps?: Omit<ComposerProps, 'onSubmit' | 'onStop' | 'streaming'> | undefined
|
|
160
155
|
}
|
|
161
156
|
|
|
162
157
|
/**
|
|
@@ -254,17 +249,17 @@ export function ThreadFeedRow(props: ThreadFeedRowProps): JSX.Element {
|
|
|
254
249
|
// textarea when it is TOLD a run is streaming (`composer.tsx`'s `showStop`/`inputDisabled`) — it
|
|
255
250
|
// has no way to infer that from `onStop` alone. Forwarding `onStop` without this was the defect:
|
|
256
251
|
// Stop never rendered and a second turn could still be typed into a live thread.
|
|
257
|
-
const streaming = liveStatus
|
|
252
|
+
const streaming = isLiveStatus(liveStatus)
|
|
258
253
|
|
|
259
254
|
const transcript = (
|
|
260
255
|
<ThreadTranscript
|
|
261
256
|
messages={transcriptMessages}
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
257
|
+
liveParts={liveParts}
|
|
258
|
+
liveStatus={liveStatus}
|
|
259
|
+
renderers={renderers}
|
|
260
|
+
fallbackRenderer={fallbackRenderer}
|
|
261
|
+
affordances={affordances}
|
|
262
|
+
groupConsecutive={groupConsecutive}
|
|
268
263
|
{...virtualizeProps}
|
|
269
264
|
/>
|
|
270
265
|
)
|
|
@@ -19,15 +19,15 @@
|
|
|
19
19
|
*/
|
|
20
20
|
import { Box, ScrollArea, Stack } from '@mantine/core'
|
|
21
21
|
import { useReducedMotion } from '@mantine/hooks'
|
|
22
|
-
import { AnimatePresence, motion } from 'motion/react'
|
|
22
|
+
import { AnimatePresence, MotionConfig, motion } from 'motion/react'
|
|
23
23
|
import type { JSX, ReactNode } from 'react'
|
|
24
|
-
import {
|
|
25
|
-
import type { AgentThread } from '../
|
|
26
|
-
import { BasaltStickToBottom } from '../
|
|
27
|
-
import { cx } from '
|
|
28
|
-
import type { BasaltProps } from '
|
|
29
|
-
import { assertRequiredProps } from '
|
|
30
|
-
import { MOTION_SPRING } from '
|
|
24
|
+
import { useState } from 'react'
|
|
25
|
+
import type { AgentThread } from '../thread'
|
|
26
|
+
import { BasaltStickToBottom } from '../stick-to-bottom'
|
|
27
|
+
import { cx } from '../../common/props'
|
|
28
|
+
import type { BasaltProps } from '../../common/props'
|
|
29
|
+
import { assertRequiredProps } from '../../common/validate'
|
|
30
|
+
import { MOTION_SPRING } from '../../common/motion'
|
|
31
31
|
import type { ComposerSubmit } from './composer'
|
|
32
32
|
import { ThreadFeedRow } from './thread-feed-row'
|
|
33
33
|
import { ThreadOutcomeCard } from './thread-outcome-card'
|
|
@@ -54,22 +54,22 @@ export type ThreadFeedProps = BasaltProps & {
|
|
|
54
54
|
* directly (the previous shape) meant a plain `onSelect={setActiveId}` consumer could never
|
|
55
55
|
* collapse a row, since re-selecting the same id is a no-op state update. Collapsing here is
|
|
56
56
|
* local, UI-only state, reset whenever `activeId` changes to point at a DIFFERENT thread. Since
|
|
57
|
-
* this reset
|
|
58
|
-
* this component is a no-op
|
|
57
|
+
* this reset compares `activeId` against the last one seen, re-driving it to the SAME id from outside
|
|
58
|
+
* this component is a no-op comparison, so it does not clear the override.
|
|
59
59
|
*/
|
|
60
|
-
readonly variant?: 'outcome' | 'inline'
|
|
60
|
+
readonly variant?: 'outcome' | 'inline' | undefined
|
|
61
61
|
/**
|
|
62
62
|
* Wires the built-in `'inline'` row's composer to a real send channel — called with the thread
|
|
63
63
|
* and the composer's submit payload. Omit it and the row's composer renders disabled (visibly
|
|
64
64
|
* inert) instead of a live control that silently discards whatever is typed into it; a consumer
|
|
65
65
|
* that needs the composer live must supply this (or `renderRow`, for full control over the row).
|
|
66
66
|
*/
|
|
67
|
-
readonly onSend?: (thread: AgentThread, payload: ComposerSubmit) => void
|
|
67
|
+
readonly onSend?: ((thread: AgentThread, payload: ComposerSubmit) => void) | undefined
|
|
68
68
|
/** Overrides row rendering entirely, for BOTH variants — when supplied, this is called for every
|
|
69
69
|
* thread instead of either built-in row. Gives full control over live-run wiring
|
|
70
70
|
* (`onStop`/`liveParts`/`liveStatus`) the built-in `'inline'` row doesn't expose; see `variant`
|
|
71
71
|
* and `onSend`. */
|
|
72
|
-
readonly renderRow?: (thread: AgentThread) => ReactNode
|
|
72
|
+
readonly renderRow?: ((thread: AgentThread) => ReactNode) | undefined
|
|
73
73
|
/**
|
|
74
74
|
* Scroll anchor. `'start'` (default) is today's top-anchored `ScrollArea` feed, unchanged.
|
|
75
75
|
* `'end'` anchors the feed's growth to the BOTTOM instead — a `BasaltStickToBottom` scroll node
|
|
@@ -79,7 +79,7 @@ export type ThreadFeedProps = BasaltProps & {
|
|
|
79
79
|
* (argo's hermes-chat S15 — oldest→newest top→bottom, pinned last, `renderRow`-driven) needs
|
|
80
80
|
* instead of hand-rolling its own scroll shell around `renderRow`.
|
|
81
81
|
*/
|
|
82
|
-
readonly anchor?: 'start' | 'end'
|
|
82
|
+
readonly anchor?: 'start' | 'end' | undefined
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
function defaultRow(
|
|
@@ -138,14 +138,16 @@ export function ThreadFeed({
|
|
|
138
138
|
// meaningful for the id it names; a stale value left over for a since-deselected thread is inert
|
|
139
139
|
// (the per-row `expanded` check below always requires `thread.id === activeId` too).
|
|
140
140
|
const [collapsedId, setCollapsedId] = useState<string | null>(null)
|
|
141
|
-
// Any externally-driven move of `activeId` to a DIFFERENT thread clears a stale override
|
|
142
|
-
//
|
|
143
|
-
// thread re-selected after being manually collapsed)
|
|
144
|
-
// triggered by this component's own header click does
|
|
145
|
-
// `handleInlineToggle`), so it does not
|
|
146
|
-
|
|
141
|
+
// Any externally-driven move of `activeId` to a DIFFERENT thread clears a stale override, by
|
|
142
|
+
// comparing against the last `activeId` seen during render. Re-driving `activeId` to the id it
|
|
143
|
+
// already holds (e.g. the SAME thread re-selected after being manually collapsed) is no change, so
|
|
144
|
+
// it does not clear the override. A collapse triggered by this component's own header click does
|
|
145
|
+
// NOT touch `activeId` at all (see `handleInlineToggle`), so it does not clear it either.
|
|
146
|
+
const [seenActiveId, setSeenActiveId] = useState(activeId)
|
|
147
|
+
if (seenActiveId !== activeId) {
|
|
148
|
+
setSeenActiveId(activeId)
|
|
147
149
|
setCollapsedId(null)
|
|
148
|
-
}
|
|
150
|
+
}
|
|
149
151
|
|
|
150
152
|
function handleInlineToggle(id: string): void {
|
|
151
153
|
const isOpen = id === activeId && id !== collapsedId
|
|
@@ -178,20 +180,23 @@ export function ThreadFeed({
|
|
|
178
180
|
</Stack>
|
|
179
181
|
) : (
|
|
180
182
|
<Stack gap="sm" p="sm" {...stackAnchorProps}>
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
183
|
+
{/* V2-SPEC § 5: the OS setting also reaches `motion`'s own transforms. */}
|
|
184
|
+
<MotionConfig reducedMotion="user">
|
|
185
|
+
<AnimatePresence mode="popLayout" initial={false}>
|
|
186
|
+
{threads.map((thread) => (
|
|
187
|
+
<motion.div
|
|
188
|
+
key={thread.id}
|
|
189
|
+
layout
|
|
190
|
+
initial={{ opacity: 0, y: -8 }}
|
|
191
|
+
animate={{ opacity: 1, y: 0 }}
|
|
192
|
+
exit={{ opacity: 0, scale: 0.97 }}
|
|
193
|
+
transition={MOTION_SPRING}
|
|
194
|
+
>
|
|
195
|
+
{rowFor(thread)}
|
|
196
|
+
</motion.div>
|
|
197
|
+
))}
|
|
198
|
+
</AnimatePresence>
|
|
199
|
+
</MotionConfig>
|
|
195
200
|
</Stack>
|
|
196
201
|
)
|
|
197
202
|
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
*
|
|
15
15
|
* <ThreadTranscript
|
|
16
16
|
* messages={thread.messages}
|
|
17
|
-
* liveParts={
|
|
18
|
-
* liveStatus={
|
|
17
|
+
* liveParts={run?.parts}
|
|
18
|
+
* liveStatus={run?.status}
|
|
19
19
|
* />
|
|
20
20
|
*/
|
|
21
21
|
import {
|
|
@@ -34,26 +34,26 @@ import { Fragment, lazy, memo, Suspense, useLayoutEffect, useMemo, useRef } from
|
|
|
34
34
|
import type { JSX } from 'react'
|
|
35
35
|
import type {
|
|
36
36
|
AgentPart,
|
|
37
|
-
AgentPartRenderers,
|
|
38
|
-
ChatMessage,
|
|
39
37
|
ErrorPart,
|
|
40
|
-
ForeignPart,
|
|
41
|
-
PartRenderer,
|
|
42
|
-
PartRenderers,
|
|
43
38
|
ReasoningPart,
|
|
44
39
|
SourcePart,
|
|
45
|
-
StreamStatus,
|
|
46
40
|
TextPart,
|
|
47
41
|
ToolCallPart,
|
|
48
|
-
|
|
49
|
-
} from '../
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
42
|
+
} from '../parts'
|
|
43
|
+
import type { AgentPartRenderers } from '../part-list'
|
|
44
|
+
import type { ChatMessage } from '../history'
|
|
45
|
+
import type { ForeignPart, PartRenderer, PartRenderers, TranscriptPart } from '../foreign'
|
|
46
|
+
import { isLiveStatus } from '../thread'
|
|
47
|
+
import type { StreamStatus } from '../thread'
|
|
48
|
+
import { coalesceParts } from '../coalesce'
|
|
49
|
+
import { narrowAgentPart } from '../foreign'
|
|
50
|
+
import { PartList } from '../part-list'
|
|
51
|
+
import { cx } from '../../common/props'
|
|
52
|
+
import type { BasaltProps } from '../../common/props'
|
|
53
|
+
import { assertRequiredProps } from '../../common/validate'
|
|
54
|
+
import { Markdown } from '../../content/markdown'
|
|
55
|
+
import { CopyAction } from '../../content/copy-action'
|
|
56
|
+
import { VX } from '../../tokens'
|
|
57
57
|
import { DEFAULT_AFFORDANCES } from './message-affordances'
|
|
58
58
|
import type { MessageAffordances } from './message-affordances'
|
|
59
59
|
import { formatRelativeTime } from './relative-time'
|
|
@@ -394,23 +394,23 @@ const FINISH_INDICATOR: Partial<
|
|
|
394
394
|
|
|
395
395
|
type MessageBlockProps = {
|
|
396
396
|
readonly message: ChatMessage<TranscriptPart>
|
|
397
|
-
readonly streaming?: boolean
|
|
397
|
+
readonly streaming?: boolean | undefined
|
|
398
398
|
readonly renderers: PartRenderers
|
|
399
399
|
readonly fallbackRenderer: PartRenderer<ForeignPart>
|
|
400
400
|
/** Suppresses the role label and surface chrome — this message continues the same speaker's
|
|
401
401
|
* immediately-preceding turn within the grouping window (the Slack rhythm, AGENT-CHAT-SPEC.md
|
|
402
402
|
* §_). Computed by `ThreadTranscript` (a property of the SEQUENCE, not of one message in
|
|
403
403
|
* isolation) and passed down. @default false */
|
|
404
|
-
readonly grouped?: boolean
|
|
404
|
+
readonly grouped?: boolean | undefined
|
|
405
405
|
/** Per-message hover-row affordances. `undefined` renders NO affordance row at all — this is how
|
|
406
406
|
* `ThreadTranscript` opts the live/streaming message out (an epoch-0 `createdAt` and a
|
|
407
407
|
* half-streamed coalesced text would otherwise render a nonsensical "56 years ago" timestamp and
|
|
408
408
|
* a copy button that copies a fragment). Every settled message gets a resolved (defaults-merged)
|
|
409
409
|
* object instead. */
|
|
410
|
-
readonly affordances?: MessageAffordances
|
|
410
|
+
readonly affordances?: MessageAffordances | undefined
|
|
411
411
|
/** True only for the single most-recent SETTLED assistant message — the sole message
|
|
412
412
|
* `affordances.onRegenerate` renders a control for. @default false */
|
|
413
|
-
readonly isLastAssistant?: boolean
|
|
413
|
+
readonly isLastAssistant?: boolean | undefined
|
|
414
414
|
}
|
|
415
415
|
|
|
416
416
|
/**
|
|
@@ -987,22 +987,22 @@ type ThreadTranscriptBase = BasaltProps & {
|
|
|
987
987
|
/** Settled messages for the thread, oldest first. */
|
|
988
988
|
readonly messages: readonly ChatMessage<TranscriptPart>[]
|
|
989
989
|
/** The live (in-flight) assistant turn's parts, when a run is streaming for this thread. */
|
|
990
|
-
readonly liveParts?: readonly TranscriptPart[]
|
|
990
|
+
readonly liveParts?: readonly TranscriptPart[] | undefined
|
|
991
991
|
/** The live run's status — drives the in-progress indicator on the live block. */
|
|
992
|
-
readonly liveStatus?: StreamStatus
|
|
992
|
+
readonly liveStatus?: StreamStatus | undefined
|
|
993
993
|
/** Consumer renderers keyed by part.type. Consulted BEFORE the built-in union. */
|
|
994
|
-
readonly renderers?: PartRenderers
|
|
994
|
+
readonly renderers?: PartRenderers | undefined
|
|
995
995
|
/** Called for a part whose type is neither an AgentPart variant nor a registered key. Defaults
|
|
996
996
|
* to a visible `UnknownPartChip` outside production, `null` in production — never throws. */
|
|
997
|
-
readonly fallbackRenderer?: PartRenderer<ForeignPart>
|
|
997
|
+
readonly fallbackRenderer?: PartRenderer<ForeignPart> | undefined
|
|
998
998
|
/** Per-message hover-row affordances (timestamp/copy/regenerate/custom actions). Unset fields
|
|
999
999
|
* fall back to `DEFAULT_AFFORDANCES`. Never shown on the live/streaming message — see
|
|
1000
1000
|
* `MessageBlockProps.affordances`. */
|
|
1001
|
-
readonly affordances?: MessageAffordances
|
|
1001
|
+
readonly affordances?: MessageAffordances | undefined
|
|
1002
1002
|
/** Suppresses the role label and surface chrome on a message whose predecessor shares its role
|
|
1003
1003
|
* and landed within 5 minutes — the Slack rhythm.
|
|
1004
1004
|
* @default true */
|
|
1005
|
-
readonly groupConsecutive?: boolean
|
|
1005
|
+
readonly groupConsecutive?: boolean | undefined
|
|
1006
1006
|
}
|
|
1007
1007
|
|
|
1008
1008
|
export type ThreadTranscriptProps = ThreadTranscriptBase & VirtualizeProps
|
|
@@ -1020,6 +1020,9 @@ export type ThreadTranscriptProps = ThreadTranscriptBase & VirtualizeProps
|
|
|
1020
1020
|
* bail-out. Only a genuine defined-to-undefined (or back) transition changes the returned wrapper's
|
|
1021
1021
|
* presence.
|
|
1022
1022
|
*
|
|
1023
|
+
* The ref is refreshed in a layout effect, so the guarantee covers invocations AFTER commit (a click,
|
|
1024
|
+
* a timer) — never one made during render.
|
|
1025
|
+
*
|
|
1023
1026
|
* ONLY EVER APPLY THIS TO AN EVENT HANDLER — never to a render prop. The trick works precisely
|
|
1024
1027
|
* because the wrapper is invoked AFTER render (from a click), so freezing its identity costs
|
|
1025
1028
|
* nothing: React re-reads the ref at call time. A render prop (`MessageAffordances.actions`, which
|
|
@@ -1035,7 +1038,9 @@ function useStableCallback<Args extends unknown[], R>(
|
|
|
1035
1038
|
callback: ((...args: Args) => R) | undefined,
|
|
1036
1039
|
): ((...args: Args) => R) | undefined {
|
|
1037
1040
|
const callbackRef = useRef(callback)
|
|
1038
|
-
|
|
1041
|
+
useLayoutEffect(() => {
|
|
1042
|
+
callbackRef.current = callback
|
|
1043
|
+
})
|
|
1039
1044
|
// Deliberately empty deps: this is what keeps `stable`'s identity constant across renders. It
|
|
1040
1045
|
// reads `callbackRef.current` at CALL time (not at creation time), so it always invokes whatever
|
|
1041
1046
|
// the consumer most recently passed — never a closure captured at first mount.
|
|
@@ -1064,7 +1069,7 @@ function useStableCallback<Args extends unknown[], R>(
|
|
|
1064
1069
|
*
|
|
1065
1070
|
* @example
|
|
1066
1071
|
* import { ThreadTranscript } from 'basalt-ui'
|
|
1067
|
-
* <ThreadTranscript messages={thread.messages} liveParts={
|
|
1072
|
+
* <ThreadTranscript messages={thread.messages} liveParts={run?.parts} liveStatus={run?.status} />
|
|
1068
1073
|
*
|
|
1069
1074
|
* @example
|
|
1070
1075
|
* // Windowed, for a long thread:
|
|
@@ -1123,11 +1128,8 @@ export function ThreadTranscript(props: ThreadTranscriptProps): JSX.Element {
|
|
|
1123
1128
|
() => ({
|
|
1124
1129
|
timestamp: affordancesProp?.timestamp ?? DEFAULT_AFFORDANCES.timestamp,
|
|
1125
1130
|
copy: affordancesProp?.copy ?? DEFAULT_AFFORDANCES.copy,
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
// widening `MessageAffordances` itself to accept an explicit `undefined`.
|
|
1129
|
-
...(stableOnRegenerate !== undefined && { onRegenerate: stableOnRegenerate }),
|
|
1130
|
-
...(actions !== undefined && { actions }),
|
|
1131
|
+
onRegenerate: stableOnRegenerate,
|
|
1132
|
+
actions,
|
|
1131
1133
|
}),
|
|
1132
1134
|
[affordancesProp?.timestamp, affordancesProp?.copy, stableOnRegenerate, actions],
|
|
1133
1135
|
)
|
|
@@ -1176,7 +1178,7 @@ export function ThreadTranscript(props: ThreadTranscriptProps): JSX.Element {
|
|
|
1176
1178
|
<div aria-live="polite" aria-atomic="false" aria-relevant="additions">
|
|
1177
1179
|
<MessageBlock
|
|
1178
1180
|
message={liveMessage}
|
|
1179
|
-
streaming={liveStatus
|
|
1181
|
+
streaming={isLiveStatus(liveStatus)}
|
|
1180
1182
|
renderers={renderers}
|
|
1181
1183
|
fallbackRenderer={fallbackRenderer}
|
|
1182
1184
|
/>
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
import { Badge, Group, Skeleton, Stack, Text, UnstyledButton } from '@mantine/core'
|
|
22
22
|
import { useHover } from '@mantine/hooks'
|
|
23
23
|
import type { JSX } from 'react'
|
|
24
|
-
import type { AgentThread, ThreadStatus } from '../
|
|
25
|
-
import { assertRequiredProps } from '
|
|
26
|
-
import { cx } from '
|
|
27
|
-
import type { BasaltProps } from '
|
|
28
|
-
import { alpha, VX } from '
|
|
24
|
+
import type { AgentThread, ThreadStatus } from '../thread'
|
|
25
|
+
import { assertRequiredProps } from '../../common/validate'
|
|
26
|
+
import { cx } from '../../common/props'
|
|
27
|
+
import type { BasaltProps } from '../../common/props'
|
|
28
|
+
import { alpha, VX } from '../../tokens'
|
|
29
29
|
import { formatRelativeTime } from './relative-time'
|
|
30
30
|
|
|
31
31
|
// ── Status badge — shown ONLY for states that need a glance (attention/error). ────
|