@blocknote/core 0.47.1 → 0.47.2
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/BlockNoteExtension-BWw0r8Gy.cjs.map +1 -1
- package/dist/BlockNoteExtension-C2X7LW-V.js.map +1 -1
- package/dist/{BlockNoteSchema-CwhtPpVC.cjs → BlockNoteSchema-CCs_V3lo.cjs} +2 -2
- package/dist/{BlockNoteSchema-CwhtPpVC.cjs.map → BlockNoteSchema-CCs_V3lo.cjs.map} +1 -1
- package/dist/{BlockNoteSchema-dmbNkHA-.js → BlockNoteSchema-ooiKsd5B.js} +2 -2
- package/dist/{BlockNoteSchema-dmbNkHA-.js.map → BlockNoteSchema-ooiKsd5B.js.map} +1 -1
- package/dist/{TrailingNode-F9hX_UlQ.js → TrailingNode-GzE59m_7.js} +585 -415
- package/dist/TrailingNode-GzE59m_7.js.map +1 -0
- package/dist/TrailingNode-n0WdMPUl.cjs +2 -0
- package/dist/TrailingNode-n0WdMPUl.cjs.map +1 -0
- package/dist/blocknote.cjs +4 -4
- package/dist/blocknote.cjs.map +1 -1
- package/dist/blocknote.js +76 -40
- package/dist/blocknote.js.map +1 -1
- package/dist/blocks.cjs +1 -1
- package/dist/blocks.js +2 -2
- package/dist/comments.cjs.map +1 -1
- package/dist/comments.js.map +1 -1
- package/dist/defaultBlocks-Dg9kQWXm.cjs +6 -0
- package/dist/defaultBlocks-Dg9kQWXm.cjs.map +1 -0
- package/dist/{defaultBlocks-Caw1U1oV.js → defaultBlocks-ZzGbYgQn.js} +611 -530
- package/dist/defaultBlocks-ZzGbYgQn.js.map +1 -0
- package/dist/extensions.cjs +1 -1
- package/dist/extensions.cjs.map +1 -1
- package/dist/extensions.js +33 -54
- package/dist/extensions.js.map +1 -1
- package/dist/locales.cjs +1 -1
- package/dist/locales.cjs.map +1 -1
- package/dist/locales.js +25 -24
- package/dist/locales.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +1 -10
- package/src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.ts +4 -1
- package/src/api/exporters/html/util/serializeBlocksExternalHTML.ts +7 -1
- package/src/blocks/Heading/block.ts +48 -1
- package/src/blocks/ListItem/ToggleListItem/block.ts +51 -1
- package/src/blocks/Paragraph/block.ts +1 -1
- package/src/blocks/getDetailsContent.ts +77 -0
- package/src/comments/threadstore/TipTapThreadStore.ts +5 -5
- package/src/comments/threadstore/tiptap/types.ts +131 -0
- package/src/editor/Block.css +6 -0
- package/src/editor/BlockNoteEditor.ts +9 -14
- package/src/editor/managers/ExtensionManager/symbol.ts +0 -1
- package/src/editor/managers/SelectionManager.ts +3 -1
- package/src/extensions/DropCursor/DropCursor.ts +262 -25
- package/src/extensions/DropCursor/utils.ts +195 -0
- package/src/extensions/tiptap-extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts +15 -10
- package/src/i18n/locales/fa.ts +4 -21
- package/src/i18n/locales/index.ts +1 -1
- package/src/i18n/locales/ru.ts +1 -1
- package/src/i18n/locales/uz.ts +22 -4
- package/src/index.ts +1 -0
- package/src/schema/blocks/createSpec.ts +33 -45
- package/src/schema/blocks/types.ts +101 -1
- package/types/src/blocks/getDetailsContent.d.ts +19 -0
- package/types/src/comments/threadstore/TipTapThreadStore.d.ts +1 -1
- package/types/src/comments/threadstore/tiptap/types.d.ts +73 -0
- package/types/src/editor/BlockNoteEditor.d.ts +6 -9
- package/types/src/extensions/DropCursor/DropCursor.d.ts +42 -5
- package/types/src/extensions/DropCursor/utils.d.ts +48 -0
- package/types/src/index.d.ts +1 -0
- package/types/src/schema/blocks/createSpec.d.ts +3 -3
- package/types/src/schema/blocks/types.d.ts +31 -1
- package/dist/TrailingNode-DHOdUVUO.cjs +0 -2
- package/dist/TrailingNode-DHOdUVUO.cjs.map +0 -1
- package/dist/TrailingNode-F9hX_UlQ.js.map +0 -1
- package/dist/defaultBlocks-CSB5GiAu.cjs +0 -6
- package/dist/defaultBlocks-CSB5GiAu.cjs.map +0 -1
- package/dist/defaultBlocks-Caw1U1oV.js.map +0 -1
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { TableMap as
|
|
5
|
-
import { Node as
|
|
6
|
-
import { TextSelection as
|
|
7
|
-
import { DecorationSet as
|
|
8
|
-
import { ReplaceStep as
|
|
9
|
-
import { ySyncPluginKey as
|
|
10
|
-
import { c as
|
|
11
|
-
import { b as X, v as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import { DOMParser as
|
|
18
|
-
import { createHighlightPlugin as
|
|
19
|
-
import { createParser as
|
|
20
|
-
import { Slice as
|
|
21
|
-
import { Plugin as
|
|
22
|
-
import { DecorationSet as
|
|
23
|
-
const
|
|
1
|
+
var Ve = Object.defineProperty;
|
|
2
|
+
var We = (e, t, n) => t in e ? Ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var w = (e, t, n) => We(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { TableMap as Ce, goToNextCell as oe, columnResizing as Re, tableEditing as Fe, CellSelection as ke, TableView as $e } from "prosemirror-tables";
|
|
5
|
+
import { Node as P, Mark as Ue, Extension as qe, callOrReturn as je, getExtensionField as Ge, mergeAttributes as Z, findParentNode as ze } from "@tiptap/core";
|
|
6
|
+
import { TextSelection as ye, Plugin as Ze, PluginKey as Xe } from "prosemirror-state";
|
|
7
|
+
import { DecorationSet as re, Decoration as ae } from "prosemirror-view";
|
|
8
|
+
import { ReplaceStep as Ke, Mapping as Qe } from "prosemirror-transform";
|
|
9
|
+
import { ySyncPluginKey as se, absolutePositionToRelativePosition as Je, relativePositionToAbsolutePosition as Ye } from "y-prosemirror";
|
|
10
|
+
import { c as y, a as ve } from "./BlockNoteExtension-C2X7LW-V.js";
|
|
11
|
+
import { b as X, v as et, g as O, a as Ee, i as ie, t as tt, U as nt, q as ot, A as G, r as rt, w as Se, J as at } from "./blockToNode-BNoNIXU7.js";
|
|
12
|
+
import st from "@tiptap/extension-bold";
|
|
13
|
+
import it from "@tiptap/extension-code";
|
|
14
|
+
import ct from "@tiptap/extension-italic";
|
|
15
|
+
import lt from "@tiptap/extension-strike";
|
|
16
|
+
import dt from "@tiptap/extension-underline";
|
|
17
|
+
import { DOMParser as xe, Fragment as ut, DOMSerializer as ce } from "@tiptap/pm/model";
|
|
18
|
+
import { createHighlightPlugin as pt } from "prosemirror-highlight";
|
|
19
|
+
import { createParser as ft } from "prosemirror-highlight/shiki";
|
|
20
|
+
import { Slice as Me, Fragment as _, DOMParser as K } from "prosemirror-model";
|
|
21
|
+
import { Plugin as mt, PluginKey as ht } from "@tiptap/pm/state";
|
|
22
|
+
import { DecorationSet as le, Decoration as gt } from "@tiptap/pm/view";
|
|
23
|
+
const bt = () => typeof navigator < "u" && (/Mac/.test(navigator.platform) || /AppleWebKit/.test(navigator.userAgent) && /Mobile\/\w+/.test(navigator.userAgent));
|
|
24
24
|
function L(e, t = "Ctrl") {
|
|
25
|
-
return
|
|
25
|
+
return bt() ? e.replace("Mod", "⌘") : e.replace("Mod", t);
|
|
26
26
|
}
|
|
27
27
|
function D(...e) {
|
|
28
28
|
return [
|
|
@@ -32,8 +32,8 @@ function D(...e) {
|
|
|
32
32
|
)
|
|
33
33
|
].join(" ");
|
|
34
34
|
}
|
|
35
|
-
const
|
|
36
|
-
function
|
|
35
|
+
const po = () => /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
|
36
|
+
function Ct(e, t, n, o) {
|
|
37
37
|
const r = document.createElement("div");
|
|
38
38
|
r.className = D(
|
|
39
39
|
"bn-block-content",
|
|
@@ -55,7 +55,7 @@ function gt(e, t, n, o) {
|
|
|
55
55
|
contentDOM: a
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
|
-
const
|
|
58
|
+
const de = (e, t) => {
|
|
59
59
|
let n = X(e, t.pmSchema);
|
|
60
60
|
n.type.name === "blockContainer" && (n = n.firstChild);
|
|
61
61
|
const o = t.pmSchema.nodes[n.type.name].spec.toDOM;
|
|
@@ -70,7 +70,7 @@ const le = (e, t) => {
|
|
|
70
70
|
);
|
|
71
71
|
return r;
|
|
72
72
|
};
|
|
73
|
-
function
|
|
73
|
+
function we(e, t = "<br>") {
|
|
74
74
|
const n = e.querySelectorAll("p");
|
|
75
75
|
if (n.length > 1) {
|
|
76
76
|
const o = n[0];
|
|
@@ -80,15 +80,15 @@ function bt(e, t = "<br>") {
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function F(e) {
|
|
84
84
|
return "data-" + e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function fo(e) {
|
|
87
87
|
const t = e.split("/");
|
|
88
88
|
return !t.length || // invalid?
|
|
89
89
|
t[t.length - 1] === "" ? e : t[t.length - 1];
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function mo(e) {
|
|
92
92
|
var n;
|
|
93
93
|
const t = [
|
|
94
94
|
"mp4",
|
|
@@ -108,7 +108,7 @@ function fo(e) {
|
|
|
108
108
|
return !1;
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function kt(e) {
|
|
112
112
|
const t = {};
|
|
113
113
|
return Object.entries(e).forEach(([n, o]) => {
|
|
114
114
|
t[n] = {
|
|
@@ -118,7 +118,7 @@ function Ct(e) {
|
|
|
118
118
|
// value is the same as its default, we don't display an HTML
|
|
119
119
|
// attribute for it.
|
|
120
120
|
parseHTML: (r) => {
|
|
121
|
-
const a = r.getAttribute(
|
|
121
|
+
const a = r.getAttribute(F(n));
|
|
122
122
|
if (a === null)
|
|
123
123
|
return null;
|
|
124
124
|
if (o.default === void 0 && o.type === "boolean" || o.default !== void 0 && typeof o.default == "boolean")
|
|
@@ -130,12 +130,12 @@ function Ct(e) {
|
|
|
130
130
|
return a;
|
|
131
131
|
},
|
|
132
132
|
renderHTML: (r) => r[n] !== o.default ? {
|
|
133
|
-
[
|
|
133
|
+
[F(n)]: r[n]
|
|
134
134
|
} : {}
|
|
135
135
|
};
|
|
136
136
|
}), t;
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function yt(e, t, n, o) {
|
|
139
139
|
const r = e();
|
|
140
140
|
if (r === void 0)
|
|
141
141
|
throw new Error("Cannot find node position");
|
|
@@ -147,7 +147,7 @@ function kt(e, t, n, o) {
|
|
|
147
147
|
throw new Error("Block type does not match");
|
|
148
148
|
return i;
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function z(e, t, n, o, r = !1, a) {
|
|
151
151
|
const s = document.createElement("div");
|
|
152
152
|
if (a !== void 0)
|
|
153
153
|
for (const [i, c] of Object.entries(a))
|
|
@@ -158,7 +158,7 @@ function Z(e, t, n, o, r = !1, a) {
|
|
|
158
158
|
), s.setAttribute("data-content-type", t);
|
|
159
159
|
for (const [i, c] of Object.entries(n)) {
|
|
160
160
|
const u = o[i].default;
|
|
161
|
-
c !== u && s.setAttribute(
|
|
161
|
+
c !== u && s.setAttribute(F(i), c);
|
|
162
162
|
}
|
|
163
163
|
return r && s.setAttribute("data-file-block", ""), s.appendChild(e.dom), e.contentDOM && (e.contentDOM.className = D(
|
|
164
164
|
"bn-inline-content",
|
|
@@ -177,18 +177,18 @@ function vt(e, t, n) {
|
|
|
177
177
|
},
|
|
178
178
|
implementation: {
|
|
179
179
|
node: e.node,
|
|
180
|
-
render:
|
|
181
|
-
toExternalHTML:
|
|
180
|
+
render: de,
|
|
181
|
+
toExternalHTML: de
|
|
182
182
|
},
|
|
183
183
|
extensions: n
|
|
184
184
|
};
|
|
185
185
|
}
|
|
186
|
-
function
|
|
186
|
+
function Et(e, t) {
|
|
187
187
|
e.stopEvent = (n) => (n.type === "mousedown" && setTimeout(() => {
|
|
188
188
|
t.view.dom.blur();
|
|
189
189
|
}, 10), !0);
|
|
190
190
|
}
|
|
191
|
-
function
|
|
191
|
+
function St(e, t) {
|
|
192
192
|
const n = [
|
|
193
193
|
{
|
|
194
194
|
tag: "[data-content-type=" + e.type + "]",
|
|
@@ -208,29 +208,32 @@ function Et(e, t) {
|
|
|
208
208
|
preserveWhitespace: !0,
|
|
209
209
|
getContent: e.content === "inline" || e.content === "none" ? (o, r) => {
|
|
210
210
|
var a;
|
|
211
|
-
if (t.parseContent)
|
|
212
|
-
|
|
211
|
+
if (t.parseContent) {
|
|
212
|
+
const s = t.parseContent({
|
|
213
213
|
el: o,
|
|
214
214
|
schema: r
|
|
215
215
|
});
|
|
216
|
+
if (s !== void 0)
|
|
217
|
+
return s;
|
|
218
|
+
}
|
|
216
219
|
if (e.content === "inline") {
|
|
217
220
|
const i = o.cloneNode(!0);
|
|
218
|
-
return
|
|
221
|
+
return we(
|
|
219
222
|
i,
|
|
220
223
|
(a = t.meta) != null && a.code ? `
|
|
221
224
|
` : "<br>"
|
|
222
|
-
),
|
|
225
|
+
), xe.fromSchema(r).parse(i, {
|
|
223
226
|
topNode: r.nodes.paragraph.create(),
|
|
224
227
|
preserveWhitespace: !0
|
|
225
228
|
}).content;
|
|
226
229
|
}
|
|
227
|
-
return
|
|
230
|
+
return ut.empty;
|
|
228
231
|
} : void 0
|
|
229
232
|
}), n;
|
|
230
233
|
}
|
|
231
234
|
function ho(e, t, n, o) {
|
|
232
235
|
var a, s, i, c;
|
|
233
|
-
const r = t.node ||
|
|
236
|
+
const r = t.node || P.create({
|
|
234
237
|
name: e.type,
|
|
235
238
|
content: e.content === "inline" ? "inline*" : e.content === "none" ? "" : e.content,
|
|
236
239
|
group: "blockContent",
|
|
@@ -240,15 +243,15 @@ function ho(e, t, n, o) {
|
|
|
240
243
|
defining: ((c = t.meta) == null ? void 0 : c.defining) ?? !0,
|
|
241
244
|
priority: o,
|
|
242
245
|
addAttributes() {
|
|
243
|
-
return
|
|
246
|
+
return kt(e.propSchema);
|
|
244
247
|
},
|
|
245
248
|
parseHTML() {
|
|
246
|
-
return
|
|
249
|
+
return St(e, t);
|
|
247
250
|
},
|
|
248
251
|
renderHTML({ HTMLAttributes: l }) {
|
|
249
252
|
var d;
|
|
250
253
|
const u = document.createElement("div");
|
|
251
|
-
return
|
|
254
|
+
return z(
|
|
252
255
|
{
|
|
253
256
|
dom: u,
|
|
254
257
|
contentDOM: e.content === "inline" ? u : void 0
|
|
@@ -263,17 +266,17 @@ function ho(e, t, n, o) {
|
|
|
263
266
|
addNodeView() {
|
|
264
267
|
return (l) => {
|
|
265
268
|
var f, E;
|
|
266
|
-
const u = this.options.editor, d =
|
|
269
|
+
const u = this.options.editor, d = yt(
|
|
267
270
|
l.getPos,
|
|
268
271
|
u,
|
|
269
272
|
this.editor,
|
|
270
273
|
e.type
|
|
271
|
-
), p = ((f = this.options.domAttributes) == null ? void 0 : f.blockContent) || {},
|
|
274
|
+
), p = ((f = this.options.domAttributes) == null ? void 0 : f.blockContent) || {}, h = t.render.call(
|
|
272
275
|
{ blockContentDOMAttributes: p, props: l, renderType: "nodeView" },
|
|
273
276
|
d,
|
|
274
277
|
u
|
|
275
278
|
);
|
|
276
|
-
return ((E = t.meta) == null ? void 0 : E.selectable) === !1 &&
|
|
279
|
+
return ((E = t.meta) == null ? void 0 : E.selectable) === !1 && Et(h, this.editor), h;
|
|
277
280
|
};
|
|
278
281
|
}
|
|
279
282
|
});
|
|
@@ -302,8 +305,8 @@ function ho(e, t, n, o) {
|
|
|
302
305
|
// TODO: this should not have wrapInBlockStructure and generally be a lot simpler
|
|
303
306
|
// post-processing in externalHTMLExporter should not be necessary
|
|
304
307
|
toExternalHTML: (l, u, d) => {
|
|
305
|
-
var
|
|
306
|
-
const p = ((
|
|
308
|
+
var h, f;
|
|
309
|
+
const p = ((h = r.options.domAttributes) == null ? void 0 : h.blockContent) || {};
|
|
307
310
|
return ((f = t.toExternalHTML) == null ? void 0 : f.call(
|
|
308
311
|
{ blockContentDOMAttributes: p },
|
|
309
312
|
l,
|
|
@@ -319,10 +322,10 @@ function ho(e, t, n, o) {
|
|
|
319
322
|
extensions: n
|
|
320
323
|
};
|
|
321
324
|
}
|
|
322
|
-
function
|
|
325
|
+
function go(e) {
|
|
323
326
|
return e;
|
|
324
327
|
}
|
|
325
|
-
function
|
|
328
|
+
function v(e, t, n) {
|
|
326
329
|
return (o = {}) => {
|
|
327
330
|
const r = typeof e == "function" ? e(o) : e, a = typeof t == "function" ? t(o) : t, s = n ? typeof n == "function" ? n(o) : n : void 0;
|
|
328
331
|
return {
|
|
@@ -340,7 +343,7 @@ function y(e, t, n) {
|
|
|
340
343
|
l
|
|
341
344
|
);
|
|
342
345
|
if (u !== void 0)
|
|
343
|
-
return
|
|
346
|
+
return z(
|
|
344
347
|
u,
|
|
345
348
|
i.type,
|
|
346
349
|
i.props,
|
|
@@ -359,7 +362,7 @@ function y(e, t, n) {
|
|
|
359
362
|
i,
|
|
360
363
|
c
|
|
361
364
|
);
|
|
362
|
-
return
|
|
365
|
+
return z(
|
|
363
366
|
l,
|
|
364
367
|
i.type,
|
|
365
368
|
i.props,
|
|
@@ -373,13 +376,13 @@ function y(e, t, n) {
|
|
|
373
376
|
};
|
|
374
377
|
};
|
|
375
378
|
}
|
|
376
|
-
function
|
|
379
|
+
function bo(e, t, n, o) {
|
|
377
380
|
return e.dom.setAttribute("data-inline-content-type", t), Object.entries(n).filter(([r, a]) => {
|
|
378
381
|
const s = o[r];
|
|
379
382
|
return a !== s.default;
|
|
380
|
-
}).map(([r, a]) => [
|
|
383
|
+
}).map(([r, a]) => [F(r), a]).forEach(([r, a]) => e.dom.setAttribute(r, a)), e.contentDOM && e.contentDOM.setAttribute("data-editable", ""), e;
|
|
381
384
|
}
|
|
382
|
-
function
|
|
385
|
+
function Co(e) {
|
|
383
386
|
return {
|
|
384
387
|
Backspace: ({ editor: t }) => {
|
|
385
388
|
const n = t.state.selection.$from;
|
|
@@ -387,14 +390,14 @@ function bo(e) {
|
|
|
387
390
|
}
|
|
388
391
|
};
|
|
389
392
|
}
|
|
390
|
-
function
|
|
393
|
+
function xt(e, t) {
|
|
391
394
|
return {
|
|
392
395
|
config: e,
|
|
393
396
|
implementation: t
|
|
394
397
|
};
|
|
395
398
|
}
|
|
396
|
-
function
|
|
397
|
-
return
|
|
399
|
+
function ko(e, t, n) {
|
|
400
|
+
return xt(
|
|
398
401
|
{
|
|
399
402
|
type: e.name,
|
|
400
403
|
propSchema: t,
|
|
@@ -406,7 +409,7 @@ function Co(e, t, n) {
|
|
|
406
409
|
}
|
|
407
410
|
);
|
|
408
411
|
}
|
|
409
|
-
function
|
|
412
|
+
function Mt(e) {
|
|
410
413
|
return Object.fromEntries(
|
|
411
414
|
Object.entries(e).map(([t, n]) => [t, n.config])
|
|
412
415
|
);
|
|
@@ -423,17 +426,17 @@ function wt(e) {
|
|
|
423
426
|
}
|
|
424
427
|
};
|
|
425
428
|
}
|
|
426
|
-
function
|
|
429
|
+
function W(e, t, n, o) {
|
|
427
430
|
return e.dom.setAttribute("data-style-type", t), o === "string" && e.dom.setAttribute("data-value", n), e.contentDOM && e.contentDOM.setAttribute("data-editable", ""), e;
|
|
428
431
|
}
|
|
429
|
-
function
|
|
432
|
+
function Le(e, t) {
|
|
430
433
|
return {
|
|
431
434
|
config: e,
|
|
432
435
|
implementation: t
|
|
433
436
|
};
|
|
434
437
|
}
|
|
435
|
-
function
|
|
436
|
-
return
|
|
438
|
+
function I(e, t) {
|
|
439
|
+
return Le(
|
|
437
440
|
{
|
|
438
441
|
type: e.name,
|
|
439
442
|
propSchema: t
|
|
@@ -448,7 +451,7 @@ function H(e, t) {
|
|
|
448
451
|
);
|
|
449
452
|
const a = o.pmSchema.mark(e.name, {
|
|
450
453
|
stringValue: n
|
|
451
|
-
}), s =
|
|
454
|
+
}), s = ce.renderSpec(
|
|
452
455
|
document,
|
|
453
456
|
r(a, !0)
|
|
454
457
|
);
|
|
@@ -466,7 +469,7 @@ function H(e, t) {
|
|
|
466
469
|
);
|
|
467
470
|
const a = o.pmSchema.mark(e.name, {
|
|
468
471
|
stringValue: n
|
|
469
|
-
}), s =
|
|
472
|
+
}), s = ce.renderSpec(
|
|
470
473
|
document,
|
|
471
474
|
r(a, !0)
|
|
472
475
|
);
|
|
@@ -479,12 +482,12 @@ function H(e, t) {
|
|
|
479
482
|
}
|
|
480
483
|
);
|
|
481
484
|
}
|
|
482
|
-
function
|
|
485
|
+
function Lt(e) {
|
|
483
486
|
return Object.fromEntries(
|
|
484
487
|
Object.entries(e).map(([t, n]) => [t, n.config])
|
|
485
488
|
);
|
|
486
489
|
}
|
|
487
|
-
function
|
|
490
|
+
function Tt(e, t) {
|
|
488
491
|
const n = [
|
|
489
492
|
{
|
|
490
493
|
tag: `[data-style-type="${e.type}"]`,
|
|
@@ -508,18 +511,18 @@ function Lt(e, t) {
|
|
|
508
511
|
}
|
|
509
512
|
}), n;
|
|
510
513
|
}
|
|
511
|
-
function
|
|
512
|
-
const n =
|
|
514
|
+
function Te(e, t) {
|
|
515
|
+
const n = Ue.create({
|
|
513
516
|
name: e.type,
|
|
514
517
|
addAttributes() {
|
|
515
518
|
return wt(e.propSchema);
|
|
516
519
|
},
|
|
517
520
|
parseHTML() {
|
|
518
|
-
return
|
|
521
|
+
return Tt(e, t.parse);
|
|
519
522
|
},
|
|
520
523
|
renderHTML({ mark: o }) {
|
|
521
524
|
const r = (t.toExternalHTML || t.render)(o.attrs.stringValue);
|
|
522
|
-
return
|
|
525
|
+
return W(
|
|
523
526
|
r,
|
|
524
527
|
e.type,
|
|
525
528
|
o.attrs.stringValue,
|
|
@@ -529,7 +532,7 @@ function Le(e, t) {
|
|
|
529
532
|
addMarkView() {
|
|
530
533
|
return ({ mark: o }) => {
|
|
531
534
|
const r = t.render(o.attrs.stringValue);
|
|
532
|
-
return
|
|
535
|
+
return W(
|
|
533
536
|
r,
|
|
534
537
|
e.type,
|
|
535
538
|
o.attrs.stringValue,
|
|
@@ -538,12 +541,12 @@ function Le(e, t) {
|
|
|
538
541
|
};
|
|
539
542
|
}
|
|
540
543
|
});
|
|
541
|
-
return
|
|
544
|
+
return Le(e, {
|
|
542
545
|
...t,
|
|
543
546
|
mark: n,
|
|
544
547
|
render: (o) => {
|
|
545
548
|
const r = t.render(o);
|
|
546
|
-
return
|
|
549
|
+
return W(
|
|
547
550
|
r,
|
|
548
551
|
e.type,
|
|
549
552
|
o,
|
|
@@ -552,7 +555,7 @@ function Le(e, t) {
|
|
|
552
555
|
},
|
|
553
556
|
toExternalHTML: (o) => {
|
|
554
557
|
const r = (t.toExternalHTML || t.render)(o);
|
|
555
|
-
return
|
|
558
|
+
return W(
|
|
556
559
|
r,
|
|
557
560
|
e.type,
|
|
558
561
|
o,
|
|
@@ -561,23 +564,23 @@ function Le(e, t) {
|
|
|
561
564
|
}
|
|
562
565
|
});
|
|
563
566
|
}
|
|
564
|
-
function
|
|
567
|
+
function Bt(e, t) {
|
|
565
568
|
let n, o;
|
|
566
|
-
if (t.firstChild.descendants((r, a) => n ? !1 : !
|
|
569
|
+
if (t.firstChild.descendants((r, a) => n ? !1 : !At(r) || r.attrs.id !== e ? !0 : (n = r, o = a + 1, !1)), !(n === void 0 || o === void 0))
|
|
567
570
|
return {
|
|
568
571
|
node: n,
|
|
569
572
|
posBeforeNode: o
|
|
570
573
|
};
|
|
571
574
|
}
|
|
572
|
-
function
|
|
575
|
+
function At(e) {
|
|
573
576
|
return e.type.isInGroup("bnBlock");
|
|
574
577
|
}
|
|
575
|
-
const
|
|
578
|
+
const yo = (e, t) => ({
|
|
576
579
|
tr: n,
|
|
577
580
|
dispatch: o
|
|
578
|
-
}) => (o &&
|
|
579
|
-
function
|
|
580
|
-
const a =
|
|
581
|
+
}) => (o && Q(n, e, t), !0);
|
|
582
|
+
function Q(e, t, n, o, r) {
|
|
583
|
+
const a = et(e.doc.resolve(t));
|
|
581
584
|
let s = null;
|
|
582
585
|
a.blockNoteType === "table" && (s = Pt(e));
|
|
583
586
|
const i = O(e);
|
|
@@ -586,7 +589,7 @@ function K(e, t, n, o, r) {
|
|
|
586
589
|
const c = i.nodes[a.blockNoteType], l = i.nodes[n.type || a.blockNoteType], u = l.isInGroup("bnBlock") ? l : i.nodes.blockContainer;
|
|
587
590
|
if (a.isBlockContainer && l.isInGroup("blockContent")) {
|
|
588
591
|
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;
|
|
589
|
-
|
|
592
|
+
ue(n, e, a), Nt(
|
|
590
593
|
n,
|
|
591
594
|
e,
|
|
592
595
|
c,
|
|
@@ -596,9 +599,9 @@ function K(e, t, n, o, r) {
|
|
|
596
599
|
p
|
|
597
600
|
);
|
|
598
601
|
} else if (!a.isBlockContainer && l.isInGroup("bnBlock"))
|
|
599
|
-
|
|
602
|
+
ue(n, e, a);
|
|
600
603
|
else {
|
|
601
|
-
const d =
|
|
604
|
+
const d = Ee(a.bnBlock.node, i);
|
|
602
605
|
e.replaceWith(
|
|
603
606
|
a.bnBlock.beforePos,
|
|
604
607
|
a.bnBlock.afterPos,
|
|
@@ -616,24 +619,24 @@ function K(e, t, n, o, r) {
|
|
|
616
619
|
e.setNodeMarkup(a.bnBlock.beforePos, u, {
|
|
617
620
|
...a.bnBlock.node.attrs,
|
|
618
621
|
...n.props
|
|
619
|
-
}), s &&
|
|
622
|
+
}), s && It(e, a, s);
|
|
620
623
|
}
|
|
621
|
-
function
|
|
624
|
+
function Nt(e, t, n, o, r, a, s) {
|
|
622
625
|
const i = O(t);
|
|
623
626
|
let c = "keep";
|
|
624
627
|
if (e.content)
|
|
625
628
|
if (typeof e.content == "string")
|
|
626
|
-
c =
|
|
629
|
+
c = ie(
|
|
627
630
|
[e.content],
|
|
628
631
|
i,
|
|
629
632
|
o.name
|
|
630
633
|
);
|
|
631
634
|
else if (Array.isArray(e.content))
|
|
632
|
-
c =
|
|
635
|
+
c = ie(e.content, i, o.name);
|
|
633
636
|
else if (e.content.type === "tableContent")
|
|
634
|
-
c =
|
|
637
|
+
c = tt(e.content, i);
|
|
635
638
|
else
|
|
636
|
-
throw new
|
|
639
|
+
throw new nt(e.content.type);
|
|
637
640
|
else
|
|
638
641
|
n.spec.content === "" || o.spec.content !== n.spec.content && (c = []);
|
|
639
642
|
if (c === "keep")
|
|
@@ -646,14 +649,14 @@ function At(e, t, n, o, r, a, s) {
|
|
|
646
649
|
...r.blockContent.node.attrs,
|
|
647
650
|
...e.props
|
|
648
651
|
});
|
|
649
|
-
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,
|
|
652
|
+
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;
|
|
650
653
|
t.replace(
|
|
651
654
|
l,
|
|
652
655
|
u,
|
|
653
|
-
new
|
|
654
|
-
|
|
656
|
+
new Me(
|
|
657
|
+
_.from(c),
|
|
655
658
|
p - d - 1,
|
|
656
|
-
|
|
659
|
+
h - d - 1
|
|
657
660
|
)
|
|
658
661
|
);
|
|
659
662
|
} else
|
|
@@ -669,16 +672,16 @@ function At(e, t, n, o, r, a, s) {
|
|
|
669
672
|
)
|
|
670
673
|
);
|
|
671
674
|
}
|
|
672
|
-
function
|
|
675
|
+
function ue(e, t, n) {
|
|
673
676
|
const o = O(t);
|
|
674
677
|
if (e.children !== void 0 && e.children.length > 0) {
|
|
675
678
|
const r = e.children.map((a) => X(a, o));
|
|
676
679
|
if (n.childContainer)
|
|
677
680
|
t.step(
|
|
678
|
-
new
|
|
681
|
+
new Ke(
|
|
679
682
|
n.childContainer.beforePos + 1,
|
|
680
683
|
n.childContainer.afterPos - 1,
|
|
681
|
-
new
|
|
684
|
+
new Me(_.from(r), 0, 0)
|
|
682
685
|
)
|
|
683
686
|
);
|
|
684
687
|
else {
|
|
@@ -692,10 +695,10 @@ function de(e, t, n) {
|
|
|
692
695
|
}
|
|
693
696
|
}
|
|
694
697
|
function vo(e, t, n, o, r) {
|
|
695
|
-
const a = typeof t == "string" ? t : t.id, s =
|
|
698
|
+
const a = typeof t == "string" ? t : t.id, s = Bt(a, e.doc);
|
|
696
699
|
if (!s)
|
|
697
700
|
throw new Error(`Block with ID ${a} not found`);
|
|
698
|
-
|
|
701
|
+
Q(
|
|
699
702
|
e,
|
|
700
703
|
s.posBeforeNode,
|
|
701
704
|
n,
|
|
@@ -703,11 +706,11 @@ function vo(e, t, n, o, r) {
|
|
|
703
706
|
r
|
|
704
707
|
);
|
|
705
708
|
const i = e.doc.resolve(s.posBeforeNode + 1).node(), c = O(e);
|
|
706
|
-
return
|
|
709
|
+
return Ee(i, c);
|
|
707
710
|
}
|
|
708
711
|
function Pt(e) {
|
|
709
712
|
const t = "selection" in e ? e.selection : null;
|
|
710
|
-
if (!(t instanceof
|
|
713
|
+
if (!(t instanceof ye))
|
|
711
714
|
return null;
|
|
712
715
|
const n = e.doc.resolve(t.head);
|
|
713
716
|
let o = -1, r = -1;
|
|
@@ -723,13 +726,13 @@ function Pt(e) {
|
|
|
723
726
|
const a = n.before(o), s = n.before(r), i = e.doc.nodeAt(s);
|
|
724
727
|
if (!i || i.type.name !== "table")
|
|
725
728
|
return null;
|
|
726
|
-
const c =
|
|
729
|
+
const c = Ce.get(i), l = a - (s + 1), u = c.map.indexOf(l);
|
|
727
730
|
if (u < 0)
|
|
728
731
|
return null;
|
|
729
732
|
const d = Math.floor(u / c.width), p = u % c.width, f = a + 1 + 1, E = Math.max(0, t.head - f);
|
|
730
733
|
return { row: d, col: p, offset: E };
|
|
731
734
|
}
|
|
732
|
-
function
|
|
735
|
+
function It(e, t, n) {
|
|
733
736
|
var x;
|
|
734
737
|
if (t.blockNoteType !== "table")
|
|
735
738
|
return !1;
|
|
@@ -737,17 +740,17 @@ function Nt(e, t, n) {
|
|
|
737
740
|
if (t.isBlockContainer)
|
|
738
741
|
o = e.mapping.map(t.blockContent.beforePos);
|
|
739
742
|
else {
|
|
740
|
-
const S = e.mapping.map(t.bnBlock.beforePos),
|
|
741
|
-
e.doc.nodesBetween(S,
|
|
743
|
+
const S = e.mapping.map(t.bnBlock.beforePos), N = S + (((x = e.doc.nodeAt(S)) == null ? void 0 : x.nodeSize) || 0);
|
|
744
|
+
e.doc.nodesBetween(S, N, (g, M) => g.type.name === "table" ? (o = M, !1) : !0);
|
|
742
745
|
}
|
|
743
746
|
const r = o >= 0 ? e.doc.nodeAt(o) : null;
|
|
744
747
|
if (!r || r.type.name !== "table")
|
|
745
748
|
return !1;
|
|
746
|
-
const a =
|
|
749
|
+
const a = Ce.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];
|
|
747
750
|
if (l == null)
|
|
748
751
|
return !1;
|
|
749
|
-
const d = o + 1 + l + 1, p = e.doc.nodeAt(d),
|
|
750
|
-
return "selection" in e && e.setSelection(
|
|
752
|
+
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));
|
|
753
|
+
return "selection" in e && e.setSelection(ye.create(e.doc, E)), !0;
|
|
751
754
|
}
|
|
752
755
|
const T = {
|
|
753
756
|
gray: {
|
|
@@ -786,7 +789,7 @@ const T = {
|
|
|
786
789
|
text: "#ad1a72",
|
|
787
790
|
background: "#f4dfeb"
|
|
788
791
|
}
|
|
789
|
-
},
|
|
792
|
+
}, Eo = {
|
|
790
793
|
gray: {
|
|
791
794
|
text: "#bebdb8",
|
|
792
795
|
background: "#9b9a97"
|
|
@@ -823,7 +826,7 @@ const T = {
|
|
|
823
826
|
text: "#da208f",
|
|
824
827
|
background: "#ad1a72"
|
|
825
828
|
}
|
|
826
|
-
},
|
|
829
|
+
}, m = {
|
|
827
830
|
backgroundColor: {
|
|
828
831
|
default: "default"
|
|
829
832
|
},
|
|
@@ -834,29 +837,29 @@ const T = {
|
|
|
834
837
|
default: "left",
|
|
835
838
|
values: ["left", "center", "right", "justify"]
|
|
836
839
|
}
|
|
837
|
-
},
|
|
840
|
+
}, C = (e) => {
|
|
838
841
|
const t = {};
|
|
839
|
-
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 =
|
|
842
|
+
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 = m.textAlignment.values.includes(
|
|
840
843
|
e.style.textAlign
|
|
841
844
|
) ? e.style.textAlign : void 0, t;
|
|
842
845
|
}, A = (e, t) => {
|
|
843
|
-
e.backgroundColor && e.backgroundColor !==
|
|
844
|
-
},
|
|
845
|
-
default:
|
|
846
|
-
parseHTML: (t) => t.hasAttribute("data-background-color") ? t.getAttribute("data-background-color") : t.style.backgroundColor ? t.style.backgroundColor :
|
|
847
|
-
renderHTML: (t) => t[e] ===
|
|
846
|
+
e.backgroundColor && e.backgroundColor !== m.backgroundColor.default && (t.style.backgroundColor = e.backgroundColor in T ? T[e.backgroundColor].background : e.backgroundColor), e.textColor && e.textColor !== m.textColor.default && (t.style.color = e.textColor in T ? T[e.textColor].text : e.textColor), e.textAlignment && e.textAlignment !== m.textAlignment.default && (t.style.textAlign = e.textAlignment);
|
|
847
|
+
}, So = (e = "backgroundColor") => ({
|
|
848
|
+
default: m.backgroundColor.default,
|
|
849
|
+
parseHTML: (t) => t.hasAttribute("data-background-color") ? t.getAttribute("data-background-color") : t.style.backgroundColor ? t.style.backgroundColor : m.backgroundColor.default,
|
|
850
|
+
renderHTML: (t) => t[e] === m.backgroundColor.default ? {} : {
|
|
848
851
|
"data-background-color": t[e]
|
|
849
852
|
}
|
|
850
|
-
}),
|
|
851
|
-
default:
|
|
852
|
-
parseHTML: (t) => t.hasAttribute("data-text-color") ? t.getAttribute("data-text-color") : t.style.color ? t.style.color :
|
|
853
|
-
renderHTML: (t) => t[e] ===
|
|
853
|
+
}), xo = (e = "textColor") => ({
|
|
854
|
+
default: m.textColor.default,
|
|
855
|
+
parseHTML: (t) => t.hasAttribute("data-text-color") ? t.getAttribute("data-text-color") : t.style.color ? t.style.color : m.textColor.default,
|
|
856
|
+
renderHTML: (t) => t[e] === m.textColor.default ? {} : {
|
|
854
857
|
"data-text-color": t[e]
|
|
855
858
|
}
|
|
856
|
-
}),
|
|
857
|
-
default:
|
|
858
|
-
parseHTML: (t) => t.hasAttribute("data-text-alignment") ? t.getAttribute("data-text-alignment") : t.style.textAlign ? t.style.textAlign :
|
|
859
|
-
renderHTML: (t) => t[e] ===
|
|
859
|
+
}), Mo = (e = "textAlignment") => ({
|
|
860
|
+
default: m.textAlignment.default,
|
|
861
|
+
parseHTML: (t) => t.hasAttribute("data-text-alignment") ? t.getAttribute("data-text-alignment") : t.style.textAlign ? t.style.textAlign : m.textAlignment.default,
|
|
862
|
+
renderHTML: (t) => t[e] === m.textAlignment.default ? {} : {
|
|
860
863
|
"data-text-alignment": t[e]
|
|
861
864
|
}
|
|
862
865
|
}), $ = (e, t) => {
|
|
@@ -867,7 +870,7 @@ const T = {
|
|
|
867
870
|
return;
|
|
868
871
|
const o = e.querySelector("figcaption"), r = (o == null ? void 0 : o.textContent) ?? void 0;
|
|
869
872
|
return { targetElement: n, caption: r };
|
|
870
|
-
},
|
|
873
|
+
}, H = y(({ editor: e }) => {
|
|
871
874
|
const t = ve(void 0);
|
|
872
875
|
function n() {
|
|
873
876
|
t.setState(void 0);
|
|
@@ -905,7 +908,7 @@ const T = {
|
|
|
905
908
|
c.preventDefault(), c.stopPropagation();
|
|
906
909
|
}, i = () => {
|
|
907
910
|
var c;
|
|
908
|
-
t.isEditable && ((c = t.getExtension(
|
|
911
|
+
t.isEditable && ((c = t.getExtension(H)) == null || c.showMenu(e.id));
|
|
909
912
|
};
|
|
910
913
|
return o.addEventListener(
|
|
911
914
|
"mousedown",
|
|
@@ -925,16 +928,16 @@ const T = {
|
|
|
925
928
|
);
|
|
926
929
|
}
|
|
927
930
|
};
|
|
928
|
-
},
|
|
931
|
+
}, Dt = '<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>', Ot = (e) => {
|
|
929
932
|
const t = document.createElement("div");
|
|
930
933
|
t.className = "bn-file-name-with-icon";
|
|
931
934
|
const n = document.createElement("div");
|
|
932
|
-
n.className = "bn-file-icon", n.innerHTML =
|
|
935
|
+
n.className = "bn-file-icon", n.innerHTML = Dt, t.appendChild(n);
|
|
933
936
|
const o = document.createElement("p");
|
|
934
937
|
return o.className = "bn-file-name", o.textContent = e.props.name, t.appendChild(o), {
|
|
935
938
|
dom: t
|
|
936
939
|
};
|
|
937
|
-
},
|
|
940
|
+
}, J = (e, t, n, o) => {
|
|
938
941
|
const r = document.createElement("div");
|
|
939
942
|
if (r.className = "bn-file-block-content-wrapper", e.props.url === "") {
|
|
940
943
|
const s = Ht(e, t, o);
|
|
@@ -955,7 +958,7 @@ const T = {
|
|
|
955
958
|
}
|
|
956
959
|
const a = { dom: r };
|
|
957
960
|
if (e.props.showPreview === !1 || !n) {
|
|
958
|
-
const s =
|
|
961
|
+
const s = Ot(e);
|
|
959
962
|
r.appendChild(s.dom), a.destroy = () => {
|
|
960
963
|
var i;
|
|
961
964
|
(i = s.destroy) == null || i.call(s);
|
|
@@ -967,7 +970,7 @@ const T = {
|
|
|
967
970
|
s.className = "bn-file-caption", s.textContent = e.props.caption, r.appendChild(s);
|
|
968
971
|
}
|
|
969
972
|
return a;
|
|
970
|
-
},
|
|
973
|
+
}, Y = (e, t) => {
|
|
971
974
|
const n = document.createElement("figure"), o = document.createElement("figcaption");
|
|
972
975
|
return o.textContent = t, n.appendChild(e), n.appendChild(o), { dom: n };
|
|
973
976
|
}, U = (e, t) => {
|
|
@@ -975,10 +978,10 @@ const T = {
|
|
|
975
978
|
return o.textContent = t, n.appendChild(e), n.appendChild(o), {
|
|
976
979
|
dom: n
|
|
977
980
|
};
|
|
978
|
-
},
|
|
981
|
+
}, pe = (e) => ({ url: e.src || void 0 }), _t = '<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>', Vt = (e) => ({
|
|
979
982
|
type: "audio",
|
|
980
983
|
propSchema: {
|
|
981
|
-
backgroundColor:
|
|
984
|
+
backgroundColor: m.backgroundColor,
|
|
982
985
|
// File name.
|
|
983
986
|
name: {
|
|
984
987
|
default: ""
|
|
@@ -996,13 +999,13 @@ const T = {
|
|
|
996
999
|
}
|
|
997
1000
|
},
|
|
998
1001
|
content: "none"
|
|
999
|
-
}),
|
|
1002
|
+
}), Wt = (e = {}) => (t) => {
|
|
1000
1003
|
if (t.tagName === "AUDIO") {
|
|
1001
1004
|
if (t.closest("figure"))
|
|
1002
1005
|
return;
|
|
1003
|
-
const { backgroundColor: n } =
|
|
1006
|
+
const { backgroundColor: n } = C(t);
|
|
1004
1007
|
return {
|
|
1005
|
-
...
|
|
1008
|
+
...pe(t),
|
|
1006
1009
|
backgroundColor: n
|
|
1007
1010
|
};
|
|
1008
1011
|
}
|
|
@@ -1010,26 +1013,26 @@ const T = {
|
|
|
1010
1013
|
const n = $(t, "audio");
|
|
1011
1014
|
if (!n)
|
|
1012
1015
|
return;
|
|
1013
|
-
const { targetElement: o, caption: r } = n, { backgroundColor: a } =
|
|
1016
|
+
const { targetElement: o, caption: r } = n, { backgroundColor: a } = C(t);
|
|
1014
1017
|
return {
|
|
1015
|
-
...
|
|
1018
|
+
...pe(o),
|
|
1016
1019
|
backgroundColor: a,
|
|
1017
1020
|
caption: r
|
|
1018
1021
|
};
|
|
1019
1022
|
}
|
|
1020
|
-
},
|
|
1023
|
+
}, Rt = (e = {}) => (t, n) => {
|
|
1021
1024
|
const o = document.createElement("div");
|
|
1022
|
-
o.innerHTML = e.icon ??
|
|
1025
|
+
o.innerHTML = e.icon ?? _t;
|
|
1023
1026
|
const r = document.createElement("audio");
|
|
1024
1027
|
return r.className = "bn-audio", n.resolveFileUrl ? n.resolveFileUrl(t.props.url).then((a) => {
|
|
1025
1028
|
r.src = a;
|
|
1026
|
-
}) : r.src = t.props.url, r.controls = !0, r.contentEditable = "false", r.draggable = !1,
|
|
1029
|
+
}) : r.src = t.props.url, r.controls = !0, r.contentEditable = "false", r.draggable = !1, J(
|
|
1027
1030
|
t,
|
|
1028
1031
|
n,
|
|
1029
1032
|
{ dom: r },
|
|
1030
1033
|
o.firstElementChild
|
|
1031
1034
|
);
|
|
1032
|
-
},
|
|
1035
|
+
}, Ft = (e = {}) => (t, n) => {
|
|
1033
1036
|
if (!t.props.url) {
|
|
1034
1037
|
const r = document.createElement("p");
|
|
1035
1038
|
return r.textContent = "Add audio", {
|
|
@@ -1037,27 +1040,27 @@ const T = {
|
|
|
1037
1040
|
};
|
|
1038
1041
|
}
|
|
1039
1042
|
let o;
|
|
1040
|
-
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 ?
|
|
1043
|
+
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 ? Y(o, t.props.caption) : U(o, t.props.caption) : {
|
|
1041
1044
|
dom: o
|
|
1042
1045
|
};
|
|
1043
|
-
},
|
|
1044
|
-
|
|
1046
|
+
}, $t = v(
|
|
1047
|
+
Vt,
|
|
1045
1048
|
(e) => ({
|
|
1046
1049
|
meta: {
|
|
1047
1050
|
fileBlockAccept: ["audio/*"]
|
|
1048
1051
|
},
|
|
1049
|
-
parse:
|
|
1050
|
-
render:
|
|
1051
|
-
toExternalHTML:
|
|
1052
|
+
parse: Wt(e),
|
|
1053
|
+
render: Rt(e),
|
|
1054
|
+
toExternalHTML: Ft(e),
|
|
1052
1055
|
runsBefore: ["file"]
|
|
1053
1056
|
})
|
|
1054
|
-
),
|
|
1057
|
+
), fe = Symbol.for("blocknote.shikiParser"), j = Symbol.for(
|
|
1055
1058
|
"blocknote.shikiHighlighterPromise"
|
|
1056
1059
|
);
|
|
1057
|
-
function
|
|
1060
|
+
function Ut(e) {
|
|
1058
1061
|
const t = globalThis;
|
|
1059
1062
|
let n, o, r = !1;
|
|
1060
|
-
return
|
|
1063
|
+
return pt({
|
|
1061
1064
|
parser: (s) => {
|
|
1062
1065
|
if (!e.createHighlighter)
|
|
1063
1066
|
return process.env.NODE_ENV === "development" && !r && (console.log(
|
|
@@ -1069,14 +1072,14 @@ function $t(e) {
|
|
|
1069
1072
|
n = c;
|
|
1070
1073
|
}
|
|
1071
1074
|
);
|
|
1072
|
-
const i =
|
|
1073
|
-
return !i || i === "text" || i === "none" || i === "plaintext" || i === "txt" ? [] : n.getLoadedLanguages().includes(i) ? (o || (o = t[
|
|
1075
|
+
const i = Be(e, s.language);
|
|
1076
|
+
return !i || i === "text" || i === "none" || i === "plaintext" || i === "txt" ? [] : n.getLoadedLanguages().includes(i) ? (o || (o = t[fe] || ft(n), t[fe] = o), o(s)) : n.loadLanguage(i);
|
|
1074
1077
|
},
|
|
1075
1078
|
languageExtractor: (s) => s.attrs.language,
|
|
1076
1079
|
nodeTypes: ["codeBlock"]
|
|
1077
1080
|
});
|
|
1078
1081
|
}
|
|
1079
|
-
const
|
|
1082
|
+
const qt = ({ defaultLanguage: e = "text" }) => ({
|
|
1080
1083
|
type: "codeBlock",
|
|
1081
1084
|
propSchema: {
|
|
1082
1085
|
language: {
|
|
@@ -1084,8 +1087,8 @@ const Ut = ({ defaultLanguage: e = "text" }) => ({
|
|
|
1084
1087
|
}
|
|
1085
1088
|
},
|
|
1086
1089
|
content: "inline"
|
|
1087
|
-
}),
|
|
1088
|
-
|
|
1090
|
+
}), jt = v(
|
|
1091
|
+
qt,
|
|
1089
1092
|
(e) => ({
|
|
1090
1093
|
meta: {
|
|
1091
1094
|
code: !0,
|
|
@@ -1100,7 +1103,7 @@ const Ut = ({ defaultLanguage: e = "text" }) => ({
|
|
|
1100
1103
|
return { language: n.getAttribute("data-language") || ((a = n.className.split(" ").find((s) => s.includes("language-"))) == null ? void 0 : a.replace("language-", "")) };
|
|
1101
1104
|
},
|
|
1102
1105
|
parseContent: ({ el: t, schema: n }) => {
|
|
1103
|
-
const o =
|
|
1106
|
+
const o = xe.fromSchema(n), r = t.firstElementChild;
|
|
1104
1107
|
return o.parse(r, {
|
|
1105
1108
|
preserveWhitespace: "full",
|
|
1106
1109
|
topNode: n.nodes.codeBlock.create()
|
|
@@ -1145,11 +1148,11 @@ const Ut = ({ defaultLanguage: e = "text" }) => ({
|
|
|
1145
1148
|
}
|
|
1146
1149
|
}),
|
|
1147
1150
|
(e) => [
|
|
1148
|
-
|
|
1151
|
+
y({
|
|
1149
1152
|
key: "code-block-highlighter",
|
|
1150
|
-
prosemirrorPlugins: [
|
|
1153
|
+
prosemirrorPlugins: [Ut(e)]
|
|
1151
1154
|
}),
|
|
1152
|
-
|
|
1155
|
+
y({
|
|
1153
1156
|
key: "code-block-keyboard-shortcuts",
|
|
1154
1157
|
keyboardShortcuts: {
|
|
1155
1158
|
Delete: ({ editor: t }) => t.transact((n) => {
|
|
@@ -1205,7 +1208,7 @@ const Ut = ({ defaultLanguage: e = "text" }) => ({
|
|
|
1205
1208
|
type: "codeBlock",
|
|
1206
1209
|
props: {
|
|
1207
1210
|
language: {
|
|
1208
|
-
language:
|
|
1211
|
+
language: Be(e, n) ?? n
|
|
1209
1212
|
}.language
|
|
1210
1213
|
},
|
|
1211
1214
|
content: []
|
|
@@ -1216,18 +1219,18 @@ const Ut = ({ defaultLanguage: e = "text" }) => ({
|
|
|
1216
1219
|
})
|
|
1217
1220
|
]
|
|
1218
1221
|
);
|
|
1219
|
-
function
|
|
1222
|
+
function Be(e, t) {
|
|
1220
1223
|
var n;
|
|
1221
1224
|
return (n = Object.entries(e.supportedLanguages ?? {}).find(
|
|
1222
1225
|
([o, { aliases: r }]) => (r == null ? void 0 : r.includes(t)) || o === t
|
|
1223
1226
|
)) == null ? void 0 : n[0];
|
|
1224
1227
|
}
|
|
1225
|
-
const
|
|
1228
|
+
const Gt = () => ({
|
|
1226
1229
|
type: "divider",
|
|
1227
1230
|
propSchema: {},
|
|
1228
1231
|
content: "none"
|
|
1229
|
-
}),
|
|
1230
|
-
|
|
1232
|
+
}), zt = v(
|
|
1233
|
+
Gt,
|
|
1231
1234
|
{
|
|
1232
1235
|
meta: {
|
|
1233
1236
|
isolating: !1
|
|
@@ -1243,7 +1246,7 @@ const jt = () => ({
|
|
|
1243
1246
|
}
|
|
1244
1247
|
},
|
|
1245
1248
|
[
|
|
1246
|
-
|
|
1249
|
+
y({
|
|
1247
1250
|
key: "divider-block-shortcuts",
|
|
1248
1251
|
inputRules: [
|
|
1249
1252
|
{
|
|
@@ -1255,10 +1258,10 @@ const jt = () => ({
|
|
|
1255
1258
|
]
|
|
1256
1259
|
})
|
|
1257
1260
|
]
|
|
1258
|
-
),
|
|
1261
|
+
), me = (e) => ({ url: e.src || void 0 }), Zt = () => ({
|
|
1259
1262
|
type: "file",
|
|
1260
1263
|
propSchema: {
|
|
1261
|
-
backgroundColor:
|
|
1264
|
+
backgroundColor: m.backgroundColor,
|
|
1262
1265
|
// File name.
|
|
1263
1266
|
name: {
|
|
1264
1267
|
default: ""
|
|
@@ -1273,13 +1276,13 @@ const jt = () => ({
|
|
|
1273
1276
|
}
|
|
1274
1277
|
},
|
|
1275
1278
|
content: "none"
|
|
1276
|
-
}),
|
|
1279
|
+
}), Xt = () => (e) => {
|
|
1277
1280
|
if (e.tagName === "EMBED") {
|
|
1278
1281
|
if (e.closest("figure"))
|
|
1279
1282
|
return;
|
|
1280
|
-
const { backgroundColor: t } =
|
|
1283
|
+
const { backgroundColor: t } = C(e);
|
|
1281
1284
|
return {
|
|
1282
|
-
...
|
|
1285
|
+
...me(e),
|
|
1283
1286
|
backgroundColor: t
|
|
1284
1287
|
};
|
|
1285
1288
|
}
|
|
@@ -1287,20 +1290,20 @@ const jt = () => ({
|
|
|
1287
1290
|
const t = $(e, "embed");
|
|
1288
1291
|
if (!t)
|
|
1289
1292
|
return;
|
|
1290
|
-
const { targetElement: n, caption: o } = t, { backgroundColor: r } =
|
|
1293
|
+
const { targetElement: n, caption: o } = t, { backgroundColor: r } = C(e);
|
|
1291
1294
|
return {
|
|
1292
|
-
...
|
|
1295
|
+
...me(n),
|
|
1293
1296
|
backgroundColor: r,
|
|
1294
1297
|
caption: o
|
|
1295
1298
|
};
|
|
1296
1299
|
}
|
|
1297
|
-
},
|
|
1300
|
+
}, Kt = v(Zt, {
|
|
1298
1301
|
meta: {
|
|
1299
1302
|
fileBlockAccept: ["*/*"]
|
|
1300
1303
|
},
|
|
1301
|
-
parse:
|
|
1304
|
+
parse: Xt(),
|
|
1302
1305
|
render(e, t) {
|
|
1303
|
-
return
|
|
1306
|
+
return J(e, t);
|
|
1304
1307
|
},
|
|
1305
1308
|
toExternalHTML(e) {
|
|
1306
1309
|
if (!e.props.url) {
|
|
@@ -1314,13 +1317,39 @@ const jt = () => ({
|
|
|
1314
1317
|
dom: t
|
|
1315
1318
|
};
|
|
1316
1319
|
}
|
|
1317
|
-
})
|
|
1320
|
+
});
|
|
1321
|
+
function Ae(e, t, n) {
|
|
1322
|
+
var u;
|
|
1323
|
+
const o = K.fromSchema(t), r = e.querySelector(":scope > summary");
|
|
1324
|
+
let a;
|
|
1325
|
+
if (r) {
|
|
1326
|
+
const d = r.cloneNode(!0);
|
|
1327
|
+
we(d), a = o.parse(d, {
|
|
1328
|
+
topNode: t.nodes.paragraph.create(),
|
|
1329
|
+
preserveWhitespace: !0
|
|
1330
|
+
}).content;
|
|
1331
|
+
} else
|
|
1332
|
+
a = _.empty;
|
|
1333
|
+
const s = document.createElement("div");
|
|
1334
|
+
s.setAttribute("data-node-type", "blockGroup");
|
|
1335
|
+
let i = !1;
|
|
1336
|
+
for (const d of Array.from(e.childNodes))
|
|
1337
|
+
d.tagName !== "SUMMARY" && (d.nodeType === 3 && !((u = d.textContent) != null && u.trim()) || (i = !0, s.appendChild(d.cloneNode(!0))));
|
|
1338
|
+
const c = t.nodes[n].create({}, a);
|
|
1339
|
+
if (!i)
|
|
1340
|
+
return c.content;
|
|
1341
|
+
const l = o.parse(s, {
|
|
1342
|
+
topNode: t.nodes.blockGroup.create()
|
|
1343
|
+
});
|
|
1344
|
+
return l.content.size > 0 ? c.content.addToEnd(l) : c.content;
|
|
1345
|
+
}
|
|
1346
|
+
const Qt = {
|
|
1318
1347
|
set: (e, t) => window.localStorage.setItem(
|
|
1319
1348
|
`toggle-${e.id}`,
|
|
1320
1349
|
t ? "true" : "false"
|
|
1321
1350
|
),
|
|
1322
1351
|
get: (e) => window.localStorage.getItem(`toggle-${e.id}`) === "true"
|
|
1323
|
-
},
|
|
1352
|
+
}, Ne = (e, t, n, o = Qt) => {
|
|
1324
1353
|
if ("isToggleable" in e.props && !e.props.isToggleable)
|
|
1325
1354
|
return {
|
|
1326
1355
|
dom: n
|
|
@@ -1355,7 +1384,7 @@ const jt = () => ({
|
|
|
1355
1384
|
};
|
|
1356
1385
|
l.addEventListener("click", d), r.appendChild(a);
|
|
1357
1386
|
let p = e.children.length;
|
|
1358
|
-
const
|
|
1387
|
+
const h = t.onChange(() => {
|
|
1359
1388
|
var E;
|
|
1360
1389
|
const f = ((E = t.getBlock(e)) == null ? void 0 : E.children.length) ?? 0;
|
|
1361
1390
|
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;
|
|
@@ -1374,34 +1403,45 @@ const jt = () => ({
|
|
|
1374
1403
|
), l.removeEventListener(
|
|
1375
1404
|
"click",
|
|
1376
1405
|
d
|
|
1377
|
-
),
|
|
1406
|
+
), h == null || h();
|
|
1378
1407
|
}
|
|
1379
1408
|
};
|
|
1380
|
-
},
|
|
1409
|
+
}, Pe = [1, 2, 3, 4, 5, 6], Jt = (e) => ({ editor: t }) => {
|
|
1381
1410
|
const n = t.getTextCursorPosition();
|
|
1382
1411
|
return t.schema.blockSchema[n.block.type].content !== "inline" ? !1 : (t.updateBlock(n.block, {
|
|
1383
1412
|
type: "heading",
|
|
1384
1413
|
props: { level: e }
|
|
1385
1414
|
}), !0);
|
|
1386
|
-
},
|
|
1415
|
+
}, Yt = ({
|
|
1387
1416
|
defaultLevel: e = 1,
|
|
1388
|
-
levels: t =
|
|
1417
|
+
levels: t = Pe,
|
|
1389
1418
|
allowToggleHeadings: n = !0
|
|
1390
1419
|
} = {}) => ({
|
|
1391
1420
|
type: "heading",
|
|
1392
1421
|
propSchema: {
|
|
1393
|
-
...
|
|
1422
|
+
...m,
|
|
1394
1423
|
level: { default: e, values: t },
|
|
1395
1424
|
...n ? { isToggleable: { default: !1, optional: !0 } } : {}
|
|
1396
1425
|
},
|
|
1397
1426
|
content: "inline"
|
|
1398
|
-
}),
|
|
1399
|
-
|
|
1427
|
+
}), en = v(
|
|
1428
|
+
Yt,
|
|
1400
1429
|
({ allowToggleHeadings: e = !0 } = {}) => ({
|
|
1401
1430
|
meta: {
|
|
1402
1431
|
isolating: !1
|
|
1403
1432
|
},
|
|
1404
1433
|
parse(t) {
|
|
1434
|
+
if (e && t.tagName === "DETAILS") {
|
|
1435
|
+
const o = t.querySelector(":scope > summary");
|
|
1436
|
+
if (!o)
|
|
1437
|
+
return;
|
|
1438
|
+
const r = o.querySelector("h1, h2, h3, h4, h5, h6");
|
|
1439
|
+
return r ? {
|
|
1440
|
+
...C(r),
|
|
1441
|
+
level: parseInt(r.tagName[1]),
|
|
1442
|
+
isToggleable: !0
|
|
1443
|
+
} : void 0;
|
|
1444
|
+
}
|
|
1405
1445
|
let n;
|
|
1406
1446
|
switch (t.tagName) {
|
|
1407
1447
|
case "H1":
|
|
@@ -1426,32 +1466,49 @@ const jt = () => ({
|
|
|
1426
1466
|
return;
|
|
1427
1467
|
}
|
|
1428
1468
|
return {
|
|
1429
|
-
...
|
|
1469
|
+
...C(t),
|
|
1430
1470
|
level: n
|
|
1431
1471
|
};
|
|
1432
1472
|
},
|
|
1473
|
+
...e ? {
|
|
1474
|
+
parseContent: ({ el: t, schema: n }) => {
|
|
1475
|
+
if (t.tagName === "DETAILS")
|
|
1476
|
+
return Ae(t, n, "heading");
|
|
1477
|
+
}
|
|
1478
|
+
} : {},
|
|
1479
|
+
runsBefore: ["toggleListItem"],
|
|
1433
1480
|
render(t, n) {
|
|
1434
1481
|
const o = document.createElement(`h${t.props.level}`);
|
|
1435
|
-
return e ? { ...
|
|
1482
|
+
return e ? { ...Ne(t, n, o), contentDOM: o } : {
|
|
1436
1483
|
dom: o,
|
|
1437
1484
|
contentDOM: o
|
|
1438
1485
|
};
|
|
1439
1486
|
},
|
|
1440
1487
|
toExternalHTML(t) {
|
|
1441
1488
|
const n = document.createElement(`h${t.props.level}`);
|
|
1442
|
-
|
|
1489
|
+
if (A(t.props, n), e && t.props.isToggleable) {
|
|
1490
|
+
const o = document.createElement("details");
|
|
1491
|
+
o.setAttribute("open", "");
|
|
1492
|
+
const r = document.createElement("summary");
|
|
1493
|
+
return r.appendChild(n), o.appendChild(r), {
|
|
1494
|
+
dom: o,
|
|
1495
|
+
contentDOM: n,
|
|
1496
|
+
childrenDOM: o
|
|
1497
|
+
};
|
|
1498
|
+
}
|
|
1499
|
+
return {
|
|
1443
1500
|
dom: n,
|
|
1444
1501
|
contentDOM: n
|
|
1445
1502
|
};
|
|
1446
1503
|
}
|
|
1447
1504
|
}),
|
|
1448
|
-
({ levels: e =
|
|
1449
|
-
|
|
1505
|
+
({ levels: e = Pe } = {}) => [
|
|
1506
|
+
y({
|
|
1450
1507
|
key: "heading-shortcuts",
|
|
1451
1508
|
keyboardShortcuts: Object.fromEntries(
|
|
1452
1509
|
e.map((t) => [
|
|
1453
1510
|
`Mod-Alt-${t}`,
|
|
1454
|
-
|
|
1511
|
+
Jt(t)
|
|
1455
1512
|
]) ?? []
|
|
1456
1513
|
),
|
|
1457
1514
|
inputRules: e.map((t) => ({
|
|
@@ -1467,8 +1524,8 @@ const jt = () => ({
|
|
|
1467
1524
|
}))
|
|
1468
1525
|
})
|
|
1469
1526
|
]
|
|
1470
|
-
),
|
|
1471
|
-
const { dom: a, destroy: s } =
|
|
1527
|
+
), Ie = (e, t, n, o, r) => {
|
|
1528
|
+
const { dom: a, destroy: s } = J(
|
|
1472
1529
|
e,
|
|
1473
1530
|
t,
|
|
1474
1531
|
n,
|
|
@@ -1482,17 +1539,17 @@ const jt = () => ({
|
|
|
1482
1539
|
const u = document.createElement("div");
|
|
1483
1540
|
u.style.position = "absolute", u.style.height = "100%", u.style.width = "100%";
|
|
1484
1541
|
let d, p = e.props.previewWidth;
|
|
1485
|
-
const
|
|
1486
|
-
var
|
|
1542
|
+
const h = (g) => {
|
|
1543
|
+
var te, ne;
|
|
1487
1544
|
if (!d) {
|
|
1488
1545
|
!t.isEditable && o.contains(c) && o.contains(l) && (o.removeChild(c), o.removeChild(l));
|
|
1489
1546
|
return;
|
|
1490
1547
|
}
|
|
1491
|
-
let
|
|
1492
|
-
const
|
|
1493
|
-
e.props.textAlignment === "center" ? d.handleUsed === "left" ?
|
|
1494
|
-
Math.max(
|
|
1495
|
-
((
|
|
1548
|
+
let M;
|
|
1549
|
+
const V = "touches" in g ? g.touches[0].clientX : g.clientX;
|
|
1550
|
+
e.props.textAlignment === "center" ? d.handleUsed === "left" ? M = d.initialWidth + (d.initialClientX - V) * 2 : M = d.initialWidth + (V - d.initialClientX) * 2 : d.handleUsed === "left" ? M = d.initialWidth + d.initialClientX - V : M = d.initialWidth + V - d.initialClientX, p = Math.min(
|
|
1551
|
+
Math.max(M, 64),
|
|
1552
|
+
((ne = (te = t.domElement) == null ? void 0 : te.firstElementChild) == null ? void 0 : ne.clientWidth) || Number.MAX_VALUE
|
|
1496
1553
|
), i.style.width = `${p}px`;
|
|
1497
1554
|
}, f = (g) => {
|
|
1498
1555
|
(!g.target || !i.contains(g.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, {
|
|
@@ -1506,22 +1563,22 @@ const jt = () => ({
|
|
|
1506
1563
|
g.relatedTarget === c || g.relatedTarget === l || d || t.isEditable && o.contains(c) && o.contains(l) && (o.removeChild(c), o.removeChild(l));
|
|
1507
1564
|
}, S = (g) => {
|
|
1508
1565
|
g.preventDefault(), i.contains(u) || i.appendChild(u);
|
|
1509
|
-
const
|
|
1566
|
+
const M = "touches" in g ? g.touches[0].clientX : g.clientX;
|
|
1510
1567
|
d = {
|
|
1511
1568
|
handleUsed: "left",
|
|
1512
1569
|
initialWidth: i.clientWidth,
|
|
1513
|
-
initialClientX:
|
|
1570
|
+
initialClientX: M
|
|
1514
1571
|
};
|
|
1515
|
-
},
|
|
1572
|
+
}, N = (g) => {
|
|
1516
1573
|
g.preventDefault(), i.contains(u) || i.appendChild(u);
|
|
1517
|
-
const
|
|
1574
|
+
const M = "touches" in g ? g.touches[0].clientX : g.clientX;
|
|
1518
1575
|
d = {
|
|
1519
1576
|
handleUsed: "right",
|
|
1520
1577
|
initialWidth: i.clientWidth,
|
|
1521
|
-
initialClientX:
|
|
1578
|
+
initialClientX: M
|
|
1522
1579
|
};
|
|
1523
1580
|
};
|
|
1524
|
-
return window.addEventListener("mousemove",
|
|
1581
|
+
return window.addEventListener("mousemove", h), window.addEventListener("touchmove", h), window.addEventListener("mouseup", f), window.addEventListener("touchend", f), i.addEventListener("mouseenter", E), i.addEventListener("mouseleave", x), c.addEventListener(
|
|
1525
1582
|
"mousedown",
|
|
1526
1583
|
S
|
|
1527
1584
|
), c.addEventListener(
|
|
@@ -1529,14 +1586,14 @@ const jt = () => ({
|
|
|
1529
1586
|
S
|
|
1530
1587
|
), l.addEventListener(
|
|
1531
1588
|
"mousedown",
|
|
1532
|
-
|
|
1589
|
+
N
|
|
1533
1590
|
), l.addEventListener(
|
|
1534
1591
|
"touchstart",
|
|
1535
|
-
|
|
1592
|
+
N
|
|
1536
1593
|
), {
|
|
1537
1594
|
dom: i,
|
|
1538
1595
|
destroy: () => {
|
|
1539
|
-
s == null || s(), window.removeEventListener("mousemove",
|
|
1596
|
+
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", x), c.removeEventListener(
|
|
1540
1597
|
"mousedown",
|
|
1541
1598
|
S
|
|
1542
1599
|
), c.removeEventListener(
|
|
@@ -1544,21 +1601,21 @@ const jt = () => ({
|
|
|
1544
1601
|
S
|
|
1545
1602
|
), l.removeEventListener(
|
|
1546
1603
|
"mousedown",
|
|
1547
|
-
|
|
1604
|
+
N
|
|
1548
1605
|
), l.removeEventListener(
|
|
1549
1606
|
"touchstart",
|
|
1550
|
-
|
|
1607
|
+
N
|
|
1551
1608
|
);
|
|
1552
1609
|
}
|
|
1553
1610
|
};
|
|
1554
1611
|
}, he = (e) => {
|
|
1555
1612
|
const t = e.src || void 0, n = e.width || void 0, o = e.alt || void 0;
|
|
1556
1613
|
return { url: t, previewWidth: n, name: o };
|
|
1557
|
-
},
|
|
1614
|
+
}, tn = '<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>', nn = (e = {}) => ({
|
|
1558
1615
|
type: "image",
|
|
1559
1616
|
propSchema: {
|
|
1560
|
-
textAlignment:
|
|
1561
|
-
backgroundColor:
|
|
1617
|
+
textAlignment: m.textAlignment,
|
|
1618
|
+
backgroundColor: m.backgroundColor,
|
|
1562
1619
|
// File name.
|
|
1563
1620
|
name: {
|
|
1564
1621
|
default: ""
|
|
@@ -1581,11 +1638,11 @@ const jt = () => ({
|
|
|
1581
1638
|
}
|
|
1582
1639
|
},
|
|
1583
1640
|
content: "none"
|
|
1584
|
-
}),
|
|
1641
|
+
}), on = (e = {}) => (t) => {
|
|
1585
1642
|
if (t.tagName === "IMG") {
|
|
1586
1643
|
if (t.closest("figure"))
|
|
1587
1644
|
return;
|
|
1588
|
-
const { backgroundColor: n } =
|
|
1645
|
+
const { backgroundColor: n } = C(t);
|
|
1589
1646
|
return {
|
|
1590
1647
|
...he(t),
|
|
1591
1648
|
backgroundColor: n
|
|
@@ -1595,29 +1652,29 @@ const jt = () => ({
|
|
|
1595
1652
|
const n = $(t, "img");
|
|
1596
1653
|
if (!n)
|
|
1597
1654
|
return;
|
|
1598
|
-
const { targetElement: o, caption: r } = n, { backgroundColor: a } =
|
|
1655
|
+
const { targetElement: o, caption: r } = n, { backgroundColor: a } = C(t);
|
|
1599
1656
|
return {
|
|
1600
1657
|
...he(o),
|
|
1601
1658
|
backgroundColor: a,
|
|
1602
1659
|
caption: r
|
|
1603
1660
|
};
|
|
1604
1661
|
}
|
|
1605
|
-
},
|
|
1662
|
+
}, rn = (e = {}) => (t, n) => {
|
|
1606
1663
|
const o = document.createElement("div");
|
|
1607
|
-
o.innerHTML = e.icon ??
|
|
1664
|
+
o.innerHTML = e.icon ?? tn;
|
|
1608
1665
|
const r = document.createElement("div");
|
|
1609
1666
|
r.className = "bn-visual-media-wrapper";
|
|
1610
1667
|
const a = document.createElement("img");
|
|
1611
1668
|
return a.className = "bn-visual-media", n.resolveFileUrl ? n.resolveFileUrl(t.props.url).then((s) => {
|
|
1612
1669
|
a.src = s;
|
|
1613
|
-
}) : a.src = t.props.url, a.alt = t.props.name || t.props.caption || "BlockNote image", a.contentEditable = "false", a.draggable = !1, r.appendChild(a),
|
|
1670
|
+
}) : a.src = t.props.url, a.alt = t.props.name || t.props.caption || "BlockNote image", a.contentEditable = "false", a.draggable = !1, r.appendChild(a), Ie(
|
|
1614
1671
|
t,
|
|
1615
1672
|
n,
|
|
1616
1673
|
{ dom: r },
|
|
1617
1674
|
r,
|
|
1618
1675
|
o.firstElementChild
|
|
1619
1676
|
);
|
|
1620
|
-
},
|
|
1677
|
+
}, an = (e = {}) => (t, n) => {
|
|
1621
1678
|
if (!t.props.url) {
|
|
1622
1679
|
const r = document.createElement("p");
|
|
1623
1680
|
return r.textContent = "Add image", {
|
|
@@ -1625,25 +1682,25 @@ const jt = () => ({
|
|
|
1625
1682
|
};
|
|
1626
1683
|
}
|
|
1627
1684
|
let o;
|
|
1628
|
-
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 ?
|
|
1685
|
+
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 ? Y(o, t.props.caption) : U(o, t.props.caption) : {
|
|
1629
1686
|
dom: o
|
|
1630
1687
|
};
|
|
1631
|
-
},
|
|
1632
|
-
|
|
1688
|
+
}, sn = v(
|
|
1689
|
+
nn,
|
|
1633
1690
|
(e) => ({
|
|
1634
1691
|
meta: {
|
|
1635
1692
|
fileBlockAccept: ["image/*"]
|
|
1636
1693
|
},
|
|
1637
|
-
parse:
|
|
1638
|
-
render:
|
|
1639
|
-
toExternalHTML:
|
|
1694
|
+
parse: on(e),
|
|
1695
|
+
render: rn(e),
|
|
1696
|
+
toExternalHTML: an(e),
|
|
1640
1697
|
runsBefore: ["file"]
|
|
1641
1698
|
})
|
|
1642
1699
|
), wo = (e, t, n) => ({
|
|
1643
1700
|
state: o,
|
|
1644
1701
|
dispatch: r
|
|
1645
|
-
}) => r ?
|
|
1646
|
-
const r =
|
|
1702
|
+
}) => r ? He(o.tr, e, t, n) : !0, He = (e, t, n, o) => {
|
|
1703
|
+
const r = ot(e.doc, t), a = G(r);
|
|
1647
1704
|
if (!a.isBlockContainer)
|
|
1648
1705
|
return !1;
|
|
1649
1706
|
const s = O(e), i = [
|
|
@@ -1660,22 +1717,22 @@ const jt = () => ({
|
|
|
1660
1717
|
return e.split(t, 2, i), !0;
|
|
1661
1718
|
}, q = (e, t) => {
|
|
1662
1719
|
const { blockInfo: n, selectionEmpty: o } = e.transact((s) => ({
|
|
1663
|
-
blockInfo:
|
|
1720
|
+
blockInfo: rt(s),
|
|
1664
1721
|
selectionEmpty: s.selection.anchor === s.selection.head
|
|
1665
1722
|
}));
|
|
1666
1723
|
if (!n.isBlockContainer)
|
|
1667
1724
|
return !1;
|
|
1668
1725
|
const { bnBlock: r, blockContent: a } = n;
|
|
1669
1726
|
return a.node.type.name !== t || !o ? !1 : a.node.childCount === 0 ? (e.transact((s) => {
|
|
1670
|
-
|
|
1727
|
+
Q(s, r.beforePos, {
|
|
1671
1728
|
type: "paragraph",
|
|
1672
1729
|
props: {}
|
|
1673
1730
|
});
|
|
1674
|
-
}), !0) : a.node.childCount > 0 ? e.transact((s) => (s.deleteSelection(),
|
|
1731
|
+
}), !0) : a.node.childCount > 0 ? e.transact((s) => (s.deleteSelection(), He(s, s.selection.from, !0))) : !1;
|
|
1675
1732
|
};
|
|
1676
|
-
function
|
|
1677
|
-
var d, p,
|
|
1678
|
-
const o =
|
|
1733
|
+
function ee(e, t, n) {
|
|
1734
|
+
var d, p, h;
|
|
1735
|
+
const o = K.fromSchema(t), r = e, a = document.createElement("div");
|
|
1679
1736
|
a.setAttribute("data-node-type", "blockGroup");
|
|
1680
1737
|
for (const f of Array.from(r.childNodes))
|
|
1681
1738
|
a.appendChild(f.cloneNode(!0));
|
|
@@ -1687,9 +1744,9 @@ function Y(e, t, n) {
|
|
|
1687
1744
|
s.firstChild.firstChild.nodeSize + 2
|
|
1688
1745
|
)
|
|
1689
1746
|
));
|
|
1690
|
-
const i = (
|
|
1747
|
+
const i = (h = s.firstChild) == null ? void 0 : h.firstChild;
|
|
1691
1748
|
if (!(i != null && i.isTextblock))
|
|
1692
|
-
return
|
|
1749
|
+
return _.from(s);
|
|
1693
1750
|
const c = t.nodes[n].create(
|
|
1694
1751
|
{},
|
|
1695
1752
|
i.content
|
|
@@ -1703,14 +1760,14 @@ function Y(e, t, n) {
|
|
|
1703
1760
|
}
|
|
1704
1761
|
return c.content;
|
|
1705
1762
|
}
|
|
1706
|
-
const
|
|
1763
|
+
const cn = () => ({
|
|
1707
1764
|
type: "bulletListItem",
|
|
1708
1765
|
propSchema: {
|
|
1709
|
-
...
|
|
1766
|
+
...m
|
|
1710
1767
|
},
|
|
1711
1768
|
content: "inline"
|
|
1712
|
-
}),
|
|
1713
|
-
|
|
1769
|
+
}), ln = v(
|
|
1770
|
+
cn,
|
|
1714
1771
|
{
|
|
1715
1772
|
meta: {
|
|
1716
1773
|
isolating: !1
|
|
@@ -1721,11 +1778,11 @@ const sn = () => ({
|
|
|
1721
1778
|
return;
|
|
1722
1779
|
const t = e.parentElement;
|
|
1723
1780
|
if (t !== null && (t.tagName === "UL" || t.tagName === "DIV" && ((n = t.parentElement) == null ? void 0 : n.tagName) === "UL"))
|
|
1724
|
-
return
|
|
1781
|
+
return C(e);
|
|
1725
1782
|
},
|
|
1726
1783
|
// As `li` elements can contain multiple paragraphs, we need to merge their contents
|
|
1727
1784
|
// into a single one so that ProseMirror can parse everything correctly.
|
|
1728
|
-
parseContent: ({ el: e, schema: t }) =>
|
|
1785
|
+
parseContent: ({ el: e, schema: t }) => ee(e, t, "bulletListItem"),
|
|
1729
1786
|
render() {
|
|
1730
1787
|
const e = document.createElement("p");
|
|
1731
1788
|
return {
|
|
@@ -1742,7 +1799,7 @@ const sn = () => ({
|
|
|
1742
1799
|
}
|
|
1743
1800
|
},
|
|
1744
1801
|
[
|
|
1745
|
-
|
|
1802
|
+
y({
|
|
1746
1803
|
key: "bullet-list-item-shortcuts",
|
|
1747
1804
|
keyboardShortcuts: {
|
|
1748
1805
|
Enter: ({ editor: e }) => q(e, "bulletListItem"),
|
|
@@ -1758,7 +1815,7 @@ const sn = () => ({
|
|
|
1758
1815
|
{
|
|
1759
1816
|
find: /^\s?[-+*]\s$/,
|
|
1760
1817
|
replace({ editor: e }) {
|
|
1761
|
-
if (
|
|
1818
|
+
if (Se(
|
|
1762
1819
|
e.prosemirrorState
|
|
1763
1820
|
).blockNoteType !== "heading")
|
|
1764
1821
|
return {
|
|
@@ -1770,15 +1827,15 @@ const sn = () => ({
|
|
|
1770
1827
|
]
|
|
1771
1828
|
})
|
|
1772
1829
|
]
|
|
1773
|
-
),
|
|
1830
|
+
), dn = () => ({
|
|
1774
1831
|
type: "checkListItem",
|
|
1775
1832
|
propSchema: {
|
|
1776
|
-
...
|
|
1833
|
+
...m,
|
|
1777
1834
|
checked: { default: !1, type: "boolean" }
|
|
1778
1835
|
},
|
|
1779
1836
|
content: "inline"
|
|
1780
|
-
}),
|
|
1781
|
-
|
|
1837
|
+
}), un = v(
|
|
1838
|
+
dn,
|
|
1782
1839
|
{
|
|
1783
1840
|
meta: {
|
|
1784
1841
|
isolating: !1
|
|
@@ -1792,12 +1849,12 @@ const sn = () => ({
|
|
|
1792
1849
|
const t = e.parentElement;
|
|
1793
1850
|
if (t !== null && (t.tagName === "UL" || t.tagName === "DIV" && ((n = t.parentElement) == null ? void 0 : n.tagName) === "UL")) {
|
|
1794
1851
|
const o = e.querySelector("input[type=checkbox]") || null;
|
|
1795
|
-
return o === null ? void 0 : { ...
|
|
1852
|
+
return o === null ? void 0 : { ...C(e), checked: o.checked };
|
|
1796
1853
|
}
|
|
1797
1854
|
},
|
|
1798
1855
|
// As `li` elements can contain multiple paragraphs, we need to merge their contents
|
|
1799
1856
|
// into a single one so that ProseMirror can parse everything correctly.
|
|
1800
|
-
parseContent: ({ el: e, schema: t }) =>
|
|
1857
|
+
parseContent: ({ el: e, schema: t }) => ee(e, t, "checkListItem"),
|
|
1801
1858
|
render(e, t) {
|
|
1802
1859
|
const n = document.createDocumentFragment(), o = document.createElement("input");
|
|
1803
1860
|
o.type = "checkbox", o.checked = e.props.checked, e.props.checked && o.setAttribute("checked", ""), o.disabled = !t.isEditable, o.addEventListener("change", () => {
|
|
@@ -1821,7 +1878,7 @@ const sn = () => ({
|
|
|
1821
1878
|
runsBefore: ["bulletListItem"]
|
|
1822
1879
|
},
|
|
1823
1880
|
[
|
|
1824
|
-
|
|
1881
|
+
y({
|
|
1825
1882
|
key: "check-list-item-shortcuts",
|
|
1826
1883
|
keyboardShortcuts: {
|
|
1827
1884
|
Enter: ({ editor: e }) => q(e, "checkListItem"),
|
|
@@ -1860,7 +1917,7 @@ const sn = () => ({
|
|
|
1860
1917
|
})
|
|
1861
1918
|
]
|
|
1862
1919
|
);
|
|
1863
|
-
function
|
|
1920
|
+
function De(e, t, n, o) {
|
|
1864
1921
|
let r = e.firstChild.attrs.start || 1, a = !0;
|
|
1865
1922
|
const s = !!e.firstChild.attrs.start, i = G({
|
|
1866
1923
|
posBeforeNode: t,
|
|
@@ -1872,21 +1929,21 @@ function He(e, t, n, o) {
|
|
|
1872
1929
|
return l !== void 0 ? (r = l + 1, a = !1) : c && G({
|
|
1873
1930
|
posBeforeNode: i.bnBlock.beforePos - c.nodeSize,
|
|
1874
1931
|
node: c
|
|
1875
|
-
}).blockNoteType === "numberedListItem" && (r =
|
|
1932
|
+
}).blockNoteType === "numberedListItem" && (r = De(
|
|
1876
1933
|
c,
|
|
1877
1934
|
i.bnBlock.beforePos - c.nodeSize,
|
|
1878
1935
|
n,
|
|
1879
1936
|
o
|
|
1880
1937
|
).index + 1, a = !1), o.set(e, r), { index: r, isFirst: a, hasStart: s };
|
|
1881
1938
|
}
|
|
1882
|
-
function
|
|
1939
|
+
function ge(e, t) {
|
|
1883
1940
|
const n = /* @__PURE__ */ new Map(), o = t.decorations.map(
|
|
1884
1941
|
e.mapping,
|
|
1885
1942
|
e.doc
|
|
1886
1943
|
), r = [];
|
|
1887
1944
|
e.doc.nodesBetween(0, e.doc.nodeSize - 2, (s, i) => {
|
|
1888
1945
|
if (s.type.name === "blockContainer" && s.firstChild.type.name === "numberedListItem") {
|
|
1889
|
-
const { index: c, isFirst: l, hasStart: u } =
|
|
1946
|
+
const { index: c, isFirst: l, hasStart: u } = De(
|
|
1890
1947
|
s,
|
|
1891
1948
|
i,
|
|
1892
1949
|
e,
|
|
@@ -1900,7 +1957,7 @@ function me(e, t) {
|
|
|
1900
1957
|
const p = e.doc.nodeAt(i + 1);
|
|
1901
1958
|
r.push(
|
|
1902
1959
|
// move in by 1 to account for the block container
|
|
1903
|
-
|
|
1960
|
+
gt.node(i + 1, i + 1 + p.nodeSize, {
|
|
1904
1961
|
"data-index": c.toString()
|
|
1905
1962
|
})
|
|
1906
1963
|
);
|
|
@@ -1914,33 +1971,33 @@ function me(e, t) {
|
|
|
1914
1971
|
decorations: o.remove(a).add(e.doc, r)
|
|
1915
1972
|
};
|
|
1916
1973
|
}
|
|
1917
|
-
const
|
|
1918
|
-
key: new
|
|
1974
|
+
const pn = () => new mt({
|
|
1975
|
+
key: new ht("numbered-list-indexing-decorations"),
|
|
1919
1976
|
state: {
|
|
1920
1977
|
init(e, t) {
|
|
1921
|
-
return
|
|
1922
|
-
decorations:
|
|
1978
|
+
return ge(t.tr, {
|
|
1979
|
+
decorations: le.empty
|
|
1923
1980
|
});
|
|
1924
1981
|
},
|
|
1925
1982
|
apply(e, t) {
|
|
1926
|
-
return !e.docChanged && !e.selectionSet && t.decorations ? t :
|
|
1983
|
+
return !e.docChanged && !e.selectionSet && t.decorations ? t : ge(e, t);
|
|
1927
1984
|
}
|
|
1928
1985
|
},
|
|
1929
1986
|
props: {
|
|
1930
1987
|
decorations(e) {
|
|
1931
1988
|
var t;
|
|
1932
|
-
return ((t = this.getState(e)) == null ? void 0 : t.decorations) ??
|
|
1989
|
+
return ((t = this.getState(e)) == null ? void 0 : t.decorations) ?? le.empty;
|
|
1933
1990
|
}
|
|
1934
1991
|
}
|
|
1935
|
-
}),
|
|
1992
|
+
}), fn = () => ({
|
|
1936
1993
|
type: "numberedListItem",
|
|
1937
1994
|
propSchema: {
|
|
1938
|
-
...
|
|
1995
|
+
...m,
|
|
1939
1996
|
start: { default: void 0, type: "number" }
|
|
1940
1997
|
},
|
|
1941
1998
|
content: "inline"
|
|
1942
|
-
}),
|
|
1943
|
-
|
|
1999
|
+
}), mn = v(
|
|
2000
|
+
fn,
|
|
1944
2001
|
{
|
|
1945
2002
|
meta: {
|
|
1946
2003
|
isolating: !1
|
|
@@ -1951,7 +2008,7 @@ const un = () => new pt({
|
|
|
1951
2008
|
return;
|
|
1952
2009
|
const t = e.parentElement;
|
|
1953
2010
|
if (t !== null && (t.tagName === "OL" || t.tagName === "DIV" && ((n = t.parentElement) == null ? void 0 : n.tagName) === "OL")) {
|
|
1954
|
-
const o = parseInt(t.getAttribute("start") || "1"), r =
|
|
2011
|
+
const o = parseInt(t.getAttribute("start") || "1"), r = C(e);
|
|
1955
2012
|
return e.previousElementSibling || o === 1 ? r : {
|
|
1956
2013
|
...r,
|
|
1957
2014
|
start: o
|
|
@@ -1960,7 +2017,7 @@ const un = () => new pt({
|
|
|
1960
2017
|
},
|
|
1961
2018
|
// As `li` elements can contain multiple paragraphs, we need to merge their contents
|
|
1962
2019
|
// into a single one so that ProseMirror can parse everything correctly.
|
|
1963
|
-
parseContent: ({ el: e, schema: t }) =>
|
|
2020
|
+
parseContent: ({ el: e, schema: t }) => ee(e, t, "numberedListItem"),
|
|
1964
2021
|
render() {
|
|
1965
2022
|
const e = document.createElement("p");
|
|
1966
2023
|
return {
|
|
@@ -1977,13 +2034,13 @@ const un = () => new pt({
|
|
|
1977
2034
|
}
|
|
1978
2035
|
},
|
|
1979
2036
|
[
|
|
1980
|
-
|
|
2037
|
+
y({
|
|
1981
2038
|
key: "numbered-list-item-shortcuts",
|
|
1982
2039
|
inputRules: [
|
|
1983
2040
|
{
|
|
1984
2041
|
find: /^\s?(\d+)\.\s$/,
|
|
1985
2042
|
replace({ match: e, editor: t }) {
|
|
1986
|
-
if (
|
|
2043
|
+
if (Se(
|
|
1987
2044
|
t.prosemirrorState
|
|
1988
2045
|
).blockNoteType === "heading")
|
|
1989
2046
|
return;
|
|
@@ -2007,39 +2064,63 @@ const un = () => new pt({
|
|
|
2007
2064
|
}), !0);
|
|
2008
2065
|
}
|
|
2009
2066
|
},
|
|
2010
|
-
prosemirrorPlugins: [
|
|
2067
|
+
prosemirrorPlugins: [pn()]
|
|
2011
2068
|
})
|
|
2012
2069
|
]
|
|
2013
2070
|
), hn = () => ({
|
|
2014
2071
|
type: "toggleListItem",
|
|
2015
2072
|
propSchema: {
|
|
2016
|
-
...
|
|
2073
|
+
...m
|
|
2017
2074
|
},
|
|
2018
2075
|
content: "inline"
|
|
2019
|
-
}),
|
|
2076
|
+
}), gn = v(
|
|
2020
2077
|
hn,
|
|
2021
2078
|
{
|
|
2022
2079
|
meta: {
|
|
2023
2080
|
isolating: !1
|
|
2024
2081
|
},
|
|
2082
|
+
parse(e) {
|
|
2083
|
+
var t;
|
|
2084
|
+
if (e.tagName === "DETAILS")
|
|
2085
|
+
return C(e);
|
|
2086
|
+
if (e.tagName === "LI") {
|
|
2087
|
+
const n = e.parentElement;
|
|
2088
|
+
if (n && (n.tagName === "UL" || n.tagName === "DIV" && ((t = n.parentElement) == null ? void 0 : t.tagName) === "UL") && e.querySelector(":scope > details"))
|
|
2089
|
+
return C(e);
|
|
2090
|
+
}
|
|
2091
|
+
},
|
|
2092
|
+
parseContent: ({ el: e, schema: t }) => {
|
|
2093
|
+
const n = e.tagName === "DETAILS" ? e : e.querySelector(":scope > details");
|
|
2094
|
+
if (!n)
|
|
2095
|
+
throw new Error("No details found in toggleListItem parseContent");
|
|
2096
|
+
return Ae(
|
|
2097
|
+
n,
|
|
2098
|
+
t,
|
|
2099
|
+
"toggleListItem"
|
|
2100
|
+
);
|
|
2101
|
+
},
|
|
2102
|
+
runsBefore: ["bulletListItem"],
|
|
2025
2103
|
render(e, t) {
|
|
2026
2104
|
const n = document.createElement("p");
|
|
2027
|
-
return { ...
|
|
2105
|
+
return { ...Ne(
|
|
2028
2106
|
e,
|
|
2029
2107
|
t,
|
|
2030
2108
|
n
|
|
2031
2109
|
), contentDOM: n };
|
|
2032
2110
|
},
|
|
2033
2111
|
toExternalHTML(e) {
|
|
2034
|
-
const t = document.createElement("li"), n = document.createElement("
|
|
2035
|
-
|
|
2112
|
+
const t = document.createElement("li"), n = document.createElement("details");
|
|
2113
|
+
n.setAttribute("open", "");
|
|
2114
|
+
const o = document.createElement("summary"), r = document.createElement("p");
|
|
2115
|
+
return o.appendChild(r), n.appendChild(o), A(e.props, t), t.appendChild(n), {
|
|
2036
2116
|
dom: t,
|
|
2037
|
-
contentDOM:
|
|
2117
|
+
contentDOM: r,
|
|
2118
|
+
childrenDOM: n
|
|
2038
2119
|
};
|
|
2039
2120
|
}
|
|
2040
2121
|
},
|
|
2041
2122
|
[
|
|
2042
|
-
|
|
2123
|
+
y({
|
|
2043
2124
|
key: "toggle-list-item-shortcuts",
|
|
2044
2125
|
keyboardShortcuts: {
|
|
2045
2126
|
Enter: ({ editor: e }) => q(e, "toggleListItem"),
|
|
@@ -2053,12 +2134,12 @@ const un = () => new pt({
|
|
|
2053
2134
|
}
|
|
2054
2135
|
})
|
|
2055
2136
|
]
|
|
2056
|
-
),
|
|
2137
|
+
), bn = () => ({
|
|
2057
2138
|
type: "paragraph",
|
|
2058
|
-
propSchema:
|
|
2139
|
+
propSchema: m,
|
|
2059
2140
|
content: "inline"
|
|
2060
|
-
}),
|
|
2061
|
-
|
|
2141
|
+
}), Cn = v(
|
|
2142
|
+
bn,
|
|
2062
2143
|
{
|
|
2063
2144
|
meta: {
|
|
2064
2145
|
isolating: !1
|
|
@@ -2066,7 +2147,7 @@ const un = () => new pt({
|
|
|
2066
2147
|
parse: (e) => {
|
|
2067
2148
|
var t;
|
|
2068
2149
|
if (e.tagName === "P" && (t = e.textContent) != null && t.trim())
|
|
2069
|
-
return
|
|
2150
|
+
return C(e);
|
|
2070
2151
|
},
|
|
2071
2152
|
render: () => {
|
|
2072
2153
|
const e = document.createElement("p");
|
|
@@ -2082,10 +2163,10 @@ const un = () => new pt({
|
|
|
2082
2163
|
contentDOM: t
|
|
2083
2164
|
};
|
|
2084
2165
|
},
|
|
2085
|
-
runsBefore: ["default"]
|
|
2166
|
+
runsBefore: ["default", "heading"]
|
|
2086
2167
|
},
|
|
2087
2168
|
[
|
|
2088
|
-
|
|
2169
|
+
y({
|
|
2089
2170
|
key: "paragraph-shortcuts",
|
|
2090
2171
|
keyboardShortcuts: {
|
|
2091
2172
|
"Mod-Alt-0": ({ editor: e }) => {
|
|
@@ -2098,22 +2179,22 @@ const un = () => new pt({
|
|
|
2098
2179
|
}
|
|
2099
2180
|
})
|
|
2100
2181
|
]
|
|
2101
|
-
),
|
|
2182
|
+
), kn = () => ({
|
|
2102
2183
|
type: "quote",
|
|
2103
2184
|
propSchema: {
|
|
2104
|
-
backgroundColor:
|
|
2105
|
-
textColor:
|
|
2185
|
+
backgroundColor: m.backgroundColor,
|
|
2186
|
+
textColor: m.textColor
|
|
2106
2187
|
},
|
|
2107
2188
|
content: "inline"
|
|
2108
|
-
}),
|
|
2109
|
-
|
|
2189
|
+
}), yn = v(
|
|
2190
|
+
kn,
|
|
2110
2191
|
{
|
|
2111
2192
|
meta: {
|
|
2112
2193
|
isolating: !1
|
|
2113
2194
|
},
|
|
2114
2195
|
parse(e) {
|
|
2115
2196
|
if (e.tagName === "BLOCKQUOTE") {
|
|
2116
|
-
const { backgroundColor: t, textColor: n } =
|
|
2197
|
+
const { backgroundColor: t, textColor: n } = C(e);
|
|
2117
2198
|
return { backgroundColor: t, textColor: n };
|
|
2118
2199
|
}
|
|
2119
2200
|
},
|
|
@@ -2133,7 +2214,7 @@ const un = () => new pt({
|
|
|
2133
2214
|
}
|
|
2134
2215
|
},
|
|
2135
2216
|
[
|
|
2136
|
-
|
|
2217
|
+
y({
|
|
2137
2218
|
key: "quote-block-shortcuts",
|
|
2138
2219
|
keyboardShortcuts: {
|
|
2139
2220
|
"Mod-Alt-q": ({ editor: e }) => {
|
|
@@ -2157,18 +2238,18 @@ const un = () => new pt({
|
|
|
2157
2238
|
]
|
|
2158
2239
|
})
|
|
2159
2240
|
]
|
|
2160
|
-
), vn = 35,
|
|
2241
|
+
), vn = 35, Oe = 120, Lo = 31, En = qe.create({
|
|
2161
2242
|
name: "BlockNoteTableExtension",
|
|
2162
2243
|
addProseMirrorPlugins: () => [
|
|
2163
|
-
|
|
2244
|
+
Re({
|
|
2164
2245
|
cellMinWidth: vn,
|
|
2165
|
-
defaultCellMinWidth:
|
|
2246
|
+
defaultCellMinWidth: Oe,
|
|
2166
2247
|
// We set this to null as we implement our own node view in the table
|
|
2167
2248
|
// block content. This node view is the same as what's used by default,
|
|
2168
2249
|
// but is wrapped in a `blockContent` HTML element.
|
|
2169
2250
|
View: null
|
|
2170
2251
|
}),
|
|
2171
|
-
|
|
2252
|
+
Fe()
|
|
2172
2253
|
],
|
|
2173
2254
|
addKeyboardShortcuts() {
|
|
2174
2255
|
return {
|
|
@@ -2182,10 +2263,10 @@ const un = () => new pt({
|
|
|
2182
2263
|
},
|
|
2183
2264
|
// Enables navigating cells using the tab key.
|
|
2184
2265
|
Tab: () => this.editor.commands.command(
|
|
2185
|
-
({ state: e, dispatch: t, view: n }) =>
|
|
2266
|
+
({ state: e, dispatch: t, view: n }) => oe(1)(e, t, n)
|
|
2186
2267
|
),
|
|
2187
2268
|
"Shift-Tab": () => this.editor.commands.command(
|
|
2188
|
-
({ state: e, dispatch: t, view: n }) =>
|
|
2269
|
+
({ state: e, dispatch: t, view: n }) => oe(-1)(e, t, n)
|
|
2189
2270
|
)
|
|
2190
2271
|
};
|
|
2191
2272
|
},
|
|
@@ -2196,14 +2277,14 @@ const un = () => new pt({
|
|
|
2196
2277
|
storage: e.storage
|
|
2197
2278
|
};
|
|
2198
2279
|
return {
|
|
2199
|
-
tableRole:
|
|
2200
|
-
|
|
2280
|
+
tableRole: je(
|
|
2281
|
+
Ge(e, "tableRole", t)
|
|
2201
2282
|
)
|
|
2202
2283
|
};
|
|
2203
2284
|
}
|
|
2204
|
-
}),
|
|
2205
|
-
textColor:
|
|
2206
|
-
},
|
|
2285
|
+
}), Sn = {
|
|
2286
|
+
textColor: m.textColor
|
|
2287
|
+
}, xn = P.create({
|
|
2207
2288
|
name: "tableHeader",
|
|
2208
2289
|
addOptions() {
|
|
2209
2290
|
return {
|
|
@@ -2243,18 +2324,18 @@ const un = () => new pt({
|
|
|
2243
2324
|
tag: "th",
|
|
2244
2325
|
// As `th` elements can contain multiple paragraphs, we need to merge their contents
|
|
2245
2326
|
// into a single one so that ProseMirror can parse everything correctly.
|
|
2246
|
-
getContent: (e, t) =>
|
|
2327
|
+
getContent: (e, t) => _e(e, t)
|
|
2247
2328
|
}
|
|
2248
2329
|
];
|
|
2249
2330
|
},
|
|
2250
2331
|
renderHTML({ HTMLAttributes: e }) {
|
|
2251
2332
|
return [
|
|
2252
2333
|
"th",
|
|
2253
|
-
|
|
2334
|
+
Z(this.options.HTMLAttributes, e),
|
|
2254
2335
|
0
|
|
2255
2336
|
];
|
|
2256
2337
|
}
|
|
2257
|
-
}),
|
|
2338
|
+
}), Mn = P.create({
|
|
2258
2339
|
name: "tableCell",
|
|
2259
2340
|
addOptions() {
|
|
2260
2341
|
return {
|
|
@@ -2287,18 +2368,18 @@ const un = () => new pt({
|
|
|
2287
2368
|
tag: "td",
|
|
2288
2369
|
// As `td` elements can contain multiple paragraphs, we need to merge their contents
|
|
2289
2370
|
// into a single one so that ProseMirror can parse everything correctly.
|
|
2290
|
-
getContent: (e, t) =>
|
|
2371
|
+
getContent: (e, t) => _e(e, t)
|
|
2291
2372
|
}
|
|
2292
2373
|
];
|
|
2293
2374
|
},
|
|
2294
2375
|
renderHTML({ HTMLAttributes: e }) {
|
|
2295
2376
|
return [
|
|
2296
2377
|
"td",
|
|
2297
|
-
|
|
2378
|
+
Z(this.options.HTMLAttributes, e),
|
|
2298
2379
|
0
|
|
2299
2380
|
];
|
|
2300
2381
|
}
|
|
2301
|
-
}), wn =
|
|
2382
|
+
}), wn = P.create({
|
|
2302
2383
|
name: "table",
|
|
2303
2384
|
content: "tableRow+",
|
|
2304
2385
|
group: "blockContent",
|
|
@@ -2314,7 +2395,7 @@ const un = () => new pt({
|
|
|
2314
2395
|
},
|
|
2315
2396
|
renderHTML({ node: e, HTMLAttributes: t }) {
|
|
2316
2397
|
var r, a, s;
|
|
2317
|
-
const n =
|
|
2398
|
+
const n = Ct(
|
|
2318
2399
|
this.name,
|
|
2319
2400
|
"table",
|
|
2320
2401
|
{
|
|
@@ -2343,7 +2424,7 @@ const un = () => new pt({
|
|
|
2343
2424
|
addNodeView() {
|
|
2344
2425
|
return ({ node: e, HTMLAttributes: t }) => {
|
|
2345
2426
|
var o;
|
|
2346
|
-
class n extends
|
|
2427
|
+
class n extends $e {
|
|
2347
2428
|
constructor(a, s, i) {
|
|
2348
2429
|
super(a, s), this.node = a, this.cellMinWidth = s, this.blockContentHTMLAttributes = i;
|
|
2349
2430
|
const c = document.createElement("div");
|
|
@@ -2351,10 +2432,10 @@ const un = () => new pt({
|
|
|
2351
2432
|
"bn-block-content",
|
|
2352
2433
|
i.class
|
|
2353
2434
|
), c.setAttribute("data-content-type", "table");
|
|
2354
|
-
for (const [p,
|
|
2435
|
+
for (const [p, h] of Object.entries(
|
|
2355
2436
|
i
|
|
2356
2437
|
))
|
|
2357
|
-
p !== "class" && c.setAttribute(p,
|
|
2438
|
+
p !== "class" && c.setAttribute(p, h);
|
|
2358
2439
|
const l = this.dom, u = document.createElement("div");
|
|
2359
2440
|
u.className = "tableWrapper-inner", u.appendChild(l.firstChild), l.appendChild(u), c.appendChild(l);
|
|
2360
2441
|
const d = document.createElement("div");
|
|
@@ -2364,13 +2445,13 @@ const un = () => new pt({
|
|
|
2364
2445
|
return !a.target.closest(".tableWrapper-inner") || super.ignoreMutation(a);
|
|
2365
2446
|
}
|
|
2366
2447
|
}
|
|
2367
|
-
return new n(e,
|
|
2448
|
+
return new n(e, Oe, {
|
|
2368
2449
|
...((o = this.options.domAttributes) == null ? void 0 : o.blockContent) || {},
|
|
2369
2450
|
...t
|
|
2370
2451
|
});
|
|
2371
2452
|
};
|
|
2372
2453
|
}
|
|
2373
|
-
}),
|
|
2454
|
+
}), Ln = P.create({
|
|
2374
2455
|
name: "tableParagraph",
|
|
2375
2456
|
group: "tableContent",
|
|
2376
2457
|
content: "inline*",
|
|
@@ -2391,7 +2472,7 @@ const un = () => new pt({
|
|
|
2391
2472
|
renderHTML({ HTMLAttributes: e }) {
|
|
2392
2473
|
return ["p", e, 0];
|
|
2393
2474
|
}
|
|
2394
|
-
}),
|
|
2475
|
+
}), Tn = P.create({
|
|
2395
2476
|
name: "tableRow",
|
|
2396
2477
|
addOptions() {
|
|
2397
2478
|
return {
|
|
@@ -2407,43 +2488,43 @@ const un = () => new pt({
|
|
|
2407
2488
|
renderHTML({ HTMLAttributes: e }) {
|
|
2408
2489
|
return [
|
|
2409
2490
|
"tr",
|
|
2410
|
-
|
|
2491
|
+
Z(this.options.HTMLAttributes, e),
|
|
2411
2492
|
0
|
|
2412
2493
|
];
|
|
2413
2494
|
}
|
|
2414
2495
|
});
|
|
2415
|
-
function
|
|
2416
|
-
const o =
|
|
2496
|
+
function _e(e, t) {
|
|
2497
|
+
const o = K.fromSchema(t).parse(e, {
|
|
2417
2498
|
topNode: t.nodes.blockGroup.create()
|
|
2418
2499
|
}), r = [];
|
|
2419
2500
|
return o.content.descendants((a) => {
|
|
2420
2501
|
if (a.isInline)
|
|
2421
2502
|
return r.push(a), !1;
|
|
2422
|
-
}),
|
|
2503
|
+
}), _.fromArray(r);
|
|
2423
2504
|
}
|
|
2424
|
-
const
|
|
2505
|
+
const Bn = () => vt(
|
|
2425
2506
|
{ node: wn, type: "table", content: "table" },
|
|
2426
|
-
|
|
2507
|
+
Sn,
|
|
2427
2508
|
[
|
|
2428
|
-
|
|
2509
|
+
y({
|
|
2429
2510
|
key: "table-extensions",
|
|
2430
2511
|
tiptapExtensions: [
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
Sn,
|
|
2512
|
+
En,
|
|
2513
|
+
Ln,
|
|
2434
2514
|
xn,
|
|
2435
|
-
|
|
2515
|
+
Mn,
|
|
2516
|
+
Tn
|
|
2436
2517
|
]
|
|
2437
2518
|
}),
|
|
2438
2519
|
// Extension for keyboard shortcut which deletes the table if it's empty
|
|
2439
2520
|
// and all cells are selected. Uses a separate extension as it needs
|
|
2440
2521
|
// priority over keyboard handlers in the `TableExtension`'s
|
|
2441
2522
|
// `tableEditing` plugin.
|
|
2442
|
-
|
|
2523
|
+
y({
|
|
2443
2524
|
key: "table-keyboard-delete",
|
|
2444
2525
|
keyboardShortcuts: {
|
|
2445
2526
|
Backspace: ({ editor: e }) => {
|
|
2446
|
-
if (!(e.prosemirrorState.selection instanceof
|
|
2527
|
+
if (!(e.prosemirrorState.selection instanceof ke))
|
|
2447
2528
|
return !1;
|
|
2448
2529
|
const t = e.getTextCursorPosition().block, n = t.content;
|
|
2449
2530
|
let o = 0;
|
|
@@ -2463,14 +2544,14 @@ const Tn = () => vt(
|
|
|
2463
2544
|
}
|
|
2464
2545
|
})
|
|
2465
2546
|
]
|
|
2466
|
-
),
|
|
2547
|
+
), be = (e) => {
|
|
2467
2548
|
const t = e.src || void 0, n = e.width || void 0;
|
|
2468
2549
|
return { url: t, previewWidth: n };
|
|
2469
|
-
},
|
|
2550
|
+
}, An = '<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>', Nn = (e) => ({
|
|
2470
2551
|
type: "video",
|
|
2471
2552
|
propSchema: {
|
|
2472
|
-
textAlignment:
|
|
2473
|
-
backgroundColor:
|
|
2553
|
+
textAlignment: m.textAlignment,
|
|
2554
|
+
backgroundColor: m.backgroundColor,
|
|
2474
2555
|
name: { default: "" },
|
|
2475
2556
|
url: { default: "" },
|
|
2476
2557
|
caption: { default: "" },
|
|
@@ -2482,9 +2563,9 @@ const Tn = () => vt(
|
|
|
2482
2563
|
if (t.tagName === "VIDEO") {
|
|
2483
2564
|
if (t.closest("figure"))
|
|
2484
2565
|
return;
|
|
2485
|
-
const { backgroundColor: n } =
|
|
2566
|
+
const { backgroundColor: n } = C(t);
|
|
2486
2567
|
return {
|
|
2487
|
-
...
|
|
2568
|
+
...be(t),
|
|
2488
2569
|
backgroundColor: n
|
|
2489
2570
|
};
|
|
2490
2571
|
}
|
|
@@ -2492,15 +2573,15 @@ const Tn = () => vt(
|
|
|
2492
2573
|
const n = $(t, "video");
|
|
2493
2574
|
if (!n)
|
|
2494
2575
|
return;
|
|
2495
|
-
const { targetElement: o, caption: r } = n, { backgroundColor: a } =
|
|
2576
|
+
const { targetElement: o, caption: r } = n, { backgroundColor: a } = C(t);
|
|
2496
2577
|
return {
|
|
2497
|
-
...
|
|
2578
|
+
...be(o),
|
|
2498
2579
|
backgroundColor: a,
|
|
2499
2580
|
caption: r
|
|
2500
2581
|
};
|
|
2501
2582
|
}
|
|
2502
|
-
},
|
|
2503
|
-
|
|
2583
|
+
}, In = v(
|
|
2584
|
+
Nn,
|
|
2504
2585
|
(e) => ({
|
|
2505
2586
|
meta: {
|
|
2506
2587
|
fileBlockAccept: ["video/*"]
|
|
@@ -2508,13 +2589,13 @@ const Tn = () => vt(
|
|
|
2508
2589
|
parse: Pn(),
|
|
2509
2590
|
render(t, n) {
|
|
2510
2591
|
const o = document.createElement("div");
|
|
2511
|
-
o.innerHTML = e.icon ??
|
|
2592
|
+
o.innerHTML = e.icon ?? An;
|
|
2512
2593
|
const r = document.createElement("div");
|
|
2513
2594
|
r.className = "bn-visual-media-wrapper";
|
|
2514
2595
|
const a = document.createElement("video");
|
|
2515
2596
|
return a.className = "bn-visual-media", n.resolveFileUrl ? n.resolveFileUrl(t.props.url).then((s) => {
|
|
2516
2597
|
a.src = s;
|
|
2517
|
-
}) : a.src = t.props.url, a.controls = !0, a.contentEditable = "false", a.draggable = !1, a.width = t.props.previewWidth, r.appendChild(a),
|
|
2598
|
+
}) : a.src = t.props.url, a.controls = !0, a.contentEditable = "false", a.draggable = !1, a.width = t.props.previewWidth, r.appendChild(a), Ie(
|
|
2518
2599
|
t,
|
|
2519
2600
|
n,
|
|
2520
2601
|
{ dom: r },
|
|
@@ -2530,7 +2611,7 @@ const Tn = () => vt(
|
|
|
2530
2611
|
};
|
|
2531
2612
|
}
|
|
2532
2613
|
let n;
|
|
2533
|
-
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 ?
|
|
2614
|
+
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 ? Y(n, t.props.caption) : U(n, t.props.caption) : {
|
|
2534
2615
|
dom: n
|
|
2535
2616
|
};
|
|
2536
2617
|
},
|
|
@@ -2560,39 +2641,39 @@ function b(e, t, n) {
|
|
|
2560
2641
|
}
|
|
2561
2642
|
return !0;
|
|
2562
2643
|
}
|
|
2563
|
-
function
|
|
2644
|
+
function To(e, t, n, o) {
|
|
2564
2645
|
return b(t, n, o) && e.type === n;
|
|
2565
2646
|
}
|
|
2566
|
-
function
|
|
2567
|
-
return e instanceof
|
|
2647
|
+
function Bo(e) {
|
|
2648
|
+
return e instanceof ke;
|
|
2568
2649
|
}
|
|
2569
|
-
const
|
|
2650
|
+
const R = /* @__PURE__ */ new Map();
|
|
2570
2651
|
function Hn(e) {
|
|
2571
|
-
if (
|
|
2572
|
-
return
|
|
2573
|
-
const t = new
|
|
2652
|
+
if (R.has(e))
|
|
2653
|
+
return R.get(e);
|
|
2654
|
+
const t = new Qe();
|
|
2574
2655
|
return e._tiptapEditor.on("transaction", ({ transaction: n }) => {
|
|
2575
2656
|
t.appendMapping(n.mapping);
|
|
2576
2657
|
}), e._tiptapEditor.on("destroy", () => {
|
|
2577
|
-
|
|
2578
|
-
}),
|
|
2658
|
+
R.delete(e);
|
|
2659
|
+
}), R.set(e, t), t;
|
|
2579
2660
|
}
|
|
2580
|
-
function
|
|
2581
|
-
const o =
|
|
2661
|
+
function Dn(e, t, n = "left") {
|
|
2662
|
+
const o = se.getState(e.prosemirrorState);
|
|
2582
2663
|
if (!o) {
|
|
2583
2664
|
const a = Hn(e), s = a.maps.length;
|
|
2584
2665
|
return () => a.slice(s).map(t, n === "left" ? -1 : 1);
|
|
2585
2666
|
}
|
|
2586
|
-
const r =
|
|
2667
|
+
const r = Je(
|
|
2587
2668
|
// Track the position after the position if we are on the right side
|
|
2588
2669
|
t + (n === "right" ? 1 : -1),
|
|
2589
2670
|
o.binding.type,
|
|
2590
2671
|
o.binding.mapping
|
|
2591
2672
|
);
|
|
2592
2673
|
return () => {
|
|
2593
|
-
const a =
|
|
2674
|
+
const a = se.getState(
|
|
2594
2675
|
e.prosemirrorState
|
|
2595
|
-
), s =
|
|
2676
|
+
), s = Ye(
|
|
2596
2677
|
a.doc,
|
|
2597
2678
|
a.binding.type,
|
|
2598
2679
|
r,
|
|
@@ -2603,14 +2684,14 @@ function In(e, t, n = "left") {
|
|
|
2603
2684
|
return s + (n === "right" ? -1 : 1);
|
|
2604
2685
|
};
|
|
2605
2686
|
}
|
|
2606
|
-
const
|
|
2607
|
-
class
|
|
2687
|
+
const On = ze((e) => e.type.name === "blockContainer");
|
|
2688
|
+
class _n {
|
|
2608
2689
|
constructor(t, n, o) {
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2690
|
+
w(this, "state");
|
|
2691
|
+
w(this, "emitUpdate");
|
|
2692
|
+
w(this, "rootEl");
|
|
2693
|
+
w(this, "pluginState");
|
|
2694
|
+
w(this, "handleScroll", () => {
|
|
2614
2695
|
var t, n;
|
|
2615
2696
|
if ((t = this.state) != null && t.show) {
|
|
2616
2697
|
const o = (n = this.rootEl) == null ? void 0 : n.querySelector(
|
|
@@ -2621,10 +2702,10 @@ class On {
|
|
|
2621
2702
|
this.state.referencePos = o.getBoundingClientRect().toJSON(), this.emitUpdate(this.pluginState.triggerCharacter);
|
|
2622
2703
|
}
|
|
2623
2704
|
});
|
|
2624
|
-
|
|
2705
|
+
w(this, "closeMenu", () => {
|
|
2625
2706
|
this.editor.transact((t) => t.setMeta(B, null));
|
|
2626
2707
|
});
|
|
2627
|
-
|
|
2708
|
+
w(this, "clearQuery", () => {
|
|
2628
2709
|
this.pluginState !== void 0 && this.editor._tiptapEditor.chain().focus().deleteRange({
|
|
2629
2710
|
from: this.pluginState.queryStartPos() - (this.pluginState.deleteTriggerCharacter ? this.pluginState.triggerCharacter.length : 0),
|
|
2630
2711
|
to: this.editor.transact((t) => t.selection.from)
|
|
@@ -2666,7 +2747,7 @@ class On {
|
|
|
2666
2747
|
(t = this.rootEl) == null || t.removeEventListener("scroll", this.handleScroll, !0);
|
|
2667
2748
|
}
|
|
2668
2749
|
}
|
|
2669
|
-
const B = new
|
|
2750
|
+
const B = new Xe("SuggestionMenuPlugin"), Vn = y(({ editor: e }) => {
|
|
2670
2751
|
const t = /* @__PURE__ */ new Map();
|
|
2671
2752
|
let n;
|
|
2672
2753
|
const o = ve(void 0);
|
|
@@ -2700,9 +2781,9 @@ const B = new Ze("SuggestionMenuPlugin"), _n = k(({ editor: e }) => {
|
|
|
2700
2781
|
},
|
|
2701
2782
|
// TODO this whole plugin needs to be refactored (but I've done the minimal)
|
|
2702
2783
|
prosemirrorPlugins: [
|
|
2703
|
-
new
|
|
2784
|
+
new Ze({
|
|
2704
2785
|
key: B,
|
|
2705
|
-
view: (r) => (n = new
|
|
2786
|
+
view: (r) => (n = new _n(
|
|
2706
2787
|
e,
|
|
2707
2788
|
(a, s) => {
|
|
2708
2789
|
o.setState({ ...s, triggerCharacter: a });
|
|
@@ -2720,7 +2801,7 @@ const B = new Ze("SuggestionMenuPlugin"), _n = k(({ editor: e }) => {
|
|
|
2720
2801
|
const c = r.getMeta(B);
|
|
2721
2802
|
if (typeof c == "object" && c !== null) {
|
|
2722
2803
|
a && (n == null || n.closeMenu());
|
|
2723
|
-
const u =
|
|
2804
|
+
const u = Dn(
|
|
2724
2805
|
e,
|
|
2725
2806
|
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.
|
|
2726
2807
|
c.triggerCharacter.length
|
|
@@ -2781,10 +2862,10 @@ const B = new Ze("SuggestionMenuPlugin"), _n = k(({ editor: e }) => {
|
|
|
2781
2862
|
if (a === void 0)
|
|
2782
2863
|
return null;
|
|
2783
2864
|
if (!a.deleteTriggerCharacter) {
|
|
2784
|
-
const s =
|
|
2865
|
+
const s = On(r.selection);
|
|
2785
2866
|
if (s)
|
|
2786
|
-
return
|
|
2787
|
-
|
|
2867
|
+
return re.create(r.doc, [
|
|
2868
|
+
ae.node(
|
|
2788
2869
|
s.pos,
|
|
2789
2870
|
s.pos + s.node.nodeSize,
|
|
2790
2871
|
{
|
|
@@ -2795,8 +2876,8 @@ const B = new Ze("SuggestionMenuPlugin"), _n = k(({ editor: e }) => {
|
|
|
2795
2876
|
)
|
|
2796
2877
|
]);
|
|
2797
2878
|
}
|
|
2798
|
-
return
|
|
2799
|
-
|
|
2879
|
+
return re.create(r.doc, [
|
|
2880
|
+
ae.inline(
|
|
2800
2881
|
a.queryStartPos() - a.triggerCharacter.length,
|
|
2801
2882
|
a.queryStartPos(),
|
|
2802
2883
|
{
|
|
@@ -2812,7 +2893,7 @@ const B = new Ze("SuggestionMenuPlugin"), _n = k(({ editor: e }) => {
|
|
|
2812
2893
|
]
|
|
2813
2894
|
};
|
|
2814
2895
|
});
|
|
2815
|
-
function
|
|
2896
|
+
function Wn(e) {
|
|
2816
2897
|
let t = e.getTextCursorPosition().block, n = e.schema.blockSchema[t.type].content;
|
|
2817
2898
|
for (; n === "none"; ) {
|
|
2818
2899
|
if (t = e.getTextCursorPosition().nextBlock, t === void 0)
|
|
@@ -2820,19 +2901,19 @@ function Vn(e) {
|
|
|
2820
2901
|
n = e.schema.blockSchema[t.type].content, e.setTextCursorPosition(t, "end");
|
|
2821
2902
|
}
|
|
2822
2903
|
}
|
|
2823
|
-
function
|
|
2904
|
+
function k(e, t) {
|
|
2824
2905
|
const n = e.getTextCursorPosition().block;
|
|
2825
2906
|
if (n.content === void 0)
|
|
2826
2907
|
throw new Error("Slash Menu open in a block that doesn't contain content.");
|
|
2827
2908
|
let o;
|
|
2828
|
-
return Array.isArray(n.content) && (n.content.length === 1 &&
|
|
2909
|
+
return Array.isArray(n.content) && (n.content.length === 1 && at(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)), Wn(e), o;
|
|
2829
2910
|
}
|
|
2830
|
-
function
|
|
2911
|
+
function Ao(e) {
|
|
2831
2912
|
const t = [];
|
|
2832
2913
|
return b(e, "heading", { level: "number" }) && (e.schema.blockSchema.heading.propSchema.level.values || []).filter((n) => n <= 3).forEach((n) => {
|
|
2833
2914
|
t.push({
|
|
2834
2915
|
onItemClick: () => {
|
|
2835
|
-
|
|
2916
|
+
k(e, {
|
|
2836
2917
|
type: "heading",
|
|
2837
2918
|
props: { level: n }
|
|
2838
2919
|
});
|
|
@@ -2843,7 +2924,7 @@ function Bo(e) {
|
|
|
2843
2924
|
});
|
|
2844
2925
|
}), b(e, "quote") && t.push({
|
|
2845
2926
|
onItemClick: () => {
|
|
2846
|
-
|
|
2927
|
+
k(e, {
|
|
2847
2928
|
type: "quote"
|
|
2848
2929
|
});
|
|
2849
2930
|
},
|
|
@@ -2851,7 +2932,7 @@ function Bo(e) {
|
|
|
2851
2932
|
...e.dictionary.slash_menu.quote
|
|
2852
2933
|
}), b(e, "toggleListItem") && t.push({
|
|
2853
2934
|
onItemClick: () => {
|
|
2854
|
-
|
|
2935
|
+
k(e, {
|
|
2855
2936
|
type: "toggleListItem"
|
|
2856
2937
|
});
|
|
2857
2938
|
},
|
|
@@ -2860,7 +2941,7 @@ function Bo(e) {
|
|
|
2860
2941
|
...e.dictionary.slash_menu.toggle_list
|
|
2861
2942
|
}), b(e, "numberedListItem") && t.push({
|
|
2862
2943
|
onItemClick: () => {
|
|
2863
|
-
|
|
2944
|
+
k(e, {
|
|
2864
2945
|
type: "numberedListItem"
|
|
2865
2946
|
});
|
|
2866
2947
|
},
|
|
@@ -2869,7 +2950,7 @@ function Bo(e) {
|
|
|
2869
2950
|
...e.dictionary.slash_menu.numbered_list
|
|
2870
2951
|
}), b(e, "bulletListItem") && t.push({
|
|
2871
2952
|
onItemClick: () => {
|
|
2872
|
-
|
|
2953
|
+
k(e, {
|
|
2873
2954
|
type: "bulletListItem"
|
|
2874
2955
|
});
|
|
2875
2956
|
},
|
|
@@ -2878,7 +2959,7 @@ function Bo(e) {
|
|
|
2878
2959
|
...e.dictionary.slash_menu.bullet_list
|
|
2879
2960
|
}), b(e, "checkListItem") && t.push({
|
|
2880
2961
|
onItemClick: () => {
|
|
2881
|
-
|
|
2962
|
+
k(e, {
|
|
2882
2963
|
type: "checkListItem"
|
|
2883
2964
|
});
|
|
2884
2965
|
},
|
|
@@ -2887,7 +2968,7 @@ function Bo(e) {
|
|
|
2887
2968
|
...e.dictionary.slash_menu.check_list
|
|
2888
2969
|
}), b(e, "paragraph") && t.push({
|
|
2889
2970
|
onItemClick: () => {
|
|
2890
|
-
|
|
2971
|
+
k(e, {
|
|
2891
2972
|
type: "paragraph"
|
|
2892
2973
|
});
|
|
2893
2974
|
},
|
|
@@ -2896,7 +2977,7 @@ function Bo(e) {
|
|
|
2896
2977
|
...e.dictionary.slash_menu.paragraph
|
|
2897
2978
|
}), b(e, "codeBlock") && t.push({
|
|
2898
2979
|
onItemClick: () => {
|
|
2899
|
-
|
|
2980
|
+
k(e, {
|
|
2900
2981
|
type: "codeBlock"
|
|
2901
2982
|
});
|
|
2902
2983
|
},
|
|
@@ -2905,13 +2986,13 @@ function Bo(e) {
|
|
|
2905
2986
|
...e.dictionary.slash_menu.code_block
|
|
2906
2987
|
}), b(e, "divider") && t.push({
|
|
2907
2988
|
onItemClick: () => {
|
|
2908
|
-
|
|
2989
|
+
k(e, { type: "divider" });
|
|
2909
2990
|
},
|
|
2910
2991
|
key: "divider",
|
|
2911
2992
|
...e.dictionary.slash_menu.divider
|
|
2912
2993
|
}), b(e, "table") && t.push({
|
|
2913
2994
|
onItemClick: () => {
|
|
2914
|
-
|
|
2995
|
+
k(e, {
|
|
2915
2996
|
type: "table",
|
|
2916
2997
|
content: {
|
|
2917
2998
|
type: "tableContent",
|
|
@@ -2932,40 +3013,40 @@ function Bo(e) {
|
|
|
2932
3013
|
}), b(e, "image", { url: "string" }) && t.push({
|
|
2933
3014
|
onItemClick: () => {
|
|
2934
3015
|
var o;
|
|
2935
|
-
const n =
|
|
3016
|
+
const n = k(e, {
|
|
2936
3017
|
type: "image"
|
|
2937
3018
|
});
|
|
2938
|
-
(o = e.getExtension(
|
|
3019
|
+
(o = e.getExtension(H)) == null || o.showMenu(n.id);
|
|
2939
3020
|
},
|
|
2940
3021
|
key: "image",
|
|
2941
3022
|
...e.dictionary.slash_menu.image
|
|
2942
3023
|
}), b(e, "video", { url: "string" }) && t.push({
|
|
2943
3024
|
onItemClick: () => {
|
|
2944
3025
|
var o;
|
|
2945
|
-
const n =
|
|
3026
|
+
const n = k(e, {
|
|
2946
3027
|
type: "video"
|
|
2947
3028
|
});
|
|
2948
|
-
(o = e.getExtension(
|
|
3029
|
+
(o = e.getExtension(H)) == null || o.showMenu(n.id);
|
|
2949
3030
|
},
|
|
2950
3031
|
key: "video",
|
|
2951
3032
|
...e.dictionary.slash_menu.video
|
|
2952
3033
|
}), b(e, "audio", { url: "string" }) && t.push({
|
|
2953
3034
|
onItemClick: () => {
|
|
2954
3035
|
var o;
|
|
2955
|
-
const n =
|
|
3036
|
+
const n = k(e, {
|
|
2956
3037
|
type: "audio"
|
|
2957
3038
|
});
|
|
2958
|
-
(o = e.getExtension(
|
|
3039
|
+
(o = e.getExtension(H)) == null || o.showMenu(n.id);
|
|
2959
3040
|
},
|
|
2960
3041
|
key: "audio",
|
|
2961
3042
|
...e.dictionary.slash_menu.audio
|
|
2962
3043
|
}), b(e, "file", { url: "string" }) && t.push({
|
|
2963
3044
|
onItemClick: () => {
|
|
2964
3045
|
var o;
|
|
2965
|
-
const n =
|
|
3046
|
+
const n = k(e, {
|
|
2966
3047
|
type: "file"
|
|
2967
3048
|
});
|
|
2968
|
-
(o = e.getExtension(
|
|
3049
|
+
(o = e.getExtension(H)) == null || o.showMenu(n.id);
|
|
2969
3050
|
},
|
|
2970
3051
|
key: "file",
|
|
2971
3052
|
...e.dictionary.slash_menu.file
|
|
@@ -2975,7 +3056,7 @@ function Bo(e) {
|
|
|
2975
3056
|
}) && (e.schema.blockSchema.heading.propSchema.level.values || []).filter((n) => n <= 3).forEach((n) => {
|
|
2976
3057
|
t.push({
|
|
2977
3058
|
onItemClick: () => {
|
|
2978
|
-
|
|
3059
|
+
k(e, {
|
|
2979
3060
|
type: "heading",
|
|
2980
3061
|
props: { level: n, isToggleable: !0 }
|
|
2981
3062
|
});
|
|
@@ -2986,7 +3067,7 @@ function Bo(e) {
|
|
|
2986
3067
|
}), b(e, "heading", { level: "number" }) && (e.schema.blockSchema.heading.propSchema.level.values || []).filter((n) => n > 3).forEach((n) => {
|
|
2987
3068
|
t.push({
|
|
2988
3069
|
onItemClick: () => {
|
|
2989
|
-
|
|
3070
|
+
k(e, {
|
|
2990
3071
|
type: "heading",
|
|
2991
3072
|
props: { level: n }
|
|
2992
3073
|
});
|
|
@@ -2998,7 +3079,7 @@ function Bo(e) {
|
|
|
2998
3079
|
}), t.push({
|
|
2999
3080
|
onItemClick: () => {
|
|
3000
3081
|
var n;
|
|
3001
|
-
(n = e.getExtension(
|
|
3082
|
+
(n = e.getExtension(Vn)) == null || n.openSuggestionMenu(":", {
|
|
3002
3083
|
deleteTriggerCharacter: !0,
|
|
3003
3084
|
ignoreQueryLength: !0
|
|
3004
3085
|
});
|
|
@@ -3007,7 +3088,7 @@ function Bo(e) {
|
|
|
3007
3088
|
...e.dictionary.slash_menu.emoji
|
|
3008
3089
|
}), t;
|
|
3009
3090
|
}
|
|
3010
|
-
function
|
|
3091
|
+
function No(e, t) {
|
|
3011
3092
|
return e.filter(
|
|
3012
3093
|
({ title: n, aliases: o }) => n.toLowerCase().includes(t.toLowerCase()) || o && o.filter(
|
|
3013
3094
|
(r) => r.toLowerCase().includes(t.toLowerCase())
|
|
@@ -3015,21 +3096,21 @@ function Ao(e, t) {
|
|
|
3015
3096
|
);
|
|
3016
3097
|
}
|
|
3017
3098
|
const Po = {
|
|
3018
|
-
audio:
|
|
3019
|
-
bulletListItem:
|
|
3020
|
-
checkListItem:
|
|
3021
|
-
codeBlock:
|
|
3022
|
-
divider:
|
|
3023
|
-
file:
|
|
3024
|
-
heading:
|
|
3025
|
-
image:
|
|
3026
|
-
numberedListItem:
|
|
3027
|
-
paragraph:
|
|
3028
|
-
quote:
|
|
3029
|
-
table:
|
|
3030
|
-
toggleListItem:
|
|
3031
|
-
video:
|
|
3032
|
-
},
|
|
3099
|
+
audio: $t(),
|
|
3100
|
+
bulletListItem: ln(),
|
|
3101
|
+
checkListItem: un(),
|
|
3102
|
+
codeBlock: jt(),
|
|
3103
|
+
divider: zt(),
|
|
3104
|
+
file: Kt(),
|
|
3105
|
+
heading: en(),
|
|
3106
|
+
image: sn(),
|
|
3107
|
+
numberedListItem: mn(),
|
|
3108
|
+
paragraph: Cn(),
|
|
3109
|
+
quote: yn(),
|
|
3110
|
+
table: Bn(),
|
|
3111
|
+
toggleListItem: gn(),
|
|
3112
|
+
video: In()
|
|
3113
|
+
}, Rn = Te(
|
|
3033
3114
|
{
|
|
3034
3115
|
type: "textColor",
|
|
3035
3116
|
propSchema: "string"
|
|
@@ -3044,7 +3125,7 @@ const Po = {
|
|
|
3044
3125
|
},
|
|
3045
3126
|
toExternalHTML: (e) => {
|
|
3046
3127
|
const t = document.createElement("span");
|
|
3047
|
-
return e !==
|
|
3128
|
+
return e !== m.textColor.default && (t.style.color = e in T ? T[e].text : e), {
|
|
3048
3129
|
dom: t,
|
|
3049
3130
|
contentDOM: t
|
|
3050
3131
|
};
|
|
@@ -3054,7 +3135,7 @@ const Po = {
|
|
|
3054
3135
|
return e.style.color;
|
|
3055
3136
|
}
|
|
3056
3137
|
}
|
|
3057
|
-
),
|
|
3138
|
+
), Fn = Te(
|
|
3058
3139
|
{
|
|
3059
3140
|
type: "backgroundColor",
|
|
3060
3141
|
propSchema: "string"
|
|
@@ -3069,7 +3150,7 @@ const Po = {
|
|
|
3069
3150
|
},
|
|
3070
3151
|
toExternalHTML: (e) => {
|
|
3071
3152
|
const t = document.createElement("span");
|
|
3072
|
-
return e !==
|
|
3153
|
+
return e !== m.backgroundColor.default && (t.style.backgroundColor = e in T ? T[e].background : e), {
|
|
3073
3154
|
dom: t,
|
|
3074
3155
|
contentDOM: t
|
|
3075
3156
|
};
|
|
@@ -3079,125 +3160,125 @@ const Po = {
|
|
|
3079
3160
|
return e.style.backgroundColor;
|
|
3080
3161
|
}
|
|
3081
3162
|
}
|
|
3082
|
-
),
|
|
3083
|
-
bold:
|
|
3084
|
-
italic:
|
|
3085
|
-
underline:
|
|
3086
|
-
strike:
|
|
3087
|
-
code:
|
|
3088
|
-
textColor:
|
|
3089
|
-
backgroundColor:
|
|
3090
|
-
},
|
|
3163
|
+
), $n = {
|
|
3164
|
+
bold: I(st, "boolean"),
|
|
3165
|
+
italic: I(ct, "boolean"),
|
|
3166
|
+
underline: I(dt, "boolean"),
|
|
3167
|
+
strike: I(lt, "boolean"),
|
|
3168
|
+
code: I(it, "boolean"),
|
|
3169
|
+
textColor: Rn,
|
|
3170
|
+
backgroundColor: Fn
|
|
3171
|
+
}, Io = Lt($n), Un = {
|
|
3091
3172
|
text: { config: "text", implementation: {} },
|
|
3092
3173
|
link: { config: "link", implementation: {} }
|
|
3093
|
-
}, Ho =
|
|
3094
|
-
|
|
3174
|
+
}, Ho = Mt(
|
|
3175
|
+
Un
|
|
3095
3176
|
);
|
|
3096
3177
|
export {
|
|
3097
3178
|
b as $,
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3179
|
+
un as A,
|
|
3180
|
+
fn as B,
|
|
3181
|
+
mn as C,
|
|
3101
3182
|
hn as D,
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3183
|
+
Lo as E,
|
|
3184
|
+
_t as F,
|
|
3185
|
+
gn as G,
|
|
3186
|
+
bn as H,
|
|
3187
|
+
Cn as I,
|
|
3188
|
+
kn as J,
|
|
3189
|
+
yn as K,
|
|
3190
|
+
Sn as L,
|
|
3191
|
+
Bn as M,
|
|
3192
|
+
An as N,
|
|
3193
|
+
Nn as O,
|
|
3113
3194
|
Pn as P,
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3195
|
+
In as Q,
|
|
3196
|
+
Qt as R,
|
|
3197
|
+
Ne as S,
|
|
3198
|
+
Ct as T,
|
|
3199
|
+
de as U,
|
|
3200
|
+
we as V,
|
|
3120
3201
|
Po as W,
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3202
|
+
$n as X,
|
|
3203
|
+
Io as Y,
|
|
3204
|
+
Un as Z,
|
|
3124
3205
|
Ho as _,
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3206
|
+
Oe as a,
|
|
3207
|
+
To as a0,
|
|
3208
|
+
Bo as a1,
|
|
3209
|
+
m as a2,
|
|
3210
|
+
C as a3,
|
|
3130
3211
|
A as a4,
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3212
|
+
So as a5,
|
|
3213
|
+
xo as a6,
|
|
3214
|
+
Mo as a7,
|
|
3215
|
+
H as a8,
|
|
3216
|
+
Vn as a9,
|
|
3217
|
+
z as aA,
|
|
3137
3218
|
vt as aB,
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3219
|
+
xt as aC,
|
|
3220
|
+
Tt as aD,
|
|
3221
|
+
Te as aE,
|
|
3141
3222
|
wt as aF,
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3223
|
+
W as aG,
|
|
3224
|
+
Le as aH,
|
|
3225
|
+
I as aI,
|
|
3226
|
+
bt as aJ,
|
|
3146
3227
|
L as aK,
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3228
|
+
po as aL,
|
|
3229
|
+
F as aM,
|
|
3230
|
+
fo as aN,
|
|
3231
|
+
Dn as aO,
|
|
3232
|
+
k as aa,
|
|
3233
|
+
Ao as ab,
|
|
3234
|
+
No as ac,
|
|
3154
3235
|
ho as ad,
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3236
|
+
Lt as ae,
|
|
3237
|
+
Mt as af,
|
|
3238
|
+
go as ag,
|
|
3239
|
+
v as ah,
|
|
3240
|
+
At as ai,
|
|
3241
|
+
Bt as aj,
|
|
3242
|
+
bo as ak,
|
|
3243
|
+
Co as al,
|
|
3244
|
+
kt as am,
|
|
3245
|
+
ko as an,
|
|
3165
3246
|
vo as ao,
|
|
3166
|
-
|
|
3247
|
+
mo as ap,
|
|
3167
3248
|
wo as aq,
|
|
3168
|
-
|
|
3249
|
+
yo as ar,
|
|
3169
3250
|
D as as,
|
|
3170
|
-
|
|
3251
|
+
Q as at,
|
|
3171
3252
|
Pt as au,
|
|
3172
3253
|
T as av,
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3254
|
+
Eo as aw,
|
|
3255
|
+
Et as ax,
|
|
3256
|
+
St as ay,
|
|
3257
|
+
yt as az,
|
|
3258
|
+
Wt as b,
|
|
3259
|
+
Vt as c,
|
|
3260
|
+
Rt as d,
|
|
3261
|
+
Ft as e,
|
|
3262
|
+
$t as f,
|
|
3263
|
+
qt as g,
|
|
3264
|
+
jt as h,
|
|
3265
|
+
Be as i,
|
|
3266
|
+
Gt as j,
|
|
3267
|
+
zt as k,
|
|
3187
3268
|
Zt as l,
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3269
|
+
Xt as m,
|
|
3270
|
+
Kt as n,
|
|
3271
|
+
Yt as o,
|
|
3272
|
+
pe as p,
|
|
3273
|
+
en as q,
|
|
3274
|
+
tn as r,
|
|
3275
|
+
nn as s,
|
|
3276
|
+
on as t,
|
|
3277
|
+
rn as u,
|
|
3278
|
+
an as v,
|
|
3279
|
+
sn as w,
|
|
3280
|
+
cn as x,
|
|
3281
|
+
ln as y,
|
|
3282
|
+
dn as z
|
|
3202
3283
|
};
|
|
3203
|
-
//# sourceMappingURL=defaultBlocks-
|
|
3284
|
+
//# sourceMappingURL=defaultBlocks-ZzGbYgQn.js.map
|