@mechane-ai/elements 0.48.0 → 0.49.1

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 (140) hide show
  1. package/README.md +40 -2
  2. package/dist/ai.js +5 -5
  3. package/dist/{article-BXZr10QQ.js → article-CRlhq9oA.js} +532 -464
  4. package/dist/article.js +1 -1
  5. package/dist/catalog.json +243 -1
  6. package/dist/{categorical-values-BpVq8cFj.js → categorical-values-BYP_R5gS.js} +13 -13
  7. package/dist/{cells-xVmnQ9oQ.js → cells-CNZE4us2.js} +2 -2
  8. package/dist/charts/cartesian.js +1 -1
  9. package/dist/charts/cells.js +1 -1
  10. package/dist/charts/comparison.js +1 -1
  11. package/dist/charts/distribution.js +1 -1
  12. package/dist/charts/figure.js +12 -12
  13. package/dist/charts/graph.js +1 -1
  14. package/dist/charts/hierarchy.js +1 -1
  15. package/dist/charts/image.js +1 -1
  16. package/dist/charts/matrix.js +1 -1
  17. package/dist/charts/plot.js +7 -7
  18. package/dist/charts/relationship.js +1 -1
  19. package/dist/charts/text.js +1 -1
  20. package/dist/charts/timeline.js +1 -1
  21. package/dist/charts/trend.js +1 -1
  22. package/dist/charts.js +7 -7
  23. package/dist/{code-block-DioAM2bZ.js → code-block-BZsY2sh3.js} +1 -1
  24. package/dist/collections.js +1 -1
  25. package/dist/content/code.js +1 -1
  26. package/dist/content/diff.js +3 -3
  27. package/dist/content/link.js +1 -1
  28. package/dist/content/markdown.js +2 -2
  29. package/dist/content/tree.js +1 -1
  30. package/dist/{content-link-NWuHp5rC.js → content-link-PnpcnTCx.js} +1 -1
  31. package/dist/content.js +1 -1
  32. package/dist/{dates-Cww8UR_n.js → dates-ckJdYF7t.js} +1 -1
  33. package/dist/{dumbbell-plot-DQdTxDeO.js → dumbbell-plot-B-Tn7ewW.js} +49 -48
  34. package/dist/{embedding-map-CF-J-8JW.js → embedding-map-Bljn-A5q.js} +533 -533
  35. package/dist/feedback.js +1 -1
  36. package/dist/figure-frame-CEijciL7.js +289 -0
  37. package/dist/forms/dates.js +1 -1
  38. package/dist/forms.js +3 -3
  39. package/dist/{image-grid-Dl2sjIMB.js → image-grid-mrG5u9oE.js} +49 -49
  40. package/dist/index.js +1 -1
  41. package/dist/kits/evaluation.js +5 -5
  42. package/dist/kits/interpretability.js +320 -302
  43. package/dist/kits/operations.js +6 -6
  44. package/dist/kits/research.js +558 -0
  45. package/dist/kits/training.js +6 -6
  46. package/dist/layout.js +205 -110
  47. package/dist/lesson/spec.js +11 -11
  48. package/dist/lesson.js +4 -4
  49. package/dist/mdx.js +6 -6
  50. package/dist/navigation.js +2 -2
  51. package/dist/packages/charts/src/cartesian/index.d.ts +1 -1
  52. package/dist/packages/charts/src/cartesian/scatter-plot.d.ts +18 -0
  53. package/dist/packages/charts/src/chart-theme.d.ts +1 -1
  54. package/dist/packages/charts/src/figure/caption-scope.d.ts +12 -0
  55. package/dist/packages/charts/src/figure/figure-frame.d.ts +2 -1
  56. package/dist/packages/charts/src/index.d.ts +2 -0
  57. package/dist/packages/charts/src/plot/plot-surface.d.ts +3 -1
  58. package/dist/packages/collections/src/index.d.ts +1 -1
  59. package/dist/packages/collections/src/metrics.d.ts +9 -1
  60. package/dist/packages/content/src/index.d.ts +2 -0
  61. package/dist/packages/content/src/text-match.d.ts +22 -0
  62. package/dist/packages/core/src/index.d.ts +1 -0
  63. package/dist/packages/core/src/surfaces.d.ts +12 -2
  64. package/dist/packages/forms/src/index.d.ts +2 -0
  65. package/dist/packages/forms/src/token-input.d.ts +24 -0
  66. package/dist/packages/kits/src/interpretability/index.d.ts +1 -1
  67. package/dist/packages/kits/src/interpretability/logit-lens.d.ts +10 -1
  68. package/dist/packages/kits/src/research/finding-card.d.ts +43 -0
  69. package/dist/packages/kits/src/research/index.d.ts +8 -0
  70. package/dist/packages/kits/src/research/milestone-path.d.ts +36 -0
  71. package/dist/packages/kits/src/research/specimen-diff.d.ts +41 -0
  72. package/dist/packages/kits/src/research/work-heartbeat.d.ts +34 -0
  73. package/dist/packages/layout/src/figure-grid.d.ts +8 -0
  74. package/dist/packages/layout/src/index.d.ts +4 -1
  75. package/dist/packages/layout/src/sidebar.d.ts +7 -0
  76. package/dist/packages/layout/src/workbench.d.ts +4 -1
  77. package/dist/packages/teaching/src/article/article-context.d.ts +2 -0
  78. package/dist/packages/teaching/src/article/article-layout.stylex.d.ts +13 -0
  79. package/dist/packages/teaching/src/article/article.d.ts +6 -1
  80. package/dist/packages/teaching/src/article/figure.d.ts +20 -3
  81. package/dist/packages/teaching/src/article/index.d.ts +1 -1
  82. package/dist/packages/teaching/src/article/view-essay.d.ts +2 -1
  83. package/dist/packages/teaching/src/lesson/define-lesson.d.ts +4 -0
  84. package/dist/packages/teaching/src/lesson/index.d.ts +2 -2
  85. package/dist/packages/teaching/src/lesson/lesson-player.d.ts +19 -3
  86. package/dist/packages/teaching/src/lesson/lesson-store.d.ts +2 -0
  87. package/dist/packages/teaching/src/lesson/playback.d.ts +9 -6
  88. package/dist/packages/teaching/src/lesson/use-lesson.d.ts +7 -2
  89. package/dist/packages/teaching/src/scene/plane/plane-labels.d.ts +4 -1
  90. package/dist/packages/teaching/src/scene/plane/scene-point.d.ts +5 -6
  91. package/dist/packages/teaching/src/scene/scene-geometry.d.ts +1 -1
  92. package/dist/packages/teaching/src/scene/scene-node.d.ts +4 -1
  93. package/dist/packages/teaching/src/scene/scene-validate.d.ts +6 -0
  94. package/dist/packages/teaching/src/scene/scene-wire.d.ts +6 -1
  95. package/dist/packages/teaching/src/scene/scene.d.ts +1 -1
  96. package/dist/packages/teaching/src/scene/shapes/cell-grid.d.ts +5 -1
  97. package/dist/packages/teaching/src/scene/shapes/scene-cells.d.ts +1 -1
  98. package/dist/packages/teaching/src/scene/shapes/scene-slot.d.ts +1 -1
  99. package/dist/packages/teaching/src/time/tween.d.ts +2 -0
  100. package/dist/{param-CqKUTHaO.js → param-BdqTpZER.js} +175 -108
  101. package/dist/{pierre-diff-DlvjyuJn.js → pierre-diff-aGyQK5xK.js} +1 -1
  102. package/dist/{plot-axes-DJkLW4wk.js → plot-axes-D5S9BnBa.js} +1 -1
  103. package/dist/{plot-layout-CZVSJ-le.js → plot-layout-B2xRt-_k.js} +146 -132
  104. package/dist/{plot-marks-uozcbOIX.js → plot-marks-FVsbFkUs.js} +3 -3
  105. package/dist/{plot-surface-CbVBvgqZ.js → plot-surface-0cKFwtws.js} +11 -11
  106. package/dist/{plot-width-DcqtSgzb.js → plot-width-D3hTycYX.js} +1 -1
  107. package/dist/{reference-lines-BDcttOp0.js → reference-lines-nSxcZVF5.js} +2 -2
  108. package/dist/{scene-0z2gbaDE.js → scene-BwJKueD6.js} +1228 -1126
  109. package/dist/scene.js +1 -1
  110. package/dist/{slope-chart-BKVEAVCs.js → slope-chart-CGTYbFxi.js} +182 -182
  111. package/dist/{src-CpdJlDhO.js → src-9EJskqB_.js} +73 -31
  112. package/dist/{src-Dcfq8vE4.js → src-B2rgpWap.js} +48 -14
  113. package/dist/{src-BPTDJqt0.js → src-Ci8DeY8J.js} +1 -1
  114. package/dist/{src-CGc_hjxJ.js → src-DFW49IAs.js} +143 -111
  115. package/dist/{src-BD6xlvDt.js → src-Dxs3Buo_.js} +203 -137
  116. package/dist/{src-CExIrXPC.js → src-npqwq3Sa.js} +1 -1
  117. package/dist/styles2.css +136 -17
  118. package/dist/{time-series-BgzGNOk0.js → time-series-Dh8y5ba0.js} +1018 -944
  119. package/dist/{token-heatmap-BrW1OsKD.js → token-heatmap-BTrZ3-N4.js} +86 -86
  120. package/dist/{token-predictions-yerq_Oet.js → token-predictions-CUe4junQ.js} +129 -129
  121. package/dist/{transport-BJweqDPj.js → transport-4V9rfYHN.js} +291 -246
  122. package/dist/{tree-diagram-D09BRqE-.js → tree-diagram-Dpqmo-fh.js} +118 -118
  123. package/dist/{treemap-CW4WsJNL.js → treemap-BUSaVD3m.js} +28 -28
  124. package/dist/use-tween-BsaEO862.js +10 -0
  125. package/dist/{violin-plot-DrtPZ1-T.js → violin-plot-BxaLwdRi.js} +126 -126
  126. package/dist/{waterfall-DYLSnGjm.js → waterfall-CcDMdKec.js} +43 -43
  127. package/package.json +5 -1
  128. package/recipes/counting-cards.tsx +3 -3
  129. package/skills/review-explainer/SKILL.md +2 -1
  130. package/skills/upgrade-elements/references/releases.md +61 -0
  131. package/skills/use-elements/SKILL.md +3 -1
  132. package/skills/use-elements/references/kits.md +7 -6
  133. package/skills/use-elements/references/styling.md +23 -0
  134. package/skills/use-elements/references/teaching.md +13 -0
  135. package/skills/write-explainer/references/article.md +50 -2
  136. package/skills/write-explainer/references/lesson.md +18 -9
  137. package/skills/write-explainer/references/scene-parts.md +17 -12
  138. package/skills/write-explainer/references/scene.md +25 -3
  139. package/dist/figure-frame-BJ3REgTA.js +0 -270
  140. package/dist/use-tween-5HZ55_9d.js +0 -72
@@ -1,11 +1,11 @@
1
- import { a as e } from "../dumbbell-plot-DQdTxDeO.js";
1
+ import { a as e } from "../dumbbell-plot-B-Tn7ewW.js";
2
2
  import { r as t } from "../figure-format-B8kRZMlo.js";
3
3
  import { t as n } from "../tone-scope-DKiSw-JR.js";
4
- import { c as r, i, o as a, s as o } from "../src-CpdJlDhO.js";
5
- import { m as s } from "../src-CExIrXPC.js";
6
- import { n as c } from "../waterfall-DYLSnGjm.js";
7
- import { r as l, s as u } from "../time-series-BgzGNOk0.js";
8
- import { i as d, r as f } from "../src-Dcfq8vE4.js";
4
+ import { c as r, i, o as a, s as o } from "../src-9EJskqB_.js";
5
+ import { m as s } from "../src-npqwq3Sa.js";
6
+ import { n as c } from "../waterfall-CcDMdKec.js";
7
+ import { r as l, s as u } from "../time-series-Dh8y5ba0.js";
8
+ import { i as d, r as f } from "../src-B2rgpWap.js";
9
9
  import "@stylexjs/stylex";
10
10
  import { useId as p } from "react";
11
11
  import { jsx as m, jsxs as h } from "react/jsx-runtime";
@@ -0,0 +1,558 @@
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";
11
+ // packages/kits/src/research/finding-card.tsx
12
+ var C = {
13
+ limitation: "Limitation",
14
+ details: "Full notes & evidence",
15
+ sources: "Sources",
16
+ statusLabels: {
17
+ supported: "Supported",
18
+ mixed: "Mixed",
19
+ falsified: "Falsified",
20
+ open: "Open"
21
+ }
22
+ }, w = {
23
+ supported: "positive",
24
+ mixed: "warning",
25
+ falsified: "negative",
26
+ open: "neutral"
27
+ };
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,
32
+ statusLabels: {
33
+ ...C.statusLabels,
34
+ ...D?.statusLabels
35
+ }
36
+ };
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, {
45
+ shouldSpaceBetween: !0,
46
+ children: [/* @__PURE__ */ S(s, { children: [v !== void 0 && /* @__PURE__ */ x(a, {
47
+ variant: "caption",
48
+ 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, {
54
+ variant: "caption",
55
+ 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, {
58
+ href: e.href,
59
+ children: /* @__PURE__ */ x(u, { children: e.label })
60
+ }), /* @__PURE__ */ x(p.Popup, { children: /* @__PURE__ */ S(o, {
61
+ isCompact: !0,
62
+ children: [/* @__PURE__ */ x(a, { children: e.label }), /* @__PURE__ */ x(a, {
63
+ variant: "caption",
64
+ tone: "muted",
65
+ children: e.summary
66
+ })]
67
+ }) })] }, e.id) : /* @__PURE__ */ x(u, { children: e.label }, e.id))] })]
68
+ }) : void 0,
69
+ children: /* @__PURE__ */ S(o, {
70
+ isCompact: !0,
71
+ 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",
75
+ children: [
76
+ t.label,
77
+ ": ",
78
+ e({
79
+ value: t.value,
80
+ locale: i,
81
+ format: t.format
82
+ })
83
+ ]
84
+ }, t.label)) }),
85
+ h !== void 0 && /* @__PURE__ */ S(a, {
86
+ variant: "caption",
87
+ tone: "muted",
88
+ children: [
89
+ O.limitation,
90
+ ": ",
91
+ h
92
+ ]
93
+ }),
94
+ T !== void 0 && /* @__PURE__ */ S(f.Root, { children: [/* @__PURE__ */ x(f.Trigger, {
95
+ variant: "inline",
96
+ children: O.details
97
+ }), /* @__PURE__ */ x(f.Panel, { children: T })] })
98
+ ]
99
+ })
100
+ });
101
+ }
102
+ // packages/kits/src/research/milestone-path.tsx
103
+ var E = {
104
+ baseline: "series5",
105
+ result: "series1",
106
+ breakthrough: "positive",
107
+ counterexample: "negative",
108
+ decision: "series3"
109
+ }, D = {
110
+ baseline: "neutral",
111
+ result: "neutral",
112
+ breakthrough: "positive",
113
+ counterexample: "negative",
114
+ decision: "warning"
115
+ }, O = {
116
+ metric: "Measured score",
117
+ delta: "Change",
118
+ limitation: "Limitation",
119
+ source: "Evidence",
120
+ selectHint: "Select any milestone node to inspect its claim, delta, and limitation.",
121
+ empty: "No research milestones recorded yet.",
122
+ kinds: {
123
+ baseline: "Baseline",
124
+ result: "Result",
125
+ breakthrough: "Breakthrough",
126
+ counterexample: "Falsified",
127
+ decision: "Decision"
128
+ }
129
+ };
130
+ function k({ milestones: t, valueLabel: n, valueFormat: i, deltaFormat: c, selected: u, onSelectedChange: f, labels: p, ..._ }) {
131
+ let v = {
132
+ ...O,
133
+ ...p,
134
+ kinds: {
135
+ ...O.kinds,
136
+ ...p?.kinds
137
+ }
138
+ };
139
+ if (t.length === 0) return /* @__PURE__ */ x(g, {
140
+ title: _.title,
141
+ children: v.empty
142
+ });
143
+ if (new Set(t.map((e) => e.id)).size !== t.length) return /* @__PURE__ */ x(h, {
144
+ hasError: !0,
145
+ children: "Milestones must have unique identifiers."
146
+ });
147
+ if (t.filter((e) => e.parentId === null).length !== 1) return /* @__PURE__ */ x(h, {
148
+ hasError: !0,
149
+ children: "MilestonePath requires exactly one root milestone (parentId: null)."
150
+ });
151
+ let y = t.map((e) => ({
152
+ id: e.id,
153
+ parentId: e.parentId,
154
+ label: e.label,
155
+ detail: e.wave === void 0 ? v.kinds[e.kind] : `${e.wave} · ${v.kinds[e.kind]}`,
156
+ value: e.metric ?? null,
157
+ tone: E[e.kind]
158
+ })), b = Array.from(new Set(t.map((e) => e.kind))).map((e) => ({
159
+ 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, {
164
+ 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
+ });
217
+ }
218
+ // packages/kits/src/research/specimen-diff.tsx
219
+ var A = {
220
+ breakdownTitle: "Paired outcome flips",
221
+ all: "All",
222
+ gained: "Gained",
223
+ regressed: "Regressed",
224
+ bothPass: "Both pass",
225
+ bothFail: "Both fail",
226
+ specimen: "Specimen",
227
+ expected: "Expected",
228
+ baseline: "Baseline",
229
+ candidate: "Candidate",
230
+ outcome: "Outcome",
231
+ empty: "No paired specimens available for these two runs."
232
+ }, j = {
233
+ gained: "positive",
234
+ regressed: "negative",
235
+ both_pass: "neutral",
236
+ both_fail: "neutral"
237
+ }, M = /* @__PURE__ */ new Set([
238
+ "gained",
239
+ "regressed",
240
+ "both_pass",
241
+ "both_fail"
242
+ ]);
243
+ function N(e) {
244
+ return e !== null && M.has(e);
245
+ }
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
250
+ };
251
+ if (e.length === 0) return /* @__PURE__ */ x(g, {
252
+ title: p.title,
253
+ children: m.empty
254
+ });
255
+ let h = {
256
+ gained: 0,
257
+ regressed: 0,
258
+ both_pass: 0,
259
+ both_fail: 0
260
+ };
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 = [
268
+ {
269
+ id: "specimen",
270
+ label: m.specimen,
271
+ role: "primary",
272
+ cell: (e) => /* @__PURE__ */ x(t, {
273
+ secondary: e.family,
274
+ children: e.prompt
275
+ })
276
+ },
277
+ {
278
+ id: "expected",
279
+ label: m.expected,
280
+ role: "text",
281
+ cell: (e) => /* @__PURE__ */ x(u, { children: e.expected })
282
+ },
283
+ {
284
+ id: "baseline",
285
+ label: n.trim() === "" ? m.baseline : n,
286
+ role: "text",
287
+ isSecondary: !0,
288
+ cell: (e) => /* @__PURE__ */ x(a, {
289
+ variant: "mono",
290
+ children: /* @__PURE__ */ x(y, {
291
+ text: e.baselineOutput,
292
+ query: e.expected,
293
+ tone: "accent"
294
+ })
295
+ })
296
+ },
297
+ {
298
+ id: "candidate",
299
+ label: r.trim() === "" ? m.candidate : r,
300
+ role: "text",
301
+ cell: (e) => /* @__PURE__ */ x(a, {
302
+ variant: "mono",
303
+ children: /* @__PURE__ */ x(y, {
304
+ text: e.candidateOutput,
305
+ query: e.expected,
306
+ tone: "accent"
307
+ })
308
+ })
309
+ },
310
+ {
311
+ id: "outcome",
312
+ label: m.outcome,
313
+ role: "status",
314
+ cell: (e) => /* @__PURE__ */ x(d, {
315
+ tone: j[e.outcome],
316
+ children: C[e.outcome]
317
+ })
318
+ }
319
+ ];
320
+ return /* @__PURE__ */ S(o, {
321
+ isCompact: !0,
322
+ 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,
329
+ total: e.length,
330
+ valueFormat: { maximumFractionDigits: 0 },
331
+ items: [
332
+ {
333
+ id: "gained",
334
+ label: m.gained,
335
+ value: h.gained,
336
+ tone: "positive"
337
+ },
338
+ {
339
+ id: "both_pass",
340
+ label: m.bothPass,
341
+ value: h.both_pass,
342
+ tone: "series1"
343
+ },
344
+ {
345
+ id: "regressed",
346
+ label: m.regressed,
347
+ value: h.regressed,
348
+ tone: "negative"
349
+ },
350
+ {
351
+ id: "both_fail",
352
+ label: m.bothFail,
353
+ value: h.both_fail,
354
+ tone: "series5"
355
+ }
356
+ ],
357
+ selected: s === "all" ? null : s,
358
+ onSelectedChange: (e) => {
359
+ N(e) ? c(e === s ? "all" : e) : c("all");
360
+ }
361
+ }),
362
+ /* @__PURE__ */ S(b.Root, {
363
+ "aria-label": m.outcome,
364
+ value: s,
365
+ onValueChange: (e) => {
366
+ c(e);
367
+ },
368
+ children: [
369
+ /* @__PURE__ */ S(b.Item, {
370
+ value: "all",
371
+ children: [
372
+ m.all,
373
+ " (",
374
+ e.length,
375
+ ")"
376
+ ]
377
+ }),
378
+ /* @__PURE__ */ S(b.Item, {
379
+ value: "gained",
380
+ children: [
381
+ m.gained,
382
+ " (",
383
+ h.gained,
384
+ ")"
385
+ ]
386
+ }),
387
+ /* @__PURE__ */ S(b.Item, {
388
+ value: "regressed",
389
+ children: [
390
+ m.regressed,
391
+ " (",
392
+ h.regressed,
393
+ ")"
394
+ ]
395
+ }),
396
+ /* @__PURE__ */ S(b.Item, {
397
+ value: "both_pass",
398
+ children: [
399
+ m.bothPass,
400
+ " (",
401
+ h.both_pass,
402
+ ")"
403
+ ]
404
+ }),
405
+ /* @__PURE__ */ S(b.Item, {
406
+ value: "both_fail",
407
+ children: [
408
+ m.bothFail,
409
+ " (",
410
+ h.both_fail,
411
+ ")"
412
+ ]
413
+ })
414
+ ]
415
+ }),
416
+ /* @__PURE__ */ x(i, {
417
+ caption: p.title,
418
+ hideCaption: !0,
419
+ columns: w,
420
+ rows: _,
421
+ getRowId: (e) => e.id,
422
+ ...l !== void 0 && { rowAction: {
423
+ label: (e) => `Inspect ${e.id}`,
424
+ onActivate: l
425
+ } },
426
+ query: {
427
+ mode: "local",
428
+ search: (e) => `${e.prompt} ${e.expected} ${e.baselineOutput} ${e.candidateOutput} ${e.family}`,
429
+ filters: [{
430
+ id: "family",
431
+ label: "Family",
432
+ value: (e) => e.family
433
+ }]
434
+ },
435
+ empty: m.empty,
436
+ filteredEmpty: "No specimens match the current filter."
437
+ })
438
+ ]
439
+ });
440
+ }
441
+ // packages/kits/src/research/work-heartbeat.tsx
442
+ var F = {
443
+ title: "Active work reports",
444
+ empty: "No active or recent work reports.",
445
+ nextCheckpoint: "Next checkpoint",
446
+ states: {
447
+ running: "Running",
448
+ completed: "Completed",
449
+ blocked: "Blocked",
450
+ overdue: "Update overdue",
451
+ stopped: "Stopped"
452
+ }
453
+ }, I = {
454
+ running: "positive",
455
+ completed: "neutral",
456
+ blocked: "negative",
457
+ overdue: "warning",
458
+ stopped: "neutral"
459
+ };
460
+ function L(e) {
461
+ return e === void 0 ? null : Number.isFinite(e.completed) && Number.isFinite(e.total) && e.total > 0 ? e : null;
462
+ }
463
+ function R({ reports: t, locale: r, title: i, labels: f }) {
464
+ let p = {
465
+ ...F,
466
+ ...f,
467
+ states: {
468
+ ...F.states,
469
+ ...f?.states
470
+ }
471
+ };
472
+ return t.length === 0 ? /* @__PURE__ */ x(l, {
473
+ title: i ?? p.title,
474
+ children: /* @__PURE__ */ x(a, {
475
+ variant: "caption",
476
+ tone: "muted",
477
+ children: p.empty
478
+ })
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, {
495
+ isCompact: !0,
496
+ children: [/* @__PURE__ */ S(s, {
497
+ shouldSpaceBetween: !0,
498
+ children: [/* @__PURE__ */ S(a, {
499
+ variant: "caption",
500
+ tone: "muted",
501
+ children: [
502
+ e({
503
+ value: i.completed,
504
+ locale: r,
505
+ format: { maximumFractionDigits: 0 }
506
+ }),
507
+ " /",
508
+ " ",
509
+ e({
510
+ value: i.total,
511
+ locale: r,
512
+ format: { maximumFractionDigits: 0 }
513
+ }),
514
+ " ",
515
+ i.unit
516
+ ]
517
+ }), /* @__PURE__ */ x(d, {
518
+ tone: "neutral",
519
+ children: e({
520
+ value: f / 100,
521
+ locale: r,
522
+ format: {
523
+ style: "percent",
524
+ maximumFractionDigits: 0
525
+ }
526
+ })
527
+ })]
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,
535
+ format: {
536
+ style: "percent",
537
+ maximumFractionDigits: 0
538
+ }
539
+ })
540
+ })]
541
+ }), /* @__PURE__ */ S(s, {
542
+ shouldSpaceBetween: !0,
543
+ children: [t.nextCheckpoint !== void 0 && /* @__PURE__ */ S(a, {
544
+ variant: "caption",
545
+ tone: "muted",
546
+ children: [
547
+ p.nextCheckpoint,
548
+ ": ",
549
+ t.nextCheckpoint
550
+ ]
551
+ }), t.executionRef !== void 0 && /* @__PURE__ */ x(u, { children: t.executionRef })]
552
+ })]
553
+ })
554
+ }, t.id);
555
+ })
556
+ });
557
+ }
558
+ export { T as FindingCard, k as MilestonePath, P as SpecimenDiff, R as WorkHeartbeat };
@@ -1,12 +1,12 @@
1
1
  import { t as e } from "../src-DIS0YOj0.js";
2
2
  import { i as t, t as n } from "../tone-scope-DKiSw-JR.js";
3
- import { r, s as i } from "../slope-chart-BKVEAVCs.js";
4
- import { m as a } from "../src-CExIrXPC.js";
5
- import { C as o } from "../plot-layout-CZVSJ-le.js";
6
- import { o as s, t as c } from "../cells-xVmnQ9oQ.js";
3
+ import { r, s as i } from "../slope-chart-CGTYbFxi.js";
4
+ import { m as a } from "../src-npqwq3Sa.js";
5
+ import { T as o } from "../plot-layout-B2xRt-_k.js";
6
+ import { o as s, t as c } from "../cells-CNZE4us2.js";
7
7
  import { r as l } from "../figure-format-B8kRZMlo.js";
8
- import { d as u, g as d, u as f } from "../src-Dcfq8vE4.js";
9
- import { c as p, o as m } from "../src-CpdJlDhO.js";
8
+ import { d as u, g as d, u as f } from "../src-B2rgpWap.js";
9
+ import { c as p, o as m } from "../src-9EJskqB_.js";
10
10
  import "@stylexjs/stylex";
11
11
  import { useState as h } from "react";
12
12
  import { jsx as g, jsxs as _ } from "react/jsx-runtime";