@blocknote/core 0.19.1 → 0.19.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/blocknote.js +707 -667
- package/dist/blocknote.js.map +1 -1
- package/dist/blocknote.umd.cjs +7 -7
- package/dist/blocknote.umd.cjs.map +1 -1
- package/dist/src/api/clipboard/fromClipboard/handleVSCodePaste.js +3 -3
- package/dist/src/api/clipboard/fromClipboard/handleVSCodePaste.js.map +1 -1
- package/dist/src/blocks/CodeBlockContent/CodeBlockContent.js +15 -7
- package/dist/src/blocks/CodeBlockContent/CodeBlockContent.js.map +1 -1
- package/dist/src/blocks/CodeBlockContent/defaultSupportedLanguages.js +38 -18
- package/dist/src/blocks/CodeBlockContent/defaultSupportedLanguages.js.map +1 -1
- package/dist/src/editor/BlockNoteEditor.js +3 -0
- package/dist/src/editor/BlockNoteEditor.js.map +1 -1
- package/dist/src/editor/BlockNoteExtensions.js +1 -1
- package/dist/src/editor/BlockNoteExtensions.js.map +1 -1
- package/dist/src/extensions/SideMenu/SideMenuPlugin.js +5 -1
- package/dist/src/extensions/SideMenu/SideMenuPlugin.js.map +1 -1
- package/dist/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.js +0 -3
- package/dist/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.js.map +1 -1
- package/dist/src/index.js +1 -0
- package/dist/src/index.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 +2 -2
- package/src/api/clipboard/fromClipboard/handleVSCodePaste.ts +4 -4
- package/src/blocks/CodeBlockContent/CodeBlockContent.ts +18 -8
- package/src/blocks/CodeBlockContent/defaultSupportedLanguages.ts +38 -18
- package/src/editor/Block.css +3 -0
- package/src/editor/BlockNoteEditor.ts +6 -0
- package/src/editor/BlockNoteExtensions.ts +1 -1
- package/src/extensions/SideMenu/SideMenuPlugin.ts +5 -1
- package/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts +0 -5
- package/src/index.ts +1 -0
- package/types/src/extensions/SideMenu/SideMenuPlugin.d.ts +1 -1
- package/types/src/index.d.ts +1 -0
package/dist/blocknote.js
CHANGED
|
@@ -1,35 +1,34 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var u = (e, t, o) =>
|
|
4
|
-
import { Slice as le, Fragment as A, DOMSerializer as ft, DOMParser as
|
|
5
|
-
import { Extension as T, combineTransactionSteps as
|
|
6
|
-
import { Plugin as E, PluginKey as I, TextSelection as O, NodeSelection as de, Selection as Te, EditorState as
|
|
7
|
-
import { v4 as
|
|
8
|
-
import { createHighlightPlugin as
|
|
9
|
-
import { createParser as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import Mo from "@tiptap/extension-
|
|
14
|
-
import To from "@tiptap/extension-
|
|
15
|
-
import Lo from "@tiptap/extension-
|
|
16
|
-
import Io from "@tiptap/extension-
|
|
17
|
-
import Ao from "
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import
|
|
22
|
-
import Do from "@tiptap/extension-collaboration";
|
|
23
|
-
import Uo from "@tiptap/extension-
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import {
|
|
31
|
-
|
|
32
|
-
const $o = {
|
|
1
|
+
var no = Object.defineProperty;
|
|
2
|
+
var ro = (e, t, o) => t in e ? no(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
|
|
3
|
+
var u = (e, t, o) => ro(e, typeof t != "symbol" ? t + "" : t, o);
|
|
4
|
+
import { Slice as le, Fragment as A, DOMSerializer as ft, DOMParser as ao, Node as so } from "prosemirror-model";
|
|
5
|
+
import { Extension as T, combineTransactionSteps as lo, getChangedRanges as co, findChildrenInRange as uo, Node as G, Mark as ye, InputRule as Z, isTextSelection as gt, callOrReturn as po, getExtensionField as ho, selectionToInsertionEnd as mo, isNodeSelection as Ze, posToDOMRect as Ne, getMarkRange as Je, findChildren as Ye, findParentNode as fo, extensions as ie, Editor as go, createDocument as bo, getSchema as ko } from "@tiptap/core";
|
|
6
|
+
import { Plugin as E, PluginKey as I, TextSelection as O, NodeSelection as de, Selection as Te, EditorState as _o } from "prosemirror-state";
|
|
7
|
+
import { v4 as yo } from "uuid";
|
|
8
|
+
import { createHighlightPlugin as vo } from "prosemirror-highlight";
|
|
9
|
+
import { createParser as wo } from "prosemirror-highlight/shiki";
|
|
10
|
+
import { bundledLanguagesInfo as bt, createHighlighter as xo } from "shiki";
|
|
11
|
+
import { columnResizing as Co, tableEditing as Eo, TableView as So, CellSelection as ze } from "prosemirror-tables";
|
|
12
|
+
import Bo from "@tiptap/extension-bold";
|
|
13
|
+
import Mo from "@tiptap/extension-code";
|
|
14
|
+
import To from "@tiptap/extension-italic";
|
|
15
|
+
import Lo from "@tiptap/extension-strike";
|
|
16
|
+
import Io from "@tiptap/extension-underline";
|
|
17
|
+
import { ReplaceStep as Ao, ReplaceAroundStep as je } from "prosemirror-transform";
|
|
18
|
+
import { TableCell as Po } from "@tiptap/extension-table-cell";
|
|
19
|
+
import { TableHeader as No } from "@tiptap/extension-table-header";
|
|
20
|
+
import { TableRow as jo } from "@tiptap/extension-table-row";
|
|
21
|
+
import Ho from "@tiptap/extension-collaboration";
|
|
22
|
+
import Do from "@tiptap/extension-collaboration-cursor";
|
|
23
|
+
import { Gapcursor as Uo } from "@tiptap/extension-gapcursor";
|
|
24
|
+
import { HardBreak as Oo } from "@tiptap/extension-hard-break";
|
|
25
|
+
import { History as Ro } from "@tiptap/extension-history";
|
|
26
|
+
import { Link as zo } from "@tiptap/extension-link";
|
|
27
|
+
import { Text as Vo } from "@tiptap/extension-text";
|
|
28
|
+
import * as kt from "prosemirror-view";
|
|
29
|
+
import { Decoration as J, DecorationSet as Y, EditorView as Fo } from "prosemirror-view";
|
|
30
|
+
import { dropCursor as Go } from "prosemirror-dropcursor";
|
|
31
|
+
const Wo = {
|
|
33
32
|
slash_menu: {
|
|
34
33
|
heading: {
|
|
35
34
|
title: "عنوان 1",
|
|
@@ -325,7 +324,7 @@ const $o = {
|
|
|
325
324
|
generic: {
|
|
326
325
|
ctrl_shortcut: "Ctrl"
|
|
327
326
|
}
|
|
328
|
-
},
|
|
327
|
+
}, $o = {
|
|
329
328
|
slash_menu: {
|
|
330
329
|
heading: {
|
|
331
330
|
title: "Überschrift 1",
|
|
@@ -636,7 +635,7 @@ const $o = {
|
|
|
636
635
|
generic: {
|
|
637
636
|
ctrl_shortcut: "Strg"
|
|
638
637
|
}
|
|
639
|
-
},
|
|
638
|
+
}, _t = {
|
|
640
639
|
slash_menu: {
|
|
641
640
|
heading: {
|
|
642
641
|
title: "Heading 1",
|
|
@@ -948,7 +947,7 @@ const $o = {
|
|
|
948
947
|
generic: {
|
|
949
948
|
ctrl_shortcut: "Ctrl"
|
|
950
949
|
}
|
|
951
|
-
},
|
|
950
|
+
}, Ko = {
|
|
952
951
|
slash_menu: {
|
|
953
952
|
heading: {
|
|
954
953
|
title: "Encabezado 1",
|
|
@@ -1258,7 +1257,7 @@ const $o = {
|
|
|
1258
1257
|
generic: {
|
|
1259
1258
|
ctrl_shortcut: "Ctrl"
|
|
1260
1259
|
}
|
|
1261
|
-
},
|
|
1260
|
+
}, qo = {
|
|
1262
1261
|
slash_menu: {
|
|
1263
1262
|
heading: {
|
|
1264
1263
|
title: "Titre 1",
|
|
@@ -1569,7 +1568,7 @@ const $o = {
|
|
|
1569
1568
|
generic: {
|
|
1570
1569
|
ctrl_shortcut: "Ctrl"
|
|
1571
1570
|
}
|
|
1572
|
-
},
|
|
1571
|
+
}, Xo = {
|
|
1573
1572
|
slash_menu: {
|
|
1574
1573
|
heading: {
|
|
1575
1574
|
title: "Naslov 1",
|
|
@@ -1875,7 +1874,7 @@ const $o = {
|
|
|
1875
1874
|
generic: {
|
|
1876
1875
|
ctrl_shortcut: "Ctrl"
|
|
1877
1876
|
}
|
|
1878
|
-
},
|
|
1877
|
+
}, Zo = {
|
|
1879
1878
|
slash_menu: {
|
|
1880
1879
|
heading: {
|
|
1881
1880
|
title: "Fyrirsögn 1",
|
|
@@ -2178,7 +2177,7 @@ const $o = {
|
|
|
2178
2177
|
generic: {
|
|
2179
2178
|
ctrl_shortcut: "Ctrl"
|
|
2180
2179
|
}
|
|
2181
|
-
},
|
|
2180
|
+
}, Jo = {
|
|
2182
2181
|
slash_menu: {
|
|
2183
2182
|
heading: {
|
|
2184
2183
|
title: "見出し1",
|
|
@@ -2509,7 +2508,7 @@ const $o = {
|
|
|
2509
2508
|
generic: {
|
|
2510
2509
|
ctrl_shortcut: "Ctrl"
|
|
2511
2510
|
}
|
|
2512
|
-
},
|
|
2511
|
+
}, Yo = {
|
|
2513
2512
|
slash_menu: {
|
|
2514
2513
|
heading: {
|
|
2515
2514
|
title: "제목1",
|
|
@@ -2833,7 +2832,7 @@ const $o = {
|
|
|
2833
2832
|
generic: {
|
|
2834
2833
|
ctrl_shortcut: "Ctrl"
|
|
2835
2834
|
}
|
|
2836
|
-
},
|
|
2835
|
+
}, Qo = {
|
|
2837
2836
|
slash_menu: {
|
|
2838
2837
|
heading: {
|
|
2839
2838
|
title: "Kop 1",
|
|
@@ -3144,7 +3143,7 @@ const $o = {
|
|
|
3144
3143
|
generic: {
|
|
3145
3144
|
ctrl_shortcut: "Ctrl"
|
|
3146
3145
|
}
|
|
3147
|
-
},
|
|
3146
|
+
}, ei = {
|
|
3148
3147
|
slash_menu: {
|
|
3149
3148
|
heading: {
|
|
3150
3149
|
title: "Nagłówek 1",
|
|
@@ -3439,7 +3438,7 @@ const $o = {
|
|
|
3439
3438
|
generic: {
|
|
3440
3439
|
ctrl_shortcut: "Ctrl"
|
|
3441
3440
|
}
|
|
3442
|
-
},
|
|
3441
|
+
}, ti = {
|
|
3443
3442
|
slash_menu: {
|
|
3444
3443
|
heading: {
|
|
3445
3444
|
title: "Título",
|
|
@@ -3742,7 +3741,7 @@ const $o = {
|
|
|
3742
3741
|
generic: {
|
|
3743
3742
|
ctrl_shortcut: "Ctrl"
|
|
3744
3743
|
}
|
|
3745
|
-
},
|
|
3744
|
+
}, oi = {
|
|
3746
3745
|
slash_menu: {
|
|
3747
3746
|
heading: {
|
|
3748
3747
|
title: "Заголовок 1 уровня",
|
|
@@ -4080,7 +4079,7 @@ const $o = {
|
|
|
4080
4079
|
generic: {
|
|
4081
4080
|
ctrl_shortcut: "Ctrl"
|
|
4082
4081
|
}
|
|
4083
|
-
},
|
|
4082
|
+
}, ii = {
|
|
4084
4083
|
slash_menu: {
|
|
4085
4084
|
heading: {
|
|
4086
4085
|
title: "Tiêu đề H1",
|
|
@@ -4390,7 +4389,7 @@ const $o = {
|
|
|
4390
4389
|
generic: {
|
|
4391
4390
|
ctrl_shortcut: "Ctrl"
|
|
4392
4391
|
}
|
|
4393
|
-
},
|
|
4392
|
+
}, ni = {
|
|
4394
4393
|
slash_menu: {
|
|
4395
4394
|
heading: {
|
|
4396
4395
|
title: "一级标题",
|
|
@@ -4734,46 +4733,46 @@ const $o = {
|
|
|
4734
4733
|
generic: {
|
|
4735
4734
|
ctrl_shortcut: "Ctrl"
|
|
4736
4735
|
}
|
|
4737
|
-
},
|
|
4736
|
+
}, Pa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4738
4737
|
__proto__: null,
|
|
4739
|
-
ar:
|
|
4740
|
-
de:
|
|
4741
|
-
en:
|
|
4742
|
-
es:
|
|
4743
|
-
fr:
|
|
4744
|
-
hr:
|
|
4745
|
-
is:
|
|
4746
|
-
ja:
|
|
4747
|
-
ko:
|
|
4748
|
-
nl:
|
|
4749
|
-
pl:
|
|
4750
|
-
pt:
|
|
4751
|
-
ru:
|
|
4752
|
-
vi:
|
|
4753
|
-
zh:
|
|
4738
|
+
ar: Wo,
|
|
4739
|
+
de: $o,
|
|
4740
|
+
en: _t,
|
|
4741
|
+
es: Ko,
|
|
4742
|
+
fr: qo,
|
|
4743
|
+
hr: Xo,
|
|
4744
|
+
is: Zo,
|
|
4745
|
+
ja: Jo,
|
|
4746
|
+
ko: Yo,
|
|
4747
|
+
nl: Qo,
|
|
4748
|
+
pl: ei,
|
|
4749
|
+
pt: ti,
|
|
4750
|
+
ru: oi,
|
|
4751
|
+
vi: ii,
|
|
4752
|
+
zh: ni
|
|
4754
4753
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4755
4754
|
class P extends Error {
|
|
4756
4755
|
constructor(t) {
|
|
4757
4756
|
super(`Unreachable case: ${t}`);
|
|
4758
4757
|
}
|
|
4759
4758
|
}
|
|
4760
|
-
function
|
|
4759
|
+
function Na(e, t = !0) {
|
|
4761
4760
|
const { "data-test": o, ...i } = e;
|
|
4762
4761
|
if (Object.keys(i).length > 0 && t)
|
|
4763
4762
|
throw new Error("Object must be empty " + JSON.stringify(e));
|
|
4764
4763
|
}
|
|
4765
|
-
function
|
|
4764
|
+
function ri(e, t = JSON.stringify) {
|
|
4766
4765
|
const o = {};
|
|
4767
4766
|
return e.filter((i) => {
|
|
4768
4767
|
const n = t(i);
|
|
4769
4768
|
return Object.prototype.hasOwnProperty.call(o, n) ? !1 : o[n] = !0;
|
|
4770
4769
|
});
|
|
4771
4770
|
}
|
|
4772
|
-
function
|
|
4771
|
+
function ai(e) {
|
|
4773
4772
|
const t = e.filter(
|
|
4774
4773
|
(i, n) => e.indexOf(i) !== n
|
|
4775
4774
|
);
|
|
4776
|
-
return
|
|
4775
|
+
return ri(t);
|
|
4777
4776
|
}
|
|
4778
4777
|
const ce = T.create({
|
|
4779
4778
|
name: "uniqueID",
|
|
@@ -4790,7 +4789,7 @@ const ce = T.create({
|
|
|
4790
4789
|
const e = window.__TEST_OPTIONS;
|
|
4791
4790
|
return e.mockID === void 0 ? e.mockID = 0 : e.mockID++, e.mockID.toString();
|
|
4792
4791
|
}
|
|
4793
|
-
return
|
|
4792
|
+
return yo();
|
|
4794
4793
|
},
|
|
4795
4794
|
filterTransaction: null
|
|
4796
4795
|
};
|
|
@@ -4859,16 +4858,16 @@ const ce = T.create({
|
|
|
4859
4858
|
});
|
|
4860
4859
|
if (!r || a)
|
|
4861
4860
|
return;
|
|
4862
|
-
const { tr: s } = n, { types: l, attributeName: c, generateID: d } = this.options, p =
|
|
4861
|
+
const { tr: s } = n, { types: l, attributeName: c, generateID: d } = this.options, p = lo(
|
|
4863
4862
|
i.doc,
|
|
4864
4863
|
o
|
|
4865
4864
|
), { mapping: h } = p;
|
|
4866
|
-
if (
|
|
4867
|
-
const f =
|
|
4865
|
+
if (co(p).forEach(({ newRange: m }) => {
|
|
4866
|
+
const f = uo(
|
|
4868
4867
|
n.doc,
|
|
4869
4868
|
m,
|
|
4870
4869
|
(L) => l.includes(L.type.name)
|
|
4871
|
-
), b = f.map(({ node: L }) => L.attrs[c]).filter((L) => L !== null), k =
|
|
4870
|
+
), b = f.map(({ node: L }) => L.attrs[c]).filter((L) => L !== null), k = ai(b);
|
|
4872
4871
|
f.forEach(({ node: L, pos: D }) => {
|
|
4873
4872
|
let $;
|
|
4874
4873
|
const oe = ($ = s.doc.nodeAt(D)) === null || $ === void 0 ? void 0 : $.attrs[c];
|
|
@@ -4967,7 +4966,7 @@ const ce = T.create({
|
|
|
4967
4966
|
function Qe(e) {
|
|
4968
4967
|
return e.type === "link";
|
|
4969
4968
|
}
|
|
4970
|
-
function
|
|
4969
|
+
function yt(e) {
|
|
4971
4970
|
return typeof e != "string" && e.type === "link";
|
|
4972
4971
|
}
|
|
4973
4972
|
function se(e) {
|
|
@@ -4989,7 +4988,7 @@ function et(e, t, o) {
|
|
|
4989
4988
|
return e.text.split(/(\n)/g).filter((n) => n.length > 0).map((n) => n === `
|
|
4990
4989
|
` ? t.nodes.hardBreak.createChecked() : t.text(n, i));
|
|
4991
4990
|
}
|
|
4992
|
-
function
|
|
4991
|
+
function si(e, t, o) {
|
|
4993
4992
|
const i = t.marks.link.create({
|
|
4994
4993
|
href: e.href
|
|
4995
4994
|
});
|
|
@@ -5020,8 +5019,8 @@ function He(e, t, o) {
|
|
|
5020
5019
|
function N(e, t, o) {
|
|
5021
5020
|
const i = [];
|
|
5022
5021
|
for (const n of e)
|
|
5023
|
-
typeof n == "string" ? i.push(...He(n, t, o)) :
|
|
5024
|
-
|
|
5022
|
+
typeof n == "string" ? i.push(...He(n, t, o)) : yt(n) ? i.push(...si(n, t, o)) : se(n) ? i.push(...He([n], t, o)) : i.push(
|
|
5023
|
+
vt(n, t, o)
|
|
5025
5024
|
);
|
|
5026
5025
|
return i;
|
|
5027
5026
|
}
|
|
@@ -5060,7 +5059,7 @@ function ve(e, t, o) {
|
|
|
5060
5059
|
}
|
|
5061
5060
|
return i;
|
|
5062
5061
|
}
|
|
5063
|
-
function
|
|
5062
|
+
function vt(e, t, o) {
|
|
5064
5063
|
let i, n = e.type;
|
|
5065
5064
|
if (n === void 0 && (n = "paragraph"), !t.nodes[n])
|
|
5066
5065
|
throw new Error(`node type ${n} not found in schema`);
|
|
@@ -5088,7 +5087,7 @@ function W(e, t, o) {
|
|
|
5088
5087
|
n.push(W(a, t, o));
|
|
5089
5088
|
const r = t.nodes[e.type];
|
|
5090
5089
|
if (r.isInGroup("blockContent")) {
|
|
5091
|
-
const a =
|
|
5090
|
+
const a = vt(
|
|
5092
5091
|
e,
|
|
5093
5092
|
t,
|
|
5094
5093
|
o
|
|
@@ -5114,13 +5113,13 @@ function W(e, t, o) {
|
|
|
5114
5113
|
);
|
|
5115
5114
|
}
|
|
5116
5115
|
}
|
|
5117
|
-
function
|
|
5116
|
+
function wt(e) {
|
|
5118
5117
|
const t = [...e.classList].filter(
|
|
5119
5118
|
(o) => !o.startsWith("bn-")
|
|
5120
5119
|
) || [];
|
|
5121
5120
|
t.length > 0 ? e.className = t.join(" ") : e.removeAttribute("class");
|
|
5122
5121
|
}
|
|
5123
|
-
function
|
|
5122
|
+
function xt(e, t, o, i) {
|
|
5124
5123
|
let n;
|
|
5125
5124
|
if (t)
|
|
5126
5125
|
if (typeof t == "string")
|
|
@@ -5145,9 +5144,9 @@ function wt(e, t, o, i) {
|
|
|
5145
5144
|
throw new P(t.type);
|
|
5146
5145
|
else throw new Error("blockContent is required");
|
|
5147
5146
|
const r = o.serializeFragment(A.from(n), i);
|
|
5148
|
-
return r.nodeType === 1 &&
|
|
5147
|
+
return r.nodeType === 1 && wt(r), r;
|
|
5149
5148
|
}
|
|
5150
|
-
function
|
|
5149
|
+
function li(e, t, o, i, n, r, a) {
|
|
5151
5150
|
var f, b, k, L, D, $, oe, he;
|
|
5152
5151
|
const s = (a == null ? void 0 : a.document) ?? document, l = t.pmSchema.nodes.blockContainer;
|
|
5153
5152
|
let c = o.props;
|
|
@@ -5171,11 +5170,11 @@ function di(e, t, o, i, n, r, a) {
|
|
|
5171
5170
|
);
|
|
5172
5171
|
for (const v of x)
|
|
5173
5172
|
h.dom.firstChild.setAttribute(v.name, v.value);
|
|
5174
|
-
|
|
5173
|
+
wt(h.dom.firstChild), g.append(...h.dom.childNodes);
|
|
5175
5174
|
} else
|
|
5176
5175
|
g.append(h.dom);
|
|
5177
5176
|
if (h.contentDOM && o.content) {
|
|
5178
|
-
const x =
|
|
5177
|
+
const x = xt(
|
|
5179
5178
|
t,
|
|
5180
5179
|
o.content,
|
|
5181
5180
|
// TODO
|
|
@@ -5196,7 +5195,7 @@ function di(e, t, o, i, n, r, a) {
|
|
|
5196
5195
|
e.append(g);
|
|
5197
5196
|
if (o.children && o.children.length > 0) {
|
|
5198
5197
|
const x = s.createDocumentFragment();
|
|
5199
|
-
if (
|
|
5198
|
+
if (Ct(
|
|
5200
5199
|
x,
|
|
5201
5200
|
t,
|
|
5202
5201
|
o.children,
|
|
@@ -5210,9 +5209,9 @@ function di(e, t, o, i, n, r, a) {
|
|
|
5210
5209
|
t.pmSchema.nodes[o.type].isInGroup("blockContent") ? e.append(x) : (he = h.contentDOM) == null || he.append(x);
|
|
5211
5210
|
}
|
|
5212
5211
|
}
|
|
5213
|
-
const
|
|
5212
|
+
const Ct = (e, t, o, i, n, r, a) => {
|
|
5214
5213
|
for (const s of o)
|
|
5215
|
-
|
|
5214
|
+
li(
|
|
5216
5215
|
e,
|
|
5217
5216
|
t,
|
|
5218
5217
|
s,
|
|
@@ -5221,9 +5220,9 @@ const xt = (e, t, o, i, n, r, a) => {
|
|
|
5221
5220
|
r,
|
|
5222
5221
|
a
|
|
5223
5222
|
);
|
|
5224
|
-
},
|
|
5223
|
+
}, di = (e, t, o, i, n, r) => {
|
|
5225
5224
|
const s = ((r == null ? void 0 : r.document) ?? document).createDocumentFragment();
|
|
5226
|
-
return
|
|
5225
|
+
return Ct(
|
|
5227
5226
|
s,
|
|
5228
5227
|
e,
|
|
5229
5228
|
t,
|
|
@@ -5236,7 +5235,7 @@ const xt = (e, t, o, i, n, r, a) => {
|
|
|
5236
5235
|
const o = ft.fromSchema(e);
|
|
5237
5236
|
return {
|
|
5238
5237
|
exportBlocks: (i, n) => {
|
|
5239
|
-
const r =
|
|
5238
|
+
const r = di(
|
|
5240
5239
|
t,
|
|
5241
5240
|
i,
|
|
5242
5241
|
o,
|
|
@@ -5247,7 +5246,7 @@ const xt = (e, t, o, i, n, r, a) => {
|
|
|
5247
5246
|
return a.append(r), a.innerHTML;
|
|
5248
5247
|
},
|
|
5249
5248
|
exportInlineContent: (i, n) => {
|
|
5250
|
-
const r =
|
|
5249
|
+
const r = xt(
|
|
5251
5250
|
t,
|
|
5252
5251
|
i,
|
|
5253
5252
|
o,
|
|
@@ -5257,7 +5256,7 @@ const xt = (e, t, o, i, n, r, a) => {
|
|
|
5257
5256
|
}
|
|
5258
5257
|
};
|
|
5259
5258
|
};
|
|
5260
|
-
function
|
|
5259
|
+
function ci(e, t, o, i) {
|
|
5261
5260
|
let n;
|
|
5262
5261
|
if (t)
|
|
5263
5262
|
if (typeof t == "string")
|
|
@@ -5283,7 +5282,7 @@ function ui(e, t, o, i) {
|
|
|
5283
5282
|
else throw new Error("blockContent is required");
|
|
5284
5283
|
return o.serializeFragment(A.from(n), i);
|
|
5285
5284
|
}
|
|
5286
|
-
function
|
|
5285
|
+
function ui(e, t, o, i, n) {
|
|
5287
5286
|
var p, h, g, m, f;
|
|
5288
5287
|
const r = e.pmSchema.nodes.blockContainer;
|
|
5289
5288
|
let a = t.props;
|
|
@@ -5296,7 +5295,7 @@ function pi(e, t, o, i, n) {
|
|
|
5296
5295
|
}
|
|
5297
5296
|
const l = e.blockImplementations[t.type].implementation.toInternalHTML({ ...t, props: a }, e);
|
|
5298
5297
|
if (t.type === "numberedListItem" && l.dom.setAttribute("data-index", i.toString()), l.contentDOM && t.content) {
|
|
5299
|
-
const b =
|
|
5298
|
+
const b = ci(
|
|
5300
5299
|
e,
|
|
5301
5300
|
t.content,
|
|
5302
5301
|
// TODO
|
|
@@ -5307,7 +5306,7 @@ function pi(e, t, o, i, n) {
|
|
|
5307
5306
|
}
|
|
5308
5307
|
if (e.pmSchema.nodes[t.type].isInGroup("bnBlock")) {
|
|
5309
5308
|
if (t.children && t.children.length > 0) {
|
|
5310
|
-
const b =
|
|
5309
|
+
const b = Et(
|
|
5311
5310
|
e,
|
|
5312
5311
|
t.children,
|
|
5313
5312
|
o,
|
|
@@ -5325,15 +5324,15 @@ function pi(e, t, o, i, n) {
|
|
|
5325
5324
|
})
|
|
5326
5325
|
);
|
|
5327
5326
|
return (m = d.contentDOM) == null || m.appendChild(l.dom), t.children && t.children.length > 0 && ((f = d.contentDOM) == null || f.appendChild(
|
|
5328
|
-
|
|
5327
|
+
St(e, t.children, o, n)
|
|
5329
5328
|
)), d.dom;
|
|
5330
5329
|
}
|
|
5331
|
-
function
|
|
5330
|
+
function Et(e, t, o, i) {
|
|
5332
5331
|
const r = ((i == null ? void 0 : i.document) ?? document).createDocumentFragment();
|
|
5333
5332
|
let a = 0;
|
|
5334
5333
|
for (const s of t) {
|
|
5335
5334
|
s.type === "numberedListItem" ? a++ : a = 0;
|
|
5336
|
-
const l =
|
|
5335
|
+
const l = ui(
|
|
5337
5336
|
e,
|
|
5338
5337
|
s,
|
|
5339
5338
|
o,
|
|
@@ -5344,14 +5343,14 @@ function Ct(e, t, o, i) {
|
|
|
5344
5343
|
}
|
|
5345
5344
|
return r;
|
|
5346
5345
|
}
|
|
5347
|
-
const
|
|
5346
|
+
const St = (e, t, o, i) => {
|
|
5348
5347
|
var s;
|
|
5349
|
-
const n = e.pmSchema.nodes.blockGroup, r = n.spec.toDOM(n.create({})), a =
|
|
5348
|
+
const n = e.pmSchema.nodes.blockGroup, r = n.spec.toDOM(n.create({})), a = Et(e, t, o, i);
|
|
5350
5349
|
return (s = r.contentDOM) == null || s.appendChild(a), r.dom;
|
|
5351
|
-
},
|
|
5350
|
+
}, pi = (e, t) => {
|
|
5352
5351
|
const o = ft.fromSchema(e);
|
|
5353
5352
|
return {
|
|
5354
|
-
serializeBlocks: (i, n) =>
|
|
5353
|
+
serializeBlocks: (i, n) => St(t, i, o, n).outerHTML
|
|
5355
5354
|
};
|
|
5356
5355
|
};
|
|
5357
5356
|
function xe(e, t) {
|
|
@@ -5457,14 +5456,14 @@ function ee(e, t) {
|
|
|
5457
5456
|
posBeforeNode: i
|
|
5458
5457
|
};
|
|
5459
5458
|
}
|
|
5460
|
-
const
|
|
5459
|
+
const hi = () => typeof navigator < "u" && (/Mac/.test(navigator.platform) || /AppleWebKit/.test(navigator.userAgent) && /Mobile\/\w+/.test(navigator.userAgent));
|
|
5461
5460
|
function U(e, t = "Ctrl") {
|
|
5462
|
-
return
|
|
5461
|
+
return hi() ? e.replace("Mod", "⌘") : e.replace("Mod", t);
|
|
5463
5462
|
}
|
|
5464
5463
|
function R(...e) {
|
|
5465
5464
|
return e.filter((t) => t).join(" ");
|
|
5466
5465
|
}
|
|
5467
|
-
const
|
|
5466
|
+
const ja = () => /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
|
5468
5467
|
function H(e, t, o, i) {
|
|
5469
5468
|
const n = document.createElement("div");
|
|
5470
5469
|
n.className = R(
|
|
@@ -5512,18 +5511,18 @@ const tt = (e, t) => {
|
|
|
5512
5511
|
default: "left",
|
|
5513
5512
|
values: ["left", "center", "right", "justify"]
|
|
5514
5513
|
}
|
|
5515
|
-
},
|
|
5514
|
+
}, Bt = ["backgroundColor", "textColor"];
|
|
5516
5515
|
function be(e) {
|
|
5517
5516
|
return "data-" + e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
5518
5517
|
}
|
|
5519
|
-
function
|
|
5518
|
+
function Ha(e) {
|
|
5520
5519
|
const t = e.split("/");
|
|
5521
5520
|
return !t.length || // invalid?
|
|
5522
5521
|
t[t.length - 1] === "" ? e : t[t.length - 1];
|
|
5523
5522
|
}
|
|
5524
|
-
function
|
|
5523
|
+
function Mt(e) {
|
|
5525
5524
|
const t = {};
|
|
5526
|
-
return Object.entries(e).filter(([o, i]) => !
|
|
5525
|
+
return Object.entries(e).filter(([o, i]) => !Bt.includes(o)).forEach(([o, i]) => {
|
|
5527
5526
|
t[o] = {
|
|
5528
5527
|
default: i.default,
|
|
5529
5528
|
keepOnSplit: !0,
|
|
@@ -5548,7 +5547,7 @@ function Bt(e) {
|
|
|
5548
5547
|
};
|
|
5549
5548
|
}), t;
|
|
5550
5549
|
}
|
|
5551
|
-
function
|
|
5550
|
+
function mi(e, t, o, i) {
|
|
5552
5551
|
if (typeof e == "boolean")
|
|
5553
5552
|
throw new Error(
|
|
5554
5553
|
"Cannot find node position as getPos is a boolean, not a function."
|
|
@@ -5571,7 +5570,7 @@ function me(e, t, o, i, n = !1, r) {
|
|
|
5571
5570
|
(r == null ? void 0 : r.class) || ""
|
|
5572
5571
|
), a.setAttribute("data-content-type", t);
|
|
5573
5572
|
for (const [s, l] of Object.entries(o))
|
|
5574
|
-
!
|
|
5573
|
+
!Bt.includes(s) && l !== i[s].default && a.setAttribute(be(s), l);
|
|
5575
5574
|
return n && a.setAttribute("data-file-block", ""), a.appendChild(e.dom), e.contentDOM !== void 0 && (e.contentDOM.className = R(
|
|
5576
5575
|
"bn-inline-content",
|
|
5577
5576
|
e.contentDOM.className
|
|
@@ -5583,14 +5582,14 @@ function me(e, t, o, i, n = !1, r) {
|
|
|
5583
5582
|
function z(e) {
|
|
5584
5583
|
return G.create(e);
|
|
5585
5584
|
}
|
|
5586
|
-
function
|
|
5585
|
+
function Tt(e, t) {
|
|
5587
5586
|
return {
|
|
5588
5587
|
config: e,
|
|
5589
5588
|
implementation: t
|
|
5590
5589
|
};
|
|
5591
5590
|
}
|
|
5592
5591
|
function V(e, t, o) {
|
|
5593
|
-
return
|
|
5592
|
+
return Tt(
|
|
5594
5593
|
{
|
|
5595
5594
|
type: e.name,
|
|
5596
5595
|
content: e.config.content === "inline*" ? "inline" : e.config.content === "tableRow+" ? "table" : "none",
|
|
@@ -5605,17 +5604,17 @@ function V(e, t, o) {
|
|
|
5605
5604
|
}
|
|
5606
5605
|
);
|
|
5607
5606
|
}
|
|
5608
|
-
function
|
|
5607
|
+
function Lt(e) {
|
|
5609
5608
|
return Object.fromEntries(
|
|
5610
5609
|
Object.entries(e).map(([t, o]) => [t, o.config])
|
|
5611
5610
|
);
|
|
5612
5611
|
}
|
|
5613
|
-
function
|
|
5612
|
+
function fi(e, t) {
|
|
5614
5613
|
e.stopEvent = (o) => (o.type === "mousedown" && setTimeout(() => {
|
|
5615
5614
|
t.view.dom.blur();
|
|
5616
5615
|
}, 10), !0);
|
|
5617
5616
|
}
|
|
5618
|
-
function
|
|
5617
|
+
function gi(e, t) {
|
|
5619
5618
|
const o = [
|
|
5620
5619
|
{
|
|
5621
5620
|
tag: "[data-content-type=" + e.type + "]",
|
|
@@ -5639,10 +5638,10 @@ function Ce(e, t) {
|
|
|
5639
5638
|
group: "blockContent",
|
|
5640
5639
|
selectable: e.isSelectable ?? !0,
|
|
5641
5640
|
addAttributes() {
|
|
5642
|
-
return
|
|
5641
|
+
return Mt(e.propSchema);
|
|
5643
5642
|
},
|
|
5644
5643
|
parseHTML() {
|
|
5645
|
-
return
|
|
5644
|
+
return gi(e, t.parse);
|
|
5646
5645
|
},
|
|
5647
5646
|
renderHTML({ HTMLAttributes: i }) {
|
|
5648
5647
|
const n = document.createElement("div");
|
|
@@ -5661,7 +5660,7 @@ function Ce(e, t) {
|
|
|
5661
5660
|
addNodeView() {
|
|
5662
5661
|
return ({ getPos: i }) => {
|
|
5663
5662
|
var c;
|
|
5664
|
-
const n = this.options.editor, r =
|
|
5663
|
+
const n = this.options.editor, r = mi(
|
|
5665
5664
|
i,
|
|
5666
5665
|
n,
|
|
5667
5666
|
this.editor,
|
|
@@ -5673,7 +5672,7 @@ function Ce(e, t) {
|
|
|
5673
5672
|
e.propSchema,
|
|
5674
5673
|
a
|
|
5675
5674
|
);
|
|
5676
|
-
return e.isSelectable === !1 &&
|
|
5675
|
+
return e.isSelectable === !1 && fi(l, this.editor), l;
|
|
5677
5676
|
};
|
|
5678
5677
|
}
|
|
5679
5678
|
});
|
|
@@ -5681,7 +5680,7 @@ function Ce(e, t) {
|
|
|
5681
5680
|
throw new Error(
|
|
5682
5681
|
"Node name does not match block type. This is a bug in BlockNote."
|
|
5683
5682
|
);
|
|
5684
|
-
return
|
|
5683
|
+
return Tt(e, {
|
|
5685
5684
|
node: o,
|
|
5686
5685
|
toInternalHTML: (i, n) => {
|
|
5687
5686
|
var s;
|
|
@@ -5715,7 +5714,7 @@ function Ce(e, t) {
|
|
|
5715
5714
|
}
|
|
5716
5715
|
});
|
|
5717
5716
|
}
|
|
5718
|
-
function
|
|
5717
|
+
function It(e, t, o) {
|
|
5719
5718
|
const i = {
|
|
5720
5719
|
type: "tableContent",
|
|
5721
5720
|
columnWidths: [],
|
|
@@ -5903,7 +5902,7 @@ function w(e, t, o, i, n) {
|
|
|
5903
5902
|
} else if (d.content === "table") {
|
|
5904
5903
|
if (!a.isBlockContainer)
|
|
5905
5904
|
throw new Error("impossible");
|
|
5906
|
-
h =
|
|
5905
|
+
h = It(
|
|
5907
5906
|
a.blockContent.node,
|
|
5908
5907
|
o,
|
|
5909
5908
|
i
|
|
@@ -5924,7 +5923,7 @@ function w(e, t, o, i, n) {
|
|
|
5924
5923
|
function ot(e, t, o, i) {
|
|
5925
5924
|
return e.dom.setAttribute("data-inline-content-type", t), Object.entries(o).filter(([n, r]) => r !== i[n].default).map(([n, r]) => [be(n), r]).forEach(([n, r]) => e.dom.setAttribute(n, r)), e.contentDOM !== void 0 && e.contentDOM.setAttribute("data-editable", ""), e;
|
|
5926
5925
|
}
|
|
5927
|
-
function
|
|
5926
|
+
function bi(e) {
|
|
5928
5927
|
return {
|
|
5929
5928
|
Backspace: ({ editor: t }) => {
|
|
5930
5929
|
const o = t.state.selection.$from;
|
|
@@ -5932,14 +5931,14 @@ function ki(e) {
|
|
|
5932
5931
|
}
|
|
5933
5932
|
};
|
|
5934
5933
|
}
|
|
5935
|
-
function
|
|
5934
|
+
function ki(e, t) {
|
|
5936
5935
|
return {
|
|
5937
5936
|
config: e,
|
|
5938
5937
|
implementation: t
|
|
5939
5938
|
};
|
|
5940
5939
|
}
|
|
5941
|
-
function
|
|
5942
|
-
return
|
|
5940
|
+
function _i(e, t) {
|
|
5941
|
+
return ki(
|
|
5943
5942
|
{
|
|
5944
5943
|
type: e.name,
|
|
5945
5944
|
propSchema: t,
|
|
@@ -5950,12 +5949,12 @@ function yi(e, t) {
|
|
|
5950
5949
|
}
|
|
5951
5950
|
);
|
|
5952
5951
|
}
|
|
5953
|
-
function
|
|
5952
|
+
function At(e) {
|
|
5954
5953
|
return Object.fromEntries(
|
|
5955
5954
|
Object.entries(e).map(([t, o]) => [t, o.config])
|
|
5956
5955
|
);
|
|
5957
5956
|
}
|
|
5958
|
-
function
|
|
5957
|
+
function yi(e) {
|
|
5959
5958
|
return [
|
|
5960
5959
|
{
|
|
5961
5960
|
tag: `[data-inline-content-type="${e.type}"]`,
|
|
@@ -5966,7 +5965,7 @@ function vi(e) {
|
|
|
5966
5965
|
}
|
|
5967
5966
|
];
|
|
5968
5967
|
}
|
|
5969
|
-
function
|
|
5968
|
+
function Da(e, t) {
|
|
5970
5969
|
const o = G.create({
|
|
5971
5970
|
name: e.type,
|
|
5972
5971
|
inline: !0,
|
|
@@ -5975,13 +5974,13 @@ function Oa(e, t) {
|
|
|
5975
5974
|
atom: e.content === "none",
|
|
5976
5975
|
content: e.content === "styled" ? "inline*" : "",
|
|
5977
5976
|
addAttributes() {
|
|
5978
|
-
return
|
|
5977
|
+
return Mt(e.propSchema);
|
|
5979
5978
|
},
|
|
5980
5979
|
addKeyboardShortcuts() {
|
|
5981
|
-
return
|
|
5980
|
+
return bi(e);
|
|
5982
5981
|
},
|
|
5983
5982
|
parseHTML() {
|
|
5984
|
-
return
|
|
5983
|
+
return yi(e);
|
|
5985
5984
|
},
|
|
5986
5985
|
renderHTML({ node: i }) {
|
|
5987
5986
|
const n = this.options.editor, r = t.render(
|
|
@@ -6038,12 +6037,12 @@ function Oa(e, t) {
|
|
|
6038
6037
|
};
|
|
6039
6038
|
}
|
|
6040
6039
|
});
|
|
6041
|
-
return
|
|
6040
|
+
return _i(
|
|
6042
6041
|
o,
|
|
6043
6042
|
e.propSchema
|
|
6044
6043
|
);
|
|
6045
6044
|
}
|
|
6046
|
-
function
|
|
6045
|
+
function vi(e) {
|
|
6047
6046
|
return e === "boolean" ? {} : {
|
|
6048
6047
|
stringValue: {
|
|
6049
6048
|
default: void 0,
|
|
@@ -6055,17 +6054,17 @@ function wi(e) {
|
|
|
6055
6054
|
}
|
|
6056
6055
|
};
|
|
6057
6056
|
}
|
|
6058
|
-
function
|
|
6057
|
+
function wi(e, t, o, i) {
|
|
6059
6058
|
return e.dom.setAttribute("data-style-type", t), i === "string" && e.dom.setAttribute("data-value", o), e.contentDOM !== void 0 && e.contentDOM.setAttribute("data-editable", ""), e;
|
|
6060
6059
|
}
|
|
6061
|
-
function
|
|
6060
|
+
function Pt(e, t) {
|
|
6062
6061
|
return {
|
|
6063
6062
|
config: e,
|
|
6064
6063
|
implementation: t
|
|
6065
6064
|
};
|
|
6066
6065
|
}
|
|
6067
6066
|
function F(e, t) {
|
|
6068
|
-
return
|
|
6067
|
+
return Pt(
|
|
6069
6068
|
{
|
|
6070
6069
|
type: e.name,
|
|
6071
6070
|
propSchema: t
|
|
@@ -6075,12 +6074,12 @@ function F(e, t) {
|
|
|
6075
6074
|
}
|
|
6076
6075
|
);
|
|
6077
6076
|
}
|
|
6078
|
-
function
|
|
6077
|
+
function Nt(e) {
|
|
6079
6078
|
return Object.fromEntries(
|
|
6080
6079
|
Object.entries(e).map(([t, o]) => [t, o.config])
|
|
6081
6080
|
);
|
|
6082
6081
|
}
|
|
6083
|
-
function
|
|
6082
|
+
function xi(e) {
|
|
6084
6083
|
return [
|
|
6085
6084
|
{
|
|
6086
6085
|
tag: `[data-style-type="${e.type}"]`,
|
|
@@ -6091,14 +6090,14 @@ function Ci(e) {
|
|
|
6091
6090
|
}
|
|
6092
6091
|
];
|
|
6093
6092
|
}
|
|
6094
|
-
function
|
|
6093
|
+
function Ua(e, t) {
|
|
6095
6094
|
const o = ye.create({
|
|
6096
6095
|
name: e.type,
|
|
6097
6096
|
addAttributes() {
|
|
6098
|
-
return
|
|
6097
|
+
return vi(e.propSchema);
|
|
6099
6098
|
},
|
|
6100
6099
|
parseHTML() {
|
|
6101
|
-
return
|
|
6100
|
+
return xi(e);
|
|
6102
6101
|
},
|
|
6103
6102
|
renderHTML({ mark: i }) {
|
|
6104
6103
|
let n;
|
|
@@ -6108,7 +6107,7 @@ function Ra(e, t) {
|
|
|
6108
6107
|
n = t.render(i.attrs.stringValue);
|
|
6109
6108
|
else
|
|
6110
6109
|
throw new P(e.propSchema);
|
|
6111
|
-
return
|
|
6110
|
+
return wi(
|
|
6112
6111
|
n,
|
|
6113
6112
|
e.type,
|
|
6114
6113
|
i.attrs.stringValue,
|
|
@@ -6116,14 +6115,14 @@ function Ra(e, t) {
|
|
|
6116
6115
|
);
|
|
6117
6116
|
}
|
|
6118
6117
|
});
|
|
6119
|
-
return
|
|
6118
|
+
return Pt(e, {
|
|
6120
6119
|
mark: o
|
|
6121
6120
|
});
|
|
6122
6121
|
}
|
|
6123
|
-
const
|
|
6122
|
+
const Ci = '<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>', Se = (e, t, o, i, n) => {
|
|
6124
6123
|
const r = document.createElement("div");
|
|
6125
6124
|
if (r.className = "bn-file-block-content-wrapper", e.props.url === "") {
|
|
6126
|
-
const a =
|
|
6125
|
+
const a = Ei(
|
|
6127
6126
|
e,
|
|
6128
6127
|
t,
|
|
6129
6128
|
i,
|
|
@@ -6145,7 +6144,7 @@ const Ei = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="cu
|
|
|
6145
6144
|
}
|
|
6146
6145
|
};
|
|
6147
6146
|
} else if (e.props.showPreview === !1) {
|
|
6148
|
-
const a =
|
|
6147
|
+
const a = jt(e).dom;
|
|
6149
6148
|
return {
|
|
6150
6149
|
dom: pe(e, a).dom
|
|
6151
6150
|
};
|
|
@@ -6154,11 +6153,11 @@ const Ei = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="cu
|
|
|
6154
6153
|
dom: r,
|
|
6155
6154
|
destroy: o.destroy
|
|
6156
6155
|
};
|
|
6157
|
-
},
|
|
6156
|
+
}, jt = (e) => {
|
|
6158
6157
|
const t = document.createElement("div");
|
|
6159
6158
|
t.className = "bn-file-default-preview";
|
|
6160
6159
|
const o = document.createElement("div");
|
|
6161
|
-
o.className = "bn-file-default-preview-icon", o.innerHTML =
|
|
6160
|
+
o.className = "bn-file-default-preview-icon", o.innerHTML = Ci;
|
|
6162
6161
|
const i = document.createElement("p");
|
|
6163
6162
|
return i.className = "bn-file-default-preview-name", i.textContent = e.props.name || "", t.appendChild(o), t.appendChild(i), {
|
|
6164
6163
|
dom: t
|
|
@@ -6170,7 +6169,7 @@ const Ei = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="cu
|
|
|
6170
6169
|
return i.className = "bn-file-caption", i.textContent = e.props.caption, typeof e.props.previewWidth == "number" && e.props.previewWidth > 0 && e.props.caption !== void 0 && (i.style.width = `${e.props.previewWidth}px`), o.appendChild(t), o.appendChild(i), {
|
|
6171
6170
|
dom: o
|
|
6172
6171
|
};
|
|
6173
|
-
},
|
|
6172
|
+
}, Ei = (e, t, o, i) => {
|
|
6174
6173
|
const n = document.createElement("div");
|
|
6175
6174
|
n.className = "bn-add-file-button";
|
|
6176
6175
|
const r = document.createElement("div");
|
|
@@ -6220,7 +6219,7 @@ const Ei = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="cu
|
|
|
6220
6219
|
}, Fe = (e, t) => {
|
|
6221
6220
|
const o = document.createElement("figure"), i = document.createElement("figcaption");
|
|
6222
6221
|
return i.textContent = t, o.appendChild(e), o.appendChild(i), { dom: o };
|
|
6223
|
-
},
|
|
6222
|
+
}, Ht = (e, t, o, i, n) => {
|
|
6224
6223
|
if (!e.props.previewWidth)
|
|
6225
6224
|
throw new Error("Block must have a `previewWidth` prop.");
|
|
6226
6225
|
const r = document.createElement("div");
|
|
@@ -6280,7 +6279,7 @@ const Ei = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="cu
|
|
|
6280
6279
|
);
|
|
6281
6280
|
}
|
|
6282
6281
|
};
|
|
6283
|
-
}, nt = (e) => ({ url: e.src || void 0 }),
|
|
6282
|
+
}, nt = (e) => ({ url: e.src || void 0 }), Si = '<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>', Bi = {
|
|
6284
6283
|
backgroundColor: y.backgroundColor,
|
|
6285
6284
|
// File name.
|
|
6286
6285
|
name: {
|
|
@@ -6297,15 +6296,15 @@ const Ei = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="cu
|
|
|
6297
6296
|
showPreview: {
|
|
6298
6297
|
default: !0
|
|
6299
6298
|
}
|
|
6300
|
-
},
|
|
6299
|
+
}, Mi = {
|
|
6301
6300
|
type: "audio",
|
|
6302
|
-
propSchema:
|
|
6301
|
+
propSchema: Bi,
|
|
6303
6302
|
content: "none",
|
|
6304
6303
|
isFileBlock: !0,
|
|
6305
6304
|
fileBlockAccept: ["audio/*"]
|
|
6306
|
-
},
|
|
6305
|
+
}, Ti = (e, t) => {
|
|
6307
6306
|
const o = document.createElement("div");
|
|
6308
|
-
o.innerHTML =
|
|
6307
|
+
o.innerHTML = Si;
|
|
6309
6308
|
const i = document.createElement("audio");
|
|
6310
6309
|
i.className = "bn-audio", t.resolveFileUrl(e.props.url).then((r) => {
|
|
6311
6310
|
i.src = r;
|
|
@@ -6318,7 +6317,7 @@ const Ei = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="cu
|
|
|
6318
6317
|
t.dictionary.file_blocks.audio.add_button_text,
|
|
6319
6318
|
o.firstElementChild
|
|
6320
6319
|
);
|
|
6321
|
-
},
|
|
6320
|
+
}, Li = (e) => {
|
|
6322
6321
|
if (e.tagName === "AUDIO")
|
|
6323
6322
|
return nt(e);
|
|
6324
6323
|
if (e.tagName === "FIGURE") {
|
|
@@ -6331,7 +6330,7 @@ const Ei = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="cu
|
|
|
6331
6330
|
caption: i
|
|
6332
6331
|
};
|
|
6333
6332
|
}
|
|
6334
|
-
},
|
|
6333
|
+
}, Ii = (e) => {
|
|
6335
6334
|
if (!e.props.url) {
|
|
6336
6335
|
const o = document.createElement("p");
|
|
6337
6336
|
return o.textContent = "Add audio", {
|
|
@@ -6342,38 +6341,58 @@ const Ei = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="cu
|
|
|
6342
6341
|
return e.props.showPreview ? (t = document.createElement("audio"), t.src = e.props.url) : (t = document.createElement("a"), t.href = e.props.url, t.textContent = e.props.name || e.props.url), e.props.caption ? e.props.showPreview ? Fe(t, e.props.caption) : Me(t, e.props.caption) : {
|
|
6343
6342
|
dom: t
|
|
6344
6343
|
};
|
|
6345
|
-
},
|
|
6346
|
-
render:
|
|
6347
|
-
parse:
|
|
6348
|
-
toExternalHTML:
|
|
6349
|
-
}),
|
|
6344
|
+
}, Ai = Ce(Mi, {
|
|
6345
|
+
render: Ti,
|
|
6346
|
+
parse: Li,
|
|
6347
|
+
toExternalHTML: Ii
|
|
6348
|
+
}), Dt = [
|
|
6350
6349
|
{
|
|
6351
6350
|
id: "text",
|
|
6352
6351
|
name: "Plain Text",
|
|
6353
6352
|
match: ["text", "txt", "plain"]
|
|
6354
6353
|
},
|
|
6355
|
-
...
|
|
6356
|
-
"
|
|
6357
|
-
"
|
|
6358
|
-
"
|
|
6359
|
-
"
|
|
6360
|
-
"
|
|
6361
|
-
"
|
|
6362
|
-
"html
|
|
6363
|
-
"
|
|
6364
|
-
"
|
|
6365
|
-
"
|
|
6366
|
-
"
|
|
6367
|
-
"
|
|
6368
|
-
"
|
|
6369
|
-
"
|
|
6370
|
-
"
|
|
6371
|
-
"
|
|
6354
|
+
...bt.filter((e) => [
|
|
6355
|
+
"c",
|
|
6356
|
+
"cpp",
|
|
6357
|
+
"css",
|
|
6358
|
+
"glsl",
|
|
6359
|
+
"graphql",
|
|
6360
|
+
"haml",
|
|
6361
|
+
"html",
|
|
6362
|
+
"java",
|
|
6363
|
+
"javascript",
|
|
6364
|
+
"json",
|
|
6365
|
+
"jsonc",
|
|
6366
|
+
"jsonl",
|
|
6367
|
+
"jsx",
|
|
6368
|
+
"julia",
|
|
6369
|
+
"less",
|
|
6370
|
+
"markdown",
|
|
6371
|
+
"mdx",
|
|
6372
|
+
"php",
|
|
6373
|
+
"postcss",
|
|
6374
|
+
"pug",
|
|
6375
|
+
"python",
|
|
6376
|
+
"r",
|
|
6377
|
+
"regexp",
|
|
6378
|
+
"sass",
|
|
6379
|
+
"scss",
|
|
6380
|
+
"shellscript",
|
|
6381
|
+
"sql",
|
|
6382
|
+
"svelte",
|
|
6383
|
+
"typescript",
|
|
6384
|
+
"vue",
|
|
6385
|
+
"vue-html",
|
|
6386
|
+
"wasm",
|
|
6387
|
+
"wgsl",
|
|
6388
|
+
"xml",
|
|
6389
|
+
"yaml"
|
|
6372
6390
|
].includes(e.id)).map((e) => ({
|
|
6373
6391
|
match: [e.id, ...e.aliases || []],
|
|
6374
6392
|
id: e.id,
|
|
6375
6393
|
name: e.name
|
|
6376
6394
|
})),
|
|
6395
|
+
{ id: "tsx", name: "TSX", match: ["tsx", "typescriptreact"] },
|
|
6377
6396
|
{
|
|
6378
6397
|
id: "haskell",
|
|
6379
6398
|
name: "Haskell",
|
|
@@ -6432,9 +6451,9 @@ const Ei = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="cu
|
|
|
6432
6451
|
], Ue = {
|
|
6433
6452
|
language: {
|
|
6434
6453
|
default: "javascript",
|
|
6435
|
-
values: [...
|
|
6454
|
+
values: [...Dt.map((e) => e.id)]
|
|
6436
6455
|
}
|
|
6437
|
-
},
|
|
6456
|
+
}, Ut = z({
|
|
6438
6457
|
name: "codeBlock",
|
|
6439
6458
|
content: "inline*",
|
|
6440
6459
|
group: "blockContent",
|
|
@@ -6445,24 +6464,29 @@ const Ei = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="cu
|
|
|
6445
6464
|
return {
|
|
6446
6465
|
defaultLanguage: "javascript",
|
|
6447
6466
|
indentLineWithTab: !0,
|
|
6448
|
-
supportedLanguages:
|
|
6467
|
+
supportedLanguages: Dt
|
|
6449
6468
|
};
|
|
6450
6469
|
},
|
|
6451
6470
|
addAttributes() {
|
|
6471
|
+
const e = this.options.supportedLanguages;
|
|
6452
6472
|
return {
|
|
6453
6473
|
language: {
|
|
6454
6474
|
default: this.options.defaultLanguage,
|
|
6455
|
-
parseHTML: (
|
|
6456
|
-
|
|
6457
|
-
|
|
6458
|
-
|
|
6459
|
-
|
|
6460
|
-
|
|
6461
|
-
|
|
6462
|
-
|
|
6475
|
+
parseHTML: (t) => {
|
|
6476
|
+
var r;
|
|
6477
|
+
let o = t, i = null;
|
|
6478
|
+
(o == null ? void 0 : o.tagName) === "DIV" && (o == null ? void 0 : o.dataset.contentType) === "codeBlock" && (o = o.children[0]), (o == null ? void 0 : o.tagName) === "PRE" && (o = o == null ? void 0 : o.children[0]);
|
|
6479
|
+
const n = o == null ? void 0 : o.getAttribute("data-language");
|
|
6480
|
+
if (n)
|
|
6481
|
+
i = n.toLowerCase();
|
|
6482
|
+
else {
|
|
6483
|
+
const s = [...(o == null ? void 0 : o.className.split(" ")) || []].filter((c) => c.startsWith("language-")).map((c) => c.replace("language-", "")), [l] = s;
|
|
6484
|
+
i = l.toLowerCase();
|
|
6485
|
+
}
|
|
6486
|
+
return i ? ((r = e.find(({ match: a }) => a.includes(i))) == null ? void 0 : r.id) || this.options.defaultLanguage : null;
|
|
6463
6487
|
},
|
|
6464
|
-
renderHTML: (
|
|
6465
|
-
class: `language-${
|
|
6488
|
+
renderHTML: (t) => t.language && t.language !== "text" ? {
|
|
6489
|
+
class: `language-${t.language}`
|
|
6466
6490
|
} : {}
|
|
6467
6491
|
}
|
|
6468
6492
|
};
|
|
@@ -6526,17 +6550,17 @@ const Ei = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="cu
|
|
|
6526
6550
|
addProseMirrorPlugins() {
|
|
6527
6551
|
let e, t;
|
|
6528
6552
|
const o = this.options.supportedLanguages;
|
|
6529
|
-
return [
|
|
6553
|
+
return [vo({
|
|
6530
6554
|
parser: (r) => {
|
|
6531
6555
|
if (!e)
|
|
6532
|
-
return
|
|
6556
|
+
return xo({
|
|
6533
6557
|
themes: ["github-dark"],
|
|
6534
6558
|
langs: []
|
|
6535
6559
|
}).then((s) => {
|
|
6536
6560
|
e = s;
|
|
6537
6561
|
});
|
|
6538
6562
|
const a = r.language;
|
|
6539
|
-
return a && a !== "text" && !e.getLoadedLanguages().includes(a) && o.find(({ id: s }) => s === a) &&
|
|
6563
|
+
return a && a !== "text" && !e.getLoadedLanguages().includes(a) && o.find(({ id: s }) => s === a) && bt.find(({ id: s }) => s === a) ? e.loadLanguage(a) : (t || (t = wo(e)), t(r));
|
|
6540
6564
|
},
|
|
6541
6565
|
languageExtractor: (r) => r.attrs.language,
|
|
6542
6566
|
nodeTypes: [this.name]
|
|
@@ -6595,14 +6619,14 @@ const Ei = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="cu
|
|
|
6595
6619
|
}
|
|
6596
6620
|
};
|
|
6597
6621
|
}
|
|
6598
|
-
}),
|
|
6599
|
-
|
|
6622
|
+
}), Pi = V(
|
|
6623
|
+
Ut,
|
|
6600
6624
|
Ue
|
|
6601
6625
|
);
|
|
6602
|
-
function
|
|
6626
|
+
function Oa(e) {
|
|
6603
6627
|
var t;
|
|
6604
6628
|
return V(
|
|
6605
|
-
|
|
6629
|
+
Ut.configure(e),
|
|
6606
6630
|
{
|
|
6607
6631
|
language: {
|
|
6608
6632
|
default: e.defaultLanguage || Ue.language.default,
|
|
@@ -6611,7 +6635,7 @@ function za(e) {
|
|
|
6611
6635
|
}
|
|
6612
6636
|
);
|
|
6613
6637
|
}
|
|
6614
|
-
const
|
|
6638
|
+
const Ni = {
|
|
6615
6639
|
backgroundColor: y.backgroundColor,
|
|
6616
6640
|
// File name.
|
|
6617
6641
|
name: {
|
|
@@ -6625,15 +6649,15 @@ const ji = {
|
|
|
6625
6649
|
caption: {
|
|
6626
6650
|
default: ""
|
|
6627
6651
|
}
|
|
6628
|
-
},
|
|
6652
|
+
}, ji = {
|
|
6629
6653
|
type: "file",
|
|
6630
|
-
propSchema:
|
|
6654
|
+
propSchema: Ni,
|
|
6631
6655
|
content: "none",
|
|
6632
6656
|
isFileBlock: !0
|
|
6633
|
-
},
|
|
6634
|
-
const o =
|
|
6657
|
+
}, Hi = (e, t) => {
|
|
6658
|
+
const o = jt(e).dom, i = pe(e, o);
|
|
6635
6659
|
return Se(e, t, i);
|
|
6636
|
-
},
|
|
6660
|
+
}, Di = (e) => {
|
|
6637
6661
|
if (e.tagName === "EMBED")
|
|
6638
6662
|
return it(e);
|
|
6639
6663
|
if (e.tagName === "FIGURE") {
|
|
@@ -6646,7 +6670,7 @@ const ji = {
|
|
|
6646
6670
|
caption: i
|
|
6647
6671
|
};
|
|
6648
6672
|
}
|
|
6649
|
-
},
|
|
6673
|
+
}, Ui = (e) => {
|
|
6650
6674
|
if (!e.props.url) {
|
|
6651
6675
|
const o = document.createElement("p");
|
|
6652
6676
|
return o.textContent = "Add file", {
|
|
@@ -6657,11 +6681,11 @@ const ji = {
|
|
|
6657
6681
|
return t.href = e.props.url, t.textContent = e.props.name || e.props.url, e.props.caption ? Me(t, e.props.caption) : {
|
|
6658
6682
|
dom: t
|
|
6659
6683
|
};
|
|
6660
|
-
},
|
|
6661
|
-
render:
|
|
6662
|
-
parse:
|
|
6663
|
-
toExternalHTML:
|
|
6664
|
-
}),
|
|
6684
|
+
}, Oi = Ce(ji, {
|
|
6685
|
+
render: Hi,
|
|
6686
|
+
parse: Di,
|
|
6687
|
+
toExternalHTML: Ui
|
|
6688
|
+
}), Ra = async (e) => {
|
|
6665
6689
|
const t = new FormData();
|
|
6666
6690
|
return t.append("file", e), (await (await fetch("https://tmpfiles.org/api/v1/upload", {
|
|
6667
6691
|
method: "POST",
|
|
@@ -6673,7 +6697,7 @@ const ji = {
|
|
|
6673
6697
|
}, rt = (e) => {
|
|
6674
6698
|
const t = e.src || void 0, o = e.width || void 0;
|
|
6675
6699
|
return { url: t, previewWidth: o };
|
|
6676
|
-
},
|
|
6700
|
+
}, Ri = '<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>', zi = {
|
|
6677
6701
|
textAlignment: y.textAlignment,
|
|
6678
6702
|
backgroundColor: y.backgroundColor,
|
|
6679
6703
|
// File name.
|
|
@@ -6695,15 +6719,15 @@ const ji = {
|
|
|
6695
6719
|
previewWidth: {
|
|
6696
6720
|
default: 512
|
|
6697
6721
|
}
|
|
6698
|
-
},
|
|
6722
|
+
}, Vi = {
|
|
6699
6723
|
type: "image",
|
|
6700
|
-
propSchema:
|
|
6724
|
+
propSchema: zi,
|
|
6701
6725
|
content: "none",
|
|
6702
6726
|
isFileBlock: !0,
|
|
6703
6727
|
fileBlockAccept: ["image/*"]
|
|
6704
|
-
},
|
|
6728
|
+
}, Fi = (e, t) => {
|
|
6705
6729
|
const o = document.createElement("div");
|
|
6706
|
-
o.innerHTML =
|
|
6730
|
+
o.innerHTML = Ri;
|
|
6707
6731
|
const i = document.createElement("img");
|
|
6708
6732
|
i.className = "bn-visual-media", t.resolveFileUrl(e.props.url).then((a) => {
|
|
6709
6733
|
i.src = a;
|
|
@@ -6711,7 +6735,7 @@ const ji = {
|
|
|
6711
6735
|
e.props.previewWidth,
|
|
6712
6736
|
t.domElement.firstElementChild.clientWidth
|
|
6713
6737
|
);
|
|
6714
|
-
const n =
|
|
6738
|
+
const n = Ht(
|
|
6715
6739
|
e,
|
|
6716
6740
|
t,
|
|
6717
6741
|
i,
|
|
@@ -6725,7 +6749,7 @@ const ji = {
|
|
|
6725
6749
|
t.dictionary.file_blocks.image.add_button_text,
|
|
6726
6750
|
o.firstElementChild
|
|
6727
6751
|
);
|
|
6728
|
-
},
|
|
6752
|
+
}, Gi = (e) => {
|
|
6729
6753
|
if (e.tagName === "IMG")
|
|
6730
6754
|
return rt(e);
|
|
6731
6755
|
if (e.tagName === "FIGURE") {
|
|
@@ -6738,7 +6762,7 @@ const ji = {
|
|
|
6738
6762
|
caption: i
|
|
6739
6763
|
};
|
|
6740
6764
|
}
|
|
6741
|
-
},
|
|
6765
|
+
}, Wi = (e) => {
|
|
6742
6766
|
if (!e.props.url) {
|
|
6743
6767
|
const o = document.createElement("p");
|
|
6744
6768
|
return o.textContent = "Add image", {
|
|
@@ -6749,22 +6773,22 @@ const ji = {
|
|
|
6749
6773
|
return e.props.showPreview ? (t = document.createElement("img"), t.src = e.props.url, t.alt = e.props.name || e.props.caption || "BlockNote image", t.width = e.props.previewWidth) : (t = document.createElement("a"), t.href = e.props.url, t.textContent = e.props.name || e.props.url), e.props.caption ? e.props.showPreview ? Fe(t, e.props.caption) : Me(t, e.props.caption) : {
|
|
6750
6774
|
dom: t
|
|
6751
6775
|
};
|
|
6752
|
-
},
|
|
6753
|
-
render:
|
|
6754
|
-
parse:
|
|
6755
|
-
toExternalHTML:
|
|
6756
|
-
}),
|
|
6776
|
+
}, $i = Ce(Vi, {
|
|
6777
|
+
render: Fi,
|
|
6778
|
+
parse: Gi,
|
|
6779
|
+
toExternalHTML: Wi
|
|
6780
|
+
}), Ki = 35, Ot = 120, za = 31, qi = T.create({
|
|
6757
6781
|
name: "BlockNoteTableExtension",
|
|
6758
6782
|
addProseMirrorPlugins: () => [
|
|
6759
|
-
|
|
6760
|
-
cellMinWidth:
|
|
6761
|
-
defaultCellMinWidth:
|
|
6783
|
+
Co({
|
|
6784
|
+
cellMinWidth: Ki,
|
|
6785
|
+
defaultCellMinWidth: Ot,
|
|
6762
6786
|
// We set this to null as we implement our own node view in the table
|
|
6763
6787
|
// block content. This node view is the same as what's used by default,
|
|
6764
6788
|
// but is wrapped in a `blockContent` HTML element.
|
|
6765
6789
|
View: null
|
|
6766
6790
|
}),
|
|
6767
|
-
|
|
6791
|
+
Eo()
|
|
6768
6792
|
],
|
|
6769
6793
|
addKeyboardShortcuts() {
|
|
6770
6794
|
return {
|
|
@@ -6785,15 +6809,15 @@ const ji = {
|
|
|
6785
6809
|
storage: e.storage
|
|
6786
6810
|
};
|
|
6787
6811
|
return {
|
|
6788
|
-
tableRole:
|
|
6789
|
-
|
|
6812
|
+
tableRole: po(
|
|
6813
|
+
ho(e, "tableRole", t)
|
|
6790
6814
|
)
|
|
6791
6815
|
};
|
|
6792
6816
|
}
|
|
6793
6817
|
}), at = (e) => {
|
|
6794
6818
|
const t = e.src || void 0, o = e.width || void 0;
|
|
6795
6819
|
return { url: t, previewWidth: o };
|
|
6796
|
-
},
|
|
6820
|
+
}, Xi = '<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>', Zi = {
|
|
6797
6821
|
textAlignment: y.textAlignment,
|
|
6798
6822
|
backgroundColor: y.backgroundColor,
|
|
6799
6823
|
// File name.
|
|
@@ -6815,21 +6839,21 @@ const ji = {
|
|
|
6815
6839
|
previewWidth: {
|
|
6816
6840
|
default: 512
|
|
6817
6841
|
}
|
|
6818
|
-
},
|
|
6842
|
+
}, Ji = {
|
|
6819
6843
|
type: "video",
|
|
6820
|
-
propSchema:
|
|
6844
|
+
propSchema: Zi,
|
|
6821
6845
|
content: "none",
|
|
6822
6846
|
isFileBlock: !0,
|
|
6823
6847
|
fileBlockAccept: ["video/*"]
|
|
6824
|
-
},
|
|
6848
|
+
}, Yi = (e, t) => {
|
|
6825
6849
|
const o = document.createElement("div");
|
|
6826
|
-
o.innerHTML =
|
|
6850
|
+
o.innerHTML = Xi;
|
|
6827
6851
|
const i = document.createElement("video");
|
|
6828
6852
|
i.className = "bn-visual-media", i.src = e.props.url, i.controls = !0, i.contentEditable = "false", i.draggable = !1, i.width = Math.min(
|
|
6829
6853
|
e.props.previewWidth,
|
|
6830
6854
|
t.domElement.firstElementChild.clientWidth
|
|
6831
6855
|
);
|
|
6832
|
-
const n =
|
|
6856
|
+
const n = Ht(
|
|
6833
6857
|
e,
|
|
6834
6858
|
t,
|
|
6835
6859
|
i,
|
|
@@ -6843,7 +6867,7 @@ const ji = {
|
|
|
6843
6867
|
t.dictionary.file_blocks.video.add_button_text,
|
|
6844
6868
|
o.firstElementChild
|
|
6845
6869
|
);
|
|
6846
|
-
},
|
|
6870
|
+
}, Qi = (e) => {
|
|
6847
6871
|
if (e.tagName === "VIDEO")
|
|
6848
6872
|
return at(e);
|
|
6849
6873
|
if (e.tagName === "FIGURE") {
|
|
@@ -6856,7 +6880,7 @@ const ji = {
|
|
|
6856
6880
|
caption: i
|
|
6857
6881
|
};
|
|
6858
6882
|
}
|
|
6859
|
-
},
|
|
6883
|
+
}, en = (e) => {
|
|
6860
6884
|
if (!e.props.url) {
|
|
6861
6885
|
const o = document.createElement("p");
|
|
6862
6886
|
return o.textContent = "Add video", {
|
|
@@ -6867,11 +6891,11 @@ const ji = {
|
|
|
6867
6891
|
return e.props.showPreview ? (t = document.createElement("video"), t.src = e.props.url, t.width = e.props.previewWidth) : (t = document.createElement("a"), t.href = e.props.url, t.textContent = e.props.name || e.props.url), e.props.caption ? e.props.showPreview ? Fe(t, e.props.caption) : Me(t, e.props.caption) : {
|
|
6868
6892
|
dom: t
|
|
6869
6893
|
};
|
|
6870
|
-
},
|
|
6871
|
-
render:
|
|
6872
|
-
parse:
|
|
6873
|
-
toExternalHTML:
|
|
6874
|
-
}),
|
|
6894
|
+
}, tn = Ce(Ji, {
|
|
6895
|
+
render: Yi,
|
|
6896
|
+
parse: Qi,
|
|
6897
|
+
toExternalHTML: en
|
|
6898
|
+
}), on = ye.create({
|
|
6875
6899
|
name: "backgroundColor",
|
|
6876
6900
|
addAttributes() {
|
|
6877
6901
|
return {
|
|
@@ -6897,10 +6921,10 @@ const ji = {
|
|
|
6897
6921
|
renderHTML({ HTMLAttributes: e }) {
|
|
6898
6922
|
return ["span", e, 0];
|
|
6899
6923
|
}
|
|
6900
|
-
}),
|
|
6901
|
-
|
|
6924
|
+
}), nn = F(
|
|
6925
|
+
on,
|
|
6902
6926
|
"string"
|
|
6903
|
-
),
|
|
6927
|
+
), rn = ye.create({
|
|
6904
6928
|
name: "textColor",
|
|
6905
6929
|
addAttributes() {
|
|
6906
6930
|
return {
|
|
@@ -6924,7 +6948,7 @@ const ji = {
|
|
|
6924
6948
|
renderHTML({ HTMLAttributes: e }) {
|
|
6925
6949
|
return ["span", e, 0];
|
|
6926
6950
|
}
|
|
6927
|
-
}),
|
|
6951
|
+
}), an = F(rn, "string"), C = (e, t, o) => ({
|
|
6928
6952
|
state: i,
|
|
6929
6953
|
dispatch: n
|
|
6930
6954
|
}) => {
|
|
@@ -6934,7 +6958,7 @@ const ji = {
|
|
|
6934
6958
|
if (n) {
|
|
6935
6959
|
const a = i.schema.nodes[r.blockNoteType], s = i.schema.nodes[o.type || r.blockNoteType], l = s.isInGroup("bnBlock") ? s : i.schema.nodes.blockContainer;
|
|
6936
6960
|
if (r.isBlockContainer && s.isInGroup("blockContent"))
|
|
6937
|
-
st(o, i, e, r),
|
|
6961
|
+
st(o, i, e, r), sn(
|
|
6938
6962
|
o,
|
|
6939
6963
|
i,
|
|
6940
6964
|
e,
|
|
@@ -6973,7 +6997,7 @@ const ji = {
|
|
|
6973
6997
|
}
|
|
6974
6998
|
return !0;
|
|
6975
6999
|
};
|
|
6976
|
-
function
|
|
7000
|
+
function sn(e, t, o, i, n, r) {
|
|
6977
7001
|
let a = "keep";
|
|
6978
7002
|
if (e.content)
|
|
6979
7003
|
if (typeof e.content == "string")
|
|
@@ -7022,7 +7046,7 @@ function st(e, t, o, i) {
|
|
|
7022
7046
|
const n = e.children.map((r) => W(r, t.schema, o.schema.styleSchema));
|
|
7023
7047
|
if (i.childContainer)
|
|
7024
7048
|
t.tr.step(
|
|
7025
|
-
new
|
|
7049
|
+
new Ao(
|
|
7026
7050
|
i.childContainer.beforePos + 1,
|
|
7027
7051
|
i.childContainer.afterPos - 1,
|
|
7028
7052
|
new le(A.from(n), 0, 0)
|
|
@@ -7038,7 +7062,7 @@ function st(e, t, o, i) {
|
|
|
7038
7062
|
}
|
|
7039
7063
|
}
|
|
7040
7064
|
}
|
|
7041
|
-
function
|
|
7065
|
+
function ln(e, t, o) {
|
|
7042
7066
|
const i = e._tiptapEditor, n = typeof t == "string" ? t : t.id, { posBeforeNode: r } = ee(n, i.state.doc);
|
|
7043
7067
|
i.commands.command(({ state: s, dispatch: l }) => (C(e, r, o)({ state: s, dispatch: l }), !0));
|
|
7044
7068
|
const a = i.state.doc.resolve(r + 1).node();
|
|
@@ -7050,10 +7074,10 @@ function dn(e, t, o) {
|
|
|
7050
7074
|
e.blockCache
|
|
7051
7075
|
);
|
|
7052
7076
|
}
|
|
7053
|
-
const
|
|
7077
|
+
const dn = {
|
|
7054
7078
|
...y,
|
|
7055
7079
|
level: { default: 1, values: [1, 2, 3] }
|
|
7056
|
-
},
|
|
7080
|
+
}, cn = z({
|
|
7057
7081
|
name: "heading",
|
|
7058
7082
|
content: "inline*",
|
|
7059
7083
|
group: "blockContent",
|
|
@@ -7169,10 +7193,10 @@ const cn = {
|
|
|
7169
7193
|
((i = this.options.domAttributes) == null ? void 0 : i.inlineContent) || {}
|
|
7170
7194
|
);
|
|
7171
7195
|
}
|
|
7172
|
-
}),
|
|
7173
|
-
|
|
7174
|
-
|
|
7175
|
-
),
|
|
7196
|
+
}), un = V(
|
|
7197
|
+
cn,
|
|
7198
|
+
dn
|
|
7199
|
+
), Rt = (e, t, o) => ({
|
|
7176
7200
|
state: i,
|
|
7177
7201
|
dispatch: n
|
|
7178
7202
|
}) => {
|
|
@@ -7211,12 +7235,12 @@ const cn = {
|
|
|
7211
7235
|
() => (
|
|
7212
7236
|
// Splits the current block, moving content inside that's after the cursor
|
|
7213
7237
|
// to a new block of the same type below.
|
|
7214
|
-
l.command(() => n.node.childCount > 0 ? (s().deleteSelection().command(
|
|
7238
|
+
l.command(() => n.node.childCount > 0 ? (s().deleteSelection().command(Rt(a.selection.from, !0)).run(), !0) : !1)
|
|
7215
7239
|
)
|
|
7216
7240
|
]);
|
|
7217
|
-
},
|
|
7241
|
+
}, pn = {
|
|
7218
7242
|
...y
|
|
7219
|
-
},
|
|
7243
|
+
}, hn = z({
|
|
7220
7244
|
name: "bulletListItem",
|
|
7221
7245
|
content: "inline*",
|
|
7222
7246
|
group: "blockContent",
|
|
@@ -7304,15 +7328,15 @@ const cn = {
|
|
|
7304
7328
|
((o = this.options.domAttributes) == null ? void 0 : o.inlineContent) || {}
|
|
7305
7329
|
);
|
|
7306
7330
|
}
|
|
7307
|
-
}),
|
|
7308
|
-
|
|
7309
|
-
|
|
7310
|
-
),
|
|
7331
|
+
}), mn = V(
|
|
7332
|
+
hn,
|
|
7333
|
+
pn
|
|
7334
|
+
), fn = {
|
|
7311
7335
|
...y,
|
|
7312
7336
|
checked: {
|
|
7313
7337
|
default: !1
|
|
7314
7338
|
}
|
|
7315
|
-
},
|
|
7339
|
+
}, gn = z({
|
|
7316
7340
|
name: "checkListItem",
|
|
7317
7341
|
content: "inline*",
|
|
7318
7342
|
group: "blockContent",
|
|
@@ -7496,11 +7520,11 @@ const cn = {
|
|
|
7496
7520
|
};
|
|
7497
7521
|
};
|
|
7498
7522
|
}
|
|
7499
|
-
}),
|
|
7500
|
-
|
|
7501
|
-
|
|
7502
|
-
),
|
|
7503
|
-
key:
|
|
7523
|
+
}), bn = V(
|
|
7524
|
+
gn,
|
|
7525
|
+
fn
|
|
7526
|
+
), kn = new I("numbered-list-indexing"), _n = () => new E({
|
|
7527
|
+
key: kn,
|
|
7504
7528
|
appendTransaction: (e, t, o) => {
|
|
7505
7529
|
const i = o.tr;
|
|
7506
7530
|
i.setMeta("numberedListIndexing", !0);
|
|
@@ -7537,9 +7561,9 @@ const cn = {
|
|
|
7537
7561
|
}
|
|
7538
7562
|
}), n ? i : null;
|
|
7539
7563
|
}
|
|
7540
|
-
}),
|
|
7564
|
+
}), yn = {
|
|
7541
7565
|
...y
|
|
7542
|
-
},
|
|
7566
|
+
}, vn = z({
|
|
7543
7567
|
name: "numberedListItem",
|
|
7544
7568
|
content: "inline*",
|
|
7545
7569
|
group: "blockContent",
|
|
@@ -7591,7 +7615,7 @@ const cn = {
|
|
|
7591
7615
|
};
|
|
7592
7616
|
},
|
|
7593
7617
|
addProseMirrorPlugins() {
|
|
7594
|
-
return [
|
|
7618
|
+
return [_n()];
|
|
7595
7619
|
},
|
|
7596
7620
|
parseHTML() {
|
|
7597
7621
|
return [
|
|
@@ -7641,12 +7665,12 @@ const cn = {
|
|
|
7641
7665
|
((o = this.options.domAttributes) == null ? void 0 : o.inlineContent) || {}
|
|
7642
7666
|
);
|
|
7643
7667
|
}
|
|
7644
|
-
}),
|
|
7645
|
-
|
|
7646
|
-
|
|
7647
|
-
),
|
|
7668
|
+
}), wn = V(
|
|
7669
|
+
vn,
|
|
7670
|
+
yn
|
|
7671
|
+
), xn = {
|
|
7648
7672
|
...y
|
|
7649
|
-
},
|
|
7673
|
+
}, Cn = z({
|
|
7650
7674
|
name: "paragraph",
|
|
7651
7675
|
content: "inline*",
|
|
7652
7676
|
group: "blockContent",
|
|
@@ -7689,12 +7713,12 @@ const cn = {
|
|
|
7689
7713
|
((o = this.options.domAttributes) == null ? void 0 : o.inlineContent) || {}
|
|
7690
7714
|
);
|
|
7691
7715
|
}
|
|
7692
|
-
}),
|
|
7693
|
-
|
|
7694
|
-
|
|
7695
|
-
),
|
|
7716
|
+
}), En = V(
|
|
7717
|
+
Cn,
|
|
7718
|
+
xn
|
|
7719
|
+
), Sn = {
|
|
7696
7720
|
textColor: y.textColor
|
|
7697
|
-
},
|
|
7721
|
+
}, Bn = z({
|
|
7698
7722
|
name: "table",
|
|
7699
7723
|
content: "tableRow+",
|
|
7700
7724
|
group: "blockContent",
|
|
@@ -7725,7 +7749,7 @@ const cn = {
|
|
|
7725
7749
|
addNodeView() {
|
|
7726
7750
|
return ({ node: e, HTMLAttributes: t }) => {
|
|
7727
7751
|
var i;
|
|
7728
|
-
class o extends
|
|
7752
|
+
class o extends So {
|
|
7729
7753
|
constructor(r, a, s) {
|
|
7730
7754
|
super(r, a), this.node = r, this.cellMinWidth = a, this.blockContentHTMLAttributes = s;
|
|
7731
7755
|
const l = document.createElement("div");
|
|
@@ -7746,13 +7770,13 @@ const cn = {
|
|
|
7746
7770
|
return !r.target.closest(".tableWrapper-inner") || super.ignoreMutation(r);
|
|
7747
7771
|
}
|
|
7748
7772
|
}
|
|
7749
|
-
return new o(e,
|
|
7773
|
+
return new o(e, Ot, {
|
|
7750
7774
|
...((i = this.options.domAttributes) == null ? void 0 : i.blockContent) || {},
|
|
7751
7775
|
...t
|
|
7752
7776
|
});
|
|
7753
7777
|
};
|
|
7754
7778
|
}
|
|
7755
|
-
}),
|
|
7779
|
+
}), Mn = G.create({
|
|
7756
7780
|
name: "tableParagraph",
|
|
7757
7781
|
group: "tableContent",
|
|
7758
7782
|
content: "inline*",
|
|
@@ -7781,71 +7805,71 @@ const cn = {
|
|
|
7781
7805
|
renderHTML({ HTMLAttributes: e }) {
|
|
7782
7806
|
return ["p", e, 0];
|
|
7783
7807
|
}
|
|
7784
|
-
}),
|
|
7785
|
-
Mn,
|
|
7808
|
+
}), Tn = V(
|
|
7786
7809
|
Bn,
|
|
7810
|
+
Sn,
|
|
7787
7811
|
[
|
|
7788
|
-
|
|
7789
|
-
|
|
7790
|
-
|
|
7812
|
+
qi,
|
|
7813
|
+
Mn,
|
|
7814
|
+
No.extend({
|
|
7791
7815
|
content: "tableContent"
|
|
7792
7816
|
}),
|
|
7793
|
-
|
|
7817
|
+
Po.extend({
|
|
7794
7818
|
content: "tableContent"
|
|
7795
7819
|
}),
|
|
7796
|
-
|
|
7820
|
+
jo
|
|
7797
7821
|
]
|
|
7798
|
-
),
|
|
7799
|
-
paragraph:
|
|
7800
|
-
heading:
|
|
7801
|
-
codeBlock:
|
|
7802
|
-
bulletListItem:
|
|
7803
|
-
numberedListItem:
|
|
7804
|
-
checkListItem:
|
|
7805
|
-
table:
|
|
7806
|
-
file:
|
|
7807
|
-
image:
|
|
7808
|
-
video:
|
|
7809
|
-
audio:
|
|
7810
|
-
},
|
|
7811
|
-
bold: F(
|
|
7812
|
-
italic: F(
|
|
7813
|
-
underline: F(
|
|
7814
|
-
strike: F(
|
|
7815
|
-
code: F(
|
|
7816
|
-
textColor:
|
|
7817
|
-
backgroundColor:
|
|
7818
|
-
},
|
|
7822
|
+
), zt = {
|
|
7823
|
+
paragraph: En,
|
|
7824
|
+
heading: un,
|
|
7825
|
+
codeBlock: Pi,
|
|
7826
|
+
bulletListItem: mn,
|
|
7827
|
+
numberedListItem: wn,
|
|
7828
|
+
checkListItem: bn,
|
|
7829
|
+
table: Tn,
|
|
7830
|
+
file: Oi,
|
|
7831
|
+
image: $i,
|
|
7832
|
+
video: tn,
|
|
7833
|
+
audio: Ai
|
|
7834
|
+
}, Ln = Lt(zt), Vt = {
|
|
7835
|
+
bold: F(Bo, "boolean"),
|
|
7836
|
+
italic: F(To, "boolean"),
|
|
7837
|
+
underline: F(Io, "boolean"),
|
|
7838
|
+
strike: F(Lo, "boolean"),
|
|
7839
|
+
code: F(Mo, "boolean"),
|
|
7840
|
+
textColor: an,
|
|
7841
|
+
backgroundColor: nn
|
|
7842
|
+
}, Va = Nt(Vt), Ft = {
|
|
7819
7843
|
text: { config: "text", implementation: {} },
|
|
7820
7844
|
link: { config: "link", implementation: {} }
|
|
7821
|
-
},
|
|
7822
|
-
|
|
7845
|
+
}, In = At(
|
|
7846
|
+
Ft
|
|
7823
7847
|
);
|
|
7824
7848
|
function M(e, t) {
|
|
7825
|
-
return e in t.schema.blockSchema && t.schema.blockSchema[e] ===
|
|
7849
|
+
return e in t.schema.blockSchema && t.schema.blockSchema[e] === Ln[e];
|
|
7826
7850
|
}
|
|
7827
|
-
function
|
|
7828
|
-
return e in t.schema.inlineContentSchema && t.schema.inlineContentSchema[e] ===
|
|
7851
|
+
function An(e, t) {
|
|
7852
|
+
return e in t.schema.inlineContentSchema && t.schema.inlineContentSchema[e] === In[e];
|
|
7829
7853
|
}
|
|
7830
|
-
function
|
|
7854
|
+
function Pn(e, t, o) {
|
|
7831
7855
|
return t.type === e && t.type in o.schema.blockSchema && M(t.type, o);
|
|
7832
7856
|
}
|
|
7833
|
-
function
|
|
7857
|
+
function Fa(e, t) {
|
|
7834
7858
|
return e.type in t.schema.blockSchema && t.schema.blockSchema[e.type].isFileBlock || !1;
|
|
7835
7859
|
}
|
|
7836
|
-
function
|
|
7860
|
+
function Ga(e, t) {
|
|
7837
7861
|
return e.type in t.schema.blockSchema && t.schema.blockSchema[e.type].isFileBlock && "showPreview" in t.schema.blockSchema[e.type].propSchema || !1;
|
|
7838
7862
|
}
|
|
7839
|
-
function
|
|
7863
|
+
function Wa(e, t) {
|
|
7840
7864
|
return t.schema.blockSchema[e.type].isFileBlock && !e.props.url;
|
|
7841
7865
|
}
|
|
7842
|
-
function
|
|
7866
|
+
function Nn(e, t, o) {
|
|
7843
7867
|
return t in o.schema.blockSchema && e in o.schema.blockSchema[t].propSchema && o.schema.blockSchema[t].propSchema[e] === y[e];
|
|
7844
7868
|
}
|
|
7845
|
-
function
|
|
7846
|
-
return
|
|
7869
|
+
function $a(e, t, o) {
|
|
7870
|
+
return Nn(e, t.type, o);
|
|
7847
7871
|
}
|
|
7848
|
-
function
|
|
7872
|
+
function jn(e, t, o, i = "before") {
|
|
7849
7873
|
const n = typeof o == "string" ? o : o.id, r = [];
|
|
7850
7874
|
for (const c of t)
|
|
7851
7875
|
r.push(
|
|
@@ -7876,7 +7900,7 @@ function Hn(e, t, o, i = "before") {
|
|
|
7876
7900
|
);
|
|
7877
7901
|
return l;
|
|
7878
7902
|
}
|
|
7879
|
-
function
|
|
7903
|
+
function Hn(e) {
|
|
7880
7904
|
const { bnBlock: t } = _(e._tiptapEditor.state), o = {
|
|
7881
7905
|
blockId: t.node.attrs.id,
|
|
7882
7906
|
blockPos: t.beforePos
|
|
@@ -7897,7 +7921,7 @@ function Dn(e) {
|
|
|
7897
7921
|
head: e._tiptapEditor.state.selection.head
|
|
7898
7922
|
};
|
|
7899
7923
|
}
|
|
7900
|
-
function
|
|
7924
|
+
function Dn(e, t) {
|
|
7901
7925
|
const o = ee(
|
|
7902
7926
|
t.blockId,
|
|
7903
7927
|
e._tiptapEditor.state.doc
|
|
@@ -7918,27 +7942,27 @@ function Un(e, t) {
|
|
|
7918
7942
|
e._tiptapEditor.state.tr.setSelection(i)
|
|
7919
7943
|
);
|
|
7920
7944
|
}
|
|
7921
|
-
function
|
|
7922
|
-
const { block: i } = e.getTextCursorPosition(), n =
|
|
7923
|
-
e.removeBlocks([i]), e.insertBlocks([i], t, o),
|
|
7945
|
+
function Gt(e, t, o) {
|
|
7946
|
+
const { block: i } = e.getTextCursorPosition(), n = Hn(e);
|
|
7947
|
+
e.removeBlocks([i]), e.insertBlocks([i], t, o), Dn(e, n);
|
|
7924
7948
|
}
|
|
7925
|
-
function
|
|
7949
|
+
function Un(e) {
|
|
7926
7950
|
const t = e.getSelection();
|
|
7927
7951
|
if (t && t.blocks.length > 1)
|
|
7928
7952
|
return;
|
|
7929
7953
|
const { prevBlock: o, parentBlock: i } = e.getTextCursorPosition();
|
|
7930
7954
|
let n, r;
|
|
7931
|
-
o ? o.children.length > 0 ? (n = o.children[o.children.length - 1].id, r = "after") : (n = o.id, r = "before") : i && (n = i.id, r = "before"), !(!n || !r) &&
|
|
7955
|
+
o ? o.children.length > 0 ? (n = o.children[o.children.length - 1].id, r = "after") : (n = o.id, r = "before") : i && (n = i.id, r = "before"), !(!n || !r) && Gt(e, n, r);
|
|
7932
7956
|
}
|
|
7933
|
-
function
|
|
7957
|
+
function On(e) {
|
|
7934
7958
|
const t = e.getSelection();
|
|
7935
7959
|
if (t && t.blocks.length > 1)
|
|
7936
7960
|
return;
|
|
7937
7961
|
const { nextBlock: o, parentBlock: i } = e.getTextCursorPosition();
|
|
7938
7962
|
let n, r;
|
|
7939
|
-
o ? o.children.length > 0 ? (n = o.children[0].id, r = "before") : (n = o.id, r = "after") : i && (n = i.id, r = "after"), !(!n || !r) &&
|
|
7963
|
+
o ? o.children.length > 0 ? (n = o.children[0].id, r = "before") : (n = o.id, r = "after") : i && (n = i.id, r = "after"), !(!n || !r) && Gt(e, n, r);
|
|
7940
7964
|
}
|
|
7941
|
-
function
|
|
7965
|
+
function Rn(e, t) {
|
|
7942
7966
|
return function({ state: o, dispatch: i }) {
|
|
7943
7967
|
const { $from: n, $to: r } = o.selection, a = n.blockRange(
|
|
7944
7968
|
r,
|
|
@@ -7979,30 +8003,30 @@ function zn(e, t) {
|
|
|
7979
8003
|
return !0;
|
|
7980
8004
|
};
|
|
7981
8005
|
}
|
|
7982
|
-
function
|
|
8006
|
+
function Wt(e) {
|
|
7983
8007
|
return e._tiptapEditor.commands.command(
|
|
7984
|
-
|
|
8008
|
+
Rn(
|
|
7985
8009
|
e._tiptapEditor.schema.nodes.blockContainer,
|
|
7986
8010
|
e._tiptapEditor.schema.nodes.blockGroup
|
|
7987
8011
|
)
|
|
7988
8012
|
);
|
|
7989
8013
|
}
|
|
7990
|
-
function
|
|
8014
|
+
function zn(e) {
|
|
7991
8015
|
e._tiptapEditor.commands.liftListItem("blockContainer");
|
|
7992
8016
|
}
|
|
7993
|
-
function
|
|
8017
|
+
function Vn(e) {
|
|
7994
8018
|
const { bnBlock: t } = _(
|
|
7995
8019
|
e._tiptapEditor.state
|
|
7996
8020
|
);
|
|
7997
8021
|
return e._tiptapEditor.state.doc.resolve(t.beforePos).nodeBefore !== null;
|
|
7998
8022
|
}
|
|
7999
|
-
function
|
|
8023
|
+
function Fn(e) {
|
|
8000
8024
|
const { bnBlock: t } = _(
|
|
8001
8025
|
e._tiptapEditor.state
|
|
8002
8026
|
);
|
|
8003
8027
|
return e._tiptapEditor.state.doc.resolve(t.beforePos).depth > 1;
|
|
8004
8028
|
}
|
|
8005
|
-
function
|
|
8029
|
+
function $t(e, t, o) {
|
|
8006
8030
|
const i = e._tiptapEditor;
|
|
8007
8031
|
let n = i.state.tr;
|
|
8008
8032
|
const r = [];
|
|
@@ -8060,13 +8084,13 @@ function Wt(e, t, o) {
|
|
|
8060
8084
|
);
|
|
8061
8085
|
return { insertedBlocks: d, removedBlocks: s };
|
|
8062
8086
|
}
|
|
8063
|
-
function
|
|
8064
|
-
return
|
|
8087
|
+
function Gn(e, t, o) {
|
|
8088
|
+
return $t(e, t, o);
|
|
8065
8089
|
}
|
|
8066
|
-
function
|
|
8067
|
-
return
|
|
8090
|
+
function Wn(e, t) {
|
|
8091
|
+
return $t(e, t, []).removedBlocks;
|
|
8068
8092
|
}
|
|
8069
|
-
function
|
|
8093
|
+
function $n(e, t, o, i = { updateSelection: !0 }) {
|
|
8070
8094
|
const n = o._tiptapEditor.state.tr;
|
|
8071
8095
|
let { from: r, to: a } = typeof e == "number" ? { from: e, to: e } : { from: e.from, to: e.to }, s = !0, l = !0, c = "";
|
|
8072
8096
|
if (t.forEach((d) => {
|
|
@@ -8075,9 +8099,9 @@ function Kn(e, t, o, i = { updateSelection: !0 }) {
|
|
|
8075
8099
|
const { parent: d } = n.doc.resolve(r);
|
|
8076
8100
|
d.isTextblock && !d.type.spec.code && !d.childCount && (r -= 1, a += 1);
|
|
8077
8101
|
}
|
|
8078
|
-
return s ? n.insertText(c, r, a) : n.replaceWith(r, a, t), i.updateSelection &&
|
|
8102
|
+
return s ? n.insertText(c, r, a) : n.replaceWith(r, a, t), i.updateSelection && mo(n, n.steps.length - 1, -1), o.dispatch(n), !0;
|
|
8079
8103
|
}
|
|
8080
|
-
function
|
|
8104
|
+
function Kn(e) {
|
|
8081
8105
|
const { bnBlock: t } = _(e._tiptapEditor.state), o = e._tiptapEditor.state.doc.resolve(t.beforePos), i = o.nodeBefore, n = e._tiptapEditor.state.doc.resolve(
|
|
8082
8106
|
t.afterPos
|
|
8083
8107
|
).nodeAfter;
|
|
@@ -8113,7 +8137,7 @@ function qn(e) {
|
|
|
8113
8137
|
)
|
|
8114
8138
|
};
|
|
8115
8139
|
}
|
|
8116
|
-
function
|
|
8140
|
+
function Kt(e, t, o = "start") {
|
|
8117
8141
|
const i = typeof t == "string" ? t : t.id, n = ee(i, e._tiptapEditor.state.doc), r = Q(n), a = e.schema.blockSchema[r.blockNoteType].content;
|
|
8118
8142
|
if (r.isBlockContainer) {
|
|
8119
8143
|
const s = r.blockContent;
|
|
@@ -8137,7 +8161,7 @@ function $t(e, t, o = "start") {
|
|
|
8137
8161
|
throw new P(a);
|
|
8138
8162
|
} else {
|
|
8139
8163
|
const s = o === "start" ? r.childContainer.node.firstChild : r.childContainer.node.lastChild;
|
|
8140
|
-
|
|
8164
|
+
Kt(e, s.attrs.id, o);
|
|
8141
8165
|
}
|
|
8142
8166
|
}
|
|
8143
8167
|
let K;
|
|
@@ -8169,7 +8193,7 @@ async function We() {
|
|
|
8169
8193
|
rehypeFormat: e[9]
|
|
8170
8194
|
}, K;
|
|
8171
8195
|
}
|
|
8172
|
-
function
|
|
8196
|
+
function qn() {
|
|
8173
8197
|
const e = (t) => {
|
|
8174
8198
|
let o = t.children.length;
|
|
8175
8199
|
for (let i = 0; i < o; i++) {
|
|
@@ -8185,7 +8209,7 @@ function Xn() {
|
|
|
8185
8209
|
};
|
|
8186
8210
|
return e;
|
|
8187
8211
|
}
|
|
8188
|
-
function
|
|
8212
|
+
function Xn() {
|
|
8189
8213
|
const e = K;
|
|
8190
8214
|
if (!e)
|
|
8191
8215
|
throw new Error(
|
|
@@ -8213,37 +8237,37 @@ function $e(e) {
|
|
|
8213
8237
|
throw new Error(
|
|
8214
8238
|
"cleanHTMLToMarkdown requires ESM dependencies to be initialized"
|
|
8215
8239
|
);
|
|
8216
|
-
return t.unified.unified().use(t.rehypeParse.default, { fragment: !0 }).use(
|
|
8240
|
+
return t.unified.unified().use(t.rehypeParse.default, { fragment: !0 }).use(qn).use(Xn).use(t.rehypeRemark.default).use(t.remarkGfm.default).use(t.remarkStringify.default, {
|
|
8217
8241
|
handlers: { text: (i) => i.value }
|
|
8218
8242
|
}).processSync(e).value;
|
|
8219
8243
|
}
|
|
8220
|
-
async function
|
|
8244
|
+
async function Zn(e, t, o, i) {
|
|
8221
8245
|
await We();
|
|
8222
8246
|
const r = we(t, o).exportBlocks(e, i);
|
|
8223
8247
|
return $e(r);
|
|
8224
8248
|
}
|
|
8225
|
-
function
|
|
8249
|
+
function Jn(e) {
|
|
8226
8250
|
return Array.prototype.indexOf.call(e.parentElement.childNodes, e);
|
|
8227
8251
|
}
|
|
8228
|
-
function
|
|
8252
|
+
function Yn(e) {
|
|
8229
8253
|
return e.nodeType === 3 && !/\S/.test(e.nodeValue || "");
|
|
8230
8254
|
}
|
|
8231
|
-
function
|
|
8255
|
+
function Qn(e) {
|
|
8232
8256
|
e.querySelectorAll("li > ul, li > ol").forEach((t) => {
|
|
8233
|
-
const o =
|
|
8257
|
+
const o = Jn(t), i = t.parentElement, n = Array.from(i.childNodes).slice(
|
|
8234
8258
|
o + 1
|
|
8235
8259
|
);
|
|
8236
8260
|
t.remove(), n.forEach((r) => {
|
|
8237
8261
|
r.remove();
|
|
8238
8262
|
}), i.insertAdjacentElement("afterend", t), n.reverse().forEach((r) => {
|
|
8239
|
-
if (
|
|
8263
|
+
if (Yn(r))
|
|
8240
8264
|
return;
|
|
8241
8265
|
const a = document.createElement("li");
|
|
8242
8266
|
a.append(r), t.insertAdjacentElement("afterend", a);
|
|
8243
8267
|
}), i.childNodes.length === 0 && i.remove();
|
|
8244
8268
|
});
|
|
8245
8269
|
}
|
|
8246
|
-
function
|
|
8270
|
+
function er(e) {
|
|
8247
8271
|
e.querySelectorAll("li + ul, li + ol").forEach((t) => {
|
|
8248
8272
|
var r, a;
|
|
8249
8273
|
const o = t.previousElementSibling, i = document.createElement("div");
|
|
@@ -8254,18 +8278,18 @@ function tr(e) {
|
|
|
8254
8278
|
});
|
|
8255
8279
|
}
|
|
8256
8280
|
let lt = null;
|
|
8257
|
-
function
|
|
8281
|
+
function tr() {
|
|
8258
8282
|
return lt || (lt = document.implementation.createHTMLDocument("title"));
|
|
8259
8283
|
}
|
|
8260
|
-
function
|
|
8284
|
+
function qt(e) {
|
|
8261
8285
|
if (typeof e == "string") {
|
|
8262
|
-
const t =
|
|
8286
|
+
const t = tr().createElement("div");
|
|
8263
8287
|
t.innerHTML = e, e = t;
|
|
8264
8288
|
}
|
|
8265
|
-
return
|
|
8289
|
+
return Qn(e), er(e), e;
|
|
8266
8290
|
}
|
|
8267
|
-
async function
|
|
8268
|
-
const r =
|
|
8291
|
+
async function Xt(e, t, o, i, n) {
|
|
8292
|
+
const r = qt(e), s = ao.fromSchema(n).parse(r, {
|
|
8269
8293
|
topNode: n.nodes.blockGroup.create()
|
|
8270
8294
|
}), l = [];
|
|
8271
8295
|
for (let c = 0; c < s.childCount; c++)
|
|
@@ -8274,7 +8298,7 @@ async function qt(e, t, o, i, n) {
|
|
|
8274
8298
|
);
|
|
8275
8299
|
return l;
|
|
8276
8300
|
}
|
|
8277
|
-
function
|
|
8301
|
+
function or(e, t) {
|
|
8278
8302
|
const o = t.value ? t.value : "", i = {};
|
|
8279
8303
|
t.lang && (i["data-language"] = t.lang);
|
|
8280
8304
|
let n = {
|
|
@@ -8290,14 +8314,14 @@ function ir(e, t) {
|
|
|
8290
8314
|
children: [n]
|
|
8291
8315
|
}, e.patch(t, n), n;
|
|
8292
8316
|
}
|
|
8293
|
-
async function
|
|
8317
|
+
async function ir(e, t, o, i, n) {
|
|
8294
8318
|
const r = await We(), a = r.unified.unified().use(r.remarkParse.default).use(r.remarkGfm.default).use(r.remarkRehype.default, {
|
|
8295
8319
|
handlers: {
|
|
8296
8320
|
...r.remarkRehype.defaultHandlers,
|
|
8297
|
-
code:
|
|
8321
|
+
code: or
|
|
8298
8322
|
}
|
|
8299
8323
|
}).use(r.rehypeStringify.default).processSync(e);
|
|
8300
|
-
return
|
|
8324
|
+
return Xt(
|
|
8301
8325
|
a.value,
|
|
8302
8326
|
t,
|
|
8303
8327
|
o,
|
|
@@ -8312,12 +8336,12 @@ const Ke = [
|
|
|
8312
8336
|
"text/plain",
|
|
8313
8337
|
"Files"
|
|
8314
8338
|
];
|
|
8315
|
-
function
|
|
8339
|
+
function nr(e, t) {
|
|
8316
8340
|
if (!e.startsWith(".") || !t.startsWith("."))
|
|
8317
8341
|
throw new Error("The strings provided are not valid file extensions.");
|
|
8318
8342
|
return e === t;
|
|
8319
8343
|
}
|
|
8320
|
-
function
|
|
8344
|
+
function rr(e, t) {
|
|
8321
8345
|
const o = e.split("/"), i = t.split("/");
|
|
8322
8346
|
if (o.length !== 2)
|
|
8323
8347
|
throw new Error(`The string ${e} is not a valid MIME type.`);
|
|
@@ -8325,7 +8349,7 @@ function ar(e, t) {
|
|
|
8325
8349
|
throw new Error(`The string ${t} is not a valid MIME type.`);
|
|
8326
8350
|
return o[1] === "*" || i[1] === "*" ? o[0] === i[0] : (o[0] === "*" || i[0] === "*" || o[0] === i[0]) && o[1] === i[1];
|
|
8327
8351
|
}
|
|
8328
|
-
async function
|
|
8352
|
+
async function Zt(e, t) {
|
|
8329
8353
|
if (!t.uploadFile) {
|
|
8330
8354
|
console.warn(
|
|
8331
8355
|
"Attempted ot insert file, but uploadFile is not set in the BlockNote editor options"
|
|
@@ -8355,7 +8379,7 @@ async function Xt(e, t) {
|
|
|
8355
8379
|
for (const c of r)
|
|
8356
8380
|
for (const d of c.fileBlockAccept || []) {
|
|
8357
8381
|
const p = d.startsWith("."), h = n[a].getAsFile();
|
|
8358
|
-
if (h && (!p && h.type &&
|
|
8382
|
+
if (h && (!p && h.type && rr(n[a].type, d) || p && nr(
|
|
8359
8383
|
"." + h.name.split(".").pop(),
|
|
8360
8384
|
d
|
|
8361
8385
|
))) {
|
|
@@ -8405,7 +8429,7 @@ async function Xt(e, t) {
|
|
|
8405
8429
|
}
|
|
8406
8430
|
}
|
|
8407
8431
|
}
|
|
8408
|
-
const
|
|
8432
|
+
const ar = (e) => T.create({
|
|
8409
8433
|
name: "dropFile",
|
|
8410
8434
|
addProseMirrorPlugins() {
|
|
8411
8435
|
return [
|
|
@@ -8421,7 +8445,7 @@ const sr = (e) => T.create({
|
|
|
8421
8445
|
i = n;
|
|
8422
8446
|
break;
|
|
8423
8447
|
}
|
|
8424
|
-
return i === null ? !0 : i === "Files" ? (
|
|
8448
|
+
return i === null ? !0 : i === "Files" ? (Zt(o, e), !0) : !1;
|
|
8425
8449
|
}
|
|
8426
8450
|
}
|
|
8427
8451
|
}
|
|
@@ -8429,20 +8453,25 @@ const sr = (e) => T.create({
|
|
|
8429
8453
|
];
|
|
8430
8454
|
}
|
|
8431
8455
|
});
|
|
8432
|
-
async function
|
|
8456
|
+
async function sr(e, t) {
|
|
8433
8457
|
const o = t.prosemirrorView, { schema: i } = o.state;
|
|
8434
8458
|
if (!e.clipboardData)
|
|
8435
8459
|
return !1;
|
|
8436
|
-
const n = e.clipboardData.getData("text/plain")
|
|
8437
|
-
|
|
8460
|
+
const n = e.clipboardData.getData("text/plain");
|
|
8461
|
+
if (!n)
|
|
8462
|
+
return !1;
|
|
8463
|
+
if (!i.nodes.codeBlock)
|
|
8464
|
+
return o.pasteText(n), !0;
|
|
8465
|
+
const r = e.clipboardData.getData("vscode-editor-data"), a = r ? JSON.parse(r) : void 0, s = a == null ? void 0 : a.mode;
|
|
8466
|
+
return s ? (t._tiptapEditor.view.pasteHTML(
|
|
8438
8467
|
`<pre><code class="language-${s}">${n.replace(
|
|
8439
8468
|
/\r\n?/g,
|
|
8440
8469
|
`
|
|
8441
8470
|
`
|
|
8442
8471
|
)}</code></pre>`
|
|
8443
|
-
), !0) : !1
|
|
8472
|
+
), !0) : !1;
|
|
8444
8473
|
}
|
|
8445
|
-
const
|
|
8474
|
+
const lr = (e) => T.create({
|
|
8446
8475
|
name: "pasteFromClipboard",
|
|
8447
8476
|
addProseMirrorPlugins() {
|
|
8448
8477
|
return [
|
|
@@ -8461,11 +8490,11 @@ const dr = (e) => T.create({
|
|
|
8461
8490
|
if (!i)
|
|
8462
8491
|
return !0;
|
|
8463
8492
|
if (i === "vscode-editor-data")
|
|
8464
|
-
return
|
|
8493
|
+
return sr(o, e), !0;
|
|
8465
8494
|
if (i === "Files")
|
|
8466
|
-
return
|
|
8495
|
+
return Zt(o, e), !0;
|
|
8467
8496
|
let n = o.clipboardData.getData(i);
|
|
8468
|
-
return i === "blocknote/html" ? (e._tiptapEditor.view.pasteHTML(n), !0) : i === "text/html" ? (n =
|
|
8497
|
+
return i === "blocknote/html" ? (e._tiptapEditor.view.pasteHTML(n), !0) : i === "text/html" ? (n = qt(n.trim()).innerHTML, e._tiptapEditor.view.pasteHTML(n), !0) : (e._tiptapEditor.view.pasteText(n), !0);
|
|
8469
8498
|
}
|
|
8470
8499
|
}
|
|
8471
8500
|
}
|
|
@@ -8473,7 +8502,7 @@ const dr = (e) => T.create({
|
|
|
8473
8502
|
];
|
|
8474
8503
|
}
|
|
8475
8504
|
});
|
|
8476
|
-
function
|
|
8505
|
+
function Jt(e, t) {
|
|
8477
8506
|
const o = [];
|
|
8478
8507
|
return e.descendants((i) => {
|
|
8479
8508
|
var n, r;
|
|
@@ -8496,7 +8525,7 @@ function Zt(e, t) {
|
|
|
8496
8525
|
), !1) : !0;
|
|
8497
8526
|
}), o;
|
|
8498
8527
|
}
|
|
8499
|
-
function
|
|
8528
|
+
function dr(e, t, o) {
|
|
8500
8529
|
var s;
|
|
8501
8530
|
let i = !1;
|
|
8502
8531
|
const n = e.state.selection instanceof ze;
|
|
@@ -8519,7 +8548,7 @@ function cr(e, t, o) {
|
|
|
8519
8548
|
);
|
|
8520
8549
|
if (n) {
|
|
8521
8550
|
((s = t.firstChild) == null ? void 0 : s.type.name) === "table" && (t = t.firstChild.content);
|
|
8522
|
-
const l =
|
|
8551
|
+
const l = It(
|
|
8523
8552
|
t,
|
|
8524
8553
|
o.schema.inlineContentSchema,
|
|
8525
8554
|
o.schema.styleSchema
|
|
@@ -8533,21 +8562,21 @@ function cr(e, t, o) {
|
|
|
8533
8562
|
);
|
|
8534
8563
|
r = a.exportInlineContent(l, {});
|
|
8535
8564
|
} else {
|
|
8536
|
-
const l =
|
|
8565
|
+
const l = Jt(t, o.schema);
|
|
8537
8566
|
r = a.exportBlocks(l, {});
|
|
8538
8567
|
}
|
|
8539
8568
|
return r;
|
|
8540
8569
|
}
|
|
8541
|
-
function
|
|
8570
|
+
function Yt(e, t) {
|
|
8542
8571
|
"node" in e.state.selection && e.state.selection.node.type.spec.group === "blockContent" && t.dispatch(
|
|
8543
8572
|
t._tiptapEditor.state.tr.setSelection(
|
|
8544
8573
|
new de(e.state.doc.resolve(e.state.selection.from - 1))
|
|
8545
8574
|
)
|
|
8546
8575
|
);
|
|
8547
|
-
const o =
|
|
8576
|
+
const o = kt.__serializeForClipboard(
|
|
8548
8577
|
e,
|
|
8549
8578
|
e.state.selection.content()
|
|
8550
|
-
).dom.innerHTML, i = e.state.selection.content().content, n =
|
|
8579
|
+
).dom.innerHTML, i = e.state.selection.content().content, n = dr(
|
|
8551
8580
|
e,
|
|
8552
8581
|
i,
|
|
8553
8582
|
t
|
|
@@ -8556,12 +8585,12 @@ function Jt(e, t) {
|
|
|
8556
8585
|
}
|
|
8557
8586
|
const dt = (e, t, o) => {
|
|
8558
8587
|
o.preventDefault(), o.clipboardData.clearData();
|
|
8559
|
-
const { clipboardHTML: i, externalHTML: n, markdown: r } =
|
|
8588
|
+
const { clipboardHTML: i, externalHTML: n, markdown: r } = Yt(
|
|
8560
8589
|
t,
|
|
8561
8590
|
e
|
|
8562
8591
|
);
|
|
8563
8592
|
o.clipboardData.setData("blocknote/html", i), o.clipboardData.setData("text/html", n), o.clipboardData.setData("text/plain", r);
|
|
8564
|
-
},
|
|
8593
|
+
}, cr = (e) => T.create({
|
|
8565
8594
|
name: "copyToClipboard",
|
|
8566
8595
|
addProseMirrorPlugins() {
|
|
8567
8596
|
return [
|
|
@@ -8587,7 +8616,7 @@ const dt = (e, t, o) => {
|
|
|
8587
8616
|
)
|
|
8588
8617
|
)
|
|
8589
8618
|
), o.preventDefault(), o.dataTransfer.clearData();
|
|
8590
|
-
const { clipboardHTML: i, externalHTML: n, markdown: r } =
|
|
8619
|
+
const { clipboardHTML: i, externalHTML: n, markdown: r } = Yt(t, e);
|
|
8591
8620
|
return o.dataTransfer.setData("blocknote/html", i), o.dataTransfer.setData("text/html", n), o.dataTransfer.setData("text/plain", r), !0;
|
|
8592
8621
|
}
|
|
8593
8622
|
}
|
|
@@ -8595,7 +8624,7 @@ const dt = (e, t, o) => {
|
|
|
8595
8624
|
})
|
|
8596
8625
|
];
|
|
8597
8626
|
}
|
|
8598
|
-
}),
|
|
8627
|
+
}), ur = T.create({
|
|
8599
8628
|
name: "blockBackgroundColor",
|
|
8600
8629
|
addGlobalAttributes() {
|
|
8601
8630
|
return [
|
|
@@ -8634,7 +8663,7 @@ class te {
|
|
|
8634
8663
|
this.callbacks = {};
|
|
8635
8664
|
}
|
|
8636
8665
|
}
|
|
8637
|
-
class
|
|
8666
|
+
class pr {
|
|
8638
8667
|
constructor(t, o, i, n) {
|
|
8639
8668
|
u(this, "state");
|
|
8640
8669
|
u(this, "emitUpdate");
|
|
@@ -8691,7 +8720,7 @@ class hr {
|
|
|
8691
8720
|
}
|
|
8692
8721
|
}
|
|
8693
8722
|
const Le = new I("FilePanelPlugin");
|
|
8694
|
-
class
|
|
8723
|
+
class hr extends te {
|
|
8695
8724
|
constructor(o) {
|
|
8696
8725
|
super();
|
|
8697
8726
|
u(this, "view");
|
|
@@ -8702,7 +8731,7 @@ class mr extends te {
|
|
|
8702
8731
|
});
|
|
8703
8732
|
this.plugin = new E({
|
|
8704
8733
|
key: Le,
|
|
8705
|
-
view: (i) => (this.view = new
|
|
8734
|
+
view: (i) => (this.view = new pr(
|
|
8706
8735
|
o,
|
|
8707
8736
|
Le,
|
|
8708
8737
|
i,
|
|
@@ -8737,7 +8766,7 @@ class mr extends te {
|
|
|
8737
8766
|
return this.on("update", o);
|
|
8738
8767
|
}
|
|
8739
8768
|
}
|
|
8740
|
-
class
|
|
8769
|
+
class mr {
|
|
8741
8770
|
constructor(t, o, i) {
|
|
8742
8771
|
u(this, "state");
|
|
8743
8772
|
u(this, "emitUpdate");
|
|
@@ -8823,18 +8852,18 @@ class fr {
|
|
|
8823
8852
|
return Ne(this.pmView, n, r);
|
|
8824
8853
|
}
|
|
8825
8854
|
}
|
|
8826
|
-
const
|
|
8855
|
+
const fr = new I(
|
|
8827
8856
|
"FormattingToolbarPlugin"
|
|
8828
8857
|
);
|
|
8829
|
-
class
|
|
8858
|
+
class gr extends te {
|
|
8830
8859
|
constructor(o) {
|
|
8831
8860
|
super();
|
|
8832
8861
|
u(this, "view");
|
|
8833
8862
|
u(this, "plugin");
|
|
8834
8863
|
u(this, "closeMenu", () => this.view.closeMenu());
|
|
8835
8864
|
this.plugin = new E({
|
|
8836
|
-
key:
|
|
8837
|
-
view: (i) => (this.view = new
|
|
8865
|
+
key: fr,
|
|
8866
|
+
view: (i) => (this.view = new mr(o, i, (n) => {
|
|
8838
8867
|
this.emit("update", n);
|
|
8839
8868
|
}), this.view),
|
|
8840
8869
|
props: {
|
|
@@ -8869,13 +8898,13 @@ const ct = (e, t) => {
|
|
|
8869
8898
|
return ue(
|
|
8870
8899
|
e.resolve(n)
|
|
8871
8900
|
);
|
|
8872
|
-
},
|
|
8901
|
+
}, Qt = (e, t) => {
|
|
8873
8902
|
for (; t.childContainer; ) {
|
|
8874
8903
|
const o = t.childContainer.node, i = e.resolve(t.childContainer.beforePos + 1).posAtIndex(o.childCount - 1);
|
|
8875
8904
|
t = ue(e.resolve(i));
|
|
8876
8905
|
}
|
|
8877
8906
|
return t;
|
|
8878
|
-
},
|
|
8907
|
+
}, br = (e, t) => e.isBlockContainer && e.blockContent.node.type.spec.content === "inline*" && e.blockContent.node.childCount > 0 && t.isBlockContainer && t.blockContent.node.type.spec.content === "inline*", kr = (e, t, o, i) => {
|
|
8879
8908
|
if (!i.isBlockContainer)
|
|
8880
8909
|
throw new Error(
|
|
8881
8910
|
`Attempted to merge block at position ${i.bnBlock.beforePos} into previous block at position ${o.bnBlock.beforePos}, but next block is not a block container`
|
|
@@ -8914,12 +8943,12 @@ const ct = (e, t) => {
|
|
|
8914
8943
|
);
|
|
8915
8944
|
if (!r)
|
|
8916
8945
|
return !1;
|
|
8917
|
-
const a =
|
|
8946
|
+
const a = Qt(
|
|
8918
8947
|
t.doc,
|
|
8919
8948
|
r
|
|
8920
8949
|
);
|
|
8921
|
-
return
|
|
8922
|
-
},
|
|
8950
|
+
return br(a, n) ? kr(t, o, a, n) : !1;
|
|
8951
|
+
}, _r = T.create({
|
|
8923
8952
|
priority: 50,
|
|
8924
8953
|
// TODO: The shortcuts need a refactor. Do we want to use a command priority
|
|
8925
8954
|
// design as there is now, or clump the logic into a single function?
|
|
@@ -9075,7 +9104,7 @@ const ct = (e, t) => {
|
|
|
9075
9104
|
a.bnBlock.beforePos
|
|
9076
9105
|
);
|
|
9077
9106
|
if (c && s && l) {
|
|
9078
|
-
const d =
|
|
9107
|
+
const d = Qt(
|
|
9079
9108
|
r.doc,
|
|
9080
9109
|
c
|
|
9081
9110
|
);
|
|
@@ -9157,7 +9186,7 @@ const ct = (e, t) => {
|
|
|
9157
9186
|
return !1;
|
|
9158
9187
|
const { blockContent: s } = a, l = n.selection.$anchor.parentOffset === 0;
|
|
9159
9188
|
return s.node.childCount === 0 ? !1 : (r().deleteSelection().command(
|
|
9160
|
-
|
|
9189
|
+
Rt(
|
|
9161
9190
|
n.selection.from,
|
|
9162
9191
|
l,
|
|
9163
9192
|
l
|
|
@@ -9169,7 +9198,7 @@ const ct = (e, t) => {
|
|
|
9169
9198
|
// editor since the browser will try to use tab for keyboard navigation.
|
|
9170
9199
|
Tab: () => {
|
|
9171
9200
|
var i, n, r;
|
|
9172
|
-
return (i = this.options.editor.formattingToolbar) != null && i.shown || (n = this.options.editor.linkToolbar) != null && n.shown || (r = this.options.editor.filePanel) != null && r.shown ? !1 :
|
|
9201
|
+
return (i = this.options.editor.formattingToolbar) != null && i.shown || (n = this.options.editor.linkToolbar) != null && n.shown || (r = this.options.editor.filePanel) != null && r.shown ? !1 : Wt(this.options.editor);
|
|
9173
9202
|
},
|
|
9174
9203
|
"Shift-Tab": () => {
|
|
9175
9204
|
var i, n, r;
|
|
@@ -9180,7 +9209,7 @@ const ct = (e, t) => {
|
|
|
9180
9209
|
};
|
|
9181
9210
|
}
|
|
9182
9211
|
});
|
|
9183
|
-
class
|
|
9212
|
+
class yr {
|
|
9184
9213
|
constructor(t, o, i) {
|
|
9185
9214
|
u(this, "state");
|
|
9186
9215
|
u(this, "emitUpdate");
|
|
@@ -9307,8 +9336,8 @@ class vr {
|
|
|
9307
9336
|
);
|
|
9308
9337
|
}
|
|
9309
9338
|
}
|
|
9310
|
-
const
|
|
9311
|
-
class
|
|
9339
|
+
const vr = new I("LinkToolbarPlugin");
|
|
9340
|
+
class wr extends te {
|
|
9312
9341
|
constructor(o) {
|
|
9313
9342
|
super();
|
|
9314
9343
|
u(this, "view");
|
|
@@ -9347,8 +9376,8 @@ class xr extends te {
|
|
|
9347
9376
|
});
|
|
9348
9377
|
u(this, "closeMenu", () => this.view.closeMenu());
|
|
9349
9378
|
this.plugin = new E({
|
|
9350
|
-
key:
|
|
9351
|
-
view: (i) => (this.view = new
|
|
9379
|
+
key: vr,
|
|
9380
|
+
view: (i) => (this.view = new yr(o, i, (n) => {
|
|
9352
9381
|
this.emit("update", n);
|
|
9353
9382
|
}), this.view),
|
|
9354
9383
|
props: {
|
|
@@ -9364,12 +9393,12 @@ class xr extends te {
|
|
|
9364
9393
|
return ((i = (o = this.view) == null ? void 0 : o.state) == null ? void 0 : i.show) || !1;
|
|
9365
9394
|
}
|
|
9366
9395
|
}
|
|
9367
|
-
const
|
|
9368
|
-
class
|
|
9396
|
+
const xr = new I("node-selection-keyboard");
|
|
9397
|
+
class Cr {
|
|
9369
9398
|
constructor() {
|
|
9370
9399
|
u(this, "plugin");
|
|
9371
9400
|
this.plugin = new E({
|
|
9372
|
-
key:
|
|
9401
|
+
key: xr,
|
|
9373
9402
|
props: {
|
|
9374
9403
|
handleKeyDown: (t, o) => {
|
|
9375
9404
|
if ("node" in t.state.selection) {
|
|
@@ -9397,12 +9426,12 @@ class Er {
|
|
|
9397
9426
|
});
|
|
9398
9427
|
}
|
|
9399
9428
|
}
|
|
9400
|
-
const
|
|
9401
|
-
class
|
|
9429
|
+
const Er = new I("blocknote-placeholder");
|
|
9430
|
+
class Sr {
|
|
9402
9431
|
constructor(t, o) {
|
|
9403
9432
|
u(this, "plugin");
|
|
9404
9433
|
this.plugin = new E({
|
|
9405
|
-
key:
|
|
9434
|
+
key: Er,
|
|
9406
9435
|
view: () => {
|
|
9407
9436
|
const i = document.createElement("style"), n = t._tiptapEditor.options.injectNonce;
|
|
9408
9437
|
n && i.setAttribute("nonce", n), t._tiptapEditor.view.root instanceof ShadowRoot ? t._tiptapEditor.view.root.append(i) : t._tiptapEditor.view.root.head.appendChild(i);
|
|
@@ -9450,7 +9479,7 @@ class Br {
|
|
|
9450
9479
|
});
|
|
9451
9480
|
}
|
|
9452
9481
|
}
|
|
9453
|
-
const pt = new I("previous-blocks"),
|
|
9482
|
+
const pt = new I("previous-blocks"), Br = {
|
|
9454
9483
|
// Numbered List Items
|
|
9455
9484
|
index: "index",
|
|
9456
9485
|
// Headings
|
|
@@ -9460,7 +9489,7 @@ const pt = new I("previous-blocks"), Mr = {
|
|
|
9460
9489
|
depth: "depth",
|
|
9461
9490
|
"depth-change": "depth-change"
|
|
9462
9491
|
};
|
|
9463
|
-
class
|
|
9492
|
+
class Mr {
|
|
9464
9493
|
constructor() {
|
|
9465
9494
|
u(this, "plugin");
|
|
9466
9495
|
let t;
|
|
@@ -9530,7 +9559,7 @@ class Tr {
|
|
|
9530
9559
|
return;
|
|
9531
9560
|
const s = i.currentTransactionOldBlockAttrs[r.attrs.id], l = {};
|
|
9532
9561
|
for (const [d, p] of Object.entries(s))
|
|
9533
|
-
l["data-prev-" +
|
|
9562
|
+
l["data-prev-" + Br[d]] = p || "none";
|
|
9534
9563
|
const c = J.node(a, a + r.nodeSize, {
|
|
9535
9564
|
...l
|
|
9536
9565
|
});
|
|
@@ -9541,7 +9570,7 @@ class Tr {
|
|
|
9541
9570
|
});
|
|
9542
9571
|
}
|
|
9543
9572
|
}
|
|
9544
|
-
function
|
|
9573
|
+
function eo(e, t) {
|
|
9545
9574
|
var o, i;
|
|
9546
9575
|
for (; e && e.parentElement && e.parentElement !== t.dom && ((o = e.getAttribute) == null ? void 0 : o.call(e, "data-node-type")) !== "blockContainer"; )
|
|
9547
9576
|
e = e.parentElement;
|
|
@@ -9584,7 +9613,7 @@ class q extends Te {
|
|
|
9584
9613
|
}
|
|
9585
9614
|
}
|
|
9586
9615
|
let j;
|
|
9587
|
-
function
|
|
9616
|
+
function Tr(e, t) {
|
|
9588
9617
|
let o, i;
|
|
9589
9618
|
const n = t.resolve(e.from).node().type.spec.group === "blockContent", r = t.resolve(e.to).node().type.spec.group === "blockContent", a = Math.min(e.$anchor.depth, e.$head.depth);
|
|
9590
9619
|
if (n && r) {
|
|
@@ -9607,30 +9636,30 @@ function ht(e, t, o = t) {
|
|
|
9607
9636
|
);
|
|
9608
9637
|
for (let d = n.childElementCount - 1; d >= 0; d--)
|
|
9609
9638
|
(d > s || d < a) && i.removeChild(i.children[d]);
|
|
9610
|
-
|
|
9639
|
+
to(e.root), j = i;
|
|
9611
9640
|
const c = e.dom.className.split(" ").filter(
|
|
9612
9641
|
(d) => d !== "ProseMirror" && d !== "bn-root" && d !== "bn-editor"
|
|
9613
9642
|
).join(" ");
|
|
9614
9643
|
j.className = j.className + " bn-drag-preview " + c, e.root instanceof ShadowRoot ? e.root.appendChild(j) : e.root.body.appendChild(j);
|
|
9615
9644
|
}
|
|
9616
|
-
function
|
|
9645
|
+
function to(e) {
|
|
9617
9646
|
j !== void 0 && (e instanceof ShadowRoot ? e.removeChild(j) : e.body.removeChild(j), j = void 0);
|
|
9618
9647
|
}
|
|
9619
|
-
function
|
|
9648
|
+
function Lr(e, t, o) {
|
|
9620
9649
|
if (!e.dataTransfer)
|
|
9621
9650
|
return;
|
|
9622
9651
|
const i = o.prosemirrorView, n = ee(t.id, i.state.doc).posBeforeNode;
|
|
9623
9652
|
if (n != null) {
|
|
9624
|
-
const r = i.state.selection, a = i.state.doc, { from: s, to: l } =
|
|
9653
|
+
const r = i.state.selection, a = i.state.doc, { from: s, to: l } = Tr(r, a), c = s <= n && n < l, d = r.$anchor.node() !== r.$head.node() || r instanceof q;
|
|
9625
9654
|
c && d ? (i.dispatch(
|
|
9626
9655
|
i.state.tr.setSelection(q.create(a, s, l))
|
|
9627
9656
|
), ht(i, s, l)) : (i.dispatch(
|
|
9628
9657
|
i.state.tr.setSelection(de.create(i.state.doc, n))
|
|
9629
9658
|
), ht(i, n));
|
|
9630
|
-
const p = i.state.selection.content(), h = o.pmSchema, g =
|
|
9659
|
+
const p = i.state.selection.content(), h = o.pmSchema, g = kt.__serializeForClipboard(
|
|
9631
9660
|
i,
|
|
9632
9661
|
p
|
|
9633
|
-
).dom.innerHTML, m = we(h, o), f =
|
|
9662
|
+
).dom.innerHTML, m = we(h, o), f = Jt(p.content, o.schema), b = m.exportBlocks(f, {}), k = $e(b);
|
|
9634
9663
|
e.dataTransfer.clearData(), e.dataTransfer.setData("blocknote/html", g), e.dataTransfer.setData("text/html", b), e.dataTransfer.setData("text/plain", k), e.dataTransfer.effectAllowed = "move", e.dataTransfer.setDragImage(j, 0, 0), i.dragging = { slice: p, move: !0 };
|
|
9635
9664
|
}
|
|
9636
9665
|
}
|
|
@@ -9647,9 +9676,9 @@ function Re(e, t, o = !0) {
|
|
|
9647
9676
|
top: t.top
|
|
9648
9677
|
},
|
|
9649
9678
|
!1
|
|
9650
|
-
) :
|
|
9679
|
+
) : eo(n, e);
|
|
9651
9680
|
}
|
|
9652
|
-
function
|
|
9681
|
+
function Ir(e, t) {
|
|
9653
9682
|
if (!t.dom.firstChild)
|
|
9654
9683
|
return;
|
|
9655
9684
|
const o = t.dom.firstChild.getBoundingClientRect(), i = {
|
|
@@ -9664,7 +9693,7 @@ function Ar(e, t) {
|
|
|
9664
9693
|
}
|
|
9665
9694
|
return a;
|
|
9666
9695
|
}
|
|
9667
|
-
class
|
|
9696
|
+
class Ar {
|
|
9668
9697
|
constructor(t, o, i) {
|
|
9669
9698
|
u(this, "state");
|
|
9670
9699
|
u(this, "emitUpdate");
|
|
@@ -9678,7 +9707,7 @@ class Pr {
|
|
|
9678
9707
|
var i, n, r, a;
|
|
9679
9708
|
if (this.menuFrozen || !this.mousePos)
|
|
9680
9709
|
return;
|
|
9681
|
-
const t =
|
|
9710
|
+
const t = Ir(this.mousePos, this.pmView);
|
|
9682
9711
|
if (!t || !this.editor.isEditable) {
|
|
9683
9712
|
(i = this.state) != null && i.show && (this.state.show = !1, this.updateState(this.state));
|
|
9684
9713
|
return;
|
|
@@ -9825,8 +9854,8 @@ class Pr {
|
|
|
9825
9854
|
);
|
|
9826
9855
|
}
|
|
9827
9856
|
}
|
|
9828
|
-
const
|
|
9829
|
-
class
|
|
9857
|
+
const Pr = new I("SideMenuPlugin");
|
|
9858
|
+
class Nr extends te {
|
|
9830
9859
|
constructor(o) {
|
|
9831
9860
|
super();
|
|
9832
9861
|
u(this, "view");
|
|
@@ -9835,18 +9864,20 @@ class jr extends te {
|
|
|
9835
9864
|
* Handles drag & drop events for blocks.
|
|
9836
9865
|
*/
|
|
9837
9866
|
u(this, "blockDragStart", (o, i) => {
|
|
9838
|
-
|
|
9867
|
+
Lr(o, i, this.editor);
|
|
9839
9868
|
});
|
|
9840
9869
|
/**
|
|
9841
9870
|
* Handles drag & drop events for blocks.
|
|
9842
9871
|
*/
|
|
9843
|
-
u(this, "blockDragEnd", () =>
|
|
9872
|
+
u(this, "blockDragEnd", () => to(this.editor.prosemirrorView.root));
|
|
9844
9873
|
/**
|
|
9845
9874
|
* Freezes the side menu. When frozen, the side menu will stay
|
|
9846
9875
|
* attached to the same block regardless of which block is hovered by the
|
|
9847
9876
|
* mouse cursor.
|
|
9848
9877
|
*/
|
|
9849
|
-
u(this, "freezeMenu", () =>
|
|
9878
|
+
u(this, "freezeMenu", () => {
|
|
9879
|
+
this.view.menuFrozen = !0, this.view.state.show = !0, this.view.emitUpdate(this.view.state);
|
|
9880
|
+
});
|
|
9850
9881
|
/**
|
|
9851
9882
|
* Unfreezes the side menu. When frozen, the side menu will stay
|
|
9852
9883
|
* attached to the same block regardless of which block is hovered by the
|
|
@@ -9856,8 +9887,8 @@ class jr extends te {
|
|
|
9856
9887
|
this.view.menuFrozen = !1, this.view.state.show = !1, this.view.emitUpdate(this.view.state);
|
|
9857
9888
|
});
|
|
9858
9889
|
this.editor = o, this.plugin = new E({
|
|
9859
|
-
key:
|
|
9860
|
-
view: (i) => (this.view = new
|
|
9890
|
+
key: Pr,
|
|
9891
|
+
view: (i) => (this.view = new Ar(o, i, (n) => {
|
|
9861
9892
|
this.emit("update", n);
|
|
9862
9893
|
}), this.view)
|
|
9863
9894
|
});
|
|
@@ -9866,8 +9897,8 @@ class jr extends te {
|
|
|
9866
9897
|
return this.on("update", o);
|
|
9867
9898
|
}
|
|
9868
9899
|
}
|
|
9869
|
-
const
|
|
9870
|
-
class
|
|
9900
|
+
const jr = fo((e) => e.type.name === "blockContainer");
|
|
9901
|
+
class Hr {
|
|
9871
9902
|
constructor(t, o) {
|
|
9872
9903
|
u(this, "state");
|
|
9873
9904
|
u(this, "emitUpdate");
|
|
@@ -9934,7 +9965,7 @@ class Dr {
|
|
|
9934
9965
|
}
|
|
9935
9966
|
}
|
|
9936
9967
|
const X = new I("SuggestionMenuPlugin");
|
|
9937
|
-
class
|
|
9968
|
+
class Dr extends te {
|
|
9938
9969
|
constructor(o) {
|
|
9939
9970
|
super();
|
|
9940
9971
|
u(this, "view");
|
|
@@ -9954,7 +9985,7 @@ class Ur extends te {
|
|
|
9954
9985
|
const i = this.triggerCharacters;
|
|
9955
9986
|
this.plugin = new E({
|
|
9956
9987
|
key: X,
|
|
9957
|
-
view: () => (this.view = new
|
|
9988
|
+
view: () => (this.view = new Hr(
|
|
9958
9989
|
o,
|
|
9959
9990
|
(n, r) => {
|
|
9960
9991
|
this.emit(`update ${n}`, r);
|
|
@@ -10011,7 +10042,7 @@ class Ur extends te {
|
|
|
10011
10042
|
if (r === void 0)
|
|
10012
10043
|
return null;
|
|
10013
10044
|
if (!r.deleteTriggerCharacter) {
|
|
10014
|
-
const a =
|
|
10045
|
+
const a = jr(n.selection);
|
|
10015
10046
|
if (a)
|
|
10016
10047
|
return Y.create(n.doc, [
|
|
10017
10048
|
J.node(
|
|
@@ -10048,20 +10079,20 @@ class Ur extends te {
|
|
|
10048
10079
|
return ((i = (o = this.view) == null ? void 0 : o.state) == null ? void 0 : i.show) || !1;
|
|
10049
10080
|
}
|
|
10050
10081
|
}
|
|
10051
|
-
function
|
|
10082
|
+
function Ka(e, t) {
|
|
10052
10083
|
e.suggestionMenus.addTriggerCharacter(t);
|
|
10053
10084
|
}
|
|
10054
10085
|
let S;
|
|
10055
10086
|
function mt(e) {
|
|
10056
10087
|
S || (S = document.createElement("div"), S.innerHTML = "_", S.style.opacity = "0", S.style.height = "1px", S.style.width = "1px", e instanceof Document ? e.body.appendChild(S) : e.appendChild(S));
|
|
10057
10088
|
}
|
|
10058
|
-
function
|
|
10089
|
+
function Ur(e) {
|
|
10059
10090
|
S && (e instanceof Document ? e.body.removeChild(S) : e.removeChild(S), S = void 0);
|
|
10060
10091
|
}
|
|
10061
10092
|
function fe(e) {
|
|
10062
10093
|
return Array.prototype.indexOf.call(e.parentElement.childNodes, e);
|
|
10063
10094
|
}
|
|
10064
|
-
function
|
|
10095
|
+
function Or(e) {
|
|
10065
10096
|
let t = e;
|
|
10066
10097
|
for (; t && t.nodeName !== "TD" && t.nodeName !== "TH" && !t.classList.contains("tableWrapper"); ) {
|
|
10067
10098
|
if (t.classList.contains("ProseMirror"))
|
|
@@ -10081,12 +10112,12 @@ function Rr(e) {
|
|
|
10081
10112
|
tbodyNode: t.querySelector("tbody")
|
|
10082
10113
|
};
|
|
10083
10114
|
}
|
|
10084
|
-
function
|
|
10115
|
+
function Rr(e, t) {
|
|
10085
10116
|
const o = t.querySelectorAll(e);
|
|
10086
10117
|
for (let i = 0; i < o.length; i++)
|
|
10087
10118
|
o[i].style.visibility = "hidden";
|
|
10088
10119
|
}
|
|
10089
|
-
class
|
|
10120
|
+
class zr {
|
|
10090
10121
|
constructor(t, o, i) {
|
|
10091
10122
|
u(this, "state");
|
|
10092
10123
|
u(this, "emitUpdate");
|
|
@@ -10106,7 +10137,7 @@ class Vr {
|
|
|
10106
10137
|
var c, d, p, h;
|
|
10107
10138
|
if (this.menuFrozen || this.mouseState === "selecting" || !(t.target instanceof Element) || !this.pmView.dom.contains(t.target))
|
|
10108
10139
|
return;
|
|
10109
|
-
const o =
|
|
10140
|
+
const o = Or(t.target);
|
|
10110
10141
|
if ((o == null ? void 0 : o.type) === "cell" && this.mouseState === "down" && !((c = this.state) != null && c.draggingState)) {
|
|
10111
10142
|
this.mouseState = "selecting", (d = this.state) != null && d.show && (this.state.show = !1, this.state.showAddOrRemoveRowsButton = !1, this.state.showAddOrRemoveColumnsButton = !1, this.emitUpdate());
|
|
10112
10143
|
return;
|
|
@@ -10117,7 +10148,7 @@ class Vr {
|
|
|
10117
10148
|
}
|
|
10118
10149
|
if (!o.tbodyNode)
|
|
10119
10150
|
return;
|
|
10120
|
-
const i = o.tbodyNode.getBoundingClientRect(), n =
|
|
10151
|
+
const i = o.tbodyNode.getBoundingClientRect(), n = eo(o.domNode, this.pmView);
|
|
10121
10152
|
if (!n)
|
|
10122
10153
|
return;
|
|
10123
10154
|
this.tableElement = n.node;
|
|
@@ -10132,7 +10163,7 @@ class Vr {
|
|
|
10132
10163
|
this.editor.schema.styleSchema,
|
|
10133
10164
|
this.editor.blockCache
|
|
10134
10165
|
);
|
|
10135
|
-
if (
|
|
10166
|
+
if (Pn("table", s, this.editor) && (this.tablePos = a.posBeforeNode + 1, r = s), !r)
|
|
10136
10167
|
return;
|
|
10137
10168
|
this.tableId = n.id;
|
|
10138
10169
|
const l = (h = o.domNode.closest(".tableWrapper")) == null ? void 0 : h.querySelector(".table-widgets-container");
|
|
@@ -10174,7 +10205,7 @@ class Vr {
|
|
|
10174
10205
|
var h;
|
|
10175
10206
|
if (((h = this.state) == null ? void 0 : h.draggingState) === void 0)
|
|
10176
10207
|
return;
|
|
10177
|
-
t.preventDefault(), t.dataTransfer.dropEffect = "move",
|
|
10208
|
+
t.preventDefault(), t.dataTransfer.dropEffect = "move", Rr(
|
|
10178
10209
|
".prosemirror-dropcursor-block, .prosemirror-dropcursor-inline",
|
|
10179
10210
|
this.pmView.root
|
|
10180
10211
|
);
|
|
@@ -10265,7 +10296,7 @@ class Vr {
|
|
|
10265
10296
|
}
|
|
10266
10297
|
}
|
|
10267
10298
|
const re = new I("TableHandlesPlugin");
|
|
10268
|
-
class
|
|
10299
|
+
class Vr extends te {
|
|
10269
10300
|
constructor(o) {
|
|
10270
10301
|
super();
|
|
10271
10302
|
u(this, "view");
|
|
@@ -10325,7 +10356,7 @@ class Fr extends te {
|
|
|
10325
10356
|
);
|
|
10326
10357
|
this.view.state.draggingState = void 0, this.view.emitUpdate(), this.editor.dispatch(
|
|
10327
10358
|
this.editor._tiptapEditor.state.tr.setMeta(re, null)
|
|
10328
|
-
),
|
|
10359
|
+
), Ur(this.editor._tiptapEditor.view.root);
|
|
10329
10360
|
});
|
|
10330
10361
|
/**
|
|
10331
10362
|
* Freezes the drag handles. When frozen, they will stay attached to the same
|
|
@@ -10343,7 +10374,7 @@ class Fr extends te {
|
|
|
10343
10374
|
});
|
|
10344
10375
|
this.editor = o, this.plugin = new E({
|
|
10345
10376
|
key: re,
|
|
10346
|
-
view: (i) => (this.view = new
|
|
10377
|
+
view: (i) => (this.view = new zr(o, i, (n) => {
|
|
10347
10378
|
this.emit("update", n);
|
|
10348
10379
|
}), this.view),
|
|
10349
10380
|
// We use decorations to render the drop cursor when dragging a table row
|
|
@@ -10399,7 +10430,7 @@ class Fr extends te {
|
|
|
10399
10430
|
return this.on("update", o);
|
|
10400
10431
|
}
|
|
10401
10432
|
}
|
|
10402
|
-
const
|
|
10433
|
+
const Fr = T.create({
|
|
10403
10434
|
name: "textAlignment",
|
|
10404
10435
|
addGlobalAttributes() {
|
|
10405
10436
|
return [
|
|
@@ -10425,7 +10456,7 @@ const Gr = T.create({
|
|
|
10425
10456
|
}
|
|
10426
10457
|
];
|
|
10427
10458
|
}
|
|
10428
|
-
}),
|
|
10459
|
+
}), Gr = T.create({
|
|
10429
10460
|
name: "blockTextColor",
|
|
10430
10461
|
addGlobalAttributes() {
|
|
10431
10462
|
return [
|
|
@@ -10443,7 +10474,7 @@ const Gr = T.create({
|
|
|
10443
10474
|
}
|
|
10444
10475
|
];
|
|
10445
10476
|
}
|
|
10446
|
-
}),
|
|
10477
|
+
}), Wr = T.create({
|
|
10447
10478
|
name: "trailingNode",
|
|
10448
10479
|
addProseMirrorPlugins() {
|
|
10449
10480
|
const e = new I(this.name);
|
|
@@ -10478,13 +10509,13 @@ const Gr = T.create({
|
|
|
10478
10509
|
})
|
|
10479
10510
|
];
|
|
10480
10511
|
}
|
|
10481
|
-
}),
|
|
10512
|
+
}), $r = {
|
|
10482
10513
|
blockColor: "data-block-color",
|
|
10483
10514
|
blockStyle: "data-block-style",
|
|
10484
10515
|
id: "data-id",
|
|
10485
10516
|
depth: "data-depth",
|
|
10486
10517
|
depthChange: "data-depth-change"
|
|
10487
|
-
},
|
|
10518
|
+
}, Kr = G.create({
|
|
10488
10519
|
name: "blockContainer",
|
|
10489
10520
|
group: "blockGroupChild bnBlock",
|
|
10490
10521
|
// A block always contains content, and optionally a blockGroup which contains nested blocks
|
|
@@ -10500,7 +10531,7 @@ const Gr = T.create({
|
|
|
10500
10531
|
if (typeof e == "string")
|
|
10501
10532
|
return !1;
|
|
10502
10533
|
const t = {};
|
|
10503
|
-
for (const [o, i] of Object.entries(
|
|
10534
|
+
for (const [o, i] of Object.entries($r))
|
|
10504
10535
|
e.getAttribute(i) && (t[o] = e.getAttribute(i));
|
|
10505
10536
|
return e.getAttribute("data-node-type") === "blockContainer" ? t : !1;
|
|
10506
10537
|
}
|
|
@@ -10525,7 +10556,7 @@ const Gr = T.create({
|
|
|
10525
10556
|
contentDOM: i
|
|
10526
10557
|
};
|
|
10527
10558
|
}
|
|
10528
|
-
}),
|
|
10559
|
+
}), qr = G.create({
|
|
10529
10560
|
name: "blockGroup",
|
|
10530
10561
|
group: "childContainer",
|
|
10531
10562
|
content: "blockGroupChild+",
|
|
@@ -10554,28 +10585,28 @@ const Gr = T.create({
|
|
|
10554
10585
|
contentDOM: o
|
|
10555
10586
|
};
|
|
10556
10587
|
}
|
|
10557
|
-
}),
|
|
10588
|
+
}), Xr = G.create({
|
|
10558
10589
|
name: "doc",
|
|
10559
10590
|
topNode: !0,
|
|
10560
10591
|
content: "blockGroup"
|
|
10561
|
-
}),
|
|
10562
|
-
const t = {}, o =
|
|
10592
|
+
}), Zr = (e) => {
|
|
10593
|
+
const t = {}, o = Jr(e);
|
|
10563
10594
|
for (const n of o)
|
|
10564
10595
|
t[n.name] = n;
|
|
10565
|
-
t.formattingToolbar = new
|
|
10596
|
+
t.formattingToolbar = new gr(
|
|
10566
10597
|
e.editor
|
|
10567
|
-
), t.linkToolbar = new
|
|
10598
|
+
), t.linkToolbar = new wr(e.editor), t.sideMenu = new Nr(e.editor), t.suggestionMenus = new Dr(e.editor), t.filePanel = new hr(e.editor), t.placeholder = new Sr(e.editor, e.placeholders), (e.animations ?? !0) && (t.animations = new Mr()), e.tableHandles && (t.tableHandles = new Vr(e.editor)), t.dropCursor = {
|
|
10568
10599
|
plugin: e.dropCursor({
|
|
10569
10600
|
width: 5,
|
|
10570
10601
|
color: "#ddeeff",
|
|
10571
10602
|
editor: e.editor
|
|
10572
10603
|
})
|
|
10573
|
-
}, t.nodeSelectionKeyboard = new
|
|
10604
|
+
}, t.nodeSelectionKeyboard = new Cr();
|
|
10574
10605
|
const i = e.disableExtensions || [];
|
|
10575
|
-
for (const n of
|
|
10606
|
+
for (const n of i)
|
|
10576
10607
|
delete t[n];
|
|
10577
10608
|
return t;
|
|
10578
|
-
},
|
|
10609
|
+
}, Jr = (e) => {
|
|
10579
10610
|
var o;
|
|
10580
10611
|
const t = [
|
|
10581
10612
|
ie.ClipboardTextSerializer,
|
|
@@ -10584,19 +10615,19 @@ const Gr = T.create({
|
|
|
10584
10615
|
ie.FocusEvents,
|
|
10585
10616
|
ie.Tabindex,
|
|
10586
10617
|
// DevTools,
|
|
10587
|
-
|
|
10618
|
+
Uo,
|
|
10588
10619
|
// DropCursor,
|
|
10589
10620
|
ce.configure({
|
|
10590
10621
|
// everything from bnBlock group (nodes that represent a BlockNote block should have an id)
|
|
10591
10622
|
types: ["blockContainer", "columnList", "column"],
|
|
10592
10623
|
setIdAttribute: e.setIdAttribute
|
|
10593
10624
|
}),
|
|
10594
|
-
|
|
10625
|
+
Oo.extend({ priority: 10 }),
|
|
10595
10626
|
// Comments,
|
|
10596
10627
|
// basics:
|
|
10597
|
-
|
|
10628
|
+
Vo,
|
|
10598
10629
|
// marks:
|
|
10599
|
-
|
|
10630
|
+
zo.extend({
|
|
10600
10631
|
inclusive: !1,
|
|
10601
10632
|
addKeyboardShortcuts() {
|
|
10602
10633
|
return {
|
|
@@ -10605,9 +10636,9 @@ const Gr = T.create({
|
|
|
10605
10636
|
}
|
|
10606
10637
|
}),
|
|
10607
10638
|
...Object.values(e.styleSpecs).map((i) => i.implementation.mark),
|
|
10608
|
-
Wr,
|
|
10609
|
-
pr,
|
|
10610
10639
|
Gr,
|
|
10640
|
+
ur,
|
|
10641
|
+
Fr,
|
|
10611
10642
|
// make sure escape blurs editor, so that we can tab to other elements in the host page (accessibility)
|
|
10612
10643
|
T.create({
|
|
10613
10644
|
name: "OverrideEscape",
|
|
@@ -10618,15 +10649,15 @@ const Gr = T.create({
|
|
|
10618
10649
|
}
|
|
10619
10650
|
}),
|
|
10620
10651
|
// nodes
|
|
10621
|
-
|
|
10622
|
-
|
|
10652
|
+
Xr,
|
|
10653
|
+
Kr.configure({
|
|
10623
10654
|
editor: e.editor,
|
|
10624
10655
|
domAttributes: e.domAttributes
|
|
10625
10656
|
}),
|
|
10626
|
-
|
|
10657
|
+
_r.configure({
|
|
10627
10658
|
editor: e.editor
|
|
10628
10659
|
}),
|
|
10629
|
-
|
|
10660
|
+
qr.configure({
|
|
10630
10661
|
domAttributes: e.domAttributes
|
|
10631
10662
|
}),
|
|
10632
10663
|
...Object.values(e.inlineContentSpecs).filter((i) => i.config !== "link" && i.config !== "text").map((i) => i.implementation.node.configure({
|
|
@@ -10646,16 +10677,16 @@ const Gr = T.create({
|
|
|
10646
10677
|
domAttributes: e.domAttributes
|
|
10647
10678
|
})
|
|
10648
10679
|
]),
|
|
10649
|
-
|
|
10650
|
-
|
|
10651
|
-
|
|
10680
|
+
cr(e.editor),
|
|
10681
|
+
lr(e.editor),
|
|
10682
|
+
ar(e.editor),
|
|
10652
10683
|
// This needs to be at the bottom of this list, because Key events (such as enter, when selecting a /command),
|
|
10653
10684
|
// should be handled before Enter handlers in other components like splitListItem
|
|
10654
|
-
...e.trailingBlock === void 0 || e.trailingBlock ? [
|
|
10685
|
+
...e.trailingBlock === void 0 || e.trailingBlock ? [Wr] : []
|
|
10655
10686
|
];
|
|
10656
10687
|
if (e.collaboration) {
|
|
10657
10688
|
if (t.push(
|
|
10658
|
-
|
|
10689
|
+
Ho.configure({
|
|
10659
10690
|
fragment: e.collaboration.fragment
|
|
10660
10691
|
})
|
|
10661
10692
|
), (o = e.collaboration.provider) != null && o.awareness) {
|
|
@@ -10668,7 +10699,7 @@ const Gr = T.create({
|
|
|
10668
10699
|
return r.insertBefore(s, null), r.insertBefore(a, null), r.insertBefore(l, null), r;
|
|
10669
10700
|
};
|
|
10670
10701
|
t.push(
|
|
10671
|
-
|
|
10702
|
+
Do.configure({
|
|
10672
10703
|
user: e.collaboration.user,
|
|
10673
10704
|
render: e.collaboration.renderCursor || i,
|
|
10674
10705
|
provider: e.collaboration.provider
|
|
@@ -10676,16 +10707,16 @@ const Gr = T.create({
|
|
|
10676
10707
|
);
|
|
10677
10708
|
}
|
|
10678
10709
|
} else
|
|
10679
|
-
t.push(
|
|
10710
|
+
t.push(Ro);
|
|
10680
10711
|
return t;
|
|
10681
10712
|
};
|
|
10682
|
-
function
|
|
10713
|
+
function Yr(e, t) {
|
|
10683
10714
|
const o = [];
|
|
10684
10715
|
return e.forEach((i, n, r) => {
|
|
10685
10716
|
r !== t && o.push(i);
|
|
10686
10717
|
}), A.from(o);
|
|
10687
10718
|
}
|
|
10688
|
-
function
|
|
10719
|
+
function Qr(e, t) {
|
|
10689
10720
|
const o = [];
|
|
10690
10721
|
for (let i = 0; i < e.childCount; i++)
|
|
10691
10722
|
if (e.child(i).type.name === "tableRow")
|
|
@@ -10703,15 +10734,15 @@ function ea(e, t) {
|
|
|
10703
10734
|
o.push(e.child(i));
|
|
10704
10735
|
return e = A.from(o), e;
|
|
10705
10736
|
}
|
|
10706
|
-
function
|
|
10737
|
+
function ea(e, t) {
|
|
10707
10738
|
let o = A.from(e.content);
|
|
10708
|
-
o =
|
|
10739
|
+
o = Qr(o, t.state.schema);
|
|
10709
10740
|
for (let i = 0; i < o.childCount; i++)
|
|
10710
10741
|
if (o.child(i).type.spec.group === "blockContent") {
|
|
10711
10742
|
const n = [o.child(i)];
|
|
10712
10743
|
if (i + 1 < o.childCount && o.child(i + 1).type.name === "blockGroup") {
|
|
10713
10744
|
const a = o.child(i + 1).child(0).child(0);
|
|
10714
|
-
(a.type.name === "bulletListItem" || a.type.name === "numberedListItem" || a.type.name === "checkListItem") && (n.push(o.child(i + 1)), o =
|
|
10745
|
+
(a.type.name === "bulletListItem" || a.type.name === "numberedListItem" || a.type.name === "checkListItem") && (n.push(o.child(i + 1)), o = Yr(o, i + 1));
|
|
10715
10746
|
}
|
|
10716
10747
|
const r = t.state.schema.nodes.blockContainer.createChecked(
|
|
10717
10748
|
void 0,
|
|
@@ -10738,15 +10769,15 @@ class qe {
|
|
|
10738
10769
|
u(this, "BlockNoteEditor", "only for types");
|
|
10739
10770
|
u(this, "Block", "only for types");
|
|
10740
10771
|
u(this, "PartialBlock", "only for types");
|
|
10741
|
-
this.blockSpecs = Ie(t == null ? void 0 : t.blockSpecs) ||
|
|
10772
|
+
this.blockSpecs = Ie(t == null ? void 0 : t.blockSpecs) || zt, this.inlineContentSpecs = Ie(t == null ? void 0 : t.inlineContentSpecs) || Ft, this.styleSpecs = Ie(t == null ? void 0 : t.styleSpecs) || Vt, this.blockSchema = Lt(this.blockSpecs), this.inlineContentSchema = At(
|
|
10742
10773
|
this.inlineContentSpecs
|
|
10743
|
-
), this.styleSchema =
|
|
10774
|
+
), this.styleSchema = Nt(this.styleSpecs);
|
|
10744
10775
|
}
|
|
10745
10776
|
static create(t) {
|
|
10746
10777
|
return new qe(t);
|
|
10747
10778
|
}
|
|
10748
10779
|
}
|
|
10749
|
-
const _e = class _e extends
|
|
10780
|
+
const _e = class _e extends go {
|
|
10750
10781
|
constructor(o, i) {
|
|
10751
10782
|
super({ ...o, content: void 0 });
|
|
10752
10783
|
u(this, "_state");
|
|
@@ -10766,14 +10797,14 @@ const _e = class _e extends fo {
|
|
|
10766
10797
|
if (r)
|
|
10767
10798
|
return r;
|
|
10768
10799
|
const c = a.apply(n.nodes.doc, l), d = JSON.parse(JSON.stringify(c.toJSON()));
|
|
10769
|
-
return d.content[0].content[0].attrs.id = "initialBlockId", r =
|
|
10800
|
+
return d.content[0].content[0].attrs.id = "initialBlockId", r = so.fromJSON(n, d), r;
|
|
10770
10801
|
};
|
|
10771
10802
|
let s;
|
|
10772
10803
|
try {
|
|
10773
10804
|
const l = o == null ? void 0 : o.content.map(
|
|
10774
10805
|
(c) => W(c, this.schema, i).toJSON()
|
|
10775
10806
|
);
|
|
10776
|
-
s =
|
|
10807
|
+
s = bo(
|
|
10777
10808
|
{
|
|
10778
10809
|
type: "doc",
|
|
10779
10810
|
content: [
|
|
@@ -10794,7 +10825,7 @@ const _e = class _e extends fo {
|
|
|
10794
10825
|
"Error creating document from blocks passed as `initialContent`:\n" + +JSON.stringify(o.content)
|
|
10795
10826
|
);
|
|
10796
10827
|
}
|
|
10797
|
-
this._state =
|
|
10828
|
+
this._state = _o.create({
|
|
10798
10829
|
doc: s,
|
|
10799
10830
|
schema: this.schema
|
|
10800
10831
|
// selection: selection || undefined,
|
|
@@ -10813,7 +10844,7 @@ const _e = class _e extends fo {
|
|
|
10813
10844
|
this._creating = !0, queueMicrotask(() => {
|
|
10814
10845
|
if (!this._creating)
|
|
10815
10846
|
return;
|
|
10816
|
-
this.view = new
|
|
10847
|
+
this.view = new Fo(
|
|
10817
10848
|
{ mount: this.options.element },
|
|
10818
10849
|
// use mount option so that we reuse the existing element instead of creating a new one
|
|
10819
10850
|
{
|
|
@@ -10844,12 +10875,12 @@ let ke = _e;
|
|
|
10844
10875
|
ke.prototype.createView = function() {
|
|
10845
10876
|
this.options.onPaste = this.options.onDrop = void 0;
|
|
10846
10877
|
};
|
|
10847
|
-
const
|
|
10878
|
+
const ta = {
|
|
10848
10879
|
enableInputRules: !0,
|
|
10849
10880
|
enablePasteRules: !0,
|
|
10850
10881
|
enableCoreExtensions: !1
|
|
10851
10882
|
};
|
|
10852
|
-
class
|
|
10883
|
+
class oo {
|
|
10853
10884
|
constructor(t) {
|
|
10854
10885
|
u(this, "_pmSchema");
|
|
10855
10886
|
/**
|
|
@@ -10934,7 +10965,7 @@ class to {
|
|
|
10934
10965
|
throw new Error(
|
|
10935
10966
|
"editable initialization option is deprecated, use <BlockNoteView editable={true/false} />, or alternatively editor.isEditable = true/false"
|
|
10936
10967
|
);
|
|
10937
|
-
this.dictionary = t.dictionary ||
|
|
10968
|
+
this.dictionary = t.dictionary || _t;
|
|
10938
10969
|
const i = {
|
|
10939
10970
|
defaultStyles: !0,
|
|
10940
10971
|
schema: t.schema || qe.create(),
|
|
@@ -10945,7 +10976,7 @@ class to {
|
|
|
10945
10976
|
...t.placeholders
|
|
10946
10977
|
}
|
|
10947
10978
|
};
|
|
10948
|
-
if (this.schema = i.schema, this.blockImplementations = i.schema.blockSpecs, this.inlineContentImplementations = i.schema.inlineContentSpecs, this.styleImplementations = i.schema.styleSpecs, this.extensions =
|
|
10979
|
+
if (this.schema = i.schema, this.blockImplementations = i.schema.blockSpecs, this.inlineContentImplementations = i.schema.inlineContentSpecs, this.styleImplementations = i.schema.styleSpecs, this.extensions = Zr({
|
|
10949
10980
|
editor: this,
|
|
10950
10981
|
domAttributes: i.domAttributes || {},
|
|
10951
10982
|
blockSpecs: this.schema.blockSpecs,
|
|
@@ -10957,7 +10988,7 @@ class to {
|
|
|
10957
10988
|
setIdAttribute: i.setIdAttribute,
|
|
10958
10989
|
animations: i.animations ?? !0,
|
|
10959
10990
|
tableHandles: M("table", this),
|
|
10960
|
-
dropCursor: this.options.dropCursor ??
|
|
10991
|
+
dropCursor: this.options.dropCursor ?? Go,
|
|
10961
10992
|
placeholders: i.placeholders
|
|
10962
10993
|
}), (((s = i._tiptapOptions) == null ? void 0 : s.extensions) || []).forEach((m) => {
|
|
10963
10994
|
this.extensions[m.name] = m;
|
|
@@ -10997,12 +11028,20 @@ class to {
|
|
|
10997
11028
|
"initialContent must be a non-empty array of blocks, received: " + n
|
|
10998
11029
|
);
|
|
10999
11030
|
const r = [
|
|
11000
|
-
...Object.entries(this.extensions).map(([m, f]) =>
|
|
11001
|
-
|
|
11002
|
-
|
|
11003
|
-
|
|
11031
|
+
...Object.entries(this.extensions).map(([m, f]) => {
|
|
11032
|
+
if (f instanceof T || f instanceof G || f instanceof ye)
|
|
11033
|
+
return f;
|
|
11034
|
+
if (!f.plugin)
|
|
11035
|
+
throw new Error(
|
|
11036
|
+
"Extension should either be a TipTap extension or a ProseMirror plugin in a plugin property"
|
|
11037
|
+
);
|
|
11038
|
+
return T.create({
|
|
11039
|
+
name: m,
|
|
11040
|
+
addProseMirrorPlugins: () => [f.plugin]
|
|
11041
|
+
});
|
|
11042
|
+
})
|
|
11004
11043
|
], a = {
|
|
11005
|
-
...
|
|
11044
|
+
...ta,
|
|
11006
11045
|
...i._tiptapOptions,
|
|
11007
11046
|
content: n,
|
|
11008
11047
|
extensions: r,
|
|
@@ -11021,10 +11060,10 @@ class to {
|
|
|
11021
11060
|
((g = (h = i.domAttributes) == null ? void 0 : h.editor) == null ? void 0 : g.class) || ""
|
|
11022
11061
|
)
|
|
11023
11062
|
},
|
|
11024
|
-
transformPasted:
|
|
11063
|
+
transformPasted: ea
|
|
11025
11064
|
}
|
|
11026
11065
|
};
|
|
11027
|
-
this.headless ? this._pmSchema =
|
|
11066
|
+
this.headless ? this._pmSchema = ko(a.extensions) : (this._tiptapEditor = ke.create(
|
|
11028
11067
|
a,
|
|
11029
11068
|
this.schema.styleSchema
|
|
11030
11069
|
), this._pmSchema = this._tiptapEditor.schema);
|
|
@@ -11033,7 +11072,7 @@ class to {
|
|
|
11033
11072
|
return this._pmSchema;
|
|
11034
11073
|
}
|
|
11035
11074
|
static create(t = {}) {
|
|
11036
|
-
return new
|
|
11075
|
+
return new oo(t);
|
|
11037
11076
|
}
|
|
11038
11077
|
dispatch(t) {
|
|
11039
11078
|
this._tiptapEditor.dispatch(t);
|
|
@@ -11139,7 +11178,7 @@ class to {
|
|
|
11139
11178
|
* @returns A snapshot of the current text cursor position.
|
|
11140
11179
|
*/
|
|
11141
11180
|
getTextCursorPosition() {
|
|
11142
|
-
return
|
|
11181
|
+
return Kn(this);
|
|
11143
11182
|
}
|
|
11144
11183
|
/**
|
|
11145
11184
|
* Sets the text cursor position to the start or end of an existing block. Throws an error if the target block could
|
|
@@ -11148,7 +11187,7 @@ class to {
|
|
|
11148
11187
|
* @param placement Whether the text cursor should be placed at the start or end of the block.
|
|
11149
11188
|
*/
|
|
11150
11189
|
setTextCursorPosition(t, o = "start") {
|
|
11151
|
-
|
|
11190
|
+
Kt(this, t, o);
|
|
11152
11191
|
}
|
|
11153
11192
|
/**
|
|
11154
11193
|
* Gets a snapshot of the current selection.
|
|
@@ -11205,7 +11244,7 @@ class to {
|
|
|
11205
11244
|
* `referenceBlock`.
|
|
11206
11245
|
*/
|
|
11207
11246
|
insertBlocks(t, o, i = "before") {
|
|
11208
|
-
return
|
|
11247
|
+
return jn(this, t, o, i);
|
|
11209
11248
|
}
|
|
11210
11249
|
/**
|
|
11211
11250
|
* Updates an existing block in the editor. Since updatedBlock is a PartialBlock object, some fields might not be
|
|
@@ -11215,14 +11254,14 @@ class to {
|
|
|
11215
11254
|
* @param update A partial block which defines how the existing block should be changed.
|
|
11216
11255
|
*/
|
|
11217
11256
|
updateBlock(t, o) {
|
|
11218
|
-
return
|
|
11257
|
+
return ln(this, t, o);
|
|
11219
11258
|
}
|
|
11220
11259
|
/**
|
|
11221
11260
|
* Removes existing blocks from the editor. Throws an error if any of the blocks could not be found.
|
|
11222
11261
|
* @param blocksToRemove An array of identifiers for existing blocks that should be removed.
|
|
11223
11262
|
*/
|
|
11224
11263
|
removeBlocks(t) {
|
|
11225
|
-
return
|
|
11264
|
+
return Wn(this, t);
|
|
11226
11265
|
}
|
|
11227
11266
|
/**
|
|
11228
11267
|
* Replaces existing blocks in the editor with new blocks. If the blocks that should be removed are not adjacent or
|
|
@@ -11232,7 +11271,7 @@ class to {
|
|
|
11232
11271
|
* @param blocksToInsert An array of partial blocks to replace the old ones with.
|
|
11233
11272
|
*/
|
|
11234
11273
|
replaceBlocks(t, o) {
|
|
11235
|
-
return
|
|
11274
|
+
return Gn(this, t, o);
|
|
11236
11275
|
}
|
|
11237
11276
|
/**
|
|
11238
11277
|
* Insert a piece of content at the current cursor position.
|
|
@@ -11245,7 +11284,7 @@ class to {
|
|
|
11245
11284
|
this.pmSchema,
|
|
11246
11285
|
this.schema.styleSchema
|
|
11247
11286
|
);
|
|
11248
|
-
|
|
11287
|
+
$n(
|
|
11249
11288
|
{
|
|
11250
11289
|
from: this._tiptapEditor.state.selection.from,
|
|
11251
11290
|
to: this._tiptapEditor.state.selection.to
|
|
@@ -11345,25 +11384,25 @@ class to {
|
|
|
11345
11384
|
* Checks if the block containing the text cursor can be nested.
|
|
11346
11385
|
*/
|
|
11347
11386
|
canNestBlock() {
|
|
11348
|
-
return
|
|
11387
|
+
return Vn(this);
|
|
11349
11388
|
}
|
|
11350
11389
|
/**
|
|
11351
11390
|
* Nests the block containing the text cursor into the block above it.
|
|
11352
11391
|
*/
|
|
11353
11392
|
nestBlock() {
|
|
11354
|
-
|
|
11393
|
+
Wt(this);
|
|
11355
11394
|
}
|
|
11356
11395
|
/**
|
|
11357
11396
|
* Checks if the block containing the text cursor is nested.
|
|
11358
11397
|
*/
|
|
11359
11398
|
canUnnestBlock() {
|
|
11360
|
-
return
|
|
11399
|
+
return Fn(this);
|
|
11361
11400
|
}
|
|
11362
11401
|
/**
|
|
11363
11402
|
* Lifts the block containing the text cursor out of its parent.
|
|
11364
11403
|
*/
|
|
11365
11404
|
unnestBlock() {
|
|
11366
|
-
|
|
11405
|
+
zn(this);
|
|
11367
11406
|
}
|
|
11368
11407
|
/**
|
|
11369
11408
|
* Moves the block containing the text cursor up. If the previous block has
|
|
@@ -11371,7 +11410,7 @@ class to {
|
|
|
11371
11410
|
* block, but the current block is nested, moves it out of & before its parent.
|
|
11372
11411
|
*/
|
|
11373
11412
|
moveBlockUp() {
|
|
11374
|
-
|
|
11413
|
+
Un(this);
|
|
11375
11414
|
}
|
|
11376
11415
|
/**
|
|
11377
11416
|
* Moves the block containing the text cursor down. If the next block has
|
|
@@ -11379,7 +11418,7 @@ class to {
|
|
|
11379
11418
|
* but the current block is nested, moves it out of & after its parent.
|
|
11380
11419
|
*/
|
|
11381
11420
|
moveBlockDown() {
|
|
11382
|
-
|
|
11421
|
+
On(this);
|
|
11383
11422
|
}
|
|
11384
11423
|
/**
|
|
11385
11424
|
* Exports blocks into a simplified HTML string. To better conform to HTML standards, children of blocks which aren't list
|
|
@@ -11401,7 +11440,7 @@ class to {
|
|
|
11401
11440
|
* @returns The blocks, serialized as an HTML string.
|
|
11402
11441
|
*/
|
|
11403
11442
|
async blocksToFullHTML(t) {
|
|
11404
|
-
return
|
|
11443
|
+
return pi(this.pmSchema, this).serializeBlocks(t, {});
|
|
11405
11444
|
}
|
|
11406
11445
|
/**
|
|
11407
11446
|
* Parses blocks from an HTML string. Tries to create `Block` objects out of any HTML block-level elements, and
|
|
@@ -11411,7 +11450,7 @@ class to {
|
|
|
11411
11450
|
* @returns The blocks parsed from the HTML string.
|
|
11412
11451
|
*/
|
|
11413
11452
|
async tryParseHTMLToBlocks(t) {
|
|
11414
|
-
return
|
|
11453
|
+
return Xt(
|
|
11415
11454
|
t,
|
|
11416
11455
|
this.schema.blockSchema,
|
|
11417
11456
|
this.schema.inlineContentSchema,
|
|
@@ -11426,7 +11465,7 @@ class to {
|
|
|
11426
11465
|
* @returns The blocks, serialized as a Markdown string.
|
|
11427
11466
|
*/
|
|
11428
11467
|
async blocksToMarkdownLossy(t = this.document) {
|
|
11429
|
-
return
|
|
11468
|
+
return Zn(t, this.pmSchema, this, {});
|
|
11430
11469
|
}
|
|
11431
11470
|
/**
|
|
11432
11471
|
* Creates a list of blocks from a Markdown string. Tries to create `Block` and `InlineNode` objects based on
|
|
@@ -11436,7 +11475,7 @@ class to {
|
|
|
11436
11475
|
* @returns The blocks parsed from the Markdown string.
|
|
11437
11476
|
*/
|
|
11438
11477
|
async tryParseMarkdownToBlocks(t) {
|
|
11439
|
-
return
|
|
11478
|
+
return ir(
|
|
11440
11479
|
t,
|
|
11441
11480
|
this.schema.blockSchema,
|
|
11442
11481
|
this.schema.inlineContentSchema,
|
|
@@ -11497,7 +11536,7 @@ class to {
|
|
|
11497
11536
|
);
|
|
11498
11537
|
}
|
|
11499
11538
|
}
|
|
11500
|
-
const
|
|
11539
|
+
const qa = {
|
|
11501
11540
|
gray: {
|
|
11502
11541
|
text: "#9b9a97",
|
|
11503
11542
|
background: "#ebeced"
|
|
@@ -11534,7 +11573,7 @@ const Za = {
|
|
|
11534
11573
|
text: "#ad1a72",
|
|
11535
11574
|
background: "#f4dfeb"
|
|
11536
11575
|
}
|
|
11537
|
-
},
|
|
11576
|
+
}, Xa = {
|
|
11538
11577
|
gray: {
|
|
11539
11578
|
text: "#bebdb8",
|
|
11540
11579
|
background: "#9b9a97"
|
|
@@ -11572,7 +11611,7 @@ const Za = {
|
|
|
11572
11611
|
background: "#ad1a72"
|
|
11573
11612
|
}
|
|
11574
11613
|
};
|
|
11575
|
-
class
|
|
11614
|
+
class Za {
|
|
11576
11615
|
constructor(t, o, i) {
|
|
11577
11616
|
this.mappings = o, this.options = i;
|
|
11578
11617
|
}
|
|
@@ -11604,7 +11643,7 @@ class Ya {
|
|
|
11604
11643
|
);
|
|
11605
11644
|
}
|
|
11606
11645
|
}
|
|
11607
|
-
function
|
|
11646
|
+
function Ja(e) {
|
|
11608
11647
|
return {
|
|
11609
11648
|
createBlockMapping: (t) => t,
|
|
11610
11649
|
createInlineContentMapping: (t) => t,
|
|
@@ -11612,8 +11651,8 @@ function Qa(e) {
|
|
|
11612
11651
|
};
|
|
11613
11652
|
}
|
|
11614
11653
|
let ge, Ae;
|
|
11615
|
-
async function
|
|
11616
|
-
if (!
|
|
11654
|
+
async function Ya(e, t) {
|
|
11655
|
+
if (!An("text", e))
|
|
11617
11656
|
return [];
|
|
11618
11657
|
if (!ge) {
|
|
11619
11658
|
ge = import("@emoji-mart/data"), Ae = await import("emoji-mart");
|
|
@@ -11626,7 +11665,7 @@ async function es(e, t) {
|
|
|
11626
11665
|
onItemClick: () => e.insertInlineContent(n.skins[0].native + " ")
|
|
11627
11666
|
}));
|
|
11628
11667
|
}
|
|
11629
|
-
function
|
|
11668
|
+
function oa(e) {
|
|
11630
11669
|
let t = e.getTextCursorPosition().block, o = e.schema.blockSchema[t.type].content;
|
|
11631
11670
|
for (; o === "none"; )
|
|
11632
11671
|
t = e.getTextCursorPosition().nextBlock, o = e.schema.blockSchema[t.type].content, e.setTextCursorPosition(t, "end");
|
|
@@ -11636,9 +11675,9 @@ function B(e, t) {
|
|
|
11636
11675
|
if (o.content === void 0)
|
|
11637
11676
|
throw new Error("Slash Menu open in a block that doesn't contain content.");
|
|
11638
11677
|
let i;
|
|
11639
|
-
return Array.isArray(o.content) && (o.content.length === 1 && se(o.content[0]) && o.content[0].type === "text" && o.content[0].text === "/" || o.content.length === 0) ? (i = e.updateBlock(o, t), e.setTextCursorPosition(i)) : (i = e.insertBlocks([t], o, "after")[0], e.setTextCursorPosition(e.getTextCursorPosition().nextBlock)),
|
|
11678
|
+
return Array.isArray(o.content) && (o.content.length === 1 && se(o.content[0]) && o.content[0].type === "text" && o.content[0].text === "/" || o.content.length === 0) ? (i = e.updateBlock(o, t), e.setTextCursorPosition(i)) : (i = e.insertBlocks([t], o, "after")[0], e.setTextCursorPosition(e.getTextCursorPosition().nextBlock)), oa(e), i;
|
|
11640
11679
|
}
|
|
11641
|
-
function
|
|
11680
|
+
function Qa(e) {
|
|
11642
11681
|
const t = [];
|
|
11643
11682
|
return M("heading", e) && t.push(
|
|
11644
11683
|
{
|
|
@@ -11712,10 +11751,9 @@ function ts(e) {
|
|
|
11712
11751
|
...e.dictionary.slash_menu.paragraph
|
|
11713
11752
|
}), M("codeBlock", e) && t.push({
|
|
11714
11753
|
onItemClick: () => {
|
|
11715
|
-
const o = e._tiptapEditor.state.selection.from;
|
|
11716
11754
|
B(e, {
|
|
11717
11755
|
type: "codeBlock"
|
|
11718
|
-
})
|
|
11756
|
+
});
|
|
11719
11757
|
},
|
|
11720
11758
|
badge: U("Mod-Alt-c"),
|
|
11721
11759
|
key: "code_block",
|
|
@@ -11803,14 +11841,14 @@ function ts(e) {
|
|
|
11803
11841
|
...e.dictionary.slash_menu.emoji
|
|
11804
11842
|
}), t;
|
|
11805
11843
|
}
|
|
11806
|
-
function
|
|
11844
|
+
function es(e, t) {
|
|
11807
11845
|
return e.filter(
|
|
11808
11846
|
({ title: o, aliases: i }) => o.toLowerCase().includes(t.toLowerCase()) || i && i.filter(
|
|
11809
11847
|
(n) => n.toLowerCase().includes(t.toLowerCase())
|
|
11810
11848
|
).length !== 0
|
|
11811
11849
|
);
|
|
11812
11850
|
}
|
|
11813
|
-
function
|
|
11851
|
+
function ts(e, ...t) {
|
|
11814
11852
|
const o = [...e];
|
|
11815
11853
|
for (const i of t)
|
|
11816
11854
|
for (const n of i) {
|
|
@@ -11831,7 +11869,7 @@ function Pe(e = "") {
|
|
|
11831
11869
|
] : e;
|
|
11832
11870
|
}
|
|
11833
11871
|
function ae(e) {
|
|
11834
|
-
return typeof e == "string" ? Pe(e) : Array.isArray(e) ? e.flatMap((t) => typeof t == "string" ? Pe(t) :
|
|
11872
|
+
return typeof e == "string" ? Pe(e) : Array.isArray(e) ? e.flatMap((t) => typeof t == "string" ? Pe(t) : yt(t) ? {
|
|
11835
11873
|
...t,
|
|
11836
11874
|
content: Pe(t.content)
|
|
11837
11875
|
} : se(t) ? t : {
|
|
@@ -11849,12 +11887,12 @@ function ae(e) {
|
|
|
11849
11887
|
}))
|
|
11850
11888
|
} : e;
|
|
11851
11889
|
}
|
|
11852
|
-
function
|
|
11890
|
+
function os(e, t) {
|
|
11853
11891
|
return t.map(
|
|
11854
|
-
(o) =>
|
|
11892
|
+
(o) => io(e.blockSchema, o)
|
|
11855
11893
|
);
|
|
11856
11894
|
}
|
|
11857
|
-
function
|
|
11895
|
+
function io(e, t) {
|
|
11858
11896
|
var n;
|
|
11859
11897
|
const o = e[t.type].content, i = {
|
|
11860
11898
|
id: "",
|
|
@@ -11885,167 +11923,169 @@ function oo(e, t) {
|
|
|
11885
11923
|
return {
|
|
11886
11924
|
...i,
|
|
11887
11925
|
content: ae(i.content),
|
|
11888
|
-
children: i.children.map((r) =>
|
|
11926
|
+
children: i.children.map((r) => io(e, r))
|
|
11889
11927
|
};
|
|
11890
11928
|
}
|
|
11891
|
-
function
|
|
11892
|
-
e.id || (e.id = ce.options.generateID()), e.children &&
|
|
11929
|
+
function ia(e) {
|
|
11930
|
+
e.id || (e.id = ce.options.generateID()), e.children && na(e.children);
|
|
11893
11931
|
}
|
|
11894
|
-
function
|
|
11932
|
+
function na(e) {
|
|
11895
11933
|
for (const t of e)
|
|
11896
|
-
|
|
11934
|
+
ia(t);
|
|
11897
11935
|
}
|
|
11898
11936
|
export {
|
|
11899
|
-
|
|
11900
|
-
|
|
11937
|
+
Ai as AudioBlock,
|
|
11938
|
+
oo as BlockNoteEditor,
|
|
11901
11939
|
qe as BlockNoteSchema,
|
|
11902
|
-
|
|
11903
|
-
|
|
11904
|
-
|
|
11905
|
-
|
|
11906
|
-
|
|
11907
|
-
|
|
11908
|
-
|
|
11909
|
-
|
|
11910
|
-
|
|
11911
|
-
|
|
11912
|
-
|
|
11913
|
-
|
|
11914
|
-
|
|
11915
|
-
|
|
11916
|
-
|
|
11917
|
-
|
|
11918
|
-
|
|
11919
|
-
|
|
11920
|
-
|
|
11921
|
-
|
|
11922
|
-
|
|
11923
|
-
|
|
11924
|
-
|
|
11940
|
+
Xa as COLORS_DARK_MODE_DEFAULT,
|
|
11941
|
+
qa as COLORS_DEFAULT,
|
|
11942
|
+
Pi as CodeBlock,
|
|
11943
|
+
za as EMPTY_CELL_HEIGHT,
|
|
11944
|
+
Ot as EMPTY_CELL_WIDTH,
|
|
11945
|
+
Za as Exporter,
|
|
11946
|
+
Si as FILE_AUDIO_ICON_SVG,
|
|
11947
|
+
Ci as FILE_ICON_SVG,
|
|
11948
|
+
Ri as FILE_IMAGE_ICON_SVG,
|
|
11949
|
+
Xi as FILE_VIDEO_ICON_SVG,
|
|
11950
|
+
Oi as FileBlock,
|
|
11951
|
+
hr as FilePanelProsemirrorPlugin,
|
|
11952
|
+
pr as FilePanelView,
|
|
11953
|
+
gr as FormattingToolbarProsemirrorPlugin,
|
|
11954
|
+
mr as FormattingToolbarView,
|
|
11955
|
+
Xt as HTMLToBlocks,
|
|
11956
|
+
$i as ImageBlock,
|
|
11957
|
+
wr as LinkToolbarProsemirrorPlugin,
|
|
11958
|
+
Nr as SideMenuProsemirrorPlugin,
|
|
11959
|
+
Ar as SideMenuView,
|
|
11960
|
+
Dr as SuggestionMenuProseMirrorPlugin,
|
|
11961
|
+
Vr as TableHandlesProsemirrorPlugin,
|
|
11962
|
+
zr as TableHandlesView,
|
|
11925
11963
|
ce as UniqueID,
|
|
11926
11964
|
P as UnreachableCaseError,
|
|
11927
|
-
|
|
11928
|
-
|
|
11929
|
-
|
|
11965
|
+
tn as VideoBlock,
|
|
11966
|
+
ia as addIdsToBlock,
|
|
11967
|
+
na as addIdsToBlocks,
|
|
11930
11968
|
ot as addInlineContentAttributes,
|
|
11931
|
-
|
|
11932
|
-
|
|
11933
|
-
|
|
11934
|
-
|
|
11935
|
-
|
|
11936
|
-
|
|
11937
|
-
|
|
11938
|
-
|
|
11939
|
-
|
|
11969
|
+
bi as addInlineContentKeyboardShortcuts,
|
|
11970
|
+
wi as addStyleAttributes,
|
|
11971
|
+
fi as applyNonSelectableBlockFix,
|
|
11972
|
+
Na as assertEmpty,
|
|
11973
|
+
Mi as audioBlockConfig,
|
|
11974
|
+
Li as audioParse,
|
|
11975
|
+
Bi as audioPropSchema,
|
|
11976
|
+
Ti as audioRender,
|
|
11977
|
+
Ii as audioToExternalHTML,
|
|
11940
11978
|
W as blockToNode,
|
|
11941
|
-
|
|
11979
|
+
Zn as blocksToMarkdown,
|
|
11942
11980
|
be as camelToDataKebab,
|
|
11943
|
-
|
|
11944
|
-
|
|
11945
|
-
|
|
11946
|
-
|
|
11947
|
-
|
|
11948
|
-
|
|
11981
|
+
$a as checkBlockHasDefaultProp,
|
|
11982
|
+
Pn as checkBlockIsDefaultType,
|
|
11983
|
+
Fa as checkBlockIsFileBlock,
|
|
11984
|
+
Wa as checkBlockIsFileBlockWithPlaceholder,
|
|
11985
|
+
Ga as checkBlockIsFileBlockWithPreview,
|
|
11986
|
+
Nn as checkBlockTypeHasDefaultProp,
|
|
11949
11987
|
M as checkDefaultBlockTypeInSchema,
|
|
11950
|
-
|
|
11988
|
+
An as checkDefaultInlineContentTypeInSchema,
|
|
11951
11989
|
$e as cleanHTMLToMarkdown,
|
|
11952
|
-
|
|
11990
|
+
ts as combineByGroup,
|
|
11953
11991
|
Ee as contentNodeToInlineContent,
|
|
11954
|
-
|
|
11955
|
-
|
|
11992
|
+
It as contentNodeToTableContent,
|
|
11993
|
+
Ei as createAddFileButton,
|
|
11956
11994
|
Ce as createBlockSpec,
|
|
11957
11995
|
V as createBlockSpecFromStronglyTypedTiptapNode,
|
|
11958
11996
|
H as createDefaultBlockDOMOutputSpec,
|
|
11959
|
-
|
|
11997
|
+
jt as createDefaultFilePreview,
|
|
11960
11998
|
we as createExternalHTMLExporter,
|
|
11961
11999
|
Fe as createFigureWithCaption,
|
|
11962
12000
|
pe as createFileAndCaptionWrapper,
|
|
11963
12001
|
Se as createFileBlockWrapper,
|
|
11964
|
-
|
|
11965
|
-
|
|
11966
|
-
|
|
11967
|
-
|
|
11968
|
-
|
|
11969
|
-
|
|
12002
|
+
Da as createInlineContentSpec,
|
|
12003
|
+
_i as createInlineContentSpecFromTipTapNode,
|
|
12004
|
+
Tt as createInternalBlockSpec,
|
|
12005
|
+
pi as createInternalHTMLSerializer,
|
|
12006
|
+
ki as createInternalInlineContentSpec,
|
|
12007
|
+
Pt as createInternalStyleSpec,
|
|
11970
12008
|
Me as createLinkWithCaption,
|
|
11971
|
-
|
|
12009
|
+
Ht as createResizeHandlesWrapper,
|
|
11972
12010
|
z as createStronglyTypedTiptapNode,
|
|
11973
|
-
|
|
12011
|
+
Ua as createStyleSpec,
|
|
11974
12012
|
F as createStyleSpecFromTipTapMark,
|
|
11975
|
-
|
|
11976
|
-
|
|
11977
|
-
|
|
11978
|
-
|
|
12013
|
+
Ka as createSuggestionMenu,
|
|
12014
|
+
Oa as customizeCodeBlock,
|
|
12015
|
+
Ln as defaultBlockSchema,
|
|
12016
|
+
zt as defaultBlockSpecs,
|
|
11979
12017
|
tt as defaultBlockToHTML,
|
|
11980
12018
|
Ue as defaultCodeBlockPropSchema,
|
|
11981
|
-
|
|
11982
|
-
|
|
12019
|
+
In as defaultInlineContentSchema,
|
|
12020
|
+
Ft as defaultInlineContentSpecs,
|
|
11983
12021
|
y as defaultProps,
|
|
11984
|
-
|
|
11985
|
-
|
|
12022
|
+
Va as defaultStyleSchema,
|
|
12023
|
+
Vt as defaultStyleSpecs,
|
|
11986
12024
|
K as esmDependencies,
|
|
11987
|
-
|
|
11988
|
-
|
|
11989
|
-
|
|
11990
|
-
|
|
11991
|
-
|
|
11992
|
-
|
|
11993
|
-
|
|
12025
|
+
ji as fileBlockConfig,
|
|
12026
|
+
Di as fileParse,
|
|
12027
|
+
Ni as filePropSchema,
|
|
12028
|
+
Hi as fileRender,
|
|
12029
|
+
Ui as fileToExternalHTML,
|
|
12030
|
+
Ha as filenameFromURL,
|
|
12031
|
+
es as filterSuggestionItems,
|
|
11994
12032
|
U as formatKeyboardShortcut,
|
|
11995
|
-
|
|
11996
|
-
|
|
12033
|
+
fr as formattingToolbarPluginKey,
|
|
12034
|
+
mi as getBlockFromPos,
|
|
11997
12035
|
Q as getBlockInfo,
|
|
11998
12036
|
ue as getBlockInfoFromResolvedPos,
|
|
11999
12037
|
_ as getBlockInfoFromSelection,
|
|
12000
12038
|
Ve as getBlockInfoWithManualOffset,
|
|
12001
|
-
|
|
12002
|
-
|
|
12003
|
-
|
|
12004
|
-
|
|
12005
|
-
|
|
12006
|
-
|
|
12039
|
+
Zr as getBlockNoteExtensions,
|
|
12040
|
+
Lt as getBlockSchemaFromSpecs,
|
|
12041
|
+
Ya as getDefaultEmojiPickerItems,
|
|
12042
|
+
Qa as getDefaultSlashMenuItems,
|
|
12043
|
+
yi as getInlineContentParseRules,
|
|
12044
|
+
At as getInlineContentSchemaFromSpecs,
|
|
12007
12045
|
xe as getNearestBlockPos,
|
|
12008
12046
|
ee as getNodeById,
|
|
12009
|
-
|
|
12010
|
-
|
|
12011
|
-
|
|
12012
|
-
|
|
12013
|
-
|
|
12014
|
-
|
|
12015
|
-
|
|
12016
|
-
|
|
12017
|
-
|
|
12047
|
+
gi as getParseRules,
|
|
12048
|
+
xi as getStyleParseRules,
|
|
12049
|
+
Nt as getStyleSchemaFromSpecs,
|
|
12050
|
+
Vi as imageBlockConfig,
|
|
12051
|
+
Gi as imageParse,
|
|
12052
|
+
zi as imagePropSchema,
|
|
12053
|
+
Fi as imageRender,
|
|
12054
|
+
Wi as imageToExternalHTML,
|
|
12055
|
+
Bt as inheritedProps,
|
|
12018
12056
|
We as initializeESMDependencies,
|
|
12019
12057
|
N as inlineContentToNodes,
|
|
12020
12058
|
B as insertOrUpdateBlock,
|
|
12021
|
-
|
|
12059
|
+
hi as isAppleOS,
|
|
12022
12060
|
Qe as isLinkInlineContent,
|
|
12023
|
-
|
|
12024
|
-
|
|
12061
|
+
yt as isPartialLinkInlineContent,
|
|
12062
|
+
ja as isSafari,
|
|
12025
12063
|
se as isStyledTextInlineContent,
|
|
12026
|
-
|
|
12027
|
-
|
|
12028
|
-
|
|
12029
|
-
|
|
12064
|
+
vr as linkToolbarPluginKey,
|
|
12065
|
+
Pa as locales,
|
|
12066
|
+
Ja as mappingFactory,
|
|
12067
|
+
ir as markdownToBlocks,
|
|
12030
12068
|
R as mergeCSSClasses,
|
|
12031
12069
|
w as nodeToBlock,
|
|
12032
12070
|
De as nodeToCustomInlineContent,
|
|
12033
12071
|
it as parseEmbedElement,
|
|
12034
12072
|
Be as parseFigureElement,
|
|
12035
12073
|
rt as parseImageElement,
|
|
12036
|
-
|
|
12037
|
-
|
|
12038
|
-
|
|
12039
|
-
|
|
12040
|
-
|
|
12074
|
+
io as partialBlockToBlockForTesting,
|
|
12075
|
+
os as partialBlocksToBlocksForTesting,
|
|
12076
|
+
Mt as propsToAttributes,
|
|
12077
|
+
Pr as sideMenuPluginKey,
|
|
12078
|
+
vi as stylePropsToAttributes,
|
|
12041
12079
|
ve as tableContentToNodes,
|
|
12042
12080
|
re as tableHandlesPluginKey,
|
|
12043
|
-
|
|
12044
|
-
|
|
12045
|
-
|
|
12046
|
-
Ji as
|
|
12047
|
-
Qi as
|
|
12048
|
-
|
|
12081
|
+
ln as updateBlock,
|
|
12082
|
+
C as updateBlockCommand,
|
|
12083
|
+
Ra as uploadToTmpFilesDotOrg_DEV_ONLY,
|
|
12084
|
+
Ji as videoBlockConfig,
|
|
12085
|
+
Qi as videoParse,
|
|
12086
|
+
Zi as videoPropSchema,
|
|
12087
|
+
Yi as videoRender,
|
|
12088
|
+
en as videoToExternalHTML,
|
|
12049
12089
|
me as wrapInBlockStructure
|
|
12050
12090
|
};
|
|
12051
12091
|
//# sourceMappingURL=blocknote.js.map
|