@mastra/playground-ui 29.0.0-alpha.1 → 29.0.0-alpha.10

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.
Files changed (29) hide show
  1. package/CHANGELOG.md +220 -0
  2. package/dist/index.cjs.js +691 -337
  3. package/dist/index.cjs.js.map +1 -1
  4. package/dist/index.css +296 -112
  5. package/dist/index.es.js +692 -333
  6. package/dist/index.es.js.map +1 -1
  7. package/dist/src/domains/traces/components/traces-list-view.d.ts +5 -1
  8. package/dist/src/domains/traces/hooks/use-traces.d.ts +108 -8
  9. package/dist/src/ds/components/AlertDialog/alert-dialog.d.ts +27 -9
  10. package/dist/src/ds/components/Button/Button.d.ts +1 -1
  11. package/dist/src/ds/components/Button/index.d.ts +0 -1
  12. package/dist/src/ds/components/Collapsible/collapsible.d.ts +11 -4
  13. package/dist/src/ds/components/Command/command.d.ts +2 -1
  14. package/dist/src/ds/components/ContextMenu/context-menu.d.ts +43 -0
  15. package/dist/src/ds/components/ContextMenu/context-menu.stories.d.ts +11 -0
  16. package/dist/src/ds/components/ContextMenu/index.d.ts +1 -0
  17. package/dist/src/ds/components/DashboardCard/dashboard-card.stories.d.ts +1 -0
  18. package/dist/src/ds/components/Dialog/dialog.d.ts +27 -9
  19. package/dist/src/ds/components/DropdownMenu/dropdown-menu.d.ts +33 -20
  20. package/dist/src/ds/components/MainSidebar/main-sidebar-nav-link.d.ts +0 -1
  21. package/dist/src/ds/components/Popover/popover.d.ts +11 -5
  22. package/dist/src/ds/components/SectionCard/section-card.stories.d.ts +1 -0
  23. package/dist/src/ds/components/Slider/slider.d.ts +6 -3
  24. package/dist/src/ds/components/Slider/slider.stories.d.ts +4 -0
  25. package/dist/src/ds/components/Table/Table.d.ts +12 -11
  26. package/dist/src/ds/components/Txt/Txt.d.ts +4 -3
  27. package/dist/src/ds/icons/Icon.d.ts +4 -3
  28. package/package.json +8 -10
  29. package/dist/src/ds/components/Button/ButtonWithTooltip.d.ts +0 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,225 @@
1
1
  # @mastra/playground-ui
2
2
 
3
+ ## 29.0.0-alpha.10
4
+
5
+ ### Patch Changes
6
+
7
+ - Fixed a crash in filter menus with nested submenus (such as the Filter on the Agent review page) that showed "`MenuPortal` must be used within `Menu`". The submenu content now uses the design system's `DropdownMenu.SubContent` instead of the underlying library's portal directly. ([#16829](https://github.com/mastra-ai/mastra/pull/16829))
8
+
9
+ - Fixed type definitions and shared UI component types for `@mastra/playground-ui`. ([#16213](https://github.com/mastra-ai/mastra/pull/16213))
10
+
11
+ - `AlertDialog`'s API and behavior are unchanged — `asChild` on `AlertDialog.Trigger`, and `AlertDialog.Action` and `AlertDialog.Cancel`, all work exactly as before. (Internally it now builds on Base UI primitives.) ([#16824](https://github.com/mastra-ai/mastra/pull/16824))
12
+
13
+ - Moved the `Collapsible` component to Base UI, with a smoother height-based expand and collapse animation. The public API is unchanged — `asChild` on `CollapsibleTrigger` still works. ([#16825](https://github.com/mastra-ai/mastra/pull/16825))
14
+
15
+ - Upgraded `@base-ui/react` to 1.5, making popups noticeably faster — components built on Base UI such as `Tooltip`, `Popover`, `DropdownMenu` and `ContextMenu` now open and close more quickly. ([#16819](https://github.com/mastra-ai/mastra/pull/16819))
16
+
17
+ - Fixed the playground memory configuration display for agents using observationalMemory: true. ([#16213](https://github.com/mastra-ai/mastra/pull/16213))
18
+
19
+ - Updated dependencies [[`bd92c15`](https://github.com/mastra-ai/mastra/commit/bd92c154238ce5d05e12d5477da07c7b7292c5e3), [`bd92c15`](https://github.com/mastra-ai/mastra/commit/bd92c154238ce5d05e12d5477da07c7b7292c5e3), [`1698f5e`](https://github.com/mastra-ai/mastra/commit/1698f5ec141d34f22a873efdb145ce3cdf848a5e)]:
20
+ - @mastra/client-js@1.20.0-alpha.9
21
+ - @mastra/core@1.36.0-alpha.9
22
+ - @mastra/react@0.4.0-alpha.9
23
+
24
+ ## 29.0.0-alpha.9
25
+
26
+ ### Patch Changes
27
+
28
+ - Moved the `Dialog` component to Base UI. The public API is unchanged — `asChild` on `DialogTrigger` and `DialogClose` still works the same way, and open/close animations behave as before. ([#16821](https://github.com/mastra-ai/mastra/pull/16821))
29
+
30
+ ## 29.0.0-alpha.8
31
+
32
+ ### Minor Changes
33
+
34
+ - Added `ContextMenu` for right-click interactions. Supports submenus, checkbox and radio items, keyboard shortcuts, and a `destructive` variant for dangerous actions like delete. ([#16791](https://github.com/mastra-ai/mastra/pull/16791))
35
+
36
+ ```tsx
37
+ import { ContextMenu } from '@mastra/playground-ui';
38
+
39
+ <ContextMenu>
40
+ <ContextMenu.Trigger className="…">Right click here</ContextMenu.Trigger>
41
+ <ContextMenu.Content>
42
+ <ContextMenu.Item>Rename</ContextMenu.Item>
43
+ <ContextMenu.Item variant="destructive">Delete</ContextMenu.Item>
44
+ </ContextMenu.Content>
45
+ </ContextMenu>;
46
+ ```
47
+
48
+ ### Patch Changes
49
+
50
+ - Added a `destructive` variant on `DropdownMenu.Item` to highlight dangerous actions like delete. ([#16791](https://github.com/mastra-ai/mastra/pull/16791))
51
+
52
+ ```tsx
53
+ <DropdownMenu.Item variant="destructive">Delete project</DropdownMenu.Item>
54
+ ```
55
+
56
+ - `PopoverContent` no longer forwards the underlying library's auto-focus event handlers (`onOpenAutoFocus`, `onCloseAutoFocus`). To control focus when the popover opens or closes, use `initialFocus` and `finalFocus`. ([#16791](https://github.com/mastra-ai/mastra/pull/16791))
57
+
58
+ ```tsx
59
+ // Before
60
+ <PopoverContent onOpenAutoFocus={(e) => e.preventDefault()} />
61
+
62
+ // After
63
+ <PopoverContent initialFocus={false} />
64
+ ```
65
+
66
+ - Migrated the Slider component to base-ui with a refined neutral visual design. ([#16788](https://github.com/mastra-ai/mastra/pull/16788))
67
+
68
+ **What changed**
69
+ - Replaced `@radix-ui/react-slider` with `@base-ui/react/slider` as the underlying primitive
70
+ - Refreshed visuals: thin rounded thumb with white border and neutral inside, opacity-based track that adapts to any surface, neutral filled indicator (no green/accent color)
71
+ - Larger click target via padded `Slider.Control` and an invisible hit area on the thumb so it is easier to grab
72
+ - Added `cursor-pointer` on the control and `cursor-not-allowed` when disabled
73
+ - Removed the now unused `@radix-ui/react-slider` and `@radix-ui/react-tabs` dependencies
74
+
75
+ **API compatibility**
76
+
77
+ The public API is preserved. `onValueChange` and `onValueCommitted` are wrapped so consumers always receive `number[]`, even though base-ui returns `number | number[]` internally. Existing call sites like `<Slider value={[temperature]} onValueChange={value => setTemperature(value[0])} />` continue to work without changes.
78
+
79
+ - Updated dependencies [[`9aee493`](https://github.com/mastra-ai/mastra/commit/9aee493ed6089b5133472623dcce49934bf2d509)]:
80
+ - @mastra/core@1.36.0-alpha.8
81
+ - @mastra/client-js@1.20.0-alpha.8
82
+ - @mastra/react@0.4.0-alpha.8
83
+
84
+ ## 29.0.0-alpha.7
85
+
86
+ ### Patch Changes
87
+
88
+ - Updated dependencies [[`a935b0a`](https://github.com/mastra-ai/mastra/commit/a935b0a0977ae3f196b33ec7621f528069c82db0), [`a935b0a`](https://github.com/mastra-ai/mastra/commit/a935b0a0977ae3f196b33ec7621f528069c82db0)]:
89
+ - @mastra/core@1.36.0-alpha.7
90
+ - @mastra/react@0.4.0-alpha.7
91
+ - @mastra/client-js@1.20.0-alpha.7
92
+
93
+ ## 29.0.0-alpha.6
94
+
95
+ ### Patch Changes
96
+
97
+ - Updated dependencies [[`71a820b`](https://github.com/mastra-ai/mastra/commit/71a820b2353fa1406772c50760a3732058a8b337)]:
98
+ - @mastra/core@1.36.0-alpha.6
99
+ - @mastra/client-js@1.20.0-alpha.6
100
+ - @mastra/react@0.4.0-alpha.6
101
+
102
+ ## 29.0.0-alpha.5
103
+
104
+ ### Patch Changes
105
+
106
+ - Updated dependencies [[`ac79462`](https://github.com/mastra-ai/mastra/commit/ac79462b98f1062394c45093aa515b0766f27ee2), [`19281c7`](https://github.com/mastra-ai/mastra/commit/19281c70424f757219782de16c2699743c5e04d0)]:
107
+ - @mastra/core@1.36.0-alpha.5
108
+ - @mastra/client-js@1.20.0-alpha.5
109
+ - @mastra/react@0.4.0-alpha.5
110
+
111
+ ## 29.0.0-alpha.4
112
+
113
+ ### Minor Changes
114
+
115
+ - Refreshed Button + Card design system tokens. ([#16769](https://github.com/mastra-ai/mastra/pull/16769))
116
+
117
+ **Button variants (breaking)**: consolidated to `default`, `primary`, `outline`, `ghost`. The `cta`, `contrast`, and unused `link` variants have been removed. `primary` now uses a high-contrast `neutral6` fill instead of `surface4`, so it reads clearly as the form submit action in both themes.
118
+
119
+ ```tsx
120
+ // Before
121
+ <Button variant="cta">Save</Button>
122
+ <Button variant="contrast">Done</Button>
123
+ <Button variant="link">Open</Button>
124
+
125
+ // After
126
+ <Button variant="primary">Save</Button> // cta → primary (no brand green; theme-aware high contrast)
127
+ <Button variant="primary">Done</Button> // contrast → primary (same recipe, renamed)
128
+ <Button as="a" href="…" variant="ghost">Open</Button> // link → ghost (or plain <a> for inline text links)
129
+ ```
130
+
131
+ **New tokens**: `--surface-overlay-soft` and `--surface-overlay-strong` — alpha overlays of the opposite-theme color, used by `SectionCard` header strip and `DashboardCard` fill so cards read consistently on any surface.
132
+
133
+ **Other**:
134
+ - DashboardCard radius reduced to `rounded-xl` and padding tightened to `px-4 py-3` for better grid density.
135
+ - SectionCard wrapper no longer fills its background — header strip + border carry definition.
136
+ - Dark `surface2` / `surface3` darkened slightly (16.84% → 16%, 19.13% → 18%) so the main frame reads as a distinct surface.
137
+ - Dark `border1` / `border2` alphas bumped (6% → 7%, 10% → 11%) for closer dark/light parity.
138
+ - Removed deprecated `--section-card-*` tokens and their `@utility` blocks.
139
+
140
+ ### Patch Changes
141
+
142
+ - Updated dependencies [[`c272d50`](https://github.com/mastra-ai/mastra/commit/c272d50610a54496b6b6d92ccd4d37b333a2613a), [`d8692af`](https://github.com/mastra-ai/mastra/commit/d8692afa253028e39cdce2aafa0ac414071a762e), [`841a222`](https://github.com/mastra-ai/mastra/commit/841a222560d8c19238f8213713f30535cdd82284)]:
143
+ - @mastra/core@1.36.0-alpha.4
144
+ - @mastra/client-js@1.20.0-alpha.4
145
+ - @mastra/react@0.4.0-alpha.4
146
+
147
+ ## 29.0.0-alpha.3
148
+
149
+ ### Minor Changes
150
+
151
+ - Removed `ButtonWithTooltip` from `@mastra/playground-ui`. Use `Button` with the `tooltip` prop instead. ([#16719](https://github.com/mastra-ai/mastra/pull/16719))
152
+
153
+ **Migration**
154
+
155
+ ```tsx
156
+ // before
157
+ import { ButtonWithTooltip } from '@mastra/playground-ui';
158
+
159
+ <ButtonWithTooltip tooltipContent="Search">
160
+ <Search />
161
+ </ButtonWithTooltip>;
162
+
163
+ // after
164
+ import { Button } from '@mastra/playground-ui';
165
+
166
+ <Button tooltip="Search">
167
+ <Search />
168
+ </Button>;
169
+ ```
170
+
171
+ `tooltip` supports the same values as `tooltipContent`. Icon-only buttons that pass a string `tooltip` now also get it as their `aria-label` automatically, matching how labelled controls have always behaved. Pass an explicit `aria-label` to override.
172
+
173
+ ### Patch Changes
174
+
175
+ - The Traces list now updates live via delta polling. Previously the list was refetched every 10 seconds, replacing the whole page with no signal about what changed; now new traces appear within a few seconds of being created, with a brief highlight to draw attention. Status changes on already-visible rows (running → success / error) also propagate without intervention, and returning to the tab after being idle re-syncs from a fresh cursor. ([#16727](https://github.com/mastra-ai/mastra/pull/16727))
176
+
177
+ **New `useTraces` return fields**
178
+ - `isRefetching` — true while any meaningful refetch is in flight. Use it to drive a heartbeat indicator.
179
+ - `autoRefetch` / `setAutoRefetch` — pause / resume all automatic polling so the consumer can render an opt-out toggle.
180
+ - `recentlyAddedKeys` — `Set<string>` of `traceId:spanId` for rows that just arrived via delta polling. Drives the temporary highlight in `TracesListView`.
181
+
182
+ **New polling config**
183
+
184
+ Every timing in the hook is tunable per-instance via a new `polling` option:
185
+
186
+ ```ts
187
+ import { useTraces, type TracesPollingConfig } from '@mastra/playground-ui';
188
+
189
+ useTraces({
190
+ filters,
191
+ listMode,
192
+ polling: {
193
+ deltaPollIntervalMs: 10_000,
194
+ idleGuardThresholdMs: 5 * 60_000,
195
+ },
196
+ });
197
+ ```
198
+
199
+ Omitted fields fall through to the defaults (delta poll every 5s, idle reset after 15 min, status refresh every 60s, etc).
200
+
201
+ **TracesListView**
202
+
203
+ New optional `recentlyAddedKeys?: Set<string>` prop. Rows whose `traceId:spanId` is in the set get the `animate-row-highlight` class — a brief fade-out to transparent, added to `index.css`.
204
+
205
+ **Compatibility**
206
+
207
+ Requires `@mastra/server` and `@mastra/client-js` at the versions that ship the observability delta-polling endpoints, and a store that opts into delta polling (`@mastra/clickhouse`, `@mastra/duckdb`, and the in-memory store today). When unavailable — older server or a store without delta capability — the hook silently falls back to page-mode interval refetching. No consumer changes required.
208
+
209
+ - Updated dependencies [[`5556cc1`](https://github.com/mastra-ai/mastra/commit/5556cc1befec71518d84f826b3bfe3a079a9daf7), [`5499303`](https://github.com/mastra-ai/mastra/commit/54993032c1ebc09642625b78d2014e0cf84a3cae), [`3498b49`](https://github.com/mastra-ai/mastra/commit/3498b4946be94f4313cd817733589680dcda5278), [`e47bca7`](https://github.com/mastra-ai/mastra/commit/e47bca7b72866d3abd173b9f530ac4318113a8ff), [`0031d0f`](https://github.com/mastra-ai/mastra/commit/0031d0f13831d7843ac5d498734a7d92862e2ce3), [`3498b49`](https://github.com/mastra-ai/mastra/commit/3498b4946be94f4313cd817733589680dcda5278), [`359439b`](https://github.com/mastra-ai/mastra/commit/359439bb8c635e048176306828195f8297f50021)]:
210
+ - @mastra/core@1.36.0-alpha.3
211
+ - @mastra/client-js@1.20.0-alpha.3
212
+ - @mastra/react@0.4.0-alpha.3
213
+
214
+ ## 29.0.0-alpha.2
215
+
216
+ ### Patch Changes
217
+
218
+ - Updated dependencies [[`5ba7253`](https://github.com/mastra-ai/mastra/commit/5ba7253745c85e8df8012a76d954c640ffa336f7), [`6b25032`](https://github.com/mastra-ai/mastra/commit/6b250329fa4795b4d085cba4077c7998893c1d59), [`f73980d`](https://github.com/mastra-ai/mastra/commit/f73980d651eb5f7f1ab20582de4615a1b6f10fce), [`9c88701`](https://github.com/mastra-ai/mastra/commit/9c8870195b41a38dc40b6ba2aa55eda04df8fa69), [`9c88701`](https://github.com/mastra-ai/mastra/commit/9c8870195b41a38dc40b6ba2aa55eda04df8fa69), [`4e88dc6`](https://github.com/mastra-ai/mastra/commit/4e88dc6b89f154c0eae37221c8126be0c23c569f), [`19018f0`](https://github.com/mastra-ai/mastra/commit/19018f05722af74a5978781a7731a654b26f7f2a)]:
219
+ - @mastra/core@1.36.0-alpha.2
220
+ - @mastra/client-js@1.20.0-alpha.2
221
+ - @mastra/react@0.4.0-alpha.2
222
+
3
223
  ## 29.0.0-alpha.1
4
224
 
5
225
  ### Patch Changes