reactjs-tiptap-editor 0.3.31 → 0.4.1

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 (275) hide show
  1. package/README.md +8 -2
  2. package/lib/{ActionMenuButton-BCgqJsST.cjs → ActionMenuButton-CYdM1xx5.cjs} +1 -1
  3. package/lib/{ActionMenuButton-D97K0UWT.js → ActionMenuButton-DKRF6oa0.js} +1 -1
  4. package/lib/Attachment.cjs +2 -2
  5. package/lib/Attachment.d.cts +25 -29
  6. package/lib/Attachment.d.ts +25 -29
  7. package/lib/Attachment.js +7 -6
  8. package/lib/BaseKit.cjs +3 -0
  9. package/lib/BaseKit.d.cts +481 -0
  10. package/lib/BaseKit.d.ts +481 -0
  11. package/lib/BaseKit.js +132 -0
  12. package/lib/Blockquote.cjs +5 -1
  13. package/lib/Blockquote.d.cts +25 -29
  14. package/lib/Blockquote.d.ts +25 -29
  15. package/lib/Blockquote.js +33 -17
  16. package/lib/Bold.cjs +1 -1
  17. package/lib/Bold.d.cts +25 -29
  18. package/lib/Bold.d.ts +25 -29
  19. package/lib/Bold.js +23 -16
  20. package/lib/BulletList.cjs +1 -1
  21. package/lib/BulletList.d.cts +26 -30
  22. package/lib/BulletList.d.ts +26 -30
  23. package/lib/BulletList.js +11 -57
  24. package/lib/Clear.cjs +1 -1
  25. package/lib/Clear.d.cts +25 -29
  26. package/lib/Clear.d.ts +25 -29
  27. package/lib/Clear.js +4 -2
  28. package/lib/Code.cjs +1 -1
  29. package/lib/Code.d.cts +25 -29
  30. package/lib/Code.d.ts +25 -29
  31. package/lib/Code.js +29 -25
  32. package/lib/CodeBlock.cjs +2 -2
  33. package/lib/CodeBlock.d.cts +25 -29
  34. package/lib/CodeBlock.d.ts +25 -29
  35. package/lib/CodeBlock.js +3 -3
  36. package/lib/CodeView.cjs +1 -1
  37. package/lib/CodeView.d.cts +25 -29
  38. package/lib/CodeView.d.ts +25 -29
  39. package/lib/CodeView.js +3 -2
  40. package/lib/Color.cjs +1 -1
  41. package/lib/Color.d.cts +26 -30
  42. package/lib/Color.d.ts +26 -30
  43. package/lib/Color.js +42 -74
  44. package/lib/Document.cjs +1 -1
  45. package/lib/Document.d.cts +25 -29
  46. package/lib/Document.d.ts +25 -29
  47. package/lib/Document.js +4 -8
  48. package/lib/{Drawer-BHkje8ys.js → Drawer-CaAfmqNo.js} +37 -35
  49. package/lib/{Drawer-5Q_-WRhc.cjs → Drawer-CdvCMSzN.cjs} +1 -1
  50. package/lib/Drawer.cjs +1 -1
  51. package/lib/Drawer.d.cts +25 -29
  52. package/lib/Drawer.d.ts +25 -29
  53. package/lib/Drawer.js +4 -4
  54. package/lib/Emoji.cjs +1 -1
  55. package/lib/Emoji.d.cts +28 -30
  56. package/lib/Emoji.d.ts +28 -30
  57. package/lib/Emoji.js +19795 -184
  58. package/lib/{Excalidraw-GUVW-IqC.cjs → Excalidraw-BbMQhNvs.cjs} +1 -1
  59. package/lib/{Excalidraw-CG498239.js → Excalidraw-CVWz2Vyn.js} +20 -20
  60. package/lib/Excalidraw.cjs +1 -1
  61. package/lib/Excalidraw.d.cts +25 -29
  62. package/lib/Excalidraw.d.ts +25 -29
  63. package/lib/Excalidraw.js +3 -3
  64. package/lib/ExportPdf.cjs +1 -1
  65. package/lib/ExportPdf.d.cts +25 -29
  66. package/lib/ExportPdf.d.ts +25 -29
  67. package/lib/ExportPdf.js +4 -2
  68. package/lib/ExportWord.cjs +1 -1
  69. package/lib/ExportWord.d.cts +25 -29
  70. package/lib/ExportWord.d.ts +25 -29
  71. package/lib/ExportWord.js +22 -51
  72. package/lib/FontFamily.cjs +1 -1
  73. package/lib/FontFamily.d.cts +26 -30
  74. package/lib/FontFamily.d.ts +26 -30
  75. package/lib/FontFamily.js +44 -73
  76. package/lib/FontSize.cjs +1 -1
  77. package/lib/FontSize.d.cts +25 -29
  78. package/lib/FontSize.d.ts +25 -29
  79. package/lib/FontSize.js +7 -5
  80. package/lib/FormatPainter.cjs +1 -1
  81. package/lib/FormatPainter.d.cts +25 -29
  82. package/lib/FormatPainter.d.ts +25 -29
  83. package/lib/FormatPainter.js +4 -2
  84. package/lib/Heading.cjs +1 -1
  85. package/lib/Heading.d.cts +25 -29
  86. package/lib/Heading.d.ts +25 -29
  87. package/lib/Heading.js +71 -60
  88. package/lib/Highlight.cjs +1 -1
  89. package/lib/Highlight.d.cts +25 -29
  90. package/lib/Highlight.d.ts +25 -29
  91. package/lib/Highlight.js +5 -4
  92. package/lib/History.cjs +1 -1
  93. package/lib/History.d.cts +27 -31
  94. package/lib/History.d.ts +27 -31
  95. package/lib/History.js +39 -403
  96. package/lib/HorizontalRule.cjs +1 -1
  97. package/lib/HorizontalRule.d.cts +25 -29
  98. package/lib/HorizontalRule.d.ts +25 -29
  99. package/lib/HorizontalRule.js +16 -65
  100. package/lib/Iframe.cjs +1 -1
  101. package/lib/Iframe.d.cts +25 -29
  102. package/lib/Iframe.d.ts +25 -29
  103. package/lib/Iframe.js +4 -4
  104. package/lib/Image.cjs +1 -1
  105. package/lib/Image.d.cts +25 -29
  106. package/lib/Image.d.ts +25 -29
  107. package/lib/Image.js +3 -3
  108. package/lib/ImageGif.cjs +1 -1
  109. package/lib/ImageGif.d.cts +25 -29
  110. package/lib/ImageGif.d.ts +25 -29
  111. package/lib/ImageGif.js +5 -5
  112. package/lib/ImportWord.cjs +72 -72
  113. package/lib/ImportWord.d.cts +25 -29
  114. package/lib/ImportWord.d.ts +25 -29
  115. package/lib/ImportWord.js +5652 -5615
  116. package/lib/Indent.cjs +1 -1
  117. package/lib/Indent.d.cts +25 -29
  118. package/lib/Indent.d.ts +25 -29
  119. package/lib/Indent.js +4 -2
  120. package/lib/Italic.cjs +1 -1
  121. package/lib/Italic.d.cts +25 -29
  122. package/lib/Italic.d.ts +25 -29
  123. package/lib/Italic.js +20 -14
  124. package/lib/Katex.cjs +1 -1
  125. package/lib/Katex.d.cts +25 -29
  126. package/lib/Katex.d.ts +25 -29
  127. package/lib/Katex.js +12 -12
  128. package/lib/LineHeight.cjs +1 -1
  129. package/lib/LineHeight.d.cts +25 -29
  130. package/lib/LineHeight.d.ts +25 -29
  131. package/lib/LineHeight.js +5 -3
  132. package/lib/Link.cjs +1 -1
  133. package/lib/Link.d.cts +25 -29
  134. package/lib/Link.d.ts +25 -29
  135. package/lib/Link.js +4 -4
  136. package/lib/ListItem.cjs +1 -1
  137. package/lib/ListItem.d.cts +30 -30
  138. package/lib/ListItem.d.ts +30 -30
  139. package/lib/ListItem.js +4 -30
  140. package/lib/Mention.cjs +1 -1
  141. package/lib/Mention.d.cts +25 -29
  142. package/lib/Mention.d.ts +25 -29
  143. package/lib/Mention.js +161 -132
  144. package/lib/Mermaid.cjs +2 -2
  145. package/lib/Mermaid.d.cts +25 -29
  146. package/lib/Mermaid.d.ts +25 -29
  147. package/lib/Mermaid.js +50 -48
  148. package/lib/MoreMark.cjs +1 -1
  149. package/lib/MoreMark.d.cts +25 -29
  150. package/lib/MoreMark.d.ts +25 -29
  151. package/lib/MoreMark.js +5 -3
  152. package/lib/MultiColumn.cjs +1 -1
  153. package/lib/MultiColumn.d.cts +25 -29
  154. package/lib/MultiColumn.d.ts +25 -29
  155. package/lib/MultiColumn.js +2 -2
  156. package/lib/OrderedList.cjs +1 -1
  157. package/lib/OrderedList.d.cts +26 -30
  158. package/lib/OrderedList.d.ts +26 -30
  159. package/lib/OrderedList.js +11 -75
  160. package/lib/RichTextEditor-CxvwGvQG.cjs +142 -0
  161. package/lib/RichTextEditor-DGcKEUGr.js +22166 -0
  162. package/lib/SearchAndReplace.cjs +1 -1
  163. package/lib/SearchAndReplace.d.cts +38 -112
  164. package/lib/SearchAndReplace.d.ts +38 -112
  165. package/lib/SearchAndReplace.js +204 -192
  166. package/lib/Selection.cjs +1 -1
  167. package/lib/Selection.d.cts +25 -29
  168. package/lib/Selection.d.ts +25 -29
  169. package/lib/Selection.js +1 -1
  170. package/lib/SlashCommand.cjs +1 -1
  171. package/lib/SlashCommand.d.cts +25 -29
  172. package/lib/SlashCommand.d.ts +25 -29
  173. package/lib/SlashCommand.js +178 -223
  174. package/lib/Strike.cjs +1 -1
  175. package/lib/Strike.d.cts +25 -29
  176. package/lib/Strike.d.ts +25 -29
  177. package/lib/Strike.js +20 -14
  178. package/lib/SubAndSuperScript.cjs +1 -1
  179. package/lib/SubAndSuperScript.d.cts +25 -29
  180. package/lib/SubAndSuperScript.d.ts +25 -29
  181. package/lib/SubAndSuperScript.js +5 -3
  182. package/lib/Table.cjs +8 -10
  183. package/lib/Table.d.cts +28 -32
  184. package/lib/Table.d.ts +28 -32
  185. package/lib/Table.js +382 -2022
  186. package/lib/TableOfContent.cjs +1 -1
  187. package/lib/TableOfContent.d.cts +25 -29
  188. package/lib/TableOfContent.d.ts +25 -29
  189. package/lib/TableOfContent.js +5 -5
  190. package/lib/TaskList.cjs +1 -1
  191. package/lib/TaskList.d.cts +27 -31
  192. package/lib/TaskList.d.ts +27 -31
  193. package/lib/TaskList.js +12 -154
  194. package/lib/TextAlign.cjs +1 -1
  195. package/lib/TextAlign.d.cts +25 -29
  196. package/lib/TextAlign.d.ts +25 -29
  197. package/lib/TextAlign.js +11 -9
  198. package/lib/TextBubble.cjs +1 -1
  199. package/lib/TextBubble.d.cts +25 -29
  200. package/lib/TextBubble.d.ts +25 -29
  201. package/lib/TextBubble.js +5 -3
  202. package/lib/TextDirection.cjs +1 -1
  203. package/lib/TextDirection.d.cts +25 -29
  204. package/lib/TextDirection.d.ts +25 -29
  205. package/lib/TextDirection.js +2 -3
  206. package/lib/TextUnderline.cjs +1 -1
  207. package/lib/TextUnderline.d.cts +25 -29
  208. package/lib/TextUnderline.d.ts +25 -29
  209. package/lib/TextUnderline.js +40 -12
  210. package/lib/TrailingNode.cjs +1 -1
  211. package/lib/TrailingNode.d.cts +25 -29
  212. package/lib/TrailingNode.d.ts +25 -29
  213. package/lib/TrailingNode.js +1 -1
  214. package/lib/Twitter-BFULyqdR.js +1628 -0
  215. package/lib/Twitter-Cutpkh3h.cjs +1 -0
  216. package/lib/Twitter.cjs +1 -1
  217. package/lib/Twitter.d.cts +25 -29
  218. package/lib/Twitter.d.ts +25 -29
  219. package/lib/Twitter.js +3 -3
  220. package/lib/Video.cjs +1 -1
  221. package/lib/Video.d.cts +25 -29
  222. package/lib/Video.d.ts +25 -29
  223. package/lib/Video.js +3 -3
  224. package/lib/bubble-extra.cjs +2 -2
  225. package/lib/bubble-extra.d.cts +25 -29
  226. package/lib/bubble-extra.d.ts +25 -29
  227. package/lib/bubble-extra.js +200 -192
  228. package/lib/dom-dataset-_6-diIRQ.cjs +33 -0
  229. package/lib/dom-dataset-lYeH6gfI.js +2361 -0
  230. package/lib/index-5iBZLua9.cjs +12 -0
  231. package/lib/index-6D1J-A-o.cjs +1 -0
  232. package/lib/index-B96Cclrj.cjs +3 -0
  233. package/lib/index-BBz7Nmv9.js +55 -0
  234. package/lib/index-BeCTd5v2.cjs +1 -0
  235. package/lib/index-ByurDDMv.js +237 -0
  236. package/lib/index-CUogRI7j.cjs +1 -0
  237. package/lib/index-Ch6dBBad.js +709 -0
  238. package/lib/index-DF2Lp4HZ.cjs +100 -0
  239. package/lib/{index-LUL9mqY4.js → index-D_L6n8O8.js} +4 -4
  240. package/lib/index-Dbvi-Bvh.cjs +1 -0
  241. package/lib/index-DpCrt7xs.cjs +1 -0
  242. package/lib/index-DsAX1Vq8.cjs +1 -0
  243. package/lib/index-Dy4DlW9o.js +12 -0
  244. package/lib/index-J3jHHZ4d.js +200 -0
  245. package/lib/{index-CsK90iVd.js → index-LmrOdnen.js} +302 -389
  246. package/lib/index-VvXaaKe3.js +898 -0
  247. package/lib/index-kbO3iWqL.js +13432 -0
  248. package/lib/index.cjs +1 -2
  249. package/lib/index.d.cts +26 -229
  250. package/lib/index.d.ts +26 -229
  251. package/lib/index.js +2 -588
  252. package/lib/jsx-runtime-CT7Pcg-t.js +13 -0
  253. package/lib/jsx-runtime-C_NLcKys.cjs +1 -0
  254. package/lib/locale-bundle.cjs +1 -1
  255. package/lib/locale-bundle.d.cts +25 -29
  256. package/lib/locale-bundle.d.ts +25 -29
  257. package/lib/locale-bundle.js +1 -1
  258. package/lib/style.css +1 -1
  259. package/lib/{textarea-DdH64g04.cjs → textarea-DFo_aXnj.cjs} +1 -1
  260. package/lib/{textarea-CktfkXNe.js → textarea-aPtytkDx.js} +1 -1
  261. package/package.json +76 -70
  262. package/lib/RichTextEditor-DWlLqTl9.cjs +0 -140
  263. package/lib/RichTextEditor-KP2Rgcqe.js +0 -12751
  264. package/lib/Twitter-99ivY5qv.js +0 -1744
  265. package/lib/Twitter-BvfvUtNT.cjs +0 -17
  266. package/lib/dom-dataset-Byuf1YmW.cjs +0 -33
  267. package/lib/dom-dataset-Di3tIRrR.js +0 -1031
  268. package/lib/index-BI-IcZcN.cjs +0 -1
  269. package/lib/index-ByRfqzMr.cjs +0 -89
  270. package/lib/index-C1fzuXpN.js +0 -46
  271. package/lib/index-CbQQFj2T.js +0 -133
  272. package/lib/index-DI9T3iLd.js +0 -12354
  273. package/lib/index-D_A0TBRA.cjs +0 -1
  274. package/lib/index-DclQSrIx.cjs +0 -1
  275. package/lib/index-Z4b9rzn-.cjs +0 -1
package/lib/History.js CHANGED
@@ -1,428 +1,64 @@
1
- import { P as j, a as A, r as G, E as L } from "./index-DI9T3iLd.js";
2
- import { jsxs as x, jsx as I, Fragment as F } from "react/jsx-runtime";
3
- import { T as S, a as z, r as N, i as U, b as Z, g as $ } from "./RichTextEditor-KP2Rgcqe.js";
4
- var E = 200, f = function() {
5
- };
6
- f.prototype.append = function(e) {
7
- return e.length ? (e = f.from(e), !this.length && e || e.length < E && this.leafAppend(e) || this.length < E && e.leafPrepend(this) || this.appendInner(e)) : this;
8
- };
9
- f.prototype.prepend = function(e) {
10
- return e.length ? f.from(e).append(this) : this;
11
- };
12
- f.prototype.appendInner = function(e) {
13
- return new R(this, e);
14
- };
15
- f.prototype.slice = function(e, t) {
16
- return e === void 0 && (e = 0), t === void 0 && (t = this.length), e >= t ? f.empty : this.sliceInner(Math.max(0, e), Math.min(this.length, t));
17
- };
18
- f.prototype.get = function(e) {
19
- if (!(e < 0 || e >= this.length))
20
- return this.getInner(e);
21
- };
22
- f.prototype.forEach = function(e, t, n) {
23
- 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);
24
- };
25
- f.prototype.map = function(e, t, n) {
26
- t === void 0 && (t = 0), n === void 0 && (n = this.length);
27
- var i = [];
28
- return this.forEach(function(s, o) {
29
- return i.push(e(s, o));
30
- }, t, n), i;
31
- };
32
- f.from = function(e) {
33
- return e instanceof f ? e : e && e.length ? new H(e) : f.empty;
34
- };
35
- var H = /* @__PURE__ */ function(r) {
36
- function e(n) {
37
- r.call(this), this.values = n;
38
- }
39
- r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e;
40
- var t = { length: { configurable: !0 }, depth: { configurable: !0 } };
41
- return e.prototype.flatten = function() {
42
- return this.values;
43
- }, e.prototype.sliceInner = function(i, s) {
44
- return i == 0 && s == this.length ? this : new e(this.values.slice(i, s));
45
- }, e.prototype.getInner = function(i) {
46
- return this.values[i];
47
- }, e.prototype.forEachInner = function(i, s, o, l) {
48
- for (var p = s; p < o; p++)
49
- if (i(this.values[p], l + p) === !1)
50
- return !1;
51
- }, e.prototype.forEachInvertedInner = function(i, s, o, l) {
52
- for (var p = s - 1; p >= o; p--)
53
- if (i(this.values[p], l + p) === !1)
54
- return !1;
55
- }, e.prototype.leafAppend = function(i) {
56
- if (this.length + i.length <= E)
57
- return new e(this.values.concat(i.flatten()));
58
- }, e.prototype.leafPrepend = function(i) {
59
- if (this.length + i.length <= E)
60
- return new e(i.flatten().concat(this.values));
61
- }, t.length.get = function() {
62
- return this.values.length;
63
- }, t.depth.get = function() {
64
- return 0;
65
- }, Object.defineProperties(e.prototype, t), e;
66
- }(f);
67
- f.empty = new H([]);
68
- var R = /* @__PURE__ */ function(r) {
69
- function e(t, n) {
70
- r.call(this), this.left = t, this.right = n, this.length = t.length + n.length, this.depth = Math.max(t.depth, n.depth) + 1;
71
- }
72
- return r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e, e.prototype.flatten = function() {
73
- return this.left.flatten().concat(this.right.flatten());
74
- }, e.prototype.getInner = function(n) {
75
- return n < this.left.length ? this.left.get(n) : this.right.get(n - this.left.length);
76
- }, e.prototype.forEachInner = function(n, i, s, o) {
77
- var l = this.left.length;
78
- if (i < l && this.left.forEachInner(n, i, Math.min(s, l), o) === !1 || s > l && this.right.forEachInner(n, Math.max(i - l, 0), Math.min(this.length, s) - l, o + l) === !1)
79
- return !1;
80
- }, e.prototype.forEachInvertedInner = function(n, i, s, o) {
81
- var l = this.left.length;
82
- if (i > l && this.right.forEachInvertedInner(n, i - l, Math.max(s, l) - l, o + l) === !1 || s < l && this.left.forEachInvertedInner(n, Math.min(i, l), s, o) === !1)
83
- return !1;
84
- }, e.prototype.sliceInner = function(n, i) {
85
- if (n == 0 && i == this.length)
86
- return this;
87
- var s = this.left.length;
88
- return i <= s ? this.left.slice(n, i) : n >= s ? this.right.slice(n - s, i - s) : this.left.slice(n, s).append(this.right.slice(0, i - s));
89
- }, e.prototype.leafAppend = function(n) {
90
- var i = this.right.leafAppend(n);
91
- if (i)
92
- return new e(this.left, i);
93
- }, e.prototype.leafPrepend = function(n) {
94
- var i = this.left.leafPrepend(n);
95
- if (i)
96
- return new e(i, this.right);
97
- }, e.prototype.appendInner = function(n) {
98
- 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);
99
- }, e;
100
- }(f);
101
- const V = 500;
102
- class m {
103
- constructor(e, t) {
104
- this.items = e, this.eventCount = t;
105
- }
106
- // Pop the latest event off the branch's history and apply it
107
- // to a document transform.
108
- popEvent(e, t) {
109
- if (this.eventCount == 0)
110
- return null;
111
- let n = this.items.length;
112
- for (; ; n--)
113
- if (this.items.get(n - 1).selection) {
114
- --n;
115
- break;
116
- }
117
- let i, s;
118
- t && (i = this.remapping(n, this.items.length), s = i.maps.length);
119
- let o = e.tr, l, p, a = [], c = [];
120
- return this.items.forEach((h, u) => {
121
- if (!h.step) {
122
- i || (i = this.remapping(n, u + 1), s = i.maps.length), s--, c.push(h);
123
- return;
124
- }
125
- if (i) {
126
- c.push(new g(h.map));
127
- let d = h.step.map(i.slice(s)), w;
128
- d && o.maybeStep(d).doc && (w = o.mapping.maps[o.mapping.maps.length - 1], a.push(new g(w, void 0, void 0, a.length + c.length))), s--, w && i.appendMap(w, s);
129
- } else
130
- o.maybeStep(h.step);
131
- if (h.selection)
132
- return l = i ? h.selection.map(i.slice(s)) : h.selection, p = new m(this.items.slice(0, n).append(c.reverse().concat(a)), this.eventCount - 1), !1;
133
- }, this.items.length, 0), { remaining: p, transform: o, selection: l };
134
- }
135
- // Create a new branch with the given transform added.
136
- addTransform(e, t, n, i) {
137
- let s = [], o = this.eventCount, l = this.items, p = !i && l.length ? l.get(l.length - 1) : null;
138
- for (let c = 0; c < e.steps.length; c++) {
139
- let h = e.steps[c].invert(e.docs[c]), u = new g(e.mapping.maps[c], h, t), d;
140
- (d = p && p.merge(u)) && (u = d, c ? s.pop() : l = l.slice(0, l.length - 1)), s.push(u), t && (o++, t = void 0), i || (p = u);
141
- }
142
- let a = o - n.depth;
143
- return a > B && (l = W(l, a), o -= a), new m(l.append(s), o);
144
- }
145
- remapping(e, t) {
146
- let n = new G();
147
- return this.items.forEach((i, s) => {
148
- let o = i.mirrorOffset != null && s - i.mirrorOffset >= e ? n.maps.length - i.mirrorOffset : void 0;
149
- n.appendMap(i.map, o);
150
- }, e, t), n;
151
- }
152
- addMaps(e) {
153
- return this.eventCount == 0 ? this : new m(this.items.append(e.map((t) => new g(t))), this.eventCount);
154
- }
155
- // When the collab module receives remote changes, the history has
156
- // to know about those, so that it can adjust the steps that were
157
- // rebased on top of the remote changes, and include the position
158
- // maps for the remote changes in its array of items.
159
- rebased(e, t) {
160
- if (!this.eventCount)
161
- return this;
162
- let n = [], i = Math.max(0, this.items.length - t), s = e.mapping, o = e.steps.length, l = this.eventCount;
163
- this.items.forEach((u) => {
164
- u.selection && l--;
165
- }, i);
166
- let p = t;
167
- this.items.forEach((u) => {
168
- let d = s.getMirror(--p);
169
- if (d == null)
170
- return;
171
- o = Math.min(o, d);
172
- let w = s.maps[d];
173
- if (u.step) {
174
- let k = e.steps[d].invert(e.docs[d]), P = u.selection && u.selection.map(s.slice(p + 1, d));
175
- P && l++, n.push(new g(w, k, P));
176
- } else
177
- n.push(new g(w));
178
- }, i);
179
- let a = [];
180
- for (let u = t; u < o; u++)
181
- a.push(new g(s.maps[u]));
182
- let c = this.items.slice(0, i).append(a).append(n), h = new m(c, l);
183
- return h.emptyItemCount() > V && (h = h.compress(this.items.length - n.length)), h;
184
- }
185
- emptyItemCount() {
186
- let e = 0;
187
- return this.items.forEach((t) => {
188
- t.step || e++;
189
- }), e;
190
- }
191
- // Compressing a branch means rewriting it to push the air (map-only
192
- // items) out. During collaboration, these naturally accumulate
193
- // because each remote change adds one. The `upto` argument is used
194
- // to ensure that only the items below a given level are compressed,
195
- // because `rebased` relies on a clean, untouched set of items in
196
- // order to associate old items with rebased steps.
197
- compress(e = this.items.length) {
198
- let t = this.remapping(0, e), n = t.maps.length, i = [], s = 0;
199
- return this.items.forEach((o, l) => {
200
- if (l >= e)
201
- i.push(o), o.selection && s++;
202
- else if (o.step) {
203
- let p = o.step.map(t.slice(n)), a = p && p.getMap();
204
- if (n--, a && t.appendMap(a, n), p) {
205
- let c = o.selection && o.selection.map(t.slice(n));
206
- c && s++;
207
- let h = new g(a.invert(), p, c), u, d = i.length - 1;
208
- (u = i.length && i[d].merge(h)) ? i[d] = u : i.push(h);
209
- }
210
- } else o.map && n--;
211
- }, this.items.length, 0), new m(f.from(i.reverse()), s);
212
- }
213
- }
214
- m.empty = new m(f.empty, 0);
215
- function W(r, e) {
216
- let t;
217
- return r.forEach((n, i) => {
218
- if (n.selection && e-- == 0)
219
- return t = i, !1;
220
- }), r.slice(t);
221
- }
222
- class g {
223
- constructor(e, t, n, i) {
224
- this.map = e, this.step = t, this.selection = n, this.mirrorOffset = i;
225
- }
226
- merge(e) {
227
- if (this.step && e.step && !e.selection) {
228
- let t = e.step.merge(this.step);
229
- if (t)
230
- return new g(t.getMap().invert(), t, this.selection);
231
- }
232
- }
233
- }
234
- class v {
235
- constructor(e, t, n, i, s) {
236
- this.done = e, this.undone = t, this.prevRanges = n, this.prevTime = i, this.prevComposition = s;
237
- }
238
- }
239
- const B = 20;
240
- function J(r, e, t, n) {
241
- let i = t.getMeta(y), s;
242
- if (i)
243
- return i.historyState;
244
- t.getMeta(Y) && (r = new v(r.done, r.undone, null, 0, -1));
245
- let o = t.getMeta("appendedTransaction");
246
- if (t.steps.length == 0)
247
- return r;
248
- if (o && o.getMeta(y))
249
- return o.getMeta(y).redo ? new v(r.done.addTransform(t, void 0, n, M(e)), r.undone, b(t.mapping.maps), r.prevTime, r.prevComposition) : new v(r.done, r.undone.addTransform(t, void 0, n, M(e)), null, r.prevTime, r.prevComposition);
250
- if (t.getMeta("addToHistory") !== !1 && !(o && o.getMeta("addToHistory") === !1)) {
251
- let l = t.getMeta("composition"), p = r.prevTime == 0 || !o && r.prevComposition != l && (r.prevTime < (t.time || 0) - n.newGroupDelay || !Q(t, r.prevRanges)), a = o ? C(r.prevRanges, t.mapping) : b(t.mapping.maps);
252
- return new v(r.done.addTransform(t, p ? e.selection.getBookmark() : void 0, n, M(e)), m.empty, a, t.time, l ?? r.prevComposition);
253
- } else return (s = t.getMeta("rebased")) ? new v(r.done.rebased(t, s), r.undone.rebased(t, s), C(r.prevRanges, t.mapping), r.prevTime, r.prevComposition) : new v(r.done.addMaps(t.mapping.maps), r.undone.addMaps(t.mapping.maps), C(r.prevRanges, t.mapping), r.prevTime, r.prevComposition);
254
- }
255
- function Q(r, e) {
256
- if (!e)
257
- return !1;
258
- if (!r.docChanged)
259
- return !0;
260
- let t = !1;
261
- return r.mapping.maps[0].forEach((n, i) => {
262
- for (let s = 0; s < e.length; s += 2)
263
- n <= e[s + 1] && i >= e[s] && (t = !0);
264
- }), t;
265
- }
266
- function b(r) {
267
- let e = [];
268
- for (let t = r.length - 1; t >= 0 && e.length == 0; t--)
269
- r[t].forEach((n, i, s, o) => e.push(s, o));
270
- return e;
271
- }
272
- function C(r, e) {
273
- if (!r)
274
- return null;
275
- let t = [];
276
- for (let n = 0; n < r.length; n += 2) {
277
- let i = e.map(r[n], 1), s = e.map(r[n + 1], -1);
278
- i <= s && t.push(i, s);
279
- }
280
- return t;
281
- }
282
- function X(r, e, t) {
283
- let n = M(e), i = y.get(e).spec.config, s = (t ? r.undone : r.done).popEvent(e, n);
284
- if (!s)
285
- return null;
286
- let o = s.selection.resolve(s.transform.doc), l = (t ? r.done : r.undone).addTransform(s.transform, e.selection.getBookmark(), i, n), p = new v(t ? l : s.remaining, t ? s.remaining : l, null, 0, -1);
287
- return s.transform.setSelection(o).setMeta(y, { redo: t, historyState: p });
288
- }
289
- let T = !1, O = null;
290
- function M(r) {
291
- let e = r.plugins;
292
- if (O != e) {
293
- T = !1, O = e;
294
- for (let t = 0; t < e.length; t++)
295
- if (e[t].spec.historyPreserveItems) {
296
- T = !0;
297
- break;
298
- }
299
- }
300
- return T;
301
- }
302
- const y = new A("history"), Y = new A("closeHistory");
303
- function q(r = {}) {
304
- return r = {
305
- depth: r.depth || 100,
306
- newGroupDelay: r.newGroupDelay || 500
307
- }, new j({
308
- key: y,
309
- state: {
310
- init() {
311
- return new v(m.empty, m.empty, null, 0, -1);
312
- },
313
- apply(e, t, n) {
314
- return J(t, n, e, r);
315
- }
316
- },
317
- config: r,
318
- props: {
319
- handleDOMEvents: {
320
- beforeinput(e, t) {
321
- let n = t.inputType, i = n == "historyUndo" ? D : n == "historyRedo" ? _ : null;
322
- return i ? (t.preventDefault(), i(e.state, e.dispatch)) : !1;
323
- }
324
- }
325
- }
326
- });
327
- }
328
- function K(r, e) {
329
- return (t, n) => {
330
- let i = y.getState(t);
331
- if (!i || (r ? i.undone : i.done).eventCount == 0)
332
- return !1;
333
- if (n) {
334
- let s = X(i, t, r);
335
- s && n(e ? s.scrollIntoView() : s);
336
- }
337
- return !0;
338
- };
339
- }
340
- const D = K(!1, !0), _ = K(!0, !0), ee = L.create({
341
- name: "history",
342
- addOptions() {
343
- return {
344
- depth: 100,
345
- newGroupDelay: 500
346
- };
347
- },
348
- addCommands() {
349
- return {
350
- undo: () => ({ state: r, dispatch: e }) => D(r, e),
351
- redo: () => ({ state: r, dispatch: e }) => _(r, e)
352
- };
353
- },
354
- addProseMirrorPlugins() {
355
- return [
356
- q(this.options)
357
- ];
358
- },
359
- addKeyboardShortcuts() {
360
- return {
361
- "Mod-z": () => this.editor.commands.undo(),
362
- "Shift-Mod-z": () => this.editor.commands.redo(),
363
- "Mod-y": () => this.editor.commands.redo(),
364
- // Russian keyboard layouts
365
- "Mod-я": () => this.editor.commands.undo(),
366
- "Shift-Mod-я": () => this.editor.commands.redo()
367
- };
368
- }
369
- });
370
- function te(r) {
371
- var a;
1
+ import { U as u } from "./index-VvXaaKe3.js";
2
+ import { jsxs as d, jsx as e, Fragment as x } from "react/jsx-runtime";
3
+ import { T as m, a as f, n as y, i as g, b as v, g as K } from "./RichTextEditor-DGcKEUGr.js";
4
+ function T(t) {
5
+ var l;
372
6
  const {
373
- icon: e = void 0,
7
+ icon: n = void 0,
374
8
  // title = undefined,
375
- tooltip: t = void 0,
9
+ tooltip: i = void 0,
376
10
  // disabled = false,
377
- customClass: n = "",
11
+ customClass: s = "",
378
12
  // color = undefined,
379
13
  // loading = false,
380
14
  // shortcutKeys = undefined,
381
- tooltipOptions: i = {},
382
- action: s = void 0,
383
- isActive: o = void 0,
384
- children: l
385
- } = r, p = U[e];
386
- return /* @__PURE__ */ x(S, { children: [
387
- /* @__PURE__ */ I(z, { asChild: !0, children: /* @__PURE__ */ x(
388
- N,
15
+ tooltipOptions: o = {},
16
+ action: r = void 0,
17
+ isActive: c = void 0,
18
+ children: a
19
+ } = t, h = g[n];
20
+ return /* @__PURE__ */ d(m, { children: [
21
+ /* @__PURE__ */ e(f, { asChild: !0, children: /* @__PURE__ */ d(
22
+ y,
389
23
  {
390
24
  size: "sm",
391
- className: `richtext-w-[32px] richtext-h-[32px] ${n}`,
392
- disabled: o == null ? void 0 : o(),
393
- onClick: s,
25
+ className: `richtext-w-[32px] richtext-h-[32px] ${s}`,
26
+ disabled: c == null ? void 0 : c(),
27
+ onClick: r,
394
28
  children: [
395
- p && /* @__PURE__ */ I(p, { className: "richtext-w-4 richtext-h-4" }),
396
- l && /* @__PURE__ */ I(F, { children: l })
29
+ h && /* @__PURE__ */ e(h, { className: "richtext-w-4 richtext-h-4" }),
30
+ a && /* @__PURE__ */ e(x, { children: a })
397
31
  ]
398
32
  }
399
33
  ) }),
400
- t && /* @__PURE__ */ I(Z, { ...i, children: /* @__PURE__ */ x("div", { className: "richtext-flex richtext-flex-col richtext-items-center richtext-text-center richtext-max-w-24", children: [
401
- /* @__PURE__ */ I("div", { children: t }),
402
- !!((a = r == null ? void 0 : r.shortcutKeys) != null && a.length) && /* @__PURE__ */ I("span", { children: $(r == null ? void 0 : r.shortcutKeys) })
34
+ i && /* @__PURE__ */ e(v, { ...o, children: /* @__PURE__ */ d("div", { className: "richtext-flex richtext-flex-col richtext-items-center richtext-text-center richtext-max-w-24", children: [
35
+ /* @__PURE__ */ e("div", { children: i }),
36
+ !!((l = t == null ? void 0 : t.shortcutKeys) != null && l.length) && /* @__PURE__ */ e("span", { children: K(t == null ? void 0 : t.shortcutKeys) })
403
37
  ] }) })
404
38
  ] });
405
39
  }
406
- const ne = ["undo", "redo"], oe = /* @__PURE__ */ ee.extend({
40
+ const p = ["undo", "redo"], N = /* @__PURE__ */ u.extend({
41
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
42
+ //@ts-expect-error
407
43
  addOptions() {
408
- var r;
44
+ var t;
409
45
  return {
410
- ...(r = this.parent) == null ? void 0 : r.call(this),
46
+ ...(t = this.parent) == null ? void 0 : t.call(this),
411
47
  depth: 100,
412
48
  newGroupDelay: 500,
413
- button: ({ editor: e, t, extension: n }) => ne.map((i) => {
414
- var s, o;
49
+ button: ({ editor: n, t: i, extension: s }) => p.map((o) => {
50
+ var r, c;
415
51
  return {
416
- component: te,
52
+ component: T,
417
53
  componentProps: {
418
54
  action: () => {
419
- i === "undo" && e.chain().focus().undo().run(), i === "redo" && e.chain().focus().redo().run();
55
+ o === "undo" && n.chain().focus().undo().run(), o === "redo" && n.chain().focus().redo().run();
420
56
  },
421
- shortcutKeys: i === "undo" ? ((s = n.options.shortcutKeys) == null ? void 0 : s[0]) ?? ["mod", "Z"] : ((o = n.options.shortcutKeys) == null ? void 0 : o[1]) ?? ["shift", "mod", "Z"],
422
- disabled: i === "undo" ? !e.can().undo() : !e.can().redo(),
423
- isActive: () => i === "undo" ? !e.can().undo() : !e.can().redo(),
424
- icon: i === "undo" ? "Undo2" : "Redo2",
425
- tooltip: t(`editor.${i}.tooltip`)
57
+ shortcutKeys: o === "undo" ? ((r = s.options.shortcutKeys) == null ? void 0 : r[0]) ?? ["mod", "Z"] : ((c = s.options.shortcutKeys) == null ? void 0 : c[1]) ?? ["shift", "mod", "Z"],
58
+ disabled: o === "undo" ? !n.can().undo() : !n.can().redo(),
59
+ isActive: () => o === "undo" ? !n.can().undo() : !n.can().redo(),
60
+ icon: o === "undo" ? "Undo2" : "Redo2",
61
+ tooltip: i(`editor.${o}.tooltip`)
426
62
  }
427
63
  };
428
64
  })
@@ -430,5 +66,5 @@ const ne = ["undo", "redo"], oe = /* @__PURE__ */ ee.extend({
430
66
  }
431
67
  });
432
68
  export {
433
- oe as History
69
+ N as History
434
70
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-ByRfqzMr.cjs"),m=require("./RichTextEditor-DWlLqTl9.cjs"),h=t.Node.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:n}){return["hr",t.mergeAttributes(this.options.HTMLAttributes,n)]},addCommands(){return{setHorizontalRule:()=>({chain:n,state:r})=>{if(!t.canInsertNode(r,r.schema.nodes[this.name]))return!1;const{selection:s}=r,{$from:i,$to:a}=s,c=n();return i.parentOffset===0?c.insertContentAt({from:Math.max(i.pos-1,0),to:a.pos},{type:this.name}):t.isNodeSelection(s)?c.insertContentAt(a.pos,{type:this.name}):c.insertContent({type:this.name}),c.command(({tr:e,dispatch:p})=>{var l;if(p){const{$to:o}=e.selection,d=o.end();if(o.nodeAfter)o.nodeAfter.isTextblock?e.setSelection(t.TextSelection.create(e.doc,o.pos+1)):o.nodeAfter.isBlock?e.setSelection(t.NodeSelection.create(e.doc,o.pos)):e.setSelection(t.TextSelection.create(e.doc,o.pos));else{const u=(l=o.parent.type.contentMatch.defaultType)===null||l===void 0?void 0:l.create();u&&(e.insert(d,u),e.setSelection(t.TextSelection.create(e.doc,d+1)))}e.scrollIntoView()}return!0}).run()}}},addInputRules(){return[t.nodeInputRule({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),f=h.extend({renderHTML(){return["div",t.mergeAttributes(this.options.HTMLAttributes,{"data-type":this.name}),["hr"]]},addOptions(){var n;return{...(n=this.parent)==null?void 0:n.call(this),button:({editor:r,t:s,extension:i})=>({component:m.ActionButton,componentProps:{action:()=>r.commands.setHorizontalRule(),disabled:!r.can().setHorizontalRule(),icon:"Minus",shortcutKeys:i.options.shortcutKeys??["mod","alt","S"],tooltip:s("editor.horizontalrule.tooltip")}})}},addKeyboardShortcuts(){return{"Mod-Alt-s":()=>this.editor.commands.setHorizontalRule()}}});exports.HorizontalRule=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-DF2Lp4HZ.cjs"),i=require("./index-Dbvi-Bvh.cjs"),s=require("./RichTextEditor-CxvwGvQG.cjs"),u=i.HorizontalRule.extend({renderHTML(){return["div",r.mergeAttributes(this.options.HTMLAttributes,{"data-type":this.name}),["hr"]]},addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:o,t:e,extension:n})=>({component:s.ActionButton,componentProps:{action:()=>o.commands.setHorizontalRule(),disabled:!o.can().setHorizontalRule(),icon:"Minus",shortcutKeys:n.options.shortcutKeys??["mod","alt","S"],tooltip:e("editor.horizontalrule.tooltip")}})}},addKeyboardShortcuts(){return{"Mod-Alt-s":()=>this.editor.commands.setHorizontalRule()}}});exports.HorizontalRule=u;
@@ -120,18 +120,6 @@ declare module '@tiptap/core' {
120
120
  }
121
121
 
122
122
 
123
- declare module '@tiptap/core' {
124
- interface Commands<ReturnType> {
125
- emoji: {
126
- setEmoji: (emoji: {
127
- name: string;
128
- emoji: string;
129
- }) => ReturnType;
130
- };
131
- }
132
- }
133
-
134
-
135
123
  declare module '@tiptap/core' {
136
124
  interface Commands<ReturnType> {
137
125
  excalidraw: {
@@ -223,19 +211,15 @@ declare module '@tiptap/core' {
223
211
 
224
212
  declare module '@tiptap/core' {
225
213
  interface Commands<ReturnType> {
226
- imageGifUpload: {
227
- /**
228
- * Add an image gif
229
- */
230
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
214
+ indent: {
231
215
  /**
232
- * Update an image gif
216
+ * Set the indent attribute
233
217
  */
234
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
218
+ indent: () => ReturnType;
235
219
  /**
236
- * Set image alignment
220
+ * Set the outdent attribute
237
221
  */
238
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
222
+ outdent: () => ReturnType;
239
223
  };
240
224
  }
241
225
  }
@@ -243,15 +227,19 @@ declare module '@tiptap/core' {
243
227
 
244
228
  declare module '@tiptap/core' {
245
229
  interface Commands<ReturnType> {
246
- indent: {
230
+ imageGifUpload: {
247
231
  /**
248
- * Set the indent attribute
232
+ * Add an image gif
249
233
  */
250
- indent: () => ReturnType;
234
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
251
235
  /**
252
- * Set the outdent attribute
236
+ * Update an image gif
253
237
  */
254
- outdent: () => ReturnType;
238
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
239
+ /**
240
+ * Set image alignment
241
+ */
242
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
255
243
  };
256
244
  }
257
245
  }
@@ -305,16 +293,24 @@ declare module '@tiptap/core' {
305
293
  search: {
306
294
  setSearchTerm: (searchTerm: string) => ReturnType;
307
295
  setReplaceTerm: (replaceTerm: string) => ReturnType;
296
+ setCaseSensitive: (caseSensitive: boolean) => ReturnType;
297
+ resetIndex: () => ReturnType;
298
+ nextSearchResult: () => ReturnType;
299
+ previousSearchResult: () => ReturnType;
308
300
  replace: () => ReturnType;
309
301
  replaceAll: () => ReturnType;
310
- goToPrevSearchResult: () => void;
311
- goToNextSearchResult: () => void;
312
- setCaseSensitive: (caseSensitive: boolean) => ReturnType;
313
302
  };
314
303
  }
315
304
  }
316
305
 
317
306
 
307
+ declare module '@tiptap/core' {
308
+ interface Storage {
309
+ searchAndReplace: SearchAndReplaceStorage;
310
+ }
311
+ }
312
+
313
+
318
314
  declare module '@tiptap/core' {
319
315
  interface Commands<ReturnType> {
320
316
  tableOfContents: {
@@ -120,18 +120,6 @@ declare module '@tiptap/core' {
120
120
  }
121
121
 
122
122
 
123
- declare module '@tiptap/core' {
124
- interface Commands<ReturnType> {
125
- emoji: {
126
- setEmoji: (emoji: {
127
- name: string;
128
- emoji: string;
129
- }) => ReturnType;
130
- };
131
- }
132
- }
133
-
134
-
135
123
  declare module '@tiptap/core' {
136
124
  interface Commands<ReturnType> {
137
125
  excalidraw: {
@@ -223,19 +211,15 @@ declare module '@tiptap/core' {
223
211
 
224
212
  declare module '@tiptap/core' {
225
213
  interface Commands<ReturnType> {
226
- imageGifUpload: {
227
- /**
228
- * Add an image gif
229
- */
230
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
214
+ indent: {
231
215
  /**
232
- * Update an image gif
216
+ * Set the indent attribute
233
217
  */
234
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
218
+ indent: () => ReturnType;
235
219
  /**
236
- * Set image alignment
220
+ * Set the outdent attribute
237
221
  */
238
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
222
+ outdent: () => ReturnType;
239
223
  };
240
224
  }
241
225
  }
@@ -243,15 +227,19 @@ declare module '@tiptap/core' {
243
227
 
244
228
  declare module '@tiptap/core' {
245
229
  interface Commands<ReturnType> {
246
- indent: {
230
+ imageGifUpload: {
247
231
  /**
248
- * Set the indent attribute
232
+ * Add an image gif
249
233
  */
250
- indent: () => ReturnType;
234
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
251
235
  /**
252
- * Set the outdent attribute
236
+ * Update an image gif
253
237
  */
254
- outdent: () => ReturnType;
238
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
239
+ /**
240
+ * Set image alignment
241
+ */
242
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
255
243
  };
256
244
  }
257
245
  }
@@ -305,16 +293,24 @@ declare module '@tiptap/core' {
305
293
  search: {
306
294
  setSearchTerm: (searchTerm: string) => ReturnType;
307
295
  setReplaceTerm: (replaceTerm: string) => ReturnType;
296
+ setCaseSensitive: (caseSensitive: boolean) => ReturnType;
297
+ resetIndex: () => ReturnType;
298
+ nextSearchResult: () => ReturnType;
299
+ previousSearchResult: () => ReturnType;
308
300
  replace: () => ReturnType;
309
301
  replaceAll: () => ReturnType;
310
- goToPrevSearchResult: () => void;
311
- goToNextSearchResult: () => void;
312
- setCaseSensitive: (caseSensitive: boolean) => ReturnType;
313
302
  };
314
303
  }
315
304
  }
316
305
 
317
306
 
307
+ declare module '@tiptap/core' {
308
+ interface Storage {
309
+ searchAndReplace: SearchAndReplaceStorage;
310
+ }
311
+ }
312
+
313
+
318
314
  declare module '@tiptap/core' {
319
315
  interface Commands<ReturnType> {
320
316
  tableOfContents: {