@mechane-ai/elements 0.69.0 → 0.69.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.
package/dist/catalog.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "package": "@mechane-ai/elements",
3
- "version": "0.69.0",
3
+ "version": "0.69.1",
4
4
  "recipes": [
5
5
  {
6
6
  "slug": "allocation-report",
@@ -87,6 +87,21 @@
87
87
  "import { MotionFigure, parseMotionClip } from '@mechane-ai/elements/kits/research';"
88
88
  ]
89
89
  },
90
+ {
91
+ "slug": "research-history",
92
+ "title": "Research History",
93
+ "description": "Show when research questions, findings, comparisons and decisions appeared. Select an event to open its source thread or evidence. Use a separate lineage graph for explicit artifact parents.",
94
+ "path": "recipes/research-history.tsx",
95
+ "story": "recipes-research-history--example",
96
+ "imports": [
97
+ "import { Text, TextLink } from '@mechane-ai/elements';",
98
+ "import { EventStrip } from '@mechane-ai/elements/charts/timeline';",
99
+ "import type { EventStripItem, EventStripLane } from '@mechane-ai/elements/charts/timeline';",
100
+ "import { LineageGraph } from '@mechane-ai/elements/kits/research';",
101
+ "import type { LineageNode } from '@mechane-ai/elements/kits/research';",
102
+ "import { PageInset, PageLayout } from '@mechane-ai/elements/layout';"
103
+ ]
104
+ },
90
105
  {
91
106
  "slug": "searchable-collection",
92
107
  "title": "Searchable Collection",
@@ -7,7 +7,7 @@ import { a as de, r as fe, t as pe } from "../image-grid-TTrLxvaI.js";
7
7
  import { c as me, i as he, o as m, r as ge, t as _e, u as ve } from "../token-heatmap-DEqEaoGE.js";
8
8
  import { a as ye, l as be, r as xe, s as Se, t as Ce } from "../embedding-map-Bm7aTA6z.js";
9
9
  import { a as we, c as Te, r as h, t as Ee } from "../token-predictions-Bjdh0K-A.js";
10
- import { n as De, t as Oe } from "../waterfall-C9_pHZzv.js";
10
+ import { n as De, t as Oe } from "../waterfall-CNDkDS6T.js";
11
11
  import { a as ke, l as Ae, r as je, s as Me, t as Ne } from "../slope-chart-B6Mtcta2.js";
12
12
  import { m as g } from "../values-963L6n1m.js";
13
13
  import { a as _, r as v } from "../figure-frame-BHCNceS4.js";
@@ -1,3 +1,3 @@
1
- import { i as e, n as t, r as n, t as r } from "../waterfall-C9_pHZzv.js";
1
+ import { i as e, n as t, r as n, t as r } from "../waterfall-CNDkDS6T.js";
2
2
  import { n as i, t as a } from "../timeline-BHpj7i7K.js";
3
3
  export { t as EventStrip, a as TraceTimeline, r as Waterfall, n as eventStripGutter, e as eventStripLimits, i as traceTimelineLimits };
@@ -2,7 +2,7 @@ import { a as e } from "../dumbbell-plot-S4RyfxmW.js";
2
2
  import { r as t } from "../figure-format-BVb7yFCA.js";
3
3
  import { t as n } from "../tone-scope-DKiSw-JR.js";
4
4
  import { c as r, i, o as a, s as o } from "../src-Bkov5TTa.js";
5
- import { n as s } from "../waterfall-C9_pHZzv.js";
5
+ import { n as s } from "../waterfall-CNDkDS6T.js";
6
6
  import { r as c, s as l } from "../time-series-DJk-2Mt0.js";
7
7
  import { i as u, r as d } from "../src-Dc1t1ugL.js";
8
8
  import "@stylexjs/stylex";
@@ -75,8 +75,8 @@ export declare const eventStripLimits: {
75
75
  */
76
76
  export declare function eventStripGutter(labels: ReadonlyArray<string>): number;
77
77
  /**
78
- * Events along time in a few lanes: deploys, incidents, evaluation runs and alerts. An instant is a dot and an interval
79
- * a bar, and events that overlap in a lane stack into rows. Dashed rules mark supplied instants across every lane, and
80
- * the arrow keys step through events in time while Up and Down move to a neighboring lane.
78
+ * Show events in lanes with dots for instants, bars for intervals and dashed rules for shared markers. Use the arrow
79
+ * keys to inspect events in time and move between lanes. Time windows clip marks, and inspection and the data table
80
+ * report the recorded times and duration.
81
81
  */
82
82
  export declare function EventStrip(props: EventStripProps): ReactNode;
@@ -95,22 +95,28 @@ function Ie(t) {
95
95
  let H = i.map((e) => e.end !== void 0 && e.end <= e.start ? {
96
96
  ...e,
97
97
  end: void 0
98
- } : e), U = s ?? Pe(H, m), Re = h === void 0 || h.length === 0 ? void 0 : h.find((e) => e.id === V) ?? h[0], W = Re?.durationMs ?? null, G = W !== null && W > 0, K = G ? [Math.max(U[0], U[1] - W), U[1]] : U, q = G ? H.flatMap((e) => {
98
+ } : e), U = s ?? Pe(H, m), Re = h === void 0 || h.length === 0 ? void 0 : h.find((e) => e.id === V) ?? h[0], W = Re?.durationMs ?? null, G = W !== null && W > 0, K = G ? [Math.max(U[0], U[1] - W), U[1]] : U, ze = G ? H.flatMap((e) => {
99
99
  if ((e.end ?? e.start) < K[0] || e.start > K[1]) return [];
100
100
  let t = Math.max(K[0], e.start), n = e.end === void 0 ? void 0 : Math.min(K[1], e.end), r = n !== void 0 && n > t ? n : void 0;
101
101
  return [{
102
- ...e,
103
- start: t,
104
- end: r
102
+ recorded: e,
103
+ visible: {
104
+ ...e,
105
+ start: t,
106
+ end: r
107
+ }
105
108
  }];
106
- }) : H, ze = G ? m.filter((e) => e.at >= K[0] && e.at <= K[1]) : m, J = typeof T == "function" ? be : T.timeZone, Be = Fe({
109
+ }) : H.map((e) => ({
110
+ recorded: e,
111
+ visible: e
112
+ })), q = ze.map(({ visible: e }) => e), J = G ? m.filter((e) => e.at >= K[0] && e.at <= K[1]) : m, Y = typeof T == "function" ? be : T.timeZone, Be = Fe({
107
113
  lanes: r,
108
114
  events: q,
109
- markers: ze,
115
+ markers: J,
110
116
  domain: K,
111
- zone: J
117
+ zone: Y
112
118
  });
113
- if (Be !== void 0 || J === void 0) return /* @__PURE__ */ C(se, {
119
+ if (Be !== void 0 || Y === void 0) return /* @__PURE__ */ C(se, {
114
120
  ...D,
115
121
  message: Be ?? "The strip needs a time zone."
116
122
  });
@@ -125,7 +131,7 @@ function Ie(t) {
125
131
  children: t.label
126
132
  }, t.id);
127
133
  }), D.actions] });
128
- function Y(e) {
134
+ function X(e) {
129
135
  return p({
130
136
  timestamp: e,
131
137
  locale: L,
@@ -137,14 +143,14 @@ function Ie(t) {
137
143
  valueLabels: r.map((e) => e.label),
138
144
  hasXTitle: !0,
139
145
  hasYTitle: !1
140
- }), X = ye === void 0 ? He : {
146
+ }), Z = ye === void 0 ? He : {
141
147
  ...He,
142
148
  left: ye
143
- }, Z = Math.max(1, z.width - X.left - X.right), Ue = re({
149
+ }, Ue = Math.max(1, z.width - Z.left - Z.right), We = re({
144
150
  domain: K,
145
- range: [X.left, X.left + Z]
146
- }), We = ze.map((e) => {
147
- let t = Ue.position(e.at), n = e.label, r = `${e.label} · ${Y(e.at)}`, i = n.length * Ee + 10, a = t > X.left + Z * Te;
151
+ range: [Z.left, Z.left + Ue]
152
+ }), Ge = J.map((e) => {
153
+ let t = We.position(e.at), n = e.label, r = `${e.label} · ${X(e.at)}`, i = n.length * Ee + 10, a = t > Z.left + Ue * Te;
148
154
  return {
149
155
  marker: e,
150
156
  at: t,
@@ -154,69 +160,67 @@ function Ie(t) {
154
160
  start: a ? t - i : t,
155
161
  end: a ? t : t + i
156
162
  };
157
- }), Ge = ge(We.map((e) => ({
163
+ }), Ke = ge(Ge.map((e) => ({
158
164
  id: e.marker.id,
159
165
  track: "markers",
160
166
  start: e.start,
161
167
  end: e.end
162
- }))), Ke = Math.max(0, ...We.map((e) => (Ge.get(e.marker.id)?.lane ?? 0) + 1)), qe = X.top + Ke * P, Je = (K[1] - K[0]) * M / Z, Ye = (K[1] - K[0]) * we / Z, Xe = ge(q.map((e) => ({
168
+ }))), qe = Math.max(0, ...Ge.map((e) => (Ke.get(e.marker.id)?.lane ?? 0) + 1)), Je = Z.top + qe * P, Ye = (K[1] - K[0]) * M / Ue, Xe = (K[1] - K[0]) * we / Ue, Ze = ge(q.map((e) => ({
163
169
  id: e.id,
164
170
  track: e.laneId,
165
- start: e.end === void 0 ? e.start - Je * I : e.start,
166
- end: e.end === void 0 ? e.start + Je * I : Math.max(e.end, e.start + Ye)
167
- }))), Ze = r.map((e) => Math.max(1, ...q.flatMap((t) => t.laneId === e.id ? [(Xe.get(t.id)?.lane ?? 0) + 1] : []))), Qe = r.flatMap((e, t) => Array.from({ length: Ze[t] ?? 1 }, (t, n) => ({
171
+ start: e.end === void 0 ? e.start - Ye * I : e.start,
172
+ end: e.end === void 0 ? e.start + Ye * I : Math.max(e.end, e.start + Xe)
173
+ }))), Qe = r.map((e) => Math.max(1, ...q.flatMap((t) => t.laneId === e.id ? [(Ze.get(t.id)?.lane ?? 0) + 1] : []))), $e = r.flatMap((e, t) => Array.from({ length: Qe[t] ?? 1 }, (t, n) => ({
168
174
  laneId: e.id,
169
175
  row: n
170
- }))), $e = qe + Qe.length * O + r.length * k * 2 + X.bottom, Q = f({
176
+ }))), et = Je + $e.length * O + r.length * k * 2 + Z.bottom, Q = f({
171
177
  width: z.width,
172
- height: $e,
178
+ height: et,
173
179
  margins: {
174
- ...X,
175
- top: qe
180
+ ...Z,
181
+ top: Je
176
182
  }
177
- }), et = r.map((e, t) => {
178
- let n = Qe.findIndex((t) => t.laneId === e.id), r = Q.top + t * k * 2 + n * O;
183
+ }), tt = r.map((e, t) => {
184
+ let n = $e.findIndex((t) => t.laneId === e.id), r = Q.top + t * k * 2 + n * O;
179
185
  return {
180
186
  lane: e,
181
187
  index: t,
182
188
  start: r,
183
- end: r + (Ze[t] ?? 1) * O + 16
189
+ end: r + (Qe[t] ?? 1) * O + 16
184
190
  };
185
- }), tt = l({
191
+ }), nt = l({
186
192
  domain: K,
187
193
  length: Q.innerWidth,
188
194
  timeFormat: T,
189
195
  locale: L,
190
- timeZone: J
191
- }), nt = tt.values.map((e, t) => ({
196
+ timeZone: Y
197
+ }), rt = nt.values.map((e, t) => ({
192
198
  key: String(e),
193
- position: Ue.position(e),
194
- label: tt.labels[t] ?? ""
195
- })), rt = et.map((e) => ({
199
+ position: We.position(e),
200
+ label: nt.labels[t] ?? ""
201
+ })), it = tt.map((e) => ({
196
202
  key: e.lane.id,
197
203
  position: (e.start + e.end) * I,
198
204
  label: e.lane.label
199
- })), $ = q.map((e, t) => ({
200
- event: e,
201
- index: t
202
- })).toSorted((e, t) => e.event.start === t.event.start ? e.index - t.index : e.event.start - t.event.start).map((e) => e.event).map((e, t) => {
203
- let n = et.find((t) => t.lane.id === e.laneId), i = n?.index ?? 0, a = r[i], o = Xe.get(e.id)?.lane ?? 0, s = (n?.start ?? Q.top) + k + (o + I) * O, c = Ue.position(e.start), l = e.end === void 0 ? c : Math.max(c + we, Ue.position(e.end)), u = e.tone ?? Oe({
204
- id: e.laneId,
205
- tone: a?.tone,
206
- index: i
205
+ })), $ = ze.toSorted((e, t) => e.visible.start - t.visible.start).map(({ recorded: e, visible: t }, n) => {
206
+ let i = tt.find((e) => e.lane.id === t.laneId), a = i?.index ?? 0, o = r[a], s = Ze.get(t.id)?.lane ?? 0, c = (i?.start ?? Q.top) + k + (s + I) * O, l = We.position(t.start), u = t.end === void 0 ? l : Math.max(l + we, We.position(t.end)), d = t.tone ?? Oe({
207
+ id: t.laneId,
208
+ tone: o?.tone,
209
+ index: a
207
210
  });
208
211
  return {
209
- event: e,
210
- rank: t,
211
- laneIndex: i,
212
- laneLabel: a?.label ?? e.laneId,
213
- x1: c,
214
- x2: l,
215
- y: s,
216
- tone: u
212
+ event: t,
213
+ recorded: e,
214
+ rank: n,
215
+ laneIndex: a,
216
+ laneLabel: o?.label ?? t.laneId,
217
+ x1: l,
218
+ x2: u,
219
+ y: c,
220
+ tone: d
217
221
  };
218
- }), it = $.map(({ event: e, laneLabel: t }) => {
219
- let n = e.end === void 0 ? Y(e.start) : `${Y(e.start)} – ${Y(e.end)} · ${Ne(e.end - e.start, L)}`;
222
+ }), at = $.map(({ recorded: e, laneLabel: t }) => {
223
+ let n = e.end === void 0 ? X(e.start) : `${X(e.start)} – ${X(e.end)} · ${Ne(e.end - e.start, L)}`;
220
224
  return {
221
225
  id: e.id,
222
226
  label: [
@@ -226,8 +230,8 @@ function Ie(t) {
226
230
  e.detail
227
231
  ].filter((e) => e !== void 0).join(" · ")
228
232
  };
229
- }), at = 1 / (r.length * 2 + 1);
230
- function ot(e) {
233
+ }), ot = 1 / (r.length * 2 + 1);
234
+ function st(e) {
231
235
  let t = e.x / e.width * Q.width, n = e.y / e.height * Q.height, r, i = Infinity;
232
236
  for (let e of $) if (t >= e.x1 - j - N && t <= e.x2 + j + N && Math.abs(n - e.y) <= O * I) {
233
237
  let a = Math.max(e.x1, Math.min(e.x2, t)), o = Math.hypot(t - a, n - e.y);
@@ -237,9 +241,9 @@ function Ie(t) {
237
241
  }
238
242
  return /* @__PURE__ */ C(o, {
239
243
  ...ke,
240
- items: it,
244
+ items: at,
241
245
  place: (e) => {
242
- let t = $.find((t) => t.event.id === e), n = t?.rank ?? 0, r = (t?.laneIndex ?? 0) * at;
246
+ let t = $.find((t) => t.event.id === e), n = t?.rank ?? 0, r = (t?.laneIndex ?? 0) * ot;
243
247
  return t === void 0 ? void 0 : {
244
248
  left: n,
245
249
  right: n,
@@ -247,7 +251,7 @@ function Ie(t) {
247
251
  bottom: r
248
252
  };
249
253
  },
250
- locate: ot,
254
+ locate: st,
251
255
  selected: E ?? null,
252
256
  onSelect: xe,
253
257
  render: (e, { inspected: t, cursor: n }) => {
@@ -258,7 +262,7 @@ function Ie(t) {
258
262
  figure: e,
259
263
  footer: q.length === 0 ? void 0 : /* @__PURE__ */ C(c, {
260
264
  id: B,
261
- children: a(it, t)
265
+ children: a(at, t)
262
266
  }),
263
267
  children: q.length === 0 ? /* @__PURE__ */ C(_, { children: Ce }) : /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ w(b, {
264
268
  plotRef: z.ref,
@@ -270,7 +274,7 @@ function Ie(t) {
270
274
  }),
271
275
  readoutId: B,
272
276
  children: [
273
- et.map((e, t) => t % 2 == 1 ? /* @__PURE__ */ C("rect", {
277
+ tt.map((e, t) => t % 2 == 1 ? /* @__PURE__ */ C("rect", {
274
278
  x: Q.left,
275
279
  y: e.start,
276
280
  width: Q.innerWidth,
@@ -279,12 +283,12 @@ function Ie(t) {
279
283
  }, `band-${e.lane.id}`) : null),
280
284
  /* @__PURE__ */ C(le, {
281
285
  box: Q,
282
- xTicks: nt,
283
- yTicks: rt,
284
- xTitle: `Time (${J})`,
286
+ xTicks: rt,
287
+ yTicks: it,
288
+ xTitle: `Time (${Y})`,
285
289
  grid: "x"
286
290
  }),
287
- et.slice(1).map((e) => /* @__PURE__ */ C("line", {
291
+ tt.slice(1).map((e) => /* @__PURE__ */ C("line", {
288
292
  x1: Q.left,
289
293
  x2: Q.right,
290
294
  y1: e.start,
@@ -310,8 +314,8 @@ function Ie(t) {
310
314
  isSelected: E === e.event.id
311
315
  }, e.event.id))
312
316
  }),
313
- We.map(({ marker: e, at: t, text: n, tooltip: r, isEnd: i }) => {
314
- let a = Ge.get(e.id)?.lane ?? 0, o = Q.top - 10 - a * P, s = Math.max(Q.left + F, Math.min(Q.right - F, i ? t - F : t + F));
317
+ Ge.map(({ marker: e, at: t, text: n, tooltip: r, isEnd: i }) => {
318
+ let a = Ke.get(e.id)?.lane ?? 0, o = Q.top - 10 - a * P, s = Math.max(Q.left + F, Math.min(Q.right - F, i ? t - F : t + F));
315
319
  return /* @__PURE__ */ w("g", { children: [
316
320
  /* @__PURE__ */ C("title", { children: r }),
317
321
  /* @__PURE__ */ C(de, {
@@ -342,7 +346,7 @@ function Ie(t) {
342
346
  id: "event",
343
347
  label: "Event"
344
348
  }],
345
- rows: it.map((e) => ({
349
+ rows: at.map((e) => ({
346
350
  id: e.id,
347
351
  values: [e.label]
348
352
  }))
@@ -356,7 +360,7 @@ var V = 5, Le = 6, H = 14, U = .5, Re = [
356
360
  0,
357
361
  .5,
358
362
  1
359
- ], W = 100, G = 2, K = 14, q = 2, ze = {
363
+ ], W = 100, G = 2, K = 14, ze = 2, q = {
360
364
  k1xSpc: "x1rg5ohu",
361
365
  kzqmXN: "x1v4s8kt",
362
366
  kZKoxP: "xols6we",
@@ -374,7 +378,7 @@ var V = 5, Le = 6, H = 14, U = .5, Re = [
374
378
  $$css: !0
375
379
  },
376
380
  leafDot: (e) => [
377
- ze,
381
+ q,
378
382
  {
379
383
  kWkggS: e == null ? e : "xl8spv7",
380
384
  $$css: !0
@@ -393,7 +397,7 @@ var V = 5, Le = 6, H = 14, U = .5, Re = [
393
397
  $$css: !0
394
398
  }, { "--x-color": e ?? void 0 }]
395
399
  };
396
- function Be(e, t) {
400
+ function Y(e, t) {
397
401
  let n = /* @__PURE__ */ new Set([e]), r = [...t.get(e) ?? []], i = 0;
398
402
  for (; r.length > 0;) {
399
403
  let e = r.pop();
@@ -404,8 +408,8 @@ function Be(e, t) {
404
408
  }
405
409
  return i;
406
410
  }
407
- function Ve({ items: r, start: a, end: o, visibleRange: s, rowLabel: c, summaryLabel: l, density: u = "comfortable", emptyLabel: d = "No timing records are available.", selected: f, selectedRef: ee, onSelectedChange: te, onClearSelection: p, highlightedIds: h, onActivate: ne, offsetFormat: ie, ...ae }) {
408
- let { actions: g, ..._ } = ae, { title: ce, locale: le } = _, [v, ue] = he(() => /* @__PURE__ */ new Set()), de = Y({
411
+ function Be({ items: r, start: a, end: o, visibleRange: s, rowLabel: c, summaryLabel: l, density: u = "comfortable", emptyLabel: d = "No timing records are available.", selected: f, selectedRef: ee, onSelectedChange: te, onClearSelection: p, highlightedIds: h, onActivate: ne, offsetFormat: ie, ...ae }) {
412
+ let { actions: g, ..._ } = ae, { title: ce, locale: le } = _, [v, ue] = he(() => /* @__PURE__ */ new Set()), de = Ve({
409
413
  items: r,
410
414
  start: a,
411
415
  end: o
@@ -458,7 +462,7 @@ function Ve({ items: r, start: a, end: o, visibleRange: s, rowLabel: c, summaryL
458
462
  })])), Te = M.map((e) => ({
459
463
  value: e.id,
460
464
  label: `${e.label} · ${e.detail} · ${e.summary} · ${F.get(e.id)}`,
461
- ...X(e.geometry)
465
+ ...He(e.geometry)
462
466
  }));
463
467
  function Ee(e) {
464
468
  ue((t) => {
@@ -525,7 +529,7 @@ function Ve({ items: r, start: a, end: o, visibleRange: s, rowLabel: c, summaryL
525
529
  })
526
530
  ]
527
531
  }), M.map((e) => {
528
- let n = F.get(e.id), r = f === e.id, a = N !== null && !N.has(e.id), o = e.tone ?? "neutral", s = i[o], c = we(e), l = O.has(e.id), u = v.has(e.id), d = l && u ? Be(e.id, D) : 0;
532
+ let n = F.get(e.id), r = f === e.id, a = N !== null && !N.has(e.id), o = e.tone ?? "neutral", s = i[o], c = we(e), l = O.has(e.id), u = v.has(e.id), d = l && u ? Y(e.id, D) : 0;
529
533
  return /* @__PURE__ */ w(Se, {
530
534
  value: e.id,
531
535
  ref: r ? ee : void 0,
@@ -618,7 +622,7 @@ function Ve({ items: r, start: a, end: o, visibleRange: s, rowLabel: c, summaryL
618
622
  y1: "0",
619
623
  y2: "18",
620
624
  className: "x13hfdr1"
621
- }, e)), /* @__PURE__ */ C(He, {
625
+ }, e)), /* @__PURE__ */ C(X, {
622
626
  geometry: e.geometry,
623
627
  tone: o,
624
628
  scale: pe,
@@ -646,7 +650,7 @@ function Ve({ items: r, start: a, end: o, visibleRange: s, rowLabel: c, summaryL
646
650
  children: z
647
651
  });
648
652
  }
649
- function Y({ items: e, start: t, end: n }) {
653
+ function Ve({ items: e, start: t, end: n }) {
650
654
  if (!Number.isFinite(t) || !Number.isFinite(n) || !Number.isFinite(n - t) || n < t) return "The timing domain must have finite, ordered endpoints.";
651
655
  if (!s(e)) return "Timing records must have unique identifiers.";
652
656
  for (let r of e) {
@@ -658,7 +662,7 @@ function Y({ items: e, start: t, end: n }) {
658
662
  if (e.kind === "point" && (!Number.isFinite(e.at) || e.at < t || e.at > n)) return "Timing points must be finite and fit inside the supplied domain.";
659
663
  }
660
664
  }
661
- function He({ geometry: e, tone: t, scale: n, rangeStart: a, rangeEnd: o }) {
665
+ function X({ geometry: e, tone: t, scale: n, rangeStart: a, rangeEnd: o }) {
662
666
  switch (e.kind) {
663
667
  case "unavailable": return null;
664
668
  case "interval": {
@@ -676,7 +680,7 @@ function He({ geometry: e, tone: t, scale: n, rangeStart: a, rangeEnd: o }) {
676
680
  y: G,
677
681
  width: `${d}%`,
678
682
  height: K,
679
- rx: q,
683
+ rx: ze,
680
684
  fill: i[t],
681
685
  stroke: r[t],
682
686
  className: "xnpr05h x13efnbd"
@@ -713,7 +717,7 @@ function He({ geometry: e, tone: t, scale: n, rangeStart: a, rangeEnd: o }) {
713
717
  }
714
718
  }
715
719
  }
716
- function X(e) {
720
+ function He(e) {
717
721
  switch (e.kind) {
718
722
  case "interval": return {
719
723
  start: e.start,
@@ -736,4 +740,4 @@ function Z({ geometry: e, start: t, offset: n }) {
736
740
  case "unavailable": return "Timing unavailable";
737
741
  }
738
742
  }
739
- export { D as i, Ie as n, Me as r, Ve as t };
743
+ export { D as i, Ie as n, Me as r, Be as t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mechane-ai/elements",
3
- "version": "0.69.0",
3
+ "version": "0.69.1",
4
4
  "description": "Elements by Mechane — React components for applications, AI interfaces, and analytical graphics",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -0,0 +1,51 @@
1
+ import { Text, TextLink } from '@mechane-ai/elements';
2
+ import { EventStrip } from '@mechane-ai/elements/charts/timeline';
3
+ import type { EventStripItem, EventStripLane } from '@mechane-ai/elements/charts/timeline';
4
+ import { LineageGraph } from '@mechane-ai/elements/kits/research';
5
+ import type { LineageNode } from '@mechane-ai/elements/kits/research';
6
+ import { PageInset, PageLayout } from '@mechane-ai/elements/layout';
7
+ import { useState } from 'react';
8
+
9
+ type EvidenceEvent = EventStripItem & { readonly href: string; readonly linkLabel: string };
10
+
11
+ type ResearchHistoryProps = {
12
+ readonly lanes: ReadonlyArray<EventStripLane>;
13
+ readonly events: ReadonlyArray<EvidenceEvent>;
14
+ readonly artifacts: ReadonlyArray<LineageNode>;
15
+ };
16
+
17
+ const clock = { month: 'short', day: 'numeric', hour: 'numeric', minute: '2-digit', timeZone: 'UTC' } as const;
18
+
19
+ /**
20
+ * Show when research questions, findings, comparisons and decisions appeared. Select an event to open its source thread
21
+ * or evidence. Use a separate lineage graph for explicit artifact parents.
22
+ */
23
+ export function ResearchHistory({ lanes, events, artifacts }: ResearchHistoryProps) {
24
+ const [selectedId, select] = useState<string | null>(null);
25
+ const selected = events.find((event) => event.id === selectedId);
26
+
27
+ return (
28
+ <PageLayout title="Research history">
29
+ <PageInset>
30
+ <EventStrip
31
+ title="Research timeline"
32
+ locale="en-US"
33
+ description="Points show post times. Bars show recorded task intervals."
34
+ lanes={lanes}
35
+ events={events}
36
+ timeFormat={clock}
37
+ selected={selected?.id ?? null}
38
+ onSelectedChange={select}
39
+ />
40
+ {selected !== undefined && (
41
+ <Text>
42
+ <TextLink href={selected.href}>{selected.linkLabel}</TextLink>
43
+ </Text>
44
+ )}
45
+ {artifacts.length > 0 && (
46
+ <LineageGraph title="Artifact ancestry" locale="en-US" nodes={artifacts} defaultScope="all" />
47
+ )}
48
+ </PageInset>
49
+ </PageLayout>
50
+ );
51
+ }
@@ -78,6 +78,10 @@ persistence and every asynchronous operation.
78
78
  - **Workspace dashboard.** Look up `workspace-report` for linked charts, metrics and a drill-down table inside a
79
79
  persistent shell. Look up `workspace-files` for loading, empty and detail views, or `session-timeline` for agent
80
80
  activity. Each recipe's catalog entry names a runnable Storybook example.
81
+ - **Research history.** Look up `research-history` for a full-width `EventStrip`, native links for evidence and a
82
+ `LineageGraph` for recorded artifact parents. Use source IDs and timestamps. Show posts as points and give bars a
83
+ duration only when the source supplies both endpoints. Keep existing rows visible during history reads and show when
84
+ older results are still missing.
81
85
  - **Searchable collection.** Start with the `searchable-collection` recipe. The collection owns its heading, query
82
86
  controls and read boundary. Supply all authorized rows for local search, or a controlled query for paged data. Link
83
87
  each record to its detail route and restore the query and position on Back.