reactjs-tiptap-editor 0.4.2 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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 +27 -39
  5. package/lib/Attachment.d.ts +27 -39
  6. package/lib/Attachment.js +129 -99
  7. package/lib/Blockquote.cjs +3 -3
  8. package/lib/Blockquote.d.cts +27 -39
  9. package/lib/Blockquote.d.ts +27 -39
  10. package/lib/Blockquote.js +50 -22
  11. package/lib/Bold.cjs +1 -1
  12. package/lib/Bold.d.cts +27 -39
  13. package/lib/Bold.d.ts +27 -39
  14. package/lib/Bold.js +48 -20
  15. package/lib/BulletList.cjs +1 -1
  16. package/lib/BulletList.d.cts +27 -39
  17. package/lib/BulletList.d.ts +27 -39
  18. package/lib/BulletList.js +38 -9
  19. package/lib/Clear.cjs +1 -1
  20. package/lib/Clear.d.cts +27 -39
  21. package/lib/Clear.d.ts +27 -39
  22. package/lib/Clear.js +32 -6
  23. package/lib/Code.cjs +1 -1
  24. package/lib/Code.d.cts +27 -39
  25. package/lib/Code.d.ts +27 -39
  26. package/lib/Code.js +53 -25
  27. package/lib/CodeBlock.cjs +35 -35
  28. package/lib/CodeBlock.d.cts +27 -39
  29. package/lib/CodeBlock.d.ts +27 -39
  30. package/lib/CodeBlock.js +605 -590
  31. package/lib/CodeView.cjs +1 -1
  32. package/lib/CodeView.d.cts +28 -40
  33. package/lib/CodeView.d.ts +28 -40
  34. package/lib/CodeView.js +49 -21
  35. package/lib/Color.cjs +1 -1
  36. package/lib/Color.d.cts +31 -39
  37. package/lib/Color.d.ts +31 -39
  38. package/lib/Color.js +123 -79
  39. package/lib/Column.cjs +1 -0
  40. package/lib/{Document.d.cts → Column.d.cts} +33 -42
  41. package/lib/{Document.d.ts → Column.d.ts} +33 -42
  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 +27 -39
  47. package/lib/Drawer.d.ts +27 -39
  48. package/lib/Drawer.js +6 -5
  49. package/lib/Emoji.cjs +1 -1
  50. package/lib/Emoji.d.cts +27 -44
  51. package/lib/Emoji.d.ts +27 -44
  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 +27 -39
  57. package/lib/Excalidraw.d.ts +27 -39
  58. package/lib/Excalidraw.js +6 -4
  59. package/lib/ExportPdf.cjs +5 -5
  60. package/lib/ExportPdf.d.cts +27 -39
  61. package/lib/ExportPdf.d.ts +27 -39
  62. package/lib/ExportPdf.js +60 -32
  63. package/lib/ExportWord.cjs +1 -1
  64. package/lib/ExportWord.d.cts +28 -40
  65. package/lib/ExportWord.d.ts +28 -40
  66. package/lib/ExportWord.js +84 -21
  67. package/lib/FontFamily.cjs +1 -1
  68. package/lib/FontFamily.d.cts +41 -42
  69. package/lib/FontFamily.d.ts +41 -42
  70. package/lib/FontFamily.js +72 -74
  71. package/lib/FontSize.cjs +1 -1
  72. package/lib/FontSize.d.cts +38 -42
  73. package/lib/FontSize.d.ts +38 -42
  74. package/lib/FontSize.js +72 -64
  75. package/lib/Heading.cjs +1 -1
  76. package/lib/Heading.d.cts +41 -39
  77. package/lib/Heading.d.ts +41 -39
  78. package/lib/Heading.js +91 -73
  79. package/lib/Highlight.cjs +1 -1
  80. package/lib/Highlight.d.cts +31 -39
  81. package/lib/Highlight.d.ts +31 -39
  82. package/lib/Highlight.js +150 -19
  83. package/lib/History.cjs +1 -1
  84. package/lib/History.d.cts +29 -39
  85. package/lib/History.d.ts +29 -39
  86. package/lib/History.js +976 -53
  87. package/lib/HorizontalRule.cjs +1 -1
  88. package/lib/HorizontalRule.d.cts +27 -39
  89. package/lib/HorizontalRule.d.ts +27 -39
  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 +26 -45
  97. package/lib/Iframe.d.ts +26 -45
  98. package/lib/Iframe.js +6 -4
  99. package/lib/Image.cjs +1 -1
  100. package/lib/Image.d.cts +27 -40
  101. package/lib/Image.d.ts +27 -40
  102. package/lib/Image.js +848 -5
  103. package/lib/ImageGif.cjs +1 -1
  104. package/lib/ImageGif.d.cts +28 -42
  105. package/lib/ImageGif.d.ts +28 -42
  106. package/lib/ImageGif.js +424 -5
  107. package/lib/ImportWord.cjs +48 -48
  108. package/lib/ImportWord.d.cts +28 -40
  109. package/lib/ImportWord.d.ts +28 -40
  110. package/lib/ImportWord.js +2759 -2751
  111. package/lib/Indent.cjs +1 -1
  112. package/lib/Indent.d.cts +27 -39
  113. package/lib/Indent.d.ts +27 -39
  114. package/lib/Indent.js +97 -27
  115. package/lib/Italic.cjs +1 -1
  116. package/lib/Italic.d.cts +27 -39
  117. package/lib/Italic.d.ts +27 -39
  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 +27 -39
  123. package/lib/Katex.d.ts +27 -39
  124. package/lib/Katex.js +5 -196
  125. package/lib/LineHeight.cjs +1 -1
  126. package/lib/LineHeight.d.cts +29 -45
  127. package/lib/LineHeight.d.ts +29 -45
  128. package/lib/LineHeight.js +71 -112
  129. package/lib/Link.cjs +1 -1
  130. package/lib/Link.d.cts +28 -42
  131. package/lib/Link.d.ts +28 -42
  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 +24 -39
  137. package/lib/Mention.d.ts +24 -39
  138. package/lib/Mention.js +112 -124
  139. package/lib/Mermaid.cjs +2 -2
  140. package/lib/Mermaid.d.cts +27 -39
  141. package/lib/Mermaid.d.ts +27 -39
  142. package/lib/Mermaid.js +177 -165
  143. package/lib/MoreMark.cjs +1 -1
  144. package/lib/MoreMark.d.cts +42 -41
  145. package/lib/MoreMark.d.ts +42 -41
  146. package/lib/MoreMark.js +125 -55
  147. package/lib/OrderedList.cjs +1 -1
  148. package/lib/OrderedList.d.cts +27 -39
  149. package/lib/OrderedList.d.ts +27 -39
  150. package/lib/OrderedList.js +37 -9
  151. package/lib/SearchAndReplace.cjs +1 -1
  152. package/lib/SearchAndReplace.d.cts +27 -42
  153. package/lib/SearchAndReplace.d.ts +27 -42
  154. package/lib/SearchAndReplace.js +221 -197
  155. package/lib/SlashCommand.cjs +1 -1
  156. package/lib/SlashCommand.d.cts +39 -46
  157. package/lib/SlashCommand.d.ts +39 -46
  158. package/lib/SlashCommand.js +235 -249
  159. package/lib/Strike.cjs +1 -1
  160. package/lib/Strike.d.cts +27 -39
  161. package/lib/Strike.d.ts +27 -39
  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 +28 -42
  167. package/lib/Table.d.ts +28 -42
  168. package/lib/Table.js +3 -558
  169. package/lib/TaskList.cjs +1 -1
  170. package/lib/TaskList.d.cts +27 -39
  171. package/lib/TaskList.d.ts +27 -39
  172. package/lib/TaskList.js +38 -10
  173. package/lib/TextAlign.cjs +1 -1
  174. package/lib/TextAlign.d.cts +40 -39
  175. package/lib/TextAlign.d.ts +40 -39
  176. package/lib/TextAlign.js +108 -101
  177. package/lib/TextDirection.cjs +1 -1
  178. package/lib/TextDirection.d.cts +56 -39
  179. package/lib/TextDirection.d.ts +56 -39
  180. package/lib/TextDirection.js +105 -112
  181. package/lib/TextUnderline.cjs +1 -1
  182. package/lib/TextUnderline.d.cts +27 -39
  183. package/lib/TextUnderline.d.ts +27 -39
  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 +27 -39
  189. package/lib/Twitter.d.ts +27 -39
  190. package/lib/Twitter.js +5 -4
  191. package/lib/Video.cjs +1 -1
  192. package/lib/Video.d.cts +27 -39
  193. package/lib/Video.d.ts +27 -39
  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} +53 -54
  199. package/lib/{bubble-extra.d.ts → bubble.d.ts} +53 -54
  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 +29 -280
  235. package/lib/index.d.ts +29 -280
  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 +5405 -57
  245. package/lib/locale-bundle.d.ts +5405 -57
  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
package/lib/Heading.d.ts CHANGED
@@ -1,6 +1,8 @@
1
+ import { default as default_2 } from 'react';
1
2
  import { Editor } from '@tiptap/react';
2
3
  import { Extension } from '@tiptap/core';
3
4
  import { HeadingOptions as HeadingOptions_2 } from '@tiptap/extension-heading';
5
+ import { JSX } from 'react/jsx-runtime';
4
6
  import { Node as Node_2 } from '@tiptap/core';
5
7
 
6
8
  /**
@@ -77,6 +79,21 @@ export declare const Heading: Node_2<HeadingOptions, any>;
77
79
  export declare interface HeadingOptions extends HeadingOptions_2, GeneralOptions<HeadingOptions> {
78
80
  }
79
81
 
82
+ export declare interface Item {
83
+ title: string;
84
+ icon?: any;
85
+ level?: number;
86
+ isActive: NonNullable<ButtonViewReturnComponentProps['isActive']>;
87
+ action?: ButtonViewReturnComponentProps['action'];
88
+ style?: default_2.CSSProperties;
89
+ shortcutKeys?: string[];
90
+ disabled?: boolean;
91
+ divider?: boolean;
92
+ default?: boolean;
93
+ }
94
+
95
+ export declare function RichTextHeading(): JSX.Element;
96
+
80
97
  export { }
81
98
 
82
99
 
@@ -110,6 +127,27 @@ declare module '@tiptap/core' {
110
127
  }
111
128
 
112
129
 
130
+ declare module '@tiptap/core' {
131
+ interface Storage {
132
+ color: ColorStorage;
133
+ }
134
+ }
135
+
136
+
137
+ declare module '@tiptap/core' {
138
+ interface Commands<ReturnType> {
139
+ columns: {
140
+ insertColumns: (attrs?: {
141
+ cols: number;
142
+ }) => ReturnType;
143
+ addColBefore: () => ReturnType;
144
+ addColAfter: () => ReturnType;
145
+ deleteCol: () => ReturnType;
146
+ };
147
+ }
148
+ }
149
+
150
+
113
151
  declare module '@tiptap/core' {
114
152
  interface Commands<ReturnType> {
115
153
  drawer: {
@@ -141,7 +179,7 @@ declare module '@tiptap/core' {
141
179
  declare module '@tiptap/core' {
142
180
  interface Commands<ReturnType> {
143
181
  exportWord: {
144
- exportToWord: () => ReturnType;
182
+ exportToWord: (docState: any) => ReturnType;
145
183
  };
146
184
  }
147
185
  }
@@ -166,10 +204,8 @@ declare module '@tiptap/core' {
166
204
 
167
205
 
168
206
  declare module '@tiptap/core' {
169
- interface Commands<ReturnType> {
170
- painter: {
171
- setPainter: (marks: Mark[]) => ReturnType;
172
- };
207
+ interface Storage {
208
+ highlight: HighlightStorage;
173
209
  }
174
210
  }
175
211
 
@@ -254,16 +290,6 @@ declare module '@tiptap/core' {
254
290
  }
255
291
 
256
292
 
257
- declare module '@tiptap/core' {
258
- interface Commands<ReturnType> {
259
- lineHeight: {
260
- setLineHeight: (lineHeight: string) => ReturnType;
261
- unsetLineHeight: () => ReturnType;
262
- };
263
- }
264
- }
265
-
266
-
267
293
  declare module '@tiptap/core' {
268
294
  interface Commands<ReturnType> {
269
295
  mermaid: {
@@ -274,20 +300,6 @@ declare module '@tiptap/core' {
274
300
  }
275
301
 
276
302
 
277
- declare module '@tiptap/core' {
278
- interface Commands<ReturnType> {
279
- columns: {
280
- insertColumns: (attrs?: {
281
- cols: number;
282
- }) => ReturnType;
283
- addColBefore: () => ReturnType;
284
- addColAfter: () => ReturnType;
285
- deleteCol: () => ReturnType;
286
- };
287
- }
288
- }
289
-
290
-
291
303
  declare module '@tiptap/core' {
292
304
  interface Commands<ReturnType> {
293
305
  search: {
@@ -311,16 +323,6 @@ declare module '@tiptap/core' {
311
323
  }
312
324
 
313
325
 
314
- declare module '@tiptap/core' {
315
- interface Commands<ReturnType> {
316
- tableOfContents: {
317
- setTableOfContents: () => ReturnType;
318
- removeTableOfContents: () => ReturnType;
319
- };
320
- }
321
- }
322
-
323
-
324
326
  declare module '@tiptap/core' {
325
327
  interface Commands<ReturnType> {
326
328
  twitter: {
package/lib/Heading.js CHANGED
@@ -1,9 +1,12 @@
1
- import { N as f, t as v, m as b } from "./index-kbO3iWqL.js";
2
- import { jsxs as c, jsx as d } from "react/jsx-runtime";
3
- import { useMemo as M, Fragment as A } from "react";
4
- import { A as $ } from "./ActionMenuButton-DKRF6oa0.js";
5
- import { D as x, h as H, j as w, k as y, s as k, r as p, l as K } from "./RichTextEditor-DGcKEUGr.js";
6
- var D = f.create({
1
+ import { N as f, t as m, m as A } from "./index-DnWWK9F_.js";
2
+ import { u as M, H } from "./index-DYkucCoF.js";
3
+ import { jsx as d, Fragment as b, jsxs as g } from "react/jsx-runtime";
4
+ import { useMemo as $, Fragment as w } from "react";
5
+ import { A as x } from "./ActionMenuButton-BKOg7hkq.js";
6
+ import { c as D } from "./index-BPfVXs5_.js";
7
+ import { u as y, b as N, h as k } from "./useButtonProps-BsEd4zYM.js";
8
+ import { D as L, a as C, b as T, c as I, e as K, d as P } from "./dropdown-menu-BPp2Z_U-.js";
9
+ var R = f.create({
7
10
  name: "heading",
8
11
  addOptions() {
9
12
  return {
@@ -29,13 +32,13 @@ var D = f.create({
29
32
  }));
30
33
  },
31
34
  renderHTML({ node: e, HTMLAttributes: t }) {
32
- return [`h${this.options.levels.includes(e.attrs.level) ? e.attrs.level : this.options.levels[0]}`, b(this.options.HTMLAttributes, t), 0];
35
+ return [`h${this.options.levels.includes(e.attrs.level) ? e.attrs.level : this.options.levels[0]}`, A(this.options.HTMLAttributes, t), 0];
33
36
  },
34
37
  parseMarkdown: (e, t) => t.createNode("heading", { level: e.depth || 1 }, t.parseInline(e.tokens || [])),
35
38
  renderMarkdown: (e, t) => {
36
39
  var a;
37
- const n = (a = e.attrs) != null && a.level ? parseInt(e.attrs.level, 10) : 1, o = "#".repeat(n);
38
- return e.content ? `${o} ${t.renderChildren(e.content)}` : "";
40
+ const s = (a = e.attrs) != null && a.level ? parseInt(e.attrs.level, 10) : 1, i = "#".repeat(s);
41
+ return e.content ? `${i} ${t.renderChildren(e.content)}` : "";
39
42
  },
40
43
  addCommands() {
41
44
  return {
@@ -53,7 +56,7 @@ var D = f.create({
53
56
  );
54
57
  },
55
58
  addInputRules() {
56
- return this.options.levels.map((e) => v({
59
+ return this.options.levels.map((e) => m({
57
60
  find: new RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),
58
61
  type: this.type,
59
62
  getAttributes: {
@@ -62,95 +65,109 @@ var D = f.create({
62
65
  }));
63
66
  }
64
67
  });
65
- function N(e) {
66
- var a;
67
- const t = M(() => {
68
- var s;
69
- const n = (s = e == null ? void 0 : e.items) == null ? void 0 : s.find((l) => l.isActive());
70
- return n && !n.default ? {
71
- ...n
72
- } : {
73
- title: e.tooltip,
74
- level: 0,
75
- isActive: () => !1
76
- };
77
- }, [e]);
78
- return /* @__PURE__ */ c(x, { children: [
68
+ function z() {
69
+ const { t: e } = M(), t = y(S.name), {
70
+ icon: a = void 0,
71
+ tooltip: s = void 0,
72
+ isActive: i = void 0,
73
+ items: o = []
74
+ } = (t == null ? void 0 : t.componentProps) ?? {}, { disabled: h, dataState: l } = N(i), r = $(() => (l == null ? void 0 : l.title) || e("editor.paragraph.tooltip"), [l]);
75
+ return t ? /* @__PURE__ */ g(L, { children: [
79
76
  /* @__PURE__ */ d(
80
- H,
77
+ C,
81
78
  {
82
79
  asChild: !0,
83
- disabled: e == null ? void 0 : e.disabled,
80
+ disabled: h,
84
81
  children: /* @__PURE__ */ d(
85
- $,
82
+ x,
86
83
  {
87
- disabled: e == null ? void 0 : e.disabled,
88
- icon: "MenuDown",
89
- title: t == null ? void 0 : t.title,
90
- tooltip: e == null ? void 0 : e.tooltip,
91
- tooltipOptions: e == null ? void 0 : e.tooltipOptions
84
+ disabled: h,
85
+ icon: a,
86
+ title: r,
87
+ tooltip: s
92
88
  }
93
89
  )
94
90
  }
95
91
  ),
96
- /* @__PURE__ */ d(w, { className: "richtext-w-full", children: (a = e == null ? void 0 : e.items) == null ? void 0 : a.map((n, o) => {
97
- var s, l;
98
- return /* @__PURE__ */ c(A, { children: [
99
- /* @__PURE__ */ c(
100
- y,
92
+ /* @__PURE__ */ d(T, { className: "richtext-w-full", children: o == null ? void 0 : o.map((n, c) => {
93
+ var u, p;
94
+ return /* @__PURE__ */ g(w, { children: [
95
+ /* @__PURE__ */ g(
96
+ I,
101
97
  {
102
- checked: (t == null ? void 0 : t.title) === n.title,
98
+ checked: r === n.title,
103
99
  onClick: n.action,
104
100
  children: [
105
- /* @__PURE__ */ d("div", { className: `heading- richtext-ml-1 richtext-h-full${n.level}`, children: n.title }),
106
- !!((s = n == null ? void 0 : n.shortcutKeys) != null && s.length) && /* @__PURE__ */ d(k, { className: "richtext-pl-4", children: (l = n == null ? void 0 : n.shortcutKeys) == null ? void 0 : l.map((r) => p(r)).join(" ") })
101
+ /* @__PURE__ */ d(
102
+ "div",
103
+ {
104
+ className: D("richtext-ml-1 richtext-h-full", {
105
+ "": n.level === "Paragraph",
106
+ "heading-1": n.level === 1,
107
+ "heading-2": n.level === 2,
108
+ "heading-3": n.level === 3,
109
+ "heading-4": n.level === 4,
110
+ "heading-5": n.level === 5,
111
+ "heading-6": n.level === 6
112
+ }),
113
+ children: n.title
114
+ }
115
+ ),
116
+ !!((u = n == null ? void 0 : n.shortcutKeys) != null && u.length) && /* @__PURE__ */ d(K, { className: "richtext-pl-4", children: (p = n == null ? void 0 : n.shortcutKeys) == null ? void 0 : p.map((v) => k(v)).join(" ") })
107
117
  ]
108
118
  }
109
119
  ),
110
- n.level === 0 && /* @__PURE__ */ d(K, {})
111
- ] }, `heading-k-${o}`);
120
+ n.level === "Paragraph" && /* @__PURE__ */ d(P, {})
121
+ ] }, `heading-k-${c}`);
112
122
  }) })
113
- ] });
123
+ ] }) : /* @__PURE__ */ d(b, {});
114
124
  }
115
- const O = /* @__PURE__ */ D.extend({
125
+ const S = /* @__PURE__ */ R.extend({
116
126
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
117
127
  //@ts-expect-error
118
128
  addOptions() {
119
129
  var e;
120
130
  return {
121
131
  ...(e = this.parent) == null ? void 0 : e.call(this),
122
- levels: [1, 2, 3, 4, 5, 6],
123
- button({ editor: t, extension: a, t: n }) {
124
- var h, u;
125
- const { extensions: o = [] } = t.extensionManager ?? [], s = ((h = a.options) == null ? void 0 : h.levels) || [], l = o.find(
126
- (i) => i.name === "base-kit"
127
- ), r = s.map((i) => {
128
- var g;
132
+ levels: H,
133
+ button({ editor: t, extension: a, t: s }) {
134
+ var l;
135
+ const i = ((l = a.options) == null ? void 0 : l.levels) || [], o = i.map((r) => {
136
+ var c;
137
+ const n = r === "Paragraph";
129
138
  return {
130
- action: () => t.commands.toggleHeading({ level: i }),
131
- isActive: () => t.isActive("heading", { level: i }) || !1,
132
- disabled: !t.can().toggleHeading({ level: i }),
133
- title: n(`editor.heading.h${i}.tooltip`),
134
- level: i,
135
- shortcutKeys: ((g = a.options.shortcutKeys) == null ? void 0 : g[i]) ?? ["alt", "mod", `${i}`]
139
+ action: () => {
140
+ if (n) {
141
+ const u = i.find((p) => t.isActive("heading", { level: p }));
142
+ u && u !== "Paragraph" && t.commands.toggleHeading({ level: u });
143
+ return;
144
+ }
145
+ t.commands.toggleHeading({ level: r });
146
+ },
147
+ isActive: () => n ? !1 : t.isActive("heading", { level: r }) || !1,
148
+ disabled: !t.can().toggleHeading({ level: r }),
149
+ title: s(n ? "editor.paragraph.tooltip" : `editor.heading.h${r}.tooltip`),
150
+ level: r,
151
+ shortcutKeys: ((c = a.options.shortcutKeys) == null ? void 0 : c[r]) ?? ["alt", "mod", `${r}`],
152
+ default: n
136
153
  };
137
- });
138
- l && l.options.paragraph !== !1 && r.unshift({
139
- action: () => t.commands.setParagraph(),
140
- isActive: () => t.isActive("paragraph") || !1,
141
- disabled: !t.can().setParagraph(),
142
- level: 0,
143
- title: n("editor.paragraph.tooltip"),
144
- shortcutKeys: ((u = a.options.shortcutKeys) == null ? void 0 : u[0]) ?? ["alt", "mod", "0"]
145
- });
146
- const m = r.filter((i) => i.disabled).length === r.length;
154
+ }), h = o.filter((r) => r.disabled).length === o.length;
147
155
  return {
148
- component: N,
156
+ // component: HeadingButton,
149
157
  componentProps: {
150
- tooltip: n("editor.heading.tooltip"),
151
- disabled: m,
152
- items: r,
153
- editor: t
158
+ tooltip: s("editor.heading.tooltip"),
159
+ disabled: h,
160
+ items: o,
161
+ icon: "MenuDown",
162
+ isActive: () => {
163
+ const r = o == null ? void 0 : o.find((c) => c.isActive());
164
+ return r && !r.default ? r : {
165
+ title: s("editor.paragraph.tooltip"),
166
+ level: 0,
167
+ isActive: () => !1
168
+ };
169
+ },
170
+ levels: i
154
171
  }
155
172
  };
156
173
  }
@@ -158,5 +175,6 @@ const O = /* @__PURE__ */ D.extend({
158
175
  }
159
176
  });
160
177
  export {
161
- O as Heading
178
+ S as Heading,
179
+ z as RichTextHeading
162
180
  };
package/lib/Highlight.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-DF2Lp4HZ.cjs"),s=require("./RichTextEditor-CxvwGvQG.cjs"),u=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,l=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,a=r.Mark.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:t=>t.getAttribute("data-color")||t.style.backgroundColor,renderHTML:t=>t.color?{"data-color":t.color,style:`background-color: ${t.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:t}){return["mark",r.mergeAttributes(this.options.HTMLAttributes,t),0]},addCommands(){return{setHighlight:t=>({commands:e})=>e.setMark(this.name,t),toggleHighlight:t=>({commands:e})=>e.toggleMark(this.name,t),unsetHighlight:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[r.markInputRule({find:u,type:this.type})]},addPasteRules(){return[r.markPasteRule({find:l,type:this.type})]}}),h=a.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),multicolor:!0,button:({editor:e,t:n,extension:o})=>({component:s.HighlightActionButton,componentProps:{action:i=>{typeof i=="string"&&e.chain().focus().setHighlight({color:i}).run(),i===void 0&&e.chain().focus().unsetHighlight().run()},editor:e,isActive:()=>e.isActive("highlight")||!1,disabled:!1,shortcutKeys:o.options.shortcutKeys??["⇧","mod","H"],tooltip:n("editor.highlight.tooltip"),defaultColor:o.options.defaultColor}})}}});exports.Highlight=h;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-RfTlOzIr.cjs"),e=require("react/jsx-runtime"),x=require("react"),C=require("./toggle-D41PzQLJ.cjs"),m=require("./separator-DRIrVZ2N.cjs");require("./index-DV5kbgRU.cjs");const L=require("./Icon-DUpv2cI6.cjs"),a=require("./useButtonProps-C6Vpn190.cjs"),H=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,M=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,v=l.Mark.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:t=>t.getAttribute("data-color")||t.style.backgroundColor,renderHTML:t=>t.color?{"data-color":t.color,style:`background-color: ${t.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:t}){return["mark",l.mergeAttributes(this.options.HTMLAttributes,t),0]},addCommands(){return{setHighlight:t=>({commands:r})=>r.setMark(this.name,t),toggleHighlight:t=>({commands:r})=>r.toggleMark(this.name,t),unsetHighlight:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[l.markInputRule({find:H,type:this.type})]},addPasteRules(){return[l.markPasteRule({find:M,type:this.type})]}});function j({fill:t}){return e.jsx("svg",{height:"18px",version:"1.1",viewBox:"0 0 256 256",width:"18px",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:1,children:e.jsxs("g",{id:"icon/背景颜色",children:[e.jsx("g",{fill:"currentColor",children:e.jsxs("g",{transform:"translate(119.502295, 137.878331) rotate(-135.000000) translate(-119.502295, -137.878331) translate(48.002295, 31.757731)",children:[e.jsx("path",{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",fillRule:"nonzero"}),e.jsx("path",{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",fillRule:"evenodd"}),e.jsx("path",{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",fillRule:"nonzero"})]})}),e.jsx("path",{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",fill:typeof t=="string"?t:"none",id:"矩形"})]})})})}function y(){const t=a.useButtonProps(d.name),{tooltip:r=void 0,isActive:s=void 0,defaultColor:i=void 0,colors:o,action:n,shortcutKeys:g}=(t==null?void 0:t.componentProps)??{},{editorDisabled:h}=a.useActive(s),[u,f]=x.useState(i);function p(c){h||n&&(n==null||n(c),f(c))}return t?e.jsx(m.ColorPicker,{colors:o,disabled:h,highlight:!0,onChange:p,value:u,children:e.jsx(C.ActionButton,{disabled:h,tooltip:r,shortcutKeys:g,children:e.jsxs("span",{className:"richtext-flex richtext-items-center richtext-justify-center richtext-gap-[4px] richtext-text-sm",children:[e.jsx(j,{fill:u}),e.jsx(L.IconComponent,{className:"!richtext-h-3 !richtext-w-3 richtext-text-zinc-500",name:"MenuDown"})]})})}):e.jsx(e.Fragment,{})}const d=v.extend({addStorage(){return{currentColor:this.options.defaultColor||void 0}},addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),multicolor:!0,button:({editor:r,t:s,extension:i})=>({componentProps:{action:o=>{if(typeof o=="string"){r.storage.highlight.currentColor=o,r.chain().focus().setHighlight({color:o}).run();return}r.chain().focus().unsetHighlight().run()},isActive:()=>r.isActive("highlight")||!1,disabled:!1,shortcutKeys:i.options.shortcutKeys??["⇧","mod","H"],tooltip:s("editor.highlight.tooltip"),defaultColor:i.options.defaultColor}})}},addKeyboardShortcuts(){var t;return{...(t=this.parent)==null?void 0:t.call(this),"Mod-Shift-h":()=>{const r=this.storage.currentColor||this.options.defaultColor;if(!r){const{color:i}=this.editor.getAttributes("highlight");return i?this.editor.chain().focus().unsetHighlight().run():!1}return this.editor.isActive("highlight",{color:r})?this.editor.chain().focus().unsetHighlight().run():this.editor.chain().focus().setHighlight({color:r}).run()}}}});exports.Highlight=d;exports.RichTextHighlight=y;
@@ -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,6 +122,27 @@ 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
+
132
+ declare module '@tiptap/core' {
133
+ interface Commands<ReturnType> {
134
+ columns: {
135
+ insertColumns: (attrs?: {
136
+ cols: number;
137
+ }) => ReturnType;
138
+ addColBefore: () => ReturnType;
139
+ addColAfter: () => ReturnType;
140
+ deleteCol: () => ReturnType;
141
+ };
142
+ }
143
+ }
144
+
145
+
118
146
  declare module '@tiptap/core' {
119
147
  interface Commands<ReturnType> {
120
148
  drawer: {
@@ -146,7 +174,7 @@ declare module '@tiptap/core' {
146
174
  declare module '@tiptap/core' {
147
175
  interface Commands<ReturnType> {
148
176
  exportWord: {
149
- exportToWord: () => ReturnType;
177
+ exportToWord: (docState: any) => 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
 
@@ -259,16 +285,6 @@ declare module '@tiptap/core' {
259
285
  }
260
286
 
261
287
 
262
- declare module '@tiptap/core' {
263
- interface Commands<ReturnType> {
264
- lineHeight: {
265
- setLineHeight: (lineHeight: string) => ReturnType;
266
- unsetLineHeight: () => ReturnType;
267
- };
268
- }
269
- }
270
-
271
-
272
288
  declare module '@tiptap/core' {
273
289
  interface Commands<ReturnType> {
274
290
  mermaid: {
@@ -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,6 +122,27 @@ 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
+
132
+ declare module '@tiptap/core' {
133
+ interface Commands<ReturnType> {
134
+ columns: {
135
+ insertColumns: (attrs?: {
136
+ cols: number;
137
+ }) => ReturnType;
138
+ addColBefore: () => ReturnType;
139
+ addColAfter: () => ReturnType;
140
+ deleteCol: () => ReturnType;
141
+ };
142
+ }
143
+ }
144
+
145
+
118
146
  declare module '@tiptap/core' {
119
147
  interface Commands<ReturnType> {
120
148
  drawer: {
@@ -146,7 +174,7 @@ declare module '@tiptap/core' {
146
174
  declare module '@tiptap/core' {
147
175
  interface Commands<ReturnType> {
148
176
  exportWord: {
149
- exportToWord: () => ReturnType;
177
+ exportToWord: (docState: any) => 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
 
@@ -259,16 +285,6 @@ declare module '@tiptap/core' {
259
285
  }
260
286
 
261
287
 
262
- declare module '@tiptap/core' {
263
- interface Commands<ReturnType> {
264
- lineHeight: {
265
- setLineHeight: (lineHeight: string) => ReturnType;
266
- unsetLineHeight: () => ReturnType;
267
- };
268
- }
269
- }
270
-
271
-
272
288
  declare module '@tiptap/core' {
273
289
  interface Commands<ReturnType> {
274
290
  mermaid: {
@@ -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: {