reactjs-tiptap-editor 0.4.1 → 1.0.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 (338) hide show
  1. package/lib/ActionMenuButton-BKOg7hkq.js +38 -0
  2. package/lib/ActionMenuButton-DLQyd_gx.cjs +1 -0
  3. package/lib/Attachment.cjs +2 -2
  4. package/lib/Attachment.d.cts +43 -55
  5. package/lib/Attachment.d.ts +43 -55
  6. package/lib/Attachment.js +129 -99
  7. package/lib/Blockquote.cjs +3 -3
  8. package/lib/Blockquote.d.cts +43 -55
  9. package/lib/Blockquote.d.ts +43 -55
  10. package/lib/Blockquote.js +50 -22
  11. package/lib/Bold.cjs +1 -1
  12. package/lib/Bold.d.cts +43 -55
  13. package/lib/Bold.d.ts +43 -55
  14. package/lib/Bold.js +48 -20
  15. package/lib/BulletList.cjs +1 -1
  16. package/lib/BulletList.d.cts +43 -55
  17. package/lib/BulletList.d.ts +43 -55
  18. package/lib/BulletList.js +38 -9
  19. package/lib/Clear.cjs +1 -1
  20. package/lib/Clear.d.cts +43 -55
  21. package/lib/Clear.d.ts +43 -55
  22. package/lib/Clear.js +32 -6
  23. package/lib/Code.cjs +1 -1
  24. package/lib/Code.d.cts +43 -55
  25. package/lib/Code.d.ts +43 -55
  26. package/lib/Code.js +53 -25
  27. package/lib/CodeBlock.cjs +35 -35
  28. package/lib/CodeBlock.d.cts +43 -55
  29. package/lib/CodeBlock.d.ts +43 -55
  30. package/lib/CodeBlock.js +605 -590
  31. package/lib/CodeView.cjs +1 -1
  32. package/lib/CodeView.d.cts +44 -56
  33. package/lib/CodeView.d.ts +44 -56
  34. package/lib/CodeView.js +49 -21
  35. package/lib/Color.cjs +1 -1
  36. package/lib/Color.d.cts +47 -55
  37. package/lib/Color.d.ts +47 -55
  38. package/lib/Color.js +123 -79
  39. package/lib/Column.cjs +1 -0
  40. package/lib/{Document.d.cts → Column.d.cts} +49 -58
  41. package/lib/{Document.d.ts → Column.d.ts} +49 -58
  42. package/lib/Column.js +217 -0
  43. package/lib/{Drawer-CaAfmqNo.js → Drawer-DZ5jvmrX.js} +404 -394
  44. package/lib/Drawer-SRhwOc6T.cjs +1 -0
  45. package/lib/Drawer.cjs +1 -1
  46. package/lib/Drawer.d.cts +43 -55
  47. package/lib/Drawer.d.ts +43 -55
  48. package/lib/Drawer.js +6 -5
  49. package/lib/Emoji.cjs +1 -1
  50. package/lib/Emoji.d.cts +43 -60
  51. package/lib/Emoji.d.ts +43 -60
  52. package/lib/Emoji.js +377 -392
  53. package/lib/Excalidraw-DwBRXEtC.js +345 -0
  54. package/lib/Excalidraw-ZN3DQvDC.cjs +1 -0
  55. package/lib/Excalidraw.cjs +1 -1
  56. package/lib/Excalidraw.d.cts +43 -55
  57. package/lib/Excalidraw.d.ts +43 -55
  58. package/lib/Excalidraw.js +6 -4
  59. package/lib/ExportPdf.cjs +5 -5
  60. package/lib/ExportPdf.d.cts +43 -55
  61. package/lib/ExportPdf.d.ts +43 -55
  62. package/lib/ExportPdf.js +60 -32
  63. package/lib/ExportWord.cjs +1 -1
  64. package/lib/ExportWord.d.cts +44 -56
  65. package/lib/ExportWord.d.ts +44 -56
  66. package/lib/ExportWord.js +84 -21
  67. package/lib/FontFamily.cjs +1 -1
  68. package/lib/FontFamily.d.cts +57 -58
  69. package/lib/FontFamily.d.ts +57 -58
  70. package/lib/FontFamily.js +72 -74
  71. package/lib/FontSize.cjs +1 -1
  72. package/lib/FontSize.d.cts +54 -58
  73. package/lib/FontSize.d.ts +54 -58
  74. package/lib/FontSize.js +72 -64
  75. package/lib/Heading.cjs +1 -1
  76. package/lib/Heading.d.cts +57 -55
  77. package/lib/Heading.d.ts +57 -55
  78. package/lib/Heading.js +91 -73
  79. package/lib/Highlight.cjs +1 -1
  80. package/lib/Highlight.d.cts +47 -55
  81. package/lib/Highlight.d.ts +47 -55
  82. package/lib/Highlight.js +152 -21
  83. package/lib/History.cjs +1 -1
  84. package/lib/History.d.cts +45 -55
  85. package/lib/History.d.ts +45 -55
  86. package/lib/History.js +976 -53
  87. package/lib/HorizontalRule.cjs +1 -1
  88. package/lib/HorizontalRule.d.cts +43 -55
  89. package/lib/HorizontalRule.d.ts +43 -55
  90. package/lib/HorizontalRule.js +97 -17
  91. package/lib/Icon-DUpv2cI6.cjs +1 -0
  92. package/lib/Icon-jKs8Hr6p.js +11 -0
  93. package/lib/Iframe-CmXkEqOd.js +431 -0
  94. package/lib/Iframe-Cvca2G7X.cjs +1 -0
  95. package/lib/Iframe.cjs +1 -1
  96. package/lib/Iframe.d.cts +42 -61
  97. package/lib/Iframe.d.ts +42 -61
  98. package/lib/Iframe.js +6 -4
  99. package/lib/Image.cjs +1 -1
  100. package/lib/Image.d.cts +43 -56
  101. package/lib/Image.d.ts +43 -56
  102. package/lib/Image.js +848 -5
  103. package/lib/ImageGif.cjs +1 -1
  104. package/lib/ImageGif.d.cts +44 -58
  105. package/lib/ImageGif.d.ts +44 -58
  106. package/lib/ImageGif.js +424 -5
  107. package/lib/ImportWord.cjs +48 -48
  108. package/lib/ImportWord.d.cts +44 -56
  109. package/lib/ImportWord.d.ts +44 -56
  110. package/lib/ImportWord.js +2596 -2588
  111. package/lib/Indent.cjs +1 -1
  112. package/lib/Indent.d.cts +43 -55
  113. package/lib/Indent.d.ts +43 -55
  114. package/lib/Indent.js +97 -27
  115. package/lib/Italic.cjs +1 -1
  116. package/lib/Italic.d.cts +43 -55
  117. package/lib/Italic.d.ts +43 -55
  118. package/lib/Italic.js +47 -19
  119. package/lib/Katex-DsYXsjSS.js +2740 -0
  120. package/lib/Katex-XfrNne6U.cjs +4 -0
  121. package/lib/Katex.cjs +1 -1
  122. package/lib/Katex.d.cts +43 -55
  123. package/lib/Katex.d.ts +43 -55
  124. package/lib/Katex.js +5 -196
  125. package/lib/LineHeight.cjs +1 -1
  126. package/lib/LineHeight.d.cts +45 -61
  127. package/lib/LineHeight.d.ts +45 -61
  128. package/lib/LineHeight.js +71 -112
  129. package/lib/Link.cjs +1 -1
  130. package/lib/Link.d.cts +44 -58
  131. package/lib/Link.d.ts +44 -58
  132. package/lib/Link.js +3 -3
  133. package/lib/LinkEditBlock-BZenZq-Z.cjs +5 -0
  134. package/lib/LinkEditBlock-CB8yIffE.js +1241 -0
  135. package/lib/Mention.cjs +1 -1
  136. package/lib/Mention.d.cts +40 -55
  137. package/lib/Mention.d.ts +40 -55
  138. package/lib/Mention.js +114 -130
  139. package/lib/Mermaid.cjs +2 -2
  140. package/lib/Mermaid.d.cts +43 -55
  141. package/lib/Mermaid.d.ts +43 -55
  142. package/lib/Mermaid.js +177 -165
  143. package/lib/MoreMark.cjs +1 -1
  144. package/lib/MoreMark.d.cts +58 -57
  145. package/lib/MoreMark.d.ts +58 -57
  146. package/lib/MoreMark.js +125 -55
  147. package/lib/OrderedList.cjs +1 -1
  148. package/lib/OrderedList.d.cts +43 -55
  149. package/lib/OrderedList.d.ts +43 -55
  150. package/lib/OrderedList.js +37 -9
  151. package/lib/SearchAndReplace.cjs +1 -1
  152. package/lib/SearchAndReplace.d.cts +43 -58
  153. package/lib/SearchAndReplace.d.ts +43 -58
  154. package/lib/SearchAndReplace.js +221 -197
  155. package/lib/SlashCommand.cjs +1 -1
  156. package/lib/SlashCommand.d.cts +55 -62
  157. package/lib/SlashCommand.d.ts +55 -62
  158. package/lib/SlashCommand.js +235 -249
  159. package/lib/Strike.cjs +1 -1
  160. package/lib/Strike.d.cts +43 -55
  161. package/lib/Strike.d.ts +43 -55
  162. package/lib/Strike.js +39 -11
  163. package/lib/Table-B1j1Ebmh.cjs +9 -0
  164. package/lib/Table-Db8TcQX8.js +1984 -0
  165. package/lib/Table.cjs +1 -9
  166. package/lib/Table.d.cts +44 -58
  167. package/lib/Table.d.ts +44 -58
  168. package/lib/Table.js +3 -558
  169. package/lib/TaskList.cjs +1 -1
  170. package/lib/TaskList.d.cts +43 -55
  171. package/lib/TaskList.d.ts +43 -55
  172. package/lib/TaskList.js +38 -10
  173. package/lib/TextAlign.cjs +1 -1
  174. package/lib/TextAlign.d.cts +56 -55
  175. package/lib/TextAlign.d.ts +56 -55
  176. package/lib/TextAlign.js +108 -101
  177. package/lib/TextDirection.cjs +1 -1
  178. package/lib/TextDirection.d.cts +72 -55
  179. package/lib/TextDirection.d.ts +72 -55
  180. package/lib/TextDirection.js +105 -112
  181. package/lib/TextUnderline.cjs +1 -1
  182. package/lib/TextUnderline.d.cts +43 -55
  183. package/lib/TextUnderline.d.ts +43 -55
  184. package/lib/TextUnderline.js +46 -18
  185. package/lib/{Twitter-BFULyqdR.js → Twitter-CXmmjz9R.js} +536 -498
  186. package/lib/Twitter-CtVTIWJW.cjs +1 -0
  187. package/lib/Twitter.cjs +1 -1
  188. package/lib/Twitter.d.cts +43 -55
  189. package/lib/Twitter.d.ts +43 -55
  190. package/lib/Twitter.js +5 -4
  191. package/lib/Video.cjs +1 -1
  192. package/lib/Video.d.cts +43 -55
  193. package/lib/Video.d.ts +43 -55
  194. package/lib/Video.js +261 -4
  195. package/lib/_commonjsHelpers-BItOPCY9.js +28 -0
  196. package/lib/_commonjsHelpers-BTDuMlIz.cjs +1 -0
  197. package/lib/bubble.cjs +2 -0
  198. package/lib/{bubble-extra.d.cts → bubble.d.cts} +69 -70
  199. package/lib/{bubble-extra.d.ts → bubble.d.ts} +69 -70
  200. package/lib/bubble.js +1925 -0
  201. package/lib/button-B12K7BJ4.cjs +1 -0
  202. package/lib/button-DXMsXUEn.js +43 -0
  203. package/lib/clsx-C11secjj.cjs +1 -0
  204. package/lib/clsx-OuTLNxxd.js +16 -0
  205. package/lib/delete-node-CosiBes5.cjs +1 -0
  206. package/lib/delete-node-IyVmiRbI.js +22 -0
  207. package/lib/dialog-CaCS-W5S.cjs +1 -0
  208. package/lib/dialog-PtQivpHS.js +100 -0
  209. package/lib/dom-dataset-BqoJhJXt.cjs +1 -0
  210. package/lib/dom-dataset-CIEeltF6.js +47 -0
  211. package/lib/dropdown-menu-BPp2Z_U-.js +136 -0
  212. package/lib/dropdown-menu-CdSm4emp.cjs +1 -0
  213. package/lib/file-BLas99n7.js +43 -0
  214. package/lib/file-i7e4nQY2.cjs +1 -0
  215. package/lib/floating-ui.dom-U1vPFQ5f.js +1151 -0
  216. package/lib/floating-ui.dom-VCrc58uF.cjs +1 -0
  217. package/lib/icons-Cllpys39.js +362 -0
  218. package/lib/icons-CqHjeW5T.cjs +1 -0
  219. package/lib/index-BH4bc3jN.cjs +33 -0
  220. package/lib/index-BPfVXs5_.js +2380 -0
  221. package/lib/index-Bnmd0WvY.js +1631 -0
  222. package/lib/{index-Ch6dBBad.js → index-CBce_TWY.js} +40 -42
  223. package/lib/{index-5iBZLua9.cjs → index-D-5U8dY8.cjs} +8 -8
  224. package/lib/{index-ByurDDMv.js → index-D2TUfKkC.js} +2 -2
  225. package/lib/index-DV5kbgRU.cjs +1 -0
  226. package/lib/{index-LmrOdnen.js → index-DYkucCoF.js} +396 -495
  227. package/lib/index-Dfmm6FTT.cjs +1 -0
  228. package/lib/index-DnWWK9F_.js +6374 -0
  229. package/lib/index-DzcKxutn.js +632 -0
  230. package/lib/index-DzvuNTxo.cjs +4 -0
  231. package/lib/{index-BeCTd5v2.cjs → index-N--9MohJ.cjs} +1 -1
  232. package/lib/index-RfTlOzIr.cjs +22 -0
  233. package/lib/index.cjs +132 -1
  234. package/lib/index.d.cts +45 -296
  235. package/lib/index.d.ts +45 -296
  236. package/lib/index.js +243 -2
  237. package/lib/input-_ECRfn3Y.cjs +1 -0
  238. package/lib/input-wJ9PDEzZ.js +21 -0
  239. package/lib/isNumber-ClPupm7P.cjs +1 -0
  240. package/lib/isNumber-fpLGS0AZ.js +15 -0
  241. package/lib/label-BkgAe7IY.cjs +1 -0
  242. package/lib/label-CGdLYWv7.js +19 -0
  243. package/lib/locale-bundle.cjs +1 -1
  244. package/lib/locale-bundle.d.cts +5421 -73
  245. package/lib/locale-bundle.d.ts +5421 -73
  246. package/lib/locale-bundle.js +9 -7
  247. package/lib/popover-BgmUNMHj.cjs +1 -0
  248. package/lib/popover-CAuEW0Mr.js +23 -0
  249. package/lib/separator-CuBW_w98.js +328 -0
  250. package/lib/separator-DRIrVZ2N.cjs +1 -0
  251. package/lib/store-DX599H5W.js +10 -0
  252. package/lib/store-WStcMOiW.cjs +1 -0
  253. package/lib/style.css +1 -1
  254. package/lib/switch-CnLJ7Y-b.cjs +1 -0
  255. package/lib/switch-Coix_FA1.js +27 -0
  256. package/lib/tabs-B5mVSN1I.js +46 -0
  257. package/lib/tabs-BoLCMcCI.cjs +1 -0
  258. package/lib/textarea-B-6zTKQz.cjs +1 -0
  259. package/lib/{textarea-aPtytkDx.js → textarea-DUUM1jZd.js} +1 -1
  260. package/lib/theme-B7aAsK_T.js +15 -0
  261. package/lib/theme-D8_cxGqB.cjs +1 -0
  262. package/lib/throttle-CdwDrFpn.js +249 -0
  263. package/lib/throttle-qX7Yjtsg.cjs +1 -0
  264. package/lib/toggle-Cdp4IT2U.js +85 -0
  265. package/lib/toggle-D41PzQLJ.cjs +1 -0
  266. package/lib/tooltip-BuEiE96N.cjs +1 -0
  267. package/lib/tooltip-CopwsU8q.js +23 -0
  268. package/lib/updatePosition-8Sdem5jb.cjs +1 -0
  269. package/lib/updatePosition-BPmcE0YD.js +215 -0
  270. package/lib/use-toast-Bz3QCOtE.cjs +1 -0
  271. package/lib/use-toast-Crf7-q5H.js +98 -0
  272. package/lib/useButtonProps-BsEd4zYM.js +141 -0
  273. package/lib/useButtonProps-C6Vpn190.cjs +1 -0
  274. package/package.json +22 -105
  275. package/lib/ActionMenuButton-CYdM1xx5.cjs +0 -1
  276. package/lib/ActionMenuButton-DKRF6oa0.js +0 -33
  277. package/lib/BaseKit.cjs +0 -3
  278. package/lib/BaseKit.d.cts +0 -481
  279. package/lib/BaseKit.d.ts +0 -481
  280. package/lib/BaseKit.js +0 -132
  281. package/lib/Document.cjs +0 -1
  282. package/lib/Document.js +0 -9
  283. package/lib/Drawer-CdvCMSzN.cjs +0 -1
  284. package/lib/Excalidraw-BbMQhNvs.cjs +0 -1
  285. package/lib/Excalidraw-CVWz2Vyn.js +0 -290
  286. package/lib/FormatPainter.cjs +0 -1
  287. package/lib/FormatPainter.d.cts +0 -372
  288. package/lib/FormatPainter.d.ts +0 -372
  289. package/lib/FormatPainter.js +0 -76
  290. package/lib/ListItem.cjs +0 -1
  291. package/lib/ListItem.d.cts +0 -290
  292. package/lib/ListItem.d.ts +0 -290
  293. package/lib/ListItem.js +0 -7
  294. package/lib/MultiColumn.cjs +0 -1
  295. package/lib/MultiColumn.d.cts +0 -294
  296. package/lib/MultiColumn.d.ts +0 -294
  297. package/lib/MultiColumn.js +0 -8
  298. package/lib/RichTextEditor-CxvwGvQG.cjs +0 -142
  299. package/lib/RichTextEditor-DGcKEUGr.js +0 -22166
  300. package/lib/Selection.cjs +0 -1
  301. package/lib/Selection.d.cts +0 -289
  302. package/lib/Selection.d.ts +0 -289
  303. package/lib/Selection.js +0 -25
  304. package/lib/SubAndSuperScript.cjs +0 -1
  305. package/lib/SubAndSuperScript.d.cts +0 -377
  306. package/lib/SubAndSuperScript.d.ts +0 -377
  307. package/lib/SubAndSuperScript.js +0 -43
  308. package/lib/TableOfContent.cjs +0 -1
  309. package/lib/TableOfContent.d.cts +0 -291
  310. package/lib/TableOfContent.d.ts +0 -291
  311. package/lib/TableOfContent.js +0 -185
  312. package/lib/TextBubble.cjs +0 -1
  313. package/lib/TextBubble.d.cts +0 -362
  314. package/lib/TextBubble.d.ts +0 -362
  315. package/lib/TextBubble.js +0 -133
  316. package/lib/TrailingNode.cjs +0 -1
  317. package/lib/TrailingNode.d.cts +0 -297
  318. package/lib/TrailingNode.d.ts +0 -297
  319. package/lib/TrailingNode.js +0 -41
  320. package/lib/Twitter-Cutpkh3h.cjs +0 -1
  321. package/lib/bubble-extra.cjs +0 -2
  322. package/lib/bubble-extra.js +0 -631
  323. package/lib/dom-dataset-_6-diIRQ.cjs +0 -33
  324. package/lib/dom-dataset-lYeH6gfI.js +0 -2361
  325. package/lib/index-6D1J-A-o.cjs +0 -1
  326. package/lib/index-B96Cclrj.cjs +0 -3
  327. package/lib/index-BBz7Nmv9.js +0 -55
  328. package/lib/index-CUogRI7j.cjs +0 -1
  329. package/lib/index-DF2Lp4HZ.cjs +0 -100
  330. package/lib/index-D_L6n8O8.js +0 -76
  331. package/lib/index-Dbvi-Bvh.cjs +0 -1
  332. package/lib/index-DpCrt7xs.cjs +0 -1
  333. package/lib/index-DsAX1Vq8.cjs +0 -1
  334. package/lib/index-Dy4DlW9o.js +0 -12
  335. package/lib/index-J3jHHZ4d.js +0 -200
  336. package/lib/index-VvXaaKe3.js +0 -898
  337. package/lib/index-kbO3iWqL.js +0 -13432
  338. package/lib/textarea-DFo_aXnj.cjs +0 -1
@@ -1,6 +1,7 @@
1
1
  import { Editor } from '@tiptap/react';
2
2
  import { Extension } from '@tiptap/core';
3
3
  import { HighlightOptions as HighlightOptions_2 } from '@tiptap/extension-highlight';
4
+ import { JSX } from 'react/jsx-runtime';
4
5
  import { Mark } from '@tiptap/core';
5
6
 
6
7
  /**
@@ -82,6 +83,12 @@ export declare interface HighlightOptions extends HighlightOptions_2, GeneralOpt
82
83
  defaultColor?: string;
83
84
  }
84
85
 
86
+ export declare interface HighlightStorage {
87
+ currentColor?: string;
88
+ }
89
+
90
+ export declare function RichTextHighlight(): JSX.Element;
91
+
85
92
  export { }
86
93
 
87
94
 
@@ -115,11 +122,22 @@ declare module '@tiptap/core' {
115
122
  }
116
123
 
117
124
 
125
+ declare module '@tiptap/core' {
126
+ interface Storage {
127
+ color: ColorStorage;
128
+ }
129
+ }
130
+
131
+
118
132
  declare module '@tiptap/core' {
119
133
  interface Commands<ReturnType> {
120
- drawer: {
121
- setDrawer: (options: any, replace?: any) => ReturnType;
122
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
134
+ columns: {
135
+ insertColumns: (attrs?: {
136
+ cols: number;
137
+ }) => ReturnType;
138
+ addColBefore: () => ReturnType;
139
+ addColAfter: () => ReturnType;
140
+ deleteCol: () => ReturnType;
123
141
  };
124
142
  }
125
143
  }
@@ -127,8 +145,9 @@ declare module '@tiptap/core' {
127
145
 
128
146
  declare module '@tiptap/core' {
129
147
  interface Commands<ReturnType> {
130
- excalidraw: {
131
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
148
+ drawer: {
149
+ setDrawer: (options: any, replace?: any) => ReturnType;
150
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
132
151
  };
133
152
  }
134
153
  }
@@ -146,7 +165,16 @@ declare module '@tiptap/core' {
146
165
  declare module '@tiptap/core' {
147
166
  interface Commands<ReturnType> {
148
167
  exportWord: {
149
- exportToWord: () => ReturnType;
168
+ exportToWord: (docState: any) => ReturnType;
169
+ };
170
+ }
171
+ }
172
+
173
+
174
+ declare module '@tiptap/core' {
175
+ interface Commands<ReturnType> {
176
+ excalidraw: {
177
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
150
178
  };
151
179
  }
152
180
  }
@@ -171,10 +199,8 @@ declare module '@tiptap/core' {
171
199
 
172
200
 
173
201
  declare module '@tiptap/core' {
174
- interface Commands<ReturnType> {
175
- painter: {
176
- setPainter: (marks: Mark[]) => ReturnType;
177
- };
202
+ interface Storage {
203
+ highlight: HighlightStorage;
178
204
  }
179
205
  }
180
206
 
@@ -214,22 +240,6 @@ declare module '@tiptap/core' {
214
240
  }
215
241
 
216
242
 
217
- declare module '@tiptap/core' {
218
- interface Commands<ReturnType> {
219
- indent: {
220
- /**
221
- * Set the indent attribute
222
- */
223
- indent: () => ReturnType;
224
- /**
225
- * Set the outdent attribute
226
- */
227
- outdent: () => ReturnType;
228
- };
229
- }
230
- }
231
-
232
-
233
243
  declare module '@tiptap/core' {
234
244
  interface Commands<ReturnType> {
235
245
  imageGifUpload: {
@@ -252,8 +262,15 @@ declare module '@tiptap/core' {
252
262
 
253
263
  declare module '@tiptap/core' {
254
264
  interface Commands<ReturnType> {
255
- katex: {
256
- setKatex: (arg?: IKatexAttrs) => ReturnType;
265
+ indent: {
266
+ /**
267
+ * Set the indent attribute
268
+ */
269
+ indent: () => ReturnType;
270
+ /**
271
+ * Set the outdent attribute
272
+ */
273
+ outdent: () => ReturnType;
257
274
  };
258
275
  }
259
276
  }
@@ -261,9 +278,8 @@ declare module '@tiptap/core' {
261
278
 
262
279
  declare module '@tiptap/core' {
263
280
  interface Commands<ReturnType> {
264
- lineHeight: {
265
- setLineHeight: (lineHeight: string) => ReturnType;
266
- unsetLineHeight: () => ReturnType;
281
+ katex: {
282
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
267
283
  };
268
284
  }
269
285
  }
@@ -279,20 +295,6 @@ declare module '@tiptap/core' {
279
295
  }
280
296
 
281
297
 
282
- declare module '@tiptap/core' {
283
- interface Commands<ReturnType> {
284
- columns: {
285
- insertColumns: (attrs?: {
286
- cols: number;
287
- }) => ReturnType;
288
- addColBefore: () => ReturnType;
289
- addColAfter: () => ReturnType;
290
- deleteCol: () => ReturnType;
291
- };
292
- }
293
- }
294
-
295
-
296
298
  declare module '@tiptap/core' {
297
299
  interface Commands<ReturnType> {
298
300
  search: {
@@ -316,16 +318,6 @@ declare module '@tiptap/core' {
316
318
  }
317
319
 
318
320
 
319
- declare module '@tiptap/core' {
320
- interface Commands<ReturnType> {
321
- tableOfContents: {
322
- setTableOfContents: () => ReturnType;
323
- removeTableOfContents: () => ReturnType;
324
- };
325
- }
326
- }
327
-
328
-
329
321
  declare module '@tiptap/core' {
330
322
  interface Commands<ReturnType> {
331
323
  twitter: {
@@ -1,6 +1,7 @@
1
1
  import { Editor } from '@tiptap/react';
2
2
  import { Extension } from '@tiptap/core';
3
3
  import { HighlightOptions as HighlightOptions_2 } from '@tiptap/extension-highlight';
4
+ import { JSX } from 'react/jsx-runtime';
4
5
  import { Mark } from '@tiptap/core';
5
6
 
6
7
  /**
@@ -82,6 +83,12 @@ export declare interface HighlightOptions extends HighlightOptions_2, GeneralOpt
82
83
  defaultColor?: string;
83
84
  }
84
85
 
86
+ export declare interface HighlightStorage {
87
+ currentColor?: string;
88
+ }
89
+
90
+ export declare function RichTextHighlight(): JSX.Element;
91
+
85
92
  export { }
86
93
 
87
94
 
@@ -115,11 +122,22 @@ declare module '@tiptap/core' {
115
122
  }
116
123
 
117
124
 
125
+ declare module '@tiptap/core' {
126
+ interface Storage {
127
+ color: ColorStorage;
128
+ }
129
+ }
130
+
131
+
118
132
  declare module '@tiptap/core' {
119
133
  interface Commands<ReturnType> {
120
- drawer: {
121
- setDrawer: (options: any, replace?: any) => ReturnType;
122
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
134
+ columns: {
135
+ insertColumns: (attrs?: {
136
+ cols: number;
137
+ }) => ReturnType;
138
+ addColBefore: () => ReturnType;
139
+ addColAfter: () => ReturnType;
140
+ deleteCol: () => ReturnType;
123
141
  };
124
142
  }
125
143
  }
@@ -127,8 +145,9 @@ declare module '@tiptap/core' {
127
145
 
128
146
  declare module '@tiptap/core' {
129
147
  interface Commands<ReturnType> {
130
- excalidraw: {
131
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
148
+ drawer: {
149
+ setDrawer: (options: any, replace?: any) => ReturnType;
150
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
132
151
  };
133
152
  }
134
153
  }
@@ -146,7 +165,16 @@ declare module '@tiptap/core' {
146
165
  declare module '@tiptap/core' {
147
166
  interface Commands<ReturnType> {
148
167
  exportWord: {
149
- exportToWord: () => ReturnType;
168
+ exportToWord: (docState: any) => ReturnType;
169
+ };
170
+ }
171
+ }
172
+
173
+
174
+ declare module '@tiptap/core' {
175
+ interface Commands<ReturnType> {
176
+ excalidraw: {
177
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
150
178
  };
151
179
  }
152
180
  }
@@ -171,10 +199,8 @@ declare module '@tiptap/core' {
171
199
 
172
200
 
173
201
  declare module '@tiptap/core' {
174
- interface Commands<ReturnType> {
175
- painter: {
176
- setPainter: (marks: Mark[]) => ReturnType;
177
- };
202
+ interface Storage {
203
+ highlight: HighlightStorage;
178
204
  }
179
205
  }
180
206
 
@@ -214,22 +240,6 @@ declare module '@tiptap/core' {
214
240
  }
215
241
 
216
242
 
217
- declare module '@tiptap/core' {
218
- interface Commands<ReturnType> {
219
- indent: {
220
- /**
221
- * Set the indent attribute
222
- */
223
- indent: () => ReturnType;
224
- /**
225
- * Set the outdent attribute
226
- */
227
- outdent: () => ReturnType;
228
- };
229
- }
230
- }
231
-
232
-
233
243
  declare module '@tiptap/core' {
234
244
  interface Commands<ReturnType> {
235
245
  imageGifUpload: {
@@ -252,8 +262,15 @@ declare module '@tiptap/core' {
252
262
 
253
263
  declare module '@tiptap/core' {
254
264
  interface Commands<ReturnType> {
255
- katex: {
256
- setKatex: (arg?: IKatexAttrs) => ReturnType;
265
+ indent: {
266
+ /**
267
+ * Set the indent attribute
268
+ */
269
+ indent: () => ReturnType;
270
+ /**
271
+ * Set the outdent attribute
272
+ */
273
+ outdent: () => ReturnType;
257
274
  };
258
275
  }
259
276
  }
@@ -261,9 +278,8 @@ declare module '@tiptap/core' {
261
278
 
262
279
  declare module '@tiptap/core' {
263
280
  interface Commands<ReturnType> {
264
- lineHeight: {
265
- setLineHeight: (lineHeight: string) => ReturnType;
266
- unsetLineHeight: () => ReturnType;
281
+ katex: {
282
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
267
283
  };
268
284
  }
269
285
  }
@@ -279,20 +295,6 @@ declare module '@tiptap/core' {
279
295
  }
280
296
 
281
297
 
282
- declare module '@tiptap/core' {
283
- interface Commands<ReturnType> {
284
- columns: {
285
- insertColumns: (attrs?: {
286
- cols: number;
287
- }) => ReturnType;
288
- addColBefore: () => ReturnType;
289
- addColAfter: () => ReturnType;
290
- deleteCol: () => ReturnType;
291
- };
292
- }
293
- }
294
-
295
-
296
298
  declare module '@tiptap/core' {
297
299
  interface Commands<ReturnType> {
298
300
  search: {
@@ -316,16 +318,6 @@ declare module '@tiptap/core' {
316
318
  }
317
319
 
318
320
 
319
- declare module '@tiptap/core' {
320
- interface Commands<ReturnType> {
321
- tableOfContents: {
322
- setTableOfContents: () => ReturnType;
323
- removeTableOfContents: () => ReturnType;
324
- };
325
- }
326
- }
327
-
328
-
329
321
  declare module '@tiptap/core' {
330
322
  interface Commands<ReturnType> {
331
323
  twitter: {
package/lib/Highlight.js CHANGED
@@ -1,6 +1,12 @@
1
- import { M as s, l as n, o as a, m as l } from "./index-kbO3iWqL.js";
2
- import { H as u } from "./RichTextEditor-DGcKEUGr.js";
3
- const h = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/, g = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g, d = s.create({
1
+ import { M as f, f as p, h as m, m as C } from "./index-DnWWK9F_.js";
2
+ import { jsx as r, jsxs as h, Fragment as x } from "react/jsx-runtime";
3
+ import { useState as L } from "react";
4
+ import { A as H } from "./toggle-Cdp4IT2U.js";
5
+ import { C as M } from "./separator-CuBW_w98.js";
6
+ import "./index-BPfVXs5_.js";
7
+ import { I as v } from "./Icon-jKs8Hr6p.js";
8
+ import { u as A, b as y } from "./useButtonProps-BsEd4zYM.js";
9
+ const b = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/, k = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g, R = f.create({
4
10
  name: "highlight",
5
11
  addOptions() {
6
12
  return {
@@ -28,12 +34,12 @@ const h = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/, g = /(?:^|\s)(==(?!\s+
28
34
  ];
29
35
  },
30
36
  renderHTML({ HTMLAttributes: t }) {
31
- return ["mark", l(this.options.HTMLAttributes, t), 0];
37
+ return ["mark", C(this.options.HTMLAttributes, t), 0];
32
38
  },
33
39
  addCommands() {
34
40
  return {
35
- setHighlight: (t) => ({ commands: r }) => r.setMark(this.name, t),
36
- toggleHighlight: (t) => ({ commands: r }) => r.toggleMark(this.name, t),
41
+ setHighlight: (t) => ({ commands: e }) => e.setMark(this.name, t),
42
+ toggleHighlight: (t) => ({ commands: e }) => e.toggleMark(this.name, t),
37
43
  unsetHighlight: () => ({ commands: t }) => t.unsetMark(this.name)
38
44
  };
39
45
  },
@@ -44,44 +50,169 @@ const h = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/, g = /(?:^|\s)(==(?!\s+
44
50
  },
45
51
  addInputRules() {
46
52
  return [
47
- a({
48
- find: h,
53
+ m({
54
+ find: b,
49
55
  type: this.type
50
56
  })
51
57
  ];
52
58
  },
53
59
  addPasteRules() {
54
60
  return [
55
- n({
56
- find: g,
61
+ p({
62
+ find: k,
57
63
  type: this.type
58
64
  })
59
65
  ];
60
66
  }
61
- }), m = /* @__PURE__ */ d.extend({
67
+ });
68
+ function w({ fill: t }) {
69
+ return /* @__PURE__ */ r(
70
+ "svg",
71
+ {
72
+ height: "18px",
73
+ version: "1.1",
74
+ viewBox: "0 0 256 256",
75
+ width: "18px",
76
+ xmlns: "http://www.w3.org/2000/svg",
77
+ children: /* @__PURE__ */ r(
78
+ "g",
79
+ {
80
+ fill: "none",
81
+ fillRule: "evenodd",
82
+ stroke: "none",
83
+ strokeWidth: 1,
84
+ children: /* @__PURE__ */ h("g", { id: "icon/背景颜色", children: [
85
+ /* @__PURE__ */ r("g", { fill: "currentColor", children: /* @__PURE__ */ h(
86
+ "g",
87
+ {
88
+ transform: "translate(119.502295, 137.878331) rotate(-135.000000) translate(-119.502295, -137.878331) translate(48.002295, 31.757731)",
89
+ children: [
90
+ /* @__PURE__ */ r(
91
+ "path",
92
+ {
93
+ d: "M100.946943,60.8084699 L43.7469427,60.8084699 C37.2852111,60.8084699 32.0469427,66.0467383 32.0469427,72.5084699 L32.0469427,118.70847 C32.0469427,125.170201 37.2852111,130.40847 43.7469427,130.40847 L100.946943,130.40847 C107.408674,130.40847 112.646943,125.170201 112.646943,118.70847 L112.646943,72.5084699 C112.646943,66.0467383 107.408674,60.8084699 100.946943,60.8084699 Z M93.646,79.808 L93.646,111.408 L51.046,111.408 L51.046,79.808 L93.646,79.808 Z",
94
+ fillRule: "nonzero"
95
+ }
96
+ ),
97
+ /* @__PURE__ */ r(
98
+ "path",
99
+ {
100
+ d: "M87.9366521,16.90916 L87.9194966,68.2000001 C87.9183543,69.4147389 86.9334998,70.399264 85.7187607,70.4 L56.9423078,70.4 C55.7272813,70.4 54.7423078,69.4150264 54.7423078,68.2 L54.7423078,39.4621057 C54.7423078,37.2523513 55.5736632,35.1234748 57.0711706,33.4985176 L76.4832996,12.4342613 C78.9534987,9.75382857 83.1289108,9.5834005 85.8093436,12.0535996 C87.1658473,13.303709 87.9372691,15.0644715 87.9366521,16.90916 Z",
101
+ fillRule: "evenodd"
102
+ }
103
+ ),
104
+ /* @__PURE__ */ r(
105
+ "path",
106
+ {
107
+ d: "M131.3,111.241199 L11.7,111.241199 C5.23826843,111.241199 0,116.479467 0,122.941199 L0,200.541199 C0,207.002931 5.23826843,212.241199 11.7,212.241199 L131.3,212.241199 C137.761732,212.241199 143,207.002931 143,200.541199 L143,122.941199 C143,116.479467 137.761732,111.241199 131.3,111.241199 Z M124,130.241 L124,193.241 L19,193.241 L19,130.241 L124,130.241 Z",
108
+ fillRule: "nonzero"
109
+ }
110
+ )
111
+ ]
112
+ }
113
+ ) }),
114
+ /* @__PURE__ */ r(
115
+ "path",
116
+ {
117
+ d: "M51,218 L205,218 C211.075132,218 216,222.924868 216,229 C216,235.075132 211.075132,240 205,240 L51,240 C44.9248678,240 40,235.075132 40,229 C40,222.924868 44.9248678,218 51,218 Z",
118
+ fill: typeof t == "string" ? t : "none",
119
+ id: "矩形"
120
+ }
121
+ )
122
+ ] })
123
+ }
124
+ )
125
+ }
126
+ );
127
+ }
128
+ function N() {
129
+ const t = A(T.name), {
130
+ tooltip: e = void 0,
131
+ isActive: n = void 0,
132
+ defaultColor: i = void 0,
133
+ colors: o,
134
+ action: s,
135
+ shortcutKeys: u
136
+ } = (t == null ? void 0 : t.componentProps) ?? {}, { editorDisabled: l } = y(n), [a, d] = L(i);
137
+ function g(c) {
138
+ l || s && (s == null || s(c), d(c));
139
+ }
140
+ return t ? /* @__PURE__ */ r("div", { className: "richtext-flex richtext-h-[32px] richtext-items-center", children: /* @__PURE__ */ r(
141
+ M,
142
+ {
143
+ colors: o,
144
+ disabled: l,
145
+ highlight: !0,
146
+ onChange: g,
147
+ value: a,
148
+ children: /* @__PURE__ */ r(
149
+ H,
150
+ {
151
+ disabled: l,
152
+ tooltip: e,
153
+ shortcutKeys: u,
154
+ children: /* @__PURE__ */ h("span", { className: "richtext-flex richtext-items-center richtext-justify-center richtext-gap-[4px] richtext-text-sm", children: [
155
+ /* @__PURE__ */ r(w, { fill: a }),
156
+ /* @__PURE__ */ r(
157
+ v,
158
+ {
159
+ className: "!richtext-h-3 !richtext-w-3 richtext-text-zinc-500",
160
+ name: "MenuDown"
161
+ }
162
+ )
163
+ ] })
164
+ }
165
+ )
166
+ }
167
+ ) }) : /* @__PURE__ */ r(x, {});
168
+ }
169
+ const T = /* @__PURE__ */ R.extend({
170
+ addStorage() {
171
+ return {
172
+ // Stores the currently selected highlight color; undefined indicates "No Fill".
173
+ currentColor: this.options.defaultColor || void 0
174
+ };
175
+ },
62
176
  //@ts-expect-error
63
177
  addOptions() {
64
178
  var t;
65
179
  return {
66
180
  ...(t = this.parent) == null ? void 0 : t.call(this),
67
181
  multicolor: !0,
68
- button: ({ editor: r, t: i, extension: o }) => ({
69
- component: u,
182
+ button: ({ editor: e, t: n, extension: i }) => ({
70
183
  componentProps: {
71
- action: (e) => {
72
- typeof e == "string" && r.chain().focus().setHighlight({ color: e }).run(), e === void 0 && r.chain().focus().unsetHighlight().run();
184
+ action: (o) => {
185
+ if (typeof o == "string") {
186
+ e.storage.highlight.currentColor = o, e.chain().focus().setHighlight({ color: o }).run();
187
+ return;
188
+ }
189
+ e.chain().focus().unsetHighlight().run();
73
190
  },
74
- editor: r,
75
- isActive: () => r.isActive("highlight") || !1,
191
+ isActive: () => e.isActive("highlight") || !1,
76
192
  disabled: !1,
77
- shortcutKeys: o.options.shortcutKeys ?? ["⇧", "mod", "H"],
78
- tooltip: i("editor.highlight.tooltip"),
79
- defaultColor: o.options.defaultColor
193
+ shortcutKeys: i.options.shortcutKeys ?? ["⇧", "mod", "H"],
194
+ tooltip: n("editor.highlight.tooltip"),
195
+ defaultColor: i.options.defaultColor
80
196
  }
81
197
  })
82
198
  };
199
+ },
200
+ addKeyboardShortcuts() {
201
+ var t;
202
+ return {
203
+ ...(t = this.parent) == null ? void 0 : t.call(this),
204
+ "Mod-Shift-h": () => {
205
+ const e = this.storage.currentColor || this.options.defaultColor;
206
+ if (!e) {
207
+ const { color: i } = this.editor.getAttributes("highlight");
208
+ return i ? this.editor.chain().focus().unsetHighlight().run() : !1;
209
+ }
210
+ return this.editor.isActive("highlight", { color: e }) ? this.editor.chain().focus().unsetHighlight().run() : this.editor.chain().focus().setHighlight({ color: e }).run();
211
+ }
212
+ };
83
213
  }
84
214
  });
85
215
  export {
86
- m as Highlight
216
+ T as Highlight,
217
+ N as RichTextHighlight
87
218
  };
package/lib/History.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-DsAX1Vq8.cjs"),o=require("react/jsx-runtime"),i=require("./RichTextEditor-CxvwGvQG.cjs");function x(t){var l;const{icon:e=void 0,tooltip:s=void 0,customClass:r="",tooltipOptions:n={},action:d=void 0,isActive:c=void 0,children:u}=t,h=i.icons[e];return o.jsxs(i.Tooltip,{children:[o.jsx(i.TooltipTrigger,{asChild:!0,children:o.jsxs(i.Toggle,{size:"sm",className:`richtext-w-[32px] richtext-h-[32px] ${r}`,disabled:c==null?void 0:c(),onClick:d,children:[h&&o.jsx(h,{className:"richtext-w-4 richtext-h-4"}),u&&o.jsx(o.Fragment,{children:u})]})}),s&&o.jsx(i.TooltipContent,{...n,children:o.jsxs("div",{className:"richtext-flex richtext-flex-col richtext-items-center richtext-text-center richtext-max-w-24",children:[o.jsx("div",{children:s}),!!((l=t==null?void 0:t.shortcutKeys)!=null&&l.length)&&o.jsx("span",{children:i.getShortcutKeys(t==null?void 0:t.shortcutKeys)})]})})]})}const y=["undo","redo"],j=a.UndoRedo.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),depth:100,newGroupDelay:500,button:({editor:e,t:s,extension:r})=>y.map(n=>{var d,c;return{component:x,componentProps:{action:()=>{n==="undo"&&e.chain().focus().undo().run(),n==="redo"&&e.chain().focus().redo().run()},shortcutKeys:n==="undo"?((d=r.options.shortcutKeys)==null?void 0:d[0])??["mod","Z"]:((c=r.options.shortcutKeys)==null?void 0:c[1])??["shift","mod","Z"],disabled:n==="undo"?!e.can().undo():!e.can().redo(),isActive:()=>n==="undo"?!e.can().undo():!e.can().redo(),icon:n==="undo"?"Undo2":"Redo2",tooltip:s(`editor.${n}.tooltip`)}}})}}});exports.History=j;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./index-RfTlOzIr.cjs"),C=require("@tiptap/pm/state"),x=require("@tiptap/pm/view"),R=require("./index-DzvuNTxo.cjs"),S=require("react/jsx-runtime"),L=require("./toggle-D41PzQLJ.cjs");require("react");require("./index-DV5kbgRU.cjs");const W=require("./icons-CqHjeW5T.cjs"),A=require("./useButtonProps-C6Vpn190.cjs");function q(r={}){return new p.Plugin({view(e){return new U(e,r)}})}class U{constructor(e,t){var n;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(i=>{let o=s=>{this[i](s)};return e.dom.addEventListener(i,o),{name:i,handler:o}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){this.cursorPos!=null&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),t=!e.parent.inlineContent,n,i=this.editorView.dom,o=i.getBoundingClientRect(),s=o.width/i.offsetWidth,l=o.height/i.offsetHeight;if(t){let c=e.nodeBefore,h=e.nodeAfter;if(c||h){let m=this.editorView.nodeDOM(this.cursorPos-(c?c.nodeSize:0));if(m){let v=m.getBoundingClientRect(),M=c?v.bottom:v.top;c&&h&&(M=(M+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let b=this.width/2*l;n={left:v.left,right:v.right,top:M-b,bottom:M+b}}}}if(!n){let c=this.editorView.coordsAtPos(this.cursorPos),h=this.width/2*s;n={left:c.left-h,right:c.left+h,top:c.top,bottom:c.bottom}}let a=this.editorView.dom.offsetParent;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);let d,u;if(!a||a==document.body&&getComputedStyle(a).position=="static")d=-pageXOffset,u=-pageYOffset;else{let c=a.getBoundingClientRect(),h=c.width/a.offsetWidth,m=c.height/a.offsetHeight;d=c.left-a.scrollLeft*h,u=c.top-a.scrollTop*m}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"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),i=n&&n.type.spec.disableDropCursor,o=typeof i=="function"?i(this.editorView,t,e):i;if(t&&!o){let s=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let l=p.dropPoint(this.editorView.state.doc,s,this.editorView.dragging.slice);l!=null&&(s=l)}this.setCursor(s),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}class f extends p.Selection{constructor(e){super(e,e)}map(e,t){let n=e.resolve(t.map(this.head));return f.valid(n)?new f(n):p.Selection.near(n)}content(){return p.Slice.empty}eq(e){return e instanceof f&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new f(e.resolve(t.pos))}getBookmark(){return new z(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!X(e)||!Y(e))return!1;let n=t.type.spec.allowGapCursor;if(n!=null)return n;let i=t.contentMatchAt(e.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(e,t,n=!1){e:for(;;){if(!n&&f.valid(e))return e;let i=e.pos,o=null;for(let s=e.depth;;s--){let l=e.node(s);if(t>0?e.indexAfter(s)<l.childCount:e.index(s)>0){o=l.child(t>0?e.indexAfter(s):e.index(s)-1);break}else if(s==0)return null;i+=t;let a=e.doc.resolve(i);if(f.valid(a))return a}for(;;){let s=t>0?o.firstChild:o.lastChild;if(!s){if(o.isAtom&&!o.isText&&!p.NodeSelection.isSelectable(o)){e=e.doc.resolve(i+o.nodeSize*t),n=!1;continue e}break}o=s,i+=t;let l=e.doc.resolve(i);if(f.valid(l))return l}return null}}}f.prototype.visible=!1;f.findFrom=f.findGapCursorFrom;p.Selection.jsonID("gapcursor",f);class z{constructor(e){this.pos=e}map(e){return new z(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return f.valid(t)?new f(t):p.Selection.near(t)}}function B(r){return r.isAtom||r.spec.isolating||r.spec.createGapCursor}function X(r){for(let e=r.depth;e>=0;e--){let t=r.index(e),n=r.node(e);if(t==0){if(n.type.spec.isolating)return!0;continue}for(let i=n.child(t-1);;i=i.lastChild){if(i.childCount==0&&!i.inlineContent||B(i.type))return!0;if(i.inlineContent)return!1}}return!0}function Y(r){for(let e=r.depth;e>=0;e--){let t=r.indexAfter(e),n=r.node(e);if(t==n.childCount){if(n.type.spec.isolating)return!0;continue}for(let i=n.child(t);;i=i.firstChild){if(i.childCount==0&&!i.inlineContent||B(i.type))return!0;if(i.inlineContent)return!1}}return!0}function J(){return new p.Plugin({props:{decorations:ee,createSelectionBetween(r,e,t){return e.pos==t.pos&&f.valid(t)?new f(t):null},handleClick:Q,handleKeyDown:Z,handleDOMEvents:{beforeinput:$}}})}const Z=R.keydownHandler({ArrowLeft:I("horiz",-1),ArrowRight:I("horiz",1),ArrowUp:I("vert",-1),ArrowDown:I("vert",1)});function I(r,e){const t=r=="vert"?e>0?"down":"up":e>0?"right":"left";return function(n,i,o){let s=n.selection,l=e>0?s.$to:s.$from,a=s.empty;if(s instanceof p.TextSelection){if(!o.endOfTextblock(t)||l.depth==0)return!1;a=!1,l=n.doc.resolve(e>0?l.after():l.before())}let d=f.findGapCursorFrom(l,e,a);return d?(i&&i(n.tr.setSelection(new f(d))),!0):!1}}function Q(r,e,t){if(!r||!r.editable)return!1;let n=r.state.doc.resolve(e);if(!f.valid(n))return!1;let i=r.posAtCoords({left:t.clientX,top:t.clientY});return i&&i.inside>-1&&p.NodeSelection.isSelectable(r.state.doc.nodeAt(i.inside))?!1:(r.dispatch(r.state.tr.setSelection(new f(n))),!0)}function $(r,e){if(e.inputType!="insertCompositionText"||!(r.state.selection instanceof f))return!1;let{$from:t}=r.state.selection,n=t.parent.contentMatchAt(t.index()).findWrapping(r.state.schema.nodes.text);if(!n)return!1;let i=p.Fragment.empty;for(let s=n.length-1;s>=0;s--)i=p.Fragment.from(n[s].createAndFill(null,i));let o=r.state.tr.replace(t.pos,t.pos,new p.Slice(i,0,0));return o.setSelection(p.TextSelection.near(o.doc.resolve(t.pos+1))),r.dispatch(o),!1}function ee(r){if(!(r.selection instanceof f))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",R.DecorationSet.create(r.doc,[R.Decoration.widget(r.selection.head,e,{key:"gapcursor"})])}var O=200,g=function(){};g.prototype.append=function(e){return e.length?(e=g.from(e),!this.length&&e||e.length<O&&this.leafAppend(e)||this.length<O&&e.leafPrepend(this)||this.appendInner(e)):this};g.prototype.prepend=function(e){return e.length?g.from(e).append(this):this};g.prototype.appendInner=function(e){return new te(this,e)};g.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?g.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))};g.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};g.prototype.forEach=function(e,t,n){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)};g.prototype.map=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length);var i=[];return this.forEach(function(o,s){return i.push(e(o,s))},t,n),i};g.from=function(e){return e instanceof g?e:e&&e.length?new j(e):g.empty};var j=(function(r){function e(n){r.call(this),this.values=n}r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e;var t={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(i,o){return i==0&&o==this.length?this:new e(this.values.slice(i,o))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,o,s,l){for(var a=o;a<s;a++)if(i(this.values[a],l+a)===!1)return!1},e.prototype.forEachInvertedInner=function(i,o,s,l){for(var a=o-1;a>=s;a--)if(i(this.values[a],l+a)===!1)return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=O)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=O)return new e(i.flatten().concat(this.values))},t.length.get=function(){return this.values.length},t.depth.get=function(){return 0},Object.defineProperties(e.prototype,t),e})(g);g.empty=new j([]);var te=(function(r){function e(t,n){r.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(n){return n<this.left.length?this.left.get(n):this.right.get(n-this.left.length)},e.prototype.forEachInner=function(n,i,o,s){var l=this.left.length;if(i<l&&this.left.forEachInner(n,i,Math.min(o,l),s)===!1||o>l&&this.right.forEachInner(n,Math.max(i-l,0),Math.min(this.length,o)-l,s+l)===!1)return!1},e.prototype.forEachInvertedInner=function(n,i,o,s){var l=this.left.length;if(i>l&&this.right.forEachInvertedInner(n,i-l,Math.max(o,l)-l,s+l)===!1||o<l&&this.left.forEachInvertedInner(n,Math.min(i,l),o,s)===!1)return!1},e.prototype.sliceInner=function(n,i){if(n==0&&i==this.length)return this;var o=this.left.length;return i<=o?this.left.slice(n,i):n>=o?this.right.slice(n-o,i-o):this.left.slice(n,o).append(this.right.slice(0,i-o))},e.prototype.leafAppend=function(n){var i=this.right.leafAppend(n);if(i)return new e(this.left,i)},e.prototype.leafPrepend=function(n){var i=this.left.leafPrepend(n);if(i)return new e(i,this.right)},e.prototype.appendInner=function(n){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)},e})(g);const ne=500;class w{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(this.eventCount==0)return null;let n=this.items.length;for(;;n--)if(this.items.get(n-1).selection){--n;break}let i,o;t&&(i=this.remapping(n,this.items.length),o=i.maps.length);let s=e.tr,l,a,d=[],u=[];return this.items.forEach((c,h)=>{if(!c.step){i||(i=this.remapping(n,h+1),o=i.maps.length),o--,u.push(c);return}if(i){u.push(new y(c.map));let m=c.step.map(i.slice(o)),v;m&&s.maybeStep(m).doc&&(v=s.mapping.maps[s.mapping.maps.length-1],d.push(new y(v,void 0,void 0,d.length+u.length))),o--,v&&i.appendMap(v,o)}else s.maybeStep(c.step);if(c.selection)return l=i?c.selection.map(i.slice(o)):c.selection,a=new w(this.items.slice(0,n).append(u.reverse().concat(d)),this.eventCount-1),!1},this.items.length,0),{remaining:a,transform:s,selection:l}}addTransform(e,t,n,i){let o=[],s=this.eventCount,l=this.items,a=!i&&l.length?l.get(l.length-1):null;for(let u=0;u<e.steps.length;u++){let c=e.steps[u].invert(e.docs[u]),h=new y(e.mapping.maps[u],c,t),m;(m=a&&a.merge(h))&&(h=m,u?o.pop():l=l.slice(0,l.length-1)),o.push(h),t&&(s++,t=void 0),i||(a=h)}let d=s-n.depth;return d>re&&(l=ie(l,d),s-=d),new w(l.append(o),s)}remapping(e,t){let n=new p.Mapping;return this.items.forEach((i,o)=>{let s=i.mirrorOffset!=null&&o-i.mirrorOffset>=e?n.maps.length-i.mirrorOffset:void 0;n.appendMap(i.map,s)},e,t),n}addMaps(e){return this.eventCount==0?this:new w(this.items.append(e.map(t=>new y(t))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],i=Math.max(0,this.items.length-t),o=e.mapping,s=e.steps.length,l=this.eventCount;this.items.forEach(h=>{h.selection&&l--},i);let a=t;this.items.forEach(h=>{let m=o.getMirror(--a);if(m==null)return;s=Math.min(s,m);let v=o.maps[m];if(h.step){let M=e.steps[m].invert(e.docs[m]),b=h.selection&&h.selection.map(o.slice(a+1,m));b&&l++,n.push(new y(v,M,b))}else n.push(new y(v))},i);let d=[];for(let h=t;h<s;h++)d.push(new y(o.maps[h]));let u=this.items.slice(0,i).append(d).append(n),c=new w(u,l);return c.emptyItemCount()>ne&&(c=c.compress(this.items.length-n.length)),c}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,i=[],o=0;return this.items.forEach((s,l)=>{if(l>=e)i.push(s),s.selection&&o++;else if(s.step){let a=s.step.map(t.slice(n)),d=a&&a.getMap();if(n--,d&&t.appendMap(d,n),a){let u=s.selection&&s.selection.map(t.slice(n));u&&o++;let c=new y(d.invert(),a,u),h,m=i.length-1;(h=i.length&&i[m].merge(c))?i[m]=h:i.push(c)}}else s.map&&n--},this.items.length,0),new w(g.from(i.reverse()),o)}}w.empty=new w(g.empty,0);function ie(r,e){let t;return r.forEach((n,i)=>{if(n.selection&&e--==0)return t=i,!1}),r.slice(t)}class y{constructor(e,t,n,i){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new y(t.getMap().invert(),t,this.selection)}}}class P{constructor(e,t,n,i,o){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=i,this.prevComposition=o}}const re=20;function oe(r,e,t,n){let i=t.getMeta(E),o;if(i)return i.historyState;t.getMeta(ae)&&(r=new P(r.done,r.undone,null,0,-1));let s=t.getMeta("appendedTransaction");if(t.steps.length==0)return r;if(s&&s.getMeta(E))return s.getMeta(E).redo?new P(r.done.addTransform(t,void 0,n,T(e)),r.undone,F(t.mapping.maps),r.prevTime,r.prevComposition):new P(r.done,r.undone.addTransform(t,void 0,n,T(e)),null,r.prevTime,r.prevComposition);if(t.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let l=t.getMeta("composition"),a=r.prevTime==0||!s&&r.prevComposition!=l&&(r.prevTime<(t.time||0)-n.newGroupDelay||!se(t,r.prevRanges)),d=s?D(r.prevRanges,t.mapping):F(t.mapping.maps);return new P(r.done.addTransform(t,a?e.selection.getBookmark():void 0,n,T(e)),w.empty,d,t.time,l??r.prevComposition)}else return(o=t.getMeta("rebased"))?new P(r.done.rebased(t,o),r.undone.rebased(t,o),D(r.prevRanges,t.mapping),r.prevTime,r.prevComposition):new P(r.done.addMaps(t.mapping.maps),r.undone.addMaps(t.mapping.maps),D(r.prevRanges,t.mapping),r.prevTime,r.prevComposition)}function se(r,e){if(!e)return!1;if(!r.docChanged)return!0;let t=!1;return r.mapping.maps[0].forEach((n,i)=>{for(let o=0;o<e.length;o+=2)n<=e[o+1]&&i>=e[o]&&(t=!0)}),t}function F(r){let e=[];for(let t=r.length-1;t>=0&&e.length==0;t--)r[t].forEach((n,i,o,s)=>e.push(o,s));return e}function D(r,e){if(!r)return null;let t=[];for(let n=0;n<r.length;n+=2){let i=e.map(r[n],1),o=e.map(r[n+1],-1);i<=o&&t.push(i,o)}return t}function le(r,e,t){let n=T(e),i=E.get(e).spec.config,o=(t?r.undone:r.done).popEvent(e,n);if(!o)return null;let s=o.selection.resolve(o.transform.doc),l=(t?r.done:r.undone).addTransform(o.transform,e.selection.getBookmark(),i,n),a=new P(t?l:o.remaining,t?o.remaining:l,null,0,-1);return o.transform.setSelection(s).setMeta(E,{redo:t,historyState:a})}let k=!1,V=null;function T(r){let e=r.plugins;if(V!=e){k=!1,V=e;for(let t=0;t<e.length;t++)if(e[t].spec.historyPreserveItems){k=!0;break}}return k}const E=new p.PluginKey("history"),ae=new p.PluginKey("closeHistory");function de(r={}){return r={depth:r.depth||100,newGroupDelay:r.newGroupDelay||500},new p.Plugin({key:E,state:{init(){return new P(w.empty,w.empty,null,0,-1)},apply(e,t,n){return oe(t,n,e,r)}},config:r,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,i=n=="historyUndo"?G:n=="historyRedo"?_:null;return!i||!e.editable?!1:(t.preventDefault(),i(e.state,e.dispatch))}}}})}function H(r,e){return(t,n)=>{let i=E.getState(t);if(!i||(r?i.undone:i.done).eventCount==0)return!1;if(n){let o=le(i,t,r);o&&n(e?o.scrollIntoView():o)}return!0}}const G=H(!1,!0),_=H(!0,!0);p.Extension.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:r=>r.length,wordCounter:r=>r.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=r=>{const e=(r==null?void 0:r.node)||this.editor.state.doc;if(((r==null?void 0:r.mode)||this.options.mode)==="textSize"){const n=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(n)}return e.nodeSize},this.storage.words=r=>{const e=(r==null?void 0:r.node)||this.editor.state.doc,t=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(t)}},addProseMirrorPlugins(){let r=!1;return[new C.Plugin({key:new C.PluginKey("characterCount"),appendTransaction:(e,t,n)=>{if(r)return;const i=this.options.limit;if(i==null||i===0){r=!0;return}const o=this.storage.characters({node:n.doc});if(o>i){const s=o-i,l=0,a=s;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);const d=n.tr.deleteRange(l,a);return r=!0,d}r=!0},filterTransaction:(e,t)=>{const n=this.options.limit;if(!e.docChanged||n===0||n===null||n===void 0)return!0;const i=this.storage.characters({node:t.doc}),o=this.storage.characters({node:e.doc});if(o<=n||i>n&&o>n&&o<=i)return!0;if(i>n&&o>n&&o>i||!e.getMeta("paste"))return!1;const l=e.selection.$head.pos,a=o-n,d=l-a,u=l;return e.deleteRange(d,u),!(this.storage.characters({node:e.doc})>n)}})]}});p.Extension.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[q(this.options)]}});p.Extension.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new C.Plugin({key:new C.PluginKey("focus"),props:{decorations:({doc:r,selection:e})=>{const{isEditable:t,isFocused:n}=this.editor,{anchor:i}=e,o=[];if(!t||!n)return x.DecorationSet.create(r,[]);let s=0;this.options.mode==="deepest"&&r.descendants((a,d)=>{if(a.isText)return;if(!(i>=d&&i<=d+a.nodeSize-1))return!1;s+=1});let l=0;return r.descendants((a,d)=>{if(a.isText||!(i>=d&&i<=d+a.nodeSize-1))return!1;if(l+=1,this.options.mode==="deepest"&&s-l>0||this.options.mode==="shallowest"&&l>1)return this.options.mode==="deepest";o.push(x.Decoration.node(d,d+a.nodeSize,{class:this.options.className}))}),x.DecorationSet.create(r,o)}}})]}});p.Extension.create({name:"gapCursor",addProseMirrorPlugins(){return[J()]},extendNodeSchema(r){var e;const t={name:r.name,options:r.options,storage:r.storage};return{allowGapCursor:(e=p.callOrReturn(p.getExtensionField(r,"allowGapCursor",t)))!=null?e:null}}});p.Extension.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new C.Plugin({key:new C.PluginKey("placeholder"),props:{decorations:({doc:r,selection:e})=>{const t=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:n}=e,i=[];if(!t)return null;const o=this.editor.isEmpty;return r.descendants((s,l)=>{const a=n>=l&&n<=l+s.nodeSize,d=!s.isLeaf&&p.isNodeEmpty(s);if((a||!this.options.showOnlyCurrent)&&d){const u=[this.options.emptyNodeClass];o&&u.push(this.options.emptyEditorClass);const c=x.Decoration.node(l,l+s.nodeSize,{class:u.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:s,pos:l,hasAnchor:a}):this.options.placeholder});i.push(c)}return this.options.includeChildren}),x.DecorationSet.create(r,i)}}})]}});p.Extension.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){const{editor:r,options:e}=this;return[new C.Plugin({key:new C.PluginKey("selection"),props:{decorations(t){return t.selection.empty||r.isFocused||!r.isEditable||p.isNodeSelection(t.selection)||r.view.dragging?null:x.DecorationSet.create(t.doc,[x.Decoration.inline(t.selection.from,t.selection.to,{class:e.className})])}}})]}});function K({types:r,node:e}){return e&&Array.isArray(r)&&r.includes(e.type)||(e==null?void 0:e.type)===r}p.Extension.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var r;const e=new C.PluginKey(this.name),t=this.options.node||((r=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:r.name)||"paragraph",n=Object.entries(this.editor.schema.nodes).map(([,i])=>i).filter(i=>(this.options.notAfter||[]).concat(t).includes(i.name));return[new C.Plugin({key:e,appendTransaction:(i,o,s)=>{const{doc:l,tr:a,schema:d}=s,u=e.getState(s),c=l.content.size,h=d.nodes[t];if(u)return a.insert(c,h.create())},state:{init:(i,o)=>{const s=o.tr.doc.lastChild;return!K({node:s,types:n})},apply:(i,o)=>{if(!i.docChanged||i.getMeta("__uniqueIDTransaction"))return o;const s=i.doc.lastChild;return!K({node:s,types:n})}}})]}});var ce=p.Extension.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:r,dispatch:e})=>G(r,e),redo:()=>({state:r,dispatch:e})=>_(r,e)}},addProseMirrorPlugins(){return[de(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}});function ue(){var u;const r=A.useButtonProps(N.name),{icon:e=void 0,tooltip:t=void 0,shortcutKeys:n=void 0,tooltipOptions:i={},action:o=void 0,isActive:s=void 0}=((u=r==null?void 0:r.componentProps)==null?void 0:u.undo)??{},{disabled:l}=A.useActive(s),a=W.icons[e],d=()=>{l||o&&o()};return!r||!a?S.jsx(S.Fragment,{}):S.jsx(L.ActionButton,{action:d,disabled:l,icon:e,shortcutKeys:n,tooltip:t,tooltipOptions:i})}function pe(){var d;const r=A.useButtonProps(N.name),{icon:e=void 0,tooltip:t=void 0,shortcutKeys:n=void 0,tooltipOptions:i={},action:o=void 0,isActive:s=void 0}=((d=r==null?void 0:r.componentProps)==null?void 0:d.redo)??{},{disabled:l}=A.useActive(s),a=()=>{l||o&&o()};return r?S.jsx(L.ActionButton,{action:a,disabled:l,icon:e,shortcutKeys:n,tooltip:t,tooltipOptions:i}):S.jsx(S.Fragment,{})}const N=ce.extend({addOptions(){var r;return{...(r=this.parent)==null?void 0:r.call(this),depth:100,newGroupDelay:500,button:({editor:e,t,extension:n})=>{var i,o;return{componentProps:{undo:{action:()=>{e.chain().focus().undo().run()},shortcutKeys:((i=n.options.shortcutKeys)==null?void 0:i[0])??["mod","Z"],isActive:()=>e.can().undo(),icon:"Undo2",tooltip:t("editor.undo.tooltip")},redo:{action:()=>{e.chain().focus().redo().run()},shortcutKeys:((o=n.options.shortcutKeys)==null?void 0:o[1])??["shift","mod","Z"],isActive:()=>e.can().redo(),icon:"Redo2",tooltip:t("editor.redo.tooltip")}}}}}}});exports.History=N;exports.RichTextRedo=pe;exports.RichTextUndo=ue;