reactjs-tiptap-editor-pro 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-BnruDETn.js → RichTextEditor-Bxdp3pW3.js} +736 -714
- package/lib/RichTextEditor-zOI60NFQ.cjs +141 -0
- package/lib/extension-bundle.cjs +1 -1
- package/lib/extension-bundle.d.cts +79 -79
- package/lib/extension-bundle.d.ts +79 -79
- package/lib/extension-bundle.js +5 -5
- package/lib/{index-CYg22iLG.cjs → index-D-rys8BA.cjs} +1 -1
- package/lib/{index-8id9bPv5.js → index-PJxla8pp.js} +1 -1
- package/lib/index.cjs +1 -1
- package/lib/index.d.cts +79 -79
- package/lib/index.d.ts +79 -79
- package/lib/index.js +2 -2
- package/lib/locale-bundle.cjs +1 -1
- package/lib/locale-bundle.d.cts +79 -79
- package/lib/locale-bundle.d.ts +79 -79
- package/lib/locale-bundle.js +1 -1
- package/lib/{tiptap-Ufn12SjW.cjs → tiptap-Bzsbnr3f.cjs} +1 -1
- package/lib/{tiptap-BV9BUpUC.js → tiptap-Kst3Ray3.js} +1 -1
- package/lib/vendor-LvbrNFNL.cjs +8114 -0
- package/lib/vendor-tDefVoN_.js +67574 -0
- package/package.json +2 -2
- package/lib/RichTextEditor-CRJ-dSCW.cjs +0 -141
- package/lib/vendor-CRmKyn1B.cjs +0 -264
- package/lib/vendor-DyAqAGVt.js +0 -37115
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var Xt = (t, e, r) =>
|
|
4
|
-
import { jsxs as
|
|
1
|
+
var hi = Object.defineProperty;
|
|
2
|
+
var ui = (t, e, r) => e in t ? hi(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
+
var Xt = (t, e, r) => ui(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
+
import { jsxs as f, jsx as i, Fragment as V } from "react/jsx-runtime";
|
|
5
5
|
import * as W from "react";
|
|
6
|
-
import Ht, { createContext as
|
|
7
|
-
import { W as re, h as yt, m as st, X as
|
|
8
|
-
import { u as q, I as xt, o as ft, p as he, V as Ce, q as
|
|
6
|
+
import Ht, { createContext as mi, useContext as xi, useSyncExternalStore as fi, useRef as J, useCallback as H, useState as S, useEffect as B, useMemo as U, Fragment as Pe, memo as gi, forwardRef as pi, useId as wi, useImperativeHandle as vi, useLayoutEffect as bi } from "react";
|
|
7
|
+
import { W as re, h as yt, m as st, X as yi, N as gt, Y as de, R as pt, Z as Re, _ as ie, $ as Ci, B as et, a0 as Ti, a1 as Ni, a2 as ki } from "./tiptap-Kst3Ray3.js";
|
|
8
|
+
import { u as q, I as xt, o as ft, p as he, V as Ce, q as Si, C as Mi, i as Z, B as Ai, r as ne, E as Li } from "./index-PJxla8pp.js";
|
|
9
9
|
import * as br from "@radix-ui/react-separator";
|
|
10
|
-
import { ap as
|
|
11
|
-
import * as
|
|
10
|
+
import { ap as Ii, al as oe, ak as Ei, aq as ue, ar as zi, am as Oe, T as Wt, N as Pi, A as Ri, as as ae, at as ht, au as yr, b as He, P as De, a0 as Oi, $ as Hi, an as Cr, av as Di, aw as me, ax as _i, H as Ft, ay as Bi, az as $i, S as Vi, aA as Wi, aB as Fi } from "./vendor-tDefVoN_.js";
|
|
11
|
+
import * as rt from "@radix-ui/react-toast";
|
|
12
12
|
import { ChevronRight as Ui, Check as Tr, Circle as Gi, X as Nr, PencilRuler as qi, FlipHorizontal as ji, FlipVertical as Xi, CropIcon as Yi, ChevronUp as Ki, Paperclip as Zi, Eye as Ji, Settings as Qi, ZoomOut as tn, ZoomIn as en, BookMarked as rn, Sigma as nn, SmilePlusIcon as on, Replace as Ze, SmilePlus as an, Frame as cn, Columns2 as Je, PanelRight as sn, PanelLeft as ln, Clipboard as dn, Copy as hn, GripVertical as un, Plus as kr, Columns4 as mn, Columns3 as xn, Heading6 as fn, Heading5 as gn, Heading4 as pn, Heading3 as wn, Heading2 as vn, Heading1 as bn, ChevronsUpDown as yn, Trash as Cn, Trash2 as Sr, TableCellsSplit as Tn, TableCellsMerge as Nn, BetweenVerticalEnd as kn, BetweenVerticalStart as Sn, BetweenHorizonalStart as Mn, BetweenHorizonalEnd as An, Unlink as Ln, Pencil as Mr, Sparkles as In, Table as En, Minimize as zn, Maximize as Pn, Video as Rn, ImageUp as On, Link as Hn, ListTodo as Dn, ListOrdered as _n, List as Bn, IndentDecrease as $n, IndentIncrease as Vn, Type as Wn, CodeXml as Fn, Code as Un, Superscript as Gn, Subscript as qn, ChevronDown as jn, Undo2 as Xn, Redo2 as Yn, PaintRoller as Kn, Eraser as Zn, Minus as Jn, Strikethrough as Qn, Quote as to, Underline as eo, Italic as ro, LoaderCircle as io, Bold as no, 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";
|
|
@@ -29,7 +29,7 @@ import mo 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) {
|
|
32
|
-
return
|
|
32
|
+
return Ii(oe(t));
|
|
33
33
|
}
|
|
34
34
|
let ge;
|
|
35
35
|
function pe() {
|
|
@@ -59,9 +59,9 @@ const O = Ht.forwardRef(
|
|
|
59
59
|
asChild: m = !1,
|
|
60
60
|
upload: x = !1,
|
|
61
61
|
...w
|
|
62
|
-
} = t
|
|
63
|
-
return /* @__PURE__ */
|
|
64
|
-
/* @__PURE__ */ i(Xr, { asChild: !0, children: /* @__PURE__ */
|
|
62
|
+
} = t;
|
|
63
|
+
return /* @__PURE__ */ f(jr, { children: [
|
|
64
|
+
/* @__PURE__ */ i(Xr, { asChild: !0, children: /* @__PURE__ */ f(
|
|
65
65
|
m ? Er : qr,
|
|
66
66
|
{
|
|
67
67
|
"data-state": d != null && d() ? "on" : "off",
|
|
@@ -72,12 +72,12 @@ const O = Ht.forwardRef(
|
|
|
72
72
|
disabled: a,
|
|
73
73
|
...w,
|
|
74
74
|
children: [
|
|
75
|
-
|
|
75
|
+
r && /* @__PURE__ */ i(Y, { name: r, className: "richtext-size-4" }),
|
|
76
76
|
u
|
|
77
77
|
]
|
|
78
78
|
}
|
|
79
79
|
) }),
|
|
80
|
-
n && /* @__PURE__ */ i(We, { ...s, children: /* @__PURE__ */
|
|
80
|
+
n && /* @__PURE__ */ i(We, { ...s, children: /* @__PURE__ */ f("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
82
|
!!(l != null && l.length) && /* @__PURE__ */ i("span", { children: fo(l) })
|
|
83
83
|
] }) })
|
|
@@ -95,15 +95,15 @@ function xe(t) {
|
|
|
95
95
|
subscribe: h
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
-
const r =
|
|
98
|
+
const r = mi(null);
|
|
99
99
|
function n({ children: o }) {
|
|
100
100
|
return /* @__PURE__ */ i(r.Provider, { value: e(), children: o });
|
|
101
101
|
}
|
|
102
102
|
function a(o) {
|
|
103
|
-
const c =
|
|
103
|
+
const c = xi(r);
|
|
104
104
|
if (!c)
|
|
105
105
|
throw new Error("Store not found");
|
|
106
|
-
return [
|
|
106
|
+
return [fi(
|
|
107
107
|
c.subscribe,
|
|
108
108
|
() => o(c.get()),
|
|
109
109
|
() => o(t)
|
|
@@ -125,7 +125,7 @@ const { Provider: go, useStore: Or } = xe({
|
|
|
125
125
|
}), { Provider: po, useStore: Hr } = xe({
|
|
126
126
|
value: "light"
|
|
127
127
|
});
|
|
128
|
-
|
|
128
|
+
Ei("0");
|
|
129
129
|
function se(t, e) {
|
|
130
130
|
return window.addEventListener(t, e), () => {
|
|
131
131
|
window.removeEventListener(t, e);
|
|
@@ -189,7 +189,7 @@ function No(t, e) {
|
|
|
189
189
|
const { extensions: r = [] } = (t == null ? void 0 : t.extensionManager) ?? {};
|
|
190
190
|
return !!r.find((a) => a.name === e);
|
|
191
191
|
}
|
|
192
|
-
function
|
|
192
|
+
function Sl(t) {
|
|
193
193
|
return t.map((e) => yo(e) ? { value: e, name: e } : e);
|
|
194
194
|
}
|
|
195
195
|
const ko = ue(
|
|
@@ -227,7 +227,7 @@ const ko = ue(
|
|
|
227
227
|
)
|
|
228
228
|
);
|
|
229
229
|
G.displayName = "Button";
|
|
230
|
-
const So = X.Root, Mo = X.Trigger, Qe = X.Portal, tr = X.Sub, ke = W.forwardRef(({ className: t, inset: e, children: r, ...n }, a) => /* @__PURE__ */
|
|
230
|
+
const So = X.Root, Mo = X.Trigger, Qe = X.Portal, tr = X.Sub, ke = W.forwardRef(({ className: t, inset: e, children: r, ...n }, a) => /* @__PURE__ */ f(
|
|
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 Ao = W.forwardRef(({ className: t, children: e, checked: r, ...n }, a) => /* @__PURE__ */
|
|
285
|
+
const Ao = W.forwardRef(({ className: t, children: e, checked: r, ...n }, a) => /* @__PURE__ */ f(
|
|
286
286
|
X.CheckboxItem,
|
|
287
287
|
{
|
|
288
288
|
ref: a,
|
|
@@ -299,7 +299,7 @@ const Ao = W.forwardRef(({ className: t, children: e, checked: r, ...n }, a) =>
|
|
|
299
299
|
}
|
|
300
300
|
));
|
|
301
301
|
Ao.displayName = X.CheckboxItem.displayName;
|
|
302
|
-
const Lo = W.forwardRef(({ className: t, children: e, ...r }, n) => /* @__PURE__ */
|
|
302
|
+
const Lo = W.forwardRef(({ className: t, children: e, ...r }, n) => /* @__PURE__ */ f(
|
|
303
303
|
X.RadioItem,
|
|
304
304
|
{
|
|
305
305
|
ref: n,
|
|
@@ -350,7 +350,7 @@ function Eo({
|
|
|
350
350
|
);
|
|
351
351
|
}
|
|
352
352
|
Eo.displayName = "DropdownMenuShortcut";
|
|
353
|
-
const
|
|
353
|
+
const tt = W.forwardRef(
|
|
354
354
|
({ className: t, type: e, ...r }, n) => /* @__PURE__ */ i(
|
|
355
355
|
"input",
|
|
356
356
|
{
|
|
@@ -364,7 +364,7 @@ const Q = W.forwardRef(
|
|
|
364
364
|
}
|
|
365
365
|
)
|
|
366
366
|
);
|
|
367
|
-
|
|
367
|
+
tt.displayName = "Input";
|
|
368
368
|
const zo = 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(
|
|
@@ -390,7 +390,7 @@ const It = _t.Root, Et = _t.Trigger, Tt = W.forwardRef(({ className: t, align: e
|
|
|
390
390
|
}
|
|
391
391
|
) }));
|
|
392
392
|
Tt.displayName = _t.Content.displayName;
|
|
393
|
-
const
|
|
393
|
+
const Q = W.forwardRef(
|
|
394
394
|
({ className: t, orientation: e = "horizontal", decorative: r = !0, ...n }, a) => /* @__PURE__ */ i(
|
|
395
395
|
br.Root,
|
|
396
396
|
{
|
|
@@ -406,7 +406,7 @@ const rt = W.forwardRef(
|
|
|
406
406
|
}
|
|
407
407
|
)
|
|
408
408
|
);
|
|
409
|
-
|
|
409
|
+
Q.displayName = br.Root.displayName;
|
|
410
410
|
const Br = W.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
|
|
411
411
|
Te.Root,
|
|
412
412
|
{
|
|
@@ -463,8 +463,8 @@ const $t = W.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
|
|
|
463
463
|
}
|
|
464
464
|
));
|
|
465
465
|
$t.displayName = Ct.Content.displayName;
|
|
466
|
-
const Po =
|
|
467
|
-
|
|
466
|
+
const Po = rt.Provider, Vr = W.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
|
|
467
|
+
rt.Viewport,
|
|
468
468
|
{
|
|
469
469
|
ref: r,
|
|
470
470
|
className: P(
|
|
@@ -474,7 +474,7 @@ const Po = et.Provider, Vr = W.forwardRef(({ className: t, ...e }, r) => /* @__P
|
|
|
474
474
|
...e
|
|
475
475
|
}
|
|
476
476
|
));
|
|
477
|
-
Vr.displayName =
|
|
477
|
+
Vr.displayName = rt.Viewport.displayName;
|
|
478
478
|
const Ro = 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
|
{
|
|
@@ -489,16 +489,16 @@ const Ro = ue(
|
|
|
489
489
|
}
|
|
490
490
|
}
|
|
491
491
|
), Wr = W.forwardRef(({ className: t, variant: e, ...r }, n) => /* @__PURE__ */ i(
|
|
492
|
-
|
|
492
|
+
rt.Root,
|
|
493
493
|
{
|
|
494
494
|
ref: n,
|
|
495
495
|
className: P(Ro({ variant: e }), t),
|
|
496
496
|
...r
|
|
497
497
|
}
|
|
498
498
|
));
|
|
499
|
-
Wr.displayName =
|
|
499
|
+
Wr.displayName = rt.Root.displayName;
|
|
500
500
|
const Oo = W.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
|
|
501
|
-
|
|
501
|
+
rt.Action,
|
|
502
502
|
{
|
|
503
503
|
ref: r,
|
|
504
504
|
className: P(
|
|
@@ -508,9 +508,9 @@ const Oo = W.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
|
|
|
508
508
|
...e
|
|
509
509
|
}
|
|
510
510
|
));
|
|
511
|
-
Oo.displayName =
|
|
511
|
+
Oo.displayName = rt.Action.displayName;
|
|
512
512
|
const Fr = W.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
|
|
513
|
-
|
|
513
|
+
rt.Close,
|
|
514
514
|
{
|
|
515
515
|
ref: r,
|
|
516
516
|
className: P(
|
|
@@ -522,25 +522,25 @@ const Fr = W.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
|
|
|
522
522
|
children: /* @__PURE__ */ i(Nr, { className: "richtext-h-4 richtext-w-4" })
|
|
523
523
|
}
|
|
524
524
|
));
|
|
525
|
-
Fr.displayName =
|
|
525
|
+
Fr.displayName = rt.Close.displayName;
|
|
526
526
|
const Ur = W.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
|
|
527
|
-
|
|
527
|
+
rt.Title,
|
|
528
528
|
{
|
|
529
529
|
ref: r,
|
|
530
530
|
className: P("richtext-text-sm richtext-font-semibold", t),
|
|
531
531
|
...e
|
|
532
532
|
}
|
|
533
533
|
));
|
|
534
|
-
Ur.displayName =
|
|
534
|
+
Ur.displayName = rt.Title.displayName;
|
|
535
535
|
const Gr = W.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
|
|
536
|
-
|
|
536
|
+
rt.Description,
|
|
537
537
|
{
|
|
538
538
|
ref: r,
|
|
539
539
|
className: P("richtext-text-sm richtext-opacity-90", t),
|
|
540
540
|
...e
|
|
541
541
|
}
|
|
542
542
|
));
|
|
543
|
-
Gr.displayName =
|
|
543
|
+
Gr.displayName = rt.Description.displayName;
|
|
544
544
|
const Ho = 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
|
{
|
|
@@ -780,9 +780,22 @@ function Xo(t) {
|
|
|
780
780
|
}
|
|
781
781
|
) });
|
|
782
782
|
}
|
|
783
|
-
function
|
|
784
|
-
const e =
|
|
785
|
-
return e ? /* @__PURE__ */ i(
|
|
783
|
+
function Y(t) {
|
|
784
|
+
const e = ua[t.name];
|
|
785
|
+
return e ? /* @__PURE__ */ i(
|
|
786
|
+
e,
|
|
787
|
+
{
|
|
788
|
+
className: `richtext-size-4 ${(t == null ? void 0 : t.className) || ""}`,
|
|
789
|
+
onClick: t == null ? void 0 : t.onClick
|
|
790
|
+
}
|
|
791
|
+
) : /* @__PURE__ */ i(
|
|
792
|
+
zi,
|
|
793
|
+
{
|
|
794
|
+
className: `richtext-size-4 ${(t == null ? void 0 : t.className) || ""}`,
|
|
795
|
+
name: t.name,
|
|
796
|
+
onClick: t == null ? void 0 : t.onClick
|
|
797
|
+
}
|
|
798
|
+
);
|
|
786
799
|
}
|
|
787
800
|
function Yo(t) {
|
|
788
801
|
return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ i(
|
|
@@ -852,13 +865,13 @@ function ia() {
|
|
|
852
865
|
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
866
|
}
|
|
854
867
|
function na() {
|
|
855
|
-
return /* @__PURE__ */
|
|
868
|
+
return /* @__PURE__ */ f("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 32 32", children: [
|
|
856
869
|
/* @__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
870
|
/* @__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
871
|
] });
|
|
859
872
|
}
|
|
860
873
|
function oa() {
|
|
861
|
-
return /* @__PURE__ */
|
|
874
|
+
return /* @__PURE__ */ f(
|
|
862
875
|
"svg",
|
|
863
876
|
{
|
|
864
877
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -886,7 +899,7 @@ function oa() {
|
|
|
886
899
|
);
|
|
887
900
|
}
|
|
888
901
|
function aa() {
|
|
889
|
-
return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */
|
|
902
|
+
return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ f("g", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", color: "currentColor", children: [
|
|
890
903
|
/* @__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
904
|
/* @__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
905
|
] }) });
|
|
@@ -895,7 +908,7 @@ function ca() {
|
|
|
895
908
|
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
909
|
}
|
|
897
910
|
function sa() {
|
|
898
|
-
return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 48 48", children: /* @__PURE__ */
|
|
911
|
+
return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 48 48", children: /* @__PURE__ */ f("g", { fill: "none", stroke: "currentColor", strokeWidth: "4", children: [
|
|
899
912
|
/* @__PURE__ */ i("circle", { cx: "10", cy: "24", r: "4" }),
|
|
900
913
|
/* @__PURE__ */ i("circle", { cx: "38", cy: "10", r: "4" }),
|
|
901
914
|
/* @__PURE__ */ i("circle", { cx: "38", cy: "24", r: "4" }),
|
|
@@ -930,7 +943,7 @@ function ha() {
|
|
|
930
943
|
}
|
|
931
944
|
);
|
|
932
945
|
}
|
|
933
|
-
const
|
|
946
|
+
const ua = {
|
|
934
947
|
Bold: no,
|
|
935
948
|
LoaderCircle: io,
|
|
936
949
|
Italic: ro,
|
|
@@ -1031,7 +1044,7 @@ const Kr = {
|
|
|
1031
1044
|
FlipY: ji,
|
|
1032
1045
|
PencilRuler: qi
|
|
1033
1046
|
};
|
|
1034
|
-
function
|
|
1047
|
+
function ma({ fill: t }) {
|
|
1035
1048
|
return /* @__PURE__ */ i(
|
|
1036
1049
|
"svg",
|
|
1037
1050
|
{
|
|
@@ -1040,8 +1053,8 @@ function ua({ fill: t }) {
|
|
|
1040
1053
|
viewBox: "0 0 256 256",
|
|
1041
1054
|
version: "1.1",
|
|
1042
1055
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1043
|
-
children: /* @__PURE__ */ i("g", { id: "icon/填充色", stroke: "none", strokeWidth: 1, fill: "none", fillRule: "evenodd", children: /* @__PURE__ */
|
|
1044
|
-
/* @__PURE__ */ i("g", { id: "编组", fill: "currentColor", children: /* @__PURE__ */
|
|
1056
|
+
children: /* @__PURE__ */ i("g", { id: "icon/填充色", stroke: "none", strokeWidth: 1, fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ f("g", { id: "icon/背景颜色", children: [
|
|
1057
|
+
/* @__PURE__ */ i("g", { id: "编组", fill: "currentColor", children: /* @__PURE__ */ f(
|
|
1045
1058
|
"g",
|
|
1046
1059
|
{
|
|
1047
1060
|
transform: "translate(119.502295, 137.878331) rotate(-135.000000) translate(-119.502295, -137.878331) translate(48.002295, 31.757731)",
|
|
@@ -1083,7 +1096,7 @@ function ua({ fill: t }) {
|
|
|
1083
1096
|
}
|
|
1084
1097
|
);
|
|
1085
1098
|
}
|
|
1086
|
-
function
|
|
1099
|
+
function xa(t) {
|
|
1087
1100
|
const [e, r] = S(void 0);
|
|
1088
1101
|
function n(c) {
|
|
1089
1102
|
var l;
|
|
@@ -1099,7 +1112,7 @@ function ma(t) {
|
|
|
1099
1112
|
}, 350),
|
|
1100
1113
|
[]
|
|
1101
1114
|
);
|
|
1102
|
-
return /* @__PURE__ */
|
|
1115
|
+
return /* @__PURE__ */ f("div", { className: "richtext-flex richtext-items-center richtext-h-[32px]", children: [
|
|
1103
1116
|
/* @__PURE__ */ i(
|
|
1104
1117
|
O,
|
|
1105
1118
|
{
|
|
@@ -1108,23 +1121,23 @@ function ma(t) {
|
|
|
1108
1121
|
action: a,
|
|
1109
1122
|
tooltipOptions: t == null ? void 0 : t.tooltipOptions,
|
|
1110
1123
|
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(
|
|
1124
|
+
children: /* @__PURE__ */ i("span", { className: "richtext-flex richtext-items-center richtext-justify-center richtext-text-sm", children: /* @__PURE__ */ i(ma, { fill: e }) })
|
|
1112
1125
|
}
|
|
1113
1126
|
),
|
|
1114
1127
|
/* @__PURE__ */ i(
|
|
1115
|
-
|
|
1128
|
+
ps,
|
|
1116
1129
|
{
|
|
1117
1130
|
selectedColor: e,
|
|
1118
1131
|
setSelectedColor: o,
|
|
1119
1132
|
onChange: n,
|
|
1120
1133
|
highlight: !0,
|
|
1121
1134
|
disabled: t == null ? void 0 : t.disabled,
|
|
1122
|
-
children: /* @__PURE__ */ i(G, { variant: "ghost", size: "icon", className: "!richtext-w-3 !richtext-h-[32px]", disabled: t == null ? void 0 : t.disabled, children: /* @__PURE__ */ i(
|
|
1135
|
+
children: /* @__PURE__ */ i(G, { variant: "ghost", size: "icon", className: "!richtext-w-3 !richtext-h-[32px]", disabled: t == null ? void 0 : t.disabled, children: /* @__PURE__ */ i(Y, { className: "!richtext-w-3 !richtext-h-3 richtext-text-zinc-500", name: "MenuDown" }) })
|
|
1123
1136
|
}
|
|
1124
1137
|
)
|
|
1125
1138
|
] });
|
|
1126
1139
|
}
|
|
1127
|
-
function
|
|
1140
|
+
function fa(t) {
|
|
1128
1141
|
const { t: e } = q(), [r, n] = S({
|
|
1129
1142
|
text: "",
|
|
1130
1143
|
link: ""
|
|
@@ -1142,7 +1155,7 @@ function xa(t) {
|
|
|
1142
1155
|
function c(l) {
|
|
1143
1156
|
l.preventDefault(), l.stopPropagation(), t == null || t.onSetLink(r.link, r.text, a);
|
|
1144
1157
|
}
|
|
1145
|
-
return /* @__PURE__ */ i("div", { className: "border-neutral-200 richtext-rounded-lg !richtext-border richtext-bg-white richtext-p-2 richtext-shadow-sm dark:richtext-border-neutral-800 dark:richtext-bg-black", children: /* @__PURE__ */
|
|
1158
|
+
return /* @__PURE__ */ i("div", { className: "border-neutral-200 richtext-rounded-lg !richtext-border richtext-bg-white richtext-p-2 richtext-shadow-sm dark:richtext-border-neutral-800 dark:richtext-bg-black", children: /* @__PURE__ */ f(
|
|
1146
1159
|
"form",
|
|
1147
1160
|
{
|
|
1148
1161
|
className: "richtext-flex richtext-flex-col richtext-gap-2",
|
|
@@ -1150,7 +1163,7 @@ function xa(t) {
|
|
|
1150
1163
|
children: [
|
|
1151
1164
|
/* @__PURE__ */ i(ct, { className: "mb-[6px]", children: e("editor.link.dialog.text") }),
|
|
1152
1165
|
/* @__PURE__ */ i("div", { className: "richtext-mb-[10px] richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5", children: /* @__PURE__ */ i("div", { className: "richtext-relative richtext-w-full richtext-max-w-sm richtext-items-center", children: /* @__PURE__ */ i(
|
|
1153
|
-
|
|
1166
|
+
tt,
|
|
1154
1167
|
{
|
|
1155
1168
|
className: "richtext-w-80",
|
|
1156
1169
|
onChange: (l) => n({ ...r, text: l.target.value }),
|
|
@@ -1161,9 +1174,9 @@ function xa(t) {
|
|
|
1161
1174
|
}
|
|
1162
1175
|
) }) }),
|
|
1163
1176
|
/* @__PURE__ */ i(ct, { className: "mb-[6px]", children: e("editor.link.dialog.link") }),
|
|
1164
|
-
/* @__PURE__ */ i("div", { className: "richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5", children: /* @__PURE__ */
|
|
1177
|
+
/* @__PURE__ */ i("div", { className: "richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5", children: /* @__PURE__ */ f("div", { className: "richtext-relative richtext-w-full richtext-max-w-sm richtext-items-center", children: [
|
|
1165
1178
|
/* @__PURE__ */ i(
|
|
1166
|
-
|
|
1179
|
+
tt,
|
|
1167
1180
|
{
|
|
1168
1181
|
className: "richtext-pl-10",
|
|
1169
1182
|
onChange: (l) => n({ ...r, link: l.target.value }),
|
|
@@ -1173,14 +1186,14 @@ function xa(t) {
|
|
|
1173
1186
|
}
|
|
1174
1187
|
),
|
|
1175
1188
|
/* @__PURE__ */ i("span", { className: "richtext-absolute richtext-inset-y-0 richtext-start-0 richtext-flex richtext-items-center richtext-justify-center richtext-px-2", children: /* @__PURE__ */ i(
|
|
1176
|
-
|
|
1189
|
+
Y,
|
|
1177
1190
|
{
|
|
1178
1191
|
className: "richtext-size-5 richtext-text-muted-foreground",
|
|
1179
1192
|
name: "Link"
|
|
1180
1193
|
}
|
|
1181
1194
|
) })
|
|
1182
1195
|
] }) }),
|
|
1183
|
-
/* @__PURE__ */
|
|
1196
|
+
/* @__PURE__ */ f("div", { className: "richtext-flex richtext-items-center richtext-space-x-2", children: [
|
|
1184
1197
|
/* @__PURE__ */ i(ct, { children: e("editor.link.dialog.openInNewTab") }),
|
|
1185
1198
|
/* @__PURE__ */ i(
|
|
1186
1199
|
Br,
|
|
@@ -1204,10 +1217,10 @@ function xa(t) {
|
|
|
1204
1217
|
}
|
|
1205
1218
|
) });
|
|
1206
1219
|
}
|
|
1207
|
-
function
|
|
1220
|
+
function ga(t, e, r = null) {
|
|
1208
1221
|
return r ? t.createChecked({ index: e }, r) : t.createAndFill({ index: e });
|
|
1209
1222
|
}
|
|
1210
|
-
function
|
|
1223
|
+
function pa(t) {
|
|
1211
1224
|
if (t.cached.columnsNodeTypes)
|
|
1212
1225
|
return t.cached.columnsNodeTypes;
|
|
1213
1226
|
const e = {
|
|
@@ -1216,10 +1229,10 @@ function ga(t) {
|
|
|
1216
1229
|
};
|
|
1217
1230
|
return t.cached.columnsNodeTypes = e, e;
|
|
1218
1231
|
}
|
|
1219
|
-
function
|
|
1220
|
-
const n =
|
|
1232
|
+
function wa(t, e, r = null) {
|
|
1233
|
+
const n = pa(t), a = [];
|
|
1221
1234
|
for (let o = 0; o < e; o += 1) {
|
|
1222
|
-
const c =
|
|
1235
|
+
const c = ga(n.column, o, r);
|
|
1223
1236
|
c && a.push(c);
|
|
1224
1237
|
}
|
|
1225
1238
|
return n.columns.createChecked({ cols: e }, a);
|
|
@@ -1229,7 +1242,7 @@ function be({
|
|
|
1229
1242
|
dispatch: e,
|
|
1230
1243
|
type: r
|
|
1231
1244
|
}) {
|
|
1232
|
-
const n = re((o) => o.type.name === le.name)(t.selection), a = re((o) => o.type.name ===
|
|
1245
|
+
const n = re((o) => o.type.name === le.name)(t.selection), a = re((o) => o.type.name === Kr.name)(t.selection);
|
|
1233
1246
|
if (e && n && a) {
|
|
1234
1247
|
const o = n.node, c = a.node.attrs.index, l = o.toJSON();
|
|
1235
1248
|
let s = c;
|
|
@@ -1259,7 +1272,7 @@ function be({
|
|
|
1259
1272
|
return !0;
|
|
1260
1273
|
}
|
|
1261
1274
|
function rr({ state: t, dispatch: e, type: r }) {
|
|
1262
|
-
const n = re((o) => o.type.name === le.name)(t.selection), a = re((o) => o.type.name ===
|
|
1275
|
+
const n = re((o) => o.type.name === le.name)(t.selection), a = re((o) => o.type.name === Kr.name)(t.selection);
|
|
1263
1276
|
if (e && n && a) {
|
|
1264
1277
|
const o = n.node, c = a.node.attrs.index;
|
|
1265
1278
|
let l = 0;
|
|
@@ -1273,14 +1286,14 @@ function rr({ state: t, dispatch: e, type: r }) {
|
|
|
1273
1286
|
}
|
|
1274
1287
|
return !1;
|
|
1275
1288
|
}
|
|
1276
|
-
const
|
|
1289
|
+
const va = 200, le = yt.create({
|
|
1277
1290
|
name: "columns",
|
|
1278
1291
|
group: "block",
|
|
1279
1292
|
defining: !0,
|
|
1280
1293
|
isolating: !0,
|
|
1281
1294
|
allowGapCursor: !1,
|
|
1282
1295
|
content: "column{1,}",
|
|
1283
|
-
priority:
|
|
1296
|
+
priority: va,
|
|
1284
1297
|
addOptions() {
|
|
1285
1298
|
return {
|
|
1286
1299
|
HTMLAttributes: {
|
|
@@ -1309,7 +1322,7 @@ const wa = 200, le = yt.create({
|
|
|
1309
1322
|
addCommands() {
|
|
1310
1323
|
return {
|
|
1311
1324
|
insertColumns: (t) => ({ tr: e, dispatch: r, editor: n }) => {
|
|
1312
|
-
const a =
|
|
1325
|
+
const a = wa(n.schema, t && t.cols || 3);
|
|
1313
1326
|
if (r) {
|
|
1314
1327
|
const o = e.selection.anchor + 1;
|
|
1315
1328
|
e.replaceSelectionWith(a).scrollIntoView().setSelection(Wt.near(e.doc.resolve(o)));
|
|
@@ -1336,7 +1349,7 @@ const wa = 200, le = yt.create({
|
|
|
1336
1349
|
})
|
|
1337
1350
|
};
|
|
1338
1351
|
}
|
|
1339
|
-
}),
|
|
1352
|
+
}), Kr = yt.create({
|
|
1340
1353
|
name: "column",
|
|
1341
1354
|
content: "block+",
|
|
1342
1355
|
isolating: !0,
|
|
@@ -1367,17 +1380,17 @@ const wa = 200, le = yt.create({
|
|
|
1367
1380
|
}
|
|
1368
1381
|
});
|
|
1369
1382
|
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
|
|
1383
|
+
function ba(t, e, r) {
|
|
1371
1384
|
return t < e ? e : t > r ? r : t;
|
|
1372
1385
|
}
|
|
1373
|
-
function
|
|
1386
|
+
function ya(t, e, r, n) {
|
|
1374
1387
|
const { doc: a, selection: o } = t;
|
|
1375
1388
|
if (!a || !o || !(o instanceof Wt || o instanceof Ri))
|
|
1376
1389
|
return t;
|
|
1377
1390
|
const { from: c, to: l } = o;
|
|
1378
1391
|
return a.nodesBetween(c, l, (s, h) => {
|
|
1379
1392
|
const d = s.type;
|
|
1380
|
-
return r.includes(d.name) ? (t = Ae(t, h, e), !1) : !
|
|
1393
|
+
return r.includes(d.name) ? (t = Ae(t, h, e), !1) : !yi(s.type.name, n.extensionManager.extensions);
|
|
1381
1394
|
}), t;
|
|
1382
1395
|
}
|
|
1383
1396
|
function Ae(t, e, r) {
|
|
@@ -1386,7 +1399,7 @@ function Ae(t, e, r) {
|
|
|
1386
1399
|
const n = t.doc.nodeAt(e);
|
|
1387
1400
|
if (!n)
|
|
1388
1401
|
return t;
|
|
1389
|
-
const c =
|
|
1402
|
+
const c = ba((n.attrs.indent || 0) + r, 0, 7);
|
|
1390
1403
|
if (c === n.attrs.indent)
|
|
1391
1404
|
return t;
|
|
1392
1405
|
const l = {
|
|
@@ -1395,18 +1408,18 @@ function Ae(t, e, r) {
|
|
|
1395
1408
|
};
|
|
1396
1409
|
return t.setNodeMarkup(e, n.type, l, n.marks);
|
|
1397
1410
|
}
|
|
1398
|
-
function
|
|
1411
|
+
function Ml({ delta: t, types: e }) {
|
|
1399
1412
|
return ({ state: r, dispatch: n, editor: a }) => {
|
|
1400
1413
|
const { selection: o } = r;
|
|
1401
1414
|
let { tr: c } = r;
|
|
1402
|
-
return c = c.setSelection(o), c =
|
|
1415
|
+
return c = c.setSelection(o), c = ya(c, t, e, a), c.docChanged ? (n && n(c), !0) : !1;
|
|
1403
1416
|
};
|
|
1404
1417
|
}
|
|
1405
|
-
const
|
|
1418
|
+
const Ca = {
|
|
1406
1419
|
setOpen: (t, e) => {
|
|
1407
1420
|
Be(bt.UPLOAD_IMAGE(t), e);
|
|
1408
1421
|
}
|
|
1409
|
-
}, ut = it.Root, mt = it.Trigger,
|
|
1422
|
+
}, ut = it.Root, mt = it.Trigger, Ta = it.Portal, Zr = W.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
|
|
1410
1423
|
it.Overlay,
|
|
1411
1424
|
{
|
|
1412
1425
|
ref: r,
|
|
@@ -1417,10 +1430,10 @@ const ya = {
|
|
|
1417
1430
|
...e
|
|
1418
1431
|
}
|
|
1419
1432
|
));
|
|
1420
|
-
|
|
1421
|
-
const lt = W.forwardRef(({ className: t, children: e, ...r }, n) => /* @__PURE__ */
|
|
1422
|
-
/* @__PURE__ */ i(
|
|
1423
|
-
/* @__PURE__ */
|
|
1433
|
+
Zr.displayName = it.Overlay.displayName;
|
|
1434
|
+
const lt = W.forwardRef(({ className: t, children: e, ...r }, n) => /* @__PURE__ */ f(Ta, { children: [
|
|
1435
|
+
/* @__PURE__ */ i(Zr, {}),
|
|
1436
|
+
/* @__PURE__ */ f(
|
|
1424
1437
|
it.Content,
|
|
1425
1438
|
{
|
|
1426
1439
|
ref: n,
|
|
@@ -1431,7 +1444,7 @@ const lt = W.forwardRef(({ className: t, children: e, ...r }, n) => /* @__PURE__
|
|
|
1431
1444
|
...r,
|
|
1432
1445
|
children: [
|
|
1433
1446
|
e,
|
|
1434
|
-
/* @__PURE__ */
|
|
1447
|
+
/* @__PURE__ */ f(it.Close, { className: "richtext-absolute richtext-right-4 richtext-top-4 richtext-rounded-sm richtext-opacity-70 richtext-ring-offset-background richtext-transition-opacity hover:richtext-opacity-100 focus:richtext-outline-none focus:richtext-ring-2 focus:richtext-ring-ring focus:richtext-ring-offset-2 disabled:richtext-pointer-events-none data-[state=open]:richtext-bg-accent data-[state=open]:richtext-text-muted-foreground", children: [
|
|
1435
1448
|
/* @__PURE__ */ i(Nr, { className: "richtext-h-4 richtext-w-4" }),
|
|
1436
1449
|
/* @__PURE__ */ i("span", { className: "richtext-sr-only", children: "Close" })
|
|
1437
1450
|
] })
|
|
@@ -1440,7 +1453,7 @@ const lt = W.forwardRef(({ className: t, children: e, ...r }, n) => /* @__PURE__
|
|
|
1440
1453
|
)
|
|
1441
1454
|
] }));
|
|
1442
1455
|
lt.displayName = it.Content.displayName;
|
|
1443
|
-
function
|
|
1456
|
+
function Jr({
|
|
1444
1457
|
className: t,
|
|
1445
1458
|
...e
|
|
1446
1459
|
}) {
|
|
@@ -1455,7 +1468,7 @@ function Qr({
|
|
|
1455
1468
|
}
|
|
1456
1469
|
);
|
|
1457
1470
|
}
|
|
1458
|
-
|
|
1471
|
+
Jr.displayName = "DialogHeader";
|
|
1459
1472
|
function wt({
|
|
1460
1473
|
className: t,
|
|
1461
1474
|
...e
|
|
@@ -1484,7 +1497,7 @@ const dt = W.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
|
|
|
1484
1497
|
}
|
|
1485
1498
|
));
|
|
1486
1499
|
dt.displayName = it.Title.displayName;
|
|
1487
|
-
const
|
|
1500
|
+
const Na = W.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
|
|
1488
1501
|
it.Description,
|
|
1489
1502
|
{
|
|
1490
1503
|
ref: r,
|
|
@@ -1492,20 +1505,20 @@ const Ta = W.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
|
|
|
1492
1505
|
...e
|
|
1493
1506
|
}
|
|
1494
1507
|
));
|
|
1495
|
-
|
|
1496
|
-
function
|
|
1508
|
+
Na.displayName = it.Description.displayName;
|
|
1509
|
+
function Al(t) {
|
|
1497
1510
|
return t.replace(/^.*\/|\..+$/g, "");
|
|
1498
1511
|
}
|
|
1499
|
-
function
|
|
1512
|
+
function Ll(t) {
|
|
1500
1513
|
return t.split(".").pop();
|
|
1501
1514
|
}
|
|
1502
|
-
function
|
|
1515
|
+
function Il(t) {
|
|
1503
1516
|
return t < 1024 ? `${t} Byte` : t < 1024 * 1024 ? `${(t / 1024).toFixed(2)} KB` : `${(t / 1024 / 1024).toFixed(2)} MB`;
|
|
1504
1517
|
}
|
|
1505
|
-
function
|
|
1518
|
+
function El(t) {
|
|
1506
1519
|
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
1520
|
}
|
|
1508
|
-
function
|
|
1521
|
+
function ka(t) {
|
|
1509
1522
|
return new Promise((e) => {
|
|
1510
1523
|
const r = new FileReader();
|
|
1511
1524
|
r.addEventListener(
|
|
@@ -1528,7 +1541,7 @@ function qt(t, e) {
|
|
|
1528
1541
|
c[o] = a.charCodeAt(o);
|
|
1529
1542
|
return new File([c], e, { type: n });
|
|
1530
1543
|
}
|
|
1531
|
-
function
|
|
1544
|
+
function Sa({ editor: t, imageInline: e, onClose: r }) {
|
|
1532
1545
|
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
1546
|
src: "",
|
|
1534
1547
|
file: null
|
|
@@ -1555,7 +1568,7 @@ function ka({ editor: t, imageInline: e, onClose: r }) {
|
|
|
1555
1568
|
y.height * L
|
|
1556
1569
|
)), C.toDataURL("image/png", 1);
|
|
1557
1570
|
}
|
|
1558
|
-
async function
|
|
1571
|
+
async function g() {
|
|
1559
1572
|
var v, y;
|
|
1560
1573
|
try {
|
|
1561
1574
|
const C = qt(h, ((v = m == null ? void 0 : m.file) == null ? void 0 : v.name) || "image.png"), M = (y = t.extensionManager.extensions.find(
|
|
@@ -1579,13 +1592,13 @@ function ka({ editor: t, imageInline: e, onClose: r }) {
|
|
|
1579
1592
|
const y = (L = v == null ? void 0 : v.target) == null ? void 0 : L.files;
|
|
1580
1593
|
if (!t || t.isDestroyed || y.length === 0)
|
|
1581
1594
|
return;
|
|
1582
|
-
const C = y[0], M = await
|
|
1595
|
+
const C = y[0], M = await ka(C);
|
|
1583
1596
|
o(!0), x({
|
|
1584
1597
|
src: M.src,
|
|
1585
1598
|
file: C
|
|
1586
1599
|
});
|
|
1587
1600
|
};
|
|
1588
|
-
return /* @__PURE__ */
|
|
1601
|
+
return /* @__PURE__ */ f(V, { children: [
|
|
1589
1602
|
/* @__PURE__ */ i(
|
|
1590
1603
|
G,
|
|
1591
1604
|
{
|
|
@@ -1595,9 +1608,9 @@ function ka({ editor: t, imageInline: e, onClose: r }) {
|
|
|
1595
1608
|
children: n("editor.image.dialog.tab.uploadCrop")
|
|
1596
1609
|
}
|
|
1597
1610
|
),
|
|
1598
|
-
/* @__PURE__ */
|
|
1611
|
+
/* @__PURE__ */ f(ut, { open: a, children: [
|
|
1599
1612
|
/* @__PURE__ */ i(mt, {}),
|
|
1600
|
-
/* @__PURE__ */
|
|
1613
|
+
/* @__PURE__ */ f(lt, { children: [
|
|
1601
1614
|
/* @__PURE__ */ i(dt, { children: n("editor.image.dialog.tab.uploadCrop") }),
|
|
1602
1615
|
/* @__PURE__ */ i("div", { children: m.src && /* @__PURE__ */ i(
|
|
1603
1616
|
mo,
|
|
@@ -1616,8 +1629,8 @@ function ka({ editor: t, imageInline: e, onClose: r }) {
|
|
|
1616
1629
|
)
|
|
1617
1630
|
}
|
|
1618
1631
|
) }),
|
|
1619
|
-
/* @__PURE__ */
|
|
1620
|
-
/* @__PURE__ */
|
|
1632
|
+
/* @__PURE__ */ f(wt, { children: [
|
|
1633
|
+
/* @__PURE__ */ f(
|
|
1621
1634
|
G,
|
|
1622
1635
|
{
|
|
1623
1636
|
onClick: () => {
|
|
@@ -1629,7 +1642,7 @@ function ka({ editor: t, imageInline: e, onClose: r }) {
|
|
|
1629
1642
|
children: [
|
|
1630
1643
|
n("editor.imageUpload.cancel"),
|
|
1631
1644
|
/* @__PURE__ */ i(
|
|
1632
|
-
|
|
1645
|
+
Y,
|
|
1633
1646
|
{
|
|
1634
1647
|
className: "richtext-ml-[4px]",
|
|
1635
1648
|
name: "Trash2"
|
|
@@ -1638,15 +1651,15 @@ function ka({ editor: t, imageInline: e, onClose: r }) {
|
|
|
1638
1651
|
]
|
|
1639
1652
|
}
|
|
1640
1653
|
),
|
|
1641
|
-
/* @__PURE__ */
|
|
1654
|
+
/* @__PURE__ */ f(
|
|
1642
1655
|
G,
|
|
1643
1656
|
{
|
|
1644
1657
|
className: "richtext-w-fit",
|
|
1645
|
-
onClick:
|
|
1658
|
+
onClick: g,
|
|
1646
1659
|
children: [
|
|
1647
1660
|
n("editor.imageUpload.crop"),
|
|
1648
1661
|
/* @__PURE__ */ i(
|
|
1649
|
-
|
|
1662
|
+
Y,
|
|
1650
1663
|
{
|
|
1651
1664
|
className: "richtext-ml-[4px]",
|
|
1652
1665
|
name: "Crop"
|
|
@@ -1673,17 +1686,17 @@ function ka({ editor: t, imageInline: e, onClose: r }) {
|
|
|
1673
1686
|
)
|
|
1674
1687
|
] });
|
|
1675
1688
|
}
|
|
1676
|
-
function
|
|
1689
|
+
function Ma(t) {
|
|
1677
1690
|
var w;
|
|
1678
1691
|
const { t: e } = q(), [r, n] = S(!1), a = (p) => {
|
|
1679
1692
|
n(p.detail);
|
|
1680
1693
|
}, [o, c] = S(""), l = J(null), [s, h] = S(((w = t.editor.extensionManager.extensions.find(
|
|
1681
1694
|
(p) => p.name === Vt.name
|
|
1682
1695
|
)) == null ? void 0 : w.options.defaultInline) || !1), d = U(() => {
|
|
1683
|
-
var
|
|
1684
|
-
return (
|
|
1696
|
+
var g;
|
|
1697
|
+
return (g = t.editor.extensionManager.extensions.find(
|
|
1685
1698
|
(I) => I.name === Vt.name
|
|
1686
|
-
)) == null ? void 0 :
|
|
1699
|
+
)) == null ? void 0 : g.options;
|
|
1687
1700
|
}, [t.editor]);
|
|
1688
1701
|
B(() => {
|
|
1689
1702
|
const p = se(bt.UPLOAD_IMAGE(t.editor.id), a);
|
|
@@ -1693,10 +1706,10 @@ function Sa(t) {
|
|
|
1693
1706
|
}, []);
|
|
1694
1707
|
async function u(p) {
|
|
1695
1708
|
var v;
|
|
1696
|
-
const
|
|
1697
|
-
if (!t.editor || t.editor.isDestroyed ||
|
|
1709
|
+
const g = (v = p == null ? void 0 : p.target) == null ? void 0 : v.files;
|
|
1710
|
+
if (!t.editor || t.editor.isDestroyed || g.length === 0)
|
|
1698
1711
|
return;
|
|
1699
|
-
const I =
|
|
1712
|
+
const I = g[0];
|
|
1700
1713
|
let T = "";
|
|
1701
1714
|
d.upload ? T = await d.upload(I) : T = URL.createObjectURL(I), t.editor.chain().focus().setImageInline({ src: T, inline: s }).run(), n(!1), h(!1);
|
|
1702
1715
|
}
|
|
@@ -1704,10 +1717,10 @@ function Sa(t) {
|
|
|
1704
1717
|
p.preventDefault(), p.stopPropagation(), t.editor.chain().focus().setImageInline({ src: o, inline: s }).run(), n(!1), h(!1), c("");
|
|
1705
1718
|
}
|
|
1706
1719
|
function x(p) {
|
|
1707
|
-
var
|
|
1708
|
-
p.preventDefault(), (
|
|
1720
|
+
var g;
|
|
1721
|
+
p.preventDefault(), (g = l.current) == null || g.click();
|
|
1709
1722
|
}
|
|
1710
|
-
return /* @__PURE__ */
|
|
1723
|
+
return /* @__PURE__ */ f(
|
|
1711
1724
|
ut,
|
|
1712
1725
|
{
|
|
1713
1726
|
onOpenChange: n,
|
|
@@ -1721,19 +1734,19 @@ function Sa(t) {
|
|
|
1721
1734
|
tooltip: t.tooltip
|
|
1722
1735
|
}
|
|
1723
1736
|
) }),
|
|
1724
|
-
/* @__PURE__ */
|
|
1737
|
+
/* @__PURE__ */ f(lt, { children: [
|
|
1725
1738
|
/* @__PURE__ */ i(dt, { children: e("editor.image.dialog.title") }),
|
|
1726
|
-
/* @__PURE__ */
|
|
1739
|
+
/* @__PURE__ */ f(
|
|
1727
1740
|
$r,
|
|
1728
1741
|
{
|
|
1729
1742
|
activationMode: "manual",
|
|
1730
1743
|
defaultValue: d.resourceImage === "both" || d.resourceImage === "upload" ? "upload" : "link",
|
|
1731
1744
|
children: [
|
|
1732
|
-
/* @__PURE__ */
|
|
1745
|
+
/* @__PURE__ */ f(Ve, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
|
|
1733
1746
|
d.resourceImage === "both" || d.resourceImage === "upload" ? /* @__PURE__ */ i(Bt, { value: "upload", children: e("editor.image.dialog.tab.upload") }) : /* @__PURE__ */ i(V, {}),
|
|
1734
1747
|
d.resourceImage === "both" || d.resourceImage === "link" ? /* @__PURE__ */ i(Bt, { value: "link", children: e("editor.image.dialog.tab.url") }) : /* @__PURE__ */ i(V, {})
|
|
1735
1748
|
] }),
|
|
1736
|
-
/* @__PURE__ */
|
|
1749
|
+
/* @__PURE__ */ f("div", { className: "richtext-my-[10px] richtext-flex richtext-items-center richtext-gap-[4px]", children: [
|
|
1737
1750
|
/* @__PURE__ */ i(
|
|
1738
1751
|
Yr,
|
|
1739
1752
|
{
|
|
@@ -1745,8 +1758,8 @@ function Sa(t) {
|
|
|
1745
1758
|
),
|
|
1746
1759
|
/* @__PURE__ */ i(ct, { children: e("editor.link.dialog.inline") })
|
|
1747
1760
|
] }),
|
|
1748
|
-
/* @__PURE__ */
|
|
1749
|
-
/* @__PURE__ */
|
|
1761
|
+
/* @__PURE__ */ f($t, { value: "upload", children: [
|
|
1762
|
+
/* @__PURE__ */ f("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: [
|
|
1750
1763
|
/* @__PURE__ */ i(
|
|
1751
1764
|
G,
|
|
1752
1765
|
{
|
|
@@ -1757,11 +1770,11 @@ function Sa(t) {
|
|
|
1757
1770
|
}
|
|
1758
1771
|
),
|
|
1759
1772
|
/* @__PURE__ */ i(
|
|
1760
|
-
|
|
1773
|
+
Sa,
|
|
1761
1774
|
{
|
|
1762
1775
|
editor: t.editor,
|
|
1763
1776
|
imageInline: s,
|
|
1764
|
-
onClose: () =>
|
|
1777
|
+
onClose: () => Ca.setOpen(t.editor.id, !1)
|
|
1765
1778
|
}
|
|
1766
1779
|
)
|
|
1767
1780
|
] }),
|
|
@@ -1779,9 +1792,9 @@ function Sa(t) {
|
|
|
1779
1792
|
}
|
|
1780
1793
|
)
|
|
1781
1794
|
] }),
|
|
1782
|
-
/* @__PURE__ */ i($t, { value: "link", children: /* @__PURE__ */ i("form", { onSubmit: m, children: /* @__PURE__ */
|
|
1795
|
+
/* @__PURE__ */ i($t, { value: "link", children: /* @__PURE__ */ i("form", { onSubmit: m, children: /* @__PURE__ */ f("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
|
|
1783
1796
|
/* @__PURE__ */ i(
|
|
1784
|
-
|
|
1797
|
+
tt,
|
|
1785
1798
|
{
|
|
1786
1799
|
autoFocus: !0,
|
|
1787
1800
|
onChange: (p) => c(p.target.value),
|
|
@@ -1807,7 +1820,7 @@ const Yt = {
|
|
|
1807
1820
|
BOTTOM_LEFT: "bl",
|
|
1808
1821
|
BOTTOM_RIGHT: "br"
|
|
1809
1822
|
};
|
|
1810
|
-
function
|
|
1823
|
+
function Aa(t) {
|
|
1811
1824
|
var L, N;
|
|
1812
1825
|
const [e, r] = S({
|
|
1813
1826
|
width: xt,
|
|
@@ -1830,14 +1843,14 @@ function Ma(t) {
|
|
|
1830
1843
|
var nt;
|
|
1831
1844
|
const { src: E, alt: b, width: k, height: _, flipX: D, flipY: R } = (nt = t == null ? void 0 : t.node) == null ? void 0 : nt.attrs, A = ae(k) ? `${k}px` : k, $ = ae(_) ? `${_}px` : _, F = [];
|
|
1832
1845
|
D && F.push("rotateX(180deg)"), R && F.push("rotateY(180deg)");
|
|
1833
|
-
const
|
|
1846
|
+
const K = F.join(" ");
|
|
1834
1847
|
return {
|
|
1835
1848
|
src: E || void 0,
|
|
1836
1849
|
alt: b || void 0,
|
|
1837
1850
|
style: {
|
|
1838
1851
|
width: A || void 0,
|
|
1839
1852
|
height: $ || void 0,
|
|
1840
|
-
transform:
|
|
1853
|
+
transform: K || "none"
|
|
1841
1854
|
}
|
|
1842
1855
|
};
|
|
1843
1856
|
}, [(N = t == null ? void 0 : t.node) == null ? void 0 : N.attrs]), x = U(() => {
|
|
@@ -1856,7 +1869,7 @@ function Ma(t) {
|
|
|
1856
1869
|
const { editor: E, getPos: b } = t;
|
|
1857
1870
|
E.commands.setNodeSelection(b());
|
|
1858
1871
|
}
|
|
1859
|
-
const
|
|
1872
|
+
const g = H(
|
|
1860
1873
|
ht(() => {
|
|
1861
1874
|
const { editor: E } = t, { width: b } = getComputedStyle(E.view.dom);
|
|
1862
1875
|
r((k) => ({
|
|
@@ -1909,7 +1922,7 @@ function Ma(t) {
|
|
|
1909
1922
|
B(() => (c ? y() : C(), () => {
|
|
1910
1923
|
C();
|
|
1911
1924
|
}), [c, y, C]);
|
|
1912
|
-
const M = U(() => new ResizeObserver(() =>
|
|
1925
|
+
const M = U(() => new ResizeObserver(() => g()), [g]);
|
|
1913
1926
|
return B(() => (M.observe(t.editor.view.dom), () => {
|
|
1914
1927
|
M.disconnect();
|
|
1915
1928
|
}), [t.editor.view.dom, M]), /* @__PURE__ */ i(
|
|
@@ -1918,7 +1931,7 @@ function Ma(t) {
|
|
|
1918
1931
|
as: u ? "span" : "div",
|
|
1919
1932
|
className: "image-view",
|
|
1920
1933
|
style: { ...x, textAlign: d, display: u ? "inline" : "block" },
|
|
1921
|
-
children: /* @__PURE__ */
|
|
1934
|
+
children: /* @__PURE__ */ f(
|
|
1922
1935
|
"div",
|
|
1923
1936
|
{
|
|
1924
1937
|
"data-drag-handle": !0,
|
|
@@ -1953,7 +1966,7 @@ function Ma(t) {
|
|
|
1953
1966
|
);
|
|
1954
1967
|
}
|
|
1955
1968
|
const At = new He("upload-image");
|
|
1956
|
-
function
|
|
1969
|
+
function La() {
|
|
1957
1970
|
return new De({
|
|
1958
1971
|
key: At,
|
|
1959
1972
|
state: {
|
|
@@ -1965,7 +1978,7 @@ function Aa() {
|
|
|
1965
1978
|
const r = t.getMeta(At);
|
|
1966
1979
|
if (r != null && r.add)
|
|
1967
1980
|
for (const { id: n, pos: a, src: o } of r.add) {
|
|
1968
|
-
const c =
|
|
1981
|
+
const c = Ia(o), l = Oi.widget(a, c, { id: n });
|
|
1969
1982
|
e = e.add(t.doc, [l]);
|
|
1970
1983
|
}
|
|
1971
1984
|
else if (r != null && r.remove)
|
|
@@ -1981,18 +1994,18 @@ function Aa() {
|
|
|
1981
1994
|
}
|
|
1982
1995
|
});
|
|
1983
1996
|
}
|
|
1984
|
-
function
|
|
1997
|
+
function Ia(t) {
|
|
1985
1998
|
const e = document.createElement("div"), r = document.createElement("img");
|
|
1986
1999
|
return r.setAttribute("class", "opacity-50"), r.src = t, r.addEventListener("load", () => {
|
|
1987
2000
|
e.setAttribute("class", "img-placeholder");
|
|
1988
2001
|
}), e.append(r), e;
|
|
1989
2002
|
}
|
|
1990
|
-
function
|
|
2003
|
+
function Ea(t, e) {
|
|
1991
2004
|
var a;
|
|
1992
2005
|
const n = At.getState(t).find(void 0, void 0, (o) => o.id === e);
|
|
1993
2006
|
return n.length > 0 ? (a = n[0]) == null ? void 0 : a.from : null;
|
|
1994
2007
|
}
|
|
1995
|
-
function
|
|
2008
|
+
function za({ validateFn: t, onUpload: e, postUpload: r, defaultInline: n = !1 }) {
|
|
1996
2009
|
return (a, o, c) => {
|
|
1997
2010
|
for (const l of a) {
|
|
1998
2011
|
if (t && !t(l))
|
|
@@ -2007,7 +2020,7 @@ function Ea({ validateFn: t, onUpload: e, postUpload: r, defaultInline: n = !1 }
|
|
|
2007
2020
|
var T;
|
|
2008
2021
|
r && typeof u == "string" && (u = await r(u));
|
|
2009
2022
|
const { schema: m } = o.state;
|
|
2010
|
-
let x =
|
|
2023
|
+
let x = Ea(o.state, s);
|
|
2011
2024
|
if (x === null)
|
|
2012
2025
|
return;
|
|
2013
2026
|
const w = typeof u == "object" ? d : u, p = (T = m.nodes.image) == null ? void 0 : T.create({
|
|
@@ -2016,8 +2029,8 @@ function Ea({ validateFn: t, onUpload: e, postUpload: r, defaultInline: n = !1 }
|
|
|
2016
2029
|
});
|
|
2017
2030
|
if (!p)
|
|
2018
2031
|
return;
|
|
2019
|
-
const { doc:
|
|
2020
|
-
x >
|
|
2032
|
+
const { doc: g } = o.state;
|
|
2033
|
+
x > g.content.size && (x = g.content.size - 1);
|
|
2021
2034
|
const I = o.state.tr.replaceWith(x, x, p).setMeta(At, { remove: [s] });
|
|
2022
2035
|
o.dispatch(I);
|
|
2023
2036
|
},
|
|
@@ -2029,7 +2042,7 @@ function Ea({ validateFn: t, onUpload: e, postUpload: r, defaultInline: n = !1 }
|
|
|
2029
2042
|
}
|
|
2030
2043
|
};
|
|
2031
2044
|
}
|
|
2032
|
-
function
|
|
2045
|
+
function Pa(t, e, r) {
|
|
2033
2046
|
var a;
|
|
2034
2047
|
const n = [...((a = e.clipboardData) == null ? void 0 : a.files) || []];
|
|
2035
2048
|
if (n.length > 0) {
|
|
@@ -2039,7 +2052,7 @@ function za(t, e, r) {
|
|
|
2039
2052
|
}
|
|
2040
2053
|
return !1;
|
|
2041
2054
|
}
|
|
2042
|
-
function
|
|
2055
|
+
function Ra(t, e, r, n) {
|
|
2043
2056
|
var o;
|
|
2044
2057
|
const a = [...((o = e.dataTransfer) == null ? void 0 : o.files) || []];
|
|
2045
2058
|
if (!r && a.length > 0) {
|
|
@@ -2053,7 +2066,7 @@ function Pa(t, e, r, n) {
|
|
|
2053
2066
|
}
|
|
2054
2067
|
return !1;
|
|
2055
2068
|
}
|
|
2056
|
-
const
|
|
2069
|
+
const Oa = {
|
|
2057
2070
|
acceptMimes: ["image/jpeg", "image/gif", "image/png", "image/jpg"],
|
|
2058
2071
|
maxSize: 1024 * 1024 * 5,
|
|
2059
2072
|
// 5MB
|
|
@@ -2068,7 +2081,7 @@ const Ra = {
|
|
|
2068
2081
|
addOptions() {
|
|
2069
2082
|
var t;
|
|
2070
2083
|
return {
|
|
2071
|
-
...
|
|
2084
|
+
...Oa,
|
|
2072
2085
|
...(t = this.parent) == null ? void 0 : t.call(this),
|
|
2073
2086
|
upload: () => Promise.reject("Image Upload Function"),
|
|
2074
2087
|
button: ({
|
|
@@ -2078,7 +2091,7 @@ const Ra = {
|
|
|
2078
2091
|
}) => {
|
|
2079
2092
|
var a, o;
|
|
2080
2093
|
return {
|
|
2081
|
-
component:
|
|
2094
|
+
component: Ma,
|
|
2082
2095
|
componentProps: {
|
|
2083
2096
|
action: () => !0,
|
|
2084
2097
|
upload: r.options.upload,
|
|
@@ -2129,7 +2142,7 @@ const Ra = {
|
|
|
2129
2142
|
};
|
|
2130
2143
|
},
|
|
2131
2144
|
addNodeView() {
|
|
2132
|
-
return pt(
|
|
2145
|
+
return pt(Aa);
|
|
2133
2146
|
},
|
|
2134
2147
|
addCommands() {
|
|
2135
2148
|
var t;
|
|
@@ -2205,7 +2218,7 @@ const Ra = {
|
|
|
2205
2218
|
];
|
|
2206
2219
|
},
|
|
2207
2220
|
addProseMirrorPlugins() {
|
|
2208
|
-
const e =
|
|
2221
|
+
const e = za({
|
|
2209
2222
|
validateFn: (r) => !(!this.options.acceptMimes.includes(r.type) || r.size > this.options.maxSize),
|
|
2210
2223
|
onUpload: this.options.upload,
|
|
2211
2224
|
// postUpload: this.options.postUpload,
|
|
@@ -2214,18 +2227,18 @@ const Ra = {
|
|
|
2214
2227
|
return [
|
|
2215
2228
|
new De({
|
|
2216
2229
|
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 ||
|
|
2230
|
+
handlePaste: (r, n) => !n.clipboardData || [...n.clipboardData.files || []].some((o) => o.type === "text/html") ? !1 : Pa(r, n, e),
|
|
2231
|
+
handleDrop: (r, n, a, o) => (!(n instanceof DragEvent) || !n.dataTransfer || Ra(r, n, o, e), !1)
|
|
2219
2232
|
}
|
|
2220
2233
|
}),
|
|
2221
|
-
|
|
2234
|
+
La()
|
|
2222
2235
|
];
|
|
2223
2236
|
}
|
|
2224
2237
|
});
|
|
2225
|
-
function
|
|
2238
|
+
function Ha(t) {
|
|
2226
2239
|
return /\.(?:mp4|webm|ogg|mov)$/i.test(t);
|
|
2227
2240
|
}
|
|
2228
|
-
function
|
|
2241
|
+
function Da(t) {
|
|
2229
2242
|
const { t: e } = q(), [r, n] = S(""), a = J(null), [o, c] = S(""), [l, s] = S(!1), h = (w) => {
|
|
2230
2243
|
s(w.detail);
|
|
2231
2244
|
};
|
|
@@ -2238,7 +2251,7 @@ function Ha(t) {
|
|
|
2238
2251
|
const d = U(() => {
|
|
2239
2252
|
var p;
|
|
2240
2253
|
return (p = t.editor.extensionManager.extensions.find(
|
|
2241
|
-
(
|
|
2254
|
+
(g) => g.name === Qr.name
|
|
2242
2255
|
)) == null ? void 0 : p.options;
|
|
2243
2256
|
}, [t.editor]);
|
|
2244
2257
|
async function u(w) {
|
|
@@ -2246,9 +2259,9 @@ function Ha(t) {
|
|
|
2246
2259
|
const p = (T = w == null ? void 0 : w.target) == null ? void 0 : T.files;
|
|
2247
2260
|
if (!t.editor || t.editor.isDestroyed || p.length === 0)
|
|
2248
2261
|
return;
|
|
2249
|
-
const
|
|
2262
|
+
const g = p[0];
|
|
2250
2263
|
let I = "";
|
|
2251
|
-
d.upload ? I = await d.upload(
|
|
2264
|
+
d.upload ? I = await d.upload(g) : I = URL.createObjectURL(g), t.editor.chain().focus().setVideo({
|
|
2252
2265
|
src: I,
|
|
2253
2266
|
width: "100%"
|
|
2254
2267
|
}).run(), s(!1);
|
|
@@ -2263,7 +2276,7 @@ function Ha(t) {
|
|
|
2263
2276
|
var p;
|
|
2264
2277
|
w.preventDefault(), (p = a.current) == null || p.click();
|
|
2265
2278
|
}
|
|
2266
|
-
return /* @__PURE__ */
|
|
2279
|
+
return /* @__PURE__ */ f(
|
|
2267
2280
|
ut,
|
|
2268
2281
|
{
|
|
2269
2282
|
onOpenChange: s,
|
|
@@ -2277,19 +2290,19 @@ function Ha(t) {
|
|
|
2277
2290
|
tooltip: t.tooltip
|
|
2278
2291
|
}
|
|
2279
2292
|
) }),
|
|
2280
|
-
/* @__PURE__ */
|
|
2293
|
+
/* @__PURE__ */ f(lt, { children: [
|
|
2281
2294
|
/* @__PURE__ */ i(dt, { children: e("editor.video.dialog.title") }),
|
|
2282
|
-
/* @__PURE__ */
|
|
2295
|
+
/* @__PURE__ */ f(
|
|
2283
2296
|
$r,
|
|
2284
2297
|
{
|
|
2285
2298
|
activationMode: "manual",
|
|
2286
2299
|
defaultValue: (d == null ? void 0 : d.resourceVideo) === "both" || (d == null ? void 0 : d.resourceVideo) === "upload" ? "upload" : "link",
|
|
2287
2300
|
children: [
|
|
2288
|
-
/* @__PURE__ */
|
|
2301
|
+
/* @__PURE__ */ f(Ve, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
|
|
2289
2302
|
((d == null ? void 0 : d.resourceVideo) === "both" || (d == null ? void 0 : d.resourceVideo) === "upload") && /* @__PURE__ */ i(Bt, { value: "upload", children: e("editor.video.dialog.tab.upload") }),
|
|
2290
2303
|
((d == null ? void 0 : d.resourceVideo) === "both" || (d == null ? void 0 : d.resourceVideo) === "link") && /* @__PURE__ */ i(Bt, { value: "link", children: e("editor.video.dialog.link") })
|
|
2291
2304
|
] }),
|
|
2292
|
-
/* @__PURE__ */
|
|
2305
|
+
/* @__PURE__ */ f($t, { value: "upload", children: [
|
|
2293
2306
|
/* @__PURE__ */ i("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: /* @__PURE__ */ i(
|
|
2294
2307
|
G,
|
|
2295
2308
|
{
|
|
@@ -2313,10 +2326,10 @@ function Ha(t) {
|
|
|
2313
2326
|
}
|
|
2314
2327
|
)
|
|
2315
2328
|
] }),
|
|
2316
|
-
/* @__PURE__ */
|
|
2317
|
-
/* @__PURE__ */ i("form", { onSubmit: m, children: /* @__PURE__ */
|
|
2329
|
+
/* @__PURE__ */ f($t, { value: "link", children: [
|
|
2330
|
+
/* @__PURE__ */ i("form", { onSubmit: m, children: /* @__PURE__ */ f("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
|
|
2318
2331
|
/* @__PURE__ */ i(
|
|
2319
|
-
|
|
2332
|
+
tt,
|
|
2320
2333
|
{
|
|
2321
2334
|
autoFocus: !0,
|
|
2322
2335
|
placeholder: e("editor.video.dialog.placeholder"),
|
|
@@ -2325,7 +2338,7 @@ function Ha(t) {
|
|
|
2325
2338
|
value: r,
|
|
2326
2339
|
onChange: (w) => {
|
|
2327
2340
|
const p = w.target.value;
|
|
2328
|
-
if (!
|
|
2341
|
+
if (!Ha(p)) {
|
|
2329
2342
|
c("Invalid video URL"), n("");
|
|
2330
2343
|
return;
|
|
2331
2344
|
}
|
|
@@ -2345,10 +2358,10 @@ function Ha(t) {
|
|
|
2345
2358
|
}
|
|
2346
2359
|
);
|
|
2347
2360
|
}
|
|
2348
|
-
function
|
|
2361
|
+
function _a(t) {
|
|
2349
2362
|
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
2363
|
}
|
|
2351
|
-
const
|
|
2364
|
+
const Qr = yt.create({
|
|
2352
2365
|
name: "video",
|
|
2353
2366
|
group: "block",
|
|
2354
2367
|
atom: !0,
|
|
@@ -2369,7 +2382,7 @@ const ti = yt.create({
|
|
|
2369
2382
|
button: ({ editor: t, t: e }) => {
|
|
2370
2383
|
var r, n;
|
|
2371
2384
|
return {
|
|
2372
|
-
component:
|
|
2385
|
+
component: Da,
|
|
2373
2386
|
componentProps: {
|
|
2374
2387
|
action: () => {
|
|
2375
2388
|
},
|
|
@@ -2389,7 +2402,7 @@ const ti = yt.create({
|
|
|
2389
2402
|
src: {
|
|
2390
2403
|
default: null,
|
|
2391
2404
|
renderHTML: ({ src: t }) => ({
|
|
2392
|
-
src: t ?
|
|
2405
|
+
src: t ? _a(t) : null
|
|
2393
2406
|
})
|
|
2394
2407
|
},
|
|
2395
2408
|
width: {
|
|
@@ -2435,11 +2448,11 @@ const ti = yt.create({
|
|
|
2435
2448
|
updateVideo: (t) => ({ commands: e }) => e.updateAttributes(this.name, t)
|
|
2436
2449
|
};
|
|
2437
2450
|
}
|
|
2438
|
-
}),
|
|
2439
|
-
wrap:
|
|
2440
|
-
innerWrap:
|
|
2451
|
+
}), Ba = "_wrap_5y04w_1", $a = "_innerWrap_5y04w_15", ir = {
|
|
2452
|
+
wrap: Ba,
|
|
2453
|
+
innerWrap: $a
|
|
2441
2454
|
};
|
|
2442
|
-
function
|
|
2455
|
+
function Va({ editor: t, node: e, updateAttributes: r }) {
|
|
2443
2456
|
const n = wo(), { url: a, width: o, height: c } = e.attrs, [l, s] = S("");
|
|
2444
2457
|
function h() {
|
|
2445
2458
|
l && t.chain().updateAttributes(kt.name, {
|
|
@@ -2452,10 +2465,10 @@ function $a({ editor: t, node: e, updateAttributes: r }) {
|
|
|
2452
2465
|
},
|
|
2453
2466
|
[r]
|
|
2454
2467
|
);
|
|
2455
|
-
return /* @__PURE__ */
|
|
2456
|
-
!a && /* @__PURE__ */
|
|
2468
|
+
return /* @__PURE__ */ f(gt, { children: [
|
|
2469
|
+
!a && /* @__PURE__ */ f("div", { className: "richtext-mx-auto richtext-my-[12px] richtext-flex richtext-max-w-[600px] richtext-items-center richtext-justify-center richtext-gap-[10px] richtext-rounded-[12px] richtext-border richtext-border-solid richtext-border-[#ccc] richtext-p-[10px]", children: [
|
|
2457
2470
|
/* @__PURE__ */ i(
|
|
2458
|
-
|
|
2471
|
+
tt,
|
|
2459
2472
|
{
|
|
2460
2473
|
autoFocus: !0,
|
|
2461
2474
|
className: "richtext-flex-1",
|
|
@@ -2502,7 +2515,7 @@ function $a({ editor: t, node: e, updateAttributes: r }) {
|
|
|
2502
2515
|
)
|
|
2503
2516
|
] });
|
|
2504
2517
|
}
|
|
2505
|
-
function
|
|
2518
|
+
function Wa(t) {
|
|
2506
2519
|
try {
|
|
2507
2520
|
return JSON.stringify(t);
|
|
2508
2521
|
} catch {
|
|
@@ -2535,14 +2548,14 @@ function Lt(t, e = !1) {
|
|
|
2535
2548
|
return o !== o ? a : o;
|
|
2536
2549
|
};
|
|
2537
2550
|
}
|
|
2538
|
-
function
|
|
2551
|
+
function Fa(t) {
|
|
2539
2552
|
const { attrs: e } = t;
|
|
2540
2553
|
return Object.keys(e).reduce((r, n) => {
|
|
2541
2554
|
const a = e[n];
|
|
2542
2555
|
if (a == null)
|
|
2543
2556
|
return r;
|
|
2544
2557
|
let o = "";
|
|
2545
|
-
return typeof a == "object" ? o =
|
|
2558
|
+
return typeof a == "object" ? o = Wa(a) : o = a, r[n] = o, r;
|
|
2546
2559
|
}, /* @__PURE__ */ Object.create(null));
|
|
2547
2560
|
}
|
|
2548
2561
|
const kt = yt.create({
|
|
@@ -2636,7 +2649,7 @@ const kt = yt.create({
|
|
|
2636
2649
|
];
|
|
2637
2650
|
},
|
|
2638
2651
|
addNodeView() {
|
|
2639
|
-
return pt(
|
|
2652
|
+
return pt(Va);
|
|
2640
2653
|
}
|
|
2641
2654
|
}), jt = W.forwardRef(
|
|
2642
2655
|
({ className: t, ...e }, r) => /* @__PURE__ */ i(
|
|
@@ -2652,11 +2665,11 @@ const kt = yt.create({
|
|
|
2652
2665
|
)
|
|
2653
2666
|
);
|
|
2654
2667
|
jt.displayName = "Textarea";
|
|
2655
|
-
function
|
|
2668
|
+
function Ua(t) {
|
|
2656
2669
|
return t;
|
|
2657
2670
|
}
|
|
2658
2671
|
function zt(t, e, r, n) {
|
|
2659
|
-
const a =
|
|
2672
|
+
const a = Ua, [o, c] = S(a(r)), l = J(o);
|
|
2660
2673
|
return B(() => {
|
|
2661
2674
|
const s = () => {
|
|
2662
2675
|
const h = { ...r, ...t.getAttributes(e) };
|
|
@@ -2671,7 +2684,7 @@ function zt(t, e, r, n) {
|
|
|
2671
2684
|
};
|
|
2672
2685
|
}, [t, r, e, a]), o;
|
|
2673
2686
|
}
|
|
2674
|
-
function
|
|
2687
|
+
function Ga({ editor: t, ...e }) {
|
|
2675
2688
|
const { t: r } = q(), n = zt(t, Mt.name, {
|
|
2676
2689
|
text: "",
|
|
2677
2690
|
defaultShowPicker: !1
|
|
@@ -2697,7 +2710,7 @@ function Ua({ editor: t, ...e }) {
|
|
|
2697
2710
|
) : null,
|
|
2698
2711
|
[c, h]
|
|
2699
2712
|
);
|
|
2700
|
-
return /* @__PURE__ */
|
|
2713
|
+
return /* @__PURE__ */ f(It, { modal: !0, children: [
|
|
2701
2714
|
/* @__PURE__ */ i(Et, { asChild: !0, children: /* @__PURE__ */ i(
|
|
2702
2715
|
O,
|
|
2703
2716
|
{
|
|
@@ -2705,7 +2718,7 @@ function Ua({ editor: t, ...e }) {
|
|
|
2705
2718
|
tooltip: e == null ? void 0 : e.tooltip
|
|
2706
2719
|
}
|
|
2707
2720
|
) }),
|
|
2708
|
-
/* @__PURE__ */
|
|
2721
|
+
/* @__PURE__ */ f(
|
|
2709
2722
|
Tt,
|
|
2710
2723
|
{
|
|
2711
2724
|
align: "start",
|
|
@@ -2728,7 +2741,7 @@ function Ua({ editor: t, ...e }) {
|
|
|
2728
2741
|
}
|
|
2729
2742
|
) }) }),
|
|
2730
2743
|
d && /* @__PURE__ */ i("div", { className: "richtext-my-[10px] richtext-max-w-[286px] richtext-overflow-auto richtext-whitespace-nowrap richtext-rounded-[6px] !richtext-border richtext-p-[10px]", children: d }),
|
|
2731
|
-
/* @__PURE__ */
|
|
2744
|
+
/* @__PURE__ */ f("div", { className: "richtext-flex richtext-items-center richtext-justify-between richtext-gap-[6px]", children: [
|
|
2732
2745
|
/* @__PURE__ */ i(
|
|
2733
2746
|
G,
|
|
2734
2747
|
{
|
|
@@ -2752,16 +2765,16 @@ function Ua({ editor: t, ...e }) {
|
|
|
2752
2765
|
)
|
|
2753
2766
|
] });
|
|
2754
2767
|
}
|
|
2755
|
-
function
|
|
2768
|
+
function qa() {
|
|
2756
2769
|
const [t] = Hr((e) => e.value);
|
|
2757
2770
|
return t;
|
|
2758
2771
|
}
|
|
2759
|
-
const
|
|
2772
|
+
const ja = {
|
|
2760
2773
|
setTheme: (t, e) => {
|
|
2761
2774
|
Be(bt.UPDATE_THEME(t), e);
|
|
2762
2775
|
}
|
|
2763
2776
|
};
|
|
2764
|
-
function
|
|
2777
|
+
function Xa(t, e = 1) {
|
|
2765
2778
|
let r = 0, n = 0, a = 0;
|
|
2766
2779
|
if (t.startsWith("rgb")) {
|
|
2767
2780
|
const o = t.replace(/\s/g, "").match(/rgb\((.*)\)$/)[1].split(",");
|
|
@@ -2773,10 +2786,10 @@ function ja(t, e = 1) {
|
|
|
2773
2786
|
return t;
|
|
2774
2787
|
return e > 1 && e <= 100 && (e = e / 100), `rgba(${r},${n},${a},${e})`;
|
|
2775
2788
|
}
|
|
2776
|
-
function
|
|
2777
|
-
const e =
|
|
2789
|
+
function Ya({ node: t }) {
|
|
2790
|
+
const e = qa(), { text: r } = t.attrs, n = U(() => {
|
|
2778
2791
|
const c = "rgb(254, 242, 237)";
|
|
2779
|
-
return e === "dark" ?
|
|
2792
|
+
return e === "dark" ? Xa(c, 0.75) : c;
|
|
2780
2793
|
}, [e]), a = U(() => {
|
|
2781
2794
|
try {
|
|
2782
2795
|
return _e.renderToString(`${r}`);
|
|
@@ -2799,7 +2812,7 @@ function Xa({ node: t }) {
|
|
|
2799
2812
|
}
|
|
2800
2813
|
);
|
|
2801
2814
|
}
|
|
2802
|
-
function
|
|
2815
|
+
function Ka(t) {
|
|
2803
2816
|
return (e) => e.getAttribute(t);
|
|
2804
2817
|
}
|
|
2805
2818
|
const Mt = yt.create({
|
|
@@ -2815,7 +2828,7 @@ const Mt = yt.create({
|
|
|
2815
2828
|
class: "katex"
|
|
2816
2829
|
},
|
|
2817
2830
|
button: ({ editor: t, t: e }) => ({
|
|
2818
|
-
component:
|
|
2831
|
+
component: Ga,
|
|
2819
2832
|
componentProps: {
|
|
2820
2833
|
editor: t,
|
|
2821
2834
|
action: () => !0,
|
|
@@ -2831,7 +2844,7 @@ const Mt = yt.create({
|
|
|
2831
2844
|
return {
|
|
2832
2845
|
text: {
|
|
2833
2846
|
default: "",
|
|
2834
|
-
parseHTML:
|
|
2847
|
+
parseHTML: Ka("text")
|
|
2835
2848
|
},
|
|
2836
2849
|
defaultShowPicker: {
|
|
2837
2850
|
default: !1
|
|
@@ -2862,28 +2875,28 @@ const Mt = yt.create({
|
|
|
2862
2875
|
];
|
|
2863
2876
|
},
|
|
2864
2877
|
addNodeView() {
|
|
2865
|
-
return pt(
|
|
2878
|
+
return pt(Ya);
|
|
2866
2879
|
}
|
|
2867
2880
|
});
|
|
2868
2881
|
let ye;
|
|
2869
2882
|
function Fe() {
|
|
2870
2883
|
try {
|
|
2871
|
-
return ye || (ye =
|
|
2884
|
+
return ye || (ye = Si()), ye;
|
|
2872
2885
|
} catch {
|
|
2873
2886
|
throw new Error("Error EventEmitter");
|
|
2874
2887
|
}
|
|
2875
2888
|
}
|
|
2876
2889
|
const Le = "OPEN_EXCALIDRAW_SETTING_MODAL";
|
|
2877
|
-
function
|
|
2890
|
+
function Za(t, e) {
|
|
2878
2891
|
Fe().on(t, e);
|
|
2879
2892
|
}
|
|
2880
|
-
function
|
|
2893
|
+
function Ja(t, e) {
|
|
2881
2894
|
Fe().off(t, e);
|
|
2882
2895
|
}
|
|
2883
|
-
function
|
|
2896
|
+
function Qa(t) {
|
|
2884
2897
|
Fe().emit(Le, t);
|
|
2885
2898
|
}
|
|
2886
|
-
const
|
|
2899
|
+
const tc = ({ editor: t }) => {
|
|
2887
2900
|
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
2901
|
(I) => {
|
|
2889
2902
|
I && import("@excalidraw/excalidraw").then((T) => {
|
|
@@ -2901,7 +2914,7 @@ const Qa = ({ editor: t }) => {
|
|
|
2901
2914
|
appState: { isLoading: !1 },
|
|
2902
2915
|
files: v
|
|
2903
2916
|
});
|
|
2904
|
-
}, []),
|
|
2917
|
+
}, []), g = H(() => {
|
|
2905
2918
|
if (!e) {
|
|
2906
2919
|
s(!1);
|
|
2907
2920
|
return;
|
|
@@ -2912,10 +2925,10 @@ const Qa = ({ editor: t }) => {
|
|
|
2912
2925
|
const I = (T) => {
|
|
2913
2926
|
s(!0), T && c(T.data);
|
|
2914
2927
|
};
|
|
2915
|
-
return
|
|
2916
|
-
|
|
2928
|
+
return Za(Le, I), () => {
|
|
2929
|
+
Ja(Le, I);
|
|
2917
2930
|
};
|
|
2918
|
-
}, [t, s]), /* @__PURE__ */
|
|
2931
|
+
}, [t, s]), /* @__PURE__ */ f(
|
|
2919
2932
|
ut,
|
|
2920
2933
|
{
|
|
2921
2934
|
onOpenChange: s,
|
|
@@ -2929,9 +2942,9 @@ const Qa = ({ editor: t }) => {
|
|
|
2929
2942
|
tooltip: "Excalidraw"
|
|
2930
2943
|
}
|
|
2931
2944
|
) }),
|
|
2932
|
-
/* @__PURE__ */
|
|
2945
|
+
/* @__PURE__ */ f(lt, { className: "richtext-z-[99999] !richtext-max-w-[1300px]", children: [
|
|
2933
2946
|
/* @__PURE__ */ i(dt, { children: "Excalidraw" }),
|
|
2934
|
-
/* @__PURE__ */
|
|
2947
|
+
/* @__PURE__ */ f("div", { style: { height: "100%", borderWidth: 1 }, children: [
|
|
2935
2948
|
h && /* @__PURE__ */ i("p", { children: "Loading..." }),
|
|
2936
2949
|
u && /* @__PURE__ */ i("p", { children: u && u.message || "Error" }),
|
|
2937
2950
|
/* @__PURE__ */ i(
|
|
@@ -2954,7 +2967,7 @@ const Qa = ({ editor: t }) => {
|
|
|
2954
2967
|
/* @__PURE__ */ i(wt, { children: /* @__PURE__ */ i(
|
|
2955
2968
|
G,
|
|
2956
2969
|
{
|
|
2957
|
-
onClick:
|
|
2970
|
+
onClick: g,
|
|
2958
2971
|
type: "button",
|
|
2959
2972
|
children: "Save changes"
|
|
2960
2973
|
}
|
|
@@ -2963,21 +2976,21 @@ const Qa = ({ editor: t }) => {
|
|
|
2963
2976
|
]
|
|
2964
2977
|
}
|
|
2965
2978
|
);
|
|
2966
|
-
},
|
|
2967
|
-
wrap:
|
|
2968
|
-
renderWrap:
|
|
2969
|
-
title:
|
|
2970
|
-
handlerWrap:
|
|
2971
|
-
},
|
|
2972
|
-
function
|
|
2973
|
-
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), [
|
|
2979
|
+
}, ec = "_wrap_15k3c_1", rc = "_renderWrap_15k3c_7", ic = "_title_15k3c_14", nc = "_handlerWrap_15k3c_30", Pt = {
|
|
2980
|
+
wrap: ec,
|
|
2981
|
+
renderWrap: rc,
|
|
2982
|
+
title: ic,
|
|
2983
|
+
handlerWrap: nc
|
|
2984
|
+
}, oc = 10, ac = 200, nr = 15, or = { width: "100%", height: "100%", maxWidth: "100%" };
|
|
2985
|
+
function cc({ editor: t, node: e, updateAttributes: r }) {
|
|
2986
|
+
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), [g, I] = S(100), T = H(
|
|
2974
2987
|
(C) => {
|
|
2975
2988
|
C && p(!0);
|
|
2976
2989
|
},
|
|
2977
2990
|
[p]
|
|
2978
2991
|
), v = H((C) => () => {
|
|
2979
2992
|
I(
|
|
2980
|
-
(M) => $e(C === "minus" ? M - nr : M + nr,
|
|
2993
|
+
(M) => $e(C === "minus" ? M - nr : M + nr, oc, ac)
|
|
2981
2994
|
);
|
|
2982
2995
|
}, []);
|
|
2983
2996
|
B(() => {
|
|
@@ -3011,7 +3024,7 @@ function ac({ editor: t, node: e, updateAttributes: r }) {
|
|
|
3011
3024
|
height: Number.parseInt(l) + N.height
|
|
3012
3025
|
});
|
|
3013
3026
|
},
|
|
3014
|
-
children: /* @__PURE__ */
|
|
3027
|
+
children: /* @__PURE__ */ f(
|
|
3015
3028
|
"div",
|
|
3016
3029
|
{
|
|
3017
3030
|
className: oe(Pt.renderWrap, "render-wrapper"),
|
|
@@ -3031,13 +3044,13 @@ function ac({ editor: t, node: e, updateAttributes: r }) {
|
|
|
3031
3044
|
display: "flex",
|
|
3032
3045
|
justifyContent: "center",
|
|
3033
3046
|
alignItems: "center",
|
|
3034
|
-
transform: `scale(${
|
|
3047
|
+
transform: `scale(${g / 100})`,
|
|
3035
3048
|
transition: "all ease-in-out .3s"
|
|
3036
3049
|
}
|
|
3037
3050
|
}
|
|
3038
3051
|
),
|
|
3039
3052
|
/* @__PURE__ */ i("div", { className: Pt.title }),
|
|
3040
|
-
/* @__PURE__ */
|
|
3053
|
+
/* @__PURE__ */ f("div", { className: Pt.handlerWrap, children: [
|
|
3041
3054
|
/* @__PURE__ */ i(
|
|
3042
3055
|
O,
|
|
3043
3056
|
{
|
|
@@ -3061,7 +3074,7 @@ function ac({ editor: t, node: e, updateAttributes: r }) {
|
|
|
3061
3074
|
}
|
|
3062
3075
|
) }) });
|
|
3063
3076
|
}
|
|
3064
|
-
const
|
|
3077
|
+
const sc = Ht.memo(cc, (t, e) => !!Cr(t.node.attrs, e.node.attrs)), ar = { elements: [] }, St = yt.create({
|
|
3065
3078
|
name: "excalidraw",
|
|
3066
3079
|
group: "block",
|
|
3067
3080
|
selectable: !0,
|
|
@@ -3098,7 +3111,7 @@ const cc = Ht.memo(ac, (t, e) => !!Cr(t.node.attrs, e.node.attrs)), ar = { eleme
|
|
|
3098
3111
|
class: "excalidraw"
|
|
3099
3112
|
},
|
|
3100
3113
|
button: ({ editor: e }) => ({
|
|
3101
|
-
component:
|
|
3114
|
+
component: tc,
|
|
3102
3115
|
componentProps: {
|
|
3103
3116
|
editor: e
|
|
3104
3117
|
}
|
|
@@ -3113,7 +3126,7 @@ const cc = Ht.memo(ac, (t, e) => !!Cr(t.node.attrs, e.node.attrs)), ar = { eleme
|
|
|
3113
3126
|
];
|
|
3114
3127
|
},
|
|
3115
3128
|
renderHTML({ HTMLAttributes: t, node: e }) {
|
|
3116
|
-
return ["div", st(this.options.HTMLAttributes, t,
|
|
3129
|
+
return ["div", st(this.options.HTMLAttributes, t, Fa(e))];
|
|
3117
3130
|
},
|
|
3118
3131
|
addCommands() {
|
|
3119
3132
|
return {
|
|
@@ -3127,7 +3140,7 @@ const cc = Ht.memo(ac, (t, e) => !!Cr(t.node.attrs, e.node.attrs)), ar = { eleme
|
|
|
3127
3140
|
};
|
|
3128
3141
|
},
|
|
3129
3142
|
addNodeView() {
|
|
3130
|
-
return pt(
|
|
3143
|
+
return pt(sc);
|
|
3131
3144
|
},
|
|
3132
3145
|
addInputRules() {
|
|
3133
3146
|
return [
|
|
@@ -3139,7 +3152,7 @@ const cc = Ht.memo(ac, (t, e) => !!Cr(t.node.attrs, e.node.attrs)), ar = { eleme
|
|
|
3139
3152
|
];
|
|
3140
3153
|
}
|
|
3141
3154
|
});
|
|
3142
|
-
function
|
|
3155
|
+
function lc({ selectImage: t, giphyApiKey: e, children: r }) {
|
|
3143
3156
|
const [n, a] = S([]), [o] = S(15), c = J(null), l = (h, d = "search") => {
|
|
3144
3157
|
if (!e)
|
|
3145
3158
|
return;
|
|
@@ -3164,7 +3177,7 @@ function sc({ selectImage: t, giphyApiKey: e, children: r }) {
|
|
|
3164
3177
|
// Adjust the debounce delay as needed
|
|
3165
3178
|
[]
|
|
3166
3179
|
);
|
|
3167
|
-
return /* @__PURE__ */
|
|
3180
|
+
return /* @__PURE__ */ f(It, { modal: !0, children: [
|
|
3168
3181
|
/* @__PURE__ */ i(Et, { asChild: !0, children: r }),
|
|
3169
3182
|
/* @__PURE__ */ i(
|
|
3170
3183
|
Tt,
|
|
@@ -3173,9 +3186,9 @@ function sc({ selectImage: t, giphyApiKey: e, children: r }) {
|
|
|
3173
3186
|
className: "richtext-size-full richtext-p-2",
|
|
3174
3187
|
hideWhenDetached: !0,
|
|
3175
3188
|
side: "bottom",
|
|
3176
|
-
children: e ? /* @__PURE__ */
|
|
3189
|
+
children: e ? /* @__PURE__ */ f(V, { children: [
|
|
3177
3190
|
/* @__PURE__ */ i("div", { className: "richtext-mb-[10px] richtext-w-full", children: /* @__PURE__ */ i(
|
|
3178
|
-
|
|
3191
|
+
tt,
|
|
3179
3192
|
{
|
|
3180
3193
|
onChange: s,
|
|
3181
3194
|
placeholder: "Search GIF",
|
|
@@ -3200,9 +3213,9 @@ function sc({ selectImage: t, giphyApiKey: e, children: r }) {
|
|
|
3200
3213
|
)
|
|
3201
3214
|
] });
|
|
3202
3215
|
}
|
|
3203
|
-
function
|
|
3216
|
+
function dc({ editor: t, icon: e, giphyApiKey: r, ...n }) {
|
|
3204
3217
|
return /* @__PURE__ */ i(
|
|
3205
|
-
|
|
3218
|
+
lc,
|
|
3206
3219
|
{
|
|
3207
3220
|
giphyApiKey: r,
|
|
3208
3221
|
selectImage: (o) => {
|
|
@@ -3225,7 +3238,7 @@ const Kt = {
|
|
|
3225
3238
|
BOTTOM_LEFT: "bl",
|
|
3226
3239
|
BOTTOM_RIGHT: "br"
|
|
3227
3240
|
};
|
|
3228
|
-
function
|
|
3241
|
+
function hc(t) {
|
|
3229
3242
|
var M, L;
|
|
3230
3243
|
const [e, r] = S({
|
|
3231
3244
|
width: xt,
|
|
@@ -3281,7 +3294,7 @@ function dc(t) {
|
|
|
3281
3294
|
}, ft),
|
|
3282
3295
|
[t == null ? void 0 : t.editor]
|
|
3283
3296
|
);
|
|
3284
|
-
function
|
|
3297
|
+
function g(N, E) {
|
|
3285
3298
|
N.preventDefault(), N.stopPropagation();
|
|
3286
3299
|
const b = n.width, k = n.height, _ = b / k;
|
|
3287
3300
|
let D = Number(t.node.attrs.width), R = Number(t.node.attrs.height);
|
|
@@ -3332,7 +3345,7 @@ function dc(t) {
|
|
|
3332
3345
|
{
|
|
3333
3346
|
className: "image-view",
|
|
3334
3347
|
style: { ...m, width: "100%", textAlign: d },
|
|
3335
|
-
children: /* @__PURE__ */
|
|
3348
|
+
children: /* @__PURE__ */ f(
|
|
3336
3349
|
"div",
|
|
3337
3350
|
{
|
|
3338
3351
|
"data-drag-handle": !0,
|
|
@@ -3356,7 +3369,7 @@ function dc(t) {
|
|
|
3356
3369
|
"span",
|
|
3357
3370
|
{
|
|
3358
3371
|
className: `image-resizer__handler image-resizer__handler--${N}`,
|
|
3359
|
-
onMouseDown: (E) =>
|
|
3372
|
+
onMouseDown: (E) => g(E, N)
|
|
3360
3373
|
},
|
|
3361
3374
|
`image-dir-${N}`
|
|
3362
3375
|
)) })
|
|
@@ -3366,7 +3379,7 @@ function dc(t) {
|
|
|
3366
3379
|
}
|
|
3367
3380
|
);
|
|
3368
3381
|
}
|
|
3369
|
-
const
|
|
3382
|
+
const ti = de.extend({
|
|
3370
3383
|
name: "imageGif",
|
|
3371
3384
|
addOptions() {
|
|
3372
3385
|
var t;
|
|
@@ -3384,7 +3397,7 @@ const ei = de.extend({
|
|
|
3384
3397
|
var o;
|
|
3385
3398
|
const a = ((o = r == null ? void 0 : r.options) == null ? void 0 : o.GIPHY_API_KEY) || "";
|
|
3386
3399
|
return {
|
|
3387
|
-
component:
|
|
3400
|
+
component: dc,
|
|
3388
3401
|
componentProps: {
|
|
3389
3402
|
editor: e,
|
|
3390
3403
|
action: () => {
|
|
@@ -3423,7 +3436,7 @@ const ei = de.extend({
|
|
|
3423
3436
|
};
|
|
3424
3437
|
},
|
|
3425
3438
|
addNodeView() {
|
|
3426
|
-
return pt(
|
|
3439
|
+
return pt(hc);
|
|
3427
3440
|
},
|
|
3428
3441
|
addCommands() {
|
|
3429
3442
|
var t;
|
|
@@ -3481,7 +3494,7 @@ function fe(t = 8) {
|
|
|
3481
3494
|
return Math.random().toString(36).substring(2, t + 2);
|
|
3482
3495
|
}
|
|
3483
3496
|
const cr = `graph TB
|
|
3484
|
-
a-->b`,
|
|
3497
|
+
a-->b`, uc = ({ editor: t, upload: e }) => {
|
|
3485
3498
|
const [r, n] = S(cr), [a, o] = S(""), [c, l] = S(!1), s = J(null), h = async (m) => {
|
|
3486
3499
|
try {
|
|
3487
3500
|
const { svg: x } = await ce.render("mermaid-svg", m);
|
|
@@ -3502,7 +3515,7 @@ a-->b`, hc = ({ editor: t, upload: e }) => {
|
|
|
3502
3515
|
c && d();
|
|
3503
3516
|
}, [c]), B(() => {
|
|
3504
3517
|
c && h(r);
|
|
3505
|
-
}, [r]), /* @__PURE__ */
|
|
3518
|
+
}, [r]), /* @__PURE__ */ f(
|
|
3506
3519
|
ut,
|
|
3507
3520
|
{
|
|
3508
3521
|
onOpenChange: l,
|
|
@@ -3516,9 +3529,9 @@ a-->b`, hc = ({ editor: t, upload: e }) => {
|
|
|
3516
3529
|
tooltip: "Mermaid"
|
|
3517
3530
|
}
|
|
3518
3531
|
) }),
|
|
3519
|
-
/* @__PURE__ */
|
|
3532
|
+
/* @__PURE__ */ f(lt, { className: "richtext-z-[99999] !richtext-max-w-[1300px]", children: [
|
|
3520
3533
|
/* @__PURE__ */ i(dt, { children: "Mermaid" }),
|
|
3521
|
-
/* @__PURE__ */ i("div", { style: { height: "100%", borderWidth: 1 }, children: /* @__PURE__ */
|
|
3534
|
+
/* @__PURE__ */ i("div", { style: { height: "100%", borderWidth: 1 }, children: /* @__PURE__ */ f("div", { className: "richtext-flex richtext-gap-[10px] richtext-rounded-[10px] richtext-p-[10px]", children: [
|
|
3522
3535
|
/* @__PURE__ */ i(
|
|
3523
3536
|
jt,
|
|
3524
3537
|
{
|
|
@@ -3552,15 +3565,15 @@ a-->b`, hc = ({ editor: t, upload: e }) => {
|
|
|
3552
3565
|
if (r !== "") {
|
|
3553
3566
|
if (r) {
|
|
3554
3567
|
const m = s.current.querySelector("svg"), { width: x, height: w } = m.getBoundingClientRect(), p = `mermaid-${fe()}.svg`;
|
|
3555
|
-
let
|
|
3568
|
+
let g = me(m.outerHTML);
|
|
3556
3569
|
if (e) {
|
|
3557
|
-
const I = qt(
|
|
3558
|
-
|
|
3570
|
+
const I = qt(g, p);
|
|
3571
|
+
g = await e(I);
|
|
3559
3572
|
}
|
|
3560
3573
|
t == null || t.chain().focus().setMermaid(
|
|
3561
3574
|
{
|
|
3562
3575
|
type: "mermaid",
|
|
3563
|
-
src:
|
|
3576
|
+
src: g,
|
|
3564
3577
|
alt: encodeURIComponent(r),
|
|
3565
3578
|
width: x,
|
|
3566
3579
|
height: w
|
|
@@ -3585,7 +3598,7 @@ a-->b`, hc = ({ editor: t, upload: e }) => {
|
|
|
3585
3598
|
BOTTOM_LEFT: "bl",
|
|
3586
3599
|
BOTTOM_RIGHT: "br"
|
|
3587
3600
|
};
|
|
3588
|
-
function
|
|
3601
|
+
function mc({ editor: t, node: e, updateAttributes: r, getPos: n, selected: a }) {
|
|
3589
3602
|
const [o, c] = S({
|
|
3590
3603
|
width: xt,
|
|
3591
3604
|
height: xt
|
|
@@ -3613,7 +3626,7 @@ function uc({ editor: t, node: e, updateAttributes: r, getPos: n, selected: a })
|
|
|
3613
3626
|
height: A || void 0
|
|
3614
3627
|
}
|
|
3615
3628
|
};
|
|
3616
|
-
}, [e == null ? void 0 : e.attrs]),
|
|
3629
|
+
}, [e == null ? void 0 : e.attrs]), g = U(() => {
|
|
3617
3630
|
const {
|
|
3618
3631
|
style: { width: b }
|
|
3619
3632
|
} = p;
|
|
@@ -3655,9 +3668,9 @@ function uc({ editor: t, node: e, updateAttributes: r, getPos: n, selected: a })
|
|
|
3655
3668
|
ht((b) => {
|
|
3656
3669
|
if (b.preventDefault(), b.stopPropagation(), !d)
|
|
3657
3670
|
return;
|
|
3658
|
-
const { x: k, w: _, dir: D } = m, R = (b.clientX - k) * (/l/.test(D) ? -1 : 1), { width: A, height: $ } = e == null ? void 0 : e.attrs, F = A / $,
|
|
3671
|
+
const { x: k, w: _, dir: D } = m, R = (b.clientX - k) * (/l/.test(D) ? -1 : 1), { width: A, height: $ } = e == null ? void 0 : e.attrs, F = A / $, K = $e(_ + R, he, o.width), nt = Math.round(K / F);
|
|
3659
3672
|
r({
|
|
3660
|
-
width:
|
|
3673
|
+
width: K,
|
|
3661
3674
|
height: nt
|
|
3662
3675
|
});
|
|
3663
3676
|
}, ft),
|
|
@@ -3688,13 +3701,13 @@ function uc({ editor: t, node: e, updateAttributes: r, getPos: n, selected: a })
|
|
|
3688
3701
|
gt,
|
|
3689
3702
|
{
|
|
3690
3703
|
className: "image-view",
|
|
3691
|
-
style: { ...
|
|
3692
|
-
children: /* @__PURE__ */
|
|
3704
|
+
style: { ...g, width: "100%", textAlign: w },
|
|
3705
|
+
children: /* @__PURE__ */ f(
|
|
3693
3706
|
"div",
|
|
3694
3707
|
{
|
|
3695
3708
|
"data-drag-handle": !0,
|
|
3696
3709
|
draggable: "true",
|
|
3697
|
-
style: { ...
|
|
3710
|
+
style: { ...g, background: "#fff" },
|
|
3698
3711
|
className: `image-view__body ${a ? "image-view__body--focused" : ""} ${d ? "image-view__body--resizing" : ""}`,
|
|
3699
3712
|
children: [
|
|
3700
3713
|
/* @__PURE__ */ i(
|
|
@@ -3742,7 +3755,7 @@ const sr = de.extend({
|
|
|
3742
3755
|
button: ({ editor: e, t: r, extension: n }) => {
|
|
3743
3756
|
var a;
|
|
3744
3757
|
return {
|
|
3745
|
-
component:
|
|
3758
|
+
component: uc,
|
|
3746
3759
|
componentProps: {
|
|
3747
3760
|
action: () => !0,
|
|
3748
3761
|
isActive: () => !1,
|
|
@@ -3790,7 +3803,7 @@ const sr = de.extend({
|
|
|
3790
3803
|
};
|
|
3791
3804
|
},
|
|
3792
3805
|
addNodeView() {
|
|
3793
|
-
return pt(
|
|
3806
|
+
return pt(mc);
|
|
3794
3807
|
},
|
|
3795
3808
|
// @ts-ignore
|
|
3796
3809
|
addCommands() {
|
|
@@ -3842,12 +3855,12 @@ const sr = de.extend({
|
|
|
3842
3855
|
];
|
|
3843
3856
|
}
|
|
3844
3857
|
});
|
|
3845
|
-
function
|
|
3858
|
+
function xc({ node: t }) {
|
|
3846
3859
|
var n;
|
|
3847
3860
|
const e = ((n = t == null ? void 0 : t.attrs) == null ? void 0 : n.src) || "", r = e == null ? void 0 : e.split("/").pop();
|
|
3848
3861
|
return r ? /* @__PURE__ */ i(gt, { children: /* @__PURE__ */ i("div", { "data-twitter": "", children: /* @__PURE__ */ i(_i, { id: r }) }) }) : null;
|
|
3849
3862
|
}
|
|
3850
|
-
function
|
|
3863
|
+
function ei(t) {
|
|
3851
3864
|
const { t: e } = q(), [r, n] = S("");
|
|
3852
3865
|
B(() => {
|
|
3853
3866
|
var o;
|
|
@@ -3859,7 +3872,7 @@ function ri(t) {
|
|
|
3859
3872
|
function a(o) {
|
|
3860
3873
|
o.preventDefault(), o.stopPropagation(), t == null || t.onSetLink(r);
|
|
3861
3874
|
}
|
|
3862
|
-
return /* @__PURE__ */ i("div", { className: "border-neutral-200 richtext-rounded-lg !richtext-border richtext-bg-white richtext-p-2 richtext-shadow-sm dark:richtext-border-neutral-800 dark:richtext-bg-black", children: /* @__PURE__ */
|
|
3875
|
+
return /* @__PURE__ */ i("div", { className: "border-neutral-200 richtext-rounded-lg !richtext-border richtext-bg-white richtext-p-2 richtext-shadow-sm dark:richtext-border-neutral-800 dark:richtext-bg-black", children: /* @__PURE__ */ f(
|
|
3863
3876
|
"form",
|
|
3864
3877
|
{
|
|
3865
3878
|
className: "richtext-flex richtext-flex-col richtext-gap-2",
|
|
@@ -3867,7 +3880,7 @@ function ri(t) {
|
|
|
3867
3880
|
children: [
|
|
3868
3881
|
/* @__PURE__ */ i(ct, { className: "mb-[6px]", children: e("editor.link.dialog.text") }),
|
|
3869
3882
|
/* @__PURE__ */ i("div", { className: "richtext-mb-[10px] richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5", children: /* @__PURE__ */ i("div", { className: "richtext-relative richtext-w-full richtext-max-w-sm richtext-items-center", children: /* @__PURE__ */ i(
|
|
3870
|
-
|
|
3883
|
+
tt,
|
|
3871
3884
|
{
|
|
3872
3885
|
className: "richtext-w-80",
|
|
3873
3886
|
onChange: (o) => n(o.target.value),
|
|
@@ -3889,26 +3902,26 @@ function ri(t) {
|
|
|
3889
3902
|
}
|
|
3890
3903
|
) });
|
|
3891
3904
|
}
|
|
3892
|
-
function
|
|
3905
|
+
function fc(t) {
|
|
3893
3906
|
function e(r) {
|
|
3894
3907
|
t.action && t.action(r);
|
|
3895
3908
|
}
|
|
3896
|
-
return /* @__PURE__ */
|
|
3909
|
+
return /* @__PURE__ */ f(It, { modal: !0, children: [
|
|
3897
3910
|
/* @__PURE__ */ i(Et, { disabled: t == null ? void 0 : t.disabled, asChild: !0, children: /* @__PURE__ */ i(
|
|
3898
3911
|
O,
|
|
3899
3912
|
{
|
|
3900
3913
|
tooltip: t == null ? void 0 : t.tooltip,
|
|
3901
3914
|
isActive: t == null ? void 0 : t.isActive,
|
|
3902
3915
|
disabled: t == null ? void 0 : t.disabled,
|
|
3903
|
-
children: /* @__PURE__ */ i(
|
|
3916
|
+
children: /* @__PURE__ */ i(Y, { name: t == null ? void 0 : t.icon })
|
|
3904
3917
|
}
|
|
3905
3918
|
) }),
|
|
3906
|
-
/* @__PURE__ */ i(Tt, { hideWhenDetached: !0, className: "richtext-w-full", align: "start", side: "bottom", children: /* @__PURE__ */ i(
|
|
3919
|
+
/* @__PURE__ */ i(Tt, { hideWhenDetached: !0, className: "richtext-w-full", align: "start", side: "bottom", children: /* @__PURE__ */ i(ei, { editor: t.editor, onSetLink: e }) })
|
|
3907
3920
|
] });
|
|
3908
3921
|
}
|
|
3909
|
-
const
|
|
3922
|
+
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
3923
|
function lr(t) {
|
|
3911
|
-
return t.match(
|
|
3924
|
+
return t.match(pc);
|
|
3912
3925
|
}
|
|
3913
3926
|
const Ie = yt.create({
|
|
3914
3927
|
name: "twitter",
|
|
@@ -3921,7 +3934,7 @@ const Ie = yt.create({
|
|
|
3921
3934
|
inline: !1,
|
|
3922
3935
|
origin: "",
|
|
3923
3936
|
button: ({ editor: t, t: e }) => ({
|
|
3924
|
-
component:
|
|
3937
|
+
component: fc,
|
|
3925
3938
|
componentProps: {
|
|
3926
3939
|
action: (r) => {
|
|
3927
3940
|
t.commands.setTweet({ src: r });
|
|
@@ -3936,7 +3949,7 @@ const Ie = yt.create({
|
|
|
3936
3949
|
};
|
|
3937
3950
|
},
|
|
3938
3951
|
addNodeView() {
|
|
3939
|
-
return pt(
|
|
3952
|
+
return pt(xc, { attrs: this.options.HTMLAttributes });
|
|
3940
3953
|
},
|
|
3941
3954
|
inline() {
|
|
3942
3955
|
return this.options.inline;
|
|
@@ -3969,8 +3982,8 @@ const Ie = yt.create({
|
|
|
3969
3982
|
},
|
|
3970
3983
|
addPasteRules() {
|
|
3971
3984
|
return this.options.addPasteHandler ? [
|
|
3972
|
-
|
|
3973
|
-
find:
|
|
3985
|
+
Ci({
|
|
3986
|
+
find: gc,
|
|
3974
3987
|
type: this.type,
|
|
3975
3988
|
getAttributes: (t) => ({ src: t.input })
|
|
3976
3989
|
})
|
|
@@ -3979,18 +3992,18 @@ const Ie = yt.create({
|
|
|
3979
3992
|
renderHTML({ HTMLAttributes: t }) {
|
|
3980
3993
|
return ["div", st({ "data-twitter": "" }, t)];
|
|
3981
3994
|
}
|
|
3982
|
-
}),
|
|
3983
|
-
wrapper:
|
|
3984
|
-
tool:
|
|
3985
|
-
active:
|
|
3986
|
-
pen:
|
|
3987
|
-
line:
|
|
3988
|
-
options:
|
|
3989
|
-
colorWrap:
|
|
3990
|
-
color:
|
|
3991
|
-
colorActive:
|
|
3995
|
+
}), 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 = {
|
|
3996
|
+
wrapper: wc,
|
|
3997
|
+
tool: vc,
|
|
3998
|
+
active: bc,
|
|
3999
|
+
pen: yc,
|
|
4000
|
+
line: Cc,
|
|
4001
|
+
options: Tc,
|
|
4002
|
+
colorWrap: Nc,
|
|
4003
|
+
color: kc,
|
|
4004
|
+
colorActive: Sc
|
|
3992
4005
|
};
|
|
3993
|
-
function
|
|
4006
|
+
function Mc(t) {
|
|
3994
4007
|
return /* @__PURE__ */ i(
|
|
3995
4008
|
"svg",
|
|
3996
4009
|
{
|
|
@@ -4014,7 +4027,7 @@ function Sc(t) {
|
|
|
4014
4027
|
}
|
|
4015
4028
|
);
|
|
4016
4029
|
}
|
|
4017
|
-
function
|
|
4030
|
+
function Ac(t) {
|
|
4018
4031
|
return /* @__PURE__ */ i(
|
|
4019
4032
|
"svg",
|
|
4020
4033
|
{
|
|
@@ -4033,7 +4046,7 @@ function Mc(t) {
|
|
|
4033
4046
|
}
|
|
4034
4047
|
);
|
|
4035
4048
|
}
|
|
4036
|
-
function
|
|
4049
|
+
function Lc(t) {
|
|
4037
4050
|
return /* @__PURE__ */ i(
|
|
4038
4051
|
"svg",
|
|
4039
4052
|
{
|
|
@@ -4052,7 +4065,7 @@ function Ac(t) {
|
|
|
4052
4065
|
}
|
|
4053
4066
|
);
|
|
4054
4067
|
}
|
|
4055
|
-
function
|
|
4068
|
+
function Ic(t) {
|
|
4056
4069
|
return /* @__PURE__ */ i(
|
|
4057
4070
|
"svg",
|
|
4058
4071
|
{
|
|
@@ -4071,8 +4084,8 @@ function Lc(t) {
|
|
|
4071
4084
|
}
|
|
4072
4085
|
);
|
|
4073
4086
|
}
|
|
4074
|
-
function
|
|
4075
|
-
return /* @__PURE__ */
|
|
4087
|
+
function Ec(t) {
|
|
4088
|
+
return /* @__PURE__ */ f(
|
|
4076
4089
|
"svg",
|
|
4077
4090
|
{
|
|
4078
4091
|
height: "1em",
|
|
@@ -4099,7 +4112,7 @@ function Ic(t) {
|
|
|
4099
4112
|
}
|
|
4100
4113
|
);
|
|
4101
4114
|
}
|
|
4102
|
-
function
|
|
4115
|
+
function zc(t) {
|
|
4103
4116
|
return /* @__PURE__ */ i(
|
|
4104
4117
|
"svg",
|
|
4105
4118
|
{
|
|
@@ -4118,7 +4131,7 @@ function Ec(t) {
|
|
|
4118
4131
|
}
|
|
4119
4132
|
);
|
|
4120
4133
|
}
|
|
4121
|
-
function
|
|
4134
|
+
function Pc(t) {
|
|
4122
4135
|
return /* @__PURE__ */ i(
|
|
4123
4136
|
"svg",
|
|
4124
4137
|
{
|
|
@@ -4137,7 +4150,7 @@ function zc(t) {
|
|
|
4137
4150
|
}
|
|
4138
4151
|
);
|
|
4139
4152
|
}
|
|
4140
|
-
function
|
|
4153
|
+
function Rc(t) {
|
|
4141
4154
|
return /* @__PURE__ */ i(
|
|
4142
4155
|
"svg",
|
|
4143
4156
|
{
|
|
@@ -4156,7 +4169,7 @@ function Pc(t) {
|
|
|
4156
4169
|
}
|
|
4157
4170
|
);
|
|
4158
4171
|
}
|
|
4159
|
-
function
|
|
4172
|
+
function Oc(t) {
|
|
4160
4173
|
return /* @__PURE__ */ i(
|
|
4161
4174
|
"svg",
|
|
4162
4175
|
{
|
|
@@ -4179,7 +4192,7 @@ function Rc(t) {
|
|
|
4179
4192
|
}
|
|
4180
4193
|
);
|
|
4181
4194
|
}
|
|
4182
|
-
function
|
|
4195
|
+
function Hc(t) {
|
|
4183
4196
|
return /* @__PURE__ */ i(
|
|
4184
4197
|
"svg",
|
|
4185
4198
|
{
|
|
@@ -4198,7 +4211,7 @@ function Oc(t) {
|
|
|
4198
4211
|
}
|
|
4199
4212
|
);
|
|
4200
4213
|
}
|
|
4201
|
-
function
|
|
4214
|
+
function Dc(t) {
|
|
4202
4215
|
return /* @__PURE__ */ i(
|
|
4203
4216
|
"svg",
|
|
4204
4217
|
{
|
|
@@ -4207,7 +4220,7 @@ function Hc(t) {
|
|
|
4207
4220
|
width: "1em",
|
|
4208
4221
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4209
4222
|
...t,
|
|
4210
|
-
children: /* @__PURE__ */
|
|
4223
|
+
children: /* @__PURE__ */ f(
|
|
4211
4224
|
"g",
|
|
4212
4225
|
{
|
|
4213
4226
|
fill: "none",
|
|
@@ -4227,7 +4240,7 @@ function Hc(t) {
|
|
|
4227
4240
|
}
|
|
4228
4241
|
);
|
|
4229
4242
|
}
|
|
4230
|
-
function
|
|
4243
|
+
function _c(t) {
|
|
4231
4244
|
return /* @__PURE__ */ i(
|
|
4232
4245
|
"svg",
|
|
4233
4246
|
{
|
|
@@ -4246,7 +4259,7 @@ function Dc(t) {
|
|
|
4246
4259
|
}
|
|
4247
4260
|
);
|
|
4248
4261
|
}
|
|
4249
|
-
function
|
|
4262
|
+
function Bc(t) {
|
|
4250
4263
|
return /* @__PURE__ */ i(
|
|
4251
4264
|
"svg",
|
|
4252
4265
|
{
|
|
@@ -4267,7 +4280,7 @@ function _c(t) {
|
|
|
4267
4280
|
}
|
|
4268
4281
|
);
|
|
4269
4282
|
}
|
|
4270
|
-
function
|
|
4283
|
+
function $c(t) {
|
|
4271
4284
|
return /* @__PURE__ */ i(
|
|
4272
4285
|
"svg",
|
|
4273
4286
|
{
|
|
@@ -4288,7 +4301,7 @@ function Bc(t) {
|
|
|
4288
4301
|
}
|
|
4289
4302
|
);
|
|
4290
4303
|
}
|
|
4291
|
-
function
|
|
4304
|
+
function Vc(t) {
|
|
4292
4305
|
return /* @__PURE__ */ i(
|
|
4293
4306
|
"svg",
|
|
4294
4307
|
{
|
|
@@ -4307,7 +4320,7 @@ function $c(t) {
|
|
|
4307
4320
|
}
|
|
4308
4321
|
);
|
|
4309
4322
|
}
|
|
4310
|
-
function
|
|
4323
|
+
function Wc(t) {
|
|
4311
4324
|
return /* @__PURE__ */ i(
|
|
4312
4325
|
"svg",
|
|
4313
4326
|
{
|
|
@@ -4326,7 +4339,7 @@ function Vc(t) {
|
|
|
4326
4339
|
}
|
|
4327
4340
|
);
|
|
4328
4341
|
}
|
|
4329
|
-
function
|
|
4342
|
+
function Fc(t) {
|
|
4330
4343
|
return /* @__PURE__ */ i(
|
|
4331
4344
|
"svg",
|
|
4332
4345
|
{
|
|
@@ -4345,7 +4358,7 @@ function Wc(t) {
|
|
|
4345
4358
|
}
|
|
4346
4359
|
);
|
|
4347
4360
|
}
|
|
4348
|
-
function
|
|
4361
|
+
function Uc(t) {
|
|
4349
4362
|
return /* @__PURE__ */ i(
|
|
4350
4363
|
"svg",
|
|
4351
4364
|
{
|
|
@@ -4364,7 +4377,7 @@ function Fc(t) {
|
|
|
4364
4377
|
}
|
|
4365
4378
|
);
|
|
4366
4379
|
}
|
|
4367
|
-
function
|
|
4380
|
+
function Gc(t) {
|
|
4368
4381
|
return /* @__PURE__ */ i(
|
|
4369
4382
|
"svg",
|
|
4370
4383
|
{
|
|
@@ -4383,7 +4396,7 @@ function Uc(t) {
|
|
|
4383
4396
|
}
|
|
4384
4397
|
);
|
|
4385
4398
|
}
|
|
4386
|
-
function
|
|
4399
|
+
function qc(t) {
|
|
4387
4400
|
return /* @__PURE__ */ i(
|
|
4388
4401
|
"svg",
|
|
4389
4402
|
{
|
|
@@ -4404,7 +4417,7 @@ function Gc(t) {
|
|
|
4404
4417
|
}
|
|
4405
4418
|
);
|
|
4406
4419
|
}
|
|
4407
|
-
const
|
|
4420
|
+
const jc = [
|
|
4408
4421
|
j.blackHighlight,
|
|
4409
4422
|
j.ofRGBA(166 / 255, 81 / 255, 167 / 255, 0.3),
|
|
4410
4423
|
j.ofRGBA(247 / 255, 78 / 255, 158 / 255, 0.3),
|
|
@@ -4428,9 +4441,9 @@ const qc = [
|
|
|
4428
4441
|
j.fromHex("#FFFB85"),
|
|
4429
4442
|
j.fromHex("#AADC99")
|
|
4430
4443
|
];
|
|
4431
|
-
function
|
|
4444
|
+
function Xc({ onChange: t }) {
|
|
4432
4445
|
const [e, r] = S(j.blackHighlight);
|
|
4433
|
-
return /* @__PURE__ */ i("div", { className: z.colorWrap, children:
|
|
4446
|
+
return /* @__PURE__ */ i("div", { className: z.colorWrap, children: jc.map((n, a) => /* @__PURE__ */ i(
|
|
4434
4447
|
"button",
|
|
4435
4448
|
{
|
|
4436
4449
|
style: { backgroundColor: n.toHexString() },
|
|
@@ -4446,7 +4459,7 @@ function jc({ onChange: t }) {
|
|
|
4446
4459
|
}
|
|
4447
4460
|
function Ee({ onChange: t }) {
|
|
4448
4461
|
const [e, r] = S(j.black);
|
|
4449
|
-
return /* @__PURE__ */
|
|
4462
|
+
return /* @__PURE__ */ f(V, { children: [
|
|
4450
4463
|
/* @__PURE__ */ i("div", { className: z.colorWrap, children: dr.slice(0, 7).map((n, a) => /* @__PURE__ */ i(
|
|
4451
4464
|
"button",
|
|
4452
4465
|
{
|
|
@@ -4475,9 +4488,9 @@ function Ee({ onChange: t }) {
|
|
|
4475
4488
|
)) })
|
|
4476
4489
|
] });
|
|
4477
4490
|
}
|
|
4478
|
-
function
|
|
4491
|
+
function Yc({ setColorPen: t, setThicknessPen: e }) {
|
|
4479
4492
|
const [r, n] = S(2);
|
|
4480
|
-
return /* @__PURE__ */
|
|
4493
|
+
return /* @__PURE__ */ f("div", { className: z.options, children: [
|
|
4481
4494
|
/* @__PURE__ */ i("div", { children: /* @__PURE__ */ i(
|
|
4482
4495
|
Ee,
|
|
4483
4496
|
{
|
|
@@ -4500,20 +4513,20 @@ function Xc({ setColorPen: t, setThicknessPen: e }) {
|
|
|
4500
4513
|
) })
|
|
4501
4514
|
] });
|
|
4502
4515
|
}
|
|
4503
|
-
function
|
|
4516
|
+
function Kc({ setColorHighlight: t }) {
|
|
4504
4517
|
return /* @__PURE__ */ i("div", { className: z.options, children: /* @__PURE__ */ i(
|
|
4505
|
-
|
|
4518
|
+
Xc,
|
|
4506
4519
|
{
|
|
4507
4520
|
onChange: (e) => t(e)
|
|
4508
4521
|
}
|
|
4509
4522
|
) });
|
|
4510
4523
|
}
|
|
4511
|
-
function
|
|
4524
|
+
function Zc({
|
|
4512
4525
|
changeColorShape: t,
|
|
4513
4526
|
changeBorderColorShape: e,
|
|
4514
4527
|
onThicknessChange: r
|
|
4515
4528
|
}) {
|
|
4516
|
-
return /* @__PURE__ */
|
|
4529
|
+
return /* @__PURE__ */ f("div", { className: z.options, children: [
|
|
4517
4530
|
/* @__PURE__ */ i("div", { children: /* @__PURE__ */ i(
|
|
4518
4531
|
Ee,
|
|
4519
4532
|
{
|
|
@@ -4543,7 +4556,7 @@ function Kc({
|
|
|
4543
4556
|
) })
|
|
4544
4557
|
] });
|
|
4545
4558
|
}
|
|
4546
|
-
function
|
|
4559
|
+
function ri(t) {
|
|
4547
4560
|
const {
|
|
4548
4561
|
setColorPen: e,
|
|
4549
4562
|
refEditor: r,
|
|
@@ -4560,12 +4573,12 @@ function ii(t) {
|
|
|
4560
4573
|
0
|
|
4561
4574
|
/* square */
|
|
4562
4575
|
);
|
|
4563
|
-
return /* @__PURE__ */ i(V, { children: /* @__PURE__ */
|
|
4576
|
+
return /* @__PURE__ */ i(V, { children: /* @__PURE__ */ f(
|
|
4564
4577
|
"div",
|
|
4565
4578
|
{
|
|
4566
4579
|
className: z.wrapper,
|
|
4567
4580
|
children: [
|
|
4568
|
-
/* @__PURE__ */
|
|
4581
|
+
/* @__PURE__ */ f("div", { className: z.pen, children: [
|
|
4569
4582
|
/* @__PURE__ */ i(
|
|
4570
4583
|
"button",
|
|
4571
4584
|
{
|
|
@@ -4573,14 +4586,14 @@ function ii(t) {
|
|
|
4573
4586
|
[z.active]: m === "select"
|
|
4574
4587
|
}),
|
|
4575
4588
|
onClick: () => {
|
|
4576
|
-
const
|
|
4589
|
+
const g = r.current.toolController.getPrimaryTools();
|
|
4577
4590
|
if (m === "select") {
|
|
4578
|
-
x(null),
|
|
4591
|
+
x(null), g[0].setEnabled(!1);
|
|
4579
4592
|
return;
|
|
4580
4593
|
}
|
|
4581
|
-
x("select"),
|
|
4594
|
+
x("select"), g[0].setEnabled(!0);
|
|
4582
4595
|
},
|
|
4583
|
-
children: /* @__PURE__ */ i(
|
|
4596
|
+
children: /* @__PURE__ */ i(Mc, {})
|
|
4584
4597
|
}
|
|
4585
4598
|
),
|
|
4586
4599
|
/* @__PURE__ */ i("div", { className: z.line }),
|
|
@@ -4591,14 +4604,14 @@ function ii(t) {
|
|
|
4591
4604
|
[z.active]: m === "text"
|
|
4592
4605
|
}),
|
|
4593
4606
|
onClick: () => {
|
|
4594
|
-
const
|
|
4595
|
-
if (r.current.toolController.setToolEnabled(
|
|
4596
|
-
|
|
4607
|
+
const g = r.current.toolController.getPrimaryTools();
|
|
4608
|
+
if (r.current.toolController.setToolEnabled(g[1]), m === "text") {
|
|
4609
|
+
g[1].setEnabled(!1), x(null);
|
|
4597
4610
|
return;
|
|
4598
4611
|
}
|
|
4599
|
-
x("text"),
|
|
4612
|
+
x("text"), g[1].setEnabled(!0);
|
|
4600
4613
|
},
|
|
4601
|
-
children: /* @__PURE__ */ i(
|
|
4614
|
+
children: /* @__PURE__ */ i(Ac, {})
|
|
4602
4615
|
}
|
|
4603
4616
|
),
|
|
4604
4617
|
/* @__PURE__ */ i("div", { className: z.line }),
|
|
@@ -4609,14 +4622,14 @@ function ii(t) {
|
|
|
4609
4622
|
[z.active]: m === "pencil"
|
|
4610
4623
|
}),
|
|
4611
4624
|
onClick: () => {
|
|
4612
|
-
const
|
|
4625
|
+
const g = r.current.toolController.getPrimaryTools();
|
|
4613
4626
|
if (m === "pencil") {
|
|
4614
|
-
x(null),
|
|
4627
|
+
x(null), g[2].setEnabled(!1);
|
|
4615
4628
|
return;
|
|
4616
4629
|
}
|
|
4617
|
-
x("pencil"),
|
|
4630
|
+
x("pencil"), g[2].setEnabled(!0);
|
|
4618
4631
|
},
|
|
4619
|
-
children: /* @__PURE__ */ i(
|
|
4632
|
+
children: /* @__PURE__ */ i(Lc, {})
|
|
4620
4633
|
}
|
|
4621
4634
|
),
|
|
4622
4635
|
/* @__PURE__ */ i(
|
|
@@ -4626,14 +4639,14 @@ function ii(t) {
|
|
|
4626
4639
|
[z.active]: m === "highlighter"
|
|
4627
4640
|
}),
|
|
4628
4641
|
onClick: () => {
|
|
4629
|
-
const
|
|
4642
|
+
const g = r.current.toolController.getPrimaryTools();
|
|
4630
4643
|
if (m === "highlighter") {
|
|
4631
|
-
x(null),
|
|
4644
|
+
x(null), g[3].setEnabled(!1);
|
|
4632
4645
|
return;
|
|
4633
4646
|
}
|
|
4634
|
-
x("highlighter"),
|
|
4647
|
+
x("highlighter"), g[3].setEnabled(!0);
|
|
4635
4648
|
},
|
|
4636
|
-
children: /* @__PURE__ */ i(
|
|
4649
|
+
children: /* @__PURE__ */ i(Ic, {})
|
|
4637
4650
|
}
|
|
4638
4651
|
),
|
|
4639
4652
|
/* @__PURE__ */ i("div", { className: z.line }),
|
|
@@ -4644,14 +4657,14 @@ function ii(t) {
|
|
|
4644
4657
|
[z.active]: m === "eraser"
|
|
4645
4658
|
}),
|
|
4646
4659
|
onClick: () => {
|
|
4647
|
-
const
|
|
4660
|
+
const g = r.current.toolController.getPrimaryTools();
|
|
4648
4661
|
if (m === "eraser") {
|
|
4649
|
-
x(null),
|
|
4662
|
+
x(null), g[4].setEnabled(!1);
|
|
4650
4663
|
return;
|
|
4651
4664
|
}
|
|
4652
|
-
x("eraser"),
|
|
4665
|
+
x("eraser"), g[4].setEnabled(!0);
|
|
4653
4666
|
},
|
|
4654
|
-
children: /* @__PURE__ */ i(
|
|
4667
|
+
children: /* @__PURE__ */ i(Ec, {})
|
|
4655
4668
|
}
|
|
4656
4669
|
),
|
|
4657
4670
|
/* @__PURE__ */ i("div", { className: z.line }),
|
|
@@ -4663,8 +4676,8 @@ function ii(t) {
|
|
|
4663
4676
|
/* square */
|
|
4664
4677
|
}),
|
|
4665
4678
|
onClick: () => {
|
|
4666
|
-
const
|
|
4667
|
-
r.current.toolController.setToolEnabled(
|
|
4679
|
+
const g = r.current.toolController.getPrimaryTools();
|
|
4680
|
+
r.current.toolController.setToolEnabled(g[5]), x("shapes"), g[5].setEnabled(!0), s(
|
|
4668
4681
|
0
|
|
4669
4682
|
/* square */
|
|
4670
4683
|
), p(
|
|
@@ -4672,7 +4685,7 @@ function ii(t) {
|
|
|
4672
4685
|
/* square */
|
|
4673
4686
|
);
|
|
4674
4687
|
},
|
|
4675
|
-
children: /* @__PURE__ */ i(
|
|
4688
|
+
children: /* @__PURE__ */ i(zc, {})
|
|
4676
4689
|
}
|
|
4677
4690
|
),
|
|
4678
4691
|
/* @__PURE__ */ i(
|
|
@@ -4683,8 +4696,8 @@ function ii(t) {
|
|
|
4683
4696
|
/* rectangle */
|
|
4684
4697
|
}),
|
|
4685
4698
|
onClick: () => {
|
|
4686
|
-
const
|
|
4687
|
-
r.current.toolController.setToolEnabled(
|
|
4699
|
+
const g = r.current.toolController.getPrimaryTools();
|
|
4700
|
+
r.current.toolController.setToolEnabled(g[5]), x("shapes"), g[5].setEnabled(!0), s(
|
|
4688
4701
|
1
|
|
4689
4702
|
/* rectangle */
|
|
4690
4703
|
), p(
|
|
@@ -4692,7 +4705,7 @@ function ii(t) {
|
|
|
4692
4705
|
/* rectangle */
|
|
4693
4706
|
);
|
|
4694
4707
|
},
|
|
4695
|
-
children: /* @__PURE__ */ i(
|
|
4708
|
+
children: /* @__PURE__ */ i(Pc, {})
|
|
4696
4709
|
}
|
|
4697
4710
|
),
|
|
4698
4711
|
/* @__PURE__ */ i(
|
|
@@ -4703,8 +4716,8 @@ function ii(t) {
|
|
|
4703
4716
|
/* circle */
|
|
4704
4717
|
}),
|
|
4705
4718
|
onClick: () => {
|
|
4706
|
-
const
|
|
4707
|
-
r.current.toolController.setToolEnabled(
|
|
4719
|
+
const g = r.current.toolController.getPrimaryTools();
|
|
4720
|
+
r.current.toolController.setToolEnabled(g[5]), x("shapes"), g[5].setEnabled(!0), s(
|
|
4708
4721
|
2
|
|
4709
4722
|
/* circle */
|
|
4710
4723
|
), p(
|
|
@@ -4712,7 +4725,7 @@ function ii(t) {
|
|
|
4712
4725
|
/* circle */
|
|
4713
4726
|
);
|
|
4714
4727
|
},
|
|
4715
|
-
children: /* @__PURE__ */ i(
|
|
4728
|
+
children: /* @__PURE__ */ i(Rc, {})
|
|
4716
4729
|
}
|
|
4717
4730
|
),
|
|
4718
4731
|
/* @__PURE__ */ i(
|
|
@@ -4723,8 +4736,8 @@ function ii(t) {
|
|
|
4723
4736
|
/* triangle */
|
|
4724
4737
|
}),
|
|
4725
4738
|
onClick: () => {
|
|
4726
|
-
const
|
|
4727
|
-
r.current.toolController.setToolEnabled(
|
|
4739
|
+
const g = r.current.toolController.getPrimaryTools();
|
|
4740
|
+
r.current.toolController.setToolEnabled(g[5]), x("shapes"), g[5].setEnabled(!0), s(
|
|
4728
4741
|
3
|
|
4729
4742
|
/* triangle */
|
|
4730
4743
|
), p(
|
|
@@ -4732,7 +4745,7 @@ function ii(t) {
|
|
|
4732
4745
|
/* triangle */
|
|
4733
4746
|
);
|
|
4734
4747
|
},
|
|
4735
|
-
children: /* @__PURE__ */ i(
|
|
4748
|
+
children: /* @__PURE__ */ i(Oc, {})
|
|
4736
4749
|
}
|
|
4737
4750
|
),
|
|
4738
4751
|
/* @__PURE__ */ i(
|
|
@@ -4743,8 +4756,8 @@ function ii(t) {
|
|
|
4743
4756
|
/* hexagonal */
|
|
4744
4757
|
}),
|
|
4745
4758
|
onClick: () => {
|
|
4746
|
-
const
|
|
4747
|
-
r.current.toolController.setToolEnabled(
|
|
4759
|
+
const g = r.current.toolController.getPrimaryTools();
|
|
4760
|
+
r.current.toolController.setToolEnabled(g[5]), x("shapes"), g[5].setEnabled(!0), s(
|
|
4748
4761
|
4
|
|
4749
4762
|
/* hexagonal */
|
|
4750
4763
|
), p(
|
|
@@ -4752,7 +4765,7 @@ function ii(t) {
|
|
|
4752
4765
|
/* hexagonal */
|
|
4753
4766
|
);
|
|
4754
4767
|
},
|
|
4755
|
-
children: /* @__PURE__ */ i(
|
|
4768
|
+
children: /* @__PURE__ */ i(Hc, {})
|
|
4756
4769
|
}
|
|
4757
4770
|
),
|
|
4758
4771
|
/* @__PURE__ */ i(
|
|
@@ -4763,8 +4776,8 @@ function ii(t) {
|
|
|
4763
4776
|
/* diamond */
|
|
4764
4777
|
}),
|
|
4765
4778
|
onClick: () => {
|
|
4766
|
-
const
|
|
4767
|
-
r.current.toolController.setToolEnabled(
|
|
4779
|
+
const g = r.current.toolController.getPrimaryTools();
|
|
4780
|
+
r.current.toolController.setToolEnabled(g[5]), x("shapes"), g[5].setEnabled(!0), s(
|
|
4768
4781
|
5
|
|
4769
4782
|
/* diamond */
|
|
4770
4783
|
), p(
|
|
@@ -4772,7 +4785,7 @@ function ii(t) {
|
|
|
4772
4785
|
/* diamond */
|
|
4773
4786
|
);
|
|
4774
4787
|
},
|
|
4775
|
-
children: /* @__PURE__ */ i(
|
|
4788
|
+
children: /* @__PURE__ */ i(Dc, {})
|
|
4776
4789
|
}
|
|
4777
4790
|
),
|
|
4778
4791
|
/* @__PURE__ */ i(
|
|
@@ -4783,8 +4796,8 @@ function ii(t) {
|
|
|
4783
4796
|
/* arrow */
|
|
4784
4797
|
}),
|
|
4785
4798
|
onClick: () => {
|
|
4786
|
-
const
|
|
4787
|
-
r.current.toolController.setToolEnabled(
|
|
4799
|
+
const g = r.current.toolController.getPrimaryTools();
|
|
4800
|
+
r.current.toolController.setToolEnabled(g[5]), x("shapes"), g[5].setEnabled(!0), s(
|
|
4788
4801
|
6
|
|
4789
4802
|
/* arrow */
|
|
4790
4803
|
), p(
|
|
@@ -4792,7 +4805,7 @@ function ii(t) {
|
|
|
4792
4805
|
/* arrow */
|
|
4793
4806
|
);
|
|
4794
4807
|
},
|
|
4795
|
-
children: /* @__PURE__ */ i(
|
|
4808
|
+
children: /* @__PURE__ */ i(_c, {})
|
|
4796
4809
|
}
|
|
4797
4810
|
),
|
|
4798
4811
|
/* @__PURE__ */ i(
|
|
@@ -4803,8 +4816,8 @@ function ii(t) {
|
|
|
4803
4816
|
/* line */
|
|
4804
4817
|
}),
|
|
4805
4818
|
onClick: () => {
|
|
4806
|
-
const
|
|
4807
|
-
r.current.toolController.setToolEnabled(
|
|
4819
|
+
const g = r.current.toolController.getPrimaryTools();
|
|
4820
|
+
r.current.toolController.setToolEnabled(g[5]), x("shapes"), g[5].setEnabled(!0), s(
|
|
4808
4821
|
7
|
|
4809
4822
|
/* line */
|
|
4810
4823
|
), p(
|
|
@@ -4812,7 +4825,7 @@ function ii(t) {
|
|
|
4812
4825
|
/* line */
|
|
4813
4826
|
);
|
|
4814
4827
|
},
|
|
4815
|
-
children: /* @__PURE__ */ i(
|
|
4828
|
+
children: /* @__PURE__ */ i(Wc, {})
|
|
4816
4829
|
}
|
|
4817
4830
|
),
|
|
4818
4831
|
/* @__PURE__ */ i(
|
|
@@ -4823,8 +4836,8 @@ function ii(t) {
|
|
|
4823
4836
|
/* heart */
|
|
4824
4837
|
}),
|
|
4825
4838
|
onClick: () => {
|
|
4826
|
-
const
|
|
4827
|
-
r.current.toolController.setToolEnabled(
|
|
4839
|
+
const g = r.current.toolController.getPrimaryTools();
|
|
4840
|
+
r.current.toolController.setToolEnabled(g[5]), x("shapes"), g[5].setEnabled(!0), s(
|
|
4828
4841
|
8
|
|
4829
4842
|
/* heart */
|
|
4830
4843
|
), p(
|
|
@@ -4832,7 +4845,7 @@ function ii(t) {
|
|
|
4832
4845
|
/* heart */
|
|
4833
4846
|
);
|
|
4834
4847
|
},
|
|
4835
|
-
children: /* @__PURE__ */ i(
|
|
4848
|
+
children: /* @__PURE__ */ i(Fc, {})
|
|
4836
4849
|
}
|
|
4837
4850
|
),
|
|
4838
4851
|
/* @__PURE__ */ i(
|
|
@@ -4843,8 +4856,8 @@ function ii(t) {
|
|
|
4843
4856
|
/* star */
|
|
4844
4857
|
}),
|
|
4845
4858
|
onClick: () => {
|
|
4846
|
-
const
|
|
4847
|
-
r.current.toolController.setToolEnabled(
|
|
4859
|
+
const g = r.current.toolController.getPrimaryTools();
|
|
4860
|
+
r.current.toolController.setToolEnabled(g[5]), x("shapes"), g[5].setEnabled(!0), s(
|
|
4848
4861
|
9
|
|
4849
4862
|
/* star */
|
|
4850
4863
|
), p(
|
|
@@ -4852,7 +4865,7 @@ function ii(t) {
|
|
|
4852
4865
|
/* star */
|
|
4853
4866
|
);
|
|
4854
4867
|
},
|
|
4855
|
-
children: /* @__PURE__ */ i(
|
|
4868
|
+
children: /* @__PURE__ */ i(Uc, {})
|
|
4856
4869
|
}
|
|
4857
4870
|
),
|
|
4858
4871
|
/* @__PURE__ */ i(
|
|
@@ -4863,8 +4876,8 @@ function ii(t) {
|
|
|
4863
4876
|
/* cloud */
|
|
4864
4877
|
}),
|
|
4865
4878
|
onClick: () => {
|
|
4866
|
-
const
|
|
4867
|
-
r.current.toolController.setToolEnabled(
|
|
4879
|
+
const g = r.current.toolController.getPrimaryTools();
|
|
4880
|
+
r.current.toolController.setToolEnabled(g[5]), x("shapes"), g[5].setEnabled(!0), s(
|
|
4868
4881
|
10
|
|
4869
4882
|
/* cloud */
|
|
4870
4883
|
), p(
|
|
@@ -4872,7 +4885,7 @@ function ii(t) {
|
|
|
4872
4885
|
/* cloud */
|
|
4873
4886
|
);
|
|
4874
4887
|
},
|
|
4875
|
-
children: /* @__PURE__ */ i(
|
|
4888
|
+
children: /* @__PURE__ */ i(Gc, {})
|
|
4876
4889
|
}
|
|
4877
4890
|
),
|
|
4878
4891
|
/* @__PURE__ */ i(
|
|
@@ -4883,8 +4896,8 @@ function ii(t) {
|
|
|
4883
4896
|
/* parallelogram */
|
|
4884
4897
|
}),
|
|
4885
4898
|
onClick: () => {
|
|
4886
|
-
const
|
|
4887
|
-
r.current.toolController.setToolEnabled(
|
|
4899
|
+
const g = r.current.toolController.getPrimaryTools();
|
|
4900
|
+
r.current.toolController.setToolEnabled(g[5]), x("shapes"), g[5].setEnabled(!0), s(
|
|
4888
4901
|
11
|
|
4889
4902
|
/* parallelogram */
|
|
4890
4903
|
), p(
|
|
@@ -4892,7 +4905,7 @@ function ii(t) {
|
|
|
4892
4905
|
/* parallelogram */
|
|
4893
4906
|
);
|
|
4894
4907
|
},
|
|
4895
|
-
children: /* @__PURE__ */ i(
|
|
4908
|
+
children: /* @__PURE__ */ i(qc, {})
|
|
4896
4909
|
}
|
|
4897
4910
|
),
|
|
4898
4911
|
/* @__PURE__ */ i("div", { className: z.line }),
|
|
@@ -4901,7 +4914,7 @@ function ii(t) {
|
|
|
4901
4914
|
{
|
|
4902
4915
|
className: P(z.tool),
|
|
4903
4916
|
onClick: c,
|
|
4904
|
-
children: /* @__PURE__ */ i(
|
|
4917
|
+
children: /* @__PURE__ */ i(Bc, {})
|
|
4905
4918
|
}
|
|
4906
4919
|
),
|
|
4907
4920
|
/* @__PURE__ */ i(
|
|
@@ -4909,7 +4922,7 @@ function ii(t) {
|
|
|
4909
4922
|
{
|
|
4910
4923
|
className: P(z.tool),
|
|
4911
4924
|
onClick: d,
|
|
4912
|
-
children: /* @__PURE__ */ i(
|
|
4925
|
+
children: /* @__PURE__ */ i($c, {})
|
|
4913
4926
|
}
|
|
4914
4927
|
),
|
|
4915
4928
|
/* @__PURE__ */ i(
|
|
@@ -4917,21 +4930,21 @@ function ii(t) {
|
|
|
4917
4930
|
{
|
|
4918
4931
|
className: P(z.tool),
|
|
4919
4932
|
onClick: u,
|
|
4920
|
-
children: /* @__PURE__ */ i(
|
|
4933
|
+
children: /* @__PURE__ */ i(Vc, {})
|
|
4921
4934
|
}
|
|
4922
4935
|
)
|
|
4923
4936
|
] }),
|
|
4924
|
-
/* @__PURE__ */
|
|
4937
|
+
/* @__PURE__ */ f("div", { className: z.optionsWrap, children: [
|
|
4925
4938
|
m === "pencil" && /* @__PURE__ */ i(
|
|
4926
|
-
|
|
4939
|
+
Yc,
|
|
4927
4940
|
{
|
|
4928
4941
|
setColorPen: e,
|
|
4929
4942
|
setThicknessPen: n
|
|
4930
4943
|
}
|
|
4931
4944
|
),
|
|
4932
|
-
m === "highlighter" && /* @__PURE__ */ i(
|
|
4945
|
+
m === "highlighter" && /* @__PURE__ */ i(Kc, { setColorHighlight: a }),
|
|
4933
4946
|
m === "shapes" && /* @__PURE__ */ i(
|
|
4934
|
-
|
|
4947
|
+
Zc,
|
|
4935
4948
|
{
|
|
4936
4949
|
changeBorderColorShape: o,
|
|
4937
4950
|
changeColorShape: l,
|
|
@@ -4945,7 +4958,7 @@ function ii(t) {
|
|
|
4945
4958
|
) });
|
|
4946
4959
|
}
|
|
4947
4960
|
let Rt = !1;
|
|
4948
|
-
const
|
|
4961
|
+
const Jc = ({ editor: t, upload: e }) => {
|
|
4949
4962
|
const [r, n] = S(!1), a = J(null), o = J(null), c = () => {
|
|
4950
4963
|
(async () => {
|
|
4951
4964
|
const v = document.querySelector("#easydrawer");
|
|
@@ -5010,7 +5023,7 @@ const Zc = ({ editor: t, upload: e }) => {
|
|
|
5010
5023
|
}
|
|
5011
5024
|
a.current.history.undo();
|
|
5012
5025
|
};
|
|
5013
|
-
return /* @__PURE__ */
|
|
5026
|
+
return /* @__PURE__ */ f(
|
|
5014
5027
|
ut,
|
|
5015
5028
|
{
|
|
5016
5029
|
onOpenChange: n,
|
|
@@ -5024,9 +5037,9 @@ const Zc = ({ editor: t, upload: e }) => {
|
|
|
5024
5037
|
tooltip: "Drawer"
|
|
5025
5038
|
}
|
|
5026
5039
|
) }),
|
|
5027
|
-
/* @__PURE__ */
|
|
5040
|
+
/* @__PURE__ */ f(lt, { className: "richtext-z-[99999] !richtext-max-w-[1300px]", children: [
|
|
5028
5041
|
/* @__PURE__ */ i(dt, { children: "Drawer" }),
|
|
5029
|
-
/* @__PURE__ */
|
|
5042
|
+
/* @__PURE__ */ f("div", { style: { height: "600px", width: "100%", borderWidth: 1, background: "white", position: "relative" }, children: [
|
|
5030
5043
|
/* @__PURE__ */ i(
|
|
5031
5044
|
"div",
|
|
5032
5045
|
{
|
|
@@ -5035,7 +5048,7 @@ const Zc = ({ editor: t, upload: e }) => {
|
|
|
5035
5048
|
}
|
|
5036
5049
|
),
|
|
5037
5050
|
/* @__PURE__ */ i(
|
|
5038
|
-
|
|
5051
|
+
ri,
|
|
5039
5052
|
{
|
|
5040
5053
|
changeBorderColorShape: w,
|
|
5041
5054
|
changeColorShape: m,
|
|
@@ -5077,7 +5090,7 @@ const Zc = ({ editor: t, upload: e }) => {
|
|
|
5077
5090
|
BOTTOM_LEFT: "bl",
|
|
5078
5091
|
BOTTOM_RIGHT: "br"
|
|
5079
5092
|
};
|
|
5080
|
-
function
|
|
5093
|
+
function Qc({ editor: t, node: e, updateAttributes: r, getPos: n, selected: a }) {
|
|
5081
5094
|
const [o, c] = S({
|
|
5082
5095
|
width: xt,
|
|
5083
5096
|
height: xt
|
|
@@ -5105,7 +5118,7 @@ function Jc({ editor: t, node: e, updateAttributes: r, getPos: n, selected: a })
|
|
|
5105
5118
|
height: A || void 0
|
|
5106
5119
|
}
|
|
5107
5120
|
};
|
|
5108
|
-
}, [e == null ? void 0 : e.attrs]),
|
|
5121
|
+
}, [e == null ? void 0 : e.attrs]), g = U(() => {
|
|
5109
5122
|
const {
|
|
5110
5123
|
style: { width: b }
|
|
5111
5124
|
} = p;
|
|
@@ -5147,9 +5160,9 @@ function Jc({ editor: t, node: e, updateAttributes: r, getPos: n, selected: a })
|
|
|
5147
5160
|
ht((b) => {
|
|
5148
5161
|
if (b.preventDefault(), b.stopPropagation(), !d)
|
|
5149
5162
|
return;
|
|
5150
|
-
const { x: k, w: _, dir: D } = m, R = (b.clientX - k) * (/l/.test(D) ? -1 : 1), { width: A, height: $ } = e == null ? void 0 : e.attrs, F = A / $,
|
|
5163
|
+
const { x: k, w: _, dir: D } = m, R = (b.clientX - k) * (/l/.test(D) ? -1 : 1), { width: A, height: $ } = e == null ? void 0 : e.attrs, F = A / $, K = $e(_ + R, he, o.width), nt = Math.round(K / F);
|
|
5151
5164
|
r({
|
|
5152
|
-
width:
|
|
5165
|
+
width: K,
|
|
5153
5166
|
height: nt
|
|
5154
5167
|
});
|
|
5155
5168
|
}, ft),
|
|
@@ -5180,13 +5193,13 @@ function Jc({ editor: t, node: e, updateAttributes: r, getPos: n, selected: a })
|
|
|
5180
5193
|
gt,
|
|
5181
5194
|
{
|
|
5182
5195
|
className: "image-view",
|
|
5183
|
-
style: { ...
|
|
5184
|
-
children: /* @__PURE__ */
|
|
5196
|
+
style: { ...g, width: "100%", textAlign: w },
|
|
5197
|
+
children: /* @__PURE__ */ f(
|
|
5185
5198
|
"div",
|
|
5186
5199
|
{
|
|
5187
5200
|
"data-drag-handle": !0,
|
|
5188
5201
|
draggable: "true",
|
|
5189
|
-
style: { ...
|
|
5202
|
+
style: { ...g, background: "#fff" },
|
|
5190
5203
|
className: `image-view__body ${a ? "image-view__body--focused" : ""} ${d ? "image-view__body--resizing" : ""}`,
|
|
5191
5204
|
children: [
|
|
5192
5205
|
/* @__PURE__ */ i(
|
|
@@ -5234,7 +5247,7 @@ const hr = de.extend({
|
|
|
5234
5247
|
button: ({ editor: e, t: r, extension: n }) => {
|
|
5235
5248
|
var a;
|
|
5236
5249
|
return {
|
|
5237
|
-
component:
|
|
5250
|
+
component: Jc,
|
|
5238
5251
|
componentProps: {
|
|
5239
5252
|
action: () => !0,
|
|
5240
5253
|
isActive: () => !1,
|
|
@@ -5282,7 +5295,7 @@ const hr = de.extend({
|
|
|
5282
5295
|
};
|
|
5283
5296
|
},
|
|
5284
5297
|
addNodeView() {
|
|
5285
|
-
return pt(
|
|
5298
|
+
return pt(Qc);
|
|
5286
5299
|
},
|
|
5287
5300
|
// @ts-ignore
|
|
5288
5301
|
addCommands() {
|
|
@@ -5335,7 +5348,7 @@ const hr = de.extend({
|
|
|
5335
5348
|
}
|
|
5336
5349
|
});
|
|
5337
5350
|
let Ot = !1;
|
|
5338
|
-
function
|
|
5351
|
+
function ts({ editor: t, attrs: e, extension: r }) {
|
|
5339
5352
|
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
5353
|
(async () => {
|
|
5341
5354
|
const L = document.querySelector("#easydrawer");
|
|
@@ -5382,7 +5395,7 @@ function Qc({ editor: t, attrs: e, extension: r }) {
|
|
|
5382
5395
|
}, p = (M) => {
|
|
5383
5396
|
const L = c.current.getWidgetById("shape");
|
|
5384
5397
|
L && L.setShapeType(M);
|
|
5385
|
-
},
|
|
5398
|
+
}, g = (M) => {
|
|
5386
5399
|
const L = o.current.toolController.getPrimaryTools()[5], N = c.current.getWidgetById("shape");
|
|
5387
5400
|
L && N && (L.setColor(M), N.serializeState());
|
|
5388
5401
|
}, I = (M) => {
|
|
@@ -5400,7 +5413,7 @@ function Qc({ editor: t, attrs: e, extension: r }) {
|
|
|
5400
5413
|
}
|
|
5401
5414
|
o.current.history.undo();
|
|
5402
5415
|
};
|
|
5403
|
-
return /* @__PURE__ */
|
|
5416
|
+
return /* @__PURE__ */ f(
|
|
5404
5417
|
ut,
|
|
5405
5418
|
{
|
|
5406
5419
|
onOpenChange: a,
|
|
@@ -5414,9 +5427,9 @@ function Qc({ editor: t, attrs: e, extension: r }) {
|
|
|
5414
5427
|
tooltip: "Edit Drawer"
|
|
5415
5428
|
}
|
|
5416
5429
|
) }),
|
|
5417
|
-
/* @__PURE__ */
|
|
5430
|
+
/* @__PURE__ */ f(lt, { className: "richtext-z-[99999] !richtext-max-w-[1300px]", children: [
|
|
5418
5431
|
/* @__PURE__ */ i(dt, { children: "Edit Drawer" }),
|
|
5419
|
-
/* @__PURE__ */
|
|
5432
|
+
/* @__PURE__ */ f("div", { style: { height: "100%", borderWidth: 1, background: "white", position: "relative" }, children: [
|
|
5420
5433
|
/* @__PURE__ */ i(
|
|
5421
5434
|
"div",
|
|
5422
5435
|
{
|
|
@@ -5425,10 +5438,10 @@ function Qc({ editor: t, attrs: e, extension: r }) {
|
|
|
5425
5438
|
}
|
|
5426
5439
|
),
|
|
5427
5440
|
/* @__PURE__ */ i(
|
|
5428
|
-
|
|
5441
|
+
ri,
|
|
5429
5442
|
{
|
|
5430
5443
|
changeBorderColorShape: T,
|
|
5431
|
-
changeColorShape:
|
|
5444
|
+
changeColorShape: g,
|
|
5432
5445
|
changeShape: p,
|
|
5433
5446
|
onClear: () => {
|
|
5434
5447
|
if (!Ot) {
|
|
@@ -5462,7 +5475,7 @@ function Qc({ editor: t, attrs: e, extension: r }) {
|
|
|
5462
5475
|
}
|
|
5463
5476
|
);
|
|
5464
5477
|
}
|
|
5465
|
-
function
|
|
5478
|
+
function ii(t, e) {
|
|
5466
5479
|
const [r, n] = S(void 0);
|
|
5467
5480
|
return B(() => {
|
|
5468
5481
|
const a = () => {
|
|
@@ -5474,17 +5487,17 @@ function ni(t, e) {
|
|
|
5474
5487
|
};
|
|
5475
5488
|
}, [t, e]), r;
|
|
5476
5489
|
}
|
|
5477
|
-
const
|
|
5490
|
+
const es = {
|
|
5478
5491
|
maxWidth: "auto",
|
|
5479
5492
|
zIndex: 20,
|
|
5480
5493
|
appendTo: "parent",
|
|
5481
5494
|
moveTransition: "transform 0.1s ease-out"
|
|
5482
5495
|
};
|
|
5483
|
-
function
|
|
5496
|
+
function rs({ item: t, disabled: e, editor: r }) {
|
|
5484
5497
|
var a;
|
|
5485
5498
|
const n = t.component;
|
|
5486
5499
|
return n ? /* @__PURE__ */ i(Pe, { children: t.type === "divider" ? /* @__PURE__ */ i(
|
|
5487
|
-
|
|
5500
|
+
Q,
|
|
5488
5501
|
{
|
|
5489
5502
|
className: "!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]",
|
|
5490
5503
|
orientation: "vertical"
|
|
@@ -5498,26 +5511,26 @@ function es({ item: t, disabled: e, editor: r }) {
|
|
|
5498
5511
|
}
|
|
5499
5512
|
) }) : /* @__PURE__ */ i(V, {});
|
|
5500
5513
|
}
|
|
5501
|
-
function
|
|
5514
|
+
function is(t) {
|
|
5502
5515
|
return t.type.name === "drawer";
|
|
5503
5516
|
}
|
|
5504
|
-
function
|
|
5505
|
-
const { lang: e } = q(), r = zt(t.editor, hr.name), n =
|
|
5517
|
+
function ns(t) {
|
|
5518
|
+
const { lang: e } = q(), r = zt(t.editor, hr.name), n = ii(t.editor, hr.name), a = ({ editor: c }) => {
|
|
5506
5519
|
const { selection: l } = c.view.state, { $from: s, to: h } = l;
|
|
5507
5520
|
let d = !1;
|
|
5508
5521
|
return c.view.state.doc.nodesBetween(s.pos, h, (u) => {
|
|
5509
|
-
if (
|
|
5522
|
+
if (is(u))
|
|
5510
5523
|
return d = !0, !1;
|
|
5511
5524
|
}), d;
|
|
5512
|
-
}, o = U(() => t.disabled ? [] :
|
|
5525
|
+
}, o = U(() => t.disabled ? [] : Is(t.editor), [t.disabled, t.editor, e]);
|
|
5513
5526
|
return /* @__PURE__ */ i(V, { children: /* @__PURE__ */ i(
|
|
5514
|
-
|
|
5527
|
+
et,
|
|
5515
5528
|
{
|
|
5516
5529
|
editor: t == null ? void 0 : t.editor,
|
|
5517
5530
|
shouldShow: a,
|
|
5518
|
-
tippyOptions:
|
|
5531
|
+
tippyOptions: es,
|
|
5519
5532
|
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
|
-
|
|
5533
|
+
ts,
|
|
5521
5534
|
{
|
|
5522
5535
|
attrs: r,
|
|
5523
5536
|
editor: t.editor,
|
|
@@ -5525,7 +5538,7 @@ function is(t) {
|
|
|
5525
5538
|
},
|
|
5526
5539
|
`bubbleMenu-drawer-${l}`
|
|
5527
5540
|
) : /* @__PURE__ */ i(
|
|
5528
|
-
|
|
5541
|
+
rs,
|
|
5529
5542
|
{
|
|
5530
5543
|
disabled: t.disabled,
|
|
5531
5544
|
editor: t.editor,
|
|
@@ -5536,7 +5549,7 @@ function is(t) {
|
|
|
5536
5549
|
}
|
|
5537
5550
|
) });
|
|
5538
5551
|
}
|
|
5539
|
-
const
|
|
5552
|
+
const os = { padding: "0 12px 12px" }, ni = ({ width: t, maxWidth: e, height: r, onOk: n, children: a }) => {
|
|
5540
5553
|
const { t: o } = q(), [c, l] = S({
|
|
5541
5554
|
width: "",
|
|
5542
5555
|
height: "",
|
|
@@ -5552,12 +5565,12 @@ const ns = { padding: "0 12px 12px" }, oi = ({ width: t, maxWidth: e, height: r,
|
|
|
5552
5565
|
function s(h) {
|
|
5553
5566
|
h.preventDefault(), h.stopPropagation(), n(c);
|
|
5554
5567
|
}
|
|
5555
|
-
return /* @__PURE__ */
|
|
5568
|
+
return /* @__PURE__ */ f(It, { modal: !0, children: [
|
|
5556
5569
|
/* @__PURE__ */ i(Et, { asChild: !0, children: a }),
|
|
5557
|
-
/* @__PURE__ */ i(Tt, { children: /* @__PURE__ */ i("div", { style:
|
|
5570
|
+
/* @__PURE__ */ i(Tt, { children: /* @__PURE__ */ i("div", { style: os, children: /* @__PURE__ */ f("form", { className: "richtext-flex richtext-flex-col richtext-gap-2", onSubmit: s, children: [
|
|
5558
5571
|
/* @__PURE__ */ i(ct, { className: "mb-[6px]", children: "Width" }),
|
|
5559
5572
|
/* @__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
|
-
|
|
5573
|
+
tt,
|
|
5561
5574
|
{
|
|
5562
5575
|
type: "number",
|
|
5563
5576
|
value: c.width,
|
|
@@ -5567,7 +5580,7 @@ const ns = { padding: "0 12px 12px" }, oi = ({ width: t, maxWidth: e, height: r,
|
|
|
5567
5580
|
) }) }),
|
|
5568
5581
|
/* @__PURE__ */ i(ct, { className: "mb-[6px]", children: "Max Width" }),
|
|
5569
5582
|
/* @__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(
|
|
5570
|
-
|
|
5583
|
+
tt,
|
|
5571
5584
|
{
|
|
5572
5585
|
type: "number",
|
|
5573
5586
|
value: c.maxWidth,
|
|
@@ -5577,7 +5590,7 @@ const ns = { padding: "0 12px 12px" }, oi = ({ width: t, maxWidth: e, height: r,
|
|
|
5577
5590
|
) }) }),
|
|
5578
5591
|
/* @__PURE__ */ i(ct, { className: "mb-[6px]", children: "Height" }),
|
|
5579
5592
|
/* @__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(
|
|
5580
|
-
|
|
5593
|
+
tt,
|
|
5581
5594
|
{
|
|
5582
5595
|
type: "number",
|
|
5583
5596
|
value: c.height,
|
|
@@ -5589,7 +5602,7 @@ const ns = { padding: "0 12px 12px" }, oi = ({ width: t, maxWidth: e, height: r,
|
|
|
5589
5602
|
] }) }) })
|
|
5590
5603
|
] });
|
|
5591
5604
|
}, vt = /* @__PURE__ */ new Map();
|
|
5592
|
-
function
|
|
5605
|
+
function as(t) {
|
|
5593
5606
|
const e = t.options.element;
|
|
5594
5607
|
vt.has("width") || vt.set("width", e.clientWidth), vt.has("width") && vt.get("width") <= 0 && vt.set("width", e.clientWidth);
|
|
5595
5608
|
const r = { attributes: !0, childList: !0, subtree: !0 }, n = function() {
|
|
@@ -5599,8 +5612,8 @@ function os(t) {
|
|
|
5599
5612
|
a.disconnect();
|
|
5600
5613
|
}), { width: vt.get("width") };
|
|
5601
5614
|
}
|
|
5602
|
-
function
|
|
5603
|
-
const { t: e } = q(), { width: r } =
|
|
5615
|
+
function cs({ editor: t }) {
|
|
5616
|
+
const { t: e } = q(), { width: r } = as(t), n = zt(t, St.name, {
|
|
5604
5617
|
defaultShowPicker: !1,
|
|
5605
5618
|
createUser: "",
|
|
5606
5619
|
width: 0,
|
|
@@ -5611,12 +5624,12 @@ function as({ editor: t }) {
|
|
|
5611
5624
|
},
|
|
5612
5625
|
[t]
|
|
5613
5626
|
), h = H(() => {
|
|
5614
|
-
|
|
5627
|
+
Qa(n);
|
|
5615
5628
|
}, [t, n]), d = H(() => t.isActive(St.name), [t]), u = H(() => Gt(St.name, t), [t]);
|
|
5616
5629
|
return B(() => {
|
|
5617
5630
|
a && (h(), t.chain().updateAttributes(St.name, { defaultShowPicker: !1 }).focus().run());
|
|
5618
5631
|
}, [o, a, t, h]), /* @__PURE__ */ i(
|
|
5619
|
-
|
|
5632
|
+
et,
|
|
5620
5633
|
{
|
|
5621
5634
|
className: "bubble-menu",
|
|
5622
5635
|
editor: t,
|
|
@@ -5633,7 +5646,7 @@ function as({ editor: t }) {
|
|
|
5633
5646
|
// toggleVisible(false)
|
|
5634
5647
|
// },
|
|
5635
5648
|
},
|
|
5636
|
-
children: /* @__PURE__ */
|
|
5649
|
+
children: /* @__PURE__ */ f("div", { className: "richtext-w-auto richtext-px-3 richtext-py-2 richtext-transition-all !richtext-border richtext-rounded-sm richtext-shadow-sm richtext-pointer-events-auto richtext-select-none richtext-border-neutral-200 dark:richtext-border-neutral-800 richtext-bg-background", children: [
|
|
5637
5650
|
/* @__PURE__ */ i(
|
|
5638
5651
|
O,
|
|
5639
5652
|
{
|
|
@@ -5642,7 +5655,7 @@ function as({ editor: t }) {
|
|
|
5642
5655
|
tooltip: e("editor.edit")
|
|
5643
5656
|
}
|
|
5644
5657
|
),
|
|
5645
|
-
/* @__PURE__ */ i(
|
|
5658
|
+
/* @__PURE__ */ i(ni, { width: c, maxWidth: r, height: l, onOk: s, children: /* @__PURE__ */ i(
|
|
5646
5659
|
O,
|
|
5647
5660
|
{
|
|
5648
5661
|
icon: "Settings",
|
|
@@ -5661,7 +5674,7 @@ function as({ editor: t }) {
|
|
|
5661
5674
|
}
|
|
5662
5675
|
);
|
|
5663
5676
|
}
|
|
5664
|
-
function
|
|
5677
|
+
function ss({ editor: t }) {
|
|
5665
5678
|
const { t: e } = q(), { width: r, height: n, url: a } = zt(t, kt.name, {
|
|
5666
5679
|
width: 0,
|
|
5667
5680
|
height: 0,
|
|
@@ -5682,14 +5695,14 @@ function cs({ editor: t }) {
|
|
|
5682
5695
|
}, [a]), m = H(() => {
|
|
5683
5696
|
c(!0);
|
|
5684
5697
|
}, [c]), x = H(
|
|
5685
|
-
(
|
|
5686
|
-
t.chain().updateAttributes(kt.name,
|
|
5698
|
+
(g) => {
|
|
5699
|
+
t.chain().updateAttributes(kt.name, g).setNodeSelection(t.state.selection.from).focus().run();
|
|
5687
5700
|
},
|
|
5688
5701
|
[t]
|
|
5689
5702
|
), w = H(() => t.isActive(kt.name) && !a, [t, a]), p = H(() => Gt(kt.name, t), [t]);
|
|
5690
|
-
return /* @__PURE__ */
|
|
5703
|
+
return /* @__PURE__ */ f(V, { children: [
|
|
5691
5704
|
/* @__PURE__ */ i(
|
|
5692
|
-
|
|
5705
|
+
et,
|
|
5693
5706
|
{
|
|
5694
5707
|
className: "bubble-menu",
|
|
5695
5708
|
editor: t,
|
|
@@ -5706,7 +5719,7 @@ function cs({ editor: t }) {
|
|
|
5706
5719
|
// toggleVisible(false)
|
|
5707
5720
|
// },
|
|
5708
5721
|
},
|
|
5709
|
-
children: /* @__PURE__ */
|
|
5722
|
+
children: /* @__PURE__ */ f("div", { className: "richtext-w-auto richtext-px-3 richtext-py-2 richtext-transition-all !richtext-border richtext-rounded-sm richtext-shadow-sm richtext-pointer-events-auto richtext-select-none richtext-border-neutral-200 dark:richtext-border-neutral-800 richtext-bg-background", children: [
|
|
5710
5723
|
/* @__PURE__ */ i(
|
|
5711
5724
|
O,
|
|
5712
5725
|
{
|
|
@@ -5723,7 +5736,7 @@ function cs({ editor: t }) {
|
|
|
5723
5736
|
tooltip: "Open Edit Link"
|
|
5724
5737
|
}
|
|
5725
5738
|
),
|
|
5726
|
-
/* @__PURE__ */ i(
|
|
5739
|
+
/* @__PURE__ */ i(ni, { width: r, height: n, onOk: x, children: /* @__PURE__ */ i(
|
|
5727
5740
|
O,
|
|
5728
5741
|
{
|
|
5729
5742
|
icon: "Settings",
|
|
@@ -5741,26 +5754,26 @@ function cs({ editor: t }) {
|
|
|
5741
5754
|
] })
|
|
5742
5755
|
}
|
|
5743
5756
|
),
|
|
5744
|
-
/* @__PURE__ */
|
|
5757
|
+
/* @__PURE__ */ f(
|
|
5745
5758
|
ut,
|
|
5746
5759
|
{
|
|
5747
5760
|
open: o,
|
|
5748
5761
|
onOpenChange: c,
|
|
5749
5762
|
children: [
|
|
5750
5763
|
/* @__PURE__ */ i(mt, {}),
|
|
5751
|
-
/* @__PURE__ */
|
|
5752
|
-
/* @__PURE__ */ i(
|
|
5764
|
+
/* @__PURE__ */ f(lt, { children: [
|
|
5765
|
+
/* @__PURE__ */ i(Jr, { children: /* @__PURE__ */ i(dt, { children: "Edit Link Iframe" }) }),
|
|
5753
5766
|
/* @__PURE__ */ i(
|
|
5754
|
-
|
|
5767
|
+
tt,
|
|
5755
5768
|
{
|
|
5756
5769
|
value: l,
|
|
5757
|
-
onInput: (
|
|
5770
|
+
onInput: (g) => s(g.target.value),
|
|
5758
5771
|
type: "url",
|
|
5759
5772
|
autoFocus: !0,
|
|
5760
5773
|
placeholder: "Enter link"
|
|
5761
5774
|
}
|
|
5762
5775
|
),
|
|
5763
|
-
/* @__PURE__ */
|
|
5776
|
+
/* @__PURE__ */ f(wt, { children: [
|
|
5764
5777
|
/* @__PURE__ */ i(G, { onClick: h, children: "Cancel" }),
|
|
5765
5778
|
/* @__PURE__ */ i(G, { onClick: d, children: "OK" })
|
|
5766
5779
|
] })
|
|
@@ -5770,7 +5783,7 @@ function cs({ editor: t }) {
|
|
|
5770
5783
|
)
|
|
5771
5784
|
] });
|
|
5772
5785
|
}
|
|
5773
|
-
function
|
|
5786
|
+
function ls({ editor: t, ...e }) {
|
|
5774
5787
|
const r = zt(t, Mt.name, {
|
|
5775
5788
|
text: "",
|
|
5776
5789
|
defaultShowPicker: !1
|
|
@@ -5793,7 +5806,7 @@ function ss({ editor: t, ...e }) {
|
|
|
5793
5806
|
[o, m]
|
|
5794
5807
|
);
|
|
5795
5808
|
return /* @__PURE__ */ i(
|
|
5796
|
-
|
|
5809
|
+
et,
|
|
5797
5810
|
{
|
|
5798
5811
|
editor: t,
|
|
5799
5812
|
pluginKey: "Katex-bubble-menu",
|
|
@@ -5809,7 +5822,7 @@ function ss({ editor: t, ...e }) {
|
|
|
5809
5822
|
s(!1);
|
|
5810
5823
|
}
|
|
5811
5824
|
},
|
|
5812
|
-
children: e != null && e.disabled ? /* @__PURE__ */ i(V, {}) : /* @__PURE__ */ i("div", { className: "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: l ? /* @__PURE__ */
|
|
5825
|
+
children: e != null && e.disabled ? /* @__PURE__ */ i(V, {}) : /* @__PURE__ */ i("div", { className: "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: l ? /* @__PURE__ */ f(V, { children: [
|
|
5813
5826
|
/* @__PURE__ */ i(
|
|
5814
5827
|
jt,
|
|
5815
5828
|
{
|
|
@@ -5823,11 +5836,11 @@ function ss({ editor: t, ...e }) {
|
|
|
5823
5836
|
}
|
|
5824
5837
|
),
|
|
5825
5838
|
x && /* @__PURE__ */ i("div", { className: "richtext-my-[10px] richtext-p-[10px] richtext-rounded-[6px] !richtext-border-[1px] richtext-whitespace-nowrap richtext-overflow-auto", children: x }),
|
|
5826
|
-
/* @__PURE__ */
|
|
5839
|
+
/* @__PURE__ */ f("div", { className: "richtext-flex richtext-items-center richtext-justify-between richtext-gap-[6px]", children: [
|
|
5827
5840
|
/* @__PURE__ */ i(G, { onClick: u, className: "richtext-flex-1", children: "Submit" }),
|
|
5828
5841
|
/* @__PURE__ */ i("a", { href: "https://katex.org/docs/supported", target: "_blank", rel: "noreferrer noopener", children: /* @__PURE__ */ i(Ar, { size: 16 }) })
|
|
5829
5842
|
] })
|
|
5830
|
-
] }) : /* @__PURE__ */
|
|
5843
|
+
] }) : /* @__PURE__ */ f("div", { className: "richtext-flex richtext-items-center richtext-justify-center richtext-gap-[6px]", children: [
|
|
5831
5844
|
/* @__PURE__ */ i(O, { tooltip: "Edit", action: () => s(!l), children: /* @__PURE__ */ i(Mr, { size: 16 }) }),
|
|
5832
5845
|
/* @__PURE__ */ i(O, { tooltip: "Delete", action: d, children: /* @__PURE__ */ i(Sr, { size: 16 }) })
|
|
5833
5846
|
] }) })
|
|
@@ -5835,10 +5848,10 @@ function ss({ editor: t, ...e }) {
|
|
|
5835
5848
|
);
|
|
5836
5849
|
}
|
|
5837
5850
|
const ur = `graph TB
|
|
5838
|
-
a-->b`,
|
|
5839
|
-
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 (
|
|
5851
|
+
a-->b`, ds = ({ editor: t, attrs: e, extension: r }) => {
|
|
5852
|
+
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 (g) => {
|
|
5840
5853
|
try {
|
|
5841
|
-
const { svg: I } = await ce.render("mermaid-svg",
|
|
5854
|
+
const { svg: I } = await ce.render("mermaid-svg", g);
|
|
5842
5855
|
s(I);
|
|
5843
5856
|
} catch {
|
|
5844
5857
|
s("");
|
|
@@ -5856,7 +5869,7 @@ a-->b`, ls = ({ editor: t, attrs: e, extension: r }) => {
|
|
|
5856
5869
|
h && w();
|
|
5857
5870
|
}, [h]), B(() => {
|
|
5858
5871
|
h && x(o);
|
|
5859
|
-
}, [o]), /* @__PURE__ */
|
|
5872
|
+
}, [o]), /* @__PURE__ */ f(
|
|
5860
5873
|
ut,
|
|
5861
5874
|
{
|
|
5862
5875
|
onOpenChange: d,
|
|
@@ -5870,16 +5883,16 @@ a-->b`, ls = ({ editor: t, attrs: e, extension: r }) => {
|
|
|
5870
5883
|
tooltip: "Edit Mermaid"
|
|
5871
5884
|
}
|
|
5872
5885
|
) }),
|
|
5873
|
-
/* @__PURE__ */
|
|
5886
|
+
/* @__PURE__ */ f(lt, { className: "richtext-z-[99999] !richtext-max-w-[1300px]", children: [
|
|
5874
5887
|
/* @__PURE__ */ i(dt, { children: "Edit Mermaid" }),
|
|
5875
|
-
/* @__PURE__ */ i("div", { style: { height: "100%", border: "1px solid hsl(var(--border))" }, children: /* @__PURE__ */
|
|
5888
|
+
/* @__PURE__ */ i("div", { style: { height: "100%", border: "1px solid hsl(var(--border))" }, children: /* @__PURE__ */ f("div", { className: "richtext-flex richtext-gap-[10px] richtext-rounded-[10px] richtext-p-[10px]", children: [
|
|
5876
5889
|
/* @__PURE__ */ i(
|
|
5877
5890
|
jt,
|
|
5878
5891
|
{
|
|
5879
5892
|
autoFocus: !0,
|
|
5880
5893
|
className: "richtext-flex-1",
|
|
5881
5894
|
defaultValue: ur,
|
|
5882
|
-
onChange: (
|
|
5895
|
+
onChange: (g) => c(g.target.value),
|
|
5883
5896
|
placeholder: "Text",
|
|
5884
5897
|
required: !0,
|
|
5885
5898
|
rows: 10,
|
|
@@ -5905,8 +5918,8 @@ a-->b`, ls = ({ editor: t, attrs: e, extension: r }) => {
|
|
|
5905
5918
|
onClick: async () => {
|
|
5906
5919
|
if (o !== "") {
|
|
5907
5920
|
if (o) {
|
|
5908
|
-
const
|
|
5909
|
-
let y = me(
|
|
5921
|
+
const g = u.current.querySelector("svg"), { width: I, height: T } = g.getBoundingClientRect(), v = `mermaid-${fe()}.svg`;
|
|
5922
|
+
let y = me(g.outerHTML);
|
|
5910
5923
|
if (m) {
|
|
5911
5924
|
const C = qt(y, v);
|
|
5912
5925
|
y = await m(C);
|
|
@@ -5933,17 +5946,17 @@ a-->b`, ls = ({ editor: t, attrs: e, extension: r }) => {
|
|
|
5933
5946
|
]
|
|
5934
5947
|
}
|
|
5935
5948
|
);
|
|
5936
|
-
},
|
|
5949
|
+
}, hs = {
|
|
5937
5950
|
maxWidth: "auto",
|
|
5938
5951
|
zIndex: 20,
|
|
5939
5952
|
appendTo: "parent",
|
|
5940
5953
|
moveTransition: "transform 0.1s ease-out"
|
|
5941
5954
|
};
|
|
5942
|
-
function
|
|
5955
|
+
function us({ item: t, disabled: e, editor: r }) {
|
|
5943
5956
|
var a;
|
|
5944
5957
|
const n = t.component;
|
|
5945
5958
|
return n ? /* @__PURE__ */ i(Pe, { children: t.type === "divider" ? /* @__PURE__ */ i(
|
|
5946
|
-
|
|
5959
|
+
Q,
|
|
5947
5960
|
{
|
|
5948
5961
|
className: "!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]",
|
|
5949
5962
|
orientation: "vertical"
|
|
@@ -5957,26 +5970,26 @@ function hs({ item: t, disabled: e, editor: r }) {
|
|
|
5957
5970
|
}
|
|
5958
5971
|
) }) : /* @__PURE__ */ i(V, {});
|
|
5959
5972
|
}
|
|
5960
|
-
function
|
|
5973
|
+
function ms(t) {
|
|
5961
5974
|
return t.type.name === "mermaid";
|
|
5962
5975
|
}
|
|
5963
|
-
function
|
|
5964
|
-
const { lang: e } = q(), r = zt(t.editor, sr.name), n =
|
|
5976
|
+
function xs(t) {
|
|
5977
|
+
const { lang: e } = q(), r = zt(t.editor, sr.name), n = ii(t.editor, sr.name), a = ({ editor: c }) => {
|
|
5965
5978
|
const { selection: l } = c.view.state, { $from: s, to: h } = l;
|
|
5966
5979
|
let d = !1;
|
|
5967
5980
|
return c.view.state.doc.nodesBetween(s.pos, h, (u) => {
|
|
5968
|
-
if (
|
|
5981
|
+
if (ms(u))
|
|
5969
5982
|
return d = !0, !1;
|
|
5970
5983
|
}), d;
|
|
5971
|
-
}, o = U(() => t.disabled ? [] :
|
|
5984
|
+
}, o = U(() => t.disabled ? [] : Ls(t.editor), [t.disabled, t.editor, e]);
|
|
5972
5985
|
return /* @__PURE__ */ i(V, { children: /* @__PURE__ */ i(
|
|
5973
|
-
|
|
5986
|
+
et,
|
|
5974
5987
|
{
|
|
5975
5988
|
editor: t == null ? void 0 : t.editor,
|
|
5976
5989
|
shouldShow: a,
|
|
5977
|
-
tippyOptions:
|
|
5990
|
+
tippyOptions: hs,
|
|
5978
5991
|
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
|
-
|
|
5992
|
+
ds,
|
|
5980
5993
|
{
|
|
5981
5994
|
attrs: r,
|
|
5982
5995
|
editor: t.editor,
|
|
@@ -5984,7 +5997,7 @@ function ms(t) {
|
|
|
5984
5997
|
},
|
|
5985
5998
|
`bubbleMenu-mermaid-${l}`
|
|
5986
5999
|
) : /* @__PURE__ */ i(
|
|
5987
|
-
|
|
6000
|
+
us,
|
|
5988
6001
|
{
|
|
5989
6002
|
disabled: t.disabled,
|
|
5990
6003
|
editor: t.editor,
|
|
@@ -5995,12 +6008,12 @@ function ms(t) {
|
|
|
5995
6008
|
}
|
|
5996
6009
|
) });
|
|
5997
6010
|
}
|
|
5998
|
-
function
|
|
6011
|
+
function fs({ editor: t, disabled: e }) {
|
|
5999
6012
|
const [r, n] = S(!1), { t: a } = q(), o = H(({ editor: s }) => s.isActive(Ie.name), []), c = (s) => {
|
|
6000
6013
|
t.commands.updateTweet({ src: s }), n(!1);
|
|
6001
6014
|
}, l = H(() => Gt(Ie.name, t), [t]);
|
|
6002
6015
|
return /* @__PURE__ */ i(V, { children: /* @__PURE__ */ i(
|
|
6003
|
-
|
|
6016
|
+
et,
|
|
6004
6017
|
{
|
|
6005
6018
|
editor: t,
|
|
6006
6019
|
shouldShow: o,
|
|
@@ -6016,12 +6029,12 @@ function xs({ editor: t, disabled: e }) {
|
|
|
6016
6029
|
}
|
|
6017
6030
|
},
|
|
6018
6031
|
children: e ? /* @__PURE__ */ i(V, {}) : /* @__PURE__ */ i(V, { children: r ? /* @__PURE__ */ i(
|
|
6019
|
-
|
|
6032
|
+
ei,
|
|
6020
6033
|
{
|
|
6021
6034
|
editor: t,
|
|
6022
6035
|
onSetLink: c
|
|
6023
6036
|
}
|
|
6024
|
-
) : /* @__PURE__ */ i("div", { className: "richtext-flex richtext-items-center richtext-gap-2 richtext-rounded-lg !richtext-border richtext-border-neutral-200 richtext-bg-white richtext-p-2 richtext-shadow-sm dark:richtext-border-neutral-800 dark:richtext-bg-black", children: /* @__PURE__ */
|
|
6037
|
+
) : /* @__PURE__ */ i("div", { className: "richtext-flex richtext-items-center richtext-gap-2 richtext-rounded-lg !richtext-border richtext-border-neutral-200 richtext-bg-white richtext-p-2 richtext-shadow-sm dark:richtext-border-neutral-800 dark:richtext-bg-black", children: /* @__PURE__ */ f("div", { className: "richtext-flex richtext-flex-nowrap", children: [
|
|
6025
6038
|
/* @__PURE__ */ i(
|
|
6026
6039
|
O,
|
|
6027
6040
|
{
|
|
@@ -6046,19 +6059,19 @@ function xs({ editor: t, disabled: e }) {
|
|
|
6046
6059
|
}
|
|
6047
6060
|
) });
|
|
6048
6061
|
}
|
|
6049
|
-
function
|
|
6062
|
+
function gs({ editor: t, disabled: e, bubbleMenu: r }) {
|
|
6050
6063
|
const n = t.extensionManager.extensions.map((o) => o.name), a = () => {
|
|
6051
|
-
var o, c, l, s, h, d, u, m, x, w, p,
|
|
6064
|
+
var o, c, l, s, h, d, u, m, x, w, p, g, I, T, v;
|
|
6052
6065
|
return [
|
|
6053
6066
|
n.includes("columns") && !((o = r == null ? void 0 : r.columnConfig) != null && o.hidden) ? /* @__PURE__ */ i(
|
|
6054
|
-
|
|
6067
|
+
Ks,
|
|
6055
6068
|
{
|
|
6056
6069
|
editor: t
|
|
6057
6070
|
},
|
|
6058
6071
|
"columns"
|
|
6059
6072
|
) : null,
|
|
6060
6073
|
n.includes("table") && !((c = r == null ? void 0 : r.tableConfig) != null && c.hidden) ? /* @__PURE__ */ i(
|
|
6061
|
-
|
|
6074
|
+
Vs,
|
|
6062
6075
|
{
|
|
6063
6076
|
editor: t,
|
|
6064
6077
|
actions: (l = r == null ? void 0 : r.tableConfig) == null ? void 0 : l.actions
|
|
@@ -6066,7 +6079,7 @@ function fs({ editor: t, disabled: e, bubbleMenu: r }) {
|
|
|
6066
6079
|
"table"
|
|
6067
6080
|
) : null,
|
|
6068
6081
|
n.includes("link") && !((s = r == null ? void 0 : r.linkConfig) != null && s.hidden) ? /* @__PURE__ */ i(
|
|
6069
|
-
|
|
6082
|
+
Fs,
|
|
6070
6083
|
{
|
|
6071
6084
|
disabled: e,
|
|
6072
6085
|
editor: t
|
|
@@ -6074,15 +6087,15 @@ function fs({ editor: t, disabled: e, bubbleMenu: r }) {
|
|
|
6074
6087
|
"link"
|
|
6075
6088
|
) : null,
|
|
6076
6089
|
n.includes(Vt.name) && !((h = r == null ? void 0 : r.imageConfig) != null && h.hidden) ? /* @__PURE__ */ i(
|
|
6077
|
-
|
|
6090
|
+
js,
|
|
6078
6091
|
{
|
|
6079
6092
|
disabled: e,
|
|
6080
6093
|
editor: t
|
|
6081
6094
|
},
|
|
6082
6095
|
"image"
|
|
6083
6096
|
) : null,
|
|
6084
|
-
n.includes(
|
|
6085
|
-
|
|
6097
|
+
n.includes(ti.name) && !((d = r == null ? void 0 : r.imageGifConfig) != null && d.hidden) ? /* @__PURE__ */ i(
|
|
6098
|
+
Xs,
|
|
6086
6099
|
{
|
|
6087
6100
|
disabled: e,
|
|
6088
6101
|
editor: t
|
|
@@ -6090,7 +6103,7 @@ function fs({ editor: t, disabled: e, bubbleMenu: r }) {
|
|
|
6090
6103
|
"imageGif"
|
|
6091
6104
|
) : null,
|
|
6092
6105
|
n.includes("video") && !((u = r == null ? void 0 : r.videoConfig) != null && u.hidden) ? /* @__PURE__ */ i(
|
|
6093
|
-
|
|
6106
|
+
Ys,
|
|
6094
6107
|
{
|
|
6095
6108
|
disabled: e,
|
|
6096
6109
|
editor: t
|
|
@@ -6098,7 +6111,7 @@ function fs({ editor: t, disabled: e, bubbleMenu: r }) {
|
|
|
6098
6111
|
"video"
|
|
6099
6112
|
) : null,
|
|
6100
6113
|
n.includes("katex") && !((m = r == null ? void 0 : r.katexConfig) != null && m.hidden) ? /* @__PURE__ */ i(
|
|
6101
|
-
|
|
6114
|
+
ls,
|
|
6102
6115
|
{
|
|
6103
6116
|
disabled: e,
|
|
6104
6117
|
editor: t
|
|
@@ -6106,7 +6119,7 @@ function fs({ editor: t, disabled: e, bubbleMenu: r }) {
|
|
|
6106
6119
|
"katex"
|
|
6107
6120
|
) : null,
|
|
6108
6121
|
n.includes("excalidraw") && !((x = r == null ? void 0 : r.excalidrawConfig) != null && x.hidden) ? /* @__PURE__ */ i(
|
|
6109
|
-
|
|
6122
|
+
cs,
|
|
6110
6123
|
{
|
|
6111
6124
|
disabled: e,
|
|
6112
6125
|
editor: t
|
|
@@ -6114,7 +6127,7 @@ function fs({ editor: t, disabled: e, bubbleMenu: r }) {
|
|
|
6114
6127
|
"excalidraw"
|
|
6115
6128
|
) : null,
|
|
6116
6129
|
n.includes("mermaid") && !((w = r == null ? void 0 : r.mermaidConfig) != null && w.hidden) ? /* @__PURE__ */ i(
|
|
6117
|
-
|
|
6130
|
+
xs,
|
|
6118
6131
|
{
|
|
6119
6132
|
disabled: e,
|
|
6120
6133
|
editor: t
|
|
@@ -6122,15 +6135,15 @@ function fs({ editor: t, disabled: e, bubbleMenu: r }) {
|
|
|
6122
6135
|
"mermaid"
|
|
6123
6136
|
) : null,
|
|
6124
6137
|
n.includes("iframe") && !((p = r == null ? void 0 : r.iframeConfig) != null && p.hidden) ? /* @__PURE__ */ i(
|
|
6125
|
-
|
|
6138
|
+
ss,
|
|
6126
6139
|
{
|
|
6127
6140
|
disabled: e,
|
|
6128
6141
|
editor: t
|
|
6129
6142
|
},
|
|
6130
6143
|
"iframe"
|
|
6131
6144
|
) : null,
|
|
6132
|
-
n.includes("twitter") && !((
|
|
6133
|
-
|
|
6145
|
+
n.includes("twitter") && !((g = r == null ? void 0 : r.twitterConfig) != null && g.hidden) ? /* @__PURE__ */ i(
|
|
6146
|
+
fs,
|
|
6134
6147
|
{
|
|
6135
6148
|
disabled: e,
|
|
6136
6149
|
editor: t
|
|
@@ -6138,7 +6151,7 @@ function fs({ editor: t, disabled: e, bubbleMenu: r }) {
|
|
|
6138
6151
|
"twitter"
|
|
6139
6152
|
) : null,
|
|
6140
6153
|
(I = r == null ? void 0 : r.floatingMenuConfig) != null && I.hidden ? null : /* @__PURE__ */ i(
|
|
6141
|
-
|
|
6154
|
+
Ds,
|
|
6142
6155
|
{
|
|
6143
6156
|
disabled: e,
|
|
6144
6157
|
editor: t
|
|
@@ -6146,7 +6159,7 @@ function fs({ editor: t, disabled: e, bubbleMenu: r }) {
|
|
|
6146
6159
|
"content"
|
|
6147
6160
|
),
|
|
6148
6161
|
(T = r == null ? void 0 : r.textConfig) != null && T.hidden ? null : /* @__PURE__ */ i(
|
|
6149
|
-
|
|
6162
|
+
$s,
|
|
6150
6163
|
{
|
|
6151
6164
|
disabled: e,
|
|
6152
6165
|
editor: t
|
|
@@ -6154,7 +6167,7 @@ function fs({ editor: t, disabled: e, bubbleMenu: r }) {
|
|
|
6154
6167
|
"text"
|
|
6155
6168
|
),
|
|
6156
6169
|
n.includes("drawer") && !((v = r == null ? void 0 : r.drawerConfig) != null && v.hidden) ? /* @__PURE__ */ i(
|
|
6157
|
-
|
|
6170
|
+
ns,
|
|
6158
6171
|
{
|
|
6159
6172
|
disabled: e,
|
|
6160
6173
|
editor: t
|
|
@@ -6168,14 +6181,14 @@ function fs({ editor: t, disabled: e, bubbleMenu: r }) {
|
|
|
6168
6181
|
function mr() {
|
|
6169
6182
|
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
6183
|
}
|
|
6171
|
-
function
|
|
6184
|
+
function ps(t) {
|
|
6172
6185
|
const { t: e } = q(), {
|
|
6173
6186
|
highlight: r = !1,
|
|
6174
6187
|
disabled: n = !1,
|
|
6175
6188
|
selectedColor: a,
|
|
6176
6189
|
setSelectedColor: o,
|
|
6177
6190
|
onChange: c,
|
|
6178
|
-
colors: l =
|
|
6191
|
+
colors: l = Mi
|
|
6179
6192
|
} = t, s = U(() => {
|
|
6180
6193
|
const x = l, w = [];
|
|
6181
6194
|
for (let p = 0; p < x.length; p += 10)
|
|
@@ -6192,7 +6205,7 @@ function gs(t) {
|
|
|
6192
6205
|
}
|
|
6193
6206
|
/^#([\da-f]{3}){1,2}$/i.test(x) && (o == null || o(x), c == null || c(x), u(x));
|
|
6194
6207
|
}
|
|
6195
|
-
return /* @__PURE__ */
|
|
6208
|
+
return /* @__PURE__ */ f(It, { modal: !0, children: [
|
|
6196
6209
|
/* @__PURE__ */ i(
|
|
6197
6210
|
Et,
|
|
6198
6211
|
{
|
|
@@ -6209,8 +6222,8 @@ function gs(t) {
|
|
|
6209
6222
|
className: "richtext-size-full richtext-p-2",
|
|
6210
6223
|
hideWhenDetached: !0,
|
|
6211
6224
|
side: "bottom",
|
|
6212
|
-
children: /* @__PURE__ */
|
|
6213
|
-
r ? /* @__PURE__ */
|
|
6225
|
+
children: /* @__PURE__ */ f("div", { className: "richtext-flex richtext-flex-col", children: [
|
|
6226
|
+
r ? /* @__PURE__ */ f(
|
|
6214
6227
|
"div",
|
|
6215
6228
|
{
|
|
6216
6229
|
className: "rd-1 richtext-flex richtext-cursor-pointer richtext-items-center richtext-gap-[4px] richtext-p-1 hover:richtext-bg-accent",
|
|
@@ -6220,7 +6233,7 @@ function gs(t) {
|
|
|
6220
6233
|
/* @__PURE__ */ i("span", { className: "richtext-ml-1 richtext-text-sm", children: e("editor.nofill") })
|
|
6221
6234
|
]
|
|
6222
6235
|
}
|
|
6223
|
-
) : /* @__PURE__ */
|
|
6236
|
+
) : /* @__PURE__ */ f(
|
|
6224
6237
|
"div",
|
|
6225
6238
|
{
|
|
6226
6239
|
className: "rd-1 richtext-flex richtext-cursor-pointer richtext-items-center richtext-gap-[4px] richtext-p-1 hover:richtext-bg-accent",
|
|
@@ -6237,7 +6250,7 @@ function gs(t) {
|
|
|
6237
6250
|
"span",
|
|
6238
6251
|
{
|
|
6239
6252
|
className: "richtext-relative richtext-flex richtext-h-auto richtext-w-full richtext-p-0 last:richtext-pb-2",
|
|
6240
|
-
children: x.map((p,
|
|
6253
|
+
children: x.map((p, g) => /* @__PURE__ */ i(
|
|
6241
6254
|
"span",
|
|
6242
6255
|
{
|
|
6243
6256
|
className: "richtext-inline-block richtext-size-6 richtext-flex-[0_0_auto] richtext-cursor-pointer richtext-rounded-sm !richtext-border richtext-border-transparent richtext-p-0.5 hover:richtext-border-border hover:richtext-shadow-sm",
|
|
@@ -6273,12 +6286,12 @@ function gs(t) {
|
|
|
6273
6286
|
}
|
|
6274
6287
|
)
|
|
6275
6288
|
},
|
|
6276
|
-
`sub-color-${
|
|
6289
|
+
`sub-color-${g}`
|
|
6277
6290
|
))
|
|
6278
6291
|
},
|
|
6279
6292
|
w
|
|
6280
6293
|
)),
|
|
6281
|
-
/* @__PURE__ */
|
|
6294
|
+
/* @__PURE__ */ f("div", { children: [
|
|
6282
6295
|
/* @__PURE__ */ i("div", { className: "richtext-my-1 richtext-text-sm", children: e("editor.recent") }),
|
|
6283
6296
|
/* @__PURE__ */ i("span", { className: "richtext-relative richtext-flex richtext-h-auto richtext-w-full richtext-p-0 last:richtext-pb-2", children: h == null ? void 0 : h.map((x, w) => /* @__PURE__ */ i(
|
|
6284
6297
|
"span",
|
|
@@ -6309,18 +6322,18 @@ function gs(t) {
|
|
|
6309
6322
|
`sub-color-recent-${w}`
|
|
6310
6323
|
)) })
|
|
6311
6324
|
] }),
|
|
6312
|
-
/* @__PURE__ */ i(
|
|
6325
|
+
/* @__PURE__ */ i(ws, { setColor: m })
|
|
6313
6326
|
] })
|
|
6314
6327
|
}
|
|
6315
6328
|
)
|
|
6316
6329
|
] });
|
|
6317
6330
|
}
|
|
6318
|
-
function
|
|
6331
|
+
function ws({ setColor: t }) {
|
|
6319
6332
|
const [e, r] = S("#000000"), [n, a] = S(!1), { t: o } = q();
|
|
6320
6333
|
return B(() => () => {
|
|
6321
6334
|
a(!1);
|
|
6322
|
-
}, []), /* @__PURE__ */
|
|
6323
|
-
/* @__PURE__ */ i(Et, { asChild: !0, children: /* @__PURE__ */
|
|
6335
|
+
}, []), /* @__PURE__ */ f(It, { open: n, children: [
|
|
6336
|
+
/* @__PURE__ */ i(Et, { asChild: !0, children: /* @__PURE__ */ f(
|
|
6324
6337
|
"div",
|
|
6325
6338
|
{
|
|
6326
6339
|
className: "richtext-p-1.5 richtext-text-sm hover:richtext-cursor-pointer hover:richtext-bg-accent",
|
|
@@ -6333,8 +6346,8 @@ function ps({ setColor: t }) {
|
|
|
6333
6346
|
]
|
|
6334
6347
|
}
|
|
6335
6348
|
) }),
|
|
6336
|
-
/* @__PURE__ */
|
|
6337
|
-
/* @__PURE__ */
|
|
6349
|
+
/* @__PURE__ */ f(Tt, { children: [
|
|
6350
|
+
/* @__PURE__ */ f("div", { className: "richtext-flex richtext-flex-col richtext-items-center richtext-justify-center", children: [
|
|
6338
6351
|
/* @__PURE__ */ i(
|
|
6339
6352
|
uo,
|
|
6340
6353
|
{
|
|
@@ -6343,7 +6356,7 @@ function ps({ setColor: t }) {
|
|
|
6343
6356
|
}
|
|
6344
6357
|
),
|
|
6345
6358
|
/* @__PURE__ */ i(
|
|
6346
|
-
|
|
6359
|
+
tt,
|
|
6347
6360
|
{
|
|
6348
6361
|
className: "richtext-mt-[8px] richtext-w-full",
|
|
6349
6362
|
type: "text",
|
|
@@ -6354,7 +6367,7 @@ function ps({ setColor: t }) {
|
|
|
6354
6367
|
}
|
|
6355
6368
|
)
|
|
6356
6369
|
] }),
|
|
6357
|
-
/* @__PURE__ */ i(
|
|
6370
|
+
/* @__PURE__ */ i(Q, { className: "richtext-my-[10px]" }),
|
|
6358
6371
|
/* @__PURE__ */ i(
|
|
6359
6372
|
G,
|
|
6360
6373
|
{
|
|
@@ -6368,7 +6381,7 @@ function ps({ setColor: t }) {
|
|
|
6368
6381
|
] })
|
|
6369
6382
|
] });
|
|
6370
6383
|
}
|
|
6371
|
-
function
|
|
6384
|
+
function vs({ editor: t, disabled: e, toolbar: r }) {
|
|
6372
6385
|
const { t: n, lang: a } = q(), o = U(() => {
|
|
6373
6386
|
const h = [...t.extensionManager.extensions].sort((u, m) => {
|
|
6374
6387
|
const x = u.options.sort ?? -1, w = m.options.sort ?? -1;
|
|
@@ -6384,15 +6397,15 @@ function ws({ editor: t, disabled: e, toolbar: r }) {
|
|
|
6384
6397
|
} = u.options;
|
|
6385
6398
|
if (!m || !Co(m) || !p)
|
|
6386
6399
|
continue;
|
|
6387
|
-
const
|
|
6400
|
+
const g = m({
|
|
6388
6401
|
editor: t,
|
|
6389
6402
|
extension: u,
|
|
6390
6403
|
t: n
|
|
6391
6404
|
});
|
|
6392
|
-
if (Array.isArray(
|
|
6393
|
-
const I =
|
|
6405
|
+
if (Array.isArray(g)) {
|
|
6406
|
+
const I = g.map((T, v) => ({
|
|
6394
6407
|
button: T,
|
|
6395
|
-
divider: v ===
|
|
6408
|
+
divider: v === g.length - 1 ? x : !1,
|
|
6396
6409
|
spacer: v === 0 ? w : !1,
|
|
6397
6410
|
type: u.type,
|
|
6398
6411
|
name: u.name
|
|
@@ -6401,7 +6414,7 @@ function ws({ editor: t, disabled: e, toolbar: r }) {
|
|
|
6401
6414
|
continue;
|
|
6402
6415
|
}
|
|
6403
6416
|
d.push({
|
|
6404
|
-
button:
|
|
6417
|
+
button: g,
|
|
6405
6418
|
divider: x,
|
|
6406
6419
|
spacer: w,
|
|
6407
6420
|
type: u.type,
|
|
@@ -6422,8 +6435,8 @@ function ws({ editor: t, disabled: e, toolbar: r }) {
|
|
|
6422
6435
|
), l = o.map((s, h) => {
|
|
6423
6436
|
var u, m;
|
|
6424
6437
|
const d = s.button.component;
|
|
6425
|
-
return /* @__PURE__ */
|
|
6426
|
-
(s == null ? void 0 : s.spacer) && /* @__PURE__ */ i(
|
|
6438
|
+
return /* @__PURE__ */ f("div", { className: "richtext-flex richtext-items-center", children: [
|
|
6439
|
+
(s == null ? void 0 : s.spacer) && /* @__PURE__ */ i(Q, { orientation: "vertical", className: "!richtext-h-[16px] !richtext-mx-[10px]" }),
|
|
6427
6440
|
/* @__PURE__ */ i(
|
|
6428
6441
|
d,
|
|
6429
6442
|
{
|
|
@@ -6431,12 +6444,12 @@ function ws({ editor: t, disabled: e, toolbar: r }) {
|
|
|
6431
6444
|
disabled: e || ((m = (u = s == null ? void 0 : s.button) == null ? void 0 : u.componentProps) == null ? void 0 : m.disabled)
|
|
6432
6445
|
}
|
|
6433
6446
|
),
|
|
6434
|
-
(s == null ? void 0 : s.divider) && /* @__PURE__ */ i(
|
|
6447
|
+
(s == null ? void 0 : s.divider) && /* @__PURE__ */ i(Q, { orientation: "vertical", className: "!richtext-h-auto !richtext-mx-2" })
|
|
6435
6448
|
] }, `toolbar-item-${h}`);
|
|
6436
6449
|
});
|
|
6437
6450
|
return r && (r != null && r.render) ? r.render({ editor: t, disabled: e || !1 }, o, l, c) : c(l);
|
|
6438
6451
|
}
|
|
6439
|
-
function
|
|
6452
|
+
function bs(t) {
|
|
6440
6453
|
const e = ["size-small", "size-medium", "size-large"], r = [
|
|
6441
6454
|
"SizeS",
|
|
6442
6455
|
"SizeM",
|
|
@@ -6453,7 +6466,7 @@ function vs(t) {
|
|
|
6453
6466
|
}
|
|
6454
6467
|
}));
|
|
6455
6468
|
}
|
|
6456
|
-
function
|
|
6469
|
+
function ys(t) {
|
|
6457
6470
|
const e = ["size-small", "size-medium", "size-large"], r = [
|
|
6458
6471
|
"SizeS",
|
|
6459
6472
|
"SizeM",
|
|
@@ -6470,7 +6483,7 @@ function bs(t) {
|
|
|
6470
6483
|
}
|
|
6471
6484
|
}));
|
|
6472
6485
|
}
|
|
6473
|
-
function
|
|
6486
|
+
function Cs(t) {
|
|
6474
6487
|
const e = ["left", "center", "right"], r = {
|
|
6475
6488
|
left: "AlignLeft",
|
|
6476
6489
|
center: "AlignCenter",
|
|
@@ -6491,7 +6504,7 @@ function ys(t) {
|
|
|
6491
6504
|
}
|
|
6492
6505
|
}));
|
|
6493
6506
|
}
|
|
6494
|
-
function
|
|
6507
|
+
function Ts(t) {
|
|
6495
6508
|
const e = ["left", "center", "right"], r = {
|
|
6496
6509
|
left: "AlignLeft",
|
|
6497
6510
|
center: "AlignCenter",
|
|
@@ -6512,7 +6525,7 @@ function Cs(t) {
|
|
|
6512
6525
|
}
|
|
6513
6526
|
}));
|
|
6514
6527
|
}
|
|
6515
|
-
function
|
|
6528
|
+
function Ns(t) {
|
|
6516
6529
|
const e = ["left", "center", "right"], r = {
|
|
6517
6530
|
left: "AlignLeft",
|
|
6518
6531
|
center: "AlignCenter",
|
|
@@ -6533,7 +6546,7 @@ function Ts(t) {
|
|
|
6533
6546
|
}
|
|
6534
6547
|
}));
|
|
6535
6548
|
}
|
|
6536
|
-
function
|
|
6549
|
+
function ks(t) {
|
|
6537
6550
|
const e = ["left", "center", "right"], r = {
|
|
6538
6551
|
left: "AlignLeft",
|
|
6539
6552
|
center: "AlignCenter",
|
|
@@ -6554,7 +6567,7 @@ function Ns(t) {
|
|
|
6554
6567
|
}
|
|
6555
6568
|
}));
|
|
6556
6569
|
}
|
|
6557
|
-
function
|
|
6570
|
+
function Ss(t) {
|
|
6558
6571
|
const e = ["size-small", "size-medium", "size-large"], r = [
|
|
6559
6572
|
"SizeS",
|
|
6560
6573
|
"SizeM",
|
|
@@ -6571,7 +6584,7 @@ function ks(t) {
|
|
|
6571
6584
|
}
|
|
6572
6585
|
}));
|
|
6573
6586
|
}
|
|
6574
|
-
function
|
|
6587
|
+
function Ms(t) {
|
|
6575
6588
|
return [
|
|
6576
6589
|
{
|
|
6577
6590
|
type: "flipX",
|
|
@@ -6603,8 +6616,8 @@ function Ss(t) {
|
|
|
6603
6616
|
}
|
|
6604
6617
|
}
|
|
6605
6618
|
},
|
|
6606
|
-
...
|
|
6607
|
-
...
|
|
6619
|
+
...bs(t),
|
|
6620
|
+
...Cs(t),
|
|
6608
6621
|
{
|
|
6609
6622
|
type: "remove",
|
|
6610
6623
|
component: O,
|
|
@@ -6620,10 +6633,10 @@ function Ss(t) {
|
|
|
6620
6633
|
}
|
|
6621
6634
|
];
|
|
6622
6635
|
}
|
|
6623
|
-
function
|
|
6636
|
+
function As(t) {
|
|
6624
6637
|
return [
|
|
6625
|
-
...
|
|
6626
|
-
...
|
|
6638
|
+
...ys(t),
|
|
6639
|
+
...Ts(t),
|
|
6627
6640
|
{
|
|
6628
6641
|
type: "remove",
|
|
6629
6642
|
component: O,
|
|
@@ -6639,9 +6652,9 @@ function Ms(t) {
|
|
|
6639
6652
|
}
|
|
6640
6653
|
];
|
|
6641
6654
|
}
|
|
6642
|
-
function
|
|
6655
|
+
function Ls(t) {
|
|
6643
6656
|
return [
|
|
6644
|
-
...
|
|
6657
|
+
...Ns(t),
|
|
6645
6658
|
{
|
|
6646
6659
|
type: "edit",
|
|
6647
6660
|
component: O,
|
|
@@ -6667,9 +6680,9 @@ function As(t) {
|
|
|
6667
6680
|
}
|
|
6668
6681
|
];
|
|
6669
6682
|
}
|
|
6670
|
-
function
|
|
6683
|
+
function Is(t) {
|
|
6671
6684
|
return [
|
|
6672
|
-
...
|
|
6685
|
+
...ks(t),
|
|
6673
6686
|
{
|
|
6674
6687
|
type: "edit",
|
|
6675
6688
|
component: O,
|
|
@@ -6695,9 +6708,9 @@ function Ls(t) {
|
|
|
6695
6708
|
}
|
|
6696
6709
|
];
|
|
6697
6710
|
}
|
|
6698
|
-
function
|
|
6711
|
+
function Es(t) {
|
|
6699
6712
|
return [
|
|
6700
|
-
...
|
|
6713
|
+
...Ss(t),
|
|
6701
6714
|
{
|
|
6702
6715
|
type: "remove",
|
|
6703
6716
|
component: O,
|
|
@@ -6713,8 +6726,8 @@ function Is(t) {
|
|
|
6713
6726
|
}
|
|
6714
6727
|
];
|
|
6715
6728
|
}
|
|
6716
|
-
function
|
|
6717
|
-
return
|
|
6729
|
+
function zs(t, e) {
|
|
6730
|
+
return Ai.reduce((r, n) => {
|
|
6718
6731
|
if (n === "divider" && r.length > 0)
|
|
6719
6732
|
return [...r, {
|
|
6720
6733
|
type: "divider",
|
|
@@ -6808,7 +6821,7 @@ class at extends Vi {
|
|
|
6808
6821
|
return new Ge(this.anchor, this.head);
|
|
6809
6822
|
}
|
|
6810
6823
|
}
|
|
6811
|
-
function
|
|
6824
|
+
function Ps(t) {
|
|
6812
6825
|
const e = t.cloneNode(!0), r = [t, ...Array.from(t.getElementsByTagName("*"))], n = [e, ...Array.from(e.getElementsByTagName("*"))];
|
|
6813
6826
|
return r.forEach((a, o) => {
|
|
6814
6827
|
n[o].style.cssText = function(c) {
|
|
@@ -6823,13 +6836,13 @@ function zs(t) {
|
|
|
6823
6836
|
function Qt(t, e) {
|
|
6824
6837
|
return window.getComputedStyle(t)[e];
|
|
6825
6838
|
}
|
|
6826
|
-
function
|
|
6839
|
+
function Rs(t = 0, e = 0, r = 0) {
|
|
6827
6840
|
return Math.min(Math.max(t, e), r);
|
|
6828
6841
|
}
|
|
6829
6842
|
function xr(t) {
|
|
6830
6843
|
t.parentNode !== null && t.parentNode !== void 0 && t.parentNode.removeChild(t);
|
|
6831
6844
|
}
|
|
6832
|
-
function
|
|
6845
|
+
function oi(t) {
|
|
6833
6846
|
const { x: e, y: r, direction: n, editor: a } = t;
|
|
6834
6847
|
let o = null, c = null, l = null, s = e;
|
|
6835
6848
|
for (; c === null && s < window.innerWidth && s > 0; ) {
|
|
@@ -6849,16 +6862,16 @@ function ai(t) {
|
|
|
6849
6862
|
pos: l !== null ? l : null
|
|
6850
6863
|
};
|
|
6851
6864
|
}
|
|
6852
|
-
function
|
|
6853
|
-
const { doc: r } = e.view.state, n =
|
|
6865
|
+
function Os(t, e) {
|
|
6866
|
+
const { doc: r } = e.view.state, n = oi({ editor: e, x: t.clientX, y: t.clientY, direction: "right" });
|
|
6854
6867
|
if (!n.resultNode || n.pos === null) return [];
|
|
6855
6868
|
const a = t.clientX, o = function(d, u, m) {
|
|
6856
|
-
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),
|
|
6869
|
+
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), g = Number.parseInt(Qt(d.dom, "borderLeftWidth"), 10), I = d.dom.getBoundingClientRect();
|
|
6857
6870
|
return {
|
|
6858
|
-
left:
|
|
6871
|
+
left: Rs(
|
|
6859
6872
|
u,
|
|
6860
6873
|
I.left + x + p,
|
|
6861
|
-
I.right - w -
|
|
6874
|
+
I.right - w - g
|
|
6862
6875
|
),
|
|
6863
6876
|
top: m
|
|
6864
6877
|
};
|
|
@@ -6887,9 +6900,9 @@ function pr(t, e) {
|
|
|
6887
6900
|
for (; r && r.parentNode && r.parentNode !== t.dom; ) r = r.parentNode;
|
|
6888
6901
|
return r;
|
|
6889
6902
|
}
|
|
6890
|
-
const
|
|
6891
|
-
function
|
|
6892
|
-
pluginKey: t =
|
|
6903
|
+
const ai = new He("dragHandle");
|
|
6904
|
+
function Hs({
|
|
6905
|
+
pluginKey: t = ai,
|
|
6893
6906
|
element: e,
|
|
6894
6907
|
editor: r,
|
|
6895
6908
|
tippyOptions: n,
|
|
@@ -6900,11 +6913,11 @@ function Os({
|
|
|
6900
6913
|
return e.addEventListener("dragstart", (d) => {
|
|
6901
6914
|
const { view: u } = r;
|
|
6902
6915
|
if (!d.dataTransfer) return;
|
|
6903
|
-
const { empty: m, $from: x, $to: w } = u.state.selection, p =
|
|
6916
|
+
const { empty: m, $from: x, $to: w } = u.state.selection, p = Os(d, r), g = Ue(x, w, 0), I = g.some((E) => p.find((b) => b.$from === E.$from && b.$to === E.$to)), T = m || !I ? p : g;
|
|
6904
6917
|
if (T.length === 0) return;
|
|
6905
6918
|
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
6919
|
T.forEach((E) => {
|
|
6907
|
-
const b =
|
|
6920
|
+
const b = Ps(u.nodeDOM(E.$from.pos));
|
|
6908
6921
|
y.append(b);
|
|
6909
6922
|
}), 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
6923
|
e && (e.style.pointerEvents = "none");
|
|
@@ -6934,7 +6947,7 @@ function Os({
|
|
|
6934
6947
|
update(y, C) {
|
|
6935
6948
|
if (!w(e, c) || (e.draggable = !l, !p(y, C)))
|
|
6936
6949
|
return;
|
|
6937
|
-
const M =
|
|
6950
|
+
const M = g(y);
|
|
6938
6951
|
M && I(y, M);
|
|
6939
6952
|
},
|
|
6940
6953
|
destroy() {
|
|
@@ -6984,7 +6997,7 @@ function Os({
|
|
|
6984
6997
|
function p(y, C) {
|
|
6985
6998
|
return !y.state.doc.eq(C.doc) && h !== -1;
|
|
6986
6999
|
}
|
|
6987
|
-
function
|
|
7000
|
+
function g(y) {
|
|
6988
7001
|
let C = y.nodeDOM(h);
|
|
6989
7002
|
return C = pr(y, C), C === y.dom || (C == null ? void 0 : C.nodeType) !== 1 ? null : C;
|
|
6990
7003
|
}
|
|
@@ -7030,7 +7043,7 @@ function Os({
|
|
|
7030
7043
|
mousemove: Oe((d, u) => {
|
|
7031
7044
|
if (!e || !c || l)
|
|
7032
7045
|
return !1;
|
|
7033
|
-
const m =
|
|
7046
|
+
const m = oi({
|
|
7034
7047
|
x: u.clientX,
|
|
7035
7048
|
y: u.clientY,
|
|
7036
7049
|
direction: "right",
|
|
@@ -7044,8 +7057,8 @@ function Os({
|
|
|
7044
7057
|
const w = d.posAtDOM(x, 0), p = gr(r.state.doc, w);
|
|
7045
7058
|
if (p === s)
|
|
7046
7059
|
return !1;
|
|
7047
|
-
const
|
|
7048
|
-
return s = p, h =
|
|
7060
|
+
const g = fr(r.state.doc, w);
|
|
7061
|
+
return s = p, h = g, a == null || a({
|
|
7049
7062
|
editor: r,
|
|
7050
7063
|
node: s,
|
|
7051
7064
|
pos: h
|
|
@@ -7057,11 +7070,11 @@ function Os({
|
|
|
7057
7070
|
}
|
|
7058
7071
|
});
|
|
7059
7072
|
}
|
|
7060
|
-
function
|
|
7073
|
+
function Ds(t) {
|
|
7061
7074
|
var N, E, b;
|
|
7062
|
-
const { pluginKey: e =
|
|
7075
|
+
const { pluginKey: e = ai } = 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
7076
|
B(() => {
|
|
7064
|
-
l.current && !t.editor.isDestroyed && (s.current =
|
|
7077
|
+
l.current && !t.editor.isDestroyed && (s.current = Hs({
|
|
7065
7078
|
editor: t.editor,
|
|
7066
7079
|
element: l.current,
|
|
7067
7080
|
pluginKey: "ContentItemMenu",
|
|
@@ -7080,7 +7093,7 @@ function Hs(t) {
|
|
|
7080
7093
|
function p() {
|
|
7081
7094
|
t.editor.chain().focus().setNodeSelection(o).run(), document.execCommand("copy");
|
|
7082
7095
|
}
|
|
7083
|
-
function
|
|
7096
|
+
function g() {
|
|
7084
7097
|
t.editor.commands.setNodeSelection(o);
|
|
7085
7098
|
const { $anchor: k } = t.editor.state.selection, _ = k.node(1) || t.editor.state.selection.node;
|
|
7086
7099
|
t.editor.chain().setMeta("hideDragHandle", !0).insertContentAt(o + ((n == null ? void 0 : n.nodeSize) || 0), _.toJSON()).run();
|
|
@@ -7106,9 +7119,9 @@ function Hs(t) {
|
|
|
7106
7119
|
var k;
|
|
7107
7120
|
if (o !== -1) {
|
|
7108
7121
|
const _ = (n == null ? void 0 : n.nodeSize) || 0, D = o + _, R = (n == null ? void 0 : n.type.name) === "paragraph" && ((k = n == null ? void 0 : n.content) == null ? void 0 : k.size) === 0, A = R ? o + 2 : D + 2;
|
|
7109
|
-
t.editor.chain().command(({ dispatch: $, tr: F, state:
|
|
7122
|
+
t.editor.chain().command(({ dispatch: $, tr: F, state: K }) => $ ? (R ? F.insertText("/", o, o + 1) : F.insert(
|
|
7110
7123
|
D,
|
|
7111
|
-
|
|
7124
|
+
K.schema.nodes.paragraph.create(null, [K.schema.text("/")])
|
|
7112
7125
|
), $(F)) : !0).focus(A).run();
|
|
7113
7126
|
}
|
|
7114
7127
|
}
|
|
@@ -7131,7 +7144,7 @@ function Hs(t) {
|
|
|
7131
7144
|
style: {
|
|
7132
7145
|
opacity: t != null && t.disabled ? 0 : 1
|
|
7133
7146
|
},
|
|
7134
|
-
children: /* @__PURE__ */
|
|
7147
|
+
children: /* @__PURE__ */ f("div", { className: "richtext-flex richtext-items-center richtext-gap-0.5 richtext-duration-200 richtext-ease-in-out [transition-property:top,_left]", children: [
|
|
7135
7148
|
/* @__PURE__ */ i(
|
|
7136
7149
|
G,
|
|
7137
7150
|
{
|
|
@@ -7142,7 +7155,7 @@ function Hs(t) {
|
|
|
7142
7155
|
type: "button",
|
|
7143
7156
|
variant: "ghost",
|
|
7144
7157
|
children: /* @__PURE__ */ i(
|
|
7145
|
-
|
|
7158
|
+
Y,
|
|
7146
7159
|
{
|
|
7147
7160
|
className: "richtext-text-lg richtext-text-neutral-600 dark:richtext-text-neutral-200",
|
|
7148
7161
|
name: "Plus"
|
|
@@ -7150,14 +7163,14 @@ function Hs(t) {
|
|
|
7150
7163
|
)
|
|
7151
7164
|
}
|
|
7152
7165
|
),
|
|
7153
|
-
/* @__PURE__ */
|
|
7166
|
+
/* @__PURE__ */ f(
|
|
7154
7167
|
So,
|
|
7155
7168
|
{
|
|
7156
7169
|
onOpenChange: L,
|
|
7157
7170
|
open: h,
|
|
7158
7171
|
children: [
|
|
7159
|
-
/* @__PURE__ */
|
|
7160
|
-
/* @__PURE__ */
|
|
7172
|
+
/* @__PURE__ */ f("div", { className: "richtext-relative richtext-flex richtext-flex-col", children: [
|
|
7173
|
+
/* @__PURE__ */ f(jr, { children: [
|
|
7161
7174
|
/* @__PURE__ */ i(
|
|
7162
7175
|
Xr,
|
|
7163
7176
|
{
|
|
@@ -7175,7 +7188,7 @@ function Hs(t) {
|
|
|
7175
7188
|
k.preventDefault(), !(t != null && t.disabled) && d(!0);
|
|
7176
7189
|
},
|
|
7177
7190
|
children: /* @__PURE__ */ i(
|
|
7178
|
-
|
|
7191
|
+
Y,
|
|
7179
7192
|
{
|
|
7180
7193
|
className: "richtext-text-sm richtext-text-neutral-600 dark:richtext-text-neutral-200",
|
|
7181
7194
|
name: "Grip"
|
|
@@ -7189,7 +7202,7 @@ function Hs(t) {
|
|
|
7189
7202
|
] }),
|
|
7190
7203
|
/* @__PURE__ */ i(Mo, { className: "richtext-absolute richtext-left-0 richtext-top-0 richtext-z-0 richtext-size-[28px]" })
|
|
7191
7204
|
] }),
|
|
7192
|
-
/* @__PURE__ */
|
|
7205
|
+
/* @__PURE__ */ f(
|
|
7193
7206
|
Dr,
|
|
7194
7207
|
{
|
|
7195
7208
|
align: "start",
|
|
@@ -7197,118 +7210,118 @@ function Hs(t) {
|
|
|
7197
7210
|
side: "bottom",
|
|
7198
7211
|
sideOffset: 0,
|
|
7199
7212
|
children: [
|
|
7200
|
-
/* @__PURE__ */
|
|
7213
|
+
/* @__PURE__ */ f(
|
|
7201
7214
|
ot,
|
|
7202
7215
|
{
|
|
7203
7216
|
className: "richtext-flex richtext-gap-3 richtext-bg-opacity-10 hover:richtext-bg-red-400 hover:richtext-bg-opacity-20 focus:richtext-bg-red-400 focus:richtext-bg-opacity-30 focus:richtext-text-red-500 dark:hover:richtext-bg-opacity-20 dark:hover:richtext-text-red-500",
|
|
7204
7217
|
onClick: y,
|
|
7205
7218
|
children: [
|
|
7206
|
-
/* @__PURE__ */ i(
|
|
7219
|
+
/* @__PURE__ */ i(Y, { name: "Trash2" }),
|
|
7207
7220
|
/* @__PURE__ */ i("span", { children: r("editor.remove") })
|
|
7208
7221
|
]
|
|
7209
7222
|
}
|
|
7210
7223
|
),
|
|
7211
|
-
x ? /* @__PURE__ */
|
|
7224
|
+
x ? /* @__PURE__ */ f(
|
|
7212
7225
|
ot,
|
|
7213
7226
|
{
|
|
7214
7227
|
className: "richtext-flex richtext-gap-3",
|
|
7215
7228
|
onClick: w,
|
|
7216
7229
|
children: [
|
|
7217
|
-
/* @__PURE__ */ i(
|
|
7230
|
+
/* @__PURE__ */ i(Y, { name: "PaintRoller" }),
|
|
7218
7231
|
/* @__PURE__ */ i("span", { children: r("editor.clear.tooltip") })
|
|
7219
7232
|
]
|
|
7220
7233
|
}
|
|
7221
7234
|
) : null,
|
|
7222
|
-
/* @__PURE__ */
|
|
7235
|
+
/* @__PURE__ */ f(
|
|
7223
7236
|
ot,
|
|
7224
7237
|
{
|
|
7225
7238
|
className: "richtext-flex richtext-gap-3",
|
|
7226
7239
|
onClick: p,
|
|
7227
7240
|
children: [
|
|
7228
|
-
/* @__PURE__ */ i(
|
|
7241
|
+
/* @__PURE__ */ i(Y, { name: "Clipboard" }),
|
|
7229
7242
|
/* @__PURE__ */ i("span", { children: r("editor.copyToClipboard") })
|
|
7230
7243
|
]
|
|
7231
7244
|
}
|
|
7232
7245
|
),
|
|
7233
|
-
/* @__PURE__ */
|
|
7246
|
+
/* @__PURE__ */ f(
|
|
7234
7247
|
ot,
|
|
7235
7248
|
{
|
|
7236
7249
|
className: "richtext-flex richtext-gap-3",
|
|
7237
|
-
onClick:
|
|
7250
|
+
onClick: g,
|
|
7238
7251
|
children: [
|
|
7239
|
-
/* @__PURE__ */ i(
|
|
7252
|
+
/* @__PURE__ */ i(Y, { name: "Copy" }),
|
|
7240
7253
|
/* @__PURE__ */ i("span", { children: r("editor.copy") })
|
|
7241
7254
|
]
|
|
7242
7255
|
}
|
|
7243
7256
|
),
|
|
7244
7257
|
u || m ? /* @__PURE__ */ i(_r, {}) : null,
|
|
7245
|
-
u ? /* @__PURE__ */
|
|
7246
|
-
/* @__PURE__ */
|
|
7247
|
-
/* @__PURE__ */ i(
|
|
7258
|
+
u ? /* @__PURE__ */ f(tr, { children: [
|
|
7259
|
+
/* @__PURE__ */ f(ke, { className: "richtext-flex richtext-gap-3", children: [
|
|
7260
|
+
/* @__PURE__ */ i(Y, { name: "AlignCenter" }),
|
|
7248
7261
|
/* @__PURE__ */ i("span", { children: r("editor.textalign.tooltip") })
|
|
7249
7262
|
] }),
|
|
7250
|
-
/* @__PURE__ */ i(Qe, { children: /* @__PURE__ */
|
|
7251
|
-
/* @__PURE__ */
|
|
7263
|
+
/* @__PURE__ */ i(Qe, { children: /* @__PURE__ */ f(Se, { children: [
|
|
7264
|
+
/* @__PURE__ */ f(
|
|
7252
7265
|
ot,
|
|
7253
7266
|
{
|
|
7254
7267
|
className: "richtext-flex richtext-gap-3",
|
|
7255
7268
|
onClick: () => I("left"),
|
|
7256
7269
|
children: [
|
|
7257
|
-
/* @__PURE__ */ i(
|
|
7270
|
+
/* @__PURE__ */ i(Y, { name: "AlignLeft" }),
|
|
7258
7271
|
/* @__PURE__ */ i("span", { children: r("editor.textalign.left.tooltip") })
|
|
7259
7272
|
]
|
|
7260
7273
|
}
|
|
7261
7274
|
),
|
|
7262
|
-
/* @__PURE__ */
|
|
7275
|
+
/* @__PURE__ */ f(
|
|
7263
7276
|
ot,
|
|
7264
7277
|
{
|
|
7265
7278
|
className: "richtext-flex richtext-gap-3",
|
|
7266
7279
|
onClick: () => I("center"),
|
|
7267
7280
|
children: [
|
|
7268
|
-
/* @__PURE__ */ i(
|
|
7281
|
+
/* @__PURE__ */ i(Y, { name: "AlignCenter" }),
|
|
7269
7282
|
/* @__PURE__ */ i("span", { children: r("editor.textalign.center.tooltip") })
|
|
7270
7283
|
]
|
|
7271
7284
|
}
|
|
7272
7285
|
),
|
|
7273
|
-
/* @__PURE__ */
|
|
7286
|
+
/* @__PURE__ */ f(
|
|
7274
7287
|
ot,
|
|
7275
7288
|
{
|
|
7276
7289
|
className: "richtext-flex richtext-gap-3",
|
|
7277
7290
|
onClick: () => I("right"),
|
|
7278
7291
|
children: [
|
|
7279
|
-
/* @__PURE__ */ i(
|
|
7292
|
+
/* @__PURE__ */ i(Y, { name: "AlignRight" }),
|
|
7280
7293
|
/* @__PURE__ */ i("span", { children: r("editor.textalign.right.tooltip") })
|
|
7281
7294
|
]
|
|
7282
7295
|
}
|
|
7283
7296
|
)
|
|
7284
7297
|
] }) })
|
|
7285
7298
|
] }) : null,
|
|
7286
|
-
m ? /* @__PURE__ */
|
|
7287
|
-
/* @__PURE__ */
|
|
7288
|
-
/* @__PURE__ */ i(
|
|
7299
|
+
m ? /* @__PURE__ */ f(tr, { children: [
|
|
7300
|
+
/* @__PURE__ */ f(ke, { className: "richtext-flex richtext-gap-3", children: [
|
|
7301
|
+
/* @__PURE__ */ i(Y, { name: "IndentIncrease" }),
|
|
7289
7302
|
/* @__PURE__ */ i("span", { children: r("editor.indent") })
|
|
7290
7303
|
] }),
|
|
7291
|
-
/* @__PURE__ */ i(Qe, { children: /* @__PURE__ */
|
|
7292
|
-
/* @__PURE__ */
|
|
7304
|
+
/* @__PURE__ */ i(Qe, { children: /* @__PURE__ */ f(Se, { children: [
|
|
7305
|
+
/* @__PURE__ */ f(
|
|
7293
7306
|
ot,
|
|
7294
7307
|
{
|
|
7295
7308
|
className: "richtext-flex richtext-gap-3",
|
|
7296
7309
|
disabled: ((E = n == null ? void 0 : n.attrs) == null ? void 0 : E.indent) >= Me.max,
|
|
7297
7310
|
onClick: T,
|
|
7298
7311
|
children: [
|
|
7299
|
-
/* @__PURE__ */ i(
|
|
7312
|
+
/* @__PURE__ */ i(Y, { name: "IndentIncrease" }),
|
|
7300
7313
|
/* @__PURE__ */ i("span", { children: r("editor.indent.tooltip") })
|
|
7301
7314
|
]
|
|
7302
7315
|
}
|
|
7303
7316
|
),
|
|
7304
|
-
/* @__PURE__ */
|
|
7317
|
+
/* @__PURE__ */ f(
|
|
7305
7318
|
ot,
|
|
7306
7319
|
{
|
|
7307
7320
|
className: "richtext-flex richtext-gap-3",
|
|
7308
7321
|
disabled: ((b = n == null ? void 0 : n.attrs) == null ? void 0 : b.indent) <= Me.min,
|
|
7309
7322
|
onClick: v,
|
|
7310
7323
|
children: [
|
|
7311
|
-
/* @__PURE__ */ i(
|
|
7324
|
+
/* @__PURE__ */ i(Y, { name: "IndentDecrease" }),
|
|
7312
7325
|
/* @__PURE__ */ i("span", { children: r("editor.outdent.tooltip") })
|
|
7313
7326
|
]
|
|
7314
7327
|
}
|
|
@@ -7325,13 +7338,13 @@ function Hs(t) {
|
|
|
7325
7338
|
}
|
|
7326
7339
|
);
|
|
7327
7340
|
}
|
|
7328
|
-
const
|
|
7341
|
+
const _s = {
|
|
7329
7342
|
maxWidth: "auto",
|
|
7330
7343
|
zIndex: 20,
|
|
7331
7344
|
appendTo: "parent",
|
|
7332
7345
|
moveTransition: "transform 0.1s ease-out"
|
|
7333
7346
|
};
|
|
7334
|
-
function
|
|
7347
|
+
function Bs({ item: t, disabled: e, editor: r }) {
|
|
7335
7348
|
var a;
|
|
7336
7349
|
const n = t.component;
|
|
7337
7350
|
return n ? /* @__PURE__ */ i(
|
|
@@ -7343,26 +7356,26 @@ function _s({ item: t, disabled: e, editor: r }) {
|
|
|
7343
7356
|
}
|
|
7344
7357
|
) : /* @__PURE__ */ i(V, {});
|
|
7345
7358
|
}
|
|
7346
|
-
function
|
|
7359
|
+
function $s(t) {
|
|
7347
7360
|
const { t: e, lang: r } = q(), n = ({ editor: o }) => {
|
|
7348
7361
|
const { selection: c } = o.view.state, { $from: l, to: s } = c;
|
|
7349
7362
|
return l.pos === s ? !1 : c instanceof Wt;
|
|
7350
|
-
}, a = U(() => t.disabled || !(t != null && t.editor) ? [] :
|
|
7363
|
+
}, a = U(() => t.disabled || !(t != null && t.editor) ? [] : zs(t.editor, e), [t.disabled, t.editor, r, e]);
|
|
7351
7364
|
return /* @__PURE__ */ i(
|
|
7352
|
-
|
|
7365
|
+
et,
|
|
7353
7366
|
{
|
|
7354
7367
|
editor: t == null ? void 0 : t.editor,
|
|
7355
7368
|
shouldShow: n,
|
|
7356
|
-
tippyOptions:
|
|
7369
|
+
tippyOptions: _s,
|
|
7357
7370
|
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
|
-
|
|
7371
|
+
Q,
|
|
7359
7372
|
{
|
|
7360
7373
|
className: "!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]",
|
|
7361
7374
|
orientation: "vertical"
|
|
7362
7375
|
},
|
|
7363
7376
|
`bubbleMenu-divider-${c}`
|
|
7364
7377
|
) : /* @__PURE__ */ i(
|
|
7365
|
-
|
|
7378
|
+
Bs,
|
|
7366
7379
|
{
|
|
7367
7380
|
disabled: t.disabled,
|
|
7368
7381
|
editor: t.editor,
|
|
@@ -7373,9 +7386,9 @@ function Bs(t) {
|
|
|
7373
7386
|
}
|
|
7374
7387
|
);
|
|
7375
7388
|
}
|
|
7376
|
-
function
|
|
7377
|
-
var
|
|
7378
|
-
const n = ({ editor:
|
|
7389
|
+
function Vs({ editor: t, disabled: e, actions: r }) {
|
|
7390
|
+
var g, I, T, v, y, C, M, L, N, E, b, k, _, D, R, A, $, F;
|
|
7391
|
+
const n = ({ editor: K }) => Ti(K.view.state, "table"), { t: a } = q();
|
|
7379
7392
|
function o() {
|
|
7380
7393
|
t.chain().focus().addColumnBefore().run();
|
|
7381
7394
|
}
|
|
@@ -7403,11 +7416,11 @@ function $s({ editor: t, disabled: e, actions: r }) {
|
|
|
7403
7416
|
function x() {
|
|
7404
7417
|
t.chain().focus().deleteTable().run();
|
|
7405
7418
|
}
|
|
7406
|
-
function w(
|
|
7407
|
-
t.chain().focus().setTableCellBackground(
|
|
7419
|
+
function w(K) {
|
|
7420
|
+
t.chain().focus().setTableCellBackground(K).run();
|
|
7408
7421
|
}
|
|
7409
7422
|
return /* @__PURE__ */ i(
|
|
7410
|
-
|
|
7423
|
+
et,
|
|
7411
7424
|
{
|
|
7412
7425
|
editor: t,
|
|
7413
7426
|
pluginKey: "table",
|
|
@@ -7422,11 +7435,11 @@ function $s({ editor: t, disabled: e, actions: r }) {
|
|
|
7422
7435
|
getReferenceClientRect: () => {
|
|
7423
7436
|
var Ke;
|
|
7424
7437
|
const {
|
|
7425
|
-
view:
|
|
7438
|
+
view: K,
|
|
7426
7439
|
state: {
|
|
7427
7440
|
selection: { from: nt }
|
|
7428
7441
|
}
|
|
7429
|
-
} = t, Nt =
|
|
7442
|
+
} = t, Nt = K.domAtPos(nt).node;
|
|
7430
7443
|
if (!Nt)
|
|
7431
7444
|
return new DOMRect(-1e3, -1e3, 0, 0);
|
|
7432
7445
|
const Ye = (Ke = Nt == null ? void 0 : Nt.closest) == null ? void 0 : Ke.call(Nt, ".tableWrapper");
|
|
@@ -7435,12 +7448,28 @@ function $s({ editor: t, disabled: e, actions: r }) {
|
|
|
7435
7448
|
plugins: [ho],
|
|
7436
7449
|
sticky: "popper"
|
|
7437
7450
|
},
|
|
7438
|
-
children: e ? /* @__PURE__ */ i(V, {}) : /* @__PURE__ */
|
|
7451
|
+
children: e ? /* @__PURE__ */ i(V, {}) : /* @__PURE__ */ f("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: [
|
|
7452
|
+
r && /* @__PURE__ */ f(V, { children: [
|
|
7453
|
+
r.map((K, nt) => /* @__PURE__ */ i(
|
|
7454
|
+
O,
|
|
7455
|
+
{
|
|
7456
|
+
...K
|
|
7457
|
+
},
|
|
7458
|
+
nt
|
|
7459
|
+
)),
|
|
7460
|
+
/* @__PURE__ */ i(
|
|
7461
|
+
Q,
|
|
7462
|
+
{
|
|
7463
|
+
className: "!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]",
|
|
7464
|
+
orientation: "vertical"
|
|
7465
|
+
}
|
|
7466
|
+
)
|
|
7467
|
+
] }),
|
|
7439
7468
|
/* @__PURE__ */ i(
|
|
7440
7469
|
O,
|
|
7441
7470
|
{
|
|
7442
7471
|
action: o,
|
|
7443
|
-
disabled: !((I = (
|
|
7472
|
+
disabled: !((I = (g = t == null ? void 0 : t.can()) == null ? void 0 : g.addColumnBefore) != null && I.call(g)),
|
|
7444
7473
|
icon: "BetweenHorizonalEnd",
|
|
7445
7474
|
tooltip: a("editor.table.menu.insertColumnBefore"),
|
|
7446
7475
|
"tooltip-options": {
|
|
@@ -7473,7 +7502,7 @@ function $s({ editor: t, disabled: e, actions: r }) {
|
|
|
7473
7502
|
}
|
|
7474
7503
|
),
|
|
7475
7504
|
/* @__PURE__ */ i(
|
|
7476
|
-
|
|
7505
|
+
Q,
|
|
7477
7506
|
{
|
|
7478
7507
|
className: "!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]",
|
|
7479
7508
|
orientation: "vertical"
|
|
@@ -7516,7 +7545,7 @@ function $s({ editor: t, disabled: e, actions: r }) {
|
|
|
7516
7545
|
}
|
|
7517
7546
|
),
|
|
7518
7547
|
/* @__PURE__ */ i(
|
|
7519
|
-
|
|
7548
|
+
Q,
|
|
7520
7549
|
{
|
|
7521
7550
|
className: "!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]",
|
|
7522
7551
|
orientation: "vertical"
|
|
@@ -7547,14 +7576,14 @@ function $s({ editor: t, disabled: e, actions: r }) {
|
|
|
7547
7576
|
}
|
|
7548
7577
|
),
|
|
7549
7578
|
/* @__PURE__ */ i(
|
|
7550
|
-
|
|
7579
|
+
Q,
|
|
7551
7580
|
{
|
|
7552
7581
|
className: "!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]",
|
|
7553
7582
|
orientation: "vertical"
|
|
7554
7583
|
}
|
|
7555
7584
|
),
|
|
7556
7585
|
/* @__PURE__ */ i(
|
|
7557
|
-
|
|
7586
|
+
xa,
|
|
7558
7587
|
{
|
|
7559
7588
|
action: w,
|
|
7560
7589
|
editor: t,
|
|
@@ -7575,21 +7604,14 @@ function $s({ editor: t, disabled: e, actions: r }) {
|
|
|
7575
7604
|
sideOffset: 15
|
|
7576
7605
|
}
|
|
7577
7606
|
}
|
|
7578
|
-
)
|
|
7579
|
-
r && r.map((Y, nt) => /* @__PURE__ */ i(
|
|
7580
|
-
O,
|
|
7581
|
-
{
|
|
7582
|
-
...Y
|
|
7583
|
-
},
|
|
7584
|
-
nt
|
|
7585
|
-
))
|
|
7607
|
+
)
|
|
7586
7608
|
] })
|
|
7587
7609
|
}
|
|
7588
7610
|
);
|
|
7589
7611
|
}
|
|
7590
|
-
function
|
|
7612
|
+
function Ws(t) {
|
|
7591
7613
|
const { t: e } = q();
|
|
7592
|
-
return /* @__PURE__ */
|
|
7614
|
+
return /* @__PURE__ */ f("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
7615
|
/* @__PURE__ */ i(
|
|
7594
7616
|
"a",
|
|
7595
7617
|
{
|
|
@@ -7603,8 +7625,8 @@ function Vs(t) {
|
|
|
7603
7625
|
})
|
|
7604
7626
|
}
|
|
7605
7627
|
),
|
|
7606
|
-
(t == null ? void 0 : t.link) && /* @__PURE__ */ i(
|
|
7607
|
-
/* @__PURE__ */
|
|
7628
|
+
(t == null ? void 0 : t.link) && /* @__PURE__ */ i(Q, { orientation: "vertical", className: "!richtext-h-4" }),
|
|
7629
|
+
/* @__PURE__ */ f("div", { className: "richtext-flex richtext-flex-nowrap", children: [
|
|
7608
7630
|
/* @__PURE__ */ i(
|
|
7609
7631
|
O,
|
|
7610
7632
|
{
|
|
@@ -7630,7 +7652,7 @@ function Vs(t) {
|
|
|
7630
7652
|
] })
|
|
7631
7653
|
] });
|
|
7632
7654
|
}
|
|
7633
|
-
function
|
|
7655
|
+
function Fs({ editor: t, disabled: e }) {
|
|
7634
7656
|
const [r, n] = S(!1), a = U(() => {
|
|
7635
7657
|
const { href: s } = t.getAttributes("link");
|
|
7636
7658
|
return s;
|
|
@@ -7652,7 +7674,7 @@ function Ws({ editor: t, disabled: e }) {
|
|
|
7652
7674
|
t.chain().extendMarkRange("link").unsetLink().focus().run(), n(!1);
|
|
7653
7675
|
}, [t]);
|
|
7654
7676
|
return /* @__PURE__ */ i(V, { children: /* @__PURE__ */ i(
|
|
7655
|
-
|
|
7677
|
+
et,
|
|
7656
7678
|
{
|
|
7657
7679
|
editor: t,
|
|
7658
7680
|
shouldShow: o,
|
|
@@ -7667,8 +7689,8 @@ function Ws({ editor: t, disabled: e }) {
|
|
|
7667
7689
|
n(!1);
|
|
7668
7690
|
}
|
|
7669
7691
|
},
|
|
7670
|
-
children: e ? /* @__PURE__ */ i(V, {}) : /* @__PURE__ */ i(V, { children: r ? /* @__PURE__ */ i(
|
|
7671
|
-
|
|
7692
|
+
children: e ? /* @__PURE__ */ i(V, {}) : /* @__PURE__ */ i(V, { children: r ? /* @__PURE__ */ i(fa, { onSetLink: c, editor: t }) : /* @__PURE__ */ i(
|
|
7693
|
+
Ws,
|
|
7672
7694
|
{
|
|
7673
7695
|
editor: t,
|
|
7674
7696
|
onClear: l,
|
|
@@ -7691,7 +7713,7 @@ function je({ item: t, disabled: e, editor: r }) {
|
|
|
7691
7713
|
var a;
|
|
7692
7714
|
const n = t.component;
|
|
7693
7715
|
return n ? /* @__PURE__ */ i(Pe, { children: t.type === "divider" ? /* @__PURE__ */ i(
|
|
7694
|
-
|
|
7716
|
+
Q,
|
|
7695
7717
|
{
|
|
7696
7718
|
className: "!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]",
|
|
7697
7719
|
orientation: "vertical"
|
|
@@ -7705,26 +7727,26 @@ function je({ item: t, disabled: e, editor: r }) {
|
|
|
7705
7727
|
}
|
|
7706
7728
|
) }) : /* @__PURE__ */ i(V, {});
|
|
7707
7729
|
}
|
|
7708
|
-
function Fs(t) {
|
|
7709
|
-
return t.type.name === Vt.name;
|
|
7710
|
-
}
|
|
7711
7730
|
function Us(t) {
|
|
7712
|
-
return t.type.name ===
|
|
7731
|
+
return t.type.name === Vt.name;
|
|
7713
7732
|
}
|
|
7714
7733
|
function Gs(t) {
|
|
7715
7734
|
return t.type.name === ti.name;
|
|
7716
7735
|
}
|
|
7717
7736
|
function qs(t) {
|
|
7737
|
+
return t.type.name === Qr.name;
|
|
7738
|
+
}
|
|
7739
|
+
function js(t) {
|
|
7718
7740
|
const { lang: e } = q(), r = ({ editor: a }) => {
|
|
7719
7741
|
const { selection: o } = a.view.state, { $from: c, to: l } = o;
|
|
7720
7742
|
let s = !1;
|
|
7721
7743
|
return a.view.state.doc.nodesBetween(c.pos, l, (h) => {
|
|
7722
|
-
if (
|
|
7744
|
+
if (Us(h))
|
|
7723
7745
|
return s = !0, !1;
|
|
7724
7746
|
}), s;
|
|
7725
|
-
}, n = U(() => t.disabled ? [] :
|
|
7747
|
+
}, n = U(() => t.disabled ? [] : Ms(t.editor), [t.disabled, t.editor, e]);
|
|
7726
7748
|
return /* @__PURE__ */ i(V, { children: /* @__PURE__ */ i(
|
|
7727
|
-
|
|
7749
|
+
et,
|
|
7728
7750
|
{
|
|
7729
7751
|
editor: t == null ? void 0 : t.editor,
|
|
7730
7752
|
shouldShow: r,
|
|
@@ -7741,17 +7763,17 @@ function qs(t) {
|
|
|
7741
7763
|
}
|
|
7742
7764
|
) });
|
|
7743
7765
|
}
|
|
7744
|
-
function
|
|
7766
|
+
function Xs(t) {
|
|
7745
7767
|
const { lang: e } = q(), r = ({ editor: a }) => {
|
|
7746
7768
|
const { selection: o } = a.view.state, { $from: c, to: l } = o;
|
|
7747
7769
|
let s = !1;
|
|
7748
7770
|
return a.view.state.doc.nodesBetween(c.pos, l, (h) => {
|
|
7749
|
-
if (
|
|
7771
|
+
if (Gs(h))
|
|
7750
7772
|
return s = !0, !1;
|
|
7751
7773
|
}), s;
|
|
7752
|
-
}, n = U(() => t.disabled ? [] :
|
|
7774
|
+
}, n = U(() => t.disabled ? [] : As(t.editor), [t.disabled, t.editor, e]);
|
|
7753
7775
|
return /* @__PURE__ */ i(V, { children: /* @__PURE__ */ i(
|
|
7754
|
-
|
|
7776
|
+
et,
|
|
7755
7777
|
{
|
|
7756
7778
|
editor: t == null ? void 0 : t.editor,
|
|
7757
7779
|
shouldShow: r,
|
|
@@ -7768,17 +7790,17 @@ function js(t) {
|
|
|
7768
7790
|
}
|
|
7769
7791
|
) });
|
|
7770
7792
|
}
|
|
7771
|
-
function
|
|
7793
|
+
function Ys(t) {
|
|
7772
7794
|
const { lang: e } = q(), r = ({ editor: a }) => {
|
|
7773
7795
|
const { selection: o } = a.view.state, { $from: c, to: l } = o;
|
|
7774
7796
|
let s = !1;
|
|
7775
7797
|
return a.view.state.doc.nodesBetween(c.pos, l, (h) => {
|
|
7776
|
-
if (
|
|
7798
|
+
if (qs(h))
|
|
7777
7799
|
return s = !0, !1;
|
|
7778
7800
|
}), s;
|
|
7779
|
-
}, n = U(() => t.disabled ? [] :
|
|
7801
|
+
}, n = U(() => t.disabled ? [] : Es(t.editor), [t.editor, t.disabled, e]);
|
|
7780
7802
|
return /* @__PURE__ */ i(V, { children: /* @__PURE__ */ i(
|
|
7781
|
-
|
|
7803
|
+
et,
|
|
7782
7804
|
{
|
|
7783
7805
|
editor: t == null ? void 0 : t.editor,
|
|
7784
7806
|
shouldShow: r,
|
|
@@ -7795,10 +7817,10 @@ function Xs(t) {
|
|
|
7795
7817
|
}
|
|
7796
7818
|
) });
|
|
7797
7819
|
}
|
|
7798
|
-
function
|
|
7820
|
+
function Ks({ editor: t }) {
|
|
7799
7821
|
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
7822
|
return /* @__PURE__ */ i(
|
|
7801
|
-
|
|
7823
|
+
et,
|
|
7802
7824
|
{
|
|
7803
7825
|
pluginKey: "columns-bubble-menu",
|
|
7804
7826
|
editor: t,
|
|
@@ -7814,7 +7836,7 @@ function Ys({ editor: t }) {
|
|
|
7814
7836
|
// toggleVisible(false)
|
|
7815
7837
|
// },
|
|
7816
7838
|
},
|
|
7817
|
-
children: /* @__PURE__ */
|
|
7839
|
+
children: /* @__PURE__ */ f("div", { className: "richtext-w-auto richtext-px-3 richtext-py-2 richtext-transition-all !richtext-border richtext-rounded-sm richtext-shadow-sm richtext-pointer-events-auto richtext-select-none richtext-border-neutral-200 dark:richtext-border-neutral-800 richtext-bg-background", children: [
|
|
7818
7840
|
/* @__PURE__ */ i(
|
|
7819
7841
|
O,
|
|
7820
7842
|
{
|
|
@@ -7851,32 +7873,32 @@ function Ys({ editor: t }) {
|
|
|
7851
7873
|
}
|
|
7852
7874
|
);
|
|
7853
7875
|
}
|
|
7854
|
-
function
|
|
7876
|
+
function Zs({ editor: t, extensions: e }) {
|
|
7855
7877
|
const { t: r } = q(), n = U(() => {
|
|
7856
7878
|
var a, o, c;
|
|
7857
7879
|
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;
|
|
7858
7880
|
}, [e]);
|
|
7859
|
-
return n ? /* @__PURE__ */ i("div", { className: "richtext-flex richtext-items-center richtext-justify-between richtext-p-3 richtext-border-t", children: /* @__PURE__ */ i("div", { className: "richtext-flex richtext-flex-col", children: /* @__PURE__ */ i("div", { className: "richtext-flex richtext-justify-end richtext-gap-3 richtext-text-sm", children: /* @__PURE__ */
|
|
7881
|
+
return n ? /* @__PURE__ */ i("div", { className: "richtext-flex richtext-items-center richtext-justify-between richtext-p-3 richtext-border-t", children: /* @__PURE__ */ i("div", { className: "richtext-flex richtext-flex-col", children: /* @__PURE__ */ i("div", { className: "richtext-flex richtext-justify-end richtext-gap-3 richtext-text-sm", children: /* @__PURE__ */ f("span", { children: [
|
|
7860
7882
|
t.storage.characterCount.characters(),
|
|
7861
7883
|
"/",
|
|
7862
7884
|
n,
|
|
7863
7885
|
" ",
|
|
7864
7886
|
r("editor.characters")
|
|
7865
|
-
] }) }) }) }) : /* @__PURE__ */ i("div", { className: "richtext-flex richtext-items-center richtext-justify-between richtext-p-3 richtext-border-t", children: /* @__PURE__ */ i("div", { className: "richtext-flex richtext-flex-col", children: /* @__PURE__ */ i("div", { className: "richtext-flex richtext-justify-end richtext-gap-3 richtext-text-sm", children: /* @__PURE__ */
|
|
7887
|
+
] }) }) }) }) : /* @__PURE__ */ i("div", { className: "richtext-flex richtext-items-center richtext-justify-between richtext-p-3 richtext-border-t", children: /* @__PURE__ */ i("div", { className: "richtext-flex richtext-flex-col", children: /* @__PURE__ */ i("div", { className: "richtext-flex richtext-justify-end richtext-gap-3 richtext-text-sm", children: /* @__PURE__ */ f("span", { children: [
|
|
7866
7888
|
t.storage.characterCount.characters(),
|
|
7867
7889
|
" ",
|
|
7868
7890
|
r("editor.characters")
|
|
7869
7891
|
] }) }) }) });
|
|
7870
7892
|
}
|
|
7871
|
-
function
|
|
7893
|
+
function Js() {
|
|
7872
7894
|
const { toasts: t } = Fo();
|
|
7873
|
-
return /* @__PURE__ */
|
|
7874
|
-
t.map(({ id: e, title: r, description: n, action: a, ...o }) => /* @__PURE__ */
|
|
7895
|
+
return /* @__PURE__ */ f(Po, { children: [
|
|
7896
|
+
t.map(({ id: e, title: r, description: n, action: a, ...o }) => /* @__PURE__ */ f(
|
|
7875
7897
|
Wr,
|
|
7876
7898
|
{
|
|
7877
7899
|
...o,
|
|
7878
7900
|
children: [
|
|
7879
|
-
/* @__PURE__ */
|
|
7901
|
+
/* @__PURE__ */ f("div", { className: "richtext-grid richtext-gap-1", children: [
|
|
7880
7902
|
r && /* @__PURE__ */ i(Ur, { children: r }),
|
|
7881
7903
|
n && /* @__PURE__ */ i(Gr, { children: n })
|
|
7882
7904
|
] }),
|
|
@@ -7889,7 +7911,7 @@ function Zs() {
|
|
|
7889
7911
|
/* @__PURE__ */ i(Vr, {})
|
|
7890
7912
|
] });
|
|
7891
7913
|
}
|
|
7892
|
-
const
|
|
7914
|
+
const Qs = `
|
|
7893
7915
|
.reactjs-tiptap-editor,
|
|
7894
7916
|
.richtext-dialog-content {
|
|
7895
7917
|
button,
|
|
@@ -8027,7 +8049,7 @@ div[data-tippy-root] {
|
|
|
8027
8049
|
color: inherit;
|
|
8028
8050
|
}
|
|
8029
8051
|
}
|
|
8030
|
-
`,
|
|
8052
|
+
`, tl = gi(({ children: t, id: e }) => {
|
|
8031
8053
|
const [, r] = Or((c) => c.value), [, n] = Hr((c) => c.value), a = (c) => {
|
|
8032
8054
|
r({
|
|
8033
8055
|
value: c.detail
|
|
@@ -8044,11 +8066,11 @@ div[data-tippy-root] {
|
|
|
8044
8066
|
};
|
|
8045
8067
|
}, []), /* @__PURE__ */ i(V, { children: t });
|
|
8046
8068
|
});
|
|
8047
|
-
function
|
|
8048
|
-
return /* @__PURE__ */ i(go, { children: /* @__PURE__ */ i(po, { children: /* @__PURE__ */ i(
|
|
8069
|
+
function el({ children: t, id: e }) {
|
|
8070
|
+
return /* @__PURE__ */ i(go, { children: /* @__PURE__ */ i(po, { children: /* @__PURE__ */ i(tl, { id: e, children: t }) }) });
|
|
8049
8071
|
}
|
|
8050
|
-
const wr = "data-rc-order", vr = "data-rc-priority",
|
|
8051
|
-
function
|
|
8072
|
+
const wr = "data-rc-order", vr = "data-rc-priority", rl = "rc-util-key", ze = /* @__PURE__ */ new Map();
|
|
8073
|
+
function il(t, e) {
|
|
8052
8074
|
if (!t)
|
|
8053
8075
|
return !1;
|
|
8054
8076
|
if (t.contains)
|
|
@@ -8061,27 +8083,27 @@ function rl(t, e) {
|
|
|
8061
8083
|
}
|
|
8062
8084
|
return !1;
|
|
8063
8085
|
}
|
|
8064
|
-
function
|
|
8065
|
-
return t ? t.startsWith("data-") ? t : `data-${t}` :
|
|
8086
|
+
function ci({ mark: t } = {}) {
|
|
8087
|
+
return t ? t.startsWith("data-") ? t : `data-${t}` : rl;
|
|
8066
8088
|
}
|
|
8067
8089
|
function Xe(t) {
|
|
8068
8090
|
return t.attachTo ? t.attachTo : document.querySelector("head") || document.body;
|
|
8069
8091
|
}
|
|
8070
|
-
function
|
|
8092
|
+
function nl(t) {
|
|
8071
8093
|
return t === "queue" ? "prependQueue" : t ? "prepend" : "append";
|
|
8072
8094
|
}
|
|
8073
|
-
function
|
|
8095
|
+
function si(t) {
|
|
8074
8096
|
return [...(ze.get(t) || t).children].filter(
|
|
8075
8097
|
(e) => e.tagName === "STYLE"
|
|
8076
8098
|
);
|
|
8077
8099
|
}
|
|
8078
|
-
function
|
|
8079
|
-
const { csp: r, prepend: n, priority: a = 0 } = e, o =
|
|
8100
|
+
function li(t, e = {}) {
|
|
8101
|
+
const { csp: r, prepend: n, priority: a = 0 } = e, o = nl(n), c = o === "prependQueue", l = document.createElement("style");
|
|
8080
8102
|
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
8103
|
const s = Xe(e), { firstChild: h } = s;
|
|
8082
8104
|
if (n) {
|
|
8083
8105
|
if (c) {
|
|
8084
|
-
const d =
|
|
8106
|
+
const d = si(s).filter((u) => {
|
|
8085
8107
|
if (!["prepend", "prependQueue"].includes(u.getAttribute(wr)))
|
|
8086
8108
|
return !1;
|
|
8087
8109
|
const m = Number(u.getAttribute(vr) || 0);
|
|
@@ -8095,33 +8117,33 @@ function di(t, e = {}) {
|
|
|
8095
8117
|
s.append(l);
|
|
8096
8118
|
return l;
|
|
8097
8119
|
}
|
|
8098
|
-
function
|
|
8120
|
+
function di(t, e = {}) {
|
|
8099
8121
|
const r = Xe(e);
|
|
8100
|
-
return
|
|
8122
|
+
return si(r).find((n) => n.getAttribute(ci(e)) === t);
|
|
8101
8123
|
}
|
|
8102
|
-
function
|
|
8103
|
-
const r =
|
|
8124
|
+
function ol(t, e = {}) {
|
|
8125
|
+
const r = di(t, e);
|
|
8104
8126
|
r && r.remove();
|
|
8105
8127
|
}
|
|
8106
|
-
function
|
|
8128
|
+
function al(t, e) {
|
|
8107
8129
|
const r = ze.get(t);
|
|
8108
|
-
if (!r || !
|
|
8109
|
-
const n =
|
|
8130
|
+
if (!r || !il(document, r)) {
|
|
8131
|
+
const n = li("", e), { parentNode: a } = n;
|
|
8110
8132
|
ze.set(t, a), n.remove();
|
|
8111
8133
|
}
|
|
8112
8134
|
}
|
|
8113
|
-
function
|
|
8135
|
+
function cl(t, e, r = {}) {
|
|
8114
8136
|
var c, l, s;
|
|
8115
8137
|
const n = Xe(r);
|
|
8116
|
-
|
|
8117
|
-
const a =
|
|
8138
|
+
al(n, r);
|
|
8139
|
+
const a = di(e, r);
|
|
8118
8140
|
if (a)
|
|
8119
8141
|
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
|
-
const o =
|
|
8121
|
-
return o.setAttribute(
|
|
8142
|
+
const o = li(t, r);
|
|
8143
|
+
return o.setAttribute(ci(r), e), o;
|
|
8122
8144
|
}
|
|
8123
|
-
function
|
|
8124
|
-
const { content: r, extensions: n, useEditorOptions: a = {} } = t, o =
|
|
8145
|
+
function sl(t, e) {
|
|
8146
|
+
const { content: r, extensions: n, useEditorOptions: a = {} } = t, o = wi(), c = U(() => {
|
|
8125
8147
|
const u = Fi(n, n, "name");
|
|
8126
8148
|
return [...n.map((x) => {
|
|
8127
8149
|
const w = n.find((p) => p.name === x.name);
|
|
@@ -8131,7 +8153,7 @@ function cl(t, e) {
|
|
|
8131
8153
|
var x;
|
|
8132
8154
|
const m = h(u, t.output);
|
|
8133
8155
|
(x = t == null ? void 0 : t.onChangeContent) == null || x.call(t, m);
|
|
8134
|
-
},
|
|
8156
|
+
}, Li), s = Ni({
|
|
8135
8157
|
extensions: c,
|
|
8136
8158
|
content: r,
|
|
8137
8159
|
onUpdate: ({ editor: u }) => {
|
|
@@ -8139,28 +8161,28 @@ function cl(t, e) {
|
|
|
8139
8161
|
},
|
|
8140
8162
|
...a
|
|
8141
8163
|
});
|
|
8142
|
-
|
|
8164
|
+
vi(e, () => ({
|
|
8143
8165
|
editor: s
|
|
8144
8166
|
})), B(() => {
|
|
8145
|
-
document.documentElement.classList.toggle("dark", t.dark),
|
|
8167
|
+
document.documentElement.classList.toggle("dark", t.dark), ja.setTheme(o, t.dark ? "dark" : "light");
|
|
8146
8168
|
}, [t.dark]), B(() => {
|
|
8147
8169
|
s == null || s.setEditable(!(t != null && t.disabled)), vo.setDisable(o, !(t != null && t.disabled));
|
|
8148
|
-
}, [s, t == null ? void 0 : t.disabled]), B(() => ((t == null ? void 0 : t.resetCSS) !== !1 &&
|
|
8149
|
-
|
|
8170
|
+
}, [s, t == null ? void 0 : t.disabled]), B(() => ((t == null ? void 0 : t.resetCSS) !== !1 && cl(Qs, "react-tiptap-reset"), () => {
|
|
8171
|
+
ol("react-tiptap-reset");
|
|
8150
8172
|
}), [t == null ? void 0 : t.resetCSS]);
|
|
8151
8173
|
function h(u, m) {
|
|
8152
8174
|
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() : "";
|
|
8153
8175
|
}
|
|
8154
|
-
|
|
8176
|
+
bi(() => {
|
|
8155
8177
|
s && (s.id = o);
|
|
8156
8178
|
}, [o, s]), B(() => () => {
|
|
8157
8179
|
var u;
|
|
8158
8180
|
(u = s == null ? void 0 : s.destroy) == null || u.call(s);
|
|
8159
8181
|
}, []);
|
|
8160
8182
|
const d = No(s, "characterCount");
|
|
8161
|
-
return s ? /* @__PURE__ */
|
|
8183
|
+
return s ? /* @__PURE__ */ f("div", { className: "reactjs-tiptap-editor", children: [
|
|
8162
8184
|
/* @__PURE__ */ i(
|
|
8163
|
-
|
|
8185
|
+
el,
|
|
8164
8186
|
{
|
|
8165
8187
|
id: o,
|
|
8166
8188
|
children: /* @__PURE__ */ i(
|
|
@@ -8168,9 +8190,9 @@ function cl(t, e) {
|
|
|
8168
8190
|
{
|
|
8169
8191
|
delayDuration: 0,
|
|
8170
8192
|
disableHoverableContent: !0,
|
|
8171
|
-
children: /* @__PURE__ */ i("div", { className: "richtext-overflow-hidden richtext-rounded-[0.5rem] richtext-bg-background richtext-shadow richtext-outline richtext-outline-1", children: /* @__PURE__ */
|
|
8193
|
+
children: /* @__PURE__ */ i("div", { className: "richtext-overflow-hidden richtext-rounded-[0.5rem] richtext-bg-background richtext-shadow richtext-outline richtext-outline-1", children: /* @__PURE__ */ f("div", { className: "richtext-flex richtext-max-h-full richtext-w-full richtext-flex-col", children: [
|
|
8172
8194
|
!(t != null && t.hideToolbar) && /* @__PURE__ */ i(
|
|
8173
|
-
|
|
8195
|
+
vs,
|
|
8174
8196
|
{
|
|
8175
8197
|
disabled: !!(t != null && t.disabled),
|
|
8176
8198
|
editor: s,
|
|
@@ -8178,21 +8200,21 @@ function cl(t, e) {
|
|
|
8178
8200
|
}
|
|
8179
8201
|
),
|
|
8180
8202
|
/* @__PURE__ */ i(
|
|
8181
|
-
|
|
8203
|
+
ki,
|
|
8182
8204
|
{
|
|
8183
8205
|
className: `richtext-relative ${(t == null ? void 0 : t.contentClass) || ""}`,
|
|
8184
8206
|
editor: s
|
|
8185
8207
|
}
|
|
8186
8208
|
),
|
|
8187
8209
|
d && /* @__PURE__ */ i(
|
|
8188
|
-
|
|
8210
|
+
Zs,
|
|
8189
8211
|
{
|
|
8190
8212
|
editor: s,
|
|
8191
8213
|
extensions: n
|
|
8192
8214
|
}
|
|
8193
8215
|
),
|
|
8194
8216
|
!(t != null && t.hideBubble) && /* @__PURE__ */ i(
|
|
8195
|
-
|
|
8217
|
+
gs,
|
|
8196
8218
|
{
|
|
8197
8219
|
bubbleMenu: t == null ? void 0 : t.bubbleMenu,
|
|
8198
8220
|
disabled: t == null ? void 0 : t.disabled,
|
|
@@ -8204,41 +8226,41 @@ function cl(t, e) {
|
|
|
8204
8226
|
)
|
|
8205
8227
|
}
|
|
8206
8228
|
),
|
|
8207
|
-
/* @__PURE__ */ i(
|
|
8229
|
+
/* @__PURE__ */ i(Js, {})
|
|
8208
8230
|
] }) : /* @__PURE__ */ i(V, {});
|
|
8209
8231
|
}
|
|
8210
|
-
const
|
|
8232
|
+
const zl = pi(sl);
|
|
8211
8233
|
export {
|
|
8212
8234
|
St as $,
|
|
8213
8235
|
O as A,
|
|
8214
8236
|
G as B,
|
|
8215
|
-
|
|
8237
|
+
ps as C,
|
|
8216
8238
|
So as D,
|
|
8217
8239
|
bt as E,
|
|
8218
8240
|
ct as F,
|
|
8219
|
-
|
|
8220
|
-
|
|
8221
|
-
|
|
8241
|
+
tt as G,
|
|
8242
|
+
xa as H,
|
|
8243
|
+
Y as I,
|
|
8222
8244
|
Fo as J,
|
|
8223
8245
|
No as K,
|
|
8224
|
-
|
|
8246
|
+
fa as L,
|
|
8225
8247
|
le as M,
|
|
8226
8248
|
Lt as N,
|
|
8227
|
-
|
|
8249
|
+
El as O,
|
|
8228
8250
|
It as P,
|
|
8229
8251
|
oa as Q,
|
|
8230
|
-
|
|
8252
|
+
zl as R,
|
|
8231
8253
|
Br as S,
|
|
8232
8254
|
jr as T,
|
|
8233
8255
|
na as U,
|
|
8234
|
-
|
|
8235
|
-
|
|
8236
|
-
|
|
8237
|
-
|
|
8256
|
+
Qr as V,
|
|
8257
|
+
Ll as W,
|
|
8258
|
+
Al as X,
|
|
8259
|
+
Il as Y,
|
|
8238
8260
|
kt as Z,
|
|
8239
8261
|
Mt as _,
|
|
8240
8262
|
Xr as a,
|
|
8241
|
-
|
|
8263
|
+
ti as a0,
|
|
8242
8264
|
sr as a1,
|
|
8243
8265
|
Ie as a2,
|
|
8244
8266
|
hr as a3,
|
|
@@ -8249,22 +8271,22 @@ export {
|
|
|
8249
8271
|
P as f,
|
|
8250
8272
|
fo as g,
|
|
8251
8273
|
Gt as h,
|
|
8252
|
-
|
|
8274
|
+
ua as i,
|
|
8253
8275
|
Ao as j,
|
|
8254
8276
|
_r as k,
|
|
8255
|
-
|
|
8277
|
+
Sl as l,
|
|
8256
8278
|
Eo as m,
|
|
8257
8279
|
xo as n,
|
|
8258
8280
|
Et as o,
|
|
8259
8281
|
Tt as p,
|
|
8260
8282
|
qr as q,
|
|
8261
|
-
|
|
8283
|
+
Kr as r,
|
|
8262
8284
|
Ko as s,
|
|
8263
|
-
|
|
8285
|
+
Ml as t,
|
|
8264
8286
|
wo as u,
|
|
8265
8287
|
Me as v,
|
|
8266
8288
|
Be as w,
|
|
8267
8289
|
Vt as x,
|
|
8268
|
-
|
|
8290
|
+
Ca as y,
|
|
8269
8291
|
se as z
|
|
8270
8292
|
};
|