@blocknote/core 0.15.9 → 0.15.10
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 +402 -394
- package/dist/blocknote.js.map +1 -1
- package/dist/blocknote.umd.cjs +5 -5
- package/dist/blocknote.umd.cjs.map +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +2 -2
- package/src/schema/blocks/createSpec.ts +31 -2
- package/src/schema/blocks/types.ts +2 -0
- package/src/schema/inlineContent/createSpec.ts +7 -4
- package/types/src/schema/blocks/createSpec.d.ts +3 -0
- package/types/src/schema/blocks/types.d.ts +2 -0
- package/types/src/schema/inlineContent/createSpec.d.ts +3 -2
package/dist/blocknote.js
CHANGED
|
@@ -2,7 +2,7 @@ var Bt = Object.defineProperty;
|
|
|
2
2
|
var Lt = (e, t, i) => t in e ? Bt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
|
|
3
3
|
var c = (e, t, i) => Lt(e, typeof t != "symbol" ? t + "" : t, i);
|
|
4
4
|
import { Slice as z, Fragment as N, DOMSerializer as Ee, DOMParser as It, Node as At } from "prosemirror-model";
|
|
5
|
-
import { Extension as I, combineTransactionSteps as Nt, getChangedRanges as Pt, findChildrenInRange as Ht, Node as q, Mark as Ce, InputRule as ee, callOrReturn as Ut, getExtensionField as Dt, mergeAttributes as jt, selectionToInsertionEnd as zt, isTextSelection as
|
|
5
|
+
import { Extension as I, combineTransactionSteps as Nt, getChangedRanges as Pt, findChildrenInRange as Ht, Node as q, Mark as Ce, InputRule as ee, callOrReturn as Ut, getExtensionField as Dt, mergeAttributes as jt, selectionToInsertionEnd as zt, isTextSelection as Vt, isNodeSelection as Rt, posToDOMRect as we, getMarkRange as De, findParentNode as Ot, extensions as J, Editor as Ft, createDocument as Gt, findChildren as je, getSchema as Wt } from "@tiptap/core";
|
|
6
6
|
import { Plugin as x, PluginKey as L, Selection as fe, NodeSelection as le, TextSelection as Y, EditorState as Kt } from "prosemirror-state";
|
|
7
7
|
import { v4 as $t } from "uuid";
|
|
8
8
|
import qt from "@tiptap/extension-bold";
|
|
@@ -2747,7 +2747,7 @@ const hi = {
|
|
|
2747
2747
|
generic: {
|
|
2748
2748
|
ctrl_shortcut: "Ctrl"
|
|
2749
2749
|
}
|
|
2750
|
-
},
|
|
2750
|
+
}, wi = {
|
|
2751
2751
|
slash_menu: {
|
|
2752
2752
|
heading: {
|
|
2753
2753
|
title: "Nagłówek 1",
|
|
@@ -3036,7 +3036,7 @@ const hi = {
|
|
|
3036
3036
|
generic: {
|
|
3037
3037
|
ctrl_shortcut: "Ctrl"
|
|
3038
3038
|
}
|
|
3039
|
-
},
|
|
3039
|
+
}, vi = {
|
|
3040
3040
|
slash_menu: {
|
|
3041
3041
|
heading: {
|
|
3042
3042
|
title: "Título",
|
|
@@ -4307,7 +4307,7 @@ const hi = {
|
|
|
4307
4307
|
generic: {
|
|
4308
4308
|
ctrl_shortcut: "Ctrl"
|
|
4309
4309
|
}
|
|
4310
|
-
},
|
|
4310
|
+
}, Mr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4311
4311
|
__proto__: null,
|
|
4312
4312
|
ar: hi,
|
|
4313
4313
|
de: mi,
|
|
@@ -4318,8 +4318,8 @@ const hi = {
|
|
|
4318
4318
|
ja: _i,
|
|
4319
4319
|
ko: ki,
|
|
4320
4320
|
nl: yi,
|
|
4321
|
-
pl:
|
|
4322
|
-
pt:
|
|
4321
|
+
pl: wi,
|
|
4322
|
+
pt: vi,
|
|
4323
4323
|
ru: xi,
|
|
4324
4324
|
vi: Ei,
|
|
4325
4325
|
zh: Ci
|
|
@@ -4459,7 +4459,7 @@ const oe = I.create({
|
|
|
4459
4459
|
n.doc,
|
|
4460
4460
|
f,
|
|
4461
4461
|
(b) => l.includes(b.type.name)
|
|
4462
|
-
), k = g.map(({ node: b }) => b.attrs[d]).filter((b) => b !== null),
|
|
4462
|
+
), k = g.map(({ node: b }) => b.attrs[d]).filter((b) => b !== null), v = Mi(k);
|
|
4463
4463
|
g.forEach(({ node: b, pos: y }) => {
|
|
4464
4464
|
let S;
|
|
4465
4465
|
const Pe = (S = s.doc.nodeAt(y)) === null || S === void 0 ? void 0 : S.attrs[d];
|
|
@@ -4484,7 +4484,7 @@ const oe = I.create({
|
|
|
4484
4484
|
return;
|
|
4485
4485
|
}
|
|
4486
4486
|
const { deleted: Tt } = h.invert().mapResult(y);
|
|
4487
|
-
Tt &&
|
|
4487
|
+
Tt && v.includes(Pe) && s.setNodeMarkup(y, void 0, {
|
|
4488
4488
|
...b.attrs,
|
|
4489
4489
|
[d]: u()
|
|
4490
4490
|
});
|
|
@@ -4611,12 +4611,12 @@ class P extends Error {
|
|
|
4611
4611
|
super(`Unreachable case: ${t}`);
|
|
4612
4612
|
}
|
|
4613
4613
|
}
|
|
4614
|
-
function
|
|
4614
|
+
function Tr(e, t = !0) {
|
|
4615
4615
|
const { "data-test": i, ...o } = e;
|
|
4616
4616
|
if (Object.keys(o).length > 0 && t)
|
|
4617
4617
|
throw new Error("Object must be empty " + JSON.stringify(e));
|
|
4618
4618
|
}
|
|
4619
|
-
function
|
|
4619
|
+
function Ve(e, t, i) {
|
|
4620
4620
|
const o = [];
|
|
4621
4621
|
for (const [n, r] of Object.entries(e.styles)) {
|
|
4622
4622
|
const a = i[n];
|
|
@@ -4636,7 +4636,7 @@ function Ti(e, t, i) {
|
|
|
4636
4636
|
const o = t.marks.link.create({
|
|
4637
4637
|
href: e.href
|
|
4638
4638
|
});
|
|
4639
|
-
return
|
|
4639
|
+
return ve(e.content, t, i).map(
|
|
4640
4640
|
(n) => {
|
|
4641
4641
|
if (n.type.name === "text")
|
|
4642
4642
|
return n.mark([...n.marks, o]);
|
|
@@ -4646,24 +4646,24 @@ function Ti(e, t, i) {
|
|
|
4646
4646
|
}
|
|
4647
4647
|
);
|
|
4648
4648
|
}
|
|
4649
|
-
function
|
|
4649
|
+
function ve(e, t, i) {
|
|
4650
4650
|
const o = [];
|
|
4651
4651
|
if (typeof e == "string")
|
|
4652
4652
|
return o.push(
|
|
4653
|
-
...
|
|
4653
|
+
...Ve(
|
|
4654
4654
|
{ type: "text", text: e, styles: {} },
|
|
4655
4655
|
t,
|
|
4656
4656
|
i
|
|
4657
4657
|
)
|
|
4658
4658
|
), o;
|
|
4659
4659
|
for (const n of e)
|
|
4660
|
-
o.push(...
|
|
4660
|
+
o.push(...Ve(n, t, i));
|
|
4661
4661
|
return o;
|
|
4662
4662
|
}
|
|
4663
|
-
function
|
|
4663
|
+
function V(e, t, i) {
|
|
4664
4664
|
const o = [];
|
|
4665
4665
|
for (const n of e)
|
|
4666
|
-
typeof n == "string" ? o.push(...
|
|
4666
|
+
typeof n == "string" ? o.push(...ve(n, t, i)) : tt(n) ? o.push(...Ti(n, t, i)) : te(n) ? o.push(...ve([n], t, i)) : o.push(
|
|
4667
4667
|
ot(n, t, i)
|
|
4668
4668
|
);
|
|
4669
4669
|
return o;
|
|
@@ -4679,7 +4679,7 @@ function it(e, t, i) {
|
|
|
4679
4679
|
else if (typeof s == "string")
|
|
4680
4680
|
l = t.nodes.tableParagraph.create({}, t.text(s));
|
|
4681
4681
|
else {
|
|
4682
|
-
const u =
|
|
4682
|
+
const u = V(s, t, i);
|
|
4683
4683
|
l = t.nodes.tableParagraph.create({}, u);
|
|
4684
4684
|
}
|
|
4685
4685
|
const d = t.nodes.tableCell.create({}, l);
|
|
@@ -4697,10 +4697,10 @@ function ot(e, t, i) {
|
|
|
4697
4697
|
if (!e.content)
|
|
4698
4698
|
o = t.nodes[n].create(e.props);
|
|
4699
4699
|
else if (typeof e.content == "string") {
|
|
4700
|
-
const r =
|
|
4700
|
+
const r = V([e.content], t, i);
|
|
4701
4701
|
o = t.nodes[n].create(e.props, r);
|
|
4702
4702
|
} else if (Array.isArray(e.content)) {
|
|
4703
|
-
const r =
|
|
4703
|
+
const r = V(e.content, t, i);
|
|
4704
4704
|
o = t.nodes[n].create(e.props, r);
|
|
4705
4705
|
} else if (e.content.type === "tableContent") {
|
|
4706
4706
|
const r = it(e.content, t, i);
|
|
@@ -4977,7 +4977,7 @@ const nt = (e, t, i, o, n) => {
|
|
|
4977
4977
|
const o = t.serializeFragment(e, i), n = document.createElement("div");
|
|
4978
4978
|
return n.appendChild(o), n.innerHTML;
|
|
4979
4979
|
};
|
|
4980
|
-
function
|
|
4980
|
+
function Re(e, t) {
|
|
4981
4981
|
var o;
|
|
4982
4982
|
const i = (((o = e.properties) == null ? void 0 : o.className) || []).filter(
|
|
4983
4983
|
(n) => !n.startsWith("bn-")
|
|
@@ -5029,10 +5029,10 @@ function Ii(e) {
|
|
|
5029
5029
|
}
|
|
5030
5030
|
const k = i.has(
|
|
5031
5031
|
p.properties.dataContentType
|
|
5032
|
-
),
|
|
5032
|
+
), v = k ? e.orderedListItemBlockTypes.has(
|
|
5033
5033
|
p.properties.dataContentType
|
|
5034
5034
|
) ? "ol" : "ul" : null;
|
|
5035
|
-
if (h && o(h), a && a.tagName !==
|
|
5035
|
+
if (h && o(h), a && a.tagName !== v) {
|
|
5036
5036
|
n.children.splice(
|
|
5037
5037
|
l - a.children.length,
|
|
5038
5038
|
a.children.length,
|
|
@@ -5043,7 +5043,7 @@ function Ii(e) {
|
|
|
5043
5043
|
}
|
|
5044
5044
|
if (k) {
|
|
5045
5045
|
a || (a = t.hastUtilFromDom.fromDom(
|
|
5046
|
-
document.createElement(
|
|
5046
|
+
document.createElement(v)
|
|
5047
5047
|
));
|
|
5048
5048
|
const b = t.hastUtilFromDom.fromDom(
|
|
5049
5049
|
document.createElement("li")
|
|
@@ -5052,12 +5052,12 @@ function Ii(e) {
|
|
|
5052
5052
|
} else if (h) {
|
|
5053
5053
|
n.children.splice(l + 1, 0, ...h.children);
|
|
5054
5054
|
const b = p.children[0];
|
|
5055
|
-
|
|
5055
|
+
Re(b, g), n.children[l] = b;
|
|
5056
5056
|
const y = h.children.length;
|
|
5057
5057
|
l += y, r += y;
|
|
5058
5058
|
} else {
|
|
5059
5059
|
const b = p.children[0];
|
|
5060
|
-
|
|
5060
|
+
Re(b, g), n.children[l] = b;
|
|
5061
5061
|
}
|
|
5062
5062
|
}
|
|
5063
5063
|
a && n.children.splice(
|
|
@@ -5111,20 +5111,20 @@ const de = (e, t) => {
|
|
|
5111
5111
|
function D(e, t = "Ctrl") {
|
|
5112
5112
|
return Ai() ? e.replace("Mod", "⌘") : e.replace("Mod", t);
|
|
5113
5113
|
}
|
|
5114
|
-
function
|
|
5114
|
+
function R(...e) {
|
|
5115
5115
|
return e.filter((t) => t).join(" ");
|
|
5116
5116
|
}
|
|
5117
|
-
const
|
|
5117
|
+
const Br = () => /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
|
5118
5118
|
function O(e, t, i, o) {
|
|
5119
5119
|
const n = document.createElement("div");
|
|
5120
|
-
n.className =
|
|
5120
|
+
n.className = R(
|
|
5121
5121
|
"bn-block-content",
|
|
5122
5122
|
i.class
|
|
5123
5123
|
), n.setAttribute("data-content-type", e);
|
|
5124
5124
|
for (const [a, s] of Object.entries(i))
|
|
5125
5125
|
a !== "class" && n.setAttribute(a, s);
|
|
5126
5126
|
const r = document.createElement(t);
|
|
5127
|
-
r.className =
|
|
5127
|
+
r.className = R(
|
|
5128
5128
|
"bn-inline-content",
|
|
5129
5129
|
o.class
|
|
5130
5130
|
);
|
|
@@ -5149,7 +5149,7 @@ const Oe = (e, t) => {
|
|
|
5149
5149
|
"Cannot use this block's default HTML serialization as its corresponding TipTap node's `renderHTML` function does not return an object with the `dom` property."
|
|
5150
5150
|
);
|
|
5151
5151
|
return n;
|
|
5152
|
-
},
|
|
5152
|
+
}, w = {
|
|
5153
5153
|
backgroundColor: {
|
|
5154
5154
|
default: "default"
|
|
5155
5155
|
},
|
|
@@ -5164,7 +5164,7 @@ const Oe = (e, t) => {
|
|
|
5164
5164
|
function se(e) {
|
|
5165
5165
|
return "data-" + e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
5166
5166
|
}
|
|
5167
|
-
function
|
|
5167
|
+
function Lr(e) {
|
|
5168
5168
|
const t = e.split("/");
|
|
5169
5169
|
return !t.length || // invalid?
|
|
5170
5170
|
t[t.length - 1] === "" ? e : t[t.length - 1];
|
|
@@ -5214,13 +5214,13 @@ function ge(e, t, i, o, n = !1, r) {
|
|
|
5214
5214
|
if (r !== void 0)
|
|
5215
5215
|
for (const [s, l] of Object.entries(r))
|
|
5216
5216
|
s !== "class" && a.setAttribute(s, l);
|
|
5217
|
-
a.className =
|
|
5217
|
+
a.className = R(
|
|
5218
5218
|
"bn-block-content",
|
|
5219
5219
|
(r == null ? void 0 : r.class) || ""
|
|
5220
5220
|
), a.setAttribute("data-content-type", t);
|
|
5221
5221
|
for (const [s, l] of Object.entries(i))
|
|
5222
5222
|
!at.includes(s) && l !== o[s].default && a.setAttribute(se(s), l);
|
|
5223
|
-
return n && a.setAttribute("data-file-block", ""), a.appendChild(e.dom), e.contentDOM !== void 0 && (e.contentDOM.className =
|
|
5223
|
+
return n && a.setAttribute("data-file-block", ""), a.appendChild(e.dom), e.contentDOM !== void 0 && (e.contentDOM.className = R(
|
|
5224
5224
|
"bn-inline-content",
|
|
5225
5225
|
e.contentDOM.className
|
|
5226
5226
|
), e.contentDOM.setAttribute("data-editable", "")), {
|
|
@@ -5259,6 +5259,11 @@ function dt(e) {
|
|
|
5259
5259
|
);
|
|
5260
5260
|
}
|
|
5261
5261
|
function Pi(e, t) {
|
|
5262
|
+
e.stopEvent = (i) => i.type === "copy" || i.type === "cut" ? !0 : i.type === "mousedown" ? (setTimeout(() => {
|
|
5263
|
+
t.view.dom.blur();
|
|
5264
|
+
}, 10), !0) : !1;
|
|
5265
|
+
}
|
|
5266
|
+
function Hi(e, t) {
|
|
5262
5267
|
const i = [
|
|
5263
5268
|
{
|
|
5264
5269
|
tag: "[data-content-type=" + e.type + "]",
|
|
@@ -5280,12 +5285,12 @@ function ce(e, t) {
|
|
|
5280
5285
|
name: e.type,
|
|
5281
5286
|
content: e.content === "inline" ? "inline*" : "",
|
|
5282
5287
|
group: "blockContent",
|
|
5283
|
-
selectable: !0,
|
|
5288
|
+
selectable: e.isSelectable ?? !0,
|
|
5284
5289
|
addAttributes() {
|
|
5285
5290
|
return st(e.propSchema);
|
|
5286
5291
|
},
|
|
5287
5292
|
parseHTML() {
|
|
5288
|
-
return
|
|
5293
|
+
return Hi(e, t.parse);
|
|
5289
5294
|
},
|
|
5290
5295
|
renderHTML() {
|
|
5291
5296
|
const o = document.createElement("div");
|
|
@@ -5295,20 +5300,20 @@ function ce(e, t) {
|
|
|
5295
5300
|
},
|
|
5296
5301
|
addNodeView() {
|
|
5297
5302
|
return ({ getPos: o }) => {
|
|
5298
|
-
var
|
|
5303
|
+
var d;
|
|
5299
5304
|
const n = this.options.editor, r = Ni(
|
|
5300
5305
|
o,
|
|
5301
5306
|
n,
|
|
5302
5307
|
this.editor,
|
|
5303
5308
|
e.type
|
|
5304
|
-
), a = ((
|
|
5305
|
-
return ge(
|
|
5309
|
+
), a = ((d = this.options.domAttributes) == null ? void 0 : d.blockContent) || {}, s = t.render(r, n), l = ge(
|
|
5306
5310
|
s,
|
|
5307
5311
|
r.type,
|
|
5308
5312
|
r.props,
|
|
5309
5313
|
e.propSchema,
|
|
5310
5314
|
a
|
|
5311
5315
|
);
|
|
5316
|
+
return e.isSelectable === !1 && Pi(l, this.editor), l;
|
|
5312
5317
|
};
|
|
5313
5318
|
}
|
|
5314
5319
|
});
|
|
@@ -5351,7 +5356,7 @@ function ce(e, t) {
|
|
|
5351
5356
|
function Fe(e, t, i, o) {
|
|
5352
5357
|
return e.dom.setAttribute("data-inline-content-type", t), Object.entries(i).filter(([n, r]) => r !== o[n].default).map(([n, r]) => [se(n), r]).forEach(([n, r]) => e.dom.setAttribute(n, r)), e.contentDOM !== void 0 && e.contentDOM.setAttribute("data-editable", ""), e;
|
|
5353
5358
|
}
|
|
5354
|
-
function
|
|
5359
|
+
function Ui(e) {
|
|
5355
5360
|
return {
|
|
5356
5361
|
Backspace: ({ editor: t }) => {
|
|
5357
5362
|
const i = t.state.selection.$from;
|
|
@@ -5359,14 +5364,14 @@ function Hi(e) {
|
|
|
5359
5364
|
}
|
|
5360
5365
|
};
|
|
5361
5366
|
}
|
|
5362
|
-
function
|
|
5367
|
+
function Di(e, t) {
|
|
5363
5368
|
return {
|
|
5364
5369
|
config: e,
|
|
5365
5370
|
implementation: t
|
|
5366
5371
|
};
|
|
5367
5372
|
}
|
|
5368
|
-
function
|
|
5369
|
-
return
|
|
5373
|
+
function ji(e, t) {
|
|
5374
|
+
return Di(
|
|
5370
5375
|
{
|
|
5371
5376
|
type: e.name,
|
|
5372
5377
|
propSchema: t,
|
|
@@ -5382,7 +5387,7 @@ function ct(e) {
|
|
|
5382
5387
|
Object.entries(e).map(([t, i]) => [t, i.config])
|
|
5383
5388
|
);
|
|
5384
5389
|
}
|
|
5385
|
-
function
|
|
5390
|
+
function zi(e) {
|
|
5386
5391
|
return [
|
|
5387
5392
|
{
|
|
5388
5393
|
tag: `[data-inline-content-type="${e.type}"]`,
|
|
@@ -5393,7 +5398,7 @@ function ji(e) {
|
|
|
5393
5398
|
}
|
|
5394
5399
|
];
|
|
5395
5400
|
}
|
|
5396
|
-
function
|
|
5401
|
+
function Ir(e, t) {
|
|
5397
5402
|
const i = q.create({
|
|
5398
5403
|
name: e.type,
|
|
5399
5404
|
inline: !0,
|
|
@@ -5405,10 +5410,10 @@ function Lr(e, t) {
|
|
|
5405
5410
|
return st(e.propSchema);
|
|
5406
5411
|
},
|
|
5407
5412
|
addKeyboardShortcuts() {
|
|
5408
|
-
return
|
|
5413
|
+
return Ui(e);
|
|
5409
5414
|
},
|
|
5410
5415
|
parseHTML() {
|
|
5411
|
-
return
|
|
5416
|
+
return zi(e);
|
|
5412
5417
|
},
|
|
5413
5418
|
renderHTML({ node: o }) {
|
|
5414
5419
|
const n = this.options.editor, r = t.render(
|
|
@@ -5419,7 +5424,8 @@ function Lr(e, t) {
|
|
|
5419
5424
|
),
|
|
5420
5425
|
// TODO: fix cast
|
|
5421
5426
|
() => {
|
|
5422
|
-
}
|
|
5427
|
+
},
|
|
5428
|
+
n
|
|
5423
5429
|
);
|
|
5424
5430
|
return Fe(
|
|
5425
5431
|
r,
|
|
@@ -5440,7 +5446,7 @@ function Lr(e, t) {
|
|
|
5440
5446
|
(s) => {
|
|
5441
5447
|
if (typeof n == "boolean")
|
|
5442
5448
|
return;
|
|
5443
|
-
const l =
|
|
5449
|
+
const l = V(
|
|
5444
5450
|
[s],
|
|
5445
5451
|
r._tiptapEditor.schema,
|
|
5446
5452
|
r.schema.styleSchema
|
|
@@ -5452,7 +5458,8 @@ function Lr(e, t) {
|
|
|
5452
5458
|
l
|
|
5453
5459
|
)
|
|
5454
5460
|
);
|
|
5455
|
-
}
|
|
5461
|
+
},
|
|
5462
|
+
r
|
|
5456
5463
|
);
|
|
5457
5464
|
return Fe(
|
|
5458
5465
|
a,
|
|
@@ -5463,12 +5470,12 @@ function Lr(e, t) {
|
|
|
5463
5470
|
};
|
|
5464
5471
|
}
|
|
5465
5472
|
});
|
|
5466
|
-
return
|
|
5473
|
+
return ji(
|
|
5467
5474
|
i,
|
|
5468
5475
|
e.propSchema
|
|
5469
5476
|
);
|
|
5470
5477
|
}
|
|
5471
|
-
function
|
|
5478
|
+
function Vi(e) {
|
|
5472
5479
|
return e === "boolean" ? {} : {
|
|
5473
5480
|
stringValue: {
|
|
5474
5481
|
default: void 0,
|
|
@@ -5505,7 +5512,7 @@ function pt(e) {
|
|
|
5505
5512
|
Object.entries(e).map(([t, i]) => [t, i.config])
|
|
5506
5513
|
);
|
|
5507
5514
|
}
|
|
5508
|
-
function
|
|
5515
|
+
function Oi(e) {
|
|
5509
5516
|
return [
|
|
5510
5517
|
{
|
|
5511
5518
|
tag: `[data-style-type="${e.type}"]`,
|
|
@@ -5516,14 +5523,14 @@ function Vi(e) {
|
|
|
5516
5523
|
}
|
|
5517
5524
|
];
|
|
5518
5525
|
}
|
|
5519
|
-
function
|
|
5526
|
+
function Ar(e, t) {
|
|
5520
5527
|
const i = Ce.create({
|
|
5521
5528
|
name: e.type,
|
|
5522
5529
|
addAttributes() {
|
|
5523
|
-
return
|
|
5530
|
+
return Vi(e.propSchema);
|
|
5524
5531
|
},
|
|
5525
5532
|
parseHTML() {
|
|
5526
|
-
return
|
|
5533
|
+
return Oi(e);
|
|
5527
5534
|
},
|
|
5528
5535
|
renderHTML({ mark: o }) {
|
|
5529
5536
|
let n;
|
|
@@ -5548,7 +5555,7 @@ function Ir(e, t) {
|
|
|
5548
5555
|
const ue = (e, t, i, o, n) => {
|
|
5549
5556
|
const r = document.createElement("div");
|
|
5550
5557
|
if (r.className = "bn-file-block-content-wrapper", e.props.url === "") {
|
|
5551
|
-
const a =
|
|
5558
|
+
const a = Fi(
|
|
5552
5559
|
e,
|
|
5553
5560
|
t,
|
|
5554
5561
|
o,
|
|
@@ -5595,7 +5602,7 @@ const ue = (e, t, i, o, n) => {
|
|
|
5595
5602
|
return o.className = "bn-file-caption", o.textContent = e.props.caption, i.appendChild(t), i.appendChild(o), {
|
|
5596
5603
|
dom: i
|
|
5597
5604
|
};
|
|
5598
|
-
},
|
|
5605
|
+
}, Fi = (e, t, i, o) => {
|
|
5599
5606
|
const n = document.createElement("div");
|
|
5600
5607
|
n.className = "bn-add-file-button";
|
|
5601
5608
|
const r = document.createElement("div");
|
|
@@ -5662,8 +5669,8 @@ const ue = (e, t, i, o, n) => {
|
|
|
5662
5669
|
}
|
|
5663
5670
|
let k;
|
|
5664
5671
|
e.props.textAlignment === "center" ? l.handleUsed === "left" ? k = l.initialWidth + (l.initialClientX - g.clientX) * 2 : k = l.initialWidth + (g.clientX - l.initialClientX) * 2 : l.handleUsed === "left" ? k = l.initialWidth + l.initialClientX - g.clientX : k = l.initialWidth + g.clientX - l.initialClientX;
|
|
5665
|
-
const
|
|
5666
|
-
k <
|
|
5672
|
+
const v = 64;
|
|
5673
|
+
k < v ? n(v) : k > t.domElement.firstElementChild.clientWidth ? n(t.domElement.firstElementChild.clientWidth) : n(k);
|
|
5667
5674
|
}, u = (g) => {
|
|
5668
5675
|
(!g.target || !r.contains(g.target) || !t.isEditable) && r.contains(a) && r.contains(s) && (r.removeChild(a), r.removeChild(s)), l && (l = void 0, t.updateBlock(e, {
|
|
5669
5676
|
props: {
|
|
@@ -5705,8 +5712,8 @@ const ue = (e, t, i, o, n) => {
|
|
|
5705
5712
|
);
|
|
5706
5713
|
}
|
|
5707
5714
|
};
|
|
5708
|
-
}, We = (e) => ({ url: e.src || void 0 }),
|
|
5709
|
-
backgroundColor:
|
|
5715
|
+
}, We = (e) => ({ url: e.src || void 0 }), Gi = {
|
|
5716
|
+
backgroundColor: w.backgroundColor,
|
|
5710
5717
|
// File name.
|
|
5711
5718
|
name: {
|
|
5712
5719
|
default: ""
|
|
@@ -5722,13 +5729,13 @@ const ue = (e, t, i, o, n) => {
|
|
|
5722
5729
|
showPreview: {
|
|
5723
5730
|
default: !0
|
|
5724
5731
|
}
|
|
5725
|
-
},
|
|
5732
|
+
}, Wi = {
|
|
5726
5733
|
type: "audio",
|
|
5727
|
-
propSchema:
|
|
5734
|
+
propSchema: Gi,
|
|
5728
5735
|
content: "none",
|
|
5729
5736
|
isFileBlock: !0,
|
|
5730
5737
|
fileBlockAccept: ["audio/*"]
|
|
5731
|
-
},
|
|
5738
|
+
}, Ki = (e, t) => {
|
|
5732
5739
|
const i = document.createElement("div");
|
|
5733
5740
|
i.innerHTML = '<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>';
|
|
5734
5741
|
const o = document.createElement("audio");
|
|
@@ -5743,7 +5750,7 @@ const ue = (e, t, i, o, n) => {
|
|
|
5743
5750
|
t.dictionary.file_blocks.audio.add_button_text,
|
|
5744
5751
|
i.firstElementChild
|
|
5745
5752
|
);
|
|
5746
|
-
},
|
|
5753
|
+
}, $i = (e) => {
|
|
5747
5754
|
if (e.tagName === "AUDIO")
|
|
5748
5755
|
return We(e);
|
|
5749
5756
|
if (e.tagName === "FIGURE") {
|
|
@@ -5756,7 +5763,7 @@ const ue = (e, t, i, o, n) => {
|
|
|
5756
5763
|
caption: o
|
|
5757
5764
|
};
|
|
5758
5765
|
}
|
|
5759
|
-
},
|
|
5766
|
+
}, qi = (e) => {
|
|
5760
5767
|
if (!e.props.url) {
|
|
5761
5768
|
const i = document.createElement("p");
|
|
5762
5769
|
return i.textContent = "Add audio", {
|
|
@@ -5767,12 +5774,12 @@ const ue = (e, t, i, o, n) => {
|
|
|
5767
5774
|
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 ? Te(t, e.props.caption) : he(t, e.props.caption) : {
|
|
5768
5775
|
dom: t
|
|
5769
5776
|
};
|
|
5770
|
-
},
|
|
5771
|
-
render:
|
|
5772
|
-
parse:
|
|
5773
|
-
toExternalHTML:
|
|
5774
|
-
}),
|
|
5775
|
-
backgroundColor:
|
|
5777
|
+
}, Xi = ce(Wi, {
|
|
5778
|
+
render: Ki,
|
|
5779
|
+
parse: $i,
|
|
5780
|
+
toExternalHTML: qi
|
|
5781
|
+
}), Zi = {
|
|
5782
|
+
backgroundColor: w.backgroundColor,
|
|
5776
5783
|
// File name.
|
|
5777
5784
|
name: {
|
|
5778
5785
|
default: ""
|
|
@@ -5785,15 +5792,15 @@ const ue = (e, t, i, o, n) => {
|
|
|
5785
5792
|
caption: {
|
|
5786
5793
|
default: ""
|
|
5787
5794
|
}
|
|
5788
|
-
},
|
|
5795
|
+
}, Ji = {
|
|
5789
5796
|
type: "file",
|
|
5790
|
-
propSchema:
|
|
5797
|
+
propSchema: Zi,
|
|
5791
5798
|
content: "none",
|
|
5792
5799
|
isFileBlock: !0
|
|
5793
|
-
},
|
|
5800
|
+
}, Yi = (e, t) => {
|
|
5794
5801
|
const i = ht(e).dom, o = ne(e, i);
|
|
5795
5802
|
return ue(e, t, o);
|
|
5796
|
-
},
|
|
5803
|
+
}, Qi = (e) => {
|
|
5797
5804
|
if (e.tagName === "EMBED")
|
|
5798
5805
|
return Ge(e);
|
|
5799
5806
|
if (e.tagName === "FIGURE") {
|
|
@@ -5806,7 +5813,7 @@ const ue = (e, t, i, o, n) => {
|
|
|
5806
5813
|
caption: o
|
|
5807
5814
|
};
|
|
5808
5815
|
}
|
|
5809
|
-
},
|
|
5816
|
+
}, eo = (e) => {
|
|
5810
5817
|
if (!e.props.url) {
|
|
5811
5818
|
const i = document.createElement("p");
|
|
5812
5819
|
return i.textContent = "Add file", {
|
|
@@ -5817,11 +5824,11 @@ const ue = (e, t, i, o, n) => {
|
|
|
5817
5824
|
return t.href = e.props.url, t.textContent = e.props.name || e.props.url, e.props.caption ? he(t, e.props.caption) : {
|
|
5818
5825
|
dom: t
|
|
5819
5826
|
};
|
|
5820
|
-
},
|
|
5821
|
-
render:
|
|
5822
|
-
parse:
|
|
5823
|
-
toExternalHTML:
|
|
5824
|
-
}),
|
|
5827
|
+
}, to = ce(Ji, {
|
|
5828
|
+
render: Yi,
|
|
5829
|
+
parse: Qi,
|
|
5830
|
+
toExternalHTML: eo
|
|
5831
|
+
}), Nr = async (e) => {
|
|
5825
5832
|
const t = new FormData();
|
|
5826
5833
|
return t.append("file", e), (await (await fetch("https://tmpfiles.org/api/v1/upload", {
|
|
5827
5834
|
method: "POST",
|
|
@@ -5833,9 +5840,9 @@ const ue = (e, t, i, o, n) => {
|
|
|
5833
5840
|
}, Ke = (e) => {
|
|
5834
5841
|
const t = e.src || void 0, i = e.width || void 0;
|
|
5835
5842
|
return { url: t, previewWidth: i };
|
|
5836
|
-
},
|
|
5837
|
-
textAlignment:
|
|
5838
|
-
backgroundColor:
|
|
5843
|
+
}, io = {
|
|
5844
|
+
textAlignment: w.textAlignment,
|
|
5845
|
+
backgroundColor: w.backgroundColor,
|
|
5839
5846
|
// File name.
|
|
5840
5847
|
name: {
|
|
5841
5848
|
default: ""
|
|
@@ -5855,13 +5862,13 @@ const ue = (e, t, i, o, n) => {
|
|
|
5855
5862
|
previewWidth: {
|
|
5856
5863
|
default: 512
|
|
5857
5864
|
}
|
|
5858
|
-
},
|
|
5865
|
+
}, oo = {
|
|
5859
5866
|
type: "image",
|
|
5860
|
-
propSchema:
|
|
5867
|
+
propSchema: io,
|
|
5861
5868
|
content: "none",
|
|
5862
5869
|
isFileBlock: !0,
|
|
5863
5870
|
fileBlockAccept: ["image/*"]
|
|
5864
|
-
},
|
|
5871
|
+
}, no = (e, t) => {
|
|
5865
5872
|
const i = document.createElement("div");
|
|
5866
5873
|
i.innerHTML = '<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>';
|
|
5867
5874
|
const o = document.createElement("img");
|
|
@@ -5885,7 +5892,7 @@ const ue = (e, t, i, o, n) => {
|
|
|
5885
5892
|
t.dictionary.file_blocks.image.add_button_text,
|
|
5886
5893
|
i.firstElementChild
|
|
5887
5894
|
);
|
|
5888
|
-
},
|
|
5895
|
+
}, ro = (e) => {
|
|
5889
5896
|
if (e.tagName === "IMG")
|
|
5890
5897
|
return Ke(e);
|
|
5891
5898
|
if (e.tagName === "FIGURE") {
|
|
@@ -5898,7 +5905,7 @@ const ue = (e, t, i, o, n) => {
|
|
|
5898
5905
|
caption: o
|
|
5899
5906
|
};
|
|
5900
5907
|
}
|
|
5901
|
-
},
|
|
5908
|
+
}, ao = (e) => {
|
|
5902
5909
|
if (!e.props.url) {
|
|
5903
5910
|
const i = document.createElement("p");
|
|
5904
5911
|
return i.textContent = "Add image", {
|
|
@@ -5909,16 +5916,16 @@ const ue = (e, t, i, o, n) => {
|
|
|
5909
5916
|
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 ? Te(t, e.props.caption) : he(t, e.props.caption) : {
|
|
5910
5917
|
dom: t
|
|
5911
5918
|
};
|
|
5912
|
-
},
|
|
5913
|
-
render:
|
|
5914
|
-
parse:
|
|
5915
|
-
toExternalHTML:
|
|
5919
|
+
}, so = ce(oo, {
|
|
5920
|
+
render: no,
|
|
5921
|
+
parse: ro,
|
|
5922
|
+
toExternalHTML: ao
|
|
5916
5923
|
}), $e = (e) => {
|
|
5917
5924
|
const t = e.src || void 0, i = e.width || void 0;
|
|
5918
5925
|
return { url: t, previewWidth: i };
|
|
5919
|
-
},
|
|
5920
|
-
textAlignment:
|
|
5921
|
-
backgroundColor:
|
|
5926
|
+
}, lo = {
|
|
5927
|
+
textAlignment: w.textAlignment,
|
|
5928
|
+
backgroundColor: w.backgroundColor,
|
|
5922
5929
|
// File name.
|
|
5923
5930
|
name: {
|
|
5924
5931
|
default: ""
|
|
@@ -5938,13 +5945,13 @@ const ue = (e, t, i, o, n) => {
|
|
|
5938
5945
|
previewWidth: {
|
|
5939
5946
|
default: 512
|
|
5940
5947
|
}
|
|
5941
|
-
},
|
|
5948
|
+
}, co = {
|
|
5942
5949
|
type: "video",
|
|
5943
|
-
propSchema:
|
|
5950
|
+
propSchema: lo,
|
|
5944
5951
|
content: "none",
|
|
5945
5952
|
isFileBlock: !0,
|
|
5946
5953
|
fileBlockAccept: ["video/*"]
|
|
5947
|
-
},
|
|
5954
|
+
}, uo = (e, t) => {
|
|
5948
5955
|
const i = document.createElement("div");
|
|
5949
5956
|
i.innerHTML = '<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>';
|
|
5950
5957
|
const o = document.createElement("video");
|
|
@@ -5966,7 +5973,7 @@ const ue = (e, t, i, o, n) => {
|
|
|
5966
5973
|
t.dictionary.file_blocks.video.add_button_text,
|
|
5967
5974
|
i.firstElementChild
|
|
5968
5975
|
);
|
|
5969
|
-
},
|
|
5976
|
+
}, po = (e) => {
|
|
5970
5977
|
if (e.tagName === "VIDEO")
|
|
5971
5978
|
return $e(e);
|
|
5972
5979
|
if (e.tagName === "FIGURE") {
|
|
@@ -5979,7 +5986,7 @@ const ue = (e, t, i, o, n) => {
|
|
|
5979
5986
|
caption: o
|
|
5980
5987
|
};
|
|
5981
5988
|
}
|
|
5982
|
-
},
|
|
5989
|
+
}, ho = (e) => {
|
|
5983
5990
|
if (!e.props.url) {
|
|
5984
5991
|
const i = document.createElement("p");
|
|
5985
5992
|
return i.textContent = "Add video", {
|
|
@@ -5990,11 +5997,11 @@ const ue = (e, t, i, o, n) => {
|
|
|
5990
5997
|
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 ? Te(t, e.props.caption) : he(t, e.props.caption) : {
|
|
5991
5998
|
dom: t
|
|
5992
5999
|
};
|
|
5993
|
-
},
|
|
5994
|
-
render:
|
|
5995
|
-
parse:
|
|
5996
|
-
toExternalHTML:
|
|
5997
|
-
}),
|
|
6000
|
+
}, mo = ce(co, {
|
|
6001
|
+
render: uo,
|
|
6002
|
+
parse: po,
|
|
6003
|
+
toExternalHTML: ho
|
|
6004
|
+
}), fo = Ce.create({
|
|
5998
6005
|
name: "backgroundColor",
|
|
5999
6006
|
addAttributes() {
|
|
6000
6007
|
return {
|
|
@@ -6020,10 +6027,10 @@ const ue = (e, t, i, o, n) => {
|
|
|
6020
6027
|
renderHTML({ HTMLAttributes: e }) {
|
|
6021
6028
|
return ["span", e, 0];
|
|
6022
6029
|
}
|
|
6023
|
-
}),
|
|
6024
|
-
|
|
6030
|
+
}), go = j(
|
|
6031
|
+
fo,
|
|
6025
6032
|
"string"
|
|
6026
|
-
),
|
|
6033
|
+
), bo = Ce.create({
|
|
6027
6034
|
name: "textColor",
|
|
6028
6035
|
addAttributes() {
|
|
6029
6036
|
return {
|
|
@@ -6047,10 +6054,10 @@ const ue = (e, t, i, o, n) => {
|
|
|
6047
6054
|
renderHTML({ HTMLAttributes: e }) {
|
|
6048
6055
|
return ["span", e, 0];
|
|
6049
6056
|
}
|
|
6050
|
-
}),
|
|
6051
|
-
...
|
|
6057
|
+
}), _o = j(bo, "string"), ko = {
|
|
6058
|
+
...w,
|
|
6052
6059
|
level: { default: 1, values: [1, 2, 3] }
|
|
6053
|
-
},
|
|
6060
|
+
}, yo = F({
|
|
6054
6061
|
name: "heading",
|
|
6055
6062
|
content: "inline*",
|
|
6056
6063
|
group: "blockContent",
|
|
@@ -6153,9 +6160,9 @@ const ue = (e, t, i, o, n) => {
|
|
|
6153
6160
|
((o = this.options.domAttributes) == null ? void 0 : o.inlineContent) || {}
|
|
6154
6161
|
);
|
|
6155
6162
|
}
|
|
6156
|
-
}),
|
|
6157
|
-
|
|
6158
|
-
|
|
6163
|
+
}), wo = X(
|
|
6164
|
+
yo,
|
|
6165
|
+
ko
|
|
6159
6166
|
), Be = (e) => {
|
|
6160
6167
|
const { contentNode: t, contentType: i } = _(
|
|
6161
6168
|
e.state.doc,
|
|
@@ -6176,8 +6183,8 @@ const ue = (e, t, i, o, n) => {
|
|
|
6176
6183
|
)
|
|
6177
6184
|
]);
|
|
6178
6185
|
}, vo = {
|
|
6179
|
-
...
|
|
6180
|
-
},
|
|
6186
|
+
...w
|
|
6187
|
+
}, xo = F({
|
|
6181
6188
|
name: "bulletListItem",
|
|
6182
6189
|
content: "inline*",
|
|
6183
6190
|
group: "blockContent",
|
|
@@ -6256,11 +6263,11 @@ const ue = (e, t, i, o, n) => {
|
|
|
6256
6263
|
((i = this.options.domAttributes) == null ? void 0 : i.inlineContent) || {}
|
|
6257
6264
|
);
|
|
6258
6265
|
}
|
|
6259
|
-
}),
|
|
6260
|
-
|
|
6266
|
+
}), Eo = X(
|
|
6267
|
+
xo,
|
|
6261
6268
|
vo
|
|
6262
|
-
),
|
|
6263
|
-
key:
|
|
6269
|
+
), Co = new L("numbered-list-indexing"), So = () => new x({
|
|
6270
|
+
key: Co,
|
|
6264
6271
|
appendTransaction: (e, t, i) => {
|
|
6265
6272
|
const o = i.tr;
|
|
6266
6273
|
o.setMeta("numberedListIndexing", !0);
|
|
@@ -6278,8 +6285,8 @@ const ue = (e, t, i, o, n) => {
|
|
|
6278
6285
|
if (!(d.depth !== h.depth)) {
|
|
6279
6286
|
const f = h.contentNode;
|
|
6280
6287
|
if (h.contentType.name === "numberedListItem") {
|
|
6281
|
-
const
|
|
6282
|
-
s = (parseInt(
|
|
6288
|
+
const v = f.attrs.index;
|
|
6289
|
+
s = (parseInt(v) + 1).toString();
|
|
6283
6290
|
}
|
|
6284
6291
|
}
|
|
6285
6292
|
}
|
|
@@ -6289,9 +6296,9 @@ const ue = (e, t, i, o, n) => {
|
|
|
6289
6296
|
}
|
|
6290
6297
|
}), n ? o : null;
|
|
6291
6298
|
}
|
|
6292
|
-
}),
|
|
6293
|
-
...
|
|
6294
|
-
},
|
|
6299
|
+
}), Mo = {
|
|
6300
|
+
...w
|
|
6301
|
+
}, To = F({
|
|
6295
6302
|
name: "numberedListItem",
|
|
6296
6303
|
content: "inline*",
|
|
6297
6304
|
group: "blockContent",
|
|
@@ -6334,7 +6341,7 @@ const ue = (e, t, i, o, n) => {
|
|
|
6334
6341
|
};
|
|
6335
6342
|
},
|
|
6336
6343
|
addProseMirrorPlugins() {
|
|
6337
|
-
return [
|
|
6344
|
+
return [So()];
|
|
6338
6345
|
},
|
|
6339
6346
|
parseHTML() {
|
|
6340
6347
|
return [
|
|
@@ -6384,15 +6391,15 @@ const ue = (e, t, i, o, n) => {
|
|
|
6384
6391
|
((i = this.options.domAttributes) == null ? void 0 : i.inlineContent) || {}
|
|
6385
6392
|
);
|
|
6386
6393
|
}
|
|
6387
|
-
}),
|
|
6388
|
-
|
|
6389
|
-
|
|
6390
|
-
),
|
|
6391
|
-
...
|
|
6394
|
+
}), Bo = X(
|
|
6395
|
+
To,
|
|
6396
|
+
Mo
|
|
6397
|
+
), Lo = {
|
|
6398
|
+
...w,
|
|
6392
6399
|
checked: {
|
|
6393
6400
|
default: !1
|
|
6394
6401
|
}
|
|
6395
|
-
},
|
|
6402
|
+
}, Io = F({
|
|
6396
6403
|
name: "checkListItem",
|
|
6397
6404
|
content: "inline*",
|
|
6398
6405
|
group: "blockContent",
|
|
@@ -6544,12 +6551,12 @@ const ue = (e, t, i, o, n) => {
|
|
|
6544
6551
|
};
|
|
6545
6552
|
};
|
|
6546
6553
|
}
|
|
6547
|
-
}),
|
|
6548
|
-
|
|
6549
|
-
|
|
6550
|
-
),
|
|
6551
|
-
...
|
|
6552
|
-
},
|
|
6554
|
+
}), Ao = X(
|
|
6555
|
+
Io,
|
|
6556
|
+
Lo
|
|
6557
|
+
), No = {
|
|
6558
|
+
...w
|
|
6559
|
+
}, Po = F({
|
|
6553
6560
|
name: "paragraph",
|
|
6554
6561
|
content: "inline*",
|
|
6555
6562
|
group: "blockContent",
|
|
@@ -6590,10 +6597,10 @@ const ue = (e, t, i, o, n) => {
|
|
|
6590
6597
|
((i = this.options.domAttributes) == null ? void 0 : i.inlineContent) || {}
|
|
6591
6598
|
);
|
|
6592
6599
|
}
|
|
6593
|
-
}),
|
|
6594
|
-
|
|
6595
|
-
|
|
6596
|
-
),
|
|
6600
|
+
}), Ho = X(
|
|
6601
|
+
Po,
|
|
6602
|
+
No
|
|
6603
|
+
), Uo = I.create({
|
|
6597
6604
|
name: "BlockNoteTableExtension",
|
|
6598
6605
|
addProseMirrorPlugins: () => [
|
|
6599
6606
|
ii({
|
|
@@ -6625,9 +6632,9 @@ const ue = (e, t, i, o, n) => {
|
|
|
6625
6632
|
)
|
|
6626
6633
|
};
|
|
6627
6634
|
}
|
|
6628
|
-
}),
|
|
6629
|
-
...
|
|
6630
|
-
},
|
|
6635
|
+
}), Do = {
|
|
6636
|
+
...w
|
|
6637
|
+
}, jo = F({
|
|
6631
6638
|
name: "table",
|
|
6632
6639
|
content: "tableRow+",
|
|
6633
6640
|
group: "blockContent",
|
|
@@ -6648,7 +6655,7 @@ const ue = (e, t, i, o, n) => {
|
|
|
6648
6655
|
((i = this.options.domAttributes) == null ? void 0 : i.inlineContent) || {}
|
|
6649
6656
|
);
|
|
6650
6657
|
}
|
|
6651
|
-
}),
|
|
6658
|
+
}), zo = q.create({
|
|
6652
6659
|
name: "tableParagraph",
|
|
6653
6660
|
group: "tableContent",
|
|
6654
6661
|
content: "inline*",
|
|
@@ -6673,12 +6680,12 @@ const ue = (e, t, i, o, n) => {
|
|
|
6673
6680
|
0
|
|
6674
6681
|
];
|
|
6675
6682
|
}
|
|
6676
|
-
}),
|
|
6683
|
+
}), Vo = X(
|
|
6684
|
+
jo,
|
|
6677
6685
|
Do,
|
|
6678
|
-
Uo,
|
|
6679
6686
|
[
|
|
6680
|
-
|
|
6681
|
-
|
|
6687
|
+
Uo,
|
|
6688
|
+
zo,
|
|
6682
6689
|
ei.extend({
|
|
6683
6690
|
content: "tableContent"
|
|
6684
6691
|
}),
|
|
@@ -6688,53 +6695,53 @@ const ue = (e, t, i, o, n) => {
|
|
|
6688
6695
|
ti
|
|
6689
6696
|
]
|
|
6690
6697
|
), ft = {
|
|
6691
|
-
paragraph:
|
|
6692
|
-
heading:
|
|
6693
|
-
bulletListItem:
|
|
6694
|
-
numberedListItem:
|
|
6695
|
-
checkListItem:
|
|
6696
|
-
table:
|
|
6697
|
-
file:
|
|
6698
|
-
image:
|
|
6699
|
-
video:
|
|
6700
|
-
audio:
|
|
6698
|
+
paragraph: Ho,
|
|
6699
|
+
heading: wo,
|
|
6700
|
+
bulletListItem: Eo,
|
|
6701
|
+
numberedListItem: Bo,
|
|
6702
|
+
checkListItem: Ao,
|
|
6703
|
+
table: Vo,
|
|
6704
|
+
file: to,
|
|
6705
|
+
image: so,
|
|
6706
|
+
video: mo,
|
|
6707
|
+
audio: Xi
|
|
6701
6708
|
}, Ro = dt(ft), gt = {
|
|
6702
6709
|
bold: j(qt, "boolean"),
|
|
6703
6710
|
italic: j(Zt, "boolean"),
|
|
6704
6711
|
underline: j(Yt, "boolean"),
|
|
6705
6712
|
strike: j(Jt, "boolean"),
|
|
6706
6713
|
code: j(Xt, "boolean"),
|
|
6707
|
-
textColor:
|
|
6708
|
-
backgroundColor:
|
|
6709
|
-
},
|
|
6714
|
+
textColor: _o,
|
|
6715
|
+
backgroundColor: go
|
|
6716
|
+
}, Pr = pt(gt), bt = {
|
|
6710
6717
|
text: { config: "text", implementation: {} },
|
|
6711
6718
|
link: { config: "link", implementation: {} }
|
|
6712
|
-
},
|
|
6719
|
+
}, Oo = ct(
|
|
6713
6720
|
bt
|
|
6714
6721
|
);
|
|
6715
6722
|
function T(e, t) {
|
|
6716
6723
|
return e in t.schema.blockSchema && t.schema.blockSchema[e] === Ro[e];
|
|
6717
6724
|
}
|
|
6718
|
-
function
|
|
6719
|
-
return e in t.schema.inlineContentSchema && t.schema.inlineContentSchema[e] ===
|
|
6725
|
+
function Fo(e, t) {
|
|
6726
|
+
return e in t.schema.inlineContentSchema && t.schema.inlineContentSchema[e] === Oo[e];
|
|
6720
6727
|
}
|
|
6721
|
-
function
|
|
6728
|
+
function Go(e, t, i) {
|
|
6722
6729
|
return t.type === e && t.type in i.schema.blockSchema && T(t.type, i);
|
|
6723
6730
|
}
|
|
6724
|
-
function
|
|
6731
|
+
function Hr(e, t) {
|
|
6725
6732
|
return e.type in t.schema.blockSchema && t.schema.blockSchema[e.type].isFileBlock || !1;
|
|
6726
6733
|
}
|
|
6727
|
-
function
|
|
6734
|
+
function Ur(e, t) {
|
|
6728
6735
|
return e.type in t.schema.blockSchema && t.schema.blockSchema[e.type].isFileBlock && "showPreview" in t.schema.blockSchema[e.type].propSchema || !1;
|
|
6729
6736
|
}
|
|
6730
|
-
function
|
|
6737
|
+
function Dr(e, t) {
|
|
6731
6738
|
return t.schema.blockSchema[e.type].isFileBlock && !e.props.url;
|
|
6732
6739
|
}
|
|
6733
|
-
function
|
|
6734
|
-
return t in i.schema.blockSchema && e in i.schema.blockSchema[t].propSchema && i.schema.blockSchema[t].propSchema[e] ===
|
|
6740
|
+
function Wo(e, t, i) {
|
|
6741
|
+
return t in i.schema.blockSchema && e in i.schema.blockSchema[t].propSchema && i.schema.blockSchema[t].propSchema[e] === w[e];
|
|
6735
6742
|
}
|
|
6736
|
-
function
|
|
6737
|
-
return
|
|
6743
|
+
function jr(e, t, i) {
|
|
6744
|
+
return Wo(e, t.type, i);
|
|
6738
6745
|
}
|
|
6739
6746
|
function Le(e, t) {
|
|
6740
6747
|
let i, o;
|
|
@@ -6745,7 +6752,7 @@ function Le(e, t) {
|
|
|
6745
6752
|
posBeforeNode: o
|
|
6746
6753
|
};
|
|
6747
6754
|
}
|
|
6748
|
-
function
|
|
6755
|
+
function Ko(e, t, i = "before", o) {
|
|
6749
6756
|
const n = typeof t == "string" ? t : t.id, r = [];
|
|
6750
6757
|
for (const d of e)
|
|
6751
6758
|
r.push(
|
|
@@ -6784,7 +6791,7 @@ function Wo(e, t, i = "before", o) {
|
|
|
6784
6791
|
);
|
|
6785
6792
|
return l;
|
|
6786
6793
|
}
|
|
6787
|
-
function
|
|
6794
|
+
function $o(e, t, i) {
|
|
6788
6795
|
const o = i._tiptapEditor, n = typeof e == "string" ? e : e.id, { posBeforeNode: r } = Le(n, o.state.doc);
|
|
6789
6796
|
o.commands.BNUpdateBlock(r + 1, t);
|
|
6790
6797
|
const a = o.state.doc.resolve(r + 1).node();
|
|
@@ -6830,10 +6837,10 @@ function _t(e, t, i) {
|
|
|
6830
6837
|
}
|
|
6831
6838
|
return t.dispatch(n), a;
|
|
6832
6839
|
}
|
|
6833
|
-
function
|
|
6840
|
+
function qo(e, t) {
|
|
6834
6841
|
return _t(e, t);
|
|
6835
6842
|
}
|
|
6836
|
-
function
|
|
6843
|
+
function Xo(e, t, i) {
|
|
6837
6844
|
const o = [];
|
|
6838
6845
|
for (const s of t)
|
|
6839
6846
|
o.push(
|
|
@@ -6864,7 +6871,7 @@ function qo(e, t, i) {
|
|
|
6864
6871
|
);
|
|
6865
6872
|
return { insertedBlocks: a, removedBlocks: r };
|
|
6866
6873
|
}
|
|
6867
|
-
function
|
|
6874
|
+
function Zo(e, t, i, o = { updateSelection: !0 }) {
|
|
6868
6875
|
const n = i._tiptapEditor.state.tr;
|
|
6869
6876
|
let { from: r, to: a } = typeof e == "number" ? { from: e, to: e } : { from: e.from, to: e.to }, s = !0, l = !0, d = "";
|
|
6870
6877
|
if (t.forEach((u) => {
|
|
@@ -6875,7 +6882,7 @@ function Xo(e, t, i, o = { updateSelection: !0 }) {
|
|
|
6875
6882
|
}
|
|
6876
6883
|
return s ? n.insertText(d, r, a) : n.replaceWith(r, a, t), o.updateSelection && zt(n, n.steps.length - 1, -1), i.dispatch(n), !0;
|
|
6877
6884
|
}
|
|
6878
|
-
function
|
|
6885
|
+
function Jo() {
|
|
6879
6886
|
const e = (t) => {
|
|
6880
6887
|
let i = t.children.length;
|
|
6881
6888
|
for (let o = 0; o < i; o++) {
|
|
@@ -6891,7 +6898,7 @@ function Zo() {
|
|
|
6891
6898
|
};
|
|
6892
6899
|
return e;
|
|
6893
6900
|
}
|
|
6894
|
-
function
|
|
6901
|
+
function Yo() {
|
|
6895
6902
|
const e = H;
|
|
6896
6903
|
if (!e)
|
|
6897
6904
|
throw new Error(
|
|
@@ -6919,37 +6926,37 @@ function Ie(e) {
|
|
|
6919
6926
|
throw new Error(
|
|
6920
6927
|
"cleanHTMLToMarkdown requires ESM dependencies to be initialized"
|
|
6921
6928
|
);
|
|
6922
|
-
return t.unified.unified().use(t.rehypeParse.default, { fragment: !0 }).use(
|
|
6929
|
+
return t.unified.unified().use(t.rehypeParse.default, { fragment: !0 }).use(Jo).use(Yo).use(t.rehypeRemark.default).use(t.remarkGfm.default).use(t.remarkStringify.default, {
|
|
6923
6930
|
handlers: { text: (o) => o.value }
|
|
6924
6931
|
}).processSync(e).value;
|
|
6925
6932
|
}
|
|
6926
|
-
async function
|
|
6933
|
+
async function Qo(e, t, i, o) {
|
|
6927
6934
|
await ie();
|
|
6928
6935
|
const r = de(t, i).exportBlocks(e, o);
|
|
6929
6936
|
return Ie(r);
|
|
6930
6937
|
}
|
|
6931
|
-
function
|
|
6938
|
+
function en(e) {
|
|
6932
6939
|
return Array.prototype.indexOf.call(e.parentElement.childNodes, e);
|
|
6933
6940
|
}
|
|
6934
|
-
function
|
|
6941
|
+
function tn(e) {
|
|
6935
6942
|
return e.nodeType === 3 && !/\S/.test(e.nodeValue || "");
|
|
6936
6943
|
}
|
|
6937
|
-
function
|
|
6944
|
+
function on(e) {
|
|
6938
6945
|
e.querySelectorAll("li > ul, li > ol").forEach((t) => {
|
|
6939
|
-
const i =
|
|
6946
|
+
const i = en(t), o = t.parentElement, n = Array.from(o.childNodes).slice(
|
|
6940
6947
|
i + 1
|
|
6941
6948
|
);
|
|
6942
6949
|
t.remove(), n.forEach((r) => {
|
|
6943
6950
|
r.remove();
|
|
6944
6951
|
}), o.insertAdjacentElement("afterend", t), n.reverse().forEach((r) => {
|
|
6945
|
-
if (
|
|
6952
|
+
if (tn(r))
|
|
6946
6953
|
return;
|
|
6947
6954
|
const a = document.createElement("li");
|
|
6948
6955
|
a.append(r), t.insertAdjacentElement("afterend", a);
|
|
6949
6956
|
}), o.childNodes.length === 0 && o.remove();
|
|
6950
6957
|
});
|
|
6951
6958
|
}
|
|
6952
|
-
function
|
|
6959
|
+
function nn(e) {
|
|
6953
6960
|
e.querySelectorAll("li + ul, li + ol").forEach((t) => {
|
|
6954
6961
|
var r, a;
|
|
6955
6962
|
const i = t.previousElementSibling, o = document.createElement("div");
|
|
@@ -6960,15 +6967,15 @@ function on(e) {
|
|
|
6960
6967
|
});
|
|
6961
6968
|
}
|
|
6962
6969
|
let qe = null;
|
|
6963
|
-
function
|
|
6970
|
+
function rn() {
|
|
6964
6971
|
return qe || (qe = document.implementation.createHTMLDocument("title"));
|
|
6965
6972
|
}
|
|
6966
6973
|
function kt(e) {
|
|
6967
6974
|
if (typeof e == "string") {
|
|
6968
|
-
const t =
|
|
6975
|
+
const t = rn().createElement("div");
|
|
6969
6976
|
t.innerHTML = e, e = t;
|
|
6970
6977
|
}
|
|
6971
|
-
return
|
|
6978
|
+
return on(e), nn(e), e;
|
|
6972
6979
|
}
|
|
6973
6980
|
async function yt(e, t, i, o, n) {
|
|
6974
6981
|
const r = kt(e), s = It.fromSchema(n).parse(r, {
|
|
@@ -6980,7 +6987,7 @@ async function yt(e, t, i, o, n) {
|
|
|
6980
6987
|
);
|
|
6981
6988
|
return l;
|
|
6982
6989
|
}
|
|
6983
|
-
function
|
|
6990
|
+
function an(e, t) {
|
|
6984
6991
|
const i = t.value ? t.value + `
|
|
6985
6992
|
` : "", o = {};
|
|
6986
6993
|
t.lang && (o["data-language"] = t.lang);
|
|
@@ -6997,11 +7004,11 @@ function rn(e, t) {
|
|
|
6997
7004
|
children: [n]
|
|
6998
7005
|
}, e.patch(t, n), n;
|
|
6999
7006
|
}
|
|
7000
|
-
async function
|
|
7007
|
+
async function sn(e, t, i, o, n) {
|
|
7001
7008
|
const r = await ie(), a = r.unified.unified().use(r.remarkParse.default).use(r.remarkGfm.default).use(r.remarkRehype.default, {
|
|
7002
7009
|
handlers: {
|
|
7003
7010
|
...r.remarkRehype.defaultHandlers,
|
|
7004
|
-
code:
|
|
7011
|
+
code: an
|
|
7005
7012
|
}
|
|
7006
7013
|
}).use(r.rehypeStringify.default).processSync(e);
|
|
7007
7014
|
return yt(
|
|
@@ -7032,7 +7039,7 @@ class Z {
|
|
|
7032
7039
|
this.callbacks = {};
|
|
7033
7040
|
}
|
|
7034
7041
|
}
|
|
7035
|
-
class
|
|
7042
|
+
class ln {
|
|
7036
7043
|
constructor(t, i, o, n) {
|
|
7037
7044
|
c(this, "state");
|
|
7038
7045
|
c(this, "emitUpdate");
|
|
@@ -7089,7 +7096,7 @@ class sn {
|
|
|
7089
7096
|
}
|
|
7090
7097
|
}
|
|
7091
7098
|
const be = new L("FilePanelPlugin");
|
|
7092
|
-
class
|
|
7099
|
+
class dn extends Z {
|
|
7093
7100
|
constructor(i) {
|
|
7094
7101
|
super();
|
|
7095
7102
|
c(this, "view");
|
|
@@ -7100,7 +7107,7 @@ class ln extends Z {
|
|
|
7100
7107
|
});
|
|
7101
7108
|
this.plugin = new x({
|
|
7102
7109
|
key: be,
|
|
7103
|
-
view: (o) => (this.view = new
|
|
7110
|
+
view: (o) => (this.view = new ln(
|
|
7104
7111
|
i,
|
|
7105
7112
|
be,
|
|
7106
7113
|
o,
|
|
@@ -7135,14 +7142,14 @@ class ln extends Z {
|
|
|
7135
7142
|
return this.on("update", i);
|
|
7136
7143
|
}
|
|
7137
7144
|
}
|
|
7138
|
-
class
|
|
7145
|
+
class cn {
|
|
7139
7146
|
constructor(t, i, o) {
|
|
7140
7147
|
c(this, "state");
|
|
7141
7148
|
c(this, "emitUpdate");
|
|
7142
7149
|
c(this, "preventHide", !1);
|
|
7143
7150
|
c(this, "preventShow", !1);
|
|
7144
7151
|
c(this, "shouldShow", ({ state: t, from: i, to: o, view: n }) => {
|
|
7145
|
-
const { doc: r, selection: a } = t, { empty: s } = a, l = !r.textBetween(i, o).length &&
|
|
7152
|
+
const { doc: r, selection: a } = t, { empty: s } = a, l = !r.textBetween(i, o).length && Vt(t.selection);
|
|
7146
7153
|
return !(!n.hasFocus() || s || l);
|
|
7147
7154
|
});
|
|
7148
7155
|
c(this, "blurHandler", (t) => {
|
|
@@ -7213,26 +7220,26 @@ class dn {
|
|
|
7213
7220
|
}
|
|
7214
7221
|
getSelectionBoundingBox() {
|
|
7215
7222
|
const { state: t } = this.pmView, { selection: i } = t, { ranges: o } = i, n = Math.min(...o.map((a) => a.$from.pos)), r = Math.max(...o.map((a) => a.$to.pos));
|
|
7216
|
-
if (
|
|
7223
|
+
if (Rt(i)) {
|
|
7217
7224
|
const a = this.pmView.nodeDOM(n);
|
|
7218
7225
|
if (a)
|
|
7219
7226
|
return a.getBoundingClientRect();
|
|
7220
7227
|
}
|
|
7221
|
-
return
|
|
7228
|
+
return we(this.pmView, n, r);
|
|
7222
7229
|
}
|
|
7223
7230
|
}
|
|
7224
|
-
const
|
|
7231
|
+
const un = new L(
|
|
7225
7232
|
"FormattingToolbarPlugin"
|
|
7226
7233
|
);
|
|
7227
|
-
class
|
|
7234
|
+
class pn extends Z {
|
|
7228
7235
|
constructor(i) {
|
|
7229
7236
|
super();
|
|
7230
7237
|
c(this, "view");
|
|
7231
7238
|
c(this, "plugin");
|
|
7232
7239
|
c(this, "closeMenu", () => this.view.closeMenu());
|
|
7233
7240
|
this.plugin = new x({
|
|
7234
|
-
key:
|
|
7235
|
-
view: (o) => (this.view = new
|
|
7241
|
+
key: un,
|
|
7242
|
+
view: (o) => (this.view = new cn(i, o, (n) => {
|
|
7236
7243
|
this.emit("update", n);
|
|
7237
7244
|
}), this.view),
|
|
7238
7245
|
props: {
|
|
@@ -7248,7 +7255,7 @@ class un extends Z {
|
|
|
7248
7255
|
return this.on("update", i);
|
|
7249
7256
|
}
|
|
7250
7257
|
}
|
|
7251
|
-
class
|
|
7258
|
+
class hn {
|
|
7252
7259
|
constructor(t, i, o) {
|
|
7253
7260
|
c(this, "state");
|
|
7254
7261
|
c(this, "emitUpdate");
|
|
@@ -7282,7 +7289,7 @@ class pn {
|
|
|
7282
7289
|
});
|
|
7283
7290
|
c(this, "scrollHandler", () => {
|
|
7284
7291
|
var t;
|
|
7285
|
-
this.linkMark !== void 0 && (t = this.state) != null && t.show && (this.state.referencePos =
|
|
7292
|
+
this.linkMark !== void 0 && (t = this.state) != null && t.show && (this.state.referencePos = we(
|
|
7286
7293
|
this.pmView,
|
|
7287
7294
|
this.linkMarkRange.from,
|
|
7288
7295
|
this.linkMarkRange.to
|
|
@@ -7349,7 +7356,7 @@ class pn {
|
|
|
7349
7356
|
if (this.mouseHoveredLinkMark && (this.linkMark = this.mouseHoveredLinkMark, this.linkMarkRange = this.mouseHoveredLinkMarkRange), this.keyboardHoveredLinkMark && (this.linkMark = this.keyboardHoveredLinkMark, this.linkMarkRange = this.keyboardHoveredLinkMarkRange), this.linkMark && this.editor.isEditable) {
|
|
7350
7357
|
this.state = {
|
|
7351
7358
|
show: !0,
|
|
7352
|
-
referencePos:
|
|
7359
|
+
referencePos: we(
|
|
7353
7360
|
this.pmView,
|
|
7354
7361
|
this.linkMarkRange.from,
|
|
7355
7362
|
this.linkMarkRange.to
|
|
@@ -7375,8 +7382,8 @@ class pn {
|
|
|
7375
7382
|
);
|
|
7376
7383
|
}
|
|
7377
7384
|
}
|
|
7378
|
-
const
|
|
7379
|
-
class
|
|
7385
|
+
const mn = new L("LinkToolbarPlugin");
|
|
7386
|
+
class fn extends Z {
|
|
7380
7387
|
constructor(i) {
|
|
7381
7388
|
super();
|
|
7382
7389
|
c(this, "view");
|
|
@@ -7415,8 +7422,8 @@ class mn extends Z {
|
|
|
7415
7422
|
});
|
|
7416
7423
|
c(this, "closeMenu", () => this.view.closeMenu());
|
|
7417
7424
|
this.plugin = new x({
|
|
7418
|
-
key:
|
|
7419
|
-
view: (o) => (this.view = new
|
|
7425
|
+
key: mn,
|
|
7426
|
+
view: (o) => (this.view = new hn(i, o, (n) => {
|
|
7420
7427
|
this.emit("update", n);
|
|
7421
7428
|
}), this.view),
|
|
7422
7429
|
props: {
|
|
@@ -7475,7 +7482,7 @@ function me(e, t) {
|
|
|
7475
7482
|
if (((o = e.getAttribute) == null ? void 0 : o.call(e, "data-node-type")) === "blockContainer")
|
|
7476
7483
|
return { node: e, id: e.getAttribute("data-id") };
|
|
7477
7484
|
}
|
|
7478
|
-
function
|
|
7485
|
+
function gn(e, t) {
|
|
7479
7486
|
const i = me(e, t);
|
|
7480
7487
|
if (i && i.node.nodeType === 1) {
|
|
7481
7488
|
const o = t.docView, n = o.nearestDesc(i.node, !0);
|
|
@@ -7483,7 +7490,7 @@ function fn(e, t) {
|
|
|
7483
7490
|
}
|
|
7484
7491
|
return null;
|
|
7485
7492
|
}
|
|
7486
|
-
function
|
|
7493
|
+
function bn(e, t) {
|
|
7487
7494
|
let i, o;
|
|
7488
7495
|
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);
|
|
7489
7496
|
if (n && r) {
|
|
@@ -7506,16 +7513,16 @@ function Xe(e, t, i = t) {
|
|
|
7506
7513
|
);
|
|
7507
7514
|
for (let u = n.childElementCount - 1; u >= 0; u--)
|
|
7508
7515
|
(u > s || u < a) && o.removeChild(o.children[u]);
|
|
7509
|
-
|
|
7516
|
+
wt(e.root), A = o;
|
|
7510
7517
|
const d = e.dom.className.split(" ").filter(
|
|
7511
7518
|
(u) => u !== "ProseMirror" && u !== "bn-root" && u !== "bn-editor"
|
|
7512
7519
|
).join(" ");
|
|
7513
7520
|
A.className = A.className + " bn-drag-preview " + d, e.root instanceof ShadowRoot ? e.root.appendChild(A) : e.root.body.appendChild(A);
|
|
7514
7521
|
}
|
|
7515
|
-
function
|
|
7522
|
+
function wt(e) {
|
|
7516
7523
|
A !== void 0 && (e instanceof ShadowRoot ? e.removeChild(A) : e.body.removeChild(A), A = void 0);
|
|
7517
7524
|
}
|
|
7518
|
-
function
|
|
7525
|
+
function _n(e, t) {
|
|
7519
7526
|
if (!e.dataTransfer)
|
|
7520
7527
|
return;
|
|
7521
7528
|
const i = t.prosemirrorView, o = i.dom.getBoundingClientRect(), n = {
|
|
@@ -7531,25 +7538,25 @@ function bn(e, t) {
|
|
|
7531
7538
|
}
|
|
7532
7539
|
if (!a)
|
|
7533
7540
|
return;
|
|
7534
|
-
const s =
|
|
7541
|
+
const s = gn(a.node, i);
|
|
7535
7542
|
if (s != null) {
|
|
7536
|
-
const l = i.state.selection, d = i.state.doc, { from: u, to: p } =
|
|
7543
|
+
const l = i.state.selection, d = i.state.doc, { from: u, to: p } = bn(l, d), h = u <= s && s < p, m = l.$anchor.node() !== l.$head.node() || l instanceof G;
|
|
7537
7544
|
h && m ? (i.dispatch(
|
|
7538
7545
|
i.state.tr.setSelection(G.create(d, u, p))
|
|
7539
7546
|
), Xe(i, u, p)) : (i.dispatch(
|
|
7540
7547
|
i.state.tr.setSelection(le.create(i.state.doc, s))
|
|
7541
7548
|
), Xe(i, s));
|
|
7542
|
-
const f = i.state.selection.content(), g = t.pmSchema,
|
|
7549
|
+
const f = i.state.selection.content(), g = t.pmSchema, v = Me(g, t).serializeProseMirrorFragment(
|
|
7543
7550
|
f.content,
|
|
7544
7551
|
{}
|
|
7545
7552
|
), y = de(g, t).exportProseMirrorFragment(
|
|
7546
7553
|
f.content,
|
|
7547
7554
|
{}
|
|
7548
7555
|
), S = Ie(y);
|
|
7549
|
-
e.dataTransfer.clearData(), e.dataTransfer.setData("blocknote/html",
|
|
7556
|
+
e.dataTransfer.clearData(), e.dataTransfer.setData("blocknote/html", v), e.dataTransfer.setData("text/html", y), e.dataTransfer.setData("text/plain", S), e.dataTransfer.effectAllowed = "move", e.dataTransfer.setDragImage(A, 0, 0), i.dragging = { slice: f, move: !0 };
|
|
7550
7557
|
}
|
|
7551
7558
|
}
|
|
7552
|
-
class
|
|
7559
|
+
class kn {
|
|
7553
7560
|
constructor(t, i, o) {
|
|
7554
7561
|
c(this, "state");
|
|
7555
7562
|
c(this, "emitUpdate");
|
|
@@ -7764,8 +7771,8 @@ class _n {
|
|
|
7764
7771
|
this.editor.openSuggestionMenu("/");
|
|
7765
7772
|
}
|
|
7766
7773
|
}
|
|
7767
|
-
const
|
|
7768
|
-
class
|
|
7774
|
+
const yn = new L("SideMenuPlugin");
|
|
7775
|
+
class wn extends Z {
|
|
7769
7776
|
constructor(i) {
|
|
7770
7777
|
super();
|
|
7771
7778
|
c(this, "view");
|
|
@@ -7779,12 +7786,12 @@ class yn extends Z {
|
|
|
7779
7786
|
* Handles drag & drop events for blocks.
|
|
7780
7787
|
*/
|
|
7781
7788
|
c(this, "blockDragStart", (i) => {
|
|
7782
|
-
this.view.isDragging = !0,
|
|
7789
|
+
this.view.isDragging = !0, _n(i, this.editor);
|
|
7783
7790
|
});
|
|
7784
7791
|
/**
|
|
7785
7792
|
* Handles drag & drop events for blocks.
|
|
7786
7793
|
*/
|
|
7787
|
-
c(this, "blockDragEnd", () =>
|
|
7794
|
+
c(this, "blockDragEnd", () => wt(this.editor.prosemirrorView.root));
|
|
7788
7795
|
/**
|
|
7789
7796
|
* Freezes the side menu. When frozen, the side menu will stay
|
|
7790
7797
|
* attached to the same block regardless of which block is hovered by the
|
|
@@ -7800,8 +7807,8 @@ class yn extends Z {
|
|
|
7800
7807
|
this.view.menuFrozen = !1, this.view.state.show = !1, this.view.emitUpdate(this.view.state);
|
|
7801
7808
|
});
|
|
7802
7809
|
this.editor = i, this.plugin = new x({
|
|
7803
|
-
key:
|
|
7804
|
-
view: (o) => (this.view = new
|
|
7810
|
+
key: yn,
|
|
7811
|
+
view: (o) => (this.view = new kn(i, o, (n) => {
|
|
7805
7812
|
this.emit("update", n);
|
|
7806
7813
|
}), this.view)
|
|
7807
7814
|
});
|
|
@@ -7811,7 +7818,7 @@ class yn extends Z {
|
|
|
7811
7818
|
}
|
|
7812
7819
|
}
|
|
7813
7820
|
const vn = Ot((e) => e.type.name === "blockContainer");
|
|
7814
|
-
class
|
|
7821
|
+
class xn {
|
|
7815
7822
|
constructor(t, i) {
|
|
7816
7823
|
c(this, "state");
|
|
7817
7824
|
c(this, "emitUpdate");
|
|
@@ -7878,7 +7885,7 @@ class wn {
|
|
|
7878
7885
|
}
|
|
7879
7886
|
}
|
|
7880
7887
|
const W = new L("SuggestionMenuPlugin");
|
|
7881
|
-
class
|
|
7888
|
+
class En extends Z {
|
|
7882
7889
|
constructor(i) {
|
|
7883
7890
|
super();
|
|
7884
7891
|
c(this, "view");
|
|
@@ -7898,7 +7905,7 @@ class xn extends Z {
|
|
|
7898
7905
|
const o = this.triggerCharacters;
|
|
7899
7906
|
this.plugin = new x({
|
|
7900
7907
|
key: W,
|
|
7901
|
-
view: () => (this.view = new
|
|
7908
|
+
view: () => (this.view = new xn(
|
|
7902
7909
|
i,
|
|
7903
7910
|
(n, r) => {
|
|
7904
7911
|
this.emit(`update ${n}`, r);
|
|
@@ -7992,32 +7999,32 @@ class xn extends Z {
|
|
|
7992
7999
|
return ((o = (i = this.view) == null ? void 0 : i.state) == null ? void 0 : o.show) || !1;
|
|
7993
8000
|
}
|
|
7994
8001
|
}
|
|
7995
|
-
function
|
|
8002
|
+
function zr(e, t) {
|
|
7996
8003
|
e.suggestionMenus.addTriggerCharacter(t);
|
|
7997
8004
|
}
|
|
7998
8005
|
let E;
|
|
7999
8006
|
function Ze(e) {
|
|
8000
8007
|
E || (E = document.createElement("div"), E.innerHTML = "_", E.style.opacity = "0", E.style.height = "1px", E.style.width = "1px", e instanceof Document ? e.body.appendChild(E) : e.appendChild(E));
|
|
8001
8008
|
}
|
|
8002
|
-
function
|
|
8009
|
+
function Cn(e) {
|
|
8003
8010
|
E && (e instanceof Document ? e.body.removeChild(E) : e.removeChild(E), E = void 0);
|
|
8004
8011
|
}
|
|
8005
8012
|
function re(e) {
|
|
8006
8013
|
return Array.prototype.indexOf.call(e.parentElement.childNodes, e);
|
|
8007
8014
|
}
|
|
8008
|
-
function
|
|
8015
|
+
function Sn(e) {
|
|
8009
8016
|
for (; e && e.nodeName !== "TD" && e.nodeName !== "TH"; )
|
|
8010
8017
|
e = e.classList && e.classList.contains("ProseMirror") ? null : e.parentNode;
|
|
8011
8018
|
return e;
|
|
8012
8019
|
}
|
|
8013
|
-
function
|
|
8020
|
+
function Mn(e, t) {
|
|
8014
8021
|
e.forEach((i) => {
|
|
8015
8022
|
const o = t.querySelectorAll(i);
|
|
8016
8023
|
for (let n = 0; n < o.length; n++)
|
|
8017
8024
|
o[n].style.visibility = "hidden";
|
|
8018
8025
|
});
|
|
8019
8026
|
}
|
|
8020
|
-
class
|
|
8027
|
+
class Tn {
|
|
8021
8028
|
constructor(t, i, o) {
|
|
8022
8029
|
c(this, "state");
|
|
8023
8030
|
c(this, "emitUpdate");
|
|
@@ -8029,7 +8036,7 @@ class Mn {
|
|
|
8029
8036
|
var d, u, p;
|
|
8030
8037
|
if (this.menuFrozen)
|
|
8031
8038
|
return;
|
|
8032
|
-
const i =
|
|
8039
|
+
const i = Sn(t.target);
|
|
8033
8040
|
if (!i || !this.editor.isEditable) {
|
|
8034
8041
|
(d = this.state) != null && d.show && (this.state.show = !1, this.emitUpdate());
|
|
8035
8042
|
return;
|
|
@@ -8053,7 +8060,7 @@ class Mn {
|
|
|
8053
8060
|
this.editor.schema.styleSchema,
|
|
8054
8061
|
this.editor.blockCache
|
|
8055
8062
|
);
|
|
8056
|
-
return
|
|
8063
|
+
return Go("table", f, this.editor) && (this.tablePos = m + 1, l = f), !1;
|
|
8057
8064
|
}), !!l && (this.tableId = s.id, !(this.state !== void 0 && this.state.show && this.tableId === s.id && this.state.rowIndex === n && this.state.colIndex === o)))
|
|
8058
8065
|
return this.state = {
|
|
8059
8066
|
show: !0,
|
|
@@ -8069,7 +8076,7 @@ class Mn {
|
|
|
8069
8076
|
var h;
|
|
8070
8077
|
if (((h = this.state) == null ? void 0 : h.draggingState) === void 0)
|
|
8071
8078
|
return;
|
|
8072
|
-
t.preventDefault(), t.dataTransfer.dropEffect = "move",
|
|
8079
|
+
t.preventDefault(), t.dataTransfer.dropEffect = "move", Mn(
|
|
8073
8080
|
[
|
|
8074
8081
|
"column-resize-handle",
|
|
8075
8082
|
"prosemirror-dropcursor-block",
|
|
@@ -8157,7 +8164,7 @@ class Mn {
|
|
|
8157
8164
|
}
|
|
8158
8165
|
}
|
|
8159
8166
|
const Q = new L("TableHandlesPlugin");
|
|
8160
|
-
class
|
|
8167
|
+
class Bn extends Z {
|
|
8161
8168
|
constructor(i) {
|
|
8162
8169
|
super();
|
|
8163
8170
|
c(this, "view");
|
|
@@ -8217,7 +8224,7 @@ class Tn extends Z {
|
|
|
8217
8224
|
);
|
|
8218
8225
|
this.view.state.draggingState = void 0, this.view.emitUpdate(), this.editor.dispatch(
|
|
8219
8226
|
this.editor._tiptapEditor.state.tr.setMeta(Q, null)
|
|
8220
|
-
),
|
|
8227
|
+
), Cn(this.editor._tiptapEditor.view.root);
|
|
8221
8228
|
});
|
|
8222
8229
|
/**
|
|
8223
8230
|
* Freezes the drag handles. When frozen, they will stay attached to the same
|
|
@@ -8235,7 +8242,7 @@ class Tn extends Z {
|
|
|
8235
8242
|
});
|
|
8236
8243
|
this.editor = i, this.plugin = new x({
|
|
8237
8244
|
key: Q,
|
|
8238
|
-
view: (o) => (this.view = new
|
|
8245
|
+
view: (o) => (this.view = new Tn(i, o, (n) => {
|
|
8239
8246
|
this.emit("update", n);
|
|
8240
8247
|
}), this.view),
|
|
8241
8248
|
// We use decorations to render the drop cursor when dragging a table row
|
|
@@ -8288,7 +8295,7 @@ class Tn extends Z {
|
|
|
8288
8295
|
return this.on("update", i);
|
|
8289
8296
|
}
|
|
8290
8297
|
}
|
|
8291
|
-
async function
|
|
8298
|
+
async function vt(e, t) {
|
|
8292
8299
|
const i = e.state.selection.content().content, n = Me(
|
|
8293
8300
|
e.state.schema,
|
|
8294
8301
|
t
|
|
@@ -8312,10 +8319,10 @@ const Je = (e, t, i) => {
|
|
|
8312
8319
|
new le(t.state.doc.resolve(t.state.selection.from - 1))
|
|
8313
8320
|
)
|
|
8314
8321
|
), (async () => {
|
|
8315
|
-
const { internalHTML: o, externalHTML: n, plainText: r } = await
|
|
8322
|
+
const { internalHTML: o, externalHTML: n, plainText: r } = await vt(t, e);
|
|
8316
8323
|
i.clipboardData.setData("blocknote/html", o), i.clipboardData.setData("text/html", n), i.clipboardData.setData("text/plain", r);
|
|
8317
8324
|
})();
|
|
8318
|
-
},
|
|
8325
|
+
}, Ln = (e) => I.create({
|
|
8319
8326
|
name: "copyToClipboard",
|
|
8320
8327
|
addProseMirrorPlugins() {
|
|
8321
8328
|
return [
|
|
@@ -8340,7 +8347,7 @@ const Je = (e, t, i) => {
|
|
|
8340
8347
|
)
|
|
8341
8348
|
)
|
|
8342
8349
|
), i.preventDefault(), i.dataTransfer.clearData(), (async () => {
|
|
8343
|
-
const { internalHTML: o, externalHTML: n, plainText: r } = await
|
|
8350
|
+
const { internalHTML: o, externalHTML: n, plainText: r } = await vt(t, e);
|
|
8344
8351
|
i.dataTransfer.setData("blocknote/html", o), i.dataTransfer.setData("text/html", n), i.dataTransfer.setData("text/plain", r);
|
|
8345
8352
|
})(), !0;
|
|
8346
8353
|
}
|
|
@@ -8355,12 +8362,12 @@ const Je = (e, t, i) => {
|
|
|
8355
8362
|
"text/html",
|
|
8356
8363
|
"text/plain"
|
|
8357
8364
|
];
|
|
8358
|
-
function
|
|
8365
|
+
function In(e, t) {
|
|
8359
8366
|
if (!e.startsWith(".") || !t.startsWith("."))
|
|
8360
8367
|
throw new Error("The strings provided are not valid file extensions.");
|
|
8361
8368
|
return e === t;
|
|
8362
8369
|
}
|
|
8363
|
-
function
|
|
8370
|
+
function An(e, t) {
|
|
8364
8371
|
const i = e.split("/"), o = t.split("/");
|
|
8365
8372
|
if (i.length !== 2)
|
|
8366
8373
|
throw new Error(`The string ${e} is not a valid MIME type.`);
|
|
@@ -8394,7 +8401,7 @@ async function xt(e, t) {
|
|
|
8394
8401
|
for (const d of r)
|
|
8395
8402
|
for (const u of d.fileBlockAccept || []) {
|
|
8396
8403
|
const p = u.startsWith("."), h = n[a].getAsFile();
|
|
8397
|
-
if (h && (!p && h.type &&
|
|
8404
|
+
if (h && (!p && h.type && An(n[a].type, u) || p && In(
|
|
8398
8405
|
"." + h.name.split(".").pop(),
|
|
8399
8406
|
u
|
|
8400
8407
|
))) {
|
|
@@ -8444,7 +8451,7 @@ async function xt(e, t) {
|
|
|
8444
8451
|
}
|
|
8445
8452
|
}
|
|
8446
8453
|
}
|
|
8447
|
-
const
|
|
8454
|
+
const Nn = (e) => I.create({
|
|
8448
8455
|
name: "dropFile",
|
|
8449
8456
|
addProseMirrorPlugins() {
|
|
8450
8457
|
return [
|
|
@@ -8467,7 +8474,7 @@ const An = (e) => I.create({
|
|
|
8467
8474
|
})
|
|
8468
8475
|
];
|
|
8469
8476
|
}
|
|
8470
|
-
}),
|
|
8477
|
+
}), Pn = (e) => I.create({
|
|
8471
8478
|
name: "pasteFromClipboard",
|
|
8472
8479
|
addProseMirrorPlugins() {
|
|
8473
8480
|
return [
|
|
@@ -8495,7 +8502,7 @@ const An = (e) => I.create({
|
|
|
8495
8502
|
})
|
|
8496
8503
|
];
|
|
8497
8504
|
}
|
|
8498
|
-
}),
|
|
8505
|
+
}), Hn = I.create({
|
|
8499
8506
|
name: "blockBackgroundColor",
|
|
8500
8507
|
addGlobalAttributes() {
|
|
8501
8508
|
return [
|
|
@@ -8503,9 +8510,9 @@ const An = (e) => I.create({
|
|
|
8503
8510
|
types: ["blockContainer"],
|
|
8504
8511
|
attributes: {
|
|
8505
8512
|
backgroundColor: {
|
|
8506
|
-
default:
|
|
8507
|
-
parseHTML: (e) => e.hasAttribute("data-background-color") ? e.getAttribute("data-background-color") :
|
|
8508
|
-
renderHTML: (e) => e.backgroundColor ===
|
|
8513
|
+
default: w.backgroundColor.default,
|
|
8514
|
+
parseHTML: (e) => e.hasAttribute("data-background-color") ? e.getAttribute("data-background-color") : w.backgroundColor.default,
|
|
8515
|
+
renderHTML: (e) => e.backgroundColor === w.backgroundColor.default ? {} : {
|
|
8509
8516
|
"data-background-color": e.backgroundColor
|
|
8510
8517
|
}
|
|
8511
8518
|
}
|
|
@@ -8513,7 +8520,7 @@ const An = (e) => I.create({
|
|
|
8513
8520
|
}
|
|
8514
8521
|
];
|
|
8515
8522
|
}
|
|
8516
|
-
}),
|
|
8523
|
+
}), Un = I.create({
|
|
8517
8524
|
name: "textAlignment",
|
|
8518
8525
|
addGlobalAttributes() {
|
|
8519
8526
|
return [
|
|
@@ -8539,7 +8546,7 @@ const An = (e) => I.create({
|
|
|
8539
8546
|
}
|
|
8540
8547
|
];
|
|
8541
8548
|
}
|
|
8542
|
-
}),
|
|
8549
|
+
}), Dn = I.create({
|
|
8543
8550
|
name: "blockTextColor",
|
|
8544
8551
|
addGlobalAttributes() {
|
|
8545
8552
|
return [
|
|
@@ -8547,9 +8554,9 @@ const An = (e) => I.create({
|
|
|
8547
8554
|
types: ["blockContainer"],
|
|
8548
8555
|
attributes: {
|
|
8549
8556
|
textColor: {
|
|
8550
|
-
default:
|
|
8551
|
-
parseHTML: (e) => e.hasAttribute("data-text-color") ? e.getAttribute("data-text-color") :
|
|
8552
|
-
renderHTML: (e) => e.textColor ===
|
|
8557
|
+
default: w.textColor.default,
|
|
8558
|
+
parseHTML: (e) => e.hasAttribute("data-text-color") ? e.getAttribute("data-text-color") : w.textColor.default,
|
|
8559
|
+
renderHTML: (e) => e.textColor === w.textColor.default ? {} : {
|
|
8553
8560
|
"data-text-color": e.textColor
|
|
8554
8561
|
}
|
|
8555
8562
|
}
|
|
@@ -8557,7 +8564,7 @@ const An = (e) => I.create({
|
|
|
8557
8564
|
}
|
|
8558
8565
|
];
|
|
8559
8566
|
}
|
|
8560
|
-
}),
|
|
8567
|
+
}), jn = I.create({
|
|
8561
8568
|
name: "trailingNode",
|
|
8562
8569
|
addProseMirrorPlugins() {
|
|
8563
8570
|
const e = new L(this.name);
|
|
@@ -8592,8 +8599,8 @@ const An = (e) => I.create({
|
|
|
8592
8599
|
})
|
|
8593
8600
|
];
|
|
8594
8601
|
}
|
|
8595
|
-
}),
|
|
8596
|
-
key:
|
|
8602
|
+
}), zn = new L("non-editable-block"), Vn = () => new x({
|
|
8603
|
+
key: zn,
|
|
8597
8604
|
props: {
|
|
8598
8605
|
handleKeyDown: (e, t) => {
|
|
8599
8606
|
if ("node" in e.state.selection) {
|
|
@@ -8624,7 +8631,7 @@ const An = (e) => I.create({
|
|
|
8624
8631
|
id: "data-id",
|
|
8625
8632
|
depth: "data-depth",
|
|
8626
8633
|
depthChange: "data-depth-change"
|
|
8627
|
-
},
|
|
8634
|
+
}, On = q.create({
|
|
8628
8635
|
name: "blockContainer",
|
|
8629
8636
|
group: "blockContainer",
|
|
8630
8637
|
// A block always contains content, and optionally a blockGroup which contains nested blocks
|
|
@@ -8657,7 +8664,7 @@ const An = (e) => I.create({
|
|
|
8657
8664
|
...((n = this.options.domAttributes) == null ? void 0 : n.block) || {},
|
|
8658
8665
|
...e
|
|
8659
8666
|
}, o = document.createElement("div");
|
|
8660
|
-
o.className =
|
|
8667
|
+
o.className = R("bn-block", i.class), o.setAttribute("data-node-type", this.name);
|
|
8661
8668
|
for (const [r, a] of Object.entries(i))
|
|
8662
8669
|
r !== "class" && o.setAttribute(r, a);
|
|
8663
8670
|
return t.appendChild(o), {
|
|
@@ -8710,13 +8717,13 @@ const An = (e) => I.create({
|
|
|
8710
8717
|
let p = "keep";
|
|
8711
8718
|
if (t.content)
|
|
8712
8719
|
if (typeof t.content == "string")
|
|
8713
|
-
p =
|
|
8720
|
+
p = V(
|
|
8714
8721
|
[t.content],
|
|
8715
8722
|
i.schema,
|
|
8716
8723
|
this.options.editor.schema.styleSchema
|
|
8717
8724
|
);
|
|
8718
8725
|
else if (Array.isArray(t.content))
|
|
8719
|
-
p =
|
|
8726
|
+
p = V(
|
|
8720
8727
|
t.content,
|
|
8721
8728
|
i.schema,
|
|
8722
8729
|
this.options.editor.schema.styleSchema
|
|
@@ -8848,7 +8855,7 @@ const An = (e) => I.create({
|
|
|
8848
8855
|
};
|
|
8849
8856
|
},
|
|
8850
8857
|
addProseMirrorPlugins() {
|
|
8851
|
-
return [
|
|
8858
|
+
return [Vn()];
|
|
8852
8859
|
},
|
|
8853
8860
|
addKeyboardShortcuts() {
|
|
8854
8861
|
return {
|
|
@@ -8955,7 +8962,7 @@ const An = (e) => I.create({
|
|
|
8955
8962
|
}
|
|
8956
8963
|
};
|
|
8957
8964
|
}
|
|
8958
|
-
}),
|
|
8965
|
+
}), Fn = q.create({
|
|
8959
8966
|
name: "blockGroup",
|
|
8960
8967
|
group: "blockGroup",
|
|
8961
8968
|
content: "blockContainer+",
|
|
@@ -8973,7 +8980,7 @@ const An = (e) => I.create({
|
|
|
8973
8980
|
...((o = this.options.domAttributes) == null ? void 0 : o.blockGroup) || {},
|
|
8974
8981
|
...e
|
|
8975
8982
|
}, i = document.createElement("div");
|
|
8976
|
-
i.className =
|
|
8983
|
+
i.className = R(
|
|
8977
8984
|
"bn-block-group",
|
|
8978
8985
|
t.class
|
|
8979
8986
|
), i.setAttribute("data-node-type", "blockGroup");
|
|
@@ -8984,11 +8991,11 @@ const An = (e) => I.create({
|
|
|
8984
8991
|
contentDOM: i
|
|
8985
8992
|
};
|
|
8986
8993
|
}
|
|
8987
|
-
}),
|
|
8994
|
+
}), Gn = q.create({
|
|
8988
8995
|
name: "doc",
|
|
8989
8996
|
topNode: !0,
|
|
8990
8997
|
content: "blockGroup"
|
|
8991
|
-
}),
|
|
8998
|
+
}), Wn = (e) => {
|
|
8992
8999
|
var o;
|
|
8993
9000
|
const t = [
|
|
8994
9001
|
J.ClipboardTextSerializer,
|
|
@@ -9016,9 +9023,9 @@ const An = (e) => I.create({
|
|
|
9016
9023
|
}
|
|
9017
9024
|
}),
|
|
9018
9025
|
...Object.values(e.styleSpecs).map((n) => n.implementation.mark),
|
|
9019
|
-
|
|
9020
|
-
Pn,
|
|
9026
|
+
Dn,
|
|
9021
9027
|
Hn,
|
|
9028
|
+
Un,
|
|
9022
9029
|
// make sure escape blurs editor, so that we can tab to other elements in the host page (accessibility)
|
|
9023
9030
|
I.create({
|
|
9024
9031
|
name: "OverrideEscape",
|
|
@@ -9029,12 +9036,12 @@ const An = (e) => I.create({
|
|
|
9029
9036
|
}
|
|
9030
9037
|
}),
|
|
9031
9038
|
// nodes
|
|
9032
|
-
|
|
9033
|
-
|
|
9039
|
+
Gn,
|
|
9040
|
+
On.configure({
|
|
9034
9041
|
editor: e.editor,
|
|
9035
9042
|
domAttributes: e.domAttributes
|
|
9036
9043
|
}),
|
|
9037
|
-
|
|
9044
|
+
Fn.configure({
|
|
9038
9045
|
domAttributes: e.domAttributes
|
|
9039
9046
|
}),
|
|
9040
9047
|
...Object.values(e.inlineContentSpecs).filter((n) => n.config !== "link" && n.config !== "text").map((n) => n.implementation.node.configure({
|
|
@@ -9054,13 +9061,13 @@ const An = (e) => I.create({
|
|
|
9054
9061
|
domAttributes: e.domAttributes
|
|
9055
9062
|
})
|
|
9056
9063
|
]),
|
|
9057
|
-
|
|
9064
|
+
Ln(e.editor),
|
|
9065
|
+
Pn(e.editor),
|
|
9058
9066
|
Nn(e.editor),
|
|
9059
|
-
An(e.editor),
|
|
9060
9067
|
si.configure({ width: 5, color: "#ddeeff" }),
|
|
9061
9068
|
// This needs to be at the bottom of this list, because Key events (such as enter, when selecting a /command),
|
|
9062
9069
|
// should be handled before Enter handlers in other components like splitListItem
|
|
9063
|
-
...e.trailingBlock === void 0 || e.trailingBlock ? [
|
|
9070
|
+
...e.trailingBlock === void 0 || e.trailingBlock ? [jn] : []
|
|
9064
9071
|
];
|
|
9065
9072
|
if (e.collaboration) {
|
|
9066
9073
|
if (t.push(
|
|
@@ -9089,20 +9096,20 @@ const An = (e) => I.create({
|
|
|
9089
9096
|
const i = e.disableExtensions || [];
|
|
9090
9097
|
return t.filter((n) => !i.includes(n.name));
|
|
9091
9098
|
};
|
|
9092
|
-
function
|
|
9099
|
+
function Kn(e, t) {
|
|
9093
9100
|
const i = [];
|
|
9094
9101
|
return e.forEach((o, n, r) => {
|
|
9095
9102
|
r !== t && i.push(o);
|
|
9096
9103
|
}), N.from(i);
|
|
9097
9104
|
}
|
|
9098
|
-
function
|
|
9105
|
+
function $n(e, t) {
|
|
9099
9106
|
let i = N.from(e.content);
|
|
9100
9107
|
for (let o = 0; o < i.childCount; o++)
|
|
9101
9108
|
if (i.child(o).type.spec.group === "blockContent") {
|
|
9102
9109
|
const n = [i.child(o)];
|
|
9103
9110
|
if (o + 1 < i.childCount && i.child(o + 1).type.spec.group === "blockGroup") {
|
|
9104
9111
|
const a = i.child(o + 1).child(0).child(0);
|
|
9105
|
-
(a.type.name === "bulletListItem" || a.type.name === "numberedListItem" || a.type.name === "checkListItem") && (n.push(i.child(o + 1)), i =
|
|
9112
|
+
(a.type.name === "bulletListItem" || a.type.name === "numberedListItem" || a.type.name === "checkListItem") && (n.push(i.child(o + 1)), i = Kn(i, o + 1));
|
|
9106
9113
|
}
|
|
9107
9114
|
const r = t.state.schema.nodes.blockContainer.create(
|
|
9108
9115
|
void 0,
|
|
@@ -9221,8 +9228,8 @@ class Et extends Ft {
|
|
|
9221
9228
|
Et.prototype.createView = function() {
|
|
9222
9229
|
this.options.onPaste = this.options.onDrop = void 0;
|
|
9223
9230
|
};
|
|
9224
|
-
const
|
|
9225
|
-
key:
|
|
9231
|
+
const qn = new L("blocknote-placeholder"), Xn = (e, t) => new x({
|
|
9232
|
+
key: qn,
|
|
9226
9233
|
view: () => {
|
|
9227
9234
|
const i = document.createElement("style"), o = e._tiptapEditor.options.injectNonce;
|
|
9228
9235
|
o && i.setAttribute("nonce", o), e._tiptapEditor.view.root instanceof ShadowRoot ? e._tiptapEditor.view.root.append(i) : e._tiptapEditor.view.root.head.appendChild(i);
|
|
@@ -9266,7 +9273,7 @@ const $n = new L("blocknote-placeholder"), qn = (e, t) => new x({
|
|
|
9266
9273
|
return K.create(o, [l]);
|
|
9267
9274
|
}
|
|
9268
9275
|
}
|
|
9269
|
-
}), Ye = new L("previous-blocks"),
|
|
9276
|
+
}), Ye = new L("previous-blocks"), Zn = {
|
|
9270
9277
|
// Numbered List Items
|
|
9271
9278
|
index: "index",
|
|
9272
9279
|
// Headings
|
|
@@ -9275,7 +9282,7 @@ const $n = new L("blocknote-placeholder"), qn = (e, t) => new x({
|
|
|
9275
9282
|
type: "type",
|
|
9276
9283
|
depth: "depth",
|
|
9277
9284
|
"depth-change": "depth-change"
|
|
9278
|
-
},
|
|
9285
|
+
}, Jn = () => {
|
|
9279
9286
|
let e;
|
|
9280
9287
|
return new x({
|
|
9281
9288
|
key: Ye,
|
|
@@ -9343,7 +9350,7 @@ const $n = new L("blocknote-placeholder"), qn = (e, t) => new x({
|
|
|
9343
9350
|
return;
|
|
9344
9351
|
const a = i.currentTransactionOldBlockAttrs[n.attrs.id], s = {};
|
|
9345
9352
|
for (const [d, u] of Object.entries(a))
|
|
9346
|
-
s["data-prev-" +
|
|
9353
|
+
s["data-prev-" + Zn[d]] = u || "none";
|
|
9347
9354
|
const l = $.node(r, r + n.nodeSize, {
|
|
9348
9355
|
...s
|
|
9349
9356
|
});
|
|
@@ -9352,7 +9359,7 @@ const $n = new L("blocknote-placeholder"), qn = (e, t) => new x({
|
|
|
9352
9359
|
}
|
|
9353
9360
|
}
|
|
9354
9361
|
});
|
|
9355
|
-
},
|
|
9362
|
+
}, Yn = {
|
|
9356
9363
|
enableInputRules: !0,
|
|
9357
9364
|
enablePasteRules: !0,
|
|
9358
9365
|
enableCoreExtensions: !1
|
|
@@ -9449,8 +9456,8 @@ class Ct {
|
|
|
9449
9456
|
...t.placeholders
|
|
9450
9457
|
}
|
|
9451
9458
|
};
|
|
9452
|
-
this.schema = o.schema, this.blockImplementations = o.schema.blockSpecs, this.inlineContentImplementations = o.schema.inlineContentSpecs, this.styleImplementations = o.schema.styleSpecs, this.formattingToolbar = new
|
|
9453
|
-
const n =
|
|
9459
|
+
this.schema = o.schema, this.blockImplementations = o.schema.blockSpecs, this.inlineContentImplementations = o.schema.inlineContentSpecs, this.styleImplementations = o.schema.styleSpecs, this.formattingToolbar = new pn(this), this.linkToolbar = new fn(this), this.sideMenu = new wn(this), this.suggestionMenus = new En(this), this.filePanel = new dn(this), T("table", this) && (this.tableHandles = new Bn(this));
|
|
9460
|
+
const n = Wn({
|
|
9454
9461
|
editor: this,
|
|
9455
9462
|
domAttributes: o.domAttributes || {},
|
|
9456
9463
|
blockSpecs: this.schema.blockSpecs,
|
|
@@ -9469,21 +9476,21 @@ class Ct {
|
|
|
9469
9476
|
this.suggestionMenus.plugin,
|
|
9470
9477
|
...this.filePanel ? [this.filePanel.plugin] : [],
|
|
9471
9478
|
...this.tableHandles ? [this.tableHandles.plugin] : [],
|
|
9472
|
-
|
|
9473
|
-
...this.options.animations ?? !0 ? [
|
|
9479
|
+
Xn(this, o.placeholders),
|
|
9480
|
+
...this.options.animations ?? !0 ? [Jn()] : []
|
|
9474
9481
|
]
|
|
9475
9482
|
});
|
|
9476
9483
|
if (n.push(r), o.uploadFile) {
|
|
9477
9484
|
const g = o.uploadFile;
|
|
9478
|
-
this.uploadFile = async (k,
|
|
9485
|
+
this.uploadFile = async (k, v) => {
|
|
9479
9486
|
this.onUploadStartCallbacks.forEach(
|
|
9480
|
-
(b) => b.apply(this, [
|
|
9487
|
+
(b) => b.apply(this, [v])
|
|
9481
9488
|
);
|
|
9482
9489
|
try {
|
|
9483
|
-
return await g(k,
|
|
9490
|
+
return await g(k, v);
|
|
9484
9491
|
} finally {
|
|
9485
9492
|
this.onUploadEndCallbacks.forEach(
|
|
9486
|
-
(b) => b.apply(this, [
|
|
9493
|
+
(b) => b.apply(this, [v])
|
|
9487
9494
|
);
|
|
9488
9495
|
}
|
|
9489
9496
|
};
|
|
@@ -9507,7 +9514,7 @@ class Ct {
|
|
|
9507
9514
|
"initialContent must be a non-empty array of blocks, received: " + a
|
|
9508
9515
|
);
|
|
9509
9516
|
const s = {
|
|
9510
|
-
...
|
|
9517
|
+
...Yn,
|
|
9511
9518
|
...o._tiptapOptions,
|
|
9512
9519
|
content: a,
|
|
9513
9520
|
extensions: [
|
|
@@ -9523,13 +9530,13 @@ class Ct {
|
|
|
9523
9530
|
tabIndex: "0",
|
|
9524
9531
|
...(p = (u = o._tiptapOptions) == null ? void 0 : u.editorProps) == null ? void 0 : p.attributes,
|
|
9525
9532
|
...(h = o.domAttributes) == null ? void 0 : h.editor,
|
|
9526
|
-
class:
|
|
9533
|
+
class: R(
|
|
9527
9534
|
"bn-editor",
|
|
9528
9535
|
o.defaultStyles ? "bn-default-styles" : "",
|
|
9529
9536
|
((f = (m = o.domAttributes) == null ? void 0 : m.editor) == null ? void 0 : f.class) || ""
|
|
9530
9537
|
)
|
|
9531
9538
|
},
|
|
9532
|
-
transformPasted:
|
|
9539
|
+
transformPasted: $n
|
|
9533
9540
|
}
|
|
9534
9541
|
};
|
|
9535
9542
|
this.headless ? this._pmSchema = Wt(s.extensions) : (this._tiptapEditor = new Et(
|
|
@@ -9759,7 +9766,7 @@ class Ct {
|
|
|
9759
9766
|
* `referenceBlock`. Inserts the blocks at the start of the existing block's children if "nested" is used.
|
|
9760
9767
|
*/
|
|
9761
9768
|
insertBlocks(t, i, o = "before") {
|
|
9762
|
-
return
|
|
9769
|
+
return Ko(t, i, o, this);
|
|
9763
9770
|
}
|
|
9764
9771
|
/**
|
|
9765
9772
|
* Updates an existing block in the editor. Since updatedBlock is a PartialBlock object, some fields might not be
|
|
@@ -9769,14 +9776,14 @@ class Ct {
|
|
|
9769
9776
|
* @param update A partial block which defines how the existing block should be changed.
|
|
9770
9777
|
*/
|
|
9771
9778
|
updateBlock(t, i) {
|
|
9772
|
-
return
|
|
9779
|
+
return $o(t, i, this);
|
|
9773
9780
|
}
|
|
9774
9781
|
/**
|
|
9775
9782
|
* Removes existing blocks from the editor. Throws an error if any of the blocks could not be found.
|
|
9776
9783
|
* @param blocksToRemove An array of identifiers for existing blocks that should be removed.
|
|
9777
9784
|
*/
|
|
9778
9785
|
removeBlocks(t) {
|
|
9779
|
-
return
|
|
9786
|
+
return qo(t, this);
|
|
9780
9787
|
}
|
|
9781
9788
|
/**
|
|
9782
9789
|
* Replaces existing blocks in the editor with new blocks. If the blocks that should be removed are not adjacent or
|
|
@@ -9786,7 +9793,7 @@ class Ct {
|
|
|
9786
9793
|
* @param blocksToInsert An array of partial blocks to replace the old ones with.
|
|
9787
9794
|
*/
|
|
9788
9795
|
replaceBlocks(t, i) {
|
|
9789
|
-
return
|
|
9796
|
+
return Xo(t, i, this);
|
|
9790
9797
|
}
|
|
9791
9798
|
/**
|
|
9792
9799
|
* Insert a piece of content at the current cursor position.
|
|
@@ -9794,12 +9801,12 @@ class Ct {
|
|
|
9794
9801
|
* @param content can be a string, or array of partial inline content elements
|
|
9795
9802
|
*/
|
|
9796
9803
|
insertInlineContent(t) {
|
|
9797
|
-
const i =
|
|
9804
|
+
const i = V(
|
|
9798
9805
|
t,
|
|
9799
9806
|
this.pmSchema,
|
|
9800
9807
|
this.schema.styleSchema
|
|
9801
9808
|
);
|
|
9802
|
-
|
|
9809
|
+
Zo(
|
|
9803
9810
|
{
|
|
9804
9811
|
from: this._tiptapEditor.state.selection.from,
|
|
9805
9812
|
to: this._tiptapEditor.state.selection.to
|
|
@@ -9972,7 +9979,7 @@ class Ct {
|
|
|
9972
9979
|
* @returns The blocks, serialized as a Markdown string.
|
|
9973
9980
|
*/
|
|
9974
9981
|
async blocksToMarkdownLossy(t = this.document) {
|
|
9975
|
-
return
|
|
9982
|
+
return Qo(t, this.pmSchema, this, {});
|
|
9976
9983
|
}
|
|
9977
9984
|
/**
|
|
9978
9985
|
* Creates a list of blocks from a Markdown string. Tries to create `Block` and `InlineNode` objects based on
|
|
@@ -9982,7 +9989,7 @@ class Ct {
|
|
|
9982
9989
|
* @returns The blocks parsed from the Markdown string.
|
|
9983
9990
|
*/
|
|
9984
9991
|
async tryParseMarkdownToBlocks(t) {
|
|
9985
|
-
return
|
|
9992
|
+
return sn(
|
|
9986
9993
|
t,
|
|
9987
9994
|
this.schema.blockSchema,
|
|
9988
9995
|
this.schema.inlineContentSchema,
|
|
@@ -10044,8 +10051,8 @@ class Ct {
|
|
|
10044
10051
|
}
|
|
10045
10052
|
}
|
|
10046
10053
|
let ae, ke;
|
|
10047
|
-
async function
|
|
10048
|
-
if (!
|
|
10054
|
+
async function Vr(e, t) {
|
|
10055
|
+
if (!Fo("text", e))
|
|
10049
10056
|
return [];
|
|
10050
10057
|
if (!ae) {
|
|
10051
10058
|
ae = import("@emoji-mart/data"), ke = await import("emoji-mart");
|
|
@@ -10058,7 +10065,7 @@ async function zr(e, t) {
|
|
|
10058
10065
|
onItemClick: () => e.insertInlineContent(n.skins[0].native + " ")
|
|
10059
10066
|
}));
|
|
10060
10067
|
}
|
|
10061
|
-
function
|
|
10068
|
+
function Qn(e) {
|
|
10062
10069
|
let t = e.getTextCursorPosition().block, i = e.schema.blockSchema[t.type].content;
|
|
10063
10070
|
for (; i === "none"; )
|
|
10064
10071
|
t = e.getTextCursorPosition().nextBlock, i = e.schema.blockSchema[t.type].content, e.setTextCursorPosition(t, "end");
|
|
@@ -10072,7 +10079,7 @@ function M(e, t) {
|
|
|
10072
10079
|
"end"
|
|
10073
10080
|
));
|
|
10074
10081
|
const o = e.getTextCursorPosition().block;
|
|
10075
|
-
return
|
|
10082
|
+
return Qn(e), o;
|
|
10076
10083
|
}
|
|
10077
10084
|
function Rr(e) {
|
|
10078
10085
|
const t = [];
|
|
@@ -10229,7 +10236,7 @@ function Rr(e) {
|
|
|
10229
10236
|
...e.dictionary.slash_menu.emoji
|
|
10230
10237
|
}), t;
|
|
10231
10238
|
}
|
|
10232
|
-
function
|
|
10239
|
+
function Or(e, t) {
|
|
10233
10240
|
return e.filter(
|
|
10234
10241
|
({ title: i, aliases: o }) => i.toLowerCase().includes(t.toLowerCase()) || o && o.filter(
|
|
10235
10242
|
(n) => n.toLowerCase().includes(t.toLowerCase())
|
|
@@ -10255,7 +10262,7 @@ function St(e) {
|
|
|
10255
10262
|
content: St(t.content)
|
|
10256
10263
|
}) : e;
|
|
10257
10264
|
}
|
|
10258
|
-
function
|
|
10265
|
+
function Fr(e, t) {
|
|
10259
10266
|
return t.map(
|
|
10260
10267
|
(i) => Mt(e, i)
|
|
10261
10268
|
);
|
|
@@ -10279,58 +10286,59 @@ function Mt(e, t) {
|
|
|
10279
10286
|
children: i.children.map((o) => Mt(e, o))
|
|
10280
10287
|
};
|
|
10281
10288
|
}
|
|
10282
|
-
function Qn(e) {
|
|
10283
|
-
e.id || (e.id = oe.options.generateID()), e.children && er(e.children);
|
|
10284
|
-
}
|
|
10285
10289
|
function er(e) {
|
|
10290
|
+
e.id || (e.id = oe.options.generateID()), e.children && tr(e.children);
|
|
10291
|
+
}
|
|
10292
|
+
function tr(e) {
|
|
10286
10293
|
for (const t of e)
|
|
10287
|
-
|
|
10294
|
+
er(t);
|
|
10288
10295
|
}
|
|
10289
10296
|
export {
|
|
10290
|
-
|
|
10297
|
+
Xi as AudioBlock,
|
|
10291
10298
|
Ct as BlockNoteEditor,
|
|
10292
10299
|
Ne as BlockNoteSchema,
|
|
10293
|
-
|
|
10294
|
-
|
|
10295
|
-
|
|
10296
|
-
|
|
10297
|
-
|
|
10300
|
+
to as FileBlock,
|
|
10301
|
+
dn as FilePanelProsemirrorPlugin,
|
|
10302
|
+
ln as FilePanelView,
|
|
10303
|
+
pn as FormattingToolbarProsemirrorPlugin,
|
|
10304
|
+
cn as FormattingToolbarView,
|
|
10298
10305
|
yt as HTMLToBlocks,
|
|
10299
|
-
|
|
10300
|
-
|
|
10301
|
-
|
|
10302
|
-
|
|
10303
|
-
|
|
10304
|
-
|
|
10305
|
-
|
|
10306
|
+
so as ImageBlock,
|
|
10307
|
+
fn as LinkToolbarProsemirrorPlugin,
|
|
10308
|
+
wn as SideMenuProsemirrorPlugin,
|
|
10309
|
+
kn as SideMenuView,
|
|
10310
|
+
En as SuggestionMenuProseMirrorPlugin,
|
|
10311
|
+
Bn as TableHandlesProsemirrorPlugin,
|
|
10312
|
+
Tn as TableHandlesView,
|
|
10306
10313
|
oe as UniqueID,
|
|
10307
10314
|
P as UnreachableCaseError,
|
|
10308
|
-
|
|
10309
|
-
|
|
10310
|
-
|
|
10315
|
+
mo as VideoBlock,
|
|
10316
|
+
er as addIdsToBlock,
|
|
10317
|
+
tr as addIdsToBlocks,
|
|
10311
10318
|
Fe as addInlineContentAttributes,
|
|
10312
|
-
|
|
10319
|
+
Ui as addInlineContentKeyboardShortcuts,
|
|
10313
10320
|
Ri as addStyleAttributes,
|
|
10314
|
-
|
|
10315
|
-
|
|
10316
|
-
|
|
10317
|
-
|
|
10318
|
-
|
|
10319
|
-
|
|
10321
|
+
Pi as applyNonSelectableBlockFix,
|
|
10322
|
+
Tr as assertEmpty,
|
|
10323
|
+
Wi as audioBlockConfig,
|
|
10324
|
+
$i as audioParse,
|
|
10325
|
+
Gi as audioPropSchema,
|
|
10326
|
+
Ki as audioRender,
|
|
10327
|
+
qi as audioToExternalHTML,
|
|
10320
10328
|
U as blockToNode,
|
|
10321
|
-
|
|
10329
|
+
Qo as blocksToMarkdown,
|
|
10322
10330
|
se as camelToDataKebab,
|
|
10323
|
-
|
|
10324
|
-
|
|
10325
|
-
|
|
10326
|
-
|
|
10327
|
-
|
|
10328
|
-
|
|
10331
|
+
jr as checkBlockHasDefaultProp,
|
|
10332
|
+
Go as checkBlockIsDefaultType,
|
|
10333
|
+
Hr as checkBlockIsFileBlock,
|
|
10334
|
+
Dr as checkBlockIsFileBlockWithPlaceholder,
|
|
10335
|
+
Ur as checkBlockIsFileBlockWithPreview,
|
|
10336
|
+
Wo as checkBlockTypeHasDefaultProp,
|
|
10329
10337
|
T as checkDefaultBlockTypeInSchema,
|
|
10330
|
-
|
|
10338
|
+
Fo as checkDefaultInlineContentTypeInSchema,
|
|
10331
10339
|
Ie as cleanHTMLToMarkdown,
|
|
10332
10340
|
Se as contentNodeToInlineContent,
|
|
10333
|
-
|
|
10341
|
+
Fi as createAddFileButton,
|
|
10334
10342
|
ce as createBlockSpec,
|
|
10335
10343
|
X as createBlockSpecFromStronglyTypedTiptapNode,
|
|
10336
10344
|
O as createDefaultBlockDOMOutputSpec,
|
|
@@ -10339,84 +10347,84 @@ export {
|
|
|
10339
10347
|
Te as createFigureWithCaption,
|
|
10340
10348
|
ne as createFileAndCaptionWrapper,
|
|
10341
10349
|
ue as createFileBlockWrapper,
|
|
10342
|
-
|
|
10343
|
-
|
|
10350
|
+
Ir as createInlineContentSpec,
|
|
10351
|
+
ji as createInlineContentSpecFromTipTapNode,
|
|
10344
10352
|
lt as createInternalBlockSpec,
|
|
10345
10353
|
Me as createInternalHTMLSerializer,
|
|
10346
|
-
|
|
10354
|
+
Di as createInternalInlineContentSpec,
|
|
10347
10355
|
ut as createInternalStyleSpec,
|
|
10348
10356
|
he as createLinkWithCaption,
|
|
10349
10357
|
mt as createResizeHandlesWrapper,
|
|
10350
10358
|
F as createStronglyTypedTiptapNode,
|
|
10351
|
-
|
|
10359
|
+
Ar as createStyleSpec,
|
|
10352
10360
|
j as createStyleSpecFromTipTapMark,
|
|
10353
|
-
|
|
10361
|
+
zr as createSuggestionMenu,
|
|
10354
10362
|
Ro as defaultBlockSchema,
|
|
10355
10363
|
ft as defaultBlockSpecs,
|
|
10356
10364
|
Oe as defaultBlockToHTML,
|
|
10357
|
-
|
|
10365
|
+
Oo as defaultInlineContentSchema,
|
|
10358
10366
|
bt as defaultInlineContentSpecs,
|
|
10359
|
-
|
|
10360
|
-
|
|
10367
|
+
w as defaultProps,
|
|
10368
|
+
Pr as defaultStyleSchema,
|
|
10361
10369
|
gt as defaultStyleSpecs,
|
|
10362
10370
|
H as esmDependencies,
|
|
10363
|
-
|
|
10364
|
-
|
|
10365
|
-
|
|
10366
|
-
|
|
10367
|
-
|
|
10368
|
-
|
|
10369
|
-
|
|
10371
|
+
Ji as fileBlockConfig,
|
|
10372
|
+
Qi as fileParse,
|
|
10373
|
+
Zi as filePropSchema,
|
|
10374
|
+
Yi as fileRender,
|
|
10375
|
+
eo as fileToExternalHTML,
|
|
10376
|
+
Lr as filenameFromURL,
|
|
10377
|
+
Or as filterSuggestionItems,
|
|
10370
10378
|
D as formatKeyboardShortcut,
|
|
10371
|
-
|
|
10379
|
+
un as formattingToolbarPluginKey,
|
|
10372
10380
|
Ni as getBlockFromPos,
|
|
10373
|
-
|
|
10381
|
+
Wn as getBlockNoteExtensions,
|
|
10374
10382
|
dt as getBlockSchemaFromSpecs,
|
|
10375
10383
|
B as getCurrentBlockContentType,
|
|
10376
|
-
|
|
10384
|
+
Vr as getDefaultEmojiPickerItems,
|
|
10377
10385
|
Rr as getDefaultSlashMenuItems,
|
|
10378
10386
|
me as getDraggableBlockFromElement,
|
|
10379
|
-
|
|
10387
|
+
zi as getInlineContentParseRules,
|
|
10380
10388
|
ct as getInlineContentSchemaFromSpecs,
|
|
10381
|
-
|
|
10382
|
-
|
|
10389
|
+
Hi as getParseRules,
|
|
10390
|
+
Oi as getStyleParseRules,
|
|
10383
10391
|
pt as getStyleSchemaFromSpecs,
|
|
10384
|
-
|
|
10385
|
-
|
|
10386
|
-
|
|
10387
|
-
|
|
10388
|
-
|
|
10392
|
+
oo as imageBlockConfig,
|
|
10393
|
+
ro as imageParse,
|
|
10394
|
+
io as imagePropSchema,
|
|
10395
|
+
no as imageRender,
|
|
10396
|
+
ao as imageToExternalHTML,
|
|
10389
10397
|
at as inheritedProps,
|
|
10390
10398
|
ie as initializeESMDependencies,
|
|
10391
|
-
|
|
10399
|
+
V as inlineContentToNodes,
|
|
10392
10400
|
M as insertOrUpdateBlock,
|
|
10393
10401
|
Ai as isAppleOS,
|
|
10394
10402
|
ze as isLinkInlineContent,
|
|
10395
10403
|
tt as isPartialLinkInlineContent,
|
|
10396
|
-
|
|
10404
|
+
Br as isSafari,
|
|
10397
10405
|
te as isStyledTextInlineContent,
|
|
10398
|
-
|
|
10399
|
-
|
|
10400
|
-
|
|
10401
|
-
|
|
10406
|
+
mn as linkToolbarPluginKey,
|
|
10407
|
+
Mr as locales,
|
|
10408
|
+
sn as markdownToBlocks,
|
|
10409
|
+
R as mergeCSSClasses,
|
|
10402
10410
|
C as nodeToBlock,
|
|
10403
10411
|
xe as nodeToCustomInlineContent,
|
|
10404
10412
|
Ge as parseEmbedElement,
|
|
10405
10413
|
pe as parseFigureElement,
|
|
10406
10414
|
Ke as parseImageElement,
|
|
10407
10415
|
Mt as partialBlockToBlockForTesting,
|
|
10408
|
-
|
|
10416
|
+
Fr as partialBlocksToBlocksForTesting,
|
|
10409
10417
|
st as propsToAttributes,
|
|
10410
|
-
|
|
10411
|
-
|
|
10418
|
+
yn as sideMenuPluginKey,
|
|
10419
|
+
Vi as stylePropsToAttributes,
|
|
10412
10420
|
it as tableContentToNodes,
|
|
10413
10421
|
Q as tableHandlesPluginKey,
|
|
10414
|
-
|
|
10415
|
-
|
|
10416
|
-
|
|
10417
|
-
|
|
10418
|
-
|
|
10419
|
-
|
|
10422
|
+
Nr as uploadToTmpFilesDotOrg_DEV_ONLY,
|
|
10423
|
+
co as videoBlockConfig,
|
|
10424
|
+
po as videoParse,
|
|
10425
|
+
lo as videoPropSchema,
|
|
10426
|
+
uo as videoRender,
|
|
10427
|
+
ho as videoToExternalHTML,
|
|
10420
10428
|
ge as wrapInBlockStructure
|
|
10421
10429
|
};
|
|
10422
10430
|
//# sourceMappingURL=blocknote.js.map
|