@mechane-ai/elements 0.63.0 → 0.64.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.
Files changed (80) hide show
  1. package/dist/ai.js +7 -7
  2. package/dist/{article-lhByzGCW.js → article-BopqPz1K.js} +6 -6
  3. package/dist/article.js +1 -1
  4. package/dist/catalog.json +1 -1
  5. package/dist/{categorical-values-3g2m87_m.js → categorical-values-8LA9KXhi.js} +1 -1
  6. package/dist/charts/cartesian.js +1 -1
  7. package/dist/charts/comparison.js +1 -1
  8. package/dist/charts/distribution.js +1 -1
  9. package/dist/charts/figure.js +12 -12
  10. package/dist/charts/graph.js +1 -1
  11. package/dist/charts/hierarchy.js +1 -1
  12. package/dist/charts/image.js +1 -1
  13. package/dist/charts/matrix.js +1 -1
  14. package/dist/charts/plot.js +3 -3
  15. package/dist/charts/relationship.js +1 -1
  16. package/dist/charts/text.js +1 -1
  17. package/dist/charts/timeline.js +2 -2
  18. package/dist/charts/trend.js +1 -1
  19. package/dist/charts.js +2 -2
  20. package/dist/{code-block-CJkiWSrX.js → code-block-BjQUIvvw.js} +1 -1
  21. package/dist/collections.js +1 -1
  22. package/dist/{commands-DlitIiMJ.js → commands-BI9rWGpb.js} +2 -2
  23. package/dist/content/code.js +1 -1
  24. package/dist/content/diff.js +3 -3
  25. package/dist/content/link.js +1 -1
  26. package/dist/content/markdown.js +1 -1
  27. package/dist/content/tree.js +2 -2
  28. package/dist/{content-link-DQ3tt_SK.js → content-link-C3RAJ2kP.js} +1 -1
  29. package/dist/content.js +1 -1
  30. package/dist/{dates-Cvrsj4l9.js → dates-D1v_jiva.js} +2 -2
  31. package/dist/{dumbbell-plot-CEShrjuI.js → dumbbell-plot-QGjFMk0X.js} +3 -3
  32. package/dist/{embedding-map-CQZn0DCg.js → embedding-map-D_RNxsCD.js} +6 -6
  33. package/dist/feedback.js +1 -1
  34. package/dist/{figure-frame-BljHBC77.js → figure-frame-CF3298LZ.js} +3 -3
  35. package/dist/forms/dates.js +1 -1
  36. package/dist/{forms-BYk8t91h.js → forms-DlKhXUlc.js} +1 -1
  37. package/dist/forms.js +2 -2
  38. package/dist/{image-grid-ClMUSwqO.js → image-grid-BXsgVBnB.js} +3 -3
  39. package/dist/index.js +1 -1
  40. package/dist/kits/evaluation.js +4 -4
  41. package/dist/kits/interpretability.js +11 -11
  42. package/dist/kits/operations.js +6 -6
  43. package/dist/kits/research.js +8 -8
  44. package/dist/kits/training.js +5 -5
  45. package/dist/layout.js +1 -1
  46. package/dist/lesson.js +3 -3
  47. package/dist/{markdown-_4ZFsDyM.js → markdown-B92daSMP.js} +2 -2
  48. package/dist/mdx.js +6 -6
  49. package/dist/navigation/commands.js +1 -1
  50. package/dist/{navigation-CwXM887i.js → navigation-D3vnWiVv.js} +1 -1
  51. package/dist/navigation.js +3 -3
  52. package/dist/packages/collections/src/data-table-styles.d.ts +4 -0
  53. package/dist/packages/collections/src/data-table-text.d.ts +3 -1
  54. package/dist/{param-BxLsoDip.js → param-DfOYi9wL.js} +1 -1
  55. package/dist/{pierre-diff-DwmKtFYy.js → pierre-diff-DP_TXXIt.js} +1 -1
  56. package/dist/{plot-layout-oXzW4fgJ.js → plot-layout-BfXmAi71.js} +3 -3
  57. package/dist/{plot-surface-BuXeoeBq.js → plot-surface-UQgDiTVe.js} +1 -1
  58. package/dist/{reference-lines-Kmxs_hXa.js → reference-lines-BRHB78Wb.js} +1 -1
  59. package/dist/{scene-AWpudPHv.js → scene-DlVQupfw.js} +6 -6
  60. package/dist/scene.js +1 -1
  61. package/dist/{slope-chart-DzbDOBUo.js → slope-chart-CjXcvoRJ.js} +4 -4
  62. package/dist/{src-CJ-0r20F.js → src-BI1xQE7D.js} +1 -1
  63. package/dist/{src-DH2Xqu32.js → src-BYmv3_AL.js} +1 -1
  64. package/dist/{src-CuTIcRwk.js → src-BYnmQkDq.js} +2 -2
  65. package/dist/{src-CZyleIH0.js → src-BdQGb362.js} +4 -4
  66. package/dist/{src-DpVApV62.js → src-DPcnDU5H.js} +1 -1
  67. package/dist/{src-yrBVxkaf.js → src-DojhQZKX.js} +3 -3
  68. package/dist/{src-DFkzV7H0.js → src-P19zz_aO.js} +15 -10
  69. package/dist/styles2.css +79 -16
  70. package/dist/{time-series-D7TCUK56.js → time-series-Dg3DZRGx.js} +8 -8
  71. package/dist/{timeline-CR5VPm_f.js → timeline-C2IVroD3.js} +263 -254
  72. package/dist/{token-heatmap-DEpcsiRR.js → token-heatmap-CZtIPU60.js} +3 -3
  73. package/dist/{token-predictions-DMYbc2-N.js → token-predictions-BJ5L-Lrm.js} +3 -3
  74. package/dist/{transport-VwKG58nR.js → transport-D9e0H2we.js} +4 -4
  75. package/dist/{tree-diagram-BqL3fTdB.js → tree-diagram-DRAJiqjW.js} +4 -4
  76. package/dist/{treemap-C0CeP3PD.js → treemap-BdELCV7E.js} +4 -4
  77. package/dist/{use-tween-D-wmSMa8.js → use-tween-COV8bEYL.js} +1 -1
  78. package/dist/{violin-plot-6829_9q5.js → violin-plot-DuxqWnuD.js} +3 -3
  79. package/dist/{waterfall-C5HRWlEe.js → waterfall-D4ewGb4u.js} +27 -24
  80. package/package.json +1 -1
@@ -1,8 +1,8 @@
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";
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-BfXmAi71.js";
2
+ import { E as c, c as l, m as u, t as d, y as f } from "./src-BYmv3_AL.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 _, r as ee, t as te } from "./figure-frame-BljHBC77.js";
5
+ import { i as h, l as g, n as _, r as ee, t as te } from "./figure-frame-CF3298LZ.js";
6
6
  import { i as v } from "./chart-link-AE_xuxiP.js";
7
7
  import { t as y } from "./chart-range-Du1gDxCY.js";
8
8
  import { n as ne } from "./plot-width-D3hTycYX.js";
@@ -10,7 +10,7 @@ import { r as re } from "./figure-format-B8kRZMlo.js";
10
10
  import { a as ie } from "./tone-scope-DKiSw-JR.js";
11
11
  import { t as ae } from "./plot-axes-D5S9BnBa.js";
12
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";
13
+ import { n as se, r as ce, t as le } from "./plot-surface-UQgDiTVe.js";
14
14
  import { r as ue } from "./scale-C2xgZyZN.js";
15
15
  import * as b from "@stylexjs/stylex";
16
16
  import { useId as de, useRef as fe, useState as pe } from "react";
@@ -21,8 +21,8 @@ import { X as he } from "lucide-react";
21
21
  var w = {
22
22
  lanes: 24,
23
23
  spans: 2e3
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 }) {
24
+ }, T = .5, E = .005, ge = .7, D = .2, _e = .15, O = 10, k = 6, A = 12, j = 5, M = 3, ve = 2, ye = 6, be = 8, xe = .5;
25
+ function Se({ 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.";
@@ -36,7 +36,7 @@ function Ce({ 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 we(e, t) {
39
+ function Ce(e, t) {
40
40
  let [n, r] = t, i = Math.max(r - n, 0);
41
41
  if (i === 0) return [n, r];
42
42
  let a = i * E, o = Math.max(n, Math.min(r, e[0])), s = Math.max(n, Math.min(r, e[1]));
@@ -46,49 +46,49 @@ function we(e, t) {
46
46
  }
47
47
  return [o, s];
48
48
  }
49
- function Te({ visible: e, domain: t, factor: n, anchorRatio: r = T }) {
49
+ function we({ 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
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 M({ visible: e, domain: t, direction: n, anchorRatio: r = T }) {
56
- return Te({
55
+ function N({ visible: e, domain: t, direction: n, anchorRatio: r = T }) {
56
+ return we({
57
57
  visible: e,
58
58
  domain: t,
59
59
  factor: n === "in" ? ge : 1 / ge,
60
60
  anchorRatio: r
61
61
  });
62
62
  }
63
- function Ee({ visible: e, domain: t, direction: n }) {
64
- return De({
63
+ function Te({ visible: e, domain: t, direction: n }) {
64
+ return Ee({
65
65
  visible: e,
66
66
  domain: t,
67
67
  delta: (e[1] - e[0]) * D * (n === "left" ? -1 : 1)
68
68
  });
69
69
  }
70
- function De({ visible: e, domain: t, delta: n }) {
70
+ function Ee({ 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 Oe(e, t) {
74
+ function De(e, t) {
75
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);
76
+ return Ce([e.start - a, e.end + a], t);
77
77
  }
78
- var ke = 32;
79
- function N(e, t) {
78
+ var Oe = 32;
79
+ function P(e, t) {
80
80
  let n = t.get(e)?.parentId;
81
- return Array.from({ length: ke }, () => {
81
+ return Array.from({ length: Oe }, () => {
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 Ae(e, t, n) {
87
+ function ke(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 = 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);
91
+ let a = P(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 || P(e.id, r).includes(i.id)).map((e) => e.id);
92
92
  return /* @__PURE__ */ new Set([
93
93
  i.id,
94
94
  ...a,
@@ -97,21 +97,21 @@ function Ae(e, t, n) {
97
97
  ...c
98
98
  ]);
99
99
  }
100
- function P(e, t) {
101
- let n = e - A;
102
- return `M ${n} ${t - j} L ${e} ${t} L ${n} ${t + j} Z`;
100
+ function F(e, t) {
101
+ let n = e - j;
102
+ return `M ${n} ${t - M} L ${e} ${t} L ${n} ${t + M} Z`;
103
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`;
104
+ function Ae(e, t, n) {
105
+ let r = t - n * j;
106
+ return `M ${e - M} ${r} L ${e} ${t} L ${e + M} ${r} Z`;
107
107
  }
108
- function F({ fromEnd: e, fromY: t, toStart: n, toY: r }) {
109
- let i = n - A, a = r - t, o = P(n, r);
108
+ function I({ fromEnd: e, fromY: t, toStart: n, toY: r }) {
109
+ let i = n - j, a = r - t, o = F(n, r);
110
110
  if (Math.abs(a) < 1) return {
111
111
  path: `M ${e} ${t} L ${i} ${r}`,
112
112
  arrowPath: o
113
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);
114
+ let s = a > 0 ? 1 : -1, c = i - e, l = e + Math.min(A, c * T), u = Math.min(k, Math.abs(a) * T, l - e, i - l);
115
115
  return {
116
116
  path: [
117
117
  `M ${e} ${t}`,
@@ -124,9 +124,9 @@ function F({ fromEnd: e, fromY: t, toStart: n, toY: r }) {
124
124
  arrowPath: o
125
125
  };
126
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 {
127
+ function je({ from: e, to: t }) {
128
+ let n = 18 * T, r = e.y - n, i = t.y - n, a = i - j, o = Math.max(0, t.x2 - t.x1), s = t.x1 + Math.min(ye, o * T), c = Math.max(Math.min(e.x2, e.x1 + ve), e.x2), l = Math.min(r - be, a - k), u = s - c, d = Ae(s, i, 1);
129
+ if (Math.abs(u) < xe) return {
130
130
  path: `M ${s} ${l} L ${s} ${a}`,
131
131
  arrowPath: d
132
132
  };
@@ -143,21 +143,21 @@ function Me({ from: e, to: t }) {
143
143
  arrowPath: d
144
144
  };
145
145
  }
146
- function Ne({ from: e, to: t }) {
146
+ function Me({ from: e, to: t }) {
147
147
  let n = e.x2, r = e.y, i = t.x1, a = t.y;
148
- if (i - n >= O) return F({
148
+ if (i - n >= O) return I({
149
149
  fromEnd: n,
150
150
  fromY: r,
151
151
  toStart: i,
152
152
  toY: a
153
153
  });
154
154
  let o = a - r;
155
- if (Math.abs(o) < 1) return Me({
155
+ if (Math.abs(o) < 1) return je({
156
156
  from: e,
157
157
  to: t
158
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 {
159
+ let s = o > 0 ? 1 : -1, c = 18 * T, l = r + s * c, u = a - s * c, d = u - s * j, f = Math.max(0, t.x2 - i), p = i + Math.min(ye, f * T), m = Math.min(n, e.x1 + ve), h = Math.max(m, Math.min(n, p)), g = Ae(p, u, s), _ = p - h;
160
+ if (Math.abs(_) < xe) return {
161
161
  path: `M ${h} ${l} L ${p} ${d}`,
162
162
  arrowPath: g
163
163
  };
@@ -186,7 +186,7 @@ function Ne({ from: e, to: t }) {
186
186
  arrowPath: g
187
187
  };
188
188
  }
189
- function Pe({ lane: e, spans: t, minExtent: n }) {
189
+ function Ne({ lane: e, spans: t, minExtent: n }) {
190
190
  let r = t.filter((t) => t.laneId === e.id).map((t) => ({
191
191
  id: t.id,
192
192
  track: e.id,
@@ -198,8 +198,8 @@ function Pe({ lane: e, spans: t, minExtent: n }) {
198
198
  rowCount: r.length === 0 ? 1 : a + 1
199
199
  };
200
200
  }
201
- function Fe({ lanes: e, spans: t, minExtent: n }) {
202
- let r = e.map((e) => Pe({
201
+ function Pe({ lanes: e, spans: t, minExtent: n }) {
202
+ let r = e.map((e) => Ne({
203
203
  lane: e,
204
204
  spans: t,
205
205
  minExtent: n
@@ -210,7 +210,7 @@ function Fe({ lanes: e, spans: t, minExtent: n }) {
210
210
  };
211
211
  }
212
212
  // packages/charts/src/timeline/trace-timeline.tsx
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 = {
213
+ var Fe = 42, Ie = 4, Le = 6, L = .5, Re = 4, ze = 10, Be = 96, Ve = 3, He = 200, Ue = 80, We = .004, Ge = 4, Ke = 2, qe = 340, Je = 8, Ye = 64, R = 28, Xe = 2, Ze = 4, Qe = 680, $e = .3, et = .35, tt = {
214
214
  k1xSpc: "x1rg5ohu",
215
215
  kzqmXN: "xci0xqf",
216
216
  kZKoxP: "x1hagigm",
@@ -222,7 +222,7 @@ var Ie = 42, Le = 4, Re = 6, I = .5, ze = 4, Be = 10, Ve = 96, He = 3, Ue = 200,
222
222
  $$css: !0
223
223
  }, B = {
224
224
  swatch: (e) => [
225
- R,
225
+ tt,
226
226
  {
227
227
  kWkggS: e == null ? e : "xl8spv7",
228
228
  $$css: !0
@@ -232,9 +232,8 @@ var Ie = 42, Le = 4, Re = 6, I = .5, ze = 4, Be = 10, Ve = 96, He = 3, Ue = 200,
232
232
  minimapBox: {
233
233
  kVAEAm: "x1n2onr6",
234
234
  kB7OPa: "x9f619",
235
- kMzoRj: "xmkeg23",
236
- ksu8eU: "x1y0btm7",
237
- kVAM5u: "x1ey3b81",
235
+ k7Eaqz: "xeuugli",
236
+ kGVxlE: "x14yt7xg",
238
237
  kaIpWk: "x1ok0vyi",
239
238
  kWkggS: "x1r7kqkb",
240
239
  kVQacm: "xb3r6kr",
@@ -242,11 +241,11 @@ var Ie = 42, Le = 4, Re = 6, I = .5, ze = 4, Be = 10, Ve = 96, He = 3, Ue = 200,
242
241
  },
243
242
  minimapFrame: (e, t) => [{
244
243
  keTefX: e == null ? e : "x4lel18",
245
- kzqmXN: t == null ? t : "x5lhr3w",
244
+ k71WvV: t == null ? t : "x1c9tiao",
246
245
  $$css: !0
247
246
  }, {
248
247
  "--x-marginInlineStart": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(e),
249
- "--x-width": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(t)
248
+ "--x-marginInlineEnd": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(t)
250
249
  }],
251
250
  minimapBar: (e) => [
252
251
  z,
@@ -335,11 +334,11 @@ var Ie = 42, Le = 4, Re = 6, I = .5, ze = 4, Be = 10, Ve = 96, He = 3, Ue = 200,
335
334
  "--x-top": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(n)
336
335
  }]
337
336
  };
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;
337
+ function nt({ mark: e, box: t, linkLabel: n }) {
338
+ let r = Math.max(1, Math.min(qe, t.innerWidth)), i = (e.x1 + e.x2) * L - r * L, a = Math.max(t.left, Math.min(Math.max(t.left, t.right - r), i)), o = e.y - 18 * L, s = e.y + 18 * L, c = o >= Ye, l = Math.min(t.right, t.left + R), u = Math.max(l, t.right - R), 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
339
  return /* @__PURE__ */ C(me, { children: [/* @__PURE__ */ C("div", {
341
340
  "aria-hidden": !0,
342
- ...b.props(B.hoverCard, c ? B.hoverCardAbove(a, r, t.height - o + Xe) : B.hoverCardBelow(a, r, s + Xe)),
341
+ ...b.props(B.hoverCard, c ? B.hoverCardAbove(a, r, t.height - o + Je) : B.hoverCardBelow(a, r, s + Je)),
343
342
  children: [
344
343
  /* @__PURE__ */ C("div", {
345
344
  className: "x78zum5 x6s0dn4 x1qughib x1hnptsi xeuugli",
@@ -365,88 +364,89 @@ function et({ mark: e, box: t, linkLabel: n }) {
365
364
  ]
366
365
  }), /* @__PURE__ */ S("span", {
367
366
  "aria-hidden": !0,
368
- ...b.props(B.scrubPill, B.scrubPillPos(d, t.bottom + Qe)),
367
+ ...b.props(B.scrubPill, B.scrubPillPos(d, t.bottom + Xe)),
369
368
  children: `+${e.offset}`
370
369
  })] });
371
370
  }
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,
371
+ function V({ lanes: n, spans: x, links: me, domain: w, categories: T, visibleRange: E, onVisibleRangeChange: ge, onClearSelection: D, offsetFormat: _e, selected: O, onSelectedChange: k, highlightedIds: A, onActivateSpan: j, spanActions: M, isMinimapVisible: ve = !0, xTitle: ye = "Elapsed", ...be }) {
372
+ let { emptyLabel: xe = "No spans were recorded.", actions: Oe, ...P } = be, { title: F, locale: Ae } = P, I = ce("regular"), je = de(), Ne = ie(), qe = v(), [Je, Ye] = pe(w), [R, Xe] = pe(null), [tt, z] = pe(!1), V = fe(null);
373
+ if (P.status === "loading") return /* @__PURE__ */ S(h, {
374
+ ...P,
376
375
  height: "regular"
377
376
  });
378
- let tt = Ce({
377
+ let rt = Se({
379
378
  lanes: n,
380
379
  spans: x,
381
380
  domain: w
382
381
  });
383
- if (tt !== void 0) return /* @__PURE__ */ S(ee, {
384
- ...N,
385
- message: tt
382
+ if (rt !== void 0) return /* @__PURE__ */ S(ee, {
383
+ ...P,
384
+ message: rt
386
385
  });
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;
388
- function G(e) {
389
- let t = we(e, w);
390
- E === void 0 && Xe(t), ge?.(t);
386
+ let H = Ce(E ?? Je, w), U = Math.max(w[1] - w[0], 0), W = Math.max(H[1] - H[0], 0), G = U > 0 && W < U * .999;
387
+ function K(e) {
388
+ let t = Ce(e, w);
389
+ E === void 0 && Ye(t), ge?.(t);
391
390
  }
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 = {
391
+ let it = new Map((T ?? []).map((e) => [e.id, e])), at = /* @__PURE__ */ new Map();
392
+ for (let e of x) e.category !== void 0 && at.set(e.category, (at.get(e.category) ?? 0) + 1);
393
+ let ot = (T ?? []).filter((e) => (at.get(e.id) ?? 0) > 0), st = ot.length > 0, ct = R !== null && ot.some((e) => e.id === R) ? R : null, q = {
395
394
  ...o({
396
- width: F.width,
395
+ width: I.width,
397
396
  valueLabels: n.map((e) => e.label),
398
397
  hasXTitle: !0,
399
- hasYTitle: !1
398
+ hasYTitle: !1,
399
+ leftShare: I.width < Qe ? $e : et
400
400
  }),
401
- top: $e
402
- }, st = Math.max(1, F.width - K.left - K.right), { rowBySpanId: ct, rowCountByLane: lt } = Fe({
401
+ top: Ze
402
+ }, lt = Math.max(1, I.width - q.left - q.right), { rowBySpanId: ut, rowCountByLane: dt } = Pe({
403
403
  lanes: n,
404
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,
411
- margins: K
412
- }), ft = ue({
413
- domain: V,
414
- range: [q.left, q.right]
415
- }), J = Math.max(1, q.innerWidth), pt = ue({
405
+ minExtent: W > 0 ? W / lt * 6 : 0
406
+ }), ft = 0;
407
+ for (let e of dt) ft += e;
408
+ let pt = q.top + ft * 26 + n.length * 6 * 2 + q.bottom, J = s({
409
+ width: I.width,
410
+ height: pt,
411
+ margins: q
412
+ }), mt = ue({
413
+ domain: H,
414
+ range: [J.left, J.right]
415
+ }), ht = Math.max(1, J.innerWidth), gt = ue({
416
416
  domain: w,
417
- range: [0, J]
418
- }), Y = [], mt = q.top;
417
+ range: [0, ht]
418
+ }), Y = [], _t = J.top;
419
419
  for (let [e, t] of n.entries()) {
420
- let n = lt[e] ?? 1, r = n * 26 + 12;
420
+ let n = dt[e] ?? 1, r = n * 26 + 12;
421
421
  Y.push({
422
422
  lane: t,
423
423
  index: e,
424
424
  rowCount: n,
425
- start: mt,
426
- end: mt + r
427
- }), mt += r;
425
+ start: _t,
426
+ end: _t + r
427
+ }), _t += r;
428
428
  }
429
- let ht = new Map(Y.map((e) => [e.lane.id, e])), gt = Y.map((e) => ({
429
+ let vt = new Map(Y.map((e) => [e.lane.id, e])), yt = Y.map((e) => ({
430
430
  key: e.lane.id,
431
- position: (e.start + e.end) * I,
431
+ position: (e.start + e.end) * L,
432
432
  label: e.lane.label
433
433
  }));
434
434
  function X(e) {
435
435
  return re({
436
436
  value: e,
437
- locale: je,
437
+ locale: Ae,
438
438
  format: _e
439
439
  });
440
440
  }
441
- let _t = Math.max(He, Math.floor(q.innerWidth / Ve)), vt = i(V, _t), yt = (vt.length > 0 ? vt : [V[0]]).map((e) => ({
441
+ let bt = Math.max(Ve, Math.floor(J.innerWidth / Be)), xt = i(H, bt), St = (xt.length > 0 ? xt : [H[0]]).map((e) => ({
442
442
  key: String(e),
443
- position: ft.position(e),
443
+ position: mt.position(e),
444
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) {
445
+ })), Ct = A !== void 0 && A.length > 0 ? new Set(A) : null, wt = ke(O, x, me), Z = Ct ?? wt ?? null;
446
+ function Tt(e, t) {
447
447
  if (e.tone !== void 0) return e.tone;
448
- let r = e.category === void 0 ? void 0 : nt.get(e.category);
449
- return r === void 0 ? Pe({
448
+ let r = e.category === void 0 ? void 0 : it.get(e.category);
449
+ return r === void 0 ? Ne({
450
450
  id: e.laneId,
451
451
  tone: n[t]?.tone,
452
452
  index: t
@@ -456,7 +456,7 @@ function tt({ lanes: n, spans: x, links: me, domain: w, categories: T, visibleRa
456
456
  span: e,
457
457
  index: t
458
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) => {
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;
459
+ let n = vt.get(e.laneId), r = n?.index ?? 0, i = ut.get(e.id) ?? 0, a = (n?.start ?? J.top) + 6 + (i + L) * 26, o = mt.position(e.start), s = Math.max(o + 4, mt.position(e.end)), c = Math.max(J.left, o), l = Math.min(J.right, s), u = s >= J.left - 4 && o <= J.right + 4, d = Tt(e, r), f = X(e.end - e.start), p = X(e.start - w[0]), m = ct === null || e.category === ct, h = Z === null || Z.has(e.id), g = m && h;
460
460
  return {
461
461
  span: e,
462
462
  rank: t,
@@ -473,7 +473,7 @@ function tt({ lanes: n, spans: x, links: me, domain: w, categories: T, visibleRa
473
473
  offset: p,
474
474
  isEmphasized: g
475
475
  };
476
- }), Ct = new Map(Q.map((e) => [e.span.id, e])), wt = Q.map(({ span: e, laneLabel: t, duration: n, offset: r }) => ({
476
+ }), Et = new Map(Q.map((e) => [e.span.id, e])), Dt = Q.map(({ span: e, laneLabel: t, duration: n, offset: r }) => ({
477
477
  id: e.id,
478
478
  label: [
479
479
  t,
@@ -483,11 +483,11 @@ function tt({ lanes: n, spans: x, links: me, domain: w, categories: T, visibleRa
483
483
  e.badge,
484
484
  e.detail
485
485
  ].filter((e) => e !== void 0 && e !== "").join(" · ")
486
- })), $ = Q.find((e) => e.span.id === O), Tt = 1 / (n.length * 2 + 1);
487
- function Et(e) {
488
- let t = e.x / e.width * q.width, n = e.y / e.height * q.height, r, i = Infinity;
486
+ })), $ = Q.find((e) => e.span.id === O), Ot = 1 / (n.length * 2 + 1);
487
+ function kt(e) {
488
+ let t = e.x / e.width * J.width, n = e.y / e.height * J.height, r, i = Infinity;
489
489
  for (let e of Q) {
490
- let a = t >= e.x1 - ze && t <= e.x2 + ze, o = Math.abs(n - e.y) <= 26 * I;
490
+ let a = t >= e.x1 - Re && t <= e.x2 + Re, o = Math.abs(n - e.y) <= 26 * L;
491
491
  if (e.isVisible && a && o) {
492
492
  let a = Math.max(e.x1, Math.min(e.x2, t)), o = Math.hypot(t - a, n - e.y);
493
493
  o <= i && (i = o, r = e.span.id);
@@ -495,95 +495,95 @@ function tt({ lanes: n, spans: x, links: me, domain: w, categories: T, visibleRa
495
495
  }
496
496
  return r;
497
497
  }
498
- function Dt(e) {
499
- if (H <= 0) return;
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)));
498
+ function At(e) {
499
+ if (U <= 0) return;
500
+ let t = e.currentTarget.getBoundingClientRect(), n = e.clientX - t.left, r = Math.max(0, Math.min(1, (n - J.left) / Math.max(1, J.innerWidth)));
501
501
  if (e.ctrlKey || e.metaKey || e.shiftKey) {
502
502
  e.preventDefault();
503
- let t = Math.max(-80, Math.min(We, e.deltaY)), n = Math.exp(t * Ge);
504
- G(Te({
505
- visible: V,
503
+ let t = Math.max(-80, Math.min(Ue, e.deltaY)), n = Math.exp(t * We);
504
+ K(we({
505
+ visible: H,
506
506
  domain: w,
507
507
  factor: n,
508
508
  anchorRatio: r
509
509
  }));
510
- } else if (W && Math.abs(e.deltaX) > Math.abs(e.deltaY)) {
510
+ } else if (G && Math.abs(e.deltaX) > Math.abs(e.deltaY)) {
511
511
  e.preventDefault();
512
- let t = e.deltaX / Math.max(1, q.innerWidth) * U;
513
- G(De({
514
- visible: V,
512
+ let t = e.deltaX / Math.max(1, J.innerWidth) * W;
513
+ K(Ee({
514
+ visible: H,
515
515
  domain: w,
516
516
  delta: t
517
517
  }));
518
518
  }
519
519
  }
520
- function Ot(e) {
520
+ function jt(e) {
521
521
  if (e.button !== 0 || e.pointerType === "touch") return;
522
522
  let t = e.currentTarget.getBoundingClientRect();
523
- Et({
523
+ kt({
524
524
  x: e.clientX - t.left,
525
525
  y: e.clientY - t.top,
526
526
  width: t.width,
527
527
  height: t.height
528
- }) === void 0 ? (z.current = {
528
+ }) === void 0 ? (V.current = {
529
529
  clientX: e.clientX,
530
530
  clientY: e.clientY,
531
- range: W ? V : null,
531
+ range: G ? H : null,
532
532
  hasDragged: !1
533
- }, W && (R(!0), e.currentTarget.setPointerCapture(e.pointerId))) : z.current = null;
533
+ }, G && (z(!0), e.currentTarget.setPointerCapture(e.pointerId))) : V.current = null;
534
534
  }
535
- function kt(e) {
536
- let t = z.current;
535
+ function Mt(e) {
536
+ let t = V.current;
537
537
  if (t === null) return;
538
538
  let n = e.clientX - t.clientX, r = e.clientY - t.clientY;
539
- if (!t.hasDragged && Math.hypot(n, r) > Ke && (z.current = {
539
+ if (!t.hasDragged && Math.hypot(n, r) > Ge && (V.current = {
540
540
  ...t,
541
541
  hasDragged: !0
542
542
  }), t.range === null) return;
543
- let i = t.range[1] - t.range[0], a = -(n / Math.max(1, q.innerWidth)) * i;
544
- G(De({
543
+ let i = t.range[1] - t.range[0], a = -(n / Math.max(1, J.innerWidth)) * i;
544
+ K(Ee({
545
545
  visible: t.range,
546
546
  domain: w,
547
547
  delta: a
548
548
  }));
549
549
  }
550
- function At() {
551
- let e = z.current;
552
- z.current = null, R(!1), e !== null && !e.hasDragged && O != null && D?.();
550
+ function Nt() {
551
+ let e = V.current;
552
+ V.current = null, z(!1), e !== null && !e.hasDragged && O != null && D?.();
553
553
  }
554
- function jt() {
555
- z.current = null, R(!1);
554
+ function Pt() {
555
+ V.current = null, z(!1);
556
556
  }
557
- function Mt(e) {
557
+ function Ft(e) {
558
558
  switch (e.key) {
559
559
  case "+":
560
560
  case "=":
561
- e.preventDefault(), G(M({
562
- visible: V,
561
+ e.preventDefault(), K(N({
562
+ visible: H,
563
563
  domain: w,
564
564
  direction: "in"
565
565
  }));
566
566
  break;
567
567
  case "-":
568
- e.preventDefault(), G(M({
569
- visible: V,
568
+ e.preventDefault(), K(N({
569
+ visible: H,
570
570
  domain: w,
571
571
  direction: "out"
572
572
  }));
573
573
  break;
574
574
  case "0":
575
- e.preventDefault(), G(w);
575
+ e.preventDefault(), K(w);
576
576
  break;
577
577
  case "[":
578
- W && (e.preventDefault(), G(Ee({
579
- visible: V,
578
+ G && (e.preventDefault(), K(Te({
579
+ visible: H,
580
580
  domain: w,
581
581
  direction: "left"
582
582
  })));
583
583
  break;
584
584
  case "]":
585
- W && (e.preventDefault(), G(Ee({
586
- visible: V,
585
+ G && (e.preventDefault(), K(Te({
586
+ visible: H,
587
587
  domain: w,
588
588
  direction: "right"
589
589
  })));
@@ -591,50 +591,54 @@ function tt({ lanes: n, spans: x, links: me, domain: w, categories: T, visibleRa
591
591
  case "Escape":
592
592
  O != null && D !== void 0 && (e.preventDefault(), D());
593
593
  break;
594
- case "Enter": $ !== void 0 && A !== void 0 && (e.preventDefault(), A($.span));
594
+ case "Enter": $ !== void 0 && j !== void 0 && (e.preventDefault(), j($.span));
595
595
  }
596
596
  }
597
- let Nt = `${X(V[0] - w[0])} – ${X(V[1] - w[0])}`, Pt = /* @__PURE__ */ C(u, { children: [
597
+ let It = `${X(H[0] - w[0])} – ${X(H[1] - w[0])}`, Lt = /* @__PURE__ */ C(u, { children: [
598
598
  /* @__PURE__ */ S("span", {
599
599
  className: "xy8obcc x153jb6y xss6m8b xuxw1ft",
600
- children: Nt
600
+ children: It
601
601
  }),
602
602
  /* @__PURE__ */ S(c, {
603
603
  variant: "outline",
604
- onClick: () => G(M({
605
- visible: V,
604
+ density: "compact",
605
+ onClick: () => K(N({
606
+ visible: H,
606
607
  domain: w,
607
608
  direction: "out"
608
609
  })),
609
- disabled: !W,
610
+ disabled: !G,
610
611
  "aria-label": "Zoom out",
611
612
  children: "−"
612
613
  }),
613
614
  /* @__PURE__ */ S(c, {
614
615
  variant: "outline",
615
- onClick: () => G(M({
616
- visible: V,
616
+ density: "compact",
617
+ onClick: () => K(N({
618
+ visible: H,
617
619
  domain: w,
618
620
  direction: "in"
619
621
  })),
620
- disabled: H <= 0,
622
+ disabled: U <= 0,
621
623
  "aria-label": "Zoom in",
622
624
  children: "+"
623
625
  }),
624
626
  $ !== void 0 && /* @__PURE__ */ S(c, {
625
627
  variant: "outline",
626
- onClick: () => G(Oe($.span, w)),
628
+ density: "compact",
629
+ onClick: () => K(De($.span, w)),
627
630
  "aria-label": "Zoom to selected span",
628
631
  children: "Fit span"
629
632
  }),
630
- W && /* @__PURE__ */ S(c, {
633
+ G && /* @__PURE__ */ S(c, {
631
634
  variant: "ghost",
632
- onClick: () => G(w),
635
+ density: "compact",
636
+ onClick: () => K(w),
633
637
  "aria-label": "Reset zoom",
634
638
  children: "Reset"
635
639
  }),
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", {
640
+ Oe
641
+ ] }), Rt = $ !== void 0 && M !== void 0 ? M($.span) : [], zt = j !== void 0 && Rt.length === 0, Bt = $ === void 0 ? null : /* @__PURE__ */ C("div", {
638
642
  role: "region",
639
643
  "aria-label": "Selected span actions",
640
644
  className: "x78zum5 x1a02dak x6s0dn4 x1qughib x1hnptsi xn9t2bk x1doqdfy x178xt8z xso031l xuxrje7 x1y0btm7 x1ey3b81 x2u8bby xpvm0e4 xbixft xh3r7i3 xeuugli",
@@ -644,7 +648,7 @@ function tt({ lanes: n, spans: x, links: me, domain: w, categories: T, visibleRa
644
648
  /* @__PURE__ */ S("span", { ...b.props(B.swatch(p[$.tone])) }),
645
649
  /* @__PURE__ */ S("span", {
646
650
  title: $.span.label,
647
- className: "xb3r6kr xlyipyv xuxw1ft xyq1l15",
651
+ className: "xeuugli xb3r6kr xlyipyv xuxw1ft xyn4b58",
648
652
  children: /* @__PURE__ */ S(l, { children: $.span.label })
649
653
  }),
650
654
  /* @__PURE__ */ S("span", {
@@ -654,44 +658,49 @@ function tt({ lanes: n, spans: x, links: me, domain: w, categories: T, visibleRa
654
658
  $.span.badge !== void 0 && /* @__PURE__ */ S(d, { children: $.span.badge }),
655
659
  $.span.detail !== void 0 && /* @__PURE__ */ S("span", {
656
660
  title: $.span.detail,
657
- className: "xy8obcc x153jb6y xb3r6kr xlyipyv xuxw1ft xxc7z9f",
661
+ className: "xeuugli xy8obcc x153jb6y xb3r6kr xlyipyv xuxw1ft xbcwbia",
658
662
  children: $.span.detail
659
663
  })
660
664
  ]
661
- }), /* @__PURE__ */ C(u, { children: [
662
- Ft.map((e) => e.href === void 0 ? /* @__PURE__ */ S(c, {
663
- variant: "outline",
664
- onClick: e.onSelect,
665
- children: e.label
666
- }, e.id) : /* @__PURE__ */ S("a", {
667
- href: e.href,
668
- target: e.isExternal === !0 ? "_blank" : void 0,
669
- rel: e.isExternal === !0 ? "noreferrer" : void 0,
670
- className: "x3nfvp2 x6s0dn4 xunmzkg x1fgtraw x5g2kb4 x1ok0vyi xmkeg23 x1y0btm7 x1ey3b81 xpvm0e4 xbixft x1hz01jw xy8obcc x1hl2dhg x1ypdohk x1mkwuse",
671
- children: e.label
672
- }, e.id)),
673
- It && /* @__PURE__ */ S(c, {
674
- variant: "solid",
675
- onClick: () => A($.span),
676
- children: "Inspect span"
677
- }),
678
- D !== void 0 && /* @__PURE__ */ C(c, {
679
- variant: "ghost",
680
- density: "compact",
681
- onClick: D,
682
- "aria-label": "Clear selection",
683
- children: [/* @__PURE__ */ S(he, {
684
- size: 14,
685
- "aria-hidden": !0
686
- }), "Clear"]
687
- })
688
- ] })]
689
- }), Rt = H > 0 ? H / Ue : 1;
665
+ }), /* @__PURE__ */ C("div", {
666
+ className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi xvc5jky xeuugli",
667
+ children: [
668
+ Rt.map((e) => e.href === void 0 ? /* @__PURE__ */ S(c, {
669
+ variant: "outline",
670
+ density: "compact",
671
+ onClick: e.onSelect,
672
+ children: e.label
673
+ }, e.id) : /* @__PURE__ */ S("a", {
674
+ href: e.href,
675
+ target: e.isExternal === !0 ? "_blank" : void 0,
676
+ rel: e.isExternal === !0 ? "noreferrer" : void 0,
677
+ className: "x3nfvp2 x6s0dn4 xunmzkg x1pn6w2t x5g2kb4 x1ok0vyi xmkeg23 x1y0btm7 x1ey3b81 xpvm0e4 xbixft x1hz01jw xy8obcc x1hl2dhg x1ypdohk x1mkwuse",
678
+ children: e.label
679
+ }, e.id)),
680
+ zt && /* @__PURE__ */ S(c, {
681
+ variant: "solid",
682
+ density: "compact",
683
+ onClick: () => j($.span),
684
+ children: "Inspect span"
685
+ }),
686
+ D !== void 0 && /* @__PURE__ */ C(c, {
687
+ variant: "ghost",
688
+ density: "compact",
689
+ onClick: D,
690
+ "aria-label": "Clear selection",
691
+ children: [/* @__PURE__ */ S(he, {
692
+ size: 14,
693
+ "aria-hidden": !0
694
+ }), "Clear"]
695
+ })
696
+ ]
697
+ })]
698
+ }), Vt = U > 0 ? U / He : 1;
690
699
  return /* @__PURE__ */ S(t, {
691
- ...Je,
692
- items: wt,
700
+ ...qe,
701
+ items: Dt,
693
702
  place: (e) => {
694
- let t = Q.find((t) => t.span.id === e), n = t?.rank ?? 0, r = (t?.laneIndex ?? 0) * Tt;
703
+ let t = Q.find((t) => t.span.id === e), n = t?.rank ?? 0, r = (t?.laneIndex ?? 0) * Ot;
695
704
  return t === void 0 ? void 0 : {
696
705
  left: n,
697
706
  right: n,
@@ -699,64 +708,64 @@ function tt({ lanes: n, spans: x, links: me, domain: w, categories: T, visibleRa
699
708
  bottom: r
700
709
  };
701
710
  },
702
- locate: Et,
711
+ locate: kt,
703
712
  selected: O ?? null,
704
713
  onSelect: k === void 0 && D === void 0 ? void 0 : (e, t) => {
705
714
  let n = t.event instanceof MouseEvent && t.event.detail >= 2;
706
715
  e === O && !n && D !== void 0 ? D() : k?.(e, t);
707
716
  },
708
717
  render: (t, { inspected: i, cursor: o }) => {
709
- let s = Q.find((e) => e.span.id === o), c = i === null ? void 0 : Ct.get(i), l = c !== void 0 && c.isVisible;
718
+ let s = Q.find((e) => e.span.id === o), c = i === null ? void 0 : Et.get(i), l = c !== void 0 && c.isVisible;
710
719
  return /* @__PURE__ */ S(_, {
711
- ...N,
712
- actions: Pt,
720
+ ...P,
721
+ actions: Lt,
713
722
  figure: t,
714
723
  footer: x.length === 0 ? void 0 : /* @__PURE__ */ S(r, {
715
- id: Me,
716
- children: e(wt, i)
724
+ id: je,
725
+ children: e(Dt, i)
717
726
  }),
718
- children: x.length === 0 ? /* @__PURE__ */ S(te, { children: Se }) : /* @__PURE__ */ C("div", {
719
- className: "xrvj5dj xunmzkg xeuugli",
727
+ children: x.length === 0 ? /* @__PURE__ */ S(te, { children: xe }) : /* @__PURE__ */ C("div", {
728
+ className: "xrvj5dj x1mkdm3x x1hnptsi xeuugli",
720
729
  children: [
721
- at && /* @__PURE__ */ S(f, {
730
+ st && /* @__PURE__ */ S(f, {
722
731
  label: "Filter by span category",
723
732
  allLabel: "All",
724
- value: ot,
725
- onValueChange: Ze,
726
- options: it.map((e) => ({
733
+ value: ct,
734
+ onValueChange: Xe,
735
+ options: ot.map((e) => ({
727
736
  id: e.id,
728
737
  label: e.label,
729
738
  color: p[e.tone],
730
- count: rt.get(e.id) ?? 0
739
+ count: at.get(e.id) ?? 0
731
740
  }))
732
741
  }),
733
- ye && H > 0 && /* @__PURE__ */ S("div", {
734
- ...b.props(B.minimapBox, B.minimapFrame(q.left, J)),
742
+ ve && U > 0 && /* @__PURE__ */ S("div", {
743
+ ...b.props(B.minimapBox, B.minimapFrame(J.left, Math.max(0, J.width - J.right))),
735
744
  children: /* @__PURE__ */ S(y, {
736
- value: W ? V : null,
737
- onValueChange: (e) => G(e ?? w),
745
+ value: G ? H : null,
746
+ onValueChange: (e) => K(e ?? w),
738
747
  min: w[0],
739
748
  max: w[1],
740
- step: Rt,
749
+ step: Vt,
741
750
  describe: (e) => `${X(e[0] - w[0])} to ${X(e[1] - w[0])}`,
742
- label: `${P} zoom minimap`,
751
+ label: `${F} zoom minimap`,
743
752
  left: 0,
744
- width: J,
745
- height: Ie,
753
+ width: ht,
754
+ height: Fe,
746
755
  children: /* @__PURE__ */ S("svg", {
747
756
  "aria-hidden": !0,
748
- width: J,
749
- height: Ie,
750
- viewBox: `0 0 ${J} ${Ie}`,
757
+ height: Fe,
758
+ viewBox: `0 0 ${ht} ${Fe}`,
759
+ preserveAspectRatio: "none",
751
760
  className: "x1lliihq xh8yej3 x5kalc8 x87ps6o",
752
761
  children: Q.map((e) => {
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;
762
+ let t = gt.position(e.span.start), r = Math.max(t + 2, gt.position(e.span.end)), i = Le + (n.length > 1 ? e.laneIndex / (n.length - 1) : L) * 26;
754
763
  return /* @__PURE__ */ S("rect", {
755
764
  x: t,
756
765
  y: i,
757
766
  width: Math.max(2, r - t),
758
- height: Le,
759
- rx: qe,
767
+ height: Ie,
768
+ rx: Ke,
760
769
  ...b.props(B.minimapBar(p[e.tone]))
761
770
  }, `mini-${e.span.id}`);
762
771
  })
@@ -764,65 +773,65 @@ function tt({ lanes: n, spans: x, links: me, domain: w, categories: T, visibleRa
764
773
  })
765
774
  }),
766
775
  /* @__PURE__ */ S("div", {
767
- onWheel: Dt,
768
- onPointerDown: Ot,
769
- onPointerMove: kt,
770
- onPointerUp: At,
771
- onPointerCancel: jt,
772
- onKeyDown: Mt,
776
+ onWheel: At,
777
+ onPointerDown: jt,
778
+ onPointerMove: Mt,
779
+ onPointerUp: Nt,
780
+ onPointerCancel: Pt,
781
+ onKeyDown: Ft,
773
782
  onDoubleClick: () => {
774
- $ !== void 0 && A !== void 0 && A($.span);
783
+ $ !== void 0 && j !== void 0 && j($.span);
775
784
  },
776
785
  ...{
777
786
  0: { className: "x1n2onr6 xeuugli x1t137rt" },
778
787
  2: { className: "x1n2onr6 xeuugli x1t137rt x1jm3nie" },
779
788
  1: { className: "x1n2onr6 xeuugli x1t137rt xi9pz9s x87ps6o" },
780
789
  3: { className: "x1n2onr6 xeuugli x1t137rt xi9pz9s x87ps6o" }
781
- }[!!W << 1 | !!Qe],
790
+ }[!!G << 1 | !!tt],
782
791
  children: /* @__PURE__ */ C(se, {
783
- plotRef: F.ref,
784
- box: q,
792
+ plotRef: I.ref,
793
+ box: J,
785
794
  label: a({
786
- title: P,
795
+ title: F,
787
796
  marks: "spans",
788
797
  isSelectable: k !== void 0
789
798
  }),
790
- readoutId: Me,
791
- overlay: l ? /* @__PURE__ */ S(et, {
799
+ readoutId: je,
800
+ overlay: l ? /* @__PURE__ */ S(nt, {
792
801
  mark: c,
793
- box: q
802
+ box: J
794
803
  }) : void 0,
795
804
  children: [
796
805
  Y.map((e, t) => t % 2 == 1 ? /* @__PURE__ */ S("rect", {
797
- x: q.left,
806
+ x: J.left,
798
807
  y: e.start,
799
- width: q.innerWidth,
808
+ width: J.innerWidth,
800
809
  height: e.end - e.start,
801
810
  className: "x2wnxhi x6b6j1m x47corl"
802
811
  }, `band-${e.lane.id}`) : null),
803
812
  /* @__PURE__ */ S(ae, {
804
- box: q,
805
- xTicks: yt,
806
- yTicks: gt,
807
- xTitle: be,
813
+ box: J,
814
+ xTicks: St,
815
+ yTicks: yt,
816
+ xTitle: ye,
808
817
  grid: "x"
809
818
  }),
810
819
  Y.slice(1).map((e) => /* @__PURE__ */ S("line", {
811
- x1: q.left,
812
- x2: q.right,
820
+ x1: J.left,
821
+ x2: J.right,
813
822
  y1: e.start,
814
823
  y2: e.start,
815
824
  ...b.props(ne.grid, B.separator)
816
825
  }, e.lane.id)),
817
826
  /* @__PURE__ */ C(le, {
818
- box: q,
827
+ box: J,
819
828
  children: [
820
829
  Y.map((e) => Array.from({ length: e.rowCount }, (t, n) => /* @__PURE__ */ S("rect", {
821
- x: q.left,
822
- y: e.start + 6 + n * 26 + 8 * I,
823
- width: q.innerWidth,
830
+ x: J.left,
831
+ y: e.start + 6 + n * 26 + 8 * L,
832
+ width: J.innerWidth,
824
833
  height: 18,
825
- rx: qe,
834
+ rx: Ke,
826
835
  className: "xzmcrz1 xbd1tli x47corl"
827
836
  }, `track-${e.lane.id}-${n}`))),
828
837
  Q.map((e) => {
@@ -831,10 +840,10 @@ function tt({ lanes: n, spans: x, links: me, domain: w, categories: T, visibleRa
831
840
  return /* @__PURE__ */ S(oe, {
832
841
  mark: e.span.id,
833
842
  x: e.x1,
834
- y: e.y - 18 * I,
843
+ y: e.y - 18 * L,
835
844
  width: t,
836
845
  height: 18,
837
- rx: qe,
846
+ rx: Ke,
838
847
  tone: e.tone,
839
848
  emphasis: e.isEmphasized ? "normal" : "receded",
840
849
  isInspected: i === e.span.id,
@@ -842,11 +851,11 @@ function tt({ lanes: n, spans: x, links: me, domain: w, categories: T, visibleRa
842
851
  }, e.span.id);
843
852
  }),
844
853
  (me ?? []).map((e) => {
845
- let t = Ct.get(e.fromSpanId), n = Ct.get(e.toSpanId);
854
+ let t = Et.get(e.fromSpanId), n = Et.get(e.toSpanId);
846
855
  if (t === void 0 || n === void 0) return null;
847
856
  let r = Math.min(t.rawX1, n.rawX1);
848
- if (Math.max(t.rawX2, n.rawX2) < q.left - 4 || r > q.right + 4) return null;
849
- let i = Ne({
857
+ if (Math.max(t.rawX2, n.rawX2) < J.left - 4 || r > J.right + 4) return null;
858
+ let i = Me({
850
859
  from: {
851
860
  x1: t.rawX1,
852
861
  x2: t.rawX2,
@@ -880,27 +889,27 @@ function tt({ lanes: n, spans: x, links: me, domain: w, categories: T, visibleRa
880
889
  l && /* @__PURE__ */ S("line", {
881
890
  x1: c.x1,
882
891
  x2: c.x1,
883
- y1: q.top,
884
- y2: q.bottom,
892
+ y1: J.top,
893
+ y2: J.bottom,
885
894
  className: "xhq4mlf x17ub4bw xnpr05h x47corl x13efnbd"
886
895
  }),
887
896
  s !== void 0 && s.isVisible && /* @__PURE__ */ S(m, {
888
- x: (s.x1 + s.x2) * I,
889
- top: q.top,
890
- bottom: q.bottom,
891
- width: Be
897
+ x: (s.x1 + s.x2) * L,
898
+ top: J.top,
899
+ bottom: J.bottom,
900
+ width: ze
892
901
  })
893
902
  ]
894
903
  })
895
904
  }),
896
- Lt,
905
+ Bt,
897
906
  /* @__PURE__ */ S(g, {
898
- label: `${P} spans`,
907
+ label: `${F} spans`,
899
908
  columns: [{
900
909
  id: "span",
901
910
  label: "Span"
902
911
  }],
903
- rows: wt.map((e) => ({
912
+ rows: Dt.map((e) => ({
904
913
  id: e.id,
905
914
  values: [e.label]
906
915
  }))
@@ -911,4 +920,4 @@ function tt({ lanes: n, spans: x, links: me, domain: w, categories: T, visibleRa
911
920
  }
912
921
  });
913
922
  }
914
- export { w as n, tt as t };
923
+ export { w as n, V as t };