tiptap-editor-codeveda 0.2.1 → 0.4.0
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.
|
@@ -2,10 +2,10 @@ import * as ue from "react";
|
|
|
2
2
|
import zt, { useState as F, useRef as ke, useEffect as ee, useCallback as Ke } from "react";
|
|
3
3
|
import { NodeViewWrapper as We, NodeViewContent as Ut, ReactNodeViewRenderer as mt, useCurrentEditor as _n, useEditor as Cn, EditorContent as Sn } from "@tiptap/react";
|
|
4
4
|
import ds from "@tiptap/starter-kit";
|
|
5
|
-
import { Table as fs } from "@tiptap/extension-table";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
5
|
+
import { Table as Tn, TableView as fs } from "@tiptap/extension-table";
|
|
6
|
+
import kn from "@tiptap/extension-table-row";
|
|
7
|
+
import An from "@tiptap/extension-table-cell";
|
|
8
|
+
import On from "@tiptap/extension-table-header";
|
|
9
9
|
import ps from "@tiptap/extension-image";
|
|
10
10
|
import hs from "@tiptap/extension-link";
|
|
11
11
|
import { TextStyle as ms } from "@tiptap/extension-text-style";
|
|
@@ -13,18 +13,18 @@ import gs from "@tiptap/extension-color";
|
|
|
13
13
|
import bs from "@tiptap/extension-highlight";
|
|
14
14
|
import ws from "@tiptap/extension-code-block-lowlight";
|
|
15
15
|
import { createLowlight as ys, all as xs } from "lowlight";
|
|
16
|
-
import { Mark as vs, Node as Ae, mergeAttributes as Ee, findParentNode as Es, isTextSelection as Ns, posToDOMRect as
|
|
16
|
+
import { Mark as vs, Node as Ae, mergeAttributes as Ee, findParentNode as Es, isTextSelection as Ns, posToDOMRect as Rn, Extension as In, getText as _s, getTextSerializersFromSchema as Cs } from "@tiptap/core";
|
|
17
17
|
import Ss from "@tiptap/extension-underline";
|
|
18
18
|
import Ts from "@tiptap/extension-strike";
|
|
19
19
|
import ks from "@tiptap/extension-blockquote";
|
|
20
20
|
import As from "@tiptap/extension-horizontal-rule";
|
|
21
|
-
import { Trash2 as gt, Settings as Os, ExternalLink as Rs, Copy as Is, Minimize as Ms, Maximize as Ls, Heading1 as
|
|
21
|
+
import { Trash2 as gt, Settings as Os, ExternalLink as Rs, Copy as Is, Minimize as Ms, Maximize as Ls, Heading1 as Mn, Heading2 as Ln, Heading3 as Dn, Heading4 as Ds, FileText as Pn, List as Ps, ListOrdered as js, Table as Bs, Quote as zs, Minus as It, Image as jn, Video as Us, Code as Ft, PanelTopOpen as Fs, ChevronDown as Bn, Frame as $s, Columns3 as Hs, Bold as Ks, Italic as Js, Underline as Ws, Strikethrough as qs, Type as Vs, Palette as zn, Link as Gs, Plus as Xe, Terminal as Ys, Lock as Zs, LockOpen as Xs } from "lucide-react";
|
|
22
22
|
import { Slot as Qs } from "@radix-ui/react-slot";
|
|
23
23
|
import { cva as eo } from "class-variance-authority";
|
|
24
24
|
import { clsx as to } from "clsx";
|
|
25
25
|
import { twMerge as no } from "tailwind-merge";
|
|
26
|
-
import { useMergeRefs as
|
|
27
|
-
import { createPortal as
|
|
26
|
+
import { useMergeRefs as Un, FloatingPortal as ro, FloatingDelayGroup as so, useFloating as oo, offset as io, flip as ao, shift as lo, autoUpdate as co, useHover as uo, useFocus as fo, useDismiss as po, useRole as ho, useInteractions as mo } from "@floating-ui/react";
|
|
27
|
+
import { createPortal as Fn } from "react-dom";
|
|
28
28
|
var Qe = { exports: {} }, $e = {};
|
|
29
29
|
/**
|
|
30
30
|
* @license React
|
|
@@ -305,12 +305,16 @@ function wo() {
|
|
|
305
305
|
return Qt || (Qt = 1, process.env.NODE_ENV === "production" ? Qe.exports = go() : Qe.exports = bo()), Qe.exports;
|
|
306
306
|
}
|
|
307
307
|
var l = wo();
|
|
308
|
-
const
|
|
308
|
+
const $n = ds.configure({
|
|
309
309
|
codeBlock: !1
|
|
310
310
|
// We'll use our own code block with syntax highlighting
|
|
311
|
-
}),
|
|
311
|
+
}), yo = Tn.configure({
|
|
312
312
|
resizable: !0
|
|
313
|
-
}),
|
|
313
|
+
}), xo = Tn.extend({
|
|
314
|
+
addNodeView() {
|
|
315
|
+
return ({ node: t }) => new fs(t, this.options.cellMinWidth);
|
|
316
|
+
}
|
|
317
|
+
}).configure({ resizable: !1 }), Hn = ps.configure({
|
|
314
318
|
inline: !1,
|
|
315
319
|
allowBase64: !1,
|
|
316
320
|
// Disable base64 to force URL usage
|
|
@@ -325,7 +329,7 @@ const Fn = ds.configure({
|
|
|
325
329
|
types: ["textStyle"]
|
|
326
330
|
}), qn = bs.configure({
|
|
327
331
|
multicolor: !0
|
|
328
|
-
}),
|
|
332
|
+
}), vo = (t) => ({
|
|
329
333
|
IMPORTANT: {
|
|
330
334
|
scope: "meta",
|
|
331
335
|
begin: "!important"
|
|
@@ -358,7 +362,7 @@ const Fn = ds.configure({
|
|
|
358
362
|
className: "attr",
|
|
359
363
|
begin: /--[A-Za-z_][A-Za-z0-9_-]*/
|
|
360
364
|
}
|
|
361
|
-
}),
|
|
365
|
+
}), Eo = [
|
|
362
366
|
"a",
|
|
363
367
|
"abbr",
|
|
364
368
|
"address",
|
|
@@ -436,7 +440,7 @@ const Fn = ds.configure({
|
|
|
436
440
|
"ul",
|
|
437
441
|
"var",
|
|
438
442
|
"video"
|
|
439
|
-
],
|
|
443
|
+
], No = [
|
|
440
444
|
"defs",
|
|
441
445
|
"g",
|
|
442
446
|
"marker",
|
|
@@ -478,10 +482,10 @@ const Fn = ds.configure({
|
|
|
478
482
|
"tspan",
|
|
479
483
|
"foreignObject",
|
|
480
484
|
"clipPath"
|
|
481
|
-
],
|
|
482
|
-
...
|
|
483
|
-
...
|
|
484
|
-
],
|
|
485
|
+
], _o = [
|
|
486
|
+
...Eo,
|
|
487
|
+
...No
|
|
488
|
+
], Co = [
|
|
485
489
|
"any-hover",
|
|
486
490
|
"any-pointer",
|
|
487
491
|
"aspect-ratio",
|
|
@@ -516,7 +520,7 @@ const Fn = ds.configure({
|
|
|
516
520
|
"max-width",
|
|
517
521
|
"min-height",
|
|
518
522
|
"max-height"
|
|
519
|
-
].sort().reverse(),
|
|
523
|
+
].sort().reverse(), So = [
|
|
520
524
|
"active",
|
|
521
525
|
"any-link",
|
|
522
526
|
"blank",
|
|
@@ -590,7 +594,7 @@ const Fn = ds.configure({
|
|
|
590
594
|
"visited",
|
|
591
595
|
"where"
|
|
592
596
|
// where()
|
|
593
|
-
].sort().reverse(),
|
|
597
|
+
].sort().reverse(), To = [
|
|
594
598
|
"after",
|
|
595
599
|
"backdrop",
|
|
596
600
|
"before",
|
|
@@ -605,7 +609,7 @@ const Fn = ds.configure({
|
|
|
605
609
|
"selection",
|
|
606
610
|
"slotted",
|
|
607
611
|
"spelling-error"
|
|
608
|
-
].sort().reverse(),
|
|
612
|
+
].sort().reverse(), ko = [
|
|
609
613
|
"accent-color",
|
|
610
614
|
"align-content",
|
|
611
615
|
"align-items",
|
|
@@ -1122,8 +1126,8 @@ const Fn = ds.configure({
|
|
|
1122
1126
|
"z-index",
|
|
1123
1127
|
"zoom"
|
|
1124
1128
|
].sort().reverse();
|
|
1125
|
-
function
|
|
1126
|
-
const e = t.regex, n =
|
|
1129
|
+
function Ao(t) {
|
|
1130
|
+
const e = t.regex, n = vo(t), r = { begin: /-(webkit|moz|ms|o)-(?=[a-z])/ }, s = "and or not only", o = /@-?\w[\w]*(-\w+)*/, i = "[a-zA-Z-][a-zA-Z0-9_-]*", a = [
|
|
1127
1131
|
t.APOS_STRING_MODE,
|
|
1128
1132
|
t.QUOTE_STRING_MODE
|
|
1129
1133
|
];
|
|
@@ -1157,8 +1161,8 @@ function To(t) {
|
|
|
1157
1161
|
{
|
|
1158
1162
|
className: "selector-pseudo",
|
|
1159
1163
|
variants: [
|
|
1160
|
-
{ begin: ":(" +
|
|
1161
|
-
{ begin: ":(:)?(" +
|
|
1164
|
+
{ begin: ":(" + So.join("|") + ")" },
|
|
1165
|
+
{ begin: ":(:)?(" + To.join("|") + ")" }
|
|
1162
1166
|
]
|
|
1163
1167
|
},
|
|
1164
1168
|
// we may actually need this (12/2020)
|
|
@@ -1170,7 +1174,7 @@ function To(t) {
|
|
|
1170
1174
|
n.CSS_VARIABLE,
|
|
1171
1175
|
{
|
|
1172
1176
|
className: "attribute",
|
|
1173
|
-
begin: "\\b(" +
|
|
1177
|
+
begin: "\\b(" + ko.join("|") + ")\\b"
|
|
1174
1178
|
},
|
|
1175
1179
|
// attribute values
|
|
1176
1180
|
{
|
|
@@ -1225,7 +1229,7 @@ function To(t) {
|
|
|
1225
1229
|
keywords: {
|
|
1226
1230
|
$pattern: /[a-z-]+/,
|
|
1227
1231
|
keyword: s,
|
|
1228
|
-
attribute:
|
|
1232
|
+
attribute: Co.join(" ")
|
|
1229
1233
|
},
|
|
1230
1234
|
contains: [
|
|
1231
1235
|
{
|
|
@@ -1240,12 +1244,12 @@ function To(t) {
|
|
|
1240
1244
|
},
|
|
1241
1245
|
{
|
|
1242
1246
|
className: "selector-tag",
|
|
1243
|
-
begin: "\\b(" +
|
|
1247
|
+
begin: "\\b(" + _o.join("|") + ")\\b"
|
|
1244
1248
|
}
|
|
1245
1249
|
]
|
|
1246
1250
|
};
|
|
1247
1251
|
}
|
|
1248
|
-
const en = "[A-Za-z$_][0-9A-Za-z$_]*",
|
|
1252
|
+
const en = "[A-Za-z$_][0-9A-Za-z$_]*", Oo = [
|
|
1249
1253
|
"as",
|
|
1250
1254
|
// for exports
|
|
1251
1255
|
"in",
|
|
@@ -1290,7 +1294,7 @@ const en = "[A-Za-z$_][0-9A-Za-z$_]*", ko = [
|
|
|
1290
1294
|
"extends",
|
|
1291
1295
|
// It's reached stage 3, which is "recommended for implementation":
|
|
1292
1296
|
"using"
|
|
1293
|
-
],
|
|
1297
|
+
], Ro = [
|
|
1294
1298
|
"true",
|
|
1295
1299
|
"false",
|
|
1296
1300
|
"null",
|
|
@@ -1374,7 +1378,7 @@ const en = "[A-Za-z$_][0-9A-Za-z$_]*", ko = [
|
|
|
1374
1378
|
"encodeURIComponent",
|
|
1375
1379
|
"escape",
|
|
1376
1380
|
"unescape"
|
|
1377
|
-
],
|
|
1381
|
+
], Io = [
|
|
1378
1382
|
"arguments",
|
|
1379
1383
|
"this",
|
|
1380
1384
|
"super",
|
|
@@ -1386,12 +1390,12 @@ const en = "[A-Za-z$_][0-9A-Za-z$_]*", ko = [
|
|
|
1386
1390
|
"module",
|
|
1387
1391
|
"global"
|
|
1388
1392
|
// Node.js
|
|
1389
|
-
],
|
|
1393
|
+
], Mo = [].concat(
|
|
1390
1394
|
Yn,
|
|
1391
1395
|
Vn,
|
|
1392
1396
|
Gn
|
|
1393
1397
|
);
|
|
1394
|
-
function
|
|
1398
|
+
function Lo(t) {
|
|
1395
1399
|
const e = t.regex, n = (k, { after: P }) => {
|
|
1396
1400
|
const b = "</" + k[0].slice(1);
|
|
1397
1401
|
return k.input.indexOf(b, P) !== -1;
|
|
@@ -1432,10 +1436,10 @@ function Io(t) {
|
|
|
1432
1436
|
}
|
|
1433
1437
|
}, a = {
|
|
1434
1438
|
$pattern: en,
|
|
1435
|
-
keyword:
|
|
1436
|
-
literal:
|
|
1437
|
-
built_in:
|
|
1438
|
-
"variable.language":
|
|
1439
|
+
keyword: Oo,
|
|
1440
|
+
literal: Ro,
|
|
1441
|
+
built_in: Mo,
|
|
1442
|
+
"variable.language": Io
|
|
1439
1443
|
}, c = "[0-9](_?[0-9])*", u = `\\.(${c})`, d = "0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*", f = {
|
|
1440
1444
|
className: "number",
|
|
1441
1445
|
variants: [
|
|
@@ -2046,7 +2050,7 @@ const ct = "[A-Za-z$_][0-9A-Za-z$_]*", Zn = [
|
|
|
2046
2050
|
Qn,
|
|
2047
2051
|
er
|
|
2048
2052
|
);
|
|
2049
|
-
function
|
|
2053
|
+
function Do(t) {
|
|
2050
2054
|
const e = t.regex, n = (k, { after: P }) => {
|
|
2051
2055
|
const b = "</" + k[0].slice(1);
|
|
2052
2056
|
return k.input.indexOf(b, P) !== -1;
|
|
@@ -2555,8 +2559,8 @@ function Mo(t) {
|
|
|
2555
2559
|
]
|
|
2556
2560
|
};
|
|
2557
2561
|
}
|
|
2558
|
-
function
|
|
2559
|
-
const e = t.regex, n =
|
|
2562
|
+
function Po(t) {
|
|
2563
|
+
const e = t.regex, n = Do(t), r = ct, s = [
|
|
2560
2564
|
"any",
|
|
2561
2565
|
"void",
|
|
2562
2566
|
"number",
|
|
@@ -2650,7 +2654,7 @@ function Lo(t) {
|
|
|
2650
2654
|
]
|
|
2651
2655
|
}), n;
|
|
2652
2656
|
}
|
|
2653
|
-
function
|
|
2657
|
+
function jo(t) {
|
|
2654
2658
|
const e = t.regex, n = e.concat(/[\p{L}_]/u, e.optional(/[\p{L}0-9_.-]*:/u), /[\p{L}0-9_.-]*/u), r = /[\p{L}0-9._:-]+/u, s = {
|
|
2655
2659
|
className: "symbol",
|
|
2656
2660
|
begin: /&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/
|
|
@@ -2866,7 +2870,7 @@ function Do(t) {
|
|
|
2866
2870
|
]
|
|
2867
2871
|
};
|
|
2868
2872
|
}
|
|
2869
|
-
function
|
|
2873
|
+
function Bo(t) {
|
|
2870
2874
|
const e = t.regex, n = new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*", "u"), r = [
|
|
2871
2875
|
"and",
|
|
2872
2876
|
"as",
|
|
@@ -3288,7 +3292,7 @@ var Le = "[0-9](_*[0-9])*", et = `\\.(${Le})`, tt = "[0-9a-fA-F](_*[0-9a-fA-F])*
|
|
|
3288
3292
|
function sr(t, e, n) {
|
|
3289
3293
|
return n === -1 ? "" : t.replace(e, (r) => sr(t, e, n - 1));
|
|
3290
3294
|
}
|
|
3291
|
-
function
|
|
3295
|
+
function zo(t) {
|
|
3292
3296
|
const e = t.regex, n = "[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*", r = n + sr("(?:<" + n + "~~~(?:\\s*,\\s*" + n + "~~~)*>)?", /~~~/g, 2), c = {
|
|
3293
3297
|
keyword: [
|
|
3294
3298
|
"synchronized",
|
|
@@ -3499,7 +3503,7 @@ function jo(t) {
|
|
|
3499
3503
|
]
|
|
3500
3504
|
};
|
|
3501
3505
|
}
|
|
3502
|
-
function
|
|
3506
|
+
function Uo(t) {
|
|
3503
3507
|
const e = t.regex, n = t.COMMENT("//", "$", { contains: [{ begin: /\\\n/ }] }), r = "decltype\\(auto\\)", s = "[a-zA-Z_]\\w*::", i = "(" + r + "|" + e.optional(s) + "[a-zA-Z_]\\w*" + e.optional("<[^<>]+>") + ")", a = {
|
|
3504
3508
|
className: "type",
|
|
3505
3509
|
variants: [
|
|
@@ -3773,7 +3777,7 @@ function Bo(t) {
|
|
|
3773
3777
|
}
|
|
3774
3778
|
};
|
|
3775
3779
|
}
|
|
3776
|
-
function
|
|
3780
|
+
function Fo(t) {
|
|
3777
3781
|
const e = t.regex, n = t.COMMENT("//", "$", { contains: [{ begin: /\\\n/ }] }), r = "decltype\\(auto\\)", s = "[a-zA-Z_]\\w*::", i = "(?!struct)(" + r + "|" + e.optional(s) + "[a-zA-Z_]\\w*" + e.optional("<[^<>]+>") + ")", a = {
|
|
3778
3782
|
className: "type",
|
|
3779
3783
|
begin: "\\b[a-z\\d_]*_t\\b"
|
|
@@ -4291,7 +4295,7 @@ function zo(t) {
|
|
|
4291
4295
|
)
|
|
4292
4296
|
};
|
|
4293
4297
|
}
|
|
4294
|
-
function
|
|
4298
|
+
function $o(t) {
|
|
4295
4299
|
const e = t.regex, n = t.COMMENT("--", "$"), r = {
|
|
4296
4300
|
scope: "string",
|
|
4297
4301
|
variants: [
|
|
@@ -4954,15 +4958,15 @@ const or = vs.create({
|
|
|
4954
4958
|
};
|
|
4955
4959
|
}
|
|
4956
4960
|
}), ge = ys(xs);
|
|
4957
|
-
ge.register("html",
|
|
4958
|
-
ge.register("css",
|
|
4959
|
-
ge.register("js",
|
|
4960
|
-
ge.register("ts",
|
|
4961
|
-
ge.register("java",
|
|
4962
|
-
ge.register("c",
|
|
4963
|
-
ge.register("cpp",
|
|
4964
|
-
ge.register("python",
|
|
4965
|
-
ge.register("sql",
|
|
4961
|
+
ge.register("html", jo);
|
|
4962
|
+
ge.register("css", Ao);
|
|
4963
|
+
ge.register("js", Lo);
|
|
4964
|
+
ge.register("ts", Po);
|
|
4965
|
+
ge.register("java", zo);
|
|
4966
|
+
ge.register("c", Uo);
|
|
4967
|
+
ge.register("cpp", Fo);
|
|
4968
|
+
ge.register("python", Bo);
|
|
4969
|
+
ge.register("sql", $o);
|
|
4966
4970
|
const ir = ws.extend({
|
|
4967
4971
|
marks() {
|
|
4968
4972
|
return "codeBlockBg";
|
|
@@ -4970,7 +4974,7 @@ const ir = ws.extend({
|
|
|
4970
4974
|
}).configure({
|
|
4971
4975
|
lowlight: ge
|
|
4972
4976
|
}), ar = Ss, lr = Ts, cr = ks, ur = As;
|
|
4973
|
-
function
|
|
4977
|
+
function Ho({
|
|
4974
4978
|
node: t,
|
|
4975
4979
|
updateAttributes: e,
|
|
4976
4980
|
editor: n
|
|
@@ -5145,7 +5149,7 @@ const dr = Ae.create({
|
|
|
5145
5149
|
];
|
|
5146
5150
|
},
|
|
5147
5151
|
addNodeView() {
|
|
5148
|
-
return mt(
|
|
5152
|
+
return mt(Ho);
|
|
5149
5153
|
},
|
|
5150
5154
|
addKeyboardShortcuts() {
|
|
5151
5155
|
return {
|
|
@@ -5212,7 +5216,7 @@ const dr = Ae.create({
|
|
|
5212
5216
|
};
|
|
5213
5217
|
}
|
|
5214
5218
|
});
|
|
5215
|
-
function
|
|
5219
|
+
function Ko({
|
|
5216
5220
|
node: t,
|
|
5217
5221
|
updateAttributes: e,
|
|
5218
5222
|
editor: n
|
|
@@ -5344,7 +5348,7 @@ function $o({
|
|
|
5344
5348
|
}
|
|
5345
5349
|
);
|
|
5346
5350
|
}
|
|
5347
|
-
function
|
|
5351
|
+
function Jo({
|
|
5348
5352
|
node: t,
|
|
5349
5353
|
editor: e
|
|
5350
5354
|
}) {
|
|
@@ -5403,7 +5407,7 @@ const pr = Ae.create({
|
|
|
5403
5407
|
return ["div", Ee(t, { "data-type": "tabs" }), 0];
|
|
5404
5408
|
},
|
|
5405
5409
|
addNodeView() {
|
|
5406
|
-
return mt(
|
|
5410
|
+
return mt(Ko, {
|
|
5407
5411
|
contentDOMElementTag: "div"
|
|
5408
5412
|
});
|
|
5409
5413
|
},
|
|
@@ -5480,7 +5484,7 @@ const pr = Ae.create({
|
|
|
5480
5484
|
];
|
|
5481
5485
|
},
|
|
5482
5486
|
addNodeView() {
|
|
5483
|
-
return mt(
|
|
5487
|
+
return mt(Jo, {
|
|
5484
5488
|
contentDOMElementTag: "div"
|
|
5485
5489
|
});
|
|
5486
5490
|
},
|
|
@@ -5501,10 +5505,10 @@ const pr = Ae.create({
|
|
|
5501
5505
|
};
|
|
5502
5506
|
}
|
|
5503
5507
|
});
|
|
5504
|
-
function
|
|
5508
|
+
function Wo(...t) {
|
|
5505
5509
|
return no(to(t));
|
|
5506
5510
|
}
|
|
5507
|
-
const
|
|
5511
|
+
const qo = eo(
|
|
5508
5512
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
5509
5513
|
{
|
|
5510
5514
|
variants: {
|
|
@@ -5541,12 +5545,12 @@ function W({
|
|
|
5541
5545
|
o,
|
|
5542
5546
|
{
|
|
5543
5547
|
"data-slot": "button",
|
|
5544
|
-
className:
|
|
5548
|
+
className: Wo(qo({ variant: e, size: n, className: t })),
|
|
5545
5549
|
...s
|
|
5546
5550
|
}
|
|
5547
5551
|
);
|
|
5548
5552
|
}
|
|
5549
|
-
const
|
|
5553
|
+
const Vo = ({
|
|
5550
5554
|
node: t,
|
|
5551
5555
|
updateAttributes: e,
|
|
5552
5556
|
deleteNode: n,
|
|
@@ -5767,7 +5771,7 @@ const Wo = ({
|
|
|
5767
5771
|
allow: t.attrs.allow,
|
|
5768
5772
|
sandbox: t.attrs.sandbox,
|
|
5769
5773
|
style: {
|
|
5770
|
-
...
|
|
5774
|
+
...Go(t.attrs.style),
|
|
5771
5775
|
...d ? {
|
|
5772
5776
|
width: "100vw",
|
|
5773
5777
|
height: "100vh"
|
|
@@ -5843,7 +5847,7 @@ const Wo = ({
|
|
|
5843
5847
|
t.attrs.src
|
|
5844
5848
|
] })
|
|
5845
5849
|
] }) });
|
|
5846
|
-
},
|
|
5850
|
+
}, Go = (t) => {
|
|
5847
5851
|
const e = {};
|
|
5848
5852
|
return t && t.split(";").forEach((n) => {
|
|
5849
5853
|
const [r, s] = n.split(":").map((o) => o.trim());
|
|
@@ -5924,7 +5928,7 @@ const Wo = ({
|
|
|
5924
5928
|
return ["iframe", Ee(t)];
|
|
5925
5929
|
},
|
|
5926
5930
|
addNodeView() {
|
|
5927
|
-
return mt(
|
|
5931
|
+
return mt(Vo);
|
|
5928
5932
|
},
|
|
5929
5933
|
addCommands() {
|
|
5930
5934
|
return {
|
|
@@ -6012,7 +6016,7 @@ const Wo = ({
|
|
|
6012
6016
|
})
|
|
6013
6017
|
};
|
|
6014
6018
|
}
|
|
6015
|
-
}),
|
|
6019
|
+
}), Yo = () => ({
|
|
6016
6020
|
type: "column",
|
|
6017
6021
|
content: [
|
|
6018
6022
|
{
|
|
@@ -6066,7 +6070,7 @@ const Wo = ({
|
|
|
6066
6070
|
insertColumnLayout: (t) => ({ commands: e }) => {
|
|
6067
6071
|
const n = t?.columns ?? this.options.defaultColumns, r = Array.from(
|
|
6068
6072
|
{ length: Math.max(n, 1) },
|
|
6069
|
-
() =>
|
|
6073
|
+
() => Yo()
|
|
6070
6074
|
);
|
|
6071
6075
|
return e.insertContent({
|
|
6072
6076
|
type: this.name,
|
|
@@ -6118,7 +6122,7 @@ const Wo = ({
|
|
|
6118
6122
|
];
|
|
6119
6123
|
}
|
|
6120
6124
|
});
|
|
6121
|
-
function
|
|
6125
|
+
function Zo({
|
|
6122
6126
|
initialOpen: t = !1,
|
|
6123
6127
|
placement: e = "top",
|
|
6124
6128
|
open: n,
|
|
@@ -6169,7 +6173,7 @@ function yr() {
|
|
|
6169
6173
|
return t;
|
|
6170
6174
|
}
|
|
6171
6175
|
function bt({ children: t, ...e }) {
|
|
6172
|
-
const n =
|
|
6176
|
+
const n = Zo(e);
|
|
6173
6177
|
return e.useDelayGroup ? /* @__PURE__ */ l.jsx(
|
|
6174
6178
|
so,
|
|
6175
6179
|
{
|
|
@@ -6186,7 +6190,7 @@ const wt = ue.forwardRef(function({ children: e, asChild: n = !1, ...r }, s) {
|
|
|
6186
6190
|
) : (
|
|
6187
6191
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6188
6192
|
e.ref
|
|
6189
|
-
) : void 0, a =
|
|
6193
|
+
) : void 0, a = Un([o.refs.setReference, s, i]);
|
|
6190
6194
|
if (n && ue.isValidElement(e)) {
|
|
6191
6195
|
const c = {
|
|
6192
6196
|
"data-tooltip-state": o.open ? "open" : "closed"
|
|
@@ -6211,7 +6215,7 @@ const wt = ue.forwardRef(function({ children: e, asChild: n = !1, ...r }, s) {
|
|
|
6211
6215
|
}
|
|
6212
6216
|
);
|
|
6213
6217
|
}), yt = ue.forwardRef(function({ style: e, children: n, portal: r = !0, portalProps: s = {}, ...o }, i) {
|
|
6214
|
-
const a = yr(), c =
|
|
6218
|
+
const a = yr(), c = Un([a.refs.setFloating, i]);
|
|
6215
6219
|
if (!a.open) return null;
|
|
6216
6220
|
const u = /* @__PURE__ */ l.jsx(
|
|
6217
6221
|
"div",
|
|
@@ -6253,7 +6257,7 @@ const D = ({
|
|
|
6253
6257
|
/* @__PURE__ */ l.jsx(wt, { asChild: !0, children: o }),
|
|
6254
6258
|
/* @__PURE__ */ l.jsx(yt, { children: r })
|
|
6255
6259
|
] }) : o;
|
|
6256
|
-
},
|
|
6260
|
+
}, Xo = ({ onColorChange: t }) => {
|
|
6257
6261
|
const e = [
|
|
6258
6262
|
"#000000",
|
|
6259
6263
|
"#ffffff",
|
|
@@ -6282,7 +6286,7 @@ const D = ({
|
|
|
6282
6286
|
n
|
|
6283
6287
|
] })
|
|
6284
6288
|
] }, n)) });
|
|
6285
|
-
},
|
|
6289
|
+
}, Qo = ({ onColorChange: t }) => {
|
|
6286
6290
|
const e = [
|
|
6287
6291
|
"#B0B0B0",
|
|
6288
6292
|
"#F2F0EF",
|
|
@@ -6311,7 +6315,7 @@ const D = ({
|
|
|
6311
6315
|
n
|
|
6312
6316
|
] })
|
|
6313
6317
|
] }, n)) });
|
|
6314
|
-
},
|
|
6318
|
+
}, ei = ({
|
|
6315
6319
|
editor: t,
|
|
6316
6320
|
isReadOnly: e,
|
|
6317
6321
|
onImageUpload: n,
|
|
@@ -6341,7 +6345,7 @@ const D = ({
|
|
|
6341
6345
|
onClick: () => t.chain().focus().toggleHeading({ level: 1 }).run(),
|
|
6342
6346
|
isActive: t.isActive("heading", { level: 1 }),
|
|
6343
6347
|
title: "Heading 1",
|
|
6344
|
-
children: /* @__PURE__ */ l.jsx(
|
|
6348
|
+
children: /* @__PURE__ */ l.jsx(Mn, { className: "h-4 w-4" })
|
|
6345
6349
|
}
|
|
6346
6350
|
),
|
|
6347
6351
|
/* @__PURE__ */ l.jsx(
|
|
@@ -6350,7 +6354,7 @@ const D = ({
|
|
|
6350
6354
|
onClick: () => t.chain().focus().toggleHeading({ level: 2 }).run(),
|
|
6351
6355
|
isActive: t.isActive("heading", { level: 2 }),
|
|
6352
6356
|
title: "Heading 2",
|
|
6353
|
-
children: /* @__PURE__ */ l.jsx(
|
|
6357
|
+
children: /* @__PURE__ */ l.jsx(Ln, { className: "h-4 w-4" })
|
|
6354
6358
|
}
|
|
6355
6359
|
),
|
|
6356
6360
|
/* @__PURE__ */ l.jsx(
|
|
@@ -6359,7 +6363,7 @@ const D = ({
|
|
|
6359
6363
|
onClick: () => t.chain().focus().toggleHeading({ level: 3 }).run(),
|
|
6360
6364
|
isActive: t.isActive("heading", { level: 3 }),
|
|
6361
6365
|
title: "Heading 3",
|
|
6362
|
-
children: /* @__PURE__ */ l.jsx(
|
|
6366
|
+
children: /* @__PURE__ */ l.jsx(Dn, { className: "h-4 w-4" })
|
|
6363
6367
|
}
|
|
6364
6368
|
),
|
|
6365
6369
|
/* @__PURE__ */ l.jsx(
|
|
@@ -6377,7 +6381,7 @@ const D = ({
|
|
|
6377
6381
|
onClick: () => t.chain().focus().setParagraph().run(),
|
|
6378
6382
|
isActive: t.isActive("paragraph"),
|
|
6379
6383
|
title: "Paragraph",
|
|
6380
|
-
children: /* @__PURE__ */ l.jsx(
|
|
6384
|
+
children: /* @__PURE__ */ l.jsx(Pn, { className: "h-4 w-4" })
|
|
6381
6385
|
}
|
|
6382
6386
|
)
|
|
6383
6387
|
] }),
|
|
@@ -6436,7 +6440,7 @@ const D = ({
|
|
|
6436
6440
|
onClick: () => a(!i),
|
|
6437
6441
|
title: "Insert Image",
|
|
6438
6442
|
className: s ? "opacity-50" : "",
|
|
6439
|
-
children: s ? /* @__PURE__ */ l.jsx("div", { className: "animate-spin rounded-full h-4 w-4 border-b-2 border-blue-600" }) : /* @__PURE__ */ l.jsx(
|
|
6443
|
+
children: s ? /* @__PURE__ */ l.jsx("div", { className: "animate-spin rounded-full h-4 w-4 border-b-2 border-blue-600" }) : /* @__PURE__ */ l.jsx(jn, { className: "h-4 w-4" })
|
|
6440
6444
|
}
|
|
6441
6445
|
),
|
|
6442
6446
|
s && /* @__PURE__ */ l.jsx("div", { className: "absolute -top-1 -right-1 w-3 h-3 bg-blue-600 rounded-full animate-pulse" }),
|
|
@@ -6584,7 +6588,7 @@ const D = ({
|
|
|
6584
6588
|
className: "w-full px-2",
|
|
6585
6589
|
children: /* @__PURE__ */ l.jsxs("div", { className: "flex items-center gap-1 w-full justify-between", children: [
|
|
6586
6590
|
/* @__PURE__ */ l.jsx("span", { className: "text-xs font-mono", children: "Tabs" }),
|
|
6587
|
-
/* @__PURE__ */ l.jsx(
|
|
6591
|
+
/* @__PURE__ */ l.jsx(Bn, { className: "h-3 w-3" })
|
|
6588
6592
|
] })
|
|
6589
6593
|
}
|
|
6590
6594
|
),
|
|
@@ -6675,12 +6679,12 @@ const D = ({
|
|
|
6675
6679
|
}, xr = ["top", "right", "bottom", "left"], nn = ["start", "end"], rn = /* @__PURE__ */ xr.reduce((t, e) => t.concat(e, e + "-" + nn[0], e + "-" + nn[1]), []), he = Math.min, Q = Math.max, ut = Math.round, fe = (t) => ({
|
|
6676
6680
|
x: t,
|
|
6677
6681
|
y: t
|
|
6678
|
-
}),
|
|
6682
|
+
}), ti = {
|
|
6679
6683
|
left: "right",
|
|
6680
6684
|
right: "left",
|
|
6681
6685
|
bottom: "top",
|
|
6682
6686
|
top: "bottom"
|
|
6683
|
-
},
|
|
6687
|
+
}, ni = {
|
|
6684
6688
|
start: "end",
|
|
6685
6689
|
end: "start"
|
|
6686
6690
|
};
|
|
@@ -6702,9 +6706,9 @@ function vr(t) {
|
|
|
6702
6706
|
function $t(t) {
|
|
6703
6707
|
return t === "y" ? "height" : "width";
|
|
6704
6708
|
}
|
|
6705
|
-
const
|
|
6709
|
+
const ri = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
6706
6710
|
function de(t) {
|
|
6707
|
-
return
|
|
6711
|
+
return ri.has(ie(t)) ? "y" : "x";
|
|
6708
6712
|
}
|
|
6709
6713
|
function Ht(t) {
|
|
6710
6714
|
return vr(de(t));
|
|
@@ -6715,35 +6719,35 @@ function Er(t, e, n) {
|
|
|
6715
6719
|
let i = s === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
6716
6720
|
return e.reference[o] > e.floating[o] && (i = ft(i)), [i, ft(i)];
|
|
6717
6721
|
}
|
|
6718
|
-
function
|
|
6722
|
+
function si(t) {
|
|
6719
6723
|
const e = ft(t);
|
|
6720
6724
|
return [dt(t), e, dt(e)];
|
|
6721
6725
|
}
|
|
6722
6726
|
function dt(t) {
|
|
6723
|
-
return t.replace(/start|end/g, (e) =>
|
|
6727
|
+
return t.replace(/start|end/g, (e) => ni[e]);
|
|
6724
6728
|
}
|
|
6725
|
-
const sn = ["left", "right"], on = ["right", "left"],
|
|
6726
|
-
function
|
|
6729
|
+
const sn = ["left", "right"], on = ["right", "left"], oi = ["top", "bottom"], ii = ["bottom", "top"];
|
|
6730
|
+
function ai(t, e, n) {
|
|
6727
6731
|
switch (t) {
|
|
6728
6732
|
case "top":
|
|
6729
6733
|
case "bottom":
|
|
6730
6734
|
return n ? e ? on : sn : e ? sn : on;
|
|
6731
6735
|
case "left":
|
|
6732
6736
|
case "right":
|
|
6733
|
-
return e ?
|
|
6737
|
+
return e ? oi : ii;
|
|
6734
6738
|
default:
|
|
6735
6739
|
return [];
|
|
6736
6740
|
}
|
|
6737
6741
|
}
|
|
6738
|
-
function
|
|
6742
|
+
function li(t, e, n, r) {
|
|
6739
6743
|
const s = ae(t);
|
|
6740
|
-
let o =
|
|
6744
|
+
let o = ai(ie(t), n === "start", r);
|
|
6741
6745
|
return s && (o = o.map((i) => i + "-" + s), e && (o = o.concat(o.map(dt)))), o;
|
|
6742
6746
|
}
|
|
6743
6747
|
function ft(t) {
|
|
6744
|
-
return t.replace(/left|right|bottom|top/g, (e) =>
|
|
6748
|
+
return t.replace(/left|right|bottom|top/g, (e) => ti[e]);
|
|
6745
6749
|
}
|
|
6746
|
-
function
|
|
6750
|
+
function ci(t) {
|
|
6747
6751
|
return {
|
|
6748
6752
|
top: 0,
|
|
6749
6753
|
right: 0,
|
|
@@ -6753,7 +6757,7 @@ function ai(t) {
|
|
|
6753
6757
|
};
|
|
6754
6758
|
}
|
|
6755
6759
|
function Kt(t) {
|
|
6756
|
-
return typeof t != "number" ?
|
|
6760
|
+
return typeof t != "number" ? ci(t) : {
|
|
6757
6761
|
top: t,
|
|
6758
6762
|
right: t,
|
|
6759
6763
|
bottom: t,
|
|
@@ -6826,7 +6830,7 @@ function an(t, e, n) {
|
|
|
6826
6830
|
}
|
|
6827
6831
|
return p;
|
|
6828
6832
|
}
|
|
6829
|
-
const
|
|
6833
|
+
const ui = async (t, e, n) => {
|
|
6830
6834
|
const {
|
|
6831
6835
|
placement: r = "bottom",
|
|
6832
6836
|
strategy: s = "absolute",
|
|
@@ -6932,7 +6936,7 @@ async function ze(t, e) {
|
|
|
6932
6936
|
right: (x.right - N.right + m.right) / _.x
|
|
6933
6937
|
};
|
|
6934
6938
|
}
|
|
6935
|
-
const
|
|
6939
|
+
const di = (t) => ({
|
|
6936
6940
|
name: "arrow",
|
|
6937
6941
|
options: t,
|
|
6938
6942
|
async fn(e) {
|
|
@@ -6970,10 +6974,10 @@ const ci = (t) => ({
|
|
|
6970
6974
|
};
|
|
6971
6975
|
}
|
|
6972
6976
|
});
|
|
6973
|
-
function
|
|
6977
|
+
function fi(t, e, n) {
|
|
6974
6978
|
return (t ? [...n.filter((s) => ae(s) === t), ...n.filter((s) => ae(s) !== t)] : n.filter((s) => ie(s) === s)).filter((s) => t ? ae(s) === t || (e ? dt(s) !== s : !1) : !0);
|
|
6975
6979
|
}
|
|
6976
|
-
const
|
|
6980
|
+
const pi = function(t) {
|
|
6977
6981
|
return t === void 0 && (t = {}), {
|
|
6978
6982
|
name: "autoPlacement",
|
|
6979
6983
|
options: t,
|
|
@@ -6991,7 +6995,7 @@ const di = function(t) {
|
|
|
6991
6995
|
allowedPlacements: h = rn,
|
|
6992
6996
|
autoAlignment: p = !0,
|
|
6993
6997
|
...m
|
|
6994
|
-
} = Ne(t, e), w = f !== void 0 || h === rn ?
|
|
6998
|
+
} = Ne(t, e), w = f !== void 0 || h === rn ? fi(f || null, p, h) : h, g = await ze(e, m), N = ((n = i.autoPlacement) == null ? void 0 : n.index) || 0, C = w[N];
|
|
6995
6999
|
if (C == null)
|
|
6996
7000
|
return {};
|
|
6997
7001
|
const y = Er(C, o, await (c.isRTL == null ? void 0 : c.isRTL(u.floating)));
|
|
@@ -7041,7 +7045,7 @@ const di = function(t) {
|
|
|
7041
7045
|
} : {};
|
|
7042
7046
|
}
|
|
7043
7047
|
};
|
|
7044
|
-
},
|
|
7048
|
+
}, hi = function(t) {
|
|
7045
7049
|
return t === void 0 && (t = {}), {
|
|
7046
7050
|
name: "flip",
|
|
7047
7051
|
options: t,
|
|
@@ -7065,8 +7069,8 @@ const di = function(t) {
|
|
|
7065
7069
|
} = Ne(t, e);
|
|
7066
7070
|
if ((n = o.arrow) != null && n.alignmentOffset)
|
|
7067
7071
|
return {};
|
|
7068
|
-
const N = ie(s), C = de(a), y = ie(a) === a, _ = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), x = h || (y || !w ? [ft(a)] :
|
|
7069
|
-
!h && S && x.push(...
|
|
7072
|
+
const N = ie(s), C = de(a), y = ie(a) === a, _ = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), x = h || (y || !w ? [ft(a)] : si(a)), S = m !== "none";
|
|
7073
|
+
!h && S && x.push(...li(a, w, m, _));
|
|
7070
7074
|
const M = [a, ...x], v = await ze(e, g), B = [];
|
|
7071
7075
|
let E = ((r = o.flip) == null ? void 0 : r.overflows) || [];
|
|
7072
7076
|
if (d && B.push(v[N]), f) {
|
|
@@ -7134,7 +7138,7 @@ function ln(t, e) {
|
|
|
7134
7138
|
function cn(t) {
|
|
7135
7139
|
return xr.some((e) => t[e] >= 0);
|
|
7136
7140
|
}
|
|
7137
|
-
const
|
|
7141
|
+
const mi = function(t) {
|
|
7138
7142
|
return t === void 0 && (t = {}), {
|
|
7139
7143
|
name: "hide",
|
|
7140
7144
|
options: t,
|
|
@@ -7185,7 +7189,7 @@ function Nr(t) {
|
|
|
7185
7189
|
height: s - n
|
|
7186
7190
|
};
|
|
7187
7191
|
}
|
|
7188
|
-
function
|
|
7192
|
+
function gi(t) {
|
|
7189
7193
|
const e = t.slice().sort((s, o) => s.y - o.y), n = [];
|
|
7190
7194
|
let r = null;
|
|
7191
7195
|
for (let s = 0; s < e.length; s++) {
|
|
@@ -7194,7 +7198,7 @@ function hi(t) {
|
|
|
7194
7198
|
}
|
|
7195
7199
|
return n.map((s) => Be(Nr(s)));
|
|
7196
7200
|
}
|
|
7197
|
-
const
|
|
7201
|
+
const bi = function(t) {
|
|
7198
7202
|
return t === void 0 && (t = {}), {
|
|
7199
7203
|
name: "inline",
|
|
7200
7204
|
options: t,
|
|
@@ -7209,7 +7213,7 @@ const mi = function(t) {
|
|
|
7209
7213
|
padding: a = 2,
|
|
7210
7214
|
x: c,
|
|
7211
7215
|
y: u
|
|
7212
|
-
} = Ne(t, e), d = Array.from(await (o.getClientRects == null ? void 0 : o.getClientRects(r.reference)) || []), f =
|
|
7216
|
+
} = Ne(t, e), d = Array.from(await (o.getClientRects == null ? void 0 : o.getClientRects(r.reference)) || []), f = gi(d), h = Be(Nr(d)), p = Kt(a);
|
|
7213
7217
|
function m() {
|
|
7214
7218
|
if (f.length === 2 && f[0].left > f[1].right && c != null && u != null)
|
|
7215
7219
|
return f.find((g) => c > g.left - p.left && c < g.right + p.right && u > g.top - p.top && u < g.bottom + p.bottom) || h;
|
|
@@ -7255,13 +7259,13 @@ const mi = function(t) {
|
|
|
7255
7259
|
} : {};
|
|
7256
7260
|
}
|
|
7257
7261
|
};
|
|
7258
|
-
},
|
|
7259
|
-
async function
|
|
7262
|
+
}, wi = /* @__PURE__ */ new Set(["left", "top"]);
|
|
7263
|
+
async function yi(t, e) {
|
|
7260
7264
|
const {
|
|
7261
7265
|
placement: n,
|
|
7262
7266
|
platform: r,
|
|
7263
7267
|
elements: s
|
|
7264
|
-
} = t, o = await (r.isRTL == null ? void 0 : r.isRTL(s.floating)), i = ie(n), a = ae(n), c = de(n) === "y", u =
|
|
7268
|
+
} = t, o = await (r.isRTL == null ? void 0 : r.isRTL(s.floating)), i = ie(n), a = ae(n), c = de(n) === "y", u = wi.has(i) ? -1 : 1, d = o && c ? -1 : 1, f = Ne(e, t);
|
|
7265
7269
|
let {
|
|
7266
7270
|
mainAxis: h,
|
|
7267
7271
|
crossAxis: p,
|
|
@@ -7283,7 +7287,7 @@ async function bi(t, e) {
|
|
|
7283
7287
|
y: p * d
|
|
7284
7288
|
};
|
|
7285
7289
|
}
|
|
7286
|
-
const
|
|
7290
|
+
const xi = function(t) {
|
|
7287
7291
|
return t === void 0 && (t = 0), {
|
|
7288
7292
|
name: "offset",
|
|
7289
7293
|
options: t,
|
|
@@ -7294,7 +7298,7 @@ const wi = function(t) {
|
|
|
7294
7298
|
y: o,
|
|
7295
7299
|
placement: i,
|
|
7296
7300
|
middlewareData: a
|
|
7297
|
-
} = e, c = await
|
|
7301
|
+
} = e, c = await yi(e, t);
|
|
7298
7302
|
return i === ((n = a.offset) == null ? void 0 : n.placement) && (r = a.arrow) != null && r.alignmentOffset ? {} : {
|
|
7299
7303
|
x: s + c.x,
|
|
7300
7304
|
y: o + c.y,
|
|
@@ -7305,7 +7309,7 @@ const wi = function(t) {
|
|
|
7305
7309
|
};
|
|
7306
7310
|
}
|
|
7307
7311
|
};
|
|
7308
|
-
},
|
|
7312
|
+
}, vi = function(t) {
|
|
7309
7313
|
return t === void 0 && (t = {}), {
|
|
7310
7314
|
name: "shift",
|
|
7311
7315
|
options: t,
|
|
@@ -7361,7 +7365,7 @@ const wi = function(t) {
|
|
|
7361
7365
|
};
|
|
7362
7366
|
}
|
|
7363
7367
|
};
|
|
7364
|
-
},
|
|
7368
|
+
}, Ei = function(t) {
|
|
7365
7369
|
return t === void 0 && (t = {}), {
|
|
7366
7370
|
name: "size",
|
|
7367
7371
|
options: t,
|
|
@@ -7428,7 +7432,7 @@ function me(t) {
|
|
|
7428
7432
|
function un(t) {
|
|
7429
7433
|
return !xt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof re(t).ShadowRoot;
|
|
7430
7434
|
}
|
|
7431
|
-
const
|
|
7435
|
+
const Ni = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
7432
7436
|
function Ye(t) {
|
|
7433
7437
|
const {
|
|
7434
7438
|
overflow: e,
|
|
@@ -7436,15 +7440,15 @@ function Ye(t) {
|
|
|
7436
7440
|
overflowY: r,
|
|
7437
7441
|
display: s
|
|
7438
7442
|
} = ce(t);
|
|
7439
|
-
return /auto|scroll|overlay|hidden|clip/.test(e + r + n) && !
|
|
7443
|
+
return /auto|scroll|overlay|hidden|clip/.test(e + r + n) && !Ni.has(s);
|
|
7440
7444
|
}
|
|
7441
|
-
const
|
|
7442
|
-
function
|
|
7443
|
-
return
|
|
7445
|
+
const _i = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
7446
|
+
function Ci(t) {
|
|
7447
|
+
return _i.has(Fe(t));
|
|
7444
7448
|
}
|
|
7445
|
-
const
|
|
7449
|
+
const Si = [":popover-open", ":modal"];
|
|
7446
7450
|
function vt(t) {
|
|
7447
|
-
return
|
|
7451
|
+
return Si.some((e) => {
|
|
7448
7452
|
try {
|
|
7449
7453
|
return t.matches(e);
|
|
7450
7454
|
} catch {
|
|
@@ -7452,12 +7456,12 @@ function vt(t) {
|
|
|
7452
7456
|
}
|
|
7453
7457
|
});
|
|
7454
7458
|
}
|
|
7455
|
-
const
|
|
7459
|
+
const Ti = ["transform", "translate", "scale", "rotate", "perspective"], ki = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Ai = ["paint", "layout", "strict", "content"];
|
|
7456
7460
|
function Jt(t) {
|
|
7457
7461
|
const e = Wt(), n = le(t) ? ce(t) : t;
|
|
7458
|
-
return
|
|
7462
|
+
return Ti.some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || ki.some((r) => (n.willChange || "").includes(r)) || Ai.some((r) => (n.contain || "").includes(r));
|
|
7459
7463
|
}
|
|
7460
|
-
function
|
|
7464
|
+
function Oi(t) {
|
|
7461
7465
|
let e = Se(t);
|
|
7462
7466
|
for (; me(e) && !Ue(e); ) {
|
|
7463
7467
|
if (Jt(e))
|
|
@@ -7471,9 +7475,9 @@ function ki(t) {
|
|
|
7471
7475
|
function Wt() {
|
|
7472
7476
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
7473
7477
|
}
|
|
7474
|
-
const
|
|
7478
|
+
const Ri = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
7475
7479
|
function Ue(t) {
|
|
7476
|
-
return
|
|
7480
|
+
return Ri.has(Fe(t));
|
|
7477
7481
|
}
|
|
7478
7482
|
function ce(t) {
|
|
7479
7483
|
return re(t).getComputedStyle(t);
|
|
@@ -7540,15 +7544,15 @@ function Pe(t) {
|
|
|
7540
7544
|
y: a
|
|
7541
7545
|
};
|
|
7542
7546
|
}
|
|
7543
|
-
const
|
|
7547
|
+
const Ii = /* @__PURE__ */ fe(0);
|
|
7544
7548
|
function Ar(t) {
|
|
7545
7549
|
const e = re(t);
|
|
7546
|
-
return !Wt() || !e.visualViewport ?
|
|
7550
|
+
return !Wt() || !e.visualViewport ? Ii : {
|
|
7547
7551
|
x: e.visualViewport.offsetLeft,
|
|
7548
7552
|
y: e.visualViewport.offsetTop
|
|
7549
7553
|
};
|
|
7550
7554
|
}
|
|
7551
|
-
function
|
|
7555
|
+
function Mi(t, e, n) {
|
|
7552
7556
|
return e === void 0 && (e = !1), !n || e && n !== re(t) ? !1 : e;
|
|
7553
7557
|
}
|
|
7554
7558
|
function qe(t, e, n, r) {
|
|
@@ -7556,7 +7560,7 @@ function qe(t, e, n, r) {
|
|
|
7556
7560
|
const s = t.getBoundingClientRect(), o = kr(t);
|
|
7557
7561
|
let i = fe(1);
|
|
7558
7562
|
e && (r ? le(r) && (i = Pe(r)) : i = Pe(t));
|
|
7559
|
-
const a =
|
|
7563
|
+
const a = Mi(o, n, r) ? Ar(o) : fe(0);
|
|
7560
7564
|
let c = (s.left + a.x) / i.x, u = (s.top + a.y) / i.y, d = s.width / i.x, f = s.height / i.y;
|
|
7561
7565
|
if (o) {
|
|
7562
7566
|
const h = re(o), p = r && le(r) ? re(r) : r;
|
|
@@ -7584,7 +7588,7 @@ function Or(t, e) {
|
|
|
7584
7588
|
y: s
|
|
7585
7589
|
};
|
|
7586
7590
|
}
|
|
7587
|
-
function
|
|
7591
|
+
function Li(t) {
|
|
7588
7592
|
let {
|
|
7589
7593
|
elements: e,
|
|
7590
7594
|
rect: n,
|
|
@@ -7611,10 +7615,10 @@ function Ii(t) {
|
|
|
7611
7615
|
y: n.y * u.y - c.scrollTop * u.y + d.y + h.y
|
|
7612
7616
|
};
|
|
7613
7617
|
}
|
|
7614
|
-
function
|
|
7618
|
+
function Di(t) {
|
|
7615
7619
|
return Array.from(t.getClientRects());
|
|
7616
7620
|
}
|
|
7617
|
-
function
|
|
7621
|
+
function Pi(t) {
|
|
7618
7622
|
const e = _e(t), n = Et(t), r = t.ownerDocument.body, s = Q(e.scrollWidth, e.clientWidth, r.scrollWidth, r.clientWidth), o = Q(e.scrollHeight, e.clientHeight, r.scrollHeight, r.clientHeight);
|
|
7619
7623
|
let i = -n.scrollLeft + Nt(t);
|
|
7620
7624
|
const a = -n.scrollTop;
|
|
@@ -7626,7 +7630,7 @@ function Li(t) {
|
|
|
7626
7630
|
};
|
|
7627
7631
|
}
|
|
7628
7632
|
const dn = 25;
|
|
7629
|
-
function
|
|
7633
|
+
function ji(t, e) {
|
|
7630
7634
|
const n = re(t), r = _e(t), s = n.visualViewport;
|
|
7631
7635
|
let o = r.clientWidth, i = r.clientHeight, a = 0, c = 0;
|
|
7632
7636
|
if (s) {
|
|
@@ -7646,8 +7650,8 @@ function Di(t, e) {
|
|
|
7646
7650
|
y: c
|
|
7647
7651
|
};
|
|
7648
7652
|
}
|
|
7649
|
-
const
|
|
7650
|
-
function
|
|
7653
|
+
const Bi = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
7654
|
+
function zi(t, e) {
|
|
7651
7655
|
const n = qe(t, !0, e === "fixed"), r = n.top + t.clientTop, s = n.left + t.clientLeft, o = me(t) ? Pe(t) : fe(1), i = t.clientWidth * o.x, a = t.clientHeight * o.y, c = s * o.x, u = r * o.y;
|
|
7652
7656
|
return {
|
|
7653
7657
|
width: i,
|
|
@@ -7659,11 +7663,11 @@ function ji(t, e) {
|
|
|
7659
7663
|
function fn(t, e, n) {
|
|
7660
7664
|
let r;
|
|
7661
7665
|
if (e === "viewport")
|
|
7662
|
-
r =
|
|
7666
|
+
r = ji(t, n);
|
|
7663
7667
|
else if (e === "document")
|
|
7664
|
-
r =
|
|
7668
|
+
r = Pi(_e(t));
|
|
7665
7669
|
else if (le(e))
|
|
7666
|
-
r =
|
|
7670
|
+
r = zi(e, n);
|
|
7667
7671
|
else {
|
|
7668
7672
|
const s = Ar(t);
|
|
7669
7673
|
r = {
|
|
@@ -7679,7 +7683,7 @@ function Rr(t, e) {
|
|
|
7679
7683
|
const n = Se(t);
|
|
7680
7684
|
return n === e || !le(n) || Ue(n) ? !1 : ce(n).position === "fixed" || Rr(n, e);
|
|
7681
7685
|
}
|
|
7682
|
-
function
|
|
7686
|
+
function Ui(t, e) {
|
|
7683
7687
|
const n = e.get(t);
|
|
7684
7688
|
if (n)
|
|
7685
7689
|
return n;
|
|
@@ -7688,18 +7692,18 @@ function Bi(t, e) {
|
|
|
7688
7692
|
let i = o ? Se(t) : t;
|
|
7689
7693
|
for (; le(i) && !Ue(i); ) {
|
|
7690
7694
|
const a = ce(i), c = Jt(i);
|
|
7691
|
-
!c && a.position === "fixed" && (s = null), (o ? !c && !s : !c && a.position === "static" && !!s &&
|
|
7695
|
+
!c && a.position === "fixed" && (s = null), (o ? !c && !s : !c && a.position === "static" && !!s && Bi.has(s.position) || Ye(i) && !c && Rr(t, i)) ? r = r.filter((d) => d !== i) : s = a, i = Se(i);
|
|
7692
7696
|
}
|
|
7693
7697
|
return e.set(t, r), r;
|
|
7694
7698
|
}
|
|
7695
|
-
function
|
|
7699
|
+
function Fi(t) {
|
|
7696
7700
|
let {
|
|
7697
7701
|
element: e,
|
|
7698
7702
|
boundary: n,
|
|
7699
7703
|
rootBoundary: r,
|
|
7700
7704
|
strategy: s
|
|
7701
7705
|
} = t;
|
|
7702
|
-
const i = [...n === "clippingAncestors" ? vt(e) ? [] :
|
|
7706
|
+
const i = [...n === "clippingAncestors" ? vt(e) ? [] : Ui(e, this._c) : [].concat(n), r], a = i[0], c = i.reduce((u, d) => {
|
|
7703
7707
|
const f = fn(e, d, s);
|
|
7704
7708
|
return u.top = Q(f.top, u.top), u.right = he(f.right, u.right), u.bottom = he(f.bottom, u.bottom), u.left = Q(f.left, u.left), u;
|
|
7705
7709
|
}, fn(e, a, s));
|
|
@@ -7710,7 +7714,7 @@ function zi(t) {
|
|
|
7710
7714
|
y: c.top
|
|
7711
7715
|
};
|
|
7712
7716
|
}
|
|
7713
|
-
function
|
|
7717
|
+
function $i(t) {
|
|
7714
7718
|
const {
|
|
7715
7719
|
width: e,
|
|
7716
7720
|
height: n
|
|
@@ -7720,7 +7724,7 @@ function Ui(t) {
|
|
|
7720
7724
|
height: n
|
|
7721
7725
|
};
|
|
7722
7726
|
}
|
|
7723
|
-
function
|
|
7727
|
+
function Hi(t, e, n) {
|
|
7724
7728
|
const r = me(e), s = _e(e), o = n === "fixed", i = qe(t, !0, o, e);
|
|
7725
7729
|
let a = {
|
|
7726
7730
|
scrollLeft: 0,
|
|
@@ -7769,14 +7773,14 @@ function Ir(t, e) {
|
|
|
7769
7773
|
return n;
|
|
7770
7774
|
}
|
|
7771
7775
|
let r = pn(t, e);
|
|
7772
|
-
for (; r &&
|
|
7776
|
+
for (; r && Ci(r) && Ct(r); )
|
|
7773
7777
|
r = pn(r, e);
|
|
7774
|
-
return r && Ue(r) && Ct(r) && !Jt(r) ? n : r ||
|
|
7778
|
+
return r && Ue(r) && Ct(r) && !Jt(r) ? n : r || Oi(t) || n;
|
|
7775
7779
|
}
|
|
7776
|
-
const
|
|
7780
|
+
const Ki = async function(t) {
|
|
7777
7781
|
const e = this.getOffsetParent || Ir, n = this.getDimensions, r = await n(t.floating);
|
|
7778
7782
|
return {
|
|
7779
|
-
reference:
|
|
7783
|
+
reference: Hi(t.reference, await e(t.floating), t.strategy),
|
|
7780
7784
|
floating: {
|
|
7781
7785
|
x: 0,
|
|
7782
7786
|
y: 0,
|
|
@@ -7785,29 +7789,29 @@ const $i = async function(t) {
|
|
|
7785
7789
|
}
|
|
7786
7790
|
};
|
|
7787
7791
|
};
|
|
7788
|
-
function
|
|
7792
|
+
function Ji(t) {
|
|
7789
7793
|
return ce(t).direction === "rtl";
|
|
7790
7794
|
}
|
|
7791
|
-
const
|
|
7792
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
7795
|
+
const Wi = {
|
|
7796
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Li,
|
|
7793
7797
|
getDocumentElement: _e,
|
|
7794
|
-
getClippingRect:
|
|
7798
|
+
getClippingRect: Fi,
|
|
7795
7799
|
getOffsetParent: Ir,
|
|
7796
|
-
getElementRects:
|
|
7797
|
-
getClientRects:
|
|
7798
|
-
getDimensions:
|
|
7800
|
+
getElementRects: Ki,
|
|
7801
|
+
getClientRects: Di,
|
|
7802
|
+
getDimensions: $i,
|
|
7799
7803
|
getScale: Pe,
|
|
7800
7804
|
isElement: le,
|
|
7801
|
-
isRTL:
|
|
7802
|
-
}, Mr =
|
|
7805
|
+
isRTL: Ji
|
|
7806
|
+
}, Mr = xi, Lr = pi, Dr = vi, Pr = hi, jr = Ei, Br = mi, zr = di, Ur = bi, Fr = (t, e, n) => {
|
|
7803
7807
|
const r = /* @__PURE__ */ new Map(), s = {
|
|
7804
|
-
platform:
|
|
7808
|
+
platform: Wi,
|
|
7805
7809
|
...n
|
|
7806
7810
|
}, o = {
|
|
7807
7811
|
...s.platform,
|
|
7808
7812
|
_c: r
|
|
7809
7813
|
};
|
|
7810
|
-
return
|
|
7814
|
+
return ui(t, e, {
|
|
7811
7815
|
...s,
|
|
7812
7816
|
platform: o
|
|
7813
7817
|
});
|
|
@@ -8118,7 +8122,7 @@ const St = { index: 0, offset: 0 };
|
|
|
8118
8122
|
function nt(t, e) {
|
|
8119
8123
|
return St.index = t, St.offset = e, St;
|
|
8120
8124
|
}
|
|
8121
|
-
class
|
|
8125
|
+
class qi extends Error {
|
|
8122
8126
|
}
|
|
8123
8127
|
class U {
|
|
8124
8128
|
/**
|
|
@@ -8220,13 +8224,13 @@ function Jr(t, e, n, r) {
|
|
|
8220
8224
|
return a && t.replaceChild(s, i.copy(a));
|
|
8221
8225
|
}
|
|
8222
8226
|
const Wr = 65535, qr = Math.pow(2, 16);
|
|
8223
|
-
function
|
|
8227
|
+
function Vi(t, e) {
|
|
8224
8228
|
return t + e * qr;
|
|
8225
8229
|
}
|
|
8226
8230
|
function hn(t) {
|
|
8227
8231
|
return t & Wr;
|
|
8228
8232
|
}
|
|
8229
|
-
function
|
|
8233
|
+
function Gi(t) {
|
|
8230
8234
|
return (t - (t & Wr)) / qr;
|
|
8231
8235
|
}
|
|
8232
8236
|
const Vr = 1, Gr = 2, at = 4, Yr = 8;
|
|
@@ -8284,7 +8288,7 @@ class ne {
|
|
|
8284
8288
|
if (!this.inverted)
|
|
8285
8289
|
for (let s = 0; s < r; s++)
|
|
8286
8290
|
n += this.ranges[s * 3 + 2] - this.ranges[s * 3 + 1];
|
|
8287
|
-
return this.ranges[r * 3] + n +
|
|
8291
|
+
return this.ranges[r * 3] + n + Gi(e);
|
|
8288
8292
|
}
|
|
8289
8293
|
mapResult(e, n = 1) {
|
|
8290
8294
|
return this._map(e, n, !1);
|
|
@@ -8306,7 +8310,7 @@ class ne {
|
|
|
8306
8310
|
let h = u ? e == c ? -1 : e == f ? 1 : n : n, p = c + s + (h < 0 ? 0 : d);
|
|
8307
8311
|
if (r)
|
|
8308
8312
|
return p;
|
|
8309
|
-
let m = e == (n < 0 ? c : f) ? null :
|
|
8313
|
+
let m = e == (n < 0 ? c : f) ? null : Vi(a / 3, e - c), w = e == c ? Gr : e == f ? Vr : at;
|
|
8310
8314
|
return (n < 0 ? e != c : e != f) && (w |= Yr), new mn(p, w, m);
|
|
8311
8315
|
}
|
|
8312
8316
|
s += d - u;
|
|
@@ -8433,7 +8437,7 @@ class q {
|
|
|
8433
8437
|
try {
|
|
8434
8438
|
return q.ok(e.replace(n, r, s));
|
|
8435
8439
|
} catch (o) {
|
|
8436
|
-
if (o instanceof
|
|
8440
|
+
if (o instanceof qi)
|
|
8437
8441
|
return q.fail(o.message);
|
|
8438
8442
|
throw o;
|
|
8439
8443
|
}
|
|
@@ -9163,11 +9167,11 @@ class ve extends H {
|
|
|
9163
9167
|
return e instanceof ve;
|
|
9164
9168
|
}
|
|
9165
9169
|
getBookmark() {
|
|
9166
|
-
return
|
|
9170
|
+
return Yi;
|
|
9167
9171
|
}
|
|
9168
9172
|
}
|
|
9169
9173
|
H.jsonID("all", ve);
|
|
9170
|
-
const
|
|
9174
|
+
const Yi = {
|
|
9171
9175
|
map() {
|
|
9172
9176
|
return this;
|
|
9173
9177
|
},
|
|
@@ -9365,18 +9369,18 @@ var Te = {
|
|
|
9365
9369
|
220: "|",
|
|
9366
9370
|
221: "}",
|
|
9367
9371
|
222: '"'
|
|
9368
|
-
},
|
|
9372
|
+
}, Zi = typeof navigator < "u" && /Mac/.test(navigator.platform), Xi = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
|
|
9369
9373
|
for (var Y = 0; Y < 10; Y++) Te[48 + Y] = Te[96 + Y] = String(Y);
|
|
9370
9374
|
for (var Y = 1; Y <= 24; Y++) Te[Y + 111] = "F" + Y;
|
|
9371
9375
|
for (var Y = 65; Y <= 90; Y++)
|
|
9372
9376
|
Te[Y] = String.fromCharCode(Y + 32), ht[Y] = String.fromCharCode(Y);
|
|
9373
9377
|
for (var Ot in Te) ht.hasOwnProperty(Ot) || (ht[Ot] = Te[Ot]);
|
|
9374
|
-
function
|
|
9375
|
-
var e =
|
|
9378
|
+
function Qi(t) {
|
|
9379
|
+
var e = Zi && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || Xi && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ? ht : Te)[t.keyCode] || t.key || "Unidentified";
|
|
9376
9380
|
return n == "Esc" && (n = "Escape"), n == "Del" && (n = "Delete"), n == "Left" && (n = "ArrowLeft"), n == "Up" && (n = "ArrowUp"), n == "Right" && (n = "ArrowRight"), n == "Down" && (n = "ArrowDown"), n;
|
|
9377
9381
|
}
|
|
9378
|
-
const
|
|
9379
|
-
function
|
|
9382
|
+
const ea = typeof navigator < "u" && /Mac|iP(hone|[oa]d)/.test(navigator.platform), ta = typeof navigator < "u" && /Win/.test(navigator.platform);
|
|
9383
|
+
function na(t) {
|
|
9380
9384
|
let e = t.split(/-(?!$)/), n = e[e.length - 1];
|
|
9381
9385
|
n == "Space" && (n = " ");
|
|
9382
9386
|
let r, s, o, i;
|
|
@@ -9391,25 +9395,25 @@ function ea(t) {
|
|
|
9391
9395
|
else if (/^s(hift)?$/i.test(c))
|
|
9392
9396
|
o = !0;
|
|
9393
9397
|
else if (/^mod$/i.test(c))
|
|
9394
|
-
|
|
9398
|
+
ea ? i = !0 : s = !0;
|
|
9395
9399
|
else
|
|
9396
9400
|
throw new Error("Unrecognized modifier name: " + c);
|
|
9397
9401
|
}
|
|
9398
9402
|
return r && (n = "Alt-" + n), s && (n = "Ctrl-" + n), i && (n = "Meta-" + n), o && (n = "Shift-" + n), n;
|
|
9399
9403
|
}
|
|
9400
|
-
function
|
|
9404
|
+
function ra(t) {
|
|
9401
9405
|
let e = /* @__PURE__ */ Object.create(null);
|
|
9402
9406
|
for (let n in t)
|
|
9403
|
-
e[
|
|
9407
|
+
e[na(n)] = t[n];
|
|
9404
9408
|
return e;
|
|
9405
9409
|
}
|
|
9406
9410
|
function Rt(t, e, n = !0) {
|
|
9407
9411
|
return e.altKey && (t = "Alt-" + t), e.ctrlKey && (t = "Ctrl-" + t), e.metaKey && (t = "Meta-" + t), n && e.shiftKey && (t = "Shift-" + t), t;
|
|
9408
9412
|
}
|
|
9409
|
-
function
|
|
9410
|
-
let e =
|
|
9413
|
+
function sa(t) {
|
|
9414
|
+
let e = ra(t);
|
|
9411
9415
|
return function(n, r) {
|
|
9412
|
-
let s =
|
|
9416
|
+
let s = Qi(r), o, i = e[Rt(s, r)];
|
|
9413
9417
|
if (i && i(n.state, n.dispatch, n))
|
|
9414
9418
|
return !0;
|
|
9415
9419
|
if (s.length == 1 && s != " ") {
|
|
@@ -9419,7 +9423,7 @@ function na(t) {
|
|
|
9419
9423
|
return !0;
|
|
9420
9424
|
}
|
|
9421
9425
|
if ((r.altKey || r.metaKey || r.ctrlKey) && // Ctrl-Alt may be used for AltGr on Windows
|
|
9422
|
-
!(
|
|
9426
|
+
!(ta && r.ctrlKey && r.altKey) && (o = Te[r.keyCode]) && o != s) {
|
|
9423
9427
|
let a = e[Rt(o, r)];
|
|
9424
9428
|
if (a && a(n.state, n.dispatch, n))
|
|
9425
9429
|
return !0;
|
|
@@ -9519,13 +9523,13 @@ var xe = class {
|
|
|
9519
9523
|
}
|
|
9520
9524
|
// Find the table map for the given table node.
|
|
9521
9525
|
static get(t) {
|
|
9522
|
-
return jt(t) || Bt(t,
|
|
9526
|
+
return jt(t) || Bt(t, oa(t));
|
|
9523
9527
|
}
|
|
9524
9528
|
};
|
|
9525
|
-
function
|
|
9529
|
+
function oa(t) {
|
|
9526
9530
|
if (t.type.spec.tableRole != "table")
|
|
9527
9531
|
throw new RangeError("Not a table node: " + t.type.name);
|
|
9528
|
-
const e =
|
|
9532
|
+
const e = ia(t), n = t.childCount, r = [];
|
|
9529
9533
|
let s = 0, o = null;
|
|
9530
9534
|
const i = [];
|
|
9531
9535
|
for (let u = 0, d = e * n; u < d; u++) r[u] = 0;
|
|
@@ -9572,9 +9576,9 @@ function ra(t) {
|
|
|
9572
9576
|
let c = !1;
|
|
9573
9577
|
for (let u = 0; !c && u < i.length; u += 2)
|
|
9574
9578
|
i[u] != null && i[u + 1] < n && (c = !0);
|
|
9575
|
-
return c &&
|
|
9579
|
+
return c && aa(a, i, t), a;
|
|
9576
9580
|
}
|
|
9577
|
-
function
|
|
9581
|
+
function ia(t) {
|
|
9578
9582
|
let e = -1, n = !1;
|
|
9579
9583
|
for (let r = 0; r < t.childCount; r++) {
|
|
9580
9584
|
const s = t.child(r);
|
|
@@ -9595,7 +9599,7 @@ function sa(t) {
|
|
|
9595
9599
|
}
|
|
9596
9600
|
return e;
|
|
9597
9601
|
}
|
|
9598
|
-
function
|
|
9602
|
+
function aa(t, e, n) {
|
|
9599
9603
|
t.problems || (t.problems = []);
|
|
9600
9604
|
const r = {};
|
|
9601
9605
|
for (let s = 0; s < t.map.length; s++) {
|
|
@@ -9609,7 +9613,7 @@ function oa(t, e, n) {
|
|
|
9609
9613
|
const c = i.attrs;
|
|
9610
9614
|
for (let u = 0; u < c.colspan; u++) {
|
|
9611
9615
|
const d = (s + u) % t.width, f = e[d * 2];
|
|
9612
|
-
f != null && (!c.colwidth || c.colwidth[u] != f) && ((a || (a =
|
|
9616
|
+
f != null && (!c.colwidth || c.colwidth[u] != f) && ((a || (a = la(c)))[u] = f);
|
|
9613
9617
|
}
|
|
9614
9618
|
a && t.problems.unshift({
|
|
9615
9619
|
type: "colwidth mismatch",
|
|
@@ -9618,7 +9622,7 @@ function oa(t, e, n) {
|
|
|
9618
9622
|
});
|
|
9619
9623
|
}
|
|
9620
9624
|
}
|
|
9621
|
-
function
|
|
9625
|
+
function la(t) {
|
|
9622
9626
|
if (t.colwidth) return t.colwidth.slice();
|
|
9623
9627
|
const e = [];
|
|
9624
9628
|
for (let n = 0; n < t.colspan; n++) e.push(0);
|
|
@@ -9636,7 +9640,7 @@ function Gt(t) {
|
|
|
9636
9640
|
return e;
|
|
9637
9641
|
}
|
|
9638
9642
|
new Ze("selectingCells");
|
|
9639
|
-
function
|
|
9643
|
+
function ca(t) {
|
|
9640
9644
|
for (let e = t.depth - 1; e > 0; e--)
|
|
9641
9645
|
if (t.node(e).type.spec.tableRole == "row")
|
|
9642
9646
|
return t.node(0).resolve(t.before(e + 1));
|
|
@@ -9648,18 +9652,18 @@ function ts(t) {
|
|
|
9648
9652
|
if (e.node(n).type.spec.tableRole == "row") return !0;
|
|
9649
9653
|
return !1;
|
|
9650
9654
|
}
|
|
9651
|
-
function
|
|
9655
|
+
function ua(t) {
|
|
9652
9656
|
const e = t.selection;
|
|
9653
9657
|
if ("$anchorCell" in e && e.$anchorCell)
|
|
9654
9658
|
return e.$anchorCell.pos > e.$headCell.pos ? e.$anchorCell : e.$headCell;
|
|
9655
9659
|
if ("node" in e && e.node && e.node.type.spec.tableRole == "cell")
|
|
9656
9660
|
return e.$anchor;
|
|
9657
|
-
const n =
|
|
9661
|
+
const n = ca(e.$head) || da(e.$head);
|
|
9658
9662
|
if (n)
|
|
9659
9663
|
return n;
|
|
9660
9664
|
throw new RangeError(`No cell found around position ${e.head}`);
|
|
9661
9665
|
}
|
|
9662
|
-
function
|
|
9666
|
+
function da(t) {
|
|
9663
9667
|
for (let e = t.nodeAfter, n = t.pos; e; e = e.firstChild, n++) {
|
|
9664
9668
|
const r = e.type.spec.tableRole;
|
|
9665
9669
|
if (r == "cell" || r == "header_cell") return t.doc.resolve(n);
|
|
@@ -9845,12 +9849,12 @@ var pe = class we extends H {
|
|
|
9845
9849
|
return new we(e.resolve(n), e.resolve(r));
|
|
9846
9850
|
}
|
|
9847
9851
|
getBookmark() {
|
|
9848
|
-
return new
|
|
9852
|
+
return new fa(this.$anchorCell.pos, this.$headCell.pos);
|
|
9849
9853
|
}
|
|
9850
9854
|
};
|
|
9851
9855
|
pe.prototype.visible = !1;
|
|
9852
9856
|
H.jsonID("cell", pe);
|
|
9853
|
-
var
|
|
9857
|
+
var fa = class ss {
|
|
9854
9858
|
constructor(e, n) {
|
|
9855
9859
|
this.anchor = e, this.head = n;
|
|
9856
9860
|
}
|
|
@@ -9864,13 +9868,13 @@ var ua = class ss {
|
|
|
9864
9868
|
};
|
|
9865
9869
|
new Ze("fix-tables");
|
|
9866
9870
|
function os(t) {
|
|
9867
|
-
const e = t.selection, n =
|
|
9871
|
+
const e = t.selection, n = ua(t), r = n.node(-1), s = n.start(-1), o = xe.get(r);
|
|
9868
9872
|
return { ...e instanceof pe ? o.rectBetween(
|
|
9869
9873
|
e.$anchorCell.pos - s,
|
|
9870
9874
|
e.$headCell.pos - s
|
|
9871
9875
|
) : o.findCell(n.pos - s), tableStart: s, map: o, table: r };
|
|
9872
9876
|
}
|
|
9873
|
-
function
|
|
9877
|
+
function pa(t) {
|
|
9874
9878
|
return function(e, n) {
|
|
9875
9879
|
if (!ts(e)) return !1;
|
|
9876
9880
|
if (n) {
|
|
@@ -9920,7 +9924,7 @@ function En(t, e, n) {
|
|
|
9920
9924
|
return !0;
|
|
9921
9925
|
}
|
|
9922
9926
|
function Yt(t, e) {
|
|
9923
|
-
return e = e || { useDeprecatedLogic: !1 }, e.useDeprecatedLogic ?
|
|
9927
|
+
return e = e || { useDeprecatedLogic: !1 }, e.useDeprecatedLogic ? pa(t) : function(n, r) {
|
|
9924
9928
|
if (!ts(n)) return !1;
|
|
9925
9929
|
if (r) {
|
|
9926
9930
|
const s = Gt(n.schema), o = os(n), i = n.tr, a = En("row", o, s), c = En(
|
|
@@ -9970,7 +9974,7 @@ function st(t, e) {
|
|
|
9970
9974
|
}
|
|
9971
9975
|
return !0;
|
|
9972
9976
|
}
|
|
9973
|
-
|
|
9977
|
+
sa({
|
|
9974
9978
|
ArrowLeft: ot("horiz", -1),
|
|
9975
9979
|
ArrowRight: ot("horiz", 1),
|
|
9976
9980
|
ArrowUp: ot("vert", -1),
|
|
@@ -10049,11 +10053,11 @@ function is(t, e, n) {
|
|
|
10049
10053
|
new Ze(
|
|
10050
10054
|
"tableColumnResizing"
|
|
10051
10055
|
);
|
|
10052
|
-
function
|
|
10056
|
+
function ha(t, e) {
|
|
10053
10057
|
const n = Math.min(t.top, e.top), r = Math.max(t.bottom, e.bottom), s = Math.min(t.left, e.left), i = Math.max(t.right, e.right) - s, a = r - n, c = s, u = n;
|
|
10054
10058
|
return new DOMRect(c, u, i, a);
|
|
10055
10059
|
}
|
|
10056
|
-
var
|
|
10060
|
+
var ma = class {
|
|
10057
10061
|
constructor({
|
|
10058
10062
|
editor: t,
|
|
10059
10063
|
element: e,
|
|
@@ -10133,7 +10137,7 @@ var pa = class {
|
|
|
10133
10137
|
), t;
|
|
10134
10138
|
}
|
|
10135
10139
|
updatePosition() {
|
|
10136
|
-
const { selection: t } = this.editor.state, e =
|
|
10140
|
+
const { selection: t } = this.editor.state, e = Rn(this.view, t.from, t.to);
|
|
10137
10141
|
let n = {
|
|
10138
10142
|
getBoundingClientRect: () => e,
|
|
10139
10143
|
getClientRects: () => [e]
|
|
@@ -10150,7 +10154,7 @@ var pa = class {
|
|
|
10150
10154
|
const { $anchorCell: r, $headCell: s } = t, o = r ? r.pos : s.pos, i = s ? s.pos : r.pos, a = this.view.nodeDOM(o), c = this.view.nodeDOM(i);
|
|
10151
10155
|
if (!a || !c)
|
|
10152
10156
|
return;
|
|
10153
|
-
const u = a === c ? a.getBoundingClientRect() :
|
|
10157
|
+
const u = a === c ? a.getBoundingClientRect() : ha(
|
|
10154
10158
|
a.getBoundingClientRect(),
|
|
10155
10159
|
c.getBoundingClientRect()
|
|
10156
10160
|
);
|
|
@@ -10201,9 +10205,9 @@ var pa = class {
|
|
|
10201
10205
|
}
|
|
10202
10206
|
}, as = (t) => new Qr({
|
|
10203
10207
|
key: typeof t.pluginKey == "string" ? new Ze(t.pluginKey) : t.pluginKey,
|
|
10204
|
-
view: (e) => new
|
|
10208
|
+
view: (e) => new ma({ view: e, ...t })
|
|
10205
10209
|
});
|
|
10206
|
-
|
|
10210
|
+
In.create({
|
|
10207
10211
|
name: "bubbleMenu",
|
|
10208
10212
|
addOptions() {
|
|
10209
10213
|
return {
|
|
@@ -10228,7 +10232,7 @@ Rn.create({
|
|
|
10228
10232
|
] : [];
|
|
10229
10233
|
}
|
|
10230
10234
|
});
|
|
10231
|
-
var
|
|
10235
|
+
var ga = class {
|
|
10232
10236
|
constructor({ editor: t, element: e, view: n, options: r, shouldShow: s }) {
|
|
10233
10237
|
this.preventHide = !1, this.isVisible = !1, this.shouldShow = ({ view: o, state: i }) => {
|
|
10234
10238
|
const { selection: a } = i, { $anchor: c, empty: u } = a, d = c.depth === 1, f = c.parent.isTextblock && !c.parent.type.spec.code && !c.parent.textContent && c.parent.childCount === 0 && !this.getTextContent(c.parent);
|
|
@@ -10299,7 +10303,7 @@ var ha = class {
|
|
|
10299
10303
|
});
|
|
10300
10304
|
}
|
|
10301
10305
|
updatePosition() {
|
|
10302
|
-
const { selection: t } = this.editor.state, e =
|
|
10306
|
+
const { selection: t } = this.editor.state, e = Rn(this.view, t.from, t.to);
|
|
10303
10307
|
Fr({
|
|
10304
10308
|
getBoundingClientRect: () => e,
|
|
10305
10309
|
getClientRects: () => [e]
|
|
@@ -10327,9 +10331,9 @@ var ha = class {
|
|
|
10327
10331
|
}
|
|
10328
10332
|
}, ls = (t) => new Qr({
|
|
10329
10333
|
key: typeof t.pluginKey == "string" ? new Ze(t.pluginKey) : t.pluginKey,
|
|
10330
|
-
view: (e) => new
|
|
10334
|
+
view: (e) => new ga({ view: e, ...t })
|
|
10331
10335
|
});
|
|
10332
|
-
|
|
10336
|
+
In.create({
|
|
10333
10337
|
name: "floatingMenu",
|
|
10334
10338
|
addOptions() {
|
|
10335
10339
|
return {
|
|
@@ -10379,9 +10383,9 @@ var cs = zt.forwardRef(
|
|
|
10379
10383
|
f.parentNode && f.parentNode.removeChild(f);
|
|
10380
10384
|
});
|
|
10381
10385
|
};
|
|
10382
|
-
}, [e, d]),
|
|
10386
|
+
}, [e, d]), Fn(/* @__PURE__ */ l.jsx("div", { ...a, children: i }), u.current);
|
|
10383
10387
|
}
|
|
10384
|
-
),
|
|
10388
|
+
), ba = zt.forwardRef(
|
|
10385
10389
|
({ pluginKey: t = "floatingMenu", editor: e, shouldShow: n = null, options: r, children: s, ...o }, i) => {
|
|
10386
10390
|
const a = ke(document.createElement("div"));
|
|
10387
10391
|
typeof i == "function" ? i(a.current) : i && (i.current = a.current);
|
|
@@ -10409,10 +10413,10 @@ var cs = zt.forwardRef(
|
|
|
10409
10413
|
u.parentNode && u.parentNode.removeChild(u);
|
|
10410
10414
|
});
|
|
10411
10415
|
};
|
|
10412
|
-
}, [e, c]),
|
|
10416
|
+
}, [e, c]), Fn(/* @__PURE__ */ l.jsx("div", { ...o, children: s }), a.current);
|
|
10413
10417
|
}
|
|
10414
10418
|
);
|
|
10415
|
-
const
|
|
10419
|
+
const wa = ({ editor: t, isReadOnly: e }) => {
|
|
10416
10420
|
const [n, r] = F(!1), [s, o] = F(!1), [i, a] = F(""), [c, u] = F(!1), d = () => {
|
|
10417
10421
|
i && (t.chain().focus().extendMarkRange("link").setLink({ href: i }).run(), a(""), u(!1));
|
|
10418
10422
|
};
|
|
@@ -10481,7 +10485,7 @@ const ga = ({ editor: t, isReadOnly: e }) => {
|
|
|
10481
10485
|
}
|
|
10482
10486
|
),
|
|
10483
10487
|
n && /* @__PURE__ */ l.jsx("div", { className: "absolute top-full mt-1 z-10 bg-white border border-gray-300 rounded-lg p-2 shadow-lg", children: /* @__PURE__ */ l.jsx(
|
|
10484
|
-
|
|
10488
|
+
Xo,
|
|
10485
10489
|
{
|
|
10486
10490
|
onColorChange: (f) => {
|
|
10487
10491
|
t.chain().focus().setColor(f).run(), r(!1);
|
|
@@ -10495,11 +10499,11 @@ const ga = ({ editor: t, isReadOnly: e }) => {
|
|
|
10495
10499
|
{
|
|
10496
10500
|
onClick: () => o(!s),
|
|
10497
10501
|
title: "Background Color",
|
|
10498
|
-
children: /* @__PURE__ */ l.jsx(
|
|
10502
|
+
children: /* @__PURE__ */ l.jsx(zn, { className: "h-4 w-4 cursor-pointer" })
|
|
10499
10503
|
}
|
|
10500
10504
|
),
|
|
10501
10505
|
s && /* @__PURE__ */ l.jsx("div", { className: "absolute top-full mt-1 z-10 bg-white border border-gray-300 rounded-lg p-2 shadow-lg", children: /* @__PURE__ */ l.jsx(
|
|
10502
|
-
|
|
10506
|
+
Qo,
|
|
10503
10507
|
{
|
|
10504
10508
|
onColorChange: (f) => {
|
|
10505
10509
|
t.chain().focus().toggleHighlight({ color: f }).run(), o(!1);
|
|
@@ -10546,13 +10550,13 @@ const ga = ({ editor: t, isReadOnly: e }) => {
|
|
|
10546
10550
|
] })
|
|
10547
10551
|
}
|
|
10548
10552
|
);
|
|
10549
|
-
},
|
|
10553
|
+
}, ya = [
|
|
10550
10554
|
{ label: "Green", value: "#4caf5040" },
|
|
10551
10555
|
{ label: "Red", value: "#f4433640" },
|
|
10552
10556
|
{ label: "Grey", value: "#9e9e9e40" }
|
|
10553
|
-
],
|
|
10557
|
+
], xa = ({
|
|
10554
10558
|
onColorChange: t
|
|
10555
|
-
}) => /* @__PURE__ */ l.jsx("div", { className: "flex gap-2", children:
|
|
10559
|
+
}) => /* @__PURE__ */ l.jsx("div", { className: "flex gap-2", children: ya.map(({ label: e, value: n }) => /* @__PURE__ */ l.jsxs(
|
|
10556
10560
|
"button",
|
|
10557
10561
|
{
|
|
10558
10562
|
type: "button",
|
|
@@ -10581,7 +10585,7 @@ const ga = ({ editor: t, isReadOnly: e }) => {
|
|
|
10581
10585
|
{ value: "c", label: "C" },
|
|
10582
10586
|
{ value: "cpp", label: "C++" },
|
|
10583
10587
|
{ value: "sql", label: "SQL" }
|
|
10584
|
-
],
|
|
10588
|
+
], va = ({
|
|
10585
10589
|
editor: t,
|
|
10586
10590
|
isReadOnly: e
|
|
10587
10591
|
}) => {
|
|
@@ -10618,7 +10622,7 @@ const ga = ({ editor: t, isReadOnly: e }) => {
|
|
|
10618
10622
|
/* @__PURE__ */ l.jsx(Ft, { className: "h-3 w-3" }),
|
|
10619
10623
|
/* @__PURE__ */ l.jsx("span", { className: "text-xs", children: Nn.find((u) => u.value === a)?.label || "Plain Text" })
|
|
10620
10624
|
] }),
|
|
10621
|
-
/* @__PURE__ */ l.jsx(
|
|
10625
|
+
/* @__PURE__ */ l.jsx(Bn, { className: "h-3 w-3" })
|
|
10622
10626
|
] })
|
|
10623
10627
|
}
|
|
10624
10628
|
),
|
|
@@ -10644,11 +10648,11 @@ const ga = ({ editor: t, isReadOnly: e }) => {
|
|
|
10644
10648
|
},
|
|
10645
10649
|
title: "Background Color",
|
|
10646
10650
|
isActive: t.isActive("codeBlockBg"),
|
|
10647
|
-
children: /* @__PURE__ */ l.jsx(
|
|
10651
|
+
children: /* @__PURE__ */ l.jsx(zn, { className: "h-4 w-4 cursor-pointer" })
|
|
10648
10652
|
}
|
|
10649
10653
|
),
|
|
10650
10654
|
n && /* @__PURE__ */ l.jsx("div", { className: "absolute top-full mt-1 z-10 bg-white border border-gray-300 rounded-lg p-2 shadow-lg", children: /* @__PURE__ */ l.jsx(
|
|
10651
|
-
|
|
10655
|
+
xa,
|
|
10652
10656
|
{
|
|
10653
10657
|
onColorChange: (u) => {
|
|
10654
10658
|
t.chain().focus().toggleCodeBlockBg(u).run(), r(!1);
|
|
@@ -10659,12 +10663,12 @@ const ga = ({ editor: t, isReadOnly: e }) => {
|
|
|
10659
10663
|
] })
|
|
10660
10664
|
}
|
|
10661
10665
|
);
|
|
10662
|
-
},
|
|
10666
|
+
}, Ea = ({
|
|
10663
10667
|
editor: t,
|
|
10664
10668
|
isReadOnly: e,
|
|
10665
10669
|
onImageClick: n
|
|
10666
10670
|
}) => e ? null : /* @__PURE__ */ l.jsxs(
|
|
10667
|
-
|
|
10671
|
+
ba,
|
|
10668
10672
|
{
|
|
10669
10673
|
editor: t,
|
|
10670
10674
|
className: "floating-menu bg-white border border-gray-300 rounded-lg p-2 shadow-lg flex gap-1 z-50",
|
|
@@ -10674,7 +10678,7 @@ const ga = ({ editor: t, isReadOnly: e }) => {
|
|
|
10674
10678
|
{
|
|
10675
10679
|
onClick: () => t.chain().focus().toggleHeading({ level: 1 }).run(),
|
|
10676
10680
|
title: "Heading 1",
|
|
10677
|
-
children: /* @__PURE__ */ l.jsx(
|
|
10681
|
+
children: /* @__PURE__ */ l.jsx(Mn, { className: "h-4 w-4" })
|
|
10678
10682
|
}
|
|
10679
10683
|
),
|
|
10680
10684
|
/* @__PURE__ */ l.jsx(
|
|
@@ -10682,7 +10686,7 @@ const ga = ({ editor: t, isReadOnly: e }) => {
|
|
|
10682
10686
|
{
|
|
10683
10687
|
onClick: () => t.chain().focus().toggleHeading({ level: 2 }).run(),
|
|
10684
10688
|
title: "Heading 2",
|
|
10685
|
-
children: /* @__PURE__ */ l.jsx(
|
|
10689
|
+
children: /* @__PURE__ */ l.jsx(Ln, { className: "h-4 w-4" })
|
|
10686
10690
|
}
|
|
10687
10691
|
),
|
|
10688
10692
|
/* @__PURE__ */ l.jsx(
|
|
@@ -10690,7 +10694,7 @@ const ga = ({ editor: t, isReadOnly: e }) => {
|
|
|
10690
10694
|
{
|
|
10691
10695
|
onClick: () => t.chain().focus().toggleHeading({ level: 3 }).run(),
|
|
10692
10696
|
title: "Heading 3",
|
|
10693
|
-
children: /* @__PURE__ */ l.jsx(
|
|
10697
|
+
children: /* @__PURE__ */ l.jsx(Dn, { className: "h-4 w-4" })
|
|
10694
10698
|
}
|
|
10695
10699
|
),
|
|
10696
10700
|
/* @__PURE__ */ l.jsx(
|
|
@@ -10698,13 +10702,13 @@ const ga = ({ editor: t, isReadOnly: e }) => {
|
|
|
10698
10702
|
{
|
|
10699
10703
|
onClick: () => t.chain().focus().setParagraph().run(),
|
|
10700
10704
|
title: "Paragraph",
|
|
10701
|
-
children: /* @__PURE__ */ l.jsx(
|
|
10705
|
+
children: /* @__PURE__ */ l.jsx(Pn, { className: "h-4 w-4" })
|
|
10702
10706
|
}
|
|
10703
10707
|
),
|
|
10704
|
-
/* @__PURE__ */ l.jsx(D, { onClick: n, title: "Insert Image", children: /* @__PURE__ */ l.jsx(
|
|
10708
|
+
/* @__PURE__ */ l.jsx(D, { onClick: n, title: "Insert Image", children: /* @__PURE__ */ l.jsx(jn, { className: "h-4 w-4" }) })
|
|
10705
10709
|
]
|
|
10706
10710
|
}
|
|
10707
|
-
),
|
|
10711
|
+
), Na = ({
|
|
10708
10712
|
editor: t,
|
|
10709
10713
|
isReadOnly: e,
|
|
10710
10714
|
position: n
|
|
@@ -10811,7 +10815,7 @@ const ga = ({ editor: t, isReadOnly: e }) => {
|
|
|
10811
10815
|
/* @__PURE__ */ l.jsx("div", { className: "absolute top-full left-5 w-0 h-0 border-l-6 border-r-6 border-t-6 border-l-transparent border-r-transparent border-t-blue-500" })
|
|
10812
10816
|
]
|
|
10813
10817
|
}
|
|
10814
|
-
),
|
|
10818
|
+
), _a = ({ editor: t }) => /* @__PURE__ */ l.jsxs("div", { className: "mb-2 p-2 bg-gray-100 rounded text-xs", children: [
|
|
10815
10819
|
/* @__PURE__ */ l.jsx("strong", { children: "Debug:" }),
|
|
10816
10820
|
" Current position - H1:",
|
|
10817
10821
|
" ",
|
|
@@ -10834,7 +10838,7 @@ const ga = ({ editor: t, isReadOnly: e }) => {
|
|
|
10834
10838
|
" | Table:",
|
|
10835
10839
|
" ",
|
|
10836
10840
|
t.isActive("table") ? "✅" : "❌"
|
|
10837
|
-
] }),
|
|
10841
|
+
] }), Ca = ({
|
|
10838
10842
|
isReadOnly: t,
|
|
10839
10843
|
setIsReadOnly: e,
|
|
10840
10844
|
onLogContent: n
|
|
@@ -10871,7 +10875,7 @@ const ga = ({ editor: t, isReadOnly: e }) => {
|
|
|
10871
10875
|
] })
|
|
10872
10876
|
}
|
|
10873
10877
|
)
|
|
10874
|
-
] }),
|
|
10878
|
+
] }), Sa = (t) => {
|
|
10875
10879
|
const e = {
|
|
10876
10880
|
html: t.getHTML(),
|
|
10877
10881
|
json: t.getJSON(),
|
|
@@ -10887,7 +10891,7 @@ const ga = ({ editor: t, isReadOnly: e }) => {
|
|
|
10887
10891
|
words: e.wordCount,
|
|
10888
10892
|
timestamp: e.timestamp
|
|
10889
10893
|
}), console.log("================================================"), e;
|
|
10890
|
-
},
|
|
10894
|
+
}, Qa = ({
|
|
10891
10895
|
onImageUpload: t,
|
|
10892
10896
|
onVideoUpload: e,
|
|
10893
10897
|
onImageDelete: n,
|
|
@@ -10907,11 +10911,11 @@ const ga = ({ editor: t, isReadOnly: e }) => {
|
|
|
10907
10911
|
return I(O), R;
|
|
10908
10912
|
}, v = Cn({
|
|
10909
10913
|
extensions: [
|
|
10910
|
-
Fn,
|
|
10911
10914
|
$n,
|
|
10912
|
-
|
|
10913
|
-
An,
|
|
10915
|
+
yo,
|
|
10914
10916
|
kn,
|
|
10917
|
+
On,
|
|
10918
|
+
An,
|
|
10915
10919
|
Hn,
|
|
10916
10920
|
Kn,
|
|
10917
10921
|
ar,
|
|
@@ -11144,12 +11148,12 @@ const ga = ({ editor: t, isReadOnly: e }) => {
|
|
|
11144
11148
|
}, O.click();
|
|
11145
11149
|
}, [v, e]), J = Ke(() => {
|
|
11146
11150
|
if (v)
|
|
11147
|
-
return
|
|
11151
|
+
return Sa(v);
|
|
11148
11152
|
}, [v]);
|
|
11149
11153
|
return v ? /* @__PURE__ */ l.jsxs("div", { className: "w-full max-w-6xl mx-auto p-4", children: [
|
|
11150
|
-
v && /* @__PURE__ */ l.jsx(
|
|
11154
|
+
v && /* @__PURE__ */ l.jsx(_a, { editor: v }),
|
|
11151
11155
|
/* @__PURE__ */ l.jsx(
|
|
11152
|
-
|
|
11156
|
+
Ca,
|
|
11153
11157
|
{
|
|
11154
11158
|
editor: v,
|
|
11155
11159
|
isReadOnly: f,
|
|
@@ -11158,7 +11162,7 @@ const ga = ({ editor: t, isReadOnly: e }) => {
|
|
|
11158
11162
|
}
|
|
11159
11163
|
),
|
|
11160
11164
|
/* @__PURE__ */ l.jsx(
|
|
11161
|
-
|
|
11165
|
+
ei,
|
|
11162
11166
|
{
|
|
11163
11167
|
editor: v,
|
|
11164
11168
|
isReadOnly: f,
|
|
@@ -11201,17 +11205,17 @@ const ga = ({ editor: t, isReadOnly: e }) => {
|
|
|
11201
11205
|
/* @__PURE__ */ l.jsx("p", { className: "text-sm font-medium text-gray-700", children: "Uploading image..." })
|
|
11202
11206
|
] }) }),
|
|
11203
11207
|
/* @__PURE__ */ l.jsx(
|
|
11204
|
-
|
|
11208
|
+
Ea,
|
|
11205
11209
|
{
|
|
11206
11210
|
editor: v,
|
|
11207
11211
|
isReadOnly: f,
|
|
11208
11212
|
onImageClick: () => u(!c)
|
|
11209
11213
|
}
|
|
11210
11214
|
),
|
|
11211
|
-
/* @__PURE__ */ l.jsx(
|
|
11212
|
-
/* @__PURE__ */ l.jsx(
|
|
11215
|
+
/* @__PURE__ */ l.jsx(wa, { editor: v, isReadOnly: f }),
|
|
11216
|
+
/* @__PURE__ */ l.jsx(va, { editor: v, isReadOnly: f }),
|
|
11213
11217
|
/* @__PURE__ */ l.jsx(
|
|
11214
|
-
|
|
11218
|
+
Na,
|
|
11215
11219
|
{
|
|
11216
11220
|
editor: v,
|
|
11217
11221
|
isReadOnly: f,
|
|
@@ -11220,18 +11224,18 @@ const ga = ({ editor: t, isReadOnly: e }) => {
|
|
|
11220
11224
|
)
|
|
11221
11225
|
] })
|
|
11222
11226
|
] }) : null;
|
|
11223
|
-
},
|
|
11227
|
+
}, el = ({
|
|
11224
11228
|
styles: t,
|
|
11225
11229
|
editorContent: e,
|
|
11226
11230
|
immediatelyRender: n = !1
|
|
11227
11231
|
}) => {
|
|
11228
11232
|
const [, r] = F({}), [s] = F(!0), o = Cn({
|
|
11229
11233
|
extensions: [
|
|
11230
|
-
Fn,
|
|
11231
11234
|
$n,
|
|
11232
|
-
|
|
11233
|
-
An,
|
|
11235
|
+
xo,
|
|
11234
11236
|
kn,
|
|
11237
|
+
On,
|
|
11238
|
+
An,
|
|
11235
11239
|
Hn.configure({
|
|
11236
11240
|
inline: !1,
|
|
11237
11241
|
allowBase64: !0
|
|
@@ -11288,7 +11292,7 @@ const ga = ({ editor: t, isReadOnly: e }) => {
|
|
|
11288
11292
|
o && o.setEditable(!s);
|
|
11289
11293
|
}, [o, s]), o ? /* @__PURE__ */ l.jsx("div", { className: "w-full max-w-6xl mx-auto p-4", children: /* @__PURE__ */ l.jsx(Sn, { editor: o, className: "tiptap-editor" }) }) : null;
|
|
11290
11294
|
};
|
|
11291
|
-
function
|
|
11295
|
+
function tl(t) {
|
|
11292
11296
|
const [e, n] = F(
|
|
11293
11297
|
t ?? { html: "", json: null }
|
|
11294
11298
|
), r = Ke((s) => {
|
|
@@ -11302,7 +11306,7 @@ function Qa(t) {
|
|
|
11302
11306
|
};
|
|
11303
11307
|
}
|
|
11304
11308
|
export {
|
|
11305
|
-
|
|
11306
|
-
|
|
11307
|
-
|
|
11309
|
+
Qa as TiptapEditor,
|
|
11310
|
+
el as TiptapViewer,
|
|
11311
|
+
tl as useEditorContent
|
|
11308
11312
|
};
|