@overdoser/react-toolkit 0.10.1 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +2 -2
- package/CHANGELOG.md +55 -0
- package/components/Timeline/GanttTimeline.js +66 -64
- package/components/Timeline/HistoryTimeline.js +58 -57
- package/components/Timeline/Timeline.module.scss.js +112 -96
- package/components/Timeline/TimelineShared.d.ts +14 -4
- package/components/Timeline/TimelineShared.js +135 -95
- package/components/Timeline/TraceTimeline.d.ts +40 -9
- package/components/Timeline/TraceTimeline.js +598 -370
- package/components/Timeline/TraceTimeline.module.scss.js +163 -103
- package/components/Timeline/index.d.ts +1 -1
- package/index.css +1 -1
- package/index.d.ts +1 -1
- package/index.layered.css +1 -1
- package/llms.txt +12 -7
- package/manifest.json +29 -8
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -101,8 +101,8 @@ For exhaustive component reference (every prop, every variant, every signature),
|
|
|
101
101
|
- Tiny inline trend (table cell, KPI tile) → `<Sparkline>`.
|
|
102
102
|
- Axis-based charts share a `config` object: `{ [dataKey]: { label, color } }`. `PieChart` uses `nameKey` + `valueKey` (+ optional `colorKey`) instead. Colors via `var(--crk-chart-1)` … `var(--crk-chart-5)`.
|
|
103
103
|
|
|
104
|
-
- **Need a timeline of events?** Three views, all fully controlled (you pass the pre-filtered event array; items without an `end` render live and keep growing until an update completes them), all with wheel-zoom / drag-pan / Fit, keyword highlighting (built-in toolbar search box by default — `showSearch={false}` to hide, `renderSearch` to inject your own element, or controlled `highlight` + `onHighlightChange` for an external box), tooltips, a click-to-open detail side panel, and an optional `showSummary` panel (dense numbered event list with a live viewport band and click-to-navigate smooth scrolling; `summaryPlacement` docks it left/right/top/bottom
|
|
105
|
-
- Request/response flow across services (one correlated "manifest"/saga/order) on a proportional UTC band → `<TraceTimeline events title services highlight />`.
|
|
104
|
+
- **Need a timeline of events?** Three views, all fully controlled (you pass the pre-filtered event array; items without an `end` render live and keep growing until an update completes them), all with wheel-zoom / drag-pan / Fit, keyword highlighting (built-in toolbar search box by default — `showSearch={false}` to hide, `renderSearch` to inject your own element, or controlled `highlight` + `onHighlightChange` for an external box), tooltips, a click-to-open detail side panel, and an optional `showSummary` panel (dense numbered event list with a live viewport band and click-to-navigate smooth scrolling; `summaryPlacement` docks it left/right/top/bottom, floats it as a draggable palette, or — `'bubble'`, the TraceTimeline default — collapses it into a pill bottom-left of the timeline that expands in place). Customize via `--crk-timeline-*` tokens, `classes`, or render-prop slots (`renderChip`/`renderCard`/`renderBar`+`renderRowLabel`, `renderTooltip`, `renderDetails`) that inject custom components while the layout algorithms keep owning geometry:
|
|
105
|
+
- Request/response flow across services (one correlated "manifest"/saga/order) on a proportional UTC band → `<TraceTimeline events title services highlight />`. Ships a right-side dock rail by default (`showDock={false}` to remove): one docked drawer at a time — *Event details* (request/response panel with payload copy buttons) or *Full log* (all events vertically with payloads + copy buttons, scroll-synced with timeline clicks both ways).
|
|
106
106
|
- One subject's life story (order, incident, candidate, deploy) as cards alternating around an axis, horizontal or vertical, equal/log/proportional spacing → `<HistoryTimeline events subjectName defaultSpacing />`.
|
|
107
107
|
- Tasks stacked by start time with duration bars (Gantt) → `<GanttTimeline tasks title onTaskSelect />`.
|
|
108
108
|
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,61 @@ All notable changes to `@overdoser/react-toolkit` are documented here.
|
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
|
|
5
5
|
project adheres to [Semantic Versioning](https://semver.org/).
|
|
6
6
|
|
|
7
|
+
## [0.11.0]
|
|
8
|
+
|
|
9
|
+
TraceTimeline gets the summary bubble, dock drawers and a full-log view
|
|
10
|
+
from the timeline design handoff. No breaking type changes, but three
|
|
11
|
+
defaults changed — see *Changed* if you'd rather keep the old chrome.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **Dock rail + drawers in `TraceTimeline`** (`showDock`, default `true`;
|
|
16
|
+
`defaultDock`; type `TraceTimelineDock`). A sticky icon rail on the far
|
|
17
|
+
right docks one drawer at a time: *Event details* — the request/response
|
|
18
|
+
panel, now with its own uppercase header, an empty state until an event
|
|
19
|
+
is picked, and copy buttons beside each payload's **Body** label — or
|
|
20
|
+
*Full log* — every event vertically (method/status chips, service pair,
|
|
21
|
+
clock, op, path) with REQUEST/RESPONSE payloads stacked full-width, each
|
|
22
|
+
with a copy button that doesn't select the row. Timeline and log stay in
|
|
23
|
+
sync both ways: clicking a timeline event or summary row scrolls an open
|
|
24
|
+
log to that entry and flashes it; clicking a log entry selects the event
|
|
25
|
+
and centers the timeline (centering waits for the drawer-induced resize
|
|
26
|
+
to settle). `showDock={false}` restores the previous selection-driven
|
|
27
|
+
details panel with no rail.
|
|
28
|
+
- **`'bubble'` summary placement** (all three timelines): a collapsed pill
|
|
29
|
+
anchored bottom-left of the timeline card — service-colored glyph,
|
|
30
|
+
heading, count — expanding in place into a draggable 262px panel with a
|
|
31
|
+
"Tinted rows are in the viewport" footer. Collapsing always snaps it
|
|
32
|
+
back to its home corner (the dragged position is deliberately not
|
|
33
|
+
persisted). Payload copying and panel dragging reuse the library's own
|
|
34
|
+
`CopyButton` and `Draggable`.
|
|
35
|
+
- **`minHeight` prop on `TraceTimeline`** (default `420`, the previous
|
|
36
|
+
hardcoded minimum): stretches the event band for a roomier canvas — the
|
|
37
|
+
bar band stays vertically centered — while dense traces still grow past
|
|
38
|
+
it. `maxHeight` continues to only cap the scrollable canvas.
|
|
39
|
+
|
|
40
|
+
### Changed
|
|
41
|
+
|
|
42
|
+
- **`TraceTimeline` defaults:** `showSummary` is now `true` and
|
|
43
|
+
`summaryPlacement` defaults to `'bubble'`; the dock rail is on by
|
|
44
|
+
default (`showDock`). Picking a summary row now also selects the event
|
|
45
|
+
(and opens the details drawer when nothing is docked).
|
|
46
|
+
- **Summary rows follow the handoff design** in every placement: full
|
|
47
|
+
width with visible hairline separators (no more rounded highlight
|
|
48
|
+
chips), the viewport band tints whole rows edge-to-edge, out-of-view
|
|
49
|
+
rows render in faint text, and the selected row steps clearly deeper
|
|
50
|
+
than the in-view tint.
|
|
51
|
+
- Event bars dropped the full pill radius (999px → 7px, per the handoff).
|
|
52
|
+
- `TraceTimelineClasses` gained `log` and `rail` entries.
|
|
53
|
+
|
|
54
|
+
### Fixed
|
|
55
|
+
|
|
56
|
+
- The cursor timestamp chip (and the `▸ start` event chip) no longer
|
|
57
|
+
overlaps the divider between the UTC lane and the date rail — it now
|
|
58
|
+
ends flush with it.
|
|
59
|
+
- The summary-bubble collapse button has a visible resting background
|
|
60
|
+
instead of appearing only on hover.
|
|
61
|
+
|
|
7
62
|
## [0.10.1]
|
|
8
63
|
|
|
9
64
|
Metadata-only release. No code changes.
|
|
@@ -1,63 +1,63 @@
|
|
|
1
1
|
import { jsx as t, jsxs as f, Fragment as oe } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as nn, useRef as
|
|
2
|
+
import { forwardRef as nn, useRef as S, useState as k, useCallback as V, useEffect as tn, useMemo as ln, useLayoutEffect as an } from "react";
|
|
3
3
|
import d from "clsx";
|
|
4
4
|
import r from "./Timeline.module.scss.js";
|
|
5
5
|
import a from "./GanttTimeline.module.scss.js";
|
|
6
|
-
import { ticks as rn, TIMELINE_PALETTE_VARS as
|
|
6
|
+
import { ticks as rn, TIMELINE_PALETTE_VARS as x, fmtDate as ce, fmtDur as F, eventMatches as sn, fmtDateTime as Z, tint as on } from "./timelineCore.js";
|
|
7
7
|
import { TimelineSummary as cn, TimelineZoomControls as dn, HighlightText as un, TimelineTooltip as mn } from "./TimelineShared.js";
|
|
8
8
|
import { useNowTicker as hn, useContainerWidth as fn, useTimelinePan as wn, useWheelZoom as pn, animateScrollTo as gn } from "./useTimeline.js";
|
|
9
9
|
const w = 230, Pe = 24, R = 400, Nn = 26, Pn = nn(
|
|
10
|
-
function(We,
|
|
10
|
+
function(We, Ce) {
|
|
11
11
|
const {
|
|
12
12
|
tasks: z,
|
|
13
13
|
title: B,
|
|
14
|
-
meta:
|
|
15
|
-
highlight:
|
|
16
|
-
defaultHighlight:
|
|
17
|
-
onHighlightChange:
|
|
14
|
+
meta: G,
|
|
15
|
+
highlight: K,
|
|
16
|
+
defaultHighlight: De,
|
|
17
|
+
onHighlightChange: He,
|
|
18
18
|
showSearch: Ie = !0,
|
|
19
19
|
renderSearch: de,
|
|
20
20
|
compactRows: Ee = !1,
|
|
21
21
|
showGridlines: Ae = !0,
|
|
22
22
|
showControls: ue = !0,
|
|
23
|
-
showSummary:
|
|
24
|
-
summaryPlacement:
|
|
23
|
+
showSummary: I = !1,
|
|
24
|
+
summaryPlacement: T = "left",
|
|
25
25
|
summaryDefaultPosition: Oe,
|
|
26
26
|
maxHeight: Ve = "74vh",
|
|
27
|
-
selectedTaskId:
|
|
27
|
+
selectedTaskId: U,
|
|
28
28
|
defaultSelectedTaskId: Fe = null,
|
|
29
29
|
onTaskSelect: Ze,
|
|
30
30
|
renderRowLabel: me,
|
|
31
|
-
renderBar:
|
|
32
|
-
renderTooltip:
|
|
31
|
+
renderBar: _,
|
|
32
|
+
renderTooltip: $,
|
|
33
33
|
renderDetails: X,
|
|
34
34
|
classes: u,
|
|
35
35
|
className: ze,
|
|
36
36
|
style: Be
|
|
37
|
-
} = We, p =
|
|
38
|
-
ge.current =
|
|
39
|
-
const j =
|
|
37
|
+
} = We, p = S(null), [he, fe] = k(null), [we, pe] = k(!0), [g, Y] = k(null), [Ge, Ke] = k(Fe), P = U !== void 0 ? U : Ge, [M, Ue] = k({ l: 0, t: 0, w: 0, h: 0 }), ge = S(I);
|
|
38
|
+
ge.current = I;
|
|
39
|
+
const j = S(null), q = V(() => {
|
|
40
40
|
const e = p.current;
|
|
41
|
-
e &&
|
|
41
|
+
e && Ue(
|
|
42
42
|
(n) => n.l === e.scrollLeft && n.t === e.scrollTop && n.w === e.clientWidth && n.h === e.clientHeight ? n : { l: e.scrollLeft, t: e.scrollTop, w: e.clientWidth, h: e.clientHeight }
|
|
43
43
|
);
|
|
44
|
-
}, []), [W,
|
|
44
|
+
}, []), [W, _e] = k({ l: 0, w: 2e3 }), J = S(W);
|
|
45
45
|
J.current = W;
|
|
46
46
|
const Q = V(() => {
|
|
47
47
|
const e = p.current;
|
|
48
48
|
if (!e) return;
|
|
49
49
|
const n = Math.floor(e.scrollLeft / R) * R, l = (Math.ceil((e.clientWidth || 1600) / R) + 1) * R;
|
|
50
|
-
(n !== J.current.l || l !== J.current.w) &&
|
|
51
|
-
}, []),
|
|
50
|
+
(n !== J.current.l || l !== J.current.w) && _e({ l: n, w: l });
|
|
51
|
+
}, []), $e = V(() => {
|
|
52
52
|
j.current == null && (j.current = requestAnimationFrame(() => {
|
|
53
53
|
j.current = null, Q(), ge.current && q();
|
|
54
54
|
}));
|
|
55
55
|
}, [q, Q]);
|
|
56
56
|
tn(() => {
|
|
57
|
-
|
|
57
|
+
I && q();
|
|
58
58
|
});
|
|
59
|
-
const Ne = z.some((e) => e.end == null), N = hn(Ne, 400), ee = fn(p),
|
|
60
|
-
|
|
59
|
+
const Ne = z.some((e) => e.end == null), N = hn(Ne, 400), ee = fn(p), C = wn(p), [Xe, Ye] = k(De ?? ""), ne = K !== void 0 ? K : Xe, E = ne.trim(), ve = (e) => {
|
|
60
|
+
K === void 0 && Ye(e), He?.(e);
|
|
61
61
|
}, xe = de ? de({ value: ne, setValue: ve }) : Ie ? /* @__PURE__ */ t(
|
|
62
62
|
"input",
|
|
63
63
|
{
|
|
@@ -71,17 +71,17 @@ const w = 230, Pe = 24, R = 400, Nn = 26, Pn = nn(
|
|
|
71
71
|
let m = i.length ? Math.min(...i.map((e) => e.start)) : N - 1, te = i.length ? Math.max(m + 1, ...i.map((e) => e.end == null ? N : e.end)) : N;
|
|
72
72
|
const le = (te - m) * 0.03;
|
|
73
73
|
m -= le, te += le;
|
|
74
|
-
const ae = te - m,
|
|
75
|
-
re.current =
|
|
76
|
-
const
|
|
74
|
+
const ae = te - m, A = Math.max(240, ee - w - Pe) / ae, o = we || !he ? A : he, re = S(A), Me = S(o);
|
|
75
|
+
re.current = A, Me.current = o;
|
|
76
|
+
const O = S(null);
|
|
77
77
|
an(() => {
|
|
78
|
-
|
|
78
|
+
O.current != null && p.current && (p.current.scrollLeft = O.current, O.current = null), Q();
|
|
79
79
|
});
|
|
80
80
|
const se = V((e, n) => {
|
|
81
81
|
const l = p.current;
|
|
82
82
|
if (!l) return;
|
|
83
83
|
const c = Me.current || 1e-4, h = Math.max(re.current ? re.current * 0.2 : 1e-9, Math.min(1, c * e)), v = (l.scrollLeft + n - w) / c;
|
|
84
|
-
|
|
84
|
+
O.current = v * h + w - n, pe(!1), fe(h);
|
|
85
85
|
}, []);
|
|
86
86
|
pn(p, (e) => {
|
|
87
87
|
e.preventDefault();
|
|
@@ -89,59 +89,60 @@ const w = 230, Pe = 24, R = 400, Nn = 26, Pn = nn(
|
|
|
89
89
|
n && se(Math.exp(-e.deltaY * 18e-4), e.clientX - n.getBoundingClientRect().left);
|
|
90
90
|
});
|
|
91
91
|
const ie = (e) => {
|
|
92
|
-
|
|
92
|
+
U === void 0 && Ke(e ? e.id : null), Ze?.(e);
|
|
93
93
|
}, je = (e) => {
|
|
94
94
|
const n = window.innerWidth || 1200, l = window.innerHeight || 800, c = e.clientX < n * 0.55 ? Math.max(12, n - 340) : 16, h = Math.max(130, Math.min(e.clientY, l - 130));
|
|
95
95
|
return { x: c, y: h };
|
|
96
96
|
}, L = Ee ? 42 : 54, s = P != null && i.find((e) => e.id === P) || null, be = Math.ceil(w + ae * o + Pe + 90), qe = m + (be - w) / o, Te = Math.max(m, m + (W.l - R - w) / o), ye = Math.min(qe, m + (W.l + W.w + R - w) / o), Se = rn(Te, ye, Math.max(1, (ye - Te) * o)).list.map((e) => ({
|
|
97
97
|
left: Math.round(w + (e.t - m) * o),
|
|
98
98
|
label: e.label
|
|
99
|
-
})), Je = i.filter((e) => e.end == null).length,
|
|
99
|
+
})), Je = i.filter((e) => e.end == null).length, D = I ? /* @__PURE__ */ t(
|
|
100
100
|
cn,
|
|
101
101
|
{
|
|
102
102
|
heading: "Tasks",
|
|
103
103
|
className: u?.summary,
|
|
104
|
-
placement:
|
|
104
|
+
placement: T,
|
|
105
105
|
floatingDefaultPosition: Oe,
|
|
106
|
+
bubbleGlyphColors: x.slice(0, 3),
|
|
106
107
|
items: i.map((e, n) => {
|
|
107
|
-
const l = e.end == null ? N : e.end, c = Math.round(w + (e.start - m) * o), h = Math.max(14, Math.round(Math.max(0, l - e.start) * o)), v = 34 + n * L,
|
|
108
|
+
const l = e.end == null ? N : e.end, c = Math.round(w + (e.start - m) * o), h = Math.max(14, Math.round(Math.max(0, l - e.start) * o)), v = 34 + n * L, b = !M.w || c < M.l + M.w && c + h > M.l, y = !M.h || v < M.t + M.h && v + L > M.t;
|
|
108
109
|
return {
|
|
109
110
|
id: e.id,
|
|
110
111
|
number: String(n + 1).padStart(2, "0"),
|
|
111
112
|
label: e.name,
|
|
112
|
-
color:
|
|
113
|
+
color: x[n % x.length],
|
|
113
114
|
time: ce(e.start),
|
|
114
|
-
inView:
|
|
115
|
+
inView: b && y,
|
|
115
116
|
selected: P === e.id
|
|
116
117
|
};
|
|
117
118
|
}),
|
|
118
119
|
onPick: (e) => {
|
|
119
120
|
const n = i.findIndex((H) => H.id === e), l = p.current;
|
|
120
121
|
if (n < 0 || !l) return;
|
|
121
|
-
const c = i[n], h = c.end == null ? N : c.end, v = Math.round(w + (c.start - m) * o),
|
|
122
|
-
left: Math.max(0, v +
|
|
122
|
+
const c = i[n], h = c.end == null ? N : c.end, v = Math.round(w + (c.start - m) * o), b = Math.max(14, Math.round(Math.max(0, h - c.start) * o)), y = {
|
|
123
|
+
left: Math.max(0, v + b / 2 - l.clientWidth / 2)
|
|
123
124
|
};
|
|
124
|
-
l.clientHeight && (
|
|
125
|
+
l.clientHeight && (y.top = Math.max(0, 34 + n * L + L / 2 - l.clientHeight / 2)), gn(l, y);
|
|
125
126
|
}
|
|
126
127
|
}
|
|
127
128
|
) : null;
|
|
128
129
|
return /* @__PURE__ */ f(
|
|
129
130
|
"div",
|
|
130
131
|
{
|
|
131
|
-
ref:
|
|
132
|
+
ref: Ce,
|
|
132
133
|
className: d(r.root, u?.root, ze),
|
|
133
134
|
style: Be,
|
|
134
135
|
children: [
|
|
135
|
-
(ue || xe || B != null ||
|
|
136
|
+
(ue || xe || B != null || G != null) && /* @__PURE__ */ f("div", { className: d(r.toolbar, u?.toolbar), children: [
|
|
136
137
|
/* @__PURE__ */ f("div", { className: r.toolbarText, children: [
|
|
137
138
|
B != null && /* @__PURE__ */ t("span", { className: r.toolbarTitle, children: B }),
|
|
138
|
-
/* @__PURE__ */ t("span", { className: r.toolbarMeta, children:
|
|
139
|
+
/* @__PURE__ */ t("span", { className: r.toolbarMeta, children: G ?? (i.length ? `${i.length} tasks · ${F(ae - 2 * le)} · ${Je} running` : "No tasks") })
|
|
139
140
|
] }),
|
|
140
141
|
xe,
|
|
141
142
|
ue && /* @__PURE__ */ t(
|
|
142
143
|
dn,
|
|
143
144
|
{
|
|
144
|
-
zoomPct: `${Math.round(o /
|
|
145
|
+
zoomPct: `${Math.round(o / A * 100)}%`,
|
|
145
146
|
fitActive: we,
|
|
146
147
|
onZoomIn: () => se(1.5, ee / 2),
|
|
147
148
|
onZoomOut: () => se(1 / 1.5, ee / 2),
|
|
@@ -152,9 +153,9 @@ const w = 230, Pe = 24, R = 400, Nn = 26, Pn = nn(
|
|
|
152
153
|
}
|
|
153
154
|
)
|
|
154
155
|
] }),
|
|
155
|
-
|
|
156
|
+
T === "top" && D,
|
|
156
157
|
/* @__PURE__ */ f("div", { className: r.layout, children: [
|
|
157
|
-
|
|
158
|
+
T === "left" && D,
|
|
158
159
|
/* @__PURE__ */ f("div", { className: r.main, children: [
|
|
159
160
|
/* @__PURE__ */ t("div", { className: d(r.card, u?.card), children: /* @__PURE__ */ t(
|
|
160
161
|
"div",
|
|
@@ -162,11 +163,11 @@ const w = 230, Pe = 24, R = 400, Nn = 26, Pn = nn(
|
|
|
162
163
|
ref: p,
|
|
163
164
|
className: d(r.scroller, a.scroller, u?.scroller),
|
|
164
165
|
style: { maxHeight: Ve },
|
|
165
|
-
onPointerDown:
|
|
166
|
-
onPointerMove:
|
|
167
|
-
onPointerUp:
|
|
168
|
-
onPointerLeave:
|
|
169
|
-
onScroll:
|
|
166
|
+
onPointerDown: C.onPointerDown,
|
|
167
|
+
onPointerMove: C.onPointerMove,
|
|
168
|
+
onPointerUp: C.onPointerUp,
|
|
169
|
+
onPointerLeave: C.onPointerUp,
|
|
170
|
+
onScroll: $e,
|
|
170
171
|
children: /* @__PURE__ */ f("div", { className: a.inner, style: { width: be }, children: [
|
|
171
172
|
Ae && Se.map((e, n) => /* @__PURE__ */ t("div", { className: a.gridline, style: { left: e.left } }, n)),
|
|
172
173
|
Ne && /* @__PURE__ */ t(
|
|
@@ -178,15 +179,15 @@ const w = 230, Pe = 24, R = 400, Nn = 26, Pn = nn(
|
|
|
178
179
|
),
|
|
179
180
|
/* @__PURE__ */ t("div", { className: d(a.axis, u?.axis), children: Se.map((e, n) => /* @__PURE__ */ t("div", { className: a.axisLabel, style: { left: e.left }, children: e.label }, n)) }),
|
|
180
181
|
i.map((e, n) => {
|
|
181
|
-
const l = e.end == null, c = l ? N : e.end, h = Math.max(0, c - e.start), v = sn(e,
|
|
182
|
+
const l = e.end == null, c = l ? N : e.end, h = Math.max(0, c - e.start), v = sn(e, E), b = x[n % x.length], y = Math.round(w + (e.start - m) * o), H = Math.max(14, Math.round(h * o)), ke = F(h) + (l ? " · running" : ""), Le = H > 130, Re = { index: n, color: b, running: l, durationMs: h };
|
|
182
183
|
return /* @__PURE__ */ f(
|
|
183
184
|
"div",
|
|
184
185
|
{
|
|
185
186
|
className: d(a.row, u?.row),
|
|
186
|
-
style: { height: L, opacity:
|
|
187
|
+
style: { height: L, opacity: E && !v ? 0.3 : 1 },
|
|
187
188
|
children: [
|
|
188
189
|
/* @__PURE__ */ t("div", { className: d(a.rowLabel, u?.rowLabel), children: me ? me(e, Re) : /* @__PURE__ */ f(oe, { children: [
|
|
189
|
-
/* @__PURE__ */ t("span", { className: a.rowName, children: /* @__PURE__ */ t(un, { text: e.name, query:
|
|
190
|
+
/* @__PURE__ */ t("span", { className: a.rowName, children: /* @__PURE__ */ t(un, { text: e.name, query: E }) }),
|
|
190
191
|
/* @__PURE__ */ t("span", { className: a.rowDates, children: ce(e.start) + (l ? " → now" : " → " + ce(c)) })
|
|
191
192
|
] }) }),
|
|
192
193
|
/* @__PURE__ */ t(
|
|
@@ -194,15 +195,15 @@ const w = 230, Pe = 24, R = 400, Nn = 26, Pn = nn(
|
|
|
194
195
|
{
|
|
195
196
|
className: d(a.bar, l && a.barRunning, u?.bar),
|
|
196
197
|
style: {
|
|
197
|
-
left:
|
|
198
|
+
left: y,
|
|
198
199
|
top: Math.round((L - Nn) / 2),
|
|
199
200
|
width: H,
|
|
200
|
-
borderColor:
|
|
201
|
-
background: l ? on(
|
|
202
|
-
boxShadow:
|
|
201
|
+
borderColor: b,
|
|
202
|
+
background: l ? on(b, 72) : b,
|
|
203
|
+
boxShadow: E && v ? "0 0 0 3px var(--crk-timeline-hl-ring, #f3d98b)" : "none"
|
|
203
204
|
},
|
|
204
205
|
onClick: () => {
|
|
205
|
-
|
|
206
|
+
C.wasDragSuppressed() || (Y(null), ie(P === e.id ? null : e));
|
|
206
207
|
},
|
|
207
208
|
onMouseEnter: (Qe) => {
|
|
208
209
|
if (P === e.id) return;
|
|
@@ -217,13 +218,13 @@ const w = 230, Pe = 24, R = 400, Nn = 26, Pn = nn(
|
|
|
217
218
|
});
|
|
218
219
|
},
|
|
219
220
|
onMouseLeave: () => Y(null),
|
|
220
|
-
children:
|
|
221
|
+
children: _ ? _(e, Re) : /* @__PURE__ */ f(oe, { children: [
|
|
221
222
|
l && /* @__PURE__ */ t("span", { className: d(r.pulseDot, a.barDot) }),
|
|
222
223
|
Le && /* @__PURE__ */ t("span", { className: a.barTextInside, children: ke })
|
|
223
224
|
] })
|
|
224
225
|
}
|
|
225
226
|
),
|
|
226
|
-
|
|
227
|
+
!_ && !Le && /* @__PURE__ */ t("div", { className: a.barTextOutside, style: { left: y + H + 10 }, children: ke })
|
|
227
228
|
]
|
|
228
229
|
},
|
|
229
230
|
e.id
|
|
@@ -232,7 +233,8 @@ const w = 230, Pe = 24, R = 400, Nn = 26, Pn = nn(
|
|
|
232
233
|
] })
|
|
233
234
|
}
|
|
234
235
|
) }),
|
|
235
|
-
/* @__PURE__ */ t("div", { className: d(r.footnote, u?.footnote), children: "Click a bar to open details in the side panel · dashed bars are still running and keep growing" })
|
|
236
|
+
/* @__PURE__ */ t("div", { className: d(r.footnote, u?.footnote), children: "Click a bar to open details in the side panel · dashed bars are still running and keep growing" }),
|
|
237
|
+
T === "bubble" && D
|
|
236
238
|
] }),
|
|
237
239
|
s && X && /* @__PURE__ */ t("aside", { className: d(r.aside, a.drawer, u?.drawer), children: X(s, {
|
|
238
240
|
close: () => ie(null),
|
|
@@ -245,7 +247,7 @@ const w = 230, Pe = 24, R = 400, Nn = 26, Pn = nn(
|
|
|
245
247
|
{
|
|
246
248
|
className: a.drawerSwatch,
|
|
247
249
|
style: {
|
|
248
|
-
background:
|
|
250
|
+
background: x[i.indexOf(s) % x.length]
|
|
249
251
|
}
|
|
250
252
|
}
|
|
251
253
|
),
|
|
@@ -278,17 +280,17 @@ const w = 230, Pe = 24, R = 400, Nn = 26, Pn = nn(
|
|
|
278
280
|
/* @__PURE__ */ t("div", { className: r.asideSection, children: "Raw event" }),
|
|
279
281
|
/* @__PURE__ */ t("pre", { className: r.asideRaw, children: JSON.stringify(s, null, 2) })
|
|
280
282
|
] }),
|
|
281
|
-
(
|
|
283
|
+
(T === "right" || T === "floating") && D
|
|
282
284
|
] }),
|
|
283
|
-
|
|
285
|
+
T === "bottom" && D,
|
|
284
286
|
g && (() => {
|
|
285
|
-
const e = i.find((l) => l.id === g.id), n = e &&
|
|
287
|
+
const e = i.find((l) => l.id === g.id), n = e && $ ? $(e, {
|
|
286
288
|
index: i.indexOf(e),
|
|
287
|
-
color:
|
|
289
|
+
color: x[i.indexOf(e) % x.length],
|
|
288
290
|
running: e.end == null,
|
|
289
291
|
durationMs: (e.end == null ? N : e.end) - e.start
|
|
290
292
|
}) : void 0;
|
|
291
|
-
return
|
|
293
|
+
return $ && n == null ? null : /* @__PURE__ */ t(mn, { x: g.x, y: g.y, className: u?.tooltip, children: n !== void 0 ? n : /* @__PURE__ */ f(oe, { children: [
|
|
292
294
|
/* @__PURE__ */ t("div", { className: r.tooltipTitle, children: g.title }),
|
|
293
295
|
/* @__PURE__ */ t(
|
|
294
296
|
"div",
|