@mechane-ai/elements 0.16.0 → 0.17.1
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/collections.js +105 -110
- package/dist/content/markdown.js +64 -39
- package/dist/content.js +159 -103
- package/dist/elements.css +41 -1
- package/dist/packages/content/src/index.d.ts +2 -0
- package/dist/packages/content/src/markdown/markdown.d.ts +3 -1
- package/dist/packages/content/src/media-viewer.d.ts +11 -0
- package/package.json +1 -1
package/dist/collections.js
CHANGED
|
@@ -125,7 +125,7 @@ function de({ end: e, viewport: t, onEndReached: n, content: r }) {
|
|
|
125
125
|
]);
|
|
126
126
|
}
|
|
127
127
|
// packages/collections/src/data-table.tsx
|
|
128
|
-
var fe = E({}), pe = 76, j = d.compactTable.slice(7), me =
|
|
128
|
+
var fe = E({}), pe = 76, j = d.compactTable.slice(7), me = /* @__PURE__ */ new Map([["ArrowUp", -1], ["ArrowDown", 1]]), M = {
|
|
129
129
|
kmVPX3: "x1717udv",
|
|
130
130
|
kMzoRj: "xc342km",
|
|
131
131
|
$$css: !0
|
|
@@ -290,7 +290,7 @@ var fe = E({}), pe = 76, j = d.compactTable.slice(7), me = "a, button, input, se
|
|
|
290
290
|
isFlexible: !1,
|
|
291
291
|
shouldTruncate: !1
|
|
292
292
|
}
|
|
293
|
-
},
|
|
293
|
+
}, he = {
|
|
294
294
|
fixed: N.content,
|
|
295
295
|
content: N.contentCell
|
|
296
296
|
}, F = {
|
|
@@ -300,14 +300,14 @@ var fe = E({}), pe = 76, j = d.compactTable.slice(7), me = "a, button, input, se
|
|
|
300
300
|
number: N.end,
|
|
301
301
|
timestamp: N.end,
|
|
302
302
|
actions: N.end
|
|
303
|
-
},
|
|
303
|
+
}, ge = {
|
|
304
304
|
content: N.content,
|
|
305
305
|
fill: N.fillFrame
|
|
306
|
-
},
|
|
306
|
+
}, I = {
|
|
307
307
|
content: N.content,
|
|
308
308
|
fill: N.fillViewport
|
|
309
309
|
};
|
|
310
|
-
function
|
|
310
|
+
function L(e) {
|
|
311
311
|
return e.map((e) => {
|
|
312
312
|
let t = P[e.role], n = e.width ?? (t.isFlexible ? void 0 : t.minimumWidth);
|
|
313
313
|
return {
|
|
@@ -316,34 +316,34 @@ function _e(e) {
|
|
|
316
316
|
};
|
|
317
317
|
});
|
|
318
318
|
}
|
|
319
|
-
function
|
|
319
|
+
function R(e, t = 0) {
|
|
320
320
|
return {
|
|
321
321
|
minimumWidth: e.reduce((e, t) => e + (t.width ?? P[t.role].minimumWidth), t),
|
|
322
322
|
compactWidth: e.filter((e) => e.isSecondary !== !0).reduce((e, t) => e + (t.width ?? P[t.role].minimumWidth), t)
|
|
323
323
|
};
|
|
324
324
|
}
|
|
325
|
-
function
|
|
325
|
+
function _e(e) {
|
|
326
326
|
let t = globalThis.matchMedia(j);
|
|
327
327
|
return t.addEventListener("change", e), () => t.removeEventListener("change", e);
|
|
328
328
|
}
|
|
329
|
-
function
|
|
329
|
+
function ve() {
|
|
330
330
|
return globalThis.matchMedia(j).matches;
|
|
331
331
|
}
|
|
332
|
-
function
|
|
332
|
+
function ye({ columns: e, canSelect: t = !1 }) {
|
|
333
333
|
return /* @__PURE__ */ x("colgroup", { children: [t && /* @__PURE__ */ b("col", { className: "x1d7z9mz xeuugli x1dc62k6" }), e.map((e) => /* @__PURE__ */ b("col", { ...p.props(e.width !== void 0 && N.width(e.width), e.isSecondary === !0 && N.secondary) }, e.id))] });
|
|
334
334
|
}
|
|
335
|
-
function
|
|
336
|
-
let i =
|
|
335
|
+
function z({ columns: e, sizing: t = "content", rowSizing: n = "fixed", hideHeaders: r = !1 }) {
|
|
336
|
+
let i = L(e), { minimumWidth: a, compactWidth: o } = R(i);
|
|
337
337
|
return /* @__PURE__ */ b("div", {
|
|
338
338
|
"aria-hidden": !0,
|
|
339
339
|
inert: !0,
|
|
340
|
-
...p.props(N.frame,
|
|
340
|
+
...p.props(N.frame, ge[t], N.placeholder),
|
|
341
341
|
children: /* @__PURE__ */ b("div", {
|
|
342
|
-
...p.props(N.viewport,
|
|
342
|
+
...p.props(N.viewport, I[t]),
|
|
343
343
|
children: /* @__PURE__ */ x("table", {
|
|
344
344
|
...p.props(N.table, N.fixed, N.minimumWidth(a, o)),
|
|
345
345
|
children: [
|
|
346
|
-
/* @__PURE__ */ b(
|
|
346
|
+
/* @__PURE__ */ b(ye, { columns: i }),
|
|
347
347
|
/* @__PURE__ */ b("thead", {
|
|
348
348
|
...p.props(r && l.hidden),
|
|
349
349
|
children: /* @__PURE__ */ b("tr", { children: i.map((e) => /* @__PURE__ */ b("th", {
|
|
@@ -359,10 +359,10 @@ function R({ columns: e, sizing: t = "content", rowSizing: n = "fixed", hideHead
|
|
|
359
359
|
"second",
|
|
360
360
|
"third"
|
|
361
361
|
].map((e) => /* @__PURE__ */ b("tr", {
|
|
362
|
-
className: "x1wtzb06 xso031l x1q0q8m5 x1qndepd x19k386i x1t1lzn6",
|
|
362
|
+
className: "x1n2onr6 xc8icb0 x1wtzb06 xso031l x1q0q8m5 x1qndepd x19k386i x1t1lzn6",
|
|
363
363
|
children: i.map((e) => /* @__PURE__ */ b("td", {
|
|
364
|
-
...p.props(N.cell,
|
|
365
|
-
children: /* @__PURE__ */ b(
|
|
364
|
+
...p.props(N.cell, he[n], F[e.role], e.width !== void 0 && N.width(e.width), e.isSecondary === !0 && N.secondary),
|
|
365
|
+
children: /* @__PURE__ */ b(U, {
|
|
366
366
|
role: e.role,
|
|
367
367
|
isFixed: n === "fixed",
|
|
368
368
|
shouldTruncate: void 0,
|
|
@@ -375,7 +375,7 @@ function R({ columns: e, sizing: t = "content", rowSizing: n = "fixed", hideHead
|
|
|
375
375
|
})
|
|
376
376
|
});
|
|
377
377
|
}
|
|
378
|
-
function
|
|
378
|
+
function B({ children: e, leading: t, isDecorative: n = !1 }) {
|
|
379
379
|
return /* @__PURE__ */ x("span", {
|
|
380
380
|
"aria-hidden": n || void 0,
|
|
381
381
|
inert: n || void 0,
|
|
@@ -390,8 +390,8 @@ function z({ children: e, leading: t, isDecorative: n = !1 }) {
|
|
|
390
390
|
})]
|
|
391
391
|
});
|
|
392
392
|
}
|
|
393
|
-
function
|
|
394
|
-
return /* @__PURE__ */ x(
|
|
393
|
+
function V({ children: e, secondary: t, leading: n, trailing: r }) {
|
|
394
|
+
return /* @__PURE__ */ x(B, {
|
|
395
395
|
leading: n,
|
|
396
396
|
children: [/* @__PURE__ */ x("span", {
|
|
397
397
|
className: "x78zum5 x6s0dn4 x1hnptsi xeuugli",
|
|
@@ -410,8 +410,8 @@ function B({ children: e, secondary: t, leading: n, trailing: r }) {
|
|
|
410
410
|
})]
|
|
411
411
|
});
|
|
412
412
|
}
|
|
413
|
-
function
|
|
414
|
-
return /* @__PURE__ */ x(
|
|
413
|
+
function H({ leading: e, isSecondary: t = !1 }) {
|
|
414
|
+
return /* @__PURE__ */ x(B, {
|
|
415
415
|
leading: e,
|
|
416
416
|
isDecorative: !0,
|
|
417
417
|
children: [/* @__PURE__ */ b("span", {
|
|
@@ -423,8 +423,8 @@ function V({ leading: e, isSecondary: t = !1 }) {
|
|
|
423
423
|
})]
|
|
424
424
|
});
|
|
425
425
|
}
|
|
426
|
-
function
|
|
427
|
-
let A = te(() =>
|
|
426
|
+
function be({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, onSortChange: s, selectedIds: c, onSelectionChange: d, selectionLabel: f, rowAction: m, activeRowId: y, focusRowId: S, hideCaption: C = !1, hideHeaders: w = !1, rowSizing: T = "fixed", window: E, endContent: D, onEndReached: O, footer: k }) {
|
|
427
|
+
let A = te(() => L(t), [t]), ue = ne(_e, ve, () => !1), j = te(() => {
|
|
428
428
|
let e = oe();
|
|
429
429
|
return e.columns(A.map((t) => e.display({
|
|
430
430
|
id: t.id,
|
|
@@ -435,27 +435,27 @@ function Se({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, o
|
|
|
435
435
|
columns: j,
|
|
436
436
|
data: e,
|
|
437
437
|
getRowId: n
|
|
438
|
-
}), P = _(null),
|
|
438
|
+
}), P = _(null), z = _(null), B = _(null), V = _(null), [H, be] = v(0), [W, G] = v(), K = _(void 0), q = _(void 0), J = e.findIndex((e) => n(e) === W), Y = A.findIndex((e) => e.role === "primary" && e.isSecondary !== !0), Se = Y === -1 ? A.findIndex((e) => e.isSecondary !== !0) : Y, X = typeof E?.height == "string" ? E.height : "content";
|
|
439
439
|
g(() => {
|
|
440
440
|
if (S === void 0) {
|
|
441
|
-
|
|
441
|
+
q.current = void 0;
|
|
442
442
|
return;
|
|
443
443
|
}
|
|
444
|
-
if (
|
|
444
|
+
if (q.current === S) return;
|
|
445
445
|
let e = P.current?.querySelector(`[data-row-id="${CSS.escape(S)}"] [data-row-action]`);
|
|
446
446
|
if (e == null) return;
|
|
447
447
|
let t = requestAnimationFrame(() => {
|
|
448
|
-
e.focus({ preventScroll: !0 }),
|
|
448
|
+
e.focus({ preventScroll: !0 }), q.current = S;
|
|
449
449
|
});
|
|
450
450
|
return () => cancelAnimationFrame(t);
|
|
451
451
|
}, [e, S]), de({
|
|
452
|
-
end:
|
|
452
|
+
end: z,
|
|
453
453
|
onEndReached: E === void 0 ? O : void 0,
|
|
454
454
|
content: e.length
|
|
455
455
|
}), h(() => {
|
|
456
|
-
let e =
|
|
456
|
+
let e = B.current, t = V.current;
|
|
457
457
|
if (E === void 0 || e === null || t === null) return;
|
|
458
|
-
let n = new ResizeObserver(() =>
|
|
458
|
+
let n = new ResizeObserver(() => be(e.offsetHeight + t.offsetHeight));
|
|
459
459
|
return n.observe(e), n.observe(t), () => n.disconnect();
|
|
460
460
|
}, [
|
|
461
461
|
E,
|
|
@@ -472,19 +472,19 @@ function Se({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, o
|
|
|
472
472
|
return n(r);
|
|
473
473
|
},
|
|
474
474
|
estimateSize: () => T === "fixed" ? u.rowHeight : E?.estimatedRowHeight ?? u.rowHeight,
|
|
475
|
-
scrollMargin:
|
|
476
|
-
scrollPaddingStart:
|
|
475
|
+
scrollMargin: H,
|
|
476
|
+
scrollPaddingStart: H,
|
|
477
477
|
overscan: 6,
|
|
478
478
|
rangeExtractor: (t) => {
|
|
479
479
|
let n = ce(t);
|
|
480
|
-
return
|
|
480
|
+
return J === -1 ? n : [.../* @__PURE__ */ new Set([
|
|
481
481
|
...n,
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
482
|
+
J - 1,
|
|
483
|
+
J,
|
|
484
|
+
J + 1
|
|
485
485
|
])].filter((t) => t >= 0 && t < e.length).toSorted((e, t) => e - t);
|
|
486
486
|
}
|
|
487
|
-
}),
|
|
487
|
+
}), Ce = E === void 0 ? M.getRowModel().rows.map((e, t) => ({
|
|
488
488
|
row: e,
|
|
489
489
|
index: t,
|
|
490
490
|
spacerHeight: 0
|
|
@@ -493,7 +493,7 @@ function Se({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, o
|
|
|
493
493
|
return r === void 0 ? [] : [{
|
|
494
494
|
row: r,
|
|
495
495
|
index: e.index,
|
|
496
|
-
spacerHeight: e.start - (n[t - 1]?.end ??
|
|
496
|
+
spacerHeight: e.start - (n[t - 1]?.end ?? H)
|
|
497
497
|
}];
|
|
498
498
|
}), Q = E !== void 0 && (e.length === 0 || Z.range?.endIndex === e.length - 1);
|
|
499
499
|
h(() => {
|
|
@@ -503,43 +503,43 @@ function Se({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, o
|
|
|
503
503
|
O,
|
|
504
504
|
e.length
|
|
505
505
|
]), g(() => {
|
|
506
|
-
if (
|
|
507
|
-
let e = Array.from(P.current?.querySelectorAll("[data-row-id]") ?? []).find((e) => e.dataset.rowId ===
|
|
508
|
-
e != null && (e.focus({ preventScroll: E !== void 0 }),
|
|
506
|
+
if (K.current === void 0) return;
|
|
507
|
+
let e = Array.from(P.current?.querySelectorAll("[data-row-id]") ?? []).find((e) => e.dataset.rowId === K.current)?.querySelector("[data-row-action]");
|
|
508
|
+
e != null && (e.focus({ preventScroll: E !== void 0 }), K.current = void 0);
|
|
509
509
|
});
|
|
510
|
-
function
|
|
510
|
+
function we(t, r) {
|
|
511
511
|
let i = t.metaKey || t.ctrlKey, a = t.altKey || t.shiftKey;
|
|
512
512
|
if (i || a) return;
|
|
513
|
-
let o =
|
|
513
|
+
let o = me.get(t.key);
|
|
514
514
|
if (o === void 0) return;
|
|
515
515
|
t.preventDefault();
|
|
516
516
|
let s = r + o, c = e[s];
|
|
517
|
-
c !== void 0 && (
|
|
517
|
+
c !== void 0 && (K.current = n(c), G(K.current), E !== void 0 && Z.scrollToIndex(s, { align: "auto" }));
|
|
518
518
|
}
|
|
519
|
-
let $ = A.filter((e) => !ue || e.isSecondary !== !0).length + (c === void 0 ? 0 : 1),
|
|
519
|
+
let $ = A.filter((e) => !ue || e.isSecondary !== !0).length + (c === void 0 ? 0 : 1), Te = c === void 0 ? 0 : pe, Ee = k != null && typeof k != "boolean", { minimumWidth: De, compactWidth: Oe } = R(A, Te), ke = Z.getTotalSize() - (Z.getVirtualItems().at(-1)?.end ?? H) + H;
|
|
520
520
|
return /* @__PURE__ */ x("div", {
|
|
521
|
-
...p.props(N.frame,
|
|
521
|
+
...p.props(N.frame, ge[X]),
|
|
522
522
|
children: [/* @__PURE__ */ x("div", {
|
|
523
523
|
ref: P,
|
|
524
524
|
role: "region",
|
|
525
525
|
"aria-label": r,
|
|
526
526
|
tabIndex: 0,
|
|
527
|
-
...p.props(N.viewport,
|
|
527
|
+
...p.props(N.viewport, I[X], typeof E?.height == "number" && N.virtual(E.height)),
|
|
528
528
|
children: [/* @__PURE__ */ x("table", {
|
|
529
529
|
"aria-rowcount": E === void 0 ? void 0 : Math.max(1, e.length) + 1,
|
|
530
|
-
...p.props(N.table, N.fixed, N.minimumWidth(
|
|
530
|
+
...p.props(N.table, N.fixed, N.minimumWidth(De, Oe)),
|
|
531
531
|
children: [
|
|
532
532
|
/* @__PURE__ */ b("caption", {
|
|
533
|
-
ref:
|
|
533
|
+
ref: B,
|
|
534
534
|
...p.props(N.caption, C && l.hidden),
|
|
535
535
|
children: r
|
|
536
536
|
}),
|
|
537
|
-
/* @__PURE__ */ b(
|
|
537
|
+
/* @__PURE__ */ b(ye, {
|
|
538
538
|
columns: A,
|
|
539
539
|
canSelect: c !== void 0
|
|
540
540
|
}),
|
|
541
541
|
/* @__PURE__ */ b("thead", {
|
|
542
|
-
ref:
|
|
542
|
+
ref: V,
|
|
543
543
|
...p.props(w && l.hidden),
|
|
544
544
|
children: /* @__PURE__ */ x("tr", { children: [c !== void 0 && /* @__PURE__ */ b("th", {
|
|
545
545
|
scope: "col",
|
|
@@ -584,10 +584,10 @@ function Se({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, o
|
|
|
584
584
|
}),
|
|
585
585
|
/* @__PURE__ */ x("tbody", {
|
|
586
586
|
onBlur: (e) => {
|
|
587
|
-
e.currentTarget.contains(e.relatedTarget) ||
|
|
587
|
+
e.currentTarget.contains(e.relatedTarget) || G(void 0);
|
|
588
588
|
},
|
|
589
589
|
children: [
|
|
590
|
-
|
|
590
|
+
Ce.map(({ row: e, index: t, spacerHeight: n }) => /* @__PURE__ */ x(ee, { children: [n > 0 && /* @__PURE__ */ b("tr", {
|
|
591
591
|
"aria-hidden": "true",
|
|
592
592
|
children: /* @__PURE__ */ b("td", {
|
|
593
593
|
colSpan: $,
|
|
@@ -598,20 +598,15 @@ function Se({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, o
|
|
|
598
598
|
"data-row-id": e.id,
|
|
599
599
|
"aria-rowindex": E === void 0 ? void 0 : t + 2,
|
|
600
600
|
ref: E === void 0 || T === "fixed" ? void 0 : Z.measureElement,
|
|
601
|
-
onFocus: () =>
|
|
602
|
-
onClick: (e) => {
|
|
603
|
-
if (m === void 0 || !U(e) || e.target instanceof Element && e.target.closest(me) !== null) return;
|
|
604
|
-
let t = e.currentTarget.querySelector("[data-row-action]");
|
|
605
|
-
t?.focus({ preventScroll: !0 }), t?.click();
|
|
606
|
-
},
|
|
601
|
+
onFocus: () => G(e.id),
|
|
607
602
|
...{
|
|
608
|
-
0: { className: "x1wtzb06 xso031l x1q0q8m5 x1qndepd x19k386i x1t1lzn6" },
|
|
609
|
-
2: { className: "x1wtzb06 xso031l x1q0q8m5 x1qndepd x19k386i x1t1lzn6 x1ypdohk x1ecmtor" },
|
|
610
|
-
1: { className: "x1wtzb06 xso031l x1q0q8m5 x1qndepd x19k386i x1t1lzn6 x1r8u7ye" },
|
|
611
|
-
3: { className: "x1wtzb06 xso031l x1q0q8m5 x1qndepd x19k386i x1t1lzn6 x1ypdohk x1ecmtor x1r8u7ye" }
|
|
603
|
+
0: { className: "x1n2onr6 xc8icb0 x1wtzb06 xso031l x1q0q8m5 x1qndepd x19k386i x1t1lzn6" },
|
|
604
|
+
2: { className: "x1n2onr6 xc8icb0 x1wtzb06 xso031l x1q0q8m5 x1qndepd x19k386i x1t1lzn6 x1ypdohk x1ecmtor" },
|
|
605
|
+
1: { className: "x1n2onr6 xc8icb0 x1wtzb06 xso031l x1q0q8m5 x1qndepd x19k386i x1t1lzn6 x1r8u7ye" },
|
|
606
|
+
3: { className: "x1n2onr6 xc8icb0 x1wtzb06 xso031l x1q0q8m5 x1qndepd x19k386i x1t1lzn6 x1ypdohk x1ecmtor x1r8u7ye" }
|
|
612
607
|
}[(m !== void 0) << 1 | (c?.has(e.id) === !0 || y === e.id)],
|
|
613
608
|
children: [c !== void 0 && /* @__PURE__ */ b("td", {
|
|
614
|
-
className: "x9f619 xt970qd xxymvpz xj0a0fe x1d7z9mz xeuugli x1dc62k6",
|
|
609
|
+
className: "x9f619 xt970qd xxymvpz xj0a0fe x1d7z9mz xeuugli x1dc62k6 x1n2onr6 x1vjfegm",
|
|
615
610
|
children: /* @__PURE__ */ b(a.Root, {
|
|
616
611
|
"aria-label": f(e.original),
|
|
617
612
|
checked: c.has(e.id),
|
|
@@ -622,19 +617,19 @@ function Se({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, o
|
|
|
622
617
|
children: /* @__PURE__ */ b(a.Indicator, {})
|
|
623
618
|
})
|
|
624
619
|
}), A.map((n, r) => /* @__PURE__ */ b("td", {
|
|
625
|
-
...p.props(N.cell,
|
|
626
|
-
children: m !== void 0 && r ===
|
|
620
|
+
...p.props(N.cell, he[T], F[n.role], n.width !== void 0 && N.width(n.width), n.isSecondary === !0 && N.secondary),
|
|
621
|
+
children: m !== void 0 && r === Se ? /* @__PURE__ */ b(xe, {
|
|
627
622
|
row: e.original,
|
|
628
623
|
action: m,
|
|
629
624
|
isActive: y === e.id,
|
|
630
|
-
onKeyDown: (e) =>
|
|
631
|
-
children: /* @__PURE__ */ b(
|
|
625
|
+
onKeyDown: (e) => we(e, t),
|
|
626
|
+
children: /* @__PURE__ */ b(U, {
|
|
632
627
|
role: n.role,
|
|
633
628
|
isFixed: T === "fixed",
|
|
634
629
|
shouldTruncate: n.shouldTruncate,
|
|
635
630
|
children: n.cell(e.original)
|
|
636
631
|
})
|
|
637
|
-
}) : /* @__PURE__ */ b(
|
|
632
|
+
}) : /* @__PURE__ */ b(U, {
|
|
638
633
|
role: n.role,
|
|
639
634
|
isFixed: T === "fixed",
|
|
640
635
|
shouldTruncate: n.shouldTruncate,
|
|
@@ -642,11 +637,11 @@ function Se({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, o
|
|
|
642
637
|
})
|
|
643
638
|
}, n.id))]
|
|
644
639
|
})] }, e.id)),
|
|
645
|
-
E !== void 0 &&
|
|
640
|
+
E !== void 0 && ke > 0 && /* @__PURE__ */ b("tr", {
|
|
646
641
|
"aria-hidden": "true",
|
|
647
642
|
children: /* @__PURE__ */ b("td", {
|
|
648
643
|
colSpan: $,
|
|
649
|
-
...p.props(N.spacer(
|
|
644
|
+
...p.props(N.spacer(ke))
|
|
650
645
|
})
|
|
651
646
|
}),
|
|
652
647
|
e.length === 0 && /* @__PURE__ */ b("tr", { children: /* @__PURE__ */ b("td", {
|
|
@@ -658,20 +653,20 @@ function Se({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, o
|
|
|
658
653
|
})
|
|
659
654
|
]
|
|
660
655
|
}), /* @__PURE__ */ b("div", {
|
|
661
|
-
ref:
|
|
656
|
+
ref: z,
|
|
662
657
|
...{
|
|
663
658
|
0: {},
|
|
664
659
|
1: { className: "xid9utz xg7ukam x153jb6y xy8obcc xas2l8k x15x95ik x1az1eml" }
|
|
665
660
|
}[D !== void 0 | 0],
|
|
666
661
|
children: D
|
|
667
662
|
})]
|
|
668
|
-
}),
|
|
663
|
+
}), Ee && /* @__PURE__ */ b("div", {
|
|
669
664
|
className: "xg7ukam x178xt8z x13fuv20 xhjagg4",
|
|
670
665
|
children: k
|
|
671
666
|
})]
|
|
672
667
|
});
|
|
673
668
|
}
|
|
674
|
-
function
|
|
669
|
+
function U({ role: e, isFixed: t, shouldTruncate: n, children: r }) {
|
|
675
670
|
let i = P[e], a = t && i.shouldTruncate, o = typeof r == "string" && (n ?? a);
|
|
676
671
|
return /* @__PURE__ */ b("span", {
|
|
677
672
|
...{
|
|
@@ -681,25 +676,25 @@ function H({ role: e, isFixed: t, shouldTruncate: n, children: r }) {
|
|
|
681
676
|
children: /* @__PURE__ */ b("span", {
|
|
682
677
|
title: typeof r == "string" ? r : void 0,
|
|
683
678
|
...{
|
|
684
|
-
0: { className: "x1lliihq xeuugli xh8yej3 x193iq5w" },
|
|
685
|
-
4: { className: "x1lliihq xeuugli xh8yej3 x193iq5w x1l6neo7" },
|
|
686
|
-
2: { className: "x1lliihq xeuugli xh8yej3 x193iq5w xuxw1ft" },
|
|
687
|
-
6: { className: "x1lliihq xeuugli xh8yej3 x193iq5w x1l6neo7 xuxw1ft" },
|
|
688
|
-
1: { className: "x1lliihq xeuugli xh8yej3 x193iq5w xb3r6kr xuxw1ft xlyipyv" },
|
|
689
|
-
5: { className: "x1lliihq xeuugli xh8yej3 x193iq5w x1l6neo7 xb3r6kr xuxw1ft xlyipyv" },
|
|
690
|
-
3: { className: "x1lliihq xeuugli xh8yej3 x193iq5w xb3r6kr xuxw1ft xlyipyv" },
|
|
691
|
-
7: { className: "x1lliihq xeuugli xh8yej3 x193iq5w x1l6neo7 xb3r6kr xuxw1ft xlyipyv" }
|
|
679
|
+
0: { className: "x1lliihq xeuugli xh8yej3 x193iq5w xkfz77 x1ljc890" },
|
|
680
|
+
4: { className: "x1lliihq xeuugli xh8yej3 x193iq5w xkfz77 x1ljc890 x1l6neo7" },
|
|
681
|
+
2: { className: "x1lliihq xeuugli xh8yej3 x193iq5w xkfz77 x1ljc890 xuxw1ft" },
|
|
682
|
+
6: { className: "x1lliihq xeuugli xh8yej3 x193iq5w xkfz77 x1ljc890 x1l6neo7 xuxw1ft" },
|
|
683
|
+
1: { className: "x1lliihq xeuugli xh8yej3 x193iq5w xkfz77 x1ljc890 xb3r6kr xuxw1ft xlyipyv" },
|
|
684
|
+
5: { className: "x1lliihq xeuugli xh8yej3 x193iq5w xkfz77 x1ljc890 x1l6neo7 xb3r6kr xuxw1ft xlyipyv" },
|
|
685
|
+
3: { className: "x1lliihq xeuugli xh8yej3 x193iq5w xkfz77 x1ljc890 xb3r6kr xuxw1ft xlyipyv" },
|
|
686
|
+
7: { className: "x1lliihq xeuugli xh8yej3 x193iq5w xkfz77 x1ljc890 x1l6neo7 xb3r6kr xuxw1ft xlyipyv" }
|
|
692
687
|
}[!!t << 2 | !(!t || i.shouldTruncate) << 1 | !!o],
|
|
693
688
|
children: r
|
|
694
689
|
})
|
|
695
690
|
});
|
|
696
691
|
}
|
|
697
|
-
function
|
|
692
|
+
function W(e) {
|
|
698
693
|
if (e.defaultPrevented || e.button !== 0) return !1;
|
|
699
694
|
let t = e.metaKey || e.ctrlKey, n = e.altKey || e.shiftKey;
|
|
700
695
|
return t || n ? !1 : e.detail === 0 || e.currentTarget.ownerDocument.getSelection()?.isCollapsed !== !1;
|
|
701
696
|
}
|
|
702
|
-
function
|
|
697
|
+
function xe({ row: e, action: t, isActive: n, children: r, onKeyDown: i }) {
|
|
703
698
|
let a = t.label?.(e), o = t.href === void 0 ? /* @__PURE__ */ b("button", {
|
|
704
699
|
type: "button",
|
|
705
700
|
"aria-label": a,
|
|
@@ -707,9 +702,9 @@ function Ce({ row: e, action: t, isActive: n, children: r, onKeyDown: i }) {
|
|
|
707
702
|
"data-row-action": !0,
|
|
708
703
|
onKeyDown: i,
|
|
709
704
|
onClick: (n) => {
|
|
710
|
-
|
|
705
|
+
W(n) && t.onActivate(e);
|
|
711
706
|
},
|
|
712
|
-
className: "x1rh3ycu x1hx0egp x78zum5 x6s0dn4 xh8yej3 xeuugli x17tes2r x17oiadl x1717udv xc342km x1ok0vyi x1heor9g xjbqb8w xjb2p0i x1qlqyl8 x1pd3egz x15bjb6t x16tdsg8 x1hl2dhg x1ypdohk
|
|
707
|
+
className: "x1rh3ycu x1hx0egp x78zum5 x6s0dn4 xh8yej3 xeuugli x17tes2r x17oiadl x1717udv xc342km x1ok0vyi x1heor9g xjbqb8w xjb2p0i x1qlqyl8 x1pd3egz x15bjb6t x16tdsg8 x1hl2dhg x1ypdohk x1t137rt x1s928wv x1j6awrg xarstr8 x11q50lq xa2q2qx x1x5eltu x1jdy9wv",
|
|
713
708
|
children: r
|
|
714
709
|
}) : /* @__PURE__ */ b("a", {
|
|
715
710
|
href: t.href(e),
|
|
@@ -717,9 +712,9 @@ function Ce({ row: e, action: t, isActive: n, children: r, onKeyDown: i }) {
|
|
|
717
712
|
"data-row-action": !0,
|
|
718
713
|
onKeyDown: i,
|
|
719
714
|
onClick: (n) => {
|
|
720
|
-
t.onActivate !== void 0 &&
|
|
715
|
+
t.onActivate !== void 0 && W(n) && (n.preventDefault(), t.onActivate(e));
|
|
721
716
|
},
|
|
722
|
-
className: "x1rh3ycu x1hx0egp x78zum5 x6s0dn4 xh8yej3 xeuugli x17tes2r x17oiadl x1717udv xc342km x1ok0vyi x1heor9g xjbqb8w xjb2p0i x1qlqyl8 x1pd3egz x15bjb6t x16tdsg8 x1hl2dhg x1ypdohk
|
|
717
|
+
className: "x1rh3ycu x1hx0egp x78zum5 x6s0dn4 xh8yej3 xeuugli x17tes2r x17oiadl x1717udv xc342km x1ok0vyi x1heor9g xjbqb8w xjb2p0i x1qlqyl8 x1pd3egz x15bjb6t x16tdsg8 x1hl2dhg x1ypdohk x1t137rt x1s928wv x1j6awrg xarstr8 x11q50lq xa2q2qx x1x5eltu x1jdy9wv",
|
|
723
718
|
children: r
|
|
724
719
|
});
|
|
725
720
|
return a === void 0 ? o : /* @__PURE__ */ x(s.Root, { children: [/* @__PURE__ */ b(s.Trigger, { render: o }), /* @__PURE__ */ b(s.Portal, { children: /* @__PURE__ */ b(s.Positioner, {
|
|
@@ -729,7 +724,7 @@ function Ce({ row: e, action: t, isActive: n, children: r, onKeyDown: i }) {
|
|
|
729
724
|
}) })] });
|
|
730
725
|
}
|
|
731
726
|
// packages/collections/src/collection-scroll.tsx
|
|
732
|
-
function
|
|
727
|
+
function G(r) {
|
|
733
728
|
switch (r.status) {
|
|
734
729
|
case "loading": return /* @__PURE__ */ b(t, {
|
|
735
730
|
role: "status",
|
|
@@ -759,7 +754,7 @@ function we(r) {
|
|
|
759
754
|
});
|
|
760
755
|
}
|
|
761
756
|
}
|
|
762
|
-
function
|
|
757
|
+
function K({ children: e, endContent: t, onEndReached: n, shouldFill: r = !1, endPosition: i = "end", label: a = "Collection" }) {
|
|
763
758
|
let o = _(null), s = _(null);
|
|
764
759
|
de({
|
|
765
760
|
end: s,
|
|
@@ -792,11 +787,11 @@ function W({ children: e, endContent: t, onEndReached: n, shouldFill: r = !1, en
|
|
|
792
787
|
});
|
|
793
788
|
}
|
|
794
789
|
// packages/collections/src/inspector.tsx
|
|
795
|
-
var
|
|
796
|
-
function
|
|
790
|
+
var q = 860;
|
|
791
|
+
function J({ master: t, detail: n, label: r, masterLabel: i, revealKey: a, returnFocusRef: o, ...s }) {
|
|
797
792
|
let c = _(null), l = _(null), u = _(null);
|
|
798
793
|
g(() => {
|
|
799
|
-
a !== void 0 && c.current !== null && u.current !== null && c.current.clientWidth <=
|
|
794
|
+
a !== void 0 && c.current !== null && u.current !== null && c.current.clientWidth <= q && (u.current.focus({ preventScroll: !0 }), u.current.scrollIntoView({
|
|
800
795
|
block: "start",
|
|
801
796
|
behavior: "instant"
|
|
802
797
|
}));
|
|
@@ -837,7 +832,7 @@ function K({ master: t, detail: n, label: r, masterLabel: i, revealKey: a, retur
|
|
|
837
832
|
})
|
|
838
833
|
});
|
|
839
834
|
}
|
|
840
|
-
function
|
|
835
|
+
function Y({ items: e, ...t }) {
|
|
841
836
|
return /* @__PURE__ */ b("dl", {
|
|
842
837
|
...f({ className: "x1ghz6dp xrvj5dj xezdspq x1i3977y xuytk5h x1hz01jw xvmahel xtqrqnz x1778rvt" }, t),
|
|
843
838
|
children: e.map(({ label: e, value: t }) => /* @__PURE__ */ x("div", {
|
|
@@ -853,7 +848,7 @@ function q({ items: e, ...t }) {
|
|
|
853
848
|
});
|
|
854
849
|
}
|
|
855
850
|
// packages/collections/src/list-footer.tsx
|
|
856
|
-
function
|
|
851
|
+
function Se({ children: e, actions: t, ...n }) {
|
|
857
852
|
return /* @__PURE__ */ x("div", {
|
|
858
853
|
...f({ className: "x78zum5 x6s0dn4 x1qughib x1a02dak xeuugli x1n8ia3y x1qokhjc x1m92p3w x178xt8z x13fuv20 xhjagg4 x153jb6y x1hz01jw xvmahel xtqrqnz x1778rvt" }, n),
|
|
859
854
|
children: [/* @__PURE__ */ b("div", {
|
|
@@ -866,7 +861,7 @@ function J({ children: e, actions: t, ...n }) {
|
|
|
866
861
|
});
|
|
867
862
|
}
|
|
868
863
|
// packages/collections/src/metrics.tsx
|
|
869
|
-
var
|
|
864
|
+
var X = {
|
|
870
865
|
grid: {
|
|
871
866
|
k1xSpc: "x78zum5",
|
|
872
867
|
kwnvtZ: "x1a02dak",
|
|
@@ -884,14 +879,14 @@ var Y = {
|
|
|
884
879
|
kogj98: "x1ghz6dp",
|
|
885
880
|
$$css: !0
|
|
886
881
|
}
|
|
887
|
-
},
|
|
888
|
-
inline:
|
|
889
|
-
columns:
|
|
882
|
+
}, Z = {
|
|
883
|
+
inline: X.grid,
|
|
884
|
+
columns: X.columns
|
|
890
885
|
};
|
|
891
|
-
function
|
|
892
|
-
return /* @__PURE__ */ b("dl", { ...f(p.props(
|
|
886
|
+
function Ce({ layout: e = "inline", ...t }) {
|
|
887
|
+
return /* @__PURE__ */ b("dl", { ...f(p.props(Z[e]), t) });
|
|
893
888
|
}
|
|
894
|
-
function
|
|
889
|
+
function Q({ label: e, value: t, ...n }) {
|
|
895
890
|
return /* @__PURE__ */ x("div", {
|
|
896
891
|
...f({ className: "x3nfvp2 x1pha0wt x1a02dak xunmzkg xeuugli x1hz01jw xvmahel xtqrqnz x1778rvt" }, n),
|
|
897
892
|
children: [/* @__PURE__ */ b("dt", {
|
|
@@ -904,7 +899,7 @@ function Te({ label: e, value: t, ...n }) {
|
|
|
904
899
|
});
|
|
905
900
|
}
|
|
906
901
|
// packages/collections/src/timestamp.tsx
|
|
907
|
-
function
|
|
902
|
+
function we({ dateTime: e, label: t, title: n }) {
|
|
908
903
|
return n === void 0 ? /* @__PURE__ */ b("time", {
|
|
909
904
|
dateTime: e,
|
|
910
905
|
className: "x1hz01jw xy8obcc xas2l8k x153jb6y xss6m8b xj0a0fe x13qnu6 x9v5kkp x19rmrnh x7s97pk",
|
|
@@ -920,14 +915,14 @@ function Q({ dateTime: e, label: t, title: n }) {
|
|
|
920
915
|
}), /* @__PURE__ */ b(s.Portal, { children: /* @__PURE__ */ b(s.Positioner, { children: /* @__PURE__ */ b(s.Popup, { children: n }) }) })] });
|
|
921
916
|
}
|
|
922
917
|
// packages/collections/src/timeline.tsx
|
|
923
|
-
function
|
|
918
|
+
function $({ label: e, children: t }) {
|
|
924
919
|
return /* @__PURE__ */ b("ol", {
|
|
925
920
|
"aria-label": e,
|
|
926
921
|
className: "xe8uvvx x1ghz6dp x1717udv xeuugli",
|
|
927
922
|
children: t
|
|
928
923
|
});
|
|
929
924
|
}
|
|
930
|
-
function
|
|
925
|
+
function Te({ icon: e, title: t, time: n, metadata: i, children: a, details: o, defaultOpen: s = !1 }) {
|
|
931
926
|
let [c, l] = v(s), u = /* @__PURE__ */ x("div", {
|
|
932
927
|
className: "x78zum5 x1pha0wt x1hnptsi x1a02dak xeuugli",
|
|
933
928
|
children: [/* @__PURE__ */ b("div", {
|
|
@@ -969,8 +964,8 @@ function $({ icon: e, title: t, time: n, metadata: i, children: a, details: o, d
|
|
|
969
964
|
})]
|
|
970
965
|
});
|
|
971
966
|
}
|
|
972
|
-
var
|
|
973
|
-
Root:
|
|
974
|
-
Item:
|
|
967
|
+
var Ee = {
|
|
968
|
+
Root: $,
|
|
969
|
+
Item: Te
|
|
975
970
|
};
|
|
976
|
-
export {
|
|
971
|
+
export { G as CollectionEnd, ue as CollectionPagination, K as CollectionScroll, O as CollectionToolbar, be as DataTable, z as DataTablePlaceholder, V as DataTableText, H as DataTableTextPlaceholder, Y as Details, A as DisplayOptions, k as FilterChips, J as Inspector, Se as ListFooter, Q as Metric, Ce as MetricGrid, Ee as Timeline, we as Timestamp };
|
package/dist/content/markdown.js
CHANGED
|
@@ -14,6 +14,17 @@ var h = /* @__PURE__ */ new Set(["href", "src"]), g = {
|
|
|
14
14
|
if (h.has(n)) return t(e);
|
|
15
15
|
}
|
|
16
16
|
}, _ = {
|
|
17
|
+
root: {
|
|
18
|
+
k7Eaqz: "xeuugli",
|
|
19
|
+
kMwMTN: "xbixft",
|
|
20
|
+
kMv6JI: "x1hz01jw",
|
|
21
|
+
khiITx: "xvmahel",
|
|
22
|
+
kGuDYH: "xtqrqnz",
|
|
23
|
+
kLWn49: "x1ytb0s6",
|
|
24
|
+
k63SB2: "xj57cvi",
|
|
25
|
+
kHjlTd: "xj0a0fe",
|
|
26
|
+
$$css: !0
|
|
27
|
+
},
|
|
17
28
|
block: {
|
|
18
29
|
keoZOQ: "xyrmp21 x14l7nz5",
|
|
19
30
|
k1K539: "x1jfksii xzboxd6",
|
|
@@ -49,14 +60,28 @@ var h = /* @__PURE__ */ new Set(["href", "src"]), g = {
|
|
|
49
60
|
ksu8eU: "x1y0btm7",
|
|
50
61
|
kVAM5u: "x1ey3b81",
|
|
51
62
|
$$css: !0
|
|
63
|
+
},
|
|
64
|
+
strong: {
|
|
65
|
+
k63SB2: "x1b5ytql",
|
|
66
|
+
$$css: !0
|
|
67
|
+
},
|
|
68
|
+
muted: {
|
|
69
|
+
kMwMTN: "x153jb6y",
|
|
70
|
+
$$css: !0
|
|
52
71
|
}
|
|
53
|
-
}, v =
|
|
54
|
-
|
|
55
|
-
|
|
72
|
+
}, v = {
|
|
73
|
+
default: null,
|
|
74
|
+
muted: _.muted
|
|
75
|
+
}, y = {
|
|
76
|
+
regular: null,
|
|
77
|
+
strong: _.strong
|
|
78
|
+
}, b = /* @__PURE__ */ new Set(["string", "number"]);
|
|
79
|
+
function x(e) {
|
|
80
|
+
return b.has(typeof e);
|
|
56
81
|
}
|
|
57
|
-
function
|
|
82
|
+
function S({ children: t, className: n }) {
|
|
58
83
|
let r = m(), i = typeof n == "string" ? /(?:^|\s)language-([^\s]+)/u.exec(n) : null, o = i === null ? void 0 : i[1], s = a.toArray(t);
|
|
59
|
-
return s.every(
|
|
84
|
+
return s.every(x) ? /* @__PURE__ */ c("div", {
|
|
60
85
|
className: "xyrmp21 x14l7nz5 x1jfksii xzboxd6",
|
|
61
86
|
children: /* @__PURE__ */ c(e, {
|
|
62
87
|
code: s.join(""),
|
|
@@ -68,14 +93,14 @@ function b({ children: t, className: n }) {
|
|
|
68
93
|
children: t
|
|
69
94
|
});
|
|
70
95
|
}
|
|
71
|
-
function
|
|
96
|
+
function C({ level: e, headingLevel: t, children: n, id: r }) {
|
|
72
97
|
let a = `h${Math.min(e + t - 1, 6)}`, s = e === 1 ? _.title : e === 2 ? _.section : _.minor;
|
|
73
98
|
return o(a, {
|
|
74
99
|
id: r,
|
|
75
100
|
...i.props(_.heading, s)
|
|
76
101
|
}, n);
|
|
77
102
|
}
|
|
78
|
-
var
|
|
103
|
+
var w = {
|
|
79
104
|
p: ({ children: e }) => /* @__PURE__ */ c("p", {
|
|
80
105
|
className: "xyrmp21 x14l7nz5 x1jfksii xzboxd6",
|
|
81
106
|
children: e
|
|
@@ -97,7 +122,7 @@ var S = {
|
|
|
97
122
|
className: "xyrmp21 x14l7nz5 x1jfksii xzboxd6 xrxpjvj x1umj4g3 xyumdvf x1t7ytsu x97x49r x153jb6y",
|
|
98
123
|
children: e
|
|
99
124
|
}),
|
|
100
|
-
code: ({ children: e, className: t }) => /* @__PURE__ */ c(
|
|
125
|
+
code: ({ children: e, className: t }) => /* @__PURE__ */ c(S, {
|
|
101
126
|
className: t,
|
|
102
127
|
children: e
|
|
103
128
|
}),
|
|
@@ -157,35 +182,35 @@ var S = {
|
|
|
157
182
|
className: "x5lhwog",
|
|
158
183
|
children: e
|
|
159
184
|
})
|
|
160
|
-
},
|
|
161
|
-
function
|
|
162
|
-
let
|
|
163
|
-
h1: (e) => /* @__PURE__ */ c(
|
|
185
|
+
}, T = /* @__PURE__ */ "p.h1.h2.h3.h4.h5.h6.ul.ol.li.blockquote.pre.code.a.img.table.thead.tbody.tr.th.td.input.hr.strong.em.del.br.sup.sub.section".split(".");
|
|
186
|
+
function E({ children: e, isStreaming: t = !1, label: n, headingLevel: r = 1, tone: a = "default", weight: o = "regular" }) {
|
|
187
|
+
let s = {
|
|
188
|
+
h1: (e) => /* @__PURE__ */ c(C, {
|
|
164
189
|
...e,
|
|
165
190
|
level: 1,
|
|
166
191
|
headingLevel: r
|
|
167
192
|
}),
|
|
168
|
-
h2: (e) => /* @__PURE__ */ c(
|
|
193
|
+
h2: (e) => /* @__PURE__ */ c(C, {
|
|
169
194
|
...e,
|
|
170
195
|
level: 2,
|
|
171
196
|
headingLevel: r
|
|
172
197
|
}),
|
|
173
|
-
h3: (e) => /* @__PURE__ */ c(
|
|
198
|
+
h3: (e) => /* @__PURE__ */ c(C, {
|
|
174
199
|
...e,
|
|
175
200
|
level: 3,
|
|
176
201
|
headingLevel: r
|
|
177
202
|
}),
|
|
178
|
-
h4: (e) => /* @__PURE__ */ c(
|
|
203
|
+
h4: (e) => /* @__PURE__ */ c(C, {
|
|
179
204
|
...e,
|
|
180
205
|
level: 4,
|
|
181
206
|
headingLevel: r
|
|
182
207
|
}),
|
|
183
|
-
h5: (e) => /* @__PURE__ */ c(
|
|
208
|
+
h5: (e) => /* @__PURE__ */ c(C, {
|
|
184
209
|
...e,
|
|
185
210
|
level: 5,
|
|
186
211
|
headingLevel: r
|
|
187
212
|
}),
|
|
188
|
-
h6: (e) => /* @__PURE__ */ c(
|
|
213
|
+
h6: (e) => /* @__PURE__ */ c(C, {
|
|
189
214
|
...e,
|
|
190
215
|
level: 6,
|
|
191
216
|
headingLevel: r
|
|
@@ -193,48 +218,48 @@ function w({ children: e, isStreaming: t = !1, label: n, headingLevel: r = 1 })
|
|
|
193
218
|
};
|
|
194
219
|
return /* @__PURE__ */ c(d, {
|
|
195
220
|
...g,
|
|
196
|
-
|
|
221
|
+
...i.props(_.root, v[a], y[o]),
|
|
197
222
|
"aria-label": n,
|
|
198
223
|
components: {
|
|
199
|
-
...
|
|
200
|
-
...
|
|
224
|
+
...w,
|
|
225
|
+
...s
|
|
201
226
|
},
|
|
202
227
|
mode: t ? "streaming" : "static",
|
|
203
228
|
isAnimating: t,
|
|
204
229
|
animated: !1,
|
|
205
230
|
controls: !1,
|
|
206
231
|
linkSafety: { enabled: !1 },
|
|
207
|
-
allowedElements:
|
|
232
|
+
allowedElements: T,
|
|
208
233
|
children: e
|
|
209
234
|
}, r);
|
|
210
235
|
}
|
|
211
236
|
// packages/content/src/markdown/markdown-preview.tsx
|
|
212
|
-
function
|
|
237
|
+
function D({ children: e }) {
|
|
213
238
|
return /* @__PURE__ */ l(s, { children: [e, " "] });
|
|
214
239
|
}
|
|
215
|
-
var
|
|
216
|
-
p:
|
|
217
|
-
li:
|
|
218
|
-
h1:
|
|
219
|
-
h2:
|
|
220
|
-
h3:
|
|
221
|
-
h4:
|
|
222
|
-
h5:
|
|
223
|
-
h6:
|
|
224
|
-
blockquote:
|
|
225
|
-
pre:
|
|
240
|
+
var O = {
|
|
241
|
+
p: D,
|
|
242
|
+
li: D,
|
|
243
|
+
h1: D,
|
|
244
|
+
h2: D,
|
|
245
|
+
h3: D,
|
|
246
|
+
h4: D,
|
|
247
|
+
h5: D,
|
|
248
|
+
h6: D,
|
|
249
|
+
blockquote: D,
|
|
250
|
+
pre: D,
|
|
226
251
|
code: ({ children: e }) => /* @__PURE__ */ c(s, { children: e }),
|
|
227
|
-
th:
|
|
228
|
-
td:
|
|
252
|
+
th: D,
|
|
253
|
+
td: D,
|
|
229
254
|
br: () => /* @__PURE__ */ c(s, { children: " " }),
|
|
230
255
|
img: ({ alt: e }) => /* @__PURE__ */ c(s, { children: e })
|
|
231
256
|
};
|
|
232
|
-
function
|
|
257
|
+
function k({ children: e }) {
|
|
233
258
|
return /* @__PURE__ */ c(u, {
|
|
234
259
|
...g,
|
|
235
260
|
content: e,
|
|
236
|
-
components:
|
|
237
|
-
allowedElements: Object.keys(
|
|
261
|
+
components: O,
|
|
262
|
+
allowedElements: Object.keys(O),
|
|
238
263
|
unwrapDisallowed: !0,
|
|
239
264
|
shouldParseIncompleteMarkdown: !1,
|
|
240
265
|
shouldNormalizeHtmlIndentation: !1,
|
|
@@ -242,4 +267,4 @@ function D({ children: e }) {
|
|
|
242
267
|
index: 0
|
|
243
268
|
});
|
|
244
269
|
}
|
|
245
|
-
export {
|
|
270
|
+
export { E as Markdown, k as MarkdownPreview };
|
package/dist/content.js
CHANGED
|
@@ -3,38 +3,38 @@ import { t as i } from "./viewer-styles-CpHqp5Qv.js";
|
|
|
3
3
|
import { t as a } from "./code-block-DB42-a0M.js";
|
|
4
4
|
import { t as o } from "./content-link-rdxJ94P8.js";
|
|
5
5
|
import * as s from "@stylexjs/stylex";
|
|
6
|
-
import { useCallback as c, useEffect as l,
|
|
7
|
-
import { jsx as
|
|
8
|
-
import { Check as
|
|
9
|
-
import
|
|
6
|
+
import { useCallback as c, useEffect as l, useLayoutEffect as u, useRef as d, useState as f } from "react";
|
|
7
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
8
|
+
import { Check as h, Circle as g, CircleDashed as _, CircleHelp as v, Clock as y, X as b } from "lucide-react";
|
|
9
|
+
import x from "strip-ansi";
|
|
10
10
|
// packages/content/src/json-viewer.tsx
|
|
11
|
-
var
|
|
11
|
+
var S = { body: {
|
|
12
12
|
kmVPX3: "x1mvvolr",
|
|
13
13
|
kVQacm: "xysyzu8",
|
|
14
14
|
kskxy: "x1phlbz0",
|
|
15
15
|
kMv6JI: "xiard35",
|
|
16
16
|
kGuDYH: "xy8obcc",
|
|
17
17
|
$$css: !0
|
|
18
|
-
} },
|
|
19
|
-
function
|
|
20
|
-
let [o, s] =
|
|
18
|
+
} }, C = 500;
|
|
19
|
+
function w({ value: e, name: t, path: n, depth: r, maxDepth: i, maxEntries: a }) {
|
|
20
|
+
let [o, s] = f(r === 0);
|
|
21
21
|
if (typeof e != "object" || !e) {
|
|
22
|
-
let n = JSON.stringify(e), r = n.length >
|
|
23
|
-
return /* @__PURE__ */
|
|
22
|
+
let n = JSON.stringify(e), r = n.length > C;
|
|
23
|
+
return /* @__PURE__ */ m("div", {
|
|
24
24
|
className: "xeuugli x126k92a xj0a0fe",
|
|
25
25
|
children: [
|
|
26
|
-
/* @__PURE__ */
|
|
26
|
+
/* @__PURE__ */ m("span", {
|
|
27
27
|
className: "x153jb6y",
|
|
28
28
|
children: [t, ": "]
|
|
29
29
|
}),
|
|
30
|
-
/* @__PURE__ */
|
|
30
|
+
/* @__PURE__ */ p("span", {
|
|
31
31
|
...{
|
|
32
32
|
0: { className: "xbixft" },
|
|
33
33
|
1: { className: "x7ixh4y" }
|
|
34
34
|
}[typeof e == "string" | 0],
|
|
35
|
-
children: n.slice(0,
|
|
35
|
+
children: n.slice(0, C)
|
|
36
36
|
}),
|
|
37
|
-
r && /* @__PURE__ */
|
|
37
|
+
r && /* @__PURE__ */ p("span", {
|
|
38
38
|
className: "x153jb6y x1hz01jw",
|
|
39
39
|
children: "… (value truncated)"
|
|
40
40
|
})
|
|
@@ -42,38 +42,38 @@ function C({ value: e, name: t, path: n, depth: r, maxDepth: i, maxEntries: a })
|
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
let c = Object.entries(e), l = Array.isArray(e) ? `${c.length} items` : `${c.length} fields`;
|
|
45
|
-
return r >= i ? /* @__PURE__ */
|
|
45
|
+
return r >= i ? /* @__PURE__ */ m("div", {
|
|
46
46
|
className: "xeuugli x126k92a xj0a0fe",
|
|
47
|
-
children: [/* @__PURE__ */
|
|
47
|
+
children: [/* @__PURE__ */ m("span", {
|
|
48
48
|
className: "x153jb6y",
|
|
49
49
|
children: [t, ": "]
|
|
50
|
-
}), /* @__PURE__ */
|
|
50
|
+
}), /* @__PURE__ */ m("span", {
|
|
51
51
|
className: "x153jb6y x1hz01jw",
|
|
52
52
|
children: [l, " · depth limit"]
|
|
53
53
|
})]
|
|
54
|
-
}) : /* @__PURE__ */
|
|
54
|
+
}) : /* @__PURE__ */ m("details", {
|
|
55
55
|
open: o,
|
|
56
56
|
onToggle: (e) => s(e.currentTarget.open),
|
|
57
57
|
className: "xeuugli x126k92a xj0a0fe",
|
|
58
|
-
children: [/* @__PURE__ */
|
|
58
|
+
children: [/* @__PURE__ */ m("summary", {
|
|
59
59
|
className: "x9f619 x1ypdohk x16exltd x17oiadl xt970qd x1r6zayv xjbqb8w xif5pkx x1s9zmfe x19rmrnh x13qnu6 x9v5kkp x1bqaal",
|
|
60
60
|
children: [
|
|
61
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */ m("span", {
|
|
62
62
|
className: "x153jb6y",
|
|
63
63
|
children: [t, ": "]
|
|
64
64
|
}),
|
|
65
65
|
Array.isArray(e) ? "[]" : "{}",
|
|
66
66
|
" ",
|
|
67
|
-
/* @__PURE__ */
|
|
67
|
+
/* @__PURE__ */ p("span", {
|
|
68
68
|
className: "x153jb6y x1hz01jw",
|
|
69
69
|
children: l
|
|
70
70
|
})
|
|
71
71
|
]
|
|
72
|
-
}), o && /* @__PURE__ */
|
|
72
|
+
}), o && /* @__PURE__ */ m("div", {
|
|
73
73
|
className: "xo02m6d xpilrb4 x1t7ytsu x97x49r xa1dmyi",
|
|
74
74
|
children: [c.slice(0, a).map(([e, t]) => {
|
|
75
75
|
let o = `${n}/${e.replaceAll("~", "~0").replaceAll("/", "~1")}`;
|
|
76
|
-
return /* @__PURE__ */
|
|
76
|
+
return /* @__PURE__ */ p(w, {
|
|
77
77
|
name: JSON.stringify(e),
|
|
78
78
|
path: o,
|
|
79
79
|
value: t,
|
|
@@ -81,34 +81,34 @@ function C({ value: e, name: t, path: n, depth: r, maxDepth: i, maxEntries: a })
|
|
|
81
81
|
maxDepth: i,
|
|
82
82
|
maxEntries: a
|
|
83
83
|
}, o);
|
|
84
|
-
}), c.length > a && /* @__PURE__ */
|
|
84
|
+
}), c.length > a && /* @__PURE__ */ m("div", {
|
|
85
85
|
className: "x153jb6y x1hz01jw",
|
|
86
86
|
children: [c.length - a, " more entries · copy to inspect the complete value"]
|
|
87
87
|
})]
|
|
88
88
|
})]
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function T({ value: e, label: t, maxDepth: r = 6, maxEntries: a = 50 }) {
|
|
92
92
|
let o = c(() => JSON.stringify(e, null, 2), [e]);
|
|
93
|
-
return /* @__PURE__ */
|
|
93
|
+
return /* @__PURE__ */ m("section", {
|
|
94
94
|
"aria-label": t,
|
|
95
95
|
...s.props(i.root),
|
|
96
|
-
children: [/* @__PURE__ */
|
|
96
|
+
children: [/* @__PURE__ */ m("div", {
|
|
97
97
|
...s.props(i.header),
|
|
98
|
-
children: [/* @__PURE__ */
|
|
98
|
+
children: [/* @__PURE__ */ p("span", {
|
|
99
99
|
...s.props(i.label),
|
|
100
100
|
children: t
|
|
101
|
-
}), /* @__PURE__ */
|
|
101
|
+
}), /* @__PURE__ */ p(n, {
|
|
102
102
|
label: t,
|
|
103
103
|
value: o,
|
|
104
104
|
children: "Copy JSON"
|
|
105
105
|
})]
|
|
106
|
-
}), /* @__PURE__ */
|
|
106
|
+
}), /* @__PURE__ */ p("div", {
|
|
107
107
|
role: "region",
|
|
108
108
|
"aria-label": `${t} fields`,
|
|
109
109
|
tabIndex: 0,
|
|
110
|
-
...s.props(i.scrollRegion,
|
|
111
|
-
children: /* @__PURE__ */
|
|
110
|
+
...s.props(i.scrollRegion, S.body),
|
|
111
|
+
children: /* @__PURE__ */ p(w, {
|
|
112
112
|
name: "root",
|
|
113
113
|
path: "",
|
|
114
114
|
value: e,
|
|
@@ -120,7 +120,7 @@ function w({ value: e, label: t, maxDepth: r = 6, maxEntries: a = 50 }) {
|
|
|
120
120
|
});
|
|
121
121
|
}
|
|
122
122
|
// packages/content/src/log-viewer.tsx
|
|
123
|
-
var
|
|
123
|
+
var E = {
|
|
124
124
|
kVQacm: "xysyzu8",
|
|
125
125
|
kmVPX3: "x1mvvolr",
|
|
126
126
|
kogj98: "x1ghz6dp",
|
|
@@ -131,9 +131,9 @@ var T = {
|
|
|
131
131
|
kHjlTd: "xj0a0fe",
|
|
132
132
|
kKi2Bq: "xeq4nuv",
|
|
133
133
|
$$css: !0
|
|
134
|
-
},
|
|
134
|
+
}, D = {
|
|
135
135
|
output: (e) => [
|
|
136
|
-
|
|
136
|
+
E,
|
|
137
137
|
{
|
|
138
138
|
kskxy: e == null ? e : "x1jols5v",
|
|
139
139
|
$$css: !0
|
|
@@ -146,68 +146,124 @@ var T = {
|
|
|
146
146
|
kL6WhQ: "x1qndepd",
|
|
147
147
|
$$css: !0
|
|
148
148
|
}
|
|
149
|
-
},
|
|
150
|
-
function
|
|
151
|
-
let
|
|
149
|
+
}, O = 2e5;
|
|
150
|
+
function k({ output: t, label: r, maxLines: a = 500, maxHeight: o = 320, isRunning: c = !1 }) {
|
|
151
|
+
let h = d(null), g = d(!1), [_, v] = f(!0), y = x(t), b = y.slice(-2e5).split("\n"), S = b.slice(-Math.max(1, a)), C = b.length - S.length;
|
|
152
152
|
return l(() => {
|
|
153
|
-
|
|
154
|
-
}, [t,
|
|
153
|
+
_ && h.current !== null && (h.current.scrollTop = h.current.scrollHeight);
|
|
154
|
+
}, [t, _]), u(() => {
|
|
155
|
+
!c && g.current && (g.current = !1, h.current?.focus({ preventScroll: !0 }));
|
|
156
|
+
}, [c]), /* @__PURE__ */ m("section", {
|
|
155
157
|
"aria-label": r,
|
|
156
158
|
...s.props(i.root),
|
|
157
159
|
children: [
|
|
158
|
-
/* @__PURE__ */
|
|
160
|
+
/* @__PURE__ */ m("div", {
|
|
159
161
|
...s.props(i.header),
|
|
160
|
-
children: [/* @__PURE__ */
|
|
162
|
+
children: [/* @__PURE__ */ m("span", {
|
|
161
163
|
...s.props(i.label),
|
|
162
164
|
children: [r, c && " · running"]
|
|
163
|
-
}), /* @__PURE__ */
|
|
165
|
+
}), /* @__PURE__ */ m("div", {
|
|
164
166
|
...s.props(i.actions),
|
|
165
|
-
children: [/* @__PURE__ */
|
|
167
|
+
children: [c && /* @__PURE__ */ p(e, {
|
|
166
168
|
variant: "ghost",
|
|
167
|
-
onClick: () =>
|
|
168
|
-
|
|
169
|
-
|
|
169
|
+
onClick: () => v(!_),
|
|
170
|
+
onFocus: () => {
|
|
171
|
+
g.current = !0;
|
|
172
|
+
},
|
|
173
|
+
onBlur: () => {
|
|
174
|
+
g.current = !1;
|
|
175
|
+
},
|
|
176
|
+
children: _ ? "Pause following" : "Follow output"
|
|
177
|
+
}), /* @__PURE__ */ p(n, {
|
|
170
178
|
value: t,
|
|
171
179
|
label: r,
|
|
172
180
|
children: "Copy"
|
|
173
181
|
})]
|
|
174
182
|
})]
|
|
175
183
|
}),
|
|
176
|
-
|
|
177
|
-
...s.props(i.note,
|
|
178
|
-
children: [
|
|
184
|
+
C > 0 && /* @__PURE__ */ m("div", {
|
|
185
|
+
...s.props(i.note, D.notice),
|
|
186
|
+
children: [C, " earlier lines omitted from this view. Copy includes the supplied output."]
|
|
179
187
|
}),
|
|
180
|
-
|
|
181
|
-
...s.props(i.note,
|
|
188
|
+
y.length > O && /* @__PURE__ */ p("div", {
|
|
189
|
+
...s.props(i.note, D.notice),
|
|
182
190
|
children: "Preview limited to the last 200,000 characters. Copy includes the supplied output."
|
|
183
191
|
}),
|
|
184
|
-
/* @__PURE__ */
|
|
185
|
-
ref:
|
|
192
|
+
/* @__PURE__ */ p("pre", {
|
|
193
|
+
ref: h,
|
|
186
194
|
role: "region",
|
|
187
195
|
"aria-label": `${r} output`,
|
|
188
196
|
tabIndex: 0,
|
|
189
197
|
onScroll: (e) => {
|
|
190
198
|
let t = e.currentTarget;
|
|
191
|
-
|
|
199
|
+
v(t.scrollHeight - t.scrollTop - t.clientHeight < 8);
|
|
192
200
|
},
|
|
193
|
-
...s.props(i.scrollRegion,
|
|
194
|
-
children:
|
|
201
|
+
...s.props(i.scrollRegion, D.output(o)),
|
|
202
|
+
children: y.length === 0 ? "No output recorded." : S.join("\n")
|
|
195
203
|
})
|
|
196
204
|
]
|
|
197
205
|
});
|
|
198
206
|
}
|
|
207
|
+
// packages/content/src/media-viewer.tsx
|
|
208
|
+
var A = {
|
|
209
|
+
viewport: {
|
|
210
|
+
k1xSpc: "xrvj5dj",
|
|
211
|
+
kgQiWS: "x1ku5rj1",
|
|
212
|
+
kzqmXN: "xh8yej3",
|
|
213
|
+
kOBAk4: "x186iv6y",
|
|
214
|
+
kskxy: "xcwfpss",
|
|
215
|
+
k7Eaqz: "xeuugli",
|
|
216
|
+
kVQacm: "xb3r6kr",
|
|
217
|
+
kWkggS: "x1r7kqkb",
|
|
218
|
+
$$css: !0
|
|
219
|
+
},
|
|
220
|
+
placeholder: {
|
|
221
|
+
kWkggS: "x1fa40ue",
|
|
222
|
+
$$css: !0
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
function j() {
|
|
226
|
+
return /* @__PURE__ */ p("div", {
|
|
227
|
+
"aria-hidden": !0,
|
|
228
|
+
...s.props(i.root, A.viewport, A.placeholder)
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
function M({ kind: e, src: t, label: n, widthPixels: r, heightPixels: a, onError: o }) {
|
|
232
|
+
return /* @__PURE__ */ p("div", {
|
|
233
|
+
...s.props(i.root, A.viewport),
|
|
234
|
+
children: e === "image" ? /* @__PURE__ */ p("img", {
|
|
235
|
+
src: t,
|
|
236
|
+
alt: n,
|
|
237
|
+
width: r,
|
|
238
|
+
height: a,
|
|
239
|
+
onError: o,
|
|
240
|
+
className: "x1lliihq xh8yej3 x5yr21d x2lwn1j x19kjcj4"
|
|
241
|
+
}) : /* @__PURE__ */ p("video", {
|
|
242
|
+
src: t,
|
|
243
|
+
"aria-label": n,
|
|
244
|
+
width: r,
|
|
245
|
+
height: a,
|
|
246
|
+
controls: !0,
|
|
247
|
+
muted: !0,
|
|
248
|
+
playsInline: !0,
|
|
249
|
+
preload: "metadata",
|
|
250
|
+
onError: o,
|
|
251
|
+
className: "x1lliihq xh8yej3 x5yr21d x2lwn1j x19kjcj4"
|
|
252
|
+
})
|
|
253
|
+
});
|
|
254
|
+
}
|
|
199
255
|
// packages/content/src/stack-trace.tsx
|
|
200
|
-
function
|
|
201
|
-
return /* @__PURE__ */
|
|
256
|
+
function N({ message: e, frames: t }) {
|
|
257
|
+
return /* @__PURE__ */ m("section", {
|
|
202
258
|
"aria-label": "Stack trace",
|
|
203
259
|
...s.props(i.root),
|
|
204
|
-
children: [/* @__PURE__ */
|
|
260
|
+
children: [/* @__PURE__ */ p("p", {
|
|
205
261
|
className: "x1ghz6dp x1mvvolr xso031l x1q0q8m5 x1qndepd xr5kp14 xk4h15q xj0a0fe",
|
|
206
262
|
children: e
|
|
207
|
-
}), t.length === 0 ? /* @__PURE__ */
|
|
263
|
+
}), t.length === 0 ? /* @__PURE__ */ p("p", {
|
|
208
264
|
className: "x1ghz6dp x1mvvolr x153jb6y",
|
|
209
265
|
children: "No frames recorded."
|
|
210
|
-
}) : /* @__PURE__ */
|
|
266
|
+
}) : /* @__PURE__ */ p("ol", {
|
|
211
267
|
className: "x1ghz6dp x1717udv x3ct3a4",
|
|
212
268
|
children: t.map((e) => {
|
|
213
269
|
let t = [
|
|
@@ -215,15 +271,15 @@ function k({ message: e, frames: t }) {
|
|
|
215
271
|
e.line,
|
|
216
272
|
e.column
|
|
217
273
|
].filter((e) => e !== void 0).join(":");
|
|
218
|
-
return /* @__PURE__ */
|
|
274
|
+
return /* @__PURE__ */ m("li", {
|
|
219
275
|
className: "x78zum5 xdt5ytf x1hnptsi xeuugli xj0a0fe x1mvvolr xso031l x1t1lzn6 x1q0q8m5 x1qndepd",
|
|
220
|
-
children: [/* @__PURE__ */
|
|
276
|
+
children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p(o, {
|
|
221
277
|
href: e.href,
|
|
222
278
|
children: e.name
|
|
223
|
-
}), t.length > 0 && /* @__PURE__ */
|
|
279
|
+
}), t.length > 0 && /* @__PURE__ */ p("span", {
|
|
224
280
|
className: "x1lliihq x153jb6y xiard35 xy8obcc xj0a0fe",
|
|
225
281
|
children: t
|
|
226
|
-
})] }), e.code !== void 0 && /* @__PURE__ */
|
|
282
|
+
})] }), e.code !== void 0 && /* @__PURE__ */ p(a, {
|
|
227
283
|
code: e.code,
|
|
228
284
|
language: e.language,
|
|
229
285
|
filename: e.file
|
|
@@ -234,7 +290,7 @@ function k({ message: e, frames: t }) {
|
|
|
234
290
|
});
|
|
235
291
|
}
|
|
236
292
|
// packages/content/src/trace.tsx
|
|
237
|
-
var
|
|
293
|
+
var P = {
|
|
238
294
|
pending: {
|
|
239
295
|
kMwMTN: "x153jb6y",
|
|
240
296
|
$$css: !0
|
|
@@ -259,78 +315,78 @@ var A = {
|
|
|
259
315
|
kMwMTN: "x153jb6y",
|
|
260
316
|
$$css: !0
|
|
261
317
|
}
|
|
262
|
-
},
|
|
263
|
-
pending:
|
|
264
|
-
running:
|
|
265
|
-
complete:
|
|
266
|
-
failed:
|
|
267
|
-
skipped:
|
|
268
|
-
unknown:
|
|
269
|
-
},
|
|
270
|
-
pending:
|
|
271
|
-
running:
|
|
272
|
-
complete:
|
|
273
|
-
failed:
|
|
274
|
-
skipped:
|
|
275
|
-
unknown:
|
|
318
|
+
}, F = {
|
|
319
|
+
pending: P.pending,
|
|
320
|
+
running: P.running,
|
|
321
|
+
complete: P.complete,
|
|
322
|
+
failed: P.failed,
|
|
323
|
+
skipped: P.skipped,
|
|
324
|
+
unknown: P.unknown
|
|
325
|
+
}, I = {
|
|
326
|
+
pending: y,
|
|
327
|
+
running: g,
|
|
328
|
+
complete: h,
|
|
329
|
+
failed: b,
|
|
330
|
+
skipped: _,
|
|
331
|
+
unknown: v
|
|
276
332
|
};
|
|
277
|
-
function
|
|
278
|
-
return /* @__PURE__ */
|
|
333
|
+
function L({ label: e, children: t }) {
|
|
334
|
+
return /* @__PURE__ */ p("ol", {
|
|
279
335
|
"aria-label": e,
|
|
280
336
|
className: "x1ghz6dp x1717udv x3ct3a4 xeuugli x1hz01jw xtqrqnz x1778rvt xj57cvi xbixft",
|
|
281
337
|
children: t
|
|
282
338
|
});
|
|
283
339
|
}
|
|
284
|
-
function
|
|
285
|
-
return /* @__PURE__ */
|
|
340
|
+
function R({ label: e, children: t }) {
|
|
341
|
+
return /* @__PURE__ */ p("ol", {
|
|
286
342
|
"aria-label": e,
|
|
287
343
|
className: "x1ghz6dp x1717udv x3ct3a4 xeuugli x1hz01jw xtqrqnz x1778rvt xj57cvi xbixft x3bg4vu",
|
|
288
344
|
children: t
|
|
289
345
|
});
|
|
290
346
|
}
|
|
291
|
-
function
|
|
292
|
-
let
|
|
293
|
-
return /* @__PURE__ */
|
|
347
|
+
function z({ id: e, label: n, status: i, statusLabel: a, description: o, detail: c, isSelected: l, onSelect: u, children: d }) {
|
|
348
|
+
let f = I[i];
|
|
349
|
+
return /* @__PURE__ */ m("li", {
|
|
294
350
|
"data-item-id": e,
|
|
295
351
|
className: "x1n2onr6 xrvj5dj x1qpdrs7 x8zbtdt x1wv5www xup0pd7",
|
|
296
|
-
children: [/* @__PURE__ */
|
|
352
|
+
children: [/* @__PURE__ */ m("div", {
|
|
297
353
|
"aria-hidden": !0,
|
|
298
354
|
className: "x78zum5 xdt5ytf x6s0dn4 xunmzkg x1lk341d",
|
|
299
|
-
children: [/* @__PURE__ */ f
|
|
355
|
+
children: [/* @__PURE__ */ p(f, {
|
|
300
356
|
size: 14,
|
|
301
|
-
...s.props(
|
|
302
|
-
}), /* @__PURE__ */
|
|
303
|
-
}), /* @__PURE__ */
|
|
357
|
+
...s.props(F[i])
|
|
358
|
+
}), /* @__PURE__ */ p("span", { className: "x1i1rx1s x1f6qilh x98rzlu x1fa40ue" })]
|
|
359
|
+
}), /* @__PURE__ */ m("div", {
|
|
304
360
|
className: "x78zum5 xdt5ytf xunmzkg xeuugli",
|
|
305
361
|
children: [
|
|
306
|
-
/* @__PURE__ */
|
|
362
|
+
/* @__PURE__ */ p("div", {
|
|
307
363
|
...{
|
|
308
364
|
0: { className: "xk4h15q xj0a0fe" },
|
|
309
365
|
1: { className: "xk4h15q xj0a0fe xujl8zx xda060z" }
|
|
310
366
|
}[l === !0 | 0],
|
|
311
|
-
children: u === void 0 ? n : /* @__PURE__ */
|
|
367
|
+
children: u === void 0 ? n : /* @__PURE__ */ p(t, {
|
|
312
368
|
"aria-pressed": l,
|
|
313
369
|
onClick: () => u(e),
|
|
314
370
|
children: n
|
|
315
371
|
})
|
|
316
372
|
}),
|
|
317
|
-
/* @__PURE__ */
|
|
373
|
+
/* @__PURE__ */ p("span", {
|
|
318
374
|
className: "xy8obcc xas2l8k x153jb6y xj0a0fe",
|
|
319
375
|
children: a
|
|
320
376
|
}),
|
|
321
|
-
o !== void 0 && /* @__PURE__ */
|
|
377
|
+
o !== void 0 && /* @__PURE__ */ p("p", {
|
|
322
378
|
className: "x1ghz6dp x153jb6y xj0a0fe",
|
|
323
379
|
children: o
|
|
324
380
|
}),
|
|
325
|
-
c !== void 0 && /* @__PURE__ */
|
|
381
|
+
c !== void 0 && /* @__PURE__ */ m(r.Root, { children: [/* @__PURE__ */ p(r.Trigger, { children: "Details" }), /* @__PURE__ */ p(r.Panel, { children: c })] }),
|
|
326
382
|
d
|
|
327
383
|
]
|
|
328
384
|
})]
|
|
329
385
|
});
|
|
330
386
|
}
|
|
331
|
-
var
|
|
332
|
-
Root:
|
|
333
|
-
Item:
|
|
334
|
-
Group:
|
|
387
|
+
var B = {
|
|
388
|
+
Root: L,
|
|
389
|
+
Item: z,
|
|
390
|
+
Group: R
|
|
335
391
|
};
|
|
336
|
-
export {
|
|
392
|
+
export { T as JsonViewer, k as LogViewer, M as MediaViewer, j as MediaViewerPlaceholder, N as StackTrace, B as Trace };
|
package/dist/elements.css
CHANGED
|
@@ -684,6 +684,10 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
|
|
|
684
684
|
animation-timing-function: var(--x5xz5r2);
|
|
685
685
|
}
|
|
686
686
|
|
|
687
|
+
.x186iv6y {
|
|
688
|
+
aspect-ratio: 16 / 9;
|
|
689
|
+
}
|
|
690
|
+
|
|
687
691
|
.xjbqb8w {
|
|
688
692
|
background-color: #0000;
|
|
689
693
|
}
|
|
@@ -1217,6 +1221,10 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
|
|
|
1217
1221
|
inset-inline-start: 0;
|
|
1218
1222
|
}
|
|
1219
1223
|
|
|
1224
|
+
.xc8icb0 {
|
|
1225
|
+
isolation: isolate;
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1220
1228
|
.xl56j7k {
|
|
1221
1229
|
justify-content: center;
|
|
1222
1230
|
}
|
|
@@ -1293,6 +1301,10 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
|
|
|
1293
1301
|
margin-inline-start: var(--x1xijsos);
|
|
1294
1302
|
}
|
|
1295
1303
|
|
|
1304
|
+
.x19kjcj4 {
|
|
1305
|
+
object-fit: contain;
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1296
1308
|
.xl1xv1r {
|
|
1297
1309
|
object-fit: cover;
|
|
1298
1310
|
}
|
|
@@ -1659,7 +1671,7 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
|
|
|
1659
1671
|
white-space: pre-wrap;
|
|
1660
1672
|
}
|
|
1661
1673
|
|
|
1662
|
-
.x11ru5tl {
|
|
1674
|
+
.x11ru5tl, .x1vjfegm {
|
|
1663
1675
|
z-index: 1;
|
|
1664
1676
|
}
|
|
1665
1677
|
|
|
@@ -1897,6 +1909,14 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
|
|
|
1897
1909
|
padding-inline-end: calc(var(--x1drqizm) + var(--x14tmdi9));
|
|
1898
1910
|
}
|
|
1899
1911
|
|
|
1912
|
+
.xkfz77:has(a, button, input, select, textarea, label, summary, [tabindex], [contenteditable]) {
|
|
1913
|
+
position: relative;
|
|
1914
|
+
}
|
|
1915
|
+
|
|
1916
|
+
.x1ljc890:has(a, button, input, select, textarea, label, summary, [tabindex], [contenteditable]) {
|
|
1917
|
+
z-index: 1;
|
|
1918
|
+
}
|
|
1919
|
+
|
|
1900
1920
|
.xjl7jj:empty {
|
|
1901
1921
|
display: none;
|
|
1902
1922
|
}
|
|
@@ -2293,6 +2313,10 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
|
|
|
2293
2313
|
max-height: 520px;
|
|
2294
2314
|
}
|
|
2295
2315
|
|
|
2316
|
+
.xcwfpss {
|
|
2317
|
+
max-height: 70dvh;
|
|
2318
|
+
}
|
|
2319
|
+
|
|
2296
2320
|
.xs8sm83 {
|
|
2297
2321
|
max-height: calc(100dvh - 32px);
|
|
2298
2322
|
}
|
|
@@ -3227,6 +3251,22 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
|
|
|
3227
3251
|
inset-inline-start: auto;
|
|
3228
3252
|
}
|
|
3229
3253
|
|
|
3254
|
+
.x1x5eltu:focus-visible:after {
|
|
3255
|
+
outline-color: var(--xzqn2nu);
|
|
3256
|
+
}
|
|
3257
|
+
|
|
3258
|
+
.x1jdy9wv:focus-visible:after {
|
|
3259
|
+
outline-offset: -2px;
|
|
3260
|
+
}
|
|
3261
|
+
|
|
3262
|
+
.xa2q2qx:focus-visible:after {
|
|
3263
|
+
outline-style: solid;
|
|
3264
|
+
}
|
|
3265
|
+
|
|
3266
|
+
.x11q50lq:focus-visible:after {
|
|
3267
|
+
outline-width: var(--xxx3t85);
|
|
3268
|
+
}
|
|
3269
|
+
|
|
3230
3270
|
.xkt9h7a[data-indeterminate]:before {
|
|
3231
3271
|
transform: none;
|
|
3232
3272
|
}
|
|
@@ -2,6 +2,8 @@ export type { JsonValue, JsonViewerProps } from './json-viewer.tsx';
|
|
|
2
2
|
export { JsonViewer } from './json-viewer.tsx';
|
|
3
3
|
export type { LogViewerProps } from './log-viewer.tsx';
|
|
4
4
|
export { LogViewer } from './log-viewer.tsx';
|
|
5
|
+
export type { MediaViewerProps } from './media-viewer.tsx';
|
|
6
|
+
export { MediaViewer, MediaViewerPlaceholder } from './media-viewer.tsx';
|
|
5
7
|
export type { StackFrame, StackTraceProps } from './stack-trace.tsx';
|
|
6
8
|
export { StackTrace } from './stack-trace.tsx';
|
|
7
9
|
export type { TraceStatus, TraceRootProps, TraceGroupProps, TraceItemProps } from './trace.tsx';
|
|
@@ -5,6 +5,8 @@ export type MarkdownProps = {
|
|
|
5
5
|
readonly isStreaming?: boolean;
|
|
6
6
|
readonly label?: string;
|
|
7
7
|
readonly headingLevel?: HeadingLevel;
|
|
8
|
+
readonly tone?: 'default' | 'muted';
|
|
9
|
+
readonly weight?: 'regular' | 'strong';
|
|
8
10
|
};
|
|
9
|
-
export declare function Markdown({ children, isStreaming, label, headingLevel }: MarkdownProps): ReactNode;
|
|
11
|
+
export declare function Markdown({ children, isStreaming, label, headingLevel, tone, weight, }: MarkdownProps): ReactNode;
|
|
10
12
|
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export type MediaViewerProps = {
|
|
3
|
+
readonly kind: 'image' | 'video';
|
|
4
|
+
readonly src: string;
|
|
5
|
+
readonly label: string;
|
|
6
|
+
readonly widthPixels: number;
|
|
7
|
+
readonly heightPixels: number;
|
|
8
|
+
readonly onError?: () => void;
|
|
9
|
+
};
|
|
10
|
+
export declare function MediaViewerPlaceholder(): ReactNode;
|
|
11
|
+
export declare function MediaViewer({ kind, src, label, widthPixels, heightPixels, onError }: MediaViewerProps): ReactNode;
|
package/package.json
CHANGED