reactjs-tiptap-editor 0.3.24 → 0.3.25

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-B3XOtCey.cjs} +1 -1
  2. package/lib/{ActionMenuButton-BW1lNB_I.js → ActionMenuButton-Bh2ft7th.js} +1 -1
  3. package/lib/Attachment.cjs +1 -1
  4. package/lib/Attachment.d.cts +31 -31
  5. package/lib/Attachment.d.ts +31 -31
  6. package/lib/Attachment.js +1 -1
  7. package/lib/Blockquote.cjs +1 -1
  8. package/lib/Blockquote.d.cts +31 -31
  9. package/lib/Blockquote.d.ts +31 -31
  10. package/lib/Blockquote.js +1 -1
  11. package/lib/Bold.cjs +1 -1
  12. package/lib/Bold.d.cts +31 -31
  13. package/lib/Bold.d.ts +31 -31
  14. package/lib/Bold.js +1 -1
  15. package/lib/BulletList.cjs +1 -1
  16. package/lib/BulletList.d.cts +31 -31
  17. package/lib/BulletList.d.ts +31 -31
  18. package/lib/BulletList.js +1 -1
  19. package/lib/Clear.cjs +1 -1
  20. package/lib/Clear.d.cts +31 -31
  21. package/lib/Clear.d.ts +31 -31
  22. package/lib/Clear.js +1 -1
  23. package/lib/Code.cjs +1 -1
  24. package/lib/Code.d.cts +31 -31
  25. package/lib/Code.d.ts +31 -31
  26. package/lib/Code.js +1 -1
  27. package/lib/CodeBlock.cjs +1 -1
  28. package/lib/CodeBlock.d.cts +31 -31
  29. package/lib/CodeBlock.d.ts +31 -31
  30. package/lib/CodeBlock.js +1 -1
  31. package/lib/CodeView.cjs +1 -1
  32. package/lib/CodeView.d.cts +31 -31
  33. package/lib/CodeView.d.ts +31 -31
  34. package/lib/CodeView.js +1 -1
  35. package/lib/Color.cjs +1 -1
  36. package/lib/Color.d.cts +31 -31
  37. package/lib/Color.d.ts +31 -31
  38. package/lib/Color.js +1 -1
  39. package/lib/Document.d.cts +31 -31
  40. package/lib/Document.d.ts +31 -31
  41. package/lib/{Drawer-B1rmIQfS.cjs → Drawer-CUntRzbs.cjs} +1 -1
  42. package/lib/{Drawer-DEqRsjHw.js → Drawer-Orz21MYs.js} +1 -1
  43. package/lib/Drawer.cjs +1 -1
  44. package/lib/Drawer.d.cts +31 -31
  45. package/lib/Drawer.d.ts +31 -31
  46. package/lib/Drawer.js +2 -2
  47. package/lib/Emoji.cjs +1 -1
  48. package/lib/Emoji.d.cts +31 -31
  49. package/lib/Emoji.d.ts +31 -31
  50. package/lib/Emoji.js +1 -1
  51. package/lib/{Excalidraw-Qr5vHe9J.cjs → Excalidraw-Bu8XuykT.cjs} +1 -1
  52. package/lib/{Excalidraw-D2y-x-OZ.js → Excalidraw-Cj-sXq5F.js} +1 -1
  53. package/lib/Excalidraw.cjs +1 -1
  54. package/lib/Excalidraw.d.cts +31 -31
  55. package/lib/Excalidraw.d.ts +31 -31
  56. package/lib/Excalidraw.js +1 -1
  57. package/lib/ExportPdf.cjs +1 -1
  58. package/lib/ExportPdf.d.cts +31 -31
  59. package/lib/ExportPdf.d.ts +31 -31
  60. package/lib/ExportPdf.js +1 -1
  61. package/lib/ExportWord.cjs +1 -1
  62. package/lib/ExportWord.d.cts +31 -31
  63. package/lib/ExportWord.d.ts +31 -31
  64. package/lib/ExportWord.js +1 -1
  65. package/lib/FontFamily.cjs +1 -1
  66. package/lib/FontFamily.d.cts +31 -31
  67. package/lib/FontFamily.d.ts +31 -31
  68. package/lib/FontFamily.js +2 -2
  69. package/lib/FontSize.cjs +1 -1
  70. package/lib/FontSize.d.cts +31 -31
  71. package/lib/FontSize.d.ts +31 -31
  72. package/lib/FontSize.js +2 -2
  73. package/lib/FormatPainter.cjs +1 -1
  74. package/lib/FormatPainter.d.cts +31 -31
  75. package/lib/FormatPainter.d.ts +31 -31
  76. package/lib/FormatPainter.js +1 -1
  77. package/lib/Heading.cjs +1 -1
  78. package/lib/Heading.d.cts +31 -31
  79. package/lib/Heading.d.ts +31 -31
  80. package/lib/Heading.js +2 -2
  81. package/lib/Highlight.cjs +1 -1
  82. package/lib/Highlight.d.cts +31 -31
  83. package/lib/Highlight.d.ts +31 -31
  84. package/lib/Highlight.js +1 -1
  85. package/lib/History.cjs +1 -1
  86. package/lib/History.d.cts +31 -31
  87. package/lib/History.d.ts +31 -31
  88. package/lib/History.js +1 -1
  89. package/lib/HorizontalRule.cjs +1 -1
  90. package/lib/HorizontalRule.d.cts +31 -31
  91. package/lib/HorizontalRule.d.ts +31 -31
  92. package/lib/HorizontalRule.js +1 -1
  93. package/lib/Iframe.cjs +1 -1
  94. package/lib/Iframe.d.cts +31 -31
  95. package/lib/Iframe.d.ts +31 -31
  96. package/lib/Iframe.js +1 -1
  97. package/lib/Image.cjs +1 -1
  98. package/lib/Image.d.cts +31 -31
  99. package/lib/Image.d.ts +31 -31
  100. package/lib/Image.js +1 -1
  101. package/lib/ImageGif.cjs +1 -1
  102. package/lib/ImageGif.d.cts +31 -31
  103. package/lib/ImageGif.d.ts +31 -31
  104. package/lib/ImageGif.js +1 -1
  105. package/lib/ImportWord.cjs +1 -1
  106. package/lib/ImportWord.d.cts +31 -31
  107. package/lib/ImportWord.d.ts +31 -31
  108. package/lib/ImportWord.js +1 -1
  109. package/lib/Indent.cjs +1 -1
  110. package/lib/Indent.d.cts +31 -31
  111. package/lib/Indent.d.ts +31 -31
  112. package/lib/Indent.js +1 -1
  113. package/lib/Italic.cjs +1 -1
  114. package/lib/Italic.d.cts +31 -31
  115. package/lib/Italic.d.ts +31 -31
  116. package/lib/Italic.js +1 -1
  117. package/lib/Katex.cjs +1 -1
  118. package/lib/Katex.d.cts +31 -31
  119. package/lib/Katex.d.ts +31 -31
  120. package/lib/Katex.js +2 -2
  121. package/lib/LineHeight.cjs +1 -1
  122. package/lib/LineHeight.d.cts +31 -31
  123. package/lib/LineHeight.d.ts +31 -31
  124. package/lib/LineHeight.js +1 -1
  125. package/lib/Link.cjs +1 -1
  126. package/lib/Link.d.cts +31 -31
  127. package/lib/Link.d.ts +31 -31
  128. package/lib/Link.js +1 -1
  129. package/lib/ListItem.d.cts +31 -31
  130. package/lib/ListItem.d.ts +31 -31
  131. package/lib/Mention.d.cts +31 -31
  132. package/lib/Mention.d.ts +31 -31
  133. package/lib/Mermaid.cjs +1 -1
  134. package/lib/Mermaid.d.cts +31 -31
  135. package/lib/Mermaid.d.ts +31 -31
  136. package/lib/Mermaid.js +2 -2
  137. package/lib/MoreMark.cjs +1 -1
  138. package/lib/MoreMark.d.cts +31 -31
  139. package/lib/MoreMark.d.ts +31 -31
  140. package/lib/MoreMark.js +1 -1
  141. package/lib/MultiColumn.cjs +1 -1
  142. package/lib/MultiColumn.d.cts +31 -31
  143. package/lib/MultiColumn.d.ts +31 -31
  144. package/lib/MultiColumn.js +1 -1
  145. package/lib/OrderedList.cjs +1 -1
  146. package/lib/OrderedList.d.cts +31 -31
  147. package/lib/OrderedList.d.ts +31 -31
  148. package/lib/OrderedList.js +1 -1
  149. package/lib/{RichTextEditor-CSA367l8.cjs → RichTextEditor-B5WYnm7K.cjs} +1 -1
  150. package/lib/{RichTextEditor-CrDGx-K7.js → RichTextEditor-CfAFp9V2.js} +145 -106
  151. package/lib/SearchAndReplace.cjs +1 -1
  152. package/lib/SearchAndReplace.d.cts +31 -31
  153. package/lib/SearchAndReplace.d.ts +31 -31
  154. package/lib/SearchAndReplace.js +1 -1
  155. package/lib/Selection.d.cts +31 -31
  156. package/lib/Selection.d.ts +31 -31
  157. package/lib/SlashCommand.cjs +1 -1
  158. package/lib/SlashCommand.d.cts +31 -31
  159. package/lib/SlashCommand.d.ts +31 -31
  160. package/lib/SlashCommand.js +1 -1
  161. package/lib/Strike.cjs +1 -1
  162. package/lib/Strike.d.cts +31 -31
  163. package/lib/Strike.d.ts +31 -31
  164. package/lib/Strike.js +1 -1
  165. package/lib/SubAndSuperScript.cjs +1 -1
  166. package/lib/SubAndSuperScript.d.cts +31 -31
  167. package/lib/SubAndSuperScript.d.ts +31 -31
  168. package/lib/SubAndSuperScript.js +1 -1
  169. package/lib/Table.cjs +1 -1
  170. package/lib/Table.d.cts +31 -31
  171. package/lib/Table.d.ts +31 -31
  172. package/lib/Table.js +1 -1
  173. package/lib/TableOfContent.cjs +1 -1
  174. package/lib/TableOfContent.d.cts +31 -31
  175. package/lib/TableOfContent.d.ts +31 -31
  176. package/lib/TableOfContent.js +1 -1
  177. package/lib/TaskList.cjs +1 -1
  178. package/lib/TaskList.d.cts +31 -31
  179. package/lib/TaskList.d.ts +31 -31
  180. package/lib/TaskList.js +1 -1
  181. package/lib/TextAlign.cjs +1 -1
  182. package/lib/TextAlign.d.cts +31 -31
  183. package/lib/TextAlign.d.ts +31 -31
  184. package/lib/TextAlign.js +1 -1
  185. package/lib/TextBubble.cjs +1 -1
  186. package/lib/TextBubble.d.cts +31 -31
  187. package/lib/TextBubble.d.ts +31 -31
  188. package/lib/TextBubble.js +1 -1
  189. package/lib/TextDirection.cjs +1 -1
  190. package/lib/TextDirection.d.cts +31 -31
  191. package/lib/TextDirection.d.ts +31 -31
  192. package/lib/TextDirection.js +1 -1
  193. package/lib/TextUnderline.cjs +1 -1
  194. package/lib/TextUnderline.d.cts +31 -31
  195. package/lib/TextUnderline.d.ts +31 -31
  196. package/lib/TextUnderline.js +1 -1
  197. package/lib/TrailingNode.d.cts +31 -31
  198. package/lib/TrailingNode.d.ts +31 -31
  199. package/lib/{Twitter-D-kqw1ZB.js → Twitter-9AKqIK4p.js} +1 -1
  200. package/lib/{Twitter-BRF2Ehp3.cjs → Twitter-BFwUowi8.cjs} +1 -1
  201. package/lib/Twitter.cjs +1 -1
  202. package/lib/Twitter.d.cts +31 -31
  203. package/lib/Twitter.d.ts +31 -31
  204. package/lib/Twitter.js +1 -1
  205. package/lib/Video.cjs +1 -1
  206. package/lib/Video.d.cts +31 -31
  207. package/lib/Video.d.ts +31 -31
  208. package/lib/Video.js +1 -1
  209. package/lib/bubble-extra.cjs +1 -1
  210. package/lib/bubble-extra.d.cts +31 -31
  211. package/lib/bubble-extra.d.ts +31 -31
  212. package/lib/bubble-extra.js +5 -5
  213. package/lib/index.cjs +1 -1
  214. package/lib/index.d.cts +31 -31
  215. package/lib/index.d.ts +31 -31
  216. package/lib/index.js +2 -2
  217. package/lib/locale-bundle.d.cts +31 -31
  218. package/lib/locale-bundle.d.ts +31 -31
  219. package/lib/{textarea-06Uv95yx.js → textarea-CWt0EMiJ.js} +1 -1
  220. package/lib/{textarea-QE8jlGEs.cjs → textarea-bND4WL8o.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
  }
@@ -51,8 +53,9 @@ declare module '@tiptap/core' {
51
53
 
52
54
  declare module '@tiptap/core' {
53
55
  interface Commands<ReturnType> {
54
- excalidraw: {
55
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
56
+ drawer: {
57
+ setDrawer: (options: any, replace?: any) => ReturnType;
58
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
56
59
  };
57
60
  }
58
61
  }
@@ -60,11 +63,8 @@ declare module '@tiptap/core' {
60
63
 
61
64
  declare module '@tiptap/core' {
62
65
  interface Commands<ReturnType> {
63
- emoji: {
64
- setEmoji: (emoji: {
65
- name: string;
66
- emoji: string;
67
- }) => ReturnType;
66
+ excalidraw: {
67
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
68
68
  };
69
69
  }
70
70
  }
@@ -123,19 +123,19 @@ declare module '@tiptap/core' {
123
123
 
124
124
  declare module '@tiptap/core' {
125
125
  interface Commands<ReturnType> {
126
- imageUpload: {
126
+ imageGifUpload: {
127
127
  /**
128
- * Add an image
128
+ * Add an image gif
129
129
  */
130
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
130
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
131
131
  /**
132
- * Update an image
132
+ * Update an image gif
133
133
  */
134
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
134
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
135
135
  /**
136
136
  * Set image alignment
137
137
  */
138
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
138
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
139
139
  };
140
140
  }
141
141
  }
@@ -143,28 +143,19 @@ declare module '@tiptap/core' {
143
143
 
144
144
  declare module '@tiptap/core' {
145
145
  interface Commands<ReturnType> {
146
- imageGifUpload: {
146
+ imageUpload: {
147
147
  /**
148
- * Add an image gif
148
+ * Add an image
149
149
  */
150
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
150
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
151
151
  /**
152
- * Update an image gif
152
+ * Update an image
153
153
  */
154
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
154
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
155
155
  /**
156
156
  * Set image alignment
157
157
  */
158
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
159
- };
160
- }
161
- }
162
-
163
-
164
- declare module '@tiptap/core' {
165
- interface Commands<ReturnType> {
166
- katex: {
167
- setKatex: (arg?: IKatexAttrs) => ReturnType;
158
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
168
159
  };
169
160
  }
170
161
  }
@@ -186,6 +177,15 @@ declare module '@tiptap/core' {
186
177
  }
187
178
 
188
179
 
180
+ declare module '@tiptap/core' {
181
+ interface Commands<ReturnType> {
182
+ katex: {
183
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
184
+ };
185
+ }
186
+ }
187
+
188
+
189
189
  declare module '@tiptap/core' {
190
190
  interface Commands<ReturnType> {
191
191
  lineHeight: {
@@ -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
  }
@@ -51,8 +53,9 @@ declare module '@tiptap/core' {
51
53
 
52
54
  declare module '@tiptap/core' {
53
55
  interface Commands<ReturnType> {
54
- excalidraw: {
55
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
56
+ drawer: {
57
+ setDrawer: (options: any, replace?: any) => ReturnType;
58
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
56
59
  };
57
60
  }
58
61
  }
@@ -60,11 +63,8 @@ declare module '@tiptap/core' {
60
63
 
61
64
  declare module '@tiptap/core' {
62
65
  interface Commands<ReturnType> {
63
- emoji: {
64
- setEmoji: (emoji: {
65
- name: string;
66
- emoji: string;
67
- }) => ReturnType;
66
+ excalidraw: {
67
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
68
68
  };
69
69
  }
70
70
  }
@@ -123,19 +123,19 @@ declare module '@tiptap/core' {
123
123
 
124
124
  declare module '@tiptap/core' {
125
125
  interface Commands<ReturnType> {
126
- imageUpload: {
126
+ imageGifUpload: {
127
127
  /**
128
- * Add an image
128
+ * Add an image gif
129
129
  */
130
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
130
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
131
131
  /**
132
- * Update an image
132
+ * Update an image gif
133
133
  */
134
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
134
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
135
135
  /**
136
136
  * Set image alignment
137
137
  */
138
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
138
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
139
139
  };
140
140
  }
141
141
  }
@@ -143,28 +143,19 @@ declare module '@tiptap/core' {
143
143
 
144
144
  declare module '@tiptap/core' {
145
145
  interface Commands<ReturnType> {
146
- imageGifUpload: {
146
+ imageUpload: {
147
147
  /**
148
- * Add an image gif
148
+ * Add an image
149
149
  */
150
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
150
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
151
151
  /**
152
- * Update an image gif
152
+ * Update an image
153
153
  */
154
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
154
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
155
155
  /**
156
156
  * Set image alignment
157
157
  */
158
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
159
- };
160
- }
161
- }
162
-
163
-
164
- declare module '@tiptap/core' {
165
- interface Commands<ReturnType> {
166
- katex: {
167
- setKatex: (arg?: IKatexAttrs) => ReturnType;
158
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
168
159
  };
169
160
  }
170
161
  }
@@ -186,6 +177,15 @@ declare module '@tiptap/core' {
186
177
  }
187
178
 
188
179
 
180
+ declare module '@tiptap/core' {
181
+ interface Commands<ReturnType> {
182
+ katex: {
183
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
184
+ };
185
+ }
186
+ }
187
+
188
+
189
189
  declare module '@tiptap/core' {
190
190
  interface Commands<ReturnType> {
191
191
  lineHeight: {
@@ -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-CfAFp9V2.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-B5WYnm7K.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
  }
@@ -126,8 +128,9 @@ declare module '@tiptap/core' {
126
128
 
127
129
  declare module '@tiptap/core' {
128
130
  interface Commands<ReturnType> {
129
- excalidraw: {
130
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
131
+ drawer: {
132
+ setDrawer: (options: any, replace?: any) => ReturnType;
133
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
131
134
  };
132
135
  }
133
136
  }
@@ -135,11 +138,8 @@ declare module '@tiptap/core' {
135
138
 
136
139
  declare module '@tiptap/core' {
137
140
  interface Commands<ReturnType> {
138
- emoji: {
139
- setEmoji: (emoji: {
140
- name: string;
141
- emoji: string;
142
- }) => ReturnType;
141
+ excalidraw: {
142
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
143
143
  };
144
144
  }
145
145
  }
@@ -198,19 +198,19 @@ declare module '@tiptap/core' {
198
198
 
199
199
  declare module '@tiptap/core' {
200
200
  interface Commands<ReturnType> {
201
- imageUpload: {
201
+ imageGifUpload: {
202
202
  /**
203
- * Add an image
203
+ * Add an image gif
204
204
  */
205
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
205
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
206
206
  /**
207
- * Update an image
207
+ * Update an image gif
208
208
  */
209
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
209
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
210
210
  /**
211
211
  * Set image alignment
212
212
  */
213
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
213
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
214
214
  };
215
215
  }
216
216
  }
@@ -218,28 +218,19 @@ declare module '@tiptap/core' {
218
218
 
219
219
  declare module '@tiptap/core' {
220
220
  interface Commands<ReturnType> {
221
- imageGifUpload: {
221
+ imageUpload: {
222
222
  /**
223
- * Add an image gif
223
+ * Add an image
224
224
  */
225
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
225
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
226
226
  /**
227
- * Update an image gif
227
+ * Update an image
228
228
  */
229
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
229
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
230
230
  /**
231
231
  * Set image alignment
232
232
  */
233
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
234
- };
235
- }
236
- }
237
-
238
-
239
- declare module '@tiptap/core' {
240
- interface Commands<ReturnType> {
241
- katex: {
242
- setKatex: (arg?: IKatexAttrs) => ReturnType;
233
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
243
234
  };
244
235
  }
245
236
  }
@@ -261,6 +252,15 @@ declare module '@tiptap/core' {
261
252
  }
262
253
 
263
254
 
255
+ declare module '@tiptap/core' {
256
+ interface Commands<ReturnType> {
257
+ katex: {
258
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
259
+ };
260
+ }
261
+ }
262
+
263
+
264
264
  declare module '@tiptap/core' {
265
265
  interface Commands<ReturnType> {
266
266
  lineHeight: {
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
  }
@@ -126,8 +128,9 @@ declare module '@tiptap/core' {
126
128
 
127
129
  declare module '@tiptap/core' {
128
130
  interface Commands<ReturnType> {
129
- excalidraw: {
130
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
131
+ drawer: {
132
+ setDrawer: (options: any, replace?: any) => ReturnType;
133
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
131
134
  };
132
135
  }
133
136
  }
@@ -135,11 +138,8 @@ declare module '@tiptap/core' {
135
138
 
136
139
  declare module '@tiptap/core' {
137
140
  interface Commands<ReturnType> {
138
- emoji: {
139
- setEmoji: (emoji: {
140
- name: string;
141
- emoji: string;
142
- }) => ReturnType;
141
+ excalidraw: {
142
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
143
143
  };
144
144
  }
145
145
  }
@@ -198,19 +198,19 @@ declare module '@tiptap/core' {
198
198
 
199
199
  declare module '@tiptap/core' {
200
200
  interface Commands<ReturnType> {
201
- imageUpload: {
201
+ imageGifUpload: {
202
202
  /**
203
- * Add an image
203
+ * Add an image gif
204
204
  */
205
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
205
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
206
206
  /**
207
- * Update an image
207
+ * Update an image gif
208
208
  */
209
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
209
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
210
210
  /**
211
211
  * Set image alignment
212
212
  */
213
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
213
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
214
214
  };
215
215
  }
216
216
  }
@@ -218,28 +218,19 @@ declare module '@tiptap/core' {
218
218
 
219
219
  declare module '@tiptap/core' {
220
220
  interface Commands<ReturnType> {
221
- imageGifUpload: {
221
+ imageUpload: {
222
222
  /**
223
- * Add an image gif
223
+ * Add an image
224
224
  */
225
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
225
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
226
226
  /**
227
- * Update an image gif
227
+ * Update an image
228
228
  */
229
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
229
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
230
230
  /**
231
231
  * Set image alignment
232
232
  */
233
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
234
- };
235
- }
236
- }
237
-
238
-
239
- declare module '@tiptap/core' {
240
- interface Commands<ReturnType> {
241
- katex: {
242
- setKatex: (arg?: IKatexAttrs) => ReturnType;
233
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
243
234
  };
244
235
  }
245
236
  }
@@ -261,6 +252,15 @@ declare module '@tiptap/core' {
261
252
  }
262
253
 
263
254
 
255
+ declare module '@tiptap/core' {
256
+ interface Commands<ReturnType> {
257
+ katex: {
258
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
259
+ };
260
+ }
261
+ }
262
+
263
+
264
264
  declare module '@tiptap/core' {
265
265
  interface Commands<ReturnType> {
266
266
  lineHeight: {
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-CfAFp9V2.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-B5WYnm7K.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
  }
@@ -130,8 +132,9 @@ declare module '@tiptap/core' {
130
132
 
131
133
  declare module '@tiptap/core' {
132
134
  interface Commands<ReturnType> {
133
- excalidraw: {
134
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
135
+ drawer: {
136
+ setDrawer: (options: any, replace?: any) => ReturnType;
137
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
135
138
  };
136
139
  }
137
140
  }
@@ -139,11 +142,8 @@ declare module '@tiptap/core' {
139
142
 
140
143
  declare module '@tiptap/core' {
141
144
  interface Commands<ReturnType> {
142
- emoji: {
143
- setEmoji: (emoji: {
144
- name: string;
145
- emoji: string;
146
- }) => ReturnType;
145
+ excalidraw: {
146
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
147
147
  };
148
148
  }
149
149
  }
@@ -202,19 +202,19 @@ declare module '@tiptap/core' {
202
202
 
203
203
  declare module '@tiptap/core' {
204
204
  interface Commands<ReturnType> {
205
- imageUpload: {
205
+ imageGifUpload: {
206
206
  /**
207
- * Add an image
207
+ * Add an image gif
208
208
  */
209
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
209
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
210
210
  /**
211
- * Update an image
211
+ * Update an image gif
212
212
  */
213
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
213
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
214
214
  /**
215
215
  * Set image alignment
216
216
  */
217
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
217
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
218
218
  };
219
219
  }
220
220
  }
@@ -222,28 +222,19 @@ declare module '@tiptap/core' {
222
222
 
223
223
  declare module '@tiptap/core' {
224
224
  interface Commands<ReturnType> {
225
- imageGifUpload: {
225
+ imageUpload: {
226
226
  /**
227
- * Add an image gif
227
+ * Add an image
228
228
  */
229
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
229
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
230
230
  /**
231
- * Update an image gif
231
+ * Update an image
232
232
  */
233
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
233
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
234
234
  /**
235
235
  * Set image alignment
236
236
  */
237
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
238
- };
239
- }
240
- }
241
-
242
-
243
- declare module '@tiptap/core' {
244
- interface Commands<ReturnType> {
245
- katex: {
246
- setKatex: (arg?: IKatexAttrs) => ReturnType;
237
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
247
238
  };
248
239
  }
249
240
  }
@@ -265,6 +256,15 @@ declare module '@tiptap/core' {
265
256
  }
266
257
 
267
258
 
259
+ declare module '@tiptap/core' {
260
+ interface Commands<ReturnType> {
261
+ katex: {
262
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
263
+ };
264
+ }
265
+ }
266
+
267
+
268
268
  declare module '@tiptap/core' {
269
269
  interface Commands<ReturnType> {
270
270
  lineHeight: {