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