@mechane-ai/elements 0.49.0 → 0.49.1
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.
- package/README.md +40 -2
- package/dist/{article-yyNPg6VU.js → article-CRlhq9oA.js} +531 -463
- package/dist/article.js +1 -1
- package/dist/catalog.json +29 -1
- package/dist/{categorical-values-DCznViFp.js → categorical-values-BYP_R5gS.js} +13 -13
- package/dist/charts/cartesian.js +1 -1
- package/dist/charts/comparison.js +1 -1
- package/dist/charts/distribution.js +1 -1
- package/dist/charts/figure.js +12 -12
- package/dist/charts/graph.js +1 -1
- package/dist/charts/hierarchy.js +1 -1
- package/dist/charts/image.js +1 -1
- package/dist/charts/matrix.js +1 -1
- package/dist/charts/plot.js +4 -4
- package/dist/charts/relationship.js +1 -1
- package/dist/charts/text.js +1 -1
- package/dist/charts/timeline.js +1 -1
- package/dist/charts/trend.js +1 -1
- package/dist/charts.js +7 -7
- package/dist/{dumbbell-plot-CMv9llfd.js → dumbbell-plot-B-Tn7ewW.js} +45 -45
- package/dist/{embedding-map-DC-lgzCq.js → embedding-map-Bljn-A5q.js} +528 -528
- package/dist/figure-frame-CEijciL7.js +289 -0
- package/dist/{image-grid-DHqtj_zs.js → image-grid-mrG5u9oE.js} +47 -47
- package/dist/kits/evaluation.js +3 -3
- package/dist/kits/interpretability.js +6 -6
- package/dist/kits/operations.js +3 -3
- package/dist/kits/research.js +2 -2
- package/dist/kits/training.js +2 -2
- package/dist/lesson/spec.js +11 -11
- package/dist/lesson.js +4 -4
- package/dist/mdx.js +4 -4
- package/dist/packages/charts/src/figure/caption-scope.d.ts +12 -0
- package/dist/packages/charts/src/figure/figure-frame.d.ts +2 -1
- package/dist/packages/charts/src/index.d.ts +2 -0
- package/dist/packages/teaching/src/article/article-context.d.ts +2 -0
- package/dist/packages/teaching/src/article/article-layout.stylex.d.ts +13 -0
- package/dist/packages/teaching/src/article/article.d.ts +6 -1
- package/dist/packages/teaching/src/article/figure.d.ts +20 -3
- package/dist/packages/teaching/src/article/index.d.ts +1 -1
- package/dist/packages/teaching/src/article/view-essay.d.ts +2 -1
- package/dist/packages/teaching/src/lesson/define-lesson.d.ts +4 -0
- package/dist/packages/teaching/src/lesson/index.d.ts +2 -2
- package/dist/packages/teaching/src/lesson/lesson-player.d.ts +19 -3
- package/dist/packages/teaching/src/lesson/lesson-store.d.ts +2 -0
- package/dist/packages/teaching/src/lesson/playback.d.ts +9 -6
- package/dist/packages/teaching/src/lesson/use-lesson.d.ts +7 -2
- package/dist/packages/teaching/src/scene/plane/plane-labels.d.ts +4 -1
- package/dist/packages/teaching/src/scene/plane/scene-point.d.ts +5 -6
- package/dist/packages/teaching/src/scene/scene-geometry.d.ts +1 -1
- package/dist/packages/teaching/src/scene/scene-node.d.ts +4 -1
- package/dist/packages/teaching/src/scene/scene-validate.d.ts +6 -0
- package/dist/packages/teaching/src/scene/scene-wire.d.ts +6 -1
- package/dist/packages/teaching/src/scene/scene.d.ts +1 -1
- package/dist/packages/teaching/src/scene/shapes/cell-grid.d.ts +5 -1
- package/dist/packages/teaching/src/scene/shapes/scene-cells.d.ts +1 -1
- package/dist/packages/teaching/src/scene/shapes/scene-slot.d.ts +1 -1
- package/dist/packages/teaching/src/time/tween.d.ts +2 -0
- package/dist/{param-BE3VMSkH.js → param-BdqTpZER.js} +166 -99
- package/dist/{plot-layout-Bqe4-0qZ.js → plot-layout-B2xRt-_k.js} +144 -130
- package/dist/{plot-surface-DON6WUmk.js → plot-surface-0cKFwtws.js} +1 -1
- package/dist/{reference-lines-hjuD1rRZ.js → reference-lines-nSxcZVF5.js} +1 -1
- package/dist/{scene-BP0Ue0R5.js → scene-BwJKueD6.js} +1227 -1125
- package/dist/scene.js +1 -1
- package/dist/{slope-chart-C8eeSgL4.js → slope-chart-CGTYbFxi.js} +179 -179
- package/dist/styles2.css +69 -14
- package/dist/{time-series-BL933QyA.js → time-series-Dh8y5ba0.js} +952 -948
- package/dist/{token-heatmap-BB65awva.js → token-heatmap-BTrZ3-N4.js} +84 -84
- package/dist/{token-predictions-Pa8eUGan.js → token-predictions-CUe4junQ.js} +126 -126
- package/dist/{transport-DzyxVXbL.js → transport-4V9rfYHN.js} +278 -233
- package/dist/{tree-diagram-DJhKBiia.js → tree-diagram-Dpqmo-fh.js} +115 -115
- package/dist/{treemap-CxxgABUg.js → treemap-BUSaVD3m.js} +27 -27
- package/dist/use-tween-BsaEO862.js +10 -0
- package/dist/{violin-plot-CoAEF_7Z.js → violin-plot-BxaLwdRi.js} +123 -123
- package/dist/{waterfall-DdoEXEkT.js → waterfall-CcDMdKec.js} +39 -39
- package/package.json +1 -1
- package/recipes/counting-cards.tsx +3 -3
- package/skills/review-explainer/SKILL.md +2 -1
- package/skills/upgrade-elements/references/releases.md +61 -0
- package/skills/use-elements/SKILL.md +3 -1
- package/skills/use-elements/references/styling.md +23 -0
- package/skills/use-elements/references/teaching.md +13 -0
- package/skills/write-explainer/references/article.md +50 -2
- package/skills/write-explainer/references/lesson.md +18 -9
- package/skills/write-explainer/references/scene-parts.md +17 -12
- package/skills/write-explainer/references/scene.md +25 -3
- package/dist/figure-frame-BjFzbl3m.js +0 -270
- package/dist/use-tween-5HZ55_9d.js +0 -72
|
@@ -0,0 +1,289 @@
|
|
|
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 { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
8
|
+
import { formatNumber as p } from "@ui-sdk/core/number";
|
|
9
|
+
// packages/charts/src/chart-data.tsx
|
|
10
|
+
function m({ label: e, columns: n, rows: r }) {
|
|
11
|
+
return /* @__PURE__ */ d("div", {
|
|
12
|
+
...u.props(t.hidden),
|
|
13
|
+
children: /* @__PURE__ */ f("table", { children: [
|
|
14
|
+
/* @__PURE__ */ d("caption", { children: e }),
|
|
15
|
+
/* @__PURE__ */ d("thead", { children: /* @__PURE__ */ d("tr", { children: n.map((e) => /* @__PURE__ */ d("th", {
|
|
16
|
+
scope: "col",
|
|
17
|
+
children: e.label
|
|
18
|
+
}, e.id)) }) }),
|
|
19
|
+
/* @__PURE__ */ d("tbody", { children: r.map((e) => /* @__PURE__ */ d("tr", { children: n.map((t, n) => n === 0 ? /* @__PURE__ */ d("th", {
|
|
20
|
+
scope: "row",
|
|
21
|
+
children: e.values[n]
|
|
22
|
+
}, t.id) : /* @__PURE__ */ d("td", { children: e.values[n] }, t.id)) }, e.id)) })
|
|
23
|
+
] })
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
// packages/charts/src/chart-inspection.tsx
|
|
27
|
+
var h = {
|
|
28
|
+
kzqmXN: "x1xc55vz",
|
|
29
|
+
kZKoxP: "xdk7pt",
|
|
30
|
+
kmuXW: "x2lah0s",
|
|
31
|
+
$$css: !0
|
|
32
|
+
}, g = {
|
|
33
|
+
swatch: (e) => [
|
|
34
|
+
h,
|
|
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
|
+
}, _ = 4;
|
|
75
|
+
function v() {
|
|
76
|
+
return /* @__PURE__ */ d("ul", {
|
|
77
|
+
"aria-hidden": !0,
|
|
78
|
+
inert: !0,
|
|
79
|
+
className: "x78zum5 x1xnx9c1 xnby9oq x1a02dak x8zbtdt x1gkm1c7 x1ghz6dp x1717udv xe8uvvx x153jb6y xy8obcc xas2l8k",
|
|
80
|
+
children: Array.from({ length: _ }, (t, n) => /* @__PURE__ */ f("li", {
|
|
81
|
+
className: "x78zum5 x1pha0wt xunmzkg xeuugli xj0a0fe x1f394nn x43dure",
|
|
82
|
+
children: [/* @__PURE__ */ d("span", { ...u.props(g.swatch(e.line)) }), /* @__PURE__ */ f("span", {
|
|
83
|
+
className: "x1cqoux5 xeuugli",
|
|
84
|
+
children: [
|
|
85
|
+
/* @__PURE__ */ d(r, {}),
|
|
86
|
+
/* @__PURE__ */ d("span", {
|
|
87
|
+
className: "x1s85apg xannxpe",
|
|
88
|
+
children: /* @__PURE__ */ d(r, {})
|
|
89
|
+
}),
|
|
90
|
+
/* @__PURE__ */ d("span", {
|
|
91
|
+
className: "x1s85apg xannxpe x1mqbd49 xbixft xss6m8b",
|
|
92
|
+
children: /* @__PURE__ */ d(r, {})
|
|
93
|
+
})
|
|
94
|
+
]
|
|
95
|
+
})]
|
|
96
|
+
}, n))
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
function y({ title: e, detail: t }) {
|
|
100
|
+
return t === void 0 ? e : /* @__PURE__ */ f("span", {
|
|
101
|
+
"aria-label": e,
|
|
102
|
+
className: "x1lliihq xb3r6kr xlyipyv xuxw1ft",
|
|
103
|
+
children: [/* @__PURE__ */ d("span", {
|
|
104
|
+
className: "xt0psk2 x1boff50",
|
|
105
|
+
children: e
|
|
106
|
+
}), /* @__PURE__ */ d("span", {
|
|
107
|
+
className: "x1s85apg xfodcyb",
|
|
108
|
+
children: t
|
|
109
|
+
})]
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
function b({ 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 x({ id: e, label: t, summary: n, legend: r, layoutLegend: i, rows: a, x: s, width: c, offset: l = 16, notes: p = [], hasSeriesSummary: m = !1, hasLegend: h = !0 }) {
|
|
121
|
+
let _ = h && !m, v = Math.min(260, c), y = s > c / 2 ? s - v - l : s + l, x = Math.max(0, Math.min(c - v, y));
|
|
122
|
+
return /* @__PURE__ */ f("div", {
|
|
123
|
+
className: "xeuugli",
|
|
124
|
+
children: [
|
|
125
|
+
_ && /* @__PURE__ */ f("div", {
|
|
126
|
+
className: "xrvj5dj xeuugli",
|
|
127
|
+
children: [i !== void 0 && /* @__PURE__ */ d("ul", {
|
|
128
|
+
"aria-hidden": !0,
|
|
129
|
+
inert: !0,
|
|
130
|
+
className: "x78zum5 x1xnx9c1 xnby9oq x1a02dak x8zbtdt x1gkm1c7 x1ghz6dp x1717udv xe8uvvx x153jb6y xy8obcc xas2l8k x15r89dc xlshs6z x47corl",
|
|
131
|
+
children: i.map((e) => /* @__PURE__ */ f("li", {
|
|
132
|
+
className: "x78zum5 x1pha0wt xunmzkg xeuugli xj0a0fe",
|
|
133
|
+
children: [/* @__PURE__ */ d(o, {
|
|
134
|
+
tone: e.tone,
|
|
135
|
+
shape: e.shape
|
|
136
|
+
}), /* @__PURE__ */ f("span", {
|
|
137
|
+
className: "xeuugli",
|
|
138
|
+
children: [e.label, /* @__PURE__ */ d("span", { className: "x1s85apg xannxpe x1mqbd49 xbixft xss6m8b" })]
|
|
139
|
+
})]
|
|
140
|
+
}, e.id))
|
|
141
|
+
}), /* @__PURE__ */ d("ul", {
|
|
142
|
+
"aria-label": "Legend",
|
|
143
|
+
className: "x78zum5 x1xnx9c1 xnby9oq x1a02dak x8zbtdt x1gkm1c7 x1ghz6dp x1717udv xe8uvvx x153jb6y xy8obcc xas2l8k x15r89dc",
|
|
144
|
+
children: r.map((e) => /* @__PURE__ */ f("li", {
|
|
145
|
+
className: "x78zum5 x1pha0wt xunmzkg xeuugli xj0a0fe",
|
|
146
|
+
children: [/* @__PURE__ */ d(o, {
|
|
147
|
+
tone: e.tone,
|
|
148
|
+
shape: e.shape
|
|
149
|
+
}), /* @__PURE__ */ f("span", {
|
|
150
|
+
className: "xeuugli",
|
|
151
|
+
children: [e.label, /* @__PURE__ */ d("span", {
|
|
152
|
+
className: "x1s85apg xannxpe x1mqbd49 xbixft xss6m8b",
|
|
153
|
+
children: t === void 0 ? "" : a.find((t) => t.id === e.id)?.value ?? "—"
|
|
154
|
+
})]
|
|
155
|
+
})]
|
|
156
|
+
}, e.id))
|
|
157
|
+
})]
|
|
158
|
+
}),
|
|
159
|
+
/* @__PURE__ */ d("span", {
|
|
160
|
+
id: e,
|
|
161
|
+
className: "x10l6tqk x1i1rx1s xjm9jq1 x1717udv xb3r6kr x1hyvwdk xuxw1ft",
|
|
162
|
+
children: b({
|
|
163
|
+
label: t,
|
|
164
|
+
summary: n,
|
|
165
|
+
rows: a,
|
|
166
|
+
notes: p
|
|
167
|
+
})
|
|
168
|
+
}),
|
|
169
|
+
t !== void 0 && /* @__PURE__ */ d("div", {
|
|
170
|
+
"aria-hidden": !0,
|
|
171
|
+
className: "x1n2onr6 xqtp20y x1vjfegm",
|
|
172
|
+
children: /* @__PURE__ */ f("div", {
|
|
173
|
+
...u.props(g.inspector, !_ && g.summaryInspector, g.position(x, v)),
|
|
174
|
+
children: [
|
|
175
|
+
/* @__PURE__ */ f("div", {
|
|
176
|
+
className: "x78zum5 x1qughib x1hnptsi xk4h15q",
|
|
177
|
+
children: [/* @__PURE__ */ d("span", { children: t }), n !== void 0 && /* @__PURE__ */ d("span", { children: n })]
|
|
178
|
+
}),
|
|
179
|
+
/* @__PURE__ */ d("dl", {
|
|
180
|
+
className: "xrvj5dj xunmzkg x1ghz6dp",
|
|
181
|
+
children: a.map((e) => /* @__PURE__ */ f("div", {
|
|
182
|
+
className: "x78zum5 x1qughib x1pha0wt x1hnptsi",
|
|
183
|
+
children: [/* @__PURE__ */ f("dt", {
|
|
184
|
+
className: "x78zum5 x1pha0wt xunmzkg xeuugli xj0a0fe",
|
|
185
|
+
children: [/* @__PURE__ */ d(o, {
|
|
186
|
+
tone: e.tone,
|
|
187
|
+
shape: e.shape
|
|
188
|
+
}), e.label]
|
|
189
|
+
}), /* @__PURE__ */ d("dd", {
|
|
190
|
+
className: "x1ghz6dp xuxw1ft",
|
|
191
|
+
children: e.value
|
|
192
|
+
})]
|
|
193
|
+
}, e.id))
|
|
194
|
+
}),
|
|
195
|
+
p.map((e) => /* @__PURE__ */ d("span", { children: e }, e))
|
|
196
|
+
]
|
|
197
|
+
})
|
|
198
|
+
})
|
|
199
|
+
]
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
// packages/charts/src/figure/figure-frame.tsx
|
|
203
|
+
var S = {
|
|
204
|
+
notation: "compact",
|
|
205
|
+
compactDisplay: "long"
|
|
206
|
+
}, C = 1e5;
|
|
207
|
+
function w(e, t) {
|
|
208
|
+
return p(e, t, e < C ? {} : S);
|
|
209
|
+
}
|
|
210
|
+
function T(e, t) {
|
|
211
|
+
return `${w(e.shown, t)} of ${w(e.total, t)} ${e.unit} shown`;
|
|
212
|
+
}
|
|
213
|
+
function E({ title: e, description: r, report: i, actions: a, locale: o, source: c, coverage: p, transforms: m = [], status: h = "ready", figure: g = {}, series: _, titleDetail: v, footer: b, seriesLegend: x, scaleLegend: S, children: C }) {
|
|
214
|
+
let w = l(), E = p !== void 0 && p.shown < p.total ? T(p, o) : void 0, D = [
|
|
215
|
+
w ? E : void 0,
|
|
216
|
+
c,
|
|
217
|
+
...m
|
|
218
|
+
].filter((e) => e !== void 0), O = w ? v : void 0, k = b !== void 0 || O !== void 0 || D.length > 0, A = /* @__PURE__ */ d(y, {
|
|
219
|
+
title: e,
|
|
220
|
+
detail: v
|
|
221
|
+
}), j = i === void 0 ? {} : { "data-figure-report": "" }, M = E === void 0 ? A : /* @__PURE__ */ f("span", {
|
|
222
|
+
className: "x3nfvp2 x1a02dak x1pha0wt xa2sdi0 x1gkm1c7",
|
|
223
|
+
children: [A, /* @__PURE__ */ d(n, { children: E })]
|
|
224
|
+
});
|
|
225
|
+
return /* @__PURE__ */ f(s, {
|
|
226
|
+
figure: {
|
|
227
|
+
...g,
|
|
228
|
+
...j,
|
|
229
|
+
"aria-busy": h !== "ready" || void 0
|
|
230
|
+
},
|
|
231
|
+
title: w ? /* @__PURE__ */ d("span", {
|
|
232
|
+
...u.props(t.hidden),
|
|
233
|
+
children: e
|
|
234
|
+
}) : M,
|
|
235
|
+
description: w ? void 0 : r,
|
|
236
|
+
report: i,
|
|
237
|
+
actions: a,
|
|
238
|
+
series: _,
|
|
239
|
+
seriesLegend: x,
|
|
240
|
+
scaleLegend: S,
|
|
241
|
+
footer: k ? /* @__PURE__ */ f("div", {
|
|
242
|
+
className: "xrvj5dj xunmzkg xeuugli",
|
|
243
|
+
children: [
|
|
244
|
+
O !== void 0 && /* @__PURE__ */ d("p", {
|
|
245
|
+
"aria-hidden": !0,
|
|
246
|
+
className: "x1s85apg xannxpe x1ghz6dp xbixft xj0a0fe",
|
|
247
|
+
children: O
|
|
248
|
+
}),
|
|
249
|
+
b,
|
|
250
|
+
D.length > 0 && /* @__PURE__ */ d("p", {
|
|
251
|
+
className: "x1ghz6dp xeuugli xj0a0fe",
|
|
252
|
+
children: D.join(" · ")
|
|
253
|
+
})
|
|
254
|
+
]
|
|
255
|
+
}) : void 0,
|
|
256
|
+
children: [w && r !== void 0 && /* @__PURE__ */ d("p", {
|
|
257
|
+
...u.props(t.hidden),
|
|
258
|
+
children: r
|
|
259
|
+
}), C]
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
function D({ children: e }) {
|
|
263
|
+
return /* @__PURE__ */ d("p", {
|
|
264
|
+
className: "x1ghz6dp x153jb6y xtqrqnz x1778rvt",
|
|
265
|
+
children: e
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
function O({ message: e, ...t }) {
|
|
269
|
+
return /* @__PURE__ */ d(E, {
|
|
270
|
+
...t,
|
|
271
|
+
status: "ready",
|
|
272
|
+
children: /* @__PURE__ */ d(i, {
|
|
273
|
+
hasError: !0,
|
|
274
|
+
children: e
|
|
275
|
+
})
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
function k({ height: e = "regular", ...t }) {
|
|
279
|
+
return /* @__PURE__ */ d("div", {
|
|
280
|
+
"aria-hidden": !0,
|
|
281
|
+
inert: !0,
|
|
282
|
+
children: /* @__PURE__ */ d(E, {
|
|
283
|
+
...t,
|
|
284
|
+
status: "loading",
|
|
285
|
+
children: /* @__PURE__ */ d(a, { height: c[e] })
|
|
286
|
+
})
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
export { T as a, b as c, k as i, m as l, E as n, x as o, O as r, v as s, D 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,
|
|
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-
|
|
7
|
+
import { i as p, l as m, n as h, r as g, t as _ } from "./figure-frame-CEijciL7.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:
|
|
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:
|
|
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 } =
|
|
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(
|
|
166
|
+
return /* @__PURE__ */ w(a, {
|
|
167
167
|
items: X,
|
|
168
168
|
columns: W,
|
|
169
169
|
locate: Q,
|
|
170
|
-
render: (e,
|
|
171
|
-
let
|
|
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:
|
|
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(
|
|
210
|
+
/* @__PURE__ */ w(c, {
|
|
211
211
|
id: H,
|
|
212
|
-
children:
|
|
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(
|
|
216
|
+
children: K.length === 0 ? /* @__PURE__ */ w(_, { children: A }) : /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ T(s, {
|
|
217
217
|
role: "group",
|
|
218
|
-
"aria-label":
|
|
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
|
-
|
|
253
|
-
x:
|
|
254
|
-
y:
|
|
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:
|
|
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 (!
|
|
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:
|
|
353
|
-
let l =
|
|
354
|
-
return /* @__PURE__ */ w(
|
|
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":
|
|
360
|
+
"aria-pressed": s ? l : void 0
|
|
361
361
|
}),
|
|
362
|
-
...b.props(G.tile, G.ratio(
|
|
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:
|
|
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:
|
|
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 =
|
|
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(
|
|
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 = [
|
|
439
|
-
return /* @__PURE__ */ w(
|
|
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,
|
|
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(
|
|
452
|
+
}), /* @__PURE__ */ w(c, {
|
|
453
453
|
id: A,
|
|
454
|
-
children:
|
|
454
|
+
children: r(N, a.inspected)
|
|
455
455
|
})]
|
|
456
456
|
}),
|
|
457
|
-
children:
|
|
457
|
+
children: i.length === 0 ? /* @__PURE__ */ w(_, { children: E }) : /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(s, {
|
|
458
458
|
role: "group",
|
|
459
|
-
"aria-label":
|
|
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:
|
|
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:
|
|
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:
|
|
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 =
|
|
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:
|
|
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(
|
|
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(
|
|
543
|
+
footer: /* @__PURE__ */ w(c, {
|
|
544
544
|
id: A,
|
|
545
|
-
children:
|
|
545
|
+
children: r(L, n.inspected)
|
|
546
546
|
}),
|
|
547
|
-
children: t.length === 0 ? /* @__PURE__ */ w(_, { children: E }) : /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(
|
|
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":
|
|
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:
|
|
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
|
-
}),
|
|
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:
|
|
579
|
+
format: i
|
|
580
580
|
})
|
|
581
581
|
})]
|
|
582
582
|
})]
|
package/dist/kits/evaluation.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { T as e } from "../plot-layout-B2xRt-_k.js";
|
|
2
2
|
import { r as t } from "../figure-format-B8kRZMlo.js";
|
|
3
3
|
import { i as n, t as r } from "../tone-scope-DKiSw-JR.js";
|
|
4
|
-
import { n as i, r as a } from "../figure-frame-
|
|
4
|
+
import { n as i, r as a } from "../figure-frame-CEijciL7.js";
|
|
5
5
|
import { d as o, g as s, u as c } from "../src-B2rgpWap.js";
|
|
6
6
|
import { n as l, t as u } from "../chart-link-AE_xuxiP.js";
|
|
7
7
|
import { a as d, i as f, o as p, r as m, t as h } from "../cells-CNZE4us2.js";
|
|
8
8
|
import { t as g } from "../accessibility-P89UG9-r.js";
|
|
9
|
-
import { r as _, t as v } from "../dumbbell-plot-
|
|
9
|
+
import { r as _, t as v } from "../dumbbell-plot-B-Tn7ewW.js";
|
|
10
10
|
import * as y from "@stylexjs/stylex";
|
|
11
11
|
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
12
12
|
// packages/kits/src/evaluation/evaluation-data.ts
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { u as e } from "../token-heatmap-
|
|
2
|
-
import { a as t, c as n, f as r, o as i, r as a, t as o } from "../token-predictions-
|
|
1
|
+
import { u as e } from "../token-heatmap-BTrZ3-N4.js";
|
|
2
|
+
import { a as t, c as n, f as r, o as i, r as a, t as o } from "../token-predictions-CUe4junQ.js";
|
|
3
3
|
import { T as s, m as c, t as l } from "../src-9EJskqB_.js";
|
|
4
4
|
import { m as u } from "../src-npqwq3Sa.js";
|
|
5
5
|
import { n as d, t as f } from "../chart-link-AE_xuxiP.js";
|
|
6
|
-
import { r as p } from "../tree-diagram-
|
|
6
|
+
import { r as p } from "../tree-diagram-Dpqmo-fh.js";
|
|
7
7
|
import { t as m } from "../tone-scope-DKiSw-JR.js";
|
|
8
|
-
import { d as h, l as g } from "../violin-plot-
|
|
8
|
+
import { d as h, l as g } from "../violin-plot-BxaLwdRi.js";
|
|
9
9
|
import { r as _ } from "../figure-format-B8kRZMlo.js";
|
|
10
|
-
import { t as v } from "../embedding-map-
|
|
10
|
+
import { t as v } from "../embedding-map-Bljn-A5q.js";
|
|
11
11
|
import { n as y, t as b } from "../forms-CEbwzlRR.js";
|
|
12
12
|
import { o as x, t as S } from "../cells-CNZE4us2.js";
|
|
13
13
|
import { d as C, g as w, u as T } from "../src-B2rgpWap.js";
|
|
14
|
-
import { s as E } from "../slope-chart-
|
|
14
|
+
import { s as E } from "../slope-chart-CGTYbFxi.js";
|
|
15
15
|
import { x as D } from "../src-Dxs3Buo_.js";
|
|
16
16
|
import * as O from "@stylexjs/stylex";
|
|
17
17
|
import { useId as k, useState as A } from "react";
|
package/dist/kits/operations.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { a as e } from "../dumbbell-plot-
|
|
1
|
+
import { a as e } from "../dumbbell-plot-B-Tn7ewW.js";
|
|
2
2
|
import { r as t } from "../figure-format-B8kRZMlo.js";
|
|
3
3
|
import { t as n } from "../tone-scope-DKiSw-JR.js";
|
|
4
4
|
import { c as r, i, o as a, s as o } from "../src-9EJskqB_.js";
|
|
5
5
|
import { m as s } from "../src-npqwq3Sa.js";
|
|
6
|
-
import { n as c } from "../waterfall-
|
|
7
|
-
import { r as l, s as u } from "../time-series-
|
|
6
|
+
import { n as c } from "../waterfall-CcDMdKec.js";
|
|
7
|
+
import { r as l, s as u } from "../time-series-Dh8y5ba0.js";
|
|
8
8
|
import { i as d, r as f } from "../src-B2rgpWap.js";
|
|
9
9
|
import "@stylexjs/stylex";
|
|
10
10
|
import { useId as p } from "react";
|
package/dist/kits/research.js
CHANGED
|
@@ -2,9 +2,9 @@ import { r as e } from "../figure-format-B8kRZMlo.js";
|
|
|
2
2
|
import { g as t, n, o as r, u as i } from "../src-B2rgpWap.js";
|
|
3
3
|
import { c as a, h as o, m as s, o as c, p as l, r as u, t as d, v as f } from "../src-9EJskqB_.js";
|
|
4
4
|
import { n as p } from "../src-na2DdkKI.js";
|
|
5
|
-
import { t as m } from "../tree-diagram-
|
|
5
|
+
import { t as m } from "../tree-diagram-Dpqmo-fh.js";
|
|
6
6
|
import { m as h, p as g, s as _ } from "../src-npqwq3Sa.js";
|
|
7
|
-
import { f as v } from "../time-series-
|
|
7
|
+
import { f as v } from "../time-series-Dh8y5ba0.js";
|
|
8
8
|
import { t as y } from "../src-DFW49IAs.js";
|
|
9
9
|
import { u as b } from "../src-Dxs3Buo_.js";
|
|
10
10
|
import { jsx as x, jsxs as S } from "react/jsx-runtime";
|
package/dist/kits/training.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as e } from "../src-DIS0YOj0.js";
|
|
2
2
|
import { i as t, t as n } from "../tone-scope-DKiSw-JR.js";
|
|
3
|
-
import { r, s as i } from "../slope-chart-
|
|
3
|
+
import { r, s as i } from "../slope-chart-CGTYbFxi.js";
|
|
4
4
|
import { m as a } from "../src-npqwq3Sa.js";
|
|
5
|
-
import {
|
|
5
|
+
import { T as o } from "../plot-layout-B2xRt-_k.js";
|
|
6
6
|
import { o as s, t as c } from "../cells-CNZE4us2.js";
|
|
7
7
|
import { r as l } from "../figure-format-B8kRZMlo.js";
|
|
8
8
|
import { d as u, g as d, u as f } from "../src-B2rgpWap.js";
|