reactjs-tiptap-editor 1.0.18 → 1.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/lib/{ActionMenuButton-Df077oOH.cjs → ActionMenuButton-BPgqKDXT.cjs} +1 -1
  2. package/lib/{ActionMenuButton-BOjCHFTA.js → ActionMenuButton-CMXWxvWu.js} +1 -1
  3. package/lib/Attachment.cjs +1 -1
  4. package/lib/Attachment.js +23 -23
  5. package/lib/Blockquote.cjs +3 -3
  6. package/lib/Blockquote.js +33 -28
  7. package/lib/Bold.cjs +1 -1
  8. package/lib/Bold.js +16 -10
  9. package/lib/BulletList.cjs +1 -1
  10. package/lib/BulletList.js +2 -2
  11. package/lib/Callout.cjs +1 -1
  12. package/lib/Callout.js +21 -22
  13. package/lib/Clear.cjs +1 -1
  14. package/lib/Clear.js +2 -2
  15. package/lib/Code.cjs +1 -1
  16. package/lib/Code.js +2 -2
  17. package/lib/CodeBlock.cjs +20 -44
  18. package/lib/CodeBlock.js +1385 -4012
  19. package/lib/CodeView.cjs +1 -1
  20. package/lib/CodeView.js +2 -2
  21. package/lib/Color.cjs +1 -1
  22. package/lib/Color.js +3 -3
  23. package/lib/Column.cjs +1 -1
  24. package/lib/Column.js +2 -2
  25. package/lib/{Drawer-DwrlY_lY.cjs → Drawer-BivLAzMN.cjs} +1 -1
  26. package/lib/{Drawer-DxOoRiGQ.js → Drawer-BmVmgJsc.js} +3 -3
  27. package/lib/Drawer.cjs +1 -1
  28. package/lib/Drawer.js +4 -4
  29. package/lib/Emoji.cjs +1 -1
  30. package/lib/Emoji.js +12 -12
  31. package/lib/Excalidraw.cjs +1 -1
  32. package/lib/Excalidraw.js +17 -17
  33. package/lib/ExportPdf.cjs +1 -1
  34. package/lib/ExportPdf.js +2 -2
  35. package/lib/ExportWord.cjs +1 -1
  36. package/lib/ExportWord.js +2 -2
  37. package/lib/FontFamily.cjs +1 -1
  38. package/lib/FontFamily.js +4 -4
  39. package/lib/FontSize.cjs +1 -1
  40. package/lib/FontSize.js +4 -4
  41. package/lib/Heading.cjs +1 -1
  42. package/lib/Heading.js +9 -9
  43. package/lib/Highlight.cjs +1 -1
  44. package/lib/Highlight.js +3 -3
  45. package/lib/History.cjs +1 -1
  46. package/lib/History.js +5 -3
  47. package/lib/HorizontalRule.cjs +1 -1
  48. package/lib/HorizontalRule.js +2 -2
  49. package/lib/{Iframe-AhNV5WH5.js → Iframe-CAUrccA0.js} +7 -7
  50. package/lib/{Iframe-C6pBw-AF.cjs → Iframe-hwg9FxhU.cjs} +1 -1
  51. package/lib/Iframe.cjs +1 -1
  52. package/lib/Iframe.js +3 -3
  53. package/lib/Image.cjs +1 -1
  54. package/lib/Image.js +6 -5
  55. package/lib/ImageGif.cjs +1 -1
  56. package/lib/ImageGif.js +36 -36
  57. package/lib/ImportWord.cjs +1 -1
  58. package/lib/ImportWord.js +13 -13
  59. package/lib/{Indent-DZ5PcJA4.js → Indent-3MoIatX1.js} +2 -2
  60. package/lib/{Indent-Do-X0AsY.cjs → Indent-MuSU0kXz.cjs} +1 -1
  61. package/lib/Indent.cjs +1 -1
  62. package/lib/Indent.js +2 -2
  63. package/lib/Italic.cjs +1 -1
  64. package/lib/Italic.js +24 -18
  65. package/lib/Katex-BPQ7_A3w.cjs +4 -0
  66. package/lib/{Katex-bIgoenn_.js → Katex-xS-XZKQc.js} +398 -421
  67. package/lib/Katex.cjs +1 -1
  68. package/lib/Katex.js +3 -3
  69. package/lib/LineHeight.cjs +1 -1
  70. package/lib/LineHeight.js +3 -3
  71. package/lib/Link.cjs +1 -1
  72. package/lib/Link.js +2 -2
  73. package/lib/{LinkEditBlock-B0ZaACZO.cjs → LinkEditBlock-DLDY-8Ax.cjs} +1 -1
  74. package/lib/{LinkEditBlock-D_cF9fnc.js → LinkEditBlock-Dhvz7DCA.js} +26 -26
  75. package/lib/MarkdownPaste.cjs +1 -1
  76. package/lib/MarkdownPaste.js +1 -1
  77. package/lib/Mention.cjs +1 -1
  78. package/lib/Mention.js +4 -4
  79. package/lib/Mermaid.cjs +2 -2
  80. package/lib/Mermaid.js +41 -42
  81. package/lib/MoreMark.cjs +1 -1
  82. package/lib/MoreMark.js +5 -5
  83. package/lib/OrderedList.cjs +1 -1
  84. package/lib/OrderedList.js +2 -2
  85. package/lib/SearchAndReplace.cjs +1 -1
  86. package/lib/SearchAndReplace.js +8 -8
  87. package/lib/SlashCommand.cjs +1 -1
  88. package/lib/SlashCommand.js +6 -6
  89. package/lib/{SlashCommandNodeView-Ba03hlVZ.cjs → SlashCommandNodeView-CavaOSwo.cjs} +1 -1
  90. package/lib/{SlashCommandNodeView-cg0x3NRF.js → SlashCommandNodeView-RnDRm4Z1.js} +6 -6
  91. package/lib/Strike.cjs +1 -1
  92. package/lib/Strike.js +2 -2
  93. package/lib/{Table-KqLiT5wG.js → Table-DN4TuDz1.js} +35 -35
  94. package/lib/{Table-ddU2LSc6.cjs → Table-m32ZhtxF.cjs} +1 -1
  95. package/lib/Table.cjs +1 -1
  96. package/lib/Table.js +1 -1
  97. package/lib/TaskList.cjs +1 -1
  98. package/lib/TaskList.js +2 -2
  99. package/lib/TextAlign.cjs +1 -1
  100. package/lib/TextAlign.js +3 -3
  101. package/lib/TextDirection.cjs +1 -1
  102. package/lib/TextDirection.js +3 -3
  103. package/lib/TextUnderline.cjs +1 -1
  104. package/lib/TextUnderline.js +2 -2
  105. package/lib/{Twitter-C1Lzqc7u.js → Twitter-B2FDarxE.js} +9 -9
  106. package/lib/{Twitter-BIiR78Jh.cjs → Twitter-CJhQLKYS.cjs} +1 -1
  107. package/lib/Twitter.cjs +1 -1
  108. package/lib/Twitter.js +3 -3
  109. package/lib/Video.cjs +1 -1
  110. package/lib/Video.js +4 -4
  111. package/lib/_commonjsHelpers-B4e78b8K.js +28 -0
  112. package/lib/_commonjsHelpers-BTDuMlIz.cjs +1 -0
  113. package/lib/bubble.cjs +6 -6
  114. package/lib/bubble.js +2136 -1822
  115. package/lib/{clsx-eGVyq7ot.js → clsx-Bg-2aTKh.js} +11 -11
  116. package/lib/{clsx-BWE7vnna.cjs → clsx-DSAWW32g.cjs} +1 -1
  117. package/lib/components/Bubble/RichTextBubbleCodeBlock.d.ts +1 -0
  118. package/lib/components/Bubble/index.d.ts +1 -0
  119. package/lib/{dropdown-menu-oSKIntXM.cjs → dropdown-menu-C0VlKIZC.cjs} +1 -1
  120. package/lib/{dropdown-menu-CexIkt_V.js → dropdown-menu-CWd8VVRO.js} +1 -1
  121. package/lib/extensions/CodeBlock/CodeBlock.d.ts +3 -18
  122. package/lib/extensions/Image/Image.d.ts +1 -0
  123. package/lib/{index-DHUN85fV.js → index-B2a7NqnN.js} +1149 -1019
  124. package/lib/{index-D0lc95kr.cjs → index-C3dgmjIF.cjs} +1 -1
  125. package/lib/{index-zig3Dj7A.cjs → index-C4WLt4NA.cjs} +9 -7
  126. package/lib/{index-RIXs7STX.js → index-CbkpBnTX.js} +1 -1
  127. package/lib/{index-BnW6t8z6.js → index-CjLxMm5d.js} +1 -1
  128. package/lib/{index-mfGK4pFo.js → index-D0EmqTpe.js} +167 -153
  129. package/lib/{index-C6xmkxrQ.js → index-DXtVL0al.js} +140 -138
  130. package/lib/{index-CJ9pyCM4.cjs → index-DlxZt4_j.cjs} +1 -1
  131. package/lib/{index-D_8P0LE5.js → index-P5_MyY0i.js} +1 -1
  132. package/lib/{index-DUpSE1Gb.cjs → index-TcJ2UKnv.cjs} +1 -1
  133. package/lib/index-czmcFIW7.cjs +1 -0
  134. package/lib/index-fbGGohBT.cjs +12 -0
  135. package/lib/index.cjs +1 -1
  136. package/lib/index.js +12 -12
  137. package/lib/{popover-BYSZ3zBi.js → popover-BrSDMb_n.js} +1 -1
  138. package/lib/{popover-BcHDZqBt.cjs → popover-UUKfPWue.cjs} +1 -1
  139. package/lib/{renderNodeView-BrM5kUj_.js → renderNodeView-CbxCTni3.js} +2 -2
  140. package/lib/{renderNodeView-D1zydtli.cjs → renderNodeView-DFVrJy0l.cjs} +1 -1
  141. package/lib/{separator-BmixLrnJ.cjs → separator-LH5EzF0T.cjs} +1 -1
  142. package/lib/{separator-CFKVxAea.js → separator-fpWkZkoh.js} +14 -14
  143. package/lib/style.css +1 -1
  144. package/lib/{updatePosition-CBRjbQMH.js → updatePosition-BGD41Hbg.js} +2 -2
  145. package/lib/{updatePosition-CfmY5Trk.cjs → updatePosition-CQE1ct18.cjs} +1 -1
  146. package/package.json +4 -2
  147. package/lib/Katex-CIC9ygbL.cjs +0 -4
  148. package/lib/delete-node-CosiBes5.cjs +0 -1
  149. package/lib/delete-node-eQHsyyhR.js +0 -24
  150. package/lib/extensions/CodeBlock/components/NodeViewCodeBlock/NodeViewCodeBlock.d.ts +0 -1
  151. package/lib/index-BUTn2LY6.cjs +0 -1
  152. package/lib/index-BtxvYLJ1.cjs +0 -12
  153. package/lib/select-C5SHDLFj.js +0 -120
  154. package/lib/select-DHjzKkcu.cjs +0 -1
  155. package/lib/textarea-CasDcv3u.cjs +0 -1
  156. package/lib/textarea-DNLrJoRl.js +0 -20
@@ -1318,10 +1318,10 @@ function kt(r) {
1318
1318
  function Be(r) {
1319
1319
  return r.document || window.document;
1320
1320
  }
1321
- const xt = /* @__PURE__ */ new WeakMap();
1321
+ const vt = /* @__PURE__ */ new WeakMap();
1322
1322
  function Xn(r) {
1323
- let e = xt.get(r);
1324
- return e === void 0 && xt.set(r, e = Yn(r)), e;
1323
+ let e = vt.get(r);
1324
+ return e === void 0 && vt.set(r, e = Yn(r)), e;
1325
1325
  }
1326
1326
  function Yn(r) {
1327
1327
  let e = null;
@@ -1383,7 +1383,7 @@ const Wt = 65535, Jt = Math.pow(2, 16);
1383
1383
  function Qn(r, e) {
1384
1384
  return r + e * Jt;
1385
1385
  }
1386
- function vt(r) {
1386
+ function xt(r) {
1387
1387
  return r & Wt;
1388
1388
  }
1389
1389
  function Zn(r) {
@@ -1440,7 +1440,7 @@ class $ {
1440
1440
  @internal
1441
1441
  */
1442
1442
  recover(e) {
1443
- let t = 0, n = vt(e);
1443
+ let t = 0, n = xt(e);
1444
1444
  if (!this.inverted)
1445
1445
  for (let i = 0; i < n; i++)
1446
1446
  t += this.ranges[i * 3 + 2] - this.ranges[i * 3 + 1];
@@ -1477,7 +1477,7 @@ class $ {
1477
1477
  @internal
1478
1478
  */
1479
1479
  touches(e, t) {
1480
- let n = 0, i = vt(t), s = this.inverted ? 2 : 1, o = this.inverted ? 1 : 2;
1480
+ let n = 0, i = xt(t), s = this.inverted ? 2 : 1, o = this.inverted ? 1 : 2;
1481
1481
  for (let l = 0; l < this.ranges.length; l += 3) {
1482
1482
  let a = this.ranges[l] - (this.inverted ? n : 0);
1483
1483
  if (a > e)
@@ -2514,8 +2514,8 @@ function gr(r, e, t, n) {
2514
2514
  for (let m = 0; m < o.length; m++) {
2515
2515
  let g = o[(m + a) % o.length], y = !0;
2516
2516
  g < 0 && (y = !1, g = -g);
2517
- let x = i.node(g - 1), v = i.index(g - 1);
2518
- if (x.canReplaceWith(v, v, p.type, p.marks))
2517
+ let v = i.node(g - 1), x = i.index(g - 1);
2518
+ if (v.canReplaceWith(x, x, p.type, p.marks))
2519
2519
  return r.replace(i.before(g), y ? s.after(g) : t, new k(Yt(n.content, 0, n.openStart, h), h, n.openEnd));
2520
2520
  }
2521
2521
  }
@@ -2897,7 +2897,7 @@ class E {
2897
2897
  `$head`.
2898
2898
  */
2899
2899
  constructor(e, t, n) {
2900
- this.$anchor = e, this.$head = t, this.ranges = n || [new xr(e.min(t), e.max(t))];
2900
+ this.$anchor = e, this.$head = t, this.ranges = n || [new vr(e.min(t), e.max(t))];
2901
2901
  }
2902
2902
  /**
2903
2903
  The selection's anchor, as an unresolved position.
@@ -3055,7 +3055,7 @@ class E {
3055
3055
  }
3056
3056
  }
3057
3057
  E.prototype.visible = !0;
3058
- class xr {
3058
+ class vr {
3059
3059
  /**
3060
3060
  Create a range.
3061
3061
  */
@@ -3243,11 +3243,11 @@ class F extends E {
3243
3243
  return e instanceof F;
3244
3244
  }
3245
3245
  getBookmark() {
3246
- return vr;
3246
+ return xr;
3247
3247
  }
3248
3248
  }
3249
3249
  E.jsonID("all", F);
3250
- const vr = {
3250
+ const xr = {
3251
3251
  map() {
3252
3252
  return this;
3253
3253
  },
@@ -3287,33 +3287,33 @@ function Et(r, e, t) {
3287
3287
  function Ct(r, e) {
3288
3288
  return !e || !r ? r : r.bind(e);
3289
3289
  }
3290
- class xe {
3290
+ class ve {
3291
3291
  constructor(e, t, n) {
3292
3292
  this.name = e, this.init = Ct(t.init, n), this.apply = Ct(t.apply, n);
3293
3293
  }
3294
3294
  }
3295
- new xe("doc", {
3295
+ new ve("doc", {
3296
3296
  init(r) {
3297
3297
  return r.doc || r.schema.topNodeType.createAndFill();
3298
3298
  },
3299
3299
  apply(r) {
3300
3300
  return r.doc;
3301
3301
  }
3302
- }), new xe("selection", {
3302
+ }), new ve("selection", {
3303
3303
  init(r, e) {
3304
3304
  return r.selection || E.atStart(e.doc);
3305
3305
  },
3306
3306
  apply(r) {
3307
3307
  return r.selection;
3308
3308
  }
3309
- }), new xe("storedMarks", {
3309
+ }), new ve("storedMarks", {
3310
3310
  init(r) {
3311
3311
  return r.storedMarks || null;
3312
3312
  },
3313
3313
  apply(r, e, t, n) {
3314
3314
  return n.selection.$cursor ? r.storedMarks : null;
3315
3315
  }
3316
- }), new xe("scrollToSelection", {
3316
+ }), new ve("scrollToSelection", {
3317
3317
  init() {
3318
3318
  return 0;
3319
3319
  },
@@ -3658,10 +3658,10 @@ function un(r, e, t, n) {
3658
3658
  if (h.canReplace(h.childCount, h.childCount, m.content)) {
3659
3659
  if (t) {
3660
3660
  let y = w.empty;
3661
- for (let v = p.length - 1; v >= 0; v--)
3662
- y = w.from(p[v].copy(y));
3663
- let x = r.tr.step(new I(e.pos - p.length, e.pos + s.nodeSize, e.pos + g, e.pos + s.nodeSize - g, new k(y, p.length, 0), 0, !0));
3664
- t(x.scrollIntoView());
3661
+ for (let x = p.length - 1; x >= 0; x--)
3662
+ y = w.from(p[x].copy(y));
3663
+ let v = r.tr.step(new I(e.pos - p.length, e.pos + s.nodeSize, e.pos + g, e.pos + s.nodeSize - g, new k(y, p.length, 0), 0, !0));
3664
+ t(v.scrollIntoView());
3665
3665
  }
3666
3666
  return !0;
3667
3667
  }
@@ -3930,7 +3930,7 @@ ct(pn, {
3930
3930
  joinItemBackward: () => yi,
3931
3931
  joinItemForward: () => wi,
3932
3932
  joinTextblockBackward: () => ki,
3933
- joinTextblockForward: () => xi,
3933
+ joinTextblockForward: () => vi,
3934
3934
  joinUp: () => hi,
3935
3935
  keyboardShortcut: () => bi,
3936
3936
  lift: () => Si,
@@ -4144,7 +4144,7 @@ var li = (r = null, e = {}) => ({ editor: t, view: n, tr: i, dispatch: s }) => {
4144
4144
  }
4145
4145
  return r;
4146
4146
  };
4147
- function ve(r) {
4147
+ function xe(r) {
4148
4148
  if (typeof window > "u")
4149
4149
  throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");
4150
4150
  const e = `<body>${r}</body>`, t = new window.DOMParser().parseFromString(e, "text/html").body;
@@ -4191,13 +4191,13 @@ function pe(r, e, t) {
4191
4191
  }
4192
4192
  })
4193
4193
  });
4194
- if (t.slice ? $e.fromSchema(a).parseSlice(ve(r), t.parseOptions) : $e.fromSchema(a).parse(ve(r), t.parseOptions), t.errorOnInvalidContent && o)
4194
+ if (t.slice ? $e.fromSchema(a).parseSlice(xe(r), t.parseOptions) : $e.fromSchema(a).parse(xe(r), t.parseOptions), t.errorOnInvalidContent && o)
4195
4195
  throw new Error("[tiptap error]: Invalid HTML content", {
4196
4196
  cause: new Error(`Invalid element found: ${l}`)
4197
4197
  });
4198
4198
  }
4199
4199
  const s = $e.fromSchema(e);
4200
- return t.slice ? s.parseSlice(ve(r), t.parseOptions).content : s.parse(ve(r), t.parseOptions);
4200
+ return t.slice ? s.parseSlice(xe(r), t.parseOptions).content : s.parse(xe(r), t.parseOptions);
4201
4201
  }
4202
4202
  return pe("", e, t);
4203
4203
  }
@@ -4274,8 +4274,8 @@ var ui = (r) => !("type" in r), di = (r, e, t) => ({ tr: n, dispatch: i, editor:
4274
4274
  n.insertText(m, f, u);
4275
4275
  } else {
4276
4276
  m = l;
4277
- const g = n.doc.resolve(f), y = g.node(), x = g.parentOffset === 0, v = y.isText || y.isTextblock, S = y.content.size > 0;
4278
- x && v && S && (f = Math.max(0, f - 1)), n.replaceWith(f, u, m);
4277
+ const g = n.doc.resolve(f), y = g.node(), v = g.parentOffset === 0, x = y.isText || y.isTextblock, S = y.content.size > 0;
4278
+ v && x && S && (f = Math.max(0, f - 1)), n.replaceWith(f, u, m);
4279
4279
  }
4280
4280
  t.updateSelection && fi(n, n.steps.length - 1, -1), t.applyInputRules && n.setMeta("applyInputRules", { from: f, text: m }), t.applyPasteRules && n.setMeta("applyPasteRules", { from: f, text: m });
4281
4281
  }
@@ -4294,11 +4294,11 @@ var ui = (r) => !("type" in r), di = (r, e, t) => ({ tr: n, dispatch: i, editor:
4294
4294
  } catch {
4295
4295
  return !1;
4296
4296
  }
4297
- }, ki = () => ({ state: r, dispatch: e }) => br(r, e), xi = () => ({ state: r, dispatch: e }) => Sr(r, e);
4297
+ }, ki = () => ({ state: r, dispatch: e }) => br(r, e), vi = () => ({ state: r, dispatch: e }) => Sr(r, e);
4298
4298
  function wn() {
4299
4299
  return typeof navigator < "u" ? /Mac/.test(navigator.platform) : !1;
4300
4300
  }
4301
- function vi(r) {
4301
+ function xi(r) {
4302
4302
  const e = r.split(/-(?!$)/);
4303
4303
  let t = e[e.length - 1];
4304
4304
  t === "Space" && (t = " ");
@@ -4321,7 +4321,7 @@ function vi(r) {
4321
4321
  return n && (t = `Alt-${t}`), i && (t = `Ctrl-${t}`), o && (t = `Meta-${t}`), s && (t = `Shift-${t}`), t;
4322
4322
  }
4323
4323
  var bi = (r) => ({ editor: e, view: t, tr: n, dispatch: i }) => {
4324
- const s = vi(r).split(/-(?!$)/), o = s.find((c) => !["Alt", "Ctrl", "Meta", "Shift"].includes(c)), l = new KeyboardEvent("keydown", {
4324
+ const s = xi(r).split(/-(?!$)/), o = s.find((c) => !["Alt", "Ctrl", "Meta", "Shift"].includes(c)), l = new KeyboardEvent("keydown", {
4325
4325
  key: o === "Space" ? " " : o,
4326
4326
  altKey: s.includes("Alt"),
4327
4327
  ctrlKey: s.includes("Ctrl"),
@@ -4434,7 +4434,16 @@ function Fi(r) {
4434
4434
  }
4435
4435
  return null;
4436
4436
  }
4437
- function _s(r, e, t) {
4437
+ function _s(r, e) {
4438
+ const t = [];
4439
+ return r.descendants((n, i) => {
4440
+ e(n) && t.push({
4441
+ node: n,
4442
+ pos: i
4443
+ });
4444
+ }), t;
4445
+ }
4446
+ function Vs(r, e, t) {
4438
4447
  const n = [];
4439
4448
  return r.nodesBetween(e.from, e.to, (i, s) => {
4440
4449
  t(i) && n.push({
@@ -4470,7 +4479,7 @@ function Wi(r) {
4470
4479
  function W(r, e = void 0, ...t) {
4471
4480
  return Wi(r) ? e ? r.bind(e)(...t) : r(...t) : r;
4472
4481
  }
4473
- function xn(r) {
4482
+ function vn(r) {
4474
4483
  const e = r.filter((i) => i.type === "extension"), t = r.filter((i) => i.type === "node"), n = r.filter((i) => i.type === "mark");
4475
4484
  return {
4476
4485
  baseExtensions: e,
@@ -4540,12 +4549,12 @@ function ji(...r) {
4540
4549
  }), n;
4541
4550
  }, {});
4542
4551
  }
4543
- function Vs(r, e) {
4552
+ function qs(r, e) {
4544
4553
  return e.filter((t) => t.type === r.type.name).filter((t) => t.attribute.rendered).map((t) => t.attribute.renderHTML ? t.attribute.renderHTML(r.attrs) || {} : {
4545
4554
  [t.name]: r.attrs[t.name]
4546
4555
  }).reduce((t, n) => ji(t, n), {});
4547
4556
  }
4548
- function vn(r, e, t) {
4557
+ function xn(r, e, t) {
4549
4558
  const { from: n, to: i } = e, { blockSeparator: s = `
4550
4559
 
4551
4560
  `, textSerializers: o = {} } = t || {};
@@ -4565,12 +4574,12 @@ function vn(r, e, t) {
4565
4574
  a.isText && (l += (d = a == null ? void 0 : a.text) == null ? void 0 : d.slice(Math.max(n, c) - c, i - c));
4566
4575
  }), l;
4567
4576
  }
4568
- function qs(r, e) {
4577
+ function Us(r, e) {
4569
4578
  const t = {
4570
4579
  from: 0,
4571
4580
  to: r.content.size
4572
4581
  };
4573
- return vn(r, t, e);
4582
+ return xn(r, t, e);
4574
4583
  }
4575
4584
  function Hi(r) {
4576
4585
  return Object.fromEntries(
@@ -4585,7 +4594,7 @@ function _i(r, e) {
4585
4594
  const o = s.reverse().find((l) => l.type.name === t.name);
4586
4595
  return o ? { ...o.attrs } : {};
4587
4596
  }
4588
- function Us(r, e) {
4597
+ function Ks(r, e) {
4589
4598
  const t = Ne(
4590
4599
  typeof e == "string" ? e : e.name,
4591
4600
  r.schema
@@ -4650,7 +4659,7 @@ function bn(r, e, t) {
4650
4659
  );
4651
4660
  }), n;
4652
4661
  }
4653
- var Ks = (r, e, t, n = 20) => {
4662
+ var Xs = (r, e, t, n = 20) => {
4654
4663
  const i = r.doc.resolve(t);
4655
4664
  let s = n, o = null;
4656
4665
  for (; s > 0 && o === null; ) {
@@ -4680,12 +4689,12 @@ function Ze(r, e, t = {}) {
4680
4689
  return !1;
4681
4690
  if (!m.isText && !m.marks.length)
4682
4691
  return;
4683
- const y = Math.max(h, g), x = Math.min(p, g + m.nodeSize), v = x - y;
4684
- o += v, l.push(
4692
+ const y = Math.max(h, g), v = Math.min(p, g + m.nodeSize), x = v - y;
4693
+ o += x, l.push(
4685
4694
  ...m.marks.map((S) => ({
4686
4695
  mark: S,
4687
4696
  from: y,
4688
- to: x
4697
+ to: v
4689
4698
  }))
4690
4699
  );
4691
4700
  });
@@ -4694,13 +4703,13 @@ function Ze(r, e, t = {}) {
4694
4703
  const a = l.filter((u) => s ? s.name === u.mark.type.name : !0).filter((u) => Te(u.mark.attrs, t, { strict: !1 })).reduce((u, d) => u + d.to - d.from, 0), c = l.filter((u) => s ? u.mark.type !== s && u.mark.type.excludes(s) : !0).reduce((u, d) => u + d.to - d.from, 0);
4695
4704
  return (a > 0 ? a + c : a) >= o;
4696
4705
  }
4697
- function Xs(r, e, t = {}) {
4706
+ function Ys(r, e, t = {}) {
4698
4707
  if (!e)
4699
4708
  return me(r, null, t) || Ze(r, null, t);
4700
4709
  const n = Ne(e, r.schema);
4701
4710
  return n === "node" ? me(r, e, t) : n === "mark" ? Ze(r, e, t) : !1;
4702
4711
  }
4703
- var Ys = (r, e) => {
4712
+ var Qs = (r, e) => {
4704
4713
  const { $from: t, $to: n, $anchor: i } = r.selection;
4705
4714
  if (e) {
4706
4715
  const s = ze((l) => l.type.name === e)(r.selection);
@@ -4710,12 +4719,12 @@ var Ys = (r, e) => {
4710
4719
  return i.pos + 1 === o.end();
4711
4720
  }
4712
4721
  return !(n.parentOffset < n.parent.nodeSize - 2 || t.pos !== n.pos);
4713
- }, Qs = (r) => {
4722
+ }, Zs = (r) => {
4714
4723
  const { $from: e, $to: t } = r.selection;
4715
4724
  return !(e.parentOffset > 0 || e.pos !== t.pos);
4716
4725
  };
4717
4726
  function Nt(r, e) {
4718
- const { nodeExtensions: t } = xn(e), n = t.find((o) => o.name === r);
4727
+ const { nodeExtensions: t } = vn(e), n = t.find((o) => o.name === r);
4719
4728
  if (!n)
4720
4729
  return !1;
4721
4730
  const i = {
@@ -4734,7 +4743,7 @@ function Sn(r, {
4734
4743
  if (r.type.name === "hardBreak")
4735
4744
  return !0;
4736
4745
  if (r.isText)
4737
- return /^\s*$/m.test((n = r.text) != null ? n : "");
4746
+ return !/\S/.test((n = r.text) != null ? n : "");
4738
4747
  }
4739
4748
  if (r.isText)
4740
4749
  return !r.text;
@@ -4750,7 +4759,7 @@ function Sn(r, {
4750
4759
  }
4751
4760
  return !1;
4752
4761
  }
4753
- function Zs(r) {
4762
+ function Gs(r) {
4754
4763
  return r instanceof ie;
4755
4764
  }
4756
4765
  var Ki = class Mn {
@@ -4772,14 +4781,14 @@ var Ki = class Mn {
4772
4781
  };
4773
4782
  }
4774
4783
  };
4775
- function Gs(r, e) {
4784
+ function eo(r, e) {
4776
4785
  const t = e.mapping.mapResult(r.position);
4777
4786
  return {
4778
4787
  position: new Ki(t.pos),
4779
4788
  mapResult: t
4780
4789
  };
4781
4790
  }
4782
- function eo(r, e, t) {
4791
+ function to(r, e, t) {
4783
4792
  const i = r.state.doc.content.size, s = H(e, 0, i), o = H(t, 0, i), l = r.coordsAtPos(s), a = r.coordsAtPos(o, -1), c = Math.min(l.top, a.top), f = Math.max(l.bottom, a.bottom), u = Math.min(l.left, a.left), d = Math.max(l.right, a.right), h = d - u, p = f - c, y = {
4784
4793
  top: c,
4785
4794
  bottom: f,
@@ -4922,10 +4931,10 @@ var rs = ({ keepMarks: r = !0 } = {}) => ({ tr: e, state: t, dispatch: n, editor
4922
4931
  return !1;
4923
4932
  if (i) {
4924
4933
  let y = ne.empty;
4925
- const x = a.index(-1) ? 1 : a.index(-2) ? 2 : 3;
4926
- for (let P = a.depth - x; P >= a.depth - 3; P -= 1)
4934
+ const v = a.index(-1) ? 1 : a.index(-2) ? 2 : 3;
4935
+ for (let P = a.depth - v; P >= a.depth - 3; P -= 1)
4927
4936
  y = ne.from(a.node(P).copy(y));
4928
- const v = (
4937
+ const x = (
4929
4938
  // eslint-disable-next-line no-nested-ternary
4930
4939
  a.indexAfter(-1) < a.node(-2).childCount ? 1 : a.indexAfter(-2) < a.node(-3).childCount ? 2 : 3
4931
4940
  ), S = {
@@ -4933,8 +4942,8 @@ var rs = ({ keepMarks: r = !0 } = {}) => ({ tr: e, state: t, dispatch: n, editor
4933
4942
  ...e
4934
4943
  }, b = ((o = l.contentMatch.defaultType) == null ? void 0 : o.createAndFill(S)) || void 0;
4935
4944
  y = y.append(ne.from(l.createAndFill(null, b) || void 0));
4936
- const T = a.before(a.depth - (x - 1));
4937
- t.replace(T, a.after(-v), new $n(y, 4 - x, 0));
4945
+ const T = a.before(a.depth - (v - 1));
4946
+ t.replace(T, a.after(-x), new $n(y, 4 - v, 0));
4938
4947
  let N = -1;
4939
4948
  t.doc.nodesBetween(T, t.doc.content.size, (P, V) => {
4940
4949
  if (N > -1)
@@ -4959,10 +4968,10 @@ var rs = ({ keepMarks: r = !0 } = {}) => ({ tr: e, state: t, dispatch: n, editor
4959
4968
  if (!_(t.doc, a.pos, 2))
4960
4969
  return !1;
4961
4970
  if (i) {
4962
- const { selection: y, storedMarks: x } = n, { splittableMarks: v } = s.extensionManager, S = x || y.$to.parentOffset && y.$from.marks();
4971
+ const { selection: y, storedMarks: v } = n, { splittableMarks: x } = s.extensionManager, S = v || y.$to.parentOffset && y.$from.marks();
4963
4972
  if (t.split(a.pos, 2, g).scrollIntoView(), !S || !i)
4964
4973
  return !0;
4965
- const b = S.filter((T) => v.includes(T.type.name));
4974
+ const b = S.filter((T) => x.includes(T.type.name));
4966
4975
  t.ensureMarks(b);
4967
4976
  }
4968
4977
  return !0;
@@ -4985,11 +4994,11 @@ var rs = ({ keepMarks: r = !0 } = {}) => ({ tr: e, state: t, dispatch: n, editor
4985
4994
  const i = r.doc.nodeAt(n);
4986
4995
  return t.node.type === (i == null ? void 0 : i.type) && Q(r.doc, n) && r.join(n), !0;
4987
4996
  }, ss = (r, e, t, n = {}) => ({ editor: i, tr: s, state: o, dispatch: l, chain: a, commands: c, can: f }) => {
4988
- const { extensions: u, splittableMarks: d } = i.extensionManager, h = R(r, o.schema), p = R(e, o.schema), { selection: m, storedMarks: g } = o, { $from: y, $to: x } = m, v = y.blockRange(x), S = g || m.$to.parentOffset && m.$from.marks();
4989
- if (!v)
4997
+ const { extensions: u, splittableMarks: d } = i.extensionManager, h = R(r, o.schema), p = R(e, o.schema), { selection: m, storedMarks: g } = o, { $from: y, $to: v } = m, x = y.blockRange(v), S = g || m.$to.parentOffset && m.$from.marks();
4998
+ if (!x)
4990
4999
  return !1;
4991
5000
  const b = ze((T) => Nt(T.type.name, u))(m);
4992
- if (v.depth >= 1 && b && v.depth - b.depth <= 1) {
5001
+ if (x.depth >= 1 && b && x.depth - b.depth <= 1) {
4993
5002
  if (b.node.type === h)
4994
5003
  return c.liftListItem(p);
4995
5004
  if (Nt(b.node.type.name, u) && h.validContent(b.node.content) && l)
@@ -5076,14 +5085,14 @@ var rs = ({ keepMarks: r = !0 } = {}) => ({ tr: e, state: t, dispatch: n, editor
5076
5085
  y < f && s && s === g.type && (a = !0, p = Math.max(y, f), m = Math.min(y + g.nodeSize, u), d = y, h = g), y >= f && y <= u && (s && s === g.type && (a = !0, i && t.setNodeMarkup(y, void 0, {
5077
5086
  ...g.attrs,
5078
5087
  ...e
5079
- })), o && g.marks.length && g.marks.forEach((x) => {
5080
- if (o === x.type && (a = !0, i)) {
5081
- const v = Math.max(y, f), S = Math.min(y + g.nodeSize, u);
5088
+ })), o && g.marks.length && g.marks.forEach((v) => {
5089
+ if (o === v.type && (a = !0, i)) {
5090
+ const x = Math.max(y, f), S = Math.min(y + g.nodeSize, u);
5082
5091
  t.addMark(
5083
- v,
5092
+ x,
5084
5093
  S,
5085
5094
  o.create({
5086
- ...x.attrs,
5095
+ ...v.attrs,
5087
5096
  ...e
5088
5097
  })
5089
5098
  );
@@ -5166,7 +5175,7 @@ var ut = class {
5166
5175
  const e = new this.constructor({ ...this.config, ...r });
5167
5176
  return e.parent = this, this.child = e, e.name = "name" in r ? r.name : e.parent.name, e;
5168
5177
  }
5169
- }, to = class Cn extends ut {
5178
+ }, no = class Cn extends ut {
5170
5179
  constructor() {
5171
5180
  super(...arguments), this.type = "mark";
5172
5181
  }
@@ -5197,7 +5206,7 @@ var ut = class {
5197
5206
  return super.extend(t);
5198
5207
  }
5199
5208
  };
5200
- function no(r) {
5209
+ function ro(r) {
5201
5210
  return typeof r == "number";
5202
5211
  }
5203
5212
  var Tn = class {
@@ -5207,8 +5216,8 @@ var Tn = class {
5207
5216
  }, ws = {};
5208
5217
  ct(ws, {
5209
5218
  ClipboardTextSerializer: () => ks,
5210
- Commands: () => xs,
5211
- Delete: () => vs,
5219
+ Commands: () => vs,
5220
+ Delete: () => xs,
5212
5221
  Drop: () => bs,
5213
5222
  Editable: () => Ss,
5214
5223
  FocusEvents: () => Ms,
@@ -5251,7 +5260,7 @@ var J = class An extends ut {
5251
5260
  props: {
5252
5261
  clipboardTextSerializer: () => {
5253
5262
  const { editor: r } = this, { state: e, schema: t } = r, { doc: n, selection: i } = e, { ranges: s } = i, o = Math.min(...s.map((f) => f.$from.pos)), l = Math.max(...s.map((f) => f.$to.pos)), a = Hi(t);
5254
- return vn(n, { from: o, to: l }, {
5263
+ return xn(n, { from: o, to: l }, {
5255
5264
  ...this.options.blockSeparator !== void 0 ? { blockSeparator: this.options.blockSeparator } : {},
5256
5265
  textSerializers: a
5257
5266
  });
@@ -5260,14 +5269,14 @@ var J = class An extends ut {
5260
5269
  })
5261
5270
  ];
5262
5271
  }
5263
- }), xs = J.create({
5272
+ }), vs = J.create({
5264
5273
  name: "commands",
5265
5274
  addCommands() {
5266
5275
  return {
5267
5276
  ...pn
5268
5277
  };
5269
5278
  }
5270
- }), vs = J.create({
5279
+ }), xs = J.create({
5271
5280
  name: "delete",
5272
5281
  onUpdate({ transaction: r, appendedTransactions: e }) {
5273
5282
  var t, n, i;
@@ -5299,19 +5308,19 @@ var J = class An extends ut {
5299
5308
  f.steps.forEach((h, p) => {
5300
5309
  var m, g;
5301
5310
  if (h instanceof D) {
5302
- const y = d.slice(p).map(h.from, -1), x = d.slice(p).map(h.to), v = d.invert().map(y, -1), S = d.invert().map(x), b = (m = f.doc.nodeAt(y - 1)) == null ? void 0 : m.marks.some((N) => N.eq(h.mark)), T = (g = f.doc.nodeAt(x)) == null ? void 0 : g.marks.some((N) => N.eq(h.mark));
5311
+ const y = d.slice(p).map(h.from, -1), v = d.slice(p).map(h.to), x = d.invert().map(y, -1), S = d.invert().map(v), b = (m = f.doc.nodeAt(y - 1)) == null ? void 0 : m.marks.some((N) => N.eq(h.mark)), T = (g = f.doc.nodeAt(v)) == null ? void 0 : g.marks.some((N) => N.eq(h.mark));
5303
5312
  this.editor.emit("delete", {
5304
5313
  type: "mark",
5305
5314
  mark: h.mark,
5306
5315
  from: h.from,
5307
5316
  to: h.to,
5308
5317
  deletedRange: {
5309
- from: v,
5318
+ from: x,
5310
5319
  to: S
5311
5320
  },
5312
5321
  newRange: {
5313
5322
  from: y,
5314
- to: x
5323
+ to: v
5315
5324
  },
5316
5325
  partial: !!(T || b),
5317
5326
  editor: this.editor,
@@ -5496,7 +5505,7 @@ var J = class An extends ut {
5496
5505
  addGlobalAttributes() {
5497
5506
  if (!this.options.direction)
5498
5507
  return [];
5499
- const { nodeExtensions: r } = xn(this.extensions);
5508
+ const { nodeExtensions: r } = vn(this.extensions);
5500
5509
  return [
5501
5510
  {
5502
5511
  types: r.filter((e) => e.name !== "text").map((e) => e.name),
@@ -5531,7 +5540,7 @@ var J = class An extends ut {
5531
5540
  ];
5532
5541
  }
5533
5542
  });
5534
- function ro(r) {
5543
+ function io(r) {
5535
5544
  return new Oe({
5536
5545
  find: r.find,
5537
5546
  handler: ({ state: e, range: t, match: n }) => {
@@ -5551,7 +5560,7 @@ function ro(r) {
5551
5560
  undoable: r.undoable
5552
5561
  });
5553
5562
  }
5554
- function io(r) {
5563
+ function so(r) {
5555
5564
  return new Oe({
5556
5565
  find: r.find,
5557
5566
  handler: ({ state: e, range: t, match: n }) => {
@@ -5573,7 +5582,7 @@ function io(r) {
5573
5582
  undoable: r.undoable
5574
5583
  });
5575
5584
  }
5576
- function so(r) {
5585
+ function oo(r) {
5577
5586
  return new Oe({
5578
5587
  find: r.find,
5579
5588
  handler: ({ state: e, range: t, match: n }) => {
@@ -5585,7 +5594,7 @@ function so(r) {
5585
5594
  undoable: r.undoable
5586
5595
  });
5587
5596
  }
5588
- function oo(r) {
5597
+ function lo(r) {
5589
5598
  return new Oe({
5590
5599
  find: r.find,
5591
5600
  handler: ({ state: e, range: t, match: n, chain: i }) => {
@@ -5609,7 +5618,7 @@ function oo(r) {
5609
5618
  undoable: r.undoable
5610
5619
  });
5611
5620
  }
5612
- var Is = (r) => "touches" in r, lo = class {
5621
+ var Is = (r) => "touches" in r, ao = class {
5613
5622
  /**
5614
5623
  * Creates a new ResizableNodeView instance.
5615
5624
  *
@@ -5877,7 +5886,7 @@ var Is = (r) => "touches" in r, lo = class {
5877
5886
  };
5878
5887
  }
5879
5888
  };
5880
- function ao(r, e) {
5889
+ function co(r, e) {
5881
5890
  const { selection: t } = r, { $from: n } = t;
5882
5891
  if (t instanceof ie) {
5883
5892
  const s = n.index();
@@ -5892,10 +5901,10 @@ function ao(r, e) {
5892
5901
  }
5893
5902
  return !1;
5894
5903
  }
5895
- function co(r) {
5904
+ function fo(r) {
5896
5905
  return r.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&");
5897
5906
  }
5898
- function fo() {
5907
+ function uo() {
5899
5908
  return typeof navigator < "u" ? /Firefox/.test(navigator.userAgent) : !1;
5900
5909
  }
5901
5910
  var Rs = {};
@@ -5972,7 +5981,7 @@ function Ns(r) {
5972
5981
  if (!p)
5973
5982
  return;
5974
5983
  const m = p[1] || "", g = n(m);
5975
- if (!o.find((x) => !(x in g)))
5984
+ if (!o.find((v) => !(v in g)))
5976
5985
  return {
5977
5986
  type: e,
5978
5987
  raw: p[0],
@@ -6027,7 +6036,7 @@ function zs(r) {
6027
6036
  const m = new RegExp(`^:::${c}(?:\\s+\\{([^}]*)\\})?\\s*\\n`), g = u.match(m);
6028
6037
  if (!g)
6029
6038
  return;
6030
- const [y, x = ""] = g, v = i(x);
6039
+ const [y, v = ""] = g, x = i(v);
6031
6040
  let S = 1;
6032
6041
  const b = y.length;
6033
6042
  let T = "";
@@ -6061,7 +6070,7 @@ function zs(r) {
6061
6070
  return {
6062
6071
  type: e,
6063
6072
  raw: zn,
6064
- attributes: v,
6073
+ attributes: x,
6065
6074
  content: T,
6066
6075
  tokens: q
6067
6076
  };
@@ -6139,20 +6148,20 @@ function Ps(r) {
6139
6148
  const m = l ? new RegExp(`^\\[${u}\\s*([^\\]]*)\\]`) : new RegExp(`^\\[${u}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${u}\\]`), g = d.match(m);
6140
6149
  if (!g)
6141
6150
  return;
6142
- let y = "", x = "";
6151
+ let y = "", v = "";
6143
6152
  if (l) {
6144
6153
  const [, S] = g;
6145
- x = S;
6154
+ v = S;
6146
6155
  } else {
6147
6156
  const [, S, b] = g;
6148
- x = S, y = b || "";
6157
+ v = S, y = b || "";
6149
6158
  }
6150
- const v = i(x.trim());
6159
+ const x = i(v.trim());
6151
6160
  return {
6152
6161
  type: e,
6153
6162
  raw: g[0],
6154
6163
  content: y.trim(),
6155
- attributes: v
6164
+ attributes: x
6156
6165
  };
6157
6166
  }
6158
6167
  },
@@ -6205,14 +6214,14 @@ function Bs(r, e, t) {
6205
6214
  else
6206
6215
  break;
6207
6216
  }
6208
- let x;
6209
- const v = y.slice(1);
6210
- if (v.length > 0) {
6211
- const b = v.map((T) => T.slice(m + u)).join(`
6217
+ let v;
6218
+ const x = y.slice(1);
6219
+ if (x.length > 0) {
6220
+ const b = x.map((T) => T.slice(m + u)).join(`
6212
6221
  `);
6213
- b.trim() && (e.customNestedParser ? x = e.customNestedParser(b) : x = t.blockTokens(b));
6222
+ b.trim() && (e.customNestedParser ? v = e.customNestedParser(b) : v = t.blockTokens(b));
6214
6223
  }
6215
- const S = e.createToken(p, x);
6224
+ const S = e.createToken(p, v);
6216
6225
  a.push(S);
6217
6226
  }
6218
6227
  if (a.length !== 0)
@@ -6224,19 +6233,23 @@ function Bs(r, e, t) {
6224
6233
  function Ds(r, e, t, n) {
6225
6234
  if (!r || !Array.isArray(r.content))
6226
6235
  return "";
6227
- const i = typeof t == "function" ? t(n) : t, [s, ...o] = r.content, l = e.renderChildren([s]), a = [`${i}${l}`];
6228
- return o && o.length > 0 && o.forEach((c) => {
6229
- const f = e.renderChildren([c]);
6230
- if (f) {
6231
- const u = f.split(`
6232
- `).map((d) => d ? e.indent(d) : "").join(`
6236
+ const i = typeof t == "function" ? t(n) : t, [s, ...o] = r.content, l = e.renderChildren([s]);
6237
+ let a = `${i}${l}`;
6238
+ return o && o.length > 0 && o.forEach((c, f) => {
6239
+ var u, d;
6240
+ const h = (d = (u = e.renderChild) == null ? void 0 : u.call(e, c, f + 1)) != null ? d : e.renderChildren([c]);
6241
+ if (h != null) {
6242
+ const p = h.split(`
6243
+ `).map((m) => m ? e.indent(m) : e.indent("")).join(`
6233
6244
  `);
6234
- a.push(u);
6245
+ a += c.type === "paragraph" ? `
6246
+
6247
+ ${p}` : `
6248
+ ${p}`;
6235
6249
  }
6236
- }), a.join(`
6237
- `);
6250
+ }), a;
6238
6251
  }
6239
- var uo = class Rn extends ut {
6252
+ var ho = class Rn extends ut {
6240
6253
  constructor() {
6241
6254
  super(...arguments), this.type = "node";
6242
6255
  }
@@ -6255,7 +6268,7 @@ var uo = class Rn extends ut {
6255
6268
  const t = typeof e == "function" ? e() : e;
6256
6269
  return super.extend(t);
6257
6270
  }
6258
- }, ho = class {
6271
+ }, po = class {
6259
6272
  constructor(r, e, t) {
6260
6273
  this.isDragging = !1, this.component = r, this.editor = e.editor, this.options = {
6261
6274
  stopEvent: null,
@@ -6278,13 +6291,13 @@ var uo = class Rn extends ut {
6278
6291
  return;
6279
6292
  let u = 0, d = 0;
6280
6293
  if (this.dom !== f) {
6281
- const x = this.dom.getBoundingClientRect(), v = f.getBoundingClientRect(), S = (i = r.offsetX) != null ? i : (n = r.nativeEvent) == null ? void 0 : n.offsetX, b = (o = r.offsetY) != null ? o : (s = r.nativeEvent) == null ? void 0 : s.offsetY;
6282
- u = v.x - x.x + S, d = v.y - x.y + b;
6294
+ const v = this.dom.getBoundingClientRect(), x = f.getBoundingClientRect(), S = (i = r.offsetX) != null ? i : (n = r.nativeEvent) == null ? void 0 : n.offsetX, b = (o = r.offsetY) != null ? o : (s = r.nativeEvent) == null ? void 0 : s.offsetY;
6295
+ u = x.x - v.x + S, d = x.y - v.y + b;
6283
6296
  }
6284
6297
  const h = this.dom.cloneNode(!0);
6285
6298
  try {
6286
- const x = this.dom.getBoundingClientRect();
6287
- h.style.width = `${Math.round(x.width)}px`, h.style.height = `${Math.round(x.height)}px`, h.style.boxSizing = "border-box", h.style.pointerEvents = "none";
6299
+ const v = this.dom.getBoundingClientRect();
6300
+ h.style.width = `${Math.round(v.width)}px`, h.style.height = `${Math.round(v.height)}px`, h.style.boxSizing = "border-box", h.style.pointerEvents = "none";
6288
6301
  } catch {
6289
6302
  }
6290
6303
  let p = null;
@@ -6374,7 +6387,7 @@ var uo = class Rn extends ut {
6374
6387
  this.editor.commands.deleteRange({ from: r, to: e });
6375
6388
  }
6376
6389
  };
6377
- function po(r) {
6390
+ function mo(r) {
6378
6391
  return new Tn({
6379
6392
  find: r.find,
6380
6393
  handler: ({ state: e, range: t, match: n, pasteEvent: i }) => {
@@ -6392,7 +6405,7 @@ function po(r) {
6392
6405
  }
6393
6406
  });
6394
6407
  }
6395
- function mo(r) {
6408
+ function go(r) {
6396
6409
  return new Tn({
6397
6410
  find: r.find,
6398
6411
  handler({ match: e, chain: t, range: n, pasteEvent: i }) {
@@ -6405,64 +6418,65 @@ function mo(r) {
6405
6418
  });
6406
6419
  }
6407
6420
  export {
6408
- Hi as $,
6421
+ gn as $,
6409
6422
  F as A,
6410
6423
  Ui as B,
6411
- _s as C,
6424
+ Vs as C,
6412
6425
  Lt as D,
6413
6426
  J as E,
6414
6427
  w as F,
6415
6428
  bn as G,
6416
- Us as H,
6417
- co as I,
6418
- Oe as J,
6419
- js as K,
6420
- Hs as L,
6421
- to as M,
6422
- uo as N,
6423
- Ce as O,
6429
+ Ks as H,
6430
+ fo as I,
6431
+ _s as J,
6432
+ Oe as K,
6433
+ js as L,
6434
+ no as M,
6435
+ ho as N,
6436
+ Hs as O,
6424
6437
  Tn as P,
6425
- W as Q,
6426
- ge as R,
6438
+ Ce as Q,
6439
+ W as R,
6427
6440
  E as S,
6428
6441
  O as T,
6429
- Sn as U,
6430
- xr as V,
6431
- kr as W,
6432
- Li as X,
6433
- ho as Y,
6434
- gn as Z,
6435
- qs as _,
6436
- Qs as a,
6437
- it as a0,
6438
- Xs as a1,
6439
- Gs as a2,
6440
- Ki as a3,
6441
- fo as a4,
6442
- mo as a5,
6443
- lo as a6,
6444
- Ys as b,
6442
+ ge as U,
6443
+ Sn as V,
6444
+ vr as W,
6445
+ kr as X,
6446
+ Li as Y,
6447
+ po as Z,
6448
+ go as _,
6449
+ Zs as a,
6450
+ Us as a0,
6451
+ Hi as a1,
6452
+ it as a2,
6453
+ Ys as a3,
6454
+ eo as a4,
6455
+ Ki as a5,
6456
+ uo as a6,
6457
+ ao as a7,
6458
+ Qs as b,
6445
6459
  R as c,
6446
- Ks as d,
6447
- eo as e,
6448
- po as f,
6449
- Vs as g,
6450
- ro as h,
6460
+ Xs as d,
6461
+ to as e,
6462
+ mo as f,
6463
+ qs as g,
6464
+ io as h,
6451
6465
  me as i,
6452
6466
  ze as j,
6453
- ao as k,
6454
- Zs as l,
6467
+ co as k,
6468
+ Gs as l,
6455
6469
  ji as m,
6456
- io as n,
6470
+ so as n,
6457
6471
  Nt as o,
6458
6472
  Bs as p,
6459
- no as q,
6473
+ ro as q,
6460
6474
  Ds as r,
6461
6475
  M as s,
6462
- so as t,
6476
+ oo as t,
6463
6477
  k as u,
6464
6478
  Js as v,
6465
- oo as w,
6479
+ lo as w,
6466
6480
  Ue as x,
6467
6481
  Ps as y,
6468
6482
  Di as z