@remarkablejames/editor 0.0.1 → 0.0.2
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/lib/{ActionMenuButton-B0EHT9CC.js → ActionMenuButton-Bmn3RME4.js} +10 -9
- package/lib/ActionMenuButton-C5P0Kzrb.cjs +1 -0
- package/lib/Attachment.cjs +2 -2
- package/lib/Attachment.js +33 -31
- package/lib/Blockquote.cjs +2 -2
- package/lib/Blockquote.js +12 -13
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.js +10 -11
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.js +8 -9
- package/lib/Callout.cjs +1 -1
- package/lib/Callout.js +45 -41
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.js +14 -13
- package/lib/Code.cjs +1 -1
- package/lib/Code.js +5 -6
- package/lib/CodeBlock.cjs +1 -44
- package/lib/CodeBlock.js +183 -3858
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.js +8 -9
- package/lib/Color.cjs +1 -1
- package/lib/Color.js +19 -18
- package/lib/Column.cjs +1 -1
- package/lib/Column.js +8 -9
- package/lib/{Drawer-BCWVN-4l.js → Drawer-DvGh9aXG.js} +52 -46
- package/lib/Drawer-gz9U5ArC.cjs +2 -0
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.js +3 -3
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.js +15 -14
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.js +20 -16
- package/lib/ExportPdf.cjs +3 -3
- package/lib/ExportPdf.js +13 -14
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.js +6 -6
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.js +6 -7
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.js +14 -15
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.js +26 -26
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.js +23 -22
- package/lib/History.cjs +1 -1
- package/lib/History.js +11 -11
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.js +9 -10
- package/lib/Icon-CKM0tYbW.js +15 -0
- package/lib/Icon-CQyFgXeo.cjs +1 -0
- package/lib/{Iframe-BdgiWGml.js → Iframe-CnnvV6cK.js} +21 -19
- package/lib/Iframe-Ds6gG2YO.cjs +1 -0
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.js +2 -2
- package/lib/Image.cjs +1 -1
- package/lib/Image.js +5 -4
- package/lib/ImageCropper-BKhXlnXN.cjs +1 -0
- package/lib/ImageCropper-DUzu_9-6.js +896 -0
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.js +94 -91
- package/lib/ImportWord.cjs +1 -1
- package/lib/ImportWord.js +26 -25
- package/lib/{Indent-BpMcZKok.js → Indent-Bsj8gKvT.js} +30 -31
- package/lib/Indent-D_7HOYYd.cjs +1 -0
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.js +2 -2
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.js +11 -12
- package/lib/{Katex-B8_uprkO.js → Katex-CilGTz7u.js} +22 -19
- package/lib/Katex-lL3bHXJd.cjs +4 -0
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.js +2 -2
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.js +20 -19
- package/lib/Link.cjs +1 -1
- package/lib/Link.js +2 -2
- package/lib/{LinkEditBlock-BX0fXXpF.js → LinkEditBlock-BD_WvA3r.js} +24 -19
- package/lib/LinkEditBlock-D3HSHmsU.cjs +5 -0
- package/lib/Mention.js +3 -3
- package/lib/Mermaid-BfeLPzoS.cjs +2 -0
- package/lib/{Mermaid-D8bbIgAl.js → Mermaid-BrjU75Bs.js} +48 -45
- package/lib/Mermaid.cjs +1 -1
- package/lib/Mermaid.js +2 -2
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.js +28 -26
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.js +10 -11
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.js +42 -37
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.js +5 -5
- package/lib/{SlashCommandNodeView-BcmtKbEE.js → SlashCommandNodeView-COx5qZ2y.js} +41 -39
- package/lib/SlashCommandNodeView-DD-nlhM-.cjs +1 -0
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.js +11 -12
- package/lib/{Table-DbxuP5xh.js → Table-BlM8yMhr.js} +46 -46
- package/lib/Table-C21AlUrh.cjs +5 -0
- package/lib/Table.cjs +1 -1
- package/lib/Table.js +1 -1
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.js +11 -12
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.js +27 -26
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.js +19 -18
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.js +8 -9
- package/lib/{Twitter-9I6BLNmg.js → Twitter-BP8sYXX7.js} +22 -18
- package/lib/Twitter-D46MnvPr.cjs +1 -0
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.js +2 -2
- package/lib/Video-Bpd8W8l6.js +231 -0
- package/lib/Video-BwrHx6B1.cjs +1 -0
- package/lib/Video.cjs +1 -1
- package/lib/Video.js +5 -4
- package/lib/bubble.cjs +3 -3
- package/lib/bubble.js +171 -162
- package/lib/button-BmTP96NR.cjs +1 -0
- package/lib/button-CDIxPURh.js +35 -0
- package/lib/checkbox-7sfSdzy9.js +29 -0
- package/lib/checkbox-DyVlLWHv.cjs +1 -0
- package/lib/{clsx-CDyrfCnw.js → clsx-m_C5j3RU.js} +24 -24
- package/lib/dialog-B-jOQ5i3.cjs +1 -0
- package/lib/dialog-QWWUWOGP.js +95 -0
- package/lib/{dropdown-menu-Bs69ZBbO.js → dropdown-menu-C1hdPLCZ.js} +1 -1
- package/lib/{dropdown-menu-DjWlG2-J.cjs → dropdown-menu-CkHN04Mx.cjs} +1 -1
- package/lib/events.constant-Bh2uzJud.js +71 -0
- package/lib/events.constant-ELn21EzG.cjs +1 -0
- package/lib/extensions/CodeBlock/CodeBlock.d.ts +1 -1
- package/lib/file-BLas99n7.js +43 -0
- package/lib/file-i7e4nQY2.cjs +1 -0
- package/lib/{index-C-tDsIKJ.js → index-B3Ijnbxs.js} +1 -1
- package/lib/{index-C1WCZhyA.js → index-C1KQsOcg.js} +1 -1
- package/lib/{index-CsSfYR30.js → index-C8FjP66D.js} +1 -1
- package/lib/index-CAiZY1nx.js +2741 -0
- package/lib/index-DWSAk_9a.cjs +1 -0
- package/lib/{index-DjDf4BK8.js → index-s3l5RdyW.js} +1 -1
- package/lib/index.cjs +4 -4
- package/lib/index.js +392 -147
- package/lib/input-qvpuOf-3.js +21 -0
- package/lib/input-s0JD5kf2.cjs +1 -0
- package/lib/isNumber-BTYSVlKo.cjs +1 -0
- package/lib/isNumber-WaBzl_0s.js +15 -0
- package/lib/label-CFax-gzo.cjs +1 -0
- package/lib/label-DC37f2RQ.js +11 -0
- package/lib/{popover-D-hUKDYu.cjs → popover-B05Fd8lC.cjs} +1 -1
- package/lib/{popover-CPr9bHYn.js → popover-CsSXh7w6.js} +1 -1
- package/lib/{renderNodeView-BJSrgyGj.js → renderNodeView-C_hPIdEs.js} +2 -2
- package/lib/{select-C2KF4RNg.cjs → select-7ubC1NF0.cjs} +1 -1
- package/lib/{select-CuE_HaQJ.js → select-B3-5wTqn.js} +1 -1
- package/lib/{separator-CHzYNMVt.js → separator-CYCA8tSn.js} +13 -12
- package/lib/separator-ncbdw4oq.cjs +1 -0
- package/lib/style.css +1 -1
- package/lib/tabs-BeHxylKH.js +46 -0
- package/lib/tabs-DBqNpGAq.cjs +1 -0
- package/lib/{textarea-gEoNp9CA.js → textarea-1FhpmBkP.js} +1 -1
- package/lib/{textarea-DZj6EY-N.cjs → textarea-Bjhcpp76.cjs} +1 -1
- package/lib/throttle-CRNq0z-O.js +249 -0
- package/lib/throttle-gTTvqDTW.cjs +1 -0
- package/lib/toggle-DoJTBdvy.js +89 -0
- package/lib/toggle-oFwBZC4x.cjs +1 -0
- package/lib/{updatePosition-e90ZrFWW.js → updatePosition-DvfTZHcH.js} +2 -2
- package/lib/useButtonProps-BE10eHkG.js +165 -0
- package/lib/useButtonProps-CFu0GHzW.cjs +1 -0
- package/package.json +1 -1
- package/lib/ActionMenuButton-J1el_e6Z.cjs +0 -1
- package/lib/Drawer-BTouEroZ.cjs +0 -2
- package/lib/Iframe-BfBLILDA.cjs +0 -1
- package/lib/Indent-Dvqz_WEn.cjs +0 -1
- package/lib/Katex-BQyeCeQ0.cjs +0 -4
- package/lib/LinkEditBlock-CIshn_8F.cjs +0 -5
- package/lib/Mermaid-0GiGVxn0.cjs +0 -2
- package/lib/SlashCommandNodeView-rDJ7OjRd.cjs +0 -1
- package/lib/Table-BEhNBeuA.cjs +0 -5
- package/lib/Twitter-BuEBgpi9.cjs +0 -1
- package/lib/index-D9oM__YW.cjs +0 -1
- package/lib/index-lj3VWExo.js +0 -4883
- package/lib/separator-_gvUNba_.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const s=require("react/jsx-runtime"),a=require("@radix-ui/react-slot"),c=require("./index-DWSAk_9a.cjs"),u=require("react");function d(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,i.get?i:{enumerable:!0,get:()=>t[e]})}}return r.default=t,Object.freeze(r)}const f=d(u),l=c.cva("richtext-inline-flex richtext-items-center richtext-justify-center richtext-whitespace-nowrap richtext-rounded-md richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-colors focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-pointer-events-none disabled:richtext-opacity-50",{variants:{variant:{default:"!richtext-bg-primary !richtext-text-primary-foreground hover:!richtext-bg-primary/90",destructive:"richtext-bg-destructive richtext-text-destructive-foreground hover:richtext-bg-destructive/90",outline:"richtext-border richtext-border-input richtext-bg-background richtext-text-foreground hover:richtext-bg-accent hover:richtext-text-accent-foreground",secondary:"richtext-bg-secondary richtext-text-secondary-foreground hover:richtext-bg-secondary/80",ghost:"hover:richtext-bg-accent hover:richtext-text-accent-foreground",link:"richtext-text-primary richtext-underline-offset-4 hover:richtext-underline"},size:{default:"richtext-h-10 richtext-px-4 richtext-py-2",sm:"richtext-h-9 richtext-rounded-md richtext-px-3",lg:"richtext-h-11 richtext-rounded-md richtext-px-8",icon:"richtext-size-10"}},defaultVariants:{variant:"default",size:"default"}}),n=f.forwardRef(({className:t,variant:r,size:e,asChild:i=!1,...o},x)=>{const h=i?a.Slot:"button";return s.jsx(h,{className:c.cn(l({variant:r,size:e,className:t})),ref:x,...o})});n.displayName="Button";exports.Button=n;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { Slot as x } from "@radix-ui/react-slot";
|
|
3
|
+
import { c as h, a } from "./index-CAiZY1nx.js";
|
|
4
|
+
import * as s from "react";
|
|
5
|
+
const d = a(
|
|
6
|
+
"richtext-inline-flex richtext-items-center richtext-justify-center richtext-whitespace-nowrap richtext-rounded-md richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-colors focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-pointer-events-none disabled:richtext-opacity-50",
|
|
7
|
+
{
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
default: "!richtext-bg-primary !richtext-text-primary-foreground hover:!richtext-bg-primary/90",
|
|
11
|
+
destructive: "richtext-bg-destructive richtext-text-destructive-foreground hover:richtext-bg-destructive/90",
|
|
12
|
+
outline: "richtext-border richtext-border-input richtext-bg-background richtext-text-foreground hover:richtext-bg-accent hover:richtext-text-accent-foreground",
|
|
13
|
+
secondary: "richtext-bg-secondary richtext-text-secondary-foreground hover:richtext-bg-secondary/80",
|
|
14
|
+
ghost: "hover:richtext-bg-accent hover:richtext-text-accent-foreground",
|
|
15
|
+
link: "richtext-text-primary richtext-underline-offset-4 hover:richtext-underline"
|
|
16
|
+
},
|
|
17
|
+
size: {
|
|
18
|
+
default: "richtext-h-10 richtext-px-4 richtext-py-2",
|
|
19
|
+
sm: "richtext-h-9 richtext-rounded-md richtext-px-3",
|
|
20
|
+
lg: "richtext-h-11 richtext-rounded-md richtext-px-8",
|
|
21
|
+
icon: "richtext-size-10"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
defaultVariants: {
|
|
25
|
+
variant: "default",
|
|
26
|
+
size: "default"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
), u = s.forwardRef(
|
|
30
|
+
({ className: t, variant: e, size: r, asChild: i = !1, ...c }, o) => /* @__PURE__ */ n(i ? x : "button", { className: h(d({ variant: e, size: r, className: t })), ref: o, ...c })
|
|
31
|
+
);
|
|
32
|
+
u.displayName = "Button";
|
|
33
|
+
export {
|
|
34
|
+
u as B
|
|
35
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import * as e from "@radix-ui/react-checkbox";
|
|
3
|
+
import { Check as h } from "lucide-react";
|
|
4
|
+
import * as s from "react";
|
|
5
|
+
import { c as r } from "./index-CAiZY1nx.js";
|
|
6
|
+
const a = s.forwardRef(({ className: i, ...c }, o) => /* @__PURE__ */ t(
|
|
7
|
+
e.Root,
|
|
8
|
+
{
|
|
9
|
+
ref: o,
|
|
10
|
+
className: r(
|
|
11
|
+
"!richtext-peer !richtext-h-4 !richtext-w-4 !richtext-shrink-0 !richtext-rounded-sm !richtext-border !richtext-border-primary !richtext-p-0 !richtext-ring-offset-background focus-visible:!richtext-outline-none focus-visible:!richtext-ring-2 focus-visible:!richtext-ring-ring focus-visible:!richtext-ring-offset-1 disabled:!richtext-cursor-not-allowed disabled:!richtext-opacity-50 data-[state=checked]:!richtext-bg-primary data-[state=checked]:!richtext-text-primary-foreground",
|
|
12
|
+
i
|
|
13
|
+
),
|
|
14
|
+
...c,
|
|
15
|
+
children: /* @__PURE__ */ t(
|
|
16
|
+
e.Indicator,
|
|
17
|
+
{
|
|
18
|
+
className: r(
|
|
19
|
+
"!richtext-flex !richtext-items-center !richtext-justify-center !richtext-p-0 !richtext-text-current"
|
|
20
|
+
),
|
|
21
|
+
children: /* @__PURE__ */ t(h, { className: "!richtext-h-4 !richtext-w-4" })
|
|
22
|
+
}
|
|
23
|
+
)
|
|
24
|
+
}
|
|
25
|
+
));
|
|
26
|
+
a.displayName = e.Root.displayName;
|
|
27
|
+
export {
|
|
28
|
+
a as C
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const c=require("react/jsx-runtime"),h=require("@radix-ui/react-checkbox"),x=require("lucide-react"),u=require("react"),s=require("./index-DWSAk_9a.cjs");function n(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const i=n(h),d=n(u),a=d.forwardRef(({className:e,...r},t)=>c.jsx(i.Root,{ref:t,className:s.cn("!richtext-peer !richtext-h-4 !richtext-w-4 !richtext-shrink-0 !richtext-rounded-sm !richtext-border !richtext-border-primary !richtext-p-0 !richtext-ring-offset-background focus-visible:!richtext-outline-none focus-visible:!richtext-ring-2 focus-visible:!richtext-ring-ring focus-visible:!richtext-ring-offset-1 disabled:!richtext-cursor-not-allowed disabled:!richtext-opacity-50 data-[state=checked]:!richtext-bg-primary data-[state=checked]:!richtext-text-primary-foreground",e),...r,children:c.jsx(i.Indicator,{className:s.cn("!richtext-flex !richtext-items-center !richtext-justify-center !richtext-p-0 !richtext-text-current"),children:c.jsx(x.Check,{className:"!richtext-h-4 !richtext-w-4"})})}));a.displayName=i.Root.displayName;exports.Checkbox=a;
|
|
@@ -7322,7 +7322,7 @@ function ml() {
|
|
|
7322
7322
|
return r;
|
|
7323
7323
|
}
|
|
7324
7324
|
export {
|
|
7325
|
-
|
|
7325
|
+
dl as $,
|
|
7326
7326
|
_ as A,
|
|
7327
7327
|
zs as B,
|
|
7328
7328
|
Ws as C,
|
|
@@ -7333,36 +7333,36 @@ export {
|
|
|
7333
7333
|
er as H,
|
|
7334
7334
|
Ja as I,
|
|
7335
7335
|
al as J,
|
|
7336
|
-
|
|
7337
|
-
|
|
7336
|
+
qe as K,
|
|
7337
|
+
qa as L,
|
|
7338
7338
|
Qa as M,
|
|
7339
7339
|
ll as N,
|
|
7340
|
-
|
|
7340
|
+
ja as O,
|
|
7341
7341
|
sr as P,
|
|
7342
|
-
|
|
7342
|
+
ze as Q,
|
|
7343
7343
|
Ia as R,
|
|
7344
7344
|
A as S,
|
|
7345
7345
|
$ as T,
|
|
7346
|
-
|
|
7347
|
-
|
|
7348
|
-
|
|
7349
|
-
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
|
|
7346
|
+
q as U,
|
|
7347
|
+
Se as V,
|
|
7348
|
+
tr as W,
|
|
7349
|
+
yi as X,
|
|
7350
|
+
mi as Y,
|
|
7351
|
+
Ps as Z,
|
|
7352
|
+
el as _,
|
|
7353
7353
|
Ga as a,
|
|
7354
|
-
|
|
7355
|
-
|
|
7356
|
-
|
|
7357
|
-
|
|
7358
|
-
|
|
7359
|
-
|
|
7360
|
-
|
|
7361
|
-
|
|
7362
|
-
|
|
7363
|
-
|
|
7364
|
-
|
|
7365
|
-
|
|
7354
|
+
fl as a0,
|
|
7355
|
+
ur as a1,
|
|
7356
|
+
sl as a2,
|
|
7357
|
+
Un as a3,
|
|
7358
|
+
Va as a4,
|
|
7359
|
+
Ls as a5,
|
|
7360
|
+
yt as a6,
|
|
7361
|
+
Ua as a7,
|
|
7362
|
+
Ya as a8,
|
|
7363
|
+
Vs as a9,
|
|
7364
|
+
Ir as aa,
|
|
7365
|
+
ul as ab,
|
|
7366
7366
|
Ka as b,
|
|
7367
7367
|
Ha as c,
|
|
7368
7368
|
Za as d,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a=require("react/jsx-runtime"),f=require("@radix-ui/react-dialog"),u=require("lucide-react"),m=require("react"),c=require("./index-DWSAk_9a.cjs");function n(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const o=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>t[i]})}}return e.default=t,Object.freeze(e)}const r=n(f),s=n(m),p=r.Root,D=r.Trigger,y=r.Portal,x=s.forwardRef(({className:t,...e},i)=>a.jsx(r.Overlay,{ref:i,className:c.cn("richtext-fixed richtext-inset-0 richtext-z-50 richtext-bg-black/80 data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0",t),...e}));x.displayName=r.Overlay.displayName;const l=s.forwardRef(({className:t,children:e,...i},o)=>a.jsxs(y,{"data-richtext-portal":!0,children:[a.jsx(x,{}),a.jsxs(r.Content,{"data-richtext-portal":!0,ref:o,className:c.cn("richtext-fixed richtext-left-[50%] richtext-top-[50%] richtext-z-50 richtext-grid richtext-w-full richtext-max-w-lg richtext-translate-x-[-50%] richtext-translate-y-[-50%] richtext-gap-4 richtext-border !richtext-border-border richtext-bg-background richtext-p-6 richtext-shadow-lg richtext-duration-200 data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[state=closed]:richtext-slide-out-to-left-1/2 data-[state=closed]:richtext-slide-out-to-top-[48%] data-[state=open]:richtext-slide-in-from-left-1/2 data-[state=open]:richtext-slide-in-from-top-[48%] sm:richtext-rounded-lg",t),...i,children:[e,a.jsxs(r.Close,{className:"richtext-absolute richtext-right-4 richtext-top-4 richtext-rounded-sm richtext-opacity-70 richtext-ring-offset-background richtext-transition-opacity hover:richtext-opacity-100 focus:richtext-outline-none focus:richtext-ring-2 focus:richtext-ring-ring focus:richtext-ring-offset-1 disabled:richtext-pointer-events-none data-[state=open]:richtext-bg-accent data-[state=open]:richtext-text-muted-foreground",children:[a.jsx(u.X,{className:"richtext-size-4 richtext-text-accent-foreground"}),a.jsx("span",{className:"richtext-sr-only richtext-text-accent-foreground",children:"Close"})]})]})]}));l.displayName=r.Content.displayName;function d({className:t,...e}){return a.jsx("div",{className:c.cn("richtext-flex richtext-flex-col richtext-space-y-1.5 richtext-text-center sm:richtext-text-left",t),...e})}d.displayName="DialogHeader";function h({className:t,...e}){return a.jsx("div",{className:c.cn("richtext-flex richtext-flex-col-reverse sm:richtext-flex-row sm:richtext-justify-end sm:richtext-space-x-2",t),...e})}h.displayName="DialogFooter";const g=s.forwardRef(({className:t,...e},i)=>a.jsx(r.Title,{ref:i,className:c.cn("richtext-text-lg richtext-font-semibold richtext-leading-none richtext-tracking-tight richtext-text-foreground",t),...e}));g.displayName=r.Title.displayName;const N=s.forwardRef(({className:t,...e},i)=>a.jsx(r.Description,{className:c.cn("richtext-text-sm richtext-text-muted-foreground",t),ref:i,...e}));N.displayName=r.Description.displayName;exports.Dialog=p;exports.DialogContent=l;exports.DialogFooter=h;exports.DialogHeader=d;exports.DialogTitle=g;exports.DialogTrigger=D;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { jsx as i, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import * as t from "@radix-ui/react-dialog";
|
|
3
|
+
import { X as l } from "lucide-react";
|
|
4
|
+
import * as o from "react";
|
|
5
|
+
import { c } from "./index-CAiZY1nx.js";
|
|
6
|
+
const D = t.Root, b = t.Trigger, d = t.Portal, x = o.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ i(
|
|
7
|
+
t.Overlay,
|
|
8
|
+
{
|
|
9
|
+
ref: r,
|
|
10
|
+
className: c(
|
|
11
|
+
"richtext-fixed richtext-inset-0 richtext-z-50 richtext-bg-black/80 data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0",
|
|
12
|
+
e
|
|
13
|
+
),
|
|
14
|
+
...a
|
|
15
|
+
}
|
|
16
|
+
));
|
|
17
|
+
x.displayName = t.Overlay.displayName;
|
|
18
|
+
const h = o.forwardRef(({ className: e, children: a, ...r }, n) => /* @__PURE__ */ s(d, { "data-richtext-portal": !0, children: [
|
|
19
|
+
/* @__PURE__ */ i(x, {}),
|
|
20
|
+
/* @__PURE__ */ s(
|
|
21
|
+
t.Content,
|
|
22
|
+
{
|
|
23
|
+
"data-richtext-portal": !0,
|
|
24
|
+
ref: n,
|
|
25
|
+
className: c(
|
|
26
|
+
"richtext-fixed richtext-left-[50%] richtext-top-[50%] richtext-z-50 richtext-grid richtext-w-full richtext-max-w-lg richtext-translate-x-[-50%] richtext-translate-y-[-50%] richtext-gap-4 richtext-border !richtext-border-border richtext-bg-background richtext-p-6 richtext-shadow-lg richtext-duration-200 data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[state=closed]:richtext-slide-out-to-left-1/2 data-[state=closed]:richtext-slide-out-to-top-[48%] data-[state=open]:richtext-slide-in-from-left-1/2 data-[state=open]:richtext-slide-in-from-top-[48%] sm:richtext-rounded-lg",
|
|
27
|
+
e
|
|
28
|
+
),
|
|
29
|
+
...r,
|
|
30
|
+
children: [
|
|
31
|
+
a,
|
|
32
|
+
/* @__PURE__ */ s(t.Close, { className: "richtext-absolute richtext-right-4 richtext-top-4 richtext-rounded-sm richtext-opacity-70 richtext-ring-offset-background richtext-transition-opacity hover:richtext-opacity-100 focus:richtext-outline-none focus:richtext-ring-2 focus:richtext-ring-ring focus:richtext-ring-offset-1 disabled:richtext-pointer-events-none data-[state=open]:richtext-bg-accent data-[state=open]:richtext-text-muted-foreground", children: [
|
|
33
|
+
/* @__PURE__ */ i(l, { className: "richtext-size-4 richtext-text-accent-foreground" }),
|
|
34
|
+
/* @__PURE__ */ i("span", { className: "richtext-sr-only richtext-text-accent-foreground", children: "Close" })
|
|
35
|
+
] })
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
] }));
|
|
40
|
+
h.displayName = t.Content.displayName;
|
|
41
|
+
function m({ className: e, ...a }) {
|
|
42
|
+
return /* @__PURE__ */ i(
|
|
43
|
+
"div",
|
|
44
|
+
{
|
|
45
|
+
className: c(
|
|
46
|
+
"richtext-flex richtext-flex-col richtext-space-y-1.5 richtext-text-center sm:richtext-text-left",
|
|
47
|
+
e
|
|
48
|
+
),
|
|
49
|
+
...a
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
m.displayName = "DialogHeader";
|
|
54
|
+
function f({ className: e, ...a }) {
|
|
55
|
+
return /* @__PURE__ */ i(
|
|
56
|
+
"div",
|
|
57
|
+
{
|
|
58
|
+
className: c(
|
|
59
|
+
"richtext-flex richtext-flex-col-reverse sm:richtext-flex-row sm:richtext-justify-end sm:richtext-space-x-2",
|
|
60
|
+
e
|
|
61
|
+
),
|
|
62
|
+
...a
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
f.displayName = "DialogFooter";
|
|
67
|
+
const p = o.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ i(
|
|
68
|
+
t.Title,
|
|
69
|
+
{
|
|
70
|
+
ref: r,
|
|
71
|
+
className: c(
|
|
72
|
+
"richtext-text-lg richtext-font-semibold richtext-leading-none richtext-tracking-tight richtext-text-foreground",
|
|
73
|
+
e
|
|
74
|
+
),
|
|
75
|
+
...a
|
|
76
|
+
}
|
|
77
|
+
));
|
|
78
|
+
p.displayName = t.Title.displayName;
|
|
79
|
+
const g = o.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ i(
|
|
80
|
+
t.Description,
|
|
81
|
+
{
|
|
82
|
+
className: c("richtext-text-sm richtext-text-muted-foreground", e),
|
|
83
|
+
ref: r,
|
|
84
|
+
...a
|
|
85
|
+
}
|
|
86
|
+
));
|
|
87
|
+
g.displayName = t.Description.displayName;
|
|
88
|
+
export {
|
|
89
|
+
D,
|
|
90
|
+
b as a,
|
|
91
|
+
h as b,
|
|
92
|
+
p as c,
|
|
93
|
+
f as d,
|
|
94
|
+
m as e
|
|
95
|
+
};
|
|
@@ -2,7 +2,7 @@ import { jsx as c, jsxs as x } from "react/jsx-runtime";
|
|
|
2
2
|
import * as t from "@radix-ui/react-dropdown-menu";
|
|
3
3
|
import { ChevronRight as d, Check as h, Circle as l } from "lucide-react";
|
|
4
4
|
import * as s from "react";
|
|
5
|
-
import { c as o } from "./index-
|
|
5
|
+
import { c as o } from "./index-CAiZY1nx.js";
|
|
6
6
|
const R = t.Root, I = t.Trigger, S = t.Portal, C = t.Sub, m = s.forwardRef(({ className: e, inset: r, children: i, ...a }, n) => /* @__PURE__ */ x(
|
|
7
7
|
t.SubTrigger,
|
|
8
8
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const c=require("react/jsx-runtime"),w=require("@radix-ui/react-dropdown-menu"),d=require("lucide-react"),g=require("react"),a=require("./index-
|
|
1
|
+
"use strict";const c=require("react/jsx-runtime"),w=require("@radix-ui/react-dropdown-menu"),d=require("lucide-react"),g=require("react"),a=require("./index-DWSAk_9a.cjs");function x(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const o=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(r,i,o.get?o:{enumerable:!0,get:()=>t[i]})}}return r.default=t,Object.freeze(r)}const e=x(w),n=x(g),y=e.Root,N=e.Trigger,D=e.Portal,M=e.Sub,h=n.forwardRef(({className:t,inset:r,children:i,...o},s)=>c.jsxs(e.SubTrigger,{ref:s,className:a.cn("richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-outline-none focus:richtext-bg-accent data-[state=open]:richtext-bg-accent",r&&"richtext-pl-8",t),...o,children:[i,c.jsx(d.ChevronRight,{className:"richtext-ml-auto richtext-size-4"})]}));h.displayName=e.SubTrigger.displayName;const l=n.forwardRef(({className:t,...r},i)=>c.jsx(e.SubContent,{"data-richtext-portal":!0,ref:i,className:a.cn("richtext-z-50 richtext-min-w-[8rem] richtext-overflow-hidden richtext-rounded-md !richtext-border !richtext-border-border richtext-bg-popover richtext-p-1 richtext-text-popover-foreground richtext-shadow-lg data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2",t),...r}));l.displayName=e.SubContent.displayName;const u=n.forwardRef(({className:t,sideOffset:r=4,...i},o)=>c.jsx(e.Portal,{"data-richtext-portal":!0,children:c.jsx(e.Content,{"data-richtext-portal":!0,ref:o,sideOffset:r,className:a.cn("richtext-z-50 richtext-min-w-[8rem] richtext-overflow-hidden richtext-rounded-md !richtext-border !richtext-border-border richtext-bg-popover richtext-p-1 richtext-text-popover-foreground richtext-shadow-md data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2",t),...i})}));u.displayName=e.Content.displayName;const p=n.forwardRef(({className:t,inset:r,...i},o)=>c.jsx(e.Item,{ref:o,className:a.cn("richtext-relative richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-outline-none richtext-transition-colors focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",r&&"richtext-pl-8",t),...i}));p.displayName=e.Item.displayName;const m=n.forwardRef(({className:t,children:r,checked:i,...o},s)=>c.jsxs(e.CheckboxItem,{checked:i,ref:s,className:a.cn("richtext-relative richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-outline-none richtext-transition-colors focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",t),...o,children:[c.jsx("span",{className:"richtext-absolute richtext-left-2 richtext-flex richtext-size-3.5 richtext-items-center richtext-justify-center",children:c.jsx(e.ItemIndicator,{children:c.jsx(d.Check,{className:"richtext-size-4"})})}),r]}));m.displayName=e.CheckboxItem.displayName;const j=n.forwardRef(({className:t,children:r,...i},o)=>c.jsxs(e.RadioItem,{ref:o,className:a.cn("richtext-relative richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-outline-none richtext-transition-colors focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",t),...i,children:[c.jsx("span",{className:"richtext-absolute richtext-left-2 richtext-flex richtext-size-3.5 richtext-items-center richtext-justify-center",children:c.jsx(e.ItemIndicator,{children:c.jsx(d.Circle,{className:"richtext-size-2 richtext-fill-current"})})}),r]}));j.displayName=e.RadioItem.displayName;const S=n.forwardRef(({className:t,inset:r,...i},o)=>c.jsx(e.Label,{ref:o,className:a.cn("richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-font-semibold",r&&"richtext-pl-8",t),...i}));S.displayName=e.Label.displayName;const f=n.forwardRef(({className:t,...r},i)=>c.jsx(e.Separator,{className:a.cn("richtext--mx-1 richtext-my-1 richtext-h-px richtext-bg-muted",t),ref:i,...r}));f.displayName=e.Separator.displayName;function b({className:t,...r}){return c.jsx("span",{className:a.cn("richtext-ml-auto richtext-text-xs richtext-tracking-widest richtext-opacity-60",t),...r})}b.displayName="DropdownMenuShortcut";exports.DropdownMenu=y;exports.DropdownMenuCheckboxItem=m;exports.DropdownMenuContent=u;exports.DropdownMenuItem=p;exports.DropdownMenuPortal=D;exports.DropdownMenuSeparator=f;exports.DropdownMenuShortcut=b;exports.DropdownMenuSub=M;exports.DropdownMenuSubContent=l;exports.DropdownMenuSubTrigger=h;exports.DropdownMenuTrigger=N;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import n from "react";
|
|
3
|
+
function f(t) {
|
|
4
|
+
return t = t || /* @__PURE__ */ new Map(), {
|
|
5
|
+
/**
|
|
6
|
+
* A Map of event names to registered handler functions.
|
|
7
|
+
*/
|
|
8
|
+
all: t,
|
|
9
|
+
/**
|
|
10
|
+
* Register an event handler for the given type.
|
|
11
|
+
* @param {string|symbol} type Type of event to listen for, or `'*'` for all events
|
|
12
|
+
* @param {Function} handler Function to call in response to given event
|
|
13
|
+
* @memberOf mitt
|
|
14
|
+
*/
|
|
15
|
+
on(s, o) {
|
|
16
|
+
const e = t.get(s);
|
|
17
|
+
e ? e.push(o) : t.set(s, [o]);
|
|
18
|
+
},
|
|
19
|
+
/**
|
|
20
|
+
* Remove an event handler for the given type.
|
|
21
|
+
* If `handler` is omitted, all handlers of the given type are removed.
|
|
22
|
+
* @param {string|symbol} type Type of event to unregister `handler` from (`'*'` to remove a wildcard handler)
|
|
23
|
+
* @param {Function} [handler] Handler function to remove
|
|
24
|
+
* @memberOf mitt
|
|
25
|
+
*/
|
|
26
|
+
off(s, o) {
|
|
27
|
+
const e = t.get(s);
|
|
28
|
+
e && (o ? e.splice(e.indexOf(o) >>> 0, 1) : t.set(s, []));
|
|
29
|
+
},
|
|
30
|
+
/**
|
|
31
|
+
* Invoke all handlers for the given type.
|
|
32
|
+
* If present, `'*'` handlers are invoked after type-matched handlers.
|
|
33
|
+
*
|
|
34
|
+
* Note: Manually firing '*' handlers is not supported.
|
|
35
|
+
*
|
|
36
|
+
* @param {string|symbol} type The event type to invoke
|
|
37
|
+
* @param {Any} [evt] Any value (object is recommended and powerful), passed to each handler
|
|
38
|
+
* @memberOf mitt
|
|
39
|
+
*/
|
|
40
|
+
emit(s, o) {
|
|
41
|
+
let e = t.get(s);
|
|
42
|
+
e && e.slice().map((i) => {
|
|
43
|
+
i(o);
|
|
44
|
+
}), e = t.get("*"), e && e.slice().map((i) => {
|
|
45
|
+
i(s, o);
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
const c = f(), r = n.createContext(c), m = () => n.useContext(r);
|
|
51
|
+
function D(t, s) {
|
|
52
|
+
const o = m();
|
|
53
|
+
n.useEffect(() => (s.map((e) => o.on(e, t)), () => {
|
|
54
|
+
s.map((e) => o.off(e, t));
|
|
55
|
+
}), [o, s, t]);
|
|
56
|
+
}
|
|
57
|
+
const a = c.emit;
|
|
58
|
+
function p({ children: t }) {
|
|
59
|
+
return /* @__PURE__ */ u(r.Provider, { value: c, children: t });
|
|
60
|
+
}
|
|
61
|
+
const L = {
|
|
62
|
+
UPLOAD_IMAGE: (t) => `UPLOAD_IMAGE-${t}`,
|
|
63
|
+
UPLOAD_VIDEO: (t) => `UPLOAD_VIDEO-${t}`,
|
|
64
|
+
EXCALIDRAW: (t) => `EXCALIDRAW-${t}`
|
|
65
|
+
};
|
|
66
|
+
export {
|
|
67
|
+
L as E,
|
|
68
|
+
p as R,
|
|
69
|
+
a as e,
|
|
70
|
+
D as u
|
|
71
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),o=require("react");function f(e){return e=e||new Map,{all:e,on(s,i){const t=e.get(s);t?t.push(i):e.set(s,[i])},off(s,i){const t=e.get(s);t&&(i?t.splice(t.indexOf(i)>>>0,1):e.set(s,[]))},emit(s,i){let t=e.get(s);t&&t.slice().map(n=>{n(i)}),t=e.get("*"),t&&t.slice().map(n=>{n(s,i)})}}}const c=f(),u=o.createContext(c),E=()=>o.useContext(u);function m(e,s){const i=E();o.useEffect(()=>(s.map(t=>i.on(t,e)),()=>{s.map(t=>i.off(t,e))}),[i,s,e])}const A=c.emit;function D({children:e}){return r.jsx(u.Provider,{value:c,children:e})}const L={UPLOAD_IMAGE:e=>`UPLOAD_IMAGE-${e}`,UPLOAD_VIDEO:e=>`UPLOAD_VIDEO-${e}`,EXCALIDRAW:e=>`EXCALIDRAW-${e}`};exports.EVENTS=L;exports.ReactBusProvider=D;exports.emit=A;exports.useListener=m;
|
|
@@ -3,7 +3,7 @@ import { GeneralOptions } from '../../types';
|
|
|
3
3
|
export * from './components/RichTextCodeBlock';
|
|
4
4
|
export interface CodeBlockOptions extends GeneralOptions<CodeBlockOptions> {
|
|
5
5
|
}
|
|
6
|
-
declare module
|
|
6
|
+
declare module "@tiptap/core" {
|
|
7
7
|
interface Commands<ReturnType> {
|
|
8
8
|
setCodeBlock: {
|
|
9
9
|
setCodeBlock: (options?: any) => ReturnType;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
function o(t) {
|
|
2
|
+
return t.replace(/^.*\/|\..+$/g, "");
|
|
3
|
+
}
|
|
4
|
+
function u(t) {
|
|
5
|
+
return t.split(".").pop();
|
|
6
|
+
}
|
|
7
|
+
function c(t) {
|
|
8
|
+
return t < 1024 ? `${t} Byte` : t < 1024 * 1024 ? `${(t / 1024).toFixed(2)} KB` : `${(t / 1024 / 1024).toFixed(2)} MB`;
|
|
9
|
+
}
|
|
10
|
+
function d(t) {
|
|
11
|
+
return t ? t === "application/pdf" ? "pdf" : t.startsWith("application/") && [".document", "word"].some((r) => t.includes(r)) ? "word" : t.startsWith("application/") && ["presentation"].some((r) => t.includes(r)) ? "excel" : t.startsWith("application/") && ["sheet"].some((r) => t.includes(r)) ? "ppt" : t.startsWith("image") ? "image" : t.startsWith("audio") ? "audio" : t.startsWith("video") ? "video" : "file" : "file";
|
|
12
|
+
}
|
|
13
|
+
function l(t) {
|
|
14
|
+
return new Promise((r) => {
|
|
15
|
+
const n = new FileReader();
|
|
16
|
+
n.addEventListener(
|
|
17
|
+
"load",
|
|
18
|
+
() => {
|
|
19
|
+
r({
|
|
20
|
+
alt: t.name,
|
|
21
|
+
src: n.result
|
|
22
|
+
});
|
|
23
|
+
},
|
|
24
|
+
!1
|
|
25
|
+
), n.readAsDataURL(t);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function m(t, r) {
|
|
29
|
+
const n = t.split(","), s = n[0].match(/:(.*?);/)[1], a = atob(n[n.length - 1]);
|
|
30
|
+
let e = a.length;
|
|
31
|
+
const i = new Uint8Array(e);
|
|
32
|
+
for (; e--; )
|
|
33
|
+
i[e] = a.charCodeAt(e);
|
|
34
|
+
return new File([i], r, { type: s });
|
|
35
|
+
}
|
|
36
|
+
export {
|
|
37
|
+
o as a,
|
|
38
|
+
c as b,
|
|
39
|
+
m as d,
|
|
40
|
+
u as e,
|
|
41
|
+
d as n,
|
|
42
|
+
l as r
|
|
43
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function s(t){return t.replace(/^.*\/|\..+$/g,"")}function u(t){return t.split(".").pop()}function c(t){return t<1024?`${t} Byte`:t<1024*1024?`${(t/1024).toFixed(2)} KB`:`${(t/1024/1024).toFixed(2)} MB`}function l(t){return t?t==="application/pdf"?"pdf":t.startsWith("application/")&&[".document","word"].some(e=>t.includes(e))?"word":t.startsWith("application/")&&["presentation"].some(e=>t.includes(e))?"excel":t.startsWith("application/")&&["sheet"].some(e=>t.includes(e))?"ppt":t.startsWith("image")?"image":t.startsWith("audio")?"audio":t.startsWith("video")?"video":"file":"file"}function d(t){return new Promise(e=>{const r=new FileReader;r.addEventListener("load",()=>{e({alt:t.name,src:r.result})},!1),r.readAsDataURL(t)})}function m(t,e){const r=t.split(","),o=r[0].match(/:(.*?);/)[1],i=atob(r[r.length-1]);let n=i.length;const a=new Uint8Array(n);for(;n--;)a[n]=i.charCodeAt(n);return new File([a],e,{type:o})}exports.dataURLtoFile=m;exports.extractFileExtension=u;exports.extractFilename=s;exports.normalizeFileSize=c;exports.normalizeFileType=l;exports.readImageAsBase64=d;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PluginKey as Kt, Plugin as Ut } from "@tiptap/pm/state";
|
|
2
2
|
import { DecorationSet as Jt, Decoration as Gt } from "@tiptap/pm/view";
|
|
3
|
-
import { J as Qt } from "./clsx-
|
|
3
|
+
import { J as Qt } from "./clsx-m_C5j3RU.js";
|
|
4
4
|
const Bt = ["top", "right", "bottom", "left"], Rt = ["start", "end"], At = /* @__PURE__ */ Bt.reduce((t, e) => t.concat(e, e + "-" + Rt[0], e + "-" + Rt[1]), []), j = Math.min, M = Math.max, rt = Math.round, H = (t) => ({
|
|
5
5
|
x: t,
|
|
6
6
|
y: t
|