@blocknote/core 0.34.0 → 0.35.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.
package/dist/blocknote.js CHANGED
@@ -1,10 +1,10 @@
1
1
  var co = Object.defineProperty;
2
2
  var lo = (e, n, t) => n in e ? co(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
3
3
  var p = (e, n, t) => lo(e, typeof n != "symbol" ? n + "" : n, t);
4
- import { Slice as J, Fragment as R, DOMSerializer as ln, DOMParser as We, Node as uo } from "prosemirror-model";
4
+ import { Slice as J, Fragment as R, DOMSerializer as ln, DOMParser as Se, Node as uo } from "prosemirror-model";
5
5
  import { ReplaceStep as dn, ReplaceAroundStep as ot, Mapping as po } from "prosemirror-transform";
6
- import { Extension as _, combineTransactionSteps as un, getChangedRanges as ho, findChildrenInRange as fo, Node as oe, Mark as re, isTextSelection as pn, InputRule as le, callOrReturn as mo, getExtensionField as go, mergeAttributes as gt, selectionToInsertionEnd as bo, isNodeSelection as rt, posToDOMRect as _e, getMarkRange as At, findChildren as Nt, findParentNode as ko, extensions as we, Editor as wo, createDocument as yo, getSchema as Co } from "@tiptap/core";
7
- import { Plugin as L, PluginKey as U, TextSelection as O, NodeSelection as be, Selection as Re, EditorState as vo } from "prosemirror-state";
6
+ import { Extension as _, combineTransactionSteps as un, getChangedRanges as ho, findChildrenInRange as fo, Node as oe, Mark as re, isTextSelection as pn, InputRule as le, callOrReturn as mo, getExtensionField as go, mergeAttributes as gt, selectionToInsertionEnd as bo, isNodeSelection as rt, posToDOMRect as Ue, getMarkRange as At, findChildren as Nt, findParentNode as ko, extensions as we, Editor as wo, createDocument as yo, getSchema as Co } from "@tiptap/core";
7
+ import { Plugin as L, PluginKey as U, TextSelection as O, NodeSelection as be, Selection as Ve, EditorState as vo } from "prosemirror-state";
8
8
  import { v4 as hn } from "uuid";
9
9
  import { createHighlightPlugin as Eo } from "prosemirror-highlight";
10
10
  import { createParser as So } from "prosemirror-highlight/shiki";
@@ -15,12 +15,12 @@ import Mo from "@tiptap/extension-strike";
15
15
  import Po from "@tiptap/extension-underline";
16
16
  import { TableCell as Io } from "@tiptap/extension-table-cell";
17
17
  import { TableHeader as Lo } from "@tiptap/extension-table-header";
18
- import { goToNextCell as Ht, columnResizing as Ao, tableEditing as No, TableView as Ho, CellSelection as Se, TableMap as Dt, addRowBefore as Do, addRowAfter as Oo, addColumnBefore as Ro, addColumnAfter as Vo, deleteRow as _o, deleteColumn as Uo, mergeCells as $o, splitCell as Fo } from "prosemirror-tables";
18
+ import { goToNextCell as Ht, columnResizing as Ao, tableEditing as No, TableView as Ho, CellSelection as Be, TableMap as Dt, addRowBefore as Do, addRowAfter as Oo, addColumnBefore as Ro, addColumnAfter as Vo, deleteRow as _o, deleteColumn as Uo, mergeCells as $o, splitCell as Fo } from "prosemirror-tables";
19
19
  import { Gapcursor as zo } from "@tiptap/extension-gapcursor";
20
20
  import { History as Wo } from "@tiptap/extension-history";
21
21
  import { Link as jo } from "@tiptap/extension-link";
22
22
  import { Text as Go } from "@tiptap/extension-text";
23
- import { yCursorPlugin as qo, defaultSelectionBuilder as Ko, ySyncPlugin as Yo, yUndoPlugin as Jo, ySyncPluginKey as de, getRelativeSelection as Xo, absolutePositionToRelativePosition as Zo, relativePositionToAbsolutePosition as Qo, yUndoPluginKey as Le, yCursorPluginKey as er, undoCommand as tr, redoCommand as nr } from "y-prosemirror";
23
+ import { yCursorPlugin as qo, defaultSelectionBuilder as Ko, ySyncPlugin as Yo, yUndoPlugin as Jo, ySyncPluginKey as de, getRelativeSelection as Xo, absolutePositionToRelativePosition as Zo, relativePositionToAbsolutePosition as Qo, yUndoPluginKey as Ae, yCursorPluginKey as er, undoCommand as tr, redoCommand as nr } from "y-prosemirror";
24
24
  import { DecorationSet as G, Decoration as X, EditorView as or } from "prosemirror-view";
25
25
  import * as ie from "yjs";
26
26
  import { undo as rr, redo as sr } from "prosemirror-history";
@@ -134,15 +134,15 @@ const je = _.create({
134
134
  (w) => c.includes(w.type.name)
135
135
  ), b = g.map(({ node: w }) => w.attrs[l]).filter((w) => w !== null), k = lr(b);
136
136
  g.forEach(({ node: w, pos: y }) => {
137
- let x;
138
- const N = (x = a.doc.nodeAt(y)) === null || x === void 0 ? void 0 : x.attrs[l];
137
+ let v;
138
+ const N = (v = a.doc.nodeAt(y)) === null || v === void 0 ? void 0 : v.attrs[l];
139
139
  if (N === null) {
140
- const v = o.doc.type.createAndFill().content;
141
- if (o.doc.content.findDiffStart(v) === null) {
142
- const B = JSON.parse(
140
+ const E = o.doc.type.createAndFill().content;
141
+ if (o.doc.content.findDiffStart(E) === null) {
142
+ const x = JSON.parse(
143
143
  JSON.stringify(r.doc.toJSON())
144
144
  );
145
- if (B.content[0].content[0].attrs.id = "initialBlockId", JSON.stringify(B.content) === JSON.stringify(v.toJSON())) {
145
+ if (x.content[0].content[0].attrs.id = "initialBlockId", JSON.stringify(x.content) === JSON.stringify(E.toJSON())) {
146
146
  a.setNodeMarkup(y, void 0, {
147
147
  ...w.attrs,
148
148
  [l]: "initialBlockId"
@@ -279,7 +279,7 @@ class q extends Error {
279
279
  super(`Unreachable case: ${n}`);
280
280
  }
281
281
  }
282
- function Rc(e, n = !0) {
282
+ function Vc(e, n = !0) {
283
283
  const { "data-test": t, ...o } = e;
284
284
  if (Object.keys(o).length > 0 && n)
285
285
  throw new Error("Object must be empty " + JSON.stringify(e));
@@ -296,7 +296,7 @@ function te(...e) {
296
296
  )
297
297
  ].join(" ");
298
298
  }
299
- const Vc = () => /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
299
+ const _c = () => /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
300
300
  function $(e, n, t, o) {
301
301
  const r = document.createElement("div");
302
302
  r.className = te(
@@ -334,7 +334,7 @@ const Rt = (e, n) => {
334
334
  );
335
335
  return r;
336
336
  };
337
- function _c(e) {
337
+ function ur(e) {
338
338
  const n = e.querySelectorAll("p");
339
339
  if (n.length > 1) {
340
340
  const t = n[0];
@@ -356,7 +356,7 @@ const M = {
356
356
  values: ["left", "center", "right", "justify"]
357
357
  }
358
358
  }, mn = ["backgroundColor", "textColor"];
359
- function Ue(e) {
359
+ function $e(e) {
360
360
  return "data-" + e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
361
361
  }
362
362
  function Uc(e) {
@@ -364,7 +364,7 @@ function Uc(e) {
364
364
  return !n.length || // invalid?
365
365
  n[n.length - 1] === "" ? e : n[n.length - 1];
366
366
  }
367
- function Be(e) {
367
+ function xe(e) {
368
368
  const n = {};
369
369
  return Object.entries(e).filter(([t, o]) => !mn.includes(t)).forEach(([t, o]) => {
370
370
  n[t] = {
@@ -374,7 +374,7 @@ function Be(e) {
374
374
  // value is the same as its default, we don't display an HTML
375
375
  // attribute for it.
376
376
  parseHTML: (r) => {
377
- const s = r.getAttribute(Ue(t));
377
+ const s = r.getAttribute($e(t));
378
378
  if (s === null)
379
379
  return null;
380
380
  if (o.default === void 0 && o.type === "boolean" || o.default !== void 0 && typeof o.default == "boolean")
@@ -386,7 +386,7 @@ function Be(e) {
386
386
  return s;
387
387
  },
388
388
  renderHTML: (r) => r[t] !== o.default ? {
389
- [Ue(t)]: r[t]
389
+ [$e(t)]: r[t]
390
390
  } : {}
391
391
  };
392
392
  }), n;
@@ -404,7 +404,7 @@ function kt(e, n, t, o) {
404
404
  throw new Error("Block type does not match");
405
405
  return a;
406
406
  }
407
- function Ae(e, n, t, o, r = !1, s) {
407
+ function Ne(e, n, t, o, r = !1, s) {
408
408
  const i = document.createElement("div");
409
409
  if (s !== void 0)
410
410
  for (const [a, c] of Object.entries(s))
@@ -415,7 +415,7 @@ function Ae(e, n, t, o, r = !1, s) {
415
415
  ), i.setAttribute("data-content-type", n);
416
416
  for (const [a, c] of Object.entries(t)) {
417
417
  const d = o[a].default;
418
- !mn.includes(a) && c !== d && i.setAttribute(Ue(a), c);
418
+ !mn.includes(a) && c !== d && i.setAttribute($e(a), c);
419
419
  }
420
420
  return r && i.setAttribute("data-file-block", ""), i.appendChild(e.dom), e.contentDOM !== void 0 && (e.contentDOM.className = te(
421
421
  "bn-inline-content",
@@ -455,12 +455,12 @@ function bn(e) {
455
455
  Object.entries(e).map(([n, t]) => [n, t.config])
456
456
  );
457
457
  }
458
- function ur(e, n) {
458
+ function pr(e, n) {
459
459
  e.stopEvent = (t) => (t.type === "mousedown" && setTimeout(() => {
460
460
  n.view.dom.blur();
461
461
  }, 10), !0);
462
462
  }
463
- function pr(e, n) {
463
+ function hr(e, n) {
464
464
  const t = [
465
465
  {
466
466
  tag: "[data-content-type=" + e.type + "]",
@@ -477,7 +477,7 @@ function pr(e, n) {
477
477
  }
478
478
  }), t;
479
479
  }
480
- function xe(e, n) {
480
+ function Te(e, n) {
481
481
  const t = K({
482
482
  name: e.type,
483
483
  content: e.content === "inline" ? "inline*" : "",
@@ -485,14 +485,14 @@ function xe(e, n) {
485
485
  selectable: e.isSelectable ?? !0,
486
486
  isolating: !0,
487
487
  addAttributes() {
488
- return Be(e.propSchema);
488
+ return xe(e.propSchema);
489
489
  },
490
490
  parseHTML() {
491
- return pr(e, n.parse);
491
+ return hr(e, n.parse);
492
492
  },
493
493
  renderHTML({ HTMLAttributes: o }) {
494
494
  const r = document.createElement("div");
495
- return Ae(
495
+ return Ne(
496
496
  {
497
497
  dom: r,
498
498
  contentDOM: e.content === "inline" ? r : void 0
@@ -512,7 +512,7 @@ function xe(e, n) {
512
512
  r,
513
513
  this.editor,
514
514
  e.type
515
- ), i = ((l = this.options.domAttributes) == null ? void 0 : l.blockContent) || {}, a = n.render(s, r), c = Ae(
515
+ ), i = ((l = this.options.domAttributes) == null ? void 0 : l.blockContent) || {}, a = n.render(s, r), c = Ne(
516
516
  a,
517
517
  s.type,
518
518
  s.props,
@@ -520,7 +520,7 @@ function xe(e, n) {
520
520
  e.isFileBlock,
521
521
  i
522
522
  );
523
- return e.isSelectable === !1 && ur(c, this.editor), c;
523
+ return e.isSelectable === !1 && pr(c, this.editor), c;
524
524
  };
525
525
  }
526
526
  });
@@ -533,7 +533,7 @@ function xe(e, n) {
533
533
  toInternalHTML: (o, r) => {
534
534
  var a;
535
535
  const s = ((a = t.options.domAttributes) == null ? void 0 : a.blockContent) || {}, i = n.render(o, r);
536
- return Ae(
536
+ return Ne(
537
537
  i,
538
538
  o.type,
539
539
  o.props,
@@ -552,7 +552,7 @@ function xe(e, n) {
552
552
  o,
553
553
  r
554
554
  );
555
- return i === void 0 && (i = n.render(o, r)), Ae(
555
+ return i === void 0 && (i = n.render(o, r)), Ne(
556
556
  i,
557
557
  o.type,
558
558
  o.props,
@@ -645,7 +645,7 @@ function wt(e, n) {
645
645
  function ne(e) {
646
646
  return wt(e.node, e.posBeforeNode);
647
647
  }
648
- function Te(e) {
648
+ function Me(e) {
649
649
  if (!e.nodeAfter)
650
650
  throw new Error(
651
651
  `Attempted to get blockContainer node at position ${e.pos} but a node at this position does not exist`
@@ -666,17 +666,17 @@ function A(e) {
666
666
  function kn(e) {
667
667
  return e.cached.blockNoteEditor;
668
668
  }
669
- function Me(e) {
669
+ function Pe(e) {
670
670
  return kn(e).schema;
671
671
  }
672
672
  function yt(e) {
673
- return Me(e).blockSchema;
673
+ return Pe(e).blockSchema;
674
674
  }
675
675
  function Ct(e) {
676
- return Me(e).inlineContentSchema;
676
+ return Pe(e).inlineContentSchema;
677
677
  }
678
678
  function ke(e) {
679
- return Me(e).styleSchema;
679
+ return Pe(e).styleSchema;
680
680
  }
681
681
  function vt(e) {
682
682
  return kn(e).blockCache;
@@ -850,7 +850,7 @@ function at(e, n, t) {
850
850
  content: s
851
851
  };
852
852
  }
853
- function E(e, n, t = yt(n), o = Ct(n), r = ke(n), s = vt(n)) {
853
+ function S(e, n, t = yt(n), o = Ct(n), r = ke(n), s = vt(n)) {
854
854
  var g;
855
855
  if (!e.type.isInGroup("bnBlock"))
856
856
  throw Error("Node should be a bnBlock, but is instead: " + e.type.name);
@@ -874,7 +874,7 @@ function E(e, n, t = yt(n), o = Ct(n), r = ke(n), s = vt(n)) {
874
874
  const u = t[a.blockNoteType], h = [];
875
875
  (g = a.childContainer) == null || g.node.forEach((b) => {
876
876
  h.push(
877
- E(
877
+ S(
878
878
  b,
879
879
  n,
880
880
  t,
@@ -914,10 +914,10 @@ function E(e, n, t = yt(n), o = Ct(n), r = ke(n), s = vt(n)) {
914
914
  };
915
915
  return s == null || s.set(e, m), m;
916
916
  }
917
- function hr(e, n, t = yt(n), o = Ct(n), r = ke(n), s = vt(n)) {
917
+ function fr(e, n, t = yt(n), o = Ct(n), r = ke(n), s = vt(n)) {
918
918
  const i = [];
919
919
  return e.firstChild.descendants((a) => (i.push(
920
- E(
920
+ S(
921
921
  a,
922
922
  n,
923
923
  t,
@@ -927,7 +927,7 @@ function hr(e, n, t = yt(n), o = Ct(n), r = ke(n), s = vt(n)) {
927
927
  )
928
928
  ), !1)), i;
929
929
  }
930
- function fr(e, n, t = yt(n), o = Ct(n), r = ke(n), s = vt(n)) {
930
+ function mr(e, n, t = yt(n), o = Ct(n), r = ke(n), s = vt(n)) {
931
931
  function i(a, c, l) {
932
932
  if (a.type.name !== "blockGroup")
933
933
  throw new Error("unexpected");
@@ -954,7 +954,7 @@ function fr(e, n, t = yt(n), o = Ct(n), r = ke(n), s = vt(n)) {
954
954
  u = N.blockCutAtStart, k && (h = N.blockCutAtEnd), d.push(...N.blocks);
955
955
  return;
956
956
  }
957
- const w = E(
957
+ const w = S(
958
958
  f,
959
959
  n,
960
960
  t,
@@ -962,7 +962,7 @@ function fr(e, n, t = yt(n), o = Ct(n), r = ke(n), s = vt(n)) {
962
962
  r,
963
963
  s
964
964
  ), y = f.childCount > 1 ? f.child(1) : void 0;
965
- let x = [];
965
+ let v = [];
966
966
  if (y) {
967
967
  const N = i(
968
968
  y,
@@ -970,11 +970,11 @@ function fr(e, n, t = yt(n), o = Ct(n), r = ke(n), s = vt(n)) {
970
970
  // TODO: can this be anything other than 0?
971
971
  k ? Math.max(0, l - 1) : 0
972
972
  );
973
- x = N.blocks, k && (h = N.blockCutAtEnd);
973
+ v = N.blocks, k && (h = N.blockCutAtEnd);
974
974
  }
975
975
  k && !y && l > 1 && (h = w.id), b && c > 1 && (u = w.id), d.push({
976
976
  ...w,
977
- children: x
977
+ children: v
978
978
  });
979
979
  }), { blocks: d, blockCutAtStart: u, blockCutAtEnd: h };
980
980
  }
@@ -998,9 +998,9 @@ function Vt(e, n, t, o) {
998
998
  return e.dom.setAttribute("data-inline-content-type", n), Object.entries(t).filter(([r, s]) => {
999
999
  const i = o[r];
1000
1000
  return s !== i.default;
1001
- }).map(([r, s]) => [Ue(r), s]).forEach(([r, s]) => e.dom.setAttribute(r, s)), e.contentDOM !== void 0 && e.contentDOM.setAttribute("data-editable", ""), e;
1001
+ }).map(([r, s]) => [$e(r), s]).forEach(([r, s]) => e.dom.setAttribute(r, s)), e.contentDOM !== void 0 && e.contentDOM.setAttribute("data-editable", ""), e;
1002
1002
  }
1003
- function mr(e) {
1003
+ function gr(e) {
1004
1004
  return {
1005
1005
  Backspace: ({ editor: n }) => {
1006
1006
  const t = n.state.selection.$from;
@@ -1008,14 +1008,14 @@ function mr(e) {
1008
1008
  }
1009
1009
  };
1010
1010
  }
1011
- function gr(e, n) {
1011
+ function br(e, n) {
1012
1012
  return {
1013
1013
  config: e,
1014
1014
  implementation: n
1015
1015
  };
1016
1016
  }
1017
- function br(e, n) {
1018
- return gr(
1017
+ function kr(e, n) {
1018
+ return br(
1019
1019
  {
1020
1020
  type: e.name,
1021
1021
  propSchema: n,
@@ -1031,7 +1031,7 @@ function yn(e) {
1031
1031
  Object.entries(e).map(([n, t]) => [n, t.config])
1032
1032
  );
1033
1033
  }
1034
- function kr(e) {
1034
+ function wr(e) {
1035
1035
  return [
1036
1036
  {
1037
1037
  tag: `[data-inline-content-type="${e.type}"]`,
@@ -1051,13 +1051,13 @@ function $c(e, n) {
1051
1051
  atom: e.content === "none",
1052
1052
  content: e.content === "styled" ? "inline*" : "",
1053
1053
  addAttributes() {
1054
- return Be(e.propSchema);
1054
+ return xe(e.propSchema);
1055
1055
  },
1056
1056
  addKeyboardShortcuts() {
1057
- return mr(e);
1057
+ return gr(e);
1058
1058
  },
1059
1059
  parseHTML() {
1060
- return kr(e);
1060
+ return wr(e);
1061
1061
  },
1062
1062
  renderHTML({ node: o }) {
1063
1063
  const r = this.options.editor, s = n.render(
@@ -1106,12 +1106,12 @@ function $c(e, n) {
1106
1106
  };
1107
1107
  }
1108
1108
  });
1109
- return br(
1109
+ return kr(
1110
1110
  t,
1111
1111
  e.propSchema
1112
1112
  );
1113
1113
  }
1114
- function wr(e) {
1114
+ function yr(e) {
1115
1115
  return e === "boolean" ? {} : {
1116
1116
  stringValue: {
1117
1117
  default: void 0,
@@ -1123,7 +1123,7 @@ function wr(e) {
1123
1123
  }
1124
1124
  };
1125
1125
  }
1126
- function yr(e, n, t, o) {
1126
+ function Cr(e, n, t, o) {
1127
1127
  return e.dom.setAttribute("data-style-type", n), o === "string" && e.dom.setAttribute("data-value", t), e.contentDOM !== void 0 && e.contentDOM.setAttribute("data-editable", ""), e;
1128
1128
  }
1129
1129
  function Cn(e, n) {
@@ -1148,7 +1148,7 @@ function vn(e) {
1148
1148
  Object.entries(e).map(([n, t]) => [n, t.config])
1149
1149
  );
1150
1150
  }
1151
- function Cr(e) {
1151
+ function vr(e) {
1152
1152
  return [
1153
1153
  {
1154
1154
  tag: `[data-style-type="${e.type}"]`,
@@ -1163,10 +1163,10 @@ function Fc(e, n) {
1163
1163
  const t = re.create({
1164
1164
  name: e.type,
1165
1165
  addAttributes() {
1166
- return wr(e.propSchema);
1166
+ return yr(e.propSchema);
1167
1167
  },
1168
1168
  parseHTML() {
1169
- return Cr(e);
1169
+ return vr(e);
1170
1170
  },
1171
1171
  renderHTML({ mark: o }) {
1172
1172
  let r;
@@ -1176,7 +1176,7 @@ function Fc(e, n) {
1176
1176
  r = n.render(o.attrs.stringValue);
1177
1177
  else
1178
1178
  throw new q(e.propSchema);
1179
- return yr(
1179
+ return Cr(
1180
1180
  r,
1181
1181
  e.type,
1182
1182
  o.attrs.stringValue,
@@ -1297,7 +1297,7 @@ function lt(e, n) {
1297
1297
  );
1298
1298
  return r.filter((i, a) => r.findIndex((c) => c.row === i.row && c.col === i.col) === a);
1299
1299
  }
1300
- function vr(e, n, t, o = se(e)) {
1300
+ function Er(e, n, t, o = se(e)) {
1301
1301
  const { col: r } = pe(
1302
1302
  {
1303
1303
  row: 0,
@@ -1318,7 +1318,7 @@ function vr(e, n, t, o = se(e)) {
1318
1318
  i.splice(s, 0, a);
1319
1319
  }), Ee(o);
1320
1320
  }
1321
- function Er(e, n, t, o = se(e)) {
1321
+ function Sr(e, n, t, o = se(e)) {
1322
1322
  const { row: r } = pe(
1323
1323
  {
1324
1324
  row: n,
@@ -1341,7 +1341,7 @@ function dt(e) {
1341
1341
  (n) => typeof n == "string" ? n.length === 0 : ue(n) ? n.text.length === 0 : fn(n) ? typeof n.content == "string" ? n.content.length === 0 : n.content.every((t) => t.text.length === 0) : !1
1342
1342
  ) : !1 : !0;
1343
1343
  }
1344
- function Sr(e, n, t = se(e)) {
1344
+ function Br(e, n, t = se(e)) {
1345
1345
  if (n === "columns") {
1346
1346
  let s = 0;
1347
1347
  for (let i = t[0].length - 1; i >= 0 && t.every(
@@ -1365,7 +1365,7 @@ function Sr(e, n, t = se(e)) {
1365
1365
  const r = Math.min(o, t.length - 1);
1366
1366
  return t.splice(t.length - r, r), Ee(t);
1367
1367
  }
1368
- function Br(e, n, t, o = se(e)) {
1368
+ function xr(e, n, t, o = se(e)) {
1369
1369
  const { width: r, height: s } = Et(e);
1370
1370
  if (n === "columns")
1371
1371
  o.forEach((i, a) => {
@@ -1415,7 +1415,7 @@ function Bn(e, n, t) {
1415
1415
  s = Math.max(s, c.col + l - 1), i = Math.min(i, c.col);
1416
1416
  }), n < t ? t === s : t === i;
1417
1417
  }
1418
- function xr(e, n, t) {
1418
+ function Tr(e, n, t) {
1419
1419
  const o = pe(e, t), r = pe(n, t);
1420
1420
  return o.col === r.col;
1421
1421
  }
@@ -1435,7 +1435,7 @@ function _t(e, n, t, o) {
1435
1435
  return !o || !n.nodes[o].spec.code ? e.text.split(/(\n)/g).filter((i) => i.length > 0).map((i) => i === `
1436
1436
  ` ? n.nodes.hardBreak.createChecked() : n.text(i, r)) : e.text.length > 0 ? [n.text(e.text, r)] : [];
1437
1437
  }
1438
- function Tr(e, n, t) {
1438
+ function Mr(e, n, t) {
1439
1439
  const o = n.marks.link.create({
1440
1440
  href: e.href
1441
1441
  });
@@ -1471,7 +1471,7 @@ function W(e, n, t, o = ke(n)) {
1471
1471
  for (const s of e)
1472
1472
  typeof s == "string" ? r.push(
1473
1473
  ...ut(s, n, o, t)
1474
- ) : fn(s) ? r.push(...Tr(s, n, o)) : ue(s) ? r.push(
1474
+ ) : fn(s) ? r.push(...Mr(s, n, o)) : ue(s) ? r.push(
1475
1475
  ...ut([s], n, o, t)
1476
1476
  ) : r.push(
1477
1477
  xn(s, n, o)
@@ -1502,8 +1502,8 @@ function Ke(e, n, t = ke(n)) {
1502
1502
  "tableParagraph",
1503
1503
  t
1504
1504
  ));
1505
- const x = ve(f);
1506
- x > 1 && (w = new Array(x).fill(!1).map((N, z) => i[k.col + z] ?? void 0));
1505
+ const v = ve(f);
1506
+ v > 1 && (w = new Array(v).fill(!1).map((N, z) => i[k.col + z] ?? void 0));
1507
1507
  } else
1508
1508
  b = W(
1509
1509
  f,
@@ -1589,7 +1589,7 @@ function he(e, n, t = ke(n)) {
1589
1589
  );
1590
1590
  }
1591
1591
  }
1592
- function Mr(e, n) {
1592
+ function Pr(e, n) {
1593
1593
  if (n === 0)
1594
1594
  return;
1595
1595
  const t = e.resolve(n);
@@ -1610,10 +1610,10 @@ function F(e, n) {
1610
1610
  function St(e) {
1611
1611
  return e.type.isInGroup("bnBlock");
1612
1612
  }
1613
- function Pr(e, n) {
1613
+ function Ir(e, n) {
1614
1614
  return e.id !== n.id || e.type !== n.type || JSON.stringify(e.props) !== JSON.stringify(n.props) || JSON.stringify(e.content) !== JSON.stringify(n.content);
1615
1615
  }
1616
- function Ir(e) {
1616
+ function Lr(e) {
1617
1617
  return e.getMeta("paste") ? { type: "paste" } : e.getMeta("uiEvent") === "drop" ? { type: "drop" } : e.getMeta("history$") ? {
1618
1618
  type: e.getMeta("history$").redo ? "redo" : "undo"
1619
1619
  } : e.getMeta("y-sync$") ? e.getMeta("y-sync$").isUndoRedoOperation ? { type: "undo-redo" } : { type: "yjs-remote" } : { type: "local" };
@@ -1622,9 +1622,9 @@ function Ut(e) {
1622
1622
  const n = {}, t = A(e);
1623
1623
  return e.descendants((o, r) => {
1624
1624
  if (St(o)) {
1625
- const s = Mr(e, r);
1625
+ const s = Pr(e, r);
1626
1626
  n[o.attrs.id] = {
1627
- block: E(o, t),
1627
+ block: S(o, t),
1628
1628
  parentId: s
1629
1629
  };
1630
1630
  }
@@ -1632,7 +1632,7 @@ function Ut(e) {
1632
1632
  }), n;
1633
1633
  }
1634
1634
  function Tn(e, n = []) {
1635
- const t = Ir(e), o = un(e.before, [
1635
+ const t = Lr(e), o = un(e.before, [
1636
1636
  e,
1637
1637
  ...n
1638
1638
  ]), r = Ut(
@@ -1664,7 +1664,7 @@ function Tn(e, n = []) {
1664
1664
  source: t,
1665
1665
  prevParent: c.parentId ? (u = r[c.parentId]) == null ? void 0 : u.block : void 0,
1666
1666
  currentParent: l.parentId ? (h = s[l.parentId]) == null ? void 0 : h.block : void 0
1667
- }) : Pr(c.block, l.block) && i.push({
1667
+ }) : Ir(c.block, l.block) && i.push({
1668
1668
  type: "update",
1669
1669
  block: l.block,
1670
1670
  prevBlock: c.block,
@@ -1672,7 +1672,7 @@ function Tn(e, n = []) {
1672
1672
  });
1673
1673
  }), i;
1674
1674
  }
1675
- function Lr(e, n, t, o = "before") {
1675
+ function Ar(e, n, t, o = "before") {
1676
1676
  const r = typeof t == "string" ? t : t.id, s = A(e), i = n.map(
1677
1677
  (d) => he(d, s)
1678
1678
  ), a = F(r, e.doc);
@@ -1682,7 +1682,7 @@ function Lr(e, n, t, o = "before") {
1682
1682
  return o === "after" && (c += a.node.nodeSize), e.step(
1683
1683
  new dn(c, c, new J(R.from(i), 0, 0))
1684
1684
  ), i.map(
1685
- (d) => E(d, s)
1685
+ (d) => S(d, s)
1686
1686
  );
1687
1687
  }
1688
1688
  function $t(e, n, t) {
@@ -1699,7 +1699,7 @@ function $t(e, n, t) {
1699
1699
  return !1;
1700
1700
  if (!d.type.isInGroup("bnBlock") || !s.has(d.attrs.id))
1701
1701
  return !0;
1702
- if (i.push(E(d, o)), s.delete(d.attrs.id), t.length > 0 && d.attrs.id === a) {
1702
+ if (i.push(S(d, o)), s.delete(d.attrs.id), t.length > 0 && d.attrs.id === a) {
1703
1703
  const g = e.doc.nodeSize;
1704
1704
  e.insert(u, r);
1705
1705
  const b = e.doc.nodeSize;
@@ -1717,7 +1717,7 @@ function $t(e, n, t) {
1717
1717
  );
1718
1718
  }
1719
1719
  return { insertedBlocks: r.map(
1720
- (d) => E(d, o)
1720
+ (d) => S(d, o)
1721
1721
  ), removedBlocks: i };
1722
1722
  }
1723
1723
  const D = (e, n) => ({
@@ -1725,13 +1725,13 @@ const D = (e, n) => ({
1725
1725
  dispatch: o
1726
1726
  }) => (o && Mn(t, e, n), !0);
1727
1727
  function Mn(e, n, t, o, r) {
1728
- const s = Te(e.doc.resolve(n)), i = A(e);
1728
+ const s = Me(e.doc.resolve(n)), i = A(e);
1729
1729
  if (o !== void 0 && r !== void 0 && o > r)
1730
1730
  throw new Error("Invalid replaceFromPos or replaceToPos");
1731
1731
  const a = i.nodes[s.blockNoteType], c = i.nodes[t.type || s.blockNoteType], l = c.isInGroup("bnBlock") ? c : i.nodes.blockContainer;
1732
1732
  if (s.isBlockContainer && c.isInGroup("blockContent")) {
1733
1733
  const d = o !== void 0 && o > s.blockContent.beforePos && o < s.blockContent.afterPos ? o - s.blockContent.beforePos - 1 : void 0, u = r !== void 0 && r > s.blockContent.beforePos && r < s.blockContent.afterPos ? r - s.blockContent.beforePos - 1 : void 0;
1734
- Ft(t, e, s), Ar(
1734
+ Ft(t, e, s), Nr(
1735
1735
  t,
1736
1736
  e,
1737
1737
  a,
@@ -1743,7 +1743,7 @@ function Mn(e, n, t, o, r) {
1743
1743
  } else if (!s.isBlockContainer && c.isInGroup("bnBlock"))
1744
1744
  Ft(t, e, s);
1745
1745
  else {
1746
- const d = E(s.bnBlock.node, i);
1746
+ const d = S(s.bnBlock.node, i);
1747
1747
  e.replaceWith(
1748
1748
  s.bnBlock.beforePos,
1749
1749
  s.bnBlock.afterPos,
@@ -1763,7 +1763,7 @@ function Mn(e, n, t, o, r) {
1763
1763
  ...t.props
1764
1764
  });
1765
1765
  }
1766
- function Ar(e, n, t, o, r, s, i) {
1766
+ function Nr(e, n, t, o, r, s, i) {
1767
1767
  const a = A(n);
1768
1768
  let c = "keep";
1769
1769
  if (e.content)
@@ -1836,7 +1836,7 @@ function Ft(e, n, t) {
1836
1836
  }
1837
1837
  }
1838
1838
  }
1839
- function Nr(e, n, t, o, r) {
1839
+ function Hr(e, n, t, o, r) {
1840
1840
  const s = typeof n == "string" ? n : n.id, i = F(s, e.doc);
1841
1841
  if (!i)
1842
1842
  throw new Error(`Block with ID ${s} not found`);
@@ -1848,7 +1848,7 @@ function Nr(e, n, t, o, r) {
1848
1848
  r
1849
1849
  );
1850
1850
  const a = e.doc.resolve(i.posBeforeNode + 1).node(), c = A(e);
1851
- return E(a, c);
1851
+ return S(a, c);
1852
1852
  }
1853
1853
  function Pn(e) {
1854
1854
  const n = Array.from(e.classList).filter(
@@ -1871,16 +1871,16 @@ function In(e, n, t, o) {
1871
1871
  const s = t.serializeFragment(R.from(r), o);
1872
1872
  return s.nodeType === 1 && Pn(s), s;
1873
1873
  }
1874
- function Hr(e, n, t, o, r, s, i) {
1875
- var g, b, k, w, y, x, N, z;
1874
+ function Dr(e, n, t, o, r, s, i) {
1875
+ var g, b, k, w, y, v, N, z;
1876
1876
  const a = (i == null ? void 0 : i.document) ?? document, c = n.pmSchema.nodes.blockContainer;
1877
1877
  let l = t.props;
1878
1878
  if (!t.props) {
1879
1879
  l = {};
1880
- for (const [S, v] of Object.entries(
1880
+ for (const [B, E] of Object.entries(
1881
1881
  n.schema.blockSchema[t.type].propSchema
1882
1882
  ))
1883
- v.default !== void 0 && (l[S] = v.default);
1883
+ E.default !== void 0 && (l[B] = E.default);
1884
1884
  }
1885
1885
  const d = (b = (g = c.spec) == null ? void 0 : g.toDOM) == null ? void 0 : b.call(
1886
1886
  g,
@@ -1890,41 +1890,41 @@ function Hr(e, n, t, o, r, s, i) {
1890
1890
  })
1891
1891
  ), u = Array.from(d.dom.attributes), h = n.blockImplementations[t.type].implementation.toExternalHTML({ ...t, props: l }, n), f = a.createDocumentFragment();
1892
1892
  if (h.dom.classList.contains("bn-block-content")) {
1893
- const S = [
1893
+ const B = [
1894
1894
  ...u,
1895
1895
  ...Array.from(h.dom.attributes)
1896
1896
  ].filter(
1897
- (v) => v.name.startsWith("data") && v.name !== "data-content-type" && v.name !== "data-file-block" && v.name !== "data-node-view-wrapper" && v.name !== "data-node-type" && v.name !== "data-id" && v.name !== "data-index" && v.name !== "data-editable"
1897
+ (E) => E.name.startsWith("data") && E.name !== "data-content-type" && E.name !== "data-file-block" && E.name !== "data-node-view-wrapper" && E.name !== "data-node-type" && E.name !== "data-id" && E.name !== "data-index" && E.name !== "data-editable"
1898
1898
  );
1899
- for (const v of S)
1900
- h.dom.firstChild.setAttribute(v.name, v.value);
1899
+ for (const E of B)
1900
+ h.dom.firstChild.setAttribute(E.name, E.value);
1901
1901
  Pn(h.dom.firstChild), f.append(...Array.from(h.dom.childNodes));
1902
1902
  } else
1903
1903
  f.append(h.dom);
1904
1904
  if (h.contentDOM && t.content) {
1905
- const S = In(
1905
+ const B = In(
1906
1906
  n,
1907
1907
  t.content,
1908
1908
  // TODO
1909
1909
  o,
1910
1910
  i
1911
1911
  );
1912
- h.contentDOM.appendChild(S);
1912
+ h.contentDOM.appendChild(B);
1913
1913
  }
1914
1914
  let m;
1915
1915
  if (r.has(t.type) ? m = "OL" : s.has(t.type) && (m = "UL"), m) {
1916
1916
  if (((k = e.lastChild) == null ? void 0 : k.nodeName) !== m) {
1917
- const v = a.createElement(m);
1918
- m === "OL" && (l != null && l.start) && (l == null ? void 0 : l.start) !== 1 && v.setAttribute("start", l.start + ""), e.append(v);
1917
+ const E = a.createElement(m);
1918
+ m === "OL" && (l != null && l.start) && (l == null ? void 0 : l.start) !== 1 && E.setAttribute("start", l.start + ""), e.append(E);
1919
1919
  }
1920
- const S = a.createElement("li");
1921
- S.append(f), e.lastChild.appendChild(S);
1920
+ const B = a.createElement("li");
1921
+ B.append(f), e.lastChild.appendChild(B);
1922
1922
  } else
1923
1923
  e.append(f);
1924
1924
  if (t.children && t.children.length > 0) {
1925
- const S = a.createDocumentFragment();
1925
+ const B = a.createDocumentFragment();
1926
1926
  if (Ln(
1927
- S,
1927
+ B,
1928
1928
  n,
1929
1929
  t.children,
1930
1930
  o,
@@ -1932,14 +1932,14 @@ function Hr(e, n, t, o, r, s, i) {
1932
1932
  s,
1933
1933
  i
1934
1934
  ), ((w = e.lastChild) == null ? void 0 : w.nodeName) === "UL" || ((y = e.lastChild) == null ? void 0 : y.nodeName) === "OL")
1935
- for (; ((x = S.firstChild) == null ? void 0 : x.nodeName) === "UL" || ((N = S.firstChild) == null ? void 0 : N.nodeName) === "OL"; )
1936
- e.lastChild.lastChild.appendChild(S.firstChild);
1937
- n.pmSchema.nodes[t.type].isInGroup("blockContent") ? e.append(S) : (z = h.contentDOM) == null || z.append(S);
1935
+ for (; ((v = B.firstChild) == null ? void 0 : v.nodeName) === "UL" || ((N = B.firstChild) == null ? void 0 : N.nodeName) === "OL"; )
1936
+ e.lastChild.lastChild.appendChild(B.firstChild);
1937
+ n.pmSchema.nodes[t.type].isInGroup("blockContent") ? e.append(B) : (z = h.contentDOM) == null || z.append(B);
1938
1938
  }
1939
1939
  }
1940
1940
  const Ln = (e, n, t, o, r, s, i) => {
1941
1941
  for (const a of t)
1942
- Hr(
1942
+ Dr(
1943
1943
  e,
1944
1944
  n,
1945
1945
  a,
@@ -1948,7 +1948,7 @@ const Ln = (e, n, t, o, r, s, i) => {
1948
1948
  s,
1949
1949
  i
1950
1950
  );
1951
- }, Dr = (e, n, t, o, r, s) => {
1951
+ }, Or = (e, n, t, o, r, s) => {
1952
1952
  const a = ((s == null ? void 0 : s.document) ?? document).createDocumentFragment();
1953
1953
  return Ln(
1954
1954
  a,
@@ -1963,7 +1963,7 @@ const Ln = (e, n, t, o, r, s, i) => {
1963
1963
  const t = ln.fromSchema(e);
1964
1964
  return {
1965
1965
  exportBlocks: (o, r) => {
1966
- const s = Dr(
1966
+ const s = Or(
1967
1967
  n,
1968
1968
  o,
1969
1969
  t,
@@ -1984,7 +1984,7 @@ const Ln = (e, n, t, o, r, s, i) => {
1984
1984
  }
1985
1985
  };
1986
1986
  };
1987
- function Or(e, n, t, o, r) {
1987
+ function Rr(e, n, t, o, r) {
1988
1988
  let s;
1989
1989
  if (n)
1990
1990
  if (typeof n == "string")
@@ -1998,7 +1998,7 @@ function Or(e, n, t, o, r) {
1998
1998
  else throw new Error("blockContent is required");
1999
1999
  return t.serializeFragment(R.from(s), r);
2000
2000
  }
2001
- function Rr(e, n, t, o, r) {
2001
+ function Vr(e, n, t, o, r) {
2002
2002
  var u, h, f, m, g;
2003
2003
  const s = e.pmSchema.nodes.blockContainer;
2004
2004
  let i = n.props;
@@ -2011,7 +2011,7 @@ function Rr(e, n, t, o, r) {
2011
2011
  }
2012
2012
  const c = e.blockImplementations[n.type].implementation.toInternalHTML({ ...n, props: i }, e);
2013
2013
  if (n.type === "numberedListItem" && c.dom.setAttribute("data-index", o.toString()), c.contentDOM && n.content) {
2014
- const b = Or(
2014
+ const b = Rr(
2015
2015
  e,
2016
2016
  n.content,
2017
2017
  // TODO
@@ -2049,7 +2049,7 @@ function An(e, n, t, o) {
2049
2049
  let i = 0;
2050
2050
  for (const a of n) {
2051
2051
  a.type === "numberedListItem" ? i++ : i = 0;
2052
- const c = Rr(
2052
+ const c = Vr(
2053
2053
  e,
2054
2054
  a,
2055
2055
  t,
@@ -2064,7 +2064,7 @@ const Nn = (e, n, t, o) => {
2064
2064
  var a;
2065
2065
  const r = e.pmSchema.nodes.blockGroup, s = r.spec.toDOM(r.create({})), i = An(e, n, t, o);
2066
2066
  return (a = s.contentDOM) == null || a.appendChild(i), s.dom;
2067
- }, Vr = (e, n) => {
2067
+ }, _r = (e, n) => {
2068
2068
  const t = ln.fromSchema(e);
2069
2069
  return {
2070
2070
  serializeBlocks: (o, r) => Nn(n, o, t, r).outerHTML
@@ -2077,7 +2077,7 @@ const Nn = (e, n, t, o) => {
2077
2077
  return;
2078
2078
  const o = e.querySelector("figcaption"), r = (o == null ? void 0 : o.textContent) ?? void 0;
2079
2079
  return { targetElement: t, caption: r };
2080
- }, _r = (e, n, t, o) => {
2080
+ }, Ur = (e, n, t, o) => {
2081
2081
  const r = document.createElement("div");
2082
2082
  r.className = "bn-add-file-button";
2083
2083
  const s = document.createElement("div");
@@ -2111,11 +2111,11 @@ const Nn = (e, n, t, o) => {
2111
2111
  );
2112
2112
  }
2113
2113
  };
2114
- }, Ur = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M3 8L9.00319 2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8ZM10 4V9H5V20H19V4H10Z"></path></svg>', $r = (e) => {
2114
+ }, $r = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M3 8L9.00319 2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8ZM10 4V9H5V20H19V4H10Z"></path></svg>', Fr = (e) => {
2115
2115
  const n = document.createElement("div");
2116
2116
  n.className = "bn-file-name-with-icon";
2117
2117
  const t = document.createElement("div");
2118
- t.className = "bn-file-icon", t.innerHTML = Ur, n.appendChild(t);
2118
+ t.className = "bn-file-icon", t.innerHTML = $r, n.appendChild(t);
2119
2119
  const o = document.createElement("p");
2120
2120
  return o.className = "bn-file-name", o.textContent = e.props.name, n.appendChild(o), {
2121
2121
  dom: n
@@ -2123,7 +2123,7 @@ const Nn = (e, n, t, o) => {
2123
2123
  }, Bt = (e, n, t, o, r) => {
2124
2124
  const s = document.createElement("div");
2125
2125
  if (s.className = "bn-file-block-content-wrapper", e.props.url === "") {
2126
- const a = _r(
2126
+ const a = Ur(
2127
2127
  e,
2128
2128
  n,
2129
2129
  o,
@@ -2146,7 +2146,7 @@ const Nn = (e, n, t, o) => {
2146
2146
  }
2147
2147
  const i = { dom: s };
2148
2148
  if (e.props.showPreview === !1 || !t) {
2149
- const a = $r(e);
2149
+ const a = Fr(e);
2150
2150
  s.appendChild(a.dom), i.destroy = () => {
2151
2151
  var c;
2152
2152
  (c = a.destroy) == null || c.call(a);
@@ -2166,7 +2166,7 @@ const Nn = (e, n, t, o) => {
2166
2166
  return o.textContent = n, t.appendChild(e), t.appendChild(o), {
2167
2167
  dom: t
2168
2168
  };
2169
- }, zt = (e) => ({ url: e.src || void 0 }), Fr = '<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>', zr = {
2169
+ }, zt = (e) => ({ url: e.src || void 0 }), zr = '<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>', Wr = {
2170
2170
  backgroundColor: M.backgroundColor,
2171
2171
  // File name.
2172
2172
  name: {
@@ -2183,15 +2183,15 @@ const Nn = (e, n, t, o) => {
2183
2183
  showPreview: {
2184
2184
  default: !0
2185
2185
  }
2186
- }, Wr = {
2186
+ }, jr = {
2187
2187
  type: "audio",
2188
- propSchema: zr,
2188
+ propSchema: Wr,
2189
2189
  content: "none",
2190
2190
  isFileBlock: !0,
2191
2191
  fileBlockAccept: ["audio/*"]
2192
- }, jr = (e, n) => {
2192
+ }, Gr = (e, n) => {
2193
2193
  const t = document.createElement("div");
2194
- t.innerHTML = Fr;
2194
+ t.innerHTML = zr;
2195
2195
  const o = document.createElement("audio");
2196
2196
  return o.className = "bn-audio", n.resolveFileUrl ? n.resolveFileUrl(e.props.url).then((r) => {
2197
2197
  o.src = r;
@@ -2202,7 +2202,7 @@ const Nn = (e, n, t, o) => {
2202
2202
  n.dictionary.file_blocks.audio.add_button_text,
2203
2203
  t.firstElementChild
2204
2204
  );
2205
- }, Gr = (e) => {
2205
+ }, qr = (e) => {
2206
2206
  if (e.tagName === "AUDIO")
2207
2207
  return e.closest("figure") ? void 0 : zt(e);
2208
2208
  if (e.tagName === "FIGURE") {
@@ -2215,7 +2215,7 @@ const Nn = (e, n, t, o) => {
2215
2215
  caption: o
2216
2216
  };
2217
2217
  }
2218
- }, qr = (e) => {
2218
+ }, Kr = (e) => {
2219
2219
  if (!e.props.url) {
2220
2220
  const t = document.createElement("p");
2221
2221
  return t.textContent = "Add audio", {
@@ -2226,17 +2226,17 @@ const Nn = (e, n, t, o) => {
2226
2226
  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 ? xt(n, e.props.caption) : Xe(n, e.props.caption) : {
2227
2227
  dom: n
2228
2228
  };
2229
- }, Kr = xe(Wr, {
2230
- render: jr,
2231
- parse: Gr,
2232
- toExternalHTML: qr
2229
+ }, Yr = Te(jr, {
2230
+ render: Gr,
2231
+ parse: qr,
2232
+ toExternalHTML: Kr
2233
2233
  }), Wt = Symbol.for("blocknote.shikiParser"), Qe = Symbol.for(
2234
2234
  "blocknote.shikiHighlighterPromise"
2235
- ), Yr = {
2235
+ ), Jr = {
2236
2236
  language: {
2237
2237
  default: "text"
2238
2238
  }
2239
- }, Jr = K({
2239
+ }, Xr = K({
2240
2240
  name: "codeBlock",
2241
2241
  content: "inline*",
2242
2242
  group: "blockContent",
@@ -2413,9 +2413,9 @@ const Nn = (e, n, t, o) => {
2413
2413
  }
2414
2414
  };
2415
2415
  }
2416
- }), Xr = Q(
2417
- Jr,
2418
- Yr
2416
+ }), Zr = Q(
2417
+ Xr,
2418
+ Jr
2419
2419
  );
2420
2420
  function et(e, n) {
2421
2421
  var t;
@@ -2423,7 +2423,7 @@ function et(e, n) {
2423
2423
  ([o, { aliases: r }]) => (r == null ? void 0 : r.includes(n)) || o === n
2424
2424
  )) == null ? void 0 : t[0];
2425
2425
  }
2426
- const Zr = re.create({
2426
+ const Qr = re.create({
2427
2427
  name: "backgroundColor",
2428
2428
  addAttributes() {
2429
2429
  return {
@@ -2449,10 +2449,10 @@ const Zr = re.create({
2449
2449
  renderHTML({ HTMLAttributes: e }) {
2450
2450
  return ["span", e, 0];
2451
2451
  }
2452
- }), Qr = ae(
2453
- Zr,
2452
+ }), es = ae(
2453
+ Qr,
2454
2454
  "string"
2455
- ), es = re.create({
2455
+ ), ts = re.create({
2456
2456
  name: "textColor",
2457
2457
  addAttributes() {
2458
2458
  return {
@@ -2476,7 +2476,7 @@ const Zr = re.create({
2476
2476
  renderHTML({ HTMLAttributes: e }) {
2477
2477
  return ["span", e, 0];
2478
2478
  }
2479
- }), ts = ae(es, "string"), jt = (e) => ({ url: e.src || void 0 }), ns = {
2479
+ }), ns = ae(ts, "string"), jt = (e) => ({ url: e.src || void 0 }), os = {
2480
2480
  backgroundColor: M.backgroundColor,
2481
2481
  // File name.
2482
2482
  name: {
@@ -2490,12 +2490,12 @@ const Zr = re.create({
2490
2490
  caption: {
2491
2491
  default: ""
2492
2492
  }
2493
- }, os = {
2493
+ }, rs = {
2494
2494
  type: "file",
2495
- propSchema: ns,
2495
+ propSchema: os,
2496
2496
  content: "none",
2497
2497
  isFileBlock: !0
2498
- }, rs = (e, n) => Bt(e, n), ss = (e) => {
2498
+ }, ss = (e, n) => Bt(e, n), is = (e) => {
2499
2499
  if (e.tagName === "EMBED")
2500
2500
  return e.closest("figure") ? void 0 : jt(e);
2501
2501
  if (e.tagName === "FIGURE") {
@@ -2508,7 +2508,7 @@ const Zr = re.create({
2508
2508
  caption: o
2509
2509
  };
2510
2510
  }
2511
- }, is = (e) => {
2511
+ }, as = (e) => {
2512
2512
  if (!e.props.url) {
2513
2513
  const t = document.createElement("p");
2514
2514
  return t.textContent = "Add file", {
@@ -2519,17 +2519,17 @@ const Zr = re.create({
2519
2519
  return n.href = e.props.url, n.textContent = e.props.name || e.props.url, e.props.caption ? Xe(n, e.props.caption) : {
2520
2520
  dom: n
2521
2521
  };
2522
- }, as = xe(os, {
2523
- render: rs,
2524
- parse: ss,
2525
- toExternalHTML: is
2526
- }), cs = {
2522
+ }, cs = Te(rs, {
2523
+ render: ss,
2524
+ parse: is,
2525
+ toExternalHTML: as
2526
+ }), ls = {
2527
2527
  set: (e, n) => window.localStorage.setItem(
2528
2528
  `toggle-${e.id}`,
2529
2529
  n ? "true" : "false"
2530
2530
  ),
2531
2531
  get: (e) => window.localStorage.getItem(`toggle-${e.id}`) === "true"
2532
- }, Hn = (e, n, t, o = cs) => {
2532
+ }, Hn = (e, n, t, o = ls) => {
2533
2533
  if ("isToggleable" in e.props && !e.props.isToggleable)
2534
2534
  return {
2535
2535
  dom: t
@@ -2586,16 +2586,16 @@ const Zr = re.create({
2586
2586
  ), f == null || f();
2587
2587
  }
2588
2588
  };
2589
- }, ls = [1, 2, 3, 4, 5, 6], Dn = {
2589
+ }, ds = [1, 2, 3, 4, 5, 6], Dn = {
2590
2590
  ...M,
2591
- level: { default: 1, values: ls },
2591
+ level: { default: 1, values: ds },
2592
2592
  isToggleable: { default: !1 }
2593
- }, ds = K({
2593
+ }, us = K({
2594
2594
  name: "heading",
2595
2595
  content: "inline*",
2596
2596
  group: "blockContent",
2597
2597
  addAttributes() {
2598
- return Be(Dn);
2598
+ return xe(Dn);
2599
2599
  },
2600
2600
  addInputRules() {
2601
2601
  return [
@@ -2687,8 +2687,8 @@ const Zr = re.create({
2687
2687
  };
2688
2688
  };
2689
2689
  }
2690
- }), us = Q(
2691
- ds,
2690
+ }), ps = Q(
2691
+ us,
2692
2692
  Dn
2693
2693
  ), On = (e, n, t, o, r, s) => {
2694
2694
  const { dom: i, destroy: a } = Bt(
@@ -2705,15 +2705,15 @@ const Zr = re.create({
2705
2705
  d.className = "bn-resize-handle", d.style.right = "4px";
2706
2706
  let u, h = e.props.previewWidth;
2707
2707
  const f = (y) => {
2708
- var z, S;
2708
+ var z, B;
2709
2709
  if (!u) {
2710
2710
  !n.isEditable && o.contains(l) && o.contains(d) && (o.removeChild(l), o.removeChild(d));
2711
2711
  return;
2712
2712
  }
2713
- let x;
2714
- e.props.textAlignment === "center" ? u.handleUsed === "left" ? x = u.initialWidth + (u.initialClientX - y.clientX) * 2 : x = u.initialWidth + (y.clientX - u.initialClientX) * 2 : u.handleUsed === "left" ? x = u.initialWidth + u.initialClientX - y.clientX : x = u.initialWidth + y.clientX - u.initialClientX, h = Math.min(
2715
- Math.max(x, 64),
2716
- ((S = (z = n.domElement) == null ? void 0 : z.firstElementChild) == null ? void 0 : S.clientWidth) || Number.MAX_VALUE
2713
+ let v;
2714
+ e.props.textAlignment === "center" ? u.handleUsed === "left" ? v = u.initialWidth + (u.initialClientX - y.clientX) * 2 : v = u.initialWidth + (y.clientX - u.initialClientX) * 2 : u.handleUsed === "left" ? v = u.initialWidth + u.initialClientX - y.clientX : v = u.initialWidth + y.clientX - u.initialClientX, h = Math.min(
2715
+ Math.max(v, 64),
2716
+ ((B = (z = n.domElement) == null ? void 0 : z.firstElementChild) == null ? void 0 : B.clientWidth) || Number.MAX_VALUE
2717
2717
  ), c.style.width = `${h}px`;
2718
2718
  }, m = (y) => {
2719
2719
  (!y.target || !c.contains(y.target) || !n.isEditable) && o.contains(l) && o.contains(d) && (o.removeChild(l), o.removeChild(d)), u && (u = void 0, n.updateBlock(e, {
@@ -2759,7 +2759,7 @@ const Zr = re.create({
2759
2759
  }, Gt = (e) => {
2760
2760
  const n = e.src || void 0, t = e.width || void 0;
2761
2761
  return { url: n, previewWidth: t };
2762
- }, ps = '<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>', hs = {
2762
+ }, hs = '<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>', fs = {
2763
2763
  textAlignment: M.textAlignment,
2764
2764
  backgroundColor: M.backgroundColor,
2765
2765
  // File name.
@@ -2782,15 +2782,15 @@ const Zr = re.create({
2782
2782
  default: void 0,
2783
2783
  type: "number"
2784
2784
  }
2785
- }, fs = {
2785
+ }, ms = {
2786
2786
  type: "image",
2787
- propSchema: hs,
2787
+ propSchema: fs,
2788
2788
  content: "none",
2789
2789
  isFileBlock: !0,
2790
2790
  fileBlockAccept: ["image/*"]
2791
- }, ms = (e, n) => {
2791
+ }, gs = (e, n) => {
2792
2792
  const t = document.createElement("div");
2793
- t.innerHTML = ps;
2793
+ t.innerHTML = hs;
2794
2794
  const o = document.createElement("div");
2795
2795
  o.className = "bn-visual-media-wrapper";
2796
2796
  const r = document.createElement("img");
@@ -2804,7 +2804,7 @@ const Zr = re.create({
2804
2804
  n.dictionary.file_blocks.image.add_button_text,
2805
2805
  t.firstElementChild
2806
2806
  );
2807
- }, gs = (e) => {
2807
+ }, bs = (e) => {
2808
2808
  if (e.tagName === "IMG")
2809
2809
  return e.closest("figure") ? void 0 : Gt(e);
2810
2810
  if (e.tagName === "FIGURE") {
@@ -2817,7 +2817,7 @@ const Zr = re.create({
2817
2817
  caption: o
2818
2818
  };
2819
2819
  }
2820
- }, bs = (e) => {
2820
+ }, ks = (e) => {
2821
2821
  if (!e.props.url) {
2822
2822
  const t = document.createElement("p");
2823
2823
  return t.textContent = "Add image", {
@@ -2828,10 +2828,10 @@ const Zr = re.create({
2828
2828
  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 ? xt(n, e.props.caption) : Xe(n, e.props.caption) : {
2829
2829
  dom: n
2830
2830
  };
2831
- }, ks = xe(fs, {
2832
- render: ms,
2833
- parse: gs,
2834
- toExternalHTML: bs
2831
+ }, ws = Te(ms, {
2832
+ render: gs,
2833
+ parse: bs,
2834
+ toExternalHTML: ks
2835
2835
  }), Rn = (e, n, t) => ({
2836
2836
  state: o,
2837
2837
  dispatch: r
@@ -2877,9 +2877,9 @@ const Zr = re.create({
2877
2877
  a.command(() => r.node.childCount > 0 ? (i().deleteSelection().command(Rn(s.selection.from, !0)).run(), !0) : !1)
2878
2878
  )
2879
2879
  ]);
2880
- }, ws = {
2880
+ }, ys = {
2881
2881
  ...M
2882
- }, ys = K({
2882
+ }, Cs = K({
2883
2883
  name: "toggleListItem",
2884
2884
  content: "inline*",
2885
2885
  group: "blockContent",
@@ -2945,13 +2945,13 @@ const Zr = re.create({
2945
2945
  };
2946
2946
  };
2947
2947
  }
2948
- }), Cs = Q(
2949
- ys,
2950
- ws
2948
+ }), vs = Q(
2949
+ Cs,
2950
+ ys
2951
2951
  );
2952
2952
  function Tt(e, n, t) {
2953
2953
  var u, h, f;
2954
- const o = We.fromSchema(n), r = e, s = document.createElement("div");
2954
+ const o = Se.fromSchema(n), r = e, s = document.createElement("div");
2955
2955
  s.setAttribute("data-node-type", "blockGroup");
2956
2956
  for (const m of Array.from(r.childNodes))
2957
2957
  s.appendChild(m.cloneNode(!0));
@@ -2979,9 +2979,9 @@ function Tt(e, n, t) {
2979
2979
  }
2980
2980
  return c.content;
2981
2981
  }
2982
- const vs = {
2982
+ const Es = {
2983
2983
  ...M
2984
- }, Es = K({
2984
+ }, Ss = K({
2985
2985
  name: "bulletListItem",
2986
2986
  content: "inline*",
2987
2987
  group: "blockContent",
@@ -3058,20 +3058,20 @@ const vs = {
3058
3058
  ((t = this.options.domAttributes) == null ? void 0 : t.inlineContent) || {}
3059
3059
  );
3060
3060
  }
3061
- }), Ss = Q(
3062
- Es,
3063
- vs
3061
+ }), Bs = Q(
3062
+ Ss,
3063
+ Es
3064
3064
  ), Vn = {
3065
3065
  ...M,
3066
3066
  checked: {
3067
3067
  default: !1
3068
3068
  }
3069
- }, Bs = K({
3069
+ }, xs = K({
3070
3070
  name: "checkListItem",
3071
3071
  content: "inline*",
3072
3072
  group: "blockContent",
3073
3073
  addAttributes() {
3074
- return Be(Vn);
3074
+ return xe(Vn);
3075
3075
  },
3076
3076
  addInputRules() {
3077
3077
  return [
@@ -3233,11 +3233,11 @@ const vs = {
3233
3233
  };
3234
3234
  };
3235
3235
  }
3236
- }), xs = Q(
3237
- Bs,
3236
+ }), Ts = Q(
3237
+ xs,
3238
3238
  Vn
3239
- ), Ts = new U("numbered-list-indexing"), Ms = () => new L({
3240
- key: Ts,
3239
+ ), Ms = new U("numbered-list-indexing"), Ps = () => new L({
3240
+ key: Ms,
3241
3241
  appendTransaction: (e, n, t) => {
3242
3242
  const o = t.tr;
3243
3243
  o.setMeta("numberedListIndexing", !0);
@@ -3285,14 +3285,14 @@ const vs = {
3285
3285
  }), _n = {
3286
3286
  ...M,
3287
3287
  start: { default: void 0, type: "number" }
3288
- }, Ps = K({
3288
+ }, Is = K({
3289
3289
  name: "numberedListItem",
3290
3290
  content: "inline*",
3291
3291
  group: "blockContent",
3292
3292
  priority: 90,
3293
3293
  addAttributes() {
3294
3294
  return {
3295
- ...Be(_n),
3295
+ ...xe(_n),
3296
3296
  // the index attribute is only used internally (it's not part of the blocknote schema)
3297
3297
  // that's why it's defined explicitly here, and not part of the prop schema
3298
3298
  index: {
@@ -3341,7 +3341,7 @@ const vs = {
3341
3341
  };
3342
3342
  },
3343
3343
  addProseMirrorPlugins() {
3344
- return [Ms()];
3344
+ return [Ps()];
3345
3345
  },
3346
3346
  parseHTML() {
3347
3347
  return [
@@ -3391,12 +3391,12 @@ const vs = {
3391
3391
  ((t = this.options.domAttributes) == null ? void 0 : t.inlineContent) || {}
3392
3392
  );
3393
3393
  }
3394
- }), Is = Q(
3395
- Ps,
3394
+ }), Ls = Q(
3395
+ Is,
3396
3396
  _n
3397
- ), Ls = {
3397
+ ), As = {
3398
3398
  ...M
3399
- }, As = K({
3399
+ }, Ns = K({
3400
3400
  name: "paragraph",
3401
3401
  content: "inline*",
3402
3402
  group: "blockContent",
@@ -3443,12 +3443,12 @@ const vs = {
3443
3443
  ((t = this.options.domAttributes) == null ? void 0 : t.inlineContent) || {}
3444
3444
  );
3445
3445
  }
3446
- }), Ns = Q(
3447
- As,
3448
- Ls
3449
- ), Hs = {
3446
+ }), Hs = Q(
3447
+ Ns,
3448
+ As
3449
+ ), Ds = {
3450
3450
  ...M
3451
- }, Ds = K({
3451
+ }, Os = K({
3452
3452
  name: "quote",
3453
3453
  content: "inline*",
3454
3454
  group: "blockContent",
@@ -3491,7 +3491,13 @@ const vs = {
3491
3491
  // Parse from external HTML.
3492
3492
  {
3493
3493
  tag: "blockquote",
3494
- node: "quote"
3494
+ node: "quote",
3495
+ getContent: (e, n) => {
3496
+ const o = e.cloneNode(!0);
3497
+ return ur(o), Se.fromSchema(n).parse(o, {
3498
+ topNode: n.nodes.paragraph.create()
3499
+ }).content;
3500
+ }
3495
3501
  }
3496
3502
  ];
3497
3503
  },
@@ -3507,14 +3513,14 @@ const vs = {
3507
3513
  ((t = this.options.domAttributes) == null ? void 0 : t.inlineContent) || {}
3508
3514
  );
3509
3515
  }
3510
- }), Os = Q(
3511
- Ds,
3512
- Hs
3513
- ), Rs = 35, Un = 120, zc = 31, Vs = _.create({
3516
+ }), Rs = Q(
3517
+ Os,
3518
+ Ds
3519
+ ), Vs = 35, Un = 120, zc = 31, _s = _.create({
3514
3520
  name: "BlockNoteTableExtension",
3515
3521
  addProseMirrorPlugins: () => [
3516
3522
  Ao({
3517
- cellMinWidth: Rs,
3523
+ cellMinWidth: Vs,
3518
3524
  defaultCellMinWidth: Un,
3519
3525
  // We set this to null as we implement our own node view in the table
3520
3526
  // block content. This node view is the same as what's used by default,
@@ -3554,9 +3560,9 @@ const vs = {
3554
3560
  )
3555
3561
  };
3556
3562
  }
3557
- }), _s = {
3563
+ }), Us = {
3558
3564
  textColor: M.textColor
3559
- }, Us = K({
3565
+ }, $s = K({
3560
3566
  name: "table",
3561
3567
  content: "tableRow+",
3562
3568
  group: "blockContent",
@@ -3619,7 +3625,7 @@ const vs = {
3619
3625
  });
3620
3626
  };
3621
3627
  }
3622
- }), $s = K({
3628
+ }), Fs = K({
3623
3629
  name: "tableParagraph",
3624
3630
  group: "tableContent",
3625
3631
  content: "inline*",
@@ -3640,7 +3646,7 @@ const vs = {
3640
3646
  renderHTML({ HTMLAttributes: e }) {
3641
3647
  return ["p", e, 0];
3642
3648
  }
3643
- }), Fs = oe.create({
3649
+ }), zs = oe.create({
3644
3650
  name: "tableRow",
3645
3651
  addOptions() {
3646
3652
  return {
@@ -3662,7 +3668,7 @@ const vs = {
3662
3668
  }
3663
3669
  });
3664
3670
  function qt(e, n) {
3665
- const o = We.fromSchema(n).parse(e, {
3671
+ const o = Se.fromSchema(n).parse(e, {
3666
3672
  topNode: n.nodes.blockGroup.create()
3667
3673
  }), r = [];
3668
3674
  return o.content.descendants((s) => {
@@ -3670,12 +3676,12 @@ function qt(e, n) {
3670
3676
  return r.push(s), !1;
3671
3677
  }), R.fromArray(r);
3672
3678
  }
3673
- const zs = Q(
3679
+ const Ws = Q(
3680
+ $s,
3674
3681
  Us,
3675
- _s,
3676
3682
  [
3677
- Vs,
3678
- $s,
3683
+ _s,
3684
+ Fs,
3679
3685
  Lo.extend({
3680
3686
  /**
3681
3687
  * We allow table headers and cells to have multiple tableContent nodes because
@@ -3709,12 +3715,12 @@ const zs = Q(
3709
3715
  ];
3710
3716
  }
3711
3717
  }),
3712
- Fs
3718
+ zs
3713
3719
  ]
3714
3720
  ), Kt = (e) => {
3715
3721
  const n = e.src || void 0, t = e.width || void 0;
3716
3722
  return { url: n, previewWidth: t };
3717
- }, Ws = '<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>', js = {
3723
+ }, js = '<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>', Gs = {
3718
3724
  textAlignment: M.textAlignment,
3719
3725
  backgroundColor: M.backgroundColor,
3720
3726
  // File name.
@@ -3737,15 +3743,15 @@ const zs = Q(
3737
3743
  default: void 0,
3738
3744
  type: "number"
3739
3745
  }
3740
- }, Gs = {
3746
+ }, qs = {
3741
3747
  type: "video",
3742
- propSchema: js,
3748
+ propSchema: Gs,
3743
3749
  content: "none",
3744
3750
  isFileBlock: !0,
3745
3751
  fileBlockAccept: ["video/*"]
3746
- }, qs = (e, n) => {
3752
+ }, Ks = (e, n) => {
3747
3753
  const t = document.createElement("div");
3748
- t.innerHTML = Ws;
3754
+ t.innerHTML = js;
3749
3755
  const o = document.createElement("div");
3750
3756
  o.className = "bn-visual-media-wrapper";
3751
3757
  const r = document.createElement("video");
@@ -3759,7 +3765,7 @@ const zs = Q(
3759
3765
  n.dictionary.file_blocks.video.add_button_text,
3760
3766
  t.firstElementChild
3761
3767
  );
3762
- }, Ks = (e) => {
3768
+ }, Ys = (e) => {
3763
3769
  if (e.tagName === "VIDEO")
3764
3770
  return e.closest("figure") ? void 0 : Kt(e);
3765
3771
  if (e.tagName === "FIGURE") {
@@ -3772,7 +3778,7 @@ const zs = Q(
3772
3778
  caption: o
3773
3779
  };
3774
3780
  }
3775
- }, Ys = (e) => {
3781
+ }, Js = (e) => {
3776
3782
  if (!e.props.url) {
3777
3783
  const t = document.createElement("p");
3778
3784
  return t.textContent = "Add video", {
@@ -3783,51 +3789,51 @@ const zs = Q(
3783
3789
  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 ? xt(n, e.props.caption) : Xe(n, e.props.caption) : {
3784
3790
  dom: n
3785
3791
  };
3786
- }, Js = xe(Gs, {
3787
- render: qs,
3788
- parse: Ks,
3789
- toExternalHTML: Ys
3792
+ }, Xs = Te(qs, {
3793
+ render: Ks,
3794
+ parse: Ys,
3795
+ toExternalHTML: Js
3790
3796
  }), $n = {
3791
- paragraph: Ns,
3792
- heading: us,
3793
- quote: Os,
3794
- codeBlock: Xr,
3795
- toggleListItem: Cs,
3796
- bulletListItem: Ss,
3797
- numberedListItem: Is,
3798
- checkListItem: xs,
3799
- table: zs,
3800
- file: as,
3801
- image: ks,
3802
- video: Js,
3803
- audio: Kr
3804
- }, Xs = bn($n), Fn = {
3797
+ paragraph: Hs,
3798
+ heading: ps,
3799
+ quote: Rs,
3800
+ codeBlock: Zr,
3801
+ toggleListItem: vs,
3802
+ bulletListItem: Bs,
3803
+ numberedListItem: Ls,
3804
+ checkListItem: Ts,
3805
+ table: Ws,
3806
+ file: cs,
3807
+ image: ws,
3808
+ video: Xs,
3809
+ audio: Yr
3810
+ }, Zs = bn($n), Fn = {
3805
3811
  bold: ae(Bo, "boolean"),
3806
3812
  italic: ae(To, "boolean"),
3807
3813
  underline: ae(Po, "boolean"),
3808
3814
  strike: ae(Mo, "boolean"),
3809
3815
  code: ae(xo, "boolean"),
3810
- textColor: ts,
3811
- backgroundColor: Qr
3816
+ textColor: ns,
3817
+ backgroundColor: es
3812
3818
  }, Wc = vn(Fn), zn = {
3813
3819
  text: { config: "text", implementation: {} },
3814
3820
  link: { config: "link", implementation: {} }
3815
- }, Zs = yn(
3821
+ }, Qs = yn(
3816
3822
  zn
3817
3823
  );
3818
3824
  function H(e, n) {
3819
- return e in n.schema.blockSchema && n.schema.blockSchema[e] === Xs[e];
3825
+ return e in n.schema.blockSchema && n.schema.blockSchema[e] === Zs[e];
3820
3826
  }
3821
3827
  function jc(e, n, t) {
3822
3828
  return e in t.schema.blockSchema && t.schema.blockSchema[e] === n;
3823
3829
  }
3824
- function Qs(e, n) {
3825
- return e in n.schema.inlineContentSchema && n.schema.inlineContentSchema[e] === Zs[e];
3830
+ function ei(e, n) {
3831
+ return e in n.schema.inlineContentSchema && n.schema.inlineContentSchema[e] === Qs[e];
3826
3832
  }
3827
3833
  function Gc(e, n, t) {
3828
3834
  return e in t.schema.inlineContentSchema && t.schema.inlineContentSchema[e] === n;
3829
3835
  }
3830
- function ei(e, n, t) {
3836
+ function ti(e, n, t) {
3831
3837
  return n.type === e && n.type in t.schema.blockSchema && H(n.type, t);
3832
3838
  }
3833
3839
  function qc(e, n) {
@@ -3839,14 +3845,14 @@ function Kc(e, n) {
3839
3845
  function Yc(e, n) {
3840
3846
  return n.schema.blockSchema[e.type].isFileBlock && !e.props.url;
3841
3847
  }
3842
- function ti(e, n, t) {
3848
+ function ni(e, n, t) {
3843
3849
  return n in t.schema.blockSchema && e in t.schema.blockSchema[n].propSchema && t.schema.blockSchema[n].propSchema[e] === M[e];
3844
3850
  }
3845
3851
  function Jc(e, n, t) {
3846
- return ti(e, n.type, t);
3852
+ return ni(e, n.type, t);
3847
3853
  }
3848
3854
  function Yt(e) {
3849
- return e instanceof Se;
3855
+ return e instanceof Be;
3850
3856
  }
3851
3857
  const Xc = async (e) => {
3852
3858
  const n = new FormData();
@@ -3858,7 +3864,7 @@ const Xc = async (e) => {
3858
3864
  "tmpfiles.org/dl/"
3859
3865
  );
3860
3866
  };
3861
- function ni(e) {
3867
+ function oi(e) {
3862
3868
  let n = e.getTextCursorPosition().block, t = e.schema.blockSchema[n.type].content;
3863
3869
  for (; t === "none"; ) {
3864
3870
  if (n = e.getTextCursorPosition().nextBlock, n === void 0)
@@ -3871,7 +3877,7 @@ function P(e, n) {
3871
3877
  if (t.content === void 0)
3872
3878
  throw new Error("Slash Menu open in a block that doesn't contain content.");
3873
3879
  let o;
3874
- return Array.isArray(t.content) && (t.content.length === 1 && ue(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)), ni(e), o;
3880
+ return Array.isArray(t.content) && (t.content.length === 1 && ue(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)), oi(e), o;
3875
3881
  }
3876
3882
  function Zc(e) {
3877
3883
  const n = [];
@@ -4108,7 +4114,7 @@ function tt(e) {
4108
4114
  Object.entries(e).filter(([, n]) => n !== void 0)
4109
4115
  );
4110
4116
  }
4111
- class Pe {
4117
+ class Ie {
4112
4118
  constructor(n) {
4113
4119
  p(this, "blockSpecs");
4114
4120
  p(this, "inlineContentSpecs");
@@ -4125,39 +4131,39 @@ class Pe {
4125
4131
  ), this.styleSchema = vn(this.styleSpecs);
4126
4132
  }
4127
4133
  static create(n) {
4128
- return new Pe(n);
4134
+ return new Ie(n);
4129
4135
  }
4130
4136
  }
4131
- const oi = {
4137
+ const ri = {
4132
4138
  type: "pageBreak",
4133
4139
  propSchema: {},
4134
4140
  content: "none",
4135
4141
  isFileBlock: !1,
4136
4142
  isSelectable: !1
4137
- }, ri = () => {
4143
+ }, si = () => {
4138
4144
  const e = document.createElement("div");
4139
4145
  return e.className = "bn-page-break", e.setAttribute("data-page-break", ""), {
4140
4146
  dom: e
4141
4147
  };
4142
- }, si = (e) => {
4148
+ }, ii = (e) => {
4143
4149
  if (e.tagName === "DIV" && e.hasAttribute("data-page-break"))
4144
4150
  return {
4145
4151
  type: "pageBreak"
4146
4152
  };
4147
- }, ii = () => {
4153
+ }, ai = () => {
4148
4154
  const e = document.createElement("div");
4149
4155
  return e.setAttribute("data-page-break", ""), {
4150
4156
  dom: e
4151
4157
  };
4152
- }, ai = xe(oi, {
4153
- render: ri,
4154
- parse: si,
4155
- toExternalHTML: ii
4156
- }), Wn = Pe.create({
4158
+ }, ci = Te(ri, {
4159
+ render: si,
4160
+ parse: ii,
4161
+ toExternalHTML: ai
4162
+ }), Wn = Ie.create({
4157
4163
  blockSpecs: {
4158
- pageBreak: ai
4164
+ pageBreak: ci
4159
4165
  }
4160
- }), el = (e) => Pe.create({
4166
+ }), el = (e) => Ie.create({
4161
4167
  blockSpecs: {
4162
4168
  ...e.blockSpecs,
4163
4169
  ...Wn.blockSpecs
@@ -4165,12 +4171,12 @@ const oi = {
4165
4171
  inlineContentSpecs: e.inlineContentSpecs,
4166
4172
  styleSpecs: e.styleSpecs
4167
4173
  });
4168
- function ci(e) {
4174
+ function li(e) {
4169
4175
  return "pageBreak" in e.schema.blockSchema && e.schema.blockSchema.pageBreak === Wn.blockSchema.pageBreak;
4170
4176
  }
4171
4177
  function tl(e) {
4172
4178
  const n = [];
4173
- return ci(e) && n.push({
4179
+ return li(e) && n.push({
4174
4180
  ...e.dictionary.slash_menu.page_break,
4175
4181
  onItemClick: () => {
4176
4182
  P(e, {
@@ -4180,10 +4186,10 @@ function tl(e) {
4180
4186
  key: "page_break"
4181
4187
  }), n;
4182
4188
  }
4183
- function li(e) {
4189
+ function di(e) {
4184
4190
  return e.transact((n) => {
4185
4191
  const t = Z(n.doc, n.selection.anchor);
4186
- if (n.selection instanceof Se)
4192
+ if (n.selection instanceof Be)
4187
4193
  return {
4188
4194
  type: "cell",
4189
4195
  anchorBlockId: t.node.attrs.id,
@@ -4207,7 +4213,7 @@ function li(e) {
4207
4213
  }
4208
4214
  });
4209
4215
  }
4210
- function di(e, n) {
4216
+ function ui(e, n) {
4211
4217
  var r, s;
4212
4218
  const t = (r = F(n.anchorBlockId, e.doc)) == null ? void 0 : r.posBeforeNode;
4213
4219
  if (t === void 0)
@@ -4216,7 +4222,7 @@ function di(e, n) {
4216
4222
  );
4217
4223
  let o;
4218
4224
  if (n.type === "cell")
4219
- o = Se.create(
4225
+ o = Be.create(
4220
4226
  e.doc,
4221
4227
  t + n.anchorCellOffset,
4222
4228
  t + n.headCellOffset
@@ -4248,8 +4254,8 @@ function jn(e, n, t) {
4248
4254
  var i;
4249
4255
  const r = ((i = e.getSelection()) == null ? void 0 : i.blocks) || [
4250
4256
  e.getTextCursorPosition().block
4251
- ], s = li(e);
4252
- e.removeBlocks(r), e.insertBlocks(pt(r), n, t), di(o, s);
4257
+ ], s = di(e);
4258
+ e.removeBlocks(r), e.insertBlocks(pt(r), n, t), ui(o, s);
4253
4259
  });
4254
4260
  }
4255
4261
  function Gn(e) {
@@ -4277,7 +4283,7 @@ function Kn(e, n, t) {
4277
4283
  s
4278
4284
  );
4279
4285
  }
4280
- function ui(e) {
4286
+ function pi(e) {
4281
4287
  e.transact(() => {
4282
4288
  const n = e.getSelection(), t = (n == null ? void 0 : n.blocks[0]) || e.getTextCursorPosition().block, o = qn(
4283
4289
  e,
@@ -4291,7 +4297,7 @@ function ui(e) {
4291
4297
  );
4292
4298
  });
4293
4299
  }
4294
- function pi(e) {
4300
+ function hi(e) {
4295
4301
  e.transact(() => {
4296
4302
  const n = e.getSelection(), t = (n == null ? void 0 : n.blocks[(n == null ? void 0 : n.blocks.length) - 1]) || e.getTextCursorPosition().block, o = Kn(
4297
4303
  e,
@@ -4305,7 +4311,7 @@ function pi(e) {
4305
4311
  );
4306
4312
  });
4307
4313
  }
4308
- function hi(e, n, t) {
4314
+ function fi(e, n, t) {
4309
4315
  const { $from: o, $to: r } = e.selection, s = o.blockRange(
4310
4316
  r,
4311
4317
  (m) => m.childCount > 0 && (m.type.name === "blockGroup" || m.type.name === "column")
@@ -4340,41 +4346,41 @@ function hi(e, n, t) {
4340
4346
  ).scrollIntoView(), !0;
4341
4347
  }
4342
4348
  function Yn(e) {
4343
- return e.transact((n) => hi(
4349
+ return e.transact((n) => fi(
4344
4350
  n,
4345
4351
  e.pmSchema.nodes.blockContainer,
4346
4352
  e.pmSchema.nodes.blockGroup
4347
4353
  ));
4348
4354
  }
4349
- function fi(e) {
4355
+ function mi(e) {
4350
4356
  e._tiptapEditor.commands.liftListItem("blockContainer");
4351
4357
  }
4352
- function mi(e) {
4358
+ function gi(e) {
4353
4359
  return e.transact((n) => {
4354
4360
  const { bnBlock: t } = Ge(n);
4355
4361
  return n.doc.resolve(t.beforePos).nodeBefore !== null;
4356
4362
  });
4357
4363
  }
4358
- function gi(e) {
4364
+ function bi(e) {
4359
4365
  return e.transact((n) => {
4360
4366
  const { bnBlock: t } = Ge(n);
4361
4367
  return n.doc.resolve(t.beforePos).depth > 1;
4362
4368
  });
4363
4369
  }
4364
- function bi(e, n) {
4370
+ function ki(e, n) {
4365
4371
  const t = typeof n == "string" ? n : n.id, o = A(e), r = F(t, e);
4366
4372
  if (r)
4367
- return E(r.node, o);
4373
+ return S(r.node, o);
4368
4374
  }
4369
- function ki(e, n) {
4375
+ function wi(e, n) {
4370
4376
  const t = typeof n == "string" ? n : n.id, o = F(t, e), r = A(e);
4371
4377
  if (!o)
4372
4378
  return;
4373
4379
  const i = e.resolve(o.posBeforeNode).nodeBefore;
4374
4380
  if (i)
4375
- return E(i, r);
4381
+ return S(i, r);
4376
4382
  }
4377
- function wi(e, n) {
4383
+ function yi(e, n) {
4378
4384
  const t = typeof n == "string" ? n : n.id, o = F(t, e), r = A(e);
4379
4385
  if (!o)
4380
4386
  return;
@@ -4382,17 +4388,17 @@ function wi(e, n) {
4382
4388
  o.posBeforeNode + o.node.nodeSize
4383
4389
  ).nodeAfter;
4384
4390
  if (i)
4385
- return E(i, r);
4391
+ return S(i, r);
4386
4392
  }
4387
- function yi(e, n) {
4393
+ function Ci(e, n) {
4388
4394
  const t = typeof n == "string" ? n : n.id, o = A(e), r = F(t, e);
4389
4395
  if (!r)
4390
4396
  return;
4391
4397
  const s = e.resolve(r.posBeforeNode), i = s.node(), a = s.node(-1), c = a.type.name !== "doc" ? i.type.name === "blockGroup" ? a : i : void 0;
4392
4398
  if (c)
4393
- return E(c, o);
4399
+ return S(c, o);
4394
4400
  }
4395
- function Ci(e, n, t, o = { updateSelection: !0 }) {
4401
+ function vi(e, n, t, o = { updateSelection: !0 }) {
4396
4402
  let { from: r, to: s } = typeof n == "number" ? { from: n, to: n } : { from: n.from, to: n.to }, i = !0, a = !0, c = "";
4397
4403
  if (t.forEach((l) => {
4398
4404
  l.check(), i && l.isText && l.marks.length === 0 ? c += l.text : i = !1, a = a ? l.isBlock : !1;
@@ -4402,7 +4408,7 @@ function Ci(e, n, t, o = { updateSelection: !0 }) {
4402
4408
  }
4403
4409
  return i ? e.insertText(c, r, s) : e.replaceWith(r, s, t), o.updateSelection && bo(e, e.steps.length - 1, -1), !0;
4404
4410
  }
4405
- function vi(e) {
4411
+ function Ei(e) {
4406
4412
  const n = A(e);
4407
4413
  if (e.selection.empty || "node" in e.selection)
4408
4414
  return;
@@ -4416,10 +4422,10 @@ function vi(e) {
4416
4422
  throw new Error(
4417
4423
  `Error getting selection - node not found at position ${u}`
4418
4424
  );
4419
- return E(h, n);
4425
+ return S(h, n);
4420
4426
  }, s = [], i = t.sharedDepth(o.pos), a = t.index(i), c = o.index(i);
4421
4427
  if (t.depth > i) {
4422
- s.push(E(t.nodeAfter, n));
4428
+ s.push(S(t.nodeAfter, n));
4423
4429
  for (let l = t.depth; l > i; l--)
4424
4430
  if (t.node(l).type.isInGroup("childContainer")) {
4425
4431
  const u = t.index(l) + 1, h = t.node(l).childCount;
@@ -4438,8 +4444,8 @@ function vi(e) {
4438
4444
  blocks: s
4439
4445
  };
4440
4446
  }
4441
- function Ei(e, n, t) {
4442
- const o = typeof n == "string" ? n : n.id, r = typeof t == "string" ? t : t.id, s = A(e), i = Me(s);
4447
+ function Si(e, n, t) {
4448
+ const o = typeof n == "string" ? n : n.id, r = typeof t == "string" ? t : t.id, s = A(e), i = Pe(s);
4443
4449
  if (o === r)
4444
4450
  throw new Error(
4445
4451
  `Attempting to set selection with the same anchor and head blocks (id ${o})`
@@ -4476,7 +4482,7 @@ function Ei(e, n, t) {
4476
4482
  m = d.blockContent.afterPos - 1;
4477
4483
  e.setSelection(O.create(e.doc, f, m));
4478
4484
  }
4479
- function Si(e) {
4485
+ function Bi(e) {
4480
4486
  const n = A(e);
4481
4487
  let t = e.selection.$from, o = e.selection.$to;
4482
4488
  for (; o.parentOffset >= o.parent.nodeSize - 2 && o.depth > 0; )
@@ -4487,7 +4493,7 @@ function Si(e) {
4487
4493
  t = e.doc.resolve(t.pos - 1);
4488
4494
  for (; t.parentOffset >= t.parent.nodeSize - 2 && t.depth > 0; )
4489
4495
  t = e.doc.resolve(t.pos + 1);
4490
- const r = fr(
4496
+ const r = mr(
4491
4497
  e.doc.slice(t.pos, o.pos, !0),
4492
4498
  n
4493
4499
  );
@@ -4499,18 +4505,18 @@ function Si(e) {
4499
4505
  ...r
4500
4506
  };
4501
4507
  }
4502
- function Bi(e) {
4508
+ function xi(e) {
4503
4509
  const { bnBlock: n } = Ge(e), t = A(e.doc), o = e.doc.resolve(n.beforePos), r = o.nodeBefore, s = e.doc.resolve(n.afterPos).nodeAfter;
4504
4510
  let i;
4505
4511
  return o.depth > 1 && (i = o.node(), i.type.isInGroup("bnBlock") || (i = o.node(o.depth - 1))), {
4506
- block: E(n.node, t),
4507
- prevBlock: r === null ? void 0 : E(r, t),
4508
- nextBlock: s === null ? void 0 : E(s, t),
4509
- parentBlock: i === void 0 ? void 0 : E(i, t)
4512
+ block: S(n.node, t),
4513
+ prevBlock: r === null ? void 0 : S(r, t),
4514
+ nextBlock: s === null ? void 0 : S(s, t),
4515
+ parentBlock: i === void 0 ? void 0 : S(i, t)
4510
4516
  };
4511
4517
  }
4512
4518
  function Jn(e, n, t = "start") {
4513
- const o = typeof n == "string" ? n : n.id, r = A(e.doc), s = Me(r), i = F(o, e.doc);
4519
+ const o = typeof n == "string" ? n : n.id, r = A(e.doc), s = Pe(r), i = F(o, e.doc);
4514
4520
  if (!i)
4515
4521
  throw new Error(`Block with ID ${o} not found`);
4516
4522
  const a = ne(i), c = s.blockSchema[a.blockNoteType].content;
@@ -4568,7 +4574,7 @@ async function Mt() {
4568
4574
  rehypeFormat: e[9]
4569
4575
  }, fe;
4570
4576
  }
4571
- function xi() {
4577
+ function Ti() {
4572
4578
  const e = (n) => {
4573
4579
  let t = n.children.length;
4574
4580
  for (let o = 0; o < t; o++) {
@@ -4584,7 +4590,7 @@ function xi() {
4584
4590
  };
4585
4591
  return e;
4586
4592
  }
4587
- function Ti() {
4593
+ function Mi() {
4588
4594
  const e = fe;
4589
4595
  if (!e)
4590
4596
  throw new Error(
@@ -4612,37 +4618,37 @@ function Pt(e) {
4612
4618
  throw new Error(
4613
4619
  "cleanHTMLToMarkdown requires ESM dependencies to be initialized"
4614
4620
  );
4615
- return n.unified.unified().use(n.rehypeParse.default, { fragment: !0 }).use(xi).use(Ti).use(n.rehypeRemark.default).use(n.remarkGfm.default).use(n.remarkStringify.default, {
4621
+ return n.unified.unified().use(n.rehypeParse.default, { fragment: !0 }).use(Ti).use(Mi).use(n.rehypeRemark.default).use(n.remarkGfm.default).use(n.remarkStringify.default, {
4616
4622
  handlers: { text: (o) => o.value }
4617
4623
  }).processSync(e).value;
4618
4624
  }
4619
- async function Mi(e, n, t, o) {
4625
+ async function Pi(e, n, t, o) {
4620
4626
  await Mt();
4621
4627
  const s = Ye(n, t).exportBlocks(e, o);
4622
4628
  return Pt(s);
4623
4629
  }
4624
- function Pi(e) {
4630
+ function Ii(e) {
4625
4631
  return Array.prototype.indexOf.call(e.parentElement.childNodes, e);
4626
4632
  }
4627
- function Ii(e) {
4633
+ function Li(e) {
4628
4634
  return e.nodeType === 3 && !/\S/.test(e.nodeValue || "");
4629
4635
  }
4630
- function Li(e) {
4636
+ function Ai(e) {
4631
4637
  e.querySelectorAll("li > ul, li > ol").forEach((n) => {
4632
- const t = Pi(n), o = n.parentElement, r = Array.from(o.childNodes).slice(
4638
+ const t = Ii(n), o = n.parentElement, r = Array.from(o.childNodes).slice(
4633
4639
  t + 1
4634
4640
  );
4635
4641
  n.remove(), r.forEach((s) => {
4636
4642
  s.remove();
4637
4643
  }), o.insertAdjacentElement("afterend", n), r.reverse().forEach((s) => {
4638
- if (Ii(s))
4644
+ if (Li(s))
4639
4645
  return;
4640
4646
  const i = document.createElement("li");
4641
4647
  i.append(s), n.insertAdjacentElement("afterend", i);
4642
4648
  }), o.childNodes.length === 0 && o.remove();
4643
4649
  });
4644
4650
  }
4645
- function Ai(e) {
4651
+ function Ni(e) {
4646
4652
  e.querySelectorAll("li + ul, li + ol").forEach((n) => {
4647
4653
  var s, i;
4648
4654
  const t = n.previousElementSibling, o = document.createElement("div");
@@ -4653,25 +4659,25 @@ function Ai(e) {
4653
4659
  });
4654
4660
  }
4655
4661
  let Jt = null;
4656
- function Ni() {
4662
+ function Hi() {
4657
4663
  return Jt || (Jt = document.implementation.createHTMLDocument("title"));
4658
4664
  }
4659
4665
  function Xn(e) {
4660
4666
  if (typeof e == "string") {
4661
- const n = Ni().createElement("div");
4667
+ const n = Hi().createElement("div");
4662
4668
  n.innerHTML = e, e = n;
4663
4669
  }
4664
- return Li(e), Ai(e), e;
4670
+ return Ai(e), Ni(e), e;
4665
4671
  }
4666
4672
  async function Zn(e, n) {
4667
- const t = Xn(e), r = We.fromSchema(n).parse(t, {
4673
+ const t = Xn(e), r = Se.fromSchema(n).parse(t, {
4668
4674
  topNode: n.nodes.blockGroup.create()
4669
4675
  }), s = [];
4670
4676
  for (let i = 0; i < r.childCount; i++)
4671
- s.push(E(r.child(i), n));
4677
+ s.push(S(r.child(i), n));
4672
4678
  return s;
4673
4679
  }
4674
- function Hi(e, n) {
4680
+ function Di(e, n) {
4675
4681
  const t = n.value ? n.value : "", o = {};
4676
4682
  n.lang && (o["data-language"] = n.lang);
4677
4683
  let r = {
@@ -4692,11 +4698,11 @@ async function Qn(e) {
4692
4698
  return n.unified.unified().use(n.remarkParse.default).use(n.remarkGfm.default).use(n.remarkRehype.default, {
4693
4699
  handlers: {
4694
4700
  ...n.remarkRehype.defaultHandlers,
4695
- code: Hi
4701
+ code: Di
4696
4702
  }
4697
4703
  }).use(n.rehypeStringify.default).processSync(e).value;
4698
4704
  }
4699
- async function Di(e, n) {
4705
+ async function Oi(e, n) {
4700
4706
  const t = await Qn(e);
4701
4707
  return Zn(t, n);
4702
4708
  }
@@ -4708,12 +4714,12 @@ const It = [
4708
4714
  "text/plain",
4709
4715
  "Files"
4710
4716
  ];
4711
- function Oi(e, n) {
4717
+ function Ri(e, n) {
4712
4718
  if (!e.startsWith(".") || !n.startsWith("."))
4713
4719
  throw new Error("The strings provided are not valid file extensions.");
4714
4720
  return e === n;
4715
4721
  }
4716
- function Ri(e, n) {
4722
+ function Vi(e, n) {
4717
4723
  const t = e.split("/"), o = n.split("/");
4718
4724
  if (t.length !== 2)
4719
4725
  throw new Error(`The string ${e} is not a valid MIME type.`);
@@ -4721,13 +4727,13 @@ function Ri(e, n) {
4721
4727
  throw new Error(`The string ${n} is not a valid MIME type.`);
4722
4728
  return t[1] === "*" || o[1] === "*" ? t[0] === o[0] : (t[0] === "*" || o[0] === "*" || t[0] === o[0]) && t[1] === o[1];
4723
4729
  }
4724
- function Xt(e, n, t) {
4725
- let o;
4726
- return Array.isArray(n.content) && n.content.length === 0 ? o = e.updateBlock(n, t).id : o = e.insertBlocks(
4730
+ function Xt(e, n, t, o = "after") {
4731
+ let r;
4732
+ return Array.isArray(n.content) && n.content.length === 0 ? r = e.updateBlock(n, t).id : r = e.insertBlocks(
4727
4733
  [t],
4728
4734
  n,
4729
- "after"
4730
- )[0].id, o;
4735
+ o
4736
+ )[0].id, r;
4731
4737
  }
4732
4738
  async function eo(e, n) {
4733
4739
  var i;
@@ -4760,7 +4766,7 @@ async function eo(e, n) {
4760
4766
  for (const d of s)
4761
4767
  for (const u of d.fileBlockAccept || []) {
4762
4768
  const h = u.startsWith("."), f = r[a].getAsFile();
4763
- if (f && (!h && f.type && Ri(r[a].type, u) || h && Oi(
4769
+ if (f && (!h && f.type && Vi(r[a].type, u) || h && Ri(
4764
4770
  "." + f.name.split(".").pop(),
4765
4771
  u
4766
4772
  ))) {
@@ -4788,11 +4794,15 @@ async function eo(e, n) {
4788
4794
  if (!g)
4789
4795
  return;
4790
4796
  u = n.transact((b) => {
4791
- const k = Z(b.doc, g.pos);
4797
+ var v;
4798
+ const k = Z(b.doc, g.pos), w = (v = n.prosemirrorView) == null ? void 0 : v.dom.querySelector(
4799
+ `[data-id="${k.node.attrs.id}"]`
4800
+ ), y = w == null ? void 0 : w.getBoundingClientRect();
4792
4801
  return Xt(
4793
4802
  n,
4794
4803
  n.getBlock(k.node.attrs.id),
4795
- d
4804
+ d,
4805
+ y && (y.top + y.bottom) / 2 > m.top ? "before" : "after"
4796
4806
  );
4797
4807
  });
4798
4808
  } else
@@ -4806,7 +4816,7 @@ async function eo(e, n) {
4806
4816
  }
4807
4817
  }
4808
4818
  }
4809
- const Vi = (e) => _.create({
4819
+ const _i = (e) => _.create({
4810
4820
  name: "dropFile",
4811
4821
  addProseMirrorPlugins() {
4812
4822
  return [
@@ -4829,8 +4839,8 @@ const Vi = (e) => _.create({
4829
4839
  })
4830
4840
  ];
4831
4841
  }
4832
- }), _i = /(^|\n) {0,3}#{1,6} {1,8}[^\n]{1,64}\r?\n\r?\n\s{0,32}\S/, Ui = /(_|__|\*|\*\*|~~|==|\+\+)(?!\s)(?:[^\s](?:.{0,62}[^\s])?|\S)(?=\1)/, $i = /\[[^\]]{1,128}\]\(https?:\/\/\S{1,999}\)/, Fi = /(?:\s|^)`(?!\s)(?:[^\s`](?:[^`]{0,46}[^\s`])?|[^\s`])`([^\w]|$)/, zi = /(?:^|\n)\s{0,5}-\s{1}[^\n]+\n\s{0,15}-\s/, Wi = /(?:^|\n)\s{0,5}\d+\.\s{1}[^\n]+\n\s{0,15}\d+\.\s/, ji = /\n{2} {0,3}-{2,48}\n{2}/, Gi = /(?:\n|^)(```|~~~|\$\$)(?!`|~)[^\s]{0,64} {0,64}[^\n]{0,64}\n[\s\S]{0,9999}?\s*\1 {0,64}(?:\n+|$)/, qi = /(?:\n|^)(?!\s)\w[^\n]{0,64}\r?\n(-|=)\1{0,64}\n\n\s{0,64}(\w|$)/, Ki = /(?:^|(\r?\n\r?\n))( {0,3}>[^\n]{1,333}\n){1,999}($|(\r?\n))/, Yi = /^\s*\|(.+\|)+\s*$/m, Ji = /^\s*\|(\s*[-:]+[-:]\s*\|)+\s*$/m, Xi = /^\s*\|(.+\|)+\s*$/m, Zi = (e) => _i.test(e) || Ui.test(e) || $i.test(e) || Fi.test(e) || zi.test(e) || Wi.test(e) || ji.test(e) || Gi.test(e) || qi.test(e) || Ki.test(e) || Yi.test(e) || Ji.test(e) || Xi.test(e);
4833
- async function Qi(e, n) {
4842
+ }), Ui = /(^|\n) {0,3}#{1,6} {1,8}[^\n]{1,64}\r?\n\r?\n\s{0,32}\S/, $i = /(_|__|\*|\*\*|~~|==|\+\+)(?!\s)(?:[^\s](?:.{0,62}[^\s])?|\S)(?=\1)/, Fi = /\[[^\]]{1,128}\]\(https?:\/\/\S{1,999}\)/, zi = /(?:\s|^)`(?!\s)(?:[^\s`](?:[^`]{0,46}[^\s`])?|[^\s`])`([^\w]|$)/, Wi = /(?:^|\n)\s{0,5}-\s{1}[^\n]+\n\s{0,15}-\s/, ji = /(?:^|\n)\s{0,5}\d+\.\s{1}[^\n]+\n\s{0,15}\d+\.\s/, Gi = /\n{2} {0,3}-{2,48}\n{2}/, qi = /(?:\n|^)(```|~~~|\$\$)(?!`|~)[^\s]{0,64} {0,64}[^\n]{0,64}\n[\s\S]{0,9999}?\s*\1 {0,64}(?:\n+|$)/, Ki = /(?:\n|^)(?!\s)\w[^\n]{0,64}\r?\n(-|=)\1{0,64}\n\n\s{0,64}(\w|$)/, Yi = /(?:^|(\r?\n\r?\n))( {0,3}>[^\n]{1,333}\n){1,999}($|(\r?\n))/, Ji = /^\s*\|(.+\|)+\s*$/m, Xi = /^\s*\|(\s*[-:]+[-:]\s*\|)+\s*$/m, Zi = /^\s*\|(.+\|)+\s*$/m, Qi = (e) => Ui.test(e) || $i.test(e) || Fi.test(e) || zi.test(e) || Wi.test(e) || ji.test(e) || Gi.test(e) || qi.test(e) || Ki.test(e) || Yi.test(e) || Ji.test(e) || Xi.test(e) || Zi.test(e);
4843
+ async function ea(e, n) {
4834
4844
  const { schema: t } = n.state;
4835
4845
  if (!e.clipboardData)
4836
4846
  return !1;
@@ -4848,7 +4858,7 @@ async function Qi(e, n) {
4848
4858
  )}</code></pre>`
4849
4859
  ), !0) : !1;
4850
4860
  }
4851
- function ea({
4861
+ function ta({
4852
4862
  event: e,
4853
4863
  editor: n,
4854
4864
  prioritizeMarkdownOverHTML: t,
@@ -4871,7 +4881,7 @@ function ea({
4871
4881
  if (!s)
4872
4882
  return !0;
4873
4883
  if (s === "vscode-editor-data")
4874
- return Qi(e, n.prosemirrorView), !0;
4884
+ return ea(e, n.prosemirrorView), !0;
4875
4885
  if (s === "Files")
4876
4886
  return eo(e, n), !0;
4877
4887
  const i = e.clipboardData.getData(s);
@@ -4881,12 +4891,12 @@ function ea({
4881
4891
  return n.pasteMarkdown(i), !0;
4882
4892
  if (t) {
4883
4893
  const c = e.clipboardData.getData("text/plain");
4884
- if (Zi(c))
4894
+ if (Qi(c))
4885
4895
  return n.pasteMarkdown(c), !0;
4886
4896
  }
4887
4897
  return s === "text/html" ? (n.pasteHTML(i), !0) : o ? (n.pasteMarkdown(i), !0) : (n.pasteText(i), !0);
4888
4898
  }
4889
- const ta = (e, n) => _.create({
4899
+ const na = (e, n) => _.create({
4890
4900
  name: "pasteFromClipboard",
4891
4901
  addProseMirrorPlugins() {
4892
4902
  return [
@@ -4901,7 +4911,7 @@ const ta = (e, n) => _.create({
4901
4911
  defaultPasteHandler: ({
4902
4912
  prioritizeMarkdownOverHTML: r = !0,
4903
4913
  plainTextAsMarkdown: s = !0
4904
- } = {}) => ea({
4914
+ } = {}) => ta({
4905
4915
  event: o,
4906
4916
  editor: e,
4907
4917
  prioritizeMarkdownOverHTML: r,
@@ -4921,14 +4931,14 @@ function to(e) {
4921
4931
  var r, s;
4922
4932
  const o = A(t);
4923
4933
  return t.type.name === "blockContainer" && ((r = t.firstChild) == null ? void 0 : r.type.name) === "blockGroup" ? !0 : t.type.name === "columnList" && t.childCount === 1 ? ((s = t.firstChild) == null || s.forEach((i) => {
4924
- n.push(E(i, o));
4925
- }), !1) : t.type.isInGroup("bnBlock") ? (n.push(E(t, o)), !1) : !0;
4934
+ n.push(S(i, o));
4935
+ }), !1) : t.type.isInGroup("bnBlock") ? (n.push(S(t, o)), !1) : !0;
4926
4936
  }), n;
4927
4937
  }
4928
- function na(e, n, t) {
4938
+ function oa(e, n, t) {
4929
4939
  var a;
4930
4940
  let o = !1;
4931
- const r = e.state.selection instanceof Se;
4941
+ const r = e.state.selection instanceof Be;
4932
4942
  if (!r) {
4933
4943
  const c = e.state.doc.slice(
4934
4944
  e.state.selection.from,
@@ -4978,7 +4988,7 @@ function no(e, n) {
4978
4988
  );
4979
4989
  const t = e.serializeForClipboard(
4980
4990
  e.state.selection.content()
4981
- ).dom.innerHTML, o = e.state.selection.content().content, r = na(
4991
+ ).dom.innerHTML, o = e.state.selection.content().content, r = oa(
4982
4992
  e,
4983
4993
  o,
4984
4994
  n
@@ -5003,7 +5013,7 @@ const Zt = () => {
5003
5013
  e
5004
5014
  );
5005
5015
  t.clipboardData.setData("blocknote/html", o), t.clipboardData.setData("text/html", r), t.clipboardData.setData("text/plain", s);
5006
- }, oa = (e) => _.create({
5016
+ }, ra = (e) => _.create({
5007
5017
  name: "copyToClipboard",
5008
5018
  addProseMirrorPlugins() {
5009
5019
  return [
@@ -5037,7 +5047,7 @@ const Zt = () => {
5037
5047
  })
5038
5048
  ];
5039
5049
  }
5040
- }), ra = _.create({
5050
+ }), sa = _.create({
5041
5051
  name: "blockBackgroundColor",
5042
5052
  addGlobalAttributes() {
5043
5053
  return [
@@ -5091,7 +5101,7 @@ class I extends Lt {
5091
5101
  get priority() {
5092
5102
  }
5093
5103
  }
5094
- class sa extends I {
5104
+ class ia extends I {
5095
5105
  constructor() {
5096
5106
  super();
5097
5107
  p(this, "beforeChangeCallbacks", []);
@@ -5205,7 +5215,7 @@ p(me, "defaultCursorRender", (t) => {
5205
5215
  `background-color: ${t.color}; color: ${me.isDarkColor(t.color) ? "white" : "black"}`
5206
5216
  ), 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;
5207
5217
  });
5208
- let $e = me;
5218
+ let Fe = me;
5209
5219
  class ht extends I {
5210
5220
  static key() {
5211
5221
  return "ySyncPlugin";
@@ -5272,7 +5282,7 @@ const oo = re.create({
5272
5282
  } : {};
5273
5283
  }
5274
5284
  });
5275
- class ia extends Lt {
5285
+ class aa extends Lt {
5276
5286
  constructor(t) {
5277
5287
  super();
5278
5288
  p(this, "userCache", /* @__PURE__ */ new Map());
@@ -5319,8 +5329,8 @@ class ia extends Lt {
5319
5329
  return this.on("update", t);
5320
5330
  }
5321
5331
  }
5322
- const Ne = new U("blocknote-comments"), aa = "SET_SELECTED_THREAD_ID";
5323
- function ca(e, n) {
5332
+ const He = new U("blocknote-comments"), ca = "SET_SELECTED_THREAD_ID";
5333
+ function la(e, n) {
5324
5334
  const t = /* @__PURE__ */ new Map();
5325
5335
  return e.descendants((o, r) => {
5326
5336
  o.marks.forEach((s) => {
@@ -5340,7 +5350,7 @@ function ca(e, n) {
5340
5350
  });
5341
5351
  }), t;
5342
5352
  }
5343
- class la extends I {
5353
+ class da extends I {
5344
5354
  constructor(t, o, r) {
5345
5355
  super();
5346
5356
  p(this, "userStore");
@@ -5388,7 +5398,7 @@ class la extends I {
5388
5398
  });
5389
5399
  if (this.editor = t, this.threadStore = o, this.markType = r, !t.resolveUsers)
5390
5400
  throw new Error("resolveUsers is required for comments");
5391
- this.userStore = new ia(t.resolveUsers), this.threadStore.subscribe(this.updateMarksFromThreads), t.onCreate(() => {
5401
+ this.userStore = new aa(t.resolveUsers), this.threadStore.subscribe(this.updateMarksFromThreads), t.onCreate(() => {
5392
5402
  this.updateMarksFromThreads(this.threadStore.getThreads()), t.onSelectionChange(() => {
5393
5403
  this.pendingComment && (this.pendingComment = !1, this.emitStateUpdate());
5394
5404
  });
@@ -5396,7 +5406,7 @@ class la extends I {
5396
5406
  const s = this;
5397
5407
  this.addProsemirrorPlugin(
5398
5408
  new L({
5399
- key: Ne,
5409
+ key: He,
5400
5410
  state: {
5401
5411
  init() {
5402
5412
  return {
@@ -5404,10 +5414,10 @@ class la extends I {
5404
5414
  };
5405
5415
  },
5406
5416
  apply(i, a) {
5407
- const c = i.getMeta(Ne);
5417
+ const c = i.getMeta(He);
5408
5418
  if (!i.docChanged && !c)
5409
5419
  return a;
5410
- const l = i.docChanged ? ca(i.doc, s.markType) : s.threadPositions;
5420
+ const l = i.docChanged ? la(i.doc, s.markType) : s.threadPositions;
5411
5421
  (l.size > 0 || s.threadPositions.size > 0) && (s.threadPositions = l, s.emitStateUpdate());
5412
5422
  const d = [];
5413
5423
  if (s.selectedThreadId) {
@@ -5432,7 +5442,7 @@ class la extends I {
5432
5442
  props: {
5433
5443
  decorations(i) {
5434
5444
  var a;
5435
- return ((a = Ne.getState(i)) == null ? void 0 : a.decorations) ?? G.empty;
5445
+ return ((a = He.getState(i)) == null ? void 0 : a.decorations) ?? G.empty;
5436
5446
  },
5437
5447
  /**
5438
5448
  * Handle click on a thread mark and mark it as selected
@@ -5476,8 +5486,8 @@ class la extends I {
5476
5486
  selectThread(t, o = !0) {
5477
5487
  var r, s;
5478
5488
  if (this.selectedThreadId !== t && (this.selectedThreadId = t, this.emitStateUpdate(), this.editor.transact(
5479
- (i) => i.setMeta(Ne, {
5480
- name: aa
5489
+ (i) => i.setMeta(He, {
5490
+ name: ca
5481
5491
  })
5482
5492
  ), t && o)) {
5483
5493
  const i = this.threadPositions.get(t);
@@ -5526,7 +5536,7 @@ class la extends I {
5526
5536
  });
5527
5537
  }
5528
5538
  }
5529
- class da {
5539
+ class ua {
5530
5540
  constructor(n, t, o, r) {
5531
5541
  p(this, "state");
5532
5542
  p(this, "emitUpdate");
@@ -5586,7 +5596,7 @@ class da {
5586
5596
  const nt = new U(
5587
5597
  "FilePanelPlugin"
5588
5598
  );
5589
- class ua extends I {
5599
+ class pa extends I {
5590
5600
  constructor(t) {
5591
5601
  super();
5592
5602
  p(this, "view");
@@ -5597,7 +5607,7 @@ class ua extends I {
5597
5607
  this.addProsemirrorPlugin(
5598
5608
  new L({
5599
5609
  key: nt,
5600
- view: (o) => (this.view = new da(
5610
+ view: (o) => (this.view = new ua(
5601
5611
  t,
5602
5612
  nt,
5603
5613
  o,
@@ -5634,7 +5644,7 @@ class ua extends I {
5634
5644
  return this.on("update", t);
5635
5645
  }
5636
5646
  }
5637
- class pa {
5647
+ class ha {
5638
5648
  constructor(n, t, o) {
5639
5649
  p(this, "state");
5640
5650
  p(this, "emitUpdate");
@@ -5727,21 +5737,21 @@ class pa {
5727
5737
  if (i)
5728
5738
  return i.getBoundingClientRect();
5729
5739
  }
5730
- return _e(this.pmView, r, s);
5740
+ return Ue(this.pmView, r, s);
5731
5741
  }
5732
5742
  }
5733
- const ha = new U(
5743
+ const fa = new U(
5734
5744
  "FormattingToolbarPlugin"
5735
5745
  );
5736
- class fa extends I {
5746
+ class ma extends I {
5737
5747
  constructor(t) {
5738
5748
  super();
5739
5749
  p(this, "view");
5740
5750
  p(this, "closeMenu", () => this.view.closeMenu());
5741
5751
  this.addProsemirrorPlugin(
5742
5752
  new L({
5743
- key: ha,
5744
- view: (o) => (this.view = new pa(t, o, (r) => {
5753
+ key: fa,
5754
+ view: (o) => (this.view = new ha(t, o, (r) => {
5745
5755
  this.emit("update", r);
5746
5756
  }), this.view),
5747
5757
  props: {
@@ -5761,7 +5771,7 @@ class fa extends I {
5761
5771
  return this.on("update", t);
5762
5772
  }
5763
5773
  }
5764
- const ma = oe.create({
5774
+ const ga = oe.create({
5765
5775
  name: "hardBreak",
5766
5776
  inline: !0,
5767
5777
  group: "inline",
@@ -5786,24 +5796,24 @@ const ma = oe.create({
5786
5796
  t.index(t.depth - 1),
5787
5797
  t.depth - 1
5788
5798
  );
5789
- return Te(
5799
+ return Me(
5790
5800
  e.resolve(o)
5791
5801
  );
5792
- }, Ve = (e, n) => {
5802
+ }, _e = (e, n) => {
5793
5803
  const t = e.resolve(n), o = t.index();
5794
5804
  if (o === 0)
5795
5805
  return;
5796
5806
  const r = t.posAtIndex(o - 1);
5797
- return Te(
5807
+ return Me(
5798
5808
  e.resolve(r)
5799
5809
  );
5800
5810
  }, ro = (e, n) => {
5801
5811
  for (; n.childContainer; ) {
5802
5812
  const t = n.childContainer.node, o = e.resolve(n.childContainer.beforePos + 1).posAtIndex(t.childCount - 1);
5803
- n = Te(e.resolve(o));
5813
+ n = Me(e.resolve(o));
5804
5814
  }
5805
5815
  return n;
5806
- }, ga = (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*", ba = (e, n, t, o) => {
5816
+ }, ba = (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*", ka = (e, n, t, o) => {
5807
5817
  if (!o.isBlockContainer)
5808
5818
  throw new Error(
5809
5819
  `Attempted to merge block at position ${o.bnBlock.beforePos} into previous block at position ${t.bnBlock.beforePos}, but next block is not a block container`
@@ -5836,7 +5846,7 @@ const ma = oe.create({
5836
5846
  state: n,
5837
5847
  dispatch: t
5838
5848
  }) => {
5839
- const o = n.doc.resolve(e), r = Te(o), s = Ve(
5849
+ const o = n.doc.resolve(e), r = Me(o), s = _e(
5840
5850
  n.doc,
5841
5851
  r.bnBlock.beforePos
5842
5852
  );
@@ -5846,8 +5856,8 @@ const ma = oe.create({
5846
5856
  n.doc,
5847
5857
  s
5848
5858
  );
5849
- return ga(i, r) ? ba(n, t, i, r) : !1;
5850
- }, ka = _.create({
5859
+ return ba(i, r) ? ka(n, t, i, r) : !1;
5860
+ }, wa = _.create({
5851
5861
  priority: 50,
5852
5862
  // TODO: The shortcuts need a refactor. Do we want to use a command priority
5853
5863
  // design as there is now, or clump the logic into a single function?
@@ -5889,7 +5899,7 @@ const ma = oe.create({
5889
5899
  }),
5890
5900
  () => r.command(({ state: s, dispatch: i }) => {
5891
5901
  const a = C(s);
5892
- if (!a.isBlockContainer || !(s.selection.from === a.blockContent.beforePos + 1) || Ve(
5902
+ if (!a.isBlockContainer || !(s.selection.from === a.blockContent.beforePos + 1) || _e(
5893
5903
  s.doc,
5894
5904
  a.bnBlock.beforePos
5895
5905
  ))
@@ -5993,7 +6003,7 @@ const ma = oe.create({
5993
6003
  if (!i.isBlockContainer)
5994
6004
  return !1;
5995
6005
  if (i.blockContent.node.childCount === 0 && i.blockContent.node.type.spec.content === "inline*") {
5996
- const c = Ve(
6006
+ const c = _e(
5997
6007
  s.doc,
5998
6008
  i.bnBlock.beforePos
5999
6009
  );
@@ -6028,7 +6038,7 @@ const ma = oe.create({
6028
6038
  const i = C(s);
6029
6039
  if (!i.isBlockContainer)
6030
6040
  throw new Error("todo");
6031
- const a = s.selection.from === i.blockContent.beforePos + 1, c = s.selection.empty, l = Ve(
6041
+ const a = s.selection.from === i.blockContent.beforePos + 1, c = s.selection.empty, l = _e(
6032
6042
  s.doc,
6033
6043
  i.bnBlock.beforePos
6034
6044
  );
@@ -6168,7 +6178,7 @@ const ma = oe.create({
6168
6178
  };
6169
6179
  }
6170
6180
  });
6171
- class wa {
6181
+ class ya {
6172
6182
  constructor(n, t, o) {
6173
6183
  p(this, "state");
6174
6184
  p(this, "emitUpdate");
@@ -6202,7 +6212,7 @@ class wa {
6202
6212
  });
6203
6213
  p(this, "scrollHandler", () => {
6204
6214
  var n;
6205
- this.linkMark !== void 0 && (n = this.state) != null && n.show && (this.state.referencePos = _e(
6215
+ this.linkMark !== void 0 && (n = this.state) != null && n.show && (this.state.referencePos = Ue(
6206
6216
  this.pmView,
6207
6217
  this.linkMarkRange.from,
6208
6218
  this.linkMarkRange.to
@@ -6268,7 +6278,7 @@ class wa {
6268
6278
  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) {
6269
6279
  this.state = {
6270
6280
  show: !0,
6271
- referencePos: _e(
6281
+ referencePos: Ue(
6272
6282
  this.pmView,
6273
6283
  this.linkMarkRange.from,
6274
6284
  this.linkMarkRange.to
@@ -6294,8 +6304,8 @@ class wa {
6294
6304
  );
6295
6305
  }
6296
6306
  }
6297
- const ya = new U("LinkToolbarPlugin");
6298
- class Ca extends I {
6307
+ const Ca = new U("LinkToolbarPlugin");
6308
+ class va extends I {
6299
6309
  constructor(t) {
6300
6310
  super();
6301
6311
  p(this, "view");
@@ -6334,8 +6344,8 @@ class Ca extends I {
6334
6344
  p(this, "closeMenu", () => this.view.closeMenu());
6335
6345
  this.addProsemirrorPlugin(
6336
6346
  new L({
6337
- key: ya,
6338
- view: (o) => (this.view = new wa(t, o, (r) => {
6347
+ key: Ca,
6348
+ view: (o) => (this.view = new ya(t, o, (r) => {
6339
6349
  this.emit("update", r);
6340
6350
  }), this.view),
6341
6351
  props: {
@@ -6355,7 +6365,7 @@ class Ca extends I {
6355
6365
  return ((o = (t = this.view) == null ? void 0 : t.state) == null ? void 0 : o.show) || !1;
6356
6366
  }
6357
6367
  }
6358
- const va = [
6368
+ const Ea = [
6359
6369
  "http",
6360
6370
  "https",
6361
6371
  "ftp",
@@ -6366,15 +6376,15 @@ const va = [
6366
6376
  "sms",
6367
6377
  "cid",
6368
6378
  "xmpp"
6369
- ], Ea = "https", Sa = new U("node-selection-keyboard");
6370
- class Ba extends I {
6379
+ ], Sa = "https", Ba = new U("node-selection-keyboard");
6380
+ class xa extends I {
6371
6381
  static key() {
6372
6382
  return "nodeSelectionKeyboard";
6373
6383
  }
6374
6384
  constructor() {
6375
6385
  super(), this.addProsemirrorPlugin(
6376
6386
  new L({
6377
- key: Sa,
6387
+ key: Ba,
6378
6388
  props: {
6379
6389
  handleKeyDown: (n, t) => {
6380
6390
  if ("node" in n.state.selection) {
@@ -6403,15 +6413,15 @@ class Ba extends I {
6403
6413
  );
6404
6414
  }
6405
6415
  }
6406
- const xa = new U("blocknote-placeholder");
6407
- class Ta extends I {
6416
+ const Ta = new U("blocknote-placeholder");
6417
+ class Ma extends I {
6408
6418
  static key() {
6409
6419
  return "placeholder";
6410
6420
  }
6411
6421
  constructor(n, t) {
6412
6422
  super(), this.addProsemirrorPlugin(
6413
6423
  new L({
6414
- key: xa,
6424
+ key: Ta,
6415
6425
  view: (o) => {
6416
6426
  var l, d;
6417
6427
  const r = `placeholder-selector-${hn()}`;
@@ -6483,7 +6493,7 @@ class Ta extends I {
6483
6493
  );
6484
6494
  }
6485
6495
  }
6486
- const nn = new U("previous-blocks"), Ma = {
6496
+ const nn = new U("previous-blocks"), Pa = {
6487
6497
  // Numbered List Items
6488
6498
  index: "index",
6489
6499
  // Headings
@@ -6493,7 +6503,7 @@ const nn = new U("previous-blocks"), Ma = {
6493
6503
  depth: "depth",
6494
6504
  "depth-change": "depth-change"
6495
6505
  };
6496
- class Pa extends I {
6506
+ class Ia extends I {
6497
6507
  static key() {
6498
6508
  return "previousBlockType";
6499
6509
  }
@@ -6573,7 +6583,7 @@ class Pa extends I {
6573
6583
  return;
6574
6584
  const a = o.currentTransactionOldBlockAttrs[s.attrs.id], c = {};
6575
6585
  for (const [d, u] of Object.entries(a))
6576
- c["data-prev-" + Ma[d]] = u || "none";
6586
+ c["data-prev-" + Pa[d]] = u || "none";
6577
6587
  const l = X.node(i, i + s.nodeSize, {
6578
6588
  ...c
6579
6589
  });
@@ -6586,7 +6596,7 @@ class Pa extends I {
6586
6596
  }
6587
6597
  }
6588
6598
  const on = new U("blocknote-show-selection");
6589
- class Ia extends I {
6599
+ class La extends I {
6590
6600
  constructor(t) {
6591
6601
  super();
6592
6602
  p(this, "enabled", !1);
@@ -6624,7 +6634,7 @@ function so(e, n) {
6624
6634
  if (((o = e.getAttribute) == null ? void 0 : o.call(e, "data-node-type")) === "blockContainer")
6625
6635
  return { node: e, id: e.getAttribute("data-id") };
6626
6636
  }
6627
- class ce extends Re {
6637
+ class ce extends Ve {
6628
6638
  constructor(t, o) {
6629
6639
  super(t, o);
6630
6640
  p(this, "nodes");
@@ -6650,7 +6660,7 @@ class ce extends Re {
6650
6660
  }
6651
6661
  map(t, o) {
6652
6662
  const r = o.mapResult(this.from), s = o.mapResult(this.to);
6653
- return s.deleted ? Re.near(t.resolve(r.pos)) : r.deleted ? Re.near(t.resolve(s.pos)) : new ce(
6663
+ return s.deleted ? Ve.near(t.resolve(r.pos)) : r.deleted ? Ve.near(t.resolve(s.pos)) : new ce(
6654
6664
  t.resolve(r.pos),
6655
6665
  t.resolve(s.pos)
6656
6666
  );
@@ -6659,9 +6669,9 @@ class ce extends Re {
6659
6669
  return { type: "multiple-node", anchor: this.anchor, head: this.head };
6660
6670
  }
6661
6671
  }
6662
- Re.jsonID("multiple-node", ce);
6672
+ Ve.jsonID("multiple-node", ce);
6663
6673
  let j;
6664
- function La(e, n) {
6674
+ function Aa(e, n) {
6665
6675
  let t, o;
6666
6676
  const r = n.resolve(e.from).node().type.spec.group === "blockContent", s = n.resolve(e.to).node().type.spec.group === "blockContent", i = Math.min(e.$anchor.depth, e.$head.depth);
6667
6677
  if (r && s) {
@@ -6698,7 +6708,7 @@ function rn(e, n, t = n) {
6698
6708
  function io(e) {
6699
6709
  j !== void 0 && (e instanceof ShadowRoot ? e.removeChild(j) : e.body.removeChild(j), j = void 0);
6700
6710
  }
6701
- function Aa(e, n, t) {
6711
+ function Na(e, n, t) {
6702
6712
  if (!e.dataTransfer)
6703
6713
  return;
6704
6714
  const o = t.prosemirrorView;
@@ -6709,7 +6719,7 @@ function Aa(e, n, t) {
6709
6719
  throw new Error(`Block with ID ${n.id} not found`);
6710
6720
  const s = r.posBeforeNode;
6711
6721
  if (s != null) {
6712
- const i = o.state.selection, a = o.state.doc, { from: c, to: l } = La(i, a), d = c <= s && s < l, u = i.$anchor.node() !== i.$head.node() || i instanceof ce;
6722
+ const i = o.state.selection, a = o.state.doc, { from: c, to: l } = Aa(i, a), d = c <= s && s < l, u = i.$anchor.node() !== i.$head.node() || i instanceof ce;
6713
6723
  d && u ? (o.dispatch(
6714
6724
  o.state.tr.setSelection(ce.create(a, c, l))
6715
6725
  ), rn(o, c, l)) : (o.dispatch(
@@ -6735,7 +6745,7 @@ function mt(e, n, t = !0) {
6735
6745
  !1
6736
6746
  ) : so(r, e);
6737
6747
  }
6738
- function Na(e, n) {
6748
+ function Ha(e, n) {
6739
6749
  if (!n.dom.firstChild)
6740
6750
  return;
6741
6751
  const t = n.dom.firstChild.getBoundingClientRect(), o = {
@@ -6758,7 +6768,7 @@ function Na(e, n) {
6758
6768
  !1
6759
6769
  );
6760
6770
  }
6761
- class Ha {
6771
+ class Da {
6762
6772
  constructor(n, t, o) {
6763
6773
  p(this, "state");
6764
6774
  p(this, "emitUpdate");
@@ -6781,7 +6791,7 @@ class Ha {
6781
6791
  (r = this.state) != null && r.show && (this.state.show = !1, this.updateState(this.state));
6782
6792
  return;
6783
6793
  }
6784
- const t = Na(this.mousePos, this.pmView);
6794
+ const t = Ha(this.mousePos, this.pmView);
6785
6795
  if (!t || !this.editor.isEditable) {
6786
6796
  (s = this.state) != null && s.show && (this.state.show = !1, this.updateState(this.state));
6787
6797
  return;
@@ -6837,7 +6847,7 @@ class Ha {
6837
6847
  return;
6838
6848
  const o = document.createElement("div");
6839
6849
  o.innerHTML = t;
6840
- const s = We.fromSchema(this.pmView.state.schema).parse(o, {
6850
+ const s = Se.fromSchema(this.pmView.state.schema).parse(o, {
6841
6851
  topNode: this.pmView.state.schema.nodes.blockGroup.create()
6842
6852
  });
6843
6853
  this.pmView.dragging = {
@@ -6936,24 +6946,24 @@ class Ha {
6936
6946
  return;
6937
6947
  }
6938
6948
  const { isDropPoint: o, isDropWithinEditorBounds: r, isDragOrigin: s } = t;
6939
- if (r || this.dispatchSyntheticEvent(n), !(o && s)) {
6940
- if (o) {
6941
- this.pmView.dispatch(
6942
- this.pmView.state.tr.setSelection(
6943
- O.create(
6944
- this.pmView.state.tr.doc,
6945
- this.pmView.state.tr.selection.anchor
6946
- )
6947
- )
6948
- );
6949
+ if (!r && o && this.dispatchSyntheticEvent(n), o) {
6950
+ if (this.pmView.dragging)
6949
6951
  return;
6950
- } else if (s) {
6951
- setTimeout(
6952
- () => this.pmView.dispatch(this.pmView.state.tr.deleteSelection()),
6953
- 0
6954
- );
6955
- return;
6956
- }
6952
+ this.pmView.dispatch(
6953
+ this.pmView.state.tr.setSelection(
6954
+ O.create(
6955
+ this.pmView.state.tr.doc,
6956
+ this.pmView.state.tr.selection.anchor
6957
+ )
6958
+ )
6959
+ );
6960
+ return;
6961
+ } else if (s) {
6962
+ setTimeout(
6963
+ () => this.pmView.dispatch(this.pmView.state.tr.deleteSelection()),
6964
+ 0
6965
+ );
6966
+ return;
6957
6967
  }
6958
6968
  });
6959
6969
  p(this, "onDragEnd", (n) => {
@@ -7060,8 +7070,8 @@ class Ha {
7060
7070
  ), this.pmView.root.removeEventListener("scroll", this.onScroll, !0);
7061
7071
  }
7062
7072
  }
7063
- const Da = new U("SideMenuPlugin");
7064
- class Oa extends I {
7073
+ const Oa = new U("SideMenuPlugin");
7074
+ class Ra extends I {
7065
7075
  constructor(t) {
7066
7076
  super();
7067
7077
  p(this, "view");
@@ -7069,7 +7079,7 @@ class Oa extends I {
7069
7079
  * Handles drag & drop events for blocks.
7070
7080
  */
7071
7081
  p(this, "blockDragStart", (t, o) => {
7072
- this.view && (this.view.isDragOrigin = !0), Aa(t, o, this.editor);
7082
+ this.view && (this.view.isDragOrigin = !0), Na(t, o, this.editor);
7073
7083
  });
7074
7084
  /**
7075
7085
  * Handles drag & drop events for blocks.
@@ -7095,8 +7105,8 @@ class Oa extends I {
7095
7105
  });
7096
7106
  this.editor = t, this.addProsemirrorPlugin(
7097
7107
  new L({
7098
- key: Da,
7099
- view: (o) => (this.view = new Ha(t, o, (r) => {
7108
+ key: Oa,
7109
+ view: (o) => (this.view = new Da(t, o, (r) => {
7100
7110
  this.emit("update", r);
7101
7111
  }), this.view)
7102
7112
  })
@@ -7109,23 +7119,23 @@ class Oa extends I {
7109
7119
  return this.on("update", t);
7110
7120
  }
7111
7121
  }
7112
- const He = /* @__PURE__ */ new Map();
7113
- function Ra(e) {
7114
- if (He.has(e))
7115
- return He.get(e);
7122
+ const De = /* @__PURE__ */ new Map();
7123
+ function Va(e) {
7124
+ if (De.has(e))
7125
+ return De.get(e);
7116
7126
  const n = new po();
7117
7127
  return e._tiptapEditor.on("transaction", ({ transaction: t }) => {
7118
7128
  n.appendMapping(t.mapping);
7119
7129
  }), e._tiptapEditor.on("destroy", () => {
7120
- He.delete(e);
7121
- }), He.set(e, n), n;
7130
+ De.delete(e);
7131
+ }), De.set(e, n), n;
7122
7132
  }
7123
- function Va(e, n, t = "left") {
7133
+ function _a(e, n, t = "left") {
7124
7134
  const o = de.getState(
7125
7135
  e._tiptapEditor.state
7126
7136
  );
7127
7137
  if (!o) {
7128
- const s = Ra(e), i = s.maps.length;
7138
+ const s = Va(e), i = s.maps.length;
7129
7139
  return () => s.slice(i).map(n, t === "left" ? -1 : 1);
7130
7140
  }
7131
7141
  const r = Zo(
@@ -7148,8 +7158,8 @@ function Va(e, n, t = "left") {
7148
7158
  return i + (t === "right" ? -1 : 0);
7149
7159
  };
7150
7160
  }
7151
- const _a = ko((e) => e.type.name === "blockContainer");
7152
- class Ua {
7161
+ const Ua = ko((e) => e.type.name === "blockContainer");
7162
+ class $a {
7153
7163
  constructor(n, t) {
7154
7164
  p(this, "state");
7155
7165
  p(this, "emitUpdate");
@@ -7212,7 +7222,7 @@ class Ua {
7212
7222
  }
7213
7223
  }
7214
7224
  const ge = new U("SuggestionMenuPlugin");
7215
- class $a extends I {
7225
+ class Fa extends I {
7216
7226
  constructor(t) {
7217
7227
  super();
7218
7228
  p(this, "view");
@@ -7232,7 +7242,7 @@ class $a extends I {
7232
7242
  this.addProsemirrorPlugin(
7233
7243
  new L({
7234
7244
  key: ge,
7235
- view: () => (this.view = new Ua(
7245
+ view: () => (this.view = new $a(
7236
7246
  t,
7237
7247
  (r, s) => {
7238
7248
  this.emit(`update ${r}`, s);
@@ -7249,7 +7259,7 @@ class $a extends I {
7249
7259
  const c = r.getMeta(ge);
7250
7260
  if (typeof c == "object" && c !== null) {
7251
7261
  s && this.closeMenu();
7252
- const d = Va(
7262
+ const d = _a(
7253
7263
  t,
7254
7264
  a.selection.from - // Need to account for the trigger char that was inserted, so we offset the position by the length of the trigger character.
7255
7265
  c.triggerCharacter.length
@@ -7307,7 +7317,7 @@ class $a extends I {
7307
7317
  if (s === void 0)
7308
7318
  return null;
7309
7319
  if (!s.deleteTriggerCharacter) {
7310
- const i = _a(r.selection);
7320
+ const i = Ua(r.selection);
7311
7321
  if (i)
7312
7322
  return G.create(r.doc, [
7313
7323
  X.node(
@@ -7351,7 +7361,7 @@ class $a extends I {
7351
7361
  function nl(e, n) {
7352
7362
  e.suggestionMenus.addTriggerCharacter(n);
7353
7363
  }
7354
- const Fa = re.create({
7364
+ const za = re.create({
7355
7365
  name: "insertion",
7356
7366
  inclusive: !1,
7357
7367
  excludes: "deletion modification insertion",
@@ -7389,7 +7399,7 @@ const Fa = re.create({
7389
7399
  ]
7390
7400
  };
7391
7401
  }
7392
- }), za = re.create({
7402
+ }), Wa = re.create({
7393
7403
  name: "deletion",
7394
7404
  inclusive: !1,
7395
7405
  excludes: "insertion modification deletion",
@@ -7430,7 +7440,7 @@ const Fa = re.create({
7430
7440
  ]
7431
7441
  };
7432
7442
  }
7433
- }), Wa = re.create({
7443
+ }), ja = re.create({
7434
7444
  name: "modification",
7435
7445
  inclusive: !1,
7436
7446
  excludes: "deletion insertion",
@@ -7498,13 +7508,13 @@ let V;
7498
7508
  function an(e) {
7499
7509
  V || (V = document.createElement("div"), V.innerHTML = "_", V.style.opacity = "0", V.style.height = "1px", V.style.width = "1px", e instanceof Document ? e.body.appendChild(V) : e.appendChild(V));
7500
7510
  }
7501
- function ja(e) {
7511
+ function Ga(e) {
7502
7512
  V && (e instanceof Document ? e.body.removeChild(V) : e.removeChild(V), V = void 0);
7503
7513
  }
7504
- function De(e) {
7514
+ function Oe(e) {
7505
7515
  return Array.prototype.indexOf.call(e.parentElement.childNodes, e);
7506
7516
  }
7507
- function Ga(e) {
7517
+ function qa(e) {
7508
7518
  let n = e;
7509
7519
  for (; n && n.nodeName !== "TD" && n.nodeName !== "TH" && !n.classList.contains("tableWrapper"); ) {
7510
7520
  if (n.classList.contains("ProseMirror"))
@@ -7524,12 +7534,12 @@ function Ga(e) {
7524
7534
  tbodyNode: n.querySelector("tbody")
7525
7535
  };
7526
7536
  }
7527
- function qa(e, n) {
7537
+ function Ka(e, n) {
7528
7538
  const t = n.querySelectorAll(e);
7529
7539
  for (let o = 0; o < t.length; o++)
7530
7540
  t[o].style.visibility = "hidden";
7531
7541
  }
7532
- class Ka {
7542
+ class Ya {
7533
7543
  constructor(n, t, o) {
7534
7544
  p(this, "state");
7535
7545
  p(this, "emitUpdate");
@@ -7549,7 +7559,7 @@ class Ka {
7549
7559
  var l, d, u, h, f, m, g;
7550
7560
  if (this.menuFrozen || this.mouseState === "selecting" || !(n.target instanceof Element) || !this.pmView.dom.contains(n.target))
7551
7561
  return;
7552
- const t = Ga(n.target);
7562
+ const t = qa(n.target);
7553
7563
  if ((t == null ? void 0 : t.type) === "cell" && this.mouseState === "down" && !((l = this.state) != null && l.draggingState)) {
7554
7564
  this.mouseState = "selecting", (d = this.state) != null && d.show && (this.state.show = !1, this.state.showAddOrRemoveRowsButton = !1, this.state.showAddOrRemoveColumnsButton = !1, this.emitUpdate());
7555
7565
  return;
@@ -7570,14 +7580,14 @@ class Ka {
7570
7580
  );
7571
7581
  if (!i)
7572
7582
  throw new Error(`Block with ID ${r.id} not found`);
7573
- const a = E(
7583
+ const a = S(
7574
7584
  i.node,
7575
7585
  this.editor.pmSchema,
7576
7586
  this.editor.schema.blockSchema,
7577
7587
  this.editor.schema.inlineContentSchema,
7578
7588
  this.editor.schema.styleSchema
7579
7589
  );
7580
- if (ei("table", a, this.editor) && (this.tablePos = i.posBeforeNode + 1, s = a), !s)
7590
+ if (ti("table", a, this.editor) && (this.tablePos = i.posBeforeNode + 1, s = a), !s)
7581
7591
  return;
7582
7592
  this.tableId = r.id;
7583
7593
  const c = (h = t.domNode.closest(".tableWrapper")) == null ? void 0 : h.querySelector(".table-widgets-container");
@@ -7597,7 +7607,7 @@ class Ka {
7597
7607
  referencePosCell: w || (g = this.state) == null ? void 0 : g.referencePosCell
7598
7608
  };
7599
7609
  } else {
7600
- const b = De(t.domNode), k = De(t.domNode.parentElement), w = t.domNode.getBoundingClientRect();
7610
+ const b = Oe(t.domNode), k = Oe(t.domNode.parentElement), w = t.domNode.getBoundingClientRect();
7601
7611
  if (this.state !== void 0 && this.state.show && this.tableId === r.id && this.state.rowIndex === k && this.state.colIndex === b)
7602
7612
  return;
7603
7613
  this.state = {
@@ -7619,7 +7629,7 @@ class Ka {
7619
7629
  var h;
7620
7630
  if (((h = this.state) == null ? void 0 : h.draggingState) === void 0)
7621
7631
  return;
7622
- n.preventDefault(), n.dataTransfer.dropEffect = "move", qa(
7632
+ n.preventDefault(), n.dataTransfer.dropEffect = "move", Ka(
7623
7633
  ".prosemirror-dropcursor-block, .prosemirror-dropcursor-inline",
7624
7634
  this.pmView.root
7625
7635
  );
@@ -7639,7 +7649,7 @@ class Ka {
7639
7649
  return;
7640
7650
  const r = o[0];
7641
7651
  let s = !1;
7642
- const i = De(r.parentElement), a = De(r), c = this.state.draggingState.draggedCellOrientation === "row" ? this.state.rowIndex : this.state.colIndex, d = (this.state.draggingState.draggedCellOrientation === "row" ? i : a) !== c;
7652
+ const i = Oe(r.parentElement), a = Oe(r), c = this.state.draggingState.draggedCellOrientation === "row" ? this.state.rowIndex : this.state.colIndex, d = (this.state.draggingState.draggedCellOrientation === "row" ? i : a) !== c;
7643
7653
  (this.state.rowIndex !== i || this.state.colIndex !== a) && (this.state.rowIndex = i, this.state.colIndex = a, this.state.referencePosCell = r.getBoundingClientRect(), s = !0);
7644
7654
  const u = this.state.draggingState.draggedCellOrientation === "row" ? t.top : t.left;
7645
7655
  this.state.draggingState.mousePos !== u && (this.state.draggingState.mousePos = u, s = !0), s && this.emitUpdate(), d && this.editor.transact((f) => f.setMeta(ye, !0));
@@ -7660,7 +7670,7 @@ class Ka {
7660
7670
  r
7661
7671
  ))
7662
7672
  return !1;
7663
- const i = Er(
7673
+ const i = Sr(
7664
7674
  this.state.block,
7665
7675
  t.originalIndex,
7666
7676
  r
@@ -7679,7 +7689,7 @@ class Ka {
7679
7689
  o
7680
7690
  ))
7681
7691
  return !1;
7682
- const i = vr(
7692
+ const i = Er(
7683
7693
  this.state.block,
7684
7694
  t.originalIndex,
7685
7695
  o
@@ -7744,7 +7754,7 @@ class Ka {
7744
7754
  }
7745
7755
  }
7746
7756
  const ye = new U("TableHandlesPlugin");
7747
- class Ya extends I {
7757
+ class Ja extends I {
7748
7758
  constructor(t) {
7749
7759
  super();
7750
7760
  p(this, "view");
@@ -7807,7 +7817,7 @@ class Ya extends I {
7807
7817
  );
7808
7818
  if (this.view.state.draggingState = void 0, this.view.emitUpdate(), this.editor.transact((t) => t.setMeta(ye, null)), !this.editor.prosemirrorView)
7809
7819
  throw new Error("Editor view not initialized.");
7810
- ja(this.editor.prosemirrorView.root);
7820
+ Ga(this.editor.prosemirrorView.root);
7811
7821
  });
7812
7822
  /**
7813
7823
  * Freezes the drag handles. When frozen, they will stay attached to the same
@@ -7848,7 +7858,7 @@ class Ya extends I {
7848
7858
  l.posAtIndex(r.col)
7849
7859
  ), u = t.tr;
7850
7860
  return u.setSelection(
7851
- new Se(c, d)
7861
+ new Be(c, d)
7852
7862
  ), t.apply(u);
7853
7863
  });
7854
7864
  /**
@@ -7946,14 +7956,14 @@ class Ya extends I {
7946
7956
  return;
7947
7957
  const s = this.getCellSelection();
7948
7958
  if (s)
7949
- return xr(s.from, s.to, t) ? "vertical" : "horizontal";
7959
+ return Tr(s.from, s.to, t) ? "vertical" : "horizontal";
7950
7960
  }));
7951
- p(this, "cropEmptyRowsOrColumns", (t, o) => Sr(t, o));
7952
- p(this, "addRowsOrColumns", (t, o, r) => Br(t, o, r));
7961
+ p(this, "cropEmptyRowsOrColumns", (t, o) => Br(t, o));
7962
+ p(this, "addRowsOrColumns", (t, o, r) => xr(t, o, r));
7953
7963
  this.editor = t, this.addProsemirrorPlugin(
7954
7964
  new L({
7955
7965
  key: ye,
7956
- view: (o) => (this.view = new Ka(t, o, (r) => {
7966
+ view: (o) => (this.view = new Ya(t, o, (r) => {
7957
7967
  this.emit("update", r);
7958
7968
  }), this.view),
7959
7969
  // We use decorations to render the drop cursor when dragging a table row
@@ -8014,7 +8024,7 @@ class Ya extends I {
8014
8024
  return this.on("update", t);
8015
8025
  }
8016
8026
  }
8017
- const Ja = _.create({
8027
+ const Xa = _.create({
8018
8028
  name: "textAlignment",
8019
8029
  addGlobalAttributes() {
8020
8030
  return [
@@ -8042,7 +8052,7 @@ const Ja = _.create({
8042
8052
  }
8043
8053
  ];
8044
8054
  }
8045
- }), Xa = _.create({
8055
+ }), Za = _.create({
8046
8056
  name: "blockTextColor",
8047
8057
  addGlobalAttributes() {
8048
8058
  return [
@@ -8060,7 +8070,7 @@ const Ja = _.create({
8060
8070
  }
8061
8071
  ];
8062
8072
  }
8063
- }), Za = _.create({
8073
+ }), Qa = _.create({
8064
8074
  name: "trailingNode",
8065
8075
  addProseMirrorPlugins() {
8066
8076
  const e = new U(this.name);
@@ -8095,13 +8105,13 @@ const Ja = _.create({
8095
8105
  })
8096
8106
  ];
8097
8107
  }
8098
- }), Qa = {
8108
+ }), ec = {
8099
8109
  blockColor: "data-block-color",
8100
8110
  blockStyle: "data-block-style",
8101
8111
  id: "data-id",
8102
8112
  depth: "data-depth",
8103
8113
  depthChange: "data-depth-change"
8104
- }, ec = oe.create({
8114
+ }, tc = oe.create({
8105
8115
  name: "blockContainer",
8106
8116
  group: "blockGroupChild bnBlock",
8107
8117
  // A block always contains content, and optionally a blockGroup which contains nested blocks
@@ -8118,7 +8128,7 @@ const Ja = _.create({
8118
8128
  if (typeof e == "string")
8119
8129
  return !1;
8120
8130
  const n = {};
8121
- for (const [t, o] of Object.entries(Qa))
8131
+ for (const [t, o] of Object.entries(ec))
8122
8132
  e.getAttribute(o) && (n[t] = e.getAttribute(o));
8123
8133
  return n;
8124
8134
  }
@@ -8148,7 +8158,7 @@ const Ja = _.create({
8148
8158
  contentDOM: o
8149
8159
  };
8150
8160
  }
8151
- }), tc = oe.create({
8161
+ }), nc = oe.create({
8152
8162
  name: "blockGroup",
8153
8163
  group: "childContainer",
8154
8164
  content: "blockGroupChild+",
@@ -8178,13 +8188,13 @@ const Ja = _.create({
8178
8188
  contentDOM: t
8179
8189
  };
8180
8190
  }
8181
- }), nc = oe.create({
8191
+ }), oc = oe.create({
8182
8192
  name: "doc",
8183
8193
  topNode: !0,
8184
8194
  content: "blockGroup",
8185
8195
  marks: "insertion modification deletion"
8186
8196
  });
8187
- class oc extends I {
8197
+ class rc extends I {
8188
8198
  constructor({
8189
8199
  editor: t,
8190
8200
  collaboration: o
@@ -8232,21 +8242,22 @@ class oc extends I {
8232
8242
  * These changes can later be rolled back or applied to the remote.
8233
8243
  */
8234
8244
  fork() {
8245
+ var s;
8235
8246
  if (this.isForkedFromRemote)
8236
8247
  return;
8237
- const t = this.collaboration.fragment;
8248
+ const t = (s = this.collaboration) == null ? void 0 : s.fragment;
8238
8249
  if (!t)
8239
8250
  throw new Error("No fragment to fork from");
8240
8251
  const o = new ie.Doc();
8241
8252
  ie.applyUpdate(o, ie.encodeStateAsUpdate(t.doc));
8242
8253
  const r = this.findTypeInOtherYdoc(t, o);
8243
8254
  this.forkedState = {
8244
- undoStack: Le.getState(this.editor.prosemirrorState).undoManager.undoStack,
8255
+ undoStack: Ae.getState(this.editor.prosemirrorState).undoManager.undoStack,
8245
8256
  originalFragment: t,
8246
8257
  forkedFragment: r
8247
8258
  }, this.editor._tiptapEditor.unregisterPlugin([
8248
8259
  er,
8249
- Le,
8260
+ Ae,
8250
8261
  de
8251
8262
  ]), this.editor._tiptapEditor.registerPlugin(
8252
8263
  new ht(r).plugins[0]
@@ -8262,9 +8273,9 @@ class oc extends I {
8262
8273
  merge({ keepChanges: t }) {
8263
8274
  if (!this.forkedState)
8264
8275
  return;
8265
- this.editor._tiptapEditor.unregisterPlugin(de), this.editor._tiptapEditor.unregisterPlugin(Le);
8276
+ this.editor._tiptapEditor.unregisterPlugin(de), this.editor._tiptapEditor.unregisterPlugin(Ae);
8266
8277
  const { originalFragment: o, forkedFragment: r, undoStack: s } = this.forkedState;
8267
- if (this.editor.extensions.ySyncPlugin = new ht(o), this.editor.extensions.yCursorPlugin = new $e(
8278
+ if (this.editor.extensions.ySyncPlugin = new ht(o), this.editor.extensions.yCursorPlugin = new Fe(
8268
8279
  this.collaboration
8269
8280
  ), this.editor.extensions.yUndoPlugin = new ft({
8270
8281
  editor: this.editor
@@ -8274,7 +8285,7 @@ class oc extends I {
8274
8285
  this.editor.extensions.yCursorPlugin.plugins[0]
8275
8286
  ), this.editor._tiptapEditor.registerPlugin(
8276
8287
  this.editor.extensions.yUndoPlugin.plugins[0]
8277
- ), Le.getState(
8288
+ ), Ae.getState(
8278
8289
  this.editor.prosemirrorState
8279
8290
  ).undoManager.undoStack = s, t) {
8280
8291
  const i = ie.encodeStateAsUpdate(
@@ -8286,17 +8297,17 @@ class oc extends I {
8286
8297
  this.forkedState = void 0, this.emit("forked", !1);
8287
8298
  }
8288
8299
  }
8289
- const rc = (e) => {
8300
+ const sc = (e) => {
8290
8301
  var r;
8291
- const n = {}, t = sc(e);
8302
+ const n = {}, t = ic(e);
8292
8303
  for (const s of t)
8293
8304
  n[s.name] = s;
8294
- e.collaboration && (n.ySyncPlugin = new ht(e.collaboration.fragment), n.yUndoPlugin = new ft({ editor: e.editor }), (r = e.collaboration.provider) != null && r.awareness && (n.yCursorPlugin = new $e(e.collaboration)), n.forkYDocPlugin = new oc({
8305
+ e.collaboration && (n.ySyncPlugin = new ht(e.collaboration.fragment), n.yUndoPlugin = new ft({ editor: e.editor }), (r = e.collaboration.provider) != null && r.awareness && (n.yCursorPlugin = new Fe(e.collaboration)), n.forkYDocPlugin = new rc({
8295
8306
  editor: e.editor,
8296
8307
  collaboration: e.collaboration
8297
- })), n.formattingToolbar = new fa(
8308
+ })), n.formattingToolbar = new ma(
8298
8309
  e.editor
8299
- ), n.linkToolbar = new Ca(e.editor), n.sideMenu = new Oa(e.editor), n.suggestionMenus = new $a(e.editor), n.filePanel = new ua(e.editor), n.placeholder = new Ta(e.editor, e.placeholders), (e.animations ?? !0) && (n.animations = new Pa()), e.tableHandles && (n.tableHandles = new Ya(e.editor)), n.nodeSelectionKeyboard = new Ba(), n.blockChange = new sa(), n.showSelection = new Ia(e.editor), e.comments && (n.comments = new la(
8310
+ ), n.linkToolbar = new va(e.editor), n.sideMenu = new Ra(e.editor), n.suggestionMenus = new Fa(e.editor), n.filePanel = new pa(e.editor), n.placeholder = new Ma(e.editor, e.placeholders), (e.animations ?? !0) && (n.animations = new Ia()), e.tableHandles && (n.tableHandles = new Ja(e.editor)), n.nodeSelectionKeyboard = new xa(), n.blockChange = new ia(), n.showSelection = new La(e.editor), e.comments && (n.comments = new da(
8300
8311
  e.editor,
8301
8312
  e.comments.threadStore,
8302
8313
  oo.name
@@ -8307,7 +8318,7 @@ const rc = (e) => {
8307
8318
  return n;
8308
8319
  };
8309
8320
  let cn = !1;
8310
- const sc = (e) => {
8321
+ const ic = (e) => {
8311
8322
  const n = [
8312
8323
  we.ClipboardTextSerializer,
8313
8324
  we.Commands,
@@ -8332,27 +8343,27 @@ const sc = (e) => {
8332
8343
  types: ["blockContainer", "columnList", "column"],
8333
8344
  setIdAttribute: e.setIdAttribute
8334
8345
  }),
8335
- ma,
8346
+ ga,
8336
8347
  // Comments,
8337
8348
  // basics:
8338
8349
  Go,
8339
8350
  // marks:
8340
- Fa,
8341
8351
  za,
8342
8352
  Wa,
8353
+ ja,
8343
8354
  jo.extend({
8344
8355
  inclusive: !1
8345
8356
  }).configure({
8346
- defaultProtocol: Ea,
8357
+ defaultProtocol: Sa,
8347
8358
  // only call this once if we have multiple editors installed. Or fix https://github.com/ueberdosis/tiptap/issues/5450
8348
- protocols: cn ? [] : va
8359
+ protocols: cn ? [] : Ea
8349
8360
  }),
8350
8361
  ...Object.values(e.styleSpecs).map((t) => t.implementation.mark.configure({
8351
8362
  editor: e.editor
8352
8363
  })),
8364
+ Za,
8365
+ sa,
8353
8366
  Xa,
8354
- ra,
8355
- Ja,
8356
8367
  // make sure escape blurs editor, so that we can tab to other elements in the host page (accessibility)
8357
8368
  _.create({
8358
8369
  name: "OverrideEscape",
@@ -8363,16 +8374,16 @@ const sc = (e) => {
8363
8374
  }
8364
8375
  }),
8365
8376
  // nodes
8366
- nc,
8367
- ec.configure({
8377
+ oc,
8378
+ tc.configure({
8368
8379
  editor: e.editor,
8369
8380
  domAttributes: e.domAttributes
8370
8381
  }),
8371
- ka.configure({
8382
+ wa.configure({
8372
8383
  editor: e.editor,
8373
8384
  tabBehavior: e.tabBehavior
8374
8385
  }),
8375
- tc.configure({
8386
+ nc.configure({
8376
8387
  domAttributes: e.domAttributes
8377
8388
  }),
8378
8389
  ...Object.values(e.inlineContentSpecs).filter((t) => t.config !== "link" && t.config !== "text").map((t) => t.implementation.node.configure({
@@ -8392,26 +8403,26 @@ const sc = (e) => {
8392
8403
  domAttributes: e.domAttributes
8393
8404
  })
8394
8405
  ]),
8395
- oa(e.editor),
8396
- ta(
8406
+ ra(e.editor),
8407
+ na(
8397
8408
  e.editor,
8398
8409
  e.pasteHandler || ((t) => t.defaultPasteHandler())
8399
8410
  ),
8400
- Vi(e.editor),
8411
+ _i(e.editor),
8401
8412
  // This needs to be at the bottom of this list, because Key events (such as enter, when selecting a /command),
8402
8413
  // should be handled before Enter handlers in other components like splitListItem
8403
- ...e.trailingBlock === void 0 || e.trailingBlock ? [Za] : [],
8414
+ ...e.trailingBlock === void 0 || e.trailingBlock ? [Qa] : [],
8404
8415
  ...e.comments ? [oo] : []
8405
8416
  ];
8406
8417
  return cn = !0, e.collaboration || n.push(Wo), n;
8407
8418
  };
8408
- function ic(e, n) {
8419
+ function ac(e, n) {
8409
8420
  const t = [];
8410
8421
  return e.forEach((o, r, s) => {
8411
8422
  s !== n && t.push(o);
8412
8423
  }), R.from(t);
8413
8424
  }
8414
- function ac(e, n) {
8425
+ function cc(e, n) {
8415
8426
  const t = [];
8416
8427
  for (let o = 0; o < e.childCount; o++)
8417
8428
  if (e.child(o).type.name === "tableRow")
@@ -8429,16 +8440,16 @@ function ac(e, n) {
8429
8440
  t.push(e.child(o));
8430
8441
  return e = R.from(t), e;
8431
8442
  }
8432
- function cc(e, n) {
8443
+ function lc(e, n) {
8433
8444
  let t = R.from(e.content);
8434
- if (t = ac(t, n.state.schema), !lc(t, n))
8445
+ if (t = cc(t, n.state.schema), !dc(t, n))
8435
8446
  return new J(t, e.openStart, e.openEnd);
8436
8447
  for (let o = 0; o < t.childCount; o++)
8437
8448
  if (t.child(o).type.spec.group === "blockContent") {
8438
8449
  const r = [t.child(o)];
8439
8450
  if (o + 1 < t.childCount && t.child(o + 1).type.name === "blockGroup") {
8440
8451
  const i = t.child(o + 1).child(0).child(0);
8441
- (i.type.name === "bulletListItem" || i.type.name === "numberedListItem" || i.type.name === "checkListItem") && (r.push(t.child(o + 1)), t = ic(t, o + 1));
8452
+ (i.type.name === "bulletListItem" || i.type.name === "numberedListItem" || i.type.name === "checkListItem") && (r.push(t.child(o + 1)), t = ac(t, o + 1));
8442
8453
  }
8443
8454
  const s = n.state.schema.nodes.blockContainer.createChecked(
8444
8455
  void 0,
@@ -8448,7 +8459,7 @@ function cc(e, n) {
8448
8459
  }
8449
8460
  return new J(t, e.openStart, e.openEnd);
8450
8461
  }
8451
- function lc(e, n) {
8462
+ function dc(e, n) {
8452
8463
  var s, i;
8453
8464
  const t = e.childCount === 1, o = ((s = e.firstChild) == null ? void 0 : s.type.spec.content) === "inline*", r = ((i = e.firstChild) == null ? void 0 : i.type.spec.content) === "tableRow+";
8454
8465
  if (t) {
@@ -8462,7 +8473,7 @@ function lc(e, n) {
8462
8473
  }
8463
8474
  return !0;
8464
8475
  }
8465
- const ze = class ze extends wo {
8476
+ const We = class We extends wo {
8466
8477
  constructor(t, o) {
8467
8478
  super({ ...t, content: void 0 });
8468
8479
  p(this, "_state");
@@ -8602,28 +8613,28 @@ const ze = class ze extends wo {
8602
8613
  ), this.emit("create", { editor: this }), this.isInitialized = !0;
8603
8614
  }
8604
8615
  };
8605
- p(ze, "create", (t, o) => {
8616
+ p(We, "create", (t, o) => {
8606
8617
  var s, i;
8607
8618
  const r = (s = globalThis == null ? void 0 : globalThis.window) == null ? void 0 : s.setTimeout;
8608
8619
  typeof ((i = globalThis == null ? void 0 : globalThis.window) == null ? void 0 : i.setTimeout) < "u" && (globalThis.window.setTimeout = () => 0);
8609
8620
  try {
8610
- return new ze(t, o);
8621
+ return new We(t, o);
8611
8622
  } finally {
8612
8623
  r && (globalThis.window.setTimeout = r);
8613
8624
  }
8614
8625
  });
8615
- let Fe = ze;
8616
- Fe.prototype.createView = function() {
8626
+ let ze = We;
8627
+ ze.prototype.createView = function() {
8617
8628
  this.options.onPaste = this.options.onDrop = void 0;
8618
8629
  };
8619
- const dc = {
8630
+ const uc = {
8620
8631
  enableInputRules: !0,
8621
8632
  enablePasteRules: !0,
8622
8633
  enableCoreExtensions: !1
8623
8634
  };
8624
8635
  class ao extends Lt {
8625
8636
  constructor(t) {
8626
- var l, d, u, h, f, m, g, b, k, w, y, x, N, z, S, v;
8637
+ var l, d, u, h, f, m, g, b, k, w, y, v, N, z, B, E;
8627
8638
  super();
8628
8639
  /**
8629
8640
  * The underlying prosemirror schema
@@ -8744,7 +8755,7 @@ class ao extends Lt {
8744
8755
  };
8745
8756
  const r = {
8746
8757
  defaultStyles: !0,
8747
- schema: t.schema || Pe.create(),
8758
+ schema: t.schema || Ie.create(),
8748
8759
  _headless: !1,
8749
8760
  ...t,
8750
8761
  placeholders: {
@@ -8754,7 +8765,7 @@ class ao extends Lt {
8754
8765
  };
8755
8766
  if (r.comments && !r.resolveUsers)
8756
8767
  throw new Error("resolveUsers is required when using comments");
8757
- this.resolveUsers = r.resolveUsers, this.schema = r.schema, this.blockImplementations = r.schema.blockSpecs, this.inlineContentImplementations = r.schema.inlineContentSpecs, this.styleImplementations = r.schema.styleSpecs, this.extensions = rc({
8768
+ this.resolveUsers = r.resolveUsers, this.schema = r.schema, this.blockImplementations = r.schema.blockSpecs, this.inlineContentImplementations = r.schema.inlineContentSpecs, this.styleImplementations = r.schema.styleSpecs, this.extensions = sc({
8758
8769
  editor: this,
8759
8770
  domAttributes: r.domAttributes || {},
8760
8771
  blockSpecs: this.schema.blockSpecs,
@@ -8776,19 +8787,19 @@ class ao extends Lt {
8776
8787
  });
8777
8788
  for (let T of r.extensions || []) {
8778
8789
  typeof T == "function" && (T = T(this));
8779
- const B = T.constructor.key();
8780
- if (!B)
8790
+ const x = T.constructor.key();
8791
+ if (!x)
8781
8792
  throw new Error(
8782
8793
  `Extension ${T.constructor.name} does not have a key method`
8783
8794
  );
8784
- if (this.extensions[B])
8795
+ if (this.extensions[x])
8785
8796
  throw new Error(
8786
- `Extension ${T.constructor.name} already exists with key ${B}`
8797
+ `Extension ${T.constructor.name} already exists with key ${x}`
8787
8798
  );
8788
- this.extensions[B] = T;
8799
+ this.extensions[x] = T;
8789
8800
  }
8790
- if (Object.entries(r._extensions || {}).forEach(([T, B]) => {
8791
- const ee = typeof B == "function" ? B(this) : B;
8801
+ if (Object.entries(r._extensions || {}).forEach(([T, x]) => {
8802
+ const ee = typeof x == "function" ? x(this) : x;
8792
8803
  if (!("plugin" in ee)) {
8793
8804
  this.extensions[T] = ee;
8794
8805
  return;
@@ -8806,15 +8817,15 @@ class ao extends Lt {
8806
8817
  }();
8807
8818
  }), 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) {
8808
8819
  const T = r.uploadFile;
8809
- this.uploadFile = async (B, Ie) => {
8820
+ this.uploadFile = async (x, Le) => {
8810
8821
  this.onUploadStartCallbacks.forEach(
8811
- (ee) => ee.apply(this, [Ie])
8822
+ (ee) => ee.apply(this, [Le])
8812
8823
  );
8813
8824
  try {
8814
- return await T(B, Ie);
8825
+ return await T(x, Le);
8815
8826
  } finally {
8816
8827
  this.onUploadEndCallbacks.forEach(
8817
- (ee) => ee.apply(this, [Ie])
8828
+ (ee) => ee.apply(this, [Le])
8818
8829
  );
8819
8830
  }
8820
8831
  };
@@ -8840,18 +8851,18 @@ class ao extends Lt {
8840
8851
  "initialContent must be a non-empty array of blocks, received: " + i
8841
8852
  );
8842
8853
  const a = [
8843
- ...Object.entries(this.extensions).map(([T, B]) => {
8844
- if (B instanceof _ || B instanceof oe || B instanceof re)
8845
- return B;
8846
- if (!(B instanceof I && !B.plugins.length))
8854
+ ...Object.entries(this.extensions).map(([T, x]) => {
8855
+ if (x instanceof _ || x instanceof oe || x instanceof re)
8856
+ return x;
8857
+ if (!(x instanceof I && !x.plugins.length))
8847
8858
  return _.create({
8848
8859
  name: T,
8849
- priority: B.priority,
8850
- addProseMirrorPlugins: () => B.plugins
8860
+ priority: x.priority,
8861
+ addProseMirrorPlugins: () => x.plugins
8851
8862
  });
8852
8863
  })
8853
8864
  ].filter((T) => T !== void 0), c = {
8854
- ...dc,
8865
+ ...uc,
8855
8866
  ...r._tiptapOptions,
8856
8867
  content: i,
8857
8868
  extensions: a,
@@ -8862,18 +8873,18 @@ class ao extends Lt {
8862
8873
  // editable, so you can't focus it. We want to revert this as we have
8863
8874
  // UI behaviour that relies on it.
8864
8875
  tabIndex: "0",
8865
- ...(N = (x = r._tiptapOptions) == null ? void 0 : x.editorProps) == null ? void 0 : N.attributes,
8876
+ ...(N = (v = r._tiptapOptions) == null ? void 0 : v.editorProps) == null ? void 0 : N.attributes,
8866
8877
  ...(z = r.domAttributes) == null ? void 0 : z.editor,
8867
8878
  class: te(
8868
8879
  "bn-editor",
8869
8880
  r.defaultStyles ? "bn-default-styles" : "",
8870
- ((v = (S = r.domAttributes) == null ? void 0 : S.editor) == null ? void 0 : v.class) || ""
8881
+ ((E = (B = r.domAttributes) == null ? void 0 : B.editor) == null ? void 0 : E.class) || ""
8871
8882
  )
8872
8883
  },
8873
- transformPasted: cc
8884
+ transformPasted: lc
8874
8885
  }
8875
8886
  };
8876
- this.headless ? this.pmSchema = Co(c.extensions) : (this._tiptapEditor = Fe.create(
8887
+ this.headless ? this.pmSchema = Co(c.extensions) : (this._tiptapEditor = ze.create(
8877
8888
  c,
8878
8889
  this.schema.styleSchema
8879
8890
  ), this.pmSchema = this._tiptapEditor.schema), this.pmSchema.cached.blockNoteEditor = this, this.emit("create");
@@ -9021,7 +9032,7 @@ class ao extends Lt {
9021
9032
  * @returns A snapshot of all top-level (non-nested) blocks in the editor.
9022
9033
  */
9023
9034
  get document() {
9024
- return this.transact((t) => hr(t.doc, this.pmSchema));
9035
+ return this.transact((t) => fr(t.doc, this.pmSchema));
9025
9036
  }
9026
9037
  /**
9027
9038
  * Gets a snapshot of an existing block from the editor.
@@ -9031,7 +9042,7 @@ class ao extends Lt {
9031
9042
  * matching block was found.
9032
9043
  */
9033
9044
  getBlock(t) {
9034
- return this.transact((o) => bi(o.doc, t));
9045
+ return this.transact((o) => ki(o.doc, t));
9035
9046
  }
9036
9047
  /**
9037
9048
  * Gets a snapshot of the previous sibling of an existing block from the
@@ -9043,7 +9054,7 @@ class ao extends Lt {
9043
9054
  * in the document.
9044
9055
  */
9045
9056
  getPrevBlock(t) {
9046
- return this.transact((o) => ki(o.doc, t));
9057
+ return this.transact((o) => wi(o.doc, t));
9047
9058
  }
9048
9059
  /**
9049
9060
  * Gets a snapshot of the next sibling of an existing block from the editor.
@@ -9054,7 +9065,7 @@ class ao extends Lt {
9054
9065
  * the document.
9055
9066
  */
9056
9067
  getNextBlock(t) {
9057
- return this.transact((o) => wi(o.doc, t));
9068
+ return this.transact((o) => yi(o.doc, t));
9058
9069
  }
9059
9070
  /**
9060
9071
  * Gets a snapshot of the parent of an existing block from the editor.
@@ -9064,7 +9075,7 @@ class ao extends Lt {
9064
9075
  * if no matching block was found, or the block isn't nested.
9065
9076
  */
9066
9077
  getParentBlock(t) {
9067
- return this.transact((o) => yi(o.doc, t));
9078
+ return this.transact((o) => Ci(o.doc, t));
9068
9079
  }
9069
9080
  /**
9070
9081
  * Traverses all blocks in the editor depth-first, and executes a callback for each.
@@ -9109,7 +9120,7 @@ class ao extends Lt {
9109
9120
  * @returns A snapshot of the current text cursor position.
9110
9121
  */
9111
9122
  getTextCursorPosition() {
9112
- return this.transact((t) => Bi(t));
9123
+ return this.transact((t) => xi(t));
9113
9124
  }
9114
9125
  /**
9115
9126
  * Sets the text cursor position to the start or end of an existing block. Throws an error if the target block could
@@ -9129,7 +9140,7 @@ class ao extends Lt {
9129
9140
  * If the selection starts / ends halfway through a block, the returned data will contain the entire block.
9130
9141
  */
9131
9142
  getSelection() {
9132
- return this.transact((t) => vi(t));
9143
+ return this.transact((t) => Ei(t));
9133
9144
  }
9134
9145
  /**
9135
9146
  * Gets a snapshot of the current selection. This contains all blocks (included nested blocks)
@@ -9139,7 +9150,7 @@ class ao extends Lt {
9139
9150
  * only the part of the block that is included in the selection.
9140
9151
  */
9141
9152
  getSelectionCutBlocks() {
9142
- return this.transact((t) => Si(t));
9153
+ return this.transact((t) => Bi(t));
9143
9154
  }
9144
9155
  /**
9145
9156
  * Sets the selection to a range of blocks.
@@ -9147,7 +9158,7 @@ class ao extends Lt {
9147
9158
  * @param endBlock The identifier of the block that should be the end of the selection.
9148
9159
  */
9149
9160
  setSelection(t, o) {
9150
- return this.transact((r) => Ei(r, t, o));
9161
+ return this.transact((r) => Si(r, t, o));
9151
9162
  }
9152
9163
  /**
9153
9164
  * Checks if the editor is currently editable, or if it's locked.
@@ -9183,7 +9194,7 @@ class ao extends Lt {
9183
9194
  */
9184
9195
  insertBlocks(t, o, r = "before") {
9185
9196
  return this.transact(
9186
- (s) => Lr(s, t, o, r)
9197
+ (s) => Ar(s, t, o, r)
9187
9198
  );
9188
9199
  }
9189
9200
  /**
@@ -9194,7 +9205,7 @@ class ao extends Lt {
9194
9205
  * @param update A partial block which defines how the existing block should be changed.
9195
9206
  */
9196
9207
  updateBlock(t, o) {
9197
- return this.transact((r) => Nr(r, t, o));
9208
+ return this.transact((r) => Hr(r, t, o));
9198
9209
  }
9199
9210
  /**
9200
9211
  * Removes existing blocks from the editor. Throws an error if any of the blocks could not be found.
@@ -9237,7 +9248,7 @@ class ao extends Lt {
9237
9248
  insertInlineContent(t, { updateSelection: o = !1 } = {}) {
9238
9249
  const r = W(t, this.pmSchema);
9239
9250
  this.transact((s) => {
9240
- Ci(
9251
+ vi(
9241
9252
  s,
9242
9253
  {
9243
9254
  from: s.selection.from,
@@ -9345,7 +9356,7 @@ class ao extends Lt {
9345
9356
  * Checks if the block containing the text cursor can be nested.
9346
9357
  */
9347
9358
  canNestBlock() {
9348
- return mi(this);
9359
+ return gi(this);
9349
9360
  }
9350
9361
  /**
9351
9362
  * Nests the block containing the text cursor into the block above it.
@@ -9357,13 +9368,13 @@ class ao extends Lt {
9357
9368
  * Checks if the block containing the text cursor is nested.
9358
9369
  */
9359
9370
  canUnnestBlock() {
9360
- return gi(this);
9371
+ return bi(this);
9361
9372
  }
9362
9373
  /**
9363
9374
  * Lifts the block containing the text cursor out of its parent.
9364
9375
  */
9365
9376
  unnestBlock() {
9366
- fi(this);
9377
+ mi(this);
9367
9378
  }
9368
9379
  /**
9369
9380
  * Moves the selected blocks up. If the previous block has children, moves
@@ -9371,7 +9382,7 @@ class ao extends Lt {
9371
9382
  * current blocks share a common parent, moves them out of & before it.
9372
9383
  */
9373
9384
  moveBlocksUp() {
9374
- return ui(this);
9385
+ return pi(this);
9375
9386
  }
9376
9387
  /**
9377
9388
  * Moves the selected blocks down. If the next block has children, moves
@@ -9379,7 +9390,7 @@ class ao extends Lt {
9379
9390
  * current blocks share a common parent, moves them out of & after it.
9380
9391
  */
9381
9392
  moveBlocksDown() {
9382
- return pi(this);
9393
+ return hi(this);
9383
9394
  }
9384
9395
  /**
9385
9396
  * Exports blocks into a simplified HTML string. To better conform to HTML standards, children of blocks which aren't list
@@ -9401,7 +9412,7 @@ class ao extends Lt {
9401
9412
  * @returns The blocks, serialized as an HTML string.
9402
9413
  */
9403
9414
  async blocksToFullHTML(t) {
9404
- return Vr(this.pmSchema, this).serializeBlocks(t, {});
9415
+ return _r(this.pmSchema, this).serializeBlocks(t, {});
9405
9416
  }
9406
9417
  /**
9407
9418
  * Parses blocks from an HTML string. Tries to create `Block` objects out of any HTML block-level elements, and
@@ -9420,7 +9431,7 @@ class ao extends Lt {
9420
9431
  * @returns The blocks, serialized as a Markdown string.
9421
9432
  */
9422
9433
  async blocksToMarkdownLossy(t = this.document) {
9423
- return Mi(t, this.pmSchema, this, {});
9434
+ return Pi(t, this.pmSchema, this, {});
9424
9435
  }
9425
9436
  /**
9426
9437
  * Creates a list of blocks from a Markdown string. Tries to create `Block` and `InlineNode` objects based on
@@ -9430,7 +9441,7 @@ class ao extends Lt {
9430
9441
  * @returns The blocks parsed from the Markdown string.
9431
9442
  */
9432
9443
  async tryParseMarkdownToBlocks(t) {
9433
- return Di(t, this.pmSchema);
9444
+ return Oi(t, this.pmSchema);
9434
9445
  }
9435
9446
  /**
9436
9447
  * Updates the user info for the current user that's shown to other collaborators.
@@ -9445,7 +9456,7 @@ class ao extends Lt {
9445
9456
  /**
9446
9457
  * Registers a callback which will be called before any change is applied to the editor, allowing you to cancel the change.
9447
9458
  */
9448
- beforeChange(t) {
9459
+ onBeforeChange(t) {
9449
9460
  return this.headless ? () => {
9450
9461
  } : this.extensions.blockChange.subscribe(
9451
9462
  (o) => t(this, o)
@@ -9507,7 +9518,7 @@ class ao extends Lt {
9507
9518
  if (i)
9508
9519
  return i.getBoundingClientRect();
9509
9520
  }
9510
- return _e(this.prosemirrorView, r, s);
9521
+ return Ue(this.prosemirrorView, r, s);
9511
9522
  }
9512
9523
  get isEmpty() {
9513
9524
  const t = this.document;
@@ -9680,9 +9691,9 @@ function il(e) {
9680
9691
  createStyleMapping: (n) => n
9681
9692
  };
9682
9693
  }
9683
- let Oe;
9684
- async function uc() {
9685
- return Oe || (Oe = (async () => {
9694
+ let Re;
9695
+ async function pc() {
9696
+ return Re || (Re = (async () => {
9686
9697
  const [e, n] = await Promise.all([
9687
9698
  import("emoji-mart"),
9688
9699
  // use a dynamic import to encourage bundle-splitting
@@ -9690,12 +9701,12 @@ async function uc() {
9690
9701
  import("@emoji-mart/data")
9691
9702
  ]), t = "default" in e ? e.default : e, o = "default" in n ? n.default : n;
9692
9703
  return await t.init({ data: o }), { emojiMart: t, emojiData: o };
9693
- })(), Oe);
9704
+ })(), Re);
9694
9705
  }
9695
9706
  async function al(e, n) {
9696
- if (!Qs("text", e))
9707
+ if (!ei("text", e))
9697
9708
  return [];
9698
- const { emojiData: t, emojiMart: o } = await uc();
9709
+ const { emojiData: t, emojiMart: o } = await pc();
9699
9710
  return (n.trim() === "" ? Object.values(t.emojis) : await o.SearchIndex.search(n)).map((s) => ({
9700
9711
  id: s.skins[0].native,
9701
9712
  onItemClick: () => e.insertInlineContent(s.skins[0].native + " ")
@@ -9713,81 +9724,81 @@ function cl(e, ...n) {
9713
9724
  return t;
9714
9725
  }
9715
9726
  export {
9716
- Kr as AudioBlock,
9727
+ Yr as AudioBlock,
9717
9728
  ao as BlockNoteEditor,
9718
9729
  I as BlockNoteExtension,
9719
- Pe as BlockNoteSchema,
9730
+ Ie as BlockNoteSchema,
9720
9731
  rl as COLORS_DARK_MODE_DEFAULT,
9721
9732
  ol as COLORS_DEFAULT,
9722
- Xr as CodeBlock,
9723
- Ea as DEFAULT_LINK_PROTOCOL,
9733
+ Zr as CodeBlock,
9734
+ Sa as DEFAULT_LINK_PROTOCOL,
9724
9735
  zc as EMPTY_CELL_HEIGHT,
9725
9736
  Un as EMPTY_CELL_WIDTH,
9726
9737
  Lt as EventEmitter,
9727
9738
  sl as Exporter,
9728
- Fr as FILE_AUDIO_ICON_SVG,
9729
- Ur as FILE_ICON_SVG,
9730
- ps as FILE_IMAGE_ICON_SVG,
9731
- Ws as FILE_VIDEO_ICON_SVG,
9732
- as as FileBlock,
9733
- ua as FilePanelProsemirrorPlugin,
9734
- da as FilePanelView,
9735
- fa as FormattingToolbarProsemirrorPlugin,
9736
- pa as FormattingToolbarView,
9739
+ zr as FILE_AUDIO_ICON_SVG,
9740
+ $r as FILE_ICON_SVG,
9741
+ hs as FILE_IMAGE_ICON_SVG,
9742
+ js as FILE_VIDEO_ICON_SVG,
9743
+ cs as FileBlock,
9744
+ pa as FilePanelProsemirrorPlugin,
9745
+ ua as FilePanelView,
9746
+ ma as FormattingToolbarProsemirrorPlugin,
9747
+ ha as FormattingToolbarView,
9737
9748
  Zn as HTMLToBlocks,
9738
- ks as ImageBlock,
9739
- Ca as LinkToolbarProsemirrorPlugin,
9740
- ai as PageBreak,
9741
- Oa as SideMenuProsemirrorPlugin,
9742
- Ha as SideMenuView,
9743
- $a as SuggestionMenuProseMirrorPlugin,
9744
- Ya as TableHandlesProsemirrorPlugin,
9745
- Ka as TableHandlesView,
9749
+ ws as ImageBlock,
9750
+ va as LinkToolbarProsemirrorPlugin,
9751
+ ci as PageBreak,
9752
+ Ra as SideMenuProsemirrorPlugin,
9753
+ Da as SideMenuView,
9754
+ Fa as SuggestionMenuProseMirrorPlugin,
9755
+ Ja as TableHandlesProsemirrorPlugin,
9756
+ Ya as TableHandlesView,
9746
9757
  je as UniqueID,
9747
9758
  q as UnreachableCaseError,
9748
- va as VALID_LINK_PROTOCOLS,
9749
- Js as VideoBlock,
9759
+ Ea as VALID_LINK_PROTOCOLS,
9760
+ Xs as VideoBlock,
9750
9761
  Vt as addInlineContentAttributes,
9751
- mr as addInlineContentKeyboardShortcuts,
9752
- yr as addStyleAttributes,
9753
- ur as applyNonSelectableBlockFix,
9754
- Rc as assertEmpty,
9755
- Wr as audioBlockConfig,
9756
- Gr as audioParse,
9757
- zr as audioPropSchema,
9758
- jr as audioRender,
9759
- qr as audioToExternalHTML,
9762
+ gr as addInlineContentKeyboardShortcuts,
9763
+ Cr as addStyleAttributes,
9764
+ pr as applyNonSelectableBlockFix,
9765
+ Vc as assertEmpty,
9766
+ jr as audioBlockConfig,
9767
+ qr as audioParse,
9768
+ Wr as audioPropSchema,
9769
+ Gr as audioRender,
9770
+ Kr as audioToExternalHTML,
9760
9771
  he as blockToNode,
9761
- Mi as blocksToMarkdown,
9762
- Ue as camelToDataKebab,
9772
+ Pi as blocksToMarkdown,
9773
+ $e as camelToDataKebab,
9763
9774
  Jc as checkBlockHasDefaultProp,
9764
- ei as checkBlockIsDefaultType,
9775
+ ti as checkBlockIsDefaultType,
9765
9776
  qc as checkBlockIsFileBlock,
9766
9777
  Yc as checkBlockIsFileBlockWithPlaceholder,
9767
9778
  Kc as checkBlockIsFileBlockWithPreview,
9768
- ti as checkBlockTypeHasDefaultProp,
9779
+ ni as checkBlockTypeHasDefaultProp,
9769
9780
  jc as checkBlockTypeInSchema,
9770
9781
  H as checkDefaultBlockTypeInSchema,
9771
- Qs as checkDefaultInlineContentTypeInSchema,
9782
+ ei as checkDefaultInlineContentTypeInSchema,
9772
9783
  Gc as checkInlineContentTypeInSchema,
9773
- ci as checkPageBreakBlocksInSchema,
9784
+ li as checkPageBreakBlocksInSchema,
9774
9785
  Pt as cleanHTMLToMarkdown,
9775
9786
  cl as combineByGroup,
9776
9787
  qe as contentNodeToInlineContent,
9777
9788
  wn as contentNodeToTableContent,
9778
- _r as createAddFileButton,
9779
- xe as createBlockSpec,
9789
+ Ur as createAddFileButton,
9790
+ Te as createBlockSpec,
9780
9791
  Q as createBlockSpecFromStronglyTypedTiptapNode,
9781
9792
  $ as createDefaultBlockDOMOutputSpec,
9782
9793
  Ye as createExternalHTMLExporter,
9783
9794
  xt as createFigureWithCaption,
9784
9795
  Bt as createFileBlockWrapper,
9785
- $r as createFileNameWithIcon,
9796
+ Fr as createFileNameWithIcon,
9786
9797
  $c as createInlineContentSpec,
9787
- br as createInlineContentSpecFromTipTapNode,
9798
+ kr as createInlineContentSpecFromTipTapNode,
9788
9799
  gn as createInternalBlockSpec,
9789
- Vr as createInternalHTMLSerializer,
9790
- gr as createInternalInlineContentSpec,
9800
+ _r as createInternalHTMLSerializer,
9801
+ br as createInternalInlineContentSpec,
9791
9802
  Cn as createInternalStyleSpec,
9792
9803
  Xe as createLinkWithCaption,
9793
9804
  On as createResizableFileBlockWrapper,
@@ -9796,114 +9807,114 @@ export {
9796
9807
  ae as createStyleSpecFromTipTapMark,
9797
9808
  nl as createSuggestionMenu,
9798
9809
  Hn as createToggleWrapper,
9799
- Xs as defaultBlockSchema,
9810
+ Zs as defaultBlockSchema,
9800
9811
  $n as defaultBlockSpecs,
9801
9812
  Rt as defaultBlockToHTML,
9802
- Yr as defaultCodeBlockPropSchema,
9803
- Zs as defaultInlineContentSchema,
9813
+ Jr as defaultCodeBlockPropSchema,
9814
+ Qs as defaultInlineContentSchema,
9804
9815
  zn as defaultInlineContentSpecs,
9805
9816
  M as defaultProps,
9806
9817
  Wc as defaultStyleSchema,
9807
9818
  Fn as defaultStyleSpecs,
9808
- cs as defaultToggledState,
9809
- hr as docToBlocks,
9819
+ ls as defaultToggledState,
9820
+ fr as docToBlocks,
9810
9821
  fe as esmDependencies,
9811
- os as fileBlockConfig,
9812
- ss as fileParse,
9813
- ns as filePropSchema,
9814
- rs as fileRender,
9815
- is as fileToExternalHTML,
9822
+ rs as fileBlockConfig,
9823
+ is as fileParse,
9824
+ os as filePropSchema,
9825
+ ss as fileRender,
9826
+ as as fileToExternalHTML,
9816
9827
  Uc as filenameFromURL,
9817
9828
  Qc as filterSuggestionItems,
9818
9829
  Y as formatKeyboardShortcut,
9819
- ha as formattingToolbarPluginKey,
9820
- bi as getBlock,
9830
+ fa as formattingToolbarPluginKey,
9831
+ ki as getBlock,
9821
9832
  vt as getBlockCache,
9822
9833
  kt as getBlockFromPos,
9823
9834
  ne as getBlockInfo,
9824
- Te as getBlockInfoFromResolvedPos,
9835
+ Me as getBlockInfoFromResolvedPos,
9825
9836
  C as getBlockInfoFromSelection,
9826
9837
  Ge as getBlockInfoFromTransaction,
9827
9838
  wt as getBlockInfoWithManualOffset,
9828
- rc as getBlockNoteExtensions,
9829
- Me as getBlockNoteSchema,
9839
+ sc as getBlockNoteExtensions,
9840
+ Pe as getBlockNoteSchema,
9830
9841
  yt as getBlockSchema,
9831
9842
  bn as getBlockSchemaFromSpecs,
9832
9843
  Tn as getBlocksChangedByTransaction,
9833
9844
  ve as getColspan,
9834
9845
  al as getDefaultEmojiPickerItems,
9835
9846
  Zc as getDefaultSlashMenuItems,
9836
- kr as getInlineContentParseRules,
9847
+ wr as getInlineContentParseRules,
9837
9848
  Ct as getInlineContentSchema,
9838
9849
  yn as getInlineContentSchemaFromSpecs,
9839
9850
  Z as getNearestBlockPos,
9840
- wi as getNextBlock,
9851
+ yi as getNextBlock,
9841
9852
  F as getNodeById,
9842
9853
  tl as getPageBreakSlashMenuItems,
9843
- yi as getParentBlock,
9844
- pr as getParseRules,
9854
+ Ci as getParentBlock,
9855
+ hr as getParseRules,
9845
9856
  A as getPmSchema,
9846
- ki as getPrevBlock,
9857
+ wi as getPrevBlock,
9847
9858
  it as getRowspan,
9848
- Cr as getStyleParseRules,
9859
+ vr as getStyleParseRules,
9849
9860
  ke as getStyleSchema,
9850
9861
  vn as getStyleSchemaFromSpecs,
9851
- fs as imageBlockConfig,
9852
- gs as imageParse,
9853
- hs as imagePropSchema,
9854
- ms as imageRender,
9855
- bs as imageToExternalHTML,
9862
+ ms as imageBlockConfig,
9863
+ bs as imageParse,
9864
+ fs as imagePropSchema,
9865
+ gs as imageRender,
9866
+ ks as imageToExternalHTML,
9856
9867
  mn as inheritedProps,
9857
9868
  Mt as initializeESMDependencies,
9858
9869
  W as inlineContentToNodes,
9859
- Lr as insertBlocks,
9870
+ Ar as insertBlocks,
9860
9871
  P as insertOrUpdateBlock,
9861
9872
  dr as isAppleOS,
9862
9873
  Ot as isLinkInlineContent,
9863
9874
  St as isNodeBlock,
9864
9875
  fn as isPartialLinkInlineContent,
9865
9876
  Ce as isPartialTableCell,
9866
- Vc as isSafari,
9877
+ _c as isSafari,
9867
9878
  ue as isStyledTextInlineContent,
9868
9879
  bt as isTableCell,
9869
9880
  Yt as isTableCellSelection,
9870
- ya as linkToolbarPluginKey,
9881
+ Ca as linkToolbarPluginKey,
9871
9882
  st as mapTableCell,
9872
9883
  il as mappingFactory,
9873
- Di as markdownToBlocks,
9884
+ Oi as markdownToBlocks,
9874
9885
  Qn as markdownToHTML,
9875
9886
  te as mergeCSSClasses,
9876
- _c as mergeParagraphs,
9877
- E as nodeToBlock,
9887
+ ur as mergeParagraphs,
9888
+ S as nodeToBlock,
9878
9889
  at as nodeToCustomInlineContent,
9879
- oi as pageBreakConfig,
9880
- si as pageBreakParse,
9881
- ri as pageBreakRender,
9890
+ ri as pageBreakConfig,
9891
+ ii as pageBreakParse,
9892
+ si as pageBreakRender,
9882
9893
  Wn as pageBreakSchema,
9883
- ii as pageBreakToExternalHTML,
9894
+ ai as pageBreakToExternalHTML,
9884
9895
  jt as parseEmbedElement,
9885
9896
  Je as parseFigureElement,
9886
- Be as propsToAttributes,
9887
- fr as prosemirrorSliceToSlicedBlocks,
9897
+ xe as propsToAttributes,
9898
+ mr as prosemirrorSliceToSlicedBlocks,
9888
9899
  $t as removeAndInsertBlocks,
9889
9900
  no as selectedFragmentToHTML,
9890
9901
  Qe as shikiHighlighterPromiseSymbol,
9891
9902
  Wt as shikiParserSymbol,
9892
- Da as sideMenuPluginKey,
9893
- wr as stylePropsToAttributes,
9903
+ Oa as sideMenuPluginKey,
9904
+ yr as stylePropsToAttributes,
9894
9905
  Ke as tableContentToNodes,
9895
9906
  ye as tableHandlesPluginKey,
9896
- Va as trackPosition,
9897
- Nr as updateBlock,
9907
+ _a as trackPosition,
9908
+ Hr as updateBlock,
9898
9909
  D as updateBlockCommand,
9899
9910
  Mn as updateBlockTr,
9900
9911
  Xc as uploadToTmpFilesDotOrg_DEV_ONLY,
9901
- Gs as videoBlockConfig,
9902
- Ks as videoParse,
9903
- js as videoPropSchema,
9904
- qs as videoRender,
9905
- Ys as videoToExternalHTML,
9912
+ qs as videoBlockConfig,
9913
+ Ys as videoParse,
9914
+ Gs as videoPropSchema,
9915
+ Ks as videoRender,
9916
+ Js as videoToExternalHTML,
9906
9917
  el as withPageBreak,
9907
- Ae as wrapInBlockStructure
9918
+ Ne as wrapInBlockStructure
9908
9919
  };
9909
9920
  //# sourceMappingURL=blocknote.js.map