@mechane-ai/elements 0.62.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 +7 -7
- package/dist/{article-DBRkXW1r.js → article-lhByzGCW.js} +6 -6
- package/dist/article.js +1 -1
- package/dist/catalog.json +1 -1
- package/dist/{categorical-values-Bq5dMg0i.js → categorical-values-3g2m87_m.js} +1 -1
- package/dist/charts/cartesian.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 +3 -3
- 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-C_Ze7QLO.js → code-block-CJkiWSrX.js} +1 -1
- package/dist/collections.js +1 -1
- package/dist/{commands-BWwMKUdd.js → commands-DlitIiMJ.js} +2 -2
- package/dist/content/code.js +1 -1
- package/dist/content/diff.js +3 -3
- 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-BSR0a887.js → content-link-DQ3tt_SK.js} +1 -1
- package/dist/content.js +1 -1
- package/dist/{dates-DNb7_KSp.js → dates-Cvrsj4l9.js} +2 -2
- package/dist/{dumbbell-plot-DWybxZAH.js → dumbbell-plot-CEShrjuI.js} +3 -3
- package/dist/{embedding-map-B5JjgyGR.js → embedding-map-CQZn0DCg.js} +6 -6
- package/dist/feedback.js +1 -1
- package/dist/{figure-frame-zyCmHlgX.js → figure-frame-BljHBC77.js} +3 -3
- package/dist/forms/dates.js +1 -1
- package/dist/{forms-C5vXBA_C.js → forms-BYk8t91h.js} +1 -1
- package/dist/forms.js +2 -2
- package/dist/{image-grid-Cgkz2fsU.js → image-grid-ClMUSwqO.js} +3 -3
- package/dist/index.js +1 -1
- package/dist/kits/evaluation.js +4 -4
- package/dist/kits/interpretability.js +11 -11
- package/dist/kits/operations.js +6 -6
- package/dist/kits/research.js +8 -8
- package/dist/kits/training.js +5 -5
- package/dist/layout.js +1 -1
- package/dist/lesson.js +3 -3
- package/dist/{markdown-BkFwgQzJ.js → markdown-_4ZFsDyM.js} +2 -2
- package/dist/mdx.js +6 -6
- package/dist/navigation/commands.js +1 -1
- package/dist/{navigation-Bqouujdr.js → navigation-CwXM887i.js} +1 -1
- package/dist/navigation.js +3 -3
- package/dist/packages/charts/src/timeline/trace-timeline.d.ts +1 -1
- package/dist/{param-BLGHbZoi.js → param-BxLsoDip.js} +1 -1
- package/dist/{pierre-diff-TAaZTeg-.js → pierre-diff-DwmKtFYy.js} +1 -1
- package/dist/{plot-layout-JgEcW4fY.js → plot-layout-oXzW4fgJ.js} +2 -2
- package/dist/{plot-surface-CAAzoXJh.js → plot-surface-BuXeoeBq.js} +1 -1
- package/dist/{reference-lines-BGE13uMG.js → reference-lines-Kmxs_hXa.js} +1 -1
- package/dist/{scene-GBAHedGg.js → scene-AWpudPHv.js} +6 -6
- package/dist/scene.js +1 -1
- package/dist/{slope-chart-Bh7fntOb.js → slope-chart-DzbDOBUo.js} +4 -4
- package/dist/{src-KTMBylbq.js → src-CJ-0r20F.js} +1 -1
- package/dist/{src-CoRsRnHQ.js → src-CZyleIH0.js} +4 -4
- package/dist/{src-D_BL6n5Q.js → src-CuTIcRwk.js} +2 -2
- package/dist/{src-XMHLpSe9.js → src-DFkzV7H0.js} +4 -4
- package/dist/{src-k0l1Y4Xl.js → src-DH2Xqu32.js} +8 -11
- package/dist/{src-DxZdE_P5.js → src-DpVApV62.js} +1 -1
- package/dist/{src-Ddx3fHei.js → src-yrBVxkaf.js} +3 -3
- package/dist/styles2.css +26 -12
- package/dist/{time-series-_wZflmIb.js → time-series-D7TCUK56.js} +8 -8
- package/dist/{timeline-DsNPo_57.js → timeline-CR5VPm_f.js} +347 -302
- package/dist/{token-heatmap-Chnea1Iv.js → token-heatmap-DEpcsiRR.js} +3 -3
- package/dist/{token-predictions-DQEd5sj7.js → token-predictions-DMYbc2-N.js} +3 -3
- package/dist/{transport-CagqVWwW.js → transport-VwKG58nR.js} +4 -4
- package/dist/{tree-diagram-CL8RI9gT.js → tree-diagram-BqL3fTdB.js} +4 -4
- package/dist/{treemap-C3zmI4of.js → treemap-C0CeP3PD.js} +4 -4
- package/dist/{use-tween-C2VZtQjV.js → use-tween-D-wmSMa8.js} +1 -1
- package/dist/{violin-plot-CgpyGuSe.js → violin-plot-6829_9q5.js} +3 -3
- package/dist/{waterfall-S8CLEUib.js → waterfall-C5HRWlEe.js} +163 -167
- package/package.json +1 -1
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { A as e, E as t, M as n, S as r, h as i, j as a, l as o, s } from "./plot-layout-
|
|
2
|
-
import { E as c, c as l, m as u, t as d, y as f } from "./src-
|
|
1
|
+
import { A as e, E as t, M as n, S as r, h as i, j as a, l as o, s } from "./plot-layout-oXzW4fgJ.js";
|
|
2
|
+
import { E as c, c as l, m as u, t as d, y as f } from "./src-DH2Xqu32.js";
|
|
3
3
|
import { t as p } from "./chart-tones-ei3BC2AL.js";
|
|
4
4
|
import { t as m } from "./chart-cursor-1mFd48Jc.js";
|
|
5
|
-
import { i as h, l as g, n as
|
|
6
|
-
import { i as
|
|
7
|
-
import { t as
|
|
8
|
-
import { n as
|
|
9
|
-
import { r as
|
|
10
|
-
import { a as
|
|
11
|
-
import { t as
|
|
12
|
-
import { r as
|
|
13
|
-
import { n as
|
|
14
|
-
import { r as
|
|
15
|
-
import * as
|
|
16
|
-
import { useId as
|
|
17
|
-
import { stackSpans as
|
|
18
|
-
import { Fragment as
|
|
19
|
-
import { X as
|
|
5
|
+
import { i as h, l as g, n as _, r as ee, t as te } from "./figure-frame-BljHBC77.js";
|
|
6
|
+
import { i as v } from "./chart-link-AE_xuxiP.js";
|
|
7
|
+
import { t as y } from "./chart-range-Du1gDxCY.js";
|
|
8
|
+
import { n as ne } from "./plot-width-D3hTycYX.js";
|
|
9
|
+
import { r as re } from "./figure-format-B8kRZMlo.js";
|
|
10
|
+
import { a as ie } from "./tone-scope-DKiSw-JR.js";
|
|
11
|
+
import { t as ae } from "./plot-axes-D5S9BnBa.js";
|
|
12
|
+
import { r as oe } from "./plot-marks-DgCtcd3L.js";
|
|
13
|
+
import { n as se, r as ce, t as le } from "./plot-surface-BuXeoeBq.js";
|
|
14
|
+
import { r as ue } from "./scale-C2xgZyZN.js";
|
|
15
|
+
import * as b from "@stylexjs/stylex";
|
|
16
|
+
import { useId as de, useRef as fe, useState as pe } from "react";
|
|
17
|
+
import { stackSpans as x } from "@ui-sdk/core";
|
|
18
|
+
import { Fragment as me, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
19
|
+
import { X as he } from "lucide-react";
|
|
20
20
|
// packages/charts/src/timeline/trace-timeline-layout.ts
|
|
21
|
-
var
|
|
21
|
+
var w = {
|
|
22
22
|
lanes: 24,
|
|
23
23
|
spans: 2e3
|
|
24
|
-
},
|
|
25
|
-
function
|
|
24
|
+
}, T = .5, E = .005, ge = .7, D = .2, _e = .15, O = 10, k = 6, ve = 12, A = 5, j = 3, ye = 2, be = 6, xe = 8, Se = .5;
|
|
25
|
+
function Ce({ lanes: e, spans: t, domain: r }) {
|
|
26
26
|
let [i, a] = r;
|
|
27
27
|
if (!Number.isFinite(i) || !Number.isFinite(a) || a < i) return "The trace domain must have finite, ordered endpoints.";
|
|
28
28
|
if (e.length === 0) return "A trace timeline needs at least one lane.";
|
|
29
|
-
if (e.length >
|
|
30
|
-
if (t.length >
|
|
29
|
+
if (e.length > w.lanes) return `This chart draws at most ${w.lanes} lanes.`;
|
|
30
|
+
if (t.length > w.spans) return `This chart draws at most ${w.spans} spans.`;
|
|
31
31
|
if (!n(e)) return "Trace lanes must have unique identifiers.";
|
|
32
32
|
if (!n(t)) return "Trace spans must have unique identifiers.";
|
|
33
33
|
let o = new Set(e.map((e) => e.id));
|
|
@@ -36,59 +36,59 @@ function De({ lanes: e, spans: t, domain: r }) {
|
|
|
36
36
|
if (!Number.isFinite(e.start) || !Number.isFinite(e.end) || e.end < e.start) return `Span "${e.id}" must have finite, ordered endpoints.`;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function we(e, t) {
|
|
40
40
|
let [n, r] = t, i = Math.max(r - n, 0);
|
|
41
41
|
if (i === 0) return [n, r];
|
|
42
|
-
let a = i *
|
|
42
|
+
let a = i * E, o = Math.max(n, Math.min(r, e[0])), s = Math.max(n, Math.min(r, e[1]));
|
|
43
43
|
if (s < o && ([o, s] = [s, o]), s - o < a) {
|
|
44
|
-
let e = (o + s) *
|
|
45
|
-
o = Math.max(n, e - a *
|
|
44
|
+
let e = (o + s) * T;
|
|
45
|
+
o = Math.max(n, e - a * T), s = Math.min(r, o + a), o = Math.max(n, s - a);
|
|
46
46
|
}
|
|
47
47
|
return [o, s];
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function Te({ visible: e, domain: t, factor: n, anchorRatio: r = T }) {
|
|
50
50
|
let [i, a] = t, o = e[1] - e[0], s = a - i;
|
|
51
51
|
if (s <= 0 || !Number.isFinite(n) || n <= 0) return t;
|
|
52
|
-
let c = Math.min(s, Math.max(s *
|
|
52
|
+
let c = Math.min(s, Math.max(s * E, o * n)), l = e[0] + o * r - c * r, u = l + c;
|
|
53
53
|
return l < i && (l = i, u = Math.min(a, i + c)), u > a && (u = a, l = Math.max(i, a - c)), [l, u];
|
|
54
54
|
}
|
|
55
|
-
function
|
|
56
|
-
return
|
|
55
|
+
function M({ visible: e, domain: t, direction: n, anchorRatio: r = T }) {
|
|
56
|
+
return Te({
|
|
57
57
|
visible: e,
|
|
58
58
|
domain: t,
|
|
59
|
-
factor: n === "in" ?
|
|
59
|
+
factor: n === "in" ? ge : 1 / ge,
|
|
60
60
|
anchorRatio: r
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
|
-
function
|
|
64
|
-
return
|
|
63
|
+
function Ee({ visible: e, domain: t, direction: n }) {
|
|
64
|
+
return De({
|
|
65
65
|
visible: e,
|
|
66
66
|
domain: t,
|
|
67
|
-
delta: (e[1] - e[0]) *
|
|
67
|
+
delta: (e[1] - e[0]) * D * (n === "left" ? -1 : 1)
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function De({ visible: e, domain: t, delta: n }) {
|
|
71
71
|
let [r, i] = t, a = e[1] - e[0], o = e[0] + n, s = o + a;
|
|
72
72
|
return o < r && (o = r, s = Math.min(i, r + a)), s > i && (s = i, o = Math.max(r, i - a)), [o, s];
|
|
73
73
|
}
|
|
74
|
-
function
|
|
75
|
-
let [n, r] = t, i = r - n, a = Math.max(e.end - e.start, i *
|
|
76
|
-
return
|
|
74
|
+
function Oe(e, t) {
|
|
75
|
+
let [n, r] = t, i = r - n, a = Math.max(e.end - e.start, i * E) * _e;
|
|
76
|
+
return we([e.start - a, e.end + a], t);
|
|
77
77
|
}
|
|
78
|
-
var
|
|
79
|
-
function
|
|
78
|
+
var ke = 32;
|
|
79
|
+
function N(e, t) {
|
|
80
80
|
let n = t.get(e)?.parentId;
|
|
81
|
-
return Array.from({ length:
|
|
81
|
+
return Array.from({ length: ke }, () => {
|
|
82
82
|
if (n === void 0) return null;
|
|
83
83
|
let e = n;
|
|
84
84
|
return n = t.get(e)?.parentId, e;
|
|
85
85
|
}).filter((e) => e !== null);
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function Ae(e, t, n) {
|
|
88
88
|
if (e == null) return;
|
|
89
89
|
let r = new Map(t.map((e) => [e.id, e])), i = r.get(e);
|
|
90
90
|
if (i === void 0) return;
|
|
91
|
-
let a =
|
|
91
|
+
let a = N(i.id, r), o = i.relatedIds ?? [], s = (n ?? []).flatMap((e) => e.fromSpanId === i.id ? [e.toSpanId] : e.toSpanId === i.id ? [e.fromSpanId] : []), c = t.filter((e) => e.relatedIds?.includes(i.id) === !0 || N(e.id, r).includes(i.id)).map((e) => e.id);
|
|
92
92
|
return /* @__PURE__ */ new Set([
|
|
93
93
|
i.id,
|
|
94
94
|
...a,
|
|
@@ -97,70 +97,109 @@ function Pe(e, t, n) {
|
|
|
97
97
|
...c
|
|
98
98
|
]);
|
|
99
99
|
}
|
|
100
|
-
function
|
|
101
|
-
let n =
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
let
|
|
100
|
+
function P(e, t) {
|
|
101
|
+
let n = e - A;
|
|
102
|
+
return `M ${n} ${t - j} L ${e} ${t} L ${n} ${t + j} Z`;
|
|
103
|
+
}
|
|
104
|
+
function je(e, t, n) {
|
|
105
|
+
let r = t - n * A;
|
|
106
|
+
return `M ${e - j} ${r} L ${e} ${t} L ${e + j} ${r} Z`;
|
|
107
|
+
}
|
|
108
|
+
function F({ fromEnd: e, fromY: t, toStart: n, toY: r }) {
|
|
109
|
+
let i = n - A, a = r - t, o = P(n, r);
|
|
110
|
+
if (Math.abs(a) < 1) return {
|
|
111
|
+
path: `M ${e} ${t} L ${i} ${r}`,
|
|
112
|
+
arrowPath: o
|
|
113
|
+
};
|
|
114
|
+
let s = a > 0 ? 1 : -1, c = i - e, l = e + Math.min(ve, c * T), u = Math.min(k, Math.abs(a) * T, l - e, i - l);
|
|
115
|
+
return {
|
|
116
|
+
path: [
|
|
117
|
+
`M ${e} ${t}`,
|
|
118
|
+
`L ${l - u} ${t}`,
|
|
119
|
+
`Q ${l} ${t} ${l} ${t + s * u}`,
|
|
120
|
+
`L ${l} ${r - s * u}`,
|
|
121
|
+
`Q ${l} ${r} ${l + u} ${r}`,
|
|
122
|
+
`L ${i} ${r}`
|
|
123
|
+
].join(" "),
|
|
124
|
+
arrowPath: o
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
function Me({ from: e, to: t }) {
|
|
128
|
+
let n = 18 * T, r = e.y - n, i = t.y - n, a = i - A, o = Math.max(0, t.x2 - t.x1), s = t.x1 + Math.min(be, o * T), c = Math.max(Math.min(e.x2, e.x1 + ye), e.x2), l = Math.min(r - xe, a - k), u = s - c, d = je(s, i, 1);
|
|
129
|
+
if (Math.abs(u) < Se) return {
|
|
130
|
+
path: `M ${s} ${l} L ${s} ${a}`,
|
|
131
|
+
arrowPath: d
|
|
132
|
+
};
|
|
133
|
+
let f = u >= 0 ? 1 : -1, p = Math.min(k, Math.abs(u) * T, r - l, a - l);
|
|
129
134
|
return {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
path: [
|
|
136
|
+
`M ${c} ${r}`,
|
|
137
|
+
`L ${c} ${l + p}`,
|
|
138
|
+
`Q ${c} ${l} ${c + f * p} ${l}`,
|
|
139
|
+
`L ${s - f * p} ${l}`,
|
|
140
|
+
`Q ${s} ${l} ${s} ${l + p}`,
|
|
141
|
+
`L ${s} ${a}`
|
|
142
|
+
].join(" "),
|
|
143
|
+
arrowPath: d
|
|
138
144
|
};
|
|
139
145
|
}
|
|
140
|
-
function
|
|
141
|
-
let
|
|
146
|
+
function Ne({ from: e, to: t }) {
|
|
147
|
+
let n = e.x2, r = e.y, i = t.x1, a = t.y;
|
|
148
|
+
if (i - n >= O) return F({
|
|
149
|
+
fromEnd: n,
|
|
150
|
+
fromY: r,
|
|
151
|
+
toStart: i,
|
|
152
|
+
toY: a
|
|
153
|
+
});
|
|
154
|
+
let o = a - r;
|
|
155
|
+
if (Math.abs(o) < 1) return Me({
|
|
142
156
|
from: e,
|
|
143
157
|
to: t
|
|
144
|
-
})
|
|
158
|
+
});
|
|
159
|
+
let s = o > 0 ? 1 : -1, c = 18 * T, l = r + s * c, u = a - s * c, d = u - s * A, f = Math.max(0, t.x2 - i), p = i + Math.min(be, f * T), m = Math.min(n, e.x1 + ye), h = Math.max(m, Math.min(n, p)), g = je(p, u, s), _ = p - h;
|
|
160
|
+
if (Math.abs(_) < Se) return {
|
|
161
|
+
path: `M ${h} ${l} L ${p} ${d}`,
|
|
162
|
+
arrowPath: g
|
|
163
|
+
};
|
|
164
|
+
if (p > n) {
|
|
165
|
+
let e = p - n, t = Math.abs(d - r), i = Math.min(k, e, t);
|
|
166
|
+
return {
|
|
167
|
+
path: [
|
|
168
|
+
`M ${n} ${r}`,
|
|
169
|
+
`L ${p - i} ${r}`,
|
|
170
|
+
`Q ${p} ${r} ${p} ${r + s * i}`,
|
|
171
|
+
`L ${p} ${d}`
|
|
172
|
+
].join(" "),
|
|
173
|
+
arrowPath: g
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
let ee = _ >= 0 ? 1 : -1, te = Math.abs(d - l), v = Math.min(k, te * T, Math.abs(_) * T), y = (l + d) * T;
|
|
145
177
|
return {
|
|
146
|
-
path:
|
|
147
|
-
|
|
178
|
+
path: [
|
|
179
|
+
`M ${h} ${l}`,
|
|
180
|
+
`L ${h} ${y - s * v}`,
|
|
181
|
+
`Q ${h} ${y} ${h + ee * v} ${y}`,
|
|
182
|
+
`L ${p - ee * v} ${y}`,
|
|
183
|
+
`Q ${p} ${y} ${p} ${y + s * v}`,
|
|
184
|
+
`L ${p} ${d}`
|
|
185
|
+
].join(" "),
|
|
186
|
+
arrowPath: g
|
|
148
187
|
};
|
|
149
188
|
}
|
|
150
|
-
function
|
|
189
|
+
function Pe({ lane: e, spans: t, minExtent: n }) {
|
|
151
190
|
let r = t.filter((t) => t.laneId === e.id).map((t) => ({
|
|
152
191
|
id: t.id,
|
|
153
192
|
track: e.id,
|
|
154
193
|
start: t.start,
|
|
155
194
|
end: Math.max(t.end, t.start + n)
|
|
156
|
-
})), i = [...
|
|
195
|
+
})), i = [...x(r).entries()].map(([e, t]) => [e, t.lane]), a = Math.max(0, ...i.map(([, e]) => e));
|
|
157
196
|
return {
|
|
158
197
|
entries: i,
|
|
159
198
|
rowCount: r.length === 0 ? 1 : a + 1
|
|
160
199
|
};
|
|
161
200
|
}
|
|
162
|
-
function
|
|
163
|
-
let r = e.map((e) =>
|
|
201
|
+
function Fe({ lanes: e, spans: t, minExtent: n }) {
|
|
202
|
+
let r = e.map((e) => Pe({
|
|
164
203
|
lane: e,
|
|
165
204
|
spans: t,
|
|
166
205
|
minExtent: n
|
|
@@ -171,7 +210,7 @@ function Re({ lanes: e, spans: t, minExtent: n }) {
|
|
|
171
210
|
};
|
|
172
211
|
}
|
|
173
212
|
// packages/charts/src/timeline/trace-timeline.tsx
|
|
174
|
-
var
|
|
213
|
+
var Ie = 42, Le = 4, Re = 6, I = .5, ze = 4, Be = 10, Ve = 96, He = 3, Ue = 200, We = 80, Ge = .004, Ke = 4, qe = 2, Je = 180, Ye = 340, Xe = 8, L = 64, Ze = 28, Qe = 2, $e = 4, R = {
|
|
175
214
|
k1xSpc: "x1rg5ohu",
|
|
176
215
|
kzqmXN: "xci0xqf",
|
|
177
216
|
kZKoxP: "x1hagigm",
|
|
@@ -296,122 +335,128 @@ var N = 42, ze = 4, Be = 6, P = .5, Ve = 4, He = 10, Ue = 96, We = 3, Ge = 200,
|
|
|
296
335
|
"--x-top": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(n)
|
|
297
336
|
}]
|
|
298
337
|
};
|
|
299
|
-
function
|
|
300
|
-
let r = Math.min(
|
|
301
|
-
return /* @__PURE__ */
|
|
338
|
+
function et({ mark: e, box: t, linkLabel: n }) {
|
|
339
|
+
let r = Math.min(Ye, Math.max(Je, t.innerWidth)), i = (e.x1 + e.x2) * I - r * I, a = Math.max(t.left, Math.min(Math.max(t.left, t.right - r), i)), o = e.y - 18 * I, s = e.y + 18 * I, c = o >= L, l = Math.min(t.right, t.left + Ze), u = Math.max(l, t.right - Ze), d = Math.max(l, Math.min(u, e.x1)), f = n ?? e.laneLabel, m = e.span.detail !== void 0 && e.span.detail !== "" && e.span.detail !== e.span.label;
|
|
340
|
+
return /* @__PURE__ */ C(me, { children: [/* @__PURE__ */ C("div", {
|
|
302
341
|
"aria-hidden": !0,
|
|
303
|
-
...
|
|
342
|
+
...b.props(B.hoverCard, c ? B.hoverCardAbove(a, r, t.height - o + Xe) : B.hoverCardBelow(a, r, s + Xe)),
|
|
304
343
|
children: [
|
|
305
|
-
/* @__PURE__ */
|
|
344
|
+
/* @__PURE__ */ C("div", {
|
|
306
345
|
className: "x78zum5 x6s0dn4 x1qughib x1hnptsi xeuugli",
|
|
307
|
-
children: [/* @__PURE__ */
|
|
308
|
-
className: "
|
|
309
|
-
children: [/* @__PURE__ */
|
|
310
|
-
|
|
346
|
+
children: [/* @__PURE__ */ C("span", {
|
|
347
|
+
className: "x78zum5 x6s0dn4 xunmzkg xeuugli x98rzlu x153jb6y",
|
|
348
|
+
children: [/* @__PURE__ */ S("span", { ...b.props(B.swatch(p[e.tone])) }), /* @__PURE__ */ S("span", {
|
|
349
|
+
className: "xeuugli xb3r6kr xlyipyv xuxw1ft",
|
|
350
|
+
children: f
|
|
351
|
+
})]
|
|
352
|
+
}), /* @__PURE__ */ S("span", {
|
|
311
353
|
className: "x153jb6y xss6m8b xuxw1ft x2lah0s",
|
|
312
354
|
children: `${e.duration} · +${e.offset}`
|
|
313
355
|
})]
|
|
314
356
|
}),
|
|
315
|
-
/* @__PURE__ */
|
|
357
|
+
/* @__PURE__ */ S("span", {
|
|
316
358
|
className: "xbixft xk4h15q xb3r6kr xlyipyv xuxw1ft",
|
|
317
359
|
children: e.span.label
|
|
318
360
|
}),
|
|
319
|
-
m && /* @__PURE__ */
|
|
361
|
+
m && /* @__PURE__ */ S("span", {
|
|
320
362
|
className: "x153jb6y xb3r6kr xlyipyv xuxw1ft",
|
|
321
363
|
children: e.span.detail
|
|
322
364
|
})
|
|
323
365
|
]
|
|
324
|
-
}), /* @__PURE__ */
|
|
366
|
+
}), /* @__PURE__ */ S("span", {
|
|
325
367
|
"aria-hidden": !0,
|
|
326
|
-
...
|
|
368
|
+
...b.props(B.scrubPill, B.scrubPillPos(d, t.bottom + Qe)),
|
|
327
369
|
children: `+${e.offset}`
|
|
328
370
|
})] });
|
|
329
371
|
}
|
|
330
|
-
function
|
|
331
|
-
let { emptyLabel:
|
|
332
|
-
if (
|
|
333
|
-
...
|
|
372
|
+
function tt({ lanes: n, spans: x, links: me, domain: w, categories: T, visibleRange: E, onVisibleRangeChange: ge, onClearSelection: D, offsetFormat: _e, selected: O, onSelectedChange: k, highlightedIds: ve, onActivateSpan: A, spanActions: j, isMinimapVisible: ye = !0, xTitle: be = "Elapsed", ...xe }) {
|
|
373
|
+
let { emptyLabel: Se = "No spans were recorded.", actions: ke, ...N } = xe, { title: P, locale: je } = N, F = ce("regular"), Me = de(), Pe = ie(), Je = v(), [Ye, Xe] = pe(w), [L, Ze] = pe(null), [Qe, R] = pe(!1), z = fe(null);
|
|
374
|
+
if (N.status === "loading") return /* @__PURE__ */ S(h, {
|
|
375
|
+
...N,
|
|
334
376
|
height: "regular"
|
|
335
377
|
});
|
|
336
|
-
let
|
|
378
|
+
let tt = Ce({
|
|
337
379
|
lanes: n,
|
|
338
|
-
spans:
|
|
339
|
-
domain:
|
|
380
|
+
spans: x,
|
|
381
|
+
domain: w
|
|
340
382
|
});
|
|
341
|
-
if (
|
|
342
|
-
...
|
|
343
|
-
message:
|
|
383
|
+
if (tt !== void 0) return /* @__PURE__ */ S(ee, {
|
|
384
|
+
...N,
|
|
385
|
+
message: tt
|
|
344
386
|
});
|
|
345
|
-
let V =
|
|
387
|
+
let V = we(E ?? Ye, w), H = Math.max(w[1] - w[0], 0), U = Math.max(V[1] - V[0], 0), W = H > 0 && U < H * .999;
|
|
346
388
|
function G(e) {
|
|
347
|
-
let t =
|
|
348
|
-
|
|
389
|
+
let t = we(e, w);
|
|
390
|
+
E === void 0 && Xe(t), ge?.(t);
|
|
349
391
|
}
|
|
350
|
-
let
|
|
351
|
-
for (let e of
|
|
352
|
-
let K =
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
392
|
+
let nt = new Map((T ?? []).map((e) => [e.id, e])), rt = /* @__PURE__ */ new Map();
|
|
393
|
+
for (let e of x) e.category !== void 0 && rt.set(e.category, (rt.get(e.category) ?? 0) + 1);
|
|
394
|
+
let it = (T ?? []).filter((e) => (rt.get(e.id) ?? 0) > 0), at = it.length > 0, ot = L !== null && it.some((e) => e.id === L) ? L : null, K = {
|
|
395
|
+
...o({
|
|
396
|
+
width: F.width,
|
|
397
|
+
valueLabels: n.map((e) => e.label),
|
|
398
|
+
hasXTitle: !0,
|
|
399
|
+
hasYTitle: !1
|
|
400
|
+
}),
|
|
401
|
+
top: $e
|
|
402
|
+
}, st = Math.max(1, F.width - K.left - K.right), { rowBySpanId: ct, rowCountByLane: lt } = Fe({
|
|
358
403
|
lanes: n,
|
|
359
|
-
spans:
|
|
360
|
-
minExtent: U > 0 ? U /
|
|
361
|
-
}),
|
|
362
|
-
for (let e of
|
|
363
|
-
let
|
|
364
|
-
width:
|
|
365
|
-
height:
|
|
404
|
+
spans: x,
|
|
405
|
+
minExtent: U > 0 ? U / st * 6 : 0
|
|
406
|
+
}), ut = 0;
|
|
407
|
+
for (let e of lt) ut += e;
|
|
408
|
+
let dt = K.top + ut * 26 + n.length * 6 * 2 + K.bottom, q = s({
|
|
409
|
+
width: F.width,
|
|
410
|
+
height: dt,
|
|
366
411
|
margins: K
|
|
367
|
-
}),
|
|
412
|
+
}), ft = ue({
|
|
368
413
|
domain: V,
|
|
369
414
|
range: [q.left, q.right]
|
|
370
|
-
}), J = Math.max(1, q.innerWidth),
|
|
371
|
-
domain:
|
|
415
|
+
}), J = Math.max(1, q.innerWidth), pt = ue({
|
|
416
|
+
domain: w,
|
|
372
417
|
range: [0, J]
|
|
373
|
-
}), Y = [],
|
|
418
|
+
}), Y = [], mt = q.top;
|
|
374
419
|
for (let [e, t] of n.entries()) {
|
|
375
|
-
let n =
|
|
420
|
+
let n = lt[e] ?? 1, r = n * 26 + 12;
|
|
376
421
|
Y.push({
|
|
377
422
|
lane: t,
|
|
378
423
|
index: e,
|
|
379
424
|
rowCount: n,
|
|
380
|
-
start:
|
|
381
|
-
end:
|
|
382
|
-
}),
|
|
425
|
+
start: mt,
|
|
426
|
+
end: mt + r
|
|
427
|
+
}), mt += r;
|
|
383
428
|
}
|
|
384
|
-
let
|
|
429
|
+
let ht = new Map(Y.map((e) => [e.lane.id, e])), gt = Y.map((e) => ({
|
|
385
430
|
key: e.lane.id,
|
|
386
|
-
position: (e.start + e.end) *
|
|
431
|
+
position: (e.start + e.end) * I,
|
|
387
432
|
label: e.lane.label
|
|
388
433
|
}));
|
|
389
434
|
function X(e) {
|
|
390
|
-
return
|
|
435
|
+
return re({
|
|
391
436
|
value: e,
|
|
392
|
-
locale:
|
|
393
|
-
format:
|
|
437
|
+
locale: je,
|
|
438
|
+
format: _e
|
|
394
439
|
});
|
|
395
440
|
}
|
|
396
|
-
let
|
|
441
|
+
let _t = Math.max(He, Math.floor(q.innerWidth / Ve)), vt = i(V, _t), yt = (vt.length > 0 ? vt : [V[0]]).map((e) => ({
|
|
397
442
|
key: String(e),
|
|
398
|
-
position:
|
|
399
|
-
label: X(e -
|
|
400
|
-
})),
|
|
401
|
-
function
|
|
443
|
+
position: ft.position(e),
|
|
444
|
+
label: X(e - w[0])
|
|
445
|
+
})), bt = ve !== void 0 && ve.length > 0 ? new Set(ve) : null, xt = Ae(O, x, me), Z = bt ?? xt ?? null;
|
|
446
|
+
function St(e, t) {
|
|
402
447
|
if (e.tone !== void 0) return e.tone;
|
|
403
|
-
let r = e.category === void 0 ? void 0 :
|
|
404
|
-
return r === void 0 ?
|
|
448
|
+
let r = e.category === void 0 ? void 0 : nt.get(e.category);
|
|
449
|
+
return r === void 0 ? Pe({
|
|
405
450
|
id: e.laneId,
|
|
406
451
|
tone: n[t]?.tone,
|
|
407
452
|
index: t
|
|
408
453
|
}) : r.tone;
|
|
409
454
|
}
|
|
410
|
-
let Q =
|
|
455
|
+
let Q = x.map((e, t) => ({
|
|
411
456
|
span: e,
|
|
412
457
|
index: t
|
|
413
458
|
})).toSorted((e, t) => e.span.start === t.span.start ? e.index - t.index : e.span.start - t.span.start).map((e) => e.span).map((e, t) => {
|
|
414
|
-
let n =
|
|
459
|
+
let n = ht.get(e.laneId), r = n?.index ?? 0, i = ct.get(e.id) ?? 0, a = (n?.start ?? q.top) + 6 + (i + I) * 26, o = ft.position(e.start), s = Math.max(o + 4, ft.position(e.end)), c = Math.max(q.left, o), l = Math.min(q.right, s), u = s >= q.left - 4 && o <= q.right + 4, d = St(e, r), f = X(e.end - e.start), p = X(e.start - w[0]), m = ot === null || e.category === ot, h = Z === null || Z.has(e.id), g = m && h;
|
|
415
460
|
return {
|
|
416
461
|
span: e,
|
|
417
462
|
rank: t,
|
|
@@ -428,7 +473,7 @@ function et({ lanes: n, spans: v, links: _e, domain: x, categories: S, visibleRa
|
|
|
428
473
|
offset: p,
|
|
429
474
|
isEmphasized: g
|
|
430
475
|
};
|
|
431
|
-
}),
|
|
476
|
+
}), Ct = new Map(Q.map((e) => [e.span.id, e])), wt = Q.map(({ span: e, laneLabel: t, duration: n, offset: r }) => ({
|
|
432
477
|
id: e.id,
|
|
433
478
|
label: [
|
|
434
479
|
t,
|
|
@@ -438,11 +483,11 @@ function et({ lanes: n, spans: v, links: _e, domain: x, categories: S, visibleRa
|
|
|
438
483
|
e.badge,
|
|
439
484
|
e.detail
|
|
440
485
|
].filter((e) => e !== void 0 && e !== "").join(" · ")
|
|
441
|
-
})), $ = Q.find((e) => e.span.id ===
|
|
442
|
-
function
|
|
486
|
+
})), $ = Q.find((e) => e.span.id === O), Tt = 1 / (n.length * 2 + 1);
|
|
487
|
+
function Et(e) {
|
|
443
488
|
let t = e.x / e.width * q.width, n = e.y / e.height * q.height, r, i = Infinity;
|
|
444
489
|
for (let e of Q) {
|
|
445
|
-
let a = t >= e.x1 -
|
|
490
|
+
let a = t >= e.x1 - ze && t <= e.x2 + ze, o = Math.abs(n - e.y) <= 26 * I;
|
|
446
491
|
if (e.isVisible && a && o) {
|
|
447
492
|
let a = Math.max(e.x1, Math.min(e.x2, t)), o = Math.hypot(t - a, n - e.y);
|
|
448
493
|
o <= i && (i = o, r = e.span.id);
|
|
@@ -450,32 +495,32 @@ function et({ lanes: n, spans: v, links: _e, domain: x, categories: S, visibleRa
|
|
|
450
495
|
}
|
|
451
496
|
return r;
|
|
452
497
|
}
|
|
453
|
-
function
|
|
498
|
+
function Dt(e) {
|
|
454
499
|
if (H <= 0) return;
|
|
455
500
|
let t = e.currentTarget.getBoundingClientRect(), n = e.clientX - t.left, r = Math.max(0, Math.min(1, (n - q.left) / Math.max(1, q.innerWidth)));
|
|
456
501
|
if (e.ctrlKey || e.metaKey || e.shiftKey) {
|
|
457
502
|
e.preventDefault();
|
|
458
|
-
let t = Math.max(-80, Math.min(
|
|
459
|
-
G(
|
|
503
|
+
let t = Math.max(-80, Math.min(We, e.deltaY)), n = Math.exp(t * Ge);
|
|
504
|
+
G(Te({
|
|
460
505
|
visible: V,
|
|
461
|
-
domain:
|
|
506
|
+
domain: w,
|
|
462
507
|
factor: n,
|
|
463
508
|
anchorRatio: r
|
|
464
509
|
}));
|
|
465
510
|
} else if (W && Math.abs(e.deltaX) > Math.abs(e.deltaY)) {
|
|
466
511
|
e.preventDefault();
|
|
467
512
|
let t = e.deltaX / Math.max(1, q.innerWidth) * U;
|
|
468
|
-
G(
|
|
513
|
+
G(De({
|
|
469
514
|
visible: V,
|
|
470
|
-
domain:
|
|
515
|
+
domain: w,
|
|
471
516
|
delta: t
|
|
472
517
|
}));
|
|
473
518
|
}
|
|
474
519
|
}
|
|
475
|
-
function
|
|
520
|
+
function Ot(e) {
|
|
476
521
|
if (e.button !== 0 || e.pointerType === "touch") return;
|
|
477
522
|
let t = e.currentTarget.getBoundingClientRect();
|
|
478
|
-
|
|
523
|
+
Et({
|
|
479
524
|
x: e.clientX - t.left,
|
|
480
525
|
y: e.clientY - t.top,
|
|
481
526
|
width: t.width,
|
|
@@ -487,166 +532,166 @@ function et({ lanes: n, spans: v, links: _e, domain: x, categories: S, visibleRa
|
|
|
487
532
|
hasDragged: !1
|
|
488
533
|
}, W && (R(!0), e.currentTarget.setPointerCapture(e.pointerId))) : z.current = null;
|
|
489
534
|
}
|
|
490
|
-
function
|
|
535
|
+
function kt(e) {
|
|
491
536
|
let t = z.current;
|
|
492
537
|
if (t === null) return;
|
|
493
538
|
let n = e.clientX - t.clientX, r = e.clientY - t.clientY;
|
|
494
|
-
if (!t.hasDragged && Math.hypot(n, r) >
|
|
539
|
+
if (!t.hasDragged && Math.hypot(n, r) > Ke && (z.current = {
|
|
495
540
|
...t,
|
|
496
541
|
hasDragged: !0
|
|
497
542
|
}), t.range === null) return;
|
|
498
543
|
let i = t.range[1] - t.range[0], a = -(n / Math.max(1, q.innerWidth)) * i;
|
|
499
|
-
G(
|
|
544
|
+
G(De({
|
|
500
545
|
visible: t.range,
|
|
501
|
-
domain:
|
|
546
|
+
domain: w,
|
|
502
547
|
delta: a
|
|
503
548
|
}));
|
|
504
549
|
}
|
|
505
|
-
function
|
|
550
|
+
function At() {
|
|
506
551
|
let e = z.current;
|
|
507
|
-
z.current = null, R(!1), e !== null && !e.hasDragged &&
|
|
552
|
+
z.current = null, R(!1), e !== null && !e.hasDragged && O != null && D?.();
|
|
508
553
|
}
|
|
509
|
-
function
|
|
554
|
+
function jt() {
|
|
510
555
|
z.current = null, R(!1);
|
|
511
556
|
}
|
|
512
|
-
function
|
|
557
|
+
function Mt(e) {
|
|
513
558
|
switch (e.key) {
|
|
514
559
|
case "+":
|
|
515
560
|
case "=":
|
|
516
|
-
e.preventDefault(), G(
|
|
561
|
+
e.preventDefault(), G(M({
|
|
517
562
|
visible: V,
|
|
518
|
-
domain:
|
|
563
|
+
domain: w,
|
|
519
564
|
direction: "in"
|
|
520
565
|
}));
|
|
521
566
|
break;
|
|
522
567
|
case "-":
|
|
523
|
-
e.preventDefault(), G(
|
|
568
|
+
e.preventDefault(), G(M({
|
|
524
569
|
visible: V,
|
|
525
|
-
domain:
|
|
570
|
+
domain: w,
|
|
526
571
|
direction: "out"
|
|
527
572
|
}));
|
|
528
573
|
break;
|
|
529
574
|
case "0":
|
|
530
|
-
e.preventDefault(), G(
|
|
575
|
+
e.preventDefault(), G(w);
|
|
531
576
|
break;
|
|
532
577
|
case "[":
|
|
533
|
-
W && (e.preventDefault(), G(
|
|
578
|
+
W && (e.preventDefault(), G(Ee({
|
|
534
579
|
visible: V,
|
|
535
|
-
domain:
|
|
580
|
+
domain: w,
|
|
536
581
|
direction: "left"
|
|
537
582
|
})));
|
|
538
583
|
break;
|
|
539
584
|
case "]":
|
|
540
|
-
W && (e.preventDefault(), G(
|
|
585
|
+
W && (e.preventDefault(), G(Ee({
|
|
541
586
|
visible: V,
|
|
542
|
-
domain:
|
|
587
|
+
domain: w,
|
|
543
588
|
direction: "right"
|
|
544
589
|
})));
|
|
545
590
|
break;
|
|
546
591
|
case "Escape":
|
|
547
|
-
|
|
592
|
+
O != null && D !== void 0 && (e.preventDefault(), D());
|
|
548
593
|
break;
|
|
549
|
-
case "Enter": $ !== void 0 &&
|
|
594
|
+
case "Enter": $ !== void 0 && A !== void 0 && (e.preventDefault(), A($.span));
|
|
550
595
|
}
|
|
551
596
|
}
|
|
552
|
-
let
|
|
553
|
-
/* @__PURE__ */
|
|
597
|
+
let Nt = `${X(V[0] - w[0])} – ${X(V[1] - w[0])}`, Pt = /* @__PURE__ */ C(u, { children: [
|
|
598
|
+
/* @__PURE__ */ S("span", {
|
|
554
599
|
className: "xy8obcc x153jb6y xss6m8b xuxw1ft",
|
|
555
|
-
children:
|
|
600
|
+
children: Nt
|
|
556
601
|
}),
|
|
557
|
-
/* @__PURE__ */
|
|
602
|
+
/* @__PURE__ */ S(c, {
|
|
558
603
|
variant: "outline",
|
|
559
|
-
onClick: () => G(
|
|
604
|
+
onClick: () => G(M({
|
|
560
605
|
visible: V,
|
|
561
|
-
domain:
|
|
606
|
+
domain: w,
|
|
562
607
|
direction: "out"
|
|
563
608
|
})),
|
|
564
609
|
disabled: !W,
|
|
565
610
|
"aria-label": "Zoom out",
|
|
566
611
|
children: "−"
|
|
567
612
|
}),
|
|
568
|
-
/* @__PURE__ */
|
|
613
|
+
/* @__PURE__ */ S(c, {
|
|
569
614
|
variant: "outline",
|
|
570
|
-
onClick: () => G(
|
|
615
|
+
onClick: () => G(M({
|
|
571
616
|
visible: V,
|
|
572
|
-
domain:
|
|
617
|
+
domain: w,
|
|
573
618
|
direction: "in"
|
|
574
619
|
})),
|
|
575
620
|
disabled: H <= 0,
|
|
576
621
|
"aria-label": "Zoom in",
|
|
577
622
|
children: "+"
|
|
578
623
|
}),
|
|
579
|
-
$ !== void 0 && /* @__PURE__ */
|
|
624
|
+
$ !== void 0 && /* @__PURE__ */ S(c, {
|
|
580
625
|
variant: "outline",
|
|
581
|
-
onClick: () => G(
|
|
626
|
+
onClick: () => G(Oe($.span, w)),
|
|
582
627
|
"aria-label": "Zoom to selected span",
|
|
583
628
|
children: "Fit span"
|
|
584
629
|
}),
|
|
585
|
-
W && /* @__PURE__ */
|
|
630
|
+
W && /* @__PURE__ */ S(c, {
|
|
586
631
|
variant: "ghost",
|
|
587
|
-
onClick: () => G(
|
|
632
|
+
onClick: () => G(w),
|
|
588
633
|
"aria-label": "Reset zoom",
|
|
589
634
|
children: "Reset"
|
|
590
635
|
}),
|
|
591
|
-
|
|
592
|
-
] }),
|
|
636
|
+
ke
|
|
637
|
+
] }), Ft = $ !== void 0 && j !== void 0 ? j($.span) : [], It = A !== void 0 && Ft.length === 0, Lt = $ === void 0 ? null : /* @__PURE__ */ C("div", {
|
|
593
638
|
role: "region",
|
|
594
639
|
"aria-label": "Selected span actions",
|
|
595
|
-
className: "x78zum5 x1a02dak x6s0dn4 x1qughib x1hnptsi xn9t2bk x1doqdfy
|
|
596
|
-
children: [/* @__PURE__ */
|
|
640
|
+
className: "x78zum5 x1a02dak x6s0dn4 x1qughib x1hnptsi xn9t2bk x1doqdfy x178xt8z xso031l xuxrje7 x1y0btm7 x1ey3b81 x2u8bby xpvm0e4 xbixft xh3r7i3 xeuugli",
|
|
641
|
+
children: [/* @__PURE__ */ C("div", {
|
|
597
642
|
className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi xeuugli xk30mkq",
|
|
598
643
|
children: [
|
|
599
|
-
/* @__PURE__ */
|
|
600
|
-
/* @__PURE__ */
|
|
644
|
+
/* @__PURE__ */ S("span", { ...b.props(B.swatch(p[$.tone])) }),
|
|
645
|
+
/* @__PURE__ */ S("span", {
|
|
601
646
|
title: $.span.label,
|
|
602
647
|
className: "xb3r6kr xlyipyv xuxw1ft xyq1l15",
|
|
603
|
-
children: /* @__PURE__ */
|
|
648
|
+
children: /* @__PURE__ */ S(l, { children: $.span.label })
|
|
604
649
|
}),
|
|
605
|
-
/* @__PURE__ */
|
|
650
|
+
/* @__PURE__ */ S("span", {
|
|
606
651
|
className: "xy8obcc x153jb6y xss6m8b xuxw1ft",
|
|
607
652
|
children: `${$.duration} (+${$.offset})`
|
|
608
653
|
}),
|
|
609
|
-
$.span.badge !== void 0 && /* @__PURE__ */
|
|
610
|
-
$.span.detail !== void 0 && /* @__PURE__ */
|
|
654
|
+
$.span.badge !== void 0 && /* @__PURE__ */ S(d, { children: $.span.badge }),
|
|
655
|
+
$.span.detail !== void 0 && /* @__PURE__ */ S("span", {
|
|
611
656
|
title: $.span.detail,
|
|
612
657
|
className: "xy8obcc x153jb6y xb3r6kr xlyipyv xuxw1ft xxc7z9f",
|
|
613
658
|
children: $.span.detail
|
|
614
659
|
})
|
|
615
660
|
]
|
|
616
|
-
}), /* @__PURE__ */
|
|
617
|
-
|
|
661
|
+
}), /* @__PURE__ */ C(u, { children: [
|
|
662
|
+
Ft.map((e) => e.href === void 0 ? /* @__PURE__ */ S(c, {
|
|
618
663
|
variant: "outline",
|
|
619
664
|
onClick: e.onSelect,
|
|
620
665
|
children: e.label
|
|
621
|
-
}, e.id) : /* @__PURE__ */
|
|
666
|
+
}, e.id) : /* @__PURE__ */ S("a", {
|
|
622
667
|
href: e.href,
|
|
623
668
|
target: e.isExternal === !0 ? "_blank" : void 0,
|
|
624
669
|
rel: e.isExternal === !0 ? "noreferrer" : void 0,
|
|
625
670
|
className: "x3nfvp2 x6s0dn4 xunmzkg x1fgtraw x5g2kb4 x1ok0vyi xmkeg23 x1y0btm7 x1ey3b81 xpvm0e4 xbixft x1hz01jw xy8obcc x1hl2dhg x1ypdohk x1mkwuse",
|
|
626
671
|
children: e.label
|
|
627
672
|
}, e.id)),
|
|
628
|
-
|
|
673
|
+
It && /* @__PURE__ */ S(c, {
|
|
629
674
|
variant: "solid",
|
|
630
|
-
onClick: () =>
|
|
675
|
+
onClick: () => A($.span),
|
|
631
676
|
children: "Inspect span"
|
|
632
677
|
}),
|
|
633
|
-
|
|
678
|
+
D !== void 0 && /* @__PURE__ */ C(c, {
|
|
634
679
|
variant: "ghost",
|
|
635
680
|
density: "compact",
|
|
636
|
-
onClick:
|
|
681
|
+
onClick: D,
|
|
637
682
|
"aria-label": "Clear selection",
|
|
638
|
-
children: [/* @__PURE__ */
|
|
683
|
+
children: [/* @__PURE__ */ S(he, {
|
|
639
684
|
size: 14,
|
|
640
685
|
"aria-hidden": !0
|
|
641
686
|
}), "Clear"]
|
|
642
687
|
})
|
|
643
688
|
] })]
|
|
644
|
-
}),
|
|
645
|
-
return /* @__PURE__ */
|
|
646
|
-
...
|
|
647
|
-
items:
|
|
689
|
+
}), Rt = H > 0 ? H / Ue : 1;
|
|
690
|
+
return /* @__PURE__ */ S(t, {
|
|
691
|
+
...Je,
|
|
692
|
+
items: wt,
|
|
648
693
|
place: (e) => {
|
|
649
|
-
let t = Q.find((t) => t.span.id === e), n = t?.rank ?? 0, r = (t?.laneIndex ?? 0) *
|
|
694
|
+
let t = Q.find((t) => t.span.id === e), n = t?.rank ?? 0, r = (t?.laneIndex ?? 0) * Tt;
|
|
650
695
|
return t === void 0 ? void 0 : {
|
|
651
696
|
left: n,
|
|
652
697
|
right: n,
|
|
@@ -654,79 +699,79 @@ function et({ lanes: n, spans: v, links: _e, domain: x, categories: S, visibleRa
|
|
|
654
699
|
bottom: r
|
|
655
700
|
};
|
|
656
701
|
},
|
|
657
|
-
locate:
|
|
658
|
-
selected:
|
|
659
|
-
onSelect:
|
|
702
|
+
locate: Et,
|
|
703
|
+
selected: O ?? null,
|
|
704
|
+
onSelect: k === void 0 && D === void 0 ? void 0 : (e, t) => {
|
|
660
705
|
let n = t.event instanceof MouseEvent && t.event.detail >= 2;
|
|
661
|
-
e ===
|
|
706
|
+
e === O && !n && D !== void 0 ? D() : k?.(e, t);
|
|
662
707
|
},
|
|
663
708
|
render: (t, { inspected: i, cursor: o }) => {
|
|
664
|
-
let s = Q.find((e) => e.span.id === o), c = i === null ? void 0 :
|
|
665
|
-
return /* @__PURE__ */
|
|
666
|
-
...
|
|
667
|
-
actions:
|
|
709
|
+
let s = Q.find((e) => e.span.id === o), c = i === null ? void 0 : Ct.get(i), l = c !== void 0 && c.isVisible;
|
|
710
|
+
return /* @__PURE__ */ S(_, {
|
|
711
|
+
...N,
|
|
712
|
+
actions: Pt,
|
|
668
713
|
figure: t,
|
|
669
|
-
footer:
|
|
670
|
-
id:
|
|
671
|
-
children: e(
|
|
714
|
+
footer: x.length === 0 ? void 0 : /* @__PURE__ */ S(r, {
|
|
715
|
+
id: Me,
|
|
716
|
+
children: e(wt, i)
|
|
672
717
|
}),
|
|
673
|
-
children:
|
|
718
|
+
children: x.length === 0 ? /* @__PURE__ */ S(te, { children: Se }) : /* @__PURE__ */ C("div", {
|
|
674
719
|
className: "xrvj5dj xunmzkg xeuugli",
|
|
675
720
|
children: [
|
|
676
|
-
|
|
721
|
+
at && /* @__PURE__ */ S(f, {
|
|
677
722
|
label: "Filter by span category",
|
|
678
723
|
allLabel: "All",
|
|
679
|
-
value:
|
|
724
|
+
value: ot,
|
|
680
725
|
onValueChange: Ze,
|
|
681
|
-
options:
|
|
726
|
+
options: it.map((e) => ({
|
|
682
727
|
id: e.id,
|
|
683
728
|
label: e.label,
|
|
684
729
|
color: p[e.tone],
|
|
685
|
-
count:
|
|
730
|
+
count: rt.get(e.id) ?? 0
|
|
686
731
|
}))
|
|
687
732
|
}),
|
|
688
|
-
|
|
689
|
-
...
|
|
690
|
-
children: /* @__PURE__ */ y
|
|
733
|
+
ye && H > 0 && /* @__PURE__ */ S("div", {
|
|
734
|
+
...b.props(B.minimapBox, B.minimapFrame(q.left, J)),
|
|
735
|
+
children: /* @__PURE__ */ S(y, {
|
|
691
736
|
value: W ? V : null,
|
|
692
|
-
onValueChange: (e) => G(e ??
|
|
693
|
-
min:
|
|
694
|
-
max:
|
|
695
|
-
step:
|
|
696
|
-
describe: (e) => `${X(e[0] -
|
|
697
|
-
label: `${
|
|
737
|
+
onValueChange: (e) => G(e ?? w),
|
|
738
|
+
min: w[0],
|
|
739
|
+
max: w[1],
|
|
740
|
+
step: Rt,
|
|
741
|
+
describe: (e) => `${X(e[0] - w[0])} to ${X(e[1] - w[0])}`,
|
|
742
|
+
label: `${P} zoom minimap`,
|
|
698
743
|
left: 0,
|
|
699
744
|
width: J,
|
|
700
|
-
height:
|
|
701
|
-
children: /* @__PURE__ */
|
|
745
|
+
height: Ie,
|
|
746
|
+
children: /* @__PURE__ */ S("svg", {
|
|
702
747
|
"aria-hidden": !0,
|
|
703
748
|
width: J,
|
|
704
|
-
height:
|
|
705
|
-
viewBox: `0 0 ${J} ${
|
|
749
|
+
height: Ie,
|
|
750
|
+
viewBox: `0 0 ${J} ${Ie}`,
|
|
706
751
|
className: "x1lliihq xh8yej3 x5kalc8 x87ps6o",
|
|
707
752
|
children: Q.map((e) => {
|
|
708
|
-
let t =
|
|
709
|
-
return /* @__PURE__ */
|
|
753
|
+
let t = pt.position(e.span.start), r = Math.max(t + 2, pt.position(e.span.end)), i = Re + (n.length > 1 ? e.laneIndex / (n.length - 1) : I) * 26;
|
|
754
|
+
return /* @__PURE__ */ S("rect", {
|
|
710
755
|
x: t,
|
|
711
756
|
y: i,
|
|
712
757
|
width: Math.max(2, r - t),
|
|
713
|
-
height:
|
|
714
|
-
rx:
|
|
715
|
-
...
|
|
758
|
+
height: Le,
|
|
759
|
+
rx: qe,
|
|
760
|
+
...b.props(B.minimapBar(p[e.tone]))
|
|
716
761
|
}, `mini-${e.span.id}`);
|
|
717
762
|
})
|
|
718
763
|
})
|
|
719
764
|
})
|
|
720
765
|
}),
|
|
721
|
-
/* @__PURE__ */
|
|
722
|
-
onWheel:
|
|
723
|
-
onPointerDown:
|
|
724
|
-
onPointerMove:
|
|
725
|
-
onPointerUp:
|
|
726
|
-
onPointerCancel:
|
|
727
|
-
onKeyDown:
|
|
766
|
+
/* @__PURE__ */ S("div", {
|
|
767
|
+
onWheel: Dt,
|
|
768
|
+
onPointerDown: Ot,
|
|
769
|
+
onPointerMove: kt,
|
|
770
|
+
onPointerUp: At,
|
|
771
|
+
onPointerCancel: jt,
|
|
772
|
+
onKeyDown: Mt,
|
|
728
773
|
onDoubleClick: () => {
|
|
729
|
-
$ !== void 0 &&
|
|
774
|
+
$ !== void 0 && A !== void 0 && A($.span);
|
|
730
775
|
},
|
|
731
776
|
...{
|
|
732
777
|
0: { className: "x1n2onr6 xeuugli x1t137rt" },
|
|
@@ -734,74 +779,74 @@ function et({ lanes: n, spans: v, links: _e, domain: x, categories: S, visibleRa
|
|
|
734
779
|
1: { className: "x1n2onr6 xeuugli x1t137rt xi9pz9s x87ps6o" },
|
|
735
780
|
3: { className: "x1n2onr6 xeuugli x1t137rt xi9pz9s x87ps6o" }
|
|
736
781
|
}[!!W << 1 | !!Qe],
|
|
737
|
-
children: /* @__PURE__ */
|
|
738
|
-
plotRef:
|
|
782
|
+
children: /* @__PURE__ */ C(se, {
|
|
783
|
+
plotRef: F.ref,
|
|
739
784
|
box: q,
|
|
740
785
|
label: a({
|
|
741
|
-
title:
|
|
786
|
+
title: P,
|
|
742
787
|
marks: "spans",
|
|
743
|
-
isSelectable:
|
|
788
|
+
isSelectable: k !== void 0
|
|
744
789
|
}),
|
|
745
|
-
readoutId:
|
|
746
|
-
overlay: l ? /* @__PURE__ */
|
|
790
|
+
readoutId: Me,
|
|
791
|
+
overlay: l ? /* @__PURE__ */ S(et, {
|
|
747
792
|
mark: c,
|
|
748
793
|
box: q
|
|
749
794
|
}) : void 0,
|
|
750
795
|
children: [
|
|
751
|
-
Y.map((e, t) => t % 2 == 1 ? /* @__PURE__ */
|
|
796
|
+
Y.map((e, t) => t % 2 == 1 ? /* @__PURE__ */ S("rect", {
|
|
752
797
|
x: q.left,
|
|
753
798
|
y: e.start,
|
|
754
799
|
width: q.innerWidth,
|
|
755
800
|
height: e.end - e.start,
|
|
756
801
|
className: "x2wnxhi x6b6j1m x47corl"
|
|
757
802
|
}, `band-${e.lane.id}`) : null),
|
|
758
|
-
/* @__PURE__ */
|
|
803
|
+
/* @__PURE__ */ S(ae, {
|
|
759
804
|
box: q,
|
|
760
|
-
xTicks:
|
|
761
|
-
yTicks:
|
|
762
|
-
xTitle:
|
|
805
|
+
xTicks: yt,
|
|
806
|
+
yTicks: gt,
|
|
807
|
+
xTitle: be,
|
|
763
808
|
grid: "x"
|
|
764
809
|
}),
|
|
765
|
-
Y.slice(1).map((e) => /* @__PURE__ */
|
|
810
|
+
Y.slice(1).map((e) => /* @__PURE__ */ S("line", {
|
|
766
811
|
x1: q.left,
|
|
767
812
|
x2: q.right,
|
|
768
813
|
y1: e.start,
|
|
769
814
|
y2: e.start,
|
|
770
|
-
...
|
|
815
|
+
...b.props(ne.grid, B.separator)
|
|
771
816
|
}, e.lane.id)),
|
|
772
|
-
/* @__PURE__ */
|
|
817
|
+
/* @__PURE__ */ C(le, {
|
|
773
818
|
box: q,
|
|
774
819
|
children: [
|
|
775
|
-
Y.map((e) => Array.from({ length: e.rowCount }, (t, n) => /* @__PURE__ */
|
|
820
|
+
Y.map((e) => Array.from({ length: e.rowCount }, (t, n) => /* @__PURE__ */ S("rect", {
|
|
776
821
|
x: q.left,
|
|
777
|
-
y: e.start + 6 + n * 26 + 8 *
|
|
822
|
+
y: e.start + 6 + n * 26 + 8 * I,
|
|
778
823
|
width: q.innerWidth,
|
|
779
824
|
height: 18,
|
|
780
|
-
rx:
|
|
825
|
+
rx: qe,
|
|
781
826
|
className: "xzmcrz1 xbd1tli x47corl"
|
|
782
827
|
}, `track-${e.lane.id}-${n}`))),
|
|
783
828
|
Q.map((e) => {
|
|
784
829
|
if (!e.isVisible) return null;
|
|
785
830
|
let t = Math.max(4, e.x2 - e.x1);
|
|
786
|
-
return /* @__PURE__ */
|
|
831
|
+
return /* @__PURE__ */ S(oe, {
|
|
787
832
|
mark: e.span.id,
|
|
788
833
|
x: e.x1,
|
|
789
|
-
y: e.y - 18 *
|
|
834
|
+
y: e.y - 18 * I,
|
|
790
835
|
width: t,
|
|
791
836
|
height: 18,
|
|
792
|
-
rx:
|
|
837
|
+
rx: qe,
|
|
793
838
|
tone: e.tone,
|
|
794
839
|
emphasis: e.isEmphasized ? "normal" : "receded",
|
|
795
840
|
isInspected: i === e.span.id,
|
|
796
|
-
isSelected:
|
|
841
|
+
isSelected: O === e.span.id
|
|
797
842
|
}, e.span.id);
|
|
798
843
|
}),
|
|
799
|
-
(
|
|
800
|
-
let t =
|
|
844
|
+
(me ?? []).map((e) => {
|
|
845
|
+
let t = Ct.get(e.fromSpanId), n = Ct.get(e.toSpanId);
|
|
801
846
|
if (t === void 0 || n === void 0) return null;
|
|
802
847
|
let r = Math.min(t.rawX1, n.rawX1);
|
|
803
848
|
if (Math.max(t.rawX2, n.rawX2) < q.left - 4 || r > q.right + 4) return null;
|
|
804
|
-
let i =
|
|
849
|
+
let i = Ne({
|
|
805
850
|
from: {
|
|
806
851
|
x1: t.rawX1,
|
|
807
852
|
x2: t.rawX2,
|
|
@@ -813,49 +858,49 @@ function et({ lanes: n, spans: v, links: _e, domain: x, categories: S, visibleRa
|
|
|
813
858
|
y: n.y
|
|
814
859
|
}
|
|
815
860
|
}), a = p[e.tone ?? "positive"], o = Z === null ? t.isEmphasized || n.isEmphasized : Z.has(e.fromSpanId) || Z.has(e.toSpanId);
|
|
816
|
-
return /* @__PURE__ */
|
|
817
|
-
...
|
|
861
|
+
return /* @__PURE__ */ C("g", {
|
|
862
|
+
...b.props(ne.emphasis, B.linkGroup, !o && B.linkGroupReceded),
|
|
818
863
|
children: [
|
|
819
|
-
e.label !== void 0 && e.label.length > 0 && /* @__PURE__ */
|
|
820
|
-
/* @__PURE__ */
|
|
864
|
+
e.label !== void 0 && e.label.length > 0 && /* @__PURE__ */ S("title", { children: e.label }),
|
|
865
|
+
/* @__PURE__ */ S("path", {
|
|
821
866
|
d: i.path,
|
|
822
867
|
stroke: a,
|
|
823
868
|
className: "xbh8q5q xhr4kjn x1owpc8m x1f6yumg x13efnbd"
|
|
824
869
|
}),
|
|
825
|
-
/* @__PURE__ */
|
|
870
|
+
/* @__PURE__ */ S("path", {
|
|
826
871
|
d: i.arrowPath,
|
|
827
|
-
|
|
828
|
-
className: "
|
|
872
|
+
fill: a,
|
|
873
|
+
className: "xeutv01"
|
|
829
874
|
})
|
|
830
875
|
]
|
|
831
876
|
}, e.id);
|
|
832
877
|
})
|
|
833
878
|
]
|
|
834
879
|
}),
|
|
835
|
-
l && /* @__PURE__ */
|
|
880
|
+
l && /* @__PURE__ */ S("line", {
|
|
836
881
|
x1: c.x1,
|
|
837
882
|
x2: c.x1,
|
|
838
883
|
y1: q.top,
|
|
839
884
|
y2: q.bottom,
|
|
840
885
|
className: "xhq4mlf x17ub4bw xnpr05h x47corl x13efnbd"
|
|
841
886
|
}),
|
|
842
|
-
s !== void 0 && s.isVisible && /* @__PURE__ */
|
|
843
|
-
x: (s.x1 + s.x2) *
|
|
887
|
+
s !== void 0 && s.isVisible && /* @__PURE__ */ S(m, {
|
|
888
|
+
x: (s.x1 + s.x2) * I,
|
|
844
889
|
top: q.top,
|
|
845
890
|
bottom: q.bottom,
|
|
846
|
-
width:
|
|
891
|
+
width: Be
|
|
847
892
|
})
|
|
848
893
|
]
|
|
849
894
|
})
|
|
850
895
|
}),
|
|
851
|
-
|
|
852
|
-
/* @__PURE__ */
|
|
853
|
-
label: `${
|
|
896
|
+
Lt,
|
|
897
|
+
/* @__PURE__ */ S(g, {
|
|
898
|
+
label: `${P} spans`,
|
|
854
899
|
columns: [{
|
|
855
900
|
id: "span",
|
|
856
901
|
label: "Span"
|
|
857
902
|
}],
|
|
858
|
-
rows:
|
|
903
|
+
rows: wt.map((e) => ({
|
|
859
904
|
id: e.id,
|
|
860
905
|
values: [e.label]
|
|
861
906
|
}))
|
|
@@ -866,4 +911,4 @@ function et({ lanes: n, spans: v, links: _e, domain: x, categories: S, visibleRa
|
|
|
866
911
|
}
|
|
867
912
|
});
|
|
868
913
|
}
|
|
869
|
-
export {
|
|
914
|
+
export { w as n, tt as t };
|