reactjs-tiptap-editor 0.3.30 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (278) hide show
  1. package/README.md +8 -2
  2. package/lib/{ActionMenuButton-wiDnIxE2.cjs → ActionMenuButton-CYdM1xx5.cjs} +1 -1
  3. package/lib/{ActionMenuButton-B6fitGKu.js → ActionMenuButton-DKRF6oa0.js} +5 -5
  4. package/lib/Attachment.cjs +2 -2
  5. package/lib/Attachment.d.cts +47 -51
  6. package/lib/Attachment.d.ts +47 -51
  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 +47 -51
  14. package/lib/Blockquote.d.ts +47 -51
  15. package/lib/Blockquote.js +33 -17
  16. package/lib/Bold.cjs +1 -1
  17. package/lib/Bold.d.cts +47 -51
  18. package/lib/Bold.d.ts +47 -51
  19. package/lib/Bold.js +23 -16
  20. package/lib/BulletList.cjs +1 -1
  21. package/lib/BulletList.d.cts +48 -52
  22. package/lib/BulletList.d.ts +48 -52
  23. package/lib/BulletList.js +11 -57
  24. package/lib/Clear.cjs +1 -1
  25. package/lib/Clear.d.cts +47 -51
  26. package/lib/Clear.d.ts +47 -51
  27. package/lib/Clear.js +4 -2
  28. package/lib/Code.cjs +1 -1
  29. package/lib/Code.d.cts +47 -51
  30. package/lib/Code.d.ts +47 -51
  31. package/lib/Code.js +29 -25
  32. package/lib/CodeBlock.cjs +2 -2
  33. package/lib/CodeBlock.d.cts +47 -51
  34. package/lib/CodeBlock.d.ts +47 -51
  35. package/lib/CodeBlock.js +5 -4
  36. package/lib/CodeView.cjs +1 -1
  37. package/lib/CodeView.d.cts +47 -51
  38. package/lib/CodeView.d.ts +47 -51
  39. package/lib/CodeView.js +3 -2
  40. package/lib/Color.cjs +1 -1
  41. package/lib/Color.d.cts +48 -52
  42. package/lib/Color.d.ts +48 -52
  43. package/lib/Color.js +42 -74
  44. package/lib/Document.cjs +1 -1
  45. package/lib/Document.d.cts +47 -51
  46. package/lib/Document.d.ts +47 -51
  47. package/lib/Document.js +4 -8
  48. package/lib/{Drawer-BKTU9CpU.js → Drawer-CaAfmqNo.js} +268 -265
  49. package/lib/Drawer-CdvCMSzN.cjs +1 -0
  50. package/lib/Drawer.cjs +1 -1
  51. package/lib/Drawer.d.cts +47 -51
  52. package/lib/Drawer.d.ts +47 -51
  53. package/lib/Drawer.js +4 -4
  54. package/lib/Emoji.cjs +1 -1
  55. package/lib/Emoji.d.cts +50 -52
  56. package/lib/Emoji.d.ts +50 -52
  57. package/lib/Emoji.js +19790 -178
  58. package/lib/Excalidraw-BbMQhNvs.cjs +1 -0
  59. package/lib/Excalidraw-CVWz2Vyn.js +290 -0
  60. package/lib/Excalidraw.cjs +1 -1
  61. package/lib/Excalidraw.d.cts +47 -51
  62. package/lib/Excalidraw.d.ts +47 -51
  63. package/lib/Excalidraw.js +3 -3
  64. package/lib/ExportPdf.cjs +1 -1
  65. package/lib/ExportPdf.d.cts +47 -51
  66. package/lib/ExportPdf.d.ts +47 -51
  67. package/lib/ExportPdf.js +4 -2
  68. package/lib/ExportWord.cjs +1 -1
  69. package/lib/ExportWord.d.cts +47 -51
  70. package/lib/ExportWord.d.ts +47 -51
  71. package/lib/ExportWord.js +22 -51
  72. package/lib/FontFamily.cjs +1 -1
  73. package/lib/FontFamily.d.cts +48 -52
  74. package/lib/FontFamily.d.ts +48 -52
  75. package/lib/FontFamily.js +46 -74
  76. package/lib/FontSize.cjs +1 -1
  77. package/lib/FontSize.d.cts +47 -51
  78. package/lib/FontSize.d.ts +47 -51
  79. package/lib/FontSize.js +11 -8
  80. package/lib/FormatPainter.cjs +1 -1
  81. package/lib/FormatPainter.d.cts +47 -51
  82. package/lib/FormatPainter.d.ts +47 -51
  83. package/lib/FormatPainter.js +4 -2
  84. package/lib/Heading.cjs +1 -1
  85. package/lib/Heading.d.cts +47 -51
  86. package/lib/Heading.d.ts +47 -51
  87. package/lib/Heading.js +77 -65
  88. package/lib/Highlight.cjs +1 -1
  89. package/lib/Highlight.d.cts +47 -51
  90. package/lib/Highlight.d.ts +47 -51
  91. package/lib/Highlight.js +5 -4
  92. package/lib/History.cjs +1 -1
  93. package/lib/History.d.cts +49 -53
  94. package/lib/History.d.ts +49 -53
  95. package/lib/History.js +39 -403
  96. package/lib/HorizontalRule.cjs +1 -1
  97. package/lib/HorizontalRule.d.cts +47 -51
  98. package/lib/HorizontalRule.d.ts +47 -51
  99. package/lib/HorizontalRule.js +16 -65
  100. package/lib/Iframe.cjs +1 -1
  101. package/lib/Iframe.d.cts +47 -51
  102. package/lib/Iframe.d.ts +47 -51
  103. package/lib/Iframe.js +4 -4
  104. package/lib/Image.cjs +1 -1
  105. package/lib/Image.d.cts +47 -51
  106. package/lib/Image.d.ts +47 -51
  107. package/lib/Image.js +3 -3
  108. package/lib/ImageGif.cjs +1 -1
  109. package/lib/ImageGif.d.cts +47 -51
  110. package/lib/ImageGif.d.ts +47 -51
  111. package/lib/ImageGif.js +5 -5
  112. package/lib/ImportWord.cjs +72 -72
  113. package/lib/ImportWord.d.cts +47 -51
  114. package/lib/ImportWord.d.ts +47 -51
  115. package/lib/ImportWord.js +5654 -5616
  116. package/lib/Indent.cjs +1 -1
  117. package/lib/Indent.d.cts +47 -51
  118. package/lib/Indent.d.ts +47 -51
  119. package/lib/Indent.js +4 -2
  120. package/lib/Italic.cjs +1 -1
  121. package/lib/Italic.d.cts +47 -51
  122. package/lib/Italic.d.ts +47 -51
  123. package/lib/Italic.js +20 -14
  124. package/lib/Katex.cjs +1 -1
  125. package/lib/Katex.d.cts +47 -51
  126. package/lib/Katex.d.ts +47 -51
  127. package/lib/Katex.js +49 -48
  128. package/lib/LineHeight.cjs +1 -1
  129. package/lib/LineHeight.d.cts +47 -51
  130. package/lib/LineHeight.d.ts +47 -51
  131. package/lib/LineHeight.js +21 -18
  132. package/lib/Link.cjs +1 -1
  133. package/lib/Link.d.cts +47 -51
  134. package/lib/Link.d.ts +47 -51
  135. package/lib/Link.js +4 -4
  136. package/lib/ListItem.cjs +1 -1
  137. package/lib/ListItem.d.cts +52 -52
  138. package/lib/ListItem.d.ts +52 -52
  139. package/lib/ListItem.js +4 -30
  140. package/lib/Mention.cjs +1 -1
  141. package/lib/Mention.d.cts +47 -51
  142. package/lib/Mention.d.ts +47 -51
  143. package/lib/Mention.js +161 -132
  144. package/lib/Mermaid.cjs +2 -2
  145. package/lib/Mermaid.d.cts +47 -51
  146. package/lib/Mermaid.d.ts +47 -51
  147. package/lib/Mermaid.js +150 -147
  148. package/lib/MoreMark.cjs +1 -1
  149. package/lib/MoreMark.d.cts +47 -51
  150. package/lib/MoreMark.d.ts +47 -51
  151. package/lib/MoreMark.js +5 -3
  152. package/lib/MultiColumn.cjs +1 -1
  153. package/lib/MultiColumn.d.cts +47 -51
  154. package/lib/MultiColumn.d.ts +47 -51
  155. package/lib/MultiColumn.js +2 -2
  156. package/lib/OrderedList.cjs +1 -1
  157. package/lib/OrderedList.d.cts +48 -52
  158. package/lib/OrderedList.d.ts +48 -52
  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 +60 -134
  164. package/lib/SearchAndReplace.d.ts +60 -134
  165. package/lib/SearchAndReplace.js +207 -194
  166. package/lib/Selection.cjs +1 -1
  167. package/lib/Selection.d.cts +47 -51
  168. package/lib/Selection.d.ts +47 -51
  169. package/lib/Selection.js +1 -1
  170. package/lib/SlashCommand.cjs +1 -1
  171. package/lib/SlashCommand.d.cts +47 -51
  172. package/lib/SlashCommand.d.ts +47 -51
  173. package/lib/SlashCommand.js +177 -222
  174. package/lib/Strike.cjs +1 -1
  175. package/lib/Strike.d.cts +47 -51
  176. package/lib/Strike.d.ts +47 -51
  177. package/lib/Strike.js +20 -14
  178. package/lib/SubAndSuperScript.cjs +1 -1
  179. package/lib/SubAndSuperScript.d.cts +47 -51
  180. package/lib/SubAndSuperScript.d.ts +47 -51
  181. package/lib/SubAndSuperScript.js +5 -3
  182. package/lib/Table.cjs +8 -10
  183. package/lib/Table.d.cts +50 -54
  184. package/lib/Table.d.ts +50 -54
  185. package/lib/Table.js +382 -2021
  186. package/lib/TableOfContent.cjs +1 -1
  187. package/lib/TableOfContent.d.cts +47 -51
  188. package/lib/TableOfContent.d.ts +47 -51
  189. package/lib/TableOfContent.js +53 -52
  190. package/lib/TaskList.cjs +1 -1
  191. package/lib/TaskList.d.cts +49 -53
  192. package/lib/TaskList.d.ts +49 -53
  193. package/lib/TaskList.js +12 -154
  194. package/lib/TextAlign.cjs +1 -1
  195. package/lib/TextAlign.d.cts +47 -51
  196. package/lib/TextAlign.d.ts +47 -51
  197. package/lib/TextAlign.js +11 -8
  198. package/lib/TextBubble.cjs +1 -1
  199. package/lib/TextBubble.d.cts +47 -51
  200. package/lib/TextBubble.d.ts +47 -51
  201. package/lib/TextBubble.js +5 -3
  202. package/lib/TextDirection.cjs +1 -1
  203. package/lib/TextDirection.d.cts +47 -51
  204. package/lib/TextDirection.d.ts +47 -51
  205. package/lib/TextDirection.js +15 -15
  206. package/lib/TextUnderline.cjs +1 -1
  207. package/lib/TextUnderline.d.cts +47 -51
  208. package/lib/TextUnderline.d.ts +47 -51
  209. package/lib/TextUnderline.js +40 -12
  210. package/lib/TrailingNode.cjs +1 -1
  211. package/lib/TrailingNode.d.cts +47 -51
  212. package/lib/TrailingNode.d.ts +47 -51
  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 +47 -51
  218. package/lib/Twitter.d.ts +47 -51
  219. package/lib/Twitter.js +3 -3
  220. package/lib/Video.cjs +1 -1
  221. package/lib/Video.d.cts +47 -51
  222. package/lib/Video.d.ts +47 -51
  223. package/lib/Video.js +3 -3
  224. package/lib/bubble-extra.cjs +2 -2
  225. package/lib/bubble-extra.d.cts +47 -51
  226. package/lib/bubble-extra.d.ts +47 -51
  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 +49 -251
  250. package/lib/index.d.ts +49 -251
  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 +47 -51
  256. package/lib/locale-bundle.d.ts +47 -51
  257. package/lib/locale-bundle.js +1 -1
  258. package/lib/style.css +1 -1
  259. package/lib/{textarea-D5WVZMgt.cjs → textarea-DFo_aXnj.cjs} +1 -1
  260. package/lib/{textarea-BglwYF6b.js → textarea-aPtytkDx.js} +1 -1
  261. package/package.json +76 -70
  262. package/lib/Drawer-CmoEF-Zg.cjs +0 -1
  263. package/lib/Excalidraw-CM74U5tG.js +0 -289
  264. package/lib/Excalidraw-DAPP9qgY.cjs +0 -1
  265. package/lib/RichTextEditor-BQN2eLD_.js +0 -12775
  266. package/lib/RichTextEditor-C8Sm1E6J.cjs +0 -140
  267. package/lib/Twitter-CL2pu4QM.cjs +0 -17
  268. package/lib/Twitter-Dg6WWauX.js +0 -1743
  269. package/lib/dom-dataset-Byuf1YmW.cjs +0 -33
  270. package/lib/dom-dataset-Di3tIRrR.js +0 -1031
  271. package/lib/index-BI-IcZcN.cjs +0 -1
  272. package/lib/index-ByRfqzMr.cjs +0 -89
  273. package/lib/index-C1fzuXpN.js +0 -46
  274. package/lib/index-CbQQFj2T.js +0 -133
  275. package/lib/index-DI9T3iLd.js +0 -12354
  276. package/lib/index-D_A0TBRA.cjs +0 -1
  277. package/lib/index-DclQSrIx.cjs +0 -1
  278. 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-BQN2eLD_.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-C8Sm1E6J.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;
@@ -112,9 +112,8 @@ declare module '@tiptap/core' {
112
112
 
113
113
  declare module '@tiptap/core' {
114
114
  interface Commands<ReturnType> {
115
- drawer: {
116
- setDrawer: (options: any, replace?: any) => ReturnType;
117
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
115
+ excalidraw: {
116
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
118
117
  };
119
118
  }
120
119
  }
@@ -122,11 +121,9 @@ declare module '@tiptap/core' {
122
121
 
123
122
  declare module '@tiptap/core' {
124
123
  interface Commands<ReturnType> {
125
- emoji: {
126
- setEmoji: (emoji: {
127
- name: string;
128
- emoji: string;
129
- }) => ReturnType;
124
+ drawer: {
125
+ setDrawer: (options: any, replace?: any) => ReturnType;
126
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
130
127
  };
131
128
  }
132
129
  }
@@ -134,8 +131,8 @@ declare module '@tiptap/core' {
134
131
 
135
132
  declare module '@tiptap/core' {
136
133
  interface Commands<ReturnType> {
137
- excalidraw: {
138
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
134
+ exportPdf: {
135
+ exportToPdf: () => ReturnType;
139
136
  };
140
137
  }
141
138
  }
@@ -143,8 +140,8 @@ declare module '@tiptap/core' {
143
140
 
144
141
  declare module '@tiptap/core' {
145
142
  interface Commands<ReturnType> {
146
- exportPdf: {
147
- exportToPdf: () => ReturnType;
143
+ exportWord: {
144
+ exportToWord: () => ReturnType;
148
145
  };
149
146
  }
150
147
  }
@@ -152,8 +149,8 @@ declare module '@tiptap/core' {
152
149
 
153
150
  declare module '@tiptap/core' {
154
151
  interface Commands<ReturnType> {
155
- exportWord: {
156
- exportToWord: () => ReturnType;
152
+ painter: {
153
+ setPainter: (marks: Mark[]) => ReturnType;
157
154
  };
158
155
  }
159
156
  }
@@ -179,8 +176,14 @@ declare module '@tiptap/core' {
179
176
 
180
177
  declare module '@tiptap/core' {
181
178
  interface Commands<ReturnType> {
182
- painter: {
183
- setPainter: (marks: Mark[]) => ReturnType;
179
+ iframe: {
180
+ /**
181
+ * Add an iframe
182
+ */
183
+ setIframe: (options: {
184
+ src: string;
185
+ service: string;
186
+ }) => ReturnType;
184
187
  };
185
188
  }
186
189
  }
@@ -206,21 +209,6 @@ declare module '@tiptap/core' {
206
209
  }
207
210
 
208
211
 
209
- declare module '@tiptap/core' {
210
- interface Commands<ReturnType> {
211
- iframe: {
212
- /**
213
- * Add an iframe
214
- */
215
- setIframe: (options: {
216
- src: string;
217
- service: string;
218
- }) => ReturnType;
219
- };
220
- }
221
- }
222
-
223
-
224
212
  declare module '@tiptap/core' {
225
213
  interface Commands<ReturnType> {
226
214
  imageGifUpload: {
@@ -241,6 +229,15 @@ declare module '@tiptap/core' {
241
229
  }
242
230
 
243
231
 
232
+ declare module '@tiptap/core' {
233
+ interface Commands<ReturnType> {
234
+ katex: {
235
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
236
+ };
237
+ }
238
+ }
239
+
240
+
244
241
  declare module '@tiptap/core' {
245
242
  interface Commands<ReturnType> {
246
243
  indent: {
@@ -259,8 +256,9 @@ declare module '@tiptap/core' {
259
256
 
260
257
  declare module '@tiptap/core' {
261
258
  interface Commands<ReturnType> {
262
- katex: {
263
- setKatex: (arg?: IKatexAttrs) => ReturnType;
259
+ lineHeight: {
260
+ setLineHeight: (lineHeight: string) => ReturnType;
261
+ unsetLineHeight: () => ReturnType;
264
262
  };
265
263
  }
266
264
  }
@@ -268,9 +266,13 @@ declare module '@tiptap/core' {
268
266
 
269
267
  declare module '@tiptap/core' {
270
268
  interface Commands<ReturnType> {
271
- lineHeight: {
272
- setLineHeight: (lineHeight: string) => ReturnType;
273
- unsetLineHeight: () => ReturnType;
269
+ columns: {
270
+ insertColumns: (attrs?: {
271
+ cols: number;
272
+ }) => ReturnType;
273
+ addColBefore: () => ReturnType;
274
+ addColAfter: () => ReturnType;
275
+ deleteCol: () => ReturnType;
274
276
  };
275
277
  }
276
278
  }
@@ -288,13 +290,9 @@ declare module '@tiptap/core' {
288
290
 
289
291
  declare module '@tiptap/core' {
290
292
  interface Commands<ReturnType> {
291
- columns: {
292
- insertColumns: (attrs?: {
293
- cols: number;
294
- }) => ReturnType;
295
- addColBefore: () => ReturnType;
296
- addColAfter: () => ReturnType;
297
- deleteCol: () => ReturnType;
293
+ tableOfContents: {
294
+ setTableOfContents: () => ReturnType;
295
+ removeTableOfContents: () => ReturnType;
298
296
  };
299
297
  }
300
298
  }
@@ -305,22 +303,20 @@ declare module '@tiptap/core' {
305
303
  search: {
306
304
  setSearchTerm: (searchTerm: string) => ReturnType;
307
305
  setReplaceTerm: (replaceTerm: string) => ReturnType;
306
+ setCaseSensitive: (caseSensitive: boolean) => ReturnType;
307
+ resetIndex: () => ReturnType;
308
+ nextSearchResult: () => ReturnType;
309
+ previousSearchResult: () => ReturnType;
308
310
  replace: () => ReturnType;
309
311
  replaceAll: () => ReturnType;
310
- goToPrevSearchResult: () => void;
311
- goToNextSearchResult: () => void;
312
- setCaseSensitive: (caseSensitive: boolean) => ReturnType;
313
312
  };
314
313
  }
315
314
  }
316
315
 
317
316
 
318
317
  declare module '@tiptap/core' {
319
- interface Commands<ReturnType> {
320
- tableOfContents: {
321
- setTableOfContents: () => ReturnType;
322
- removeTableOfContents: () => ReturnType;
323
- };
318
+ interface Storage {
319
+ searchAndReplace: SearchAndReplaceStorage;
324
320
  }
325
321
  }
326
322