@overdoser/react-toolkit 0.9.0 → 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 +108 -0
- package/README.md +2 -0
- package/components/Timeline/GanttTimeline.js +195 -186
- package/components/Timeline/HistoryTimeline.js +178 -177
- 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 +610 -357
- package/components/Timeline/TraceTimeline.module.scss.js +154 -88
- package/components/Timeline/index.d.ts +1 -1
- package/components/Timeline/timelineCore.d.ts +12 -2
- package/components/Timeline/timelineCore.js +103 -45
- package/index.css +1 -1
- package/index.d.ts +1 -1
- package/index.layered.css +1 -1
- package/llms.txt +14 -8
- package/manifest.json +29 -8
- package/package.json +2 -1
|
@@ -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. */
|
|
@@ -1,115 +1,132 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as
|
|
1
|
+
import { jsxs as c, Fragment as B, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as D, useState as E, useEffect as L } from "react";
|
|
3
3
|
import m from "clsx";
|
|
4
4
|
import e from "./Timeline.module.scss.js";
|
|
5
|
-
import { highlightParts as
|
|
6
|
-
import { Draggable as
|
|
7
|
-
function
|
|
5
|
+
import { highlightParts as R } from "./timelineCore.js";
|
|
6
|
+
import { Draggable as w } from "../Draggable/Draggable.js";
|
|
7
|
+
function O({
|
|
8
8
|
items: l,
|
|
9
|
-
className:
|
|
9
|
+
className: r
|
|
10
10
|
}) {
|
|
11
|
-
return l.length ? /* @__PURE__ */ n("div", { className: m(e.legend,
|
|
12
|
-
/* @__PURE__ */ n("span", { className: e.legendDot, style: { background:
|
|
13
|
-
|
|
14
|
-
] },
|
|
11
|
+
return l.length ? /* @__PURE__ */ n("div", { className: m(e.legend, r), children: l.map((s) => /* @__PURE__ */ c("span", { className: e.legendItem, children: [
|
|
12
|
+
/* @__PURE__ */ n("span", { className: e.legendDot, style: { background: s.color } }),
|
|
13
|
+
s.name
|
|
14
|
+
] }, s.name)) }) : null;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function q({
|
|
17
17
|
zoomPct: l,
|
|
18
|
-
fitActive:
|
|
19
|
-
onZoomIn:
|
|
20
|
-
onZoomOut:
|
|
18
|
+
fitActive: r,
|
|
19
|
+
onZoomIn: s,
|
|
20
|
+
onZoomOut: a,
|
|
21
21
|
onFit: i,
|
|
22
|
-
hint:
|
|
23
|
-
children:
|
|
24
|
-
className:
|
|
22
|
+
hint: u,
|
|
23
|
+
children: p,
|
|
24
|
+
className: y
|
|
25
25
|
}) {
|
|
26
|
-
return /* @__PURE__ */
|
|
27
|
-
|
|
28
|
-
/* @__PURE__ */ n("button", { type: "button", className: e.zoomBtn, title: "Zoom out", onClick:
|
|
26
|
+
return /* @__PURE__ */ c("div", { className: m(e.controls, y), children: [
|
|
27
|
+
p,
|
|
28
|
+
/* @__PURE__ */ n("button", { type: "button", className: e.zoomBtn, title: "Zoom out", onClick: a, children: "−" }),
|
|
29
29
|
/* @__PURE__ */ n("span", { className: e.zoomPct, children: l }),
|
|
30
|
-
/* @__PURE__ */ n("button", { type: "button", className: e.zoomBtn, title: "Zoom in", onClick:
|
|
30
|
+
/* @__PURE__ */ n("button", { type: "button", className: e.zoomBtn, title: "Zoom in", onClick: s, children: "+" }),
|
|
31
31
|
/* @__PURE__ */ n(
|
|
32
32
|
"button",
|
|
33
33
|
{
|
|
34
34
|
type: "button",
|
|
35
|
-
className: m(e.fitBtn,
|
|
35
|
+
className: m(e.fitBtn, r && e.fitBtnActive),
|
|
36
36
|
onClick: i,
|
|
37
37
|
children: "Fit"
|
|
38
38
|
}
|
|
39
39
|
),
|
|
40
|
-
|
|
40
|
+
u ? /* @__PURE__ */ n("span", { className: e.controlsHint, children: u }) : null
|
|
41
41
|
] });
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function G({
|
|
44
44
|
value: l,
|
|
45
|
-
options:
|
|
46
|
-
onChange:
|
|
45
|
+
options: r,
|
|
46
|
+
onChange: s
|
|
47
47
|
}) {
|
|
48
|
-
return /* @__PURE__ */ n("div", { className: e.segmented, children:
|
|
48
|
+
return /* @__PURE__ */ n("div", { className: e.segmented, children: r.map((a) => /* @__PURE__ */ n(
|
|
49
49
|
"button",
|
|
50
50
|
{
|
|
51
51
|
type: "button",
|
|
52
|
-
title:
|
|
53
|
-
className: m(e.segmentedBtn,
|
|
54
|
-
onClick: () =>
|
|
55
|
-
children:
|
|
52
|
+
title: a.title,
|
|
53
|
+
className: m(e.segmentedBtn, a.value === l && e.segmentedBtnActive),
|
|
54
|
+
onClick: () => s(a.value),
|
|
55
|
+
children: a.label
|
|
56
56
|
},
|
|
57
|
-
|
|
57
|
+
a.value
|
|
58
58
|
)) });
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function K({
|
|
61
61
|
heading: l = "Events",
|
|
62
|
-
items:
|
|
63
|
-
onPick:
|
|
64
|
-
placement:
|
|
62
|
+
items: r,
|
|
63
|
+
onPick: s,
|
|
64
|
+
placement: a = "left",
|
|
65
65
|
floatingDefaultPosition: i,
|
|
66
|
-
|
|
66
|
+
bubbleGlyphColors: u,
|
|
67
|
+
className: p
|
|
67
68
|
}) {
|
|
68
|
-
const
|
|
69
|
-
let
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
const y = D(null), N = D(!1), [z, C] = E(!1), [A, T] = E({ x: 0, y: 0 }), d = a === "bubble", b = a === "floating", k = a === "top" || a === "bottom";
|
|
70
|
+
let h = -1, f = -1;
|
|
71
|
+
r.forEach((t, o) => {
|
|
72
|
+
t.inView && (h < 0 && (h = o), f = o);
|
|
72
73
|
});
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
const
|
|
76
|
-
if (!
|
|
77
|
-
const o =
|
|
78
|
-
if (!
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
}, [
|
|
82
|
-
const
|
|
83
|
-
/* @__PURE__ */
|
|
84
|
-
|
|
74
|
+
const H = h === 0 && f === r.length - 1;
|
|
75
|
+
L(() => {
|
|
76
|
+
const t = y.current;
|
|
77
|
+
if (!t || N.current || h < 0 || H) return;
|
|
78
|
+
const o = t.querySelectorAll("[data-timeline-summary-row]"), P = o[h], v = o[f];
|
|
79
|
+
if (!P || !v) return;
|
|
80
|
+
const F = (P.offsetTop + v.offsetTop + v.offsetHeight) / 2;
|
|
81
|
+
t.scrollTop = Math.max(0, F - t.clientHeight / 2);
|
|
82
|
+
}, [h, f, H]);
|
|
83
|
+
const x = /* @__PURE__ */ c(B, { children: [
|
|
84
|
+
/* @__PURE__ */ c("span", { children: [
|
|
85
|
+
(b || d) && /* @__PURE__ */ n("span", { className: e.summaryGrip, "aria-hidden": !0, children: "⠿" }),
|
|
85
86
|
l
|
|
86
87
|
] }),
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
-
|
|
88
|
+
d ? /* @__PURE__ */ c("span", { className: e.summaryHeadTools, children: [
|
|
89
|
+
/* @__PURE__ */ n("span", { className: e.summaryCount, children: r.length }),
|
|
90
|
+
/* @__PURE__ */ n(
|
|
91
|
+
"button",
|
|
92
|
+
{
|
|
93
|
+
type: "button",
|
|
94
|
+
className: e.summaryCollapse,
|
|
95
|
+
"aria-label": "Collapse event summary",
|
|
96
|
+
onClick: (t) => {
|
|
97
|
+
t.stopPropagation(), C(!1), T({ x: 0, y: 0 });
|
|
98
|
+
},
|
|
99
|
+
onPointerDown: (t) => t.stopPropagation(),
|
|
100
|
+
children: "×"
|
|
101
|
+
}
|
|
102
|
+
)
|
|
103
|
+
] }) : /* @__PURE__ */ n("span", { className: e.summaryCount, children: r.length })
|
|
104
|
+
] }), g = /* @__PURE__ */ c(
|
|
89
105
|
"div",
|
|
90
106
|
{
|
|
91
107
|
className: m(
|
|
92
108
|
e.summary,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
109
|
+
k && e.summaryHorizontal,
|
|
110
|
+
a === "top" && e.summaryTop,
|
|
111
|
+
a === "bottom" && e.summaryBottom,
|
|
112
|
+
b && e.summaryFloatingCard,
|
|
113
|
+
d && e.summaryBubbleCard,
|
|
114
|
+
p
|
|
98
115
|
),
|
|
99
116
|
onMouseEnter: () => {
|
|
100
|
-
|
|
117
|
+
N.current = !0;
|
|
101
118
|
},
|
|
102
119
|
onMouseLeave: () => {
|
|
103
|
-
|
|
120
|
+
N.current = !1;
|
|
104
121
|
},
|
|
105
122
|
children: [
|
|
106
|
-
|
|
123
|
+
b || d ? /* @__PURE__ */ n(w.Handle, { className: m(e.summaryHeader, e.summaryHandle), children: x }) : /* @__PURE__ */ n("div", { className: e.summaryHeader, children: x }),
|
|
107
124
|
/* @__PURE__ */ n(
|
|
108
125
|
"div",
|
|
109
126
|
{
|
|
110
|
-
ref:
|
|
111
|
-
className: m(e.summaryList,
|
|
112
|
-
children:
|
|
127
|
+
ref: y,
|
|
128
|
+
className: m(e.summaryList, k && e.summaryListGrid),
|
|
129
|
+
children: r.map((t) => /* @__PURE__ */ c(
|
|
113
130
|
"div",
|
|
114
131
|
{
|
|
115
132
|
"data-timeline-summary-row": !0,
|
|
@@ -117,57 +134,80 @@ function M({
|
|
|
117
134
|
tabIndex: 0,
|
|
118
135
|
className: m(
|
|
119
136
|
e.summaryRow,
|
|
120
|
-
|
|
121
|
-
|
|
137
|
+
t.inView && e.summaryRowInView,
|
|
138
|
+
t.selected && e.summaryRowSelected
|
|
122
139
|
),
|
|
123
|
-
onClick: () =>
|
|
140
|
+
onClick: () => s(t.id),
|
|
124
141
|
onKeyDown: (o) => {
|
|
125
|
-
(o.key === "Enter" || o.key === " ") && (o.preventDefault(),
|
|
142
|
+
(o.key === "Enter" || o.key === " ") && (o.preventDefault(), s(t.id));
|
|
126
143
|
},
|
|
127
144
|
children: [
|
|
128
|
-
/* @__PURE__ */ n("span", { className: e.summaryNum, children:
|
|
129
|
-
/* @__PURE__ */ n("span", { className: e.summaryDot, style: { background:
|
|
130
|
-
/* @__PURE__ */ n("span", { className: e.summaryLabel, children:
|
|
131
|
-
|
|
145
|
+
/* @__PURE__ */ n("span", { className: e.summaryNum, children: t.number }),
|
|
146
|
+
/* @__PURE__ */ n("span", { className: e.summaryDot, style: { background: t.color } }),
|
|
147
|
+
/* @__PURE__ */ n("span", { className: e.summaryLabel, children: t.label }),
|
|
148
|
+
t.time && /* @__PURE__ */ n("span", { className: e.summaryTime, children: t.time })
|
|
132
149
|
]
|
|
133
150
|
},
|
|
134
|
-
|
|
151
|
+
t.id
|
|
135
152
|
))
|
|
136
153
|
}
|
|
137
|
-
)
|
|
154
|
+
),
|
|
155
|
+
d && /* @__PURE__ */ n("div", { className: e.summaryFootnote, children: "Tinted rows are in the viewport" })
|
|
138
156
|
]
|
|
139
157
|
}
|
|
140
158
|
);
|
|
141
|
-
return
|
|
142
|
-
|
|
159
|
+
return d ? z ? /* @__PURE__ */ n("div", { className: e.summaryBubbleAnchor, children: /* @__PURE__ */ n(
|
|
160
|
+
w,
|
|
161
|
+
{
|
|
162
|
+
className: e.summaryBubblePanel,
|
|
163
|
+
bounds: "viewport",
|
|
164
|
+
position: A,
|
|
165
|
+
onDrag: T,
|
|
166
|
+
children: g
|
|
167
|
+
}
|
|
168
|
+
) }) : /* @__PURE__ */ n("div", { className: e.summaryBubbleAnchor, children: /* @__PURE__ */ c(
|
|
169
|
+
"button",
|
|
170
|
+
{
|
|
171
|
+
type: "button",
|
|
172
|
+
className: m(e.summaryBubble, p),
|
|
173
|
+
title: "Event summary",
|
|
174
|
+
onClick: () => C(!0),
|
|
175
|
+
children: [
|
|
176
|
+
/* @__PURE__ */ n("span", { className: e.summaryBubbleGlyph, "aria-hidden": !0, children: (u && u.length ? u : ["var(--crk-timeline-accent)"]).slice(0, 3).map((t, o) => /* @__PURE__ */ n("span", { style: { background: t } }, o)) }),
|
|
177
|
+
l,
|
|
178
|
+
/* @__PURE__ */ n("span", { className: e.summaryCount, children: r.length })
|
|
179
|
+
]
|
|
180
|
+
}
|
|
181
|
+
) }) : b ? /* @__PURE__ */ n(
|
|
182
|
+
w,
|
|
143
183
|
{
|
|
144
184
|
className: e.summaryFloating,
|
|
145
185
|
bounds: "viewport",
|
|
146
186
|
defaultPosition: i ?? { x: 0, y: 0 },
|
|
147
|
-
children:
|
|
187
|
+
children: g
|
|
148
188
|
}
|
|
149
|
-
) :
|
|
189
|
+
) : g;
|
|
150
190
|
}
|
|
151
|
-
function
|
|
191
|
+
function J({
|
|
152
192
|
x: l,
|
|
153
|
-
y:
|
|
154
|
-
children:
|
|
155
|
-
className:
|
|
193
|
+
y: r,
|
|
194
|
+
children: s,
|
|
195
|
+
className: a,
|
|
156
196
|
style: i
|
|
157
197
|
}) {
|
|
158
|
-
return /* @__PURE__ */ n("div", { className: m(e.tooltip,
|
|
198
|
+
return /* @__PURE__ */ n("div", { className: m(e.tooltip, a), style: { left: l, top: r, ...i }, children: s });
|
|
159
199
|
}
|
|
160
|
-
function
|
|
161
|
-
const
|
|
162
|
-
return
|
|
163
|
-
(
|
|
200
|
+
function Q({ text: l, query: r }) {
|
|
201
|
+
const s = R(l, r);
|
|
202
|
+
return s.length === 1 && !s[0].hit ? /* @__PURE__ */ n(B, { children: s[0].t }) : /* @__PURE__ */ n(B, { children: s.map(
|
|
203
|
+
(a, i) => a.hit ? /* @__PURE__ */ n("span", { className: e.mark, children: a.t }, i) : /* @__PURE__ */ n("span", { children: a.t }, i)
|
|
164
204
|
) });
|
|
165
205
|
}
|
|
166
206
|
export {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
207
|
+
Q as HighlightText,
|
|
208
|
+
O as TimelineLegend,
|
|
209
|
+
G as TimelineSegmented,
|
|
210
|
+
K as TimelineSummary,
|
|
211
|
+
J as TimelineTooltip,
|
|
212
|
+
q as TimelineZoomControls
|
|
173
213
|
};
|