@astryxdesign/lab 0.1.4-canary.ff77e1c → 0.1.5-canary.76e6697

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 (39) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/Chart/ChartBrush.d.ts +1 -4
  3. package/dist/Chart/ChartBrush.d.ts.map +1 -1
  4. package/dist/Chart/ChartBrush.js +1 -4
  5. package/dist/Chart/ChartCandlestick.d.ts +0 -3
  6. package/dist/Chart/ChartCandlestick.d.ts.map +1 -1
  7. package/dist/Chart/ChartCandlestick.js +0 -3
  8. package/dist/Chart/ChartHeatmapGL.d.ts.map +1 -1
  9. package/dist/Chart/ChartHeatmapGL.js +13 -4
  10. package/dist/Chart/ChartLegend.d.ts +0 -5
  11. package/dist/Chart/ChartLegend.d.ts.map +1 -1
  12. package/dist/Chart/ChartLegend.js +0 -5
  13. package/dist/Chart/ChartTooltip.d.ts +1 -8
  14. package/dist/Chart/ChartTooltip.d.ts.map +1 -1
  15. package/dist/Chart/ChartTooltip.js +1 -8
  16. package/dist/CodeEditor/CodeEditor.d.ts +1 -1
  17. package/dist/CodeEditor/CodeEditor.js +1 -1
  18. package/dist/Radial/RadialChart.d.ts +0 -5
  19. package/dist/Radial/RadialChart.d.ts.map +1 -1
  20. package/dist/Radial/RadialChart.js +0 -5
  21. package/dist/Radial/RadialTooltip.d.ts +1 -1
  22. package/dist/Radial/RadialTooltip.js +1 -1
  23. package/dist/Sankey/SankeyChart.d.ts +2 -3
  24. package/dist/Sankey/SankeyChart.d.ts.map +1 -1
  25. package/dist/Sankey/SankeyChart.js +2 -3
  26. package/dist/Stepper/Step.d.ts +0 -1
  27. package/dist/Stepper/Step.d.ts.map +1 -1
  28. package/dist/Stepper/Step.js +0 -1
  29. package/package.json +2 -2
  30. package/src/Chart/ChartBrush.tsx +1 -4
  31. package/src/Chart/ChartCandlestick.tsx +0 -3
  32. package/src/Chart/ChartHeatmapGL.tsx +13 -4
  33. package/src/Chart/ChartLegend.tsx +0 -5
  34. package/src/Chart/ChartTooltip.tsx +1 -8
  35. package/src/CodeEditor/CodeEditor.tsx +1 -1
  36. package/src/Radial/RadialChart.tsx +0 -5
  37. package/src/Radial/RadialTooltip.tsx +1 -1
  38. package/src/Sankey/SankeyChart.tsx +2 -3
  39. package/src/Stepper/Step.tsx +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # @xds/lab
2
2
 
3
+ # 0.1.5
4
+
5
+ ---
6
+
3
7
  # 0.1.4
4
8
 
5
9
  ---
@@ -47,11 +47,8 @@ export interface ChartBrushProps {
47
47
  * Brush interaction for range selection.
48
48
  *
49
49
  * @example
50
- * ```tsx
51
- * // X-only (default)
50
+ * ```
52
51
  * <ChartBrush onBrush={({x}) => setZoom(x)} />
53
- *
54
- * // 2D rectangular
55
52
  * <ChartBrush mode="xy" onBrush={({x, y}, points) => setSelected(points)} />
56
53
  * ```
57
54
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ChartBrush.d.ts","sourceRoot":"","sources":["../../src/Chart/ChartBrush.tsx"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,OAAO,KAAsC,MAAM,OAAO,CAAC;AAK3D;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG,GAAG,GAAG,IAAI,CAAC;AAEnC,MAAM,WAAW,UAAU;IACzB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpB,CAAC,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAC9B;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,IAAI,CAAC;IAEvE;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAiBD;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CAAC,EACzB,IAAU,EACV,OAAO,EACP,OAAO,EACP,KAA6B,EAC7B,OAAc,GACf,EAAE,eAAe,qBAgJjB"}
1
+ {"version":3,"file":"ChartBrush.d.ts","sourceRoot":"","sources":["../../src/Chart/ChartBrush.tsx"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,OAAO,KAAsC,MAAM,OAAO,CAAC;AAK3D;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG,GAAG,GAAG,IAAI,CAAC;AAEnC,MAAM,WAAW,UAAU;IACzB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpB,CAAC,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAC9B;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,IAAI,CAAC;IAEvE;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAiBD;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,EACzB,IAAU,EACV,OAAO,EACP,OAAO,EACP,KAA6B,EAC7B,OAAc,GACf,EAAE,eAAe,qBAgJjB"}
@@ -38,11 +38,8 @@ function localCoords(e) {
38
38
  * Brush interaction for range selection.
39
39
  *
40
40
  * @example
41
- * ```tsx
42
- * // X-only (default)
41
+ * ```
43
42
  * <ChartBrush onBrush={({x}) => setZoom(x)} />
44
- *
45
- * // 2D rectangular
46
43
  * <ChartBrush mode="xy" onBrush={({x, y}, points) => setSelected(points)} />
47
44
  * ```
48
45
  */
@@ -31,14 +31,11 @@ export interface ChartCandlestickProps {
31
31
  *
32
32
  * @example
33
33
  * ```
34
- * // Financial OHLC
35
34
  * <ChartCandlestick
36
35
  * high="high" low="low" open="open" close="close"
37
36
  * upColor={useChartColors().semantic.positive}
38
37
  * downColor={useChartColors().semantic.negative}
39
38
  * />
40
- *
41
- * // OHLC bar
42
39
  * <ChartCandlestick
43
40
  * variant="bar"
44
41
  * high="max" low="min" open="q1" close="median"
@@ -1 +1 @@
1
- {"version":3,"file":"ChartCandlestick.d.ts","sourceRoot":"","sources":["../../src/Chart/ChartCandlestick.tsx"],"names":[],"mappings":"AAeA,MAAM,WAAW,qBAAqB;IACpC,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAC;IACb,yDAAyD;IACzD,GAAG,EAAE,MAAM,CAAC;IACZ,sDAAsD;IACtD,IAAI,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,KAAK,CAAC;IAC5B,oDAAoD;IACpD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EACJ,GAAG,EACH,IAAI,EACJ,KAAK,EACL,OAAmB,EACnB,OAAO,EACP,SAAS,EACT,KAAK,EACL,SAAe,EACf,WAAiB,EACjB,MAAU,GACX,EAAE,qBAAqB,sCA6GvB"}
1
+ {"version":3,"file":"ChartCandlestick.d.ts","sourceRoot":"","sources":["../../src/Chart/ChartCandlestick.tsx"],"names":[],"mappings":"AAeA,MAAM,WAAW,qBAAqB;IACpC,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAC;IACb,yDAAyD;IACzD,GAAG,EAAE,MAAM,CAAC;IACZ,sDAAsD;IACtD,IAAI,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,KAAK,CAAC;IAC5B,oDAAoD;IACpD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EACJ,GAAG,EACH,IAAI,EACJ,KAAK,EACL,OAAmB,EACnB,OAAO,EACP,SAAS,EACT,KAAK,EACL,SAAe,EACf,WAAiB,EACjB,MAAU,GACX,EAAE,qBAAqB,sCA6GvB"}
@@ -18,14 +18,11 @@ import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
18
18
  *
19
19
  * @example
20
20
  * ```
21
- * // Financial OHLC
22
21
  * <ChartCandlestick
23
22
  * high="high" low="low" open="open" close="close"
24
23
  * upColor={useChartColors().semantic.positive}
25
24
  * downColor={useChartColors().semantic.negative}
26
25
  * />
27
- *
28
- * // OHLC bar
29
26
  * <ChartCandlestick
30
27
  * variant="bar"
31
28
  * high="max" low="min" open="q1" close="median"
@@ -1 +1 @@
1
- {"version":3,"file":"ChartHeatmapGL.d.ts","sourceRoot":"","sources":["../../src/Chart/ChartHeatmapGL.tsx"],"names":[],"mappings":"AAqBA,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAyCD,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,UAAU,EACV,MAAM,EAAE,UAAU,EAClB,OAAW,GACZ,EAAE,mBAAmB,sCA8IrB"}
1
+ {"version":3,"file":"ChartHeatmapGL.d.ts","sourceRoot":"","sources":["../../src/Chart/ChartHeatmapGL.tsx"],"names":[],"mappings":"AAqBA,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAyCD,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,UAAU,EACV,MAAM,EAAE,UAAU,EAClB,OAAW,GACZ,EAAE,mBAAmB,sCAuJrB"}
@@ -127,6 +127,13 @@ export function ChartHeatmapGL({
127
127
  const gap = cellGap;
128
128
  const xBW = xScale.bandwidth();
129
129
  const yBW = yBandScale.bandwidth();
130
+ // Heatmap cells fill their full slot (step), not just the band width. The
131
+ // shared x-scale carries bar-style padding (~0.2), so sizing cells to the
132
+ // bandwidth leaves gaps between columns while the local y-scale stays tight —
133
+ // an asymmetric, sparse grid. Sizing to the step and centering on the band
134
+ // keeps cells contiguous (a real heatmap); cellGap alone controls spacing.
135
+ const xStep = typeof xScale.step === 'function' ? xScale.step() : xBW;
136
+ const yStep = yBandScale.step();
130
137
  for (const d of data) {
131
138
  const xVal = xScale(String(d[xKey]));
132
139
  const yVal = yBandScale(String(d[yKey]));
@@ -136,10 +143,12 @@ export function ChartHeatmapGL({
136
143
  const v = typeof d[valueKey] === 'number' ? d[valueKey] : 0;
137
144
  const t = (v - dMin) / range;
138
145
  const [r, g, b] = sampleRamp(ramp, t);
139
- const x0 = xVal + gap / 2;
140
- const x1 = xVal + xBW - gap / 2;
141
- const y0 = yVal + gap / 2;
142
- const y1 = yVal + yBW - gap / 2;
146
+ const xc = xVal + xBW / 2;
147
+ const yc = yVal + yBW / 2;
148
+ const x0 = xc - xStep / 2 + gap / 2;
149
+ const x1 = xc + xStep / 2 - gap / 2;
150
+ const y0 = yc - yStep / 2 + gap / 2;
151
+ const y1 = yc + yStep / 2 - gap / 2;
143
152
  positions.push(x0, y0, x1, y0, x0, y1, x1, y0, x1, y1, x0, y1);
144
153
  for (let i = 0; i < 6; i++) {
145
154
  colors.push(r, g, b);
@@ -35,20 +35,15 @@ export interface ChartLegendProps {
35
35
  *
36
36
  * @example
37
37
  * ```
38
- * // Discrete
39
38
  * <ChartLegend items={[
40
39
  * {label: 'Revenue', color: colors[0]},
41
40
  * {label: 'Expenses', color: colors[1]},
42
41
  * ]} />
43
- *
44
- * // Continuous — pipe useChartColors() directly
45
42
  * <ChartLegend
46
43
  * gradient={useChartColors().sequential.blue(5)}
47
44
  * domain={[0, 100]}
48
45
  * label="Temperature"
49
46
  * />
50
- *
51
- * // Diverging
52
47
  * <ChartLegend
53
48
  * gradient={useChartColors().diverging.coldHot(7)}
54
49
  * domain={[-50, 50]}
@@ -1 +1 @@
1
- {"version":3,"file":"ChartLegend.d.ts","sourceRoot":"","sources":["../../src/Chart/ChartL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A4B;IAC5B,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CACxC;AAgBD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,QAAQ,EACR,MAAM,EACN,KAAK,EACL,KAAS,EACT,UAAmB,GACpB,EAAE,gBAAgB,sCAgGlB"}
@@ -30,20 +30,15 @@ function toGradientCSS(colors) {
30
30
  *
31
31
  * @example
32
32
  * ```
33
- * // Discrete
34
33
  * <ChartLegend items={[
35
34
  * {label: 'Revenue', color: colors[0]},
36
35
  * {label: 'Expenses', color: colors[1]},
37
36
  * ]} />
38
- *
39
- * // Continuous — pipe useChartColors() directly
40
37
  * <ChartLegend
41
38
  * gradient={useChartColors().sequential.blue(5)}
42
39
  * domain={[0, 100]}
43
40
  * label="Temperature"
44
41
  * />
45
- *
46
- * // Diverging
47
42
  * <ChartLegend
48
43
  * gradient={useChartColors().diverging.coldHot(7)}
49
44
  * domain={[-50, 50]}
@@ -67,17 +67,10 @@ export interface ChartTooltipProps {
67
67
  * in the top layer (via Popover API, portaled outside the SVG).
68
68
  *
69
69
  * @example
70
- * ```tsx
71
- * // Default: vertical crosshair + tooltip card
70
+ * ```
72
71
  * <ChartTooltip />
73
- *
74
- * // Both axes, with labels
75
72
  * <ChartTooltip crosshair="xy" crosshairLabels />
76
- *
77
- * // Tooltip only, no crosshair lines
78
73
  * <ChartTooltip crosshair={false} />
79
- *
80
- * // Custom render
81
74
  * <ChartTooltip render={(d) => <span>{d.month}: ${d.revenue}</span>} />
82
75
  * ```
83
76
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ChartTooltip.d.ts","sourceRoot":"","sources":["../../src/Chart/ChartTooltip.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAgC,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAOpE;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAAG,GAAG,GAAG,GAAG,GAAG,IA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EtE;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAE/B;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,KAAK,MAAM,CAAC;IAEpD;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAEpC;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,SAAe,EACf,eAAuB,EACvB,IAAW,EACX,OAAO,EACP,OAAO,EACP,cAAiD,EACjD,GAAU,GACX,EAAE,iBAAiB,+BAyUnB"}
@@ -33,17 +33,10 @@ import { jsxDEV as _jsxDEV, Fragment as _Fragment } from "react/jsx-dev-runtime"
33
33
  * in the top layer (via Popover API, portaled outside the SVG).
34
34
  *
35
35
  * @example
36
- * ```tsx
37
- * // Default: vertical crosshair + tooltip card
36
+ * ```
38
37
  * <ChartTooltip />
39
- *
40
- * // Both axes, with labels
41
38
  * <ChartTooltip crosshair="xy" crosshairLabels />
42
- *
43
- * // Tooltip only, no crosshair lines
44
39
  * <ChartTooltip crosshair={false} />
45
- *
46
- * // Custom render
47
40
  * <ChartTooltip render={(d) => <span>{d.month}: ${d.revenue}</span>} />
48
41
  * ```
49
42
  */
@@ -31,7 +31,7 @@ export interface CodeEditorProps extends Omit<BaseProps<HTMLDivElement>, 'onChan
31
31
  * auto-indent, tab insertion, and bracket auto-closing.
32
32
  *
33
33
  * @example
34
- * ```tsx
34
+ * ```
35
35
  * const [code, setCode] = useState('');
36
36
  * <CodeEditor
37
37
  * label="Source code"
@@ -129,7 +129,7 @@ let editorInstanceCounter = 0;
129
129
  * auto-indent, tab insertion, and bracket auto-closing.
130
130
  *
131
131
  * @example
132
- * ```tsx
132
+ * ```
133
133
  * const [code, setCode] = useState('');
134
134
  * <CodeEditor
135
135
  * label="Source code"
@@ -48,19 +48,14 @@ export interface RadialChartProps {
48
48
  *
49
49
  * @example
50
50
  * ```
51
- * // Spider
52
51
  * <RadialChart data={data} axes={['speed', 'handling', 'comfort']} height={400}>
53
52
  * <RadialGrid rings={5} />
54
53
  * <RadialArea dataKey="modelA" color={colors[0]} />
55
54
  * <RadialAxis />
56
55
  * </RadialChart>
57
- *
58
- * // Pie
59
56
  * <RadialChart data={data} valueKey="revenue" labelKey="region" height={400}>
60
57
  * <RadialSlice />
61
58
  * </RadialChart>
62
- *
63
- * // Donut
64
59
  * <RadialChart data={data} valueKey="revenue" labelKey="region" innerRadius={0.6} height={400}>
65
60
  * <RadialSlice />
66
61
  * </RadialChart>
@@ -1 +1 @@
1
- {"version":3,"file":"RadialChart.d.ts","sourceRoot":"","sources":["../../src/Radial/RadialChart.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,EACL,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AAIf,MAAM,WAAW,gBAAgB;IAC/B,kBAAkB;IAClB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IAChC,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qBAAqB;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,MAAY,EACZ,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,WAAW,EAAE,mBAAuB,EACpC,QAAe,EACf,QAAQ,GACT,EAAE,gBAAgB,+BAgIlB"}
1
+ {"version":3,"file":"RadialChart.d.ts","sourceRoot":"","sources":["../../src/Radial/RadialChart.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,EACL,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AAIf,MAAM,WAAW,gBAAgB;IAC/B,kBAAkB;IAClB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IAChC,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qBAAqB;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,MAAY,EACZ,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,WAAW,EAAE,mBAAuB,EACpC,QAAe,EACf,QAAQ,GACT,EAAE,gBAAgB,+BAgIlB"}
@@ -18,19 +18,14 @@ import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
18
18
  *
19
19
  * @example
20
20
  * ```
21
- * // Spider
22
21
  * <RadialChart data={data} axes={['speed', 'handling', 'comfort']} height={400}>
23
22
  * <RadialGrid rings={5} />
24
23
  * <RadialArea dataKey="modelA" color={colors[0]} />
25
24
  * <RadialAxis />
26
25
  * </RadialChart>
27
- *
28
- * // Pie
29
26
  * <RadialChart data={data} valueKey="revenue" labelKey="region" height={400}>
30
27
  * <RadialSlice />
31
28
  * </RadialChart>
32
- *
33
- * // Donut
34
29
  * <RadialChart data={data} valueKey="revenue" labelKey="region" innerRadius={0.6} height={400}>
35
30
  * <RadialSlice />
36
31
  * </RadialChart>
@@ -33,7 +33,7 @@ export interface RadialTooltipProps {
33
33
  * using polar coordinate math and renders a tooltip in the top layer.
34
34
  *
35
35
  * @example
36
- * ```tsx
36
+ * ```
37
37
  * <RadialChart data={data} valueKey="revenue" labelKey="region" height={400}>
38
38
  * <RadialSlice colors={colors} />
39
39
  * <RadialTooltip />
@@ -22,7 +22,7 @@ import { jsxDEV as _jsxDEV, Fragment as _Fragment } from "react/jsx-dev-runtime"
22
22
  * using polar coordinate math and renders a tooltip in the top layer.
23
23
  *
24
24
  * @example
25
- * ```tsx
25
+ * ```
26
26
  * <RadialChart data={data} valueKey="revenue" labelKey="region" height={400}>
27
27
  * <RadialSlice colors={colors} />
28
28
  * <RadialTooltip />
@@ -49,15 +49,14 @@ export interface SankeyChartProps {
49
49
  * Width is responsive but enforces minColumnWidth — scrolls when needed.
50
50
  *
51
51
  * @example
52
- * ```tsx
52
+ * ```
53
53
  * <SankeyChart
54
54
  * nodes={nodes}
55
55
  * links={links}
56
56
  * columns={[
57
57
  * {ids: ['a', 'b'], label: 'Source'},
58
58
  * {ids: ['c', 'd'], label: 'Target'},
59
- * ]}
60
- * >
59
+ * ]}>
61
60
  * <SankeyGrid />
62
61
  * <SankeyLink />
63
62
  * <SankeyNode />
@@ -1 +1 @@
1
- {"version":3,"file":"SankeyChart.d.ts","sourceRoot":"","sources":["../../src/Sankey/SankeyChart.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,E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AAE,YAAY,EAAE,CAAC;IACzB,wCAAwC;IACxC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yCAAyC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uDAAuD;IACvD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qBAAqB;IACrB,QAAQ,EAAE,SAAS,CAAC;CACrB;AA+CD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,KAAK,EACL,OAAO,EACP,MAAY,EACZ,SAAc,EACd,OAAY,EACZ,SAAS,EACT,cAAoB,EACpB,QAAQ,GACT,EAAE,gBAAgB,+BAqFlB;yBA/Fe,WAAW"}
@@ -61,15 +61,14 @@ function resolveColumnCount(columns, nodes, links) {
61
61
  * Width is responsive but enforces minColumnWidth — scrolls when needed.
62
62
  *
63
63
  * @example
64
- * ```tsx
64
+ * ```
65
65
  * <SankeyChart
66
66
  * nodes={nodes}
67
67
  * links={links}
68
68
  * columns={[
69
69
  * {ids: ['a', 'b'], label: 'Source'},
70
70
  * {ids: ['c', 'd'], label: 'Target'},
71
- * ]}
72
- * >
71
+ * ]}>
73
72
  * <SankeyGrid />
74
73
  * <SankeyLink />
75
74
  * <SankeyNode />
@@ -109,7 +109,6 @@ export interface StepProps extends BaseProps<HTMLLIElement> {
109
109
  *
110
110
  * @example
111
111
  * ```
112
- * // Generic icon + semantic color
113
112
  * <Step step={1} label="Payment" status="error" icon={<Icon icon="warning" />} />
114
113
  * ```
115
114
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Step.d.ts","sourceRoot":"","sources":["../../src/Stepper/Step.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAC,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAarC,OAAO,KAA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AAgB,IAAI,CAAC,EACnB,IAAI,EACJ,KAAK,EACL,WAAW,EACX,QAAQ,EACR,IAAI,EACJ,MAAM,EACN,UAAkB,EAClB,UAAkB,EAClB,UAAU,EACV,SAAS,EAAE,aAAa,EACxB,OAAO,EAAE,WAAW,EACpB,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,aAAa,EAAE,UAAU,EACzB,GAAG,IAAI,EACR,EAAE,SAAS,+BA2SX;yBA7Te,IAAI"}
@@ -296,7 +296,6 @@ const styles = {
296
296
  *
297
297
  * @example
298
298
  * ```
299
- * // Generic icon + semantic color
300
299
  * <Step step={1} label="Payment" status="error" icon={<Icon icon="warning" />} />
301
300
  * ```
302
301
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astryxdesign/lab",
3
- "version": "0.1.4-canary.ff77e1c",
3
+ "version": "0.1.5-canary.76e6697",
4
4
  "description": "Experimental Astryx components — published to npm only under the @canary dist-tag for early testing; never released as a stable (latest) version.",
5
5
  "author": "Meta Open Source",
6
6
  "license": "MIT",
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "peerDependencies": {
47
47
  "@stylexjs/stylex": ">=0.10.0",
48
- "@astryxdesign/core": "0.1.4-canary.ff77e1c",
48
+ "@astryxdesign/core": "0.1.5-canary.76e6697",
49
49
  "react": ">=19.0.0",
50
50
  "react-dom": ">=19.0.0"
51
51
  },
@@ -76,11 +76,8 @@ function localCoords(e: React.PointerEvent<SVGRectElement>): {
76
76
  * Brush interaction for range selection.
77
77
  *
78
78
  * @example
79
- * ```tsx
80
- * // X-only (default)
79
+ * ```
81
80
  * <ChartBrush onBrush={({x}) => setZoom(x)} />
82
- *
83
- * // 2D rectangular
84
81
  * <ChartBrush mode="xy" onBrush={({x, y}, points) => setSelected(points)} />
85
82
  * ```
86
83
  */
@@ -47,14 +47,11 @@ export interface ChartCandlestickProps {
47
47
  *
48
48
  * @example
49
49
  * ```
50
- * // Financial OHLC
51
50
  * <ChartCandlestick
52
51
  * high="high" low="low" open="open" close="close"
53
52
  * upColor={useChartColors().semantic.positive}
54
53
  * downColor={useChartColors().semantic.negative}
55
54
  * />
56
- *
57
- * // OHLC bar
58
55
  * <ChartCandlestick
59
56
  * variant="bar"
60
57
  * high="max" low="min" open="q1" close="median"
@@ -156,6 +156,13 @@ export function ChartHeatmapGL({
156
156
  const gap = cellGap;
157
157
  const xBW = xScale.bandwidth();
158
158
  const yBW = yBandScale.bandwidth();
159
+ // Heatmap cells fill their full slot (step), not just the band width. The
160
+ // shared x-scale carries bar-style padding (~0.2), so sizing cells to the
161
+ // bandwidth leaves gaps between columns while the local y-scale stays tight —
162
+ // an asymmetric, sparse grid. Sizing to the step and centering on the band
163
+ // keeps cells contiguous (a real heatmap); cellGap alone controls spacing.
164
+ const xStep = typeof xScale.step === 'function' ? xScale.step() : xBW;
165
+ const yStep = yBandScale.step();
159
166
 
160
167
  for (const d of data) {
161
168
  const xVal = xScale(String(d[xKey]));
@@ -168,10 +175,12 @@ export function ChartHeatmapGL({
168
175
  const t = (v - dMin) / range;
169
176
  const [r, g, b] = sampleRamp(ramp, t);
170
177
 
171
- const x0 = xVal + gap / 2;
172
- const x1 = xVal + xBW - gap / 2;
173
- const y0 = yVal + gap / 2;
174
- const y1 = yVal + yBW - gap / 2;
178
+ const xc = xVal + xBW / 2;
179
+ const yc = yVal + yBW / 2;
180
+ const x0 = xc - xStep / 2 + gap / 2;
181
+ const x1 = xc + xStep / 2 - gap / 2;
182
+ const y0 = yc - yStep / 2 + gap / 2;
183
+ const y1 = yc + yStep / 2 - gap / 2;
175
184
 
176
185
  positions.push(x0, y0, x1, y0, x0, y1, x1, y0, x1, y1, x0, y1);
177
186
  for (let i = 0; i < 6; i++) {
@@ -54,20 +54,15 @@ function toGradientCSS(colors: string[]): string {
54
54
  *
55
55
  * @example
56
56
  * ```
57
- * // Discrete
58
57
  * <ChartLegend items={[
59
58
  * {label: 'Revenue', color: colors[0]},
60
59
  * {label: 'Expenses', color: colors[1]},
61
60
  * ]} />
62
- *
63
- * // Continuous — pipe useChartColors() directly
64
61
  * <ChartLegend
65
62
  * gradient={useChartColors().sequential.blue(5)}
66
63
  * domain={[0, 100]}
67
64
  * label="Temperature"
68
65
  * />
69
- *
70
- * // Diverging
71
66
  * <ChartLegend
72
67
  * gradient={useChartColors().diverging.coldHot(7)}
73
68
  * domain={[-50, 50]}
@@ -96,17 +96,10 @@ export interface ChartTooltipProps {
96
96
  * in the top layer (via Popover API, portaled outside the SVG).
97
97
  *
98
98
  * @example
99
- * ```tsx
100
- * // Default: vertical crosshair + tooltip card
99
+ * ```
101
100
  * <ChartTooltip />
102
- *
103
- * // Both axes, with labels
104
101
  * <ChartTooltip crosshair="xy" crosshairLabels />
105
- *
106
- * // Tooltip only, no crosshair lines
107
102
  * <ChartTooltip crosshair={false} />
108
- *
109
- * // Custom render
110
103
  * <ChartTooltip render={(d) => <span>{d.month}: ${d.revenue}</span>} />
111
104
  * ```
112
105
  */
@@ -181,7 +181,7 @@ let editorInstanceCounter = 0;
181
181
  * auto-indent, tab insertion, and bracket auto-closing.
182
182
  *
183
183
  * @example
184
- * ```tsx
184
+ * ```
185
185
  * const [code, setCode] = useState('');
186
186
  * <CodeEditor
187
187
  * label="Source code"
@@ -61,19 +61,14 @@ export interface RadialChartProps {
61
61
  *
62
62
  * @example
63
63
  * ```
64
- * // Spider
65
64
  * <RadialChart data={data} axes={['speed', 'handling', 'comfort']} height={400}>
66
65
  * <RadialGrid rings={5} />
67
66
  * <RadialArea dataKey="modelA" color={colors[0]} />
68
67
  * <RadialAxis />
69
68
  * </RadialChart>
70
- *
71
- * // Pie
72
69
  * <RadialChart data={data} valueKey="revenue" labelKey="region" height={400}>
73
70
  * <RadialSlice />
74
71
  * </RadialChart>
75
- *
76
- * // Donut
77
72
  * <RadialChart data={data} valueKey="revenue" labelKey="region" innerRadius={0.6} height={400}>
78
73
  * <RadialSlice />
79
74
  * </RadialChart>
@@ -55,7 +55,7 @@ export interface RadialTooltipProps {
55
55
  * using polar coordinate math and renders a tooltip in the top layer.
56
56
  *
57
57
  * @example
58
- * ```tsx
58
+ * ```
59
59
  * <RadialChart data={data} valueKey="revenue" labelKey="region" height={400}>
60
60
  * <RadialSlice colors={colors} />
61
61
  * <RadialTooltip />
@@ -107,15 +107,14 @@ function resolveColumnCount(
107
107
  * Width is responsive but enforces minColumnWidth — scrolls when needed.
108
108
  *
109
109
  * @example
110
- * ```tsx
110
+ * ```
111
111
  * <SankeyChart
112
112
  * nodes={nodes}
113
113
  * links={links}
114
114
  * columns={[
115
115
  * {ids: ['a', 'b'], label: 'Source'},
116
116
  * {ids: ['c', 'd'], label: 'Target'},
117
- * ]}
118
- * >
117
+ * ]}>
119
118
  * <SankeyGrid />
120
119
  * <SankeyLink />
121
120
  * <SankeyNode />
@@ -430,7 +430,6 @@ const styles = stylex.create({
430
430
  *
431
431
  * @example
432
432
  * ```
433
- * // Generic icon + semantic color
434
433
  * <Step step={1} label="Payment" status="error" icon={<Icon icon="warning" />} />
435
434
  * ```
436
435
  */