@mechane-ai/elements 0.58.1 → 0.59.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/README.md +1 -1
- package/dist/ai.js +1 -1
- package/dist/catalog.json +5 -1
- package/dist/content.js +1 -1
- package/dist/kits/research.js +1 -1
- package/dist/packages/content/src/has-renderable-node.d.ts +2 -0
- package/dist/packages/content/src/index.d.ts +1 -1
- package/dist/packages/content/src/playback-bar.d.ts +11 -4
- package/dist/packages/content/src/timeline-scrubber.d.ts +6 -2
- package/dist/src-BAlO76fa.js +1140 -0
- package/package.json +1 -1
- package/skills/use-elements/SKILL.md +18 -18
- package/dist/src-DWKqgI2I.js +0 -957
|
@@ -0,0 +1,1140 @@
|
|
|
1
|
+
import { D as e, T as t, c as n, k as r, v as i, y as a } from "./src-9EJskqB_.js";
|
|
2
|
+
import { t as o } from "./use-scroll-tab-index-Dxpdh4W7.js";
|
|
3
|
+
import { t as s } from "./viewer-styles-DsFYri4K.js";
|
|
4
|
+
import { i as c, t as l } from "./code-block-BZsY2sh3.js";
|
|
5
|
+
import { p as u } from "./src-Dxs3Buo_.js";
|
|
6
|
+
import { t as d } from "./content-link-PnpcnTCx.js";
|
|
7
|
+
import * as f from "@stylexjs/stylex";
|
|
8
|
+
import { usePart as p, usePrimitive as m } from "@ui-sdk/react/primitive";
|
|
9
|
+
import { useCallback as h, useLayoutEffect as g, useMemo as _, useRef as v, useState as y, useSyncExternalStore as b } from "react";
|
|
10
|
+
import { createChange as x, createStickToBottom as S, definePrimitive as C, isRTL as w } from "@ui-sdk/core";
|
|
11
|
+
import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
12
|
+
import { Check as O, Circle as k, CircleDashed as A, CircleHelp as ee, Clock as j, Pause as M, Play as N, SkipBack as P, SkipForward as F, X as I } from "lucide-react";
|
|
13
|
+
import te from "strip-ansi";
|
|
14
|
+
import { fuzzyScore as L, matchRanges as ne, matchRanges as R, matchSegments as re, matchSegments as ie } from "@ui-sdk/react/text-match";
|
|
15
|
+
import { clamp as z, fractionOf as ae, maxOnGrid as B, scrubTo as V, stepBy as H, stepFromKey as oe, valueAt as se } from "@ui-sdk/core/number";
|
|
16
|
+
// packages/content/src/json-viewer.tsx
|
|
17
|
+
var ce = { body: {
|
|
18
|
+
kmVPX3: "x1mvvolr",
|
|
19
|
+
kVQacm: "xysyzu8",
|
|
20
|
+
kskxy: "x1phlbz0",
|
|
21
|
+
kMv6JI: "xiard35",
|
|
22
|
+
kGuDYH: "xy8obcc",
|
|
23
|
+
$$css: !0
|
|
24
|
+
} }, U = 500;
|
|
25
|
+
function W({ value: e, name: t, path: n, depth: r, maxDepth: a, maxEntries: o }) {
|
|
26
|
+
if (typeof e != "object" || !e) {
|
|
27
|
+
let n = JSON.stringify(e), r = n.length > U;
|
|
28
|
+
return /* @__PURE__ */ D("div", {
|
|
29
|
+
className: "xeuugli x126k92a xj0a0fe",
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ D("span", {
|
|
32
|
+
className: "x153jb6y",
|
|
33
|
+
children: [t, ": "]
|
|
34
|
+
}),
|
|
35
|
+
/* @__PURE__ */ E("span", {
|
|
36
|
+
...{
|
|
37
|
+
0: { className: "xbixft" },
|
|
38
|
+
1: { className: "x7ixh4y" }
|
|
39
|
+
}[typeof e == "string" | 0],
|
|
40
|
+
children: n.slice(0, U)
|
|
41
|
+
}),
|
|
42
|
+
r && /* @__PURE__ */ E("span", {
|
|
43
|
+
className: "x153jb6y x1hz01jw",
|
|
44
|
+
children: "… (value truncated)"
|
|
45
|
+
})
|
|
46
|
+
]
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
let s = Object.entries(e), c = Array.isArray(e) ? `${s.length} items` : `${s.length} fields`;
|
|
50
|
+
return r >= a ? /* @__PURE__ */ D("div", {
|
|
51
|
+
className: "xeuugli x126k92a xj0a0fe",
|
|
52
|
+
children: [/* @__PURE__ */ D("span", {
|
|
53
|
+
className: "x153jb6y",
|
|
54
|
+
children: [t, ": "]
|
|
55
|
+
}), /* @__PURE__ */ D("span", {
|
|
56
|
+
className: "x153jb6y x1hz01jw",
|
|
57
|
+
children: [c, " · depth limit"]
|
|
58
|
+
})]
|
|
59
|
+
}) : /* @__PURE__ */ D(i.Root, {
|
|
60
|
+
defaultOpen: r === 0,
|
|
61
|
+
className: "xeuugli x126k92a xj0a0fe",
|
|
62
|
+
children: [/* @__PURE__ */ E(i.Trigger, {
|
|
63
|
+
variant: "inline",
|
|
64
|
+
children: /* @__PURE__ */ D("span", {
|
|
65
|
+
className: "xiard35 xy8obcc",
|
|
66
|
+
children: [
|
|
67
|
+
/* @__PURE__ */ D("span", {
|
|
68
|
+
className: "x153jb6y",
|
|
69
|
+
children: [t, ": "]
|
|
70
|
+
}),
|
|
71
|
+
Array.isArray(e) ? "[]" : "{}",
|
|
72
|
+
" ",
|
|
73
|
+
/* @__PURE__ */ E("span", {
|
|
74
|
+
className: "x153jb6y x1hz01jw",
|
|
75
|
+
children: c
|
|
76
|
+
})
|
|
77
|
+
]
|
|
78
|
+
})
|
|
79
|
+
}), /* @__PURE__ */ E(i.Panel, { children: /* @__PURE__ */ D("div", {
|
|
80
|
+
className: "xo02m6d xpilrb4 x1t7ytsu x97x49r xa1dmyi xiard35 xy8obcc",
|
|
81
|
+
children: [s.slice(0, o).map(([e, t]) => {
|
|
82
|
+
let i = `${n}/${e.replaceAll("~", "~0").replaceAll("/", "~1")}`;
|
|
83
|
+
return /* @__PURE__ */ E(W, {
|
|
84
|
+
name: JSON.stringify(e),
|
|
85
|
+
path: i,
|
|
86
|
+
value: t,
|
|
87
|
+
depth: r + 1,
|
|
88
|
+
maxDepth: a,
|
|
89
|
+
maxEntries: o
|
|
90
|
+
}, i);
|
|
91
|
+
}), s.length > o && /* @__PURE__ */ D("div", {
|
|
92
|
+
className: "x153jb6y x1hz01jw",
|
|
93
|
+
children: [s.length - o, " more entries · copy to inspect the complete value"]
|
|
94
|
+
})]
|
|
95
|
+
}) })]
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
function le({ value: e, label: t, maxDepth: n = 6, maxEntries: r = 50 }) {
|
|
99
|
+
let i = o(), l = h(() => JSON.stringify(e, null, 2), [e]);
|
|
100
|
+
return /* @__PURE__ */ D(c, {
|
|
101
|
+
kind: "json",
|
|
102
|
+
"aria-label": t,
|
|
103
|
+
...f.props(s.root),
|
|
104
|
+
children: [/* @__PURE__ */ D("div", {
|
|
105
|
+
...f.props(s.header),
|
|
106
|
+
children: [/* @__PURE__ */ E("span", {
|
|
107
|
+
...f.props(s.label),
|
|
108
|
+
children: t
|
|
109
|
+
}), /* @__PURE__ */ E(a, {
|
|
110
|
+
label: t,
|
|
111
|
+
value: l,
|
|
112
|
+
children: "Copy JSON"
|
|
113
|
+
})]
|
|
114
|
+
}), /* @__PURE__ */ E("div", {
|
|
115
|
+
ref: i.ref,
|
|
116
|
+
role: "region",
|
|
117
|
+
"aria-label": `${t} fields`,
|
|
118
|
+
tabIndex: i.tabIndex,
|
|
119
|
+
...f.props(s.scrollRegion, ce.body),
|
|
120
|
+
children: /* @__PURE__ */ E(W, {
|
|
121
|
+
name: "root",
|
|
122
|
+
path: "",
|
|
123
|
+
value: e,
|
|
124
|
+
depth: 0,
|
|
125
|
+
maxDepth: Math.max(1, n),
|
|
126
|
+
maxEntries: Math.max(1, r)
|
|
127
|
+
})
|
|
128
|
+
})]
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
// packages/content/src/log-viewer.tsx
|
|
132
|
+
var ue = {
|
|
133
|
+
kVQacm: "xysyzu8",
|
|
134
|
+
kmVPX3: "x1mvvolr",
|
|
135
|
+
kogj98: "x1ghz6dp",
|
|
136
|
+
kMv6JI: "xiard35",
|
|
137
|
+
kGuDYH: "xy8obcc",
|
|
138
|
+
kLWn49: "x1778rvt",
|
|
139
|
+
khDVqt: "x126k92a",
|
|
140
|
+
kHjlTd: "xj0a0fe",
|
|
141
|
+
kKi2Bq: "xeq4nuv",
|
|
142
|
+
$$css: !0
|
|
143
|
+
}, G = {
|
|
144
|
+
output: (e) => [
|
|
145
|
+
ue,
|
|
146
|
+
{
|
|
147
|
+
kskxy: e == null ? e : "x1jols5v",
|
|
148
|
+
$$css: !0
|
|
149
|
+
},
|
|
150
|
+
{ "--x-maxHeight": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(e) }
|
|
151
|
+
],
|
|
152
|
+
notice: {
|
|
153
|
+
kt9PQ7: "xso031l",
|
|
154
|
+
kfdmCh: "x1q0q8m5",
|
|
155
|
+
kL6WhQ: "x1qndepd",
|
|
156
|
+
$$css: !0
|
|
157
|
+
}
|
|
158
|
+
}, de = 2e5;
|
|
159
|
+
function fe({ output: e, label: n, variant: r = "default", maxLines: i = 500, maxHeight: l = 320, isRunning: u = !1 }) {
|
|
160
|
+
let d = o(), p = d.viewport, m = v(!1), [h] = y(() => {
|
|
161
|
+
let e = S();
|
|
162
|
+
return {
|
|
163
|
+
...e,
|
|
164
|
+
subscribe: (t) => e.subscribe(t),
|
|
165
|
+
read: () => e.get()
|
|
166
|
+
};
|
|
167
|
+
}), { following: _ } = b(h.subscribe, h.read, h.read), x = te(e), C = x.slice(-2e5).split("\n"), w = C.slice(-Math.max(1, i)), T = C.length - w.length, O = r === "embedded", k = u && (!O || !_);
|
|
168
|
+
return g(() => {
|
|
169
|
+
let e = p.current;
|
|
170
|
+
return e === null ? void 0 : h.connect(e);
|
|
171
|
+
}, [h, p]), g(() => {
|
|
172
|
+
!u && m.current && (m.current = !1, p.current?.focus({ preventScroll: !0 }));
|
|
173
|
+
}, [u]), /* @__PURE__ */ D(c, {
|
|
174
|
+
kind: "log",
|
|
175
|
+
"aria-label": n,
|
|
176
|
+
...f.props(s.root, O && s.embedded),
|
|
177
|
+
children: [
|
|
178
|
+
/* @__PURE__ */ D("div", {
|
|
179
|
+
...f.props(s.header, O && s.embeddedHeader),
|
|
180
|
+
children: [/* @__PURE__ */ D("span", {
|
|
181
|
+
...f.props(s.label),
|
|
182
|
+
children: [n, u && !O && " · running"]
|
|
183
|
+
}), /* @__PURE__ */ D("div", {
|
|
184
|
+
...f.props(s.actions),
|
|
185
|
+
children: [k && /* @__PURE__ */ E(t, {
|
|
186
|
+
variant: "ghost",
|
|
187
|
+
onClick: () => {
|
|
188
|
+
_ ? h.release() : h.scrollToBottom();
|
|
189
|
+
},
|
|
190
|
+
onFocus: () => {
|
|
191
|
+
m.current = !0;
|
|
192
|
+
},
|
|
193
|
+
onBlur: () => {
|
|
194
|
+
m.current = !1;
|
|
195
|
+
},
|
|
196
|
+
children: _ ? "Pause following" : "Follow output"
|
|
197
|
+
}), /* @__PURE__ */ E(a, {
|
|
198
|
+
value: e,
|
|
199
|
+
label: n,
|
|
200
|
+
display: O ? "icon" : "value",
|
|
201
|
+
children: "Copy"
|
|
202
|
+
})]
|
|
203
|
+
})]
|
|
204
|
+
}),
|
|
205
|
+
T > 0 && /* @__PURE__ */ D("div", {
|
|
206
|
+
...f.props(s.note, G.notice),
|
|
207
|
+
children: [T, " earlier lines omitted from this view. Copy includes the supplied output."]
|
|
208
|
+
}),
|
|
209
|
+
x.length > de && /* @__PURE__ */ E("div", {
|
|
210
|
+
...f.props(s.note, G.notice),
|
|
211
|
+
children: "Preview limited to the last 200,000 characters. Copy includes the supplied output."
|
|
212
|
+
}),
|
|
213
|
+
/* @__PURE__ */ E("pre", {
|
|
214
|
+
ref: d.ref,
|
|
215
|
+
role: "region",
|
|
216
|
+
"aria-label": `${n} output`,
|
|
217
|
+
tabIndex: d.tabIndex,
|
|
218
|
+
...f.props(s.scrollRegion, G.output(l)),
|
|
219
|
+
children: /* @__PURE__ */ E("span", {
|
|
220
|
+
className: "x1lliihq",
|
|
221
|
+
children: x.length === 0 ? "No output recorded." : w.join("\n")
|
|
222
|
+
})
|
|
223
|
+
})
|
|
224
|
+
]
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
// packages/content/src/media-viewer.tsx
|
|
228
|
+
var K = {
|
|
229
|
+
viewport: {
|
|
230
|
+
k1xSpc: "xrvj5dj",
|
|
231
|
+
kgQiWS: "x1ku5rj1",
|
|
232
|
+
kzqmXN: "xh8yej3",
|
|
233
|
+
kOBAk4: "x186iv6y",
|
|
234
|
+
kskxy: "xcwfpss",
|
|
235
|
+
k7Eaqz: "xeuugli",
|
|
236
|
+
kVQacm: "xb3r6kr",
|
|
237
|
+
kWkggS: "x1r7kqkb",
|
|
238
|
+
$$css: !0
|
|
239
|
+
},
|
|
240
|
+
placeholder: {
|
|
241
|
+
kWkggS: "x1fa40ue",
|
|
242
|
+
$$css: !0
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
function pe() {
|
|
246
|
+
return /* @__PURE__ */ E("div", {
|
|
247
|
+
"aria-hidden": !0,
|
|
248
|
+
...f.props(s.root, K.viewport, K.placeholder)
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
function me({ kind: e, src: t, label: n, widthPixels: r, heightPixels: i, onError: a }) {
|
|
252
|
+
return /* @__PURE__ */ E("div", {
|
|
253
|
+
...f.props(s.root, K.viewport),
|
|
254
|
+
children: e === "image" ? /* @__PURE__ */ E("img", {
|
|
255
|
+
src: t,
|
|
256
|
+
alt: n,
|
|
257
|
+
width: r,
|
|
258
|
+
height: i,
|
|
259
|
+
onError: a,
|
|
260
|
+
className: "x1lliihq xh8yej3 x5yr21d x2lwn1j x19kjcj4"
|
|
261
|
+
}) : /* @__PURE__ */ E("video", {
|
|
262
|
+
src: t,
|
|
263
|
+
"aria-label": n,
|
|
264
|
+
width: r,
|
|
265
|
+
height: i,
|
|
266
|
+
controls: !0,
|
|
267
|
+
muted: !0,
|
|
268
|
+
playsInline: !0,
|
|
269
|
+
preload: "metadata",
|
|
270
|
+
onError: a,
|
|
271
|
+
className: "x1lliihq xh8yej3 x5yr21d x2lwn1j x19kjcj4"
|
|
272
|
+
})
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
// packages/content/src/has-renderable-node.ts
|
|
276
|
+
function q(e) {
|
|
277
|
+
return e != null && typeof e != "boolean";
|
|
278
|
+
}
|
|
279
|
+
// packages/content/src/playback-bar.tsx
|
|
280
|
+
var he = [
|
|
281
|
+
.25,
|
|
282
|
+
.5,
|
|
283
|
+
1,
|
|
284
|
+
2,
|
|
285
|
+
4
|
|
286
|
+
], ge = "Playback controls", J = 16, Y = {
|
|
287
|
+
bar: {
|
|
288
|
+
k1xSpc: "x78zum5",
|
|
289
|
+
kwnvtZ: "x1a02dak",
|
|
290
|
+
kGNEyG: "x6s0dn4",
|
|
291
|
+
kB7OPa: "x9f619",
|
|
292
|
+
k7Eaqz: "xeuugli",
|
|
293
|
+
kMzoRj: "xmkeg23",
|
|
294
|
+
ksu8eU: "x1y0btm7",
|
|
295
|
+
kVAM5u: "x1ey3b81",
|
|
296
|
+
kaIpWk: "x1ok0vyi",
|
|
297
|
+
kWkggS: "xpvm0e4",
|
|
298
|
+
$$css: !0
|
|
299
|
+
},
|
|
300
|
+
standardBar: {
|
|
301
|
+
k1C7PZ: "xa2sdi0",
|
|
302
|
+
khm7nJ: "x1gkm1c7",
|
|
303
|
+
k8WAf4: "x1hmw7ec",
|
|
304
|
+
kg3NbH: "x5g2kb4",
|
|
305
|
+
$$css: !0
|
|
306
|
+
},
|
|
307
|
+
compactBar: {
|
|
308
|
+
k1C7PZ: "x26z182",
|
|
309
|
+
khm7nJ: "x1gkm1c7",
|
|
310
|
+
k8WAf4: "x10dazmo",
|
|
311
|
+
kg3NbH: "x14w6jbu",
|
|
312
|
+
$$css: !0
|
|
313
|
+
}
|
|
314
|
+
}, _e = {
|
|
315
|
+
standard: Y.standardBar,
|
|
316
|
+
compact: Y.compactBar
|
|
317
|
+
};
|
|
318
|
+
function X(e) {
|
|
319
|
+
return e !== void 0 && Number.isFinite(e) && e > 0;
|
|
320
|
+
}
|
|
321
|
+
function ve(e, t) {
|
|
322
|
+
let n = new Set(e.filter((e) => X(e)));
|
|
323
|
+
return X(t) && n.add(t), Array.from(n).toSorted((e, t) => e - t).map((e) => ({
|
|
324
|
+
value: String(e),
|
|
325
|
+
label: `${e}x`
|
|
326
|
+
}));
|
|
327
|
+
}
|
|
328
|
+
function ye({ isPlaying: t, onPlayingChange: r, onStepBackward: i, onStepForward: a, speed: o, speeds: s = he, onSpeedChange: c, readout: l, actions: d, density: p = "standard", isDisabled: m = !1, playLabel: h = "Play", pauseLabel: g = "Pause", label: _ = ge, xstyle: v }) {
|
|
329
|
+
let y = c !== void 0, b = q(d), x = X(o) ? o : void 0, S = y ? ve(s, x) : [], C = x === void 0 ? null : String(x), w = _.trim(), T = w.length > 0 ? w : ge;
|
|
330
|
+
return /* @__PURE__ */ D("div", {
|
|
331
|
+
role: "group",
|
|
332
|
+
"aria-label": T,
|
|
333
|
+
...f.props(Y.bar, _e[p], v),
|
|
334
|
+
children: [
|
|
335
|
+
/* @__PURE__ */ D("div", {
|
|
336
|
+
className: "x78zum5 x6s0dn4 xunmzkg x2lah0s",
|
|
337
|
+
children: [
|
|
338
|
+
i !== void 0 && /* @__PURE__ */ E(e, {
|
|
339
|
+
variant: "ghost",
|
|
340
|
+
density: p,
|
|
341
|
+
"aria-label": "Step backward",
|
|
342
|
+
disabled: m,
|
|
343
|
+
onClick: i,
|
|
344
|
+
children: /* @__PURE__ */ E(P, { size: J })
|
|
345
|
+
}),
|
|
346
|
+
/* @__PURE__ */ E(e, {
|
|
347
|
+
variant: "outline",
|
|
348
|
+
density: p,
|
|
349
|
+
"aria-label": t ? g : h,
|
|
350
|
+
disabled: m,
|
|
351
|
+
onClick: () => r(!t),
|
|
352
|
+
children: E(t ? M : N, { size: J })
|
|
353
|
+
}),
|
|
354
|
+
a !== void 0 && /* @__PURE__ */ E(e, {
|
|
355
|
+
variant: "ghost",
|
|
356
|
+
density: p,
|
|
357
|
+
"aria-label": "Step forward",
|
|
358
|
+
disabled: m,
|
|
359
|
+
onClick: a,
|
|
360
|
+
children: /* @__PURE__ */ E(F, { size: J })
|
|
361
|
+
})
|
|
362
|
+
]
|
|
363
|
+
}),
|
|
364
|
+
c !== void 0 && S.length > 0 && /* @__PURE__ */ E(u, {
|
|
365
|
+
label: "Playback speed",
|
|
366
|
+
density: p,
|
|
367
|
+
disabled: m,
|
|
368
|
+
items: S,
|
|
369
|
+
value: C,
|
|
370
|
+
onValueChange: (e) => {
|
|
371
|
+
if (e === null) return;
|
|
372
|
+
let t = Number(e);
|
|
373
|
+
X(t) && c(t);
|
|
374
|
+
}
|
|
375
|
+
}),
|
|
376
|
+
l !== void 0 && /* @__PURE__ */ E("span", {
|
|
377
|
+
className: "x1lliihq x9f619 xeuugli x193iq5w xb3r6kr xlyipyv xss6m8b xuxw1ft x14w6jbu",
|
|
378
|
+
children: /* @__PURE__ */ E(n, {
|
|
379
|
+
variant: "mono",
|
|
380
|
+
tone: "muted",
|
|
381
|
+
children: l
|
|
382
|
+
})
|
|
383
|
+
}),
|
|
384
|
+
b && /* @__PURE__ */ E("div", {
|
|
385
|
+
className: "x78zum5 x1a02dak x6s0dn4 xunmzkg xvc5jky xeuugli",
|
|
386
|
+
children: d
|
|
387
|
+
})
|
|
388
|
+
]
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
// packages/content/src/stack-trace.tsx
|
|
392
|
+
function be({ message: e, frames: t }) {
|
|
393
|
+
return /* @__PURE__ */ D(c, {
|
|
394
|
+
kind: "stack-trace",
|
|
395
|
+
"aria-label": "Stack trace",
|
|
396
|
+
...f.props(s.root),
|
|
397
|
+
children: [/* @__PURE__ */ E("p", {
|
|
398
|
+
className: "x1ghz6dp x1mvvolr xso031l x1q0q8m5 x1qndepd xr5kp14 xk4h15q xj0a0fe",
|
|
399
|
+
children: e
|
|
400
|
+
}), t.length === 0 ? /* @__PURE__ */ E("p", {
|
|
401
|
+
className: "x1ghz6dp x1mvvolr x153jb6y",
|
|
402
|
+
children: "No frames recorded."
|
|
403
|
+
}) : /* @__PURE__ */ E("ol", {
|
|
404
|
+
className: "x1ghz6dp x1717udv x3ct3a4",
|
|
405
|
+
children: t.map((e) => {
|
|
406
|
+
let t = [
|
|
407
|
+
e.file,
|
|
408
|
+
e.line,
|
|
409
|
+
e.column
|
|
410
|
+
].filter((e) => e !== void 0).join(":");
|
|
411
|
+
return /* @__PURE__ */ D("li", {
|
|
412
|
+
className: "x78zum5 xdt5ytf x1hnptsi xeuugli xj0a0fe x1mvvolr xso031l x1t1lzn6 x1q0q8m5 x1qndepd",
|
|
413
|
+
children: [/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E(d, {
|
|
414
|
+
href: e.href,
|
|
415
|
+
children: e.name
|
|
416
|
+
}), t.length > 0 && /* @__PURE__ */ E("span", {
|
|
417
|
+
className: "x1lliihq x153jb6y xiard35 xy8obcc xj0a0fe",
|
|
418
|
+
children: t
|
|
419
|
+
})] }), e.code !== void 0 && /* @__PURE__ */ E(l, {
|
|
420
|
+
code: e.code,
|
|
421
|
+
language: e.language,
|
|
422
|
+
filename: e.file
|
|
423
|
+
})]
|
|
424
|
+
}, e.id);
|
|
425
|
+
})
|
|
426
|
+
})]
|
|
427
|
+
});
|
|
428
|
+
}
|
|
429
|
+
// packages/content/src/text-match.tsx
|
|
430
|
+
var xe = {
|
|
431
|
+
mark: {
|
|
432
|
+
kWkggS: "x1dqe72f",
|
|
433
|
+
kMwMTN: "xbixft",
|
|
434
|
+
kaIpWk: "x1ok0vyi",
|
|
435
|
+
kg3NbH: "x1r97e56",
|
|
436
|
+
$$css: !0
|
|
437
|
+
},
|
|
438
|
+
accent: {
|
|
439
|
+
kWkggS: "x1r8u7ye",
|
|
440
|
+
kMwMTN: "x7ixh4y",
|
|
441
|
+
$$css: !0
|
|
442
|
+
},
|
|
443
|
+
danger: {
|
|
444
|
+
kWkggS: "xcqwzn",
|
|
445
|
+
kMwMTN: "xr5kp14",
|
|
446
|
+
$$css: !0
|
|
447
|
+
}
|
|
448
|
+
};
|
|
449
|
+
function Se({ text: e, query: t, ranges: n, tone: r = "warning", mode: i = "contains" }) {
|
|
450
|
+
let a = n === void 0 ? t.trim() === "" ? [] : ne(e, t, i) : [...n], o = a.length === 0 ? [{
|
|
451
|
+
text: e,
|
|
452
|
+
match: !1
|
|
453
|
+
}] : re(e, a), s = r === "accent" ? xe.accent : r === "danger" ? xe.danger : void 0, c = 0;
|
|
454
|
+
return /* @__PURE__ */ E(T, { children: o.map((e) => {
|
|
455
|
+
let t = `${c}-${e.match ? "m" : "t"}`;
|
|
456
|
+
return c += e.text.length, e.match ? /* @__PURE__ */ E("mark", {
|
|
457
|
+
...f.props(xe.mark, s),
|
|
458
|
+
children: e.text
|
|
459
|
+
}, t) : /* @__PURE__ */ E("span", { children: e.text }, t);
|
|
460
|
+
}) });
|
|
461
|
+
}
|
|
462
|
+
// packages/content/src/timeline-scrubber.tsx
|
|
463
|
+
var Ce = .1, we = 4, Te = [
|
|
464
|
+
"ArrowLeft",
|
|
465
|
+
"ArrowRight",
|
|
466
|
+
"ArrowUp",
|
|
467
|
+
"ArrowDown",
|
|
468
|
+
"PageUp",
|
|
469
|
+
"PageDown",
|
|
470
|
+
"Home",
|
|
471
|
+
"End",
|
|
472
|
+
"[",
|
|
473
|
+
"]",
|
|
474
|
+
"Enter",
|
|
475
|
+
" "
|
|
476
|
+
], Ee = /* @__PURE__ */ new Set(["Enter", " "]), Z = {
|
|
477
|
+
root: {
|
|
478
|
+
kVAEAm: "x1n2onr6",
|
|
479
|
+
kHBbk8: "xc8icb0",
|
|
480
|
+
kzqmXN: "xh8yej3",
|
|
481
|
+
k7Eaqz: "xeuugli",
|
|
482
|
+
kB7OPa: "x9f619",
|
|
483
|
+
kg3NbH: "xlkn9b3",
|
|
484
|
+
kFalU9: "x5ve5x3",
|
|
485
|
+
kfSwDN: "x87ps6o",
|
|
486
|
+
kk7Lky: "xwj21n9",
|
|
487
|
+
$$css: !0
|
|
488
|
+
},
|
|
489
|
+
fill: {
|
|
490
|
+
kVAEAm: "x10l6tqk",
|
|
491
|
+
kYYq5F: "x10no89f",
|
|
492
|
+
kLqNvP: "x1o0tod",
|
|
493
|
+
kaIpWk: "x1ok0vyi",
|
|
494
|
+
kWkggS: "x1pt885t",
|
|
495
|
+
kfzvcC: "x47corl",
|
|
496
|
+
$$css: !0
|
|
497
|
+
},
|
|
498
|
+
fillWidth: (e) => [{
|
|
499
|
+
kzqmXN: e == null ? e : "x5lhr3w",
|
|
500
|
+
$$css: !0
|
|
501
|
+
}, { "--x-width": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(e) }],
|
|
502
|
+
thumb: {
|
|
503
|
+
kVAEAm: "x10l6tqk",
|
|
504
|
+
k87sOh: "xwa60dl",
|
|
505
|
+
kY2c9j: "xhtitgo",
|
|
506
|
+
kB7OPa: "x9f619",
|
|
507
|
+
kzqmXN: "x6jxa94",
|
|
508
|
+
kZKoxP: "x1v9usgg",
|
|
509
|
+
k3aq6I: "x11lhmoz",
|
|
510
|
+
kMzoRj: "xmkeg23",
|
|
511
|
+
ksu8eU: "x1y0btm7",
|
|
512
|
+
kVAM5u: "x159tnba",
|
|
513
|
+
kaIpWk: "x1ok0vyi",
|
|
514
|
+
kWkggS: "xpvm0e4",
|
|
515
|
+
kfzvcC: "x47corl",
|
|
516
|
+
k1ekBW: "x11xpdln",
|
|
517
|
+
kIyJzY: "xtitasy xsn8rav",
|
|
518
|
+
kAMwcw: "x1faw7qm",
|
|
519
|
+
$$css: !0
|
|
520
|
+
},
|
|
521
|
+
thumbHover: {
|
|
522
|
+
k3aq6I: "x11lhmoz xks79hj",
|
|
523
|
+
$$css: !0
|
|
524
|
+
},
|
|
525
|
+
thumbDragging: {
|
|
526
|
+
kWkggS: "x1r7kqkb",
|
|
527
|
+
k3aq6I: "xt56bak",
|
|
528
|
+
kIyJzY: "x1mq3mr6",
|
|
529
|
+
$$css: !0
|
|
530
|
+
},
|
|
531
|
+
insetOffset: (e) => [{
|
|
532
|
+
kLqNvP: e == null ? e : "x1lxsm33",
|
|
533
|
+
$$css: !0
|
|
534
|
+
}, { "--x-insetInlineStart": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(e) }],
|
|
535
|
+
markerButton: {
|
|
536
|
+
kVAEAm: "x10l6tqk",
|
|
537
|
+
k87sOh: "xwa60dl",
|
|
538
|
+
k1xSpc: "x3nfvp2",
|
|
539
|
+
kGNEyG: "x6s0dn4",
|
|
540
|
+
kjj79g: "xl56j7k",
|
|
541
|
+
kmVPX3: "x1717udv",
|
|
542
|
+
kogj98: "x1ghz6dp",
|
|
543
|
+
kMzoRj: "xc342km",
|
|
544
|
+
kaIpWk: "x1ok0vyi",
|
|
545
|
+
kWkggS: "xjbqb8w",
|
|
546
|
+
kzqmXN: "xnr66md x1gtc3ja",
|
|
547
|
+
kZKoxP: "x1f9pz31 x992rv9",
|
|
548
|
+
k3aq6I: "x11lhmoz",
|
|
549
|
+
kFalU9: "x5ve5x3",
|
|
550
|
+
kfSwDN: "x87ps6o",
|
|
551
|
+
kkrTdU: "x1ypdohk",
|
|
552
|
+
kfzvcC: "x67bb7w",
|
|
553
|
+
kYPGJ8: "xtgyt42",
|
|
554
|
+
kPJHz1: "x13qnu6",
|
|
555
|
+
k7shQP: "x9v5kkp",
|
|
556
|
+
kZs9gx: "x19rmrnh",
|
|
557
|
+
kiEn40: "x13iak60",
|
|
558
|
+
ksxJu9: "x1m2itun x14a0mdr",
|
|
559
|
+
k1ekBW: "x11xpdln",
|
|
560
|
+
kIyJzY: "xtitasy xsn8rav",
|
|
561
|
+
kAMwcw: "x1faw7qm",
|
|
562
|
+
$$css: !0
|
|
563
|
+
},
|
|
564
|
+
markerPip: {
|
|
565
|
+
k1xSpc: "x1lliihq",
|
|
566
|
+
kB7OPa: "x9f619",
|
|
567
|
+
kzqmXN: "x1v4s8kt",
|
|
568
|
+
kZKoxP: "x1kpxq89",
|
|
569
|
+
kaIpWk: "x1ok0vyi",
|
|
570
|
+
kMzoRj: "xmkeg23",
|
|
571
|
+
ksu8eU: "x1y0btm7",
|
|
572
|
+
kVAM5u: "x11kgbel",
|
|
573
|
+
$$css: !0
|
|
574
|
+
},
|
|
575
|
+
toneNeutral: {
|
|
576
|
+
kWkggS: "x102e5jz",
|
|
577
|
+
$$css: !0
|
|
578
|
+
},
|
|
579
|
+
tonePositive: {
|
|
580
|
+
kWkggS: "xltmwy2",
|
|
581
|
+
$$css: !0
|
|
582
|
+
},
|
|
583
|
+
toneWarning: {
|
|
584
|
+
kWkggS: "xw9id30",
|
|
585
|
+
$$css: !0
|
|
586
|
+
},
|
|
587
|
+
toneNegative: {
|
|
588
|
+
kWkggS: "xqtq5zq",
|
|
589
|
+
$$css: !0
|
|
590
|
+
},
|
|
591
|
+
toneAccent: {
|
|
592
|
+
kWkggS: "x16lk066",
|
|
593
|
+
$$css: !0
|
|
594
|
+
}
|
|
595
|
+
}, De = {
|
|
596
|
+
neutral: Z.toneNeutral,
|
|
597
|
+
positive: Z.tonePositive,
|
|
598
|
+
warning: Z.toneWarning,
|
|
599
|
+
negative: Z.toneNegative,
|
|
600
|
+
accent: Z.toneAccent
|
|
601
|
+
};
|
|
602
|
+
function Oe(e, t) {
|
|
603
|
+
try {
|
|
604
|
+
e.setPointerCapture(t);
|
|
605
|
+
} catch {}
|
|
606
|
+
}
|
|
607
|
+
function ke(e, t) {
|
|
608
|
+
try {
|
|
609
|
+
e.hasPointerCapture(t) && e.releasePointerCapture(t);
|
|
610
|
+
} catch {}
|
|
611
|
+
}
|
|
612
|
+
function Ae(e, t, n) {
|
|
613
|
+
if (!(e instanceof Element)) return;
|
|
614
|
+
let r = e.closest("[data-marker-id]");
|
|
615
|
+
if (!(r instanceof HTMLElement) || !t.contains(r)) return;
|
|
616
|
+
let i = r.dataset.markerId;
|
|
617
|
+
if (i !== void 0) return n.find((e) => e.marker.id === i);
|
|
618
|
+
}
|
|
619
|
+
function je(e, t) {
|
|
620
|
+
let n = B(t);
|
|
621
|
+
return n < t.max && e >= (n + t.max) / 2 ? t.max : z(V(e, t).value, t.min, t.max);
|
|
622
|
+
}
|
|
623
|
+
function Me(e, t, n) {
|
|
624
|
+
let r = n / 2, i, a = Infinity;
|
|
625
|
+
for (let n of t) {
|
|
626
|
+
let t = Math.abs(n.position - e);
|
|
627
|
+
t <= r && t < a && (i = n, a = t);
|
|
628
|
+
}
|
|
629
|
+
return i;
|
|
630
|
+
}
|
|
631
|
+
function Ne(e, t, n) {
|
|
632
|
+
if (n > 0) return t.find((t) => t.position > e);
|
|
633
|
+
for (let n = t.length - 1; n >= 0; --n) {
|
|
634
|
+
let r = t[n];
|
|
635
|
+
if (r !== void 0 && r.position < e) return r;
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
function Pe(e, t) {
|
|
639
|
+
if (!e.altKey && e.key === "[") return -1;
|
|
640
|
+
if (!e.altKey && e.key === "]") return 1;
|
|
641
|
+
if (e.altKey && !e.shiftKey) {
|
|
642
|
+
let n = t !== void 0 && w(t);
|
|
643
|
+
if (e.key === "ArrowLeft") return n ? 1 : -1;
|
|
644
|
+
if (e.key === "ArrowRight") return n ? -1 : 1;
|
|
645
|
+
}
|
|
646
|
+
return 0;
|
|
647
|
+
}
|
|
648
|
+
function Fe(e) {
|
|
649
|
+
return {
|
|
650
|
+
value: e.value,
|
|
651
|
+
min: e.min,
|
|
652
|
+
max: e.max,
|
|
653
|
+
step: e.step,
|
|
654
|
+
markers: e.markerSummaries,
|
|
655
|
+
disabled: e.isDisabled,
|
|
656
|
+
isDragging: e.isDragging,
|
|
657
|
+
valueText: e.valueText
|
|
658
|
+
};
|
|
659
|
+
}
|
|
660
|
+
var Ie = C({
|
|
661
|
+
name: "timeline-scrubber",
|
|
662
|
+
options: {
|
|
663
|
+
value: "number",
|
|
664
|
+
min: "number",
|
|
665
|
+
max: "number",
|
|
666
|
+
step: "number",
|
|
667
|
+
markers: "value",
|
|
668
|
+
markerSummaries: "value",
|
|
669
|
+
isDisabled: "boolean",
|
|
670
|
+
isDragging: "boolean",
|
|
671
|
+
valueText: "string",
|
|
672
|
+
onValueChange: "callback",
|
|
673
|
+
onMarkerSelect: "callback"
|
|
674
|
+
},
|
|
675
|
+
controlled: [
|
|
676
|
+
"value",
|
|
677
|
+
"min",
|
|
678
|
+
"max",
|
|
679
|
+
"markers"
|
|
680
|
+
],
|
|
681
|
+
state: Fe,
|
|
682
|
+
sync: Fe,
|
|
683
|
+
api: (e) => {
|
|
684
|
+
let { store: t } = e, n = x(e);
|
|
685
|
+
return {
|
|
686
|
+
scrub(e, t) {
|
|
687
|
+
return n("value", e, {
|
|
688
|
+
reason: "scrub",
|
|
689
|
+
event: t
|
|
690
|
+
});
|
|
691
|
+
},
|
|
692
|
+
activateMarker(t, r, i) {
|
|
693
|
+
n("value", r, {
|
|
694
|
+
reason: "marker",
|
|
695
|
+
event: i
|
|
696
|
+
}), e.options().onMarkerSelect?.(t);
|
|
697
|
+
},
|
|
698
|
+
setValue(t) {
|
|
699
|
+
let { isDisabled: r, min: i, max: a, step: o } = e.options();
|
|
700
|
+
if (r) throw Error("Timeline scrubber is disabled.");
|
|
701
|
+
let s = Number(t);
|
|
702
|
+
if (!Number.isFinite(s) || s < i || s > a) throw Error(`Give a number between ${i} and ${a}.`);
|
|
703
|
+
let c = a > i ? je(s, {
|
|
704
|
+
min: i,
|
|
705
|
+
max: a,
|
|
706
|
+
step: o
|
|
707
|
+
}) : i;
|
|
708
|
+
return n("value", c, { reason: "imperative" });
|
|
709
|
+
},
|
|
710
|
+
selectMarker(t) {
|
|
711
|
+
let { isDisabled: r, markers: i, onMarkerSelect: a } = e.options();
|
|
712
|
+
if (r) throw Error("Timeline scrubber is disabled.");
|
|
713
|
+
if (typeof t != "string" || t.length === 0) throw TypeError("Give a marker id or label.");
|
|
714
|
+
let o = i.find((e) => e.marker.id === t) ?? i.find((e) => e.marker.label === t);
|
|
715
|
+
if (o === void 0) throw Error(`Unknown marker "${t}".`);
|
|
716
|
+
return n("value", o.position, { reason: "marker" }), a?.(o.marker), !0;
|
|
717
|
+
},
|
|
718
|
+
items() {
|
|
719
|
+
return e.options().markerSummaries.map((e) => ({
|
|
720
|
+
value: e.id,
|
|
721
|
+
label: e.label
|
|
722
|
+
}));
|
|
723
|
+
},
|
|
724
|
+
keydown(r, i) {
|
|
725
|
+
let { isDisabled: a, min: o, max: s, step: c, markers: l, onMarkerSelect: u } = e.options();
|
|
726
|
+
if (a || r.defaultPrevented || r.ctrlKey || r.metaKey) return;
|
|
727
|
+
let d = t.get().value, f = Pe(r, i);
|
|
728
|
+
if (f !== 0 && l.length > 0) {
|
|
729
|
+
r.preventDefault();
|
|
730
|
+
let e = Ne(d, l, f);
|
|
731
|
+
e !== void 0 && (n("value", e.position, {
|
|
732
|
+
reason: "marker",
|
|
733
|
+
event: r
|
|
734
|
+
}), u?.(e.marker));
|
|
735
|
+
return;
|
|
736
|
+
}
|
|
737
|
+
if (!r.altKey && !r.shiftKey && Ee.has(r.key)) {
|
|
738
|
+
let e = Me(d, l, c);
|
|
739
|
+
e !== void 0 && (r.preventDefault(), u?.(e.marker));
|
|
740
|
+
return;
|
|
741
|
+
}
|
|
742
|
+
let p = oe(r, i === void 0 ? void 0 : { dir: w(i) ? "rtl" : "ltr" });
|
|
743
|
+
if (p === null) return;
|
|
744
|
+
if (r.preventDefault(), p.bound === "min") {
|
|
745
|
+
n("value", o, {
|
|
746
|
+
reason: "step-key",
|
|
747
|
+
event: r
|
|
748
|
+
});
|
|
749
|
+
return;
|
|
750
|
+
}
|
|
751
|
+
if (p.bound === "max") {
|
|
752
|
+
n("value", s, {
|
|
753
|
+
reason: "step-key",
|
|
754
|
+
event: r
|
|
755
|
+
});
|
|
756
|
+
return;
|
|
757
|
+
}
|
|
758
|
+
let m = s - o, h = Math.max(c, m * Ce), g = z(H(d, p, {
|
|
759
|
+
min: o,
|
|
760
|
+
max: s,
|
|
761
|
+
step: c,
|
|
762
|
+
largeStep: h
|
|
763
|
+
}), o, s), _ = p.direction > 0 && p.size === "large" && d + h >= s, v = p.direction > 0 && g <= d && d < s;
|
|
764
|
+
n("value", _ || v ? s : g, {
|
|
765
|
+
reason: "step-key",
|
|
766
|
+
event: r
|
|
767
|
+
});
|
|
768
|
+
}
|
|
769
|
+
};
|
|
770
|
+
},
|
|
771
|
+
slots: (e) => ({
|
|
772
|
+
root: e({ attrs: (e) => ({ "data-disabled": e.disabled ? "" : void 0 }) }),
|
|
773
|
+
slider: e({
|
|
774
|
+
role: "slider",
|
|
775
|
+
focus: (e) => e.disabled ? { none: "Disabled scrubber does not take focus." } : "tab-stop",
|
|
776
|
+
keys: [...Te],
|
|
777
|
+
attrs: (e) => ({
|
|
778
|
+
tabindex: e.disabled ? "-1" : "0",
|
|
779
|
+
"aria-valuemin": String(e.min),
|
|
780
|
+
"aria-valuemax": String(e.max),
|
|
781
|
+
"aria-valuenow": String(e.value),
|
|
782
|
+
"aria-valuetext": e.valueText,
|
|
783
|
+
"aria-disabled": e.disabled ? "true" : void 0,
|
|
784
|
+
"data-disabled": e.disabled ? "" : void 0,
|
|
785
|
+
"data-dragging": e.isDragging ? "" : void 0
|
|
786
|
+
}),
|
|
787
|
+
on: { keydown: (e, { api: t, el: n }) => {
|
|
788
|
+
t.keydown(e, n);
|
|
789
|
+
} }
|
|
790
|
+
})
|
|
791
|
+
}),
|
|
792
|
+
agent: {
|
|
793
|
+
actions: ["setValue", "selectMarker"],
|
|
794
|
+
items: (e) => e.items()
|
|
795
|
+
}
|
|
796
|
+
});
|
|
797
|
+
function Le({ value: e, max: t, min: n = 0, step: r = 1, onValueChange: i, onScrubStart: a, onScrubEnd: o, markers: s, onMarkerSelect: c, formatValue: l, isDisabled: u = !1, label: d, xstyle: h }) {
|
|
798
|
+
let g = v(null), b = v(null), x = v(null), S = v(!1), C = v(null), w = v(null), O = v(null), [k, A] = y(!1), [ee, j] = y(!1), M = Number.isFinite(n) ? n : 0, N = Number.isFinite(t) && t >= M ? t : M, P = Number.isFinite(r) && r > 0 ? r : 1, F = N - M, I = z(Number.isFinite(e) ? e : M, M, N), te = F > 0 ? ae(I, {
|
|
799
|
+
min: M,
|
|
800
|
+
max: N
|
|
801
|
+
}) * 100 : 0, L = _(() => s === void 0 ? [] : s.filter((e) => Number.isFinite(e.position)).map((e) => ({
|
|
802
|
+
marker: e,
|
|
803
|
+
position: z(e.position, M, N)
|
|
804
|
+
})).toSorted((e, t) => e.position - t.position), [
|
|
805
|
+
s,
|
|
806
|
+
M,
|
|
807
|
+
N
|
|
808
|
+
]), ne = _(() => L.map(({ marker: e, position: t }) => ({
|
|
809
|
+
id: e.id,
|
|
810
|
+
position: t,
|
|
811
|
+
label: e.label,
|
|
812
|
+
tone: e.tone ?? "neutral"
|
|
813
|
+
})), [L]), R = Me(I, L, P), re = l === void 0 ? void 0 : l(I), ie = R === void 0 ? re : `${re ?? String(I)}, marker: ${R.marker.label}`, B = m(Ie, {
|
|
814
|
+
value: I,
|
|
815
|
+
min: M,
|
|
816
|
+
max: N,
|
|
817
|
+
step: P,
|
|
818
|
+
markers: L,
|
|
819
|
+
markerSummaries: ne,
|
|
820
|
+
isDisabled: u,
|
|
821
|
+
isDragging: k,
|
|
822
|
+
valueText: ie,
|
|
823
|
+
onValueChange: i,
|
|
824
|
+
onMarkerSelect: c
|
|
825
|
+
});
|
|
826
|
+
function V(e) {
|
|
827
|
+
if (F <= 0) return M;
|
|
828
|
+
let t = b.current?.getBoundingClientRect();
|
|
829
|
+
if (t === void 0 || t.width <= 0) return I;
|
|
830
|
+
let n = z((e - t.left) / t.width, 0, 1);
|
|
831
|
+
return je(se(n, {
|
|
832
|
+
min: M,
|
|
833
|
+
max: N
|
|
834
|
+
}), {
|
|
835
|
+
min: M,
|
|
836
|
+
max: N,
|
|
837
|
+
step: P
|
|
838
|
+
});
|
|
839
|
+
}
|
|
840
|
+
function H(e, t) {
|
|
841
|
+
O.current !== e && (O.current = e, B.api.scrub(e, t));
|
|
842
|
+
}
|
|
843
|
+
function oe(e) {
|
|
844
|
+
if (x.current !== null || u || e.button !== 0 || F <= 0) return;
|
|
845
|
+
e.preventDefault(), g.current?.focus({ preventScroll: !0 }), Oe(e.currentTarget, e.pointerId), x.current = e.pointerId, O.current = null;
|
|
846
|
+
let t = Ae(e.target, e.currentTarget, L);
|
|
847
|
+
t === void 0 ? (C.current = null, S.current = !0, A(!0), a?.(), H(V(e.clientX), e.nativeEvent)) : (S.current = !1, C.current = {
|
|
848
|
+
marker: t.marker,
|
|
849
|
+
position: t.position,
|
|
850
|
+
startClientX: e.clientX,
|
|
851
|
+
startClientY: e.clientY
|
|
852
|
+
});
|
|
853
|
+
}
|
|
854
|
+
function ce(e) {
|
|
855
|
+
if (u || x.current !== e.pointerId) return;
|
|
856
|
+
let t = C.current;
|
|
857
|
+
if (t !== null) {
|
|
858
|
+
let n = e.clientX - t.startClientX, r = e.clientY - t.startClientY;
|
|
859
|
+
if (Math.hypot(n, r) < we) return;
|
|
860
|
+
C.current = null, S.current = !0, A(!0), a?.();
|
|
861
|
+
}
|
|
862
|
+
S.current && H(V(e.clientX), e.nativeEvent);
|
|
863
|
+
}
|
|
864
|
+
function U(e) {
|
|
865
|
+
if (x.current !== e.pointerId) return;
|
|
866
|
+
let t = C.current, n = S.current;
|
|
867
|
+
if (x.current = null, C.current = null, S.current = !1, O.current = null, ke(e.currentTarget, e.pointerId), t !== null && !u) {
|
|
868
|
+
let n = t.marker.id;
|
|
869
|
+
w.current = n, queueMicrotask(() => {
|
|
870
|
+
w.current === n && (w.current = null);
|
|
871
|
+
}), B.api.activateMarker(t.marker, t.position, e.nativeEvent);
|
|
872
|
+
} else n && (A(!1), o?.());
|
|
873
|
+
}
|
|
874
|
+
function W(e) {
|
|
875
|
+
if (x.current !== e.pointerId) return;
|
|
876
|
+
let t = S.current;
|
|
877
|
+
x.current = null, C.current = null, S.current = !1, O.current = null, ke(e.currentTarget, e.pointerId), t && (A(!1), o?.());
|
|
878
|
+
}
|
|
879
|
+
let le = ee && !u && !k, ue = p(B, "slider", {}, {
|
|
880
|
+
ref: g,
|
|
881
|
+
"aria-label": d,
|
|
882
|
+
className: "x1n2onr6 x78zum5 x6s0dn4 xh8yej3 x17tes2r x17oiadl x5ve5x3 x87ps6o x1ypdohk x1t137rt x1m8qfh3 x13qnu6 x9v5kkp x19rmrnh x7s97pk xv519k6",
|
|
883
|
+
children: /* @__PURE__ */ D("div", {
|
|
884
|
+
ref: b,
|
|
885
|
+
className: "x1n2onr6 xh8yej3 xqu0tyb x1ok0vyi x1fa40ue",
|
|
886
|
+
children: [/* @__PURE__ */ E("div", { ...f.props(Z.fill, Z.fillWidth(`${te}%`)) }), /* @__PURE__ */ E("div", {
|
|
887
|
+
"aria-hidden": !0,
|
|
888
|
+
...f.props(Z.thumb, Z.insetOffset(`${te}%`), le && Z.thumbHover, k && Z.thumbDragging)
|
|
889
|
+
})]
|
|
890
|
+
})
|
|
891
|
+
}, "div");
|
|
892
|
+
return p(B, "root", {}, {
|
|
893
|
+
onPointerDown: oe,
|
|
894
|
+
onPointerMove: ce,
|
|
895
|
+
onPointerUp: U,
|
|
896
|
+
onPointerCancel: W,
|
|
897
|
+
onLostPointerCapture: W,
|
|
898
|
+
onPointerEnter: () => j(!0),
|
|
899
|
+
onPointerLeave: () => j(!1),
|
|
900
|
+
...f.props(Z.root, h),
|
|
901
|
+
children: /* @__PURE__ */ D(T, { children: [ue, L.length > 0 && /* @__PURE__ */ E("div", {
|
|
902
|
+
className: "x10l6tqk x10no89f x1u5aj70 x1vjfegm x47corl",
|
|
903
|
+
children: L.map(({ marker: e, position: t }) => {
|
|
904
|
+
let n = F > 0 ? ae(t, {
|
|
905
|
+
min: M,
|
|
906
|
+
max: N
|
|
907
|
+
}) * 100 : 0, r = e.tone ?? "neutral";
|
|
908
|
+
return /* @__PURE__ */ E("button", {
|
|
909
|
+
type: "button",
|
|
910
|
+
tabIndex: -1,
|
|
911
|
+
"data-marker-id": e.id,
|
|
912
|
+
"aria-label": e.label,
|
|
913
|
+
title: e.label,
|
|
914
|
+
disabled: u,
|
|
915
|
+
onClick: (n) => {
|
|
916
|
+
w.current === e.id ? w.current = null : u || F <= 0 || B.api.activateMarker(e, t, n.nativeEvent);
|
|
917
|
+
},
|
|
918
|
+
...f.props(Z.markerButton, Z.insetOffset(`${n}%`)),
|
|
919
|
+
children: /* @__PURE__ */ E("span", {
|
|
920
|
+
"aria-hidden": !0,
|
|
921
|
+
...f.props(Z.markerPip, De[r])
|
|
922
|
+
})
|
|
923
|
+
}, e.id);
|
|
924
|
+
})
|
|
925
|
+
})] })
|
|
926
|
+
}, "div");
|
|
927
|
+
}
|
|
928
|
+
// packages/content/src/trace.tsx
|
|
929
|
+
var Q = {
|
|
930
|
+
pending: {
|
|
931
|
+
kMwMTN: "x153jb6y",
|
|
932
|
+
$$css: !0
|
|
933
|
+
},
|
|
934
|
+
running: {
|
|
935
|
+
kMwMTN: "xbixft",
|
|
936
|
+
$$css: !0
|
|
937
|
+
},
|
|
938
|
+
complete: {
|
|
939
|
+
kMwMTN: "x7ixh4y",
|
|
940
|
+
$$css: !0
|
|
941
|
+
},
|
|
942
|
+
failed: {
|
|
943
|
+
kMwMTN: "xr5kp14",
|
|
944
|
+
$$css: !0
|
|
945
|
+
},
|
|
946
|
+
skipped: {
|
|
947
|
+
kMwMTN: "x153jb6y",
|
|
948
|
+
$$css: !0
|
|
949
|
+
},
|
|
950
|
+
unknown: {
|
|
951
|
+
kMwMTN: "x153jb6y",
|
|
952
|
+
$$css: !0
|
|
953
|
+
}
|
|
954
|
+
}, Re = {
|
|
955
|
+
pending: Q.pending,
|
|
956
|
+
running: Q.running,
|
|
957
|
+
complete: Q.complete,
|
|
958
|
+
failed: Q.failed,
|
|
959
|
+
skipped: Q.skipped,
|
|
960
|
+
unknown: Q.unknown
|
|
961
|
+
}, ze = {
|
|
962
|
+
pending: j,
|
|
963
|
+
running: k,
|
|
964
|
+
complete: O,
|
|
965
|
+
failed: I,
|
|
966
|
+
skipped: A,
|
|
967
|
+
unknown: ee
|
|
968
|
+
};
|
|
969
|
+
function Be({ label: e, children: t }) {
|
|
970
|
+
return /* @__PURE__ */ E("ol", {
|
|
971
|
+
"aria-label": e,
|
|
972
|
+
className: "x1ghz6dp x1717udv x3ct3a4 xeuugli x1hz01jw xtqrqnz x1778rvt xj57cvi xbixft",
|
|
973
|
+
children: t
|
|
974
|
+
});
|
|
975
|
+
}
|
|
976
|
+
function Ve({ label: e, children: t }) {
|
|
977
|
+
return /* @__PURE__ */ E("ol", {
|
|
978
|
+
"aria-label": e,
|
|
979
|
+
className: "x1ghz6dp x1717udv x3ct3a4 xeuugli x1hz01jw xtqrqnz x1778rvt xj57cvi xbixft x3bg4vu",
|
|
980
|
+
children: t
|
|
981
|
+
});
|
|
982
|
+
}
|
|
983
|
+
function He({ id: e, label: t, status: n, statusLabel: a, description: o, detail: s, isSelected: c, onSelect: l, children: u }) {
|
|
984
|
+
let d = ze[n];
|
|
985
|
+
return /* @__PURE__ */ D("li", {
|
|
986
|
+
"data-item-id": e,
|
|
987
|
+
className: "x1n2onr6 xrvj5dj x1qpdrs7 x8zbtdt x1wv5www xup0pd7",
|
|
988
|
+
children: [/* @__PURE__ */ D("div", {
|
|
989
|
+
"aria-hidden": !0,
|
|
990
|
+
className: "x78zum5 xdt5ytf x6s0dn4 xunmzkg x1lk341d",
|
|
991
|
+
children: [/* @__PURE__ */ E(d, {
|
|
992
|
+
size: 14,
|
|
993
|
+
...f.props(Re[n])
|
|
994
|
+
}), /* @__PURE__ */ E("span", { className: "x1i1rx1s x1f6qilh x98rzlu x1fa40ue" })]
|
|
995
|
+
}), /* @__PURE__ */ D("div", {
|
|
996
|
+
className: "x78zum5 xdt5ytf xunmzkg xeuugli",
|
|
997
|
+
children: [
|
|
998
|
+
/* @__PURE__ */ E("div", {
|
|
999
|
+
...{
|
|
1000
|
+
0: { className: "xk4h15q xj0a0fe" },
|
|
1001
|
+
1: { className: "xk4h15q xj0a0fe xujl8zx xda060z" }
|
|
1002
|
+
}[c === !0 | 0],
|
|
1003
|
+
children: l === void 0 ? t : /* @__PURE__ */ E(r, {
|
|
1004
|
+
"aria-pressed": c,
|
|
1005
|
+
onClick: () => l(e),
|
|
1006
|
+
children: t
|
|
1007
|
+
})
|
|
1008
|
+
}),
|
|
1009
|
+
/* @__PURE__ */ E("span", {
|
|
1010
|
+
className: "xy8obcc xas2l8k x153jb6y xj0a0fe",
|
|
1011
|
+
children: a
|
|
1012
|
+
}),
|
|
1013
|
+
o !== void 0 && /* @__PURE__ */ E("p", {
|
|
1014
|
+
className: "x1ghz6dp x153jb6y xj0a0fe",
|
|
1015
|
+
children: o
|
|
1016
|
+
}),
|
|
1017
|
+
s !== void 0 && /* @__PURE__ */ D(i.Root, { children: [/* @__PURE__ */ E(i.Trigger, { children: "Details" }), /* @__PURE__ */ E(i.Panel, { children: s })] }),
|
|
1018
|
+
u
|
|
1019
|
+
]
|
|
1020
|
+
})]
|
|
1021
|
+
});
|
|
1022
|
+
}
|
|
1023
|
+
var Ue = {
|
|
1024
|
+
Root: Be,
|
|
1025
|
+
Item: He,
|
|
1026
|
+
Group: Ve
|
|
1027
|
+
}, $ = {
|
|
1028
|
+
root: {
|
|
1029
|
+
k1xSpc: "x78zum5",
|
|
1030
|
+
kXwgrk: "xdt5ytf",
|
|
1031
|
+
kB7OPa: "x9f619",
|
|
1032
|
+
kzqmXN: "xh8yej3",
|
|
1033
|
+
kVQacm: "xb3r6kr",
|
|
1034
|
+
$$css: !0
|
|
1035
|
+
},
|
|
1036
|
+
rootIntrinsic: { $$css: !0 },
|
|
1037
|
+
rootFill: {
|
|
1038
|
+
kZKoxP: "x5yr21d",
|
|
1039
|
+
kAzted: "x2lwn1j",
|
|
1040
|
+
$$css: !0
|
|
1041
|
+
},
|
|
1042
|
+
stage: {
|
|
1043
|
+
kVAEAm: "x1n2onr6",
|
|
1044
|
+
kzqmXN: "xh8yej3",
|
|
1045
|
+
k7Eaqz: "xeuugli",
|
|
1046
|
+
kAzted: "x2lwn1j",
|
|
1047
|
+
kVQacm: "xb3r6kr",
|
|
1048
|
+
kWkggS: "x1r7kqkb",
|
|
1049
|
+
$$css: !0
|
|
1050
|
+
},
|
|
1051
|
+
ratio16x9: {
|
|
1052
|
+
kOBAk4: "x186iv6y",
|
|
1053
|
+
$$css: !0
|
|
1054
|
+
},
|
|
1055
|
+
ratio16x10: {
|
|
1056
|
+
kOBAk4: "x2ebxmi",
|
|
1057
|
+
$$css: !0
|
|
1058
|
+
},
|
|
1059
|
+
ratio4x3: {
|
|
1060
|
+
kOBAk4: "x1dltgaz",
|
|
1061
|
+
$$css: !0
|
|
1062
|
+
},
|
|
1063
|
+
ratioFill: {
|
|
1064
|
+
kUk6DE: "x98rzlu",
|
|
1065
|
+
kAzted: "x2lwn1j",
|
|
1066
|
+
$$css: !0
|
|
1067
|
+
},
|
|
1068
|
+
overlay: {
|
|
1069
|
+
kVAEAm: "x10l6tqk",
|
|
1070
|
+
kpwlN0: "x10a8y8t",
|
|
1071
|
+
k1xSpc: "xrvj5dj",
|
|
1072
|
+
kgQiWS: "x1ku5rj1",
|
|
1073
|
+
kmVPX3: "x1c8xbx5",
|
|
1074
|
+
kB7OPa: "x9f619",
|
|
1075
|
+
kWkggS: "x1r7kqkb",
|
|
1076
|
+
kMwMTN: "x153jb6y",
|
|
1077
|
+
kVQacm: "xysyzu8",
|
|
1078
|
+
$$css: !0
|
|
1079
|
+
}
|
|
1080
|
+
}, We = {
|
|
1081
|
+
"16/9": $.rootIntrinsic,
|
|
1082
|
+
"16/10": $.rootIntrinsic,
|
|
1083
|
+
"4/3": $.rootIntrinsic,
|
|
1084
|
+
fill: $.rootFill
|
|
1085
|
+
}, Ge = {
|
|
1086
|
+
"16/9": $.ratio16x9,
|
|
1087
|
+
"16/10": $.ratio16x10,
|
|
1088
|
+
"4/3": $.ratio4x3,
|
|
1089
|
+
fill: $.ratioFill
|
|
1090
|
+
};
|
|
1091
|
+
function Ke({ headerStart: e, headerEnd: t }) {
|
|
1092
|
+
let n = q(e), r = q(t);
|
|
1093
|
+
return /* @__PURE__ */ D("div", {
|
|
1094
|
+
...f.props(s.header),
|
|
1095
|
+
children: [n && /* @__PURE__ */ E("div", {
|
|
1096
|
+
className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi x8xikuq xeuugli xbixft xj0a0fe",
|
|
1097
|
+
children: e
|
|
1098
|
+
}), r && /* @__PURE__ */ E("div", {
|
|
1099
|
+
className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi xvc5jky xeuugli",
|
|
1100
|
+
children: t
|
|
1101
|
+
})]
|
|
1102
|
+
});
|
|
1103
|
+
}
|
|
1104
|
+
function qe({ aspectRatio: e = "16/9", headerStart: t, headerEnd: n, notice: r, state: i = "ready", placeholder: a, children: c, label: l, xstyle: u }) {
|
|
1105
|
+
let d = o(), p = q(t), m = q(n), h = p || m, g = q(r), _ = q(a), v = i !== "ready" && _, y = l?.trim(), b = y !== void 0 && y.length > 0, x = b ? y : i === "failed" ? "Viewport error" : "Viewport status";
|
|
1106
|
+
return /* @__PURE__ */ D("div", {
|
|
1107
|
+
...f.props(s.root, $.root, We[e], u),
|
|
1108
|
+
children: [
|
|
1109
|
+
h && /* @__PURE__ */ E(Ke, {
|
|
1110
|
+
headerStart: t,
|
|
1111
|
+
headerEnd: n
|
|
1112
|
+
}),
|
|
1113
|
+
g && /* @__PURE__ */ E("div", {
|
|
1114
|
+
className: "xeuugli xn9t2bk x1doqdfy xso031l x1q0q8m5 x1qndepd xpvm0e4 xy8obcc xas2l8k x153jb6y xj0a0fe",
|
|
1115
|
+
children: r
|
|
1116
|
+
}),
|
|
1117
|
+
/* @__PURE__ */ D("div", {
|
|
1118
|
+
role: !v && b ? "region" : void 0,
|
|
1119
|
+
"aria-label": !v && b ? y : void 0,
|
|
1120
|
+
"aria-busy": i === "pending" || void 0,
|
|
1121
|
+
"data-state": i,
|
|
1122
|
+
...f.props($.stage, Ge[e]),
|
|
1123
|
+
children: [/* @__PURE__ */ E("div", {
|
|
1124
|
+
"aria-hidden": v || void 0,
|
|
1125
|
+
inert: v,
|
|
1126
|
+
className: "x10l6tqk x10a8y8t xh8yej3 x5yr21d xeuugli x2lwn1j xb3r6kr",
|
|
1127
|
+
children: c
|
|
1128
|
+
}), v && /* @__PURE__ */ E("div", {
|
|
1129
|
+
ref: d.ref,
|
|
1130
|
+
role: "region",
|
|
1131
|
+
"aria-label": x,
|
|
1132
|
+
tabIndex: d.tabIndex,
|
|
1133
|
+
...f.props(s.scrollRegion, $.overlay),
|
|
1134
|
+
children: a
|
|
1135
|
+
})]
|
|
1136
|
+
})
|
|
1137
|
+
]
|
|
1138
|
+
});
|
|
1139
|
+
}
|
|
1140
|
+
export { L as a, be as c, pe as d, fe as f, Se as i, ye as l, Ue as n, R as o, le as p, Le as r, ie as s, qe as t, me as u };
|