@mechane-ai/elements 0.51.0 → 0.52.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 (62) hide show
  1. package/dist/ai.js +169 -169
  2. package/dist/{article-CRlhq9oA.js → article-BDVuehRt.js} +1 -1
  3. package/dist/article.js +1 -1
  4. package/dist/catalog.json +42 -1
  5. package/dist/{categorical-values-BYP_R5gS.js → categorical-values-BoS03HcI.js} +1 -1
  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 -13
  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 +3 -3
  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 +2 -2
  20. package/dist/collections.js +1 -1
  21. package/dist/content/markdown.js +1 -278
  22. package/dist/{dates-ckJdYF7t.js → dates-CjlTzw00.js} +1 -1
  23. package/dist/{dumbbell-plot-BC8d_IJy.js → dumbbell-plot-Xxl6P7D1.js} +3 -3
  24. package/dist/{embedding-map-Bj8krO-d.js → embedding-map-tU8hT_aC.js} +3 -3
  25. package/dist/{figure-frame-koVKcXph.js → figure-frame-BKc9TvtX.js} +1 -1
  26. package/dist/forms/dates.js +1 -1
  27. package/dist/{image-grid-CLhol2jy.js → image-grid-BZy2lkNb.js} +2 -2
  28. package/dist/kits/evaluation.js +4 -4
  29. package/dist/kits/interpretability.js +7 -7
  30. package/dist/kits/operations.js +4 -4
  31. package/dist/kits/research.js +463 -183
  32. package/dist/kits/training.js +3 -3
  33. package/dist/markdown-VpLw_P9T.js +313 -0
  34. package/dist/mdx.js +2 -2
  35. package/dist/packages/charts/src/graph/tree-diagram.d.ts +1 -1
  36. package/dist/packages/charts/src/plot/plot-layout.d.ts +0 -6
  37. package/dist/packages/charts/src/timeline/event-strip.d.ts +12 -2
  38. package/dist/packages/charts/src/timeline/index.d.ts +1 -1
  39. package/dist/packages/collections/src/metrics.d.ts +5 -11
  40. package/dist/packages/content/src/markdown/markdown.d.ts +8 -1
  41. package/dist/packages/kits/src/research/collection-page.d.ts +9 -0
  42. package/dist/packages/kits/src/research/index.d.ts +3 -1
  43. package/dist/packages/kits/src/research/lineage-graph.d.ts +40 -0
  44. package/dist/{plot-layout-B2xRt-_k.js → plot-layout-D8j-ozGR.js} +102 -86
  45. package/dist/{plot-surface-0cKFwtws.js → plot-surface-5e3xeiub.js} +1 -1
  46. package/dist/{reference-lines-nSxcZVF5.js → reference-lines-1FttCg46.js} +1 -1
  47. package/dist/{scene-4ePpWdmE.js → scene-8F-fQksU.js} +4 -4
  48. package/dist/scene.js +1 -1
  49. package/dist/{slope-chart-DWZIYDty.js → slope-chart-B35ZfaYn.js} +4 -4
  50. package/dist/{src-DNclWY4V.js → src-fvoTU3Bq.js} +377 -377
  51. package/dist/{time-series-CsngFxr1.js → time-series-DoFMGmFV.js} +612 -590
  52. package/dist/{token-heatmap-BQLIxPky.js → token-heatmap-DLPQWwMv.js} +3 -3
  53. package/dist/{token-predictions-C3B5L-eO.js → token-predictions-D_Jwf8Aw.js} +3 -3
  54. package/dist/{tree-diagram-Dau9jeXS.js → tree-diagram-DreDBCvt.js} +4 -4
  55. package/dist/{treemap-DWrMQndu.js → treemap-MVX-wa4t.js} +4 -4
  56. package/dist/{violin-plot-D05ODcyc.js → violin-plot-Bi71NqXF.js} +3 -3
  57. package/dist/waterfall-8y8ANO3c.js +605 -0
  58. package/package.json +1 -1
  59. package/recipes/calendar-workspace.tsx +39 -0
  60. package/skills/use-elements/references/workspace.md +8 -6
  61. package/dist/visible-motion-1GcUaEi4.js +0 -23
  62. package/dist/waterfall-BkLLv2Lm.js +0 -576
@@ -1,11 +1,11 @@
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-DWZIYDty.js";
3
+ import { r, s as i } from "../slope-chart-B35ZfaYn.js";
4
4
  import { m as a } from "../src-npqwq3Sa.js";
5
- import { T as o } from "../plot-layout-B2xRt-_k.js";
5
+ import { T as o } from "../plot-layout-D8j-ozGR.js";
6
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-DNclWY4V.js";
8
+ import { d as u, g as d, u as f } from "../src-fvoTU3Bq.js";
9
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";
@@ -0,0 +1,313 @@
1
+ import { t as e } from "./use-scroll-tab-index-Dxpdh4W7.js";
2
+ import { t } from "./code-block-BZsY2sh3.js";
3
+ import { n, t as r } from "./content-link-PnpcnTCx.js";
4
+ import { t as i } from "./viewer-styles-DsFYri4K.js";
5
+ import * as a from "@stylexjs/stylex";
6
+ import { Children as o, createContext as s, createElement as c, memo as l, useContext as u, useEffect as d, useMemo as f, useRef as p, useState as m } from "react";
7
+ import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
8
+ import { Block as v, Streamdown as y, defaultRehypePlugins as b, defaultRemarkPlugins as x, useIsCodeFenceIncomplete as S } from "streamdown";
9
+ // packages/foundations/src/visible-motion.ts
10
+ function C(e) {
11
+ let t = p(null), [n, r] = m(!1);
12
+ return d(() => {
13
+ let n = t.current;
14
+ if (!e || n === null) return;
15
+ let i = matchMedia("(prefers-reduced-motion: reduce)"), a = !1;
16
+ function o() {
17
+ r(a && !document.hidden && !i.matches);
18
+ }
19
+ let s = new IntersectionObserver((e) => {
20
+ a = e.some((e) => e.isIntersecting), o();
21
+ });
22
+ return s.observe(n), i.addEventListener("change", o), document.addEventListener("visibilitychange", o), () => {
23
+ s.disconnect(), i.removeEventListener("change", o), document.removeEventListener("visibilitychange", o);
24
+ };
25
+ }, [e]), {
26
+ ref: t,
27
+ isActive: e && n
28
+ };
29
+ }
30
+ // packages/content/src/markdown/markdown-options.ts
31
+ var w = /* @__PURE__ */ new Set(["href", "src"]), T = {
32
+ rehypePlugins: Object.entries(b).filter(([e]) => e === "sanitize").map(([, e]) => e),
33
+ remarkPlugins: Object.values(x),
34
+ skipHtml: !0,
35
+ urlTransform: (e, t) => {
36
+ if (w.has(t)) return n(e);
37
+ }
38
+ }, E = {
39
+ root: {
40
+ k7Eaqz: "xeuugli",
41
+ kMwMTN: "xbixft",
42
+ kMv6JI: "x1hz01jw",
43
+ khiITx: "xvmahel",
44
+ kGuDYH: "xtqrqnz",
45
+ kLWn49: "x1ytb0s6",
46
+ k63SB2: "xj57cvi",
47
+ kHjlTd: "xj0a0fe",
48
+ $$css: !0
49
+ },
50
+ block: {
51
+ keoZOQ: "xyrmp21 x14l7nz5",
52
+ k1K539: "x1jfksii xzboxd6",
53
+ $$css: !0
54
+ },
55
+ heading: {
56
+ keoZOQ: "x1m1vpj6 x14l7nz5",
57
+ k1K539: "x1jfksii xzboxd6",
58
+ k63SB2: "x1b5ytql",
59
+ $$css: !0
60
+ },
61
+ title: {
62
+ kGuDYH: "x1i2cqwi",
63
+ kLWn49: "x4fansv",
64
+ $$css: !0
65
+ },
66
+ section: {
67
+ kGuDYH: "x12myhf4",
68
+ kLWn49: "x1778rvt",
69
+ $$css: !0
70
+ },
71
+ minor: {
72
+ kGuDYH: "xtqrqnz",
73
+ kLWn49: "x1778rvt",
74
+ $$css: !0
75
+ },
76
+ tableRegion: {
77
+ k7Eaqz: "xeuugli",
78
+ ks0D6T: "x193iq5w",
79
+ kXHlph: "xw2csxc",
80
+ kMzoRj: "xmkeg23",
81
+ kt9PQ7: "x1qhh985",
82
+ ksu8eU: "x1y0btm7",
83
+ kVAM5u: "x1ey3b81",
84
+ $$css: !0
85
+ },
86
+ strong: {
87
+ k63SB2: "x1b5ytql",
88
+ $$css: !0
89
+ },
90
+ muted: {
91
+ kMwMTN: "x153jb6y",
92
+ $$css: !0
93
+ }
94
+ }, D = {
95
+ default: null,
96
+ muted: E.muted
97
+ }, O = {
98
+ regular: null,
99
+ strong: E.strong
100
+ }, k = s(1), A = {
101
+ animation: "fadeIn",
102
+ duration: 160,
103
+ stagger: 14,
104
+ maxBacklogMs: 100
105
+ }, j = /* @__PURE__ */ new Set(["string", "number"]);
106
+ function M(e) {
107
+ return j.has(typeof e);
108
+ }
109
+ function N({ children: e, className: n }) {
110
+ let r = S(), i = typeof n == "string" ? /(?:^|\s)language-([^\s]+)/u.exec(n) : null, a = i === null ? void 0 : i[1], s = o.toArray(e);
111
+ return s.every(M) ? /* @__PURE__ */ g("div", {
112
+ className: "xyrmp21 x14l7nz5 x1jfksii xzboxd6",
113
+ children: /* @__PURE__ */ g(t, {
114
+ code: s.join(""),
115
+ language: a,
116
+ isStreaming: r
117
+ })
118
+ }) : /* @__PURE__ */ g("code", {
119
+ className: "xiard35 xy8obcc x1r7kqkb x1ok0vyi x10dazmo x14w6jbu x17etxam",
120
+ children: e
121
+ });
122
+ }
123
+ function P({ level: e, children: t, id: n }) {
124
+ let r = u(k), i = `h${Math.min(e + r - 1, 6)}`, o = e === 1 ? E.title : e === 2 ? E.section : E.minor;
125
+ return c(i, {
126
+ id: n,
127
+ ...a.props(E.heading, o)
128
+ }, t);
129
+ }
130
+ function F({ children: t }) {
131
+ let n = e();
132
+ return /* @__PURE__ */ g("div", {
133
+ ref: n.ref,
134
+ role: "region",
135
+ "aria-label": "Markdown table",
136
+ tabIndex: n.tabIndex,
137
+ ...a.props(i.scrollRegion, E.block, E.tableRegion),
138
+ children: /* @__PURE__ */ g("table", {
139
+ className: "xh8yej3 x1mwwwfo xss6m8b x1yc453h x1h4wwuj x1778rvt",
140
+ children: t
141
+ })
142
+ });
143
+ }
144
+ var I = s(void 0);
145
+ function L(e) {
146
+ let t = u(I);
147
+ return t === void 0 ? /* @__PURE__ */ g(r, {
148
+ href: e.href,
149
+ title: e.title,
150
+ children: e.children
151
+ }) : t(e);
152
+ }
153
+ var R = {
154
+ h1: (e) => /* @__PURE__ */ g(P, {
155
+ ...e,
156
+ level: 1
157
+ }),
158
+ h2: (e) => /* @__PURE__ */ g(P, {
159
+ ...e,
160
+ level: 2
161
+ }),
162
+ h3: (e) => /* @__PURE__ */ g(P, {
163
+ ...e,
164
+ level: 3
165
+ }),
166
+ h4: (e) => /* @__PURE__ */ g(P, {
167
+ ...e,
168
+ level: 4
169
+ }),
170
+ h5: (e) => /* @__PURE__ */ g(P, {
171
+ ...e,
172
+ level: 5
173
+ }),
174
+ h6: (e) => /* @__PURE__ */ g(P, {
175
+ ...e,
176
+ level: 6
177
+ }),
178
+ p: ({ children: e }) => /* @__PURE__ */ g("p", {
179
+ className: "xyrmp21 x14l7nz5 x1jfksii xzboxd6",
180
+ children: e
181
+ }),
182
+ ul: ({ children: e }) => /* @__PURE__ */ g("ul", {
183
+ className: "xyrmp21 x14l7nz5 x1jfksii xzboxd6 x1sbza1b",
184
+ children: e
185
+ }),
186
+ ol: ({ children: e, start: t }) => /* @__PURE__ */ g("ol", {
187
+ start: t,
188
+ className: "xyrmp21 x14l7nz5 x1jfksii xzboxd6 x1sbza1b",
189
+ children: e
190
+ }),
191
+ li: ({ children: e }) => /* @__PURE__ */ g("li", {
192
+ className: "x1vblts3 xnkn1qj",
193
+ children: e
194
+ }),
195
+ blockquote: ({ children: e }) => /* @__PURE__ */ g("blockquote", {
196
+ className: "xyrmp21 x14l7nz5 x1jfksii xzboxd6 xrxpjvj x1umj4g3 xyumdvf x1t7ytsu x97x49r x153jb6y",
197
+ children: e
198
+ }),
199
+ code: ({ children: e, className: t }) => /* @__PURE__ */ g(N, {
200
+ className: t,
201
+ children: e
202
+ }),
203
+ inlineCode: ({ children: e }) => /* @__PURE__ */ g("code", {
204
+ className: "xiard35 xy8obcc x1r7kqkb x1ok0vyi x10dazmo x14w6jbu x17etxam",
205
+ children: e
206
+ }),
207
+ a: ({ href: e, children: t, title: n }) => /* @__PURE__ */ g(L, {
208
+ kind: "link",
209
+ href: e,
210
+ title: n,
211
+ children: t
212
+ }),
213
+ img: ({ src: e, alt: t, title: n }) => /* @__PURE__ */ g(L, {
214
+ kind: "image",
215
+ href: typeof e == "string" ? e : void 0,
216
+ title: n,
217
+ children: t !== void 0 && t.length > 0 ? `Open image: ${t}` : "Open image"
218
+ }),
219
+ table: ({ children: e }) => /* @__PURE__ */ g(F, { children: e }),
220
+ thead: ({ children: e }) => /* @__PURE__ */ g("thead", { children: e }),
221
+ tbody: ({ children: e }) => /* @__PURE__ */ g("tbody", { children: e }),
222
+ tr: ({ children: e }) => /* @__PURE__ */ g("tr", { children: e }),
223
+ th: ({ children: e }) => /* @__PURE__ */ g("th", {
224
+ scope: "col",
225
+ className: "xn9t2bk x1doqdfy xso031l x1q0q8m5 x1qndepd x16dsc37 x1yc453h x153jb6y xk4h15q x1r7kqkb",
226
+ children: e
227
+ }),
228
+ td: ({ children: e }) => /* @__PURE__ */ g("td", {
229
+ className: "xn9t2bk x1doqdfy xso031l x1q0q8m5 x1qndepd x16dsc37 x1yc453h",
230
+ children: e
231
+ }),
232
+ input: ({ checked: e }) => /* @__PURE__ */ g("input", {
233
+ type: "checkbox",
234
+ checked: e ?? !1,
235
+ disabled: !0,
236
+ "aria-label": "Task item",
237
+ className: "x1bzlxqo x6e7ywc"
238
+ }),
239
+ hr: () => /* @__PURE__ */ g("hr", { className: "xhff0hu xc342km x178xt8z x13fuv20 xhjagg4" }),
240
+ strong: ({ children: e }) => /* @__PURE__ */ g("strong", {
241
+ className: "x1b5ytql",
242
+ children: e
243
+ }),
244
+ em: ({ children: e }) => /* @__PURE__ */ g("em", {
245
+ className: "x1k4tb9n",
246
+ children: e
247
+ }),
248
+ del: ({ children: e }) => /* @__PURE__ */ g("del", {
249
+ className: "x5lhwog",
250
+ children: e
251
+ })
252
+ }, z = /* @__PURE__ */ "p.span.h1.h2.h3.h4.h5.h6.ul.ol.li.blockquote.pre.code.a.img.table.thead.tbody.tr.th.td.input.hr.strong.em.del.br.sup.sub.section".split("."), B = l(({ children: e, isStreaming: t = !1, label: n, headingLevel: r = 1, tone: i = "default", weight: o = "regular", renderLink: s, remarkPlugins: c }) => {
253
+ let { ref: l, isActive: u } = C(t), d = f(() => [...T.remarkPlugins ?? [], ...c ?? []], [c]);
254
+ return /* @__PURE__ */ g(I, {
255
+ value: s,
256
+ children: /* @__PURE__ */ g(k, {
257
+ value: r,
258
+ children: /* @__PURE__ */ g("div", {
259
+ ref: l,
260
+ "data-streamdown-paused": t && !u ? "" : void 0,
261
+ children: /* @__PURE__ */ g(y, {
262
+ ...T,
263
+ remarkPlugins: d,
264
+ ...a.props(E.root, D[i], O[o]),
265
+ "aria-label": n,
266
+ components: R,
267
+ mode: t ? "streaming" : "static",
268
+ isAnimating: t,
269
+ animated: t ? A : !1,
270
+ controls: !1,
271
+ linkSafety: { enabled: !1 },
272
+ allowedElements: z,
273
+ children: e
274
+ })
275
+ })
276
+ })
277
+ });
278
+ });
279
+ // packages/content/src/markdown/markdown-preview.tsx
280
+ function V({ children: e }) {
281
+ return /* @__PURE__ */ _(h, { children: [e, " "] });
282
+ }
283
+ var H = {
284
+ p: V,
285
+ li: V,
286
+ h1: V,
287
+ h2: V,
288
+ h3: V,
289
+ h4: V,
290
+ h5: V,
291
+ h6: V,
292
+ blockquote: V,
293
+ pre: V,
294
+ code: ({ children: e }) => /* @__PURE__ */ g(h, { children: e }),
295
+ th: V,
296
+ td: V,
297
+ br: () => /* @__PURE__ */ g(h, { children: " " }),
298
+ img: ({ alt: e }) => /* @__PURE__ */ g(h, { children: e })
299
+ };
300
+ function U({ children: e }) {
301
+ return /* @__PURE__ */ g(v, {
302
+ ...T,
303
+ content: e,
304
+ components: H,
305
+ allowedElements: Object.keys(H),
306
+ unwrapDisallowed: !0,
307
+ shouldParseIncompleteMarkdown: !1,
308
+ shouldNormalizeHtmlIndentation: !1,
309
+ isIncomplete: !1,
310
+ index: 0
311
+ });
312
+ }
313
+ export { B as n, C as r, U as t };
package/dist/mdx.js CHANGED
@@ -1,7 +1,7 @@
1
- import { _ as e, b as t, d as n, f as r, g as i, i as ee, l as a, m as o, n as s, p as te, r as c, t as ne, u as re, v as ie, x as ae, y as oe } from "./article-CRlhq9oA.js";
1
+ import { _ as e, b as t, d as n, f as r, g as i, i as ee, l as a, m as o, n as s, p as te, r as c, t as ne, u as re, v as ie, x as ae, y as oe } from "./article-BDVuehRt.js";
2
2
  import { n as se, t as ce } from "./param-BdqTpZER.js";
3
3
  import { a as l, i as u, n as d, o as f, t as p } from "./transport-4V9rfYHN.js";
4
- import { C as m, F as h, G as g, H as _, I as v, J as y, L as b, M as x, N as S, P as C, U as w, W as T, X as E, Y as D, b as O, g as k, i as A, l as j, q as M, r as N, t as P, tt as F, u as I, x as L } from "./scene-4ePpWdmE.js";
4
+ import { C as m, F as h, G as g, H as _, I as v, J as y, L as b, M as x, N as S, P as C, U as w, W as T, X as E, Y as D, b as O, g as k, i as A, l as j, q as M, r as N, t as P, tt as F, u as I, x as L } from "./scene-8F-fQksU.js";
5
5
  import { t as R } from "./code-block-BZsY2sh3.js";
6
6
  import { t as z } from "./content-link-PnpcnTCx.js";
7
7
  import * as B from "@stylexjs/stylex";
@@ -31,7 +31,7 @@ export type TreeDiagramProps = FigureProps & FigureSelectionProps & {
31
31
  };
32
32
  export declare const treeLimits: {
33
33
  readonly nodes: 300;
34
- readonly depth: 12;
34
+ readonly depth: 32;
35
35
  };
36
36
  /**
37
37
  * A hierarchy drawn as a node-link tree: a decision tree, a module tree or a cut of a cluster dendrogram. Depth runs
@@ -105,12 +105,6 @@ export declare function tickTexts({ values, axis, locale, hasTitle, }: Pick<Axis
105
105
  * their own ticks use it, so every axis agrees.
106
106
  */
107
107
  export declare function ticksMinimum(length: number): number;
108
- /**
109
- * The ticks of a measured axis: round values on its scale, at least three on an axis longer than 120 pixels, each
110
- * labelled so that no two read the same. Ticks that land on both ends of the domain win when they fit, so the lowest
111
- * and highest marks never sit beyond the outer ticks. Every kernel layout labels its axes with it; a chart that draws
112
- * an axis of its own calls it too.
113
- */
114
108
  export declare function axisTicks({ axis, domain, length, spacing, locale, hasTitle }: AxisTicksInput): AxisTicks;
115
109
  /**
116
110
  * The ticks of a band axis: one at the center of each category, labelled with its name. A label may hold a line break,
@@ -29,6 +29,13 @@ export type EventStripMarker = {
29
29
  readonly label: string;
30
30
  readonly at: number;
31
31
  };
32
+ /** A quick time-range preset shown in the strip header, such as 6h, 24h, or All. */
33
+ export type EventStripWindow = {
34
+ readonly id: string;
35
+ readonly label: string;
36
+ /** Duration in milliseconds from the end of the strip domain, or `null` for the full span. */
37
+ readonly durationMs: number | null;
38
+ };
32
39
  /**
33
40
  * How the strip writes instants. Options name their own time zone; a function format needs `timeZone` beside it, so the
34
41
  * axis ticks fall on that zone's clock.
@@ -43,9 +50,12 @@ export type EventStripTime = {
43
50
  export type EventStripProps = FigureProps & FigureSelectionProps & EventStripTime & {
44
51
  readonly lanes: ReadonlyArray<EventStripLane>;
45
52
  readonly events: ReadonlyArray<EventStripItem>;
46
- /** The first and last instant the strip spans, in milliseconds since the epoch. */
47
- readonly domain: NumericDomain;
53
+ /** First and last instant the strip spans in epoch ms. Absent fits events and markers automatically. */
54
+ readonly domain?: NumericDomain | undefined;
48
55
  readonly markers?: ReadonlyArray<EventStripMarker> | undefined;
56
+ /** Optional time-window presets rendered in the figure header. */
57
+ readonly windows?: ReadonlyArray<EventStripWindow> | undefined;
58
+ readonly defaultWindowId?: string | undefined;
49
59
  /**
50
60
  * The lane-label gutter's width in pixels, which strips stacked in a column pass the same from `eventStripGutter`
51
61
  * over all their lanes so their time axes line up. A label longer than the gutter is cut with an ellipsis and keeps
@@ -1,4 +1,4 @@
1
- export type { EventStripItem, EventStripLane, EventStripMarker, EventStripProps, EventStripTime, } from './event-strip.tsx';
1
+ export type { EventStripItem, EventStripLane, EventStripMarker, EventStripProps, EventStripTime, EventStripWindow, } from './event-strip.tsx';
2
2
  export { EventStrip, eventStripGutter, eventStripLimits } from './event-strip.tsx';
3
3
  export type { WaterfallGeometry, WaterfallItem, WaterfallProps, WaterfallSelectDetails, WaterfallTone, } from './waterfall.tsx';
4
4
  export { Waterfall } from './waterfall.tsx';
@@ -63,17 +63,11 @@ export type MetricProps = Omit<ComponentProps<'div'>, 'children' | 'dangerouslyS
63
63
  readonly change?: MetricChange | undefined;
64
64
  /** Optional target or ceiling reference shown quietly below the detail line. */
65
65
  readonly target?: string | undefined;
66
- } & ({
67
- readonly isLoading?: false;
68
- readonly value: string;
69
- readonly detail?: string;
70
- readonly hasDetail?: never;
71
- } | {
72
- readonly isLoading: true;
73
- readonly value?: never;
74
- readonly detail?: never;
75
- readonly hasDetail?: boolean;
76
- });
66
+ readonly isLoading?: boolean | undefined;
67
+ readonly value?: string | undefined;
68
+ readonly detail?: string | undefined;
69
+ readonly hasDetail?: boolean | undefined;
70
+ };
77
71
  export declare function MetricGrid({ layout, ...props }: MetricGridProps): ReactNode;
78
72
  export declare function Metric({ label, value, detail, change, target, isLoading, hasDetail, variant, trend, ...props }: MetricProps): ReactNode;
79
73
  export {};
@@ -1,6 +1,13 @@
1
1
  import type { ReactNode } from 'react';
2
+ import type { StreamdownProps } from 'streamdown';
3
+ import type { ContentLinkProps } from '../content-link.tsx';
2
4
  type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
5
+ type MarkdownLinkProps = ContentLinkProps & {
6
+ readonly kind: 'link' | 'image';
7
+ };
3
8
  export type MarkdownProps = {
9
+ readonly renderLink?: (props: MarkdownLinkProps) => ReactNode;
10
+ readonly remarkPlugins?: StreamdownProps['remarkPlugins'];
4
11
  readonly children: string;
5
12
  readonly isStreaming?: boolean;
6
13
  readonly label?: string;
@@ -8,5 +15,5 @@ export type MarkdownProps = {
8
15
  readonly tone?: 'default' | 'muted';
9
16
  readonly weight?: 'regular' | 'strong';
10
17
  };
11
- export declare const Markdown: import("react").MemoExoticComponent<({ children, isStreaming, label, headingLevel, tone, weight, }: MarkdownProps) => ReactNode>;
18
+ export declare const Markdown: import("react").MemoExoticComponent<({ children, isStreaming, label, headingLevel, tone, weight, renderLink, remarkPlugins, }: MarkdownProps) => ReactNode>;
12
19
  export {};
@@ -2,6 +2,12 @@ import type { ComponentProps, ReactNode } from 'react';
2
2
  import type { DataTableColumn, DataTableRowAction, DataTableSort, DataTableSortDetails, TableFilterDimension, TableQueryException } from '../../../collections/src/index.ts';
3
3
  import { PageLayout } from '../../../layout/src/index.ts';
4
4
  export type CollectionStatus = 'loading' | 'ready' | 'failed';
5
+ /** A named scope partition shown as a segmented switcher in the collection header with live item counts. */
6
+ export type CollectionScope<Row> = {
7
+ readonly id: string;
8
+ readonly label: string;
9
+ readonly match: (row: Row) => boolean;
10
+ };
5
11
  type SortableColumns<Row> = {
6
12
  readonly columns: ReadonlyArray<DataTableColumn<Row>>;
7
13
  readonly sort: DataTableSort | undefined;
@@ -24,6 +30,9 @@ type SharedCollectionProps<Row extends object> = SortableColumns<Row> & {
24
30
  readonly filters: ReadonlyArray<TableFilterDimension<Row>> | TableQueryException;
25
31
  /** Optional custom row transformer (e.g. sorting) applied after local search and filtering. */
26
32
  readonly transformRows?: (rows: ReadonlyArray<Row>) => ReadonlyArray<Row>;
33
+ /** Optional segmented scopes (e.g. Active / All) that partition rows before local search and filtering. */
34
+ readonly scopes?: ReadonlyArray<CollectionScope<Row>> | undefined;
35
+ readonly defaultScopeId?: string | undefined;
27
36
  readonly actions?: ReactNode;
28
37
  readonly notice?: ReactNode;
29
38
  readonly rowAction?: DataTableRowAction<Row> | undefined;
@@ -1,7 +1,9 @@
1
- export type { CollectionPageProps, CollectionSectionProps, CollectionStatus } from './collection-page.tsx';
1
+ export type { CollectionPageProps, CollectionScope, CollectionSectionProps, CollectionStatus, } from './collection-page.tsx';
2
2
  export { CollectionPage, CollectionSection } from './collection-page.tsx';
3
3
  export type { FindingCardLabels, FindingCardProps, FindingMetric, FindingSource, FindingStatus, } from './finding-card.tsx';
4
4
  export { FindingCard } from './finding-card.tsx';
5
+ export type { LineageGraphLabels, LineageGraphProps, LineageNode, LineageNodeKind } from './lineage-graph.tsx';
6
+ export { LineageGraph } from './lineage-graph.tsx';
5
7
  export type { MilestoneKind, MilestonePathLabels, MilestonePathProps, ResearchMilestone } from './milestone-path.tsx';
6
8
  export { MilestonePath } from './milestone-path.tsx';
7
9
  export type { SpecimenDiffLabels, SpecimenDiffProps, SpecimenDiffRow, SpecimenFilter, SpecimenOutcome, } from './specimen-diff.tsx';
@@ -0,0 +1,40 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { FigureProps, FigureSelectionProps, ValueFormat } from '../../../charts/src/index.ts';
3
+ export type LineageNodeKind = 'baseline' | 'milestone' | 'branch' | 'merge' | 'killed';
4
+ export type LineageNode = {
5
+ readonly id: string;
6
+ readonly parentIds: ReadonlyArray<string>;
7
+ readonly label: string;
8
+ readonly kind: LineageNodeKind;
9
+ readonly lane?: string | undefined;
10
+ readonly metric?: number | null | undefined;
11
+ readonly delta?: number | null | undefined;
12
+ readonly summary?: string | undefined;
13
+ readonly detail?: string | undefined;
14
+ readonly source?: string | undefined;
15
+ readonly timestamp?: string | undefined;
16
+ };
17
+ export type LineageGraphLabels = {
18
+ readonly frontier: string;
19
+ readonly all: string;
20
+ readonly metric: string;
21
+ readonly delta: string;
22
+ readonly lane: string;
23
+ readonly parents: string;
24
+ readonly source: string;
25
+ readonly empty: string;
26
+ readonly kinds: Readonly<Record<LineageNodeKind, string>>;
27
+ };
28
+ export type LineageGraphProps = Pick<FigureProps, 'title' | 'description' | 'locale' | 'status' | 'source' | 'transforms' | 'actions'> & FigureSelectionProps & {
29
+ readonly nodes: ReadonlyArray<LineageNode>;
30
+ readonly valueLabel?: string | undefined;
31
+ readonly valueFormat?: ValueFormat | undefined;
32
+ readonly deltaFormat?: ValueFormat | undefined;
33
+ readonly defaultScope?: 'frontier' | 'all' | undefined;
34
+ readonly labels?: Partial<LineageGraphLabels> | undefined;
35
+ };
36
+ /**
37
+ * Multi-parent research lineage DAG with automatic topological layout, optional agent swimlanes, and a Frontier / All
38
+ * scope switcher. Composes `RelationGraph` with a flat inline evidence readout for the selected node.
39
+ */
40
+ export declare function LineageGraph({ nodes, valueLabel, valueFormat, deltaFormat, defaultScope, selected, onSelectedChange, labels: given, actions, ...figure }: LineageGraphProps): ReactNode;