@overdoser/react-toolkit 0.10.1 → 0.11.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.
@@ -1,12 +1,12 @@
1
1
  import { jsx as l, jsxs as u, Fragment as ne } from "react/jsx-runtime";
2
- import { forwardRef as st, useRef as L, useState as b, useCallback as q, useEffect as ct, useMemo as xe, useLayoutEffect as dt } from "react";
2
+ import { forwardRef as st, useRef as L, useState as S, useCallback as q, useEffect as ct, useMemo as xe, useLayoutEffect as dt } from "react";
3
3
  import f from "clsx";
4
4
  import r from "./Timeline.module.scss.js";
5
5
  import i from "./HistoryTimeline.module.scss.js";
6
- import { TIMELINE_PALETTE_VARS as m, fmtDateTime as R, eventMatches as ut, fmtDur as D, tint as mt, fmtDate as ht, fmtClock as ke, ticks as pt, DAY as E } from "./timelineCore.js";
6
+ import { TIMELINE_PALETTE_VARS as m, fmtDateTime as F, eventMatches as ut, fmtDur as D, tint as mt, fmtDate as ht, fmtClock as ke, ticks as pt, DAY as E } from "./timelineCore.js";
7
7
  import { computeHistoryLayout as ft } from "./historyLayout.js";
8
8
  import { TimelineSummary as gt, TimelineSegmented as He, TimelineZoomControls as vt, TimelineLegend as wt, HighlightText as Me, TimelineTooltip as yt } from "./TimelineShared.js";
9
- import { useNowTicker as Nt, useContainerWidth as St, useTimelinePan as bt, useWheelZoom as Tt, animateScrollTo as xt } from "./useTimeline.js";
9
+ import { useNowTicker as Nt, useContainerWidth as bt, useTimelinePan as St, useWheelZoom as Tt, animateScrollTo as xt } from "./useTimeline.js";
10
10
  const kt = {
11
11
  created: m[0],
12
12
  done: m[0],
@@ -41,23 +41,23 @@ const kt = {
41
41
  tagColors: se,
42
42
  showControls: ce = !0,
43
43
  showLegend: Ae = !0,
44
- showSummary: F = !1,
45
- summaryPlacement: H = "left",
44
+ showSummary: A = !1,
45
+ summaryPlacement: T = "left",
46
46
  summaryDefaultPosition: Ve,
47
47
  maxHeight: de,
48
48
  selectedEventId: Z,
49
49
  defaultSelectedEventId: ze = null,
50
50
  onEventSelect: Ie,
51
51
  renderCard: ue,
52
- renderTooltip: A,
52
+ renderTooltip: V,
53
53
  renderDetails: K,
54
54
  classes: h,
55
55
  className: Ye,
56
56
  style: je
57
- } = Ce, w = L(null), [qe, Xe] = b(
57
+ } = Ce, w = L(null), [qe, Xe] = S(
58
58
  () => De ?? (typeof window < "u" && window.innerWidth < 700 ? "vertical" : "horizontal")
59
- ), V = ie ?? qe, y = V === "horizontal", [Ze, Ke] = b(Pe), U = ae ?? Ze, [Ue, me] = b(1), [he, pe] = b(!0), [S, _] = b(null), [_e, Ge] = b(ze), P = Z !== void 0 ? Z : _e, [N, Be] = b({ l: 0, t: 0, w: 0, h: 0 }), fe = L(F);
60
- fe.current = F;
59
+ ), z = ie ?? qe, y = z === "horizontal", [Ze, Ke] = S(Pe), U = ae ?? Ze, [Ue, me] = S(1), [he, pe] = S(!0), [b, _] = S(null), [_e, Ge] = S(ze), P = Z !== void 0 ? Z : _e, [N, Be] = S({ l: 0, t: 0, w: 0, h: 0 }), fe = L(A);
60
+ fe.current = A;
61
61
  const G = L(null), B = q(() => {
62
62
  const e = w.current;
63
63
  e && Be(
@@ -69,9 +69,9 @@ const kt = {
69
69
  }));
70
70
  }, [B]);
71
71
  ct(() => {
72
- F && B();
72
+ A && B();
73
73
  });
74
- const [$e, Qe] = b(We ?? ""), J = X !== void 0 ? X : $e, T = J.trim(), ge = (e) => {
74
+ const [$e, Qe] = S(We ?? ""), J = X !== void 0 ? X : $e, x = J.trim(), ge = (e) => {
75
75
  X === void 0 && Qe(e), Re?.(e);
76
76
  }, ve = re ? re({ value: J, setValue: ge }) : Fe ? /* @__PURE__ */ l(
77
77
  "input",
@@ -88,7 +88,7 @@ const kt = {
88
88
  end: e.end !== void 0 ? e.end : e.ongoing ? null : e.start
89
89
  })).sort((e, n) => e.start - n.start),
90
90
  [le]
91
- ), et = c.some((e) => e.end == null), x = Nt(et, 500), tt = St(w), O = bt(w), M = q(
91
+ ), et = c.some((e) => e.end == null), k = Nt(et, 500), tt = bt(w), O = St(w), M = q(
92
92
  (e) => {
93
93
  const n = e || "event", t = { ...kt, ...se };
94
94
  if (t[n]) return t[n];
@@ -105,26 +105,26 @@ const kt = {
105
105
  end: e.end ?? null
106
106
  })),
107
107
  {
108
- orientation: V,
108
+ orientation: z,
109
109
  spacing: U,
110
110
  containerWidth: tt,
111
111
  viewportHeight: typeof window < "u" && window.innerHeight || 800,
112
- now: x,
112
+ now: k,
113
113
  k: he ? "fit" : Ue
114
114
  }
115
- ), z = new Map(s.items.map((e) => [e.id, e])), we = L(s.kFit), ye = L(s.kEff);
115
+ ), I = new Map(s.items.map((e) => [e.id, e])), we = L(s.kFit), ye = L(s.kEff);
116
116
  we.current = s.kFit, ye.current = s.kEff;
117
- const k = L(null);
117
+ const H = L(null);
118
118
  dt(() => {
119
119
  const e = w.current;
120
- k.current && e && (k.current.left != null && (e.scrollLeft = k.current.left), k.current.top != null && (e.scrollTop = k.current.top), k.current = null);
120
+ H.current && e && (H.current.left != null && (e.scrollLeft = H.current.left), H.current.top != null && (e.scrollTop = H.current.top), H.current = null);
121
121
  });
122
122
  const $ = q(
123
123
  (e, n) => {
124
124
  const t = w.current;
125
125
  if (!t) return;
126
126
  const o = we.current || 1, p = ye.current || 1, d = Math.max(o * 0.3, Math.min(Math.max(o, 1) * 40, p * e)), g = y ? t.scrollLeft : t.scrollTop, v = d / p;
127
- k.current = y ? { left: (g + n) * v - n } : { top: (g + n) * v - n }, pe(!1), me(d);
127
+ H.current = y ? { left: (g + n) * v - n } : { top: (g + n) * v - n }, pe(!1), me(d);
128
128
  },
129
129
  [y]
130
130
  );
@@ -137,7 +137,7 @@ const kt = {
137
137
  const t = n.getBoundingClientRect(), o = y ? e.clientX - t.left : e.clientY - t.top;
138
138
  $(Math.exp(-(e.deltaY || e.deltaX) * 22e-4), o);
139
139
  },
140
- V
140
+ z
141
141
  );
142
142
  const Ne = () => {
143
143
  const e = w.current;
@@ -151,22 +151,22 @@ const kt = {
151
151
  }, ot = (e) => {
152
152
  const n = window.innerWidth || 1200, t = window.innerHeight || 800, o = e.clientX < n * 0.55 ? Math.max(12, n - 340) : 16, p = Math.max(130, Math.min(e.clientY, t - 130));
153
153
  return { x: o, y: p };
154
- }, W = c.length ? c[0].start : x, it = c.length ? Math.max(W + 1, ...c.map((e) => e.end == null ? x : Math.max(e.end, e.start))) : x + 1, I = Math.max(1, it - W), Se = (e, n) => {
154
+ }, W = c.length ? c[0].start : k, it = c.length ? Math.max(W + 1, ...c.map((e) => e.end == null ? k : Math.max(e.end, e.start))) : k + 1, Y = Math.max(1, it - W), be = (e, n) => {
155
155
  const t = new Date(e);
156
156
  return n === "y" ? String(t.getFullYear()) : n === "my" ? t.toLocaleString("en", { month: "short" }) + " " + t.getFullYear() : n === "d" ? ht(e) : n === "cms" ? ke(e, !0) : ke(e);
157
157
  };
158
158
  let ee = [];
159
159
  if (U === "proportional" && s.mapT) {
160
- const e = s.mapT, n = e(W), t = y ? s.innerW : s.innerH, o = W + (t - n) / Math.max(1, s.innerSpan) * I, p = pt(W, o, Math.max(200, t - n), 90), d = p.step >= 360 * E ? "y" : p.step >= 28 * E ? "my" : p.step >= E ? "d" : p.step < 1e3 ? "cms" : "c";
160
+ const e = s.mapT, n = e(W), t = y ? s.innerW : s.innerH, o = W + (t - n) / Math.max(1, s.innerSpan) * Y, p = pt(W, o, Math.max(200, t - n), 90), d = p.step >= 360 * E ? "y" : p.step >= 28 * E ? "my" : p.step >= E ? "d" : p.step < 1e3 ? "cms" : "c";
161
161
  ee = p.list.map((g) => ({
162
162
  pos: Math.round(e(g.t)),
163
- label: Se(g.t, d)
163
+ label: be(g.t, d)
164
164
  }));
165
165
  } else {
166
- const e = I > 550 * E ? "y" : I > 60 * E ? "my" : I > 2 * E ? "d" : "c", n = y ? 72 : 18;
166
+ const e = Y > 550 * E ? "y" : Y > 60 * E ? "my" : Y > 2 * E ? "d" : "c", n = y ? 72 : 18;
167
167
  let t = null, o = -1e9;
168
168
  c.forEach((p, d) => {
169
- const g = Se(p.start, e), v = Math.round(s.posArr[d]);
169
+ const g = be(p.start, e), v = Math.round(s.posArr[d]);
170
170
  g !== t && v - o >= n && (ee.push({ pos: v, label: g }), t = g, o = v);
171
171
  });
172
172
  }
@@ -176,26 +176,26 @@ const kt = {
176
176
  const t = n.tag || "event";
177
177
  e.includes(t) || e.push(t);
178
178
  }), e;
179
- }, [c]), a = P != null && c.find((e) => e.id === P) || null, be = a ? a.end == null : !1, Y = F ? /* @__PURE__ */ l(
179
+ }, [c]), a = P != null && c.find((e) => e.id === P) || null, Se = a ? a.end == null : !1, R = A ? /* @__PURE__ */ l(
180
180
  gt,
181
181
  {
182
182
  className: h?.summary,
183
- placement: H,
183
+ placement: T,
184
184
  floatingDefaultPosition: Ve,
185
185
  items: c.map((e, n) => {
186
- const t = z.get(e.id), o = !t || !N.w && !N.h ? !0 : (!N.w || t.cardLeft < N.l + N.w && t.cardLeft + t.cardW > N.l) && (!N.h || t.cardTop < N.t + N.h && t.cardTop + t.cardH > N.t);
186
+ const t = I.get(e.id), o = !t || !N.w && !N.h ? !0 : (!N.w || t.cardLeft < N.l + N.w && t.cardLeft + t.cardW > N.l) && (!N.h || t.cardTop < N.t + N.h && t.cardTop + t.cardH > N.t);
187
187
  return {
188
188
  id: e.id,
189
189
  number: String(n + 1).padStart(2, "0"),
190
190
  label: e.title,
191
191
  color: M(e.tag),
192
- time: R(e.start),
192
+ time: F(e.start),
193
193
  inView: o,
194
194
  selected: P === e.id
195
195
  };
196
196
  }),
197
197
  onPick: (e) => {
198
- const n = z.get(e), t = w.current;
198
+ const n = I.get(e), t = w.current;
199
199
  if (!n || !t) return;
200
200
  const o = {};
201
201
  (t.clientWidth || !t.clientHeight) && (o.left = Math.max(0, n.dotX - t.clientWidth / 2)), t.clientHeight && (o.top = Math.max(0, n.dotY - t.clientHeight / 2)), xt(t, o);
@@ -210,7 +210,7 @@ const kt = {
210
210
  /* @__PURE__ */ l(
211
211
  He,
212
212
  {
213
- value: V,
213
+ value: z,
214
214
  options: [
215
215
  { value: "horizontal", label: "Horizontal" },
216
216
  { value: "vertical", label: "Vertical" }
@@ -255,9 +255,9 @@ const kt = {
255
255
  items: at.map((e) => ({ name: e, color: M(e) }))
256
256
  }
257
257
  ),
258
- H === "top" && Y,
258
+ T === "top" && R,
259
259
  /* @__PURE__ */ u("div", { className: r.layout, children: [
260
- H === "left" && Y,
260
+ T === "left" && R,
261
261
  /* @__PURE__ */ u("div", { className: r.main, children: [
262
262
  /* @__PURE__ */ l("div", { className: f(r.card, h?.card), children: /* @__PURE__ */ l(
263
263
  "div",
@@ -291,9 +291,9 @@ const kt = {
291
291
  ),
292
292
  y ? /* @__PURE__ */ l("div", { className: i.axisH, style: { top: s.axisY } }) : /* @__PURE__ */ l("div", { className: i.axisV, style: { left: s.axisX } }),
293
293
  c.map((e, n) => {
294
- const t = z.get(e.id);
294
+ const t = I.get(e.id);
295
295
  if (!t) return null;
296
- const o = e.end == null, d = (o ? x : e.end) - e.start, g = o || d > 0, v = ut(e, T), j = M(e.tag), Te = {
296
+ const o = e.end == null, d = (o ? k : e.end) - e.start, g = o || d > 0, v = ut(e, x), j = M(e.tag), Te = {
297
297
  index: n,
298
298
  number: String(n + 1).padStart(2, "0"),
299
299
  color: j,
@@ -332,10 +332,10 @@ const kt = {
332
332
  top: t.cardTop,
333
333
  width: t.cardW,
334
334
  height: t.cardH,
335
- opacity: T && !v ? 0.3 : 1,
336
- background: T && v ? "var(--crk-timeline-hl-wash-soft, #fff9e8)" : void 0,
337
- borderColor: T && v ? "var(--crk-timeline-hl-border, #e8b931)" : void 0,
338
- boxShadow: T && v ? "0 0 0 3px #f9e9b8" : "0 1px 3px rgba(35,32,28,.06)"
335
+ opacity: x && !v ? 0.3 : 1,
336
+ background: x && v ? "var(--crk-timeline-hl-wash-soft, #fff9e8)" : void 0,
337
+ borderColor: x && v ? "var(--crk-timeline-hl-border, #e8b931)" : void 0,
338
+ boxShadow: x && v ? "0 0 0 3px #f9e9b8" : "0 1px 3px rgba(35,32,28,.06)"
339
339
  },
340
340
  onClick: () => {
341
341
  O.wasDragSuppressed() || (_(null), Q(P === e.id ? null : e));
@@ -343,13 +343,13 @@ const kt = {
343
343
  onMouseEnter: (C) => {
344
344
  if (P === e.id) return;
345
345
  const te = (e.detail || "").length > 80;
346
- if (!A && !te && !o) return;
346
+ if (!V && !te && !o) return;
347
347
  const rt = ot(C);
348
348
  _({
349
349
  ...rt,
350
350
  id: e.id,
351
351
  title: e.title,
352
- time: R(e.start),
352
+ time: F(e.start),
353
353
  durLine: o ? "ongoing · " + D(d) + " so far" : d > 0 ? "duration " + D(d) : "instant event",
354
354
  detail: e.detail || ""
355
355
  });
@@ -360,11 +360,11 @@ const kt = {
360
360
  /* @__PURE__ */ l("span", { className: i.cardNum, children: Te.number }),
361
361
  " ",
362
362
  /* @__PURE__ */ l("span", { className: i.cardTagDot, style: { background: j } }),
363
- /* @__PURE__ */ l(Me, { text: e.title, query: T }),
363
+ /* @__PURE__ */ l(Me, { text: e.title, query: x }),
364
364
  o && /* @__PURE__ */ l("span", { className: f(r.pulseDot, i.cardOngoingDot) })
365
365
  ] }),
366
- /* @__PURE__ */ l("div", { className: i.cardTime, children: R(e.start) }),
367
- !t.condensed && !!e.detail && /* @__PURE__ */ l("div", { className: i.cardDetail, children: /* @__PURE__ */ l(Me, { text: e.detail, query: T }) }),
366
+ /* @__PURE__ */ l("div", { className: i.cardTime, children: F(e.start) }),
367
+ !t.condensed && !!e.detail && /* @__PURE__ */ l("div", { className: i.cardDetail, children: /* @__PURE__ */ l(Me, { text: e.detail, query: x }) }),
368
368
  g && /* @__PURE__ */ l("div", { className: i.cardDur, children: o ? "ongoing · " + D(d) : "took " + D(d) })
369
369
  ] })
370
370
  }
@@ -376,9 +376,10 @@ const kt = {
376
376
  )
377
377
  }
378
378
  ) }),
379
- /* @__PURE__ */ l("div", { className: f(r.footnote, h?.footnote), children: "Click a card to open details in the side panel · scroll zooms · drag pans · overlapping events stack around the axis with Z-shaped leads" })
379
+ /* @__PURE__ */ l("div", { className: f(r.footnote, h?.footnote), children: "Click a card to open details in the side panel · scroll zooms · drag pans · overlapping events stack around the axis with Z-shaped leads" }),
380
+ T === "bubble" && R
380
381
  ] }),
381
- a && K && /* @__PURE__ */ l("aside", { className: f(r.aside, i.drawer, h?.drawer), children: K(a, { close: () => Q(null), ongoing: be }) }),
382
+ a && K && /* @__PURE__ */ l("aside", { className: f(r.aside, i.drawer, h?.drawer), children: K(a, { close: () => Q(null), ongoing: Se }) }),
382
383
  a && !K && /* @__PURE__ */ u("aside", { className: f(r.aside, i.drawer, h?.drawer), children: [
383
384
  /* @__PURE__ */ u("div", { className: i.drawerHead, children: [
384
385
  /* @__PURE__ */ l(
@@ -406,35 +407,35 @@ const kt = {
406
407
  )
407
408
  ] }),
408
409
  /* @__PURE__ */ l("div", { className: i.drawerTitle, children: a.title }),
409
- /* @__PURE__ */ l("div", { className: i.drawerTiming, children: R(a.start) + (be ? " · ongoing, " + D(x - a.start) + " so far" : a.end > a.start ? " → " + R(a.end) + " · " + D(a.end - a.start) : "") }),
410
+ /* @__PURE__ */ l("div", { className: i.drawerTiming, children: F(a.start) + (Se ? " · ongoing, " + D(k - a.start) + " so far" : a.end > a.start ? " → " + F(a.end) + " · " + D(a.end - a.start) : "") }),
410
411
  /* @__PURE__ */ l("div", { className: i.drawerDetail, children: a.detail || "—" }),
411
412
  /* @__PURE__ */ l("div", { className: r.asideSection, children: "Raw event" }),
412
413
  /* @__PURE__ */ l("pre", { className: r.asideRaw, children: JSON.stringify(a, null, 2) })
413
414
  ] }),
414
- (H === "right" || H === "floating") && Y
415
+ (T === "right" || T === "floating") && R
415
416
  ] }),
416
- H === "bottom" && Y,
417
- S && (() => {
418
- const e = c.find((o) => o.id === S.id), n = e ? c.indexOf(e) : -1, t = e && A ? A(e, {
417
+ T === "bottom" && R,
418
+ b && (() => {
419
+ const e = c.find((o) => o.id === b.id), n = e ? c.indexOf(e) : -1, t = e && V ? V(e, {
419
420
  index: n,
420
421
  number: String(n + 1).padStart(2, "0"),
421
422
  color: M(e.tag),
422
423
  ongoing: e.end == null,
423
- condensed: z.get(e.id)?.condensed ?? !1,
424
- durationMs: (e.end == null ? x : e.end) - e.start
424
+ condensed: I.get(e.id)?.condensed ?? !1,
425
+ durationMs: (e.end == null ? k : e.end) - e.start
425
426
  }) : void 0;
426
- return A && t == null ? null : /* @__PURE__ */ l(yt, { x: S.x, y: S.y, className: h?.tooltip, children: t !== void 0 ? t : /* @__PURE__ */ u(ne, { children: [
427
- /* @__PURE__ */ l("div", { className: r.tooltipTitle, children: S.title }),
427
+ return V && t == null ? null : /* @__PURE__ */ l(yt, { x: b.x, y: b.y, className: h?.tooltip, children: t !== void 0 ? t : /* @__PURE__ */ u(ne, { children: [
428
+ /* @__PURE__ */ l("div", { className: r.tooltipTitle, children: b.title }),
428
429
  /* @__PURE__ */ l(
429
430
  "div",
430
431
  {
431
432
  className: f(r.tooltipLine, r.tooltipMono),
432
433
  style: { marginTop: 4 },
433
- children: S.time
434
+ children: b.time
434
435
  }
435
436
  ),
436
- /* @__PURE__ */ l("div", { className: r.tooltipLine, children: S.durLine }),
437
- S.detail && /* @__PURE__ */ l("div", { className: r.tooltipDim, style: { marginTop: 5 }, children: S.detail })
437
+ /* @__PURE__ */ l("div", { className: r.tooltipLine, children: b.durLine }),
438
+ b.detail && /* @__PURE__ */ l("div", { className: r.tooltipDim, style: { marginTop: 5 }, children: b.detail })
438
439
  ] }) });
439
440
  })()
440
441
  ] });
@@ -1,111 +1,127 @@
1
- const t = "crk-root-z0SDl", o = "crk-toolbar-bi8on", s = "crk-toolbarText-FsDXp", r = "crk-toolbarTitle-Rb9N0", m = "crk-toolbarMeta-E06cE", c = "crk-controls-8bff6", n = "crk-zoomBtn-NhfsT", a = "crk-zoomPct-l6Kb7", e = "crk-fitBtn-7CPVN", i = "crk-fitBtnActive-VGm-i", l = "crk-controlsHint-9W3ak", u = "crk-searchInput-1KGtO", y = "crk-segmented-ewtNI", k = "crk-segmentedBtn-8jCDo", d = "crk-segmentedBtnActive-fFz-u", p = "crk-legend-ba0us", g = "crk-legendItem-WV0US", b = "crk-legendDot-t2YBC", B = "crk-layout-odptV", w = "crk-main-3O04o", D = "crk-card-HLtsS", C = "crk-scroller-fLmrw", L = "crk-footnote-5H-AC", R = "crk-aside-xGL6z", T = "crk-asideClose-xWoXo", f = "crk-asideSection-ArSn1", H = "crk-asideRaw-233n9", z = "crk-summary-S5D5Y", S = "crk-summaryHeader-KiURn", G = "crk-summaryCount-Hgt1x", A = "crk-summaryList-KHyfB", I = "crk-summaryRow-9AC-c", V = "crk-summaryRowInView-Vap6M", F = "crk-summaryRowSelected-WTZUP", P = "crk-summaryNum-i8PC3", x = "crk-summaryDot-AcsLd", N = "crk-summaryLabel-DR8G2", h = "crk-summaryTime-mzS5x", v = "crk-summaryHorizontal--wsta", M = "crk-summaryTop-sLyWG", E = "crk-summaryBottom-OV6RP", W = "crk-summaryListGrid-POwB0", K = "crk-summaryFloating-6Yac4", O = "crk-summaryFloatingCard-6A5Ic", Y = "crk-summaryHandle--chiD", U = "crk-summaryGrip-qVC6v", X = "crk-tooltip-ot-iF", q = "crk-tooltipTitle-CxGBY", Z = "crk-tooltipLine-bqSen", j = "crk-tooltipMono-mbJwE", J = "crk-tooltipDim-hEEP-", Q = "crk-mark-XZVFm", _ = "crk-pulseDot-usPRN", $ = {
2
- root: t,
3
- toolbar: o,
4
- toolbarText: s,
5
- toolbarTitle: r,
6
- toolbarMeta: m,
7
- controls: c,
8
- zoomBtn: n,
9
- zoomPct: a,
10
- fitBtn: e,
11
- fitBtnActive: i,
1
+ const o = "crk-root-z0SDl", t = "crk-toolbar-bi8on", m = "crk-toolbarText-FsDXp", s = "crk-toolbarTitle-Rb9N0", r = "crk-toolbarMeta-E06cE", a = "crk-controls-8bff6", c = "crk-zoomBtn-NhfsT", e = "crk-zoomPct-l6Kb7", n = "crk-fitBtn-7CPVN", u = "crk-fitBtnActive-VGm-i", l = "crk-controlsHint-9W3ak", i = "crk-searchInput-1KGtO", y = "crk-segmented-ewtNI", k = "crk-segmentedBtn-8jCDo", d = "crk-segmentedBtnActive-fFz-u", b = "crk-legend-ba0us", B = "crk-legendItem-WV0US", p = "crk-legendDot-t2YBC", g = "crk-layout-odptV", C = "crk-main-3O04o", T = "crk-card-HLtsS", w = "crk-scroller-fLmrw", D = "crk-footnote-5H-AC", H = "crk-aside-xGL6z", L = "crk-asideClose-xWoXo", R = "crk-asideSection-ArSn1", f = "crk-asideRaw-233n9", G = "crk-summary-S5D5Y", A = "crk-summaryHeader-KiURn", h = "crk-summaryCount-Hgt1x", F = "crk-summaryList-KHyfB", S = "crk-summaryRow-9AC-c", z = "crk-summaryRowInView-Vap6M", P = "crk-summaryRowSelected-WTZUP", V = "crk-summaryNum-i8PC3", I = "crk-summaryDot-AcsLd", x = "crk-summaryLabel-DR8G2", M = "crk-summaryTime-mzS5x", N = "crk-summaryHorizontal--wsta", v = "crk-summaryTop-sLyWG", E = "crk-summaryBottom-OV6RP", W = "crk-summaryListGrid-POwB0", O = "crk-summaryBubbleAnchor-VJ9XE", X = "crk-summaryBubble-bovnu", K = "crk-summaryBubbleGlyph-qmhBS", U = "crk-summaryBubblePanel-MFOE4", Y = "crk-summaryBubbleCard-G0AMd", q = "crk-summaryHeadTools-oU-0D", J = "crk-summaryCollapse-JNDjo", j = "crk-summaryFootnote-oTXbW", Z = "crk-summaryFloating-6Yac4", Q = "crk-summaryFloatingCard-6A5Ic", _ = "crk-summaryHandle--chiD", $ = "crk-summaryGrip-qVC6v", oo = "crk-tooltip-ot-iF", to = "crk-tooltipTitle-CxGBY", mo = "crk-tooltipLine-bqSen", so = "crk-tooltipMono-mbJwE", ro = "crk-tooltipDim-hEEP-", ao = "crk-mark-XZVFm", co = "crk-pulseDot-usPRN", eo = {
2
+ root: o,
3
+ toolbar: t,
4
+ toolbarText: m,
5
+ toolbarTitle: s,
6
+ toolbarMeta: r,
7
+ controls: a,
8
+ zoomBtn: c,
9
+ zoomPct: e,
10
+ fitBtn: n,
11
+ fitBtnActive: u,
12
12
  controlsHint: l,
13
- searchInput: u,
13
+ searchInput: i,
14
14
  segmented: y,
15
15
  segmentedBtn: k,
16
16
  segmentedBtnActive: d,
17
- legend: p,
18
- legendItem: g,
19
- legendDot: b,
20
- layout: B,
21
- main: w,
22
- card: D,
23
- scroller: C,
24
- footnote: L,
25
- aside: R,
26
- asideClose: T,
27
- asideSection: f,
28
- asideRaw: H,
29
- summary: z,
30
- summaryHeader: S,
31
- summaryCount: G,
32
- summaryList: A,
33
- summaryRow: I,
34
- summaryRowInView: V,
35
- summaryRowSelected: F,
36
- summaryNum: P,
37
- summaryDot: x,
38
- summaryLabel: N,
39
- summaryTime: h,
40
- summaryHorizontal: v,
41
- summaryTop: M,
17
+ legend: b,
18
+ legendItem: B,
19
+ legendDot: p,
20
+ layout: g,
21
+ main: C,
22
+ card: T,
23
+ scroller: w,
24
+ footnote: D,
25
+ aside: H,
26
+ asideClose: L,
27
+ asideSection: R,
28
+ asideRaw: f,
29
+ summary: G,
30
+ summaryHeader: A,
31
+ summaryCount: h,
32
+ summaryList: F,
33
+ summaryRow: S,
34
+ summaryRowInView: z,
35
+ summaryRowSelected: P,
36
+ summaryNum: V,
37
+ summaryDot: I,
38
+ summaryLabel: x,
39
+ summaryTime: M,
40
+ summaryHorizontal: N,
41
+ summaryTop: v,
42
42
  summaryBottom: E,
43
43
  summaryListGrid: W,
44
- summaryFloating: K,
45
- summaryFloatingCard: O,
46
- summaryHandle: Y,
47
- summaryGrip: U,
48
- tooltip: X,
49
- tooltipTitle: q,
50
- tooltipLine: Z,
51
- tooltipMono: j,
52
- tooltipDim: J,
53
- mark: Q,
54
- pulseDot: _
44
+ summaryBubbleAnchor: O,
45
+ summaryBubble: X,
46
+ summaryBubbleGlyph: K,
47
+ summaryBubblePanel: U,
48
+ summaryBubbleCard: Y,
49
+ summaryHeadTools: q,
50
+ summaryCollapse: J,
51
+ summaryFootnote: j,
52
+ summaryFloating: Z,
53
+ summaryFloatingCard: Q,
54
+ summaryHandle: _,
55
+ summaryGrip: $,
56
+ tooltip: oo,
57
+ tooltipTitle: to,
58
+ tooltipLine: mo,
59
+ tooltipMono: so,
60
+ tooltipDim: ro,
61
+ mark: ao,
62
+ pulseDot: co
55
63
  };
56
64
  export {
57
- R as aside,
58
- T as asideClose,
59
- H as asideRaw,
60
- f as asideSection,
61
- D as card,
62
- c as controls,
65
+ H as aside,
66
+ L as asideClose,
67
+ f as asideRaw,
68
+ R as asideSection,
69
+ T as card,
70
+ a as controls,
63
71
  l as controlsHint,
64
- $ as default,
65
- e as fitBtn,
66
- i as fitBtnActive,
67
- L as footnote,
68
- B as layout,
69
- p as legend,
70
- b as legendDot,
71
- g as legendItem,
72
- w as main,
73
- Q as mark,
74
- _ as pulseDot,
75
- t as root,
76
- C as scroller,
77
- u as searchInput,
72
+ eo as default,
73
+ n as fitBtn,
74
+ u as fitBtnActive,
75
+ D as footnote,
76
+ g as layout,
77
+ b as legend,
78
+ p as legendDot,
79
+ B as legendItem,
80
+ C as main,
81
+ ao as mark,
82
+ co as pulseDot,
83
+ o as root,
84
+ w as scroller,
85
+ i as searchInput,
78
86
  y as segmented,
79
87
  k as segmentedBtn,
80
88
  d as segmentedBtnActive,
81
- z as summary,
89
+ G as summary,
82
90
  E as summaryBottom,
83
- G as summaryCount,
84
- x as summaryDot,
85
- K as summaryFloating,
86
- O as summaryFloatingCard,
87
- U as summaryGrip,
88
- Y as summaryHandle,
89
- S as summaryHeader,
90
- v as summaryHorizontal,
91
- N as summaryLabel,
92
- A as summaryList,
91
+ X as summaryBubble,
92
+ O as summaryBubbleAnchor,
93
+ Y as summaryBubbleCard,
94
+ K as summaryBubbleGlyph,
95
+ U as summaryBubblePanel,
96
+ J as summaryCollapse,
97
+ h as summaryCount,
98
+ I as summaryDot,
99
+ Z as summaryFloating,
100
+ Q as summaryFloatingCard,
101
+ j as summaryFootnote,
102
+ $ as summaryGrip,
103
+ _ as summaryHandle,
104
+ q as summaryHeadTools,
105
+ A as summaryHeader,
106
+ N as summaryHorizontal,
107
+ x as summaryLabel,
108
+ F as summaryList,
93
109
  W as summaryListGrid,
94
- P as summaryNum,
95
- I as summaryRow,
96
- V as summaryRowInView,
97
- F as summaryRowSelected,
98
- h as summaryTime,
99
- M as summaryTop,
100
- o as toolbar,
101
- m as toolbarMeta,
102
- s as toolbarText,
103
- r as toolbarTitle,
104
- X as tooltip,
105
- J as tooltipDim,
106
- Z as tooltipLine,
107
- j as tooltipMono,
108
- q as tooltipTitle,
109
- n as zoomBtn,
110
- a as zoomPct
110
+ V as summaryNum,
111
+ S as summaryRow,
112
+ z as summaryRowInView,
113
+ P as summaryRowSelected,
114
+ M as summaryTime,
115
+ v as summaryTop,
116
+ t as toolbar,
117
+ r as toolbarMeta,
118
+ m as toolbarText,
119
+ s as toolbarTitle,
120
+ oo as tooltip,
121
+ ro as tooltipDim,
122
+ mo as tooltipLine,
123
+ so as tooltipMono,
124
+ to as tooltipTitle,
125
+ c as zoomBtn,
126
+ e as zoomPct
111
127
  };
@@ -30,10 +30,13 @@ export declare function TimelineSegmented<T extends string>({ value, options, on
30
30
  }): import("react/jsx-runtime").JSX.Element;
31
31
  /**
32
32
  * Where the summary panel sits: docked beside the timeline (`'left'` /
33
- * `'right'`), as a full-width block (`'top'` / `'bottom'`), or `'floating'` —
34
- * a draggable palette over the timeline (grab it by its header).
33
+ * `'right'`), as a full-width block (`'top'` / `'bottom'`), `'floating'` —
34
+ * a draggable palette over the timeline (grab it by its header) — or
35
+ * `'bubble'` — a collapsed pill anchored bottom-left of the timeline that
36
+ * expands into a draggable panel in place and never permanently occupies
37
+ * canvas width.
35
38
  */
36
- export type TimelineSummaryPlacement = 'left' | 'right' | 'top' | 'bottom' | 'floating';
39
+ export type TimelineSummaryPlacement = 'left' | 'right' | 'top' | 'bottom' | 'floating' | 'bubble';
37
40
  /** One dense row of the summary panel. */
38
41
  export interface TimelineSummaryItem {
39
42
  id: string;
@@ -54,14 +57,21 @@ export interface TimelineSummaryItem {
54
57
  * the timeline is panned the panel auto-scrolls to keep the band centered
55
58
  * (suppressed while the pointer is over the panel so it can be scrolled
56
59
  * independently). Clicking a row asks the timeline to scroll to that event.
60
+ *
61
+ * The `'bubble'` placement collapses the panel into a small pill anchored
62
+ * bottom-left of the timeline; clicking it expands the panel in place
63
+ * (draggable by its header), and collapsing always returns the bubble to its
64
+ * home corner — the dragged position is deliberately not persisted.
57
65
  */
58
- export declare function TimelineSummary({ heading, items, onPick, placement, floatingDefaultPosition, className, }: {
66
+ export declare function TimelineSummary({ heading, items, onPick, placement, floatingDefaultPosition, bubbleGlyphColors, className, }: {
59
67
  heading?: ReactNode;
60
68
  items: TimelineSummaryItem[];
61
69
  onPick: (id: string) => void;
62
70
  placement?: TimelineSummaryPlacement;
63
71
  /** Floating placement: initial offset from the anchored top-left corner. */
64
72
  floatingDefaultPosition?: DraggablePosition;
73
+ /** Bubble placement: colors of the stacked strokes in the collapsed glyph. */
74
+ bubbleGlyphColors?: string[];
65
75
  className?: string;
66
76
  }): import("react/jsx-runtime").JSX.Element;
67
77
  /** Fixed dark tooltip; positioned by the caller, opacity-only fade. */