@mechane-ai/elements 0.61.0 → 0.63.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/dist/ai.js +211 -212
- package/dist/{article-COShcQPh.js → article-lhByzGCW.js} +6 -6
- package/dist/article.js +1 -1
- package/dist/catalog.json +13 -1
- package/dist/{categorical-values-DdZLdWhL.js → categorical-values-3g2m87_m.js} +1 -1
- package/dist/{cells-BTTLURWI.js → cells-X8SVrZBc.js} +1 -1
- package/dist/charts/cartesian.js +1 -1
- package/dist/charts/cells.js +1 -1
- package/dist/charts/comparison.js +1 -1
- package/dist/charts/distribution.js +1 -1
- package/dist/charts/figure.js +12 -12
- package/dist/charts/graph.js +1 -1
- package/dist/charts/hierarchy.js +1 -1
- package/dist/charts/image.js +1 -1
- package/dist/charts/matrix.js +1 -1
- package/dist/charts/plot.js +4 -4
- package/dist/charts/relationship.js +1 -1
- package/dist/charts/text.js +1 -1
- package/dist/charts/timeline.js +2 -2
- package/dist/charts/trend.js +1 -1
- package/dist/charts.js +2 -2
- package/dist/{code-block-BZsY2sh3.js → code-block-CJkiWSrX.js} +1 -1
- package/dist/collections.js +1 -1
- package/dist/{commands-D0bF2JxV.js → commands-DlitIiMJ.js} +2 -2
- package/dist/content/code.js +1 -1
- package/dist/content/diff.js +10 -10
- package/dist/content/link.js +1 -1
- package/dist/content/markdown.js +1 -1
- package/dist/content/tree.js +2 -2
- package/dist/{content-link-PnpcnTCx.js → content-link-DQ3tt_SK.js} +1 -1
- package/dist/content.js +1 -1
- package/dist/{dates-Cq90-D2X.js → dates-Cvrsj4l9.js} +31 -32
- package/dist/{dumbbell-plot-BeHhL-01.js → dumbbell-plot-CEShrjuI.js} +4 -4
- package/dist/{embedding-map-DbETVJXp.js → embedding-map-CQZn0DCg.js} +7 -7
- package/dist/feedback.js +1 -1
- package/dist/{figure-frame-ClYRIRAq.js → figure-frame-BljHBC77.js} +11 -11
- package/dist/forms/dates.js +1 -1
- package/dist/{forms-CEbwzlRR.js → forms-BYk8t91h.js} +17 -17
- package/dist/forms.js +2 -2
- package/dist/{image-grid-DB5U7Jtx.js → image-grid-ClMUSwqO.js} +3 -3
- package/dist/index.js +1 -1
- package/dist/kits/evaluation.js +5 -5
- package/dist/kits/interpretability.js +12 -12
- package/dist/kits/operations.js +6 -6
- package/dist/kits/research.js +8 -8
- package/dist/kits/training.js +6 -6
- package/dist/layout.js +1 -1
- package/dist/lesson.js +3 -3
- package/dist/{markdown-VpLw_P9T.js → markdown-_4ZFsDyM.js} +2 -2
- package/dist/mdx.js +6 -6
- package/dist/navigation/commands.js +1 -1
- package/dist/navigation-CwXM887i.js +44 -0
- package/dist/navigation.js +3 -3
- package/dist/packages/charts/src/plot/plot-marks.d.ts +2 -1
- package/dist/packages/charts/src/timeline/trace-timeline-layout.d.ts +7 -2
- package/dist/packages/charts/src/timeline/trace-timeline.d.ts +5 -3
- package/dist/packages/charts/src/timeline/waterfall.d.ts +3 -1
- package/dist/packages/core/src/filter-chips.d.ts +21 -0
- package/dist/packages/core/src/index.d.ts +2 -0
- package/dist/packages/navigation/src/navigation.d.ts +4 -0
- package/dist/{param-BdqTpZER.js → param-BxLsoDip.js} +1 -1
- package/dist/{pierre-diff-aGyQK5xK.js → pierre-diff-DwmKtFYy.js} +1 -1
- package/dist/{plot-layout-B-b6tioh.js → plot-layout-oXzW4fgJ.js} +2 -2
- package/dist/{plot-marks-FVsbFkUs.js → plot-marks-DgCtcd3L.js} +7 -6
- package/dist/{plot-surface-BlR44uTL.js → plot-surface-BuXeoeBq.js} +1 -1
- package/dist/{reference-lines-BDfsv8dy.js → reference-lines-Kmxs_hXa.js} +2 -2
- package/dist/{scene-CY05-A1k.js → scene-AWpudPHv.js} +7 -7
- package/dist/scene.js +1 -1
- package/dist/{slope-chart-DTyF1lNG.js → slope-chart-DzbDOBUo.js} +5 -5
- package/dist/{src-Ci8DeY8J.js → src-CJ-0r20F.js} +1 -1
- package/dist/{src-BAlO76fa.js → src-CZyleIH0.js} +40 -40
- package/dist/{src-Dxs3Buo_.js → src-CuTIcRwk.js} +186 -187
- package/dist/{src-4qgpiWvP.js → src-DFkzV7H0.js} +44 -44
- package/dist/{src-9EJskqB_.js → src-DH2Xqu32.js} +659 -428
- package/dist/{src-C-Wg9m9H.js → src-DpVApV62.js} +20 -21
- package/dist/{src-Cuwx-PLT.js → src-yrBVxkaf.js} +119 -120
- package/dist/styles2.css +55 -12
- package/dist/{time-series-BbUBF3IE.js → time-series-D7TCUK56.js} +34 -34
- package/dist/timeline-CR5VPm_f.js +914 -0
- package/dist/{token-heatmap-o_9l6vaq.js → token-heatmap-DEpcsiRR.js} +3 -3
- package/dist/{token-predictions-DaAztlOS.js → token-predictions-DMYbc2-N.js} +4 -4
- package/dist/{transport-4V9rfYHN.js → transport-VwKG58nR.js} +4 -4
- package/dist/{tree-diagram-BDj4TGXb.js → tree-diagram-BqL3fTdB.js} +8 -8
- package/dist/{treemap-DUSFlCPK.js → treemap-C0CeP3PD.js} +4 -4
- package/dist/{use-tween-BsaEO862.js → use-tween-D-wmSMa8.js} +1 -1
- package/dist/{violin-plot-ULdC_dcY.js → violin-plot-6829_9q5.js} +4 -4
- package/dist/waterfall-C5HRWlEe.js +736 -0
- package/package.json +1 -1
- package/dist/control-styles-D3q_Qyxi.js +0 -179
- package/dist/navigation-CveMIuXI.js +0 -39
- package/dist/timeline-kDb6bY7M.js +0 -712
- package/dist/waterfall-Dre6i02Z.js +0 -684
|
@@ -0,0 +1,736 @@
|
|
|
1
|
+
import { E as e, c as t, m as n } from "./src-DH2Xqu32.js";
|
|
2
|
+
import { n as r, t as i } from "./chart-tones-ei3BC2AL.js";
|
|
3
|
+
import { A as a, E as o, M as s, S as c, f as l, j as u, l as d, s as f } from "./plot-layout-oXzW4fgJ.js";
|
|
4
|
+
import { i as ee } from "./chart-link-AE_xuxiP.js";
|
|
5
|
+
import { a as te } from "./tone-scope-DKiSw-JR.js";
|
|
6
|
+
import { n as p, r as m } from "./figure-format-B8kRZMlo.js";
|
|
7
|
+
import { a as h, o as ne, r as re } from "./scale-C2xgZyZN.js";
|
|
8
|
+
import { t as ie } from "./chart-cursor-1mFd48Jc.js";
|
|
9
|
+
import { i as ae, l as g, n as oe, r as se, t as _ } from "./figure-frame-BljHBC77.js";
|
|
10
|
+
import { n as ce } from "./plot-width-D3hTycYX.js";
|
|
11
|
+
import { t as le } from "./plot-axes-D5S9BnBa.js";
|
|
12
|
+
import { a as v, c as ue, f as de, r as y } from "./plot-marks-DgCtcd3L.js";
|
|
13
|
+
import { n as b, r as fe, t as pe } from "./plot-surface-BuXeoeBq.js";
|
|
14
|
+
import * as x from "@stylexjs/stylex";
|
|
15
|
+
import { useId as me, useState as he } from "react";
|
|
16
|
+
import { stackSpans as ge } from "@ui-sdk/core";
|
|
17
|
+
import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
18
|
+
import { ChevronsDownUp as _e, ChevronsUpDown as ve } from "lucide-react";
|
|
19
|
+
import { Waterfall as ye, WaterfallBar as T, WaterfallCell as be, WaterfallColumnHeader as E, WaterfallHeaderRow as xe, WaterfallRow as Se, WaterfallRowHeader as Ce } from "@ui-sdk/react/waterfall";
|
|
20
|
+
// packages/charts/src/timeline/event-strip.tsx
|
|
21
|
+
var D = {
|
|
22
|
+
lanes: 12,
|
|
23
|
+
events: 1e3
|
|
24
|
+
}, O = 24, k = 8, A = 14, we = 4, j = 5, M = 14, N = 5, P = 18, F = 5, Te = .65, Ee = 6.5, De = 12, I = .5, L = .04, R = 1e3, z = 60 * R, B = 60 * z, Oe = 24 * B, ke = {
|
|
25
|
+
unit: "second",
|
|
26
|
+
size: R
|
|
27
|
+
}, Ae = [
|
|
28
|
+
{
|
|
29
|
+
unit: "day",
|
|
30
|
+
size: Oe
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
unit: "hour",
|
|
34
|
+
size: B
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
unit: "minute",
|
|
38
|
+
size: z
|
|
39
|
+
},
|
|
40
|
+
ke
|
|
41
|
+
], je = { separator: {
|
|
42
|
+
kfzvcC: "x47corl",
|
|
43
|
+
$$css: !0
|
|
44
|
+
} };
|
|
45
|
+
function Me(e) {
|
|
46
|
+
return d({
|
|
47
|
+
width: Infinity,
|
|
48
|
+
valueLabels: e,
|
|
49
|
+
hasXTitle: !0,
|
|
50
|
+
hasYTitle: !1
|
|
51
|
+
}).left;
|
|
52
|
+
}
|
|
53
|
+
function Ne(e, t) {
|
|
54
|
+
let n = Ae.find((t) => e >= t.size) ?? ke;
|
|
55
|
+
return m({
|
|
56
|
+
value: e / n.size,
|
|
57
|
+
locale: t,
|
|
58
|
+
format: {
|
|
59
|
+
style: "unit",
|
|
60
|
+
unit: n.unit,
|
|
61
|
+
unitDisplay: "long",
|
|
62
|
+
maximumFractionDigits: 1
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
function Pe(e, t) {
|
|
67
|
+
let n = [...e.flatMap((e) => e.end === void 0 ? [e.start] : [e.start, e.end]), ...t.map((e) => e.at)];
|
|
68
|
+
if (n.length === 0) return [0, B];
|
|
69
|
+
let r = Math.min(...n), i = Math.max(...n), a = i - r, o = a > 0 ? Math.max(z, Math.round(a * L)) : B * I;
|
|
70
|
+
return [r - o, i + o];
|
|
71
|
+
}
|
|
72
|
+
function Fe({ lanes: e, events: t, markers: n, domain: r, zone: i }) {
|
|
73
|
+
let a = ne(r);
|
|
74
|
+
if (a !== void 0) return a;
|
|
75
|
+
if (i === void 0) return "A function time format needs a timeZone beside it, so the axis ticks fall on that zone.";
|
|
76
|
+
if (e.length > D.lanes || t.length > D.events) return `This strip draws at most ${D.lanes} lanes and ${D.events} events. Supply a shorter window.`;
|
|
77
|
+
if (!s(e) || !s(t) || !s(n)) return "Lanes, events and markers must each have unique identifiers.";
|
|
78
|
+
let o = new Set(e.map((e) => e.id)), c = t.find((e) => !o.has(e.laneId));
|
|
79
|
+
if (c !== void 0) return `Event ${c.id} names lane ${c.laneId}, which is not supplied.`;
|
|
80
|
+
let l = t.find((e) => {
|
|
81
|
+
let t = e.end !== void 0 && (h(e.end, r) || e.end <= e.start);
|
|
82
|
+
return h(e.start, r) || t;
|
|
83
|
+
});
|
|
84
|
+
return l === void 0 ? n.some((e) => h(e.at, r)) ? "A marker lies outside the domain." : void 0 : `Event ${l.id} must start inside the domain and, when it has an end, end after its start inside the domain.`;
|
|
85
|
+
}
|
|
86
|
+
function Ie(t) {
|
|
87
|
+
let { lanes: r, events: i, domain: s, markers: m = [], windows: h, defaultWindowId: ne, windowId: _e, onWindowChange: ve, gutterWidth: ye, timeFormat: T, timeZone: be, selected: E, onSelectedChange: xe, ...Se } = t, { emptyLabel: Ce = "No events in this window.", ...D } = Se, { locale: L, title: R } = D, z = fe("compact"), B = me(), Oe = te(), ke = ee(), Ae = h?.[0]?.id ?? "", [Me, Ie] = he(() => ne ?? Ae), V = _e ?? Me;
|
|
88
|
+
function Le(e) {
|
|
89
|
+
_e === void 0 && Ie(e), ve?.(e);
|
|
90
|
+
}
|
|
91
|
+
if (D.status === "loading") return /* @__PURE__ */ C(ae, {
|
|
92
|
+
...D,
|
|
93
|
+
height: "compact"
|
|
94
|
+
});
|
|
95
|
+
let H = i.map((e) => e.end !== void 0 && e.end <= e.start ? {
|
|
96
|
+
...e,
|
|
97
|
+
end: void 0
|
|
98
|
+
} : e), U = s ?? Pe(H, m), Re = h === void 0 || h.length === 0 ? void 0 : h.find((e) => e.id === V) ?? h[0], W = Re?.durationMs ?? null, G = W !== null && W > 0, K = G ? [Math.max(U[0], U[1] - W), U[1]] : U, q = G ? H.flatMap((e) => {
|
|
99
|
+
if ((e.end ?? e.start) < K[0] || e.start > K[1]) return [];
|
|
100
|
+
let t = Math.max(K[0], e.start), n = e.end === void 0 ? void 0 : Math.min(K[1], e.end), r = n !== void 0 && n > t ? n : void 0;
|
|
101
|
+
return [{
|
|
102
|
+
...e,
|
|
103
|
+
start: t,
|
|
104
|
+
end: r
|
|
105
|
+
}];
|
|
106
|
+
}) : H, ze = G ? m.filter((e) => e.at >= K[0] && e.at <= K[1]) : m, J = typeof T == "function" ? be : T.timeZone, Be = Fe({
|
|
107
|
+
lanes: r,
|
|
108
|
+
events: q,
|
|
109
|
+
markers: ze,
|
|
110
|
+
domain: K,
|
|
111
|
+
zone: J
|
|
112
|
+
});
|
|
113
|
+
if (Be !== void 0 || J === void 0) return /* @__PURE__ */ C(se, {
|
|
114
|
+
...D,
|
|
115
|
+
message: Be ?? "The strip needs a time zone."
|
|
116
|
+
});
|
|
117
|
+
let Ve = h === void 0 || h.length <= 1 ? D.actions : /* @__PURE__ */ w(n, { children: [h.map((t) => {
|
|
118
|
+
let n = t.id === Re?.id;
|
|
119
|
+
return /* @__PURE__ */ C(e, {
|
|
120
|
+
type: "button",
|
|
121
|
+
density: "compact",
|
|
122
|
+
variant: n ? "outline" : "ghost",
|
|
123
|
+
"aria-pressed": n,
|
|
124
|
+
onClick: () => Le(t.id),
|
|
125
|
+
children: t.label
|
|
126
|
+
}, t.id);
|
|
127
|
+
}), D.actions] });
|
|
128
|
+
function Y(e) {
|
|
129
|
+
return p({
|
|
130
|
+
timestamp: e,
|
|
131
|
+
locale: L,
|
|
132
|
+
format: T
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
let He = d({
|
|
136
|
+
width: z.width,
|
|
137
|
+
valueLabels: r.map((e) => e.label),
|
|
138
|
+
hasXTitle: !0,
|
|
139
|
+
hasYTitle: !1
|
|
140
|
+
}), X = ye === void 0 ? He : {
|
|
141
|
+
...He,
|
|
142
|
+
left: ye
|
|
143
|
+
}, Z = Math.max(1, z.width - X.left - X.right), Ue = re({
|
|
144
|
+
domain: K,
|
|
145
|
+
range: [X.left, X.left + Z]
|
|
146
|
+
}), We = ze.map((e) => {
|
|
147
|
+
let t = Ue.position(e.at), n = e.label, r = `${e.label} · ${Y(e.at)}`, i = n.length * Ee + 10, a = t > X.left + Z * Te;
|
|
148
|
+
return {
|
|
149
|
+
marker: e,
|
|
150
|
+
at: t,
|
|
151
|
+
text: n,
|
|
152
|
+
tooltip: r,
|
|
153
|
+
isEnd: a,
|
|
154
|
+
start: a ? t - i : t,
|
|
155
|
+
end: a ? t : t + i
|
|
156
|
+
};
|
|
157
|
+
}), Ge = ge(We.map((e) => ({
|
|
158
|
+
id: e.marker.id,
|
|
159
|
+
track: "markers",
|
|
160
|
+
start: e.start,
|
|
161
|
+
end: e.end
|
|
162
|
+
}))), Ke = Math.max(0, ...We.map((e) => (Ge.get(e.marker.id)?.lane ?? 0) + 1)), qe = X.top + Ke * P, Je = (K[1] - K[0]) * M / Z, Ye = (K[1] - K[0]) * we / Z, Xe = ge(q.map((e) => ({
|
|
163
|
+
id: e.id,
|
|
164
|
+
track: e.laneId,
|
|
165
|
+
start: e.end === void 0 ? e.start - Je * I : e.start,
|
|
166
|
+
end: e.end === void 0 ? e.start + Je * I : Math.max(e.end, e.start + Ye)
|
|
167
|
+
}))), Ze = r.map((e) => Math.max(1, ...q.flatMap((t) => t.laneId === e.id ? [(Xe.get(t.id)?.lane ?? 0) + 1] : []))), Qe = r.flatMap((e, t) => Array.from({ length: Ze[t] ?? 1 }, (t, n) => ({
|
|
168
|
+
laneId: e.id,
|
|
169
|
+
row: n
|
|
170
|
+
}))), $e = qe + Qe.length * O + r.length * k * 2 + X.bottom, Q = f({
|
|
171
|
+
width: z.width,
|
|
172
|
+
height: $e,
|
|
173
|
+
margins: {
|
|
174
|
+
...X,
|
|
175
|
+
top: qe
|
|
176
|
+
}
|
|
177
|
+
}), et = r.map((e, t) => {
|
|
178
|
+
let n = Qe.findIndex((t) => t.laneId === e.id), r = Q.top + t * k * 2 + n * O;
|
|
179
|
+
return {
|
|
180
|
+
lane: e,
|
|
181
|
+
index: t,
|
|
182
|
+
start: r,
|
|
183
|
+
end: r + (Ze[t] ?? 1) * O + 16
|
|
184
|
+
};
|
|
185
|
+
}), tt = l({
|
|
186
|
+
domain: K,
|
|
187
|
+
length: Q.innerWidth,
|
|
188
|
+
timeFormat: T,
|
|
189
|
+
locale: L,
|
|
190
|
+
timeZone: J
|
|
191
|
+
}), nt = tt.values.map((e, t) => ({
|
|
192
|
+
key: String(e),
|
|
193
|
+
position: Ue.position(e),
|
|
194
|
+
label: tt.labels[t] ?? ""
|
|
195
|
+
})), rt = et.map((e) => ({
|
|
196
|
+
key: e.lane.id,
|
|
197
|
+
position: (e.start + e.end) * I,
|
|
198
|
+
label: e.lane.label
|
|
199
|
+
})), $ = q.map((e, t) => ({
|
|
200
|
+
event: e,
|
|
201
|
+
index: t
|
|
202
|
+
})).toSorted((e, t) => e.event.start === t.event.start ? e.index - t.index : e.event.start - t.event.start).map((e) => e.event).map((e, t) => {
|
|
203
|
+
let n = et.find((t) => t.lane.id === e.laneId), i = n?.index ?? 0, a = r[i], o = Xe.get(e.id)?.lane ?? 0, s = (n?.start ?? Q.top) + k + (o + I) * O, c = Ue.position(e.start), l = e.end === void 0 ? c : Math.max(c + we, Ue.position(e.end)), u = e.tone ?? Oe({
|
|
204
|
+
id: e.laneId,
|
|
205
|
+
tone: a?.tone,
|
|
206
|
+
index: i
|
|
207
|
+
});
|
|
208
|
+
return {
|
|
209
|
+
event: e,
|
|
210
|
+
rank: t,
|
|
211
|
+
laneIndex: i,
|
|
212
|
+
laneLabel: a?.label ?? e.laneId,
|
|
213
|
+
x1: c,
|
|
214
|
+
x2: l,
|
|
215
|
+
y: s,
|
|
216
|
+
tone: u
|
|
217
|
+
};
|
|
218
|
+
}), it = $.map(({ event: e, laneLabel: t }) => {
|
|
219
|
+
let n = e.end === void 0 ? Y(e.start) : `${Y(e.start)} – ${Y(e.end)} · ${Ne(e.end - e.start, L)}`;
|
|
220
|
+
return {
|
|
221
|
+
id: e.id,
|
|
222
|
+
label: [
|
|
223
|
+
t,
|
|
224
|
+
e.label,
|
|
225
|
+
n,
|
|
226
|
+
e.detail
|
|
227
|
+
].filter((e) => e !== void 0).join(" · ")
|
|
228
|
+
};
|
|
229
|
+
}), at = 1 / (r.length * 2 + 1);
|
|
230
|
+
function ot(e) {
|
|
231
|
+
let t = e.x / e.width * Q.width, n = e.y / e.height * Q.height, r, i = Infinity;
|
|
232
|
+
for (let e of $) if (t >= e.x1 - j - N && t <= e.x2 + j + N && Math.abs(n - e.y) <= O * I) {
|
|
233
|
+
let a = Math.max(e.x1, Math.min(e.x2, t)), o = Math.hypot(t - a, n - e.y);
|
|
234
|
+
o <= i && (i = o, r = e.event.id);
|
|
235
|
+
}
|
|
236
|
+
return r;
|
|
237
|
+
}
|
|
238
|
+
return /* @__PURE__ */ C(o, {
|
|
239
|
+
...ke,
|
|
240
|
+
items: it,
|
|
241
|
+
place: (e) => {
|
|
242
|
+
let t = $.find((t) => t.event.id === e), n = t?.rank ?? 0, r = (t?.laneIndex ?? 0) * at;
|
|
243
|
+
return t === void 0 ? void 0 : {
|
|
244
|
+
left: n,
|
|
245
|
+
right: n,
|
|
246
|
+
top: r,
|
|
247
|
+
bottom: r
|
|
248
|
+
};
|
|
249
|
+
},
|
|
250
|
+
locate: ot,
|
|
251
|
+
selected: E ?? null,
|
|
252
|
+
onSelect: xe,
|
|
253
|
+
render: (e, { inspected: t, cursor: n }) => {
|
|
254
|
+
let r = $.find((e) => e.event.id === n);
|
|
255
|
+
return /* @__PURE__ */ C(oe, {
|
|
256
|
+
...D,
|
|
257
|
+
actions: Ve,
|
|
258
|
+
figure: e,
|
|
259
|
+
footer: q.length === 0 ? void 0 : /* @__PURE__ */ C(c, {
|
|
260
|
+
id: B,
|
|
261
|
+
children: a(it, t)
|
|
262
|
+
}),
|
|
263
|
+
children: q.length === 0 ? /* @__PURE__ */ C(_, { children: Ce }) : /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ w(b, {
|
|
264
|
+
plotRef: z.ref,
|
|
265
|
+
box: Q,
|
|
266
|
+
label: u({
|
|
267
|
+
title: R,
|
|
268
|
+
marks: "events",
|
|
269
|
+
isSelectable: xe !== void 0
|
|
270
|
+
}),
|
|
271
|
+
readoutId: B,
|
|
272
|
+
children: [
|
|
273
|
+
et.map((e, t) => t % 2 == 1 ? /* @__PURE__ */ C("rect", {
|
|
274
|
+
x: Q.left,
|
|
275
|
+
y: e.start,
|
|
276
|
+
width: Q.innerWidth,
|
|
277
|
+
height: e.end - e.start,
|
|
278
|
+
className: "x2wnxhi x1rcfr07 x47corl"
|
|
279
|
+
}, `band-${e.lane.id}`) : null),
|
|
280
|
+
/* @__PURE__ */ C(le, {
|
|
281
|
+
box: Q,
|
|
282
|
+
xTicks: nt,
|
|
283
|
+
yTicks: rt,
|
|
284
|
+
xTitle: `Time (${J})`,
|
|
285
|
+
grid: "x"
|
|
286
|
+
}),
|
|
287
|
+
et.slice(1).map((e) => /* @__PURE__ */ C("line", {
|
|
288
|
+
x1: Q.left,
|
|
289
|
+
x2: Q.right,
|
|
290
|
+
y1: e.start,
|
|
291
|
+
y2: e.start,
|
|
292
|
+
...x.props(ce.grid, je.separator)
|
|
293
|
+
}, e.lane.id)),
|
|
294
|
+
/* @__PURE__ */ C(pe, {
|
|
295
|
+
box: Q,
|
|
296
|
+
children: $.map((e) => e.event.end === void 0 ? /* @__PURE__ */ C(v, {
|
|
297
|
+
x: e.x1,
|
|
298
|
+
y: e.y,
|
|
299
|
+
radius: j,
|
|
300
|
+
tone: e.tone,
|
|
301
|
+
isInspected: t === e.event.id,
|
|
302
|
+
isSelected: E === e.event.id
|
|
303
|
+
}, e.event.id) : /* @__PURE__ */ C(y, {
|
|
304
|
+
x: e.x1,
|
|
305
|
+
y: e.y - A * I,
|
|
306
|
+
width: e.x2 - e.x1,
|
|
307
|
+
height: A,
|
|
308
|
+
tone: e.tone,
|
|
309
|
+
isInspected: t === e.event.id,
|
|
310
|
+
isSelected: E === e.event.id
|
|
311
|
+
}, e.event.id))
|
|
312
|
+
}),
|
|
313
|
+
We.map(({ marker: e, at: t, text: n, tooltip: r, isEnd: i }) => {
|
|
314
|
+
let a = Ge.get(e.id)?.lane ?? 0, o = Q.top - 10 - a * P, s = Math.max(Q.left + F, Math.min(Q.right - F, i ? t - F : t + F));
|
|
315
|
+
return /* @__PURE__ */ w("g", { children: [
|
|
316
|
+
/* @__PURE__ */ C("title", { children: r }),
|
|
317
|
+
/* @__PURE__ */ C(de, {
|
|
318
|
+
x1: t,
|
|
319
|
+
x2: t,
|
|
320
|
+
y1: o + F,
|
|
321
|
+
y2: Q.bottom,
|
|
322
|
+
stroke: "dashed"
|
|
323
|
+
}),
|
|
324
|
+
/* @__PURE__ */ C(ue, {
|
|
325
|
+
x: s,
|
|
326
|
+
y: o,
|
|
327
|
+
anchor: i ? "end" : "start",
|
|
328
|
+
children: n
|
|
329
|
+
})
|
|
330
|
+
] }, e.id);
|
|
331
|
+
}),
|
|
332
|
+
r !== void 0 && /* @__PURE__ */ C(ie, {
|
|
333
|
+
x: (r.x1 + r.x2) * I,
|
|
334
|
+
top: Q.top,
|
|
335
|
+
bottom: Q.bottom,
|
|
336
|
+
width: De
|
|
337
|
+
})
|
|
338
|
+
]
|
|
339
|
+
}), /* @__PURE__ */ C(g, {
|
|
340
|
+
label: `${R} events`,
|
|
341
|
+
columns: [{
|
|
342
|
+
id: "event",
|
|
343
|
+
label: "Event"
|
|
344
|
+
}],
|
|
345
|
+
rows: it.map((e) => ({
|
|
346
|
+
id: e.id,
|
|
347
|
+
values: [e.label]
|
|
348
|
+
}))
|
|
349
|
+
})] })
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
// packages/charts/src/timeline/waterfall.tsx
|
|
355
|
+
var V = 5, Le = 6, H = 14, U = .5, Re = [
|
|
356
|
+
0,
|
|
357
|
+
.5,
|
|
358
|
+
1
|
|
359
|
+
], W = 100, G = 2, K = 14, q = 2, ze = {
|
|
360
|
+
k1xSpc: "x1rg5ohu",
|
|
361
|
+
kzqmXN: "x1v4s8kt",
|
|
362
|
+
kZKoxP: "xols6we",
|
|
363
|
+
kaIpWk: "x1cum3z5",
|
|
364
|
+
kmuXW: "x2lah0s",
|
|
365
|
+
$$css: !0
|
|
366
|
+
}, J = {
|
|
367
|
+
cell: {
|
|
368
|
+
k7Eaqz: "xeuugli",
|
|
369
|
+
k3XXqK: "x1t137rt",
|
|
370
|
+
kZs9gx: "x19rmrnh",
|
|
371
|
+
k7shQP: "x9v5kkp",
|
|
372
|
+
kPJHz1: "x13qnu6",
|
|
373
|
+
kiEn40: "x7s97pk",
|
|
374
|
+
$$css: !0
|
|
375
|
+
},
|
|
376
|
+
leafDot: (e) => [
|
|
377
|
+
ze,
|
|
378
|
+
{
|
|
379
|
+
kWkggS: e == null ? e : "xl8spv7",
|
|
380
|
+
$$css: !0
|
|
381
|
+
},
|
|
382
|
+
{ "--x-backgroundColor": e ?? void 0 }
|
|
383
|
+
],
|
|
384
|
+
plot: {
|
|
385
|
+
k7Eaqz: "xeuugli",
|
|
386
|
+
kUOVxO: "xl4o6ss",
|
|
387
|
+
kBCFzs: "x1npkx4u x1v577k8",
|
|
388
|
+
kbNqZ1: "x1ms6mhf x1aa6nly",
|
|
389
|
+
$$css: !0
|
|
390
|
+
},
|
|
391
|
+
toned: (e) => [{
|
|
392
|
+
kMwMTN: e == null ? e : "x14rh7hd",
|
|
393
|
+
$$css: !0
|
|
394
|
+
}, { "--x-color": e ?? void 0 }]
|
|
395
|
+
};
|
|
396
|
+
function Be(e, t) {
|
|
397
|
+
let n = /* @__PURE__ */ new Set([e]), r = [...t.get(e) ?? []], i = 0;
|
|
398
|
+
for (; r.length > 0;) {
|
|
399
|
+
let e = r.pop();
|
|
400
|
+
if (e !== void 0 && !n.has(e)) {
|
|
401
|
+
n.add(e), i += 1;
|
|
402
|
+
for (let n of t.get(e) ?? []) r.push(n);
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
return i;
|
|
406
|
+
}
|
|
407
|
+
function Ve({ items: r, start: a, end: o, visibleRange: s, rowLabel: c, summaryLabel: l, density: u = "comfortable", emptyLabel: d = "No timing records are available.", selected: f, selectedRef: ee, onSelectedChange: te, onClearSelection: p, highlightedIds: h, onActivate: ne, offsetFormat: ie, ...ae }) {
|
|
408
|
+
let { actions: g, ..._ } = ae, { title: ce, locale: le } = _, [v, ue] = he(() => /* @__PURE__ */ new Set()), de = Y({
|
|
409
|
+
items: r,
|
|
410
|
+
start: a,
|
|
411
|
+
end: o
|
|
412
|
+
});
|
|
413
|
+
if (de !== void 0) return /* @__PURE__ */ C(se, {
|
|
414
|
+
..._,
|
|
415
|
+
actions: g,
|
|
416
|
+
message: de
|
|
417
|
+
});
|
|
418
|
+
let y = s === void 0 ? a : Math.max(a, Math.min(o, s[0])), b = s === void 0 ? o : Math.max(y, Math.min(o, s[1])), fe = b - y, pe = re({
|
|
419
|
+
domain: [y, b],
|
|
420
|
+
range: [0, W]
|
|
421
|
+
}), me = fe > 0 ? Re : [0], ge = r.some((e) => e.geometry.kind !== "unavailable"), S = new Map(r.map((e) => [e.id, e])), D = /* @__PURE__ */ new Map();
|
|
422
|
+
for (let e of r) if (e.parentId !== void 0 && S.has(e.parentId)) {
|
|
423
|
+
let t = D.get(e.parentId);
|
|
424
|
+
t === void 0 ? D.set(e.parentId, [e.id]) : t.push(e.id);
|
|
425
|
+
}
|
|
426
|
+
let O = new Set(D.keys()), k = O.size > 0, A = k && [...O].every((e) => v.has(e));
|
|
427
|
+
function we(e) {
|
|
428
|
+
if (e.depth !== void 0) return Math.max(0, Math.min(Le, e.depth));
|
|
429
|
+
let t = 0, n = e.parentId, r = /* @__PURE__ */ new Set([e.id]);
|
|
430
|
+
for (; n !== void 0 && !r.has(n) && t < Le;) {
|
|
431
|
+
r.add(n);
|
|
432
|
+
let e = S.get(n);
|
|
433
|
+
if (e === void 0) break;
|
|
434
|
+
t += 1, n = e.parentId;
|
|
435
|
+
}
|
|
436
|
+
return t;
|
|
437
|
+
}
|
|
438
|
+
function j(e) {
|
|
439
|
+
let t = e.parentId, n = /* @__PURE__ */ new Set([e.id]);
|
|
440
|
+
for (; t !== void 0 && !n.has(t);) {
|
|
441
|
+
if (v.has(t)) return !0;
|
|
442
|
+
n.add(t), t = S.get(t)?.parentId;
|
|
443
|
+
}
|
|
444
|
+
return !1;
|
|
445
|
+
}
|
|
446
|
+
let M = r.filter((e) => !j(e)), N = h !== void 0 && h.length > 0 ? new Set(h) : null;
|
|
447
|
+
function P(e) {
|
|
448
|
+
return m({
|
|
449
|
+
value: e,
|
|
450
|
+
locale: le,
|
|
451
|
+
format: ie
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
let F = new Map(M.map((e) => [e.id, Z({
|
|
455
|
+
geometry: e.geometry,
|
|
456
|
+
start: a,
|
|
457
|
+
offset: P
|
|
458
|
+
})])), Te = M.map((e) => ({
|
|
459
|
+
value: e.id,
|
|
460
|
+
label: `${e.label} · ${e.detail} · ${e.summary} · ${F.get(e.id)}`,
|
|
461
|
+
...X(e.geometry)
|
|
462
|
+
}));
|
|
463
|
+
function Ee(e) {
|
|
464
|
+
ue((t) => {
|
|
465
|
+
let n = new Set(t);
|
|
466
|
+
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
467
|
+
});
|
|
468
|
+
}
|
|
469
|
+
function De({ event: e, itemId: t, hasChildren: n, isCollapsed: r }) {
|
|
470
|
+
let i = f != null;
|
|
471
|
+
e.key === "Escape" && i && p !== void 0 ? (e.preventDefault(), p()) : n && (e.target === e.currentTarget || e.target instanceof Element && e.target.closest("[role=\"rowheader\"]") !== null) && (e.key === "ArrowLeft" && !r || e.key === "ArrowRight" && r) && (e.preventDefault(), Ee(t));
|
|
472
|
+
}
|
|
473
|
+
let I = k ? /* @__PURE__ */ w(e, {
|
|
474
|
+
variant: "ghost",
|
|
475
|
+
density: "compact",
|
|
476
|
+
onClick: () => ue(A ? /* @__PURE__ */ new Set() : new Set(O)),
|
|
477
|
+
children: [C(A ? ve : _e, {
|
|
478
|
+
size: H,
|
|
479
|
+
"aria-hidden": !0
|
|
480
|
+
}), A ? "Expand all" : "Collapse all"]
|
|
481
|
+
}) : null, L = I === null ? g : g === void 0 ? I : /* @__PURE__ */ w(n, { children: [I, g] }), R = u === "compact", z = M.length === 0 ? /* @__PURE__ */ C("div", {
|
|
482
|
+
role: "group",
|
|
483
|
+
"aria-label": ce,
|
|
484
|
+
className: "xeuugli x1hz01jw x12h1iku",
|
|
485
|
+
children: /* @__PURE__ */ C("p", {
|
|
486
|
+
className: "x1ghz6dp x1c8xbx5",
|
|
487
|
+
children: /* @__PURE__ */ C(t, {
|
|
488
|
+
tone: "muted",
|
|
489
|
+
children: d
|
|
490
|
+
})
|
|
491
|
+
})
|
|
492
|
+
}) : /* @__PURE__ */ w(ye, {
|
|
493
|
+
items: Te,
|
|
494
|
+
range: [y, b],
|
|
495
|
+
value: f ?? null,
|
|
496
|
+
onValueChange: (e, t) => {
|
|
497
|
+
e !== null && te(e, t);
|
|
498
|
+
},
|
|
499
|
+
getBarLabel: (e) => F.get(e.value) ?? "",
|
|
500
|
+
"aria-label": ce,
|
|
501
|
+
className: "xeuugli x1hz01jw x12h1iku",
|
|
502
|
+
children: [/* @__PURE__ */ w(xe, {
|
|
503
|
+
className: "xrvj5dj x822y6v x1prkh4w x6s0dn4 xxs79tx x18ljxdw x8zbtdt xh8yej3 x9f619 x5g2kb4 x1pn6w2t x153jb6y xy8obcc xso031l x1q0q8m5 x1qndepd",
|
|
504
|
+
children: [
|
|
505
|
+
/* @__PURE__ */ C(E, { children: /* @__PURE__ */ C(t, {
|
|
506
|
+
variant: "caption",
|
|
507
|
+
tone: "muted",
|
|
508
|
+
children: c
|
|
509
|
+
}) }),
|
|
510
|
+
/* @__PURE__ */ C(E, {
|
|
511
|
+
"aria-label": "Timing",
|
|
512
|
+
className: "xeuugli xl4o6ss x1npkx4u x1v577k8 x1ms6mhf x1aa6nly x78zum5 x1qughib x6s0dn4 xy8obcc xas2l8k xss6m8b",
|
|
513
|
+
children: ge ? me.map((e) => /* @__PURE__ */ C("span", { children: P(y - a + fe * e) }, e)) : /* @__PURE__ */ C("span", { children: "Timing unavailable" })
|
|
514
|
+
}),
|
|
515
|
+
/* @__PURE__ */ C(E, {
|
|
516
|
+
className: "xeuugli x1k3v4rp x14r0xmm x1ms6mhf xp4054r xb3r6kr xuxw1ft xlyipyv xss6m8b",
|
|
517
|
+
children: /* @__PURE__ */ C(t, {
|
|
518
|
+
variant: "caption",
|
|
519
|
+
tone: "muted",
|
|
520
|
+
children: l
|
|
521
|
+
})
|
|
522
|
+
})
|
|
523
|
+
]
|
|
524
|
+
}), M.map((e) => {
|
|
525
|
+
let n = F.get(e.id), r = f === e.id, a = N !== null && !N.has(e.id), o = e.tone ?? "neutral", s = i[o], c = we(e), l = O.has(e.id), u = v.has(e.id), d = l && u ? Be(e.id, D) : 0;
|
|
526
|
+
return /* @__PURE__ */ w(Se, {
|
|
527
|
+
value: e.id,
|
|
528
|
+
ref: r ? ee : void 0,
|
|
529
|
+
"aria-controls": e.controls,
|
|
530
|
+
onClick: (e) => {
|
|
531
|
+
r && p !== void 0 && e.detail < 2 && p();
|
|
532
|
+
},
|
|
533
|
+
onKeyDownCapture: (t) => De({
|
|
534
|
+
event: t,
|
|
535
|
+
itemId: e.id,
|
|
536
|
+
hasChildren: l,
|
|
537
|
+
isCollapsed: u
|
|
538
|
+
}),
|
|
539
|
+
onDoubleClick: () => ne?.(e.id),
|
|
540
|
+
...{
|
|
541
|
+
0: { className: "xrvj5dj x822y6v x1prkh4w x6s0dn4 xxs79tx x18ljxdw x8zbtdt xh8yej3 x9f619 x5g2kb4 xc342km xso031l x1q0q8m5 x1qndepd xpvm0e4 xbixft x1hz01jw x1yc453h x1ypdohk x1t137rt xif5pkx x1ecmtor x19rmrnh x9v5kkp x13qnu6 x1bqaal x1t1lzn6 xdd8jsf" },
|
|
542
|
+
4: { className: "xrvj5dj x822y6v x1prkh4w x6s0dn4 xxs79tx x18ljxdw x8zbtdt xh8yej3 x9f619 x5g2kb4 xc342km xso031l x1q0q8m5 x1qndepd xpvm0e4 xbixft x1hz01jw x1yc453h x1ypdohk x1t137rt xif5pkx x1ecmtor x19rmrnh x9v5kkp x13qnu6 x1bqaal x1t1lzn6 xc9qbxq" },
|
|
543
|
+
2: { className: "xrvj5dj x822y6v x1prkh4w x6s0dn4 xxs79tx x18ljxdw x8zbtdt xh8yej3 x9f619 x5g2kb4 xc342km xso031l x1q0q8m5 x1qndepd xbixft x1hz01jw x1yc453h x1ypdohk x1t137rt xif5pkx x1ecmtor x19rmrnh x9v5kkp x13qnu6 x1bqaal x1t1lzn6 xdd8jsf x1r7kqkb xh3r7i3" },
|
|
544
|
+
6: { className: "xrvj5dj x822y6v x1prkh4w x6s0dn4 xxs79tx x18ljxdw x8zbtdt xh8yej3 x9f619 x5g2kb4 xc342km xso031l x1q0q8m5 x1qndepd xbixft x1hz01jw x1yc453h x1ypdohk x1t137rt xif5pkx x1ecmtor x19rmrnh x9v5kkp x13qnu6 x1bqaal x1t1lzn6 xc9qbxq x1r7kqkb xh3r7i3" },
|
|
545
|
+
1: { className: "xrvj5dj x822y6v x1prkh4w x6s0dn4 xxs79tx x18ljxdw x8zbtdt xh8yej3 x9f619 x5g2kb4 xc342km xso031l x1q0q8m5 x1qndepd xpvm0e4 xbixft x1hz01jw x1yc453h x1ypdohk x1t137rt xif5pkx x1ecmtor x19rmrnh x9v5kkp x13qnu6 x1bqaal x1t1lzn6 xdd8jsf xtg6wg7" },
|
|
546
|
+
5: { className: "xrvj5dj x822y6v x1prkh4w x6s0dn4 xxs79tx x18ljxdw x8zbtdt xh8yej3 x9f619 x5g2kb4 xc342km xso031l x1q0q8m5 x1qndepd xpvm0e4 xbixft x1hz01jw x1yc453h x1ypdohk x1t137rt xif5pkx x1ecmtor x19rmrnh x9v5kkp x13qnu6 x1bqaal x1t1lzn6 xc9qbxq xtg6wg7" },
|
|
547
|
+
3: { className: "xrvj5dj x822y6v x1prkh4w x6s0dn4 xxs79tx x18ljxdw x8zbtdt xh8yej3 x9f619 x5g2kb4 xc342km xso031l x1q0q8m5 x1qndepd xbixft x1hz01jw x1yc453h x1ypdohk x1t137rt xif5pkx x1ecmtor x19rmrnh x9v5kkp x13qnu6 x1bqaal x1t1lzn6 xdd8jsf x1r7kqkb xh3r7i3 xtg6wg7" },
|
|
548
|
+
7: { className: "xrvj5dj x822y6v x1prkh4w x6s0dn4 xxs79tx x18ljxdw x8zbtdt xh8yej3 x9f619 x5g2kb4 xc342km xso031l x1q0q8m5 x1qndepd xbixft x1hz01jw x1yc453h x1ypdohk x1t137rt xif5pkx x1ecmtor x19rmrnh x9v5kkp x13qnu6 x1bqaal x1t1lzn6 xc9qbxq x1r7kqkb xh3r7i3 xtg6wg7" }
|
|
549
|
+
}[!!R << 2 | !!r << 1 | !!a],
|
|
550
|
+
children: [
|
|
551
|
+
/* @__PURE__ */ C(Ce, {
|
|
552
|
+
className: "xeuugli x1t137rt x19rmrnh x9v5kkp x13qnu6 x7s97pk x5yr21d x78zum5 x1qjc9v5",
|
|
553
|
+
children: /* @__PURE__ */ w("div", {
|
|
554
|
+
className: "x78zum5 x6s0dn4 xeuugli xh8yej3 x5yr21d",
|
|
555
|
+
children: [c > 0 && /* @__PURE__ */ C("span", {
|
|
556
|
+
"aria-hidden": !0,
|
|
557
|
+
className: "x3nfvp2 x1qjc9v5 xkh2ocl x2lah0s",
|
|
558
|
+
children: Array.from({ length: c }, (e, t) => /* @__PURE__ */ C("span", {
|
|
559
|
+
className: "x1n2onr6 x1kky2od x2lah0s",
|
|
560
|
+
children: /* @__PURE__ */ C("span", { className: "x10l6tqk x10no89f xrotz4w x1i1rx1s x1fa40ue x47corl" })
|
|
561
|
+
}, t))
|
|
562
|
+
}), /* @__PURE__ */ w("div", {
|
|
563
|
+
className: "x78zum5 x6s0dn4 xunmzkg xeuugli x98rzlu",
|
|
564
|
+
children: [l ? /* @__PURE__ */ C("button", {
|
|
565
|
+
type: "button",
|
|
566
|
+
"aria-label": u ? `Expand ${e.label}` : `Collapse ${e.label}`,
|
|
567
|
+
"aria-expanded": !u,
|
|
568
|
+
onClick: (t) => {
|
|
569
|
+
t.stopPropagation(), Ee(e.id);
|
|
570
|
+
},
|
|
571
|
+
className: "x3nfvp2 x6s0dn4 xl56j7k x1kky2od xlup9mm x2lah0s x1717udv xc342km x1ok0vyi xjbqb8w x153jb6y xy8obcc x1ypdohk x1mkwuse x16kmaj",
|
|
572
|
+
children: u ? "▸" : "▾"
|
|
573
|
+
}) : k ? /* @__PURE__ */ C("span", {
|
|
574
|
+
"aria-hidden": !0,
|
|
575
|
+
className: "x3nfvp2 x6s0dn4 xl56j7k x1kky2od xlup9mm x2lah0s",
|
|
576
|
+
children: /* @__PURE__ */ C("span", { ...x.props(J.leafDot(s)) })
|
|
577
|
+
}) : /* @__PURE__ */ C("span", { ...x.props(J.leafDot(s)) }), /* @__PURE__ */ w("div", {
|
|
578
|
+
className: "xeuugli x98rzlu xrvj5dj xfko13i",
|
|
579
|
+
children: [/* @__PURE__ */ w("span", {
|
|
580
|
+
className: "x78zum5 x1pha0wt xunmzkg xeuugli",
|
|
581
|
+
children: [/* @__PURE__ */ C("span", {
|
|
582
|
+
title: `${e.label} — ${e.detail}`,
|
|
583
|
+
className: "x1lliihq xeuugli xb3r6kr xuxw1ft xlyipyv",
|
|
584
|
+
children: /* @__PURE__ */ C(t, { children: e.label })
|
|
585
|
+
}), d > 0 && /* @__PURE__ */ C("span", {
|
|
586
|
+
className: "x153jb6y xy8obcc xss6m8b x2lah0s",
|
|
587
|
+
children: `(${d})`
|
|
588
|
+
})]
|
|
589
|
+
}), !R && /* @__PURE__ */ C("span", {
|
|
590
|
+
title: e.detail,
|
|
591
|
+
className: "x1lliihq xeuugli xb3r6kr xuxw1ft xlyipyv",
|
|
592
|
+
children: /* @__PURE__ */ C(t, {
|
|
593
|
+
variant: "caption",
|
|
594
|
+
tone: "muted",
|
|
595
|
+
children: e.detail
|
|
596
|
+
})
|
|
597
|
+
})]
|
|
598
|
+
})]
|
|
599
|
+
})]
|
|
600
|
+
})
|
|
601
|
+
}),
|
|
602
|
+
/* @__PURE__ */ C(T, {
|
|
603
|
+
title: n,
|
|
604
|
+
...x.props(J.plot, J.cell, J.toned(s)),
|
|
605
|
+
children: e.geometry.kind === "unavailable" ? /* @__PURE__ */ C(t, {
|
|
606
|
+
variant: "caption",
|
|
607
|
+
tone: "muted",
|
|
608
|
+
children: n
|
|
609
|
+
}) : /* @__PURE__ */ w("svg", {
|
|
610
|
+
"aria-hidden": !0,
|
|
611
|
+
className: "x1lliihq xh8yej3 xmix8c7 x1rea2x4",
|
|
612
|
+
children: [me.map((e) => /* @__PURE__ */ C("line", {
|
|
613
|
+
x1: `${e * W}%`,
|
|
614
|
+
x2: `${e * W}%`,
|
|
615
|
+
y1: "0",
|
|
616
|
+
y2: "18",
|
|
617
|
+
className: "x13hfdr1"
|
|
618
|
+
}, e)), /* @__PURE__ */ C(He, {
|
|
619
|
+
geometry: e.geometry,
|
|
620
|
+
tone: o,
|
|
621
|
+
scale: pe,
|
|
622
|
+
rangeStart: y,
|
|
623
|
+
rangeEnd: b
|
|
624
|
+
})]
|
|
625
|
+
})
|
|
626
|
+
}),
|
|
627
|
+
/* @__PURE__ */ C(be, {
|
|
628
|
+
title: n,
|
|
629
|
+
className: "x1k3v4rp x14r0xmm x1ms6mhf xp4054r xb3r6kr xuxw1ft xlyipyv xss6m8b xeuugli x1t137rt x19rmrnh x9v5kkp x13qnu6 x7s97pk",
|
|
630
|
+
children: /* @__PURE__ */ C(t, {
|
|
631
|
+
variant: "caption",
|
|
632
|
+
tone: "muted",
|
|
633
|
+
children: e.summary
|
|
634
|
+
})
|
|
635
|
+
})
|
|
636
|
+
]
|
|
637
|
+
}, e.id);
|
|
638
|
+
})]
|
|
639
|
+
});
|
|
640
|
+
return /* @__PURE__ */ C(oe, {
|
|
641
|
+
..._,
|
|
642
|
+
actions: L,
|
|
643
|
+
children: z
|
|
644
|
+
});
|
|
645
|
+
}
|
|
646
|
+
function Y({ items: e, start: t, end: n }) {
|
|
647
|
+
if (!Number.isFinite(t) || !Number.isFinite(n) || !Number.isFinite(n - t) || n < t) return "The timing domain must have finite, ordered endpoints.";
|
|
648
|
+
if (!s(e)) return "Timing records must have unique identifiers.";
|
|
649
|
+
for (let r of e) {
|
|
650
|
+
let e = r.geometry;
|
|
651
|
+
if (e.kind === "interval") {
|
|
652
|
+
if (!Number.isFinite(e.start) || !Number.isFinite(e.end) || e.end < e.start) return "Timing intervals must have finite, ordered endpoints.";
|
|
653
|
+
if (e.start < t || e.end > n) return "Timing intervals must fit inside the supplied domain.";
|
|
654
|
+
}
|
|
655
|
+
if (e.kind === "point" && (!Number.isFinite(e.at) || e.at < t || e.at > n)) return "Timing points must be finite and fit inside the supplied domain.";
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
function He({ geometry: e, tone: t, scale: n, rangeStart: a, rangeEnd: o }) {
|
|
659
|
+
switch (e.kind) {
|
|
660
|
+
case "unavailable": return null;
|
|
661
|
+
case "interval": {
|
|
662
|
+
if (e.end < a || e.start > o) return null;
|
|
663
|
+
let s = Math.max(a, e.start), c = Math.min(o, e.end), l = n.position(s), u = n.position(c) - l;
|
|
664
|
+
if (e.end === e.start) return /* @__PURE__ */ C("circle", {
|
|
665
|
+
cx: `${l}%`,
|
|
666
|
+
cy: 9,
|
|
667
|
+
r: 3,
|
|
668
|
+
className: "x117rol3"
|
|
669
|
+
});
|
|
670
|
+
let d = Math.max(U, Math.min(W - l, u));
|
|
671
|
+
return /* @__PURE__ */ C("rect", {
|
|
672
|
+
x: `${l}%`,
|
|
673
|
+
y: G,
|
|
674
|
+
width: `${d}%`,
|
|
675
|
+
height: K,
|
|
676
|
+
rx: q,
|
|
677
|
+
fill: i[t],
|
|
678
|
+
stroke: r[t],
|
|
679
|
+
className: "xnpr05h x13efnbd"
|
|
680
|
+
});
|
|
681
|
+
}
|
|
682
|
+
case "point": {
|
|
683
|
+
if (e.at < a || e.at > o) return null;
|
|
684
|
+
let t = n.position(e.at);
|
|
685
|
+
switch (e.marker) {
|
|
686
|
+
case "filled": return /* @__PURE__ */ C("circle", {
|
|
687
|
+
cx: `${t}%`,
|
|
688
|
+
cy: 9,
|
|
689
|
+
r: 3,
|
|
690
|
+
className: "x117rol3"
|
|
691
|
+
});
|
|
692
|
+
case "hollow": return /* @__PURE__ */ C("circle", {
|
|
693
|
+
cx: `${t}%`,
|
|
694
|
+
cy: 9,
|
|
695
|
+
r: 3.5,
|
|
696
|
+
className: "x1fytgo2 x73je2i xvlca1e"
|
|
697
|
+
});
|
|
698
|
+
case "diamond": return /* @__PURE__ */ C("svg", {
|
|
699
|
+
x: `${t}%`,
|
|
700
|
+
y: 9,
|
|
701
|
+
width: 1,
|
|
702
|
+
height: 1,
|
|
703
|
+
overflow: "visible",
|
|
704
|
+
children: /* @__PURE__ */ C("path", {
|
|
705
|
+
d: `M0 -${V} ${V} 0 0 ${V} -${V} 0Z`,
|
|
706
|
+
className: "x117rol3"
|
|
707
|
+
})
|
|
708
|
+
});
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
function X(e) {
|
|
714
|
+
switch (e.kind) {
|
|
715
|
+
case "interval": return {
|
|
716
|
+
start: e.start,
|
|
717
|
+
duration: e.end - e.start
|
|
718
|
+
};
|
|
719
|
+
case "point": return {
|
|
720
|
+
start: e.at,
|
|
721
|
+
duration: 0
|
|
722
|
+
};
|
|
723
|
+
case "unavailable": return {
|
|
724
|
+
start: NaN,
|
|
725
|
+
duration: NaN
|
|
726
|
+
};
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
function Z({ geometry: e, start: t, offset: n }) {
|
|
730
|
+
switch (e.kind) {
|
|
731
|
+
case "interval": return `Start ${n(e.start - t)}, end ${n(e.end - t)}, duration ${n(e.end - e.start)}`;
|
|
732
|
+
case "point": return `At ${n(e.at - t)}`;
|
|
733
|
+
case "unavailable": return "Timing unavailable";
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
export { D as i, Ie as n, Me as r, Ve as t };
|