@asanchez-sa/abby 0.3.0 → 0.5.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 (51) hide show
  1. package/dist/components/badge/badge.d.ts +3 -2
  2. package/dist/components/badge/badge.js +27 -11
  3. package/dist/components/calendar/calendar.d.ts +26 -5
  4. package/dist/components/calendar/calendar.js +387 -72
  5. package/dist/components/chart/chart.d.ts +7 -0
  6. package/dist/components/chart/chart.js +7 -0
  7. package/dist/components/chart/parts/bar.d.ts +32 -0
  8. package/dist/components/chart/parts/bar.js +348 -0
  9. package/dist/components/chart/parts/categories.d.ts +32 -0
  10. package/dist/components/chart/parts/categories.js +212 -0
  11. package/dist/components/chart/parts/legend.d.ts +16 -0
  12. package/dist/components/chart/parts/legend.js +82 -0
  13. package/dist/components/chart/parts/line.d.ts +43 -0
  14. package/dist/components/chart/parts/line.js +266 -0
  15. package/dist/components/chart/parts/scale.js +96 -0
  16. package/dist/components/chart/parts/scatter.d.ts +67 -0
  17. package/dist/components/chart/parts/scatter.js +157 -0
  18. package/dist/components/chart/parts/surface.d.ts +26 -0
  19. package/dist/components/chart/parts/surface.js +76 -0
  20. package/dist/components/chart/parts/table.js +105 -0
  21. package/dist/components/chart/parts/types.d.ts +44 -0
  22. package/dist/components/chart/parts/types.js +12 -0
  23. package/dist/components/filter-chip/filter-chip.d.ts +36 -0
  24. package/dist/components/filter-chip/filter-chip.js +97 -0
  25. package/dist/components/graph/graph.d.ts +151 -0
  26. package/dist/components/graph/graph.js +959 -0
  27. package/dist/components/model-selector/model-selector.d.ts +38 -3
  28. package/dist/components/model-selector/model-selector.js +331 -73
  29. package/dist/components/number-input/number-input.d.ts +14 -3
  30. package/dist/components/number-input/number-input.js +193 -34
  31. package/dist/components/spinner/spinner.d.ts +7 -1
  32. package/dist/components/spinner/spinner.js +86 -26
  33. package/dist/components/toast/toast.d.ts +19 -2
  34. package/dist/components/toast/toast.js +211 -49
  35. package/dist/components/toggle/toggle.d.ts +18 -4
  36. package/dist/components/toggle/toggle.js +167 -32
  37. package/dist/components/week-strip/week-strip.d.ts +27 -5
  38. package/dist/components/week-strip/week-strip.js +288 -134
  39. package/dist/styles/components.css +66 -0
  40. package/package.json +5 -1
  41. package/skills/agent-ready-ui/SKILL.md +1 -1
  42. package/skills/blocks/SKILL.md +1 -1
  43. package/skills/compose-screens/SKILL.md +48 -5
  44. package/skills/compose-screens/references/calendar-week.md +77 -0
  45. package/skills/compose-screens/references/charts-and-maps.md +298 -0
  46. package/skills/compose-screens/references/filter-chips.md +61 -0
  47. package/skills/compose-screens/references/number-units.md +52 -0
  48. package/skills/note-editor/SKILL.md +1 -1
  49. package/skills/note-status/SKILL.md +1 -1
  50. package/skills/setup/SKILL.md +1 -1
  51. package/skills/theming/SKILL.md +1 -1
@@ -0,0 +1,82 @@
1
+ "use client";
2
+ import { cn } from "../../../utilities/cn/index.js";
3
+ import { seriesColor, stackTotal, valueFormatter } from "./scale.js";
4
+ import { c } from "react/compiler-runtime";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ // src/components/chart/parts/legend.tsx
7
+ /** The total of one series over every category. */
8
+ function seriesTotal(data, series) {
9
+ return data.reduce((sum, row) => sum + stackTotal(row, [series]), 0);
10
+ }
11
+ /**
12
+ * A legend: a swatch in each series' color and its name. With `data` each entry
13
+ * also shows what its series adds up to over all the categories. The names are
14
+ * in the chart's table too, so a legend is plain text for a screen reader.
15
+ */
16
+ function ChartLegend(t0) {
17
+ const $ = c(14);
18
+ const { series, data, format, locale, className } = t0;
19
+ let t1;
20
+ let t2;
21
+ let t3;
22
+ if ($[0] !== className || $[1] !== data || $[2] !== format || $[3] !== locale || $[4] !== series) {
23
+ const text = valueFormatter(locale, format);
24
+ t1 = "chart-legend";
25
+ if ($[8] !== className) {
26
+ t2 = cn("flex flex-wrap items-center gap-x-4 gap-y-1", className);
27
+ $[8] = className;
28
+ $[9] = t2;
29
+ } else t2 = $[9];
30
+ t3 = series.map((each, index) => {
31
+ const color = seriesColor(each, index);
32
+ return /* @__PURE__ */ jsxs("li", {
33
+ "data-slot": "chart-legend-item",
34
+ className: "flex items-center gap-1.5 text-supporting",
35
+ children: [
36
+ /* @__PURE__ */ jsx("span", {
37
+ "aria-hidden": "true",
38
+ className: "size-2 shrink-0 rounded-2xs",
39
+ style: each.variant === "forecast" ? {
40
+ background: `color-mix(in srgb, ${color} 20%, transparent)`,
41
+ border: `1px dashed ${color}`
42
+ } : { background: color }
43
+ }),
44
+ /* @__PURE__ */ jsx("span", {
45
+ className: data ? "text-foreground" : "text-muted-foreground",
46
+ children: each.name
47
+ }),
48
+ data ? /* @__PURE__ */ jsx("span", {
49
+ className: "text-muted-foreground tabular-nums",
50
+ children: text(seriesTotal(data, each), "")
51
+ }) : null
52
+ ]
53
+ }, each.key);
54
+ });
55
+ $[0] = className;
56
+ $[1] = data;
57
+ $[2] = format;
58
+ $[3] = locale;
59
+ $[4] = series;
60
+ $[5] = t1;
61
+ $[6] = t2;
62
+ $[7] = t3;
63
+ } else {
64
+ t1 = $[5];
65
+ t2 = $[6];
66
+ t3 = $[7];
67
+ }
68
+ let t4;
69
+ if ($[10] !== t1 || $[11] !== t2 || $[12] !== t3) {
70
+ t4 = /* @__PURE__ */ jsx("ul", {
71
+ "data-slot": t1,
72
+ className: t2,
73
+ children: t3
74
+ });
75
+ $[10] = t1;
76
+ $[11] = t2;
77
+ $[12] = t3;
78
+ $[13] = t4;
79
+ } else t4 = $[13];
80
+ return t4;
81
+ }
82
+ export { ChartLegend };
@@ -0,0 +1,43 @@
1
+ import { CategoryChartProps } from "./categories.js";
2
+ import { ChartColor } from "./types.js";
3
+ export type LineReference = {
4
+ /** Where the line goes, in the chart's own unit. */
5
+ value: number;
6
+ /** The text at the line's start. Defaults to the value, formatted. */
7
+ label?: string;
8
+ /** Defaults to `border`, a hairline. */
9
+ color?: ChartColor;
10
+ };
11
+ export type LineChartProps = CategoryChartProps & {
12
+ /**
13
+ * Which points get a dot and their value: `ends` the first and the last,
14
+ * `last` only the last. A small chart always marks only the last.
15
+ */
16
+ mark?: "ends" | "last";
17
+ /** Horizontal lines to compare against, each with its label at the start. */
18
+ references?: LineReference[];
19
+ /**
20
+ * `sm` is a chart to put side by side with others: no axes and no grid, only
21
+ * the line with its last point and its value to the right.
22
+ */
23
+ size?: "default" | "sm";
24
+ /**
25
+ * The scale's minimum and maximum, used exactly. Charts that get the same
26
+ * `domain` (and `height`) draw the same value at the same height. Without it
27
+ * the scale runs from 0 to a round number above the largest value.
28
+ */
29
+ domain?: [number, number];
30
+ };
31
+ /**
32
+ * A trend by day or by week: one line over one series, one point per
33
+ * category. `mark` dots the first and last points and writes their values;
34
+ * `references` draws lines to compare against; `size="sm"` is the small chart
35
+ * for a grid of them, which get the same scale from `domain`. A missing value
36
+ * breaks the line.
37
+ *
38
+ * Drawn by TanStack Charts, like `BarChart`: one tab stop, the arrows move
39
+ * between points and the tooltip announces each one, and a table holds all the
40
+ * values. The chart's name (`aria-label` or `aria-labelledby`) is required.
41
+ * Only the first series is drawn: a chart has one line.
42
+ */
43
+ export declare function LineChart(props: LineChartProps): import("react").JSX.Element;
@@ -0,0 +1,266 @@
1
+ "use client";
2
+ import { CategoryTable, EmptyChart, categoryScale, valueDomain } from "./categories.js";
3
+ import { rowId, seriesColor } from "./scale.js";
4
+ import { Chart } from "./surface.js";
5
+ import { nameOf } from "./types.js";
6
+ import { c } from "react/compiler-runtime";
7
+ import { jsx } from "react/jsx-runtime";
8
+ import { defineChart, dot, lineY, ruleY, text } from "@tanstack/charts";
9
+ import { decorative } from "@tanstack/charts/mark/decorative";
10
+ import { tooltip } from "@tanstack/charts/tooltip";
11
+ // src/components/chart/parts/line.tsx
12
+ /** The dot at the end of a line, and the first one. Alma's: 4px with a ring, 3px. */
13
+ const lastDot = 4;
14
+ const firstDot = 3;
15
+ /** Room above the line for the value over a marked point: 4px of air and a 12px line. */
16
+ const valueRoom = 18;
17
+ /** The gap between a small chart's last dot and its value. */
18
+ const valueGap = 10;
19
+ /** What the x labels take under the plot, and the air TanStack leaves over it. */
20
+ const labelRoom = 24;
21
+ const topRoom = 8;
22
+ /**
23
+ * A trend by day or by week: one line over one series, one point per
24
+ * category. `mark` dots the first and last points and writes their values;
25
+ * `references` draws lines to compare against; `size="sm"` is the small chart
26
+ * for a grid of them, which get the same scale from `domain`. A missing value
27
+ * breaks the line.
28
+ *
29
+ * Drawn by TanStack Charts, like `BarChart`: one tab stop, the arrows move
30
+ * between points and the tooltip announces each one, and a table holds all the
31
+ * values. The chart's name (`aria-label` or `aria-labelledby`) is required.
32
+ * Only the first series is drawn: a chart has one line.
33
+ */
34
+ function LineChart(props) {
35
+ const $ = c(25);
36
+ const { data, series, mark: t0, references: t1, size: t2, domain, max } = props;
37
+ const mark = t0 === void 0 ? "ends" : t0;
38
+ let height;
39
+ let resolved;
40
+ let t3;
41
+ let t4;
42
+ if ($[0] !== data || $[1] !== domain || $[2] !== mark || $[3] !== max || $[4] !== props || $[5] !== series || $[6] !== t1 || $[7] !== t2) {
43
+ t4 = Symbol.for("react.early_return_sentinel");
44
+ bb0: {
45
+ const references = t1 === void 0 ? [] : t1;
46
+ const small = (t2 === void 0 ? "default" : t2) === "sm";
47
+ height = props.height ?? (small ? 96 : 120);
48
+ const line = series.slice(0, 1);
49
+ resolved = {
50
+ ...props,
51
+ series: line,
52
+ height,
53
+ yAxis: small ? false : props.yAxis,
54
+ xAxis: small ? false : props.xAxis,
55
+ grid: small ? false : props.grid
56
+ };
57
+ if (data.length === 0) {
58
+ t4 = /* @__PURE__ */ jsx(EmptyChart, { props: resolved });
59
+ break bb0;
60
+ }
61
+ const scale = categoryScale(resolved);
62
+ const { text: show } = scale;
63
+ const color = line[0] ? seriesColor(line[0], 0) : "var(--foreground)";
64
+ const points = data.map((row) => {
65
+ const value = line[0] ? row.values[line[0].key] : void 0;
66
+ return {
67
+ row,
68
+ id: rowId(row),
69
+ value: typeof value === "number" && Number.isFinite(value) ? value : null
70
+ };
71
+ });
72
+ const present = points.filter(_temp);
73
+ const first = present[0];
74
+ const last = present[present.length - 1];
75
+ const marked = [...!small && mark === "ends" && first && first !== last ? [first] : [], ...last ? [last] : []];
76
+ const plotHeight = Math.max(1, height - (resolved.xAxis === false ? 0 : labelRoom) - topRoom);
77
+ const values = valueDomain(data, line, {
78
+ max,
79
+ domain
80
+ });
81
+ const headroom = marked.length > 0 && !small ? valueRoom / plotHeight : 0;
82
+ const lastText = last && last.value !== null ? show(last.value) : "";
83
+ const isLast = (point_0) => point_0 === last;
84
+ let t5;
85
+ if ($[12] !== isLast) {
86
+ t5 = (point_6) => isLast(point_6) ? lastDot : firstDot;
87
+ $[12] = isLast;
88
+ $[13] = t5;
89
+ } else t5 = $[13];
90
+ t3 = defineChart({
91
+ marks: [
92
+ ...references.length > 0 ? [decorative(ruleY(references, {
93
+ y: _temp2,
94
+ stroke: _temp3,
95
+ strokeWidth: 1
96
+ })), decorative(text(references, {
97
+ x: () => points[0]?.id ?? "",
98
+ y: _temp4,
99
+ text: (reference_2) => reference_2.label ?? show(reference_2.value),
100
+ anchor: "start",
101
+ dy: -5,
102
+ fontSize: 11,
103
+ fill: "var(--subtle)"
104
+ }))] : [],
105
+ lineY(points, {
106
+ x: _temp5,
107
+ y: _temp6,
108
+ key: _temp7,
109
+ stroke: color,
110
+ strokeWidth: 2,
111
+ lineCap: "round",
112
+ lineJoin: "round"
113
+ }),
114
+ decorative(dot(marked, {
115
+ x: _temp8,
116
+ y: _temp9,
117
+ r: t5,
118
+ rScale: _temp0,
119
+ fill: color,
120
+ stroke: "var(--background)",
121
+ strokeWidth: 2
122
+ })),
123
+ decorative(text(marked, {
124
+ x: _temp1,
125
+ y: _temp10,
126
+ text: (point_9) => show(point_9.value),
127
+ ...small ? {
128
+ anchor: "start",
129
+ dx: valueGap,
130
+ fill: "var(--foreground)"
131
+ } : {
132
+ dy: -15,
133
+ fill: (point_10) => isLast(point_10) ? "var(--foreground)" : "var(--muted-foreground)"
134
+ },
135
+ fontSize: 12,
136
+ fontWeight: 600
137
+ }))
138
+ ],
139
+ scales: {
140
+ x: scale.xAxis("point"),
141
+ y: scale.yAxis({
142
+ ...values,
143
+ headroom
144
+ })
145
+ },
146
+ ...small ? { margin: {
147
+ top: 6,
148
+ bottom: 6,
149
+ left: 6,
150
+ right: lastText.length * 7 + valueGap + 6
151
+ } } : {},
152
+ focus: "nearest-x",
153
+ tooltip: {
154
+ use: tooltip,
155
+ content: (found) => {
156
+ const datum = found.find(_temp11)?.datum;
157
+ if (!datum || !("row" in datum)) return { rows: [] };
158
+ const point_11 = datum;
159
+ return {
160
+ title: point_11.row.label,
161
+ rows: [{
162
+ label: line[0]?.name ?? "",
163
+ value: show(point_11.value),
164
+ color
165
+ }]
166
+ };
167
+ }
168
+ }
169
+ });
170
+ }
171
+ $[0] = data;
172
+ $[1] = domain;
173
+ $[2] = mark;
174
+ $[3] = max;
175
+ $[4] = props;
176
+ $[5] = series;
177
+ $[6] = t1;
178
+ $[7] = t2;
179
+ $[8] = height;
180
+ $[9] = resolved;
181
+ $[10] = t3;
182
+ $[11] = t4;
183
+ } else {
184
+ height = $[8];
185
+ resolved = $[9];
186
+ t3 = $[10];
187
+ t4 = $[11];
188
+ }
189
+ if (t4 !== Symbol.for("react.early_return_sentinel")) return t4;
190
+ const definition = t3;
191
+ let t5;
192
+ if ($[14] !== props) {
193
+ t5 = nameOf(props);
194
+ $[14] = props;
195
+ $[15] = t5;
196
+ } else t5 = $[15];
197
+ let t6;
198
+ if ($[16] !== resolved) {
199
+ t6 = /* @__PURE__ */ jsx(CategoryTable, { props: resolved });
200
+ $[16] = resolved;
201
+ $[17] = t6;
202
+ } else t6 = $[17];
203
+ let t7;
204
+ if ($[18] !== definition || $[19] !== height || $[20] !== props.className || $[21] !== props.description || $[22] !== t5 || $[23] !== t6) {
205
+ t7 = /* @__PURE__ */ jsx(Chart, {
206
+ ...t5,
207
+ definition,
208
+ height,
209
+ description: props.description,
210
+ className: props.className,
211
+ children: t6
212
+ });
213
+ $[18] = definition;
214
+ $[19] = height;
215
+ $[20] = props.className;
216
+ $[21] = props.description;
217
+ $[22] = t5;
218
+ $[23] = t6;
219
+ $[24] = t7;
220
+ } else t7 = $[24];
221
+ return t7;
222
+ }
223
+ function _temp11(each) {
224
+ return "row" in each.datum;
225
+ }
226
+ function _temp10(point_8) {
227
+ return point_8.value;
228
+ }
229
+ function _temp1(point_7) {
230
+ return point_7.id;
231
+ }
232
+ function _temp0(radius) {
233
+ return radius;
234
+ }
235
+ function _temp9(point_5) {
236
+ return point_5.value;
237
+ }
238
+ function _temp8(point_4) {
239
+ return point_4.id;
240
+ }
241
+ function _temp7(point_3) {
242
+ return point_3.id;
243
+ }
244
+ function _temp6(point_2) {
245
+ return point_2.value;
246
+ }
247
+ function _temp5(point_1) {
248
+ return point_1.id;
249
+ }
250
+ function _temp4(reference_1) {
251
+ return reference_1.value;
252
+ }
253
+ function _temp3(reference_0) {
254
+ return reference_0.color ? seriesColor({
255
+ key: "",
256
+ name: "",
257
+ color: reference_0.color
258
+ }, 0) : "var(--border)";
259
+ }
260
+ function _temp2(reference) {
261
+ return reference.value;
262
+ }
263
+ function _temp(point) {
264
+ return point.value !== null;
265
+ }
266
+ export { LineChart };
@@ -0,0 +1,96 @@
1
+ // src/components/chart/parts/scale.ts
2
+ const steps = [
3
+ 1,
4
+ 2,
5
+ 2.5,
6
+ 5,
7
+ 10
8
+ ];
9
+ /**
10
+ * A round top for the scale and its ticks: 3 to 5 evenly spaced marks from 0.
11
+ * A chart with nothing to show (no values, or all of them zero) still gets a
12
+ * scale from 0 to 1, so the grid has somewhere to be.
13
+ */
14
+ function niceScale(largest, wanted = 4) {
15
+ if (!(largest > 0) || !Number.isFinite(largest)) return {
16
+ max: 1,
17
+ ticks: [
18
+ 0,
19
+ .5,
20
+ 1
21
+ ]
22
+ };
23
+ const raw = largest / Math.max(1, wanted - 1);
24
+ const power = 10 ** Math.floor(Math.log10(raw));
25
+ const step = (steps.find((each) => each * power >= raw) ?? 10) * power;
26
+ const count = Math.ceil(largest / step - 1e-9);
27
+ const ticks = Array.from({ length: count + 1 }, (_, index) => Number((index * step).toPrecision(12)));
28
+ return {
29
+ max: ticks[ticks.length - 1] ?? step,
30
+ ticks
31
+ };
32
+ }
33
+ /** A value that can be drawn: a finite number. */
34
+ function present(value) {
35
+ return typeof value === "number" && Number.isFinite(value);
36
+ }
37
+ /**
38
+ * What a category adds up to when its series are stacked: the sum of its
39
+ * values. A value that isn't above zero adds nothing, since a bar can't go
40
+ * below its baseline.
41
+ */
42
+ function stackTotal(row, series) {
43
+ let total = 0;
44
+ for (const each of series) {
45
+ const value = row.values[each.key];
46
+ if (present(value) && value > 0) total += value;
47
+ }
48
+ return total;
49
+ }
50
+ /** The category's identity, which `highlight` names. */
51
+ function rowId(row) {
52
+ return row.id ?? row.label;
53
+ }
54
+ /**
55
+ * The categories that get a label on the x axis: at most `wanted` of them,
56
+ * evenly spaced, so two never touch. The highlighted one is always labeled,
57
+ * and the labels next to it make room for it.
58
+ */
59
+ function labelIndices(count, wanted, highlighted = -1) {
60
+ if (count <= 0) return [];
61
+ const stride = Math.max(1, Math.ceil(count / Math.max(1, wanted)));
62
+ const shown = [];
63
+ for (let index = 0; index < count; index += stride) {
64
+ if (highlighted >= 0 && index !== highlighted && Math.abs(index - highlighted) < stride) continue;
65
+ shown.push(index);
66
+ }
67
+ if (highlighted >= 0 && !shown.includes(highlighted)) shown.push(highlighted);
68
+ return shown.sort((a, b) => a - b);
69
+ }
70
+ const tokens = /* @__PURE__ */ new Set([
71
+ "chart-1",
72
+ "chart-2",
73
+ "chart-3",
74
+ "chart-4",
75
+ "chart-5",
76
+ "primary",
77
+ "muted",
78
+ "warning",
79
+ "success",
80
+ "destructive"
81
+ ]);
82
+ /** The CSS color of a series: its token's variable, or the app's own color. */
83
+ function seriesColor(series, index) {
84
+ const color = series.color ?? `chart-${index % 5 + 1}`;
85
+ return tokens.has(color) ? `var(--${color})` : color;
86
+ }
87
+ /** The faint version of a color: Alma's tint, the color at 20%. */
88
+ function tintOf(color) {
89
+ return `color-mix(in srgb, ${color} 20%, transparent)`;
90
+ }
91
+ /** Formats a value with `Intl.NumberFormat`; a missing one is `missing`. */
92
+ function valueFormatter(locale, options) {
93
+ const formatter = new Intl.NumberFormat(locale, options);
94
+ return (value, missing) => typeof value === "number" && Number.isFinite(value) ? formatter.format(value) : missing;
95
+ }
96
+ export { labelIndices, niceScale, rowId, seriesColor, stackTotal, tintOf, valueFormatter };
@@ -0,0 +1,67 @@
1
+ import { ChartColor, ChartName } from "./types.js";
2
+ /** The keys of `T` whose values are numbers. */
3
+ type NumberKey<T> = { [K in keyof T & string]: T[K] extends number ? K : never; }[keyof T & string];
4
+ /** The keys of `T` whose values are text. */
5
+ type TextKey<T> = { [K in keyof T & string]: T[K] extends string ? K : never; }[keyof T & string];
6
+ export type ScatterChartProps<T> = ChartName & {
7
+ /** The app's rows, one point each. Each row is handed back as it is. */
8
+ data: readonly T[];
9
+ /** The number that places a row across. */
10
+ x: NumberKey<T>;
11
+ /** The number that places a row up. */
12
+ y: NumberKey<T>;
13
+ /** The number that sizes a row: the dot's area grows with it (a square-root scale). */
14
+ size?: NumberKey<T>;
15
+ /** The text that colors a row, like a segment. */
16
+ color?: TextKey<T>;
17
+ /**
18
+ * The color of each value of `color`, in the legend's order. A value that
19
+ * isn't listed takes the next of `chart-1` … `chart-5`.
20
+ */
21
+ colors?: Record<string, ChartColor>;
22
+ /** A row's name: the tooltip's title and the table's first column. */
23
+ label: (row: T) => string;
24
+ /** A row's identity, kept across updates. Defaults to its position. */
25
+ rowKey?: (row: T) => string | number;
26
+ /** The names of the axes and of the size, read in the tooltip and the table. */
27
+ xLabel?: string;
28
+ yLabel?: string;
29
+ sizeLabel?: string;
30
+ /** The name of `color`, for its row in the tooltip and its column in the table. */
31
+ colorLabel?: string;
32
+ /** Options of `Intl.NumberFormat`, for the axes, the tooltip and the table. */
33
+ xFormat?: Intl.NumberFormatOptions;
34
+ yFormat?: Intl.NumberFormatOptions;
35
+ sizeFormat?: Intl.NumberFormatOptions;
36
+ /** The locale of the formats. Defaults to the page's. */
37
+ locale?: string;
38
+ /** The smallest and largest dot's radius, in px. */
39
+ radius?: [number, number];
40
+ /** The chart's height in px. */
41
+ height?: number;
42
+ /** Read after the name: units, period, what the size means. */
43
+ description?: string;
44
+ /** Shows a `ChartLegend` of the colors under the plot. */
45
+ legend?: boolean;
46
+ /** The header of the table's first column. */
47
+ categoryHeader?: string;
48
+ /** The row a pointer or the keyboard reached, or `null` when it leaves. */
49
+ onFocusChange?: (row: T | null) => void;
50
+ /** The row a person clicked or pressed Enter on, or `null`. */
51
+ onSelect?: (row: T | null) => void;
52
+ className?: string;
53
+ };
54
+ /**
55
+ * A dot's radius from its value, with the area proportional to the value: the
56
+ * square root of the value's share of the largest, times the largest radius.
57
+ * A value at or under zero gets the smallest radius, so it still shows.
58
+ */
59
+ export declare function sqrtRadius(largest: number, [smallest, biggest]: [number, number]): (value: number) => number;
60
+ /**
61
+ * Rows plotted by two numbers: `x` across, `y` up, `size` for the dot's area
62
+ * and `color` for its group. A pointer or the arrows reach each dot and its
63
+ * tooltip names the row with every value; a hidden table holds them all. The
64
+ * chart's name (`aria-label` or `aria-labelledby`) is required.
65
+ */
66
+ export declare function ScatterChart<T>({ data, x, y, size, color, colors, label, rowKey, xLabel, yLabel, sizeLabel, colorLabel, xFormat, yFormat, sizeFormat, locale, radius, height, description, legend, categoryHeader, onFocusChange, onSelect, className, ...name }: ScatterChartProps<T>): import("react").JSX.Element;
67
+ export {};