reactjs-tiptap-editor 0.2.22 → 0.2.24
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/{RichTextEditor-CRJ-dSCW.cjs → RichTextEditor-CIhslsGV.cjs} +4 -4
- package/lib/{RichTextEditor-BnruDETn.js → RichTextEditor-C_dIT2FZ.js} +534 -534
- package/lib/extension-bundle.cjs +3 -3
- package/lib/extension-bundle.d.cts +70 -66
- package/lib/extension-bundle.d.ts +70 -66
- package/lib/extension-bundle.js +1275 -1217
- package/lib/{index-8id9bPv5.js → index-BlV5SJJW.js} +28 -42
- package/lib/index-CJ6Hb9MN.cjs +1 -0
- package/lib/index.cjs +1 -1
- package/lib/index.d.cts +68 -59
- package/lib/index.d.ts +68 -59
- package/lib/index.js +2 -2
- package/lib/locale-bundle.cjs +1 -1
- package/lib/locale-bundle.d.cts +68 -59
- package/lib/locale-bundle.d.ts +68 -59
- package/lib/locale-bundle.js +1 -1
- package/lib/style.css +1 -1
- package/lib/{tiptap-BV9BUpUC.js → tiptap-CXio79KB.js} +621 -768
- package/lib/tiptap-Dq62HiQ9.cjs +113 -0
- package/lib/vendor-DdwtMmSr.cjs +302 -0
- package/lib/{vendor-DyAqAGVt.js → vendor-VlEklMUJ.js} +15128 -11919
- package/package.json +23 -24
- package/lib/index-CYg22iLG.cjs +0 -1
- package/lib/tiptap-Ufn12SjW.cjs +0 -116
- package/lib/vendor-CRmKyn1B.cjs +0 -264
|
@@ -4,28 +4,28 @@ var Xt = (t, e, r) => mi(t, typeof e != "symbol" ? e + "" : e, r);
|
|
|
4
4
|
import { jsxs as g, jsx as i, Fragment as V } from "react/jsx-runtime";
|
|
5
5
|
import * as W from "react";
|
|
6
6
|
import Ht, { createContext as xi, useContext as fi, useSyncExternalStore as gi, useRef as J, useCallback as H, useState as S, useEffect as B, useMemo as U, Fragment as Pe, memo as pi, forwardRef as wi, useId as vi, useImperativeHandle as bi, useLayoutEffect as yi } from "react";
|
|
7
|
-
import {
|
|
8
|
-
import { u as q, I as xt,
|
|
7
|
+
import { Q as re, b as yt, m as st, V as Ci, N as gt, W as de, R as pt, X as Re, Y as ie, Z as Ti, B as tt, _ as Ni, $ as ki, a0 as Si } from "./tiptap-CXio79KB.js";
|
|
8
|
+
import { u as q, I as xt, n as ft, o as he, V as Ce, p as Mi, C as Ai, h as Z, B as Li, q as ne, E as Ii } from "./index-BlV5SJJW.js";
|
|
9
9
|
import * as br from "@radix-ui/react-separator";
|
|
10
|
-
import {
|
|
10
|
+
import { ax as Ei, at as oe, ak as zi, ay as ue, au as Oe, T as Wt, N as Pi, A as Ri, az as ae, aA as ht, aB as yr, b as He, P as De, a0 as Oi, $ as Hi, av as Cr, aC as Di, aD as me, aE as _i, H as Ft, aF as Bi, aG as $i, S as Vi, aH as Wi, aI as Fi } from "./vendor-VlEklMUJ.js";
|
|
11
11
|
import * as et from "@radix-ui/react-toast";
|
|
12
|
-
import { ChevronRight as Ui, Check as Tr, Circle as Gi, X as Nr,
|
|
12
|
+
import { ChevronRight as Ui, Check as Tr, Circle as Gi, X as Nr, WrapText as qi, PencilRuler as ji, FlipHorizontal as Xi, FlipVertical as Yi, CropIcon as Ki, ChevronUp as Zi, Paperclip as Ji, Eye as Qi, Settings as tn, ZoomOut as en, ZoomIn as rn, BookMarked as nn, Sigma as on, SmilePlusIcon as an, Replace as Ze, SmilePlus as cn, Frame as sn, Columns2 as Je, PanelRight as ln, PanelLeft as dn, Clipboard as hn, Copy as un, GripVertical as mn, Plus as kr, Columns4 as xn, Columns3 as fn, Heading6 as gn, Heading5 as pn, Heading4 as wn, Heading3 as vn, Heading2 as bn, Heading1 as yn, ChevronsUpDown as Cn, Trash as Tn, Trash2 as Sr, TableCellsSplit as Nn, TableCellsMerge as kn, BetweenVerticalEnd as Sn, BetweenVerticalStart as Mn, BetweenHorizonalStart as An, BetweenHorizonalEnd as Ln, Unlink as In, Pencil as Mr, Sparkles as En, Table as zn, Minimize as Pn, Maximize as Rn, Video as On, ImageUp as Hn, Link as Dn, ListTodo as _n, ListOrdered as Bn, List as $n, IndentDecrease as Vn, IndentIncrease as Wn, Type as Fn, CodeXml as Un, Code as Gn, Superscript as qn, Subscript as jn, ChevronDown as Xn, Undo2 as Yn, Redo2 as Kn, PaintRoller as Zn, Eraser as Jn, Minus as Qn, Strikethrough as to, Quote as eo, Underline as ro, Italic as io, LoaderCircle as no, Bold as oo, HelpCircle as Ar } from "lucide-react";
|
|
13
13
|
import * as Ut from "@radix-ui/react-tooltip";
|
|
14
14
|
import { Color4 as j, Editor as Lr, makeDropdownToolbar as Ir } from "easydrawer";
|
|
15
15
|
import { Slot as Er } from "@radix-ui/react-slot";
|
|
16
16
|
import * as zr from "@radix-ui/react-toggle";
|
|
17
|
-
import { TextAlignRightIcon as
|
|
17
|
+
import { TextAlignRightIcon as ao, TextAlignLeftIcon as co, TextAlignJustifyIcon as so, TextAlignCenterIcon as lo } from "@radix-ui/react-icons";
|
|
18
18
|
import * as it from "@radix-ui/react-dialog";
|
|
19
19
|
import * as _t from "@radix-ui/react-popover";
|
|
20
20
|
import * as Pr from "@radix-ui/react-label";
|
|
21
21
|
import { Resizable as Rr } from "re-resizable";
|
|
22
22
|
import _e from "katex";
|
|
23
23
|
import ce from "mermaid";
|
|
24
|
-
import
|
|
25
|
-
import { HexColorPicker as
|
|
24
|
+
import ho, { sticky as uo } from "tippy.js";
|
|
25
|
+
import { HexColorPicker as mo } from "react-colorful";
|
|
26
26
|
import * as Te from "@radix-ui/react-switch";
|
|
27
27
|
import * as Ct from "@radix-ui/react-tabs";
|
|
28
|
-
import
|
|
28
|
+
import xo from "react-image-crop";
|
|
29
29
|
import * as Ne from "@radix-ui/react-checkbox";
|
|
30
30
|
import * as X from "@radix-ui/react-dropdown-menu";
|
|
31
31
|
function P(...t) {
|
|
@@ -35,11 +35,11 @@ let ge;
|
|
|
35
35
|
function pe() {
|
|
36
36
|
return ge === void 0 && (ge = navigator.platform.includes("Mac")), ge;
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function fo(t) {
|
|
39
39
|
return `${t}`.toLowerCase() === "mod" ? pe() ? "⌘" : "Ctrl" : `${t}`.toLowerCase() === "alt" ? pe() ? "⌥" : "Alt" : `${t}`.toLowerCase() === "shift" ? pe() ? "⇧" : "Shift" : t;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
return t.map(
|
|
41
|
+
function go(t) {
|
|
42
|
+
return t.map(fo).join(" ");
|
|
43
43
|
}
|
|
44
44
|
const O = Ht.forwardRef(
|
|
45
45
|
(t, e) => {
|
|
@@ -79,7 +79,7 @@ const O = Ht.forwardRef(
|
|
|
79
79
|
) }),
|
|
80
80
|
n && /* @__PURE__ */ i(We, { ...s, children: /* @__PURE__ */ g("div", { className: "richtext-flex richtext-max-w-24 richtext-flex-col richtext-items-center richtext-text-center", children: [
|
|
81
81
|
/* @__PURE__ */ i("div", { children: n }),
|
|
82
|
-
!!(l != null && l.length) && /* @__PURE__ */ i("span", { children:
|
|
82
|
+
!!(l != null && l.length) && /* @__PURE__ */ i("span", { children: go(l) })
|
|
83
83
|
] }) })
|
|
84
84
|
] });
|
|
85
85
|
}
|
|
@@ -120,9 +120,9 @@ xe({
|
|
|
120
120
|
xe({
|
|
121
121
|
value: !1
|
|
122
122
|
});
|
|
123
|
-
const { Provider:
|
|
123
|
+
const { Provider: po, useStore: Or } = xe({
|
|
124
124
|
value: !1
|
|
125
|
-
}), { Provider:
|
|
125
|
+
}), { Provider: wo, useStore: Hr } = xe({
|
|
126
126
|
value: "light"
|
|
127
127
|
});
|
|
128
128
|
zi("0");
|
|
@@ -145,11 +145,11 @@ const bt = {
|
|
|
145
145
|
UPDATE_THEME: (t) => `UPDATE_THEME-${t}`,
|
|
146
146
|
SEARCH_REPLCE: "SEARCH_REPLACE"
|
|
147
147
|
};
|
|
148
|
-
function
|
|
148
|
+
function vo() {
|
|
149
149
|
const [t] = Or((e) => e.value);
|
|
150
150
|
return t;
|
|
151
151
|
}
|
|
152
|
-
const
|
|
152
|
+
const bo = {
|
|
153
153
|
setDisable: (t, e) => {
|
|
154
154
|
Be(bt.EDIT(t), e);
|
|
155
155
|
}
|
|
@@ -176,23 +176,23 @@ function Gt(t, e) {
|
|
|
176
176
|
function $e(t, e, r) {
|
|
177
177
|
return t < e ? e : t > r ? r : t;
|
|
178
178
|
}
|
|
179
|
-
const
|
|
180
|
-
function
|
|
179
|
+
const yo = (t) => typeof t == "number", Co = (t) => typeof t == "string", To = (t) => typeof t == "function";
|
|
180
|
+
function No(t, e = "px") {
|
|
181
181
|
if (!t)
|
|
182
182
|
return t;
|
|
183
|
-
const r =
|
|
183
|
+
const r = yo(t) ? String(t) : t, n = Number.parseFloat(r), a = r.match(/[%a-z]+$/i), o = a ? a[0] : e;
|
|
184
184
|
return Number.isNaN(n) ? t : n + o;
|
|
185
185
|
}
|
|
186
|
-
function
|
|
186
|
+
function ko(t, e) {
|
|
187
187
|
if (!t)
|
|
188
188
|
return !1;
|
|
189
189
|
const { extensions: r = [] } = (t == null ? void 0 : t.extensionManager) ?? {};
|
|
190
190
|
return !!r.find((a) => a.name === e);
|
|
191
191
|
}
|
|
192
|
-
function
|
|
193
|
-
return t.map((e) =>
|
|
192
|
+
function Sl(t) {
|
|
193
|
+
return t.map((e) => Co(e) ? { value: e, name: e } : e);
|
|
194
194
|
}
|
|
195
|
-
const
|
|
195
|
+
const So = ue(
|
|
196
196
|
"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-2 disabled:richtext-pointer-events-none disabled:richtext-opacity-50",
|
|
197
197
|
{
|
|
198
198
|
variants: {
|
|
@@ -220,14 +220,14 @@ const ko = ue(
|
|
|
220
220
|
({ className: t, variant: e, size: r, asChild: n = !1, ...a }, o) => /* @__PURE__ */ i(
|
|
221
221
|
n ? Er : "button",
|
|
222
222
|
{
|
|
223
|
-
className: P(
|
|
223
|
+
className: P(So({ variant: e, size: r, className: t })),
|
|
224
224
|
ref: o,
|
|
225
225
|
...a
|
|
226
226
|
}
|
|
227
227
|
)
|
|
228
228
|
);
|
|
229
229
|
G.displayName = "Button";
|
|
230
|
-
const
|
|
230
|
+
const Mo = X.Root, Ao = X.Trigger, Qe = X.Portal, tr = X.Sub, ke = W.forwardRef(({ className: t, inset: e, children: r, ...n }, a) => /* @__PURE__ */ g(
|
|
231
231
|
X.SubTrigger,
|
|
232
232
|
{
|
|
233
233
|
ref: a,
|
|
@@ -282,7 +282,7 @@ const ot = W.forwardRef(({ className: t, inset: e, ...r }, n) => /* @__PURE__ */
|
|
|
282
282
|
}
|
|
283
283
|
));
|
|
284
284
|
ot.displayName = X.Item.displayName;
|
|
285
|
-
const
|
|
285
|
+
const Lo = W.forwardRef(({ className: t, children: e, checked: r, ...n }, a) => /* @__PURE__ */ g(
|
|
286
286
|
X.CheckboxItem,
|
|
287
287
|
{
|
|
288
288
|
ref: a,
|
|
@@ -298,8 +298,8 @@ const Ao = W.forwardRef(({ className: t, children: e, checked: r, ...n }, a) =>
|
|
|
298
298
|
]
|
|
299
299
|
}
|
|
300
300
|
));
|
|
301
|
-
|
|
302
|
-
const
|
|
301
|
+
Lo.displayName = X.CheckboxItem.displayName;
|
|
302
|
+
const Io = W.forwardRef(({ className: t, children: e, ...r }, n) => /* @__PURE__ */ g(
|
|
303
303
|
X.RadioItem,
|
|
304
304
|
{
|
|
305
305
|
ref: n,
|
|
@@ -314,8 +314,8 @@ const Lo = W.forwardRef(({ className: t, children: e, ...r }, n) => /* @__PURE__
|
|
|
314
314
|
]
|
|
315
315
|
}
|
|
316
316
|
));
|
|
317
|
-
|
|
318
|
-
const
|
|
317
|
+
Io.displayName = X.RadioItem.displayName;
|
|
318
|
+
const Eo = W.forwardRef(({ className: t, inset: e, ...r }, n) => /* @__PURE__ */ i(
|
|
319
319
|
X.Label,
|
|
320
320
|
{
|
|
321
321
|
ref: n,
|
|
@@ -327,7 +327,7 @@ const Io = W.forwardRef(({ className: t, inset: e, ...r }, n) => /* @__PURE__ */
|
|
|
327
327
|
...r
|
|
328
328
|
}
|
|
329
329
|
));
|
|
330
|
-
|
|
330
|
+
Eo.displayName = X.Label.displayName;
|
|
331
331
|
const _r = W.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
|
|
332
332
|
X.Separator,
|
|
333
333
|
{
|
|
@@ -337,7 +337,7 @@ const _r = W.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
|
|
|
337
337
|
}
|
|
338
338
|
));
|
|
339
339
|
_r.displayName = X.Separator.displayName;
|
|
340
|
-
function
|
|
340
|
+
function zo({
|
|
341
341
|
className: t,
|
|
342
342
|
...e
|
|
343
343
|
}) {
|
|
@@ -349,7 +349,7 @@ function Eo({
|
|
|
349
349
|
}
|
|
350
350
|
);
|
|
351
351
|
}
|
|
352
|
-
|
|
352
|
+
zo.displayName = "DropdownMenuShortcut";
|
|
353
353
|
const Q = W.forwardRef(
|
|
354
354
|
({ className: t, type: e, ...r }, n) => /* @__PURE__ */ i(
|
|
355
355
|
"input",
|
|
@@ -365,13 +365,13 @@ const Q = W.forwardRef(
|
|
|
365
365
|
)
|
|
366
366
|
);
|
|
367
367
|
Q.displayName = "Input";
|
|
368
|
-
const
|
|
368
|
+
const Po = ue(
|
|
369
369
|
"richtext-text-sm richtext-font-medium richtext-leading-none peer-disabled:richtext-cursor-not-allowed peer-disabled:richtext-opacity-70"
|
|
370
370
|
), ct = W.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
|
|
371
371
|
Pr.Root,
|
|
372
372
|
{
|
|
373
373
|
ref: r,
|
|
374
|
-
className: P(
|
|
374
|
+
className: P(Po(), t),
|
|
375
375
|
...e
|
|
376
376
|
}
|
|
377
377
|
));
|
|
@@ -463,7 +463,7 @@ const $t = W.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
|
|
|
463
463
|
}
|
|
464
464
|
));
|
|
465
465
|
$t.displayName = Ct.Content.displayName;
|
|
466
|
-
const
|
|
466
|
+
const Ro = et.Provider, Vr = W.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
|
|
467
467
|
et.Viewport,
|
|
468
468
|
{
|
|
469
469
|
ref: r,
|
|
@@ -475,7 +475,7 @@ const Po = et.Provider, Vr = W.forwardRef(({ className: t, ...e }, r) => /* @__P
|
|
|
475
475
|
}
|
|
476
476
|
));
|
|
477
477
|
Vr.displayName = et.Viewport.displayName;
|
|
478
|
-
const
|
|
478
|
+
const Oo = ue(
|
|
479
479
|
"richtext-group richtext-pointer-events-auto richtext-relative richtext-flex richtext-w-full richtext-items-center richtext-justify-between richtext-space-x-4 richtext-overflow-hidden richtext-rounded-md !richtext-border richtext-p-6 richtext-pr-8 richtext-shadow-lg richtext-transition-all data-[swipe=cancel]:richtext-translate-x-0 data-[swipe=end]:richtext-translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:richtext-translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:richtext-transition-none data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[swipe=end]:richtext-animate-out data-[state=closed]:richtext-fade-out-80 data-[state=closed]:richtext-slide-out-to-right-full data-[state=open]:richtext-slide-in-from-top-full data-[state=open]:sm:richtext-slide-in-from-bottom-full",
|
|
480
480
|
{
|
|
481
481
|
variants: {
|
|
@@ -492,12 +492,12 @@ const Ro = ue(
|
|
|
492
492
|
et.Root,
|
|
493
493
|
{
|
|
494
494
|
ref: n,
|
|
495
|
-
className: P(
|
|
495
|
+
className: P(Oo({ variant: e }), t),
|
|
496
496
|
...r
|
|
497
497
|
}
|
|
498
498
|
));
|
|
499
499
|
Wr.displayName = et.Root.displayName;
|
|
500
|
-
const
|
|
500
|
+
const Ho = W.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
|
|
501
501
|
et.Action,
|
|
502
502
|
{
|
|
503
503
|
ref: r,
|
|
@@ -508,7 +508,7 @@ const Oo = W.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
|
|
|
508
508
|
...e
|
|
509
509
|
}
|
|
510
510
|
));
|
|
511
|
-
|
|
511
|
+
Ho.displayName = et.Action.displayName;
|
|
512
512
|
const Fr = W.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
|
|
513
513
|
et.Close,
|
|
514
514
|
{
|
|
@@ -541,7 +541,7 @@ const Gr = W.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
|
|
|
541
541
|
}
|
|
542
542
|
));
|
|
543
543
|
Gr.displayName = et.Description.displayName;
|
|
544
|
-
const
|
|
544
|
+
const Do = ue(
|
|
545
545
|
"richtext-inline-flex richtext-items-center richtext-justify-center richtext-rounded-md richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-colors hover:richtext-bg-muted hover:richtext-text-muted-foreground focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-2 disabled:richtext-pointer-events-none disabled:richtext-opacity-50 data-[state=on]:richtext-bg-accent data-[state=on]:richtext-text-accent-foreground",
|
|
546
546
|
{
|
|
547
547
|
variants: {
|
|
@@ -564,12 +564,12 @@ const Ho = ue(
|
|
|
564
564
|
zr.Root,
|
|
565
565
|
{
|
|
566
566
|
ref: a,
|
|
567
|
-
className: P(
|
|
567
|
+
className: P(Do({ variant: e, size: r, className: t })),
|
|
568
568
|
...n
|
|
569
569
|
}
|
|
570
570
|
));
|
|
571
571
|
qr.displayName = zr.Root.displayName;
|
|
572
|
-
const
|
|
572
|
+
const _o = Ut.Provider, jr = Ut.Root, Xr = Ut.Trigger, We = W.forwardRef(({ className: t, sideOffset: e = 4, ...r }, n) => /* @__PURE__ */ i(
|
|
573
573
|
Ut.Content,
|
|
574
574
|
{
|
|
575
575
|
ref: n,
|
|
@@ -582,9 +582,9 @@ const Do = Ut.Provider, jr = Ut.Root, Xr = Ut.Trigger, We = W.forwardRef(({ clas
|
|
|
582
582
|
}
|
|
583
583
|
));
|
|
584
584
|
We.displayName = Ut.Content.displayName;
|
|
585
|
-
const
|
|
585
|
+
const Bo = 1, $o = 1e6;
|
|
586
586
|
let we = 0;
|
|
587
|
-
function
|
|
587
|
+
function Vo() {
|
|
588
588
|
return we = (we + 1) % Number.MAX_SAFE_INTEGER, we.toString();
|
|
589
589
|
}
|
|
590
590
|
const ve = /* @__PURE__ */ new Map();
|
|
@@ -596,15 +596,15 @@ function er(t) {
|
|
|
596
596
|
type: "REMOVE_TOAST",
|
|
597
597
|
toastId: t
|
|
598
598
|
});
|
|
599
|
-
},
|
|
599
|
+
}, $o);
|
|
600
600
|
ve.set(t, e);
|
|
601
601
|
}
|
|
602
|
-
function
|
|
602
|
+
function Wo(t, e) {
|
|
603
603
|
switch (e.type) {
|
|
604
604
|
case "ADD_TOAST":
|
|
605
605
|
return {
|
|
606
606
|
...t,
|
|
607
|
-
toasts: [e.toast, ...t.toasts].slice(0,
|
|
607
|
+
toasts: [e.toast, ...t.toasts].slice(0, Bo)
|
|
608
608
|
};
|
|
609
609
|
case "UPDATE_TOAST":
|
|
610
610
|
return {
|
|
@@ -640,12 +640,12 @@ function Vo(t, e) {
|
|
|
640
640
|
const te = [];
|
|
641
641
|
let ee = { toasts: [] };
|
|
642
642
|
function Dt(t) {
|
|
643
|
-
ee =
|
|
643
|
+
ee = Wo(ee, t), te.forEach((e) => {
|
|
644
644
|
e(ee);
|
|
645
645
|
});
|
|
646
646
|
}
|
|
647
|
-
function
|
|
648
|
-
const e =
|
|
647
|
+
function Fo({ ...t }) {
|
|
648
|
+
const e = Vo(), r = (a) => Dt({
|
|
649
649
|
type: "UPDATE_TOAST",
|
|
650
650
|
toast: { ...a, id: e }
|
|
651
651
|
}), n = () => Dt({ type: "DISMISS_TOAST", toastId: e });
|
|
@@ -665,14 +665,14 @@ function Wo({ ...t }) {
|
|
|
665
665
|
update: r
|
|
666
666
|
};
|
|
667
667
|
}
|
|
668
|
-
function
|
|
668
|
+
function Uo() {
|
|
669
669
|
const [t, e] = W.useState(ee);
|
|
670
670
|
return W.useEffect(() => (te.push(e), () => {
|
|
671
671
|
const r = te.indexOf(e);
|
|
672
672
|
r > -1 && te.splice(r, 1);
|
|
673
673
|
}), [t]), {
|
|
674
674
|
...t,
|
|
675
|
-
toast:
|
|
675
|
+
toast: Fo,
|
|
676
676
|
dismiss: (r) => Dt({ type: "DISMISS_TOAST", toastId: r })
|
|
677
677
|
};
|
|
678
678
|
}
|
|
@@ -695,7 +695,7 @@ const Yr = W.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
|
|
|
695
695
|
}
|
|
696
696
|
));
|
|
697
697
|
Yr.displayName = Ne.Root.displayName;
|
|
698
|
-
function
|
|
698
|
+
function Go(t) {
|
|
699
699
|
return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ i(
|
|
700
700
|
"path",
|
|
701
701
|
{
|
|
@@ -704,7 +704,7 @@ function Uo(t) {
|
|
|
704
704
|
}
|
|
705
705
|
) });
|
|
706
706
|
}
|
|
707
|
-
function
|
|
707
|
+
function qo(t) {
|
|
708
708
|
return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ i(
|
|
709
709
|
"path",
|
|
710
710
|
{
|
|
@@ -717,7 +717,7 @@ function Go(t) {
|
|
|
717
717
|
}
|
|
718
718
|
) });
|
|
719
719
|
}
|
|
720
|
-
function
|
|
720
|
+
function jo() {
|
|
721
721
|
return /* @__PURE__ */ i(
|
|
722
722
|
"svg",
|
|
723
723
|
{
|
|
@@ -744,7 +744,7 @@ function qo() {
|
|
|
744
744
|
}
|
|
745
745
|
);
|
|
746
746
|
}
|
|
747
|
-
function
|
|
747
|
+
function Xo() {
|
|
748
748
|
return /* @__PURE__ */ i(
|
|
749
749
|
"svg",
|
|
750
750
|
{
|
|
@@ -771,7 +771,7 @@ function jo() {
|
|
|
771
771
|
}
|
|
772
772
|
);
|
|
773
773
|
}
|
|
774
|
-
function
|
|
774
|
+
function Yo(t) {
|
|
775
775
|
return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ i(
|
|
776
776
|
"path",
|
|
777
777
|
{
|
|
@@ -784,7 +784,7 @@ function K(t) {
|
|
|
784
784
|
const e = Kr[t.name];
|
|
785
785
|
return e ? /* @__PURE__ */ i(e, { onClick: t == null ? void 0 : t.onClick, className: `richtext-w-4 richtext-h-4 ${(t == null ? void 0 : t.className) || ""}` }) : null;
|
|
786
786
|
}
|
|
787
|
-
function
|
|
787
|
+
function Ko(t) {
|
|
788
788
|
return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ i(
|
|
789
789
|
"path",
|
|
790
790
|
{
|
|
@@ -793,7 +793,7 @@ function Yo(t) {
|
|
|
793
793
|
}
|
|
794
794
|
) });
|
|
795
795
|
}
|
|
796
|
-
function
|
|
796
|
+
function Zo(t) {
|
|
797
797
|
return /* @__PURE__ */ i(
|
|
798
798
|
"svg",
|
|
799
799
|
{
|
|
@@ -818,10 +818,10 @@ function Ko(t) {
|
|
|
818
818
|
}
|
|
819
819
|
);
|
|
820
820
|
}
|
|
821
|
-
function
|
|
821
|
+
function Jo(t) {
|
|
822
822
|
return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ i("path", { fill: "currentColor", d: "M9 7v10h6v-2h-4V7z" }) });
|
|
823
823
|
}
|
|
824
|
-
function
|
|
824
|
+
function Qo(t) {
|
|
825
825
|
return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ i(
|
|
826
826
|
"path",
|
|
827
827
|
{
|
|
@@ -830,7 +830,7 @@ function Jo(t) {
|
|
|
830
830
|
}
|
|
831
831
|
) });
|
|
832
832
|
}
|
|
833
|
-
function
|
|
833
|
+
function ta(t) {
|
|
834
834
|
return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ i(
|
|
835
835
|
"path",
|
|
836
836
|
{
|
|
@@ -839,25 +839,25 @@ function Qo(t) {
|
|
|
839
839
|
}
|
|
840
840
|
) });
|
|
841
841
|
}
|
|
842
|
-
function
|
|
842
|
+
function ea() {
|
|
843
843
|
return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ i("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M14 4h4a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1m-9 8h4m-2-2v4" }) });
|
|
844
844
|
}
|
|
845
|
-
function
|
|
845
|
+
function ra() {
|
|
846
846
|
return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ i("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 4h4a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1m9 8h4m-2-2v4" }) });
|
|
847
847
|
}
|
|
848
|
-
function
|
|
848
|
+
function ia() {
|
|
849
849
|
return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ i("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M12 21v-4m0-4V9m0-4V3m-2 18h4M8 5v4h11l2-2l-2-2zm6 8v4H6l-2-2l2-2z" }) });
|
|
850
850
|
}
|
|
851
|
-
function
|
|
851
|
+
function na() {
|
|
852
852
|
return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ i("path", { fill: "currentColor", d: "M23.943 19.806a.2.2 0 0 0-.168-.034c-1.26-1.855-2.873-3.61-4.419-5.315l-.252-.284c-.001-.073-.067-.12-.134-.15l-.084-.084c-.05-.1-.169-.167-.286-.1c-.47.234-.907.585-1.327.919c-.554.434-1.109.87-1.63 1.354a5 5 0 0 0-.588.618c-.084.117-.017.217.084.267c-.37.368-.74.736-1.109 1.12a.2.2 0 0 0-.05.134c0 .05.033.1.067.117l.655.502v.016c.924.92 2.554 2.173 4.285 3.527c.251.201.52.402.773.602c.117.134.234.285.335.418c.05.066.169.084.236.033c.033.034.084.067.118.1a.24.24 0 0 0 .1.034a.15.15 0 0 0 .135-.066a.24.24 0 0 0 .033-.1c.017 0 .017.016.034.016a.2.2 0 0 0 .134-.05l3.058-3.327c.12-.116.014-.267 0-.267m-7.628-.134l-1.546-1.17l-.15-.1c-.035-.017-.068-.05-.102-.067l-.117-.1c.66-.66 1.33-1.308 2-1.956c-.488.484-1.463 1.906-1.261 2.373c.002 0 .018.042.067.084zm4.1 3.126l-1.277-.97a27 27 0 0 0-1.58-1.504c.69.518 1.277.97 1.361 1.053c.673.585.638.485 1.093.87l.554.4c-.074.103-.151.148-.151.151m.336.25l-.034-.016a1 1 0 0 0 .152-.117zM.588 3.476c.033.217.084.435.117.636c.201 1.103.403 2.106.772 2.858l.152.568c.05.217.134.485.219.552a67 67 0 0 0 3.578 2.942a.18.18 0 0 0 .219 0s0 .016.016.016a.15.15 0 0 0 .118.05a.2.2 0 0 0 .134-.05c1.798-1.989 3.142-3.627 4.1-4.998c.068-.066.084-.167.084-.25c.067-.067.118-.151.185-.201c.067-.067.067-.184 0-.235l-.017-.016c0-.033-.017-.084-.05-.1c-.42-.401-.722-.685-1.042-.986a94 94 0 0 1-2.352-2.273c-.017-.017-.034-.034-.067-.034c-.336-.117-1.025-.234-1.882-.385c-1.277-.216-3.008-.517-4.57-.986c0 0-.101 0-.118.017l-.05.05C.05.714.022.707 0 .718c.017.1.017.167.05.284c0 .033.068.301.068.334zm7.19 4.78l-.033.034a.036.036 0 0 1 .033-.034M6.553 2.238c.101.1.521.502.622.585c-.437-.2-1.529-.702-2.034-.869c.505.1 1.194.201 1.412.284M.79 1.403c.252.434.454 1.939.655 3.41c-.118-.469-.201-.936-.302-1.372C.992 2.673.84 1.988.638 1.386c.124 0 .152.021.152.017m-.286-.369c0-.016 0-.033-.017-.033c.085 0 .135.017.202.05c0 .006-.145-.017-.185-.017m23.17-.217c.017-.066-.336-.367-.219-.384c.253-.017.253-.401 0-.401c-.335.017-.688.1-1.008.15c-.587.117-1.192.234-1.78.367a80 80 0 0 0-3.949.937c-.403.117-.857.2-1.243.401c-.135.067-.118.2-.05.284c-.034.017-.051.017-.085.034c-.117.017-.218.034-.335.05c-.102.017-.152.1-.135.2c0 .017.017.05.017.067c-.706.936-1.496 1.923-2.353 2.976c-.84.969-1.73 1.989-2.62 3.042c-2.84 3.31-6.05 7.07-9.594 10.38a.16.16 0 0 0 0 .234c.016.016.033.033.05.033c-.05.05-.101.085-.152.134q-.05.05-.05.1a.4.4 0 0 0-.067.084c-.067.067-.067.184.017.234c.067.066.185.066.235-.017c.017-.017.017-.033.033-.033a.265.265 0 0 1 .37 0c.202.217.404.435.588.618l-.42-.35c-.067-.067-.184-.05-.234.016c-.068.066-.051.184.016.234l4.469 3.727c.034.034.067.034.118.034a.15.15 0 0 0 .117-.05l.101-.1c.017.016.05.016.067.016c.05 0 .084-.016.118-.05c6.049-6.05 10.922-10.614 16.5-14.693c.05-.033.067-.1.067-.15c.067 0 .118-.05.15-.117c1.026-3.125 1.228-5.9 1.295-7.27c0-.059.016-.038.016-.068c.017-.033.017-.05.017-.05a.98.98 0 0 0-.067-.619m-10.82 4.915c.268-.301.537-.619.806-.903c-1.73 2.273-4.603 5.767-8.67 9.929c2.773-3.059 5.562-6.218 7.864-9.026M5.14 23.466c-.016-.017-.016-.017 0-.017zm2.504-2.156c.135-.15.27-.284.42-.434c0 0 0 .016.017.016c-.224.198-.433.418-.437.418m.69-.668c.099-.1.14-.173.284-.318c.992-1.02 2.017-2.04 3.059-3.076l.016-.016c.252-.2.555-.418.824-.619a228 228 0 0 0-4.184 4.029M14.852 3.91c-.554.719-1.176 1.671-1.697 2.423c-1.646 2.374-6.94 8.174-7.057 8.274a1190 1190 0 0 1-4.839 4.597l-.1.1c-.085-.1-.085-.25.016-.334C8.652 11.966 13.19 6.133 15.021 3.576c-.05.116-.084.216-.168.334zm2.906 3.427c-.671-.386-.99-.987-.806-1.572l.05-.2a.8.8 0 0 1 .085-.167a1.9 1.9 0 0 1 .756-.703c.016 0 .033 0 .05-.016c-.017-.034-.017-.084-.017-.134c.017-.1.085-.167.202-.167c.202 0 .824.184 1.059.384c.067.05.134.117.202.184c.084.1.218.268.285.401c.034.017.067.184.118.268c.033.134.067.284.05.418c-.017.016 0 .116-.017.116a1.6 1.6 0 0 1-.218.619c-.03.03.006.012-.05.067a1.2 1.2 0 0 1-.32.334a1.49 1.49 0 0 1-1.26.234a2 2 0 0 0-.169-.066m4.37 1.403c0 .017-.017.05 0 .067c-.034 0-.05.017-.085.034a110 110 0 0 0-3.915 3.025c1.11-.986 2.218-1.989 3.378-2.975c.336-.301.571-.686.638-1.12l.168-1.003v-.033c.085-.201.404-.118.353.1c-.004-.001-.173.795-.537 1.905" }) });
|
|
853
853
|
}
|
|
854
|
-
function
|
|
854
|
+
function oa() {
|
|
855
855
|
return /* @__PURE__ */ g("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 32 32", children: [
|
|
856
856
|
/* @__PURE__ */ i("path", { fill: "currentColor", d: "M30 18v-2h-6v10h2v-4h3v-2h-3v-2zm-11 8h-4V16h4a3.003 3.003 0 0 1 3 3v4a3.003 3.003 0 0 1-3 3m-2-2h2a1 1 0 0 0 1-1v-4a1 1 0 0 0-1-1h-2zm-6-8H6v10h2v-3h3a2.003 2.003 0 0 0 2-2v-3a2 2 0 0 0-2-2m-3 5v-3h3l.001 3z" }),
|
|
857
857
|
/* @__PURE__ */ i("path", { fill: "currentColor", d: "M22 14v-4a.91.91 0 0 0-.3-.7l-7-7A.9.9 0 0 0 14 2H4a2.006 2.006 0 0 0-2 2v24a2 2 0 0 0 2 2h16v-2H4V4h8v6a2.006 2.006 0 0 0 2 2h6v2Zm-8-4V4.4l5.6 5.6Z" })
|
|
858
858
|
] });
|
|
859
859
|
}
|
|
860
|
-
function
|
|
860
|
+
function aa() {
|
|
861
861
|
return /* @__PURE__ */ g(
|
|
862
862
|
"svg",
|
|
863
863
|
{
|
|
@@ -885,16 +885,16 @@ function oa() {
|
|
|
885
885
|
}
|
|
886
886
|
);
|
|
887
887
|
}
|
|
888
|
-
function
|
|
888
|
+
function ca() {
|
|
889
889
|
return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ g("g", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", color: "currentColor", children: [
|
|
890
890
|
/* @__PURE__ */ i("path", { d: "M14.86 22h-4.312c-3.291 0-4.937 0-6.08-.798a4.2 4.2 0 0 1-.863-.805c-.855-1.066-.855-2.6-.855-5.67v-2.545c0-2.963 0-4.445.473-5.628c.761-1.903 2.37-3.403 4.41-4.113C8.9 2 10.49 2 13.667 2c1.816 0 2.723 0 3.448.252c1.166.406 2.085 1.263 2.52 2.35c.27.676.27 1.523.27 3.216V10" }),
|
|
891
891
|
/* @__PURE__ */ i("path", { d: "M2.75 12c0-1.84 1.506-3.333 3.364-3.333c.672 0 1.464.116 2.117-.057a1.67 1.67 0 0 0 1.19-1.179c.174-.647.057-1.432.057-2.098C9.478 3.493 10.984 2 12.84 2m.002 16h2.523m-4.949-4.15c-.126-.8-.281-.801-1.61-.85h-1.01c-.557 0-1.009.448-1.009 1v3c0 .552.452 1 1.01 1h1.816c.39 0 .803-.313.803-.7v-1.1c0-.11-.113-.304-.224-.304H9.068M12.842 13h1.261m0 0h1.262m-1.262 0v4.875M21.251 13h-2.523c-.557 0-1.009.448-1.009 1v1.5m0 0V18m0-2.5h2.523" })
|
|
892
892
|
] }) });
|
|
893
893
|
}
|
|
894
|
-
function
|
|
894
|
+
function sa() {
|
|
895
895
|
return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 20 20", children: /* @__PURE__ */ i("path", { fill: "currentColor", d: "M6.5 3a.75.75 0 0 1 .697.471l3 7.5a.75.75 0 0 1-1.393.557L7.992 9.5H5.008l-.811 2.028a.75.75 0 0 1-1.393-.556l3-7.5A.75.75 0 0 1 6.5 3m0 2.77L5.608 8h1.784zm8.28-1.55a.75.75 0 1 0-1.06 1.06l.72.72h-3.69a.75.75 0 0 0 0 1.5h3.69l-.72.72a.75.75 0 0 0 1.06 1.06l2-2a.75.75 0 0 0 0-1.06zm0 7.5a.75.75 0 1 0-1.06 1.06l.72.72H3.75a.75.75 0 0 0 0 1.5h10.69l-.72.72a.75.75 0 1 0 1.06 1.06l2-2a.75.75 0 0 0 0-1.06z" }) });
|
|
896
896
|
}
|
|
897
|
-
function
|
|
897
|
+
function la() {
|
|
898
898
|
return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 48 48", children: /* @__PURE__ */ g("g", { fill: "none", stroke: "currentColor", strokeWidth: "4", children: [
|
|
899
899
|
/* @__PURE__ */ i("circle", { cx: "10", cy: "24", r: "4" }),
|
|
900
900
|
/* @__PURE__ */ i("circle", { cx: "38", cy: "10", r: "4" }),
|
|
@@ -903,13 +903,13 @@ function sa() {
|
|
|
903
903
|
/* @__PURE__ */ i("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M34 38H22V10h12M14 24h20" })
|
|
904
904
|
] }) });
|
|
905
905
|
}
|
|
906
|
-
function
|
|
906
|
+
function da() {
|
|
907
907
|
return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 20 20", children: /* @__PURE__ */ i("path", { fill: "currentColor", d: "M13.5 3a.75.75 0 0 0-.697.471l-3 7.5a.75.75 0 0 0 1.393.557l.812-2.028h2.984l.811 2.028a.75.75 0 0 0 1.393-.556l-3-7.5A.75.75 0 0 0 13.5 3m0 2.77L14.392 8h-1.784zM5.22 4.22a.75.75 0 0 1 1.06 1.06L5.56 6h3.69a.75.75 0 0 1 0 1.5H5.56l.72.72a.75.75 0 0 1-1.06 1.06l-2-2a.75.75 0 0 1 0-1.06zm0 7.5a.75.75 0 0 1 1.06 1.06l-.72.72h10.69a.75.75 0 0 1 0 1.5H5.56l.72.72a.75.75 0 1 1-1.06 1.06l-2-2a.75.75 0 0 1 0-1.06z" }) });
|
|
908
908
|
}
|
|
909
|
-
function
|
|
909
|
+
function ha() {
|
|
910
910
|
return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ i("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", d: "m3 21l7.548-7.548M21 3l-7.548 7.548m0 0L8 3H3l7.548 10.452m2.904-2.904L21 21h-5l-5.452-7.548", color: "currentColor" }) });
|
|
911
911
|
}
|
|
912
|
-
function
|
|
912
|
+
function ua() {
|
|
913
913
|
return /* @__PURE__ */ i(
|
|
914
914
|
"svg",
|
|
915
915
|
{
|
|
@@ -931,107 +931,108 @@ function ha() {
|
|
|
931
931
|
);
|
|
932
932
|
}
|
|
933
933
|
const Kr = {
|
|
934
|
-
Bold:
|
|
935
|
-
LoaderCircle:
|
|
936
|
-
Italic:
|
|
937
|
-
Underline:
|
|
938
|
-
Quote:
|
|
939
|
-
TextQuote:
|
|
940
|
-
Strikethrough:
|
|
941
|
-
Minus:
|
|
942
|
-
Eraser:
|
|
943
|
-
PaintRoller:
|
|
944
|
-
Redo2:
|
|
945
|
-
Undo2:
|
|
946
|
-
AlignCenter:
|
|
947
|
-
AlignJustify:
|
|
948
|
-
AlignLeft:
|
|
949
|
-
AlignRight:
|
|
950
|
-
ChevronDown:
|
|
951
|
-
Subscript:
|
|
952
|
-
Superscript:
|
|
953
|
-
Code:
|
|
954
|
-
Code2:
|
|
955
|
-
Type:
|
|
956
|
-
IndentIncrease:
|
|
957
|
-
IndentDecrease:
|
|
958
|
-
List:
|
|
959
|
-
ListOrdered:
|
|
960
|
-
ListTodo:
|
|
961
|
-
Link:
|
|
962
|
-
ImageUp:
|
|
963
|
-
Video:
|
|
964
|
-
Maximize:
|
|
965
|
-
Minimize:
|
|
966
|
-
Table:
|
|
967
|
-
Sparkles:
|
|
934
|
+
Bold: oo,
|
|
935
|
+
LoaderCircle: no,
|
|
936
|
+
Italic: io,
|
|
937
|
+
Underline: ro,
|
|
938
|
+
Quote: eo,
|
|
939
|
+
TextQuote: qo,
|
|
940
|
+
Strikethrough: to,
|
|
941
|
+
Minus: Qn,
|
|
942
|
+
Eraser: Jn,
|
|
943
|
+
PaintRoller: Zn,
|
|
944
|
+
Redo2: Kn,
|
|
945
|
+
Undo2: Yn,
|
|
946
|
+
AlignCenter: lo,
|
|
947
|
+
AlignJustify: so,
|
|
948
|
+
AlignLeft: co,
|
|
949
|
+
AlignRight: ao,
|
|
950
|
+
ChevronDown: Xn,
|
|
951
|
+
Subscript: jn,
|
|
952
|
+
Superscript: qn,
|
|
953
|
+
Code: Gn,
|
|
954
|
+
Code2: Un,
|
|
955
|
+
Type: Fn,
|
|
956
|
+
IndentIncrease: Wn,
|
|
957
|
+
IndentDecrease: Vn,
|
|
958
|
+
List: $n,
|
|
959
|
+
ListOrdered: Bn,
|
|
960
|
+
ListTodo: _n,
|
|
961
|
+
Link: Dn,
|
|
962
|
+
ImageUp: Hn,
|
|
963
|
+
Video: On,
|
|
964
|
+
Maximize: Rn,
|
|
965
|
+
Minimize: Pn,
|
|
966
|
+
Table: zn,
|
|
967
|
+
Sparkles: En,
|
|
968
968
|
Pencil: Mr,
|
|
969
|
-
Unlink:
|
|
970
|
-
BetweenHorizonalEnd:
|
|
971
|
-
BetweenHorizonalStart:
|
|
972
|
-
BetweenVerticalStart:
|
|
973
|
-
BetweenVerticalEnd:
|
|
974
|
-
TableCellsMerge:
|
|
975
|
-
TableCellsSplit:
|
|
969
|
+
Unlink: In,
|
|
970
|
+
BetweenHorizonalEnd: Ln,
|
|
971
|
+
BetweenHorizonalStart: An,
|
|
972
|
+
BetweenVerticalStart: Mn,
|
|
973
|
+
BetweenVerticalEnd: Sn,
|
|
974
|
+
TableCellsMerge: kn,
|
|
975
|
+
TableCellsSplit: Nn,
|
|
976
976
|
Trash2: Sr,
|
|
977
|
-
Trash:
|
|
977
|
+
Trash: Tn,
|
|
978
978
|
Replace: Ze,
|
|
979
|
-
ChevronsUpDown:
|
|
980
|
-
LineHeight:
|
|
981
|
-
Word:
|
|
982
|
-
Heading1:
|
|
983
|
-
Heading2:
|
|
984
|
-
Heading3:
|
|
985
|
-
Heading4:
|
|
986
|
-
Heading5:
|
|
987
|
-
Heading6:
|
|
979
|
+
ChevronsUpDown: Cn,
|
|
980
|
+
LineHeight: Ko,
|
|
981
|
+
Word: Yo,
|
|
982
|
+
Heading1: yn,
|
|
983
|
+
Heading2: bn,
|
|
984
|
+
Heading3: vn,
|
|
985
|
+
Heading4: wn,
|
|
986
|
+
Heading5: pn,
|
|
987
|
+
Heading6: gn,
|
|
988
988
|
Columns2: Je,
|
|
989
|
-
Columns3:
|
|
990
|
-
Columns4:
|
|
989
|
+
Columns3: fn,
|
|
990
|
+
Columns4: xn,
|
|
991
991
|
Plus: kr,
|
|
992
|
-
Grip:
|
|
993
|
-
Copy:
|
|
994
|
-
Clipboard:
|
|
995
|
-
PanelLeft:
|
|
996
|
-
PanelRight:
|
|
992
|
+
Grip: mn,
|
|
993
|
+
Copy: un,
|
|
994
|
+
Clipboard: hn,
|
|
995
|
+
PanelLeft: dn,
|
|
996
|
+
PanelRight: ln,
|
|
997
997
|
Columns: Je,
|
|
998
|
-
Iframe:
|
|
999
|
-
MenuDown:
|
|
1000
|
-
SizeS:
|
|
1001
|
-
SizeM:
|
|
1002
|
-
SizeL:
|
|
1003
|
-
AspectRatio:
|
|
1004
|
-
Emoji:
|
|
1005
|
-
DeleteColumn:
|
|
1006
|
-
DeleteRow:
|
|
998
|
+
Iframe: sn,
|
|
999
|
+
MenuDown: Zo,
|
|
1000
|
+
SizeS: ta,
|
|
1001
|
+
SizeM: Qo,
|
|
1002
|
+
SizeL: Jo,
|
|
1003
|
+
AspectRatio: Go,
|
|
1004
|
+
Emoji: cn,
|
|
1005
|
+
DeleteColumn: jo,
|
|
1006
|
+
DeleteRow: Xo,
|
|
1007
1007
|
SearchAndReplace: Ze,
|
|
1008
|
-
EmojiIcon:
|
|
1009
|
-
KatexIcon:
|
|
1010
|
-
ExportPdf:
|
|
1011
|
-
ExportWord:
|
|
1012
|
-
ImportWord:
|
|
1013
|
-
ColumnAddLeft:
|
|
1014
|
-
ColumnAddRight:
|
|
1015
|
-
BookMarked:
|
|
1016
|
-
Excalidraw:
|
|
1017
|
-
ZoomIn:
|
|
1018
|
-
ZoomOut:
|
|
1019
|
-
Settings:
|
|
1020
|
-
Eye:
|
|
1021
|
-
TextDirection:
|
|
1022
|
-
LeftToRight:
|
|
1023
|
-
RightToLeft:
|
|
1024
|
-
Attachment:
|
|
1025
|
-
GifIcon:
|
|
1026
|
-
ChevronUp:
|
|
1027
|
-
Crop:
|
|
1028
|
-
Mermaid:
|
|
1029
|
-
Twitter:
|
|
1030
|
-
FlipX:
|
|
1031
|
-
FlipY:
|
|
1032
|
-
PencilRuler:
|
|
1008
|
+
EmojiIcon: an,
|
|
1009
|
+
KatexIcon: on,
|
|
1010
|
+
ExportPdf: oa,
|
|
1011
|
+
ExportWord: aa,
|
|
1012
|
+
ImportWord: ua,
|
|
1013
|
+
ColumnAddLeft: ea,
|
|
1014
|
+
ColumnAddRight: ra,
|
|
1015
|
+
BookMarked: nn,
|
|
1016
|
+
Excalidraw: na,
|
|
1017
|
+
ZoomIn: rn,
|
|
1018
|
+
ZoomOut: en,
|
|
1019
|
+
Settings: tn,
|
|
1020
|
+
Eye: Qi,
|
|
1021
|
+
TextDirection: ia,
|
|
1022
|
+
LeftToRight: sa,
|
|
1023
|
+
RightToLeft: da,
|
|
1024
|
+
Attachment: Ji,
|
|
1025
|
+
GifIcon: ca,
|
|
1026
|
+
ChevronUp: Zi,
|
|
1027
|
+
Crop: Ki,
|
|
1028
|
+
Mermaid: la,
|
|
1029
|
+
Twitter: ha,
|
|
1030
|
+
FlipX: Yi,
|
|
1031
|
+
FlipY: Xi,
|
|
1032
|
+
PencilRuler: ji,
|
|
1033
|
+
WrapText: qi
|
|
1033
1034
|
};
|
|
1034
|
-
function
|
|
1035
|
+
function ma({ fill: t }) {
|
|
1035
1036
|
return /* @__PURE__ */ i(
|
|
1036
1037
|
"svg",
|
|
1037
1038
|
{
|
|
@@ -1083,7 +1084,7 @@ function ua({ fill: t }) {
|
|
|
1083
1084
|
}
|
|
1084
1085
|
);
|
|
1085
1086
|
}
|
|
1086
|
-
function
|
|
1087
|
+
function xa(t) {
|
|
1087
1088
|
const [e, r] = S(void 0);
|
|
1088
1089
|
function n(c) {
|
|
1089
1090
|
var l;
|
|
@@ -1108,11 +1109,11 @@ function ma(t) {
|
|
|
1108
1109
|
action: a,
|
|
1109
1110
|
tooltipOptions: t == null ? void 0 : t.tooltipOptions,
|
|
1110
1111
|
shortcutKeys: t == null ? void 0 : t.shortcutKeys,
|
|
1111
|
-
children: /* @__PURE__ */ i("span", { className: "richtext-flex richtext-items-center richtext-justify-center richtext-text-sm", children: /* @__PURE__ */ i(
|
|
1112
|
+
children: /* @__PURE__ */ i("span", { className: "richtext-flex richtext-items-center richtext-justify-center richtext-text-sm", children: /* @__PURE__ */ i(ma, { fill: e }) })
|
|
1112
1113
|
}
|
|
1113
1114
|
),
|
|
1114
1115
|
/* @__PURE__ */ i(
|
|
1115
|
-
|
|
1116
|
+
ps,
|
|
1116
1117
|
{
|
|
1117
1118
|
selectedColor: e,
|
|
1118
1119
|
setSelectedColor: o,
|
|
@@ -1124,7 +1125,7 @@ function ma(t) {
|
|
|
1124
1125
|
)
|
|
1125
1126
|
] });
|
|
1126
1127
|
}
|
|
1127
|
-
function
|
|
1128
|
+
function fa(t) {
|
|
1128
1129
|
const { t: e } = q(), [r, n] = S({
|
|
1129
1130
|
text: "",
|
|
1130
1131
|
link: ""
|
|
@@ -1204,10 +1205,10 @@ function xa(t) {
|
|
|
1204
1205
|
}
|
|
1205
1206
|
) });
|
|
1206
1207
|
}
|
|
1207
|
-
function
|
|
1208
|
+
function ga(t, e, r = null) {
|
|
1208
1209
|
return r ? t.createChecked({ index: e }, r) : t.createAndFill({ index: e });
|
|
1209
1210
|
}
|
|
1210
|
-
function
|
|
1211
|
+
function pa(t) {
|
|
1211
1212
|
if (t.cached.columnsNodeTypes)
|
|
1212
1213
|
return t.cached.columnsNodeTypes;
|
|
1213
1214
|
const e = {
|
|
@@ -1216,10 +1217,10 @@ function ga(t) {
|
|
|
1216
1217
|
};
|
|
1217
1218
|
return t.cached.columnsNodeTypes = e, e;
|
|
1218
1219
|
}
|
|
1219
|
-
function
|
|
1220
|
-
const n =
|
|
1220
|
+
function wa(t, e, r = null) {
|
|
1221
|
+
const n = pa(t), a = [];
|
|
1221
1222
|
for (let o = 0; o < e; o += 1) {
|
|
1222
|
-
const c =
|
|
1223
|
+
const c = ga(n.column, o, r);
|
|
1223
1224
|
c && a.push(c);
|
|
1224
1225
|
}
|
|
1225
1226
|
return n.columns.createChecked({ cols: e }, a);
|
|
@@ -1273,14 +1274,14 @@ function rr({ state: t, dispatch: e, type: r }) {
|
|
|
1273
1274
|
}
|
|
1274
1275
|
return !1;
|
|
1275
1276
|
}
|
|
1276
|
-
const
|
|
1277
|
+
const va = 200, le = yt.create({
|
|
1277
1278
|
name: "columns",
|
|
1278
1279
|
group: "block",
|
|
1279
1280
|
defining: !0,
|
|
1280
1281
|
isolating: !0,
|
|
1281
1282
|
allowGapCursor: !1,
|
|
1282
1283
|
content: "column{1,}",
|
|
1283
|
-
priority:
|
|
1284
|
+
priority: va,
|
|
1284
1285
|
addOptions() {
|
|
1285
1286
|
return {
|
|
1286
1287
|
HTMLAttributes: {
|
|
@@ -1309,7 +1310,7 @@ const wa = 200, le = yt.create({
|
|
|
1309
1310
|
addCommands() {
|
|
1310
1311
|
return {
|
|
1311
1312
|
insertColumns: (t) => ({ tr: e, dispatch: r, editor: n }) => {
|
|
1312
|
-
const a =
|
|
1313
|
+
const a = wa(n.schema, t && t.cols || 3);
|
|
1313
1314
|
if (r) {
|
|
1314
1315
|
const o = e.selection.anchor + 1;
|
|
1315
1316
|
e.replaceSelectionWith(a).scrollIntoView().setSelection(Wt.near(e.doc.resolve(o)));
|
|
@@ -1367,10 +1368,10 @@ const wa = 200, le = yt.create({
|
|
|
1367
1368
|
}
|
|
1368
1369
|
});
|
|
1369
1370
|
var Me = /* @__PURE__ */ ((t) => (t[t.max = 7] = "max", t[t.min = 0] = "min", t[t.more = 1] = "more", t[t.less = -1] = "less", t))(Me || {});
|
|
1370
|
-
function
|
|
1371
|
+
function ba(t, e, r) {
|
|
1371
1372
|
return t < e ? e : t > r ? r : t;
|
|
1372
1373
|
}
|
|
1373
|
-
function
|
|
1374
|
+
function ya(t, e, r, n) {
|
|
1374
1375
|
const { doc: a, selection: o } = t;
|
|
1375
1376
|
if (!a || !o || !(o instanceof Wt || o instanceof Ri))
|
|
1376
1377
|
return t;
|
|
@@ -1386,7 +1387,7 @@ function Ae(t, e, r) {
|
|
|
1386
1387
|
const n = t.doc.nodeAt(e);
|
|
1387
1388
|
if (!n)
|
|
1388
1389
|
return t;
|
|
1389
|
-
const c =
|
|
1390
|
+
const c = ba((n.attrs.indent || 0) + r, 0, 7);
|
|
1390
1391
|
if (c === n.attrs.indent)
|
|
1391
1392
|
return t;
|
|
1392
1393
|
const l = {
|
|
@@ -1395,18 +1396,18 @@ function Ae(t, e, r) {
|
|
|
1395
1396
|
};
|
|
1396
1397
|
return t.setNodeMarkup(e, n.type, l, n.marks);
|
|
1397
1398
|
}
|
|
1398
|
-
function
|
|
1399
|
+
function Ml({ delta: t, types: e }) {
|
|
1399
1400
|
return ({ state: r, dispatch: n, editor: a }) => {
|
|
1400
1401
|
const { selection: o } = r;
|
|
1401
1402
|
let { tr: c } = r;
|
|
1402
|
-
return c = c.setSelection(o), c =
|
|
1403
|
+
return c = c.setSelection(o), c = ya(c, t, e, a), c.docChanged ? (n && n(c), !0) : !1;
|
|
1403
1404
|
};
|
|
1404
1405
|
}
|
|
1405
|
-
const
|
|
1406
|
+
const Ca = {
|
|
1406
1407
|
setOpen: (t, e) => {
|
|
1407
1408
|
Be(bt.UPLOAD_IMAGE(t), e);
|
|
1408
1409
|
}
|
|
1409
|
-
}, ut = it.Root, mt = it.Trigger,
|
|
1410
|
+
}, ut = it.Root, mt = it.Trigger, Ta = it.Portal, Jr = W.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
|
|
1410
1411
|
it.Overlay,
|
|
1411
1412
|
{
|
|
1412
1413
|
ref: r,
|
|
@@ -1418,7 +1419,7 @@ const ya = {
|
|
|
1418
1419
|
}
|
|
1419
1420
|
));
|
|
1420
1421
|
Jr.displayName = it.Overlay.displayName;
|
|
1421
|
-
const lt = W.forwardRef(({ className: t, children: e, ...r }, n) => /* @__PURE__ */ g(
|
|
1422
|
+
const lt = W.forwardRef(({ className: t, children: e, ...r }, n) => /* @__PURE__ */ g(Ta, { children: [
|
|
1422
1423
|
/* @__PURE__ */ i(Jr, {}),
|
|
1423
1424
|
/* @__PURE__ */ g(
|
|
1424
1425
|
it.Content,
|
|
@@ -1484,7 +1485,7 @@ const dt = W.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
|
|
|
1484
1485
|
}
|
|
1485
1486
|
));
|
|
1486
1487
|
dt.displayName = it.Title.displayName;
|
|
1487
|
-
const
|
|
1488
|
+
const Na = W.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
|
|
1488
1489
|
it.Description,
|
|
1489
1490
|
{
|
|
1490
1491
|
ref: r,
|
|
@@ -1492,20 +1493,20 @@ const Ta = W.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
|
|
|
1492
1493
|
...e
|
|
1493
1494
|
}
|
|
1494
1495
|
));
|
|
1495
|
-
|
|
1496
|
-
function
|
|
1496
|
+
Na.displayName = it.Description.displayName;
|
|
1497
|
+
function Al(t) {
|
|
1497
1498
|
return t.replace(/^.*\/|\..+$/g, "");
|
|
1498
1499
|
}
|
|
1499
|
-
function
|
|
1500
|
+
function Ll(t) {
|
|
1500
1501
|
return t.split(".").pop();
|
|
1501
1502
|
}
|
|
1502
|
-
function
|
|
1503
|
+
function Il(t) {
|
|
1503
1504
|
return t < 1024 ? `${t} Byte` : t < 1024 * 1024 ? `${(t / 1024).toFixed(2)} KB` : `${(t / 1024 / 1024).toFixed(2)} MB`;
|
|
1504
1505
|
}
|
|
1505
|
-
function
|
|
1506
|
+
function El(t) {
|
|
1506
1507
|
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";
|
|
1507
1508
|
}
|
|
1508
|
-
function
|
|
1509
|
+
function ka(t) {
|
|
1509
1510
|
return new Promise((e) => {
|
|
1510
1511
|
const r = new FileReader();
|
|
1511
1512
|
r.addEventListener(
|
|
@@ -1528,7 +1529,7 @@ function qt(t, e) {
|
|
|
1528
1529
|
c[o] = a.charCodeAt(o);
|
|
1529
1530
|
return new File([c], e, { type: n });
|
|
1530
1531
|
}
|
|
1531
|
-
function
|
|
1532
|
+
function Sa({ editor: t, imageInline: e, onClose: r }) {
|
|
1532
1533
|
const { t: n } = q(), [a, o] = S(!1), c = Ht.useRef(null), [l, s] = Ht.useState(), [h, d] = Ht.useState(""), u = J(null), [m, x] = S({
|
|
1533
1534
|
src: "",
|
|
1534
1535
|
file: null
|
|
@@ -1579,7 +1580,7 @@ function ka({ editor: t, imageInline: e, onClose: r }) {
|
|
|
1579
1580
|
const y = (L = v == null ? void 0 : v.target) == null ? void 0 : L.files;
|
|
1580
1581
|
if (!t || t.isDestroyed || y.length === 0)
|
|
1581
1582
|
return;
|
|
1582
|
-
const C = y[0], M = await
|
|
1583
|
+
const C = y[0], M = await ka(C);
|
|
1583
1584
|
o(!0), x({
|
|
1584
1585
|
src: M.src,
|
|
1585
1586
|
file: C
|
|
@@ -1600,7 +1601,7 @@ function ka({ editor: t, imageInline: e, onClose: r }) {
|
|
|
1600
1601
|
/* @__PURE__ */ g(lt, { children: [
|
|
1601
1602
|
/* @__PURE__ */ i(dt, { children: n("editor.image.dialog.tab.uploadCrop") }),
|
|
1602
1603
|
/* @__PURE__ */ i("div", { children: m.src && /* @__PURE__ */ i(
|
|
1603
|
-
|
|
1604
|
+
xo,
|
|
1604
1605
|
{
|
|
1605
1606
|
className: "richtext-w-full",
|
|
1606
1607
|
crop: l,
|
|
@@ -1673,7 +1674,7 @@ function ka({ editor: t, imageInline: e, onClose: r }) {
|
|
|
1673
1674
|
)
|
|
1674
1675
|
] });
|
|
1675
1676
|
}
|
|
1676
|
-
function
|
|
1677
|
+
function Ma(t) {
|
|
1677
1678
|
var w;
|
|
1678
1679
|
const { t: e } = q(), [r, n] = S(!1), a = (p) => {
|
|
1679
1680
|
n(p.detail);
|
|
@@ -1757,11 +1758,11 @@ function Sa(t) {
|
|
|
1757
1758
|
}
|
|
1758
1759
|
),
|
|
1759
1760
|
/* @__PURE__ */ i(
|
|
1760
|
-
|
|
1761
|
+
Sa,
|
|
1761
1762
|
{
|
|
1762
1763
|
editor: t.editor,
|
|
1763
1764
|
imageInline: s,
|
|
1764
|
-
onClose: () =>
|
|
1765
|
+
onClose: () => Ca.setOpen(t.editor.id, !1)
|
|
1765
1766
|
}
|
|
1766
1767
|
)
|
|
1767
1768
|
] }),
|
|
@@ -1807,7 +1808,7 @@ const Yt = {
|
|
|
1807
1808
|
BOTTOM_LEFT: "bl",
|
|
1808
1809
|
BOTTOM_RIGHT: "br"
|
|
1809
1810
|
};
|
|
1810
|
-
function
|
|
1811
|
+
function Aa(t) {
|
|
1811
1812
|
var L, N;
|
|
1812
1813
|
const [e, r] = S({
|
|
1813
1814
|
width: xt,
|
|
@@ -1953,7 +1954,7 @@ function Ma(t) {
|
|
|
1953
1954
|
);
|
|
1954
1955
|
}
|
|
1955
1956
|
const At = new He("upload-image");
|
|
1956
|
-
function
|
|
1957
|
+
function La() {
|
|
1957
1958
|
return new De({
|
|
1958
1959
|
key: At,
|
|
1959
1960
|
state: {
|
|
@@ -1965,7 +1966,7 @@ function Aa() {
|
|
|
1965
1966
|
const r = t.getMeta(At);
|
|
1966
1967
|
if (r != null && r.add)
|
|
1967
1968
|
for (const { id: n, pos: a, src: o } of r.add) {
|
|
1968
|
-
const c =
|
|
1969
|
+
const c = Ia(o), l = Oi.widget(a, c, { id: n });
|
|
1969
1970
|
e = e.add(t.doc, [l]);
|
|
1970
1971
|
}
|
|
1971
1972
|
else if (r != null && r.remove)
|
|
@@ -1981,18 +1982,18 @@ function Aa() {
|
|
|
1981
1982
|
}
|
|
1982
1983
|
});
|
|
1983
1984
|
}
|
|
1984
|
-
function
|
|
1985
|
+
function Ia(t) {
|
|
1985
1986
|
const e = document.createElement("div"), r = document.createElement("img");
|
|
1986
1987
|
return r.setAttribute("class", "opacity-50"), r.src = t, r.addEventListener("load", () => {
|
|
1987
1988
|
e.setAttribute("class", "img-placeholder");
|
|
1988
1989
|
}), e.append(r), e;
|
|
1989
1990
|
}
|
|
1990
|
-
function
|
|
1991
|
+
function Ea(t, e) {
|
|
1991
1992
|
var a;
|
|
1992
1993
|
const n = At.getState(t).find(void 0, void 0, (o) => o.id === e);
|
|
1993
1994
|
return n.length > 0 ? (a = n[0]) == null ? void 0 : a.from : null;
|
|
1994
1995
|
}
|
|
1995
|
-
function
|
|
1996
|
+
function za({ validateFn: t, onUpload: e, postUpload: r, defaultInline: n = !1 }) {
|
|
1996
1997
|
return (a, o, c) => {
|
|
1997
1998
|
for (const l of a) {
|
|
1998
1999
|
if (t && !t(l))
|
|
@@ -2007,7 +2008,7 @@ function Ea({ validateFn: t, onUpload: e, postUpload: r, defaultInline: n = !1 }
|
|
|
2007
2008
|
var T;
|
|
2008
2009
|
r && typeof u == "string" && (u = await r(u));
|
|
2009
2010
|
const { schema: m } = o.state;
|
|
2010
|
-
let x =
|
|
2011
|
+
let x = Ea(o.state, s);
|
|
2011
2012
|
if (x === null)
|
|
2012
2013
|
return;
|
|
2013
2014
|
const w = typeof u == "object" ? d : u, p = (T = m.nodes.image) == null ? void 0 : T.create({
|
|
@@ -2029,7 +2030,7 @@ function Ea({ validateFn: t, onUpload: e, postUpload: r, defaultInline: n = !1 }
|
|
|
2029
2030
|
}
|
|
2030
2031
|
};
|
|
2031
2032
|
}
|
|
2032
|
-
function
|
|
2033
|
+
function Pa(t, e, r) {
|
|
2033
2034
|
var a;
|
|
2034
2035
|
const n = [...((a = e.clipboardData) == null ? void 0 : a.files) || []];
|
|
2035
2036
|
if (n.length > 0) {
|
|
@@ -2039,7 +2040,7 @@ function za(t, e, r) {
|
|
|
2039
2040
|
}
|
|
2040
2041
|
return !1;
|
|
2041
2042
|
}
|
|
2042
|
-
function
|
|
2043
|
+
function Ra(t, e, r, n) {
|
|
2043
2044
|
var o;
|
|
2044
2045
|
const a = [...((o = e.dataTransfer) == null ? void 0 : o.files) || []];
|
|
2045
2046
|
if (!r && a.length > 0) {
|
|
@@ -2053,7 +2054,7 @@ function Pa(t, e, r, n) {
|
|
|
2053
2054
|
}
|
|
2054
2055
|
return !1;
|
|
2055
2056
|
}
|
|
2056
|
-
const
|
|
2057
|
+
const Oa = {
|
|
2057
2058
|
acceptMimes: ["image/jpeg", "image/gif", "image/png", "image/jpg"],
|
|
2058
2059
|
maxSize: 1024 * 1024 * 5,
|
|
2059
2060
|
// 5MB
|
|
@@ -2068,7 +2069,7 @@ const Ra = {
|
|
|
2068
2069
|
addOptions() {
|
|
2069
2070
|
var t;
|
|
2070
2071
|
return {
|
|
2071
|
-
...
|
|
2072
|
+
...Oa,
|
|
2072
2073
|
...(t = this.parent) == null ? void 0 : t.call(this),
|
|
2073
2074
|
upload: () => Promise.reject("Image Upload Function"),
|
|
2074
2075
|
button: ({
|
|
@@ -2078,7 +2079,7 @@ const Ra = {
|
|
|
2078
2079
|
}) => {
|
|
2079
2080
|
var a, o;
|
|
2080
2081
|
return {
|
|
2081
|
-
component:
|
|
2082
|
+
component: Ma,
|
|
2082
2083
|
componentProps: {
|
|
2083
2084
|
action: () => !0,
|
|
2084
2085
|
upload: r.options.upload,
|
|
@@ -2129,7 +2130,7 @@ const Ra = {
|
|
|
2129
2130
|
};
|
|
2130
2131
|
},
|
|
2131
2132
|
addNodeView() {
|
|
2132
|
-
return pt(
|
|
2133
|
+
return pt(Aa);
|
|
2133
2134
|
},
|
|
2134
2135
|
addCommands() {
|
|
2135
2136
|
var t;
|
|
@@ -2205,7 +2206,7 @@ const Ra = {
|
|
|
2205
2206
|
];
|
|
2206
2207
|
},
|
|
2207
2208
|
addProseMirrorPlugins() {
|
|
2208
|
-
const e =
|
|
2209
|
+
const e = za({
|
|
2209
2210
|
validateFn: (r) => !(!this.options.acceptMimes.includes(r.type) || r.size > this.options.maxSize),
|
|
2210
2211
|
onUpload: this.options.upload,
|
|
2211
2212
|
// postUpload: this.options.postUpload,
|
|
@@ -2214,18 +2215,18 @@ const Ra = {
|
|
|
2214
2215
|
return [
|
|
2215
2216
|
new De({
|
|
2216
2217
|
props: {
|
|
2217
|
-
handlePaste: (r, n) => !n.clipboardData || [...n.clipboardData.files || []].some((o) => o.type === "text/html") ? !1 :
|
|
2218
|
-
handleDrop: (r, n, a, o) => (!(n instanceof DragEvent) || !n.dataTransfer ||
|
|
2218
|
+
handlePaste: (r, n) => !n.clipboardData || [...n.clipboardData.files || []].some((o) => o.type === "text/html") ? !1 : Pa(r, n, e),
|
|
2219
|
+
handleDrop: (r, n, a, o) => (!(n instanceof DragEvent) || !n.dataTransfer || Ra(r, n, o, e), !1)
|
|
2219
2220
|
}
|
|
2220
2221
|
}),
|
|
2221
|
-
|
|
2222
|
+
La()
|
|
2222
2223
|
];
|
|
2223
2224
|
}
|
|
2224
2225
|
});
|
|
2225
|
-
function
|
|
2226
|
+
function Ha(t) {
|
|
2226
2227
|
return /\.(?:mp4|webm|ogg|mov)$/i.test(t);
|
|
2227
2228
|
}
|
|
2228
|
-
function
|
|
2229
|
+
function Da(t) {
|
|
2229
2230
|
const { t: e } = q(), [r, n] = S(""), a = J(null), [o, c] = S(""), [l, s] = S(!1), h = (w) => {
|
|
2230
2231
|
s(w.detail);
|
|
2231
2232
|
};
|
|
@@ -2325,7 +2326,7 @@ function Ha(t) {
|
|
|
2325
2326
|
value: r,
|
|
2326
2327
|
onChange: (w) => {
|
|
2327
2328
|
const p = w.target.value;
|
|
2328
|
-
if (!
|
|
2329
|
+
if (!Ha(p)) {
|
|
2329
2330
|
c("Invalid video URL"), n("");
|
|
2330
2331
|
return;
|
|
2331
2332
|
}
|
|
@@ -2345,7 +2346,7 @@ function Ha(t) {
|
|
|
2345
2346
|
}
|
|
2346
2347
|
);
|
|
2347
2348
|
}
|
|
2348
|
-
function
|
|
2349
|
+
function _a(t) {
|
|
2349
2350
|
return t = t.replace("https://youtu.be/", "https://www.youtube.com/watch?v=").replace("watch?v=", "embed/"), t = t.replace("https://vimeo.com/", "https://player.vimeo.com/video/"), /^https?:\/\/www.bilibili.com\/video\/.*/i.test(t) && (t = t.replace(/\?.*$/, "").replace("https://www.bilibili.com/video/", "https://player.bilibili.com/player.html?bvid=")), t.includes("drive.google.com") && (t = t.replace("/view", "/preview")), t;
|
|
2350
2351
|
}
|
|
2351
2352
|
const ti = yt.create({
|
|
@@ -2369,7 +2370,7 @@ const ti = yt.create({
|
|
|
2369
2370
|
button: ({ editor: t, t: e }) => {
|
|
2370
2371
|
var r, n;
|
|
2371
2372
|
return {
|
|
2372
|
-
component:
|
|
2373
|
+
component: Da,
|
|
2373
2374
|
componentProps: {
|
|
2374
2375
|
action: () => {
|
|
2375
2376
|
},
|
|
@@ -2389,13 +2390,13 @@ const ti = yt.create({
|
|
|
2389
2390
|
src: {
|
|
2390
2391
|
default: null,
|
|
2391
2392
|
renderHTML: ({ src: t }) => ({
|
|
2392
|
-
src: t ?
|
|
2393
|
+
src: t ? _a(t) : null
|
|
2393
2394
|
})
|
|
2394
2395
|
},
|
|
2395
2396
|
width: {
|
|
2396
2397
|
default: this.options.width,
|
|
2397
2398
|
renderHTML: ({ width: t }) => ({
|
|
2398
|
-
width:
|
|
2399
|
+
width: No(t)
|
|
2399
2400
|
})
|
|
2400
2401
|
},
|
|
2401
2402
|
frameborder: {
|
|
@@ -2435,12 +2436,12 @@ const ti = yt.create({
|
|
|
2435
2436
|
updateVideo: (t) => ({ commands: e }) => e.updateAttributes(this.name, t)
|
|
2436
2437
|
};
|
|
2437
2438
|
}
|
|
2438
|
-
}),
|
|
2439
|
-
wrap:
|
|
2440
|
-
innerWrap:
|
|
2439
|
+
}), Ba = "_wrap_5y04w_1", $a = "_innerWrap_5y04w_15", ir = {
|
|
2440
|
+
wrap: Ba,
|
|
2441
|
+
innerWrap: $a
|
|
2441
2442
|
};
|
|
2442
|
-
function
|
|
2443
|
-
const n =
|
|
2443
|
+
function Va({ editor: t, node: e, updateAttributes: r }) {
|
|
2444
|
+
const n = vo(), { url: a, width: o, height: c } = e.attrs, [l, s] = S("");
|
|
2444
2445
|
function h() {
|
|
2445
2446
|
l && t.chain().updateAttributes(kt.name, {
|
|
2446
2447
|
url: l
|
|
@@ -2502,7 +2503,7 @@ function $a({ editor: t, node: e, updateAttributes: r }) {
|
|
|
2502
2503
|
)
|
|
2503
2504
|
] });
|
|
2504
2505
|
}
|
|
2505
|
-
function
|
|
2506
|
+
function Wa(t) {
|
|
2506
2507
|
try {
|
|
2507
2508
|
return JSON.stringify(t);
|
|
2508
2509
|
} catch {
|
|
@@ -2535,14 +2536,14 @@ function Lt(t, e = !1) {
|
|
|
2535
2536
|
return o !== o ? a : o;
|
|
2536
2537
|
};
|
|
2537
2538
|
}
|
|
2538
|
-
function
|
|
2539
|
+
function Fa(t) {
|
|
2539
2540
|
const { attrs: e } = t;
|
|
2540
2541
|
return Object.keys(e).reduce((r, n) => {
|
|
2541
2542
|
const a = e[n];
|
|
2542
2543
|
if (a == null)
|
|
2543
2544
|
return r;
|
|
2544
2545
|
let o = "";
|
|
2545
|
-
return typeof a == "object" ? o =
|
|
2546
|
+
return typeof a == "object" ? o = Wa(a) : o = a, r[n] = o, r;
|
|
2546
2547
|
}, /* @__PURE__ */ Object.create(null));
|
|
2547
2548
|
}
|
|
2548
2549
|
const kt = yt.create({
|
|
@@ -2636,7 +2637,7 @@ const kt = yt.create({
|
|
|
2636
2637
|
];
|
|
2637
2638
|
},
|
|
2638
2639
|
addNodeView() {
|
|
2639
|
-
return pt(
|
|
2640
|
+
return pt(Va);
|
|
2640
2641
|
}
|
|
2641
2642
|
}), jt = W.forwardRef(
|
|
2642
2643
|
({ className: t, ...e }, r) => /* @__PURE__ */ i(
|
|
@@ -2652,11 +2653,11 @@ const kt = yt.create({
|
|
|
2652
2653
|
)
|
|
2653
2654
|
);
|
|
2654
2655
|
jt.displayName = "Textarea";
|
|
2655
|
-
function
|
|
2656
|
+
function Ua(t) {
|
|
2656
2657
|
return t;
|
|
2657
2658
|
}
|
|
2658
2659
|
function zt(t, e, r, n) {
|
|
2659
|
-
const a =
|
|
2660
|
+
const a = Ua, [o, c] = S(a(r)), l = J(o);
|
|
2660
2661
|
return B(() => {
|
|
2661
2662
|
const s = () => {
|
|
2662
2663
|
const h = { ...r, ...t.getAttributes(e) };
|
|
@@ -2671,7 +2672,7 @@ function zt(t, e, r, n) {
|
|
|
2671
2672
|
};
|
|
2672
2673
|
}, [t, r, e, a]), o;
|
|
2673
2674
|
}
|
|
2674
|
-
function
|
|
2675
|
+
function Ga({ editor: t, ...e }) {
|
|
2675
2676
|
const { t: r } = q(), n = zt(t, Mt.name, {
|
|
2676
2677
|
text: "",
|
|
2677
2678
|
defaultShowPicker: !1
|
|
@@ -2752,16 +2753,16 @@ function Ua({ editor: t, ...e }) {
|
|
|
2752
2753
|
)
|
|
2753
2754
|
] });
|
|
2754
2755
|
}
|
|
2755
|
-
function
|
|
2756
|
+
function qa() {
|
|
2756
2757
|
const [t] = Hr((e) => e.value);
|
|
2757
2758
|
return t;
|
|
2758
2759
|
}
|
|
2759
|
-
const
|
|
2760
|
+
const ja = {
|
|
2760
2761
|
setTheme: (t, e) => {
|
|
2761
2762
|
Be(bt.UPDATE_THEME(t), e);
|
|
2762
2763
|
}
|
|
2763
2764
|
};
|
|
2764
|
-
function
|
|
2765
|
+
function Xa(t, e = 1) {
|
|
2765
2766
|
let r = 0, n = 0, a = 0;
|
|
2766
2767
|
if (t.startsWith("rgb")) {
|
|
2767
2768
|
const o = t.replace(/\s/g, "").match(/rgb\((.*)\)$/)[1].split(",");
|
|
@@ -2773,10 +2774,10 @@ function ja(t, e = 1) {
|
|
|
2773
2774
|
return t;
|
|
2774
2775
|
return e > 1 && e <= 100 && (e = e / 100), `rgba(${r},${n},${a},${e})`;
|
|
2775
2776
|
}
|
|
2776
|
-
function
|
|
2777
|
-
const e =
|
|
2777
|
+
function Ya({ node: t }) {
|
|
2778
|
+
const e = qa(), { text: r } = t.attrs, n = U(() => {
|
|
2778
2779
|
const c = "rgb(254, 242, 237)";
|
|
2779
|
-
return e === "dark" ?
|
|
2780
|
+
return e === "dark" ? Xa(c, 0.75) : c;
|
|
2780
2781
|
}, [e]), a = U(() => {
|
|
2781
2782
|
try {
|
|
2782
2783
|
return _e.renderToString(`${r}`);
|
|
@@ -2799,7 +2800,7 @@ function Xa({ node: t }) {
|
|
|
2799
2800
|
}
|
|
2800
2801
|
);
|
|
2801
2802
|
}
|
|
2802
|
-
function
|
|
2803
|
+
function Ka(t) {
|
|
2803
2804
|
return (e) => e.getAttribute(t);
|
|
2804
2805
|
}
|
|
2805
2806
|
const Mt = yt.create({
|
|
@@ -2815,7 +2816,7 @@ const Mt = yt.create({
|
|
|
2815
2816
|
class: "katex"
|
|
2816
2817
|
},
|
|
2817
2818
|
button: ({ editor: t, t: e }) => ({
|
|
2818
|
-
component:
|
|
2819
|
+
component: Ga,
|
|
2819
2820
|
componentProps: {
|
|
2820
2821
|
editor: t,
|
|
2821
2822
|
action: () => !0,
|
|
@@ -2831,7 +2832,7 @@ const Mt = yt.create({
|
|
|
2831
2832
|
return {
|
|
2832
2833
|
text: {
|
|
2833
2834
|
default: "",
|
|
2834
|
-
parseHTML:
|
|
2835
|
+
parseHTML: Ka("text")
|
|
2835
2836
|
},
|
|
2836
2837
|
defaultShowPicker: {
|
|
2837
2838
|
default: !1
|
|
@@ -2862,7 +2863,7 @@ const Mt = yt.create({
|
|
|
2862
2863
|
];
|
|
2863
2864
|
},
|
|
2864
2865
|
addNodeView() {
|
|
2865
|
-
return pt(
|
|
2866
|
+
return pt(Ya);
|
|
2866
2867
|
}
|
|
2867
2868
|
});
|
|
2868
2869
|
let ye;
|
|
@@ -2874,16 +2875,16 @@ function Fe() {
|
|
|
2874
2875
|
}
|
|
2875
2876
|
}
|
|
2876
2877
|
const Le = "OPEN_EXCALIDRAW_SETTING_MODAL";
|
|
2877
|
-
function
|
|
2878
|
+
function Za(t, e) {
|
|
2878
2879
|
Fe().on(t, e);
|
|
2879
2880
|
}
|
|
2880
|
-
function
|
|
2881
|
+
function Ja(t, e) {
|
|
2881
2882
|
Fe().off(t, e);
|
|
2882
2883
|
}
|
|
2883
|
-
function
|
|
2884
|
+
function Qa(t) {
|
|
2884
2885
|
Fe().emit(Le, t);
|
|
2885
2886
|
}
|
|
2886
|
-
const
|
|
2887
|
+
const tc = ({ editor: t }) => {
|
|
2887
2888
|
const [e, r] = S(null), [n, a] = S({}), [o, c] = S({ elements: [], appState: { isLoading: !1 }, files: null }), [l, s] = S(!1), [h, d] = S(!0), [u, m] = S(null), x = H(
|
|
2888
2889
|
(I) => {
|
|
2889
2890
|
I && import("@excalidraw/excalidraw").then((T) => {
|
|
@@ -2912,8 +2913,8 @@ const Qa = ({ editor: t }) => {
|
|
|
2912
2913
|
const I = (T) => {
|
|
2913
2914
|
s(!0), T && c(T.data);
|
|
2914
2915
|
};
|
|
2915
|
-
return
|
|
2916
|
-
|
|
2916
|
+
return Za(Le, I), () => {
|
|
2917
|
+
Ja(Le, I);
|
|
2917
2918
|
};
|
|
2918
2919
|
}, [t, s]), /* @__PURE__ */ g(
|
|
2919
2920
|
ut,
|
|
@@ -2963,13 +2964,13 @@ const Qa = ({ editor: t }) => {
|
|
|
2963
2964
|
]
|
|
2964
2965
|
}
|
|
2965
2966
|
);
|
|
2966
|
-
},
|
|
2967
|
-
wrap:
|
|
2968
|
-
renderWrap:
|
|
2969
|
-
title:
|
|
2970
|
-
handlerWrap:
|
|
2971
|
-
},
|
|
2972
|
-
function
|
|
2967
|
+
}, ec = "_wrap_15k3c_1", rc = "_renderWrap_15k3c_7", ic = "_title_15k3c_14", nc = "_handlerWrap_15k3c_30", Pt = {
|
|
2968
|
+
wrap: ec,
|
|
2969
|
+
renderWrap: rc,
|
|
2970
|
+
title: ic,
|
|
2971
|
+
handlerWrap: nc
|
|
2972
|
+
}, oc = 10, ac = 200, nr = 15, or = { width: "100%", height: "100%", maxWidth: "100%" };
|
|
2973
|
+
function cc({ editor: t, node: e, updateAttributes: r }) {
|
|
2973
2974
|
const n = J(null), a = t.isActive(St.name), { data: o, width: c, height: l } = e.attrs, [s, h] = S(null), [d, u] = S(!0), [m, x] = S(null), [w, p] = S(!1), [f, I] = S(100), T = H(
|
|
2974
2975
|
(C) => {
|
|
2975
2976
|
C && p(!0);
|
|
@@ -2977,7 +2978,7 @@ function ac({ editor: t, node: e, updateAttributes: r }) {
|
|
|
2977
2978
|
[p]
|
|
2978
2979
|
), v = H((C) => () => {
|
|
2979
2980
|
I(
|
|
2980
|
-
(M) => $e(C === "minus" ? M - nr : M + nr,
|
|
2981
|
+
(M) => $e(C === "minus" ? M - nr : M + nr, oc, ac)
|
|
2981
2982
|
);
|
|
2982
2983
|
}, []);
|
|
2983
2984
|
B(() => {
|
|
@@ -3061,7 +3062,7 @@ function ac({ editor: t, node: e, updateAttributes: r }) {
|
|
|
3061
3062
|
}
|
|
3062
3063
|
) }) });
|
|
3063
3064
|
}
|
|
3064
|
-
const
|
|
3065
|
+
const sc = Ht.memo(cc, (t, e) => !!Cr(t.node.attrs, e.node.attrs)), ar = { elements: [] }, St = yt.create({
|
|
3065
3066
|
name: "excalidraw",
|
|
3066
3067
|
group: "block",
|
|
3067
3068
|
selectable: !0,
|
|
@@ -3098,7 +3099,7 @@ const cc = Ht.memo(ac, (t, e) => !!Cr(t.node.attrs, e.node.attrs)), ar = { eleme
|
|
|
3098
3099
|
class: "excalidraw"
|
|
3099
3100
|
},
|
|
3100
3101
|
button: ({ editor: e }) => ({
|
|
3101
|
-
component:
|
|
3102
|
+
component: tc,
|
|
3102
3103
|
componentProps: {
|
|
3103
3104
|
editor: e
|
|
3104
3105
|
}
|
|
@@ -3113,7 +3114,7 @@ const cc = Ht.memo(ac, (t, e) => !!Cr(t.node.attrs, e.node.attrs)), ar = { eleme
|
|
|
3113
3114
|
];
|
|
3114
3115
|
},
|
|
3115
3116
|
renderHTML({ HTMLAttributes: t, node: e }) {
|
|
3116
|
-
return ["div", st(this.options.HTMLAttributes, t,
|
|
3117
|
+
return ["div", st(this.options.HTMLAttributes, t, Fa(e))];
|
|
3117
3118
|
},
|
|
3118
3119
|
addCommands() {
|
|
3119
3120
|
return {
|
|
@@ -3127,7 +3128,7 @@ const cc = Ht.memo(ac, (t, e) => !!Cr(t.node.attrs, e.node.attrs)), ar = { eleme
|
|
|
3127
3128
|
};
|
|
3128
3129
|
},
|
|
3129
3130
|
addNodeView() {
|
|
3130
|
-
return pt(
|
|
3131
|
+
return pt(sc);
|
|
3131
3132
|
},
|
|
3132
3133
|
addInputRules() {
|
|
3133
3134
|
return [
|
|
@@ -3139,7 +3140,7 @@ const cc = Ht.memo(ac, (t, e) => !!Cr(t.node.attrs, e.node.attrs)), ar = { eleme
|
|
|
3139
3140
|
];
|
|
3140
3141
|
}
|
|
3141
3142
|
});
|
|
3142
|
-
function
|
|
3143
|
+
function lc({ selectImage: t, giphyApiKey: e, children: r }) {
|
|
3143
3144
|
const [n, a] = S([]), [o] = S(15), c = J(null), l = (h, d = "search") => {
|
|
3144
3145
|
if (!e)
|
|
3145
3146
|
return;
|
|
@@ -3200,9 +3201,9 @@ function sc({ selectImage: t, giphyApiKey: e, children: r }) {
|
|
|
3200
3201
|
)
|
|
3201
3202
|
] });
|
|
3202
3203
|
}
|
|
3203
|
-
function
|
|
3204
|
+
function dc({ editor: t, icon: e, giphyApiKey: r, ...n }) {
|
|
3204
3205
|
return /* @__PURE__ */ i(
|
|
3205
|
-
|
|
3206
|
+
lc,
|
|
3206
3207
|
{
|
|
3207
3208
|
giphyApiKey: r,
|
|
3208
3209
|
selectImage: (o) => {
|
|
@@ -3225,7 +3226,7 @@ const Kt = {
|
|
|
3225
3226
|
BOTTOM_LEFT: "bl",
|
|
3226
3227
|
BOTTOM_RIGHT: "br"
|
|
3227
3228
|
};
|
|
3228
|
-
function
|
|
3229
|
+
function hc(t) {
|
|
3229
3230
|
var M, L;
|
|
3230
3231
|
const [e, r] = S({
|
|
3231
3232
|
width: xt,
|
|
@@ -3384,7 +3385,7 @@ const ei = de.extend({
|
|
|
3384
3385
|
var o;
|
|
3385
3386
|
const a = ((o = r == null ? void 0 : r.options) == null ? void 0 : o.GIPHY_API_KEY) || "";
|
|
3386
3387
|
return {
|
|
3387
|
-
component:
|
|
3388
|
+
component: dc,
|
|
3388
3389
|
componentProps: {
|
|
3389
3390
|
editor: e,
|
|
3390
3391
|
action: () => {
|
|
@@ -3423,7 +3424,7 @@ const ei = de.extend({
|
|
|
3423
3424
|
};
|
|
3424
3425
|
},
|
|
3425
3426
|
addNodeView() {
|
|
3426
|
-
return pt(
|
|
3427
|
+
return pt(hc);
|
|
3427
3428
|
},
|
|
3428
3429
|
addCommands() {
|
|
3429
3430
|
var t;
|
|
@@ -3481,7 +3482,7 @@ function fe(t = 8) {
|
|
|
3481
3482
|
return Math.random().toString(36).substring(2, t + 2);
|
|
3482
3483
|
}
|
|
3483
3484
|
const cr = `graph TB
|
|
3484
|
-
a-->b`,
|
|
3485
|
+
a-->b`, uc = ({ editor: t, upload: e }) => {
|
|
3485
3486
|
const [r, n] = S(cr), [a, o] = S(""), [c, l] = S(!1), s = J(null), h = async (m) => {
|
|
3486
3487
|
try {
|
|
3487
3488
|
const { svg: x } = await ce.render("mermaid-svg", m);
|
|
@@ -3585,7 +3586,7 @@ a-->b`, hc = ({ editor: t, upload: e }) => {
|
|
|
3585
3586
|
BOTTOM_LEFT: "bl",
|
|
3586
3587
|
BOTTOM_RIGHT: "br"
|
|
3587
3588
|
};
|
|
3588
|
-
function
|
|
3589
|
+
function mc({ editor: t, node: e, updateAttributes: r, getPos: n, selected: a }) {
|
|
3589
3590
|
const [o, c] = S({
|
|
3590
3591
|
width: xt,
|
|
3591
3592
|
height: xt
|
|
@@ -3742,7 +3743,7 @@ const sr = de.extend({
|
|
|
3742
3743
|
button: ({ editor: e, t: r, extension: n }) => {
|
|
3743
3744
|
var a;
|
|
3744
3745
|
return {
|
|
3745
|
-
component:
|
|
3746
|
+
component: uc,
|
|
3746
3747
|
componentProps: {
|
|
3747
3748
|
action: () => !0,
|
|
3748
3749
|
isActive: () => !1,
|
|
@@ -3790,7 +3791,7 @@ const sr = de.extend({
|
|
|
3790
3791
|
};
|
|
3791
3792
|
},
|
|
3792
3793
|
addNodeView() {
|
|
3793
|
-
return pt(
|
|
3794
|
+
return pt(mc);
|
|
3794
3795
|
},
|
|
3795
3796
|
// @ts-ignore
|
|
3796
3797
|
addCommands() {
|
|
@@ -3842,7 +3843,7 @@ const sr = de.extend({
|
|
|
3842
3843
|
];
|
|
3843
3844
|
}
|
|
3844
3845
|
});
|
|
3845
|
-
function
|
|
3846
|
+
function xc({ node: t }) {
|
|
3846
3847
|
var n;
|
|
3847
3848
|
const e = ((n = t == null ? void 0 : t.attrs) == null ? void 0 : n.src) || "", r = e == null ? void 0 : e.split("/").pop();
|
|
3848
3849
|
return r ? /* @__PURE__ */ i(gt, { children: /* @__PURE__ */ i("div", { "data-twitter": "", children: /* @__PURE__ */ i(_i, { id: r }) }) }) : null;
|
|
@@ -3889,7 +3890,7 @@ function ri(t) {
|
|
|
3889
3890
|
}
|
|
3890
3891
|
) });
|
|
3891
3892
|
}
|
|
3892
|
-
function
|
|
3893
|
+
function fc(t) {
|
|
3893
3894
|
function e(r) {
|
|
3894
3895
|
t.action && t.action(r);
|
|
3895
3896
|
}
|
|
@@ -3906,9 +3907,9 @@ function xc(t) {
|
|
|
3906
3907
|
/* @__PURE__ */ i(Tt, { hideWhenDetached: !0, className: "richtext-w-full", align: "start", side: "bottom", children: /* @__PURE__ */ i(ri, { editor: t.editor, onSetLink: e }) })
|
|
3907
3908
|
] });
|
|
3908
3909
|
}
|
|
3909
|
-
const
|
|
3910
|
+
const gc = /(https?:\/\/)?(www\.)?x\.com\/(\w{1,15})(\/status\/(\d+))?(\/\S*)?/g, pc = /^https?:\/\/(www\.)?x\.com\/(\w{1,15})(\/status\/(\d+))?(\/\S*)?$/;
|
|
3910
3911
|
function lr(t) {
|
|
3911
|
-
return t.match(
|
|
3912
|
+
return t.match(pc);
|
|
3912
3913
|
}
|
|
3913
3914
|
const Ie = yt.create({
|
|
3914
3915
|
name: "twitter",
|
|
@@ -3921,7 +3922,7 @@ const Ie = yt.create({
|
|
|
3921
3922
|
inline: !1,
|
|
3922
3923
|
origin: "",
|
|
3923
3924
|
button: ({ editor: t, t: e }) => ({
|
|
3924
|
-
component:
|
|
3925
|
+
component: fc,
|
|
3925
3926
|
componentProps: {
|
|
3926
3927
|
action: (r) => {
|
|
3927
3928
|
t.commands.setTweet({ src: r });
|
|
@@ -3936,7 +3937,7 @@ const Ie = yt.create({
|
|
|
3936
3937
|
};
|
|
3937
3938
|
},
|
|
3938
3939
|
addNodeView() {
|
|
3939
|
-
return pt(
|
|
3940
|
+
return pt(xc, { attrs: this.options.HTMLAttributes });
|
|
3940
3941
|
},
|
|
3941
3942
|
inline() {
|
|
3942
3943
|
return this.options.inline;
|
|
@@ -3970,7 +3971,7 @@ const Ie = yt.create({
|
|
|
3970
3971
|
addPasteRules() {
|
|
3971
3972
|
return this.options.addPasteHandler ? [
|
|
3972
3973
|
Ti({
|
|
3973
|
-
find:
|
|
3974
|
+
find: gc,
|
|
3974
3975
|
type: this.type,
|
|
3975
3976
|
getAttributes: (t) => ({ src: t.input })
|
|
3976
3977
|
})
|
|
@@ -3979,18 +3980,18 @@ const Ie = yt.create({
|
|
|
3979
3980
|
renderHTML({ HTMLAttributes: t }) {
|
|
3980
3981
|
return ["div", st({ "data-twitter": "" }, t)];
|
|
3981
3982
|
}
|
|
3982
|
-
}),
|
|
3983
|
-
wrapper:
|
|
3984
|
-
tool:
|
|
3985
|
-
active:
|
|
3986
|
-
pen:
|
|
3987
|
-
line:
|
|
3988
|
-
options:
|
|
3989
|
-
colorWrap:
|
|
3990
|
-
color:
|
|
3991
|
-
colorActive:
|
|
3983
|
+
}), wc = "_wrapper_rraz2_1", vc = "_tool_rraz2_17", bc = "_active_rraz2_37", yc = "_pen_rraz2_41", Cc = "_line_rraz2_48", Tc = "_options_rraz2_56", Nc = "_colorWrap_rraz2_66", kc = "_color_rraz2_66", Sc = "_colorActive_rraz2_83", z = {
|
|
3984
|
+
wrapper: wc,
|
|
3985
|
+
tool: vc,
|
|
3986
|
+
active: bc,
|
|
3987
|
+
pen: yc,
|
|
3988
|
+
line: Cc,
|
|
3989
|
+
options: Tc,
|
|
3990
|
+
colorWrap: Nc,
|
|
3991
|
+
color: kc,
|
|
3992
|
+
colorActive: Sc
|
|
3992
3993
|
};
|
|
3993
|
-
function
|
|
3994
|
+
function Mc(t) {
|
|
3994
3995
|
return /* @__PURE__ */ i(
|
|
3995
3996
|
"svg",
|
|
3996
3997
|
{
|
|
@@ -4014,7 +4015,7 @@ function Sc(t) {
|
|
|
4014
4015
|
}
|
|
4015
4016
|
);
|
|
4016
4017
|
}
|
|
4017
|
-
function
|
|
4018
|
+
function Ac(t) {
|
|
4018
4019
|
return /* @__PURE__ */ i(
|
|
4019
4020
|
"svg",
|
|
4020
4021
|
{
|
|
@@ -4033,7 +4034,7 @@ function Mc(t) {
|
|
|
4033
4034
|
}
|
|
4034
4035
|
);
|
|
4035
4036
|
}
|
|
4036
|
-
function
|
|
4037
|
+
function Lc(t) {
|
|
4037
4038
|
return /* @__PURE__ */ i(
|
|
4038
4039
|
"svg",
|
|
4039
4040
|
{
|
|
@@ -4052,7 +4053,7 @@ function Ac(t) {
|
|
|
4052
4053
|
}
|
|
4053
4054
|
);
|
|
4054
4055
|
}
|
|
4055
|
-
function
|
|
4056
|
+
function Ic(t) {
|
|
4056
4057
|
return /* @__PURE__ */ i(
|
|
4057
4058
|
"svg",
|
|
4058
4059
|
{
|
|
@@ -4071,7 +4072,7 @@ function Lc(t) {
|
|
|
4071
4072
|
}
|
|
4072
4073
|
);
|
|
4073
4074
|
}
|
|
4074
|
-
function
|
|
4075
|
+
function Ec(t) {
|
|
4075
4076
|
return /* @__PURE__ */ g(
|
|
4076
4077
|
"svg",
|
|
4077
4078
|
{
|
|
@@ -4099,7 +4100,7 @@ function Ic(t) {
|
|
|
4099
4100
|
}
|
|
4100
4101
|
);
|
|
4101
4102
|
}
|
|
4102
|
-
function
|
|
4103
|
+
function zc(t) {
|
|
4103
4104
|
return /* @__PURE__ */ i(
|
|
4104
4105
|
"svg",
|
|
4105
4106
|
{
|
|
@@ -4118,7 +4119,7 @@ function Ec(t) {
|
|
|
4118
4119
|
}
|
|
4119
4120
|
);
|
|
4120
4121
|
}
|
|
4121
|
-
function
|
|
4122
|
+
function Pc(t) {
|
|
4122
4123
|
return /* @__PURE__ */ i(
|
|
4123
4124
|
"svg",
|
|
4124
4125
|
{
|
|
@@ -4137,7 +4138,7 @@ function zc(t) {
|
|
|
4137
4138
|
}
|
|
4138
4139
|
);
|
|
4139
4140
|
}
|
|
4140
|
-
function
|
|
4141
|
+
function Rc(t) {
|
|
4141
4142
|
return /* @__PURE__ */ i(
|
|
4142
4143
|
"svg",
|
|
4143
4144
|
{
|
|
@@ -4156,7 +4157,7 @@ function Pc(t) {
|
|
|
4156
4157
|
}
|
|
4157
4158
|
);
|
|
4158
4159
|
}
|
|
4159
|
-
function
|
|
4160
|
+
function Oc(t) {
|
|
4160
4161
|
return /* @__PURE__ */ i(
|
|
4161
4162
|
"svg",
|
|
4162
4163
|
{
|
|
@@ -4179,7 +4180,7 @@ function Rc(t) {
|
|
|
4179
4180
|
}
|
|
4180
4181
|
);
|
|
4181
4182
|
}
|
|
4182
|
-
function
|
|
4183
|
+
function Hc(t) {
|
|
4183
4184
|
return /* @__PURE__ */ i(
|
|
4184
4185
|
"svg",
|
|
4185
4186
|
{
|
|
@@ -4198,7 +4199,7 @@ function Oc(t) {
|
|
|
4198
4199
|
}
|
|
4199
4200
|
);
|
|
4200
4201
|
}
|
|
4201
|
-
function
|
|
4202
|
+
function Dc(t) {
|
|
4202
4203
|
return /* @__PURE__ */ i(
|
|
4203
4204
|
"svg",
|
|
4204
4205
|
{
|
|
@@ -4227,7 +4228,7 @@ function Hc(t) {
|
|
|
4227
4228
|
}
|
|
4228
4229
|
);
|
|
4229
4230
|
}
|
|
4230
|
-
function
|
|
4231
|
+
function _c(t) {
|
|
4231
4232
|
return /* @__PURE__ */ i(
|
|
4232
4233
|
"svg",
|
|
4233
4234
|
{
|
|
@@ -4246,7 +4247,7 @@ function Dc(t) {
|
|
|
4246
4247
|
}
|
|
4247
4248
|
);
|
|
4248
4249
|
}
|
|
4249
|
-
function
|
|
4250
|
+
function Bc(t) {
|
|
4250
4251
|
return /* @__PURE__ */ i(
|
|
4251
4252
|
"svg",
|
|
4252
4253
|
{
|
|
@@ -4267,7 +4268,7 @@ function _c(t) {
|
|
|
4267
4268
|
}
|
|
4268
4269
|
);
|
|
4269
4270
|
}
|
|
4270
|
-
function
|
|
4271
|
+
function $c(t) {
|
|
4271
4272
|
return /* @__PURE__ */ i(
|
|
4272
4273
|
"svg",
|
|
4273
4274
|
{
|
|
@@ -4288,7 +4289,7 @@ function Bc(t) {
|
|
|
4288
4289
|
}
|
|
4289
4290
|
);
|
|
4290
4291
|
}
|
|
4291
|
-
function
|
|
4292
|
+
function Vc(t) {
|
|
4292
4293
|
return /* @__PURE__ */ i(
|
|
4293
4294
|
"svg",
|
|
4294
4295
|
{
|
|
@@ -4307,7 +4308,7 @@ function $c(t) {
|
|
|
4307
4308
|
}
|
|
4308
4309
|
);
|
|
4309
4310
|
}
|
|
4310
|
-
function
|
|
4311
|
+
function Wc(t) {
|
|
4311
4312
|
return /* @__PURE__ */ i(
|
|
4312
4313
|
"svg",
|
|
4313
4314
|
{
|
|
@@ -4326,7 +4327,7 @@ function Vc(t) {
|
|
|
4326
4327
|
}
|
|
4327
4328
|
);
|
|
4328
4329
|
}
|
|
4329
|
-
function
|
|
4330
|
+
function Fc(t) {
|
|
4330
4331
|
return /* @__PURE__ */ i(
|
|
4331
4332
|
"svg",
|
|
4332
4333
|
{
|
|
@@ -4345,7 +4346,7 @@ function Wc(t) {
|
|
|
4345
4346
|
}
|
|
4346
4347
|
);
|
|
4347
4348
|
}
|
|
4348
|
-
function
|
|
4349
|
+
function Uc(t) {
|
|
4349
4350
|
return /* @__PURE__ */ i(
|
|
4350
4351
|
"svg",
|
|
4351
4352
|
{
|
|
@@ -4364,7 +4365,7 @@ function Fc(t) {
|
|
|
4364
4365
|
}
|
|
4365
4366
|
);
|
|
4366
4367
|
}
|
|
4367
|
-
function
|
|
4368
|
+
function Gc(t) {
|
|
4368
4369
|
return /* @__PURE__ */ i(
|
|
4369
4370
|
"svg",
|
|
4370
4371
|
{
|
|
@@ -4383,7 +4384,7 @@ function Uc(t) {
|
|
|
4383
4384
|
}
|
|
4384
4385
|
);
|
|
4385
4386
|
}
|
|
4386
|
-
function
|
|
4387
|
+
function qc(t) {
|
|
4387
4388
|
return /* @__PURE__ */ i(
|
|
4388
4389
|
"svg",
|
|
4389
4390
|
{
|
|
@@ -4404,7 +4405,7 @@ function Gc(t) {
|
|
|
4404
4405
|
}
|
|
4405
4406
|
);
|
|
4406
4407
|
}
|
|
4407
|
-
const
|
|
4408
|
+
const jc = [
|
|
4408
4409
|
j.blackHighlight,
|
|
4409
4410
|
j.ofRGBA(166 / 255, 81 / 255, 167 / 255, 0.3),
|
|
4410
4411
|
j.ofRGBA(247 / 255, 78 / 255, 158 / 255, 0.3),
|
|
@@ -4428,9 +4429,9 @@ const qc = [
|
|
|
4428
4429
|
j.fromHex("#FFFB85"),
|
|
4429
4430
|
j.fromHex("#AADC99")
|
|
4430
4431
|
];
|
|
4431
|
-
function
|
|
4432
|
+
function Xc({ onChange: t }) {
|
|
4432
4433
|
const [e, r] = S(j.blackHighlight);
|
|
4433
|
-
return /* @__PURE__ */ i("div", { className: z.colorWrap, children:
|
|
4434
|
+
return /* @__PURE__ */ i("div", { className: z.colorWrap, children: jc.map((n, a) => /* @__PURE__ */ i(
|
|
4434
4435
|
"button",
|
|
4435
4436
|
{
|
|
4436
4437
|
style: { backgroundColor: n.toHexString() },
|
|
@@ -4475,7 +4476,7 @@ function Ee({ onChange: t }) {
|
|
|
4475
4476
|
)) })
|
|
4476
4477
|
] });
|
|
4477
4478
|
}
|
|
4478
|
-
function
|
|
4479
|
+
function Yc({ setColorPen: t, setThicknessPen: e }) {
|
|
4479
4480
|
const [r, n] = S(2);
|
|
4480
4481
|
return /* @__PURE__ */ g("div", { className: z.options, children: [
|
|
4481
4482
|
/* @__PURE__ */ i("div", { children: /* @__PURE__ */ i(
|
|
@@ -4500,15 +4501,15 @@ function Xc({ setColorPen: t, setThicknessPen: e }) {
|
|
|
4500
4501
|
) })
|
|
4501
4502
|
] });
|
|
4502
4503
|
}
|
|
4503
|
-
function
|
|
4504
|
+
function Kc({ setColorHighlight: t }) {
|
|
4504
4505
|
return /* @__PURE__ */ i("div", { className: z.options, children: /* @__PURE__ */ i(
|
|
4505
|
-
|
|
4506
|
+
Xc,
|
|
4506
4507
|
{
|
|
4507
4508
|
onChange: (e) => t(e)
|
|
4508
4509
|
}
|
|
4509
4510
|
) });
|
|
4510
4511
|
}
|
|
4511
|
-
function
|
|
4512
|
+
function Zc({
|
|
4512
4513
|
changeColorShape: t,
|
|
4513
4514
|
changeBorderColorShape: e,
|
|
4514
4515
|
onThicknessChange: r
|
|
@@ -4580,7 +4581,7 @@ function ii(t) {
|
|
|
4580
4581
|
}
|
|
4581
4582
|
x("select"), f[0].setEnabled(!0);
|
|
4582
4583
|
},
|
|
4583
|
-
children: /* @__PURE__ */ i(
|
|
4584
|
+
children: /* @__PURE__ */ i(Mc, {})
|
|
4584
4585
|
}
|
|
4585
4586
|
),
|
|
4586
4587
|
/* @__PURE__ */ i("div", { className: z.line }),
|
|
@@ -4598,7 +4599,7 @@ function ii(t) {
|
|
|
4598
4599
|
}
|
|
4599
4600
|
x("text"), f[1].setEnabled(!0);
|
|
4600
4601
|
},
|
|
4601
|
-
children: /* @__PURE__ */ i(
|
|
4602
|
+
children: /* @__PURE__ */ i(Ac, {})
|
|
4602
4603
|
}
|
|
4603
4604
|
),
|
|
4604
4605
|
/* @__PURE__ */ i("div", { className: z.line }),
|
|
@@ -4616,7 +4617,7 @@ function ii(t) {
|
|
|
4616
4617
|
}
|
|
4617
4618
|
x("pencil"), f[2].setEnabled(!0);
|
|
4618
4619
|
},
|
|
4619
|
-
children: /* @__PURE__ */ i(
|
|
4620
|
+
children: /* @__PURE__ */ i(Lc, {})
|
|
4620
4621
|
}
|
|
4621
4622
|
),
|
|
4622
4623
|
/* @__PURE__ */ i(
|
|
@@ -4633,7 +4634,7 @@ function ii(t) {
|
|
|
4633
4634
|
}
|
|
4634
4635
|
x("highlighter"), f[3].setEnabled(!0);
|
|
4635
4636
|
},
|
|
4636
|
-
children: /* @__PURE__ */ i(
|
|
4637
|
+
children: /* @__PURE__ */ i(Ic, {})
|
|
4637
4638
|
}
|
|
4638
4639
|
),
|
|
4639
4640
|
/* @__PURE__ */ i("div", { className: z.line }),
|
|
@@ -4651,7 +4652,7 @@ function ii(t) {
|
|
|
4651
4652
|
}
|
|
4652
4653
|
x("eraser"), f[4].setEnabled(!0);
|
|
4653
4654
|
},
|
|
4654
|
-
children: /* @__PURE__ */ i(
|
|
4655
|
+
children: /* @__PURE__ */ i(Ec, {})
|
|
4655
4656
|
}
|
|
4656
4657
|
),
|
|
4657
4658
|
/* @__PURE__ */ i("div", { className: z.line }),
|
|
@@ -4672,7 +4673,7 @@ function ii(t) {
|
|
|
4672
4673
|
/* square */
|
|
4673
4674
|
);
|
|
4674
4675
|
},
|
|
4675
|
-
children: /* @__PURE__ */ i(
|
|
4676
|
+
children: /* @__PURE__ */ i(zc, {})
|
|
4676
4677
|
}
|
|
4677
4678
|
),
|
|
4678
4679
|
/* @__PURE__ */ i(
|
|
@@ -4692,7 +4693,7 @@ function ii(t) {
|
|
|
4692
4693
|
/* rectangle */
|
|
4693
4694
|
);
|
|
4694
4695
|
},
|
|
4695
|
-
children: /* @__PURE__ */ i(
|
|
4696
|
+
children: /* @__PURE__ */ i(Pc, {})
|
|
4696
4697
|
}
|
|
4697
4698
|
),
|
|
4698
4699
|
/* @__PURE__ */ i(
|
|
@@ -4712,7 +4713,7 @@ function ii(t) {
|
|
|
4712
4713
|
/* circle */
|
|
4713
4714
|
);
|
|
4714
4715
|
},
|
|
4715
|
-
children: /* @__PURE__ */ i(
|
|
4716
|
+
children: /* @__PURE__ */ i(Rc, {})
|
|
4716
4717
|
}
|
|
4717
4718
|
),
|
|
4718
4719
|
/* @__PURE__ */ i(
|
|
@@ -4732,7 +4733,7 @@ function ii(t) {
|
|
|
4732
4733
|
/* triangle */
|
|
4733
4734
|
);
|
|
4734
4735
|
},
|
|
4735
|
-
children: /* @__PURE__ */ i(
|
|
4736
|
+
children: /* @__PURE__ */ i(Oc, {})
|
|
4736
4737
|
}
|
|
4737
4738
|
),
|
|
4738
4739
|
/* @__PURE__ */ i(
|
|
@@ -4752,7 +4753,7 @@ function ii(t) {
|
|
|
4752
4753
|
/* hexagonal */
|
|
4753
4754
|
);
|
|
4754
4755
|
},
|
|
4755
|
-
children: /* @__PURE__ */ i(
|
|
4756
|
+
children: /* @__PURE__ */ i(Hc, {})
|
|
4756
4757
|
}
|
|
4757
4758
|
),
|
|
4758
4759
|
/* @__PURE__ */ i(
|
|
@@ -4772,7 +4773,7 @@ function ii(t) {
|
|
|
4772
4773
|
/* diamond */
|
|
4773
4774
|
);
|
|
4774
4775
|
},
|
|
4775
|
-
children: /* @__PURE__ */ i(
|
|
4776
|
+
children: /* @__PURE__ */ i(Dc, {})
|
|
4776
4777
|
}
|
|
4777
4778
|
),
|
|
4778
4779
|
/* @__PURE__ */ i(
|
|
@@ -4792,7 +4793,7 @@ function ii(t) {
|
|
|
4792
4793
|
/* arrow */
|
|
4793
4794
|
);
|
|
4794
4795
|
},
|
|
4795
|
-
children: /* @__PURE__ */ i(
|
|
4796
|
+
children: /* @__PURE__ */ i(_c, {})
|
|
4796
4797
|
}
|
|
4797
4798
|
),
|
|
4798
4799
|
/* @__PURE__ */ i(
|
|
@@ -4812,7 +4813,7 @@ function ii(t) {
|
|
|
4812
4813
|
/* line */
|
|
4813
4814
|
);
|
|
4814
4815
|
},
|
|
4815
|
-
children: /* @__PURE__ */ i(
|
|
4816
|
+
children: /* @__PURE__ */ i(Wc, {})
|
|
4816
4817
|
}
|
|
4817
4818
|
),
|
|
4818
4819
|
/* @__PURE__ */ i(
|
|
@@ -4832,7 +4833,7 @@ function ii(t) {
|
|
|
4832
4833
|
/* heart */
|
|
4833
4834
|
);
|
|
4834
4835
|
},
|
|
4835
|
-
children: /* @__PURE__ */ i(
|
|
4836
|
+
children: /* @__PURE__ */ i(Fc, {})
|
|
4836
4837
|
}
|
|
4837
4838
|
),
|
|
4838
4839
|
/* @__PURE__ */ i(
|
|
@@ -4852,7 +4853,7 @@ function ii(t) {
|
|
|
4852
4853
|
/* star */
|
|
4853
4854
|
);
|
|
4854
4855
|
},
|
|
4855
|
-
children: /* @__PURE__ */ i(
|
|
4856
|
+
children: /* @__PURE__ */ i(Uc, {})
|
|
4856
4857
|
}
|
|
4857
4858
|
),
|
|
4858
4859
|
/* @__PURE__ */ i(
|
|
@@ -4872,7 +4873,7 @@ function ii(t) {
|
|
|
4872
4873
|
/* cloud */
|
|
4873
4874
|
);
|
|
4874
4875
|
},
|
|
4875
|
-
children: /* @__PURE__ */ i(
|
|
4876
|
+
children: /* @__PURE__ */ i(Gc, {})
|
|
4876
4877
|
}
|
|
4877
4878
|
),
|
|
4878
4879
|
/* @__PURE__ */ i(
|
|
@@ -4892,7 +4893,7 @@ function ii(t) {
|
|
|
4892
4893
|
/* parallelogram */
|
|
4893
4894
|
);
|
|
4894
4895
|
},
|
|
4895
|
-
children: /* @__PURE__ */ i(
|
|
4896
|
+
children: /* @__PURE__ */ i(qc, {})
|
|
4896
4897
|
}
|
|
4897
4898
|
),
|
|
4898
4899
|
/* @__PURE__ */ i("div", { className: z.line }),
|
|
@@ -4901,7 +4902,7 @@ function ii(t) {
|
|
|
4901
4902
|
{
|
|
4902
4903
|
className: P(z.tool),
|
|
4903
4904
|
onClick: c,
|
|
4904
|
-
children: /* @__PURE__ */ i(
|
|
4905
|
+
children: /* @__PURE__ */ i(Bc, {})
|
|
4905
4906
|
}
|
|
4906
4907
|
),
|
|
4907
4908
|
/* @__PURE__ */ i(
|
|
@@ -4909,7 +4910,7 @@ function ii(t) {
|
|
|
4909
4910
|
{
|
|
4910
4911
|
className: P(z.tool),
|
|
4911
4912
|
onClick: d,
|
|
4912
|
-
children: /* @__PURE__ */ i(
|
|
4913
|
+
children: /* @__PURE__ */ i($c, {})
|
|
4913
4914
|
}
|
|
4914
4915
|
),
|
|
4915
4916
|
/* @__PURE__ */ i(
|
|
@@ -4917,21 +4918,21 @@ function ii(t) {
|
|
|
4917
4918
|
{
|
|
4918
4919
|
className: P(z.tool),
|
|
4919
4920
|
onClick: u,
|
|
4920
|
-
children: /* @__PURE__ */ i(
|
|
4921
|
+
children: /* @__PURE__ */ i(Vc, {})
|
|
4921
4922
|
}
|
|
4922
4923
|
)
|
|
4923
4924
|
] }),
|
|
4924
4925
|
/* @__PURE__ */ g("div", { className: z.optionsWrap, children: [
|
|
4925
4926
|
m === "pencil" && /* @__PURE__ */ i(
|
|
4926
|
-
|
|
4927
|
+
Yc,
|
|
4927
4928
|
{
|
|
4928
4929
|
setColorPen: e,
|
|
4929
4930
|
setThicknessPen: n
|
|
4930
4931
|
}
|
|
4931
4932
|
),
|
|
4932
|
-
m === "highlighter" && /* @__PURE__ */ i(
|
|
4933
|
+
m === "highlighter" && /* @__PURE__ */ i(Kc, { setColorHighlight: a }),
|
|
4933
4934
|
m === "shapes" && /* @__PURE__ */ i(
|
|
4934
|
-
|
|
4935
|
+
Zc,
|
|
4935
4936
|
{
|
|
4936
4937
|
changeBorderColorShape: o,
|
|
4937
4938
|
changeColorShape: l,
|
|
@@ -4945,7 +4946,7 @@ function ii(t) {
|
|
|
4945
4946
|
) });
|
|
4946
4947
|
}
|
|
4947
4948
|
let Rt = !1;
|
|
4948
|
-
const
|
|
4949
|
+
const Jc = ({ editor: t, upload: e }) => {
|
|
4949
4950
|
const [r, n] = S(!1), a = J(null), o = J(null), c = () => {
|
|
4950
4951
|
(async () => {
|
|
4951
4952
|
const v = document.querySelector("#easydrawer");
|
|
@@ -5077,7 +5078,7 @@ const Zc = ({ editor: t, upload: e }) => {
|
|
|
5077
5078
|
BOTTOM_LEFT: "bl",
|
|
5078
5079
|
BOTTOM_RIGHT: "br"
|
|
5079
5080
|
};
|
|
5080
|
-
function
|
|
5081
|
+
function Qc({ editor: t, node: e, updateAttributes: r, getPos: n, selected: a }) {
|
|
5081
5082
|
const [o, c] = S({
|
|
5082
5083
|
width: xt,
|
|
5083
5084
|
height: xt
|
|
@@ -5234,7 +5235,7 @@ const hr = de.extend({
|
|
|
5234
5235
|
button: ({ editor: e, t: r, extension: n }) => {
|
|
5235
5236
|
var a;
|
|
5236
5237
|
return {
|
|
5237
|
-
component:
|
|
5238
|
+
component: Jc,
|
|
5238
5239
|
componentProps: {
|
|
5239
5240
|
action: () => !0,
|
|
5240
5241
|
isActive: () => !1,
|
|
@@ -5282,7 +5283,7 @@ const hr = de.extend({
|
|
|
5282
5283
|
};
|
|
5283
5284
|
},
|
|
5284
5285
|
addNodeView() {
|
|
5285
|
-
return pt(
|
|
5286
|
+
return pt(Qc);
|
|
5286
5287
|
},
|
|
5287
5288
|
// @ts-ignore
|
|
5288
5289
|
addCommands() {
|
|
@@ -5335,7 +5336,7 @@ const hr = de.extend({
|
|
|
5335
5336
|
}
|
|
5336
5337
|
});
|
|
5337
5338
|
let Ot = !1;
|
|
5338
|
-
function
|
|
5339
|
+
function ts({ editor: t, attrs: e, extension: r }) {
|
|
5339
5340
|
const [n, a] = S(!1), o = J(null), c = J(null), { alt: l, align: s } = e, h = r == null ? void 0 : r.options.upload, d = () => {
|
|
5340
5341
|
(async () => {
|
|
5341
5342
|
const L = document.querySelector("#easydrawer");
|
|
@@ -5474,13 +5475,13 @@ function ni(t, e) {
|
|
|
5474
5475
|
};
|
|
5475
5476
|
}, [t, e]), r;
|
|
5476
5477
|
}
|
|
5477
|
-
const
|
|
5478
|
+
const es = {
|
|
5478
5479
|
maxWidth: "auto",
|
|
5479
5480
|
zIndex: 20,
|
|
5480
5481
|
appendTo: "parent",
|
|
5481
5482
|
moveTransition: "transform 0.1s ease-out"
|
|
5482
5483
|
};
|
|
5483
|
-
function
|
|
5484
|
+
function rs({ item: t, disabled: e, editor: r }) {
|
|
5484
5485
|
var a;
|
|
5485
5486
|
const n = t.component;
|
|
5486
5487
|
return n ? /* @__PURE__ */ i(Pe, { children: t.type === "divider" ? /* @__PURE__ */ i(
|
|
@@ -5498,26 +5499,26 @@ function es({ item: t, disabled: e, editor: r }) {
|
|
|
5498
5499
|
}
|
|
5499
5500
|
) }) : /* @__PURE__ */ i(V, {});
|
|
5500
5501
|
}
|
|
5501
|
-
function
|
|
5502
|
+
function is(t) {
|
|
5502
5503
|
return t.type.name === "drawer";
|
|
5503
5504
|
}
|
|
5504
|
-
function
|
|
5505
|
+
function ns(t) {
|
|
5505
5506
|
const { lang: e } = q(), r = zt(t.editor, hr.name), n = ni(t.editor, hr.name), a = ({ editor: c }) => {
|
|
5506
5507
|
const { selection: l } = c.view.state, { $from: s, to: h } = l;
|
|
5507
5508
|
let d = !1;
|
|
5508
5509
|
return c.view.state.doc.nodesBetween(s.pos, h, (u) => {
|
|
5509
|
-
if (
|
|
5510
|
+
if (is(u))
|
|
5510
5511
|
return d = !0, !1;
|
|
5511
5512
|
}), d;
|
|
5512
|
-
}, o = U(() => t.disabled ? [] :
|
|
5513
|
+
}, o = U(() => t.disabled ? [] : Is(t.editor), [t.disabled, t.editor, e]);
|
|
5513
5514
|
return /* @__PURE__ */ i(V, { children: /* @__PURE__ */ i(
|
|
5514
5515
|
tt,
|
|
5515
5516
|
{
|
|
5516
5517
|
editor: t == null ? void 0 : t.editor,
|
|
5517
5518
|
shouldShow: a,
|
|
5518
|
-
tippyOptions:
|
|
5519
|
+
tippyOptions: es,
|
|
5519
5520
|
children: o != null && o.length ? /* @__PURE__ */ i("div", { className: "richtext-pointer-events-auto richtext-w-auto richtext-select-none richtext-rounded-sm !richtext-border richtext-border-neutral-200 richtext-bg-background richtext-px-3 richtext-py-2 richtext-shadow-sm richtext-transition-all dark:richtext-border-neutral-800", children: /* @__PURE__ */ i("div", { className: "richtext-relative richtext-flex richtext-h-[26px] richtext-flex-nowrap richtext-items-center richtext-justify-start richtext-whitespace-nowrap", children: o == null ? void 0 : o.map((c, l) => c.type === "edit" && (r != null && r.src) ? /* @__PURE__ */ i(
|
|
5520
|
-
|
|
5521
|
+
ts,
|
|
5521
5522
|
{
|
|
5522
5523
|
attrs: r,
|
|
5523
5524
|
editor: t.editor,
|
|
@@ -5525,7 +5526,7 @@ function is(t) {
|
|
|
5525
5526
|
},
|
|
5526
5527
|
`bubbleMenu-drawer-${l}`
|
|
5527
5528
|
) : /* @__PURE__ */ i(
|
|
5528
|
-
|
|
5529
|
+
rs,
|
|
5529
5530
|
{
|
|
5530
5531
|
disabled: t.disabled,
|
|
5531
5532
|
editor: t.editor,
|
|
@@ -5536,7 +5537,7 @@ function is(t) {
|
|
|
5536
5537
|
}
|
|
5537
5538
|
) });
|
|
5538
5539
|
}
|
|
5539
|
-
const
|
|
5540
|
+
const os = { padding: "0 12px 12px" }, oi = ({ width: t, maxWidth: e, height: r, onOk: n, children: a }) => {
|
|
5540
5541
|
const { t: o } = q(), [c, l] = S({
|
|
5541
5542
|
width: "",
|
|
5542
5543
|
height: "",
|
|
@@ -5554,7 +5555,7 @@ const ns = { padding: "0 12px 12px" }, oi = ({ width: t, maxWidth: e, height: r,
|
|
|
5554
5555
|
}
|
|
5555
5556
|
return /* @__PURE__ */ g(It, { modal: !0, children: [
|
|
5556
5557
|
/* @__PURE__ */ i(Et, { asChild: !0, children: a }),
|
|
5557
|
-
/* @__PURE__ */ i(Tt, { children: /* @__PURE__ */ i("div", { style:
|
|
5558
|
+
/* @__PURE__ */ i(Tt, { children: /* @__PURE__ */ i("div", { style: os, children: /* @__PURE__ */ g("form", { className: "richtext-flex richtext-flex-col richtext-gap-2", onSubmit: s, children: [
|
|
5558
5559
|
/* @__PURE__ */ i(ct, { className: "mb-[6px]", children: "Width" }),
|
|
5559
5560
|
/* @__PURE__ */ i("div", { className: "richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5", children: /* @__PURE__ */ i("div", { className: "richtext-relative richtext-items-center richtext-w-full richtext-max-w-sm", children: /* @__PURE__ */ i(
|
|
5560
5561
|
Q,
|
|
@@ -5589,7 +5590,7 @@ const ns = { padding: "0 12px 12px" }, oi = ({ width: t, maxWidth: e, height: r,
|
|
|
5589
5590
|
] }) }) })
|
|
5590
5591
|
] });
|
|
5591
5592
|
}, vt = /* @__PURE__ */ new Map();
|
|
5592
|
-
function
|
|
5593
|
+
function as(t) {
|
|
5593
5594
|
const e = t.options.element;
|
|
5594
5595
|
vt.has("width") || vt.set("width", e.clientWidth), vt.has("width") && vt.get("width") <= 0 && vt.set("width", e.clientWidth);
|
|
5595
5596
|
const r = { attributes: !0, childList: !0, subtree: !0 }, n = function() {
|
|
@@ -5599,8 +5600,8 @@ function os(t) {
|
|
|
5599
5600
|
a.disconnect();
|
|
5600
5601
|
}), { width: vt.get("width") };
|
|
5601
5602
|
}
|
|
5602
|
-
function
|
|
5603
|
-
const { t: e } = q(), { width: r } =
|
|
5603
|
+
function cs({ editor: t }) {
|
|
5604
|
+
const { t: e } = q(), { width: r } = as(t), n = zt(t, St.name, {
|
|
5604
5605
|
defaultShowPicker: !1,
|
|
5605
5606
|
createUser: "",
|
|
5606
5607
|
width: 0,
|
|
@@ -5611,7 +5612,7 @@ function as({ editor: t }) {
|
|
|
5611
5612
|
},
|
|
5612
5613
|
[t]
|
|
5613
5614
|
), h = H(() => {
|
|
5614
|
-
|
|
5615
|
+
Qa(n);
|
|
5615
5616
|
}, [t, n]), d = H(() => t.isActive(St.name), [t]), u = H(() => Gt(St.name, t), [t]);
|
|
5616
5617
|
return B(() => {
|
|
5617
5618
|
a && (h(), t.chain().updateAttributes(St.name, { defaultShowPicker: !1 }).focus().run());
|
|
@@ -5661,7 +5662,7 @@ function as({ editor: t }) {
|
|
|
5661
5662
|
}
|
|
5662
5663
|
);
|
|
5663
5664
|
}
|
|
5664
|
-
function
|
|
5665
|
+
function ss({ editor: t }) {
|
|
5665
5666
|
const { t: e } = q(), { width: r, height: n, url: a } = zt(t, kt.name, {
|
|
5666
5667
|
width: 0,
|
|
5667
5668
|
height: 0,
|
|
@@ -5770,7 +5771,7 @@ function cs({ editor: t }) {
|
|
|
5770
5771
|
)
|
|
5771
5772
|
] });
|
|
5772
5773
|
}
|
|
5773
|
-
function
|
|
5774
|
+
function ls({ editor: t, ...e }) {
|
|
5774
5775
|
const r = zt(t, Mt.name, {
|
|
5775
5776
|
text: "",
|
|
5776
5777
|
defaultShowPicker: !1
|
|
@@ -5835,7 +5836,7 @@ function ss({ editor: t, ...e }) {
|
|
|
5835
5836
|
);
|
|
5836
5837
|
}
|
|
5837
5838
|
const ur = `graph TB
|
|
5838
|
-
a-->b`,
|
|
5839
|
+
a-->b`, ds = ({ editor: t, attrs: e, extension: r }) => {
|
|
5839
5840
|
const { alt: n, align: a } = e, [o, c] = S(decodeURIComponent(n ?? ur)), [l, s] = S(""), [h, d] = S(!1), u = J(null), m = r == null ? void 0 : r.options.upload, x = async (f) => {
|
|
5840
5841
|
try {
|
|
5841
5842
|
const { svg: I } = await ce.render("mermaid-svg", f);
|
|
@@ -5933,13 +5934,13 @@ a-->b`, ls = ({ editor: t, attrs: e, extension: r }) => {
|
|
|
5933
5934
|
]
|
|
5934
5935
|
}
|
|
5935
5936
|
);
|
|
5936
|
-
},
|
|
5937
|
+
}, hs = {
|
|
5937
5938
|
maxWidth: "auto",
|
|
5938
5939
|
zIndex: 20,
|
|
5939
5940
|
appendTo: "parent",
|
|
5940
5941
|
moveTransition: "transform 0.1s ease-out"
|
|
5941
5942
|
};
|
|
5942
|
-
function
|
|
5943
|
+
function us({ item: t, disabled: e, editor: r }) {
|
|
5943
5944
|
var a;
|
|
5944
5945
|
const n = t.component;
|
|
5945
5946
|
return n ? /* @__PURE__ */ i(Pe, { children: t.type === "divider" ? /* @__PURE__ */ i(
|
|
@@ -5957,26 +5958,26 @@ function hs({ item: t, disabled: e, editor: r }) {
|
|
|
5957
5958
|
}
|
|
5958
5959
|
) }) : /* @__PURE__ */ i(V, {});
|
|
5959
5960
|
}
|
|
5960
|
-
function
|
|
5961
|
+
function ms(t) {
|
|
5961
5962
|
return t.type.name === "mermaid";
|
|
5962
5963
|
}
|
|
5963
|
-
function
|
|
5964
|
+
function xs(t) {
|
|
5964
5965
|
const { lang: e } = q(), r = zt(t.editor, sr.name), n = ni(t.editor, sr.name), a = ({ editor: c }) => {
|
|
5965
5966
|
const { selection: l } = c.view.state, { $from: s, to: h } = l;
|
|
5966
5967
|
let d = !1;
|
|
5967
5968
|
return c.view.state.doc.nodesBetween(s.pos, h, (u) => {
|
|
5968
|
-
if (
|
|
5969
|
+
if (ms(u))
|
|
5969
5970
|
return d = !0, !1;
|
|
5970
5971
|
}), d;
|
|
5971
|
-
}, o = U(() => t.disabled ? [] :
|
|
5972
|
+
}, o = U(() => t.disabled ? [] : Ls(t.editor), [t.disabled, t.editor, e]);
|
|
5972
5973
|
return /* @__PURE__ */ i(V, { children: /* @__PURE__ */ i(
|
|
5973
5974
|
tt,
|
|
5974
5975
|
{
|
|
5975
5976
|
editor: t == null ? void 0 : t.editor,
|
|
5976
5977
|
shouldShow: a,
|
|
5977
|
-
tippyOptions:
|
|
5978
|
+
tippyOptions: hs,
|
|
5978
5979
|
children: o != null && o.length ? /* @__PURE__ */ i("div", { className: "richtext-pointer-events-auto richtext-w-auto richtext-select-none richtext-rounded-sm !richtext-border richtext-border-neutral-200 richtext-bg-background richtext-px-3 richtext-py-2 richtext-shadow-sm richtext-transition-all dark:richtext-border-neutral-800", children: /* @__PURE__ */ i("div", { className: "richtext-relative richtext-flex richtext-h-[26px] richtext-flex-nowrap richtext-items-center richtext-justify-start richtext-whitespace-nowrap", children: o == null ? void 0 : o.map((c, l) => c.type === "edit" && (r != null && r.src) ? /* @__PURE__ */ i(
|
|
5979
|
-
|
|
5980
|
+
ds,
|
|
5980
5981
|
{
|
|
5981
5982
|
attrs: r,
|
|
5982
5983
|
editor: t.editor,
|
|
@@ -5984,7 +5985,7 @@ function ms(t) {
|
|
|
5984
5985
|
},
|
|
5985
5986
|
`bubbleMenu-mermaid-${l}`
|
|
5986
5987
|
) : /* @__PURE__ */ i(
|
|
5987
|
-
|
|
5988
|
+
us,
|
|
5988
5989
|
{
|
|
5989
5990
|
disabled: t.disabled,
|
|
5990
5991
|
editor: t.editor,
|
|
@@ -5995,7 +5996,7 @@ function ms(t) {
|
|
|
5995
5996
|
}
|
|
5996
5997
|
) });
|
|
5997
5998
|
}
|
|
5998
|
-
function
|
|
5999
|
+
function fs({ editor: t, disabled: e }) {
|
|
5999
6000
|
const [r, n] = S(!1), { t: a } = q(), o = H(({ editor: s }) => s.isActive(Ie.name), []), c = (s) => {
|
|
6000
6001
|
t.commands.updateTweet({ src: s }), n(!1);
|
|
6001
6002
|
}, l = H(() => Gt(Ie.name, t), [t]);
|
|
@@ -6046,19 +6047,19 @@ function xs({ editor: t, disabled: e }) {
|
|
|
6046
6047
|
}
|
|
6047
6048
|
) });
|
|
6048
6049
|
}
|
|
6049
|
-
function
|
|
6050
|
+
function gs({ editor: t, disabled: e, bubbleMenu: r }) {
|
|
6050
6051
|
const n = t.extensionManager.extensions.map((o) => o.name), a = () => {
|
|
6051
6052
|
var o, c, l, s, h, d, u, m, x, w, p, f, I, T, v;
|
|
6052
6053
|
return [
|
|
6053
6054
|
n.includes("columns") && !((o = r == null ? void 0 : r.columnConfig) != null && o.hidden) ? /* @__PURE__ */ i(
|
|
6054
|
-
|
|
6055
|
+
Ks,
|
|
6055
6056
|
{
|
|
6056
6057
|
editor: t
|
|
6057
6058
|
},
|
|
6058
6059
|
"columns"
|
|
6059
6060
|
) : null,
|
|
6060
6061
|
n.includes("table") && !((c = r == null ? void 0 : r.tableConfig) != null && c.hidden) ? /* @__PURE__ */ i(
|
|
6061
|
-
|
|
6062
|
+
Vs,
|
|
6062
6063
|
{
|
|
6063
6064
|
editor: t,
|
|
6064
6065
|
actions: (l = r == null ? void 0 : r.tableConfig) == null ? void 0 : l.actions
|
|
@@ -6066,7 +6067,7 @@ function fs({ editor: t, disabled: e, bubbleMenu: r }) {
|
|
|
6066
6067
|
"table"
|
|
6067
6068
|
) : null,
|
|
6068
6069
|
n.includes("link") && !((s = r == null ? void 0 : r.linkConfig) != null && s.hidden) ? /* @__PURE__ */ i(
|
|
6069
|
-
|
|
6070
|
+
Fs,
|
|
6070
6071
|
{
|
|
6071
6072
|
disabled: e,
|
|
6072
6073
|
editor: t
|
|
@@ -6074,7 +6075,7 @@ function fs({ editor: t, disabled: e, bubbleMenu: r }) {
|
|
|
6074
6075
|
"link"
|
|
6075
6076
|
) : null,
|
|
6076
6077
|
n.includes(Vt.name) && !((h = r == null ? void 0 : r.imageConfig) != null && h.hidden) ? /* @__PURE__ */ i(
|
|
6077
|
-
|
|
6078
|
+
js,
|
|
6078
6079
|
{
|
|
6079
6080
|
disabled: e,
|
|
6080
6081
|
editor: t
|
|
@@ -6082,7 +6083,7 @@ function fs({ editor: t, disabled: e, bubbleMenu: r }) {
|
|
|
6082
6083
|
"image"
|
|
6083
6084
|
) : null,
|
|
6084
6085
|
n.includes(ei.name) && !((d = r == null ? void 0 : r.imageGifConfig) != null && d.hidden) ? /* @__PURE__ */ i(
|
|
6085
|
-
|
|
6086
|
+
Xs,
|
|
6086
6087
|
{
|
|
6087
6088
|
disabled: e,
|
|
6088
6089
|
editor: t
|
|
@@ -6090,7 +6091,7 @@ function fs({ editor: t, disabled: e, bubbleMenu: r }) {
|
|
|
6090
6091
|
"imageGif"
|
|
6091
6092
|
) : null,
|
|
6092
6093
|
n.includes("video") && !((u = r == null ? void 0 : r.videoConfig) != null && u.hidden) ? /* @__PURE__ */ i(
|
|
6093
|
-
|
|
6094
|
+
Ys,
|
|
6094
6095
|
{
|
|
6095
6096
|
disabled: e,
|
|
6096
6097
|
editor: t
|
|
@@ -6098,7 +6099,7 @@ function fs({ editor: t, disabled: e, bubbleMenu: r }) {
|
|
|
6098
6099
|
"video"
|
|
6099
6100
|
) : null,
|
|
6100
6101
|
n.includes("katex") && !((m = r == null ? void 0 : r.katexConfig) != null && m.hidden) ? /* @__PURE__ */ i(
|
|
6101
|
-
|
|
6102
|
+
ls,
|
|
6102
6103
|
{
|
|
6103
6104
|
disabled: e,
|
|
6104
6105
|
editor: t
|
|
@@ -6106,7 +6107,7 @@ function fs({ editor: t, disabled: e, bubbleMenu: r }) {
|
|
|
6106
6107
|
"katex"
|
|
6107
6108
|
) : null,
|
|
6108
6109
|
n.includes("excalidraw") && !((x = r == null ? void 0 : r.excalidrawConfig) != null && x.hidden) ? /* @__PURE__ */ i(
|
|
6109
|
-
|
|
6110
|
+
cs,
|
|
6110
6111
|
{
|
|
6111
6112
|
disabled: e,
|
|
6112
6113
|
editor: t
|
|
@@ -6114,7 +6115,7 @@ function fs({ editor: t, disabled: e, bubbleMenu: r }) {
|
|
|
6114
6115
|
"excalidraw"
|
|
6115
6116
|
) : null,
|
|
6116
6117
|
n.includes("mermaid") && !((w = r == null ? void 0 : r.mermaidConfig) != null && w.hidden) ? /* @__PURE__ */ i(
|
|
6117
|
-
|
|
6118
|
+
xs,
|
|
6118
6119
|
{
|
|
6119
6120
|
disabled: e,
|
|
6120
6121
|
editor: t
|
|
@@ -6122,7 +6123,7 @@ function fs({ editor: t, disabled: e, bubbleMenu: r }) {
|
|
|
6122
6123
|
"mermaid"
|
|
6123
6124
|
) : null,
|
|
6124
6125
|
n.includes("iframe") && !((p = r == null ? void 0 : r.iframeConfig) != null && p.hidden) ? /* @__PURE__ */ i(
|
|
6125
|
-
|
|
6126
|
+
ss,
|
|
6126
6127
|
{
|
|
6127
6128
|
disabled: e,
|
|
6128
6129
|
editor: t
|
|
@@ -6130,7 +6131,7 @@ function fs({ editor: t, disabled: e, bubbleMenu: r }) {
|
|
|
6130
6131
|
"iframe"
|
|
6131
6132
|
) : null,
|
|
6132
6133
|
n.includes("twitter") && !((f = r == null ? void 0 : r.twitterConfig) != null && f.hidden) ? /* @__PURE__ */ i(
|
|
6133
|
-
|
|
6134
|
+
fs,
|
|
6134
6135
|
{
|
|
6135
6136
|
disabled: e,
|
|
6136
6137
|
editor: t
|
|
@@ -6138,7 +6139,7 @@ function fs({ editor: t, disabled: e, bubbleMenu: r }) {
|
|
|
6138
6139
|
"twitter"
|
|
6139
6140
|
) : null,
|
|
6140
6141
|
(I = r == null ? void 0 : r.floatingMenuConfig) != null && I.hidden ? null : /* @__PURE__ */ i(
|
|
6141
|
-
|
|
6142
|
+
Ds,
|
|
6142
6143
|
{
|
|
6143
6144
|
disabled: e,
|
|
6144
6145
|
editor: t
|
|
@@ -6146,7 +6147,7 @@ function fs({ editor: t, disabled: e, bubbleMenu: r }) {
|
|
|
6146
6147
|
"content"
|
|
6147
6148
|
),
|
|
6148
6149
|
(T = r == null ? void 0 : r.textConfig) != null && T.hidden ? null : /* @__PURE__ */ i(
|
|
6149
|
-
|
|
6150
|
+
$s,
|
|
6150
6151
|
{
|
|
6151
6152
|
disabled: e,
|
|
6152
6153
|
editor: t
|
|
@@ -6154,7 +6155,7 @@ function fs({ editor: t, disabled: e, bubbleMenu: r }) {
|
|
|
6154
6155
|
"text"
|
|
6155
6156
|
),
|
|
6156
6157
|
n.includes("drawer") && !((v = r == null ? void 0 : r.drawerConfig) != null && v.hidden) ? /* @__PURE__ */ i(
|
|
6157
|
-
|
|
6158
|
+
ns,
|
|
6158
6159
|
{
|
|
6159
6160
|
disabled: e,
|
|
6160
6161
|
editor: t
|
|
@@ -6168,7 +6169,7 @@ function fs({ editor: t, disabled: e, bubbleMenu: r }) {
|
|
|
6168
6169
|
function mr() {
|
|
6169
6170
|
return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ i("path", { fill: "currentColor", d: "M18 14c0-4-6-10.8-6-10.8s-1.33 1.51-2.73 3.52l8.59 8.59c.09-.42.14-.86.14-1.31m-.88 3.12L12.5 12.5L5.27 5.27L4 6.55l3.32 3.32C6.55 11.32 6 12.79 6 14c0 3.31 2.69 6 6 6c1.52 0 2.9-.57 3.96-1.5l2.63 2.63l1.27-1.27z" }) });
|
|
6170
6171
|
}
|
|
6171
|
-
function
|
|
6172
|
+
function ps(t) {
|
|
6172
6173
|
const { t: e } = q(), {
|
|
6173
6174
|
highlight: r = !1,
|
|
6174
6175
|
disabled: n = !1,
|
|
@@ -6309,13 +6310,13 @@ function gs(t) {
|
|
|
6309
6310
|
`sub-color-recent-${w}`
|
|
6310
6311
|
)) })
|
|
6311
6312
|
] }),
|
|
6312
|
-
/* @__PURE__ */ i(
|
|
6313
|
+
/* @__PURE__ */ i(ws, { setColor: m })
|
|
6313
6314
|
] })
|
|
6314
6315
|
}
|
|
6315
6316
|
)
|
|
6316
6317
|
] });
|
|
6317
6318
|
}
|
|
6318
|
-
function
|
|
6319
|
+
function ws({ setColor: t }) {
|
|
6319
6320
|
const [e, r] = S("#000000"), [n, a] = S(!1), { t: o } = q();
|
|
6320
6321
|
return B(() => () => {
|
|
6321
6322
|
a(!1);
|
|
@@ -6336,7 +6337,7 @@ function ps({ setColor: t }) {
|
|
|
6336
6337
|
/* @__PURE__ */ g(Tt, { children: [
|
|
6337
6338
|
/* @__PURE__ */ g("div", { className: "richtext-flex richtext-flex-col richtext-items-center richtext-justify-center", children: [
|
|
6338
6339
|
/* @__PURE__ */ i(
|
|
6339
|
-
|
|
6340
|
+
mo,
|
|
6340
6341
|
{
|
|
6341
6342
|
color: e,
|
|
6342
6343
|
onChange: r
|
|
@@ -6368,7 +6369,7 @@ function ps({ setColor: t }) {
|
|
|
6368
6369
|
] })
|
|
6369
6370
|
] });
|
|
6370
6371
|
}
|
|
6371
|
-
function
|
|
6372
|
+
function vs({ editor: t, disabled: e, toolbar: r }) {
|
|
6372
6373
|
const { t: n, lang: a } = q(), o = U(() => {
|
|
6373
6374
|
const h = [...t.extensionManager.extensions].sort((u, m) => {
|
|
6374
6375
|
const x = u.options.sort ?? -1, w = m.options.sort ?? -1;
|
|
@@ -6382,7 +6383,7 @@ function ws({ editor: t, disabled: e, toolbar: r }) {
|
|
|
6382
6383
|
spacer: w = !1,
|
|
6383
6384
|
toolbar: p = !0
|
|
6384
6385
|
} = u.options;
|
|
6385
|
-
if (!m || !
|
|
6386
|
+
if (!m || !To(m) || !p)
|
|
6386
6387
|
continue;
|
|
6387
6388
|
const f = m({
|
|
6388
6389
|
editor: t,
|
|
@@ -6436,7 +6437,7 @@ function ws({ editor: t, disabled: e, toolbar: r }) {
|
|
|
6436
6437
|
});
|
|
6437
6438
|
return r && (r != null && r.render) ? r.render({ editor: t, disabled: e || !1 }, o, l, c) : c(l);
|
|
6438
6439
|
}
|
|
6439
|
-
function
|
|
6440
|
+
function bs(t) {
|
|
6440
6441
|
const e = ["size-small", "size-medium", "size-large"], r = [
|
|
6441
6442
|
"SizeS",
|
|
6442
6443
|
"SizeM",
|
|
@@ -6453,7 +6454,7 @@ function vs(t) {
|
|
|
6453
6454
|
}
|
|
6454
6455
|
}));
|
|
6455
6456
|
}
|
|
6456
|
-
function
|
|
6457
|
+
function ys(t) {
|
|
6457
6458
|
const e = ["size-small", "size-medium", "size-large"], r = [
|
|
6458
6459
|
"SizeS",
|
|
6459
6460
|
"SizeM",
|
|
@@ -6470,7 +6471,7 @@ function bs(t) {
|
|
|
6470
6471
|
}
|
|
6471
6472
|
}));
|
|
6472
6473
|
}
|
|
6473
|
-
function
|
|
6474
|
+
function Cs(t) {
|
|
6474
6475
|
const e = ["left", "center", "right"], r = {
|
|
6475
6476
|
left: "AlignLeft",
|
|
6476
6477
|
center: "AlignCenter",
|
|
@@ -6491,7 +6492,7 @@ function ys(t) {
|
|
|
6491
6492
|
}
|
|
6492
6493
|
}));
|
|
6493
6494
|
}
|
|
6494
|
-
function
|
|
6495
|
+
function Ts(t) {
|
|
6495
6496
|
const e = ["left", "center", "right"], r = {
|
|
6496
6497
|
left: "AlignLeft",
|
|
6497
6498
|
center: "AlignCenter",
|
|
@@ -6512,7 +6513,7 @@ function Cs(t) {
|
|
|
6512
6513
|
}
|
|
6513
6514
|
}));
|
|
6514
6515
|
}
|
|
6515
|
-
function
|
|
6516
|
+
function Ns(t) {
|
|
6516
6517
|
const e = ["left", "center", "right"], r = {
|
|
6517
6518
|
left: "AlignLeft",
|
|
6518
6519
|
center: "AlignCenter",
|
|
@@ -6533,7 +6534,7 @@ function Ts(t) {
|
|
|
6533
6534
|
}
|
|
6534
6535
|
}));
|
|
6535
6536
|
}
|
|
6536
|
-
function
|
|
6537
|
+
function ks(t) {
|
|
6537
6538
|
const e = ["left", "center", "right"], r = {
|
|
6538
6539
|
left: "AlignLeft",
|
|
6539
6540
|
center: "AlignCenter",
|
|
@@ -6554,7 +6555,7 @@ function Ns(t) {
|
|
|
6554
6555
|
}
|
|
6555
6556
|
}));
|
|
6556
6557
|
}
|
|
6557
|
-
function
|
|
6558
|
+
function Ss(t) {
|
|
6558
6559
|
const e = ["size-small", "size-medium", "size-large"], r = [
|
|
6559
6560
|
"SizeS",
|
|
6560
6561
|
"SizeM",
|
|
@@ -6571,7 +6572,7 @@ function ks(t) {
|
|
|
6571
6572
|
}
|
|
6572
6573
|
}));
|
|
6573
6574
|
}
|
|
6574
|
-
function
|
|
6575
|
+
function Ms(t) {
|
|
6575
6576
|
return [
|
|
6576
6577
|
{
|
|
6577
6578
|
type: "flipX",
|
|
@@ -6603,8 +6604,8 @@ function Ss(t) {
|
|
|
6603
6604
|
}
|
|
6604
6605
|
}
|
|
6605
6606
|
},
|
|
6606
|
-
...
|
|
6607
|
-
...
|
|
6607
|
+
...bs(t),
|
|
6608
|
+
...Cs(t),
|
|
6608
6609
|
{
|
|
6609
6610
|
type: "remove",
|
|
6610
6611
|
component: O,
|
|
@@ -6620,10 +6621,10 @@ function Ss(t) {
|
|
|
6620
6621
|
}
|
|
6621
6622
|
];
|
|
6622
6623
|
}
|
|
6623
|
-
function
|
|
6624
|
+
function As(t) {
|
|
6624
6625
|
return [
|
|
6625
|
-
...
|
|
6626
|
-
...
|
|
6626
|
+
...ys(t),
|
|
6627
|
+
...Ts(t),
|
|
6627
6628
|
{
|
|
6628
6629
|
type: "remove",
|
|
6629
6630
|
component: O,
|
|
@@ -6639,9 +6640,9 @@ function Ms(t) {
|
|
|
6639
6640
|
}
|
|
6640
6641
|
];
|
|
6641
6642
|
}
|
|
6642
|
-
function
|
|
6643
|
+
function Ls(t) {
|
|
6643
6644
|
return [
|
|
6644
|
-
...
|
|
6645
|
+
...Ns(t),
|
|
6645
6646
|
{
|
|
6646
6647
|
type: "edit",
|
|
6647
6648
|
component: O,
|
|
@@ -6667,9 +6668,9 @@ function As(t) {
|
|
|
6667
6668
|
}
|
|
6668
6669
|
];
|
|
6669
6670
|
}
|
|
6670
|
-
function
|
|
6671
|
+
function Is(t) {
|
|
6671
6672
|
return [
|
|
6672
|
-
...
|
|
6673
|
+
...ks(t),
|
|
6673
6674
|
{
|
|
6674
6675
|
type: "edit",
|
|
6675
6676
|
component: O,
|
|
@@ -6695,9 +6696,9 @@ function Ls(t) {
|
|
|
6695
6696
|
}
|
|
6696
6697
|
];
|
|
6697
6698
|
}
|
|
6698
|
-
function
|
|
6699
|
+
function Es(t) {
|
|
6699
6700
|
return [
|
|
6700
|
-
...
|
|
6701
|
+
...Ss(t),
|
|
6701
6702
|
{
|
|
6702
6703
|
type: "remove",
|
|
6703
6704
|
component: O,
|
|
@@ -6713,7 +6714,7 @@ function Is(t) {
|
|
|
6713
6714
|
}
|
|
6714
6715
|
];
|
|
6715
6716
|
}
|
|
6716
|
-
function
|
|
6717
|
+
function zs(t, e) {
|
|
6717
6718
|
return Li.reduce((r, n) => {
|
|
6718
6719
|
if (n === "divider" && r.length > 0)
|
|
6719
6720
|
return [...r, {
|
|
@@ -6808,7 +6809,7 @@ class at extends Vi {
|
|
|
6808
6809
|
return new Ge(this.anchor, this.head);
|
|
6809
6810
|
}
|
|
6810
6811
|
}
|
|
6811
|
-
function
|
|
6812
|
+
function Ps(t) {
|
|
6812
6813
|
const e = t.cloneNode(!0), r = [t, ...Array.from(t.getElementsByTagName("*"))], n = [e, ...Array.from(e.getElementsByTagName("*"))];
|
|
6813
6814
|
return r.forEach((a, o) => {
|
|
6814
6815
|
n[o].style.cssText = function(c) {
|
|
@@ -6823,7 +6824,7 @@ function zs(t) {
|
|
|
6823
6824
|
function Qt(t, e) {
|
|
6824
6825
|
return window.getComputedStyle(t)[e];
|
|
6825
6826
|
}
|
|
6826
|
-
function
|
|
6827
|
+
function Rs(t = 0, e = 0, r = 0) {
|
|
6827
6828
|
return Math.min(Math.max(t, e), r);
|
|
6828
6829
|
}
|
|
6829
6830
|
function xr(t) {
|
|
@@ -6849,13 +6850,13 @@ function ai(t) {
|
|
|
6849
6850
|
pos: l !== null ? l : null
|
|
6850
6851
|
};
|
|
6851
6852
|
}
|
|
6852
|
-
function
|
|
6853
|
+
function Os(t, e) {
|
|
6853
6854
|
const { doc: r } = e.view.state, n = ai({ editor: e, x: t.clientX, y: t.clientY, direction: "right" });
|
|
6854
6855
|
if (!n.resultNode || n.pos === null) return [];
|
|
6855
6856
|
const a = t.clientX, o = function(d, u, m) {
|
|
6856
6857
|
const x = Number.parseInt(Qt(d.dom, "paddingLeft"), 10), w = Number.parseInt(Qt(d.dom, "paddingRight"), 10), p = Number.parseInt(Qt(d.dom, "borderLeftWidth"), 10), f = Number.parseInt(Qt(d.dom, "borderLeftWidth"), 10), I = d.dom.getBoundingClientRect();
|
|
6857
6858
|
return {
|
|
6858
|
-
left:
|
|
6859
|
+
left: Rs(
|
|
6859
6860
|
u,
|
|
6860
6861
|
I.left + x + p,
|
|
6861
6862
|
I.right - w - f
|
|
@@ -6888,7 +6889,7 @@ function pr(t, e) {
|
|
|
6888
6889
|
return r;
|
|
6889
6890
|
}
|
|
6890
6891
|
const ci = new He("dragHandle");
|
|
6891
|
-
function
|
|
6892
|
+
function Hs({
|
|
6892
6893
|
pluginKey: t = ci,
|
|
6893
6894
|
element: e,
|
|
6894
6895
|
editor: r,
|
|
@@ -6900,11 +6901,11 @@ function Os({
|
|
|
6900
6901
|
return e.addEventListener("dragstart", (d) => {
|
|
6901
6902
|
const { view: u } = r;
|
|
6902
6903
|
if (!d.dataTransfer) return;
|
|
6903
|
-
const { empty: m, $from: x, $to: w } = u.state.selection, p =
|
|
6904
|
+
const { empty: m, $from: x, $to: w } = u.state.selection, p = Os(d, r), f = Ue(x, w, 0), I = f.some((E) => p.find((b) => b.$from === E.$from && b.$to === E.$to)), T = m || !I ? p : f;
|
|
6904
6905
|
if (T.length === 0) return;
|
|
6905
6906
|
const { tr: v } = u.state, y = document.createElement("div"), C = T[0].$from.pos, M = T[T.length - 1].$to.pos, L = at.create(u.state.doc, C, M), N = L.content();
|
|
6906
6907
|
T.forEach((E) => {
|
|
6907
|
-
const b =
|
|
6908
|
+
const b = Ps(u.nodeDOM(E.$from.pos));
|
|
6908
6909
|
y.append(b);
|
|
6909
6910
|
}), y.style.position = "absolute", y.style.top = "-10000px", document.body.append(y), d.dataTransfer.clearData(), d.dataTransfer.setDragImage(y, 0, 0), u.dragging = { slice: N, move: !0 }, v.setSelection(L), u.dispatch(v), document.addEventListener("drop", () => xr(y), { once: !0 }), setTimeout(() => {
|
|
6910
6911
|
e && (e.style.pointerEvents = "none");
|
|
@@ -6927,7 +6928,7 @@ function Os({
|
|
|
6927
6928
|
}
|
|
6928
6929
|
},
|
|
6929
6930
|
view: (d) => {
|
|
6930
|
-
return u(), m(r.view.dom), c =
|
|
6931
|
+
return u(), m(r.view.dom), c = ho(d.dom, {
|
|
6931
6932
|
...x(),
|
|
6932
6933
|
...n
|
|
6933
6934
|
}), {
|
|
@@ -7057,11 +7058,11 @@ function Os({
|
|
|
7057
7058
|
}
|
|
7058
7059
|
});
|
|
7059
7060
|
}
|
|
7060
|
-
function
|
|
7061
|
+
function Ds(t) {
|
|
7061
7062
|
var N, E, b;
|
|
7062
7063
|
const { pluginKey: e = ci } = t, { t: r } = q(), [n, a] = S(null), [o, c] = S(-1), l = J(null), s = J(null), [h, d] = S(!1), u = t.editor.extensionManager.extensions.some((k) => k.name === "textAlign"), m = t.editor.extensionManager.extensions.some((k) => k.name === "indent"), x = t.editor.extensionManager.extensions.some((k) => k.name === "clear");
|
|
7063
7064
|
B(() => {
|
|
7064
|
-
l.current && !t.editor.isDestroyed && (s.current =
|
|
7065
|
+
l.current && !t.editor.isDestroyed && (s.current = Hs({
|
|
7065
7066
|
editor: t.editor,
|
|
7066
7067
|
element: l.current,
|
|
7067
7068
|
pluginKey: "ContentItemMenu",
|
|
@@ -7151,7 +7152,7 @@ function Hs(t) {
|
|
|
7151
7152
|
}
|
|
7152
7153
|
),
|
|
7153
7154
|
/* @__PURE__ */ g(
|
|
7154
|
-
|
|
7155
|
+
Mo,
|
|
7155
7156
|
{
|
|
7156
7157
|
onOpenChange: L,
|
|
7157
7158
|
open: h,
|
|
@@ -7187,7 +7188,7 @@ function Hs(t) {
|
|
|
7187
7188
|
),
|
|
7188
7189
|
/* @__PURE__ */ i(We, { children: r("editor.draghandle.tooltip") })
|
|
7189
7190
|
] }),
|
|
7190
|
-
/* @__PURE__ */ i(
|
|
7191
|
+
/* @__PURE__ */ i(Ao, { className: "richtext-absolute richtext-left-0 richtext-top-0 richtext-z-0 richtext-size-[28px]" })
|
|
7191
7192
|
] }),
|
|
7192
7193
|
/* @__PURE__ */ g(
|
|
7193
7194
|
Dr,
|
|
@@ -7325,13 +7326,13 @@ function Hs(t) {
|
|
|
7325
7326
|
}
|
|
7326
7327
|
);
|
|
7327
7328
|
}
|
|
7328
|
-
const
|
|
7329
|
+
const _s = {
|
|
7329
7330
|
maxWidth: "auto",
|
|
7330
7331
|
zIndex: 20,
|
|
7331
7332
|
appendTo: "parent",
|
|
7332
7333
|
moveTransition: "transform 0.1s ease-out"
|
|
7333
7334
|
};
|
|
7334
|
-
function
|
|
7335
|
+
function Bs({ item: t, disabled: e, editor: r }) {
|
|
7335
7336
|
var a;
|
|
7336
7337
|
const n = t.component;
|
|
7337
7338
|
return n ? /* @__PURE__ */ i(
|
|
@@ -7343,17 +7344,17 @@ function _s({ item: t, disabled: e, editor: r }) {
|
|
|
7343
7344
|
}
|
|
7344
7345
|
) : /* @__PURE__ */ i(V, {});
|
|
7345
7346
|
}
|
|
7346
|
-
function
|
|
7347
|
+
function $s(t) {
|
|
7347
7348
|
const { t: e, lang: r } = q(), n = ({ editor: o }) => {
|
|
7348
7349
|
const { selection: c } = o.view.state, { $from: l, to: s } = c;
|
|
7349
7350
|
return l.pos === s ? !1 : c instanceof Wt;
|
|
7350
|
-
}, a = U(() => t.disabled || !(t != null && t.editor) ? [] :
|
|
7351
|
+
}, a = U(() => t.disabled || !(t != null && t.editor) ? [] : zs(t.editor, e), [t.disabled, t.editor, r, e]);
|
|
7351
7352
|
return /* @__PURE__ */ i(
|
|
7352
7353
|
tt,
|
|
7353
7354
|
{
|
|
7354
7355
|
editor: t == null ? void 0 : t.editor,
|
|
7355
7356
|
shouldShow: n,
|
|
7356
|
-
tippyOptions:
|
|
7357
|
+
tippyOptions: _s,
|
|
7357
7358
|
children: a != null && a.length ? /* @__PURE__ */ i("div", { className: "richtext-pointer-events-auto richtext-w-auto richtext-select-none richtext-rounded-sm !richtext-border richtext-border-neutral-200 richtext-bg-background richtext-px-3 richtext-py-2 richtext-shadow-sm richtext-transition-all dark:richtext-border-neutral-800", children: /* @__PURE__ */ i("div", { className: "richtext-relative richtext-flex richtext-h-[26px] richtext-flex-nowrap richtext-items-center richtext-justify-start richtext-gap-[4px] richtext-whitespace-nowrap", children: a == null ? void 0 : a.map((o, c) => (o == null ? void 0 : o.type) === "divider" ? /* @__PURE__ */ i(
|
|
7358
7359
|
rt,
|
|
7359
7360
|
{
|
|
@@ -7362,7 +7363,7 @@ function Bs(t) {
|
|
|
7362
7363
|
},
|
|
7363
7364
|
`bubbleMenu-divider-${c}`
|
|
7364
7365
|
) : /* @__PURE__ */ i(
|
|
7365
|
-
|
|
7366
|
+
Bs,
|
|
7366
7367
|
{
|
|
7367
7368
|
disabled: t.disabled,
|
|
7368
7369
|
editor: t.editor,
|
|
@@ -7373,7 +7374,7 @@ function Bs(t) {
|
|
|
7373
7374
|
}
|
|
7374
7375
|
);
|
|
7375
7376
|
}
|
|
7376
|
-
function
|
|
7377
|
+
function Vs({ editor: t, disabled: e, actions: r }) {
|
|
7377
7378
|
var f, I, T, v, y, C, M, L, N, E, b, k, _, D, R, A, $, F;
|
|
7378
7379
|
const n = ({ editor: Y }) => Ni(Y.view.state, "table"), { t: a } = q();
|
|
7379
7380
|
function o() {
|
|
@@ -7432,7 +7433,7 @@ function $s({ editor: t, disabled: e, actions: r }) {
|
|
|
7432
7433
|
const Ye = (Ke = Nt == null ? void 0 : Nt.closest) == null ? void 0 : Ke.call(Nt, ".tableWrapper");
|
|
7433
7434
|
return Ye ? Ye.getBoundingClientRect() : new DOMRect(-1e3, -1e3, 0, 0);
|
|
7434
7435
|
},
|
|
7435
|
-
plugins: [
|
|
7436
|
+
plugins: [uo],
|
|
7436
7437
|
sticky: "popper"
|
|
7437
7438
|
},
|
|
7438
7439
|
children: e ? /* @__PURE__ */ i(V, {}) : /* @__PURE__ */ g("div", { className: "richtext-flex richtext-size-full richtext-min-w-32 richtext-flex-row richtext-items-center richtext-gap-0.5 richtext-rounded-lg !richtext-border richtext-border-border richtext-bg-background richtext-p-2 richtext-leading-none richtext-shadow-sm", children: [
|
|
@@ -7554,7 +7555,7 @@ function $s({ editor: t, disabled: e, actions: r }) {
|
|
|
7554
7555
|
}
|
|
7555
7556
|
),
|
|
7556
7557
|
/* @__PURE__ */ i(
|
|
7557
|
-
|
|
7558
|
+
xa,
|
|
7558
7559
|
{
|
|
7559
7560
|
action: w,
|
|
7560
7561
|
editor: t,
|
|
@@ -7587,7 +7588,7 @@ function $s({ editor: t, disabled: e, actions: r }) {
|
|
|
7587
7588
|
}
|
|
7588
7589
|
);
|
|
7589
7590
|
}
|
|
7590
|
-
function
|
|
7591
|
+
function Ws(t) {
|
|
7591
7592
|
const { t: e } = q();
|
|
7592
7593
|
return /* @__PURE__ */ g("div", { className: "richtext-flex richtext-items-center richtext-gap-2 richtext-p-2 richtext-bg-white !richtext-border richtext-rounded-lg richtext-shadow-sm dark:richtext-bg-black richtext-border-neutral-200 dark:richtext-border-neutral-800", children: [
|
|
7593
7594
|
/* @__PURE__ */ i(
|
|
@@ -7630,7 +7631,7 @@ function Vs(t) {
|
|
|
7630
7631
|
] })
|
|
7631
7632
|
] });
|
|
7632
7633
|
}
|
|
7633
|
-
function
|
|
7634
|
+
function Fs({ editor: t, disabled: e }) {
|
|
7634
7635
|
const [r, n] = S(!1), a = U(() => {
|
|
7635
7636
|
const { href: s } = t.getAttributes("link");
|
|
7636
7637
|
return s;
|
|
@@ -7667,8 +7668,8 @@ function Ws({ editor: t, disabled: e }) {
|
|
|
7667
7668
|
n(!1);
|
|
7668
7669
|
}
|
|
7669
7670
|
},
|
|
7670
|
-
children: e ? /* @__PURE__ */ i(V, {}) : /* @__PURE__ */ i(V, { children: r ? /* @__PURE__ */ i(
|
|
7671
|
-
|
|
7671
|
+
children: e ? /* @__PURE__ */ i(V, {}) : /* @__PURE__ */ i(V, { children: r ? /* @__PURE__ */ i(fa, { onSetLink: c, editor: t }) : /* @__PURE__ */ i(
|
|
7672
|
+
Ws,
|
|
7672
7673
|
{
|
|
7673
7674
|
editor: t,
|
|
7674
7675
|
onClear: l,
|
|
@@ -7705,24 +7706,24 @@ function je({ item: t, disabled: e, editor: r }) {
|
|
|
7705
7706
|
}
|
|
7706
7707
|
) }) : /* @__PURE__ */ i(V, {});
|
|
7707
7708
|
}
|
|
7708
|
-
function
|
|
7709
|
+
function Us(t) {
|
|
7709
7710
|
return t.type.name === Vt.name;
|
|
7710
7711
|
}
|
|
7711
|
-
function
|
|
7712
|
+
function Gs(t) {
|
|
7712
7713
|
return t.type.name === ei.name;
|
|
7713
7714
|
}
|
|
7714
|
-
function
|
|
7715
|
+
function qs(t) {
|
|
7715
7716
|
return t.type.name === ti.name;
|
|
7716
7717
|
}
|
|
7717
|
-
function
|
|
7718
|
+
function js(t) {
|
|
7718
7719
|
const { lang: e } = q(), r = ({ editor: a }) => {
|
|
7719
7720
|
const { selection: o } = a.view.state, { $from: c, to: l } = o;
|
|
7720
7721
|
let s = !1;
|
|
7721
7722
|
return a.view.state.doc.nodesBetween(c.pos, l, (h) => {
|
|
7722
|
-
if (
|
|
7723
|
+
if (Us(h))
|
|
7723
7724
|
return s = !0, !1;
|
|
7724
7725
|
}), s;
|
|
7725
|
-
}, n = U(() => t.disabled ? [] :
|
|
7726
|
+
}, n = U(() => t.disabled ? [] : Ms(t.editor), [t.disabled, t.editor, e]);
|
|
7726
7727
|
return /* @__PURE__ */ i(V, { children: /* @__PURE__ */ i(
|
|
7727
7728
|
tt,
|
|
7728
7729
|
{
|
|
@@ -7741,15 +7742,15 @@ function qs(t) {
|
|
|
7741
7742
|
}
|
|
7742
7743
|
) });
|
|
7743
7744
|
}
|
|
7744
|
-
function
|
|
7745
|
+
function Xs(t) {
|
|
7745
7746
|
const { lang: e } = q(), r = ({ editor: a }) => {
|
|
7746
7747
|
const { selection: o } = a.view.state, { $from: c, to: l } = o;
|
|
7747
7748
|
let s = !1;
|
|
7748
7749
|
return a.view.state.doc.nodesBetween(c.pos, l, (h) => {
|
|
7749
|
-
if (
|
|
7750
|
+
if (Gs(h))
|
|
7750
7751
|
return s = !0, !1;
|
|
7751
7752
|
}), s;
|
|
7752
|
-
}, n = U(() => t.disabled ? [] :
|
|
7753
|
+
}, n = U(() => t.disabled ? [] : As(t.editor), [t.disabled, t.editor, e]);
|
|
7753
7754
|
return /* @__PURE__ */ i(V, { children: /* @__PURE__ */ i(
|
|
7754
7755
|
tt,
|
|
7755
7756
|
{
|
|
@@ -7768,15 +7769,15 @@ function js(t) {
|
|
|
7768
7769
|
}
|
|
7769
7770
|
) });
|
|
7770
7771
|
}
|
|
7771
|
-
function
|
|
7772
|
+
function Ys(t) {
|
|
7772
7773
|
const { lang: e } = q(), r = ({ editor: a }) => {
|
|
7773
7774
|
const { selection: o } = a.view.state, { $from: c, to: l } = o;
|
|
7774
7775
|
let s = !1;
|
|
7775
7776
|
return a.view.state.doc.nodesBetween(c.pos, l, (h) => {
|
|
7776
|
-
if (
|
|
7777
|
+
if (qs(h))
|
|
7777
7778
|
return s = !0, !1;
|
|
7778
7779
|
}), s;
|
|
7779
|
-
}, n = U(() => t.disabled ? [] :
|
|
7780
|
+
}, n = U(() => t.disabled ? [] : Es(t.editor), [t.editor, t.disabled, e]);
|
|
7780
7781
|
return /* @__PURE__ */ i(V, { children: /* @__PURE__ */ i(
|
|
7781
7782
|
tt,
|
|
7782
7783
|
{
|
|
@@ -7795,7 +7796,7 @@ function Xs(t) {
|
|
|
7795
7796
|
}
|
|
7796
7797
|
) });
|
|
7797
7798
|
}
|
|
7798
|
-
function
|
|
7799
|
+
function Ks({ editor: t }) {
|
|
7799
7800
|
const { t: e } = q(), r = H(() => t.isActive(le.name), [t]), n = H(() => Gt(le.name, t), [t]), a = H(() => t.chain().focus().addColBefore().run(), [t]), o = H(() => t.chain().focus().addColAfter().run(), [t]), c = H(() => t.chain().focus().deleteCol().run(), [t]);
|
|
7800
7801
|
return /* @__PURE__ */ i(
|
|
7801
7802
|
tt,
|
|
@@ -7851,7 +7852,7 @@ function Ys({ editor: t }) {
|
|
|
7851
7852
|
}
|
|
7852
7853
|
);
|
|
7853
7854
|
}
|
|
7854
|
-
function
|
|
7855
|
+
function Zs({ editor: t, extensions: e }) {
|
|
7855
7856
|
const { t: r } = q(), n = U(() => {
|
|
7856
7857
|
var a, o, c;
|
|
7857
7858
|
return (c = (o = (a = e == null ? void 0 : e.find((l) => l.name === "base-kit")) == null ? void 0 : a.options) == null ? void 0 : o.characterCount) == null ? void 0 : c.limit;
|
|
@@ -7868,9 +7869,9 @@ function Ks({ editor: t, extensions: e }) {
|
|
|
7868
7869
|
r("editor.characters")
|
|
7869
7870
|
] }) }) }) });
|
|
7870
7871
|
}
|
|
7871
|
-
function
|
|
7872
|
-
const { toasts: t } =
|
|
7873
|
-
return /* @__PURE__ */ g(
|
|
7872
|
+
function Js() {
|
|
7873
|
+
const { toasts: t } = Uo();
|
|
7874
|
+
return /* @__PURE__ */ g(Ro, { children: [
|
|
7874
7875
|
t.map(({ id: e, title: r, description: n, action: a, ...o }) => /* @__PURE__ */ g(
|
|
7875
7876
|
Wr,
|
|
7876
7877
|
{
|
|
@@ -7889,7 +7890,7 @@ function Zs() {
|
|
|
7889
7890
|
/* @__PURE__ */ i(Vr, {})
|
|
7890
7891
|
] });
|
|
7891
7892
|
}
|
|
7892
|
-
const
|
|
7893
|
+
const Qs = `
|
|
7893
7894
|
.reactjs-tiptap-editor,
|
|
7894
7895
|
.richtext-dialog-content {
|
|
7895
7896
|
button,
|
|
@@ -8027,7 +8028,7 @@ div[data-tippy-root] {
|
|
|
8027
8028
|
color: inherit;
|
|
8028
8029
|
}
|
|
8029
8030
|
}
|
|
8030
|
-
`,
|
|
8031
|
+
`, tl = pi(({ children: t, id: e }) => {
|
|
8031
8032
|
const [, r] = Or((c) => c.value), [, n] = Hr((c) => c.value), a = (c) => {
|
|
8032
8033
|
r({
|
|
8033
8034
|
value: c.detail
|
|
@@ -8044,11 +8045,11 @@ div[data-tippy-root] {
|
|
|
8044
8045
|
};
|
|
8045
8046
|
}, []), /* @__PURE__ */ i(V, { children: t });
|
|
8046
8047
|
});
|
|
8047
|
-
function
|
|
8048
|
-
return /* @__PURE__ */ i(
|
|
8048
|
+
function el({ children: t, id: e }) {
|
|
8049
|
+
return /* @__PURE__ */ i(po, { children: /* @__PURE__ */ i(wo, { children: /* @__PURE__ */ i(tl, { id: e, children: t }) }) });
|
|
8049
8050
|
}
|
|
8050
|
-
const wr = "data-rc-order", vr = "data-rc-priority",
|
|
8051
|
-
function
|
|
8051
|
+
const wr = "data-rc-order", vr = "data-rc-priority", rl = "rc-util-key", ze = /* @__PURE__ */ new Map();
|
|
8052
|
+
function il(t, e) {
|
|
8052
8053
|
if (!t)
|
|
8053
8054
|
return !1;
|
|
8054
8055
|
if (t.contains)
|
|
@@ -8062,12 +8063,12 @@ function rl(t, e) {
|
|
|
8062
8063
|
return !1;
|
|
8063
8064
|
}
|
|
8064
8065
|
function si({ mark: t } = {}) {
|
|
8065
|
-
return t ? t.startsWith("data-") ? t : `data-${t}` :
|
|
8066
|
+
return t ? t.startsWith("data-") ? t : `data-${t}` : rl;
|
|
8066
8067
|
}
|
|
8067
8068
|
function Xe(t) {
|
|
8068
8069
|
return t.attachTo ? t.attachTo : document.querySelector("head") || document.body;
|
|
8069
8070
|
}
|
|
8070
|
-
function
|
|
8071
|
+
function nl(t) {
|
|
8071
8072
|
return t === "queue" ? "prependQueue" : t ? "prepend" : "append";
|
|
8072
8073
|
}
|
|
8073
8074
|
function li(t) {
|
|
@@ -8076,7 +8077,7 @@ function li(t) {
|
|
|
8076
8077
|
);
|
|
8077
8078
|
}
|
|
8078
8079
|
function di(t, e = {}) {
|
|
8079
|
-
const { csp: r, prepend: n, priority: a = 0 } = e, o =
|
|
8080
|
+
const { csp: r, prepend: n, priority: a = 0 } = e, o = nl(n), c = o === "prependQueue", l = document.createElement("style");
|
|
8080
8081
|
l.setAttribute(wr, o), c && a && l.setAttribute(vr, `${a}`), r != null && r.nonce && (l.nonce = r == null ? void 0 : r.nonce), l.innerHTML = t;
|
|
8081
8082
|
const s = Xe(e), { firstChild: h } = s;
|
|
8082
8083
|
if (n) {
|
|
@@ -8099,28 +8100,28 @@ function hi(t, e = {}) {
|
|
|
8099
8100
|
const r = Xe(e);
|
|
8100
8101
|
return li(r).find((n) => n.getAttribute(si(e)) === t);
|
|
8101
8102
|
}
|
|
8102
|
-
function
|
|
8103
|
+
function ol(t, e = {}) {
|
|
8103
8104
|
const r = hi(t, e);
|
|
8104
8105
|
r && r.remove();
|
|
8105
8106
|
}
|
|
8106
|
-
function
|
|
8107
|
+
function al(t, e) {
|
|
8107
8108
|
const r = ze.get(t);
|
|
8108
|
-
if (!r || !
|
|
8109
|
+
if (!r || !il(document, r)) {
|
|
8109
8110
|
const n = di("", e), { parentNode: a } = n;
|
|
8110
8111
|
ze.set(t, a), n.remove();
|
|
8111
8112
|
}
|
|
8112
8113
|
}
|
|
8113
|
-
function
|
|
8114
|
+
function cl(t, e, r = {}) {
|
|
8114
8115
|
var c, l, s;
|
|
8115
8116
|
const n = Xe(r);
|
|
8116
|
-
|
|
8117
|
+
al(n, r);
|
|
8117
8118
|
const a = hi(e, r);
|
|
8118
8119
|
if (a)
|
|
8119
8120
|
return (c = r.csp) != null && c.nonce && a.nonce !== ((l = r.csp) == null ? void 0 : l.nonce) && (a.nonce = (s = r.csp) == null ? void 0 : s.nonce), a.innerHTML !== t && (a.innerHTML = t), a;
|
|
8120
8121
|
const o = di(t, r);
|
|
8121
8122
|
return o.setAttribute(si(r), e), o;
|
|
8122
8123
|
}
|
|
8123
|
-
function
|
|
8124
|
+
function sl(t, e) {
|
|
8124
8125
|
const { content: r, extensions: n, useEditorOptions: a = {} } = t, o = vi(), c = U(() => {
|
|
8125
8126
|
const u = Fi(n, n, "name");
|
|
8126
8127
|
return [...n.map((x) => {
|
|
@@ -8142,11 +8143,11 @@ function cl(t, e) {
|
|
|
8142
8143
|
bi(e, () => ({
|
|
8143
8144
|
editor: s
|
|
8144
8145
|
})), B(() => {
|
|
8145
|
-
document.documentElement.classList.toggle("dark", t.dark),
|
|
8146
|
+
document.documentElement.classList.toggle("dark", t.dark), ja.setTheme(o, t.dark ? "dark" : "light");
|
|
8146
8147
|
}, [t.dark]), B(() => {
|
|
8147
|
-
s == null || s.setEditable(!(t != null && t.disabled)),
|
|
8148
|
-
}, [s, t == null ? void 0 : t.disabled]), B(() => ((t == null ? void 0 : t.resetCSS) !== !1 &&
|
|
8149
|
-
|
|
8148
|
+
s == null || s.setEditable(!(t != null && t.disabled)), bo.setDisable(o, !(t != null && t.disabled));
|
|
8149
|
+
}, [s, t == null ? void 0 : t.disabled]), B(() => ((t == null ? void 0 : t.resetCSS) !== !1 && cl(Qs, "react-tiptap-reset"), () => {
|
|
8150
|
+
ol("react-tiptap-reset");
|
|
8150
8151
|
}), [t == null ? void 0 : t.resetCSS]);
|
|
8151
8152
|
function h(u, m) {
|
|
8152
8153
|
return t != null && t.removeDefaultWrapper ? m === "html" ? u.isEmpty ? "" : u.getHTML() : m === "json" ? u.isEmpty ? {} : u.getJSON() : m === "text" ? u.isEmpty ? "" : u.getText() : "" : m === "html" ? u.getHTML() : m === "json" ? u.getJSON() : m === "text" ? u.getText() : "";
|
|
@@ -8157,20 +8158,20 @@ function cl(t, e) {
|
|
|
8157
8158
|
var u;
|
|
8158
8159
|
(u = s == null ? void 0 : s.destroy) == null || u.call(s);
|
|
8159
8160
|
}, []);
|
|
8160
|
-
const d =
|
|
8161
|
+
const d = ko(s, "characterCount");
|
|
8161
8162
|
return s ? /* @__PURE__ */ g("div", { className: "reactjs-tiptap-editor", children: [
|
|
8162
8163
|
/* @__PURE__ */ i(
|
|
8163
|
-
|
|
8164
|
+
el,
|
|
8164
8165
|
{
|
|
8165
8166
|
id: o,
|
|
8166
8167
|
children: /* @__PURE__ */ i(
|
|
8167
|
-
|
|
8168
|
+
_o,
|
|
8168
8169
|
{
|
|
8169
8170
|
delayDuration: 0,
|
|
8170
8171
|
disableHoverableContent: !0,
|
|
8171
8172
|
children: /* @__PURE__ */ i("div", { className: "richtext-overflow-hidden richtext-rounded-[0.5rem] richtext-bg-background richtext-shadow richtext-outline richtext-outline-1", children: /* @__PURE__ */ g("div", { className: "richtext-flex richtext-max-h-full richtext-w-full richtext-flex-col", children: [
|
|
8172
8173
|
!(t != null && t.hideToolbar) && /* @__PURE__ */ i(
|
|
8173
|
-
|
|
8174
|
+
vs,
|
|
8174
8175
|
{
|
|
8175
8176
|
disabled: !!(t != null && t.disabled),
|
|
8176
8177
|
editor: s,
|
|
@@ -8185,14 +8186,14 @@ function cl(t, e) {
|
|
|
8185
8186
|
}
|
|
8186
8187
|
),
|
|
8187
8188
|
d && /* @__PURE__ */ i(
|
|
8188
|
-
|
|
8189
|
+
Zs,
|
|
8189
8190
|
{
|
|
8190
8191
|
editor: s,
|
|
8191
8192
|
extensions: n
|
|
8192
8193
|
}
|
|
8193
8194
|
),
|
|
8194
8195
|
!(t != null && t.hideBubble) && /* @__PURE__ */ i(
|
|
8195
|
-
|
|
8196
|
+
gs,
|
|
8196
8197
|
{
|
|
8197
8198
|
bubbleMenu: t == null ? void 0 : t.bubbleMenu,
|
|
8198
8199
|
disabled: t == null ? void 0 : t.disabled,
|
|
@@ -8204,67 +8205,66 @@ function cl(t, e) {
|
|
|
8204
8205
|
)
|
|
8205
8206
|
}
|
|
8206
8207
|
),
|
|
8207
|
-
/* @__PURE__ */ i(
|
|
8208
|
+
/* @__PURE__ */ i(Js, {})
|
|
8208
8209
|
] }) : /* @__PURE__ */ i(V, {});
|
|
8209
8210
|
}
|
|
8210
|
-
const
|
|
8211
|
+
const zl = wi(sl);
|
|
8211
8212
|
export {
|
|
8212
|
-
|
|
8213
|
+
oa as $,
|
|
8213
8214
|
O as A,
|
|
8214
8215
|
G as B,
|
|
8215
|
-
|
|
8216
|
-
|
|
8217
|
-
|
|
8218
|
-
|
|
8219
|
-
|
|
8220
|
-
|
|
8221
|
-
|
|
8222
|
-
|
|
8223
|
-
|
|
8224
|
-
|
|
8216
|
+
Zr as C,
|
|
8217
|
+
hr as D,
|
|
8218
|
+
St as E,
|
|
8219
|
+
Me as F,
|
|
8220
|
+
Be as G,
|
|
8221
|
+
xa as H,
|
|
8222
|
+
Vt as I,
|
|
8223
|
+
bt as J,
|
|
8224
|
+
Mt as K,
|
|
8225
|
+
fa as L,
|
|
8225
8226
|
le as M,
|
|
8226
|
-
|
|
8227
|
-
|
|
8227
|
+
Ca as N,
|
|
8228
|
+
se as O,
|
|
8228
8229
|
It as P,
|
|
8229
|
-
|
|
8230
|
-
|
|
8231
|
-
|
|
8230
|
+
ct as Q,
|
|
8231
|
+
zl as R,
|
|
8232
|
+
Q as S,
|
|
8232
8233
|
jr as T,
|
|
8233
|
-
|
|
8234
|
+
Br as U,
|
|
8234
8235
|
ti as V,
|
|
8235
|
-
|
|
8236
|
-
|
|
8237
|
-
|
|
8238
|
-
|
|
8239
|
-
|
|
8236
|
+
Uo as W,
|
|
8237
|
+
ko as X,
|
|
8238
|
+
Lt as Y,
|
|
8239
|
+
El as Z,
|
|
8240
|
+
aa as _,
|
|
8240
8241
|
Xr as a,
|
|
8241
|
-
|
|
8242
|
-
|
|
8243
|
-
|
|
8244
|
-
hr as a3,
|
|
8242
|
+
Ll as a0,
|
|
8243
|
+
Al as a1,
|
|
8244
|
+
Il as a2,
|
|
8245
8245
|
We as b,
|
|
8246
|
-
|
|
8247
|
-
|
|
8248
|
-
|
|
8249
|
-
|
|
8250
|
-
|
|
8251
|
-
|
|
8246
|
+
P as c,
|
|
8247
|
+
kt as d,
|
|
8248
|
+
ei as e,
|
|
8249
|
+
sr as f,
|
|
8250
|
+
go as g,
|
|
8251
|
+
Ie as h,
|
|
8252
8252
|
Kr as i,
|
|
8253
|
-
|
|
8254
|
-
|
|
8255
|
-
|
|
8256
|
-
|
|
8257
|
-
|
|
8258
|
-
|
|
8259
|
-
|
|
8260
|
-
|
|
8261
|
-
|
|
8262
|
-
|
|
8263
|
-
|
|
8264
|
-
|
|
8265
|
-
|
|
8266
|
-
|
|
8267
|
-
|
|
8268
|
-
|
|
8269
|
-
|
|
8253
|
+
Gt as j,
|
|
8254
|
+
K as k,
|
|
8255
|
+
Mo as l,
|
|
8256
|
+
Ao as m,
|
|
8257
|
+
Dr as n,
|
|
8258
|
+
Lo as o,
|
|
8259
|
+
_r as p,
|
|
8260
|
+
Sl as q,
|
|
8261
|
+
zo as r,
|
|
8262
|
+
fo as s,
|
|
8263
|
+
Et as t,
|
|
8264
|
+
vo as u,
|
|
8265
|
+
Tt as v,
|
|
8266
|
+
qr as w,
|
|
8267
|
+
ps as x,
|
|
8268
|
+
Zo as y,
|
|
8269
|
+
Ml as z
|
|
8270
8270
|
};
|