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