@mechane-ai/elements 0.65.0 → 0.68.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/README.md +21 -10
- package/dist/ai.js +288 -205
- package/dist/{article-BrUa4Wz1.js → article-Ni152e-v.js} +107 -92
- package/dist/article.js +1 -1
- package/dist/catalog.json +151 -34
- package/dist/{categorical-values-AXJkMt-Y.js → categorical-values-6Iz03F1i.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/{code-block-BDRmjlES.js → code-block-DbW_t9U4.js} +1 -1
- package/dist/collections.js +1 -1
- package/dist/{color-legend-CIo7DhXB.js → color-legend-4As8881l.js} +1 -1
- package/dist/{commands-rzsDElrG.js → commands-C7Zrp-tG.js} +2 -2
- package/dist/content/code.js +1 -1
- package/dist/content/diff.js +3 -3
- package/dist/content/link.js +1 -1
- package/dist/content/markdown.js +1 -1
- package/dist/content/tree.js +2 -2
- package/dist/{content-link-DRaNf1mD.js → content-link-BN4NPp0u.js} +1 -1
- package/dist/content.js +1 -1
- package/dist/{dates-wu-gKO2C.js → dates-OTq-xU33.js} +2 -2
- package/dist/{dumbbell-plot-VFajQtEW.js → dumbbell-plot-jaQvOctJ.js} +4 -4
- package/dist/{embedding-map-BqDEmy88.js → embedding-map-DnZL1kvY.js} +8 -8
- package/dist/feedback.js +1 -1
- package/dist/figure-format-BVb7yFCA.js +46 -0
- package/dist/{figure-frame-Dd-pOeZN.js → figure-frame-96zFqsWz.js} +22 -21
- package/dist/forms/dates.js +1 -1
- package/dist/{forms-Bjx7JQ30.js → forms-iAOjGRTO.js} +1 -1
- package/dist/forms.js +2 -2
- package/dist/{image-grid-Dpyqxgwy.js → image-grid-B6fdmE9c.js} +4 -4
- package/dist/index.js +1 -1
- package/dist/kits/evaluation.js +15 -15
- package/dist/kits/interpretability.js +49 -45
- package/dist/kits/operations.js +81 -80
- package/dist/kits/research.js +776 -499
- package/dist/kits/training.js +108 -107
- package/dist/layout.js +1 -1
- package/dist/lesson.js +3 -3
- package/dist/markdown-JeuBeMDZ.js +293 -0
- package/dist/mdx.js +6 -6
- package/dist/navigation/commands.js +1 -1
- package/dist/{navigation-Cp3p0gss.js → navigation-CTnYtVD8.js} +1 -1
- package/dist/navigation.js +3 -3
- package/dist/packages/ai/src/index.d.ts +2 -0
- package/dist/packages/ai/src/message-reactions.d.ts +51 -0
- package/dist/packages/ai/src/message.d.ts +3 -1
- package/dist/packages/charts/src/plot/index.d.ts +2 -0
- package/dist/packages/charts/src/plot/plot-layout.d.ts +2 -2
- package/dist/packages/charts/src/plot/spatial-layer.d.ts +32 -0
- package/dist/packages/charts/src/plot/ticks.d.ts +2 -2
- package/dist/packages/collections/src/card-columns-model.d.ts +50 -0
- package/dist/packages/collections/src/card-columns.d.ts +30 -0
- package/dist/packages/collections/src/collection-page.d.ts +43 -0
- package/dist/packages/collections/src/column-card.d.ts +15 -0
- package/dist/packages/collections/src/data-table-layout.d.ts +2 -0
- package/dist/packages/collections/src/data-table-rows.d.ts +4 -3
- package/dist/packages/collections/src/data-table.d.ts +2 -2
- package/dist/packages/collections/src/index.d.ts +5 -0
- package/dist/packages/collections/src/table-query.d.ts +9 -1
- package/dist/packages/feedback/src/feedback.d.ts +0 -4
- package/dist/packages/feedback/src/index.d.ts +1 -1
- package/dist/packages/foundations/src/visible-motion.d.ts +1 -1
- package/dist/packages/kits/src/research/index.d.ts +7 -2
- package/dist/packages/kits/src/research/motion-clip.d.ts +41 -0
- package/dist/packages/kits/src/research/motion-error.d.ts +8 -0
- package/dist/packages/kits/src/research/motion-figure.d.ts +9 -0
- package/dist/packages/kits/src/research/motion-frame.d.ts +22 -0
- package/dist/packages/kits/src/research/motion-scene.d.ts +22 -0
- package/dist/packages/teaching/src/article/uncover.d.ts +2 -0
- package/dist/{param-CwT1RvUS.js → param-Dk92C-K1.js} +2 -2
- package/dist/{pierre-diff-DuvK3kLF.js → pierre-diff-DXVIwW7o.js} +1 -1
- package/dist/plot-CpTwLIYN.js +101 -0
- package/dist/{plot-layout-CvkeUuG6.js → plot-layout-1MG72ZWn.js} +175 -124
- package/dist/{plot-surface-yy37R4vs.js → plot-surface-8-FZI94y.js} +1 -1
- package/dist/{reference-lines-AMeDkYlo.js → reference-lines-C18o1yEY.js} +1 -1
- package/dist/{scene-BRhI8XSy.js → scene-B8dppj5V.js} +7 -7
- package/dist/scene.js +1 -1
- package/dist/{slope-chart-BMOCaa8R.js → slope-chart-CELflRJd.js} +5 -5
- package/dist/{src-9n2M1V_y.js → src-BCAelv4f.js} +3 -3
- package/dist/{src-BgmAkau8.js → src-Bkov5TTa.js} +171 -164
- package/dist/{src-Bns-5joF.js → src-BsqbWDxS.js} +4 -4
- package/dist/{src-BdyO4PgQ.js → src-CIyuaSCi.js} +101 -107
- package/dist/{src-Tu6d_Pm8.js → src-Dc1t1ugL.js} +958 -585
- package/dist/{src-C5SH3jjU.js → src-DceyVyL0.js} +2 -2
- package/dist/{src-C_E29-DX.js → src-Dlh99sPD.js} +1 -1
- package/dist/styles2.css +33 -1
- package/dist/{time-series-CTNVqoUQ.js → time-series-DtAtGoT_.js} +9 -9
- package/dist/{timeline-DrsDtEIW.js → timeline-CzianQir.js} +5 -5
- package/dist/{token-heatmap-DddArdH8.js → token-heatmap-m6oaMwkK.js} +274 -289
- package/dist/{token-predictions-CBykmPID.js → token-predictions-CpGVjOIs.js} +4 -4
- package/dist/{transport-r1QgELf8.js → transport-DQ1yzsQl.js} +5 -5
- package/dist/{tree-diagram-BIJFK4pl.js → tree-diagram-D9ekymCQ.js} +5 -5
- package/dist/{treemap-DgmEw_mr.js → treemap-DT8q65LQ.js} +5 -5
- package/dist/{use-tween-BWf44Jy4.js → use-tween-DbXVZBR8.js} +1 -1
- package/dist/{violin-plot-BYJnv6sG.js → violin-plot-83HSjnQM.js} +4 -4
- package/dist/visible-motion-D6NwjGNz.js +24 -0
- package/dist/{waterfall-BNseqMas.js → waterfall-DmApvdrY.js} +5 -5
- package/package.json +1 -1
- package/recipes/recorded-motion.tsx +14 -0
- package/recipes/searchable-collection.tsx +74 -76
- package/skills/extend-elements/SKILL.md +2 -1
- package/skills/review-elements/SKILL.md +15 -7
- package/skills/review-explainer/SKILL.md +4 -0
- package/skills/upgrade-elements/SKILL.md +3 -1
- package/skills/upgrade-elements/references/releases.md +20 -0
- package/skills/use-elements/SKILL.md +10 -6
- package/skills/use-elements/references/collections.md +59 -12
- package/skills/use-elements/references/conversations.md +32 -0
- package/skills/use-elements/references/editorial-restraint.md +17 -29
- package/skills/use-elements/references/figures.md +6 -2
- package/skills/use-elements/references/kits.md +23 -0
- package/skills/use-elements/references/workspace.md +5 -5
- package/skills/write-explainer/SKILL.md +5 -0
- package/dist/figure-format-B8kRZMlo.js +0 -36
- package/dist/markdown--nfaDoR1.js +0 -313
- package/dist/packages/kits/src/research/collection-page.d.ts +0 -71
package/dist/kits/training.js
CHANGED
|
@@ -1,39 +1,38 @@
|
|
|
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-
|
|
4
|
-
import {
|
|
5
|
-
import { T as
|
|
6
|
-
import { o as
|
|
7
|
-
import { r as
|
|
8
|
-
import { d
|
|
9
|
-
import { c as p, o as m } from "../src-BgmAkau8.js";
|
|
3
|
+
import { r, s as i } from "../slope-chart-CELflRJd.js";
|
|
4
|
+
import { c as a, o } from "../src-Bkov5TTa.js";
|
|
5
|
+
import { T as s } from "../plot-layout-1MG72ZWn.js";
|
|
6
|
+
import { o as c, t as l } from "../cells-BRI8LpMU.js";
|
|
7
|
+
import { r as u } from "../figure-format-BVb7yFCA.js";
|
|
8
|
+
import { d, g as f, h as p } from "../src-Dc1t1ugL.js";
|
|
10
9
|
import "@stylexjs/stylex";
|
|
11
|
-
import { useState as
|
|
12
|
-
import { jsx as
|
|
13
|
-
import { Eye as
|
|
10
|
+
import { useState as m } from "react";
|
|
11
|
+
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
12
|
+
import { Eye as _, EyeOff as v } from "lucide-react";
|
|
14
13
|
// packages/kits/src/training/run-marker.tsx
|
|
15
|
-
function
|
|
16
|
-
return /* @__PURE__ */
|
|
14
|
+
function y({ id: e }) {
|
|
15
|
+
return /* @__PURE__ */ h(s, {
|
|
17
16
|
tone: t(e) ?? "neutral",
|
|
18
17
|
shape: "line"
|
|
19
18
|
});
|
|
20
19
|
}
|
|
21
20
|
// packages/kits/src/training/run-legend.tsx
|
|
22
|
-
var
|
|
23
|
-
function
|
|
24
|
-
return /* @__PURE__ */
|
|
21
|
+
var b = 14;
|
|
22
|
+
function x({ runs: e, selected: t, hidden: n, labels: r, onSelectedChange: i, onHiddenChange: a }) {
|
|
23
|
+
return /* @__PURE__ */ h("ul", {
|
|
25
24
|
"aria-label": r.legend,
|
|
26
25
|
className: "x78zum5 x1a02dak x1hnptsi x1ghz6dp x1717udv xe8uvvx xeuugli",
|
|
27
26
|
children: e.map((e) => {
|
|
28
|
-
let o = n.includes(e.id), s = t === e.id, c = o ?
|
|
29
|
-
return /* @__PURE__ */
|
|
27
|
+
let o = n.includes(e.id), s = t === e.id, c = o ? v : _;
|
|
28
|
+
return /* @__PURE__ */ g("li", {
|
|
30
29
|
...{
|
|
31
30
|
0: { className: "x3nfvp2 x1qjc9v5 x193iq5w xeuugli xmkeg23 x1y0btm7 x1ey3b81 xy32g2j xpvm0e4 xb3r6kr" },
|
|
32
31
|
2: { className: "x3nfvp2 x1qjc9v5 x193iq5w xeuugli xmkeg23 x1y0btm7 xy32g2j xpvm0e4 xb3r6kr x159tnba" },
|
|
33
32
|
1: { className: "x3nfvp2 x1qjc9v5 x193iq5w xeuugli xmkeg23 x1y0btm7 x1ey3b81 xy32g2j xb3r6kr x1r7kqkb" },
|
|
34
33
|
3: { className: "x3nfvp2 x1qjc9v5 x193iq5w xeuugli xmkeg23 x1y0btm7 xy32g2j xb3r6kr x159tnba x1r7kqkb" }
|
|
35
34
|
}[!!s << 1 | !!o],
|
|
36
|
-
children: [/* @__PURE__ */
|
|
35
|
+
children: [/* @__PURE__ */ g("button", {
|
|
37
36
|
type: "button",
|
|
38
37
|
"aria-pressed": s,
|
|
39
38
|
title: `${e.label} · ${r.states[e.state]}`,
|
|
@@ -42,14 +41,14 @@ function S({ runs: e, selected: t, hidden: n, labels: r, onSelectedChange: i, on
|
|
|
42
41
|
event: t.nativeEvent
|
|
43
42
|
}),
|
|
44
43
|
className: "x3nfvp2 x6s0dn4 x1hnptsi xeuugli x159bbqr x5g2kb4 xc342km xjbqb8w xbixft x1ypdohk x1hz01jw xtqrqnz x1778rvt xx9gdjd x2ssjo2",
|
|
45
|
-
children: [/* @__PURE__ */
|
|
44
|
+
children: [/* @__PURE__ */ h(y, { id: e.id }), /* @__PURE__ */ h("span", {
|
|
46
45
|
...{
|
|
47
46
|
0: { className: "xb3r6kr xlyipyv xuxw1ft" },
|
|
48
47
|
1: { className: "xb3r6kr xlyipyv xuxw1ft x153jb6y xmqliwb x1ks1olk" }
|
|
49
48
|
}[!!o | 0],
|
|
50
49
|
children: e.label
|
|
51
50
|
})]
|
|
52
|
-
}), /* @__PURE__ */
|
|
51
|
+
}), /* @__PURE__ */ h("button", {
|
|
53
52
|
type: "button",
|
|
54
53
|
"aria-pressed": !o,
|
|
55
54
|
"aria-label": `${o ? r.show : r.hide} ${e.label}`,
|
|
@@ -58,8 +57,8 @@ function S({ runs: e, selected: t, hidden: n, labels: r, onSelectedChange: i, on
|
|
|
58
57
|
event: t.nativeEvent
|
|
59
58
|
}),
|
|
60
59
|
className: "x3nfvp2 x6s0dn4 x1hnptsi xeuugli x159bbqr x5g2kb4 xc342km xjbqb8w x1ypdohk x1hz01jw xtqrqnz x1778rvt xx9gdjd x2ssjo2 x153jb6y",
|
|
61
|
-
children: /* @__PURE__ */
|
|
62
|
-
size:
|
|
60
|
+
children: /* @__PURE__ */ h(c, {
|
|
61
|
+
size: b,
|
|
63
62
|
"aria-hidden": !0
|
|
64
63
|
})
|
|
65
64
|
})]
|
|
@@ -68,81 +67,82 @@ function S({ runs: e, selected: t, hidden: n, labels: r, onSelectedChange: i, on
|
|
|
68
67
|
});
|
|
69
68
|
}
|
|
70
69
|
// packages/kits/src/training/runs.ts
|
|
71
|
-
var
|
|
70
|
+
var S = {
|
|
72
71
|
running: "Running",
|
|
73
72
|
finished: "Finished",
|
|
74
73
|
failed: "Failed",
|
|
75
74
|
stopped: "Stopped"
|
|
76
|
-
},
|
|
77
|
-
function
|
|
78
|
-
return new Set(e.map((e) => e.id)).size === e.length ? e.length >
|
|
75
|
+
}, C = { runs: 12 };
|
|
76
|
+
function w(e) {
|
|
77
|
+
return new Set(e.map((e) => e.id)).size === e.length ? e.length > C.runs ? `This view shows at most ${C.runs} runs. Use RunsOverview for a sweep.` : void 0 : "Runs must have unique identifiers.";
|
|
79
78
|
}
|
|
80
|
-
function
|
|
79
|
+
function T(e) {
|
|
81
80
|
return Object.fromEntries(e.flatMap((e) => e.tone === void 0 ? [] : [[e.id, e.tone]]));
|
|
82
81
|
}
|
|
83
82
|
// packages/kits/src/training/run-dashboard.tsx
|
|
84
|
-
var
|
|
83
|
+
var E = {
|
|
85
84
|
legend: "Runs",
|
|
86
85
|
hide: "Hide",
|
|
87
86
|
show: "Show",
|
|
88
|
-
states:
|
|
87
|
+
states: S,
|
|
89
88
|
noRuns: "There are no runs to compare.",
|
|
90
89
|
allHidden: "Every run is hidden. Show a run to see its curves."
|
|
91
90
|
};
|
|
92
|
-
function
|
|
91
|
+
function D({ runs: e, metrics: t, series: n, selected: r, hidden: i }) {
|
|
93
92
|
let a = new Set(e.map((e) => e.id)), o = new Set(t.map((e) => e.id)), s = Object.keys(n).find((e) => !o.has(e)), c = Object.values(n).flatMap((e) => Object.keys(e)).find((e) => !a.has(e));
|
|
94
93
|
if (o.size !== t.length) return "Metrics must have unique identifiers.";
|
|
95
94
|
if (s !== void 0) return `The series name metric ${s}, which is not among the metrics.`;
|
|
96
95
|
if (c !== void 0) return `The series name run ${c}, which is not among the runs.`;
|
|
97
96
|
if (r !== null && !a.has(r)) return `The selected run ${r} is not among the runs.`;
|
|
98
97
|
let l = i.find((e) => !a.has(e));
|
|
99
|
-
return l === void 0 ?
|
|
98
|
+
return l === void 0 ? w(e) : `The hidden run ${l} is not among the runs.`;
|
|
100
99
|
}
|
|
101
|
-
function
|
|
102
|
-
let
|
|
103
|
-
...
|
|
100
|
+
function O({ title: t, description: r, locale: a, status: s, coverage: c, transforms: l, runs: u, metrics: d, series: f, x: p, selected: m = null, onSelectedChange: _, hidden: v = [], onHiddenChange: y, hasLegend: b = !0, height: S = "compact", minPanelWidth: C, labels: w }) {
|
|
101
|
+
let O = {
|
|
102
|
+
...E,
|
|
104
103
|
...w
|
|
105
|
-
}, k =
|
|
104
|
+
}, k = D({
|
|
106
105
|
runs: u,
|
|
107
106
|
metrics: d,
|
|
108
107
|
series: f,
|
|
109
108
|
selected: m,
|
|
110
109
|
hidden: v
|
|
111
110
|
});
|
|
112
|
-
if (k !== void 0) return /* @__PURE__ */
|
|
113
|
-
|
|
111
|
+
if (k !== void 0) return /* @__PURE__ */ h(o, {
|
|
112
|
+
tone: "negative",
|
|
113
|
+
role: "alert",
|
|
114
114
|
children: `${t}: ${k}`
|
|
115
115
|
});
|
|
116
|
-
let A = u.filter((e) => !v.includes(e.id)), j = u.length === 0 ?
|
|
117
|
-
return /* @__PURE__ */
|
|
116
|
+
let A = u.filter((e) => !v.includes(e.id)), j = u.length === 0 ? O.noRuns : O.allHidden;
|
|
117
|
+
return /* @__PURE__ */ h(n, {
|
|
118
118
|
ids: u.map((e) => e.id),
|
|
119
|
-
tones:
|
|
120
|
-
children: /* @__PURE__ */
|
|
119
|
+
tones: T(u),
|
|
120
|
+
children: /* @__PURE__ */ g("div", {
|
|
121
121
|
className: "xrvj5dj xaml1ju xeuugli",
|
|
122
|
-
children: [b && /* @__PURE__ */
|
|
122
|
+
children: [b && /* @__PURE__ */ h(x, {
|
|
123
123
|
runs: u,
|
|
124
124
|
selected: m,
|
|
125
125
|
hidden: v,
|
|
126
|
-
labels:
|
|
127
|
-
onSelectedChange:
|
|
126
|
+
labels: O,
|
|
127
|
+
onSelectedChange: _,
|
|
128
128
|
onHiddenChange: y
|
|
129
|
-
}), /* @__PURE__ */
|
|
129
|
+
}), /* @__PURE__ */ h(e, {
|
|
130
130
|
title: t,
|
|
131
131
|
description: r,
|
|
132
132
|
minPanelWidth: C,
|
|
133
133
|
ids: u.map((e) => e.id),
|
|
134
|
-
tones:
|
|
135
|
-
children: d.map((e) => /* @__PURE__ */
|
|
134
|
+
tones: T(u),
|
|
135
|
+
children: d.map((e) => /* @__PURE__ */ h(i, {
|
|
136
136
|
title: e.title,
|
|
137
137
|
description: e.description,
|
|
138
|
-
locale:
|
|
138
|
+
locale: a,
|
|
139
139
|
status: s,
|
|
140
140
|
coverage: c,
|
|
141
141
|
transforms: l,
|
|
142
142
|
emptyLabel: j,
|
|
143
143
|
x: p,
|
|
144
144
|
y: e.y,
|
|
145
|
-
height:
|
|
145
|
+
height: S,
|
|
146
146
|
labels: "none",
|
|
147
147
|
highlighted: m,
|
|
148
148
|
series: A.map((t) => ({
|
|
@@ -156,125 +156,126 @@ function k({ title: t, description: r, locale: o, status: s, coverage: c, transf
|
|
|
156
156
|
});
|
|
157
157
|
}
|
|
158
158
|
// packages/kits/src/training/run-state.tsx
|
|
159
|
-
var
|
|
159
|
+
var k = {
|
|
160
160
|
running: "neutral",
|
|
161
161
|
finished: "positive",
|
|
162
162
|
failed: "negative",
|
|
163
163
|
stopped: "warning"
|
|
164
164
|
};
|
|
165
|
-
function
|
|
166
|
-
return /* @__PURE__ */
|
|
167
|
-
tone:
|
|
165
|
+
function A({ state: e, labels: t }) {
|
|
166
|
+
return /* @__PURE__ */ h(o, {
|
|
167
|
+
tone: k[e],
|
|
168
168
|
children: t[e]
|
|
169
169
|
});
|
|
170
170
|
}
|
|
171
171
|
// packages/kits/src/training/run-table.tsx
|
|
172
|
-
var
|
|
172
|
+
var j = {
|
|
173
173
|
name: "Run",
|
|
174
174
|
state: "State",
|
|
175
|
-
states:
|
|
175
|
+
states: S,
|
|
176
176
|
yes: "Yes",
|
|
177
177
|
no: "No",
|
|
178
178
|
empty: "There are no runs.",
|
|
179
179
|
showRun: "Show in the charts:",
|
|
180
180
|
focused: "Focused"
|
|
181
|
-
},
|
|
182
|
-
function
|
|
181
|
+
}, M = 140, N = 92, P = 104, F = 170;
|
|
182
|
+
function I({ column: e, run: t, labels: n, locale: r }) {
|
|
183
183
|
let i = e.values[t] ?? null;
|
|
184
|
-
return typeof i == "number" ?
|
|
184
|
+
return typeof i == "number" ? u({
|
|
185
185
|
value: i,
|
|
186
186
|
locale: r,
|
|
187
187
|
format: e.format ?? {}
|
|
188
188
|
}) : typeof i == "boolean" ? i ? n.yes : n.no : i ?? "Unavailable";
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function L(e) {
|
|
191
191
|
return typeof e == "boolean" ? Number(e) : e;
|
|
192
192
|
}
|
|
193
|
-
function
|
|
193
|
+
function R(e, t) {
|
|
194
194
|
return e.kind === "bar" ? e.values[t] ?? null : e.values[t]?.findLast((e) => e !== null) ?? null;
|
|
195
195
|
}
|
|
196
|
-
function
|
|
196
|
+
function z(e, t) {
|
|
197
197
|
return e === null || t === null ? Number(e === null) - Number(t === null) : typeof e == "number" && typeof t == "number" ? e - t : String(e).localeCompare(String(t));
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function B({ runs: e, columns: t, metrics: n }) {
|
|
200
200
|
let r = new Set(e.map((e) => e.id)), i = [...t.map((e) => e.values), ...n.map((e) => e.values)].flatMap((e) => Object.keys(e)).find((e) => !r.has(e)), a = [...t, ...n].map((e) => e.id);
|
|
201
|
-
return new Set(a).size === a.length ? i === void 0 ?
|
|
201
|
+
return new Set(a).size === a.length ? i === void 0 ? w(e) : `A column has values for run ${i}, which is not among the runs.` : "Columns and metrics must have unique identifiers.";
|
|
202
202
|
}
|
|
203
|
-
function
|
|
204
|
-
let
|
|
205
|
-
...
|
|
203
|
+
function V({ title: e, locale: t, status: r, runs: i, columns: s = [], metrics: u = [], showOnlyDifferences: g = !1, selected: _ = null, onSelectedChange: v, hidden: b = [], onHiddenChange: x, sort: S, onSortChange: C, labels: w }) {
|
|
204
|
+
let E = {
|
|
205
|
+
...j,
|
|
206
206
|
...w
|
|
207
|
-
}, [D, O] =
|
|
207
|
+
}, [D, O] = m(), k = S === void 0 ? D : S ?? void 0, V = B({
|
|
208
208
|
runs: i,
|
|
209
|
-
columns:
|
|
210
|
-
metrics:
|
|
209
|
+
columns: s,
|
|
210
|
+
metrics: u
|
|
211
211
|
});
|
|
212
|
-
if (
|
|
213
|
-
|
|
214
|
-
|
|
212
|
+
if (V !== void 0) return /* @__PURE__ */ h(o, {
|
|
213
|
+
tone: "negative",
|
|
214
|
+
role: "alert",
|
|
215
|
+
children: `${e}: ${V}`
|
|
215
216
|
});
|
|
216
|
-
let H = new Set(
|
|
217
|
+
let H = new Set(s.filter((e) => i.length > 1 && new Set(i.map((t) => e.values[t.id] ?? null)).size === 1).map((e) => e.id)), U = {
|
|
217
218
|
name: (e) => e.label,
|
|
218
|
-
state: (e) =>
|
|
219
|
-
...Object.fromEntries(
|
|
220
|
-
...Object.fromEntries(
|
|
219
|
+
state: (e) => E.states[e.state],
|
|
220
|
+
...Object.fromEntries(s.map((e) => [e.id, (t) => L(e.values[t.id] ?? null)])),
|
|
221
|
+
...Object.fromEntries(u.map((e) => [e.id, (t) => R(e, t.id)]))
|
|
221
222
|
}, W = i.toSorted((e, t) => {
|
|
222
|
-
let n = k === void 0 ? void 0 : U[k.columnId], r = n === void 0 ? 0 :
|
|
223
|
+
let n = k === void 0 ? void 0 : U[k.columnId], r = n === void 0 ? 0 : z(n(e), n(t));
|
|
223
224
|
return k?.direction === "descending" ? -r : r;
|
|
224
225
|
}), G = [
|
|
225
226
|
{
|
|
226
227
|
id: "name",
|
|
227
|
-
label:
|
|
228
|
+
label: E.name,
|
|
228
229
|
role: "primary",
|
|
229
|
-
width:
|
|
230
|
+
width: F,
|
|
230
231
|
canSort: !0,
|
|
231
|
-
cell: (e) => /* @__PURE__ */
|
|
232
|
-
secondary: _ === e.id ? [
|
|
233
|
-
leading: /* @__PURE__ */
|
|
232
|
+
cell: (e) => /* @__PURE__ */ h(d, {
|
|
233
|
+
secondary: _ === e.id ? [E.focused, e.detail].filter(Boolean).join(" · ") : e.detail,
|
|
234
|
+
leading: /* @__PURE__ */ h(y, { id: e.id }),
|
|
234
235
|
children: e.label
|
|
235
236
|
})
|
|
236
237
|
},
|
|
237
238
|
{
|
|
238
239
|
id: "state",
|
|
239
|
-
label:
|
|
240
|
+
label: E.state,
|
|
240
241
|
role: "status",
|
|
241
|
-
width:
|
|
242
|
+
width: P,
|
|
242
243
|
canSort: !0,
|
|
243
|
-
cell: (e) => /* @__PURE__ */
|
|
244
|
+
cell: (e) => /* @__PURE__ */ h(A, {
|
|
244
245
|
state: e.state,
|
|
245
|
-
labels:
|
|
246
|
+
labels: E.states
|
|
246
247
|
})
|
|
247
248
|
},
|
|
248
|
-
...
|
|
249
|
+
...s.filter((e) => !g || !H.has(e.id)).map((e) => ({
|
|
249
250
|
id: e.id,
|
|
250
251
|
label: e.label,
|
|
251
252
|
role: typeof Object.values(e.values).find((e) => e !== null) == "number" ? "number" : "text",
|
|
252
|
-
width:
|
|
253
|
+
width: N,
|
|
253
254
|
isSecondary: !0,
|
|
254
255
|
canSort: !0,
|
|
255
|
-
cell: (n) => /* @__PURE__ */
|
|
256
|
+
cell: (n) => /* @__PURE__ */ h(a, {
|
|
256
257
|
tone: H.has(e.id) ? "muted" : "ink",
|
|
257
|
-
children:
|
|
258
|
+
children: I({
|
|
258
259
|
column: e,
|
|
259
260
|
run: n.id,
|
|
260
|
-
labels:
|
|
261
|
+
labels: E,
|
|
261
262
|
locale: t
|
|
262
263
|
})
|
|
263
264
|
})
|
|
264
265
|
})),
|
|
265
|
-
...
|
|
266
|
+
...u.map((e) => ({
|
|
266
267
|
id: e.id,
|
|
267
268
|
label: e.label,
|
|
268
269
|
role: "number",
|
|
269
|
-
width:
|
|
270
|
+
width: M,
|
|
270
271
|
canSort: !0,
|
|
271
|
-
cell: (n) => e.kind === "bar" ? /* @__PURE__ */
|
|
272
|
+
cell: (n) => e.kind === "bar" ? /* @__PURE__ */ h(c, {
|
|
272
273
|
id: n.id,
|
|
273
274
|
value: e.values[n.id] ?? null,
|
|
274
275
|
domain: e.domain,
|
|
275
276
|
locale: t,
|
|
276
277
|
format: e.format
|
|
277
|
-
}) : /* @__PURE__ */
|
|
278
|
+
}) : /* @__PURE__ */ h(l, {
|
|
278
279
|
id: n.id,
|
|
279
280
|
points: e.values[n.id] ?? [],
|
|
280
281
|
domain: e.domain,
|
|
@@ -283,14 +284,14 @@ function H({ title: e, locale: t, status: r, runs: i, columns: o = [], metrics:
|
|
|
283
284
|
})
|
|
284
285
|
}))
|
|
285
286
|
];
|
|
286
|
-
return r === "loading" ? /* @__PURE__ */
|
|
287
|
+
return r === "loading" ? /* @__PURE__ */ h(f, {
|
|
287
288
|
caption: e,
|
|
288
289
|
columns: G,
|
|
289
290
|
rows: i.length
|
|
290
|
-
}) : /* @__PURE__ */
|
|
291
|
+
}) : /* @__PURE__ */ h(n, {
|
|
291
292
|
ids: i.map((e) => e.id),
|
|
292
|
-
tones:
|
|
293
|
-
children: /* @__PURE__ */
|
|
293
|
+
tones: T(i),
|
|
294
|
+
children: /* @__PURE__ */ h(p, {
|
|
294
295
|
query: {
|
|
295
296
|
mode: "static",
|
|
296
297
|
reason: "A run set is short and the application chooses which runs it holds."
|
|
@@ -299,17 +300,17 @@ function H({ title: e, locale: t, status: r, runs: i, columns: o = [], metrics:
|
|
|
299
300
|
rows: W,
|
|
300
301
|
columns: G,
|
|
301
302
|
getRowId: (e) => e.id,
|
|
302
|
-
empty:
|
|
303
|
+
empty: E.empty,
|
|
303
304
|
sort: k,
|
|
304
305
|
onSortChange: (e) => {
|
|
305
306
|
O(e), C?.(e);
|
|
306
307
|
},
|
|
307
|
-
selectedIds: new Set(i.filter((e) => !
|
|
308
|
+
selectedIds: new Set(i.filter((e) => !b.includes(e.id)).map((e) => e.id)),
|
|
308
309
|
onSelectionChange: (e, t) => x?.(i.filter((t) => !e.has(t.id)).map((e) => e.id), {
|
|
309
310
|
reason: t.reason === "item-press" ? "press" : "imperative",
|
|
310
311
|
event: t.event
|
|
311
312
|
}),
|
|
312
|
-
selectionLabel: (e) => `${
|
|
313
|
+
selectionLabel: (e) => `${E.showRun} ${e.label}`,
|
|
313
314
|
activeRowId: _ ?? void 0,
|
|
314
315
|
rowAction: {
|
|
315
316
|
label: (e) => e.label,
|
|
@@ -319,17 +320,17 @@ function H({ title: e, locale: t, status: r, runs: i, columns: o = [], metrics:
|
|
|
319
320
|
});
|
|
320
321
|
}
|
|
321
322
|
// packages/kits/src/training/runs-overview.tsx
|
|
322
|
-
function
|
|
323
|
-
return /* @__PURE__ */
|
|
323
|
+
function H({ summaryText: e, selected: t, ...n }) {
|
|
324
|
+
return /* @__PURE__ */ g("div", {
|
|
324
325
|
className: "xrvj5dj x1hnptsi xeuugli",
|
|
325
|
-
children: [/* @__PURE__ */
|
|
326
|
+
children: [/* @__PURE__ */ h(r, {
|
|
326
327
|
...n,
|
|
327
328
|
selected: t,
|
|
328
329
|
featured: t == null ? [] : [t]
|
|
329
|
-
}), e !== void 0 && /* @__PURE__ */
|
|
330
|
+
}), e !== void 0 && /* @__PURE__ */ h("p", {
|
|
330
331
|
className: "x1ghz6dp x153jb6y x1hz01jw xtqrqnz x1778rvt",
|
|
331
332
|
children: e
|
|
332
333
|
})]
|
|
333
334
|
});
|
|
334
335
|
}
|
|
335
|
-
export {
|
|
336
|
+
export { O as RunDashboard, V as RunTable, H as RunsOverview, C as runLimits, S as runStateLabels };
|
package/dist/layout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { d as AppShell, n as CollectionLayout, h as DevToolsBar, l as FigureGrid, c as FocusPage, b as Navigation, x as NavigationItem, S as NavigationLink, p as NavigationRail, f as NavigationRailMenu, m as NavigationRailPlaceholder, C as NavigationSection, D as PageInset, _ as PageLayout, v as PageSection, u as ReadingColumn, t as RecordPage, s as Resizable, w as SidebarBrand, T as SidebarFooter, E as SidebarLabel, y as ToolbarAction, r as ViewStack, i as Workbench, a as WorkbenchFooter, o as WorkbenchScroll, g as useDevToolsBar } from "./src-
|
|
1
|
+
export { d as AppShell, n as CollectionLayout, h as DevToolsBar, l as FigureGrid, c as FocusPage, b as Navigation, x as NavigationItem, S as NavigationLink, p as NavigationRail, f as NavigationRailMenu, m as NavigationRailPlaceholder, C as NavigationSection, D as PageInset, _ as PageLayout, v as PageSection, u as ReadingColumn, t as RecordPage, s as Resizable, w as SidebarBrand, T as SidebarFooter, E as SidebarLabel, y as ToolbarAction, r as ViewStack, i as Workbench, a as WorkbenchFooter, o as WorkbenchScroll, g as useDevToolsBar } from "./src-BCAelv4f.js";
|
package/dist/lesson.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as e, t } from "./clock-DSm5lkNE.js";
|
|
2
|
-
import { _ as n, g as r, h as i, i as a, l as o, n as s, t as c, u as l } from "./param-
|
|
3
|
-
import { t as u } from "./use-tween-
|
|
4
|
-
import { a as d, c as f, d as p, i as m, l as h, n as g, o as _, r as v, s as y, t as b, u as x } from "./transport-
|
|
2
|
+
import { _ as n, g as r, h as i, i as a, l as o, n as s, t as c, u as l } from "./param-Dk92C-K1.js";
|
|
3
|
+
import { t as u } from "./use-tween-DbXVZBR8.js";
|
|
4
|
+
import { a as d, c as f, d as p, i as m, l as h, n as g, o as _, r as v, s as y, t as b, u as x } from "./transport-DQ1yzsQl.js";
|
|
5
5
|
export { a as BoundValue, h as Lesson, i as LessonLocale, c as Param, m as ParamChoice, d as ParamSlider, _ as ParamToggle, g as Playback, b as Transport, s as Value, n as createTween, o as defineLesson, t as isMotionReduced, l as lessonGraph, e as onFrame, x as playbackPaces, p as playbackRuns, y as useLesson, f as useLessonContext, r as useLessonLocale, v as usePlayback, u as useTween };
|