basalt-ui 2.11.0 → 2.12.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.
Files changed (109) hide show
  1. package/AGENTS.md +1 -1
  2. package/CHANGELOG.md +26 -0
  3. package/MIGRATING.md +33 -12
  4. package/README.md +2 -0
  5. package/agent/rules/basalt-mantine.md +1 -1
  6. package/agent/skills/basalt-app/SKILL.md +1 -1
  7. package/agent/skills/basalt-charts/SKILL.md +1 -1
  8. package/dist/charts/DualPanel.d.ts.map +1 -1
  9. package/dist/charts/DualPanel.js +1 -0
  10. package/dist/charts/Lines.d.ts.map +1 -1
  11. package/dist/charts/Lines.js +7 -45
  12. package/dist/charts/MirroredBars.js +2 -2
  13. package/dist/charts/compile.d.ts.map +1 -1
  14. package/dist/charts/compile.js +21 -5
  15. package/dist/charts/labels.d.ts +34 -0
  16. package/dist/charts/labels.d.ts.map +1 -0
  17. package/dist/charts/labels.js +63 -0
  18. package/dist/charts/marks.d.ts +7 -0
  19. package/dist/charts/marks.d.ts.map +1 -1
  20. package/dist/charts/marks.js +22 -0
  21. package/dist/charts/scales.d.ts +4 -1
  22. package/dist/charts/scales.d.ts.map +1 -1
  23. package/dist/charts/scales.js +5 -3
  24. package/dist/charts/ticks.d.ts +12 -0
  25. package/dist/charts/ticks.d.ts.map +1 -0
  26. package/dist/charts/ticks.js +42 -0
  27. package/dist/charts/types.d.ts +11 -3
  28. package/dist/charts/types.d.ts.map +1 -1
  29. package/dist/cli/doctor-upgrade.d.ts +2 -3
  30. package/dist/cli/doctor-upgrade.d.ts.map +1 -1
  31. package/dist/cli/doctor-upgrade.js +71 -26
  32. package/dist/cli/index.d.ts +3 -1
  33. package/dist/cli/index.d.ts.map +1 -1
  34. package/dist/cli/index.js +3 -1
  35. package/dist/cli/sync.d.ts.map +1 -1
  36. package/dist/cli/sync.js +2 -1
  37. package/dist/commands/command-stash.d.ts +15 -0
  38. package/dist/commands/command-stash.d.ts.map +1 -0
  39. package/dist/commands/command-stash.js +31 -0
  40. package/dist/commands/define-commands.d.ts +2 -3
  41. package/dist/commands/define-commands.d.ts.map +1 -1
  42. package/dist/commands/define-commands.js +9 -7
  43. package/dist/commands/define-overlays.d.ts +6 -12
  44. package/dist/commands/define-overlays.d.ts.map +1 -1
  45. package/dist/commands/define-overlays.js +28 -34
  46. package/dist/commands/projectors.js +1 -1
  47. package/dist/provider/hotkeys.d.ts +2 -6
  48. package/dist/provider/hotkeys.d.ts.map +1 -1
  49. package/dist/provider/hotkeys.js +10 -15
  50. package/dist/provider/index.d.ts +5 -3
  51. package/dist/provider/index.d.ts.map +1 -1
  52. package/dist/provider/index.js +12 -35
  53. package/dist/provider/modals-mount.d.ts +16 -0
  54. package/dist/provider/modals-mount.d.ts.map +1 -0
  55. package/dist/provider/modals-mount.js +42 -0
  56. package/dist/provider/notifier.d.ts +22 -0
  57. package/dist/provider/notifier.d.ts.map +1 -0
  58. package/dist/provider/notifier.js +36 -0
  59. package/dist/provider/route-transition.d.ts +1 -1
  60. package/dist/provider/route-transition.d.ts.map +1 -1
  61. package/dist/provider/route-transition.js +1 -1
  62. package/dist/provider/slots.d.ts +25 -0
  63. package/dist/provider/slots.d.ts.map +1 -0
  64. package/dist/provider/slots.js +29 -0
  65. package/dist/provider/spotlight-actions.d.ts +1 -1
  66. package/dist/provider/spotlight-actions.d.ts.map +1 -1
  67. package/dist/provider/spotlight-actions.js +2 -3
  68. package/dist/provider/spotlight-mount.d.ts +3 -0
  69. package/dist/provider/spotlight-mount.d.ts.map +1 -0
  70. package/dist/provider/spotlight-mount.js +26 -0
  71. package/dist/router-tanstack/nav-stash.d.ts +24 -0
  72. package/dist/router-tanstack/nav-stash.d.ts.map +1 -0
  73. package/dist/router-tanstack/nav-stash.js +23 -0
  74. package/dist/router-tanstack/nav.d.ts +5 -15
  75. package/dist/router-tanstack/nav.d.ts.map +1 -1
  76. package/dist/router-tanstack/nav.js +6 -16
  77. package/dist/router-tanstack/use-nav.js +1 -1
  78. package/dist/surfaces.d.ts +1 -1
  79. package/dist/surfaces.js +1 -1
  80. package/llms.txt +4 -4
  81. package/package.json +2 -2
  82. package/src/charts/DualPanel.tsx +1 -0
  83. package/src/charts/Lines.tsx +11 -57
  84. package/src/charts/MirroredBars.tsx +2 -2
  85. package/src/charts/compile.ts +34 -6
  86. package/src/charts/labels.ts +118 -0
  87. package/src/charts/marks.ts +41 -0
  88. package/src/charts/scales.ts +9 -7
  89. package/src/charts/ticks.ts +61 -0
  90. package/src/charts/types.ts +11 -3
  91. package/src/cli/doctor-upgrade.ts +101 -35
  92. package/src/cli/index.ts +5 -3
  93. package/src/cli/sync.ts +2 -2
  94. package/src/commands/command-stash.ts +44 -0
  95. package/src/commands/define-commands.ts +10 -17
  96. package/src/commands/define-overlays.ts +40 -68
  97. package/src/commands/projectors.ts +1 -1
  98. package/src/provider/hotkeys.ts +14 -22
  99. package/src/provider/index.tsx +28 -52
  100. package/src/provider/modals-mount.tsx +66 -0
  101. package/src/provider/notifier.ts +52 -0
  102. package/src/provider/route-transition.ts +1 -1
  103. package/src/provider/slots.ts +59 -0
  104. package/src/provider/spotlight-actions.tsx +3 -4
  105. package/src/provider/spotlight-mount.tsx +33 -0
  106. package/src/router-tanstack/nav-stash.ts +41 -0
  107. package/src/router-tanstack/nav.ts +11 -31
  108. package/src/router-tanstack/use-nav.ts +1 -1
  109. package/src/surfaces.ts +1 -1
package/AGENTS.md CHANGED
@@ -21,7 +21,7 @@ and `./package.json` are **not exports** (`llms.txt` still ships in the tarball
21
21
  | `basalt-ui/vite` | build-tooling | basaltViteConfig(opts) — Vite preset for basalt-ui consumer apps; basaltAppPlugin(opts) — PWA head, manifest, and icon metadata derived from the token palette |
22
22
  | `basalt-ui/format` | headless | integer/money/percent/durationClock/relativeTime/weekday/km/kcal — Intl-backed, Mantine-free, React-free formatting; the chart layer formats through the same implementation |
23
23
  | `basalt-ui/forms` | mantine-coupled | Mantine form layer: useBasaltForm + inputProps/fieldKey (two calls — a spread `key` is a React 19 warning), on @mantine/form |
24
- | `basalt-ui/commands` | mantine-coupled | defineCommands (typed command bus), defineOverlays/overlays (a form dialog is a registered overlay opened with overlays.open), setColorScheme, toggleSidebar, ShortcutsHelp, defineNotifications/emit/NotificationBell (emit only accepts kinds registered in defineNotifications; folded in from ./notifications); BasaltProvider mounts Spotlight, Modals and Notifications |
24
+ | `basalt-ui/commands` | mantine-coupled | defineCommands (typed command bus), defineOverlays/overlays (a form dialog is a registered overlay opened with overlays.open), setColorScheme, toggleSidebar, ShortcutsHelp, defineNotifications/emit/NotificationBell (emit only accepts kinds registered in defineNotifications; folded in from ./notifications); BasaltProvider mounts Notifications; Spotlight mounts once defineNav/defineCommands ran, Modals once defineOverlays/overlays.confirm ran |
25
25
  | `basalt-ui/table` | mantine-coupled | BasaltDataTable and createColumnHelper: a data table over TanStack Table v9, rendered with Mantine |
26
26
  | `basalt-ui/agent` | mantine-coupled | Streaming-chat surface: aiSdkTransport, useAgentThreadRuns, parseAgentPart, the open part-registry types, the consumer-owned thread contracts (AgentThread/ThreadsStore/ChatMessage), and the Mantine chat UI folded in from ./agent-chat (ThreadFeed, ThreadFeedRow, Composer, ToolChip). motion is subpath-required: the chat UI imports it eagerly |
27
27
  | `basalt-ui/content` | mantine-coupled | Prose (article/chat typography), Callout, TableOfContents (given a containerRef it collects the id-bearing h2/h3 under that one container — levels changes which — on mount and on every DOM childList change, so it reads the slug ids `Markdown` gives every heading; `Prose` sets no ids and an explicit items list replaces collection), Markdown (react-markdown + remark-gfm, optional peers; `streaming` is a rendering mode ONLY — `contentTrust` is the independent security input, and any surface rendering agent/model output must pin `contentTrust="untrusted"`, the sole input to the image-origin allowlist; `fenceRenderers` extends fenced-block rendering — settledOnly/FenceRenderer/FenceRenderers; `sanitizeSchema` is an additions-only SanitizeSchemaExtension merged over the default via mergeSanitizeSchema; shiki code blocks, beautiful-mermaid diagrams and the remend streaming repair load lazily from optional peers), ArticleLayout (docs-page frame), GuideLink (contextual-help link) — the content/prose surface |
package/CHANGELOG.md CHANGED
@@ -1,3 +1,29 @@
1
+ # [2.12.0](https://github.com/jkrumm/basalt-ui/compare/v2.11.1...v2.12.0) (2026-10-16)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * accept a pathless-layout provider and read the router context from types ([a57f4f5](https://github.com/jkrumm/basalt-ui/commit/a57f4f549b82bad0981155baac0d6544d507fc56))
7
+ * close cancels pending overlays, live counters share one helper ([474712e](https://github.com/jkrumm/basalt-ui/commit/474712e71d8fb877cdb415163df0ad4e5725c1cd))
8
+ * count provider tags, not files, and share the Start provider hint ([2293494](https://github.com/jkrumm/basalt-ui/commit/2293494b46086f1142bcaa9e9e6918ee694089a4))
9
+ * slot review — nav stash leaf, shared notifier, late overlay open ([5ad739d](https://github.com/jkrumm/basalt-ui/commit/5ad739db8ff06e71eb3a66a49b6fc29e300ba051))
10
+ * tie the Start root-context check to the exported root route ([aefc446](https://github.com/jkrumm/basalt-ui/commit/aefc4465fbb2bee72f4d2ef4cd643d1e6c71dc5e))
11
+
12
+
13
+ ### Features
14
+
15
+ * provider bundles Spotlight, modals, hotkeys only when defined ([37c3477](https://github.com/jkrumm/basalt-ui/commit/37c347743a83db4b291173cf0238f37d6aa2fb42))
16
+
17
+ ## [2.11.1](https://github.com/jkrumm/basalt-ui/compare/v2.11.0...v2.11.1) (2026-10-15)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * end labels read the plot's own x model and plot height ([81780be](https://github.com/jkrumm/basalt-ui/commit/81780be14d37875c445f6f432439b8bb93302f03))
23
+ * end-label room, bucket ticks and lone dots per review ([6011eb6](https://github.com/jkrumm/basalt-ui/commit/6011eb65f304e0de6e6893c5a68a30af69e513ca))
24
+ * lone points, end labels and axis ticks render cleanly ([95f898f](https://github.com/jkrumm/basalt-ui/commit/95f898f16927e209daa11ee2e587267103031b27))
25
+ * mirrored bars reach both plot edges ([d8d6d4a](https://github.com/jkrumm/basalt-ui/commit/d8d6d4a8ddd3a3689b50b8f2213fee9683cf56a4))
26
+
1
27
  # [2.11.0](https://github.com/jkrumm/basalt-ui/compare/v2.10.0...v2.11.0) (2026-10-15)
2
28
 
3
29
 
package/MIGRATING.md CHANGED
@@ -66,18 +66,18 @@ There is one row per SURFACE, not per export, and a surface earns a row once any
66
66
  shipped lefthook preset both changed in 1.30.0 with no row that owned them — which is how a
67
67
  consumer read this index, found nothing, and diffed a KPI row that had silently gone 4-up → 2-up.
68
68
 
69
- | Surface | 1.27.0 | 1.28.0 | 1.29.0 | 1.30.0 | 1.30.1 | 1.30.2 | 1.31.0 | 1.32.0 | 1.32.1 | 1.33.0 | 1.34.0 | 1.34.1 | 1.35.0 | 1.36.0 | 1.36.1 | 1.37.0 | 1.37.1 | 1.38.0 | 1.38.1 | 1.39.0 | 1.40.0 | 1.40.1 | 1.40.2 | 1.40.3 | 1.41.0 | 2.0.0 | 2.0.1 | 2.0.2 | 2.0.3 | 2.0.4 | 2.0.5 | 2.1.0 | 2.2.0 | 2.3.0 | 2.4.0 | 2.5.0 | 2.6.0 | 2.6.1 | 2.7.0 | 2.7.1 | 2.7.2 | 2.7.3 | 2.8.0 | 2.8.1 | 2.9.0 | 2.9.1 | 2.10.0 | 2.11.0 | Unreleased |
70
- | ----------------------------- | ------------------------------------------------------------ | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ---------------------------------- | ------ | ------ | -------------------------------------------------------------------------------------------- | ------ | ------ | ------ | ------ | ------ | ----------------------------------------------- | ------ | ------ | ------ | ------ | ------------------------------------------------------------ | ---------- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
71
- | **tokens** (`./tokens`) | — | `--vx-divider` → `rgba()` on both schemes (§ Shell) | `--vx-space-touch-target` added (§ Additions) | eight spacing numbers (§ Chrome) | — | — | `--vx-hit` replaces the touch vars; `SIZE_CLASSES` (§ 1.31.0) | — | `SIZE_CLASSES`/`CONTAINER_CLASSES` actually exported (§ Fixes) | `CONTAINER_GRID_BREAKPOINTS`; `raw-breakpoint` trusts it (§ 1.33.0) | `CONTAINER_KEYS` (§ 1.34.0) | — | — | — | — | — | — | — | | `appShellInset` 20 → 16 (§ 1.38.1) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | § 1.x compatibility layer removed | — | — | — | — |
72
- | **charts** (`./charts`) | — | phone tier, `curve`, formatters, `state`, log axis (§ preamble) | `ChartState.empty: string`, `AxisBottomNumeric` (§ Additions) | responsive `height`, `legend.maxRows` (§ Charts) | `height` reaches the kinds; `maxRows` beats the `fill` fit (§ Charts) | — | container-class tier + `height` keys (§ 1.31.0) | — | `ResponsiveChartHeight` `sm` → key (§ Container recipes) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | `BandSpan.absentFraction` + `absentState` (§ 2.8.0) | — | — | — | — | — | — |
73
- | **shell** (`.`) | — | scrollport, region seams, **the brand left the sidebar** (§§ scrollport, brand, Shell) | `PageTitle`, `BasaltDevDock`, `useBreakpoint` (§ Additions) | More popover, aside pill, the responsive gutter, `useBasaltSpacing` (§ Chrome) | — | — | `theme.breakpoints` derived, `useSizeClass`, `data-basalt-host`, `useBreakpoint` on notice (§ 1.31.0) | `useBreakpoint` removal → 1.33.0; `useSizeClass` is shell-only (§ 1.32.0) | shell-less `shell/` gutter, `AppShell` breakpoints, `useSizeClass` for overlays (§§ Shell-less, `useSizeClass`) | — | `useBreakpoint` removed (§ 1.34.0) | — | — | `useCoarsePointer()` (§ `useCoarsePointer()`) | — | — | — | — | | content gutter 16, block 8 from `sm` (§ 1.38.1) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | `BasaltProvider` embedded mode, `spotlight` (§ 2.8.0) | — | — | — | — | — | — |
74
- | **controls** (`./controls`) | `NumberFilter`, `field.number` (§ Controls) | sheet renders panel rows; `PanelRow`, `SliderControl` (§ `basalt-ui/controls`) | — | — | — | — | — | — | — | `NumberFilter clearable`; `createSearchStore` `resets` (§ State and controls) | — | — | — | `FormSection`/`FormRow`/`FormGroup`/`FormActions` move here (§ The form layout moves) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
75
- | **forms** (`./forms`) | — | `field` → `inputProps`, **`inputProps` drops `key`**, the layout tier (§ `inputProps`) | `field` DELETED — and the `--fix` recipe no longer works (§ Consolidation) | — | — | — | — | — | `FormGroup` row no longer stretches (§ Fixes) | — | — | — | — | the layout + `useForm`/`schemaResolver` deprecated, removed 1.37.0 (§ The form layout moves) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | § 1.x compatibility layer removed | — | — | — | — |
76
- | **data** (`./data/table`) | — | root is a `<div>`, row selection, `getItemKey` required (§ `basalt-ui/data`) | `./data` + `./query` + `./connectivity` dropped (§ Consolidation) | — | — | — | — | — | `renderCard` documented (§ `renderCard`) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
77
- | **dashboard** (`.`) | `StatCard`: `unit`, `breakdown`, delta format (§ `StatCard`) | `StatGroup`, `WidgetGrid`, query-aware `StatCard` — additive | — | **the column law keys on the CONTAINER; `cols={4}` is 2-up at `sm`** (§ Dashboard) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | § 1.x compatibility layer removed | — | — | — | — |
78
- | **toolchain** (`./configs/*`) | — | — | the shipped lefthook preset's `check-theme` BROKE — the CLI resolver stopped ascending (§ CLI) | the preset's default bin, and the `root:` recipe (§ Toolchain) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
79
- | **CLI** (`basalt-ui`) | — | — | **resolver stops relocating; `doctor` loses 6 of 10 checks** (§ CLI) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | the managed block moves `CLAUDE.md` → `AGENTS.md` (§ 1.41.0) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | `doctor`: CSS + forced dropped subpaths, `oxlint-floor`, Start wiring (§ 2.8.0) | — | § 1.x compatibility layer removed | — | — | — | — |
80
- | **guards** | five rules → `error` (§ Guards) | six new ids at `warn` (§ preamble) | `query-dual-import` retired in 1.29.1 (§ Guards) | four rules → `error` (§ Guards) | — | — | — | `raw-breakpoint`: the container-grid answer, `error` at 1.33.0 (§ 1.32.0) | `FormRow`/`FormGroup` homes in both lanes; `basalt-main` dropped (§ Fixes) | C1 + breakpoint pairs → `error`; `unknown-vx-token` `warn` (§ Guards) | — | — | — | `unknown-vx-token` → `error`; the token factories throw (§ Guards) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | § 1.x compatibility layer removed | — | — | — | — |
69
+ | Surface | 1.27.0 | 1.28.0 | 1.29.0 | 1.30.0 | 1.30.1 | 1.30.2 | 1.31.0 | 1.32.0 | 1.32.1 | 1.33.0 | 1.34.0 | 1.34.1 | 1.35.0 | 1.36.0 | 1.36.1 | 1.37.0 | 1.37.1 | 1.38.0 | 1.38.1 | 1.39.0 | 1.40.0 | 1.40.1 | 1.40.2 | 1.40.3 | 1.41.0 | 2.0.0 | 2.0.1 | 2.0.2 | 2.0.3 | 2.0.4 | 2.0.5 | 2.1.0 | 2.2.0 | 2.3.0 | 2.4.0 | 2.5.0 | 2.6.0 | 2.6.1 | 2.7.0 | 2.7.1 | 2.7.2 | 2.7.3 | 2.8.0 | 2.8.1 | 2.9.0 | 2.9.1 | 2.10.0 | 2.11.0 | 2.11.1 | 2.12.0 | Unreleased |
70
+ | ----------------------------- | ------------------------------------------------------------ | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ---------------------------------- | ------ | ------ | -------------------------------------------------------------------------------------------- | ------ | ------ | ------ | ------ | ------ | ----------------------------------------------- | ------ | ------ | ------ | ------ | ------------------------------------------------------------ | ---------- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
71
+ | **tokens** (`./tokens`) | — | `--vx-divider` → `rgba()` on both schemes (§ Shell) | `--vx-space-touch-target` added (§ Additions) | eight spacing numbers (§ Chrome) | — | — | `--vx-hit` replaces the touch vars; `SIZE_CLASSES` (§ 1.31.0) | — | `SIZE_CLASSES`/`CONTAINER_CLASSES` actually exported (§ Fixes) | `CONTAINER_GRID_BREAKPOINTS`; `raw-breakpoint` trusts it (§ 1.33.0) | `CONTAINER_KEYS` (§ 1.34.0) | — | — | — | — | — | — | — | | `appShellInset` 20 → 16 (§ 1.38.1) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | § 1.x compatibility layer removed | — | — | — | — | — | — |
72
+ | **charts** (`./charts`) | — | phone tier, `curve`, formatters, `state`, log axis (§ preamble) | `ChartState.empty: string`, `AxisBottomNumeric` (§ Additions) | responsive `height`, `legend.maxRows` (§ Charts) | `height` reaches the kinds; `maxRows` beats the `fill` fit (§ Charts) | — | container-class tier + `height` keys (§ 1.31.0) | — | `ResponsiveChartHeight` `sm` → key (§ Container recipes) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | `BandSpan.absentFraction` + `absentState` (§ 2.8.0) | — | — | — | — | — | — | — | — |
73
+ | **shell** (`.`) | — | scrollport, region seams, **the brand left the sidebar** (§§ scrollport, brand, Shell) | `PageTitle`, `BasaltDevDock`, `useBreakpoint` (§ Additions) | More popover, aside pill, the responsive gutter, `useBasaltSpacing` (§ Chrome) | — | — | `theme.breakpoints` derived, `useSizeClass`, `data-basalt-host`, `useBreakpoint` on notice (§ 1.31.0) | `useBreakpoint` removal → 1.33.0; `useSizeClass` is shell-only (§ 1.32.0) | shell-less `shell/` gutter, `AppShell` breakpoints, `useSizeClass` for overlays (§§ Shell-less, `useSizeClass`) | — | `useBreakpoint` removed (§ 1.34.0) | — | — | `useCoarsePointer()` (§ `useCoarsePointer()`) | — | — | — | — | | content gutter 16, block 8 from `sm` (§ 1.38.1) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | `BasaltProvider` embedded mode, `spotlight` (§ 2.8.0) | — | — | — | — | — | — | — | — |
74
+ | **controls** (`./controls`) | `NumberFilter`, `field.number` (§ Controls) | sheet renders panel rows; `PanelRow`, `SliderControl` (§ `basalt-ui/controls`) | — | — | — | — | — | — | — | `NumberFilter clearable`; `createSearchStore` `resets` (§ State and controls) | — | — | — | `FormSection`/`FormRow`/`FormGroup`/`FormActions` move here (§ The form layout moves) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
75
+ | **forms** (`./forms`) | — | `field` → `inputProps`, **`inputProps` drops `key`**, the layout tier (§ `inputProps`) | `field` DELETED — and the `--fix` recipe no longer works (§ Consolidation) | — | — | — | — | — | `FormGroup` row no longer stretches (§ Fixes) | — | — | — | — | the layout + `useForm`/`schemaResolver` deprecated, removed 1.37.0 (§ The form layout moves) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | § 1.x compatibility layer removed | — | — | — | — | — | — |
76
+ | **data** (`./data/table`) | — | root is a `<div>`, row selection, `getItemKey` required (§ `basalt-ui/data`) | `./data` + `./query` + `./connectivity` dropped (§ Consolidation) | — | — | — | — | — | `renderCard` documented (§ `renderCard`) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
77
+ | **dashboard** (`.`) | `StatCard`: `unit`, `breakdown`, delta format (§ `StatCard`) | `StatGroup`, `WidgetGrid`, query-aware `StatCard` — additive | — | **the column law keys on the CONTAINER; `cols={4}` is 2-up at `sm`** (§ Dashboard) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | § 1.x compatibility layer removed | — | — | — | — | — | — |
78
+ | **toolchain** (`./configs/*`) | — | — | the shipped lefthook preset's `check-theme` BROKE — the CLI resolver stopped ascending (§ CLI) | the preset's default bin, and the `root:` recipe (§ Toolchain) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
79
+ | **CLI** (`basalt-ui`) | — | — | **resolver stops relocating; `doctor` loses 6 of 10 checks** (§ CLI) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | the managed block moves `CLAUDE.md` → `AGENTS.md` (§ 1.41.0) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | `doctor`: CSS + forced dropped subpaths, `oxlint-floor`, Start wiring (§ 2.8.0) | — | § 1.x compatibility layer removed | — | — | — | — | — | — |
80
+ | **guards** | five rules → `error` (§ Guards) | six new ids at `warn` (§ preamble) | `query-dual-import` retired in 1.29.1 (§ Guards) | four rules → `error` (§ Guards) | — | — | — | `raw-breakpoint`: the container-grid answer, `error` at 1.33.0 (§ 1.32.0) | `FormRow`/`FormGroup` homes in both lanes; `basalt-main` dropped (§ Fixes) | C1 + breakpoint pairs → `error`; `unknown-vx-token` `warn` (§ Guards) | — | — | — | `unknown-vx-token` → `error`; the token factories throw (§ Guards) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | § 1.x compatibility layer removed | — | — | — | — | — | — |
81
81
 
82
82
  ---
83
83
 
@@ -1046,6 +1046,27 @@ The `basalt-ui/router-tanstack` subpath is **removed** in 2.x, not moved: an imp
1046
1046
  _Nothing yet. Author the next section under this heading as `## Unreleased — <title>`; the
1047
1047
  release renames it and opens a new one here._
1048
1048
 
1049
+ ## 2.12.0 — the provider bundles only what the app defines; Start wiring accepts a pathless layout
1050
+
1051
+ - **`ModalsProvider` is a sibling of the router, not its wrapper, and mounts only once `defineOverlays`, `overlays.open` or `overlays.confirm` asked for it.** `BasaltProvider` no longer imports `@mantine/modals`; the define call registers the mount, so a late call (a lazily loaded route) mounts it beside the app without re-parenting or remounting the tree. `useModals()` / `openContextModal` context is therefore **no longer provided**: a component calling `useModals()` throws "outside of context". **Opt-out: use the imperative `modals.*` / `overlays.*` API. Do NOT mount a second `ModalsProvider` while `defineOverlays` / `overlays` are in use** — Mantine's modals ride a window event bus, so every mounted `ModalsProvider` answers one `modals.open`, and you get two dialogs (pinned in `slots.test.tsx`).
1052
+ - **`overlays.open` / `overlays.confirm` may wait for the mount.** The first call after the define registers the mount and waits for the provider to commit it: a tick normally, up to 5 s while a `BasaltProvider` is mounted and busy. With no `BasaltProvider` mounted, `confirm` rejects after 500 ms (as before, now delayed) and `open` warns in dev.
1053
+ - **Spotlight mounts only when the app calls `defineNav` or `defineCommands`.** Nav entries and commands are what the palette lists; an app defining neither ships none of `@mantine/spotlight`. `spotlight={false}` still suppresses the mount. The dev dock's three `dev.*` palette commands now appear only in an app that defines nav or commands. **Opt-out: call `defineNav` or `defineCommands` (even `defineCommands({})`).**
1054
+ - **Command shortcuts bind through `defineCommands`.** It registers the hotkey binder when any command has a `shortcut`, and rebinds if `defineCommands` runs again; `@tanstack/react-hotkeys` is no longer reachable from `BasaltProvider`, so an app with no shortcuts neither ships nor loads it (it was a ~15 KB gzip dynamic chunk that bundle-graph size bars counted). **Opt-out: none.**
1055
+ - **Measured:** an embedded `<BasaltProvider spotlight={false}>` with no defines, peers bundled and every chunk counted, dropped from 190544 B to 166834 B gzip (`scripts/check-budgets.ts` gates it).
1056
+ - **`doctor` accepts the Start provider in a pathless layout.** `<BasaltProvider>` may sit in `__root.tsx` or in `src/routes/_<name>.tsx` / `_<name>/route.tsx` at any depth (a landing kept at 0 JS mounts it in the layout). Exactly one `<BasaltProvider>` tag across the root and the layouts is allowed; a second one, even in the same file, fails naming the file. `router=` on the provider is rejected in a layout file too, as it was in the root. **Opt-out: none.**
1057
+ - **New `app-wiring` fail: an untyped Start root route.** A root that exports `Route = createRootRoute(` has no `queryClient` in its router context, which the embedded provider reads. Fix: `export const Route = createRootRouteWithContext<BasaltRouterContext>()({ … })` (`import type { BasaltRouterContext } from 'basalt-ui'`) and pass the `QueryClient` in `createRouter({ context })`. A re-export, wrapper or missing `Route` export is not judged. `doctor` exits non-zero on it. **Opt-out: none.**
1058
+ - **The `src/router.tsx` "never mentions queryClient" warning is gone.** The root route's declared type replaces the text heuristic; delete any `ignore if you build it elsewhere` note you kept for it.
1059
+ - **Docs: the `motion` peer is `^14.1.0`.** It was exact-pinned at `14.1.0`; any 14.x ≥ 14.1.0 now satisfies it. **Opt-out: none.**
1060
+
1061
+ ## 2.11.1 — lone points, end labels and axis ticks render cleanly
1062
+
1063
+ - **`Lines` draws a lone point.** A series with one finite value (a one-point window, or a value between nulls) drew nothing: a path of one point has no length. It now draws a dot in the series colour, at every isolated finite row (`gaps: 'connect'` bridges the nulls, so only a series with a single finite row is lone there). A point the series' own `getMarker` marks is not doubled. Delete any `getMarker` you added to make a single run visible. **Opt-out: none.**
1064
+ - **`Lines` end labels never clip.** At the `wide` class a label whose room between its last point and the plot's right edge is too small (a last point on the edge cut "Download" to "Downloa") now ends at the point and sits above it. The room is read through the plot's own x mapping (`xDomain`, else the extent of every datum) against an estimated label width (0.85 em per glyph: it errs towards flipping, so a label of the widest capitals can still run long); a string x has no continuous position and keeps the default. Before the engine has measured the plot (the server HTML, the first client frame) the room is taken from the frame, which is wider by the axis gutters, so a label can start on its first frame and flip on the measured one. A label with room is unchanged. **Opt-out: none.**
1065
+ - **Every band Date axis now gets bucket-snapped ticks by default.** `BandStrip`, `MirroredBars`, `Bars` and any other band x of Dates labelled every bucket and let the engine thin the collisions, which left an uneven subset that nearly touched ("18:13 18:17 18:21"). Ticks are now the time scale's own round instants, each snapped to the bucket it falls in (so a label may read 18:13, the bucket nearest 18:15); `xTicks` as a number sets the count. A string band x is unchanged. **Opt-out: pass `xTicks` as an array of the bucket dates to label.**
1066
+ - **The first x tick label no longer sits on the y label.** A tick within 5% of the x domain's start (the first tick of a series whose domain starts on a round instant, or a round tick just inside one that does not) is start-anchored, so at the compact class (gutter y labels) its label stops under the lowest y label instead of centring on the plot's left edge. Later ticks stay centred. **Opt-out: none.**
1067
+ - **`MirroredBars` bars reach both plot edges.** The panes used the padded band scale `Bars` uses (0.1 of a step of outer padding), so the last bar ended a tenth of a step short of the right edge and the first started that far in — 1.2 px at 30 daily buckets on a 390 px phone (0.8 px at 168 hourly buckets on 1440). Bars now sit flush: the first bar's left and the last bar's right edge are the plot's. The gap between bars is unchanged. `BandStrip` already filled the plot (probed at both widths). **Opt-out: none.**
1068
+ - **Docs: only the CURSOR dot reads `getMarker` on consumer `marks`.** The 2.11.0 line "a `CartesianChart` with consumer `marks` can colour the dot" means the cursor dot of a `cursorValue` series, and only its `color`. Always-on per-point markers are `Lines`-only: on consumer `marks`, `getMarker` without `cursorValue` is ignored, so draw a persistent dot in `marks` yourself. The `getMarker` JSDoc and the `basalt-charts` skill say so now.
1069
+
1049
1070
  ## 2.11.0 — Heatmap cells carry a state, a shared x domain, a self-pooling sparkline, visible reference lines
1050
1071
 
1051
1072
  - **`Heatmap`: a position with no datum is inert.** Hovering before the window or after `now` used to snap to the neighbouring row's cell (a tooltip titled with another day's hour); it now opens no tooltip. Positions that hold a datum are unchanged. **Opt-out: none.**
package/README.md CHANGED
@@ -705,6 +705,8 @@ strict flags), `react-app` (`base` + DOM/JSX libs) and `node` (`base` + Node typ
705
705
  { "extends": "basalt-ui/configs/tsconfig.react-app.json" }
706
706
  ```
707
707
 
708
+ `tsc` checks every file in the program with the program's options, so a workspace package imported from source is checked under the preset's flags and no compiler option excludes it. Give each package its own tsconfig and link them with TS project references (`references` + `composite: true`), or consume the package's built `.d.ts`.
709
+
708
710
  `.oxfmtrc.json` has no `extends` of its own — copy `configs/oxfmt.json` verbatim (`basalt-ui init`
709
711
  does this for you).
710
712
 
@@ -18,7 +18,7 @@ paths:
18
18
 
19
19
  ## Provider
20
20
 
21
- - Mount once: `createBasaltRouter({ routeTree })`, then `<BasaltProvider router={router} />`; in a router you do not own (TanStack Start root route) pass `children` instead, with `context.queryClient`. `spotlight={false}` for an app with its own Cmd+K. It owns Mantine, Query, modals, notifications and Spotlight. [type BasaltProvider]
21
+ - Mount once: `createBasaltRouter({ routeTree })`, then `<BasaltProvider router={router} />`; in a router you do not own (TanStack Start root route) pass `children` instead, with `context.queryClient`. `spotlight={false}` for an app with its own Cmd+K. It owns Mantine, Query and notifications; Spotlight mounts once `defineNav`/`defineCommands` ran, `ModalsProvider` (a sibling, no `useModals()` context) once `defineOverlays`/`overlays.confirm` ran. [type BasaltProvider]
22
22
  - Never pass `cssVariablesResolver` to `BasaltProvider`; retune with `theme={createBasaltTheme(...)}`. [type BasaltProvider]
23
23
  - Read and write the color scheme with `useMantineColorScheme()` only. [check-theme localstorage-theme]
24
24
 
@@ -9,7 +9,7 @@ Procedure only; the law is `.claude/rules/basalt-*.md`.
9
9
  ## Scaffold
10
10
 
11
11
  1. `bun add basalt-ui && bunx basalt-ui init` (the only `bunx` call; use `./node_modules/.bin/basalt-ui` after).
12
- 2. Check the seeded `src/main.tsx` (`init` writes it when absent; on a TanStack Start app it seeds none: render `<BasaltProvider><Outlet /></BasaltProvider>` with no `router` in the root route component, `context.queryClient` set in `getRouter()`); `spotlight={false}` drops Basalt's Cmd+K for an app with its own. `basalt-ui/styles.css` is the only stylesheet import:
12
+ 2. Check the seeded `src/main.tsx` (`init` writes it when absent; on a TanStack Start app it seeds none: render `<BasaltProvider><Outlet /></BasaltProvider>` with no `router` in the root route component or a pathless layout, `context.queryClient` set in `getRouter()`); `spotlight={false}` drops Basalt's Cmd+K for an app with its own. `basalt-ui/styles.css` is the only stylesheet import:
13
13
 
14
14
  ```tsx
15
15
  // @check
@@ -34,6 +34,6 @@ const railTop = (plotHeight: number) => Y_MAX - (RAIL_PX * (Y_MAX - Y_MIN)) / pl
34
34
  />
35
35
  ```
36
36
 
37
- 4. Wrap it in `ChartCard`; pass `state={{ pending, error, empty }}` from the query. A `cursorValue` series colours its cursor dot per datum with `getMarker: (d) => ({ color })`.
37
+ 4. Wrap it in `ChartCard`; pass `state={{ pending, error, empty }}` from the query. A `cursorValue` series colours its CURSOR dot per datum with `getMarker: (d) => ({ color })`; always-on markers are `Lines`-only, so a consumer-`marks` chart draws its persistent dots itself.
38
38
  5. Run the repo's own gate (e.g. `make check`), which runs lint, the theme guard and typecheck; fix every finding at its source.
39
39
  6. Check both color schemes and a pending query.
@@ -1 +1 @@
1
- {"version":3,"file":"DualPanel.d.ts","sourceRoot":"","sources":["../../src/charts/DualPanel.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAWzC,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAW,MAAM,SAAS,CAAA;AAcxE,uBAAuB;AACvB,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,IAAI,CACjC,WAAW,CAAC,CAAC,CAAC,EACZ,KAAK,GACL,OAAO,GACP,OAAO,GACP,UAAU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AAM,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,GAAG,SAAS,CAAA;QACvD,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC,GAAG,SAAS,CAAA;QAC5C,uDAAuD;QACvD,aAAa,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC,GAAG,SAAS,CAAA;KACpD,GACD,SAAS,CAAA;IACb;;;OAGG;IACH,WAAW,CAAC,EACR;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,GAC1E,SAAS,CAAA;IACb,GAAG,EAAE,YAAY,CAAC,CAAC,CAAC,CAAA;IACpB,8DAA8D;IAC9D,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CACjC,CAAA;AAiBD,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,MAAM,EAClE,KAAK,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,GAC1B,YAAY,CA6Od"}
@@ -123,6 +123,7 @@ function DualPanel(props) {
123
123
  width,
124
124
  height: h,
125
125
  data,
126
+ xFraction: model.fraction,
126
127
  y2: void 0,
127
128
  yDomain: topDomain,
128
129
  y2Domain: void 0
@@ -1 +1 @@
1
- {"version":3,"file":"Lines.d.ts","sourceRoot":"","sources":["../../src/charts/Lines.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAOzC,OAAO,KAAK,EACV,mBAAmB,EAGnB,MAAM,EAGN,SAAS,EACV,MAAM,SAAS,CAAA;AAOhB,MAAM,MAAM,UAAU,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI,IAAI,CAAC,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG;IAChG;;;OAGG;IACH,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,KAAK,GAAG,SAAS,SAAS,EAAE,CAAA;CACjE,CAAA;AA4CD,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,YAAY,CAgEzF"}
1
+ {"version":3,"file":"Lines.d.ts","sourceRoot":"","sources":["../../src/charts/Lines.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAOzC,OAAO,KAAK,EACV,mBAAmB,EAEnB,MAAM,EAGN,SAAS,EACV,MAAM,SAAS,CAAA;AAEhB,MAAM,MAAM,UAAU,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI,IAAI,CAAC,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG;IAChG;;;OAGG;IACH,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,KAAK,GAAG,SAAS,SAAS,EAAE,CAAA;CACjE,CAAA;AAID,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,YAAY,CA8DzF"}
@@ -2,50 +2,14 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { areaY } from "@tanstack/charts/area";
3
3
  import { differenceY } from "@tanstack/charts/difference";
4
4
  import { decorative } from "@tanstack/charts/mark/decorative";
5
- import { text } from "@tanstack/charts/text";
6
5
  import { useCallback } from "react";
7
- import { VX } from "../tokens/index.js";
8
6
  import { CartesianRung } from "./CartesianChart.js";
9
7
  import { areaGradientId } from "./compile.js";
10
8
  import { chartCurve } from "./curves.js";
11
- import { drawnRows, lineMark, markersOf, yScaleOf } from "./marks.js";
9
+ import { endLabelMarks, endLabelPlan } from "./labels.js";
10
+ import { drawnRows, lineMark, loneDots, markersOf, yScaleOf } from "./marks.js";
12
11
  import { rowX } from "./types.js";
13
- const MAX_END_LABELS = 3;
14
- const END_LABEL_MIN_GAP = 13;
15
- const END_LABEL_DX = 6;
16
12
  const hasValue = (r) => r.y !== null;
17
- function endLabels(plot, lines) {
18
- if (plot.containerClass !== "wide" || plot.y2 !== void 0) return [];
19
- if (lines.length === 0 || lines.length > MAX_END_LABELS) return [];
20
- const last = lines.flatMap((s) => {
21
- const row = plot.rows(s.key).findLast(hasValue);
22
- return row ? [{ s, row }] : [];
23
- });
24
- const domain = plot.yDomain;
25
- const ys = last.map(({ row }) => {
26
- if (row.y === null) return Number.NaN;
27
- return (row.y - domain[0]) / (domain[1] - domain[0] || 1) * plot.height;
28
- });
29
- const sorted = ys.toSorted((a, b) => a - b);
30
- if (sorted.some(
31
- (y, i) => Number.isNaN(y) || i > 0 && y - sorted[i - 1] < END_LABEL_MIN_GAP
32
- ))
33
- return [];
34
- return last.map(
35
- ({ s, row }) => decorative(
36
- text([row], {
37
- id: `${s.key}-end-label`,
38
- x: rowX,
39
- y: "y",
40
- text: () => s.label,
41
- fill: s.color,
42
- fontSize: VX.text.micro,
43
- anchor: "start",
44
- dx: END_LABEL_DX
45
- })
46
- )
47
- );
48
- }
49
13
  function Lines(props) {
50
14
  const { thresholds, ...rest } = props;
51
15
  const { series } = props;
@@ -94,15 +58,13 @@ function Lines(props) {
94
58
  );
95
59
  }
96
60
  for (const s of plot.visible) {
61
+ const yScale = yScaleOf(plot, s);
97
62
  out.push(lineMark(plot, s));
98
- out.push(...markersOf(s, plot.rows(s.key), yScaleOf(plot, s)));
63
+ out.push(...loneDots(s, drawnRows(plot, s), yScale, plot.highlighted));
64
+ out.push(...markersOf(s, plot.rows(s.key), yScale));
99
65
  }
100
- out.push(
101
- ...endLabels(
102
- plot,
103
- plotted.filter((s) => s.role !== "reference")
104
- )
105
- );
66
+ const labelled = plotted.filter((s) => s.role !== "reference");
67
+ out.push(...endLabelMarks(endLabelPlan(plot, labelled)));
106
68
  return out;
107
69
  },
108
70
  [series, thresholds]
@@ -76,7 +76,7 @@ function MirroredBars(props) {
76
76
  Math.floor(width / (foldConfig.minBandPx ?? DEFAULT_MIN_BAND_PX)),
77
77
  foldConfig.merge
78
78
  ) : data;
79
- const model = xScaleFor(drawn.map(x), true);
79
+ const model = xScaleFor(drawn.map(x), "flush");
80
80
  const visible = visibleSeries(bars, hidden);
81
81
  const absentOn = !absentEntry || visible.includes(absentEntry);
82
82
  const absentFill = absentEntry ? alpha(absentEntry.color, absentEntry.fillOpacity ?? 1) : VX.neutral;
@@ -86,7 +86,7 @@ function MirroredBars(props) {
86
86
  const upMax = paneMax(up, upSeries, drawn, upOn);
87
87
  const downMax = paneMax(down, downSeries, drawn, downOn);
88
88
  const bandWidth = 2 * model.halfStep * BAND_FILL;
89
- const bandScale = () => xScaleFor(drawn.map(x), true).scale;
89
+ const bandScale = () => xScaleFor(drawn.map(x), "flush").scale;
90
90
  const pane = (side, cfg, s, on, max) => ({ width: w, height: h }) => {
91
91
  const cls = resolveContainerClass(w);
92
92
  const whole = chartHeightOf(h, side === "up" ? upFraction : 1 - upFraction, 0);
@@ -1 +1 @@
1
- {"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../src/charts/compile.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAEV,aAAa,EAEb,yBAAyB,EACzB,eAAe,IAAI,gBAAgB,EACnC,UAAU,EACV,yBAAyB,EAE1B,MAAM,6BAA6B,CAAA;AAIpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAI5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAG/C,OAAO,KAAK,EAAE,W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CAAC,EAAE,OAAO,CAAC,CA8BvD;AAED,+FAA+F;AAC/F,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM,KAAG,MAAgC,CAAA;AAE/E,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,aAAa,CAYxE;AAKD;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,SAAS,QAAQ,EAAE,EAC1B,MAAM,EAAE,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,GACjC,aAAa,GAAG,IAAI,CAuBtB;AAqbD,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,EAClD,KAAK,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,GAC1B,mBAAmB,CA0ErB"}
@@ -11,6 +11,7 @@ import { fmtCompact } from "../format/number.js";
11
11
  import { VX } from "../tokens/index.js";
12
12
  import { cursorBinding, sourceOnlyFocus } from "./cursor.js";
13
13
  import { cursorDots } from "./marks.js";
14
+ import { bucketTicks, strideEvery } from "./ticks.js";
14
15
  import { MAIN_PANE, plotAccess, plotContext } from "./plot-context.js";
15
16
  import { resolveContainerClass } from "../tokens/size-classes.js";
16
17
  import { resolveYDomain, xScaleFor, xZoneFractions, yScaleFor } from "./scales.js";
@@ -22,6 +23,7 @@ const LADDER = {
22
23
  wide: { font: VX.text.micro, xTicks: 6, yTicks: 5 }
23
24
  };
24
25
  const INSIDE_LABEL_DX = 4;
26
+ const LEFT_EDGE_SHARE = 0.05;
25
27
  const INSIDE_LABEL_DY = -6;
26
28
  const labelsInside = (cls, height) => cls === "compact" && height > 0 && height < SHORT_CHART_HEIGHT;
27
29
  function defaultNumberFormat(v) {
@@ -128,8 +130,16 @@ function yGuide(opts) {
128
130
  }
129
131
  };
130
132
  }
133
+ function bucketDates(model) {
134
+ if (!model.band || model.kind !== "date") return null;
135
+ const dates = model.values.filter((v) => v instanceof Date);
136
+ return dates.length === model.values.length ? dates : null;
137
+ }
131
138
  function xTickPolicy(model, xTicks) {
132
139
  if (typeof xTicks === "object") return { values: xTicks };
140
+ const buckets = typeof xTicks === "number" && Number.isFinite(xTicks) ? bucketDates(model) : null;
141
+ if (buckets !== null && typeof xTicks === "number")
142
+ return { values: bucketTicks(buckets, xTicks) };
133
143
  if (model.band || model.kind === "string") return { values: model.values };
134
144
  if (model.kind === "date" && model.extent)
135
145
  return {
@@ -138,14 +148,14 @@ function xTickPolicy(model, xTicks) {
138
148
  return { count: xTicks };
139
149
  }
140
150
  function strideTicks(values, cls) {
141
- const stride = Math.max(1, Math.ceil(values.length / LADDER[cls].xTicks));
142
- return values.filter((_, i) => i % stride === 0);
151
+ return strideEvery(values, LADDER[cls].xTicks);
143
152
  }
144
153
  function xGuide(opts) {
145
154
  const { model, xTicks, format, cls, height } = opts;
146
155
  const ladder = LADDER[cls];
147
156
  const inside = labelsInside(cls, height);
148
157
  const ticks = xTickPolicy(model, xTicks ?? ladder.xTicks);
158
+ const [leftEdgeX, spanX] = !model.band && model.extent ? [model.extent[0], model.extent[1] - model.extent[0]] : [Number.NaN, Number.NaN];
149
159
  return {
150
160
  axis: {
151
161
  line: AXIS_LINE,
@@ -154,9 +164,14 @@ function xGuide(opts) {
154
164
  fontSize: ladder.font,
155
165
  opacity: 1,
156
166
  thin: true,
157
- // A locked-zero left margin (inside labels) must not clip the first label.
158
- ...inside && {
159
- anchor: ({ index }) => index === 0 ? "start" : void 0
167
+ // A label centred on a tick near the plot's left edge hangs left of it, under the gutter's
168
+ // lowest y label (outside labels) or off the plot (inside labels, left margin locked to
169
+ // zero): start-anchor it. `+value` is a Date's timestamp, or the number itself.
170
+ anchor: ({ index, value }) => {
171
+ const pinnedFirst = inside && index === 0;
172
+ const share = (+value - leftEdgeX) / spanX;
173
+ const onLeftEdge = share >= 0 && share <= LEFT_EDGE_SHARE;
174
+ return pinnedFirst || onLeftEdge ? "start" : void 0;
160
175
  }
161
176
  }
162
177
  }
@@ -539,6 +554,7 @@ function compileCartesian(input) {
539
554
  width,
540
555
  height,
541
556
  data: input.data,
557
+ xFraction: model.fraction,
542
558
  y2: axes.right ? "y2" : void 0,
543
559
  yDomain: axes.left.domain,
544
560
  y2Domain: axes.right?.domain
@@ -0,0 +1,34 @@
1
+ import type { ChartMarks, ChartSeries, ChartX, PlotContext, PlotRow } from './types.js';
2
+ export type EndLabelAnchor = 'start' | 'end';
3
+ /**
4
+ * The side of its point an end label takes: `start` (right of the point) unless the point leaves
5
+ * less room than the label needs. `fraction` is the point's x as a share of the plot width,
6
+ * `plotWidth` the plot in px. Before the engine has measured the plot, `plotWidth` is the frame's,
7
+ * which is wider than the plot by the axis gutters: the first frame can keep `start` for a label
8
+ * the measured frame then flips.
9
+ */
10
+ export declare function endLabelAnchor(opts: {
11
+ fraction: number;
12
+ plotWidth: number;
13
+ label: string;
14
+ fontSize: number;
15
+ }): EndLabelAnchor;
16
+ export type EndLabel<T, X extends ChartX> = {
17
+ series: ChartSeries<T>;
18
+ row: PlotRow<T, X>;
19
+ anchor: EndLabelAnchor;
20
+ };
21
+ /**
22
+ * The end labels to draw: none off the wide class, with a right axis, with more than
23
+ * {@link MAX_END_LABELS} lines, or when two would collide in pixels (against the plot's height).
24
+ * A series whose last point the plot's own x scale cannot place, or places outside the plot
25
+ * (`plot.xFraction` outside [0, 1]: clipped by a narrower `xDomain`), has no label.
26
+ */
27
+ export declare function endLabelPlan<T, X extends ChartX>(plot: PlotContext<T, X>, lines: readonly ChartSeries<T>[]): EndLabel<T, X>[];
28
+ /** The offset of a label from its point: right of it, level; or left of it and above. */
29
+ export declare function endLabelOffset(anchor: EndLabelAnchor): {
30
+ dx: number;
31
+ dy: number;
32
+ };
33
+ export declare function endLabelMarks<T, X extends ChartX>(plan: readonly EndLabel<T, X>[]): ChartMarks;
34
+ //# sourceMappingURL=labels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"labels.d.ts","sourceRoot":"","sources":["../../src/charts/labels.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAgBpF,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,KAAK,CAAA;AAE5C;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE;IACnC,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;CACjB,GAAG,cAAc,CAIjB;AAED,MAAM,MAAM,QAAQ,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,IAAI;IAC1C,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,CAAA;IACtB,GAAG,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IAClB,MAAM,EAAE,cAAc,CAAA;CACvB,CAAA;AASD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,EAC9C,IAAI,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,EACvB,KAAK,EAAE,SAAS,WAAW,CAAC,CAAC,CAAC,EAAE,GAC/B,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CA2BlB;AAED,yFAAyF;AACzF,wBAAgB,cAAc,CAAC,MAAM,EAAE,cAAc,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAIjF;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,EAAE,IAAI,EAAE,SAAS,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,UAAU,CAe9F"}
@@ -0,0 +1,63 @@
1
+ import { decorative } from "@tanstack/charts/mark/decorative";
2
+ import { text } from "@tanstack/charts/text";
3
+ import { VX } from "../tokens/index.js";
4
+ import { rowX } from "./types.js";
5
+ const MAX_END_LABELS = 3;
6
+ const END_LABEL_MIN_GAP = 13;
7
+ const END_LABEL_DX = 6;
8
+ const END_LABEL_GLYPH_EM = 0.85;
9
+ const END_LABEL_FLIP_DY = -9;
10
+ function endLabelAnchor(opts) {
11
+ const { fraction, plotWidth, label, fontSize } = opts;
12
+ const room = (1 - fraction) * plotWidth;
13
+ return room >= label.length * fontSize * END_LABEL_GLYPH_EM + END_LABEL_DX ? "start" : "end";
14
+ }
15
+ function endLabelPlan(plot, lines) {
16
+ if (plot.containerClass !== "wide" || plot.y2 !== void 0) return [];
17
+ if (lines.length === 0 || lines.length > MAX_END_LABELS) return [];
18
+ const last = lines.flatMap((series) => {
19
+ const row = plot.rows(series.key).findLast((r) => r.y !== null);
20
+ if (row === void 0 || row.y === null) return [];
21
+ const fraction = plot.xFraction(row.x);
22
+ if (fraction === null || fraction < 0 || fraction > 1) return [];
23
+ return [{ series, row, y: row.y, fraction }];
24
+ });
25
+ const [lo, hi] = plot.yDomain;
26
+ const ys = last.map(({ y }) => (y - lo) / (hi - lo || 1) * plot.plotHeight).toSorted((a, b) => a - b);
27
+ if (ys.some((y, i) => i > 0 && y - ys[i - 1] < END_LABEL_MIN_GAP)) return [];
28
+ return last.map(({ series, row, fraction }) => ({
29
+ series,
30
+ row,
31
+ anchor: endLabelAnchor({
32
+ fraction,
33
+ plotWidth: plot.plotWidth,
34
+ label: series.label,
35
+ fontSize: VX.text.micro
36
+ })
37
+ }));
38
+ }
39
+ function endLabelOffset(anchor) {
40
+ return anchor === "end" ? { dx: -END_LABEL_DX, dy: END_LABEL_FLIP_DY } : { dx: END_LABEL_DX, dy: 0 };
41
+ }
42
+ function endLabelMarks(plan) {
43
+ return plan.map(
44
+ ({ series, row, anchor }) => decorative(
45
+ text([row], {
46
+ id: `${series.key}-end-label`,
47
+ x: rowX,
48
+ y: "y",
49
+ text: () => series.label,
50
+ fill: series.color,
51
+ fontSize: VX.text.micro,
52
+ anchor,
53
+ ...endLabelOffset(anchor)
54
+ })
55
+ )
56
+ );
57
+ }
58
+ export {
59
+ endLabelAnchor,
60
+ endLabelMarks,
61
+ endLabelOffset,
62
+ endLabelPlan
63
+ };
@@ -7,6 +7,13 @@ export declare function emphasis<T>(highlighted: string | null, s: Pick<ChartSer
7
7
  /** The rows a series' line and area are drawn through: all of them, or only the non-null ones. */
8
8
  export declare function drawnRows<T, X extends ChartX>(plot: PlotContext<T, X>, s: Pick<ChartSeries<T>, 'key' | 'gaps'>): PlotRow<T, X>[];
9
9
  export declare function lineMark<T, X extends ChartX>(plot: PlotContext<T, X>, s: ChartSeries<T>): ChartMarks[number];
10
+ /**
11
+ * The dot for a point a line cannot draw: a finite value with no finite neighbour in `drawn` (the
12
+ * rows the line is drawn through: a one-point window, or a value between nulls). A path of one
13
+ * point has no length, so without this the series is invisible. One mark per series. A point the
14
+ * series' own `getMarker` already marks is left to it.
15
+ */
16
+ export declare function loneDots<T, X extends ChartX>(s: ChartSeries<T>, drawn: readonly PlotRow<T, X>[], yScale: 'y2' | undefined, highlighted: string | null): ChartMarks;
10
17
  /** A series' `getMarker` points as dots: one decorative mark per distinct paint. */
11
18
  export declare function markersOf<T, X extends ChartX>(s: ChartSeries<T>, rows: readonly PlotRow<T, X>[], yScale: 'y2' | undefined): ChartMarks;
12
19
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"marks.d.ts","sourceRoot":"","sources":["../../src/charts/marks.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAQvD,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEpF,0FAA0F;AAC1F,wBAAgB,QAAQ,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,EAC1C,IAAI,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,EACvB,CAAC,EAAE,IAAI,C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AAE,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,EAC7D,IAAI,EAAE,SAAS,CAAC,EAAE,EAClB,KAAK,EAAE,MAAM,EACb,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,GACrB,CAAC,EAAE,CA+CL"}
@@ -31,6 +31,27 @@ function lineMark(plot, s) {
31
31
  ...yScale !== void 0 && { yScale }
32
32
  });
33
33
  }
34
+ const isFinitePoint = (r) => r !== void 0 && r.y !== null && Number.isFinite(r.y);
35
+ const LONE_DOT_STROKE_FACTOR = 1.25;
36
+ function loneDots(s, drawn, yScale, highlighted) {
37
+ const lone = drawn.filter(
38
+ (r, i) => isFinitePoint(r) && !isFinitePoint(drawn[i - 1]) && !isFinitePoint(drawn[i + 1]) && !s.getMarker?.(r.datum)
39
+ );
40
+ if (lone.length === 0) return [];
41
+ return [
42
+ decorative(
43
+ dot(lone, {
44
+ id: `${s.key}-lone`,
45
+ x: rowX,
46
+ y: "y",
47
+ r: Math.max(VX.dotR - 1, (s.strokeWidth ?? LINE_STROKE_WIDTH) * LONE_DOT_STROKE_FACTOR),
48
+ fill: s.color,
49
+ fillOpacity: (s.strokeOpacity ?? 1) * emphasis(highlighted, s),
50
+ ...yScale !== void 0 && { yScale }
51
+ })
52
+ )
53
+ ];
54
+ }
34
55
  function markersOf(s, rows, yScale) {
35
56
  const getMarker = s.getMarker;
36
57
  if (!getMarker) return [];
@@ -158,6 +179,7 @@ export {
158
179
  drawnRows,
159
180
  emphasis,
160
181
  lineMark,
182
+ loneDots,
161
183
  markersOf,
162
184
  thinFill,
163
185
  yScaleOf
@@ -38,7 +38,10 @@ export type XScaleModel<X extends ChartX> = {
38
38
  extent?: readonly [number, number];
39
39
  step: number;
40
40
  };
41
- export declare function xScaleFor<X extends ChartX>(raw: readonly X[], band: boolean,
41
+ export declare function xScaleFor<X extends ChartX>(raw: readonly X[],
42
+ /** `'flush'`: a band scale with no outer padding, so the first and last band meet the plot's
43
+ * edges (`MirroredBars`); `true` pads half a gap-and-a-bit at each end, as `Bars` does. */
44
+ band: boolean | 'flush',
42
45
  /** Continuous scales only: the explicit `[min, max]` that replaces the data's own extent. */
43
46
  xDomain?: readonly [X, X]): XScaleModel<X>;
44
47
  /** An x-zone's [left, right] as plot fractions, clamped to the plot; `null` when it is empty. */
@@ -1 +1 @@
1
- {"version":3,"file":"scales.d.ts","sourceRoot":"","sources":["../../src/charts/scales.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAA;AAE5D,OAAO,EAAE,QAAQ,EAAY,MAAM,UAAU,CAAA;AAC7C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAC5E,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAIzE,gGAAgG;AAChG,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAGnE;AAED,mGAAmG;AACnG,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAGnE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAC9B,GAAG,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,SAAS,EAC9B,IAAI,EAAE,SAAS,CAAC,EAAE,EAClB,MAAM,EAAE,SAAS,WAAW,CAAC,CAAC,CAAC,EAAE,EACjC,WAAW,GAAE,SAAS,MAAM,EAAO,GAClC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAiC3B;AAED,2DAA2D;AAC3D,wBAAgB,SAAS,CAAC,CAAC,EACzB,GAAG,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,SAAS,EAC9B,MAAM,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,GAChC,UAAU,CAAC,OAAO,WAAW,CAAC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