basalt-ui 1.41.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +46 -43
- package/CHANGELOG.md +542 -518
- package/MIGRATING.md +964 -37
- package/README.md +171 -366
- package/agent/rules/basalt-batteries.md +19 -74
- package/agent/rules/basalt-charts.md +21 -95
- package/agent/rules/basalt-controls.md +23 -131
- package/agent/rules/basalt-mantine.md +26 -99
- package/agent/rules/basalt-state.md +21 -103
- package/agent/rules/basalt-tokens.md +33 -114
- package/agent/skills/basalt-app/SKILL.md +229 -72
- package/agent/skills/basalt-charts/SKILL.md +23 -57
- package/agent/skills/basalt-design/SKILL.md +12 -70
- package/agent/templates/AGENTS-block.md.tpl +16 -26
- package/agent/templates/DESIGN.md.tpl +1 -1
- package/agent/templates/__root.tpl +9 -16
- package/agent/templates/main.tpl +21 -0
- package/agent/templates/nav.tpl +18 -0
- package/configs/oxlint-basalt.json +4 -10
- package/configs/oxlint-plugin.js +465 -844
- package/configs/oxlint-plugin.test.ts +661 -709
- package/configs/oxlint.json +10 -2
- package/dist/agent/ai-sdk-transport.d.ts +19 -7
- package/dist/agent/ai-sdk-transport.d.ts.map +1 -1
- package/dist/agent/ai-sdk-transport.js +10 -7
- package/dist/{agent-chat → agent/chat}/composer.d.ts +16 -16
- package/dist/agent/chat/composer.d.ts.map +1 -0
- package/dist/{agent-chat → agent/chat}/composer.js +10 -9
- package/dist/{agent-chat → agent/chat}/message-affordances.d.ts +7 -6
- package/dist/agent/chat/message-affordances.d.ts.map +1 -0
- package/dist/agent/chat/relative-time.d.ts.map +1 -0
- package/dist/{agent-chat → agent/chat}/thread-feed-row.d.ts +18 -16
- package/dist/agent/chat/thread-feed-row.d.ts.map +1 -0
- package/dist/{agent-chat → agent/chat}/thread-feed-row.js +12 -11
- package/dist/{agent-chat → agent/chat}/thread-feed.d.ts +8 -8
- package/dist/agent/chat/thread-feed.d.ts.map +1 -0
- package/dist/{agent-chat → agent/chat}/thread-feed.js +12 -10
- package/dist/{agent-chat → agent/chat}/thread-message.d.ts +12 -9
- package/dist/agent/chat/thread-message.d.ts.map +1 -0
- package/dist/{agent-chat → agent/chat}/thread-message.js +15 -13
- package/dist/{agent-chat → agent/chat}/thread-outcome-card.d.ts +2 -2
- package/dist/agent/chat/thread-outcome-card.d.ts.map +1 -0
- package/dist/{agent-chat → agent/chat}/thread-outcome-card.js +3 -3
- package/dist/{agent-chat → agent/chat}/tool-chip.d.ts +5 -5
- package/dist/agent/chat/tool-chip.d.ts.map +1 -0
- package/dist/{agent-chat → agent/chat}/tool-chip.js +4 -4
- package/dist/agent/chat/use-keyboard-inset.d.ts.map +1 -0
- package/dist/{agent-chat → agent/chat}/use-keyboard-inset.js +1 -1
- package/dist/{agent-chat → agent/chat}/virtualize.d.ts +7 -7
- package/dist/agent/chat/virtualize.d.ts.map +1 -0
- package/dist/agent/error.d.ts +31 -0
- package/dist/agent/error.d.ts.map +1 -0
- package/dist/agent/error.js +18 -0
- package/dist/agent/history.d.ts +2 -36
- package/dist/agent/history.d.ts.map +1 -1
- package/dist/agent/history.js +0 -32
- package/dist/agent/id.d.ts +4 -5
- package/dist/agent/id.d.ts.map +1 -1
- package/dist/agent/index.d.ts +19 -52
- package/dist/agent/index.d.ts.map +1 -1
- package/dist/agent/index.js +10 -32
- package/dist/agent/outcome.d.ts +3 -14
- package/dist/agent/outcome.d.ts.map +1 -1
- package/dist/agent/outcome.js +0 -30
- package/dist/agent/part-list.d.ts +3 -3
- package/dist/agent/part-list.d.ts.map +1 -1
- package/dist/agent/parts.d.ts +23 -24
- package/dist/agent/parts.d.ts.map +1 -1
- package/dist/agent/run-committer.d.ts +23 -0
- package/dist/agent/run-committer.d.ts.map +1 -0
- package/dist/agent/run-committer.js +41 -0
- package/dist/agent/run-records.d.ts +77 -0
- package/dist/agent/run-records.d.ts.map +1 -0
- package/dist/agent/run-records.js +69 -0
- package/dist/agent/thread.d.ts +23 -47
- package/dist/agent/thread.d.ts.map +1 -1
- package/dist/agent/thread.js +3 -134
- package/dist/agent/transport.d.ts +6 -69
- package/dist/agent/transport.d.ts.map +1 -1
- package/dist/agent/transport.js +0 -18
- package/dist/agent/use-agent-thread-runs.d.ts +63 -26
- package/dist/agent/use-agent-thread-runs.d.ts.map +1 -1
- package/dist/agent/use-agent-thread-runs.js +202 -66
- package/dist/charts/BandStrip.d.ts +46 -0
- package/dist/charts/BandStrip.d.ts.map +1 -0
- package/dist/charts/BandStrip.js +151 -0
- package/dist/charts/Bars.d.ts +19 -0
- package/dist/charts/Bars.d.ts.map +1 -0
- package/dist/charts/Bars.js +77 -0
- package/dist/charts/CartesianChart.d.ts +57 -0
- package/dist/charts/CartesianChart.d.ts.map +1 -0
- package/dist/charts/CartesianChart.js +121 -0
- package/dist/charts/ChartCard.d.ts +34 -0
- package/dist/charts/ChartCard.d.ts.map +1 -0
- package/dist/charts/ChartCard.js +115 -0
- package/dist/charts/Donut.d.ts +25 -0
- package/dist/charts/Donut.d.ts.map +1 -0
- package/dist/charts/Donut.js +191 -0
- package/dist/charts/DualPanel.d.ts +47 -0
- package/dist/charts/DualPanel.d.ts.map +1 -0
- package/dist/charts/DualPanel.js +214 -0
- package/dist/charts/Heatmap.d.ts +41 -0
- package/dist/charts/Heatmap.d.ts.map +1 -0
- package/dist/charts/Heatmap.js +216 -0
- package/dist/charts/Lines.d.ts +11 -0
- package/dist/charts/Lines.d.ts.map +1 -0
- package/dist/charts/Lines.js +114 -0
- package/dist/charts/MirroredBars.d.ts +44 -0
- package/dist/charts/MirroredBars.d.ts.map +1 -0
- package/dist/charts/MirroredBars.js +190 -0
- package/dist/charts/Sparkline.d.ts +22 -0
- package/dist/charts/Sparkline.d.ts.map +1 -0
- package/dist/charts/Sparkline.js +129 -0
- package/dist/charts/StackedArea.d.ts +15 -0
- package/dist/charts/StackedArea.d.ts.map +1 -0
- package/dist/charts/StackedArea.js +46 -0
- package/dist/charts/box.d.ts +38 -0
- package/dist/charts/box.d.ts.map +1 -0
- package/dist/charts/box.js +72 -0
- package/dist/charts/card-context.d.ts +3 -0
- package/dist/charts/card-context.d.ts.map +1 -0
- package/dist/charts/card-context.js +7 -0
- package/dist/charts/chart-box.module.css +64 -0
- package/{src/content/article-card.module.css.d.ts → dist/charts/chart-box.module.css.d.ts} +5 -9
- package/dist/charts/chart-card.module.css +25 -0
- package/dist/{dashboard/widget-grid.module.css.d.ts → charts/chart-card.module.css.d.ts} +1 -3
- package/dist/charts/chart-legend.module.css +38 -0
- package/{src/dashboard/widget-grid.module.css.d.ts → dist/charts/chart-legend.module.css.d.ts} +3 -3
- package/dist/charts/compile.d.ts +62 -0
- package/dist/charts/compile.d.ts.map +1 -0
- package/dist/charts/compile.js +386 -0
- package/dist/charts/cursor.d.ts +50 -0
- package/dist/charts/cursor.d.ts.map +1 -0
- package/dist/charts/cursor.js +157 -0
- package/dist/charts/curves.d.ts +12 -0
- package/dist/charts/curves.d.ts.map +1 -0
- package/dist/charts/curves.js +86 -0
- package/dist/charts/donut.module.css +54 -0
- package/dist/{content/article-card.module.css.d.ts → charts/donut.module.css.d.ts} +2 -9
- package/dist/charts/host.d.ts +17 -0
- package/dist/charts/host.d.ts.map +1 -0
- package/dist/charts/host.js +35 -0
- package/dist/charts/index.d.ts +18 -53
- package/dist/charts/index.d.ts.map +1 -1
- package/dist/charts/index.js +17 -189
- package/dist/charts/legend.d.ts +23 -0
- package/dist/charts/legend.d.ts.map +1 -0
- package/dist/charts/legend.js +160 -0
- package/dist/charts/marks.d.ts +25 -0
- package/dist/charts/marks.d.ts.map +1 -0
- package/dist/charts/marks.js +128 -0
- package/dist/charts/panel.d.ts +56 -0
- package/dist/charts/panel.d.ts.map +1 -0
- package/dist/charts/panel.js +123 -0
- package/dist/charts/scales.d.ts +44 -0
- package/dist/charts/scales.d.ts.map +1 -0
- package/dist/charts/scales.js +163 -0
- package/dist/charts/sizing.d.ts +12 -0
- package/dist/charts/sizing.d.ts.map +1 -0
- package/dist/charts/sizing.js +33 -0
- package/dist/charts/state.d.ts +17 -0
- package/dist/charts/state.d.ts.map +1 -0
- package/dist/charts/state.js +53 -0
- package/dist/charts/theme.d.ts +38 -19
- package/dist/charts/theme.d.ts.map +1 -1
- package/dist/charts/theme.js +48 -26
- package/dist/charts/types.d.ts +227 -0
- package/dist/charts/types.d.ts.map +1 -0
- package/dist/charts/types.js +4 -0
- package/dist/cli/audit-allows.d.ts +4 -17
- package/dist/cli/audit-allows.d.ts.map +1 -1
- package/dist/cli/config.d.ts +18 -43
- package/dist/cli/config.d.ts.map +1 -1
- package/dist/cli/config.js +6 -0
- package/dist/cli/doctor-upgrade.d.ts +43 -0
- package/dist/cli/doctor-upgrade.d.ts.map +1 -0
- package/dist/cli/doctor-upgrade.js +314 -0
- package/dist/cli/doctor.d.ts +14 -29
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +58 -9
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +2 -4
- package/dist/cli/index.d.ts +48 -172
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +39 -132
- package/dist/cli/init.d.ts.map +1 -1
- package/dist/cli/init.js +43 -37
- package/dist/cli/sync.d.ts +5 -21
- package/dist/cli/sync.d.ts.map +1 -1
- package/dist/cli/sync.js +4 -23
- package/dist/cli/tokens-css.d.ts +7 -28
- package/dist/cli/tokens-css.d.ts.map +1 -1
- package/dist/commands/ShortcutsHelp.d.ts.map +1 -1
- package/dist/commands/ShortcutsHelp.js +4 -5
- package/dist/commands/define-commands.d.ts +15 -31
- package/dist/commands/define-commands.d.ts.map +1 -1
- package/dist/commands/define-commands.js +1 -11
- package/dist/commands/define-overlays.d.ts +5 -19
- package/dist/commands/define-overlays.d.ts.map +1 -1
- package/dist/commands/define-overlays.js +3 -11
- package/dist/commands/index.d.ts +10 -40
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +9 -46
- package/dist/{notifications → commands/notifications}/bell.d.ts +1 -1
- package/dist/commands/notifications/bell.d.ts.map +1 -0
- package/dist/{notifications → commands/notifications}/center.d.ts +2 -2
- package/dist/commands/notifications/center.d.ts.map +1 -0
- package/dist/{notifications → commands/notifications}/center.js +2 -2
- package/dist/{notifications → commands/notifications}/define-notifications.d.ts +3 -3
- package/dist/commands/notifications/define-notifications.d.ts.map +1 -0
- package/dist/commands/notifications/notify.d.ts +44 -0
- package/dist/commands/notifications/notify.d.ts.map +1 -0
- package/dist/commands/notifications/notify.js +79 -0
- package/dist/{notifications → commands/notifications}/store.d.ts +2 -0
- package/dist/commands/notifications/store.d.ts.map +1 -0
- package/dist/{notifications → commands/notifications}/store.js +4 -0
- package/dist/commands/projectors.d.ts +1 -131
- package/dist/commands/projectors.d.ts.map +1 -1
- package/dist/commands/projectors.js +2 -73
- package/dist/commands/shell-bridge.d.ts +3 -3
- package/dist/commands/shortcut-format.d.ts +5 -4
- package/dist/commands/shortcut-format.d.ts.map +1 -1
- package/dist/common/errors.d.ts +3 -3
- package/dist/common/use-measured-widths.d.ts.map +1 -1
- package/dist/common/use-measured-widths.js +5 -3
- package/dist/common/validate.d.ts +2 -2
- package/dist/content/article-layout.d.ts.map +1 -1
- package/dist/content/article-layout.js +3 -3
- package/dist/content/article-model.d.ts +1 -46
- package/dist/content/article-model.d.ts.map +1 -1
- package/dist/content/article-model.js +1 -29
- package/dist/content/index.d.ts +11 -41
- package/dist/content/index.d.ts.map +1 -1
- package/dist/content/index.js +3 -35
- package/dist/content/markdown.d.ts +1 -1
- package/dist/content/markdown.d.ts.map +1 -1
- package/dist/content/markdown.js +1 -1
- package/dist/content/mermaid.d.ts.map +1 -1
- package/dist/content/mermaid.js +7 -7
- package/dist/content/slug.d.ts +1 -8
- package/dist/content/slug.d.ts.map +1 -1
- package/dist/content/slug.js +1 -8
- package/dist/content/url-hardening.d.ts +2 -2
- package/dist/content/url-hardening.d.ts.map +1 -1
- package/dist/content/url-hardening.js +2 -0
- package/dist/controls/actions.d.ts +16 -1
- package/dist/controls/actions.d.ts.map +1 -1
- package/dist/controls/enum-filter.d.ts +1 -1
- package/dist/controls/enum-filter.d.ts.map +1 -1
- package/dist/controls/filter-context.d.ts.map +1 -1
- package/dist/controls/filter-context.js +3 -1
- package/dist/controls/filter-set.js +4 -6
- package/dist/controls/form-layout.d.ts +1 -1
- package/dist/controls/form-layout.d.ts.map +1 -1
- package/dist/controls/form-layout.js +1 -1
- package/dist/controls/glyphs.d.ts +0 -2
- package/dist/controls/glyphs.d.ts.map +1 -1
- package/dist/controls/glyphs.js +0 -7
- package/dist/controls/index.d.ts +12 -17
- package/dist/controls/index.d.ts.map +1 -1
- package/dist/controls/index.js +5 -39
- package/dist/controls/multi-select-filter.d.ts +4 -3
- package/dist/controls/multi-select-filter.d.ts.map +1 -1
- package/dist/controls/number-filter.d.ts +4 -3
- package/dist/controls/number-filter.d.ts.map +1 -1
- package/dist/controls/number-filter.js +3 -1
- package/dist/controls/range-filter.d.ts +4 -3
- package/dist/controls/range-filter.d.ts.map +1 -1
- package/dist/controls/search-filter.d.ts +4 -3
- package/dist/controls/search-filter.d.ts.map +1 -1
- package/dist/controls/search-filter.js +19 -14
- package/dist/controls/select-filter.d.ts +4 -3
- package/dist/controls/select-filter.d.ts.map +1 -1
- package/dist/controls/sync-button.d.ts.map +1 -1
- package/dist/controls/sync-button.js +12 -15
- package/dist/controls/toggle-filter.d.ts +4 -3
- package/dist/controls/toggle-filter.d.ts.map +1 -1
- package/dist/controls/uncontrolled.d.ts +12 -0
- package/dist/controls/uncontrolled.d.ts.map +1 -0
- package/dist/controls/view-tabs.d.ts +2 -2
- package/dist/controls/view-tabs.d.ts.map +1 -1
- package/dist/controls-dates/index.d.ts +0 -1
- package/dist/controls-dates/index.d.ts.map +1 -1
- package/dist/dashboard/index.d.ts +7 -9
- package/dist/dashboard/index.d.ts.map +1 -1
- package/dist/dashboard/index.js +3 -23
- package/dist/dashboard/section.d.ts +4 -6
- package/dist/dashboard/section.d.ts.map +1 -1
- package/dist/dashboard/section.js +4 -10
- package/dist/dashboard/stat-card.d.ts +4 -4
- package/dist/dashboard/stat-card.d.ts.map +1 -1
- package/dist/dashboard/stat-card.js +3 -3
- package/dist/dashboard/widget-header.module.css +9 -7
- package/dist/dev-dock.d.ts.map +1 -1
- package/dist/dev-dock.js +6 -1
- package/dist/format/date.d.ts +0 -34
- package/dist/format/date.d.ts.map +1 -1
- package/dist/format/date.js +0 -54
- package/dist/format/index.d.ts +7 -22
- package/dist/format/index.d.ts.map +1 -1
- package/dist/format/index.js +2 -43
- package/dist/format/number.d.ts +3 -14
- package/dist/format/number.d.ts.map +1 -1
- package/dist/format/number.js +0 -13
- package/dist/format/shared.d.ts +2 -3
- package/dist/format/shared.d.ts.map +1 -1
- package/dist/forms/index.d.ts +0 -11
- package/dist/forms/index.d.ts.map +1 -1
- package/dist/forms/index.js +1 -14
- package/dist/guard/index.d.ts +6 -21
- package/dist/guard/index.d.ts.map +1 -1
- package/dist/guard/index.js +27 -115
- package/dist/guard/types.d.ts +7 -18
- package/dist/guard/types.d.ts.map +1 -1
- package/dist/index.d.ts +16 -48
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -117
- package/dist/provider/create-router.d.ts +44 -0
- package/dist/provider/create-router.d.ts.map +1 -0
- package/dist/provider/create-router.js +62 -0
- package/dist/provider/hotkeys.d.ts +8 -0
- package/dist/provider/hotkeys.d.ts.map +1 -0
- package/dist/provider/hotkeys.js +50 -0
- package/dist/provider/index.d.ts +33 -110
- package/dist/provider/index.d.ts.map +1 -1
- package/dist/provider/index.js +182 -82
- package/dist/provider/lab-theme.d.ts.map +1 -1
- package/dist/provider/route-transition.d.ts +76 -0
- package/dist/provider/route-transition.d.ts.map +1 -0
- package/dist/provider/route-transition.js +98 -0
- package/dist/provider/spotlight-actions.d.ts +10 -0
- package/dist/provider/spotlight-actions.d.ts.map +1 -0
- package/dist/provider/spotlight-actions.js +55 -0
- package/dist/provider/test-router.d.ts +6 -0
- package/dist/provider/test-router.d.ts.map +1 -0
- package/dist/provider/test-router.js +18 -0
- package/dist/query-client.d.ts +4 -20
- package/dist/query-client.d.ts.map +1 -1
- package/dist/query-client.js +2 -2
- package/dist/router-tanstack/index.d.ts +18 -64
- package/dist/router-tanstack/index.d.ts.map +1 -1
- package/dist/router-tanstack/index.js +2 -16
- package/dist/router-tanstack/nav.d.ts +12 -1
- package/dist/router-tanstack/nav.d.ts.map +1 -1
- package/dist/router-tanstack/nav.js +8 -1
- package/dist/router-tanstack/search-store.d.ts +1 -1
- package/dist/router-tanstack/search-store.d.ts.map +1 -1
- package/dist/router-tanstack/use-nav.d.ts +8 -9
- package/dist/router-tanstack/use-nav.d.ts.map +1 -1
- package/dist/router-tanstack/use-nav.js +20 -1
- package/dist/shell/app-mobile-nav.d.ts.map +1 -1
- package/dist/shell/app-sidebar.js +1 -1
- package/dist/shell/index.d.ts +31 -10
- package/dist/shell/index.d.ts.map +1 -1
- package/dist/shell/index.js +14 -3
- package/dist/shell/page-aside.d.ts +2 -2
- package/dist/shell/page-aside.d.ts.map +1 -1
- package/dist/shell/page-aside.js +31 -12
- package/dist/shell/page-bar.d.ts +2 -2
- package/dist/shell/page-bar.d.ts.map +1 -1
- package/dist/shell/page-bar.js +1 -1
- package/dist/state.d.ts +10 -12
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +4 -6
- package/dist/styles.css +107 -7
- package/dist/surfaces.d.ts +28 -103
- package/dist/surfaces.d.ts.map +1 -1
- package/dist/surfaces.js +54 -143
- package/dist/{data → table}/data-table-state.d.ts +1 -1
- package/dist/table/data-table-state.d.ts.map +1 -0
- package/dist/{data → table}/data-table-state.js +4 -3
- package/dist/{data → table}/data-table.d.ts +28 -49
- package/dist/table/data-table.d.ts.map +1 -0
- package/dist/{data → table}/data-table.js +74 -60
- package/dist/table/index.d.ts +18 -0
- package/dist/table/index.d.ts.map +1 -0
- package/dist/{data/table.js → table/index.js} +1 -1
- package/dist/table/query-branch.d.ts.map +1 -0
- package/dist/table/table-features.d.ts +69 -0
- package/dist/table/table-features.d.ts.map +1 -0
- package/dist/table/table-features.js +49 -0
- package/dist/telemetry.d.ts +77 -0
- package/dist/telemetry.d.ts.map +1 -0
- package/dist/telemetry.js +33 -0
- package/dist/theme/index.d.ts +10 -21
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +3 -14
- package/dist/theme/theme-toggle.d.ts.map +1 -1
- package/dist/theme/theme-toggle.js +7 -33
- package/dist/theme/theme-toggle.module.css +30 -0
- package/dist/theme/theme-toggle.module.css.d.ts +10 -0
- package/dist/theme-lab/derive-controls.d.ts.map +1 -1
- package/dist/theme-lab/derive-controls.js +5 -3
- package/dist/theme-lab/derive-state.d.ts.map +1 -1
- package/dist/theme-lab/derive-state.js +2 -1
- package/dist/tokens/core.d.ts +360 -0
- package/dist/tokens/core.d.ts.map +1 -0
- package/dist/tokens/core.js +708 -0
- package/dist/tokens/derive.d.ts +1 -1
- package/dist/tokens/derive.d.ts.map +1 -1
- package/dist/tokens/index.d.ts +5 -373
- package/dist/tokens/index.d.ts.map +1 -1
- package/dist/tokens/index.js +8 -700
- package/dist/tokens/palette.d.ts +2 -6
- package/dist/tokens/palette.d.ts.map +1 -1
- package/dist/tokens/palette.js +1 -4
- package/dist/vite.d.ts +4 -3
- package/dist/vite.d.ts.map +1 -1
- package/llms.txt +43 -85
- package/package.json +80 -173
- package/src/agent/ai-sdk-transport.ts +57 -37
- package/src/{agent-chat → agent/chat}/composer.tsx +29 -30
- package/src/{agent-chat → agent/chat}/message-affordances.ts +8 -5
- package/src/{agent-chat → agent/chat}/thread-feed-row.tsx +30 -35
- package/src/{agent-chat → agent/chat}/thread-feed.tsx +40 -35
- package/src/{agent-chat → agent/chat}/thread-message.tsx +37 -35
- package/src/{agent-chat → agent/chat}/thread-outcome-card.tsx +5 -5
- package/src/{agent-chat → agent/chat}/tool-chip.tsx +12 -12
- package/src/{agent-chat → agent/chat}/use-keyboard-inset.ts +1 -1
- package/src/{agent-chat → agent/chat}/virtualize.ts +5 -5
- package/src/agent/error.ts +43 -0
- package/src/agent/history.ts +2 -107
- package/src/agent/id.ts +4 -5
- package/src/agent/index.ts +23 -112
- package/src/agent/outcome.ts +3 -56
- package/src/agent/part-list.tsx +3 -3
- package/src/agent/parts.ts +23 -22
- package/src/agent/run-committer.ts +64 -0
- package/src/agent/run-records.ts +147 -0
- package/src/agent/thread.ts +24 -231
- package/src/agent/transport.ts +6 -96
- package/src/agent/use-agent-thread-runs.ts +364 -199
- package/src/charts/BandStrip.tsx +276 -0
- package/src/charts/Bars.tsx +141 -0
- package/src/charts/CartesianChart.tsx +206 -0
- package/src/charts/ChartCard.tsx +178 -0
- package/src/charts/Donut.tsx +256 -0
- package/src/charts/DualPanel.tsx +326 -0
- package/src/charts/Heatmap.tsx +282 -0
- package/src/charts/Lines.tsx +151 -0
- package/src/charts/MirroredBars.tsx +303 -0
- package/src/charts/Sparkline.tsx +176 -0
- package/src/charts/StackedArea.tsx +80 -0
- package/src/charts/box.tsx +96 -0
- package/src/charts/card-context.ts +11 -0
- package/src/charts/chart-box.module.css +64 -0
- package/src/charts/chart-box.module.css.d.ts +12 -0
- package/src/charts/chart-card.module.css +25 -0
- package/src/charts/chart-card.module.css.d.ts +8 -0
- package/src/charts/chart-legend.module.css +38 -0
- package/src/charts/chart-legend.module.css.d.ts +10 -0
- package/src/charts/compile.ts +585 -0
- package/src/charts/cursor.ts +282 -0
- package/src/charts/curves.ts +111 -0
- package/src/charts/donut.module.css +54 -0
- package/src/charts/donut.module.css.d.ts +9 -0
- package/src/charts/host.tsx +60 -0
- package/src/charts/index.ts +41 -178
- package/src/charts/legend.tsx +204 -0
- package/src/charts/marks.ts +201 -0
- package/src/charts/panel.tsx +227 -0
- package/src/charts/scales.ts +237 -0
- package/src/charts/sizing.ts +47 -0
- package/src/charts/state.tsx +80 -0
- package/src/charts/theme.ts +65 -0
- package/src/charts/types.ts +242 -0
- package/src/cli/audit-allows.ts +8 -30
- package/src/cli/config.ts +26 -43
- package/src/cli/doctor-upgrade.ts +457 -0
- package/src/cli/doctor.ts +89 -72
- package/src/cli/help.ts +2 -4
- package/src/cli/index.ts +100 -384
- package/src/cli/init.ts +60 -51
- package/src/cli/sync.ts +13 -68
- package/src/cli/tokens-css.ts +7 -28
- package/src/commands/ShortcutsHelp.tsx +8 -9
- package/src/commands/define-commands.ts +16 -43
- package/src/commands/define-overlays.ts +12 -36
- package/src/commands/index.ts +11 -94
- package/src/{notifications → commands/notifications}/bell.tsx +2 -2
- package/src/{notifications → commands/notifications}/center.tsx +7 -5
- package/src/{notifications → commands/notifications}/define-notifications.ts +3 -3
- package/src/commands/notifications/notify.tsx +158 -0
- package/src/{notifications → commands/notifications}/store.ts +10 -2
- package/src/commands/projectors.ts +5 -225
- package/src/commands/shell-bridge.ts +5 -5
- package/src/commands/shortcut-format.ts +5 -4
- package/src/common/errors.ts +3 -3
- package/src/common/use-measured-widths.ts +6 -3
- package/src/common/validate.ts +2 -2
- package/src/content/article-layout.tsx +37 -38
- package/src/content/article-model.ts +1 -84
- package/src/content/index.ts +12 -83
- package/src/content/markdown.tsx +4 -3
- package/src/content/mermaid.tsx +9 -7
- package/src/content/slug.ts +1 -16
- package/src/content/url-hardening.ts +8 -2
- package/src/controls/actions.tsx +24 -1
- package/src/controls/enum-filter.tsx +1 -1
- package/src/controls/filter-context.tsx +3 -1
- package/src/controls/filter-set.tsx +5 -7
- package/src/controls/form-layout.tsx +2 -2
- package/src/controls/glyphs.tsx +0 -10
- package/src/controls/index.ts +13 -64
- package/src/controls/multi-select-filter.tsx +5 -4
- package/src/controls/number-filter.tsx +8 -4
- package/src/controls/range-filter.tsx +5 -4
- package/src/controls/search-filter.tsx +25 -19
- package/src/controls/select-filter.tsx +5 -4
- package/src/controls/sync-button.tsx +18 -20
- package/src/controls/toggle-filter.tsx +5 -4
- package/src/controls/uncontrolled.ts +12 -0
- package/src/controls/view-tabs.tsx +3 -3
- package/src/controls-dates/date-range-picker.tsx +1 -1
- package/src/controls-dates/index.ts +0 -1
- package/src/dashboard/index.ts +7 -48
- package/src/dashboard/section.tsx +11 -40
- package/src/dashboard/stat-card.tsx +14 -16
- package/src/dashboard/widget-header.module.css +9 -7
- package/src/dev-dock.tsx +14 -27
- package/src/format/date.ts +2 -92
- package/src/format/index.ts +7 -53
- package/src/format/number.ts +3 -26
- package/src/format/shared.ts +2 -3
- package/src/forms/index.ts +0 -23
- package/src/guard/index.ts +36 -191
- package/src/guard/types.ts +6 -19
- package/src/index.ts +30 -282
- package/src/provider/create-router.tsx +138 -0
- package/src/provider/hotkeys.ts +70 -0
- package/src/provider/index.tsx +260 -230
- package/src/provider/lab-theme.ts +3 -2
- package/src/provider/route-transition.ts +199 -0
- package/src/provider/spotlight-actions.tsx +69 -0
- package/src/provider/test-router.tsx +25 -0
- package/src/query-client.ts +4 -22
- package/src/router-tanstack/index.ts +18 -112
- package/src/router-tanstack/nav.ts +28 -2
- package/src/router-tanstack/search-store.ts +9 -2
- package/src/router-tanstack/use-nav.ts +47 -13
- package/src/shell/app-mobile-nav.tsx +3 -2
- package/src/shell/app-sidebar.tsx +1 -1
- package/src/shell/aside-docking.ts +1 -1
- package/src/shell/index.tsx +61 -20
- package/src/shell/page-aside.tsx +47 -23
- package/src/shell/page-bar.tsx +3 -3
- package/src/shell/page-title.tsx +1 -1
- package/src/state.ts +11 -37
- package/src/styles.css +107 -7
- package/src/surfaces.ts +56 -151
- package/src/{data → table}/data-table-state.ts +5 -4
- package/src/{data → table}/data-table.tsx +170 -161
- package/src/table/index.ts +18 -0
- package/src/table/table-features.ts +102 -0
- package/src/telemetry.ts +110 -0
- package/src/theme/index.ts +22 -47
- package/src/theme/theme-toggle.module.css +30 -0
- package/src/theme/theme-toggle.module.css.d.ts +10 -0
- package/src/theme/theme-toggle.tsx +15 -43
- package/src/theme-lab/derive-controls.tsx +5 -3
- package/src/theme-lab/derive-state.ts +2 -1
- package/src/tokens/core.ts +1163 -0
- package/src/tokens/derive.ts +1 -1
- package/src/tokens/index.ts +14 -1181
- package/src/tokens/palette.ts +3 -7
- package/src/vite.ts +3 -3
- package/agent/templates/query-client.ts.tpl +0 -26
- package/dist/agent/adapter.d.ts +0 -150
- package/dist/agent/adapter.d.ts.map +0 -1
- package/dist/agent/adapter.js +0 -482
- package/dist/agent/use-agent-stream.d.ts +0 -35
- package/dist/agent/use-agent-stream.d.ts.map +0 -1
- package/dist/agent/use-agent-stream.js +0 -59
- package/dist/agent-chat/composer.d.ts.map +0 -1
- package/dist/agent-chat/index.d.ts +0 -31
- package/dist/agent-chat/index.d.ts.map +0 -1
- package/dist/agent-chat/index.js +0 -19
- package/dist/agent-chat/message-affordances.d.ts.map +0 -1
- package/dist/agent-chat/relative-time.d.ts.map +0 -1
- package/dist/agent-chat/thread-detail-panel.d.ts +0 -28
- package/dist/agent-chat/thread-detail-panel.d.ts.map +0 -1
- package/dist/agent-chat/thread-detail-panel.js +0 -115
- package/dist/agent-chat/thread-feed-row.d.ts.map +0 -1
- package/dist/agent-chat/thread-feed.d.ts.map +0 -1
- package/dist/agent-chat/thread-message.d.ts.map +0 -1
- package/dist/agent-chat/thread-outcome-card.d.ts.map +0 -1
- package/dist/agent-chat/thread-workspace.d.ts +0 -44
- package/dist/agent-chat/thread-workspace.d.ts.map +0 -1
- package/dist/agent-chat/thread-workspace.js +0 -153
- package/dist/agent-chat/tool-chip.d.ts.map +0 -1
- package/dist/agent-chat/use-keyboard-inset.d.ts.map +0 -1
- package/dist/agent-chat/virtualize.d.ts.map +0 -1
- package/dist/charts/cursor/resolve.d.ts +0 -75
- package/dist/charts/cursor/resolve.d.ts.map +0 -1
- package/dist/charts/cursor/resolve.js +0 -91
- package/dist/charts/cursor/scope.d.ts +0 -20
- package/dist/charts/cursor/scope.d.ts.map +0 -1
- package/dist/charts/cursor/scope.js +0 -20
- package/dist/charts/cursor/store.d.ts +0 -35
- package/dist/charts/cursor/store.d.ts.map +0 -1
- package/dist/charts/cursor/store.js +0 -25
- package/dist/charts/cursor/touch-pin.d.ts +0 -45
- package/dist/charts/cursor/touch-pin.d.ts.map +0 -1
- package/dist/charts/cursor/touch-pin.js +0 -79
- package/dist/charts/hooks/use-discrete-cursor.d.ts +0 -66
- package/dist/charts/hooks/use-discrete-cursor.d.ts.map +0 -1
- package/dist/charts/hooks/use-discrete-cursor.js +0 -198
- package/dist/charts/hooks/use-hysteresis.d.ts +0 -18
- package/dist/charts/hooks/use-hysteresis.d.ts.map +0 -1
- package/dist/charts/hooks/use-hysteresis.js +0 -12
- package/dist/charts/hooks/useBandPlot.d.ts +0 -145
- package/dist/charts/hooks/useBandPlot.d.ts.map +0 -1
- package/dist/charts/hooks/useBandPlot.js +0 -178
- package/dist/charts/hooks/useChartCursor.d.ts +0 -75
- package/dist/charts/hooks/useChartCursor.d.ts.map +0 -1
- package/dist/charts/hooks/useChartCursor.js +0 -200
- package/dist/charts/hooks/useChartSize.d.ts +0 -29
- package/dist/charts/hooks/useChartSize.d.ts.map +0 -1
- package/dist/charts/hooks/useChartSize.js +0 -8
- package/dist/charts/kinds/BandStrip.d.ts +0 -132
- package/dist/charts/kinds/BandStrip.d.ts.map +0 -1
- package/dist/charts/kinds/BandStrip.js +0 -241
- package/dist/charts/kinds/Bars.d.ts +0 -141
- package/dist/charts/kinds/Bars.d.ts.map +0 -1
- package/dist/charts/kinds/Bars.js +0 -343
- package/dist/charts/kinds/Donut.d.ts +0 -77
- package/dist/charts/kinds/Donut.d.ts.map +0 -1
- package/dist/charts/kinds/Donut.js +0 -245
- package/dist/charts/kinds/DualPanel.d.ts +0 -111
- package/dist/charts/kinds/DualPanel.d.ts.map +0 -1
- package/dist/charts/kinds/DualPanel.js +0 -471
- package/dist/charts/kinds/Heatmap.d.ts +0 -85
- package/dist/charts/kinds/Heatmap.d.ts.map +0 -1
- package/dist/charts/kinds/Heatmap.js +0 -243
- package/dist/charts/kinds/MirroredBars.d.ts +0 -98
- package/dist/charts/kinds/MirroredBars.d.ts.map +0 -1
- package/dist/charts/kinds/MirroredBars.js +0 -292
- package/dist/charts/kinds/MultiLine.d.ts +0 -87
- package/dist/charts/kinds/MultiLine.d.ts.map +0 -1
- package/dist/charts/kinds/MultiLine.js +0 -176
- package/dist/charts/kinds/StackedArea.d.ts +0 -73
- package/dist/charts/kinds/StackedArea.d.ts.map +0 -1
- package/dist/charts/kinds/StackedArea.js +0 -135
- package/dist/charts/kinds/ZonedLine.d.ts +0 -97
- package/dist/charts/kinds/ZonedLine.d.ts.map +0 -1
- package/dist/charts/kinds/ZonedLine.js +0 -155
- package/dist/charts/kinds/band-chrome.d.ts +0 -31
- package/dist/charts/kinds/band-chrome.d.ts.map +0 -1
- package/dist/charts/kinds/band-chrome.js +0 -71
- package/dist/charts/kinds/donut-layout.d.ts +0 -47
- package/dist/charts/kinds/donut-layout.d.ts.map +0 -1
- package/dist/charts/kinds/donut-layout.js +0 -52
- package/dist/charts/layout/auto-margin.d.ts +0 -122
- package/dist/charts/layout/auto-margin.d.ts.map +0 -1
- package/dist/charts/layout/auto-margin.js +0 -81
- package/dist/charts/layout/end-labels.d.ts +0 -64
- package/dist/charts/layout/end-labels.d.ts.map +0 -1
- package/dist/charts/layout/end-labels.js +0 -76
- package/dist/charts/layout/log-ticks.d.ts +0 -27
- package/dist/charts/layout/log-ticks.d.ts.map +0 -1
- package/dist/charts/layout/log-ticks.js +0 -42
- package/dist/charts/primitives/AreaGradient.d.ts +0 -18
- package/dist/charts/primitives/AreaGradient.d.ts.map +0 -1
- package/dist/charts/primitives/AreaGradient.js +0 -13
- package/dist/charts/primitives/Axes.d.ts +0 -83
- package/dist/charts/primitives/Axes.d.ts.map +0 -1
- package/dist/charts/primitives/Axes.js +0 -168
- package/dist/charts/primitives/CartesianChart.d.ts +0 -257
- package/dist/charts/primitives/CartesianChart.d.ts.map +0 -1
- package/dist/charts/primitives/CartesianChart.js +0 -549
- package/dist/charts/primitives/ChartCard.d.ts +0 -66
- package/dist/charts/primitives/ChartCard.d.ts.map +0 -1
- package/dist/charts/primitives/ChartCard.js +0 -143
- package/dist/charts/primitives/ChartFrame.d.ts +0 -156
- package/dist/charts/primitives/ChartFrame.d.ts.map +0 -1
- package/dist/charts/primitives/ChartFrame.js +0 -241
- package/dist/charts/primitives/ChartLegend.d.ts +0 -67
- package/dist/charts/primitives/ChartLegend.d.ts.map +0 -1
- package/dist/charts/primitives/ChartLegend.js +0 -292
- package/dist/charts/primitives/ChartPending.d.ts +0 -113
- package/dist/charts/primitives/ChartPending.d.ts.map +0 -1
- package/dist/charts/primitives/ChartPending.js +0 -117
- package/dist/charts/primitives/ChartTooltip.d.ts +0 -59
- package/dist/charts/primitives/ChartTooltip.d.ts.map +0 -1
- package/dist/charts/primitives/ChartTooltip.js +0 -197
- package/dist/charts/primitives/Crosshair.d.ts +0 -26
- package/dist/charts/primitives/Crosshair.d.ts.map +0 -1
- package/dist/charts/primitives/Crosshair.js +0 -23
- package/dist/charts/primitives/HatchPattern.d.ts +0 -31
- package/dist/charts/primitives/HatchPattern.d.ts.map +0 -1
- package/dist/charts/primitives/HatchPattern.js +0 -31
- package/dist/charts/primitives/HoverOverlay.d.ts +0 -45
- package/dist/charts/primitives/HoverOverlay.d.ts.map +0 -1
- package/dist/charts/primitives/HoverOverlay.js +0 -72
- package/dist/charts/primitives/HoverOverlay.module.css +0 -13
- package/dist/charts/primitives/HoverOverlay.module.css.d.ts +0 -8
- package/dist/charts/primitives/XZoneRects.d.ts +0 -54
- package/dist/charts/primitives/XZoneRects.d.ts.map +0 -1
- package/dist/charts/primitives/XZoneRects.js +0 -65
- package/dist/charts/primitives/ZoneRects.d.ts +0 -38
- package/dist/charts/primitives/ZoneRects.d.ts.map +0 -1
- package/dist/charts/primitives/ZoneRects.js +0 -30
- package/dist/charts/primitives/chart-card-context.d.ts +0 -33
- package/dist/charts/primitives/chart-card-context.d.ts.map +0 -1
- package/dist/charts/primitives/chart-card-context.js +0 -18
- package/dist/charts/primitives/chart-frame-layout.d.ts +0 -185
- package/dist/charts/primitives/chart-frame-layout.d.ts.map +0 -1
- package/dist/charts/primitives/chart-frame-layout.js +0 -175
- package/dist/charts/primitives/chart-layout.d.ts +0 -112
- package/dist/charts/primitives/chart-layout.d.ts.map +0 -1
- package/dist/charts/primitives/chart-layout.js +0 -175
- package/dist/charts/primitives/chart-tier.d.ts +0 -16
- package/dist/charts/primitives/chart-tier.d.ts.map +0 -1
- package/dist/charts/primitives/chart-tier.js +0 -44
- package/dist/charts/primitives/legend-disclosure.d.ts +0 -27
- package/dist/charts/primitives/legend-disclosure.d.ts.map +0 -1
- package/dist/charts/primitives/legend-disclosure.js +0 -153
- package/dist/charts/series.d.ts +0 -189
- package/dist/charts/series.d.ts.map +0 -1
- package/dist/charts/series.js +0 -84
- package/dist/charts/sparklines/BarSparkline.d.ts +0 -37
- package/dist/charts/sparklines/BarSparkline.d.ts.map +0 -1
- package/dist/charts/sparklines/BarSparkline.js +0 -53
- package/dist/charts/sparklines/LineSparkline.d.ts +0 -15
- package/dist/charts/sparklines/LineSparkline.d.ts.map +0 -1
- package/dist/charts/sparklines/LineSparkline.js +0 -51
- package/dist/charts/sparklines/index.d.ts +0 -3
- package/dist/charts/sparklines/index.d.ts.map +0 -1
- package/dist/charts/sparklines/index.js +0 -6
- package/dist/charts/utils/domain.d.ts +0 -35
- package/dist/charts/utils/domain.d.ts.map +0 -1
- package/dist/charts/utils/domain.js +0 -12
- package/dist/charts/utils/format.d.ts +0 -8
- package/dist/charts/utils/format.d.ts.map +0 -1
- package/dist/charts/utils/format.js +0 -20
- package/dist/charts/utils/measure-text.d.ts +0 -25
- package/dist/charts/utils/measure-text.d.ts.map +0 -1
- package/dist/charts/utils/measure-text.js +0 -64
- package/dist/charts/utils/ticks.d.ts +0 -103
- package/dist/charts/utils/ticks.d.ts.map +0 -1
- package/dist/charts/utils/ticks.js +0 -92
- package/dist/commands/overlays-mount.d.ts +0 -122
- package/dist/commands/overlays-mount.d.ts.map +0 -1
- package/dist/commands/overlays-mount.js +0 -125
- package/dist/commands/useCommandHotkeys.d.ts +0 -14
- package/dist/commands/useCommandHotkeys.d.ts.map +0 -1
- package/dist/commands/useCommandHotkeys.js +0 -45
- package/dist/content/article-actions.d.ts +0 -39
- package/dist/content/article-actions.d.ts.map +0 -1
- package/dist/content/article-actions.js +0 -28
- package/dist/content/article-card.d.ts +0 -58
- package/dist/content/article-card.d.ts.map +0 -1
- package/dist/content/article-card.js +0 -79
- package/dist/content/article-card.module.css +0 -111
- package/dist/content/mdx.d.ts +0 -20
- package/dist/content/mdx.d.ts.map +0 -1
- package/dist/content/mdx.js +0 -64
- package/dist/controls/compare-filter.d.ts +0 -42
- package/dist/controls/compare-filter.d.ts.map +0 -1
- package/dist/controls/compare-filter.js +0 -38
- package/dist/controls/slider-control.d.ts +0 -36
- package/dist/controls/slider-control.d.ts.map +0 -1
- package/dist/controls/slider-control.js +0 -64
- package/dist/dashboard/widget-grid.d.ts +0 -27
- package/dist/dashboard/widget-grid.d.ts.map +0 -1
- package/dist/dashboard/widget-grid.js +0 -40
- package/dist/dashboard/widget-grid.module.css +0 -69
- package/dist/data/data-table-state.d.ts.map +0 -1
- package/dist/data/data-table.d.ts.map +0 -1
- package/dist/data/query-branch.d.ts.map +0 -1
- package/dist/data/table.d.ts +0 -24
- package/dist/data/table.d.ts.map +0 -1
- package/dist/data/virtual-list.d.ts +0 -133
- package/dist/data/virtual-list.d.ts.map +0 -1
- package/dist/data/virtual-list.js +0 -157
- package/dist/data/virtual.d.ts +0 -21
- package/dist/data/virtual.d.ts.map +0 -1
- package/dist/data/virtual.js +0 -4
- package/dist/forms/FormErrorSummary.d.ts +0 -30
- package/dist/forms/FormErrorSummary.d.ts.map +0 -1
- package/dist/forms/FormErrorSummary.js +0 -30
- package/dist/forms/use-field-array.d.ts +0 -60
- package/dist/forms/use-field-array.d.ts.map +0 -1
- package/dist/forms/use-field-array.js +0 -20
- package/dist/forms/use-form-draft.d.ts +0 -76
- package/dist/forms/use-form-draft.d.ts.map +0 -1
- package/dist/forms/use-form-draft.js +0 -92
- package/dist/forms/use-form-submit.d.ts +0 -88
- package/dist/forms/use-form-submit.d.ts.map +0 -1
- package/dist/forms/use-form-submit.js +0 -63
- package/dist/notifications/bell.d.ts.map +0 -1
- package/dist/notifications/center.d.ts.map +0 -1
- package/dist/notifications/define-notifications.d.ts.map +0 -1
- package/dist/notifications/index.d.ts +0 -40
- package/dist/notifications/index.d.ts.map +0 -1
- package/dist/notifications/index.js +0 -54
- package/dist/notifications/mount-guard.d.ts +0 -8
- package/dist/notifications/mount-guard.d.ts.map +0 -1
- package/dist/notifications/mount-guard.js +0 -18
- package/dist/notifications/notify.d.ts +0 -149
- package/dist/notifications/notify.d.ts.map +0 -1
- package/dist/notifications/notify.js +0 -171
- package/dist/notifications/store.d.ts.map +0 -1
- package/dist/provider/connectivity-indicator.d.ts +0 -13
- package/dist/provider/connectivity-indicator.d.ts.map +0 -1
- package/dist/provider/connectivity-indicator.js +0 -205
- package/dist/provider/connectivity-provider.d.ts +0 -7
- package/dist/provider/connectivity-provider.d.ts.map +0 -1
- package/dist/provider/connectivity-provider.js +0 -128
- package/dist/provider/connectivity-types.d.ts +0 -36
- package/dist/provider/connectivity-types.d.ts.map +0 -1
- package/dist/provider/use-connectivity.d.ts +0 -3
- package/dist/provider/use-connectivity.d.ts.map +0 -1
- package/dist/provider/use-connectivity.js +0 -14
- package/dist/query-devtools.d.ts +0 -21
- package/dist/query-devtools.d.ts.map +0 -1
- package/dist/query-devtools.js +0 -13
- package/src/agent/adapter.ts +0 -945
- package/src/agent/use-agent-stream.ts +0 -154
- package/src/agent-chat/index.ts +0 -54
- package/src/agent-chat/thread-detail-panel.tsx +0 -201
- package/src/agent-chat/thread-workspace.tsx +0 -279
- package/src/charts/cursor/resolve.ts +0 -198
- package/src/charts/cursor/scope.tsx +0 -35
- package/src/charts/cursor/store.ts +0 -58
- package/src/charts/cursor/touch-pin.ts +0 -138
- package/src/charts/hooks/use-discrete-cursor.ts +0 -335
- package/src/charts/hooks/use-hysteresis.ts +0 -26
- package/src/charts/hooks/useBandPlot.ts +0 -383
- package/src/charts/hooks/useChartCursor.ts +0 -367
- package/src/charts/hooks/useChartSize.ts +0 -35
- package/src/charts/kinds/BandStrip.tsx +0 -449
- package/src/charts/kinds/Bars.tsx +0 -589
- package/src/charts/kinds/Donut.tsx +0 -368
- package/src/charts/kinds/DualPanel.tsx +0 -712
- package/src/charts/kinds/Heatmap.tsx +0 -396
- package/src/charts/kinds/MirroredBars.tsx +0 -469
- package/src/charts/kinds/MultiLine.tsx +0 -322
- package/src/charts/kinds/StackedArea.tsx +0 -267
- package/src/charts/kinds/ZonedLine.tsx +0 -301
- package/src/charts/kinds/band-chrome.tsx +0 -91
- package/src/charts/kinds/donut-layout.ts +0 -82
- package/src/charts/layout/auto-margin.ts +0 -242
- package/src/charts/layout/end-labels.ts +0 -135
- package/src/charts/layout/log-ticks.ts +0 -90
- package/src/charts/primitives/AreaGradient.tsx +0 -26
- package/src/charts/primitives/Axes.tsx +0 -271
- package/src/charts/primitives/CartesianChart.tsx +0 -1002
- package/src/charts/primitives/ChartCard.tsx +0 -280
- package/src/charts/primitives/ChartFrame.tsx +0 -493
- package/src/charts/primitives/ChartLegend.tsx +0 -422
- package/src/charts/primitives/ChartPending.tsx +0 -243
- package/src/charts/primitives/ChartTooltip.tsx +0 -265
- package/src/charts/primitives/Crosshair.tsx +0 -43
- package/src/charts/primitives/HatchPattern.tsx +0 -55
- package/src/charts/primitives/HoverOverlay.module.css +0 -13
- package/src/charts/primitives/HoverOverlay.module.css.d.ts +0 -8
- package/src/charts/primitives/HoverOverlay.tsx +0 -109
- package/src/charts/primitives/XZoneRects.tsx +0 -132
- package/src/charts/primitives/ZoneRects.tsx +0 -67
- package/src/charts/primitives/chart-card-context.ts +0 -46
- package/src/charts/primitives/chart-frame-layout.ts +0 -430
- package/src/charts/primitives/chart-layout.ts +0 -318
- package/src/charts/primitives/chart-tier.tsx +0 -76
- package/src/charts/primitives/legend-disclosure.tsx +0 -178
- package/src/charts/series.ts +0 -276
- package/src/charts/sparklines/BarSparkline.tsx +0 -94
- package/src/charts/sparklines/LineSparkline.tsx +0 -71
- package/src/charts/sparklines/index.ts +0 -2
- package/src/charts/theme.tsx +0 -53
- package/src/charts/utils/domain.ts +0 -41
- package/src/charts/utils/format.ts +0 -19
- package/src/charts/utils/measure-text.ts +0 -109
- package/src/charts/utils/ticks.ts +0 -239
- package/src/commands/overlays-mount.tsx +0 -333
- package/src/commands/useCommandHotkeys.ts +0 -114
- package/src/content/article-actions.ts +0 -72
- package/src/content/article-card.module.css +0 -111
- package/src/content/article-card.tsx +0 -174
- package/src/content/mdx.tsx +0 -127
- package/src/controls/compare-filter.tsx +0 -81
- package/src/controls/slider-control.tsx +0 -159
- package/src/dashboard/widget-grid.module.css +0 -69
- package/src/dashboard/widget-grid.tsx +0 -146
- package/src/data/table.ts +0 -39
- package/src/data/virtual-list.tsx +0 -356
- package/src/data/virtual.ts +0 -26
- package/src/forms/FormErrorSummary.tsx +0 -71
- package/src/forms/use-field-array.ts +0 -94
- package/src/forms/use-form-draft.ts +0 -262
- package/src/forms/use-form-submit.ts +0 -199
- package/src/notifications/index.ts +0 -88
- package/src/notifications/mount-guard.ts +0 -38
- package/src/notifications/notify.tsx +0 -379
- package/src/provider/connectivity-indicator.tsx +0 -267
- package/src/provider/connectivity-provider.tsx +0 -189
- package/src/provider/connectivity-types.ts +0 -42
- package/src/provider/use-connectivity.ts +0 -26
- package/src/query-devtools.tsx +0 -40
- /package/dist/{agent-chat → agent/chat}/message-affordances.js +0 -0
- /package/dist/{agent-chat → agent/chat}/relative-time.d.ts +0 -0
- /package/dist/{agent-chat → agent/chat}/relative-time.js +0 -0
- /package/dist/{agent-chat → agent/chat}/use-keyboard-inset.d.ts +0 -0
- /package/dist/{agent-chat → agent/chat}/virtualize.js +0 -0
- /package/dist/{notifications → commands/notifications}/bell.js +0 -0
- /package/dist/{notifications → commands/notifications}/define-notifications.js +0 -0
- /package/dist/{provider/connectivity-types.js → controls/uncontrolled.js} +0 -0
- /package/dist/{data → table}/data-table.module.css +0 -0
- /package/dist/{data → table}/data-table.module.css.d.ts +0 -0
- /package/dist/{data → table}/query-branch.d.ts +0 -0
- /package/dist/{data → table}/query-branch.js +0 -0
- /package/src/{agent-chat → agent/chat}/relative-time.ts +0 -0
- /package/src/{data → table}/data-table.module.css +0 -0
- /package/src/{data → table}/data-table.module.css.d.ts +0 -0
- /package/src/{data → table}/query-branch.ts +0 -0
|
@@ -1,712 +0,0 @@
|
|
|
1
|
-
import { GridRows } from '@visx/grid'
|
|
2
|
-
import { Group } from '@visx/group'
|
|
3
|
-
import { scaleLinear, scalePoint } from '@visx/scale'
|
|
4
|
-
import { Bar, LinePath } from '@visx/shape'
|
|
5
|
-
import { Threshold } from '@visx/threshold'
|
|
6
|
-
import { memo, useMemo, useRef } from 'react'
|
|
7
|
-
import type { ReactNode } from 'react'
|
|
8
|
-
import { assertRequiredProps } from '../../common/validate'
|
|
9
|
-
import type { BasaltProps } from '../../common/props'
|
|
10
|
-
import { AxisBottomDate, AxisLeftNumeric } from '../primitives/Axes'
|
|
11
|
-
import {
|
|
12
|
-
ChartTooltipFloat,
|
|
13
|
-
TooltipBody,
|
|
14
|
-
TooltipHeader,
|
|
15
|
-
TooltipRow,
|
|
16
|
-
TooltipRows,
|
|
17
|
-
} from '../primitives/ChartTooltip'
|
|
18
|
-
import { ChartFrame, resolveLegend } from '../primitives/ChartFrame'
|
|
19
|
-
import type { ResponsiveChartHeight } from '../primitives/ChartFrame'
|
|
20
|
-
import { Crosshair, SeriesDot } from '../primitives/Crosshair'
|
|
21
|
-
import { cursorSliderProps, HoverOverlay } from '../primitives/HoverOverlay'
|
|
22
|
-
import { ZoneRects } from '../primitives/ZoneRects'
|
|
23
|
-
import type { ZoneSpec } from '../primitives/ZoneRects'
|
|
24
|
-
import type { ChartState } from '../primitives/ChartPending'
|
|
25
|
-
import type { CursorResolution } from '../cursor/resolve'
|
|
26
|
-
import { useChartCursor } from '../hooks/useChartCursor'
|
|
27
|
-
import { autoMargin, probeAxisLabels } from '../layout/auto-margin'
|
|
28
|
-
import { curveFor, deriveTooltipRows, LINE_OVERLAY_STROKE_WIDTH } from '../series'
|
|
29
|
-
import type { ChartLegendConfig, ChartSeries, SeriesStyle } from '../series'
|
|
30
|
-
import { VX } from '../../tokens'
|
|
31
|
-
import { fmtAxisDate } from '../utils/format'
|
|
32
|
-
import { smartTicks, xLabelPxFor } from '../utils/ticks'
|
|
33
|
-
|
|
34
|
-
export type DualPanelProps<T> = BasaltProps & {
|
|
35
|
-
data: T[]
|
|
36
|
-
/** Height in px, or one per size step (`{ base, sm?, md?, lg? }`). Default 240. Forwarded
|
|
37
|
-
* unchanged; `ChartFrameProps.height` owns the law — steps resolve off the MEASURED width. */
|
|
38
|
-
height?: number | ResponsiveChartHeight
|
|
39
|
-
chartId: string
|
|
40
|
-
getX: (d: T) => string
|
|
41
|
-
/** X tick label formatter. Default `fmtAxisDate` (DD.MM) — same default `CartesianChart` uses,
|
|
42
|
-
* so omitting it is byte-identical to today's rendering. */
|
|
43
|
-
formatX?: (key: string) => string
|
|
44
|
-
/**
|
|
45
|
-
* How a sibling chart's broadcast cursor key resolves against this chart's points. Default
|
|
46
|
-
* `'nearest'`. Pass `'leading'` when `getX` returns a bucket's leading edge (a weekly series
|
|
47
|
-
* keyed by its Monday) — see `CursorResolution`.
|
|
48
|
-
*/
|
|
49
|
-
cursorResolution?: CursorResolution
|
|
50
|
-
/** 1+ line series in the top pane — the single source of truth for color, dash, legend, and
|
|
51
|
-
* tooltip rows. E.g. acute (solid) / chronic (dashed). */
|
|
52
|
-
series: ChartSeries<T>[]
|
|
53
|
-
/** Top-pane y-domain. Default 'auto' (computed from all top lines, padded). */
|
|
54
|
-
topYDomain?: [number, number] | 'auto'
|
|
55
|
-
/** Shade the band between two top lines (by key). `aboveFill` colors the side where `to` runs
|
|
56
|
-
* above `from` (e.g. a "bad" red) — omitted, both sides share `fill` (today's behaviour). */
|
|
57
|
-
fillBetween?: { from: string; to: string; fill: string; aboveFill?: string }
|
|
58
|
-
/** Horizontal reference lines on the top pane. Solid by default; set dashed: true for a dashed line. */
|
|
59
|
-
topRefLines?: { value: number; color: string; dashed?: boolean }[]
|
|
60
|
-
/** Horizontal value-range bands on the top pane. */
|
|
61
|
-
topZones?: ZoneSpec[]
|
|
62
|
-
/** Bottom-pane signed value — return null to skip the bar. */
|
|
63
|
-
getBar: (d: T) => number | null
|
|
64
|
-
barLabel: string
|
|
65
|
-
barColorPositive: string
|
|
66
|
-
barColorNegative: string
|
|
67
|
-
/** Top pane share of the inner plot height. Default 0.62. */
|
|
68
|
-
topFraction?: number
|
|
69
|
-
formatTop: (v: number) => string
|
|
70
|
-
/** Drives the bottom-pane TICKS. Also the tooltip-row fallback when `formatBar` is omitted. */
|
|
71
|
-
formatBottom: (v: number) => string
|
|
72
|
-
/** Per-row tooltip formatter for the bottom-pane bar — overrides `formatBottom` for the tooltip
|
|
73
|
-
* row only (ticks keep reading `formatBottom`). Receives the hovered datum alongside the value,
|
|
74
|
-
* so a row can add a unit/decimal `formatBottom` can't (e.g. a velocity reading). */
|
|
75
|
-
formatBar?: (v: number, d: T) => string
|
|
76
|
-
/**
|
|
77
|
-
* Bottom-pane y-domain. Default `'auto'`: a symmetric `[-maxAbs, maxAbs]` computed from the
|
|
78
|
-
* data, `nice`d. A fixed tuple pins the domain instead (and is used verbatim, un-`nice`d).
|
|
79
|
-
*/
|
|
80
|
-
bottomYDomain?: [number, number] | 'auto'
|
|
81
|
-
/** When `bottomYDomain` is `'auto'`: floors the symmetric max-abs so a plateau doesn't amplify
|
|
82
|
-
* to fill the whole pane (mirrors `AxisConfig.autoMaxFloor`). Ignored with a fixed tuple. */
|
|
83
|
-
bottomMaxAbsFloor?: number
|
|
84
|
-
/** Tooltip badge — appears at the right of the tooltip header. */
|
|
85
|
-
tooltipLabel?: (d: T) => { text: string; color: string } | null
|
|
86
|
-
/**
|
|
87
|
-
* Overrides the tooltip header's date text — the same seam `CartesianChart`'s
|
|
88
|
-
* `CartesianTooltipConfig.formatHeader` exposes, so the two don't diverge. Default:
|
|
89
|
-
* `TooltipHeader`'s own `fmtTooltipDate` behavior, unchanged. Receives the raw `getX` key
|
|
90
|
-
* alongside the hovered datum.
|
|
91
|
-
*/
|
|
92
|
-
formatHeader?: (key: string, d: T) => string
|
|
93
|
-
/**
|
|
94
|
-
* Render this chart's tooltip when it is a cursor FOLLOWER, not only when it is the SOURCE —
|
|
95
|
-
* same seam and same anchored-positioning behaviour as `CartesianTooltipConfig.onFollow`. Default
|
|
96
|
-
* false (today's behaviour). Only the SOURCE's tooltip is `aria-live`; a follower's is visual
|
|
97
|
-
* only.
|
|
98
|
-
*/
|
|
99
|
-
onFollow?: boolean
|
|
100
|
-
/** Legend config forwarded to `ChartFrame`; `false` disables the legend (sparkline escape).
|
|
101
|
-
* Default `{ placement: 'bottom' }`. */
|
|
102
|
-
legend?: ChartLegendConfig | false
|
|
103
|
-
/** Accessible text alternative, forwarded to `ChartFrame` as `aria-label` (+ `role="group"`). */
|
|
104
|
-
ariaLabel?: string
|
|
105
|
-
/** Forwarded to `ChartFrame` — see `ChartPending`'s JSDoc for the three-state rationale. */
|
|
106
|
-
isPending?: boolean
|
|
107
|
-
/** The three "nothing to draw" states in one prop — pending → error → empty. See
|
|
108
|
-
* `ChartState`; `isPending` stays a supported alias for `state={{ pending: true }}`. */
|
|
109
|
-
state?: ChartState
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
const PANE_GAP = 12
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Dual-pane chart: a top line pane and a bottom signed-histogram pane sharing
|
|
116
|
-
* ONE x-scale and ONE cursor. Generalizes argo's divergence (acute/chronic +
|
|
117
|
-
* divergence) and momentum (e1RM + velocity) charts.
|
|
118
|
-
*
|
|
119
|
-
* Composes `ChartFrame` for measuring + the derived legend — `series` (the top lines) plus a
|
|
120
|
-
* synthesized divergence entry drive the legend, so acute/chronic/divergence are all legible
|
|
121
|
-
* without hovering (previously legend-less).
|
|
122
|
-
*
|
|
123
|
-
* X-axis is built from the full `data` array so the calendar is preserved even
|
|
124
|
-
* when a series has nulls; lines/bars skip null points (visual gaps).
|
|
125
|
-
*/
|
|
126
|
-
function DualPanelInner<T>(props: DualPanelProps<T>) {
|
|
127
|
-
// F-ERR-1: name the component and the prop. Without this a missing accessor surfaces
|
|
128
|
-
// from inside visx as `undefined is not a function`, which `BasaltErrorBoundary`
|
|
129
|
-
// swallows into a blank subtree that names nothing.
|
|
130
|
-
assertRequiredProps('DualPanel', props, ['data', 'getX', 'series', 'getBar'])
|
|
131
|
-
const {
|
|
132
|
-
series,
|
|
133
|
-
chartId,
|
|
134
|
-
height,
|
|
135
|
-
barLabel,
|
|
136
|
-
barColorPositive,
|
|
137
|
-
legend,
|
|
138
|
-
ariaLabel,
|
|
139
|
-
isPending,
|
|
140
|
-
state,
|
|
141
|
-
className,
|
|
142
|
-
style,
|
|
143
|
-
} = props
|
|
144
|
-
|
|
145
|
-
// Default the top-pane line overlays to the redesign's 1.9px stroke (docs/DESIGN-SPEC.md §5) —
|
|
146
|
-
// applied once here so the plotted line, the derived legend swatch, and the derived tooltip row
|
|
147
|
-
// all agree.
|
|
148
|
-
const styledSeries = useMemo<ChartSeries<T>[]>(
|
|
149
|
-
() => series.map((s) => ({ ...s, strokeWidth: s.strokeWidth ?? LINE_OVERLAY_STROKE_WIDTH })),
|
|
150
|
-
[series],
|
|
151
|
-
)
|
|
152
|
-
|
|
153
|
-
// The bottom pane's signed histogram gets one representative legend entry alongside the top
|
|
154
|
-
// lines — a diverging metric can't express its sign-dependent color as a single SeriesStyle, so
|
|
155
|
-
// `barColorPositive` stands in as the swatch color.
|
|
156
|
-
const legendSeries = useMemo<SeriesStyle[]>(
|
|
157
|
-
() => [
|
|
158
|
-
...styledSeries,
|
|
159
|
-
{ key: '__divergence', label: barLabel, color: barColorPositive, mark: 'bar' },
|
|
160
|
-
],
|
|
161
|
-
[styledSeries, barLabel, barColorPositive],
|
|
162
|
-
)
|
|
163
|
-
|
|
164
|
-
return (
|
|
165
|
-
<ChartFrame
|
|
166
|
-
series={legendSeries}
|
|
167
|
-
chartId={chartId}
|
|
168
|
-
{...(height !== undefined && { height })}
|
|
169
|
-
{...(ariaLabel !== undefined && { ariaLabel })}
|
|
170
|
-
{...(isPending !== undefined && { isPending })}
|
|
171
|
-
{...(state !== undefined && { state })}
|
|
172
|
-
{...(className !== undefined && { className })}
|
|
173
|
-
{...(style !== undefined && { style })}
|
|
174
|
-
legend={resolveLegend(legend)}
|
|
175
|
-
>
|
|
176
|
-
{(plot) => <DualPanelPlot {...props} series={styledSeries} plot={plot} />}
|
|
177
|
-
</ChartFrame>
|
|
178
|
-
)
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
type DualPanelPlotProps<T> = DualPanelProps<T> & {
|
|
182
|
-
plot: { width: number; height: number; hidden: ReadonlySet<string> }
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
/** The measured plot — split from {@link DualPanelInner} so its scale/cursor hooks only run
|
|
186
|
-
* once `ChartFrame` has resolved a non-empty plot rect. */
|
|
187
|
-
function DualPanelPlot<T>(props: DualPanelPlotProps<T>) {
|
|
188
|
-
const {
|
|
189
|
-
data,
|
|
190
|
-
chartId,
|
|
191
|
-
getX,
|
|
192
|
-
formatX = fmtAxisDate,
|
|
193
|
-
cursorResolution,
|
|
194
|
-
ariaLabel,
|
|
195
|
-
series,
|
|
196
|
-
topYDomain = 'auto',
|
|
197
|
-
fillBetween,
|
|
198
|
-
topRefLines = [],
|
|
199
|
-
topZones = [],
|
|
200
|
-
getBar,
|
|
201
|
-
barLabel,
|
|
202
|
-
barColorPositive,
|
|
203
|
-
barColorNegative,
|
|
204
|
-
topFraction = 0.62,
|
|
205
|
-
formatTop,
|
|
206
|
-
formatBottom,
|
|
207
|
-
formatBar,
|
|
208
|
-
bottomYDomain = 'auto',
|
|
209
|
-
bottomMaxAbsFloor,
|
|
210
|
-
tooltipLabel,
|
|
211
|
-
formatHeader,
|
|
212
|
-
onFollow,
|
|
213
|
-
plot,
|
|
214
|
-
} = props
|
|
215
|
-
|
|
216
|
-
const { hidden } = plot
|
|
217
|
-
// Legend-hidden series drop out of the domain, the drawn lines/dots, and the tooltip together
|
|
218
|
-
// (`docs/CHARTS-SPEC.md` §5) — the synthesized `__divergence` key gates the bottom histogram the
|
|
219
|
-
// same way.
|
|
220
|
-
const visibleSeries = useMemo(() => series.filter((s) => !hidden.has(s.key)), [series, hidden])
|
|
221
|
-
const barVisible = !hidden.has('__divergence')
|
|
222
|
-
|
|
223
|
-
// ── Pass 1: y domains + tick labels, both independent of the pixel rect ─────────────────────
|
|
224
|
-
// A linear scale's domain (and, with `nice`, its rounded bounds) is a pure function of the
|
|
225
|
-
// input domain — not of its pixel range — so the tick labels used to MEASURE the margin can be
|
|
226
|
-
// read off a throwaway [1, 0] range before the real [topH, 0] / [bottomH, 0] range is known.
|
|
227
|
-
const useNiceTop = topYDomain === 'auto'
|
|
228
|
-
// Deliberately NOT `resolveAxisDomain`'s law, and not drift: that one anchors to a zero baseline
|
|
229
|
-
// and pads multiplicatively, which is right for a magnitude chart. This pane plots a signal line
|
|
230
|
-
// whose interesting range is a narrow band far from zero (MACD, a price series) — a zero
|
|
231
|
-
// baseline would squash it into a sliver at the top of the pane. Hence a SPAN-relative symmetric
|
|
232
|
-
// pad instead. If a third pane-shaped kind ever wants this law, promote it into
|
|
233
|
-
// `layout/auto-margin.ts` beside `probeAxisLabels` rather than copying it again.
|
|
234
|
-
const topDomain = useMemo<[number, number]>(() => {
|
|
235
|
-
if (topYDomain !== 'auto') return topYDomain
|
|
236
|
-
let lo = Infinity
|
|
237
|
-
let hi = -Infinity
|
|
238
|
-
for (const s of visibleSeries) {
|
|
239
|
-
for (const d of data) {
|
|
240
|
-
const v = s.getValue(d)
|
|
241
|
-
if (v === null || v === undefined || Number.isNaN(v)) continue
|
|
242
|
-
if (v < lo) lo = v
|
|
243
|
-
if (v > hi) hi = v
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
if (!Number.isFinite(lo) || !Number.isFinite(hi)) {
|
|
247
|
-
lo = 0
|
|
248
|
-
hi = 1
|
|
249
|
-
}
|
|
250
|
-
const span = hi - lo || Math.abs(hi) || 1
|
|
251
|
-
return [lo - span * 0.08, hi + span * 0.08]
|
|
252
|
-
}, [data, visibleSeries, topYDomain])
|
|
253
|
-
|
|
254
|
-
const topLabels = useMemo(
|
|
255
|
-
() =>
|
|
256
|
-
probeAxisLabels({ domain: topDomain, ticks: 4, format: formatTop, nice: useNiceTop }).labels,
|
|
257
|
-
[topDomain, useNiceTop, formatTop],
|
|
258
|
-
)
|
|
259
|
-
|
|
260
|
-
// Bottom pane: symmetric signed domain around zero — unless `bottomYDomain` pins a fixed tuple,
|
|
261
|
-
// in which case that domain ships verbatim (un-`nice`d, matching `topYDomain`'s fixed-tuple path).
|
|
262
|
-
const useNiceBottom = bottomYDomain === 'auto'
|
|
263
|
-
const maxAbs = useMemo(() => {
|
|
264
|
-
if (bottomYDomain !== 'auto') return 0
|
|
265
|
-
let m = 0
|
|
266
|
-
for (const d of data) {
|
|
267
|
-
const v = getBar(d)
|
|
268
|
-
if (v === null || v === undefined || Number.isNaN(v)) continue
|
|
269
|
-
const a = Math.abs(v)
|
|
270
|
-
if (a > m) m = a
|
|
271
|
-
}
|
|
272
|
-
const floored = bottomMaxAbsFloor !== undefined ? Math.max(m, bottomMaxAbsFloor) : m
|
|
273
|
-
return floored === 0 ? 1 : floored
|
|
274
|
-
}, [data, getBar, bottomYDomain, bottomMaxAbsFloor])
|
|
275
|
-
|
|
276
|
-
const bottomDomain = useMemo<[number, number]>(
|
|
277
|
-
() => (bottomYDomain === 'auto' ? [-maxAbs, maxAbs] : bottomYDomain),
|
|
278
|
-
[bottomYDomain, maxAbs],
|
|
279
|
-
)
|
|
280
|
-
|
|
281
|
-
// `bottomLabels`/`probeAxisLabels` measure whatever domain actually ships (fixed tuple or
|
|
282
|
-
// computed maxAbs), so the margin is never computed from ticks the axis never paints.
|
|
283
|
-
const bottomLabels = useMemo(
|
|
284
|
-
() =>
|
|
285
|
-
probeAxisLabels({
|
|
286
|
-
domain: bottomDomain,
|
|
287
|
-
ticks: 3,
|
|
288
|
-
format: formatBottom,
|
|
289
|
-
nice: useNiceBottom,
|
|
290
|
-
}).labels,
|
|
291
|
-
[bottomDomain, formatBottom, useNiceBottom],
|
|
292
|
-
)
|
|
293
|
-
|
|
294
|
-
// Full (untinned) x labels are enough to measure the bottom/right gutters — thinning only drops
|
|
295
|
-
// labels, never widens the max, so measuring against the full set is a safe over-estimate.
|
|
296
|
-
// Uses the SAME `formatX` the real axis paints with (`AxisBottomDate` below), or the measured
|
|
297
|
-
// gutter would be computed from labels the axis never paints.
|
|
298
|
-
const xLabelsAll = useMemo(() => data.map((d) => formatX(getX(d))), [data, getX, formatX])
|
|
299
|
-
|
|
300
|
-
const margin = useMemo(
|
|
301
|
-
() => autoMargin({ left: [...topLabels, ...bottomLabels], bottom: xLabelsAll }),
|
|
302
|
-
[topLabels, bottomLabels, xLabelsAll],
|
|
303
|
-
)
|
|
304
|
-
|
|
305
|
-
// ── Pass 2: the real scales, now that the plot rect is known ────────────────────────────────
|
|
306
|
-
const xMax = Math.max(plot.width - margin.left - margin.right, 0)
|
|
307
|
-
// Inner plot height shared by both panes (excludes top/bottom margin + gutter).
|
|
308
|
-
const plotH = plot.height - margin.top - margin.bottom - PANE_GAP
|
|
309
|
-
const topH = Math.max(Math.round(plotH * topFraction), 1)
|
|
310
|
-
const bottomH = Math.max(plotH - topH, 1)
|
|
311
|
-
const bottomTop = topH + PANE_GAP
|
|
312
|
-
// Full inner span — the synced crosshair line covers BOTH panes.
|
|
313
|
-
const innerH = topH + PANE_GAP + bottomH
|
|
314
|
-
|
|
315
|
-
const xScale = useMemo(
|
|
316
|
-
() => scalePoint<string>({ domain: data.map(getX), range: [0, xMax], padding: 0.3 }),
|
|
317
|
-
[data, xMax, getX],
|
|
318
|
-
)
|
|
319
|
-
|
|
320
|
-
const topYScale = useMemo(
|
|
321
|
-
() =>
|
|
322
|
-
scaleLinear<number>({
|
|
323
|
-
domain: topDomain,
|
|
324
|
-
range: [topH, 0],
|
|
325
|
-
...(useNiceTop && { nice: true }),
|
|
326
|
-
}),
|
|
327
|
-
[topDomain, useNiceTop, topH],
|
|
328
|
-
)
|
|
329
|
-
|
|
330
|
-
const bottomYScale = useMemo(
|
|
331
|
-
() =>
|
|
332
|
-
scaleLinear<number>({
|
|
333
|
-
domain: bottomDomain,
|
|
334
|
-
range: [bottomH, 0],
|
|
335
|
-
...(useNiceBottom && { nice: true }),
|
|
336
|
-
}),
|
|
337
|
-
[bottomDomain, bottomH, useNiceBottom],
|
|
338
|
-
)
|
|
339
|
-
|
|
340
|
-
// ONE `<svg>` wraps both panes below, so it doubles as the tap-outside boundary
|
|
341
|
-
// (`docs/CHARTS-SPEC.md` §4, Tooltip) for the single cursor they share.
|
|
342
|
-
const svgRef = useRef<SVGSVGElement>(null)
|
|
343
|
-
const cursor = useChartCursor<T>({
|
|
344
|
-
data,
|
|
345
|
-
chartId,
|
|
346
|
-
getKey: getX,
|
|
347
|
-
xScale,
|
|
348
|
-
marginLeft: margin.left,
|
|
349
|
-
boundaryRef: svgRef,
|
|
350
|
-
...(cursorResolution !== undefined && { resolution: cursorResolution }),
|
|
351
|
-
})
|
|
352
|
-
|
|
353
|
-
// The horizontal room one x tick label needs, from the SAME formatted set `xLabelsAll` measured
|
|
354
|
-
// for the bottom gutter — same measured-spacing law `CartesianChart` applies
|
|
355
|
-
// (`docs/CHARTS-SPEC.md` §1).
|
|
356
|
-
const xLabelPx = useMemo(() => xLabelPxFor(xLabelsAll), [xLabelsAll])
|
|
357
|
-
|
|
358
|
-
const tickValues = useMemo(
|
|
359
|
-
() => smartTicks(data.map(getX), xMax, xLabelPx),
|
|
360
|
-
[data, xMax, getX, xLabelPx],
|
|
361
|
-
)
|
|
362
|
-
|
|
363
|
-
const barWidth = data.length > 0 ? Math.max((xMax / data.length) * 0.6, 2) : 2
|
|
364
|
-
|
|
365
|
-
type HistogramBar = {
|
|
366
|
-
key: string
|
|
367
|
-
x: number
|
|
368
|
-
y: number
|
|
369
|
-
width: number
|
|
370
|
-
height: number
|
|
371
|
-
fill: string
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
// Bottom-pane histogram geometry — memoized since the shared cursor re-renders every mounted
|
|
375
|
-
// chart on every pointer frame, and this walks the full `data` array building fresh bar
|
|
376
|
-
// geometry each time otherwise (parity with Bars' barGroups).
|
|
377
|
-
const histogramBars = useMemo<HistogramBar[]>(() => {
|
|
378
|
-
if (!barVisible) return []
|
|
379
|
-
const y0 = bottomYScale(0)
|
|
380
|
-
const bars: HistogramBar[] = []
|
|
381
|
-
for (const d of data) {
|
|
382
|
-
const v = getBar(d)
|
|
383
|
-
if (v === null || v === undefined || Number.isNaN(v)) continue
|
|
384
|
-
const cx = xScale(getX(d)) ?? 0
|
|
385
|
-
const yVal = bottomYScale(v)
|
|
386
|
-
bars.push({
|
|
387
|
-
key: `bar-${getX(d)}`,
|
|
388
|
-
x: cx - barWidth / 2,
|
|
389
|
-
y: Math.min(y0, yVal),
|
|
390
|
-
width: barWidth,
|
|
391
|
-
height: Math.max(Math.abs(yVal - y0), 1),
|
|
392
|
-
fill: v >= 0 ? barColorPositive : barColorNegative,
|
|
393
|
-
})
|
|
394
|
-
}
|
|
395
|
-
return bars
|
|
396
|
-
}, [
|
|
397
|
-
barVisible,
|
|
398
|
-
data,
|
|
399
|
-
getBar,
|
|
400
|
-
getX,
|
|
401
|
-
xScale,
|
|
402
|
-
bottomYScale,
|
|
403
|
-
barWidth,
|
|
404
|
-
barColorPositive,
|
|
405
|
-
barColorNegative,
|
|
406
|
-
])
|
|
407
|
-
|
|
408
|
-
type FillPt = { __d: T; __from: number; __to: number }
|
|
409
|
-
const fillPts = useMemo<FillPt[]>(() => {
|
|
410
|
-
if (!fillBetween) return []
|
|
411
|
-
const fromLine = visibleSeries.find((s) => s.key === fillBetween.from)
|
|
412
|
-
const toLine = visibleSeries.find((s) => s.key === fillBetween.to)
|
|
413
|
-
if (!fromLine || !toLine) return []
|
|
414
|
-
const out: FillPt[] = []
|
|
415
|
-
for (const d of data) {
|
|
416
|
-
const f = fromLine.getValue(d)
|
|
417
|
-
const t = toLine.getValue(d)
|
|
418
|
-
if (f === null || f === undefined || Number.isNaN(f)) continue
|
|
419
|
-
if (t === null || t === undefined || Number.isNaN(t)) continue
|
|
420
|
-
out.push({ __d: d, __from: f, __to: t })
|
|
421
|
-
}
|
|
422
|
-
return out
|
|
423
|
-
}, [data, fillBetween, visibleSeries])
|
|
424
|
-
|
|
425
|
-
// The fill reads the FROM line's curve — same law as ZonedLine's "one curve for all shapes
|
|
426
|
-
// drawn from one series", extended to the two lines a fill spans: the band takes its shape from
|
|
427
|
-
// the line it hugs on the low side.
|
|
428
|
-
const fillCurve = useMemo(
|
|
429
|
-
() =>
|
|
430
|
-
curveFor(
|
|
431
|
-
fillBetween ? visibleSeries.find((s) => s.key === fillBetween.from)?.curve : undefined,
|
|
432
|
-
),
|
|
433
|
-
[fillBetween, visibleSeries],
|
|
434
|
-
)
|
|
435
|
-
|
|
436
|
-
type LinePt = { __d: T; __y: number }
|
|
437
|
-
// Per-line valid points, computed once per (data, visibleSeries) — not re-walked inside the
|
|
438
|
-
// render map every paint (parity with MultiLine's seriesPts).
|
|
439
|
-
const lineValid = useMemo(() => {
|
|
440
|
-
const out = new Map<string, LinePt[]>()
|
|
441
|
-
for (const s of visibleSeries) {
|
|
442
|
-
const pts: LinePt[] = []
|
|
443
|
-
for (const d of data) {
|
|
444
|
-
const v = s.getValue(d)
|
|
445
|
-
if (v !== null && v !== undefined && !Number.isNaN(v)) pts.push({ __d: d, __y: v })
|
|
446
|
-
}
|
|
447
|
-
out.set(s.key, pts)
|
|
448
|
-
}
|
|
449
|
-
return out
|
|
450
|
-
}, [data, visibleSeries])
|
|
451
|
-
|
|
452
|
-
// Per-point markers (PR star / status dots), memoized for the same reason as `histogramBars` /
|
|
453
|
-
// `lineValid` — the shared cursor re-renders every mounted chart on every pointer frame, and this
|
|
454
|
-
// walks every visible series' valid points calling the consumer's `getMarker` each time otherwise.
|
|
455
|
-
const markerNodes = useMemo<ReactNode[]>(
|
|
456
|
-
() =>
|
|
457
|
-
visibleSeries.flatMap((s) => {
|
|
458
|
-
const getMarker = s.getMarker
|
|
459
|
-
if (!getMarker) return [] as ReactNode[]
|
|
460
|
-
const pts = lineValid.get(s.key) ?? []
|
|
461
|
-
const markers: ReactNode[] = []
|
|
462
|
-
for (const p of pts) {
|
|
463
|
-
const m = getMarker(p.__d)
|
|
464
|
-
if (m === null) continue
|
|
465
|
-
const cx = xScale(getX(p.__d)) ?? 0
|
|
466
|
-
const cy = topYScale(p.__y)
|
|
467
|
-
const ring = m.ring ?? true
|
|
468
|
-
markers.push(
|
|
469
|
-
<circle
|
|
470
|
-
key={`mk-${s.key}-${getX(p.__d)}`}
|
|
471
|
-
cx={cx}
|
|
472
|
-
cy={cy}
|
|
473
|
-
r={m.r ?? VX.dotR}
|
|
474
|
-
fill={m.color ?? s.color}
|
|
475
|
-
fillOpacity={m.fillOpacity ?? 1}
|
|
476
|
-
{...(ring && { stroke: VX.dotStroke, strokeWidth: 2 })}
|
|
477
|
-
/>,
|
|
478
|
-
)
|
|
479
|
-
}
|
|
480
|
-
return markers
|
|
481
|
-
}),
|
|
482
|
-
[visibleSeries, lineValid, xScale, topYScale, getX],
|
|
483
|
-
)
|
|
484
|
-
|
|
485
|
-
const point = cursor.point
|
|
486
|
-
const sx = point !== null ? (xScale(getX(point)) ?? 0) : 0
|
|
487
|
-
const syncedBar = point !== null ? getBar(point) : null
|
|
488
|
-
|
|
489
|
-
// Same seam as `CartesianChart`: this chart renders its tooltip as the cursor SOURCE (always) or,
|
|
490
|
-
// opted in via `onFollow`, as a FOLLOWER. A follower has no pointer under it, so it is always
|
|
491
|
-
// positioned via the anchored (crosshair) path — `cursor.anchor` stays null on a chart nobody is
|
|
492
|
-
// hovering, so following it here would render nothing. `DualPanel` has no `follow` prop to
|
|
493
|
-
// override the default, so touch (spec §5) anchors unconditionally, same as an unset `follow`
|
|
494
|
-
// elsewhere.
|
|
495
|
-
const isFollowerRender = !cursor.isSource && onFollow === true
|
|
496
|
-
const showTooltip = point !== null && (cursor.isSource || isFollowerRender)
|
|
497
|
-
const anchorX = (isFollowerRender || cursor.isTouch) && point !== null ? sx : null
|
|
498
|
-
const svgRect = anchorX === null ? undefined : svgRef.current?.getBoundingClientRect()
|
|
499
|
-
const tooltipAnchor =
|
|
500
|
-
svgRect === undefined || anchorX === null
|
|
501
|
-
? cursor.anchor
|
|
502
|
-
: { x: svgRect.left + margin.left + anchorX, y: svgRect.top + margin.top }
|
|
503
|
-
|
|
504
|
-
return (
|
|
505
|
-
<>
|
|
506
|
-
<svg
|
|
507
|
-
ref={svgRef}
|
|
508
|
-
width={plot.width}
|
|
509
|
-
height={plot.height}
|
|
510
|
-
// `touch-action` on the plot `<svg>`: Chrome ignores it on the overlay `<rect>` (`R2C-2`).
|
|
511
|
-
style={{ touchAction: 'pan-y' }}
|
|
512
|
-
>
|
|
513
|
-
{/* Top pane: line series + fill-between + zones + ref lines. */}
|
|
514
|
-
<Group left={margin.left} top={margin.top}>
|
|
515
|
-
<GridRows scale={topYScale} width={xMax} stroke={VX.grid} numTicks={4} />
|
|
516
|
-
|
|
517
|
-
<ZoneRects zones={topZones} width={xMax} leftScale={topYScale} />
|
|
518
|
-
|
|
519
|
-
{fillBetween && fillPts.length > 0 && (
|
|
520
|
-
<Threshold<FillPt>
|
|
521
|
-
id={`${chartId}-fill`}
|
|
522
|
-
data={fillPts}
|
|
523
|
-
x={(p) => xScale(getX(p.__d)) ?? 0}
|
|
524
|
-
y0={(p) => topYScale(p.__from)}
|
|
525
|
-
y1={(p) => topYScale(p.__to)}
|
|
526
|
-
clipAboveTo={0}
|
|
527
|
-
clipBelowTo={topH}
|
|
528
|
-
curve={fillCurve}
|
|
529
|
-
belowAreaProps={{ fill: fillBetween.fill }}
|
|
530
|
-
aboveAreaProps={{ fill: fillBetween.aboveFill ?? fillBetween.fill }}
|
|
531
|
-
/>
|
|
532
|
-
)}
|
|
533
|
-
|
|
534
|
-
{topRefLines.map((r, i) => (
|
|
535
|
-
<line
|
|
536
|
-
key={`top-ref-${i}`}
|
|
537
|
-
x1={0}
|
|
538
|
-
x2={xMax}
|
|
539
|
-
y1={topYScale(r.value)}
|
|
540
|
-
y2={topYScale(r.value)}
|
|
541
|
-
stroke={r.color}
|
|
542
|
-
strokeDasharray={r.dashed ? VX.dashArray : undefined}
|
|
543
|
-
/>
|
|
544
|
-
))}
|
|
545
|
-
|
|
546
|
-
{visibleSeries.map((s) => {
|
|
547
|
-
const valid = lineValid.get(s.key) ?? []
|
|
548
|
-
if (valid.length === 0) return null
|
|
549
|
-
return (
|
|
550
|
-
<LinePath<LinePt>
|
|
551
|
-
key={`top-line-${s.key}`}
|
|
552
|
-
data={valid}
|
|
553
|
-
x={(p) => xScale(getX(p.__d)) ?? 0}
|
|
554
|
-
y={(p) => topYScale(p.__y)}
|
|
555
|
-
stroke={s.color}
|
|
556
|
-
strokeWidth={s.strokeWidth ?? VX.lineWidth}
|
|
557
|
-
strokeDasharray={s.dash === 'dashed' ? VX.dashArray : undefined}
|
|
558
|
-
strokeOpacity={s.strokeOpacity ?? 1}
|
|
559
|
-
curve={curveFor(s.curve)}
|
|
560
|
-
/>
|
|
561
|
-
)
|
|
562
|
-
})}
|
|
563
|
-
|
|
564
|
-
{/* Per-point markers (PR star / status dots) — plain-circle parity with MultiLine's
|
|
565
|
-
`getMarker` handling; DualPanel doesn't need the star-shape variant. */}
|
|
566
|
-
{markerNodes}
|
|
567
|
-
|
|
568
|
-
{/* Dots only — the crosshair LINE is the single continuous span drawn below. */}
|
|
569
|
-
{point !== null && (
|
|
570
|
-
<>
|
|
571
|
-
{visibleSeries.map((s) => {
|
|
572
|
-
const v = s.getValue(point)
|
|
573
|
-
if (v === null || v === undefined || Number.isNaN(v)) return null
|
|
574
|
-
return (
|
|
575
|
-
<SeriesDot key={`top-dot-${s.key}`} cx={sx} cy={topYScale(v)} color={s.color} />
|
|
576
|
-
)
|
|
577
|
-
})}
|
|
578
|
-
</>
|
|
579
|
-
)}
|
|
580
|
-
|
|
581
|
-
{/* theme-allow-file basalt/hand-rolled-plot: TWO panes over one x scale is not a single
|
|
582
|
-
cartesian plot, so `CartesianChart` (one plot rect, one or two y axes) cannot express
|
|
583
|
-
it. This file therefore assembles the plot itself — but from the SAME parts every
|
|
584
|
-
other chart gets: `ChartFrame`, `autoMargin` + `probeAxisLabels`, `useChartCursor`,
|
|
585
|
-
`ChartTooltipFloat`. If a second multi-pane kind ever appears, promote the shared
|
|
586
|
-
choreography rather than copying this file. */}
|
|
587
|
-
<AxisLeftNumeric scale={topYScale} numTicks={4} tickFormat={formatTop} />
|
|
588
|
-
{/* One HoverOverlay per pane, both driving the SAME shared cursor — snap-to-nearest is
|
|
589
|
-
x-only, so either overlay yields the same point. The top overlay extends over the gutter
|
|
590
|
-
(height = topH + PANE_GAP) so there's no dead zone between the panes. */}
|
|
591
|
-
{/* The focusable overlay is the ONE keyboard control for both panes, so it carries the
|
|
592
|
-
slider's label and value — parity with `CartesianChart`. Without them the frame's
|
|
593
|
-
`aria-label` announces the chart and the slider underneath it is an unnamed control
|
|
594
|
-
reporting no position: technically focusable, useless to read. The bottom overlay
|
|
595
|
-
stays pointer-only and therefore deliberately carries neither. */}
|
|
596
|
-
<HoverOverlay
|
|
597
|
-
width={xMax}
|
|
598
|
-
height={topH + PANE_GAP}
|
|
599
|
-
{...cursorSliderProps({ cursor, data, getX, formatX, ariaLabel })}
|
|
600
|
-
/>
|
|
601
|
-
</Group>
|
|
602
|
-
|
|
603
|
-
{/* Bottom pane: signed histogram around a zero baseline. */}
|
|
604
|
-
<Group left={margin.left} top={margin.top + bottomTop}>
|
|
605
|
-
<line
|
|
606
|
-
x1={0}
|
|
607
|
-
x2={xMax}
|
|
608
|
-
y1={bottomYScale(0)}
|
|
609
|
-
y2={bottomYScale(0)}
|
|
610
|
-
stroke={VX.grid}
|
|
611
|
-
strokeWidth={1}
|
|
612
|
-
/>
|
|
613
|
-
|
|
614
|
-
{histogramBars.map((b) => (
|
|
615
|
-
<Bar
|
|
616
|
-
key={b.key}
|
|
617
|
-
x={b.x}
|
|
618
|
-
y={b.y}
|
|
619
|
-
width={b.width}
|
|
620
|
-
height={b.height}
|
|
621
|
-
fill={b.fill}
|
|
622
|
-
fillOpacity={0.7}
|
|
623
|
-
rx={1.4}
|
|
624
|
-
/>
|
|
625
|
-
))}
|
|
626
|
-
|
|
627
|
-
{barVisible &&
|
|
628
|
-
point !== null &&
|
|
629
|
-
syncedBar !== null &&
|
|
630
|
-
syncedBar !== undefined &&
|
|
631
|
-
!Number.isNaN(syncedBar) && (
|
|
632
|
-
<SeriesDot
|
|
633
|
-
cx={sx}
|
|
634
|
-
cy={bottomYScale(syncedBar)}
|
|
635
|
-
color={syncedBar >= 0 ? barColorPositive : barColorNegative}
|
|
636
|
-
/>
|
|
637
|
-
)}
|
|
638
|
-
|
|
639
|
-
<AxisLeftNumeric scale={bottomYScale} numTicks={3} tickFormat={formatBottom} />
|
|
640
|
-
<AxisBottomDate
|
|
641
|
-
top={bottomH}
|
|
642
|
-
scale={xScale}
|
|
643
|
-
tickValues={tickValues}
|
|
644
|
-
tickFormat={formatX}
|
|
645
|
-
/>
|
|
646
|
-
{/* Pointer only — deliberately NO `onKeyDown`, which is what makes an overlay focusable.
|
|
647
|
-
Both panes scrub the same single x cursor, so a second tab stop would be a second
|
|
648
|
-
control for one logical axis: a keyboard user would tab twice through one chart and
|
|
649
|
-
find the arrow keys doing the same thing. The top overlay owns the keyboard. */}
|
|
650
|
-
<HoverOverlay
|
|
651
|
-
width={xMax}
|
|
652
|
-
height={bottomH + margin.bottom}
|
|
653
|
-
onMove={cursor.onPointerMove}
|
|
654
|
-
onDown={cursor.onPointerDown}
|
|
655
|
-
onUp={cursor.onPointerUp}
|
|
656
|
-
onLeave={cursor.onPointerLeave}
|
|
657
|
-
/>
|
|
658
|
-
</Group>
|
|
659
|
-
|
|
660
|
-
{/* Continuous crosshair spanning the gutter between panes. */}
|
|
661
|
-
{point !== null && (
|
|
662
|
-
<Group left={margin.left} top={margin.top}>
|
|
663
|
-
<Crosshair x={sx} top={0} bottom={innerH} />
|
|
664
|
-
</Group>
|
|
665
|
-
)}
|
|
666
|
-
</svg>
|
|
667
|
-
|
|
668
|
-
{showTooltip && (
|
|
669
|
-
<ChartTooltipFloat anchor={tooltipAnchor} ariaLive={cursor.isSource}>
|
|
670
|
-
<TooltipHeader
|
|
671
|
-
date={getX(point)}
|
|
672
|
-
{...(formatHeader !== undefined && {
|
|
673
|
-
format: (key: string) => formatHeader(key, point),
|
|
674
|
-
})}
|
|
675
|
-
{...(() => {
|
|
676
|
-
const lbl = tooltipLabel?.(point) ?? null
|
|
677
|
-
return lbl !== null ? { label: lbl.text, labelColor: lbl.color } : {}
|
|
678
|
-
})()}
|
|
679
|
-
/>
|
|
680
|
-
<TooltipBody>
|
|
681
|
-
<TooltipRows rows={deriveTooltipRows(visibleSeries, point, formatTop)} />
|
|
682
|
-
{barVisible &&
|
|
683
|
-
(() => {
|
|
684
|
-
const v = getBar(point)
|
|
685
|
-
if (v === null || v === undefined || Number.isNaN(v)) return null
|
|
686
|
-
// `formatBar` overrides the tooltip row only — `formatBottom` keeps owning ticks.
|
|
687
|
-
const value = formatBar !== undefined ? formatBar(v, point) : formatBottom(v)
|
|
688
|
-
return (
|
|
689
|
-
<TooltipRow
|
|
690
|
-
color={v >= 0 ? barColorPositive : barColorNegative}
|
|
691
|
-
label={barLabel}
|
|
692
|
-
value={value}
|
|
693
|
-
shape="bar"
|
|
694
|
-
/>
|
|
695
|
-
)
|
|
696
|
-
})()}
|
|
697
|
-
</TooltipBody>
|
|
698
|
-
</ChartTooltipFloat>
|
|
699
|
-
)}
|
|
700
|
-
</>
|
|
701
|
-
)
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
/**
|
|
705
|
-
* Hand-memoized: React Compiler does not process the shipped dist, so the hot DualPanel kind is
|
|
706
|
-
* wrapped in `React.memo` to retain the auto-memoization it had as source (parity with ZonedLine).
|
|
707
|
-
*/
|
|
708
|
-
const DualPanelMemo = memo(DualPanelInner)
|
|
709
|
-
// Without it every kind reads as `Memo` in React DevTools (audit A16) — a profiler flame
|
|
710
|
-
// graph of nine identically-named nodes names nothing.
|
|
711
|
-
DualPanelMemo.displayName = 'DualPanel'
|
|
712
|
-
export const DualPanel = DualPanelMemo as typeof DualPanelInner
|