@mechane-ai/elements 0.64.0 → 0.67.0

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