@overdoser/react-toolkit 0.9.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,111 +1,127 @@
1
- const t = "crk-root-z0SDl", o = "crk-toolbar-bi8on", s = "crk-toolbarText-FsDXp", r = "crk-toolbarTitle-Rb9N0", m = "crk-toolbarMeta-E06cE", c = "crk-controls-8bff6", n = "crk-zoomBtn-NhfsT", a = "crk-zoomPct-l6Kb7", e = "crk-fitBtn-7CPVN", i = "crk-fitBtnActive-VGm-i", l = "crk-controlsHint-9W3ak", u = "crk-searchInput-1KGtO", y = "crk-segmented-ewtNI", k = "crk-segmentedBtn-8jCDo", d = "crk-segmentedBtnActive-fFz-u", p = "crk-legend-ba0us", g = "crk-legendItem-WV0US", b = "crk-legendDot-t2YBC", B = "crk-layout-odptV", w = "crk-main-3O04o", D = "crk-card-HLtsS", C = "crk-scroller-fLmrw", L = "crk-footnote-5H-AC", R = "crk-aside-xGL6z", T = "crk-asideClose-xWoXo", f = "crk-asideSection-ArSn1", H = "crk-asideRaw-233n9", z = "crk-summary-S5D5Y", S = "crk-summaryHeader-KiURn", G = "crk-summaryCount-Hgt1x", A = "crk-summaryList-KHyfB", I = "crk-summaryRow-9AC-c", V = "crk-summaryRowInView-Vap6M", F = "crk-summaryRowSelected-WTZUP", P = "crk-summaryNum-i8PC3", x = "crk-summaryDot-AcsLd", N = "crk-summaryLabel-DR8G2", h = "crk-summaryTime-mzS5x", v = "crk-summaryHorizontal--wsta", M = "crk-summaryTop-sLyWG", E = "crk-summaryBottom-OV6RP", W = "crk-summaryListGrid-POwB0", K = "crk-summaryFloating-6Yac4", O = "crk-summaryFloatingCard-6A5Ic", Y = "crk-summaryHandle--chiD", U = "crk-summaryGrip-qVC6v", X = "crk-tooltip-ot-iF", q = "crk-tooltipTitle-CxGBY", Z = "crk-tooltipLine-bqSen", j = "crk-tooltipMono-mbJwE", J = "crk-tooltipDim-hEEP-", Q = "crk-mark-XZVFm", _ = "crk-pulseDot-usPRN", $ = {
2
- root: t,
3
- toolbar: o,
4
- toolbarText: s,
5
- toolbarTitle: r,
6
- toolbarMeta: m,
7
- controls: c,
8
- zoomBtn: n,
9
- zoomPct: a,
10
- fitBtn: e,
11
- fitBtnActive: i,
1
+ const o = "crk-root-z0SDl", t = "crk-toolbar-bi8on", m = "crk-toolbarText-FsDXp", s = "crk-toolbarTitle-Rb9N0", r = "crk-toolbarMeta-E06cE", a = "crk-controls-8bff6", c = "crk-zoomBtn-NhfsT", e = "crk-zoomPct-l6Kb7", n = "crk-fitBtn-7CPVN", u = "crk-fitBtnActive-VGm-i", l = "crk-controlsHint-9W3ak", i = "crk-searchInput-1KGtO", y = "crk-segmented-ewtNI", k = "crk-segmentedBtn-8jCDo", d = "crk-segmentedBtnActive-fFz-u", b = "crk-legend-ba0us", B = "crk-legendItem-WV0US", p = "crk-legendDot-t2YBC", g = "crk-layout-odptV", C = "crk-main-3O04o", T = "crk-card-HLtsS", w = "crk-scroller-fLmrw", D = "crk-footnote-5H-AC", H = "crk-aside-xGL6z", L = "crk-asideClose-xWoXo", R = "crk-asideSection-ArSn1", f = "crk-asideRaw-233n9", G = "crk-summary-S5D5Y", A = "crk-summaryHeader-KiURn", h = "crk-summaryCount-Hgt1x", F = "crk-summaryList-KHyfB", S = "crk-summaryRow-9AC-c", z = "crk-summaryRowInView-Vap6M", P = "crk-summaryRowSelected-WTZUP", V = "crk-summaryNum-i8PC3", I = "crk-summaryDot-AcsLd", x = "crk-summaryLabel-DR8G2", M = "crk-summaryTime-mzS5x", N = "crk-summaryHorizontal--wsta", v = "crk-summaryTop-sLyWG", E = "crk-summaryBottom-OV6RP", W = "crk-summaryListGrid-POwB0", O = "crk-summaryBubbleAnchor-VJ9XE", X = "crk-summaryBubble-bovnu", K = "crk-summaryBubbleGlyph-qmhBS", U = "crk-summaryBubblePanel-MFOE4", Y = "crk-summaryBubbleCard-G0AMd", q = "crk-summaryHeadTools-oU-0D", J = "crk-summaryCollapse-JNDjo", j = "crk-summaryFootnote-oTXbW", Z = "crk-summaryFloating-6Yac4", Q = "crk-summaryFloatingCard-6A5Ic", _ = "crk-summaryHandle--chiD", $ = "crk-summaryGrip-qVC6v", oo = "crk-tooltip-ot-iF", to = "crk-tooltipTitle-CxGBY", mo = "crk-tooltipLine-bqSen", so = "crk-tooltipMono-mbJwE", ro = "crk-tooltipDim-hEEP-", ao = "crk-mark-XZVFm", co = "crk-pulseDot-usPRN", eo = {
2
+ root: o,
3
+ toolbar: t,
4
+ toolbarText: m,
5
+ toolbarTitle: s,
6
+ toolbarMeta: r,
7
+ controls: a,
8
+ zoomBtn: c,
9
+ zoomPct: e,
10
+ fitBtn: n,
11
+ fitBtnActive: u,
12
12
  controlsHint: l,
13
- searchInput: u,
13
+ searchInput: i,
14
14
  segmented: y,
15
15
  segmentedBtn: k,
16
16
  segmentedBtnActive: d,
17
- legend: p,
18
- legendItem: g,
19
- legendDot: b,
20
- layout: B,
21
- main: w,
22
- card: D,
23
- scroller: C,
24
- footnote: L,
25
- aside: R,
26
- asideClose: T,
27
- asideSection: f,
28
- asideRaw: H,
29
- summary: z,
30
- summaryHeader: S,
31
- summaryCount: G,
32
- summaryList: A,
33
- summaryRow: I,
34
- summaryRowInView: V,
35
- summaryRowSelected: F,
36
- summaryNum: P,
37
- summaryDot: x,
38
- summaryLabel: N,
39
- summaryTime: h,
40
- summaryHorizontal: v,
41
- summaryTop: M,
17
+ legend: b,
18
+ legendItem: B,
19
+ legendDot: p,
20
+ layout: g,
21
+ main: C,
22
+ card: T,
23
+ scroller: w,
24
+ footnote: D,
25
+ aside: H,
26
+ asideClose: L,
27
+ asideSection: R,
28
+ asideRaw: f,
29
+ summary: G,
30
+ summaryHeader: A,
31
+ summaryCount: h,
32
+ summaryList: F,
33
+ summaryRow: S,
34
+ summaryRowInView: z,
35
+ summaryRowSelected: P,
36
+ summaryNum: V,
37
+ summaryDot: I,
38
+ summaryLabel: x,
39
+ summaryTime: M,
40
+ summaryHorizontal: N,
41
+ summaryTop: v,
42
42
  summaryBottom: E,
43
43
  summaryListGrid: W,
44
- summaryFloating: K,
45
- summaryFloatingCard: O,
46
- summaryHandle: Y,
47
- summaryGrip: U,
48
- tooltip: X,
49
- tooltipTitle: q,
50
- tooltipLine: Z,
51
- tooltipMono: j,
52
- tooltipDim: J,
53
- mark: Q,
54
- pulseDot: _
44
+ summaryBubbleAnchor: O,
45
+ summaryBubble: X,
46
+ summaryBubbleGlyph: K,
47
+ summaryBubblePanel: U,
48
+ summaryBubbleCard: Y,
49
+ summaryHeadTools: q,
50
+ summaryCollapse: J,
51
+ summaryFootnote: j,
52
+ summaryFloating: Z,
53
+ summaryFloatingCard: Q,
54
+ summaryHandle: _,
55
+ summaryGrip: $,
56
+ tooltip: oo,
57
+ tooltipTitle: to,
58
+ tooltipLine: mo,
59
+ tooltipMono: so,
60
+ tooltipDim: ro,
61
+ mark: ao,
62
+ pulseDot: co
55
63
  };
56
64
  export {
57
- R as aside,
58
- T as asideClose,
59
- H as asideRaw,
60
- f as asideSection,
61
- D as card,
62
- c as controls,
65
+ H as aside,
66
+ L as asideClose,
67
+ f as asideRaw,
68
+ R as asideSection,
69
+ T as card,
70
+ a as controls,
63
71
  l as controlsHint,
64
- $ as default,
65
- e as fitBtn,
66
- i as fitBtnActive,
67
- L as footnote,
68
- B as layout,
69
- p as legend,
70
- b as legendDot,
71
- g as legendItem,
72
- w as main,
73
- Q as mark,
74
- _ as pulseDot,
75
- t as root,
76
- C as scroller,
77
- u as searchInput,
72
+ eo as default,
73
+ n as fitBtn,
74
+ u as fitBtnActive,
75
+ D as footnote,
76
+ g as layout,
77
+ b as legend,
78
+ p as legendDot,
79
+ B as legendItem,
80
+ C as main,
81
+ ao as mark,
82
+ co as pulseDot,
83
+ o as root,
84
+ w as scroller,
85
+ i as searchInput,
78
86
  y as segmented,
79
87
  k as segmentedBtn,
80
88
  d as segmentedBtnActive,
81
- z as summary,
89
+ G as summary,
82
90
  E as summaryBottom,
83
- G as summaryCount,
84
- x as summaryDot,
85
- K as summaryFloating,
86
- O as summaryFloatingCard,
87
- U as summaryGrip,
88
- Y as summaryHandle,
89
- S as summaryHeader,
90
- v as summaryHorizontal,
91
- N as summaryLabel,
92
- A as summaryList,
91
+ X as summaryBubble,
92
+ O as summaryBubbleAnchor,
93
+ Y as summaryBubbleCard,
94
+ K as summaryBubbleGlyph,
95
+ U as summaryBubblePanel,
96
+ J as summaryCollapse,
97
+ h as summaryCount,
98
+ I as summaryDot,
99
+ Z as summaryFloating,
100
+ Q as summaryFloatingCard,
101
+ j as summaryFootnote,
102
+ $ as summaryGrip,
103
+ _ as summaryHandle,
104
+ q as summaryHeadTools,
105
+ A as summaryHeader,
106
+ N as summaryHorizontal,
107
+ x as summaryLabel,
108
+ F as summaryList,
93
109
  W as summaryListGrid,
94
- P as summaryNum,
95
- I as summaryRow,
96
- V as summaryRowInView,
97
- F as summaryRowSelected,
98
- h as summaryTime,
99
- M as summaryTop,
100
- o as toolbar,
101
- m as toolbarMeta,
102
- s as toolbarText,
103
- r as toolbarTitle,
104
- X as tooltip,
105
- J as tooltipDim,
106
- Z as tooltipLine,
107
- j as tooltipMono,
108
- q as tooltipTitle,
109
- n as zoomBtn,
110
- a as zoomPct
110
+ V as summaryNum,
111
+ S as summaryRow,
112
+ z as summaryRowInView,
113
+ P as summaryRowSelected,
114
+ M as summaryTime,
115
+ v as summaryTop,
116
+ t as toolbar,
117
+ r as toolbarMeta,
118
+ m as toolbarText,
119
+ s as toolbarTitle,
120
+ oo as tooltip,
121
+ ro as tooltipDim,
122
+ mo as tooltipLine,
123
+ so as tooltipMono,
124
+ to as tooltipTitle,
125
+ c as zoomBtn,
126
+ e as zoomPct
111
127
  };
@@ -30,10 +30,13 @@ export declare function TimelineSegmented<T extends string>({ value, options, on
30
30
  }): import("react/jsx-runtime").JSX.Element;
31
31
  /**
32
32
  * Where the summary panel sits: docked beside the timeline (`'left'` /
33
- * `'right'`), as a full-width block (`'top'` / `'bottom'`), or `'floating'` —
34
- * a draggable palette over the timeline (grab it by its header).
33
+ * `'right'`), as a full-width block (`'top'` / `'bottom'`), `'floating'` —
34
+ * a draggable palette over the timeline (grab it by its header) — or
35
+ * `'bubble'` — a collapsed pill anchored bottom-left of the timeline that
36
+ * expands into a draggable panel in place and never permanently occupies
37
+ * canvas width.
35
38
  */
36
- export type TimelineSummaryPlacement = 'left' | 'right' | 'top' | 'bottom' | 'floating';
39
+ export type TimelineSummaryPlacement = 'left' | 'right' | 'top' | 'bottom' | 'floating' | 'bubble';
37
40
  /** One dense row of the summary panel. */
38
41
  export interface TimelineSummaryItem {
39
42
  id: string;
@@ -54,14 +57,21 @@ export interface TimelineSummaryItem {
54
57
  * the timeline is panned the panel auto-scrolls to keep the band centered
55
58
  * (suppressed while the pointer is over the panel so it can be scrolled
56
59
  * independently). Clicking a row asks the timeline to scroll to that event.
60
+ *
61
+ * The `'bubble'` placement collapses the panel into a small pill anchored
62
+ * bottom-left of the timeline; clicking it expands the panel in place
63
+ * (draggable by its header), and collapsing always returns the bubble to its
64
+ * home corner — the dragged position is deliberately not persisted.
57
65
  */
58
- export declare function TimelineSummary({ heading, items, onPick, placement, floatingDefaultPosition, className, }: {
66
+ export declare function TimelineSummary({ heading, items, onPick, placement, floatingDefaultPosition, bubbleGlyphColors, className, }: {
59
67
  heading?: ReactNode;
60
68
  items: TimelineSummaryItem[];
61
69
  onPick: (id: string) => void;
62
70
  placement?: TimelineSummaryPlacement;
63
71
  /** Floating placement: initial offset from the anchored top-left corner. */
64
72
  floatingDefaultPosition?: DraggablePosition;
73
+ /** Bubble placement: colors of the stacked strokes in the collapsed glyph. */
74
+ bubbleGlyphColors?: string[];
65
75
  className?: string;
66
76
  }): import("react/jsx-runtime").JSX.Element;
67
77
  /** Fixed dark tooltip; positioned by the caller, opacity-only fade. */
@@ -1,115 +1,132 @@
1
- import { jsxs as u, Fragment as N, jsx as n } from "react/jsx-runtime";
2
- import { useRef as C, useEffect as B } from "react";
1
+ import { jsxs as c, Fragment as B, jsx as n } from "react/jsx-runtime";
2
+ import { useRef as D, useState as E, useEffect as L } from "react";
3
3
  import m from "clsx";
4
4
  import e from "./Timeline.module.scss.js";
5
- import { highlightParts as z } from "./timelineCore.js";
6
- import { Draggable as H } from "../Draggable/Draggable.js";
7
- function S({
5
+ import { highlightParts as R } from "./timelineCore.js";
6
+ import { Draggable as w } from "../Draggable/Draggable.js";
7
+ function O({
8
8
  items: l,
9
- className: s
9
+ className: r
10
10
  }) {
11
- return l.length ? /* @__PURE__ */ n("div", { className: m(e.legend, s), children: l.map((r) => /* @__PURE__ */ u("span", { className: e.legendItem, children: [
12
- /* @__PURE__ */ n("span", { className: e.legendDot, style: { background: r.color } }),
13
- r.name
14
- ] }, r.name)) }) : null;
11
+ return l.length ? /* @__PURE__ */ n("div", { className: m(e.legend, r), children: l.map((s) => /* @__PURE__ */ c("span", { className: e.legendItem, children: [
12
+ /* @__PURE__ */ n("span", { className: e.legendDot, style: { background: s.color } }),
13
+ s.name
14
+ ] }, s.name)) }) : null;
15
15
  }
16
- function V({
16
+ function q({
17
17
  zoomPct: l,
18
- fitActive: s,
19
- onZoomIn: r,
20
- onZoomOut: t,
18
+ fitActive: r,
19
+ onZoomIn: s,
20
+ onZoomOut: a,
21
21
  onFit: i,
22
- hint: h,
23
- children: f,
24
- className: d
22
+ hint: u,
23
+ children: p,
24
+ className: y
25
25
  }) {
26
- return /* @__PURE__ */ u("div", { className: m(e.controls, d), children: [
27
- f,
28
- /* @__PURE__ */ n("button", { type: "button", className: e.zoomBtn, title: "Zoom out", onClick: t, children: "−" }),
26
+ return /* @__PURE__ */ c("div", { className: m(e.controls, y), children: [
27
+ p,
28
+ /* @__PURE__ */ n("button", { type: "button", className: e.zoomBtn, title: "Zoom out", onClick: a, children: "−" }),
29
29
  /* @__PURE__ */ n("span", { className: e.zoomPct, children: l }),
30
- /* @__PURE__ */ n("button", { type: "button", className: e.zoomBtn, title: "Zoom in", onClick: r, children: "+" }),
30
+ /* @__PURE__ */ n("button", { type: "button", className: e.zoomBtn, title: "Zoom in", onClick: s, children: "+" }),
31
31
  /* @__PURE__ */ n(
32
32
  "button",
33
33
  {
34
34
  type: "button",
35
- className: m(e.fitBtn, s && e.fitBtnActive),
35
+ className: m(e.fitBtn, r && e.fitBtnActive),
36
36
  onClick: i,
37
37
  children: "Fit"
38
38
  }
39
39
  ),
40
- h ? /* @__PURE__ */ n("span", { className: e.controlsHint, children: h }) : null
40
+ u ? /* @__PURE__ */ n("span", { className: e.controlsHint, children: u }) : null
41
41
  ] });
42
42
  }
43
- function A({
43
+ function G({
44
44
  value: l,
45
- options: s,
46
- onChange: r
45
+ options: r,
46
+ onChange: s
47
47
  }) {
48
- return /* @__PURE__ */ n("div", { className: e.segmented, children: s.map((t) => /* @__PURE__ */ n(
48
+ return /* @__PURE__ */ n("div", { className: e.segmented, children: r.map((a) => /* @__PURE__ */ n(
49
49
  "button",
50
50
  {
51
51
  type: "button",
52
- title: t.title,
53
- className: m(e.segmentedBtn, t.value === l && e.segmentedBtnActive),
54
- onClick: () => r(t.value),
55
- children: t.label
52
+ title: a.title,
53
+ className: m(e.segmentedBtn, a.value === l && e.segmentedBtnActive),
54
+ onClick: () => s(a.value),
55
+ children: a.label
56
56
  },
57
- t.value
57
+ a.value
58
58
  )) });
59
59
  }
60
- function M({
60
+ function K({
61
61
  heading: l = "Events",
62
- items: s,
63
- onPick: r,
64
- placement: t = "left",
62
+ items: r,
63
+ onPick: s,
64
+ placement: a = "left",
65
65
  floatingDefaultPosition: i,
66
- className: h
66
+ bubbleGlyphColors: u,
67
+ className: p
67
68
  }) {
68
- const f = C(null), d = C(!1), p = t === "floating", b = t === "top" || t === "bottom";
69
- let c = -1, y = -1;
70
- s.forEach((a, o) => {
71
- a.inView && (c < 0 && (c = o), y = o);
69
+ const y = D(null), N = D(!1), [z, C] = E(!1), [A, T] = E({ x: 0, y: 0 }), d = a === "bubble", b = a === "floating", k = a === "top" || a === "bottom";
70
+ let h = -1, f = -1;
71
+ r.forEach((t, o) => {
72
+ t.inView && (h < 0 && (h = o), f = o);
72
73
  });
73
- const v = c === 0 && y === s.length - 1;
74
- B(() => {
75
- const a = f.current;
76
- if (!a || d.current || c < 0 || v) return;
77
- const o = a.querySelectorAll("[data-timeline-summary-row]"), k = o[c], g = o[y];
78
- if (!k || !g) return;
79
- const x = (k.offsetTop + g.offsetTop + g.offsetHeight) / 2;
80
- a.scrollTop = Math.max(0, x - a.clientHeight / 2);
81
- }, [c, y, v]);
82
- const w = /* @__PURE__ */ u(N, { children: [
83
- /* @__PURE__ */ u("span", { children: [
84
- p && /* @__PURE__ */ n("span", { className: e.summaryGrip, "aria-hidden": !0, children: "⠿" }),
74
+ const H = h === 0 && f === r.length - 1;
75
+ L(() => {
76
+ const t = y.current;
77
+ if (!t || N.current || h < 0 || H) return;
78
+ const o = t.querySelectorAll("[data-timeline-summary-row]"), P = o[h], v = o[f];
79
+ if (!P || !v) return;
80
+ const F = (P.offsetTop + v.offsetTop + v.offsetHeight) / 2;
81
+ t.scrollTop = Math.max(0, F - t.clientHeight / 2);
82
+ }, [h, f, H]);
83
+ const x = /* @__PURE__ */ c(B, { children: [
84
+ /* @__PURE__ */ c("span", { children: [
85
+ (b || d) && /* @__PURE__ */ n("span", { className: e.summaryGrip, "aria-hidden": !0, children: "⠿" }),
85
86
  l
86
87
  ] }),
87
- /* @__PURE__ */ n("span", { className: e.summaryCount, children: s.length })
88
- ] }), T = /* @__PURE__ */ u(
88
+ d ? /* @__PURE__ */ c("span", { className: e.summaryHeadTools, children: [
89
+ /* @__PURE__ */ n("span", { className: e.summaryCount, children: r.length }),
90
+ /* @__PURE__ */ n(
91
+ "button",
92
+ {
93
+ type: "button",
94
+ className: e.summaryCollapse,
95
+ "aria-label": "Collapse event summary",
96
+ onClick: (t) => {
97
+ t.stopPropagation(), C(!1), T({ x: 0, y: 0 });
98
+ },
99
+ onPointerDown: (t) => t.stopPropagation(),
100
+ children: "×"
101
+ }
102
+ )
103
+ ] }) : /* @__PURE__ */ n("span", { className: e.summaryCount, children: r.length })
104
+ ] }), g = /* @__PURE__ */ c(
89
105
  "div",
90
106
  {
91
107
  className: m(
92
108
  e.summary,
93
- b && e.summaryHorizontal,
94
- t === "top" && e.summaryTop,
95
- t === "bottom" && e.summaryBottom,
96
- p && e.summaryFloatingCard,
97
- h
109
+ k && e.summaryHorizontal,
110
+ a === "top" && e.summaryTop,
111
+ a === "bottom" && e.summaryBottom,
112
+ b && e.summaryFloatingCard,
113
+ d && e.summaryBubbleCard,
114
+ p
98
115
  ),
99
116
  onMouseEnter: () => {
100
- d.current = !0;
117
+ N.current = !0;
101
118
  },
102
119
  onMouseLeave: () => {
103
- d.current = !1;
120
+ N.current = !1;
104
121
  },
105
122
  children: [
106
- p ? /* @__PURE__ */ n(H.Handle, { className: m(e.summaryHeader, e.summaryHandle), children: w }) : /* @__PURE__ */ n("div", { className: e.summaryHeader, children: w }),
123
+ b || d ? /* @__PURE__ */ n(w.Handle, { className: m(e.summaryHeader, e.summaryHandle), children: x }) : /* @__PURE__ */ n("div", { className: e.summaryHeader, children: x }),
107
124
  /* @__PURE__ */ n(
108
125
  "div",
109
126
  {
110
- ref: f,
111
- className: m(e.summaryList, b && e.summaryListGrid),
112
- children: s.map((a) => /* @__PURE__ */ u(
127
+ ref: y,
128
+ className: m(e.summaryList, k && e.summaryListGrid),
129
+ children: r.map((t) => /* @__PURE__ */ c(
113
130
  "div",
114
131
  {
115
132
  "data-timeline-summary-row": !0,
@@ -117,57 +134,80 @@ function M({
117
134
  tabIndex: 0,
118
135
  className: m(
119
136
  e.summaryRow,
120
- a.inView && e.summaryRowInView,
121
- a.selected && e.summaryRowSelected
137
+ t.inView && e.summaryRowInView,
138
+ t.selected && e.summaryRowSelected
122
139
  ),
123
- onClick: () => r(a.id),
140
+ onClick: () => s(t.id),
124
141
  onKeyDown: (o) => {
125
- (o.key === "Enter" || o.key === " ") && (o.preventDefault(), r(a.id));
142
+ (o.key === "Enter" || o.key === " ") && (o.preventDefault(), s(t.id));
126
143
  },
127
144
  children: [
128
- /* @__PURE__ */ n("span", { className: e.summaryNum, children: a.number }),
129
- /* @__PURE__ */ n("span", { className: e.summaryDot, style: { background: a.color } }),
130
- /* @__PURE__ */ n("span", { className: e.summaryLabel, children: a.label }),
131
- a.time && /* @__PURE__ */ n("span", { className: e.summaryTime, children: a.time })
145
+ /* @__PURE__ */ n("span", { className: e.summaryNum, children: t.number }),
146
+ /* @__PURE__ */ n("span", { className: e.summaryDot, style: { background: t.color } }),
147
+ /* @__PURE__ */ n("span", { className: e.summaryLabel, children: t.label }),
148
+ t.time && /* @__PURE__ */ n("span", { className: e.summaryTime, children: t.time })
132
149
  ]
133
150
  },
134
- a.id
151
+ t.id
135
152
  ))
136
153
  }
137
- )
154
+ ),
155
+ d && /* @__PURE__ */ n("div", { className: e.summaryFootnote, children: "Tinted rows are in the viewport" })
138
156
  ]
139
157
  }
140
158
  );
141
- return p ? /* @__PURE__ */ n(
142
- H,
159
+ return d ? z ? /* @__PURE__ */ n("div", { className: e.summaryBubbleAnchor, children: /* @__PURE__ */ n(
160
+ w,
161
+ {
162
+ className: e.summaryBubblePanel,
163
+ bounds: "viewport",
164
+ position: A,
165
+ onDrag: T,
166
+ children: g
167
+ }
168
+ ) }) : /* @__PURE__ */ n("div", { className: e.summaryBubbleAnchor, children: /* @__PURE__ */ c(
169
+ "button",
170
+ {
171
+ type: "button",
172
+ className: m(e.summaryBubble, p),
173
+ title: "Event summary",
174
+ onClick: () => C(!0),
175
+ children: [
176
+ /* @__PURE__ */ n("span", { className: e.summaryBubbleGlyph, "aria-hidden": !0, children: (u && u.length ? u : ["var(--crk-timeline-accent)"]).slice(0, 3).map((t, o) => /* @__PURE__ */ n("span", { style: { background: t } }, o)) }),
177
+ l,
178
+ /* @__PURE__ */ n("span", { className: e.summaryCount, children: r.length })
179
+ ]
180
+ }
181
+ ) }) : b ? /* @__PURE__ */ n(
182
+ w,
143
183
  {
144
184
  className: e.summaryFloating,
145
185
  bounds: "viewport",
146
186
  defaultPosition: i ?? { x: 0, y: 0 },
147
- children: T
187
+ children: g
148
188
  }
149
- ) : T;
189
+ ) : g;
150
190
  }
151
- function Z({
191
+ function J({
152
192
  x: l,
153
- y: s,
154
- children: r,
155
- className: t,
193
+ y: r,
194
+ children: s,
195
+ className: a,
156
196
  style: i
157
197
  }) {
158
- return /* @__PURE__ */ n("div", { className: m(e.tooltip, t), style: { left: l, top: s, ...i }, children: r });
198
+ return /* @__PURE__ */ n("div", { className: m(e.tooltip, a), style: { left: l, top: r, ...i }, children: s });
159
199
  }
160
- function j({ text: l, query: s }) {
161
- const r = z(l, s);
162
- return r.length === 1 && !r[0].hit ? /* @__PURE__ */ n(N, { children: r[0].t }) : /* @__PURE__ */ n(N, { children: r.map(
163
- (t, i) => t.hit ? /* @__PURE__ */ n("span", { className: e.mark, children: t.t }, i) : /* @__PURE__ */ n("span", { children: t.t }, i)
200
+ function Q({ text: l, query: r }) {
201
+ const s = R(l, r);
202
+ return s.length === 1 && !s[0].hit ? /* @__PURE__ */ n(B, { children: s[0].t }) : /* @__PURE__ */ n(B, { children: s.map(
203
+ (a, i) => a.hit ? /* @__PURE__ */ n("span", { className: e.mark, children: a.t }, i) : /* @__PURE__ */ n("span", { children: a.t }, i)
164
204
  ) });
165
205
  }
166
206
  export {
167
- j as HighlightText,
168
- S as TimelineLegend,
169
- A as TimelineSegmented,
170
- M as TimelineSummary,
171
- Z as TimelineTooltip,
172
- V as TimelineZoomControls
207
+ Q as HighlightText,
208
+ O as TimelineLegend,
209
+ G as TimelineSegmented,
210
+ K as TimelineSummary,
211
+ J as TimelineTooltip,
212
+ q as TimelineZoomControls
173
213
  };