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/CodeView.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-DF2Lp4HZ.cjs"),c=require("./RichTextEditor-CxvwGvQG.cjs"),s=i.Extension.create({name:"codeView",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button({editor:t,t:o}){return{component:c.ActionButton,componentProps:{action:()=>{t.commands.toggleCodeView()},isActive:()=>t.storage.codeView.isActive||!1,disabled:!1,icon:"CodeView",tooltip:o("editor.codeView.tooltip")||"View HTML Code",customClass:"tiptap-code-view-button"}}}}},addStorage(){return{isActive:!1,originalContent:""}},addCommands(){return{toggleCodeView:()=>({editor:e})=>{const t=e.storage.codeView.isActive;if(t)e.commands.setContent(e.getText());else{const o=e.getHTML();e.storage.codeView.originalContent=o;const n=o.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;");e.commands.setContent(`<div class="tiptap-code-view-wrapper">${n}</div>`)}return e.storage.codeView.isActive=!t,!0}}}});exports.CodeView=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index-RfTlOzIr.cjs"),n=require("react/jsx-runtime"),v=require("./toggle-D41PzQLJ.cjs");require("react");require("./index-DV5kbgRU.cjs");const r=require("./useButtonProps-C6Vpn190.cjs");function w(){const e=r.useButtonProps(a.name),{icon:t=void 0,tooltip:o=void 0,shortcutKeys:i=void 0,tooltipOptions:d={},action:s=void 0,isActive:u=void 0}=(e==null?void 0:e.componentProps)??{},{dataState:l,disabled:c,update:p}=r.useToggleActive(u),g=()=>{c||s&&(s(),p())};return e?n.jsx(v.ActionButton,{action:g,dataState:l,disabled:c,icon:t,shortcutKeys:i,tooltip:o,tooltipOptions:d}):n.jsx(n.Fragment,{})}const a=m.Extension.create({name:"codeView",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button({editor:t,t:o}){return{componentProps:{action:()=>{t.commands.toggleCodeView()},isActive:()=>t.storage.codeView.isActive,disabled:!1,icon:"Html",tooltip:o("editor.codeView.tooltip")||"View HTML Code",customClass:"tiptap-code-view-button"}}}}},addStorage(){return{isActive:!1,originalContent:""}},addCommands(){return{toggleCodeView:()=>({editor:e})=>{const t=e.storage.codeView.isActive;if(t)e.commands.setContent(e.getText());else{const o=e.getHTML();e.storage.codeView.originalContent=o;const i=o.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;");e.commands.setContent(`<div class="tiptap-code-view-wrapper">${i}</div>`)}return e.storage.codeView.isActive=!t,!0}}}});exports.CodeView=a;exports.RichTextCodeView=w;
@@ -1,5 +1,6 @@
1
1
  import { Editor } from '@tiptap/react';
2
2
  import { Extension } from '@tiptap/core';
3
+ import { JSX } from 'react/jsx-runtime';
3
4
 
4
5
  /**
5
6
  * Represents the ButtonView function.
@@ -56,7 +57,7 @@ declare interface ButtonViewReturnComponentSlots {
56
57
 
57
58
  export declare const CodeView: Extension<CodeViewOptions, any>;
58
59
 
59
- export declare interface CodeViewOptions extends GeneralOptions<CodeViewOptions> {
60
+ declare interface CodeViewOptions extends GeneralOptions<CodeViewOptions> {
60
61
  isCodeViewMode?: boolean;
61
62
  }
62
63
 
@@ -76,6 +77,8 @@ declare interface GeneralOptions<T> {
76
77
  shortcutKeys?: string[] | string[][];
77
78
  }
78
79
 
80
+ export declare function RichTextCodeView(): JSX.Element;
81
+
79
82
  export { }
80
83
 
81
84
 
@@ -109,6 +112,27 @@ declare module '@tiptap/core' {
109
112
  }
110
113
 
111
114
 
115
+ declare module '@tiptap/core' {
116
+ interface Storage {
117
+ color: ColorStorage;
118
+ }
119
+ }
120
+
121
+
122
+ declare module '@tiptap/core' {
123
+ interface Commands<ReturnType> {
124
+ columns: {
125
+ insertColumns: (attrs?: {
126
+ cols: number;
127
+ }) => ReturnType;
128
+ addColBefore: () => ReturnType;
129
+ addColAfter: () => ReturnType;
130
+ deleteCol: () => ReturnType;
131
+ };
132
+ }
133
+ }
134
+
135
+
112
136
  declare module '@tiptap/core' {
113
137
  interface Commands<ReturnType> {
114
138
  drawer: {
@@ -140,7 +164,7 @@ declare module '@tiptap/core' {
140
164
  declare module '@tiptap/core' {
141
165
  interface Commands<ReturnType> {
142
166
  exportWord: {
143
- exportToWord: () => ReturnType;
167
+ exportToWord: (docState: any) => ReturnType;
144
168
  };
145
169
  }
146
170
  }
@@ -165,10 +189,8 @@ declare module '@tiptap/core' {
165
189
 
166
190
 
167
191
  declare module '@tiptap/core' {
168
- interface Commands<ReturnType> {
169
- painter: {
170
- setPainter: (marks: Mark[]) => ReturnType;
171
- };
192
+ interface Storage {
193
+ highlight: HighlightStorage;
172
194
  }
173
195
  }
174
196
 
@@ -253,16 +275,6 @@ declare module '@tiptap/core' {
253
275
  }
254
276
 
255
277
 
256
- declare module '@tiptap/core' {
257
- interface Commands<ReturnType> {
258
- lineHeight: {
259
- setLineHeight: (lineHeight: string) => ReturnType;
260
- unsetLineHeight: () => ReturnType;
261
- };
262
- }
263
- }
264
-
265
-
266
278
  declare module '@tiptap/core' {
267
279
  interface Commands<ReturnType> {
268
280
  mermaid: {
@@ -273,20 +285,6 @@ declare module '@tiptap/core' {
273
285
  }
274
286
 
275
287
 
276
- declare module '@tiptap/core' {
277
- interface Commands<ReturnType> {
278
- columns: {
279
- insertColumns: (attrs?: {
280
- cols: number;
281
- }) => ReturnType;
282
- addColBefore: () => ReturnType;
283
- addColAfter: () => ReturnType;
284
- deleteCol: () => ReturnType;
285
- };
286
- }
287
- }
288
-
289
-
290
288
  declare module '@tiptap/core' {
291
289
  interface Commands<ReturnType> {
292
290
  search: {
@@ -310,16 +308,6 @@ declare module '@tiptap/core' {
310
308
  }
311
309
 
312
310
 
313
- declare module '@tiptap/core' {
314
- interface Commands<ReturnType> {
315
- tableOfContents: {
316
- setTableOfContents: () => ReturnType;
317
- removeTableOfContents: () => ReturnType;
318
- };
319
- }
320
- }
321
-
322
-
323
311
  declare module '@tiptap/core' {
324
312
  interface Commands<ReturnType> {
325
313
  twitter: {
package/lib/CodeView.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { Editor } from '@tiptap/react';
2
2
  import { Extension } from '@tiptap/core';
3
+ import { JSX } from 'react/jsx-runtime';
3
4
 
4
5
  /**
5
6
  * Represents the ButtonView function.
@@ -56,7 +57,7 @@ declare interface ButtonViewReturnComponentSlots {
56
57
 
57
58
  export declare const CodeView: Extension<CodeViewOptions, any>;
58
59
 
59
- export declare interface CodeViewOptions extends GeneralOptions<CodeViewOptions> {
60
+ declare interface CodeViewOptions extends GeneralOptions<CodeViewOptions> {
60
61
  isCodeViewMode?: boolean;
61
62
  }
62
63
 
@@ -76,6 +77,8 @@ declare interface GeneralOptions<T> {
76
77
  shortcutKeys?: string[] | string[][];
77
78
  }
78
79
 
80
+ export declare function RichTextCodeView(): JSX.Element;
81
+
79
82
  export { }
80
83
 
81
84
 
@@ -109,6 +112,27 @@ declare module '@tiptap/core' {
109
112
  }
110
113
 
111
114
 
115
+ declare module '@tiptap/core' {
116
+ interface Storage {
117
+ color: ColorStorage;
118
+ }
119
+ }
120
+
121
+
122
+ declare module '@tiptap/core' {
123
+ interface Commands<ReturnType> {
124
+ columns: {
125
+ insertColumns: (attrs?: {
126
+ cols: number;
127
+ }) => ReturnType;
128
+ addColBefore: () => ReturnType;
129
+ addColAfter: () => ReturnType;
130
+ deleteCol: () => ReturnType;
131
+ };
132
+ }
133
+ }
134
+
135
+
112
136
  declare module '@tiptap/core' {
113
137
  interface Commands<ReturnType> {
114
138
  drawer: {
@@ -140,7 +164,7 @@ declare module '@tiptap/core' {
140
164
  declare module '@tiptap/core' {
141
165
  interface Commands<ReturnType> {
142
166
  exportWord: {
143
- exportToWord: () => ReturnType;
167
+ exportToWord: (docState: any) => ReturnType;
144
168
  };
145
169
  }
146
170
  }
@@ -165,10 +189,8 @@ declare module '@tiptap/core' {
165
189
 
166
190
 
167
191
  declare module '@tiptap/core' {
168
- interface Commands<ReturnType> {
169
- painter: {
170
- setPainter: (marks: Mark[]) => ReturnType;
171
- };
192
+ interface Storage {
193
+ highlight: HighlightStorage;
172
194
  }
173
195
  }
174
196
 
@@ -253,16 +275,6 @@ declare module '@tiptap/core' {
253
275
  }
254
276
 
255
277
 
256
- declare module '@tiptap/core' {
257
- interface Commands<ReturnType> {
258
- lineHeight: {
259
- setLineHeight: (lineHeight: string) => ReturnType;
260
- unsetLineHeight: () => ReturnType;
261
- };
262
- }
263
- }
264
-
265
-
266
278
  declare module '@tiptap/core' {
267
279
  interface Commands<ReturnType> {
268
280
  mermaid: {
@@ -273,20 +285,6 @@ declare module '@tiptap/core' {
273
285
  }
274
286
 
275
287
 
276
- declare module '@tiptap/core' {
277
- interface Commands<ReturnType> {
278
- columns: {
279
- insertColumns: (attrs?: {
280
- cols: number;
281
- }) => ReturnType;
282
- addColBefore: () => ReturnType;
283
- addColAfter: () => ReturnType;
284
- deleteCol: () => ReturnType;
285
- };
286
- }
287
- }
288
-
289
-
290
288
  declare module '@tiptap/core' {
291
289
  interface Commands<ReturnType> {
292
290
  search: {
@@ -310,16 +308,6 @@ declare module '@tiptap/core' {
310
308
  }
311
309
 
312
310
 
313
- declare module '@tiptap/core' {
314
- interface Commands<ReturnType> {
315
- tableOfContents: {
316
- setTableOfContents: () => ReturnType;
317
- removeTableOfContents: () => ReturnType;
318
- };
319
- }
320
- }
321
-
322
-
323
311
  declare module '@tiptap/core' {
324
312
  interface Commands<ReturnType> {
325
313
  twitter: {
package/lib/CodeView.js CHANGED
@@ -1,22 +1,49 @@
1
- import { E as i } from "./index-kbO3iWqL.js";
2
- import { A as s } from "./RichTextEditor-DGcKEUGr.js";
3
- const r = /* @__PURE__ */ i.create({
1
+ import { E as l } from "./index-DnWWK9F_.js";
2
+ import { jsx as c, Fragment as g } from "react/jsx-runtime";
3
+ import { A as u } from "./toggle-Cdp4IT2U.js";
4
+ import "react";
5
+ import "./index-BPfVXs5_.js";
6
+ import { u as v, a as w } from "./useButtonProps-BsEd4zYM.js";
7
+ function H() {
8
+ const t = v(C.name), {
9
+ icon: e = void 0,
10
+ tooltip: o = void 0,
11
+ shortcutKeys: i = void 0,
12
+ tooltipOptions: a = {},
13
+ action: n = void 0,
14
+ isActive: r = void 0
15
+ } = (t == null ? void 0 : t.componentProps) ?? {}, { dataState: p, disabled: s, update: d } = w(r), m = () => {
16
+ s || n && (n(), d());
17
+ };
18
+ return t ? /* @__PURE__ */ c(
19
+ u,
20
+ {
21
+ action: m,
22
+ dataState: p,
23
+ disabled: s,
24
+ icon: e,
25
+ shortcutKeys: i,
26
+ tooltip: o,
27
+ tooltipOptions: a
28
+ }
29
+ ) : /* @__PURE__ */ c(g, {});
30
+ }
31
+ const C = /* @__PURE__ */ l.create({
4
32
  name: "codeView",
5
33
  //@ts-expect-error
6
34
  addOptions() {
7
- var e;
35
+ var t;
8
36
  return {
9
- ...(e = this.parent) == null ? void 0 : e.call(this),
10
- button({ editor: t, t: o }) {
37
+ ...(t = this.parent) == null ? void 0 : t.call(this),
38
+ button({ editor: e, t: o }) {
11
39
  return {
12
- component: s,
13
40
  componentProps: {
14
41
  action: () => {
15
- t.commands.toggleCodeView();
42
+ e.commands.toggleCodeView();
16
43
  },
17
- isActive: () => t.storage.codeView.isActive || !1,
44
+ isActive: () => e.storage.codeView.isActive,
18
45
  disabled: !1,
19
- icon: "CodeView",
46
+ icon: "Html",
20
47
  tooltip: o("editor.codeView.tooltip") || "View HTML Code",
21
48
  customClass: "tiptap-code-view-button"
22
49
  }
@@ -32,23 +59,24 @@ const r = /* @__PURE__ */ i.create({
32
59
  },
33
60
  addCommands() {
34
61
  return {
35
- toggleCodeView: () => ({ editor: e }) => {
36
- const t = e.storage.codeView.isActive;
37
- if (t)
38
- e.commands.setContent(e.getText());
62
+ toggleCodeView: () => ({ editor: t }) => {
63
+ const e = t.storage.codeView.isActive;
64
+ if (e)
65
+ t.commands.setContent(t.getText());
39
66
  else {
40
- const o = e.getHTML();
41
- e.storage.codeView.originalContent = o;
42
- const n = o.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
43
- e.commands.setContent(
44
- `<div class="tiptap-code-view-wrapper">${n}</div>`
67
+ const o = t.getHTML();
68
+ t.storage.codeView.originalContent = o;
69
+ const i = o.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
70
+ t.commands.setContent(
71
+ `<div class="tiptap-code-view-wrapper">${i}</div>`
45
72
  );
46
73
  }
47
- return e.storage.codeView.isActive = !t, !0;
74
+ return t.storage.codeView.isActive = !e, !0;
48
75
  }
49
76
  };
50
77
  }
51
78
  });
52
79
  export {
53
- r as CodeView
80
+ C as CodeView,
81
+ H as RichTextCodeView
54
82
  };
package/lib/Color.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-BeCTd5v2.cjs"),e=require("react/jsx-runtime"),r=require("react"),o=require("./RichTextEditor-CxvwGvQG.cjs");function x({fill:t}){return e.jsx("svg",{width:"18px",height:"18px",viewBox:"0 0 240 240",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",children:e.jsx("g",{transform:"translate(0.000000, 0.500000)",children:e.jsxs("g",{transform:"translate(39.000000, 17.353553)",children:[e.jsx("path",{d:"M11,201.146447 L167,201.146447 C173.075132,201.146447 178,206.071314 178,212.146447 C178,218.221579 173.075132,223.146447 167,223.146447 L11,223.146447 C4.92486775,223.146447 7.43989126e-16,218.221579 0,212.146447 C-7.43989126e-16,206.071314 4.92486775,201.146447 11,201.146447 Z",id:"矩形",fill:t||"#DF2A3F",fillRule:"evenodd"}),e.jsx("path",{d:"M72.3425855,16.8295583 C75.799482,7.50883712 86.1577877,2.75526801 95.4785089,6.21216449 C100.284516,7.99463061 104.096358,11.7387855 105.968745,16.4968188 L106.112518,16.8745422 L159.385152,161.694068 C161.291848,166.877345 158.635655,172.624903 153.452378,174.531599 C148.358469,176.405421 142.719567,173.872338 140.716873,168.864661 L140.614848,168.598825 L89.211,28.86 L37.3759214,168.623816 C35.4885354,173.712715 29.8981043,176.351047 24.7909589,174.617647 L24.5226307,174.522368 C19.4337312,172.634982 16.7953993,167.044551 18.5287999,161.937406 L18.6240786,161.669077 L72.3425855,16.8295583 Z",id:"路径-21",fill:"currentColor",fillRule:"nonzero"}),e.jsx("path",{d:"M121,103.146447 C126.522847,103.146447 131,107.623599 131,113.146447 C131,118.575687 126.673329,122.994378 121.279905,123.142605 L121,123.146447 L55,123.146447 C49.4771525,123.146447 45,118.669294 45,113.146447 C45,107.717207 49.3266708,103.298515 54.7200952,103.150288 L55,103.146447 L121,103.146447 Z",id:"路径-22",fill:"currentColor",fillRule:"nonzero"})]})})})})}function h(t){const[i,a]=r.useState(void 0);function c(l){var d;(d=t.action)==null||d.call(t,l)}function n(){var l;(l=t.action)==null||l.call(t,i)}const u=r.useCallback(o.debounce(l=>{a(l)},350),[]);return e.jsxs("div",{className:"richtext-flex richtext-items-center richtext-h-[32px]",children:[e.jsx(o.ActionButton,{tooltip:t==null?void 0:t.tooltip,disabled:t==null?void 0:t.disabled,action:n,tooltipOptions:t==null?void 0:t.tooltipOptions,children:e.jsx("span",{className:"richtext-flex richtext-items-center richtext-justify-center richtext-text-sm",children:e.jsx(x,{fill:i||t.initialDisplayedColor})})}),e.jsx(o.ColorPicker,{selectedColor:i,setSelectedColor:u,onChange:c,disabled:t==null?void 0:t.disabled,colors:t==null?void 0:t.colors,defaultColor:t==null?void 0:t.defaultColor,children:e.jsx(o.Button,{variant:"ghost",size:"icon",className:"r!ichtext-h-[32px] !richtext-w-3",disabled:t==null?void 0:t.disabled,children:e.jsx(o.IconComponent,{className:"!richtext-w-3 !richtext-h-3 richtext-text-zinc-500",name:"MenuDown"})})})]})}const C=s.Color.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button({editor:i,t:a,extension:c}){return{component:h,componentProps:{colors:c.options.colors,defaultColor:c.options.defaultColor,action:n=>{n===void 0&&i.chain().focus().unsetColor().run(),typeof n=="string"&&i.chain().focus().setColor(n).run()},isActive:()=>{const{color:n}=i.getAttributes("textStyle");return n&&i.isActive({color:n})||!1},editor:i,disabled:!1,tooltip:a("editor.color.tooltip")}}}}}});exports.Color=C;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./index-N--9MohJ.cjs"),t=require("react/jsx-runtime"),d=require("react"),g=require("./toggle-D41PzQLJ.cjs"),v=require("./separator-DRIrVZ2N.cjs");require("./index-DV5kbgRU.cjs");const j=require("./Icon-DUpv2cI6.cjs"),h=require("./useButtonProps-C6Vpn190.cjs");function m({fill:e}){return t.jsx("svg",{height:"18px",version:"1.1",viewBox:"0 0 240 240",width:"18px",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:1,children:t.jsx("g",{transform:"translate(0.000000, 0.500000)",children:t.jsxs("g",{transform:"translate(39.000000, 17.353553)",children:[t.jsx("path",{d:"M11,201.146447 L167,201.146447 C173.075132,201.146447 178,206.071314 178,212.146447 C178,218.221579 173.075132,223.146447 167,223.146447 L11,223.146447 C4.92486775,223.146447 7.43989126e-16,218.221579 0,212.146447 C-7.43989126e-16,206.071314 4.92486775,201.146447 11,201.146447 Z",fill:typeof e=="string"?e:"#000",fillRule:"evenodd"}),t.jsx("path",{d:"M72.3425855,16.8295583 C75.799482,7.50883712 86.1577877,2.75526801 95.4785089,6.21216449 C100.284516,7.99463061 104.096358,11.7387855 105.968745,16.4968188 L106.112518,16.8745422 L159.385152,161.694068 C161.291848,166.877345 158.635655,172.624903 153.452378,174.531599 C148.358469,176.405421 142.719567,173.872338 140.716873,168.864661 L140.614848,168.598825 L89.211,28.86 L37.3759214,168.623816 C35.4885354,173.712715 29.8981043,176.351047 24.7909589,174.617647 L24.5226307,174.522368 C19.4337312,172.634982 16.7953993,167.044551 18.5287999,161.937406 L18.6240786,161.669077 L72.3425855,16.8295583 Z",fill:"currentColor",fillRule:"nonzero"}),t.jsx("path",{d:"M121,103.146447 C126.522847,103.146447 131,107.623599 131,113.146447 C131,118.575687 126.673329,122.994378 121.279905,123.142605 L121,123.146447 L55,123.146447 C49.4771525,123.146447 45,118.669294 45,113.146447 C45,107.717207 49.3266708,103.298515 54.7200952,103.150288 L55,103.146447 L121,103.146447 Z",fill:"currentColor",fillRule:"nonzero"})]})})})})}function L(){const e=h.useButtonProps(C.name),{tooltip:o=void 0,isActive:s=void 0,defaultColor:r=void 0,colors:n,action:i}=(e==null?void 0:e.componentProps)??{},{disabled:l,dataState:c}=h.useActive(s),[f,u]=d.useState(r);d.useEffect(()=>{u(c)},[c]);function x(a){l||i&&(i==null||i(a),u(a))}return e?t.jsx(v.ColorPicker,{colors:n,disabled:l,onChange:x,value:f,children:t.jsx(g.ActionButton,{disabled:l,tooltip:o,children:t.jsxs("span",{className:"richtext-flex richtext-items-center richtext-justify-center richtext-gap-[4px] richtext-text-sm",children:[t.jsx(m,{fill:c}),t.jsx(j.IconComponent,{className:"!richtext-h-3 !richtext-w-3 richtext-text-zinc-500",name:"MenuDown"})]})})}):t.jsx(t.Fragment,{})}const C=p.Color.extend({addStorage(){return{currentColor:this.options.defaultColor||void 0}},addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button({editor:o,t:s,extension:r}){return{componentProps:{colors:r.options.colors,defaultColor:r.options.defaultColor,action:n=>{if(typeof n=="string"){o.storage.color.currentColor=n,o.chain().focus().setColor(n).run();return}o.chain().focus().unsetColor().run()},isActive:()=>{const{color:n}=o.getAttributes("textStyle");return n},disabled:!1,shortcutKeys:r.options.shortcutKeys??["⇧","alt","C"],tooltip:s("editor.color.tooltip")}}}}},addKeyboardShortcuts(){var e;return{...(e=this.parent)==null?void 0:e.call(this),"Alt-Shift-c":()=>{const o=this.storage.currentColor||this.options.defaultColor;if(!o){const{color:r}=this.editor.getAttributes("textStyle");return r?this.editor.chain().focus().unsetColor().run():!1}return this.editor.isActive("textStyle",{color:o})?this.editor.chain().focus().unsetColor().run():this.editor.chain().focus().setColor(o).run()}}}});exports.Color=C;exports.RichTextColor=L;
package/lib/Color.d.cts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { ColorOptions as ColorOptions_2 } from '@tiptap/extension-text-style';
2
2
  import { Editor } from '@tiptap/react';
3
3
  import { Extension } from '@tiptap/core';
4
+ import { JSX } from 'react/jsx-runtime';
4
5
 
5
6
  /**
6
7
  * Represents the ButtonView function.
@@ -68,6 +69,10 @@ export declare interface ColorOptions extends ColorOptions_2, GeneralOptions<Col
68
69
  defaultColor?: string;
69
70
  }
70
71
 
72
+ export declare interface ColorStorage {
73
+ currentColor?: string;
74
+ }
75
+
71
76
  /**
72
77
  * Represents the general options for Tiptap extensions.
73
78
  */
@@ -84,6 +89,8 @@ declare interface GeneralOptions<T> {
84
89
  shortcutKeys?: string[] | string[][];
85
90
  }
86
91
 
92
+ export declare function RichTextColor(): JSX.Element;
93
+
87
94
  export { }
88
95
 
89
96
 
@@ -117,6 +124,27 @@ declare module '@tiptap/core' {
117
124
  }
118
125
 
119
126
 
127
+ declare module '@tiptap/core' {
128
+ interface Storage {
129
+ color: ColorStorage;
130
+ }
131
+ }
132
+
133
+
134
+ declare module '@tiptap/core' {
135
+ interface Commands<ReturnType> {
136
+ columns: {
137
+ insertColumns: (attrs?: {
138
+ cols: number;
139
+ }) => ReturnType;
140
+ addColBefore: () => ReturnType;
141
+ addColAfter: () => ReturnType;
142
+ deleteCol: () => ReturnType;
143
+ };
144
+ }
145
+ }
146
+
147
+
120
148
  declare module '@tiptap/core' {
121
149
  interface Commands<ReturnType> {
122
150
  drawer: {
@@ -148,7 +176,7 @@ declare module '@tiptap/core' {
148
176
  declare module '@tiptap/core' {
149
177
  interface Commands<ReturnType> {
150
178
  exportWord: {
151
- exportToWord: () => ReturnType;
179
+ exportToWord: (docState: any) => ReturnType;
152
180
  };
153
181
  }
154
182
  }
@@ -173,10 +201,8 @@ declare module '@tiptap/core' {
173
201
 
174
202
 
175
203
  declare module '@tiptap/core' {
176
- interface Commands<ReturnType> {
177
- painter: {
178
- setPainter: (marks: Mark[]) => ReturnType;
179
- };
204
+ interface Storage {
205
+ highlight: HighlightStorage;
180
206
  }
181
207
  }
182
208
 
@@ -261,16 +287,6 @@ declare module '@tiptap/core' {
261
287
  }
262
288
 
263
289
 
264
- declare module '@tiptap/core' {
265
- interface Commands<ReturnType> {
266
- lineHeight: {
267
- setLineHeight: (lineHeight: string) => ReturnType;
268
- unsetLineHeight: () => ReturnType;
269
- };
270
- }
271
- }
272
-
273
-
274
290
  declare module '@tiptap/core' {
275
291
  interface Commands<ReturnType> {
276
292
  mermaid: {
@@ -281,20 +297,6 @@ declare module '@tiptap/core' {
281
297
  }
282
298
 
283
299
 
284
- declare module '@tiptap/core' {
285
- interface Commands<ReturnType> {
286
- columns: {
287
- insertColumns: (attrs?: {
288
- cols: number;
289
- }) => ReturnType;
290
- addColBefore: () => ReturnType;
291
- addColAfter: () => ReturnType;
292
- deleteCol: () => ReturnType;
293
- };
294
- }
295
- }
296
-
297
-
298
300
  declare module '@tiptap/core' {
299
301
  interface Commands<ReturnType> {
300
302
  search: {
@@ -318,16 +320,6 @@ declare module '@tiptap/core' {
318
320
  }
319
321
 
320
322
 
321
- declare module '@tiptap/core' {
322
- interface Commands<ReturnType> {
323
- tableOfContents: {
324
- setTableOfContents: () => ReturnType;
325
- removeTableOfContents: () => ReturnType;
326
- };
327
- }
328
- }
329
-
330
-
331
323
  declare module '@tiptap/core' {
332
324
  interface Commands<ReturnType> {
333
325
  twitter: {
package/lib/Color.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { ColorOptions as ColorOptions_2 } from '@tiptap/extension-text-style';
2
2
  import { Editor } from '@tiptap/react';
3
3
  import { Extension } from '@tiptap/core';
4
+ import { JSX } from 'react/jsx-runtime';
4
5
 
5
6
  /**
6
7
  * Represents the ButtonView function.
@@ -68,6 +69,10 @@ export declare interface ColorOptions extends ColorOptions_2, GeneralOptions<Col
68
69
  defaultColor?: string;
69
70
  }
70
71
 
72
+ export declare interface ColorStorage {
73
+ currentColor?: string;
74
+ }
75
+
71
76
  /**
72
77
  * Represents the general options for Tiptap extensions.
73
78
  */
@@ -84,6 +89,8 @@ declare interface GeneralOptions<T> {
84
89
  shortcutKeys?: string[] | string[][];
85
90
  }
86
91
 
92
+ export declare function RichTextColor(): JSX.Element;
93
+
87
94
  export { }
88
95
 
89
96
 
@@ -117,6 +124,27 @@ declare module '@tiptap/core' {
117
124
  }
118
125
 
119
126
 
127
+ declare module '@tiptap/core' {
128
+ interface Storage {
129
+ color: ColorStorage;
130
+ }
131
+ }
132
+
133
+
134
+ declare module '@tiptap/core' {
135
+ interface Commands<ReturnType> {
136
+ columns: {
137
+ insertColumns: (attrs?: {
138
+ cols: number;
139
+ }) => ReturnType;
140
+ addColBefore: () => ReturnType;
141
+ addColAfter: () => ReturnType;
142
+ deleteCol: () => ReturnType;
143
+ };
144
+ }
145
+ }
146
+
147
+
120
148
  declare module '@tiptap/core' {
121
149
  interface Commands<ReturnType> {
122
150
  drawer: {
@@ -148,7 +176,7 @@ declare module '@tiptap/core' {
148
176
  declare module '@tiptap/core' {
149
177
  interface Commands<ReturnType> {
150
178
  exportWord: {
151
- exportToWord: () => ReturnType;
179
+ exportToWord: (docState: any) => ReturnType;
152
180
  };
153
181
  }
154
182
  }
@@ -173,10 +201,8 @@ declare module '@tiptap/core' {
173
201
 
174
202
 
175
203
  declare module '@tiptap/core' {
176
- interface Commands<ReturnType> {
177
- painter: {
178
- setPainter: (marks: Mark[]) => ReturnType;
179
- };
204
+ interface Storage {
205
+ highlight: HighlightStorage;
180
206
  }
181
207
  }
182
208
 
@@ -261,16 +287,6 @@ declare module '@tiptap/core' {
261
287
  }
262
288
 
263
289
 
264
- declare module '@tiptap/core' {
265
- interface Commands<ReturnType> {
266
- lineHeight: {
267
- setLineHeight: (lineHeight: string) => ReturnType;
268
- unsetLineHeight: () => ReturnType;
269
- };
270
- }
271
- }
272
-
273
-
274
290
  declare module '@tiptap/core' {
275
291
  interface Commands<ReturnType> {
276
292
  mermaid: {
@@ -281,20 +297,6 @@ declare module '@tiptap/core' {
281
297
  }
282
298
 
283
299
 
284
- declare module '@tiptap/core' {
285
- interface Commands<ReturnType> {
286
- columns: {
287
- insertColumns: (attrs?: {
288
- cols: number;
289
- }) => ReturnType;
290
- addColBefore: () => ReturnType;
291
- addColAfter: () => ReturnType;
292
- deleteCol: () => ReturnType;
293
- };
294
- }
295
- }
296
-
297
-
298
300
  declare module '@tiptap/core' {
299
301
  interface Commands<ReturnType> {
300
302
  search: {
@@ -318,16 +320,6 @@ declare module '@tiptap/core' {
318
320
  }
319
321
 
320
322
 
321
- declare module '@tiptap/core' {
322
- interface Commands<ReturnType> {
323
- tableOfContents: {
324
- setTableOfContents: () => ReturnType;
325
- removeTableOfContents: () => ReturnType;
326
- };
327
- }
328
- }
329
-
330
-
331
323
  declare module '@tiptap/core' {
332
324
  interface Commands<ReturnType> {
333
325
  twitter: {