@mastra/playground-ui 22.1.3-alpha.1 → 22.1.3-alpha.3

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,39 @@
1
1
  # @mastra/playground-ui
2
2
 
3
+ ## 22.1.3-alpha.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Added a dedicated trace details page at `/traces/:traceId`, plus the design-system changes that support it: ([#15392](https://github.com/mastra-ai/mastra/pull/15392))
8
+ - `Button`: new `link` variant (inline, no padding/background/border).
9
+ - `DataKeysAndValues`: `numOfCol` now accepts `3`.
10
+ - `DataPanel.Header`: minimum height so heading-only headers match the height of ones with button actions.
11
+
12
+ - Fix unhandled `TypeError` in `getFileContentType` when the URL is relative ([#15433](https://github.com/mastra-ai/mastra/pull/15433))
13
+ or malformed. The `catch` block now falls back to inferring the MIME type
14
+ from the raw string's file extension and strips query/hash fragments so
15
+ inputs like `/files/report.pdf`, `https://x.dev/a.pdf?token=1`, and
16
+ `/files/report.pdf#page=2` all resolve to `application/pdf` instead of
17
+ rejecting.
18
+
19
+ Closes #15432.
20
+
21
+ - Improved visual consistency across Chip, DropdownMenu, Notification, Popover, and toast components — unified radius and border scale. Deduplicated dropdown menu item classes and added max-height scroll handling for long menus. ([#15440](https://github.com/mastra-ai/mastra/pull/15440))
22
+
23
+ - Updated dependencies [[`fdd54cf`](https://github.com/mastra-ai/mastra/commit/fdd54cf612a9af876e9fdd85e534454f6e7dd518), [`d647793`](https://github.com/mastra-ai/mastra/commit/d647793010ab4de60bb524769a51cd32d7eba8d3), [`30456b6`](https://github.com/mastra-ai/mastra/commit/30456b6b08c8fd17e109dd093b73d93b65e83bc5), [`9d11a8c`](https://github.com/mastra-ai/mastra/commit/9d11a8c1c8924eb975a245a5884d40ca1b7e0491), [`d246696`](https://github.com/mastra-ai/mastra/commit/d246696139a3144a5b21b042d41c532688e957e1), [`354f9ce`](https://github.com/mastra-ai/mastra/commit/354f9ce1ca6af2074b6a196a23f8ec30012dccca), [`e9837b5`](https://github.com/mastra-ai/mastra/commit/e9837b53699e18711b09e0ca010a4106376f2653)]:
24
+ - @mastra/core@1.26.0-alpha.3
25
+ - @mastra/client-js@1.13.5-alpha.3
26
+ - @mastra/react@0.2.27-alpha.3
27
+
28
+ ## 22.1.3-alpha.2
29
+
30
+ ### Patch Changes
31
+
32
+ - Updated dependencies [[`3d83d06`](https://github.com/mastra-ai/mastra/commit/3d83d06f776f00fb5f4163dddd32a030c5c20844), [`7e0e63e`](https://github.com/mastra-ai/mastra/commit/7e0e63e2e485e84442351f4c7a79a424c83539dc), [`9467ea8`](https://github.com/mastra-ai/mastra/commit/9467ea87695749a53dfc041576410ebf9ee7bb67), [`7338d94`](https://github.com/mastra-ai/mastra/commit/7338d949380cf68b095342e8e42610dc51d557c1)]:
33
+ - @mastra/core@1.26.0-alpha.2
34
+ - @mastra/client-js@1.13.5-alpha.2
35
+ - @mastra/react@0.2.27-alpha.2
36
+
3
37
  ## 22.1.3-alpha.1
4
38
 
5
39
  ### Patch Changes
package/dist/index.cjs.js CHANGED
@@ -3399,7 +3399,8 @@ const variantClasses$4 = {
3399
3399
  ghost: "bg-transparent border-2 border-transparent hover:text-neutral6 hover:bg-surface4 active:bg-surface5 text-neutral4",
3400
3400
  inputLike: sharedFormElementStyle,
3401
3401
  light: "",
3402
- outline: ""
3402
+ outline: "",
3403
+ link: "inline-flex justify-start rounded-none h-auto px-0 bg-transparent text-neutral3 hover:text-neutral4 gap-1 [&>svg]:mx-0 w-auto [&>svg]:opacity-70"
3403
3404
  };
3404
3405
  const sharedStyles = cn(
3405
3406
  "flex items-center justify-center gap-[.75em] leading-0 transition-colors duration-200 ease-out-custom rounded-lg",
@@ -3418,7 +3419,7 @@ function resolveVariant(variant) {
3418
3419
  function buttonVariants(options) {
3419
3420
  const variant = resolveVariant(options?.variant || "default");
3420
3421
  const size = options?.size || "default";
3421
- return cn(sharedStyles, variantClasses$4[variant], sizeClasses$4[size], options?.iconOnly && "[&>svg]:opacity-75");
3422
+ return cn(sharedStyles, sizeClasses$4[size], variantClasses$4[variant], options?.iconOnly && "[&>svg]:opacity-75");
3422
3423
  }
3423
3424
  function flattenChildren(children) {
3424
3425
  const result = [];
@@ -4987,7 +4988,7 @@ const defaultOptions = {
4987
4988
  },
4988
4989
  unstyled: true,
4989
4990
  classNames: {
4990
- toast: "bg-surface3 w-full h-auto rounded-lg gap-2 border border-border1 px-3 py-2 flex items-center justify-between pointer-events-auto shadow-card :data-content:flex-1",
4991
+ toast: "bg-surface3 w-full h-auto rounded-xl gap-2 border border-border1 px-3 py-2 flex items-center justify-between pointer-events-auto shadow-card :data-content:flex-1",
4991
4992
  title: "text-xs font-medium text-neutral5",
4992
4993
  description: "text-xs text-neutral3",
4993
4994
  cancelButton: "bg-transparent! hover:bg-surface2! border-none! rounded-md! p-1.5! m-0! text-neutral3! hover:text-neutral6! shrink-0 transition-all",
@@ -6490,47 +6491,36 @@ const DropdownMenuGroup = DropdownMenuPrimitive__namespace.Group;
6490
6491
  const DropdownMenuPortal = DropdownMenuPrimitive__namespace.Portal;
6491
6492
  const DropdownMenuSub = DropdownMenuPrimitive__namespace.Sub;
6492
6493
  const DropdownMenuRadioGroup = DropdownMenuPrimitive__namespace.RadioGroup;
6493
- const DropdownMenuTrigger = React__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
6494
- DropdownMenuPrimitive__namespace.Trigger,
6495
- {
6496
- ref,
6497
- className: cn(
6498
- "cursor-pointer focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-white/30 focus-visible:rounded-sm",
6499
- className
6500
- ),
6501
- ...props,
6502
- children
6503
- }
6504
- ));
6494
+ const itemClass = cn(
6495
+ "relative flex cursor-pointer select-none items-center gap-3 rounded-lg px-3 py-1.5 text-sm transition-colors text-neutral4 dark:hover:text-white dark:focus:text-white hover:text-neutral6 focus:text-neutral6 hover:bg-surface4 focus:bg-surface4 active:bg-surface5 data-disabled:pointer-events-none data-disabled:opacity-50 [&>span]:truncate [&_svg]:size-4 [&_svg]:shrink-0 focus-visible:outline-hidden focus-visible:ring-0",
6496
+ "[&>svg]:w-[1.1em] [&>svg]:h-[1.1em] [&>svg]:opacity-50 [&>svg]:mx-[-.25em] [&:hover>svg]:opacity-100"
6497
+ );
6498
+ const DropdownMenuTrigger = React__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Trigger, { ref, className: cn("cursor-pointer", className), ...props, children }));
6505
6499
  DropdownMenuTrigger.displayName = DropdownMenuPrimitive__namespace.Trigger.displayName;
6506
6500
  const DropdownMenuSubTrigger = React__namespace.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
6507
6501
  DropdownMenuPrimitive__namespace.SubTrigger,
6508
6502
  {
6509
6503
  ref,
6510
- className: cn(
6511
- "hover:bg-surface4 focus:bg-surface4 active:bg-surface5 data-[state=open]:bg-surface4 flex cursor-default select-none items-center rounded-md px-2 py-1.5 text-sm transition-colors text-neutral4 dark:hover:text-white dark:focus:text-white hover:text-neutral6 focus:text-neutral6 focus-visible:outline-hidden focus-visible:ring-0",
6512
- inset && "pl-8",
6513
- className
6514
- ),
6504
+ className: cn(itemClass, "data-[state=open]:bg-surface4", inset && "pl-8", className),
6515
6505
  ...props,
6516
6506
  children: [
6517
6507
  children,
6518
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "ml-auto -rotate-90" })
6508
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto pl-2", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "-rotate-90 opacity-50" }) })
6519
6509
  ]
6520
6510
  }
6521
6511
  ));
6522
6512
  DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive__namespace.SubTrigger.displayName;
6523
- const DropdownMenuSubContent = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
6513
+ const DropdownMenuSubContent = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
6524
6514
  DropdownMenuPrimitive__namespace.SubContent,
6525
6515
  {
6526
6516
  ref,
6527
6517
  className: cn(
6528
- "bg-surface3 backdrop-blur-xl data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 z-50 min-w-32 overflow-auto overflow-x-hidden rounded-lg",
6518
+ "bg-surface3 backdrop-blur-xl data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 z-50 min-w-44 max-h-[min(20rem,var(--radix-dropdown-menu-content-available-height))] overflow-x-hidden overflow-y-auto rounded-xl border-2 border-border1/50 p-1 shadow-md",
6529
6519
  className
6530
6520
  ),
6531
6521
  ...props
6532
6522
  }
6533
- ));
6523
+ ) }));
6534
6524
  DropdownMenuSubContent.displayName = DropdownMenuPrimitive__namespace.SubContent.displayName;
6535
6525
  const DropdownMenuContent = React__namespace.forwardRef(({ className, container, sideOffset = 8, ...props }, ref) => {
6536
6526
  return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { container, children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -6539,7 +6529,7 @@ const DropdownMenuContent = React__namespace.forwardRef(({ className, container,
6539
6529
  ref,
6540
6530
  sideOffset,
6541
6531
  className: cn(
6542
- "bg-surface3 data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 backdrop-blur-xl text-neutral4 z-50 min-w-32 overflow-auto rounded-lg p-2 shadow-md",
6532
+ "bg-surface3 data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 backdrop-blur-xl text-neutral4 z-50 min-w-44 max-h-[min(20rem,var(--radix-dropdown-menu-content-available-height))] overflow-x-hidden overflow-y-auto rounded-xl border-2 border-border1/50 p-1 shadow-md",
6543
6533
  className
6544
6534
  ),
6545
6535
  ...props
@@ -6547,27 +6537,13 @@ const DropdownMenuContent = React__namespace.forwardRef(({ className, container,
6547
6537
  ) });
6548
6538
  });
6549
6539
  DropdownMenuContent.displayName = DropdownMenuPrimitive__namespace.Content.displayName;
6550
- const DropdownMenuItem = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
6551
- DropdownMenuPrimitive__namespace.Item,
6552
- {
6553
- ref,
6554
- className: cn(
6555
- "relative flex cursor-pointer select-none items-center gap-3 rounded-md px-2 py-1.5 text-sm transition-colors text-neutral4 dark:hover:text-white dark:focus:text-white hover:text-neutral6 focus:text-neutral6 hover:bg-surface4 focus:bg-surface4 active:bg-surface5 data-disabled:pointer-events-none data-disabled:opacity-50 [&>span]:truncate [&_svg]:size-4 [&_svg]:shrink-0 focus-visible:outline-hidden focus-visible:ring-0",
6556
- "[&>svg]:w-[1.1em] [&>svg]:h-[1.1em] [&>svg]:opacity-50 [&>svg]:mx-[-.25em] [&:hover>svg]:opacity-100",
6557
- className
6558
- ),
6559
- ...props
6560
- }
6561
- ));
6540
+ const DropdownMenuItem = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Item, { ref, className: cn(itemClass, className), ...props }));
6562
6541
  DropdownMenuItem.displayName = DropdownMenuPrimitive__namespace.Item.displayName;
6563
6542
  const DropdownMenuCheckboxItem = React__namespace.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
6564
6543
  DropdownMenuPrimitive__namespace.CheckboxItem,
6565
6544
  {
6566
6545
  ref,
6567
- className: cn(
6568
- "hover:bg-surface4 focus:bg-surface4 active:bg-surface5 dark:hover:text-white dark:focus:text-white hover:text-neutral6 focus:text-neutral6 relative flex w-full cursor-pointer select-none items-center gap-4 rounded-md px-2 py-1.5 text-sm transition-colors text-neutral4 data-disabled:pointer-events-none data-disabled:opacity-50 focus-visible:outline-hidden focus-visible:ring-0",
6569
- className
6570
- ),
6546
+ className: cn(itemClass, "w-full gap-4 px-2", className),
6571
6547
  checked,
6572
6548
  ...props,
6573
6549
  children: [
@@ -6602,14 +6578,7 @@ const DropdownMenuLabel = React__namespace.forwardRef(({ className, inset, ...pr
6602
6578
  }
6603
6579
  ));
6604
6580
  DropdownMenuLabel.displayName = DropdownMenuPrimitive__namespace.Label.displayName;
6605
- const DropdownMenuSeparator = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
6606
- DropdownMenuPrimitive__namespace.Separator,
6607
- {
6608
- ref,
6609
- className: cn("dark:bg-white/10 bg-black/10 -mx-1 my-1 h-px", className),
6610
- ...props
6611
- }
6612
- ));
6581
+ const DropdownMenuSeparator = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Separator, { ref, className: cn("bg-border1/50 -mx-1.5 my-1 h-0.5", className), ...props }));
6613
6582
  DropdownMenuSeparator.displayName = DropdownMenuPrimitive__namespace.Separator.displayName;
6614
6583
  const DropdownMenuShortcut = ({ className, ...props }) => {
6615
6584
  return /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("ml-auto text-xs tracking-widest opacity-60", className), ...props });
@@ -7443,8 +7412,8 @@ const PopoverContent = React__namespace.forwardRef(({ className, align = "center
7443
7412
  align,
7444
7413
  sideOffset,
7445
7414
  className: cn(
7446
- "z-50 w-72 rounded-md border border-border1 bg-surface3 text-neutral5 shadow-md focus-visible:outline-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
7447
- className && /\bp-\S+/.test(className) ? false : `p-4`,
7415
+ "z-50 w-72 rounded-xl border-2 border-border1/50 bg-surface3 text-neutral5 shadow-md focus-visible:outline-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
7416
+ className && /\bp[trblxy]?-\S+/.test(className) ? false : `py-3.5 px-3`,
7448
7417
  className
7449
7418
  ),
7450
7419
  ...props
@@ -9426,7 +9395,7 @@ function Notification({
9426
9395
  if (!localIsVisible) return null;
9427
9396
  const typeStyles = {
9428
9397
  info: "bg-surface4 border-border1",
9429
- error: "bg-accent2Darker border-accent2/30",
9398
+ error: "bg-accent2Darker border-accent2/20",
9430
9399
  success: "bg-accent1Darker border-accent1/30",
9431
9400
  warning: "bg-accent6Darker border-accent6/30"
9432
9401
  };
@@ -9440,7 +9409,7 @@ function Notification({
9440
9409
  "div",
9441
9410
  {
9442
9411
  className: cn(
9443
- "grid grid-cols-[auto_1fr_auto] gap-3 rounded-lg border p-4 text-ui-md text-neutral4 items-start",
9412
+ "grid grid-cols-[auto_1fr_auto] gap-3 rounded-xl border py-2.5 px-3.5 text-ui-md text-neutral4 items-start",
9444
9413
  "shadow-card",
9445
9414
  transitions.all,
9446
9415
  isAnimatingOut ? "animate-out fade-out-0 slide-out-to-right-2 duration-200" : "animate-in fade-in-0 slide-in-from-right-2 duration-300",
@@ -10522,24 +10491,36 @@ function ItemListTextCell({ children, isLoading, className }) {
10522
10491
  }
10523
10492
 
10524
10493
  const sizeClasses = {
10525
- small: "text-[11px] pt-[5px] pb-[4px]",
10526
- default: "text-[12px] pt-[5px] pb-[4px] ",
10527
- large: "text-[13px] pt-[5px] pb-[4px] "
10494
+ small: "text-[10.5px] pt-[5px] pb-[4px]",
10495
+ default: "text-[11.5px] pt-[5px] pb-[4px] ",
10496
+ large: "text-[12.5px] pt-[5px] pb-[4px] "
10528
10497
  };
10529
10498
  const bgColorClasses = {
10530
- gray: { bright: "bg-neutral-700", muted: "bg-neutral-700/80" },
10531
- red: { bright: "bg-red-900", muted: "bg-red-900/80" },
10532
- orange: { bright: "bg-yellow-900", muted: "bg-yellow-900/80" },
10533
- blue: { bright: "bg-blue-800", muted: "bg-blue-800/80" },
10534
- green: { bright: "bg-green-900", muted: "bg-green-900/80" },
10535
- purple: { bright: "bg-purple-900", muted: "bg-purple-900/80" },
10536
- yellow: { bright: "bg-yellow-700", muted: "bg-yellow-700/80" },
10537
- cyan: { bright: "bg-cyan-900", muted: "bg-cyan-900/80" },
10538
- pink: { bright: "bg-pink-900", muted: "bg-pink-900/80" }
10499
+ gray: {
10500
+ bright: "bg-neutral-500/30",
10501
+ muted: "bg-neutral-500/10"
10502
+ },
10503
+ red: { bright: "bg-red-500/30", muted: "bg-red-500/10" },
10504
+ orange: {
10505
+ bright: "bg-orange-500/30",
10506
+ muted: "bg-orange-500/10"
10507
+ },
10508
+ blue: { bright: "bg-blue-500/30", muted: "bg-blue-500/10" },
10509
+ green: { bright: "bg-green-500/30", muted: "bg-green-500/10" },
10510
+ purple: {
10511
+ bright: "bg-purple-500/30",
10512
+ muted: "bg-purple-500/10"
10513
+ },
10514
+ yellow: {
10515
+ bright: "bg-yellow-500/30",
10516
+ muted: "bg-yellow-500/10"
10517
+ },
10518
+ cyan: { bright: "bg-cyan-500/30", muted: "bg-cyan-500/10" },
10519
+ pink: { bright: "bg-pink-500/30", muted: "bg-pink-500/10" }
10539
10520
  };
10540
10521
  const txtIntensityClasses = {
10541
- bright: "text-neutral4",
10542
- muted: "text-neutral3"
10522
+ bright: "text-neutral4/90",
10523
+ muted: "text-neutral3/90"
10543
10524
  };
10544
10525
  const Chip = ({
10545
10526
  color = "gray",
@@ -10553,7 +10534,7 @@ const Chip = ({
10553
10534
  "span",
10554
10535
  {
10555
10536
  className: cn(
10556
- "inline-flex items-center rounded-md uppercase px-[0.5em] gap-[0.4em] tracking-wide font-normal",
10537
+ "inline-flex items-center rounded-lg uppercase px-1.5 gap-[0.4em] tracking-wide font-normal",
10557
10538
  // general styles for svg icons within the chip
10558
10539
  "[&>svg]:w-[1em] [&>svg]:h-[1em] [&>svg]:translate-y-[-0.02em] [&>svg]:mx-[-0.2em]",
10559
10540
  // if the chip has only one child and it's an svg, make it fully opaque
@@ -12489,18 +12470,16 @@ function DataKeysAndValuesKey({ className, children }) {
12489
12470
  return /* @__PURE__ */ jsxRuntime.jsx("dt", { className: cn("text-ui-smd text-neutral2 shrink-0 py-0.5", className), children });
12490
12471
  }
12491
12472
 
12473
+ const GRID_TEMPLATES = {
12474
+ 1: "auto 1fr",
12475
+ 2: "auto auto auto 1fr",
12476
+ 3: "auto auto auto auto auto 1fr"
12477
+ };
12492
12478
  function DataKeysAndValuesRoot({ className, children, numOfCol = 1 }) {
12493
- return /* @__PURE__ */ jsxRuntime.jsx(
12494
- "dl",
12495
- {
12496
- className: cn("grid gap-x-4 gap-y-1.5 grid-cols-[auto_1fr]", className),
12497
- style: numOfCol === 2 ? { gridTemplateColumns: "auto 1fr auto 1fr" } : void 0,
12498
- children
12499
- }
12500
- );
12479
+ return /* @__PURE__ */ jsxRuntime.jsx("dl", { className: cn("grid gap-x-4 gap-y-1.5", className), style: { gridTemplateColumns: GRID_TEMPLATES[numOfCol] }, children });
12501
12480
  }
12502
12481
 
12503
- const dataKeysAndValuesValueStyles = "text-ui-smd text-neutral3 min-w-0 py-0.5";
12482
+ const dataKeysAndValuesValueStyles = "text-ui-smd text-neutral3 min-w-0 py-0.5 pr-6";
12504
12483
 
12505
12484
  function DataKeysAndValuesValue({ className, children }) {
12506
12485
  return /* @__PURE__ */ jsxRuntime.jsx("dd", { className: cn(dataKeysAndValuesValueStyles, "truncate", className), children });
@@ -12600,7 +12579,13 @@ function DataPanelContent({ children, ref }) {
12600
12579
  }
12601
12580
 
12602
12581
  function DataPanelHeader({ className, children }) {
12603
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex items-center justify-between gap-2 border-b border-border1 mx-4 py-3", className), children });
12582
+ return /* @__PURE__ */ jsxRuntime.jsx(
12583
+ "div",
12584
+ {
12585
+ className: cn("flex items-center justify-between gap-2 border-b border-border1 mx-4 py-3 min-h-14", className),
12586
+ children
12587
+ }
12588
+ );
12604
12589
  }
12605
12590
 
12606
12591
  function DataPanelHeading({ className, children }) {
@@ -12637,7 +12622,7 @@ function DataPanelRoot({ collapsed, children }) {
12637
12622
  {
12638
12623
  className: cn(
12639
12624
  "flex flex-col bg-surface2 border border-border1 rounded-xl overflow-hidden",
12640
- collapsed ? "h-auto" : "h-full"
12625
+ collapsed ? "h-auto" : "max-h-full"
12641
12626
  ),
12642
12627
  children
12643
12628
  }
@@ -14036,12 +14021,17 @@ const getFileContentType = async (url) => {
14036
14021
  }
14037
14022
  return contentType;
14038
14023
  } catch {
14039
- const urlObject = new URL(url);
14040
- const pathname = urlObject.pathname;
14041
- const extension = pathname.split(".").pop();
14042
- if (!extension) return void 0;
14043
- const lowerCaseExtension = extension.toLowerCase();
14044
- return EXTENSION_TO_MIME[lowerCaseExtension];
14024
+ try {
14025
+ const urlObject = new URL(url);
14026
+ const pathname = urlObject.pathname;
14027
+ const extension = pathname.split(".").pop();
14028
+ if (!extension) return void 0;
14029
+ return EXTENSION_TO_MIME[extension.toLowerCase()];
14030
+ } catch {
14031
+ const extension = url.split(".").pop()?.split(/[?#]/)[0];
14032
+ if (!extension) return void 0;
14033
+ return EXTENSION_TO_MIME[extension.toLowerCase()];
14034
+ }
14045
14035
  }
14046
14036
  };
14047
14037