@mastra/playground-ui 32.0.1 → 32.0.2-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/CHANGELOG.md +17 -0
- package/dist/index.cjs.js +13 -16
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +13 -16
- package/dist/index.es.js.map +1 -1
- package/dist/src/ds/primitives/portal-container.d.ts +4 -2
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @mastra/playground-ui
|
|
2
2
|
|
|
3
|
+
## 32.0.2-alpha.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fixed dropdown, combobox, select, and popover popups silently failing to render when opened outside a side panel (most visibly the model and provider pickers in the chat composer). The shared portal-container resolver now always falls back to the document body instead of leaking an unrenderable value. ([#17560](https://github.com/mastra-ai/mastra/pull/17560))
|
|
8
|
+
|
|
9
|
+
## 32.0.2-alpha.0
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Fixed combobox popups so model picker dropdowns open correctly outside side dialogs. ([#17556](https://github.com/mastra-ai/mastra/pull/17556))
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [[`fcf6027`](https://github.com/mastra-ai/mastra/commit/fcf602747f6771731dda268ff3493b836f9f0ee9), [`f82cc72`](https://github.com/mastra-ai/mastra/commit/f82cc72edca0ce636fe18abaf2598d89a0c6bcca), [`fcf6027`](https://github.com/mastra-ai/mastra/commit/fcf602747f6771731dda268ff3493b836f9f0ee9)]:
|
|
16
|
+
- @mastra/client-js@1.23.2-alpha.0
|
|
17
|
+
- @mastra/react@0.5.2-alpha.0
|
|
18
|
+
- @mastra/core@1.41.0-alpha.0
|
|
19
|
+
|
|
3
20
|
## 32.0.1
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/index.cjs.js
CHANGED
|
@@ -6505,15 +6505,16 @@ const comboboxStyles = {
|
|
|
6505
6505
|
error: "text-ui-sm text-accent2"
|
|
6506
6506
|
};
|
|
6507
6507
|
|
|
6508
|
-
const PortalContainerContext = React__namespace.createContext(
|
|
6508
|
+
const PortalContainerContext = React__namespace.createContext(void 0);
|
|
6509
6509
|
function PortalContainerProvider({
|
|
6510
6510
|
container,
|
|
6511
6511
|
children
|
|
6512
6512
|
}) {
|
|
6513
|
-
return /* @__PURE__ */ jsxRuntime.jsx(PortalContainerContext.Provider, { value: container, children });
|
|
6513
|
+
return /* @__PURE__ */ jsxRuntime.jsx(PortalContainerContext.Provider, { value: container ?? void 0, children });
|
|
6514
6514
|
}
|
|
6515
|
-
function usePortalContainer() {
|
|
6516
|
-
|
|
6515
|
+
function usePortalContainer(container) {
|
|
6516
|
+
const fromContext = React__namespace.useContext(PortalContainerContext);
|
|
6517
|
+
return container ?? fromContext ?? void 0;
|
|
6517
6518
|
}
|
|
6518
6519
|
|
|
6519
6520
|
const triggerVariantStyles = {
|
|
@@ -6538,8 +6539,7 @@ function Combobox({
|
|
|
6538
6539
|
error
|
|
6539
6540
|
}) {
|
|
6540
6541
|
const selectedOption = options.find((option) => option.value === value) ?? null;
|
|
6541
|
-
const
|
|
6542
|
-
const resolvedContainer = container ?? portalContainer;
|
|
6542
|
+
const resolvedContainer = usePortalContainer(container);
|
|
6543
6543
|
const handleSelect = (item) => {
|
|
6544
6544
|
if (item) {
|
|
6545
6545
|
onValueChange?.(item.value);
|
|
@@ -7116,9 +7116,8 @@ const SelectTrigger = React__namespace.forwardRef(
|
|
|
7116
7116
|
SelectTrigger.displayName = "SelectTrigger";
|
|
7117
7117
|
const SelectContent = React__namespace.forwardRef(
|
|
7118
7118
|
({ className, children, position: _position, container, side = "bottom", align = "start", sideOffset = 4, ...props }, ref) => {
|
|
7119
|
-
const
|
|
7120
|
-
|
|
7121
|
-
return /* @__PURE__ */ jsxRuntime.jsx(select.Select.Portal, { container: resolvedContainer ?? void 0, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7119
|
+
const resolvedContainer = usePortalContainer(container);
|
|
7120
|
+
return /* @__PURE__ */ jsxRuntime.jsx(select.Select.Portal, { container: resolvedContainer, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7122
7121
|
select.Select.Positioner,
|
|
7123
7122
|
{
|
|
7124
7123
|
className: "z-50 outline-none",
|
|
@@ -7566,8 +7565,8 @@ const DropdownMenuSubTrigger = React__namespace.forwardRef(
|
|
|
7566
7565
|
DropdownMenuSubTrigger.displayName = "DropdownMenuSubTrigger";
|
|
7567
7566
|
const DropdownMenuSubContent = React__namespace.forwardRef(
|
|
7568
7567
|
({ className, align = "start", alignOffset = -4, side = "right", sideOffset = 0, ...props }, ref) => {
|
|
7569
|
-
const
|
|
7570
|
-
return /* @__PURE__ */ jsxRuntime.jsx(menu.Menu.Portal, { container:
|
|
7568
|
+
const resolvedContainer = usePortalContainer();
|
|
7569
|
+
return /* @__PURE__ */ jsxRuntime.jsx(menu.Menu.Portal, { container: resolvedContainer, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7571
7570
|
menu.Menu.Positioner,
|
|
7572
7571
|
{
|
|
7573
7572
|
align,
|
|
@@ -7591,8 +7590,7 @@ const DropdownMenuSubContent = React__namespace.forwardRef(
|
|
|
7591
7590
|
DropdownMenuSubContent.displayName = "DropdownMenuSubContent";
|
|
7592
7591
|
const DropdownMenuContent = React__namespace.forwardRef(
|
|
7593
7592
|
({ className, container, align = "start", alignOffset = 0, side = "bottom", sideOffset = 8, ...props }, ref) => {
|
|
7594
|
-
const
|
|
7595
|
-
const resolvedContainer = container ?? portalContainer ?? void 0;
|
|
7593
|
+
const resolvedContainer = usePortalContainer(container);
|
|
7596
7594
|
return /* @__PURE__ */ jsxRuntime.jsx(menu.Menu.Portal, { container: resolvedContainer, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7597
7595
|
menu.Menu.Positioner,
|
|
7598
7596
|
{
|
|
@@ -8671,9 +8669,8 @@ PopoverTrigger.displayName = "PopoverTrigger";
|
|
|
8671
8669
|
const PopoverContent = React__namespace.forwardRef(
|
|
8672
8670
|
({ className, container, align = "center", alignOffset = 0, side = "bottom", sideOffset = 4, ...props }, ref) => {
|
|
8673
8671
|
const classNameString = typeof className === "string" ? className : void 0;
|
|
8674
|
-
const
|
|
8675
|
-
|
|
8676
|
-
return /* @__PURE__ */ jsxRuntime.jsx(popover.Popover.Portal, { container: resolvedContainer ?? void 0, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8672
|
+
const resolvedContainer = usePortalContainer(container);
|
|
8673
|
+
return /* @__PURE__ */ jsxRuntime.jsx(popover.Popover.Portal, { container: resolvedContainer, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8677
8674
|
popover.Popover.Positioner,
|
|
8678
8675
|
{
|
|
8679
8676
|
align,
|