@mechane-ai/elements 0.49.1 → 0.51.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/catalog.json +21 -1
- 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 +1 -1
- 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/collections.js +1 -1
- package/dist/{dumbbell-plot-B-Tn7ewW.js → dumbbell-plot-BC8d_IJy.js} +1 -1
- package/dist/{embedding-map-Bljn-A5q.js → embedding-map-Bj8krO-d.js} +1 -1
- package/dist/figure-frame-koVKcXph.js +323 -0
- package/dist/{image-grid-mrG5u9oE.js → image-grid-CLhol2jy.js} +1 -1
- package/dist/kits/evaluation.js +49 -47
- package/dist/kits/interpretability.js +7 -7
- package/dist/kits/operations.js +4 -4
- package/dist/kits/research.js +413 -265
- package/dist/kits/training.js +2 -2
- package/dist/layout.js +1 -1075
- package/dist/mdx.js +1 -1
- package/dist/packages/charts/src/chart-inspection.d.ts +4 -1
- package/dist/packages/collections/src/data-table-trigger.d.ts +2 -0
- package/dist/packages/kits/src/evaluation/leaderboard.d.ts +2 -0
- package/dist/packages/kits/src/research/collection-page.d.ts +63 -0
- package/dist/packages/kits/src/research/index.d.ts +2 -0
- package/dist/packages/kits/src/research/milestone-path.d.ts +1 -2
- package/dist/packages/kits/src/research/work-heartbeat.d.ts +4 -3
- package/dist/packages/layout/src/detail-page.d.ts +3 -1
- package/dist/{scene-BwJKueD6.js → scene-4ePpWdmE.js} +2 -2
- package/dist/scene.js +1 -1
- package/dist/{slope-chart-CGTYbFxi.js → slope-chart-DWZIYDty.js} +1 -1
- package/dist/{src-B2rgpWap.js → src-DNclWY4V.js} +1 -1
- package/dist/src-DhWMspwr.js +1085 -0
- package/dist/styles2.css +8 -0
- package/dist/{time-series-Dh8y5ba0.js → time-series-CsngFxr1.js} +1 -1
- package/dist/{token-heatmap-BTrZ3-N4.js → token-heatmap-BQLIxPky.js} +1 -1
- package/dist/{token-predictions-CUe4junQ.js → token-predictions-C3B5L-eO.js} +1 -1
- package/dist/{tree-diagram-Dpqmo-fh.js → tree-diagram-Dau9jeXS.js} +1 -1
- package/dist/{treemap-BUSaVD3m.js → treemap-DWrMQndu.js} +1 -1
- package/dist/{violin-plot-BxaLwdRi.js → violin-plot-D05ODcyc.js} +1 -1
- package/dist/{waterfall-CcDMdKec.js → waterfall-BkLLv2Lm.js} +1 -1
- package/package.json +1 -1
- package/skills/review-elements/SKILL.md +14 -0
- package/skills/use-elements/SKILL.md +18 -16
- package/skills/use-elements/references/editorial-restraint.md +40 -0
- package/skills/use-elements/references/workspace.md +14 -8
- package/dist/figure-frame-CEijciL7.js +0 -289
package/dist/kits/research.js
CHANGED
|
@@ -1,15 +1,159 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { n as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
1
|
+
import { d as e, f as t, g as n, h as r, m as i, n as a, o, u as s, y as c } from "../src-DNclWY4V.js";
|
|
2
|
+
import { c as l, f as u, h as d, l as f, m as p, o as m, p as h, r as g, t as _, v } from "../src-9EJskqB_.js";
|
|
3
|
+
import { m as y, p as b, s as x, t as S } from "../src-npqwq3Sa.js";
|
|
4
|
+
import { T as C, h as w, i as T, n as E } from "../src-DhWMspwr.js";
|
|
5
|
+
import { r as D } from "../figure-format-B8kRZMlo.js";
|
|
6
|
+
import { n as O } from "../src-na2DdkKI.js";
|
|
7
|
+
import { t as k } from "../tree-diagram-Dau9jeXS.js";
|
|
8
|
+
import { f as A } from "../time-series-CsngFxr1.js";
|
|
9
|
+
import { t as j } from "../src-DFW49IAs.js";
|
|
10
|
+
import { u as M } from "../src-Dxs3Buo_.js";
|
|
11
|
+
import "@stylexjs/stylex";
|
|
12
|
+
import { useEffect as N } from "react";
|
|
13
|
+
import { Fragment as P, jsx as F, jsxs as I } from "react/jsx-runtime";
|
|
14
|
+
// packages/kits/src/research/collection-page.tsx
|
|
15
|
+
var L = /* @__PURE__ */ new Set([
|
|
16
|
+
"INPUT",
|
|
17
|
+
"TEXTAREA",
|
|
18
|
+
"SELECT"
|
|
19
|
+
]), R = 8;
|
|
20
|
+
function z(e) {
|
|
21
|
+
return e instanceof HTMLElement ? e.isContentEditable || L.has(e.tagName) : !1;
|
|
22
|
+
}
|
|
23
|
+
function B({ title: n, caption: i, rows: a, getRowId: o, columns: c, sort: l, onSortChange: u, search: d, filters: f, transformRows: p, rowAction: m, activeRowId: h, rowSizing: g, empty: _, filteredEmpty: v, status: b = "ready", failure: x, placeholderRows: w = R, hasGlobalShortcuts: T }) {
|
|
24
|
+
let E = b === "loading", D = b === "failed", O = b === "ready", k = r(a, {
|
|
25
|
+
mode: "local",
|
|
26
|
+
search: d,
|
|
27
|
+
filters: f
|
|
28
|
+
}), { actions: A, chips: j, onKeyDown: M, openSearch: P } = t({
|
|
29
|
+
label: `${n} controls`,
|
|
30
|
+
...k.search !== void 0 && { search: k.search },
|
|
31
|
+
filters: k.filters,
|
|
32
|
+
isPlaceholder: E,
|
|
33
|
+
isReady: O
|
|
34
|
+
}), L = T && O && k.search !== void 0;
|
|
35
|
+
N(() => {
|
|
36
|
+
if (!L) return;
|
|
37
|
+
function e(e) {
|
|
38
|
+
let t = e.key === "/" && !z(e.target), n = e.key.toLowerCase() === "f" && (e.metaKey || e.ctrlKey);
|
|
39
|
+
(t || n) && (e.preventDefault(), P());
|
|
40
|
+
}
|
|
41
|
+
return globalThis.addEventListener("keydown", e), () => globalThis.removeEventListener("keydown", e);
|
|
42
|
+
}, [L, P]);
|
|
43
|
+
let B = p === void 0 ? k.rows : p(k.rows), V = i ?? n, H = typeof d == "function", U = !("reason" in f), W = {
|
|
44
|
+
caption: V,
|
|
45
|
+
hideCaption: !0,
|
|
46
|
+
rows: B,
|
|
47
|
+
getRowId: o,
|
|
48
|
+
query: { mode: "frame" },
|
|
49
|
+
...m !== void 0 && { rowAction: m },
|
|
50
|
+
...h !== void 0 && { activeRowId: h },
|
|
51
|
+
...g !== void 0 && { rowSizing: g },
|
|
52
|
+
empty: _,
|
|
53
|
+
...v !== void 0 && { filteredEmpty: v }
|
|
54
|
+
}, G = u === void 0 ? /* @__PURE__ */ F(s, {
|
|
55
|
+
...W,
|
|
56
|
+
columns: c
|
|
57
|
+
}) : /* @__PURE__ */ F(s, {
|
|
58
|
+
...W,
|
|
59
|
+
columns: c,
|
|
60
|
+
sort: l,
|
|
61
|
+
onSortChange: u
|
|
62
|
+
}), K = /* @__PURE__ */ F(e, {
|
|
63
|
+
caption: V,
|
|
64
|
+
hideCaption: !0,
|
|
65
|
+
columns: c,
|
|
66
|
+
rows: w,
|
|
67
|
+
...g !== void 0 && { rowSizing: g }
|
|
68
|
+
}), q = x ?? /* @__PURE__ */ F(C, { children: /* @__PURE__ */ I(y, {
|
|
69
|
+
hasError: !0,
|
|
70
|
+
children: [
|
|
71
|
+
"Could not load ",
|
|
72
|
+
n.toLowerCase(),
|
|
73
|
+
"."
|
|
74
|
+
]
|
|
75
|
+
}) });
|
|
76
|
+
return {
|
|
77
|
+
controlActions: A,
|
|
78
|
+
chips: j,
|
|
79
|
+
onKeyDown: M,
|
|
80
|
+
content: E ? /* @__PURE__ */ F(S, {
|
|
81
|
+
state: "pending",
|
|
82
|
+
label: n,
|
|
83
|
+
placeholder: K
|
|
84
|
+
}) : /* @__PURE__ */ F(S, {
|
|
85
|
+
state: D ? "failed" : "ready",
|
|
86
|
+
label: n,
|
|
87
|
+
placeholder: K,
|
|
88
|
+
children: D ? q : G
|
|
89
|
+
}),
|
|
90
|
+
frameProps: {
|
|
91
|
+
search: H ? !0 : d,
|
|
92
|
+
filters: U ? !0 : f,
|
|
93
|
+
isFiltered: k.isFiltered
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
function V(e) {
|
|
98
|
+
let { title: t, navigation: n, actions: r, notice: a, inspector: o, inspectorInitialPercent: s = 40 } = e, { controlActions: l, chips: u, onKeyDown: d, content: f, frameProps: p } = B({
|
|
99
|
+
...e,
|
|
100
|
+
hasGlobalShortcuts: !0
|
|
101
|
+
}), m = a != null, h = /* @__PURE__ */ I(P, { children: [n === void 0 && l, r] }), g = /* @__PURE__ */ F(E, {
|
|
102
|
+
header: /* @__PURE__ */ I(P, { children: [m && /* @__PURE__ */ F(C, { children: a }), u !== !1 && /* @__PURE__ */ F(c, {
|
|
103
|
+
label: "Applied filters",
|
|
104
|
+
children: u
|
|
105
|
+
})] }),
|
|
106
|
+
children: f
|
|
107
|
+
});
|
|
108
|
+
return /* @__PURE__ */ F(i, {
|
|
109
|
+
...p,
|
|
110
|
+
children: /* @__PURE__ */ F("section", {
|
|
111
|
+
className: "x12lumcd xeuugli x2lwn1j x78zum5 xdt5ytf",
|
|
112
|
+
onKeyDown: d,
|
|
113
|
+
children: /* @__PURE__ */ F(w, {
|
|
114
|
+
title: t,
|
|
115
|
+
actions: h,
|
|
116
|
+
navigation: n,
|
|
117
|
+
children: o === void 0 ? g : /* @__PURE__ */ F(T, {
|
|
118
|
+
isResizable: !0,
|
|
119
|
+
inspectorInitialPercent: s,
|
|
120
|
+
inspector: o,
|
|
121
|
+
children: g
|
|
122
|
+
})
|
|
123
|
+
})
|
|
124
|
+
})
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
function H(e) {
|
|
128
|
+
let { id: t, title: n, meta: r, actions: a, notice: o } = e, { controlActions: s, chips: l, onKeyDown: u, content: d, frameProps: p } = B({
|
|
129
|
+
...e,
|
|
130
|
+
hasGlobalShortcuts: !1
|
|
131
|
+
}), m = o != null;
|
|
132
|
+
return /* @__PURE__ */ F(i, {
|
|
133
|
+
...p,
|
|
134
|
+
children: /* @__PURE__ */ I("section", {
|
|
135
|
+
"aria-label": n,
|
|
136
|
+
className: "xeuugli x78zum5 xdt5ytf",
|
|
137
|
+
onKeyDown: u,
|
|
138
|
+
children: [
|
|
139
|
+
/* @__PURE__ */ F(f, {
|
|
140
|
+
...t !== void 0 && { id: t },
|
|
141
|
+
title: n,
|
|
142
|
+
meta: r,
|
|
143
|
+
actions: /* @__PURE__ */ I(P, { children: [s, a] })
|
|
144
|
+
}),
|
|
145
|
+
m && /* @__PURE__ */ F(C, { children: o }),
|
|
146
|
+
l !== !1 && /* @__PURE__ */ F(c, {
|
|
147
|
+
label: "Applied filters",
|
|
148
|
+
children: l
|
|
149
|
+
}),
|
|
150
|
+
d
|
|
151
|
+
]
|
|
152
|
+
})
|
|
153
|
+
});
|
|
154
|
+
}
|
|
11
155
|
// packages/kits/src/research/finding-card.tsx
|
|
12
|
-
var
|
|
156
|
+
var U = {
|
|
13
157
|
limitation: "Limitation",
|
|
14
158
|
details: "Full notes & evidence",
|
|
15
159
|
sources: "Sources",
|
|
@@ -19,106 +163,105 @@ var C = {
|
|
|
19
163
|
falsified: "Falsified",
|
|
20
164
|
open: "Open"
|
|
21
165
|
}
|
|
22
|
-
},
|
|
166
|
+
}, W = {
|
|
23
167
|
supported: "positive",
|
|
24
168
|
mixed: "warning",
|
|
25
169
|
falsified: "negative",
|
|
26
170
|
open: "neutral"
|
|
27
171
|
};
|
|
28
|
-
function
|
|
29
|
-
let
|
|
30
|
-
...
|
|
31
|
-
...
|
|
172
|
+
function G({ title: e, claim: t, locale: n, status: r, index: i, limitation: o, metrics: s = [], sources: c = [], author: u, recordedAt: f, recordedLabel: m, details: y, actions: b, labels: x }) {
|
|
173
|
+
let S = {
|
|
174
|
+
...U,
|
|
175
|
+
...x,
|
|
32
176
|
statusLabels: {
|
|
33
|
-
...
|
|
34
|
-
...
|
|
177
|
+
...U.statusLabels,
|
|
178
|
+
...x?.statusLabels
|
|
35
179
|
}
|
|
36
180
|
};
|
|
37
|
-
return /* @__PURE__ */
|
|
38
|
-
title:
|
|
39
|
-
index:
|
|
40
|
-
meta: /* @__PURE__ */
|
|
41
|
-
tone:
|
|
42
|
-
children:
|
|
43
|
-
}),
|
|
44
|
-
footer:
|
|
181
|
+
return /* @__PURE__ */ F(h, {
|
|
182
|
+
title: e,
|
|
183
|
+
index: i,
|
|
184
|
+
meta: /* @__PURE__ */ I(p, { children: [/* @__PURE__ */ F(_, {
|
|
185
|
+
tone: W[r],
|
|
186
|
+
children: S.statusLabels[r]
|
|
187
|
+
}), b] }),
|
|
188
|
+
footer: u !== void 0 || f !== void 0 || c.length > 0 ? /* @__PURE__ */ I(p, {
|
|
45
189
|
shouldSpaceBetween: !0,
|
|
46
|
-
children: [/* @__PURE__ */
|
|
190
|
+
children: [/* @__PURE__ */ I(p, { children: [u !== void 0 && /* @__PURE__ */ F(l, {
|
|
47
191
|
variant: "caption",
|
|
48
192
|
tone: "muted",
|
|
49
|
-
children:
|
|
50
|
-
}),
|
|
51
|
-
dateTime:
|
|
52
|
-
label:
|
|
53
|
-
})] }),
|
|
193
|
+
children: u
|
|
194
|
+
}), f !== void 0 && /* @__PURE__ */ F(a, {
|
|
195
|
+
dateTime: f,
|
|
196
|
+
label: m ?? f
|
|
197
|
+
})] }), c.length > 0 && /* @__PURE__ */ I(p, { children: [/* @__PURE__ */ I(l, {
|
|
54
198
|
variant: "caption",
|
|
55
199
|
tone: "muted",
|
|
56
|
-
children: [
|
|
57
|
-
}),
|
|
200
|
+
children: [S.sources, ":"]
|
|
201
|
+
}), c.map((e) => e.summary !== void 0 && e.href !== void 0 ? /* @__PURE__ */ I(O.Root, { children: [/* @__PURE__ */ F(O.Trigger, {
|
|
58
202
|
href: e.href,
|
|
59
|
-
children: /* @__PURE__ */
|
|
60
|
-
}), /* @__PURE__ */
|
|
203
|
+
children: /* @__PURE__ */ F(g, { children: e.label })
|
|
204
|
+
}), /* @__PURE__ */ F(O.Popup, { children: /* @__PURE__ */ I(d, {
|
|
61
205
|
isCompact: !0,
|
|
62
|
-
children: [/* @__PURE__ */
|
|
206
|
+
children: [/* @__PURE__ */ F(l, { children: e.label }), /* @__PURE__ */ F(l, {
|
|
63
207
|
variant: "caption",
|
|
64
208
|
tone: "muted",
|
|
65
209
|
children: e.summary
|
|
66
210
|
})]
|
|
67
|
-
}) })] }, e.id) : /* @__PURE__ */
|
|
211
|
+
}) })] }, e.id) : /* @__PURE__ */ F(g, { children: e.label }, e.id))] })]
|
|
68
212
|
}) : void 0,
|
|
69
|
-
children: /* @__PURE__ */
|
|
213
|
+
children: /* @__PURE__ */ I(d, {
|
|
70
214
|
isCompact: !0,
|
|
71
215
|
children: [
|
|
72
|
-
/* @__PURE__ */
|
|
73
|
-
|
|
74
|
-
tone:
|
|
216
|
+
/* @__PURE__ */ F(l, { children: t }),
|
|
217
|
+
s.length > 0 && /* @__PURE__ */ F(p, { children: s.map((e) => /* @__PURE__ */ I(_, {
|
|
218
|
+
tone: e.tone ?? "neutral",
|
|
75
219
|
children: [
|
|
76
|
-
|
|
220
|
+
e.label,
|
|
77
221
|
": ",
|
|
78
|
-
|
|
79
|
-
value:
|
|
80
|
-
locale:
|
|
81
|
-
format:
|
|
222
|
+
D({
|
|
223
|
+
value: e.value,
|
|
224
|
+
locale: n,
|
|
225
|
+
format: e.format
|
|
82
226
|
})
|
|
83
227
|
]
|
|
84
|
-
},
|
|
85
|
-
|
|
228
|
+
}, e.label)) }),
|
|
229
|
+
o !== void 0 && /* @__PURE__ */ I(l, {
|
|
86
230
|
variant: "caption",
|
|
87
231
|
tone: "muted",
|
|
88
232
|
children: [
|
|
89
|
-
|
|
233
|
+
S.limitation,
|
|
90
234
|
": ",
|
|
91
|
-
|
|
235
|
+
o
|
|
92
236
|
]
|
|
93
237
|
}),
|
|
94
|
-
|
|
238
|
+
y !== void 0 && /* @__PURE__ */ I(v.Root, { children: [/* @__PURE__ */ F(v.Trigger, {
|
|
95
239
|
variant: "inline",
|
|
96
|
-
children:
|
|
97
|
-
}), /* @__PURE__ */
|
|
240
|
+
children: S.details
|
|
241
|
+
}), /* @__PURE__ */ F(v.Panel, { children: y })] })
|
|
98
242
|
]
|
|
99
243
|
})
|
|
100
244
|
});
|
|
101
245
|
}
|
|
102
246
|
// packages/kits/src/research/milestone-path.tsx
|
|
103
|
-
var
|
|
247
|
+
var K = {
|
|
104
248
|
baseline: "series5",
|
|
105
249
|
result: "series1",
|
|
106
250
|
breakthrough: "positive",
|
|
107
251
|
counterexample: "negative",
|
|
108
252
|
decision: "series3"
|
|
109
|
-
},
|
|
253
|
+
}, q = {
|
|
110
254
|
baseline: "neutral",
|
|
111
255
|
result: "neutral",
|
|
112
256
|
breakthrough: "positive",
|
|
113
257
|
counterexample: "negative",
|
|
114
258
|
decision: "warning"
|
|
115
|
-
},
|
|
116
|
-
metric: "
|
|
259
|
+
}, J = {
|
|
260
|
+
metric: "Score",
|
|
117
261
|
delta: "Change",
|
|
118
262
|
limitation: "Limitation",
|
|
119
263
|
source: "Evidence",
|
|
120
|
-
|
|
121
|
-
empty: "No research milestones recorded yet.",
|
|
264
|
+
empty: "No milestones recorded.",
|
|
122
265
|
kinds: {
|
|
123
266
|
baseline: "Baseline",
|
|
124
267
|
result: "Result",
|
|
@@ -127,96 +270,98 @@ var E = {
|
|
|
127
270
|
decision: "Decision"
|
|
128
271
|
}
|
|
129
272
|
};
|
|
130
|
-
function
|
|
131
|
-
let
|
|
132
|
-
...
|
|
133
|
-
...
|
|
273
|
+
function Y({ milestones: e, valueLabel: t, valueFormat: n, deltaFormat: r, selected: i, onSelectedChange: a, labels: s, ...c }) {
|
|
274
|
+
let f = {
|
|
275
|
+
...J,
|
|
276
|
+
...s,
|
|
134
277
|
kinds: {
|
|
135
|
-
...
|
|
136
|
-
...
|
|
278
|
+
...J.kinds,
|
|
279
|
+
...s?.kinds
|
|
137
280
|
}
|
|
138
281
|
};
|
|
139
|
-
if (
|
|
140
|
-
title:
|
|
141
|
-
children:
|
|
282
|
+
if (e.length === 0) return /* @__PURE__ */ F(b, {
|
|
283
|
+
title: c.title,
|
|
284
|
+
children: f.empty
|
|
142
285
|
});
|
|
143
|
-
if (new Set(
|
|
286
|
+
if (new Set(e.map((e) => e.id)).size !== e.length) return /* @__PURE__ */ F(y, {
|
|
144
287
|
hasError: !0,
|
|
145
288
|
children: "Milestones must have unique identifiers."
|
|
146
289
|
});
|
|
147
|
-
if (
|
|
290
|
+
if (e.filter((e) => e.parentId === null).length !== 1) return /* @__PURE__ */ F(y, {
|
|
148
291
|
hasError: !0,
|
|
149
292
|
children: "MilestonePath requires exactly one root milestone (parentId: null)."
|
|
150
293
|
});
|
|
151
|
-
let
|
|
294
|
+
let m = e.map((e) => ({
|
|
152
295
|
id: e.id,
|
|
153
296
|
parentId: e.parentId,
|
|
154
297
|
label: e.label,
|
|
155
|
-
detail: e.wave === void 0 ?
|
|
298
|
+
detail: e.wave === void 0 ? f.kinds[e.kind] : `${e.wave} · ${f.kinds[e.kind]}`,
|
|
156
299
|
value: e.metric ?? null,
|
|
157
|
-
tone:
|
|
158
|
-
})),
|
|
300
|
+
tone: K[e.kind]
|
|
301
|
+
})), h = Array.from(new Set(e.map((e) => e.kind))).map((e) => ({
|
|
159
302
|
id: e,
|
|
160
|
-
label:
|
|
161
|
-
tone:
|
|
162
|
-
})),
|
|
163
|
-
return /* @__PURE__ */
|
|
303
|
+
label: f.kinds[e],
|
|
304
|
+
tone: K[e]
|
|
305
|
+
})), g = e.find((e) => e.id === i) ?? null;
|
|
306
|
+
return /* @__PURE__ */ I(d, { children: [/* @__PURE__ */ F(k, {
|
|
307
|
+
...c,
|
|
308
|
+
nodes: m,
|
|
309
|
+
direction: "right",
|
|
310
|
+
link: "elbow",
|
|
311
|
+
valueLabel: t,
|
|
312
|
+
valueFormat: n,
|
|
313
|
+
toneLegend: h,
|
|
314
|
+
selected: i,
|
|
315
|
+
onSelectedChange: a
|
|
316
|
+
}), g !== null && /* @__PURE__ */ I(d, {
|
|
164
317
|
isCompact: !0,
|
|
165
|
-
children: [
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
...C.source === void 0 ? [] : [{
|
|
210
|
-
label: v.source,
|
|
211
|
-
value: C.source
|
|
212
|
-
}]
|
|
213
|
-
] })]
|
|
214
|
-
})
|
|
215
|
-
})]
|
|
216
|
-
});
|
|
318
|
+
children: [
|
|
319
|
+
/* @__PURE__ */ F(u, {}),
|
|
320
|
+
/* @__PURE__ */ I(p, {
|
|
321
|
+
shouldSpaceBetween: !0,
|
|
322
|
+
children: [/* @__PURE__ */ I(p, { children: [g.wave !== void 0 && /* @__PURE__ */ F(_, {
|
|
323
|
+
tone: "neutral",
|
|
324
|
+
children: g.wave
|
|
325
|
+
}), /* @__PURE__ */ F(l, { children: /* @__PURE__ */ F("strong", { children: g.label }) })] }), /* @__PURE__ */ F(_, {
|
|
326
|
+
tone: q[g.kind],
|
|
327
|
+
children: f.kinds[g.kind]
|
|
328
|
+
})]
|
|
329
|
+
}),
|
|
330
|
+
/* @__PURE__ */ F(l, {
|
|
331
|
+
tone: "muted",
|
|
332
|
+
children: g.claim
|
|
333
|
+
}),
|
|
334
|
+
/* @__PURE__ */ F(o, { items: [
|
|
335
|
+
...g.metric === void 0 ? [] : [{
|
|
336
|
+
label: f.metric,
|
|
337
|
+
value: D({
|
|
338
|
+
value: g.metric,
|
|
339
|
+
locale: c.locale,
|
|
340
|
+
format: n
|
|
341
|
+
})
|
|
342
|
+
}],
|
|
343
|
+
...g.delta === void 0 ? [] : [{
|
|
344
|
+
label: f.delta,
|
|
345
|
+
value: D({
|
|
346
|
+
value: g.delta,
|
|
347
|
+
locale: c.locale,
|
|
348
|
+
format: r ?? n
|
|
349
|
+
})
|
|
350
|
+
}],
|
|
351
|
+
...g.limitation === void 0 ? [] : [{
|
|
352
|
+
label: f.limitation,
|
|
353
|
+
value: g.limitation
|
|
354
|
+
}],
|
|
355
|
+
...g.source === void 0 ? [] : [{
|
|
356
|
+
label: f.source,
|
|
357
|
+
value: g.source
|
|
358
|
+
}]
|
|
359
|
+
] })
|
|
360
|
+
]
|
|
361
|
+
})] });
|
|
217
362
|
}
|
|
218
363
|
// packages/kits/src/research/specimen-diff.tsx
|
|
219
|
-
var
|
|
364
|
+
var X = {
|
|
220
365
|
breakdownTitle: "Paired outcome flips",
|
|
221
366
|
all: "All",
|
|
222
367
|
gained: "Gained",
|
|
@@ -229,65 +374,65 @@ var A = {
|
|
|
229
374
|
candidate: "Candidate",
|
|
230
375
|
outcome: "Outcome",
|
|
231
376
|
empty: "No paired specimens available for these two runs."
|
|
232
|
-
},
|
|
377
|
+
}, Z = {
|
|
233
378
|
gained: "positive",
|
|
234
379
|
regressed: "negative",
|
|
235
380
|
both_pass: "neutral",
|
|
236
381
|
both_fail: "neutral"
|
|
237
|
-
},
|
|
382
|
+
}, Q = /* @__PURE__ */ new Set([
|
|
238
383
|
"gained",
|
|
239
384
|
"regressed",
|
|
240
385
|
"both_pass",
|
|
241
386
|
"both_fail"
|
|
242
387
|
]);
|
|
243
|
-
function
|
|
244
|
-
return e !== null &&
|
|
388
|
+
function ee(e) {
|
|
389
|
+
return e !== null && Q.has(e);
|
|
245
390
|
}
|
|
246
|
-
function
|
|
247
|
-
let
|
|
248
|
-
...
|
|
249
|
-
...
|
|
391
|
+
function te({ rows: e, baselineLabel: t, candidateLabel: r, filter: i, onFilterChange: a, onSelectRow: o, labels: c, ...u }) {
|
|
392
|
+
let f = {
|
|
393
|
+
...X,
|
|
394
|
+
...c
|
|
250
395
|
};
|
|
251
|
-
if (e.length === 0) return /* @__PURE__ */
|
|
252
|
-
title:
|
|
253
|
-
children:
|
|
396
|
+
if (e.length === 0) return /* @__PURE__ */ F(b, {
|
|
397
|
+
title: u.title,
|
|
398
|
+
children: f.empty
|
|
254
399
|
});
|
|
255
|
-
let
|
|
400
|
+
let p = {
|
|
256
401
|
gained: 0,
|
|
257
402
|
regressed: 0,
|
|
258
403
|
both_pass: 0,
|
|
259
404
|
both_fail: 0
|
|
260
405
|
};
|
|
261
|
-
for (let t of e)
|
|
262
|
-
let
|
|
263
|
-
gained:
|
|
264
|
-
regressed:
|
|
265
|
-
both_pass:
|
|
266
|
-
both_fail:
|
|
267
|
-
},
|
|
406
|
+
for (let t of e) p[t.outcome] += 1;
|
|
407
|
+
let m = i === "all" ? e : e.filter((e) => e.outcome === i), h = {
|
|
408
|
+
gained: f.gained,
|
|
409
|
+
regressed: f.regressed,
|
|
410
|
+
both_pass: f.bothPass,
|
|
411
|
+
both_fail: f.bothFail
|
|
412
|
+
}, v = [
|
|
268
413
|
{
|
|
269
414
|
id: "specimen",
|
|
270
|
-
label:
|
|
415
|
+
label: f.specimen,
|
|
271
416
|
role: "primary",
|
|
272
|
-
cell: (e) => /* @__PURE__ */
|
|
417
|
+
cell: (e) => /* @__PURE__ */ F(n, {
|
|
273
418
|
secondary: e.family,
|
|
274
419
|
children: e.prompt
|
|
275
420
|
})
|
|
276
421
|
},
|
|
277
422
|
{
|
|
278
423
|
id: "expected",
|
|
279
|
-
label:
|
|
424
|
+
label: f.expected,
|
|
280
425
|
role: "text",
|
|
281
|
-
cell: (e) => /* @__PURE__ */
|
|
426
|
+
cell: (e) => /* @__PURE__ */ F(g, { children: e.expected })
|
|
282
427
|
},
|
|
283
428
|
{
|
|
284
429
|
id: "baseline",
|
|
285
|
-
label:
|
|
430
|
+
label: t.trim() === "" ? f.baseline : t,
|
|
286
431
|
role: "text",
|
|
287
432
|
isSecondary: !0,
|
|
288
|
-
cell: (e) => /* @__PURE__ */
|
|
433
|
+
cell: (e) => /* @__PURE__ */ F(l, {
|
|
289
434
|
variant: "mono",
|
|
290
|
-
children: /* @__PURE__ */
|
|
435
|
+
children: /* @__PURE__ */ F(j, {
|
|
291
436
|
text: e.baselineOutput,
|
|
292
437
|
query: e.expected,
|
|
293
438
|
tone: "accent"
|
|
@@ -296,11 +441,11 @@ function P({ rows: e, baselineLabel: n, candidateLabel: r, filter: s, onFilterCh
|
|
|
296
441
|
},
|
|
297
442
|
{
|
|
298
443
|
id: "candidate",
|
|
299
|
-
label: r.trim() === "" ?
|
|
444
|
+
label: r.trim() === "" ? f.candidate : r,
|
|
300
445
|
role: "text",
|
|
301
|
-
cell: (e) => /* @__PURE__ */
|
|
446
|
+
cell: (e) => /* @__PURE__ */ F(l, {
|
|
302
447
|
variant: "mono",
|
|
303
|
-
children: /* @__PURE__ */
|
|
448
|
+
children: /* @__PURE__ */ F(j, {
|
|
304
449
|
text: e.candidateOutput,
|
|
305
450
|
query: e.expected,
|
|
306
451
|
tone: "accent"
|
|
@@ -309,119 +454,119 @@ function P({ rows: e, baselineLabel: n, candidateLabel: r, filter: s, onFilterCh
|
|
|
309
454
|
},
|
|
310
455
|
{
|
|
311
456
|
id: "outcome",
|
|
312
|
-
label:
|
|
457
|
+
label: f.outcome,
|
|
313
458
|
role: "status",
|
|
314
|
-
cell: (e) => /* @__PURE__ */
|
|
315
|
-
tone:
|
|
316
|
-
children:
|
|
459
|
+
cell: (e) => /* @__PURE__ */ F(_, {
|
|
460
|
+
tone: Z[e.outcome],
|
|
461
|
+
children: h[e.outcome]
|
|
317
462
|
})
|
|
318
463
|
}
|
|
319
464
|
];
|
|
320
|
-
return /* @__PURE__ */
|
|
465
|
+
return /* @__PURE__ */ I(d, {
|
|
321
466
|
isCompact: !0,
|
|
322
467
|
children: [
|
|
323
|
-
/* @__PURE__ */
|
|
324
|
-
title:
|
|
325
|
-
description:
|
|
326
|
-
locale:
|
|
327
|
-
status:
|
|
328
|
-
source:
|
|
468
|
+
/* @__PURE__ */ F(A, {
|
|
469
|
+
title: f.breakdownTitle,
|
|
470
|
+
description: u.description,
|
|
471
|
+
locale: u.locale,
|
|
472
|
+
status: u.status,
|
|
473
|
+
source: u.source,
|
|
329
474
|
total: e.length,
|
|
330
475
|
valueFormat: { maximumFractionDigits: 0 },
|
|
331
476
|
items: [
|
|
332
477
|
{
|
|
333
478
|
id: "gained",
|
|
334
|
-
label:
|
|
335
|
-
value:
|
|
479
|
+
label: f.gained,
|
|
480
|
+
value: p.gained,
|
|
336
481
|
tone: "positive"
|
|
337
482
|
},
|
|
338
483
|
{
|
|
339
484
|
id: "both_pass",
|
|
340
|
-
label:
|
|
341
|
-
value:
|
|
485
|
+
label: f.bothPass,
|
|
486
|
+
value: p.both_pass,
|
|
342
487
|
tone: "series1"
|
|
343
488
|
},
|
|
344
489
|
{
|
|
345
490
|
id: "regressed",
|
|
346
|
-
label:
|
|
347
|
-
value:
|
|
491
|
+
label: f.regressed,
|
|
492
|
+
value: p.regressed,
|
|
348
493
|
tone: "negative"
|
|
349
494
|
},
|
|
350
495
|
{
|
|
351
496
|
id: "both_fail",
|
|
352
|
-
label:
|
|
353
|
-
value:
|
|
497
|
+
label: f.bothFail,
|
|
498
|
+
value: p.both_fail,
|
|
354
499
|
tone: "series5"
|
|
355
500
|
}
|
|
356
501
|
],
|
|
357
|
-
selected:
|
|
502
|
+
selected: i === "all" ? null : i,
|
|
358
503
|
onSelectedChange: (e) => {
|
|
359
|
-
|
|
504
|
+
ee(e) ? a(e === i ? "all" : e) : a("all");
|
|
360
505
|
}
|
|
361
506
|
}),
|
|
362
|
-
/* @__PURE__ */
|
|
363
|
-
"aria-label":
|
|
364
|
-
value:
|
|
507
|
+
/* @__PURE__ */ I(M.Root, {
|
|
508
|
+
"aria-label": f.outcome,
|
|
509
|
+
value: i,
|
|
365
510
|
onValueChange: (e) => {
|
|
366
|
-
|
|
511
|
+
a(e);
|
|
367
512
|
},
|
|
368
513
|
children: [
|
|
369
|
-
/* @__PURE__ */
|
|
514
|
+
/* @__PURE__ */ I(M.Item, {
|
|
370
515
|
value: "all",
|
|
371
516
|
children: [
|
|
372
|
-
|
|
517
|
+
f.all,
|
|
373
518
|
" (",
|
|
374
519
|
e.length,
|
|
375
520
|
")"
|
|
376
521
|
]
|
|
377
522
|
}),
|
|
378
|
-
/* @__PURE__ */
|
|
523
|
+
/* @__PURE__ */ I(M.Item, {
|
|
379
524
|
value: "gained",
|
|
380
525
|
children: [
|
|
381
|
-
|
|
526
|
+
f.gained,
|
|
382
527
|
" (",
|
|
383
|
-
|
|
528
|
+
p.gained,
|
|
384
529
|
")"
|
|
385
530
|
]
|
|
386
531
|
}),
|
|
387
|
-
/* @__PURE__ */
|
|
532
|
+
/* @__PURE__ */ I(M.Item, {
|
|
388
533
|
value: "regressed",
|
|
389
534
|
children: [
|
|
390
|
-
|
|
535
|
+
f.regressed,
|
|
391
536
|
" (",
|
|
392
|
-
|
|
537
|
+
p.regressed,
|
|
393
538
|
")"
|
|
394
539
|
]
|
|
395
540
|
}),
|
|
396
|
-
/* @__PURE__ */
|
|
541
|
+
/* @__PURE__ */ I(M.Item, {
|
|
397
542
|
value: "both_pass",
|
|
398
543
|
children: [
|
|
399
|
-
|
|
544
|
+
f.bothPass,
|
|
400
545
|
" (",
|
|
401
|
-
|
|
546
|
+
p.both_pass,
|
|
402
547
|
")"
|
|
403
548
|
]
|
|
404
549
|
}),
|
|
405
|
-
/* @__PURE__ */
|
|
550
|
+
/* @__PURE__ */ I(M.Item, {
|
|
406
551
|
value: "both_fail",
|
|
407
552
|
children: [
|
|
408
|
-
|
|
553
|
+
f.bothFail,
|
|
409
554
|
" (",
|
|
410
|
-
|
|
555
|
+
p.both_fail,
|
|
411
556
|
")"
|
|
412
557
|
]
|
|
413
558
|
})
|
|
414
559
|
]
|
|
415
560
|
}),
|
|
416
|
-
/* @__PURE__ */
|
|
417
|
-
caption:
|
|
561
|
+
/* @__PURE__ */ F(s, {
|
|
562
|
+
caption: u.title,
|
|
418
563
|
hideCaption: !0,
|
|
419
|
-
columns:
|
|
420
|
-
rows:
|
|
564
|
+
columns: v,
|
|
565
|
+
rows: m,
|
|
421
566
|
getRowId: (e) => e.id,
|
|
422
|
-
...
|
|
567
|
+
...o !== void 0 && { rowAction: {
|
|
423
568
|
label: (e) => `Inspect ${e.id}`,
|
|
424
|
-
onActivate:
|
|
569
|
+
onActivate: o
|
|
425
570
|
} },
|
|
426
571
|
query: {
|
|
427
572
|
mode: "local",
|
|
@@ -432,14 +577,14 @@ function P({ rows: e, baselineLabel: n, candidateLabel: r, filter: s, onFilterCh
|
|
|
432
577
|
value: (e) => e.family
|
|
433
578
|
}]
|
|
434
579
|
},
|
|
435
|
-
empty:
|
|
580
|
+
empty: f.empty,
|
|
436
581
|
filteredEmpty: "No specimens match the current filter."
|
|
437
582
|
})
|
|
438
583
|
]
|
|
439
584
|
});
|
|
440
585
|
}
|
|
441
586
|
// packages/kits/src/research/work-heartbeat.tsx
|
|
442
|
-
var
|
|
587
|
+
var $ = {
|
|
443
588
|
title: "Active work reports",
|
|
444
589
|
empty: "No active or recent work reports.",
|
|
445
590
|
nextCheckpoint: "Next checkpoint",
|
|
@@ -450,109 +595,112 @@ var F = {
|
|
|
450
595
|
overdue: "Update overdue",
|
|
451
596
|
stopped: "Stopped"
|
|
452
597
|
}
|
|
453
|
-
},
|
|
598
|
+
}, ne = {
|
|
454
599
|
running: "positive",
|
|
455
600
|
completed: "neutral",
|
|
456
601
|
blocked: "negative",
|
|
457
602
|
overdue: "warning",
|
|
458
603
|
stopped: "neutral"
|
|
459
604
|
};
|
|
460
|
-
function
|
|
605
|
+
function re(e) {
|
|
461
606
|
return e === void 0 ? null : Number.isFinite(e.completed) && Number.isFinite(e.total) && e.total > 0 ? e : null;
|
|
462
607
|
}
|
|
463
|
-
function
|
|
464
|
-
let
|
|
465
|
-
|
|
466
|
-
...
|
|
608
|
+
function ie({ reports: e, locale: t, labels: n }) {
|
|
609
|
+
let r = {
|
|
610
|
+
...$,
|
|
611
|
+
...n,
|
|
467
612
|
states: {
|
|
468
|
-
|
|
469
|
-
...
|
|
613
|
+
...$.states,
|
|
614
|
+
...n?.states
|
|
470
615
|
}
|
|
471
616
|
};
|
|
472
|
-
return
|
|
473
|
-
|
|
474
|
-
children: /* @__PURE__ */
|
|
617
|
+
return e.length === 0 ? /* @__PURE__ */ F("div", {
|
|
618
|
+
className: "x1qokhjc",
|
|
619
|
+
children: /* @__PURE__ */ F(l, {
|
|
475
620
|
variant: "caption",
|
|
476
621
|
tone: "muted",
|
|
477
|
-
children:
|
|
622
|
+
children: r.empty
|
|
478
623
|
})
|
|
479
|
-
}) : /* @__PURE__ */
|
|
480
|
-
|
|
481
|
-
children:
|
|
482
|
-
let
|
|
483
|
-
return /* @__PURE__ */
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
624
|
+
}) : /* @__PURE__ */ F("ul", {
|
|
625
|
+
className: "xe8uvvx x1ghz6dp x1717udv x178xt8z x13fuv20 xhjagg4",
|
|
626
|
+
children: e.map((e) => {
|
|
627
|
+
let n = re(e.progress), i = n === null ? null : Math.max(0, Math.min(100, n.completed / n.total * 100)), o = e.nextCheckpoint !== void 0 || e.executionRef !== void 0;
|
|
628
|
+
return /* @__PURE__ */ I("li", {
|
|
629
|
+
className: "x78zum5 xdt5ytf x1hnptsi x1qokhjc xso031l x1q0q8m5 x1qndepd",
|
|
630
|
+
children: [
|
|
631
|
+
/* @__PURE__ */ I(p, {
|
|
632
|
+
shouldSpaceBetween: !0,
|
|
633
|
+
children: [/* @__PURE__ */ F(l, { children: /* @__PURE__ */ F("strong", { children: e.title }) }), /* @__PURE__ */ I(p, { children: [/* @__PURE__ */ F(m, {
|
|
634
|
+
tone: ne[e.state],
|
|
635
|
+
children: r.states[e.state]
|
|
636
|
+
}), /* @__PURE__ */ F(a, {
|
|
637
|
+
dateTime: e.observedAt,
|
|
638
|
+
label: e.observedLabel
|
|
639
|
+
})] })]
|
|
640
|
+
}),
|
|
641
|
+
n !== null && i !== null && /* @__PURE__ */ I(d, {
|
|
495
642
|
isCompact: !0,
|
|
496
|
-
children: [/* @__PURE__ */
|
|
643
|
+
children: [/* @__PURE__ */ I(p, {
|
|
497
644
|
shouldSpaceBetween: !0,
|
|
498
|
-
children: [/* @__PURE__ */
|
|
645
|
+
children: [/* @__PURE__ */ I(l, {
|
|
499
646
|
variant: "caption",
|
|
500
647
|
tone: "muted",
|
|
501
648
|
children: [
|
|
502
|
-
|
|
503
|
-
value:
|
|
504
|
-
locale:
|
|
649
|
+
D({
|
|
650
|
+
value: n.completed,
|
|
651
|
+
locale: t,
|
|
505
652
|
format: { maximumFractionDigits: 0 }
|
|
506
653
|
}),
|
|
507
654
|
" /",
|
|
508
655
|
" ",
|
|
509
|
-
|
|
510
|
-
value:
|
|
511
|
-
locale:
|
|
656
|
+
D({
|
|
657
|
+
value: n.total,
|
|
658
|
+
locale: t,
|
|
512
659
|
format: { maximumFractionDigits: 0 }
|
|
513
660
|
}),
|
|
514
661
|
" ",
|
|
515
|
-
|
|
662
|
+
n.unit
|
|
516
663
|
]
|
|
517
|
-
}), /* @__PURE__ */
|
|
664
|
+
}), /* @__PURE__ */ F(_, {
|
|
518
665
|
tone: "neutral",
|
|
519
|
-
children:
|
|
520
|
-
value:
|
|
521
|
-
locale:
|
|
666
|
+
children: D({
|
|
667
|
+
value: i / 100,
|
|
668
|
+
locale: t,
|
|
522
669
|
format: {
|
|
523
670
|
style: "percent",
|
|
524
671
|
maximumFractionDigits: 0
|
|
525
672
|
}
|
|
526
673
|
})
|
|
527
674
|
})]
|
|
528
|
-
}), /* @__PURE__ */ x
|
|
529
|
-
label:
|
|
530
|
-
value:
|
|
531
|
-
max:
|
|
532
|
-
valueLabel:
|
|
533
|
-
value:
|
|
534
|
-
locale:
|
|
675
|
+
}), /* @__PURE__ */ F(x, {
|
|
676
|
+
label: e.title,
|
|
677
|
+
value: n.completed,
|
|
678
|
+
max: n.total,
|
|
679
|
+
valueLabel: D({
|
|
680
|
+
value: i / 100,
|
|
681
|
+
locale: t,
|
|
535
682
|
format: {
|
|
536
683
|
style: "percent",
|
|
537
684
|
maximumFractionDigits: 0
|
|
538
685
|
}
|
|
539
686
|
})
|
|
540
687
|
})]
|
|
541
|
-
}),
|
|
688
|
+
}),
|
|
689
|
+
o && /* @__PURE__ */ I(p, {
|
|
542
690
|
shouldSpaceBetween: !0,
|
|
543
|
-
children: [
|
|
691
|
+
children: [e.nextCheckpoint === void 0 ? /* @__PURE__ */ F("span", {}) : /* @__PURE__ */ I(l, {
|
|
544
692
|
variant: "caption",
|
|
545
693
|
tone: "muted",
|
|
546
694
|
children: [
|
|
547
|
-
|
|
695
|
+
r.nextCheckpoint,
|
|
548
696
|
": ",
|
|
549
|
-
|
|
697
|
+
e.nextCheckpoint
|
|
550
698
|
]
|
|
551
|
-
}),
|
|
552
|
-
})
|
|
553
|
-
|
|
554
|
-
},
|
|
699
|
+
}), e.executionRef !== void 0 && /* @__PURE__ */ F(g, { children: e.executionRef })]
|
|
700
|
+
})
|
|
701
|
+
]
|
|
702
|
+
}, e.id);
|
|
555
703
|
})
|
|
556
704
|
});
|
|
557
705
|
}
|
|
558
|
-
export {
|
|
706
|
+
export { V as CollectionPage, H as CollectionSection, G as FindingCard, Y as MilestonePath, te as SpecimenDiff, ie as WorkHeartbeat };
|