@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.
- package/AGENTS.md +2 -2
- package/CHANGELOG.md +55 -0
- package/components/Timeline/GanttTimeline.js +66 -64
- package/components/Timeline/HistoryTimeline.js +58 -57
- package/components/Timeline/Timeline.module.scss.js +112 -96
- package/components/Timeline/TimelineShared.d.ts +14 -4
- package/components/Timeline/TimelineShared.js +135 -95
- package/components/Timeline/TraceTimeline.d.ts +40 -9
- package/components/Timeline/TraceTimeline.js +598 -370
- package/components/Timeline/TraceTimeline.module.scss.js +163 -103
- package/components/Timeline/index.d.ts +1 -1
- package/index.css +1 -1
- package/index.d.ts +1 -1
- package/index.layered.css +1 -1
- package/llms.txt +12 -7
- package/manifest.json +29 -8
- package/package.json +1 -1
|
@@ -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
|
|
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
|
|
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
|
|
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:
|
|
45
|
-
summaryPlacement:
|
|
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:
|
|
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] =
|
|
57
|
+
} = Ce, w = L(null), [qe, Xe] = S(
|
|
58
58
|
() => De ?? (typeof window < "u" && window.innerWidth < 700 ? "vertical" : "horizontal")
|
|
59
|
-
),
|
|
60
|
-
fe.current =
|
|
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
|
-
|
|
72
|
+
A && B();
|
|
73
73
|
});
|
|
74
|
-
const [$e, Qe] =
|
|
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),
|
|
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:
|
|
108
|
+
orientation: z,
|
|
109
109
|
spacing: U,
|
|
110
110
|
containerWidth: tt,
|
|
111
111
|
viewportHeight: typeof window < "u" && window.innerHeight || 800,
|
|
112
|
-
now:
|
|
112
|
+
now: k,
|
|
113
113
|
k: he ? "fit" : Ue
|
|
114
114
|
}
|
|
115
|
-
),
|
|
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
|
|
117
|
+
const H = L(null);
|
|
118
118
|
dt(() => {
|
|
119
119
|
const e = w.current;
|
|
120
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 :
|
|
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) *
|
|
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:
|
|
163
|
+
label: be(g.t, d)
|
|
164
164
|
}));
|
|
165
165
|
} else {
|
|
166
|
-
const e =
|
|
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 =
|
|
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,
|
|
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:
|
|
183
|
+
placement: T,
|
|
184
184
|
floatingDefaultPosition: Ve,
|
|
185
185
|
items: c.map((e, n) => {
|
|
186
|
-
const 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:
|
|
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 =
|
|
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:
|
|
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
|
-
|
|
258
|
+
T === "top" && R,
|
|
259
259
|
/* @__PURE__ */ u("div", { className: r.layout, children: [
|
|
260
|
-
|
|
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 =
|
|
294
|
+
const t = I.get(e.id);
|
|
295
295
|
if (!t) return null;
|
|
296
|
-
const o = e.end == null, d = (o ?
|
|
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:
|
|
336
|
-
background:
|
|
337
|
-
borderColor:
|
|
338
|
-
boxShadow:
|
|
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 (!
|
|
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:
|
|
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:
|
|
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:
|
|
367
|
-
!t.condensed && !!e.detail && /* @__PURE__ */ l("div", { className: i.cardDetail, children: /* @__PURE__ */ l(Me, { text: e.detail, query:
|
|
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:
|
|
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:
|
|
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
|
-
(
|
|
415
|
+
(T === "right" || T === "floating") && R
|
|
415
416
|
] }),
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
const e = c.find((o) => o.id ===
|
|
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:
|
|
424
|
-
durationMs: (e.end == null ?
|
|
424
|
+
condensed: I.get(e.id)?.condensed ?? !1,
|
|
425
|
+
durationMs: (e.end == null ? k : e.end) - e.start
|
|
425
426
|
}) : void 0;
|
|
426
|
-
return
|
|
427
|
-
/* @__PURE__ */ l("div", { className: r.tooltipTitle, children:
|
|
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:
|
|
434
|
+
children: b.time
|
|
434
435
|
}
|
|
435
436
|
),
|
|
436
|
-
/* @__PURE__ */ l("div", { className: r.tooltipLine, children:
|
|
437
|
-
|
|
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
|
|
2
|
-
root:
|
|
3
|
-
toolbar:
|
|
4
|
-
toolbarText:
|
|
5
|
-
toolbarTitle:
|
|
6
|
-
toolbarMeta:
|
|
7
|
-
controls:
|
|
8
|
-
zoomBtn:
|
|
9
|
-
zoomPct:
|
|
10
|
-
fitBtn:
|
|
11
|
-
fitBtnActive:
|
|
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:
|
|
13
|
+
searchInput: i,
|
|
14
14
|
segmented: y,
|
|
15
15
|
segmentedBtn: k,
|
|
16
16
|
segmentedBtnActive: d,
|
|
17
|
-
legend:
|
|
18
|
-
legendItem:
|
|
19
|
-
legendDot:
|
|
20
|
-
layout:
|
|
21
|
-
main:
|
|
22
|
-
card:
|
|
23
|
-
scroller:
|
|
24
|
-
footnote:
|
|
25
|
-
aside:
|
|
26
|
-
asideClose:
|
|
27
|
-
asideSection:
|
|
28
|
-
asideRaw:
|
|
29
|
-
summary:
|
|
30
|
-
summaryHeader:
|
|
31
|
-
summaryCount:
|
|
32
|
-
summaryList:
|
|
33
|
-
summaryRow:
|
|
34
|
-
summaryRowInView:
|
|
35
|
-
summaryRowSelected:
|
|
36
|
-
summaryNum:
|
|
37
|
-
summaryDot:
|
|
38
|
-
summaryLabel:
|
|
39
|
-
summaryTime:
|
|
40
|
-
summaryHorizontal:
|
|
41
|
-
summaryTop:
|
|
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
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
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
|
-
|
|
89
|
+
G as summary,
|
|
82
90
|
E as summaryBottom,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
U as
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
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
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
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'`),
|
|
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. */
|