reactjs-tiptap-editor 0.3.24 → 0.3.26

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 (221) hide show
  1. package/lib/{ActionMenuButton-BqO6QTnX.cjs → ActionMenuButton-C9tPWcDX.cjs} +1 -1
  2. package/lib/{ActionMenuButton-BW1lNB_I.js → ActionMenuButton-DpFt8DwI.js} +1 -1
  3. package/lib/Attachment.cjs +1 -1
  4. package/lib/Attachment.d.cts +39 -30
  5. package/lib/Attachment.d.ts +39 -30
  6. package/lib/Attachment.js +1 -1
  7. package/lib/Blockquote.cjs +1 -1
  8. package/lib/Blockquote.d.cts +39 -30
  9. package/lib/Blockquote.d.ts +39 -30
  10. package/lib/Blockquote.js +1 -1
  11. package/lib/Bold.cjs +1 -1
  12. package/lib/Bold.d.cts +39 -30
  13. package/lib/Bold.d.ts +39 -30
  14. package/lib/Bold.js +1 -1
  15. package/lib/BulletList.cjs +1 -1
  16. package/lib/BulletList.d.cts +39 -30
  17. package/lib/BulletList.d.ts +39 -30
  18. package/lib/BulletList.js +1 -1
  19. package/lib/Clear.cjs +1 -1
  20. package/lib/Clear.d.cts +39 -30
  21. package/lib/Clear.d.ts +39 -30
  22. package/lib/Clear.js +1 -1
  23. package/lib/Code.cjs +1 -1
  24. package/lib/Code.d.cts +39 -30
  25. package/lib/Code.d.ts +39 -30
  26. package/lib/Code.js +1 -1
  27. package/lib/CodeBlock.cjs +1 -1
  28. package/lib/CodeBlock.d.cts +39 -30
  29. package/lib/CodeBlock.d.ts +39 -30
  30. package/lib/CodeBlock.js +1 -1
  31. package/lib/CodeView.cjs +1 -1
  32. package/lib/CodeView.d.cts +39 -30
  33. package/lib/CodeView.d.ts +39 -30
  34. package/lib/CodeView.js +1 -1
  35. package/lib/Color.cjs +1 -1
  36. package/lib/Color.d.cts +39 -30
  37. package/lib/Color.d.ts +39 -30
  38. package/lib/Color.js +1 -1
  39. package/lib/Document.d.cts +39 -30
  40. package/lib/Document.d.ts +39 -30
  41. package/lib/{Drawer-B1rmIQfS.cjs → Drawer-BQLKKEOB.cjs} +1 -1
  42. package/lib/{Drawer-DEqRsjHw.js → Drawer-BouNhUKq.js} +1 -1
  43. package/lib/Drawer.cjs +1 -1
  44. package/lib/Drawer.d.cts +39 -30
  45. package/lib/Drawer.d.ts +39 -30
  46. package/lib/Drawer.js +2 -2
  47. package/lib/Emoji.cjs +1 -1
  48. package/lib/Emoji.d.cts +39 -30
  49. package/lib/Emoji.d.ts +39 -30
  50. package/lib/Emoji.js +1 -1
  51. package/lib/{Excalidraw-Qr5vHe9J.cjs → Excalidraw-DYbRbH0x.cjs} +1 -1
  52. package/lib/{Excalidraw-D2y-x-OZ.js → Excalidraw-u2P8Olgi.js} +1 -1
  53. package/lib/Excalidraw.cjs +1 -1
  54. package/lib/Excalidraw.d.cts +39 -30
  55. package/lib/Excalidraw.d.ts +39 -30
  56. package/lib/Excalidraw.js +1 -1
  57. package/lib/ExportPdf.cjs +4 -4
  58. package/lib/ExportPdf.d.cts +40 -30
  59. package/lib/ExportPdf.d.ts +40 -30
  60. package/lib/ExportPdf.js +34 -27
  61. package/lib/ExportWord.cjs +1 -1
  62. package/lib/ExportWord.d.cts +39 -30
  63. package/lib/ExportWord.d.ts +39 -30
  64. package/lib/ExportWord.js +1 -1
  65. package/lib/FontFamily.cjs +1 -1
  66. package/lib/FontFamily.d.cts +39 -30
  67. package/lib/FontFamily.d.ts +39 -30
  68. package/lib/FontFamily.js +2 -2
  69. package/lib/FontSize.cjs +1 -1
  70. package/lib/FontSize.d.cts +39 -30
  71. package/lib/FontSize.d.ts +39 -30
  72. package/lib/FontSize.js +2 -2
  73. package/lib/FormatPainter.cjs +1 -1
  74. package/lib/FormatPainter.d.cts +39 -30
  75. package/lib/FormatPainter.d.ts +39 -30
  76. package/lib/FormatPainter.js +1 -1
  77. package/lib/Heading.cjs +1 -1
  78. package/lib/Heading.d.cts +39 -30
  79. package/lib/Heading.d.ts +39 -30
  80. package/lib/Heading.js +2 -2
  81. package/lib/Highlight.cjs +1 -1
  82. package/lib/Highlight.d.cts +39 -30
  83. package/lib/Highlight.d.ts +39 -30
  84. package/lib/Highlight.js +1 -1
  85. package/lib/History.cjs +1 -1
  86. package/lib/History.d.cts +39 -30
  87. package/lib/History.d.ts +39 -30
  88. package/lib/History.js +1 -1
  89. package/lib/HorizontalRule.cjs +1 -1
  90. package/lib/HorizontalRule.d.cts +39 -30
  91. package/lib/HorizontalRule.d.ts +39 -30
  92. package/lib/HorizontalRule.js +1 -1
  93. package/lib/Iframe.cjs +1 -1
  94. package/lib/Iframe.d.cts +39 -30
  95. package/lib/Iframe.d.ts +39 -30
  96. package/lib/Iframe.js +1 -1
  97. package/lib/Image.cjs +1 -1
  98. package/lib/Image.d.cts +39 -30
  99. package/lib/Image.d.ts +39 -30
  100. package/lib/Image.js +1 -1
  101. package/lib/ImageGif.cjs +1 -1
  102. package/lib/ImageGif.d.cts +39 -30
  103. package/lib/ImageGif.d.ts +39 -30
  104. package/lib/ImageGif.js +1 -1
  105. package/lib/ImportWord.cjs +1 -1
  106. package/lib/ImportWord.d.cts +39 -30
  107. package/lib/ImportWord.d.ts +39 -30
  108. package/lib/ImportWord.js +1 -1
  109. package/lib/Indent.cjs +1 -1
  110. package/lib/Indent.d.cts +39 -30
  111. package/lib/Indent.d.ts +39 -30
  112. package/lib/Indent.js +1 -1
  113. package/lib/Italic.cjs +1 -1
  114. package/lib/Italic.d.cts +39 -30
  115. package/lib/Italic.d.ts +39 -30
  116. package/lib/Italic.js +1 -1
  117. package/lib/Katex.cjs +1 -1
  118. package/lib/Katex.d.cts +39 -30
  119. package/lib/Katex.d.ts +39 -30
  120. package/lib/Katex.js +2 -2
  121. package/lib/LineHeight.cjs +1 -1
  122. package/lib/LineHeight.d.cts +39 -30
  123. package/lib/LineHeight.d.ts +39 -30
  124. package/lib/LineHeight.js +1 -1
  125. package/lib/Link.cjs +1 -1
  126. package/lib/Link.d.cts +39 -30
  127. package/lib/Link.d.ts +39 -30
  128. package/lib/Link.js +1 -1
  129. package/lib/ListItem.d.cts +39 -30
  130. package/lib/ListItem.d.ts +39 -30
  131. package/lib/Mention.d.cts +39 -30
  132. package/lib/Mention.d.ts +39 -30
  133. package/lib/Mermaid.cjs +1 -1
  134. package/lib/Mermaid.d.cts +39 -30
  135. package/lib/Mermaid.d.ts +39 -30
  136. package/lib/Mermaid.js +2 -2
  137. package/lib/MoreMark.cjs +1 -1
  138. package/lib/MoreMark.d.cts +39 -30
  139. package/lib/MoreMark.d.ts +39 -30
  140. package/lib/MoreMark.js +1 -1
  141. package/lib/MultiColumn.cjs +1 -1
  142. package/lib/MultiColumn.d.cts +39 -30
  143. package/lib/MultiColumn.d.ts +39 -30
  144. package/lib/MultiColumn.js +1 -1
  145. package/lib/OrderedList.cjs +1 -1
  146. package/lib/OrderedList.d.cts +39 -30
  147. package/lib/OrderedList.d.ts +39 -30
  148. package/lib/OrderedList.js +1 -1
  149. package/lib/{RichTextEditor-CSA367l8.cjs → RichTextEditor-8GrfwaB4.cjs} +1 -1
  150. package/lib/{RichTextEditor-CrDGx-K7.js → RichTextEditor-VkzSL04E.js} +148 -109
  151. package/lib/SearchAndReplace.cjs +1 -1
  152. package/lib/SearchAndReplace.d.cts +39 -30
  153. package/lib/SearchAndReplace.d.ts +39 -30
  154. package/lib/SearchAndReplace.js +1 -1
  155. package/lib/Selection.d.cts +39 -30
  156. package/lib/Selection.d.ts +39 -30
  157. package/lib/SlashCommand.cjs +1 -1
  158. package/lib/SlashCommand.d.cts +39 -30
  159. package/lib/SlashCommand.d.ts +39 -30
  160. package/lib/SlashCommand.js +1 -1
  161. package/lib/Strike.cjs +1 -1
  162. package/lib/Strike.d.cts +39 -30
  163. package/lib/Strike.d.ts +39 -30
  164. package/lib/Strike.js +1 -1
  165. package/lib/SubAndSuperScript.cjs +1 -1
  166. package/lib/SubAndSuperScript.d.cts +39 -30
  167. package/lib/SubAndSuperScript.d.ts +39 -30
  168. package/lib/SubAndSuperScript.js +1 -1
  169. package/lib/Table.cjs +1 -1
  170. package/lib/Table.d.cts +39 -30
  171. package/lib/Table.d.ts +39 -30
  172. package/lib/Table.js +1 -1
  173. package/lib/TableOfContent.cjs +1 -1
  174. package/lib/TableOfContent.d.cts +39 -30
  175. package/lib/TableOfContent.d.ts +39 -30
  176. package/lib/TableOfContent.js +1 -1
  177. package/lib/TaskList.cjs +1 -1
  178. package/lib/TaskList.d.cts +39 -30
  179. package/lib/TaskList.d.ts +39 -30
  180. package/lib/TaskList.js +1 -1
  181. package/lib/TextAlign.cjs +1 -1
  182. package/lib/TextAlign.d.cts +39 -30
  183. package/lib/TextAlign.d.ts +39 -30
  184. package/lib/TextAlign.js +1 -1
  185. package/lib/TextBubble.cjs +1 -1
  186. package/lib/TextBubble.d.cts +39 -30
  187. package/lib/TextBubble.d.ts +39 -30
  188. package/lib/TextBubble.js +1 -1
  189. package/lib/TextDirection.cjs +1 -1
  190. package/lib/TextDirection.d.cts +39 -30
  191. package/lib/TextDirection.d.ts +39 -30
  192. package/lib/TextDirection.js +1 -1
  193. package/lib/TextUnderline.cjs +1 -1
  194. package/lib/TextUnderline.d.cts +39 -30
  195. package/lib/TextUnderline.d.ts +39 -30
  196. package/lib/TextUnderline.js +1 -1
  197. package/lib/TrailingNode.d.cts +39 -30
  198. package/lib/TrailingNode.d.ts +39 -30
  199. package/lib/{Twitter-D-kqw1ZB.js → Twitter-DlKz1fXJ.js} +1 -1
  200. package/lib/{Twitter-BRF2Ehp3.cjs → Twitter-u_6ZejIn.cjs} +1 -1
  201. package/lib/Twitter.cjs +1 -1
  202. package/lib/Twitter.d.cts +39 -30
  203. package/lib/Twitter.d.ts +39 -30
  204. package/lib/Twitter.js +1 -1
  205. package/lib/Video.cjs +1 -1
  206. package/lib/Video.d.cts +39 -30
  207. package/lib/Video.d.ts +39 -30
  208. package/lib/Video.js +1 -1
  209. package/lib/bubble-extra.cjs +1 -1
  210. package/lib/bubble-extra.d.cts +39 -30
  211. package/lib/bubble-extra.d.ts +39 -30
  212. package/lib/bubble-extra.js +5 -5
  213. package/lib/index.cjs +1 -1
  214. package/lib/index.d.cts +39 -30
  215. package/lib/index.d.ts +39 -30
  216. package/lib/index.js +2 -2
  217. package/lib/locale-bundle.d.cts +39 -30
  218. package/lib/locale-bundle.d.ts +39 -30
  219. package/lib/{textarea-06Uv95yx.js → textarea-BA9ETXT8.js} +1 -1
  220. package/lib/{textarea-QE8jlGEs.cjs → textarea-ESw2TM_u.cjs} +1 -1
  221. package/package.json +1 -1
@@ -41,9 +41,11 @@ declare module '@tiptap/core' {
41
41
 
42
42
  declare module '@tiptap/core' {
43
43
  interface Commands<ReturnType> {
44
- drawer: {
45
- setDrawer: (options: any, replace?: any) => ReturnType;
46
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
44
+ emoji: {
45
+ setEmoji: (emoji: {
46
+ name: string;
47
+ emoji: string;
48
+ }) => ReturnType;
47
49
  };
48
50
  }
49
51
  }
@@ -60,11 +62,18 @@ declare module '@tiptap/core' {
60
62
 
61
63
  declare module '@tiptap/core' {
62
64
  interface Commands<ReturnType> {
63
- emoji: {
64
- setEmoji: (emoji: {
65
- name: string;
66
- emoji: string;
67
- }) => ReturnType;
65
+ drawer: {
66
+ setDrawer: (options: any, replace?: any) => ReturnType;
67
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
68
+ };
69
+ }
70
+ }
71
+
72
+
73
+ declare module '@tiptap/core' {
74
+ interface Commands<ReturnType> {
75
+ exportPdf: {
76
+ exportToPdf: () => ReturnType;
68
77
  };
69
78
  }
70
79
  }
@@ -161,15 +170,6 @@ declare module '@tiptap/core' {
161
170
  }
162
171
 
163
172
 
164
- declare module '@tiptap/core' {
165
- interface Commands<ReturnType> {
166
- katex: {
167
- setKatex: (arg?: IKatexAttrs) => ReturnType;
168
- };
169
- }
170
- }
171
-
172
-
173
173
  declare module '@tiptap/core' {
174
174
  interface Commands<ReturnType> {
175
175
  indent: {
@@ -186,6 +186,15 @@ declare module '@tiptap/core' {
186
186
  }
187
187
 
188
188
 
189
+ declare module '@tiptap/core' {
190
+ interface Commands<ReturnType> {
191
+ katex: {
192
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
193
+ };
194
+ }
195
+ }
196
+
197
+
189
198
  declare module '@tiptap/core' {
190
199
  interface Commands<ReturnType> {
191
200
  lineHeight: {
@@ -247,14 +256,15 @@ declare module '@tiptap/core' {
247
256
 
248
257
  declare module '@tiptap/core' {
249
258
  interface Commands<ReturnType> {
250
- twitter: {
259
+ video: {
251
260
  /**
252
- * Insert a tweet
253
- * @param options The tweet attributes
254
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
261
+ * Add an video
255
262
  */
256
- setTweet: (options: SetTweetOptions) => ReturnType;
257
- updateTweet: (options: SetTweetOptions) => ReturnType;
263
+ setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
264
+ /**
265
+ * Update an video
266
+ */
267
+ updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
258
268
  };
259
269
  }
260
270
  }
@@ -262,15 +272,14 @@ declare module '@tiptap/core' {
262
272
 
263
273
  declare module '@tiptap/core' {
264
274
  interface Commands<ReturnType> {
265
- video: {
266
- /**
267
- * Add an video
268
- */
269
- setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
275
+ twitter: {
270
276
  /**
271
- * Update an video
277
+ * Insert a tweet
278
+ * @param options The tweet attributes
279
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
272
280
  */
273
- updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
281
+ setTweet: (options: SetTweetOptions) => ReturnType;
282
+ updateTweet: (options: SetTweetOptions) => ReturnType;
274
283
  };
275
284
  }
276
285
  }
@@ -41,9 +41,11 @@ declare module '@tiptap/core' {
41
41
 
42
42
  declare module '@tiptap/core' {
43
43
  interface Commands<ReturnType> {
44
- drawer: {
45
- setDrawer: (options: any, replace?: any) => ReturnType;
46
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
44
+ emoji: {
45
+ setEmoji: (emoji: {
46
+ name: string;
47
+ emoji: string;
48
+ }) => ReturnType;
47
49
  };
48
50
  }
49
51
  }
@@ -60,11 +62,18 @@ declare module '@tiptap/core' {
60
62
 
61
63
  declare module '@tiptap/core' {
62
64
  interface Commands<ReturnType> {
63
- emoji: {
64
- setEmoji: (emoji: {
65
- name: string;
66
- emoji: string;
67
- }) => ReturnType;
65
+ drawer: {
66
+ setDrawer: (options: any, replace?: any) => ReturnType;
67
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
68
+ };
69
+ }
70
+ }
71
+
72
+
73
+ declare module '@tiptap/core' {
74
+ interface Commands<ReturnType> {
75
+ exportPdf: {
76
+ exportToPdf: () => ReturnType;
68
77
  };
69
78
  }
70
79
  }
@@ -161,15 +170,6 @@ declare module '@tiptap/core' {
161
170
  }
162
171
 
163
172
 
164
- declare module '@tiptap/core' {
165
- interface Commands<ReturnType> {
166
- katex: {
167
- setKatex: (arg?: IKatexAttrs) => ReturnType;
168
- };
169
- }
170
- }
171
-
172
-
173
173
  declare module '@tiptap/core' {
174
174
  interface Commands<ReturnType> {
175
175
  indent: {
@@ -186,6 +186,15 @@ declare module '@tiptap/core' {
186
186
  }
187
187
 
188
188
 
189
+ declare module '@tiptap/core' {
190
+ interface Commands<ReturnType> {
191
+ katex: {
192
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
193
+ };
194
+ }
195
+ }
196
+
197
+
189
198
  declare module '@tiptap/core' {
190
199
  interface Commands<ReturnType> {
191
200
  lineHeight: {
@@ -247,14 +256,15 @@ declare module '@tiptap/core' {
247
256
 
248
257
  declare module '@tiptap/core' {
249
258
  interface Commands<ReturnType> {
250
- twitter: {
259
+ video: {
251
260
  /**
252
- * Insert a tweet
253
- * @param options The tweet attributes
254
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
261
+ * Add an video
255
262
  */
256
- setTweet: (options: SetTweetOptions) => ReturnType;
257
- updateTweet: (options: SetTweetOptions) => ReturnType;
263
+ setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
264
+ /**
265
+ * Update an video
266
+ */
267
+ updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
258
268
  };
259
269
  }
260
270
  }
@@ -262,15 +272,14 @@ declare module '@tiptap/core' {
262
272
 
263
273
  declare module '@tiptap/core' {
264
274
  interface Commands<ReturnType> {
265
- video: {
266
- /**
267
- * Add an video
268
- */
269
- setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
275
+ twitter: {
270
276
  /**
271
- * Update an video
277
+ * Insert a tweet
278
+ * @param options The tweet attributes
279
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
272
280
  */
273
- updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
281
+ setTweet: (options: SetTweetOptions) => ReturnType;
282
+ updateTweet: (options: SetTweetOptions) => ReturnType;
274
283
  };
275
284
  }
276
285
  }
@@ -3,7 +3,7 @@ import { N as C, c as g, R as N } from "./dom-dataset-Di3tIRrR.js";
3
3
  import { jsx as l, jsxs as T } from "react/jsx-runtime";
4
4
  import { useState as p, useCallback as m, useEffect as d } from "react";
5
5
  import { u as O } from "./index-CsK90iVd.js";
6
- import { Z as _, A as y } from "./RichTextEditor-CrDGx-K7.js";
6
+ import { Z as _, A as y } from "./RichTextEditor-VkzSL04E.js";
7
7
  const x = "_toc_aag8a_1", A = "_visible_aag8a_7", w = "_list_aag8a_11", E = "_item_aag8a_16", f = {
8
8
  toc: x,
9
9
  visible: A,
package/lib/TaskList.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-ByRfqzMr.cjs"),b=require("./RichTextEditor-CSA367l8.cjs"),f=/^\s*(\[([( |x])?\])\s$/,L=r.Node.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{const i=t.getAttribute("data-checked");return i===""||i==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:i}){return["li",r.mergeAttributes(this.options.HTMLAttributes,i,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:i,getPos:o,editor:c})=>{const a=document.createElement("li"),d=document.createElement("label"),k=document.createElement("span"),s=document.createElement("input"),l=document.createElement("div"),p=()=>{var e,n;s.ariaLabel=((n=(e=this.options.a11y)===null||e===void 0?void 0:e.checkboxLabel)===null||n===void 0?void 0:n.call(e,t,s.checked))||`Task item checkbox for ${t.textContent||"empty task item"}`};return p(),d.contentEditable="false",s.type="checkbox",s.addEventListener("mousedown",e=>e.preventDefault()),s.addEventListener("change",e=>{if(!c.isEditable&&!this.options.onReadOnlyChecked){s.checked=!s.checked;return}const{checked:n}=e.target;c.isEditable&&typeof o=="function"&&c.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:m})=>{const u=o();if(typeof u!="number")return!1;const h=m.doc.nodeAt(u);return m.setNodeMarkup(u,void 0,{...h==null?void 0:h.attrs,checked:n}),!0}).run(),!c.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,n)||(s.checked=!s.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([e,n])=>{a.setAttribute(e,n)}),a.dataset.checked=t.attrs.checked,s.checked=t.attrs.checked,d.append(s,k),a.append(d,l),Object.entries(i).forEach(([e,n])=>{a.setAttribute(e,n)}),{dom:a,contentDOM:l,update:e=>e.type!==this.type?!1:(a.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,p(),!0)}}},addInputRules(){return[r.wrappingInputRule({find:f,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),y=r.Node.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",r.mergeAttributes(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),T=y.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),HTMLAttributes:{class:"task-list"},taskItem:{HTMLAttributes:{class:"task-list-item"}},button:({editor:i,t:o})=>({component:b.ActionButton,componentProps:{action:()=>i.commands.toggleTaskList(),isActive:()=>i.isActive("taskList")||!1,disabled:!1,icon:"ListTodo",shortcutKeys:["shift","mod","9"],tooltip:o("editor.tasklist.tooltip")}})}},addExtensions(){return[L.configure(this.options.taskItem)]}});exports.TaskList=T;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-ByRfqzMr.cjs"),b=require("./RichTextEditor-8GrfwaB4.cjs"),f=/^\s*(\[([( |x])?\])\s$/,L=r.Node.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{const i=t.getAttribute("data-checked");return i===""||i==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:i}){return["li",r.mergeAttributes(this.options.HTMLAttributes,i,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:i,getPos:o,editor:c})=>{const a=document.createElement("li"),d=document.createElement("label"),k=document.createElement("span"),s=document.createElement("input"),l=document.createElement("div"),p=()=>{var e,n;s.ariaLabel=((n=(e=this.options.a11y)===null||e===void 0?void 0:e.checkboxLabel)===null||n===void 0?void 0:n.call(e,t,s.checked))||`Task item checkbox for ${t.textContent||"empty task item"}`};return p(),d.contentEditable="false",s.type="checkbox",s.addEventListener("mousedown",e=>e.preventDefault()),s.addEventListener("change",e=>{if(!c.isEditable&&!this.options.onReadOnlyChecked){s.checked=!s.checked;return}const{checked:n}=e.target;c.isEditable&&typeof o=="function"&&c.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:m})=>{const u=o();if(typeof u!="number")return!1;const h=m.doc.nodeAt(u);return m.setNodeMarkup(u,void 0,{...h==null?void 0:h.attrs,checked:n}),!0}).run(),!c.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,n)||(s.checked=!s.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([e,n])=>{a.setAttribute(e,n)}),a.dataset.checked=t.attrs.checked,s.checked=t.attrs.checked,d.append(s,k),a.append(d,l),Object.entries(i).forEach(([e,n])=>{a.setAttribute(e,n)}),{dom:a,contentDOM:l,update:e=>e.type!==this.type?!1:(a.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,p(),!0)}}},addInputRules(){return[r.wrappingInputRule({find:f,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),y=r.Node.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",r.mergeAttributes(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),T=y.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),HTMLAttributes:{class:"task-list"},taskItem:{HTMLAttributes:{class:"task-list-item"}},button:({editor:i,t:o})=>({component:b.ActionButton,componentProps:{action:()=>i.commands.toggleTaskList(),isActive:()=>i.isActive("taskList")||!1,disabled:!1,icon:"ListTodo",shortcutKeys:["shift","mod","9"],tooltip:o("editor.tasklist.tooltip")}})}},addExtensions(){return[L.configure(this.options.taskItem)]}});exports.TaskList=T;
@@ -116,9 +116,11 @@ declare module '@tiptap/core' {
116
116
 
117
117
  declare module '@tiptap/core' {
118
118
  interface Commands<ReturnType> {
119
- drawer: {
120
- setDrawer: (options: any, replace?: any) => ReturnType;
121
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
119
+ emoji: {
120
+ setEmoji: (emoji: {
121
+ name: string;
122
+ emoji: string;
123
+ }) => ReturnType;
122
124
  };
123
125
  }
124
126
  }
@@ -135,11 +137,18 @@ declare module '@tiptap/core' {
135
137
 
136
138
  declare module '@tiptap/core' {
137
139
  interface Commands<ReturnType> {
138
- emoji: {
139
- setEmoji: (emoji: {
140
- name: string;
141
- emoji: string;
142
- }) => ReturnType;
140
+ drawer: {
141
+ setDrawer: (options: any, replace?: any) => ReturnType;
142
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
143
+ };
144
+ }
145
+ }
146
+
147
+
148
+ declare module '@tiptap/core' {
149
+ interface Commands<ReturnType> {
150
+ exportPdf: {
151
+ exportToPdf: () => ReturnType;
143
152
  };
144
153
  }
145
154
  }
@@ -236,15 +245,6 @@ declare module '@tiptap/core' {
236
245
  }
237
246
 
238
247
 
239
- declare module '@tiptap/core' {
240
- interface Commands<ReturnType> {
241
- katex: {
242
- setKatex: (arg?: IKatexAttrs) => ReturnType;
243
- };
244
- }
245
- }
246
-
247
-
248
248
  declare module '@tiptap/core' {
249
249
  interface Commands<ReturnType> {
250
250
  indent: {
@@ -261,6 +261,15 @@ declare module '@tiptap/core' {
261
261
  }
262
262
 
263
263
 
264
+ declare module '@tiptap/core' {
265
+ interface Commands<ReturnType> {
266
+ katex: {
267
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
268
+ };
269
+ }
270
+ }
271
+
272
+
264
273
  declare module '@tiptap/core' {
265
274
  interface Commands<ReturnType> {
266
275
  lineHeight: {
@@ -322,14 +331,15 @@ declare module '@tiptap/core' {
322
331
 
323
332
  declare module '@tiptap/core' {
324
333
  interface Commands<ReturnType> {
325
- twitter: {
334
+ video: {
326
335
  /**
327
- * Insert a tweet
328
- * @param options The tweet attributes
329
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
336
+ * Add an video
330
337
  */
331
- setTweet: (options: SetTweetOptions) => ReturnType;
332
- updateTweet: (options: SetTweetOptions) => ReturnType;
338
+ setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
339
+ /**
340
+ * Update an video
341
+ */
342
+ updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
333
343
  };
334
344
  }
335
345
  }
@@ -337,15 +347,14 @@ declare module '@tiptap/core' {
337
347
 
338
348
  declare module '@tiptap/core' {
339
349
  interface Commands<ReturnType> {
340
- video: {
341
- /**
342
- * Add an video
343
- */
344
- setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
350
+ twitter: {
345
351
  /**
346
- * Update an video
352
+ * Insert a tweet
353
+ * @param options The tweet attributes
354
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
347
355
  */
348
- updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
356
+ setTweet: (options: SetTweetOptions) => ReturnType;
357
+ updateTweet: (options: SetTweetOptions) => ReturnType;
349
358
  };
350
359
  }
351
360
  }
package/lib/TaskList.d.ts CHANGED
@@ -116,9 +116,11 @@ declare module '@tiptap/core' {
116
116
 
117
117
  declare module '@tiptap/core' {
118
118
  interface Commands<ReturnType> {
119
- drawer: {
120
- setDrawer: (options: any, replace?: any) => ReturnType;
121
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
119
+ emoji: {
120
+ setEmoji: (emoji: {
121
+ name: string;
122
+ emoji: string;
123
+ }) => ReturnType;
122
124
  };
123
125
  }
124
126
  }
@@ -135,11 +137,18 @@ declare module '@tiptap/core' {
135
137
 
136
138
  declare module '@tiptap/core' {
137
139
  interface Commands<ReturnType> {
138
- emoji: {
139
- setEmoji: (emoji: {
140
- name: string;
141
- emoji: string;
142
- }) => ReturnType;
140
+ drawer: {
141
+ setDrawer: (options: any, replace?: any) => ReturnType;
142
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
143
+ };
144
+ }
145
+ }
146
+
147
+
148
+ declare module '@tiptap/core' {
149
+ interface Commands<ReturnType> {
150
+ exportPdf: {
151
+ exportToPdf: () => ReturnType;
143
152
  };
144
153
  }
145
154
  }
@@ -236,15 +245,6 @@ declare module '@tiptap/core' {
236
245
  }
237
246
 
238
247
 
239
- declare module '@tiptap/core' {
240
- interface Commands<ReturnType> {
241
- katex: {
242
- setKatex: (arg?: IKatexAttrs) => ReturnType;
243
- };
244
- }
245
- }
246
-
247
-
248
248
  declare module '@tiptap/core' {
249
249
  interface Commands<ReturnType> {
250
250
  indent: {
@@ -261,6 +261,15 @@ declare module '@tiptap/core' {
261
261
  }
262
262
 
263
263
 
264
+ declare module '@tiptap/core' {
265
+ interface Commands<ReturnType> {
266
+ katex: {
267
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
268
+ };
269
+ }
270
+ }
271
+
272
+
264
273
  declare module '@tiptap/core' {
265
274
  interface Commands<ReturnType> {
266
275
  lineHeight: {
@@ -322,14 +331,15 @@ declare module '@tiptap/core' {
322
331
 
323
332
  declare module '@tiptap/core' {
324
333
  interface Commands<ReturnType> {
325
- twitter: {
334
+ video: {
326
335
  /**
327
- * Insert a tweet
328
- * @param options The tweet attributes
329
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
336
+ * Add an video
330
337
  */
331
- setTweet: (options: SetTweetOptions) => ReturnType;
332
- updateTweet: (options: SetTweetOptions) => ReturnType;
338
+ setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
339
+ /**
340
+ * Update an video
341
+ */
342
+ updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
333
343
  };
334
344
  }
335
345
  }
@@ -337,15 +347,14 @@ declare module '@tiptap/core' {
337
347
 
338
348
  declare module '@tiptap/core' {
339
349
  interface Commands<ReturnType> {
340
- video: {
341
- /**
342
- * Add an video
343
- */
344
- setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
350
+ twitter: {
345
351
  /**
346
- * Update an video
352
+ * Insert a tweet
353
+ * @param options The tweet attributes
354
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
347
355
  */
348
- updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
356
+ setTweet: (options: SetTweetOptions) => ReturnType;
357
+ updateTweet: (options: SetTweetOptions) => ReturnType;
349
358
  };
350
359
  }
351
360
  }
package/lib/TaskList.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { N as m, w as f, m as k } from "./index-DI9T3iLd.js";
2
- import { A as L } from "./RichTextEditor-CrDGx-K7.js";
2
+ import { A as L } from "./RichTextEditor-VkzSL04E.js";
3
3
  const y = /^\s*(\[([( |x])?\])\s$/, T = m.create({
4
4
  name: "taskItem",
5
5
  addOptions() {
package/lib/TextAlign.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./index-ByRfqzMr.cjs"),n=require("react/jsx-runtime"),T=require("react"),s=require("./RichTextEditor-CSA367l8.cjs"),j=y.Extension.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>{const e=t.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign?{style:`text-align: ${t.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>this.options.alignments.includes(t)?this.options.types.map(l=>e.updateAttributes(l,{textAlign:t})).every(l=>l):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.resetAttributes(e,"textAlign")).every(e=>e),toggleTextAlign:t=>({editor:e,commands:l})=>this.options.alignments.includes(t)?e.isActive({textAlign:t})?l.unsetTextAlign():l.setTextAlign(t):!1}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}});function b(t){var l;const e=T.useMemo(()=>{var o;const i=(o=t==null?void 0:t.items)==null?void 0:o.find(a=>a.isActive());return i&&!i.default?{...i,icon:i.icon?i.icon:t.icon}:{title:t==null?void 0:t.tooltip,icon:t.icon,isActive:()=>!1}},[t]);return n.jsxs(s.Popover,{modal:!0,children:[n.jsx(s.PopoverTrigger,{asChild:!0,disabled:t==null?void 0:t.disabled,children:n.jsx(s.ActionButton,{customClass:"!richtext-w-12 richtext-h-12",disabled:t==null?void 0:t.disabled,icon:t==null?void 0:t.icon,tooltip:t==null?void 0:t.tooltip,children:n.jsx(s.IconComponent,{className:"richtext-ml-1 richtext-size-3 richtext-text-zinc-500",name:"MenuDown"})})}),n.jsx(s.PopoverContent,{align:"start",className:"richtext-flex richtext-w-full richtext-min-w-4 richtext-flex-row richtext-gap-1 !richtext-p-[4px]",side:"bottom",children:(l=t==null?void 0:t.items)==null?void 0:l.map((i,d)=>{var o,a;return n.jsxs(s.Tooltip,{children:[n.jsx(s.TooltipTrigger,{asChild:!0,children:n.jsx(s.Toggle,{className:"richtext-size-7 richtext-p-1","data-state":e.title===i.title?"on":"off",onClick:i==null?void 0:i.action,pressed:e.title===i.title,size:"sm",children:(i==null?void 0:i.icon)&&n.jsx(s.IconComponent,{name:i.icon})})}),n.jsxs(s.TooltipContent,{className:"richtext-flex richtext-flex-col richtext-items-center",children:[n.jsx("span",{children:i.title}),!!((o=i.shortcutKeys)!=null&&o.length)&&n.jsx("span",{children:(a=i.shortcutKeys)==null?void 0:a.map(r=>s.getShortcutKey(r)).join(" ")})]})]},`text-align-${d}`)})})]})}const v=j.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["heading","paragraph","list_item","title"],button({editor:e,extension:l,t:i}){var x;const d=((x=l.options)==null?void 0:x.alignments)||[],o={left:["mod","Shift","L"],center:["mod","Shift","E"],right:["mod","Shift","R"],justify:["mod","Shift","J"]},a={left:"AlignLeft",center:"AlignCenter",right:"AlignRight",justify:"AlignJustify"},r=d.map(c=>{var g,h,f;return{title:i(`editor.textalign.${c}.tooltip`),icon:a[c],shortcutKeys:o[c],isActive:()=>e.isActive({textAlign:c})||!1,action:()=>{var u,A;return(A=(u=e.commands)==null?void 0:u.setTextAlign)==null?void 0:A.call(u,c)},disabled:!((f=(h=(g=e==null?void 0:e.can)==null?void 0:g.call(e))==null?void 0:h.setTextAlign)!=null&&f.call(h,c))}}),m=r.filter(c=>c.disabled).length===r.length;return{component:b,componentProps:{icon:"AlignJustify",tooltip:i("editor.textalign.tooltip"),disabled:m,items:r}}}}}});exports.TextAlign=v;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./index-ByRfqzMr.cjs"),n=require("react/jsx-runtime"),T=require("react"),s=require("./RichTextEditor-8GrfwaB4.cjs"),j=y.Extension.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>{const e=t.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign?{style:`text-align: ${t.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>this.options.alignments.includes(t)?this.options.types.map(l=>e.updateAttributes(l,{textAlign:t})).every(l=>l):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.resetAttributes(e,"textAlign")).every(e=>e),toggleTextAlign:t=>({editor:e,commands:l})=>this.options.alignments.includes(t)?e.isActive({textAlign:t})?l.unsetTextAlign():l.setTextAlign(t):!1}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}});function b(t){var l;const e=T.useMemo(()=>{var o;const i=(o=t==null?void 0:t.items)==null?void 0:o.find(a=>a.isActive());return i&&!i.default?{...i,icon:i.icon?i.icon:t.icon}:{title:t==null?void 0:t.tooltip,icon:t.icon,isActive:()=>!1}},[t]);return n.jsxs(s.Popover,{modal:!0,children:[n.jsx(s.PopoverTrigger,{asChild:!0,disabled:t==null?void 0:t.disabled,children:n.jsx(s.ActionButton,{customClass:"!richtext-w-12 richtext-h-12",disabled:t==null?void 0:t.disabled,icon:t==null?void 0:t.icon,tooltip:t==null?void 0:t.tooltip,children:n.jsx(s.IconComponent,{className:"richtext-ml-1 richtext-size-3 richtext-text-zinc-500",name:"MenuDown"})})}),n.jsx(s.PopoverContent,{align:"start",className:"richtext-flex richtext-w-full richtext-min-w-4 richtext-flex-row richtext-gap-1 !richtext-p-[4px]",side:"bottom",children:(l=t==null?void 0:t.items)==null?void 0:l.map((i,d)=>{var o,a;return n.jsxs(s.Tooltip,{children:[n.jsx(s.TooltipTrigger,{asChild:!0,children:n.jsx(s.Toggle,{className:"richtext-size-7 richtext-p-1","data-state":e.title===i.title?"on":"off",onClick:i==null?void 0:i.action,pressed:e.title===i.title,size:"sm",children:(i==null?void 0:i.icon)&&n.jsx(s.IconComponent,{name:i.icon})})}),n.jsxs(s.TooltipContent,{className:"richtext-flex richtext-flex-col richtext-items-center",children:[n.jsx("span",{children:i.title}),!!((o=i.shortcutKeys)!=null&&o.length)&&n.jsx("span",{children:(a=i.shortcutKeys)==null?void 0:a.map(r=>s.getShortcutKey(r)).join(" ")})]})]},`text-align-${d}`)})})]})}const v=j.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["heading","paragraph","list_item","title"],button({editor:e,extension:l,t:i}){var x;const d=((x=l.options)==null?void 0:x.alignments)||[],o={left:["mod","Shift","L"],center:["mod","Shift","E"],right:["mod","Shift","R"],justify:["mod","Shift","J"]},a={left:"AlignLeft",center:"AlignCenter",right:"AlignRight",justify:"AlignJustify"},r=d.map(c=>{var g,h,f;return{title:i(`editor.textalign.${c}.tooltip`),icon:a[c],shortcutKeys:o[c],isActive:()=>e.isActive({textAlign:c})||!1,action:()=>{var u,A;return(A=(u=e.commands)==null?void 0:u.setTextAlign)==null?void 0:A.call(u,c)},disabled:!((f=(h=(g=e==null?void 0:e.can)==null?void 0:g.call(e))==null?void 0:h.setTextAlign)!=null&&f.call(h,c))}}),m=r.filter(c=>c.disabled).length===r.length;return{component:b,componentProps:{icon:"AlignJustify",tooltip:i("editor.textalign.tooltip"),disabled:m,items:r}}}}}});exports.TextAlign=v;
@@ -120,9 +120,11 @@ declare module '@tiptap/core' {
120
120
 
121
121
  declare module '@tiptap/core' {
122
122
  interface Commands<ReturnType> {
123
- drawer: {
124
- setDrawer: (options: any, replace?: any) => ReturnType;
125
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
123
+ emoji: {
124
+ setEmoji: (emoji: {
125
+ name: string;
126
+ emoji: string;
127
+ }) => ReturnType;
126
128
  };
127
129
  }
128
130
  }
@@ -139,11 +141,18 @@ declare module '@tiptap/core' {
139
141
 
140
142
  declare module '@tiptap/core' {
141
143
  interface Commands<ReturnType> {
142
- emoji: {
143
- setEmoji: (emoji: {
144
- name: string;
145
- emoji: string;
146
- }) => ReturnType;
144
+ drawer: {
145
+ setDrawer: (options: any, replace?: any) => ReturnType;
146
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
147
+ };
148
+ }
149
+ }
150
+
151
+
152
+ declare module '@tiptap/core' {
153
+ interface Commands<ReturnType> {
154
+ exportPdf: {
155
+ exportToPdf: () => ReturnType;
147
156
  };
148
157
  }
149
158
  }
@@ -240,15 +249,6 @@ declare module '@tiptap/core' {
240
249
  }
241
250
 
242
251
 
243
- declare module '@tiptap/core' {
244
- interface Commands<ReturnType> {
245
- katex: {
246
- setKatex: (arg?: IKatexAttrs) => ReturnType;
247
- };
248
- }
249
- }
250
-
251
-
252
252
  declare module '@tiptap/core' {
253
253
  interface Commands<ReturnType> {
254
254
  indent: {
@@ -265,6 +265,15 @@ declare module '@tiptap/core' {
265
265
  }
266
266
 
267
267
 
268
+ declare module '@tiptap/core' {
269
+ interface Commands<ReturnType> {
270
+ katex: {
271
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
272
+ };
273
+ }
274
+ }
275
+
276
+
268
277
  declare module '@tiptap/core' {
269
278
  interface Commands<ReturnType> {
270
279
  lineHeight: {
@@ -326,14 +335,15 @@ declare module '@tiptap/core' {
326
335
 
327
336
  declare module '@tiptap/core' {
328
337
  interface Commands<ReturnType> {
329
- twitter: {
338
+ video: {
330
339
  /**
331
- * Insert a tweet
332
- * @param options The tweet attributes
333
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
340
+ * Add an video
334
341
  */
335
- setTweet: (options: SetTweetOptions) => ReturnType;
336
- updateTweet: (options: SetTweetOptions) => ReturnType;
342
+ setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
343
+ /**
344
+ * Update an video
345
+ */
346
+ updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
337
347
  };
338
348
  }
339
349
  }
@@ -341,15 +351,14 @@ declare module '@tiptap/core' {
341
351
 
342
352
  declare module '@tiptap/core' {
343
353
  interface Commands<ReturnType> {
344
- video: {
345
- /**
346
- * Add an video
347
- */
348
- setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
354
+ twitter: {
349
355
  /**
350
- * Update an video
356
+ * Insert a tweet
357
+ * @param options The tweet attributes
358
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
351
359
  */
352
- updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
360
+ setTweet: (options: SetTweetOptions) => ReturnType;
361
+ updateTweet: (options: SetTweetOptions) => ReturnType;
353
362
  };
354
363
  }
355
364
  }