@mastra/playground-ui 31.0.0-alpha.6 → 31.0.0-alpha.9

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,71 @@
1
1
  # @mastra/playground-ui
2
2
 
3
+ ## 31.0.0-alpha.9
4
+
5
+ ### Patch Changes
6
+
7
+ - Fixed dropdowns, menus, comboboxes, and popovers being unclickable when opened inside a SideDialog (for example the dataset selector in the "Save as Dataset Item" panel on the Traces tab). These popups now render inside the dialog so they stay interactive within the modal drawer. ([#17479](https://github.com/mastra-ai/mastra/pull/17479))
8
+
9
+ - Updated dependencies [[`850af77`](https://github.com/mastra-ai/mastra/commit/850af7779cb87c350804488734544a5b1843de25), [`7b0d34c`](https://github.com/mastra-ai/mastra/commit/7b0d34cfe4a2fce22ac86ae17404685ff67a2ddb)]:
10
+ - @mastra/core@1.38.0-alpha.9
11
+ - @mastra/client-js@1.22.0-alpha.9
12
+ - @mastra/react@0.4.3-alpha.9
13
+
14
+ ## 31.0.0-alpha.8
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies [[`0c1ed1d`](https://github.com/mastra-ai/mastra/commit/0c1ed1d00c7d87b5ac99ca95896211a2fa9189fa), [`849efb9`](https://github.com/mastra-ai/mastra/commit/849efb9fca6dc976589c1f90a303fea618769109)]:
19
+ - @mastra/core@1.38.0-alpha.8
20
+ - @mastra/client-js@1.22.0-alpha.8
21
+ - @mastra/react@0.4.3-alpha.8
22
+
23
+ ## 31.0.0-alpha.7
24
+
25
+ ### Patch Changes
26
+
27
+ - Added a `DataPanel.SectionHeading` component for small-caps section labels (with an optional leading icon) inside a `DataPanel.Content`. `DataCodeSection` now renders through it, and `DataPanel.Header` hides its bottom border when the panel is collapsed (header-only) so an empty panel no longer shows a stray divider. ([#17464](https://github.com/mastra-ai/mastra/pull/17464))
28
+
29
+ ```tsx
30
+ <DataPanel.SectionHeading icon={<FileInputIcon />}>Input</DataPanel.SectionHeading>
31
+ ```
32
+
33
+ - Changed `Spinner` to render the new compact loader by default and added `variant="pulse"` for longer data-loading states. Removed the `color` prop so the loader defaults to the neutral text token and color overrides go through `className`. ([#17455](https://github.com/mastra-ai/mastra/pull/17455))
34
+
35
+ **Migration note**
36
+
37
+ Before:
38
+
39
+ ```tsx
40
+ <Spinner color={Colors.neutral3} />
41
+ ```
42
+
43
+ After:
44
+
45
+ ```tsx
46
+ <Spinner className="text-neutral3" />
47
+ <Spinner variant="pulse" className="text-neutral1" />
48
+ ```
49
+
50
+ - Added an `is404NotFoundError` helper to detect 404 Not Found responses from the Mastra client, alongside the existing `is401UnauthorizedError` and `is403ForbiddenError` helpers. Use it to show a clear not-found state when a resource no longer exists. ([#17460](https://github.com/mastra-ai/mastra/pull/17460))
51
+
52
+ ```ts
53
+ import { is404NotFoundError } from '@mastra/playground-ui';
54
+
55
+ try {
56
+ await client.getDataset(id);
57
+ } catch (error) {
58
+ if (is404NotFoundError(error)) {
59
+ // show a not-found state instead of a generic error
60
+ }
61
+ }
62
+ ```
63
+
64
+ - Updated dependencies:
65
+ - @mastra/core@1.38.0-alpha.7
66
+ - @mastra/client-js@1.22.0-alpha.7
67
+ - @mastra/react@0.4.3-alpha.7
68
+
3
69
  ## 31.0.0-alpha.6
4
70
 
5
71
  ### Patch Changes
package/dist/index.cjs.js CHANGED
@@ -3414,7 +3414,7 @@ const focusRing = {
3414
3414
  visible: "focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-accent1 focus-visible:shadow-focus-ring"
3415
3415
  };
3416
3416
 
3417
- const sizeClasses$4 = {
3417
+ const sizeClasses$3 = {
3418
3418
  sm: "h-avatar-sm w-avatar-sm",
3419
3419
  md: "h-avatar-md w-avatar-md",
3420
3420
  lg: "h-avatar-lg w-avatar-lg"
@@ -3428,7 +3428,7 @@ const Avatar = ({ src, name, size = "sm", interactive = false, color, textColor
3428
3428
  "div",
3429
3429
  {
3430
3430
  className: cn(
3431
- sizeClasses$4[size],
3431
+ sizeClasses$3[size],
3432
3432
  "border border-border1 shrink-0 overflow-hidden rounded-full flex items-center justify-center",
3433
3433
  !showFallbackTint && "bg-surface3",
3434
3434
  transitions.all,
@@ -5880,7 +5880,7 @@ const LogoWithoutText = (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns
5880
5880
  ) });
5881
5881
 
5882
5882
  const PATH_D = "M4.49805 11.6934C6.98237 11.6934 8.99609 13.7081 8.99609 16.1924C8.9959 18.6765 6.98225 20.6904 4.49805 20.6904C2.01394 20.6903 0.000196352 18.6765 0 16.1924C0 13.7081 2.01382 11.6935 4.49805 11.6934ZM10.3867 0C12.8709 0 14.8846 2.01388 14.8848 4.49805C14.8848 4.8377 14.847 5.16846 14.7755 5.48643C14.4618 6.88139 14.1953 8.4633 14.9928 9.65L16.2575 11.5319C16.3363 11.6491 16.4727 11.7115 16.6137 11.703C16.7369 11.6957 16.8525 11.6343 16.9214 11.5318L18.1876 9.64717C18.9772 8.47198 18.7236 6.90783 18.4205 5.52484C18.3523 5.21392 18.3164 4.89094 18.3164 4.55957C18.3167 2.07546 20.3313 0.0615234 22.8154 0.0615234C25.2994 0.0617476 27.3132 2.0756 27.3135 4.55957C27.3135 4.93883 27.2665 5.30712 27.178 5.65896C26.8547 6.94441 26.5817 8.37932 27.2446 9.52714L28.459 11.6301C28.4819 11.6697 28.5245 11.6934 28.5703 11.6934C31.0545 11.6935 33.0684 13.7081 33.0684 16.1924C33.0682 18.6765 31.0544 20.6903 28.5703 20.6904C26.0861 20.6904 24.0725 18.6765 24.0723 16.1924C24.0723 15.8049 24.1212 15.4288 24.2133 15.0701C24.5458 13.7746 24.8298 12.3251 24.1609 11.1668L23.0044 9.16384C22.9656 9.09659 22.8931 9.05859 22.8154 9.05859C22.7983 9.05859 22.7824 9.06614 22.7728 9.08033L21.4896 10.9895C20.686 12.1851 20.9622 13.781 21.284 15.1851C21.3582 15.5089 21.3975 15.8461 21.3975 16.1924C21.3973 18.6764 19.3834 20.6902 16.8994 20.6904C14.4152 20.6904 12.4006 18.6765 12.4004 16.1924C12.4004 15.932 12.4226 15.6768 12.4651 15.4286C12.6859 14.14 12.8459 12.7122 12.1167 11.6271L11.2419 10.3253C10.6829 9.49347 9.71913 9.05932 8.78286 8.70188C7.0906 8.05584 5.88867 6.41734 5.88867 4.49805C5.88886 2.0139 7.90254 3.29835e-05 10.3867 0Z";
5883
- const sizeClasses$3 = {
5883
+ const sizeClasses$2 = {
5884
5884
  sm: "w-6",
5885
5885
  md: "w-10"
5886
5886
  };
@@ -5909,7 +5909,7 @@ function Logo({ className, size = "md", animateOnHover = false, "aria-label": ar
5909
5909
  onAnimationEnd: handleAnimationEnd,
5910
5910
  className: cn(
5911
5911
  "logo inline-block text-neutral6",
5912
- sizeClasses$3[size],
5912
+ sizeClasses$2[size],
5913
5913
  animateOnHover && playing && "logo-animate-on-hover",
5914
5914
  className
5915
5915
  ),
@@ -6505,6 +6505,17 @@ const comboboxStyles = {
6505
6505
  error: "text-ui-sm text-accent2"
6506
6506
  };
6507
6507
 
6508
+ const PortalContainerContext = React__namespace.createContext(null);
6509
+ function PortalContainerProvider({
6510
+ container,
6511
+ children
6512
+ }) {
6513
+ return /* @__PURE__ */ jsxRuntime.jsx(PortalContainerContext.Provider, { value: container, children });
6514
+ }
6515
+ function usePortalContainer() {
6516
+ return React__namespace.useContext(PortalContainerContext);
6517
+ }
6518
+
6508
6519
  const triggerVariantStyles = {
6509
6520
  default: comboboxStyles.triggerDefault,
6510
6521
  ghost: comboboxStyles.triggerGhost,
@@ -6527,6 +6538,8 @@ function Combobox({
6527
6538
  error
6528
6539
  }) {
6529
6540
  const selectedOption = options.find((option) => option.value === value) ?? null;
6541
+ const portalContainer = usePortalContainer();
6542
+ const resolvedContainer = container ?? portalContainer;
6530
6543
  const handleSelect = (item) => {
6531
6544
  if (item) {
6532
6545
  onValueChange?.(item.value);
@@ -6562,7 +6575,7 @@ function Combobox({
6562
6575
  ]
6563
6576
  }
6564
6577
  ),
6565
- /* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.Portal, { container, children: /* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.Positioner, { align: "start", sideOffset: 4, className: comboboxStyles.positioner, children: /* @__PURE__ */ jsxRuntime.jsxs(combobox.Combobox.Popup, { className: comboboxStyles.popup, children: [
6578
+ /* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.Portal, { container: resolvedContainer, children: /* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.Positioner, { align: "start", sideOffset: 4, className: comboboxStyles.positioner, children: /* @__PURE__ */ jsxRuntime.jsxs(combobox.Combobox.Popup, { className: comboboxStyles.popup, children: [
6566
6579
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: comboboxStyles.searchContainer, children: [
6567
6580
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: comboboxStyles.searchIcon }),
6568
6581
  /* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.Input, { className: comboboxStyles.searchInput, placeholder: searchPlaceholder })
@@ -7102,30 +7115,34 @@ const SelectTrigger = React__namespace.forwardRef(
7102
7115
  );
7103
7116
  SelectTrigger.displayName = "SelectTrigger";
7104
7117
  const SelectContent = React__namespace.forwardRef(
7105
- ({ className, children, position: _position, container, side = "bottom", align = "start", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(select.Select.Portal, { container: container ?? void 0, children: /* @__PURE__ */ jsxRuntime.jsx(
7106
- select.Select.Positioner,
7107
- {
7108
- className: "z-50 outline-none",
7109
- side,
7110
- align,
7111
- sideOffset,
7112
- alignItemWithTrigger: false,
7113
- children: /* @__PURE__ */ jsxRuntime.jsx(
7114
- select.Select.Popup,
7115
- {
7116
- ref,
7117
- className: cn(
7118
- "relative z-50 min-w-32 min-w-[var(--anchor-width)] max-h-dropdown-max-height max-h-[var(--available-height)] overflow-y-auto overflow-x-hidden rounded-xl border border-border1 bg-surface3 p-1 text-neutral4 shadow-dialog origin-[var(--transform-origin)]",
7119
- "data-[open]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[open]:fade-in-0 data-[closed]:zoom-out-95 data-[open]:zoom-in-95",
7120
- "data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1",
7121
- className
7122
- ),
7123
- ...props,
7124
- children: /* @__PURE__ */ jsxRuntime.jsx(select.Select.List, { children })
7125
- }
7126
- )
7127
- }
7128
- ) })
7118
+ ({ className, children, position: _position, container, side = "bottom", align = "start", sideOffset = 4, ...props }, ref) => {
7119
+ const portalContainer = usePortalContainer();
7120
+ const resolvedContainer = container ?? portalContainer;
7121
+ return /* @__PURE__ */ jsxRuntime.jsx(select.Select.Portal, { container: resolvedContainer ?? void 0, children: /* @__PURE__ */ jsxRuntime.jsx(
7122
+ select.Select.Positioner,
7123
+ {
7124
+ className: "z-50 outline-none",
7125
+ side,
7126
+ align,
7127
+ sideOffset,
7128
+ alignItemWithTrigger: false,
7129
+ children: /* @__PURE__ */ jsxRuntime.jsx(
7130
+ select.Select.Popup,
7131
+ {
7132
+ ref,
7133
+ className: cn(
7134
+ "relative z-50 min-w-32 min-w-[var(--anchor-width)] max-h-dropdown-max-height max-h-[var(--available-height)] overflow-y-auto overflow-x-hidden rounded-xl border border-border1 bg-surface3 p-1 text-neutral4 shadow-dialog origin-[var(--transform-origin)]",
7135
+ "data-[open]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[open]:fade-in-0 data-[closed]:zoom-out-95 data-[open]:zoom-in-95",
7136
+ "data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1",
7137
+ className
7138
+ ),
7139
+ ...props,
7140
+ children: /* @__PURE__ */ jsxRuntime.jsx(select.Select.List, { children })
7141
+ }
7142
+ )
7143
+ }
7144
+ ) });
7145
+ }
7129
7146
  );
7130
7147
  SelectContent.displayName = "SelectContent";
7131
7148
  const SelectItem = React__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
@@ -7548,47 +7565,54 @@ const DropdownMenuSubTrigger = React__namespace.forwardRef(
7548
7565
  );
7549
7566
  DropdownMenuSubTrigger.displayName = "DropdownMenuSubTrigger";
7550
7567
  const DropdownMenuSubContent = React__namespace.forwardRef(
7551
- ({ className, align = "start", alignOffset = -4, side = "right", sideOffset = 0, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(menu.Menu.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
7552
- menu.Menu.Positioner,
7553
- {
7554
- align,
7555
- alignOffset,
7556
- side,
7557
- sideOffset,
7558
- className: "z-50 outline-none",
7559
- children: /* @__PURE__ */ jsxRuntime.jsx(
7560
- menu.Menu.Popup,
7561
- {
7562
- ref,
7563
- "data-slot": "dropdown-menu-sub-content",
7564
- className: cn(popupClass, className),
7565
- ...props
7566
- }
7567
- )
7568
- }
7569
- ) })
7568
+ ({ className, align = "start", alignOffset = -4, side = "right", sideOffset = 0, ...props }, ref) => {
7569
+ const portalContainer = usePortalContainer();
7570
+ return /* @__PURE__ */ jsxRuntime.jsx(menu.Menu.Portal, { container: portalContainer ?? void 0, children: /* @__PURE__ */ jsxRuntime.jsx(
7571
+ menu.Menu.Positioner,
7572
+ {
7573
+ align,
7574
+ alignOffset,
7575
+ side,
7576
+ sideOffset,
7577
+ className: "z-50 outline-none",
7578
+ children: /* @__PURE__ */ jsxRuntime.jsx(
7579
+ menu.Menu.Popup,
7580
+ {
7581
+ ref,
7582
+ "data-slot": "dropdown-menu-sub-content",
7583
+ className: cn(popupClass, className),
7584
+ ...props
7585
+ }
7586
+ )
7587
+ }
7588
+ ) });
7589
+ }
7570
7590
  );
7571
7591
  DropdownMenuSubContent.displayName = "DropdownMenuSubContent";
7572
7592
  const DropdownMenuContent = React__namespace.forwardRef(
7573
- ({ className, container, align = "start", alignOffset = 0, side = "bottom", sideOffset = 8, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(menu.Menu.Portal, { container, children: /* @__PURE__ */ jsxRuntime.jsx(
7574
- menu.Menu.Positioner,
7575
- {
7576
- align,
7577
- alignOffset,
7578
- side,
7579
- sideOffset,
7580
- className: "z-50 outline-none",
7581
- children: /* @__PURE__ */ jsxRuntime.jsx(
7582
- menu.Menu.Popup,
7583
- {
7584
- ref,
7585
- "data-slot": "dropdown-menu-content",
7586
- className: cn(popupClass, className),
7587
- ...props
7588
- }
7589
- )
7590
- }
7591
- ) })
7593
+ ({ className, container, align = "start", alignOffset = 0, side = "bottom", sideOffset = 8, ...props }, ref) => {
7594
+ const portalContainer = usePortalContainer();
7595
+ const resolvedContainer = container ?? portalContainer ?? void 0;
7596
+ return /* @__PURE__ */ jsxRuntime.jsx(menu.Menu.Portal, { container: resolvedContainer, children: /* @__PURE__ */ jsxRuntime.jsx(
7597
+ menu.Menu.Positioner,
7598
+ {
7599
+ align,
7600
+ alignOffset,
7601
+ side,
7602
+ sideOffset,
7603
+ className: "z-50 outline-none",
7604
+ children: /* @__PURE__ */ jsxRuntime.jsx(
7605
+ menu.Menu.Popup,
7606
+ {
7607
+ ref,
7608
+ "data-slot": "dropdown-menu-content",
7609
+ className: cn(popupClass, className),
7610
+ ...props
7611
+ }
7612
+ )
7613
+ }
7614
+ ) });
7615
+ }
7592
7616
  );
7593
7617
  DropdownMenuContent.displayName = "DropdownMenuContent";
7594
7618
  const DropdownMenuItem = React__namespace.forwardRef(
@@ -8452,33 +8476,53 @@ function MetricsCardError({
8452
8476
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col gap-3 items-center justify-center", className), children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-ui-sm text-accent2", children: message }) });
8453
8477
  }
8454
8478
 
8455
- const sizeClasses$2 = {
8456
- sm: "w-4 h-4",
8457
- md: "w-6 h-6",
8458
- lg: "w-8 h-8"
8459
- };
8460
- function Spinner({ color, className, size = "md" }) {
8479
+ const spinnerVariants = cva("spinner inline-block text-neutral6", {
8480
+ variants: {
8481
+ size: {
8482
+ sm: "w-4 h-4",
8483
+ md: "w-6 h-6"
8484
+ },
8485
+ variant: {
8486
+ default: "",
8487
+ pulse: ""
8488
+ }
8489
+ },
8490
+ defaultVariants: {
8491
+ size: "md",
8492
+ variant: "default"
8493
+ }
8494
+ });
8495
+ function Spinner({
8496
+ className,
8497
+ size = "md",
8498
+ variant = "default",
8499
+ "aria-label": ariaLabel = "Loading",
8500
+ role = "status",
8501
+ ...props
8502
+ }) {
8503
+ const resolvedSize = size ?? "md";
8504
+ const resolvedVariant = variant ?? "default";
8461
8505
  return /* @__PURE__ */ jsxRuntime.jsx(
8462
8506
  "svg",
8463
8507
  {
8464
- className: cn("animate-spin", sizeClasses$2[size], className),
8465
- style: { animationDuration: "800ms", animationTimingFunction: "cubic-bezier(0.4, 0, 0.2, 1)" },
8508
+ ...props,
8509
+ role,
8510
+ "aria-label": ariaLabel,
8511
+ "data-size": resolvedSize,
8512
+ "data-variant": resolvedVariant,
8513
+ className: cn(spinnerVariants({ size: resolvedSize, variant: resolvedVariant }), className),
8466
8514
  xmlns: "http://www.w3.org/2000/svg",
8467
- width: "24",
8468
- height: "24",
8469
8515
  viewBox: "0 0 24 24",
8470
- fill: "none",
8471
- stroke: "currentColor",
8472
- strokeWidth: "2.5",
8473
- strokeLinecap: "round",
8474
- strokeLinejoin: "round",
8475
- children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M21 12a9 9 0 1 1-6.219-8.56", stroke: color || "currentColor", className: "text-accent1" })
8516
+ children: resolvedVariant === "pulse" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
8517
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { className: "spinner-pulse-ring", cx: "12", cy: "12", r: "7" }),
8518
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { className: "spinner-pulse-core", cx: "12", cy: "12", r: "5" })
8519
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx("circle", { className: "spinner-ring", cx: "12", cy: "12", r: "8.5" })
8476
8520
  }
8477
8521
  );
8478
8522
  }
8479
8523
 
8480
8524
  function MetricsCardLoading({ className }) {
8481
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex items-center justify-center", className), children: /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: "md", color: tokens.Colors.neutral1 }) });
8525
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex items-center justify-center", className), children: /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: "md", variant: "pulse", className: "text-neutral1" }) });
8482
8526
  }
8483
8527
 
8484
8528
  function MetricsCardNoData({ message = "No data yet", className }) {
@@ -8565,7 +8609,7 @@ function MetricsKpiCardLabel({ children, className }) {
8565
8609
  }
8566
8610
 
8567
8611
  function MetricsKpiCardLoading({ className }) {
8568
- return /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-sm", className), children: /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: "md", color: tokens.Colors.neutral1 }) });
8612
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-sm", className), children: /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: "md", variant: "pulse", className: "text-neutral1" }) });
8569
8613
  }
8570
8614
 
8571
8615
  function MetricsKpiCardNoChange({
@@ -8625,9 +8669,11 @@ const PopoverTrigger = React__namespace.forwardRef(
8625
8669
  );
8626
8670
  PopoverTrigger.displayName = "PopoverTrigger";
8627
8671
  const PopoverContent = React__namespace.forwardRef(
8628
- ({ className, align = "center", alignOffset = 0, side = "bottom", sideOffset = 4, ...props }, ref) => {
8672
+ ({ className, container, align = "center", alignOffset = 0, side = "bottom", sideOffset = 4, ...props }, ref) => {
8629
8673
  const classNameString = typeof className === "string" ? className : void 0;
8630
- return /* @__PURE__ */ jsxRuntime.jsx(popover.Popover.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
8674
+ const portalContainer = usePortalContainer();
8675
+ const resolvedContainer = container ?? portalContainer;
8676
+ return /* @__PURE__ */ jsxRuntime.jsx(popover.Popover.Portal, { container: resolvedContainer ?? void 0, children: /* @__PURE__ */ jsxRuntime.jsx(
8631
8677
  popover.Popover.Positioner,
8632
8678
  {
8633
8679
  align,
@@ -8951,7 +8997,7 @@ function PickMultiPanel({ field, tokens, onChange }) {
8951
8997
  }
8952
8998
  ),
8953
8999
  field.isLoading ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 px-2 py-1.5 text-ui-sm text-neutral3", children: [
8954
- /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: "sm", className: "w-3 h-3", color: "var(--neutral3)" }),
9000
+ /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: "sm", className: "size-3 text-neutral3" }),
8955
9001
  "Loading options…"
8956
9002
  ] }) : filteredOptions.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-2 py-1.5 text-ui-sm text-neutral3", children: field.emptyText ?? "No option found." }) : field.multi ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-[80dvh] overflow-auto", children: filteredOptions.map((option) => {
8957
9003
  const checked = selectedValues.includes(option.value);
@@ -12259,6 +12305,7 @@ function SideDialogRoot({
12259
12305
  className
12260
12306
  }) {
12261
12307
  const isConfirmation = variant === "confirmation";
12308
+ const [portalHost, setPortalHost] = React__namespace.useState(null);
12262
12309
  return /* @__PURE__ */ jsxRuntime.jsx(
12263
12310
  Drawer,
12264
12311
  {
@@ -12303,7 +12350,8 @@ function SideDialogRoot({
12303
12350
  )
12304
12351
  }
12305
12352
  ),
12306
- /* @__PURE__ */ jsxRuntime.jsx(
12353
+ /* @__PURE__ */ jsxRuntime.jsx(DrawerInteractive, { render: /* @__PURE__ */ jsxRuntime.jsx("div", { ref: setPortalHost, className: "absolute" }) }),
12354
+ /* @__PURE__ */ jsxRuntime.jsx(PortalContainerProvider, { container: portalHost, children: /* @__PURE__ */ jsxRuntime.jsx(
12307
12355
  "div",
12308
12356
  {
12309
12357
  className: cn("grid h-full", {
@@ -12311,7 +12359,7 @@ function SideDialogRoot({
12311
12359
  }),
12312
12360
  children
12313
12361
  }
12314
- )
12362
+ ) })
12315
12363
  ]
12316
12364
  }
12317
12365
  ) })
@@ -14611,6 +14659,22 @@ CardContent.displayName = "CardContent";
14611
14659
  const CardFooter = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex items-center p-4 pt-0", className), ...props }));
14612
14660
  CardFooter.displayName = "CardFooter";
14613
14661
 
14662
+ function DataPanelSectionHeading({ icon, className, children }) {
14663
+ return /* @__PURE__ */ jsxRuntime.jsxs(
14664
+ "div",
14665
+ {
14666
+ className: cn(
14667
+ "flex items-center gap-1.5 text-ui-sm uppercase tracking-widest text-neutral2 [&>svg]:size-3.5",
14668
+ className
14669
+ ),
14670
+ children: [
14671
+ icon,
14672
+ children
14673
+ ]
14674
+ }
14675
+ );
14676
+ }
14677
+
14614
14678
  const setSearchQuery = state.StateEffect.define();
14615
14679
  const searchHighlightMark = view.Decoration.mark({ class: "cm-search-match" });
14616
14680
  const searchHighlightField = state.StateField.define({
@@ -14801,19 +14865,7 @@ function DataCodeSection({
14801
14865
  if (!codeStr || codeStr === "null") return null;
14802
14866
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-2", className), children: [
14803
14867
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
14804
- /* @__PURE__ */ jsxRuntime.jsxs(
14805
- "div",
14806
- {
14807
- className: cn(
14808
- "flex items-center gap-1.5 text-ui-sm uppercase tracking-widest text-neutral2",
14809
- "[&>svg]:size-3.5"
14810
- ),
14811
- children: [
14812
- icon,
14813
- title
14814
- ]
14815
- }
14816
- ),
14868
+ /* @__PURE__ */ jsxRuntime.jsx(DataPanelSectionHeading, { icon, children: title }),
14817
14869
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
14818
14870
  !usePlainTextView && /* @__PURE__ */ jsxRuntime.jsx(
14819
14871
  SearchFieldBlock,
@@ -15103,7 +15155,7 @@ const DataDetailsPanelKeyValueList = Object.assign(Root, {
15103
15155
 
15104
15156
  function DataDetailsPanelLoadingData({ children }) {
15105
15157
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-2 px-4 py-6 text-ui-sm text-neutral3", children: [
15106
- /* @__PURE__ */ jsxRuntime.jsx(Spinner, {}),
15158
+ /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: "sm", variant: "pulse", className: "text-neutral3" }),
15107
15159
  " ",
15108
15160
  children ?? "Loading..."
15109
15161
  ] });
@@ -15250,7 +15302,13 @@ function DataPanelHeader({ className, children }) {
15250
15302
  return /* @__PURE__ */ jsxRuntime.jsx(
15251
15303
  "div",
15252
15304
  {
15253
- className: cn("flex items-center justify-between gap-2 border-b border-border1 mx-4 py-3 min-h-14", className),
15305
+ className: cn(
15306
+ "flex items-center justify-between gap-2 mx-4 py-3 min-h-14",
15307
+ // Bottom border only when something follows the header (i.e. the panel is expanded).
15308
+ // When the panel is collapsed and the header is the only child, the border auto-hides.
15309
+ "not-last:border-b not-last:border-border1",
15310
+ className
15311
+ ),
15254
15312
  children
15255
15313
  }
15256
15314
  );
@@ -15262,7 +15320,7 @@ function DataPanelHeading({ className, children }) {
15262
15320
 
15263
15321
  function DataPanelLoadingData({ children }) {
15264
15322
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-2 px-4 py-6 text-ui-sm text-neutral2 min-h-32", children: [
15265
- /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: "sm", color: tokens.Colors.neutral1 }),
15323
+ /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: "sm", variant: "pulse", className: "text-neutral1" }),
15266
15324
  " ",
15267
15325
  children ?? "Loading..."
15268
15326
  ] });
@@ -15305,7 +15363,8 @@ const DataPanel = Object.assign(DataPanelRoot, {
15305
15363
  LoadingData: DataPanelLoadingData,
15306
15364
  NoData: DataPanelNoData,
15307
15365
  Content: DataPanelContent,
15308
- CodeSection: DataCodeSection
15366
+ CodeSection: DataCodeSection,
15367
+ SectionHeading: DataPanelSectionHeading
15309
15368
  });
15310
15369
 
15311
15370
  const DATE_PRESETS$1 = [
@@ -16092,6 +16151,22 @@ function is403ForbiddenError(error) {
16092
16151
  }
16093
16152
  return false;
16094
16153
  }
16154
+ function is404NotFoundError(error) {
16155
+ if (!error || typeof error !== "object") return false;
16156
+ if ("status" in error && error.status === 404) {
16157
+ return true;
16158
+ }
16159
+ if ("statusCode" in error && error.statusCode === 404) {
16160
+ return true;
16161
+ }
16162
+ if ("message" in error) {
16163
+ const message = error.message;
16164
+ if (typeof message === "string") {
16165
+ return /\bstatus:\s*404\b/.test(message);
16166
+ }
16167
+ }
16168
+ return false;
16169
+ }
16095
16170
  function isBranchesNotSupportedError(error) {
16096
16171
  if (!error || typeof error !== "object" || !("message" in error)) return false;
16097
16172
  const message = error.message;
@@ -20106,7 +20181,8 @@ function TraceDataPanelView({
20106
20181
  timelineChartWidth = "default",
20107
20182
  LinkComponent,
20108
20183
  traceHref,
20109
- anchorSpanId
20184
+ anchorSpanId,
20185
+ showUnavailableFeaturesMsg = true
20110
20186
  }) {
20111
20187
  const isOnTracePage = placement === "trace-page";
20112
20188
  const [internalCollapsed, setInternalCollapsed] = React.useState(false);
@@ -20171,7 +20247,7 @@ function TraceDataPanelView({
20171
20247
  children: collapsed ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronsUpDownIcon, {}) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronsDownUpIcon, {})
20172
20248
  }
20173
20249
  ),
20174
- /* @__PURE__ */ jsxRuntime.jsx(
20250
+ (onPrevious || onNext) && /* @__PURE__ */ jsxRuntime.jsx(
20175
20251
  DataPanel.NextPrevNav,
20176
20252
  {
20177
20253
  onPrevious,
@@ -20206,7 +20282,7 @@ function TraceDataPanelView({
20206
20282
  "Save as Dataset Item"
20207
20283
  ] })
20208
20284
  ] }),
20209
- !isOnTracePage && !onEvaluateTrace && !onSaveAsDatasetItem && /* @__PURE__ */ jsxRuntime.jsx(Notice, { variant: "info", className: "mb-6", children: /* @__PURE__ */ jsxRuntime.jsx(Notice.Message, { children: "Evaluating traces and saving them as dataset items is available in Mastra Studio (local or deployed)." }) }),
20285
+ !isOnTracePage && !onEvaluateTrace && !onSaveAsDatasetItem && showUnavailableFeaturesMsg && /* @__PURE__ */ jsxRuntime.jsx(Notice, { variant: "info", className: "mb-6", children: /* @__PURE__ */ jsxRuntime.jsx(Notice.Message, { children: "Evaluating traces and saving them as dataset items is available in Mastra Studio (local or deployed)." }) }),
20210
20286
  /* @__PURE__ */ jsxRuntime.jsx(
20211
20287
  TraceTimeline,
20212
20288
  {
@@ -22866,6 +22942,7 @@ exports.inputOutlineAndFocusStyle = inputOutlineAndFocusStyle;
22866
22942
  exports.inputSurfaceAndFocusStyle = inputSurfaceAndFocusStyle;
22867
22943
  exports.is401UnauthorizedError = is401UnauthorizedError;
22868
22944
  exports.is403ForbiddenError = is403ForbiddenError;
22945
+ exports.is404NotFoundError = is404NotFoundError;
22869
22946
  exports.isBranchesNotSupportedError = isBranchesNotSupportedError;
22870
22947
  exports.isNonRetryableError = isNonRetryableError;
22871
22948
  exports.isObjectEmpty = isObjectEmpty;