reactjs-tiptap-editor 0.3.7 → 0.3.9

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 (225) hide show
  1. package/lib/{ActionMenuButton-CqlhqVIW.cjs → ActionMenuButton-D96eTByd.cjs} +1 -1
  2. package/lib/{ActionMenuButton-DXwpQHj4.js → ActionMenuButton-ZOYNohaO.js} +1 -1
  3. package/lib/Attachment.cjs +1 -1
  4. package/lib/Attachment.d.cts +27 -27
  5. package/lib/Attachment.d.ts +27 -27
  6. package/lib/Attachment.js +1 -1
  7. package/lib/Blockquote.cjs +1 -1
  8. package/lib/Blockquote.d.cts +27 -27
  9. package/lib/Blockquote.d.ts +27 -27
  10. package/lib/Blockquote.js +1 -1
  11. package/lib/Bold.cjs +1 -1
  12. package/lib/Bold.d.cts +27 -27
  13. package/lib/Bold.d.ts +27 -27
  14. package/lib/Bold.js +1 -1
  15. package/lib/BulletList.cjs +1 -1
  16. package/lib/BulletList.d.cts +27 -27
  17. package/lib/BulletList.d.ts +27 -27
  18. package/lib/BulletList.js +1 -1
  19. package/lib/Clear.cjs +1 -1
  20. package/lib/Clear.d.cts +27 -27
  21. package/lib/Clear.d.ts +27 -27
  22. package/lib/Clear.js +1 -1
  23. package/lib/Code.cjs +1 -1
  24. package/lib/Code.d.cts +27 -27
  25. package/lib/Code.d.ts +27 -27
  26. package/lib/Code.js +1 -1
  27. package/lib/CodeBlock.cjs +1 -1
  28. package/lib/CodeBlock.d.cts +27 -27
  29. package/lib/CodeBlock.d.ts +27 -27
  30. package/lib/CodeBlock.js +1 -1
  31. package/lib/CodeView.cjs +1 -1
  32. package/lib/CodeView.d.cts +27 -27
  33. package/lib/CodeView.d.ts +27 -27
  34. package/lib/CodeView.js +1 -1
  35. package/lib/Color.cjs +1 -1
  36. package/lib/Color.d.cts +27 -27
  37. package/lib/Color.d.ts +27 -27
  38. package/lib/Color.js +1 -1
  39. package/lib/Document.d.cts +27 -27
  40. package/lib/Document.d.ts +27 -27
  41. package/lib/{Drawer-B6uGc4Ab.js → Drawer-D7VC0bqz.js} +1 -1
  42. package/lib/{Drawer-DBt_aN5x.cjs → Drawer-hzhjTRvj.cjs} +1 -1
  43. package/lib/Drawer.cjs +1 -1
  44. package/lib/Drawer.d.cts +27 -27
  45. package/lib/Drawer.d.ts +27 -27
  46. package/lib/Drawer.js +2 -2
  47. package/lib/Emoji.cjs +1 -1
  48. package/lib/Emoji.d.cts +27 -27
  49. package/lib/Emoji.d.ts +27 -27
  50. package/lib/Emoji.js +1 -1
  51. package/lib/Excalidraw-C3YArGc8.js +278 -0
  52. package/lib/Excalidraw-DkpPLrTk.cjs +1 -0
  53. package/lib/Excalidraw.cjs +1 -1
  54. package/lib/Excalidraw.d.cts +27 -27
  55. package/lib/Excalidraw.d.ts +27 -27
  56. package/lib/Excalidraw.js +1 -1
  57. package/lib/ExportPdf.cjs +1 -1
  58. package/lib/ExportPdf.d.cts +27 -27
  59. package/lib/ExportPdf.d.ts +27 -27
  60. package/lib/ExportPdf.js +1 -1
  61. package/lib/ExportWord.cjs +1 -1
  62. package/lib/ExportWord.d.cts +27 -27
  63. package/lib/ExportWord.d.ts +27 -27
  64. package/lib/ExportWord.js +1 -1
  65. package/lib/FontFamily.cjs +1 -1
  66. package/lib/FontFamily.d.cts +27 -27
  67. package/lib/FontFamily.d.ts +27 -27
  68. package/lib/FontFamily.js +2 -2
  69. package/lib/FontSize.cjs +1 -1
  70. package/lib/FontSize.d.cts +27 -27
  71. package/lib/FontSize.d.ts +27 -27
  72. package/lib/FontSize.js +2 -2
  73. package/lib/FormatPainter.cjs +1 -1
  74. package/lib/FormatPainter.d.cts +27 -27
  75. package/lib/FormatPainter.d.ts +27 -27
  76. package/lib/FormatPainter.js +1 -1
  77. package/lib/Heading.cjs +1 -1
  78. package/lib/Heading.d.cts +27 -27
  79. package/lib/Heading.d.ts +27 -27
  80. package/lib/Heading.js +2 -2
  81. package/lib/Highlight.cjs +1 -1
  82. package/lib/Highlight.d.cts +27 -27
  83. package/lib/Highlight.d.ts +27 -27
  84. package/lib/Highlight.js +1 -1
  85. package/lib/History.cjs +1 -1
  86. package/lib/History.d.cts +27 -27
  87. package/lib/History.d.ts +27 -27
  88. package/lib/History.js +1 -1
  89. package/lib/HorizontalRule.cjs +1 -1
  90. package/lib/HorizontalRule.d.cts +27 -27
  91. package/lib/HorizontalRule.d.ts +27 -27
  92. package/lib/HorizontalRule.js +1 -1
  93. package/lib/Iframe.cjs +1 -1
  94. package/lib/Iframe.d.cts +27 -27
  95. package/lib/Iframe.d.ts +27 -27
  96. package/lib/Iframe.js +1 -1
  97. package/lib/Image.cjs +1 -1
  98. package/lib/Image.d.cts +27 -27
  99. package/lib/Image.d.ts +27 -27
  100. package/lib/Image.js +1 -1
  101. package/lib/ImageGif.cjs +1 -1
  102. package/lib/ImageGif.d.cts +27 -27
  103. package/lib/ImageGif.d.ts +27 -27
  104. package/lib/ImageGif.js +1 -1
  105. package/lib/ImportWord.cjs +1 -1
  106. package/lib/ImportWord.d.cts +27 -27
  107. package/lib/ImportWord.d.ts +27 -27
  108. package/lib/ImportWord.js +1 -1
  109. package/lib/Indent.cjs +1 -1
  110. package/lib/Indent.d.cts +27 -27
  111. package/lib/Indent.d.ts +27 -27
  112. package/lib/Indent.js +1 -1
  113. package/lib/Italic.cjs +1 -1
  114. package/lib/Italic.d.cts +27 -27
  115. package/lib/Italic.d.ts +27 -27
  116. package/lib/Italic.js +1 -1
  117. package/lib/Katex.cjs +1 -1
  118. package/lib/Katex.d.cts +27 -27
  119. package/lib/Katex.d.ts +27 -27
  120. package/lib/Katex.js +2 -2
  121. package/lib/LineHeight.cjs +1 -1
  122. package/lib/LineHeight.d.cts +27 -27
  123. package/lib/LineHeight.d.ts +27 -27
  124. package/lib/LineHeight.js +1 -1
  125. package/lib/Link.cjs +1 -1
  126. package/lib/Link.d.cts +27 -27
  127. package/lib/Link.d.ts +27 -27
  128. package/lib/Link.js +1 -1
  129. package/lib/ListItem.d.cts +27 -27
  130. package/lib/ListItem.d.ts +27 -27
  131. package/lib/Mention.cjs +1 -1
  132. package/lib/Mention.d.cts +27 -27
  133. package/lib/Mention.d.ts +27 -27
  134. package/lib/Mermaid.cjs +1 -1
  135. package/lib/Mermaid.d.cts +27 -27
  136. package/lib/Mermaid.d.ts +27 -27
  137. package/lib/Mermaid.js +2 -2
  138. package/lib/MoreMark.cjs +1 -1
  139. package/lib/MoreMark.d.cts +27 -27
  140. package/lib/MoreMark.d.ts +27 -27
  141. package/lib/MoreMark.js +1 -1
  142. package/lib/MultiColumn.cjs +1 -1
  143. package/lib/MultiColumn.d.cts +27 -27
  144. package/lib/MultiColumn.d.ts +27 -27
  145. package/lib/MultiColumn.js +1 -1
  146. package/lib/OrderedList.cjs +1 -1
  147. package/lib/OrderedList.d.cts +27 -27
  148. package/lib/OrderedList.d.ts +27 -27
  149. package/lib/OrderedList.js +1 -1
  150. package/lib/{RichTextEditor-BfYZYQb9.js → RichTextEditor-CRDKX-F8.js} +11 -11
  151. package/lib/{RichTextEditor-Db6oQoYY.cjs → RichTextEditor-ymQlnG9m.cjs} +1 -1
  152. package/lib/SearchAndReplace.cjs +1 -1
  153. package/lib/SearchAndReplace.d.cts +27 -27
  154. package/lib/SearchAndReplace.d.ts +27 -27
  155. package/lib/SearchAndReplace.js +1 -1
  156. package/lib/Selection.d.cts +27 -27
  157. package/lib/Selection.d.ts +27 -27
  158. package/lib/SlashCommand.cjs +1 -1
  159. package/lib/SlashCommand.d.cts +27 -27
  160. package/lib/SlashCommand.d.ts +27 -27
  161. package/lib/SlashCommand.js +1 -1
  162. package/lib/Strike.cjs +1 -1
  163. package/lib/Strike.d.cts +27 -27
  164. package/lib/Strike.d.ts +27 -27
  165. package/lib/Strike.js +1 -1
  166. package/lib/SubAndSuperScript.cjs +1 -1
  167. package/lib/SubAndSuperScript.d.cts +27 -27
  168. package/lib/SubAndSuperScript.d.ts +27 -27
  169. package/lib/SubAndSuperScript.js +1 -1
  170. package/lib/Table.cjs +1 -1
  171. package/lib/Table.d.cts +27 -27
  172. package/lib/Table.d.ts +27 -27
  173. package/lib/Table.js +1 -1
  174. package/lib/TableOfContent.cjs +1 -1
  175. package/lib/TableOfContent.d.cts +27 -27
  176. package/lib/TableOfContent.d.ts +27 -27
  177. package/lib/TableOfContent.js +1 -1
  178. package/lib/TaskList.cjs +1 -1
  179. package/lib/TaskList.d.cts +27 -27
  180. package/lib/TaskList.d.ts +27 -27
  181. package/lib/TaskList.js +1 -1
  182. package/lib/TextAlign.cjs +1 -1
  183. package/lib/TextAlign.d.cts +27 -27
  184. package/lib/TextAlign.d.ts +27 -27
  185. package/lib/TextAlign.js +1 -1
  186. package/lib/TextBubble.cjs +1 -1
  187. package/lib/TextBubble.d.cts +27 -27
  188. package/lib/TextBubble.d.ts +27 -27
  189. package/lib/TextBubble.js +1 -1
  190. package/lib/TextDirection.cjs +1 -1
  191. package/lib/TextDirection.d.cts +27 -27
  192. package/lib/TextDirection.d.ts +27 -27
  193. package/lib/TextDirection.js +1 -1
  194. package/lib/TextUnderline.cjs +1 -1
  195. package/lib/TextUnderline.d.cts +27 -27
  196. package/lib/TextUnderline.d.ts +27 -27
  197. package/lib/TextUnderline.js +1 -1
  198. package/lib/TrailingNode.d.cts +27 -27
  199. package/lib/TrailingNode.d.ts +27 -27
  200. package/lib/{Twitter-DLO12QnF.cjs → Twitter-CMr6GpHp.cjs} +1 -1
  201. package/lib/{Twitter-CZA9dXpC.js → Twitter-CjAodXzu.js} +1 -1
  202. package/lib/Twitter.cjs +1 -1
  203. package/lib/Twitter.d.cts +27 -27
  204. package/lib/Twitter.d.ts +27 -27
  205. package/lib/Twitter.js +1 -1
  206. package/lib/Video.cjs +1 -1
  207. package/lib/Video.d.cts +27 -27
  208. package/lib/Video.d.ts +27 -27
  209. package/lib/Video.js +1 -1
  210. package/lib/bubble-extra.cjs +2 -2
  211. package/lib/bubble-extra.d.cts +27 -27
  212. package/lib/bubble-extra.d.ts +27 -27
  213. package/lib/bubble-extra.js +6 -6
  214. package/lib/{dom-dataset-DmsCLv1q.cjs → dom-dataset-Cuy-pIfj.cjs} +3 -3
  215. package/lib/index.cjs +1 -1
  216. package/lib/index.d.cts +27 -27
  217. package/lib/index.d.ts +27 -27
  218. package/lib/index.js +2 -2
  219. package/lib/locale-bundle.d.cts +27 -27
  220. package/lib/locale-bundle.d.ts +27 -27
  221. package/lib/{textarea-ILk3QoYy.cjs → textarea-Ci1tHD6V.cjs} +1 -1
  222. package/lib/{textarea-BUlQB7hI.js → textarea-CtL8w6IS.js} +1 -1
  223. package/package.json +1 -2
  224. package/lib/Excalidraw-Bp252YTN.js +0 -651
  225. package/lib/Excalidraw-CYLyPnI4.cjs +0 -1
@@ -139,19 +139,15 @@ declare module '@tiptap/core' {
139
139
 
140
140
  declare module '@tiptap/core' {
141
141
  interface Commands<ReturnType> {
142
- imageGifUpload: {
143
- /**
144
- * Add an image gif
145
- */
146
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
142
+ indent: {
147
143
  /**
148
- * Update an image gif
144
+ * Set the indent attribute
149
145
  */
150
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
146
+ indent: () => ReturnType;
151
147
  /**
152
- * Set image alignment
148
+ * Set the outdent attribute
153
149
  */
154
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
150
+ outdent: () => ReturnType;
155
151
  };
156
152
  }
157
153
  }
@@ -159,15 +155,19 @@ declare module '@tiptap/core' {
159
155
 
160
156
  declare module '@tiptap/core' {
161
157
  interface Commands<ReturnType> {
162
- indent: {
158
+ imageGifUpload: {
163
159
  /**
164
- * Set the indent attribute
160
+ * Add an image gif
165
161
  */
166
- indent: () => ReturnType;
162
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
167
163
  /**
168
- * Set the outdent attribute
164
+ * Update an image gif
169
165
  */
170
- outdent: () => ReturnType;
166
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
167
+ /**
168
+ * Set image alignment
169
+ */
170
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
171
171
  };
172
172
  }
173
173
  }
@@ -243,15 +243,14 @@ declare module '@tiptap/core' {
243
243
 
244
244
  declare module '@tiptap/core' {
245
245
  interface Commands<ReturnType> {
246
- video: {
247
- /**
248
- * Add an video
249
- */
250
- setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
246
+ twitter: {
251
247
  /**
252
- * Update an video
248
+ * Insert a tweet
249
+ * @param options The tweet attributes
250
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
253
251
  */
254
- updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
252
+ setTweet: (options: SetTweetOptions) => ReturnType;
253
+ updateTweet: (options: SetTweetOptions) => ReturnType;
255
254
  };
256
255
  }
257
256
  }
@@ -259,14 +258,15 @@ declare module '@tiptap/core' {
259
258
 
260
259
  declare module '@tiptap/core' {
261
260
  interface Commands<ReturnType> {
262
- twitter: {
261
+ video: {
263
262
  /**
264
- * Insert a tweet
265
- * @param options The tweet attributes
266
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
263
+ * Add an video
267
264
  */
268
- setTweet: (options: SetTweetOptions) => ReturnType;
269
- updateTweet: (options: SetTweetOptions) => ReturnType;
265
+ setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
266
+ /**
267
+ * Update an video
268
+ */
269
+ updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
270
270
  };
271
271
  }
272
272
  }
package/lib/ExportPdf.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { E as c } from "./index-CXIIg9Sq.js";
2
- import { A as d } from "./RichTextEditor-BfYZYQb9.js";
2
+ import { A as d } from "./RichTextEditor-CRDKX-F8.js";
3
3
  function s(n) {
4
4
  const t = document.createElement("iframe");
5
5
  t.setAttribute("style", "position: absolute; width: 0; height: 0; top: 0; left: 0;"), document.body.appendChild(t), t.textContent = `
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-CSvnpArE.cjs"),s=require("docx"),t=require("prosemirror-docx"),i=require("./RichTextEditor-Db6oQoYY.cjs"),l=typeof window<"u";function c(o,e){if(l){const n=window.URL.createObjectURL(o),r=document.createElement("a");return r.href=n,r.download=e,r.click(),window.URL.revokeObjectURL(n),Promise.resolve()}return console.error("Download is not supported in Node.js"),Promise.resolve()}const u={...t.defaultNodes,hardBreak:t.defaultNodes.hard_break,codeBlock:t.defaultNodes.code_block,orderedList:t.defaultNodes.ordered_list,listItem:t.defaultNodes.list_item,bulletList:t.defaultNodes.bullet_list,horizontalRule:t.defaultNodes.horizontal_rule,image(o,e){o.renderInline(e),o.closeBlock(e)},table(o,e){o.table(e,{tableOptions:{width:{size:100,type:s.WidthType.PERCENTAGE}}})}},p=new t.DocxSerializer(u,t.defaultMarks),f=a.Extension.create({name:"exportWord",addOptions(){var o;return{...(o=this.parent)==null?void 0:o.call(this),button:({editor:e,t:n})=>({component:i.ActionButton,componentProps:{icon:"ExportWord",action:()=>{e==null||e.commands.exportToWord()},tooltip:n("editor.exportWord.tooltip"),isActive:()=>!1,disabled:!1}})}},addCommands(){return{exportToWord:()=>async({editor:o})=>{const e={getImageBuffer:async r=>{const d=await(await fetch(r)).arrayBuffer();return new Uint8Array(d)}},n=p.serialize(o.state.doc,e);return s.Packer.toBlob(n).then(r=>c(new Blob([r]),"export-document.docx")),!0}}}});exports.ExportWord=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-CSvnpArE.cjs"),s=require("docx"),t=require("prosemirror-docx"),i=require("./RichTextEditor-ymQlnG9m.cjs"),l=typeof window<"u";function c(o,e){if(l){const n=window.URL.createObjectURL(o),r=document.createElement("a");return r.href=n,r.download=e,r.click(),window.URL.revokeObjectURL(n),Promise.resolve()}return console.error("Download is not supported in Node.js"),Promise.resolve()}const u={...t.defaultNodes,hardBreak:t.defaultNodes.hard_break,codeBlock:t.defaultNodes.code_block,orderedList:t.defaultNodes.ordered_list,listItem:t.defaultNodes.list_item,bulletList:t.defaultNodes.bullet_list,horizontalRule:t.defaultNodes.horizontal_rule,image(o,e){o.renderInline(e),o.closeBlock(e)},table(o,e){o.table(e,{tableOptions:{width:{size:100,type:s.WidthType.PERCENTAGE}}})}},p=new t.DocxSerializer(u,t.defaultMarks),f=a.Extension.create({name:"exportWord",addOptions(){var o;return{...(o=this.parent)==null?void 0:o.call(this),button:({editor:e,t:n})=>({component:i.ActionButton,componentProps:{icon:"ExportWord",action:()=>{e==null||e.commands.exportToWord()},tooltip:n("editor.exportWord.tooltip"),isActive:()=>!1,disabled:!1}})}},addCommands(){return{exportToWord:()=>async({editor:o})=>{const e={getImageBuffer:async r=>{const d=await(await fetch(r)).arrayBuffer();return new Uint8Array(d)}},n=p.serialize(o.state.doc,e);return s.Packer.toBlob(n).then(r=>c(new Blob([r]),"export-document.docx")),!0}}}});exports.ExportWord=f;
@@ -210,19 +210,15 @@ declare module '@tiptap/core' {
210
210
 
211
211
  declare module '@tiptap/core' {
212
212
  interface Commands<ReturnType> {
213
- imageGifUpload: {
214
- /**
215
- * Add an image gif
216
- */
217
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
213
+ indent: {
218
214
  /**
219
- * Update an image gif
215
+ * Set the indent attribute
220
216
  */
221
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
217
+ indent: () => ReturnType;
222
218
  /**
223
- * Set image alignment
219
+ * Set the outdent attribute
224
220
  */
225
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
221
+ outdent: () => ReturnType;
226
222
  };
227
223
  }
228
224
  }
@@ -230,15 +226,19 @@ declare module '@tiptap/core' {
230
226
 
231
227
  declare module '@tiptap/core' {
232
228
  interface Commands<ReturnType> {
233
- indent: {
229
+ imageGifUpload: {
234
230
  /**
235
- * Set the indent attribute
231
+ * Add an image gif
236
232
  */
237
- indent: () => ReturnType;
233
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
238
234
  /**
239
- * Set the outdent attribute
235
+ * Update an image gif
240
236
  */
241
- outdent: () => ReturnType;
237
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
238
+ /**
239
+ * Set image alignment
240
+ */
241
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
242
242
  };
243
243
  }
244
244
  }
@@ -314,15 +314,14 @@ declare module '@tiptap/core' {
314
314
 
315
315
  declare module '@tiptap/core' {
316
316
  interface Commands<ReturnType> {
317
- video: {
318
- /**
319
- * Add an video
320
- */
321
- setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
317
+ twitter: {
322
318
  /**
323
- * Update an video
319
+ * Insert a tweet
320
+ * @param options The tweet attributes
321
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
324
322
  */
325
- updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
323
+ setTweet: (options: SetTweetOptions) => ReturnType;
324
+ updateTweet: (options: SetTweetOptions) => ReturnType;
326
325
  };
327
326
  }
328
327
  }
@@ -330,14 +329,15 @@ declare module '@tiptap/core' {
330
329
 
331
330
  declare module '@tiptap/core' {
332
331
  interface Commands<ReturnType> {
333
- twitter: {
332
+ video: {
334
333
  /**
335
- * Insert a tweet
336
- * @param options The tweet attributes
337
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
334
+ * Add an video
338
335
  */
339
- setTweet: (options: SetTweetOptions) => ReturnType;
340
- updateTweet: (options: SetTweetOptions) => ReturnType;
336
+ setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
337
+ /**
338
+ * Update an video
339
+ */
340
+ updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
341
341
  };
342
342
  }
343
343
  }
@@ -210,19 +210,15 @@ declare module '@tiptap/core' {
210
210
 
211
211
  declare module '@tiptap/core' {
212
212
  interface Commands<ReturnType> {
213
- imageGifUpload: {
214
- /**
215
- * Add an image gif
216
- */
217
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
213
+ indent: {
218
214
  /**
219
- * Update an image gif
215
+ * Set the indent attribute
220
216
  */
221
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
217
+ indent: () => ReturnType;
222
218
  /**
223
- * Set image alignment
219
+ * Set the outdent attribute
224
220
  */
225
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
221
+ outdent: () => ReturnType;
226
222
  };
227
223
  }
228
224
  }
@@ -230,15 +226,19 @@ declare module '@tiptap/core' {
230
226
 
231
227
  declare module '@tiptap/core' {
232
228
  interface Commands<ReturnType> {
233
- indent: {
229
+ imageGifUpload: {
234
230
  /**
235
- * Set the indent attribute
231
+ * Add an image gif
236
232
  */
237
- indent: () => ReturnType;
233
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
238
234
  /**
239
- * Set the outdent attribute
235
+ * Update an image gif
240
236
  */
241
- outdent: () => ReturnType;
237
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
238
+ /**
239
+ * Set image alignment
240
+ */
241
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
242
242
  };
243
243
  }
244
244
  }
@@ -314,15 +314,14 @@ declare module '@tiptap/core' {
314
314
 
315
315
  declare module '@tiptap/core' {
316
316
  interface Commands<ReturnType> {
317
- video: {
318
- /**
319
- * Add an video
320
- */
321
- setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
317
+ twitter: {
322
318
  /**
323
- * Update an video
319
+ * Insert a tweet
320
+ * @param options The tweet attributes
321
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
324
322
  */
325
- updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
323
+ setTweet: (options: SetTweetOptions) => ReturnType;
324
+ updateTweet: (options: SetTweetOptions) => ReturnType;
326
325
  };
327
326
  }
328
327
  }
@@ -330,14 +329,15 @@ declare module '@tiptap/core' {
330
329
 
331
330
  declare module '@tiptap/core' {
332
331
  interface Commands<ReturnType> {
333
- twitter: {
332
+ video: {
334
333
  /**
335
- * Insert a tweet
336
- * @param options The tweet attributes
337
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
334
+ * Add an video
338
335
  */
339
- setTweet: (options: SetTweetOptions) => ReturnType;
340
- updateTweet: (options: SetTweetOptions) => ReturnType;
336
+ setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
337
+ /**
338
+ * Update an video
339
+ */
340
+ updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
341
341
  };
342
342
  }
343
343
  }
package/lib/ExportWord.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { E as a } from "./index-CXIIg9Sq.js";
2
2
  import { Packer as i, WidthType as c } from "docx";
3
3
  import { defaultNodes as t, DocxSerializer as d, defaultMarks as l } from "prosemirror-docx";
4
- import { A as p } from "./RichTextEditor-BfYZYQb9.js";
4
+ import { A as p } from "./RichTextEditor-CRDKX-F8.js";
5
5
  const m = typeof window < "u";
6
6
  function u(e, o) {
7
7
  if (m) {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index-CrxasX7b.cjs");const y=require("./index-CSvnpArE.cjs"),m=require("./index-Dz3YxLE7.cjs"),o=require("react/jsx-runtime"),F=require("react"),h=require("./ActionMenuButton-CqlhqVIW.cjs"),s=require("./RichTextEditor-Db6oQoYY.cjs"),x=y.Extension.create({name:"fontFamily",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:t=>t.style.fontFamily,renderHTML:t=>t.fontFamily?{style:`font-family: ${t.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:t=>({chain:i})=>i().setMark("textStyle",{fontFamily:t}).run(),unsetFontFamily:()=>({chain:t})=>t().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}});function M(t){var r,f,d;const{t:i,lang:u}=m.useLocale(),e=F.useMemo(()=>{var a;const n=(a=t==null?void 0:t.items)==null?void 0:a.find(l=>l.isActive());return n&&!n.default?{...n}:{title:t.tooltip,font:i("editor.fontFamily.default.tooltip"),isActive:()=>!1,disabled:!1,action:()=>t.editor.chain().focus().unsetFontFamily().run()}},[i,u,t]);return o.jsxs(s.DropdownMenu,{children:[o.jsx(s.DropdownMenuTrigger,{asChild:!0,disabled:t==null?void 0:t.disabled,children:o.jsx(h.ActionMenuButton,{disabled:t==null?void 0:t.disabled,icon:"MenuDown",title:((r=e==null?void 0:e.font)==null?void 0:r.length)>7?`${(f=e==null?void 0:e.font)==null?void 0:f.slice(0,6)}...`:e==null?void 0:e.font,tooltip:t==null?void 0:t.tooltip})}),o.jsx(s.DropdownMenuContent,{className:"richtext-w-full",children:(d=t==null?void 0:t.items)==null?void 0:d.map((n,c)=>{const a=n.font===i("editor.fontFamily.default.tooltip")?{}:{fontFamily:n.font};return o.jsxs(F.Fragment,{children:[o.jsx(s.DropdownMenuCheckboxItem,{checked:(e==null?void 0:e.font)===n.font,onClick:n.action,children:o.jsx("div",{className:"richtext-ml-1 richtext-h-full",style:a,children:n.font})}),n.font===i("editor.fontFamily.default.tooltip")&&o.jsx(s.DropdownMenuSeparator,{})]},`font-family-${c}`)})})]})}const b=x.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),fontFamilyList:m.DEFAULT_FONT_FAMILY_LIST,button({editor:i,extension:u,t:e}){var a;const{extensions:r=[]}=i.extensionManager??[],f=s.ensureNameValueOptions(((a=u==null?void 0:u.options)==null?void 0:a.fontFamilyList)||[]),d=r.find(l=>l.name==="base-kit"),n=f.map(l=>({action:()=>{i.chain().focus().setFontFamily(l.value).run()},isActive:()=>i.isActive("textStyle",{fontFamily:l.value})||!1,disabled:!i.can().setFontFamily(l.value),title:l.name,font:l.value}));d&&d.options.textStyle!==!1&&n.unshift({action:()=>i.chain().focus().unsetFontFamily().run(),isActive:()=>!1,disabled:!1,font:e("editor.fontFamily.default.tooltip"),title:e("editor.fontFamily.tooltip")});const c=n.filter(l=>l.disabled).length===n.length;return{component:M,componentProps:{tooltip:e("editor.fontFamily.tooltip"),disabled:c,items:n,editor:i}}}}}});exports.DEFAULT_FONT_FAMILY_LIST=m.DEFAULT_FONT_FAMILY_LIST;exports.FontFamily=b;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index-CrxasX7b.cjs");const y=require("./index-CSvnpArE.cjs"),m=require("./index-Dz3YxLE7.cjs"),o=require("react/jsx-runtime"),F=require("react"),h=require("./ActionMenuButton-D96eTByd.cjs"),s=require("./RichTextEditor-ymQlnG9m.cjs"),x=y.Extension.create({name:"fontFamily",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:t=>t.style.fontFamily,renderHTML:t=>t.fontFamily?{style:`font-family: ${t.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:t=>({chain:i})=>i().setMark("textStyle",{fontFamily:t}).run(),unsetFontFamily:()=>({chain:t})=>t().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}});function M(t){var r,f,d;const{t:i,lang:u}=m.useLocale(),e=F.useMemo(()=>{var a;const n=(a=t==null?void 0:t.items)==null?void 0:a.find(l=>l.isActive());return n&&!n.default?{...n}:{title:t.tooltip,font:i("editor.fontFamily.default.tooltip"),isActive:()=>!1,disabled:!1,action:()=>t.editor.chain().focus().unsetFontFamily().run()}},[i,u,t]);return o.jsxs(s.DropdownMenu,{children:[o.jsx(s.DropdownMenuTrigger,{asChild:!0,disabled:t==null?void 0:t.disabled,children:o.jsx(h.ActionMenuButton,{disabled:t==null?void 0:t.disabled,icon:"MenuDown",title:((r=e==null?void 0:e.font)==null?void 0:r.length)>7?`${(f=e==null?void 0:e.font)==null?void 0:f.slice(0,6)}...`:e==null?void 0:e.font,tooltip:t==null?void 0:t.tooltip})}),o.jsx(s.DropdownMenuContent,{className:"richtext-w-full",children:(d=t==null?void 0:t.items)==null?void 0:d.map((n,c)=>{const a=n.font===i("editor.fontFamily.default.tooltip")?{}:{fontFamily:n.font};return o.jsxs(F.Fragment,{children:[o.jsx(s.DropdownMenuCheckboxItem,{checked:(e==null?void 0:e.font)===n.font,onClick:n.action,children:o.jsx("div",{className:"richtext-ml-1 richtext-h-full",style:a,children:n.font})}),n.font===i("editor.fontFamily.default.tooltip")&&o.jsx(s.DropdownMenuSeparator,{})]},`font-family-${c}`)})})]})}const b=x.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),fontFamilyList:m.DEFAULT_FONT_FAMILY_LIST,button({editor:i,extension:u,t:e}){var a;const{extensions:r=[]}=i.extensionManager??[],f=s.ensureNameValueOptions(((a=u==null?void 0:u.options)==null?void 0:a.fontFamilyList)||[]),d=r.find(l=>l.name==="base-kit"),n=f.map(l=>({action:()=>{i.chain().focus().setFontFamily(l.value).run()},isActive:()=>i.isActive("textStyle",{fontFamily:l.value})||!1,disabled:!i.can().setFontFamily(l.value),title:l.name,font:l.value}));d&&d.options.textStyle!==!1&&n.unshift({action:()=>i.chain().focus().unsetFontFamily().run(),isActive:()=>!1,disabled:!1,font:e("editor.fontFamily.default.tooltip"),title:e("editor.fontFamily.tooltip")});const c=n.filter(l=>l.disabled).length===n.length;return{component:M,componentProps:{tooltip:e("editor.fontFamily.tooltip"),disabled:c,items:n,editor:i}}}}}});exports.DEFAULT_FONT_FAMILY_LIST=m.DEFAULT_FONT_FAMILY_LIST;exports.FontFamily=b;
@@ -223,19 +223,15 @@ declare module '@tiptap/core' {
223
223
 
224
224
  declare module '@tiptap/core' {
225
225
  interface Commands<ReturnType> {
226
- imageGifUpload: {
227
- /**
228
- * Add an image gif
229
- */
230
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
226
+ indent: {
231
227
  /**
232
- * Update an image gif
228
+ * Set the indent attribute
233
229
  */
234
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
230
+ indent: () => ReturnType;
235
231
  /**
236
- * Set image alignment
232
+ * Set the outdent attribute
237
233
  */
238
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
234
+ outdent: () => ReturnType;
239
235
  };
240
236
  }
241
237
  }
@@ -243,15 +239,19 @@ declare module '@tiptap/core' {
243
239
 
244
240
  declare module '@tiptap/core' {
245
241
  interface Commands<ReturnType> {
246
- indent: {
242
+ imageGifUpload: {
247
243
  /**
248
- * Set the indent attribute
244
+ * Add an image gif
249
245
  */
250
- indent: () => ReturnType;
246
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
251
247
  /**
252
- * Set the outdent attribute
248
+ * Update an image gif
253
249
  */
254
- outdent: () => ReturnType;
250
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
251
+ /**
252
+ * Set image alignment
253
+ */
254
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
255
255
  };
256
256
  }
257
257
  }
@@ -327,15 +327,14 @@ declare module '@tiptap/core' {
327
327
 
328
328
  declare module '@tiptap/core' {
329
329
  interface Commands<ReturnType> {
330
- video: {
331
- /**
332
- * Add an video
333
- */
334
- setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
330
+ twitter: {
335
331
  /**
336
- * Update an video
332
+ * Insert a tweet
333
+ * @param options The tweet attributes
334
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
337
335
  */
338
- updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
336
+ setTweet: (options: SetTweetOptions) => ReturnType;
337
+ updateTweet: (options: SetTweetOptions) => ReturnType;
339
338
  };
340
339
  }
341
340
  }
@@ -343,14 +342,15 @@ declare module '@tiptap/core' {
343
342
 
344
343
  declare module '@tiptap/core' {
345
344
  interface Commands<ReturnType> {
346
- twitter: {
345
+ video: {
347
346
  /**
348
- * Insert a tweet
349
- * @param options The tweet attributes
350
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
347
+ * Add an video
351
348
  */
352
- setTweet: (options: SetTweetOptions) => ReturnType;
353
- updateTweet: (options: SetTweetOptions) => ReturnType;
349
+ setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
350
+ /**
351
+ * Update an video
352
+ */
353
+ updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
354
354
  };
355
355
  }
356
356
  }
@@ -223,19 +223,15 @@ declare module '@tiptap/core' {
223
223
 
224
224
  declare module '@tiptap/core' {
225
225
  interface Commands<ReturnType> {
226
- imageGifUpload: {
227
- /**
228
- * Add an image gif
229
- */
230
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
226
+ indent: {
231
227
  /**
232
- * Update an image gif
228
+ * Set the indent attribute
233
229
  */
234
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
230
+ indent: () => ReturnType;
235
231
  /**
236
- * Set image alignment
232
+ * Set the outdent attribute
237
233
  */
238
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
234
+ outdent: () => ReturnType;
239
235
  };
240
236
  }
241
237
  }
@@ -243,15 +239,19 @@ declare module '@tiptap/core' {
243
239
 
244
240
  declare module '@tiptap/core' {
245
241
  interface Commands<ReturnType> {
246
- indent: {
242
+ imageGifUpload: {
247
243
  /**
248
- * Set the indent attribute
244
+ * Add an image gif
249
245
  */
250
- indent: () => ReturnType;
246
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
251
247
  /**
252
- * Set the outdent attribute
248
+ * Update an image gif
253
249
  */
254
- outdent: () => ReturnType;
250
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
251
+ /**
252
+ * Set image alignment
253
+ */
254
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
255
255
  };
256
256
  }
257
257
  }
@@ -327,15 +327,14 @@ declare module '@tiptap/core' {
327
327
 
328
328
  declare module '@tiptap/core' {
329
329
  interface Commands<ReturnType> {
330
- video: {
331
- /**
332
- * Add an video
333
- */
334
- setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
330
+ twitter: {
335
331
  /**
336
- * Update an video
332
+ * Insert a tweet
333
+ * @param options The tweet attributes
334
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
337
335
  */
338
- updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
336
+ setTweet: (options: SetTweetOptions) => ReturnType;
337
+ updateTweet: (options: SetTweetOptions) => ReturnType;
339
338
  };
340
339
  }
341
340
  }
@@ -343,14 +342,15 @@ declare module '@tiptap/core' {
343
342
 
344
343
  declare module '@tiptap/core' {
345
344
  interface Commands<ReturnType> {
346
- twitter: {
345
+ video: {
347
346
  /**
348
- * Insert a tweet
349
- * @param options The tweet attributes
350
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
347
+ * Add an video
351
348
  */
352
- setTweet: (options: SetTweetOptions) => ReturnType;
353
- updateTweet: (options: SetTweetOptions) => ReturnType;
349
+ setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
350
+ /**
351
+ * Update an video
352
+ */
353
+ updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
354
354
  };
355
355
  }
356
356
  }
package/lib/FontFamily.js CHANGED
@@ -3,8 +3,8 @@ import { E as c } from "./index-CXIIg9Sq.js";
3
3
  import { u as y, g as F } from "./index-D-DR0FPY.js";
4
4
  import { jsxs as r, jsx as a } from "react/jsx-runtime";
5
5
  import { useMemo as h, Fragment as b } from "react";
6
- import { A as x } from "./ActionMenuButton-DXwpQHj4.js";
7
- import { D as M, e as A, f as g, h as L, u as D, j as S } from "./RichTextEditor-BfYZYQb9.js";
6
+ import { A as x } from "./ActionMenuButton-ZOYNohaO.js";
7
+ import { D as M, e as A, f as g, h as L, u as D, j as S } from "./RichTextEditor-CRDKX-F8.js";
8
8
  const w = c.create({
9
9
  name: "fontFamily",
10
10
  addOptions() {
package/lib/FontSize.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./index-CSvnpArE.cjs"),r=require("./index-Dz3YxLE7.cjs"),a=require("./RichTextEditor-Db6oQoYY.cjs"),u=require("react/jsx-runtime"),m=require("react"),z=require("./ActionMenuButton-CqlhqVIW.cjs");function x(e){var s;const{t}=r.useLocale(),l=m.useMemo(()=>{const i=(e.items||[]).find(c=>c.isActive());return i||{title:t("editor.fontSize.default.tooltip"),isActive:()=>!1}},[e]);return u.jsxs(a.DropdownMenu,{children:[u.jsx(a.DropdownMenuTrigger,{asChild:!0,disabled:e==null?void 0:e.disabled,children:u.jsx(z.ActionMenuButton,{disabled:e==null?void 0:e.disabled,icon:"MenuDown",title:l==null?void 0:l.title,tooltip:`${e==null?void 0:e.tooltip}`})}),u.jsx(a.DropdownMenuContent,{className:"richtext-max-h-96 richtext-w-32 richtext-overflow-y-auto",children:(s=e==null?void 0:e.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 e;return{...(e=this.parent)==null?void 0:e.call(this),types:["textStyle"],fontSizes:[...r.DEFAULT_FONT_SIZE_LIST],button({editor:t,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}=t.getAttributes("textStyle");return n.value===o.value&&S===void 0?!0:t.isActive({fontSize:String(n.value)})||!1},action:()=>{if(n.value===o.value){t.commands.unsetFontSize();return}t.commands.setFontSize(String(n.value))},disabled:!t.can().setFontSize(String(n.value)),divider:n.value===o.value||!1,default:n.value===o.value||!1}));return{component:x,componentProps:{editor:t,tooltip:s("editor.fontSize.tooltip"),disabled:!1,items:c,maxHeight:280}}}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:e=>e.style.fontSize.replaceAll(/["']+/g,""),renderHTML:e=>e.fontSize?{style:`font-size: ${e.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:e=>({chain:t})=>t().setMark("textStyle",{fontSize:e}).run(),unsetFontSize:()=>({chain:e})=>e().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-CSvnpArE.cjs"),r=require("./index-Dz3YxLE7.cjs"),a=require("./RichTextEditor-ymQlnG9m.cjs"),u=require("react/jsx-runtime"),m=require("react"),z=require("./ActionMenuButton-D96eTByd.cjs");function x(e){var s;const{t}=r.useLocale(),l=m.useMemo(()=>{const i=(e.items||[]).find(c=>c.isActive());return i||{title:t("editor.fontSize.default.tooltip"),isActive:()=>!1}},[e]);return u.jsxs(a.DropdownMenu,{children:[u.jsx(a.DropdownMenuTrigger,{asChild:!0,disabled:e==null?void 0:e.disabled,children:u.jsx(z.ActionMenuButton,{disabled:e==null?void 0:e.disabled,icon:"MenuDown",title:l==null?void 0:l.title,tooltip:`${e==null?void 0:e.tooltip}`})}),u.jsx(a.DropdownMenuContent,{className:"richtext-max-h-96 richtext-w-32 richtext-overflow-y-auto",children:(s=e==null?void 0:e.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 e;return{...(e=this.parent)==null?void 0:e.call(this),types:["textStyle"],fontSizes:[...r.DEFAULT_FONT_SIZE_LIST],button({editor:t,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}=t.getAttributes("textStyle");return n.value===o.value&&S===void 0?!0:t.isActive({fontSize:String(n.value)})||!1},action:()=>{if(n.value===o.value){t.commands.unsetFontSize();return}t.commands.setFontSize(String(n.value))},disabled:!t.can().setFontSize(String(n.value)),divider:n.value===o.value||!1,default:n.value===o.value||!1}));return{component:x,componentProps:{editor:t,tooltip:s("editor.fontSize.tooltip"),disabled:!1,items:c,maxHeight:280}}}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:e=>e.style.fontSize.replaceAll(/["']+/g,""),renderHTML:e=>e.fontSize?{style:`font-size: ${e.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:e=>({chain:t})=>t().setMark("textStyle",{fontSize:e}).run(),unsetFontSize:()=>({chain:e})=>e().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}});exports.DEFAULT_FONT_SIZE_LIST=r.DEFAULT_FONT_SIZE_LIST;exports.FontSize=v;
@@ -228,19 +228,15 @@ declare module '@tiptap/core' {
228
228
 
229
229
  declare module '@tiptap/core' {
230
230
  interface Commands<ReturnType> {
231
- imageGifUpload: {
232
- /**
233
- * Add an image gif
234
- */
235
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
231
+ indent: {
236
232
  /**
237
- * Update an image gif
233
+ * Set the indent attribute
238
234
  */
239
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
235
+ indent: () => ReturnType;
240
236
  /**
241
- * Set image alignment
237
+ * Set the outdent attribute
242
238
  */
243
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
239
+ outdent: () => ReturnType;
244
240
  };
245
241
  }
246
242
  }
@@ -248,15 +244,19 @@ declare module '@tiptap/core' {
248
244
 
249
245
  declare module '@tiptap/core' {
250
246
  interface Commands<ReturnType> {
251
- indent: {
247
+ imageGifUpload: {
252
248
  /**
253
- * Set the indent attribute
249
+ * Add an image gif
254
250
  */
255
- indent: () => ReturnType;
251
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
256
252
  /**
257
- * Set the outdent attribute
253
+ * Update an image gif
258
254
  */
259
- outdent: () => ReturnType;
255
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
256
+ /**
257
+ * Set image alignment
258
+ */
259
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
260
260
  };
261
261
  }
262
262
  }
@@ -332,15 +332,14 @@ declare module '@tiptap/core' {
332
332
 
333
333
  declare module '@tiptap/core' {
334
334
  interface Commands<ReturnType> {
335
- video: {
336
- /**
337
- * Add an video
338
- */
339
- setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
335
+ twitter: {
340
336
  /**
341
- * Update an video
337
+ * Insert a tweet
338
+ * @param options The tweet attributes
339
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
342
340
  */
343
- updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
341
+ setTweet: (options: SetTweetOptions) => ReturnType;
342
+ updateTweet: (options: SetTweetOptions) => ReturnType;
344
343
  };
345
344
  }
346
345
  }
@@ -348,14 +347,15 @@ declare module '@tiptap/core' {
348
347
 
349
348
  declare module '@tiptap/core' {
350
349
  interface Commands<ReturnType> {
351
- twitter: {
350
+ video: {
352
351
  /**
353
- * Insert a tweet
354
- * @param options The tweet attributes
355
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
352
+ * Add an video
356
353
  */
357
- setTweet: (options: SetTweetOptions) => ReturnType;
358
- updateTweet: (options: SetTweetOptions) => ReturnType;
354
+ setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
355
+ /**
356
+ * Update an video
357
+ */
358
+ updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
359
359
  };
360
360
  }
361
361
  }