reactjs-tiptap-editor 1.0.17 → 1.0.19

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 (213) hide show
  1. package/lib/{ActionMenuButton-lsIBc9sU.js → ActionMenuButton-B1Nfn5Hm.js} +6 -6
  2. package/lib/ActionMenuButton-D3b_bcin.cjs +1 -0
  3. package/lib/Attachment.cjs +2 -2
  4. package/lib/Attachment.js +48 -86
  5. package/lib/Blockquote.cjs +3 -3
  6. package/lib/Blockquote.js +33 -29
  7. package/lib/Bold.cjs +1 -1
  8. package/lib/Bold.js +16 -11
  9. package/lib/BulletList.cjs +1 -1
  10. package/lib/BulletList.js +2 -3
  11. package/lib/Callout.cjs +1 -1
  12. package/lib/Callout.js +108 -103
  13. package/lib/Clear.cjs +1 -1
  14. package/lib/Clear.js +2 -3
  15. package/lib/Code.cjs +1 -1
  16. package/lib/Code.js +2 -3
  17. package/lib/CodeBlock.cjs +38 -38
  18. package/lib/CodeBlock.js +1565 -1610
  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 +46 -63
  23. package/lib/Column.cjs +1 -1
  24. package/lib/Column.js +24 -10
  25. package/lib/Drawer-B1-7Y4HB.js +1099 -0
  26. package/lib/Drawer-kEO7KzzC.cjs +1 -0
  27. package/lib/Drawer.cjs +1 -1
  28. package/lib/Drawer.js +6 -5
  29. package/lib/Emoji.cjs +1 -1
  30. package/lib/Emoji.js +69 -93
  31. package/lib/Excalidraw.cjs +1 -1
  32. package/lib/Excalidraw.js +101 -112
  33. package/lib/ExportPdf.cjs +4 -4
  34. package/lib/ExportPdf.js +4 -13
  35. package/lib/ExportWord.cjs +1 -1
  36. package/lib/ExportWord.js +9 -7
  37. package/lib/FontFamily.cjs +1 -1
  38. package/lib/FontFamily.js +12 -34
  39. package/lib/FontSize.cjs +1 -1
  40. package/lib/FontSize.js +12 -27
  41. package/lib/Heading.cjs +1 -1
  42. package/lib/Heading.js +32 -45
  43. package/lib/Highlight.cjs +1 -1
  44. package/lib/Highlight.js +39 -52
  45. package/lib/History.cjs +1 -1
  46. package/lib/History.js +320 -313
  47. package/lib/HorizontalRule.cjs +1 -1
  48. package/lib/HorizontalRule.js +2 -3
  49. package/lib/Iframe-Bk5OIlvy.cjs +1 -0
  50. package/lib/{Iframe-CTajPyzs.js → Iframe-XlAb03_r.js} +21 -30
  51. package/lib/Iframe.cjs +1 -1
  52. package/lib/Iframe.js +5 -4
  53. package/lib/Image.cjs +1 -1
  54. package/lib/Image.js +5 -3
  55. package/lib/ImageGif.cjs +1 -1
  56. package/lib/ImageGif.js +89 -117
  57. package/lib/ImportWord.cjs +1 -1
  58. package/lib/ImportWord.js +16 -20
  59. package/lib/Indent-XaZNTsOk.cjs +1 -0
  60. package/lib/{Indent-BGEHlRx_.js → Indent-ruPuj5xn.js} +3 -7
  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 -19
  65. package/lib/Katex-BFIYLrwm.cjs +4 -0
  66. package/lib/{Katex-tMh4bfBb.js → Katex-DKspCn-p.js} +238 -253
  67. package/lib/Katex.cjs +1 -1
  68. package/lib/Katex.js +5 -4
  69. package/lib/LineHeight.cjs +1 -1
  70. package/lib/LineHeight.js +13 -21
  71. package/lib/Link.cjs +1 -1
  72. package/lib/Link.js +2 -2
  73. package/lib/{LinkEditBlock-CA5NhP-m.js → LinkEditBlock-BWm2Ypt2.js} +329 -379
  74. package/lib/LinkEditBlock-DhesHreq.cjs +5 -0
  75. package/lib/MarkdownPaste.cjs +58 -0
  76. package/lib/MarkdownPaste.js +1656 -0
  77. package/lib/Mention.cjs +1 -1
  78. package/lib/Mention.js +22 -17
  79. package/lib/Mermaid.cjs +2 -2
  80. package/lib/Mermaid.js +130 -155
  81. package/lib/MoreMark.cjs +1 -1
  82. package/lib/MoreMark.js +12 -20
  83. package/lib/OrderedList.cjs +1 -1
  84. package/lib/OrderedList.js +2 -3
  85. package/lib/SearchAndReplace.cjs +1 -1
  86. package/lib/SearchAndReplace.js +69 -134
  87. package/lib/SlashCommand.cjs +1 -1
  88. package/lib/SlashCommand.js +15 -14
  89. package/lib/{SlashCommandNodeView-CZoM3ZlS.cjs → SlashCommandNodeView-CojfS61Q.cjs} +1 -1
  90. package/lib/{SlashCommandNodeView-DLuqbX2o.js → SlashCommandNodeView-Hf2DX4km.js} +18 -20
  91. package/lib/Strike.cjs +1 -1
  92. package/lib/Strike.js +2 -3
  93. package/lib/{Table-BC4Lbqzn.js → Table-BTkFUATL.js} +95 -133
  94. package/lib/Table-C1_xLqV0.cjs +9 -0
  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 -3
  99. package/lib/TextAlign.cjs +1 -1
  100. package/lib/TextAlign.js +51 -60
  101. package/lib/TextDirection.cjs +1 -1
  102. package/lib/TextDirection.js +47 -69
  103. package/lib/TextUnderline.cjs +1 -1
  104. package/lib/TextUnderline.js +2 -3
  105. package/lib/Twitter-Cj-0yyQQ.cjs +1 -0
  106. package/lib/{Twitter-D8Cbgl7g.js → Twitter-D5mUTILj.js} +567 -593
  107. package/lib/Twitter.cjs +1 -1
  108. package/lib/Twitter.js +4 -3
  109. package/lib/Video.cjs +1 -1
  110. package/lib/Video.js +5 -5
  111. package/lib/bubble.cjs +6 -4
  112. package/lib/bubble.js +3891 -3001
  113. package/lib/clsx-BSBE1eoY.cjs +33 -0
  114. package/lib/clsx-OumA9x-8.js +1062 -0
  115. package/lib/components/ActionButton.d.ts +2 -2
  116. package/lib/components/ActionMenuButton.d.ts +1 -1
  117. package/lib/components/Bubble/formatBubble.d.ts +5 -5
  118. package/lib/components/ui/checkbox.d.ts +1 -1
  119. package/lib/components/ui/dialog.d.ts +1 -1
  120. package/lib/components/ui/dropdown-menu.d.ts +1 -1
  121. package/lib/components/ui/emoji-picker.d.ts +1 -1
  122. package/lib/components/ui/label.d.ts +1 -1
  123. package/lib/components/ui/popover.d.ts +1 -1
  124. package/lib/components/ui/select.d.ts +1 -1
  125. package/lib/components/ui/separator.d.ts +1 -1
  126. package/lib/components/ui/switch.d.ts +1 -1
  127. package/lib/components/ui/tabs.d.ts +1 -1
  128. package/lib/components/ui/toast.d.ts +1 -1
  129. package/lib/components/ui/toggle.d.ts +1 -1
  130. package/lib/components/ui/tooltip.d.ts +1 -1
  131. package/lib/{delete-node-IyVmiRbI.js → delete-node-eQHsyyhR.js} +3 -1
  132. package/lib/{dropdown-menu-q6RL_fkA.js → dropdown-menu-Bragdu5m.js} +8 -8
  133. package/lib/{dropdown-menu-C_F7LEy5.cjs → dropdown-menu-CUeq1boX.cjs} +1 -1
  134. package/lib/extensions/Blockquote/Blockquote.d.ts +1 -1
  135. package/lib/extensions/Bold/Bold.d.ts +1 -1
  136. package/lib/extensions/Code/Code.d.ts +1 -1
  137. package/lib/extensions/CodeView/CodeView.d.ts +2 -2
  138. package/lib/extensions/Heading/Heading.d.ts +1 -1
  139. package/lib/extensions/Highlight/Highlight.d.ts +1 -1
  140. package/lib/extensions/HorizontalRule/HorizontalRule.d.ts +1 -1
  141. package/lib/extensions/Image/Image.d.ts +1 -0
  142. package/lib/extensions/ImportWord/ImportWord.d.ts +2 -2
  143. package/lib/extensions/Italic/Italic.d.ts +1 -1
  144. package/lib/extensions/Link/Link.d.ts +1 -1
  145. package/lib/extensions/MarkdownPaste/MarkdownPaste.d.ts +5 -0
  146. package/lib/extensions/MarkdownPaste/index.d.ts +1 -0
  147. package/lib/extensions/Mermaid/Mermaid.d.ts +1 -1
  148. package/lib/extensions/MoreMark/MoreMark.d.ts +1 -1
  149. package/lib/extensions/Strike/Strike.d.ts +1 -1
  150. package/lib/extensions/Table/Table.d.ts +1 -1
  151. package/lib/extensions/TextAlign/TextAlign.d.ts +1 -1
  152. package/lib/extensions/TextUnderline/TextUnderline.d.ts +1 -1
  153. package/lib/index-B-7eHzaO.js +1362 -0
  154. package/lib/{index-BDYJ8Ph2.js → index-BKlbc8Qo.js} +1 -1
  155. package/lib/index-BLrMslr7.cjs +1 -0
  156. package/lib/index-BVRHx_ha.js +6473 -0
  157. package/lib/{index-C07N8gA1.js → index-BlXGgvT-.js} +21 -18
  158. package/lib/{index-BsFvo9PG.cjs → index-BqL4vAWE.cjs} +1 -1
  159. package/lib/{index-RcSPeQHn.js → index-CDFAs4RT.js} +1508 -1464
  160. package/lib/index-CMLwKzI0.cjs +1 -0
  161. package/lib/index-COCTP78Y.cjs +12 -0
  162. package/lib/{index-DqruLhsu.js → index-CZ1_8JQQ.js} +23 -23
  163. package/lib/{index-neeeY2o7.cjs → index-CnePcUeF.cjs} +3 -3
  164. package/lib/index-D7wfvzJg.cjs +1 -0
  165. package/lib/index-DwSnESy-.cjs +24 -0
  166. package/lib/{index-Do_dsOGB.js → index-cPEuL4Zr.js} +175 -158
  167. package/lib/index.cjs +1 -1
  168. package/lib/index.js +33 -41
  169. package/lib/locale-bundle.cjs +1 -1
  170. package/lib/locale-bundle.js +1 -1
  171. package/lib/plugins/image-upload.d.ts +1 -1
  172. package/lib/popover-C2BbhsXH.js +24 -0
  173. package/lib/popover-DCJpsZx0.cjs +1 -0
  174. package/lib/{renderNodeView-BEkECnnY.js → renderNodeView-CmnUEfby.js} +2 -2
  175. package/lib/{renderNodeView-DfLmGrgA.cjs → renderNodeView-DQjWzXDA.cjs} +1 -1
  176. package/lib/{separator-BLp6xpSY.cjs → separator-BuG1zwKa.cjs} +1 -1
  177. package/lib/separator-lkMWuUvf.js +293 -0
  178. package/lib/store/editor.d.ts +1 -1
  179. package/lib/store/store.d.ts +1 -1
  180. package/lib/style.css +1 -1
  181. package/lib/theme.js +1 -1
  182. package/lib/types.d.ts +3 -3
  183. package/lib/updatePosition-D6AScA-1.cjs +1 -0
  184. package/lib/updatePosition-DYuAiqx-.js +16 -0
  185. package/lib/utils/columns.d.ts +1 -1
  186. package/lib/utils/pdf.d.ts +1 -1
  187. package/lib/utils/utils.d.ts +1 -1
  188. package/package.json +262 -247
  189. package/lib/ActionMenuButton-B_E2mbAW.cjs +0 -1
  190. package/lib/Drawer-DQ4CxBwG.js +0 -1373
  191. package/lib/Drawer-FUeUKshi.cjs +0 -1
  192. package/lib/Iframe-EVWXCqe4.cjs +0 -1
  193. package/lib/Indent-q9cEWAa_.cjs +0 -1
  194. package/lib/Katex-ClqcEnN_.cjs +0 -4
  195. package/lib/LinkEditBlock-DZXk4ln_.cjs +0 -5
  196. package/lib/Table-BmDopO43.cjs +0 -9
  197. package/lib/Twitter-BbMD3Ybp.cjs +0 -1
  198. package/lib/clsx-CXbNJWDD.cjs +0 -54
  199. package/lib/clsx-DaPvp9ji.js +0 -7391
  200. package/lib/index-BCzvbrf5.cjs +0 -12
  201. package/lib/index-BnVcq33n.cjs +0 -1
  202. package/lib/index-CjhjjJsN.cjs +0 -1
  203. package/lib/index-Cs6cp0Y6.cjs +0 -1
  204. package/lib/index-Qcl3BG94.js +0 -1351
  205. package/lib/popover-CtinPbiy.js +0 -24
  206. package/lib/popover-DIMT3pae.cjs +0 -1
  207. package/lib/select-CYyIeImH.cjs +0 -1
  208. package/lib/select-CmV5uTXr.js +0 -117
  209. package/lib/separator-C7luvaG8.js +0 -327
  210. package/lib/textarea-CkVKMPqK.js +0 -20
  211. package/lib/textarea-Cn75Cm2n.cjs +0 -1
  212. package/lib/updatePosition-Cjuj2E26.cjs +0 -1
  213. package/lib/updatePosition-DRmKQBGm.js +0 -16
package/lib/History.js CHANGED
@@ -1,22 +1,22 @@
1
- import { Q as N, y as te, F as V, x as G, T as H, v as _, S as A, U as W, V as ne, E as C, W as re, X as ie, Y as oe, q as se } from "./clsx-DaPvp9ji.js";
2
- import { Plugin as I, PluginKey as b } from "@tiptap/pm/state";
3
- import { DecorationSet as O, Decoration as R } from "@tiptap/pm/view";
4
- import { k as le, D as ae, a as de } from "./index-DqruLhsu.js";
5
- import { jsx as T, Fragment as j } from "react/jsx-runtime";
6
- import { u as U, e as X, A as Y, i as ce } from "./index-RcSPeQHn.js";
1
+ import { K as R, v as ne, F as L, u as G, T as H, s as U, S as T, L as W, O as re, E as C, Q as ie, R as oe, U as se, l as le } from "./index-BVRHx_ha.js";
2
+ import { Plugin as A, PluginKey as I } from "@tiptap/pm/state";
3
+ import { DecorationSet as S, Decoration as N } from "@tiptap/pm/view";
4
+ import { k as ae, D as de, a as ce } from "./index-CZ1_8JQQ.js";
5
+ import { jsx as O, Fragment as j } from "react/jsx-runtime";
6
+ import { u as X, e as Y, A as Z, i as ue } from "./index-CDFAs4RT.js";
7
7
  import "react";
8
8
  import "./theme.js";
9
- function ue(i = {}) {
10
- return new N({
9
+ function pe(n = {}) {
10
+ return new R({
11
11
  view(e) {
12
- return new pe(e, i);
12
+ return new he(e, n);
13
13
  }
14
14
  });
15
15
  }
16
- class pe {
16
+ class he {
17
17
  constructor(e, t) {
18
- var n;
19
- this.editorView = e, this.cursorPos = null, this.element = null, this.timeout = -1, this.width = (n = t.width) !== null && n !== void 0 ? n : 1, this.color = t.color === !1 ? void 0 : t.color || "black", this.class = t.class, this.handlers = ["dragover", "dragend", "drop", "dragleave"].map((r) => {
18
+ var i;
19
+ this.editorView = e, this.cursorPos = null, this.element = null, this.timeout = -1, this.width = (i = t.width) !== null && i !== void 0 ? i : 1, this.color = t.color === !1 ? void 0 : t.color || "black", this.class = t.class, this.handlers = ["dragover", "dragend", "drop", "dragleave"].map((r) => {
20
20
  let o = (s) => {
21
21
  this[r](s);
22
22
  };
@@ -33,22 +33,22 @@ class pe {
33
33
  e != this.cursorPos && (this.cursorPos = e, e == null ? (this.element.parentNode.removeChild(this.element), this.element = null) : this.updateOverlay());
34
34
  }
35
35
  updateOverlay() {
36
- let e = this.editorView.state.doc.resolve(this.cursorPos), t = !e.parent.inlineContent, n, r = this.editorView.dom, o = r.getBoundingClientRect(), s = o.width / r.offsetWidth, l = o.height / r.offsetHeight;
36
+ let e = this.editorView.state.doc.resolve(this.cursorPos), t = !e.parent.inlineContent, i, r = this.editorView.dom, o = r.getBoundingClientRect(), s = o.width / r.offsetWidth, l = o.height / r.offsetHeight;
37
37
  if (t) {
38
38
  let c = e.nodeBefore, p = e.nodeAfter;
39
39
  if (c || p) {
40
- let h = this.editorView.nodeDOM(this.cursorPos - (c ? c.nodeSize : 0));
41
- if (h) {
42
- let g = h.getBoundingClientRect(), M = c ? g.bottom : g.top;
43
- c && p && (M = (M + this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top) / 2);
40
+ let f = this.editorView.nodeDOM(this.cursorPos - (c ? c.nodeSize : 0));
41
+ if (f) {
42
+ let g = f.getBoundingClientRect(), b = c ? g.bottom : g.top;
43
+ c && p && (b = (b + this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top) / 2);
44
44
  let P = this.width / 2 * l;
45
- n = { left: g.left, right: g.right, top: M - P, bottom: M + P };
45
+ i = { left: g.left, right: g.right, top: b - P, bottom: b + P };
46
46
  }
47
47
  }
48
48
  }
49
- if (!n) {
49
+ if (!i) {
50
50
  let c = this.editorView.coordsAtPos(this.cursorPos), p = this.width / 2 * s;
51
- n = { left: c.left - p, right: c.left + p, top: c.top, bottom: c.bottom };
51
+ i = { left: c.left - p, right: c.left + p, top: c.top, bottom: c.bottom };
52
52
  }
53
53
  let a = this.editorView.dom.offsetParent;
54
54
  this.element || (this.element = a.appendChild(document.createElement("div")), this.class && (this.element.className = this.class), this.element.style.cssText = "position: absolute; z-index: 50; pointer-events: none;", this.color && (this.element.style.backgroundColor = this.color)), this.element.classList.toggle("prosemirror-dropcursor-block", t), this.element.classList.toggle("prosemirror-dropcursor-inline", !t);
@@ -56,10 +56,10 @@ class pe {
56
56
  if (!a || a == document.body && getComputedStyle(a).position == "static")
57
57
  d = -pageXOffset, u = -pageYOffset;
58
58
  else {
59
- let c = a.getBoundingClientRect(), p = c.width / a.offsetWidth, h = c.height / a.offsetHeight;
60
- d = c.left - a.scrollLeft * p, u = c.top - a.scrollTop * h;
59
+ let c = a.getBoundingClientRect(), p = c.width / a.offsetWidth, f = c.height / a.offsetHeight;
60
+ d = c.left - a.scrollLeft * p, u = c.top - a.scrollTop * f;
61
61
  }
62
- this.element.style.left = (n.left - d) / s + "px", this.element.style.top = (n.top - u) / l + "px", this.element.style.width = (n.right - n.left) / s + "px", this.element.style.height = (n.bottom - n.top) / l + "px";
62
+ this.element.style.left = (i.left - d) / s + "px", this.element.style.top = (i.top - u) / l + "px", this.element.style.width = (i.right - i.left) / s + "px", this.element.style.height = (i.bottom - i.top) / l + "px";
63
63
  }
64
64
  scheduleRemoval(e) {
65
65
  clearTimeout(this.timeout), this.timeout = setTimeout(() => this.setCursor(null), e);
@@ -67,11 +67,11 @@ class pe {
67
67
  dragover(e) {
68
68
  if (!this.editorView.editable)
69
69
  return;
70
- let t = this.editorView.posAtCoords({ left: e.clientX, top: e.clientY }), n = t && t.inside >= 0 && this.editorView.state.doc.nodeAt(t.inside), r = n && n.type.spec.disableDropCursor, o = typeof r == "function" ? r(this.editorView, t, e) : r;
70
+ let t = this.editorView.posAtCoords({ left: e.clientX, top: e.clientY }), i = t && t.inside >= 0 && this.editorView.state.doc.nodeAt(t.inside), r = i && i.type.spec.disableDropCursor, o = typeof r == "function" ? r(this.editorView, t, e) : r;
71
71
  if (t && !o) {
72
72
  let s = t.pos;
73
73
  if (this.editorView.dragging && this.editorView.dragging.slice) {
74
- let l = te(this.editorView.state.doc, s, this.editorView.dragging.slice);
74
+ let l = ne(this.editorView.state.doc, s, this.editorView.dragging.slice);
75
75
  l != null && (s = l);
76
76
  }
77
77
  this.setCursor(s), this.scheduleRemoval(5e3);
@@ -87,7 +87,7 @@ class pe {
87
87
  this.editorView.dom.contains(e.relatedTarget) || this.setCursor(null);
88
88
  }
89
89
  }
90
- class f extends A {
90
+ class h extends T {
91
91
  /**
92
92
  Create a gap cursor.
93
93
  */
@@ -95,14 +95,14 @@ class f extends A {
95
95
  super(e, e);
96
96
  }
97
97
  map(e, t) {
98
- let n = e.resolve(t.map(this.head));
99
- return f.valid(n) ? new f(n) : A.near(n);
98
+ let i = e.resolve(t.map(this.head));
99
+ return h.valid(i) ? new h(i) : T.near(i);
100
100
  }
101
101
  content() {
102
102
  return G.empty;
103
103
  }
104
104
  eq(e) {
105
- return e instanceof f && e.head == this.head;
105
+ return e instanceof h && e.head == this.head;
106
106
  }
107
107
  toJSON() {
108
108
  return { type: "gapcursor", pos: this.head };
@@ -113,7 +113,7 @@ class f extends A {
113
113
  static fromJSON(e, t) {
114
114
  if (typeof t.pos != "number")
115
115
  throw new RangeError("Invalid input for GapCursor.fromJSON");
116
- return new f(e.resolve(t.pos));
116
+ return new h(e.resolve(t.pos));
117
117
  }
118
118
  /**
119
119
  @internal
@@ -126,20 +126,20 @@ class f extends A {
126
126
  */
127
127
  static valid(e) {
128
128
  let t = e.parent;
129
- if (t.isTextblock || !fe(e) || !he(e))
129
+ if (t.inlineContent || !fe(e) || !me(e))
130
130
  return !1;
131
- let n = t.type.spec.allowGapCursor;
132
- if (n != null)
133
- return n;
131
+ let i = t.type.spec.allowGapCursor;
132
+ if (i != null)
133
+ return i;
134
134
  let r = t.contentMatchAt(e.index()).defaultType;
135
135
  return r && r.isTextblock;
136
136
  }
137
137
  /**
138
138
  @internal
139
139
  */
140
- static findGapCursorFrom(e, t, n = !1) {
140
+ static findGapCursorFrom(e, t, i = !1) {
141
141
  e: for (; ; ) {
142
- if (!n && f.valid(e))
142
+ if (!i && h.valid(e))
143
143
  return e;
144
144
  let r = e.pos, o = null;
145
145
  for (let s = e.depth; ; s--) {
@@ -151,30 +151,30 @@ class f extends A {
151
151
  return null;
152
152
  r += t;
153
153
  let a = e.doc.resolve(r);
154
- if (f.valid(a))
154
+ if (h.valid(a))
155
155
  return a;
156
156
  }
157
157
  for (; ; ) {
158
158
  let s = t > 0 ? o.firstChild : o.lastChild;
159
159
  if (!s) {
160
- if (o.isAtom && !o.isText && !_.isSelectable(o)) {
161
- e = e.doc.resolve(r + o.nodeSize * t), n = !1;
160
+ if (o.isAtom && !o.isText && !U.isSelectable(o)) {
161
+ e = e.doc.resolve(r + o.nodeSize * t), i = !1;
162
162
  continue e;
163
163
  }
164
164
  break;
165
165
  }
166
166
  o = s, r += t;
167
167
  let l = e.doc.resolve(r);
168
- if (f.valid(l))
168
+ if (h.valid(l))
169
169
  return l;
170
170
  }
171
171
  return null;
172
172
  }
173
173
  }
174
174
  }
175
- f.prototype.visible = !1;
176
- f.findFrom = f.findGapCursorFrom;
177
- A.jsonID("gapcursor", f);
175
+ h.prototype.visible = !1;
176
+ h.findFrom = h.findGapCursorFrom;
177
+ T.jsonID("gapcursor", h);
178
178
  class F {
179
179
  constructor(e) {
180
180
  this.pos = e;
@@ -184,21 +184,21 @@ class F {
184
184
  }
185
185
  resolve(e) {
186
186
  let t = e.resolve(this.pos);
187
- return f.valid(t) ? new f(t) : A.near(t);
187
+ return h.valid(t) ? new h(t) : T.near(t);
188
188
  }
189
189
  }
190
- function J(i) {
191
- return i.isAtom || i.spec.isolating || i.spec.createGapCursor;
190
+ function J(n) {
191
+ return n.isAtom || n.spec.isolating || n.spec.createGapCursor;
192
192
  }
193
- function fe(i) {
194
- for (let e = i.depth; e >= 0; e--) {
195
- let t = i.index(e), n = i.node(e);
193
+ function fe(n) {
194
+ for (let e = n.depth; e >= 0; e--) {
195
+ let t = n.index(e), i = n.node(e);
196
196
  if (t == 0) {
197
- if (n.type.spec.isolating)
197
+ if (i.type.spec.isolating)
198
198
  return !0;
199
199
  continue;
200
200
  }
201
- for (let r = n.child(t - 1); ; r = r.lastChild) {
201
+ for (let r = i.child(t - 1); ; r = r.lastChild) {
202
202
  if (r.childCount == 0 && !r.inlineContent || J(r.type))
203
203
  return !0;
204
204
  if (r.inlineContent)
@@ -207,15 +207,15 @@ function fe(i) {
207
207
  }
208
208
  return !0;
209
209
  }
210
- function he(i) {
211
- for (let e = i.depth; e >= 0; e--) {
212
- let t = i.indexAfter(e), n = i.node(e);
213
- if (t == n.childCount) {
214
- if (n.type.spec.isolating)
210
+ function me(n) {
211
+ for (let e = n.depth; e >= 0; e--) {
212
+ let t = n.indexAfter(e), i = n.node(e);
213
+ if (t == i.childCount) {
214
+ if (i.type.spec.isolating)
215
215
  return !0;
216
216
  continue;
217
217
  }
218
- for (let r = n.child(t); ; r = r.firstChild) {
218
+ for (let r = i.child(t); ; r = r.firstChild) {
219
219
  if (r.childCount == 0 && !r.inlineContent || J(r.type))
220
220
  return !0;
221
221
  if (r.inlineContent)
@@ -224,64 +224,64 @@ function he(i) {
224
224
  }
225
225
  return !0;
226
226
  }
227
- function me() {
228
- return new N({
227
+ function ge() {
228
+ return new R({
229
229
  props: {
230
- decorations: ye,
231
- createSelectionBetween(i, e, t) {
232
- return e.pos == t.pos && f.valid(t) ? new f(t) : null;
230
+ decorations: Ce,
231
+ createSelectionBetween(n, e, t) {
232
+ return e.pos == t.pos && h.valid(t) ? new h(t) : null;
233
233
  },
234
- handleClick: ve,
235
- handleKeyDown: ge,
236
- handleDOMEvents: { beforeinput: we }
234
+ handleClick: we,
235
+ handleKeyDown: ve,
236
+ handleDOMEvents: { beforeinput: ye }
237
237
  }
238
238
  });
239
239
  }
240
- const ge = le({
241
- ArrowLeft: x("horiz", -1),
242
- ArrowRight: x("horiz", 1),
243
- ArrowUp: x("vert", -1),
244
- ArrowDown: x("vert", 1)
240
+ const ve = ae({
241
+ ArrowLeft: M("horiz", -1),
242
+ ArrowRight: M("horiz", 1),
243
+ ArrowUp: M("vert", -1),
244
+ ArrowDown: M("vert", 1)
245
245
  });
246
- function x(i, e) {
247
- const t = i == "vert" ? e > 0 ? "down" : "up" : e > 0 ? "right" : "left";
248
- return function(n, r, o) {
249
- let s = n.selection, l = e > 0 ? s.$to : s.$from, a = s.empty;
246
+ function M(n, e) {
247
+ const t = n == "vert" ? e > 0 ? "down" : "up" : e > 0 ? "right" : "left";
248
+ return function(i, r, o) {
249
+ let s = i.selection, l = e > 0 ? s.$to : s.$from, a = s.empty;
250
250
  if (s instanceof H) {
251
251
  if (!o.endOfTextblock(t) || l.depth == 0)
252
252
  return !1;
253
- a = !1, l = n.doc.resolve(e > 0 ? l.after() : l.before());
253
+ a = !1, l = i.doc.resolve(e > 0 ? l.after() : l.before());
254
254
  }
255
- let d = f.findGapCursorFrom(l, e, a);
256
- return d ? (r && r(n.tr.setSelection(new f(d))), !0) : !1;
255
+ let d = h.findGapCursorFrom(l, e, a);
256
+ return d ? (r && r(i.tr.setSelection(new h(d))), !0) : !1;
257
257
  };
258
258
  }
259
- function ve(i, e, t) {
260
- if (!i || !i.editable)
259
+ function we(n, e, t) {
260
+ if (!n || !n.editable)
261
261
  return !1;
262
- let n = i.state.doc.resolve(e);
263
- if (!f.valid(n))
262
+ let i = n.state.doc.resolve(e);
263
+ if (!h.valid(i))
264
264
  return !1;
265
- let r = i.posAtCoords({ left: t.clientX, top: t.clientY });
266
- return r && r.inside > -1 && _.isSelectable(i.state.doc.nodeAt(r.inside)) ? !1 : (i.dispatch(i.state.tr.setSelection(new f(n))), !0);
265
+ let r = n.posAtCoords({ left: t.clientX, top: t.clientY });
266
+ return r && r.inside > -1 && U.isSelectable(n.state.doc.nodeAt(r.inside)) ? !1 : (n.dispatch(n.state.tr.setSelection(new h(i))), !0);
267
267
  }
268
- function we(i, e) {
269
- if (e.inputType != "insertCompositionText" || !(i.state.selection instanceof f))
268
+ function ye(n, e) {
269
+ if (e.inputType != "insertCompositionText" || !(n.state.selection instanceof h))
270
270
  return !1;
271
- let { $from: t } = i.state.selection, n = t.parent.contentMatchAt(t.index()).findWrapping(i.state.schema.nodes.text);
272
- if (!n)
271
+ let { $from: t } = n.state.selection, i = t.parent.contentMatchAt(t.index()).findWrapping(n.state.schema.nodes.text);
272
+ if (!i)
273
273
  return !1;
274
- let r = V.empty;
275
- for (let s = n.length - 1; s >= 0; s--)
276
- r = V.from(n[s].createAndFill(null, r));
277
- let o = i.state.tr.replace(t.pos, t.pos, new G(r, 0, 0));
278
- return o.setSelection(H.near(o.doc.resolve(t.pos + 1))), i.dispatch(o), !1;
274
+ let r = L.empty;
275
+ for (let s = i.length - 1; s >= 0; s--)
276
+ r = L.from(i[s].createAndFill(null, r));
277
+ let o = n.state.tr.replace(t.pos, t.pos, new G(r, 0, 0));
278
+ return o.setSelection(H.near(o.doc.resolve(t.pos + 1))), n.dispatch(o), !1;
279
279
  }
280
- function ye(i) {
281
- if (!(i.selection instanceof f))
280
+ function Ce(n) {
281
+ if (!(n.selection instanceof h))
282
282
  return null;
283
283
  let e = document.createElement("div");
284
- return e.className = "ProseMirror-gapcursor", ae.create(i.doc, [de.widget(i.selection.head, e, { key: "gapcursor" })]);
284
+ return e.className = "ProseMirror-gapcursor", de.create(n.doc, [ce.widget(n.selection.head, e, { key: "gapcursor" })]);
285
285
  }
286
286
  var D = 200, m = function() {
287
287
  };
@@ -292,7 +292,7 @@ m.prototype.prepend = function(e) {
292
292
  return e.length ? m.from(e).append(this) : this;
293
293
  };
294
294
  m.prototype.appendInner = function(e) {
295
- return new Ce(this, e);
295
+ return new Ee(this, e);
296
296
  };
297
297
  m.prototype.slice = function(e, t) {
298
298
  return e === void 0 && (e = 0), t === void 0 && (t = this.length), e >= t ? m.empty : this.sliceInner(Math.max(0, e), Math.min(this.length, t));
@@ -301,24 +301,24 @@ m.prototype.get = function(e) {
301
301
  if (!(e < 0 || e >= this.length))
302
302
  return this.getInner(e);
303
303
  };
304
- m.prototype.forEach = function(e, t, n) {
305
- t === void 0 && (t = 0), n === void 0 && (n = this.length), t <= n ? this.forEachInner(e, t, n, 0) : this.forEachInvertedInner(e, t, n, 0);
304
+ m.prototype.forEach = function(e, t, i) {
305
+ t === void 0 && (t = 0), i === void 0 && (i = this.length), t <= i ? this.forEachInner(e, t, i, 0) : this.forEachInvertedInner(e, t, i, 0);
306
306
  };
307
- m.prototype.map = function(e, t, n) {
308
- t === void 0 && (t = 0), n === void 0 && (n = this.length);
307
+ m.prototype.map = function(e, t, i) {
308
+ t === void 0 && (t = 0), i === void 0 && (i = this.length);
309
309
  var r = [];
310
310
  return this.forEach(function(o, s) {
311
311
  return r.push(e(o, s));
312
- }, t, n), r;
312
+ }, t, i), r;
313
313
  };
314
314
  m.from = function(e) {
315
- return e instanceof m ? e : e && e.length ? new Z(e) : m.empty;
315
+ return e instanceof m ? e : e && e.length ? new Q(e) : m.empty;
316
316
  };
317
- var Z = /* @__PURE__ */ (function(i) {
318
- function e(n) {
319
- i.call(this), this.values = n;
317
+ var Q = /* @__PURE__ */ (function(n) {
318
+ function e(i) {
319
+ n.call(this), this.values = i;
320
320
  }
321
- i && (e.__proto__ = i), e.prototype = Object.create(i && i.prototype), e.prototype.constructor = e;
321
+ n && (e.__proto__ = n), e.prototype = Object.create(n && n.prototype), e.prototype.constructor = e;
322
322
  var t = { length: { configurable: !0 }, depth: { configurable: !0 } };
323
323
  return e.prototype.flatten = function() {
324
324
  return this.values;
@@ -346,41 +346,41 @@ var Z = /* @__PURE__ */ (function(i) {
346
346
  return 0;
347
347
  }, Object.defineProperties(e.prototype, t), e;
348
348
  })(m);
349
- m.empty = new Z([]);
350
- var Ce = /* @__PURE__ */ (function(i) {
351
- function e(t, n) {
352
- i.call(this), this.left = t, this.right = n, this.length = t.length + n.length, this.depth = Math.max(t.depth, n.depth) + 1;
349
+ m.empty = new Q([]);
350
+ var Ee = /* @__PURE__ */ (function(n) {
351
+ function e(t, i) {
352
+ n.call(this), this.left = t, this.right = i, this.length = t.length + i.length, this.depth = Math.max(t.depth, i.depth) + 1;
353
353
  }
354
- return i && (e.__proto__ = i), e.prototype = Object.create(i && i.prototype), e.prototype.constructor = e, e.prototype.flatten = function() {
354
+ return n && (e.__proto__ = n), e.prototype = Object.create(n && n.prototype), e.prototype.constructor = e, e.prototype.flatten = function() {
355
355
  return this.left.flatten().concat(this.right.flatten());
356
- }, e.prototype.getInner = function(n) {
357
- return n < this.left.length ? this.left.get(n) : this.right.get(n - this.left.length);
358
- }, e.prototype.forEachInner = function(n, r, o, s) {
356
+ }, e.prototype.getInner = function(i) {
357
+ return i < this.left.length ? this.left.get(i) : this.right.get(i - this.left.length);
358
+ }, e.prototype.forEachInner = function(i, r, o, s) {
359
359
  var l = this.left.length;
360
- if (r < l && this.left.forEachInner(n, r, Math.min(o, l), s) === !1 || o > l && this.right.forEachInner(n, Math.max(r - l, 0), Math.min(this.length, o) - l, s + l) === !1)
360
+ if (r < l && this.left.forEachInner(i, r, Math.min(o, l), s) === !1 || o > l && this.right.forEachInner(i, Math.max(r - l, 0), Math.min(this.length, o) - l, s + l) === !1)
361
361
  return !1;
362
- }, e.prototype.forEachInvertedInner = function(n, r, o, s) {
362
+ }, e.prototype.forEachInvertedInner = function(i, r, o, s) {
363
363
  var l = this.left.length;
364
- if (r > l && this.right.forEachInvertedInner(n, r - l, Math.max(o, l) - l, s + l) === !1 || o < l && this.left.forEachInvertedInner(n, Math.min(r, l), o, s) === !1)
364
+ if (r > l && this.right.forEachInvertedInner(i, r - l, Math.max(o, l) - l, s + l) === !1 || o < l && this.left.forEachInvertedInner(i, Math.min(r, l), o, s) === !1)
365
365
  return !1;
366
- }, e.prototype.sliceInner = function(n, r) {
367
- if (n == 0 && r == this.length)
366
+ }, e.prototype.sliceInner = function(i, r) {
367
+ if (i == 0 && r == this.length)
368
368
  return this;
369
369
  var o = this.left.length;
370
- return r <= o ? this.left.slice(n, r) : n >= o ? this.right.slice(n - o, r - o) : this.left.slice(n, o).append(this.right.slice(0, r - o));
371
- }, e.prototype.leafAppend = function(n) {
372
- var r = this.right.leafAppend(n);
370
+ return r <= o ? this.left.slice(i, r) : i >= o ? this.right.slice(i - o, r - o) : this.left.slice(i, o).append(this.right.slice(0, r - o));
371
+ }, e.prototype.leafAppend = function(i) {
372
+ var r = this.right.leafAppend(i);
373
373
  if (r)
374
374
  return new e(this.left, r);
375
- }, e.prototype.leafPrepend = function(n) {
376
- var r = this.left.leafPrepend(n);
375
+ }, e.prototype.leafPrepend = function(i) {
376
+ var r = this.left.leafPrepend(i);
377
377
  if (r)
378
378
  return new e(r, this.right);
379
- }, e.prototype.appendInner = function(n) {
380
- return this.left.depth >= Math.max(this.right.depth, n.depth) + 1 ? new e(this.left, new e(this.right, n)) : new e(this, n);
379
+ }, e.prototype.appendInner = function(i) {
380
+ return this.left.depth >= Math.max(this.right.depth, i.depth) + 1 ? new e(this.left, new e(this.right, i)) : new e(this, i);
381
381
  }, e;
382
382
  })(m);
383
- const Ee = 500;
383
+ const be = 500;
384
384
  class v {
385
385
  constructor(e, t) {
386
386
  this.items = e, this.eventCount = t;
@@ -390,46 +390,46 @@ class v {
390
390
  popEvent(e, t) {
391
391
  if (this.eventCount == 0)
392
392
  return null;
393
- let n = this.items.length;
394
- for (; ; n--)
395
- if (this.items.get(n - 1).selection) {
396
- --n;
393
+ let i = this.items.length;
394
+ for (; ; i--)
395
+ if (this.items.get(i - 1).selection) {
396
+ --i;
397
397
  break;
398
398
  }
399
399
  let r, o;
400
- t && (r = this.remapping(n, this.items.length), o = r.maps.length);
400
+ t && (r = this.remapping(i, this.items.length), o = r.maps.length);
401
401
  let s = e.tr, l, a, d = [], u = [];
402
402
  return this.items.forEach((c, p) => {
403
403
  if (!c.step) {
404
- r || (r = this.remapping(n, p + 1), o = r.maps.length), o--, u.push(c);
404
+ r || (r = this.remapping(i, p + 1), o = r.maps.length), o--, u.push(c);
405
405
  return;
406
406
  }
407
407
  if (r) {
408
408
  u.push(new w(c.map));
409
- let h = c.step.map(r.slice(o)), g;
410
- h && s.maybeStep(h).doc && (g = s.mapping.maps[s.mapping.maps.length - 1], d.push(new w(g, void 0, void 0, d.length + u.length))), o--, g && r.appendMap(g, o);
409
+ let f = c.step.map(r.slice(o)), g;
410
+ f && s.maybeStep(f).doc && (g = s.mapping.maps[s.mapping.maps.length - 1], d.push(new w(g, void 0, void 0, d.length + u.length))), o--, g && r.appendMap(g, o);
411
411
  } else
412
412
  s.maybeStep(c.step);
413
413
  if (c.selection)
414
- return l = r ? c.selection.map(r.slice(o)) : c.selection, a = new v(this.items.slice(0, n).append(u.reverse().concat(d)), this.eventCount - 1), !1;
414
+ return l = r ? c.selection.map(r.slice(o)) : c.selection, a = new v(this.items.slice(0, i).append(u.reverse().concat(d)), this.eventCount - 1), !1;
415
415
  }, this.items.length, 0), { remaining: a, transform: s, selection: l };
416
416
  }
417
417
  // Create a new branch with the given transform added.
418
- addTransform(e, t, n, r) {
418
+ addTransform(e, t, i, r) {
419
419
  let o = [], s = this.eventCount, l = this.items, a = !r && l.length ? l.get(l.length - 1) : null;
420
420
  for (let u = 0; u < e.steps.length; u++) {
421
- let c = e.steps[u].invert(e.docs[u]), p = new w(e.mapping.maps[u], c, t), h;
422
- (h = a && a.merge(p)) && (p = h, u ? o.pop() : l = l.slice(0, l.length - 1)), o.push(p), t && (s++, t = void 0), r || (a = p);
421
+ let c = e.steps[u].invert(e.docs[u]), p = new w(e.mapping.maps[u], c, t), f;
422
+ (f = a && a.merge(p)) && (p = f, u ? o.pop() : l = l.slice(0, l.length - 1)), o.push(p), t && (s++, t = void 0), r || (a = p);
423
423
  }
424
- let d = s - n.depth;
425
- return d > Pe && (l = Me(l, d), s -= d), new v(l.append(o), s);
424
+ let d = s - i.depth;
425
+ return d > Ae && (l = Pe(l, d), s -= d), new v(l.append(o), s);
426
426
  }
427
427
  remapping(e, t) {
428
- let n = new ne();
428
+ let i = new re();
429
429
  return this.items.forEach((r, o) => {
430
- let s = r.mirrorOffset != null && o - r.mirrorOffset >= e ? n.maps.length - r.mirrorOffset : void 0;
431
- n.appendMap(r.map, s);
432
- }, e, t), n;
430
+ let s = r.mirrorOffset != null && o - r.mirrorOffset >= e ? i.maps.length - r.mirrorOffset : void 0;
431
+ i.appendMap(r.map, s);
432
+ }, e, t), i;
433
433
  }
434
434
  addMaps(e) {
435
435
  return this.eventCount == 0 ? this : new v(this.items.append(e.map((t) => new w(t))), this.eventCount);
@@ -441,28 +441,28 @@ class v {
441
441
  rebased(e, t) {
442
442
  if (!this.eventCount)
443
443
  return this;
444
- let n = [], r = Math.max(0, this.items.length - t), o = e.mapping, s = e.steps.length, l = this.eventCount;
444
+ let i = [], r = Math.max(0, this.items.length - t), o = e.mapping, s = e.steps.length, l = this.eventCount;
445
445
  this.items.forEach((p) => {
446
446
  p.selection && l--;
447
447
  }, r);
448
448
  let a = t;
449
449
  this.items.forEach((p) => {
450
- let h = o.getMirror(--a);
451
- if (h == null)
450
+ let f = o.getMirror(--a);
451
+ if (f == null)
452
452
  return;
453
- s = Math.min(s, h);
454
- let g = o.maps[h];
453
+ s = Math.min(s, f);
454
+ let g = o.maps[f];
455
455
  if (p.step) {
456
- let M = e.steps[h].invert(e.docs[h]), P = p.selection && p.selection.map(o.slice(a + 1, h));
457
- P && l++, n.push(new w(g, M, P));
456
+ let b = e.steps[f].invert(e.docs[f]), P = p.selection && p.selection.map(o.slice(a + 1, f));
457
+ P && l++, i.push(new w(g, b, P));
458
458
  } else
459
- n.push(new w(g));
459
+ i.push(new w(g));
460
460
  }, r);
461
461
  let d = [];
462
462
  for (let p = t; p < s; p++)
463
463
  d.push(new w(o.maps[p]));
464
- let u = this.items.slice(0, r).append(d).append(n), c = new v(u, l);
465
- return c.emptyItemCount() > Ee && (c = c.compress(this.items.length - n.length)), c;
464
+ let u = this.items.slice(0, r).append(d).append(i), c = new v(u, l);
465
+ return c.emptyItemCount() > be && (c = c.compress(this.items.length - i.length)), c;
466
466
  }
467
467
  emptyItemCount() {
468
468
  let e = 0;
@@ -477,33 +477,33 @@ class v {
477
477
  // because `rebased` relies on a clean, untouched set of items in
478
478
  // order to associate old items with rebased steps.
479
479
  compress(e = this.items.length) {
480
- let t = this.remapping(0, e), n = t.maps.length, r = [], o = 0;
480
+ let t = this.remapping(0, e), i = t.maps.length, r = [], o = 0;
481
481
  return this.items.forEach((s, l) => {
482
482
  if (l >= e)
483
483
  r.push(s), s.selection && o++;
484
484
  else if (s.step) {
485
- let a = s.step.map(t.slice(n)), d = a && a.getMap();
486
- if (n--, d && t.appendMap(d, n), a) {
487
- let u = s.selection && s.selection.map(t.slice(n));
485
+ let a = s.step.map(t.slice(i)), d = a && a.getMap();
486
+ if (i--, d && t.appendMap(d, i), a) {
487
+ let u = s.selection && s.selection.map(t.slice(i));
488
488
  u && o++;
489
- let c = new w(d.invert(), a, u), p, h = r.length - 1;
490
- (p = r.length && r[h].merge(c)) ? r[h] = p : r.push(c);
489
+ let c = new w(d.invert(), a, u), p, f = r.length - 1;
490
+ (p = r.length && r[f].merge(c)) ? r[f] = p : r.push(c);
491
491
  }
492
- } else s.map && n--;
492
+ } else s.map && i--;
493
493
  }, this.items.length, 0), new v(m.from(r.reverse()), o);
494
494
  }
495
495
  }
496
496
  v.empty = new v(m.empty, 0);
497
- function Me(i, e) {
497
+ function Pe(n, e) {
498
498
  let t;
499
- return i.forEach((n, r) => {
500
- if (n.selection && e-- == 0)
499
+ return n.forEach((i, r) => {
500
+ if (i.selection && e-- == 0)
501
501
  return t = r, !1;
502
- }), i.slice(t);
502
+ }), n.slice(t);
503
503
  }
504
504
  class w {
505
- constructor(e, t, n, r) {
506
- this.map = e, this.step = t, this.selection = n, this.mirrorOffset = r;
505
+ constructor(e, t, i, r) {
506
+ this.map = e, this.step = t, this.selection = i, this.mirrorOffset = r;
507
507
  }
508
508
  merge(e) {
509
509
  if (this.step && e.step && !e.selection) {
@@ -514,63 +514,63 @@ class w {
514
514
  }
515
515
  }
516
516
  class y {
517
- constructor(e, t, n, r, o) {
518
- this.done = e, this.undone = t, this.prevRanges = n, this.prevTime = r, this.prevComposition = o;
517
+ constructor(e, t, i, r, o) {
518
+ this.done = e, this.undone = t, this.prevRanges = i, this.prevTime = r, this.prevComposition = o;
519
519
  }
520
520
  }
521
- const Pe = 20;
522
- function Ie(i, e, t, n) {
521
+ const Ae = 20;
522
+ function Ie(n, e, t, i) {
523
523
  let r = t.getMeta(E), o;
524
524
  if (r)
525
525
  return r.historyState;
526
- t.getMeta(Se) && (i = new y(i.done, i.undone, null, 0, -1));
526
+ t.getMeta(Te) && (n = new y(n.done, n.undone, null, 0, -1));
527
527
  let s = t.getMeta("appendedTransaction");
528
528
  if (t.steps.length == 0)
529
- return i;
529
+ return n;
530
530
  if (s && s.getMeta(E))
531
- return s.getMeta(E).redo ? new y(i.done.addTransform(t, void 0, n, S(e)), i.undone, L(t.mapping.maps), i.prevTime, i.prevComposition) : new y(i.done, i.undone.addTransform(t, void 0, n, S(e)), null, i.prevTime, i.prevComposition);
531
+ return s.getMeta(E).redo ? new y(n.done.addTransform(t, void 0, i, x(e)), n.undone, V(t.mapping.maps), n.prevTime, n.prevComposition) : new y(n.done, n.undone.addTransform(t, void 0, i, x(e)), null, n.prevTime, n.prevComposition);
532
532
  if (t.getMeta("addToHistory") !== !1 && !(s && s.getMeta("addToHistory") === !1)) {
533
- let l = t.getMeta("composition"), a = i.prevTime == 0 || !s && i.prevComposition != l && (i.prevTime < (t.time || 0) - n.newGroupDelay || !be(t, i.prevRanges)), d = s ? k(i.prevRanges, t.mapping) : L(t.mapping.maps);
534
- return new y(i.done.addTransform(t, a ? e.selection.getBookmark() : void 0, n, S(e)), v.empty, d, t.time, l ?? i.prevComposition);
535
- } else return (o = t.getMeta("rebased")) ? new y(i.done.rebased(t, o), i.undone.rebased(t, o), k(i.prevRanges, t.mapping), i.prevTime, i.prevComposition) : new y(i.done.addMaps(t.mapping.maps), i.undone.addMaps(t.mapping.maps), k(i.prevRanges, t.mapping), i.prevTime, i.prevComposition);
533
+ let l = t.getMeta("composition"), a = n.prevTime == 0 || !s && n.prevComposition != l && (n.prevTime < (t.time || 0) - i.newGroupDelay || !Me(t, n.prevRanges)), d = s ? k(n.prevRanges, t.mapping) : V(t.mapping.maps);
534
+ return new y(n.done.addTransform(t, a ? e.selection.getBookmark() : void 0, i, x(e)), v.empty, d, t.time, l ?? n.prevComposition);
535
+ } else return (o = t.getMeta("rebased")) ? new y(n.done.rebased(t, o), n.undone.rebased(t, o), k(n.prevRanges, t.mapping), n.prevTime, n.prevComposition) : new y(n.done.addMaps(t.mapping.maps), n.undone.addMaps(t.mapping.maps), k(n.prevRanges, t.mapping), n.prevTime, n.prevComposition);
536
536
  }
537
- function be(i, e) {
537
+ function Me(n, e) {
538
538
  if (!e)
539
539
  return !1;
540
- if (!i.docChanged)
540
+ if (!n.docChanged)
541
541
  return !0;
542
542
  let t = !1;
543
- return i.mapping.maps[0].forEach((n, r) => {
543
+ return n.mapping.maps[0].forEach((i, r) => {
544
544
  for (let o = 0; o < e.length; o += 2)
545
- n <= e[o + 1] && r >= e[o] && (t = !0);
545
+ i <= e[o + 1] && r >= e[o] && (t = !0);
546
546
  }), t;
547
547
  }
548
- function L(i) {
548
+ function V(n) {
549
549
  let e = [];
550
- for (let t = i.length - 1; t >= 0 && e.length == 0; t--)
551
- i[t].forEach((n, r, o, s) => e.push(o, s));
550
+ for (let t = n.length - 1; t >= 0 && e.length == 0; t--)
551
+ n[t].forEach((i, r, o, s) => e.push(o, s));
552
552
  return e;
553
553
  }
554
- function k(i, e) {
555
- if (!i)
554
+ function k(n, e) {
555
+ if (!n)
556
556
  return null;
557
557
  let t = [];
558
- for (let n = 0; n < i.length; n += 2) {
559
- let r = e.map(i[n], 1), o = e.map(i[n + 1], -1);
558
+ for (let i = 0; i < n.length; i += 2) {
559
+ let r = e.map(n[i], 1), o = e.map(n[i + 1], -1);
560
560
  r <= o && t.push(r, o);
561
561
  }
562
562
  return t;
563
563
  }
564
- function xe(i, e, t) {
565
- let n = S(e), r = E.get(e).spec.config, o = (t ? i.undone : i.done).popEvent(e, n);
564
+ function xe(n, e, t) {
565
+ let i = x(e), r = E.get(e).spec.config, o = (t ? n.undone : n.done).popEvent(e, i);
566
566
  if (!o)
567
567
  return null;
568
- let s = o.selection.resolve(o.transform.doc), l = (t ? i.done : i.undone).addTransform(o.transform, e.selection.getBookmark(), r, n), a = new y(t ? l : o.remaining, t ? o.remaining : l, null, 0, -1);
568
+ let s = o.selection.resolve(o.transform.doc), l = (t ? n.done : n.undone).addTransform(o.transform, e.selection.getBookmark(), r, i), a = new y(t ? l : o.remaining, t ? o.remaining : l, null, 0, -1);
569
569
  return o.transform.setSelection(s).setMeta(E, { redo: t, historyState: a });
570
570
  }
571
571
  let z = !1, B = null;
572
- function S(i) {
573
- let e = i.plugins;
572
+ function x(n) {
573
+ let e = n.plugins;
574
574
  if (B != e) {
575
575
  z = !1, B = e;
576
576
  for (let t = 0; t < e.length; t++)
@@ -581,53 +581,53 @@ function S(i) {
581
581
  }
582
582
  return z;
583
583
  }
584
- const E = new W("history"), Se = new W("closeHistory");
585
- function Ae(i = {}) {
586
- return i = {
587
- depth: i.depth || 100,
588
- newGroupDelay: i.newGroupDelay || 500
589
- }, new N({
584
+ const E = new W("history"), Te = new W("closeHistory");
585
+ function Se(n = {}) {
586
+ return n = {
587
+ depth: n.depth || 100,
588
+ newGroupDelay: n.newGroupDelay || 500
589
+ }, new R({
590
590
  key: E,
591
591
  state: {
592
592
  init() {
593
593
  return new y(v.empty, v.empty, null, 0, -1);
594
594
  },
595
- apply(e, t, n) {
596
- return Ie(t, n, e, i);
595
+ apply(e, t, i) {
596
+ return Ie(t, i, e, n);
597
597
  }
598
598
  },
599
- config: i,
599
+ config: n,
600
600
  props: {
601
601
  handleDOMEvents: {
602
602
  beforeinput(e, t) {
603
- let n = t.inputType, r = n == "historyUndo" ? q : n == "historyRedo" ? $ : null;
603
+ let i = t.inputType, r = i == "historyUndo" ? q : i == "historyRedo" ? ee : null;
604
604
  return !r || !e.editable ? !1 : (t.preventDefault(), r(e.state, e.dispatch));
605
605
  }
606
606
  }
607
607
  }
608
608
  });
609
609
  }
610
- function Q(i, e) {
611
- return (t, n) => {
610
+ function $(n, e) {
611
+ return (t, i) => {
612
612
  let r = E.getState(t);
613
- if (!r || (i ? r.undone : r.done).eventCount == 0)
613
+ if (!r || (n ? r.undone : r.done).eventCount == 0)
614
614
  return !1;
615
- if (n) {
616
- let o = xe(r, t, i);
617
- o && n(e ? o.scrollIntoView() : o);
615
+ if (i) {
616
+ let o = xe(r, t, n);
617
+ o && i(e ? o.scrollIntoView() : o);
618
618
  }
619
619
  return !0;
620
620
  };
621
621
  }
622
- const q = Q(!1, !0), $ = Q(!0, !0);
622
+ const q = $(!1, !0), ee = $(!0, !0);
623
623
  C.create({
624
624
  name: "characterCount",
625
625
  addOptions() {
626
626
  return {
627
627
  limit: null,
628
628
  mode: "textSize",
629
- textCounter: (i) => i.length,
630
- wordCounter: (i) => i.split(" ").filter((e) => e !== "").length
629
+ textCounter: (n) => n.length,
630
+ wordCounter: (n) => n.split(" ").filter((e) => e !== "").length
631
631
  };
632
632
  },
633
633
  addStorage() {
@@ -637,53 +637,53 @@ C.create({
637
637
  };
638
638
  },
639
639
  onBeforeCreate() {
640
- this.storage.characters = (i) => {
641
- const e = (i == null ? void 0 : i.node) || this.editor.state.doc;
642
- if (((i == null ? void 0 : i.mode) || this.options.mode) === "textSize") {
643
- const n = e.textBetween(0, e.content.size, void 0, " ");
644
- return this.options.textCounter(n);
640
+ this.storage.characters = (n) => {
641
+ const e = (n == null ? void 0 : n.node) || this.editor.state.doc;
642
+ if (((n == null ? void 0 : n.mode) || this.options.mode) === "textSize") {
643
+ const i = e.textBetween(0, e.content.size, void 0, " ");
644
+ return this.options.textCounter(i);
645
645
  }
646
646
  return e.nodeSize;
647
- }, this.storage.words = (i) => {
648
- const e = (i == null ? void 0 : i.node) || this.editor.state.doc, t = e.textBetween(0, e.content.size, " ", " ");
647
+ }, this.storage.words = (n) => {
648
+ const e = (n == null ? void 0 : n.node) || this.editor.state.doc, t = e.textBetween(0, e.content.size, " ", " ");
649
649
  return this.options.wordCounter(t);
650
650
  };
651
651
  },
652
652
  addProseMirrorPlugins() {
653
- let i = !1;
653
+ let n = !1;
654
654
  return [
655
- new I({
656
- key: new b("characterCount"),
657
- appendTransaction: (e, t, n) => {
658
- if (i)
655
+ new A({
656
+ key: new I("characterCount"),
657
+ appendTransaction: (e, t, i) => {
658
+ if (n)
659
659
  return;
660
660
  const r = this.options.limit;
661
661
  if (r == null || r === 0) {
662
- i = !0;
662
+ n = !0;
663
663
  return;
664
664
  }
665
- const o = this.storage.characters({ node: n.doc });
665
+ const o = this.storage.characters({ node: i.doc });
666
666
  if (o > r) {
667
667
  const s = o - r, l = 0, a = s;
668
668
  console.warn(
669
669
  `[CharacterCount] Initial content exceeded limit of ${r} characters. Content was automatically trimmed.`
670
670
  );
671
- const d = n.tr.deleteRange(l, a);
672
- return i = !0, d;
671
+ const d = i.tr.deleteRange(l, a);
672
+ return n = !0, d;
673
673
  }
674
- i = !0;
674
+ n = !0;
675
675
  },
676
676
  filterTransaction: (e, t) => {
677
- const n = this.options.limit;
678
- if (!e.docChanged || n === 0 || n === null || n === void 0)
677
+ const i = this.options.limit;
678
+ if (!e.docChanged || i === 0 || i === null || i === void 0)
679
679
  return !0;
680
680
  const r = this.storage.characters({ node: t.doc }), o = this.storage.characters({ node: e.doc });
681
- if (o <= n || r > n && o > n && o <= r)
681
+ if (o <= i || r > i && o > i && o <= r)
682
682
  return !0;
683
- if (r > n && o > n && o > r || !e.getMeta("paste"))
683
+ if (r > i && o > i && o > r || !e.getMeta("paste"))
684
684
  return !1;
685
- const l = e.selection.$head.pos, a = o - n, d = l - a, u = l;
686
- return e.deleteRange(d, u), !(this.storage.characters({ node: e.doc }) > n);
685
+ const l = e.selection.$head.pos, a = o - i, d = l - a, u = l;
686
+ return e.deleteRange(d, u), !(this.storage.characters({ node: e.doc }) > i);
687
687
  }
688
688
  })
689
689
  ];
@@ -699,7 +699,7 @@ C.create({
699
699
  };
700
700
  },
701
701
  addProseMirrorPlugins() {
702
- return [ue(this.options)];
702
+ return [pe(this.options)];
703
703
  }
704
704
  });
705
705
  C.create({
@@ -712,15 +712,15 @@ C.create({
712
712
  },
713
713
  addProseMirrorPlugins() {
714
714
  return [
715
- new I({
716
- key: new b("focus"),
715
+ new A({
716
+ key: new I("focus"),
717
717
  props: {
718
- decorations: ({ doc: i, selection: e }) => {
719
- const { isEditable: t, isFocused: n } = this.editor, { anchor: r } = e, o = [];
720
- if (!t || !n)
721
- return O.create(i, []);
718
+ decorations: ({ doc: n, selection: e }) => {
719
+ const { isEditable: t, isFocused: i } = this.editor, { anchor: r } = e, o = [];
720
+ if (!t || !i)
721
+ return S.create(n, []);
722
722
  let s = 0;
723
- this.options.mode === "deepest" && i.descendants((a, d) => {
723
+ this.options.mode === "deepest" && n.descendants((a, d) => {
724
724
  if (a.isText)
725
725
  return;
726
726
  if (!(r >= d && r <= d + a.nodeSize - 1))
@@ -728,17 +728,17 @@ C.create({
728
728
  s += 1;
729
729
  });
730
730
  let l = 0;
731
- return i.descendants((a, d) => {
731
+ return n.descendants((a, d) => {
732
732
  if (a.isText || !(r >= d && r <= d + a.nodeSize - 1))
733
733
  return !1;
734
734
  if (l += 1, this.options.mode === "deepest" && s - l > 0 || this.options.mode === "shallowest" && l > 1)
735
735
  return this.options.mode === "deepest";
736
736
  o.push(
737
- R.node(d, d + a.nodeSize, {
737
+ N.node(d, d + a.nodeSize, {
738
738
  class: this.options.className
739
739
  })
740
740
  );
741
- }), O.create(i, o);
741
+ }), S.create(n, o);
742
742
  }
743
743
  }
744
744
  })
@@ -748,26 +748,31 @@ C.create({
748
748
  C.create({
749
749
  name: "gapCursor",
750
750
  addProseMirrorPlugins() {
751
- return [me()];
751
+ return [ge()];
752
752
  },
753
- extendNodeSchema(i) {
753
+ extendNodeSchema(n) {
754
754
  var e;
755
755
  const t = {
756
- name: i.name,
757
- options: i.options,
758
- storage: i.storage
756
+ name: n.name,
757
+ options: n.options,
758
+ storage: n.storage
759
759
  };
760
760
  return {
761
- allowGapCursor: (e = re(ie(i, "allowGapCursor", t))) != null ? e : null
761
+ allowGapCursor: (e = ie(oe(n, "allowGapCursor", t))) != null ? e : null
762
762
  };
763
763
  }
764
764
  });
765
+ var K = "placeholder";
766
+ function Oe(n) {
767
+ return n.replace(/\s+/g, "-").replace(/[^a-zA-Z0-9-]/g, "").replace(/^[0-9-]+/, "").replace(/^-+/, "").toLowerCase();
768
+ }
765
769
  C.create({
766
770
  name: "placeholder",
767
771
  addOptions() {
768
772
  return {
769
773
  emptyEditorClass: "is-editor-empty",
770
774
  emptyNodeClass: "is-empty",
775
+ dataAttribute: K,
771
776
  placeholder: "Write something …",
772
777
  showOnlyWhenEditable: !0,
773
778
  showOnlyCurrent: !0,
@@ -775,33 +780,36 @@ C.create({
775
780
  };
776
781
  },
777
782
  addProseMirrorPlugins() {
783
+ const n = this.options.dataAttribute ? `data-${Oe(this.options.dataAttribute)}` : `data-${K}`;
778
784
  return [
779
- new I({
780
- key: new b("placeholder"),
785
+ new A({
786
+ key: new I("placeholder"),
781
787
  props: {
782
- decorations: ({ doc: i, selection: e }) => {
783
- const t = this.editor.isEditable || !this.options.showOnlyWhenEditable, { anchor: n } = e, r = [];
784
- if (!t)
788
+ decorations: ({ doc: e, selection: t }) => {
789
+ const i = this.editor.isEditable || !this.options.showOnlyWhenEditable, { anchor: r } = t, o = [];
790
+ if (!i)
785
791
  return null;
786
- const o = this.editor.isEmpty;
787
- return i.descendants((s, l) => {
788
- const a = n >= l && n <= l + s.nodeSize, d = !s.isLeaf && oe(s);
789
- if ((a || !this.options.showOnlyCurrent) && d) {
790
- const u = [this.options.emptyNodeClass];
791
- o && u.push(this.options.emptyEditorClass);
792
- const c = R.node(l, l + s.nodeSize, {
793
- class: u.join(" "),
794
- "data-placeholder": typeof this.options.placeholder == "function" ? this.options.placeholder({
792
+ const s = this.editor.isEmpty;
793
+ return e.descendants((l, a) => {
794
+ const d = r >= a && r <= a + l.nodeSize, u = !l.isLeaf && se(l);
795
+ if (!l.type.isTextblock)
796
+ return this.options.includeChildren;
797
+ if ((d || !this.options.showOnlyCurrent) && u) {
798
+ const c = [this.options.emptyNodeClass];
799
+ s && c.push(this.options.emptyEditorClass);
800
+ const p = N.node(a, a + l.nodeSize, {
801
+ class: c.join(" "),
802
+ [n]: typeof this.options.placeholder == "function" ? this.options.placeholder({
795
803
  editor: this.editor,
796
- node: s,
797
- pos: l,
798
- hasAnchor: a
804
+ node: l,
805
+ pos: a,
806
+ hasAnchor: d
799
807
  }) : this.options.placeholder
800
808
  });
801
- r.push(c);
809
+ o.push(p);
802
810
  }
803
811
  return this.options.includeChildren;
804
- }), O.create(i, r);
812
+ }), S.create(e, o);
805
813
  }
806
814
  }
807
815
  })
@@ -816,14 +824,14 @@ C.create({
816
824
  };
817
825
  },
818
826
  addProseMirrorPlugins() {
819
- const { editor: i, options: e } = this;
827
+ const { editor: n, options: e } = this;
820
828
  return [
821
- new I({
822
- key: new b("selection"),
829
+ new A({
830
+ key: new I("selection"),
823
831
  props: {
824
832
  decorations(t) {
825
- return t.selection.empty || i.isFocused || !i.isEditable || se(t.selection) || i.view.dragging ? null : O.create(t.doc, [
826
- R.inline(t.selection.from, t.selection.to, {
833
+ return t.selection.empty || n.isFocused || !n.isEditable || le(t.selection) || n.view.dragging ? null : S.create(t.doc, [
834
+ N.inline(t.selection.from, t.selection.to, {
827
835
  class: e.className
828
836
  })
829
837
  ]);
@@ -833,8 +841,8 @@ C.create({
833
841
  ];
834
842
  }
835
843
  });
836
- function K({ types: i, node: e }) {
837
- return e && Array.isArray(i) && i.includes(e.type) || (e == null ? void 0 : e.type) === i;
844
+ function _({ types: n, node: e }) {
845
+ return e && Array.isArray(n) && n.includes(e.type) || (e == null ? void 0 : e.type) === n;
838
846
  }
839
847
  C.create({
840
848
  name: "trailingNode",
@@ -845,10 +853,10 @@ C.create({
845
853
  };
846
854
  },
847
855
  addProseMirrorPlugins() {
848
- var i;
849
- const e = new b(this.name), t = this.options.node || ((i = this.editor.schema.topNodeType.contentMatch.defaultType) == null ? void 0 : i.name) || "paragraph", n = Object.entries(this.editor.schema.nodes).map(([, r]) => r).filter((r) => (this.options.notAfter || []).concat(t).includes(r.name));
856
+ var n;
857
+ const e = new I(this.name), t = this.options.node || ((n = this.editor.schema.topNodeType.contentMatch.defaultType) == null ? void 0 : n.name) || "paragraph", i = Object.entries(this.editor.schema.nodes).map(([, r]) => r).filter((r) => (this.options.notAfter || []).concat(t).includes(r.name));
850
858
  return [
851
- new I({
859
+ new A({
852
860
  key: e,
853
861
  appendTransaction: (r, o, s) => {
854
862
  const { doc: l, tr: a, schema: d } = s, u = e.getState(s), c = l.content.size, p = d.nodes[t];
@@ -858,20 +866,20 @@ C.create({
858
866
  state: {
859
867
  init: (r, o) => {
860
868
  const s = o.tr.doc.lastChild;
861
- return !K({ node: s, types: n });
869
+ return !_({ node: s, types: i });
862
870
  },
863
871
  apply: (r, o) => {
864
872
  if (!r.docChanged || r.getMeta("__uniqueIDTransaction"))
865
873
  return o;
866
874
  const s = r.doc.lastChild;
867
- return !K({ node: s, types: n });
875
+ return !_({ node: s, types: i });
868
876
  }
869
877
  }
870
878
  })
871
879
  ];
872
880
  }
873
881
  });
874
- var Oe = C.create({
882
+ var De = C.create({
875
883
  name: "undoRedo",
876
884
  addOptions() {
877
885
  return {
@@ -881,12 +889,12 @@ var Oe = C.create({
881
889
  },
882
890
  addCommands() {
883
891
  return {
884
- undo: () => ({ state: i, dispatch: e }) => q(i, e),
885
- redo: () => ({ state: i, dispatch: e }) => $(i, e)
892
+ undo: () => ({ state: n, dispatch: e }) => q(n, e),
893
+ redo: () => ({ state: n, dispatch: e }) => ee(n, e)
886
894
  };
887
895
  },
888
896
  addProseMirrorPlugins() {
889
- return [Ae(this.options)];
897
+ return [Se(this.options)];
890
898
  },
891
899
  addKeyboardShortcuts() {
892
900
  return {
@@ -899,64 +907,63 @@ var Oe = C.create({
899
907
  };
900
908
  }
901
909
  });
902
- function Le() {
910
+ function Ke() {
903
911
  var u;
904
- const i = U(ee.name), {
912
+ const n = X(te.name), {
905
913
  icon: e = void 0,
906
914
  tooltip: t = void 0,
907
- shortcutKeys: n = void 0,
915
+ shortcutKeys: i = void 0,
908
916
  tooltipOptions: r = {},
909
917
  action: o = void 0,
910
918
  isActive: s = void 0
911
- } = ((u = i == null ? void 0 : i.componentProps) == null ? void 0 : u.undo) ?? {}, { disabled: l } = X(s), a = ce[e], d = () => {
919
+ } = ((u = n == null ? void 0 : n.componentProps) == null ? void 0 : u.undo) ?? {}, { disabled: l } = Y(s), a = ue[e], d = () => {
912
920
  l || o && o();
913
921
  };
914
- return !i || !a ? /* @__PURE__ */ T(j, {}) : /* @__PURE__ */ T(
915
- Y,
922
+ return !n || !a ? /* @__PURE__ */ O(j, {}) : /* @__PURE__ */ O(
923
+ Z,
916
924
  {
917
925
  action: d,
918
926
  disabled: l,
919
927
  icon: e,
920
- shortcutKeys: n,
928
+ shortcutKeys: i,
921
929
  tooltip: t,
922
930
  tooltipOptions: r
923
931
  }
924
932
  );
925
933
  }
926
- function Be() {
934
+ function _e() {
927
935
  var d;
928
- const i = U(ee.name), {
936
+ const n = X(te.name), {
929
937
  icon: e = void 0,
930
938
  tooltip: t = void 0,
931
- shortcutKeys: n = void 0,
939
+ shortcutKeys: i = void 0,
932
940
  tooltipOptions: r = {},
933
941
  action: o = void 0,
934
942
  isActive: s = void 0
935
- } = ((d = i == null ? void 0 : i.componentProps) == null ? void 0 : d.redo) ?? {}, { disabled: l } = X(s), a = () => {
943
+ } = ((d = n == null ? void 0 : n.componentProps) == null ? void 0 : d.redo) ?? {}, { disabled: l } = Y(s), a = () => {
936
944
  l || o && o();
937
945
  };
938
- return i ? /* @__PURE__ */ T(
939
- Y,
946
+ return n ? /* @__PURE__ */ O(
947
+ Z,
940
948
  {
941
949
  action: a,
942
950
  disabled: l,
943
951
  icon: e,
944
- shortcutKeys: n,
952
+ shortcutKeys: i,
945
953
  tooltip: t,
946
954
  tooltipOptions: r
947
955
  }
948
- ) : /* @__PURE__ */ T(j, {});
956
+ ) : /* @__PURE__ */ O(j, {});
949
957
  }
950
- const ee = /* @__PURE__ */ Oe.extend({
951
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
958
+ const te = /* @__PURE__ */ De.extend({
952
959
  //@ts-expect-error
953
960
  addOptions() {
954
- var i;
961
+ var n;
955
962
  return {
956
- ...(i = this.parent) == null ? void 0 : i.call(this),
963
+ ...(n = this.parent) == null ? void 0 : n.call(this),
957
964
  depth: 100,
958
965
  newGroupDelay: 500,
959
- button: ({ editor: e, t, extension: n }) => {
966
+ button: ({ editor: e, t, extension: i }) => {
960
967
  var r, o;
961
968
  return {
962
969
  componentProps: {
@@ -964,7 +971,7 @@ const ee = /* @__PURE__ */ Oe.extend({
964
971
  action: () => {
965
972
  e.chain().focus().undo().run();
966
973
  },
967
- shortcutKeys: ((r = n.options.shortcutKeys) == null ? void 0 : r[0]) ?? ["mod", "Z"],
974
+ shortcutKeys: ((r = i.options.shortcutKeys) == null ? void 0 : r[0]) ?? ["mod", "Z"],
968
975
  isActive: () => e.can().undo(),
969
976
  icon: "Undo2",
970
977
  tooltip: t("editor.undo.tooltip")
@@ -973,7 +980,7 @@ const ee = /* @__PURE__ */ Oe.extend({
973
980
  action: () => {
974
981
  e.chain().focus().redo().run();
975
982
  },
976
- shortcutKeys: ((o = n.options.shortcutKeys) == null ? void 0 : o[1]) ?? ["shift", "mod", "Z"],
983
+ shortcutKeys: ((o = i.options.shortcutKeys) == null ? void 0 : o[1]) ?? ["shift", "mod", "Z"],
977
984
  isActive: () => e.can().redo(),
978
985
  icon: "Redo2",
979
986
  tooltip: t("editor.redo.tooltip")
@@ -985,7 +992,7 @@ const ee = /* @__PURE__ */ Oe.extend({
985
992
  }
986
993
  });
987
994
  export {
988
- ee as History,
989
- Be as RichTextRedo,
990
- Le as RichTextUndo
995
+ te as History,
996
+ _e as RichTextRedo,
997
+ Ke as RichTextUndo
991
998
  };