@blocknote/core 0.15.2 → 0.15.3

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,39 +1,38 @@
1
- var Tt = Object.defineProperty;
2
- var Bt = (e, t, o) => t in e ? Tt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
3
- var c = (e, t, o) => Bt(e, typeof t != "symbol" ? t + "" : t, o);
4
- import { Slice as D, Fragment as L, DOMSerializer as ve, DOMParser as Lt, Node as It } from "prosemirror-model";
5
- import Ze from "rehype-parse";
6
- import Je from "rehype-stringify";
7
- import { unified as xe } from "unified";
8
- import { Extension as M, combineTransactionSteps as At, getChangedRanges as Nt, findChildrenInRange as Pt, Node as $, Mark as Ee, InputRule as ee, callOrReturn as Ht, getExtensionField as Ut, mergeAttributes as Dt, selectionToInsertionEnd as jt, isTextSelection as Vt, isNodeSelection as Rt, posToDOMRect as _e, getMarkRange as Ue, findParentNode as Ot, findChildren as De, extensions as J, Editor as zt, createDocument as Ft, getSchema as Gt } from "@tiptap/core";
9
- import { Plugin as y, PluginKey as S, Selection as me, NodeSelection as re, TextSelection as Y, EditorState as Kt } from "prosemirror-state";
10
- import { v4 as Wt } from "uuid";
11
- import { fromDom as ye } from "hast-util-from-dom";
12
- import $t from "@tiptap/extension-bold";
13
- import qt from "@tiptap/extension-code";
14
- import Xt from "@tiptap/extension-italic";
15
- import Zt from "@tiptap/extension-strike";
16
- import Jt from "@tiptap/extension-underline";
17
- import { TableCell as Yt } from "@tiptap/extension-table-cell";
18
- import { TableHeader as Qt } from "@tiptap/extension-table-header";
19
- import { TableRow as eo } from "@tiptap/extension-table-row";
20
- import { columnResizing as to, tableEditing as oo } from "prosemirror-tables";
21
- import io from "rehype-remark";
22
- import Ye from "remark-gfm";
23
- import no from "remark-stringify";
24
- import ro from "remark-parse";
25
- import ao, { defaultHandlers as so } from "remark-rehype";
26
- import { DecorationSet as G, Decoration as K, EditorView as lo } from "prosemirror-view";
27
- import co from "@tiptap/extension-collaboration";
28
- import uo from "@tiptap/extension-collaboration-cursor";
29
- import { Dropcursor as po } from "@tiptap/extension-dropcursor";
30
- import { Gapcursor as ho } from "@tiptap/extension-gapcursor";
31
- import { HardBreak as mo } from "@tiptap/extension-hard-break";
32
- import { History as fo } from "@tiptap/extension-history";
33
- import { Link as go } from "@tiptap/extension-link";
34
- import { Text as bo } from "@tiptap/extension-text";
35
- import { init as ko, SearchIndex as _o } from "emoji-mart";
36
- const yo = {
1
+ var Bt = Object.defineProperty;
2
+ var Lt = (e, t, o) => t in e ? Bt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
3
+ var c = (e, t, o) => Lt(e, typeof t != "symbol" ? t + "" : t, o);
4
+ import { Slice as j, Fragment as L, DOMSerializer as xe, DOMParser as It, Node as At } from "prosemirror-model";
5
+ import Je from "rehype-parse";
6
+ import Ye from "rehype-stringify";
7
+ import { unified as Ee } from "unified";
8
+ import { Extension as M, combineTransactionSteps as Nt, getChangedRanges as Pt, findChildrenInRange as Ht, Node as $, Mark as Ce, InputRule as ee, callOrReturn as Ut, getExtensionField as jt, mergeAttributes as Dt, selectionToInsertionEnd as Vt, isTextSelection as Rt, isNodeSelection as Ot, posToDOMRect as ye, getMarkRange as je, findParentNode as zt, findChildren as De, extensions as J, Editor as Ft, createDocument as Gt, getSchema as Kt } from "@tiptap/core";
9
+ import { Plugin as y, PluginKey as S, Selection as me, NodeSelection as re, TextSelection as Y, EditorState as Wt } from "prosemirror-state";
10
+ import { v4 as $t } from "uuid";
11
+ import { fromDom as we } from "hast-util-from-dom";
12
+ import qt from "@tiptap/extension-bold";
13
+ import Xt from "@tiptap/extension-code";
14
+ import Zt from "@tiptap/extension-italic";
15
+ import Jt from "@tiptap/extension-strike";
16
+ import Yt from "@tiptap/extension-underline";
17
+ import { TableCell as Qt } from "@tiptap/extension-table-cell";
18
+ import { TableHeader as eo } from "@tiptap/extension-table-header";
19
+ import { TableRow as to } from "@tiptap/extension-table-row";
20
+ import { columnResizing as oo, tableEditing as io } from "prosemirror-tables";
21
+ import no from "rehype-remark";
22
+ import Qe from "remark-gfm";
23
+ import ro from "remark-stringify";
24
+ import ao from "remark-parse";
25
+ import so, { defaultHandlers as lo } from "remark-rehype";
26
+ import { DecorationSet as G, Decoration as K, EditorView as co } from "prosemirror-view";
27
+ import uo from "@tiptap/extension-collaboration";
28
+ import po from "@tiptap/extension-collaboration-cursor";
29
+ import { Dropcursor as ho } from "@tiptap/extension-dropcursor";
30
+ import { Gapcursor as mo } from "@tiptap/extension-gapcursor";
31
+ import { HardBreak as fo } from "@tiptap/extension-hard-break";
32
+ import { History as go } from "@tiptap/extension-history";
33
+ import { Link as bo } from "@tiptap/extension-link";
34
+ import { Text as ko } from "@tiptap/extension-text";
35
+ const _o = {
37
36
  slash_menu: {
38
37
  heading: {
39
38
  title: "عنوان 1",
@@ -323,7 +322,7 @@ const yo = {
323
322
  generic: {
324
323
  ctrl_shortcut: "Ctrl"
325
324
  }
326
- }, Qe = {
325
+ }, et = {
327
326
  slash_menu: {
328
327
  heading: {
329
328
  title: "Heading 1",
@@ -629,7 +628,7 @@ const yo = {
629
628
  generic: {
630
629
  ctrl_shortcut: "Ctrl"
631
630
  }
632
- }, wo = {
631
+ }, yo = {
633
632
  slash_menu: {
634
633
  heading: {
635
634
  title: "Titre 1",
@@ -934,7 +933,7 @@ const yo = {
934
933
  generic: {
935
934
  ctrl_shortcut: "Ctrl"
936
935
  }
937
- }, vo = {
936
+ }, wo = {
938
937
  slash_menu: {
939
938
  heading: {
940
939
  title: "Fyrirsögn 1",
@@ -1231,7 +1230,7 @@ const yo = {
1231
1230
  generic: {
1232
1231
  ctrl_shortcut: "Ctrl"
1233
1232
  }
1234
- }, xo = {
1233
+ }, vo = {
1235
1234
  slash_menu: {
1236
1235
  heading: {
1237
1236
  title: "見出し1",
@@ -1556,7 +1555,7 @@ const yo = {
1556
1555
  generic: {
1557
1556
  ctrl_shortcut: "Ctrl"
1558
1557
  }
1559
- }, Eo = {
1558
+ }, xo = {
1560
1559
  slash_menu: {
1561
1560
  heading: {
1562
1561
  title: "제목1",
@@ -1874,7 +1873,7 @@ const yo = {
1874
1873
  generic: {
1875
1874
  ctrl_shortcut: "Ctrl"
1876
1875
  }
1877
- }, Co = {
1876
+ }, Eo = {
1878
1877
  slash_menu: {
1879
1878
  heading: {
1880
1879
  title: "Kop 1",
@@ -2179,7 +2178,7 @@ const yo = {
2179
2178
  generic: {
2180
2179
  ctrl_shortcut: "Ctrl"
2181
2180
  }
2182
- }, So = {
2181
+ }, Co = {
2183
2182
  slash_menu: {
2184
2183
  heading: {
2185
2184
  title: "Nagłówek 1",
@@ -2468,7 +2467,7 @@ const yo = {
2468
2467
  generic: {
2469
2468
  ctrl_shortcut: "Ctrl"
2470
2469
  }
2471
- }, Mo = {
2470
+ }, So = {
2472
2471
  slash_menu: {
2473
2472
  heading: {
2474
2473
  title: "Título",
@@ -2765,7 +2764,7 @@ const yo = {
2765
2764
  generic: {
2766
2765
  ctrl_shortcut: "Ctrl"
2767
2766
  }
2768
- }, To = {
2767
+ }, Mo = {
2769
2768
  slash_menu: {
2770
2769
  heading: {
2771
2770
  title: "Tiêu đề H1",
@@ -3069,7 +3068,7 @@ const yo = {
3069
3068
  generic: {
3070
3069
  ctrl_shortcut: "Ctrl"
3071
3070
  }
3072
- }, Bo = {
3071
+ }, To = {
3073
3072
  slash_menu: {
3074
3073
  heading: {
3075
3074
  title: "一级标题",
@@ -3407,7 +3406,7 @@ const yo = {
3407
3406
  generic: {
3408
3407
  ctrl_shortcut: "Ctrl"
3409
3408
  }
3410
- }, Lo = {
3409
+ }, Bo = {
3411
3410
  slash_menu: {
3412
3411
  heading: {
3413
3412
  title: "Заголовок 1 уровня",
@@ -3739,33 +3738,33 @@ const yo = {
3739
3738
  generic: {
3740
3739
  ctrl_shortcut: "Ctrl"
3741
3740
  }
3742
- }, Vr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3741
+ }, jr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3743
3742
  __proto__: null,
3744
- ar: yo,
3745
- en: Qe,
3746
- fr: wo,
3747
- is: vo,
3748
- ja: xo,
3749
- ko: Eo,
3750
- nl: Co,
3751
- pl: So,
3752
- pt: Mo,
3753
- ru: Lo,
3754
- vi: To,
3755
- zh: Bo
3743
+ ar: _o,
3744
+ en: et,
3745
+ fr: yo,
3746
+ is: wo,
3747
+ ja: vo,
3748
+ ko: xo,
3749
+ nl: Eo,
3750
+ pl: Co,
3751
+ pt: So,
3752
+ ru: Bo,
3753
+ vi: Mo,
3754
+ zh: To
3756
3755
  }, Symbol.toStringTag, { value: "Module" }));
3757
- function Io(e, t = JSON.stringify) {
3756
+ function Lo(e, t = JSON.stringify) {
3758
3757
  const o = {};
3759
3758
  return e.filter((i) => {
3760
3759
  const n = t(i);
3761
3760
  return Object.prototype.hasOwnProperty.call(o, n) ? !1 : o[n] = !0;
3762
3761
  });
3763
3762
  }
3764
- function Ao(e) {
3763
+ function Io(e) {
3765
3764
  const t = e.filter(
3766
3765
  (i, n) => e.indexOf(i) !== n
3767
3766
  );
3768
- return Io(t);
3767
+ return Lo(t);
3769
3768
  }
3770
3769
  const oe = M.create({
3771
3770
  name: "uniqueID",
@@ -3781,7 +3780,7 @@ const oe = M.create({
3781
3780
  const e = window.__TEST_OPTIONS;
3782
3781
  return e.mockID === void 0 ? e.mockID = 0 : e.mockID++, e.mockID.toString();
3783
3782
  }
3784
- return Wt();
3783
+ return $t();
3785
3784
  },
3786
3785
  filterTransaction: null
3787
3786
  };
@@ -3844,26 +3843,26 @@ const oe = M.create({
3844
3843
  });
3845
3844
  if (!r || a)
3846
3845
  return;
3847
- const { tr: s } = n, { types: l, attributeName: d, generateID: u } = this.options, p = At(
3846
+ const { tr: s } = n, { types: l, attributeName: d, generateID: u } = this.options, p = Nt(
3848
3847
  i.doc,
3849
3848
  o
3850
3849
  ), { mapping: h } = p;
3851
- if (Nt(p).forEach(({ newRange: m }) => {
3852
- const g = Pt(
3850
+ if (Pt(p).forEach(({ newRange: m }) => {
3851
+ const g = Ht(
3853
3852
  n.doc,
3854
3853
  m,
3855
3854
  (T) => l.includes(T.type.name)
3856
- ), b = g.map(({ node: T }) => T.attrs[d]).filter((T) => T !== null), A = Ao(b);
3855
+ ), b = g.map(({ node: T }) => T.attrs[d]).filter((T) => T !== null), A = Io(b);
3857
3856
  g.forEach(({ node: T, pos: N }) => {
3858
3857
  let Z;
3859
- const Ne = (Z = s.doc.nodeAt(N)) === null || Z === void 0 ? void 0 : Z.attrs[d];
3860
- if (Ne === null) {
3861
- const Pe = i.doc.type.createAndFill().content;
3862
- if (i.doc.content.findDiffStart(Pe) === null) {
3863
- const He = JSON.parse(
3858
+ const Pe = (Z = s.doc.nodeAt(N)) === null || Z === void 0 ? void 0 : Z.attrs[d];
3859
+ if (Pe === null) {
3860
+ const He = i.doc.type.createAndFill().content;
3861
+ if (i.doc.content.findDiffStart(He) === null) {
3862
+ const Ue = JSON.parse(
3864
3863
  JSON.stringify(n.doc.toJSON())
3865
3864
  );
3866
- if (He.content[0].content[0].attrs.id = "initialBlockId", JSON.stringify(He.content) === JSON.stringify(Pe.toJSON())) {
3865
+ if (Ue.content[0].content[0].attrs.id = "initialBlockId", JSON.stringify(Ue.content) === JSON.stringify(He.toJSON())) {
3867
3866
  s.setNodeMarkup(N, void 0, {
3868
3867
  ...T.attrs,
3869
3868
  [d]: "initialBlockId"
@@ -3877,8 +3876,8 @@ const oe = M.create({
3877
3876
  });
3878
3877
  return;
3879
3878
  }
3880
- const { deleted: Mt } = h.invert().mapResult(N);
3881
- Mt && A.includes(Ne) && s.setNodeMarkup(N, void 0, {
3879
+ const { deleted: Tt } = h.invert().mapResult(N);
3880
+ Tt && A.includes(Pe) && s.setNodeMarkup(N, void 0, {
3882
3881
  ...T.attrs,
3883
3882
  [d]: u()
3884
3883
  });
@@ -3938,7 +3937,7 @@ const oe = M.create({
3938
3937
  s.push(d);
3939
3938
  }), L.from(s);
3940
3939
  };
3941
- return t = !1, new D(
3940
+ return t = !1, new j(
3942
3941
  r(o.content),
3943
3942
  o.openStart,
3944
3943
  o.openEnd
@@ -3949,7 +3948,7 @@ const oe = M.create({
3949
3948
  ];
3950
3949
  }
3951
3950
  });
3952
- function et(e) {
3951
+ function tt(e) {
3953
3952
  const t = e.attrs.id, o = e.firstChild, i = o.type, n = e.childCount === 2 ? e.lastChild.childCount : 0;
3954
3953
  return {
3955
3954
  id: t,
@@ -3979,7 +3978,7 @@ function k(e, t) {
3979
3978
  break;
3980
3979
  s -= 1, a = n.node(s);
3981
3980
  }
3982
- const { id: l, contentNode: d, contentType: u, numChildBlocks: p } = et(a), h = n.start(s), f = n.end(s);
3981
+ const { id: l, contentNode: d, contentType: u, numChildBlocks: p } = tt(a), h = n.start(s), f = n.end(s);
3983
3982
  return {
3984
3983
  id: l,
3985
3984
  node: a,
@@ -3991,10 +3990,10 @@ function k(e, t) {
3991
3990
  depth: s
3992
3991
  };
3993
3992
  }
3994
- function je(e) {
3993
+ function Ve(e) {
3995
3994
  return e.type === "link";
3996
3995
  }
3997
- function tt(e) {
3996
+ function ot(e) {
3998
3997
  return typeof e != "string" && e.type === "link";
3999
3998
  }
4000
3999
  function te(e) {
@@ -4005,12 +4004,12 @@ class I extends Error {
4005
4004
  super(`Unreachable case: ${t}`);
4006
4005
  }
4007
4006
  }
4008
- function Rr(e, t = !0) {
4007
+ function Dr(e, t = !0) {
4009
4008
  const { "data-test": o, ...i } = e;
4010
4009
  if (Object.keys(i).length > 0 && t)
4011
4010
  throw new Error("Object must be empty " + JSON.stringify(e));
4012
4011
  }
4013
- function Ve(e, t, o) {
4012
+ function Re(e, t, o) {
4014
4013
  const i = [];
4015
4014
  for (const [n, r] of Object.entries(e.styles)) {
4016
4015
  const a = o[n];
@@ -4026,11 +4025,11 @@ function Ve(e, t, o) {
4026
4025
  return e.text.split(/(\n)/g).filter((n) => n.length > 0).map((n) => n === `
4027
4026
  ` ? t.nodes.hardBreak.create() : t.text(n, i));
4028
4027
  }
4029
- function No(e, t, o) {
4028
+ function Ao(e, t, o) {
4030
4029
  const i = t.marks.link.create({
4031
4030
  href: e.href
4032
4031
  });
4033
- return we(e.content, t, o).map(
4032
+ return ve(e.content, t, o).map(
4034
4033
  (n) => {
4035
4034
  if (n.type.name === "text")
4036
4035
  return n.mark([...n.marks, i]);
@@ -4040,29 +4039,29 @@ function No(e, t, o) {
4040
4039
  }
4041
4040
  );
4042
4041
  }
4043
- function we(e, t, o) {
4042
+ function ve(e, t, o) {
4044
4043
  const i = [];
4045
4044
  if (typeof e == "string")
4046
4045
  return i.push(
4047
- ...Ve(
4046
+ ...Re(
4048
4047
  { type: "text", text: e, styles: {} },
4049
4048
  t,
4050
4049
  o
4051
4050
  )
4052
4051
  ), i;
4053
4052
  for (const n of e)
4054
- i.push(...Ve(n, t, o));
4053
+ i.push(...Re(n, t, o));
4055
4054
  return i;
4056
4055
  }
4057
4056
  function W(e, t, o) {
4058
4057
  const i = [];
4059
4058
  for (const n of e)
4060
- typeof n == "string" ? i.push(...we(n, t, o)) : tt(n) ? i.push(...No(n, t, o)) : te(n) ? i.push(...we([n], t, o)) : i.push(
4061
- it(n, t, o)
4059
+ typeof n == "string" ? i.push(...ve(n, t, o)) : ot(n) ? i.push(...Ao(n, t, o)) : te(n) ? i.push(...ve([n], t, o)) : i.push(
4060
+ nt(n, t, o)
4062
4061
  );
4063
4062
  return i;
4064
4063
  }
4065
- function ot(e, t, o) {
4064
+ function it(e, t, o) {
4066
4065
  const i = [];
4067
4066
  for (const n of e.rows) {
4068
4067
  const r = [];
@@ -4084,7 +4083,7 @@ function ot(e, t, o) {
4084
4083
  }
4085
4084
  return i;
4086
4085
  }
4087
- function it(e, t, o) {
4086
+ function nt(e, t, o) {
4088
4087
  let i, n = e.type;
4089
4088
  if (n === void 0 && (n = "paragraph"), !t.nodes[n])
4090
4089
  throw new Error(`node type ${n} not found in schema`);
@@ -4097,7 +4096,7 @@ function it(e, t, o) {
4097
4096
  const r = W(e.content, t, o);
4098
4097
  i = t.nodes[n].create(e.props, r);
4099
4098
  } else if (e.content.type === "tableContent") {
4100
- const r = ot(e.content, t, o);
4099
+ const r = it(e.content, t, o);
4101
4100
  i = t.nodes[n].create(e.props, r);
4102
4101
  } else
4103
4102
  throw new I(e.content.type);
@@ -4106,7 +4105,7 @@ function it(e, t, o) {
4106
4105
  function P(e, t, o) {
4107
4106
  let i = e.id;
4108
4107
  i === void 0 && (i = oe.options.generateID());
4109
- const n = it(
4108
+ const n = nt(
4110
4109
  e,
4111
4110
  t,
4112
4111
  o
@@ -4123,7 +4122,7 @@ function P(e, t, o) {
4123
4122
  r.length > 0 ? [n, a] : n
4124
4123
  );
4125
4124
  }
4126
- function Po(e, t, o) {
4125
+ function No(e, t, o) {
4127
4126
  const i = {
4128
4127
  type: "tableContent",
4129
4128
  rows: []
@@ -4134,7 +4133,7 @@ function Po(e, t, o) {
4134
4133
  };
4135
4134
  n.content.forEach((a) => {
4136
4135
  r.cells.push(
4137
- Ce(
4136
+ Se(
4138
4137
  a.firstChild,
4139
4138
  t,
4140
4139
  o
@@ -4143,7 +4142,7 @@ function Po(e, t, o) {
4143
4142
  }), i.rows.push(r);
4144
4143
  }), i;
4145
4144
  }
4146
- function Ce(e, t, o) {
4145
+ function Se(e, t, o) {
4147
4146
  const i = [];
4148
4147
  let n;
4149
4148
  return e.content.forEach((r) => {
@@ -4152,7 +4151,7 @@ function Ce(e, t, o) {
4152
4151
  if (te(n))
4153
4152
  n.text += `
4154
4153
  `;
4155
- else if (je(n))
4154
+ else if (Ve(n))
4156
4155
  n.content[n.content.length - 1].text += `
4157
4156
  `;
4158
4157
  else
@@ -4168,7 +4167,7 @@ function Ce(e, t, o) {
4168
4167
  }
4169
4168
  if (r.type.name !== "link" && r.type.name !== "text" && t[r.type.name]) {
4170
4169
  n && (i.push(n), n = void 0), i.push(
4171
- nt(r, t, o)
4170
+ rt(r, t, o)
4172
4171
  );
4173
4172
  return;
4174
4173
  }
@@ -4202,7 +4201,7 @@ function Ce(e, t, o) {
4202
4201
  type: "text",
4203
4202
  text: r.textContent,
4204
4203
  styles: a
4205
- }) : je(n) && (s ? n.href === s.attrs.href ? JSON.stringify(
4204
+ }) : Ve(n) && (s ? n.href === s.attrs.href ? JSON.stringify(
4206
4205
  n.content[n.content.length - 1].styles
4207
4206
  ) === JSON.stringify(a) ? n.content[n.content.length - 1].text += r.textContent : n.content.push({
4208
4207
  type: "text",
@@ -4239,7 +4238,7 @@ function Ce(e, t, o) {
4239
4238
  };
4240
4239
  }), n && i.push(n), i;
4241
4240
  }
4242
- function nt(e, t, o) {
4241
+ function rt(e, t, o) {
4243
4242
  if (e.type.name === "text" || e.type.name === "link")
4244
4243
  throw new Error("unexpected");
4245
4244
  const i = {}, n = t[e.type.name];
@@ -4250,7 +4249,7 @@ function nt(e, t, o) {
4250
4249
  s in d && (i[s] = l);
4251
4250
  }
4252
4251
  let r;
4253
- return n.content === "styled" ? r = Ce(
4252
+ return n.content === "styled" ? r = Se(
4254
4253
  e,
4255
4254
  t,
4256
4255
  o
@@ -4268,7 +4267,7 @@ function v(e, t, o, i, n) {
4268
4267
  const r = n == null ? void 0 : n.get(e);
4269
4268
  if (r)
4270
4269
  return r;
4271
- const a = et(e);
4270
+ const a = tt(e);
4272
4271
  let s = a.id;
4273
4272
  s === null && (s = oe.options.generateID());
4274
4273
  const l = {};
@@ -4297,13 +4296,13 @@ function v(e, t, o, i, n) {
4297
4296
  );
4298
4297
  let p;
4299
4298
  if (d.content === "inline")
4300
- p = Ce(
4299
+ p = Se(
4301
4300
  a.contentNode,
4302
4301
  o,
4303
4302
  i
4304
4303
  );
4305
4304
  else if (d.content === "table")
4306
- p = Po(
4305
+ p = No(
4307
4306
  a.contentNode,
4308
4307
  o,
4309
4308
  i
@@ -4321,14 +4320,14 @@ function v(e, t, o, i, n) {
4321
4320
  };
4322
4321
  return n == null || n.set(e, h), h;
4323
4322
  }
4324
- function Ho(e) {
4323
+ function Po(e) {
4325
4324
  return e.document || window.document;
4326
4325
  }
4327
- const rt = (e, t, o, i, n) => {
4326
+ const at = (e, t, o, i, n) => {
4328
4327
  if (!o.nodes[e.type.name])
4329
4328
  throw new Error("Serializer is missing a node type: " + e.type.name);
4330
- const { dom: r, contentDOM: a } = ve.renderSpec(
4331
- Ho(t),
4329
+ const { dom: r, contentDOM: a } = xe.renderSpec(
4330
+ Po(t),
4332
4331
  o.nodes[e.type.name](e)
4333
4332
  );
4334
4333
  if (a) {
@@ -4367,11 +4366,11 @@ const rt = (e, t, o, i, n) => {
4367
4366
  o.serializeFragment(e.content, t, a);
4368
4367
  }
4369
4368
  return r;
4370
- }, at = (e, t, o) => {
4369
+ }, st = (e, t, o) => {
4371
4370
  const i = t.serializeFragment(e, o), n = document.createElement("div");
4372
4371
  return n.appendChild(i), n.innerHTML;
4373
4372
  };
4374
- function Uo(e) {
4373
+ function Ho(e) {
4375
4374
  const t = /* @__PURE__ */ new Set([
4376
4375
  ...e.orderedListItemBlockTypes,
4377
4376
  ...e.unorderedListItemBlockTypes
@@ -4409,10 +4408,10 @@ function Uo(e) {
4409
4408
  s -= m, n -= m, r = void 0;
4410
4409
  }
4411
4410
  if (h) {
4412
- r || (r = ye(
4411
+ r || (r = we(
4413
4412
  document.createElement(f)
4414
4413
  ));
4415
- const m = ye(
4414
+ const m = we(
4416
4415
  document.createElement("li")
4417
4416
  );
4418
4417
  m.children.push(...u.children), p && m.children.push(...p.children), r.children.push(m);
@@ -4432,14 +4431,14 @@ function Uo(e) {
4432
4431
  return o;
4433
4432
  }
4434
4433
  const se = (e, t) => {
4435
- const o = ve.fromSchema(e);
4436
- return o.serializeNodeInner = (i, n) => rt(i, n, o, t, !0), o.exportProseMirrorFragment = (i, n) => xe().use(Ze, { fragment: !0 }).use(Uo, {
4434
+ const o = xe.fromSchema(e);
4435
+ return o.serializeNodeInner = (i, n) => at(i, n, o, t, !0), o.exportProseMirrorFragment = (i, n) => Ee().use(Je, { fragment: !0 }).use(Ho, {
4437
4436
  orderedListItemBlockTypes: /* @__PURE__ */ new Set(["numberedListItem"]),
4438
4437
  unorderedListItemBlockTypes: /* @__PURE__ */ new Set([
4439
4438
  "bulletListItem",
4440
4439
  "checkListItem"
4441
4440
  ])
4442
- }).use(Je).processSync(at(i, o, n)).value, o.exportBlocks = (i, n) => {
4441
+ }).use(Ye).processSync(st(i, o, n)).value, o.exportBlocks = (i, n) => {
4443
4442
  const r = i.map(
4444
4443
  (s) => P(s, e, t.schema.styleSchema)
4445
4444
  ), a = e.nodes.blockGroup.create(null, r);
@@ -4448,9 +4447,9 @@ const se = (e, t) => {
4448
4447
  n
4449
4448
  );
4450
4449
  }, o;
4451
- }, Se = (e, t) => {
4452
- const o = ve.fromSchema(e);
4453
- return o.serializeNodeInner = (i, n) => rt(i, n, o, t, !1), o.serializeProseMirrorFragment = (i, n) => at(i, o, n), o.serializeBlocks = (i, n) => {
4450
+ }, Me = (e, t) => {
4451
+ const o = xe.fromSchema(e);
4452
+ return o.serializeNodeInner = (i, n) => at(i, n, o, t, !1), o.serializeProseMirrorFragment = (i, n) => st(i, o, n), o.serializeBlocks = (i, n) => {
4454
4453
  const r = i.map(
4455
4454
  (s) => P(s, e, t.schema.styleSchema)
4456
4455
  ), a = e.nodes.blockGroup.create(null, r);
@@ -4459,24 +4458,24 @@ const se = (e, t) => {
4459
4458
  n
4460
4459
  );
4461
4460
  }, o;
4462
- }, Do = () => typeof navigator < "u" && (/Mac/.test(navigator.platform) || /AppleWebKit/.test(navigator.userAgent) && /Mobile\/\w+/.test(navigator.userAgent));
4461
+ }, Uo = () => typeof navigator < "u" && (/Mac/.test(navigator.platform) || /AppleWebKit/.test(navigator.userAgent) && /Mobile\/\w+/.test(navigator.userAgent));
4463
4462
  function H(e, t = "Ctrl") {
4464
- return Do() ? e.replace("Mod", "⌘") : e.replace("Mod", t);
4463
+ return Uo() ? e.replace("Mod", "⌘") : e.replace("Mod", t);
4465
4464
  }
4466
- function j(...e) {
4465
+ function D(...e) {
4467
4466
  return e.filter((t) => t).join(" ");
4468
4467
  }
4469
- const Or = () => /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
4468
+ const Vr = () => /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
4470
4469
  function V(e, t, o, i) {
4471
4470
  const n = document.createElement("div");
4472
- n.className = j(
4471
+ n.className = D(
4473
4472
  "bn-block-content",
4474
4473
  o.class
4475
4474
  ), n.setAttribute("data-content-type", e);
4476
4475
  for (const [a, s] of Object.entries(o))
4477
4476
  a !== "class" && n.setAttribute(a, s);
4478
4477
  const r = document.createElement(t);
4479
- r.className = j(
4478
+ r.className = D(
4480
4479
  "bn-inline-content",
4481
4480
  i.class
4482
4481
  );
@@ -4489,7 +4488,7 @@ function V(e, t, o, i) {
4489
4488
  contentDOM: r
4490
4489
  };
4491
4490
  }
4492
- const Re = (e, t) => {
4491
+ const Oe = (e, t) => {
4493
4492
  const o = P(e, t.pmSchema, t.schema.styleSchema).firstChild, i = t.pmSchema.nodes[o.type.name].spec.toDOM;
4494
4493
  if (i === void 0)
4495
4494
  throw new Error(
@@ -4512,18 +4511,18 @@ const Re = (e, t) => {
4512
4511
  default: "left",
4513
4512
  values: ["left", "center", "right", "justify"]
4514
4513
  }
4515
- }, st = ["backgroundColor", "textColor"];
4514
+ }, lt = ["backgroundColor", "textColor"];
4516
4515
  function ae(e) {
4517
4516
  return "data-" + e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
4518
4517
  }
4519
- function zr(e) {
4518
+ function Rr(e) {
4520
4519
  const t = e.split("/");
4521
4520
  return !t.length || // invalid?
4522
4521
  t[t.length - 1] === "" ? e : t[t.length - 1];
4523
4522
  }
4524
- function lt(e) {
4523
+ function dt(e) {
4525
4524
  const t = {};
4526
- return Object.entries(e).filter(([o, i]) => !st.includes(o)).forEach(([o, i]) => {
4525
+ return Object.entries(e).filter(([o, i]) => !lt.includes(o)).forEach(([o, i]) => {
4527
4526
  t[o] = {
4528
4527
  default: i.default,
4529
4528
  keepOnSplit: !0,
@@ -4566,13 +4565,13 @@ function fe(e, t, o, i, n = !1, r) {
4566
4565
  if (r !== void 0)
4567
4566
  for (const [s, l] of Object.entries(r))
4568
4567
  s !== "class" && a.setAttribute(s, l);
4569
- a.className = j(
4568
+ a.className = D(
4570
4569
  "bn-block-content",
4571
4570
  (r == null ? void 0 : r.class) || ""
4572
4571
  ), a.setAttribute("data-content-type", t);
4573
4572
  for (const [s, l] of Object.entries(o))
4574
- !st.includes(s) && l !== i[s].default && a.setAttribute(ae(s), l);
4575
- return n && a.setAttribute("data-file-block", ""), a.appendChild(e.dom), e.contentDOM !== void 0 && (e.contentDOM.className = j(
4573
+ !lt.includes(s) && l !== i[s].default && a.setAttribute(ae(s), l);
4574
+ return n && a.setAttribute("data-file-block", ""), a.appendChild(e.dom), e.contentDOM !== void 0 && (e.contentDOM.className = D(
4576
4575
  "bn-inline-content",
4577
4576
  e.contentDOM.className
4578
4577
  ), e.contentDOM.setAttribute("data-editable", "")), {
@@ -4583,14 +4582,14 @@ function fe(e, t, o, i, n = !1, r) {
4583
4582
  function O(e) {
4584
4583
  return $.create(e);
4585
4584
  }
4586
- function dt(e, t) {
4585
+ function ct(e, t) {
4587
4586
  return {
4588
4587
  config: e,
4589
4588
  implementation: t
4590
4589
  };
4591
4590
  }
4592
4591
  function q(e, t, o) {
4593
- return dt(
4592
+ return ct(
4594
4593
  {
4595
4594
  type: e.name,
4596
4595
  content: e.config.content === "inline*" ? "inline" : e.config.content === "tableRow+" ? "table" : "none",
@@ -4599,18 +4598,18 @@ function q(e, t, o) {
4599
4598
  {
4600
4599
  node: e,
4601
4600
  requiredExtensions: o,
4602
- toInternalHTML: Re,
4603
- toExternalHTML: Re
4601
+ toInternalHTML: Oe,
4602
+ toExternalHTML: Oe
4604
4603
  // parse: () => undefined, // parse rules are in node already
4605
4604
  }
4606
4605
  );
4607
4606
  }
4608
- function ct(e) {
4607
+ function ut(e) {
4609
4608
  return Object.fromEntries(
4610
4609
  Object.entries(e).map(([t, o]) => [t, o.config])
4611
4610
  );
4612
4611
  }
4613
- function Vo(e, t) {
4612
+ function Do(e, t) {
4614
4613
  const o = [
4615
4614
  {
4616
4615
  tag: "[data-content-type=" + e.type + "]",
@@ -4634,10 +4633,10 @@ function le(e, t) {
4634
4633
  group: "blockContent",
4635
4634
  selectable: !0,
4636
4635
  addAttributes() {
4637
- return lt(e.propSchema);
4636
+ return dt(e.propSchema);
4638
4637
  },
4639
4638
  parseHTML() {
4640
- return Vo(e, t.parse);
4639
+ return Do(e, t.parse);
4641
4640
  },
4642
4641
  renderHTML() {
4643
4642
  const i = document.createElement("div");
@@ -4668,7 +4667,7 @@ function le(e, t) {
4668
4667
  throw new Error(
4669
4668
  "Node name does not match block type. This is a bug in BlockNote."
4670
4669
  );
4671
- return dt(e, {
4670
+ return ct(e, {
4672
4671
  node: o,
4673
4672
  toInternalHTML: (i, n) => {
4674
4673
  var s;
@@ -4700,10 +4699,10 @@ function le(e, t) {
4700
4699
  }
4701
4700
  });
4702
4701
  }
4703
- function Ro(e, t, o, i) {
4702
+ function Vo(e, t, o, i) {
4704
4703
  return e.dom.setAttribute("data-inline-content-type", t), Object.entries(o).filter(([n, r]) => r !== i[n].default).map(([n, r]) => [ae(n), r]).forEach(([n, r]) => e.dom.setAttribute(n, r)), e.contentDOM !== void 0 && e.contentDOM.setAttribute("data-editable", ""), e;
4705
4704
  }
4706
- function Oo(e) {
4705
+ function Ro(e) {
4707
4706
  return {
4708
4707
  Backspace: ({ editor: t }) => {
4709
4708
  const o = t.state.selection.$from;
@@ -4711,14 +4710,14 @@ function Oo(e) {
4711
4710
  }
4712
4711
  };
4713
4712
  }
4714
- function zo(e, t) {
4713
+ function Oo(e, t) {
4715
4714
  return {
4716
4715
  config: e,
4717
4716
  implementation: t
4718
4717
  };
4719
4718
  }
4720
- function Fo(e, t) {
4721
- return zo(
4719
+ function zo(e, t) {
4720
+ return Oo(
4722
4721
  {
4723
4722
  type: e.name,
4724
4723
  propSchema: t,
@@ -4729,12 +4728,12 @@ function Fo(e, t) {
4729
4728
  }
4730
4729
  );
4731
4730
  }
4732
- function ut(e) {
4731
+ function pt(e) {
4733
4732
  return Object.fromEntries(
4734
4733
  Object.entries(e).map(([t, o]) => [t, o.config])
4735
4734
  );
4736
4735
  }
4737
- function Go(e) {
4736
+ function Fo(e) {
4738
4737
  return [
4739
4738
  {
4740
4739
  tag: `[data-inline-content-type="${e.type}"]`,
@@ -4745,7 +4744,7 @@ function Go(e) {
4745
4744
  }
4746
4745
  ];
4747
4746
  }
4748
- function Fr(e, t) {
4747
+ function Or(e, t) {
4749
4748
  const o = $.create({
4750
4749
  name: e.type,
4751
4750
  inline: !0,
@@ -4754,24 +4753,24 @@ function Fr(e, t) {
4754
4753
  atom: e.content === "none",
4755
4754
  content: e.content === "styled" ? "inline*" : "",
4756
4755
  addAttributes() {
4757
- return lt(e.propSchema);
4756
+ return dt(e.propSchema);
4758
4757
  },
4759
4758
  addKeyboardShortcuts() {
4760
- return Oo(e);
4759
+ return Ro(e);
4761
4760
  },
4762
4761
  parseHTML() {
4763
- return Go(e);
4762
+ return Fo(e);
4764
4763
  },
4765
4764
  renderHTML({ node: i }) {
4766
4765
  const n = this.options.editor, r = t.render(
4767
- nt(
4766
+ rt(
4768
4767
  i,
4769
4768
  n.schema.inlineContentSchema,
4770
4769
  n.schema.styleSchema
4771
4770
  )
4772
4771
  // TODO: fix cast
4773
4772
  );
4774
- return Ro(
4773
+ return Vo(
4775
4774
  r,
4776
4775
  e.type,
4777
4776
  i.attrs,
@@ -4779,12 +4778,12 @@ function Fr(e, t) {
4779
4778
  );
4780
4779
  }
4781
4780
  });
4782
- return Fo(
4781
+ return zo(
4783
4782
  o,
4784
4783
  e.propSchema
4785
4784
  );
4786
4785
  }
4787
- function Ko(e) {
4786
+ function Go(e) {
4788
4787
  return e === "boolean" ? {} : {
4789
4788
  stringValue: {
4790
4789
  default: void 0,
@@ -4796,17 +4795,17 @@ function Ko(e) {
4796
4795
  }
4797
4796
  };
4798
4797
  }
4799
- function Wo(e, t, o, i) {
4798
+ function Ko(e, t, o, i) {
4800
4799
  return e.dom.setAttribute("data-style-type", t), i === "string" && e.dom.setAttribute("data-value", o), e.contentDOM !== void 0 && e.contentDOM.setAttribute("data-editable", ""), e;
4801
4800
  }
4802
- function pt(e, t) {
4801
+ function ht(e, t) {
4803
4802
  return {
4804
4803
  config: e,
4805
4804
  implementation: t
4806
4805
  };
4807
4806
  }
4808
4807
  function U(e, t) {
4809
- return pt(
4808
+ return ht(
4810
4809
  {
4811
4810
  type: e.name,
4812
4811
  propSchema: t
@@ -4816,12 +4815,12 @@ function U(e, t) {
4816
4815
  }
4817
4816
  );
4818
4817
  }
4819
- function ht(e) {
4818
+ function mt(e) {
4820
4819
  return Object.fromEntries(
4821
4820
  Object.entries(e).map(([t, o]) => [t, o.config])
4822
4821
  );
4823
4822
  }
4824
- function $o(e) {
4823
+ function Wo(e) {
4825
4824
  return [
4826
4825
  {
4827
4826
  tag: `[data-style-type="${e.type}"]`,
@@ -4832,14 +4831,14 @@ function $o(e) {
4832
4831
  }
4833
4832
  ];
4834
4833
  }
4835
- function Gr(e, t) {
4836
- const o = Ee.create({
4834
+ function zr(e, t) {
4835
+ const o = Ce.create({
4837
4836
  name: e.type,
4838
4837
  addAttributes() {
4839
- return Ko(e.propSchema);
4838
+ return Go(e.propSchema);
4840
4839
  },
4841
4840
  parseHTML() {
4842
- return $o(e);
4841
+ return Wo(e);
4843
4842
  },
4844
4843
  renderHTML({ mark: i }) {
4845
4844
  let n;
@@ -4849,7 +4848,7 @@ function Gr(e, t) {
4849
4848
  n = t.render(i.attrs.stringValue);
4850
4849
  else
4851
4850
  throw new I(e.propSchema);
4852
- return Wo(
4851
+ return Ko(
4853
4852
  n,
4854
4853
  e.type,
4855
4854
  i.attrs.stringValue,
@@ -4857,7 +4856,7 @@ function Gr(e, t) {
4857
4856
  );
4858
4857
  }
4859
4858
  });
4860
- return pt(e, {
4859
+ return ht(e, {
4861
4860
  mark: o
4862
4861
  });
4863
4862
  }
@@ -4911,7 +4910,7 @@ const de = (e) => {
4911
4910
  );
4912
4911
  }
4913
4912
  };
4914
- }, Oe = (e) => ({ url: e.src || void 0 }), ue = (e, t) => {
4913
+ }, ze = (e) => ({ url: e.src || void 0 }), ue = (e, t) => {
4915
4914
  const o = e.querySelector(
4916
4915
  t
4917
4916
  );
@@ -4924,10 +4923,10 @@ const de = (e) => {
4924
4923
  return i.textContent = t, o.appendChild(e), o.appendChild(i), {
4925
4924
  dom: o
4926
4925
  };
4927
- }, Me = (e, t) => {
4926
+ }, Te = (e, t) => {
4928
4927
  const o = document.createElement("figure"), i = document.createElement("figcaption");
4929
4928
  return i.textContent = t, o.appendChild(e), o.appendChild(i), { dom: o };
4930
- }, mt = (e, t, o, i, n) => {
4929
+ }, ft = (e, t, o, i, n) => {
4931
4930
  if (!e.props.previewWidth)
4932
4931
  throw new Error("Block must have a `previewWidth` prop.");
4933
4932
  const r = document.createElement("div");
@@ -4987,7 +4986,7 @@ const de = (e) => {
4987
4986
  );
4988
4987
  }
4989
4988
  };
4990
- }, ze = (e) => ({ url: e.src || void 0 }), qo = {
4989
+ }, Fe = (e) => ({ url: e.src || void 0 }), $o = {
4991
4990
  backgroundColor: _.backgroundColor,
4992
4991
  // File name.
4993
4992
  name: {
@@ -5004,13 +5003,13 @@ const de = (e) => {
5004
5003
  showPreview: {
5005
5004
  default: !0
5006
5005
  }
5007
- }, Xo = {
5006
+ }, qo = {
5008
5007
  type: "audio",
5009
- propSchema: qo,
5008
+ propSchema: $o,
5010
5009
  content: "none",
5011
5010
  isFileBlock: !0,
5012
5011
  fileBlockAcceptMimeTypes: ["audio/*"]
5013
- }, Zo = (e, t) => {
5012
+ }, Xo = (e, t) => {
5014
5013
  const o = document.createElement("div");
5015
5014
  if (o.className = "bn-file-block-content-wrapper", e.props.url === "") {
5016
5015
  const i = document.createElement("div");
@@ -5043,20 +5042,20 @@ const de = (e) => {
5043
5042
  dom: R(e, i).dom
5044
5043
  };
5045
5044
  }
5046
- }, Jo = (e) => {
5045
+ }, Zo = (e) => {
5047
5046
  if (e.tagName === "AUDIO")
5048
- return ze(e);
5047
+ return Fe(e);
5049
5048
  if (e.tagName === "FIGURE") {
5050
5049
  const t = ue(e, "audio");
5051
5050
  if (!t)
5052
5051
  return;
5053
5052
  const { targetElement: o, caption: i } = t;
5054
5053
  return {
5055
- ...ze(o),
5054
+ ...Fe(o),
5056
5055
  caption: i
5057
5056
  };
5058
5057
  }
5059
- }, Yo = (e) => {
5058
+ }, Jo = (e) => {
5060
5059
  if (!e.props.url) {
5061
5060
  const o = document.createElement("p");
5062
5061
  return o.textContent = "Add audio", {
@@ -5064,14 +5063,14 @@ const de = (e) => {
5064
5063
  };
5065
5064
  }
5066
5065
  let t;
5067
- return e.props.showPreview ? (t = document.createElement("audio"), t.src = e.props.url) : (t = document.createElement("a"), t.href = e.props.url, t.textContent = e.props.name || e.props.url), e.props.caption ? e.props.showPreview ? Me(t, e.props.caption) : pe(t, e.props.caption) : {
5066
+ return e.props.showPreview ? (t = document.createElement("audio"), t.src = e.props.url) : (t = document.createElement("a"), t.href = e.props.url, t.textContent = e.props.name || e.props.url), e.props.caption ? e.props.showPreview ? Te(t, e.props.caption) : pe(t, e.props.caption) : {
5068
5067
  dom: t
5069
5068
  };
5070
- }, Qo = le(Xo, {
5071
- render: Zo,
5072
- parse: Jo,
5073
- toExternalHTML: Yo
5074
- }), ei = {
5069
+ }, Yo = le(qo, {
5070
+ render: Xo,
5071
+ parse: Zo,
5072
+ toExternalHTML: Jo
5073
+ }), Qo = {
5075
5074
  backgroundColor: _.backgroundColor,
5076
5075
  // File name.
5077
5076
  name: {
@@ -5085,12 +5084,12 @@ const de = (e) => {
5085
5084
  caption: {
5086
5085
  default: ""
5087
5086
  }
5088
- }, ti = {
5087
+ }, ei = {
5089
5088
  type: "file",
5090
- propSchema: ei,
5089
+ propSchema: Qo,
5091
5090
  content: "none",
5092
5091
  isFileBlock: !0
5093
- }, oi = (e, t) => {
5092
+ }, ti = (e, t) => {
5094
5093
  const o = document.createElement("div");
5095
5094
  if (o.className = "bn-file-block-content-wrapper", e.props.url === "") {
5096
5095
  const i = ce(e, t);
@@ -5104,20 +5103,20 @@ const de = (e) => {
5104
5103
  dom: o
5105
5104
  };
5106
5105
  }
5107
- }, ii = (e) => {
5106
+ }, oi = (e) => {
5108
5107
  if (e.tagName === "EMBED")
5109
- return Oe(e);
5108
+ return ze(e);
5110
5109
  if (e.tagName === "FIGURE") {
5111
5110
  const t = ue(e, "embed");
5112
5111
  if (!t)
5113
5112
  return;
5114
5113
  const { targetElement: o, caption: i } = t;
5115
5114
  return {
5116
- ...Oe(o),
5115
+ ...ze(o),
5117
5116
  caption: i
5118
5117
  };
5119
5118
  }
5120
- }, ni = (e) => {
5119
+ }, ii = (e) => {
5121
5120
  if (!e.props.url) {
5122
5121
  const o = document.createElement("p");
5123
5122
  return o.textContent = "Add file", {
@@ -5128,14 +5127,14 @@ const de = (e) => {
5128
5127
  return t.href = e.props.url, t.textContent = e.props.name || e.props.url, e.props.caption ? pe(t, e.props.caption) : {
5129
5128
  dom: t
5130
5129
  };
5131
- }, ri = le(ti, {
5132
- render: oi,
5133
- parse: ii,
5134
- toExternalHTML: ni
5135
- }), Fe = (e) => {
5130
+ }, ni = le(ei, {
5131
+ render: ti,
5132
+ parse: oi,
5133
+ toExternalHTML: ii
5134
+ }), Ge = (e) => {
5136
5135
  const t = e.src || void 0, o = e.width || void 0;
5137
5136
  return { url: t, previewWidth: o };
5138
- }, ai = {
5137
+ }, ri = {
5139
5138
  textAlignment: _.textAlignment,
5140
5139
  backgroundColor: _.backgroundColor,
5141
5140
  // File name.
@@ -5157,13 +5156,13 @@ const de = (e) => {
5157
5156
  previewWidth: {
5158
5157
  default: 512
5159
5158
  }
5160
- }, si = {
5159
+ }, ai = {
5161
5160
  type: "image",
5162
- propSchema: ai,
5161
+ propSchema: ri,
5163
5162
  content: "none",
5164
5163
  isFileBlock: !0,
5165
5164
  fileBlockAcceptMimeTypes: ["image/*"]
5166
- }, li = (e, t) => {
5165
+ }, si = (e, t) => {
5167
5166
  const o = document.createElement("div");
5168
5167
  if (o.className = "bn-file-block-content-wrapper", e.props.url === "") {
5169
5168
  const i = document.createElement("div");
@@ -5189,7 +5188,7 @@ const de = (e) => {
5189
5188
  e.props.previewWidth,
5190
5189
  t.domElement.firstElementChild.clientWidth
5191
5190
  );
5192
- const n = mt(
5191
+ const n = ft(
5193
5192
  e,
5194
5193
  t,
5195
5194
  i,
@@ -5206,20 +5205,20 @@ const de = (e) => {
5206
5205
  dom: R(e, i).dom
5207
5206
  };
5208
5207
  }
5209
- }, di = (e) => {
5208
+ }, li = (e) => {
5210
5209
  if (e.tagName === "IMG")
5211
- return Fe(e);
5210
+ return Ge(e);
5212
5211
  if (e.tagName === "FIGURE") {
5213
5212
  const t = ue(e, "img");
5214
5213
  if (!t)
5215
5214
  return;
5216
5215
  const { targetElement: o, caption: i } = t;
5217
5216
  return {
5218
- ...Fe(o),
5217
+ ...Ge(o),
5219
5218
  caption: i
5220
5219
  };
5221
5220
  }
5222
- }, ci = (e) => {
5221
+ }, di = (e) => {
5223
5222
  if (!e.props.url) {
5224
5223
  const o = document.createElement("p");
5225
5224
  return o.textContent = "Add image", {
@@ -5227,17 +5226,17 @@ const de = (e) => {
5227
5226
  };
5228
5227
  }
5229
5228
  let t;
5230
- return e.props.showPreview ? (t = document.createElement("img"), t.src = e.props.url, t.alt = e.props.name || e.props.caption || "BlockNote image", t.width = e.props.previewWidth) : (t = document.createElement("a"), t.href = e.props.url, t.textContent = e.props.name || e.props.url), e.props.caption ? e.props.showPreview ? Me(t, e.props.caption) : pe(t, e.props.caption) : {
5229
+ return e.props.showPreview ? (t = document.createElement("img"), t.src = e.props.url, t.alt = e.props.name || e.props.caption || "BlockNote image", t.width = e.props.previewWidth) : (t = document.createElement("a"), t.href = e.props.url, t.textContent = e.props.name || e.props.url), e.props.caption ? e.props.showPreview ? Te(t, e.props.caption) : pe(t, e.props.caption) : {
5231
5230
  dom: t
5232
5231
  };
5233
- }, ui = le(si, {
5234
- render: li,
5235
- parse: di,
5236
- toExternalHTML: ci
5237
- }), Ge = (e) => {
5232
+ }, ci = le(ai, {
5233
+ render: si,
5234
+ parse: li,
5235
+ toExternalHTML: di
5236
+ }), Ke = (e) => {
5238
5237
  const t = e.src || void 0, o = e.width || void 0;
5239
5238
  return { url: t, previewWidth: o };
5240
- }, pi = {
5239
+ }, ui = {
5241
5240
  textAlignment: _.textAlignment,
5242
5241
  backgroundColor: _.backgroundColor,
5243
5242
  // File name.
@@ -5259,13 +5258,13 @@ const de = (e) => {
5259
5258
  previewWidth: {
5260
5259
  default: 512
5261
5260
  }
5262
- }, hi = {
5261
+ }, pi = {
5263
5262
  type: "video",
5264
- propSchema: pi,
5263
+ propSchema: ui,
5265
5264
  content: "none",
5266
5265
  isFileBlock: !0,
5267
5266
  fileBlockAcceptMimeTypes: ["video/*"]
5268
- }, mi = (e, t) => {
5267
+ }, hi = (e, t) => {
5269
5268
  const o = document.createElement("div");
5270
5269
  if (o.className = "bn-file-block-content-wrapper", e.props.url === "") {
5271
5270
  const i = document.createElement("div");
@@ -5289,7 +5288,7 @@ const de = (e) => {
5289
5288
  e.props.previewWidth,
5290
5289
  t.domElement.firstElementChild.clientWidth
5291
5290
  );
5292
- const n = mt(
5291
+ const n = ft(
5293
5292
  e,
5294
5293
  t,
5295
5294
  i,
@@ -5306,20 +5305,20 @@ const de = (e) => {
5306
5305
  dom: R(e, i).dom
5307
5306
  };
5308
5307
  }
5309
- }, fi = (e) => {
5308
+ }, mi = (e) => {
5310
5309
  if (e.tagName === "VIDEO")
5311
- return Ge(e);
5310
+ return Ke(e);
5312
5311
  if (e.tagName === "FIGURE") {
5313
5312
  const t = ue(e, "video");
5314
5313
  if (!t)
5315
5314
  return;
5316
5315
  const { targetElement: o, caption: i } = t;
5317
5316
  return {
5318
- ...Ge(o),
5317
+ ...Ke(o),
5319
5318
  caption: i
5320
5319
  };
5321
5320
  }
5322
- }, gi = (e) => {
5321
+ }, fi = (e) => {
5323
5322
  if (!e.props.url) {
5324
5323
  const o = document.createElement("p");
5325
5324
  return o.textContent = "Add video", {
@@ -5327,14 +5326,14 @@ const de = (e) => {
5327
5326
  };
5328
5327
  }
5329
5328
  let t;
5330
- return e.props.showPreview ? (t = document.createElement("video"), t.src = e.props.url, t.width = e.props.previewWidth) : (t = document.createElement("a"), t.href = e.props.url, t.textContent = e.props.name || e.props.url), e.props.caption ? e.props.showPreview ? Me(t, e.props.caption) : pe(t, e.props.caption) : {
5329
+ return e.props.showPreview ? (t = document.createElement("video"), t.src = e.props.url, t.width = e.props.previewWidth) : (t = document.createElement("a"), t.href = e.props.url, t.textContent = e.props.name || e.props.url), e.props.caption ? e.props.showPreview ? Te(t, e.props.caption) : pe(t, e.props.caption) : {
5331
5330
  dom: t
5332
5331
  };
5333
- }, bi = le(hi, {
5334
- render: mi,
5335
- parse: fi,
5336
- toExternalHTML: gi
5337
- }), Kr = async (e) => {
5332
+ }, gi = le(pi, {
5333
+ render: hi,
5334
+ parse: mi,
5335
+ toExternalHTML: fi
5336
+ }), Fr = async (e) => {
5338
5337
  const t = new FormData();
5339
5338
  return t.append("file", e), (await (await fetch("https://tmpfiles.org/api/v1/upload", {
5340
5339
  method: "POST",
@@ -5343,7 +5342,7 @@ const de = (e) => {
5343
5342
  "tmpfiles.org/",
5344
5343
  "tmpfiles.org/dl/"
5345
5344
  );
5346
- }, ki = Ee.create({
5345
+ }, bi = Ce.create({
5347
5346
  name: "backgroundColor",
5348
5347
  addAttributes() {
5349
5348
  return {
@@ -5369,10 +5368,10 @@ const de = (e) => {
5369
5368
  renderHTML({ HTMLAttributes: e }) {
5370
5369
  return ["span", e, 0];
5371
5370
  }
5372
- }), _i = U(
5373
- ki,
5371
+ }), ki = U(
5372
+ bi,
5374
5373
  "string"
5375
- ), yi = Ee.create({
5374
+ ), _i = Ce.create({
5376
5375
  name: "textColor",
5377
5376
  addAttributes() {
5378
5377
  return {
@@ -5396,16 +5395,16 @@ const de = (e) => {
5396
5395
  renderHTML({ HTMLAttributes: e }) {
5397
5396
  return ["span", e, 0];
5398
5397
  }
5399
- }), wi = U(yi, "string"), C = (e) => {
5398
+ }), yi = U(_i, "string"), C = (e) => {
5400
5399
  const { contentType: t } = k(
5401
5400
  e.state.doc,
5402
5401
  e.state.selection.from
5403
5402
  );
5404
5403
  return t.spec.content;
5405
- }, vi = {
5404
+ }, wi = {
5406
5405
  ..._,
5407
5406
  level: { default: 1, values: [1, 2, 3] }
5408
- }, xi = O({
5407
+ }, vi = O({
5409
5408
  name: "heading",
5410
5409
  content: "inline*",
5411
5410
  group: "blockContent",
@@ -5508,10 +5507,10 @@ const de = (e) => {
5508
5507
  ((i = this.options.domAttributes) == null ? void 0 : i.inlineContent) || {}
5509
5508
  );
5510
5509
  }
5511
- }), Ei = q(
5512
- xi,
5513
- vi
5514
- ), Te = (e) => {
5510
+ }), xi = q(
5511
+ vi,
5512
+ wi
5513
+ ), Be = (e) => {
5515
5514
  const { contentNode: t, contentType: o } = k(
5516
5515
  e.state.doc,
5517
5516
  e.state.selection.from
@@ -5530,9 +5529,9 @@ const de = (e) => {
5530
5529
  a.command(() => t.childCount > 0 ? (r().deleteSelection().BNSplitBlock(n.selection.from, !0).run(), !0) : !1)
5531
5530
  )
5532
5531
  ]);
5533
- }, Ci = {
5532
+ }, Ei = {
5534
5533
  ..._
5535
- }, Si = O({
5534
+ }, Ci = O({
5536
5535
  name: "bulletListItem",
5537
5536
  content: "inline*",
5538
5537
  group: "blockContent",
@@ -5555,7 +5554,7 @@ const de = (e) => {
5555
5554
  },
5556
5555
  addKeyboardShortcuts() {
5557
5556
  return {
5558
- Enter: () => Te(this.editor),
5557
+ Enter: () => Be(this.editor),
5559
5558
  "Mod-Shift-8": () => C(this.editor) !== "inline*" ? !0 : this.editor.commands.BNUpdateBlock(
5560
5559
  this.editor.state.selection.anchor,
5561
5560
  {
@@ -5611,11 +5610,11 @@ const de = (e) => {
5611
5610
  ((o = this.options.domAttributes) == null ? void 0 : o.inlineContent) || {}
5612
5611
  );
5613
5612
  }
5614
- }), Mi = q(
5615
- Si,
5616
- Ci
5617
- ), Ti = new S("numbered-list-indexing"), Bi = () => new y({
5618
- key: Ti,
5613
+ }), Si = q(
5614
+ Ci,
5615
+ Ei
5616
+ ), Mi = new S("numbered-list-indexing"), Ti = () => new y({
5617
+ key: Mi,
5619
5618
  appendTransaction: (e, t, o) => {
5620
5619
  const i = o.tr;
5621
5620
  i.setMeta("numberedListIndexing", !0);
@@ -5644,9 +5643,9 @@ const de = (e) => {
5644
5643
  }
5645
5644
  }), n ? i : null;
5646
5645
  }
5647
- }), Li = {
5646
+ }), Bi = {
5648
5647
  ..._
5649
- }, Ii = O({
5648
+ }, Li = O({
5650
5649
  name: "numberedListItem",
5651
5650
  content: "inline*",
5652
5651
  group: "blockContent",
@@ -5678,7 +5677,7 @@ const de = (e) => {
5678
5677
  },
5679
5678
  addKeyboardShortcuts() {
5680
5679
  return {
5681
- Enter: () => Te(this.editor),
5680
+ Enter: () => Be(this.editor),
5682
5681
  "Mod-Shift-7": () => C(this.editor) !== "inline*" ? !0 : this.editor.commands.BNUpdateBlock(
5683
5682
  this.editor.state.selection.anchor,
5684
5683
  {
@@ -5689,7 +5688,7 @@ const de = (e) => {
5689
5688
  };
5690
5689
  },
5691
5690
  addProseMirrorPlugins() {
5692
- return [Bi()];
5691
+ return [Ti()];
5693
5692
  },
5694
5693
  parseHTML() {
5695
5694
  return [
@@ -5739,15 +5738,15 @@ const de = (e) => {
5739
5738
  ((o = this.options.domAttributes) == null ? void 0 : o.inlineContent) || {}
5740
5739
  );
5741
5740
  }
5742
- }), Ai = q(
5743
- Ii,
5744
- Li
5745
- ), Ni = {
5741
+ }), Ii = q(
5742
+ Li,
5743
+ Bi
5744
+ ), Ai = {
5746
5745
  ..._,
5747
5746
  checked: {
5748
5747
  default: !1
5749
5748
  }
5750
- }, Pi = O({
5749
+ }, Ni = O({
5751
5750
  name: "checkListItem",
5752
5751
  content: "inline*",
5753
5752
  group: "blockContent",
@@ -5792,7 +5791,7 @@ const de = (e) => {
5792
5791
  },
5793
5792
  addKeyboardShortcuts() {
5794
5793
  return {
5795
- Enter: () => Te(this.editor),
5794
+ Enter: () => Be(this.editor),
5796
5795
  "Mod-Shift-9": () => C(this.editor) !== "inline*" ? !0 : this.editor.commands.BNUpdateBlock(
5797
5796
  this.editor.state.selection.anchor,
5798
5797
  {
@@ -5899,12 +5898,12 @@ const de = (e) => {
5899
5898
  };
5900
5899
  };
5901
5900
  }
5902
- }), Hi = q(
5903
- Pi,
5904
- Ni
5905
- ), Ui = {
5901
+ }), Pi = q(
5902
+ Ni,
5903
+ Ai
5904
+ ), Hi = {
5906
5905
  ..._
5907
- }, Di = O({
5906
+ }, Ui = O({
5908
5907
  name: "paragraph",
5909
5908
  content: "inline*",
5910
5909
  group: "blockContent",
@@ -5946,15 +5945,15 @@ const de = (e) => {
5946
5945
  );
5947
5946
  }
5948
5947
  }), ji = q(
5949
- Di,
5950
- Ui
5951
- ), Vi = M.create({
5948
+ Ui,
5949
+ Hi
5950
+ ), Di = M.create({
5952
5951
  name: "BlockNoteTableExtension",
5953
5952
  addProseMirrorPlugins: () => [
5954
- to({
5953
+ oo({
5955
5954
  cellMinWidth: 100
5956
5955
  }),
5957
- oo()
5956
+ io()
5958
5957
  ],
5959
5958
  addKeyboardShortcuts() {
5960
5959
  return {
@@ -5975,14 +5974,14 @@ const de = (e) => {
5975
5974
  storage: e.storage
5976
5975
  };
5977
5976
  return {
5978
- tableRole: Ht(
5979
- Ut(e, "tableRole", t)
5977
+ tableRole: Ut(
5978
+ jt(e, "tableRole", t)
5980
5979
  )
5981
5980
  };
5982
5981
  }
5983
- }), Ri = {
5982
+ }), Vi = {
5984
5983
  ..._
5985
- }, Oi = O({
5984
+ }, Ri = O({
5986
5985
  name: "table",
5987
5986
  content: "tableRow+",
5988
5987
  group: "blockContent",
@@ -6003,7 +6002,7 @@ const de = (e) => {
6003
6002
  ((o = this.options.domAttributes) == null ? void 0 : o.inlineContent) || {}
6004
6003
  );
6005
6004
  }
6006
- }), zi = $.create({
6005
+ }), Oi = $.create({
6007
6006
  name: "tableParagraph",
6008
6007
  group: "tableContent",
6009
6008
  content: "inline*",
@@ -6028,70 +6027,70 @@ const de = (e) => {
6028
6027
  0
6029
6028
  ];
6030
6029
  }
6031
- }), Fi = q(
6032
- Oi,
6030
+ }), zi = q(
6033
6031
  Ri,
6032
+ Vi,
6034
6033
  [
6035
- Vi,
6036
- zi,
6037
- Qt.extend({
6034
+ Di,
6035
+ Oi,
6036
+ eo.extend({
6038
6037
  content: "tableContent"
6039
6038
  }),
6040
- Yt.extend({
6039
+ Qt.extend({
6041
6040
  content: "tableContent"
6042
6041
  }),
6043
- eo
6042
+ to
6044
6043
  ]
6045
- ), ft = {
6044
+ ), gt = {
6046
6045
  paragraph: ji,
6047
- heading: Ei,
6048
- bulletListItem: Mi,
6049
- numberedListItem: Ai,
6050
- checkListItem: Hi,
6051
- table: Fi,
6052
- file: ri,
6053
- image: ui,
6054
- video: bi,
6055
- audio: Qo
6056
- }, Gi = ct(ft), gt = {
6057
- bold: U($t, "boolean"),
6058
- italic: U(Xt, "boolean"),
6059
- underline: U(Jt, "boolean"),
6060
- strike: U(Zt, "boolean"),
6061
- code: U(qt, "boolean"),
6062
- textColor: wi,
6063
- backgroundColor: _i
6064
- }, Wr = ht(gt), bt = {
6046
+ heading: xi,
6047
+ bulletListItem: Si,
6048
+ numberedListItem: Ii,
6049
+ checkListItem: Pi,
6050
+ table: zi,
6051
+ file: ni,
6052
+ image: ci,
6053
+ video: gi,
6054
+ audio: Yo
6055
+ }, Fi = ut(gt), bt = {
6056
+ bold: U(qt, "boolean"),
6057
+ italic: U(Zt, "boolean"),
6058
+ underline: U(Yt, "boolean"),
6059
+ strike: U(Jt, "boolean"),
6060
+ code: U(Xt, "boolean"),
6061
+ textColor: yi,
6062
+ backgroundColor: ki
6063
+ }, Gr = mt(bt), kt = {
6065
6064
  text: { config: "text", implementation: {} },
6066
6065
  link: { config: "link", implementation: {} }
6067
- }, Ki = ut(
6068
- bt
6066
+ }, Gi = pt(
6067
+ kt
6069
6068
  );
6070
6069
  function E(e, t) {
6071
- return e in t.schema.blockSchema && t.schema.blockSchema[e] === Gi[e];
6070
+ return e in t.schema.blockSchema && t.schema.blockSchema[e] === Fi[e];
6072
6071
  }
6073
- function Wi(e, t) {
6074
- return e in t.schema.inlineContentSchema && t.schema.inlineContentSchema[e] === Ki[e];
6072
+ function Ki(e, t) {
6073
+ return e in t.schema.inlineContentSchema && t.schema.inlineContentSchema[e] === Gi[e];
6075
6074
  }
6076
- function $i(e, t, o) {
6075
+ function Wi(e, t, o) {
6077
6076
  return t.type === e && t.type in o.schema.blockSchema && E(t.type, o);
6078
6077
  }
6079
- function $r(e, t) {
6078
+ function Kr(e, t) {
6080
6079
  return e.type in t.schema.blockSchema && t.schema.blockSchema[e.type].isFileBlock || !1;
6081
6080
  }
6082
- function qr(e, t) {
6081
+ function Wr(e, t) {
6083
6082
  return e.type in t.schema.blockSchema && t.schema.blockSchema[e.type].isFileBlock && "showPreview" in t.schema.blockSchema[e.type].propSchema || !1;
6084
6083
  }
6085
- function Xr(e, t) {
6084
+ function $r(e, t) {
6086
6085
  return t.schema.blockSchema[e.type].isFileBlock && !e.props.url;
6087
6086
  }
6088
- function qi(e, t, o) {
6087
+ function $i(e, t, o) {
6089
6088
  return t in o.schema.blockSchema && e in o.schema.blockSchema[t].propSchema && o.schema.blockSchema[t].propSchema[e] === _[e];
6090
6089
  }
6091
- function Zr(e, t, o) {
6092
- return qi(e, t.type, o);
6090
+ function qr(e, t, o) {
6091
+ return $i(e, t.type, o);
6093
6092
  }
6094
- function Be(e, t) {
6093
+ function Le(e, t) {
6095
6094
  let o, i;
6096
6095
  if (t.firstChild.descendants((n, r) => o ? !1 : n.type.name !== "blockContainer" || n.attrs.id !== e ? !0 : (o = n, i = r + 1, !1)), o === void 0 || i === void 0)
6097
6096
  throw Error("Could not find block in the editor with matching ID.");
@@ -6100,13 +6099,13 @@ function Be(e, t) {
6100
6099
  posBeforeNode: i
6101
6100
  };
6102
6101
  }
6103
- function Xi(e, t, o = "before", i) {
6102
+ function qi(e, t, o = "before", i) {
6104
6103
  const n = typeof t == "string" ? t : t.id, r = [];
6105
6104
  for (const d of e)
6106
6105
  r.push(
6107
6106
  P(d, i.pmSchema, i.schema.styleSchema)
6108
6107
  );
6109
- const { node: a, posBeforeNode: s } = Be(
6108
+ const { node: a, posBeforeNode: s } = Le(
6110
6109
  n,
6111
6110
  i._tiptapEditor.state.doc
6112
6111
  );
@@ -6139,8 +6138,8 @@ function Xi(e, t, o = "before", i) {
6139
6138
  );
6140
6139
  return l;
6141
6140
  }
6142
- function Zi(e, t, o) {
6143
- const i = o._tiptapEditor, n = typeof e == "string" ? e : e.id, { posBeforeNode: r } = Be(n, i.state.doc);
6141
+ function Xi(e, t, o) {
6142
+ const i = o._tiptapEditor, n = typeof e == "string" ? e : e.id, { posBeforeNode: r } = Le(n, i.state.doc);
6144
6143
  i.commands.BNUpdateBlock(r + 1, t);
6145
6144
  const a = i.state.doc.resolve(r + 1).node();
6146
6145
  return v(
@@ -6151,7 +6150,7 @@ function Zi(e, t, o) {
6151
6150
  o.blockCache
6152
6151
  );
6153
6152
  }
6154
- function kt(e, t, o) {
6153
+ function _t(e, t, o) {
6155
6154
  const i = t._tiptapEditor, n = i.state.tr, r = new Set(
6156
6155
  e.map(
6157
6156
  (l) => typeof l == "string" ? l : l.id
@@ -6185,16 +6184,16 @@ function kt(e, t, o) {
6185
6184
  }
6186
6185
  return t.dispatch(n), a;
6187
6186
  }
6188
- function Ji(e, t) {
6189
- return kt(e, t);
6187
+ function Zi(e, t) {
6188
+ return _t(e, t);
6190
6189
  }
6191
- function Yi(e, t, o) {
6190
+ function Ji(e, t, o) {
6192
6191
  const i = [];
6193
6192
  for (const s of t)
6194
6193
  i.push(
6195
6194
  P(s, o.pmSchema, o.schema.styleSchema)
6196
6195
  );
6197
- const n = typeof e[0] == "string" ? e[0] : e[0].id, r = kt(
6196
+ const n = typeof e[0] == "string" ? e[0] : e[0].id, r = _t(
6198
6197
  e,
6199
6198
  o,
6200
6199
  (s, l, d, u) => {
@@ -6219,7 +6218,7 @@ function Yi(e, t, o) {
6219
6218
  );
6220
6219
  return { insertedBlocks: a, removedBlocks: r };
6221
6220
  }
6222
- function Qi(e, t, o, i = { updateSelection: !0 }) {
6221
+ function Yi(e, t, o, i = { updateSelection: !0 }) {
6223
6222
  const n = o._tiptapEditor.state.tr;
6224
6223
  let { from: r, to: a } = typeof e == "number" ? { from: e, to: e } : { from: e.from, to: e.to }, s = !0, l = !0, d = "";
6225
6224
  if (t.forEach((u) => {
@@ -6228,9 +6227,9 @@ function Qi(e, t, o, i = { updateSelection: !0 }) {
6228
6227
  const { parent: u } = n.doc.resolve(r);
6229
6228
  u.isTextblock && !u.type.spec.code && !u.childCount && (r -= 1, a += 1);
6230
6229
  }
6231
- return s ? n.insertText(d, r, a) : n.replaceWith(r, a, t), i.updateSelection && jt(n, n.steps.length - 1, -1), o.dispatch(n), !0;
6230
+ return s ? n.insertText(d, r, a) : n.replaceWith(r, a, t), i.updateSelection && Vt(n, n.steps.length - 1, -1), o.dispatch(n), !0;
6232
6231
  }
6233
- function en() {
6232
+ function Qi() {
6234
6233
  const e = (t) => {
6235
6234
  let o = t.children.length;
6236
6235
  for (let i = 0; i < o; i++) {
@@ -6246,7 +6245,7 @@ function en() {
6246
6245
  };
6247
6246
  return e;
6248
6247
  }
6249
- function tn() {
6248
+ function en() {
6250
6249
  const e = (t) => {
6251
6250
  var o;
6252
6251
  if (t.children && "length" in t.children && t.children.length)
@@ -6255,41 +6254,41 @@ function tn() {
6255
6254
  n.type === "element" && n.tagName === "input" && ((o = n.properties) == null ? void 0 : o.type) === "checkbox" && (r == null ? void 0 : r.type) === "element" && r.tagName === "p" ? (r.tagName = "span", r.children.splice(
6256
6255
  0,
6257
6256
  0,
6258
- ye(document.createTextNode(" "))
6257
+ we(document.createTextNode(" "))
6259
6258
  )) : e(n);
6260
6259
  }
6261
6260
  };
6262
6261
  return e;
6263
6262
  }
6264
- function Le(e) {
6265
- return xe().use(Ze, { fragment: !0 }).use(en).use(tn).use(io).use(Ye).use(no, { handlers: { text: (o) => o.value } }).processSync(e).value;
6263
+ function Ie(e) {
6264
+ return Ee().use(Je, { fragment: !0 }).use(Qi).use(en).use(no).use(Qe).use(ro, { handlers: { text: (o) => o.value } }).processSync(e).value;
6266
6265
  }
6267
- function on(e, t, o, i) {
6266
+ function tn(e, t, o, i) {
6268
6267
  const r = se(t, o).exportBlocks(e, i);
6269
- return Le(r);
6268
+ return Ie(r);
6270
6269
  }
6271
- function nn(e) {
6270
+ function on(e) {
6272
6271
  return Array.prototype.indexOf.call(e.parentElement.childNodes, e);
6273
6272
  }
6274
- function rn(e) {
6273
+ function nn(e) {
6275
6274
  return e.nodeType === 3 && !/\S/.test(e.nodeValue || "");
6276
6275
  }
6277
- function an(e) {
6276
+ function rn(e) {
6278
6277
  e.querySelectorAll("li > ul, li > ol").forEach((t) => {
6279
- const o = nn(t), i = t.parentElement, n = Array.from(i.childNodes).slice(
6278
+ const o = on(t), i = t.parentElement, n = Array.from(i.childNodes).slice(
6280
6279
  o + 1
6281
6280
  );
6282
6281
  t.remove(), n.forEach((r) => {
6283
6282
  r.remove();
6284
6283
  }), i.insertAdjacentElement("afterend", t), n.reverse().forEach((r) => {
6285
- if (rn(r))
6284
+ if (nn(r))
6286
6285
  return;
6287
6286
  const a = document.createElement("li");
6288
6287
  a.append(r), t.insertAdjacentElement("afterend", a);
6289
6288
  }), i.childNodes.length === 0 && i.remove();
6290
6289
  });
6291
6290
  }
6292
- function sn(e) {
6291
+ function an(e) {
6293
6292
  e.querySelectorAll("li + ul, li + ol").forEach((t) => {
6294
6293
  var r, a;
6295
6294
  const o = t.previousElementSibling, i = document.createElement("div");
@@ -6299,19 +6298,19 @@ function sn(e) {
6299
6298
  n.append(i.nextElementSibling);
6300
6299
  });
6301
6300
  }
6302
- let Ke = null;
6303
- function ln() {
6304
- return Ke || (Ke = document.implementation.createHTMLDocument("title"));
6301
+ let We = null;
6302
+ function sn() {
6303
+ return We || (We = document.implementation.createHTMLDocument("title"));
6305
6304
  }
6306
- function _t(e) {
6305
+ function yt(e) {
6307
6306
  if (typeof e == "string") {
6308
- const t = ln().createElement("div");
6307
+ const t = sn().createElement("div");
6309
6308
  t.innerHTML = e, e = t;
6310
6309
  }
6311
- return an(e), sn(e), e;
6310
+ return rn(e), an(e), e;
6312
6311
  }
6313
- async function yt(e, t, o, i, n) {
6314
- const r = _t(e), s = Lt.fromSchema(n).parse(r, {
6312
+ async function wt(e, t, o, i, n) {
6313
+ const r = yt(e), s = It.fromSchema(n).parse(r, {
6315
6314
  topNode: n.nodes.blockGroup.create()
6316
6315
  }), l = [];
6317
6316
  for (let d = 0; d < s.childCount; d++)
@@ -6320,7 +6319,7 @@ async function yt(e, t, o, i, n) {
6320
6319
  );
6321
6320
  return l;
6322
6321
  }
6323
- function dn(e, t) {
6322
+ function ln(e, t) {
6324
6323
  const o = t.value ? t.value + `
6325
6324
  ` : "", i = {};
6326
6325
  t.lang && (i["data-language"] = t.lang);
@@ -6337,14 +6336,14 @@ function dn(e, t) {
6337
6336
  children: [n]
6338
6337
  }, e.patch(t, n), n;
6339
6338
  }
6340
- function cn(e, t, o, i, n) {
6341
- const r = xe().use(ro).use(Ye).use(ao, {
6339
+ function dn(e, t, o, i, n) {
6340
+ const r = Ee().use(ao).use(Qe).use(so, {
6342
6341
  handlers: {
6343
- ...so,
6344
- code: dn
6342
+ ...lo,
6343
+ code: ln
6345
6344
  }
6346
- }).use(Je).processSync(e);
6347
- return yt(
6345
+ }).use(Ye).processSync(e);
6346
+ return wt(
6348
6347
  r.value,
6349
6348
  t,
6350
6349
  o,
@@ -6372,7 +6371,7 @@ class X {
6372
6371
  this.callbacks = {};
6373
6372
  }
6374
6373
  }
6375
- class un {
6374
+ class cn {
6376
6375
  constructor(t, o, i, n) {
6377
6376
  c(this, "state");
6378
6377
  c(this, "emitUpdate");
@@ -6425,7 +6424,7 @@ class un {
6425
6424
  }
6426
6425
  }
6427
6426
  const ge = new S("FilePanelPlugin");
6428
- class pn extends X {
6427
+ class un extends X {
6429
6428
  constructor(o) {
6430
6429
  super();
6431
6430
  c(this, "view");
@@ -6433,7 +6432,7 @@ class pn extends X {
6433
6432
  c(this, "closeMenu", () => this.view.closeMenu());
6434
6433
  this.plugin = new y({
6435
6434
  key: ge,
6436
- view: (i) => (this.view = new un(
6435
+ view: (i) => (this.view = new cn(
6437
6436
  o,
6438
6437
  ge,
6439
6438
  i,
@@ -6465,14 +6464,14 @@ class pn extends X {
6465
6464
  return this.on("update", o);
6466
6465
  }
6467
6466
  }
6468
- class hn {
6467
+ class pn {
6469
6468
  constructor(t, o, i) {
6470
6469
  c(this, "state");
6471
6470
  c(this, "emitUpdate");
6472
6471
  c(this, "preventHide", !1);
6473
6472
  c(this, "preventShow", !1);
6474
6473
  c(this, "shouldShow", ({ state: t, from: o, to: i, view: n }) => {
6475
- const { doc: r, selection: a } = t, { empty: s } = a, l = !r.textBetween(o, i).length && Vt(t.selection);
6474
+ const { doc: r, selection: a } = t, { empty: s } = a, l = !r.textBetween(o, i).length && Rt(t.selection);
6476
6475
  return !(!n.hasFocus() || s || l);
6477
6476
  });
6478
6477
  c(this, "blurHandler", (t) => {
@@ -6543,26 +6542,26 @@ class hn {
6543
6542
  }
6544
6543
  getSelectionBoundingBox() {
6545
6544
  const { state: t } = this.pmView, { selection: o } = t, { ranges: i } = o, n = Math.min(...i.map((a) => a.$from.pos)), r = Math.max(...i.map((a) => a.$to.pos));
6546
- if (Rt(o)) {
6545
+ if (Ot(o)) {
6547
6546
  const a = this.pmView.nodeDOM(n);
6548
6547
  if (a)
6549
6548
  return a.getBoundingClientRect();
6550
6549
  }
6551
- return _e(this.pmView, n, r);
6550
+ return ye(this.pmView, n, r);
6552
6551
  }
6553
6552
  }
6554
- const mn = new S(
6553
+ const hn = new S(
6555
6554
  "FormattingToolbarPlugin"
6556
6555
  );
6557
- class fn extends X {
6556
+ class mn extends X {
6558
6557
  constructor(o) {
6559
6558
  super();
6560
6559
  c(this, "view");
6561
6560
  c(this, "plugin");
6562
6561
  c(this, "closeMenu", () => this.view.closeMenu());
6563
6562
  this.plugin = new y({
6564
- key: mn,
6565
- view: (i) => (this.view = new hn(o, i, (n) => {
6563
+ key: hn,
6564
+ view: (i) => (this.view = new pn(o, i, (n) => {
6566
6565
  this.emit("update", n);
6567
6566
  }), this.view),
6568
6567
  props: {
@@ -6578,7 +6577,7 @@ class fn extends X {
6578
6577
  return this.on("update", o);
6579
6578
  }
6580
6579
  }
6581
- class gn {
6580
+ class fn {
6582
6581
  constructor(t, o, i) {
6583
6582
  c(this, "state");
6584
6583
  c(this, "emitUpdate");
@@ -6596,7 +6595,7 @@ class gn {
6596
6595
  const o = t.target, i = this.pmView.posAtDOM(o, 0) + 1, n = this.pmView.state.doc.resolve(i), r = n.marks();
6597
6596
  for (const a of r)
6598
6597
  if (a.type.name === this.pmView.state.schema.mark("link").type.name) {
6599
- this.mouseHoveredLinkMark = a, this.mouseHoveredLinkMarkRange = Ue(n, a.type, a.attrs) || void 0;
6598
+ this.mouseHoveredLinkMark = a, this.mouseHoveredLinkMarkRange = je(n, a.type, a.attrs) || void 0;
6600
6599
  break;
6601
6600
  }
6602
6601
  }
@@ -6612,7 +6611,7 @@ class gn {
6612
6611
  });
6613
6612
  c(this, "scrollHandler", () => {
6614
6613
  var t;
6615
- this.linkMark !== void 0 && (t = this.state) != null && t.show && (this.state.referencePos = _e(
6614
+ this.linkMark !== void 0 && (t = this.state) != null && t.show && (this.state.referencePos = ye(
6616
6615
  this.pmView,
6617
6616
  this.linkMarkRange.from,
6618
6617
  this.linkMarkRange.to
@@ -6668,7 +6667,7 @@ class gn {
6668
6667
  const i = this.pmView.state.selection.$from.marks();
6669
6668
  for (const n of i)
6670
6669
  if (n.type.name === this.pmView.state.schema.mark("link").type.name) {
6671
- this.keyboardHoveredLinkMark = n, this.keyboardHoveredLinkMarkRange = Ue(
6670
+ this.keyboardHoveredLinkMark = n, this.keyboardHoveredLinkMarkRange = je(
6672
6671
  this.pmView.state.selection.$from,
6673
6672
  n.type,
6674
6673
  n.attrs
@@ -6679,7 +6678,7 @@ class gn {
6679
6678
  if (this.mouseHoveredLinkMark && (this.linkMark = this.mouseHoveredLinkMark, this.linkMarkRange = this.mouseHoveredLinkMarkRange), this.keyboardHoveredLinkMark && (this.linkMark = this.keyboardHoveredLinkMark, this.linkMarkRange = this.keyboardHoveredLinkMarkRange), this.linkMark && this.editor.isEditable) {
6680
6679
  this.state = {
6681
6680
  show: !0,
6682
- referencePos: _e(
6681
+ referencePos: ye(
6683
6682
  this.pmView,
6684
6683
  this.linkMarkRange.from,
6685
6684
  this.linkMarkRange.to
@@ -6705,8 +6704,8 @@ class gn {
6705
6704
  );
6706
6705
  }
6707
6706
  }
6708
- const bn = new S("LinkToolbarPlugin");
6709
- class kn extends X {
6707
+ const gn = new S("LinkToolbarPlugin");
6708
+ class bn extends X {
6710
6709
  constructor(o) {
6711
6710
  super();
6712
6711
  c(this, "view");
@@ -6745,8 +6744,8 @@ class kn extends X {
6745
6744
  });
6746
6745
  c(this, "closeMenu", () => this.view.closeMenu());
6747
6746
  this.plugin = new y({
6748
- key: bn,
6749
- view: (i) => (this.view = new gn(o, i, (n) => {
6747
+ key: gn,
6748
+ view: (i) => (this.view = new fn(o, i, (n) => {
6750
6749
  this.emit("update", n);
6751
6750
  }), this.view),
6752
6751
  props: {
@@ -6776,7 +6775,7 @@ class z extends me {
6776
6775
  return new z(o.resolve(i), o.resolve(n));
6777
6776
  }
6778
6777
  content() {
6779
- return new D(L.from(this.nodes), 0, 0);
6778
+ return new j(L.from(this.nodes), 0, 0);
6780
6779
  }
6781
6780
  eq(o) {
6782
6781
  if (!(o instanceof z) || this.nodes.length !== o.nodes.length || this.from !== o.from || this.to !== o.to)
@@ -6805,7 +6804,7 @@ function he(e, t) {
6805
6804
  if (e.hasAttribute("data-id"))
6806
6805
  return { node: e, id: e.getAttribute("data-id") };
6807
6806
  }
6808
- function _n(e, t) {
6807
+ function kn(e, t) {
6809
6808
  const o = he(e, t);
6810
6809
  if (o && o.node.nodeType === 1) {
6811
6810
  const i = t.docView, n = i.nearestDesc(o.node, !0);
@@ -6813,7 +6812,7 @@ function _n(e, t) {
6813
6812
  }
6814
6813
  return null;
6815
6814
  }
6816
- function yn(e, t) {
6815
+ function _n(e, t) {
6817
6816
  let o, i;
6818
6817
  const n = t.resolve(e.from).node().type.spec.group === "blockContent", r = t.resolve(e.to).node().type.spec.group === "blockContent", a = Math.min(e.$anchor.depth, e.$head.depth);
6819
6818
  if (n && r) {
@@ -6823,7 +6822,7 @@ function yn(e, t) {
6823
6822
  o = e.from, i = e.to;
6824
6823
  return { from: o, to: i };
6825
6824
  }
6826
- function We(e, t, o = t) {
6825
+ function $e(e, t, o = t) {
6827
6826
  t === o && (o += e.state.doc.resolve(t + 1).node().nodeSize);
6828
6827
  const i = e.domAtPos(t).node.cloneNode(!0), n = e.domAtPos(t).node, r = (u, p) => Array.prototype.indexOf.call(u.children, p), a = r(
6829
6828
  n,
@@ -6836,16 +6835,16 @@ function We(e, t, o = t) {
6836
6835
  );
6837
6836
  for (let u = n.childElementCount - 1; u >= 0; u--)
6838
6837
  (u > s || u < a) && i.removeChild(i.children[u]);
6839
- wt(e.root), B = i;
6838
+ vt(e.root), B = i;
6840
6839
  const d = e.dom.className.split(" ").filter(
6841
6840
  (u) => u !== "ProseMirror" && u !== "bn-root" && u !== "bn-editor"
6842
6841
  ).join(" ");
6843
6842
  B.className = B.className + " bn-drag-preview " + d, e.root instanceof ShadowRoot ? e.root.appendChild(B) : e.root.body.appendChild(B);
6844
6843
  }
6845
- function wt(e) {
6844
+ function vt(e) {
6846
6845
  B !== void 0 && (e instanceof ShadowRoot ? e.removeChild(B) : e.body.removeChild(B), B = void 0);
6847
6846
  }
6848
- function wn(e, t) {
6847
+ function yn(e, t) {
6849
6848
  if (!e.dataTransfer)
6850
6849
  return;
6851
6850
  const o = t.prosemirrorView, i = o.dom.getBoundingClientRect(), n = {
@@ -6861,25 +6860,25 @@ function wn(e, t) {
6861
6860
  }
6862
6861
  if (!a)
6863
6862
  return;
6864
- const s = _n(a.node, o);
6863
+ const s = kn(a.node, o);
6865
6864
  if (s != null) {
6866
- const l = o.state.selection, d = o.state.doc, { from: u, to: p } = yn(l, d), h = u <= s && s < p, f = l.$anchor.node() !== l.$head.node() || l instanceof z;
6865
+ const l = o.state.selection, d = o.state.doc, { from: u, to: p } = _n(l, d), h = u <= s && s < p, f = l.$anchor.node() !== l.$head.node() || l instanceof z;
6867
6866
  h && f ? (o.dispatch(
6868
6867
  o.state.tr.setSelection(z.create(d, u, p))
6869
- ), We(o, u, p)) : (o.dispatch(
6868
+ ), $e(o, u, p)) : (o.dispatch(
6870
6869
  o.state.tr.setSelection(re.create(o.state.doc, s))
6871
- ), We(o, s));
6872
- const m = o.state.selection.content(), g = t.pmSchema, A = Se(g, t).serializeProseMirrorFragment(
6870
+ ), $e(o, s));
6871
+ const m = o.state.selection.content(), g = t.pmSchema, A = Me(g, t).serializeProseMirrorFragment(
6873
6872
  m.content,
6874
6873
  {}
6875
6874
  ), N = se(g, t).exportProseMirrorFragment(
6876
6875
  m.content,
6877
6876
  {}
6878
- ), Z = Le(N);
6877
+ ), Z = Ie(N);
6879
6878
  e.dataTransfer.clearData(), e.dataTransfer.setData("blocknote/html", A), e.dataTransfer.setData("text/html", N), e.dataTransfer.setData("text/plain", Z), e.dataTransfer.effectAllowed = "move", e.dataTransfer.setDragImage(B, 0, 0), o.dragging = { slice: m, move: !0 };
6880
6879
  }
6881
6880
  }
6882
- class vn {
6881
+ class wn {
6883
6882
  constructor(t, o, i) {
6884
6883
  c(this, "state");
6885
6884
  c(this, "emitUpdate");
@@ -7093,8 +7092,8 @@ class vn {
7093
7092
  this.editor.openSelectionMenu("/");
7094
7093
  }
7095
7094
  }
7096
- const xn = new S("SideMenuPlugin");
7097
- class En extends X {
7095
+ const vn = new S("SideMenuPlugin");
7096
+ class xn extends X {
7098
7097
  constructor(o) {
7099
7098
  super();
7100
7099
  c(this, "view");
@@ -7108,12 +7107,12 @@ class En extends X {
7108
7107
  * Handles drag & drop events for blocks.
7109
7108
  */
7110
7109
  c(this, "blockDragStart", (o) => {
7111
- this.view.isDragging = !0, wn(o, this.editor);
7110
+ this.view.isDragging = !0, yn(o, this.editor);
7112
7111
  });
7113
7112
  /**
7114
7113
  * Handles drag & drop events for blocks.
7115
7114
  */
7116
- c(this, "blockDragEnd", () => wt(this.editor.prosemirrorView.root));
7115
+ c(this, "blockDragEnd", () => vt(this.editor.prosemirrorView.root));
7117
7116
  /**
7118
7117
  * Freezes the side menu. When frozen, the side menu will stay
7119
7118
  * attached to the same block regardless of which block is hovered by the
@@ -7129,8 +7128,8 @@ class En extends X {
7129
7128
  this.view.menuFrozen = !1, this.view.state.show = !1, this.view.emitUpdate(this.view.state);
7130
7129
  });
7131
7130
  this.editor = o, this.plugin = new y({
7132
- key: xn,
7133
- view: (i) => (this.view = new vn(o, i, (n) => {
7131
+ key: vn,
7132
+ view: (i) => (this.view = new wn(o, i, (n) => {
7134
7133
  this.emit("update", n);
7135
7134
  }), this.view)
7136
7135
  });
@@ -7139,8 +7138,8 @@ class En extends X {
7139
7138
  return this.on("update", o);
7140
7139
  }
7141
7140
  }
7142
- const Cn = Ot((e) => e.type.name === "blockContainer");
7143
- class Sn {
7141
+ const En = zt((e) => e.type.name === "blockContainer");
7142
+ class Cn {
7144
7143
  constructor(t, o) {
7145
7144
  c(this, "state");
7146
7145
  c(this, "emitUpdate");
@@ -7201,7 +7200,7 @@ class Sn {
7201
7200
  }
7202
7201
  }
7203
7202
  const F = new S("SuggestionMenuPlugin");
7204
- class Mn extends X {
7203
+ class Sn extends X {
7205
7204
  constructor(o) {
7206
7205
  super();
7207
7206
  c(this, "view");
@@ -7221,7 +7220,7 @@ class Mn extends X {
7221
7220
  const i = this.triggerCharacters;
7222
7221
  this.plugin = new y({
7223
7222
  key: F,
7224
- view: () => (this.view = new Sn(
7223
+ view: () => (this.view = new Cn(
7225
7224
  o,
7226
7225
  (n, r) => {
7227
7226
  this.emit(`update ${n}`, r);
@@ -7277,7 +7276,7 @@ class Mn extends X {
7277
7276
  if (r === void 0)
7278
7277
  return null;
7279
7278
  if (!r.fromUserInput) {
7280
- const a = Cn(n.selection);
7279
+ const a = En(n.selection);
7281
7280
  if (a)
7282
7281
  return G.create(n.doc, [
7283
7282
  K.node(
@@ -7314,32 +7313,32 @@ class Mn extends X {
7314
7313
  return ((i = (o = this.view) == null ? void 0 : o.state) == null ? void 0 : i.show) || !1;
7315
7314
  }
7316
7315
  }
7317
- function Jr(e, t) {
7316
+ function Xr(e, t) {
7318
7317
  e.suggestionMenus.addTriggerCharacter(t);
7319
7318
  }
7320
7319
  let w;
7321
- function $e(e) {
7320
+ function qe(e) {
7322
7321
  w || (w = document.createElement("div"), w.innerHTML = "_", w.style.opacity = "0", w.style.height = "1px", w.style.width = "1px", e instanceof Document ? e.body.appendChild(w) : e.appendChild(w));
7323
7322
  }
7324
- function Tn(e) {
7323
+ function Mn(e) {
7325
7324
  w && (e instanceof Document ? e.body.removeChild(w) : e.removeChild(w), w = void 0);
7326
7325
  }
7327
7326
  function ie(e) {
7328
7327
  return Array.prototype.indexOf.call(e.parentElement.childNodes, e);
7329
7328
  }
7330
- function Bn(e) {
7329
+ function Tn(e) {
7331
7330
  for (; e && e.nodeName !== "TD" && e.nodeName !== "TH"; )
7332
7331
  e = e.classList && e.classList.contains("ProseMirror") ? null : e.parentNode;
7333
7332
  return e;
7334
7333
  }
7335
- function Ln(e, t) {
7334
+ function Bn(e, t) {
7336
7335
  e.forEach((o) => {
7337
7336
  const i = t.querySelectorAll(o);
7338
7337
  for (let n = 0; n < i.length; n++)
7339
7338
  i[n].style.visibility = "hidden";
7340
7339
  });
7341
7340
  }
7342
- class In {
7341
+ class Ln {
7343
7342
  constructor(t, o, i) {
7344
7343
  c(this, "state");
7345
7344
  c(this, "emitUpdate");
@@ -7351,7 +7350,7 @@ class In {
7351
7350
  var d;
7352
7351
  if (this.menuFrozen)
7353
7352
  return;
7354
- const o = Bn(t.target);
7353
+ const o = Tn(t.target);
7355
7354
  if (!o || !this.editor.isEditable) {
7356
7355
  (d = this.state) != null && d.show && (this.state.show = !1, this.emitUpdate());
7357
7356
  return;
@@ -7372,7 +7371,7 @@ class In {
7372
7371
  this.editor.schema.styleSchema,
7373
7372
  this.editor.blockCache
7374
7373
  );
7375
- return $i("table", h, this.editor) && (this.tablePos = p + 1, l = h), !1;
7374
+ return Wi("table", h, this.editor) && (this.tablePos = p + 1, l = h), !1;
7376
7375
  }), !!l && (this.tableId = s.id, !(this.state !== void 0 && this.state.show && this.tableId === s.id && this.state.rowIndex === n && this.state.colIndex === i)))
7377
7376
  return this.state = {
7378
7377
  show: !0,
@@ -7388,7 +7387,7 @@ class In {
7388
7387
  var h;
7389
7388
  if (((h = this.state) == null ? void 0 : h.draggingState) === void 0)
7390
7389
  return;
7391
- t.preventDefault(), t.dataTransfer.dropEffect = "move", Ln(
7390
+ t.preventDefault(), t.dataTransfer.dropEffect = "move", Bn(
7392
7391
  [
7393
7392
  "column-resize-handle",
7394
7393
  "prosemirror-dropcursor-block",
@@ -7476,7 +7475,7 @@ class In {
7476
7475
  }
7477
7476
  }
7478
7477
  const Q = new S("TableHandlesPlugin");
7479
- class An extends X {
7478
+ class In extends X {
7480
7479
  constructor(o) {
7481
7480
  super();
7482
7481
  c(this, "view");
@@ -7501,7 +7500,7 @@ class An extends X {
7501
7500
  newIndex: this.view.state.colIndex,
7502
7501
  tablePos: this.view.tablePos
7503
7502
  })
7504
- ), $e(this.editor._tiptapEditor.view.root), o.dataTransfer.setDragImage(w, 0, 0), o.dataTransfer.effectAllowed = "move";
7503
+ ), qe(this.editor._tiptapEditor.view.root), o.dataTransfer.setDragImage(w, 0, 0), o.dataTransfer.effectAllowed = "move";
7505
7504
  });
7506
7505
  /**
7507
7506
  * Callback that should be set on the `dragStart` event for whichever element
@@ -7523,7 +7522,7 @@ class An extends X {
7523
7522
  newIndex: this.view.state.rowIndex,
7524
7523
  tablePos: this.view.tablePos
7525
7524
  })
7526
- ), $e(this.editor._tiptapEditor.view.root), o.dataTransfer.setDragImage(w, 0, 0), o.dataTransfer.effectAllowed = "copyMove";
7525
+ ), qe(this.editor._tiptapEditor.view.root), o.dataTransfer.setDragImage(w, 0, 0), o.dataTransfer.effectAllowed = "copyMove";
7527
7526
  });
7528
7527
  /**
7529
7528
  * Callback that should be set on the `dragEnd` event for both the element
@@ -7536,7 +7535,7 @@ class An extends X {
7536
7535
  );
7537
7536
  this.view.state.draggingState = void 0, this.view.emitUpdate(), this.editor.dispatch(
7538
7537
  this.editor._tiptapEditor.state.tr.setMeta(Q, null)
7539
- ), Tn(this.editor._tiptapEditor.view.root);
7538
+ ), Mn(this.editor._tiptapEditor.view.root);
7540
7539
  });
7541
7540
  /**
7542
7541
  * Freezes the drag handles. When frozen, they will stay attached to the same
@@ -7554,7 +7553,7 @@ class An extends X {
7554
7553
  });
7555
7554
  this.editor = o, this.plugin = new y({
7556
7555
  key: Q,
7557
- view: (i) => (this.view = new In(o, i, (n) => {
7556
+ view: (i) => (this.view = new Ln(o, i, (n) => {
7558
7557
  this.emit("update", n);
7559
7558
  }), this.view),
7560
7559
  // We use decorations to render the drop cursor when dragging a table row
@@ -7607,8 +7606,8 @@ class An extends X {
7607
7606
  return this.on("update", o);
7608
7607
  }
7609
7608
  }
7610
- function qe(e, t) {
7611
- const o = e.state.selection.content().content, n = Se(
7609
+ function Xe(e, t) {
7610
+ const o = e.state.selection.content().content, n = Me(
7612
7611
  e.state.schema,
7613
7612
  t
7614
7613
  ).serializeProseMirrorFragment(
@@ -7620,10 +7619,10 @@ function qe(e, t) {
7620
7619
  ).exportProseMirrorFragment(
7621
7620
  o,
7622
7621
  {}
7623
- ), s = Le(a);
7622
+ ), s = Ie(a);
7624
7623
  return { internalHTML: n, externalHTML: a, plainText: s };
7625
7624
  }
7626
- const Nn = (e) => M.create({
7625
+ const An = (e) => M.create({
7627
7626
  name: "copyToClipboard",
7628
7627
  addProseMirrorPlugins() {
7629
7628
  return [
@@ -7638,7 +7637,7 @@ const Nn = (e) => M.create({
7638
7637
  )
7639
7638
  )
7640
7639
  );
7641
- const { internalHTML: i, externalHTML: n, plainText: r } = qe(t, e);
7640
+ const { internalHTML: i, externalHTML: n, plainText: r } = Xe(t, e);
7642
7641
  return o.clipboardData.setData("blocknote/html", i), o.clipboardData.setData("text/html", n), o.clipboardData.setData("text/plain", r), !0;
7643
7642
  },
7644
7643
  // This is for the use-case in which only a block without content
@@ -7654,7 +7653,7 @@ const Nn = (e) => M.create({
7654
7653
  )
7655
7654
  )
7656
7655
  ), o.preventDefault(), o.dataTransfer.clearData();
7657
- const { internalHTML: i, externalHTML: n, plainText: r } = qe(t, e);
7656
+ const { internalHTML: i, externalHTML: n, plainText: r } = Xe(t, e);
7658
7657
  return o.dataTransfer.setData("blocknote/html", i), o.dataTransfer.setData("text/html", n), o.dataTransfer.setData("text/plain", r), !0;
7659
7658
  }
7660
7659
  }
@@ -7663,7 +7662,7 @@ const Nn = (e) => M.create({
7663
7662
  ];
7664
7663
  }
7665
7664
  });
7666
- function Pn(e) {
7665
+ function Nn(e) {
7667
7666
  let t = e.getTextCursorPosition().block, o = e.schema.blockSchema[t.type].content;
7668
7667
  for (; o === "none"; )
7669
7668
  t = e.getTextCursorPosition().nextBlock, o = e.schema.blockSchema[t.type].content, e.setTextCursorPosition(t, "end");
@@ -7677,9 +7676,9 @@ function x(e, t) {
7677
7676
  "end"
7678
7677
  ));
7679
7678
  const i = e.getTextCursorPosition().block;
7680
- return Pn(e), i;
7679
+ return Nn(e), i;
7681
7680
  }
7682
- function Yr(e) {
7681
+ function Zr(e) {
7683
7682
  const t = [];
7684
7683
  return E("heading", e) && t.push(
7685
7684
  {
@@ -7829,20 +7828,20 @@ function Yr(e) {
7829
7828
  ...e.dictionary.slash_menu.emoji
7830
7829
  }), t;
7831
7830
  }
7832
- function Qr(e, t) {
7831
+ function Jr(e, t) {
7833
7832
  return e.filter(
7834
7833
  ({ title: o, aliases: i }) => o.toLowerCase().includes(t.toLowerCase()) || i && i.filter(
7835
7834
  (n) => n.toLowerCase().includes(t.toLowerCase())
7836
7835
  ).length !== 0
7837
7836
  );
7838
7837
  }
7839
- const Ie = [
7838
+ const Ae = [
7840
7839
  "blocknote/html",
7841
7840
  "Files",
7842
7841
  "text/html",
7843
7842
  "text/plain"
7844
7843
  ];
7845
- function Hn(e, t) {
7844
+ function Pn(e, t) {
7846
7845
  const o = e.split("/"), i = t.split("/");
7847
7846
  if (o.length !== 2)
7848
7847
  throw new Error(`The string ${e} is not a valid MIME type.`);
@@ -7850,14 +7849,14 @@ function Hn(e, t) {
7850
7849
  throw new Error(`The string ${t} is not a valid MIME type.`);
7851
7850
  return o[1] === "*" || i[1] === "*" ? o[0] === i[0] : (o[0] === "*" || i[0] === "*" || o[0] === i[0]) && o[1] === i[1];
7852
7851
  }
7853
- async function vt(e, t) {
7852
+ async function xt(e, t) {
7854
7853
  if (!t.uploadFile)
7855
7854
  return;
7856
7855
  const o = "dataTransfer" in e ? e.dataTransfer : e.clipboardData;
7857
7856
  if (o === null)
7858
7857
  return;
7859
7858
  let i = null;
7860
- for (const a of Ie)
7859
+ for (const a of Ae)
7861
7860
  if (o.types.includes(a)) {
7862
7861
  i = a;
7863
7862
  break;
@@ -7875,7 +7874,7 @@ async function vt(e, t) {
7875
7874
  let s = "file";
7876
7875
  for (const d of r)
7877
7876
  for (const u of d.fileBlockAcceptMimeTypes || [])
7878
- if (Hn(n[a].type, u)) {
7877
+ if (Pn(n[a].type, u)) {
7879
7878
  s = d.type;
7880
7879
  break;
7881
7880
  }
@@ -7895,7 +7894,7 @@ async function vt(e, t) {
7895
7894
  }
7896
7895
  }
7897
7896
  }
7898
- const Un = (e) => M.create({
7897
+ const Hn = (e) => M.create({
7899
7898
  name: "pasteFromClipboard",
7900
7899
  addProseMirrorPlugins() {
7901
7900
  return [
@@ -7906,7 +7905,7 @@ const Un = (e) => M.create({
7906
7905
  if (o.preventDefault(), !e.isEditable)
7907
7906
  return;
7908
7907
  let i = null;
7909
- for (const r of Ie)
7908
+ for (const r of Ae)
7910
7909
  if (o.clipboardData.types.includes(r)) {
7911
7910
  i = r;
7912
7911
  break;
@@ -7914,16 +7913,16 @@ const Un = (e) => M.create({
7914
7913
  if (i === null)
7915
7914
  return !0;
7916
7915
  if (i === "Files")
7917
- return vt(o, e), !0;
7916
+ return xt(o, e), !0;
7918
7917
  let n = o.clipboardData.getData(i);
7919
- return i === "text/html" && (n = _t(n.trim()).innerHTML), e._tiptapEditor.view.pasteHTML(n), !0;
7918
+ return i === "text/html" && (n = yt(n.trim()).innerHTML), e._tiptapEditor.view.pasteHTML(n), !0;
7920
7919
  }
7921
7920
  }
7922
7921
  }
7923
7922
  })
7924
7923
  ];
7925
7924
  }
7926
- }), Dn = (e) => M.create({
7925
+ }), Un = (e) => M.create({
7927
7926
  name: "dropFile",
7928
7927
  addProseMirrorPlugins() {
7929
7928
  return [
@@ -7934,12 +7933,12 @@ const Un = (e) => M.create({
7934
7933
  if (!e.isEditable)
7935
7934
  return;
7936
7935
  let i = null;
7937
- for (const n of Ie)
7936
+ for (const n of Ae)
7938
7937
  if (o.dataTransfer.types.includes(n)) {
7939
7938
  i = n;
7940
7939
  break;
7941
7940
  }
7942
- return i === null ? !0 : i === "Files" ? (vt(o, e), !0) : !1;
7941
+ return i === null ? !0 : i === "Files" ? (xt(o, e), !0) : !1;
7943
7942
  }
7944
7943
  }
7945
7944
  }
@@ -7964,7 +7963,7 @@ const Un = (e) => M.create({
7964
7963
  }
7965
7964
  ];
7966
7965
  }
7967
- }), Vn = M.create({
7966
+ }), Dn = M.create({
7968
7967
  name: "textAlignment",
7969
7968
  addGlobalAttributes() {
7970
7969
  return [
@@ -7990,7 +7989,7 @@ const Un = (e) => M.create({
7990
7989
  }
7991
7990
  ];
7992
7991
  }
7993
- }), Rn = M.create({
7992
+ }), Vn = M.create({
7994
7993
  name: "blockTextColor",
7995
7994
  addGlobalAttributes() {
7996
7995
  return [
@@ -8008,7 +8007,7 @@ const Un = (e) => M.create({
8008
8007
  }
8009
8008
  ];
8010
8009
  }
8011
- }), On = M.create({
8010
+ }), Rn = M.create({
8012
8011
  name: "trailingNode",
8013
8012
  addProseMirrorPlugins() {
8014
8013
  const e = new S(this.name);
@@ -8043,8 +8042,8 @@ const Un = (e) => M.create({
8043
8042
  })
8044
8043
  ];
8045
8044
  }
8046
- }), zn = new S("non-editable-block"), Fn = () => new y({
8047
- key: zn,
8045
+ }), On = new S("non-editable-block"), zn = () => new y({
8046
+ key: On,
8048
8047
  props: {
8049
8048
  handleKeyDown: (e, t) => {
8050
8049
  if ("node" in e.state.selection) {
@@ -8069,7 +8068,7 @@ const Un = (e) => M.create({
8069
8068
  return !1;
8070
8069
  }
8071
8070
  }
8072
- }), Xe = new S("previous-blocks"), Gn = {
8071
+ }), Ze = new S("previous-blocks"), Fn = {
8073
8072
  // Numbered List Items
8074
8073
  index: "index",
8075
8074
  // Headings
@@ -8078,17 +8077,17 @@ const Un = (e) => M.create({
8078
8077
  type: "type",
8079
8078
  depth: "depth",
8080
8079
  "depth-change": "depth-change"
8081
- }, Kn = () => {
8080
+ }, Gn = () => {
8082
8081
  let e;
8083
8082
  return new y({
8084
- key: Xe,
8083
+ key: Ze,
8085
8084
  view(t) {
8086
8085
  return {
8087
8086
  update: async (o, i) => {
8088
8087
  var n;
8089
8088
  ((n = this.key) == null ? void 0 : n.getState(o.state).updatedBlocks.size) > 0 && (e = setTimeout(() => {
8090
8089
  o.dispatch(
8091
- o.state.tr.setMeta(Xe, { clearUpdate: !0 })
8090
+ o.state.tr.setMeta(Ze, { clearUpdate: !0 })
8092
8091
  );
8093
8092
  }, 0));
8094
8093
  },
@@ -8146,7 +8145,7 @@ const Un = (e) => M.create({
8146
8145
  return;
8147
8146
  const a = o.currentTransactionOldBlockAttrs[n.attrs.id], s = {};
8148
8147
  for (const [d, u] of Object.entries(a))
8149
- s["data-prev-" + Gn[d]] = u || "none";
8148
+ s["data-prev-" + Fn[d]] = u || "none";
8150
8149
  const l = K.node(r, r + n.nodeSize, {
8151
8150
  ...s
8152
8151
  });
@@ -8155,13 +8154,13 @@ const Un = (e) => M.create({
8155
8154
  }
8156
8155
  }
8157
8156
  });
8158
- }, Wn = {
8157
+ }, Kn = {
8159
8158
  blockColor: "data-block-color",
8160
8159
  blockStyle: "data-block-style",
8161
8160
  id: "data-id",
8162
8161
  depth: "data-depth",
8163
8162
  depthChange: "data-depth-change"
8164
- }, $n = $.create({
8163
+ }, Wn = $.create({
8165
8164
  name: "blockContainer",
8166
8165
  group: "blockContainer",
8167
8166
  // A block always contains content, and optionally a blockGroup which contains nested blocks
@@ -8177,7 +8176,7 @@ const Un = (e) => M.create({
8177
8176
  if (typeof e == "string")
8178
8177
  return !1;
8179
8178
  const t = {};
8180
- for (const [o, i] of Object.entries(Wn))
8179
+ for (const [o, i] of Object.entries(Kn))
8181
8180
  e.getAttribute(i) && (t[o] = e.getAttribute(i));
8182
8181
  return e.getAttribute("data-node-type") === "blockContainer" ? t : !1;
8183
8182
  }
@@ -8194,7 +8193,7 @@ const Un = (e) => M.create({
8194
8193
  ...((n = this.options.domAttributes) == null ? void 0 : n.block) || {},
8195
8194
  ...e
8196
8195
  }, i = document.createElement("div");
8197
- i.className = j("bn-block", o.class), i.setAttribute("data-node-type", this.name);
8196
+ i.className = D("bn-block", o.class), i.setAttribute("data-node-type", this.name);
8198
8197
  for (const [r, a] of Object.entries(o))
8199
8198
  r !== "class" && i.setAttribute(r, a);
8200
8199
  return t.appendChild(i), {
@@ -8237,7 +8236,7 @@ const Un = (e) => M.create({
8237
8236
  s.childCount === 2 ? o.tr.replace(
8238
8237
  r + l.nodeSize + 1,
8239
8238
  a - 1,
8240
- new D(L.from(h), 0, 0)
8239
+ new j(L.from(h), 0, 0)
8241
8240
  ) : o.tr.insert(
8242
8241
  r + l.nodeSize,
8243
8242
  o.schema.nodes.blockGroup.create({}, h)
@@ -8259,7 +8258,7 @@ const Un = (e) => M.create({
8259
8258
  this.options.editor.schema.styleSchema
8260
8259
  );
8261
8260
  else if (t.content.type === "tableContent")
8262
- p = ot(
8261
+ p = it(
8263
8262
  t.content,
8264
8263
  o.schema,
8265
8264
  this.options.editor.schema.styleSchema
@@ -8340,7 +8339,7 @@ const Un = (e) => M.create({
8340
8339
  t.tr.deleteRange(l, l + s.nodeSize).replace(
8341
8340
  p - 1,
8342
8341
  l,
8343
- new D(s.content, 0, 0)
8342
+ new j(s.content, 0, 0)
8344
8343
  ).scrollIntoView()
8345
8344
  ), t.tr.setSelection(
8346
8345
  new Y(t.doc.resolve(p - 1))
@@ -8360,7 +8359,7 @@ const Un = (e) => M.create({
8360
8359
  return n && (i.tr.insert(m, f), i.tr.replace(
8361
8360
  g,
8362
8361
  g + 1,
8363
- h.content.size > 0 ? new D(
8362
+ h.content.size > 0 ? new j(
8364
8363
  L.from(h),
8365
8364
  u + 2,
8366
8365
  u + 2
@@ -8375,7 +8374,7 @@ const Un = (e) => M.create({
8375
8374
  ), i.tr.replace(
8376
8375
  l + 1,
8377
8376
  d - 1,
8378
- p.content.size > 0 ? new D(
8377
+ p.content.size > 0 ? new j(
8379
8378
  L.from(p),
8380
8379
  u + 2,
8381
8380
  u + 2
@@ -8385,7 +8384,7 @@ const Un = (e) => M.create({
8385
8384
  };
8386
8385
  },
8387
8386
  addProseMirrorPlugins() {
8388
- return [Kn(), Fn()];
8387
+ return [Gn(), zn()];
8389
8388
  },
8390
8389
  addKeyboardShortcuts() {
8391
8390
  return {
@@ -8492,7 +8491,7 @@ const Un = (e) => M.create({
8492
8491
  }
8493
8492
  };
8494
8493
  }
8495
- }), qn = $.create({
8494
+ }), $n = $.create({
8496
8495
  name: "blockGroup",
8497
8496
  group: "blockGroup",
8498
8497
  content: "blockContainer+",
@@ -8510,7 +8509,7 @@ const Un = (e) => M.create({
8510
8509
  ...((i = this.options.domAttributes) == null ? void 0 : i.blockGroup) || {},
8511
8510
  ...e
8512
8511
  }, o = document.createElement("div");
8513
- o.className = j(
8512
+ o.className = D(
8514
8513
  "bn-block-group",
8515
8514
  t.class
8516
8515
  ), o.setAttribute("data-node-type", "blockGroup");
@@ -8521,11 +8520,11 @@ const Un = (e) => M.create({
8521
8520
  contentDOM: o
8522
8521
  };
8523
8522
  }
8524
- }), Xn = $.create({
8523
+ }), qn = $.create({
8525
8524
  name: "doc",
8526
8525
  topNode: !0,
8527
8526
  content: "blockGroup"
8528
- }), Zn = (e) => {
8527
+ }), Xn = (e) => {
8529
8528
  var i;
8530
8529
  const t = [
8531
8530
  J.ClipboardTextSerializer,
@@ -8534,17 +8533,17 @@ const Un = (e) => M.create({
8534
8533
  J.FocusEvents,
8535
8534
  J.Tabindex,
8536
8535
  // DevTools,
8537
- ho,
8536
+ mo,
8538
8537
  // DropCursor,
8539
8538
  oe.configure({
8540
8539
  types: ["blockContainer"]
8541
8540
  }),
8542
- mo.extend({ priority: 10 }),
8541
+ fo.extend({ priority: 10 }),
8543
8542
  // Comments,
8544
8543
  // basics:
8545
- bo,
8544
+ ko,
8546
8545
  // marks:
8547
- go.extend({
8546
+ bo.extend({
8548
8547
  addKeyboardShortcuts() {
8549
8548
  return {
8550
8549
  "Mod-k": () => (this.editor.commands.toggleLink({ href: "" }), !0)
@@ -8552,9 +8551,9 @@ const Un = (e) => M.create({
8552
8551
  }
8553
8552
  }),
8554
8553
  ...Object.values(e.styleSpecs).map((n) => n.implementation.mark),
8555
- Rn,
8556
- jn,
8557
8554
  Vn,
8555
+ jn,
8556
+ Dn,
8558
8557
  // make sure escape blurs editor, so that we can tab to other elements in the host page (accessibility)
8559
8558
  M.create({
8560
8559
  name: "OverrideEscape",
@@ -8565,12 +8564,12 @@ const Un = (e) => M.create({
8565
8564
  }
8566
8565
  }),
8567
8566
  // nodes
8568
- Xn,
8569
- $n.configure({
8567
+ qn,
8568
+ Wn.configure({
8570
8569
  editor: e.editor,
8571
8570
  domAttributes: e.domAttributes
8572
8571
  }),
8573
- qn.configure({
8572
+ $n.configure({
8574
8573
  domAttributes: e.domAttributes
8575
8574
  }),
8576
8575
  ...Object.values(e.inlineContentSpecs).filter((n) => n.config !== "link" && n.config !== "text").map((n) => n.implementation.node.configure({
@@ -8590,17 +8589,17 @@ const Un = (e) => M.create({
8590
8589
  domAttributes: e.domAttributes
8591
8590
  })
8592
8591
  ]),
8593
- Nn(e.editor),
8592
+ An(e.editor),
8593
+ Hn(e.editor),
8594
8594
  Un(e.editor),
8595
- Dn(e.editor),
8596
- po.configure({ width: 5, color: "#ddeeff" }),
8595
+ ho.configure({ width: 5, color: "#ddeeff" }),
8597
8596
  // This needs to be at the bottom of this list, because Key events (such as enter, when selecting a /command),
8598
8597
  // should be handled before Enter handlers in other components like splitListItem
8599
- ...e.trailingBlock === void 0 || e.trailingBlock ? [On] : []
8598
+ ...e.trailingBlock === void 0 || e.trailingBlock ? [Rn] : []
8600
8599
  ];
8601
8600
  if (e.collaboration) {
8602
8601
  if (t.push(
8603
- co.configure({
8602
+ uo.configure({
8604
8603
  fragment: e.collaboration.fragment
8605
8604
  })
8606
8605
  ), (i = e.collaboration.provider) != null && i.awareness) {
@@ -8613,7 +8612,7 @@ const Un = (e) => M.create({
8613
8612
  return a.insertBefore(l, null), a.insertBefore(s, null), a.insertBefore(d, null), a;
8614
8613
  };
8615
8614
  t.push(
8616
- uo.configure({
8615
+ po.configure({
8617
8616
  user: e.collaboration.user,
8618
8617
  render: e.collaboration.renderCursor || n,
8619
8618
  provider: e.collaboration.provider
@@ -8621,24 +8620,24 @@ const Un = (e) => M.create({
8621
8620
  );
8622
8621
  }
8623
8622
  } else
8624
- t.push(fo);
8623
+ t.push(go);
8625
8624
  const o = e.disableExtensions || [];
8626
8625
  return t.filter((n) => !o.includes(n.name));
8627
8626
  };
8628
- function Jn(e, t) {
8627
+ function Zn(e, t) {
8629
8628
  const o = [];
8630
8629
  return e.forEach((i, n, r) => {
8631
8630
  r !== t && o.push(i);
8632
8631
  }), L.from(o);
8633
8632
  }
8634
- function Yn(e, t) {
8633
+ function Jn(e, t) {
8635
8634
  let o = L.from(e.content);
8636
8635
  for (let i = 0; i < o.childCount; i++)
8637
8636
  if (o.child(i).type.spec.group === "blockContent") {
8638
8637
  const n = [o.child(i)];
8639
8638
  if (i + 1 < o.childCount && o.child(i + 1).type.spec.group === "blockGroup") {
8640
8639
  const a = o.child(i + 1).child(0).child(0);
8641
- (a.type.name === "bulletListItem" || a.type.name === "numberedListItem" || a.type.name === "checkListItem") && (n.push(o.child(i + 1)), o = Jn(o, i + 1));
8640
+ (a.type.name === "bulletListItem" || a.type.name === "numberedListItem" || a.type.name === "checkListItem") && (n.push(o.child(i + 1)), o = Zn(o, i + 1));
8642
8641
  }
8643
8642
  const r = t.state.schema.nodes.blockContainer.create(
8644
8643
  void 0,
@@ -8646,14 +8645,14 @@ function Yn(e, t) {
8646
8645
  );
8647
8646
  o = o.replaceChild(i, r);
8648
8647
  }
8649
- return new D(o, e.openStart, e.openEnd);
8648
+ return new j(o, e.openStart, e.openEnd);
8650
8649
  }
8651
8650
  function be(e) {
8652
8651
  return e && Object.fromEntries(
8653
8652
  Object.entries(e).filter(([, t]) => t !== void 0)
8654
8653
  );
8655
8654
  }
8656
- class Ae {
8655
+ class Ne {
8657
8656
  constructor(t) {
8658
8657
  c(this, "blockSpecs");
8659
8658
  c(this, "inlineContentSpecs");
@@ -8665,15 +8664,15 @@ class Ae {
8665
8664
  c(this, "BlockNoteEditor", "only for types");
8666
8665
  c(this, "Block", "only for types");
8667
8666
  c(this, "PartialBlock", "only for types");
8668
- this.blockSpecs = be(t == null ? void 0 : t.blockSpecs) || ft, this.inlineContentSpecs = be(t == null ? void 0 : t.inlineContentSpecs) || bt, this.styleSpecs = be(t == null ? void 0 : t.styleSpecs) || gt, this.blockSchema = ct(this.blockSpecs), this.inlineContentSchema = ut(
8667
+ this.blockSpecs = be(t == null ? void 0 : t.blockSpecs) || gt, this.inlineContentSpecs = be(t == null ? void 0 : t.inlineContentSpecs) || kt, this.styleSpecs = be(t == null ? void 0 : t.styleSpecs) || bt, this.blockSchema = ut(this.blockSpecs), this.inlineContentSchema = pt(
8669
8668
  this.inlineContentSpecs
8670
- ), this.styleSchema = ht(this.styleSpecs);
8669
+ ), this.styleSchema = mt(this.styleSpecs);
8671
8670
  }
8672
8671
  static create(t) {
8673
- return new Ae(t);
8672
+ return new Ne(t);
8674
8673
  }
8675
8674
  }
8676
- class xt extends zt {
8675
+ class Et extends Ft {
8677
8676
  constructor(o, i) {
8678
8677
  super({ ...o, content: void 0 });
8679
8678
  c(this, "_state");
@@ -8692,14 +8691,14 @@ class xt extends zt {
8692
8691
  if (r)
8693
8692
  return r;
8694
8693
  const d = a.apply(n.nodes.doc, l), u = JSON.parse(JSON.stringify(d.toJSON()));
8695
- return u.content[0].content[0].attrs.id = "initialBlockId", r = It.fromJSON(n, u), r;
8694
+ return u.content[0].content[0].attrs.id = "initialBlockId", r = At.fromJSON(n, u), r;
8696
8695
  };
8697
8696
  let s;
8698
8697
  try {
8699
8698
  const l = o == null ? void 0 : o.content.map(
8700
8699
  (d) => P(d, this.schema, i).toJSON()
8701
8700
  );
8702
- s = Ft(
8701
+ s = Gt(
8703
8702
  {
8704
8703
  type: "doc",
8705
8704
  content: [
@@ -8720,7 +8719,7 @@ class xt extends zt {
8720
8719
  "Error creating document from blocks passed as `initialContent`:\n" + +JSON.stringify(o.content)
8721
8720
  );
8722
8721
  }
8723
- this._state = Kt.create({
8722
+ this._state = Wt.create({
8724
8723
  doc: s,
8725
8724
  schema: this.schema
8726
8725
  // selection: selection || undefined,
@@ -8737,7 +8736,7 @@ class xt extends zt {
8737
8736
  */
8738
8737
  createViewAlternative() {
8739
8738
  queueMicrotask(() => {
8740
- this.view = new lo(
8739
+ this.view = new co(
8741
8740
  { mount: this.options.element },
8742
8741
  // use mount option so that we reuse the existing element instead of creating a new one
8743
8742
  {
@@ -8754,10 +8753,10 @@ class xt extends zt {
8754
8753
  });
8755
8754
  }
8756
8755
  }
8757
- xt.prototype.createView = () => {
8756
+ Et.prototype.createView = () => {
8758
8757
  };
8759
- const Qn = new S("blocknote-placeholder"), er = (e, t) => new y({
8760
- key: Qn,
8758
+ const Yn = new S("blocknote-placeholder"), Qn = (e, t) => new y({
8759
+ key: Yn,
8761
8760
  view: () => {
8762
8761
  const o = document.createElement("style"), i = e._tiptapEditor.options.injectNonce;
8763
8762
  i && o.setAttribute("nonce", i), e._tiptapEditor.view.root instanceof ShadowRoot ? e._tiptapEditor.view.root.append(o) : e._tiptapEditor.view.root.head.appendChild(o);
@@ -8801,12 +8800,12 @@ const Qn = new S("blocknote-placeholder"), er = (e, t) => new y({
8801
8800
  return G.create(i, [l]);
8802
8801
  }
8803
8802
  }
8804
- }), tr = {
8803
+ }), er = {
8805
8804
  enableInputRules: !0,
8806
8805
  enablePasteRules: !0,
8807
8806
  enableCoreExtensions: !1
8808
8807
  };
8809
- class Et {
8808
+ class Ct {
8810
8809
  constructor(t) {
8811
8810
  c(this, "_pmSchema");
8812
8811
  /**
@@ -8885,10 +8884,10 @@ class Et {
8885
8884
  throw new Error(
8886
8885
  "editable initialization option is deprecated, use <BlockNoteView editable={true/false} />, or alternatively editor.isEditable = true/false"
8887
8886
  );
8888
- this.dictionary = t.dictionary || Qe;
8887
+ this.dictionary = t.dictionary || et;
8889
8888
  const i = {
8890
8889
  defaultStyles: !0,
8891
- schema: t.schema || Ae.create(),
8890
+ schema: t.schema || Ne.create(),
8892
8891
  _headless: !1,
8893
8892
  ...t,
8894
8893
  placeholders: {
@@ -8896,8 +8895,8 @@ class Et {
8896
8895
  ...t.placeholders
8897
8896
  }
8898
8897
  };
8899
- this.schema = i.schema, this.blockImplementations = i.schema.blockSpecs, this.inlineContentImplementations = i.schema.inlineContentSpecs, this.styleImplementations = i.schema.styleSpecs, this.formattingToolbar = new fn(this), this.linkToolbar = new kn(this), this.sideMenu = new En(this), this.suggestionMenus = new Mn(this), this.filePanel = new pn(this), E("table", this) && (this.tableHandles = new An(this));
8900
- const n = Zn({
8898
+ this.schema = i.schema, this.blockImplementations = i.schema.blockSpecs, this.inlineContentImplementations = i.schema.inlineContentSpecs, this.styleImplementations = i.schema.styleSpecs, this.formattingToolbar = new mn(this), this.linkToolbar = new bn(this), this.sideMenu = new xn(this), this.suggestionMenus = new Sn(this), this.filePanel = new un(this), E("table", this) && (this.tableHandles = new In(this));
8899
+ const n = Xn({
8901
8900
  editor: this,
8902
8901
  domAttributes: i.domAttributes || {},
8903
8902
  blockSpecs: this.schema.blockSpecs,
@@ -8915,7 +8914,7 @@ class Et {
8915
8914
  this.suggestionMenus.plugin,
8916
8915
  ...this.filePanel ? [this.filePanel.plugin] : [],
8917
8916
  ...this.tableHandles ? [this.tableHandles.plugin] : [],
8918
- er(this, i.placeholders)
8917
+ Qn(this, i.placeholders)
8919
8918
  ]
8920
8919
  });
8921
8920
  n.push(r), this.uploadFile = i.uploadFile, this.resolveFileUrl = i.resolveFileUrl || (async (g) => g), this.headless = i._headless, i.collaboration && i.initialContent && console.warn(
@@ -8937,7 +8936,7 @@ class Et {
8937
8936
  "initialContent must be a non-empty array of blocks, received: " + a
8938
8937
  );
8939
8938
  const s = {
8940
- ...tr,
8939
+ ...er,
8941
8940
  ...i._tiptapOptions,
8942
8941
  content: a,
8943
8942
  extensions: [
@@ -8949,16 +8948,16 @@ class Et {
8949
8948
  attributes: {
8950
8949
  ...(p = (u = i._tiptapOptions) == null ? void 0 : u.editorProps) == null ? void 0 : p.attributes,
8951
8950
  ...(h = i.domAttributes) == null ? void 0 : h.editor,
8952
- class: j(
8951
+ class: D(
8953
8952
  "bn-editor",
8954
8953
  i.defaultStyles ? "bn-default-styles" : "",
8955
8954
  ((m = (f = i.domAttributes) == null ? void 0 : f.editor) == null ? void 0 : m.class) || ""
8956
8955
  )
8957
8956
  },
8958
- transformPasted: Yn
8957
+ transformPasted: Jn
8959
8958
  }
8960
8959
  };
8961
- this.headless ? this._pmSchema = Gt(s.extensions) : (this._tiptapEditor = new xt(
8960
+ this.headless ? this._pmSchema = Kt(s.extensions) : (this._tiptapEditor = new Et(
8962
8961
  s,
8963
8962
  this.schema.styleSchema
8964
8963
  ), this._pmSchema = this._tiptapEditor.schema);
@@ -8967,7 +8966,7 @@ class Et {
8967
8966
  return this._pmSchema;
8968
8967
  }
8969
8968
  static create(t = {}) {
8970
- return new Et(t);
8969
+ return new Ct(t);
8971
8970
  }
8972
8971
  dispatch(t) {
8973
8972
  this._tiptapEditor.dispatch(t);
@@ -9099,7 +9098,7 @@ class Et {
9099
9098
  * @param placement Whether the text cursor should be placed at the start or end of the block.
9100
9099
  */
9101
9100
  setTextCursorPosition(t, o = "start") {
9102
- const i = typeof t == "string" ? t : t.id, { posBeforeNode: n } = Be(i, this._tiptapEditor.state.doc), { startPos: r, contentNode: a } = k(
9101
+ const i = typeof t == "string" ? t : t.id, { posBeforeNode: n } = Le(i, this._tiptapEditor.state.doc), { startPos: r, contentNode: a } = k(
9103
9102
  this._tiptapEditor.state.doc,
9104
9103
  n + 2
9105
9104
  ), s = this.schema.blockSchema[a.type.name].content;
@@ -9168,7 +9167,7 @@ class Et {
9168
9167
  * `referenceBlock`. Inserts the blocks at the start of the existing block's children if "nested" is used.
9169
9168
  */
9170
9169
  insertBlocks(t, o, i = "before") {
9171
- return Xi(t, o, i, this);
9170
+ return qi(t, o, i, this);
9172
9171
  }
9173
9172
  /**
9174
9173
  * Updates an existing block in the editor. Since updatedBlock is a PartialBlock object, some fields might not be
@@ -9178,14 +9177,14 @@ class Et {
9178
9177
  * @param update A partial block which defines how the existing block should be changed.
9179
9178
  */
9180
9179
  updateBlock(t, o) {
9181
- return Zi(t, o, this);
9180
+ return Xi(t, o, this);
9182
9181
  }
9183
9182
  /**
9184
9183
  * Removes existing blocks from the editor. Throws an error if any of the blocks could not be found.
9185
9184
  * @param blocksToRemove An array of identifiers for existing blocks that should be removed.
9186
9185
  */
9187
9186
  removeBlocks(t) {
9188
- return Ji(t, this);
9187
+ return Zi(t, this);
9189
9188
  }
9190
9189
  /**
9191
9190
  * Replaces existing blocks in the editor with new blocks. If the blocks that should be removed are not adjacent or
@@ -9195,7 +9194,7 @@ class Et {
9195
9194
  * @param blocksToInsert An array of partial blocks to replace the old ones with.
9196
9195
  */
9197
9196
  replaceBlocks(t, o) {
9198
- return Yi(t, o, this);
9197
+ return Ji(t, o, this);
9199
9198
  }
9200
9199
  /**
9201
9200
  * Insert a piece of content at the current cursor position.
@@ -9208,7 +9207,7 @@ class Et {
9208
9207
  this.pmSchema,
9209
9208
  this.schema.styleSchema
9210
9209
  );
9211
- Qi(
9210
+ Yi(
9212
9211
  {
9213
9212
  from: this._tiptapEditor.state.selection.from,
9214
9213
  to: this._tiptapEditor.state.selection.to
@@ -9356,7 +9355,7 @@ class Et {
9356
9355
  * @returns The blocks, serialized as an HTML string.
9357
9356
  */
9358
9357
  async blocksToFullHTML(t) {
9359
- return Se(this.pmSchema, this).serializeBlocks(t, {});
9358
+ return Me(this.pmSchema, this).serializeBlocks(t, {});
9360
9359
  }
9361
9360
  /**
9362
9361
  * Parses blocks from an HTML string. Tries to create `Block` objects out of any HTML block-level elements, and
@@ -9366,7 +9365,7 @@ class Et {
9366
9365
  * @returns The blocks parsed from the HTML string.
9367
9366
  */
9368
9367
  async tryParseHTMLToBlocks(t) {
9369
- return yt(
9368
+ return wt(
9370
9369
  t,
9371
9370
  this.schema.blockSchema,
9372
9371
  this.schema.inlineContentSchema,
@@ -9381,7 +9380,7 @@ class Et {
9381
9380
  * @returns The blocks, serialized as a Markdown string.
9382
9381
  */
9383
9382
  async blocksToMarkdownLossy(t = this.document) {
9384
- return on(t, this.pmSchema, this, {});
9383
+ return tn(t, this.pmSchema, this, {});
9385
9384
  }
9386
9385
  /**
9387
9386
  * Creates a list of blocks from a Markdown string. Tries to create `Block` and `InlineNode` objects based on
@@ -9391,7 +9390,7 @@ class Et {
9391
9390
  * @returns The blocks parsed from the Markdown string.
9392
9391
  */
9393
9392
  async tryParseMarkdownToBlocks(t) {
9394
- return cn(
9393
+ return dn(
9395
9394
  t,
9396
9395
  this.schema.blockSchema,
9397
9396
  this.schema.inlineContentSchema,
@@ -9450,22 +9449,22 @@ class Et {
9450
9449
  );
9451
9450
  }
9452
9451
  }
9453
- let ne;
9454
- async function ea(e, t) {
9455
- if (!Wi("text", e))
9452
+ let ne, ke;
9453
+ async function Yr(e, t) {
9454
+ if (!Ki("text", e))
9456
9455
  return [];
9457
9456
  if (!ne) {
9458
- ne = import("@emoji-mart/data");
9457
+ ne = import("@emoji-mart/data"), ke = await import("emoji-mart");
9459
9458
  const n = (await ne).default;
9460
- await ko({ data: n });
9459
+ await ke.init({ data: n });
9461
9460
  }
9462
9461
  const o = (await ne).default;
9463
- return (t.trim() === "" ? Object.values(o.emojis) : await _o.search(t)).map((n) => ({
9462
+ return (t.trim() === "" ? Object.values(o.emojis) : await ke.SearchIndex.search(t)).map((n) => ({
9464
9463
  id: n.skins[0].native,
9465
9464
  onItemClick: () => e.insertInlineContent(n.skins[0].native + " ")
9466
9465
  }));
9467
9466
  }
9468
- function ke(e = "") {
9467
+ function _e(e = "") {
9469
9468
  return typeof e == "string" ? [
9470
9469
  {
9471
9470
  type: "text",
@@ -9474,22 +9473,22 @@ function ke(e = "") {
9474
9473
  }
9475
9474
  ] : e;
9476
9475
  }
9477
- function Ct(e) {
9478
- return typeof e == "string" ? ke(e) : Array.isArray(e) ? e.flatMap((t) => typeof t == "string" ? ke(t) : tt(t) ? {
9476
+ function St(e) {
9477
+ return typeof e == "string" ? _e(e) : Array.isArray(e) ? e.flatMap((t) => typeof t == "string" ? _e(t) : ot(t) ? {
9479
9478
  ...t,
9480
- content: ke(t.content)
9479
+ content: _e(t.content)
9481
9480
  } : te(t) ? t : {
9482
9481
  props: {},
9483
9482
  ...t,
9484
- content: Ct(t.content)
9483
+ content: St(t.content)
9485
9484
  }) : e;
9486
9485
  }
9487
- function ta(e, t) {
9486
+ function Qr(e, t) {
9488
9487
  return t.map(
9489
- (o) => St(e, o)
9488
+ (o) => Mt(e, o)
9490
9489
  );
9491
9490
  }
9492
- function St(e, t) {
9491
+ function Mt(e, t) {
9493
9492
  const o = {
9494
9493
  id: "",
9495
9494
  type: t.type,
@@ -9504,142 +9503,142 @@ function St(e, t) {
9504
9503
  }
9505
9504
  ), {
9506
9505
  ...o,
9507
- content: Ct(o.content),
9508
- children: o.children.map((i) => St(e, i))
9506
+ content: St(o.content),
9507
+ children: o.children.map((i) => Mt(e, i))
9509
9508
  };
9510
9509
  }
9511
- function or(e) {
9512
- e.id || (e.id = oe.options.generateID()), e.children && ir(e.children);
9510
+ function tr(e) {
9511
+ e.id || (e.id = oe.options.generateID()), e.children && or(e.children);
9513
9512
  }
9514
- function ir(e) {
9513
+ function or(e) {
9515
9514
  for (const t of e)
9516
- or(t);
9515
+ tr(t);
9517
9516
  }
9518
9517
  export {
9519
- Qo as AudioBlock,
9520
- Et as BlockNoteEditor,
9521
- Ae as BlockNoteSchema,
9522
- ri as FileBlock,
9523
- pn as FilePanelProsemirrorPlugin,
9524
- un as FilePanelView,
9525
- fn as FormattingToolbarProsemirrorPlugin,
9526
- hn as FormattingToolbarView,
9527
- yt as HTMLToBlocks,
9528
- ui as ImageBlock,
9529
- kn as LinkToolbarProsemirrorPlugin,
9530
- En as SideMenuProsemirrorPlugin,
9531
- vn as SideMenuView,
9532
- Mn as SuggestionMenuProseMirrorPlugin,
9533
- An as TableHandlesProsemirrorPlugin,
9534
- In as TableHandlesView,
9518
+ Yo as AudioBlock,
9519
+ Ct as BlockNoteEditor,
9520
+ Ne as BlockNoteSchema,
9521
+ ni as FileBlock,
9522
+ un as FilePanelProsemirrorPlugin,
9523
+ cn as FilePanelView,
9524
+ mn as FormattingToolbarProsemirrorPlugin,
9525
+ pn as FormattingToolbarView,
9526
+ wt as HTMLToBlocks,
9527
+ ci as ImageBlock,
9528
+ bn as LinkToolbarProsemirrorPlugin,
9529
+ xn as SideMenuProsemirrorPlugin,
9530
+ wn as SideMenuView,
9531
+ Sn as SuggestionMenuProseMirrorPlugin,
9532
+ In as TableHandlesProsemirrorPlugin,
9533
+ Ln as TableHandlesView,
9535
9534
  oe as UniqueID,
9536
9535
  I as UnreachableCaseError,
9537
- bi as VideoBlock,
9538
- or as addIdsToBlock,
9539
- ir as addIdsToBlocks,
9540
- Ro as addInlineContentAttributes,
9541
- Oo as addInlineContentKeyboardShortcuts,
9542
- Wo as addStyleAttributes,
9543
- Rr as assertEmpty,
9544
- Xo as audioBlockConfig,
9545
- Jo as audioParse,
9546
- qo as audioPropSchema,
9547
- Zo as audioRender,
9548
- Yo as audioToExternalHTML,
9536
+ gi as VideoBlock,
9537
+ tr as addIdsToBlock,
9538
+ or as addIdsToBlocks,
9539
+ Vo as addInlineContentAttributes,
9540
+ Ro as addInlineContentKeyboardShortcuts,
9541
+ Ko as addStyleAttributes,
9542
+ Dr as assertEmpty,
9543
+ qo as audioBlockConfig,
9544
+ Zo as audioParse,
9545
+ $o as audioPropSchema,
9546
+ Xo as audioRender,
9547
+ Jo as audioToExternalHTML,
9549
9548
  P as blockToNode,
9550
- on as blocksToMarkdown,
9549
+ tn as blocksToMarkdown,
9551
9550
  ae as camelToDataKebab,
9552
- Zr as checkBlockHasDefaultProp,
9553
- $i as checkBlockIsDefaultType,
9554
- $r as checkBlockIsFileBlock,
9555
- Xr as checkBlockIsFileBlockWithPlaceholder,
9556
- qr as checkBlockIsFileBlockWithPreview,
9557
- qi as checkBlockTypeHasDefaultProp,
9551
+ qr as checkBlockHasDefaultProp,
9552
+ Wi as checkBlockIsDefaultType,
9553
+ Kr as checkBlockIsFileBlock,
9554
+ $r as checkBlockIsFileBlockWithPlaceholder,
9555
+ Wr as checkBlockIsFileBlockWithPreview,
9556
+ $i as checkBlockTypeHasDefaultProp,
9558
9557
  E as checkDefaultBlockTypeInSchema,
9559
- Wi as checkDefaultInlineContentTypeInSchema,
9560
- Le as cleanHTMLToMarkdown,
9561
- Ce as contentNodeToInlineContent,
9558
+ Ki as checkDefaultInlineContentTypeInSchema,
9559
+ Ie as cleanHTMLToMarkdown,
9560
+ Se as contentNodeToInlineContent,
9562
9561
  ce as createAddFileButton,
9563
9562
  le as createBlockSpec,
9564
9563
  q as createBlockSpecFromStronglyTypedTiptapNode,
9565
9564
  de as createDefaultFilePreview,
9566
9565
  se as createExternalHTMLExporter,
9567
- Me as createFigureWithCaption,
9566
+ Te as createFigureWithCaption,
9568
9567
  R as createFileAndCaptionWrapper,
9569
- Fr as createInlineContentSpec,
9570
- Fo as createInlineContentSpecFromTipTapNode,
9571
- dt as createInternalBlockSpec,
9572
- Se as createInternalHTMLSerializer,
9573
- zo as createInternalInlineContentSpec,
9574
- pt as createInternalStyleSpec,
9568
+ Or as createInlineContentSpec,
9569
+ zo as createInlineContentSpecFromTipTapNode,
9570
+ ct as createInternalBlockSpec,
9571
+ Me as createInternalHTMLSerializer,
9572
+ Oo as createInternalInlineContentSpec,
9573
+ ht as createInternalStyleSpec,
9575
9574
  pe as createLinkWithCaption,
9576
- mt as createResizeHandlesWrapper,
9575
+ ft as createResizeHandlesWrapper,
9577
9576
  O as createStronglyTypedTiptapNode,
9578
- Gr as createStyleSpec,
9577
+ zr as createStyleSpec,
9579
9578
  U as createStyleSpecFromTipTapMark,
9580
- Jr as createSuggestionMenu,
9581
- Gi as defaultBlockSchema,
9582
- ft as defaultBlockSpecs,
9583
- Ki as defaultInlineContentSchema,
9584
- bt as defaultInlineContentSpecs,
9579
+ Xr as createSuggestionMenu,
9580
+ Fi as defaultBlockSchema,
9581
+ gt as defaultBlockSpecs,
9582
+ Gi as defaultInlineContentSchema,
9583
+ kt as defaultInlineContentSpecs,
9585
9584
  _ as defaultProps,
9586
- Wr as defaultStyleSchema,
9587
- gt as defaultStyleSpecs,
9588
- ti as fileBlockConfig,
9589
- ii as fileParse,
9590
- ei as filePropSchema,
9591
- oi as fileRender,
9592
- ni as fileToExternalHTML,
9593
- zr as filenameFromURL,
9594
- Qr as filterSuggestionItems,
9585
+ Gr as defaultStyleSchema,
9586
+ bt as defaultStyleSpecs,
9587
+ ei as fileBlockConfig,
9588
+ oi as fileParse,
9589
+ Qo as filePropSchema,
9590
+ ti as fileRender,
9591
+ ii as fileToExternalHTML,
9592
+ Rr as filenameFromURL,
9593
+ Jr as filterSuggestionItems,
9595
9594
  H as formatKeyboardShortcut,
9596
- mn as formattingToolbarPluginKey,
9595
+ hn as formattingToolbarPluginKey,
9597
9596
  jo as getBlockFromPos,
9598
- Zn as getBlockNoteExtensions,
9599
- ct as getBlockSchemaFromSpecs,
9600
- ea as getDefaultEmojiPickerItems,
9601
- Yr as getDefaultSlashMenuItems,
9597
+ Xn as getBlockNoteExtensions,
9598
+ ut as getBlockSchemaFromSpecs,
9599
+ Yr as getDefaultEmojiPickerItems,
9600
+ Zr as getDefaultSlashMenuItems,
9602
9601
  he as getDraggableBlockFromElement,
9603
- Go as getInlineContentParseRules,
9604
- ut as getInlineContentSchemaFromSpecs,
9605
- Vo as getParseRules,
9606
- $o as getStyleParseRules,
9607
- ht as getStyleSchemaFromSpecs,
9608
- si as imageBlockConfig,
9609
- di as imageParse,
9610
- ai as imagePropSchema,
9611
- li as imageRender,
9612
- ci as imageToExternalHTML,
9613
- st as inheritedProps,
9602
+ Fo as getInlineContentParseRules,
9603
+ pt as getInlineContentSchemaFromSpecs,
9604
+ Do as getParseRules,
9605
+ Wo as getStyleParseRules,
9606
+ mt as getStyleSchemaFromSpecs,
9607
+ ai as imageBlockConfig,
9608
+ li as imageParse,
9609
+ ri as imagePropSchema,
9610
+ si as imageRender,
9611
+ di as imageToExternalHTML,
9612
+ lt as inheritedProps,
9614
9613
  W as inlineContentToNodes,
9615
9614
  x as insertOrUpdateBlock,
9616
- Do as isAppleOS,
9617
- je as isLinkInlineContent,
9618
- tt as isPartialLinkInlineContent,
9619
- Or as isSafari,
9615
+ Uo as isAppleOS,
9616
+ Ve as isLinkInlineContent,
9617
+ ot as isPartialLinkInlineContent,
9618
+ Vr as isSafari,
9620
9619
  te as isStyledTextInlineContent,
9621
- bn as linkToolbarPluginKey,
9622
- Vr as locales,
9623
- cn as markdownToBlocks,
9624
- j as mergeCSSClasses,
9620
+ gn as linkToolbarPluginKey,
9621
+ jr as locales,
9622
+ dn as markdownToBlocks,
9623
+ D as mergeCSSClasses,
9625
9624
  v as nodeToBlock,
9626
- nt as nodeToCustomInlineContent,
9627
- Oe as parseEmbedElement,
9625
+ rt as nodeToCustomInlineContent,
9626
+ ze as parseEmbedElement,
9628
9627
  ue as parseFigureElement,
9629
- Fe as parseImageElement,
9630
- St as partialBlockToBlockForTesting,
9631
- ta as partialBlocksToBlocksForTesting,
9632
- lt as propsToAttributes,
9633
- xn as sideMenuPluginKey,
9634
- Ko as stylePropsToAttributes,
9635
- ot as tableContentToNodes,
9628
+ Ge as parseImageElement,
9629
+ Mt as partialBlockToBlockForTesting,
9630
+ Qr as partialBlocksToBlocksForTesting,
9631
+ dt as propsToAttributes,
9632
+ vn as sideMenuPluginKey,
9633
+ Go as stylePropsToAttributes,
9634
+ it as tableContentToNodes,
9636
9635
  Q as tableHandlesPluginKey,
9637
- Kr as uploadToTmpFilesDotOrg_DEV_ONLY,
9638
- hi as videoBlockConfig,
9639
- fi as videoParse,
9640
- pi as videoPropSchema,
9641
- mi as videoRender,
9642
- gi as videoToExternalHTML,
9636
+ Fr as uploadToTmpFilesDotOrg_DEV_ONLY,
9637
+ pi as videoBlockConfig,
9638
+ mi as videoParse,
9639
+ ui as videoPropSchema,
9640
+ hi as videoRender,
9641
+ fi as videoToExternalHTML,
9643
9642
  fe as wrapInBlockStructure
9644
9643
  };
9645
9644
  //# sourceMappingURL=blocknote.js.map