@mechane-ai/elements 0.67.0 → 0.69.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.
- package/dist/ai.js +226 -225
- package/dist/{article-anMy8fA5.js → article-CTSxWe4y.js} +104 -89
- package/dist/article.js +1 -1
- package/dist/catalog.json +131 -1
- package/dist/{categorical-values-Bh7ZkEQn.js → categorical-values-DwomVcSd.js} +1 -1
- package/dist/{cells-X8SVrZBc.js → cells-BRI8LpMU.js} +1 -1
- package/dist/charts/cartesian.js +1 -1
- package/dist/charts/cells.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 +2 -2
- package/dist/charts/plot.js +16 -15
- package/dist/charts/relationship.js +1 -1
- package/dist/charts/text.js +1 -1
- package/dist/charts/timeline.js +2 -2
- package/dist/charts/trend.js +1 -1
- package/dist/charts.js +3 -3
- package/dist/{color-legend-CIo7DhXB.js → color-legend-4As8881l.js} +1 -1
- package/dist/content/markdown.js +1 -1
- package/dist/content.js +1 -1
- package/dist/{dumbbell-plot-BQDGe0sQ.js → dumbbell-plot-S4RyfxmW.js} +5 -5
- package/dist/{embedding-map-DmmknG7A.js → embedding-map-Bm7aTA6z.js} +5 -5
- package/dist/figure-format-BVb7yFCA.js +46 -0
- package/dist/{figure-frame-DlyNTDzh.js → figure-frame-BHCNceS4.js} +1 -1
- package/dist/{image-grid-CxEAQvTf.js → image-grid-TTrLxvaI.js} +3 -3
- package/dist/kits/evaluation.js +5 -5
- package/dist/kits/interpretability.js +8 -8
- package/dist/kits/operations.js +4 -4
- package/dist/kits/research.js +1087 -230
- package/dist/kits/training.js +4 -4
- package/dist/lesson.js +3 -3
- package/dist/locate-Dcq5ZZSk.js +14 -0
- package/dist/markdown-JeuBeMDZ.js +293 -0
- package/dist/mdx.js +4 -4
- package/dist/packages/charts/src/plot/index.d.ts +3 -0
- package/dist/packages/charts/src/plot/locate.d.ts +3 -1
- package/dist/packages/charts/src/plot/plot-layout.d.ts +2 -2
- package/dist/packages/charts/src/plot/spatial-layer.d.ts +36 -0
- package/dist/packages/charts/src/plot/step-history.d.ts +13 -0
- package/dist/packages/charts/src/plot/ticks.d.ts +2 -2
- package/dist/packages/content/src/timeline-scrubber.d.ts +3 -1
- package/dist/packages/foundations/src/visible-motion.d.ts +1 -1
- package/dist/packages/kits/src/research/index.d.ts +14 -0
- package/dist/packages/kits/src/research/motion-clip.d.ts +3 -0
- package/dist/packages/kits/src/research/motion-error.d.ts +8 -0
- package/dist/packages/kits/src/research/motion-figure.d.ts +12 -0
- package/dist/packages/kits/src/research/motion-frame.d.ts +22 -0
- package/dist/packages/kits/src/research/motion-inspection.d.ts +14 -0
- package/dist/packages/kits/src/research/motion-location.d.ts +9 -0
- package/dist/packages/kits/src/research/motion-scene.d.ts +29 -0
- package/dist/packages/kits/src/research/motion-types.d.ts +54 -0
- package/dist/packages/kits/src/research/motion-view.d.ts +9 -0
- package/dist/packages/kits/src/research/native-motion-figure.d.ts +17 -0
- package/dist/packages/kits/src/research/native-motion.d.ts +18 -0
- package/dist/packages/teaching/src/article/uncover.d.ts +2 -0
- package/dist/{param-CKr8EYxF.js → param-Dk92C-K1.js} +1 -1
- package/dist/plot-BIYlgY2B.js +223 -0
- package/dist/{plot-layout-CVzSbcU7.js → plot-layout-CNNFMC8H.js} +152 -102
- package/dist/{plot-surface-CBhI1alw.js → plot-surface-BSjoNIva.js} +1 -1
- package/dist/{reference-lines-C970JwWZ.js → reference-lines-Bet_hRyA.js} +1 -1
- package/dist/{scene-C3dCxckI.js → scene-C88Xkz4l.js} +7 -7
- package/dist/scene.js +1 -1
- package/dist/{slope-chart-DekEJxsy.js → slope-chart-B6Mtcta2.js} +6 -6
- package/dist/{src-BsqbWDxS.js → src-DCozYUGI.js} +146 -131
- package/dist/styles2.css +16 -4
- package/dist/{time-series-BSNnijxf.js → time-series-DJk-2Mt0.js} +7 -7
- package/dist/{timeline-CnxfYSIg.js → timeline-BHpj7i7K.js} +4 -4
- package/dist/{token-heatmap-CJaXo56P.js → token-heatmap-DEqEaoGE.js} +273 -288
- package/dist/{token-predictions-Bi7aKPnh.js → token-predictions-Bjdh0K-A.js} +5 -5
- package/dist/{transport-CXj0DV6o.js → transport-DQ1yzsQl.js} +2 -2
- package/dist/{tree-diagram-BxOZsjr1.js → tree-diagram-BxSDOBFj.js} +4 -4
- package/dist/{treemap-B2yOAetT.js → treemap-DzHAp4ia.js} +5 -5
- package/dist/{use-tween-C1TWJwce.js → use-tween-DbXVZBR8.js} +1 -1
- package/dist/{violin-plot-W2L_2JRo.js → violin-plot-B4Cf38Y9.js} +5 -5
- package/dist/visible-motion-D6NwjGNz.js +24 -0
- package/dist/{waterfall-Bt73N2Ng.js → waterfall-C9_pHZzv.js} +4 -4
- package/package.json +1 -1
- package/recipes/recorded-motion.tsx +14 -0
- package/skills/review-elements/SKILL.md +6 -0
- package/skills/review-explainer/SKILL.md +4 -0
- package/skills/use-elements/SKILL.md +2 -0
- package/skills/use-elements/references/kits.md +33 -0
- package/skills/write-explainer/SKILL.md +5 -0
- package/dist/figure-format-B8kRZMlo.js +0 -36
- package/dist/locate-Bcg3QcP4.js +0 -11
- package/dist/markdown-Diffqqm7.js +0 -313
|
@@ -9,22 +9,22 @@ import { usePart as p, usePrimitive as m } from "@ui-sdk/react/primitive";
|
|
|
9
9
|
import { useCallback as h, useLayoutEffect as g, useMemo as _, useRef as v, useState as y, useSyncExternalStore as b } from "react";
|
|
10
10
|
import { createChange as x, createStickToBottom as S, definePrimitive as C, isRTL as w } from "@ui-sdk/core";
|
|
11
11
|
import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
12
|
-
import { Check as O, Circle as k, CircleDashed as A, CircleHelp as
|
|
13
|
-
import
|
|
14
|
-
import { fuzzyScore as L, matchRanges as
|
|
15
|
-
import { clamp as
|
|
12
|
+
import { Check as O, Circle as k, CircleDashed as A, CircleHelp as j, Clock as ee, Pause as te, Play as M, SkipBack as N, SkipForward as P, X as F } from "lucide-react";
|
|
13
|
+
import I from "strip-ansi";
|
|
14
|
+
import { fuzzyScore as L, matchRanges as R, matchRanges as ne, matchSegments as z, matchSegments as re } from "@ui-sdk/react/text-match";
|
|
15
|
+
import { clamp as B, fractionOf as ie, maxOnGrid as ae, scrubTo as V, stepBy as H, stepFromKey as U, valueAt as oe } from "@ui-sdk/core/number";
|
|
16
16
|
// packages/content/src/json-viewer.tsx
|
|
17
|
-
var
|
|
17
|
+
var se = { body: {
|
|
18
18
|
kmVPX3: "x1mvvolr",
|
|
19
19
|
kVQacm: "xysyzu8",
|
|
20
20
|
kskxy: "x1phlbz0",
|
|
21
21
|
kMv6JI: "xiard35",
|
|
22
22
|
kGuDYH: "xy8obcc",
|
|
23
23
|
$$css: !0
|
|
24
|
-
} },
|
|
25
|
-
function
|
|
24
|
+
} }, W = 500;
|
|
25
|
+
function G({ value: e, name: t, path: n, depth: r, maxDepth: i, maxEntries: o }) {
|
|
26
26
|
if (typeof e != "object" || !e) {
|
|
27
|
-
let n = JSON.stringify(e), r = n.length >
|
|
27
|
+
let n = JSON.stringify(e), r = n.length > W;
|
|
28
28
|
return /* @__PURE__ */ D("div", {
|
|
29
29
|
className: "xeuugli x126k92a xj0a0fe",
|
|
30
30
|
children: [
|
|
@@ -37,7 +37,7 @@ function W({ value: e, name: t, path: n, depth: r, maxDepth: i, maxEntries: o })
|
|
|
37
37
|
0: { className: "xbixft" },
|
|
38
38
|
1: { className: "x7ixh4y" }
|
|
39
39
|
}[typeof e == "string" | 0],
|
|
40
|
-
children: n.slice(0,
|
|
40
|
+
children: n.slice(0, W)
|
|
41
41
|
}),
|
|
42
42
|
r && /* @__PURE__ */ E("span", {
|
|
43
43
|
className: "x153jb6y x1hz01jw",
|
|
@@ -80,7 +80,7 @@ function W({ value: e, name: t, path: n, depth: r, maxDepth: i, maxEntries: o })
|
|
|
80
80
|
className: "xo02m6d xpilrb4 x1t7ytsu x97x49r xa1dmyi xiard35 xy8obcc",
|
|
81
81
|
children: [s.slice(0, o).map(([e, t]) => {
|
|
82
82
|
let a = `${n}/${e.replaceAll("~", "~0").replaceAll("/", "~1")}`;
|
|
83
|
-
return /* @__PURE__ */ E(
|
|
83
|
+
return /* @__PURE__ */ E(G, {
|
|
84
84
|
name: JSON.stringify(e),
|
|
85
85
|
path: a,
|
|
86
86
|
value: t,
|
|
@@ -95,7 +95,7 @@ function W({ value: e, name: t, path: n, depth: r, maxDepth: i, maxEntries: o })
|
|
|
95
95
|
}) })]
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function K({ value: e, label: t, maxDepth: n = 6, maxEntries: i = 50 }) {
|
|
99
99
|
let a = o(), l = h(() => JSON.stringify(e, null, 2), [e]);
|
|
100
100
|
return /* @__PURE__ */ D(c, {
|
|
101
101
|
kind: "json",
|
|
@@ -116,8 +116,8 @@ function le({ value: e, label: t, maxDepth: n = 6, maxEntries: i = 50 }) {
|
|
|
116
116
|
role: "region",
|
|
117
117
|
"aria-label": `${t} fields`,
|
|
118
118
|
tabIndex: a.tabIndex,
|
|
119
|
-
...f.props(s.scrollRegion,
|
|
120
|
-
children: /* @__PURE__ */ E(
|
|
119
|
+
...f.props(s.scrollRegion, se.body),
|
|
120
|
+
children: /* @__PURE__ */ E(G, {
|
|
121
121
|
name: "root",
|
|
122
122
|
path: "",
|
|
123
123
|
value: e,
|
|
@@ -129,7 +129,7 @@ function le({ value: e, label: t, maxDepth: n = 6, maxEntries: i = 50 }) {
|
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
131
|
// packages/content/src/log-viewer.tsx
|
|
132
|
-
var
|
|
132
|
+
var ce = {
|
|
133
133
|
kVQacm: "xysyzu8",
|
|
134
134
|
kmVPX3: "x1mvvolr",
|
|
135
135
|
kogj98: "x1ghz6dp",
|
|
@@ -140,9 +140,9 @@ var ue = {
|
|
|
140
140
|
kHjlTd: "xj0a0fe",
|
|
141
141
|
kKi2Bq: "xeq4nuv",
|
|
142
142
|
$$css: !0
|
|
143
|
-
},
|
|
143
|
+
}, q = {
|
|
144
144
|
output: (e) => [
|
|
145
|
-
|
|
145
|
+
ce,
|
|
146
146
|
{
|
|
147
147
|
kskxy: e == null ? e : "x1jols5v",
|
|
148
148
|
$$css: !0
|
|
@@ -155,8 +155,8 @@ var ue = {
|
|
|
155
155
|
kL6WhQ: "x1qndepd",
|
|
156
156
|
$$css: !0
|
|
157
157
|
}
|
|
158
|
-
},
|
|
159
|
-
function
|
|
158
|
+
}, le = 2e5;
|
|
159
|
+
function ue({ output: e, label: n, variant: i = "default", maxLines: a = 500, maxHeight: l = 320, isRunning: u = !1 }) {
|
|
160
160
|
let d = o(), p = d.viewport, m = v(!1), [h] = y(() => {
|
|
161
161
|
let e = S();
|
|
162
162
|
return {
|
|
@@ -164,7 +164,7 @@ function fe({ output: e, label: n, variant: i = "default", maxLines: a = 500, ma
|
|
|
164
164
|
subscribe: (t) => e.subscribe(t),
|
|
165
165
|
read: () => e.get()
|
|
166
166
|
};
|
|
167
|
-
}), { following: _ } = b(h.subscribe, h.read, h.read), x =
|
|
167
|
+
}), { following: _ } = b(h.subscribe, h.read, h.read), x = I(e), C = x.slice(-2e5).split("\n"), w = C.slice(-Math.max(1, a)), T = C.length - w.length, O = i === "embedded", k = u && (!O || !_);
|
|
168
168
|
return g(() => {
|
|
169
169
|
let e = p.current;
|
|
170
170
|
return e === null ? void 0 : h.connect(e);
|
|
@@ -203,11 +203,11 @@ function fe({ output: e, label: n, variant: i = "default", maxLines: a = 500, ma
|
|
|
203
203
|
})]
|
|
204
204
|
}),
|
|
205
205
|
T > 0 && /* @__PURE__ */ D("div", {
|
|
206
|
-
...f.props(s.note,
|
|
206
|
+
...f.props(s.note, q.notice),
|
|
207
207
|
children: [T, " earlier lines omitted from this view. Copy includes the supplied output."]
|
|
208
208
|
}),
|
|
209
|
-
x.length >
|
|
210
|
-
...f.props(s.note,
|
|
209
|
+
x.length > le && /* @__PURE__ */ E("div", {
|
|
210
|
+
...f.props(s.note, q.notice),
|
|
211
211
|
children: "Preview limited to the last 200,000 characters. Copy includes the supplied output."
|
|
212
212
|
}),
|
|
213
213
|
/* @__PURE__ */ E("pre", {
|
|
@@ -215,7 +215,7 @@ function fe({ output: e, label: n, variant: i = "default", maxLines: a = 500, ma
|
|
|
215
215
|
role: "region",
|
|
216
216
|
"aria-label": `${n} output`,
|
|
217
217
|
tabIndex: d.tabIndex,
|
|
218
|
-
...f.props(s.scrollRegion,
|
|
218
|
+
...f.props(s.scrollRegion, q.output(l)),
|
|
219
219
|
children: /* @__PURE__ */ E("span", {
|
|
220
220
|
className: "x1lliihq",
|
|
221
221
|
children: x.length === 0 ? "No output recorded." : w.join("\n")
|
|
@@ -225,7 +225,7 @@ function fe({ output: e, label: n, variant: i = "default", maxLines: a = 500, ma
|
|
|
225
225
|
});
|
|
226
226
|
}
|
|
227
227
|
// packages/content/src/media-viewer.tsx
|
|
228
|
-
var
|
|
228
|
+
var J = {
|
|
229
229
|
viewport: {
|
|
230
230
|
k1xSpc: "xrvj5dj",
|
|
231
231
|
kgQiWS: "x1ku5rj1",
|
|
@@ -242,15 +242,15 @@ var K = {
|
|
|
242
242
|
$$css: !0
|
|
243
243
|
}
|
|
244
244
|
};
|
|
245
|
-
function
|
|
245
|
+
function de() {
|
|
246
246
|
return /* @__PURE__ */ E("div", {
|
|
247
247
|
"aria-hidden": !0,
|
|
248
|
-
...f.props(s.root,
|
|
248
|
+
...f.props(s.root, J.viewport, J.placeholder)
|
|
249
249
|
});
|
|
250
250
|
}
|
|
251
|
-
function
|
|
251
|
+
function fe({ kind: e, src: t, label: n, widthPixels: r, heightPixels: i, onError: a }) {
|
|
252
252
|
return /* @__PURE__ */ E("div", {
|
|
253
|
-
...f.props(s.root,
|
|
253
|
+
...f.props(s.root, J.viewport),
|
|
254
254
|
children: e === "image" ? /* @__PURE__ */ E("img", {
|
|
255
255
|
src: t,
|
|
256
256
|
alt: n,
|
|
@@ -273,17 +273,17 @@ function me({ kind: e, src: t, label: n, widthPixels: r, heightPixels: i, onErro
|
|
|
273
273
|
});
|
|
274
274
|
}
|
|
275
275
|
// packages/content/src/has-renderable-node.ts
|
|
276
|
-
function
|
|
276
|
+
function Y(e) {
|
|
277
277
|
return e != null && typeof e != "boolean";
|
|
278
278
|
}
|
|
279
279
|
// packages/content/src/playback-bar.tsx
|
|
280
|
-
var
|
|
280
|
+
var pe = [
|
|
281
281
|
.25,
|
|
282
282
|
.5,
|
|
283
283
|
1,
|
|
284
284
|
2,
|
|
285
285
|
4
|
|
286
|
-
],
|
|
286
|
+
], me = "Playback controls", he = 16, ge = {
|
|
287
287
|
bar: {
|
|
288
288
|
k1xSpc: "x78zum5",
|
|
289
289
|
kwnvtZ: "x1a02dak",
|
|
@@ -312,8 +312,8 @@ var he = [
|
|
|
312
312
|
$$css: !0
|
|
313
313
|
}
|
|
314
314
|
}, _e = {
|
|
315
|
-
standard:
|
|
316
|
-
compact:
|
|
315
|
+
standard: ge.standardBar,
|
|
316
|
+
compact: ge.compactBar
|
|
317
317
|
};
|
|
318
318
|
function X(e) {
|
|
319
319
|
return e !== void 0 && Number.isFinite(e) && e > 0;
|
|
@@ -325,12 +325,12 @@ function ve(e, t) {
|
|
|
325
325
|
label: `${e}x`
|
|
326
326
|
}));
|
|
327
327
|
}
|
|
328
|
-
function ye({ isPlaying: e, onPlayingChange: t, onStepBackward: r, onStepForward: a, speed: o, speeds: s =
|
|
329
|
-
let y = c !== void 0, b =
|
|
328
|
+
function ye({ isPlaying: e, onPlayingChange: t, onStepBackward: r, onStepForward: a, speed: o, speeds: s = pe, onSpeedChange: c, readout: l, actions: d, density: p = "standard", isDisabled: m = !1, playLabel: h = "Play", pauseLabel: g = "Pause", label: _ = me, xstyle: v }) {
|
|
329
|
+
let y = c !== void 0, b = Y(d), x = X(o) ? o : void 0, S = y ? ve(s, x) : [], C = x === void 0 ? null : String(x), w = _.trim(), T = w.length > 0 ? w : me;
|
|
330
330
|
return /* @__PURE__ */ D("div", {
|
|
331
331
|
role: "group",
|
|
332
332
|
"aria-label": T,
|
|
333
|
-
...f.props(
|
|
333
|
+
...f.props(ge.bar, _e[p], v),
|
|
334
334
|
children: [
|
|
335
335
|
/* @__PURE__ */ D("div", {
|
|
336
336
|
className: "x78zum5 x6s0dn4 xunmzkg x2lah0s",
|
|
@@ -341,7 +341,7 @@ function ye({ isPlaying: e, onPlayingChange: t, onStepBackward: r, onStepForward
|
|
|
341
341
|
"aria-label": "Step backward",
|
|
342
342
|
disabled: m,
|
|
343
343
|
onClick: r,
|
|
344
|
-
children: /* @__PURE__ */ E(
|
|
344
|
+
children: /* @__PURE__ */ E(N, { size: he })
|
|
345
345
|
}),
|
|
346
346
|
/* @__PURE__ */ E(n, {
|
|
347
347
|
variant: "outline",
|
|
@@ -349,7 +349,7 @@ function ye({ isPlaying: e, onPlayingChange: t, onStepBackward: r, onStepForward
|
|
|
349
349
|
"aria-label": e ? g : h,
|
|
350
350
|
disabled: m,
|
|
351
351
|
onClick: () => t(!e),
|
|
352
|
-
children: E(e ?
|
|
352
|
+
children: E(e ? te : M, { size: he })
|
|
353
353
|
}),
|
|
354
354
|
a !== void 0 && /* @__PURE__ */ E(n, {
|
|
355
355
|
variant: "ghost",
|
|
@@ -357,7 +357,7 @@ function ye({ isPlaying: e, onPlayingChange: t, onStepBackward: r, onStepForward
|
|
|
357
357
|
"aria-label": "Step forward",
|
|
358
358
|
disabled: m,
|
|
359
359
|
onClick: a,
|
|
360
|
-
children: /* @__PURE__ */ E(
|
|
360
|
+
children: /* @__PURE__ */ E(P, { size: he })
|
|
361
361
|
})
|
|
362
362
|
]
|
|
363
363
|
}),
|
|
@@ -447,10 +447,10 @@ var xe = {
|
|
|
447
447
|
}
|
|
448
448
|
};
|
|
449
449
|
function Se({ text: e, query: t, ranges: n, tone: r = "warning", mode: i = "contains" }) {
|
|
450
|
-
let a = n === void 0 ? t.trim() === "" ? [] :
|
|
450
|
+
let a = n === void 0 ? t.trim() === "" ? [] : R(e, t, i) : [...n], o = a.length === 0 ? [{
|
|
451
451
|
text: e,
|
|
452
452
|
match: !1
|
|
453
|
-
}] :
|
|
453
|
+
}] : z(e, a), s = r === "accent" ? xe.accent : r === "danger" ? xe.danger : void 0, c = 0;
|
|
454
454
|
return /* @__PURE__ */ E(T, { children: o.map((e) => {
|
|
455
455
|
let t = `${c}-${e.match ? "m" : "t"}`;
|
|
456
456
|
return c += e.text.length, e.match ? /* @__PURE__ */ E("mark", {
|
|
@@ -486,6 +486,14 @@ var Ce = .1, we = 4, Te = [
|
|
|
486
486
|
kk7Lky: "xwj21n9",
|
|
487
487
|
$$css: !0
|
|
488
488
|
},
|
|
489
|
+
playhead: {
|
|
490
|
+
kVAEAm: "x10l6tqk",
|
|
491
|
+
k87sOh: "x13vifvy",
|
|
492
|
+
krVfgx: "x1ey2m1c",
|
|
493
|
+
kzqmXN: "x1i1rx1s",
|
|
494
|
+
kWkggS: "x1pt885t",
|
|
495
|
+
$$css: !0
|
|
496
|
+
},
|
|
489
497
|
fill: {
|
|
490
498
|
kVAEAm: "x10l6tqk",
|
|
491
499
|
kYYq5F: "x10no89f",
|
|
@@ -617,8 +625,8 @@ function Ae(e, t, n) {
|
|
|
617
625
|
if (i !== void 0) return n.find((e) => e.marker.id === i);
|
|
618
626
|
}
|
|
619
627
|
function je(e, t) {
|
|
620
|
-
let n =
|
|
621
|
-
return n < t.max && e >= (n + t.max) / 2 ? t.max :
|
|
628
|
+
let n = ae(t);
|
|
629
|
+
return n < t.max && e >= (n + t.max) / 2 ? t.max : B(V(e, t).value, t.min, t.max);
|
|
622
630
|
}
|
|
623
631
|
function Me(e, t, n) {
|
|
624
632
|
let r = n / 2, i, a = Infinity;
|
|
@@ -739,7 +747,7 @@ var Ie = C({
|
|
|
739
747
|
e !== void 0 && (r.preventDefault(), u?.(e.marker));
|
|
740
748
|
return;
|
|
741
749
|
}
|
|
742
|
-
let p =
|
|
750
|
+
let p = U(r, i === void 0 ? void 0 : { dir: w(i) ? "rtl" : "ltr" });
|
|
743
751
|
if (p === null) return;
|
|
744
752
|
if (r.preventDefault(), p.bound === "min") {
|
|
745
753
|
n("value", o, {
|
|
@@ -755,7 +763,7 @@ var Ie = C({
|
|
|
755
763
|
});
|
|
756
764
|
return;
|
|
757
765
|
}
|
|
758
|
-
let m = s - o, h = Math.max(c, m * Ce), g =
|
|
766
|
+
let m = s - o, h = Math.max(c, m * Ce), g = B(H(d, p, {
|
|
759
767
|
min: o,
|
|
760
768
|
max: s,
|
|
761
769
|
step: c,
|
|
@@ -794,41 +802,41 @@ var Ie = C({
|
|
|
794
802
|
items: (e) => e.items()
|
|
795
803
|
}
|
|
796
804
|
});
|
|
797
|
-
function Le({
|
|
798
|
-
let
|
|
805
|
+
function Le({ backdrop: e, value: t, max: n, min: r = 0, step: i = 1, onValueChange: a, onScrubStart: o, onScrubEnd: s, markers: c, onMarkerSelect: l, formatValue: u, isDisabled: d = !1, label: h, xstyle: g }) {
|
|
806
|
+
let b = v(null), x = v(null), S = v(null), C = v(!1), w = v(null), O = v(null), k = v(null), [A, j] = y(!1), [ee, te] = y(!1), M = Number.isFinite(r) ? r : 0, N = Number.isFinite(n) && n >= M ? n : M, P = Number.isFinite(i) && i > 0 ? i : 1, F = N - M, I = B(Number.isFinite(t) ? t : M, M, N), L = F > 0 ? ie(I, {
|
|
799
807
|
min: M,
|
|
800
808
|
max: N
|
|
801
|
-
}) * 100 : 0,
|
|
809
|
+
}) * 100 : 0, R = _(() => c === void 0 ? [] : c.filter((e) => Number.isFinite(e.position)).map((e) => ({
|
|
802
810
|
marker: e,
|
|
803
|
-
position:
|
|
811
|
+
position: B(e.position, M, N)
|
|
804
812
|
})).toSorted((e, t) => e.position - t.position), [
|
|
805
|
-
|
|
813
|
+
c,
|
|
806
814
|
M,
|
|
807
815
|
N
|
|
808
|
-
]), ne = _(() =>
|
|
816
|
+
]), ne = _(() => R.map(({ marker: e, position: t }) => ({
|
|
809
817
|
id: e.id,
|
|
810
818
|
position: t,
|
|
811
819
|
label: e.label,
|
|
812
820
|
tone: e.tone ?? "neutral"
|
|
813
|
-
})), [
|
|
821
|
+
})), [R]), z = Me(I, R, P), re = u === void 0 ? void 0 : u(I), ae = z === void 0 ? re : `${re ?? String(I)}, marker: ${z.marker.label}`, V = m(Ie, {
|
|
814
822
|
value: I,
|
|
815
823
|
min: M,
|
|
816
824
|
max: N,
|
|
817
825
|
step: P,
|
|
818
|
-
markers:
|
|
826
|
+
markers: R,
|
|
819
827
|
markerSummaries: ne,
|
|
820
|
-
isDisabled:
|
|
821
|
-
isDragging:
|
|
822
|
-
valueText:
|
|
823
|
-
onValueChange:
|
|
824
|
-
onMarkerSelect:
|
|
828
|
+
isDisabled: d,
|
|
829
|
+
isDragging: A,
|
|
830
|
+
valueText: ae,
|
|
831
|
+
onValueChange: a,
|
|
832
|
+
onMarkerSelect: l
|
|
825
833
|
});
|
|
826
|
-
function
|
|
834
|
+
function H(e) {
|
|
827
835
|
if (F <= 0) return M;
|
|
828
|
-
let t =
|
|
836
|
+
let t = x.current?.getBoundingClientRect();
|
|
829
837
|
if (t === void 0 || t.width <= 0) return I;
|
|
830
|
-
let n =
|
|
831
|
-
return je(
|
|
838
|
+
let n = B((e - t.left) / t.width, 0, 1);
|
|
839
|
+
return je(oe(n, {
|
|
832
840
|
min: M,
|
|
833
841
|
max: N
|
|
834
842
|
}), {
|
|
@@ -837,91 +845,98 @@ function Le({ value: e, max: t, min: n = 0, step: r = 1, onValueChange: i, onScr
|
|
|
837
845
|
step: P
|
|
838
846
|
});
|
|
839
847
|
}
|
|
840
|
-
function
|
|
841
|
-
|
|
848
|
+
function U(e, t) {
|
|
849
|
+
k.current !== e && (k.current = e, V.api.scrub(e, t));
|
|
842
850
|
}
|
|
843
|
-
function
|
|
844
|
-
if (
|
|
845
|
-
e.preventDefault(),
|
|
846
|
-
let t = Ae(e.target, e.currentTarget,
|
|
847
|
-
t === void 0 ? (
|
|
851
|
+
function se(e) {
|
|
852
|
+
if (S.current !== null || d || e.button !== 0 || F <= 0) return;
|
|
853
|
+
e.preventDefault(), b.current?.focus({ preventScroll: !0 }), Oe(e.currentTarget, e.pointerId), S.current = e.pointerId, k.current = null;
|
|
854
|
+
let t = Ae(e.target, e.currentTarget, R);
|
|
855
|
+
t === void 0 ? (w.current = null, C.current = !0, j(!0), o?.(), U(H(e.clientX), e.nativeEvent)) : (C.current = !1, w.current = {
|
|
848
856
|
marker: t.marker,
|
|
849
857
|
position: t.position,
|
|
850
858
|
startClientX: e.clientX,
|
|
851
859
|
startClientY: e.clientY
|
|
852
860
|
});
|
|
853
861
|
}
|
|
854
|
-
function
|
|
855
|
-
if (
|
|
856
|
-
let t =
|
|
862
|
+
function W(e) {
|
|
863
|
+
if (d || S.current !== e.pointerId) return;
|
|
864
|
+
let t = w.current;
|
|
857
865
|
if (t !== null) {
|
|
858
866
|
let n = e.clientX - t.startClientX, r = e.clientY - t.startClientY;
|
|
859
867
|
if (Math.hypot(n, r) < we) return;
|
|
860
|
-
|
|
868
|
+
w.current = null, C.current = !0, j(!0), o?.();
|
|
861
869
|
}
|
|
862
|
-
|
|
870
|
+
C.current && U(H(e.clientX), e.nativeEvent);
|
|
863
871
|
}
|
|
864
|
-
function
|
|
865
|
-
if (
|
|
866
|
-
let t =
|
|
867
|
-
if (
|
|
872
|
+
function G(e) {
|
|
873
|
+
if (S.current !== e.pointerId) return;
|
|
874
|
+
let t = w.current, n = C.current;
|
|
875
|
+
if (S.current = null, w.current = null, C.current = !1, k.current = null, ke(e.currentTarget, e.pointerId), t !== null && !d) {
|
|
868
876
|
let n = t.marker.id;
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
}),
|
|
872
|
-
} else n && (
|
|
877
|
+
O.current = n, queueMicrotask(() => {
|
|
878
|
+
O.current === n && (O.current = null);
|
|
879
|
+
}), V.api.activateMarker(t.marker, t.position, e.nativeEvent);
|
|
880
|
+
} else n && (j(!1), s?.());
|
|
873
881
|
}
|
|
874
|
-
function
|
|
875
|
-
if (
|
|
876
|
-
let t =
|
|
877
|
-
|
|
882
|
+
function K(e) {
|
|
883
|
+
if (S.current !== e.pointerId) return;
|
|
884
|
+
let t = C.current;
|
|
885
|
+
S.current = null, w.current = null, C.current = !1, k.current = null, ke(e.currentTarget, e.pointerId), t && (j(!1), s?.());
|
|
878
886
|
}
|
|
879
|
-
let
|
|
880
|
-
ref:
|
|
881
|
-
"aria-label":
|
|
887
|
+
let ce = ee && !d && !A, q = p(V, "slider", {}, {
|
|
888
|
+
ref: b,
|
|
889
|
+
"aria-label": h,
|
|
882
890
|
className: "x1n2onr6 x78zum5 x6s0dn4 xh8yej3 x17tes2r x17oiadl x5ve5x3 x87ps6o x1ypdohk x1t137rt x1m8qfh3 x13qnu6 x9v5kkp x19rmrnh x7s97pk xv519k6",
|
|
883
891
|
children: /* @__PURE__ */ D("div", {
|
|
884
|
-
ref:
|
|
892
|
+
ref: x,
|
|
885
893
|
className: "x1n2onr6 xh8yej3 xqu0tyb x1ok0vyi x1fa40ue",
|
|
886
|
-
children: [/* @__PURE__ */ E("div", { ...f.props(Z.fill, Z.fillWidth(`${
|
|
894
|
+
children: [/* @__PURE__ */ E("div", { ...f.props(Z.fill, Z.fillWidth(`${L}%`)) }), /* @__PURE__ */ E("div", {
|
|
887
895
|
"aria-hidden": !0,
|
|
888
|
-
...f.props(Z.thumb, Z.insetOffset(`${
|
|
896
|
+
...f.props(Z.thumb, Z.insetOffset(`${L}%`), ce && Z.thumbHover, A && Z.thumbDragging)
|
|
889
897
|
})]
|
|
890
898
|
})
|
|
891
899
|
}, "div");
|
|
892
|
-
return p(
|
|
893
|
-
onPointerDown:
|
|
894
|
-
onPointerMove:
|
|
895
|
-
onPointerUp:
|
|
896
|
-
onPointerCancel:
|
|
897
|
-
onLostPointerCapture:
|
|
898
|
-
onPointerEnter: () =>
|
|
899
|
-
onPointerLeave: () =>
|
|
900
|
-
...f.props(Z.root,
|
|
901
|
-
children: /* @__PURE__ */ D(T, { children: [
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
900
|
+
return p(V, "root", {}, {
|
|
901
|
+
onPointerDown: se,
|
|
902
|
+
onPointerMove: W,
|
|
903
|
+
onPointerUp: G,
|
|
904
|
+
onPointerCancel: K,
|
|
905
|
+
onLostPointerCapture: K,
|
|
906
|
+
onPointerEnter: () => te(!0),
|
|
907
|
+
onPointerLeave: () => te(!1),
|
|
908
|
+
...f.props(Z.root, g),
|
|
909
|
+
children: /* @__PURE__ */ D(T, { children: [e !== void 0 && /* @__PURE__ */ D("div", {
|
|
910
|
+
"aria-hidden": !0,
|
|
911
|
+
className: "x1n2onr6 xnnlda6 x47corl",
|
|
912
|
+
children: [e, /* @__PURE__ */ E("span", { ...f.props(Z.playhead, Z.insetOffset(`${L}%`)) })]
|
|
913
|
+
}), /* @__PURE__ */ D("div", {
|
|
914
|
+
className: "x1n2onr6",
|
|
915
|
+
children: [q, R.length > 0 && /* @__PURE__ */ E("div", {
|
|
916
|
+
className: "x10l6tqk x10no89f x17y0mx6 x1vjfegm x47corl",
|
|
917
|
+
children: R.map(({ marker: e, position: t }) => {
|
|
918
|
+
let n = F > 0 ? ie(t, {
|
|
919
|
+
min: M,
|
|
920
|
+
max: N
|
|
921
|
+
}) * 100 : 0, r = e.tone ?? "neutral";
|
|
922
|
+
return /* @__PURE__ */ E("button", {
|
|
923
|
+
type: "button",
|
|
924
|
+
tabIndex: -1,
|
|
925
|
+
"data-marker-id": e.id,
|
|
926
|
+
"aria-label": e.label,
|
|
927
|
+
title: e.label,
|
|
928
|
+
disabled: d,
|
|
929
|
+
onClick: (n) => {
|
|
930
|
+
O.current === e.id ? O.current = null : d || F <= 0 || V.api.activateMarker(e, t, n.nativeEvent);
|
|
931
|
+
},
|
|
932
|
+
...f.props(Z.markerButton, Z.insetOffset(`${n}%`)),
|
|
933
|
+
children: /* @__PURE__ */ E("span", {
|
|
934
|
+
"aria-hidden": !0,
|
|
935
|
+
...f.props(Z.markerPip, De[r])
|
|
936
|
+
})
|
|
937
|
+
}, e.id);
|
|
938
|
+
})
|
|
939
|
+
})]
|
|
925
940
|
})] })
|
|
926
941
|
}, "div");
|
|
927
942
|
}
|
|
@@ -959,12 +974,12 @@ var Q = {
|
|
|
959
974
|
skipped: Q.skipped,
|
|
960
975
|
unknown: Q.unknown
|
|
961
976
|
}, ze = {
|
|
962
|
-
pending:
|
|
977
|
+
pending: ee,
|
|
963
978
|
running: k,
|
|
964
979
|
complete: O,
|
|
965
|
-
failed:
|
|
980
|
+
failed: F,
|
|
966
981
|
skipped: A,
|
|
967
|
-
unknown:
|
|
982
|
+
unknown: j
|
|
968
983
|
};
|
|
969
984
|
function Be({ label: e, children: t }) {
|
|
970
985
|
return /* @__PURE__ */ E("ol", {
|
|
@@ -1089,7 +1104,7 @@ var Ue = {
|
|
|
1089
1104
|
fill: $.ratioFill
|
|
1090
1105
|
};
|
|
1091
1106
|
function Ke({ headerStart: e, headerEnd: t }) {
|
|
1092
|
-
let n =
|
|
1107
|
+
let n = Y(e), r = Y(t);
|
|
1093
1108
|
return /* @__PURE__ */ D("div", {
|
|
1094
1109
|
...f.props(s.header),
|
|
1095
1110
|
children: [n && /* @__PURE__ */ E("div", {
|
|
@@ -1102,7 +1117,7 @@ function Ke({ headerStart: e, headerEnd: t }) {
|
|
|
1102
1117
|
});
|
|
1103
1118
|
}
|
|
1104
1119
|
function qe({ aspectRatio: e = "16/9", headerStart: t, headerEnd: n, notice: r, state: i = "ready", placeholder: a, children: c, label: l, xstyle: u }) {
|
|
1105
|
-
let d = o(), p =
|
|
1120
|
+
let d = o(), p = Y(t), m = Y(n), h = p || m, g = Y(r), _ = Y(a), v = i !== "ready" && _, y = l?.trim(), b = y !== void 0 && y.length > 0, x = b ? y : i === "failed" ? "Viewport error" : "Viewport status";
|
|
1106
1121
|
return /* @__PURE__ */ D("div", {
|
|
1107
1122
|
...f.props(s.root, $.root, We[e], u),
|
|
1108
1123
|
children: [
|
|
@@ -1137,4 +1152,4 @@ function qe({ aspectRatio: e = "16/9", headerStart: t, headerEnd: n, notice: r,
|
|
|
1137
1152
|
]
|
|
1138
1153
|
});
|
|
1139
1154
|
}
|
|
1140
|
-
export { L as a, be as c,
|
|
1155
|
+
export { L as a, be as c, de as d, ue as f, Se as i, ye as l, Ue as n, ne as o, K as p, Le as r, re as s, qe as t, fe as u };
|
package/dist/styles2.css
CHANGED
|
@@ -564,10 +564,6 @@
|
|
|
564
564
|
inset-inline: 5px;
|
|
565
565
|
}
|
|
566
566
|
|
|
567
|
-
.x1u5aj70 {
|
|
568
|
-
inset-inline: 7px;
|
|
569
|
-
}
|
|
570
|
-
|
|
571
567
|
.xe8uvvx {
|
|
572
568
|
list-style: none;
|
|
573
569
|
}
|
|
@@ -1904,6 +1900,10 @@
|
|
|
1904
1900
|
grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
|
|
1905
1901
|
}
|
|
1906
1902
|
|
|
1903
|
+
.x1yqo59v {
|
|
1904
|
+
grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
|
|
1905
|
+
}
|
|
1906
|
+
|
|
1907
1907
|
.xhuszhj {
|
|
1908
1908
|
grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
|
|
1909
1909
|
}
|
|
@@ -3487,6 +3487,10 @@
|
|
|
3487
3487
|
height: 52px;
|
|
3488
3488
|
}
|
|
3489
3489
|
|
|
3490
|
+
.xnnlda6 {
|
|
3491
|
+
height: 56px;
|
|
3492
|
+
}
|
|
3493
|
+
|
|
3490
3494
|
.xols6we {
|
|
3491
3495
|
height: 6px;
|
|
3492
3496
|
}
|
|
@@ -3667,6 +3671,10 @@
|
|
|
3667
3671
|
max-height: 560px;
|
|
3668
3672
|
}
|
|
3669
3673
|
|
|
3674
|
+
.x1jkf3pl {
|
|
3675
|
+
max-height: 60svh;
|
|
3676
|
+
}
|
|
3677
|
+
|
|
3670
3678
|
.x159tps6 {
|
|
3671
3679
|
max-height: 640px;
|
|
3672
3680
|
}
|
|
@@ -4408,6 +4416,10 @@
|
|
|
4408
4416
|
}
|
|
4409
4417
|
|
|
4410
4418
|
@container scrolly (width >= 640px) {
|
|
4419
|
+
.x1xm96vb.x1xm96vb {
|
|
4420
|
+
max-height: calc(100svh - var(--xz7cmyu));
|
|
4421
|
+
}
|
|
4422
|
+
|
|
4411
4423
|
.xyvmra8.xyvmra8 {
|
|
4412
4424
|
min-height: 50vh;
|
|
4413
4425
|
}
|
|
@@ -3,22 +3,22 @@ import { t } from "./accessibility-P89UG9-r.js";
|
|
|
3
3
|
import { x as n } from "./src-DceyVyL0.js";
|
|
4
4
|
import { d as r, u as i } from "./src-CIyuaSCi.js";
|
|
5
5
|
import { n as a, t as o } from "./chart-tones-ei3BC2AL.js";
|
|
6
|
-
import { A as s, D as c, E as l, M as u, S as d, a as f, b as p, c as m, i as h, j as ee, m as g, n as _, o as v, p as y, w as b } from "./plot-layout-
|
|
7
|
-
import { i as te, n as x, r as S, t as C } from "./categorical-values-
|
|
6
|
+
import { A as s, D as c, E as l, M as u, S as d, a as f, b as p, c as m, i as h, j as ee, m as g, n as _, o as v, p as y, w as b } from "./plot-layout-CNNFMC8H.js";
|
|
7
|
+
import { i as te, n as x, r as S, t as C } from "./categorical-values-DwomVcSd.js";
|
|
8
8
|
import { i as w } from "./chart-link-AE_xuxiP.js";
|
|
9
9
|
import { a as T } from "./tone-scope-DKiSw-JR.js";
|
|
10
|
-
import { n as ne, r as re, t as E } from "./figure-format-
|
|
10
|
+
import { n as ne, r as re, t as E } from "./figure-format-BVb7yFCA.js";
|
|
11
11
|
import { a as D, i as O, o as k, r as A, t as ie } from "./scale-C2xgZyZN.js";
|
|
12
12
|
import { t as ae } from "./chart-cursor-1mFd48Jc.js";
|
|
13
|
-
import { c as oe, i as j, l as se, n as ce, o as M, r as le, s as N, t as ue } from "./figure-frame-
|
|
13
|
+
import { c as oe, i as j, l as se, n as ce, o as M, r as le, s as N, t as ue } from "./figure-frame-BHCNceS4.js";
|
|
14
14
|
import { n as P, t as F } from "./plot-width-D3hTycYX.js";
|
|
15
15
|
import { t as de } from "./plot-axes-D5S9BnBa.js";
|
|
16
16
|
import { a as I, c as L, d as R, f as z, i as fe, l as pe, n as B, o as me, r as V, s as he, t as ge } from "./plot-marks-DgCtcd3L.js";
|
|
17
|
-
import { n as _e, r as ve, t as ye } from "./plot-surface-
|
|
18
|
-
import { n as be, t as xe } from "./reference-lines-
|
|
17
|
+
import { n as _e, r as ve, t as ye } from "./plot-surface-BSjoNIva.js";
|
|
18
|
+
import { n as be, t as xe } from "./reference-lines-Bet_hRyA.js";
|
|
19
19
|
import { n as Se, r as H, t as Ce } from "./path-BglsXpnO.js";
|
|
20
20
|
import { t as we } from "./chart-range-Du1gDxCY.js";
|
|
21
|
-
import { t as U } from "./locate-
|
|
21
|
+
import { t as U } from "./locate-Dcq5ZZSk.js";
|
|
22
22
|
import * as W from "@stylexjs/stylex";
|
|
23
23
|
import { useEffect as G, useId as Te, useRef as K, useState as Ee } from "react";
|
|
24
24
|
import { bindDrag as De, dispatch as Oe } from "@ui-sdk/core";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { A as e, E as t, M as n, S as r, h as i, j as a, l as o, s } from "./plot-layout-
|
|
1
|
+
import { A as e, E as t, M as n, S as r, h as i, j as a, l as o, s } from "./plot-layout-CNNFMC8H.js";
|
|
2
2
|
import { E as c, c as l, m as u, t as d, y as f } from "./src-Bkov5TTa.js";
|
|
3
3
|
import { t as p } from "./chart-tones-ei3BC2AL.js";
|
|
4
4
|
import { t as m } from "./chart-cursor-1mFd48Jc.js";
|
|
5
|
-
import { i as h, l as g, n as _, r as ee, t as te } from "./figure-frame-
|
|
5
|
+
import { i as h, l as g, n as _, r as ee, t as te } from "./figure-frame-BHCNceS4.js";
|
|
6
6
|
import { i as v } from "./chart-link-AE_xuxiP.js";
|
|
7
7
|
import { t as y } from "./chart-range-Du1gDxCY.js";
|
|
8
8
|
import { n as ne } from "./plot-width-D3hTycYX.js";
|
|
9
|
-
import { r as re } from "./figure-format-
|
|
9
|
+
import { r as re } from "./figure-format-BVb7yFCA.js";
|
|
10
10
|
import { a as ie } from "./tone-scope-DKiSw-JR.js";
|
|
11
11
|
import { t as ae } from "./plot-axes-D5S9BnBa.js";
|
|
12
12
|
import { r as oe } from "./plot-marks-DgCtcd3L.js";
|
|
13
|
-
import { n as se, r as ce, t as le } from "./plot-surface-
|
|
13
|
+
import { n as se, r as ce, t as le } from "./plot-surface-BSjoNIva.js";
|
|
14
14
|
import { r as ue } from "./scale-C2xgZyZN.js";
|
|
15
15
|
import * as b from "@stylexjs/stylex";
|
|
16
16
|
import { useId as de, useRef as fe, useState as pe } from "react";
|