reactjs-tiptap-editor 0.3.31 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (275) hide show
  1. package/README.md +8 -2
  2. package/lib/{ActionMenuButton-BCgqJsST.cjs → ActionMenuButton-CYdM1xx5.cjs} +1 -1
  3. package/lib/{ActionMenuButton-D97K0UWT.js → ActionMenuButton-DKRF6oa0.js} +1 -1
  4. package/lib/Attachment.cjs +2 -2
  5. package/lib/Attachment.d.cts +39 -43
  6. package/lib/Attachment.d.ts +39 -43
  7. package/lib/Attachment.js +7 -6
  8. package/lib/BaseKit.cjs +3 -0
  9. package/lib/BaseKit.d.cts +481 -0
  10. package/lib/BaseKit.d.ts +481 -0
  11. package/lib/BaseKit.js +132 -0
  12. package/lib/Blockquote.cjs +5 -1
  13. package/lib/Blockquote.d.cts +39 -43
  14. package/lib/Blockquote.d.ts +39 -43
  15. package/lib/Blockquote.js +33 -17
  16. package/lib/Bold.cjs +1 -1
  17. package/lib/Bold.d.cts +39 -43
  18. package/lib/Bold.d.ts +39 -43
  19. package/lib/Bold.js +23 -16
  20. package/lib/BulletList.cjs +1 -1
  21. package/lib/BulletList.d.cts +40 -44
  22. package/lib/BulletList.d.ts +40 -44
  23. package/lib/BulletList.js +11 -57
  24. package/lib/Clear.cjs +1 -1
  25. package/lib/Clear.d.cts +39 -43
  26. package/lib/Clear.d.ts +39 -43
  27. package/lib/Clear.js +4 -2
  28. package/lib/Code.cjs +1 -1
  29. package/lib/Code.d.cts +39 -43
  30. package/lib/Code.d.ts +39 -43
  31. package/lib/Code.js +29 -25
  32. package/lib/CodeBlock.cjs +2 -2
  33. package/lib/CodeBlock.d.cts +39 -43
  34. package/lib/CodeBlock.d.ts +39 -43
  35. package/lib/CodeBlock.js +3 -3
  36. package/lib/CodeView.cjs +1 -1
  37. package/lib/CodeView.d.cts +39 -43
  38. package/lib/CodeView.d.ts +39 -43
  39. package/lib/CodeView.js +3 -2
  40. package/lib/Color.cjs +1 -1
  41. package/lib/Color.d.cts +40 -44
  42. package/lib/Color.d.ts +40 -44
  43. package/lib/Color.js +42 -74
  44. package/lib/Document.cjs +1 -1
  45. package/lib/Document.d.cts +39 -43
  46. package/lib/Document.d.ts +39 -43
  47. package/lib/Document.js +4 -8
  48. package/lib/{Drawer-BHkje8ys.js → Drawer-CaAfmqNo.js} +37 -35
  49. package/lib/{Drawer-5Q_-WRhc.cjs → Drawer-CdvCMSzN.cjs} +1 -1
  50. package/lib/Drawer.cjs +1 -1
  51. package/lib/Drawer.d.cts +39 -43
  52. package/lib/Drawer.d.ts +39 -43
  53. package/lib/Drawer.js +4 -4
  54. package/lib/Emoji.cjs +1 -1
  55. package/lib/Emoji.d.cts +42 -44
  56. package/lib/Emoji.d.ts +42 -44
  57. package/lib/Emoji.js +19793 -182
  58. package/lib/{Excalidraw-GUVW-IqC.cjs → Excalidraw-BbMQhNvs.cjs} +1 -1
  59. package/lib/{Excalidraw-CG498239.js → Excalidraw-CVWz2Vyn.js} +20 -20
  60. package/lib/Excalidraw.cjs +1 -1
  61. package/lib/Excalidraw.d.cts +39 -43
  62. package/lib/Excalidraw.d.ts +39 -43
  63. package/lib/Excalidraw.js +3 -3
  64. package/lib/ExportPdf.cjs +1 -1
  65. package/lib/ExportPdf.d.cts +39 -43
  66. package/lib/ExportPdf.d.ts +39 -43
  67. package/lib/ExportPdf.js +4 -2
  68. package/lib/ExportWord.cjs +1 -1
  69. package/lib/ExportWord.d.cts +39 -43
  70. package/lib/ExportWord.d.ts +39 -43
  71. package/lib/ExportWord.js +22 -51
  72. package/lib/FontFamily.cjs +1 -1
  73. package/lib/FontFamily.d.cts +40 -44
  74. package/lib/FontFamily.d.ts +40 -44
  75. package/lib/FontFamily.js +44 -73
  76. package/lib/FontSize.cjs +1 -1
  77. package/lib/FontSize.d.cts +39 -43
  78. package/lib/FontSize.d.ts +39 -43
  79. package/lib/FontSize.js +7 -5
  80. package/lib/FormatPainter.cjs +1 -1
  81. package/lib/FormatPainter.d.cts +39 -43
  82. package/lib/FormatPainter.d.ts +39 -43
  83. package/lib/FormatPainter.js +4 -2
  84. package/lib/Heading.cjs +1 -1
  85. package/lib/Heading.d.cts +39 -43
  86. package/lib/Heading.d.ts +39 -43
  87. package/lib/Heading.js +71 -60
  88. package/lib/Highlight.cjs +1 -1
  89. package/lib/Highlight.d.cts +39 -43
  90. package/lib/Highlight.d.ts +39 -43
  91. package/lib/Highlight.js +5 -4
  92. package/lib/History.cjs +1 -1
  93. package/lib/History.d.cts +41 -45
  94. package/lib/History.d.ts +41 -45
  95. package/lib/History.js +39 -403
  96. package/lib/HorizontalRule.cjs +1 -1
  97. package/lib/HorizontalRule.d.cts +39 -43
  98. package/lib/HorizontalRule.d.ts +39 -43
  99. package/lib/HorizontalRule.js +16 -65
  100. package/lib/Iframe.cjs +1 -1
  101. package/lib/Iframe.d.cts +39 -43
  102. package/lib/Iframe.d.ts +39 -43
  103. package/lib/Iframe.js +4 -4
  104. package/lib/Image.cjs +1 -1
  105. package/lib/Image.d.cts +39 -43
  106. package/lib/Image.d.ts +39 -43
  107. package/lib/Image.js +3 -3
  108. package/lib/ImageGif.cjs +1 -1
  109. package/lib/ImageGif.d.cts +39 -43
  110. package/lib/ImageGif.d.ts +39 -43
  111. package/lib/ImageGif.js +5 -5
  112. package/lib/ImportWord.cjs +72 -72
  113. package/lib/ImportWord.d.cts +39 -43
  114. package/lib/ImportWord.d.ts +39 -43
  115. package/lib/ImportWord.js +5652 -5615
  116. package/lib/Indent.cjs +1 -1
  117. package/lib/Indent.d.cts +39 -43
  118. package/lib/Indent.d.ts +39 -43
  119. package/lib/Indent.js +4 -2
  120. package/lib/Italic.cjs +1 -1
  121. package/lib/Italic.d.cts +39 -43
  122. package/lib/Italic.d.ts +39 -43
  123. package/lib/Italic.js +20 -14
  124. package/lib/Katex.cjs +1 -1
  125. package/lib/Katex.d.cts +39 -43
  126. package/lib/Katex.d.ts +39 -43
  127. package/lib/Katex.js +12 -12
  128. package/lib/LineHeight.cjs +1 -1
  129. package/lib/LineHeight.d.cts +39 -43
  130. package/lib/LineHeight.d.ts +39 -43
  131. package/lib/LineHeight.js +5 -3
  132. package/lib/Link.cjs +1 -1
  133. package/lib/Link.d.cts +39 -43
  134. package/lib/Link.d.ts +39 -43
  135. package/lib/Link.js +4 -4
  136. package/lib/ListItem.cjs +1 -1
  137. package/lib/ListItem.d.cts +44 -44
  138. package/lib/ListItem.d.ts +44 -44
  139. package/lib/ListItem.js +4 -30
  140. package/lib/Mention.cjs +1 -1
  141. package/lib/Mention.d.cts +39 -43
  142. package/lib/Mention.d.ts +39 -43
  143. package/lib/Mention.js +161 -132
  144. package/lib/Mermaid.cjs +2 -2
  145. package/lib/Mermaid.d.cts +39 -43
  146. package/lib/Mermaid.d.ts +39 -43
  147. package/lib/Mermaid.js +50 -48
  148. package/lib/MoreMark.cjs +1 -1
  149. package/lib/MoreMark.d.cts +39 -43
  150. package/lib/MoreMark.d.ts +39 -43
  151. package/lib/MoreMark.js +5 -3
  152. package/lib/MultiColumn.cjs +1 -1
  153. package/lib/MultiColumn.d.cts +39 -43
  154. package/lib/MultiColumn.d.ts +39 -43
  155. package/lib/MultiColumn.js +2 -2
  156. package/lib/OrderedList.cjs +1 -1
  157. package/lib/OrderedList.d.cts +40 -44
  158. package/lib/OrderedList.d.ts +40 -44
  159. package/lib/OrderedList.js +11 -75
  160. package/lib/RichTextEditor-CxvwGvQG.cjs +142 -0
  161. package/lib/RichTextEditor-DGcKEUGr.js +22166 -0
  162. package/lib/SearchAndReplace.cjs +1 -1
  163. package/lib/SearchAndReplace.d.cts +52 -126
  164. package/lib/SearchAndReplace.d.ts +52 -126
  165. package/lib/SearchAndReplace.js +204 -192
  166. package/lib/Selection.cjs +1 -1
  167. package/lib/Selection.d.cts +39 -43
  168. package/lib/Selection.d.ts +39 -43
  169. package/lib/Selection.js +1 -1
  170. package/lib/SlashCommand.cjs +1 -1
  171. package/lib/SlashCommand.d.cts +39 -43
  172. package/lib/SlashCommand.d.ts +39 -43
  173. package/lib/SlashCommand.js +177 -222
  174. package/lib/Strike.cjs +1 -1
  175. package/lib/Strike.d.cts +39 -43
  176. package/lib/Strike.d.ts +39 -43
  177. package/lib/Strike.js +20 -14
  178. package/lib/SubAndSuperScript.cjs +1 -1
  179. package/lib/SubAndSuperScript.d.cts +39 -43
  180. package/lib/SubAndSuperScript.d.ts +39 -43
  181. package/lib/SubAndSuperScript.js +5 -3
  182. package/lib/Table.cjs +8 -10
  183. package/lib/Table.d.cts +42 -46
  184. package/lib/Table.d.ts +42 -46
  185. package/lib/Table.js +382 -2022
  186. package/lib/TableOfContent.cjs +1 -1
  187. package/lib/TableOfContent.d.cts +39 -43
  188. package/lib/TableOfContent.d.ts +39 -43
  189. package/lib/TableOfContent.js +5 -5
  190. package/lib/TaskList.cjs +1 -1
  191. package/lib/TaskList.d.cts +41 -45
  192. package/lib/TaskList.d.ts +41 -45
  193. package/lib/TaskList.js +12 -154
  194. package/lib/TextAlign.cjs +1 -1
  195. package/lib/TextAlign.d.cts +39 -43
  196. package/lib/TextAlign.d.ts +39 -43
  197. package/lib/TextAlign.js +11 -9
  198. package/lib/TextBubble.cjs +1 -1
  199. package/lib/TextBubble.d.cts +39 -43
  200. package/lib/TextBubble.d.ts +39 -43
  201. package/lib/TextBubble.js +5 -3
  202. package/lib/TextDirection.cjs +1 -1
  203. package/lib/TextDirection.d.cts +39 -43
  204. package/lib/TextDirection.d.ts +39 -43
  205. package/lib/TextDirection.js +2 -3
  206. package/lib/TextUnderline.cjs +1 -1
  207. package/lib/TextUnderline.d.cts +39 -43
  208. package/lib/TextUnderline.d.ts +39 -43
  209. package/lib/TextUnderline.js +40 -12
  210. package/lib/TrailingNode.cjs +1 -1
  211. package/lib/TrailingNode.d.cts +39 -43
  212. package/lib/TrailingNode.d.ts +39 -43
  213. package/lib/TrailingNode.js +1 -1
  214. package/lib/Twitter-BFULyqdR.js +1628 -0
  215. package/lib/Twitter-Cutpkh3h.cjs +1 -0
  216. package/lib/Twitter.cjs +1 -1
  217. package/lib/Twitter.d.cts +39 -43
  218. package/lib/Twitter.d.ts +39 -43
  219. package/lib/Twitter.js +3 -3
  220. package/lib/Video.cjs +1 -1
  221. package/lib/Video.d.cts +39 -43
  222. package/lib/Video.d.ts +39 -43
  223. package/lib/Video.js +3 -3
  224. package/lib/bubble-extra.cjs +2 -2
  225. package/lib/bubble-extra.d.cts +39 -43
  226. package/lib/bubble-extra.d.ts +39 -43
  227. package/lib/bubble-extra.js +200 -192
  228. package/lib/dom-dataset-_6-diIRQ.cjs +33 -0
  229. package/lib/dom-dataset-lYeH6gfI.js +2361 -0
  230. package/lib/index-5iBZLua9.cjs +12 -0
  231. package/lib/index-6D1J-A-o.cjs +1 -0
  232. package/lib/index-B96Cclrj.cjs +3 -0
  233. package/lib/index-BBz7Nmv9.js +55 -0
  234. package/lib/index-BeCTd5v2.cjs +1 -0
  235. package/lib/index-ByurDDMv.js +237 -0
  236. package/lib/index-CUogRI7j.cjs +1 -0
  237. package/lib/index-Ch6dBBad.js +709 -0
  238. package/lib/index-DF2Lp4HZ.cjs +100 -0
  239. package/lib/{index-LUL9mqY4.js → index-D_L6n8O8.js} +4 -4
  240. package/lib/index-Dbvi-Bvh.cjs +1 -0
  241. package/lib/index-DpCrt7xs.cjs +1 -0
  242. package/lib/index-DsAX1Vq8.cjs +1 -0
  243. package/lib/index-Dy4DlW9o.js +12 -0
  244. package/lib/index-J3jHHZ4d.js +200 -0
  245. package/lib/{index-CsK90iVd.js → index-LmrOdnen.js} +302 -389
  246. package/lib/index-VvXaaKe3.js +898 -0
  247. package/lib/index-kbO3iWqL.js +13432 -0
  248. package/lib/index.cjs +1 -2
  249. package/lib/index.d.cts +40 -243
  250. package/lib/index.d.ts +40 -243
  251. package/lib/index.js +2 -588
  252. package/lib/jsx-runtime-CT7Pcg-t.js +13 -0
  253. package/lib/jsx-runtime-C_NLcKys.cjs +1 -0
  254. package/lib/locale-bundle.cjs +1 -1
  255. package/lib/locale-bundle.d.cts +39 -43
  256. package/lib/locale-bundle.d.ts +39 -43
  257. package/lib/locale-bundle.js +1 -1
  258. package/lib/style.css +1 -1
  259. package/lib/{textarea-DdH64g04.cjs → textarea-DFo_aXnj.cjs} +1 -1
  260. package/lib/{textarea-CktfkXNe.js → textarea-aPtytkDx.js} +1 -1
  261. package/package.json +76 -70
  262. package/lib/RichTextEditor-DWlLqTl9.cjs +0 -140
  263. package/lib/RichTextEditor-KP2Rgcqe.js +0 -12751
  264. package/lib/Twitter-99ivY5qv.js +0 -1744
  265. package/lib/Twitter-BvfvUtNT.cjs +0 -17
  266. package/lib/dom-dataset-Byuf1YmW.cjs +0 -33
  267. package/lib/dom-dataset-Di3tIRrR.js +0 -1031
  268. package/lib/index-BI-IcZcN.cjs +0 -1
  269. package/lib/index-ByRfqzMr.cjs +0 -89
  270. package/lib/index-C1fzuXpN.js +0 -46
  271. package/lib/index-CbQQFj2T.js +0 -133
  272. package/lib/index-DI9T3iLd.js +0 -12354
  273. package/lib/index-D_A0TBRA.cjs +0 -1
  274. package/lib/index-DclQSrIx.cjs +0 -1
  275. package/lib/index-Z4b9rzn-.cjs +0 -1
@@ -1,6 +1,6 @@
1
1
  import { Editor } from '@tiptap/react';
2
2
  import { Extension } from '@tiptap/core';
3
- import { FontFamilyOptions as FontFamilyOptions_2 } from '@tiptap/extension-font-family';
3
+ import { FontFamilyOptions as FontFamilyOptions_2 } from '@tiptap/extension-text-style';
4
4
 
5
5
  /**
6
6
  * Represents the ButtonView function.
@@ -123,9 +123,8 @@ declare module '@tiptap/core' {
123
123
 
124
124
  declare module '@tiptap/core' {
125
125
  interface Commands<ReturnType> {
126
- drawer: {
127
- setDrawer: (options: any, replace?: any) => ReturnType;
128
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
126
+ excalidraw: {
127
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
129
128
  };
130
129
  }
131
130
  }
@@ -133,11 +132,9 @@ declare module '@tiptap/core' {
133
132
 
134
133
  declare module '@tiptap/core' {
135
134
  interface Commands<ReturnType> {
136
- emoji: {
137
- setEmoji: (emoji: {
138
- name: string;
139
- emoji: string;
140
- }) => ReturnType;
135
+ drawer: {
136
+ setDrawer: (options: any, replace?: any) => ReturnType;
137
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
141
138
  };
142
139
  }
143
140
  }
@@ -145,8 +142,8 @@ declare module '@tiptap/core' {
145
142
 
146
143
  declare module '@tiptap/core' {
147
144
  interface Commands<ReturnType> {
148
- excalidraw: {
149
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
145
+ exportPdf: {
146
+ exportToPdf: () => ReturnType;
150
147
  };
151
148
  }
152
149
  }
@@ -154,8 +151,8 @@ declare module '@tiptap/core' {
154
151
 
155
152
  declare module '@tiptap/core' {
156
153
  interface Commands<ReturnType> {
157
- exportPdf: {
158
- exportToPdf: () => ReturnType;
154
+ exportWord: {
155
+ exportToWord: () => ReturnType;
159
156
  };
160
157
  }
161
158
  }
@@ -163,8 +160,8 @@ declare module '@tiptap/core' {
163
160
 
164
161
  declare module '@tiptap/core' {
165
162
  interface Commands<ReturnType> {
166
- exportWord: {
167
- exportToWord: () => ReturnType;
163
+ painter: {
164
+ setPainter: (marks: Mark[]) => ReturnType;
168
165
  };
169
166
  }
170
167
  }
@@ -188,15 +185,6 @@ declare module '@tiptap/core' {
188
185
  }
189
186
 
190
187
 
191
- declare module '@tiptap/core' {
192
- interface Commands<ReturnType> {
193
- painter: {
194
- setPainter: (marks: Mark[]) => ReturnType;
195
- };
196
- }
197
- }
198
-
199
-
200
188
  declare module '@tiptap/core' {
201
189
  interface Commands<ReturnType> {
202
190
  iframe: {
@@ -252,6 +240,15 @@ declare module '@tiptap/core' {
252
240
  }
253
241
 
254
242
 
243
+ declare module '@tiptap/core' {
244
+ interface Commands<ReturnType> {
245
+ katex: {
246
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
247
+ };
248
+ }
249
+ }
250
+
251
+
255
252
  declare module '@tiptap/core' {
256
253
  interface Commands<ReturnType> {
257
254
  indent: {
@@ -270,8 +267,9 @@ declare module '@tiptap/core' {
270
267
 
271
268
  declare module '@tiptap/core' {
272
269
  interface Commands<ReturnType> {
273
- katex: {
274
- setKatex: (arg?: IKatexAttrs) => ReturnType;
270
+ lineHeight: {
271
+ setLineHeight: (lineHeight: string) => ReturnType;
272
+ unsetLineHeight: () => ReturnType;
275
273
  };
276
274
  }
277
275
  }
@@ -279,9 +277,13 @@ declare module '@tiptap/core' {
279
277
 
280
278
  declare module '@tiptap/core' {
281
279
  interface Commands<ReturnType> {
282
- lineHeight: {
283
- setLineHeight: (lineHeight: string) => ReturnType;
284
- unsetLineHeight: () => ReturnType;
280
+ columns: {
281
+ insertColumns: (attrs?: {
282
+ cols: number;
283
+ }) => ReturnType;
284
+ addColBefore: () => ReturnType;
285
+ addColAfter: () => ReturnType;
286
+ deleteCol: () => ReturnType;
285
287
  };
286
288
  }
287
289
  }
@@ -299,13 +301,9 @@ declare module '@tiptap/core' {
299
301
 
300
302
  declare module '@tiptap/core' {
301
303
  interface Commands<ReturnType> {
302
- columns: {
303
- insertColumns: (attrs?: {
304
- cols: number;
305
- }) => ReturnType;
306
- addColBefore: () => ReturnType;
307
- addColAfter: () => ReturnType;
308
- deleteCol: () => ReturnType;
304
+ tableOfContents: {
305
+ setTableOfContents: () => ReturnType;
306
+ removeTableOfContents: () => ReturnType;
309
307
  };
310
308
  }
311
309
  }
@@ -316,22 +314,20 @@ declare module '@tiptap/core' {
316
314
  search: {
317
315
  setSearchTerm: (searchTerm: string) => ReturnType;
318
316
  setReplaceTerm: (replaceTerm: string) => ReturnType;
317
+ setCaseSensitive: (caseSensitive: boolean) => ReturnType;
318
+ resetIndex: () => ReturnType;
319
+ nextSearchResult: () => ReturnType;
320
+ previousSearchResult: () => ReturnType;
319
321
  replace: () => ReturnType;
320
322
  replaceAll: () => ReturnType;
321
- goToPrevSearchResult: () => void;
322
- goToNextSearchResult: () => void;
323
- setCaseSensitive: (caseSensitive: boolean) => ReturnType;
324
323
  };
325
324
  }
326
325
  }
327
326
 
328
327
 
329
328
  declare module '@tiptap/core' {
330
- interface Commands<ReturnType> {
331
- tableOfContents: {
332
- setTableOfContents: () => ReturnType;
333
- removeTableOfContents: () => ReturnType;
334
- };
329
+ interface Storage {
330
+ searchAndReplace: SearchAndReplaceStorage;
335
331
  }
336
332
  }
337
333
 
@@ -1,6 +1,6 @@
1
1
  import { Editor } from '@tiptap/react';
2
2
  import { Extension } from '@tiptap/core';
3
- import { FontFamilyOptions as FontFamilyOptions_2 } from '@tiptap/extension-font-family';
3
+ import { FontFamilyOptions as FontFamilyOptions_2 } from '@tiptap/extension-text-style';
4
4
 
5
5
  /**
6
6
  * Represents the ButtonView function.
@@ -123,9 +123,8 @@ declare module '@tiptap/core' {
123
123
 
124
124
  declare module '@tiptap/core' {
125
125
  interface Commands<ReturnType> {
126
- drawer: {
127
- setDrawer: (options: any, replace?: any) => ReturnType;
128
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
126
+ excalidraw: {
127
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
129
128
  };
130
129
  }
131
130
  }
@@ -133,11 +132,9 @@ declare module '@tiptap/core' {
133
132
 
134
133
  declare module '@tiptap/core' {
135
134
  interface Commands<ReturnType> {
136
- emoji: {
137
- setEmoji: (emoji: {
138
- name: string;
139
- emoji: string;
140
- }) => ReturnType;
135
+ drawer: {
136
+ setDrawer: (options: any, replace?: any) => ReturnType;
137
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
141
138
  };
142
139
  }
143
140
  }
@@ -145,8 +142,8 @@ declare module '@tiptap/core' {
145
142
 
146
143
  declare module '@tiptap/core' {
147
144
  interface Commands<ReturnType> {
148
- excalidraw: {
149
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
145
+ exportPdf: {
146
+ exportToPdf: () => ReturnType;
150
147
  };
151
148
  }
152
149
  }
@@ -154,8 +151,8 @@ declare module '@tiptap/core' {
154
151
 
155
152
  declare module '@tiptap/core' {
156
153
  interface Commands<ReturnType> {
157
- exportPdf: {
158
- exportToPdf: () => ReturnType;
154
+ exportWord: {
155
+ exportToWord: () => ReturnType;
159
156
  };
160
157
  }
161
158
  }
@@ -163,8 +160,8 @@ declare module '@tiptap/core' {
163
160
 
164
161
  declare module '@tiptap/core' {
165
162
  interface Commands<ReturnType> {
166
- exportWord: {
167
- exportToWord: () => ReturnType;
163
+ painter: {
164
+ setPainter: (marks: Mark[]) => ReturnType;
168
165
  };
169
166
  }
170
167
  }
@@ -188,15 +185,6 @@ declare module '@tiptap/core' {
188
185
  }
189
186
 
190
187
 
191
- declare module '@tiptap/core' {
192
- interface Commands<ReturnType> {
193
- painter: {
194
- setPainter: (marks: Mark[]) => ReturnType;
195
- };
196
- }
197
- }
198
-
199
-
200
188
  declare module '@tiptap/core' {
201
189
  interface Commands<ReturnType> {
202
190
  iframe: {
@@ -252,6 +240,15 @@ declare module '@tiptap/core' {
252
240
  }
253
241
 
254
242
 
243
+ declare module '@tiptap/core' {
244
+ interface Commands<ReturnType> {
245
+ katex: {
246
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
247
+ };
248
+ }
249
+ }
250
+
251
+
255
252
  declare module '@tiptap/core' {
256
253
  interface Commands<ReturnType> {
257
254
  indent: {
@@ -270,8 +267,9 @@ declare module '@tiptap/core' {
270
267
 
271
268
  declare module '@tiptap/core' {
272
269
  interface Commands<ReturnType> {
273
- katex: {
274
- setKatex: (arg?: IKatexAttrs) => ReturnType;
270
+ lineHeight: {
271
+ setLineHeight: (lineHeight: string) => ReturnType;
272
+ unsetLineHeight: () => ReturnType;
275
273
  };
276
274
  }
277
275
  }
@@ -279,9 +277,13 @@ declare module '@tiptap/core' {
279
277
 
280
278
  declare module '@tiptap/core' {
281
279
  interface Commands<ReturnType> {
282
- lineHeight: {
283
- setLineHeight: (lineHeight: string) => ReturnType;
284
- unsetLineHeight: () => ReturnType;
280
+ columns: {
281
+ insertColumns: (attrs?: {
282
+ cols: number;
283
+ }) => ReturnType;
284
+ addColBefore: () => ReturnType;
285
+ addColAfter: () => ReturnType;
286
+ deleteCol: () => ReturnType;
285
287
  };
286
288
  }
287
289
  }
@@ -299,13 +301,9 @@ declare module '@tiptap/core' {
299
301
 
300
302
  declare module '@tiptap/core' {
301
303
  interface Commands<ReturnType> {
302
- columns: {
303
- insertColumns: (attrs?: {
304
- cols: number;
305
- }) => ReturnType;
306
- addColBefore: () => ReturnType;
307
- addColAfter: () => ReturnType;
308
- deleteCol: () => ReturnType;
304
+ tableOfContents: {
305
+ setTableOfContents: () => ReturnType;
306
+ removeTableOfContents: () => ReturnType;
309
307
  };
310
308
  }
311
309
  }
@@ -316,22 +314,20 @@ declare module '@tiptap/core' {
316
314
  search: {
317
315
  setSearchTerm: (searchTerm: string) => ReturnType;
318
316
  setReplaceTerm: (replaceTerm: string) => ReturnType;
317
+ setCaseSensitive: (caseSensitive: boolean) => ReturnType;
318
+ resetIndex: () => ReturnType;
319
+ nextSearchResult: () => ReturnType;
320
+ previousSearchResult: () => ReturnType;
319
321
  replace: () => ReturnType;
320
322
  replaceAll: () => ReturnType;
321
- goToPrevSearchResult: () => void;
322
- goToNextSearchResult: () => void;
323
- setCaseSensitive: (caseSensitive: boolean) => ReturnType;
324
323
  };
325
324
  }
326
325
  }
327
326
 
328
327
 
329
328
  declare module '@tiptap/core' {
330
- interface Commands<ReturnType> {
331
- tableOfContents: {
332
- setTableOfContents: () => ReturnType;
333
- removeTableOfContents: () => ReturnType;
334
- };
329
+ interface Storage {
330
+ searchAndReplace: SearchAndReplaceStorage;
335
331
  }
336
332
  }
337
333
 
package/lib/FontFamily.js CHANGED
@@ -1,130 +1,101 @@
1
- import "./index-C1fzuXpN.js";
2
- import { E as c } from "./index-DI9T3iLd.js";
3
- import { u as y, h as F } from "./index-CsK90iVd.js";
4
- import { jsxs as r, jsx as a } from "react/jsx-runtime";
5
- import { useMemo as h, Fragment as b } from "react";
6
- import { A as x } from "./ActionMenuButton-D97K0UWT.js";
7
- import { D as M, e as A, f as L, h as g, u as D, j as S } from "./RichTextEditor-KP2Rgcqe.js";
8
- const w = c.create({
9
- name: "fontFamily",
10
- addOptions() {
11
- return {
12
- types: ["textStyle"]
13
- };
14
- },
15
- addGlobalAttributes() {
16
- return [
17
- {
18
- types: this.options.types,
19
- attributes: {
20
- fontFamily: {
21
- default: null,
22
- parseHTML: (t) => t.style.fontFamily,
23
- renderHTML: (t) => t.fontFamily ? {
24
- style: `font-family: ${t.fontFamily}`
25
- } : {}
26
- }
27
- }
28
- }
29
- ];
30
- },
31
- addCommands() {
32
- return {
33
- setFontFamily: (t) => ({ chain: i }) => i().setMark("textStyle", { fontFamily: t }).run(),
34
- unsetFontFamily: () => ({ chain: t }) => t().setMark("textStyle", { fontFamily: null }).removeEmptyTextStyle().run()
35
- };
36
- }
37
- });
38
- function T(t) {
39
- var m, u, s;
40
- const { t: i, lang: f } = y(), n = h(() => {
1
+ import { F } from "./index-ByurDDMv.js";
2
+ import { u as r, D as h } from "./index-LmrOdnen.js";
3
+ import { jsxs as c, jsx as a } from "react/jsx-runtime";
4
+ import { useMemo as y, Fragment as b } from "react";
5
+ import { A as M } from "./ActionMenuButton-DKRF6oa0.js";
6
+ import { D as x, h as A, j as D, k as g, l as w, m as L } from "./RichTextEditor-DGcKEUGr.js";
7
+ function k(t) {
8
+ var m, s, d;
9
+ const { t: e, lang: f } = r(), n = y(() => {
41
10
  var o;
42
- const e = (o = t == null ? void 0 : t.items) == null ? void 0 : o.find((l) => l.isActive());
43
- return e && !e.default ? {
44
- ...e
11
+ const i = (o = t == null ? void 0 : t.items) == null ? void 0 : o.find((l) => l.isActive());
12
+ return i && !i.default ? {
13
+ ...i
45
14
  } : {
46
15
  title: t.tooltip,
47
- font: i("editor.fontFamily.default.tooltip"),
16
+ font: e("editor.fontFamily.default.tooltip"),
48
17
  isActive: () => !1,
49
18
  disabled: !1,
50
19
  action: () => t.editor.chain().focus().unsetFontFamily().run()
51
20
  };
52
- }, [i, f, t]);
53
- return /* @__PURE__ */ r(M, { children: [
21
+ }, [e, f, t]);
22
+ return /* @__PURE__ */ c(x, { children: [
54
23
  /* @__PURE__ */ a(
55
24
  A,
56
25
  {
57
26
  asChild: !0,
58
27
  disabled: t == null ? void 0 : t.disabled,
59
28
  children: /* @__PURE__ */ a(
60
- x,
29
+ M,
61
30
  {
62
31
  disabled: t == null ? void 0 : t.disabled,
63
32
  icon: "MenuDown",
64
- title: ((m = n == null ? void 0 : n.font) == null ? void 0 : m.length) > 7 ? `${(u = n == null ? void 0 : n.font) == null ? void 0 : u.slice(0, 6)}...` : n == null ? void 0 : n.font,
33
+ title: ((m = n == null ? void 0 : n.font) == null ? void 0 : m.length) > 7 ? `${(s = n == null ? void 0 : n.font) == null ? void 0 : s.slice(0, 6)}...` : n == null ? void 0 : n.font,
65
34
  tooltip: t == null ? void 0 : t.tooltip,
66
35
  tooltipOptions: t == null ? void 0 : t.tooltipOptions
67
36
  }
68
37
  )
69
38
  }
70
39
  ),
71
- /* @__PURE__ */ a(L, { className: "richtext-w-full", children: (s = t == null ? void 0 : t.items) == null ? void 0 : s.map((e, d) => {
72
- const o = e.font === i("editor.fontFamily.default.tooltip") ? {} : { fontFamily: e.font };
73
- return /* @__PURE__ */ r(b, { children: [
40
+ /* @__PURE__ */ a(D, { className: "richtext-w-full", children: (d = t == null ? void 0 : t.items) == null ? void 0 : d.map((i, u) => {
41
+ const o = i.font === e("editor.fontFamily.default.tooltip") ? {} : { fontFamily: i.font };
42
+ return /* @__PURE__ */ c(b, { children: [
74
43
  /* @__PURE__ */ a(
75
44
  g,
76
45
  {
77
- checked: (n == null ? void 0 : n.font) === e.font,
78
- onClick: e.action,
46
+ checked: (n == null ? void 0 : n.font) === i.font,
47
+ onClick: i.action,
79
48
  children: /* @__PURE__ */ a(
80
49
  "div",
81
50
  {
82
51
  className: "richtext-ml-1 richtext-h-full",
83
52
  style: o,
84
- children: e.font
53
+ children: i.font
85
54
  }
86
55
  )
87
56
  }
88
57
  ),
89
- e.font === i("editor.fontFamily.default.tooltip") && /* @__PURE__ */ a(D, {})
90
- ] }, `font-family-${d}`);
58
+ i.font === e("editor.fontFamily.default.tooltip") && /* @__PURE__ */ a(w, {})
59
+ ] }, `font-family-${u}`);
91
60
  }) })
92
61
  ] });
93
62
  }
94
- const j = /* @__PURE__ */ w.extend({
63
+ const v = /* @__PURE__ */ F.extend({
64
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
65
+ //@ts-expect-error
95
66
  addOptions() {
96
67
  var t;
97
68
  return {
98
69
  ...(t = this.parent) == null ? void 0 : t.call(this),
99
- fontFamilyList: F,
100
- button({ editor: i, extension: f, t: n }) {
70
+ fontFamilyList: h,
71
+ button({ editor: e, extension: f, t: n }) {
101
72
  var o;
102
- const { extensions: m = [] } = i.extensionManager ?? [], u = S(((o = f == null ? void 0 : f.options) == null ? void 0 : o.fontFamilyList) || []), s = m.find(
73
+ const { extensions: m = [] } = e.extensionManager ?? [], s = L(((o = f == null ? void 0 : f.options) == null ? void 0 : o.fontFamilyList) || []), d = m.find(
103
74
  (l) => l.name === "base-kit"
104
- ), e = u.map((l) => ({
75
+ ), i = s.map((l) => ({
105
76
  action: () => {
106
- i.chain().focus().setFontFamily(l.value).run();
77
+ e.chain().focus().setFontFamily(l.value).run();
107
78
  },
108
- isActive: () => i.isActive("textStyle", { fontFamily: l.value }) || !1,
109
- disabled: !i.can().setFontFamily(l.value),
79
+ isActive: () => e.isActive("textStyle", { fontFamily: l.value }) || !1,
80
+ disabled: !e.can().setFontFamily(l.value),
110
81
  title: l.name,
111
82
  font: l.value
112
83
  }));
113
- s && s.options.textStyle !== !1 && e.unshift({
114
- action: () => i.chain().focus().unsetFontFamily().run(),
84
+ d && d.options.textStyle !== !1 && i.unshift({
85
+ action: () => e.chain().focus().unsetFontFamily().run(),
115
86
  isActive: () => !1,
116
87
  disabled: !1,
117
88
  font: n("editor.fontFamily.default.tooltip"),
118
89
  title: n("editor.fontFamily.tooltip")
119
90
  });
120
- const d = e.filter((l) => l.disabled).length === e.length;
91
+ const u = i.filter((l) => l.disabled).length === i.length;
121
92
  return {
122
- component: T,
93
+ component: k,
123
94
  componentProps: {
124
95
  tooltip: n("editor.fontFamily.tooltip"),
125
- disabled: d,
126
- items: e,
127
- editor: i
96
+ disabled: u,
97
+ items: i,
98
+ editor: e
128
99
  }
129
100
  };
130
101
  }
@@ -132,6 +103,6 @@ const j = /* @__PURE__ */ w.extend({
132
103
  }
133
104
  });
134
105
  export {
135
- F as DEFAULT_FONT_FAMILY_LIST,
136
- j as FontFamily
106
+ h as DEFAULT_FONT_FAMILY_LIST,
107
+ v as FontFamily
137
108
  };
package/lib/FontSize.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./index-ByRfqzMr.cjs"),r=require("./index-D_A0TBRA.cjs"),a=require("./RichTextEditor-DWlLqTl9.cjs"),u=require("react/jsx-runtime"),m=require("react"),z=require("./ActionMenuButton-BCgqJsST.cjs");function x(t){var s;const{t:e}=r.useLocale(),l=m.useMemo(()=>{const i=(t.items||[]).find(c=>c.isActive());return i||{title:e("editor.fontSize.default.tooltip"),isActive:()=>!1}},[t]);return u.jsxs(a.DropdownMenu,{children:[u.jsx(a.DropdownMenuTrigger,{asChild:!0,disabled:t==null?void 0:t.disabled,children:u.jsx(z.ActionMenuButton,{disabled:t==null?void 0:t.disabled,icon:"MenuDown",title:l==null?void 0:l.title,tooltip:`${t==null?void 0:t.tooltip}`,tooltipOptions:t==null?void 0:t.tooltipOptions})}),u.jsx(a.DropdownMenuContent,{className:"richtext-max-h-96 richtext-w-32 richtext-overflow-y-auto",children:(s=t==null?void 0:t.items)==null?void 0:s.map((i,o)=>u.jsx(a.DropdownMenuCheckboxItem,{checked:l.title===i.title,onClick:i.action,children:u.jsx("div",{className:"richtext-ml-1 richtext-h-full",children:i.title})},`font-size-${o}`))})]})}const v=f.Extension.create({name:"fontSize",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["textStyle"],fontSizes:[...r.DEFAULT_FONT_SIZE_LIST],button({editor:e,extension:l,t:s}){var d;const i=a.ensureNameValueOptions(((d=l.options)==null?void 0:d.fontSizes)||r.DEFAULT_FONT_SIZE_VALUE),o=a.ensureNameValueOptions([r.DEFAULT_FONT_SIZE_VALUE])[0],c=i.map(n=>({title:n.value===o.value?s("editor.fontSize.default.tooltip"):String(n.name),isActive:()=>{const{fontSize:S}=e.getAttributes("textStyle");return n.value===o.value&&S===void 0?!0:e.isActive({fontSize:String(n.value)})||!1},action:()=>{if(n.value===o.value){e.commands.unsetFontSize();return}e.commands.setFontSize(String(n.value))},disabled:!e.can().setFontSize(String(n.value)),divider:n.value===o.value||!1,default:n.value===o.value||!1}));return{component:x,componentProps:{editor:e,tooltip:s("editor.fontSize.tooltip"),disabled:!1,items:c,maxHeight:280}}}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:t=>t.style.fontSize.replaceAll(/["']+/g,""),renderHTML:t=>t.fontSize?{style:`font-size: ${t.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:t=>({chain:e})=>e().setMark("textStyle",{fontSize:t}).run(),unsetFontSize:()=>({chain:t})=>t().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}});exports.DEFAULT_FONT_SIZE_LIST=r.DEFAULT_FONT_SIZE_LIST;exports.FontSize=v;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./index-DF2Lp4HZ.cjs"),r=require("./index-6D1J-A-o.cjs"),a=require("./RichTextEditor-CxvwGvQG.cjs"),u=require("react/jsx-runtime"),m=require("react"),z=require("./ActionMenuButton-CYdM1xx5.cjs");function x(t){var s;const{t:e}=r.useLocale(),l=m.useMemo(()=>{const i=(t.items||[]).find(c=>c.isActive());return i||{title:e("editor.fontSize.default.tooltip"),isActive:()=>!1}},[t]);return u.jsxs(a.DropdownMenu,{children:[u.jsx(a.DropdownMenuTrigger,{asChild:!0,disabled:t==null?void 0:t.disabled,children:u.jsx(z.ActionMenuButton,{disabled:t==null?void 0:t.disabled,icon:"MenuDown",title:l==null?void 0:l.title,tooltip:`${t==null?void 0:t.tooltip}`,tooltipOptions:t==null?void 0:t.tooltipOptions})}),u.jsx(a.DropdownMenuContent,{className:"richtext-max-h-96 richtext-w-32 richtext-overflow-y-auto",children:(s=t==null?void 0:t.items)==null?void 0:s.map((i,o)=>u.jsx(a.DropdownMenuCheckboxItem,{checked:l.title===i.title,onClick:i.action,children:u.jsx("div",{className:"richtext-ml-1 richtext-h-full",children:i.title})},`font-size-${o}`))})]})}const v=f.Extension.create({name:"fontSize",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["textStyle"],fontSizes:[...r.DEFAULT_FONT_SIZE_LIST],button({editor:e,extension:l,t:s}){var d;const i=a.ensureNameValueOptions(((d=l.options)==null?void 0:d.fontSizes)||r.DEFAULT_FONT_SIZE_VALUE),o=a.ensureNameValueOptions([r.DEFAULT_FONT_SIZE_VALUE])[0],c=i.map(n=>({title:n.value===o.value?s("editor.fontSize.default.tooltip"):String(n.name),isActive:()=>{const{fontSize:S}=e.getAttributes("textStyle");return n.value===o.value&&S===void 0?!0:e.isActive({fontSize:String(n.value)})||!1},action:()=>{if(n.value===o.value){e.commands.unsetFontSize();return}e.commands.setFontSize(String(n.value))},disabled:!e.can().setFontSize(String(n.value)),divider:n.value===o.value||!1,default:n.value===o.value||!1}));return{component:x,componentProps:{editor:e,tooltip:s("editor.fontSize.tooltip"),disabled:!1,items:c,maxHeight:280}}}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:t=>t.style.fontSize.replaceAll(/["']+/g,""),renderHTML:t=>t.fontSize?{style:`font-size: ${t.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:t=>({chain:e})=>e().setMark("textStyle",{fontSize:t}).run(),unsetFontSize:()=>({chain:t})=>t().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}});exports.DEFAULT_FONT_SIZE_LIST=r.DEFAULT_FONT_SIZE_LIST;exports.FontSize=v;