basalt-ui 1.14.0 → 1.16.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 (176) hide show
  1. package/AGENTS.md +1 -1
  2. package/CHANGELOG.md +15 -0
  3. package/README.md +38 -2
  4. package/agent/rules/basalt-charts.md +279 -108
  5. package/agent/rules/basalt-mantine.md +4 -2
  6. package/agent/skills/basalt-charts/SKILL.md +114 -64
  7. package/agent/skills/basalt-design/SKILL.md +4 -3
  8. package/agent/templates/CLAUDE-block.md.tpl +9 -6
  9. package/configs/oxlint-plugin.js +152 -0
  10. package/configs/oxlint-plugin.test.ts +107 -0
  11. package/configs/oxlint.json +2 -0
  12. package/dist/charts/cursor/resolve.d.ts +33 -0
  13. package/dist/charts/cursor/resolve.d.ts.map +1 -0
  14. package/dist/charts/cursor/resolve.js +61 -0
  15. package/dist/charts/cursor/resolve.test.d.ts +2 -0
  16. package/dist/charts/cursor/resolve.test.d.ts.map +1 -0
  17. package/dist/charts/cursor/scope.d.ts +17 -0
  18. package/dist/charts/cursor/scope.d.ts.map +1 -0
  19. package/dist/charts/cursor/scope.js +20 -0
  20. package/dist/charts/cursor/store.d.ts +31 -0
  21. package/dist/charts/cursor/store.d.ts.map +1 -0
  22. package/dist/charts/cursor/store.js +25 -0
  23. package/dist/charts/cursor/store.test.d.ts +2 -0
  24. package/dist/charts/cursor/store.test.d.ts.map +1 -0
  25. package/dist/charts/hooks/useChartCursor.d.ts +39 -0
  26. package/dist/charts/hooks/useChartCursor.d.ts.map +1 -0
  27. package/dist/charts/hooks/useChartCursor.js +104 -0
  28. package/dist/charts/hooks/useChartSize.d.ts +8 -4
  29. package/dist/charts/hooks/useChartSize.d.ts.map +1 -1
  30. package/dist/charts/index.d.ts +16 -13
  31. package/dist/charts/index.d.ts.map +1 -1
  32. package/dist/charts/index.js +38 -19
  33. package/dist/charts/kinds/Bars.d.ts +45 -54
  34. package/dist/charts/kinds/Bars.d.ts.map +1 -1
  35. package/dist/charts/kinds/Bars.js +235 -392
  36. package/dist/charts/kinds/Bars.test.d.ts +2 -0
  37. package/dist/charts/kinds/Bars.test.d.ts.map +1 -0
  38. package/dist/charts/kinds/Donut.d.ts +5 -4
  39. package/dist/charts/kinds/Donut.d.ts.map +1 -1
  40. package/dist/charts/kinds/Donut.js +17 -14
  41. package/dist/charts/kinds/DualPanel.d.ts +13 -0
  42. package/dist/charts/kinds/DualPanel.d.ts.map +1 -1
  43. package/dist/charts/kinds/DualPanel.js +185 -92
  44. package/dist/charts/kinds/DualPanel.test.d.ts +2 -0
  45. package/dist/charts/kinds/DualPanel.test.d.ts.map +1 -0
  46. package/dist/charts/kinds/Heatmap.d.ts +15 -11
  47. package/dist/charts/kinds/Heatmap.d.ts.map +1 -1
  48. package/dist/charts/kinds/Heatmap.js +38 -22
  49. package/dist/charts/kinds/MultiLine.d.ts +27 -35
  50. package/dist/charts/kinds/MultiLine.d.ts.map +1 -1
  51. package/dist/charts/kinds/MultiLine.js +122 -235
  52. package/dist/charts/kinds/MultiLine.test.d.ts +2 -0
  53. package/dist/charts/kinds/MultiLine.test.d.ts.map +1 -0
  54. package/dist/charts/kinds/StackedArea.d.ts +21 -10
  55. package/dist/charts/kinds/StackedArea.d.ts.map +1 -1
  56. package/dist/charts/kinds/StackedArea.js +74 -132
  57. package/dist/charts/kinds/ZonedLine.d.ts +24 -40
  58. package/dist/charts/kinds/ZonedLine.d.ts.map +1 -1
  59. package/dist/charts/kinds/ZonedLine.js +104 -184
  60. package/dist/charts/kinds/ZonedLine.test.d.ts +2 -0
  61. package/dist/charts/kinds/ZonedLine.test.d.ts.map +1 -0
  62. package/dist/charts/layout/auto-margin.d.ts +60 -0
  63. package/dist/charts/layout/auto-margin.d.ts.map +1 -0
  64. package/dist/charts/layout/auto-margin.js +37 -0
  65. package/dist/charts/layout/auto-margin.test.d.ts +2 -0
  66. package/dist/charts/layout/auto-margin.test.d.ts.map +1 -0
  67. package/dist/charts/primitives/CartesianChart.d.ts +161 -0
  68. package/dist/charts/primitives/CartesianChart.d.ts.map +1 -0
  69. package/dist/charts/primitives/CartesianChart.js +359 -0
  70. package/dist/charts/primitives/CartesianChart.test.d.ts +2 -0
  71. package/dist/charts/primitives/CartesianChart.test.d.ts.map +1 -0
  72. package/dist/charts/primitives/ChartFrame.d.ts +16 -5
  73. package/dist/charts/primitives/ChartFrame.d.ts.map +1 -1
  74. package/dist/charts/primitives/ChartFrame.js +17 -2
  75. package/dist/charts/primitives/ChartLegend.d.ts +15 -1
  76. package/dist/charts/primitives/ChartLegend.d.ts.map +1 -1
  77. package/dist/charts/primitives/ChartLegend.js +25 -3
  78. package/dist/charts/primitives/ChartLegend.test.d.ts +2 -0
  79. package/dist/charts/primitives/ChartLegend.test.d.ts.map +1 -0
  80. package/dist/charts/primitives/ChartTooltip.d.ts +16 -16
  81. package/dist/charts/primitives/ChartTooltip.d.ts.map +1 -1
  82. package/dist/charts/primitives/ChartTooltip.js +45 -19
  83. package/dist/charts/primitives/HoverOverlay.d.ts +19 -4
  84. package/dist/charts/primitives/HoverOverlay.d.ts.map +1 -1
  85. package/dist/charts/primitives/HoverOverlay.js +22 -1
  86. package/dist/charts/primitives/XZoneRects.d.ts +54 -0
  87. package/dist/charts/primitives/XZoneRects.d.ts.map +1 -0
  88. package/dist/charts/primitives/XZoneRects.js +65 -0
  89. package/dist/charts/primitives/XZoneRects.test.d.ts +2 -0
  90. package/dist/charts/primitives/XZoneRects.test.d.ts.map +1 -0
  91. package/dist/charts/series.d.ts +28 -3
  92. package/dist/charts/series.d.ts.map +1 -1
  93. package/dist/charts/series.js +5 -2
  94. package/dist/charts/series.test.d.ts +2 -0
  95. package/dist/charts/series.test.d.ts.map +1 -0
  96. package/dist/charts/utils/measure-text.d.ts +25 -0
  97. package/dist/charts/utils/measure-text.d.ts.map +1 -0
  98. package/dist/charts/utils/measure-text.js +64 -0
  99. package/dist/charts/utils/measure-text.test.d.ts +2 -0
  100. package/dist/charts/utils/measure-text.test.d.ts.map +1 -0
  101. package/dist/content/fence-block.d.ts.map +1 -1
  102. package/dist/surfaces.d.ts +1 -1
  103. package/dist/surfaces.d.ts.map +1 -1
  104. package/dist/surfaces.js +1 -1
  105. package/dist/tokens/chart-margin.test.d.ts +2 -0
  106. package/dist/tokens/chart-margin.test.d.ts.map +1 -0
  107. package/dist/tokens/index.d.ts +29 -0
  108. package/dist/tokens/index.d.ts.map +1 -1
  109. package/dist/tokens/index.js +10 -0
  110. package/dist/tokens/palette.d.ts +4 -0
  111. package/dist/tokens/palette.d.ts.map +1 -1
  112. package/dist/tokens/palette.js +3 -0
  113. package/llms.txt +3 -3
  114. package/package.json +1 -1
  115. package/src/charts/cursor/resolve.test.ts +61 -0
  116. package/src/charts/cursor/resolve.ts +102 -0
  117. package/src/charts/cursor/scope.tsx +32 -0
  118. package/src/charts/cursor/store.test.ts +46 -0
  119. package/src/charts/cursor/store.ts +53 -0
  120. package/src/charts/hooks/useChartCursor.ts +163 -0
  121. package/src/charts/hooks/useChartSize.ts +8 -4
  122. package/src/charts/index.ts +35 -14
  123. package/src/charts/kinds/Bars.test.tsx +98 -0
  124. package/src/charts/kinds/Bars.tsx +350 -467
  125. package/src/charts/kinds/Donut.tsx +31 -23
  126. package/src/charts/kinds/DualPanel.test.tsx +131 -0
  127. package/src/charts/kinds/DualPanel.tsx +301 -135
  128. package/src/charts/kinds/Heatmap.tsx +72 -47
  129. package/src/charts/kinds/MultiLine.test.tsx +37 -0
  130. package/src/charts/kinds/MultiLine.tsx +171 -290
  131. package/src/charts/kinds/StackedArea.tsx +116 -175
  132. package/src/charts/kinds/ZonedLine.test.tsx +37 -0
  133. package/src/charts/kinds/ZonedLine.tsx +149 -255
  134. package/src/charts/layout/auto-margin.test.ts +42 -0
  135. package/src/charts/layout/auto-margin.ts +110 -0
  136. package/src/charts/primitives/CartesianChart.test.tsx +160 -0
  137. package/src/charts/primitives/CartesianChart.tsx +598 -0
  138. package/src/charts/primitives/ChartFrame.test.tsx +33 -0
  139. package/src/charts/primitives/ChartFrame.tsx +40 -4
  140. package/src/charts/primitives/ChartLegend.test.tsx +78 -0
  141. package/src/charts/primitives/ChartLegend.tsx +52 -2
  142. package/src/charts/primitives/ChartTooltip.tsx +67 -37
  143. package/src/charts/primitives/HoverOverlay.tsx +39 -3
  144. package/src/charts/primitives/XZoneRects.test.tsx +123 -0
  145. package/src/charts/primitives/XZoneRects.tsx +132 -0
  146. package/src/charts/series.test.ts +112 -0
  147. package/src/charts/series.ts +33 -5
  148. package/src/charts/utils/measure-text.test.ts +36 -0
  149. package/src/charts/utils/measure-text.ts +109 -0
  150. package/src/content/fence-block.tsx +2 -3
  151. package/src/surfaces.ts +2 -1
  152. package/src/theme/spacing.test.ts +2 -0
  153. package/src/tokens/chart-margin.test.ts +39 -0
  154. package/src/tokens/density.test.ts +1 -0
  155. package/src/tokens/index.ts +36 -0
  156. package/src/tokens/palette.ts +3 -0
  157. package/dist/charts/hooks/useChartTooltip.d.ts +0 -13
  158. package/dist/charts/hooks/useChartTooltip.d.ts.map +0 -1
  159. package/dist/charts/hooks/useChartTooltip.js +0 -26
  160. package/dist/charts/hooks/useHoverSync.d.ts +0 -46
  161. package/dist/charts/hooks/useHoverSync.d.ts.map +0 -1
  162. package/dist/charts/hooks/useHoverSync.js +0 -75
  163. package/dist/charts/hover-context.d.ts +0 -21
  164. package/dist/charts/hover-context.d.ts.map +0 -1
  165. package/dist/charts/hover-context.js +0 -12
  166. package/dist/charts/hover-sync.d.ts +0 -14
  167. package/dist/charts/hover-sync.d.ts.map +0 -1
  168. package/dist/charts/hover-sync.js +0 -17
  169. package/dist/charts/primitives/ResponsiveChart.d.ts +0 -45
  170. package/dist/charts/primitives/ResponsiveChart.d.ts.map +0 -1
  171. package/dist/charts/primitives/ResponsiveChart.js +0 -24
  172. package/src/charts/hooks/useChartTooltip.ts +0 -31
  173. package/src/charts/hooks/useHoverSync.ts +0 -152
  174. package/src/charts/hover-context.ts +0 -28
  175. package/src/charts/hover-sync.tsx +0 -37
  176. package/src/charts/primitives/ResponsiveChart.tsx +0 -64
@@ -1,216 +1,136 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { curveMonotoneX } from "@visx/curve";
3
- import { GridRows } from "@visx/grid";
4
- import { Group } from "@visx/group";
5
- import { scaleLinear, scalePoint } from "@visx/scale";
6
3
  import { AreaClosed, LinePath } from "@visx/shape";
7
4
  import { Threshold } from "@visx/threshold";
8
5
  import { memo, useMemo } from "react";
9
6
  import { AreaGradient, areaFillUrl } from "../primitives/AreaGradient.js";
10
- import { AxisBottomDate, AxisLeftNumeric } from "../primitives/Axes.js";
11
- import {
12
- ChartTooltip,
13
- TooltipBody,
14
- TooltipHeader,
15
- TooltipRow,
16
- useTooltipStyles
17
- } from "../primitives/ChartTooltip.js";
18
- import { ChartFrame, resolveLegend } from "../primitives/ChartFrame.js";
19
- import { Crosshair, SeriesDot } from "../primitives/Crosshair.js";
20
- import { HoverOverlay } from "../primitives/HoverOverlay.js";
21
- import { ZoneRects } from "../primitives/ZoneRects.js";
22
- import { useHoverSync } from "../hooks/useHoverSync.js";
23
- import { deriveTooltipRows, LINE_OVERLAY_STROKE_WIDTH } from "../series.js";
7
+ import { CartesianChart } from "../primitives/CartesianChart.js";
8
+ import { LINE_OVERLAY_STROKE_WIDTH } from "../series.js";
24
9
  import { VX } from "../../tokens/index.js";
25
- import { padAutoLower } from "../utils/domain.js";
26
- import { smartTicks, smartTicksEvery } from "../utils/ticks.js";
10
+ function validPoints(series, data) {
11
+ if (!series) return [];
12
+ const out = [];
13
+ for (const d of data) {
14
+ const y = series.getValue(d);
15
+ if (y !== null && y !== void 0 && !Number.isNaN(y)) {
16
+ out.push(Object.assign({}, d, { __y: y }));
17
+ }
18
+ }
19
+ return out;
20
+ }
27
21
  function ZonedLineInner(props) {
28
- const { series, chartId, height, legend, ariaLabel, isPending } = props;
22
+ const {
23
+ data,
24
+ chartId,
25
+ getX,
26
+ series,
27
+ y,
28
+ zones,
29
+ xZones,
30
+ thresholds,
31
+ refLines,
32
+ xTicks,
33
+ tooltip,
34
+ areaFill,
35
+ height,
36
+ legend,
37
+ ariaLabel,
38
+ isPending
39
+ } = props;
29
40
  const styledSeries = useMemo(
30
- () => series.map((s) => ({ ...s, strokeWidth: s.strokeWidth ?? LINE_OVERLAY_STROKE_WIDTH })),
41
+ () => series.map((s) => ({
42
+ ...s,
43
+ strokeWidth: s.strokeWidth ?? LINE_OVERLAY_STROKE_WIDTH
44
+ })),
31
45
  [series]
32
46
  );
33
47
  return /* @__PURE__ */ jsx(
34
- ChartFrame,
48
+ CartesianChart,
35
49
  {
36
- series: styledSeries,
50
+ data,
37
51
  chartId,
52
+ getX,
53
+ series: styledSeries,
54
+ ...y !== void 0 && { y },
55
+ ...zones !== void 0 && { zones },
56
+ ...xZones !== void 0 && { xZones },
57
+ ...refLines !== void 0 && { refLines },
58
+ ...xTicks !== void 0 && { xTicks },
59
+ ...tooltip !== void 0 && { tooltip },
38
60
  ...height !== void 0 && { height },
61
+ ...legend !== void 0 && { legend },
39
62
  ...ariaLabel !== void 0 && { ariaLabel },
40
63
  ...isPending !== void 0 && { isPending },
41
- legend: resolveLegend(legend),
42
- children: (plot) => /* @__PURE__ */ jsx(ZonedLinePlot, { ...props, series: styledSeries, plot })
64
+ children: (ctx) => /* @__PURE__ */ jsx(
65
+ ZonedLineMarks,
66
+ {
67
+ getX,
68
+ chartId,
69
+ thresholds: thresholds ?? [],
70
+ areaFill,
71
+ ctx
72
+ }
73
+ )
43
74
  }
44
75
  );
45
76
  }
46
- function ZonedLinePlot(props) {
47
- const {
48
- data,
49
- chartId,
50
- getX,
51
- series,
52
- yDomain,
53
- yAutoPad = 1.1,
54
- yAutoMaxFloor,
55
- yAutoMinCeil = 0,
56
- zones = [],
57
- thresholds = [],
58
- refLines = [],
59
- numTicksY = 5,
60
- numTicksX,
61
- tooltipLabel,
62
- formatValue,
63
- renderExtraTooltipRows,
64
- areaFill,
65
- plot
66
- } = props;
67
- const primary = series[0];
68
- const MARGIN = VX.margin;
69
- const xMax = plot.width - MARGIN.left - MARGIN.right;
70
- const yMax = plot.height - MARGIN.top - MARGIN.bottom;
77
+ function ZonedLineMarks({
78
+ getX,
79
+ chartId,
80
+ thresholds,
81
+ areaFill,
82
+ ctx
83
+ }) {
84
+ const { data, visible, xScale, yScale, yMax } = ctx;
85
+ const primary = visible[0];
86
+ const valid = useMemo(() => validPoints(primary, data), [primary, data]);
71
87
  const showArea = areaFill !== void 0 && areaFill !== false;
72
88
  const areaColor = typeof areaFill === "string" ? areaFill : primary?.color;
73
89
  const areaId = `${chartId}-area`;
74
- const valid = useMemo(() => {
75
- const out = [];
76
- for (const d of data) {
77
- const y = primary?.getValue(d) ?? null;
78
- if (y !== null && y !== void 0 && !Number.isNaN(y)) {
79
- out.push(Object.assign({}, d, { __y: y }));
80
- }
81
- }
82
- return out;
83
- }, [data, primary]);
84
- const xScale = useMemo(
85
- () => scalePoint({
86
- // Full calendar — axis does not compress across nulls.
87
- domain: data.map(getX),
88
- range: [0, xMax],
89
- padding: 0.3
90
- }),
91
- [data, xMax, getX]
92
- );
93
- const yScale = useMemo(() => {
94
- if (yDomain === "auto") {
95
- const ys = valid.map((d) => d.__y);
96
- const dataMax = ys.length ? Math.max(...ys) : 0;
97
- const dataMin = ys.length ? Math.min(...ys) : 0;
98
- const upper = Math.max(dataMax, yAutoMaxFloor ?? dataMax) * yAutoPad;
99
- const lower = padAutoLower(Math.min(dataMin, yAutoMinCeil), yAutoPad);
100
- return scaleLinear({ domain: [lower, upper], range: [yMax, 0], nice: true });
101
- }
102
- return scaleLinear({ domain: yDomain, range: [yMax, 0] });
103
- }, [valid, yDomain, yMax, yAutoPad, yAutoMaxFloor, yAutoMinCeil]);
104
- const tooltipStyles = useTooltipStyles();
105
- const { tip, tooltipRef, syncedPoint, isDirectHover, handleMouse, handleLeave } = useHoverSync({
106
- data: valid,
107
- chartId,
108
- getKey: getX,
109
- xScale,
110
- marginLeft: MARGIN.left
111
- });
112
- const tickValues = useMemo(
113
- () => numTicksX ? smartTicksEvery(data.map(getX), numTicksX) : smartTicks(data.map(getX), xMax),
114
- [data, xMax, getX, numTicksX]
115
- );
116
- const tooltipLbl = tip ? tooltipLabel?.(tip.data) ?? null : null;
117
90
  return /* @__PURE__ */ jsxs(Fragment, { children: [
118
- /* @__PURE__ */ jsx("svg", { width: plot.width, height: plot.height, children: /* @__PURE__ */ jsxs(Group, { left: MARGIN.left, top: MARGIN.top, children: [
119
- /* @__PURE__ */ jsx(GridRows, { scale: yScale, width: xMax, stroke: VX.grid, numTicks: numTicksY }),
120
- /* @__PURE__ */ jsx(ZoneRects, { zones, width: xMax, leftScale: yScale }),
121
- thresholds.map((t, i) => /* @__PURE__ */ jsx(
122
- Threshold,
123
- {
124
- id: `${chartId}-thr-${i}`,
125
- data: valid,
126
- x: (d) => xScale(getX(d)) ?? 0,
127
- y0: () => yScale(t.value),
128
- y1: (d) => yScale(d.__y),
129
- clipAboveTo: 0,
130
- clipBelowTo: yMax,
131
- curve: curveMonotoneX,
132
- belowAreaProps: { fill: t.side === "above" ? t.fill : "transparent" },
133
- aboveAreaProps: { fill: t.side === "below" ? t.fill : "transparent" }
134
- },
135
- `thr-${i}`
136
- )),
137
- showArea && areaColor !== void 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
138
- /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx(AreaGradient, { id: areaId, color: areaColor }) }),
139
- /* @__PURE__ */ jsx(
140
- AreaClosed,
141
- {
142
- data: valid,
143
- x: (d) => xScale(getX(d)) ?? 0,
144
- y: (d) => yScale(d.__y),
145
- yScale,
146
- curve: curveMonotoneX,
147
- fill: areaFillUrl(areaId)
148
- }
149
- )
150
- ] }),
151
- refLines.map((r, i) => /* @__PURE__ */ jsx(
152
- "line",
153
- {
154
- x1: 0,
155
- x2: xMax,
156
- y1: yScale(r.value),
157
- y2: yScale(r.value),
158
- stroke: r.color,
159
- strokeDasharray: r.dashed ? VX.dashArray : void 0
160
- },
161
- `ref-${i}`
162
- )),
163
- primary && /* @__PURE__ */ jsx(
164
- LinePath,
91
+ thresholds.map((t, i) => /* @__PURE__ */ jsx(
92
+ Threshold,
93
+ {
94
+ id: `${chartId}-thr-${i}`,
95
+ data: valid,
96
+ x: (d) => xScale(getX(d)) ?? 0,
97
+ y0: () => yScale(t.value),
98
+ y1: (d) => yScale(d.__y),
99
+ clipAboveTo: 0,
100
+ clipBelowTo: yMax,
101
+ curve: curveMonotoneX,
102
+ belowAreaProps: { fill: t.side === "above" ? t.fill : "transparent" },
103
+ aboveAreaProps: { fill: t.side === "below" ? t.fill : "transparent" }
104
+ },
105
+ `thr-${i}`
106
+ )),
107
+ showArea && areaColor !== void 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
108
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx(AreaGradient, { id: areaId, color: areaColor }) }),
109
+ /* @__PURE__ */ jsx(
110
+ AreaClosed,
165
111
  {
166
112
  data: valid,
167
113
  x: (d) => xScale(getX(d)) ?? 0,
168
114
  y: (d) => yScale(d.__y),
169
- stroke: primary.color,
170
- strokeWidth: primary.strokeWidth ?? VX.lineWidth,
171
- strokeDasharray: primary.dash === "dashed" ? VX.dashArray : void 0,
172
- curve: curveMonotoneX
173
- }
174
- ),
175
- syncedPoint && primary && /* @__PURE__ */ jsxs(Fragment, { children: [
176
- /* @__PURE__ */ jsx(Crosshair, { x: xScale(getX(syncedPoint)) ?? 0, top: 0, bottom: yMax }),
177
- /* @__PURE__ */ jsx(
178
- SeriesDot,
179
- {
180
- cx: xScale(getX(syncedPoint)) ?? 0,
181
- cy: yScale(syncedPoint.__y),
182
- color: primary.color
183
- }
184
- )
185
- ] }),
186
- /* @__PURE__ */ jsx(AxisLeftNumeric, { scale: yScale, numTicks: numTicksY }),
187
- /* @__PURE__ */ jsx(AxisBottomDate, { top: yMax, scale: xScale, tickValues }),
188
- /* @__PURE__ */ jsx(HoverOverlay, { width: xMax, height: yMax, onMove: handleMouse, onLeave: handleLeave })
189
- ] }) }),
190
- /* @__PURE__ */ jsx(ChartTooltip, { tip: isDirectHover ? tip : null, tooltipRef, styles: tooltipStyles, children: tip && isDirectHover && /* @__PURE__ */ jsxs(Fragment, { children: [
191
- /* @__PURE__ */ jsx(
192
- TooltipHeader,
193
- {
194
- date: getX(tip.data),
195
- ...tooltipLbl !== null && { label: tooltipLbl.text, labelColor: tooltipLbl.color }
115
+ yScale,
116
+ curve: curveMonotoneX,
117
+ fill: areaFillUrl(areaId)
196
118
  }
197
- ),
198
- /* @__PURE__ */ jsxs(TooltipBody, { children: [
199
- deriveTooltipRows(series, tip.data, formatValue).map((row) => /* @__PURE__ */ jsx(
200
- TooltipRow,
201
- {
202
- color: row.color,
203
- label: row.label,
204
- value: row.value,
205
- shape: row.shape,
206
- dashed: row.dashed,
207
- ...row.strokeWidth !== void 0 && { strokeWidth: row.strokeWidth }
208
- },
209
- row.key
210
- )),
211
- renderExtraTooltipRows?.(tip.data)
212
- ] })
213
- ] }) })
119
+ )
120
+ ] }),
121
+ primary && /* @__PURE__ */ jsx(
122
+ LinePath,
123
+ {
124
+ data: valid,
125
+ x: (d) => xScale(getX(d)) ?? 0,
126
+ y: (d) => yScale(d.__y),
127
+ stroke: primary.color,
128
+ strokeWidth: primary.strokeWidth ?? LINE_OVERLAY_STROKE_WIDTH,
129
+ strokeDasharray: primary.dash === "dashed" ? VX.dashArray : void 0,
130
+ strokeOpacity: primary.strokeOpacity ?? 1,
131
+ curve: curveMonotoneX
132
+ }
133
+ )
214
134
  ] });
215
135
  }
216
136
  const ZonedLine = memo(ZonedLineInner);
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ZonedLine.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ZonedLine.test.d.ts","sourceRoot":"","sources":["../../../src/charts/kinds/ZonedLine.test.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Plot-rect margins derived from the labels that will actually be painted.
3
+ *
4
+ * `VX.margin` is a static token, so charts used to clip (or get hand-nudged) whenever a tick label
5
+ * outgrew it — the "I always push the charts around" failure mode. Here the token becomes a
6
+ * FLOOR: a measured side may only ever grow past it, never shrink below it, so no chart gets
7
+ * tighter than it was, and a wide label widens its own gutter automatically.
8
+ *
9
+ * See `docs/CHARTS-SPEC.md` §1.
10
+ */
11
+ import type { ChartMargin } from '../../tokens/index.js';
12
+ export type AutoMarginInput = {
13
+ /** Left-axis tick labels, already formatted. */
14
+ left?: readonly string[];
15
+ /** Right-axis tick labels, already formatted. Presence (not a flag) is what widens `right`. */
16
+ right?: readonly string[];
17
+ /** X-axis tick labels, already formatted. */
18
+ bottom?: readonly string[];
19
+ /** Degrees of counter-clockwise rotation applied to the x tick labels. Default 0. */
20
+ rotate?: number;
21
+ /** Tick-label font size. Default `VX.axisFont`. */
22
+ fontPx?: number;
23
+ /** Explicit per-side overrides — applied LAST, so an escape hatch always wins. */
24
+ override?: Partial<ChartMargin>;
25
+ };
26
+ /**
27
+ * Resolve the four margins from measured labels.
28
+ *
29
+ * Law, per side:
30
+ * - `left` — widest left label + gap, floored at `VX.margin.left`.
31
+ * - `right` — with a right axis: widest right label + gap. Without one: half the widest x label,
32
+ * so the LAST x tick (centered on the plot's right edge) cannot clip. Both floored at
33
+ * `VX.margin.right`.
34
+ * - `bottom` — one label line (or the rotated bounding height) + gap, floored at
35
+ * `VX.margin.bottom`.
36
+ * - `top` — `VX.margin.top`. Nothing measures into it; a chart that draws into the top gutter
37
+ * passes an override.
38
+ */
39
+ export declare function autoMargin(input?: AutoMarginInput): ChartMargin;
40
+ /**
41
+ * The tick labels a linear axis WILL paint, derived before the plot rect exists.
42
+ *
43
+ * This is what breaks the margin/scale circularity: a linear scale's tick VALUES depend only on
44
+ * its domain, so a throwaway-range probe yields the exact label strings {@link autoMargin} needs
45
+ * to measure — and returning the resolved `format` alongside them guarantees the measured string
46
+ * and the painted string are the same one. Shared by `CartesianChart` and by hand-composed kinds
47
+ * (`DualPanel`) so the two can't drift.
48
+ */
49
+ export declare function probeAxisLabels(opts: {
50
+ domain: [number, number];
51
+ ticks: number;
52
+ /** Overrides d3's own tick format. */
53
+ format?: (v: number) => string;
54
+ /** Must match the real scale's `nice` — niceing changes which ticks exist. */
55
+ nice?: boolean;
56
+ }): {
57
+ labels: string[];
58
+ format: (v: number) => string;
59
+ };
60
+ //# sourceMappingURL=auto-margin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auto-margin.d.ts","sourceRoot":"","sources":["../../../src/charts/layout/auto-margin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAa/C,MAAM,MAAM,eAAe,GAAG;IAC5B,gDAAgD;IAChD,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACxB,+FAA+F;IAC/F,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACzB,6CAA6C;IAC7C,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC1B,qFAAqF;IACrF,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,kFAAkF;IAClF,QAAQ,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAA;CAChC,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,UAAU,CAAC,KAAK,GAAE,eAAoB,GAAG,WAAW,CA6BnE;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE;IACpC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,sCAAsC;IACtC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAA;IAC9B,8EAA8E;IAC9E,IAAI,CAAC,EAAE,OAAO,CAAA;CACf,GAAG;IAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAA;CAAE,CAQtD"}
@@ -0,0 +1,37 @@
1
+ import { scaleLinear } from "@visx/scale";
2
+ import { VX } from "../../tokens/index.js";
3
+ import { maxTextWidth } from "../utils/measure-text.js";
4
+ const AXIS_TICK_GAP = 12;
5
+ const lineHeight = (fontPx) => Math.ceil(fontPx * 1.35);
6
+ function autoMargin(input = {}) {
7
+ const fontPx = input.fontPx ?? VX.axisFont;
8
+ const { left = [], right = [], bottom = [], rotate = 0, override } = input;
9
+ const leftWidth = maxTextWidth(left, fontPx);
10
+ const rightWidth = maxTextWidth(right, fontPx);
11
+ const bottomWidth = maxTextWidth(bottom, fontPx);
12
+ const radians = rotate * Math.PI / 180;
13
+ const bottomExtent = rotate === 0 ? lineHeight(fontPx) : Math.ceil(
14
+ Math.abs(bottomWidth * Math.sin(radians)) + Math.abs(lineHeight(fontPx) * Math.cos(radians))
15
+ );
16
+ return {
17
+ top: override?.top ?? VX.margin.top,
18
+ right: override?.right ?? Math.ceil(
19
+ Math.max(VX.margin.right, right.length > 0 ? rightWidth + AXIS_TICK_GAP : bottomWidth / 2)
20
+ ),
21
+ bottom: override?.bottom ?? Math.ceil(Math.max(VX.margin.bottom, bottomExtent + AXIS_TICK_GAP)),
22
+ left: override?.left ?? Math.ceil(Math.max(VX.margin.left, left.length > 0 ? leftWidth + AXIS_TICK_GAP : 0))
23
+ };
24
+ }
25
+ function probeAxisLabels(opts) {
26
+ const probe = scaleLinear({
27
+ domain: opts.domain,
28
+ range: [1, 0],
29
+ ...opts.nice === true && { nice: true }
30
+ });
31
+ const format = opts.format ?? probe.tickFormat(opts.ticks);
32
+ return { labels: probe.ticks(opts.ticks).map(format), format };
33
+ }
34
+ export {
35
+ autoMargin,
36
+ probeAxisLabels
37
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=auto-margin.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auto-margin.test.d.ts","sourceRoot":"","sources":["../../../src/charts/layout/auto-margin.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,161 @@
1
+ import { scaleLinear, scalePoint } from '@visx/scale';
2
+ import type { ReactNode } from 'react';
3
+ import type { ChartMargin } from '../../tokens/index.js';
4
+ import type { ChartLegendConfig, ChartSeries } from '../series.js';
5
+ import type { XZoneSpec } from './XZoneRects.js';
6
+ import type { ZoneSpec } from './ZoneRects.js';
7
+ type LinearScale = ReturnType<typeof scaleLinear<number>>;
8
+ type PointScale = ReturnType<typeof scalePoint<string>>;
9
+ /** One y-axis, fully described. Collapses the removed `yDomain` / `yAutoMaxFloor` / `yAutoMinCeil` /
10
+ * `yAutoPad` / `numTicksY` / `formatYTick` prop soup into a single object per axis. */
11
+ export type AxisConfig<T> = {
12
+ /**
13
+ * `'auto'` (default) derives the domain from the VISIBLE series; a tuple fixes it; a function
14
+ * computes it from the data — the seam a stacked chart uses to sum its bands. The function also
15
+ * receives the visible series, so a stacked domain SHRINKS when the legend toggles a band off
16
+ * (summing `props.series` there would leave a permanent gap above the stack).
17
+ */
18
+ domain?: [number, number] | 'auto' | ((data: readonly T[], visible: readonly ChartSeries<T>[]) => [number, number]);
19
+ /** When 'auto': the upper bound is at least this. */
20
+ autoMaxFloor?: number;
21
+ /** When 'auto': the lower bound is at most this. Default 0 (forced zero baseline). `Infinity`
22
+ * pads down from the raw data minimum instead. */
23
+ autoMinCeil?: number;
24
+ /** When 'auto': padding multiplier applied away from the data. Default 1.1. */
25
+ autoPad?: number;
26
+ ticks?: number;
27
+ /** Tick + tooltip formatter for this axis. Defaults to d3's own tick format. */
28
+ format?: (v: number) => string;
29
+ /** Horizontal grid rules. Default: on for the left axis, off for the right. */
30
+ grid?: boolean;
31
+ /**
32
+ * Round the scale's domain outward to nice tick values (d3's `scale.nice()`). Threaded to BOTH
33
+ * `probeAxisLabels` (measurement) and the real `scaleLinear` (rendering) — they must agree, or
34
+ * the measured margin is computed from ticks the axis never paints.
35
+ *
36
+ * Default `false`, deliberately: flipping the default would move the domain of every
37
+ * already-migrated chart. Opt in per axis.
38
+ */
39
+ nice?: boolean;
40
+ };
41
+ /** Handed to `prependRows`/`extraRows` alongside the hovered datum — the same `visible`/`hidden`
42
+ * the plot itself draws from, so a hand-authored row can't structurally desync from legend
43
+ * toggling. */
44
+ export type CartesianTooltipRowContext<T> = {
45
+ visible: readonly ChartSeries<T>[];
46
+ hidden: ReadonlySet<string>;
47
+ };
48
+ export type CartesianTooltipConfig<T> = {
49
+ /**
50
+ * Default true — the tooltip tracks the pointer. Set false to ANCHOR it to the crosshair at the
51
+ * plot's top edge instead, which reads better across a column of charts sharing one cursor
52
+ * (every tooltip then lines up on the same x). Anchoring costs one `getBoundingClientRect` per
53
+ * hovered frame, which is why following stays the default.
54
+ */
55
+ follow?: boolean;
56
+ /** Right-aligned badge in the tooltip header (e.g. a status label). */
57
+ label?: (d: T) => {
58
+ text: string;
59
+ color: string;
60
+ } | null;
61
+ /** Rows rendered BEFORE the derived per-series rows (a total, a context line). The second
62
+ * argument carries the same `visible`/`hidden` the plot draws from, so a hand-authored row
63
+ * stays in sync with legend toggling instead of naming a series the plot no longer draws. */
64
+ prependRows?: (d: T, ctx: CartesianTooltipRowContext<T>) => ReactNode;
65
+ /** Rows appended after the derived per-series rows. Same `ctx` as {@link prependRows}. */
66
+ extraRows?: (d: T, ctx: CartesianTooltipRowContext<T>) => ReactNode;
67
+ };
68
+ /** Everything a mark renderer needs. Handed to `CartesianChart`'s child on every render. */
69
+ export type PlotContext<T> = {
70
+ data: readonly T[];
71
+ /** Series minus the ones the legend has toggled off — draw THESE, not `props.series`. */
72
+ visible: ChartSeries<T>[];
73
+ hidden: ReadonlySet<string>;
74
+ xScale: PointScale;
75
+ yScale: LinearScale;
76
+ /** Present only when a `y2` axis is configured. */
77
+ y2Scale: LinearScale | null;
78
+ xMax: number;
79
+ yMax: number;
80
+ margin: ChartMargin;
81
+ /** The point the shared cursor currently rests on, or null. */
82
+ cursorPoint: T | null;
83
+ /** Series key the legend is hovering, for mark dimming. */
84
+ highlighted: string | null;
85
+ };
86
+ export type CartesianChartProps<T> = {
87
+ data: T[];
88
+ /** Stable id — identifies this chart as the cursor's source. */
89
+ chartId: string;
90
+ /** Extracts the x-domain key (a date or category string) from a point. */
91
+ getX: (d: T) => string;
92
+ /** The single source of truth for marks, legend entries, and tooltip rows. */
93
+ series: ChartSeries<T>[];
94
+ y?: AxisConfig<T>;
95
+ /** Passing `y2` is what makes the chart dual-axis: it draws the right axis and widens the
96
+ * right margin by measurement. Series opt in with `axis: 'right'`. */
97
+ y2?: AxisConfig<T>;
98
+ /** Exact number of x ticks. Default: as many as fit (`smartTicks`). */
99
+ xTicks?: number;
100
+ /** X tick label formatter. Default `fmtAxisDate` (DD.MM). */
101
+ formatX?: (key: string) => string;
102
+ /** Value-range bands on the left scale, drawn behind the marks. */
103
+ zones?: ZoneSpec[];
104
+ /** X-range bands (time windows), drawn behind the marks. */
105
+ xZones?: XZoneSpec[];
106
+ refLines?: {
107
+ value: number;
108
+ color: string;
109
+ dashed?: boolean;
110
+ axis?: 'left' | 'right';
111
+ }[];
112
+ height?: number;
113
+ aspectRatio?: number;
114
+ fill?: boolean;
115
+ legend?: ChartLegendConfig | false;
116
+ /** `false` disables the tooltip entirely (and with it the crosshair dots). */
117
+ tooltip?: CartesianTooltipConfig<T> | false;
118
+ /** Per-side overrides of the measured margins — the escape hatch, applied last. */
119
+ margin?: Partial<ChartMargin>;
120
+ /**
121
+ * Where this series' crosshair dot sits, as a value in the axis domain. Defaults to
122
+ * `series.getValue`, which is correct for every unstacked chart. A STACKED chart must override
123
+ * it with the cumulative band top — otherwise its dots sit at each band's raw value, off the
124
+ * line the reader is actually looking at.
125
+ */
126
+ cursorValue?: (point: T, series: ChartSeries<T>, visible: readonly ChartSeries<T>[]) => number | null;
127
+ ariaLabel?: string;
128
+ isPending?: boolean;
129
+ /** Draw ONLY the marks. Everything around them is the primitive's job. */
130
+ children: (ctx: PlotContext<T>) => ReactNode;
131
+ };
132
+ /**
133
+ * Resolve one axis' `[min, max]` from its {@link AxisConfig} and the VISIBLE series. Exported for
134
+ * testing and for a hand-composed kind that needs the same auto-domain law `CartesianChart`
135
+ * applies (rather than reinventing the padding rules per chart).
136
+ */
137
+ export declare function resolveAxisDomain<T>(cfg: AxisConfig<T> | undefined, data: readonly T[], series: readonly ChartSeries<T>[],
138
+ /**
139
+ * Values that must stay inside the plot even though no series reports them — the bounds of the
140
+ * zones and reference lines pinned to THIS axis. Without them a target zone or a stretch-goal
141
+ * ref line sitting past the data silently clips, which is precisely the case those overlays
142
+ * exist for. Infinite bounds ("top/bottom of axis") are ignored: they clamp to the domain by
143
+ * definition and would otherwise blow it up.
144
+ */
145
+ extraBounds?: readonly number[]): [number, number];
146
+ /**
147
+ * The cartesian chart primitive — the rung that was missing between `ChartFrame` and raw visx
148
+ * (`docs/CHARTS-SPEC.md` §2).
149
+ *
150
+ * It owns, once, everything every chart repeated: measured margins, both y scales and their
151
+ * domains, the x scale and its tick thinning, grid, zones, axes, the shared cursor, the crosshair
152
+ * and its per-series dots, the hover/keyboard overlay, and the derived tooltip. The child draws
153
+ * marks and nothing else, so two charts cannot drift apart in any of those layers — that identity
154
+ * IS the consistency guarantee.
155
+ *
156
+ * Margins are MEASURED from the labels that will actually be painted, so a wide tick label widens
157
+ * its own gutter instead of clipping or needing a hand-tuned `margin` prop.
158
+ */
159
+ export declare function CartesianChart<T>({ data, chartId, getX, series, y, y2, xTicks, formatX, zones, xZones, refLines, height, aspectRatio, fill, legend, tooltip, margin: marginOverride, cursorValue, ariaLabel, isPending, children, }: CartesianChartProps<T>): ReactNode;
160
+ export {};
161
+ //# sourceMappingURL=CartesianChart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CartesianChart.d.ts","sourceRoot":"","sources":["../../../src/charts/primitives/CartesianChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,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