@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.
Files changed (106) hide show
  1. package/README.md +21 -10
  2. package/dist/ai.js +285 -203
  3. package/dist/{article-BrUa4Wz1.js → article-anMy8fA5.js} +6 -6
  4. package/dist/article.js +1 -1
  5. package/dist/catalog.json +81 -34
  6. package/dist/{categorical-values-AXJkMt-Y.js → categorical-values-Bh7ZkEQn.js} +1 -1
  7. package/dist/charts/cartesian.js +1 -1
  8. package/dist/charts/comparison.js +1 -1
  9. package/dist/charts/distribution.js +1 -1
  10. package/dist/charts/figure.js +12 -12
  11. package/dist/charts/graph.js +1 -1
  12. package/dist/charts/hierarchy.js +1 -1
  13. package/dist/charts/image.js +1 -1
  14. package/dist/charts/matrix.js +1 -1
  15. package/dist/charts/plot.js +3 -3
  16. package/dist/charts/relationship.js +1 -1
  17. package/dist/charts/text.js +1 -1
  18. package/dist/charts/timeline.js +2 -2
  19. package/dist/charts/trend.js +1 -1
  20. package/dist/charts.js +2 -2
  21. package/dist/{code-block-BDRmjlES.js → code-block-DbW_t9U4.js} +1 -1
  22. package/dist/collections.js +1 -1
  23. package/dist/{commands-rzsDElrG.js → commands-C7Zrp-tG.js} +2 -2
  24. package/dist/content/code.js +1 -1
  25. package/dist/content/diff.js +3 -3
  26. package/dist/content/link.js +1 -1
  27. package/dist/content/markdown.js +1 -1
  28. package/dist/content/tree.js +2 -2
  29. package/dist/{content-link-DRaNf1mD.js → content-link-BN4NPp0u.js} +1 -1
  30. package/dist/content.js +1 -1
  31. package/dist/{dates-wu-gKO2C.js → dates-OTq-xU33.js} +2 -2
  32. package/dist/{dumbbell-plot-VFajQtEW.js → dumbbell-plot-BQDGe0sQ.js} +3 -3
  33. package/dist/{embedding-map-BqDEmy88.js → embedding-map-DmmknG7A.js} +6 -6
  34. package/dist/feedback.js +1 -1
  35. package/dist/{figure-frame-Dd-pOeZN.js → figure-frame-DlyNTDzh.js} +22 -21
  36. package/dist/forms/dates.js +1 -1
  37. package/dist/{forms-Bjx7JQ30.js → forms-iAOjGRTO.js} +1 -1
  38. package/dist/forms.js +2 -2
  39. package/dist/{image-grid-Dpyqxgwy.js → image-grid-CxEAQvTf.js} +3 -3
  40. package/dist/index.js +1 -1
  41. package/dist/kits/evaluation.js +13 -13
  42. package/dist/kits/interpretability.js +47 -43
  43. package/dist/kits/operations.js +80 -79
  44. package/dist/kits/research.js +364 -499
  45. package/dist/kits/training.js +108 -107
  46. package/dist/layout.js +1 -1
  47. package/dist/lesson.js +3 -3
  48. package/dist/{markdown--nfaDoR1.js → markdown-Diffqqm7.js} +2 -2
  49. package/dist/mdx.js +6 -6
  50. package/dist/navigation/commands.js +1 -1
  51. package/dist/{navigation-Cp3p0gss.js → navigation-CTnYtVD8.js} +1 -1
  52. package/dist/navigation.js +3 -3
  53. package/dist/packages/ai/src/index.d.ts +2 -0
  54. package/dist/packages/ai/src/message-reactions.d.ts +51 -0
  55. package/dist/packages/ai/src/message.d.ts +3 -1
  56. package/dist/packages/collections/src/card-columns-model.d.ts +50 -0
  57. package/dist/packages/collections/src/card-columns.d.ts +30 -0
  58. package/dist/packages/collections/src/collection-page.d.ts +43 -0
  59. package/dist/packages/collections/src/column-card.d.ts +15 -0
  60. package/dist/packages/collections/src/data-table-layout.d.ts +2 -0
  61. package/dist/packages/collections/src/data-table-rows.d.ts +4 -3
  62. package/dist/packages/collections/src/data-table.d.ts +2 -2
  63. package/dist/packages/collections/src/index.d.ts +5 -0
  64. package/dist/packages/collections/src/table-query.d.ts +9 -1
  65. package/dist/packages/feedback/src/feedback.d.ts +0 -4
  66. package/dist/packages/feedback/src/index.d.ts +1 -1
  67. package/dist/packages/kits/src/research/index.d.ts +0 -2
  68. package/dist/{param-CwT1RvUS.js → param-CKr8EYxF.js} +1 -1
  69. package/dist/{pierre-diff-DuvK3kLF.js → pierre-diff-DXVIwW7o.js} +1 -1
  70. package/dist/{plot-layout-CvkeUuG6.js → plot-layout-CVzSbcU7.js} +24 -23
  71. package/dist/{plot-surface-yy37R4vs.js → plot-surface-CBhI1alw.js} +1 -1
  72. package/dist/{reference-lines-AMeDkYlo.js → reference-lines-C970JwWZ.js} +1 -1
  73. package/dist/{scene-BRhI8XSy.js → scene-C3dCxckI.js} +6 -6
  74. package/dist/scene.js +1 -1
  75. package/dist/{slope-chart-BMOCaa8R.js → slope-chart-DekEJxsy.js} +4 -4
  76. package/dist/{src-9n2M1V_y.js → src-BCAelv4f.js} +3 -3
  77. package/dist/{src-BgmAkau8.js → src-Bkov5TTa.js} +171 -164
  78. package/dist/{src-Bns-5joF.js → src-BsqbWDxS.js} +4 -4
  79. package/dist/{src-BdyO4PgQ.js → src-CIyuaSCi.js} +101 -107
  80. package/dist/{src-Tu6d_Pm8.js → src-Dc1t1ugL.js} +958 -585
  81. package/dist/{src-C5SH3jjU.js → src-DceyVyL0.js} +2 -2
  82. package/dist/{src-C_E29-DX.js → src-Dlh99sPD.js} +1 -1
  83. package/dist/styles2.css +21 -1
  84. package/dist/{time-series-CTNVqoUQ.js → time-series-BSNnijxf.js} +8 -8
  85. package/dist/{timeline-DrsDtEIW.js → timeline-CnxfYSIg.js} +4 -4
  86. package/dist/{token-heatmap-DddArdH8.js → token-heatmap-CJaXo56P.js} +3 -3
  87. package/dist/{token-predictions-CBykmPID.js → token-predictions-Bi7aKPnh.js} +3 -3
  88. package/dist/{transport-r1QgELf8.js → transport-CXj0DV6o.js} +4 -4
  89. package/dist/{tree-diagram-BIJFK4pl.js → tree-diagram-BxOZsjr1.js} +4 -4
  90. package/dist/{treemap-DgmEw_mr.js → treemap-B2yOAetT.js} +4 -4
  91. package/dist/{use-tween-BWf44Jy4.js → use-tween-C1TWJwce.js} +1 -1
  92. package/dist/{violin-plot-BYJnv6sG.js → violin-plot-W2L_2JRo.js} +3 -3
  93. package/dist/{waterfall-BNseqMas.js → waterfall-Bt73N2Ng.js} +4 -4
  94. package/package.json +1 -1
  95. package/recipes/searchable-collection.tsx +74 -76
  96. package/skills/extend-elements/SKILL.md +2 -1
  97. package/skills/review-elements/SKILL.md +11 -7
  98. package/skills/upgrade-elements/SKILL.md +3 -1
  99. package/skills/upgrade-elements/references/releases.md +20 -0
  100. package/skills/use-elements/SKILL.md +8 -6
  101. package/skills/use-elements/references/collections.md +59 -12
  102. package/skills/use-elements/references/conversations.md +32 -0
  103. package/skills/use-elements/references/editorial-restraint.md +17 -29
  104. package/skills/use-elements/references/figures.md +6 -2
  105. package/skills/use-elements/references/workspace.md +5 -5
  106. package/dist/packages/kits/src/research/collection-page.d.ts +0 -71
@@ -1,155 +1,17 @@
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-Tu6d_Pm8.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-BgmAkau8.js";
3
- import { m as y, p as b, s as x, t as S } from "../src-BdyO4PgQ.js";
4
- import { u as C } from "../src-C5SH3jjU.js";
5
- import { D as w, _ as T, i as E, n as D } from "../src-9n2M1V_y.js";
6
- import { r as O } from "../figure-format-B8kRZMlo.js";
7
- import { n as k } from "../src-na2DdkKI.js";
8
- import { a as A, t as j } from "../tree-diagram-BIJFK4pl.js";
9
- import { f as M } from "../time-series-CTNVqoUQ.js";
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 P } from "react";
13
- import { Fragment as F, jsx as I, jsxs as L } from "react/jsx-runtime";
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 V = {
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
- }, te = {
24
+ }, D = {
163
25
  supported: "positive",
164
26
  mixed: "warning",
165
27
  falsified: "negative",
166
28
  open: "neutral"
167
29
  };
168
- function H({ 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 }) {
169
- let S = {
170
- ...V,
171
- ...x,
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
- ...V.statusLabels,
174
- ...x?.statusLabels
35
+ ...E.statusLabels,
36
+ ...C?.statusLabels
175
37
  }
176
38
  };
177
- return /* @__PURE__ */ I(h, {
178
- title: e,
179
- index: i,
180
- meta: /* @__PURE__ */ L(p, { children: [/* @__PURE__ */ I(_, {
181
- tone: te[r],
182
- children: S.statusLabels[r]
183
- }), b] }),
184
- footer: u !== void 0 || f !== void 0 || c.length > 0 ? /* @__PURE__ */ L(p, {
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__ */ L(p, { children: [u !== void 0 && /* @__PURE__ */ I(l, {
48
+ children: [/* @__PURE__ */ T(c, { children: [v !== void 0 && /* @__PURE__ */ w(a, {
187
49
  variant: "caption",
188
50
  tone: "muted",
189
- children: u
190
- }), f !== void 0 && /* @__PURE__ */ I(a, {
191
- dateTime: f,
192
- label: m ?? f
193
- })] }), c.length > 0 && /* @__PURE__ */ L(p, { children: [/* @__PURE__ */ L(l, {
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: [S.sources, ":"]
197
- }), c.map((e) => e.summary !== void 0 && e.href !== void 0 ? /* @__PURE__ */ L(k.Root, { children: [/* @__PURE__ */ I(k.Trigger, {
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__ */ I(g, { children: e.label })
200
- }), /* @__PURE__ */ I(k.Popup, { children: /* @__PURE__ */ L(d, {
61
+ children: /* @__PURE__ */ w(d, { children: e.label })
62
+ }), /* @__PURE__ */ w(m.Popup, { children: /* @__PURE__ */ T(s, {
201
63
  isCompact: !0,
202
- children: [/* @__PURE__ */ I(l, { children: e.label }), /* @__PURE__ */ I(l, {
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__ */ I(g, { children: e.label }, e.id))] })]
69
+ }) })] }, e.id) : /* @__PURE__ */ w(d, { children: e.label }, e.id))] })]
208
70
  }) : void 0,
209
- children: /* @__PURE__ */ L(d, {
71
+ children: /* @__PURE__ */ T(s, {
210
72
  isCompact: !0,
211
73
  children: [
212
- /* @__PURE__ */ I(l, { children: t }),
213
- s.length > 0 && /* @__PURE__ */ I(p, { children: s.map((e) => /* @__PURE__ */ L(_, {
214
- tone: e.tone ?? "neutral",
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
- e.label,
78
+ t.label,
217
79
  ": ",
218
- O({
219
- value: e.value,
220
- locale: n,
221
- format: e.format
80
+ e({
81
+ value: t.value,
82
+ locale: i,
83
+ format: t.format
222
84
  })
223
85
  ]
224
- }, e.label)) }),
225
- o !== void 0 && /* @__PURE__ */ L(l, {
86
+ }, t.label)) }),
87
+ h !== void 0 && /* @__PURE__ */ T(a, {
226
88
  variant: "caption",
227
89
  tone: "muted",
228
90
  children: [
229
- S.limitation,
91
+ O.limitation,
230
92
  ": ",
231
- o
93
+ h
232
94
  ]
233
95
  }),
234
- y !== void 0 && /* @__PURE__ */ L(v.Root, { children: [/* @__PURE__ */ I(v.Trigger, {
96
+ x !== void 0 && /* @__PURE__ */ T(p.Root, { children: [/* @__PURE__ */ w(p.Trigger, {
235
97
  variant: "inline",
236
- children: S.details
237
- }), /* @__PURE__ */ I(v.Panel, { children: y })] })
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 U = 152, W = 56, G = 32, K = 12, q = 16, J = 32, Y = 16, X = 16, Z = 12, ne = 640, Q = 240, re = 64, $ = "General", ie = {
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
- }, ae = {
111
+ }, U = {
250
112
  baseline: "neutral",
251
113
  milestone: "positive",
252
114
  branch: "neutral",
253
115
  merge: "warning",
254
116
  killed: "negative"
255
- }, oe = {
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 se(e, t, n) {
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 ce(e) {
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 < re; r += 1) {
145
+ for (let r = 0; r < B; r += 1) {
284
146
  let r = [];
285
147
  for (let i of e) {
286
- let e = se(i, t, n);
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 le(e) {
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 ue({ node: e, locale: t, valueFormat: n, deltaFormat: r }) {
306
- let i = [];
307
- if (e.metric !== null && e.metric !== void 0 && i.push(n === void 0 ? String(e.metric) : O({
308
- value: e.metric,
309
- locale: t,
310
- format: n
311
- })), e.delta !== null && e.delta !== void 0) {
312
- let a = r ?? n;
313
- a === void 0 ? i.push(e.delta > 0 ? `+${e.delta}` : String(e.delta)) : i.push(O({
314
- value: e.delta,
315
- locale: t,
316
- format: a
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 e.caption === void 0 ? i.length > 0 ? i.join(" · ") : e.summary : e.caption;
181
+ return t.caption === void 0 ? a.length > 0 ? a.join(" · ") : t.summary : t.caption;
320
182
  }
321
- function de(e) {
322
- let t = ce(e), n = /* @__PURE__ */ new Map();
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 fe({ nodes: e, locale: t, valueFormat: n, deltaFormat: r }) {
327
- let i = de(e), a = Math.max(0, ...Array.from(i.values())), o = e.some((e) => e.lane !== void 0), s = [];
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) * U + a * G, l = [], u = [], d = q;
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 ?? $) === a) : e, f = /* @__PURE__ */ new Map();
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 * W + (p - 1) * K, h = d, g = o ? h + J : h, _ = o ? J + m + Y : m;
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 = q + (o ? X : 0) + e * 184;
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: ue({
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: U,
357
- height: W,
358
- tone: ie[o.kind]
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: q,
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 ? Z : K);
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(Q, d + q - (o ? Z : K))
247
+ height: Math.max(z, d + N - (o ? L : M))
386
248
  };
387
249
  }
388
- function pe({ node: e, labels: t, detailItems: n }) {
389
- return /* @__PURE__ */ L(d, {
250
+ function ee({ node: e, labels: t, detailItems: n }) {
251
+ return /* @__PURE__ */ T(s, {
390
252
  isCompact: !0,
391
253
  children: [
392
- /* @__PURE__ */ I(u, {}),
393
- /* @__PURE__ */ L(p, {
254
+ /* @__PURE__ */ w(o, {}),
255
+ /* @__PURE__ */ T(c, {
394
256
  shouldSpaceBetween: !0,
395
- children: [/* @__PURE__ */ L(p, { children: [/* @__PURE__ */ I(l, { children: /* @__PURE__ */ I("strong", { children: e.label }) }), e.timestamp === void 0 ? null : /* @__PURE__ */ I(_, {
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__ */ I(_, {
399
- tone: ae[e.kind],
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__ */ I(l, { children: e.summary }),
404
- e.detail === void 0 ? null : /* @__PURE__ */ I(l, {
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__ */ I(o, { items: n })
270
+ n.length === 0 ? null : /* @__PURE__ */ w(i, { items: n })
409
271
  ]
410
272
  });
411
273
  }
412
- function me({ nodes: e, valueLabel: t, valueFormat: n, deltaFormat: r, defaultScope: i = "frontier", selected: a, onSelectedChange: o, labels: s, actions: c, ...l }) {
413
- let [u, f] = P(i), [p, m] = P(null), h = {
414
- ...oe,
415
- ...s,
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
- ...oe.kinds,
418
- ...s?.kinds
279
+ ...W.kinds,
280
+ ...u?.kinds
419
281
  }
420
282
  };
421
- if (l.status === "loading") return /* @__PURE__ */ I(A, {
422
- ...l,
283
+ if (f.status === "loading") return /* @__PURE__ */ w(h, {
284
+ ...f,
423
285
  nodes: [],
424
286
  edges: [],
425
- width: ne,
426
- height: Q
287
+ width: R,
288
+ height: z
427
289
  });
428
- if (e.length === 0) return /* @__PURE__ */ I(b, {
429
- title: l.title,
430
- children: h.empty
290
+ if (t.length === 0) return /* @__PURE__ */ w(_, {
291
+ title: f.title,
292
+ children: b.empty
431
293
  });
432
- if (new Set(e.map((e) => e.id)).size !== e.length) return /* @__PURE__ */ I(y, {
433
- hasError: !0,
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 g = le(e), _ = g.length < e.length, v = u === "frontier" && _ ? g : e, x = a === void 0 ? p : a;
437
- function S(e, t) {
438
- a === void 0 && m(e), o?.(e, t);
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 w = fe({
441
- nodes: v,
442
- locale: l.locale,
443
- valueFormat: n,
444
- deltaFormat: r
445
- }), T = x === null ? void 0 : v.find((e) => e.id === x), E = new Map(e.map((e) => [e.id, e])), D = _ ? /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ L(C.Root, {
446
- "aria-label": `${l.title} scope`,
447
- value: u,
448
- onValueChange: (e) => f(e === "all" ? "all" : "frontier"),
449
- children: [/* @__PURE__ */ I(C.Item, {
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: `${h.frontier} (${g.length})`
452
- }), /* @__PURE__ */ I(C.Item, {
314
+ children: `${b.frontier} (${x.length})`
315
+ }), /* @__PURE__ */ w(y.Item, {
453
316
  value: "all",
454
- children: `${h.all} (${e.length})`
317
+ children: `${b.all} (${t.length})`
455
318
  })]
456
- }), c] }) : c, k = T === void 0 ? [] : [
457
- ...T.lane === void 0 ? [] : [{
458
- label: h.lane,
459
- value: T.lane
319
+ }), d] }) : d, P = j === void 0 ? [] : [
320
+ ...j.lane === void 0 ? [] : [{
321
+ label: b.lane,
322
+ value: j.lane
460
323
  }],
461
- ...T.metric === null || T.metric === void 0 ? [] : [{
462
- label: t ?? h.metric,
463
- value: n === void 0 ? String(T.metric) : O({
464
- value: T.metric,
465
- locale: l.locale,
466
- format: n
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
- ...T.delta === null || T.delta === void 0 ? [] : [{
470
- label: h.delta,
471
- value: (r ?? n) === void 0 ? T.delta > 0 ? `+${T.delta}` : String(T.delta) : O({
472
- value: T.delta,
473
- locale: l.locale,
474
- format: r ?? n ?? { style: "decimal" }
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
- ...T.parentIds.length === 0 ? [] : [{
478
- label: h.parents,
479
- value: T.parentIds.map((e) => E.get(e)?.label ?? e).join(", ")
340
+ ...j.parentIds.length === 0 ? [] : [{
341
+ label: b.parents,
342
+ value: j.parentIds.map((e) => M.get(e)?.label ?? e).join(", ")
480
343
  }],
481
- ...T.source === void 0 ? [] : [{
482
- label: h.source,
483
- value: T.source
344
+ ...j.source === void 0 ? [] : [{
345
+ label: b.source,
346
+ value: j.source
484
347
  }]
485
348
  ];
486
- return /* @__PURE__ */ L(d, { children: [/* @__PURE__ */ I(A, {
487
- ...l,
488
- actions: D,
489
- nodes: w.relationNodes,
490
- edges: w.relationEdges,
491
- groups: w.relationGroups.length > 0 ? w.relationGroups : void 0,
492
- width: w.width,
493
- height: w.height,
494
- selected: x,
495
- onSelectedChange: S
496
- }), T === void 0 ? null : /* @__PURE__ */ I(pe, {
497
- node: T,
498
- labels: h,
499
- detailItems: k
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 he = {
366
+ var Z = {
504
367
  baseline: "series5",
505
368
  result: "series1",
506
369
  breakthrough: "positive",
507
370
  counterexample: "negative",
508
371
  decision: "series3"
509
- }, ge = {
372
+ }, ne = {
510
373
  baseline: "neutral",
511
374
  result: "neutral",
512
375
  breakthrough: "positive",
513
376
  counterexample: "negative",
514
377
  decision: "warning"
515
- }, _e = {
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 ve({ milestones: e, valueLabel: t, valueFormat: n, deltaFormat: r, selected: i, onSelectedChange: a, labels: s, ...c }) {
530
- let f = {
531
- ..._e,
532
- ...s,
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
- ..._e.kinds,
535
- ...s?.kinds
397
+ ...Q.kinds,
398
+ ...m?.kinds
536
399
  }
537
400
  };
538
- if (c.status === "loading") return /* @__PURE__ */ I(j, {
539
- ...c,
401
+ if (h.status === "loading") return /* @__PURE__ */ w(g, {
402
+ ...h,
540
403
  nodes: [],
541
404
  direction: "right",
542
405
  link: "elbow",
543
- valueLabel: t,
544
- valueFormat: n
406
+ valueLabel: n,
407
+ valueFormat: r
545
408
  });
546
- if (e.length === 0) return /* @__PURE__ */ I(b, {
547
- title: c.title,
548
- children: f.empty
409
+ if (t.length === 0) return /* @__PURE__ */ w(_, {
410
+ title: h.title,
411
+ children: v.empty
549
412
  });
550
- if (new Set(e.map((e) => e.id)).size !== e.length) return /* @__PURE__ */ I(y, {
551
- hasError: !0,
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 (e.filter((e) => e.parentId === null).length !== 1) return /* @__PURE__ */ I(y, {
555
- hasError: !0,
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 m = e.map((e) => ({
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 ? f.kinds[e.kind] : `${e.wave} · ${f.kinds[e.kind]}`,
427
+ detail: e.wave === void 0 ? v.kinds[e.kind] : `${e.wave} · ${v.kinds[e.kind]}`,
563
428
  value: e.metric ?? null,
564
- tone: he[e.kind]
565
- })), h = Array.from(new Set(e.map((e) => e.kind))).map((e) => ({
429
+ tone: Z[e.kind]
430
+ })), b = Array.from(new Set(t.map((e) => e.kind))).map((e) => ({
566
431
  id: e,
567
- label: f.kinds[e],
568
- tone: he[e]
569
- })), g = e.find((e) => e.id === i) ?? null;
570
- return /* @__PURE__ */ L(d, { children: [/* @__PURE__ */ I(j, {
571
- ...c,
572
- nodes: m,
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: t,
576
- valueFormat: n,
577
- toneLegend: h,
578
- selected: i,
579
- onSelectedChange: a
580
- }), g !== null && /* @__PURE__ */ L(d, {
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__ */ I(u, {}),
584
- /* @__PURE__ */ L(p, {
448
+ /* @__PURE__ */ w(o, {}),
449
+ /* @__PURE__ */ T(c, {
585
450
  shouldSpaceBetween: !0,
586
- children: [/* @__PURE__ */ L(p, { children: [g.wave !== void 0 && /* @__PURE__ */ I(_, {
451
+ children: [/* @__PURE__ */ T(c, { children: [x.wave !== void 0 && /* @__PURE__ */ w(f, {
587
452
  tone: "neutral",
588
- children: g.wave
589
- }), /* @__PURE__ */ I(l, { children: /* @__PURE__ */ I("strong", { children: g.label }) })] }), /* @__PURE__ */ I(_, {
590
- tone: ge[g.kind],
591
- children: f.kinds[g.kind]
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__ */ I(l, {
459
+ /* @__PURE__ */ w(a, {
595
460
  tone: "muted",
596
- children: g.claim
461
+ children: x.claim
597
462
  }),
598
- /* @__PURE__ */ I(o, { items: [
599
- ...g.metric === void 0 ? [] : [{
600
- label: f.metric,
601
- value: O({
602
- value: g.metric,
603
- locale: c.locale,
604
- format: n
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
- ...g.delta === void 0 ? [] : [{
608
- label: f.delta,
609
- value: O({
610
- value: g.delta,
611
- locale: c.locale,
612
- format: r ?? n
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
- ...g.limitation === void 0 ? [] : [{
616
- label: f.limitation,
617
- value: g.limitation
480
+ ...x.limitation === void 0 ? [] : [{
481
+ label: v.limitation,
482
+ value: x.limitation
618
483
  }],
619
- ...g.source === void 0 ? [] : [{
620
- label: f.source,
621
- value: g.source
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 ye = {
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
- }, be = {
506
+ }, ae = {
642
507
  gained: "positive",
643
508
  regressed: "negative",
644
509
  both_pass: "neutral",
645
510
  both_fail: "neutral"
646
- }, xe = /* @__PURE__ */ new Set([
511
+ }, oe = /* @__PURE__ */ new Set([
647
512
  "gained",
648
513
  "regressed",
649
514
  "both_pass",
650
515
  "both_fail"
651
516
  ]);
652
- function Se(e) {
653
- return e !== null && xe.has(e);
517
+ function se(e) {
518
+ return e !== null && oe.has(e);
654
519
  }
655
- function Ce({ rows: e, baselineLabel: t, candidateLabel: r, filter: i, onFilterChange: a, onSelectRow: o, labels: c, ...u }) {
656
- let f = {
657
- ...ye,
658
- ...c
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__ */ I(b, {
661
- title: u.title,
662
- children: f.empty
525
+ if (e.length === 0) return /* @__PURE__ */ w(_, {
526
+ title: p.title,
527
+ children: m.empty
663
528
  });
664
- let p = {
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) p[t.outcome] += 1;
671
- let m = i === "all" ? e : e.filter((e) => e.outcome === i), h = {
672
- gained: f.gained,
673
- regressed: f.regressed,
674
- both_pass: f.bothPass,
675
- both_fail: f.bothFail
676
- }, v = [
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: f.specimen,
544
+ label: m.specimen,
680
545
  role: "primary",
681
- cell: (e) => /* @__PURE__ */ I(n, {
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: f.expected,
553
+ label: m.expected,
689
554
  role: "text",
690
- cell: (e) => /* @__PURE__ */ I(g, { children: e.expected })
555
+ cell: (e) => /* @__PURE__ */ w(d, { children: e.expected })
691
556
  },
692
557
  {
693
558
  id: "baseline",
694
- label: t.trim() === "" ? f.baseline : t,
559
+ label: r.trim() === "" ? m.baseline : r,
695
560
  role: "text",
696
561
  isSecondary: !0,
697
- cell: (e) => /* @__PURE__ */ I(l, {
562
+ cell: (e) => /* @__PURE__ */ w(a, {
698
563
  variant: "mono",
699
- children: /* @__PURE__ */ I(N, {
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: r.trim() === "" ? f.candidate : r,
573
+ label: i.trim() === "" ? m.candidate : i,
709
574
  role: "text",
710
- cell: (e) => /* @__PURE__ */ I(l, {
575
+ cell: (e) => /* @__PURE__ */ w(a, {
711
576
  variant: "mono",
712
- children: /* @__PURE__ */ I(N, {
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: f.outcome,
586
+ label: m.outcome,
722
587
  role: "status",
723
- cell: (e) => /* @__PURE__ */ I(_, {
724
- tone: be[e.outcome],
725
- children: h[e.outcome]
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__ */ L(d, {
594
+ return /* @__PURE__ */ T(s, {
730
595
  isCompact: !0,
731
596
  children: [
732
- /* @__PURE__ */ I(M, {
733
- title: f.breakdownTitle,
734
- description: u.description,
735
- locale: u.locale,
736
- status: u.status,
737
- source: u.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: f.gained,
744
- value: p.gained,
608
+ label: m.gained,
609
+ value: h.gained,
745
610
  tone: "positive"
746
611
  },
747
612
  {
748
613
  id: "both_pass",
749
- label: f.bothPass,
750
- value: p.both_pass,
614
+ label: m.bothPass,
615
+ value: h.both_pass,
751
616
  tone: "series1"
752
617
  },
753
618
  {
754
619
  id: "regressed",
755
- label: f.regressed,
756
- value: p.regressed,
620
+ label: m.regressed,
621
+ value: h.regressed,
757
622
  tone: "negative"
758
623
  },
759
624
  {
760
625
  id: "both_fail",
761
- label: f.bothFail,
762
- value: p.both_fail,
626
+ label: m.bothFail,
627
+ value: h.both_fail,
763
628
  tone: "series5"
764
629
  }
765
630
  ],
766
- selected: i === "all" ? null : i,
631
+ selected: o === "all" ? null : o,
767
632
  onSelectedChange: (e) => {
768
- Se(e) ? a(e === i ? "all" : e) : a("all");
633
+ se(e) ? c(e === o ? "all" : e) : c("all");
769
634
  }
770
635
  }),
771
- /* @__PURE__ */ L(C.Root, {
772
- "aria-label": f.outcome,
773
- value: i,
636
+ /* @__PURE__ */ T(y.Root, {
637
+ "aria-label": m.outcome,
638
+ value: o,
774
639
  onValueChange: (e) => {
775
- a(e);
640
+ c(e);
776
641
  },
777
642
  children: [
778
- /* @__PURE__ */ L(C.Item, {
643
+ /* @__PURE__ */ T(y.Item, {
779
644
  value: "all",
780
645
  children: [
781
- f.all,
646
+ m.all,
782
647
  " (",
783
648
  e.length,
784
649
  ")"
785
650
  ]
786
651
  }),
787
- /* @__PURE__ */ L(C.Item, {
652
+ /* @__PURE__ */ T(y.Item, {
788
653
  value: "gained",
789
654
  children: [
790
- f.gained,
655
+ m.gained,
791
656
  " (",
792
- p.gained,
657
+ h.gained,
793
658
  ")"
794
659
  ]
795
660
  }),
796
- /* @__PURE__ */ L(C.Item, {
661
+ /* @__PURE__ */ T(y.Item, {
797
662
  value: "regressed",
798
663
  children: [
799
- f.regressed,
664
+ m.regressed,
800
665
  " (",
801
- p.regressed,
666
+ h.regressed,
802
667
  ")"
803
668
  ]
804
669
  }),
805
- /* @__PURE__ */ L(C.Item, {
670
+ /* @__PURE__ */ T(y.Item, {
806
671
  value: "both_pass",
807
672
  children: [
808
- f.bothPass,
673
+ m.bothPass,
809
674
  " (",
810
- p.both_pass,
675
+ h.both_pass,
811
676
  ")"
812
677
  ]
813
678
  }),
814
- /* @__PURE__ */ L(C.Item, {
679
+ /* @__PURE__ */ T(y.Item, {
815
680
  value: "both_fail",
816
681
  children: [
817
- f.bothFail,
682
+ m.bothFail,
818
683
  " (",
819
- p.both_fail,
684
+ h.both_fail,
820
685
  ")"
821
686
  ]
822
687
  })
823
688
  ]
824
689
  }),
825
- /* @__PURE__ */ I(s, {
826
- caption: u.title,
690
+ /* @__PURE__ */ w(n, {
691
+ caption: p.title,
827
692
  hideCaption: !0,
828
- columns: v,
829
- rows: m,
693
+ columns: S,
694
+ rows: g,
830
695
  getRowId: (e) => e.id,
831
- ...o !== void 0 && { rowAction: {
696
+ ...l !== void 0 && { rowAction: {
832
697
  label: (e) => `Inspect ${e.id}`,
833
- onActivate: o
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: f.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 we = {
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
- }, Te = {
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 Ee(e) {
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 De({ reports: e, locale: t, labels: n }) {
873
- let r = {
874
- ...we,
875
- ...n,
737
+ function de({ reports: t, locale: n, labels: i }) {
738
+ let o = {
739
+ ...$,
740
+ ...i,
876
741
  states: {
877
- ...we.states,
878
- ...n?.states
742
+ ...$.states,
743
+ ...i?.states
879
744
  }
880
745
  };
881
- return e.length === 0 ? /* @__PURE__ */ I("div", {
746
+ return t.length === 0 ? /* @__PURE__ */ w("div", {
882
747
  className: "x1qokhjc",
883
- children: /* @__PURE__ */ I(l, {
748
+ children: /* @__PURE__ */ w(a, {
884
749
  variant: "caption",
885
750
  tone: "muted",
886
- children: r.empty
751
+ children: o.empty
887
752
  })
888
- }) : /* @__PURE__ */ I("ul", {
753
+ }) : /* @__PURE__ */ w("ul", {
889
754
  className: "xe8uvvx x1ghz6dp x1717udv x178xt8z x13fuv20 xhjagg4",
890
- children: e.map((e) => {
891
- let n = Ee(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;
892
- return /* @__PURE__ */ L("li", {
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__ */ L(p, {
760
+ /* @__PURE__ */ T(c, {
896
761
  shouldSpaceBetween: !0,
897
- children: [/* @__PURE__ */ I(l, { children: /* @__PURE__ */ I("strong", { children: e.title }) }), /* @__PURE__ */ L(p, { children: [/* @__PURE__ */ I(m, {
898
- tone: Te[e.state],
899
- children: r.states[e.state]
900
- }), /* @__PURE__ */ I(a, {
901
- dateTime: e.observedAt,
902
- label: e.observedLabel
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
- n !== null && i !== null && /* @__PURE__ */ L(d, {
770
+ i !== null && u !== null && /* @__PURE__ */ T(s, {
906
771
  isCompact: !0,
907
- children: [/* @__PURE__ */ L(p, {
772
+ children: [/* @__PURE__ */ T(c, {
908
773
  shouldSpaceBetween: !0,
909
- children: [/* @__PURE__ */ L(l, {
774
+ children: [/* @__PURE__ */ T(a, {
910
775
  variant: "caption",
911
776
  tone: "muted",
912
777
  children: [
913
- O({
914
- value: n.completed,
915
- locale: t,
778
+ e({
779
+ value: i.completed,
780
+ locale: n,
916
781
  format: { maximumFractionDigits: 0 }
917
782
  }),
918
783
  " /",
919
784
  " ",
920
- O({
921
- value: n.total,
922
- locale: t,
785
+ e({
786
+ value: i.total,
787
+ locale: n,
923
788
  format: { maximumFractionDigits: 0 }
924
789
  }),
925
790
  " ",
926
- n.unit
791
+ i.unit
927
792
  ]
928
- }), /* @__PURE__ */ I(_, {
793
+ }), /* @__PURE__ */ w(f, {
929
794
  tone: "neutral",
930
- children: O({
931
- value: i / 100,
932
- locale: t,
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__ */ I(x, {
940
- label: e.title,
941
- value: n.completed,
942
- max: n.total,
943
- valueLabel: O({
944
- value: i / 100,
945
- locale: t,
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
- o && /* @__PURE__ */ L(p, {
818
+ p && /* @__PURE__ */ T(c, {
954
819
  shouldSpaceBetween: !0,
955
- children: [e.nextCheckpoint === void 0 ? /* @__PURE__ */ I("span", {}) : /* @__PURE__ */ L(l, {
820
+ children: [t.nextCheckpoint === void 0 ? /* @__PURE__ */ w("span", {}) : /* @__PURE__ */ T(a, {
956
821
  variant: "caption",
957
822
  tone: "muted",
958
823
  children: [
959
- r.nextCheckpoint,
824
+ o.nextCheckpoint,
960
825
  ": ",
961
- e.nextCheckpoint
826
+ t.nextCheckpoint
962
827
  ]
963
- }), e.executionRef !== void 0 && /* @__PURE__ */ I(g, { children: e.executionRef })]
828
+ }), t.executionRef !== void 0 && /* @__PURE__ */ w(d, { children: t.executionRef })]
964
829
  })
965
830
  ]
966
- }, e.id);
831
+ }, t.id);
967
832
  })
968
833
  });
969
834
  }
970
- export { z as CollectionPage, B as CollectionSection, H as FindingCard, me as LineageGraph, ve as MilestonePath, Ce as SpecimenDiff, De as WorkHeartbeat };
835
+ export { O as FindingCard, te as LineageGraph, re as MilestonePath, ce as SpecimenDiff, de as WorkHeartbeat };