@mechane-ai/elements 0.49.1 → 0.51.0

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