@mechane-ai/elements 0.65.0 → 0.67.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 +285 -203
- package/dist/{article-BrUa4Wz1.js → article-anMy8fA5.js} +6 -6
- package/dist/article.js +1 -1
- package/dist/catalog.json +81 -34
- package/dist/{categorical-values-AXJkMt-Y.js → categorical-values-Bh7ZkEQn.js} +1 -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 +3 -3
- 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 +2 -2
- package/dist/{code-block-BDRmjlES.js → code-block-DbW_t9U4.js} +1 -1
- package/dist/collections.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-BQDGe0sQ.js} +3 -3
- package/dist/{embedding-map-BqDEmy88.js → embedding-map-DmmknG7A.js} +6 -6
- package/dist/feedback.js +1 -1
- package/dist/{figure-frame-Dd-pOeZN.js → figure-frame-DlyNTDzh.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-CxEAQvTf.js} +3 -3
- package/dist/index.js +1 -1
- package/dist/kits/evaluation.js +13 -13
- package/dist/kits/interpretability.js +47 -43
- package/dist/kits/operations.js +80 -79
- package/dist/kits/research.js +364 -499
- package/dist/kits/training.js +108 -107
- package/dist/layout.js +1 -1
- package/dist/lesson.js +3 -3
- package/dist/{markdown--nfaDoR1.js → markdown-Diffqqm7.js} +2 -2
- 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/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/kits/src/research/index.d.ts +0 -2
- package/dist/{param-CwT1RvUS.js → param-CKr8EYxF.js} +1 -1
- package/dist/{pierre-diff-DuvK3kLF.js → pierre-diff-DXVIwW7o.js} +1 -1
- package/dist/{plot-layout-CvkeUuG6.js → plot-layout-CVzSbcU7.js} +24 -23
- package/dist/{plot-surface-yy37R4vs.js → plot-surface-CBhI1alw.js} +1 -1
- package/dist/{reference-lines-AMeDkYlo.js → reference-lines-C970JwWZ.js} +1 -1
- package/dist/{scene-BRhI8XSy.js → scene-C3dCxckI.js} +6 -6
- package/dist/scene.js +1 -1
- package/dist/{slope-chart-BMOCaa8R.js → slope-chart-DekEJxsy.js} +4 -4
- 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 +21 -1
- package/dist/{time-series-CTNVqoUQ.js → time-series-BSNnijxf.js} +8 -8
- package/dist/{timeline-DrsDtEIW.js → timeline-CnxfYSIg.js} +4 -4
- package/dist/{token-heatmap-DddArdH8.js → token-heatmap-CJaXo56P.js} +3 -3
- package/dist/{token-predictions-CBykmPID.js → token-predictions-Bi7aKPnh.js} +3 -3
- package/dist/{transport-r1QgELf8.js → transport-CXj0DV6o.js} +4 -4
- package/dist/{tree-diagram-BIJFK4pl.js → tree-diagram-BxOZsjr1.js} +4 -4
- package/dist/{treemap-DgmEw_mr.js → treemap-B2yOAetT.js} +4 -4
- package/dist/{use-tween-BWf44Jy4.js → use-tween-C1TWJwce.js} +1 -1
- package/dist/{violin-plot-BYJnv6sG.js → violin-plot-W2L_2JRo.js} +3 -3
- package/dist/{waterfall-BNseqMas.js → waterfall-Bt73N2Ng.js} +4 -4
- package/package.json +1 -1
- package/recipes/searchable-collection.tsx +74 -76
- package/skills/extend-elements/SKILL.md +2 -1
- package/skills/review-elements/SKILL.md +11 -7
- package/skills/upgrade-elements/SKILL.md +3 -1
- package/skills/upgrade-elements/references/releases.md +20 -0
- package/skills/use-elements/SKILL.md +8 -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/workspace.md +5 -5
- package/dist/packages/kits/src/research/collection-page.d.ts +0 -71
package/dist/kits/research.js
CHANGED
|
@@ -1,155 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { m as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { i as N } from "../src-Bns-5joF.js";
|
|
1
|
+
import { r as e } from "../figure-format-B8kRZMlo.js";
|
|
2
|
+
import { d as t, h as n, n as r, o as i } from "../src-Dc1t1ugL.js";
|
|
3
|
+
import { c as a, f as o, h as s, m as c, o as l, p as u, r as d, t as f, v as p } from "../src-Bkov5TTa.js";
|
|
4
|
+
import { n as m } from "../src-na2DdkKI.js";
|
|
5
|
+
import { a as h, t as g } from "../tree-diagram-BxOZsjr1.js";
|
|
6
|
+
import { p as _, s as v } from "../src-CIyuaSCi.js";
|
|
7
|
+
import { u as y } from "../src-DceyVyL0.js";
|
|
8
|
+
import { f as b } from "../time-series-BSNnijxf.js";
|
|
9
|
+
import { i as x } from "../src-BsqbWDxS.js";
|
|
11
10
|
import "@stylexjs/stylex";
|
|
12
|
-
import { useState as
|
|
13
|
-
import { Fragment as
|
|
14
|
-
// packages/kits/src/research/collection-page.tsx
|
|
15
|
-
var ee = 8;
|
|
16
|
-
function R({ title: n, caption: i, rows: a, getRowId: o, columns: c, sort: l, onSortChange: u, search: d, filters: f, transformRows: p, scopes: m, defaultScopeId: h, rowAction: g, activeRowId: _, rowSizing: v, empty: b, filteredEmpty: x, status: T = "ready", failure: E, placeholderRows: D = ee }) {
|
|
17
|
-
let O = T === "loading", k = T === "failed", A = T === "ready", j = m?.[0]?.id ?? "", [M, N] = P(() => h ?? j), F = m === void 0 || m.length === 0 ? void 0 : m.find((e) => e.id === M) ?? m[0], R = F === void 0 ? a : a.filter(F.match), z = m === void 0 || m.length <= 1 ? null : /* @__PURE__ */ I(C.Root, {
|
|
18
|
-
"aria-label": `${n} scope`,
|
|
19
|
-
value: F?.id ?? j,
|
|
20
|
-
onValueChange: (e) => N(e),
|
|
21
|
-
children: m.map((e) => /* @__PURE__ */ I(C.Item, {
|
|
22
|
-
value: e.id,
|
|
23
|
-
children: O ? e.label : `${e.label} (${a.filter(e.match).length})`
|
|
24
|
-
}, e.id))
|
|
25
|
-
}), B = r(R, {
|
|
26
|
-
mode: "local",
|
|
27
|
-
search: d,
|
|
28
|
-
filters: f
|
|
29
|
-
}), { actions: V, chips: te, findRegion: H } = t({
|
|
30
|
-
label: `${n} controls`,
|
|
31
|
-
...B.search !== void 0 && { search: B.search },
|
|
32
|
-
filters: B.filters,
|
|
33
|
-
isPlaceholder: O,
|
|
34
|
-
isReady: A
|
|
35
|
-
}), U = p === void 0 ? B.rows : p(B.rows), W = i ?? n, G = typeof d == "function", K = !("reason" in f), q = {
|
|
36
|
-
caption: W,
|
|
37
|
-
hideCaption: !0,
|
|
38
|
-
rows: U,
|
|
39
|
-
getRowId: o,
|
|
40
|
-
query: { mode: "frame" },
|
|
41
|
-
...g !== void 0 && { rowAction: g },
|
|
42
|
-
..._ !== void 0 && { activeRowId: _ },
|
|
43
|
-
...v !== void 0 && { rowSizing: v },
|
|
44
|
-
empty: b,
|
|
45
|
-
...x !== void 0 && { filteredEmpty: x }
|
|
46
|
-
}, J = u === void 0 ? /* @__PURE__ */ I(s, {
|
|
47
|
-
...q,
|
|
48
|
-
columns: c
|
|
49
|
-
}) : /* @__PURE__ */ I(s, {
|
|
50
|
-
...q,
|
|
51
|
-
columns: c,
|
|
52
|
-
sort: l,
|
|
53
|
-
onSortChange: u
|
|
54
|
-
}), Y = /* @__PURE__ */ I(e, {
|
|
55
|
-
caption: W,
|
|
56
|
-
hideCaption: !0,
|
|
57
|
-
columns: c,
|
|
58
|
-
rows: D,
|
|
59
|
-
...v !== void 0 && { rowSizing: v }
|
|
60
|
-
}), X = E ?? /* @__PURE__ */ I(w, { children: /* @__PURE__ */ L(y, {
|
|
61
|
-
hasError: !0,
|
|
62
|
-
children: [
|
|
63
|
-
"Could not load ",
|
|
64
|
-
n.toLowerCase(),
|
|
65
|
-
"."
|
|
66
|
-
]
|
|
67
|
-
}) });
|
|
68
|
-
return {
|
|
69
|
-
scopeControl: z,
|
|
70
|
-
controlActions: V,
|
|
71
|
-
chips: te,
|
|
72
|
-
findRegion: H,
|
|
73
|
-
content: O ? /* @__PURE__ */ I(S, {
|
|
74
|
-
state: "pending",
|
|
75
|
-
label: n,
|
|
76
|
-
placeholder: Y
|
|
77
|
-
}) : /* @__PURE__ */ I(S, {
|
|
78
|
-
state: k ? "failed" : "ready",
|
|
79
|
-
label: n,
|
|
80
|
-
placeholder: Y,
|
|
81
|
-
children: k ? X : J
|
|
82
|
-
}),
|
|
83
|
-
frameProps: {
|
|
84
|
-
search: G ? !0 : d,
|
|
85
|
-
filters: K ? !0 : f,
|
|
86
|
-
isFiltered: B.isFiltered
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
function z(e) {
|
|
91
|
-
let { title: t, navigation: n, actions: r, notice: a, inspector: o } = e, { scopeControl: s, controlActions: l, chips: u, findRegion: d, content: f, frameProps: p } = R(e), m = a != null, h = /* @__PURE__ */ L(F, { children: [
|
|
92
|
-
s,
|
|
93
|
-
n === void 0 && l,
|
|
94
|
-
r
|
|
95
|
-
] }), g = /* @__PURE__ */ I(D, {
|
|
96
|
-
header: /* @__PURE__ */ L(F, { children: [m && /* @__PURE__ */ I(w, { children: a }), u !== !1 && /* @__PURE__ */ I(c, {
|
|
97
|
-
label: "Applied filters",
|
|
98
|
-
children: u
|
|
99
|
-
})] }),
|
|
100
|
-
children: f
|
|
101
|
-
});
|
|
102
|
-
return /* @__PURE__ */ I(i, {
|
|
103
|
-
...p,
|
|
104
|
-
children: /* @__PURE__ */ I("section", {
|
|
105
|
-
...d,
|
|
106
|
-
className: "x12lumcd xeuugli x2lwn1j x78zum5 xdt5ytf",
|
|
107
|
-
children: /* @__PURE__ */ I(T, {
|
|
108
|
-
title: t,
|
|
109
|
-
actions: h,
|
|
110
|
-
navigation: n === void 0 ? void 0 : {
|
|
111
|
-
...n,
|
|
112
|
-
actions: /* @__PURE__ */ L(F, { children: [l, n.actions] })
|
|
113
|
-
},
|
|
114
|
-
children: /* @__PURE__ */ I(E, {
|
|
115
|
-
inspector: o,
|
|
116
|
-
children: g
|
|
117
|
-
})
|
|
118
|
-
})
|
|
119
|
-
})
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
function B(e) {
|
|
123
|
-
let { id: t, title: n, meta: r, actions: a, notice: o } = e, { scopeControl: s, controlActions: l, chips: u, findRegion: d, content: p, frameProps: m } = R(e), h = o != null;
|
|
124
|
-
return /* @__PURE__ */ I(i, {
|
|
125
|
-
...m,
|
|
126
|
-
children: /* @__PURE__ */ L("section", {
|
|
127
|
-
...d,
|
|
128
|
-
"aria-label": n,
|
|
129
|
-
className: "xeuugli x78zum5 xdt5ytf",
|
|
130
|
-
children: [
|
|
131
|
-
/* @__PURE__ */ I(f, {
|
|
132
|
-
...t !== void 0 && { id: t },
|
|
133
|
-
title: n,
|
|
134
|
-
meta: r,
|
|
135
|
-
actions: /* @__PURE__ */ L(F, { children: [
|
|
136
|
-
s,
|
|
137
|
-
l,
|
|
138
|
-
a
|
|
139
|
-
] })
|
|
140
|
-
}),
|
|
141
|
-
h && /* @__PURE__ */ I(w, { children: o }),
|
|
142
|
-
u !== !1 && /* @__PURE__ */ I(c, {
|
|
143
|
-
label: "Applied filters",
|
|
144
|
-
children: u
|
|
145
|
-
}),
|
|
146
|
-
p
|
|
147
|
-
]
|
|
148
|
-
})
|
|
149
|
-
});
|
|
150
|
-
}
|
|
11
|
+
import { useState as S } from "react";
|
|
12
|
+
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
151
13
|
// packages/kits/src/research/finding-card.tsx
|
|
152
|
-
var
|
|
14
|
+
var E = {
|
|
153
15
|
limitation: "Limitation",
|
|
154
16
|
details: "Full notes & evidence",
|
|
155
17
|
sources: "Sources",
|
|
@@ -159,100 +21,100 @@ var V = {
|
|
|
159
21
|
falsified: "Falsified",
|
|
160
22
|
open: "Open"
|
|
161
23
|
}
|
|
162
|
-
},
|
|
24
|
+
}, D = {
|
|
163
25
|
supported: "positive",
|
|
164
26
|
mixed: "warning",
|
|
165
27
|
falsified: "negative",
|
|
166
28
|
open: "neutral"
|
|
167
29
|
};
|
|
168
|
-
function
|
|
169
|
-
let
|
|
170
|
-
...
|
|
171
|
-
...
|
|
30
|
+
function O({ title: t, claim: n, locale: i, status: o, index: l, limitation: h, metrics: g = [], sources: _ = [], author: v, recordedAt: y, recordedLabel: b, details: x, actions: S, labels: C }) {
|
|
31
|
+
let O = {
|
|
32
|
+
...E,
|
|
33
|
+
...C,
|
|
172
34
|
statusLabels: {
|
|
173
|
-
...
|
|
174
|
-
...
|
|
35
|
+
...E.statusLabels,
|
|
36
|
+
...C?.statusLabels
|
|
175
37
|
}
|
|
176
38
|
};
|
|
177
|
-
return /* @__PURE__ */
|
|
178
|
-
title:
|
|
179
|
-
index:
|
|
180
|
-
meta: /* @__PURE__ */
|
|
181
|
-
tone:
|
|
182
|
-
children:
|
|
183
|
-
}),
|
|
184
|
-
footer:
|
|
39
|
+
return /* @__PURE__ */ w(u, {
|
|
40
|
+
title: t,
|
|
41
|
+
index: l,
|
|
42
|
+
meta: /* @__PURE__ */ T(c, { children: [/* @__PURE__ */ w(f, {
|
|
43
|
+
tone: D[o],
|
|
44
|
+
children: O.statusLabels[o]
|
|
45
|
+
}), S] }),
|
|
46
|
+
footer: v !== void 0 || y !== void 0 || _.length > 0 ? /* @__PURE__ */ T(c, {
|
|
185
47
|
shouldSpaceBetween: !0,
|
|
186
|
-
children: [/* @__PURE__ */
|
|
48
|
+
children: [/* @__PURE__ */ T(c, { children: [v !== void 0 && /* @__PURE__ */ w(a, {
|
|
187
49
|
variant: "caption",
|
|
188
50
|
tone: "muted",
|
|
189
|
-
children:
|
|
190
|
-
}),
|
|
191
|
-
dateTime:
|
|
192
|
-
label:
|
|
193
|
-
})] }),
|
|
51
|
+
children: v
|
|
52
|
+
}), y !== void 0 && /* @__PURE__ */ w(r, {
|
|
53
|
+
dateTime: y,
|
|
54
|
+
label: b ?? y
|
|
55
|
+
})] }), _.length > 0 && /* @__PURE__ */ T(c, { children: [/* @__PURE__ */ T(a, {
|
|
194
56
|
variant: "caption",
|
|
195
57
|
tone: "muted",
|
|
196
|
-
children: [
|
|
197
|
-
}),
|
|
58
|
+
children: [O.sources, ":"]
|
|
59
|
+
}), _.map((e) => e.summary !== void 0 && e.href !== void 0 ? /* @__PURE__ */ T(m.Root, { children: [/* @__PURE__ */ w(m.Trigger, {
|
|
198
60
|
href: e.href,
|
|
199
|
-
children: /* @__PURE__ */
|
|
200
|
-
}), /* @__PURE__ */
|
|
61
|
+
children: /* @__PURE__ */ w(d, { children: e.label })
|
|
62
|
+
}), /* @__PURE__ */ w(m.Popup, { children: /* @__PURE__ */ T(s, {
|
|
201
63
|
isCompact: !0,
|
|
202
|
-
children: [/* @__PURE__ */
|
|
64
|
+
children: [/* @__PURE__ */ w(a, { children: e.label }), /* @__PURE__ */ w(a, {
|
|
203
65
|
variant: "caption",
|
|
204
66
|
tone: "muted",
|
|
205
67
|
children: e.summary
|
|
206
68
|
})]
|
|
207
|
-
}) })] }, e.id) : /* @__PURE__ */
|
|
69
|
+
}) })] }, e.id) : /* @__PURE__ */ w(d, { children: e.label }, e.id))] })]
|
|
208
70
|
}) : void 0,
|
|
209
|
-
children: /* @__PURE__ */
|
|
71
|
+
children: /* @__PURE__ */ T(s, {
|
|
210
72
|
isCompact: !0,
|
|
211
73
|
children: [
|
|
212
|
-
/* @__PURE__ */
|
|
213
|
-
|
|
214
|
-
tone:
|
|
74
|
+
/* @__PURE__ */ w(a, { children: n }),
|
|
75
|
+
g.length > 0 && /* @__PURE__ */ w(c, { children: g.map((t) => /* @__PURE__ */ T(f, {
|
|
76
|
+
tone: t.tone ?? "neutral",
|
|
215
77
|
children: [
|
|
216
|
-
|
|
78
|
+
t.label,
|
|
217
79
|
": ",
|
|
218
|
-
|
|
219
|
-
value:
|
|
220
|
-
locale:
|
|
221
|
-
format:
|
|
80
|
+
e({
|
|
81
|
+
value: t.value,
|
|
82
|
+
locale: i,
|
|
83
|
+
format: t.format
|
|
222
84
|
})
|
|
223
85
|
]
|
|
224
|
-
},
|
|
225
|
-
|
|
86
|
+
}, t.label)) }),
|
|
87
|
+
h !== void 0 && /* @__PURE__ */ T(a, {
|
|
226
88
|
variant: "caption",
|
|
227
89
|
tone: "muted",
|
|
228
90
|
children: [
|
|
229
|
-
|
|
91
|
+
O.limitation,
|
|
230
92
|
": ",
|
|
231
|
-
|
|
93
|
+
h
|
|
232
94
|
]
|
|
233
95
|
}),
|
|
234
|
-
|
|
96
|
+
x !== void 0 && /* @__PURE__ */ T(p.Root, { children: [/* @__PURE__ */ w(p.Trigger, {
|
|
235
97
|
variant: "inline",
|
|
236
|
-
children:
|
|
237
|
-
}), /* @__PURE__ */
|
|
98
|
+
children: O.details
|
|
99
|
+
}), /* @__PURE__ */ w(p.Panel, { children: x })] })
|
|
238
100
|
]
|
|
239
101
|
})
|
|
240
102
|
});
|
|
241
103
|
}
|
|
242
104
|
// packages/kits/src/research/lineage-graph.tsx
|
|
243
|
-
var
|
|
105
|
+
var k = 152, A = 56, j = 32, M = 12, N = 16, P = 32, F = 16, I = 16, L = 12, R = 640, z = 240, B = 64, V = "General", H = {
|
|
244
106
|
baseline: "series5",
|
|
245
107
|
milestone: "positive",
|
|
246
108
|
branch: "series1",
|
|
247
109
|
merge: "series3",
|
|
248
110
|
killed: "negative"
|
|
249
|
-
},
|
|
111
|
+
}, U = {
|
|
250
112
|
baseline: "neutral",
|
|
251
113
|
milestone: "positive",
|
|
252
114
|
branch: "neutral",
|
|
253
115
|
merge: "warning",
|
|
254
116
|
killed: "negative"
|
|
255
|
-
},
|
|
117
|
+
}, W = {
|
|
256
118
|
frontier: "Frontier",
|
|
257
119
|
all: "All",
|
|
258
120
|
metric: "Score",
|
|
@@ -269,7 +131,7 @@ var U = 152, W = 56, G = 32, K = 12, q = 16, J = 32, Y = 16, X = 16, Z = 12, ne
|
|
|
269
131
|
killed: "Killed"
|
|
270
132
|
}
|
|
271
133
|
};
|
|
272
|
-
function
|
|
134
|
+
function G(e, t, n) {
|
|
273
135
|
let r = t.get(e.id) ?? 0;
|
|
274
136
|
for (let i of e.parentIds) if (n.has(i)) {
|
|
275
137
|
let e = (t.get(i) ?? 0) + 1;
|
|
@@ -277,13 +139,13 @@ function se(e, t, n) {
|
|
|
277
139
|
}
|
|
278
140
|
return r;
|
|
279
141
|
}
|
|
280
|
-
function
|
|
142
|
+
function K(e) {
|
|
281
143
|
let t = /* @__PURE__ */ new Map(), n = new Set(e.map((e) => e.id));
|
|
282
144
|
for (let n of e) t.set(n.id, 0);
|
|
283
|
-
for (let r = 0; r <
|
|
145
|
+
for (let r = 0; r < B; r += 1) {
|
|
284
146
|
let r = [];
|
|
285
147
|
for (let i of e) {
|
|
286
|
-
let e =
|
|
148
|
+
let e = G(i, t, n);
|
|
287
149
|
e !== t.get(i.id) && r.push([i.id, e]);
|
|
288
150
|
}
|
|
289
151
|
if (r.length === 0) break;
|
|
@@ -291,7 +153,7 @@ function ce(e) {
|
|
|
291
153
|
}
|
|
292
154
|
return t;
|
|
293
155
|
}
|
|
294
|
-
function
|
|
156
|
+
function q(e) {
|
|
295
157
|
let t = /* @__PURE__ */ new Set(), n = new Map(e.map((e) => [e.id, e]));
|
|
296
158
|
function r(e) {
|
|
297
159
|
if (t.has(e)) return;
|
|
@@ -302,50 +164,50 @@ function le(e) {
|
|
|
302
164
|
for (let t of e) t.kind !== "killed" && r(t.id);
|
|
303
165
|
return e.filter((e) => t.has(e.id));
|
|
304
166
|
}
|
|
305
|
-
function
|
|
306
|
-
let
|
|
307
|
-
if (
|
|
308
|
-
value:
|
|
309
|
-
locale:
|
|
310
|
-
format:
|
|
311
|
-
})),
|
|
312
|
-
let
|
|
313
|
-
|
|
314
|
-
value:
|
|
315
|
-
locale:
|
|
316
|
-
format:
|
|
167
|
+
function J({ node: t, locale: n, valueFormat: r, deltaFormat: i }) {
|
|
168
|
+
let a = [];
|
|
169
|
+
if (t.metric !== null && t.metric !== void 0 && a.push(r === void 0 ? String(t.metric) : e({
|
|
170
|
+
value: t.metric,
|
|
171
|
+
locale: n,
|
|
172
|
+
format: r
|
|
173
|
+
})), t.delta !== null && t.delta !== void 0) {
|
|
174
|
+
let o = i ?? r;
|
|
175
|
+
o === void 0 ? a.push(t.delta > 0 ? `+${t.delta}` : String(t.delta)) : a.push(e({
|
|
176
|
+
value: t.delta,
|
|
177
|
+
locale: n,
|
|
178
|
+
format: o
|
|
317
179
|
}));
|
|
318
180
|
}
|
|
319
|
-
return
|
|
181
|
+
return t.caption === void 0 ? a.length > 0 ? a.join(" · ") : t.summary : t.caption;
|
|
320
182
|
}
|
|
321
|
-
function
|
|
322
|
-
let t =
|
|
183
|
+
function Y(e) {
|
|
184
|
+
let t = K(e), n = /* @__PURE__ */ new Map();
|
|
323
185
|
for (let r of e) n.set(r.id, r.column ?? t.get(r.id) ?? 0);
|
|
324
186
|
return n;
|
|
325
187
|
}
|
|
326
|
-
function
|
|
327
|
-
let i =
|
|
188
|
+
function X({ nodes: e, locale: t, valueFormat: n, deltaFormat: r }) {
|
|
189
|
+
let i = Y(e), a = Math.max(0, ...Array.from(i.values())), o = e.some((e) => e.lane !== void 0), s = [];
|
|
328
190
|
if (o) for (let t of e) {
|
|
329
|
-
let e = t.lane ??
|
|
191
|
+
let e = t.lane ?? V;
|
|
330
192
|
s.includes(e) || s.push(e);
|
|
331
193
|
}
|
|
332
|
-
else s.push(
|
|
333
|
-
let c = (a + 1) *
|
|
194
|
+
else s.push(V);
|
|
195
|
+
let c = (a + 1) * k + a * j, l = [], u = [], d = N;
|
|
334
196
|
for (let a of s) {
|
|
335
|
-
let s = o ? e.filter((e) => (e.lane ??
|
|
197
|
+
let s = o ? e.filter((e) => (e.lane ?? V) === a) : e, f = /* @__PURE__ */ new Map();
|
|
336
198
|
for (let e of s) {
|
|
337
199
|
let t = i.get(e.id) ?? 0, n = f.get(t) ?? [];
|
|
338
200
|
n.push(e), f.set(t, n);
|
|
339
201
|
}
|
|
340
|
-
let p = Math.max(1, ...Array.from(f.values(), (e) => e.length)), m = p *
|
|
202
|
+
let p = Math.max(1, ...Array.from(f.values(), (e) => e.length)), m = p * A + (p - 1) * M, h = d, g = o ? h + P : h, _ = o ? P + m + F : m;
|
|
341
203
|
for (let [e, i] of f.entries()) {
|
|
342
|
-
let a =
|
|
204
|
+
let a = N + (o ? I : 0) + e * 184;
|
|
343
205
|
for (let [e, o] of i.entries()) {
|
|
344
206
|
let i = g + e * 68;
|
|
345
207
|
l.push({
|
|
346
208
|
id: o.id,
|
|
347
209
|
label: o.label,
|
|
348
|
-
description:
|
|
210
|
+
description: J({
|
|
349
211
|
node: o,
|
|
350
212
|
locale: t,
|
|
351
213
|
valueFormat: n,
|
|
@@ -353,21 +215,21 @@ function fe({ nodes: e, locale: t, valueFormat: n, deltaFormat: r }) {
|
|
|
353
215
|
}),
|
|
354
216
|
x: a,
|
|
355
217
|
y: i,
|
|
356
|
-
width:
|
|
357
|
-
height:
|
|
358
|
-
tone:
|
|
218
|
+
width: k,
|
|
219
|
+
height: A,
|
|
220
|
+
tone: H[o.kind]
|
|
359
221
|
});
|
|
360
222
|
}
|
|
361
223
|
}
|
|
362
224
|
o && u.push({
|
|
363
225
|
id: `lane:${a}`,
|
|
364
226
|
label: a,
|
|
365
|
-
x:
|
|
227
|
+
x: N,
|
|
366
228
|
y: h,
|
|
367
229
|
width: c + 32,
|
|
368
230
|
height: _,
|
|
369
231
|
nodeIds: s.map((e) => e.id)
|
|
370
|
-
}), d = h + _ + (o ?
|
|
232
|
+
}), d = h + _ + (o ? L : M);
|
|
371
233
|
}
|
|
372
234
|
let f = new Set(e.map((e) => e.id)), p = [];
|
|
373
235
|
for (let t of e) for (let e of t.parentIds) f.has(e) && p.push({
|
|
@@ -382,137 +244,138 @@ function fe({ nodes: e, locale: t, valueFormat: n, deltaFormat: r }) {
|
|
|
382
244
|
relationEdges: p,
|
|
383
245
|
relationGroups: u,
|
|
384
246
|
width: c + 32 + (o ? 32 : 0),
|
|
385
|
-
height: Math.max(
|
|
247
|
+
height: Math.max(z, d + N - (o ? L : M))
|
|
386
248
|
};
|
|
387
249
|
}
|
|
388
|
-
function
|
|
389
|
-
return /* @__PURE__ */
|
|
250
|
+
function ee({ node: e, labels: t, detailItems: n }) {
|
|
251
|
+
return /* @__PURE__ */ T(s, {
|
|
390
252
|
isCompact: !0,
|
|
391
253
|
children: [
|
|
392
|
-
/* @__PURE__ */
|
|
393
|
-
/* @__PURE__ */
|
|
254
|
+
/* @__PURE__ */ w(o, {}),
|
|
255
|
+
/* @__PURE__ */ T(c, {
|
|
394
256
|
shouldSpaceBetween: !0,
|
|
395
|
-
children: [/* @__PURE__ */
|
|
257
|
+
children: [/* @__PURE__ */ T(c, { children: [/* @__PURE__ */ w(a, { children: /* @__PURE__ */ w("strong", { children: e.label }) }), e.timestamp === void 0 ? null : /* @__PURE__ */ w(f, {
|
|
396
258
|
tone: "neutral",
|
|
397
259
|
children: e.timestamp
|
|
398
|
-
})] }), /* @__PURE__ */
|
|
399
|
-
tone:
|
|
260
|
+
})] }), /* @__PURE__ */ w(f, {
|
|
261
|
+
tone: U[e.kind],
|
|
400
262
|
children: t.kinds[e.kind]
|
|
401
263
|
})]
|
|
402
264
|
}),
|
|
403
|
-
e.summary === void 0 ? null : /* @__PURE__ */
|
|
404
|
-
e.detail === void 0 ? null : /* @__PURE__ */
|
|
265
|
+
e.summary === void 0 ? null : /* @__PURE__ */ w(a, { children: e.summary }),
|
|
266
|
+
e.detail === void 0 ? null : /* @__PURE__ */ w(a, {
|
|
405
267
|
tone: "muted",
|
|
406
268
|
children: e.detail
|
|
407
269
|
}),
|
|
408
|
-
n.length === 0 ? null : /* @__PURE__ */
|
|
270
|
+
n.length === 0 ? null : /* @__PURE__ */ w(i, { items: n })
|
|
409
271
|
]
|
|
410
272
|
});
|
|
411
273
|
}
|
|
412
|
-
function
|
|
413
|
-
let [
|
|
414
|
-
...
|
|
415
|
-
...
|
|
274
|
+
function te({ nodes: t, valueLabel: n, valueFormat: r, deltaFormat: i, defaultScope: a = "frontier", selected: o, onSelectedChange: c, labels: u, actions: d, ...f }) {
|
|
275
|
+
let [p, m] = S(a), [g, v] = S(null), b = {
|
|
276
|
+
...W,
|
|
277
|
+
...u,
|
|
416
278
|
kinds: {
|
|
417
|
-
...
|
|
418
|
-
...
|
|
279
|
+
...W.kinds,
|
|
280
|
+
...u?.kinds
|
|
419
281
|
}
|
|
420
282
|
};
|
|
421
|
-
if (
|
|
422
|
-
...
|
|
283
|
+
if (f.status === "loading") return /* @__PURE__ */ w(h, {
|
|
284
|
+
...f,
|
|
423
285
|
nodes: [],
|
|
424
286
|
edges: [],
|
|
425
|
-
width:
|
|
426
|
-
height:
|
|
287
|
+
width: R,
|
|
288
|
+
height: z
|
|
427
289
|
});
|
|
428
|
-
if (
|
|
429
|
-
title:
|
|
430
|
-
children:
|
|
290
|
+
if (t.length === 0) return /* @__PURE__ */ w(_, {
|
|
291
|
+
title: f.title,
|
|
292
|
+
children: b.empty
|
|
431
293
|
});
|
|
432
|
-
if (new Set(
|
|
433
|
-
|
|
294
|
+
if (new Set(t.map((e) => e.id)).size !== t.length) return /* @__PURE__ */ w(l, {
|
|
295
|
+
tone: "negative",
|
|
296
|
+
role: "alert",
|
|
434
297
|
children: "Lineage nodes must have unique identifiers."
|
|
435
298
|
});
|
|
436
|
-
let
|
|
437
|
-
function
|
|
438
|
-
|
|
299
|
+
let x = q(t), E = x.length < t.length, D = p === "frontier" && E ? x : t, O = o === void 0 ? g : o;
|
|
300
|
+
function k(e, t) {
|
|
301
|
+
o === void 0 && v(e), c?.(e, t);
|
|
439
302
|
}
|
|
440
|
-
let
|
|
441
|
-
nodes:
|
|
442
|
-
locale:
|
|
443
|
-
valueFormat:
|
|
444
|
-
deltaFormat:
|
|
445
|
-
}),
|
|
446
|
-
"aria-label": `${
|
|
447
|
-
value:
|
|
448
|
-
onValueChange: (e) =>
|
|
449
|
-
children: [/* @__PURE__ */
|
|
303
|
+
let A = X({
|
|
304
|
+
nodes: D,
|
|
305
|
+
locale: f.locale,
|
|
306
|
+
valueFormat: r,
|
|
307
|
+
deltaFormat: i
|
|
308
|
+
}), j = O === null ? void 0 : D.find((e) => e.id === O), M = new Map(t.map((e) => [e.id, e])), N = E ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ T(y.Root, {
|
|
309
|
+
"aria-label": `${f.title} scope`,
|
|
310
|
+
value: p,
|
|
311
|
+
onValueChange: (e) => m(e === "all" ? "all" : "frontier"),
|
|
312
|
+
children: [/* @__PURE__ */ w(y.Item, {
|
|
450
313
|
value: "frontier",
|
|
451
|
-
children: `${
|
|
452
|
-
}), /* @__PURE__ */
|
|
314
|
+
children: `${b.frontier} (${x.length})`
|
|
315
|
+
}), /* @__PURE__ */ w(y.Item, {
|
|
453
316
|
value: "all",
|
|
454
|
-
children: `${
|
|
317
|
+
children: `${b.all} (${t.length})`
|
|
455
318
|
})]
|
|
456
|
-
}),
|
|
457
|
-
...
|
|
458
|
-
label:
|
|
459
|
-
value:
|
|
319
|
+
}), d] }) : d, P = j === void 0 ? [] : [
|
|
320
|
+
...j.lane === void 0 ? [] : [{
|
|
321
|
+
label: b.lane,
|
|
322
|
+
value: j.lane
|
|
460
323
|
}],
|
|
461
|
-
...
|
|
462
|
-
label:
|
|
463
|
-
value:
|
|
464
|
-
value:
|
|
465
|
-
locale:
|
|
466
|
-
format:
|
|
324
|
+
...j.metric === null || j.metric === void 0 ? [] : [{
|
|
325
|
+
label: n ?? b.metric,
|
|
326
|
+
value: r === void 0 ? String(j.metric) : e({
|
|
327
|
+
value: j.metric,
|
|
328
|
+
locale: f.locale,
|
|
329
|
+
format: r
|
|
467
330
|
})
|
|
468
331
|
}],
|
|
469
|
-
...
|
|
470
|
-
label:
|
|
471
|
-
value: (
|
|
472
|
-
value:
|
|
473
|
-
locale:
|
|
474
|
-
format:
|
|
332
|
+
...j.delta === null || j.delta === void 0 ? [] : [{
|
|
333
|
+
label: b.delta,
|
|
334
|
+
value: (i ?? r) === void 0 ? j.delta > 0 ? `+${j.delta}` : String(j.delta) : e({
|
|
335
|
+
value: j.delta,
|
|
336
|
+
locale: f.locale,
|
|
337
|
+
format: i ?? r ?? { style: "decimal" }
|
|
475
338
|
})
|
|
476
339
|
}],
|
|
477
|
-
...
|
|
478
|
-
label:
|
|
479
|
-
value:
|
|
340
|
+
...j.parentIds.length === 0 ? [] : [{
|
|
341
|
+
label: b.parents,
|
|
342
|
+
value: j.parentIds.map((e) => M.get(e)?.label ?? e).join(", ")
|
|
480
343
|
}],
|
|
481
|
-
...
|
|
482
|
-
label:
|
|
483
|
-
value:
|
|
344
|
+
...j.source === void 0 ? [] : [{
|
|
345
|
+
label: b.source,
|
|
346
|
+
value: j.source
|
|
484
347
|
}]
|
|
485
348
|
];
|
|
486
|
-
return /* @__PURE__ */
|
|
487
|
-
...
|
|
488
|
-
actions:
|
|
489
|
-
nodes:
|
|
490
|
-
edges:
|
|
491
|
-
groups:
|
|
492
|
-
width:
|
|
493
|
-
height:
|
|
494
|
-
selected:
|
|
495
|
-
onSelectedChange:
|
|
496
|
-
}),
|
|
497
|
-
node:
|
|
498
|
-
labels:
|
|
499
|
-
detailItems:
|
|
349
|
+
return /* @__PURE__ */ T(s, { children: [/* @__PURE__ */ w(h, {
|
|
350
|
+
...f,
|
|
351
|
+
actions: N,
|
|
352
|
+
nodes: A.relationNodes,
|
|
353
|
+
edges: A.relationEdges,
|
|
354
|
+
groups: A.relationGroups.length > 0 ? A.relationGroups : void 0,
|
|
355
|
+
width: A.width,
|
|
356
|
+
height: A.height,
|
|
357
|
+
selected: O,
|
|
358
|
+
onSelectedChange: k
|
|
359
|
+
}), j === void 0 ? null : /* @__PURE__ */ w(ee, {
|
|
360
|
+
node: j,
|
|
361
|
+
labels: b,
|
|
362
|
+
detailItems: P
|
|
500
363
|
})] });
|
|
501
364
|
}
|
|
502
365
|
// packages/kits/src/research/milestone-path.tsx
|
|
503
|
-
var
|
|
366
|
+
var Z = {
|
|
504
367
|
baseline: "series5",
|
|
505
368
|
result: "series1",
|
|
506
369
|
breakthrough: "positive",
|
|
507
370
|
counterexample: "negative",
|
|
508
371
|
decision: "series3"
|
|
509
|
-
},
|
|
372
|
+
}, ne = {
|
|
510
373
|
baseline: "neutral",
|
|
511
374
|
result: "neutral",
|
|
512
375
|
breakthrough: "positive",
|
|
513
376
|
counterexample: "negative",
|
|
514
377
|
decision: "warning"
|
|
515
|
-
},
|
|
378
|
+
}, Q = {
|
|
516
379
|
metric: "Score",
|
|
517
380
|
delta: "Change",
|
|
518
381
|
limitation: "Limitation",
|
|
@@ -526,106 +389,108 @@ var he = {
|
|
|
526
389
|
decision: "Decision"
|
|
527
390
|
}
|
|
528
391
|
};
|
|
529
|
-
function
|
|
530
|
-
let
|
|
531
|
-
...
|
|
532
|
-
...
|
|
392
|
+
function re({ milestones: t, valueLabel: n, valueFormat: r, deltaFormat: u, selected: d, onSelectedChange: p, labels: m, ...h }) {
|
|
393
|
+
let v = {
|
|
394
|
+
...Q,
|
|
395
|
+
...m,
|
|
533
396
|
kinds: {
|
|
534
|
-
...
|
|
535
|
-
...
|
|
397
|
+
...Q.kinds,
|
|
398
|
+
...m?.kinds
|
|
536
399
|
}
|
|
537
400
|
};
|
|
538
|
-
if (
|
|
539
|
-
...
|
|
401
|
+
if (h.status === "loading") return /* @__PURE__ */ w(g, {
|
|
402
|
+
...h,
|
|
540
403
|
nodes: [],
|
|
541
404
|
direction: "right",
|
|
542
405
|
link: "elbow",
|
|
543
|
-
valueLabel:
|
|
544
|
-
valueFormat:
|
|
406
|
+
valueLabel: n,
|
|
407
|
+
valueFormat: r
|
|
545
408
|
});
|
|
546
|
-
if (
|
|
547
|
-
title:
|
|
548
|
-
children:
|
|
409
|
+
if (t.length === 0) return /* @__PURE__ */ w(_, {
|
|
410
|
+
title: h.title,
|
|
411
|
+
children: v.empty
|
|
549
412
|
});
|
|
550
|
-
if (new Set(
|
|
551
|
-
|
|
413
|
+
if (new Set(t.map((e) => e.id)).size !== t.length) return /* @__PURE__ */ w(l, {
|
|
414
|
+
tone: "negative",
|
|
415
|
+
role: "alert",
|
|
552
416
|
children: "Milestones must have unique identifiers."
|
|
553
417
|
});
|
|
554
|
-
if (
|
|
555
|
-
|
|
418
|
+
if (t.filter((e) => e.parentId === null).length !== 1) return /* @__PURE__ */ w(l, {
|
|
419
|
+
tone: "negative",
|
|
420
|
+
role: "alert",
|
|
556
421
|
children: "MilestonePath requires exactly one root milestone (parentId: null)."
|
|
557
422
|
});
|
|
558
|
-
let
|
|
423
|
+
let y = t.map((e) => ({
|
|
559
424
|
id: e.id,
|
|
560
425
|
parentId: e.parentId,
|
|
561
426
|
label: e.label,
|
|
562
|
-
detail: e.wave === void 0 ?
|
|
427
|
+
detail: e.wave === void 0 ? v.kinds[e.kind] : `${e.wave} · ${v.kinds[e.kind]}`,
|
|
563
428
|
value: e.metric ?? null,
|
|
564
|
-
tone:
|
|
565
|
-
})),
|
|
429
|
+
tone: Z[e.kind]
|
|
430
|
+
})), b = Array.from(new Set(t.map((e) => e.kind))).map((e) => ({
|
|
566
431
|
id: e,
|
|
567
|
-
label:
|
|
568
|
-
tone:
|
|
569
|
-
})),
|
|
570
|
-
return /* @__PURE__ */
|
|
571
|
-
...
|
|
572
|
-
nodes:
|
|
432
|
+
label: v.kinds[e],
|
|
433
|
+
tone: Z[e]
|
|
434
|
+
})), x = t.find((e) => e.id === d) ?? null;
|
|
435
|
+
return /* @__PURE__ */ T(s, { children: [/* @__PURE__ */ w(g, {
|
|
436
|
+
...h,
|
|
437
|
+
nodes: y,
|
|
573
438
|
direction: "right",
|
|
574
439
|
link: "elbow",
|
|
575
|
-
valueLabel:
|
|
576
|
-
valueFormat:
|
|
577
|
-
toneLegend:
|
|
578
|
-
selected:
|
|
579
|
-
onSelectedChange:
|
|
580
|
-
}),
|
|
440
|
+
valueLabel: n,
|
|
441
|
+
valueFormat: r,
|
|
442
|
+
toneLegend: b,
|
|
443
|
+
selected: d,
|
|
444
|
+
onSelectedChange: p
|
|
445
|
+
}), x !== null && /* @__PURE__ */ T(s, {
|
|
581
446
|
isCompact: !0,
|
|
582
447
|
children: [
|
|
583
|
-
/* @__PURE__ */
|
|
584
|
-
/* @__PURE__ */
|
|
448
|
+
/* @__PURE__ */ w(o, {}),
|
|
449
|
+
/* @__PURE__ */ T(c, {
|
|
585
450
|
shouldSpaceBetween: !0,
|
|
586
|
-
children: [/* @__PURE__ */
|
|
451
|
+
children: [/* @__PURE__ */ T(c, { children: [x.wave !== void 0 && /* @__PURE__ */ w(f, {
|
|
587
452
|
tone: "neutral",
|
|
588
|
-
children:
|
|
589
|
-
}), /* @__PURE__ */
|
|
590
|
-
tone:
|
|
591
|
-
children:
|
|
453
|
+
children: x.wave
|
|
454
|
+
}), /* @__PURE__ */ w(a, { children: /* @__PURE__ */ w("strong", { children: x.label }) })] }), /* @__PURE__ */ w(f, {
|
|
455
|
+
tone: ne[x.kind],
|
|
456
|
+
children: v.kinds[x.kind]
|
|
592
457
|
})]
|
|
593
458
|
}),
|
|
594
|
-
/* @__PURE__ */
|
|
459
|
+
/* @__PURE__ */ w(a, {
|
|
595
460
|
tone: "muted",
|
|
596
|
-
children:
|
|
461
|
+
children: x.claim
|
|
597
462
|
}),
|
|
598
|
-
/* @__PURE__ */
|
|
599
|
-
...
|
|
600
|
-
label:
|
|
601
|
-
value:
|
|
602
|
-
value:
|
|
603
|
-
locale:
|
|
604
|
-
format:
|
|
463
|
+
/* @__PURE__ */ w(i, { items: [
|
|
464
|
+
...x.metric === void 0 ? [] : [{
|
|
465
|
+
label: v.metric,
|
|
466
|
+
value: e({
|
|
467
|
+
value: x.metric,
|
|
468
|
+
locale: h.locale,
|
|
469
|
+
format: r
|
|
605
470
|
})
|
|
606
471
|
}],
|
|
607
|
-
...
|
|
608
|
-
label:
|
|
609
|
-
value:
|
|
610
|
-
value:
|
|
611
|
-
locale:
|
|
612
|
-
format:
|
|
472
|
+
...x.delta === void 0 ? [] : [{
|
|
473
|
+
label: v.delta,
|
|
474
|
+
value: e({
|
|
475
|
+
value: x.delta,
|
|
476
|
+
locale: h.locale,
|
|
477
|
+
format: u ?? r
|
|
613
478
|
})
|
|
614
479
|
}],
|
|
615
|
-
...
|
|
616
|
-
label:
|
|
617
|
-
value:
|
|
480
|
+
...x.limitation === void 0 ? [] : [{
|
|
481
|
+
label: v.limitation,
|
|
482
|
+
value: x.limitation
|
|
618
483
|
}],
|
|
619
|
-
...
|
|
620
|
-
label:
|
|
621
|
-
value:
|
|
484
|
+
...x.source === void 0 ? [] : [{
|
|
485
|
+
label: v.source,
|
|
486
|
+
value: x.source
|
|
622
487
|
}]
|
|
623
488
|
] })
|
|
624
489
|
]
|
|
625
490
|
})] });
|
|
626
491
|
}
|
|
627
492
|
// packages/kits/src/research/specimen-diff.tsx
|
|
628
|
-
var
|
|
493
|
+
var ie = {
|
|
629
494
|
breakdownTitle: "Paired outcome flips",
|
|
630
495
|
all: "All",
|
|
631
496
|
gained: "Gained",
|
|
@@ -638,65 +503,65 @@ var ye = {
|
|
|
638
503
|
candidate: "Candidate",
|
|
639
504
|
outcome: "Outcome",
|
|
640
505
|
empty: "No paired specimens available for these two runs."
|
|
641
|
-
},
|
|
506
|
+
}, ae = {
|
|
642
507
|
gained: "positive",
|
|
643
508
|
regressed: "negative",
|
|
644
509
|
both_pass: "neutral",
|
|
645
510
|
both_fail: "neutral"
|
|
646
|
-
},
|
|
511
|
+
}, oe = /* @__PURE__ */ new Set([
|
|
647
512
|
"gained",
|
|
648
513
|
"regressed",
|
|
649
514
|
"both_pass",
|
|
650
515
|
"both_fail"
|
|
651
516
|
]);
|
|
652
|
-
function
|
|
653
|
-
return e !== null &&
|
|
517
|
+
function se(e) {
|
|
518
|
+
return e !== null && oe.has(e);
|
|
654
519
|
}
|
|
655
|
-
function
|
|
656
|
-
let
|
|
657
|
-
...
|
|
658
|
-
...
|
|
520
|
+
function ce({ rows: e, baselineLabel: r, candidateLabel: i, filter: o, onFilterChange: c, onSelectRow: l, labels: u, ...p }) {
|
|
521
|
+
let m = {
|
|
522
|
+
...ie,
|
|
523
|
+
...u
|
|
659
524
|
};
|
|
660
|
-
if (e.length === 0) return /* @__PURE__ */
|
|
661
|
-
title:
|
|
662
|
-
children:
|
|
525
|
+
if (e.length === 0) return /* @__PURE__ */ w(_, {
|
|
526
|
+
title: p.title,
|
|
527
|
+
children: m.empty
|
|
663
528
|
});
|
|
664
|
-
let
|
|
529
|
+
let h = {
|
|
665
530
|
gained: 0,
|
|
666
531
|
regressed: 0,
|
|
667
532
|
both_pass: 0,
|
|
668
533
|
both_fail: 0
|
|
669
534
|
};
|
|
670
|
-
for (let t of e)
|
|
671
|
-
let
|
|
672
|
-
gained:
|
|
673
|
-
regressed:
|
|
674
|
-
both_pass:
|
|
675
|
-
both_fail:
|
|
676
|
-
},
|
|
535
|
+
for (let t of e) h[t.outcome] += 1;
|
|
536
|
+
let g = o === "all" ? e : e.filter((e) => e.outcome === o), v = {
|
|
537
|
+
gained: m.gained,
|
|
538
|
+
regressed: m.regressed,
|
|
539
|
+
both_pass: m.bothPass,
|
|
540
|
+
both_fail: m.bothFail
|
|
541
|
+
}, S = [
|
|
677
542
|
{
|
|
678
543
|
id: "specimen",
|
|
679
|
-
label:
|
|
544
|
+
label: m.specimen,
|
|
680
545
|
role: "primary",
|
|
681
|
-
cell: (e) => /* @__PURE__ */
|
|
546
|
+
cell: (e) => /* @__PURE__ */ w(t, {
|
|
682
547
|
secondary: e.family,
|
|
683
548
|
children: e.prompt
|
|
684
549
|
})
|
|
685
550
|
},
|
|
686
551
|
{
|
|
687
552
|
id: "expected",
|
|
688
|
-
label:
|
|
553
|
+
label: m.expected,
|
|
689
554
|
role: "text",
|
|
690
|
-
cell: (e) => /* @__PURE__ */
|
|
555
|
+
cell: (e) => /* @__PURE__ */ w(d, { children: e.expected })
|
|
691
556
|
},
|
|
692
557
|
{
|
|
693
558
|
id: "baseline",
|
|
694
|
-
label:
|
|
559
|
+
label: r.trim() === "" ? m.baseline : r,
|
|
695
560
|
role: "text",
|
|
696
561
|
isSecondary: !0,
|
|
697
|
-
cell: (e) => /* @__PURE__ */
|
|
562
|
+
cell: (e) => /* @__PURE__ */ w(a, {
|
|
698
563
|
variant: "mono",
|
|
699
|
-
children: /* @__PURE__ */
|
|
564
|
+
children: /* @__PURE__ */ w(x, {
|
|
700
565
|
text: e.baselineOutput,
|
|
701
566
|
query: e.expected,
|
|
702
567
|
tone: "accent"
|
|
@@ -705,11 +570,11 @@ function Ce({ rows: e, baselineLabel: t, candidateLabel: r, filter: i, onFilterC
|
|
|
705
570
|
},
|
|
706
571
|
{
|
|
707
572
|
id: "candidate",
|
|
708
|
-
label:
|
|
573
|
+
label: i.trim() === "" ? m.candidate : i,
|
|
709
574
|
role: "text",
|
|
710
|
-
cell: (e) => /* @__PURE__ */
|
|
575
|
+
cell: (e) => /* @__PURE__ */ w(a, {
|
|
711
576
|
variant: "mono",
|
|
712
|
-
children: /* @__PURE__ */
|
|
577
|
+
children: /* @__PURE__ */ w(x, {
|
|
713
578
|
text: e.candidateOutput,
|
|
714
579
|
query: e.expected,
|
|
715
580
|
tone: "accent"
|
|
@@ -718,119 +583,119 @@ function Ce({ rows: e, baselineLabel: t, candidateLabel: r, filter: i, onFilterC
|
|
|
718
583
|
},
|
|
719
584
|
{
|
|
720
585
|
id: "outcome",
|
|
721
|
-
label:
|
|
586
|
+
label: m.outcome,
|
|
722
587
|
role: "status",
|
|
723
|
-
cell: (e) => /* @__PURE__ */
|
|
724
|
-
tone:
|
|
725
|
-
children:
|
|
588
|
+
cell: (e) => /* @__PURE__ */ w(f, {
|
|
589
|
+
tone: ae[e.outcome],
|
|
590
|
+
children: v[e.outcome]
|
|
726
591
|
})
|
|
727
592
|
}
|
|
728
593
|
];
|
|
729
|
-
return /* @__PURE__ */
|
|
594
|
+
return /* @__PURE__ */ T(s, {
|
|
730
595
|
isCompact: !0,
|
|
731
596
|
children: [
|
|
732
|
-
/* @__PURE__ */
|
|
733
|
-
title:
|
|
734
|
-
description:
|
|
735
|
-
locale:
|
|
736
|
-
status:
|
|
737
|
-
source:
|
|
597
|
+
/* @__PURE__ */ w(b, {
|
|
598
|
+
title: m.breakdownTitle,
|
|
599
|
+
description: p.description,
|
|
600
|
+
locale: p.locale,
|
|
601
|
+
status: p.status,
|
|
602
|
+
source: p.source,
|
|
738
603
|
total: e.length,
|
|
739
604
|
valueFormat: { maximumFractionDigits: 0 },
|
|
740
605
|
items: [
|
|
741
606
|
{
|
|
742
607
|
id: "gained",
|
|
743
|
-
label:
|
|
744
|
-
value:
|
|
608
|
+
label: m.gained,
|
|
609
|
+
value: h.gained,
|
|
745
610
|
tone: "positive"
|
|
746
611
|
},
|
|
747
612
|
{
|
|
748
613
|
id: "both_pass",
|
|
749
|
-
label:
|
|
750
|
-
value:
|
|
614
|
+
label: m.bothPass,
|
|
615
|
+
value: h.both_pass,
|
|
751
616
|
tone: "series1"
|
|
752
617
|
},
|
|
753
618
|
{
|
|
754
619
|
id: "regressed",
|
|
755
|
-
label:
|
|
756
|
-
value:
|
|
620
|
+
label: m.regressed,
|
|
621
|
+
value: h.regressed,
|
|
757
622
|
tone: "negative"
|
|
758
623
|
},
|
|
759
624
|
{
|
|
760
625
|
id: "both_fail",
|
|
761
|
-
label:
|
|
762
|
-
value:
|
|
626
|
+
label: m.bothFail,
|
|
627
|
+
value: h.both_fail,
|
|
763
628
|
tone: "series5"
|
|
764
629
|
}
|
|
765
630
|
],
|
|
766
|
-
selected:
|
|
631
|
+
selected: o === "all" ? null : o,
|
|
767
632
|
onSelectedChange: (e) => {
|
|
768
|
-
|
|
633
|
+
se(e) ? c(e === o ? "all" : e) : c("all");
|
|
769
634
|
}
|
|
770
635
|
}),
|
|
771
|
-
/* @__PURE__ */
|
|
772
|
-
"aria-label":
|
|
773
|
-
value:
|
|
636
|
+
/* @__PURE__ */ T(y.Root, {
|
|
637
|
+
"aria-label": m.outcome,
|
|
638
|
+
value: o,
|
|
774
639
|
onValueChange: (e) => {
|
|
775
|
-
|
|
640
|
+
c(e);
|
|
776
641
|
},
|
|
777
642
|
children: [
|
|
778
|
-
/* @__PURE__ */
|
|
643
|
+
/* @__PURE__ */ T(y.Item, {
|
|
779
644
|
value: "all",
|
|
780
645
|
children: [
|
|
781
|
-
|
|
646
|
+
m.all,
|
|
782
647
|
" (",
|
|
783
648
|
e.length,
|
|
784
649
|
")"
|
|
785
650
|
]
|
|
786
651
|
}),
|
|
787
|
-
/* @__PURE__ */
|
|
652
|
+
/* @__PURE__ */ T(y.Item, {
|
|
788
653
|
value: "gained",
|
|
789
654
|
children: [
|
|
790
|
-
|
|
655
|
+
m.gained,
|
|
791
656
|
" (",
|
|
792
|
-
|
|
657
|
+
h.gained,
|
|
793
658
|
")"
|
|
794
659
|
]
|
|
795
660
|
}),
|
|
796
|
-
/* @__PURE__ */
|
|
661
|
+
/* @__PURE__ */ T(y.Item, {
|
|
797
662
|
value: "regressed",
|
|
798
663
|
children: [
|
|
799
|
-
|
|
664
|
+
m.regressed,
|
|
800
665
|
" (",
|
|
801
|
-
|
|
666
|
+
h.regressed,
|
|
802
667
|
")"
|
|
803
668
|
]
|
|
804
669
|
}),
|
|
805
|
-
/* @__PURE__ */
|
|
670
|
+
/* @__PURE__ */ T(y.Item, {
|
|
806
671
|
value: "both_pass",
|
|
807
672
|
children: [
|
|
808
|
-
|
|
673
|
+
m.bothPass,
|
|
809
674
|
" (",
|
|
810
|
-
|
|
675
|
+
h.both_pass,
|
|
811
676
|
")"
|
|
812
677
|
]
|
|
813
678
|
}),
|
|
814
|
-
/* @__PURE__ */
|
|
679
|
+
/* @__PURE__ */ T(y.Item, {
|
|
815
680
|
value: "both_fail",
|
|
816
681
|
children: [
|
|
817
|
-
|
|
682
|
+
m.bothFail,
|
|
818
683
|
" (",
|
|
819
|
-
|
|
684
|
+
h.both_fail,
|
|
820
685
|
")"
|
|
821
686
|
]
|
|
822
687
|
})
|
|
823
688
|
]
|
|
824
689
|
}),
|
|
825
|
-
/* @__PURE__ */
|
|
826
|
-
caption:
|
|
690
|
+
/* @__PURE__ */ w(n, {
|
|
691
|
+
caption: p.title,
|
|
827
692
|
hideCaption: !0,
|
|
828
|
-
columns:
|
|
829
|
-
rows:
|
|
693
|
+
columns: S,
|
|
694
|
+
rows: g,
|
|
830
695
|
getRowId: (e) => e.id,
|
|
831
|
-
...
|
|
696
|
+
...l !== void 0 && { rowAction: {
|
|
832
697
|
label: (e) => `Inspect ${e.id}`,
|
|
833
|
-
onActivate:
|
|
698
|
+
onActivate: l
|
|
834
699
|
} },
|
|
835
700
|
query: {
|
|
836
701
|
mode: "local",
|
|
@@ -841,14 +706,14 @@ function Ce({ rows: e, baselineLabel: t, candidateLabel: r, filter: i, onFilterC
|
|
|
841
706
|
value: (e) => e.family
|
|
842
707
|
}]
|
|
843
708
|
},
|
|
844
|
-
empty:
|
|
709
|
+
empty: m.empty,
|
|
845
710
|
filteredEmpty: "No specimens match the current filter."
|
|
846
711
|
})
|
|
847
712
|
]
|
|
848
713
|
});
|
|
849
714
|
}
|
|
850
715
|
// packages/kits/src/research/work-heartbeat.tsx
|
|
851
|
-
var
|
|
716
|
+
var $ = {
|
|
852
717
|
title: "Active work reports",
|
|
853
718
|
empty: "No active or recent work reports.",
|
|
854
719
|
nextCheckpoint: "Next checkpoint",
|
|
@@ -859,90 +724,90 @@ var we = {
|
|
|
859
724
|
overdue: "Update overdue",
|
|
860
725
|
stopped: "Stopped"
|
|
861
726
|
}
|
|
862
|
-
},
|
|
727
|
+
}, le = {
|
|
863
728
|
running: "positive",
|
|
864
729
|
completed: "neutral",
|
|
865
730
|
blocked: "negative",
|
|
866
731
|
overdue: "warning",
|
|
867
732
|
stopped: "neutral"
|
|
868
733
|
};
|
|
869
|
-
function
|
|
734
|
+
function ue(e) {
|
|
870
735
|
return e === void 0 ? null : Number.isFinite(e.completed) && Number.isFinite(e.total) && e.total > 0 ? e : null;
|
|
871
736
|
}
|
|
872
|
-
function
|
|
873
|
-
let
|
|
874
|
-
|
|
875
|
-
...
|
|
737
|
+
function de({ reports: t, locale: n, labels: i }) {
|
|
738
|
+
let o = {
|
|
739
|
+
...$,
|
|
740
|
+
...i,
|
|
876
741
|
states: {
|
|
877
|
-
|
|
878
|
-
...
|
|
742
|
+
...$.states,
|
|
743
|
+
...i?.states
|
|
879
744
|
}
|
|
880
745
|
};
|
|
881
|
-
return
|
|
746
|
+
return t.length === 0 ? /* @__PURE__ */ w("div", {
|
|
882
747
|
className: "x1qokhjc",
|
|
883
|
-
children: /* @__PURE__ */
|
|
748
|
+
children: /* @__PURE__ */ w(a, {
|
|
884
749
|
variant: "caption",
|
|
885
750
|
tone: "muted",
|
|
886
|
-
children:
|
|
751
|
+
children: o.empty
|
|
887
752
|
})
|
|
888
|
-
}) : /* @__PURE__ */
|
|
753
|
+
}) : /* @__PURE__ */ w("ul", {
|
|
889
754
|
className: "xe8uvvx x1ghz6dp x1717udv x178xt8z x13fuv20 xhjagg4",
|
|
890
|
-
children:
|
|
891
|
-
let
|
|
892
|
-
return /* @__PURE__ */
|
|
755
|
+
children: t.map((t) => {
|
|
756
|
+
let i = ue(t.progress), u = i === null ? null : Math.max(0, Math.min(100, i.completed / i.total * 100)), p = t.nextCheckpoint !== void 0 || t.executionRef !== void 0;
|
|
757
|
+
return /* @__PURE__ */ T("li", {
|
|
893
758
|
className: "x78zum5 xdt5ytf x1hnptsi x1qokhjc xso031l x1q0q8m5 x1qndepd",
|
|
894
759
|
children: [
|
|
895
|
-
/* @__PURE__ */
|
|
760
|
+
/* @__PURE__ */ T(c, {
|
|
896
761
|
shouldSpaceBetween: !0,
|
|
897
|
-
children: [/* @__PURE__ */
|
|
898
|
-
tone:
|
|
899
|
-
children:
|
|
900
|
-
}), /* @__PURE__ */
|
|
901
|
-
dateTime:
|
|
902
|
-
label:
|
|
762
|
+
children: [/* @__PURE__ */ w(a, { children: /* @__PURE__ */ w("strong", { children: t.title }) }), /* @__PURE__ */ T(c, { children: [/* @__PURE__ */ w(l, {
|
|
763
|
+
tone: le[t.state],
|
|
764
|
+
children: o.states[t.state]
|
|
765
|
+
}), /* @__PURE__ */ w(r, {
|
|
766
|
+
dateTime: t.observedAt,
|
|
767
|
+
label: t.observedLabel
|
|
903
768
|
})] })]
|
|
904
769
|
}),
|
|
905
|
-
|
|
770
|
+
i !== null && u !== null && /* @__PURE__ */ T(s, {
|
|
906
771
|
isCompact: !0,
|
|
907
|
-
children: [/* @__PURE__ */
|
|
772
|
+
children: [/* @__PURE__ */ T(c, {
|
|
908
773
|
shouldSpaceBetween: !0,
|
|
909
|
-
children: [/* @__PURE__ */
|
|
774
|
+
children: [/* @__PURE__ */ T(a, {
|
|
910
775
|
variant: "caption",
|
|
911
776
|
tone: "muted",
|
|
912
777
|
children: [
|
|
913
|
-
|
|
914
|
-
value:
|
|
915
|
-
locale:
|
|
778
|
+
e({
|
|
779
|
+
value: i.completed,
|
|
780
|
+
locale: n,
|
|
916
781
|
format: { maximumFractionDigits: 0 }
|
|
917
782
|
}),
|
|
918
783
|
" /",
|
|
919
784
|
" ",
|
|
920
|
-
|
|
921
|
-
value:
|
|
922
|
-
locale:
|
|
785
|
+
e({
|
|
786
|
+
value: i.total,
|
|
787
|
+
locale: n,
|
|
923
788
|
format: { maximumFractionDigits: 0 }
|
|
924
789
|
}),
|
|
925
790
|
" ",
|
|
926
|
-
|
|
791
|
+
i.unit
|
|
927
792
|
]
|
|
928
|
-
}), /* @__PURE__ */
|
|
793
|
+
}), /* @__PURE__ */ w(f, {
|
|
929
794
|
tone: "neutral",
|
|
930
|
-
children:
|
|
931
|
-
value:
|
|
932
|
-
locale:
|
|
795
|
+
children: e({
|
|
796
|
+
value: u / 100,
|
|
797
|
+
locale: n,
|
|
933
798
|
format: {
|
|
934
799
|
style: "percent",
|
|
935
800
|
maximumFractionDigits: 0
|
|
936
801
|
}
|
|
937
802
|
})
|
|
938
803
|
})]
|
|
939
|
-
}), /* @__PURE__ */
|
|
940
|
-
label:
|
|
941
|
-
value:
|
|
942
|
-
max:
|
|
943
|
-
valueLabel:
|
|
944
|
-
value:
|
|
945
|
-
locale:
|
|
804
|
+
}), /* @__PURE__ */ w(v, {
|
|
805
|
+
label: t.title,
|
|
806
|
+
value: i.completed,
|
|
807
|
+
max: i.total,
|
|
808
|
+
valueLabel: e({
|
|
809
|
+
value: u / 100,
|
|
810
|
+
locale: n,
|
|
946
811
|
format: {
|
|
947
812
|
style: "percent",
|
|
948
813
|
maximumFractionDigits: 0
|
|
@@ -950,21 +815,21 @@ function De({ reports: e, locale: t, labels: n }) {
|
|
|
950
815
|
})
|
|
951
816
|
})]
|
|
952
817
|
}),
|
|
953
|
-
|
|
818
|
+
p && /* @__PURE__ */ T(c, {
|
|
954
819
|
shouldSpaceBetween: !0,
|
|
955
|
-
children: [
|
|
820
|
+
children: [t.nextCheckpoint === void 0 ? /* @__PURE__ */ w("span", {}) : /* @__PURE__ */ T(a, {
|
|
956
821
|
variant: "caption",
|
|
957
822
|
tone: "muted",
|
|
958
823
|
children: [
|
|
959
|
-
|
|
824
|
+
o.nextCheckpoint,
|
|
960
825
|
": ",
|
|
961
|
-
|
|
826
|
+
t.nextCheckpoint
|
|
962
827
|
]
|
|
963
|
-
}),
|
|
828
|
+
}), t.executionRef !== void 0 && /* @__PURE__ */ w(d, { children: t.executionRef })]
|
|
964
829
|
})
|
|
965
830
|
]
|
|
966
|
-
},
|
|
831
|
+
}, t.id);
|
|
967
832
|
})
|
|
968
833
|
});
|
|
969
834
|
}
|
|
970
|
-
export {
|
|
835
|
+
export { O as FindingCard, te as LineageGraph, re as MilestonePath, ce as SpecimenDiff, de as WorkHeartbeat };
|