@overdoser/react-toolkit 0.21.0 → 0.22.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/AGENTS.md +1 -0
- package/CHANGELOG.md +35 -0
- package/components/Accordion/Accordion.js +48 -48
- package/components/ActionButton/ActionButton.js +23 -23
- package/components/ActionButton/CopyButton.js +5 -5
- package/components/Alert/Alert.js +13 -13
- package/components/Avatar/Avatar.js +12 -12
- package/components/Badge/Badge.js +6 -6
- package/components/Breadcrumbs/Breadcrumbs.js +15 -15
- package/components/Button/Button.js +14 -14
- package/components/Card/Card.js +26 -26
- package/components/Chart/AreaChart.js +103 -103
- package/components/Chart/Axis.js +7 -7
- package/components/Chart/BarChart.js +62 -62
- package/components/Chart/ChartContainer.js +11 -11
- package/components/Chart/ChartLegend.js +7 -7
- package/components/Chart/ChartTooltip.js +13 -13
- package/components/Chart/LineChart.js +88 -88
- package/components/Chart/PieChart.js +25 -25
- package/components/Chart/RadarChart.js +42 -42
- package/components/Chart/Sparkline.js +11 -11
- package/components/Chart/TradingChart.js +126 -126
- package/components/Chart/trading/period.js +3 -3
- package/components/Chip/Chip.js +24 -24
- package/components/CodeBlock/CodeBlock.js +31 -31
- package/components/CommandPalette/CommandPalette.js +166 -166
- package/components/ConfirmDialog/ConfirmDialog.js +60 -60
- package/components/Divider/Divider.js +10 -10
- package/components/Draggable/Draggable.js +29 -29
- package/components/Drawer/Drawer.js +53 -53
- package/components/Dropdown/Dropdown.js +66 -66
- package/components/Dropdown/DropdownItem.js +13 -13
- package/components/Dropdown/DropdownLabel.js +5 -5
- package/components/Dropdown/DropdownSeparator.js +5 -5
- package/components/Dropzone/Dropzone.js +15 -15
- package/components/EmptyState/EmptyState.js +11 -11
- package/components/Form/Form.js +17 -17
- package/components/Form/FormField.js +21 -21
- package/components/Form/FormRow.js +3 -3
- package/components/ImageViewer/ImageViewer.js +118 -118
- package/components/Kbd/Kbd.js +11 -11
- package/components/KeyValueList/KeyValueList.js +32 -32
- package/components/Link/Link.js +7 -7
- package/components/List/List.js +7 -7
- package/components/Loader/Loader.js +39 -39
- package/components/Modal/Modal.js +48 -48
- package/components/PageHeader/PageHeader.js +18 -18
- package/components/Pagination/Pagination.js +23 -23
- package/components/Popover/Popover.js +25 -25
- package/components/ProgressBar/ProgressBar.js +17 -17
- package/components/RelativeTime/RelativeTime.js +10 -10
- package/components/SegmentedControl/SegmentedControl.js +38 -38
- package/components/Skeleton/Skeleton.js +10 -10
- package/components/Spinner/Spinner.js +7 -7
- package/components/SplitButton/SplitButton.js +63 -63
- package/components/SplitPane/SplitPane.js +50 -50
- package/components/StatCard/StatCard.js +32 -32
- package/components/StatusDot/StatusDot.js +7 -7
- package/components/Table/Table.js +174 -174
- package/components/Tabs/Tabs.js +47 -47
- package/components/ThemeToggle/ThemeToggle.js +31 -31
- package/components/Timeline/GanttTimeline.js +213 -213
- package/components/Timeline/HistoryTimeline.js +306 -306
- package/components/Timeline/TimelineShared.js +103 -103
- package/components/Timeline/TraceEventDetails.js +103 -103
- package/components/Timeline/TraceTimeline.js +546 -546
- package/components/Timeline/historyLayout.js +2 -2
- package/components/Timer/Timer.js +39 -39
- package/components/Toast/Toast.js +59 -59
- package/components/ToggleIconButton/ToggleIconButton.js +9 -9
- package/components/Tooltip/Tooltip.js +16 -16
- package/components/Typography/Typography.js +5 -5
- package/components/inputs/Checkbox/Checkbox.js +11 -11
- package/components/inputs/Checkbox/CheckboxGroup.js +21 -21
- package/components/inputs/DatePicker/CalendarPanel.js +113 -113
- package/components/inputs/DatePicker/DatePicker.js +39 -39
- package/components/inputs/DateTimePicker/DateTimePicker.js +119 -119
- package/components/inputs/DateTimePicker/DateTimeSegments.js +40 -40
- package/components/inputs/DateTimePicker/TimeField.js +34 -34
- package/components/inputs/Input/Input.js +13 -13
- package/components/inputs/NumberInput/NumberInput.js +16 -16
- package/components/inputs/Radio/Radio.js +17 -17
- package/components/inputs/SearchInput/SearchInput.js +25 -25
- package/components/inputs/Select/Select.d.ts +55 -3
- package/components/inputs/Select/Select.js +485 -344
- package/components/inputs/Select/{Select.module.js → Select.module.scss.js} +15 -3
- package/components/inputs/Slider/Slider.js +21 -21
- package/components/inputs/Switch/Switch.js +4 -4
- package/components/inputs/Textarea/Textarea.js +8 -8
- package/hooks/usePortalPosition.d.ts +2 -1
- package/hooks/usePortalPosition.js +6 -3
- package/hooks/useResizable.js +1 -1
- package/hooks/useTheme.js +7 -7
- package/index.css +1 -1
- package/index.js +1 -1
- package/index.layered.css +1 -1
- package/llms.txt +25 -4
- package/manifest.json +33 -4
- package/package.json +1 -1
- /package/components/Accordion/{Accordion.module.js → Accordion.module.scss.js} +0 -0
- /package/components/ActionButton/{ActionButton.module.js → ActionButton.module.scss.js} +0 -0
- /package/components/Alert/{Alert.module.js → Alert.module.scss.js} +0 -0
- /package/components/Avatar/{Avatar.module.js → Avatar.module.scss.js} +0 -0
- /package/components/Badge/{Badge.module.js → Badge.module.scss.js} +0 -0
- /package/components/Breadcrumbs/{Breadcrumbs.module.js → Breadcrumbs.module.scss.js} +0 -0
- /package/components/Button/{Button.module.js → Button.module.scss.js} +0 -0
- /package/components/Card/{Card.module.js → Card.module.scss.js} +0 -0
- /package/components/Chart/{Chart.module.js → Chart.module.scss.js} +0 -0
- /package/components/Chip/{Chip.module.js → Chip.module.scss.js} +0 -0
- /package/components/CodeBlock/{CodeBlock.module.js → CodeBlock.module.scss.js} +0 -0
- /package/components/CommandPalette/{CommandPalette.module.js → CommandPalette.module.scss.js} +0 -0
- /package/components/ConfirmDialog/{ConfirmDialog.module.js → ConfirmDialog.module.scss.js} +0 -0
- /package/components/Divider/{Divider.module.js → Divider.module.scss.js} +0 -0
- /package/components/Draggable/{Draggable.module.js → Draggable.module.scss.js} +0 -0
- /package/components/Drawer/{Drawer.module.js → Drawer.module.scss.js} +0 -0
- /package/components/Dropdown/{Dropdown.module.js → Dropdown.module.scss.js} +0 -0
- /package/components/Dropzone/{Dropzone.module.js → Dropzone.module.scss.js} +0 -0
- /package/components/EmptyState/{EmptyState.module.js → EmptyState.module.scss.js} +0 -0
- /package/components/Form/{Form.module.js → Form.module.scss.js} +0 -0
- /package/components/ImageViewer/{ImageViewer.module.js → ImageViewer.module.scss.js} +0 -0
- /package/components/Kbd/{Kbd.module.js → Kbd.module.scss.js} +0 -0
- /package/components/KeyValueList/{KeyValueList.module.js → KeyValueList.module.scss.js} +0 -0
- /package/components/Link/{Link.module.js → Link.module.scss.js} +0 -0
- /package/components/List/{List.module.js → List.module.scss.js} +0 -0
- /package/components/Loader/{Loader.module.js → Loader.module.scss.js} +0 -0
- /package/components/Modal/{Modal.module.js → Modal.module.scss.js} +0 -0
- /package/components/PageHeader/{PageHeader.module.js → PageHeader.module.scss.js} +0 -0
- /package/components/Pagination/{Pagination.module.js → Pagination.module.scss.js} +0 -0
- /package/components/Popover/{Popover.module.js → Popover.module.scss.js} +0 -0
- /package/components/ProgressBar/{ProgressBar.module.js → ProgressBar.module.scss.js} +0 -0
- /package/components/RelativeTime/{RelativeTime.module.js → RelativeTime.module.scss.js} +0 -0
- /package/components/SegmentedControl/{SegmentedControl.module.js → SegmentedControl.module.scss.js} +0 -0
- /package/components/Skeleton/{Skeleton.module.js → Skeleton.module.scss.js} +0 -0
- /package/components/Spinner/{Spinner.module.js → Spinner.module.scss.js} +0 -0
- /package/components/SplitButton/{SplitButton.module.js → SplitButton.module.scss.js} +0 -0
- /package/components/SplitPane/{SplitPane.module.js → SplitPane.module.scss.js} +0 -0
- /package/components/StatCard/{StatCard.module.js → StatCard.module.scss.js} +0 -0
- /package/components/StatusDot/{StatusDot.module.js → StatusDot.module.scss.js} +0 -0
- /package/components/Table/{Table.module.js → Table.module.scss.js} +0 -0
- /package/components/Tabs/{Tabs.module.js → Tabs.module.scss.js} +0 -0
- /package/components/ThemeToggle/{ThemeToggle.module.js → ThemeToggle.module.scss.js} +0 -0
- /package/components/Timeline/{GanttTimeline.module.js → GanttTimeline.module.scss.js} +0 -0
- /package/components/Timeline/{HistoryTimeline.module.js → HistoryTimeline.module.scss.js} +0 -0
- /package/components/Timeline/{Timeline.module.js → Timeline.module.scss.js} +0 -0
- /package/components/Timeline/{TraceTimeline.module.js → TraceTimeline.module.scss.js} +0 -0
- /package/components/Timer/{Timer.module.js → Timer.module.scss.js} +0 -0
- /package/components/Toast/{Toast.module.js → Toast.module.scss.js} +0 -0
- /package/components/ToggleIconButton/{ToggleIconButton.module.js → ToggleIconButton.module.scss.js} +0 -0
- /package/components/Tooltip/{Tooltip.module.js → Tooltip.module.scss.js} +0 -0
- /package/components/Typography/{Typography.module.js → Typography.module.scss.js} +0 -0
- /package/components/inputs/Checkbox/{Checkbox.module.js → Checkbox.module.scss.js} +0 -0
- /package/components/inputs/Checkbox/{CheckboxGroup.module.js → CheckboxGroup.module.scss.js} +0 -0
- /package/components/inputs/DatePicker/{CalendarPanel.module.js → CalendarPanel.module.scss.js} +0 -0
- /package/components/inputs/DatePicker/{DatePicker.module.js → DatePicker.module.scss.js} +0 -0
- /package/components/inputs/DateTimePicker/{DateTimePicker.module.js → DateTimePicker.module.scss.js} +0 -0
- /package/components/inputs/Input/{Input.module.js → Input.module.scss.js} +0 -0
- /package/components/inputs/NumberInput/{NumberInput.module.js → NumberInput.module.scss.js} +0 -0
- /package/components/inputs/Radio/{Radio.module.js → Radio.module.scss.js} +0 -0
- /package/components/inputs/SearchInput/{SearchInput.module.js → SearchInput.module.scss.js} +0 -0
- /package/components/inputs/Slider/{Slider.module.js → Slider.module.scss.js} +0 -0
- /package/components/inputs/Textarea/{Textarea.module.js → Textarea.module.scss.js} +0 -0
|
@@ -1,185 +1,185 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import { Fragment as
|
|
1
|
+
import { forwardRef as e, useCallback as t, useEffect as n, useLayoutEffect as r, useMemo as i, useRef as a, useState as o } from "react";
|
|
2
|
+
import s from "clsx";
|
|
3
|
+
import c from "./Timeline.module.scss.js";
|
|
4
|
+
import l from "./HistoryTimeline.module.scss.js";
|
|
5
|
+
import { TIMELINE_PALETTE_VARS as u, eventMatches as ee, fmtClock as d, fmtDate as te, fmtDateTime as f, fmtDur as p, ticks as ne, tint as re } from "./timelineCore.js";
|
|
6
|
+
import { computeHistoryLayout as ie } from "./historyLayout.js";
|
|
7
|
+
import { HighlightText as ae, TimelineLegend as oe, TimelineSegmented as se, TimelineSummary as ce, TimelineTooltip as le, TimelineZoomControls as ue } from "./TimelineShared.js";
|
|
8
|
+
import { animateScrollTo as de, useContainerWidth as fe, useNowTicker as pe, useTimelinePan as me, useWheelZoom as he, wheelZoomAllowed as ge } from "./useTimeline.js";
|
|
9
|
+
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
10
10
|
// src/components/Timeline/HistoryTimeline.tsx
|
|
11
|
-
var
|
|
12
|
-
created:
|
|
13
|
-
done:
|
|
14
|
-
live:
|
|
15
|
-
payment:
|
|
16
|
-
people:
|
|
17
|
-
review:
|
|
18
|
-
action:
|
|
19
|
-
offer:
|
|
20
|
-
fulfilment:
|
|
21
|
-
analysis:
|
|
22
|
-
shipping:
|
|
23
|
-
interview:
|
|
11
|
+
var _e = {
|
|
12
|
+
created: u[0],
|
|
13
|
+
done: u[0],
|
|
14
|
+
live: u[0],
|
|
15
|
+
payment: u[1],
|
|
16
|
+
people: u[1],
|
|
17
|
+
review: u[2],
|
|
18
|
+
action: u[2],
|
|
19
|
+
offer: u[2],
|
|
20
|
+
fulfilment: u[3],
|
|
21
|
+
analysis: u[3],
|
|
22
|
+
shipping: u[4],
|
|
23
|
+
interview: u[4],
|
|
24
24
|
exception: "var(--crk-timeline-danger, #b3372f)",
|
|
25
25
|
alert: "var(--crk-timeline-danger, #b3372f)"
|
|
26
|
-
},
|
|
27
|
-
let { events:
|
|
26
|
+
}, _ = e(function(e, _) {
|
|
27
|
+
let { events: ve, subjectName: ye, orientation: be, defaultOrientation: xe, onOrientationChange: Se, spacing: Ce, defaultSpacing: we = "equal", onSpacingChange: Te, highlight: v, defaultHighlight: Ee, onHighlightChange: De, showSearch: Oe = !0, renderSearch: ke, tagColors: Ae, showControls: je = !0, wheelZoom: Me = "ctrl", showLegend: Ne = !0, showSummary: y = !1, summaryPlacement: b = "left", summaryDefaultPosition: Pe, maxHeight: x, selectedEventId: S, defaultSelectedEventId: Fe = null, onEventSelect: Ie, renderCard: C, renderTooltip: w, renderDetails: T, classes: E, className: Le, style: Re } = e, D = a(null), [ze, Be] = o(() => xe ?? (typeof window < "u" && window.innerWidth < 700 ? "vertical" : "horizontal")), O = be ?? ze, k = O === "horizontal", [Ve, He] = o(we), A = Ce ?? Ve, [Ue, We] = o(1), [Ge, Ke] = o(!0), [j, M] = o(null), [qe, Je] = o(Fe), N = S === void 0 ? qe : S, [P, Ye] = o({
|
|
28
28
|
l: 0,
|
|
29
29
|
t: 0,
|
|
30
30
|
w: 0,
|
|
31
31
|
h: 0
|
|
32
|
-
}),
|
|
33
|
-
|
|
34
|
-
let
|
|
35
|
-
let e =
|
|
36
|
-
e &&
|
|
32
|
+
}), Xe = a(y);
|
|
33
|
+
Xe.current = y;
|
|
34
|
+
let F = a(null), I = t(() => {
|
|
35
|
+
let e = D.current;
|
|
36
|
+
e && Ye((t) => t.l === e.scrollLeft && t.t === e.scrollTop && t.w === e.clientWidth && t.h === e.clientHeight ? t : {
|
|
37
37
|
l: e.scrollLeft,
|
|
38
38
|
t: e.scrollTop,
|
|
39
39
|
w: e.clientWidth,
|
|
40
40
|
h: e.clientHeight
|
|
41
41
|
});
|
|
42
|
-
}, []),
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
}, []), Ze = t(() => {
|
|
43
|
+
Xe.current && F.current == null && (F.current = requestAnimationFrame(() => {
|
|
44
|
+
F.current = null, I();
|
|
45
45
|
}));
|
|
46
|
-
}, [
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
}, [I]);
|
|
47
|
+
n(() => {
|
|
48
|
+
y && I();
|
|
49
49
|
});
|
|
50
|
-
let [
|
|
51
|
-
|
|
52
|
-
},
|
|
53
|
-
value:
|
|
54
|
-
setValue:
|
|
55
|
-
}) :
|
|
56
|
-
className:
|
|
50
|
+
let [Qe, $e] = o(Ee ?? ""), L = v === void 0 ? Qe : v, R = L.trim(), et = (e) => {
|
|
51
|
+
v === void 0 && $e(e), De?.(e);
|
|
52
|
+
}, tt = ke ? ke({
|
|
53
|
+
value: L,
|
|
54
|
+
setValue: et
|
|
55
|
+
}) : Oe ? /* @__PURE__ */ h("input", {
|
|
56
|
+
className: s(c.searchInput, E?.search),
|
|
57
57
|
placeholder: "Highlight keyword in events…",
|
|
58
58
|
"aria-label": "Highlight keyword",
|
|
59
|
-
value:
|
|
60
|
-
onChange: (e) =>
|
|
61
|
-
}) : null,
|
|
59
|
+
value: L,
|
|
60
|
+
onChange: (e) => et(e.target.value)
|
|
61
|
+
}) : null, z = i(() => ve.map((e) => ({
|
|
62
62
|
...e,
|
|
63
63
|
end: e.end === void 0 ? e.ongoing ? null : e.start : e.end
|
|
64
|
-
})).sort((e, t) => e.start - t.start), [
|
|
65
|
-
let t = e || "event",
|
|
66
|
-
...
|
|
67
|
-
...
|
|
64
|
+
})).sort((e, t) => e.start - t.start), [ve]), nt = z.some((e) => e.end == null), B = pe(nt, 500), rt = fe(D), V = me(D), H = t((e) => {
|
|
65
|
+
let t = e || "event", n = {
|
|
66
|
+
..._e,
|
|
67
|
+
...Ae
|
|
68
68
|
};
|
|
69
|
-
if (
|
|
70
|
-
let
|
|
71
|
-
return
|
|
72
|
-
}, [
|
|
69
|
+
if (n[t]) return n[t];
|
|
70
|
+
let r = String(t).charCodeAt(0) || 0;
|
|
71
|
+
return u[(String(t).length + r) % u.length];
|
|
72
|
+
}, [Ae]), U = ie(z.map((e) => ({
|
|
73
73
|
id: e.id,
|
|
74
74
|
title: String(e.title || ""),
|
|
75
75
|
detail: String(e.detail || ""),
|
|
76
76
|
start: e.start,
|
|
77
77
|
end: e.end ?? null
|
|
78
78
|
})), {
|
|
79
|
-
orientation:
|
|
80
|
-
spacing:
|
|
81
|
-
containerWidth:
|
|
79
|
+
orientation: O,
|
|
80
|
+
spacing: A,
|
|
81
|
+
containerWidth: rt,
|
|
82
82
|
viewportHeight: typeof window < "u" && window.innerHeight || 800,
|
|
83
|
-
now:
|
|
84
|
-
k:
|
|
85
|
-
}),
|
|
86
|
-
|
|
87
|
-
let
|
|
88
|
-
|
|
89
|
-
let e =
|
|
90
|
-
|
|
83
|
+
now: B,
|
|
84
|
+
k: Ge ? "fit" : Ue
|
|
85
|
+
}), W = new Map(U.items.map((e) => [e.id, e])), it = a(U.kFit), at = a(U.kEff);
|
|
86
|
+
it.current = U.kFit, at.current = U.kEff;
|
|
87
|
+
let G = a(null);
|
|
88
|
+
r(() => {
|
|
89
|
+
let e = D.current;
|
|
90
|
+
G.current && e && (G.current.left != null && (e.scrollLeft = G.current.left), G.current.top != null && (e.scrollTop = G.current.top), G.current = null);
|
|
91
91
|
});
|
|
92
|
-
let
|
|
93
|
-
let n =
|
|
92
|
+
let K = t((e, t) => {
|
|
93
|
+
let n = D.current;
|
|
94
94
|
if (!n) return;
|
|
95
|
-
let r =
|
|
96
|
-
|
|
97
|
-
}, [
|
|
98
|
-
|
|
99
|
-
if (!
|
|
95
|
+
let r = it.current || 1, i = at.current || 1, a = Math.max(r * .3, Math.min(Math.max(r, 1) * 40, i * e)), o = k ? n.scrollLeft : n.scrollTop, s = a / i;
|
|
96
|
+
G.current = k ? { left: (o + t) * s - t } : { top: (o + t) * s - t }, Ke(!1), We(a);
|
|
97
|
+
}, [k]);
|
|
98
|
+
he(D, (e) => {
|
|
99
|
+
if (!ge(Me, e)) return;
|
|
100
100
|
e.preventDefault();
|
|
101
|
-
let t =
|
|
101
|
+
let t = D.current;
|
|
102
102
|
if (!t) return;
|
|
103
|
-
let n = t.getBoundingClientRect(), r =
|
|
104
|
-
|
|
105
|
-
},
|
|
106
|
-
let
|
|
107
|
-
let e =
|
|
108
|
-
return e ?
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
}, ot = (e) => {
|
|
112
|
-
_e === void 0 && ze(e), ye?.(e);
|
|
103
|
+
let n = t.getBoundingClientRect(), r = k ? e.clientX - n.left : e.clientY - n.top;
|
|
104
|
+
K(Math.exp(-(e.deltaY || e.deltaX) * .0022), r);
|
|
105
|
+
}, O);
|
|
106
|
+
let ot = () => {
|
|
107
|
+
let e = D.current;
|
|
108
|
+
return e ? k ? e.clientWidth / 2 : e.clientHeight / 2 : 300;
|
|
109
|
+
}, q = (e) => {
|
|
110
|
+
S === void 0 && Je(e ? e.id : null), Ie?.(e);
|
|
113
111
|
}, st = (e) => {
|
|
114
|
-
be === void 0 &&
|
|
112
|
+
be === void 0 && Be(e), Se?.(e);
|
|
115
113
|
}, ct = (e) => {
|
|
114
|
+
Ce === void 0 && He(e), Te?.(e);
|
|
115
|
+
}, lt = (e) => {
|
|
116
116
|
let t = window.innerWidth || 1200, n = window.innerHeight || 800;
|
|
117
117
|
return {
|
|
118
118
|
x: e.clientX < t * .55 ? Math.max(12, t - 340) : 16,
|
|
119
119
|
y: Math.max(130, Math.min(e.clientY, n - 130))
|
|
120
120
|
};
|
|
121
|
-
},
|
|
121
|
+
}, J = z.length ? z[0].start : B, ut = z.length ? Math.max(J + 1, ...z.map((e) => e.end == null ? B : Math.max(e.end, e.start))) : B + 1, Y = Math.max(1, ut - J), dt = (e, t) => {
|
|
122
122
|
let n = new Date(e);
|
|
123
|
-
return t === "y" ? String(n.getFullYear()) : t === "my" ? n.toLocaleString("en", { month: "short" }) + " " + n.getFullYear() : t === "d" ?
|
|
124
|
-
},
|
|
125
|
-
if (
|
|
126
|
-
let e =
|
|
127
|
-
|
|
123
|
+
return t === "y" ? String(n.getFullYear()) : t === "my" ? n.toLocaleString("en", { month: "short" }) + " " + n.getFullYear() : t === "d" ? te(e) : t === "cms" ? d(e, !0) : d(e);
|
|
124
|
+
}, X = [];
|
|
125
|
+
if (A === "proportional" && U.mapT) {
|
|
126
|
+
let e = U.mapT, t = e(J), n = k ? U.innerW : U.innerH, r = J + (n - t) / Math.max(1, U.innerSpan) * Y, i = ne(J, r, Math.max(200, n - t), 90), a = i.step >= 31104e6 ? "y" : i.step >= 24192e5 ? "my" : i.step >= 864e5 ? "d" : i.step < 1e3 ? "cms" : "c";
|
|
127
|
+
X = i.list.map((t) => ({
|
|
128
128
|
pos: Math.round(e(t.t)),
|
|
129
|
-
label:
|
|
129
|
+
label: dt(t.t, a)
|
|
130
130
|
}));
|
|
131
131
|
} else {
|
|
132
|
-
let e =
|
|
133
|
-
|
|
134
|
-
let o =
|
|
135
|
-
o !== n && s - r >= t && (
|
|
132
|
+
let e = Y > 4752e7 ? "y" : Y > 5184e6 ? "my" : Y > 1728e5 ? "d" : "c", t = k ? 72 : 18, n = null, r = -1e9;
|
|
133
|
+
z.forEach((i, a) => {
|
|
134
|
+
let o = dt(i.start, e), s = Math.round(U.posArr[a]);
|
|
135
|
+
o !== n && s - r >= t && (X.push({
|
|
136
136
|
pos: s,
|
|
137
137
|
label: o
|
|
138
138
|
}), n = o, r = s);
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
|
-
let
|
|
141
|
+
let ft = i(() => {
|
|
142
142
|
let e = [];
|
|
143
|
-
return
|
|
143
|
+
return z.forEach((t) => {
|
|
144
144
|
let n = t.tag || "event";
|
|
145
145
|
e.includes(n) || e.push(n);
|
|
146
146
|
}), e;
|
|
147
|
-
}, [
|
|
148
|
-
className:
|
|
149
|
-
placement:
|
|
150
|
-
floatingDefaultPosition:
|
|
151
|
-
items:
|
|
152
|
-
let n =
|
|
147
|
+
}, [z]), Z = N == null ? null : z.find((e) => e.id === N) || null, Q = Z ? Z.end == null : !1, $ = y ? /* @__PURE__ */ h(ce, {
|
|
148
|
+
className: E?.summary,
|
|
149
|
+
placement: b,
|
|
150
|
+
floatingDefaultPosition: Pe,
|
|
151
|
+
items: z.map((e, t) => {
|
|
152
|
+
let n = W.get(e.id), r = !n || !P.w && !P.h || (!P.w || n.cardLeft < P.l + P.w && n.cardLeft + n.cardW > P.l) && (!P.h || n.cardTop < P.t + P.h && n.cardTop + n.cardH > P.t);
|
|
153
153
|
return {
|
|
154
154
|
id: e.id,
|
|
155
155
|
number: String(t + 1).padStart(2, "0"),
|
|
156
156
|
label: e.title,
|
|
157
|
-
color:
|
|
158
|
-
time:
|
|
157
|
+
color: H(e.tag),
|
|
158
|
+
time: f(e.start),
|
|
159
159
|
inView: r,
|
|
160
|
-
selected:
|
|
160
|
+
selected: N === e.id
|
|
161
161
|
};
|
|
162
162
|
}),
|
|
163
163
|
onPick: (e) => {
|
|
164
|
-
let t =
|
|
164
|
+
let t = W.get(e), n = D.current;
|
|
165
165
|
if (!t || !n) return;
|
|
166
166
|
let r = {};
|
|
167
|
-
(n.clientWidth || !n.clientHeight) && (r.left = Math.max(0, t.dotX - n.clientWidth / 2)), n.clientHeight && (r.top = Math.max(0, t.dotY - n.clientHeight / 2)),
|
|
167
|
+
(n.clientWidth || !n.clientHeight) && (r.left = Math.max(0, t.dotX - n.clientWidth / 2)), n.clientHeight && (r.top = Math.max(0, t.dotY - n.clientHeight / 2)), de(n, r);
|
|
168
168
|
}
|
|
169
169
|
}) : null;
|
|
170
|
-
return /* @__PURE__ */
|
|
171
|
-
ref:
|
|
172
|
-
className:
|
|
173
|
-
style:
|
|
170
|
+
return /* @__PURE__ */ g("div", {
|
|
171
|
+
ref: _,
|
|
172
|
+
className: s(c.root, E?.root, Le),
|
|
173
|
+
style: Re,
|
|
174
174
|
children: [
|
|
175
|
-
(
|
|
176
|
-
className:
|
|
175
|
+
(je || tt) && /* @__PURE__ */ g("div", {
|
|
176
|
+
className: s(c.toolbar, E?.toolbar),
|
|
177
177
|
children: [
|
|
178
|
-
/* @__PURE__ */
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
/* @__PURE__ */
|
|
182
|
-
value:
|
|
178
|
+
/* @__PURE__ */ h("div", { className: c.toolbarText }),
|
|
179
|
+
tt,
|
|
180
|
+
je && /* @__PURE__ */ g(m, { children: [
|
|
181
|
+
/* @__PURE__ */ h(se, {
|
|
182
|
+
value: O,
|
|
183
183
|
options: [{
|
|
184
184
|
value: "horizontal",
|
|
185
185
|
label: "Horizontal"
|
|
@@ -187,10 +187,10 @@ var pe = {
|
|
|
187
187
|
value: "vertical",
|
|
188
188
|
label: "Vertical"
|
|
189
189
|
}],
|
|
190
|
-
onChange:
|
|
190
|
+
onChange: st
|
|
191
191
|
}),
|
|
192
|
-
/* @__PURE__ */
|
|
193
|
-
value:
|
|
192
|
+
/* @__PURE__ */ h(se, {
|
|
193
|
+
value: A,
|
|
194
194
|
options: [
|
|
195
195
|
{
|
|
196
196
|
value: "equal",
|
|
@@ -206,281 +206,281 @@ var pe = {
|
|
|
206
206
|
label: "Proportional"
|
|
207
207
|
}
|
|
208
208
|
],
|
|
209
|
-
onChange:
|
|
209
|
+
onChange: ct
|
|
210
210
|
}),
|
|
211
|
-
/* @__PURE__ */
|
|
212
|
-
zoomPct: `${Math.round(
|
|
213
|
-
fitActive:
|
|
214
|
-
onZoomIn: () =>
|
|
215
|
-
onZoomOut: () =>
|
|
211
|
+
/* @__PURE__ */ h(ue, {
|
|
212
|
+
zoomPct: `${Math.round(U.kEff / U.kFit * 100)}%`,
|
|
213
|
+
fitActive: Ge,
|
|
214
|
+
onZoomIn: () => K(1.5, ot()),
|
|
215
|
+
onZoomOut: () => K(1 / 1.5, ot()),
|
|
216
216
|
onFit: () => {
|
|
217
|
-
|
|
217
|
+
Ke(!0), We(1);
|
|
218
218
|
}
|
|
219
219
|
})
|
|
220
220
|
] })
|
|
221
221
|
]
|
|
222
222
|
}),
|
|
223
|
-
|
|
224
|
-
className:
|
|
225
|
-
items:
|
|
223
|
+
Ne && /* @__PURE__ */ h(oe, {
|
|
224
|
+
className: E?.legend,
|
|
225
|
+
items: ft.map((e) => ({
|
|
226
226
|
name: e,
|
|
227
|
-
color:
|
|
227
|
+
color: H(e)
|
|
228
228
|
}))
|
|
229
229
|
}),
|
|
230
|
-
|
|
231
|
-
/* @__PURE__ */
|
|
232
|
-
className:
|
|
230
|
+
b === "top" && $,
|
|
231
|
+
/* @__PURE__ */ g("div", {
|
|
232
|
+
className: c.layout,
|
|
233
233
|
children: [
|
|
234
|
-
|
|
235
|
-
/* @__PURE__ */
|
|
236
|
-
className:
|
|
237
|
-
children: [/* @__PURE__ */
|
|
238
|
-
className:
|
|
239
|
-
children: [/* @__PURE__ */
|
|
240
|
-
className:
|
|
241
|
-
children: /* @__PURE__ */
|
|
242
|
-
ref:
|
|
243
|
-
className:
|
|
244
|
-
style:
|
|
245
|
-
onPointerDown:
|
|
246
|
-
onPointerMove:
|
|
247
|
-
onPointerUp:
|
|
248
|
-
onPointerLeave:
|
|
249
|
-
onScroll:
|
|
250
|
-
children: /* @__PURE__ */
|
|
251
|
-
className:
|
|
234
|
+
b === "left" && $,
|
|
235
|
+
/* @__PURE__ */ g("div", {
|
|
236
|
+
className: c.main,
|
|
237
|
+
children: [/* @__PURE__ */ g("div", {
|
|
238
|
+
className: c.cardWrap,
|
|
239
|
+
children: [/* @__PURE__ */ h("div", {
|
|
240
|
+
className: s(c.card, E?.card),
|
|
241
|
+
children: /* @__PURE__ */ h("div", {
|
|
242
|
+
ref: D,
|
|
243
|
+
className: s(c.scroller, k ? l.scrollerH : l.scrollerV, E?.scroller),
|
|
244
|
+
style: x == null ? void 0 : { maxHeight: x },
|
|
245
|
+
onPointerDown: V.onPointerDown,
|
|
246
|
+
onPointerMove: V.onPointerMove,
|
|
247
|
+
onPointerUp: V.onPointerUp,
|
|
248
|
+
onPointerLeave: V.onPointerUp,
|
|
249
|
+
onScroll: Ze,
|
|
250
|
+
children: /* @__PURE__ */ g("div", {
|
|
251
|
+
className: l.inner,
|
|
252
252
|
style: {
|
|
253
|
-
width:
|
|
254
|
-
height:
|
|
253
|
+
width: U.innerW,
|
|
254
|
+
height: U.innerH
|
|
255
255
|
},
|
|
256
256
|
children: [
|
|
257
|
-
|
|
258
|
-
className:
|
|
257
|
+
X.map((e, t) => k ? /* @__PURE__ */ g("span", { children: [/* @__PURE__ */ h("span", {
|
|
258
|
+
className: l.gridlineH,
|
|
259
259
|
style: { left: e.pos }
|
|
260
|
-
}), /* @__PURE__ */
|
|
261
|
-
className:
|
|
260
|
+
}), /* @__PURE__ */ h("span", {
|
|
261
|
+
className: l.tickLabelH,
|
|
262
262
|
style: { left: e.pos },
|
|
263
263
|
children: e.label
|
|
264
|
-
})] },
|
|
265
|
-
className:
|
|
264
|
+
})] }, t) : /* @__PURE__ */ g("span", { children: [/* @__PURE__ */ h("span", {
|
|
265
|
+
className: l.gridlineV,
|
|
266
266
|
style: { top: e.pos }
|
|
267
|
-
}), /* @__PURE__ */
|
|
268
|
-
className:
|
|
267
|
+
}), /* @__PURE__ */ h("span", {
|
|
268
|
+
className: l.tickLabelV,
|
|
269
269
|
style: { top: e.pos },
|
|
270
270
|
children: e.label
|
|
271
|
-
})] },
|
|
272
|
-
|
|
273
|
-
className:
|
|
274
|
-
style: { top:
|
|
275
|
-
}) : /* @__PURE__ */
|
|
276
|
-
className:
|
|
277
|
-
style: { left:
|
|
271
|
+
})] }, t)),
|
|
272
|
+
k ? /* @__PURE__ */ h("div", {
|
|
273
|
+
className: l.axisH,
|
|
274
|
+
style: { top: U.axisY }
|
|
275
|
+
}) : /* @__PURE__ */ h("div", {
|
|
276
|
+
className: l.axisV,
|
|
277
|
+
style: { left: U.axisX }
|
|
278
278
|
}),
|
|
279
|
-
|
|
280
|
-
let
|
|
281
|
-
if (!
|
|
282
|
-
let
|
|
283
|
-
index:
|
|
284
|
-
number: String(
|
|
285
|
-
color:
|
|
286
|
-
ongoing:
|
|
287
|
-
condensed:
|
|
288
|
-
durationMs:
|
|
279
|
+
z.map((e, t) => {
|
|
280
|
+
let n = W.get(e.id);
|
|
281
|
+
if (!n) return null;
|
|
282
|
+
let r = e.end == null, i = (r ? B : e.end) - e.start, a = r || i > 0, o = ee(e, R), u = H(e.tag), d = {
|
|
283
|
+
index: t,
|
|
284
|
+
number: String(t + 1).padStart(2, "0"),
|
|
285
|
+
color: u,
|
|
286
|
+
ongoing: r,
|
|
287
|
+
condensed: n.condensed,
|
|
288
|
+
durationMs: i
|
|
289
289
|
};
|
|
290
|
-
return /* @__PURE__ */
|
|
291
|
-
|
|
292
|
-
className:
|
|
290
|
+
return /* @__PURE__ */ g("span", { children: [
|
|
291
|
+
n.segs.map((e, t) => /* @__PURE__ */ h("span", {
|
|
292
|
+
className: l.seg,
|
|
293
293
|
style: {
|
|
294
294
|
left: e.l,
|
|
295
295
|
top: e.t,
|
|
296
296
|
width: e.w,
|
|
297
297
|
height: e.h,
|
|
298
|
-
background:
|
|
298
|
+
background: u
|
|
299
299
|
}
|
|
300
|
-
},
|
|
301
|
-
/* @__PURE__ */
|
|
302
|
-
className:
|
|
300
|
+
}, t)),
|
|
301
|
+
/* @__PURE__ */ h("span", {
|
|
302
|
+
className: s(l.dot, E?.dot),
|
|
303
303
|
style: {
|
|
304
|
-
left:
|
|
305
|
-
top:
|
|
306
|
-
borderColor:
|
|
304
|
+
left: n.dotX,
|
|
305
|
+
top: n.dotY,
|
|
306
|
+
borderColor: u
|
|
307
307
|
}
|
|
308
308
|
}),
|
|
309
|
-
/* @__PURE__ */
|
|
310
|
-
className:
|
|
309
|
+
/* @__PURE__ */ h("div", {
|
|
310
|
+
className: s(l.eventCard, E?.eventCard),
|
|
311
311
|
style: {
|
|
312
|
-
left:
|
|
313
|
-
top:
|
|
314
|
-
width:
|
|
315
|
-
height:
|
|
316
|
-
opacity:
|
|
317
|
-
background:
|
|
318
|
-
borderColor:
|
|
319
|
-
boxShadow:
|
|
312
|
+
left: n.cardLeft,
|
|
313
|
+
top: n.cardTop,
|
|
314
|
+
width: n.cardW,
|
|
315
|
+
height: n.cardH,
|
|
316
|
+
opacity: R && !o ? .3 : 1,
|
|
317
|
+
background: R && o ? "var(--crk-timeline-hl-wash-soft, #fff9e8)" : void 0,
|
|
318
|
+
borderColor: R && o ? "var(--crk-timeline-hl-border, #e8b931)" : void 0,
|
|
319
|
+
boxShadow: R && o ? "0 0 0 3px #f9e9b8" : "0 1px 3px rgba(35,32,28,.06)"
|
|
320
320
|
},
|
|
321
321
|
onClick: () => {
|
|
322
|
-
|
|
322
|
+
V.wasDragSuppressed() || (M(null), q(N === e.id ? null : e));
|
|
323
323
|
},
|
|
324
|
-
onMouseEnter: (
|
|
325
|
-
if (
|
|
326
|
-
let
|
|
327
|
-
if (!
|
|
328
|
-
let
|
|
329
|
-
|
|
330
|
-
...
|
|
331
|
-
id:
|
|
332
|
-
title:
|
|
333
|
-
time:
|
|
334
|
-
durLine:
|
|
335
|
-
detail:
|
|
324
|
+
onMouseEnter: (t) => {
|
|
325
|
+
if (N === e.id) return;
|
|
326
|
+
let n = (e.detail || "").length > 80;
|
|
327
|
+
if (!w && !n && !r) return;
|
|
328
|
+
let a = lt(t);
|
|
329
|
+
M({
|
|
330
|
+
...a,
|
|
331
|
+
id: e.id,
|
|
332
|
+
title: e.title,
|
|
333
|
+
time: f(e.start),
|
|
334
|
+
durLine: r ? "ongoing · " + p(i) + " so far" : i > 0 ? "duration " + p(i) : "instant event",
|
|
335
|
+
detail: e.detail || ""
|
|
336
336
|
});
|
|
337
337
|
},
|
|
338
|
-
onMouseLeave: () =>
|
|
339
|
-
children:
|
|
340
|
-
/* @__PURE__ */
|
|
341
|
-
className:
|
|
338
|
+
onMouseLeave: () => M(null),
|
|
339
|
+
children: C ? C(e, d) : /* @__PURE__ */ g(m, { children: [
|
|
340
|
+
/* @__PURE__ */ g("div", {
|
|
341
|
+
className: l.cardTitle,
|
|
342
342
|
children: [
|
|
343
|
-
/* @__PURE__ */
|
|
344
|
-
className:
|
|
345
|
-
children:
|
|
343
|
+
/* @__PURE__ */ h("span", {
|
|
344
|
+
className: l.cardNum,
|
|
345
|
+
children: d.number
|
|
346
346
|
}),
|
|
347
347
|
" ",
|
|
348
|
-
/* @__PURE__ */
|
|
349
|
-
className:
|
|
350
|
-
style: { background:
|
|
348
|
+
/* @__PURE__ */ h("span", {
|
|
349
|
+
className: l.cardTagDot,
|
|
350
|
+
style: { background: u }
|
|
351
351
|
}),
|
|
352
|
-
/* @__PURE__ */
|
|
353
|
-
text:
|
|
354
|
-
query:
|
|
352
|
+
/* @__PURE__ */ h(ae, {
|
|
353
|
+
text: e.title,
|
|
354
|
+
query: R
|
|
355
355
|
}),
|
|
356
|
-
|
|
356
|
+
r && /* @__PURE__ */ h("span", { className: s(c.pulseDot, l.cardOngoingDot) })
|
|
357
357
|
]
|
|
358
358
|
}),
|
|
359
|
-
/* @__PURE__ */
|
|
360
|
-
className:
|
|
361
|
-
children:
|
|
359
|
+
/* @__PURE__ */ h("div", {
|
|
360
|
+
className: l.cardTime,
|
|
361
|
+
children: f(e.start)
|
|
362
362
|
}),
|
|
363
|
-
!
|
|
364
|
-
className:
|
|
365
|
-
children: /* @__PURE__ */
|
|
366
|
-
text:
|
|
367
|
-
query:
|
|
363
|
+
!n.condensed && !!e.detail && /* @__PURE__ */ h("div", {
|
|
364
|
+
className: l.cardDetail,
|
|
365
|
+
children: /* @__PURE__ */ h(ae, {
|
|
366
|
+
text: e.detail,
|
|
367
|
+
query: R
|
|
368
368
|
})
|
|
369
369
|
}),
|
|
370
|
-
|
|
371
|
-
className:
|
|
372
|
-
children:
|
|
370
|
+
a && /* @__PURE__ */ h("div", {
|
|
371
|
+
className: l.cardDur,
|
|
372
|
+
children: r ? "ongoing · " + p(i) : "took " + p(i)
|
|
373
373
|
})
|
|
374
374
|
] })
|
|
375
375
|
})
|
|
376
|
-
] },
|
|
376
|
+
] }, e.id);
|
|
377
377
|
})
|
|
378
378
|
]
|
|
379
379
|
})
|
|
380
380
|
})
|
|
381
|
-
}),
|
|
382
|
-
}), /* @__PURE__ */
|
|
383
|
-
className:
|
|
381
|
+
}), b === "bubble" && $]
|
|
382
|
+
}), /* @__PURE__ */ h("div", {
|
|
383
|
+
className: s(c.footnote, E?.footnote),
|
|
384
384
|
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"
|
|
385
385
|
})]
|
|
386
386
|
}),
|
|
387
|
-
|
|
388
|
-
className:
|
|
389
|
-
children:
|
|
390
|
-
close: () =>
|
|
391
|
-
ongoing:
|
|
387
|
+
Z && T && /* @__PURE__ */ h("aside", {
|
|
388
|
+
className: s(c.aside, l.drawer, E?.drawer),
|
|
389
|
+
children: T(Z, {
|
|
390
|
+
close: () => q(null),
|
|
391
|
+
ongoing: Q
|
|
392
392
|
})
|
|
393
393
|
}),
|
|
394
|
-
|
|
395
|
-
className:
|
|
394
|
+
Z && !T && /* @__PURE__ */ g("aside", {
|
|
395
|
+
className: s(c.aside, l.drawer, E?.drawer),
|
|
396
396
|
children: [
|
|
397
|
-
/* @__PURE__ */
|
|
398
|
-
className:
|
|
397
|
+
/* @__PURE__ */ g("div", {
|
|
398
|
+
className: l.drawerHead,
|
|
399
399
|
children: [
|
|
400
|
-
/* @__PURE__ */
|
|
401
|
-
className:
|
|
400
|
+
/* @__PURE__ */ h("span", {
|
|
401
|
+
className: l.drawerTag,
|
|
402
402
|
style: {
|
|
403
|
-
background:
|
|
404
|
-
color:
|
|
403
|
+
background: re(H(Z.tag), 12),
|
|
404
|
+
color: H(Z.tag)
|
|
405
405
|
},
|
|
406
|
-
children:
|
|
406
|
+
children: Z.tag || "event"
|
|
407
407
|
}),
|
|
408
|
-
(
|
|
409
|
-
className:
|
|
410
|
-
children:
|
|
408
|
+
(ye ?? Z.subject) != null && /* @__PURE__ */ h("span", {
|
|
409
|
+
className: l.drawerSubject,
|
|
410
|
+
children: ye ?? Z.subject
|
|
411
411
|
}),
|
|
412
|
-
/* @__PURE__ */
|
|
413
|
-
/* @__PURE__ */
|
|
412
|
+
/* @__PURE__ */ h("div", { className: l.drawerSpacer }),
|
|
413
|
+
/* @__PURE__ */ h("button", {
|
|
414
414
|
type: "button",
|
|
415
|
-
className:
|
|
415
|
+
className: c.asideClose,
|
|
416
416
|
"aria-label": "Close details",
|
|
417
|
-
onClick: () =>
|
|
417
|
+
onClick: () => q(null),
|
|
418
418
|
children: "✕"
|
|
419
419
|
})
|
|
420
420
|
]
|
|
421
421
|
}),
|
|
422
|
-
/* @__PURE__ */
|
|
423
|
-
className:
|
|
424
|
-
children:
|
|
422
|
+
/* @__PURE__ */ h("div", {
|
|
423
|
+
className: l.drawerTitle,
|
|
424
|
+
children: Z.title
|
|
425
425
|
}),
|
|
426
|
-
/* @__PURE__ */
|
|
427
|
-
className:
|
|
428
|
-
children:
|
|
426
|
+
/* @__PURE__ */ h("div", {
|
|
427
|
+
className: l.drawerTiming,
|
|
428
|
+
children: f(Z.start) + (Q ? " · ongoing, " + p(B - Z.start) + " so far" : Z.end > Z.start ? " → " + f(Z.end) + " · " + p(Z.end - Z.start) : "")
|
|
429
429
|
}),
|
|
430
|
-
/* @__PURE__ */
|
|
431
|
-
className:
|
|
432
|
-
children:
|
|
430
|
+
/* @__PURE__ */ h("div", {
|
|
431
|
+
className: l.drawerDetail,
|
|
432
|
+
children: Z.detail || "—"
|
|
433
433
|
}),
|
|
434
|
-
/* @__PURE__ */
|
|
435
|
-
className:
|
|
434
|
+
/* @__PURE__ */ h("div", {
|
|
435
|
+
className: c.asideSection,
|
|
436
436
|
children: "Raw event"
|
|
437
437
|
}),
|
|
438
|
-
/* @__PURE__ */
|
|
439
|
-
className:
|
|
440
|
-
children: JSON.stringify(
|
|
438
|
+
/* @__PURE__ */ h("pre", {
|
|
439
|
+
className: c.asideRaw,
|
|
440
|
+
children: JSON.stringify(Z, null, 2)
|
|
441
441
|
})
|
|
442
442
|
]
|
|
443
443
|
}),
|
|
444
|
-
(
|
|
444
|
+
(b === "right" || b === "floating") && $
|
|
445
445
|
]
|
|
446
446
|
}),
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
let
|
|
450
|
-
index:
|
|
451
|
-
number: String(
|
|
452
|
-
color:
|
|
453
|
-
ongoing:
|
|
454
|
-
condensed:
|
|
455
|
-
durationMs: (
|
|
447
|
+
b === "bottom" && $,
|
|
448
|
+
j && (() => {
|
|
449
|
+
let e = z.find((e) => e.id === j.id), t = e ? z.indexOf(e) : -1, n = e && w ? w(e, {
|
|
450
|
+
index: t,
|
|
451
|
+
number: String(t + 1).padStart(2, "0"),
|
|
452
|
+
color: H(e.tag),
|
|
453
|
+
ongoing: e.end == null,
|
|
454
|
+
condensed: W.get(e.id)?.condensed ?? !1,
|
|
455
|
+
durationMs: (e.end == null ? B : e.end) - e.start
|
|
456
456
|
}) : void 0;
|
|
457
|
-
return
|
|
458
|
-
x:
|
|
459
|
-
y:
|
|
460
|
-
className:
|
|
461
|
-
children:
|
|
462
|
-
/* @__PURE__ */
|
|
463
|
-
className:
|
|
464
|
-
children:
|
|
457
|
+
return w && n == null ? null : /* @__PURE__ */ h(le, {
|
|
458
|
+
x: j.x,
|
|
459
|
+
y: j.y,
|
|
460
|
+
className: E?.tooltip,
|
|
461
|
+
children: n === void 0 ? /* @__PURE__ */ g(m, { children: [
|
|
462
|
+
/* @__PURE__ */ h("div", {
|
|
463
|
+
className: c.tooltipTitle,
|
|
464
|
+
children: j.title
|
|
465
465
|
}),
|
|
466
|
-
/* @__PURE__ */
|
|
467
|
-
className:
|
|
466
|
+
/* @__PURE__ */ h("div", {
|
|
467
|
+
className: s(c.tooltipLine, c.tooltipMono),
|
|
468
468
|
style: { marginTop: 4 },
|
|
469
|
-
children:
|
|
469
|
+
children: j.time
|
|
470
470
|
}),
|
|
471
|
-
/* @__PURE__ */
|
|
472
|
-
className:
|
|
473
|
-
children:
|
|
471
|
+
/* @__PURE__ */ h("div", {
|
|
472
|
+
className: c.tooltipLine,
|
|
473
|
+
children: j.durLine
|
|
474
474
|
}),
|
|
475
|
-
|
|
476
|
-
className:
|
|
475
|
+
j.detail && /* @__PURE__ */ h("div", {
|
|
476
|
+
className: c.tooltipDim,
|
|
477
477
|
style: { marginTop: 5 },
|
|
478
|
-
children:
|
|
478
|
+
children: j.detail
|
|
479
479
|
})
|
|
480
|
-
] }) :
|
|
480
|
+
] }) : n
|
|
481
481
|
});
|
|
482
482
|
})()
|
|
483
483
|
]
|
|
484
484
|
});
|
|
485
485
|
});
|
|
486
|
-
export {
|
|
486
|
+
export { _ as HistoryTimeline };
|