@blocknote/core 0.39.0 → 0.39.1-capitol-test

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.
Files changed (38) hide show
  1. package/dist/{BlockNoteSchema-DmZ6UQfY.cjs → BlockNoteSchema-Bsa_tSAC.cjs} +8 -8
  2. package/dist/BlockNoteSchema-Bsa_tSAC.cjs.map +1 -0
  3. package/dist/{BlockNoteSchema-oR047ACf.js → BlockNoteSchema-CZez1nQf.js} +586 -617
  4. package/dist/BlockNoteSchema-CZez1nQf.js.map +1 -0
  5. package/dist/blocknote.cjs +4 -4
  6. package/dist/blocknote.cjs.map +1 -1
  7. package/dist/blocknote.js +1172 -1185
  8. package/dist/blocknote.js.map +1 -1
  9. package/dist/blocks.cjs +1 -1
  10. package/dist/blocks.js +1 -1
  11. package/dist/webpack-stats.json +1 -1
  12. package/package.json +1 -2
  13. package/src/api/clipboard/fromClipboard/handleFileInsertion.ts +2 -2
  14. package/src/api/clipboard/fromClipboard/pasteExtension.ts +1 -1
  15. package/src/blocks/Code/block.ts +1 -5
  16. package/src/editor/BlockNoteEditor.ts +23 -19
  17. package/src/extensions/Placeholder/PlaceholderPlugin.ts +6 -6
  18. package/src/extensions/SideMenu/SideMenuPlugin.ts +1 -3
  19. package/src/extensions/SideMenu/dragging.ts +2 -2
  20. package/src/extensions/SuggestionMenu/SuggestionPlugin.ts +4 -2
  21. package/src/extensions/TableHandles/TableHandlesPlugin.ts +6 -6
  22. package/types/src/api/exporters/markdown/util/convertVideoToMarkdownRehypePlugin.d.ts +2 -0
  23. package/types/src/api/exporters/markdown/util/removeUnderlinesRehypePlugin.d.ts +6 -0
  24. package/types/src/blocks/Divider/block.d.ts +3 -0
  25. package/types/src/editor/BlockNoteEditor.d.ts +3 -1
  26. package/types/src/editor/managers/BlockManager.d.ts +114 -0
  27. package/types/src/editor/managers/CollaborationManager.d.ts +115 -0
  28. package/types/src/editor/managers/EventManager.d.ts +58 -0
  29. package/types/src/editor/managers/ExportManager.d.ts +64 -0
  30. package/types/src/editor/managers/ExtensionManager.d.ts +68 -0
  31. package/types/src/editor/managers/SelectionManager.d.ts +54 -0
  32. package/types/src/editor/managers/StateManager.d.ts +115 -0
  33. package/types/src/editor/managers/StyleManager.d.ts +48 -0
  34. package/types/src/editor/managers/index.d.ts +8 -0
  35. package/dist/BlockNoteSchema-DmZ6UQfY.cjs.map +0 -1
  36. package/dist/BlockNoteSchema-oR047ACf.js.map +0 -1
  37. package/dist/tsconfig.tsbuildinfo +0 -1
  38. package/src/blocks/Code/shiki.ts +0 -73
@@ -1,34 +1,32 @@
1
- var ft = Object.defineProperty;
2
- var ht = (e, t, n) => t in e ? ft(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var x = (e, t, n) => ht(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { TableMap as We, goToNextCell as Se, columnResizing as mt, tableEditing as gt, TableView as bt, CellSelection as Ct } from "prosemirror-tables";
5
- import kt from "@tiptap/extension-bold";
6
- import yt from "@tiptap/extension-code";
7
- import wt from "@tiptap/extension-italic";
8
- import vt from "@tiptap/extension-strike";
9
- import Et from "@tiptap/extension-underline";
10
- import { Extension as Fe, combineTransactionSteps as xt, getChangedRanges as St, findChildrenInRange as Bt, Node as D, Mark as Mt, callOrReturn as Lt, getExtensionField as Tt, mergeAttributes as ue } from "@tiptap/core";
11
- import { Slice as de, Fragment as _, DOMParser as Q, DOMSerializer as Be } from "prosemirror-model";
12
- import { Plugin as je, PluginKey as $e, TextSelection as Ue } from "prosemirror-state";
13
- import { v4 as At } from "uuid";
14
- import { createHighlightPlugin as Nt } from "prosemirror-highlight";
15
- import { createParser as It } from "prosemirror-highlight/shiki";
16
- import { ReplaceStep as Ht } from "prosemirror-transform";
17
- import { DecorationSet as Me, Decoration as Pt } from "prosemirror-view";
18
- function Ot(e, t = JSON.stringify) {
1
+ var ut = Object.defineProperty;
2
+ var dt = (e, t, n) => t in e ? ut(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var x = (e, t, n) => dt(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { TableMap as Re, goToNextCell as xe, columnResizing as pt, tableEditing as ft, TableView as ht, CellSelection as mt } from "prosemirror-tables";
5
+ import gt from "@tiptap/extension-bold";
6
+ import bt from "@tiptap/extension-code";
7
+ import Ct from "@tiptap/extension-italic";
8
+ import kt from "@tiptap/extension-strike";
9
+ import yt from "@tiptap/extension-underline";
10
+ import { Extension as Ve, combineTransactionSteps as wt, getChangedRanges as vt, findChildrenInRange as Et, Node as D, Mark as xt, callOrReturn as St, getExtensionField as Bt, mergeAttributes as le } from "@tiptap/core";
11
+ import { Slice as ue, Fragment as _, DOMParser as Q, DOMSerializer as Se } from "prosemirror-model";
12
+ import { Plugin as We, PluginKey as Fe, TextSelection as je } from "prosemirror-state";
13
+ import { v4 as Mt } from "uuid";
14
+ import { ReplaceStep as Lt } from "prosemirror-transform";
15
+ import { DecorationSet as Be, Decoration as Tt } from "prosemirror-view";
16
+ function At(e, t = JSON.stringify) {
19
17
  const n = {};
20
18
  return e.filter((o) => {
21
19
  const r = t(o);
22
20
  return Object.prototype.hasOwnProperty.call(n, r) ? !1 : n[r] = !0;
23
21
  });
24
22
  }
25
- function Dt(e) {
23
+ function Nt(e) {
26
24
  const t = e.filter(
27
25
  (o, r) => e.indexOf(o) !== r
28
26
  );
29
- return Ot(t);
27
+ return At(t);
30
28
  }
31
- const ze = Fe.create({
29
+ const $e = Ve.create({
32
30
  name: "uniqueID",
33
31
  // we’ll set a very high priority to make sure this runs first
34
32
  // and is compatible with `appendTransaction` hooks of other extensions
@@ -43,7 +41,7 @@ const ze = Fe.create({
43
41
  const e = window.__TEST_OPTIONS;
44
42
  return e.mockID === void 0 ? e.mockID = 0 : e.mockID++, e.mockID.toString();
45
43
  }
46
- return At();
44
+ return Mt();
47
45
  },
48
46
  filterTransaction: null
49
47
  };
@@ -103,8 +101,8 @@ const ze = Fe.create({
103
101
  addProseMirrorPlugins() {
104
102
  let e = null, t = !1;
105
103
  return [
106
- new je({
107
- key: new $e("uniqueID"),
104
+ new We({
105
+ key: new Fe("uniqueID"),
108
106
  appendTransaction: (n, o, r) => {
109
107
  const s = n.some((h) => h.docChanged) && !o.doc.eq(r.doc), a = this.options.filterTransaction && n.some((h) => {
110
108
  var C, m;
@@ -112,26 +110,26 @@ const ze = Fe.create({
112
110
  });
113
111
  if (!s || a)
114
112
  return;
115
- const { tr: i } = r, { types: c, attributeName: l, generateID: d } = this.options, u = xt(
113
+ const { tr: i } = r, { types: c, attributeName: l, generateID: d } = this.options, u = wt(
116
114
  o.doc,
117
115
  n
118
116
  ), { mapping: p } = u;
119
- if (St(u).forEach(({ newRange: h }) => {
120
- const C = Bt(
117
+ if (vt(u).forEach(({ newRange: h }) => {
118
+ const C = Et(
121
119
  r.doc,
122
120
  h,
123
121
  (y) => c.includes(y.type.name)
124
- ), m = C.map(({ node: y }) => y.attrs[l]).filter((y) => y !== null), b = Dt(m);
122
+ ), m = C.map(({ node: y }) => y.attrs[l]).filter((y) => y !== null), b = Nt(m);
125
123
  C.forEach(({ node: y, pos: g }) => {
126
124
  var V;
127
125
  const w = (V = i.doc.nodeAt(g)) == null ? void 0 : V.attrs[l];
128
126
  if (w === null) {
129
127
  const W = o.doc.type.createAndFill().content;
130
128
  if (o.doc.content.findDiffStart(W) === null) {
131
- const xe = JSON.parse(
129
+ const Ee = JSON.parse(
132
130
  JSON.stringify(r.doc.toJSON())
133
131
  );
134
- if (xe.content[0].content[0].attrs.id = "initialBlockId", JSON.stringify(xe.content) === JSON.stringify(W.toJSON())) {
132
+ if (Ee.content[0].content[0].attrs.id = "initialBlockId", JSON.stringify(Ee.content) === JSON.stringify(W.toJSON())) {
135
133
  i.setNodeMarkup(g, void 0, {
136
134
  ...y.attrs,
137
135
  [l]: "initialBlockId"
@@ -207,7 +205,7 @@ const ze = Fe.create({
207
205
  i.push(l);
208
206
  }), _.from(i);
209
207
  };
210
- return t = !1, new de(
208
+ return t = !1, new ue(
211
209
  s(n.content),
212
210
  n.openStart,
213
211
  n.openEnd
@@ -218,18 +216,18 @@ const ze = Fe.create({
218
216
  ];
219
217
  }
220
218
  });
221
- function Le(e) {
219
+ function Me(e) {
222
220
  return e.type === "link";
223
221
  }
224
- function qe(e) {
222
+ function Ue(e) {
225
223
  return typeof e != "string" && e.type === "link";
226
224
  }
227
225
  function I(e) {
228
226
  return typeof e != "string" && e.type === "text";
229
227
  }
230
- function se(e) {
228
+ function re(e) {
231
229
  var t, n, o, r, s;
232
- return pe(e) ? { ...e } : j(e) ? {
230
+ return de(e) ? { ...e } : j(e) ? {
233
231
  type: "tableCell",
234
232
  content: [].concat(e.content),
235
233
  props: {
@@ -254,28 +252,28 @@ function se(e) {
254
252
  function j(e) {
255
253
  return e != null && typeof e != "string" && !Array.isArray(e) && e.type === "tableCell";
256
254
  }
257
- function pe(e) {
255
+ function de(e) {
258
256
  return j(e) && e.props !== void 0 && e.content !== void 0;
259
257
  }
260
258
  function $(e) {
261
- return pe(e) ? e.props.colspan ?? 1 : 1;
259
+ return de(e) ? e.props.colspan ?? 1 : 1;
262
260
  }
263
- function ae(e) {
264
- return pe(e) ? e.props.rowspan ?? 1 : 1;
261
+ function se(e) {
262
+ return de(e) ? e.props.rowspan ?? 1 : 1;
265
263
  }
266
264
  class Z extends Error {
267
265
  constructor(t) {
268
266
  super(`Unreachable case: ${t}`);
269
267
  }
270
268
  }
271
- function Do(e, t = !0) {
269
+ function To(e, t = !0) {
272
270
  const { "data-test": n, ...o } = e;
273
271
  if (Object.keys(o).length > 0 && t)
274
272
  throw new Error("Object must be empty " + JSON.stringify(e));
275
273
  }
276
- const _t = () => typeof navigator < "u" && (/Mac/.test(navigator.platform) || /AppleWebKit/.test(navigator.userAgent) && /Mobile\/\w+/.test(navigator.userAgent));
277
- function T(e, t = "Ctrl") {
278
- return _t() ? e.replace("Mod", "⌘") : e.replace("Mod", t);
274
+ const It = () => typeof navigator < "u" && (/Mac/.test(navigator.platform) || /AppleWebKit/.test(navigator.userAgent) && /Mobile\/\w+/.test(navigator.userAgent));
275
+ function L(e, t = "Ctrl") {
276
+ return It() ? e.replace("Mod", "⌘") : e.replace("Mod", t);
279
277
  }
280
278
  function U(...e) {
281
279
  return [
@@ -285,8 +283,8 @@ function U(...e) {
285
283
  )
286
284
  ].join(" ");
287
285
  }
288
- const _o = () => /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
289
- function Rt(e, t, n, o) {
286
+ const Ao = () => /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
287
+ function Ot(e, t, n, o) {
290
288
  const r = document.createElement("div");
291
289
  r.className = U(
292
290
  "bn-block-content",
@@ -308,7 +306,7 @@ function Rt(e, t, n, o) {
308
306
  contentDOM: s
309
307
  };
310
308
  }
311
- const Te = (e, t) => {
309
+ const Le = (e, t) => {
312
310
  let n = Y(e, t.pmSchema);
313
311
  n.type.name === "blockContainer" && (n = n.firstChild);
314
312
  const o = t.pmSchema.nodes[n.type.name].spec.toDOM;
@@ -323,7 +321,7 @@ const Te = (e, t) => {
323
321
  );
324
322
  return r;
325
323
  };
326
- function Vt(e, t = "<br>") {
324
+ function Ht(e, t = "<br>") {
327
325
  const n = e.querySelectorAll("p");
328
326
  if (n.length > 1) {
329
327
  const o = n[0];
@@ -336,12 +334,12 @@ function Vt(e, t = "<br>") {
336
334
  function K(e) {
337
335
  return "data-" + e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
338
336
  }
339
- function Ro(e) {
337
+ function No(e) {
340
338
  const t = e.split("/");
341
339
  return !t.length || // invalid?
342
340
  t[t.length - 1] === "" ? e : t[t.length - 1];
343
341
  }
344
- function Wt(e) {
342
+ function Pt(e) {
345
343
  const t = {};
346
344
  return Object.entries(e).forEach(([n, o]) => {
347
345
  t[n] = {
@@ -368,7 +366,7 @@ function Wt(e) {
368
366
  };
369
367
  }), t;
370
368
  }
371
- function Ft(e, t, n, o) {
369
+ function Dt(e, t, n, o) {
372
370
  const r = e();
373
371
  if (r === void 0)
374
372
  throw new Error("Cannot find node position");
@@ -380,7 +378,7 @@ function Ft(e, t, n, o) {
380
378
  throw new Error("Block type does not match");
381
379
  return i;
382
380
  }
383
- function ie(e, t, n, o, r = !1, s) {
381
+ function ae(e, t, n, o, r = !1, s) {
384
382
  const a = document.createElement("div");
385
383
  if (s !== void 0)
386
384
  for (const [i, c] of Object.entries(s))
@@ -401,7 +399,7 @@ function ie(e, t, n, o, r = !1, s) {
401
399
  dom: a
402
400
  };
403
401
  }
404
- function jt(e, t, n) {
402
+ function _t(e, t, n) {
405
403
  return {
406
404
  config: {
407
405
  type: e.type,
@@ -410,18 +408,18 @@ function jt(e, t, n) {
410
408
  },
411
409
  implementation: {
412
410
  node: e.node,
413
- render: Te,
414
- toExternalHTML: Te
411
+ render: Le,
412
+ toExternalHTML: Le
415
413
  },
416
414
  extensions: n
417
415
  };
418
416
  }
419
- function $t(e, t) {
417
+ function Rt(e, t) {
420
418
  e.stopEvent = (n) => (n.type === "mousedown" && setTimeout(() => {
421
419
  t.view.dom.blur();
422
420
  }, 10), !0);
423
421
  }
424
- function Ut(e, t) {
422
+ function Vt(e, t) {
425
423
  const n = [
426
424
  {
427
425
  tag: "[data-content-type=" + e.type + "]",
@@ -446,7 +444,7 @@ function Ut(e, t) {
446
444
  });
447
445
  if (e.content === "inline") {
448
446
  const i = o.cloneNode(!0);
449
- return Vt(
447
+ return Ht(
450
448
  i,
451
449
  (s = t.meta) != null && s.code ? `
452
450
  ` : "<br>"
@@ -458,7 +456,7 @@ function Ut(e, t) {
458
456
  } : void 0
459
457
  }), n;
460
458
  }
461
- function zt(e, t, n, o) {
459
+ function Wt(e, t, n, o) {
462
460
  var s, a, i, c;
463
461
  const r = t.node || D.create({
464
462
  name: e.type,
@@ -470,15 +468,15 @@ function zt(e, t, n, o) {
470
468
  defining: ((c = t.meta) == null ? void 0 : c.defining) ?? !0,
471
469
  priority: o,
472
470
  addAttributes() {
473
- return Wt(e.propSchema);
471
+ return Pt(e.propSchema);
474
472
  },
475
473
  parseHTML() {
476
- return Ut(e, t);
474
+ return Vt(e, t);
477
475
  },
478
476
  renderHTML({ HTMLAttributes: l }) {
479
477
  var u;
480
478
  const d = document.createElement("div");
481
- return ie(
479
+ return ae(
482
480
  {
483
481
  dom: d,
484
482
  contentDOM: e.content === "inline" ? d : void 0
@@ -493,7 +491,7 @@ function zt(e, t, n, o) {
493
491
  addNodeView() {
494
492
  return (l) => {
495
493
  var h, C;
496
- const d = this.options.editor, u = Ft(
494
+ const d = this.options.editor, u = Dt(
497
495
  l.getPos,
498
496
  d,
499
497
  this.editor,
@@ -503,7 +501,7 @@ function zt(e, t, n, o) {
503
501
  u,
504
502
  d
505
503
  );
506
- return ((C = t.meta) == null ? void 0 : C.selectable) === !1 && $t(f, this.editor), f;
504
+ return ((C = t.meta) == null ? void 0 : C.selectable) === !1 && Rt(f, this.editor), f;
507
505
  };
508
506
  }
509
507
  });
@@ -547,7 +545,7 @@ function zt(e, t, n, o) {
547
545
  extensions: n
548
546
  };
549
547
  }
550
- function Vo(e) {
548
+ function Io(e) {
551
549
  return e;
552
550
  }
553
551
  function M(e, t, n) {
@@ -567,7 +565,7 @@ function M(e, t, n) {
567
565
  c
568
566
  );
569
567
  if (l !== void 0)
570
- return ie(
568
+ return ae(
571
569
  l,
572
570
  i.type,
573
571
  i.props,
@@ -586,7 +584,7 @@ function M(e, t, n) {
586
584
  i,
587
585
  c
588
586
  );
589
- return ie(
587
+ return ae(
590
588
  l,
591
589
  i.type,
592
590
  i.props,
@@ -600,7 +598,7 @@ function M(e, t, n) {
600
598
  };
601
599
  };
602
600
  }
603
- function fe(e, t) {
601
+ function pe(e, t) {
604
602
  const n = e.resolve(t);
605
603
  if (n.nodeAfter && n.nodeAfter.type.isInGroup("bnBlock"))
606
604
  return {
@@ -628,7 +626,7 @@ function fe(e, t) {
628
626
  node: a.nodeAfter
629
627
  };
630
628
  }
631
- function he(e, t) {
629
+ function fe(e, t) {
632
630
  if (!e.type.isInGroup("bnBlock"))
633
631
  throw new Error(
634
632
  `Attempted to get bnBlock node at position but found node of different type ${e.type.name}`
@@ -680,46 +678,46 @@ function he(e, t) {
680
678
  };
681
679
  }
682
680
  }
683
- function z(e) {
684
- return he(e.node, e.posBeforeNode);
681
+ function q(e) {
682
+ return fe(e.node, e.posBeforeNode);
685
683
  }
686
- function qt(e) {
684
+ function Ft(e) {
687
685
  if (!e.nodeAfter)
688
686
  throw new Error(
689
687
  `Attempted to get blockContainer node at position ${e.pos} but a node at this position does not exist`
690
688
  );
691
- return he(e.nodeAfter, e.pos);
689
+ return fe(e.nodeAfter, e.pos);
692
690
  }
693
- function Wo(e) {
694
- const t = fe(e.doc, e.selection.anchor);
695
- return z(t);
691
+ function Oo(e) {
692
+ const t = pe(e.doc, e.selection.anchor);
693
+ return q(t);
696
694
  }
697
- function Zt(e) {
698
- const t = fe(e.doc, e.selection.anchor);
699
- return z(t);
695
+ function jt(e) {
696
+ const t = pe(e.doc, e.selection.anchor);
697
+ return q(t);
700
698
  }
701
699
  function G(e) {
702
700
  return "doc" in e ? e.doc.type.schema : e.type.schema;
703
701
  }
704
- function Ze(e) {
702
+ function qe(e) {
705
703
  return e.cached.blockNoteEditor;
706
704
  }
705
+ function he(e) {
706
+ return qe(e).schema;
707
+ }
707
708
  function me(e) {
708
- return Ze(e).schema;
709
+ return he(e).blockSchema;
709
710
  }
710
711
  function ge(e) {
711
- return me(e).blockSchema;
712
- }
713
- function be(e) {
714
- return me(e).inlineContentSchema;
712
+ return he(e).inlineContentSchema;
715
713
  }
716
714
  function R(e) {
717
- return me(e).styleSchema;
715
+ return he(e).styleSchema;
718
716
  }
719
- function Ce(e) {
720
- return Ze(e).blockCache;
717
+ function be(e) {
718
+ return qe(e).blockCache;
721
719
  }
722
- function Gt(e, t, n) {
720
+ function $t(e, t, n) {
723
721
  var s, a;
724
722
  const o = {
725
723
  type: "tableContent",
@@ -738,7 +736,7 @@ function Gt(e, t, n) {
738
736
  }), d.cells = i.content.content.map((u, p) => (r[l] || (r[l] = []), r[l][p] = u.type.name === "tableHeader", {
739
737
  type: "tableCell",
740
738
  content: u.content.content.map(
741
- (h) => ke(h, t, n)
739
+ (h) => Ce(h, t, n)
742
740
  ).reduce(
743
741
  (h, C) => {
744
742
  if (!h.length)
@@ -764,7 +762,7 @@ function Gt(e, t, n) {
764
762
  r != null && r.every((c) => c[i]) && (o.headerCols = (o.headerCols ?? 0) + 1);
765
763
  return o;
766
764
  }
767
- function ke(e, t, n) {
765
+ function Ce(e, t, n) {
768
766
  const o = [];
769
767
  let r;
770
768
  return e.content.forEach((s) => {
@@ -773,7 +771,7 @@ function ke(e, t, n) {
773
771
  if (I(r))
774
772
  r.text += `
775
773
  `;
776
- else if (Le(r))
774
+ else if (Me(r))
777
775
  r.content[r.content.length - 1].text += `
778
776
  `;
779
777
  else
@@ -793,7 +791,7 @@ function ke(e, t, n) {
793
791
  return;
794
792
  }
795
793
  r && (o.push(r), r = void 0), o.push(
796
- Xt(s, t, n)
794
+ Ut(s, t, n)
797
795
  );
798
796
  return;
799
797
  }
@@ -830,7 +828,7 @@ function ke(e, t, n) {
830
828
  type: "text",
831
829
  text: s.textContent,
832
830
  styles: a
833
- }) : Le(r) && (i ? r.href === i.attrs.href ? JSON.stringify(
831
+ }) : Me(r) && (i ? r.href === i.attrs.href ? JSON.stringify(
834
832
  r.content[r.content.length - 1].styles
835
833
  ) === JSON.stringify(a) ? r.content[r.content.length - 1].text += s.textContent : r.content.push({
836
834
  type: "text",
@@ -867,7 +865,7 @@ function ke(e, t, n) {
867
865
  };
868
866
  }), r && o.push(r), o;
869
867
  }
870
- function Xt(e, t, n) {
868
+ function Ut(e, t, n) {
871
869
  if (e.type.name === "text" || e.type.name === "link")
872
870
  throw new Error("unexpected");
873
871
  const o = {}, r = t[e.type.name];
@@ -878,7 +876,7 @@ function Xt(e, t, n) {
878
876
  i in l && (o[i] = c);
879
877
  }
880
878
  let s;
881
- return r.content === "styled" ? s = ke(
879
+ return r.content === "styled" ? s = Ce(
882
880
  e,
883
881
  t,
884
882
  n
@@ -888,16 +886,16 @@ function Xt(e, t, n) {
888
886
  content: s
889
887
  };
890
888
  }
891
- function X(e, t, n = ge(t), o = be(t), r = R(t), s = Ce(t)) {
889
+ function X(e, t, n = me(t), o = ge(t), r = R(t), s = be(t)) {
892
890
  var C;
893
891
  if (!e.type.isInGroup("bnBlock"))
894
892
  throw Error("Node should be a bnBlock, but is instead: " + e.type.name);
895
893
  const a = s == null ? void 0 : s.get(e);
896
894
  if (a)
897
895
  return a;
898
- const i = he(e, 0);
896
+ const i = fe(e, 0);
899
897
  let c = i.bnBlock.node.attrs.id;
900
- c === null && (c = ze.options.generateID());
898
+ c === null && (c = $e.options.generateID());
901
899
  const l = n[i.blockNoteType];
902
900
  if (!l)
903
901
  throw Error("Block is of an unrecognized type: " + i.blockNoteType);
@@ -926,7 +924,7 @@ function X(e, t, n = ge(t), o = be(t), r = R(t), s = Ce(t)) {
926
924
  if (u.content === "inline") {
927
925
  if (!i.isBlockContainer)
928
926
  throw new Error("impossible");
929
- f = ke(
927
+ f = Ce(
930
928
  i.blockContent.node,
931
929
  o,
932
930
  r
@@ -934,7 +932,7 @@ function X(e, t, n = ge(t), o = be(t), r = R(t), s = Ce(t)) {
934
932
  } else if (u.content === "table") {
935
933
  if (!i.isBlockContainer)
936
934
  throw new Error("impossible");
937
- f = Gt(
935
+ f = $t(
938
936
  i.blockContent.node,
939
937
  o,
940
938
  r
@@ -952,7 +950,7 @@ function X(e, t, n = ge(t), o = be(t), r = R(t), s = Ce(t)) {
952
950
  };
953
951
  return s == null || s.set(e, h), h;
954
952
  }
955
- function Fo(e, t, n = ge(t), o = be(t), r = R(t), s = Ce(t)) {
953
+ function Ho(e, t, n = me(t), o = ge(t), r = R(t), s = be(t)) {
956
954
  const a = [];
957
955
  return e.firstChild.descendants((i) => (a.push(
958
956
  X(
@@ -965,7 +963,7 @@ function Fo(e, t, n = ge(t), o = be(t), r = R(t), s = Ce(t)) {
965
963
  )
966
964
  ), !1)), a;
967
965
  }
968
- function jo(e, t, n = ge(t), o = be(t), r = R(t), s = Ce(t)) {
966
+ function Po(e, t, n = me(t), o = ge(t), r = R(t), s = be(t)) {
969
967
  function a(i, c, l) {
970
968
  if (i.type.name !== "blockGroup")
971
969
  throw new Error("unexpected");
@@ -1032,13 +1030,13 @@ function jo(e, t, n = ge(t), o = be(t), r = R(t), s = Ce(t)) {
1032
1030
  Math.max(e.openEnd - 1, 0)
1033
1031
  );
1034
1032
  }
1035
- function $o(e, t, n, o) {
1033
+ function Do(e, t, n, o) {
1036
1034
  return e.dom.setAttribute("data-inline-content-type", t), Object.entries(n).filter(([r, s]) => {
1037
1035
  const a = o[r];
1038
1036
  return s !== a.default;
1039
1037
  }).map(([r, s]) => [K(r), s]).forEach(([r, s]) => e.dom.setAttribute(r, s)), e.contentDOM && e.contentDOM.setAttribute("data-editable", ""), e;
1040
1038
  }
1041
- function Uo(e) {
1039
+ function _o(e) {
1042
1040
  return {
1043
1041
  Backspace: ({ editor: t }) => {
1044
1042
  const n = t.state.selection.$from;
@@ -1046,14 +1044,14 @@ function Uo(e) {
1046
1044
  }
1047
1045
  };
1048
1046
  }
1049
- function Jt(e, t) {
1047
+ function qt(e, t) {
1050
1048
  return {
1051
1049
  config: e,
1052
1050
  implementation: t
1053
1051
  };
1054
1052
  }
1055
- function zo(e, t, n) {
1056
- return Jt(
1053
+ function Ro(e, t, n) {
1054
+ return qt(
1057
1055
  {
1058
1056
  type: e.name,
1059
1057
  propSchema: t,
@@ -1065,12 +1063,12 @@ function zo(e, t, n) {
1065
1063
  }
1066
1064
  );
1067
1065
  }
1068
- function Ge(e) {
1066
+ function ze(e) {
1069
1067
  return Object.fromEntries(
1070
1068
  Object.entries(e).map(([t, n]) => [t, n.config])
1071
1069
  );
1072
1070
  }
1073
- function Kt(e) {
1071
+ function zt(e) {
1074
1072
  return e === "boolean" ? {} : {
1075
1073
  stringValue: {
1076
1074
  default: void 0,
@@ -1085,14 +1083,14 @@ function Kt(e) {
1085
1083
  function J(e, t, n, o) {
1086
1084
  return e.dom.setAttribute("data-style-type", t), o === "string" && e.dom.setAttribute("data-value", n), e.contentDOM && e.contentDOM.setAttribute("data-editable", ""), e;
1087
1085
  }
1088
- function Xe(e, t) {
1086
+ function Ze(e, t) {
1089
1087
  return {
1090
1088
  config: e,
1091
1089
  implementation: t
1092
1090
  };
1093
1091
  }
1094
1092
  function F(e, t) {
1095
- return Xe(
1093
+ return Ze(
1096
1094
  {
1097
1095
  type: e.name,
1098
1096
  propSchema: t
@@ -1107,7 +1105,7 @@ function F(e, t) {
1107
1105
  );
1108
1106
  const s = o.pmSchema.mark(e.name, {
1109
1107
  stringValue: n
1110
- }), a = Be.renderSpec(
1108
+ }), a = Se.renderSpec(
1111
1109
  document,
1112
1110
  r(s, !0)
1113
1111
  );
@@ -1125,7 +1123,7 @@ function F(e, t) {
1125
1123
  );
1126
1124
  const s = o.pmSchema.mark(e.name, {
1127
1125
  stringValue: n
1128
- }), a = Be.renderSpec(
1126
+ }), a = Se.renderSpec(
1129
1127
  document,
1130
1128
  r(s, !0)
1131
1129
  );
@@ -1138,12 +1136,12 @@ function F(e, t) {
1138
1136
  }
1139
1137
  );
1140
1138
  }
1141
- function Je(e) {
1139
+ function Ge(e) {
1142
1140
  return Object.fromEntries(
1143
1141
  Object.entries(e).map(([t, n]) => [t, n.config])
1144
1142
  );
1145
1143
  }
1146
- function Qt(e, t) {
1144
+ function Zt(e, t) {
1147
1145
  const n = [
1148
1146
  {
1149
1147
  tag: `[data-style-type="${e.type}"]`,
@@ -1163,14 +1161,14 @@ function Qt(e, t) {
1163
1161
  }
1164
1162
  }), n;
1165
1163
  }
1166
- function Ke(e, t) {
1167
- const n = Mt.create({
1164
+ function Xe(e, t) {
1165
+ const n = xt.create({
1168
1166
  name: e.type,
1169
1167
  addAttributes() {
1170
- return Kt(e.propSchema);
1168
+ return zt(e.propSchema);
1171
1169
  },
1172
1170
  parseHTML() {
1173
- return Qt(e, t.parse);
1171
+ return Zt(e, t.parse);
1174
1172
  },
1175
1173
  renderHTML({ mark: o }) {
1176
1174
  const r = (t.toExternalHTML || t.render)(o.attrs.stringValue);
@@ -1193,7 +1191,7 @@ function Ke(e, t) {
1193
1191
  };
1194
1192
  }
1195
1193
  });
1196
- return Xe(e, {
1194
+ return Ze(e, {
1197
1195
  mark: n,
1198
1196
  render: (o) => {
1199
1197
  const r = t.render(o);
@@ -1215,9 +1213,9 @@ function Ke(e, t) {
1215
1213
  }
1216
1214
  });
1217
1215
  }
1218
- function Yt(e) {
1219
- const t = tn(e);
1220
- let { roots: n, nonRoots: o } = Ae(t);
1216
+ function Gt(e) {
1217
+ const t = Jt(e);
1218
+ let { roots: n, nonRoots: o } = Te(t);
1221
1219
  const r = [];
1222
1220
  for (; n.size; ) {
1223
1221
  r.push(n);
@@ -1235,17 +1233,17 @@ function Yt(e) {
1235
1233
  }
1236
1234
  n = s;
1237
1235
  }
1238
- if (o = Ae(t).nonRoots, o.size)
1236
+ if (o = Te(t).nonRoots, o.size)
1239
1237
  throw new Error(
1240
1238
  `Cycle(s) detected; toposort only works on acyclic graphs. Cyclic nodes: ${Array.from(o).join(", ")}`
1241
1239
  );
1242
1240
  return r;
1243
1241
  }
1244
- function en(e) {
1245
- const t = nn(e);
1246
- return Yt(t);
1242
+ function Xt(e) {
1243
+ const t = Kt(e);
1244
+ return Gt(t);
1247
1245
  }
1248
- function tn(e) {
1246
+ function Jt(e) {
1249
1247
  const t = /* @__PURE__ */ new Map();
1250
1248
  for (const [n, o] of e.entries()) {
1251
1249
  t.has(n) || t.set(n, 0);
@@ -1256,13 +1254,13 @@ function tn(e) {
1256
1254
  }
1257
1255
  return t;
1258
1256
  }
1259
- function Ae(e) {
1257
+ function Te(e) {
1260
1258
  const t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
1261
1259
  for (const [o, r] of e.entries())
1262
1260
  r === 0 ? t.add(o) : n.add(o);
1263
1261
  return { roots: t, nonRoots: n };
1264
1262
  }
1265
- function nn(e) {
1263
+ function Kt(e) {
1266
1264
  const t = /* @__PURE__ */ new Map();
1267
1265
  for (const [n, o] of e.entries()) {
1268
1266
  t.has(n) || t.set(n, /* @__PURE__ */ new Set());
@@ -1271,15 +1269,15 @@ function nn(e) {
1271
1269
  }
1272
1270
  return t;
1273
1271
  }
1274
- function on() {
1272
+ function Qt() {
1275
1273
  return /* @__PURE__ */ new Map();
1276
1274
  }
1277
- function Ne(e) {
1275
+ function Ae(e) {
1278
1276
  return e && Object.fromEntries(
1279
1277
  Object.entries(e).filter(([, t]) => t !== void 0)
1280
1278
  );
1281
1279
  }
1282
- class rn {
1280
+ class Yt {
1283
1281
  constructor(t) {
1284
1282
  // Helper so that you can use typeof schema.BlockNoteEditor
1285
1283
  x(this, "BlockNoteEditor", "only for types");
@@ -1303,14 +1301,14 @@ class rn {
1303
1301
  this.blockSpecs = n, this.styleSpecs = r, this.styleSchema = i, this.inlineContentSpecs = o, this.blockSchema = s, this.inlineContentSchema = a;
1304
1302
  }
1305
1303
  init() {
1306
- const t = on(), n = /* @__PURE__ */ new Set();
1304
+ const t = Qt(), n = /* @__PURE__ */ new Set();
1307
1305
  t.set("default", n);
1308
1306
  for (const [i, c] of Object.entries(this.opts.blockSpecs))
1309
1307
  c.implementation.runsBefore ? t.set(i, new Set(c.implementation.runsBefore)) : n.add(i);
1310
- const o = en(t), r = o.findIndex((i) => i.has("default")), s = (i) => 91 + (o.findIndex((l) => l.has(i)) + r) * 10, a = Object.fromEntries(
1308
+ const o = Xt(t), r = o.findIndex((i) => i.has("default")), s = (i) => 91 + (o.findIndex((l) => l.has(i)) + r) * 10, a = Object.fromEntries(
1311
1309
  Object.entries(this.opts.blockSpecs).map(([i, c]) => [
1312
1310
  i,
1313
- zt(
1311
+ Wt(
1314
1312
  c.config,
1315
1313
  c.implementation,
1316
1314
  c.extensions,
@@ -1323,12 +1321,12 @@ class rn {
1323
1321
  blockSchema: Object.fromEntries(
1324
1322
  Object.entries(a).map(([i, c]) => [i, c.config])
1325
1323
  ),
1326
- inlineContentSpecs: Ne(this.opts.inlineContentSpecs),
1327
- styleSpecs: Ne(this.opts.styleSpecs),
1328
- inlineContentSchema: Ge(
1324
+ inlineContentSpecs: Ae(this.opts.inlineContentSpecs),
1325
+ styleSpecs: Ae(this.opts.styleSpecs),
1326
+ inlineContentSchema: ze(
1329
1327
  this.opts.inlineContentSpecs
1330
1328
  ),
1331
- styleSchema: Je(this.opts.styleSpecs)
1329
+ styleSchema: Ge(this.opts.styleSpecs)
1332
1330
  };
1333
1331
  }
1334
1332
  /**
@@ -1352,7 +1350,7 @@ class rn {
1352
1350
  }
1353
1351
  }
1354
1352
  function N(e) {
1355
- const { height: t, width: n } = Qe(e), o = new Array(t).fill(!1).map(() => new Array(n).fill(null)), r = (s, a) => {
1353
+ const { height: t, width: n } = Je(e), o = new Array(t).fill(!1).map(() => new Array(n).fill(null)), r = (s, a) => {
1356
1354
  for (let i = s; i < t; i++)
1357
1355
  for (let c = a; c < n; c++)
1358
1356
  if (!o[i][c])
@@ -1363,7 +1361,7 @@ function N(e) {
1363
1361
  };
1364
1362
  for (let s = 0; s < e.content.rows.length; s++)
1365
1363
  for (let a = 0; a < e.content.rows[s].cells.length; a++) {
1366
- const i = se(e.content.rows[s].cells[a]), c = ae(i), l = $(i), { row: d, col: u } = r(s, a);
1364
+ const i = re(e.content.rows[s].cells[a]), c = se(i), l = $(i), { row: d, col: u } = r(s, a);
1367
1365
  for (let p = d; p < d + c; p++)
1368
1366
  for (let f = u; f < u + l; f++) {
1369
1367
  if (o[p][f])
@@ -1381,13 +1379,13 @@ function N(e) {
1381
1379
  }
1382
1380
  return o;
1383
1381
  }
1384
- function q(e) {
1382
+ function z(e) {
1385
1383
  const t = /* @__PURE__ */ new Set();
1386
1384
  return e.map((n) => ({
1387
1385
  cells: n.map((o) => t.has(o.row + ":" + o.col) ? !1 : (t.add(o.row + ":" + o.col), o.cell)).filter((o) => o !== !1)
1388
1386
  }));
1389
1387
  }
1390
- function H(e, t, n = N(t)) {
1388
+ function O(e, t, n = N(t)) {
1391
1389
  for (let o = 0; o < n.length; o++)
1392
1390
  for (let r = 0; r < n[o].length; r++) {
1393
1391
  const s = n[o][r];
@@ -1398,7 +1396,7 @@ function H(e, t, n = N(t)) {
1398
1396
  `Unable to resolve relative table cell indices for table, cell at ${e.row},${e.col} is not occupied`
1399
1397
  );
1400
1398
  }
1401
- function Qe(e) {
1399
+ function Je(e) {
1402
1400
  const t = e.content.rows.length;
1403
1401
  let n = 0;
1404
1402
  return e.content.rows.forEach((o) => {
@@ -1408,7 +1406,7 @@ function Qe(e) {
1408
1406
  }), n = Math.max(n, r);
1409
1407
  }), { height: t, width: n };
1410
1408
  }
1411
- function Ye(e, t, n = N(t)) {
1409
+ function Ke(e, t, n = N(t)) {
1412
1410
  var r;
1413
1411
  const o = (r = n[e.row]) == null ? void 0 : r[e.col];
1414
1412
  if (o)
@@ -1418,7 +1416,7 @@ function Ye(e, t, n = N(t)) {
1418
1416
  cell: o.cell
1419
1417
  };
1420
1418
  }
1421
- function sn(e, t) {
1419
+ function en(e, t) {
1422
1420
  var s;
1423
1421
  const n = N(e);
1424
1422
  if (t < 0 || t >= n.length)
@@ -1430,7 +1428,7 @@ function sn(e, t) {
1430
1428
  return [];
1431
1429
  o += i.rowspan;
1432
1430
  }
1433
- const r = new Array(n[0].length).fill(!1).map((a, i) => Ye(
1431
+ const r = new Array(n[0].length).fill(!1).map((a, i) => Ke(
1434
1432
  { row: o, col: i },
1435
1433
  e,
1436
1434
  n
@@ -1439,7 +1437,7 @@ function sn(e, t) {
1439
1437
  );
1440
1438
  return r.filter((a, i) => r.findIndex((c) => c.row === a.row && c.col === a.col) === i);
1441
1439
  }
1442
- function an(e, t) {
1440
+ function tn(e, t) {
1443
1441
  var s;
1444
1442
  const n = N(e);
1445
1443
  if (t < 0 || t >= n[0].length)
@@ -1451,7 +1449,7 @@ function an(e, t) {
1451
1449
  return [];
1452
1450
  o += i.colspan;
1453
1451
  }
1454
- const r = new Array(n.length).fill(!1).map((a, i) => Ye(
1452
+ const r = new Array(n.length).fill(!1).map((a, i) => Ke(
1455
1453
  { row: i, col: o },
1456
1454
  e,
1457
1455
  n
@@ -1460,15 +1458,15 @@ function an(e, t) {
1460
1458
  );
1461
1459
  return r.filter((a, i) => r.findIndex((c) => c.row === a.row && c.col === a.col) === i);
1462
1460
  }
1463
- function qo(e, t, n, o = N(e)) {
1464
- const { col: r } = H(
1461
+ function Vo(e, t, n, o = N(e)) {
1462
+ const { col: r } = O(
1465
1463
  {
1466
1464
  row: 0,
1467
1465
  col: t
1468
1466
  },
1469
1467
  e,
1470
1468
  o
1471
- ), { col: s } = H(
1469
+ ), { col: s } = O(
1472
1470
  {
1473
1471
  row: 0,
1474
1472
  col: n
@@ -1479,17 +1477,17 @@ function qo(e, t, n, o = N(e)) {
1479
1477
  return o.forEach((a) => {
1480
1478
  const [i] = a.splice(r, 1);
1481
1479
  a.splice(s, 0, i);
1482
- }), q(o);
1480
+ }), z(o);
1483
1481
  }
1484
- function Zo(e, t, n, o = N(e)) {
1485
- const { row: r } = H(
1482
+ function Wo(e, t, n, o = N(e)) {
1483
+ const { row: r } = O(
1486
1484
  {
1487
1485
  row: t,
1488
1486
  col: 0
1489
1487
  },
1490
1488
  e,
1491
1489
  o
1492
- ), { row: s } = H(
1490
+ ), { row: s } = O(
1493
1491
  {
1494
1492
  row: n,
1495
1493
  col: 0
@@ -1497,18 +1495,18 @@ function Zo(e, t, n, o = N(e)) {
1497
1495
  e,
1498
1496
  o
1499
1497
  ), [a] = o.splice(r, 1);
1500
- return o.splice(s, 0, a), q(o);
1498
+ return o.splice(s, 0, a), z(o);
1501
1499
  }
1502
- function ce(e) {
1503
- return e ? j(e) ? ce(e.content) : typeof e == "string" ? e.length === 0 : Array.isArray(e) ? e.every(
1504
- (t) => typeof t == "string" ? t.length === 0 : I(t) ? t.text.length === 0 : qe(t) ? typeof t.content == "string" ? t.content.length === 0 : t.content.every((n) => n.text.length === 0) : !1
1500
+ function ie(e) {
1501
+ return e ? j(e) ? ie(e.content) : typeof e == "string" ? e.length === 0 : Array.isArray(e) ? e.every(
1502
+ (t) => typeof t == "string" ? t.length === 0 : I(t) ? t.text.length === 0 : Ue(t) ? typeof t.content == "string" ? t.content.length === 0 : t.content.every((n) => n.text.length === 0) : !1
1505
1503
  ) : !1 : !0;
1506
1504
  }
1507
- function Go(e, t, n = N(e)) {
1505
+ function Fo(e, t, n = N(e)) {
1508
1506
  if (t === "columns") {
1509
1507
  let s = 0;
1510
1508
  for (let a = n[0].length - 1; a >= 0 && n.every(
1511
- (c) => ce(c[a].cell) && c[a].colspan === 1
1509
+ (c) => ie(c[a].cell) && c[a].colspan === 1
1512
1510
  ); a--)
1513
1511
  s++;
1514
1512
  for (let a = n.length - 1; a >= 0; a--) {
@@ -1518,18 +1516,18 @@ function Go(e, t, n = N(e)) {
1518
1516
  );
1519
1517
  n[a] = n[a].slice(0, i);
1520
1518
  }
1521
- return q(n);
1519
+ return z(n);
1522
1520
  }
1523
1521
  let o = 0;
1524
1522
  for (let s = n.length - 1; s >= 0 && n[s].every(
1525
- (i) => ce(i.cell) && i.rowspan === 1
1523
+ (i) => ie(i.cell) && i.rowspan === 1
1526
1524
  ); s--)
1527
1525
  o++;
1528
1526
  const r = Math.min(o, n.length - 1);
1529
- return n.splice(n.length - r, r), q(n);
1527
+ return n.splice(n.length - r, r), z(n);
1530
1528
  }
1531
- function Xo(e, t, n, o = N(e)) {
1532
- const { width: r, height: s } = Qe(e);
1529
+ function jo(e, t, n, o = N(e)) {
1530
+ const { width: r, height: s } = Je(e);
1533
1531
  if (t === "columns")
1534
1532
  o.forEach((a, i) => {
1535
1533
  if (n >= 0)
@@ -1539,7 +1537,7 @@ function Xo(e, t, n, o = N(e)) {
1539
1537
  col: Math.max(...a.map((l) => l.col)) + 1,
1540
1538
  rowspan: 1,
1541
1539
  colspan: 1,
1542
- cell: se("")
1540
+ cell: re("")
1543
1541
  });
1544
1542
  else
1545
1543
  a.splice(r + n, -1 * n);
@@ -1551,25 +1549,25 @@ function Xo(e, t, n, o = N(e)) {
1551
1549
  col: l,
1552
1550
  rowspan: 1,
1553
1551
  colspan: 1,
1554
- cell: se("")
1552
+ cell: re("")
1555
1553
  }));
1556
1554
  o.push(i);
1557
1555
  }
1558
1556
  else n < 0 && o.splice(s + n, -1 * n);
1559
- return q(o);
1557
+ return z(o);
1560
1558
  }
1561
- function Jo(e, t, n) {
1562
- const o = sn(e, n);
1563
- if (!o.some((c) => ae(c.cell) > 1))
1559
+ function $o(e, t, n) {
1560
+ const o = en(e, n);
1561
+ if (!o.some((c) => se(c.cell) > 1))
1564
1562
  return !0;
1565
1563
  let s = n, a = n;
1566
1564
  return o.forEach((c) => {
1567
- const l = ae(c.cell);
1565
+ const l = se(c.cell);
1568
1566
  s = Math.max(s, c.row + l - 1), a = Math.min(a, c.row);
1569
1567
  }), t < n ? n === s : n === a;
1570
1568
  }
1571
- function Ko(e, t, n) {
1572
- const o = an(e, n);
1569
+ function Uo(e, t, n) {
1570
+ const o = tn(e, n);
1573
1571
  if (!o.some((c) => $(c.cell) > 1))
1574
1572
  return !0;
1575
1573
  let s = n, a = n;
@@ -1578,11 +1576,11 @@ function Ko(e, t, n) {
1578
1576
  s = Math.max(s, c.col + l - 1), a = Math.min(a, c.col);
1579
1577
  }), t < n ? n === s : n === a;
1580
1578
  }
1581
- function Qo(e, t, n) {
1582
- const o = H(e, n), r = H(t, n);
1579
+ function qo(e, t, n) {
1580
+ const o = O(e, n), r = O(t, n);
1583
1581
  return o.col === r.col;
1584
1582
  }
1585
- function Ie(e, t, n, o) {
1583
+ function Ne(e, t, n, o) {
1586
1584
  const r = [];
1587
1585
  for (const [a, i] of Object.entries(e.styles || {})) {
1588
1586
  const c = n[a];
@@ -1598,11 +1596,11 @@ function Ie(e, t, n, o) {
1598
1596
  return !o || !t.nodes[o].spec.code ? e.text.split(/(\n)/g).filter((a) => a.length > 0).map((a) => a === `
1599
1597
  ` ? t.nodes.hardBreak.createChecked() : t.text(a, r)) : e.text.length > 0 ? [t.text(e.text, r)] : [];
1600
1598
  }
1601
- function cn(e, t, n) {
1599
+ function nn(e, t, n) {
1602
1600
  const o = t.marks.link.create({
1603
1601
  href: e.href
1604
1602
  });
1605
- return le(e.content, t, n).map(
1603
+ return ce(e.content, t, n).map(
1606
1604
  (r) => {
1607
1605
  if (r.type.name === "text")
1608
1606
  return r.mark([...r.marks, o]);
@@ -1612,11 +1610,11 @@ function cn(e, t, n) {
1612
1610
  }
1613
1611
  );
1614
1612
  }
1615
- function le(e, t, n, o) {
1613
+ function ce(e, t, n, o) {
1616
1614
  const r = [];
1617
1615
  if (typeof e == "string")
1618
1616
  return r.push(
1619
- ...Ie(
1617
+ ...Ne(
1620
1618
  { text: e, styles: {} },
1621
1619
  t,
1622
1620
  n,
@@ -1625,30 +1623,30 @@ function le(e, t, n, o) {
1625
1623
  ), r;
1626
1624
  for (const s of e)
1627
1625
  r.push(
1628
- ...Ie(s, t, n, o)
1626
+ ...Ne(s, t, n, o)
1629
1627
  );
1630
1628
  return r;
1631
1629
  }
1632
- function O(e, t, n, o = R(t)) {
1630
+ function P(e, t, n, o = R(t)) {
1633
1631
  const r = [];
1634
1632
  for (const s of e)
1635
1633
  typeof s == "string" ? r.push(
1636
- ...le(s, t, o, n)
1637
- ) : qe(s) ? r.push(...cn(s, t, o)) : I(s) ? r.push(
1638
- ...le([s], t, o, n)
1634
+ ...ce(s, t, o, n)
1635
+ ) : Ue(s) ? r.push(...nn(s, t, o)) : I(s) ? r.push(
1636
+ ...ce([s], t, o, n)
1639
1637
  ) : r.push(
1640
- tt(s, t, o)
1638
+ Ye(s, t, o)
1641
1639
  );
1642
1640
  return r;
1643
1641
  }
1644
- function et(e, t, n = R(t)) {
1642
+ function Qe(e, t, n = R(t)) {
1645
1643
  const o = [], r = new Array(e.headerRows ?? 0).fill(!0), s = new Array(e.headerCols ?? 0).fill(!0), a = e.columnWidths ?? [];
1646
1644
  for (let i = 0; i < e.rows.length; i++) {
1647
1645
  const c = e.rows[i], l = [], d = r[i];
1648
1646
  for (let p = 0; p < c.cells.length; p++) {
1649
1647
  const f = c.cells[p], h = s[p], C = void 0;
1650
1648
  let m = null;
1651
- const b = H(
1649
+ const b = O(
1652
1650
  {
1653
1651
  row: i,
1654
1652
  col: p
@@ -1659,7 +1657,7 @@ function et(e, t, n = R(t)) {
1659
1657
  if (f) if (typeof f == "string")
1660
1658
  m = t.text(f);
1661
1659
  else if (j(f)) {
1662
- f.content && (m = O(
1660
+ f.content && (m = P(
1663
1661
  f.content,
1664
1662
  t,
1665
1663
  "tableParagraph",
@@ -1668,7 +1666,7 @@ function et(e, t, n = R(t)) {
1668
1666
  const w = $(f);
1669
1667
  w > 1 && (y = new Array(w).fill(!1).map((S, oe) => a[b.col + oe] ?? void 0));
1670
1668
  } else
1671
- m = O(
1669
+ m = P(
1672
1670
  f,
1673
1671
  t,
1674
1672
  "tableParagraph",
@@ -1688,14 +1686,14 @@ function et(e, t, n = R(t)) {
1688
1686
  }
1689
1687
  return o;
1690
1688
  }
1691
- function tt(e, t, n) {
1689
+ function Ye(e, t, n) {
1692
1690
  let o, r = e.type;
1693
1691
  if (r === void 0 && (r = "paragraph"), !t.nodes[r])
1694
1692
  throw new Error(`node type ${r} not found in schema`);
1695
1693
  if (!e.content)
1696
1694
  o = t.nodes[r].createChecked(e.props);
1697
1695
  else if (typeof e.content == "string") {
1698
- const s = O(
1696
+ const s = P(
1699
1697
  [e.content],
1700
1698
  t,
1701
1699
  r,
@@ -1703,7 +1701,7 @@ function tt(e, t, n) {
1703
1701
  );
1704
1702
  o = t.nodes[r].createChecked(e.props, s);
1705
1703
  } else if (Array.isArray(e.content)) {
1706
- const s = O(
1704
+ const s = P(
1707
1705
  e.content,
1708
1706
  t,
1709
1707
  r,
@@ -1711,7 +1709,7 @@ function tt(e, t, n) {
1711
1709
  );
1712
1710
  o = t.nodes[r].createChecked(e.props, s);
1713
1711
  } else if (e.content.type === "tableContent") {
1714
- const s = et(e.content, t, n);
1712
+ const s = Qe(e.content, t, n);
1715
1713
  o = t.nodes[r].createChecked(e.props, s);
1716
1714
  } else
1717
1715
  throw new Z(e.content.type);
@@ -1719,14 +1717,14 @@ function tt(e, t, n) {
1719
1717
  }
1720
1718
  function Y(e, t, n = R(t)) {
1721
1719
  let o = e.id;
1722
- o === void 0 && (o = ze.options.generateID());
1720
+ o === void 0 && (o = $e.options.generateID());
1723
1721
  const r = [];
1724
1722
  if (e.children)
1725
1723
  for (const a of e.children)
1726
1724
  r.push(Y(a, t, n));
1727
1725
  if (!e.type || // can happen if block.type is not defined (this should create the default node)
1728
1726
  t.nodes[e.type].isInGroup("blockContent")) {
1729
- const a = tt(
1727
+ const a = Ye(
1730
1728
  e,
1731
1729
  t,
1732
1730
  n
@@ -1752,32 +1750,32 @@ function Y(e, t, n = R(t)) {
1752
1750
  );
1753
1751
  }
1754
1752
  }
1755
- function ln(e, t) {
1753
+ function on(e, t) {
1756
1754
  let n, o;
1757
- if (t.firstChild.descendants((r, s) => n ? !1 : !un(r) || r.attrs.id !== e ? !0 : (n = r, o = s + 1, !1)), !(n === void 0 || o === void 0))
1755
+ if (t.firstChild.descendants((r, s) => n ? !1 : !rn(r) || r.attrs.id !== e ? !0 : (n = r, o = s + 1, !1)), !(n === void 0 || o === void 0))
1758
1756
  return {
1759
1757
  node: n,
1760
1758
  posBeforeNode: o
1761
1759
  };
1762
1760
  }
1763
- function un(e) {
1761
+ function rn(e) {
1764
1762
  return e.type.isInGroup("bnBlock");
1765
1763
  }
1766
- const Yo = (e, t) => ({
1764
+ const zo = (e, t) => ({
1767
1765
  tr: n,
1768
1766
  dispatch: o
1769
- }) => (o && ye(n, e, t), !0);
1770
- function ye(e, t, n, o, r) {
1771
- const s = qt(e.doc.resolve(t));
1767
+ }) => (o && ke(n, e, t), !0);
1768
+ function ke(e, t, n, o, r) {
1769
+ const s = Ft(e.doc.resolve(t));
1772
1770
  let a = null;
1773
- s.blockNoteType === "table" && (a = pn(e));
1771
+ s.blockNoteType === "table" && (a = an(e));
1774
1772
  const i = G(e);
1775
1773
  if (o !== void 0 && r !== void 0 && o > r)
1776
1774
  throw new Error("Invalid replaceFromPos or replaceToPos");
1777
1775
  const c = i.nodes[s.blockNoteType], l = i.nodes[n.type || s.blockNoteType], d = l.isInGroup("bnBlock") ? l : i.nodes.blockContainer;
1778
1776
  if (s.isBlockContainer && l.isInGroup("blockContent")) {
1779
1777
  const u = o !== void 0 && o > s.blockContent.beforePos && o < s.blockContent.afterPos ? o - s.blockContent.beforePos - 1 : void 0, p = r !== void 0 && r > s.blockContent.beforePos && r < s.blockContent.afterPos ? r - s.blockContent.beforePos - 1 : void 0;
1780
- He(n, e, s), dn(
1778
+ Ie(n, e, s), sn(
1781
1779
  n,
1782
1780
  e,
1783
1781
  c,
@@ -1787,7 +1785,7 @@ function ye(e, t, n, o, r) {
1787
1785
  p
1788
1786
  );
1789
1787
  } else if (!s.isBlockContainer && l.isInGroup("bnBlock"))
1790
- He(n, e, s);
1788
+ Ie(n, e, s);
1791
1789
  else {
1792
1790
  const u = X(s.bnBlock.node, i);
1793
1791
  e.replaceWith(
@@ -1807,22 +1805,22 @@ function ye(e, t, n, o, r) {
1807
1805
  e.setNodeMarkup(s.bnBlock.beforePos, d, {
1808
1806
  ...s.bnBlock.node.attrs,
1809
1807
  ...n.props
1810
- }), a && fn(e, s, a);
1808
+ }), a && cn(e, s, a);
1811
1809
  }
1812
- function dn(e, t, n, o, r, s, a) {
1810
+ function sn(e, t, n, o, r, s, a) {
1813
1811
  const i = G(t);
1814
1812
  let c = "keep";
1815
1813
  if (e.content)
1816
1814
  if (typeof e.content == "string")
1817
- c = O(
1815
+ c = P(
1818
1816
  [e.content],
1819
1817
  i,
1820
1818
  o.name
1821
1819
  );
1822
1820
  else if (Array.isArray(e.content))
1823
- c = O(e.content, i, o.name);
1821
+ c = P(e.content, i, o.name);
1824
1822
  else if (e.content.type === "tableContent")
1825
- c = et(e.content, i);
1823
+ c = Qe(e.content, i);
1826
1824
  else
1827
1825
  throw new Z(e.content.type);
1828
1826
  else
@@ -1841,7 +1839,7 @@ function dn(e, t, n, o, r, s, a) {
1841
1839
  t.replace(
1842
1840
  l,
1843
1841
  d,
1844
- new de(
1842
+ new ue(
1845
1843
  _.from(c),
1846
1844
  p - u - 1,
1847
1845
  f - u - 1
@@ -1860,16 +1858,16 @@ function dn(e, t, n, o, r, s, a) {
1860
1858
  )
1861
1859
  );
1862
1860
  }
1863
- function He(e, t, n) {
1861
+ function Ie(e, t, n) {
1864
1862
  const o = G(t);
1865
1863
  if (e.children !== void 0 && e.children.length > 0) {
1866
1864
  const r = e.children.map((s) => Y(s, o));
1867
1865
  if (n.childContainer)
1868
1866
  t.step(
1869
- new Ht(
1867
+ new Lt(
1870
1868
  n.childContainer.beforePos + 1,
1871
1869
  n.childContainer.afterPos - 1,
1872
- new de(_.from(r), 0, 0)
1870
+ new ue(_.from(r), 0, 0)
1873
1871
  )
1874
1872
  );
1875
1873
  else {
@@ -1882,11 +1880,11 @@ function He(e, t, n) {
1882
1880
  }
1883
1881
  }
1884
1882
  }
1885
- function er(e, t, n, o, r) {
1886
- const s = typeof t == "string" ? t : t.id, a = ln(s, e.doc);
1883
+ function Zo(e, t, n, o, r) {
1884
+ const s = typeof t == "string" ? t : t.id, a = on(s, e.doc);
1887
1885
  if (!a)
1888
1886
  throw new Error(`Block with ID ${s} not found`);
1889
- ye(
1887
+ ke(
1890
1888
  e,
1891
1889
  a.posBeforeNode,
1892
1890
  n,
@@ -1896,9 +1894,9 @@ function er(e, t, n, o, r) {
1896
1894
  const i = e.doc.resolve(a.posBeforeNode + 1).node(), c = G(e);
1897
1895
  return X(i, c);
1898
1896
  }
1899
- function pn(e) {
1897
+ function an(e) {
1900
1898
  const t = "selection" in e ? e.selection : null;
1901
- if (!(t instanceof Ue))
1899
+ if (!(t instanceof je))
1902
1900
  return null;
1903
1901
  const n = e.doc.resolve(t.head);
1904
1902
  let o = -1, r = -1;
@@ -1914,13 +1912,13 @@ function pn(e) {
1914
1912
  const s = n.before(o), a = n.before(r), i = e.doc.nodeAt(a);
1915
1913
  if (!i || i.type.name !== "table")
1916
1914
  return null;
1917
- const c = We.get(i), l = s - (a + 1), d = c.map.indexOf(l);
1915
+ const c = Re.get(i), l = s - (a + 1), d = c.map.indexOf(l);
1918
1916
  if (d < 0)
1919
1917
  return null;
1920
1918
  const u = Math.floor(d / c.width), p = d % c.width, h = s + 1 + 1, C = Math.max(0, t.head - h);
1921
1919
  return { row: u, col: p, offset: C };
1922
1920
  }
1923
- function fn(e, t, n) {
1921
+ function cn(e, t, n) {
1924
1922
  var m;
1925
1923
  if (t.blockNoteType !== "table")
1926
1924
  return !1;
@@ -1934,11 +1932,11 @@ function fn(e, t, n) {
1934
1932
  const r = o >= 0 ? e.doc.nodeAt(o) : null;
1935
1933
  if (!r || r.type.name !== "table")
1936
1934
  return !1;
1937
- const s = We.get(r), a = Math.max(0, Math.min(n.row, s.height - 1)), i = Math.max(0, Math.min(n.col, s.width - 1)), c = a * s.width + i, l = s.map[c];
1935
+ const s = Re.get(r), a = Math.max(0, Math.min(n.row, s.height - 1)), i = Math.max(0, Math.min(n.col, s.width - 1)), c = a * s.width + i, l = s.map[c];
1938
1936
  if (l == null)
1939
1937
  return !1;
1940
1938
  const u = o + 1 + l + 1, p = e.doc.nodeAt(u), f = u + 1, h = p ? p.content.size : 0, C = f + Math.max(0, Math.min(n.offset, h));
1941
- return "selection" in e && e.setSelection(Ue.create(e.doc, C)), !0;
1939
+ return "selection" in e && e.setSelection(je.create(e.doc, C)), !0;
1942
1940
  }
1943
1941
  const A = {
1944
1942
  gray: {
@@ -1977,7 +1975,7 @@ const A = {
1977
1975
  text: "#ad1a72",
1978
1976
  background: "#f4dfeb"
1979
1977
  }
1980
- }, tr = {
1978
+ }, Go = {
1981
1979
  gray: {
1982
1980
  text: "#bebdb8",
1983
1981
  background: "#9b9a97"
@@ -2030,21 +2028,21 @@ const A = {
2030
2028
  return e.hasAttribute("data-background-color") ? t.backgroundColor = e.getAttribute("data-background-color") : e.style.backgroundColor && (t.backgroundColor = e.style.backgroundColor), e.hasAttribute("data-text-color") ? t.textColor = e.getAttribute("data-text-color") : e.style.color && (t.textColor = e.style.color), t.textAlignment = k.textAlignment.values.includes(
2031
2029
  e.style.textAlign
2032
2030
  ) ? e.style.textAlign : void 0, t;
2033
- }, P = (e, t) => {
2031
+ }, H = (e, t) => {
2034
2032
  e.backgroundColor && e.backgroundColor !== k.backgroundColor.default && (t.style.backgroundColor = e.backgroundColor in A ? A[e.backgroundColor].background : e.backgroundColor), e.textColor && e.textColor !== k.textColor.default && (t.style.color = e.textColor in A ? A[e.textColor].text : e.textColor), e.textAlignment && e.textAlignment !== k.textAlignment.default && (t.style.textAlign = e.textAlignment);
2035
- }, nr = (e = "backgroundColor") => ({
2033
+ }, Xo = (e = "backgroundColor") => ({
2036
2034
  default: k.backgroundColor.default,
2037
2035
  parseHTML: (t) => t.hasAttribute("data-background-color") ? t.getAttribute("data-background-color") : t.style.backgroundColor ? t.style.backgroundColor : k.backgroundColor.default,
2038
2036
  renderHTML: (t) => t[e] === k.backgroundColor.default ? {} : {
2039
2037
  "data-background-color": t[e]
2040
2038
  }
2041
- }), or = (e = "textColor") => ({
2039
+ }), Jo = (e = "textColor") => ({
2042
2040
  default: k.textColor.default,
2043
2041
  parseHTML: (t) => t.hasAttribute("data-text-color") ? t.getAttribute("data-text-color") : t.style.color ? t.style.color : k.textColor.default,
2044
2042
  renderHTML: (t) => t[e] === k.textColor.default ? {} : {
2045
2043
  "data-text-color": t[e]
2046
2044
  }
2047
- }), rr = (e = "textAlignment") => ({
2045
+ }), Ko = (e = "textAlignment") => ({
2048
2046
  default: k.textAlignment.default,
2049
2047
  parseHTML: (t) => t.hasAttribute("data-text-alignment") ? t.getAttribute("data-text-alignment") : t.style.textAlign ? t.style.textAlign : k.textAlignment.default,
2050
2048
  renderHTML: (t) => t[e] === k.textAlignment.default ? {} : {
@@ -2058,7 +2056,7 @@ const A = {
2058
2056
  return;
2059
2057
  const o = e.querySelector("figcaption"), r = (o == null ? void 0 : o.textContent) ?? void 0;
2060
2058
  return { targetElement: n, caption: r };
2061
- }, hn = (e, t, n) => {
2059
+ }, ln = (e, t, n) => {
2062
2060
  const o = document.createElement("div");
2063
2061
  o.className = "bn-add-file-button";
2064
2062
  const r = document.createElement("div");
@@ -2092,19 +2090,19 @@ const A = {
2092
2090
  );
2093
2091
  }
2094
2092
  };
2095
- }, mn = '<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>', gn = (e) => {
2093
+ }, un = '<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>', dn = (e) => {
2096
2094
  const t = document.createElement("div");
2097
2095
  t.className = "bn-file-name-with-icon";
2098
2096
  const n = document.createElement("div");
2099
- n.className = "bn-file-icon", n.innerHTML = mn, t.appendChild(n);
2097
+ n.className = "bn-file-icon", n.innerHTML = un, t.appendChild(n);
2100
2098
  const o = document.createElement("p");
2101
2099
  return o.className = "bn-file-name", o.textContent = e.props.name, t.appendChild(o), {
2102
2100
  dom: t
2103
2101
  };
2104
- }, we = (e, t, n, o) => {
2102
+ }, ye = (e, t, n, o) => {
2105
2103
  const r = document.createElement("div");
2106
2104
  if (r.className = "bn-file-block-content-wrapper", e.props.url === "") {
2107
- const a = hn(e, t, o);
2105
+ const a = ln(e, t, o);
2108
2106
  r.appendChild(a.dom);
2109
2107
  const i = t.onUploadStart((c) => {
2110
2108
  if (c === e.id) {
@@ -2122,7 +2120,7 @@ const A = {
2122
2120
  }
2123
2121
  const s = { dom: r };
2124
2122
  if (e.props.showPreview === !1 || !n) {
2125
- const a = gn(e);
2123
+ const a = dn(e);
2126
2124
  r.appendChild(a.dom), s.destroy = () => {
2127
2125
  var i;
2128
2126
  (i = a.destroy) == null || i.call(a);
@@ -2134,7 +2132,7 @@ const A = {
2134
2132
  a.className = "bn-file-caption", a.textContent = e.props.caption, r.appendChild(a);
2135
2133
  }
2136
2134
  return s;
2137
- }, ve = (e, t) => {
2135
+ }, we = (e, t) => {
2138
2136
  const n = document.createElement("figure"), o = document.createElement("figcaption");
2139
2137
  return o.textContent = t, n.appendChild(e), n.appendChild(o), { dom: n };
2140
2138
  }, te = (e, t) => {
@@ -2142,7 +2140,7 @@ const A = {
2142
2140
  return o.textContent = t, n.appendChild(e), n.appendChild(o), {
2143
2141
  dom: n
2144
2142
  };
2145
- }, Pe = (e) => ({ url: e.src || void 0 }), bn = '<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>', Cn = (e) => ({
2143
+ }, Oe = (e) => ({ url: e.src || void 0 }), pn = '<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>', fn = (e) => ({
2146
2144
  type: "audio",
2147
2145
  propSchema: {
2148
2146
  backgroundColor: k.backgroundColor,
@@ -2163,13 +2161,13 @@ const A = {
2163
2161
  }
2164
2162
  },
2165
2163
  content: "none"
2166
- }), kn = (e = {}) => (t) => {
2164
+ }), hn = (e = {}) => (t) => {
2167
2165
  if (t.tagName === "AUDIO") {
2168
2166
  if (t.closest("figure"))
2169
2167
  return;
2170
2168
  const { backgroundColor: n } = B(t);
2171
2169
  return {
2172
- ...Pe(t),
2170
+ ...Oe(t),
2173
2171
  backgroundColor: n
2174
2172
  };
2175
2173
  }
@@ -2179,24 +2177,24 @@ const A = {
2179
2177
  return;
2180
2178
  const { targetElement: o, caption: r } = n, { backgroundColor: s } = B(t);
2181
2179
  return {
2182
- ...Pe(o),
2180
+ ...Oe(o),
2183
2181
  backgroundColor: s,
2184
2182
  caption: r
2185
2183
  };
2186
2184
  }
2187
- }, yn = (e = {}) => (t, n) => {
2185
+ }, mn = (e = {}) => (t, n) => {
2188
2186
  const o = document.createElement("div");
2189
- o.innerHTML = e.icon ?? bn;
2187
+ o.innerHTML = e.icon ?? pn;
2190
2188
  const r = document.createElement("audio");
2191
2189
  return r.className = "bn-audio", n.resolveFileUrl ? n.resolveFileUrl(t.props.url).then((s) => {
2192
2190
  r.src = s;
2193
- }) : r.src = t.props.url, r.controls = !0, r.contentEditable = "false", r.draggable = !1, we(
2191
+ }) : r.src = t.props.url, r.controls = !0, r.contentEditable = "false", r.draggable = !1, ye(
2194
2192
  t,
2195
2193
  n,
2196
2194
  { dom: r },
2197
2195
  o.firstElementChild
2198
2196
  );
2199
- }, wn = (e = {}) => (t, n) => {
2197
+ }, gn = (e = {}) => (t, n) => {
2200
2198
  if (!t.props.url) {
2201
2199
  const r = document.createElement("p");
2202
2200
  return r.textContent = "Add audio", {
@@ -2204,22 +2202,22 @@ const A = {
2204
2202
  };
2205
2203
  }
2206
2204
  let o;
2207
- return t.props.showPreview ? (o = document.createElement("audio"), o.src = t.props.url) : (o = document.createElement("a"), o.href = t.props.url, o.textContent = t.props.name || t.props.url), t.props.caption ? t.props.showPreview ? ve(o, t.props.caption) : te(o, t.props.caption) : {
2205
+ return t.props.showPreview ? (o = document.createElement("audio"), o.src = t.props.url) : (o = document.createElement("a"), o.href = t.props.url, o.textContent = t.props.name || t.props.url), t.props.caption ? t.props.showPreview ? we(o, t.props.caption) : te(o, t.props.caption) : {
2208
2206
  dom: o
2209
2207
  };
2210
- }, vn = M(
2211
- Cn,
2208
+ }, bn = M(
2209
+ fn,
2212
2210
  (e) => ({
2213
2211
  meta: {
2214
2212
  fileBlockAccept: ["audio/*"]
2215
2213
  },
2216
- parse: kn(e),
2217
- render: yn(e),
2218
- toExternalHTML: wn(e),
2214
+ parse: hn(e),
2215
+ render: mn(e),
2216
+ toExternalHTML: gn(e),
2219
2217
  runsBefore: ["file"]
2220
2218
  })
2221
2219
  );
2222
- class En {
2220
+ class Cn {
2223
2221
  constructor() {
2224
2222
  // eslint-disable-next-line @typescript-eslint/ban-types
2225
2223
  x(this, "callbacks", {});
@@ -2239,7 +2237,7 @@ class En {
2239
2237
  this.callbacks = {};
2240
2238
  }
2241
2239
  }
2242
- class xn extends En {
2240
+ class kn extends Cn {
2243
2241
  // eslint-disable-next-line
2244
2242
  constructor(...n) {
2245
2243
  super();
@@ -2282,36 +2280,11 @@ class xn extends En {
2282
2280
  get priority() {
2283
2281
  }
2284
2282
  }
2285
- function L(e) {
2286
- const t = Object.create(xn.prototype);
2283
+ function T(e) {
2284
+ const t = Object.create(kn.prototype);
2287
2285
  return t.key = e.key, t.inputRules = e.inputRules, t.keyboardShortcuts = e.keyboardShortcuts, t.plugins = e.plugins ?? [], t.tiptapExtensions = e.tiptapExtensions, t;
2288
2286
  }
2289
- const Oe = Symbol.for("blocknote.shikiParser"), re = Symbol.for(
2290
- "blocknote.shikiHighlighterPromise"
2291
- );
2292
- function Sn(e) {
2293
- const t = globalThis;
2294
- let n, o, r = !1;
2295
- return Nt({
2296
- parser: (a) => {
2297
- if (!e.createHighlighter)
2298
- return process.env.NODE_ENV === "development" && !r && (console.log(
2299
- "For syntax highlighting of code blocks, you must provide a `createCodeBlockSpec({ createHighlighter: () => ... })` function"
2300
- ), r = !0), [];
2301
- if (!n)
2302
- return t[re] = t[re] || e.createHighlighter(), t[re].then(
2303
- (c) => {
2304
- n = c;
2305
- }
2306
- );
2307
- const i = nt(e, a.language);
2308
- return !i || i === "text" || i === "none" || i === "plaintext" || i === "txt" ? [] : n.getLoadedLanguages().includes(i) ? (o || (o = t[Oe] || It(n), t[Oe] = o), o(a)) : n.loadLanguage(i);
2309
- },
2310
- languageExtractor: (a) => a.attrs.language,
2311
- nodeTypes: ["codeBlock"]
2312
- });
2313
- }
2314
- const Bn = ({ defaultLanguage: e = "text" }) => ({
2287
+ const yn = ({ defaultLanguage: e = "text" }) => ({
2315
2288
  type: "codeBlock",
2316
2289
  propSchema: {
2317
2290
  language: {
@@ -2319,8 +2292,8 @@ const Bn = ({ defaultLanguage: e = "text" }) => ({
2319
2292
  }
2320
2293
  },
2321
2294
  content: "inline"
2322
- }), Mn = M(
2323
- Bn,
2295
+ }), wn = M(
2296
+ yn,
2324
2297
  (e) => ({
2325
2298
  meta: {
2326
2299
  code: !0,
@@ -2375,11 +2348,7 @@ const Bn = ({ defaultLanguage: e = "text" }) => ({
2375
2348
  }
2376
2349
  }),
2377
2350
  (e) => [
2378
- L({
2379
- key: "code-block-highlighter",
2380
- plugins: [Sn(e)]
2381
- }),
2382
- L({
2351
+ T({
2383
2352
  key: "code-block-keyboard-shortcuts",
2384
2353
  keyboardShortcuts: {
2385
2354
  Delete: ({ editor: t }) => t.transact((n) => {
@@ -2435,7 +2404,7 @@ const Bn = ({ defaultLanguage: e = "text" }) => ({
2435
2404
  type: "codeBlock",
2436
2405
  props: {
2437
2406
  language: {
2438
- language: nt(e, n) ?? n
2407
+ language: vn(e, n) ?? n
2439
2408
  }.language
2440
2409
  },
2441
2410
  content: []
@@ -2446,13 +2415,13 @@ const Bn = ({ defaultLanguage: e = "text" }) => ({
2446
2415
  })
2447
2416
  ]
2448
2417
  );
2449
- function nt(e, t) {
2418
+ function vn(e, t) {
2450
2419
  var n;
2451
2420
  return (n = Object.entries(e.supportedLanguages ?? {}).find(
2452
2421
  ([o, { aliases: r }]) => (r == null ? void 0 : r.includes(t)) || o === t
2453
2422
  )) == null ? void 0 : n[0];
2454
2423
  }
2455
- const De = (e) => ({ url: e.src || void 0 }), Ln = () => ({
2424
+ const He = (e) => ({ url: e.src || void 0 }), En = () => ({
2456
2425
  type: "file",
2457
2426
  propSchema: {
2458
2427
  backgroundColor: k.backgroundColor,
@@ -2470,13 +2439,13 @@ const De = (e) => ({ url: e.src || void 0 }), Ln = () => ({
2470
2439
  }
2471
2440
  },
2472
2441
  content: "none"
2473
- }), Tn = () => (e) => {
2442
+ }), xn = () => (e) => {
2474
2443
  if (e.tagName === "EMBED") {
2475
2444
  if (e.closest("figure"))
2476
2445
  return;
2477
2446
  const { backgroundColor: t } = B(e);
2478
2447
  return {
2479
- ...De(e),
2448
+ ...He(e),
2480
2449
  backgroundColor: t
2481
2450
  };
2482
2451
  }
@@ -2486,18 +2455,18 @@ const De = (e) => ({ url: e.src || void 0 }), Ln = () => ({
2486
2455
  return;
2487
2456
  const { targetElement: n, caption: o } = t, { backgroundColor: r } = B(e);
2488
2457
  return {
2489
- ...De(n),
2458
+ ...He(n),
2490
2459
  backgroundColor: r,
2491
2460
  caption: o
2492
2461
  };
2493
2462
  }
2494
- }, An = M(Ln, {
2463
+ }, Sn = M(En, {
2495
2464
  meta: {
2496
2465
  fileBlockAccept: ["*/*"]
2497
2466
  },
2498
- parse: Tn(),
2467
+ parse: xn(),
2499
2468
  render(e, t) {
2500
- return we(e, t);
2469
+ return ye(e, t);
2501
2470
  },
2502
2471
  toExternalHTML(e) {
2503
2472
  if (!e.props.url) {
@@ -2511,13 +2480,13 @@ const De = (e) => ({ url: e.src || void 0 }), Ln = () => ({
2511
2480
  dom: t
2512
2481
  };
2513
2482
  }
2514
- }), Nn = {
2483
+ }), Bn = {
2515
2484
  set: (e, t) => window.localStorage.setItem(
2516
2485
  `toggle-${e.id}`,
2517
2486
  t ? "true" : "false"
2518
2487
  ),
2519
2488
  get: (e) => window.localStorage.getItem(`toggle-${e.id}`) === "true"
2520
- }, ot = (e, t, n, o = Nn) => {
2489
+ }, et = (e, t, n, o = Bn) => {
2521
2490
  if (!("isToggleable" in e.props) || !e.props.isToggleable)
2522
2491
  return {
2523
2492
  dom: n
@@ -2574,9 +2543,9 @@ const De = (e) => ({ url: e.src || void 0 }), Ln = () => ({
2574
2543
  ), f == null || f();
2575
2544
  }
2576
2545
  };
2577
- }, rt = [1, 2, 3, 4, 5, 6], In = ({
2546
+ }, tt = [1, 2, 3, 4, 5, 6], Mn = ({
2578
2547
  defaultLevel: e = 1,
2579
- levels: t = rt,
2548
+ levels: t = tt,
2580
2549
  allowToggleHeadings: n = !0
2581
2550
  } = {}) => ({
2582
2551
  type: "heading",
@@ -2586,8 +2555,8 @@ const De = (e) => ({ url: e.src || void 0 }), Ln = () => ({
2586
2555
  ...n ? { isToggleable: { default: !1, optional: !0 } } : {}
2587
2556
  },
2588
2557
  content: "inline"
2589
- }), Hn = M(
2590
- In,
2558
+ }), Ln = M(
2559
+ Mn,
2591
2560
  ({ allowToggleHeadings: e = !0 } = {}) => ({
2592
2561
  meta: {
2593
2562
  isolating: !1
@@ -2623,21 +2592,21 @@ const De = (e) => ({ url: e.src || void 0 }), Ln = () => ({
2623
2592
  },
2624
2593
  render(t, n) {
2625
2594
  const o = document.createElement(`h${t.props.level}`);
2626
- return e ? { ...ot(t, n, o), contentDOM: o } : {
2595
+ return e ? { ...et(t, n, o), contentDOM: o } : {
2627
2596
  dom: o,
2628
2597
  contentDOM: o
2629
2598
  };
2630
2599
  },
2631
2600
  toExternalHTML(t) {
2632
2601
  const n = document.createElement(`h${t.props.level}`);
2633
- return P(t.props, n), {
2602
+ return H(t.props, n), {
2634
2603
  dom: n,
2635
2604
  contentDOM: n
2636
2605
  };
2637
2606
  }
2638
2607
  }),
2639
- ({ levels: e = rt } = {}) => [
2640
- L({
2608
+ ({ levels: e = tt } = {}) => [
2609
+ T({
2641
2610
  key: "heading-shortcuts",
2642
2611
  keyboardShortcuts: Object.fromEntries(
2643
2612
  e.map((t) => [
@@ -2666,8 +2635,8 @@ const De = (e) => ({ url: e.src || void 0 }), Ln = () => ({
2666
2635
  }))
2667
2636
  })
2668
2637
  ]
2669
- ), st = (e, t, n, o, r) => {
2670
- const { dom: s, destroy: a } = we(
2638
+ ), nt = (e, t, n, o, r) => {
2639
+ const { dom: s, destroy: a } = ye(
2671
2640
  e,
2672
2641
  t,
2673
2642
  n,
@@ -2750,10 +2719,10 @@ const De = (e) => ({ url: e.src || void 0 }), Ln = () => ({
2750
2719
  );
2751
2720
  }
2752
2721
  };
2753
- }, _e = (e) => {
2722
+ }, Pe = (e) => {
2754
2723
  const t = e.src || void 0, n = e.width || void 0, o = e.alt || void 0;
2755
2724
  return { url: t, previewWidth: n, name: o };
2756
- }, Pn = '<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>', On = (e = {}) => ({
2725
+ }, Tn = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M5 11.1005L7 9.1005L12.5 14.6005L16 11.1005L19 14.1005V5H5V11.1005ZM4 3H20C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3ZM15.5 10C14.6716 10 14 9.32843 14 8.5C14 7.67157 14.6716 7 15.5 7C16.3284 7 17 7.67157 17 8.5C17 9.32843 16.3284 10 15.5 10Z"></path></svg>', An = (e = {}) => ({
2757
2726
  type: "image",
2758
2727
  propSchema: {
2759
2728
  textAlignment: k.textAlignment,
@@ -2780,13 +2749,13 @@ const De = (e) => ({ url: e.src || void 0 }), Ln = () => ({
2780
2749
  }
2781
2750
  },
2782
2751
  content: "none"
2783
- }), Dn = (e = {}) => (t) => {
2752
+ }), Nn = (e = {}) => (t) => {
2784
2753
  if (t.tagName === "IMG") {
2785
2754
  if (t.closest("figure"))
2786
2755
  return;
2787
2756
  const { backgroundColor: n } = B(t);
2788
2757
  return {
2789
- ..._e(t),
2758
+ ...Pe(t),
2790
2759
  backgroundColor: n
2791
2760
  };
2792
2761
  }
@@ -2796,27 +2765,27 @@ const De = (e) => ({ url: e.src || void 0 }), Ln = () => ({
2796
2765
  return;
2797
2766
  const { targetElement: o, caption: r } = n, { backgroundColor: s } = B(t);
2798
2767
  return {
2799
- ..._e(o),
2768
+ ...Pe(o),
2800
2769
  backgroundColor: s,
2801
2770
  caption: r
2802
2771
  };
2803
2772
  }
2804
- }, _n = (e = {}) => (t, n) => {
2773
+ }, In = (e = {}) => (t, n) => {
2805
2774
  const o = document.createElement("div");
2806
- o.innerHTML = e.icon ?? Pn;
2775
+ o.innerHTML = e.icon ?? Tn;
2807
2776
  const r = document.createElement("div");
2808
2777
  r.className = "bn-visual-media-wrapper";
2809
2778
  const s = document.createElement("img");
2810
2779
  return s.className = "bn-visual-media", n.resolveFileUrl ? n.resolveFileUrl(t.props.url).then((a) => {
2811
2780
  s.src = a;
2812
- }) : s.src = t.props.url, s.alt = t.props.name || t.props.caption || "BlockNote image", s.contentEditable = "false", s.draggable = !1, r.appendChild(s), st(
2781
+ }) : s.src = t.props.url, s.alt = t.props.name || t.props.caption || "BlockNote image", s.contentEditable = "false", s.draggable = !1, r.appendChild(s), nt(
2813
2782
  t,
2814
2783
  n,
2815
2784
  { dom: r },
2816
2785
  r,
2817
2786
  o.firstElementChild
2818
2787
  );
2819
- }, Rn = (e = {}) => (t, n) => {
2788
+ }, On = (e = {}) => (t, n) => {
2820
2789
  if (!t.props.url) {
2821
2790
  const r = document.createElement("p");
2822
2791
  return r.textContent = "Add image", {
@@ -2824,25 +2793,25 @@ const De = (e) => ({ url: e.src || void 0 }), Ln = () => ({
2824
2793
  };
2825
2794
  }
2826
2795
  let o;
2827
- return t.props.showPreview ? (o = document.createElement("img"), o.src = t.props.url, o.alt = t.props.name || t.props.caption || "BlockNote image", t.props.previewWidth && (o.width = t.props.previewWidth)) : (o = document.createElement("a"), o.href = t.props.url, o.textContent = t.props.name || t.props.url), t.props.caption ? t.props.showPreview ? ve(o, t.props.caption) : te(o, t.props.caption) : {
2796
+ return t.props.showPreview ? (o = document.createElement("img"), o.src = t.props.url, o.alt = t.props.name || t.props.caption || "BlockNote image", t.props.previewWidth && (o.width = t.props.previewWidth)) : (o = document.createElement("a"), o.href = t.props.url, o.textContent = t.props.name || t.props.url), t.props.caption ? t.props.showPreview ? we(o, t.props.caption) : te(o, t.props.caption) : {
2828
2797
  dom: o
2829
2798
  };
2830
- }, Vn = M(
2831
- On,
2799
+ }, Hn = M(
2800
+ An,
2832
2801
  (e) => ({
2833
2802
  meta: {
2834
2803
  fileBlockAccept: ["image/*"]
2835
2804
  },
2836
- parse: Dn(e),
2837
- render: _n(e),
2838
- toExternalHTML: Rn(e),
2805
+ parse: Nn(e),
2806
+ render: In(e),
2807
+ toExternalHTML: On(e),
2839
2808
  runsBefore: ["file"]
2840
2809
  })
2841
- ), sr = (e, t, n) => ({
2810
+ ), Qo = (e, t, n) => ({
2842
2811
  state: o,
2843
2812
  dispatch: r
2844
- }) => r ? at(o.tr, e, t, n) : !0, at = (e, t, n, o) => {
2845
- const r = fe(e.doc, t), s = z(r);
2813
+ }) => r ? ot(o.tr, e, t, n) : !0, ot = (e, t, n, o) => {
2814
+ const r = pe(e.doc, t), s = q(r);
2846
2815
  if (!s.isBlockContainer)
2847
2816
  return !1;
2848
2817
  const a = G(e), i = [
@@ -2859,20 +2828,20 @@ const De = (e) => ({ url: e.src || void 0 }), Ln = () => ({
2859
2828
  return e.split(t, 2, i), !0;
2860
2829
  }, ne = (e, t) => {
2861
2830
  const { blockInfo: n, selectionEmpty: o } = e.transact((a) => ({
2862
- blockInfo: Zt(a),
2831
+ blockInfo: jt(a),
2863
2832
  selectionEmpty: a.selection.anchor === a.selection.head
2864
2833
  }));
2865
2834
  if (!n.isBlockContainer)
2866
2835
  return !1;
2867
2836
  const { bnBlock: r, blockContent: s } = n;
2868
2837
  return s.node.type.name !== t || !o ? !1 : s.node.childCount === 0 ? (e.transact((a) => {
2869
- ye(a, r.beforePos, {
2838
+ ke(a, r.beforePos, {
2870
2839
  type: "paragraph",
2871
2840
  props: {}
2872
2841
  });
2873
- }), !0) : s.node.childCount > 0 ? e.transact((a) => (a.deleteSelection(), at(a, a.selection.from, !0))) : !1;
2842
+ }), !0) : s.node.childCount > 0 ? e.transact((a) => (a.deleteSelection(), ot(a, a.selection.from, !0))) : !1;
2874
2843
  };
2875
- function Ee(e, t, n) {
2844
+ function ve(e, t, n) {
2876
2845
  var u, p, f;
2877
2846
  const o = Q.fromSchema(t), r = e, s = document.createElement("div");
2878
2847
  s.setAttribute("data-node-type", "blockGroup");
@@ -2902,14 +2871,14 @@ function Ee(e, t, n) {
2902
2871
  }
2903
2872
  return c.content;
2904
2873
  }
2905
- const Wn = () => ({
2874
+ const Pn = () => ({
2906
2875
  type: "bulletListItem",
2907
2876
  propSchema: {
2908
2877
  ...k
2909
2878
  },
2910
2879
  content: "inline"
2911
- }), Fn = M(
2912
- Wn,
2880
+ }), Dn = M(
2881
+ Pn,
2913
2882
  {
2914
2883
  meta: {
2915
2884
  isolating: !1
@@ -2924,7 +2893,7 @@ const Wn = () => ({
2924
2893
  },
2925
2894
  // As `li` elements can contain multiple paragraphs, we need to merge their contents
2926
2895
  // into a single one so that ProseMirror can parse everything correctly.
2927
- parseContent: ({ el: e, schema: t }) => Ee(e, t, "bulletListItem"),
2896
+ parseContent: ({ el: e, schema: t }) => ve(e, t, "bulletListItem"),
2928
2897
  render() {
2929
2898
  const e = document.createElement("p");
2930
2899
  return {
@@ -2934,14 +2903,14 @@ const Wn = () => ({
2934
2903
  },
2935
2904
  toExternalHTML(e) {
2936
2905
  const t = document.createElement("li"), n = document.createElement("p");
2937
- return P(e.props, t), t.appendChild(n), {
2906
+ return H(e.props, t), t.appendChild(n), {
2938
2907
  dom: t,
2939
2908
  contentDOM: n
2940
2909
  };
2941
2910
  }
2942
2911
  },
2943
2912
  [
2944
- L({
2913
+ T({
2945
2914
  key: "bullet-list-item-shortcuts",
2946
2915
  keyboardShortcuts: {
2947
2916
  Enter: ({ editor: e }) => ne(e, "bulletListItem"),
@@ -2966,15 +2935,15 @@ const Wn = () => ({
2966
2935
  ]
2967
2936
  })
2968
2937
  ]
2969
- ), jn = () => ({
2938
+ ), _n = () => ({
2970
2939
  type: "checkListItem",
2971
2940
  propSchema: {
2972
2941
  ...k,
2973
2942
  checked: { default: !1, type: "boolean" }
2974
2943
  },
2975
2944
  content: "inline"
2976
- }), $n = M(
2977
- jn,
2945
+ }), Rn = M(
2946
+ _n,
2978
2947
  {
2979
2948
  meta: {
2980
2949
  isolating: !1
@@ -2993,7 +2962,7 @@ const Wn = () => ({
2993
2962
  },
2994
2963
  // As `li` elements can contain multiple paragraphs, we need to merge their contents
2995
2964
  // into a single one so that ProseMirror can parse everything correctly.
2996
- parseContent: ({ el: e, schema: t }) => Ee(e, t, "checkListItem"),
2965
+ parseContent: ({ el: e, schema: t }) => ve(e, t, "checkListItem"),
2997
2966
  render(e, t) {
2998
2967
  const n = document.createDocumentFragment(), o = document.createElement("input");
2999
2968
  o.type = "checkbox", o.checked = e.props.checked, e.props.checked && o.setAttribute("checked", ""), o.addEventListener("change", () => {
@@ -3009,7 +2978,7 @@ const Wn = () => ({
3009
2978
  const t = document.createElement("li"), n = document.createElement("input");
3010
2979
  n.type = "checkbox", n.checked = e.props.checked, e.props.checked && n.setAttribute("checked", "");
3011
2980
  const o = document.createElement("p");
3012
- return P(e.props, t), t.appendChild(n), t.appendChild(o), {
2981
+ return H(e.props, t), t.appendChild(n), t.appendChild(o), {
3013
2982
  dom: t,
3014
2983
  contentDOM: o
3015
2984
  };
@@ -3017,7 +2986,7 @@ const Wn = () => ({
3017
2986
  runsBefore: ["bulletListItem"]
3018
2987
  },
3019
2988
  [
3020
- L({
2989
+ T({
3021
2990
  key: "check-list-item-shortcuts",
3022
2991
  keyboardShortcuts: {
3023
2992
  Enter: ({ editor: e }) => ne(e, "checkListItem"),
@@ -3057,33 +3026,33 @@ const Wn = () => ({
3057
3026
  })
3058
3027
  ]
3059
3028
  );
3060
- function it(e, t, n, o) {
3029
+ function rt(e, t, n, o) {
3061
3030
  let r = e.firstChild.attrs.start || 1, s = !0;
3062
- const a = !!e.firstChild.attrs.start, i = z({
3031
+ const a = !!e.firstChild.attrs.start, i = q({
3063
3032
  posBeforeNode: t,
3064
3033
  node: e
3065
3034
  });
3066
3035
  if (!i.isBlockContainer)
3067
3036
  throw new Error("impossible");
3068
3037
  const c = n.doc.resolve(i.bnBlock.beforePos).nodeBefore, l = c ? o.get(c) : void 0;
3069
- return l !== void 0 ? (r = l + 1, s = !1) : c && z({
3038
+ return l !== void 0 ? (r = l + 1, s = !1) : c && q({
3070
3039
  posBeforeNode: i.bnBlock.beforePos - c.nodeSize,
3071
3040
  node: c
3072
- }).blockNoteType === "numberedListItem" && (r = it(
3041
+ }).blockNoteType === "numberedListItem" && (r = rt(
3073
3042
  c,
3074
3043
  i.bnBlock.beforePos - c.nodeSize,
3075
3044
  n,
3076
3045
  o
3077
3046
  ).index + 1, s = !1), o.set(e, r), { index: r, isFirst: s, hasStart: a };
3078
3047
  }
3079
- function Re(e, t) {
3048
+ function De(e, t) {
3080
3049
  const n = /* @__PURE__ */ new Map(), o = t.decorations.map(
3081
3050
  e.mapping,
3082
3051
  e.doc
3083
3052
  ), r = [];
3084
3053
  e.doc.nodesBetween(0, e.doc.nodeSize - 2, (a, i) => {
3085
3054
  if (a.type.name === "blockContainer" && a.firstChild.type.name === "numberedListItem") {
3086
- const { index: c, isFirst: l, hasStart: d } = it(
3055
+ const { index: c, isFirst: l, hasStart: d } = rt(
3087
3056
  a,
3088
3057
  i,
3089
3058
  e,
@@ -3095,7 +3064,7 @@ function Re(e, t) {
3095
3064
  (p) => p.index === c && p.isFirst === l && p.hasStart === d
3096
3065
  ).length === 0 && r.push(
3097
3066
  // move in by 1 to account for the block container
3098
- Pt.node(i + 1, i + a.nodeSize - 1, {
3067
+ Tt.node(i + 1, i + a.nodeSize - 1, {
3099
3068
  "data-index": c.toString()
3100
3069
  })
3101
3070
  );
@@ -3108,33 +3077,33 @@ function Re(e, t) {
3108
3077
  decorations: o.remove(s).add(e.doc, r)
3109
3078
  };
3110
3079
  }
3111
- const Un = () => new je({
3112
- key: new $e("numbered-list-indexing-decorations"),
3080
+ const Vn = () => new We({
3081
+ key: new Fe("numbered-list-indexing-decorations"),
3113
3082
  state: {
3114
3083
  init(e, t) {
3115
- return Re(t.tr, {
3116
- decorations: Me.empty
3084
+ return De(t.tr, {
3085
+ decorations: Be.empty
3117
3086
  });
3118
3087
  },
3119
3088
  apply(e, t) {
3120
- return !e.docChanged && !e.selectionSet && t.decorations ? t : Re(e, t);
3089
+ return !e.docChanged && !e.selectionSet && t.decorations ? t : De(e, t);
3121
3090
  }
3122
3091
  },
3123
3092
  props: {
3124
3093
  decorations(e) {
3125
3094
  var t;
3126
- return ((t = this.getState(e)) == null ? void 0 : t.decorations) ?? Me.empty;
3095
+ return ((t = this.getState(e)) == null ? void 0 : t.decorations) ?? Be.empty;
3127
3096
  }
3128
3097
  }
3129
- }), zn = () => ({
3098
+ }), Wn = () => ({
3130
3099
  type: "numberedListItem",
3131
3100
  propSchema: {
3132
3101
  ...k,
3133
3102
  start: { default: void 0, type: "number" }
3134
3103
  },
3135
3104
  content: "inline"
3136
- }), qn = M(
3137
- zn,
3105
+ }), Fn = M(
3106
+ Wn,
3138
3107
  {
3139
3108
  meta: {
3140
3109
  isolating: !1
@@ -3154,7 +3123,7 @@ const Un = () => new je({
3154
3123
  },
3155
3124
  // As `li` elements can contain multiple paragraphs, we need to merge their contents
3156
3125
  // into a single one so that ProseMirror can parse everything correctly.
3157
- parseContent: ({ el: e, schema: t }) => Ee(e, t, "numberedListItem"),
3126
+ parseContent: ({ el: e, schema: t }) => ve(e, t, "numberedListItem"),
3158
3127
  render() {
3159
3128
  const e = document.createElement("p");
3160
3129
  return {
@@ -3164,14 +3133,14 @@ const Un = () => new je({
3164
3133
  },
3165
3134
  toExternalHTML(e) {
3166
3135
  const t = document.createElement("li"), n = document.createElement("p");
3167
- return P(e.props, t), t.appendChild(n), {
3136
+ return H(e.props, t), t.appendChild(n), {
3168
3137
  dom: t,
3169
3138
  contentDOM: n
3170
3139
  };
3171
3140
  }
3172
3141
  },
3173
3142
  [
3174
- L({
3143
+ T({
3175
3144
  key: "numbered-list-item-shortcuts",
3176
3145
  inputRules: [
3177
3146
  {
@@ -3197,24 +3166,24 @@ const Un = () => new je({
3197
3166
  }), !0);
3198
3167
  }
3199
3168
  },
3200
- plugins: [Un()]
3169
+ plugins: [Vn()]
3201
3170
  })
3202
3171
  ]
3203
- ), Zn = () => ({
3172
+ ), jn = () => ({
3204
3173
  type: "toggleListItem",
3205
3174
  propSchema: {
3206
3175
  ...k
3207
3176
  },
3208
3177
  content: "inline"
3209
- }), Gn = M(
3210
- Zn,
3178
+ }), $n = M(
3179
+ jn,
3211
3180
  {
3212
3181
  meta: {
3213
3182
  isolating: !1
3214
3183
  },
3215
3184
  render(e, t) {
3216
3185
  const n = document.createElement("p");
3217
- return { ...ot(
3186
+ return { ...et(
3218
3187
  e,
3219
3188
  t,
3220
3189
  n
@@ -3222,14 +3191,14 @@ const Un = () => new je({
3222
3191
  },
3223
3192
  toExternalHTML(e) {
3224
3193
  const t = document.createElement("li"), n = document.createElement("p");
3225
- return P(e.props, t), t.appendChild(n), {
3194
+ return H(e.props, t), t.appendChild(n), {
3226
3195
  dom: t,
3227
3196
  contentDOM: n
3228
3197
  };
3229
3198
  }
3230
3199
  },
3231
3200
  [
3232
- L({
3201
+ T({
3233
3202
  key: "toggle-list-item-shortcuts",
3234
3203
  keyboardShortcuts: {
3235
3204
  Enter: ({ editor: e }) => ne(e, "toggleListItem"),
@@ -3243,12 +3212,12 @@ const Un = () => new je({
3243
3212
  }
3244
3213
  })
3245
3214
  ]
3246
- ), Xn = () => ({
3215
+ ), Un = () => ({
3247
3216
  type: "pageBreak",
3248
3217
  propSchema: {},
3249
3218
  content: "none"
3250
- }), Jn = M(
3251
- Xn,
3219
+ }), qn = M(
3220
+ Un,
3252
3221
  {
3253
3222
  parse(e) {
3254
3223
  if (e.tagName === "DIV" && e.hasAttribute("data-page-break"))
@@ -3267,16 +3236,16 @@ const Un = () => new je({
3267
3236
  };
3268
3237
  }
3269
3238
  }
3270
- ), ar = (e) => e.extend({
3239
+ ), Yo = (e) => e.extend({
3271
3240
  blockSpecs: {
3272
- pageBreak: Jn()
3241
+ pageBreak: qn()
3273
3242
  }
3274
- }), Kn = () => ({
3243
+ }), zn = () => ({
3275
3244
  type: "paragraph",
3276
3245
  propSchema: k,
3277
3246
  content: "inline"
3278
- }), Qn = M(
3279
- Kn,
3247
+ }), Zn = M(
3248
+ zn,
3280
3249
  {
3281
3250
  meta: {
3282
3251
  isolating: !1
@@ -3295,7 +3264,7 @@ const Un = () => new je({
3295
3264
  },
3296
3265
  toExternalHTML: (e) => {
3297
3266
  const t = document.createElement("p");
3298
- return P(e.props, t), {
3267
+ return H(e.props, t), {
3299
3268
  dom: t,
3300
3269
  contentDOM: t
3301
3270
  };
@@ -3303,7 +3272,7 @@ const Un = () => new je({
3303
3272
  runsBefore: ["default"]
3304
3273
  },
3305
3274
  [
3306
- L({
3275
+ T({
3307
3276
  key: "paragraph-shortcuts",
3308
3277
  keyboardShortcuts: {
3309
3278
  "Mod-Alt-0": ({ editor: e }) => {
@@ -3316,15 +3285,15 @@ const Un = () => new je({
3316
3285
  }
3317
3286
  })
3318
3287
  ]
3319
- ), Yn = () => ({
3288
+ ), Gn = () => ({
3320
3289
  type: "quote",
3321
3290
  propSchema: {
3322
3291
  backgroundColor: k.backgroundColor,
3323
3292
  textColor: k.textColor
3324
3293
  },
3325
3294
  content: "inline"
3326
- }), eo = M(
3327
- Yn,
3295
+ }), Xn = M(
3296
+ Gn,
3328
3297
  {
3329
3298
  meta: {
3330
3299
  isolating: !1
@@ -3344,14 +3313,14 @@ const Un = () => new je({
3344
3313
  },
3345
3314
  toExternalHTML(e) {
3346
3315
  const t = document.createElement("blockquote");
3347
- return P(e.props, t), {
3316
+ return H(e.props, t), {
3348
3317
  dom: t,
3349
3318
  contentDOM: t
3350
3319
  };
3351
3320
  }
3352
3321
  },
3353
3322
  [
3354
- L({
3323
+ T({
3355
3324
  key: "quote-block-shortcuts",
3356
3325
  keyboardShortcuts: {
3357
3326
  "Mod-Alt-q": ({ editor: e }) => {
@@ -3375,18 +3344,18 @@ const Un = () => new je({
3375
3344
  ]
3376
3345
  })
3377
3346
  ]
3378
- ), to = 35, ct = 120, ir = 31, no = Fe.create({
3347
+ ), Jn = 35, st = 120, er = 31, Kn = Ve.create({
3379
3348
  name: "BlockNoteTableExtension",
3380
3349
  addProseMirrorPlugins: () => [
3381
- mt({
3382
- cellMinWidth: to,
3383
- defaultCellMinWidth: ct,
3350
+ pt({
3351
+ cellMinWidth: Jn,
3352
+ defaultCellMinWidth: st,
3384
3353
  // We set this to null as we implement our own node view in the table
3385
3354
  // block content. This node view is the same as what's used by default,
3386
3355
  // but is wrapped in a `blockContent` HTML element.
3387
3356
  View: null
3388
3357
  }),
3389
- gt()
3358
+ ft()
3390
3359
  ],
3391
3360
  addKeyboardShortcuts() {
3392
3361
  return {
@@ -3400,10 +3369,10 @@ const Un = () => new je({
3400
3369
  },
3401
3370
  // Enables navigating cells using the tab key.
3402
3371
  Tab: () => this.editor.commands.command(
3403
- ({ state: e, dispatch: t, view: n }) => Se(1)(e, t, n)
3372
+ ({ state: e, dispatch: t, view: n }) => xe(1)(e, t, n)
3404
3373
  ),
3405
3374
  "Shift-Tab": () => this.editor.commands.command(
3406
- ({ state: e, dispatch: t, view: n }) => Se(-1)(e, t, n)
3375
+ ({ state: e, dispatch: t, view: n }) => xe(-1)(e, t, n)
3407
3376
  )
3408
3377
  };
3409
3378
  },
@@ -3414,14 +3383,14 @@ const Un = () => new je({
3414
3383
  storage: e.storage
3415
3384
  };
3416
3385
  return {
3417
- tableRole: Lt(
3418
- Tt(e, "tableRole", t)
3386
+ tableRole: St(
3387
+ Bt(e, "tableRole", t)
3419
3388
  )
3420
3389
  };
3421
3390
  }
3422
- }), oo = {
3391
+ }), Qn = {
3423
3392
  textColor: k.textColor
3424
- }, ro = D.create({
3393
+ }, Yn = D.create({
3425
3394
  name: "tableHeader",
3426
3395
  addOptions() {
3427
3396
  return {
@@ -3461,18 +3430,18 @@ const Un = () => new je({
3461
3430
  tag: "th",
3462
3431
  // As `th` elements can contain multiple paragraphs, we need to merge their contents
3463
3432
  // into a single one so that ProseMirror can parse everything correctly.
3464
- getContent: (e, t) => lt(e, t)
3433
+ getContent: (e, t) => at(e, t)
3465
3434
  }
3466
3435
  ];
3467
3436
  },
3468
3437
  renderHTML({ HTMLAttributes: e }) {
3469
3438
  return [
3470
3439
  "th",
3471
- ue(this.options.HTMLAttributes, e),
3440
+ le(this.options.HTMLAttributes, e),
3472
3441
  0
3473
3442
  ];
3474
3443
  }
3475
- }), so = D.create({
3444
+ }), eo = D.create({
3476
3445
  name: "tableCell",
3477
3446
  addOptions() {
3478
3447
  return {
@@ -3505,18 +3474,18 @@ const Un = () => new je({
3505
3474
  tag: "td",
3506
3475
  // As `td` elements can contain multiple paragraphs, we need to merge their contents
3507
3476
  // into a single one so that ProseMirror can parse everything correctly.
3508
- getContent: (e, t) => lt(e, t)
3477
+ getContent: (e, t) => at(e, t)
3509
3478
  }
3510
3479
  ];
3511
3480
  },
3512
3481
  renderHTML({ HTMLAttributes: e }) {
3513
3482
  return [
3514
3483
  "td",
3515
- ue(this.options.HTMLAttributes, e),
3484
+ le(this.options.HTMLAttributes, e),
3516
3485
  0
3517
3486
  ];
3518
3487
  }
3519
- }), ao = D.create({
3488
+ }), to = D.create({
3520
3489
  name: "table",
3521
3490
  content: "tableRow+",
3522
3491
  group: "blockContent",
@@ -3532,7 +3501,7 @@ const Un = () => new je({
3532
3501
  },
3533
3502
  renderHTML({ node: e, HTMLAttributes: t }) {
3534
3503
  var r, s, a;
3535
- const n = Rt(
3504
+ const n = Ot(
3536
3505
  this.name,
3537
3506
  "table",
3538
3507
  {
@@ -3561,7 +3530,7 @@ const Un = () => new je({
3561
3530
  addNodeView() {
3562
3531
  return ({ node: e, HTMLAttributes: t }) => {
3563
3532
  var o;
3564
- class n extends bt {
3533
+ class n extends ht {
3565
3534
  constructor(s, a, i) {
3566
3535
  super(s, a), this.node = s, this.cellMinWidth = a, this.blockContentHTMLAttributes = i;
3567
3536
  const c = document.createElement("div");
@@ -3582,13 +3551,13 @@ const Un = () => new je({
3582
3551
  return !s.target.closest(".tableWrapper-inner") || super.ignoreMutation(s);
3583
3552
  }
3584
3553
  }
3585
- return new n(e, ct, {
3554
+ return new n(e, st, {
3586
3555
  ...((o = this.options.domAttributes) == null ? void 0 : o.blockContent) || {},
3587
3556
  ...t
3588
3557
  });
3589
3558
  };
3590
3559
  }
3591
- }), io = D.create({
3560
+ }), no = D.create({
3592
3561
  name: "tableParagraph",
3593
3562
  group: "tableContent",
3594
3563
  content: "inline*",
@@ -3609,7 +3578,7 @@ const Un = () => new je({
3609
3578
  renderHTML({ HTMLAttributes: e }) {
3610
3579
  return ["p", e, 0];
3611
3580
  }
3612
- }), co = D.create({
3581
+ }), oo = D.create({
3613
3582
  name: "tableRow",
3614
3583
  addOptions() {
3615
3584
  return {
@@ -3625,12 +3594,12 @@ const Un = () => new je({
3625
3594
  renderHTML({ HTMLAttributes: e }) {
3626
3595
  return [
3627
3596
  "tr",
3628
- ue(this.options.HTMLAttributes, e),
3597
+ le(this.options.HTMLAttributes, e),
3629
3598
  0
3630
3599
  ];
3631
3600
  }
3632
3601
  });
3633
- function lt(e, t) {
3602
+ function at(e, t) {
3634
3603
  const o = Q.fromSchema(t).parse(e, {
3635
3604
  topNode: t.nodes.blockGroup.create()
3636
3605
  }), r = [];
@@ -3639,25 +3608,25 @@ function lt(e, t) {
3639
3608
  return r.push(s), !1;
3640
3609
  }), _.fromArray(r);
3641
3610
  }
3642
- const lo = () => jt(
3643
- { node: ao, type: "table", content: "table" },
3644
- oo,
3611
+ const ro = () => _t(
3612
+ { node: to, type: "table", content: "table" },
3613
+ Qn,
3645
3614
  [
3646
- L({
3615
+ T({
3647
3616
  key: "table-extensions",
3648
3617
  tiptapExtensions: [
3618
+ Kn,
3649
3619
  no,
3650
- io,
3651
- ro,
3652
- so,
3653
- co
3620
+ Yn,
3621
+ eo,
3622
+ oo
3654
3623
  ]
3655
3624
  })
3656
3625
  ]
3657
- ), Ve = (e) => {
3626
+ ), _e = (e) => {
3658
3627
  const t = e.src || void 0, n = e.width || void 0;
3659
3628
  return { url: t, previewWidth: n };
3660
- }, uo = '<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>', po = (e) => ({
3629
+ }, so = '<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>', ao = (e) => ({
3661
3630
  type: "video",
3662
3631
  propSchema: {
3663
3632
  textAlignment: k.textAlignment,
@@ -3669,13 +3638,13 @@ const lo = () => jt(
3669
3638
  previewWidth: { default: void 0, type: "number" }
3670
3639
  },
3671
3640
  content: "none"
3672
- }), fo = (e) => (t) => {
3641
+ }), io = (e) => (t) => {
3673
3642
  if (t.tagName === "VIDEO") {
3674
3643
  if (t.closest("figure"))
3675
3644
  return;
3676
3645
  const { backgroundColor: n } = B(t);
3677
3646
  return {
3678
- ...Ve(t),
3647
+ ..._e(t),
3679
3648
  backgroundColor: n
3680
3649
  };
3681
3650
  }
@@ -3685,27 +3654,27 @@ const lo = () => jt(
3685
3654
  return;
3686
3655
  const { targetElement: o, caption: r } = n, { backgroundColor: s } = B(t);
3687
3656
  return {
3688
- ...Ve(o),
3657
+ ..._e(o),
3689
3658
  backgroundColor: s,
3690
3659
  caption: r
3691
3660
  };
3692
3661
  }
3693
- }, ho = M(
3694
- po,
3662
+ }, co = M(
3663
+ ao,
3695
3664
  (e) => ({
3696
3665
  meta: {
3697
3666
  fileBlockAccept: ["video/*"]
3698
3667
  },
3699
- parse: fo(),
3668
+ parse: io(),
3700
3669
  render(t, n) {
3701
3670
  const o = document.createElement("div");
3702
- o.innerHTML = e.icon ?? uo;
3671
+ o.innerHTML = e.icon ?? so;
3703
3672
  const r = document.createElement("div");
3704
3673
  r.className = "bn-visual-media-wrapper";
3705
3674
  const s = document.createElement("video");
3706
3675
  return s.className = "bn-visual-media", n.resolveFileUrl ? n.resolveFileUrl(t.props.url).then((a) => {
3707
3676
  s.src = a;
3708
- }) : s.src = t.props.url, s.controls = !0, s.contentEditable = "false", s.draggable = !1, s.width = t.props.previewWidth, r.appendChild(s), st(
3677
+ }) : s.src = t.props.url, s.controls = !0, s.contentEditable = "false", s.draggable = !1, s.width = t.props.previewWidth, r.appendChild(s), nt(
3709
3678
  t,
3710
3679
  n,
3711
3680
  { dom: r },
@@ -3721,13 +3690,13 @@ const lo = () => jt(
3721
3690
  };
3722
3691
  }
3723
3692
  let n;
3724
- return t.props.showPreview ? (n = document.createElement("video"), n.src = t.props.url, t.props.previewWidth && (n.width = t.props.previewWidth)) : (n = document.createElement("a"), n.href = t.props.url, n.textContent = t.props.name || t.props.url), t.props.caption ? t.props.showPreview ? ve(n, t.props.caption) : te(n, t.props.caption) : {
3693
+ return t.props.showPreview ? (n = document.createElement("video"), n.src = t.props.url, t.props.previewWidth && (n.width = t.props.previewWidth)) : (n = document.createElement("a"), n.href = t.props.url, n.textContent = t.props.name || t.props.url), t.props.caption ? t.props.showPreview ? we(n, t.props.caption) : te(n, t.props.caption) : {
3725
3694
  dom: n
3726
3695
  };
3727
3696
  },
3728
3697
  runsBefore: ["file"]
3729
3698
  })
3730
- ), cr = async (e) => {
3699
+ ), tr = async (e) => {
3731
3700
  const t = new FormData();
3732
3701
  return t.append("file", e), (await (await fetch("https://tmpfiles.org/api/v1/upload", {
3733
3702
  method: "POST",
@@ -3762,13 +3731,13 @@ function E(e, t, n) {
3762
3731
  }
3763
3732
  return !0;
3764
3733
  }
3765
- function lr(e, t, n, o) {
3734
+ function nr(e, t, n, o) {
3766
3735
  return E(t, n, o) && e.type === n;
3767
3736
  }
3768
- function ur(e) {
3769
- return e instanceof Ct;
3737
+ function or(e) {
3738
+ return e instanceof mt;
3770
3739
  }
3771
- function mo(e) {
3740
+ function lo(e) {
3772
3741
  let t = e.getTextCursorPosition().block, n = e.schema.blockSchema[t.type].content;
3773
3742
  for (; n === "none"; ) {
3774
3743
  if (t = e.getTextCursorPosition().nextBlock, t === void 0)
@@ -3781,9 +3750,9 @@ function v(e, t) {
3781
3750
  if (n.content === void 0)
3782
3751
  throw new Error("Slash Menu open in a block that doesn't contain content.");
3783
3752
  let o;
3784
- return Array.isArray(n.content) && (n.content.length === 1 && I(n.content[0]) && n.content[0].type === "text" && n.content[0].text === "/" || n.content.length === 0) ? (o = e.updateBlock(n, t), e.setTextCursorPosition(o)) : (o = e.insertBlocks([t], n, "after")[0], e.setTextCursorPosition(e.getTextCursorPosition().nextBlock)), mo(e), o;
3753
+ return Array.isArray(n.content) && (n.content.length === 1 && I(n.content[0]) && n.content[0].type === "text" && n.content[0].text === "/" || n.content.length === 0) ? (o = e.updateBlock(n, t), e.setTextCursorPosition(o)) : (o = e.insertBlocks([t], n, "after")[0], e.setTextCursorPosition(e.getTextCursorPosition().nextBlock)), lo(e), o;
3785
3754
  }
3786
- function dr(e) {
3755
+ function rr(e) {
3787
3756
  const t = [];
3788
3757
  return E(e, "heading", { level: "number" }) && t.push(
3789
3758
  {
@@ -3793,7 +3762,7 @@ function dr(e) {
3793
3762
  props: { level: 1 }
3794
3763
  });
3795
3764
  },
3796
- badge: T("Mod-Alt-1"),
3765
+ badge: L("Mod-Alt-1"),
3797
3766
  key: "heading",
3798
3767
  ...e.dictionary.slash_menu.heading
3799
3768
  },
@@ -3804,7 +3773,7 @@ function dr(e) {
3804
3773
  props: { level: 2 }
3805
3774
  });
3806
3775
  },
3807
- badge: T("Mod-Alt-2"),
3776
+ badge: L("Mod-Alt-2"),
3808
3777
  key: "heading_2",
3809
3778
  ...e.dictionary.slash_menu.heading_2
3810
3779
  },
@@ -3815,7 +3784,7 @@ function dr(e) {
3815
3784
  props: { level: 3 }
3816
3785
  });
3817
3786
  },
3818
- badge: T("Mod-Alt-3"),
3787
+ badge: L("Mod-Alt-3"),
3819
3788
  key: "heading_3",
3820
3789
  ...e.dictionary.slash_menu.heading_3
3821
3790
  }
@@ -3833,7 +3802,7 @@ function dr(e) {
3833
3802
  type: "toggleListItem"
3834
3803
  });
3835
3804
  },
3836
- badge: T("Mod-Shift-6"),
3805
+ badge: L("Mod-Shift-6"),
3837
3806
  key: "toggle_list",
3838
3807
  ...e.dictionary.slash_menu.toggle_list
3839
3808
  }), E(e, "numberedListItem") && t.push({
@@ -3842,7 +3811,7 @@ function dr(e) {
3842
3811
  type: "numberedListItem"
3843
3812
  });
3844
3813
  },
3845
- badge: T("Mod-Shift-7"),
3814
+ badge: L("Mod-Shift-7"),
3846
3815
  key: "numbered_list",
3847
3816
  ...e.dictionary.slash_menu.numbered_list
3848
3817
  }), E(e, "bulletListItem") && t.push({
@@ -3851,7 +3820,7 @@ function dr(e) {
3851
3820
  type: "bulletListItem"
3852
3821
  });
3853
3822
  },
3854
- badge: T("Mod-Shift-8"),
3823
+ badge: L("Mod-Shift-8"),
3855
3824
  key: "bullet_list",
3856
3825
  ...e.dictionary.slash_menu.bullet_list
3857
3826
  }), E(e, "checkListItem") && t.push({
@@ -3860,7 +3829,7 @@ function dr(e) {
3860
3829
  type: "checkListItem"
3861
3830
  });
3862
3831
  },
3863
- badge: T("Mod-Shift-9"),
3832
+ badge: L("Mod-Shift-9"),
3864
3833
  key: "check_list",
3865
3834
  ...e.dictionary.slash_menu.check_list
3866
3835
  }), E(e, "paragraph") && t.push({
@@ -3869,7 +3838,7 @@ function dr(e) {
3869
3838
  type: "paragraph"
3870
3839
  });
3871
3840
  },
3872
- badge: T("Mod-Alt-0"),
3841
+ badge: L("Mod-Alt-0"),
3873
3842
  key: "paragraph",
3874
3843
  ...e.dictionary.slash_menu.paragraph
3875
3844
  }), E(e, "codeBlock") && t.push({
@@ -3878,7 +3847,7 @@ function dr(e) {
3878
3847
  type: "codeBlock"
3879
3848
  });
3880
3849
  },
3881
- badge: T("Mod-Alt-c"),
3850
+ badge: L("Mod-Alt-c"),
3882
3851
  key: "code_block",
3883
3852
  ...e.dictionary.slash_menu.code_block
3884
3853
  }), E(e, "table") && t.push({
@@ -4009,19 +3978,19 @@ function dr(e) {
4009
3978
  ...e.dictionary.slash_menu.emoji
4010
3979
  }), t;
4011
3980
  }
4012
- function pr(e, t) {
3981
+ function sr(e, t) {
4013
3982
  return e.filter(
4014
3983
  ({ title: n, aliases: o }) => n.toLowerCase().includes(t.toLowerCase()) || o && o.filter(
4015
3984
  (r) => r.toLowerCase().includes(t.toLowerCase())
4016
3985
  ).length !== 0
4017
3986
  );
4018
3987
  }
4019
- function go(e) {
3988
+ function uo(e) {
4020
3989
  return "pageBreak" in e.schema.blockSchema;
4021
3990
  }
4022
- function fr(e) {
3991
+ function ar(e) {
4023
3992
  const t = [];
4024
- return go(e) && t.push({
3993
+ return uo(e) && t.push({
4025
3994
  ...e.dictionary.slash_menu.page_break,
4026
3995
  onItemClick: () => {
4027
3996
  v(e, {
@@ -4031,21 +4000,21 @@ function fr(e) {
4031
4000
  key: "page_break"
4032
4001
  }), t;
4033
4002
  }
4034
- const bo = {
4035
- audio: vn(),
4036
- bulletListItem: Fn(),
4037
- checkListItem: $n(),
4038
- codeBlock: Mn(),
4039
- file: An(),
4040
- heading: Hn(),
4041
- image: Vn(),
4042
- numberedListItem: qn(),
4043
- paragraph: Qn(),
4044
- quote: eo(),
4045
- table: lo(),
4046
- toggleListItem: Gn(),
4047
- video: ho()
4048
- }, Co = Ke(
4003
+ const po = {
4004
+ audio: bn(),
4005
+ bulletListItem: Dn(),
4006
+ checkListItem: Rn(),
4007
+ codeBlock: wn(),
4008
+ file: Sn(),
4009
+ heading: Ln(),
4010
+ image: Hn(),
4011
+ numberedListItem: Fn(),
4012
+ paragraph: Zn(),
4013
+ quote: Xn(),
4014
+ table: ro(),
4015
+ toggleListItem: $n(),
4016
+ video: co()
4017
+ }, fo = Xe(
4049
4018
  {
4050
4019
  type: "textColor",
4051
4020
  propSchema: "string"
@@ -4070,7 +4039,7 @@ const bo = {
4070
4039
  return e.style.color;
4071
4040
  }
4072
4041
  }
4073
- ), ko = Ke(
4042
+ ), ho = Xe(
4074
4043
  {
4075
4044
  type: "backgroundColor",
4076
4045
  propSchema: "string"
@@ -4095,181 +4064,181 @@ const bo = {
4095
4064
  return e.style.backgroundColor;
4096
4065
  }
4097
4066
  }
4098
- ), ut = {
4099
- bold: F(kt, "boolean"),
4100
- italic: F(wt, "boolean"),
4101
- underline: F(Et, "boolean"),
4102
- strike: F(vt, "boolean"),
4103
- code: F(yt, "boolean"),
4104
- textColor: Co,
4105
- backgroundColor: ko
4106
- }, hr = Je(ut), dt = {
4067
+ ), it = {
4068
+ bold: F(gt, "boolean"),
4069
+ italic: F(Ct, "boolean"),
4070
+ underline: F(yt, "boolean"),
4071
+ strike: F(kt, "boolean"),
4072
+ code: F(bt, "boolean"),
4073
+ textColor: fo,
4074
+ backgroundColor: ho
4075
+ }, ir = Ge(it), ct = {
4107
4076
  text: { config: "text", implementation: {} },
4108
4077
  link: { config: "link", implementation: {} }
4109
- }, mr = Ge(
4110
- dt
4078
+ }, cr = ze(
4079
+ ct
4111
4080
  );
4112
- class pt extends rn {
4081
+ class lt extends Yt {
4113
4082
  static create(t) {
4114
- return new pt({
4115
- blockSpecs: (t == null ? void 0 : t.blockSpecs) ?? bo,
4116
- inlineContentSpecs: (t == null ? void 0 : t.inlineContentSpecs) ?? dt,
4117
- styleSpecs: (t == null ? void 0 : t.styleSpecs) ?? ut
4083
+ return new lt({
4084
+ blockSpecs: (t == null ? void 0 : t.blockSpecs) ?? po,
4085
+ inlineContentSpecs: (t == null ? void 0 : t.inlineContentSpecs) ?? ct,
4086
+ styleSpecs: (t == null ? void 0 : t.styleSpecs) ?? it
4118
4087
  });
4119
4088
  }
4120
4089
  }
4121
4090
  export {
4122
- bo as $,
4123
- qn as A,
4124
- Zn as B,
4125
- Gn as C,
4126
- Xn as D,
4127
- ir as E,
4128
- bn as F,
4129
- Jn as G,
4130
- ar as H,
4131
- Kn as I,
4132
- Qn as J,
4133
- Yn as K,
4134
- eo as L,
4135
- oo as M,
4136
- lo as N,
4137
- uo as O,
4138
- po as P,
4139
- fo as Q,
4140
- ho as R,
4141
- Nn as S,
4142
- ot as T,
4143
- cr as U,
4144
- go as V,
4145
- fr as W,
4146
- pt as X,
4147
- Rt as Y,
4148
- Te as Z,
4149
- Vt as _,
4150
- ct as a,
4151
- tr as a$,
4152
- ut as a0,
4153
- hr as a1,
4154
- dt as a2,
4155
- mr as a3,
4091
+ po as $,
4092
+ Fn as A,
4093
+ jn as B,
4094
+ $n as C,
4095
+ Un as D,
4096
+ er as E,
4097
+ pn as F,
4098
+ qn as G,
4099
+ Yo as H,
4100
+ zn as I,
4101
+ Zn as J,
4102
+ Gn as K,
4103
+ Xn as L,
4104
+ Qn as M,
4105
+ ro as N,
4106
+ so as O,
4107
+ ao as P,
4108
+ io as Q,
4109
+ co as R,
4110
+ Bn as S,
4111
+ et as T,
4112
+ tr as U,
4113
+ uo as V,
4114
+ ar as W,
4115
+ lt as X,
4116
+ Ot as Y,
4117
+ Le as Z,
4118
+ Ht as _,
4119
+ st as a,
4120
+ Go as a$,
4121
+ it as a0,
4122
+ ir as a1,
4123
+ ct as a2,
4124
+ cr as a3,
4156
4125
  E as a4,
4157
- lr as a5,
4158
- ur as a6,
4126
+ nr as a5,
4127
+ or as a6,
4159
4128
  k as a7,
4160
4129
  B as a8,
4161
- P as a9,
4162
- Wo as aA,
4163
- sr as aB,
4164
- Yo as aC,
4165
- Jo as aD,
4166
- Zo as aE,
4167
- Ko as aF,
4168
- qo as aG,
4169
- Qe as aH,
4170
- sn as aI,
4171
- an as aJ,
4172
- Qo as aK,
4173
- Go as aL,
4174
- Xo as aM,
4130
+ H as a9,
4131
+ Oo as aA,
4132
+ Qo as aB,
4133
+ zo as aC,
4134
+ $o as aD,
4135
+ Wo as aE,
4136
+ Uo as aF,
4137
+ Vo as aG,
4138
+ Je as aH,
4139
+ en as aI,
4140
+ tn as aJ,
4141
+ qo as aK,
4142
+ Fo as aL,
4143
+ jo as aM,
4175
4144
  U as aN,
4176
- ze as aO,
4177
- ye as aP,
4178
- Fo as aQ,
4179
- er as aR,
4180
- Do as aS,
4181
- pn as aT,
4182
- he as aU,
4183
- ge as aV,
4184
- be as aW,
4145
+ $e as aO,
4146
+ ke as aP,
4147
+ Ho as aQ,
4148
+ Zo as aR,
4149
+ To as aS,
4150
+ an as aT,
4151
+ fe as aU,
4152
+ me as aV,
4153
+ ge as aW,
4185
4154
  R as aX,
4186
- Ce as aY,
4187
- L as aZ,
4155
+ be as aY,
4156
+ T as aZ,
4188
4157
  A as a_,
4189
- nr as aa,
4190
- or as ab,
4191
- rr as ac,
4192
- Xt as ad,
4193
- O as ae,
4194
- $o as af,
4195
- Uo as ag,
4196
- Wt as ah,
4197
- zo as ai,
4158
+ Xo as aa,
4159
+ Jo as ab,
4160
+ Ko as ac,
4161
+ Ut as ad,
4162
+ P as ae,
4163
+ Do as af,
4164
+ _o as ag,
4165
+ Pt as ah,
4166
+ Ro as ai,
4198
4167
  G as aj,
4199
4168
  Y as ak,
4200
- ln as al,
4169
+ on as al,
4201
4170
  X as am,
4202
- et as an,
4171
+ Qe as an,
4203
4172
  Z as ao,
4204
- un as ap,
4205
- fe as aq,
4206
- Zt as ar,
4207
- jo as as,
4208
- me as at,
4209
- z as au,
4210
- Gt as av,
4211
- ke as aw,
4212
- xn as ax,
4213
- En as ay,
4214
- qt as az,
4215
- kn as b,
4173
+ rn as ap,
4174
+ pe as aq,
4175
+ jt as ar,
4176
+ Po as as,
4177
+ he as at,
4178
+ q as au,
4179
+ $t as av,
4180
+ Ce as aw,
4181
+ kn as ax,
4182
+ Cn as ay,
4183
+ Ft as az,
4184
+ hn as b,
4216
4185
  v as b0,
4217
- dr as b1,
4218
- pr as b2,
4219
- $t as b3,
4220
- Ut as b4,
4221
- zt as b5,
4222
- Vo as b6,
4186
+ rr as b1,
4187
+ sr as b2,
4188
+ Rt as b3,
4189
+ Vt as b4,
4190
+ Wt as b5,
4191
+ Io as b6,
4223
4192
  M as b7,
4224
- Ft as b8,
4225
- ie as b9,
4226
- jt as ba,
4227
- Jt as bb,
4228
- Ge as bc,
4229
- Le as bd,
4230
- qe as be,
4193
+ Dt as b8,
4194
+ ae as b9,
4195
+ _t as ba,
4196
+ qt as bb,
4197
+ ze as bc,
4198
+ Me as bd,
4199
+ Ue as be,
4231
4200
  I as bf,
4232
- Qt as bg,
4233
- Ke as bh,
4234
- Kt as bi,
4201
+ Zt as bg,
4202
+ Xe as bh,
4203
+ zt as bi,
4235
4204
  J as bj,
4236
- Xe as bk,
4205
+ Ze as bk,
4237
4206
  F as bl,
4238
- Je as bm,
4239
- rn as bn,
4240
- _t as bo,
4241
- T as bp,
4242
- _o as bq,
4207
+ Ge as bm,
4208
+ Yt as bn,
4209
+ It as bo,
4210
+ L as bp,
4211
+ Ao as bq,
4243
4212
  K as br,
4244
- Ro as bs,
4245
- se as bt,
4213
+ No as bs,
4214
+ re as bt,
4246
4215
  j as bu,
4247
- pe as bv,
4216
+ de as bv,
4248
4217
  $ as bw,
4249
- ae as bx,
4250
- Cn as c,
4251
- yn as d,
4252
- wn as e,
4253
- vn as f,
4254
- Bn as g,
4255
- Mn as h,
4256
- nt as i,
4257
- Ln as j,
4258
- Tn as k,
4259
- An as l,
4260
- In as m,
4261
- Hn as n,
4262
- Pn as o,
4263
- Pe as p,
4264
- On as q,
4265
- Dn as r,
4266
- _n as s,
4267
- Rn as t,
4268
- Vn as u,
4269
- Wn as v,
4270
- Fn as w,
4271
- jn as x,
4272
- $n as y,
4273
- zn as z
4218
+ se as bx,
4219
+ fn as c,
4220
+ mn as d,
4221
+ gn as e,
4222
+ bn as f,
4223
+ yn as g,
4224
+ wn as h,
4225
+ vn as i,
4226
+ En as j,
4227
+ xn as k,
4228
+ Sn as l,
4229
+ Mn as m,
4230
+ Ln as n,
4231
+ Tn as o,
4232
+ Oe as p,
4233
+ An as q,
4234
+ Nn as r,
4235
+ In as s,
4236
+ On as t,
4237
+ Hn as u,
4238
+ Pn as v,
4239
+ Dn as w,
4240
+ _n as x,
4241
+ Rn as y,
4242
+ Wn as z
4274
4243
  };
4275
- //# sourceMappingURL=BlockNoteSchema-oR047ACf.js.map
4244
+ //# sourceMappingURL=BlockNoteSchema-CZez1nQf.js.map