@mastra/playground-ui 20.0.2 → 21.0.0-alpha.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/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
  }
@@ -1877,6 +1881,10 @@
1877
1881
  width: 1.75rem;
1878
1882
  }
1879
1883
 
1884
+ .w-\[1\.125rem\] {
1885
+ width: 1.125rem;
1886
+ }
1887
+
1880
1888
  .w-\[1em\] {
1881
1889
  width: 1em;
1882
1890
  }
@@ -2764,6 +2772,10 @@
2764
2772
  gap: var(--spacing-12);
2765
2773
  }
2766
2774
 
2775
+ .gap-14 {
2776
+ gap: var(--spacing-14);
2777
+ }
2778
+
2767
2779
  .gap-16 {
2768
2780
  gap: var(--spacing-16);
2769
2781
  }
@@ -3543,16 +3555,6 @@
3543
3555
  border-color: #0000;
3544
3556
  }
3545
3557
 
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
3558
  .border-yellow-200 {
3557
3559
  border-color: var(--color-yellow-200);
3558
3560
  }
@@ -3847,16 +3849,6 @@
3847
3849
  }
3848
3850
  }
3849
3851
 
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
3852
  .bg-black\/50 {
3861
3853
  background-color: #00000080;
3862
3854
  }
@@ -4894,6 +4886,10 @@
4894
4886
  padding-left: var(--spacing-10);
4895
4887
  }
4896
4888
 
4889
+ .pl-11 {
4890
+ padding-left: var(--spacing-11);
4891
+ }
4892
+
4897
4893
  .pl-12 {
4898
4894
  padding-left: var(--spacing-12);
4899
4895
  }
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
  ({
@@ -34271,14 +34271,25 @@ function SearchFieldBlock({
34271
34271
  placeholder,
34272
34272
  onChange,
34273
34273
  size,
34274
- className: "pl-10"
34274
+ className: cn(
34275
+ size === "sm" && "pl-8",
34276
+ size === "md" && "pl-9",
34277
+ (!size || size === "default") && "pl-10",
34278
+ size === "lg" && "pl-11"
34279
+ )
34275
34280
  }
34276
34281
  ),
34277
34282
  /* @__PURE__ */ jsx(
34278
34283
  SearchIcon,
34279
34284
  {
34280
34285
  "aria-hidden": "true",
34281
- className: "text-neutral4 opacity-50 group-has-focus:opacity-100 absolute top-2 left-3 w-5 h-5"
34286
+ className: cn(
34287
+ "text-neutral4 opacity-50 group-has-focus:opacity-100 absolute left-3 top-1/2 -translate-y-1/2",
34288
+ size === "sm" && "w-3.5 h-3.5",
34289
+ size === "md" && "w-4 h-4",
34290
+ (!size || size === "default") && "w-[1.125rem] h-[1.125rem]",
34291
+ size === "lg" && "w-5 h-5"
34292
+ )
34282
34293
  }
34283
34294
  ),
34284
34295
  onReset && value && /* @__PURE__ */ jsx(
@@ -42641,62 +42652,65 @@ function HorizontalBars({
42641
42652
  });
42642
42653
  const isStacked = segments.length > 1;
42643
42654
  return /* @__PURE__ */ jsxs(ScrollArea, { className: cn("w-full h-full", className), children: [
42644
- /* @__PURE__ */ jsx("div", { className: "flex items-center gap-3 mb-4 mt-2", children: /* @__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: [
42645
- /* @__PURE__ */ jsx("div", { className: "size-2 rounded-full", style: { backgroundColor: seg.color } }),
42646
- /* @__PURE__ */ jsx("span", { className: "text-ui-sm text-neutral3", children: seg.label })
42647
- ] }, seg.label)) }) }),
42655
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mb-4 mt-2", children: [
42656
+ /* @__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: [
42657
+ /* @__PURE__ */ jsx("div", { className: "size-2 rounded-full", style: { backgroundColor: seg.color } }),
42658
+ /* @__PURE__ */ jsx("span", { className: "text-ui-sm text-neutral3", children: seg.label })
42659
+ ] }, seg.label)) }),
42660
+ /* @__PURE__ */ jsx("span", { className: "shrink-0 text-ui-sm text-neutral2 pr-2", children: "Total" })
42661
+ ] }),
42648
42662
  /* @__PURE__ */ jsx("div", { className: "grid gap-3.5", children: sorted.map((d) => {
42649
42663
  const total = d.values.reduce((s, v) => s + v, 0);
42650
- return /* @__PURE__ */ jsxs("div", { className: "grid gap-1", children: [
42651
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
42652
- /* @__PURE__ */ jsx("span", { className: "text-ui-sm text-neutral4 truncate", children: d.name }),
42653
- /* @__PURE__ */ jsx("span", { className: "text-ui-sm text-neutral4 tabular-nums shrink-0", children: fmt(total) })
42654
- ] }),
42655
- /* @__PURE__ */ jsx("div", { className: "relative h-5 w-full", children: /* @__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) {
42664
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-14 h-6 ", children: [
42665
+ /* @__PURE__ */ jsxs("div", { className: "relative h-full flex-1 min-w-0", children: [
42666
+ /* @__PURE__ */ jsxs(Tooltip, { children: [
42667
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
42668
+ "div",
42669
+ {
42670
+ className: "absolute inset-y-0 left-0 cursor-default",
42671
+ style: { width: `${maxVal > 0 ? total / maxVal * 100 : 0}%` },
42672
+ children: segments.map((seg, si) => {
42673
+ const val = d.values[si] ?? 0;
42674
+ const pct = total > 0 ? val / total * 100 : 0;
42675
+ const left = d.values.slice(0, si).reduce((s, v) => s + (total > 0 ? v / total * 100 : 0), 0);
42676
+ const isLastWithValue = d.values.slice(si + 1).every((v) => !v);
42677
+ if (isStacked) {
42678
+ return /* @__PURE__ */ jsx(
42679
+ "div",
42680
+ {
42681
+ className: cn(
42682
+ "absolute inset-y-0",
42683
+ si === 0 && "rounded-l",
42684
+ isLastWithValue && "rounded-r"
42685
+ ),
42686
+ style: {
42687
+ left: `${left}%`,
42688
+ width: `${pct}%`,
42689
+ backgroundColor: seg.color
42690
+ }
42691
+ },
42692
+ seg.label
42693
+ );
42694
+ }
42667
42695
  return /* @__PURE__ */ jsx(
42668
42696
  "div",
42669
42697
  {
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
- }
42698
+ className: "absolute inset-y-0 left-0 rounded",
42699
+ style: { width: `${pct}%`, backgroundColor: seg.color }
42680
42700
  },
42681
42701
  seg.label
42682
42702
  );
42683
- }
42684
- return /* @__PURE__ */ jsx(
42685
- "div",
42686
- {
42687
- className: "absolute inset-y-0 left-0 rounded",
42688
- style: { width: `${pct}%`, backgroundColor: seg.color }
42689
- },
42690
- seg.label
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
- ] }) })
42703
+ })
42704
+ }
42705
+ ) }),
42706
+ /* @__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: [
42707
+ /* @__PURE__ */ jsx("span", { children: seg.label }),
42708
+ /* @__PURE__ */ jsx("span", { className: "ml-auto pl-3", children: fmt(d.values[si] ?? 0) })
42709
+ ] }, seg.label)) }) })
42710
+ ] }),
42711
+ /* @__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 })
42712
+ ] }),
42713
+ /* @__PURE__ */ jsx("span", { className: "text-ui-md text-neutral4 tabular-nums shrink-0 pr-3", children: fmt(total) })
42700
42714
  ] }, d.name);
42701
42715
  }) })
42702
42716
  ] });
@@ -51411,21 +51425,66 @@ function DataDetailsPanelCloseButton({
51411
51425
  );
51412
51426
  }
51413
51427
 
51428
+ function buildDarkTheme() {
51429
+ return draculaInit({
51430
+ settings: {
51431
+ fontFamily: "var(--geist-mono)",
51432
+ fontSize: "0.75rem",
51433
+ lineHighlight: "transparent",
51434
+ gutterBackground: "transparent",
51435
+ gutterForeground: "#939393",
51436
+ background: "transparent"
51437
+ },
51438
+ styles: [{ tag: [tags.className, tags.propertyName] }]
51439
+ });
51440
+ }
51441
+ function buildLightTheme() {
51442
+ const editorTheme = EditorView.theme({
51443
+ "&": {
51444
+ backgroundColor: "transparent",
51445
+ color: "var(--neutral6)",
51446
+ fontSize: "0.75rem"
51447
+ },
51448
+ "&.cm-editor .cm-scroller": {
51449
+ fontFamily: "var(--geist-mono)"
51450
+ },
51451
+ ".cm-gutters": {
51452
+ backgroundColor: "transparent",
51453
+ color: "var(--neutral2)",
51454
+ borderRight: "none"
51455
+ },
51456
+ ".cm-content": {
51457
+ color: "var(--neutral6)",
51458
+ caretColor: "var(--neutral6)"
51459
+ },
51460
+ ".cm-activeLine": {
51461
+ backgroundColor: "transparent"
51462
+ },
51463
+ ".cm-activeLineGutter": {
51464
+ backgroundColor: "transparent"
51465
+ },
51466
+ ".cm-cursor, .cm-dropCursor": {
51467
+ borderLeftColor: "var(--neutral6)"
51468
+ }
51469
+ });
51470
+ const highlightStyle = HighlightStyle.define([
51471
+ { tag: [tags.comment, tags.bracket], color: "var(--neutral2)" },
51472
+ { tag: [tags.string, tags.meta, tags.regexp], color: "var(--accent1)" },
51473
+ { tag: [tags.atom, tags.bool, tags.special(tags.variableName)], color: "var(--accent6)" },
51474
+ { tag: [tags.keyword, tags.operator, tags.tagName], color: "var(--accent2)" },
51475
+ { tag: [tags.function(tags.propertyName), tags.propertyName], color: "var(--accent5)" },
51476
+ {
51477
+ tag: [tags.definition(tags.variableName), tags.function(tags.variableName), tags.className, tags.attributeName],
51478
+ color: "var(--accent3)"
51479
+ },
51480
+ { tag: [tags.variableName, tags.number], color: "var(--accent5)" },
51481
+ { tag: [tags.name, tags.quote], color: "var(--accent1)" }
51482
+ ]);
51483
+ return [editorTheme, syntaxHighlighting(highlightStyle)];
51484
+ }
51414
51485
  const useCodemirrorTheme = () => {
51415
- return useMemo(
51416
- () => draculaInit({
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
- );
51486
+ const isDark = useIsDarkMode();
51487
+ return useMemo(() => isDark ? buildDarkTheme() : buildLightTheme(), [isDark]);
51429
51488
  };
51430
51489
  function DataDetailsPanelCodeSection({
51431
51490
  codeStr = "",
@@ -51475,10 +51534,10 @@ function DataDetailsPanelCodeSection({
51475
51534
  )
51476
51535
  ] })
51477
51536
  ] }),
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(
51537
+ /* @__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
51538
  CodeMirror,
51480
51539
  {
51481
- extensions: [json(), EditorView$1.lineWrapping],
51540
+ extensions: [json(), EditorView.lineWrapping],
51482
51541
  theme,
51483
51542
  value: codeStr,
51484
51543
  editable: false