@mastra/playground-ui 22.1.3-alpha.2 → 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 +25 -0
- package/dist/index.cjs.js +75 -85
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.css +216 -108
- package/dist/index.es.js +75 -85
- package/dist/index.es.js.map +1 -1
- package/dist/src/ds/components/Button/Button.d.ts +1 -1
- package/dist/src/ds/components/DataKeysAndValues/data-keys-and-values-root.d.ts +1 -1
- package/dist/src/ds/components/DataKeysAndValues/shared.d.ts +1 -1
- package/dist/src/ds/components/DropdownMenu/dropdown-menu.stories.d.ts +1 -0
- package/package.json +6 -6
package/dist/index.es.js
CHANGED
|
@@ -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,
|
|
3388
|
+
return cn(sharedStyles, sizeClasses$4[size], variantClasses$4[variant], options?.iconOnly && "[&>svg]:opacity-75");
|
|
3388
3389
|
}
|
|
3389
3390
|
function flattenChildren(children) {
|
|
3390
3391
|
const result = [];
|
|
@@ -4953,7 +4954,7 @@ const defaultOptions = {
|
|
|
4953
4954
|
},
|
|
4954
4955
|
unstyled: true,
|
|
4955
4956
|
classNames: {
|
|
4956
|
-
toast: "bg-surface3 w-full h-auto rounded-
|
|
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
|
|
6460
|
-
|
|
6461
|
-
|
|
6462
|
-
|
|
6463
|
-
|
|
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(
|
|
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-
|
|
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-
|
|
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 });
|
|
@@ -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-
|
|
7413
|
-
className && /\bp
|
|
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
|
|
@@ -9392,7 +9361,7 @@ function Notification({
|
|
|
9392
9361
|
if (!localIsVisible) return null;
|
|
9393
9362
|
const typeStyles = {
|
|
9394
9363
|
info: "bg-surface4 border-border1",
|
|
9395
|
-
error: "bg-accent2Darker border-accent2/
|
|
9364
|
+
error: "bg-accent2Darker border-accent2/20",
|
|
9396
9365
|
success: "bg-accent1Darker border-accent1/30",
|
|
9397
9366
|
warning: "bg-accent6Darker border-accent6/30"
|
|
9398
9367
|
};
|
|
@@ -9406,7 +9375,7 @@ function Notification({
|
|
|
9406
9375
|
"div",
|
|
9407
9376
|
{
|
|
9408
9377
|
className: cn(
|
|
9409
|
-
"grid grid-cols-[auto_1fr_auto] gap-3 rounded-
|
|
9378
|
+
"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
9379
|
"shadow-card",
|
|
9411
9380
|
transitions.all,
|
|
9412
9381
|
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 +10457,36 @@ function ItemListTextCell({ children, isLoading, className }) {
|
|
|
10488
10457
|
}
|
|
10489
10458
|
|
|
10490
10459
|
const sizeClasses = {
|
|
10491
|
-
small: "text-[
|
|
10492
|
-
default: "text-[
|
|
10493
|
-
large: "text-[
|
|
10460
|
+
small: "text-[10.5px] pt-[5px] pb-[4px]",
|
|
10461
|
+
default: "text-[11.5px] pt-[5px] pb-[4px] ",
|
|
10462
|
+
large: "text-[12.5px] pt-[5px] pb-[4px] "
|
|
10494
10463
|
};
|
|
10495
10464
|
const bgColorClasses = {
|
|
10496
|
-
gray: {
|
|
10497
|
-
|
|
10498
|
-
|
|
10499
|
-
|
|
10500
|
-
|
|
10501
|
-
|
|
10502
|
-
|
|
10503
|
-
|
|
10504
|
-
|
|
10465
|
+
gray: {
|
|
10466
|
+
bright: "bg-neutral-500/30",
|
|
10467
|
+
muted: "bg-neutral-500/10"
|
|
10468
|
+
},
|
|
10469
|
+
red: { bright: "bg-red-500/30", muted: "bg-red-500/10" },
|
|
10470
|
+
orange: {
|
|
10471
|
+
bright: "bg-orange-500/30",
|
|
10472
|
+
muted: "bg-orange-500/10"
|
|
10473
|
+
},
|
|
10474
|
+
blue: { bright: "bg-blue-500/30", muted: "bg-blue-500/10" },
|
|
10475
|
+
green: { bright: "bg-green-500/30", muted: "bg-green-500/10" },
|
|
10476
|
+
purple: {
|
|
10477
|
+
bright: "bg-purple-500/30",
|
|
10478
|
+
muted: "bg-purple-500/10"
|
|
10479
|
+
},
|
|
10480
|
+
yellow: {
|
|
10481
|
+
bright: "bg-yellow-500/30",
|
|
10482
|
+
muted: "bg-yellow-500/10"
|
|
10483
|
+
},
|
|
10484
|
+
cyan: { bright: "bg-cyan-500/30", muted: "bg-cyan-500/10" },
|
|
10485
|
+
pink: { bright: "bg-pink-500/30", muted: "bg-pink-500/10" }
|
|
10505
10486
|
};
|
|
10506
10487
|
const txtIntensityClasses = {
|
|
10507
|
-
bright: "text-neutral4",
|
|
10508
|
-
muted: "text-neutral3"
|
|
10488
|
+
bright: "text-neutral4/90",
|
|
10489
|
+
muted: "text-neutral3/90"
|
|
10509
10490
|
};
|
|
10510
10491
|
const Chip = ({
|
|
10511
10492
|
color = "gray",
|
|
@@ -10519,7 +10500,7 @@ const Chip = ({
|
|
|
10519
10500
|
"span",
|
|
10520
10501
|
{
|
|
10521
10502
|
className: cn(
|
|
10522
|
-
"inline-flex items-center rounded-
|
|
10503
|
+
"inline-flex items-center rounded-lg uppercase px-1.5 gap-[0.4em] tracking-wide font-normal",
|
|
10523
10504
|
// general styles for svg icons within the chip
|
|
10524
10505
|
"[&>svg]:w-[1em] [&>svg]:h-[1em] [&>svg]:translate-y-[-0.02em] [&>svg]:mx-[-0.2em]",
|
|
10525
10506
|
// if the chip has only one child and it's an svg, make it fully opaque
|
|
@@ -12455,18 +12436,16 @@ function DataKeysAndValuesKey({ className, children }) {
|
|
|
12455
12436
|
return /* @__PURE__ */ jsx("dt", { className: cn("text-ui-smd text-neutral2 shrink-0 py-0.5", className), children });
|
|
12456
12437
|
}
|
|
12457
12438
|
|
|
12439
|
+
const GRID_TEMPLATES = {
|
|
12440
|
+
1: "auto 1fr",
|
|
12441
|
+
2: "auto auto auto 1fr",
|
|
12442
|
+
3: "auto auto auto auto auto 1fr"
|
|
12443
|
+
};
|
|
12458
12444
|
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
|
-
);
|
|
12445
|
+
return /* @__PURE__ */ jsx("dl", { className: cn("grid gap-x-4 gap-y-1.5", className), style: { gridTemplateColumns: GRID_TEMPLATES[numOfCol] }, children });
|
|
12467
12446
|
}
|
|
12468
12447
|
|
|
12469
|
-
const dataKeysAndValuesValueStyles = "text-ui-smd text-neutral3 min-w-0 py-0.5";
|
|
12448
|
+
const dataKeysAndValuesValueStyles = "text-ui-smd text-neutral3 min-w-0 py-0.5 pr-6";
|
|
12470
12449
|
|
|
12471
12450
|
function DataKeysAndValuesValue({ className, children }) {
|
|
12472
12451
|
return /* @__PURE__ */ jsx("dd", { className: cn(dataKeysAndValuesValueStyles, "truncate", className), children });
|
|
@@ -12566,7 +12545,13 @@ function DataPanelContent({ children, ref }) {
|
|
|
12566
12545
|
}
|
|
12567
12546
|
|
|
12568
12547
|
function DataPanelHeader({ className, children }) {
|
|
12569
|
-
return /* @__PURE__ */ jsx(
|
|
12548
|
+
return /* @__PURE__ */ jsx(
|
|
12549
|
+
"div",
|
|
12550
|
+
{
|
|
12551
|
+
className: cn("flex items-center justify-between gap-2 border-b border-border1 mx-4 py-3 min-h-14", className),
|
|
12552
|
+
children
|
|
12553
|
+
}
|
|
12554
|
+
);
|
|
12570
12555
|
}
|
|
12571
12556
|
|
|
12572
12557
|
function DataPanelHeading({ className, children }) {
|
|
@@ -12603,7 +12588,7 @@ function DataPanelRoot({ collapsed, children }) {
|
|
|
12603
12588
|
{
|
|
12604
12589
|
className: cn(
|
|
12605
12590
|
"flex flex-col bg-surface2 border border-border1 rounded-xl overflow-hidden",
|
|
12606
|
-
collapsed ? "h-auto" : "h-full"
|
|
12591
|
+
collapsed ? "h-auto" : "max-h-full"
|
|
12607
12592
|
),
|
|
12608
12593
|
children
|
|
12609
12594
|
}
|
|
@@ -14002,12 +13987,17 @@ const getFileContentType = async (url) => {
|
|
|
14002
13987
|
}
|
|
14003
13988
|
return contentType;
|
|
14004
13989
|
} catch {
|
|
14005
|
-
|
|
14006
|
-
|
|
14007
|
-
|
|
14008
|
-
|
|
14009
|
-
|
|
14010
|
-
|
|
13990
|
+
try {
|
|
13991
|
+
const urlObject = new URL(url);
|
|
13992
|
+
const pathname = urlObject.pathname;
|
|
13993
|
+
const extension = pathname.split(".").pop();
|
|
13994
|
+
if (!extension) return void 0;
|
|
13995
|
+
return EXTENSION_TO_MIME[extension.toLowerCase()];
|
|
13996
|
+
} catch {
|
|
13997
|
+
const extension = url.split(".").pop()?.split(/[?#]/)[0];
|
|
13998
|
+
if (!extension) return void 0;
|
|
13999
|
+
return EXTENSION_TO_MIME[extension.toLowerCase()];
|
|
14000
|
+
}
|
|
14011
14001
|
}
|
|
14012
14002
|
};
|
|
14013
14003
|
|