@levo-so/react 0.1.76 → 0.1.78
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/audience/components/block.js +32 -0
- package/dist/audience/components/component.js +13 -0
- package/dist/audience/components/page.js +19 -0
- package/dist/components/Dialog.js +84 -0
- package/dist/components/DialogWrapper.js +20 -0
- package/dist/components/Sonner.js +41 -0
- package/dist/components/Spinner.js +8 -0
- package/dist/components/Tabs.js +48 -0
- package/dist/components/Tooltip.js +30 -0
- package/dist/components/button/Button.js +41 -0
- package/dist/components/button/buttonVariants.js +40 -0
- package/dist/constants/fileUploadPresets.js +75 -0
- package/dist/index.js +80 -981
- package/dist/membership/components/Button.js +13 -0
- package/dist/membership/components/Container.js +52 -0
- package/dist/membership/components/Core.js +33 -0
- package/dist/membership/components/Popup.js +56 -0
- package/dist/membership/index.js +9 -0
- package/dist/membership/useLevoOAuth.js +76 -0
- package/dist/providers/LevoProvider.js +19 -0
- package/dist/utils/byteToSize.js +9 -0
- package/dist/utils/cn.js +7 -0
- package/dist/utils/errorHandler.js +11 -0
- package/dist/utils/isDateObject.js +4 -0
- package/dist/utils/isEmptyObject.js +5 -0
- package/dist/utils/isNullOrUndefined.js +4 -0
- package/dist/utils/isObject.js +7 -0
- package/package.json +8 -9
- /package/dist/{index.css → styles/index.css} +0 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useState as a, useEffect as l } from "react";
|
|
3
|
+
import { useLevoInsights as d } from "../../providers/LevoProvider.js";
|
|
4
|
+
const v = ({ id: e, properties: c = {} }) => {
|
|
5
|
+
const t = d(), [n, s] = a(!1);
|
|
6
|
+
return l(() => {
|
|
7
|
+
if (n || typeof t?.track != "function") return;
|
|
8
|
+
const o = document.getElementById(e);
|
|
9
|
+
if (!o) return;
|
|
10
|
+
const i = () => {
|
|
11
|
+
n || (t?.track("block.view", {
|
|
12
|
+
...c,
|
|
13
|
+
resource: "block",
|
|
14
|
+
identifier: e
|
|
15
|
+
}), s(!0));
|
|
16
|
+
}, r = new IntersectionObserver(
|
|
17
|
+
(u) => {
|
|
18
|
+
u.forEach((f) => {
|
|
19
|
+
f.isIntersecting && (i(), r.disconnect());
|
|
20
|
+
});
|
|
21
|
+
},
|
|
22
|
+
{ threshold: 0 }
|
|
23
|
+
);
|
|
24
|
+
return r.observe(o), () => {
|
|
25
|
+
r.disconnect();
|
|
26
|
+
};
|
|
27
|
+
}, [t, e, c, n]), null;
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
v as LevoAudienceBlock,
|
|
31
|
+
v as default
|
|
32
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useEffect as n } from "react";
|
|
3
|
+
import { useLevoInsights as u } from "../../providers/LevoProvider.js";
|
|
4
|
+
const r = ({ event: e, properties: o }) => {
|
|
5
|
+
const t = u();
|
|
6
|
+
return n(() => {
|
|
7
|
+
t?.track(e, o);
|
|
8
|
+
}, [t, e, o]), null;
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
r as LevoAudienceComponent,
|
|
12
|
+
r as default
|
|
13
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useEffect as o } from "react";
|
|
3
|
+
import { useLevo as t, useLevoInsights as f } from "../../providers/LevoProvider.js";
|
|
4
|
+
const d = ({ id: n }) => {
|
|
5
|
+
const i = t(), e = f();
|
|
6
|
+
return o(() => {
|
|
7
|
+
i && typeof window < "u" && (window.levo_client = i);
|
|
8
|
+
}, [i]), o(() => {
|
|
9
|
+
e && typeof window < "u" && (window.levo_insights = e);
|
|
10
|
+
}, [e]), o(() => {
|
|
11
|
+
e && n && e.init({
|
|
12
|
+
pageId: n
|
|
13
|
+
});
|
|
14
|
+
}, [e, n]), null;
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
d as LevoAudiencePage,
|
|
18
|
+
d as default
|
|
19
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as o, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
import { X as p } from "lucide-react";
|
|
4
|
+
import { Dialog as e } from "radix-ui";
|
|
5
|
+
import * as l from "react";
|
|
6
|
+
import { cn as i } from "../utils/cn.js";
|
|
7
|
+
const C = e.Root, R = e.Trigger, f = e.Portal, k = e.Close, r = l.forwardRef(({ className: a, ...t }, s) => /* @__PURE__ */ o(
|
|
8
|
+
e.Overlay,
|
|
9
|
+
{
|
|
10
|
+
ref: s,
|
|
11
|
+
className: i(
|
|
12
|
+
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 grid max-h-screen place-items-center overflow-y-auto bg-background/80 py-10 backdrop-blur-sm data-[state=closed]:animate-out data-[state=open]:animate-in",
|
|
13
|
+
a
|
|
14
|
+
),
|
|
15
|
+
...t
|
|
16
|
+
}
|
|
17
|
+
));
|
|
18
|
+
r.displayName = e.Overlay.displayName;
|
|
19
|
+
const u = l.forwardRef(({ className: a, children: t, container: s, hideCloseButton: d, overlayStyles: c, ...m }, g) => /* @__PURE__ */ o(f, { container: s, children: /* @__PURE__ */ o(r, { className: c, children: /* @__PURE__ */ n(
|
|
20
|
+
e.Content,
|
|
21
|
+
{
|
|
22
|
+
ref: g,
|
|
23
|
+
className: i(
|
|
24
|
+
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 relative z-50 grid w-full max-w-lg gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:rounded-lg",
|
|
25
|
+
a
|
|
26
|
+
),
|
|
27
|
+
...m,
|
|
28
|
+
children: [
|
|
29
|
+
t,
|
|
30
|
+
!d && /* @__PURE__ */ n(
|
|
31
|
+
e.Close,
|
|
32
|
+
{
|
|
33
|
+
type: "button",
|
|
34
|
+
className: "absolute top-4 right-4 rounded-sm p-1 opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ o(p, { className: "h-4 w-4" }),
|
|
37
|
+
/* @__PURE__ */ o("span", { className: "sr-only", children: "Close" })
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
) }) }));
|
|
44
|
+
u.displayName = e.Content.displayName;
|
|
45
|
+
const y = ({ className: a, ...t }) => /* @__PURE__ */ o("div", { className: i("flex flex-col space-y-1.5 text-center sm:text-left", a), ...t });
|
|
46
|
+
y.displayName = "DialogHeader";
|
|
47
|
+
const N = ({ className: a, ...t }) => /* @__PURE__ */ o(
|
|
48
|
+
"div",
|
|
49
|
+
{
|
|
50
|
+
className: i("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", a),
|
|
51
|
+
...t
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
N.displayName = "DialogFooter";
|
|
55
|
+
const x = l.forwardRef(({ className: a, ...t }, s) => /* @__PURE__ */ o(
|
|
56
|
+
e.Title,
|
|
57
|
+
{
|
|
58
|
+
ref: s,
|
|
59
|
+
className: i("font-semibold text-lg leading-none tracking-tight", a),
|
|
60
|
+
...t
|
|
61
|
+
}
|
|
62
|
+
));
|
|
63
|
+
x.displayName = e.Title.displayName;
|
|
64
|
+
const D = l.forwardRef(({ className: a, ...t }, s) => /* @__PURE__ */ o(
|
|
65
|
+
e.Description,
|
|
66
|
+
{
|
|
67
|
+
ref: s,
|
|
68
|
+
className: i("text-muted-foreground text-sm", a),
|
|
69
|
+
...t
|
|
70
|
+
}
|
|
71
|
+
));
|
|
72
|
+
D.displayName = e.Description.displayName;
|
|
73
|
+
export {
|
|
74
|
+
C as Dialog,
|
|
75
|
+
k as DialogClose,
|
|
76
|
+
u as DialogContent,
|
|
77
|
+
D as DialogDescription,
|
|
78
|
+
N as DialogFooter,
|
|
79
|
+
y as DialogHeader,
|
|
80
|
+
r as DialogOverlay,
|
|
81
|
+
f as DialogPortal,
|
|
82
|
+
x as DialogTitle,
|
|
83
|
+
R as DialogTrigger
|
|
84
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { Dialog as m, DialogContent as d, DialogHeader as p, DialogTitle as t, DialogDescription as g } from "./Dialog.js";
|
|
3
|
+
const f = ({
|
|
4
|
+
isOpen: o,
|
|
5
|
+
onClose: a,
|
|
6
|
+
children: r,
|
|
7
|
+
title: i,
|
|
8
|
+
description: n = "",
|
|
9
|
+
contentClassName: s,
|
|
10
|
+
modal: c = !0
|
|
11
|
+
}) => /* @__PURE__ */ e(m, { open: o, onOpenChange: a, modal: c, children: /* @__PURE__ */ l(d, { className: s, children: [
|
|
12
|
+
i && /* @__PURE__ */ l(p, { className: "flex-1 font-medium", children: [
|
|
13
|
+
/* @__PURE__ */ e(t, { children: i }),
|
|
14
|
+
/* @__PURE__ */ e(g, { children: n })
|
|
15
|
+
] }),
|
|
16
|
+
/* @__PURE__ */ e("div", { className: "w-full", children: r })
|
|
17
|
+
] }) });
|
|
18
|
+
export {
|
|
19
|
+
f as DialogWrapper
|
|
20
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { Toaster as a, toast as s } from "sonner";
|
|
4
|
+
import { toast as m } from "sonner";
|
|
5
|
+
const g = ({ ...t }) => /* @__PURE__ */ e(
|
|
6
|
+
a,
|
|
7
|
+
{
|
|
8
|
+
closeButton: !0,
|
|
9
|
+
richColors: !0,
|
|
10
|
+
className: "toaster group",
|
|
11
|
+
toastOptions: {
|
|
12
|
+
classNames: {
|
|
13
|
+
toast: "group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
|
|
14
|
+
description: "group-[.toast]:text-muted-foreground",
|
|
15
|
+
actionButton: "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
|
|
16
|
+
cancelButton: "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
...t
|
|
20
|
+
}
|
|
21
|
+
), c = (t, r = "Error", o = {}) => {
|
|
22
|
+
s.error(r, {
|
|
23
|
+
description: t,
|
|
24
|
+
duration: 4e3,
|
|
25
|
+
position: "bottom-right",
|
|
26
|
+
...o
|
|
27
|
+
});
|
|
28
|
+
}, p = (t, r = "Success", o = {}) => {
|
|
29
|
+
o?.id && s.dismiss(o?.id), s.success(r, {
|
|
30
|
+
description: t,
|
|
31
|
+
duration: 4e3,
|
|
32
|
+
position: "bottom-right",
|
|
33
|
+
...o
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
export {
|
|
37
|
+
g as Toaster,
|
|
38
|
+
c as errorToast,
|
|
39
|
+
p as successToast,
|
|
40
|
+
m as toast
|
|
41
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { BiLoaderAlt as r } from "react-icons/bi";
|
|
3
|
+
import { cn as i } from "../utils/cn.js";
|
|
4
|
+
const e = ({ className: o }) => /* @__PURE__ */ t(r, { className: i("h-8 w-8 animate-spin font-light", o) });
|
|
5
|
+
export {
|
|
6
|
+
e as Spinner,
|
|
7
|
+
e as default
|
|
8
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import { Tabs as e } from "radix-ui";
|
|
4
|
+
import * as o from "react";
|
|
5
|
+
import { cn as n } from "../utils/cn.js";
|
|
6
|
+
const u = e.Root, r = o.forwardRef(({ className: t, ...i }, s) => /* @__PURE__ */ a(
|
|
7
|
+
e.List,
|
|
8
|
+
{
|
|
9
|
+
ref: s,
|
|
10
|
+
className: n(
|
|
11
|
+
"inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",
|
|
12
|
+
t
|
|
13
|
+
),
|
|
14
|
+
...i
|
|
15
|
+
}
|
|
16
|
+
));
|
|
17
|
+
r.displayName = e.List.displayName;
|
|
18
|
+
const f = o.forwardRef(({ className: t, ...i }, s) => /* @__PURE__ */ a(
|
|
19
|
+
e.Trigger,
|
|
20
|
+
{
|
|
21
|
+
ref: s,
|
|
22
|
+
className: n(
|
|
23
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 font-medium text-sm ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
|
|
24
|
+
t
|
|
25
|
+
),
|
|
26
|
+
"data-levo-studio-interactive": "true",
|
|
27
|
+
...i
|
|
28
|
+
}
|
|
29
|
+
));
|
|
30
|
+
f.displayName = e.Trigger.displayName;
|
|
31
|
+
const d = o.forwardRef(({ className: t, ...i }, s) => /* @__PURE__ */ a(
|
|
32
|
+
e.Content,
|
|
33
|
+
{
|
|
34
|
+
ref: s,
|
|
35
|
+
className: n(
|
|
36
|
+
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
37
|
+
t
|
|
38
|
+
),
|
|
39
|
+
...i
|
|
40
|
+
}
|
|
41
|
+
));
|
|
42
|
+
d.displayName = e.Content.displayName;
|
|
43
|
+
export {
|
|
44
|
+
u as Tabs,
|
|
45
|
+
d as TabsContent,
|
|
46
|
+
r as TabsList,
|
|
47
|
+
f as TabsTrigger
|
|
48
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
3
|
+
import { Tooltip as o } from "radix-ui";
|
|
4
|
+
import * as p from "react";
|
|
5
|
+
import { cn as m } from "../utils/cn.js";
|
|
6
|
+
const x = o.Provider, c = o.Root, f = o.Trigger, T = o.Portal, d = p.forwardRef(({ className: i, sideOffset: t = 4, ...r }, a) => /* @__PURE__ */ e(
|
|
7
|
+
o.Content,
|
|
8
|
+
{
|
|
9
|
+
ref: a,
|
|
10
|
+
sideOffset: t,
|
|
11
|
+
className: m(
|
|
12
|
+
"fade-in-0 zoom-in-95 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 z-50 animate-in overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-popover-foreground text-xs shadow-md data-[state=closed]:animate-out",
|
|
13
|
+
i
|
|
14
|
+
),
|
|
15
|
+
...r
|
|
16
|
+
}
|
|
17
|
+
));
|
|
18
|
+
d.displayName = o.Content.displayName;
|
|
19
|
+
const v = ({ children: i, label: t, labelClassName: r, asChild: a = !0, contentProps: s = {}, side: n }) => /* @__PURE__ */ l(c, { children: [
|
|
20
|
+
t && /* @__PURE__ */ e(T, { children: /* @__PURE__ */ e(d, { side: n, className: r, ...s, children: t }) }),
|
|
21
|
+
/* @__PURE__ */ e(f, { asChild: a, children: i })
|
|
22
|
+
] });
|
|
23
|
+
export {
|
|
24
|
+
v as SimpleTooltipWrapper,
|
|
25
|
+
c as Tooltip,
|
|
26
|
+
d as TooltipContent,
|
|
27
|
+
T as TooltipPortal,
|
|
28
|
+
x as TooltipProvider,
|
|
29
|
+
f as TooltipTrigger
|
|
30
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx as m, jsxs as c, Fragment as d } from "react/jsx-runtime";
|
|
2
|
+
import { Slot as u } from "radix-ui";
|
|
3
|
+
import * as b from "react";
|
|
4
|
+
import { BiLoaderAlt as h } from "react-icons/bi";
|
|
5
|
+
import { twMerge as w } from "tailwind-merge";
|
|
6
|
+
import { cn as B } from "../../utils/cn.js";
|
|
7
|
+
import { buttonVariants as N } from "./buttonVariants.js";
|
|
8
|
+
const R = b.forwardRef(
|
|
9
|
+
({
|
|
10
|
+
className: e,
|
|
11
|
+
variant: a,
|
|
12
|
+
size: s,
|
|
13
|
+
rounded: n,
|
|
14
|
+
asChild: i = !1,
|
|
15
|
+
isLoading: t = !1,
|
|
16
|
+
loadingText: r,
|
|
17
|
+
disabled: f,
|
|
18
|
+
...o
|
|
19
|
+
}, l) => {
|
|
20
|
+
const p = i ? u.Root : "button";
|
|
21
|
+
return /* @__PURE__ */ m(
|
|
22
|
+
p,
|
|
23
|
+
{
|
|
24
|
+
className: B(N({ variant: a, size: s, rounded: n, className: e })),
|
|
25
|
+
ref: l,
|
|
26
|
+
disabled: f || t,
|
|
27
|
+
type: "button",
|
|
28
|
+
...o,
|
|
29
|
+
children: t ? /* @__PURE__ */ c(d, { children: [
|
|
30
|
+
/* @__PURE__ */ m(h, { className: w("h-4 w-4 animate-spin", r ? "mr-2" : "") }),
|
|
31
|
+
r
|
|
32
|
+
] }) : o.children
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
R.displayName = "Button";
|
|
38
|
+
export {
|
|
39
|
+
R as Button,
|
|
40
|
+
R as default
|
|
41
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { cva as e } from "class-variance-authority";
|
|
2
|
+
const t = e(
|
|
3
|
+
"inline-flex items-center justify-center font-medium text-sm ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
4
|
+
{
|
|
5
|
+
variants: {
|
|
6
|
+
variant: {
|
|
7
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
8
|
+
destructive: "bg-destructive text-white hover:bg-destructive/90",
|
|
9
|
+
destructiveOutline: "border border-red-500 bg-transparent text-destructive shadow-sm hover:bg-destructive hover:text-white",
|
|
10
|
+
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
11
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
12
|
+
secondaryOutline: "border border-white border-solid bg-transparent hover:border-input hover:bg-white",
|
|
13
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
14
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
15
|
+
},
|
|
16
|
+
size: {
|
|
17
|
+
default: "h-10 px-4 py-2",
|
|
18
|
+
xs: "h-8 px-3 text-xs",
|
|
19
|
+
sm: "h-9 px-3",
|
|
20
|
+
lg: "h-11 px-8",
|
|
21
|
+
icon: "h-10 w-10",
|
|
22
|
+
"icon-small": "h-8 w-8"
|
|
23
|
+
},
|
|
24
|
+
rounded: {
|
|
25
|
+
small: "rounded",
|
|
26
|
+
default: "rounded-md",
|
|
27
|
+
large: "rounded-lg",
|
|
28
|
+
full: "rounded-full"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
defaultVariants: {
|
|
32
|
+
variant: "default",
|
|
33
|
+
size: "default",
|
|
34
|
+
rounded: "default"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
export {
|
|
39
|
+
t as buttonVariants
|
|
40
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
const o = [
|
|
2
|
+
"pdf",
|
|
3
|
+
"txt",
|
|
4
|
+
"xml",
|
|
5
|
+
"xls",
|
|
6
|
+
"xlsx",
|
|
7
|
+
"ods",
|
|
8
|
+
"odt",
|
|
9
|
+
"doc",
|
|
10
|
+
"docx",
|
|
11
|
+
"csv",
|
|
12
|
+
"odp",
|
|
13
|
+
"ppt",
|
|
14
|
+
"pptx"
|
|
15
|
+
], p = ["svg", "png", "jpg", "jpeg", "gif", "webp", "avif"], t = ["mp4", "ogv", "webm"], m = ["mp3", "ogg", "opus"], n = {
|
|
16
|
+
"application/xml": [".xml"],
|
|
17
|
+
"text/plain": [".txt"],
|
|
18
|
+
"application/pdf": [".pdf"],
|
|
19
|
+
"application/msword": [".doc"],
|
|
20
|
+
"application/vnd.ms-excel": [".xls"],
|
|
21
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": [".xlsx"],
|
|
22
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": [".docx"],
|
|
23
|
+
"text/csv": [".csv"]
|
|
24
|
+
}, s = {
|
|
25
|
+
"image/jpeg": [".jpeg", ".jpg"],
|
|
26
|
+
"image/jpg": [".jpg"],
|
|
27
|
+
"image/png": [".png"],
|
|
28
|
+
"image/gif": [".gif"],
|
|
29
|
+
"image/svg": [".svg"],
|
|
30
|
+
"image/svg+xml": [".svg"],
|
|
31
|
+
"image/webp": [".webp"],
|
|
32
|
+
"image/avif": [".avif"]
|
|
33
|
+
}, a = {
|
|
34
|
+
"video/mp4": [".mp4"],
|
|
35
|
+
"video/mpeg": [".mpeg"],
|
|
36
|
+
"video/webm": [".webm"]
|
|
37
|
+
}, d = {
|
|
38
|
+
"audio/mpeg": [".mp3"],
|
|
39
|
+
"audio/ogg": [".oga"],
|
|
40
|
+
"audio/opus": [".opus"]
|
|
41
|
+
}, e = {
|
|
42
|
+
audio: d,
|
|
43
|
+
document: n,
|
|
44
|
+
image: s,
|
|
45
|
+
video: a
|
|
46
|
+
}, i = {
|
|
47
|
+
audio: m,
|
|
48
|
+
document: o,
|
|
49
|
+
image: p,
|
|
50
|
+
video: t
|
|
51
|
+
}, g = [
|
|
52
|
+
...i.audio,
|
|
53
|
+
...i.document,
|
|
54
|
+
...i.image,
|
|
55
|
+
...i.video
|
|
56
|
+
], c = {
|
|
57
|
+
...e.audio,
|
|
58
|
+
...e.document,
|
|
59
|
+
...e.image,
|
|
60
|
+
...e.video
|
|
61
|
+
};
|
|
62
|
+
export {
|
|
63
|
+
g as allMediaFileExtensions,
|
|
64
|
+
c as allMediaMimetypes,
|
|
65
|
+
m as audioFileExtensions,
|
|
66
|
+
d as audioMimetype,
|
|
67
|
+
o as documentFileExtensions,
|
|
68
|
+
n as documentMimetype,
|
|
69
|
+
p as imageFileExtensions,
|
|
70
|
+
s as imageMimetype,
|
|
71
|
+
i as mediaExtensionsByKind,
|
|
72
|
+
e as mediaMimetypeByKind,
|
|
73
|
+
t as videoFileExtensions,
|
|
74
|
+
a as videoMimetype
|
|
75
|
+
};
|