@blocknote/core 0.43.0 → 0.44.1
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/dist/{BlockNoteSchema-D8TyvlfU.cjs → BlockNoteSchema-B4gm-Qco.cjs} +2 -2
- package/dist/{BlockNoteSchema-D8TyvlfU.cjs.map → BlockNoteSchema-B4gm-Qco.cjs.map} +1 -1
- package/dist/{BlockNoteSchema-CbSavEwr.js → BlockNoteSchema-C-l154WP.js} +2 -2
- package/dist/{BlockNoteSchema-CbSavEwr.js.map → BlockNoteSchema-C-l154WP.js.map} +1 -1
- package/dist/{TrailingNode-BUhuMJrB.js → TrailingNode-B_zPMWxw.js} +235 -233
- package/dist/{TrailingNode-BUhuMJrB.js.map → TrailingNode-B_zPMWxw.js.map} +1 -1
- package/dist/TrailingNode-CRHrgOnK.cjs +2 -0
- package/dist/{TrailingNode-CaT_wbho.cjs.map → TrailingNode-CRHrgOnK.cjs.map} +1 -1
- package/dist/blocknote.cjs +4 -4
- package/dist/blocknote.cjs.map +1 -1
- package/dist/blocknote.js +508 -506
- package/dist/blocknote.js.map +1 -1
- package/dist/blocks.cjs +1 -1
- package/dist/blocks.js +2 -2
- package/dist/defaultBlocks-DLJ4Q1_J.cjs +6 -0
- package/dist/{defaultBlocks-BxFclIGP.cjs.map → defaultBlocks-DLJ4Q1_J.cjs.map} +1 -1
- package/dist/{defaultBlocks-BJtxTOM2.js → defaultBlocks-DgA_mtQV.js} +463 -460
- package/dist/{defaultBlocks-BJtxTOM2.js.map → defaultBlocks-DgA_mtQV.js.map} +1 -1
- package/dist/extensions.cjs +1 -1
- package/dist/extensions.js +3 -3
- package/dist/webpack-stats.json +1 -1
- package/package.json +1 -1
- package/dist/TrailingNode-CaT_wbho.cjs +0 -2
- package/dist/defaultBlocks-BxFclIGP.cjs +0 -6
|
@@ -1,25 +1,28 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var L = (e, t, n) =>
|
|
4
|
-
import { TableMap as be, goToNextCell as
|
|
5
|
-
import { Node as
|
|
6
|
-
import { TextSelection as ke, Plugin as
|
|
7
|
-
import { DecorationSet as
|
|
8
|
-
import { ReplaceStep as
|
|
9
|
-
import { ySyncPluginKey as
|
|
10
|
-
import { c as k, a as
|
|
11
|
-
import { b as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import { DOMParser as
|
|
18
|
-
import { createHighlightPlugin as
|
|
19
|
-
import { createParser as
|
|
20
|
-
|
|
1
|
+
var Oe = Object.defineProperty;
|
|
2
|
+
var _e = (e, t, n) => t in e ? Oe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var L = (e, t, n) => _e(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { TableMap as be, goToNextCell as ne, columnResizing as Ve, tableEditing as Re, CellSelection as Ce, TableView as We } from "prosemirror-tables";
|
|
5
|
+
import { Node as N, Mark as Fe, Extension as $e, callOrReturn as Ue, getExtensionField as qe, mergeAttributes as z, findParentNode as je } from "@tiptap/core";
|
|
6
|
+
import { TextSelection as ke, Plugin as Ge, PluginKey as Ze } from "prosemirror-state";
|
|
7
|
+
import { DecorationSet as oe, Decoration as re } from "prosemirror-view";
|
|
8
|
+
import { ReplaceStep as ze, Mapping as Xe } from "prosemirror-transform";
|
|
9
|
+
import { ySyncPluginKey as ae, absolutePositionToRelativePosition as Ke, relativePositionToAbsolutePosition as Qe } from "y-prosemirror";
|
|
10
|
+
import { c as k, a as ye } from "./BlockNoteExtension-C2X7LW-V.js";
|
|
11
|
+
import { b as X, v as Je, g as O, a as ve, i as se, t as Ye, U as et, q as tt, A as G, r as nt, w as Ee, J as ot } from "./blockToNode-DBNbhwwC.js";
|
|
12
|
+
import rt from "@tiptap/extension-bold";
|
|
13
|
+
import at from "@tiptap/extension-code";
|
|
14
|
+
import st from "@tiptap/extension-italic";
|
|
15
|
+
import it from "@tiptap/extension-strike";
|
|
16
|
+
import ct from "@tiptap/extension-underline";
|
|
17
|
+
import { DOMParser as xe, Fragment as lt, DOMSerializer as ie } from "@tiptap/pm/model";
|
|
18
|
+
import { createHighlightPlugin as dt } from "prosemirror-highlight";
|
|
19
|
+
import { createParser as ut } from "prosemirror-highlight/shiki";
|
|
20
|
+
import { Slice as we, Fragment as F, DOMParser as Se } from "prosemirror-model";
|
|
21
|
+
import { Plugin as pt, PluginKey as ft } from "@tiptap/pm/state";
|
|
22
|
+
import { DecorationSet as ce, Decoration as gt } from "@tiptap/pm/view";
|
|
23
|
+
const ht = () => typeof navigator < "u" && (/Mac/.test(navigator.platform) || /AppleWebKit/.test(navigator.userAgent) && /Mobile\/\w+/.test(navigator.userAgent));
|
|
21
24
|
function M(e, t = "Ctrl") {
|
|
22
|
-
return
|
|
25
|
+
return ht() ? e.replace("Mod", "⌘") : e.replace("Mod", t);
|
|
23
26
|
}
|
|
24
27
|
function D(...e) {
|
|
25
28
|
return [
|
|
@@ -29,8 +32,8 @@ function D(...e) {
|
|
|
29
32
|
)
|
|
30
33
|
].join(" ");
|
|
31
34
|
}
|
|
32
|
-
const
|
|
33
|
-
function
|
|
35
|
+
const uo = () => /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
|
36
|
+
function mt(e, t, n, o) {
|
|
34
37
|
const r = document.createElement("div");
|
|
35
38
|
r.className = D(
|
|
36
39
|
"bn-block-content",
|
|
@@ -53,7 +56,7 @@ function dt(e, t, n, o) {
|
|
|
53
56
|
};
|
|
54
57
|
}
|
|
55
58
|
const le = (e, t) => {
|
|
56
|
-
let n =
|
|
59
|
+
let n = X(e, t.pmSchema);
|
|
57
60
|
n.type.name === "blockContainer" && (n = n.firstChild);
|
|
58
61
|
const o = t.pmSchema.nodes[n.type.name].spec.toDOM;
|
|
59
62
|
if (o === void 0)
|
|
@@ -67,7 +70,7 @@ const le = (e, t) => {
|
|
|
67
70
|
);
|
|
68
71
|
return r;
|
|
69
72
|
};
|
|
70
|
-
function
|
|
73
|
+
function bt(e, t = "<br>") {
|
|
71
74
|
const n = e.querySelectorAll("p");
|
|
72
75
|
if (n.length > 1) {
|
|
73
76
|
const o = n[0];
|
|
@@ -77,15 +80,15 @@ function ut(e, t = "<br>") {
|
|
|
77
80
|
}
|
|
78
81
|
}
|
|
79
82
|
}
|
|
80
|
-
function
|
|
83
|
+
function W(e) {
|
|
81
84
|
return "data-" + e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
82
85
|
}
|
|
83
|
-
function
|
|
86
|
+
function po(e) {
|
|
84
87
|
const t = e.split("/");
|
|
85
88
|
return !t.length || // invalid?
|
|
86
89
|
t[t.length - 1] === "" ? e : t[t.length - 1];
|
|
87
90
|
}
|
|
88
|
-
function
|
|
91
|
+
function fo(e) {
|
|
89
92
|
var n;
|
|
90
93
|
const t = [
|
|
91
94
|
"mp4",
|
|
@@ -105,7 +108,7 @@ function oo(e) {
|
|
|
105
108
|
return !1;
|
|
106
109
|
}
|
|
107
110
|
}
|
|
108
|
-
function
|
|
111
|
+
function Ct(e) {
|
|
109
112
|
const t = {};
|
|
110
113
|
return Object.entries(e).forEach(([n, o]) => {
|
|
111
114
|
t[n] = {
|
|
@@ -115,7 +118,7 @@ function pt(e) {
|
|
|
115
118
|
// value is the same as its default, we don't display an HTML
|
|
116
119
|
// attribute for it.
|
|
117
120
|
parseHTML: (r) => {
|
|
118
|
-
const a = r.getAttribute(
|
|
121
|
+
const a = r.getAttribute(W(n));
|
|
119
122
|
if (a === null)
|
|
120
123
|
return null;
|
|
121
124
|
if (o.default === void 0 && o.type === "boolean" || o.default !== void 0 && typeof o.default == "boolean")
|
|
@@ -127,12 +130,12 @@ function pt(e) {
|
|
|
127
130
|
return a;
|
|
128
131
|
},
|
|
129
132
|
renderHTML: (r) => r[n] !== o.default ? {
|
|
130
|
-
[
|
|
133
|
+
[W(n)]: r[n]
|
|
131
134
|
} : {}
|
|
132
135
|
};
|
|
133
136
|
}), t;
|
|
134
137
|
}
|
|
135
|
-
function
|
|
138
|
+
function kt(e, t, n, o) {
|
|
136
139
|
const r = e();
|
|
137
140
|
if (r === void 0)
|
|
138
141
|
throw new Error("Cannot find node position");
|
|
@@ -144,7 +147,7 @@ function ft(e, t, n, o) {
|
|
|
144
147
|
throw new Error("Block type does not match");
|
|
145
148
|
return i;
|
|
146
149
|
}
|
|
147
|
-
function
|
|
150
|
+
function Z(e, t, n, o, r = !1, a) {
|
|
148
151
|
const s = document.createElement("div");
|
|
149
152
|
if (a !== void 0)
|
|
150
153
|
for (const [i, c] of Object.entries(a))
|
|
@@ -155,7 +158,7 @@ function Q(e, t, n, o, r = !1, a) {
|
|
|
155
158
|
), s.setAttribute("data-content-type", t);
|
|
156
159
|
for (const [i, c] of Object.entries(n)) {
|
|
157
160
|
const u = o[i].default;
|
|
158
|
-
c !== u && s.setAttribute(
|
|
161
|
+
c !== u && s.setAttribute(W(i), c);
|
|
159
162
|
}
|
|
160
163
|
return r && s.setAttribute("data-file-block", ""), s.appendChild(e.dom), e.contentDOM && (e.contentDOM.className = D(
|
|
161
164
|
"bn-inline-content",
|
|
@@ -165,7 +168,7 @@ function Q(e, t, n, o, r = !1, a) {
|
|
|
165
168
|
dom: s
|
|
166
169
|
};
|
|
167
170
|
}
|
|
168
|
-
function
|
|
171
|
+
function yt(e, t, n) {
|
|
169
172
|
return {
|
|
170
173
|
config: {
|
|
171
174
|
type: e.type,
|
|
@@ -180,12 +183,12 @@ function ht(e, t, n) {
|
|
|
180
183
|
extensions: n
|
|
181
184
|
};
|
|
182
185
|
}
|
|
183
|
-
function
|
|
186
|
+
function vt(e, t) {
|
|
184
187
|
e.stopEvent = (n) => (n.type === "mousedown" && setTimeout(() => {
|
|
185
188
|
t.view.dom.blur();
|
|
186
189
|
}, 10), !0);
|
|
187
190
|
}
|
|
188
|
-
function
|
|
191
|
+
function Et(e, t) {
|
|
189
192
|
const n = [
|
|
190
193
|
{
|
|
191
194
|
tag: "[data-content-type=" + e.type + "]",
|
|
@@ -210,21 +213,21 @@ function mt(e, t) {
|
|
|
210
213
|
});
|
|
211
214
|
if (e.content === "inline") {
|
|
212
215
|
const i = o.cloneNode(!0);
|
|
213
|
-
return
|
|
216
|
+
return bt(
|
|
214
217
|
i,
|
|
215
218
|
(a = t.meta) != null && a.code ? `
|
|
216
219
|
` : "<br>"
|
|
217
|
-
),
|
|
220
|
+
), xe.fromSchema(r).parse(i, {
|
|
218
221
|
topNode: r.nodes.paragraph.create()
|
|
219
222
|
}).content;
|
|
220
223
|
}
|
|
221
|
-
return
|
|
224
|
+
return lt.empty;
|
|
222
225
|
} : void 0
|
|
223
226
|
}), n;
|
|
224
227
|
}
|
|
225
|
-
function
|
|
228
|
+
function go(e, t, n, o) {
|
|
226
229
|
var a, s, i, c;
|
|
227
|
-
const r = t.node ||
|
|
230
|
+
const r = t.node || N.create({
|
|
228
231
|
name: e.type,
|
|
229
232
|
content: e.content === "inline" ? "inline*" : e.content === "none" ? "" : e.content,
|
|
230
233
|
group: "blockContent",
|
|
@@ -234,15 +237,15 @@ function ro(e, t, n, o) {
|
|
|
234
237
|
defining: ((c = t.meta) == null ? void 0 : c.defining) ?? !0,
|
|
235
238
|
priority: o,
|
|
236
239
|
addAttributes() {
|
|
237
|
-
return
|
|
240
|
+
return Ct(e.propSchema);
|
|
238
241
|
},
|
|
239
242
|
parseHTML() {
|
|
240
|
-
return
|
|
243
|
+
return Et(e, t);
|
|
241
244
|
},
|
|
242
245
|
renderHTML({ HTMLAttributes: l }) {
|
|
243
246
|
var d;
|
|
244
247
|
const u = document.createElement("div");
|
|
245
|
-
return
|
|
248
|
+
return Z(
|
|
246
249
|
{
|
|
247
250
|
dom: u,
|
|
248
251
|
contentDOM: e.content === "inline" ? u : void 0
|
|
@@ -257,17 +260,17 @@ function ro(e, t, n, o) {
|
|
|
257
260
|
addNodeView() {
|
|
258
261
|
return (l) => {
|
|
259
262
|
var f, E;
|
|
260
|
-
const u = this.options.editor, d =
|
|
263
|
+
const u = this.options.editor, d = kt(
|
|
261
264
|
l.getPos,
|
|
262
265
|
u,
|
|
263
266
|
this.editor,
|
|
264
267
|
e.type
|
|
265
|
-
), p = ((f = this.options.domAttributes) == null ? void 0 : f.blockContent) || {},
|
|
268
|
+
), p = ((f = this.options.domAttributes) == null ? void 0 : f.blockContent) || {}, h = t.render.call(
|
|
266
269
|
{ blockContentDOMAttributes: p, props: l, renderType: "nodeView" },
|
|
267
270
|
d,
|
|
268
271
|
u
|
|
269
272
|
);
|
|
270
|
-
return ((E = t.meta) == null ? void 0 : E.selectable) === !1 &&
|
|
273
|
+
return ((E = t.meta) == null ? void 0 : E.selectable) === !1 && vt(h, this.editor), h;
|
|
271
274
|
};
|
|
272
275
|
}
|
|
273
276
|
});
|
|
@@ -296,9 +299,9 @@ function ro(e, t, n, o) {
|
|
|
296
299
|
// TODO: this should not have wrapInBlockStructure and generally be a lot simpler
|
|
297
300
|
// post-processing in externalHTMLExporter should not be necessary
|
|
298
301
|
toExternalHTML: (l, u) => {
|
|
299
|
-
var p,
|
|
302
|
+
var p, h;
|
|
300
303
|
const d = ((p = r.options.domAttributes) == null ? void 0 : p.blockContent) || {};
|
|
301
|
-
return ((
|
|
304
|
+
return ((h = t.toExternalHTML) == null ? void 0 : h.call(
|
|
302
305
|
{ blockContentDOMAttributes: d },
|
|
303
306
|
l,
|
|
304
307
|
u
|
|
@@ -312,7 +315,7 @@ function ro(e, t, n, o) {
|
|
|
312
315
|
extensions: n
|
|
313
316
|
};
|
|
314
317
|
}
|
|
315
|
-
function
|
|
318
|
+
function ho(e) {
|
|
316
319
|
return e;
|
|
317
320
|
}
|
|
318
321
|
function v(e, t, n) {
|
|
@@ -332,7 +335,7 @@ function v(e, t, n) {
|
|
|
332
335
|
c
|
|
333
336
|
);
|
|
334
337
|
if (l !== void 0)
|
|
335
|
-
return
|
|
338
|
+
return Z(
|
|
336
339
|
l,
|
|
337
340
|
i.type,
|
|
338
341
|
i.props,
|
|
@@ -351,7 +354,7 @@ function v(e, t, n) {
|
|
|
351
354
|
i,
|
|
352
355
|
c
|
|
353
356
|
);
|
|
354
|
-
return
|
|
357
|
+
return Z(
|
|
355
358
|
l,
|
|
356
359
|
i.type,
|
|
357
360
|
i.props,
|
|
@@ -365,13 +368,13 @@ function v(e, t, n) {
|
|
|
365
368
|
};
|
|
366
369
|
};
|
|
367
370
|
}
|
|
368
|
-
function
|
|
371
|
+
function mo(e, t, n, o) {
|
|
369
372
|
return e.dom.setAttribute("data-inline-content-type", t), Object.entries(n).filter(([r, a]) => {
|
|
370
373
|
const s = o[r];
|
|
371
374
|
return a !== s.default;
|
|
372
|
-
}).map(([r, a]) => [
|
|
375
|
+
}).map(([r, a]) => [W(r), a]).forEach(([r, a]) => e.dom.setAttribute(r, a)), e.contentDOM && e.contentDOM.setAttribute("data-editable", ""), e;
|
|
373
376
|
}
|
|
374
|
-
function
|
|
377
|
+
function bo(e) {
|
|
375
378
|
return {
|
|
376
379
|
Backspace: ({ editor: t }) => {
|
|
377
380
|
const n = t.state.selection.$from;
|
|
@@ -379,14 +382,14 @@ function io(e) {
|
|
|
379
382
|
}
|
|
380
383
|
};
|
|
381
384
|
}
|
|
382
|
-
function
|
|
385
|
+
function xt(e, t) {
|
|
383
386
|
return {
|
|
384
387
|
config: e,
|
|
385
388
|
implementation: t
|
|
386
389
|
};
|
|
387
390
|
}
|
|
388
|
-
function
|
|
389
|
-
return
|
|
391
|
+
function Co(e, t, n) {
|
|
392
|
+
return xt(
|
|
390
393
|
{
|
|
391
394
|
type: e.name,
|
|
392
395
|
propSchema: t,
|
|
@@ -398,12 +401,12 @@ function co(e, t, n) {
|
|
|
398
401
|
}
|
|
399
402
|
);
|
|
400
403
|
}
|
|
401
|
-
function
|
|
404
|
+
function wt(e) {
|
|
402
405
|
return Object.fromEntries(
|
|
403
406
|
Object.entries(e).map(([t, n]) => [t, n.config])
|
|
404
407
|
);
|
|
405
408
|
}
|
|
406
|
-
function
|
|
409
|
+
function St(e) {
|
|
407
410
|
return e === "boolean" ? {} : {
|
|
408
411
|
stringValue: {
|
|
409
412
|
default: void 0,
|
|
@@ -415,7 +418,7 @@ function kt(e) {
|
|
|
415
418
|
}
|
|
416
419
|
};
|
|
417
420
|
}
|
|
418
|
-
function
|
|
421
|
+
function V(e, t, n, o) {
|
|
419
422
|
return e.dom.setAttribute("data-style-type", t), o === "string" && e.dom.setAttribute("data-value", n), e.contentDOM && e.contentDOM.setAttribute("data-editable", ""), e;
|
|
420
423
|
}
|
|
421
424
|
function Me(e, t) {
|
|
@@ -440,7 +443,7 @@ function H(e, t) {
|
|
|
440
443
|
);
|
|
441
444
|
const a = o.pmSchema.mark(e.name, {
|
|
442
445
|
stringValue: n
|
|
443
|
-
}), s =
|
|
446
|
+
}), s = ie.renderSpec(
|
|
444
447
|
document,
|
|
445
448
|
r(a, !0)
|
|
446
449
|
);
|
|
@@ -458,7 +461,7 @@ function H(e, t) {
|
|
|
458
461
|
);
|
|
459
462
|
const a = o.pmSchema.mark(e.name, {
|
|
460
463
|
stringValue: n
|
|
461
|
-
}), s =
|
|
464
|
+
}), s = ie.renderSpec(
|
|
462
465
|
document,
|
|
463
466
|
r(a, !0)
|
|
464
467
|
);
|
|
@@ -471,12 +474,12 @@ function H(e, t) {
|
|
|
471
474
|
}
|
|
472
475
|
);
|
|
473
476
|
}
|
|
474
|
-
function
|
|
477
|
+
function Mt(e) {
|
|
475
478
|
return Object.fromEntries(
|
|
476
479
|
Object.entries(e).map(([t, n]) => [t, n.config])
|
|
477
480
|
);
|
|
478
481
|
}
|
|
479
|
-
function
|
|
482
|
+
function Lt(e, t) {
|
|
480
483
|
const n = [
|
|
481
484
|
{
|
|
482
485
|
tag: `[data-style-type="${e.type}"]`,
|
|
@@ -504,14 +507,14 @@ function Le(e, t) {
|
|
|
504
507
|
const n = Fe.create({
|
|
505
508
|
name: e.type,
|
|
506
509
|
addAttributes() {
|
|
507
|
-
return
|
|
510
|
+
return St(e.propSchema);
|
|
508
511
|
},
|
|
509
512
|
parseHTML() {
|
|
510
|
-
return
|
|
513
|
+
return Lt(e, t.parse);
|
|
511
514
|
},
|
|
512
515
|
renderHTML({ mark: o }) {
|
|
513
516
|
const r = (t.toExternalHTML || t.render)(o.attrs.stringValue);
|
|
514
|
-
return
|
|
517
|
+
return V(
|
|
515
518
|
r,
|
|
516
519
|
e.type,
|
|
517
520
|
o.attrs.stringValue,
|
|
@@ -521,7 +524,7 @@ function Le(e, t) {
|
|
|
521
524
|
addMarkView() {
|
|
522
525
|
return ({ mark: o }) => {
|
|
523
526
|
const r = t.render(o.attrs.stringValue);
|
|
524
|
-
return
|
|
527
|
+
return V(
|
|
525
528
|
r,
|
|
526
529
|
e.type,
|
|
527
530
|
o.attrs.stringValue,
|
|
@@ -535,7 +538,7 @@ function Le(e, t) {
|
|
|
535
538
|
mark: n,
|
|
536
539
|
render: (o) => {
|
|
537
540
|
const r = t.render(o);
|
|
538
|
-
return
|
|
541
|
+
return V(
|
|
539
542
|
r,
|
|
540
543
|
e.type,
|
|
541
544
|
o,
|
|
@@ -544,7 +547,7 @@ function Le(e, t) {
|
|
|
544
547
|
},
|
|
545
548
|
toExternalHTML: (o) => {
|
|
546
549
|
const r = (t.toExternalHTML || t.render)(o);
|
|
547
|
-
return
|
|
550
|
+
return V(
|
|
548
551
|
r,
|
|
549
552
|
e.type,
|
|
550
553
|
o,
|
|
@@ -553,32 +556,32 @@ function Le(e, t) {
|
|
|
553
556
|
}
|
|
554
557
|
});
|
|
555
558
|
}
|
|
556
|
-
function
|
|
559
|
+
function Tt(e, t) {
|
|
557
560
|
let n, o;
|
|
558
|
-
if (t.firstChild.descendants((r, a) => n ? !1 : !
|
|
561
|
+
if (t.firstChild.descendants((r, a) => n ? !1 : !Bt(r) || r.attrs.id !== e ? !0 : (n = r, o = a + 1, !1)), !(n === void 0 || o === void 0))
|
|
559
562
|
return {
|
|
560
563
|
node: n,
|
|
561
564
|
posBeforeNode: o
|
|
562
565
|
};
|
|
563
566
|
}
|
|
564
|
-
function
|
|
567
|
+
function Bt(e) {
|
|
565
568
|
return e.type.isInGroup("bnBlock");
|
|
566
569
|
}
|
|
567
|
-
const
|
|
570
|
+
const ko = (e, t) => ({
|
|
568
571
|
tr: n,
|
|
569
572
|
dispatch: o
|
|
570
|
-
}) => (o &&
|
|
571
|
-
function
|
|
572
|
-
const a =
|
|
573
|
+
}) => (o && K(n, e, t), !0);
|
|
574
|
+
function K(e, t, n, o, r) {
|
|
575
|
+
const a = Je(e.doc.resolve(t));
|
|
573
576
|
let s = null;
|
|
574
|
-
a.blockNoteType === "table" && (s =
|
|
575
|
-
const i =
|
|
577
|
+
a.blockNoteType === "table" && (s = Pt(e));
|
|
578
|
+
const i = O(e);
|
|
576
579
|
if (o !== void 0 && r !== void 0 && o > r)
|
|
577
580
|
throw new Error("Invalid replaceFromPos or replaceToPos");
|
|
578
581
|
const c = i.nodes[a.blockNoteType], l = i.nodes[n.type || a.blockNoteType], u = l.isInGroup("bnBlock") ? l : i.nodes.blockContainer;
|
|
579
582
|
if (a.isBlockContainer && l.isInGroup("blockContent")) {
|
|
580
583
|
const d = o !== void 0 && o > a.blockContent.beforePos && o < a.blockContent.afterPos ? o - a.blockContent.beforePos - 1 : void 0, p = r !== void 0 && r > a.blockContent.beforePos && r < a.blockContent.afterPos ? r - a.blockContent.beforePos - 1 : void 0;
|
|
581
|
-
de(n, e, a),
|
|
584
|
+
de(n, e, a), At(
|
|
582
585
|
n,
|
|
583
586
|
e,
|
|
584
587
|
c,
|
|
@@ -590,11 +593,11 @@ function Y(e, t, n, o, r) {
|
|
|
590
593
|
} else if (!a.isBlockContainer && l.isInGroup("bnBlock"))
|
|
591
594
|
de(n, e, a);
|
|
592
595
|
else {
|
|
593
|
-
const d =
|
|
596
|
+
const d = ve(a.bnBlock.node, i);
|
|
594
597
|
e.replaceWith(
|
|
595
598
|
a.bnBlock.beforePos,
|
|
596
599
|
a.bnBlock.afterPos,
|
|
597
|
-
|
|
600
|
+
X(
|
|
598
601
|
{
|
|
599
602
|
children: d.children,
|
|
600
603
|
// if no children are passed in, use existing children
|
|
@@ -608,24 +611,24 @@ function Y(e, t, n, o, r) {
|
|
|
608
611
|
e.setNodeMarkup(a.bnBlock.beforePos, u, {
|
|
609
612
|
...a.bnBlock.node.attrs,
|
|
610
613
|
...n.props
|
|
611
|
-
}), s &&
|
|
614
|
+
}), s && Nt(e, a, s);
|
|
612
615
|
}
|
|
613
|
-
function
|
|
614
|
-
const i =
|
|
616
|
+
function At(e, t, n, o, r, a, s) {
|
|
617
|
+
const i = O(t);
|
|
615
618
|
let c = "keep";
|
|
616
619
|
if (e.content)
|
|
617
620
|
if (typeof e.content == "string")
|
|
618
|
-
c =
|
|
621
|
+
c = se(
|
|
619
622
|
[e.content],
|
|
620
623
|
i,
|
|
621
624
|
o.name
|
|
622
625
|
);
|
|
623
626
|
else if (Array.isArray(e.content))
|
|
624
|
-
c =
|
|
627
|
+
c = se(e.content, i, o.name);
|
|
625
628
|
else if (e.content.type === "tableContent")
|
|
626
|
-
c =
|
|
629
|
+
c = Ye(e.content, i);
|
|
627
630
|
else
|
|
628
|
-
throw new
|
|
631
|
+
throw new et(e.content.type);
|
|
629
632
|
else
|
|
630
633
|
n.spec.content === "" || o.spec.content !== n.spec.content && (c = []);
|
|
631
634
|
if (c === "keep")
|
|
@@ -638,14 +641,14 @@ function wt(e, t, n, o, r, a, s) {
|
|
|
638
641
|
...r.blockContent.node.attrs,
|
|
639
642
|
...e.props
|
|
640
643
|
});
|
|
641
|
-
const l = r.blockContent.beforePos + 1 + (a ?? 0), u = r.blockContent.beforePos + 1 + (s ?? r.blockContent.node.content.size), d = t.doc.resolve(r.blockContent.beforePos).depth, p = t.doc.resolve(l).depth,
|
|
644
|
+
const l = r.blockContent.beforePos + 1 + (a ?? 0), u = r.blockContent.beforePos + 1 + (s ?? r.blockContent.node.content.size), d = t.doc.resolve(r.blockContent.beforePos).depth, p = t.doc.resolve(l).depth, h = t.doc.resolve(u).depth;
|
|
642
645
|
t.replace(
|
|
643
646
|
l,
|
|
644
647
|
u,
|
|
645
|
-
new
|
|
646
|
-
|
|
648
|
+
new we(
|
|
649
|
+
F.from(c),
|
|
647
650
|
p - d - 1,
|
|
648
|
-
|
|
651
|
+
h - d - 1
|
|
649
652
|
)
|
|
650
653
|
);
|
|
651
654
|
} else
|
|
@@ -662,15 +665,15 @@ function wt(e, t, n, o, r, a, s) {
|
|
|
662
665
|
);
|
|
663
666
|
}
|
|
664
667
|
function de(e, t, n) {
|
|
665
|
-
const o =
|
|
668
|
+
const o = O(t);
|
|
666
669
|
if (e.children !== void 0 && e.children.length > 0) {
|
|
667
|
-
const r = e.children.map((a) =>
|
|
670
|
+
const r = e.children.map((a) => X(a, o));
|
|
668
671
|
if (n.childContainer)
|
|
669
672
|
t.step(
|
|
670
|
-
new
|
|
673
|
+
new ze(
|
|
671
674
|
n.childContainer.beforePos + 1,
|
|
672
675
|
n.childContainer.afterPos - 1,
|
|
673
|
-
new
|
|
676
|
+
new we(F.from(r), 0, 0)
|
|
674
677
|
)
|
|
675
678
|
);
|
|
676
679
|
else {
|
|
@@ -683,21 +686,21 @@ function de(e, t, n) {
|
|
|
683
686
|
}
|
|
684
687
|
}
|
|
685
688
|
}
|
|
686
|
-
function
|
|
687
|
-
const a = typeof t == "string" ? t : t.id, s =
|
|
689
|
+
function yo(e, t, n, o, r) {
|
|
690
|
+
const a = typeof t == "string" ? t : t.id, s = Tt(a, e.doc);
|
|
688
691
|
if (!s)
|
|
689
692
|
throw new Error(`Block with ID ${a} not found`);
|
|
690
|
-
|
|
693
|
+
K(
|
|
691
694
|
e,
|
|
692
695
|
s.posBeforeNode,
|
|
693
696
|
n,
|
|
694
697
|
o,
|
|
695
698
|
r
|
|
696
699
|
);
|
|
697
|
-
const i = e.doc.resolve(s.posBeforeNode + 1).node(), c =
|
|
698
|
-
return
|
|
700
|
+
const i = e.doc.resolve(s.posBeforeNode + 1).node(), c = O(e);
|
|
701
|
+
return ve(i, c);
|
|
699
702
|
}
|
|
700
|
-
function
|
|
703
|
+
function Pt(e) {
|
|
701
704
|
const t = "selection" in e ? e.selection : null;
|
|
702
705
|
if (!(t instanceof ke))
|
|
703
706
|
return null;
|
|
@@ -721,7 +724,7 @@ function St(e) {
|
|
|
721
724
|
const d = Math.floor(u / c.width), p = u % c.width, f = a + 1 + 1, E = Math.max(0, t.head - f);
|
|
722
725
|
return { row: d, col: p, offset: E };
|
|
723
726
|
}
|
|
724
|
-
function
|
|
727
|
+
function Nt(e, t, n) {
|
|
725
728
|
var w;
|
|
726
729
|
if (t.blockNoteType !== "table")
|
|
727
730
|
return !1;
|
|
@@ -729,8 +732,8 @@ function Mt(e, t, n) {
|
|
|
729
732
|
if (t.isBlockContainer)
|
|
730
733
|
o = e.mapping.map(t.blockContent.beforePos);
|
|
731
734
|
else {
|
|
732
|
-
const x = e.mapping.map(t.bnBlock.beforePos),
|
|
733
|
-
e.doc.nodesBetween(x,
|
|
735
|
+
const x = e.mapping.map(t.bnBlock.beforePos), P = x + (((w = e.doc.nodeAt(x)) == null ? void 0 : w.nodeSize) || 0);
|
|
736
|
+
e.doc.nodesBetween(x, P, (m, S) => m.type.name === "table" ? (o = S, !1) : !0);
|
|
734
737
|
}
|
|
735
738
|
const r = o >= 0 ? e.doc.nodeAt(o) : null;
|
|
736
739
|
if (!r || r.type.name !== "table")
|
|
@@ -738,7 +741,7 @@ function Mt(e, t, n) {
|
|
|
738
741
|
const a = be.get(r), s = Math.max(0, Math.min(n.row, a.height - 1)), i = Math.max(0, Math.min(n.col, a.width - 1)), c = s * a.width + i, l = a.map[c];
|
|
739
742
|
if (l == null)
|
|
740
743
|
return !1;
|
|
741
|
-
const d = o + 1 + l + 1, p = e.doc.nodeAt(d),
|
|
744
|
+
const d = o + 1 + l + 1, p = e.doc.nodeAt(d), h = d + 1, f = p ? p.content.size : 0, E = h + Math.max(0, Math.min(n.offset, f));
|
|
742
745
|
return "selection" in e && e.setSelection(ke.create(e.doc, E)), !0;
|
|
743
746
|
}
|
|
744
747
|
const T = {
|
|
@@ -778,7 +781,7 @@ const T = {
|
|
|
778
781
|
text: "#ad1a72",
|
|
779
782
|
background: "#f4dfeb"
|
|
780
783
|
}
|
|
781
|
-
},
|
|
784
|
+
}, vo = {
|
|
782
785
|
gray: {
|
|
783
786
|
text: "#bebdb8",
|
|
784
787
|
background: "#9b9a97"
|
|
@@ -815,7 +818,7 @@ const T = {
|
|
|
815
818
|
text: "#da208f",
|
|
816
819
|
background: "#ad1a72"
|
|
817
820
|
}
|
|
818
|
-
},
|
|
821
|
+
}, g = {
|
|
819
822
|
backgroundColor: {
|
|
820
823
|
default: "default"
|
|
821
824
|
},
|
|
@@ -828,30 +831,30 @@ const T = {
|
|
|
828
831
|
}
|
|
829
832
|
}, y = (e) => {
|
|
830
833
|
const t = {};
|
|
831
|
-
return e.hasAttribute("data-background-color") ? t.backgroundColor = e.getAttribute("data-background-color") : e.style.backgroundColor && (t.backgroundColor = e.style.backgroundColor), e.hasAttribute("data-text-color") ? t.textColor = e.getAttribute("data-text-color") : e.style.color && (t.textColor = e.style.color), t.textAlignment =
|
|
834
|
+
return e.hasAttribute("data-background-color") ? t.backgroundColor = e.getAttribute("data-background-color") : e.style.backgroundColor && (t.backgroundColor = e.style.backgroundColor), e.hasAttribute("data-text-color") ? t.textColor = e.getAttribute("data-text-color") : e.style.color && (t.textColor = e.style.color), t.textAlignment = g.textAlignment.values.includes(
|
|
832
835
|
e.style.textAlign
|
|
833
836
|
) ? e.style.textAlign : void 0, t;
|
|
834
837
|
}, A = (e, t) => {
|
|
835
|
-
e.backgroundColor && e.backgroundColor !==
|
|
836
|
-
},
|
|
837
|
-
default:
|
|
838
|
-
parseHTML: (t) => t.hasAttribute("data-background-color") ? t.getAttribute("data-background-color") : t.style.backgroundColor ? t.style.backgroundColor :
|
|
839
|
-
renderHTML: (t) => t[e] ===
|
|
838
|
+
e.backgroundColor && e.backgroundColor !== g.backgroundColor.default && (t.style.backgroundColor = e.backgroundColor in T ? T[e.backgroundColor].background : e.backgroundColor), e.textColor && e.textColor !== g.textColor.default && (t.style.color = e.textColor in T ? T[e.textColor].text : e.textColor), e.textAlignment && e.textAlignment !== g.textAlignment.default && (t.style.textAlign = e.textAlignment);
|
|
839
|
+
}, Eo = (e = "backgroundColor") => ({
|
|
840
|
+
default: g.backgroundColor.default,
|
|
841
|
+
parseHTML: (t) => t.hasAttribute("data-background-color") ? t.getAttribute("data-background-color") : t.style.backgroundColor ? t.style.backgroundColor : g.backgroundColor.default,
|
|
842
|
+
renderHTML: (t) => t[e] === g.backgroundColor.default ? {} : {
|
|
840
843
|
"data-background-color": t[e]
|
|
841
844
|
}
|
|
842
|
-
}),
|
|
843
|
-
default:
|
|
844
|
-
parseHTML: (t) => t.hasAttribute("data-text-color") ? t.getAttribute("data-text-color") : t.style.color ? t.style.color :
|
|
845
|
-
renderHTML: (t) => t[e] ===
|
|
845
|
+
}), xo = (e = "textColor") => ({
|
|
846
|
+
default: g.textColor.default,
|
|
847
|
+
parseHTML: (t) => t.hasAttribute("data-text-color") ? t.getAttribute("data-text-color") : t.style.color ? t.style.color : g.textColor.default,
|
|
848
|
+
renderHTML: (t) => t[e] === g.textColor.default ? {} : {
|
|
846
849
|
"data-text-color": t[e]
|
|
847
850
|
}
|
|
848
|
-
}),
|
|
849
|
-
default:
|
|
850
|
-
parseHTML: (t) => t.hasAttribute("data-text-alignment") ? t.getAttribute("data-text-alignment") : t.style.textAlign ? t.style.textAlign :
|
|
851
|
-
renderHTML: (t) => t[e] ===
|
|
851
|
+
}), wo = (e = "textAlignment") => ({
|
|
852
|
+
default: g.textAlignment.default,
|
|
853
|
+
parseHTML: (t) => t.hasAttribute("data-text-alignment") ? t.getAttribute("data-text-alignment") : t.style.textAlign ? t.style.textAlign : g.textAlignment.default,
|
|
854
|
+
renderHTML: (t) => t[e] === g.textAlignment.default ? {} : {
|
|
852
855
|
"data-text-alignment": t[e]
|
|
853
856
|
}
|
|
854
|
-
}),
|
|
857
|
+
}), $ = (e, t) => {
|
|
855
858
|
const n = e.querySelector(
|
|
856
859
|
t
|
|
857
860
|
);
|
|
@@ -860,7 +863,7 @@ const T = {
|
|
|
860
863
|
const o = e.querySelector("figcaption"), r = (o == null ? void 0 : o.textContent) ?? void 0;
|
|
861
864
|
return { targetElement: n, caption: r };
|
|
862
865
|
}, I = k(({ editor: e }) => {
|
|
863
|
-
const t =
|
|
866
|
+
const t = ye(void 0);
|
|
864
867
|
function n() {
|
|
865
868
|
t.setState(void 0);
|
|
866
869
|
}
|
|
@@ -886,7 +889,7 @@ const T = {
|
|
|
886
889
|
t.setState(o);
|
|
887
890
|
}
|
|
888
891
|
};
|
|
889
|
-
}),
|
|
892
|
+
}), Ht = (e, t, n) => {
|
|
890
893
|
const o = document.createElement("div");
|
|
891
894
|
o.className = "bn-add-file-button";
|
|
892
895
|
const r = document.createElement("div");
|
|
@@ -917,19 +920,19 @@ const T = {
|
|
|
917
920
|
);
|
|
918
921
|
}
|
|
919
922
|
};
|
|
920
|
-
},
|
|
923
|
+
}, It = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M3 8L9.00319 2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8ZM10 4V9H5V20H19V4H10Z"></path></svg>', Dt = (e) => {
|
|
921
924
|
const t = document.createElement("div");
|
|
922
925
|
t.className = "bn-file-name-with-icon";
|
|
923
926
|
const n = document.createElement("div");
|
|
924
|
-
n.className = "bn-file-icon", n.innerHTML =
|
|
927
|
+
n.className = "bn-file-icon", n.innerHTML = It, t.appendChild(n);
|
|
925
928
|
const o = document.createElement("p");
|
|
926
929
|
return o.className = "bn-file-name", o.textContent = e.props.name, t.appendChild(o), {
|
|
927
930
|
dom: t
|
|
928
931
|
};
|
|
929
|
-
},
|
|
932
|
+
}, Q = (e, t, n, o) => {
|
|
930
933
|
const r = document.createElement("div");
|
|
931
934
|
if (r.className = "bn-file-block-content-wrapper", e.props.url === "") {
|
|
932
|
-
const s =
|
|
935
|
+
const s = Ht(e, t, o);
|
|
933
936
|
r.appendChild(s.dom);
|
|
934
937
|
const i = t.onUploadStart((c) => {
|
|
935
938
|
if (c === e.id) {
|
|
@@ -947,7 +950,7 @@ const T = {
|
|
|
947
950
|
}
|
|
948
951
|
const a = { dom: r };
|
|
949
952
|
if (e.props.showPreview === !1 || !n) {
|
|
950
|
-
const s =
|
|
953
|
+
const s = Dt(e);
|
|
951
954
|
r.appendChild(s.dom), a.destroy = () => {
|
|
952
955
|
var i;
|
|
953
956
|
(i = s.destroy) == null || i.call(s);
|
|
@@ -959,18 +962,18 @@ const T = {
|
|
|
959
962
|
s.className = "bn-file-caption", s.textContent = e.props.caption, r.appendChild(s);
|
|
960
963
|
}
|
|
961
964
|
return a;
|
|
962
|
-
},
|
|
965
|
+
}, J = (e, t) => {
|
|
963
966
|
const n = document.createElement("figure"), o = document.createElement("figcaption");
|
|
964
967
|
return o.textContent = t, n.appendChild(e), n.appendChild(o), { dom: n };
|
|
965
|
-
},
|
|
968
|
+
}, U = (e, t) => {
|
|
966
969
|
const n = document.createElement("div"), o = document.createElement("p");
|
|
967
970
|
return o.textContent = t, n.appendChild(e), n.appendChild(o), {
|
|
968
971
|
dom: n
|
|
969
972
|
};
|
|
970
|
-
}, ue = (e) => ({ url: e.src || void 0 }),
|
|
973
|
+
}, ue = (e) => ({ url: e.src || void 0 }), Ot = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z"></path></svg>', _t = (e) => ({
|
|
971
974
|
type: "audio",
|
|
972
975
|
propSchema: {
|
|
973
|
-
backgroundColor:
|
|
976
|
+
backgroundColor: g.backgroundColor,
|
|
974
977
|
// File name.
|
|
975
978
|
name: {
|
|
976
979
|
default: ""
|
|
@@ -988,7 +991,7 @@ const T = {
|
|
|
988
991
|
}
|
|
989
992
|
},
|
|
990
993
|
content: "none"
|
|
991
|
-
}),
|
|
994
|
+
}), Vt = (e = {}) => (t) => {
|
|
992
995
|
if (t.tagName === "AUDIO") {
|
|
993
996
|
if (t.closest("figure"))
|
|
994
997
|
return;
|
|
@@ -999,7 +1002,7 @@ const T = {
|
|
|
999
1002
|
};
|
|
1000
1003
|
}
|
|
1001
1004
|
if (t.tagName === "FIGURE") {
|
|
1002
|
-
const n =
|
|
1005
|
+
const n = $(t, "audio");
|
|
1003
1006
|
if (!n)
|
|
1004
1007
|
return;
|
|
1005
1008
|
const { targetElement: o, caption: r } = n, { backgroundColor: a } = y(t);
|
|
@@ -1009,19 +1012,19 @@ const T = {
|
|
|
1009
1012
|
caption: r
|
|
1010
1013
|
};
|
|
1011
1014
|
}
|
|
1012
|
-
},
|
|
1015
|
+
}, Rt = (e = {}) => (t, n) => {
|
|
1013
1016
|
const o = document.createElement("div");
|
|
1014
|
-
o.innerHTML = e.icon ??
|
|
1017
|
+
o.innerHTML = e.icon ?? Ot;
|
|
1015
1018
|
const r = document.createElement("audio");
|
|
1016
1019
|
return r.className = "bn-audio", n.resolveFileUrl ? n.resolveFileUrl(t.props.url).then((a) => {
|
|
1017
1020
|
r.src = a;
|
|
1018
|
-
}) : r.src = t.props.url, r.controls = !0, r.contentEditable = "false", r.draggable = !1,
|
|
1021
|
+
}) : r.src = t.props.url, r.controls = !0, r.contentEditable = "false", r.draggable = !1, Q(
|
|
1019
1022
|
t,
|
|
1020
1023
|
n,
|
|
1021
1024
|
{ dom: r },
|
|
1022
1025
|
o.firstElementChild
|
|
1023
1026
|
);
|
|
1024
|
-
},
|
|
1027
|
+
}, Wt = (e = {}) => (t, n) => {
|
|
1025
1028
|
if (!t.props.url) {
|
|
1026
1029
|
const r = document.createElement("p");
|
|
1027
1030
|
return r.textContent = "Add audio", {
|
|
@@ -1029,46 +1032,46 @@ const T = {
|
|
|
1029
1032
|
};
|
|
1030
1033
|
}
|
|
1031
1034
|
let o;
|
|
1032
|
-
return t.props.showPreview ? (o = document.createElement("audio"), o.src = t.props.url) : (o = document.createElement("a"), o.href = t.props.url, o.textContent = t.props.name || t.props.url), t.props.caption ? t.props.showPreview ?
|
|
1035
|
+
return t.props.showPreview ? (o = document.createElement("audio"), o.src = t.props.url) : (o = document.createElement("a"), o.href = t.props.url, o.textContent = t.props.name || t.props.url), t.props.caption ? t.props.showPreview ? J(o, t.props.caption) : U(o, t.props.caption) : {
|
|
1033
1036
|
dom: o
|
|
1034
1037
|
};
|
|
1035
|
-
},
|
|
1036
|
-
|
|
1038
|
+
}, Ft = v(
|
|
1039
|
+
_t,
|
|
1037
1040
|
(e) => ({
|
|
1038
1041
|
meta: {
|
|
1039
1042
|
fileBlockAccept: ["audio/*"]
|
|
1040
1043
|
},
|
|
1041
|
-
parse:
|
|
1042
|
-
render:
|
|
1043
|
-
toExternalHTML:
|
|
1044
|
+
parse: Vt(e),
|
|
1045
|
+
render: Rt(e),
|
|
1046
|
+
toExternalHTML: Wt(e),
|
|
1044
1047
|
runsBefore: ["file"]
|
|
1045
1048
|
})
|
|
1046
|
-
), pe = Symbol.for("blocknote.shikiParser"),
|
|
1049
|
+
), pe = Symbol.for("blocknote.shikiParser"), j = Symbol.for(
|
|
1047
1050
|
"blocknote.shikiHighlighterPromise"
|
|
1048
1051
|
);
|
|
1049
|
-
function
|
|
1052
|
+
function $t(e) {
|
|
1050
1053
|
const t = globalThis;
|
|
1051
1054
|
let n, o, r = !1;
|
|
1052
|
-
return
|
|
1055
|
+
return dt({
|
|
1053
1056
|
parser: (s) => {
|
|
1054
1057
|
if (!e.createHighlighter)
|
|
1055
1058
|
return process.env.NODE_ENV === "development" && !r && (console.log(
|
|
1056
1059
|
"For syntax highlighting of code blocks, you must provide a `createCodeBlockSpec({ createHighlighter: () => ... })` function"
|
|
1057
1060
|
), r = !0), [];
|
|
1058
1061
|
if (!n)
|
|
1059
|
-
return t[
|
|
1062
|
+
return t[j] = t[j] || e.createHighlighter(), t[j].then(
|
|
1060
1063
|
(c) => {
|
|
1061
1064
|
n = c;
|
|
1062
1065
|
}
|
|
1063
1066
|
);
|
|
1064
1067
|
const i = Te(e, s.language);
|
|
1065
|
-
return !i || i === "text" || i === "none" || i === "plaintext" || i === "txt" ? [] : n.getLoadedLanguages().includes(i) ? (o || (o = t[pe] ||
|
|
1068
|
+
return !i || i === "text" || i === "none" || i === "plaintext" || i === "txt" ? [] : n.getLoadedLanguages().includes(i) ? (o || (o = t[pe] || ut(n), t[pe] = o), o(s)) : n.loadLanguage(i);
|
|
1066
1069
|
},
|
|
1067
1070
|
languageExtractor: (s) => s.attrs.language,
|
|
1068
1071
|
nodeTypes: ["codeBlock"]
|
|
1069
1072
|
});
|
|
1070
1073
|
}
|
|
1071
|
-
const
|
|
1074
|
+
const Ut = ({ defaultLanguage: e = "text" }) => ({
|
|
1072
1075
|
type: "codeBlock",
|
|
1073
1076
|
propSchema: {
|
|
1074
1077
|
language: {
|
|
@@ -1076,8 +1079,8 @@ const Ot = ({ defaultLanguage: e = "text" }) => ({
|
|
|
1076
1079
|
}
|
|
1077
1080
|
},
|
|
1078
1081
|
content: "inline"
|
|
1079
|
-
}),
|
|
1080
|
-
|
|
1082
|
+
}), qt = v(
|
|
1083
|
+
Ut,
|
|
1081
1084
|
(e) => ({
|
|
1082
1085
|
meta: {
|
|
1083
1086
|
code: !0,
|
|
@@ -1092,7 +1095,7 @@ const Ot = ({ defaultLanguage: e = "text" }) => ({
|
|
|
1092
1095
|
return { language: n.getAttribute("data-language") || ((a = n.className.split(" ").find((s) => s.includes("language-"))) == null ? void 0 : a.replace("language-", "")) };
|
|
1093
1096
|
},
|
|
1094
1097
|
parseContent: ({ el: t, schema: n }) => {
|
|
1095
|
-
const o =
|
|
1098
|
+
const o = xe.fromSchema(n), r = t.firstElementChild;
|
|
1096
1099
|
return o.parse(r, {
|
|
1097
1100
|
preserveWhitespace: "full",
|
|
1098
1101
|
topNode: n.nodes.codeBlock.create()
|
|
@@ -1137,7 +1140,7 @@ const Ot = ({ defaultLanguage: e = "text" }) => ({
|
|
|
1137
1140
|
(e) => [
|
|
1138
1141
|
k({
|
|
1139
1142
|
key: "code-block-highlighter",
|
|
1140
|
-
prosemirrorPlugins: [
|
|
1143
|
+
prosemirrorPlugins: [$t(e)]
|
|
1141
1144
|
}),
|
|
1142
1145
|
k({
|
|
1143
1146
|
key: "code-block-keyboard-shortcuts",
|
|
@@ -1212,12 +1215,12 @@ function Te(e, t) {
|
|
|
1212
1215
|
([o, { aliases: r }]) => (r == null ? void 0 : r.includes(t)) || o === t
|
|
1213
1216
|
)) == null ? void 0 : n[0];
|
|
1214
1217
|
}
|
|
1215
|
-
const
|
|
1218
|
+
const jt = () => ({
|
|
1216
1219
|
type: "divider",
|
|
1217
1220
|
propSchema: {},
|
|
1218
1221
|
content: "none"
|
|
1219
|
-
}),
|
|
1220
|
-
|
|
1222
|
+
}), Gt = v(
|
|
1223
|
+
jt,
|
|
1221
1224
|
{
|
|
1222
1225
|
meta: {
|
|
1223
1226
|
isolating: !1
|
|
@@ -1245,10 +1248,10 @@ const Rt = () => ({
|
|
|
1245
1248
|
]
|
|
1246
1249
|
})
|
|
1247
1250
|
]
|
|
1248
|
-
), fe = (e) => ({ url: e.src || void 0 }),
|
|
1251
|
+
), fe = (e) => ({ url: e.src || void 0 }), Zt = () => ({
|
|
1249
1252
|
type: "file",
|
|
1250
1253
|
propSchema: {
|
|
1251
|
-
backgroundColor:
|
|
1254
|
+
backgroundColor: g.backgroundColor,
|
|
1252
1255
|
// File name.
|
|
1253
1256
|
name: {
|
|
1254
1257
|
default: ""
|
|
@@ -1263,7 +1266,7 @@ const Rt = () => ({
|
|
|
1263
1266
|
}
|
|
1264
1267
|
},
|
|
1265
1268
|
content: "none"
|
|
1266
|
-
}),
|
|
1269
|
+
}), zt = () => (e) => {
|
|
1267
1270
|
if (e.tagName === "EMBED") {
|
|
1268
1271
|
if (e.closest("figure"))
|
|
1269
1272
|
return;
|
|
@@ -1274,7 +1277,7 @@ const Rt = () => ({
|
|
|
1274
1277
|
};
|
|
1275
1278
|
}
|
|
1276
1279
|
if (e.tagName === "FIGURE") {
|
|
1277
|
-
const t =
|
|
1280
|
+
const t = $(e, "embed");
|
|
1278
1281
|
if (!t)
|
|
1279
1282
|
return;
|
|
1280
1283
|
const { targetElement: n, caption: o } = t, { backgroundColor: r } = y(e);
|
|
@@ -1284,13 +1287,13 @@ const Rt = () => ({
|
|
|
1284
1287
|
caption: o
|
|
1285
1288
|
};
|
|
1286
1289
|
}
|
|
1287
|
-
},
|
|
1290
|
+
}, Xt = v(Zt, {
|
|
1288
1291
|
meta: {
|
|
1289
1292
|
fileBlockAccept: ["*/*"]
|
|
1290
1293
|
},
|
|
1291
|
-
parse:
|
|
1294
|
+
parse: zt(),
|
|
1292
1295
|
render(e, t) {
|
|
1293
|
-
return
|
|
1296
|
+
return Q(e, t);
|
|
1294
1297
|
},
|
|
1295
1298
|
toExternalHTML(e) {
|
|
1296
1299
|
if (!e.props.url) {
|
|
@@ -1300,17 +1303,17 @@ const Rt = () => ({
|
|
|
1300
1303
|
};
|
|
1301
1304
|
}
|
|
1302
1305
|
const t = document.createElement("a");
|
|
1303
|
-
return t.href = e.props.url, t.textContent = e.props.name || e.props.url, e.props.caption ?
|
|
1306
|
+
return t.href = e.props.url, t.textContent = e.props.name || e.props.url, e.props.caption ? U(t, e.props.caption) : {
|
|
1304
1307
|
dom: t
|
|
1305
1308
|
};
|
|
1306
1309
|
}
|
|
1307
|
-
}),
|
|
1310
|
+
}), Kt = {
|
|
1308
1311
|
set: (e, t) => window.localStorage.setItem(
|
|
1309
1312
|
`toggle-${e.id}`,
|
|
1310
1313
|
t ? "true" : "false"
|
|
1311
1314
|
),
|
|
1312
1315
|
get: (e) => window.localStorage.getItem(`toggle-${e.id}`) === "true"
|
|
1313
|
-
}, Be = (e, t, n, o =
|
|
1316
|
+
}, Be = (e, t, n, o = Kt) => {
|
|
1314
1317
|
if ("isToggleable" in e.props && !e.props.isToggleable)
|
|
1315
1318
|
return {
|
|
1316
1319
|
dom: n
|
|
@@ -1345,7 +1348,7 @@ const Rt = () => ({
|
|
|
1345
1348
|
};
|
|
1346
1349
|
l.addEventListener("click", d), r.appendChild(a);
|
|
1347
1350
|
let p = e.children.length;
|
|
1348
|
-
const
|
|
1351
|
+
const h = t.onChange(() => {
|
|
1349
1352
|
var E;
|
|
1350
1353
|
const f = ((E = t.getBlock(e)) == null ? void 0 : E.children.length) ?? 0;
|
|
1351
1354
|
f > p ? (a.getAttribute("data-show-children") === "false" && (a.setAttribute("data-show-children", "true"), o.set(t.getBlock(e), !0)), r.contains(l) && r.removeChild(l)) : f === 0 && f < p && (a.getAttribute("data-show-children") === "true" && (a.setAttribute("data-show-children", "false"), o.set(t.getBlock(e), !1)), r.contains(l) && r.removeChild(l)), p = f;
|
|
@@ -1364,29 +1367,29 @@ const Rt = () => ({
|
|
|
1364
1367
|
), l.removeEventListener(
|
|
1365
1368
|
"click",
|
|
1366
1369
|
d
|
|
1367
|
-
),
|
|
1370
|
+
), h == null || h();
|
|
1368
1371
|
}
|
|
1369
1372
|
};
|
|
1370
|
-
}, Ae = [1, 2, 3, 4, 5, 6],
|
|
1373
|
+
}, Ae = [1, 2, 3, 4, 5, 6], Qt = (e) => ({ editor: t }) => {
|
|
1371
1374
|
const n = t.getTextCursorPosition();
|
|
1372
1375
|
return t.schema.blockSchema[n.block.type].content !== "inline" ? !1 : (t.updateBlock(n.block, {
|
|
1373
1376
|
type: "heading",
|
|
1374
1377
|
props: { level: e }
|
|
1375
1378
|
}), !0);
|
|
1376
|
-
},
|
|
1379
|
+
}, Jt = ({
|
|
1377
1380
|
defaultLevel: e = 1,
|
|
1378
1381
|
levels: t = Ae,
|
|
1379
1382
|
allowToggleHeadings: n = !0
|
|
1380
1383
|
} = {}) => ({
|
|
1381
1384
|
type: "heading",
|
|
1382
1385
|
propSchema: {
|
|
1383
|
-
...
|
|
1386
|
+
...g,
|
|
1384
1387
|
level: { default: e, values: t },
|
|
1385
1388
|
...n ? { isToggleable: { default: !1, optional: !0 } } : {}
|
|
1386
1389
|
},
|
|
1387
1390
|
content: "inline"
|
|
1388
|
-
}),
|
|
1389
|
-
|
|
1391
|
+
}), Yt = v(
|
|
1392
|
+
Jt,
|
|
1390
1393
|
({ allowToggleHeadings: e = !0 } = {}) => ({
|
|
1391
1394
|
meta: {
|
|
1392
1395
|
isolating: !1
|
|
@@ -1441,7 +1444,7 @@ const Rt = () => ({
|
|
|
1441
1444
|
keyboardShortcuts: Object.fromEntries(
|
|
1442
1445
|
e.map((t) => [
|
|
1443
1446
|
`Mod-Alt-${t}`,
|
|
1444
|
-
|
|
1447
|
+
Qt(t)
|
|
1445
1448
|
]) ?? []
|
|
1446
1449
|
),
|
|
1447
1450
|
inputRules: e.map((t) => ({
|
|
@@ -1457,8 +1460,8 @@ const Rt = () => ({
|
|
|
1457
1460
|
}))
|
|
1458
1461
|
})
|
|
1459
1462
|
]
|
|
1460
|
-
),
|
|
1461
|
-
const { dom: a, destroy: s } =
|
|
1463
|
+
), Pe = (e, t, n, o, r) => {
|
|
1464
|
+
const { dom: a, destroy: s } = Q(
|
|
1462
1465
|
e,
|
|
1463
1466
|
t,
|
|
1464
1467
|
n,
|
|
@@ -1472,17 +1475,17 @@ const Rt = () => ({
|
|
|
1472
1475
|
const u = document.createElement("div");
|
|
1473
1476
|
u.style.position = "absolute", u.style.height = "100%", u.style.width = "100%";
|
|
1474
1477
|
let d, p = e.props.previewWidth;
|
|
1475
|
-
const
|
|
1476
|
-
var
|
|
1478
|
+
const h = (m) => {
|
|
1479
|
+
var ee, te;
|
|
1477
1480
|
if (!d) {
|
|
1478
1481
|
!t.isEditable && o.contains(c) && o.contains(l) && (o.removeChild(c), o.removeChild(l));
|
|
1479
1482
|
return;
|
|
1480
1483
|
}
|
|
1481
1484
|
let S;
|
|
1482
|
-
const
|
|
1483
|
-
e.props.textAlignment === "center" ? d.handleUsed === "left" ? S = d.initialWidth + (d.initialClientX -
|
|
1485
|
+
const _ = "touches" in m ? m.touches[0].clientX : m.clientX;
|
|
1486
|
+
e.props.textAlignment === "center" ? d.handleUsed === "left" ? S = d.initialWidth + (d.initialClientX - _) * 2 : S = d.initialWidth + (_ - d.initialClientX) * 2 : d.handleUsed === "left" ? S = d.initialWidth + d.initialClientX - _ : S = d.initialWidth + _ - d.initialClientX, p = Math.min(
|
|
1484
1487
|
Math.max(S, 64),
|
|
1485
|
-
((
|
|
1488
|
+
((te = (ee = t.domElement) == null ? void 0 : ee.firstElementChild) == null ? void 0 : te.clientWidth) || Number.MAX_VALUE
|
|
1486
1489
|
), i.style.width = `${p}px`;
|
|
1487
1490
|
}, f = (m) => {
|
|
1488
1491
|
(!m.target || !i.contains(m.target) || !t.isEditable) && o.contains(c) && o.contains(l) && (o.removeChild(c), o.removeChild(l)), d && (d = void 0, i.contains(u) && i.removeChild(u), t.updateBlock(e, {
|
|
@@ -1502,7 +1505,7 @@ const Rt = () => ({
|
|
|
1502
1505
|
initialWidth: i.clientWidth,
|
|
1503
1506
|
initialClientX: S
|
|
1504
1507
|
};
|
|
1505
|
-
},
|
|
1508
|
+
}, P = (m) => {
|
|
1506
1509
|
m.preventDefault(), i.contains(u) || i.appendChild(u);
|
|
1507
1510
|
const S = "touches" in m ? m.touches[0].clientX : m.clientX;
|
|
1508
1511
|
d = {
|
|
@@ -1511,7 +1514,7 @@ const Rt = () => ({
|
|
|
1511
1514
|
initialClientX: S
|
|
1512
1515
|
};
|
|
1513
1516
|
};
|
|
1514
|
-
return window.addEventListener("mousemove",
|
|
1517
|
+
return window.addEventListener("mousemove", h), window.addEventListener("touchmove", h), window.addEventListener("mouseup", f), window.addEventListener("touchend", f), i.addEventListener("mouseenter", E), i.addEventListener("mouseleave", w), c.addEventListener(
|
|
1515
1518
|
"mousedown",
|
|
1516
1519
|
x
|
|
1517
1520
|
), c.addEventListener(
|
|
@@ -1519,14 +1522,14 @@ const Rt = () => ({
|
|
|
1519
1522
|
x
|
|
1520
1523
|
), l.addEventListener(
|
|
1521
1524
|
"mousedown",
|
|
1522
|
-
|
|
1525
|
+
P
|
|
1523
1526
|
), l.addEventListener(
|
|
1524
1527
|
"touchstart",
|
|
1525
|
-
|
|
1528
|
+
P
|
|
1526
1529
|
), {
|
|
1527
1530
|
dom: i,
|
|
1528
1531
|
destroy: () => {
|
|
1529
|
-
s == null || s(), window.removeEventListener("mousemove",
|
|
1532
|
+
s == null || s(), window.removeEventListener("mousemove", h), window.removeEventListener("touchmove", h), window.removeEventListener("mouseup", f), window.removeEventListener("touchend", f), i.removeEventListener("mouseenter", E), i.removeEventListener("mouseleave", w), c.removeEventListener(
|
|
1530
1533
|
"mousedown",
|
|
1531
1534
|
x
|
|
1532
1535
|
), c.removeEventListener(
|
|
@@ -1534,21 +1537,21 @@ const Rt = () => ({
|
|
|
1534
1537
|
x
|
|
1535
1538
|
), l.removeEventListener(
|
|
1536
1539
|
"mousedown",
|
|
1537
|
-
|
|
1540
|
+
P
|
|
1538
1541
|
), l.removeEventListener(
|
|
1539
1542
|
"touchstart",
|
|
1540
|
-
|
|
1543
|
+
P
|
|
1541
1544
|
);
|
|
1542
1545
|
}
|
|
1543
1546
|
};
|
|
1544
|
-
},
|
|
1547
|
+
}, ge = (e) => {
|
|
1545
1548
|
const t = e.src || void 0, n = e.width || void 0, o = e.alt || void 0;
|
|
1546
1549
|
return { url: t, previewWidth: n, name: o };
|
|
1547
|
-
},
|
|
1550
|
+
}, en = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M5 11.1005L7 9.1005L12.5 14.6005L16 11.1005L19 14.1005V5H5V11.1005ZM4 3H20C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3ZM15.5 10C14.6716 10 14 9.32843 14 8.5C14 7.67157 14.6716 7 15.5 7C16.3284 7 17 7.67157 17 8.5C17 9.32843 16.3284 10 15.5 10Z"></path></svg>', tn = (e = {}) => ({
|
|
1548
1551
|
type: "image",
|
|
1549
1552
|
propSchema: {
|
|
1550
|
-
textAlignment:
|
|
1551
|
-
backgroundColor:
|
|
1553
|
+
textAlignment: g.textAlignment,
|
|
1554
|
+
backgroundColor: g.backgroundColor,
|
|
1552
1555
|
// File name.
|
|
1553
1556
|
name: {
|
|
1554
1557
|
default: ""
|
|
@@ -1571,43 +1574,43 @@ const Rt = () => ({
|
|
|
1571
1574
|
}
|
|
1572
1575
|
},
|
|
1573
1576
|
content: "none"
|
|
1574
|
-
}),
|
|
1577
|
+
}), nn = (e = {}) => (t) => {
|
|
1575
1578
|
if (t.tagName === "IMG") {
|
|
1576
1579
|
if (t.closest("figure"))
|
|
1577
1580
|
return;
|
|
1578
1581
|
const { backgroundColor: n } = y(t);
|
|
1579
1582
|
return {
|
|
1580
|
-
...
|
|
1583
|
+
...ge(t),
|
|
1581
1584
|
backgroundColor: n
|
|
1582
1585
|
};
|
|
1583
1586
|
}
|
|
1584
1587
|
if (t.tagName === "FIGURE") {
|
|
1585
|
-
const n =
|
|
1588
|
+
const n = $(t, "img");
|
|
1586
1589
|
if (!n)
|
|
1587
1590
|
return;
|
|
1588
1591
|
const { targetElement: o, caption: r } = n, { backgroundColor: a } = y(t);
|
|
1589
1592
|
return {
|
|
1590
|
-
...
|
|
1593
|
+
...ge(o),
|
|
1591
1594
|
backgroundColor: a,
|
|
1592
1595
|
caption: r
|
|
1593
1596
|
};
|
|
1594
1597
|
}
|
|
1595
|
-
},
|
|
1598
|
+
}, on = (e = {}) => (t, n) => {
|
|
1596
1599
|
const o = document.createElement("div");
|
|
1597
|
-
o.innerHTML = e.icon ??
|
|
1600
|
+
o.innerHTML = e.icon ?? en;
|
|
1598
1601
|
const r = document.createElement("div");
|
|
1599
1602
|
r.className = "bn-visual-media-wrapper";
|
|
1600
1603
|
const a = document.createElement("img");
|
|
1601
1604
|
return a.className = "bn-visual-media", n.resolveFileUrl ? n.resolveFileUrl(t.props.url).then((s) => {
|
|
1602
1605
|
a.src = s;
|
|
1603
|
-
}) : a.src = t.props.url, a.alt = t.props.name || t.props.caption || "BlockNote image", a.contentEditable = "false", a.draggable = !1, r.appendChild(a),
|
|
1606
|
+
}) : a.src = t.props.url, a.alt = t.props.name || t.props.caption || "BlockNote image", a.contentEditable = "false", a.draggable = !1, r.appendChild(a), Pe(
|
|
1604
1607
|
t,
|
|
1605
1608
|
n,
|
|
1606
1609
|
{ dom: r },
|
|
1607
1610
|
r,
|
|
1608
1611
|
o.firstElementChild
|
|
1609
1612
|
);
|
|
1610
|
-
},
|
|
1613
|
+
}, rn = (e = {}) => (t, n) => {
|
|
1611
1614
|
if (!t.props.url) {
|
|
1612
1615
|
const r = document.createElement("p");
|
|
1613
1616
|
return r.textContent = "Add image", {
|
|
@@ -1615,28 +1618,28 @@ const Rt = () => ({
|
|
|
1615
1618
|
};
|
|
1616
1619
|
}
|
|
1617
1620
|
let o;
|
|
1618
|
-
return t.props.showPreview ? (o = document.createElement("img"), o.src = t.props.url, o.alt = t.props.name || t.props.caption || "BlockNote image", t.props.previewWidth && (o.width = t.props.previewWidth)) : (o = document.createElement("a"), o.href = t.props.url, o.textContent = t.props.name || t.props.url), t.props.caption ? t.props.showPreview ?
|
|
1621
|
+
return t.props.showPreview ? (o = document.createElement("img"), o.src = t.props.url, o.alt = t.props.name || t.props.caption || "BlockNote image", t.props.previewWidth && (o.width = t.props.previewWidth)) : (o = document.createElement("a"), o.href = t.props.url, o.textContent = t.props.name || t.props.url), t.props.caption ? t.props.showPreview ? J(o, t.props.caption) : U(o, t.props.caption) : {
|
|
1619
1622
|
dom: o
|
|
1620
1623
|
};
|
|
1621
|
-
},
|
|
1622
|
-
|
|
1624
|
+
}, an = v(
|
|
1625
|
+
tn,
|
|
1623
1626
|
(e) => ({
|
|
1624
1627
|
meta: {
|
|
1625
1628
|
fileBlockAccept: ["image/*"]
|
|
1626
1629
|
},
|
|
1627
|
-
parse:
|
|
1628
|
-
render:
|
|
1629
|
-
toExternalHTML:
|
|
1630
|
+
parse: nn(e),
|
|
1631
|
+
render: on(e),
|
|
1632
|
+
toExternalHTML: rn(e),
|
|
1630
1633
|
runsBefore: ["file"]
|
|
1631
1634
|
})
|
|
1632
|
-
),
|
|
1635
|
+
), So = (e, t, n) => ({
|
|
1633
1636
|
state: o,
|
|
1634
1637
|
dispatch: r
|
|
1635
|
-
}) => r ?
|
|
1636
|
-
const r =
|
|
1638
|
+
}) => r ? Ne(o.tr, e, t, n) : !0, Ne = (e, t, n, o) => {
|
|
1639
|
+
const r = tt(e.doc, t), a = G(r);
|
|
1637
1640
|
if (!a.isBlockContainer)
|
|
1638
1641
|
return !1;
|
|
1639
|
-
const s =
|
|
1642
|
+
const s = O(e), i = [
|
|
1640
1643
|
{
|
|
1641
1644
|
type: a.bnBlock.node.type,
|
|
1642
1645
|
// always keep blockcontainer type
|
|
@@ -1648,24 +1651,24 @@ const Rt = () => ({
|
|
|
1648
1651
|
}
|
|
1649
1652
|
];
|
|
1650
1653
|
return e.split(t, 2, i), !0;
|
|
1651
|
-
},
|
|
1654
|
+
}, q = (e, t) => {
|
|
1652
1655
|
const { blockInfo: n, selectionEmpty: o } = e.transact((s) => ({
|
|
1653
|
-
blockInfo:
|
|
1656
|
+
blockInfo: nt(s),
|
|
1654
1657
|
selectionEmpty: s.selection.anchor === s.selection.head
|
|
1655
1658
|
}));
|
|
1656
1659
|
if (!n.isBlockContainer)
|
|
1657
1660
|
return !1;
|
|
1658
1661
|
const { bnBlock: r, blockContent: a } = n;
|
|
1659
1662
|
return a.node.type.name !== t || !o ? !1 : a.node.childCount === 0 ? (e.transact((s) => {
|
|
1660
|
-
|
|
1663
|
+
K(s, r.beforePos, {
|
|
1661
1664
|
type: "paragraph",
|
|
1662
1665
|
props: {}
|
|
1663
1666
|
});
|
|
1664
|
-
}), !0) : a.node.childCount > 0 ? e.transact((s) => (s.deleteSelection(),
|
|
1667
|
+
}), !0) : a.node.childCount > 0 ? e.transact((s) => (s.deleteSelection(), Ne(s, s.selection.from, !0))) : !1;
|
|
1665
1668
|
};
|
|
1666
|
-
function
|
|
1667
|
-
var d, p,
|
|
1668
|
-
const o =
|
|
1669
|
+
function Y(e, t, n) {
|
|
1670
|
+
var d, p, h;
|
|
1671
|
+
const o = Se.fromSchema(t), r = e, a = document.createElement("div");
|
|
1669
1672
|
a.setAttribute("data-node-type", "blockGroup");
|
|
1670
1673
|
for (const f of Array.from(r.childNodes))
|
|
1671
1674
|
a.appendChild(f.cloneNode(!0));
|
|
@@ -1677,9 +1680,9 @@ function ne(e, t, n) {
|
|
|
1677
1680
|
s.firstChild.firstChild.nodeSize + 2
|
|
1678
1681
|
)
|
|
1679
1682
|
));
|
|
1680
|
-
const i = (
|
|
1683
|
+
const i = (h = s.firstChild) == null ? void 0 : h.firstChild;
|
|
1681
1684
|
if (!(i != null && i.isTextblock))
|
|
1682
|
-
return
|
|
1685
|
+
return F.from(s);
|
|
1683
1686
|
const c = t.nodes[n].create(
|
|
1684
1687
|
{},
|
|
1685
1688
|
i.content
|
|
@@ -1693,14 +1696,14 @@ function ne(e, t, n) {
|
|
|
1693
1696
|
}
|
|
1694
1697
|
return c.content;
|
|
1695
1698
|
}
|
|
1696
|
-
const
|
|
1699
|
+
const sn = () => ({
|
|
1697
1700
|
type: "bulletListItem",
|
|
1698
1701
|
propSchema: {
|
|
1699
|
-
...
|
|
1702
|
+
...g
|
|
1700
1703
|
},
|
|
1701
1704
|
content: "inline"
|
|
1702
|
-
}),
|
|
1703
|
-
|
|
1705
|
+
}), cn = v(
|
|
1706
|
+
sn,
|
|
1704
1707
|
{
|
|
1705
1708
|
meta: {
|
|
1706
1709
|
isolating: !1
|
|
@@ -1715,7 +1718,7 @@ const en = () => ({
|
|
|
1715
1718
|
},
|
|
1716
1719
|
// As `li` elements can contain multiple paragraphs, we need to merge their contents
|
|
1717
1720
|
// into a single one so that ProseMirror can parse everything correctly.
|
|
1718
|
-
parseContent: ({ el: e, schema: t }) =>
|
|
1721
|
+
parseContent: ({ el: e, schema: t }) => Y(e, t, "bulletListItem"),
|
|
1719
1722
|
render() {
|
|
1720
1723
|
const e = document.createElement("p");
|
|
1721
1724
|
return {
|
|
@@ -1735,7 +1738,7 @@ const en = () => ({
|
|
|
1735
1738
|
k({
|
|
1736
1739
|
key: "bullet-list-item-shortcuts",
|
|
1737
1740
|
keyboardShortcuts: {
|
|
1738
|
-
Enter: ({ editor: e }) =>
|
|
1741
|
+
Enter: ({ editor: e }) => q(e, "bulletListItem"),
|
|
1739
1742
|
"Mod-Shift-8": ({ editor: e }) => {
|
|
1740
1743
|
const t = e.getTextCursorPosition();
|
|
1741
1744
|
return e.schema.blockSchema[t.block.type].content !== "inline" ? !1 : (e.updateBlock(t.block, {
|
|
@@ -1748,7 +1751,7 @@ const en = () => ({
|
|
|
1748
1751
|
{
|
|
1749
1752
|
find: new RegExp("^[-+*]\\s$"),
|
|
1750
1753
|
replace({ editor: e }) {
|
|
1751
|
-
if (
|
|
1754
|
+
if (Ee(
|
|
1752
1755
|
e.prosemirrorState
|
|
1753
1756
|
).blockNoteType !== "heading")
|
|
1754
1757
|
return {
|
|
@@ -1760,15 +1763,15 @@ const en = () => ({
|
|
|
1760
1763
|
]
|
|
1761
1764
|
})
|
|
1762
1765
|
]
|
|
1763
|
-
),
|
|
1766
|
+
), ln = () => ({
|
|
1764
1767
|
type: "checkListItem",
|
|
1765
1768
|
propSchema: {
|
|
1766
|
-
...
|
|
1769
|
+
...g,
|
|
1767
1770
|
checked: { default: !1, type: "boolean" }
|
|
1768
1771
|
},
|
|
1769
1772
|
content: "inline"
|
|
1770
|
-
}),
|
|
1771
|
-
|
|
1773
|
+
}), dn = v(
|
|
1774
|
+
ln,
|
|
1772
1775
|
{
|
|
1773
1776
|
meta: {
|
|
1774
1777
|
isolating: !1
|
|
@@ -1787,7 +1790,7 @@ const en = () => ({
|
|
|
1787
1790
|
},
|
|
1788
1791
|
// As `li` elements can contain multiple paragraphs, we need to merge their contents
|
|
1789
1792
|
// into a single one so that ProseMirror can parse everything correctly.
|
|
1790
|
-
parseContent: ({ el: e, schema: t }) =>
|
|
1793
|
+
parseContent: ({ el: e, schema: t }) => Y(e, t, "checkListItem"),
|
|
1791
1794
|
render(e, t) {
|
|
1792
1795
|
const n = document.createDocumentFragment(), o = document.createElement("input");
|
|
1793
1796
|
o.type = "checkbox", o.checked = e.props.checked, e.props.checked && o.setAttribute("checked", ""), o.addEventListener("change", () => {
|
|
@@ -1814,7 +1817,7 @@ const en = () => ({
|
|
|
1814
1817
|
k({
|
|
1815
1818
|
key: "check-list-item-shortcuts",
|
|
1816
1819
|
keyboardShortcuts: {
|
|
1817
|
-
Enter: ({ editor: e }) =>
|
|
1820
|
+
Enter: ({ editor: e }) => q(e, "checkListItem"),
|
|
1818
1821
|
"Mod-Shift-9": ({ editor: e }) => {
|
|
1819
1822
|
const t = e.getTextCursorPosition();
|
|
1820
1823
|
return e.schema.blockSchema[t.block.type].content !== "inline" ? !1 : (e.updateBlock(t.block, {
|
|
@@ -1853,14 +1856,14 @@ const en = () => ({
|
|
|
1853
1856
|
);
|
|
1854
1857
|
function He(e, t, n, o) {
|
|
1855
1858
|
let r = e.firstChild.attrs.start || 1, a = !0;
|
|
1856
|
-
const s = !!e.firstChild.attrs.start, i =
|
|
1859
|
+
const s = !!e.firstChild.attrs.start, i = G({
|
|
1857
1860
|
posBeforeNode: t,
|
|
1858
1861
|
node: e
|
|
1859
1862
|
});
|
|
1860
1863
|
if (!i.isBlockContainer)
|
|
1861
1864
|
throw new Error("impossible");
|
|
1862
1865
|
const c = n.doc.resolve(i.bnBlock.beforePos).nodeBefore, l = c ? o.get(c) : void 0;
|
|
1863
|
-
return l !== void 0 ? (r = l + 1, a = !1) : c &&
|
|
1866
|
+
return l !== void 0 ? (r = l + 1, a = !1) : c && G({
|
|
1864
1867
|
posBeforeNode: i.bnBlock.beforePos - c.nodeSize,
|
|
1865
1868
|
node: c
|
|
1866
1869
|
}).blockNoteType === "numberedListItem" && (r = He(
|
|
@@ -1870,7 +1873,7 @@ function He(e, t, n, o) {
|
|
|
1870
1873
|
o
|
|
1871
1874
|
).index + 1, a = !1), o.set(e, r), { index: r, isFirst: a, hasStart: s };
|
|
1872
1875
|
}
|
|
1873
|
-
function
|
|
1876
|
+
function he(e, t) {
|
|
1874
1877
|
const n = /* @__PURE__ */ new Map(), o = t.decorations.map(
|
|
1875
1878
|
e.mapping,
|
|
1876
1879
|
e.doc
|
|
@@ -1891,7 +1894,7 @@ function ge(e, t) {
|
|
|
1891
1894
|
const p = e.doc.nodeAt(i + 1);
|
|
1892
1895
|
r.push(
|
|
1893
1896
|
// move in by 1 to account for the block container
|
|
1894
|
-
|
|
1897
|
+
gt.node(i + 1, i + 1 + p.nodeSize, {
|
|
1895
1898
|
"data-index": c.toString()
|
|
1896
1899
|
})
|
|
1897
1900
|
);
|
|
@@ -1905,33 +1908,33 @@ function ge(e, t) {
|
|
|
1905
1908
|
decorations: o.remove(a).add(e.doc, r)
|
|
1906
1909
|
};
|
|
1907
1910
|
}
|
|
1908
|
-
const
|
|
1909
|
-
key: new
|
|
1911
|
+
const un = () => new pt({
|
|
1912
|
+
key: new ft("numbered-list-indexing-decorations"),
|
|
1910
1913
|
state: {
|
|
1911
1914
|
init(e, t) {
|
|
1912
|
-
return
|
|
1913
|
-
decorations:
|
|
1915
|
+
return he(t.tr, {
|
|
1916
|
+
decorations: ce.empty
|
|
1914
1917
|
});
|
|
1915
1918
|
},
|
|
1916
1919
|
apply(e, t) {
|
|
1917
|
-
return !e.docChanged && !e.selectionSet && t.decorations ? t :
|
|
1920
|
+
return !e.docChanged && !e.selectionSet && t.decorations ? t : he(e, t);
|
|
1918
1921
|
}
|
|
1919
1922
|
},
|
|
1920
1923
|
props: {
|
|
1921
1924
|
decorations(e) {
|
|
1922
1925
|
var t;
|
|
1923
|
-
return ((t = this.getState(e)) == null ? void 0 : t.decorations) ??
|
|
1926
|
+
return ((t = this.getState(e)) == null ? void 0 : t.decorations) ?? ce.empty;
|
|
1924
1927
|
}
|
|
1925
1928
|
}
|
|
1926
|
-
}),
|
|
1929
|
+
}), pn = () => ({
|
|
1927
1930
|
type: "numberedListItem",
|
|
1928
1931
|
propSchema: {
|
|
1929
|
-
...
|
|
1932
|
+
...g,
|
|
1930
1933
|
start: { default: void 0, type: "number" }
|
|
1931
1934
|
},
|
|
1932
1935
|
content: "inline"
|
|
1933
|
-
}),
|
|
1934
|
-
|
|
1936
|
+
}), fn = v(
|
|
1937
|
+
pn,
|
|
1935
1938
|
{
|
|
1936
1939
|
meta: {
|
|
1937
1940
|
isolating: !1
|
|
@@ -1951,7 +1954,7 @@ const rn = () => new ye({
|
|
|
1951
1954
|
},
|
|
1952
1955
|
// As `li` elements can contain multiple paragraphs, we need to merge their contents
|
|
1953
1956
|
// into a single one so that ProseMirror can parse everything correctly.
|
|
1954
|
-
parseContent: ({ el: e, schema: t }) =>
|
|
1957
|
+
parseContent: ({ el: e, schema: t }) => Y(e, t, "numberedListItem"),
|
|
1955
1958
|
render() {
|
|
1956
1959
|
const e = document.createElement("p");
|
|
1957
1960
|
return {
|
|
@@ -1974,7 +1977,7 @@ const rn = () => new ye({
|
|
|
1974
1977
|
{
|
|
1975
1978
|
find: new RegExp("^(\\d+)\\.\\s$"),
|
|
1976
1979
|
replace({ match: e, editor: t }) {
|
|
1977
|
-
if (
|
|
1980
|
+
if (Ee(
|
|
1978
1981
|
t.prosemirrorState
|
|
1979
1982
|
).blockNoteType === "heading")
|
|
1980
1983
|
return;
|
|
@@ -1989,7 +1992,7 @@ const rn = () => new ye({
|
|
|
1989
1992
|
}
|
|
1990
1993
|
],
|
|
1991
1994
|
keyboardShortcuts: {
|
|
1992
|
-
Enter: ({ editor: e }) =>
|
|
1995
|
+
Enter: ({ editor: e }) => q(e, "numberedListItem"),
|
|
1993
1996
|
"Mod-Shift-7": ({ editor: e }) => {
|
|
1994
1997
|
const t = e.getTextCursorPosition();
|
|
1995
1998
|
return e.schema.blockSchema[t.block.type].content !== "inline" ? !1 : (e.updateBlock(t.block, {
|
|
@@ -1998,17 +2001,17 @@ const rn = () => new ye({
|
|
|
1998
2001
|
}), !0);
|
|
1999
2002
|
}
|
|
2000
2003
|
},
|
|
2001
|
-
prosemirrorPlugins: [
|
|
2004
|
+
prosemirrorPlugins: [un()]
|
|
2002
2005
|
})
|
|
2003
2006
|
]
|
|
2004
|
-
),
|
|
2007
|
+
), gn = () => ({
|
|
2005
2008
|
type: "toggleListItem",
|
|
2006
2009
|
propSchema: {
|
|
2007
|
-
...
|
|
2010
|
+
...g
|
|
2008
2011
|
},
|
|
2009
2012
|
content: "inline"
|
|
2010
|
-
}),
|
|
2011
|
-
|
|
2013
|
+
}), hn = v(
|
|
2014
|
+
gn,
|
|
2012
2015
|
{
|
|
2013
2016
|
meta: {
|
|
2014
2017
|
isolating: !1
|
|
@@ -2033,7 +2036,7 @@ const rn = () => new ye({
|
|
|
2033
2036
|
k({
|
|
2034
2037
|
key: "toggle-list-item-shortcuts",
|
|
2035
2038
|
keyboardShortcuts: {
|
|
2036
|
-
Enter: ({ editor: e }) =>
|
|
2039
|
+
Enter: ({ editor: e }) => q(e, "toggleListItem"),
|
|
2037
2040
|
"Mod-Shift-6": ({ editor: e }) => {
|
|
2038
2041
|
const t = e.getTextCursorPosition();
|
|
2039
2042
|
return e.schema.blockSchema[t.block.type].content !== "inline" ? !1 : (e.updateBlock(t.block, {
|
|
@@ -2044,12 +2047,12 @@ const rn = () => new ye({
|
|
|
2044
2047
|
}
|
|
2045
2048
|
})
|
|
2046
2049
|
]
|
|
2047
|
-
),
|
|
2050
|
+
), mn = () => ({
|
|
2048
2051
|
type: "paragraph",
|
|
2049
|
-
propSchema:
|
|
2052
|
+
propSchema: g,
|
|
2050
2053
|
content: "inline"
|
|
2051
|
-
}),
|
|
2052
|
-
|
|
2054
|
+
}), bn = v(
|
|
2055
|
+
mn,
|
|
2053
2056
|
{
|
|
2054
2057
|
meta: {
|
|
2055
2058
|
isolating: !1
|
|
@@ -2089,15 +2092,15 @@ const rn = () => new ye({
|
|
|
2089
2092
|
}
|
|
2090
2093
|
})
|
|
2091
2094
|
]
|
|
2092
|
-
),
|
|
2095
|
+
), Cn = () => ({
|
|
2093
2096
|
type: "quote",
|
|
2094
2097
|
propSchema: {
|
|
2095
|
-
backgroundColor:
|
|
2096
|
-
textColor:
|
|
2098
|
+
backgroundColor: g.backgroundColor,
|
|
2099
|
+
textColor: g.textColor
|
|
2097
2100
|
},
|
|
2098
2101
|
content: "inline"
|
|
2099
|
-
}),
|
|
2100
|
-
|
|
2102
|
+
}), kn = v(
|
|
2103
|
+
Cn,
|
|
2101
2104
|
{
|
|
2102
2105
|
meta: {
|
|
2103
2106
|
isolating: !1
|
|
@@ -2148,11 +2151,11 @@ const rn = () => new ye({
|
|
|
2148
2151
|
]
|
|
2149
2152
|
})
|
|
2150
2153
|
]
|
|
2151
|
-
),
|
|
2154
|
+
), yn = 35, Ie = 120, Mo = 31, vn = $e.create({
|
|
2152
2155
|
name: "BlockNoteTableExtension",
|
|
2153
2156
|
addProseMirrorPlugins: () => [
|
|
2154
2157
|
Ve({
|
|
2155
|
-
cellMinWidth:
|
|
2158
|
+
cellMinWidth: yn,
|
|
2156
2159
|
defaultCellMinWidth: Ie,
|
|
2157
2160
|
// We set this to null as we implement our own node view in the table
|
|
2158
2161
|
// block content. This node view is the same as what's used by default,
|
|
@@ -2173,10 +2176,10 @@ const rn = () => new ye({
|
|
|
2173
2176
|
},
|
|
2174
2177
|
// Enables navigating cells using the tab key.
|
|
2175
2178
|
Tab: () => this.editor.commands.command(
|
|
2176
|
-
({ state: e, dispatch: t, view: n }) =>
|
|
2179
|
+
({ state: e, dispatch: t, view: n }) => ne(1)(e, t, n)
|
|
2177
2180
|
),
|
|
2178
2181
|
"Shift-Tab": () => this.editor.commands.command(
|
|
2179
|
-
({ state: e, dispatch: t, view: n }) =>
|
|
2182
|
+
({ state: e, dispatch: t, view: n }) => ne(-1)(e, t, n)
|
|
2180
2183
|
)
|
|
2181
2184
|
};
|
|
2182
2185
|
},
|
|
@@ -2187,14 +2190,14 @@ const rn = () => new ye({
|
|
|
2187
2190
|
storage: e.storage
|
|
2188
2191
|
};
|
|
2189
2192
|
return {
|
|
2190
|
-
tableRole:
|
|
2193
|
+
tableRole: Ue(
|
|
2191
2194
|
qe(e, "tableRole", t)
|
|
2192
2195
|
)
|
|
2193
2196
|
};
|
|
2194
2197
|
}
|
|
2195
|
-
}),
|
|
2196
|
-
textColor:
|
|
2197
|
-
},
|
|
2198
|
+
}), En = {
|
|
2199
|
+
textColor: g.textColor
|
|
2200
|
+
}, xn = N.create({
|
|
2198
2201
|
name: "tableHeader",
|
|
2199
2202
|
addOptions() {
|
|
2200
2203
|
return {
|
|
@@ -2241,11 +2244,11 @@ const rn = () => new ye({
|
|
|
2241
2244
|
renderHTML({ HTMLAttributes: e }) {
|
|
2242
2245
|
return [
|
|
2243
2246
|
"th",
|
|
2244
|
-
|
|
2247
|
+
z(this.options.HTMLAttributes, e),
|
|
2245
2248
|
0
|
|
2246
2249
|
];
|
|
2247
2250
|
}
|
|
2248
|
-
}),
|
|
2251
|
+
}), wn = N.create({
|
|
2249
2252
|
name: "tableCell",
|
|
2250
2253
|
addOptions() {
|
|
2251
2254
|
return {
|
|
@@ -2285,11 +2288,11 @@ const rn = () => new ye({
|
|
|
2285
2288
|
renderHTML({ HTMLAttributes: e }) {
|
|
2286
2289
|
return [
|
|
2287
2290
|
"td",
|
|
2288
|
-
|
|
2291
|
+
z(this.options.HTMLAttributes, e),
|
|
2289
2292
|
0
|
|
2290
2293
|
];
|
|
2291
2294
|
}
|
|
2292
|
-
}),
|
|
2295
|
+
}), Sn = N.create({
|
|
2293
2296
|
name: "table",
|
|
2294
2297
|
content: "tableRow+",
|
|
2295
2298
|
group: "blockContent",
|
|
@@ -2305,7 +2308,7 @@ const rn = () => new ye({
|
|
|
2305
2308
|
},
|
|
2306
2309
|
renderHTML({ node: e, HTMLAttributes: t }) {
|
|
2307
2310
|
var r, a, s;
|
|
2308
|
-
const n =
|
|
2311
|
+
const n = mt(
|
|
2309
2312
|
this.name,
|
|
2310
2313
|
"table",
|
|
2311
2314
|
{
|
|
@@ -2342,10 +2345,10 @@ const rn = () => new ye({
|
|
|
2342
2345
|
"bn-block-content",
|
|
2343
2346
|
i.class
|
|
2344
2347
|
), c.setAttribute("data-content-type", "table");
|
|
2345
|
-
for (const [p,
|
|
2348
|
+
for (const [p, h] of Object.entries(
|
|
2346
2349
|
i
|
|
2347
2350
|
))
|
|
2348
|
-
p !== "class" && c.setAttribute(p,
|
|
2351
|
+
p !== "class" && c.setAttribute(p, h);
|
|
2349
2352
|
const l = this.dom, u = document.createElement("div");
|
|
2350
2353
|
u.className = "tableWrapper-inner", u.appendChild(l.firstChild), l.appendChild(u), c.appendChild(l);
|
|
2351
2354
|
const d = document.createElement("div");
|
|
@@ -2361,7 +2364,7 @@ const rn = () => new ye({
|
|
|
2361
2364
|
});
|
|
2362
2365
|
};
|
|
2363
2366
|
}
|
|
2364
|
-
}),
|
|
2367
|
+
}), Mn = N.create({
|
|
2365
2368
|
name: "tableParagraph",
|
|
2366
2369
|
group: "tableContent",
|
|
2367
2370
|
content: "inline*",
|
|
@@ -2382,7 +2385,7 @@ const rn = () => new ye({
|
|
|
2382
2385
|
renderHTML({ HTMLAttributes: e }) {
|
|
2383
2386
|
return ["p", e, 0];
|
|
2384
2387
|
}
|
|
2385
|
-
}),
|
|
2388
|
+
}), Ln = N.create({
|
|
2386
2389
|
name: "tableRow",
|
|
2387
2390
|
addOptions() {
|
|
2388
2391
|
return {
|
|
@@ -2398,32 +2401,32 @@ const rn = () => new ye({
|
|
|
2398
2401
|
renderHTML({ HTMLAttributes: e }) {
|
|
2399
2402
|
return [
|
|
2400
2403
|
"tr",
|
|
2401
|
-
|
|
2404
|
+
z(this.options.HTMLAttributes, e),
|
|
2402
2405
|
0
|
|
2403
2406
|
];
|
|
2404
2407
|
}
|
|
2405
2408
|
});
|
|
2406
2409
|
function De(e, t) {
|
|
2407
|
-
const o =
|
|
2410
|
+
const o = Se.fromSchema(t).parse(e, {
|
|
2408
2411
|
topNode: t.nodes.blockGroup.create()
|
|
2409
2412
|
}), r = [];
|
|
2410
2413
|
return o.content.descendants((a) => {
|
|
2411
2414
|
if (a.isInline)
|
|
2412
2415
|
return r.push(a), !1;
|
|
2413
|
-
}),
|
|
2416
|
+
}), F.fromArray(r);
|
|
2414
2417
|
}
|
|
2415
|
-
const
|
|
2416
|
-
{ node:
|
|
2417
|
-
|
|
2418
|
+
const Tn = () => yt(
|
|
2419
|
+
{ node: Sn, type: "table", content: "table" },
|
|
2420
|
+
En,
|
|
2418
2421
|
[
|
|
2419
2422
|
k({
|
|
2420
2423
|
key: "table-extensions",
|
|
2421
2424
|
tiptapExtensions: [
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2425
|
+
vn,
|
|
2426
|
+
Mn,
|
|
2427
|
+
xn,
|
|
2428
|
+
wn,
|
|
2429
|
+
Ln
|
|
2427
2430
|
]
|
|
2428
2431
|
}),
|
|
2429
2432
|
// Extension for keyboard shortcut which deletes the table if it's empty
|
|
@@ -2457,11 +2460,11 @@ const En = () => ht(
|
|
|
2457
2460
|
), me = (e) => {
|
|
2458
2461
|
const t = e.src || void 0, n = e.width || void 0;
|
|
2459
2462
|
return { url: t, previewWidth: n };
|
|
2460
|
-
},
|
|
2463
|
+
}, Bn = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M2 3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934ZM8 5V19H16V5H8ZM4 5V7H6V5H4ZM18 5V7H20V5H18ZM4 9V11H6V9H4ZM18 9V11H20V9H18ZM4 13V15H6V13H4ZM18 13V15H20V13H18ZM4 17V19H6V17H4ZM18 17V19H20V17H18Z"></path></svg>', An = (e) => ({
|
|
2461
2464
|
type: "video",
|
|
2462
2465
|
propSchema: {
|
|
2463
|
-
textAlignment:
|
|
2464
|
-
backgroundColor:
|
|
2466
|
+
textAlignment: g.textAlignment,
|
|
2467
|
+
backgroundColor: g.backgroundColor,
|
|
2465
2468
|
name: { default: "" },
|
|
2466
2469
|
url: { default: "" },
|
|
2467
2470
|
caption: { default: "" },
|
|
@@ -2469,7 +2472,7 @@ const En = () => ht(
|
|
|
2469
2472
|
previewWidth: { default: void 0, type: "number" }
|
|
2470
2473
|
},
|
|
2471
2474
|
content: "none"
|
|
2472
|
-
}),
|
|
2475
|
+
}), Pn = (e) => (t) => {
|
|
2473
2476
|
if (t.tagName === "VIDEO") {
|
|
2474
2477
|
if (t.closest("figure"))
|
|
2475
2478
|
return;
|
|
@@ -2480,7 +2483,7 @@ const En = () => ht(
|
|
|
2480
2483
|
};
|
|
2481
2484
|
}
|
|
2482
2485
|
if (t.tagName === "FIGURE") {
|
|
2483
|
-
const n =
|
|
2486
|
+
const n = $(t, "video");
|
|
2484
2487
|
if (!n)
|
|
2485
2488
|
return;
|
|
2486
2489
|
const { targetElement: o, caption: r } = n, { backgroundColor: a } = y(t);
|
|
@@ -2490,22 +2493,22 @@ const En = () => ht(
|
|
|
2490
2493
|
caption: r
|
|
2491
2494
|
};
|
|
2492
2495
|
}
|
|
2493
|
-
},
|
|
2494
|
-
|
|
2496
|
+
}, Nn = v(
|
|
2497
|
+
An,
|
|
2495
2498
|
(e) => ({
|
|
2496
2499
|
meta: {
|
|
2497
2500
|
fileBlockAccept: ["video/*"]
|
|
2498
2501
|
},
|
|
2499
|
-
parse:
|
|
2502
|
+
parse: Pn(),
|
|
2500
2503
|
render(t, n) {
|
|
2501
2504
|
const o = document.createElement("div");
|
|
2502
|
-
o.innerHTML = e.icon ??
|
|
2505
|
+
o.innerHTML = e.icon ?? Bn;
|
|
2503
2506
|
const r = document.createElement("div");
|
|
2504
2507
|
r.className = "bn-visual-media-wrapper";
|
|
2505
2508
|
const a = document.createElement("video");
|
|
2506
2509
|
return a.className = "bn-visual-media", n.resolveFileUrl ? n.resolveFileUrl(t.props.url).then((s) => {
|
|
2507
2510
|
a.src = s;
|
|
2508
|
-
}) : a.src = t.props.url, a.controls = !0, a.contentEditable = "false", a.draggable = !1, a.width = t.props.previewWidth, r.appendChild(a),
|
|
2511
|
+
}) : a.src = t.props.url, a.controls = !0, a.contentEditable = "false", a.draggable = !1, a.width = t.props.previewWidth, r.appendChild(a), Pe(
|
|
2509
2512
|
t,
|
|
2510
2513
|
n,
|
|
2511
2514
|
{ dom: r },
|
|
@@ -2521,7 +2524,7 @@ const En = () => ht(
|
|
|
2521
2524
|
};
|
|
2522
2525
|
}
|
|
2523
2526
|
let n;
|
|
2524
|
-
return t.props.showPreview ? (n = document.createElement("video"), n.src = t.props.url, t.props.previewWidth && (n.width = t.props.previewWidth)) : (n = document.createElement("a"), n.href = t.props.url, n.textContent = t.props.name || t.props.url), t.props.caption ? t.props.showPreview ?
|
|
2527
|
+
return t.props.showPreview ? (n = document.createElement("video"), n.src = t.props.url, t.props.previewWidth && (n.width = t.props.previewWidth)) : (n = document.createElement("a"), n.href = t.props.url, n.textContent = t.props.name || t.props.url), t.props.caption ? t.props.showPreview ? J(n, t.props.caption) : U(n, t.props.caption) : {
|
|
2525
2528
|
dom: n
|
|
2526
2529
|
};
|
|
2527
2530
|
},
|
|
@@ -2551,39 +2554,39 @@ function C(e, t, n) {
|
|
|
2551
2554
|
}
|
|
2552
2555
|
return !0;
|
|
2553
2556
|
}
|
|
2554
|
-
function
|
|
2557
|
+
function Lo(e, t, n, o) {
|
|
2555
2558
|
return C(t, n, o) && e.type === n;
|
|
2556
2559
|
}
|
|
2557
|
-
function
|
|
2560
|
+
function To(e) {
|
|
2558
2561
|
return e instanceof Ce;
|
|
2559
2562
|
}
|
|
2560
|
-
const
|
|
2561
|
-
function
|
|
2562
|
-
if (
|
|
2563
|
-
return
|
|
2564
|
-
const t = new
|
|
2563
|
+
const R = /* @__PURE__ */ new Map();
|
|
2564
|
+
function Hn(e) {
|
|
2565
|
+
if (R.has(e))
|
|
2566
|
+
return R.get(e);
|
|
2567
|
+
const t = new Xe();
|
|
2565
2568
|
return e._tiptapEditor.on("transaction", ({ transaction: n }) => {
|
|
2566
2569
|
t.appendMapping(n.mapping);
|
|
2567
2570
|
}), e._tiptapEditor.on("destroy", () => {
|
|
2568
|
-
|
|
2569
|
-
}),
|
|
2571
|
+
R.delete(e);
|
|
2572
|
+
}), R.set(e, t), t;
|
|
2570
2573
|
}
|
|
2571
|
-
function
|
|
2572
|
-
const o =
|
|
2574
|
+
function In(e, t, n = "left") {
|
|
2575
|
+
const o = ae.getState(e.prosemirrorState);
|
|
2573
2576
|
if (!o) {
|
|
2574
|
-
const a =
|
|
2577
|
+
const a = Hn(e), s = a.maps.length;
|
|
2575
2578
|
return () => a.slice(s).map(t, n === "left" ? -1 : 1);
|
|
2576
2579
|
}
|
|
2577
|
-
const r =
|
|
2580
|
+
const r = Ke(
|
|
2578
2581
|
// Track the position after the position if we are on the right side
|
|
2579
2582
|
t + (n === "right" ? 1 : -1),
|
|
2580
2583
|
o.binding.type,
|
|
2581
2584
|
o.binding.mapping
|
|
2582
2585
|
);
|
|
2583
2586
|
return () => {
|
|
2584
|
-
const a =
|
|
2587
|
+
const a = ae.getState(
|
|
2585
2588
|
e.prosemirrorState
|
|
2586
|
-
), s =
|
|
2589
|
+
), s = Qe(
|
|
2587
2590
|
a.doc,
|
|
2588
2591
|
a.binding.type,
|
|
2589
2592
|
r,
|
|
@@ -2594,8 +2597,8 @@ function Tn(e, t, n = "left") {
|
|
|
2594
2597
|
return s + (n === "right" ? -1 : 1);
|
|
2595
2598
|
};
|
|
2596
2599
|
}
|
|
2597
|
-
const
|
|
2598
|
-
class
|
|
2600
|
+
const Dn = je((e) => e.type.name === "blockContainer");
|
|
2601
|
+
class On {
|
|
2599
2602
|
constructor(t, n, o) {
|
|
2600
2603
|
L(this, "state");
|
|
2601
2604
|
L(this, "emitUpdate");
|
|
@@ -2657,10 +2660,10 @@ class An {
|
|
|
2657
2660
|
(t = this.rootEl) == null || t.removeEventListener("scroll", this.handleScroll, !0);
|
|
2658
2661
|
}
|
|
2659
2662
|
}
|
|
2660
|
-
const B = new
|
|
2663
|
+
const B = new Ze("SuggestionMenuPlugin"), _n = k(({ editor: e }) => {
|
|
2661
2664
|
const t = [];
|
|
2662
2665
|
let n;
|
|
2663
|
-
const o =
|
|
2666
|
+
const o = ye(void 0);
|
|
2664
2667
|
return {
|
|
2665
2668
|
key: "suggestionMenu",
|
|
2666
2669
|
store: o,
|
|
@@ -2691,9 +2694,9 @@ const B = new ve("SuggestionMenuPlugin"), Nn = k(({ editor: e }) => {
|
|
|
2691
2694
|
},
|
|
2692
2695
|
// TODO this whole plugin needs to be refactored (but I've done the minimal)
|
|
2693
2696
|
prosemirrorPlugins: [
|
|
2694
|
-
new
|
|
2697
|
+
new Ge({
|
|
2695
2698
|
key: B,
|
|
2696
|
-
view: (r) => (n = new
|
|
2699
|
+
view: (r) => (n = new On(
|
|
2697
2700
|
e,
|
|
2698
2701
|
(a, s) => {
|
|
2699
2702
|
o.setState({ ...s, triggerCharacter: a });
|
|
@@ -2711,7 +2714,7 @@ const B = new ve("SuggestionMenuPlugin"), Nn = k(({ editor: e }) => {
|
|
|
2711
2714
|
const c = r.getMeta(B);
|
|
2712
2715
|
if (typeof c == "object" && c !== null) {
|
|
2713
2716
|
a && (n == null || n.closeMenu());
|
|
2714
|
-
const u =
|
|
2717
|
+
const u = In(
|
|
2715
2718
|
e,
|
|
2716
2719
|
i.selection.from - // Need to account for the trigger char that was inserted, so we offset the position by the length of the trigger character.
|
|
2717
2720
|
c.triggerCharacter.length
|
|
@@ -2769,10 +2772,10 @@ const B = new ve("SuggestionMenuPlugin"), Nn = k(({ editor: e }) => {
|
|
|
2769
2772
|
if (a === void 0)
|
|
2770
2773
|
return null;
|
|
2771
2774
|
if (!a.deleteTriggerCharacter) {
|
|
2772
|
-
const s =
|
|
2775
|
+
const s = Dn(r.selection);
|
|
2773
2776
|
if (s)
|
|
2774
|
-
return
|
|
2775
|
-
|
|
2777
|
+
return oe.create(r.doc, [
|
|
2778
|
+
re.node(
|
|
2776
2779
|
s.pos,
|
|
2777
2780
|
s.pos + s.node.nodeSize,
|
|
2778
2781
|
{
|
|
@@ -2783,8 +2786,8 @@ const B = new ve("SuggestionMenuPlugin"), Nn = k(({ editor: e }) => {
|
|
|
2783
2786
|
)
|
|
2784
2787
|
]);
|
|
2785
2788
|
}
|
|
2786
|
-
return
|
|
2787
|
-
|
|
2789
|
+
return oe.create(r.doc, [
|
|
2790
|
+
re.inline(
|
|
2788
2791
|
a.queryStartPos() - a.triggerCharacter.length,
|
|
2789
2792
|
a.queryStartPos(),
|
|
2790
2793
|
{
|
|
@@ -2800,7 +2803,7 @@ const B = new ve("SuggestionMenuPlugin"), Nn = k(({ editor: e }) => {
|
|
|
2800
2803
|
]
|
|
2801
2804
|
};
|
|
2802
2805
|
});
|
|
2803
|
-
function
|
|
2806
|
+
function Vn(e) {
|
|
2804
2807
|
let t = e.getTextCursorPosition().block, n = e.schema.blockSchema[t.type].content;
|
|
2805
2808
|
for (; n === "none"; ) {
|
|
2806
2809
|
if (t = e.getTextCursorPosition().nextBlock, t === void 0)
|
|
@@ -2813,9 +2816,9 @@ function b(e, t) {
|
|
|
2813
2816
|
if (n.content === void 0)
|
|
2814
2817
|
throw new Error("Slash Menu open in a block that doesn't contain content.");
|
|
2815
2818
|
let o;
|
|
2816
|
-
return Array.isArray(n.content) && (n.content.length === 1 &&
|
|
2819
|
+
return Array.isArray(n.content) && (n.content.length === 1 && ot(n.content[0]) && n.content[0].type === "text" && n.content[0].text === "/" || n.content.length === 0) ? (o = e.updateBlock(n, t), e.setTextCursorPosition(o)) : (o = e.insertBlocks([t], n, "after")[0], e.setTextCursorPosition(e.getTextCursorPosition().nextBlock)), Vn(e), o;
|
|
2817
2820
|
}
|
|
2818
|
-
function
|
|
2821
|
+
function Bo(e) {
|
|
2819
2822
|
const t = [];
|
|
2820
2823
|
return C(e, "heading", { level: "number" }) && t.push(
|
|
2821
2824
|
{
|
|
@@ -3027,7 +3030,7 @@ function yo(e) {
|
|
|
3027
3030
|
}), t.push({
|
|
3028
3031
|
onItemClick: () => {
|
|
3029
3032
|
var n;
|
|
3030
|
-
(n = e.getExtension(
|
|
3033
|
+
(n = e.getExtension(_n)) == null || n.openSuggestionMenu(":", {
|
|
3031
3034
|
deleteTriggerCharacter: !0,
|
|
3032
3035
|
ignoreQueryLength: !0
|
|
3033
3036
|
});
|
|
@@ -3036,29 +3039,29 @@ function yo(e) {
|
|
|
3036
3039
|
...e.dictionary.slash_menu.emoji
|
|
3037
3040
|
}), t;
|
|
3038
3041
|
}
|
|
3039
|
-
function
|
|
3042
|
+
function Ao(e, t) {
|
|
3040
3043
|
return e.filter(
|
|
3041
3044
|
({ title: n, aliases: o }) => n.toLowerCase().includes(t.toLowerCase()) || o && o.filter(
|
|
3042
3045
|
(r) => r.toLowerCase().includes(t.toLowerCase())
|
|
3043
3046
|
).length !== 0
|
|
3044
3047
|
);
|
|
3045
3048
|
}
|
|
3046
|
-
const
|
|
3047
|
-
audio:
|
|
3048
|
-
bulletListItem:
|
|
3049
|
-
checkListItem:
|
|
3050
|
-
codeBlock:
|
|
3051
|
-
divider:
|
|
3052
|
-
file:
|
|
3053
|
-
heading:
|
|
3054
|
-
image:
|
|
3055
|
-
numberedListItem:
|
|
3056
|
-
paragraph:
|
|
3057
|
-
quote:
|
|
3058
|
-
table:
|
|
3059
|
-
toggleListItem:
|
|
3060
|
-
video:
|
|
3061
|
-
},
|
|
3049
|
+
const Po = {
|
|
3050
|
+
audio: Ft(),
|
|
3051
|
+
bulletListItem: cn(),
|
|
3052
|
+
checkListItem: dn(),
|
|
3053
|
+
codeBlock: qt(),
|
|
3054
|
+
divider: Gt(),
|
|
3055
|
+
file: Xt(),
|
|
3056
|
+
heading: Yt(),
|
|
3057
|
+
image: an(),
|
|
3058
|
+
numberedListItem: fn(),
|
|
3059
|
+
paragraph: bn(),
|
|
3060
|
+
quote: kn(),
|
|
3061
|
+
table: Tn(),
|
|
3062
|
+
toggleListItem: hn(),
|
|
3063
|
+
video: Nn()
|
|
3064
|
+
}, Rn = Le(
|
|
3062
3065
|
{
|
|
3063
3066
|
type: "textColor",
|
|
3064
3067
|
propSchema: "string"
|
|
@@ -3073,7 +3076,7 @@ const Eo = {
|
|
|
3073
3076
|
},
|
|
3074
3077
|
toExternalHTML: (e) => {
|
|
3075
3078
|
const t = document.createElement("span");
|
|
3076
|
-
return e !==
|
|
3079
|
+
return e !== g.textColor.default && (t.style.color = e in T ? T[e].text : e), {
|
|
3077
3080
|
dom: t,
|
|
3078
3081
|
contentDOM: t
|
|
3079
3082
|
};
|
|
@@ -3083,7 +3086,7 @@ const Eo = {
|
|
|
3083
3086
|
return e.style.color;
|
|
3084
3087
|
}
|
|
3085
3088
|
}
|
|
3086
|
-
),
|
|
3089
|
+
), Wn = Le(
|
|
3087
3090
|
{
|
|
3088
3091
|
type: "backgroundColor",
|
|
3089
3092
|
propSchema: "string"
|
|
@@ -3098,7 +3101,7 @@ const Eo = {
|
|
|
3098
3101
|
},
|
|
3099
3102
|
toExternalHTML: (e) => {
|
|
3100
3103
|
const t = document.createElement("span");
|
|
3101
|
-
return e !==
|
|
3104
|
+
return e !== g.backgroundColor.default && (t.style.backgroundColor = e in T ? T[e].background : e), {
|
|
3102
3105
|
dom: t,
|
|
3103
3106
|
contentDOM: t
|
|
3104
3107
|
};
|
|
@@ -3108,125 +3111,125 @@ const Eo = {
|
|
|
3108
3111
|
return e.style.backgroundColor;
|
|
3109
3112
|
}
|
|
3110
3113
|
}
|
|
3111
|
-
),
|
|
3112
|
-
bold: H(
|
|
3113
|
-
italic: H(
|
|
3114
|
-
underline: H(
|
|
3115
|
-
strike: H(
|
|
3116
|
-
code: H(
|
|
3117
|
-
textColor:
|
|
3118
|
-
backgroundColor:
|
|
3119
|
-
},
|
|
3114
|
+
), Fn = {
|
|
3115
|
+
bold: H(rt, "boolean"),
|
|
3116
|
+
italic: H(st, "boolean"),
|
|
3117
|
+
underline: H(ct, "boolean"),
|
|
3118
|
+
strike: H(it, "boolean"),
|
|
3119
|
+
code: H(at, "boolean"),
|
|
3120
|
+
textColor: Rn,
|
|
3121
|
+
backgroundColor: Wn
|
|
3122
|
+
}, No = Mt(Fn), $n = {
|
|
3120
3123
|
text: { config: "text", implementation: {} },
|
|
3121
3124
|
link: { config: "link", implementation: {} }
|
|
3122
|
-
},
|
|
3123
|
-
|
|
3125
|
+
}, Ho = wt(
|
|
3126
|
+
$n
|
|
3124
3127
|
);
|
|
3125
3128
|
export {
|
|
3126
3129
|
C as $,
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3130
|
+
dn as A,
|
|
3131
|
+
pn as B,
|
|
3132
|
+
fn as C,
|
|
3133
|
+
gn as D,
|
|
3134
|
+
Mo as E,
|
|
3135
|
+
Ot as F,
|
|
3136
|
+
hn as G,
|
|
3137
|
+
mn as H,
|
|
3138
|
+
bn as I,
|
|
3139
|
+
Cn as J,
|
|
3140
|
+
kn as K,
|
|
3141
|
+
En as L,
|
|
3142
|
+
Tn as M,
|
|
3143
|
+
Bn as N,
|
|
3144
|
+
An as O,
|
|
3145
|
+
Pn as P,
|
|
3146
|
+
Nn as Q,
|
|
3147
|
+
Kt as R,
|
|
3145
3148
|
Be as S,
|
|
3146
|
-
|
|
3149
|
+
mt as T,
|
|
3147
3150
|
le as U,
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3151
|
+
bt as V,
|
|
3152
|
+
Po as W,
|
|
3153
|
+
Fn as X,
|
|
3154
|
+
No as Y,
|
|
3155
|
+
$n as Z,
|
|
3156
|
+
Ho as _,
|
|
3154
3157
|
Ie as a,
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
+
Lo as a0,
|
|
3159
|
+
To as a1,
|
|
3160
|
+
g as a2,
|
|
3158
3161
|
y as a3,
|
|
3159
3162
|
A as a4,
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
+
Eo as a5,
|
|
3164
|
+
xo as a6,
|
|
3165
|
+
wo as a7,
|
|
3163
3166
|
I as a8,
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3167
|
+
_n as a9,
|
|
3168
|
+
Z as aA,
|
|
3169
|
+
yt as aB,
|
|
3170
|
+
xt as aC,
|
|
3171
|
+
Lt as aD,
|
|
3169
3172
|
Le as aE,
|
|
3170
|
-
|
|
3171
|
-
|
|
3173
|
+
St as aF,
|
|
3174
|
+
V as aG,
|
|
3172
3175
|
Me as aH,
|
|
3173
3176
|
H as aI,
|
|
3174
|
-
|
|
3177
|
+
ht as aJ,
|
|
3175
3178
|
M as aK,
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3179
|
+
uo as aL,
|
|
3180
|
+
W as aM,
|
|
3181
|
+
po as aN,
|
|
3182
|
+
In as aO,
|
|
3180
3183
|
b as aa,
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3184
|
+
Bo as ab,
|
|
3185
|
+
Ao as ac,
|
|
3186
|
+
go as ad,
|
|
3187
|
+
Mt as ae,
|
|
3188
|
+
wt as af,
|
|
3189
|
+
ho as ag,
|
|
3187
3190
|
v as ah,
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3191
|
+
Bt as ai,
|
|
3192
|
+
Tt as aj,
|
|
3193
|
+
mo as ak,
|
|
3194
|
+
bo as al,
|
|
3195
|
+
Ct as am,
|
|
3196
|
+
Co as an,
|
|
3197
|
+
yo as ao,
|
|
3198
|
+
fo as ap,
|
|
3199
|
+
So as aq,
|
|
3200
|
+
ko as ar,
|
|
3198
3201
|
D as as,
|
|
3199
|
-
|
|
3200
|
-
|
|
3202
|
+
K as at,
|
|
3203
|
+
Pt as au,
|
|
3201
3204
|
T as av,
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3205
|
+
vo as aw,
|
|
3206
|
+
vt as ax,
|
|
3207
|
+
Et as ay,
|
|
3208
|
+
kt as az,
|
|
3209
|
+
Vt as b,
|
|
3210
|
+
_t as c,
|
|
3211
|
+
Rt as d,
|
|
3212
|
+
Wt as e,
|
|
3213
|
+
Ft as f,
|
|
3214
|
+
Ut as g,
|
|
3215
|
+
qt as h,
|
|
3213
3216
|
Te as i,
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3217
|
+
jt as j,
|
|
3218
|
+
Gt as k,
|
|
3219
|
+
Zt as l,
|
|
3220
|
+
zt as m,
|
|
3221
|
+
Xt as n,
|
|
3222
|
+
Jt as o,
|
|
3220
3223
|
ue as p,
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3224
|
+
Yt as q,
|
|
3225
|
+
en as r,
|
|
3226
|
+
tn as s,
|
|
3227
|
+
nn as t,
|
|
3228
|
+
on as u,
|
|
3229
|
+
rn as v,
|
|
3230
|
+
an as w,
|
|
3231
|
+
sn as x,
|
|
3232
|
+
cn as y,
|
|
3233
|
+
ln as z
|
|
3231
3234
|
};
|
|
3232
|
-
//# sourceMappingURL=defaultBlocks-
|
|
3235
|
+
//# sourceMappingURL=defaultBlocks-DgA_mtQV.js.map
|