@blocknote/core 0.31.0 → 0.32.0-hackdays.0

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 (60) hide show
  1. package/dist/blocknote.cjs +8 -8
  2. package/dist/blocknote.cjs.map +1 -1
  3. package/dist/blocknote.js +467 -403
  4. package/dist/blocknote.js.map +1 -1
  5. package/dist/webpack-stats.json +1 -1
  6. package/package.json +2 -2
  7. package/src/api/nodeConversions/blockToNode.ts +6 -2
  8. package/src/editor/BlockNoteEditor.ts +41 -7
  9. package/src/editor/BlockNoteExtension.ts +2 -2
  10. package/src/extensions/Collaboration/CursorPlugin.ts +1 -1
  11. package/src/extensions/Collaboration/ForkYDocPlugin.ts +1 -1
  12. package/src/extensions/Collaboration/SyncPlugin.ts +1 -1
  13. package/src/extensions/Collaboration/UndoPlugin.ts +1 -1
  14. package/src/extensions/Comments/CommentsPlugin.ts +4 -0
  15. package/src/extensions/FilePanel/FilePanelPlugin.ts +4 -0
  16. package/src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts +4 -0
  17. package/src/extensions/LinkToolbar/LinkToolbarPlugin.ts +4 -0
  18. package/src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.ts +4 -0
  19. package/src/extensions/Placeholder/PlaceholderPlugin.ts +4 -0
  20. package/src/extensions/PreviousBlockType/PreviousBlockTypePlugin.ts +4 -0
  21. package/src/extensions/ShowSelection/ShowSelectionPlugin.ts +4 -0
  22. package/src/extensions/SideMenu/SideMenuPlugin.ts +4 -0
  23. package/src/extensions/SuggestionMenu/SuggestionPlugin.ts +26 -12
  24. package/src/extensions/TableHandles/TableHandlesPlugin.ts +4 -0
  25. package/types/src/editor/BlockNoteEditor.d.ts +7 -1
  26. package/types/src/editor/BlockNoteExtension.d.ts +1 -1
  27. package/types/src/extensions/Collaboration/CursorPlugin.d.ts +1 -1
  28. package/types/src/extensions/Collaboration/ForkYDocPlugin.d.ts +1 -1
  29. package/types/src/extensions/Collaboration/SyncPlugin.d.ts +1 -1
  30. package/types/src/extensions/Collaboration/UndoPlugin.d.ts +1 -1
  31. package/types/src/extensions/Comments/CommentsPlugin.d.ts +1 -0
  32. package/types/src/extensions/FilePanel/FilePanelPlugin.d.ts +1 -0
  33. package/types/src/extensions/FormattingToolbar/FormattingToolbarPlugin.d.ts +1 -0
  34. package/types/src/extensions/LinkToolbar/LinkToolbarPlugin.d.ts +1 -0
  35. package/types/src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.d.ts +1 -0
  36. package/types/src/extensions/Placeholder/PlaceholderPlugin.d.ts +1 -0
  37. package/types/src/extensions/PreviousBlockType/PreviousBlockTypePlugin.d.ts +1 -0
  38. package/types/src/extensions/ShowSelection/ShowSelectionPlugin.d.ts +1 -0
  39. package/types/src/extensions/SideMenu/SideMenuPlugin.d.ts +1 -0
  40. package/types/src/extensions/SuggestionMenu/SuggestionPlugin.d.ts +1 -0
  41. package/types/src/extensions/TableHandles/TableHandlesPlugin.d.ts +1 -0
  42. package/types/src/api/blockManipulation/commands/removeBlocks/removeBlocks.d.ts +0 -4
  43. package/types/src/api/blockManipulation/commands/removeBlocks/removeBlocks.test.d.ts +0 -1
  44. package/types/src/api/blockManipulation/transactions.test.d.ts +0 -0
  45. package/types/src/api/clipboard/clipboardExternal.test.d.ts +0 -1
  46. package/types/src/api/clipboard/clipboardInternal.test.d.ts +0 -1
  47. package/types/src/api/clipboard/testUtil.d.ts +0 -541
  48. package/types/src/api/exporters/html/htmlConversion.test.d.ts +0 -1
  49. package/types/src/api/exporters/markdown/markdownExporter.test.d.ts +0 -1
  50. package/types/src/api/nodeConversions/nodeConversions.test.d.ts +0 -1
  51. package/types/src/api/parsers/html/parseHTML.test.d.ts +0 -1
  52. package/types/src/api/parsers/markdown/parseMarkdown.test.d.ts +0 -1
  53. package/types/src/api/testUtil/cases/customBlocks.d.ts +0 -670
  54. package/types/src/api/testUtil/cases/customInlineContent.d.ts +0 -558
  55. package/types/src/api/testUtil/cases/customStyles.d.ts +0 -552
  56. package/types/src/api/testUtil/cases/defaultSchema.d.ts +0 -4
  57. package/types/src/api/testUtil/index.d.ts +0 -14
  58. package/types/src/api/testUtil/partialBlockTestUtil.d.ts +0 -9
  59. package/types/src/api/testUtil/paste.d.ts +0 -2
  60. package/types/src/blocks/CodeBlockContent/defaultSupportedLanguages.d.ts +0 -6
package/dist/blocknote.js CHANGED
@@ -1,10 +1,10 @@
1
1
  var so = Object.defineProperty;
2
2
  var io = (e, n, t) => n in e ? so(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
3
3
  var p = (e, n, t) => io(e, typeof n != "symbol" ? n + "" : n, t);
4
- import { Slice as K, Fragment as D, DOMSerializer as an, DOMParser as Fe, Node as ao } from "prosemirror-model";
4
+ import { Slice as K, Fragment as D, DOMSerializer as an, DOMParser as ze, Node as ao } from "prosemirror-model";
5
5
  import { ReplaceStep as cn, ReplaceAroundStep as tt, Mapping as co } from "prosemirror-transform";
6
- import { Extension as V, combineTransactionSteps as ln, getChangedRanges as dn, findChildrenInRange as nt, Node as ee, Mark as te, isTextSelection as un, InputRule as ie, callOrReturn as lo, getExtensionField as uo, mergeAttributes as gt, selectionToInsertionEnd as po, isNodeSelection as ot, posToDOMRect as Oe, getMarkRange as Lt, findChildren as At, findParentNode as ho, extensions as be, Editor as fo, createDocument as mo, getSchema as go } from "@tiptap/core";
7
- import { Plugin as L, PluginKey as U, TextSelection as H, NodeSelection as me, Selection as He, EditorState as bo } from "prosemirror-state";
6
+ import { Extension as V, combineTransactionSteps as ln, getChangedRanges as dn, findChildrenInRange as nt, Node as te, Mark as ne, isTextSelection as un, InputRule as ce, callOrReturn as lo, getExtensionField as uo, mergeAttributes as gt, selectionToInsertionEnd as po, isNodeSelection as ot, posToDOMRect as Re, getMarkRange as Lt, findChildren as At, findParentNode as ho, extensions as ke, Editor as fo, createDocument as mo, getSchema as go } from "@tiptap/core";
7
+ import { Plugin as A, PluginKey as U, TextSelection as H, NodeSelection as ge, Selection as De, EditorState as bo } from "prosemirror-state";
8
8
  import { v4 as pn } from "uuid";
9
9
  import { createHighlightPlugin as ko } from "prosemirror-highlight";
10
10
  import { createParser as wo } from "prosemirror-highlight/shiki";
@@ -15,14 +15,14 @@ import Eo from "@tiptap/extension-strike";
15
15
  import So from "@tiptap/extension-underline";
16
16
  import { TableCell as Bo } from "@tiptap/extension-table-cell";
17
17
  import { TableHeader as xo } from "@tiptap/extension-table-header";
18
- import { goToNextCell as Nt, columnResizing as To, tableEditing as Mo, TableView as Po, CellSelection as Ee, TableMap as Ht, addRowBefore as Io, addRowAfter as Lo, addColumnBefore as Ao, addColumnAfter as No, deleteRow as Ho, deleteColumn as Do, mergeCells as Oo, splitCell as Ro } from "prosemirror-tables";
18
+ import { goToNextCell as Nt, columnResizing as To, tableEditing as Mo, TableView as Po, CellSelection as Se, TableMap as Ht, addRowBefore as Io, addRowAfter as Lo, addColumnBefore as Ao, addColumnAfter as No, deleteRow as Ho, deleteColumn as Do, mergeCells as Oo, splitCell as Ro } from "prosemirror-tables";
19
19
  import { Gapcursor as Vo } from "@tiptap/extension-gapcursor";
20
20
  import { History as Uo } from "@tiptap/extension-history";
21
21
  import { Link as _o } from "@tiptap/extension-link";
22
22
  import { Text as $o } from "@tiptap/extension-text";
23
- import { yCursorPlugin as Fo, defaultSelectionBuilder as zo, ySyncPlugin as Wo, yUndoPlugin as jo, ySyncPluginKey as ae, getRelativeSelection as Go, absolutePositionToRelativePosition as qo, relativePositionToAbsolutePosition as Ko, yCursorPluginKey as Jo, yUndoPluginKey as Dt, undoCommand as Xo, redoCommand as Yo } from "y-prosemirror";
23
+ import { yCursorPlugin as Fo, defaultSelectionBuilder as zo, ySyncPlugin as Wo, yUndoPlugin as jo, ySyncPluginKey as le, getRelativeSelection as Go, absolutePositionToRelativePosition as qo, relativePositionToAbsolutePosition as Ko, yCursorPluginKey as Jo, yUndoPluginKey as Dt, undoCommand as Xo, redoCommand as Yo } from "y-prosemirror";
24
24
  import { DecorationSet as W, Decoration as J, EditorView as Zo } from "prosemirror-view";
25
- import * as pe from "yjs";
25
+ import * as he from "yjs";
26
26
  import { undo as Qo, redo as er } from "prosemirror-history";
27
27
  import { dropCursor as tr } from "prosemirror-dropcursor";
28
28
  import { e as nr } from "./en-qGo6sk9V.js";
@@ -39,7 +39,7 @@ function rr(e) {
39
39
  );
40
40
  return or(n);
41
41
  }
42
- const ze = V.create({
42
+ const We = V.create({
43
43
  name: "uniqueID",
44
44
  // we’ll set a very high priority to make sure this runs first
45
45
  // and is compatible with `appendTransaction` hooks of other extensions
@@ -114,7 +114,7 @@ const ze = V.create({
114
114
  addProseMirrorPlugins() {
115
115
  let e = null, n = !1;
116
116
  return [
117
- new L({
117
+ new A({
118
118
  key: new U("uniqueID"),
119
119
  appendTransaction: (t, o, r) => {
120
120
  const s = t.some((m) => m.docChanged) && !o.doc.eq(r.doc), i = this.options.filterTransaction && t.some((m) => {
@@ -139,10 +139,10 @@ const ze = V.create({
139
139
  if (P === null) {
140
140
  const y = o.doc.type.createAndFill().content;
141
141
  if (o.doc.content.findDiffStart(y) === null) {
142
- const ue = JSON.parse(
142
+ const se = JSON.parse(
143
143
  JSON.stringify(r.doc.toJSON())
144
144
  );
145
- if (ue.content[0].content[0].attrs.id = "initialBlockId", JSON.stringify(ue.content) === JSON.stringify(y.toJSON())) {
145
+ if (se.content[0].content[0].attrs.id = "initialBlockId", JSON.stringify(se.content) === JSON.stringify(y.toJSON())) {
146
146
  a.setNodeMarkup(C, void 0, {
147
147
  ...w.attrs,
148
148
  [l]: "initialBlockId"
@@ -235,12 +235,12 @@ function Ot(e) {
235
235
  function hn(e) {
236
236
  return typeof e != "string" && e.type === "link";
237
237
  }
238
- function ce(e) {
238
+ function de(e) {
239
239
  return typeof e != "string" && e.type === "text";
240
240
  }
241
241
  function rt(e) {
242
242
  var n, t, o, r, s;
243
- return bt(e) ? { ...e } : ye(e) ? {
243
+ return bt(e) ? { ...e } : Ce(e) ? {
244
244
  type: "tableCell",
245
245
  content: [].concat(e.content),
246
246
  props: {
@@ -262,13 +262,13 @@ function rt(e) {
262
262
  }
263
263
  };
264
264
  }
265
- function ye(e) {
265
+ function Ce(e) {
266
266
  return e != null && typeof e != "string" && !Array.isArray(e) && e.type === "tableCell";
267
267
  }
268
268
  function bt(e) {
269
- return ye(e) && e.props !== void 0 && e.content !== void 0;
269
+ return Ce(e) && e.props !== void 0 && e.content !== void 0;
270
270
  }
271
- function Ce(e) {
271
+ function ve(e) {
272
272
  return bt(e) ? e.props.colspan ?? 1 : 1;
273
273
  }
274
274
  function st(e) {
@@ -285,23 +285,23 @@ function xc(e, n = !0) {
285
285
  throw new Error("Object must be empty " + JSON.stringify(e));
286
286
  }
287
287
  const sr = () => typeof navigator < "u" && (/Mac/.test(navigator.platform) || /AppleWebKit/.test(navigator.userAgent) && /Mobile\/\w+/.test(navigator.userAgent));
288
- function Y(e, n = "Ctrl") {
288
+ function Z(e, n = "Ctrl") {
289
289
  return sr() ? e.replace("Mod", "⌘") : e.replace("Mod", n);
290
290
  }
291
- function Z(...e) {
291
+ function Q(...e) {
292
292
  return e.filter((n) => n).join(" ");
293
293
  }
294
294
  const Tc = () => /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
295
295
  function G(e, n, t, o) {
296
296
  const r = document.createElement("div");
297
- r.className = Z(
297
+ r.className = Q(
298
298
  "bn-block-content",
299
299
  t.class
300
300
  ), r.setAttribute("data-content-type", e);
301
301
  for (const [i, a] of Object.entries(t))
302
302
  i !== "class" && r.setAttribute(i, a);
303
303
  const s = document.createElement(n);
304
- s.className = Z(
304
+ s.className = Q(
305
305
  "bn-inline-content",
306
306
  o.class
307
307
  );
@@ -315,7 +315,7 @@ function G(e, n, t, o) {
315
315
  };
316
316
  }
317
317
  const Rt = (e, n) => {
318
- let t = de(e, n.pmSchema);
318
+ let t = pe(e, n.pmSchema);
319
319
  t.type.name === "blockContainer" && (t = t.firstChild);
320
320
  const o = n.pmSchema.nodes[t.type.name].spec.toDOM;
321
321
  if (o === void 0)
@@ -339,7 +339,7 @@ function Mc(e) {
339
339
  }
340
340
  }
341
341
  }
342
- const x = {
342
+ const T = {
343
343
  backgroundColor: {
344
344
  default: "default"
345
345
  },
@@ -351,7 +351,7 @@ const x = {
351
351
  values: ["left", "center", "right", "justify"]
352
352
  }
353
353
  }, fn = ["backgroundColor", "textColor"];
354
- function Re(e) {
354
+ function Ve(e) {
355
355
  return "data-" + e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
356
356
  }
357
357
  function Pc(e) {
@@ -359,7 +359,7 @@ function Pc(e) {
359
359
  return !n.length || // invalid?
360
360
  n[n.length - 1] === "" ? e : n[n.length - 1];
361
361
  }
362
- function Se(e) {
362
+ function Be(e) {
363
363
  const n = {};
364
364
  return Object.entries(e).filter(([t, o]) => !fn.includes(t)).forEach(([t, o]) => {
365
365
  n[t] = {
@@ -369,7 +369,7 @@ function Se(e) {
369
369
  // value is the same as its default, we don't display an HTML
370
370
  // attribute for it.
371
371
  parseHTML: (r) => {
372
- const s = r.getAttribute(Re(t));
372
+ const s = r.getAttribute(Ve(t));
373
373
  if (s === null)
374
374
  return null;
375
375
  if (o.default === void 0 && o.type === "boolean" || o.default !== void 0 && typeof o.default == "boolean")
@@ -381,7 +381,7 @@ function Se(e) {
381
381
  return s;
382
382
  },
383
383
  renderHTML: (r) => r[t] !== o.default ? {
384
- [Re(t)]: r[t]
384
+ [Ve(t)]: r[t]
385
385
  } : {}
386
386
  };
387
387
  }), n;
@@ -399,20 +399,20 @@ function ir(e, n, t, o) {
399
399
  throw new Error("Block type does not match");
400
400
  return a;
401
401
  }
402
- function Pe(e, n, t, o, r = !1, s) {
402
+ function Ie(e, n, t, o, r = !1, s) {
403
403
  const i = document.createElement("div");
404
404
  if (s !== void 0)
405
405
  for (const [a, c] of Object.entries(s))
406
406
  a !== "class" && i.setAttribute(a, c);
407
- i.className = Z(
407
+ i.className = Q(
408
408
  "bn-block-content",
409
409
  (s == null ? void 0 : s.class) || ""
410
410
  ), i.setAttribute("data-content-type", n);
411
411
  for (const [a, c] of Object.entries(t)) {
412
412
  const d = o[a].default;
413
- !fn.includes(a) && c !== d && i.setAttribute(Re(a), c);
413
+ !fn.includes(a) && c !== d && i.setAttribute(Ve(a), c);
414
414
  }
415
- return r && i.setAttribute("data-file-block", ""), i.appendChild(e.dom), e.contentDOM !== void 0 && (e.contentDOM.className = Z(
415
+ return r && i.setAttribute("data-file-block", ""), i.appendChild(e.dom), e.contentDOM !== void 0 && (e.contentDOM.className = Q(
416
416
  "bn-inline-content",
417
417
  e.contentDOM.className
418
418
  )), {
@@ -421,7 +421,7 @@ function Pe(e, n, t, o, r = !1, s) {
421
421
  };
422
422
  }
423
423
  function q(e) {
424
- return ee.create(e);
424
+ return te.create(e);
425
425
  }
426
426
  function mn(e, n) {
427
427
  return {
@@ -429,7 +429,7 @@ function mn(e, n) {
429
429
  implementation: n
430
430
  };
431
431
  }
432
- function ne(e, n, t) {
432
+ function oe(e, n, t) {
433
433
  return mn(
434
434
  {
435
435
  type: e.name,
@@ -472,7 +472,7 @@ function cr(e, n) {
472
472
  }
473
473
  }), t;
474
474
  }
475
- function Be(e, n) {
475
+ function xe(e, n) {
476
476
  const t = q({
477
477
  name: e.type,
478
478
  content: e.content === "inline" ? "inline*" : "",
@@ -480,14 +480,14 @@ function Be(e, n) {
480
480
  selectable: e.isSelectable ?? !0,
481
481
  isolating: !0,
482
482
  addAttributes() {
483
- return Se(e.propSchema);
483
+ return Be(e.propSchema);
484
484
  },
485
485
  parseHTML() {
486
486
  return cr(e, n.parse);
487
487
  },
488
488
  renderHTML({ HTMLAttributes: o }) {
489
489
  const r = document.createElement("div");
490
- return Pe(
490
+ return Ie(
491
491
  {
492
492
  dom: r,
493
493
  contentDOM: e.content === "inline" ? r : void 0
@@ -507,7 +507,7 @@ function Be(e, n) {
507
507
  r,
508
508
  this.editor,
509
509
  e.type
510
- ), i = ((l = this.options.domAttributes) == null ? void 0 : l.blockContent) || {}, a = n.render(s, r), c = Pe(
510
+ ), i = ((l = this.options.domAttributes) == null ? void 0 : l.blockContent) || {}, a = n.render(s, r), c = Ie(
511
511
  a,
512
512
  s.type,
513
513
  s.props,
@@ -527,7 +527,7 @@ function Be(e, n) {
527
527
  toInternalHTML: (o, r) => {
528
528
  var a;
529
529
  const s = ((a = t.options.domAttributes) == null ? void 0 : a.blockContent) || {}, i = n.render(o, r);
530
- return Pe(
530
+ return Ie(
531
531
  i,
532
532
  o.type,
533
533
  o.props,
@@ -546,7 +546,7 @@ function Be(e, n) {
546
546
  o,
547
547
  r
548
548
  );
549
- return i === void 0 && (i = n.render(o, r)), Pe(
549
+ return i === void 0 && (i = n.render(o, r)), Ie(
550
550
  i,
551
551
  o.type,
552
552
  o.props,
@@ -636,10 +636,10 @@ function kt(e, n) {
636
636
  };
637
637
  }
638
638
  }
639
- function Q(e) {
639
+ function ee(e) {
640
640
  return kt(e.node, e.posBeforeNode);
641
641
  }
642
- function xe(e) {
642
+ function Te(e) {
643
643
  if (!e.nodeAfter)
644
644
  throw new Error(
645
645
  `Attempted to get blockContainer node at position ${e.pos} but a node at this position does not exist`
@@ -648,11 +648,11 @@ function xe(e) {
648
648
  }
649
649
  function v(e) {
650
650
  const n = X(e.doc, e.selection.anchor);
651
- return Q(n);
651
+ return ee(n);
652
652
  }
653
- function We(e) {
653
+ function je(e) {
654
654
  const n = X(e.doc, e.selection.anchor);
655
- return Q(n);
655
+ return ee(n);
656
656
  }
657
657
  function M(e) {
658
658
  return "doc" in e ? e.doc.type.schema : e.type.schema;
@@ -660,17 +660,17 @@ function M(e) {
660
660
  function bn(e) {
661
661
  return e.cached.blockNoteEditor;
662
662
  }
663
- function Te(e) {
663
+ function Me(e) {
664
664
  return bn(e).schema;
665
665
  }
666
666
  function wt(e) {
667
- return Te(e).blockSchema;
667
+ return Me(e).blockSchema;
668
668
  }
669
669
  function yt(e) {
670
- return Te(e).inlineContentSchema;
670
+ return Me(e).inlineContentSchema;
671
671
  }
672
- function ge(e) {
673
- return Te(e).styleSchema;
672
+ function be(e) {
673
+ return Me(e).styleSchema;
674
674
  }
675
675
  function Ct(e) {
676
676
  return bn(e).blockCache;
@@ -694,13 +694,13 @@ function kn(e, n, t) {
694
694
  }), d.cells = a.content.content.map((u, h) => (r[l] || (r[l] = []), r[l][h] = u.type.name === "tableHeader", {
695
695
  type: "tableCell",
696
696
  content: u.content.content.map(
697
- (m) => je(m, n, t)
697
+ (m) => Ge(m, n, t)
698
698
  ).reduce(
699
699
  (m, g) => {
700
700
  if (!m.length)
701
701
  return g;
702
702
  const b = m[m.length - 1], k = g[0];
703
- return k && ce(b) && ce(k) && JSON.stringify(b.styles) === JSON.stringify(k.styles) ? (b.text += `
703
+ return k && de(b) && de(k) && JSON.stringify(b.styles) === JSON.stringify(k.styles) ? (b.text += `
704
704
  ` + k.text, m.push(...g.slice(1)), m) : (m.push(...g), m);
705
705
  },
706
706
  []
@@ -720,13 +720,13 @@ function kn(e, n, t) {
720
720
  r != null && r.every((c) => c[a]) && (o.headerCols = (o.headerCols ?? 0) + 1);
721
721
  return o;
722
722
  }
723
- function je(e, n, t) {
723
+ function Ge(e, n, t) {
724
724
  const o = [];
725
725
  let r;
726
726
  return e.content.forEach((s) => {
727
727
  if (s.type.name === "hardBreak") {
728
728
  if (r)
729
- if (ce(r))
729
+ if (de(r))
730
730
  r.text += `
731
731
  `;
732
732
  else if (Ot(r))
@@ -772,7 +772,7 @@ function je(e, n, t) {
772
772
  else
773
773
  throw new j(l.propSchema);
774
774
  }
775
- r ? ce(r) ? a ? (o.push(r), r = {
775
+ r ? de(r) ? a ? (o.push(r), r = {
776
776
  type: "link",
777
777
  href: a.attrs.href,
778
778
  content: [
@@ -834,7 +834,7 @@ function it(e, n, t) {
834
834
  a in l && (o[a] = c);
835
835
  }
836
836
  let s;
837
- return r.content === "styled" ? s = je(
837
+ return r.content === "styled" ? s = Ge(
838
838
  e,
839
839
  n,
840
840
  t
@@ -844,7 +844,7 @@ function it(e, n, t) {
844
844
  content: s
845
845
  };
846
846
  }
847
- function E(e, n, t = wt(n), o = yt(n), r = ge(n), s = Ct(n)) {
847
+ function E(e, n, t = wt(n), o = yt(n), r = be(n), s = Ct(n)) {
848
848
  var g;
849
849
  if (!e.type.isInGroup("bnBlock"))
850
850
  throw Error("Node should be a bnBlock, but is instead: " + e.type.name);
@@ -853,7 +853,7 @@ function E(e, n, t = wt(n), o = yt(n), r = ge(n), s = Ct(n)) {
853
853
  return i;
854
854
  const a = kt(e, 0);
855
855
  let c = a.bnBlock.node.attrs.id;
856
- c === null && (c = ze.options.generateID());
856
+ c === null && (c = We.options.generateID());
857
857
  const l = t[a.blockNoteType];
858
858
  if (!l)
859
859
  throw Error("Block is of an unrecognized type: " + a.blockNoteType);
@@ -882,7 +882,7 @@ function E(e, n, t = wt(n), o = yt(n), r = ge(n), s = Ct(n)) {
882
882
  if (u.content === "inline") {
883
883
  if (!a.isBlockContainer)
884
884
  throw new Error("impossible");
885
- f = je(
885
+ f = Ge(
886
886
  a.blockContent.node,
887
887
  o,
888
888
  r
@@ -908,7 +908,7 @@ function E(e, n, t = wt(n), o = yt(n), r = ge(n), s = Ct(n)) {
908
908
  };
909
909
  return s == null || s.set(e, m), m;
910
910
  }
911
- function lr(e, n, t = wt(n), o = yt(n), r = ge(n), s = Ct(n)) {
911
+ function lr(e, n, t = wt(n), o = yt(n), r = be(n), s = Ct(n)) {
912
912
  const i = [];
913
913
  return e.firstChild.descendants((a) => (i.push(
914
914
  E(
@@ -921,7 +921,7 @@ function lr(e, n, t = wt(n), o = yt(n), r = ge(n), s = Ct(n)) {
921
921
  )
922
922
  ), !1)), i;
923
923
  }
924
- function dr(e, n, t = wt(n), o = yt(n), r = ge(n), s = Ct(n)) {
924
+ function dr(e, n, t = wt(n), o = yt(n), r = be(n), s = Ct(n)) {
925
925
  function i(a, c, l) {
926
926
  if (a.type.name !== "blockGroup")
927
927
  throw new Error("unexpected");
@@ -992,7 +992,7 @@ function Vt(e, n, t, o) {
992
992
  return e.dom.setAttribute("data-inline-content-type", n), Object.entries(t).filter(([r, s]) => {
993
993
  const i = o[r];
994
994
  return s !== i.default;
995
- }).map(([r, s]) => [Re(r), s]).forEach(([r, s]) => e.dom.setAttribute(r, s)), e.contentDOM !== void 0 && e.contentDOM.setAttribute("data-editable", ""), e;
995
+ }).map(([r, s]) => [Ve(r), s]).forEach(([r, s]) => e.dom.setAttribute(r, s)), e.contentDOM !== void 0 && e.contentDOM.setAttribute("data-editable", ""), e;
996
996
  }
997
997
  function ur(e) {
998
998
  return {
@@ -1037,7 +1037,7 @@ function fr(e) {
1037
1037
  ];
1038
1038
  }
1039
1039
  function Ic(e, n) {
1040
- const t = ee.create({
1040
+ const t = te.create({
1041
1041
  name: e.type,
1042
1042
  inline: !0,
1043
1043
  group: "inline",
@@ -1045,7 +1045,7 @@ function Ic(e, n) {
1045
1045
  atom: e.content === "none",
1046
1046
  content: e.content === "styled" ? "inline*" : "",
1047
1047
  addAttributes() {
1048
- return Se(e.propSchema);
1048
+ return Be(e.propSchema);
1049
1049
  },
1050
1050
  addKeyboardShortcuts() {
1051
1051
  return ur(e);
@@ -1126,7 +1126,7 @@ function yn(e, n) {
1126
1126
  implementation: n
1127
1127
  };
1128
1128
  }
1129
- function re(e, n) {
1129
+ function ie(e, n) {
1130
1130
  return yn(
1131
1131
  {
1132
1132
  type: e.name,
@@ -1154,7 +1154,7 @@ function br(e) {
1154
1154
  ];
1155
1155
  }
1156
1156
  function Lc(e, n) {
1157
- const t = te.create({
1157
+ const t = ne.create({
1158
1158
  name: e.type,
1159
1159
  addAttributes() {
1160
1160
  return mr(e.propSchema);
@@ -1182,7 +1182,7 @@ function Lc(e, n) {
1182
1182
  mark: t
1183
1183
  });
1184
1184
  }
1185
- function oe(e) {
1185
+ function re(e) {
1186
1186
  const { height: n, width: t } = vt(e), o = new Array(n).fill(!1).map(() => new Array(t).fill(null)), r = (s, i) => {
1187
1187
  for (let a = s; a < n; a++)
1188
1188
  for (let c = i; c < t; c++)
@@ -1194,7 +1194,7 @@ function oe(e) {
1194
1194
  };
1195
1195
  for (let s = 0; s < e.content.rows.length; s++)
1196
1196
  for (let i = 0; i < e.content.rows[s].cells.length; i++) {
1197
- const a = rt(e.content.rows[s].cells[i]), c = st(a), l = Ce(a), { row: d, col: u } = r(s, i);
1197
+ const a = rt(e.content.rows[s].cells[i]), c = st(a), l = ve(a), { row: d, col: u } = r(s, i);
1198
1198
  for (let h = d; h < d + c; h++)
1199
1199
  for (let f = u; f < u + l; f++) {
1200
1200
  if (o[h][f])
@@ -1212,13 +1212,13 @@ function oe(e) {
1212
1212
  }
1213
1213
  return o;
1214
1214
  }
1215
- function ve(e) {
1215
+ function Ee(e) {
1216
1216
  const n = /* @__PURE__ */ new Set();
1217
1217
  return e.map((t) => ({
1218
1218
  cells: t.map((o) => n.has(o.row + ":" + o.col) ? !1 : (n.add(o.row + ":" + o.col), o.cell)).filter((o) => o !== !1)
1219
1219
  }));
1220
1220
  }
1221
- function le(e, n, t = oe(n)) {
1221
+ function ue(e, n, t = re(n)) {
1222
1222
  for (let o = 0; o < t.length; o++)
1223
1223
  for (let r = 0; r < t[o].length; r++) {
1224
1224
  const s = t[o][r];
@@ -1235,11 +1235,11 @@ function vt(e) {
1235
1235
  return e.content.rows.forEach((o) => {
1236
1236
  let r = 0;
1237
1237
  o.cells.forEach((s) => {
1238
- r += Ce(s);
1238
+ r += ve(s);
1239
1239
  }), t = Math.max(t, r);
1240
1240
  }), { height: n, width: t };
1241
1241
  }
1242
- function vn(e, n, t = oe(n)) {
1242
+ function vn(e, n, t = re(n)) {
1243
1243
  var r;
1244
1244
  const o = (r = t[e.row]) == null ? void 0 : r[e.col];
1245
1245
  if (o)
@@ -1251,7 +1251,7 @@ function vn(e, n, t = oe(n)) {
1251
1251
  }
1252
1252
  function at(e, n) {
1253
1253
  var s;
1254
- const t = oe(e);
1254
+ const t = re(e);
1255
1255
  if (n < 0 || n >= t.length)
1256
1256
  return [];
1257
1257
  let o = 0;
@@ -1272,7 +1272,7 @@ function at(e, n) {
1272
1272
  }
1273
1273
  function ct(e, n) {
1274
1274
  var s;
1275
- const t = oe(e);
1275
+ const t = re(e);
1276
1276
  if (n < 0 || n >= t[0].length)
1277
1277
  return [];
1278
1278
  let o = 0;
@@ -1291,15 +1291,15 @@ function ct(e, n) {
1291
1291
  );
1292
1292
  return r.filter((i, a) => r.findIndex((c) => c.row === i.row && c.col === i.col) === a);
1293
1293
  }
1294
- function kr(e, n, t, o = oe(e)) {
1295
- const { col: r } = le(
1294
+ function kr(e, n, t, o = re(e)) {
1295
+ const { col: r } = ue(
1296
1296
  {
1297
1297
  row: 0,
1298
1298
  col: n
1299
1299
  },
1300
1300
  e,
1301
1301
  o
1302
- ), { col: s } = le(
1302
+ ), { col: s } = ue(
1303
1303
  {
1304
1304
  row: 0,
1305
1305
  col: t
@@ -1310,17 +1310,17 @@ function kr(e, n, t, o = oe(e)) {
1310
1310
  return o.forEach((i) => {
1311
1311
  const [a] = i.splice(r, 1);
1312
1312
  i.splice(s, 0, a);
1313
- }), ve(o);
1313
+ }), Ee(o);
1314
1314
  }
1315
- function wr(e, n, t, o = oe(e)) {
1316
- const { row: r } = le(
1315
+ function wr(e, n, t, o = re(e)) {
1316
+ const { row: r } = ue(
1317
1317
  {
1318
1318
  row: n,
1319
1319
  col: 0
1320
1320
  },
1321
1321
  e,
1322
1322
  o
1323
- ), { row: s } = le(
1323
+ ), { row: s } = ue(
1324
1324
  {
1325
1325
  row: t,
1326
1326
  col: 0
@@ -1328,14 +1328,14 @@ function wr(e, n, t, o = oe(e)) {
1328
1328
  e,
1329
1329
  o
1330
1330
  ), [i] = o.splice(r, 1);
1331
- return o.splice(s, 0, i), ve(o);
1331
+ return o.splice(s, 0, i), Ee(o);
1332
1332
  }
1333
1333
  function lt(e) {
1334
- return e ? ye(e) ? lt(e.content) : typeof e == "string" ? e.length === 0 : Array.isArray(e) ? e.every(
1335
- (n) => typeof n == "string" ? n.length === 0 : ce(n) ? n.text.length === 0 : hn(n) ? typeof n.content == "string" ? n.content.length === 0 : n.content.every((t) => t.text.length === 0) : !1
1334
+ return e ? Ce(e) ? lt(e.content) : typeof e == "string" ? e.length === 0 : Array.isArray(e) ? e.every(
1335
+ (n) => typeof n == "string" ? n.length === 0 : de(n) ? n.text.length === 0 : hn(n) ? typeof n.content == "string" ? n.content.length === 0 : n.content.every((t) => t.text.length === 0) : !1
1336
1336
  ) : !1 : !0;
1337
1337
  }
1338
- function yr(e, n, t = oe(e)) {
1338
+ function yr(e, n, t = re(e)) {
1339
1339
  if (n === "columns") {
1340
1340
  let s = 0;
1341
1341
  for (let i = t[0].length - 1; i >= 0 && t.every(
@@ -1349,7 +1349,7 @@ function yr(e, n, t = oe(e)) {
1349
1349
  );
1350
1350
  t[i] = t[i].slice(0, a);
1351
1351
  }
1352
- return ve(t);
1352
+ return Ee(t);
1353
1353
  }
1354
1354
  let o = 0;
1355
1355
  for (let s = t.length - 1; s >= 0 && t[s].every(
@@ -1357,9 +1357,9 @@ function yr(e, n, t = oe(e)) {
1357
1357
  ); s--)
1358
1358
  o++;
1359
1359
  const r = Math.min(o, t.length - 1);
1360
- return t.splice(t.length - r, r), ve(t);
1360
+ return t.splice(t.length - r, r), Ee(t);
1361
1361
  }
1362
- function Cr(e, n, t, o = oe(e)) {
1362
+ function Cr(e, n, t, o = re(e)) {
1363
1363
  const { width: r, height: s } = vt(e);
1364
1364
  if (n === "columns")
1365
1365
  o.forEach((i, a) => {
@@ -1387,7 +1387,7 @@ function Cr(e, n, t, o = oe(e)) {
1387
1387
  o.push(a);
1388
1388
  }
1389
1389
  else t < 0 && o.splice(s + t, -1 * t);
1390
- return ve(o);
1390
+ return Ee(o);
1391
1391
  }
1392
1392
  function En(e, n, t) {
1393
1393
  const o = at(e, t);
@@ -1401,16 +1401,16 @@ function En(e, n, t) {
1401
1401
  }
1402
1402
  function Sn(e, n, t) {
1403
1403
  const o = ct(e, t);
1404
- if (!o.some((c) => Ce(c.cell) > 1))
1404
+ if (!o.some((c) => ve(c.cell) > 1))
1405
1405
  return !0;
1406
1406
  let s = t, i = t;
1407
1407
  return o.forEach((c) => {
1408
- const l = Ce(c.cell);
1408
+ const l = ve(c.cell);
1409
1409
  s = Math.max(s, c.col + l - 1), i = Math.min(i, c.col);
1410
1410
  }), n < t ? t === s : t === i;
1411
1411
  }
1412
1412
  function vr(e, n, t) {
1413
- const o = le(e, t), r = le(n, t);
1413
+ const o = ue(e, t), r = ue(n, t);
1414
1414
  return o.col === r.col;
1415
1415
  }
1416
1416
  function Ut(e, n, t, o) {
@@ -1420,9 +1420,9 @@ function Ut(e, n, t, o) {
1420
1420
  if (!c)
1421
1421
  throw new Error(`style ${i} not found in styleSchema`);
1422
1422
  if (c.propSchema === "boolean")
1423
- r.push(n.mark(i));
1423
+ a && r.push(n.mark(i));
1424
1424
  else if (c.propSchema === "string")
1425
- r.push(n.mark(i, { stringValue: a }));
1425
+ a && r.push(n.mark(i, { stringValue: a }));
1426
1426
  else
1427
1427
  throw new j(c.propSchema);
1428
1428
  }
@@ -1460,26 +1460,26 @@ function dt(e, n, t, o) {
1460
1460
  );
1461
1461
  return r;
1462
1462
  }
1463
- function F(e, n, t, o = ge(n)) {
1463
+ function F(e, n, t, o = be(n)) {
1464
1464
  const r = [];
1465
1465
  for (const s of e)
1466
1466
  typeof s == "string" ? r.push(
1467
1467
  ...dt(s, n, o, t)
1468
- ) : hn(s) ? r.push(...Er(s, n, o)) : ce(s) ? r.push(
1468
+ ) : hn(s) ? r.push(...Er(s, n, o)) : de(s) ? r.push(
1469
1469
  ...dt([s], n, o, t)
1470
1470
  ) : r.push(
1471
1471
  Bn(s, n, o)
1472
1472
  );
1473
1473
  return r;
1474
1474
  }
1475
- function Ge(e, n, t = ge(n)) {
1475
+ function qe(e, n, t = be(n)) {
1476
1476
  const o = [], r = new Array(e.headerRows ?? 0).fill(!0), s = new Array(e.headerCols ?? 0).fill(!0), i = e.columnWidths ?? [];
1477
1477
  for (let a = 0; a < e.rows.length; a++) {
1478
1478
  const c = e.rows[a], l = [], d = r[a];
1479
1479
  for (let h = 0; h < c.cells.length; h++) {
1480
1480
  const f = c.cells[h], m = s[h], g = void 0;
1481
1481
  let b = null;
1482
- const k = le(
1482
+ const k = ue(
1483
1483
  {
1484
1484
  row: a,
1485
1485
  col: h
@@ -1489,14 +1489,14 @@ function Ge(e, n, t = ge(n)) {
1489
1489
  let w = i[k.col] ? [i[k.col]] : null;
1490
1490
  if (f) if (typeof f == "string")
1491
1491
  b = n.text(f);
1492
- else if (ye(f)) {
1492
+ else if (Ce(f)) {
1493
1493
  f.content && (b = F(
1494
1494
  f.content,
1495
1495
  n,
1496
1496
  "tableParagraph",
1497
1497
  t
1498
1498
  ));
1499
- const B = Ce(f);
1499
+ const B = ve(f);
1500
1500
  B > 1 && (w = new Array(B).fill(!1).map((P, $) => i[k.col + $] ?? void 0));
1501
1501
  } else
1502
1502
  b = F(
@@ -1507,7 +1507,7 @@ function Ge(e, n, t = ge(n)) {
1507
1507
  );
1508
1508
  const C = n.nodes[m || d ? "tableHeader" : "tableCell"].createChecked(
1509
1509
  {
1510
- ...ye(f) ? f.props : {},
1510
+ ...Ce(f) ? f.props : {},
1511
1511
  colwidth: w
1512
1512
  },
1513
1513
  n.nodes.tableParagraph.createChecked(g, b)
@@ -1542,19 +1542,19 @@ function Bn(e, n, t) {
1542
1542
  );
1543
1543
  o = n.nodes[r].createChecked(e.props, s);
1544
1544
  } else if (e.content.type === "tableContent") {
1545
- const s = Ge(e.content, n, t);
1545
+ const s = qe(e.content, n, t);
1546
1546
  o = n.nodes[r].createChecked(e.props, s);
1547
1547
  } else
1548
1548
  throw new j(e.content.type);
1549
1549
  return o;
1550
1550
  }
1551
- function de(e, n, t = ge(n)) {
1551
+ function pe(e, n, t = be(n)) {
1552
1552
  let o = e.id;
1553
- o === void 0 && (o = ze.options.generateID());
1553
+ o === void 0 && (o = We.options.generateID());
1554
1554
  const r = [];
1555
1555
  if (e.children)
1556
1556
  for (const i of e.children)
1557
- r.push(de(i, n, t));
1557
+ r.push(pe(i, n, t));
1558
1558
  if (!e.type || // can happen if block.type is not defined (this should create the default node)
1559
1559
  n.nodes[e.type].isInGroup("blockContent")) {
1560
1560
  const i = Bn(
@@ -1650,7 +1650,7 @@ function Br(e, n = []) {
1650
1650
  }
1651
1651
  function xr(e, n, t, o = "before") {
1652
1652
  const r = typeof t == "string" ? t : t.id, s = M(e), i = n.map(
1653
- (d) => de(d, s)
1653
+ (d) => pe(d, s)
1654
1654
  ), a = _(r, e.doc);
1655
1655
  if (!a)
1656
1656
  throw new Error(`Block with ID ${r} not found`);
@@ -1663,7 +1663,7 @@ function xr(e, n, t, o = "before") {
1663
1663
  }
1664
1664
  function _t(e, n, t) {
1665
1665
  const o = M(e), r = t.map(
1666
- (d) => de(d, o)
1666
+ (d) => pe(d, o)
1667
1667
  ), s = new Set(
1668
1668
  n.map(
1669
1669
  (d) => typeof d == "string" ? d : d.id
@@ -1701,7 +1701,7 @@ const I = (e, n) => ({
1701
1701
  dispatch: o
1702
1702
  }) => (o && xn(t, e, n), !0);
1703
1703
  function xn(e, n, t, o, r) {
1704
- const s = xe(e.doc.resolve(n)), i = M(e);
1704
+ const s = Te(e.doc.resolve(n)), i = M(e);
1705
1705
  if (o !== void 0 && r !== void 0 && o > r)
1706
1706
  throw new Error("Invalid replaceFromPos or replaceToPos");
1707
1707
  const a = i.nodes[s.blockNoteType], c = i.nodes[t.type || s.blockNoteType], l = c.isInGroup("bnBlock") ? c : i.nodes.blockContainer;
@@ -1723,7 +1723,7 @@ function xn(e, n, t, o, r) {
1723
1723
  e.replaceWith(
1724
1724
  s.bnBlock.beforePos,
1725
1725
  s.bnBlock.afterPos,
1726
- de(
1726
+ pe(
1727
1727
  {
1728
1728
  children: d.children,
1729
1729
  // if no children are passed in, use existing children
@@ -1752,7 +1752,7 @@ function Tr(e, n, t, o, r, s, i) {
1752
1752
  else if (Array.isArray(e.content))
1753
1753
  c = F(e.content, a, o.name);
1754
1754
  else if (e.content.type === "tableContent")
1755
- c = Ge(e.content, a);
1755
+ c = qe(e.content, a);
1756
1756
  else
1757
1757
  throw new j(e.content.type);
1758
1758
  else
@@ -1793,7 +1793,7 @@ function Tr(e, n, t, o, r, s, i) {
1793
1793
  function $t(e, n, t) {
1794
1794
  const o = M(n);
1795
1795
  if (e.children !== void 0 && e.children.length > 0) {
1796
- const r = e.children.map((s) => de(s, o));
1796
+ const r = e.children.map((s) => pe(s, o));
1797
1797
  if (t.childContainer)
1798
1798
  n.step(
1799
1799
  new cn(
@@ -1840,7 +1840,7 @@ function Mn(e, n, t, o) {
1840
1840
  else if (Array.isArray(n))
1841
1841
  r = F(n, e.pmSchema);
1842
1842
  else if (n.type === "tableContent")
1843
- r = Ge(n, e.pmSchema);
1843
+ r = qe(n, e.pmSchema);
1844
1844
  else
1845
1845
  throw new j(n.type);
1846
1846
  else throw new Error("blockContent is required");
@@ -1935,7 +1935,7 @@ const Pn = (e, n, t, o, r, s, i) => {
1935
1935
  r,
1936
1936
  s
1937
1937
  ), a;
1938
- }, qe = (e, n) => {
1938
+ }, Ke = (e, n) => {
1939
1939
  const t = an.fromSchema(e);
1940
1940
  return {
1941
1941
  exportBlocks: (o, r) => {
@@ -1968,7 +1968,7 @@ function Lr(e, n, t, o, r) {
1968
1968
  else if (Array.isArray(n))
1969
1969
  s = F(n, e.pmSchema, o);
1970
1970
  else if (n.type === "tableContent")
1971
- s = Ge(n, e.pmSchema);
1971
+ s = qe(n, e.pmSchema);
1972
1972
  else
1973
1973
  throw new j(n.type);
1974
1974
  else throw new Error("blockContent is required");
@@ -2045,7 +2045,7 @@ const Ln = (e, n, t, o) => {
2045
2045
  return {
2046
2046
  serializeBlocks: (o, r) => Ln(n, o, t, r).outerHTML
2047
2047
  };
2048
- }, Ke = (e, n) => {
2048
+ }, Je = (e, n) => {
2049
2049
  const t = e.querySelector(
2050
2050
  n
2051
2051
  );
@@ -2137,13 +2137,13 @@ const Ln = (e, n, t, o) => {
2137
2137
  }, St = (e, n) => {
2138
2138
  const t = document.createElement("figure"), o = document.createElement("figcaption");
2139
2139
  return o.textContent = n, t.appendChild(e), t.appendChild(o), { dom: t };
2140
- }, Je = (e, n) => {
2140
+ }, Xe = (e, n) => {
2141
2141
  const t = document.createElement("div"), o = document.createElement("p");
2142
2142
  return o.textContent = n, t.appendChild(e), t.appendChild(o), {
2143
2143
  dom: t
2144
2144
  };
2145
2145
  }, Ft = (e) => ({ url: e.src || void 0 }), Rr = '<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>', Vr = {
2146
- backgroundColor: x.backgroundColor,
2146
+ backgroundColor: T.backgroundColor,
2147
2147
  // File name.
2148
2148
  name: {
2149
2149
  default: ""
@@ -2182,7 +2182,7 @@ const Ln = (e, n, t, o) => {
2182
2182
  if (e.tagName === "AUDIO")
2183
2183
  return e.closest("figure") ? void 0 : Ft(e);
2184
2184
  if (e.tagName === "FIGURE") {
2185
- const n = Ke(e, "audio");
2185
+ const n = Je(e, "audio");
2186
2186
  if (!n)
2187
2187
  return;
2188
2188
  const { targetElement: t, caption: o } = n;
@@ -2199,10 +2199,10 @@ const Ln = (e, n, t, o) => {
2199
2199
  };
2200
2200
  }
2201
2201
  let n;
2202
- return e.props.showPreview ? (n = document.createElement("audio"), n.src = e.props.url) : (n = document.createElement("a"), n.href = e.props.url, n.textContent = e.props.name || e.props.url), e.props.caption ? e.props.showPreview ? St(n, e.props.caption) : Je(n, e.props.caption) : {
2202
+ return e.props.showPreview ? (n = document.createElement("audio"), n.src = e.props.url) : (n = document.createElement("a"), n.href = e.props.url, n.textContent = e.props.name || e.props.url), e.props.caption ? e.props.showPreview ? St(n, e.props.caption) : Xe(n, e.props.caption) : {
2203
2203
  dom: n
2204
2204
  };
2205
- }, zr = Be(Ur, {
2205
+ }, zr = xe(Ur, {
2206
2206
  render: _r,
2207
2207
  parse: $r,
2208
2208
  toExternalHTML: Fr
@@ -2340,7 +2340,7 @@ const Ln = (e, n, t, o) => {
2340
2340
  addInputRules() {
2341
2341
  const e = this.options;
2342
2342
  return [
2343
- new ie({
2343
+ new ce({
2344
2344
  find: /^```(.*?)\s$/,
2345
2345
  handler: ({ state: n, range: t, match: o }) => {
2346
2346
  const r = n.doc.resolve(t.from), s = o[1].trim(), i = {
@@ -2389,7 +2389,7 @@ const Ln = (e, n, t, o) => {
2389
2389
  }
2390
2390
  };
2391
2391
  }
2392
- }), Gr = ne(
2392
+ }), Gr = oe(
2393
2393
  jr,
2394
2394
  Wr
2395
2395
  );
@@ -2399,7 +2399,7 @@ function Ze(e, n) {
2399
2399
  ([o, { aliases: r }]) => (r == null ? void 0 : r.includes(n)) || o === n
2400
2400
  )) == null ? void 0 : t[0];
2401
2401
  }
2402
- const qr = te.create({
2402
+ const qr = ne.create({
2403
2403
  name: "backgroundColor",
2404
2404
  addAttributes() {
2405
2405
  return {
@@ -2425,10 +2425,10 @@ const qr = te.create({
2425
2425
  renderHTML({ HTMLAttributes: e }) {
2426
2426
  return ["span", e, 0];
2427
2427
  }
2428
- }), Kr = re(
2428
+ }), Kr = ie(
2429
2429
  qr,
2430
2430
  "string"
2431
- ), Jr = te.create({
2431
+ ), Jr = ne.create({
2432
2432
  name: "textColor",
2433
2433
  addAttributes() {
2434
2434
  return {
@@ -2452,8 +2452,8 @@ const qr = te.create({
2452
2452
  renderHTML({ HTMLAttributes: e }) {
2453
2453
  return ["span", e, 0];
2454
2454
  }
2455
- }), Xr = re(Jr, "string"), Wt = (e) => ({ url: e.src || void 0 }), Yr = {
2456
- backgroundColor: x.backgroundColor,
2455
+ }), Xr = ie(Jr, "string"), Wt = (e) => ({ url: e.src || void 0 }), Yr = {
2456
+ backgroundColor: T.backgroundColor,
2457
2457
  // File name.
2458
2458
  name: {
2459
2459
  default: ""
@@ -2475,7 +2475,7 @@ const qr = te.create({
2475
2475
  if (e.tagName === "EMBED")
2476
2476
  return e.closest("figure") ? void 0 : Wt(e);
2477
2477
  if (e.tagName === "FIGURE") {
2478
- const n = Ke(e, "embed");
2478
+ const n = Je(e, "embed");
2479
2479
  if (!n)
2480
2480
  return;
2481
2481
  const { targetElement: t, caption: o } = n;
@@ -2492,26 +2492,26 @@ const qr = te.create({
2492
2492
  };
2493
2493
  }
2494
2494
  const n = document.createElement("a");
2495
- return n.href = e.props.url, n.textContent = e.props.name || e.props.url, e.props.caption ? Je(n, e.props.caption) : {
2495
+ return n.href = e.props.url, n.textContent = e.props.name || e.props.url, e.props.caption ? Xe(n, e.props.caption) : {
2496
2496
  dom: n
2497
2497
  };
2498
- }, ns = Be(Zr, {
2498
+ }, ns = xe(Zr, {
2499
2499
  render: Qr,
2500
2500
  parse: es,
2501
2501
  toExternalHTML: ts
2502
2502
  }), An = {
2503
- ...x,
2503
+ ...T,
2504
2504
  level: { default: 1, values: [1, 2, 3] }
2505
2505
  }, os = q({
2506
2506
  name: "heading",
2507
2507
  content: "inline*",
2508
2508
  group: "blockContent",
2509
2509
  addAttributes() {
2510
- return Se(An);
2510
+ return Be(An);
2511
2511
  },
2512
2512
  addInputRules() {
2513
2513
  return [
2514
- ...[1, 2, 3].map((e) => new ie({
2514
+ ...[1, 2, 3].map((e) => new ce({
2515
2515
  find: new RegExp(`^(#{${e}})\\s$`),
2516
2516
  handler: ({ state: n, chain: t, range: o }) => {
2517
2517
  const r = v(n);
@@ -2601,7 +2601,7 @@ const qr = te.create({
2601
2601
  ((o = this.options.domAttributes) == null ? void 0 : o.inlineContent) || {}
2602
2602
  );
2603
2603
  }
2604
- }), rs = ne(
2604
+ }), rs = oe(
2605
2605
  os,
2606
2606
  An
2607
2607
  ), Nn = (e, n, t, o, r, s) => {
@@ -2674,8 +2674,8 @@ const qr = te.create({
2674
2674
  const n = e.src || void 0, t = e.width || void 0;
2675
2675
  return { url: n, previewWidth: t };
2676
2676
  }, ss = '<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>', is = {
2677
- textAlignment: x.textAlignment,
2678
- backgroundColor: x.backgroundColor,
2677
+ textAlignment: T.textAlignment,
2678
+ backgroundColor: T.backgroundColor,
2679
2679
  // File name.
2680
2680
  name: {
2681
2681
  default: ""
@@ -2722,7 +2722,7 @@ const qr = te.create({
2722
2722
  if (e.tagName === "IMG")
2723
2723
  return e.closest("figure") ? void 0 : jt(e);
2724
2724
  if (e.tagName === "FIGURE") {
2725
- const n = Ke(e, "img");
2725
+ const n = Je(e, "img");
2726
2726
  if (!n)
2727
2727
  return;
2728
2728
  const { targetElement: t, caption: o } = n;
@@ -2739,17 +2739,17 @@ const qr = te.create({
2739
2739
  };
2740
2740
  }
2741
2741
  let n;
2742
- return e.props.showPreview ? (n = document.createElement("img"), n.src = e.props.url, n.alt = e.props.name || e.props.caption || "BlockNote image", e.props.previewWidth && (n.width = e.props.previewWidth)) : (n = document.createElement("a"), n.href = e.props.url, n.textContent = e.props.name || e.props.url), e.props.caption ? e.props.showPreview ? St(n, e.props.caption) : Je(n, e.props.caption) : {
2742
+ return e.props.showPreview ? (n = document.createElement("img"), n.src = e.props.url, n.alt = e.props.name || e.props.caption || "BlockNote image", e.props.previewWidth && (n.width = e.props.previewWidth)) : (n = document.createElement("a"), n.href = e.props.url, n.textContent = e.props.name || e.props.url), e.props.caption ? e.props.showPreview ? St(n, e.props.caption) : Xe(n, e.props.caption) : {
2743
2743
  dom: n
2744
2744
  };
2745
- }, us = Be(as, {
2745
+ }, us = xe(as, {
2746
2746
  render: cs,
2747
2747
  parse: ls,
2748
2748
  toExternalHTML: ds
2749
2749
  });
2750
2750
  function Bt(e, n, t) {
2751
2751
  var u, h, f;
2752
- const o = Fe.fromSchema(n), r = e, s = document.createElement("div");
2752
+ const o = ze.fromSchema(n), r = e, s = document.createElement("div");
2753
2753
  s.setAttribute("data-node-type", "blockGroup");
2754
2754
  for (const m of Array.from(r.childNodes))
2755
2755
  s.appendChild(m.cloneNode(!0));
@@ -2781,7 +2781,7 @@ const Hn = (e, n, t) => ({
2781
2781
  state: o,
2782
2782
  dispatch: r
2783
2783
  }) => {
2784
- const s = X(o.doc, e), i = Q(s);
2784
+ const s = X(o.doc, e), i = ee(s);
2785
2785
  if (!i.isBlockContainer)
2786
2786
  throw new Error(
2787
2787
  `BlockContainer expected when calling splitBlock, position ${e}`
@@ -2800,7 +2800,7 @@ const Hn = (e, n, t) => ({
2800
2800
  return r && o.tr.split(e, 2, a), !0;
2801
2801
  }, xt = (e) => {
2802
2802
  const { blockInfo: n, selectionEmpty: t } = e.transact((s) => ({
2803
- blockInfo: We(s),
2803
+ blockInfo: je(s),
2804
2804
  selectionEmpty: s.selection.anchor === s.selection.head
2805
2805
  }));
2806
2806
  if (!n.isBlockContainer)
@@ -2823,7 +2823,7 @@ const Hn = (e, n, t) => ({
2823
2823
  )
2824
2824
  ]);
2825
2825
  }, ps = {
2826
- ...x
2826
+ ...T
2827
2827
  }, hs = q({
2828
2828
  name: "bulletListItem",
2829
2829
  content: "inline*",
@@ -2834,7 +2834,7 @@ const Hn = (e, n, t) => ({
2834
2834
  addInputRules() {
2835
2835
  return [
2836
2836
  // Creates an unordered list when starting with "-", "+", or "*".
2837
- new ie({
2837
+ new ce({
2838
2838
  find: new RegExp("^[-+*]\\s$"),
2839
2839
  handler: ({ state: e, chain: n, range: t }) => {
2840
2840
  const o = v(e);
@@ -2901,11 +2901,11 @@ const Hn = (e, n, t) => ({
2901
2901
  ((t = this.options.domAttributes) == null ? void 0 : t.inlineContent) || {}
2902
2902
  );
2903
2903
  }
2904
- }), fs = ne(
2904
+ }), fs = oe(
2905
2905
  hs,
2906
2906
  ps
2907
2907
  ), Dn = {
2908
- ...x,
2908
+ ...T,
2909
2909
  checked: {
2910
2910
  default: !1
2911
2911
  }
@@ -2914,12 +2914,12 @@ const Hn = (e, n, t) => ({
2914
2914
  content: "inline*",
2915
2915
  group: "blockContent",
2916
2916
  addAttributes() {
2917
- return Se(Dn);
2917
+ return Be(Dn);
2918
2918
  },
2919
2919
  addInputRules() {
2920
2920
  return [
2921
2921
  // Creates a checklist when starting with "[]" or "[X]".
2922
- new ie({
2922
+ new ce({
2923
2923
  find: new RegExp("\\[\\s*\\]\\s$"),
2924
2924
  handler: ({ state: e, chain: n, range: t }) => {
2925
2925
  const o = v(e);
@@ -2933,7 +2933,7 @@ const Hn = (e, n, t) => ({
2933
2933
  ).deleteRange({ from: t.from, to: t.to });
2934
2934
  }
2935
2935
  }),
2936
- new ie({
2936
+ new ce({
2937
2937
  find: new RegExp("\\[[Xx]\\]\\s$"),
2938
2938
  handler: ({ state: e, chain: n, range: t }) => {
2939
2939
  const o = v(e);
@@ -3076,10 +3076,10 @@ const Hn = (e, n, t) => ({
3076
3076
  };
3077
3077
  };
3078
3078
  }
3079
- }), gs = ne(
3079
+ }), gs = oe(
3080
3080
  ms,
3081
3081
  Dn
3082
- ), bs = new U("numbered-list-indexing"), ks = () => new L({
3082
+ ), bs = new U("numbered-list-indexing"), ks = () => new A({
3083
3083
  key: bs,
3084
3084
  appendTransaction: (e, n, t) => {
3085
3085
  const o = t.tr;
@@ -3089,7 +3089,7 @@ const Hn = (e, n, t) => ({
3089
3089
  var a;
3090
3090
  if (s.type.name === "blockContainer" && s.firstChild.type.name === "numberedListItem") {
3091
3091
  let c = `${s.firstChild.attrs.start || 1}`;
3092
- const l = Q({
3092
+ const l = ee({
3093
3093
  posBeforeNode: i,
3094
3094
  node: s
3095
3095
  });
@@ -3099,7 +3099,7 @@ const Hn = (e, n, t) => ({
3099
3099
  l.bnBlock.beforePos
3100
3100
  ).nodeBefore;
3101
3101
  if (d) {
3102
- const m = Q({
3102
+ const m = ee({
3103
3103
  posBeforeNode: l.bnBlock.beforePos - d.nodeSize,
3104
3104
  node: d
3105
3105
  });
@@ -3126,7 +3126,7 @@ const Hn = (e, n, t) => ({
3126
3126
  }), r ? o : null;
3127
3127
  }
3128
3128
  }), On = {
3129
- ...x,
3129
+ ...T,
3130
3130
  start: { default: void 0, type: "number" }
3131
3131
  }, ws = q({
3132
3132
  name: "numberedListItem",
@@ -3135,7 +3135,7 @@ const Hn = (e, n, t) => ({
3135
3135
  priority: 90,
3136
3136
  addAttributes() {
3137
3137
  return {
3138
- ...Se(On),
3138
+ ...Be(On),
3139
3139
  // the index attribute is only used internally (it's not part of the blocknote schema)
3140
3140
  // that's why it's defined explicitly here, and not part of the prop schema
3141
3141
  index: {
@@ -3150,7 +3150,7 @@ const Hn = (e, n, t) => ({
3150
3150
  addInputRules() {
3151
3151
  return [
3152
3152
  // Creates an ordered list when starting with "1.".
3153
- new ie({
3153
+ new ce({
3154
3154
  find: new RegExp("^(\\d+)\\.\\s$"),
3155
3155
  handler: ({ state: e, chain: n, range: t, match: o }) => {
3156
3156
  const r = v(e);
@@ -3234,11 +3234,11 @@ const Hn = (e, n, t) => ({
3234
3234
  ((t = this.options.domAttributes) == null ? void 0 : t.inlineContent) || {}
3235
3235
  );
3236
3236
  }
3237
- }), ys = ne(
3237
+ }), ys = oe(
3238
3238
  ws,
3239
3239
  On
3240
3240
  ), Cs = {
3241
- ...x
3241
+ ...T
3242
3242
  }, vs = q({
3243
3243
  name: "paragraph",
3244
3244
  content: "inline*",
@@ -3286,11 +3286,11 @@ const Hn = (e, n, t) => ({
3286
3286
  ((t = this.options.domAttributes) == null ? void 0 : t.inlineContent) || {}
3287
3287
  );
3288
3288
  }
3289
- }), Es = ne(
3289
+ }), Es = oe(
3290
3290
  vs,
3291
3291
  Cs
3292
3292
  ), Ss = {
3293
- ...x
3293
+ ...T
3294
3294
  }, Bs = q({
3295
3295
  name: "quote",
3296
3296
  content: "inline*",
@@ -3298,7 +3298,7 @@ const Hn = (e, n, t) => ({
3298
3298
  addInputRules() {
3299
3299
  return [
3300
3300
  // Creates a block quote when starting with ">".
3301
- new ie({
3301
+ new ce({
3302
3302
  find: new RegExp("^>\\s$"),
3303
3303
  handler: ({ state: e, chain: n, range: t }) => {
3304
3304
  const o = v(e);
@@ -3350,7 +3350,7 @@ const Hn = (e, n, t) => ({
3350
3350
  ((t = this.options.domAttributes) == null ? void 0 : t.inlineContent) || {}
3351
3351
  );
3352
3352
  }
3353
- }), xs = ne(
3353
+ }), xs = oe(
3354
3354
  Bs,
3355
3355
  Ss
3356
3356
  ), Ts = 35, Rn = 120, Ac = 31, Ms = V.create({
@@ -3398,7 +3398,7 @@ const Hn = (e, n, t) => ({
3398
3398
  };
3399
3399
  }
3400
3400
  }), Ps = {
3401
- textColor: x.textColor
3401
+ textColor: T.textColor
3402
3402
  }, Is = q({
3403
3403
  name: "table",
3404
3404
  content: "tableRow+",
@@ -3439,7 +3439,7 @@ const Hn = (e, n, t) => ({
3439
3439
  constructor(s, i, a) {
3440
3440
  super(s, i), this.node = s, this.cellMinWidth = i, this.blockContentHTMLAttributes = a;
3441
3441
  const c = document.createElement("div");
3442
- c.className = Z(
3442
+ c.className = Q(
3443
3443
  "bn-block-content",
3444
3444
  a.class
3445
3445
  ), c.setAttribute("data-content-type", "table");
@@ -3483,7 +3483,7 @@ const Hn = (e, n, t) => ({
3483
3483
  renderHTML({ HTMLAttributes: e }) {
3484
3484
  return ["p", e, 0];
3485
3485
  }
3486
- }), As = ee.create({
3486
+ }), As = te.create({
3487
3487
  name: "tableRow",
3488
3488
  addOptions() {
3489
3489
  return {
@@ -3505,7 +3505,7 @@ const Hn = (e, n, t) => ({
3505
3505
  }
3506
3506
  });
3507
3507
  function Gt(e, n) {
3508
- const o = Fe.fromSchema(n).parse(e, {
3508
+ const o = ze.fromSchema(n).parse(e, {
3509
3509
  topNode: n.nodes.blockGroup.create()
3510
3510
  }), r = [];
3511
3511
  return o.content.descendants((s) => {
@@ -3513,7 +3513,7 @@ function Gt(e, n) {
3513
3513
  return r.push(s), !1;
3514
3514
  }), D.fromArray(r);
3515
3515
  }
3516
- const Ns = ne(
3516
+ const Ns = oe(
3517
3517
  Is,
3518
3518
  Ps,
3519
3519
  [
@@ -3558,8 +3558,8 @@ const Ns = ne(
3558
3558
  const n = e.src || void 0, t = e.width || void 0;
3559
3559
  return { url: n, previewWidth: t };
3560
3560
  }, Hs = '<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>', Ds = {
3561
- textAlignment: x.textAlignment,
3562
- backgroundColor: x.backgroundColor,
3561
+ textAlignment: T.textAlignment,
3562
+ backgroundColor: T.backgroundColor,
3563
3563
  // File name.
3564
3564
  name: {
3565
3565
  default: ""
@@ -3606,7 +3606,7 @@ const Ns = ne(
3606
3606
  if (e.tagName === "VIDEO")
3607
3607
  return e.closest("figure") ? void 0 : qt(e);
3608
3608
  if (e.tagName === "FIGURE") {
3609
- const n = Ke(e, "video");
3609
+ const n = Je(e, "video");
3610
3610
  if (!n)
3611
3611
  return;
3612
3612
  const { targetElement: t, caption: o } = n;
@@ -3623,10 +3623,10 @@ const Ns = ne(
3623
3623
  };
3624
3624
  }
3625
3625
  let n;
3626
- return e.props.showPreview ? (n = document.createElement("video"), n.src = e.props.url, e.props.previewWidth && (n.width = e.props.previewWidth)) : (n = document.createElement("a"), n.href = e.props.url, n.textContent = e.props.name || e.props.url), e.props.caption ? e.props.showPreview ? St(n, e.props.caption) : Je(n, e.props.caption) : {
3626
+ return e.props.showPreview ? (n = document.createElement("video"), n.src = e.props.url, e.props.previewWidth && (n.width = e.props.previewWidth)) : (n = document.createElement("a"), n.href = e.props.url, n.textContent = e.props.name || e.props.url), e.props.caption ? e.props.showPreview ? St(n, e.props.caption) : Xe(n, e.props.caption) : {
3627
3627
  dom: n
3628
3628
  };
3629
- }, _s = Be(Os, {
3629
+ }, _s = xe(Os, {
3630
3630
  render: Rs,
3631
3631
  parse: Vs,
3632
3632
  toExternalHTML: Us
@@ -3644,11 +3644,11 @@ const Ns = ne(
3644
3644
  video: _s,
3645
3645
  audio: zr
3646
3646
  }, $s = gn(Vn), Un = {
3647
- bold: re(yo, "boolean"),
3648
- italic: re(vo, "boolean"),
3649
- underline: re(So, "boolean"),
3650
- strike: re(Eo, "boolean"),
3651
- code: re(Co, "boolean"),
3647
+ bold: ie(yo, "boolean"),
3648
+ italic: ie(vo, "boolean"),
3649
+ underline: ie(So, "boolean"),
3650
+ strike: ie(Eo, "boolean"),
3651
+ code: ie(Co, "boolean"),
3652
3652
  textColor: Xr,
3653
3653
  backgroundColor: Kr
3654
3654
  }, Nc = Cn(Un), _n = {
@@ -3676,13 +3676,13 @@ function Oc(e, n) {
3676
3676
  return n.schema.blockSchema[e.type].isFileBlock && !e.props.url;
3677
3677
  }
3678
3678
  function js(e, n, t) {
3679
- return n in t.schema.blockSchema && e in t.schema.blockSchema[n].propSchema && t.schema.blockSchema[n].propSchema[e] === x[e];
3679
+ return n in t.schema.blockSchema && e in t.schema.blockSchema[n].propSchema && t.schema.blockSchema[n].propSchema[e] === T[e];
3680
3680
  }
3681
3681
  function Rc(e, n, t) {
3682
3682
  return js(e, n.type, t);
3683
3683
  }
3684
3684
  function Kt(e) {
3685
- return e instanceof Ee;
3685
+ return e instanceof Se;
3686
3686
  }
3687
3687
  const Vc = async (e) => {
3688
3688
  const n = new FormData();
@@ -3707,7 +3707,7 @@ function N(e, n) {
3707
3707
  if (t.content === void 0)
3708
3708
  throw new Error("Slash Menu open in a block that doesn't contain content.");
3709
3709
  let o;
3710
- return Array.isArray(t.content) && (t.content.length === 1 && ce(t.content[0]) && t.content[0].type === "text" && t.content[0].text === "/" || t.content.length === 0) ? (o = e.updateBlock(t, n), e.setTextCursorPosition(o)) : (o = e.insertBlocks([n], t, "after")[0], e.setTextCursorPosition(e.getTextCursorPosition().nextBlock)), Gs(e), o;
3710
+ return Array.isArray(t.content) && (t.content.length === 1 && de(t.content[0]) && t.content[0].type === "text" && t.content[0].text === "/" || t.content.length === 0) ? (o = e.updateBlock(t, n), e.setTextCursorPosition(o)) : (o = e.insertBlocks([n], t, "after")[0], e.setTextCursorPosition(e.getTextCursorPosition().nextBlock)), Gs(e), o;
3711
3711
  }
3712
3712
  function Uc(e) {
3713
3713
  const n = [];
@@ -3719,7 +3719,7 @@ function Uc(e) {
3719
3719
  props: { level: 1 }
3720
3720
  });
3721
3721
  },
3722
- badge: Y("Mod-Alt-1"),
3722
+ badge: Z("Mod-Alt-1"),
3723
3723
  key: "heading",
3724
3724
  ...e.dictionary.slash_menu.heading
3725
3725
  },
@@ -3730,7 +3730,7 @@ function Uc(e) {
3730
3730
  props: { level: 2 }
3731
3731
  });
3732
3732
  },
3733
- badge: Y("Mod-Alt-2"),
3733
+ badge: Z("Mod-Alt-2"),
3734
3734
  key: "heading_2",
3735
3735
  ...e.dictionary.slash_menu.heading_2
3736
3736
  },
@@ -3741,7 +3741,7 @@ function Uc(e) {
3741
3741
  props: { level: 3 }
3742
3742
  });
3743
3743
  },
3744
- badge: Y("Mod-Alt-3"),
3744
+ badge: Z("Mod-Alt-3"),
3745
3745
  key: "heading_3",
3746
3746
  ...e.dictionary.slash_menu.heading_3
3747
3747
  }
@@ -3759,7 +3759,7 @@ function Uc(e) {
3759
3759
  type: "numberedListItem"
3760
3760
  });
3761
3761
  },
3762
- badge: Y("Mod-Shift-7"),
3762
+ badge: Z("Mod-Shift-7"),
3763
3763
  key: "numbered_list",
3764
3764
  ...e.dictionary.slash_menu.numbered_list
3765
3765
  }), O("bulletListItem", e) && n.push({
@@ -3768,7 +3768,7 @@ function Uc(e) {
3768
3768
  type: "bulletListItem"
3769
3769
  });
3770
3770
  },
3771
- badge: Y("Mod-Shift-8"),
3771
+ badge: Z("Mod-Shift-8"),
3772
3772
  key: "bullet_list",
3773
3773
  ...e.dictionary.slash_menu.bullet_list
3774
3774
  }), O("checkListItem", e) && n.push({
@@ -3777,7 +3777,7 @@ function Uc(e) {
3777
3777
  type: "checkListItem"
3778
3778
  });
3779
3779
  },
3780
- badge: Y("Mod-Shift-9"),
3780
+ badge: Z("Mod-Shift-9"),
3781
3781
  key: "check_list",
3782
3782
  ...e.dictionary.slash_menu.check_list
3783
3783
  }), O("paragraph", e) && n.push({
@@ -3786,7 +3786,7 @@ function Uc(e) {
3786
3786
  type: "paragraph"
3787
3787
  });
3788
3788
  },
3789
- badge: Y("Mod-Alt-0"),
3789
+ badge: Z("Mod-Alt-0"),
3790
3790
  key: "paragraph",
3791
3791
  ...e.dictionary.slash_menu.paragraph
3792
3792
  }), O("codeBlock", e) && n.push({
@@ -3795,7 +3795,7 @@ function Uc(e) {
3795
3795
  type: "codeBlock"
3796
3796
  });
3797
3797
  },
3798
- badge: Y("Mod-Alt-c"),
3798
+ badge: Z("Mod-Alt-c"),
3799
3799
  key: "code_block",
3800
3800
  ...e.dictionary.slash_menu.code_block
3801
3801
  }), O("table", e) && n.push({
@@ -3893,7 +3893,7 @@ function Qe(e) {
3893
3893
  Object.entries(e).filter(([, n]) => n !== void 0)
3894
3894
  );
3895
3895
  }
3896
- class Me {
3896
+ class Pe {
3897
3897
  constructor(n) {
3898
3898
  p(this, "blockSpecs");
3899
3899
  p(this, "inlineContentSpecs");
@@ -3910,7 +3910,7 @@ class Me {
3910
3910
  ), this.styleSchema = Cn(this.styleSpecs);
3911
3911
  }
3912
3912
  static create(n) {
3913
- return new Me(n);
3913
+ return new Pe(n);
3914
3914
  }
3915
3915
  }
3916
3916
  const qs = {
@@ -3934,15 +3934,15 @@ const qs = {
3934
3934
  return e.setAttribute("data-page-break", ""), {
3935
3935
  dom: e
3936
3936
  };
3937
- }, Ys = Be(qs, {
3937
+ }, Ys = xe(qs, {
3938
3938
  render: Ks,
3939
3939
  parse: Js,
3940
3940
  toExternalHTML: Xs
3941
- }), $n = Me.create({
3941
+ }), $n = Pe.create({
3942
3942
  blockSpecs: {
3943
3943
  pageBreak: Ys
3944
3944
  }
3945
- }), $c = (e) => Me.create({
3945
+ }), $c = (e) => Pe.create({
3946
3946
  blockSpecs: {
3947
3947
  ...e.blockSpecs,
3948
3948
  ...$n.blockSpecs
@@ -3968,14 +3968,14 @@ function Fc(e) {
3968
3968
  function Qs(e) {
3969
3969
  return e.transact((n) => {
3970
3970
  const t = X(n.doc, n.selection.anchor);
3971
- if (n.selection instanceof Ee)
3971
+ if (n.selection instanceof Se)
3972
3972
  return {
3973
3973
  type: "cell",
3974
3974
  anchorBlockId: t.node.attrs.id,
3975
3975
  anchorCellOffset: n.selection.$anchorCell.pos - t.posBeforeNode,
3976
3976
  headCellOffset: n.selection.$headCell.pos - t.posBeforeNode
3977
3977
  };
3978
- if (n.selection instanceof me)
3978
+ if (n.selection instanceof ge)
3979
3979
  return {
3980
3980
  type: "node",
3981
3981
  anchorBlockId: t.node.attrs.id
@@ -4001,13 +4001,13 @@ function ei(e, n) {
4001
4001
  );
4002
4002
  let o;
4003
4003
  if (n.type === "cell")
4004
- o = Ee.create(
4004
+ o = Se.create(
4005
4005
  e.doc,
4006
4006
  t + n.anchorCellOffset,
4007
4007
  t + n.headCellOffset
4008
4008
  );
4009
4009
  else if (n.type === "node")
4010
- o = me.create(e.doc, t + 1);
4010
+ o = ge.create(e.doc, t + 1);
4011
4011
  else {
4012
4012
  const i = (s = _(n.headBlockId, e.doc)) == null ? void 0 : s.posBeforeNode;
4013
4013
  if (i === void 0)
@@ -4144,13 +4144,13 @@ function ri(e) {
4144
4144
  }
4145
4145
  function si(e) {
4146
4146
  return e.transact((n) => {
4147
- const { bnBlock: t } = We(n);
4147
+ const { bnBlock: t } = je(n);
4148
4148
  return n.doc.resolve(t.beforePos).nodeBefore !== null;
4149
4149
  });
4150
4150
  }
4151
4151
  function ii(e) {
4152
4152
  return e.transact((n) => {
4153
- const { bnBlock: t } = We(n);
4153
+ const { bnBlock: t } = je(n);
4154
4154
  return n.doc.resolve(t.beforePos).depth > 1;
4155
4155
  });
4156
4156
  }
@@ -4232,7 +4232,7 @@ function pi(e) {
4232
4232
  };
4233
4233
  }
4234
4234
  function hi(e, n, t) {
4235
- const o = typeof n == "string" ? n : n.id, r = typeof t == "string" ? t : t.id, s = M(e), i = Te(s);
4235
+ const o = typeof n == "string" ? n : n.id, r = typeof t == "string" ? t : t.id, s = M(e), i = Me(s);
4236
4236
  if (o === r)
4237
4237
  throw new Error(
4238
4238
  `Attempting to set selection with the same anchor and head blocks (id ${o})`
@@ -4243,7 +4243,7 @@ function hi(e, n, t) {
4243
4243
  const c = _(r, e.doc);
4244
4244
  if (!c)
4245
4245
  throw new Error(`Block with ID ${r} not found`);
4246
- const l = Q(a), d = Q(c), u = i.blockSchema[l.blockNoteType], h = i.blockSchema[d.blockNoteType];
4246
+ const l = ee(a), d = ee(c), u = i.blockSchema[l.blockNoteType], h = i.blockSchema[d.blockNoteType];
4247
4247
  if (!l.isBlockContainer || u.content === "none")
4248
4248
  throw new Error(
4249
4249
  `Attempting to set selection anchor in block without content (id ${o})`
@@ -4293,7 +4293,7 @@ function fi(e) {
4293
4293
  };
4294
4294
  }
4295
4295
  function mi(e) {
4296
- const { bnBlock: n } = We(e), t = M(e.doc), o = e.doc.resolve(n.beforePos), r = o.nodeBefore, s = e.doc.resolve(n.afterPos).nodeAfter;
4296
+ const { bnBlock: n } = je(e), t = M(e.doc), o = e.doc.resolve(n.beforePos), r = o.nodeBefore, s = e.doc.resolve(n.afterPos).nodeAfter;
4297
4297
  let i;
4298
4298
  return o.depth > 1 && (i = o.node(), i.type.isInGroup("bnBlock") || (i = o.node(o.depth - 1))), {
4299
4299
  block: E(n.node, t),
@@ -4303,14 +4303,14 @@ function mi(e) {
4303
4303
  };
4304
4304
  }
4305
4305
  function qn(e, n, t = "start") {
4306
- const o = typeof n == "string" ? n : n.id, r = M(e.doc), s = Te(r), i = _(o, e.doc);
4306
+ const o = typeof n == "string" ? n : n.id, r = M(e.doc), s = Me(r), i = _(o, e.doc);
4307
4307
  if (!i)
4308
4308
  throw new Error(`Block with ID ${o} not found`);
4309
- const a = Q(i), c = s.blockSchema[a.blockNoteType].content;
4309
+ const a = ee(i), c = s.blockSchema[a.blockNoteType].content;
4310
4310
  if (a.isBlockContainer) {
4311
4311
  const l = a.blockContent;
4312
4312
  if (c === "none") {
4313
- e.setSelection(me.create(e.doc, l.beforePos));
4313
+ e.setSelection(ge.create(e.doc, l.beforePos));
4314
4314
  return;
4315
4315
  }
4316
4316
  if (c === "inline")
@@ -4332,10 +4332,10 @@ function qn(e, n, t = "start") {
4332
4332
  qn(e, l.attrs.id, t);
4333
4333
  }
4334
4334
  }
4335
- let he;
4335
+ let fe;
4336
4336
  async function Tt() {
4337
- if (he)
4338
- return he;
4337
+ if (fe)
4338
+ return fe;
4339
4339
  const e = await Promise.all([
4340
4340
  import("rehype-parse"),
4341
4341
  import("rehype-stringify"),
@@ -4348,7 +4348,7 @@ async function Tt() {
4348
4348
  import("remark-rehype"),
4349
4349
  import("rehype-format")
4350
4350
  ]);
4351
- return he = {
4351
+ return fe = {
4352
4352
  rehypeParse: e[0],
4353
4353
  rehypeStringify: e[1],
4354
4354
  unified: e[2],
@@ -4359,7 +4359,7 @@ async function Tt() {
4359
4359
  remarkParse: e[7],
4360
4360
  remarkRehype: e[8],
4361
4361
  rehypeFormat: e[9]
4362
- }, he;
4362
+ }, fe;
4363
4363
  }
4364
4364
  function gi() {
4365
4365
  const e = (n) => {
@@ -4378,7 +4378,7 @@ function gi() {
4378
4378
  return e;
4379
4379
  }
4380
4380
  function bi() {
4381
- const e = he;
4381
+ const e = fe;
4382
4382
  if (!e)
4383
4383
  throw new Error(
4384
4384
  "addSpacesToCheckboxes requires ESM dependencies to be initialized"
@@ -4400,7 +4400,7 @@ function bi() {
4400
4400
  return n;
4401
4401
  }
4402
4402
  function Mt(e) {
4403
- const n = he;
4403
+ const n = fe;
4404
4404
  if (!n)
4405
4405
  throw new Error(
4406
4406
  "cleanHTMLToMarkdown requires ESM dependencies to be initialized"
@@ -4411,7 +4411,7 @@ function Mt(e) {
4411
4411
  }
4412
4412
  async function ki(e, n, t, o) {
4413
4413
  await Tt();
4414
- const s = qe(n, t).exportBlocks(e, o);
4414
+ const s = Ke(n, t).exportBlocks(e, o);
4415
4415
  return Mt(s);
4416
4416
  }
4417
4417
  function wi(e) {
@@ -4457,7 +4457,7 @@ function Kn(e) {
4457
4457
  return Ci(e), vi(e), e;
4458
4458
  }
4459
4459
  async function Jn(e, n) {
4460
- const t = Kn(e), r = Fe.fromSchema(n).parse(t, {
4460
+ const t = Kn(e), r = ze.fromSchema(n).parse(t, {
4461
4461
  topNode: n.nodes.blockGroup.create()
4462
4462
  }), s = [];
4463
4463
  for (let i = 0; i < r.childCount; i++)
@@ -4603,7 +4603,7 @@ const Mi = (e) => V.create({
4603
4603
  name: "dropFile",
4604
4604
  addProseMirrorPlugins() {
4605
4605
  return [
4606
- new L({
4606
+ new A({
4607
4607
  props: {
4608
4608
  handleDOMEvents: {
4609
4609
  drop(n, t) {
@@ -4683,7 +4683,7 @@ const ji = (e, n) => V.create({
4683
4683
  name: "pasteFromClipboard",
4684
4684
  addProseMirrorPlugins() {
4685
4685
  return [
4686
- new L({
4686
+ new A({
4687
4687
  props: {
4688
4688
  handleDOMEvents: {
4689
4689
  paste(t, o) {
@@ -4721,7 +4721,7 @@ function Zn(e) {
4721
4721
  function Gi(e, n, t) {
4722
4722
  var a;
4723
4723
  let o = !1;
4724
- const r = e.state.selection instanceof Ee;
4724
+ const r = e.state.selection instanceof Se;
4725
4725
  if (!r) {
4726
4726
  const c = e.state.doc.slice(
4727
4727
  e.state.selection.from,
@@ -4735,7 +4735,7 @@ function Gi(e, n, t) {
4735
4735
  ) === void 0, o && (n = c);
4736
4736
  }
4737
4737
  let s;
4738
- const i = qe(
4738
+ const i = Ke(
4739
4739
  e.state.schema,
4740
4740
  t
4741
4741
  );
@@ -4751,7 +4751,7 @@ function Gi(e, n, t) {
4751
4751
  {}
4752
4752
  )}</table>`;
4753
4753
  } else if (o) {
4754
- const c = je(
4754
+ const c = Ge(
4755
4755
  n,
4756
4756
  t.schema.inlineContentSchema,
4757
4757
  t.schema.styleSchema
@@ -4766,7 +4766,7 @@ function Gi(e, n, t) {
4766
4766
  function Qn(e, n) {
4767
4767
  "node" in e.state.selection && e.state.selection.node.type.spec.group === "blockContent" && n.transact(
4768
4768
  (i) => i.setSelection(
4769
- new me(i.doc.resolve(e.state.selection.from - 1))
4769
+ new ge(i.doc.resolve(e.state.selection.from - 1))
4770
4770
  )
4771
4771
  );
4772
4772
  const t = e.serializeForClipboard(
@@ -4800,7 +4800,7 @@ const Yt = () => {
4800
4800
  name: "copyToClipboard",
4801
4801
  addProseMirrorPlugins() {
4802
4802
  return [
4803
- new L({
4803
+ new A({
4804
4804
  props: {
4805
4805
  handleDOMEvents: {
4806
4806
  copy(n, t) {
@@ -4817,7 +4817,7 @@ const Yt = () => {
4817
4817
  return;
4818
4818
  e.transact(
4819
4819
  (i) => i.setSelection(
4820
- new me(
4820
+ new ge(
4821
4821
  i.doc.resolve(n.state.selection.from - 1)
4822
4822
  )
4823
4823
  )
@@ -4838,9 +4838,9 @@ const Yt = () => {
4838
4838
  types: ["blockContainer", "tableCell", "tableHeader"],
4839
4839
  attributes: {
4840
4840
  backgroundColor: {
4841
- default: x.backgroundColor.default,
4842
- parseHTML: (e) => e.hasAttribute("data-background-color") ? e.getAttribute("data-background-color") : x.backgroundColor.default,
4843
- renderHTML: (e) => e.backgroundColor === x.backgroundColor.default ? {} : {
4841
+ default: T.backgroundColor.default,
4842
+ parseHTML: (e) => e.hasAttribute("data-background-color") ? e.getAttribute("data-background-color") : T.backgroundColor.default,
4843
+ renderHTML: (e) => e.backgroundColor === T.backgroundColor.default ? {} : {
4844
4844
  "data-background-color": e.backgroundColor
4845
4845
  }
4846
4846
  }
@@ -4869,14 +4869,14 @@ class It {
4869
4869
  this.callbacks = {};
4870
4870
  }
4871
4871
  }
4872
- class A extends It {
4872
+ class L extends It {
4873
4873
  // eslint-disable-next-line
4874
4874
  constructor(...t) {
4875
4875
  super();
4876
4876
  p(this, "plugins", []);
4877
4877
  }
4878
- static name() {
4879
- throw new Error("You must implement the name method in your extension");
4878
+ static key() {
4879
+ throw new Error("You must implement the key method in your extension");
4880
4880
  }
4881
4881
  addProsemirrorPlugin(t) {
4882
4882
  this.plugins.push(t);
@@ -4884,7 +4884,7 @@ class A extends It {
4884
4884
  get priority() {
4885
4885
  }
4886
4886
  }
4887
- const _e = class _e extends A {
4887
+ const $e = class $e extends L {
4888
4888
  constructor(t) {
4889
4889
  super();
4890
4890
  p(this, "provider");
@@ -4892,7 +4892,7 @@ const _e = class _e extends A {
4892
4892
  p(this, "renderCursor", (t, o) => {
4893
4893
  let r = this.recentlyUpdatedCursors.get(o);
4894
4894
  if (!r) {
4895
- const s = (this.collaboration.renderCursor ?? _e.defaultCursorRender)(t);
4895
+ const s = (this.collaboration.renderCursor ?? $e.defaultCursorRender)(t);
4896
4896
  this.collaboration.showCursorLabels !== "always" && (s.addEventListener("mouseenter", () => {
4897
4897
  const i = this.recentlyUpdatedCursors.get(o);
4898
4898
  i.element.setAttribute("data-active", ""), i.hideTimeout && (clearTimeout(i.hideTimeout), this.recentlyUpdatedCursors.set(o, {
@@ -4939,14 +4939,14 @@ const _e = class _e extends A {
4939
4939
  })
4940
4940
  );
4941
4941
  }
4942
- static name() {
4942
+ static key() {
4943
4943
  return "yCursorPlugin";
4944
4944
  }
4945
4945
  get priority() {
4946
4946
  return 999;
4947
4947
  }
4948
4948
  };
4949
- p(_e, "defaultCursorRender", (t) => {
4949
+ p($e, "defaultCursorRender", (t) => {
4950
4950
  const o = document.createElement("span");
4951
4951
  o.classList.add("bn-collaboration-cursor__base");
4952
4952
  const r = document.createElement("span");
@@ -4954,9 +4954,9 @@ p(_e, "defaultCursorRender", (t) => {
4954
4954
  const s = document.createElement("span");
4955
4955
  return s.classList.add("bn-collaboration-cursor__label"), s.setAttribute("style", `background-color: ${t.color}`), s.insertBefore(document.createTextNode(t.name), null), r.insertBefore(s, null), o.insertBefore(document.createTextNode("⁠"), null), o.insertBefore(r, null), o.insertBefore(document.createTextNode("⁠"), null), o;
4956
4956
  });
4957
- let Ve = _e;
4958
- class ht extends A {
4959
- static name() {
4957
+ let Ue = $e;
4958
+ class ht extends L {
4959
+ static key() {
4960
4960
  return "ySyncPlugin";
4961
4961
  }
4962
4962
  constructor(n) {
@@ -4966,8 +4966,8 @@ class ht extends A {
4966
4966
  return 1001;
4967
4967
  }
4968
4968
  }
4969
- class ft extends A {
4970
- static name() {
4969
+ class ft extends L {
4970
+ static key() {
4971
4971
  return "yUndoPlugin";
4972
4972
  }
4973
4973
  constructor() {
@@ -4977,7 +4977,7 @@ class ft extends A {
4977
4977
  return 1e3;
4978
4978
  }
4979
4979
  }
4980
- const eo = te.create({
4980
+ const eo = ne.create({
4981
4981
  name: "comment",
4982
4982
  excludes: "",
4983
4983
  inclusive: !1,
@@ -5068,7 +5068,7 @@ class Ji extends It {
5068
5068
  return this.on("update", t);
5069
5069
  }
5070
5070
  }
5071
- const Ie = new U("blocknote-comments"), Xi = "SET_SELECTED_THREAD_ID";
5071
+ const Le = new U("blocknote-comments"), Xi = "SET_SELECTED_THREAD_ID";
5072
5072
  function Yi(e, n) {
5073
5073
  const t = /* @__PURE__ */ new Map();
5074
5074
  return e.descendants((o, r) => {
@@ -5089,7 +5089,7 @@ function Yi(e, n) {
5089
5089
  });
5090
5090
  }), t;
5091
5091
  }
5092
- class Zi extends A {
5092
+ class Zi extends L {
5093
5093
  constructor(t, o, r) {
5094
5094
  super();
5095
5095
  p(this, "userStore");
@@ -5144,8 +5144,8 @@ class Zi extends A {
5144
5144
  });
5145
5145
  const s = this;
5146
5146
  this.addProsemirrorPlugin(
5147
- new L({
5148
- key: Ie,
5147
+ new A({
5148
+ key: Le,
5149
5149
  state: {
5150
5150
  init() {
5151
5151
  return {
@@ -5153,7 +5153,7 @@ class Zi extends A {
5153
5153
  };
5154
5154
  },
5155
5155
  apply(i, a) {
5156
- const c = i.getMeta(Ie);
5156
+ const c = i.getMeta(Le);
5157
5157
  if (!i.docChanged && !c)
5158
5158
  return a;
5159
5159
  const l = i.docChanged ? Yi(i.doc, s.markType) : s.threadPositions;
@@ -5181,7 +5181,7 @@ class Zi extends A {
5181
5181
  props: {
5182
5182
  decorations(i) {
5183
5183
  var a;
5184
- return ((a = Ie.getState(i)) == null ? void 0 : a.decorations) ?? W.empty;
5184
+ return ((a = Le.getState(i)) == null ? void 0 : a.decorations) ?? W.empty;
5185
5185
  },
5186
5186
  /**
5187
5187
  * Handle click on a thread mark and mark it as selected
@@ -5203,6 +5203,9 @@ class Zi extends A {
5203
5203
  })
5204
5204
  );
5205
5205
  }
5206
+ static key() {
5207
+ return "comments";
5208
+ }
5206
5209
  emitStateUpdate() {
5207
5210
  this.emit("update", {
5208
5211
  selectedThreadId: this.selectedThreadId,
@@ -5222,7 +5225,7 @@ class Zi extends A {
5222
5225
  selectThread(t, o = !0) {
5223
5226
  var r, s;
5224
5227
  if (this.selectedThreadId !== t && (this.selectedThreadId = t, this.emitStateUpdate(), this.editor.transact(
5225
- (i) => i.setMeta(Ie, {
5228
+ (i) => i.setMeta(Le, {
5226
5229
  name: Xi
5227
5230
  })
5228
5231
  ), t && o)) {
@@ -5253,7 +5256,7 @@ class Zi extends A {
5253
5256
  async createThread(t) {
5254
5257
  const o = await this.threadStore.createThread(t);
5255
5258
  if (this.threadStore.addThreadToDocument) {
5256
- const r = this.editor.prosemirrorView, s = r.state.selection, i = ae.getState(r.state), a = {
5259
+ const r = this.editor.prosemirrorView, s = r.state.selection, i = le.getState(r.state), a = {
5257
5260
  prosemirror: {
5258
5261
  head: s.head,
5259
5262
  anchor: s.anchor
@@ -5332,7 +5335,7 @@ class Qi {
5332
5335
  const et = new U(
5333
5336
  "FilePanelPlugin"
5334
5337
  );
5335
- class ea extends A {
5338
+ class ea extends L {
5336
5339
  constructor(t) {
5337
5340
  super();
5338
5341
  p(this, "view");
@@ -5341,7 +5344,7 @@ class ea extends A {
5341
5344
  return (t = this.view) == null ? void 0 : t.closeMenu();
5342
5345
  });
5343
5346
  this.addProsemirrorPlugin(
5344
- new L({
5347
+ new A({
5345
5348
  key: et,
5346
5349
  view: (o) => (this.view = new Qi(
5347
5350
  t,
@@ -5363,12 +5366,15 @@ class ea extends A {
5363
5366
  }),
5364
5367
  apply: (o, r) => {
5365
5368
  const s = o.getMeta(et);
5366
- return s || (!o.getMeta(ae) && (o.selectionSet || o.docChanged) ? { block: void 0 } : r);
5369
+ return s || (!o.getMeta(le) && (o.selectionSet || o.docChanged) ? { block: void 0 } : r);
5367
5370
  }
5368
5371
  }
5369
5372
  })
5370
5373
  );
5371
5374
  }
5375
+ static key() {
5376
+ return "filePanel";
5377
+ }
5372
5378
  get shown() {
5373
5379
  var t, o;
5374
5380
  return ((o = (t = this.view) == null ? void 0 : t.state) == null ? void 0 : o.show) || !1;
@@ -5470,19 +5476,19 @@ class ta {
5470
5476
  if (i)
5471
5477
  return i.getBoundingClientRect();
5472
5478
  }
5473
- return Oe(this.pmView, r, s);
5479
+ return Re(this.pmView, r, s);
5474
5480
  }
5475
5481
  }
5476
5482
  const na = new U(
5477
5483
  "FormattingToolbarPlugin"
5478
5484
  );
5479
- class oa extends A {
5485
+ class oa extends L {
5480
5486
  constructor(t) {
5481
5487
  super();
5482
5488
  p(this, "view");
5483
5489
  p(this, "closeMenu", () => this.view.closeMenu());
5484
5490
  this.addProsemirrorPlugin(
5485
- new L({
5491
+ new A({
5486
5492
  key: na,
5487
5493
  view: (o) => (this.view = new ta(t, o, (r) => {
5488
5494
  this.emit("update", r);
@@ -5493,6 +5499,9 @@ class oa extends A {
5493
5499
  })
5494
5500
  );
5495
5501
  }
5502
+ static key() {
5503
+ return "formattingToolbar";
5504
+ }
5496
5505
  get shown() {
5497
5506
  var t, o;
5498
5507
  return ((o = (t = this.view) == null ? void 0 : t.state) == null ? void 0 : o.show) || !1;
@@ -5501,7 +5510,7 @@ class oa extends A {
5501
5510
  return this.on("update", t);
5502
5511
  }
5503
5512
  }
5504
- const ra = ee.create({
5513
+ const ra = te.create({
5505
5514
  name: "hardBreak",
5506
5515
  inline: !0,
5507
5516
  group: "inline",
@@ -5526,21 +5535,21 @@ const ra = ee.create({
5526
5535
  t.index(t.depth - 1),
5527
5536
  t.depth - 1
5528
5537
  );
5529
- return xe(
5538
+ return Te(
5530
5539
  e.resolve(o)
5531
5540
  );
5532
- }, De = (e, n) => {
5541
+ }, Oe = (e, n) => {
5533
5542
  const t = e.resolve(n), o = t.index();
5534
5543
  if (o === 0)
5535
5544
  return;
5536
5545
  const r = t.posAtIndex(o - 1);
5537
- return xe(
5546
+ return Te(
5538
5547
  e.resolve(r)
5539
5548
  );
5540
5549
  }, to = (e, n) => {
5541
5550
  for (; n.childContainer; ) {
5542
5551
  const t = n.childContainer.node, o = e.resolve(n.childContainer.beforePos + 1).posAtIndex(t.childCount - 1);
5543
- n = xe(e.resolve(o));
5552
+ n = Te(e.resolve(o));
5544
5553
  }
5545
5554
  return n;
5546
5555
  }, sa = (e, n) => e.isBlockContainer && e.blockContent.node.type.spec.content === "inline*" && e.blockContent.node.childCount > 0 && n.isBlockContainer && n.blockContent.node.type.spec.content === "inline*", ia = (e, n, t, o) => {
@@ -5576,7 +5585,7 @@ const ra = ee.create({
5576
5585
  state: n,
5577
5586
  dispatch: t
5578
5587
  }) => {
5579
- const o = n.doc.resolve(e), r = xe(o), s = De(
5588
+ const o = n.doc.resolve(e), r = Te(o), s = Oe(
5580
5589
  n.doc,
5581
5590
  r.bnBlock.beforePos
5582
5591
  );
@@ -5629,7 +5638,7 @@ const ra = ee.create({
5629
5638
  }),
5630
5639
  () => r.command(({ state: s, dispatch: i }) => {
5631
5640
  const a = v(s);
5632
- if (!a.isBlockContainer || !(s.selection.from === a.blockContent.beforePos + 1) || De(
5641
+ if (!a.isBlockContainer || !(s.selection.from === a.blockContent.beforePos + 1) || Oe(
5633
5642
  s.doc,
5634
5643
  a.bnBlock.beforePos
5635
5644
  ))
@@ -5733,7 +5742,7 @@ const ra = ee.create({
5733
5742
  if (!i.isBlockContainer)
5734
5743
  return !1;
5735
5744
  if (i.blockContent.node.childCount === 0 && i.blockContent.node.type.spec.content === "inline*") {
5736
- const c = De(
5745
+ const c = Oe(
5737
5746
  s.doc,
5738
5747
  i.bnBlock.beforePos
5739
5748
  );
@@ -5768,7 +5777,7 @@ const ra = ee.create({
5768
5777
  const i = v(s);
5769
5778
  if (!i.isBlockContainer)
5770
5779
  throw new Error("todo");
5771
- const a = s.selection.from === i.blockContent.beforePos + 1, c = s.selection.empty, l = De(
5780
+ const a = s.selection.from === i.blockContent.beforePos + 1, c = s.selection.empty, l = Oe(
5772
5781
  s.doc,
5773
5782
  i.bnBlock.beforePos
5774
5783
  );
@@ -5931,7 +5940,7 @@ class ca {
5931
5940
  });
5932
5941
  p(this, "scrollHandler", () => {
5933
5942
  var n;
5934
- this.linkMark !== void 0 && (n = this.state) != null && n.show && (this.state.referencePos = Oe(
5943
+ this.linkMark !== void 0 && (n = this.state) != null && n.show && (this.state.referencePos = Re(
5935
5944
  this.pmView,
5936
5945
  this.linkMarkRange.from,
5937
5946
  this.linkMarkRange.to
@@ -5997,7 +6006,7 @@ class ca {
5997
6006
  if (this.mouseHoveredLinkMark && o && (this.linkMark = this.mouseHoveredLinkMark, this.linkMarkRange = this.mouseHoveredLinkMarkRange), this.keyboardHoveredLinkMark && (this.linkMark = this.keyboardHoveredLinkMark, this.linkMarkRange = this.keyboardHoveredLinkMarkRange), this.linkMark && this.editor.isEditable) {
5998
6007
  this.state = {
5999
6008
  show: !0,
6000
- referencePos: Oe(
6009
+ referencePos: Re(
6001
6010
  this.pmView,
6002
6011
  this.linkMarkRange.from,
6003
6012
  this.linkMarkRange.to
@@ -6024,7 +6033,7 @@ class ca {
6024
6033
  }
6025
6034
  }
6026
6035
  const la = new U("LinkToolbarPlugin");
6027
- class da extends A {
6036
+ class da extends L {
6028
6037
  constructor(t) {
6029
6038
  super();
6030
6039
  p(this, "view");
@@ -6062,7 +6071,7 @@ class da extends A {
6062
6071
  });
6063
6072
  p(this, "closeMenu", () => this.view.closeMenu());
6064
6073
  this.addProsemirrorPlugin(
6065
- new L({
6074
+ new A({
6066
6075
  key: la,
6067
6076
  view: (o) => (this.view = new ca(t, o, (r) => {
6068
6077
  this.emit("update", r);
@@ -6073,6 +6082,9 @@ class da extends A {
6073
6082
  })
6074
6083
  );
6075
6084
  }
6085
+ static key() {
6086
+ return "linkToolbar";
6087
+ }
6076
6088
  onUpdate(t) {
6077
6089
  return this.on("update", t);
6078
6090
  }
@@ -6093,10 +6105,13 @@ const ua = [
6093
6105
  "cid",
6094
6106
  "xmpp"
6095
6107
  ], pa = "https", ha = new U("node-selection-keyboard");
6096
- class fa extends A {
6108
+ class fa extends L {
6109
+ static key() {
6110
+ return "nodeSelectionKeyboard";
6111
+ }
6097
6112
  constructor() {
6098
6113
  super(), this.addProsemirrorPlugin(
6099
- new L({
6114
+ new A({
6100
6115
  key: ha,
6101
6116
  props: {
6102
6117
  handleKeyDown: (n, t) => {
@@ -6127,10 +6142,13 @@ class fa extends A {
6127
6142
  }
6128
6143
  }
6129
6144
  const ma = new U("blocknote-placeholder");
6130
- class ga extends A {
6145
+ class ga extends L {
6146
+ static key() {
6147
+ return "placeholder";
6148
+ }
6131
6149
  constructor(n, t) {
6132
6150
  super(), this.addProsemirrorPlugin(
6133
- new L({
6151
+ new A({
6134
6152
  key: ma,
6135
6153
  view: (o) => {
6136
6154
  var l, d;
@@ -6213,12 +6231,15 @@ const tn = new U("previous-blocks"), ba = {
6213
6231
  depth: "depth",
6214
6232
  "depth-change": "depth-change"
6215
6233
  };
6216
- class ka extends A {
6234
+ class ka extends L {
6235
+ static key() {
6236
+ return "previousBlockType";
6237
+ }
6217
6238
  constructor() {
6218
6239
  super();
6219
6240
  let n;
6220
6241
  this.addProsemirrorPlugin(
6221
- new L({
6242
+ new A({
6222
6243
  key: tn,
6223
6244
  view(t) {
6224
6245
  return {
@@ -6303,12 +6324,12 @@ class ka extends A {
6303
6324
  }
6304
6325
  }
6305
6326
  const nn = new U("blocknote-show-selection");
6306
- class wa extends A {
6327
+ class wa extends L {
6307
6328
  constructor(t) {
6308
6329
  super();
6309
6330
  p(this, "enabled", !1);
6310
6331
  this.editor = t, this.addProsemirrorPlugin(
6311
- new L({
6332
+ new A({
6312
6333
  key: nn,
6313
6334
  props: {
6314
6335
  decorations: (o) => {
@@ -6324,6 +6345,9 @@ class wa extends A {
6324
6345
  })
6325
6346
  );
6326
6347
  }
6348
+ static key() {
6349
+ return "showSelection";
6350
+ }
6327
6351
  setEnabled(t) {
6328
6352
  this.enabled !== t && (this.enabled = t, this.editor.transact((o) => o.setMeta(nn, {})));
6329
6353
  }
@@ -6338,7 +6362,7 @@ function no(e, n) {
6338
6362
  if (((o = e.getAttribute) == null ? void 0 : o.call(e, "data-node-type")) === "blockContainer")
6339
6363
  return { node: e, id: e.getAttribute("data-id") };
6340
6364
  }
6341
- class se extends He {
6365
+ class ae extends De {
6342
6366
  constructor(t, o) {
6343
6367
  super(t, o);
6344
6368
  p(this, "nodes");
@@ -6349,13 +6373,13 @@ class se extends He {
6349
6373
  });
6350
6374
  }
6351
6375
  static create(t, o, r = o) {
6352
- return new se(t.resolve(o), t.resolve(r));
6376
+ return new ae(t.resolve(o), t.resolve(r));
6353
6377
  }
6354
6378
  content() {
6355
6379
  return new K(D.from(this.nodes), 0, 0);
6356
6380
  }
6357
6381
  eq(t) {
6358
- if (!(t instanceof se) || this.nodes.length !== t.nodes.length || this.from !== t.from || this.to !== t.to)
6382
+ if (!(t instanceof ae) || this.nodes.length !== t.nodes.length || this.from !== t.from || this.to !== t.to)
6359
6383
  return !1;
6360
6384
  for (let o = 0; o < this.nodes.length; o++)
6361
6385
  if (!this.nodes[o].eq(t.nodes[o]))
@@ -6364,7 +6388,7 @@ class se extends He {
6364
6388
  }
6365
6389
  map(t, o) {
6366
6390
  const r = o.mapResult(this.from), s = o.mapResult(this.to);
6367
- return s.deleted ? He.near(t.resolve(r.pos)) : r.deleted ? He.near(t.resolve(s.pos)) : new se(
6391
+ return s.deleted ? De.near(t.resolve(r.pos)) : r.deleted ? De.near(t.resolve(s.pos)) : new ae(
6368
6392
  t.resolve(r.pos),
6369
6393
  t.resolve(s.pos)
6370
6394
  );
@@ -6373,7 +6397,7 @@ class se extends He {
6373
6397
  return { type: "multiple-node", anchor: this.anchor, head: this.head };
6374
6398
  }
6375
6399
  }
6376
- He.jsonID("multiple-node", se);
6400
+ De.jsonID("multiple-node", ae);
6377
6401
  let z;
6378
6402
  function ya(e, n) {
6379
6403
  let t, o;
@@ -6423,17 +6447,17 @@ function Ca(e, n, t) {
6423
6447
  throw new Error(`Block with ID ${n.id} not found`);
6424
6448
  const s = r.posBeforeNode;
6425
6449
  if (s != null) {
6426
- const i = o.state.selection, a = o.state.doc, { from: c, to: l } = ya(i, a), d = c <= s && s < l, u = i.$anchor.node() !== i.$head.node() || i instanceof se;
6450
+ const i = o.state.selection, a = o.state.doc, { from: c, to: l } = ya(i, a), d = c <= s && s < l, u = i.$anchor.node() !== i.$head.node() || i instanceof ae;
6427
6451
  d && u ? (o.dispatch(
6428
- o.state.tr.setSelection(se.create(a, c, l))
6452
+ o.state.tr.setSelection(ae.create(a, c, l))
6429
6453
  ), on(o, c, l)) : (o.dispatch(
6430
- o.state.tr.setSelection(me.create(o.state.doc, s))
6454
+ o.state.tr.setSelection(ge.create(o.state.doc, s))
6431
6455
  ), on(o, s));
6432
- const h = o.state.selection.content(), f = t.pmSchema, m = o.serializeForClipboard(h).dom.innerHTML, g = qe(f, t), b = Zn(h.content), k = g.exportBlocks(b, {}), w = Mt(k);
6456
+ const h = o.state.selection.content(), f = t.pmSchema, m = o.serializeForClipboard(h).dom.innerHTML, g = Ke(f, t), b = Zn(h.content), k = g.exportBlocks(b, {}), w = Mt(k);
6433
6457
  e.dataTransfer.clearData(), e.dataTransfer.setData("blocknote/html", m), e.dataTransfer.setData("text/html", k), e.dataTransfer.setData("text/plain", w), e.dataTransfer.effectAllowed = "move", e.dataTransfer.setDragImage(z, 0, 0);
6434
6458
  }
6435
6459
  }
6436
- const ke = 0.1;
6460
+ const we = 0.1;
6437
6461
  function mt(e, n, t, o = !0) {
6438
6462
  const r = e.root.elementsFromPoint(
6439
6463
  // bit hacky - offset x position to right to account for the width of sidemenu itself
@@ -6575,7 +6599,7 @@ class Ea {
6575
6599
  throw new Error("New drag was started while an existing drag is ongoing");
6576
6600
  const o = document.createElement("div");
6577
6601
  o.innerHTML = t;
6578
- const s = Fe.fromSchema(this.pmView.state.schema).parse(o, {
6602
+ const s = ze.fromSchema(this.pmView.state.schema).parse(o, {
6579
6603
  topNode: this.pmView.state.schema.nodes.blockGroup.create()
6580
6604
  });
6581
6605
  this.pmView.dragging = {
@@ -6656,7 +6680,7 @@ class Ea {
6656
6680
  }
6657
6681
  createSyntheticEvent(n) {
6658
6682
  const t = new Event(n.type, n), o = this.pmView.dom.firstChild.getBoundingClientRect();
6659
- return t.clientX = n.clientX, t.clientY = n.clientY, n.clientX < o.left && n.clientX > o.left - o.width * ke ? t.clientX = o.left + o.width * ke / 2 : n.clientX > o.right && n.clientX < o.right + o.width * ke ? t.clientX = o.right - o.width * ke / 2 : (n.clientX < o.left || n.clientX > o.right) && (t.clientX = o.left + ke * o.width * 2), t.clientY = Math.min(
6683
+ return t.clientX = n.clientX, t.clientY = n.clientY, n.clientX < o.left && n.clientX > o.left - o.width * we ? t.clientX = o.left + o.width * we / 2 : n.clientX > o.right && n.clientX < o.right + o.width * we ? t.clientX = o.right - o.width * we / 2 : (n.clientX < o.left || n.clientX > o.right) && (t.clientX = o.left + we * o.width * 2), t.clientY = Math.min(
6660
6684
  Math.max(n.clientY, o.top),
6661
6685
  o.top + o.height
6662
6686
  ), t.dataTransfer = n.dataTransfer, t.preventDefault = () => n.preventDefault(), t.synthetic = !0, t;
@@ -6700,7 +6724,7 @@ class Ea {
6700
6724
  }
6701
6725
  }
6702
6726
  const Sa = new U("SideMenuPlugin");
6703
- class Ba extends A {
6727
+ class Ba extends L {
6704
6728
  constructor(t, o) {
6705
6729
  super();
6706
6730
  p(this, "view");
@@ -6733,7 +6757,7 @@ class Ba extends A {
6733
6757
  this.view.menuFrozen = !1, this.view.state.show = !1, this.view.emitUpdate(this.view.state);
6734
6758
  });
6735
6759
  this.editor = t, this.addProsemirrorPlugin(
6736
- new L({
6760
+ new A({
6737
6761
  key: Sa,
6738
6762
  view: (r) => (this.view = new Ea(
6739
6763
  t,
@@ -6746,23 +6770,26 @@ class Ba extends A {
6746
6770
  })
6747
6771
  );
6748
6772
  }
6773
+ static key() {
6774
+ return "sideMenu";
6775
+ }
6749
6776
  onUpdate(t) {
6750
6777
  return this.on("update", t);
6751
6778
  }
6752
6779
  }
6753
- const Le = /* @__PURE__ */ new Map();
6780
+ const Ae = /* @__PURE__ */ new Map();
6754
6781
  function xa(e) {
6755
- if (Le.has(e))
6756
- return Le.get(e);
6782
+ if (Ae.has(e))
6783
+ return Ae.get(e);
6757
6784
  const n = new co();
6758
6785
  return e._tiptapEditor.on("transaction", ({ transaction: t }) => {
6759
6786
  n.appendMapping(t.mapping);
6760
6787
  }), e._tiptapEditor.on("destroy", () => {
6761
- Le.delete(e);
6762
- }), Le.set(e, n), n;
6788
+ Ae.delete(e);
6789
+ }), Ae.set(e, n), n;
6763
6790
  }
6764
6791
  function Ta(e, n, t = "left") {
6765
- const o = ae.getState(
6792
+ const o = le.getState(
6766
6793
  e._tiptapEditor.state
6767
6794
  );
6768
6795
  if (!o) {
@@ -6776,7 +6803,7 @@ function Ta(e, n, t = "left") {
6776
6803
  o.binding.mapping
6777
6804
  );
6778
6805
  return () => {
6779
- const s = ae.getState(
6806
+ const s = le.getState(
6780
6807
  e._tiptapEditor.state
6781
6808
  ), i = Ko(
6782
6809
  s.doc,
@@ -6808,7 +6835,7 @@ class Pa {
6808
6835
  }
6809
6836
  });
6810
6837
  p(this, "closeMenu", () => {
6811
- this.editor.transact((n) => n.setMeta(fe, null));
6838
+ this.editor.transact((n) => n.setMeta(me, null));
6812
6839
  });
6813
6840
  p(this, "clearQuery", () => {
6814
6841
  this.pluginState !== void 0 && this.editor._tiptapEditor.chain().focus().deleteRange({
@@ -6829,7 +6856,7 @@ class Pa {
6829
6856
  }
6830
6857
  update(n, t) {
6831
6858
  var l;
6832
- const o = fe.getState(t), r = fe.getState(
6859
+ const o = me.getState(t), r = me.getState(
6833
6860
  n.state
6834
6861
  ), s = o === void 0 && r !== void 0, i = o !== void 0 && r === void 0;
6835
6862
  if (!s && !(o !== void 0 && r !== void 0) && !i)
@@ -6852,8 +6879,8 @@ class Pa {
6852
6879
  (n = this.rootEl) == null || n.removeEventListener("scroll", this.handleScroll, !0);
6853
6880
  }
6854
6881
  }
6855
- const fe = new U("SuggestionMenuPlugin");
6856
- class Ia extends A {
6882
+ const me = new U("SuggestionMenuPlugin");
6883
+ class Ia extends L {
6857
6884
  constructor(t) {
6858
6885
  super();
6859
6886
  p(this, "view");
@@ -6871,8 +6898,8 @@ class Ia extends A {
6871
6898
  p(this, "clearQuery", () => this.view.clearQuery());
6872
6899
  const o = this.triggerCharacters;
6873
6900
  this.addProsemirrorPlugin(
6874
- new L({
6875
- key: fe,
6901
+ new A({
6902
+ key: me,
6876
6903
  view: () => (this.view = new Pa(
6877
6904
  t,
6878
6905
  (r, s) => {
@@ -6887,7 +6914,7 @@ class Ia extends A {
6887
6914
  apply: (r, s, i, a) => {
6888
6915
  if (r.getMeta("orderedListIndexing") !== void 0 || r.selection.$from.parent.type.spec.code)
6889
6916
  return s;
6890
- const c = r.getMeta(fe);
6917
+ const c = r.getMeta(me);
6891
6918
  if (typeof c == "object" && c !== null) {
6892
6919
  s && this.closeMenu();
6893
6920
  const d = Ta(
@@ -6928,11 +6955,19 @@ class Ia extends A {
6928
6955
  },
6929
6956
  props: {
6930
6957
  handleTextInput(r, s, i, a) {
6931
- return o.includes(a) ? (r.dispatch(r.state.tr.insertText(a)), r.dispatch(
6932
- r.state.tr.setMeta(fe, {
6933
- triggerCharacter: a
6934
- }).scrollIntoView()
6935
- ), !0) : !1;
6958
+ if (s === i) {
6959
+ const c = r.state.doc;
6960
+ for (const l of o) {
6961
+ const d = l.length > 1 ? c.textBetween(s - l.length, s) + a : a;
6962
+ if (l === d)
6963
+ return r.dispatch(r.state.tr.insertText(a)), r.dispatch(
6964
+ r.state.tr.setMeta(me, {
6965
+ triggerCharacter: d
6966
+ }).scrollIntoView()
6967
+ ), !0;
6968
+ }
6969
+ }
6970
+ return !1;
6936
6971
  },
6937
6972
  // Setup decorator on the currently active suggestion.
6938
6973
  decorations(r) {
@@ -6970,6 +7005,9 @@ class Ia extends A {
6970
7005
  })
6971
7006
  );
6972
7007
  }
7008
+ static key() {
7009
+ return "suggestionMenu";
7010
+ }
6973
7011
  onUpdate(t, o) {
6974
7012
  return this.triggerCharacters.includes(t) || this.addTriggerCharacter(t), this.on(`update ${t}`, o);
6975
7013
  }
@@ -6981,7 +7019,7 @@ class Ia extends A {
6981
7019
  function zc(e, n) {
6982
7020
  e.suggestionMenus.addTriggerCharacter(n);
6983
7021
  }
6984
- const La = te.create({
7022
+ const La = ne.create({
6985
7023
  name: "insertion",
6986
7024
  inclusive: !1,
6987
7025
  excludes: "deletion modification insertion",
@@ -7019,7 +7057,7 @@ const La = te.create({
7019
7057
  ]
7020
7058
  };
7021
7059
  }
7022
- }), Aa = te.create({
7060
+ }), Aa = ne.create({
7023
7061
  name: "deletion",
7024
7062
  inclusive: !1,
7025
7063
  excludes: "insertion modification deletion",
@@ -7060,7 +7098,7 @@ const La = te.create({
7060
7098
  ]
7061
7099
  };
7062
7100
  }
7063
- }), Na = te.create({
7101
+ }), Na = ne.create({
7064
7102
  name: "modification",
7065
7103
  inclusive: !1,
7066
7104
  excludes: "deletion insertion",
@@ -7131,7 +7169,7 @@ function rn(e) {
7131
7169
  function Ha(e) {
7132
7170
  R && (e instanceof Document ? e.body.removeChild(R) : e.removeChild(R), R = void 0);
7133
7171
  }
7134
- function Ae(e) {
7172
+ function Ne(e) {
7135
7173
  return Array.prototype.indexOf.call(e.parentElement.childNodes, e);
7136
7174
  }
7137
7175
  function Da(e) {
@@ -7227,7 +7265,7 @@ class Ra {
7227
7265
  referencePosCell: w || (g = this.state) == null ? void 0 : g.referencePosCell
7228
7266
  };
7229
7267
  } else {
7230
- const b = Ae(t.domNode), k = Ae(t.domNode.parentElement), w = t.domNode.getBoundingClientRect();
7268
+ const b = Ne(t.domNode), k = Ne(t.domNode.parentElement), w = t.domNode.getBoundingClientRect();
7231
7269
  if (this.state !== void 0 && this.state.show && this.tableId === r.id && this.state.rowIndex === k && this.state.colIndex === b)
7232
7270
  return;
7233
7271
  this.state = {
@@ -7269,10 +7307,10 @@ class Ra {
7269
7307
  return;
7270
7308
  const r = o[0];
7271
7309
  let s = !1;
7272
- const i = Ae(r.parentElement), a = Ae(r), c = this.state.draggingState.draggedCellOrientation === "row" ? this.state.rowIndex : this.state.colIndex, d = (this.state.draggingState.draggedCellOrientation === "row" ? i : a) !== c;
7310
+ const i = Ne(r.parentElement), a = Ne(r), c = this.state.draggingState.draggedCellOrientation === "row" ? this.state.rowIndex : this.state.colIndex, d = (this.state.draggingState.draggedCellOrientation === "row" ? i : a) !== c;
7273
7311
  (this.state.rowIndex !== i || this.state.colIndex !== a) && (this.state.rowIndex = i, this.state.colIndex = a, this.state.referencePosCell = r.getBoundingClientRect(), s = !0);
7274
7312
  const u = this.state.draggingState.draggedCellOrientation === "row" ? t.top : t.left;
7275
- this.state.draggingState.mousePos !== u && (this.state.draggingState.mousePos = u, s = !0), s && this.emitUpdate(), d && this.editor.transact((f) => f.setMeta(we, !0));
7313
+ this.state.draggingState.mousePos !== u && (this.state.draggingState.mousePos = u, s = !0), s && this.emitUpdate(), d && this.editor.transact((f) => f.setMeta(ye, !0));
7276
7314
  });
7277
7315
  p(this, "dropHandler", (n) => {
7278
7316
  if (this.mouseState = "up", this.state === void 0 || this.state.draggingState === void 0)
@@ -7373,8 +7411,8 @@ class Ra {
7373
7411
  );
7374
7412
  }
7375
7413
  }
7376
- const we = new U("TableHandlesPlugin");
7377
- class Va extends A {
7414
+ const ye = new U("TableHandlesPlugin");
7415
+ class Va extends L {
7378
7416
  constructor(t) {
7379
7417
  super();
7380
7418
  p(this, "view");
@@ -7392,7 +7430,7 @@ class Va extends A {
7392
7430
  originalIndex: this.view.state.colIndex,
7393
7431
  mousePos: t.clientX
7394
7432
  }, this.view.emitUpdate(), this.editor.transact(
7395
- (o) => o.setMeta(we, {
7433
+ (o) => o.setMeta(ye, {
7396
7434
  draggedCellOrientation: this.view.state.draggingState.draggedCellOrientation,
7397
7435
  originalIndex: this.view.state.colIndex,
7398
7436
  newIndex: this.view.state.colIndex,
@@ -7416,7 +7454,7 @@ class Va extends A {
7416
7454
  originalIndex: this.view.state.rowIndex,
7417
7455
  mousePos: t.clientY
7418
7456
  }, this.view.emitUpdate(), this.editor.transact(
7419
- (o) => o.setMeta(we, {
7457
+ (o) => o.setMeta(ye, {
7420
7458
  draggedCellOrientation: this.view.state.draggingState.draggedCellOrientation,
7421
7459
  originalIndex: this.view.state.rowIndex,
7422
7460
  newIndex: this.view.state.rowIndex,
@@ -7435,7 +7473,7 @@ class Va extends A {
7435
7473
  throw new Error(
7436
7474
  "Attempted to drag table row, but no table block was hovered prior."
7437
7475
  );
7438
- if (this.view.state.draggingState = void 0, this.view.emitUpdate(), this.editor.transact((t) => t.setMeta(we, null)), !this.editor.prosemirrorView)
7476
+ if (this.view.state.draggingState = void 0, this.view.emitUpdate(), this.editor.transact((t) => t.setMeta(ye, null)), !this.editor.prosemirrorView)
7439
7477
  throw new Error("Editor view not initialized.");
7440
7478
  Ha(this.editor.prosemirrorView.root);
7441
7479
  });
@@ -7478,7 +7516,7 @@ class Va extends A {
7478
7516
  l.posAtIndex(r.col)
7479
7517
  ), u = t.tr;
7480
7518
  return u.setSelection(
7481
- new Ee(c, d)
7519
+ new Se(c, d)
7482
7520
  ), t.apply(u);
7483
7521
  });
7484
7522
  /**
@@ -7581,8 +7619,8 @@ class Va extends A {
7581
7619
  p(this, "cropEmptyRowsOrColumns", (t, o) => yr(t, o));
7582
7620
  p(this, "addRowsOrColumns", (t, o, r) => Cr(t, o, r));
7583
7621
  this.editor = t, this.addProsemirrorPlugin(
7584
- new L({
7585
- key: we,
7622
+ new A({
7623
+ key: ye,
7586
7624
  view: (o) => (this.view = new Ra(t, o, (r) => {
7587
7625
  this.emit("update", r);
7588
7626
  }), this.view),
@@ -7637,6 +7675,9 @@ class Va extends A {
7637
7675
  })
7638
7676
  );
7639
7677
  }
7678
+ static key() {
7679
+ return "tableHandles";
7680
+ }
7640
7681
  onUpdate(t) {
7641
7682
  return this.on("update", t);
7642
7683
  }
@@ -7677,9 +7718,9 @@ const Ua = V.create({
7677
7718
  types: ["blockContainer", "tableCell", "tableHeader"],
7678
7719
  attributes: {
7679
7720
  textColor: {
7680
- default: x.textColor.default,
7681
- parseHTML: (e) => e.hasAttribute("data-text-color") ? e.getAttribute("data-text-color") : x.textColor.default,
7682
- renderHTML: (e) => e.textColor === x.textColor.default ? {} : {
7721
+ default: T.textColor.default,
7722
+ parseHTML: (e) => e.hasAttribute("data-text-color") ? e.getAttribute("data-text-color") : T.textColor.default,
7723
+ renderHTML: (e) => e.textColor === T.textColor.default ? {} : {
7683
7724
  "data-text-color": e.textColor
7684
7725
  }
7685
7726
  }
@@ -7692,7 +7733,7 @@ const Ua = V.create({
7692
7733
  addProseMirrorPlugins() {
7693
7734
  const e = new U(this.name);
7694
7735
  return [
7695
- new L({
7736
+ new A({
7696
7737
  key: e,
7697
7738
  appendTransaction: (n, t, o) => {
7698
7739
  const { doc: r, tr: s, schema: i } = o, a = e.getState(o), c = r.content.size - 2, l = i.nodes.blockContainer, d = i.nodes.paragraph;
@@ -7728,7 +7769,7 @@ const Ua = V.create({
7728
7769
  id: "data-id",
7729
7770
  depth: "data-depth",
7730
7771
  depthChange: "data-depth-change"
7731
- }, za = ee.create({
7772
+ }, za = te.create({
7732
7773
  name: "blockContainer",
7733
7774
  group: "blockGroupChild bnBlock",
7734
7775
  // A block always contains content, and optionally a blockGroup which contains nested blocks
@@ -7767,7 +7808,7 @@ const Ua = V.create({
7767
7808
  ...((r = this.options.domAttributes) == null ? void 0 : r.block) || {},
7768
7809
  ...e
7769
7810
  }, o = document.createElement("div");
7770
- o.className = Z("bn-block", t.class), o.setAttribute("data-node-type", this.name);
7811
+ o.className = Q("bn-block", t.class), o.setAttribute("data-node-type", this.name);
7771
7812
  for (const [s, i] of Object.entries(t))
7772
7813
  s !== "class" && o.setAttribute(s, i);
7773
7814
  return n.appendChild(o), {
@@ -7775,7 +7816,7 @@ const Ua = V.create({
7775
7816
  contentDOM: o
7776
7817
  };
7777
7818
  }
7778
- }), Wa = ee.create({
7819
+ }), Wa = te.create({
7779
7820
  name: "blockGroup",
7780
7821
  group: "childContainer",
7781
7822
  content: "blockGroupChild+",
@@ -7794,7 +7835,7 @@ const Ua = V.create({
7794
7835
  ...((o = this.options.domAttributes) == null ? void 0 : o.blockGroup) || {},
7795
7836
  ...e
7796
7837
  }, t = document.createElement("div");
7797
- t.className = Z(
7838
+ t.className = Q(
7798
7839
  "bn-block-group",
7799
7840
  n.class
7800
7841
  ), t.setAttribute("data-node-type", "blockGroup");
@@ -7805,13 +7846,13 @@ const Ua = V.create({
7805
7846
  contentDOM: t
7806
7847
  };
7807
7848
  }
7808
- }), ja = ee.create({
7849
+ }), ja = te.create({
7809
7850
  name: "doc",
7810
7851
  topNode: !0,
7811
7852
  content: "blockGroup",
7812
7853
  marks: "insertion modification deletion"
7813
7854
  });
7814
- class Ga extends A {
7855
+ class Ga extends L {
7815
7856
  constructor({
7816
7857
  editor: t,
7817
7858
  collaboration: o
@@ -7826,7 +7867,7 @@ class Ga extends A {
7826
7867
  p(this, "forkedState");
7827
7868
  this.editor = t, this.collaboration = o;
7828
7869
  }
7829
- static name() {
7870
+ static key() {
7830
7871
  return "ForkYDocPlugin";
7831
7872
  }
7832
7873
  /**
@@ -7842,7 +7883,7 @@ class Ga extends A {
7842
7883
  throw new Error("type does not exist in other ydoc");
7843
7884
  return o.get(s, t.constructor);
7844
7885
  } else {
7845
- const s = t._item, i = o.store.clients.get(s.id.client) ?? [], a = pe.findIndexSS(i, s.id.clock);
7886
+ const s = t._item, i = o.store.clients.get(s.id.client) ?? [], a = he.findIndexSS(i, s.id.clock);
7846
7887
  return i[a].content.type;
7847
7888
  }
7848
7889
  }
@@ -7864,8 +7905,8 @@ class Ga extends A {
7864
7905
  const t = this.collaboration.fragment;
7865
7906
  if (!t)
7866
7907
  throw new Error("No fragment to fork from");
7867
- const o = new pe.Doc();
7868
- pe.applyUpdate(o, pe.encodeStateAsUpdate(t.doc));
7908
+ const o = new he.Doc();
7909
+ he.applyUpdate(o, he.encodeStateAsUpdate(t.doc));
7869
7910
  const r = this.findTypeInOtherYdoc(t, o);
7870
7911
  this.forkedState = {
7871
7912
  originalFragment: t,
@@ -7873,7 +7914,7 @@ class Ga extends A {
7873
7914
  }, this.editor._tiptapEditor.unregisterPlugin([
7874
7915
  Jo,
7875
7916
  Dt,
7876
- ae
7917
+ le
7877
7918
  ]), this.editor._tiptapEditor.registerPlugin(
7878
7919
  new ht(r).plugins[0]
7879
7920
  ), this.editor._tiptapEditor.registerPlugin(new ft().plugins[0]), this.emit("forked", !0);
@@ -7886,13 +7927,13 @@ class Ga extends A {
7886
7927
  merge({ keepChanges: t }) {
7887
7928
  if (!this.forkedState)
7888
7929
  return;
7889
- this.editor._tiptapEditor.unregisterPlugin(ae), this.editor._tiptapEditor.unregisterPlugin(Dt);
7930
+ this.editor._tiptapEditor.unregisterPlugin(le), this.editor._tiptapEditor.unregisterPlugin(Dt);
7890
7931
  const { originalFragment: o, forkedFragment: r } = this.forkedState;
7891
7932
  if (t) {
7892
- const s = pe.encodeStateAsUpdate(r.doc);
7893
- pe.applyUpdate(o.doc, s);
7933
+ const s = he.encodeStateAsUpdate(r.doc);
7934
+ he.applyUpdate(o.doc, s);
7894
7935
  }
7895
- this.editor.extensions.ySyncPlugin = new ht(o), this.editor.extensions.yCursorPlugin = new Ve(
7936
+ this.editor.extensions.ySyncPlugin = new ht(o), this.editor.extensions.yCursorPlugin = new Ue(
7896
7937
  this.collaboration
7897
7938
  ), this.editor.extensions.yUndoPlugin = new ft(), this.editor._tiptapEditor.registerPlugin(
7898
7939
  this.editor.extensions.ySyncPlugin.plugins[0]
@@ -7908,7 +7949,7 @@ const qa = (e) => {
7908
7949
  const n = {}, t = Ka(e);
7909
7950
  for (const s of t)
7910
7951
  n[s.name] = s;
7911
- e.collaboration && (n.ySyncPlugin = new ht(e.collaboration.fragment), n.yUndoPlugin = new ft(), (r = e.collaboration.provider) != null && r.awareness && (n.yCursorPlugin = new Ve(e.collaboration)), n.forkYDocPlugin = new Ga({
7952
+ e.collaboration && (n.ySyncPlugin = new ht(e.collaboration.fragment), n.yUndoPlugin = new ft(), (r = e.collaboration.provider) != null && r.awareness && (n.yCursorPlugin = new Ue(e.collaboration)), n.forkYDocPlugin = new Ga({
7912
7953
  editor: e.editor,
7913
7954
  collaboration: e.collaboration
7914
7955
  })), n.formattingToolbar = new oa(
@@ -7929,11 +7970,11 @@ const qa = (e) => {
7929
7970
  let sn = !1;
7930
7971
  const Ka = (e) => {
7931
7972
  const n = [
7932
- be.ClipboardTextSerializer,
7933
- be.Commands,
7934
- be.Editable,
7935
- be.FocusEvents,
7936
- be.Tabindex,
7973
+ ke.ClipboardTextSerializer,
7974
+ ke.Commands,
7975
+ ke.Editable,
7976
+ ke.FocusEvents,
7977
+ ke.Tabindex,
7937
7978
  // DevTools,
7938
7979
  Vo,
7939
7980
  // DropCursor,
@@ -7947,7 +7988,7 @@ const Ka = (e) => {
7947
7988
  })
7948
7989
  ]
7949
7990
  }),
7950
- ze.configure({
7991
+ We.configure({
7951
7992
  // everything from bnBlock group (nodes that represent a BlockNote block should have an id)
7952
7993
  types: ["blockContainer", "columnList", "column"],
7953
7994
  setIdAttribute: e.setIdAttribute
@@ -8082,7 +8123,7 @@ function Za(e, n) {
8082
8123
  }
8083
8124
  return !0;
8084
8125
  }
8085
- const $e = class $e extends fo {
8126
+ const Fe = class Fe extends fo {
8086
8127
  constructor(t, o) {
8087
8128
  super({ ...t, content: void 0 });
8088
8129
  p(this, "_state");
@@ -8106,7 +8147,7 @@ const $e = class $e extends fo {
8106
8147
  let a;
8107
8148
  try {
8108
8149
  const c = t == null ? void 0 : t.content.map(
8109
- (l) => de(l, this.schema, o).toJSON()
8150
+ (l) => pe(l, this.schema, o).toJSON()
8110
8151
  );
8111
8152
  a = mo(
8112
8153
  {
@@ -8222,18 +8263,18 @@ const $e = class $e extends fo {
8222
8263
  ), this.emit("create", { editor: this }), this.isInitialized = !0;
8223
8264
  }
8224
8265
  };
8225
- p($e, "create", (t, o) => {
8266
+ p(Fe, "create", (t, o) => {
8226
8267
  var s, i;
8227
8268
  const r = (s = globalThis == null ? void 0 : globalThis.window) == null ? void 0 : s.setTimeout;
8228
8269
  typeof ((i = globalThis == null ? void 0 : globalThis.window) == null ? void 0 : i.setTimeout) < "u" && (globalThis.window.setTimeout = () => 0);
8229
8270
  try {
8230
- return new $e(t, o);
8271
+ return new Fe(t, o);
8231
8272
  } finally {
8232
8273
  r && (globalThis.window.setTimeout = r);
8233
8274
  }
8234
8275
  });
8235
- let Ue = $e;
8236
- Ue.prototype.createView = function() {
8276
+ let _e = Fe;
8277
+ _e.prototype.createView = function() {
8237
8278
  this.options.onPaste = this.options.onDrop = void 0;
8238
8279
  };
8239
8280
  const Qa = {
@@ -8361,7 +8402,7 @@ class ro extends It {
8361
8402
  };
8362
8403
  const r = {
8363
8404
  defaultStyles: !0,
8364
- schema: t.schema || Me.create(),
8405
+ schema: t.schema || Pe.create(),
8365
8406
  _headless: !1,
8366
8407
  ...t,
8367
8408
  placeholders: {
@@ -8394,22 +8435,45 @@ class ro extends It {
8394
8435
  });
8395
8436
  for (let y of r.extensions || []) {
8396
8437
  typeof y == "function" && (y = y(this));
8397
- const T = y.constructor.name();
8398
- this.extensions[T] = y;
8438
+ const x = y.constructor.key();
8439
+ if (!x)
8440
+ throw new Error(
8441
+ `Extension ${y.constructor.name} does not have a key method`
8442
+ );
8443
+ if (this.extensions[x])
8444
+ throw new Error(
8445
+ `Extension ${y.constructor.name} already exists with key ${x}`
8446
+ );
8447
+ this.extensions[x] = y;
8399
8448
  }
8400
- if (Object.entries(r._extensions || {}).forEach(([y, T]) => {
8401
- typeof T == "function" && (T = T(this)), this.extensions[y] = T;
8449
+ if (Object.entries(r._extensions || {}).forEach(([y, x]) => {
8450
+ const Y = typeof x == "function" ? x(this) : x;
8451
+ if (!("plugin" in Y)) {
8452
+ this.extensions[y] = Y;
8453
+ return;
8454
+ }
8455
+ this.extensions[y] = new class extends L {
8456
+ static key() {
8457
+ return y;
8458
+ }
8459
+ constructor() {
8460
+ super(), this.addProsemirrorPlugin(Y.plugin);
8461
+ }
8462
+ get priority() {
8463
+ return Y.priority;
8464
+ }
8465
+ }();
8402
8466
  }), this.formattingToolbar = this.extensions.formattingToolbar, this.linkToolbar = this.extensions.linkToolbar, this.sideMenu = this.extensions.sideMenu, this.suggestionMenus = this.extensions.suggestionMenus, this.filePanel = this.extensions.filePanel, this.tableHandles = this.extensions.tableHandles, this.comments = this.extensions.comments, this.showSelectionPlugin = this.extensions.showSelection, this.forkYDocPlugin = this.extensions.forkYDocPlugin, r.uploadFile) {
8403
8467
  const y = r.uploadFile;
8404
- this.uploadFile = async (T, ue) => {
8468
+ this.uploadFile = async (x, se) => {
8405
8469
  this.onUploadStartCallbacks.forEach(
8406
- (Xe) => Xe.apply(this, [ue])
8470
+ (Y) => Y.apply(this, [se])
8407
8471
  );
8408
8472
  try {
8409
- return await y(T, ue);
8473
+ return await y(x, se);
8410
8474
  } finally {
8411
8475
  this.onUploadEndCallbacks.forEach(
8412
- (Xe) => Xe.apply(this, [ue])
8476
+ (Y) => Y.apply(this, [se])
8413
8477
  );
8414
8478
  }
8415
8479
  };
@@ -8427,7 +8491,7 @@ class ro extends It {
8427
8491
  ] : [
8428
8492
  {
8429
8493
  type: "paragraph",
8430
- id: ze.options.generateID()
8494
+ id: We.options.generateID()
8431
8495
  }
8432
8496
  ]);
8433
8497
  if (!Array.isArray(i) || i.length === 0)
@@ -8435,14 +8499,14 @@ class ro extends It {
8435
8499
  "initialContent must be a non-empty array of blocks, received: " + i
8436
8500
  );
8437
8501
  const a = [
8438
- ...Object.entries(this.extensions).map(([y, T]) => {
8439
- if (T instanceof V || T instanceof ee || T instanceof te)
8440
- return T;
8441
- if (!(T instanceof A && !T.plugins.length))
8502
+ ...Object.entries(this.extensions).map(([y, x]) => {
8503
+ if (x instanceof V || x instanceof te || x instanceof ne)
8504
+ return x;
8505
+ if (!(x instanceof L && !x.plugins.length))
8442
8506
  return V.create({
8443
8507
  name: y,
8444
- priority: T.priority,
8445
- addProseMirrorPlugins: () => T.plugins
8508
+ priority: x.priority,
8509
+ addProseMirrorPlugins: () => x.plugins
8446
8510
  });
8447
8511
  })
8448
8512
  ].filter((y) => y !== void 0), c = {
@@ -8459,7 +8523,7 @@ class ro extends It {
8459
8523
  tabIndex: "0",
8460
8524
  ...(B = (C = r._tiptapOptions) == null ? void 0 : C.editorProps) == null ? void 0 : B.attributes,
8461
8525
  ...(P = r.domAttributes) == null ? void 0 : P.editor,
8462
- class: Z(
8526
+ class: Q(
8463
8527
  "bn-editor",
8464
8528
  r.defaultStyles ? "bn-default-styles" : "",
8465
8529
  ((S = ($ = r.domAttributes) == null ? void 0 : $.editor) == null ? void 0 : S.class) || ""
@@ -8468,7 +8532,7 @@ class ro extends It {
8468
8532
  transformPasted: Ya
8469
8533
  }
8470
8534
  };
8471
- this.headless ? this.pmSchema = go(c.extensions) : (this._tiptapEditor = Ue.create(
8535
+ this.headless ? this.pmSchema = go(c.extensions) : (this._tiptapEditor = _e.create(
8472
8536
  c,
8473
8537
  this.schema.styleSchema
8474
8538
  ), this.pmSchema = this._tiptapEditor.schema), this.pmSchema.cached.blockNoteEditor = this, this.emit("create");
@@ -8556,7 +8620,7 @@ class ro extends It {
8556
8620
  * @param key - optional, the key of the extension in the extensions object (defaults to the extension name)
8557
8621
  * @returns The extension instance
8558
8622
  */
8559
- extension(t, o = t.name()) {
8623
+ extension(t, o = t.key()) {
8560
8624
  const r = this.extensions[o];
8561
8625
  if (!r)
8562
8626
  throw new Error(`Extension ${o} not found`);
@@ -8984,7 +9048,7 @@ class ro extends It {
8984
9048
  * @returns The blocks, serialized as an HTML string.
8985
9049
  */
8986
9050
  async blocksToHTMLLossy(t = this.document) {
8987
- return qe(this.pmSchema, this).exportBlocks(t, {});
9051
+ return Ke(this.pmSchema, this).exportBlocks(t, {});
8988
9052
  }
8989
9053
  /**
8990
9054
  * Serializes blocks into an HTML string in the format that would normally be rendered by the editor.
@@ -9068,7 +9132,7 @@ class ro extends It {
9068
9132
  if (this.headless)
9069
9133
  return;
9070
9134
  const r = (s) => {
9071
- s.transaction.getMeta(ae) && !o || t(this);
9135
+ s.transaction.getMeta(le) && !o || t(this);
9072
9136
  };
9073
9137
  return this._tiptapEditor.on("selectionUpdate", r), () => {
9074
9138
  this._tiptapEditor.off("selectionUpdate", r);
@@ -9093,7 +9157,7 @@ class ro extends It {
9093
9157
  if (i)
9094
9158
  return i.getBoundingClientRect();
9095
9159
  }
9096
- return Oe(this.prosemirrorView, r, s);
9160
+ return Re(this.prosemirrorView, r, s);
9097
9161
  }
9098
9162
  get isEmpty() {
9099
9163
  const t = this.document;
@@ -9265,9 +9329,9 @@ function qc(e) {
9265
9329
  createStyleMapping: (n) => n
9266
9330
  };
9267
9331
  }
9268
- let Ne;
9332
+ let He;
9269
9333
  async function ec() {
9270
- return Ne || (Ne = (async () => {
9334
+ return He || (He = (async () => {
9271
9335
  const [e, n] = await Promise.all([
9272
9336
  import("emoji-mart"),
9273
9337
  // use a dynamic import to encourage bundle-splitting
@@ -9275,7 +9339,7 @@ async function ec() {
9275
9339
  import("@emoji-mart/data")
9276
9340
  ]), t = "default" in e ? e.default : e, o = "default" in n ? n.default : n;
9277
9341
  return await t.init({ data: o }), { emojiMart: t, emojiData: o };
9278
- })(), Ne);
9342
+ })(), He);
9279
9343
  }
9280
9344
  async function Kc(e, n) {
9281
9345
  if (!zs("text", e))
@@ -9300,8 +9364,8 @@ function Jc(e, ...n) {
9300
9364
  export {
9301
9365
  zr as AudioBlock,
9302
9366
  ro as BlockNoteEditor,
9303
- A as BlockNoteExtension,
9304
- Me as BlockNoteSchema,
9367
+ L as BlockNoteExtension,
9368
+ Pe as BlockNoteSchema,
9305
9369
  jc as COLORS_DARK_MODE_DEFAULT,
9306
9370
  Wc as COLORS_DEFAULT,
9307
9371
  Gr as CodeBlock,
@@ -9328,7 +9392,7 @@ export {
9328
9392
  Ia as SuggestionMenuProseMirrorPlugin,
9329
9393
  Va as TableHandlesProsemirrorPlugin,
9330
9394
  Ra as TableHandlesView,
9331
- ze as UniqueID,
9395
+ We as UniqueID,
9332
9396
  j as UnreachableCaseError,
9333
9397
  ua as VALID_LINK_PROTOCOLS,
9334
9398
  _s as VideoBlock,
@@ -9342,9 +9406,9 @@ export {
9342
9406
  Vr as audioPropSchema,
9343
9407
  _r as audioRender,
9344
9408
  Fr as audioToExternalHTML,
9345
- de as blockToNode,
9409
+ pe as blockToNode,
9346
9410
  ki as blocksToMarkdown,
9347
- Re as camelToDataKebab,
9411
+ Ve as camelToDataKebab,
9348
9412
  Rc as checkBlockHasDefaultProp,
9349
9413
  Ws as checkBlockIsDefaultType,
9350
9414
  Hc as checkBlockIsFileBlock,
@@ -9356,13 +9420,13 @@ export {
9356
9420
  Zs as checkPageBreakBlocksInSchema,
9357
9421
  Mt as cleanHTMLToMarkdown,
9358
9422
  Jc as combineByGroup,
9359
- je as contentNodeToInlineContent,
9423
+ Ge as contentNodeToInlineContent,
9360
9424
  kn as contentNodeToTableContent,
9361
9425
  Hr as createAddFileButton,
9362
- Be as createBlockSpec,
9363
- ne as createBlockSpecFromStronglyTypedTiptapNode,
9426
+ xe as createBlockSpec,
9427
+ oe as createBlockSpecFromStronglyTypedTiptapNode,
9364
9428
  G as createDefaultBlockDOMOutputSpec,
9365
- qe as createExternalHTMLExporter,
9429
+ Ke as createExternalHTMLExporter,
9366
9430
  St as createFigureWithCaption,
9367
9431
  Et as createFileBlockWrapper,
9368
9432
  Or as createFileNameWithIcon,
@@ -9372,11 +9436,11 @@ export {
9372
9436
  Nr as createInternalHTMLSerializer,
9373
9437
  pr as createInternalInlineContentSpec,
9374
9438
  yn as createInternalStyleSpec,
9375
- Je as createLinkWithCaption,
9439
+ Xe as createLinkWithCaption,
9376
9440
  Nn as createResizableFileBlockWrapper,
9377
9441
  q as createStronglyTypedTiptapNode,
9378
9442
  Lc as createStyleSpec,
9379
- re as createStyleSpecFromTipTapMark,
9443
+ ie as createStyleSpecFromTipTapMark,
9380
9444
  zc as createSuggestionMenu,
9381
9445
  $s as defaultBlockSchema,
9382
9446
  Vn as defaultBlockSpecs,
@@ -9384,11 +9448,11 @@ export {
9384
9448
  Wr as defaultCodeBlockPropSchema,
9385
9449
  Fs as defaultInlineContentSchema,
9386
9450
  _n as defaultInlineContentSpecs,
9387
- x as defaultProps,
9451
+ T as defaultProps,
9388
9452
  Nc as defaultStyleSchema,
9389
9453
  Un as defaultStyleSpecs,
9390
9454
  lr as docToBlocks,
9391
- he as esmDependencies,
9455
+ fe as esmDependencies,
9392
9456
  Zr as fileBlockConfig,
9393
9457
  es as fileParse,
9394
9458
  Yr as filePropSchema,
@@ -9396,22 +9460,22 @@ export {
9396
9460
  ts as fileToExternalHTML,
9397
9461
  Pc as filenameFromURL,
9398
9462
  _c as filterSuggestionItems,
9399
- Y as formatKeyboardShortcut,
9463
+ Z as formatKeyboardShortcut,
9400
9464
  na as formattingToolbarPluginKey,
9401
9465
  ai as getBlock,
9402
9466
  Ct as getBlockCache,
9403
9467
  ir as getBlockFromPos,
9404
- Q as getBlockInfo,
9405
- xe as getBlockInfoFromResolvedPos,
9468
+ ee as getBlockInfo,
9469
+ Te as getBlockInfoFromResolvedPos,
9406
9470
  v as getBlockInfoFromSelection,
9407
- We as getBlockInfoFromTransaction,
9471
+ je as getBlockInfoFromTransaction,
9408
9472
  kt as getBlockInfoWithManualOffset,
9409
9473
  qa as getBlockNoteExtensions,
9410
- Te as getBlockNoteSchema,
9474
+ Me as getBlockNoteSchema,
9411
9475
  wt as getBlockSchema,
9412
9476
  gn as getBlockSchemaFromSpecs,
9413
9477
  Br as getBlocksChangedByTransaction,
9414
- Ce as getColspan,
9478
+ ve as getColspan,
9415
9479
  Kc as getDefaultEmojiPickerItems,
9416
9480
  Uc as getDefaultSlashMenuItems,
9417
9481
  fr as getInlineContentParseRules,
@@ -9427,7 +9491,7 @@ export {
9427
9491
  ci as getPrevBlock,
9428
9492
  st as getRowspan,
9429
9493
  br as getStyleParseRules,
9430
- ge as getStyleSchema,
9494
+ be as getStyleSchema,
9431
9495
  Cn as getStyleSchemaFromSpecs,
9432
9496
  as as imageBlockConfig,
9433
9497
  ls as imageParse,
@@ -9443,9 +9507,9 @@ export {
9443
9507
  Ot as isLinkInlineContent,
9444
9508
  ut as isNodeBlock,
9445
9509
  hn as isPartialLinkInlineContent,
9446
- ye as isPartialTableCell,
9510
+ Ce as isPartialTableCell,
9447
9511
  Tc as isSafari,
9448
- ce as isStyledTextInlineContent,
9512
+ de as isStyledTextInlineContent,
9449
9513
  bt as isTableCell,
9450
9514
  Kt as isTableCellSelection,
9451
9515
  la as linkToolbarPluginKey,
@@ -9453,7 +9517,7 @@ export {
9453
9517
  qc as mappingFactory,
9454
9518
  Bi as markdownToBlocks,
9455
9519
  Xn as markdownToHTML,
9456
- Z as mergeCSSClasses,
9520
+ Q as mergeCSSClasses,
9457
9521
  Mc as mergeParagraphs,
9458
9522
  E as nodeToBlock,
9459
9523
  it as nodeToCustomInlineContent,
@@ -9463,8 +9527,8 @@ export {
9463
9527
  $n as pageBreakSchema,
9464
9528
  Xs as pageBreakToExternalHTML,
9465
9529
  Wt as parseEmbedElement,
9466
- Ke as parseFigureElement,
9467
- Se as propsToAttributes,
9530
+ Je as parseFigureElement,
9531
+ Be as propsToAttributes,
9468
9532
  dr as prosemirrorSliceToSlicedBlocks,
9469
9533
  _t as removeAndInsertBlocks,
9470
9534
  Qn as selectedFragmentToHTML,
@@ -9472,8 +9536,8 @@ export {
9472
9536
  zt as shikiParserSymbol,
9473
9537
  Sa as sideMenuPluginKey,
9474
9538
  mr as stylePropsToAttributes,
9475
- Ge as tableContentToNodes,
9476
- we as tableHandlesPluginKey,
9539
+ qe as tableContentToNodes,
9540
+ ye as tableHandlesPluginKey,
9477
9541
  Ta as trackPosition,
9478
9542
  Mr as updateBlock,
9479
9543
  I as updateBlockCommand,
@@ -9485,6 +9549,6 @@ export {
9485
9549
  Rs as videoRender,
9486
9550
  Us as videoToExternalHTML,
9487
9551
  $c as withPageBreak,
9488
- Pe as wrapInBlockStructure
9552
+ Ie as wrapInBlockStructure
9489
9553
  };
9490
9554
  //# sourceMappingURL=blocknote.js.map