@mastra/playground-ui 22.1.3-alpha.2 → 22.2.0-alpha.8

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/dist/index.es.js CHANGED
@@ -3352,7 +3352,7 @@ function cn(...inputs) {
3352
3352
  return twMerge(clsx(inputs));
3353
3353
  }
3354
3354
 
3355
- const sizeClasses$4 = {
3355
+ const sizeClasses$5 = {
3356
3356
  sm: `${formElementSizes.sm} text-ui-sm px-[.75em]`,
3357
3357
  md: `${formElementSizes.md} text-ui-md px-[.75em]`,
3358
3358
  default: `${formElementSizes.default} text-ui-md px-[.85em] `,
@@ -3365,7 +3365,8 @@ const variantClasses$4 = {
3365
3365
  ghost: "bg-transparent border-2 border-transparent hover:text-neutral6 hover:bg-surface4 active:bg-surface5 text-neutral4",
3366
3366
  inputLike: sharedFormElementStyle,
3367
3367
  light: "",
3368
- outline: ""
3368
+ outline: "",
3369
+ 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"
3369
3370
  };
3370
3371
  const sharedStyles = cn(
3371
3372
  "flex items-center justify-center gap-[.75em] leading-0 transition-colors duration-200 ease-out-custom rounded-lg",
@@ -3384,7 +3385,7 @@ function resolveVariant(variant) {
3384
3385
  function buttonVariants(options) {
3385
3386
  const variant = resolveVariant(options?.variant || "default");
3386
3387
  const size = options?.size || "default";
3387
- return cn(sharedStyles, variantClasses$4[variant], sizeClasses$4[size], options?.iconOnly && "[&>svg]:opacity-75");
3388
+ return cn(sharedStyles, sizeClasses$5[size], variantClasses$4[variant], options?.iconOnly && "[&>svg]:opacity-75");
3388
3389
  }
3389
3390
  function flattenChildren(children) {
3390
3391
  const result = [];
@@ -4762,7 +4763,7 @@ const AlertDescription = ({ children, as: As = "p" }) => {
4762
4763
  return /* @__PURE__ */ jsx(Txt, { as: As, variant: "ui-sm", children });
4763
4764
  };
4764
4765
 
4765
- const sizeClasses$3 = {
4766
+ const sizeClasses$4 = {
4766
4767
  sm: "h-avatar-sm w-avatar-sm",
4767
4768
  md: "h-avatar-md w-avatar-md",
4768
4769
  lg: "h-avatar-lg w-avatar-lg"
@@ -4772,7 +4773,7 @@ const Avatar = ({ src, name, size = "sm", interactive = false }) => {
4772
4773
  "div",
4773
4774
  {
4774
4775
  className: cn(
4775
- sizeClasses$3[size],
4776
+ sizeClasses$4[size],
4776
4777
  "border border-border1 bg-surface3 shrink-0 overflow-hidden rounded-full flex items-center justify-center",
4777
4778
  transitions.all,
4778
4779
  interactive && "cursor-pointer hover:scale-105 hover:border-neutral2 hover:shadow-sm"
@@ -4953,7 +4954,7 @@ const defaultOptions = {
4953
4954
  },
4954
4955
  unstyled: true,
4955
4956
  classNames: {
4956
- 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",
4957
+ 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",
4957
4958
  title: "text-xs font-medium text-neutral5",
4958
4959
  description: "text-xs text-neutral3",
4959
4960
  cancelButton: "bg-transparent! hover:bg-surface2! border-none! rounded-md! p-1.5! m-0! text-neutral3! hover:text-neutral6! shrink-0 transition-all",
@@ -6456,47 +6457,36 @@ const DropdownMenuGroup = DropdownMenuPrimitive.Group;
6456
6457
  const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
6457
6458
  const DropdownMenuSub = DropdownMenuPrimitive.Sub;
6458
6459
  const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
6459
- const DropdownMenuTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
6460
- DropdownMenuPrimitive.Trigger,
6461
- {
6462
- ref,
6463
- className: cn(
6464
- "cursor-pointer focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-white/30 focus-visible:rounded-sm",
6465
- className
6466
- ),
6467
- ...props,
6468
- children
6469
- }
6470
- ));
6460
+ const itemClass = cn(
6461
+ "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",
6462
+ "[&>svg]:w-[1.1em] [&>svg]:h-[1.1em] [&>svg]:opacity-50 [&>svg]:mx-[-.25em] [&:hover>svg]:opacity-100"
6463
+ );
6464
+ const DropdownMenuTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Trigger, { ref, className: cn("cursor-pointer", className), ...props, children }));
6471
6465
  DropdownMenuTrigger.displayName = DropdownMenuPrimitive.Trigger.displayName;
6472
6466
  const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
6473
6467
  DropdownMenuPrimitive.SubTrigger,
6474
6468
  {
6475
6469
  ref,
6476
- className: cn(
6477
- "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",
6478
- inset && "pl-8",
6479
- className
6480
- ),
6470
+ className: cn(itemClass, "data-[state=open]:bg-surface4", inset && "pl-8", className),
6481
6471
  ...props,
6482
6472
  children: [
6483
6473
  children,
6484
- /* @__PURE__ */ jsx(ChevronDown, { className: "ml-auto -rotate-90" })
6474
+ /* @__PURE__ */ jsx("span", { className: "ml-auto pl-2", children: /* @__PURE__ */ jsx(ChevronDown, { className: "-rotate-90 opacity-50" }) })
6485
6475
  ]
6486
6476
  }
6487
6477
  ));
6488
6478
  DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
6489
- const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
6479
+ const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
6490
6480
  DropdownMenuPrimitive.SubContent,
6491
6481
  {
6492
6482
  ref,
6493
6483
  className: cn(
6494
- "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",
6484
+ "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",
6495
6485
  className
6496
6486
  ),
6497
6487
  ...props
6498
6488
  }
6499
- ));
6489
+ ) }));
6500
6490
  DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
6501
6491
  const DropdownMenuContent = React.forwardRef(({ className, container, sideOffset = 8, ...props }, ref) => {
6502
6492
  return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { container, children: /* @__PURE__ */ jsx(
@@ -6505,7 +6495,7 @@ const DropdownMenuContent = React.forwardRef(({ className, container, sideOffset
6505
6495
  ref,
6506
6496
  sideOffset,
6507
6497
  className: cn(
6508
- "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",
6498
+ "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",
6509
6499
  className
6510
6500
  ),
6511
6501
  ...props
@@ -6513,27 +6503,13 @@ const DropdownMenuContent = React.forwardRef(({ className, container, sideOffset
6513
6503
  ) });
6514
6504
  });
6515
6505
  DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
6516
- const DropdownMenuItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
6517
- DropdownMenuPrimitive.Item,
6518
- {
6519
- ref,
6520
- className: cn(
6521
- "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",
6522
- "[&>svg]:w-[1.1em] [&>svg]:h-[1.1em] [&>svg]:opacity-50 [&>svg]:mx-[-.25em] [&:hover>svg]:opacity-100",
6523
- className
6524
- ),
6525
- ...props
6526
- }
6527
- ));
6506
+ const DropdownMenuItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Item, { ref, className: cn(itemClass, className), ...props }));
6528
6507
  DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
6529
6508
  const DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
6530
6509
  DropdownMenuPrimitive.CheckboxItem,
6531
6510
  {
6532
6511
  ref,
6533
- className: cn(
6534
- "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",
6535
- className
6536
- ),
6512
+ className: cn(itemClass, "w-full gap-4 px-2", className),
6537
6513
  checked,
6538
6514
  ...props,
6539
6515
  children: [
@@ -6568,14 +6544,7 @@ const DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref)
6568
6544
  }
6569
6545
  ));
6570
6546
  DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
6571
- const DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
6572
- DropdownMenuPrimitive.Separator,
6573
- {
6574
- ref,
6575
- className: cn("dark:bg-white/10 bg-black/10 -mx-1 my-1 h-px", className),
6576
- ...props
6577
- }
6578
- ));
6547
+ const DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Separator, { ref, className: cn("bg-border1/50 -mx-1.5 my-1 h-0.5", className), ...props }));
6579
6548
  DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
6580
6549
  const DropdownMenuShortcut = ({ className, ...props }) => {
6581
6550
  return /* @__PURE__ */ jsx("span", { className: cn("ml-auto text-xs tracking-widest opacity-60", className), ...props });
@@ -7040,7 +7009,7 @@ function SelectFieldBlock({
7040
7009
  ] });
7041
7010
  }
7042
7011
 
7043
- const sizeClasses$2 = {
7012
+ const sizeClasses$3 = {
7044
7013
  sm: `${formElementSizes.sm} w-form-sm`,
7045
7014
  md: `${formElementSizes.md} w-form-md`,
7046
7015
  lg: `${formElementSizes.lg} w-form-lg`,
@@ -7073,7 +7042,7 @@ const IconButton = React__default.forwardRef(
7073
7042
  baseButtonStyles,
7074
7043
  formElementFocus,
7075
7044
  variantClasses$1[variant],
7076
- sizeClasses$2[size],
7045
+ sizeClasses$3[size],
7077
7046
  disabled && "active:scale-100",
7078
7047
  className
7079
7048
  ),
@@ -7237,7 +7206,7 @@ function MetricsCardError({
7237
7206
  return /* @__PURE__ */ jsx("div", { className: cn("flex flex-col gap-3 items-center justify-center", className), children: /* @__PURE__ */ jsx("p", { className: "text-ui-sm text-accent2", children: message }) });
7238
7207
  }
7239
7208
 
7240
- const sizeClasses$1 = {
7209
+ const sizeClasses$2 = {
7241
7210
  sm: "w-4 h-4",
7242
7211
  md: "w-6 h-6",
7243
7212
  lg: "w-8 h-8"
@@ -7246,7 +7215,7 @@ function Spinner({ color, className, size = "md" }) {
7246
7215
  return /* @__PURE__ */ jsx(
7247
7216
  "svg",
7248
7217
  {
7249
- className: cn("animate-spin", sizeClasses$1[size], className),
7218
+ className: cn("animate-spin", sizeClasses$2[size], className),
7250
7219
  style: { animationDuration: "800ms", animationTimingFunction: "cubic-bezier(0.4, 0, 0.2, 1)" },
7251
7220
  xmlns: "http://www.w3.org/2000/svg",
7252
7221
  width: "24",
@@ -7409,8 +7378,8 @@ const PopoverContent = React.forwardRef(({ className, align = "center", sideOffs
7409
7378
  align,
7410
7379
  sideOffset,
7411
7380
  className: cn(
7412
- "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",
7413
- className && /\bp-\S+/.test(className) ? false : `p-4`,
7381
+ "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",
7382
+ className && /\bp[trblxy]?-\S+/.test(className) ? false : `py-3.5 px-3`,
7414
7383
  className
7415
7384
  ),
7416
7385
  ...props
@@ -7658,6 +7627,49 @@ const Slider = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
7658
7627
  ));
7659
7628
  Slider.displayName = SliderPrimitive.Root.displayName;
7660
7629
 
7630
+ const sizeClasses$1 = {
7631
+ sm: "w-6",
7632
+ md: "w-10",
7633
+ lg: "w-16"
7634
+ };
7635
+ function BrandLoader({ className, size = "md", "aria-label": ariaLabel = "Loading" }) {
7636
+ const reactId = useId();
7637
+ const filterId = `brand-loader-${reactId.replace(/[^a-zA-Z0-9_-]/g, "")}`;
7638
+ return /* @__PURE__ */ jsx(
7639
+ "div",
7640
+ {
7641
+ role: "status",
7642
+ "aria-label": ariaLabel,
7643
+ className: cn("brand-loader inline-block text-neutral6", sizeClasses$1[size], className),
7644
+ children: /* @__PURE__ */ jsxs(
7645
+ "svg",
7646
+ {
7647
+ xmlns: "http://www.w3.org/2000/svg",
7648
+ viewBox: "0 0 34 21",
7649
+ className: "block w-full h-auto overflow-visible",
7650
+ "aria-hidden": "true",
7651
+ children: [
7652
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("filter", { id: filterId, children: [
7653
+ /* @__PURE__ */ jsx("feGaussianBlur", { in: "SourceGraphic", stdDeviation: "0.55" }),
7654
+ /* @__PURE__ */ jsx("feColorMatrix", { values: "1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -7" })
7655
+ ] }) }),
7656
+ /* @__PURE__ */ jsxs("g", { filter: `url(#${filterId})`, children: [
7657
+ /* @__PURE__ */ jsx("line", { className: "brand-loader-ln23", x1: "10.4", y1: "4.5", x2: "16.8", y2: "16.2" }),
7658
+ /* @__PURE__ */ jsx("line", { className: "brand-loader-ln34", x1: "16.8", y1: "16.2", x2: "23.2", y2: "4.5" }),
7659
+ /* @__PURE__ */ jsx("line", { className: "brand-loader-ln45", x1: "23.2", y1: "4.5", x2: "29.5", y2: "16.2" }),
7660
+ /* @__PURE__ */ jsx("circle", { className: "brand-loader-b1", cx: "4.5", cy: "16.2", r: "4.5" }),
7661
+ /* @__PURE__ */ jsx("circle", { className: "brand-loader-b2", cx: "10.4", cy: "4.5", r: "4.5" }),
7662
+ /* @__PURE__ */ jsx("circle", { className: "brand-loader-b3", cx: "16.8", cy: "16.2", r: "4.5" }),
7663
+ /* @__PURE__ */ jsx("circle", { className: "brand-loader-b4", cx: "23.2", cy: "4.5", r: "4.5" }),
7664
+ /* @__PURE__ */ jsx("circle", { className: "brand-loader-b5", cx: "29.5", cy: "16.2", r: "4.5" })
7665
+ ] })
7666
+ ]
7667
+ }
7668
+ )
7669
+ }
7670
+ );
7671
+ }
7672
+
7661
7673
  const Switch = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7662
7674
  SwitchPrimitives.Root,
7663
7675
  {
@@ -9392,7 +9404,7 @@ function Notification({
9392
9404
  if (!localIsVisible) return null;
9393
9405
  const typeStyles = {
9394
9406
  info: "bg-surface4 border-border1",
9395
- error: "bg-accent2Darker border-accent2/30",
9407
+ error: "bg-accent2Darker border-accent2/20",
9396
9408
  success: "bg-accent1Darker border-accent1/30",
9397
9409
  warning: "bg-accent6Darker border-accent6/30"
9398
9410
  };
@@ -9406,7 +9418,7 @@ function Notification({
9406
9418
  "div",
9407
9419
  {
9408
9420
  className: cn(
9409
- "grid grid-cols-[auto_1fr_auto] gap-3 rounded-lg border p-4 text-ui-md text-neutral4 items-start",
9421
+ "grid grid-cols-[auto_1fr_auto] gap-3 rounded-xl border py-2.5 px-3.5 text-ui-md text-neutral4 items-start",
9410
9422
  "shadow-card",
9411
9423
  transitions.all,
9412
9424
  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",
@@ -10488,24 +10500,36 @@ function ItemListTextCell({ children, isLoading, className }) {
10488
10500
  }
10489
10501
 
10490
10502
  const sizeClasses = {
10491
- small: "text-[11px] pt-[5px] pb-[4px]",
10492
- default: "text-[12px] pt-[5px] pb-[4px] ",
10493
- large: "text-[13px] pt-[5px] pb-[4px] "
10503
+ small: "text-[10.5px] pt-[5px] pb-[4px]",
10504
+ default: "text-[11.5px] pt-[5px] pb-[4px] ",
10505
+ large: "text-[12.5px] pt-[5px] pb-[4px] "
10494
10506
  };
10495
10507
  const bgColorClasses = {
10496
- gray: { bright: "bg-neutral-700", muted: "bg-neutral-700/80" },
10497
- red: { bright: "bg-red-900", muted: "bg-red-900/80" },
10498
- orange: { bright: "bg-yellow-900", muted: "bg-yellow-900/80" },
10499
- blue: { bright: "bg-blue-800", muted: "bg-blue-800/80" },
10500
- green: { bright: "bg-green-900", muted: "bg-green-900/80" },
10501
- purple: { bright: "bg-purple-900", muted: "bg-purple-900/80" },
10502
- yellow: { bright: "bg-yellow-700", muted: "bg-yellow-700/80" },
10503
- cyan: { bright: "bg-cyan-900", muted: "bg-cyan-900/80" },
10504
- pink: { bright: "bg-pink-900", muted: "bg-pink-900/80" }
10508
+ gray: {
10509
+ bright: "bg-neutral-500/30",
10510
+ muted: "bg-neutral-500/10"
10511
+ },
10512
+ red: { bright: "bg-red-500/30", muted: "bg-red-500/10" },
10513
+ orange: {
10514
+ bright: "bg-orange-500/30",
10515
+ muted: "bg-orange-500/10"
10516
+ },
10517
+ blue: { bright: "bg-blue-500/30", muted: "bg-blue-500/10" },
10518
+ green: { bright: "bg-green-500/30", muted: "bg-green-500/10" },
10519
+ purple: {
10520
+ bright: "bg-purple-500/30",
10521
+ muted: "bg-purple-500/10"
10522
+ },
10523
+ yellow: {
10524
+ bright: "bg-yellow-500/30",
10525
+ muted: "bg-yellow-500/10"
10526
+ },
10527
+ cyan: { bright: "bg-cyan-500/30", muted: "bg-cyan-500/10" },
10528
+ pink: { bright: "bg-pink-500/30", muted: "bg-pink-500/10" }
10505
10529
  };
10506
10530
  const txtIntensityClasses = {
10507
- bright: "text-neutral4",
10508
- muted: "text-neutral3"
10531
+ bright: "text-neutral4/90",
10532
+ muted: "text-neutral3/90"
10509
10533
  };
10510
10534
  const Chip = ({
10511
10535
  color = "gray",
@@ -10519,7 +10543,7 @@ const Chip = ({
10519
10543
  "span",
10520
10544
  {
10521
10545
  className: cn(
10522
- "inline-flex items-center rounded-md uppercase px-[0.5em] gap-[0.4em] tracking-wide font-normal",
10546
+ "inline-flex items-center rounded-lg uppercase px-1.5 gap-[0.4em] tracking-wide font-normal",
10523
10547
  // general styles for svg icons within the chip
10524
10548
  "[&>svg]:w-[1em] [&>svg]:h-[1em] [&>svg]:translate-y-[-0.02em] [&>svg]:mx-[-0.2em]",
10525
10549
  // if the chip has only one child and it's an svg, make it fully opaque
@@ -11332,6 +11356,45 @@ function DataListSkeleton({ columns = "auto 1fr auto auto", numberOfRows = 3 })
11332
11356
  )) });
11333
11357
  }
11334
11358
 
11359
+ function toDate$2(value) {
11360
+ const date = value instanceof Date ? value : new Date(value);
11361
+ return isNaN(date.getTime()) ? null : date;
11362
+ }
11363
+ function ScoresDataListDateCell({ timestamp }) {
11364
+ const date = toDate$2(timestamp);
11365
+ return /* @__PURE__ */ jsx(DataListCell, { height: "compact", className: "text-ui-smd text-neutral2", children: date ? isToday$1(date) ? "Today" : format(date, "MMM dd") : "-" });
11366
+ }
11367
+ function ScoresDataListTimeCell({ timestamp }) {
11368
+ const date = toDate$2(timestamp);
11369
+ return /* @__PURE__ */ jsx(DataListCell, { height: "compact", className: "text-ui-smd text-neutral3", children: date ? format(date, "h:mm:ss aaa") : "-" });
11370
+ }
11371
+ function ScoresDataListInputCell({ input }) {
11372
+ return /* @__PURE__ */ jsx(DataListCell, { height: "compact", className: "min-w-0", children: /* @__PURE__ */ jsx("span", { className: "block text-neutral3 text-ui-smd font-mono truncate", children: input != null ? JSON.stringify(input) : "-" }) });
11373
+ }
11374
+ function ScoresDataListEntityCell({ entityId }) {
11375
+ return /* @__PURE__ */ jsx(DataListCell, { height: "compact", className: "min-w-0", children: /* @__PURE__ */ jsx("span", { className: "block text-ui-smd truncate", children: entityId || "-" }) });
11376
+ }
11377
+ function ScoresDataListScoreCell({ score }) {
11378
+ const display = score == null ? "-" : typeof score === "object" ? JSON.stringify(score) : String(score);
11379
+ return /* @__PURE__ */ jsx(DataListCell, { height: "compact", className: "text-ui-smd font-mono text-neutral3", children: display });
11380
+ }
11381
+
11382
+ function ScoresDataListRoot(props) {
11383
+ return /* @__PURE__ */ jsx(DataListRoot, { ...props });
11384
+ }
11385
+ const ScoresDataList = Object.assign(ScoresDataListRoot, {
11386
+ Top: DataListTop,
11387
+ TopCell: DataListTopCell,
11388
+ RowButton: DataListRowButton,
11389
+ NoMatch: DataListNoMatch,
11390
+ NextPageLoading: DataListNextPageLoading,
11391
+ DateCell: ScoresDataListDateCell,
11392
+ TimeCell: ScoresDataListTimeCell,
11393
+ InputCell: ScoresDataListInputCell,
11394
+ EntityCell: ScoresDataListEntityCell,
11395
+ ScoreCell: ScoresDataListScoreCell
11396
+ });
11397
+
11335
11398
  function toDate$1(value) {
11336
11399
  const date = value instanceof Date ? value : new Date(value);
11337
11400
  return isNaN(date.getTime()) ? null : date;
@@ -11394,7 +11457,10 @@ function TracesDataListStatusCell({ status }) {
11394
11457
  return /* @__PURE__ */ jsx(DataListCell, { height: "compact", children: /* @__PURE__ */ jsx("span", { className: "uppercase text-ui-sm font-semibold", style: { color: config.color }, children: config.label }) });
11395
11458
  }
11396
11459
 
11397
- const TracesDataList = Object.assign(DataListRoot, {
11460
+ function TracesDataListRoot(props) {
11461
+ return /* @__PURE__ */ jsx(DataListRoot, { ...props });
11462
+ }
11463
+ const TracesDataList = Object.assign(TracesDataListRoot, {
11398
11464
  Top: DataListTop,
11399
11465
  TopCell: DataListTopCell,
11400
11466
  RowButton: DataListRowButton,
@@ -12455,18 +12521,16 @@ function DataKeysAndValuesKey({ className, children }) {
12455
12521
  return /* @__PURE__ */ jsx("dt", { className: cn("text-ui-smd text-neutral2 shrink-0 py-0.5", className), children });
12456
12522
  }
12457
12523
 
12524
+ const GRID_TEMPLATES = {
12525
+ 1: "auto 1fr",
12526
+ 2: "auto auto auto 1fr",
12527
+ 3: "auto auto auto auto auto 1fr"
12528
+ };
12458
12529
  function DataKeysAndValuesRoot({ className, children, numOfCol = 1 }) {
12459
- return /* @__PURE__ */ jsx(
12460
- "dl",
12461
- {
12462
- className: cn("grid gap-x-4 gap-y-1.5 grid-cols-[auto_1fr]", className),
12463
- style: numOfCol === 2 ? { gridTemplateColumns: "auto 1fr auto 1fr" } : void 0,
12464
- children
12465
- }
12466
- );
12530
+ return /* @__PURE__ */ jsx("dl", { className: cn("grid gap-x-4 gap-y-1.5", className), style: { gridTemplateColumns: GRID_TEMPLATES[numOfCol] }, children });
12467
12531
  }
12468
12532
 
12469
- const dataKeysAndValuesValueStyles = "text-ui-smd text-neutral3 min-w-0 py-0.5";
12533
+ const dataKeysAndValuesValueStyles = "text-ui-smd text-neutral3 min-w-0 py-0.5 pr-6";
12470
12534
 
12471
12535
  function DataKeysAndValuesValue({ className, children }) {
12472
12536
  return /* @__PURE__ */ jsx("dd", { className: cn(dataKeysAndValuesValueStyles, "truncate", className), children });
@@ -12566,7 +12630,13 @@ function DataPanelContent({ children, ref }) {
12566
12630
  }
12567
12631
 
12568
12632
  function DataPanelHeader({ className, children }) {
12569
- return /* @__PURE__ */ jsx("div", { className: cn("flex items-center justify-between gap-2 border-b border-border1 mx-4 py-3", className), children });
12633
+ return /* @__PURE__ */ jsx(
12634
+ "div",
12635
+ {
12636
+ className: cn("flex items-center justify-between gap-2 border-b border-border1 mx-4 py-3 min-h-14", className),
12637
+ children
12638
+ }
12639
+ );
12570
12640
  }
12571
12641
 
12572
12642
  function DataPanelHeading({ className, children }) {
@@ -12603,7 +12673,7 @@ function DataPanelRoot({ collapsed, children }) {
12603
12673
  {
12604
12674
  className: cn(
12605
12675
  "flex flex-col bg-surface2 border border-border1 rounded-xl overflow-hidden",
12606
- collapsed ? "h-auto" : "h-full"
12676
+ collapsed ? "h-auto" : "max-h-full"
12607
12677
  ),
12608
12678
  children
12609
12679
  }
@@ -14002,12 +14072,17 @@ const getFileContentType = async (url) => {
14002
14072
  }
14003
14073
  return contentType;
14004
14074
  } catch {
14005
- const urlObject = new URL(url);
14006
- const pathname = urlObject.pathname;
14007
- const extension = pathname.split(".").pop();
14008
- if (!extension) return void 0;
14009
- const lowerCaseExtension = extension.toLowerCase();
14010
- return EXTENSION_TO_MIME[lowerCaseExtension];
14075
+ try {
14076
+ const urlObject = new URL(url);
14077
+ const pathname = urlObject.pathname;
14078
+ const extension = pathname.split(".").pop();
14079
+ if (!extension) return void 0;
14080
+ return EXTENSION_TO_MIME[extension.toLowerCase()];
14081
+ } catch {
14082
+ const extension = url.split(".").pop()?.split(/[?#]/)[0];
14083
+ if (!extension) return void 0;
14084
+ return EXTENSION_TO_MIME[extension.toLowerCase()];
14085
+ }
14011
14086
  }
14012
14087
  };
14013
14088
 
@@ -14073,5 +14148,5 @@ function generateDefaultValues(schema) {
14073
14148
  return generateObjectDefaults(schema.properties, 0);
14074
14149
  }
14075
14150
 
14076
- export { AddField, AgentCoinIcon, AgentIcon, AgentNetworkCoinIcon, AiIcon, Alert, AlertDescription, AlertDialog, AlertTitle, AmazonIcon, AnthropicChatIcon, AnthropicMessagesIcon, ApiIcon, Avatar, AzureIcon, Badge, BorderColors, BorderRadius, BranchIcon, Breadcrumb, Button, ButtonWithTooltip, ButtonsGroup, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Cell, CheckIcon, Checkbox, ChevronIcon, Chip, ChipsGroup, CodeDiff, CodeEditor, CohereIcon, Collapsible, CollapsibleContent, CollapsiblePanel, CollapsibleTrigger, Colors, Column, Columns, CombinedButtons, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CommitIcon, ContentBlock, ContentBlocks, CopyButton, CrossIcon, Crumb, DashboardCard, DataCodeSection, DataDetailsPanel, DataKeysAndValues, DataList, DataListSkeleton, DataPanel, DatePicker, DateTimeCell, DateTimePicker, DateTimePickerContent, DateTimeRangePicker, DbIcon, DebugIcon, DefaultTrigger, DeploymentIcon, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DividerIcon, DocsIcon, DropdownMenu, EXTENSION_TO_MIME, ElementSelect, EmptyState, Entity, EntityContent, EntityDescription, EntityHeader, EntityIcon, EntityList, EntityListPageLayout, EntityListSkeleton, EntityName, Entry, EntryCell, EntryList, EntryListSkeleton, EnvIcon, ErrorState, Field, FieldBlock, FieldBlocksLayout, FieldDescription, FieldList, FieldName, FieldNullable, FieldOptional, FieldRemove, FieldType, FiltersIcon, FolderIcon, FontSizes, GithubCoinIcon, GithubIcon, Glows, GoogleIcon, GroqIcon, Header$1 as Header, HeaderAction, HeaderGroup, HeaderTitle, HomeIcon, HorizontalBars, HoverPopover, Icon, IconButton, InfoIcon, Input, ItemList, ItemListSkeleton, JSONSchemaForm, JudgeIcon, Kbd, KeyValueList, Label, LatencyIcon, LineHeights, ListSearch, LogoWithoutText, LogsDataList, DataListSkeleton as LogsDataListSkeleton, LogsIcon, MainContentContent, MainContentLayout, MainHeader, MainSidebar, MainSidebarProvider, MainSidebarTrigger, MarkdownRenderer, MastraIcon, McpCoinIcon, McpServerIcon, MemoryIcon, MetricsCard, MetricsDataTable, MetricsFlexGrid, MetricsKpiCard, MetricsLineChart, MetricsLineChartTooltip, MistralIcon, MultiColumn, MultiCombobox, NestedFields, NetlifyIcon, NoDataPageLayout, Notice, Notification, OPERATORS, OPERATOR_LABELS, OpenAIIcon, OpenaiChatIcon, PageHeader, PageLayout, PanelSeparator, PermissionDenied, Popover, PopoverContent, PopoverTrigger, PrevNextNav, ProcessStepList, ProcessStepListItem, ProcessStepProgressBar, ProcessorIcon, PromptIcon, RadioGroup, RadioGroupItem, RepoIcon, Root$1 as Root, Row, RuleBuilder, RuleFieldSelect, RuleOperatorSelect, RuleRow, RuleValueInput, ScrollArea, ScrollBar, ScrollableContainer, SearchFieldBlock, Searchbar, SearchbarWrapper, Section, SectionRoot, Sections, Select, SelectContent, SelectDataFilter, SelectField, SelectFieldBlock, SelectGroup, SelectItem, SelectTrigger, SelectValue, SessionExpired, SettingsIcon, Shadows, SideDialog, Sizes, Skeleton, SkillIcon, SlashIcon, Slider, Spacings, Spinner, StatusBadge, SubSectionRoot, Switch, Tab, TabContent, TabList, Table, Tabs, Tbody, TextAndIcon, TextFieldBlock, Textarea, Th, Thead, ThreadDeleteButton, ThreadItem, ThreadLink, ThreadList, Threads, TimePicker, ToolCoinIcon, ToolsIcon, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TraceIcon, TracesDataList, Tree, Truncate, TsIcon, Txt, TxtCell, VARIABLE_PATTERN, VariablesIcon, WorkflowCoinIcon, WorkflowIcon, XGroqIcon, buttonVariants, cn, comboboxStyles, countLeafRules, createDefaultRule, createDefaultRuleGroup, createField, createVariableAutocomplete, fieldsToJSONSchema, fileToBase64, flattenSchemaToVariables, focusRing, formElementFocus, formElementFocusWithin, formElementRadius, formElementSizes, formElementTransition, formatJSON, generateDefaultValues, getChildFieldOptions, getColumnTemplate, getFieldOptionAtPath, getFieldOptionsFromSchema, getFileContentType, getItemListColumnTemplate, getMainContentContentClassName, getShortId$1 as getShortId, getStatusIcon, getToNextEntryFn, getToNextItemFn, getToPreviousEntryFn, getToPreviousItemFn, highlight, hoverEffects, inputVariants, is401UnauthorizedError, is403ForbiddenError, isNonRetryableError, isObjectEmpty, isRule, isRuleGroup, isValidJson, jsonSchemaToFields, lodashTitleCase, parseError, parseFieldPath, sharedFormElementDisabledStyle, sharedFormElementFocusStyle, sharedFormElementStyle, shouldRetryQuery, stringToColor, textareaVariants, toSigFigs, toast, transitions, truncateString, useAutoscroll, useCodemirrorTheme$3 as useCodemirrorTheme, useCopyToClipboard, useInView, useIsDarkMode, useJSONSchemaForm, useJSONSchemaFormField, useJSONSchemaFormNestedContext, useMainSidebar, useMaybeSidebar, usePlaygroundStore, useTableKeyboardNavigation, variableHighlight };
14151
+ export { AddField, AgentCoinIcon, AgentIcon, AgentNetworkCoinIcon, AiIcon, Alert, AlertDescription, AlertDialog, AlertTitle, AmazonIcon, AnthropicChatIcon, AnthropicMessagesIcon, ApiIcon, Avatar, AzureIcon, Badge, BorderColors, BorderRadius, BranchIcon, BrandLoader, Breadcrumb, Button, ButtonWithTooltip, ButtonsGroup, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Cell, CheckIcon, Checkbox, ChevronIcon, Chip, ChipsGroup, CodeDiff, CodeEditor, CohereIcon, Collapsible, CollapsibleContent, CollapsiblePanel, CollapsibleTrigger, Colors, Column, Columns, CombinedButtons, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CommitIcon, ContentBlock, ContentBlocks, CopyButton, CrossIcon, Crumb, DashboardCard, DataCodeSection, DataDetailsPanel, DataKeysAndValues, DataList, DataListSkeleton, DataPanel, DatePicker, DateTimeCell, DateTimePicker, DateTimePickerContent, DateTimeRangePicker, DbIcon, DebugIcon, DefaultTrigger, DeploymentIcon, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DividerIcon, DocsIcon, DropdownMenu, EXTENSION_TO_MIME, ElementSelect, EmptyState, Entity, EntityContent, EntityDescription, EntityHeader, EntityIcon, EntityList, EntityListPageLayout, EntityListSkeleton, EntityName, Entry, EntryCell, EntryList, EntryListSkeleton, EnvIcon, ErrorState, Field, FieldBlock, FieldBlocksLayout, FieldDescription, FieldList, FieldName, FieldNullable, FieldOptional, FieldRemove, FieldType, FiltersIcon, FolderIcon, FontSizes, GithubCoinIcon, GithubIcon, Glows, GoogleIcon, GroqIcon, Header$1 as Header, HeaderAction, HeaderGroup, HeaderTitle, HomeIcon, HorizontalBars, HoverPopover, Icon, IconButton, InfoIcon, Input, ItemList, ItemListSkeleton, JSONSchemaForm, JudgeIcon, Kbd, KeyValueList, Label, LatencyIcon, LineHeights, ListSearch, LogoWithoutText, LogsDataList, DataListSkeleton as LogsDataListSkeleton, LogsIcon, MainContentContent, MainContentLayout, MainHeader, MainSidebar, MainSidebarProvider, MainSidebarTrigger, MarkdownRenderer, MastraIcon, McpCoinIcon, McpServerIcon, MemoryIcon, MetricsCard, MetricsDataTable, MetricsFlexGrid, MetricsKpiCard, MetricsLineChart, MetricsLineChartTooltip, MistralIcon, MultiColumn, MultiCombobox, NestedFields, NetlifyIcon, NoDataPageLayout, Notice, Notification, OPERATORS, OPERATOR_LABELS, OpenAIIcon, OpenaiChatIcon, PageHeader, PageLayout, PanelSeparator, PermissionDenied, Popover, PopoverContent, PopoverTrigger, PrevNextNav, ProcessStepList, ProcessStepListItem, ProcessStepProgressBar, ProcessorIcon, PromptIcon, RadioGroup, RadioGroupItem, RepoIcon, Root$1 as Root, Row, RuleBuilder, RuleFieldSelect, RuleOperatorSelect, RuleRow, RuleValueInput, ScoresDataList, ScrollArea, ScrollBar, ScrollableContainer, SearchFieldBlock, Searchbar, SearchbarWrapper, Section, SectionRoot, Sections, Select, SelectContent, SelectDataFilter, SelectField, SelectFieldBlock, SelectGroup, SelectItem, SelectTrigger, SelectValue, SessionExpired, SettingsIcon, Shadows, SideDialog, Sizes, Skeleton, SkillIcon, SlashIcon, Slider, Spacings, Spinner, StatusBadge, SubSectionRoot, Switch, Tab, TabContent, TabList, Table, Tabs, Tbody, TextAndIcon, TextFieldBlock, Textarea, Th, Thead, ThreadDeleteButton, ThreadItem, ThreadLink, ThreadList, Threads, TimePicker, ToolCoinIcon, ToolsIcon, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TraceIcon, TracesDataList, Tree, Truncate, TsIcon, Txt, TxtCell, VARIABLE_PATTERN, VariablesIcon, WorkflowCoinIcon, WorkflowIcon, XGroqIcon, buttonVariants, cn, comboboxStyles, countLeafRules, createDefaultRule, createDefaultRuleGroup, createField, createVariableAutocomplete, fieldsToJSONSchema, fileToBase64, flattenSchemaToVariables, focusRing, formElementFocus, formElementFocusWithin, formElementRadius, formElementSizes, formElementTransition, formatJSON, generateDefaultValues, getChildFieldOptions, getColumnTemplate, getFieldOptionAtPath, getFieldOptionsFromSchema, getFileContentType, getItemListColumnTemplate, getMainContentContentClassName, getShortId$1 as getShortId, getStatusIcon, getToNextEntryFn, getToNextItemFn, getToPreviousEntryFn, getToPreviousItemFn, highlight, hoverEffects, inputVariants, is401UnauthorizedError, is403ForbiddenError, isNonRetryableError, isObjectEmpty, isRule, isRuleGroup, isValidJson, jsonSchemaToFields, lodashTitleCase, parseError, parseFieldPath, sharedFormElementDisabledStyle, sharedFormElementFocusStyle, sharedFormElementStyle, shouldRetryQuery, stringToColor, textareaVariants, toSigFigs, toast, transitions, truncateString, useAutoscroll, useCodemirrorTheme$3 as useCodemirrorTheme, useCopyToClipboard, useInView, useIsDarkMode, useJSONSchemaForm, useJSONSchemaFormField, useJSONSchemaFormNestedContext, useMainSidebar, useMaybeSidebar, usePlaygroundStore, useTableKeyboardNavigation, variableHighlight };
14077
14152
  //# sourceMappingURL=index.es.js.map