@mechane-ai/elements 0.49.0 → 0.50.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 (102) hide show
  1. package/README.md +40 -2
  2. package/dist/{article-yyNPg6VU.js → article-CRlhq9oA.js} +531 -463
  3. package/dist/article.js +1 -1
  4. package/dist/catalog.json +37 -1
  5. package/dist/{categorical-values-DCznViFp.js → categorical-values-BYP_R5gS.js} +13 -13
  6. package/dist/charts/cartesian.js +1 -1
  7. package/dist/charts/comparison.js +1 -1
  8. package/dist/charts/distribution.js +1 -1
  9. package/dist/charts/figure.js +12 -12
  10. package/dist/charts/graph.js +1 -1
  11. package/dist/charts/hierarchy.js +1 -1
  12. package/dist/charts/image.js +1 -1
  13. package/dist/charts/matrix.js +1 -1
  14. package/dist/charts/plot.js +4 -4
  15. package/dist/charts/relationship.js +1 -1
  16. package/dist/charts/text.js +1 -1
  17. package/dist/charts/timeline.js +1 -1
  18. package/dist/charts/trend.js +1 -1
  19. package/dist/charts.js +7 -7
  20. package/dist/collections.js +1 -1
  21. package/dist/{dumbbell-plot-CMv9llfd.js → dumbbell-plot-BC8d_IJy.js} +45 -45
  22. package/dist/{embedding-map-DC-lgzCq.js → embedding-map-Bj8krO-d.js} +528 -528
  23. package/dist/figure-frame-koVKcXph.js +323 -0
  24. package/dist/{image-grid-DHqtj_zs.js → image-grid-CLhol2jy.js} +47 -47
  25. package/dist/kits/evaluation.js +50 -48
  26. package/dist/kits/interpretability.js +7 -7
  27. package/dist/kits/operations.js +4 -4
  28. package/dist/kits/research.js +346 -264
  29. package/dist/kits/training.js +3 -3
  30. package/dist/layout.js +1 -1075
  31. package/dist/lesson/spec.js +11 -11
  32. package/dist/lesson.js +4 -4
  33. package/dist/mdx.js +4 -4
  34. package/dist/packages/charts/src/chart-inspection.d.ts +4 -1
  35. package/dist/packages/charts/src/figure/caption-scope.d.ts +12 -0
  36. package/dist/packages/charts/src/figure/figure-frame.d.ts +2 -1
  37. package/dist/packages/charts/src/index.d.ts +2 -0
  38. package/dist/packages/collections/src/data-table-trigger.d.ts +2 -0
  39. package/dist/packages/kits/src/evaluation/leaderboard.d.ts +2 -0
  40. package/dist/packages/kits/src/research/collection-page.d.ts +46 -0
  41. package/dist/packages/kits/src/research/index.d.ts +2 -0
  42. package/dist/packages/kits/src/research/milestone-path.d.ts +1 -2
  43. package/dist/packages/kits/src/research/work-heartbeat.d.ts +4 -3
  44. package/dist/packages/layout/src/detail-page.d.ts +3 -1
  45. package/dist/packages/teaching/src/article/article-context.d.ts +2 -0
  46. package/dist/packages/teaching/src/article/article-layout.stylex.d.ts +13 -0
  47. package/dist/packages/teaching/src/article/article.d.ts +6 -1
  48. package/dist/packages/teaching/src/article/figure.d.ts +20 -3
  49. package/dist/packages/teaching/src/article/index.d.ts +1 -1
  50. package/dist/packages/teaching/src/article/view-essay.d.ts +2 -1
  51. package/dist/packages/teaching/src/lesson/define-lesson.d.ts +4 -0
  52. package/dist/packages/teaching/src/lesson/index.d.ts +2 -2
  53. package/dist/packages/teaching/src/lesson/lesson-player.d.ts +19 -3
  54. package/dist/packages/teaching/src/lesson/lesson-store.d.ts +2 -0
  55. package/dist/packages/teaching/src/lesson/playback.d.ts +9 -6
  56. package/dist/packages/teaching/src/lesson/use-lesson.d.ts +7 -2
  57. package/dist/packages/teaching/src/scene/plane/plane-labels.d.ts +4 -1
  58. package/dist/packages/teaching/src/scene/plane/scene-point.d.ts +5 -6
  59. package/dist/packages/teaching/src/scene/scene-geometry.d.ts +1 -1
  60. package/dist/packages/teaching/src/scene/scene-node.d.ts +4 -1
  61. package/dist/packages/teaching/src/scene/scene-validate.d.ts +6 -0
  62. package/dist/packages/teaching/src/scene/scene-wire.d.ts +6 -1
  63. package/dist/packages/teaching/src/scene/scene.d.ts +1 -1
  64. package/dist/packages/teaching/src/scene/shapes/cell-grid.d.ts +5 -1
  65. package/dist/packages/teaching/src/scene/shapes/scene-cells.d.ts +1 -1
  66. package/dist/packages/teaching/src/scene/shapes/scene-slot.d.ts +1 -1
  67. package/dist/packages/teaching/src/time/tween.d.ts +2 -0
  68. package/dist/{param-BE3VMSkH.js → param-BdqTpZER.js} +166 -99
  69. package/dist/{plot-layout-Bqe4-0qZ.js → plot-layout-B2xRt-_k.js} +144 -130
  70. package/dist/{plot-surface-DON6WUmk.js → plot-surface-0cKFwtws.js} +1 -1
  71. package/dist/{reference-lines-hjuD1rRZ.js → reference-lines-nSxcZVF5.js} +1 -1
  72. package/dist/{scene-BP0Ue0R5.js → scene-4ePpWdmE.js} +1227 -1125
  73. package/dist/scene.js +1 -1
  74. package/dist/{slope-chart-C8eeSgL4.js → slope-chart-DWZIYDty.js} +179 -179
  75. package/dist/{src-B2rgpWap.js → src-DNclWY4V.js} +1 -1
  76. package/dist/src-DhWMspwr.js +1085 -0
  77. package/dist/styles2.css +77 -14
  78. package/dist/{time-series-BL933QyA.js → time-series-CsngFxr1.js} +952 -948
  79. package/dist/{token-heatmap-BB65awva.js → token-heatmap-BQLIxPky.js} +84 -84
  80. package/dist/{token-predictions-Pa8eUGan.js → token-predictions-C3B5L-eO.js} +126 -126
  81. package/dist/{transport-DzyxVXbL.js → transport-4V9rfYHN.js} +278 -233
  82. package/dist/{tree-diagram-DJhKBiia.js → tree-diagram-Dau9jeXS.js} +115 -115
  83. package/dist/{treemap-CxxgABUg.js → treemap-DWrMQndu.js} +27 -27
  84. package/dist/use-tween-BsaEO862.js +10 -0
  85. package/dist/{violin-plot-CoAEF_7Z.js → violin-plot-D05ODcyc.js} +123 -123
  86. package/dist/{waterfall-DdoEXEkT.js → waterfall-BkLLv2Lm.js} +39 -39
  87. package/package.json +1 -1
  88. package/recipes/counting-cards.tsx +3 -3
  89. package/skills/review-elements/SKILL.md +14 -0
  90. package/skills/review-explainer/SKILL.md +2 -1
  91. package/skills/upgrade-elements/references/releases.md +61 -0
  92. package/skills/use-elements/SKILL.md +21 -17
  93. package/skills/use-elements/references/editorial-restraint.md +40 -0
  94. package/skills/use-elements/references/styling.md +23 -0
  95. package/skills/use-elements/references/teaching.md +13 -0
  96. package/skills/use-elements/references/workspace.md +14 -8
  97. package/skills/write-explainer/references/article.md +50 -2
  98. package/skills/write-explainer/references/lesson.md +18 -9
  99. package/skills/write-explainer/references/scene-parts.md +17 -12
  100. package/skills/write-explainer/references/scene.md +25 -3
  101. package/dist/figure-frame-BjFzbl3m.js +0 -270
  102. package/dist/use-tween-5HZ55_9d.js +0 -72
@@ -0,0 +1,323 @@
1
+ import { r as e } from "./tokens.stylex-dF5CACEJ.js";
2
+ import { t } from "./accessibility-P89UG9-r.js";
3
+ import { t as n } from "./src-9EJskqB_.js";
4
+ import { d as r, m as i, u as a } from "./src-npqwq3Sa.js";
5
+ import { T as o, b as s, c, w as l } from "./plot-layout-B2xRt-_k.js";
6
+ import * as u from "@stylexjs/stylex";
7
+ import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
8
+ import { formatNumber as m } from "@ui-sdk/core/number";
9
+ // packages/charts/src/chart-data.tsx
10
+ function h({ label: e, columns: n, rows: r }) {
11
+ return /* @__PURE__ */ f("div", {
12
+ ...u.props(t.hidden),
13
+ children: /* @__PURE__ */ p("table", { children: [
14
+ /* @__PURE__ */ f("caption", { children: e }),
15
+ /* @__PURE__ */ f("thead", { children: /* @__PURE__ */ f("tr", { children: n.map((e) => /* @__PURE__ */ f("th", {
16
+ scope: "col",
17
+ children: e.label
18
+ }, e.id)) }) }),
19
+ /* @__PURE__ */ f("tbody", { children: r.map((e) => /* @__PURE__ */ f("tr", { children: n.map((t, n) => n === 0 ? /* @__PURE__ */ f("th", {
20
+ scope: "row",
21
+ children: e.values[n]
22
+ }, t.id) : /* @__PURE__ */ f("td", { children: e.values[n] }, t.id)) }, e.id)) })
23
+ ] })
24
+ });
25
+ }
26
+ // packages/charts/src/chart-inspection.tsx
27
+ var g = {
28
+ kzqmXN: "x1xc55vz",
29
+ kZKoxP: "xdk7pt",
30
+ kmuXW: "x2lah0s",
31
+ $$css: !0
32
+ }, _ = {
33
+ swatch: (e) => [
34
+ g,
35
+ {
36
+ kWkggS: e == null ? e : "xl8spv7",
37
+ $$css: !0
38
+ },
39
+ { "--x-backgroundColor": e ?? void 0 }
40
+ ],
41
+ inspector: {
42
+ k1xSpc: "xrvj5dj x1boff50",
43
+ kOIVth: "xunmzkg",
44
+ kVAEAm: "x10l6tqk",
45
+ k87sOh: "x1ridm32",
46
+ kB7OPa: "x9f619",
47
+ kfzvcC: "x47corl",
48
+ kmVPX3: "x69ldcm",
49
+ kMzoRj: "xmkeg23",
50
+ ksu8eU: "x1y0btm7",
51
+ kVAM5u: "x1ey3b81",
52
+ kaIpWk: "x1ok0vyi",
53
+ kGVxlE: "x1ghndwu",
54
+ kWkggS: "xpvm0e4",
55
+ kMwMTN: "xbixft",
56
+ kGuDYH: "xy8obcc",
57
+ kLWn49: "xas2l8k",
58
+ kcqcaj: "xss6m8b",
59
+ kHjlTd: "xj0a0fe",
60
+ $$css: !0
61
+ },
62
+ summaryInspector: {
63
+ k1xSpc: "xrvj5dj x1xnx9c1",
64
+ $$css: !0
65
+ },
66
+ position: (e, t) => [{
67
+ kbCHJM: e == null ? e : "xgq9j65",
68
+ kzqmXN: t == null ? t : "x5lhr3w",
69
+ $$css: !0
70
+ }, {
71
+ "--x-left": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(e),
72
+ "--x-width": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(t)
73
+ }]
74
+ }, v = 4;
75
+ function y() {
76
+ return /* @__PURE__ */ f("ul", {
77
+ "aria-hidden": !0,
78
+ inert: !0,
79
+ className: "x78zum5 x1xnx9c1 xnby9oq x1a02dak x1pha0wt x8zbtdt x1gkm1c7 x1ghz6dp x1717udv xe8uvvx x153jb6y xy8obcc xas2l8k",
80
+ children: Array.from({ length: v }, (t, n) => /* @__PURE__ */ p("li", {
81
+ className: "x78zum5 x1pha0wt xunmzkg xeuugli xj0a0fe x1f394nn x43dure",
82
+ children: [/* @__PURE__ */ f("span", { ...u.props(_.swatch(e.line)) }), /* @__PURE__ */ p("span", {
83
+ className: "x1cqoux5 xeuugli",
84
+ children: [
85
+ /* @__PURE__ */ f(r, {}),
86
+ /* @__PURE__ */ f("span", {
87
+ className: "x1s85apg xannxpe",
88
+ children: /* @__PURE__ */ f(r, {})
89
+ }),
90
+ /* @__PURE__ */ f("span", {
91
+ className: "x1s85apg xannxpe x1mqbd49 xbixft xss6m8b",
92
+ children: /* @__PURE__ */ f(r, {})
93
+ })
94
+ ]
95
+ })]
96
+ }, n))
97
+ });
98
+ }
99
+ function b({ title: e, detail: t }) {
100
+ return t === void 0 ? e : /* @__PURE__ */ p("span", {
101
+ "aria-label": e,
102
+ className: "x1lliihq xb3r6kr xlyipyv xuxw1ft",
103
+ children: [/* @__PURE__ */ f("span", {
104
+ className: "xt0psk2 x1boff50",
105
+ children: e
106
+ }), /* @__PURE__ */ f("span", {
107
+ className: "x1s85apg xfodcyb",
108
+ children: t
109
+ })]
110
+ });
111
+ }
112
+ function x({ label: e, summary: t, rows: n, notes: r = [] }) {
113
+ if (e !== void 0) return [
114
+ e,
115
+ t,
116
+ ...n.map((e) => `${e.label}: ${e.value}`),
117
+ ...r
118
+ ].filter((e) => e !== void 0).join(" · ");
119
+ }
120
+ function S({ id: e, label: t, summary: n, legend: r, layoutLegend: i, rows: a, x: s, width: c, offset: l = 16, notes: m = [], hasSeriesSummary: h = !1, hasLegend: g = !0, mode: v = "inline" }) {
121
+ let y = g && !h, b = v === "inline", S = t !== void 0, C = b && S, w = !y && b, T = !b && S, E = Math.min(260, Math.max(0, c)), D = s > c / 2 ? s - E - l : s + l, O = Math.max(0, Math.min(Math.max(0, c - E), D)), k = y ? /* @__PURE__ */ p("div", {
122
+ className: "xrvj5dj xeuugli",
123
+ children: [i === void 0 ? null : /* @__PURE__ */ f("ul", {
124
+ "aria-hidden": !0,
125
+ inert: !0,
126
+ className: "x78zum5 x1xnx9c1 xnby9oq x1a02dak x1pha0wt x8zbtdt x1gkm1c7 x1ghz6dp x1717udv xe8uvvx x153jb6y xy8obcc xas2l8k x15r89dc xlshs6z x47corl",
127
+ children: i.map((e) => /* @__PURE__ */ p("li", {
128
+ className: "x78zum5 x1pha0wt xunmzkg xeuugli xj0a0fe",
129
+ children: [/* @__PURE__ */ f(o, {
130
+ tone: e.tone,
131
+ shape: e.shape
132
+ }), /* @__PURE__ */ p("span", {
133
+ className: "xeuugli",
134
+ children: [e.label, /* @__PURE__ */ f("span", { className: "x1s85apg xannxpe x1mqbd49 xbixft xss6m8b" })]
135
+ })]
136
+ }, e.id))
137
+ }), /* @__PURE__ */ p("ul", {
138
+ "aria-label": "Legend",
139
+ className: "x78zum5 x1xnx9c1 xnby9oq x1a02dak x1pha0wt x8zbtdt x1gkm1c7 x1ghz6dp x1717udv xe8uvvx x153jb6y xy8obcc xas2l8k x15r89dc",
140
+ children: [C ? /* @__PURE__ */ p("li", {
141
+ className: "xbixft xk4h15q xss6m8b xuxw1ft",
142
+ children: [t, n === void 0 ? "" : ` · ${n}`]
143
+ }) : null, r.map((e) => {
144
+ let n = t === void 0 ? void 0 : a.find((t) => t.id === e.id)?.value ?? "—", r = b ? n === void 0 ? null : /* @__PURE__ */ f("span", {
145
+ className: "xa1dmyi xbixft xk4h15q xss6m8b xuxw1ft",
146
+ children: n
147
+ }) : /* @__PURE__ */ f("span", {
148
+ className: "x1s85apg xannxpe x1mqbd49 xbixft xss6m8b",
149
+ children: n ?? ""
150
+ });
151
+ return /* @__PURE__ */ p("li", {
152
+ className: "x78zum5 x1pha0wt xunmzkg xeuugli xj0a0fe",
153
+ children: [/* @__PURE__ */ f(o, {
154
+ tone: e.tone,
155
+ shape: e.shape
156
+ }), /* @__PURE__ */ p("span", {
157
+ className: "xeuugli",
158
+ children: [e.label, r]
159
+ })]
160
+ }, e.id);
161
+ })]
162
+ })]
163
+ }) : null;
164
+ return /* @__PURE__ */ p("div", {
165
+ className: "xeuugli",
166
+ children: [
167
+ k,
168
+ w && /* @__PURE__ */ f("div", {
169
+ "aria-hidden": !0,
170
+ className: "x78zum5 x1a02dak x1pha0wt x8zbtdt x1gkm1c7 x1mqbd49 x153jb6y xy8obcc xas2l8k xss6m8b",
171
+ children: S && /* @__PURE__ */ p(d, { children: [
172
+ /* @__PURE__ */ p("span", {
173
+ className: "xbixft xk4h15q xss6m8b xuxw1ft",
174
+ children: [t, n === void 0 ? "" : ` · ${n}`]
175
+ }),
176
+ a.map((e) => /* @__PURE__ */ p("span", {
177
+ className: "x78zum5 x1pha0wt xunmzkg xeuugli xj0a0fe",
178
+ children: [
179
+ /* @__PURE__ */ f(o, {
180
+ tone: e.tone,
181
+ shape: e.shape
182
+ }),
183
+ e.label,
184
+ /* @__PURE__ */ f("span", {
185
+ className: "xa1dmyi xbixft xk4h15q xss6m8b xuxw1ft",
186
+ children: e.value
187
+ })
188
+ ]
189
+ }, e.id)),
190
+ m.map((e) => /* @__PURE__ */ f("span", { children: e }, e))
191
+ ] })
192
+ }),
193
+ /* @__PURE__ */ f("span", {
194
+ id: e,
195
+ className: "x10l6tqk x1i1rx1s xjm9jq1 x1717udv xb3r6kr x1hyvwdk xuxw1ft",
196
+ children: x({
197
+ label: t,
198
+ summary: n,
199
+ rows: a,
200
+ notes: m
201
+ })
202
+ }),
203
+ T && /* @__PURE__ */ f("div", {
204
+ "aria-hidden": !0,
205
+ className: "x1n2onr6 xqtp20y x1vjfegm",
206
+ children: /* @__PURE__ */ p("div", {
207
+ ...u.props(_.inspector, !y && _.summaryInspector, _.position(O, E)),
208
+ children: [
209
+ /* @__PURE__ */ p("div", {
210
+ className: "x78zum5 x1qughib x1hnptsi xk4h15q",
211
+ children: [/* @__PURE__ */ f("span", { children: t }), n !== void 0 && /* @__PURE__ */ f("span", { children: n })]
212
+ }),
213
+ /* @__PURE__ */ f("dl", {
214
+ className: "xrvj5dj xunmzkg x1ghz6dp",
215
+ children: a.map((e) => /* @__PURE__ */ p("div", {
216
+ className: "x78zum5 x1qughib x1pha0wt x1hnptsi",
217
+ children: [/* @__PURE__ */ p("dt", {
218
+ className: "x78zum5 x1pha0wt xunmzkg xeuugli xj0a0fe",
219
+ children: [/* @__PURE__ */ f(o, {
220
+ tone: e.tone,
221
+ shape: e.shape
222
+ }), e.label]
223
+ }), /* @__PURE__ */ f("dd", {
224
+ className: "x1ghz6dp xuxw1ft",
225
+ children: e.value
226
+ })]
227
+ }, e.id))
228
+ }),
229
+ m.map((e) => /* @__PURE__ */ f("span", { children: e }, e))
230
+ ]
231
+ })
232
+ })
233
+ ]
234
+ });
235
+ }
236
+ // packages/charts/src/figure/figure-frame.tsx
237
+ var C = {
238
+ notation: "compact",
239
+ compactDisplay: "long"
240
+ }, w = 1e5;
241
+ function T(e, t) {
242
+ return m(e, t, e < w ? {} : C);
243
+ }
244
+ function E(e, t) {
245
+ return `${T(e.shown, t)} of ${T(e.total, t)} ${e.unit} shown`;
246
+ }
247
+ function D({ title: e, description: r, report: i, actions: a, locale: o, source: c, coverage: d, transforms: m = [], status: h = "ready", figure: g = {}, series: _, titleDetail: v, footer: y, seriesLegend: x, scaleLegend: S, children: C }) {
248
+ let w = l(), T = d !== void 0 && d.shown < d.total ? E(d, o) : void 0, D = [
249
+ w ? T : void 0,
250
+ c,
251
+ ...m
252
+ ].filter((e) => e !== void 0), O = w ? v : void 0, k = y !== void 0 || O !== void 0 || D.length > 0, A = /* @__PURE__ */ f(b, {
253
+ title: e,
254
+ detail: v
255
+ }), j = i === void 0 ? {} : { "data-figure-report": "" }, M = T === void 0 ? A : /* @__PURE__ */ p("span", {
256
+ className: "x3nfvp2 x1a02dak x1pha0wt xa2sdi0 x1gkm1c7",
257
+ children: [A, /* @__PURE__ */ f(n, { children: T })]
258
+ });
259
+ return /* @__PURE__ */ p(s, {
260
+ figure: {
261
+ ...g,
262
+ ...j,
263
+ "aria-busy": h !== "ready" || void 0
264
+ },
265
+ title: w ? /* @__PURE__ */ f("span", {
266
+ ...u.props(t.hidden),
267
+ children: e
268
+ }) : M,
269
+ description: w ? void 0 : r,
270
+ report: i,
271
+ actions: a,
272
+ series: _,
273
+ seriesLegend: x,
274
+ scaleLegend: S,
275
+ footer: k ? /* @__PURE__ */ p("div", {
276
+ className: "xrvj5dj xunmzkg xeuugli",
277
+ children: [
278
+ O !== void 0 && /* @__PURE__ */ f("p", {
279
+ "aria-hidden": !0,
280
+ className: "x1s85apg xannxpe x1ghz6dp xbixft xj0a0fe",
281
+ children: O
282
+ }),
283
+ y,
284
+ D.length > 0 && /* @__PURE__ */ f("p", {
285
+ className: "x1ghz6dp xeuugli xj0a0fe",
286
+ children: D.join(" · ")
287
+ })
288
+ ]
289
+ }) : void 0,
290
+ children: [w && r !== void 0 && /* @__PURE__ */ f("p", {
291
+ ...u.props(t.hidden),
292
+ children: r
293
+ }), C]
294
+ });
295
+ }
296
+ function O({ children: e }) {
297
+ return /* @__PURE__ */ f("p", {
298
+ className: "x1ghz6dp x153jb6y xtqrqnz x1778rvt",
299
+ children: e
300
+ });
301
+ }
302
+ function k({ message: e, ...t }) {
303
+ return /* @__PURE__ */ f(D, {
304
+ ...t,
305
+ status: "ready",
306
+ children: /* @__PURE__ */ f(i, {
307
+ hasError: !0,
308
+ children: e
309
+ })
310
+ });
311
+ }
312
+ function A({ height: e = "regular", ...t }) {
313
+ return /* @__PURE__ */ f("div", {
314
+ "aria-hidden": !0,
315
+ inert: !0,
316
+ children: /* @__PURE__ */ f(D, {
317
+ ...t,
318
+ status: "loading",
319
+ children: /* @__PURE__ */ f(a, { height: c[e] })
320
+ })
321
+ });
322
+ }
323
+ export { E as a, x as c, A as i, h as l, D as n, S as o, k as r, y as s, O as t };
@@ -1,10 +1,10 @@
1
1
  import { r as e } from "./tokens.stylex-dF5CACEJ.js";
2
2
  import { x as t } from "./src-Dxs3Buo_.js";
3
3
  import { t as n } from "./chart-tones-ei3BC2AL.js";
4
- import { A as r, E as i, O as a, S as o, T as s, k as c, w as l } from "./plot-layout-Bqe4-0qZ.js";
4
+ import { A as r, D as i, E as a, M as o, O as s, S as c, j as l } from "./plot-layout-B2xRt-_k.js";
5
5
  import { r as u } from "./figure-format-B8kRZMlo.js";
6
6
  import { a as d, o as f } from "./scale-C2xgZyZN.js";
7
- import { i as p, l as m, n as h, r as g, t as _ } from "./figure-frame-BjFzbl3m.js";
7
+ import { i as p, l as m, n as h, r as g, t as _ } from "./figure-frame-koVKcXph.js";
8
8
  import { n as v, t as y } from "./plot-width-D3hTycYX.js";
9
9
  import * as b from "@stylexjs/stylex";
10
10
  import { useId as x, useState as S } from "react";
@@ -125,11 +125,11 @@ var B = {
125
125
  $$css: !0
126
126
  };
127
127
  function V(e) {
128
- let { image: n, grid: r, valueLabel: s, valueFormat: d, domain: f, palette: y, opacity: E, onOpacityChange: D, ...O } = e, { emptyLabel: A = "No values are available.", ...j } = O, { locale: M, title: F } = j, [z, V] = S(E ?? I), H = x();
128
+ let { image: n, grid: i, valueLabel: o, valueFormat: d, domain: f, palette: y, opacity: E, onOpacityChange: D, ...O } = e, { emptyLabel: A = "No values are available.", ...j } = O, { locale: M, title: F } = j, [z, V] = S(E ?? I), H = x();
129
129
  if (j.status === "loading") return /* @__PURE__ */ w(p, { ...j });
130
130
  let U = te({
131
131
  image: n,
132
- grid: r,
132
+ grid: i,
133
133
  domain: f,
134
134
  palette: y,
135
135
  opacity: E
@@ -138,7 +138,7 @@ function V(e) {
138
138
  ...j,
139
139
  message: U
140
140
  });
141
- let { columns: W, rows: G, values: K } = r, q = D === void 0 ? z : E ?? I, J = {
141
+ let { columns: W, rows: G, values: K } = i, q = D === void 0 ? z : E ?? I, J = {
142
142
  domain: f,
143
143
  palette: y
144
144
  };
@@ -163,17 +163,17 @@ function V(e) {
163
163
  let t = Math.min(W - 1, Math.max(0, Math.floor(e.x / e.width * W)));
164
164
  return `${Math.min(G - 1, Math.max(0, Math.floor(e.y / e.height * G)))},${t}`;
165
165
  }
166
- return /* @__PURE__ */ w(l, {
166
+ return /* @__PURE__ */ w(a, {
167
167
  items: X,
168
168
  columns: W,
169
169
  locate: Q,
170
- render: (e, r) => {
171
- let l = X.find((e) => e.id === r.inspected), u = X.find((e) => e.id === r.cursor);
170
+ render: (e, i) => {
171
+ let a = X.find((e) => e.id === i.inspected), u = X.find((e) => e.id === i.cursor);
172
172
  return /* @__PURE__ */ w(h, {
173
173
  ...j,
174
174
  figure: e,
175
175
  scaleLegend: K.length === 0 ? void 0 : /* @__PURE__ */ w(N, {
176
- label: s,
176
+ label: o,
177
177
  domain: f,
178
178
  palette: y,
179
179
  ends: {
@@ -207,15 +207,15 @@ function V(e) {
207
207
  className: "x1ghz6dp x153jb6y xy8obcc xas2l8k",
208
208
  children: "Dashed cells have no value."
209
209
  }),
210
- /* @__PURE__ */ w(o, {
210
+ /* @__PURE__ */ w(c, {
211
211
  id: H,
212
- children: a(X, r.inspected)
212
+ children: r(X, i.inspected)
213
213
  })
214
214
  ]
215
215
  }),
216
- children: K.length === 0 ? /* @__PURE__ */ w(_, { children: A }) : /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ T(i, {
216
+ children: K.length === 0 ? /* @__PURE__ */ w(_, { children: A }) : /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ T(s, {
217
217
  role: "group",
218
- "aria-label": c({
218
+ "aria-label": l({
219
219
  title: F,
220
220
  marks: "cells",
221
221
  isSelectable: !1
@@ -249,9 +249,9 @@ function V(e) {
249
249
  height: 1,
250
250
  className: "xbh8q5q x17y187c xnpr05h xbw2l0c x13efnbd"
251
251
  }, e.id) : null),
252
- l !== void 0 && /* @__PURE__ */ w("rect", {
253
- x: l.column,
254
- y: l.row,
252
+ a !== void 0 && /* @__PURE__ */ w("rect", {
253
+ x: a.column,
254
+ y: a.row,
255
255
  width: 1,
256
256
  height: 1,
257
257
  fill: "none",
@@ -274,7 +274,7 @@ function V(e) {
274
274
  label: "Cell"
275
275
  }, {
276
276
  id: "value",
277
- label: s
277
+ label: o
278
278
  }],
279
279
  rows: X.map((e) => ({
280
280
  id: e.id,
@@ -287,7 +287,7 @@ function V(e) {
287
287
  }
288
288
  // packages/charts/src/image/image-input.ts
289
289
  function H(e) {
290
- if (!r(e)) return "Images must have unique identifiers.";
290
+ if (!o(e)) return "Images must have unique identifiers.";
291
291
  let t = e.find((e) => e.alt.trim() === "");
292
292
  if (t !== void 0) return `Image ${t.id} needs alt text, so a reader who cannot see it knows what it shows.`;
293
293
  let n = e.find((e) => typeof e.value == "number" && !Number.isFinite(e.value));
@@ -349,17 +349,17 @@ var W = {
349
349
  $$css: !0
350
350
  }
351
351
  };
352
- function K({ id: e, label: t, src: n, alt: r, ratio: i, view: a, isSelectable: o, place: c }) {
353
- let l = a.selected === e, u = a.cursor === e;
354
- return /* @__PURE__ */ w(s, {
352
+ function K({ id: e, label: t, src: n, alt: r, ratio: a, view: o, isSelectable: s, place: c }) {
353
+ let l = o.selected === e, u = o.cursor === e;
354
+ return /* @__PURE__ */ w(i, {
355
355
  value: e,
356
356
  render: /* @__PURE__ */ w("button", {
357
357
  type: "button",
358
358
  tabIndex: -1,
359
359
  "aria-label": t,
360
- "aria-pressed": o ? l : void 0
360
+ "aria-pressed": s ? l : void 0
361
361
  }),
362
- ...b.props(G.tile, G.ratio(i), o && G.action, (l || u) && G.raised, a.inspected === e && G.inspected, l && G.selected, u && v.cursor, c !== void 0 && G.placed(c.column, c.row)),
362
+ ...b.props(G.tile, G.ratio(a), s && G.action, (l || u) && G.raised, o.inspected === e && G.inspected, l && G.selected, u && v.cursor, c !== void 0 && G.placed(c.column, c.row)),
363
363
  children: /* @__PURE__ */ w(P, {
364
364
  src: n,
365
365
  alt: r
@@ -407,18 +407,18 @@ var re = {
407
407
  $$css: !0
408
408
  };
409
409
  function ie(e) {
410
- let { columns: t, rows: n, cells: r, xLabel: s, yLabel: u, valueLabel: d = J, valueFormat: f = Y, selected: v, onSelectedChange: y, ...S } = e, { emptyLabel: E = "No images are available.", ...D } = S, { locale: O, title: k } = D, A = x();
410
+ let { columns: t, rows: n, cells: i, xLabel: o, yLabel: u, valueLabel: d = J, valueFormat: f = Y, selected: v, onSelectedChange: y, ...S } = e, { emptyLabel: E = "No images are available.", ...D } = S, { locale: O, title: k } = D, A = x();
411
411
  if (D.status === "loading") return /* @__PURE__ */ w(p, { ...D });
412
412
  let j = ne({
413
413
  columns: t,
414
414
  rows: n,
415
- cells: r
415
+ cells: i
416
416
  });
417
417
  if (j !== void 0) return /* @__PURE__ */ w(g, {
418
418
  ...D,
419
419
  message: j
420
420
  });
421
- let M = r.map((e) => ({
421
+ let M = i.map((e) => ({
422
422
  cell: e,
423
423
  label: U({
424
424
  record: e,
@@ -430,18 +430,18 @@ function ie(e) {
430
430
  })), N = M.map((e) => ({
431
431
  id: e.cell.id,
432
432
  label: e.label
433
- })), P = new Map(r.map((e) => [e.id, {
433
+ })), P = new Map(i.map((e) => [e.id, {
434
434
  left: e.column,
435
435
  top: e.row,
436
436
  right: e.column + 1,
437
437
  bottom: e.row + 1
438
- }])), F = [s === void 0 ? void 0 : `Left to right: ${s}`, u === void 0 ? void 0 : `Top to bottom: ${u}`].filter((e) => e !== void 0);
439
- return /* @__PURE__ */ w(l, {
438
+ }])), F = [o === void 0 ? void 0 : `Left to right: ${o}`, u === void 0 ? void 0 : `Top to bottom: ${u}`].filter((e) => e !== void 0);
439
+ return /* @__PURE__ */ w(a, {
440
440
  items: N,
441
441
  place: (e) => P.get(e),
442
442
  selected: v ?? null,
443
443
  onSelect: y,
444
- render: (e, s) => /* @__PURE__ */ w(h, {
444
+ render: (e, a) => /* @__PURE__ */ w(h, {
445
445
  ...D,
446
446
  figure: e,
447
447
  footer: /* @__PURE__ */ T("div", {
@@ -449,14 +449,14 @@ function ie(e) {
449
449
  children: [F.length > 0 && /* @__PURE__ */ w("p", {
450
450
  className: "x1ghz6dp x153jb6y xy8obcc xas2l8k",
451
451
  children: F.join(" · ")
452
- }), /* @__PURE__ */ w(o, {
452
+ }), /* @__PURE__ */ w(c, {
453
453
  id: A,
454
- children: a(N, s.inspected)
454
+ children: r(N, a.inspected)
455
455
  })]
456
456
  }),
457
- children: r.length === 0 ? /* @__PURE__ */ w(_, { children: E }) : /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(i, {
457
+ children: i.length === 0 ? /* @__PURE__ */ w(_, { children: E }) : /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(s, {
458
458
  role: "group",
459
- "aria-label": c({
459
+ "aria-label": l({
460
460
  title: k,
461
461
  marks: "images",
462
462
  isSelectable: y !== void 0
@@ -469,7 +469,7 @@ function ie(e) {
469
469
  src: e.src,
470
470
  alt: e.alt,
471
471
  ratio: 1,
472
- view: s,
472
+ view: a,
473
473
  isSelectable: y !== void 0,
474
474
  place: e
475
475
  }, e.id))
@@ -508,31 +508,31 @@ var fe = {
508
508
  $$css: !0
509
509
  };
510
510
  function pe(e) {
511
- let { items: t, valueLabel: n = ae, valueFormat: r = oe, columns: s, aspectRatio: d = ce, selected: f, onSelectedChange: v, ...S } = e, { emptyLabel: E = "No images are available.", ...D } = S, { locale: O, title: k } = D, A = x(), { ref: j, width: M } = y();
511
+ let { items: t, valueLabel: n = ae, valueFormat: i = oe, columns: o, aspectRatio: d = ce, selected: f, onSelectedChange: v, ...S } = e, { emptyLabel: E = "No images are available.", ...D } = S, { locale: O, title: k } = D, A = x(), { ref: j, width: M } = y();
512
512
  if (D.status === "loading") return /* @__PURE__ */ w(p, { ...D });
513
513
  let N = de({
514
514
  items: t,
515
- columns: s,
515
+ columns: o,
516
516
  aspectRatio: d
517
517
  });
518
518
  if (N !== void 0) return /* @__PURE__ */ w(g, {
519
519
  ...D,
520
520
  message: N
521
521
  });
522
- let P = Math.max(1, Math.floor((M + se) / 124)), F = s ?? P, I = t.map((e) => ({
522
+ let P = Math.max(1, Math.floor((M + se) / 124)), F = o ?? P, I = t.map((e) => ({
523
523
  item: e,
524
524
  label: U({
525
525
  record: e,
526
526
  valueLabel: n,
527
527
  locale: O,
528
- format: r
528
+ format: i
529
529
  }),
530
530
  hasCaption: e.label !== void 0 || e.value !== void 0
531
531
  })), L = I.map((e) => ({
532
532
  id: e.item.id,
533
533
  label: e.label
534
534
  }));
535
- return /* @__PURE__ */ w(l, {
535
+ return /* @__PURE__ */ w(a, {
536
536
  items: L,
537
537
  columns: F,
538
538
  selected: f ?? null,
@@ -540,21 +540,21 @@ function pe(e) {
540
540
  render: (e, n) => /* @__PURE__ */ w(h, {
541
541
  ...D,
542
542
  figure: e,
543
- footer: /* @__PURE__ */ w(o, {
543
+ footer: /* @__PURE__ */ w(c, {
544
544
  id: A,
545
- children: a(L, n.inspected)
545
+ children: r(L, n.inspected)
546
546
  }),
547
- children: t.length === 0 ? /* @__PURE__ */ w(_, { children: E }) : /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(i, {
547
+ children: t.length === 0 ? /* @__PURE__ */ w(_, { children: E }) : /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(s, {
548
548
  ref: j,
549
549
  role: "group",
550
- "aria-label": c({
550
+ "aria-label": l({
551
551
  title: k,
552
552
  marks: "images",
553
553
  isSelectable: v !== void 0
554
554
  }),
555
555
  "aria-describedby": A,
556
556
  ...b.props(ue.grid(F), fe),
557
- children: I.map(({ item: e, label: t, hasCaption: i }) => /* @__PURE__ */ T("div", {
557
+ children: I.map(({ item: e, label: t, hasCaption: r }) => /* @__PURE__ */ T("div", {
558
558
  className: "xrvj5dj xunmzkg xeuugli x10ukxgv",
559
559
  children: [/* @__PURE__ */ w(K, {
560
560
  id: e.id,
@@ -564,7 +564,7 @@ function pe(e) {
564
564
  ratio: d,
565
565
  view: n,
566
566
  isSelectable: v !== void 0
567
- }), i && /* @__PURE__ */ T("div", {
567
+ }), r && /* @__PURE__ */ T("div", {
568
568
  "aria-hidden": !0,
569
569
  className: "x78zum5 x1a02dak x1qughib xa2sdi0 xeuugli xbixft x1hz01jw xy8obcc xas2l8k xss6m8b",
570
570
  children: [e.label === void 0 ? null : /* @__PURE__ */ w("span", {
@@ -576,7 +576,7 @@ function pe(e) {
576
576
  children: u({
577
577
  value: e.value,
578
578
  locale: O,
579
- format: r
579
+ format: i
580
580
  })
581
581
  })]
582
582
  })]