@mastra/playground-ui 20.0.2 → 21.0.0-alpha.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/CHANGELOG.md +13 -0
- package/dist/index.cjs.js +115 -67
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.css +8 -20
- package/dist/index.es.js +115 -67
- package/dist/index.es.js.map +1 -1
- package/package.json +7 -7
package/dist/index.css
CHANGED
|
@@ -743,6 +743,10 @@
|
|
|
743
743
|
left: var(--spacing-2);
|
|
744
744
|
}
|
|
745
745
|
|
|
746
|
+
.left-2\.5 {
|
|
747
|
+
left: var(--spacing-2_5);
|
|
748
|
+
}
|
|
749
|
+
|
|
746
750
|
.left-3 {
|
|
747
751
|
left: var(--spacing-3);
|
|
748
752
|
}
|
|
@@ -2764,6 +2768,10 @@
|
|
|
2764
2768
|
gap: var(--spacing-12);
|
|
2765
2769
|
}
|
|
2766
2770
|
|
|
2771
|
+
.gap-14 {
|
|
2772
|
+
gap: var(--spacing-14);
|
|
2773
|
+
}
|
|
2774
|
+
|
|
2767
2775
|
.gap-16 {
|
|
2768
2776
|
gap: var(--spacing-16);
|
|
2769
2777
|
}
|
|
@@ -3543,16 +3551,6 @@
|
|
|
3543
3551
|
border-color: #0000;
|
|
3544
3552
|
}
|
|
3545
3553
|
|
|
3546
|
-
.border-white\/10 {
|
|
3547
|
-
border-color: #ffffff1a;
|
|
3548
|
-
}
|
|
3549
|
-
|
|
3550
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
3551
|
-
.border-white\/10 {
|
|
3552
|
-
border-color: color-mix(in oklab, var(--color-white) 10%, transparent);
|
|
3553
|
-
}
|
|
3554
|
-
}
|
|
3555
|
-
|
|
3556
3554
|
.border-yellow-200 {
|
|
3557
3555
|
border-color: var(--color-yellow-200);
|
|
3558
3556
|
}
|
|
@@ -3847,16 +3845,6 @@
|
|
|
3847
3845
|
}
|
|
3848
3846
|
}
|
|
3849
3847
|
|
|
3850
|
-
.bg-black\/20 {
|
|
3851
|
-
background-color: #0003;
|
|
3852
|
-
}
|
|
3853
|
-
|
|
3854
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
3855
|
-
.bg-black\/20 {
|
|
3856
|
-
background-color: color-mix(in oklab, var(--color-black) 20%, transparent);
|
|
3857
|
-
}
|
|
3858
|
-
}
|
|
3859
|
-
|
|
3860
3848
|
.bg-black\/50 {
|
|
3861
3849
|
background-color: #00000080;
|
|
3862
3850
|
}
|
package/dist/index.es.js
CHANGED
|
@@ -5537,7 +5537,7 @@ function CopyButton({
|
|
|
5537
5537
|
] });
|
|
5538
5538
|
}
|
|
5539
5539
|
|
|
5540
|
-
function buildDarkTheme() {
|
|
5540
|
+
function buildDarkTheme$1() {
|
|
5541
5541
|
const baseTheme = draculaInit({
|
|
5542
5542
|
settings: {
|
|
5543
5543
|
fontFamily: "var(--geist-mono)",
|
|
@@ -5624,7 +5624,7 @@ function buildDarkTheme() {
|
|
|
5624
5624
|
});
|
|
5625
5625
|
return [baseTheme, customLineNumberTheme];
|
|
5626
5626
|
}
|
|
5627
|
-
function buildLightTheme() {
|
|
5627
|
+
function buildLightTheme$1() {
|
|
5628
5628
|
const editorTheme = EditorView.theme({
|
|
5629
5629
|
"&": {
|
|
5630
5630
|
backgroundColor: "transparent",
|
|
@@ -5727,7 +5727,7 @@ function buildLightTheme() {
|
|
|
5727
5727
|
}
|
|
5728
5728
|
const useCodemirrorTheme$2 = () => {
|
|
5729
5729
|
const isDark = useIsDarkMode();
|
|
5730
|
-
return useMemo(() => isDark ? buildDarkTheme() : buildLightTheme(), [isDark]);
|
|
5730
|
+
return useMemo(() => isDark ? buildDarkTheme$1() : buildLightTheme$1(), [isDark]);
|
|
5731
5731
|
};
|
|
5732
5732
|
const CodeEditor = forwardRef(
|
|
5733
5733
|
({
|
|
@@ -42641,62 +42641,65 @@ function HorizontalBars({
|
|
|
42641
42641
|
});
|
|
42642
42642
|
const isStacked = segments.length > 1;
|
|
42643
42643
|
return /* @__PURE__ */ jsxs(ScrollArea, { className: cn("w-full h-full", className), children: [
|
|
42644
|
-
/* @__PURE__ */
|
|
42645
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
42646
|
-
|
|
42647
|
-
|
|
42644
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mb-4 mt-2", children: [
|
|
42645
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 flex items-center gap-4", children: segments.map((seg) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
42646
|
+
/* @__PURE__ */ jsx("div", { className: "size-2 rounded-full", style: { backgroundColor: seg.color } }),
|
|
42647
|
+
/* @__PURE__ */ jsx("span", { className: "text-ui-sm text-neutral3", children: seg.label })
|
|
42648
|
+
] }, seg.label)) }),
|
|
42649
|
+
/* @__PURE__ */ jsx("span", { className: "shrink-0 text-ui-sm text-neutral2 pr-2", children: "Total" })
|
|
42650
|
+
] }),
|
|
42648
42651
|
/* @__PURE__ */ jsx("div", { className: "grid gap-3.5", children: sorted.map((d) => {
|
|
42649
42652
|
const total = d.values.reduce((s, v) => s + v, 0);
|
|
42650
|
-
return /* @__PURE__ */ jsxs("div", { className: "
|
|
42651
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
42652
|
-
/* @__PURE__ */
|
|
42653
|
-
|
|
42654
|
-
|
|
42655
|
-
|
|
42656
|
-
|
|
42657
|
-
|
|
42658
|
-
|
|
42659
|
-
|
|
42660
|
-
|
|
42661
|
-
|
|
42662
|
-
|
|
42663
|
-
|
|
42664
|
-
|
|
42665
|
-
|
|
42666
|
-
|
|
42653
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-14 h-6 ", children: [
|
|
42654
|
+
/* @__PURE__ */ jsxs("div", { className: "relative h-full flex-1 min-w-0", children: [
|
|
42655
|
+
/* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
42656
|
+
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
42657
|
+
"div",
|
|
42658
|
+
{
|
|
42659
|
+
className: "absolute inset-y-0 left-0 cursor-default",
|
|
42660
|
+
style: { width: `${maxVal > 0 ? total / maxVal * 100 : 0}%` },
|
|
42661
|
+
children: segments.map((seg, si) => {
|
|
42662
|
+
const val = d.values[si] ?? 0;
|
|
42663
|
+
const pct = total > 0 ? val / total * 100 : 0;
|
|
42664
|
+
const left = d.values.slice(0, si).reduce((s, v) => s + (total > 0 ? v / total * 100 : 0), 0);
|
|
42665
|
+
const isLastWithValue = d.values.slice(si + 1).every((v) => !v);
|
|
42666
|
+
if (isStacked) {
|
|
42667
|
+
return /* @__PURE__ */ jsx(
|
|
42668
|
+
"div",
|
|
42669
|
+
{
|
|
42670
|
+
className: cn(
|
|
42671
|
+
"absolute inset-y-0",
|
|
42672
|
+
si === 0 && "rounded-l",
|
|
42673
|
+
isLastWithValue && "rounded-r"
|
|
42674
|
+
),
|
|
42675
|
+
style: {
|
|
42676
|
+
left: `${left}%`,
|
|
42677
|
+
width: `${pct}%`,
|
|
42678
|
+
backgroundColor: seg.color
|
|
42679
|
+
}
|
|
42680
|
+
},
|
|
42681
|
+
seg.label
|
|
42682
|
+
);
|
|
42683
|
+
}
|
|
42667
42684
|
return /* @__PURE__ */ jsx(
|
|
42668
42685
|
"div",
|
|
42669
42686
|
{
|
|
42670
|
-
className:
|
|
42671
|
-
|
|
42672
|
-
si === 0 && "rounded-l",
|
|
42673
|
-
isLastWithValue && "rounded-r"
|
|
42674
|
-
),
|
|
42675
|
-
style: {
|
|
42676
|
-
left: `${left}%`,
|
|
42677
|
-
width: `${pct}%`,
|
|
42678
|
-
backgroundColor: seg.color
|
|
42679
|
-
}
|
|
42687
|
+
className: "absolute inset-y-0 left-0 rounded",
|
|
42688
|
+
style: { width: `${pct}%`, backgroundColor: seg.color }
|
|
42680
42689
|
},
|
|
42681
42690
|
seg.label
|
|
42682
42691
|
);
|
|
42683
|
-
}
|
|
42684
|
-
|
|
42685
|
-
|
|
42686
|
-
|
|
42687
|
-
|
|
42688
|
-
|
|
42689
|
-
|
|
42690
|
-
|
|
42691
|
-
|
|
42692
|
-
|
|
42693
|
-
|
|
42694
|
-
) }),
|
|
42695
|
-
/* @__PURE__ */ jsx(TooltipContent, { side: "top", className: "font-mono", children: /* @__PURE__ */ jsx("div", { className: "grid gap-1", children: segments.map((seg, si) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
42696
|
-
/* @__PURE__ */ jsx("span", { children: seg.label }),
|
|
42697
|
-
/* @__PURE__ */ jsx("span", { className: "ml-auto pl-3", children: fmt(d.values[si] ?? 0) })
|
|
42698
|
-
] }, seg.label)) }) })
|
|
42699
|
-
] }) })
|
|
42692
|
+
})
|
|
42693
|
+
}
|
|
42694
|
+
) }),
|
|
42695
|
+
/* @__PURE__ */ jsx(TooltipContent, { side: "top", className: "font-mono", children: /* @__PURE__ */ jsx("div", { className: "grid gap-1", children: segments.map((seg, si) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
42696
|
+
/* @__PURE__ */ jsx("span", { children: seg.label }),
|
|
42697
|
+
/* @__PURE__ */ jsx("span", { className: "ml-auto pl-3", children: fmt(d.values[si] ?? 0) })
|
|
42698
|
+
] }, seg.label)) }) })
|
|
42699
|
+
] }),
|
|
42700
|
+
/* @__PURE__ */ jsx("span", { className: "absolute inset-y-0 left-2.5 flex items-center text-ui-sm text-neutral4 truncate z-10 pointer-events-none", children: d.name })
|
|
42701
|
+
] }),
|
|
42702
|
+
/* @__PURE__ */ jsx("span", { className: "text-ui-md text-neutral4 tabular-nums shrink-0 pr-3", children: fmt(total) })
|
|
42700
42703
|
] }, d.name);
|
|
42701
42704
|
}) })
|
|
42702
42705
|
] });
|
|
@@ -51411,21 +51414,66 @@ function DataDetailsPanelCloseButton({
|
|
|
51411
51414
|
);
|
|
51412
51415
|
}
|
|
51413
51416
|
|
|
51417
|
+
function buildDarkTheme() {
|
|
51418
|
+
return draculaInit({
|
|
51419
|
+
settings: {
|
|
51420
|
+
fontFamily: "var(--geist-mono)",
|
|
51421
|
+
fontSize: "0.75rem",
|
|
51422
|
+
lineHighlight: "transparent",
|
|
51423
|
+
gutterBackground: "transparent",
|
|
51424
|
+
gutterForeground: "#939393",
|
|
51425
|
+
background: "transparent"
|
|
51426
|
+
},
|
|
51427
|
+
styles: [{ tag: [tags.className, tags.propertyName] }]
|
|
51428
|
+
});
|
|
51429
|
+
}
|
|
51430
|
+
function buildLightTheme() {
|
|
51431
|
+
const editorTheme = EditorView.theme({
|
|
51432
|
+
"&": {
|
|
51433
|
+
backgroundColor: "transparent",
|
|
51434
|
+
color: "var(--neutral6)",
|
|
51435
|
+
fontSize: "0.75rem"
|
|
51436
|
+
},
|
|
51437
|
+
"&.cm-editor .cm-scroller": {
|
|
51438
|
+
fontFamily: "var(--geist-mono)"
|
|
51439
|
+
},
|
|
51440
|
+
".cm-gutters": {
|
|
51441
|
+
backgroundColor: "transparent",
|
|
51442
|
+
color: "var(--neutral2)",
|
|
51443
|
+
borderRight: "none"
|
|
51444
|
+
},
|
|
51445
|
+
".cm-content": {
|
|
51446
|
+
color: "var(--neutral6)",
|
|
51447
|
+
caretColor: "var(--neutral6)"
|
|
51448
|
+
},
|
|
51449
|
+
".cm-activeLine": {
|
|
51450
|
+
backgroundColor: "transparent"
|
|
51451
|
+
},
|
|
51452
|
+
".cm-activeLineGutter": {
|
|
51453
|
+
backgroundColor: "transparent"
|
|
51454
|
+
},
|
|
51455
|
+
".cm-cursor, .cm-dropCursor": {
|
|
51456
|
+
borderLeftColor: "var(--neutral6)"
|
|
51457
|
+
}
|
|
51458
|
+
});
|
|
51459
|
+
const highlightStyle = HighlightStyle.define([
|
|
51460
|
+
{ tag: [tags.comment, tags.bracket], color: "var(--neutral2)" },
|
|
51461
|
+
{ tag: [tags.string, tags.meta, tags.regexp], color: "var(--accent1)" },
|
|
51462
|
+
{ tag: [tags.atom, tags.bool, tags.special(tags.variableName)], color: "var(--accent6)" },
|
|
51463
|
+
{ tag: [tags.keyword, tags.operator, tags.tagName], color: "var(--accent2)" },
|
|
51464
|
+
{ tag: [tags.function(tags.propertyName), tags.propertyName], color: "var(--accent5)" },
|
|
51465
|
+
{
|
|
51466
|
+
tag: [tags.definition(tags.variableName), tags.function(tags.variableName), tags.className, tags.attributeName],
|
|
51467
|
+
color: "var(--accent3)"
|
|
51468
|
+
},
|
|
51469
|
+
{ tag: [tags.variableName, tags.number], color: "var(--accent5)" },
|
|
51470
|
+
{ tag: [tags.name, tags.quote], color: "var(--accent1)" }
|
|
51471
|
+
]);
|
|
51472
|
+
return [editorTheme, syntaxHighlighting(highlightStyle)];
|
|
51473
|
+
}
|
|
51414
51474
|
const useCodemirrorTheme = () => {
|
|
51415
|
-
|
|
51416
|
-
|
|
51417
|
-
settings: {
|
|
51418
|
-
fontFamily: "var(--geist-mono)",
|
|
51419
|
-
fontSize: "0.75rem",
|
|
51420
|
-
lineHighlight: "transparent",
|
|
51421
|
-
gutterBackground: "transparent",
|
|
51422
|
-
gutterForeground: "#939393",
|
|
51423
|
-
background: "transparent"
|
|
51424
|
-
},
|
|
51425
|
-
styles: [{ tag: [tags.className, tags.propertyName] }]
|
|
51426
|
-
}),
|
|
51427
|
-
[]
|
|
51428
|
-
);
|
|
51475
|
+
const isDark = useIsDarkMode();
|
|
51476
|
+
return useMemo(() => isDark ? buildDarkTheme() : buildLightTheme(), [isDark]);
|
|
51429
51477
|
};
|
|
51430
51478
|
function DataDetailsPanelCodeSection({
|
|
51431
51479
|
codeStr = "",
|
|
@@ -51475,10 +51523,10 @@ function DataDetailsPanelCodeSection({
|
|
|
51475
51523
|
)
|
|
51476
51524
|
] })
|
|
51477
51525
|
] }),
|
|
51478
|
-
/* @__PURE__ */ jsx("div", { className: "bg-black/20 p-3 overflow-hidden rounded-lg border border-white/10 text-neutral4 text-ui-sm break-all max-h-[30vh] overflow-y-auto", children: usePlainTextView ? /* @__PURE__ */ jsx("div", { className: "text-neutral4 font-mono break-all", children: /* @__PURE__ */ jsx("pre", { className: "text-wrap", children: finalCodeStr }) }) : /* @__PURE__ */ jsx(
|
|
51526
|
+
/* @__PURE__ */ jsx("div", { className: "dark:bg-black/20 bg-surface3 p-3 overflow-hidden rounded-lg border dark:border-white/10 border-border1 text-neutral4 text-ui-sm break-all max-h-[30vh] overflow-y-auto", children: usePlainTextView ? /* @__PURE__ */ jsx("div", { className: "text-neutral4 font-mono break-all", children: /* @__PURE__ */ jsx("pre", { className: "text-wrap", children: finalCodeStr }) }) : /* @__PURE__ */ jsx(
|
|
51479
51527
|
CodeMirror,
|
|
51480
51528
|
{
|
|
51481
|
-
extensions: [json(), EditorView
|
|
51529
|
+
extensions: [json(), EditorView.lineWrapping],
|
|
51482
51530
|
theme,
|
|
51483
51531
|
value: codeStr,
|
|
51484
51532
|
editable: false
|