@mastra/playground-ui 20.0.2-alpha.0 → 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 CHANGED
@@ -1,5 +1,48 @@
1
1
  # @mastra/playground-ui
2
2
 
3
+ ## 21.0.0-alpha.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Fixed broken colors in DataDetailsPanelCodeSection when using Light theme by adding theme-aware CodeMirror styling and container classes ([#14923](https://github.com/mastra-ai/mastra/pull/14923))
8
+
9
+ - Reverted HorizontalBars layout to original inline style with label overlaid inside the bar and total displayed to the right ([#14919](https://github.com/mastra-ai/mastra/pull/14919))
10
+
11
+ - Updated dependencies [[`9a43b47`](https://github.com/mastra-ai/mastra/commit/9a43b476465e86c9aca381c2831066b5c33c999a), [`edf8f9d`](https://github.com/mastra-ai/mastra/commit/edf8f9d9cd671ffbc8533ac154da6c3386799b33)]:
12
+ - @mastra/core@1.21.0-alpha.0
13
+ - @mastra/client-js@1.12.0-alpha.0
14
+ - @mastra/react@0.2.21-alpha.0
15
+
16
+ ## 20.0.2
17
+
18
+ ### Patch Changes
19
+
20
+ - **New components for the Logs MVP** ([#14899](https://github.com/mastra-ai/mastra/pull/14899))
21
+ - `DataDetailsPanel` — composable detail panel with header, key-value list, code sections, and loading/empty states.
22
+ - `DataList` — generic data list with row links, top cells, skeleton loading, and pagination.
23
+ - `LogsDataList` — log-specific data list cells (level, date, time, entity, message).
24
+ - `SelectDataFilter` — dropdown filter with searchable categories, single/multi selection, and active count badge.
25
+
26
+ **`ListSearch`** now accepts a `size` prop to control input height:
27
+
28
+ ```tsx
29
+ <ListSearch size="sm" onSearch={handleSearch} label="Filter" placeholder="Search..." />
30
+ ```
31
+
32
+ - **Logs UI improvements** ([#14899](https://github.com/mastra-ai/mastra/pull/14899))
33
+ - Added `SelectDataFilter` dropdown component to the design system for reusable multi-category filtering with search, single/multi selection modes, and active filter count badge.
34
+ - Updated `LogsToolbar` with `SelectDataFilter` integration and a Reset button that appears when filters are active.
35
+ - Replaced custom `DetailRow` in log `SpanDetails` with `DataDetailsPanel.KeyValueList` for consistent key-value rendering.
36
+ - Improved `LogDetails` span button to disable when traceId is missing.
37
+ - Enabled line numbers and code folding in `DataDetailsPanelCodeSection` to match `SideDialogCodeSection` behavior.
38
+ - Fixed `bgColor` values in span type mapping to use valid CSS color strings.
39
+
40
+ - Updated dependencies [[`cbeec24`](https://github.com/mastra-ai/mastra/commit/cbeec24b3c97a1a296e7e461e66cc7f7d215dc50), [`cee146b`](https://github.com/mastra-ai/mastra/commit/cee146b5d858212e1df2b2730fc36d3ceda0e08d), [`aa0aeff`](https://github.com/mastra-ai/mastra/commit/aa0aeffa11efbef5e219fbd97bf43d263cfe3afe), [`2bcec65`](https://github.com/mastra-ai/mastra/commit/2bcec652d62b07eab15e9eb9822f70184526eede), [`ad9bded`](https://github.com/mastra-ai/mastra/commit/ad9bdedf86a824801f49928a8d40f6e31ff5450f), [`cbeec24`](https://github.com/mastra-ai/mastra/commit/cbeec24b3c97a1a296e7e461e66cc7f7d215dc50), [`208c0bb`](https://github.com/mastra-ai/mastra/commit/208c0bbacbf5a1da6318f2a0e0c544390e542ddc), [`f566ee7`](https://github.com/mastra-ai/mastra/commit/f566ee7d53a3da33a01103e2a5ac2070ddefe6b0)]:
41
+ - @mastra/core@1.20.0
42
+ - @mastra/client-js@1.11.2
43
+ - @mastra/ai-sdk@1.3.0
44
+ - @mastra/react@0.2.20
45
+
3
46
  ## 20.0.2-alpha.0
4
47
 
5
48
  ### Patch Changes
package/dist/index.cjs.js CHANGED
@@ -5569,7 +5569,7 @@ function CopyButton({
5569
5569
  ] });
5570
5570
  }
5571
5571
 
5572
- function buildDarkTheme() {
5572
+ function buildDarkTheme$1() {
5573
5573
  const baseTheme = codemirrorThemeDracula.draculaInit({
5574
5574
  settings: {
5575
5575
  fontFamily: "var(--geist-mono)",
@@ -5656,7 +5656,7 @@ function buildDarkTheme() {
5656
5656
  });
5657
5657
  return [baseTheme, customLineNumberTheme];
5658
5658
  }
5659
- function buildLightTheme() {
5659
+ function buildLightTheme$1() {
5660
5660
  const editorTheme = view.EditorView.theme({
5661
5661
  "&": {
5662
5662
  backgroundColor: "transparent",
@@ -5759,7 +5759,7 @@ function buildLightTheme() {
5759
5759
  }
5760
5760
  const useCodemirrorTheme$2 = () => {
5761
5761
  const isDark = useIsDarkMode();
5762
- return React.useMemo(() => isDark ? buildDarkTheme() : buildLightTheme(), [isDark]);
5762
+ return React.useMemo(() => isDark ? buildDarkTheme$1() : buildLightTheme$1(), [isDark]);
5763
5763
  };
5764
5764
  const CodeEditor = React.forwardRef(
5765
5765
  ({
@@ -42673,62 +42673,65 @@ function HorizontalBars({
42673
42673
  });
42674
42674
  const isStacked = segments.length > 1;
42675
42675
  return /* @__PURE__ */ jsxRuntime.jsxs(ScrollArea, { className: cn("w-full h-full", className), children: [
42676
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-3 mb-4 mt-2", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 flex items-center gap-4", children: segments.map((seg) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
42677
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "size-2 rounded-full", style: { backgroundColor: seg.color } }),
42678
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-ui-sm text-neutral3", children: seg.label })
42679
- ] }, seg.label)) }) }),
42676
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 mb-4 mt-2", children: [
42677
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 flex items-center gap-4", children: segments.map((seg) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
42678
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "size-2 rounded-full", style: { backgroundColor: seg.color } }),
42679
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-ui-sm text-neutral3", children: seg.label })
42680
+ ] }, seg.label)) }),
42681
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-ui-sm text-neutral2 pr-2", children: "Total" })
42682
+ ] }),
42680
42683
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid gap-3.5", children: sorted.map((d) => {
42681
42684
  const total = d.values.reduce((s, v) => s + v, 0);
42682
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-1", children: [
42683
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
42684
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-ui-sm text-neutral4 truncate", children: d.name }),
42685
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-ui-sm text-neutral4 tabular-nums shrink-0", children: fmt(total) })
42686
- ] }),
42687
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative h-5 w-full", children: /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
42688
- /* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
42689
- "div",
42690
- {
42691
- className: "absolute inset-y-0 left-0 cursor-default",
42692
- style: { width: `${maxVal > 0 ? total / maxVal * 100 : 0}%` },
42693
- children: segments.map((seg, si) => {
42694
- const val = d.values[si] ?? 0;
42695
- const pct = total > 0 ? val / total * 100 : 0;
42696
- const left = d.values.slice(0, si).reduce((s, v) => s + (total > 0 ? v / total * 100 : 0), 0);
42697
- const isLastWithValue = d.values.slice(si + 1).every((v) => !v);
42698
- if (isStacked) {
42685
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-14 h-6 ", children: [
42686
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative h-full flex-1 min-w-0", children: [
42687
+ /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
42688
+ /* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
42689
+ "div",
42690
+ {
42691
+ className: "absolute inset-y-0 left-0 cursor-default",
42692
+ style: { width: `${maxVal > 0 ? total / maxVal * 100 : 0}%` },
42693
+ children: segments.map((seg, si) => {
42694
+ const val = d.values[si] ?? 0;
42695
+ const pct = total > 0 ? val / total * 100 : 0;
42696
+ const left = d.values.slice(0, si).reduce((s, v) => s + (total > 0 ? v / total * 100 : 0), 0);
42697
+ const isLastWithValue = d.values.slice(si + 1).every((v) => !v);
42698
+ if (isStacked) {
42699
+ return /* @__PURE__ */ jsxRuntime.jsx(
42700
+ "div",
42701
+ {
42702
+ className: cn(
42703
+ "absolute inset-y-0",
42704
+ si === 0 && "rounded-l",
42705
+ isLastWithValue && "rounded-r"
42706
+ ),
42707
+ style: {
42708
+ left: `${left}%`,
42709
+ width: `${pct}%`,
42710
+ backgroundColor: seg.color
42711
+ }
42712
+ },
42713
+ seg.label
42714
+ );
42715
+ }
42699
42716
  return /* @__PURE__ */ jsxRuntime.jsx(
42700
42717
  "div",
42701
42718
  {
42702
- className: cn(
42703
- "absolute inset-y-0",
42704
- si === 0 && "rounded-l",
42705
- isLastWithValue && "rounded-r"
42706
- ),
42707
- style: {
42708
- left: `${left}%`,
42709
- width: `${pct}%`,
42710
- backgroundColor: seg.color
42711
- }
42719
+ className: "absolute inset-y-0 left-0 rounded",
42720
+ style: { width: `${pct}%`, backgroundColor: seg.color }
42712
42721
  },
42713
42722
  seg.label
42714
42723
  );
42715
- }
42716
- return /* @__PURE__ */ jsxRuntime.jsx(
42717
- "div",
42718
- {
42719
- className: "absolute inset-y-0 left-0 rounded",
42720
- style: { width: `${pct}%`, backgroundColor: seg.color }
42721
- },
42722
- seg.label
42723
- );
42724
- })
42725
- }
42726
- ) }),
42727
- /* @__PURE__ */ jsxRuntime.jsx(TooltipContent, { side: "top", className: "font-mono", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid gap-1", children: segments.map((seg, si) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
42728
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: seg.label }),
42729
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto pl-3", children: fmt(d.values[si] ?? 0) })
42730
- ] }, seg.label)) }) })
42731
- ] }) })
42724
+ })
42725
+ }
42726
+ ) }),
42727
+ /* @__PURE__ */ jsxRuntime.jsx(TooltipContent, { side: "top", className: "font-mono", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid gap-1", children: segments.map((seg, si) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
42728
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: seg.label }),
42729
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto pl-3", children: fmt(d.values[si] ?? 0) })
42730
+ ] }, seg.label)) }) })
42731
+ ] }),
42732
+ /* @__PURE__ */ jsxRuntime.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 })
42733
+ ] }),
42734
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-ui-md text-neutral4 tabular-nums shrink-0 pr-3", children: fmt(total) })
42732
42735
  ] }, d.name);
42733
42736
  }) })
42734
42737
  ] });
@@ -51443,21 +51446,66 @@ function DataDetailsPanelCloseButton({
51443
51446
  );
51444
51447
  }
51445
51448
 
51449
+ function buildDarkTheme() {
51450
+ return codemirrorThemeDracula.draculaInit({
51451
+ settings: {
51452
+ fontFamily: "var(--geist-mono)",
51453
+ fontSize: "0.75rem",
51454
+ lineHighlight: "transparent",
51455
+ gutterBackground: "transparent",
51456
+ gutterForeground: "#939393",
51457
+ background: "transparent"
51458
+ },
51459
+ styles: [{ tag: [highlight$1.tags.className, highlight$1.tags.propertyName] }]
51460
+ });
51461
+ }
51462
+ function buildLightTheme() {
51463
+ const editorTheme = view.EditorView.theme({
51464
+ "&": {
51465
+ backgroundColor: "transparent",
51466
+ color: "var(--neutral6)",
51467
+ fontSize: "0.75rem"
51468
+ },
51469
+ "&.cm-editor .cm-scroller": {
51470
+ fontFamily: "var(--geist-mono)"
51471
+ },
51472
+ ".cm-gutters": {
51473
+ backgroundColor: "transparent",
51474
+ color: "var(--neutral2)",
51475
+ borderRight: "none"
51476
+ },
51477
+ ".cm-content": {
51478
+ color: "var(--neutral6)",
51479
+ caretColor: "var(--neutral6)"
51480
+ },
51481
+ ".cm-activeLine": {
51482
+ backgroundColor: "transparent"
51483
+ },
51484
+ ".cm-activeLineGutter": {
51485
+ backgroundColor: "transparent"
51486
+ },
51487
+ ".cm-cursor, .cm-dropCursor": {
51488
+ borderLeftColor: "var(--neutral6)"
51489
+ }
51490
+ });
51491
+ const highlightStyle = language.HighlightStyle.define([
51492
+ { tag: [highlight$1.tags.comment, highlight$1.tags.bracket], color: "var(--neutral2)" },
51493
+ { tag: [highlight$1.tags.string, highlight$1.tags.meta, highlight$1.tags.regexp], color: "var(--accent1)" },
51494
+ { tag: [highlight$1.tags.atom, highlight$1.tags.bool, highlight$1.tags.special(highlight$1.tags.variableName)], color: "var(--accent6)" },
51495
+ { tag: [highlight$1.tags.keyword, highlight$1.tags.operator, highlight$1.tags.tagName], color: "var(--accent2)" },
51496
+ { tag: [highlight$1.tags.function(highlight$1.tags.propertyName), highlight$1.tags.propertyName], color: "var(--accent5)" },
51497
+ {
51498
+ tag: [highlight$1.tags.definition(highlight$1.tags.variableName), highlight$1.tags.function(highlight$1.tags.variableName), highlight$1.tags.className, highlight$1.tags.attributeName],
51499
+ color: "var(--accent3)"
51500
+ },
51501
+ { tag: [highlight$1.tags.variableName, highlight$1.tags.number], color: "var(--accent5)" },
51502
+ { tag: [highlight$1.tags.name, highlight$1.tags.quote], color: "var(--accent1)" }
51503
+ ]);
51504
+ return [editorTheme, language.syntaxHighlighting(highlightStyle)];
51505
+ }
51446
51506
  const useCodemirrorTheme = () => {
51447
- return React.useMemo(
51448
- () => codemirrorThemeDracula.draculaInit({
51449
- settings: {
51450
- fontFamily: "var(--geist-mono)",
51451
- fontSize: "0.75rem",
51452
- lineHighlight: "transparent",
51453
- gutterBackground: "transparent",
51454
- gutterForeground: "#939393",
51455
- background: "transparent"
51456
- },
51457
- styles: [{ tag: [highlight$1.tags.className, highlight$1.tags.propertyName] }]
51458
- }),
51459
- []
51460
- );
51507
+ const isDark = useIsDarkMode();
51508
+ return React.useMemo(() => isDark ? buildDarkTheme() : buildLightTheme(), [isDark]);
51461
51509
  };
51462
51510
  function DataDetailsPanelCodeSection({
51463
51511
  codeStr = "",
@@ -51507,10 +51555,10 @@ function DataDetailsPanelCodeSection({
51507
51555
  )
51508
51556
  ] })
51509
51557
  ] }),
51510
- /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx("div", { className: "text-neutral4 font-mono break-all", children: /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "text-wrap", children: finalCodeStr }) }) : /* @__PURE__ */ jsxRuntime.jsx(
51558
+ /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx("div", { className: "text-neutral4 font-mono break-all", children: /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "text-wrap", children: finalCodeStr }) }) : /* @__PURE__ */ jsxRuntime.jsx(
51511
51559
  CodeMirror,
51512
51560
  {
51513
- extensions: [langJson.json(), CodeMirror.EditorView.lineWrapping],
51561
+ extensions: [langJson.json(), view.EditorView.lineWrapping],
51514
51562
  theme,
51515
51563
  value: codeStr,
51516
51564
  editable: false