reactjs-tiptap-editor 0.2.4 → 0.2.5
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/extension-bundle.cjs +20 -2
- package/lib/extension-bundle.d.cts +37 -37
- package/lib/extension-bundle.d.ts +37 -37
- package/lib/extension-bundle.js +312 -267
- package/lib/index.d.cts +37 -37
- package/lib/index.d.ts +37 -37
- package/lib/locale-bundle.d.cts +37 -37
- package/lib/locale-bundle.d.ts +37 -37
- package/package.json +5 -1
package/lib/extension-bundle.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
var on = Object.defineProperty;
|
|
2
2
|
var rn = (e, t, n) => t in e ? on(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var G = (e, t, n) => rn(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { g as sn, h as cn, U as ln, S as dn, C as un, j as Ne, a as he, k as hn, l as mn, R as $e, F as fn, H as gn, T as _n, o as
|
|
5
|
-
import { P as Q, b as ee, $ as me, a0 as ge, aq as U, at as qn, T as Ot, A as Kn, ar as
|
|
4
|
+
import { g as sn, h as cn, U as ln, S as dn, C as un, j as Ne, a as he, k as hn, l as mn, R as $e, F as fn, H as gn, T as _n, o as H, p as bn, q as pn, r as xn, N as Le, O as wn, s as yn, t as vn, v as kn, L as Cn, w as Tn, m as Se, x as An, y as Nn, z as Ln, P as Sn, A as Mn, G as In, J as Hn, K as zn, M as En, Q as Rn, V as On, W as Dn, X as Pn, Y as zt, Z as Et, _ as Rt, $ as et, I as Bn, a0 as $n, a1 as Fn, a2 as jn, a3 as Un, a4 as Vn } from "./tiptap-DXj1s_xP.js";
|
|
5
|
+
import { P as Q, b as ee, $ as me, a0 as ge, aq as U, at as qn, T as Ot, A as Kn, ar as Dt, ao as Pt, aw as xt, ax as wt, ay as Wn, a4 as Gn, au as Xn, aD as Yn } from "./vendor-DIvoV5tx.js";
|
|
6
6
|
import { jsxs as m, jsx as o, Fragment as _e } from "react/jsx-runtime";
|
|
7
7
|
import * as V from "react";
|
|
8
|
-
import
|
|
8
|
+
import De, { useMemo as E, useState as v, useRef as Y, useCallback as D, Fragment as tt, forwardRef as nt, useImperativeHandle as it, useEffect as R } from "react";
|
|
9
9
|
import { ChevronDown as at, Check as Bt, ChevronUp as Zn, Copy as Jn, CopyCheck as Qn, Clock3 as ei, Laugh as ti, LucideTableProperties as ni, LucideSheet as ii, LucideImage as ai, LucideFile as oi, LucideVideo as ri, LucideAudioLines as si } from "lucide-react";
|
|
10
|
-
import { i as ot, T as Fe, a as je, B as
|
|
11
|
-
import { a1 as
|
|
12
|
-
import { M as Si, D as jt, u as $, j as Mi, k as Ii, n as vt, h as
|
|
10
|
+
import { i as ot, T as Fe, a as je, B as P, b as Ue, g as rt, A as y, D as oe, c as re, d as se, e as ci, f as B, u as st, h as li, I as O, j as we, k as $t, l as Ye, m as di, n as ct, P as ye, o as ve, p as ke, q as lt, C as ui, H as hi, L as mi, r as fi, M as gi, s as _i, t as yt, v as Me, w as dt, x as ut, y as ht, z as mt, E as bi, F as pi, G as xi, J as Pe, K as Be, N as wi, S as yi, O as vi, Q as ki, U as Z, V as Ci, W as Ti, X as Ai, Y as Ni, Z as Li, _ as Ft } from "./RichTextEditor-yL5SRS_H.js";
|
|
11
|
+
import { a1 as us, $ as hs, a2 as ms, a0 as fs, a3 as gs, a4 as _s } from "./RichTextEditor-yL5SRS_H.js";
|
|
12
|
+
import { M as Si, D as jt, u as $, j as Mi, k as Ii, n as vt, h as z, o as Ut, p as Hi, I as kt, g as zi, f as Ct, V as Ei, T as Ie, q as He, r as ze } from "./index-BUxFK1y_.js";
|
|
13
13
|
import * as ce from "@radix-ui/react-tabs";
|
|
14
14
|
import { bundledThemes as Vt, bundledLanguages as qt, createHighlighter as Ri } from "shiki";
|
|
15
15
|
import * as M from "@radix-ui/react-select";
|
|
16
16
|
import { Slot as Oi } from "@radix-ui/react-slot";
|
|
17
17
|
import ft from "tippy.js";
|
|
18
|
-
import
|
|
18
|
+
import Di from "react-image-crop";
|
|
19
19
|
import * as Ze from "@radix-ui/react-checkbox";
|
|
20
20
|
import gt from "scroll-into-view-if-needed";
|
|
21
|
-
import { Packer as
|
|
21
|
+
import { Packer as Pi } from "docx";
|
|
22
22
|
import { DocxSerializer as Bi, defaultNodes as ie, defaultMarks as $i } from "prosemirror-docx";
|
|
23
|
-
const _t =
|
|
23
|
+
const _t = De.forwardRef(
|
|
24
24
|
({ asChild: e, ...t }, n) => {
|
|
25
25
|
var r;
|
|
26
26
|
const i = ot[t.icon];
|
|
27
27
|
return /* @__PURE__ */ m(Fe, { children: [
|
|
28
28
|
/* @__PURE__ */ o(je, { asChild: !0, children: /* @__PURE__ */ o(
|
|
29
|
-
e ? Oi :
|
|
29
|
+
e ? Oi : P,
|
|
30
30
|
{
|
|
31
31
|
className: "richtext-h-[32px] richtext-min-w-24 richtext-overflow-hidden richtext-px-[5px] richtext-py-0",
|
|
32
32
|
disabled: t == null ? void 0 : t.disabled,
|
|
@@ -45,7 +45,7 @@ const _t = Pe.forwardRef(
|
|
|
45
45
|
] }) })
|
|
46
46
|
] });
|
|
47
47
|
}
|
|
48
|
-
),
|
|
48
|
+
), Lr = sn.extend({
|
|
49
49
|
addOptions() {
|
|
50
50
|
var e;
|
|
51
51
|
return {
|
|
@@ -63,7 +63,7 @@ const _t = Pe.forwardRef(
|
|
|
63
63
|
})
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
|
-
}),
|
|
66
|
+
}), Sr = cn.extend({
|
|
67
67
|
addOptions() {
|
|
68
68
|
var e;
|
|
69
69
|
return {
|
|
@@ -83,7 +83,7 @@ const _t = Pe.forwardRef(
|
|
|
83
83
|
}
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
|
-
}),
|
|
86
|
+
}), Mr = ln.extend({
|
|
87
87
|
addOptions() {
|
|
88
88
|
var e;
|
|
89
89
|
return {
|
|
@@ -103,7 +103,7 @@ const _t = Pe.forwardRef(
|
|
|
103
103
|
}
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
|
-
}),
|
|
106
|
+
}), Ir = dn.extend({
|
|
107
107
|
addOptions() {
|
|
108
108
|
var e;
|
|
109
109
|
return {
|
|
@@ -121,7 +121,7 @@ const _t = Pe.forwardRef(
|
|
|
121
121
|
})
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
|
-
}),
|
|
124
|
+
}), Hr = un.extend({
|
|
125
125
|
addOptions() {
|
|
126
126
|
var e;
|
|
127
127
|
return {
|
|
@@ -202,10 +202,10 @@ function Tt({
|
|
|
202
202
|
});
|
|
203
203
|
for (const f of h) {
|
|
204
204
|
for (const b of f) {
|
|
205
|
-
const
|
|
205
|
+
const p = c + b.content.length, N = ge.inline(c, p, {
|
|
206
206
|
style: `color: ${b.color}`
|
|
207
207
|
});
|
|
208
|
-
a.push(N), c =
|
|
208
|
+
a.push(N), c = p;
|
|
209
209
|
}
|
|
210
210
|
c += 1;
|
|
211
211
|
}
|
|
@@ -436,7 +436,7 @@ function oa({ editor: e, node: { attrs: t }, updateAttributes: n, extension: i }
|
|
|
436
436
|
const { isCopied: a, copyToClipboard: r } = Yi(), s = E(() => {
|
|
437
437
|
var b;
|
|
438
438
|
return (b = i.options.languages) != null && b.length ? i.options.languages : jt;
|
|
439
|
-
}, [i.options.languages]), c = st(), l = (f = (h = e == null ? void 0 : e.options) == null ? void 0 : h.editorProps) == null ? void 0 : f.print, { language: u } = t, d = Y(null), g =
|
|
439
|
+
}, [i.options.languages]), c = st(), l = (f = (h = e == null ? void 0 : e.options) == null ? void 0 : h.editorProps) == null ? void 0 : f.print, { language: u } = t, d = Y(null), g = D(() => li(ra.name, e), [e]);
|
|
440
440
|
return /* @__PURE__ */ m(he, { className: U(J.wrap, !l && J.maxHeight, "render-wrapper"), children: [
|
|
441
441
|
/* @__PURE__ */ m(
|
|
442
442
|
"div",
|
|
@@ -476,13 +476,13 @@ function oa({ editor: e, node: { attrs: t }, updateAttributes: n, extension: i }
|
|
|
476
476
|
/* @__PURE__ */ o(Gt, { children: /* @__PURE__ */ o(Wi, { placeholder: "Language" }) }),
|
|
477
477
|
/* @__PURE__ */ m(Zt, { className: "richtext-max-h-60 richtext-overflow-y-auto", children: [
|
|
478
478
|
/* @__PURE__ */ o(Je, { value: "auto", children: "Auto" }),
|
|
479
|
-
s.map((b,
|
|
479
|
+
s.map((b, p) => /* @__PURE__ */ o(
|
|
480
480
|
Je,
|
|
481
481
|
{
|
|
482
482
|
value: b,
|
|
483
483
|
children: b.charAt(0).toUpperCase() + b.slice(1)
|
|
484
484
|
},
|
|
485
|
-
`code-lang-${
|
|
485
|
+
`code-lang-${p}`
|
|
486
486
|
))
|
|
487
487
|
] })
|
|
488
488
|
]
|
|
@@ -589,7 +589,7 @@ function sa(e) {
|
|
|
589
589
|
}) })
|
|
590
590
|
] });
|
|
591
591
|
}
|
|
592
|
-
const
|
|
592
|
+
const zr = fn.extend({
|
|
593
593
|
addOptions() {
|
|
594
594
|
var e;
|
|
595
595
|
return {
|
|
@@ -678,7 +678,7 @@ function ca(e) {
|
|
|
678
678
|
}) })
|
|
679
679
|
] });
|
|
680
680
|
}
|
|
681
|
-
const
|
|
681
|
+
const Er = gn.extend({
|
|
682
682
|
addOptions() {
|
|
683
683
|
var e;
|
|
684
684
|
return {
|
|
@@ -741,7 +741,7 @@ const be = V.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ o(
|
|
|
741
741
|
}
|
|
742
742
|
));
|
|
743
743
|
be.displayName = ce.Trigger.displayName;
|
|
744
|
-
const
|
|
744
|
+
const pe = V.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ o(
|
|
745
745
|
ce.Content,
|
|
746
746
|
{
|
|
747
747
|
ref: n,
|
|
@@ -752,7 +752,7 @@ const xe = V.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ o(
|
|
|
752
752
|
...t
|
|
753
753
|
}
|
|
754
754
|
));
|
|
755
|
-
|
|
755
|
+
pe.displayName = ce.Content.displayName;
|
|
756
756
|
const Jt = V.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ o(
|
|
757
757
|
Ze.Root,
|
|
758
758
|
{
|
|
@@ -840,7 +840,7 @@ function la(e) {
|
|
|
840
840
|
)
|
|
841
841
|
] });
|
|
842
842
|
}
|
|
843
|
-
const
|
|
843
|
+
const Rr = _n.extend({
|
|
844
844
|
addOptions() {
|
|
845
845
|
var e;
|
|
846
846
|
return {
|
|
@@ -870,8 +870,8 @@ const Hr = _n.extend({
|
|
|
870
870
|
shortcutKeys: r[d],
|
|
871
871
|
isActive: () => t.isActive({ textAlign: d }) || !1,
|
|
872
872
|
action: () => {
|
|
873
|
-
var b,
|
|
874
|
-
return (
|
|
873
|
+
var b, p;
|
|
874
|
+
return (p = (b = t.commands) == null ? void 0 : b.setTextAlign) == null ? void 0 : p.call(b, d);
|
|
875
875
|
},
|
|
876
876
|
disabled: !((f = (h = (g = t == null ? void 0 : t.can) == null ? void 0 : g.call(t)) == null ? void 0 : h.setTextAlign) != null && f.call(h, d))
|
|
877
877
|
};
|
|
@@ -926,7 +926,7 @@ function da(e) {
|
|
|
926
926
|
)) })
|
|
927
927
|
] });
|
|
928
928
|
}
|
|
929
|
-
const
|
|
929
|
+
const Or = H.create({
|
|
930
930
|
name: "fontSize",
|
|
931
931
|
addOptions() {
|
|
932
932
|
var e;
|
|
@@ -1040,7 +1040,7 @@ function ha(e) {
|
|
|
1040
1040
|
var s;
|
|
1041
1041
|
(s = e.action) == null || s.call(e, t);
|
|
1042
1042
|
}
|
|
1043
|
-
const r =
|
|
1043
|
+
const r = D(
|
|
1044
1044
|
qn((s) => {
|
|
1045
1045
|
n(s);
|
|
1046
1046
|
}, 350),
|
|
@@ -1057,12 +1057,12 @@ function ha(e) {
|
|
|
1057
1057
|
disabled: e == null ? void 0 : e.disabled,
|
|
1058
1058
|
colors: e == null ? void 0 : e.colors,
|
|
1059
1059
|
defaultColor: e == null ? void 0 : e.defaultColor,
|
|
1060
|
-
children: /* @__PURE__ */ o(
|
|
1060
|
+
children: /* @__PURE__ */ o(P, { variant: "ghost", size: "icon", className: "r!ichtext-h-[32px] !richtext-w-3", disabled: e == null ? void 0 : e.disabled, children: /* @__PURE__ */ o(O, { className: "!richtext-w-3 !richtext-h-3 richtext-text-zinc-500", name: "MenuDown" }) })
|
|
1061
1061
|
}
|
|
1062
1062
|
)
|
|
1063
1063
|
] });
|
|
1064
1064
|
}
|
|
1065
|
-
const
|
|
1065
|
+
const Dr = bn.extend({
|
|
1066
1066
|
addOptions() {
|
|
1067
1067
|
var e;
|
|
1068
1068
|
return {
|
|
@@ -1088,7 +1088,7 @@ const Rr = bn.extend({
|
|
|
1088
1088
|
}
|
|
1089
1089
|
};
|
|
1090
1090
|
}
|
|
1091
|
-
}),
|
|
1091
|
+
}), Pr = pn.extend({
|
|
1092
1092
|
addOptions() {
|
|
1093
1093
|
var e;
|
|
1094
1094
|
return {
|
|
@@ -1109,7 +1109,7 @@ const Rr = bn.extend({
|
|
|
1109
1109
|
})
|
|
1110
1110
|
};
|
|
1111
1111
|
}
|
|
1112
|
-
}),
|
|
1112
|
+
}), Br = xn.extend({
|
|
1113
1113
|
addOptions() {
|
|
1114
1114
|
var e;
|
|
1115
1115
|
return {
|
|
@@ -1127,7 +1127,7 @@ const Rr = bn.extend({
|
|
|
1127
1127
|
})
|
|
1128
1128
|
};
|
|
1129
1129
|
}
|
|
1130
|
-
}),
|
|
1130
|
+
}), $r = Le.create({
|
|
1131
1131
|
name: "clear",
|
|
1132
1132
|
addOptions() {
|
|
1133
1133
|
var e;
|
|
@@ -1144,7 +1144,7 @@ const Rr = bn.extend({
|
|
|
1144
1144
|
})
|
|
1145
1145
|
};
|
|
1146
1146
|
}
|
|
1147
|
-
}),
|
|
1147
|
+
}), Fr = wn.extend({
|
|
1148
1148
|
addOptions() {
|
|
1149
1149
|
var e;
|
|
1150
1150
|
return {
|
|
@@ -1162,7 +1162,7 @@ const Rr = bn.extend({
|
|
|
1162
1162
|
})
|
|
1163
1163
|
};
|
|
1164
1164
|
}
|
|
1165
|
-
}),
|
|
1165
|
+
}), jr = yn.extend({
|
|
1166
1166
|
addOptions() {
|
|
1167
1167
|
var e;
|
|
1168
1168
|
return {
|
|
@@ -1191,7 +1191,7 @@ const Rr = bn.extend({
|
|
|
1191
1191
|
addExtensions() {
|
|
1192
1192
|
return [vn.configure(this.options.taskItem)];
|
|
1193
1193
|
}
|
|
1194
|
-
}),
|
|
1194
|
+
}), Ur = kn.extend({
|
|
1195
1195
|
addOptions() {
|
|
1196
1196
|
var e;
|
|
1197
1197
|
return {
|
|
@@ -1231,7 +1231,7 @@ function ma(e) {
|
|
|
1231
1231
|
/* @__PURE__ */ o(ke, { hideWhenDetached: !0, className: "richtext-w-full", align: "start", side: "bottom", children: /* @__PURE__ */ o(mi, { editor: e.editor, onSetLink: i }) })
|
|
1232
1232
|
] });
|
|
1233
1233
|
}
|
|
1234
|
-
const
|
|
1234
|
+
const Vr = Cn.extend({
|
|
1235
1235
|
inclusive: !1,
|
|
1236
1236
|
parseHTML() {
|
|
1237
1237
|
return [
|
|
@@ -1298,7 +1298,7 @@ const jr = Cn.extend({
|
|
|
1298
1298
|
})
|
|
1299
1299
|
];
|
|
1300
1300
|
}
|
|
1301
|
-
}),
|
|
1301
|
+
}), qr = An.extend({
|
|
1302
1302
|
renderHTML() {
|
|
1303
1303
|
return [
|
|
1304
1304
|
"div",
|
|
@@ -1366,7 +1366,7 @@ function fa(e) {
|
|
|
1366
1366
|
] }) })
|
|
1367
1367
|
] });
|
|
1368
1368
|
}
|
|
1369
|
-
const ga = ["undo", "redo"],
|
|
1369
|
+
const ga = ["undo", "redo"], Kr = Nn.extend({
|
|
1370
1370
|
addOptions() {
|
|
1371
1371
|
var e;
|
|
1372
1372
|
return {
|
|
@@ -1391,7 +1391,7 @@ const ga = ["undo", "redo"], Vr = Nn.extend({
|
|
|
1391
1391
|
}), _a = Ln.extend({
|
|
1392
1392
|
content: "(block|columns)+"
|
|
1393
1393
|
// echo editor is a block editor
|
|
1394
|
-
}),
|
|
1394
|
+
}), Wr = H.create({
|
|
1395
1395
|
name: "columnActionButton",
|
|
1396
1396
|
addOptions() {
|
|
1397
1397
|
var e;
|
|
@@ -1409,7 +1409,7 @@ const ga = ["undo", "redo"], Vr = Nn.extend({
|
|
|
1409
1409
|
})
|
|
1410
1410
|
};
|
|
1411
1411
|
}
|
|
1412
|
-
}), ba =
|
|
1412
|
+
}), ba = H.create({
|
|
1413
1413
|
name: "selection",
|
|
1414
1414
|
addProseMirrorPlugins() {
|
|
1415
1415
|
const { editor: e } = this;
|
|
@@ -1429,7 +1429,7 @@ const ga = ["undo", "redo"], Vr = Nn.extend({
|
|
|
1429
1429
|
];
|
|
1430
1430
|
}
|
|
1431
1431
|
});
|
|
1432
|
-
function
|
|
1432
|
+
function pa(e) {
|
|
1433
1433
|
const { t } = $(), n = E(() => [
|
|
1434
1434
|
{
|
|
1435
1435
|
name: "paragraph",
|
|
@@ -1499,7 +1499,7 @@ function xa(e) {
|
|
|
1499
1499
|
}, [n]);
|
|
1500
1500
|
return /* @__PURE__ */ m(oe, { children: [
|
|
1501
1501
|
/* @__PURE__ */ o(re, { asChild: !0, children: /* @__PURE__ */ m(
|
|
1502
|
-
|
|
1502
|
+
P,
|
|
1503
1503
|
{
|
|
1504
1504
|
className: "richtext-flex richtext-h-[32px] richtext-gap-1 richtext-px-1.5",
|
|
1505
1505
|
variant: "ghost",
|
|
@@ -1543,7 +1543,7 @@ function xa(e) {
|
|
|
1543
1543
|
)
|
|
1544
1544
|
] });
|
|
1545
1545
|
}
|
|
1546
|
-
const
|
|
1546
|
+
const xa = H.create({
|
|
1547
1547
|
name: "text-bubble",
|
|
1548
1548
|
addOptions() {
|
|
1549
1549
|
var e;
|
|
@@ -1551,7 +1551,7 @@ const pa = z.create({
|
|
|
1551
1551
|
...(e = this.parent) == null ? void 0 : e.call(this),
|
|
1552
1552
|
toolbar: !1,
|
|
1553
1553
|
button: () => ({
|
|
1554
|
-
component:
|
|
1554
|
+
component: pa,
|
|
1555
1555
|
componentProps: {}
|
|
1556
1556
|
})
|
|
1557
1557
|
};
|
|
@@ -1560,7 +1560,7 @@ const pa = z.create({
|
|
|
1560
1560
|
function At({ types: e, node: t }) {
|
|
1561
1561
|
return Array.isArray(e) && e.includes(t.type) || t.type === e;
|
|
1562
1562
|
}
|
|
1563
|
-
const wa =
|
|
1563
|
+
const wa = H.create({
|
|
1564
1564
|
name: "trailingNode",
|
|
1565
1565
|
addOptions() {
|
|
1566
1566
|
return {
|
|
@@ -1593,7 +1593,7 @@ const wa = z.create({
|
|
|
1593
1593
|
})
|
|
1594
1594
|
];
|
|
1595
1595
|
}
|
|
1596
|
-
}),
|
|
1596
|
+
}), Gr = H.create({
|
|
1597
1597
|
name: "base-kit",
|
|
1598
1598
|
addExtensions() {
|
|
1599
1599
|
const e = [];
|
|
@@ -1601,7 +1601,7 @@ const wa = z.create({
|
|
|
1601
1601
|
Sn.configure({
|
|
1602
1602
|
placeholder: ({ node: t, pos: n, editor: i }) => {
|
|
1603
1603
|
var a, r, s, c, l;
|
|
1604
|
-
return ((a = t == null ? void 0 : t.type) == null ? void 0 : a.name) === "columns" || ((r = t == null ? void 0 : t.content) == null ? void 0 : r.size) !== 0 ? "" : ((s = t == null ? void 0 : t.type) == null ? void 0 : s.name) === "heading" ? `${
|
|
1604
|
+
return ((a = t == null ? void 0 : t.type) == null ? void 0 : a.name) === "columns" || ((r = t == null ? void 0 : t.content) == null ? void 0 : r.size) !== 0 ? "" : ((s = t == null ? void 0 : t.type) == null ? void 0 : s.name) === "heading" ? `${z.t(`editor.heading.h${t.attrs.level}.tooltip`)}` : ((c = t == null ? void 0 : t.type) == null ? void 0 : c.name) === "codeBlock" || ((l = t == null ? void 0 : t.type) == null ? void 0 : l.name) === "table" ? "" : i.extensionManager.extensions.some((u) => u.name === "slashCommand") ? z.t("editor.slash") : n === 0 ? z.t("editor.content") : z.t("editor.content");
|
|
1605
1605
|
},
|
|
1606
1606
|
...this.options.placeholder
|
|
1607
1607
|
})
|
|
@@ -1610,15 +1610,15 @@ const wa = z.create({
|
|
|
1610
1610
|
className: "focus",
|
|
1611
1611
|
...this.options.focus
|
|
1612
1612
|
})
|
|
1613
|
-
), this.options.text !== !1 && e.push(In.configure()), this.options.textBubble !== !1 && e.push(
|
|
1614
|
-
|
|
1613
|
+
), this.options.text !== !1 && e.push(In.configure()), this.options.textBubble !== !1 && e.push(xa.configure()), this.options.gapcursor !== !1 && e.push(Hn.configure()), this.options.dropcursor !== !1 && e.push(
|
|
1614
|
+
zn.configure({
|
|
1615
1615
|
...this.options.dropcursor,
|
|
1616
1616
|
width: 2,
|
|
1617
1617
|
class: "ProseMirror-dropcursor border-black"
|
|
1618
1618
|
})
|
|
1619
|
-
), this.options.characterCount !== !1 && e.push(En.configure(this.options.characterCount)), this.options.paragraph !== !1 && e.push(Rn.configure(this.options.paragraph)), this.options.hardBreak !== !1 && e.push(On.configure(this.options.hardBreak)), this.options.listItem !== !1 && e.push(
|
|
1619
|
+
), this.options.characterCount !== !1 && e.push(En.configure(this.options.characterCount)), this.options.paragraph !== !1 && e.push(Rn.configure(this.options.paragraph)), this.options.hardBreak !== !1 && e.push(On.configure(this.options.hardBreak)), this.options.listItem !== !1 && e.push(Dn.configure(this.options.listItem)), this.options.textStyle !== !1 && e.push(Pn.configure(this.options.textStyle)), this.options.trailingNode !== !1 && e.push(wa.configure(this.options.trailingNode)), this.options.selection !== !1 && e.push(ba), this.options.multiColumn !== !1 && e.push(fi, gi), e;
|
|
1620
1620
|
}
|
|
1621
|
-
}),
|
|
1621
|
+
}), Xr = H.create({
|
|
1622
1622
|
name: "subAndSuperScript",
|
|
1623
1623
|
addOptions() {
|
|
1624
1624
|
var e;
|
|
@@ -1650,7 +1650,7 @@ const wa = z.create({
|
|
|
1650
1650
|
},
|
|
1651
1651
|
addExtensions() {
|
|
1652
1652
|
const e = [];
|
|
1653
|
-
return this.options.subscript !== !1 && e.push(
|
|
1653
|
+
return this.options.subscript !== !1 && e.push(zt.configure(this.options.subscript)), this.options.superscript !== !1 && e.push(Et.configure(this.options.superscript)), e;
|
|
1654
1654
|
}
|
|
1655
1655
|
});
|
|
1656
1656
|
function ya(e) {
|
|
@@ -1701,7 +1701,7 @@ function ya(e) {
|
|
|
1701
1701
|
)) })
|
|
1702
1702
|
] });
|
|
1703
1703
|
}
|
|
1704
|
-
const
|
|
1704
|
+
const Yr = H.create({
|
|
1705
1705
|
name: "moreMark",
|
|
1706
1706
|
addOptions() {
|
|
1707
1707
|
var e;
|
|
@@ -1737,9 +1737,9 @@ const Gr = z.create({
|
|
|
1737
1737
|
},
|
|
1738
1738
|
addExtensions() {
|
|
1739
1739
|
const e = [];
|
|
1740
|
-
return this.options.subscript !== !1 && e.push(
|
|
1740
|
+
return this.options.subscript !== !1 && e.push(zt.configure(this.options.subscript)), this.options.superscript !== !1 && e.push(Et.configure(this.options.superscript)), e;
|
|
1741
1741
|
}
|
|
1742
|
-
}),
|
|
1742
|
+
}), Zr = H.create({
|
|
1743
1743
|
name: "indent",
|
|
1744
1744
|
addOptions() {
|
|
1745
1745
|
var e;
|
|
@@ -1899,14 +1899,14 @@ function Aa(e) {
|
|
|
1899
1899
|
return a = a.setSelection(i), a = Ta(a, e), a.docChanged ? (n && n(a), !0) : !1;
|
|
1900
1900
|
};
|
|
1901
1901
|
}
|
|
1902
|
-
const
|
|
1902
|
+
const Jr = H.create({
|
|
1903
1903
|
name: "lineHeight",
|
|
1904
1904
|
addOptions() {
|
|
1905
1905
|
var e;
|
|
1906
1906
|
return {
|
|
1907
1907
|
...(e = this.parent) == null ? void 0 : e.call(this),
|
|
1908
1908
|
types: ["paragraph", "heading", "list_item", "todo_item"],
|
|
1909
|
-
lineHeights:
|
|
1909
|
+
lineHeights: Hi,
|
|
1910
1910
|
defaultHeight: Ut,
|
|
1911
1911
|
button({ editor: t, t: n }) {
|
|
1912
1912
|
return {
|
|
@@ -1939,17 +1939,17 @@ const Yr = z.create({
|
|
|
1939
1939
|
unsetLineHeight: () => ({ commands: e }) => this.options.types.every((t) => e.resetAttributes(t, "lineHeight"))
|
|
1940
1940
|
};
|
|
1941
1941
|
}
|
|
1942
|
-
}), Qt =
|
|
1942
|
+
}), Qt = Pt(!1);
|
|
1943
1943
|
function Na() {
|
|
1944
|
-
return
|
|
1944
|
+
return Dt(Qt);
|
|
1945
1945
|
}
|
|
1946
1946
|
const ue = {
|
|
1947
1947
|
setOpen: (e) => {
|
|
1948
1948
|
Qt(e);
|
|
1949
1949
|
}
|
|
1950
|
-
}, en =
|
|
1950
|
+
}, en = Pt(!1);
|
|
1951
1951
|
function La() {
|
|
1952
|
-
return
|
|
1952
|
+
return Dt(en);
|
|
1953
1953
|
}
|
|
1954
1954
|
const Ae = {
|
|
1955
1955
|
setOpen: (e) => {
|
|
@@ -1960,12 +1960,12 @@ function Sa(e) {
|
|
|
1960
1960
|
const t = [
|
|
1961
1961
|
{
|
|
1962
1962
|
name: "format",
|
|
1963
|
-
title:
|
|
1963
|
+
title: z.t("editor.slash.format"),
|
|
1964
1964
|
commands: []
|
|
1965
1965
|
},
|
|
1966
1966
|
{
|
|
1967
1967
|
name: "insert",
|
|
1968
|
-
title:
|
|
1968
|
+
title: z.t("editor.slash.insert"),
|
|
1969
1969
|
commands: []
|
|
1970
1970
|
}
|
|
1971
1971
|
];
|
|
@@ -1973,7 +1973,7 @@ function Sa(e) {
|
|
|
1973
1973
|
n.name.toLowerCase() === "heading" && n.options.levels.forEach((i) => {
|
|
1974
1974
|
t[0].commands.push({
|
|
1975
1975
|
name: `heading${i}`,
|
|
1976
|
-
label:
|
|
1976
|
+
label: z.t(`editor.heading.h${i}.tooltip`),
|
|
1977
1977
|
aliases: [`h${i}`, "bt", `bt${i}`],
|
|
1978
1978
|
iconName: `Heading${i}`,
|
|
1979
1979
|
action: ({ editor: a, range: r }) => {
|
|
@@ -1982,7 +1982,7 @@ function Sa(e) {
|
|
|
1982
1982
|
});
|
|
1983
1983
|
}), n.name.toLowerCase() === "bulletlist" && t[0].commands.push({
|
|
1984
1984
|
name: "bulletList",
|
|
1985
|
-
label:
|
|
1985
|
+
label: z.t("editor.bulletlist.tooltip"),
|
|
1986
1986
|
aliases: ["ul", "yxlb"],
|
|
1987
1987
|
iconName: "List",
|
|
1988
1988
|
action: ({ editor: i, range: a }) => {
|
|
@@ -1990,7 +1990,7 @@ function Sa(e) {
|
|
|
1990
1990
|
}
|
|
1991
1991
|
}), n.name.toLowerCase() === "orderedlist" && t[0].commands.push({
|
|
1992
1992
|
name: "numberedList",
|
|
1993
|
-
label:
|
|
1993
|
+
label: z.t("editor.orderedlist.tooltip"),
|
|
1994
1994
|
aliases: ["ol", "yxlb"],
|
|
1995
1995
|
iconName: "ListOrdered",
|
|
1996
1996
|
action: ({ editor: i, range: a }) => {
|
|
@@ -1998,7 +1998,7 @@ function Sa(e) {
|
|
|
1998
1998
|
}
|
|
1999
1999
|
}), n.name.toLowerCase() === "tasklist" && t[0].commands.push({
|
|
2000
2000
|
name: "taskList",
|
|
2001
|
-
label:
|
|
2001
|
+
label: z.t("editor.tasklist.tooltip"),
|
|
2002
2002
|
iconName: "ListTodo",
|
|
2003
2003
|
description: "Task list with todo items",
|
|
2004
2004
|
aliases: ["todo"],
|
|
@@ -2007,7 +2007,7 @@ function Sa(e) {
|
|
|
2007
2007
|
}
|
|
2008
2008
|
}), n.name.toLowerCase() === "blockquote" && t[0].commands.push({
|
|
2009
2009
|
name: "blockquote",
|
|
2010
|
-
label:
|
|
2010
|
+
label: z.t("editor.blockquote.tooltip"),
|
|
2011
2011
|
description: "插入引入格式",
|
|
2012
2012
|
aliases: ["yr"],
|
|
2013
2013
|
iconName: "TextQuote",
|
|
@@ -2016,7 +2016,7 @@ function Sa(e) {
|
|
|
2016
2016
|
}
|
|
2017
2017
|
}), n.name.toLowerCase() === "codeblock" && t[0].commands.push({
|
|
2018
2018
|
name: "codeBlock",
|
|
2019
|
-
label:
|
|
2019
|
+
label: z.t("editor.codeblock.tooltip"),
|
|
2020
2020
|
iconName: "Code2",
|
|
2021
2021
|
description: "Code block with syntax highlighting",
|
|
2022
2022
|
shouldBeHidden: (i) => i.isActive("columns"),
|
|
@@ -2025,7 +2025,7 @@ function Sa(e) {
|
|
|
2025
2025
|
}
|
|
2026
2026
|
}), n.name.toLowerCase() === "image" && t[1].commands.push({
|
|
2027
2027
|
name: "image",
|
|
2028
|
-
label:
|
|
2028
|
+
label: z.t("editor.image.tooltip"),
|
|
2029
2029
|
iconName: "ImageUp",
|
|
2030
2030
|
description: "Insert a image",
|
|
2031
2031
|
aliases: ["image", "tp", "tupian"],
|
|
@@ -2035,7 +2035,7 @@ function Sa(e) {
|
|
|
2035
2035
|
}
|
|
2036
2036
|
}), n.name.toLowerCase() === "video" && t[1].commands.push({
|
|
2037
2037
|
name: "video",
|
|
2038
|
-
label:
|
|
2038
|
+
label: z.t("editor.video.tooltip"),
|
|
2039
2039
|
iconName: "Video",
|
|
2040
2040
|
description: "Insert a video",
|
|
2041
2041
|
aliases: ["video", "sp", "shipin"],
|
|
@@ -2045,7 +2045,7 @@ function Sa(e) {
|
|
|
2045
2045
|
}
|
|
2046
2046
|
}), n.name.toLowerCase() === "table" && t[1].commands.push({
|
|
2047
2047
|
name: "table",
|
|
2048
|
-
label:
|
|
2048
|
+
label: z.t("editor.table.tooltip"),
|
|
2049
2049
|
iconName: "Table",
|
|
2050
2050
|
description: "Insert a table",
|
|
2051
2051
|
aliases: ["table", "bg", "biaoge", "biao"],
|
|
@@ -2055,7 +2055,7 @@ function Sa(e) {
|
|
|
2055
2055
|
}
|
|
2056
2056
|
}), n.name.toLowerCase() === "horizontalrule" && t[1].commands.push({
|
|
2057
2057
|
name: "horizontalRule",
|
|
2058
|
-
label:
|
|
2058
|
+
label: z.t("editor.horizontalrule.tooltip"),
|
|
2059
2059
|
iconName: "Minus",
|
|
2060
2060
|
description: "Insert a horizontal divider",
|
|
2061
2061
|
aliases: ["hr", "fgx", "fg"],
|
|
@@ -2064,7 +2064,7 @@ function Sa(e) {
|
|
|
2064
2064
|
}
|
|
2065
2065
|
}), n.name.toLowerCase() === "columns" && t[1].commands.push({
|
|
2066
2066
|
name: "columns",
|
|
2067
|
-
label:
|
|
2067
|
+
label: z.t("editor.columns.tooltip"),
|
|
2068
2068
|
iconName: "Columns2",
|
|
2069
2069
|
description: "Add two column content",
|
|
2070
2070
|
action: ({ editor: i }) => {
|
|
@@ -2091,18 +2091,18 @@ function Ma(e, t) {
|
|
|
2091
2091
|
return w.key === "ArrowUp" ? (d(), !0) : w.key === "ArrowDown" ? (g(), !0) : w.key === "Enter" ? (h(), !0) : !1;
|
|
2092
2092
|
}
|
|
2093
2093
|
function d() {
|
|
2094
|
-
var
|
|
2094
|
+
var x;
|
|
2095
2095
|
if (e.items.length === 0)
|
|
2096
2096
|
return !1;
|
|
2097
2097
|
let w = n - 1, _ = a;
|
|
2098
|
-
w < 0 && (_ = a - 1, w = ((
|
|
2098
|
+
w < 0 && (_ = a - 1, w = ((x = e.items[_]) == null ? void 0 : x.commands.length) - 1 || 0), _ < 0 && (_ = e.items.length - 1, w = e.items[_].commands.length - 1), i(w), r(_);
|
|
2099
2099
|
}
|
|
2100
2100
|
function g() {
|
|
2101
2101
|
if (e.items.length === 0)
|
|
2102
2102
|
return !1;
|
|
2103
2103
|
const w = e.items[a].commands;
|
|
2104
|
-
let _ = n + 1,
|
|
2105
|
-
w.length - 1 < _ && (_ = 0,
|
|
2104
|
+
let _ = n + 1, x = a;
|
|
2105
|
+
w.length - 1 < _ && (_ = 0, x = a + 1), e.items.length - 1 < x && (x = 0), i(_), r(x);
|
|
2106
2106
|
}
|
|
2107
2107
|
function h() {
|
|
2108
2108
|
if (e.items.length === 0 || a === -1 || n === -1)
|
|
@@ -2110,14 +2110,14 @@ function Ma(e, t) {
|
|
|
2110
2110
|
f(a, n);
|
|
2111
2111
|
}
|
|
2112
2112
|
function f(w, _) {
|
|
2113
|
-
const
|
|
2114
|
-
e.command(
|
|
2113
|
+
const x = e.items[w].commands[_];
|
|
2114
|
+
e.command(x);
|
|
2115
2115
|
}
|
|
2116
2116
|
function b(w, _) {
|
|
2117
2117
|
f(w, _);
|
|
2118
2118
|
}
|
|
2119
|
-
function
|
|
2120
|
-
l.current[w * 1e3 + _] =
|
|
2119
|
+
function p(w, _, x) {
|
|
2120
|
+
l.current[w * 1e3 + _] = x;
|
|
2121
2121
|
}
|
|
2122
2122
|
return /* @__PURE__ */ o(
|
|
2123
2123
|
"div",
|
|
@@ -2126,31 +2126,31 @@ function Ma(e, t) {
|
|
|
2126
2126
|
ref: s,
|
|
2127
2127
|
children: (N = e == null ? void 0 : e.items) != null && N.length ? /* @__PURE__ */ o("div", { className: "richtext-grid richtext-min-w-48 richtext-grid-cols-1 richtext-gap-0.5", children: (I = e == null ? void 0 : e.items) == null ? void 0 : I.map((w, _) => /* @__PURE__ */ m(tt, { children: [
|
|
2128
2128
|
/* @__PURE__ */ o("div", { className: "richtext-col-[1/-1] richtext-mx-2 richtext-mt-2 richtext-select-none richtext-text-[0.65rem] richtext-font-semibold richtext-uppercase richtext-tracking-wider !richtext-text-neutral-500 first:richtext-mt-0.5", children: w.title }),
|
|
2129
|
-
w.commands.map((
|
|
2129
|
+
w.commands.map((x, C) => /* @__PURE__ */ m(
|
|
2130
2130
|
"button",
|
|
2131
2131
|
{
|
|
2132
2132
|
onClick: () => b(_, C),
|
|
2133
|
-
ref: (T) =>
|
|
2133
|
+
ref: (T) => p(_, C, T),
|
|
2134
2134
|
className: B("richtext-flex richtext-items-center richtext-gap-3 richtext-px-2 richtext-py-1.5 richtext-text-sm !richtext-text-neutral-800 dark:!richtext-text-neutral-200 richtext-text-left richtext-w-full richtext-rounded-sm richtext-outline-none richtext-transition-colors !richtext-bg-transparent hover:!richtext-bg-accent ", {
|
|
2135
2135
|
"slash-command-active": a === _ && n === C
|
|
2136
2136
|
}),
|
|
2137
2137
|
children: [
|
|
2138
|
-
|
|
2138
|
+
x.iconUrl && /* @__PURE__ */ o(
|
|
2139
2139
|
"img",
|
|
2140
2140
|
{
|
|
2141
2141
|
alt: "",
|
|
2142
2142
|
className: "richtext-size-6",
|
|
2143
|
-
src:
|
|
2143
|
+
src: x.iconUrl
|
|
2144
2144
|
}
|
|
2145
2145
|
),
|
|
2146
|
-
|
|
2146
|
+
x.iconName && /* @__PURE__ */ o(
|
|
2147
2147
|
O,
|
|
2148
2148
|
{
|
|
2149
2149
|
className: "!richtext-mr-1 !richtext-text-lg",
|
|
2150
|
-
name:
|
|
2150
|
+
name: x.iconName
|
|
2151
2151
|
}
|
|
2152
2152
|
),
|
|
2153
|
-
|
|
2153
|
+
x.label
|
|
2154
2154
|
]
|
|
2155
2155
|
},
|
|
2156
2156
|
`command-${C}`
|
|
@@ -2161,7 +2161,7 @@ function Ma(e, t) {
|
|
|
2161
2161
|
}
|
|
2162
2162
|
const Ia = nt(Ma), ae = "slashCommand";
|
|
2163
2163
|
let A;
|
|
2164
|
-
const
|
|
2164
|
+
const Qr = H.create({
|
|
2165
2165
|
name: ae,
|
|
2166
2166
|
priority: 200,
|
|
2167
2167
|
onCreate() {
|
|
@@ -2307,39 +2307,39 @@ const Zr = z.create({
|
|
|
2307
2307
|
};
|
|
2308
2308
|
}
|
|
2309
2309
|
});
|
|
2310
|
-
function
|
|
2311
|
-
const { t: i } = $(), [a, r] = v(!1), s =
|
|
2310
|
+
function Ha({ editor: e, imageInline: t, onClose: n }) {
|
|
2311
|
+
const { t: i } = $(), [a, r] = v(!1), s = De.useRef(null), [c, l] = De.useState(), [u, d] = De.useState(""), g = Y(null), [h, f] = v({
|
|
2312
2312
|
src: "",
|
|
2313
2313
|
file: null
|
|
2314
2314
|
});
|
|
2315
2315
|
function b(_) {
|
|
2316
2316
|
if (s.current && _.width && _.height) {
|
|
2317
|
-
const
|
|
2318
|
-
d(
|
|
2317
|
+
const x = p(s.current, _);
|
|
2318
|
+
d(x);
|
|
2319
2319
|
}
|
|
2320
2320
|
}
|
|
2321
|
-
function
|
|
2321
|
+
function p(_, x) {
|
|
2322
2322
|
const C = document.createElement("canvas"), T = _.naturalWidth / _.width, L = _.naturalHeight / _.height;
|
|
2323
|
-
C.width =
|
|
2323
|
+
C.width = x.width * T, C.height = x.height * L;
|
|
2324
2324
|
const q = C.getContext("2d");
|
|
2325
2325
|
return q && (q.imageSmoothingEnabled = !1, q.drawImage(
|
|
2326
2326
|
_,
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2327
|
+
x.x * T,
|
|
2328
|
+
x.y * L,
|
|
2329
|
+
x.width * T,
|
|
2330
|
+
x.height * L,
|
|
2331
2331
|
0,
|
|
2332
2332
|
0,
|
|
2333
|
-
|
|
2334
|
-
|
|
2333
|
+
x.width * T,
|
|
2334
|
+
x.height * L
|
|
2335
2335
|
)), C.toDataURL("image/png", 1);
|
|
2336
2336
|
}
|
|
2337
2337
|
async function N() {
|
|
2338
|
-
var _,
|
|
2338
|
+
var _, x;
|
|
2339
2339
|
try {
|
|
2340
|
-
const C =
|
|
2340
|
+
const C = pi(u, ((_ = h == null ? void 0 : h.file) == null ? void 0 : _.name) || "image.png"), T = (x = e.extensionManager.extensions.find(
|
|
2341
2341
|
(q) => q.name === "image"
|
|
2342
|
-
)) == null ? void 0 :
|
|
2342
|
+
)) == null ? void 0 : x.options;
|
|
2343
2343
|
let L = "";
|
|
2344
2344
|
T.upload ? L = await T.upload(C) : L = URL.createObjectURL(C), e.chain().focus().setImageInline({ src: L, inline: t }).run(), r(!1), f({
|
|
2345
2345
|
src: "",
|
|
@@ -2350,15 +2350,15 @@ function za({ editor: e, imageInline: t, onClose: n }) {
|
|
|
2350
2350
|
}
|
|
2351
2351
|
}
|
|
2352
2352
|
function I(_) {
|
|
2353
|
-
var
|
|
2354
|
-
_.preventDefault(), (
|
|
2353
|
+
var x;
|
|
2354
|
+
_.preventDefault(), (x = g.current) == null || x.click();
|
|
2355
2355
|
}
|
|
2356
2356
|
const w = async (_) => {
|
|
2357
2357
|
var L;
|
|
2358
|
-
const
|
|
2359
|
-
if (!e || e.isDestroyed ||
|
|
2358
|
+
const x = (L = _ == null ? void 0 : _.target) == null ? void 0 : L.files;
|
|
2359
|
+
if (!e || e.isDestroyed || x.length === 0)
|
|
2360
2360
|
return;
|
|
2361
|
-
const C =
|
|
2361
|
+
const C = x[0], T = await xi(C);
|
|
2362
2362
|
r(!0), f({
|
|
2363
2363
|
src: T.src,
|
|
2364
2364
|
file: C
|
|
@@ -2366,7 +2366,7 @@ function za({ editor: e, imageInline: t, onClose: n }) {
|
|
|
2366
2366
|
};
|
|
2367
2367
|
return /* @__PURE__ */ m(_e, { children: [
|
|
2368
2368
|
/* @__PURE__ */ o(
|
|
2369
|
-
|
|
2369
|
+
P,
|
|
2370
2370
|
{
|
|
2371
2371
|
className: "richtext-mt-1 richtext-w-full",
|
|
2372
2372
|
onClick: I,
|
|
@@ -2379,7 +2379,7 @@ function za({ editor: e, imageInline: t, onClose: n }) {
|
|
|
2379
2379
|
/* @__PURE__ */ m(ht, { children: [
|
|
2380
2380
|
/* @__PURE__ */ o(mt, { children: i("editor.image.dialog.tab.uploadCrop") }),
|
|
2381
2381
|
/* @__PURE__ */ o("div", { children: h.src && /* @__PURE__ */ o(
|
|
2382
|
-
|
|
2382
|
+
Di,
|
|
2383
2383
|
{
|
|
2384
2384
|
className: "richtext-w-full",
|
|
2385
2385
|
crop: c,
|
|
@@ -2397,7 +2397,7 @@ function za({ editor: e, imageInline: t, onClose: n }) {
|
|
|
2397
2397
|
) }),
|
|
2398
2398
|
/* @__PURE__ */ m(bi, { children: [
|
|
2399
2399
|
/* @__PURE__ */ m(
|
|
2400
|
-
|
|
2400
|
+
P,
|
|
2401
2401
|
{
|
|
2402
2402
|
onClick: () => {
|
|
2403
2403
|
r(!1), f({
|
|
@@ -2418,7 +2418,7 @@ function za({ editor: e, imageInline: t, onClose: n }) {
|
|
|
2418
2418
|
}
|
|
2419
2419
|
),
|
|
2420
2420
|
/* @__PURE__ */ m(
|
|
2421
|
-
|
|
2421
|
+
P,
|
|
2422
2422
|
{
|
|
2423
2423
|
className: "richtext-w-fit",
|
|
2424
2424
|
onClick: N,
|
|
@@ -2452,7 +2452,7 @@ function za({ editor: e, imageInline: t, onClose: n }) {
|
|
|
2452
2452
|
)
|
|
2453
2453
|
] });
|
|
2454
2454
|
}
|
|
2455
|
-
function
|
|
2455
|
+
function za(e) {
|
|
2456
2456
|
const { t } = $(), n = Na(), [i, a] = v(""), r = Y(null), [s, c] = v(!1), l = E(() => {
|
|
2457
2457
|
var f;
|
|
2458
2458
|
return (f = e.editor.extensionManager.extensions.find(
|
|
@@ -2465,8 +2465,8 @@ function Ha(e) {
|
|
|
2465
2465
|
if (!e.editor || e.editor.isDestroyed || f.length === 0)
|
|
2466
2466
|
return;
|
|
2467
2467
|
const b = f[0];
|
|
2468
|
-
let
|
|
2469
|
-
l.upload ?
|
|
2468
|
+
let p = "";
|
|
2469
|
+
l.upload ? p = await l.upload(b) : p = URL.createObjectURL(b), e.editor.chain().focus().setImageInline({ src: p, inline: s }).run(), ue.setOpen(!1), c(!1);
|
|
2470
2470
|
}
|
|
2471
2471
|
function d(h) {
|
|
2472
2472
|
h.preventDefault(), h.stopPropagation(), e.editor.chain().focus().setImageInline({ src: i, inline: s }).run(), ue.setOpen(!1), c(!1), a("");
|
|
@@ -2506,13 +2506,13 @@ function Ha(e) {
|
|
|
2506
2506
|
}
|
|
2507
2507
|
}
|
|
2508
2508
|
),
|
|
2509
|
-
/* @__PURE__ */ o(
|
|
2509
|
+
/* @__PURE__ */ o(Pe, { children: t("editor.link.dialog.inline") })
|
|
2510
2510
|
] }),
|
|
2511
|
-
/* @__PURE__ */ m(
|
|
2511
|
+
/* @__PURE__ */ m(pe, { value: "upload", children: [
|
|
2512
2512
|
/* @__PURE__ */ m("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: [
|
|
2513
|
-
/* @__PURE__ */ o(
|
|
2513
|
+
/* @__PURE__ */ o(P, { className: "richtext-w-full richtext-mt-1", size: "sm", onClick: g, children: t("editor.image.dialog.tab.upload") }),
|
|
2514
2514
|
/* @__PURE__ */ o(
|
|
2515
|
-
|
|
2515
|
+
Ha,
|
|
2516
2516
|
{
|
|
2517
2517
|
editor: e.editor,
|
|
2518
2518
|
imageInline: s,
|
|
@@ -2534,7 +2534,7 @@ function Ha(e) {
|
|
|
2534
2534
|
}
|
|
2535
2535
|
)
|
|
2536
2536
|
] }),
|
|
2537
|
-
/* @__PURE__ */ o(
|
|
2537
|
+
/* @__PURE__ */ o(pe, { value: "link", children: /* @__PURE__ */ o("form", { onSubmit: d, children: /* @__PURE__ */ m("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
|
|
2538
2538
|
/* @__PURE__ */ o(
|
|
2539
2539
|
Be,
|
|
2540
2540
|
{
|
|
@@ -2546,7 +2546,7 @@ function Ha(e) {
|
|
|
2546
2546
|
placeholder: t("editor.image.dialog.placeholder")
|
|
2547
2547
|
}
|
|
2548
2548
|
),
|
|
2549
|
-
/* @__PURE__ */ o(
|
|
2549
|
+
/* @__PURE__ */ o(P, { type: "submit", children: t("editor.image.dialog.button.apply") })
|
|
2550
2550
|
] }) }) })
|
|
2551
2551
|
]
|
|
2552
2552
|
}
|
|
@@ -2580,8 +2580,8 @@ function Ea(e) {
|
|
|
2580
2580
|
h: 0,
|
|
2581
2581
|
dir: ""
|
|
2582
2582
|
}), { align: d, inline: g } = (L = e == null ? void 0 : e.node) == null ? void 0 : L.attrs, h = E(() => {
|
|
2583
|
-
var
|
|
2584
|
-
const { src: k, alt: F, width: j, height: te, flipX: ne, flipY: S } = (
|
|
2583
|
+
var pt;
|
|
2584
|
+
const { src: k, alt: F, width: j, height: te, flipX: ne, flipY: S } = (pt = e == null ? void 0 : e.node) == null ? void 0 : pt.attrs, K = xt(j) ? `${j}px` : j, W = xt(te) ? `${te}px` : te, qe = [];
|
|
2585
2585
|
ne && qe.push("rotateX(180deg)"), S && qe.push("rotateY(180deg)");
|
|
2586
2586
|
const an = qe.join(" ");
|
|
2587
2587
|
return {
|
|
@@ -2605,11 +2605,11 @@ function Ea(e) {
|
|
|
2605
2605
|
height: k.target.height
|
|
2606
2606
|
});
|
|
2607
2607
|
}
|
|
2608
|
-
function
|
|
2608
|
+
function p() {
|
|
2609
2609
|
const { editor: k, getPos: F } = e;
|
|
2610
2610
|
k.commands.setNodeSelection(F());
|
|
2611
2611
|
}
|
|
2612
|
-
const N =
|
|
2612
|
+
const N = D(
|
|
2613
2613
|
wt(() => {
|
|
2614
2614
|
const { editor: k } = e, { width: F } = getComputedStyle(k.view.dom);
|
|
2615
2615
|
n((j) => ({
|
|
@@ -2632,18 +2632,18 @@ function Ea(e) {
|
|
|
2632
2632
|
dir: F
|
|
2633
2633
|
});
|
|
2634
2634
|
}
|
|
2635
|
-
const w =
|
|
2635
|
+
const w = D(
|
|
2636
2636
|
wt((k) => {
|
|
2637
2637
|
if (k.preventDefault(), k.stopPropagation(), !s)
|
|
2638
2638
|
return;
|
|
2639
|
-
const { x: F, w: j, dir: te } = l, ne = (k.clientX - F) * (/l/.test(te) ? -1 : 1), S = Wn(j + ne,
|
|
2639
|
+
const { x: F, w: j, dir: te } = l, ne = (k.clientX - F) * (/l/.test(te) ? -1 : 1), S = Wn(j + ne, zi, t.width);
|
|
2640
2640
|
e.updateAttributes({
|
|
2641
2641
|
width: S,
|
|
2642
2642
|
height: null
|
|
2643
2643
|
});
|
|
2644
2644
|
}, Ct),
|
|
2645
2645
|
[s, l, t, e.updateAttributes]
|
|
2646
|
-
), _ =
|
|
2646
|
+
), _ = D(
|
|
2647
2647
|
(k) => {
|
|
2648
2648
|
k.preventDefault(), k.stopPropagation(), s && (u({
|
|
2649
2649
|
x: 0,
|
|
@@ -2651,17 +2651,17 @@ function Ea(e) {
|
|
|
2651
2651
|
w: 0,
|
|
2652
2652
|
h: 0,
|
|
2653
2653
|
dir: ""
|
|
2654
|
-
}), c(!1),
|
|
2654
|
+
}), c(!1), p());
|
|
2655
2655
|
},
|
|
2656
|
-
[s,
|
|
2657
|
-
),
|
|
2656
|
+
[s, p]
|
|
2657
|
+
), x = D(() => {
|
|
2658
2658
|
document == null || document.addEventListener("mousemove", w, !0), document == null || document.addEventListener("mouseup", _, !0);
|
|
2659
|
-
}, [w, _]), C =
|
|
2659
|
+
}, [w, _]), C = D(() => {
|
|
2660
2660
|
document == null || document.removeEventListener("mousemove", w, !0), document == null || document.removeEventListener("mouseup", _, !0);
|
|
2661
2661
|
}, [w, _]);
|
|
2662
|
-
R(() => (s ?
|
|
2662
|
+
R(() => (s ? x() : C(), () => {
|
|
2663
2663
|
C();
|
|
2664
|
-
}), [s,
|
|
2664
|
+
}), [s, x, C]);
|
|
2665
2665
|
const T = E(() => new ResizeObserver(() => N()), [N]);
|
|
2666
2666
|
return R(() => (T.observe(e.editor.view.dom), () => {
|
|
2667
2667
|
T.disconnect();
|
|
@@ -2685,7 +2685,7 @@ function Ea(e) {
|
|
|
2685
2685
|
alt: h.alt,
|
|
2686
2686
|
className: "image-view__body__image block",
|
|
2687
2687
|
height: "auto",
|
|
2688
|
-
onClick:
|
|
2688
|
+
onClick: p,
|
|
2689
2689
|
onLoad: b,
|
|
2690
2690
|
src: h.src,
|
|
2691
2691
|
style: h.style
|
|
@@ -2740,12 +2740,12 @@ function Oa(e) {
|
|
|
2740
2740
|
t.setAttribute("class", "img-placeholder");
|
|
2741
2741
|
}), t.append(n), t;
|
|
2742
2742
|
}
|
|
2743
|
-
function
|
|
2743
|
+
function Da(e, t) {
|
|
2744
2744
|
var a;
|
|
2745
2745
|
const i = fe.getState(e).find(void 0, void 0, (r) => r.id === t);
|
|
2746
2746
|
return i.length > 0 ? (a = i[0]) == null ? void 0 : a.from : null;
|
|
2747
2747
|
}
|
|
2748
|
-
function
|
|
2748
|
+
function Pa({ validateFn: e, onUpload: t, postUpload: n }) {
|
|
2749
2749
|
return (i, a, r) => {
|
|
2750
2750
|
for (const s of i) {
|
|
2751
2751
|
if (e && !e(s))
|
|
@@ -2760,14 +2760,14 @@ function Da({ validateFn: e, onUpload: t, postUpload: n }) {
|
|
|
2760
2760
|
var I;
|
|
2761
2761
|
n && typeof d == "string" && (d = await n(d));
|
|
2762
2762
|
const { schema: g } = a.state;
|
|
2763
|
-
let h =
|
|
2763
|
+
let h = Da(a.state, c);
|
|
2764
2764
|
if (h === null)
|
|
2765
2765
|
return;
|
|
2766
2766
|
const f = typeof d == "object" ? u : d, b = (I = g.nodes.image) == null ? void 0 : I.create({ src: f });
|
|
2767
2767
|
if (!b)
|
|
2768
2768
|
return;
|
|
2769
|
-
const { doc:
|
|
2770
|
-
h >
|
|
2769
|
+
const { doc: p } = a.state;
|
|
2770
|
+
h > p.content.size && (h = p.content.size - 1);
|
|
2771
2771
|
const N = a.state.tr.replaceWith(h, h, b).setMeta(fe, { remove: [c] });
|
|
2772
2772
|
a.dispatch(N);
|
|
2773
2773
|
},
|
|
@@ -2827,7 +2827,7 @@ const Fa = {
|
|
|
2827
2827
|
}) => {
|
|
2828
2828
|
var a, r;
|
|
2829
2829
|
return {
|
|
2830
|
-
component:
|
|
2830
|
+
component: za,
|
|
2831
2831
|
componentProps: {
|
|
2832
2832
|
action: () => !0,
|
|
2833
2833
|
upload: n.options.upload,
|
|
@@ -2951,7 +2951,7 @@ const Fa = {
|
|
|
2951
2951
|
];
|
|
2952
2952
|
},
|
|
2953
2953
|
addProseMirrorPlugins() {
|
|
2954
|
-
const t =
|
|
2954
|
+
const t = Pa({
|
|
2955
2955
|
validateFn: (n) => !(!this.options.acceptMimes.includes(n.type) || n.size > this.options.maxSize),
|
|
2956
2956
|
onUpload: this.options.upload
|
|
2957
2957
|
// postUpload: this.options.postUpload,
|
|
@@ -2983,9 +2983,9 @@ function Va(e) {
|
|
|
2983
2983
|
if (!e.editor || e.editor.isDestroyed || f.length === 0)
|
|
2984
2984
|
return;
|
|
2985
2985
|
const b = f[0];
|
|
2986
|
-
let
|
|
2987
|
-
l.upload ?
|
|
2988
|
-
src:
|
|
2986
|
+
let p = "";
|
|
2987
|
+
l.upload ? p = await l.upload(b) : p = URL.createObjectURL(b), e.editor.chain().setVideo({
|
|
2988
|
+
src: p,
|
|
2989
2989
|
width: "100%"
|
|
2990
2990
|
}).focus().run(), Ae.setOpen(!1);
|
|
2991
2991
|
}
|
|
@@ -3020,8 +3020,8 @@ function Va(e) {
|
|
|
3020
3020
|
((l == null ? void 0 : l.resourceVideo) === "both" || (l == null ? void 0 : l.resourceVideo) === "upload") && /* @__PURE__ */ o(be, { value: "upload", children: t("editor.video.dialog.tab.upload") }),
|
|
3021
3021
|
((l == null ? void 0 : l.resourceVideo) === "both" || (l == null ? void 0 : l.resourceVideo) === "link") && /* @__PURE__ */ o(be, { value: "link", children: t("editor.video.dialog.link") })
|
|
3022
3022
|
] }),
|
|
3023
|
-
/* @__PURE__ */ m(
|
|
3024
|
-
/* @__PURE__ */ o("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: /* @__PURE__ */ o(
|
|
3023
|
+
/* @__PURE__ */ m(pe, { value: "upload", children: [
|
|
3024
|
+
/* @__PURE__ */ o("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: /* @__PURE__ */ o(P, { className: "richtext-w-full richtext-mt-1", size: "sm", onClick: g, children: t("editor.video.dialog.tab.upload") }) }),
|
|
3025
3025
|
/* @__PURE__ */ o(
|
|
3026
3026
|
"input",
|
|
3027
3027
|
{
|
|
@@ -3036,7 +3036,7 @@ function Va(e) {
|
|
|
3036
3036
|
}
|
|
3037
3037
|
)
|
|
3038
3038
|
] }),
|
|
3039
|
-
/* @__PURE__ */ m(
|
|
3039
|
+
/* @__PURE__ */ m(pe, { value: "link", children: [
|
|
3040
3040
|
/* @__PURE__ */ o("form", { onSubmit: d, children: /* @__PURE__ */ m("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
|
|
3041
3041
|
/* @__PURE__ */ o(
|
|
3042
3042
|
Be,
|
|
@@ -3056,7 +3056,7 @@ function Va(e) {
|
|
|
3056
3056
|
placeholder: t("editor.video.dialog.placeholder")
|
|
3057
3057
|
}
|
|
3058
3058
|
),
|
|
3059
|
-
/* @__PURE__ */ o(
|
|
3059
|
+
/* @__PURE__ */ o(P, { type: "submit", children: t("editor.video.dialog.button.apply") })
|
|
3060
3060
|
] }) }),
|
|
3061
3061
|
s && /* @__PURE__ */ o("div", { className: "richtext-text-red-500 richtext-my-[5px]", children: s })
|
|
3062
3062
|
] })
|
|
@@ -3181,7 +3181,7 @@ function Nt(e, t) {
|
|
|
3181
3181
|
return n = n.setSelection(r), n = Ga(n, t, e), n.docChanged ? (a == null || a(n), !0) : !1;
|
|
3182
3182
|
};
|
|
3183
3183
|
}
|
|
3184
|
-
const Xa =
|
|
3184
|
+
const Xa = H.create({
|
|
3185
3185
|
name: "tableCellBackground",
|
|
3186
3186
|
addOptions() {
|
|
3187
3187
|
return {
|
|
@@ -3219,11 +3219,11 @@ const St = (e) => Array.from({ length: e }).map((t, n) => n + 1);
|
|
|
3219
3219
|
function Qa(e) {
|
|
3220
3220
|
var d;
|
|
3221
3221
|
const [t, n] = v(!0), [i, a] = v({
|
|
3222
|
-
rows: Lt() ? Ie :
|
|
3223
|
-
cols: Lt() ? Ie :
|
|
3222
|
+
rows: Lt() ? Ie : He,
|
|
3223
|
+
cols: Lt() ? Ie : He
|
|
3224
3224
|
}), [r, s] = v({
|
|
3225
|
-
rows:
|
|
3226
|
-
cols:
|
|
3225
|
+
rows: ze,
|
|
3226
|
+
cols: ze
|
|
3227
3227
|
});
|
|
3228
3228
|
function c(g, h) {
|
|
3229
3229
|
g === i.rows && a((f) => ({
|
|
@@ -3242,11 +3242,11 @@ function Qa(e) {
|
|
|
3242
3242
|
}
|
|
3243
3243
|
function u() {
|
|
3244
3244
|
n(!1), a({
|
|
3245
|
-
rows: ze,
|
|
3246
|
-
cols: ze
|
|
3247
|
-
}), s({
|
|
3248
3245
|
rows: He,
|
|
3249
3246
|
cols: He
|
|
3247
|
+
}), s({
|
|
3248
|
+
rows: ze,
|
|
3249
|
+
cols: ze
|
|
3250
3250
|
});
|
|
3251
3251
|
}
|
|
3252
3252
|
return /* @__PURE__ */ m(ye, { modal: !0, children: [
|
|
@@ -3305,7 +3305,7 @@ function eo(e) {
|
|
|
3305
3305
|
}
|
|
3306
3306
|
) });
|
|
3307
3307
|
}
|
|
3308
|
-
const
|
|
3308
|
+
const es = $n.extend({
|
|
3309
3309
|
addOptions() {
|
|
3310
3310
|
var e;
|
|
3311
3311
|
return {
|
|
@@ -3332,7 +3332,7 @@ const Jr = $n.extend({
|
|
|
3332
3332
|
Xa.configure(this.options.tableCellBackground)
|
|
3333
3333
|
];
|
|
3334
3334
|
}
|
|
3335
|
-
}),
|
|
3335
|
+
}), ts = H.create({
|
|
3336
3336
|
name: "painter",
|
|
3337
3337
|
addOptions() {
|
|
3338
3338
|
var e;
|
|
@@ -3419,17 +3419,17 @@ function no({ editor: e, ...t }) {
|
|
|
3419
3419
|
}, [g, u, e]), R(() => {
|
|
3420
3420
|
if (!e)
|
|
3421
3421
|
return;
|
|
3422
|
-
const
|
|
3423
|
-
if (!
|
|
3422
|
+
const p = e.extensionManager.extensions.find((I) => I.name === so.name);
|
|
3423
|
+
if (!p)
|
|
3424
3424
|
return;
|
|
3425
3425
|
const N = () => {
|
|
3426
3426
|
if (!g)
|
|
3427
3427
|
return;
|
|
3428
|
-
const I =
|
|
3428
|
+
const I = p ? p.storage.currentIndex : -1, w = p ? p.storage.results : [];
|
|
3429
3429
|
a((_) => _ !== I ? I : _), s((_) => Xn(_, w) ? _ : w);
|
|
3430
3430
|
};
|
|
3431
3431
|
return window.addEventListener(Qe, N), () => {
|
|
3432
|
-
|
|
3432
|
+
p && window.removeEventListener(Qe, N);
|
|
3433
3433
|
};
|
|
3434
3434
|
}, [g, e]), /* @__PURE__ */ m(
|
|
3435
3435
|
ye,
|
|
@@ -3462,7 +3462,7 @@ function no({ editor: e, ...t }) {
|
|
|
3462
3462
|
side: "bottom",
|
|
3463
3463
|
children: [
|
|
3464
3464
|
/* @__PURE__ */ m("div", { className: "richtext-mb-[6px] richtext-flex richtext-items-center richtext-justify-between", children: [
|
|
3465
|
-
/* @__PURE__ */ o(
|
|
3465
|
+
/* @__PURE__ */ o(Pe, { children: n("editor.search.dialog.text") }),
|
|
3466
3466
|
/* @__PURE__ */ o("span", { className: "richtext-font-semibold", children: r.length > 0 ? `${i + 1}/${r.length}` : "0/0" })
|
|
3467
3467
|
] }),
|
|
3468
3468
|
/* @__PURE__ */ m("div", { className: "richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5 richtext-mb-[10px]", children: [
|
|
@@ -3475,13 +3475,13 @@ function no({ editor: e, ...t }) {
|
|
|
3475
3475
|
placeholder: "Text",
|
|
3476
3476
|
autoFocus: !0,
|
|
3477
3477
|
value: c,
|
|
3478
|
-
onChange: (
|
|
3478
|
+
onChange: (p) => l(p.target.value)
|
|
3479
3479
|
}
|
|
3480
3480
|
),
|
|
3481
|
-
/* @__PURE__ */ o(
|
|
3482
|
-
/* @__PURE__ */ o(
|
|
3481
|
+
/* @__PURE__ */ o(P, { disabled: r.length === 0, className: "richtext-flex-1", onClick: e.commands.goToPrevSearchResult, children: /* @__PURE__ */ o(O, { name: "ChevronUp" }) }),
|
|
3482
|
+
/* @__PURE__ */ o(P, { disabled: r.length === 0, className: "richtext-flex-1", onClick: e.commands.goToNextSearchResult, children: /* @__PURE__ */ o(O, { name: "ChevronDown" }) })
|
|
3483
3483
|
] }),
|
|
3484
|
-
/* @__PURE__ */ o(
|
|
3484
|
+
/* @__PURE__ */ o(Pe, { className: "richtext-mb-[6px]", children: n("editor.replace.dialog.text") }),
|
|
3485
3485
|
/* @__PURE__ */ o("div", { className: "richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5 richtext-mb-[5px]", children: /* @__PURE__ */ o("div", { className: "richtext-relative richtext-items-center richtext-w-full richtext-max-w-sm", children: /* @__PURE__ */ o(
|
|
3486
3486
|
Be,
|
|
3487
3487
|
{
|
|
@@ -3490,7 +3490,7 @@ function no({ editor: e, ...t }) {
|
|
|
3490
3490
|
className: "richtext-w-80",
|
|
3491
3491
|
placeholder: "Text",
|
|
3492
3492
|
value: u,
|
|
3493
|
-
onChange: (
|
|
3493
|
+
onChange: (p) => d(p.target.value)
|
|
3494
3494
|
}
|
|
3495
3495
|
) }) }),
|
|
3496
3496
|
/* @__PURE__ */ m("div", { className: "richtext-flex richtext-items-center richtext-space-x-2 richtext-mb-[10px]", children: [
|
|
@@ -3498,16 +3498,16 @@ function no({ editor: e, ...t }) {
|
|
|
3498
3498
|
yi,
|
|
3499
3499
|
{
|
|
3500
3500
|
checked: f,
|
|
3501
|
-
onCheckedChange: (
|
|
3502
|
-
b(
|
|
3501
|
+
onCheckedChange: (p) => {
|
|
3502
|
+
b(p), e.commands.setCaseSensitive(p);
|
|
3503
3503
|
}
|
|
3504
3504
|
}
|
|
3505
3505
|
),
|
|
3506
|
-
/* @__PURE__ */ o(
|
|
3506
|
+
/* @__PURE__ */ o(Pe, { children: n("editor.replace.caseSensitive") })
|
|
3507
3507
|
] }),
|
|
3508
3508
|
/* @__PURE__ */ m("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: [
|
|
3509
|
-
/* @__PURE__ */ o(
|
|
3510
|
-
/* @__PURE__ */ o(
|
|
3509
|
+
/* @__PURE__ */ o(P, { disabled: r.length === 0, className: "richtext-flex-1", onClick: e.commands.replace, children: n("editor.replace.dialog.text") }),
|
|
3510
|
+
/* @__PURE__ */ o(P, { disabled: r.length === 0, className: "richtext-flex-1", onClick: e.commands.replaceAll, children: n("editor.replaceAll.dialog.text") })
|
|
3511
3511
|
] })
|
|
3512
3512
|
]
|
|
3513
3513
|
}
|
|
@@ -3597,7 +3597,7 @@ function It({ view: e, tr: t, searchResults: n, searchResultCurrentClass: i, got
|
|
|
3597
3597
|
}
|
|
3598
3598
|
return !1;
|
|
3599
3599
|
}
|
|
3600
|
-
const Qe = "ON_SEARCH_RESULTS", le = new CustomEvent(Qe), so =
|
|
3600
|
+
const Qe = "ON_SEARCH_RESULTS", le = new CustomEvent(Qe), so = H.create({
|
|
3601
3601
|
name: "search",
|
|
3602
3602
|
addOptions() {
|
|
3603
3603
|
var e;
|
|
@@ -3883,7 +3883,7 @@ class Ge {
|
|
|
3883
3883
|
this.key = t, this.value = n, this.prev = null, this.next = null;
|
|
3884
3884
|
}
|
|
3885
3885
|
}
|
|
3886
|
-
class
|
|
3886
|
+
class po {
|
|
3887
3887
|
constructor(t) {
|
|
3888
3888
|
G(this, "capacity");
|
|
3889
3889
|
G(this, "usedCapacity");
|
|
@@ -3942,8 +3942,8 @@ class xo {
|
|
|
3942
3942
|
return this.store;
|
|
3943
3943
|
}
|
|
3944
3944
|
}
|
|
3945
|
-
function
|
|
3946
|
-
const n = new
|
|
3945
|
+
function xo(e, t) {
|
|
3946
|
+
const n = new po(t);
|
|
3947
3947
|
return {
|
|
3948
3948
|
syncFromStorage() {
|
|
3949
3949
|
(_o(e) || []).slice().reverse().forEach((r) => {
|
|
@@ -5694,7 +5694,7 @@ const wo = [
|
|
|
5694
5694
|
"🥄",
|
|
5695
5695
|
"🔪",
|
|
5696
5696
|
"🏺"
|
|
5697
|
-
], de =
|
|
5697
|
+
], de = xo("EMOJI_PICKER", 20), Ht = [
|
|
5698
5698
|
{
|
|
5699
5699
|
title: "Smileys & People",
|
|
5700
5700
|
data: wo,
|
|
@@ -5738,9 +5738,9 @@ const wo = [
|
|
|
5738
5738
|
], Lo = ["😀", "😃", "😄", "😁", "😆", "😅", "😂", "🤣"];
|
|
5739
5739
|
function So({ onSelectEmoji: e, children: t }) {
|
|
5740
5740
|
const [n, i] = v([]), { t: a } = $(), r = E(
|
|
5741
|
-
() => n.length > 0 ? [{ title: "Frequently used", icon: ei, data: n }, ...
|
|
5741
|
+
() => n.length > 0 ? [{ title: "Frequently used", icon: ei, data: n }, ...Ht] : Ht,
|
|
5742
5742
|
[n]
|
|
5743
|
-
), s =
|
|
5743
|
+
), s = D(
|
|
5744
5744
|
(c) => {
|
|
5745
5745
|
de.put(c), i(de.get()), e && e(c);
|
|
5746
5746
|
},
|
|
@@ -5774,7 +5774,7 @@ function So({ onSelectEmoji: e, children: t }) {
|
|
|
5774
5774
|
`emoji-picker-title-${c.title}`
|
|
5775
5775
|
)) }),
|
|
5776
5776
|
r.map((c) => /* @__PURE__ */ m(
|
|
5777
|
-
|
|
5777
|
+
pe,
|
|
5778
5778
|
{
|
|
5779
5779
|
value: c.title,
|
|
5780
5780
|
children: [
|
|
@@ -5798,7 +5798,7 @@ function So({ onSelectEmoji: e, children: t }) {
|
|
|
5798
5798
|
] });
|
|
5799
5799
|
}
|
|
5800
5800
|
function Mo({ editor: e, icon: t, ...n }) {
|
|
5801
|
-
const i =
|
|
5801
|
+
const i = D(
|
|
5802
5802
|
(a) => {
|
|
5803
5803
|
const { selection: r } = e.state, { $anchor: s } = r;
|
|
5804
5804
|
return e.chain().insertContentAt(s.pos, a).run();
|
|
@@ -5853,7 +5853,7 @@ const tn = nt((e, t) => {
|
|
|
5853
5853
|
)) : /* @__PURE__ */ o("div", { className: "richtext-relative richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-outline-none richtext-transition-colors", children: /* @__PURE__ */ o("span", { children: r("no_result_found") }) }) }) });
|
|
5854
5854
|
});
|
|
5855
5855
|
tn.displayName = "EmojiList";
|
|
5856
|
-
const
|
|
5856
|
+
const xe = {
|
|
5857
5857
|
100: "💯",
|
|
5858
5858
|
1234: "🔢",
|
|
5859
5859
|
grinning: "😀",
|
|
@@ -7693,22 +7693,22 @@ const pe = {
|
|
|
7693
7693
|
scotland: "🏴",
|
|
7694
7694
|
wales: "🏴"
|
|
7695
7695
|
};
|
|
7696
|
-
Object.keys(
|
|
7697
|
-
const n =
|
|
7696
|
+
Object.keys(xe).reduce((e, t) => {
|
|
7697
|
+
const n = xe[t];
|
|
7698
7698
|
return e[n] = t, e;
|
|
7699
7699
|
}, {});
|
|
7700
|
-
const Io = Object.keys(
|
|
7701
|
-
Object.keys(
|
|
7702
|
-
function
|
|
7700
|
+
const Io = Object.keys(xe).map((e) => e);
|
|
7701
|
+
Object.keys(xe).map((e) => xe[e]);
|
|
7702
|
+
function Ho(e) {
|
|
7703
7703
|
return Io.filter((t) => t.startsWith(e)).map((t) => ({
|
|
7704
7704
|
name: t,
|
|
7705
|
-
emoji:
|
|
7705
|
+
emoji: xe[t]
|
|
7706
7706
|
}));
|
|
7707
7707
|
}
|
|
7708
|
-
const
|
|
7708
|
+
const zo = 200, Eo = new ee("emoji"), ns = Le.create({
|
|
7709
7709
|
name: "emoji",
|
|
7710
7710
|
content: "text*",
|
|
7711
|
-
priority:
|
|
7711
|
+
priority: zo,
|
|
7712
7712
|
addOptions() {
|
|
7713
7713
|
var e;
|
|
7714
7714
|
return {
|
|
@@ -7750,7 +7750,7 @@ const Ho = 200, Eo = new ee("emoji"), es = Le.create({
|
|
|
7750
7750
|
}
|
|
7751
7751
|
}).configure({
|
|
7752
7752
|
suggestion: {
|
|
7753
|
-
items: ({ query: e }) =>
|
|
7753
|
+
items: ({ query: e }) => Ho(e),
|
|
7754
7754
|
render: () => {
|
|
7755
7755
|
let e, t, n;
|
|
7756
7756
|
return {
|
|
@@ -7826,7 +7826,7 @@ function Oo(e) {
|
|
|
7826
7826
|
const t = e.getHTML();
|
|
7827
7827
|
return t ? (Ro(t), !0) : !1;
|
|
7828
7828
|
}
|
|
7829
|
-
const
|
|
7829
|
+
const is = H.create({
|
|
7830
7830
|
name: "exportPdf",
|
|
7831
7831
|
addOptions() {
|
|
7832
7832
|
var e;
|
|
@@ -7847,14 +7847,14 @@ const ts = z.create({
|
|
|
7847
7847
|
};
|
|
7848
7848
|
}
|
|
7849
7849
|
});
|
|
7850
|
-
function
|
|
7850
|
+
function Do(e, t) {
|
|
7851
7851
|
const n = atob(e.split(",")[1]), i = Array.from({ length: n.length });
|
|
7852
7852
|
for (let r = 0; r < n.length; r++)
|
|
7853
7853
|
i[r] = n.charCodeAt(r);
|
|
7854
7854
|
const a = new Uint8Array(i);
|
|
7855
7855
|
return new Blob([a], { type: t });
|
|
7856
7856
|
}
|
|
7857
|
-
function
|
|
7857
|
+
function Po(e, t) {
|
|
7858
7858
|
return new File([e], t, { type: e.type });
|
|
7859
7859
|
}
|
|
7860
7860
|
function Bo(e) {
|
|
@@ -7887,13 +7887,13 @@ function Bo(e) {
|
|
|
7887
7887
|
)) == null ? void 0 : N.options;
|
|
7888
7888
|
if (I && typeof I.upload == "function") {
|
|
7889
7889
|
const w = [];
|
|
7890
|
-
for (const
|
|
7891
|
-
const C =
|
|
7890
|
+
for (const x of b) {
|
|
7891
|
+
const C = x.getAttribute("src"), T = Do(C, "image/jpeg"), L = Po(T, "image.jpeg");
|
|
7892
7892
|
w.push(L);
|
|
7893
7893
|
}
|
|
7894
7894
|
const _ = await I.upload(w);
|
|
7895
|
-
for (const [
|
|
7896
|
-
C.setAttribute("src", _[
|
|
7895
|
+
for (const [x, C] of b.entries()) {
|
|
7896
|
+
C.setAttribute("src", _[x].src);
|
|
7897
7897
|
const T = C.parentElement;
|
|
7898
7898
|
(T == null ? void 0 : T.tagName) === "P" && (T.insertAdjacentElement("beforebegin", C), !T.hasChildNodes() && T.textContent === "" && T.remove());
|
|
7899
7899
|
}
|
|
@@ -7949,7 +7949,7 @@ function Bo(e) {
|
|
|
7949
7949
|
)
|
|
7950
7950
|
] });
|
|
7951
7951
|
}
|
|
7952
|
-
const
|
|
7952
|
+
const as = H.create({
|
|
7953
7953
|
name: "importWord",
|
|
7954
7954
|
addOptions() {
|
|
7955
7955
|
var e;
|
|
@@ -7998,7 +7998,7 @@ const jo = {
|
|
|
7998
7998
|
image(e, t) {
|
|
7999
7999
|
e.renderInline(t), e.closeBlock(t);
|
|
8000
8000
|
}
|
|
8001
|
-
}, Uo = new Bi(jo, $i),
|
|
8001
|
+
}, Uo = new Bi(jo, $i), os = H.create({
|
|
8002
8002
|
name: "exportWord",
|
|
8003
8003
|
addOptions() {
|
|
8004
8004
|
var e;
|
|
@@ -8028,7 +8028,7 @@ const jo = {
|
|
|
8028
8028
|
return new Uint8Array(r);
|
|
8029
8029
|
}
|
|
8030
8030
|
}, n = Uo.serialize(e.state.doc, t);
|
|
8031
|
-
return
|
|
8031
|
+
return Pi.toBlob(n).then((i) => Fo(new Blob([i]), "export-document.docx")), !0;
|
|
8032
8032
|
}
|
|
8033
8033
|
};
|
|
8034
8034
|
}
|
|
@@ -8048,7 +8048,7 @@ function Go(e) {
|
|
|
8048
8048
|
}), t;
|
|
8049
8049
|
}
|
|
8050
8050
|
function Xo({ editor: e }) {
|
|
8051
|
-
const t = st(), [n, i] = v([]), { t: a } = $(), r =
|
|
8051
|
+
const t = st(), [n, i] = v([]), { t: a } = $(), r = D(() => {
|
|
8052
8052
|
const s = [], c = e.state.tr;
|
|
8053
8053
|
e.state.doc.descendants((l, u) => {
|
|
8054
8054
|
if (l.type.name === "heading") {
|
|
@@ -8101,7 +8101,7 @@ function Yo(e, ...t) {
|
|
|
8101
8101
|
}, [e, t, i]), n;
|
|
8102
8102
|
}
|
|
8103
8103
|
function Zo({ editor: e, icon: t, tooltip: n }) {
|
|
8104
|
-
const i = Yo(e, er.name), a =
|
|
8104
|
+
const i = Yo(e, er.name), a = D(() => {
|
|
8105
8105
|
if (i) {
|
|
8106
8106
|
e.chain().focus().removeTableOfContents().run();
|
|
8107
8107
|
return;
|
|
@@ -8275,7 +8275,7 @@ function tr(e) {
|
|
|
8275
8275
|
)
|
|
8276
8276
|
] });
|
|
8277
8277
|
}
|
|
8278
|
-
const
|
|
8278
|
+
const rs = H.create({
|
|
8279
8279
|
name: "text-direction",
|
|
8280
8280
|
addOptions() {
|
|
8281
8281
|
var e;
|
|
@@ -8422,7 +8422,7 @@ const as = z.create({
|
|
|
8422
8422
|
}
|
|
8423
8423
|
};
|
|
8424
8424
|
}
|
|
8425
|
-
},
|
|
8425
|
+
}, ss = Vn.extend({
|
|
8426
8426
|
addAttributes() {
|
|
8427
8427
|
return {
|
|
8428
8428
|
id: {
|
|
@@ -8441,6 +8441,51 @@ const as = z.create({
|
|
|
8441
8441
|
},
|
|
8442
8442
|
suggestion: sr
|
|
8443
8443
|
}), cr = {
|
|
8444
|
+
audio: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-audio-lines"><path d="M2 10v3"/><path d="M6 6v11"/><path d="M10 3v18"/><path d="M14 8v7"/><path d="M18 5v13"/><path d="M22 10v3"/></svg>',
|
|
8445
|
+
video: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-video"><path d="m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"/><rect x="2" y="6" width="14" height="12" rx="2"/></svg>',
|
|
8446
|
+
file: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/></svg>',
|
|
8447
|
+
image: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-image"><rect width="18" height="18" x="3" y="3" rx="2" ry="2"/><circle cx="9" cy="9" r="2"/><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"/></svg>',
|
|
8448
|
+
pdf: `<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 32 32">
|
|
8449
|
+
<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"></path>
|
|
8450
|
+
<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"></path>
|
|
8451
|
+
</svg>`,
|
|
8452
|
+
word: `<svg
|
|
8453
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8454
|
+
width="1em"
|
|
8455
|
+
height="1em"
|
|
8456
|
+
className="icon"
|
|
8457
|
+
viewBox="0 0 1024 1024"
|
|
8458
|
+
>
|
|
8459
|
+
<path
|
|
8460
|
+
fill="currentColor"
|
|
8461
|
+
d="M679.253 402.364 618.77 561.015l-60.348-158.651a30.04 30.04 0 0 0-30.447-18.637 29.76 29.76 0 0 0-30.447 18.637l-60.416 158.651-60.416-158.651a30.515 30.515 0 0 0-38.843-17.272 28.945 28.945 0 0 0-17.954 37.547l88.815 233.267c4.369 11.469 15.7 19.115 28.398 19.115a30.31 30.31 0 0 0 28.468-19.115l62.395-163.908 62.396 163.84c4.437 11.605 15.701 19.183 28.4 19.183a30.31 30.31 0 0 0 28.466-19.115l88.747-233.267a28.945 28.945 0 0 0-17.886-37.547 30.447 30.447 0 0 0-38.912 17.272zm219.478 395.605-51.883-29.218c-28.672-16.18-52.224-3.072-52.224 29.082v.273H643.209a29.833 29.833 0 0 0-30.31 29.354c0 16.18 13.584 29.218 30.31 29.218h151.825c1.092 30.516 24.03 43.077 52.224 27.648l51.063-27.989c29.013-15.906 29.15-42.189.41-58.368"
|
|
8462
|
+
/>
|
|
8463
|
+
<path
|
|
8464
|
+
fill="currentColor"
|
|
8465
|
+
d="m810.667 913.135-.478.068H201.796c-19.865 0-36.727-11.673-36.727-25.6v-618.36h154.965c51.268 0 92.911-39.39 92.911-87.858v-87.86H810.19c19.797 0 36.522 11.742 36.522 25.669V739.26h61.987V119.262c0-46.421-44.169-84.241-98.51-84.241H328.364l-225.28 194.56v658.09c0 46.285 44.236 84.105 98.713 84.105H810.19c43.759 0 80.554-24.713 93.32-58.573h-92.842zM350.89 94.89v86.562c0 16.11-13.858 29.286-30.925 29.286H216.815L350.959 94.891z"
|
|
8466
|
+
/>
|
|
8467
|
+
</svg>`,
|
|
8468
|
+
excel: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-sheet"><rect width="18" height="18" x="3" y="3" rx="2" ry="2"/><line x1="3" x2="21" y1="9" y2="9"/><line x1="3" x2="21" y1="15" y2="15"/><line x1="9" x2="9" y1="9" y2="21"/><line x1="15" x2="15" y1="9" y2="21"/></svg>',
|
|
8469
|
+
ppt: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-table-properties"><path d="M15 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M21 9H3"/><path d="M21 15H3"/></svg>'
|
|
8470
|
+
};
|
|
8471
|
+
function lr(e) {
|
|
8472
|
+
const t = cr[e], a = new DOMParser().parseFromString(t, "image/svg+xml").documentElement, r = [
|
|
8473
|
+
"svg",
|
|
8474
|
+
{
|
|
8475
|
+
...Array.from(a.attributes).reduce((s, c) => (s[c.name] = c.value, s), {})
|
|
8476
|
+
}
|
|
8477
|
+
];
|
|
8478
|
+
return Array.from(a.childNodes).forEach((s) => {
|
|
8479
|
+
if (s.nodeType === 1) {
|
|
8480
|
+
const c = [
|
|
8481
|
+
s.tagName.toLowerCase(),
|
|
8482
|
+
Array.from(s.attributes).reduce((l, u) => (l[u.name] = u.value, l), {})
|
|
8483
|
+
];
|
|
8484
|
+
s.textContent && c.push(s.textContent), r.push(c);
|
|
8485
|
+
}
|
|
8486
|
+
}), r;
|
|
8487
|
+
}
|
|
8488
|
+
const dr = {
|
|
8444
8489
|
audio: /* @__PURE__ */ o(si, {}),
|
|
8445
8490
|
video: /* @__PURE__ */ o(ri, {}),
|
|
8446
8491
|
file: /* @__PURE__ */ o(oi, {}),
|
|
@@ -8451,17 +8496,17 @@ const as = z.create({
|
|
|
8451
8496
|
ppt: /* @__PURE__ */ o(ni, {})
|
|
8452
8497
|
};
|
|
8453
8498
|
function nn(e, t = !1) {
|
|
8454
|
-
const n = Ci(e);
|
|
8455
|
-
return
|
|
8499
|
+
const n = Ci(e), i = dr[n] || /* @__PURE__ */ o(_e, {});
|
|
8500
|
+
return t ? lr(n) : i;
|
|
8456
8501
|
}
|
|
8457
|
-
const
|
|
8458
|
-
wrap:
|
|
8502
|
+
const ur = "_wrap_1x1ms_2", Xe = {
|
|
8503
|
+
wrap: ur
|
|
8459
8504
|
};
|
|
8460
|
-
function
|
|
8505
|
+
function hr({ editor: e, node: t, updateAttributes: n, deleteNode: i, extension: a }) {
|
|
8461
8506
|
var C;
|
|
8462
|
-
const r = Y(null), s = st(), { hasTrigger: c, fileName: l, fileSize: u, fileExt: d, fileType: g, url: h, error: f } = t.attrs, [b,
|
|
8507
|
+
const r = Y(null), s = st(), { hasTrigger: c, fileName: l, fileSize: u, fileExt: d, fileType: g, url: h, error: f } = t.attrs, [b, p] = v(!1), { t: N } = $(), I = (C = a == null ? void 0 : a.options) == null ? void 0 : C.upload, w = D(() => {
|
|
8463
8508
|
!s || h || s && r.current.click();
|
|
8464
|
-
}, [s, h]), _ =
|
|
8509
|
+
}, [s, h]), _ = D(
|
|
8465
8510
|
async (T) => {
|
|
8466
8511
|
const L = T.target.files && T.target.files[0];
|
|
8467
8512
|
if (!L)
|
|
@@ -8472,20 +8517,20 @@ function dr({ editor: e, node: t, updateAttributes: n, deleteNode: i, extension:
|
|
|
8472
8517
|
fileType: L.type,
|
|
8473
8518
|
fileExt: Ni(L.name)
|
|
8474
8519
|
};
|
|
8475
|
-
|
|
8520
|
+
p(!0);
|
|
8476
8521
|
try {
|
|
8477
8522
|
const k = await I(L);
|
|
8478
|
-
n({ ...q, url: k }),
|
|
8523
|
+
n({ ...q, url: k }), p(!1);
|
|
8479
8524
|
} catch (k) {
|
|
8480
|
-
n({ error: `File upload fail: ${k && k.message}` || "Unknown error" }),
|
|
8525
|
+
n({ error: `File upload fail: ${k && k.message}` || "Unknown error" }), p(!1), r.current.value = "";
|
|
8481
8526
|
}
|
|
8482
8527
|
},
|
|
8483
|
-
[
|
|
8528
|
+
[p, n]
|
|
8484
8529
|
);
|
|
8485
8530
|
R(() => {
|
|
8486
8531
|
!h && !c && (w(), n({ hasTrigger: !0 }));
|
|
8487
8532
|
}, [h, c, w, n]);
|
|
8488
|
-
const
|
|
8533
|
+
const x = D(() => i(), [e]);
|
|
8489
8534
|
return s && !h ? /* @__PURE__ */ o(he, { children: /* @__PURE__ */ m("div", { className: U(Xe.wrap, "render-wrapper"), children: [
|
|
8490
8535
|
/* @__PURE__ */ o(
|
|
8491
8536
|
"p",
|
|
@@ -8526,7 +8571,7 @@ function dr({ editor: e, node: t, updateAttributes: n, deleteNode: i, extension:
|
|
|
8526
8571
|
/* @__PURE__ */ o(
|
|
8527
8572
|
y,
|
|
8528
8573
|
{
|
|
8529
|
-
action:
|
|
8574
|
+
action: x,
|
|
8530
8575
|
icon: "Trash2",
|
|
8531
8576
|
tooltip: N("editor.delete")
|
|
8532
8577
|
}
|
|
@@ -8542,7 +8587,7 @@ function dr({ editor: e, node: t, updateAttributes: n, deleteNode: i, extension:
|
|
|
8542
8587
|
}
|
|
8543
8588
|
) }) : /* @__PURE__ */ o(_e, {});
|
|
8544
8589
|
}
|
|
8545
|
-
const
|
|
8590
|
+
const cs = Le.create({
|
|
8546
8591
|
name: "attachment",
|
|
8547
8592
|
content: "",
|
|
8548
8593
|
marks: "",
|
|
@@ -8641,56 +8686,56 @@ const rs = Le.create({
|
|
|
8641
8686
|
};
|
|
8642
8687
|
},
|
|
8643
8688
|
addNodeView() {
|
|
8644
|
-
return $e(
|
|
8689
|
+
return $e(hr);
|
|
8645
8690
|
}
|
|
8646
8691
|
});
|
|
8647
8692
|
export {
|
|
8648
|
-
|
|
8649
|
-
|
|
8650
|
-
|
|
8651
|
-
|
|
8652
|
-
|
|
8653
|
-
|
|
8654
|
-
|
|
8693
|
+
cs as Attachment,
|
|
8694
|
+
Gr as BaseKit,
|
|
8695
|
+
Ur as Blockquote,
|
|
8696
|
+
Lr as Bold,
|
|
8697
|
+
Br as BulletList,
|
|
8698
|
+
$r as Clear,
|
|
8699
|
+
Hr as Code,
|
|
8655
8700
|
ra as CodeBlock,
|
|
8656
|
-
|
|
8701
|
+
Dr as Color,
|
|
8657
8702
|
fi as Column,
|
|
8658
|
-
|
|
8659
|
-
|
|
8660
|
-
|
|
8661
|
-
|
|
8662
|
-
|
|
8663
|
-
|
|
8664
|
-
|
|
8665
|
-
|
|
8666
|
-
|
|
8667
|
-
|
|
8668
|
-
|
|
8669
|
-
|
|
8670
|
-
|
|
8703
|
+
Wr as ColumnActionButton,
|
|
8704
|
+
ns as Emoji,
|
|
8705
|
+
us as Excalidraw,
|
|
8706
|
+
is as ExportPdf,
|
|
8707
|
+
os as ExportWord,
|
|
8708
|
+
zr as FontFamily,
|
|
8709
|
+
Or as FontSize,
|
|
8710
|
+
ts as FormatPainter,
|
|
8711
|
+
Er as Heading,
|
|
8712
|
+
Pr as Highlight,
|
|
8713
|
+
Kr as History,
|
|
8714
|
+
qr as HorizontalRule,
|
|
8715
|
+
hs as Iframe,
|
|
8671
8716
|
ja as Image,
|
|
8672
|
-
|
|
8673
|
-
|
|
8674
|
-
|
|
8675
|
-
|
|
8676
|
-
|
|
8677
|
-
|
|
8678
|
-
|
|
8679
|
-
|
|
8680
|
-
|
|
8681
|
-
|
|
8717
|
+
ms as ImageGif,
|
|
8718
|
+
as as ImportWord,
|
|
8719
|
+
Zr as Indent,
|
|
8720
|
+
Sr as Italic,
|
|
8721
|
+
fs as Katex,
|
|
8722
|
+
Jr as LineHeight,
|
|
8723
|
+
Vr as Link,
|
|
8724
|
+
ss as Mention,
|
|
8725
|
+
gs as Mermaid,
|
|
8726
|
+
Yr as MoreMark,
|
|
8682
8727
|
gi as MultiColumn,
|
|
8683
|
-
|
|
8728
|
+
Fr as OrderedList,
|
|
8684
8729
|
so as SearchAndReplace,
|
|
8685
|
-
|
|
8686
|
-
|
|
8687
|
-
|
|
8688
|
-
|
|
8730
|
+
Qr as SlashCommand,
|
|
8731
|
+
Ir as Strike,
|
|
8732
|
+
Xr as SubAndSuperScript,
|
|
8733
|
+
es as Table,
|
|
8689
8734
|
er as TableOfContents,
|
|
8690
|
-
|
|
8691
|
-
|
|
8692
|
-
|
|
8693
|
-
|
|
8694
|
-
|
|
8735
|
+
jr as TaskList,
|
|
8736
|
+
Rr as TextAlign,
|
|
8737
|
+
rs as TextDirection,
|
|
8738
|
+
_s as Twitter,
|
|
8739
|
+
Mr as Underline,
|
|
8695
8740
|
Ka as Video
|
|
8696
8741
|
};
|