reactjs-tiptap-editor 0.3.21 → 0.3.23

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 (222) hide show
  1. package/lib/{ActionMenuButton-BTFBZyG2.cjs → ActionMenuButton-5AJJxQy1.cjs} +1 -1
  2. package/lib/{ActionMenuButton-DXwnYZhJ.js → ActionMenuButton-DwzYAKDg.js} +1 -1
  3. package/lib/Attachment.cjs +1 -1
  4. package/lib/Attachment.d.cts +28 -28
  5. package/lib/Attachment.d.ts +28 -28
  6. package/lib/Attachment.js +1 -1
  7. package/lib/Blockquote.cjs +1 -1
  8. package/lib/Blockquote.d.cts +28 -28
  9. package/lib/Blockquote.d.ts +28 -28
  10. package/lib/Blockquote.js +1 -1
  11. package/lib/Bold.cjs +1 -1
  12. package/lib/Bold.d.cts +28 -28
  13. package/lib/Bold.d.ts +28 -28
  14. package/lib/Bold.js +1 -1
  15. package/lib/BulletList.cjs +1 -1
  16. package/lib/BulletList.d.cts +28 -28
  17. package/lib/BulletList.d.ts +28 -28
  18. package/lib/BulletList.js +1 -1
  19. package/lib/Clear.cjs +1 -1
  20. package/lib/Clear.d.cts +28 -28
  21. package/lib/Clear.d.ts +28 -28
  22. package/lib/Clear.js +1 -1
  23. package/lib/Code.cjs +1 -1
  24. package/lib/Code.d.cts +28 -28
  25. package/lib/Code.d.ts +28 -28
  26. package/lib/Code.js +1 -1
  27. package/lib/CodeBlock.cjs +1 -1
  28. package/lib/CodeBlock.d.cts +28 -28
  29. package/lib/CodeBlock.d.ts +28 -28
  30. package/lib/CodeBlock.js +1 -1
  31. package/lib/CodeView.cjs +1 -1
  32. package/lib/CodeView.d.cts +28 -28
  33. package/lib/CodeView.d.ts +28 -28
  34. package/lib/CodeView.js +1 -1
  35. package/lib/Color.cjs +1 -1
  36. package/lib/Color.d.cts +28 -28
  37. package/lib/Color.d.ts +28 -28
  38. package/lib/Color.js +1 -1
  39. package/lib/Document.d.cts +28 -28
  40. package/lib/Document.d.ts +28 -28
  41. package/lib/{Drawer-BrHHs2E9.cjs → Drawer-CCzPaigS.cjs} +1 -1
  42. package/lib/{Drawer-CVuwyG50.js → Drawer-Dc03j6W1.js} +1 -1
  43. package/lib/Drawer.cjs +1 -1
  44. package/lib/Drawer.d.cts +28 -28
  45. package/lib/Drawer.d.ts +28 -28
  46. package/lib/Drawer.js +2 -2
  47. package/lib/Emoji.cjs +1 -1
  48. package/lib/Emoji.d.cts +28 -28
  49. package/lib/Emoji.d.ts +28 -28
  50. package/lib/Emoji.js +116 -109
  51. package/lib/{Excalidraw-Be_GDV4Q.cjs → Excalidraw-Bxo4S3ET.cjs} +1 -1
  52. package/lib/{Excalidraw-frMX4K62.js → Excalidraw-yQ7O39ws.js} +1 -1
  53. package/lib/Excalidraw.cjs +1 -1
  54. package/lib/Excalidraw.d.cts +28 -28
  55. package/lib/Excalidraw.d.ts +28 -28
  56. package/lib/Excalidraw.js +1 -1
  57. package/lib/ExportPdf.cjs +1 -1
  58. package/lib/ExportPdf.d.cts +28 -28
  59. package/lib/ExportPdf.d.ts +28 -28
  60. package/lib/ExportPdf.js +1 -1
  61. package/lib/ExportWord.cjs +1 -1
  62. package/lib/ExportWord.d.cts +28 -28
  63. package/lib/ExportWord.d.ts +28 -28
  64. package/lib/ExportWord.js +1 -1
  65. package/lib/FontFamily.cjs +1 -1
  66. package/lib/FontFamily.d.cts +28 -28
  67. package/lib/FontFamily.d.ts +28 -28
  68. package/lib/FontFamily.js +2 -2
  69. package/lib/FontSize.cjs +1 -1
  70. package/lib/FontSize.d.cts +28 -28
  71. package/lib/FontSize.d.ts +28 -28
  72. package/lib/FontSize.js +2 -2
  73. package/lib/FormatPainter.cjs +1 -1
  74. package/lib/FormatPainter.d.cts +28 -28
  75. package/lib/FormatPainter.d.ts +28 -28
  76. package/lib/FormatPainter.js +1 -1
  77. package/lib/Heading.cjs +1 -1
  78. package/lib/Heading.d.cts +28 -28
  79. package/lib/Heading.d.ts +28 -28
  80. package/lib/Heading.js +2 -2
  81. package/lib/Highlight.cjs +1 -1
  82. package/lib/Highlight.d.cts +28 -28
  83. package/lib/Highlight.d.ts +28 -28
  84. package/lib/Highlight.js +1 -1
  85. package/lib/History.cjs +1 -1
  86. package/lib/History.d.cts +28 -28
  87. package/lib/History.d.ts +28 -28
  88. package/lib/History.js +1 -1
  89. package/lib/HorizontalRule.cjs +1 -1
  90. package/lib/HorizontalRule.d.cts +28 -28
  91. package/lib/HorizontalRule.d.ts +28 -28
  92. package/lib/HorizontalRule.js +1 -1
  93. package/lib/Iframe.cjs +1 -1
  94. package/lib/Iframe.d.cts +28 -28
  95. package/lib/Iframe.d.ts +28 -28
  96. package/lib/Iframe.js +1 -1
  97. package/lib/Image.cjs +1 -1
  98. package/lib/Image.d.cts +28 -28
  99. package/lib/Image.d.ts +28 -28
  100. package/lib/Image.js +1 -1
  101. package/lib/ImageGif.cjs +1 -1
  102. package/lib/ImageGif.d.cts +28 -28
  103. package/lib/ImageGif.d.ts +28 -28
  104. package/lib/ImageGif.js +1 -1
  105. package/lib/ImportWord.cjs +1 -1
  106. package/lib/ImportWord.d.cts +28 -28
  107. package/lib/ImportWord.d.ts +28 -28
  108. package/lib/ImportWord.js +1 -1
  109. package/lib/Indent.cjs +1 -1
  110. package/lib/Indent.d.cts +28 -28
  111. package/lib/Indent.d.ts +28 -28
  112. package/lib/Indent.js +1 -1
  113. package/lib/Italic.cjs +1 -1
  114. package/lib/Italic.d.cts +28 -28
  115. package/lib/Italic.d.ts +28 -28
  116. package/lib/Italic.js +1 -1
  117. package/lib/Katex.cjs +1 -1
  118. package/lib/Katex.d.cts +28 -28
  119. package/lib/Katex.d.ts +28 -28
  120. package/lib/Katex.js +2 -2
  121. package/lib/LineHeight.cjs +1 -1
  122. package/lib/LineHeight.d.cts +28 -28
  123. package/lib/LineHeight.d.ts +28 -28
  124. package/lib/LineHeight.js +1 -1
  125. package/lib/Link.cjs +1 -1
  126. package/lib/Link.d.cts +28 -28
  127. package/lib/Link.d.ts +28 -28
  128. package/lib/Link.js +1 -1
  129. package/lib/ListItem.d.cts +28 -28
  130. package/lib/ListItem.d.ts +28 -28
  131. package/lib/Mention.d.cts +28 -28
  132. package/lib/Mention.d.ts +28 -28
  133. package/lib/Mermaid.cjs +1 -1
  134. package/lib/Mermaid.d.cts +28 -28
  135. package/lib/Mermaid.d.ts +28 -28
  136. package/lib/Mermaid.js +2 -2
  137. package/lib/MoreMark.cjs +1 -1
  138. package/lib/MoreMark.d.cts +28 -28
  139. package/lib/MoreMark.d.ts +28 -28
  140. package/lib/MoreMark.js +1 -1
  141. package/lib/MultiColumn.cjs +1 -1
  142. package/lib/MultiColumn.d.cts +28 -28
  143. package/lib/MultiColumn.d.ts +28 -28
  144. package/lib/MultiColumn.js +1 -1
  145. package/lib/OrderedList.cjs +1 -1
  146. package/lib/OrderedList.d.cts +28 -28
  147. package/lib/OrderedList.d.ts +28 -28
  148. package/lib/OrderedList.js +1 -1
  149. package/lib/{RichTextEditor-CAxwVWUE.cjs → RichTextEditor-BnC1uaUo.cjs} +6 -3
  150. package/lib/{RichTextEditor-DjTnd5Uu.js → RichTextEditor-CqgbZwS5.js} +8 -5
  151. package/lib/SearchAndReplace.cjs +1 -1
  152. package/lib/SearchAndReplace.d.cts +28 -28
  153. package/lib/SearchAndReplace.d.ts +28 -28
  154. package/lib/SearchAndReplace.js +1 -1
  155. package/lib/Selection.d.cts +28 -28
  156. package/lib/Selection.d.ts +28 -28
  157. package/lib/SlashCommand.cjs +1 -1
  158. package/lib/SlashCommand.d.cts +28 -28
  159. package/lib/SlashCommand.d.ts +28 -28
  160. package/lib/SlashCommand.js +1 -1
  161. package/lib/Strike.cjs +1 -1
  162. package/lib/Strike.d.cts +28 -28
  163. package/lib/Strike.d.ts +28 -28
  164. package/lib/Strike.js +1 -1
  165. package/lib/SubAndSuperScript.cjs +1 -1
  166. package/lib/SubAndSuperScript.d.cts +28 -28
  167. package/lib/SubAndSuperScript.d.ts +28 -28
  168. package/lib/SubAndSuperScript.js +1 -1
  169. package/lib/Table.cjs +1 -1
  170. package/lib/Table.d.cts +28 -28
  171. package/lib/Table.d.ts +28 -28
  172. package/lib/Table.js +1 -1
  173. package/lib/TableOfContent.cjs +1 -1
  174. package/lib/TableOfContent.d.cts +28 -28
  175. package/lib/TableOfContent.d.ts +28 -28
  176. package/lib/TableOfContent.js +1 -1
  177. package/lib/TaskList.cjs +1 -1
  178. package/lib/TaskList.d.cts +28 -28
  179. package/lib/TaskList.d.ts +28 -28
  180. package/lib/TaskList.js +1 -1
  181. package/lib/TextAlign.cjs +1 -1
  182. package/lib/TextAlign.d.cts +28 -28
  183. package/lib/TextAlign.d.ts +28 -28
  184. package/lib/TextAlign.js +1 -1
  185. package/lib/TextBubble.cjs +1 -1
  186. package/lib/TextBubble.d.cts +28 -28
  187. package/lib/TextBubble.d.ts +28 -28
  188. package/lib/TextBubble.js +1 -1
  189. package/lib/TextDirection.cjs +1 -1
  190. package/lib/TextDirection.d.cts +28 -28
  191. package/lib/TextDirection.d.ts +28 -28
  192. package/lib/TextDirection.js +1 -1
  193. package/lib/TextUnderline.cjs +1 -1
  194. package/lib/TextUnderline.d.cts +28 -28
  195. package/lib/TextUnderline.d.ts +28 -28
  196. package/lib/TextUnderline.js +1 -1
  197. package/lib/TrailingNode.d.cts +28 -28
  198. package/lib/TrailingNode.d.ts +28 -28
  199. package/lib/{Twitter-V0OzBT_E.cjs → Twitter-2BEmpZYn.cjs} +1 -1
  200. package/lib/{Twitter-dRxbZOad.js → Twitter-DjzxXZcS.js} +1 -1
  201. package/lib/Twitter.cjs +1 -1
  202. package/lib/Twitter.d.cts +28 -28
  203. package/lib/Twitter.d.ts +28 -28
  204. package/lib/Twitter.js +1 -1
  205. package/lib/Video.cjs +1 -1
  206. package/lib/Video.d.cts +28 -28
  207. package/lib/Video.d.ts +28 -28
  208. package/lib/Video.js +1 -1
  209. package/lib/bubble-extra.cjs +1 -1
  210. package/lib/bubble-extra.d.cts +28 -28
  211. package/lib/bubble-extra.d.ts +28 -28
  212. package/lib/bubble-extra.js +5 -5
  213. package/lib/index.cjs +1 -1
  214. package/lib/index.d.cts +28 -28
  215. package/lib/index.d.ts +28 -28
  216. package/lib/index.js +2 -2
  217. package/lib/locale-bundle.d.cts +28 -28
  218. package/lib/locale-bundle.d.ts +28 -28
  219. package/lib/style.css +1 -1
  220. package/lib/{textarea-6c8drwXJ.js → textarea-ClmQTGYC.js} +1 -1
  221. package/lib/{textarea-BsJTSgT-.cjs → textarea-DsAuYgt7.cjs} +1 -1
  222. package/package.json +2 -2
@@ -36,11 +36,9 @@ declare module '@tiptap/core' {
36
36
 
37
37
  declare module '@tiptap/core' {
38
38
  interface Commands<ReturnType> {
39
- emoji: {
40
- setEmoji: (emoji: {
41
- name: string;
42
- emoji: string;
43
- }) => ReturnType;
39
+ drawer: {
40
+ setDrawer: (options: any, replace?: any) => ReturnType;
41
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
44
42
  };
45
43
  }
46
44
  }
@@ -48,9 +46,11 @@ declare module '@tiptap/core' {
48
46
 
49
47
  declare module '@tiptap/core' {
50
48
  interface Commands<ReturnType> {
51
- drawer: {
52
- setDrawer: (options: any, replace?: any) => ReturnType;
53
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
49
+ emoji: {
50
+ setEmoji: (emoji: {
51
+ name: string;
52
+ emoji: string;
53
+ }) => ReturnType;
54
54
  };
55
55
  }
56
56
  }
@@ -101,6 +101,21 @@ declare module '@tiptap/core' {
101
101
  }
102
102
 
103
103
 
104
+ declare module '@tiptap/core' {
105
+ interface Commands<ReturnType> {
106
+ iframe: {
107
+ /**
108
+ * Add an iframe
109
+ */
110
+ setIframe: (options: {
111
+ src: string;
112
+ service: string;
113
+ }) => ReturnType;
114
+ };
115
+ }
116
+ }
117
+
118
+
104
119
  declare module '@tiptap/core' {
105
120
  interface Commands<ReturnType> {
106
121
  imageUpload: {
@@ -121,21 +136,6 @@ declare module '@tiptap/core' {
121
136
  }
122
137
 
123
138
 
124
- declare module '@tiptap/core' {
125
- interface Commands<ReturnType> {
126
- iframe: {
127
- /**
128
- * Add an iframe
129
- */
130
- setIframe: (options: {
131
- src: string;
132
- service: string;
133
- }) => ReturnType;
134
- };
135
- }
136
- }
137
-
138
-
139
139
  declare module '@tiptap/core' {
140
140
  interface Commands<ReturnType> {
141
141
  imageGifUpload: {
@@ -174,9 +174,8 @@ declare module '@tiptap/core' {
174
174
 
175
175
  declare module '@tiptap/core' {
176
176
  interface Commands<ReturnType> {
177
- lineHeight: {
178
- setLineHeight: (lineHeight: string) => ReturnType;
179
- unsetLineHeight: () => ReturnType;
177
+ katex: {
178
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
180
179
  };
181
180
  }
182
181
  }
@@ -184,8 +183,9 @@ declare module '@tiptap/core' {
184
183
 
185
184
  declare module '@tiptap/core' {
186
185
  interface Commands<ReturnType> {
187
- katex: {
188
- setKatex: (arg?: IKatexAttrs) => ReturnType;
186
+ lineHeight: {
187
+ setLineHeight: (lineHeight: string) => ReturnType;
188
+ unsetLineHeight: () => ReturnType;
189
189
  };
190
190
  }
191
191
  }
package/lib/ListItem.d.ts CHANGED
@@ -36,11 +36,9 @@ declare module '@tiptap/core' {
36
36
 
37
37
  declare module '@tiptap/core' {
38
38
  interface Commands<ReturnType> {
39
- emoji: {
40
- setEmoji: (emoji: {
41
- name: string;
42
- emoji: string;
43
- }) => ReturnType;
39
+ drawer: {
40
+ setDrawer: (options: any, replace?: any) => ReturnType;
41
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
44
42
  };
45
43
  }
46
44
  }
@@ -48,9 +46,11 @@ declare module '@tiptap/core' {
48
46
 
49
47
  declare module '@tiptap/core' {
50
48
  interface Commands<ReturnType> {
51
- drawer: {
52
- setDrawer: (options: any, replace?: any) => ReturnType;
53
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
49
+ emoji: {
50
+ setEmoji: (emoji: {
51
+ name: string;
52
+ emoji: string;
53
+ }) => ReturnType;
54
54
  };
55
55
  }
56
56
  }
@@ -101,6 +101,21 @@ declare module '@tiptap/core' {
101
101
  }
102
102
 
103
103
 
104
+ declare module '@tiptap/core' {
105
+ interface Commands<ReturnType> {
106
+ iframe: {
107
+ /**
108
+ * Add an iframe
109
+ */
110
+ setIframe: (options: {
111
+ src: string;
112
+ service: string;
113
+ }) => ReturnType;
114
+ };
115
+ }
116
+ }
117
+
118
+
104
119
  declare module '@tiptap/core' {
105
120
  interface Commands<ReturnType> {
106
121
  imageUpload: {
@@ -121,21 +136,6 @@ declare module '@tiptap/core' {
121
136
  }
122
137
 
123
138
 
124
- declare module '@tiptap/core' {
125
- interface Commands<ReturnType> {
126
- iframe: {
127
- /**
128
- * Add an iframe
129
- */
130
- setIframe: (options: {
131
- src: string;
132
- service: string;
133
- }) => ReturnType;
134
- };
135
- }
136
- }
137
-
138
-
139
139
  declare module '@tiptap/core' {
140
140
  interface Commands<ReturnType> {
141
141
  imageGifUpload: {
@@ -174,9 +174,8 @@ declare module '@tiptap/core' {
174
174
 
175
175
  declare module '@tiptap/core' {
176
176
  interface Commands<ReturnType> {
177
- lineHeight: {
178
- setLineHeight: (lineHeight: string) => ReturnType;
179
- unsetLineHeight: () => ReturnType;
177
+ katex: {
178
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
180
179
  };
181
180
  }
182
181
  }
@@ -184,8 +183,9 @@ declare module '@tiptap/core' {
184
183
 
185
184
  declare module '@tiptap/core' {
186
185
  interface Commands<ReturnType> {
187
- katex: {
188
- setKatex: (arg?: IKatexAttrs) => ReturnType;
186
+ lineHeight: {
187
+ setLineHeight: (lineHeight: string) => ReturnType;
188
+ unsetLineHeight: () => ReturnType;
189
189
  };
190
190
  }
191
191
  }
package/lib/Mention.d.cts CHANGED
@@ -39,11 +39,9 @@ declare module '@tiptap/core' {
39
39
 
40
40
  declare module '@tiptap/core' {
41
41
  interface Commands<ReturnType> {
42
- emoji: {
43
- setEmoji: (emoji: {
44
- name: string;
45
- emoji: string;
46
- }) => ReturnType;
42
+ drawer: {
43
+ setDrawer: (options: any, replace?: any) => ReturnType;
44
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
47
45
  };
48
46
  }
49
47
  }
@@ -51,9 +49,11 @@ declare module '@tiptap/core' {
51
49
 
52
50
  declare module '@tiptap/core' {
53
51
  interface Commands<ReturnType> {
54
- drawer: {
55
- setDrawer: (options: any, replace?: any) => ReturnType;
56
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
52
+ emoji: {
53
+ setEmoji: (emoji: {
54
+ name: string;
55
+ emoji: string;
56
+ }) => ReturnType;
57
57
  };
58
58
  }
59
59
  }
@@ -104,6 +104,21 @@ declare module '@tiptap/core' {
104
104
  }
105
105
 
106
106
 
107
+ declare module '@tiptap/core' {
108
+ interface Commands<ReturnType> {
109
+ iframe: {
110
+ /**
111
+ * Add an iframe
112
+ */
113
+ setIframe: (options: {
114
+ src: string;
115
+ service: string;
116
+ }) => ReturnType;
117
+ };
118
+ }
119
+ }
120
+
121
+
107
122
  declare module '@tiptap/core' {
108
123
  interface Commands<ReturnType> {
109
124
  imageUpload: {
@@ -124,21 +139,6 @@ declare module '@tiptap/core' {
124
139
  }
125
140
 
126
141
 
127
- declare module '@tiptap/core' {
128
- interface Commands<ReturnType> {
129
- iframe: {
130
- /**
131
- * Add an iframe
132
- */
133
- setIframe: (options: {
134
- src: string;
135
- service: string;
136
- }) => ReturnType;
137
- };
138
- }
139
- }
140
-
141
-
142
142
  declare module '@tiptap/core' {
143
143
  interface Commands<ReturnType> {
144
144
  imageGifUpload: {
@@ -177,9 +177,8 @@ declare module '@tiptap/core' {
177
177
 
178
178
  declare module '@tiptap/core' {
179
179
  interface Commands<ReturnType> {
180
- lineHeight: {
181
- setLineHeight: (lineHeight: string) => ReturnType;
182
- unsetLineHeight: () => ReturnType;
180
+ katex: {
181
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
183
182
  };
184
183
  }
185
184
  }
@@ -187,8 +186,9 @@ declare module '@tiptap/core' {
187
186
 
188
187
  declare module '@tiptap/core' {
189
188
  interface Commands<ReturnType> {
190
- katex: {
191
- setKatex: (arg?: IKatexAttrs) => ReturnType;
189
+ lineHeight: {
190
+ setLineHeight: (lineHeight: string) => ReturnType;
191
+ unsetLineHeight: () => ReturnType;
192
192
  };
193
193
  }
194
194
  }
package/lib/Mention.d.ts CHANGED
@@ -39,11 +39,9 @@ declare module '@tiptap/core' {
39
39
 
40
40
  declare module '@tiptap/core' {
41
41
  interface Commands<ReturnType> {
42
- emoji: {
43
- setEmoji: (emoji: {
44
- name: string;
45
- emoji: string;
46
- }) => ReturnType;
42
+ drawer: {
43
+ setDrawer: (options: any, replace?: any) => ReturnType;
44
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
47
45
  };
48
46
  }
49
47
  }
@@ -51,9 +49,11 @@ declare module '@tiptap/core' {
51
49
 
52
50
  declare module '@tiptap/core' {
53
51
  interface Commands<ReturnType> {
54
- drawer: {
55
- setDrawer: (options: any, replace?: any) => ReturnType;
56
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
52
+ emoji: {
53
+ setEmoji: (emoji: {
54
+ name: string;
55
+ emoji: string;
56
+ }) => ReturnType;
57
57
  };
58
58
  }
59
59
  }
@@ -104,6 +104,21 @@ declare module '@tiptap/core' {
104
104
  }
105
105
 
106
106
 
107
+ declare module '@tiptap/core' {
108
+ interface Commands<ReturnType> {
109
+ iframe: {
110
+ /**
111
+ * Add an iframe
112
+ */
113
+ setIframe: (options: {
114
+ src: string;
115
+ service: string;
116
+ }) => ReturnType;
117
+ };
118
+ }
119
+ }
120
+
121
+
107
122
  declare module '@tiptap/core' {
108
123
  interface Commands<ReturnType> {
109
124
  imageUpload: {
@@ -124,21 +139,6 @@ declare module '@tiptap/core' {
124
139
  }
125
140
 
126
141
 
127
- declare module '@tiptap/core' {
128
- interface Commands<ReturnType> {
129
- iframe: {
130
- /**
131
- * Add an iframe
132
- */
133
- setIframe: (options: {
134
- src: string;
135
- service: string;
136
- }) => ReturnType;
137
- };
138
- }
139
- }
140
-
141
-
142
142
  declare module '@tiptap/core' {
143
143
  interface Commands<ReturnType> {
144
144
  imageGifUpload: {
@@ -177,9 +177,8 @@ declare module '@tiptap/core' {
177
177
 
178
178
  declare module '@tiptap/core' {
179
179
  interface Commands<ReturnType> {
180
- lineHeight: {
181
- setLineHeight: (lineHeight: string) => ReturnType;
182
- unsetLineHeight: () => ReturnType;
180
+ katex: {
181
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
183
182
  };
184
183
  }
185
184
  }
@@ -187,8 +186,9 @@ declare module '@tiptap/core' {
187
186
 
188
187
  declare module '@tiptap/core' {
189
188
  interface Commands<ReturnType> {
190
- katex: {
191
- setKatex: (arg?: IKatexAttrs) => ReturnType;
189
+ lineHeight: {
190
+ setLineHeight: (lineHeight: string) => ReturnType;
191
+ unsetLineHeight: () => ReturnType;
192
192
  };
193
193
  }
194
194
  }
package/lib/Mermaid.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var W=Object.create;var G=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var Z=Object.getPrototypeOf,Y=Object.prototype.hasOwnProperty;var J=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of U(e))!Y.call(t,l)&&l!==r&&G(t,l,{get:()=>e[l],enumerable:!(a=X(e,l))||a.enumerable});return t};var K=(t,e,r)=>(r=t!=null?W(Z(t)):{},J(e||!t||!t.__esModule?G(r,"default",{value:t,enumerable:!0}):r,t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("./index-ByRfqzMr.cjs"),u=require("./RichTextEditor-CAxwVWUE.cjs"),F=require("./dom-dataset-Byuf1YmW.cjs"),o=require("react/jsx-runtime"),s=require("react"),P=require("./shortId-Bfj8TyNr.cjs"),Q=require("./textarea-BsJTSgT-.cjs"),S=require("./index-C19MB4Al.cjs"),$=`graph TB
1
+ "use strict";var W=Object.create;var G=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var Z=Object.getPrototypeOf,Y=Object.prototype.hasOwnProperty;var J=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of U(e))!Y.call(t,l)&&l!==r&&G(t,l,{get:()=>e[l],enumerable:!(a=X(e,l))||a.enumerable});return t};var K=(t,e,r)=>(r=t!=null?W(Z(t)):{},J(e||!t||!t.__esModule?G(r,"default",{value:t,enumerable:!0}):r,t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("./index-ByRfqzMr.cjs"),u=require("./RichTextEditor-BnC1uaUo.cjs"),F=require("./dom-dataset-Byuf1YmW.cjs"),o=require("react/jsx-runtime"),s=require("react"),P=require("./shortId-Bfj8TyNr.cjs"),Q=require("./textarea-DsAuYgt7.cjs"),S=require("./index-C19MB4Al.cjs"),$=`graph TB
2
2
  a-->b`,ee=({editor:t,upload:e})=>{const[r,a]=s.useState($),[l,v]=s.useState(""),[T,y]=s.useState(!1),A=s.useRef(null),[d,h]=s.useState(null),E=s.useCallback(c=>{c&&import("mermaid").then(x=>{h(x.default)})},[]),_=async c=>{try{const{svg:x}=await d.render("mermaid-svg",c);v(x)}catch{v("")}},L=()=>{d.initialize({darkMode:!1,startOnLoad:!1,fontSize:12,theme:"base"}),_(r)};s.useEffect(()=>{d&&T&&L()},[d,T]),s.useEffect(()=>{d&&T&&_(r)},[d&&r]);const R=async()=>{if(r!==""){if(r){const c=A.current.querySelector("svg"),{width:x,height:j}=c.getBoundingClientRect(),I=`mermaid-${P.shortId()}.svg`;let M=P.i(c.outerHTML);if(e){console.log({src:M});const H=u.dataURLtoFile(M,I);M=await e(H)}t==null||t.chain().focus().setMermaid({type:"mermaid",src:M,alt:encodeURIComponent(r),width:x,height:j},!!r).run()}y(!1)}};return o.jsxs(u.Dialog,{onOpenChange:y,open:T,children:[o.jsx(u.DialogTrigger,{asChild:!0,children:o.jsx(u.ActionButton,{action:()=>y(!0),icon:"Mermaid",tooltip:"Mermaid"})}),o.jsxs(u.DialogContent,{className:"richtext-z-[99999] !richtext-max-w-[1300px]",children:[o.jsx(u.DialogTitle,{children:"Mermaid"}),o.jsx("div",{ref:E,style:{height:"100%",border:"1px solid hsl(var(--border))"},children:o.jsxs("div",{className:"richtext-flex richtext-gap-[10px] richtext-rounded-[10px] richtext-p-[10px]",children:[o.jsx(Q.Textarea,{autoFocus:!0,className:"richtext-flex-1",defaultValue:$,onChange:c=>a(c.target.value),placeholder:"Text",required:!0,rows:10,value:r,style:{color:"hsl(var(--richtext-foreground))"}}),o.jsx("div",{className:"richtext-flex richtext-flex-1 richtext-items-center richtext-justify-center richtext-rounded-[10px] richtext-p-[10px]",dangerouslySetInnerHTML:{__html:l},ref:A,style:{height:"100%",borderWidth:1,minHeight:500,background:"#fff"}})]})}),o.jsx(u.DialogFooter,{children:o.jsx(u.Button,{onClick:R,type:"button",children:"Save changes"})})]})]})},O={TOP_LEFT:"tl",TOP_RIGHT:"tr",BOTTOM_LEFT:"bl",BOTTOM_RIGHT:"br"};function te({editor:t,node:e,updateAttributes:r,getPos:a,selected:l}){const[v,T]=s.useState({width:S.IMAGE_MAX_SIZE,height:S.IMAGE_MAX_SIZE}),[y,A]=s.useState({width:0,height:0}),[d]=s.useState([O.TOP_LEFT,O.TOP_RIGHT,O.BOTTOM_LEFT,O.BOTTOM_RIGHT]),[h,E]=s.useState(!1),[_,L]=s.useState({x:0,y:0,w:0,h:0,dir:""}),{align:R}=e==null?void 0:e.attrs,c=s.useMemo(()=>{const{src:i,alt:m,width:f,height:b}=e==null?void 0:e.attrs,w=q.isNumber(f)?`${f}px`:f,n=q.isNumber(b)?`${b}px`:b;return{src:i||void 0,alt:m||void 0,style:{width:w||void 0,height:n||void 0}}},[e==null?void 0:e.attrs]),x=s.useMemo(()=>{const{style:{width:i}}=c;return{width:i==="100%"?i:void 0}},[c]);function j(i){A({width:i.target.width,height:i.target.height})}function I(){t.commands.setNodeSelection(a())}const M=s.useCallback(u.throttle(()=>{const{width:i}=getComputedStyle(t.view.dom);T(m=>({...m,width:Number.parseInt(i,10)}))},S.IMAGE_THROTTLE_WAIT_TIME),[t]);function H(i,m){i.preventDefault(),i.stopPropagation();const f=y.width,b=y.height,w=f/b;let n=Number(e.attrs.width),p=Number(e.attrs.height);const g=v.width;n&&!p?(n=n>g?g:n,p=Math.round(n/w)):p&&!n?(n=Math.round(p*w),n=n>g?g:n):!n&&!p?(n=f>g?g:f,p=Math.round(n/w)):n=n>g?g:n,E(!0),L({x:i.clientX,y:i.clientY,w:n,h:p,dir:m})}const N=s.useCallback(u.throttle(i=>{if(i.preventDefault(),i.stopPropagation(),!h)return;const{x:m,w:f,dir:b}=_,w=(i.clientX-m)*(/l/.test(b)?-1:1),{width:n,height:p}=e==null?void 0:e.attrs,g=n/p,B=u.clamp(f+w,S.IMAGE_MIN_SIZE,v.width),V=Math.round(B/g);r({width:B,height:V})},S.IMAGE_THROTTLE_WAIT_TIME),[h,_,v,r,e==null?void 0:e.attrs]),C=s.useCallback(i=>{i.preventDefault(),i.stopPropagation(),h&&(L({x:0,y:0,w:0,h:0,dir:""}),E(!1),I())},[h,I]),D=s.useCallback(()=>{document==null||document.addEventListener("mousemove",N,!0),document==null||document.addEventListener("mouseup",C,!0)},[N,C]),z=s.useCallback(()=>{document==null||document.removeEventListener("mousemove",N,!0),document==null||document.removeEventListener("mouseup",C,!0)},[N,C]);s.useEffect(()=>(h?D():z(),()=>{z()}),[h,D,z]);const k=s.useMemo(()=>new ResizeObserver(()=>M()),[M]);return s.useEffect(()=>(k.observe(t.view.dom),()=>{k.disconnect()}),[t.view.dom,k]),o.jsx(F.NodeViewWrapper,{className:"image-view",style:{...x,width:"100%",textAlign:R},children:o.jsxs("div",{"data-drag-handle":!0,draggable:"true",style:{...x,background:"#fff"},className:`image-view__body ${l?"image-view__body--focused":""} ${h?"image-view__body--resizing":""}`,children:[o.jsx("img",{alt:c.alt,className:"image-view__body__image block",height:"auto",onClick:I,onLoad:j,src:c.src,style:c.style}),t.view.editable&&(l||h)&&o.jsx("div",{className:"image-resizer",children:d==null?void 0:d.map(i=>o.jsx("span",{className:`image-resizer__handler image-resizer__handler--${i}`,onMouseDown:m=>H(m,i)},`image-dir-${i}`))})]})})}const re=u.Image.extend({name:"mermaid",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),inline:!1,content:"",marks:"",group:"block",draggable:!1,selectable:!0,atom:!0,HTMLAttributes:{class:"mermaid"},button:({editor:e,t:r,extension:a})=>{var l;return{component:ee,componentProps:{action:()=>!0,isActive:()=>!1,disabled:!1,editor:e,icon:"Mermaid",tooltip:r("editor.mermaid.tooltip"),upload:(l=a==null?void 0:a.options)==null?void 0:l.upload}}}}},addAttributes(){var t;return{...(t=this.parent)==null?void 0:t.call(this),width:{default:null,parseHTML:e=>{const r=e.querySelector("img"),a=r==null?void 0:r.getAttribute("width");return a?Number.parseInt(a,10):320},renderHTML:e=>({width:e.width})},height:{default:null,parseHTML:e=>{const r=e.querySelector("img"),a=r==null?void 0:r.getAttribute("height");return a?Number.parseInt(a,10):212},renderHTML:e=>({height:e.height})},align:{default:"center",parseHTML:e=>e.getAttribute("align"),renderHTML:e=>({align:e.align})}}},addNodeView(){return F.ReactNodeViewRenderer(te)},addCommands(){return{setMermaid:(t,e)=>({commands:r,editor:a})=>e?r.insertContent({type:this.name,attrs:t}):r.insertContentAt(a.state.selection.anchor,{type:this.name,attrs:t}),setAlignImageMermaid:t=>({commands:e})=>e.updateAttributes(this.name,{align:t})}},renderHTML({HTMLAttributes:t}){const{align:e}=t;return["div",{style:e?`text-align: ${e};`:"",class:"imageMermaid"},["img",q.mergeAttributes(this.options.HTMLAttributes,t)]]},parseHTML(){return[{tag:"div[class=imageMermaid]",getAttrs:t=>{const e=t.querySelector("img"),r=e==null?void 0:e.getAttribute("width"),a=e==null?void 0:e.getAttribute("height");return{src:e==null?void 0:e.getAttribute("src"),alt:e==null?void 0:e.getAttribute("alt"),width:r?Number.parseInt(r,10):null,height:a?Number.parseInt(a,10):null,align:(e==null?void 0:e.getAttribute("align"))||t.style.textAlign||null}}}]}});exports.Mermaid=re;
package/lib/Mermaid.d.cts CHANGED
@@ -111,11 +111,9 @@ declare module '@tiptap/core' {
111
111
 
112
112
  declare module '@tiptap/core' {
113
113
  interface Commands<ReturnType> {
114
- emoji: {
115
- setEmoji: (emoji: {
116
- name: string;
117
- emoji: string;
118
- }) => ReturnType;
114
+ drawer: {
115
+ setDrawer: (options: any, replace?: any) => ReturnType;
116
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
119
117
  };
120
118
  }
121
119
  }
@@ -123,9 +121,11 @@ declare module '@tiptap/core' {
123
121
 
124
122
  declare module '@tiptap/core' {
125
123
  interface Commands<ReturnType> {
126
- drawer: {
127
- setDrawer: (options: any, replace?: any) => ReturnType;
128
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
124
+ emoji: {
125
+ setEmoji: (emoji: {
126
+ name: string;
127
+ emoji: string;
128
+ }) => ReturnType;
129
129
  };
130
130
  }
131
131
  }
@@ -176,6 +176,21 @@ declare module '@tiptap/core' {
176
176
  }
177
177
 
178
178
 
179
+ declare module '@tiptap/core' {
180
+ interface Commands<ReturnType> {
181
+ iframe: {
182
+ /**
183
+ * Add an iframe
184
+ */
185
+ setIframe: (options: {
186
+ src: string;
187
+ service: string;
188
+ }) => ReturnType;
189
+ };
190
+ }
191
+ }
192
+
193
+
179
194
  declare module '@tiptap/core' {
180
195
  interface Commands<ReturnType> {
181
196
  imageUpload: {
@@ -196,21 +211,6 @@ declare module '@tiptap/core' {
196
211
  }
197
212
 
198
213
 
199
- declare module '@tiptap/core' {
200
- interface Commands<ReturnType> {
201
- iframe: {
202
- /**
203
- * Add an iframe
204
- */
205
- setIframe: (options: {
206
- src: string;
207
- service: string;
208
- }) => ReturnType;
209
- };
210
- }
211
- }
212
-
213
-
214
214
  declare module '@tiptap/core' {
215
215
  interface Commands<ReturnType> {
216
216
  imageGifUpload: {
@@ -249,9 +249,8 @@ declare module '@tiptap/core' {
249
249
 
250
250
  declare module '@tiptap/core' {
251
251
  interface Commands<ReturnType> {
252
- lineHeight: {
253
- setLineHeight: (lineHeight: string) => ReturnType;
254
- unsetLineHeight: () => ReturnType;
252
+ katex: {
253
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
255
254
  };
256
255
  }
257
256
  }
@@ -259,8 +258,9 @@ declare module '@tiptap/core' {
259
258
 
260
259
  declare module '@tiptap/core' {
261
260
  interface Commands<ReturnType> {
262
- katex: {
263
- setKatex: (arg?: IKatexAttrs) => ReturnType;
261
+ lineHeight: {
262
+ setLineHeight: (lineHeight: string) => ReturnType;
263
+ unsetLineHeight: () => ReturnType;
264
264
  };
265
265
  }
266
266
  }
package/lib/Mermaid.d.ts CHANGED
@@ -111,11 +111,9 @@ declare module '@tiptap/core' {
111
111
 
112
112
  declare module '@tiptap/core' {
113
113
  interface Commands<ReturnType> {
114
- emoji: {
115
- setEmoji: (emoji: {
116
- name: string;
117
- emoji: string;
118
- }) => ReturnType;
114
+ drawer: {
115
+ setDrawer: (options: any, replace?: any) => ReturnType;
116
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
119
117
  };
120
118
  }
121
119
  }
@@ -123,9 +121,11 @@ declare module '@tiptap/core' {
123
121
 
124
122
  declare module '@tiptap/core' {
125
123
  interface Commands<ReturnType> {
126
- drawer: {
127
- setDrawer: (options: any, replace?: any) => ReturnType;
128
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
124
+ emoji: {
125
+ setEmoji: (emoji: {
126
+ name: string;
127
+ emoji: string;
128
+ }) => ReturnType;
129
129
  };
130
130
  }
131
131
  }
@@ -176,6 +176,21 @@ declare module '@tiptap/core' {
176
176
  }
177
177
 
178
178
 
179
+ declare module '@tiptap/core' {
180
+ interface Commands<ReturnType> {
181
+ iframe: {
182
+ /**
183
+ * Add an iframe
184
+ */
185
+ setIframe: (options: {
186
+ src: string;
187
+ service: string;
188
+ }) => ReturnType;
189
+ };
190
+ }
191
+ }
192
+
193
+
179
194
  declare module '@tiptap/core' {
180
195
  interface Commands<ReturnType> {
181
196
  imageUpload: {
@@ -196,21 +211,6 @@ declare module '@tiptap/core' {
196
211
  }
197
212
 
198
213
 
199
- declare module '@tiptap/core' {
200
- interface Commands<ReturnType> {
201
- iframe: {
202
- /**
203
- * Add an iframe
204
- */
205
- setIframe: (options: {
206
- src: string;
207
- service: string;
208
- }) => ReturnType;
209
- };
210
- }
211
- }
212
-
213
-
214
214
  declare module '@tiptap/core' {
215
215
  interface Commands<ReturnType> {
216
216
  imageGifUpload: {
@@ -249,9 +249,8 @@ declare module '@tiptap/core' {
249
249
 
250
250
  declare module '@tiptap/core' {
251
251
  interface Commands<ReturnType> {
252
- lineHeight: {
253
- setLineHeight: (lineHeight: string) => ReturnType;
254
- unsetLineHeight: () => ReturnType;
252
+ katex: {
253
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
255
254
  };
256
255
  }
257
256
  }
@@ -259,8 +258,9 @@ declare module '@tiptap/core' {
259
258
 
260
259
  declare module '@tiptap/core' {
261
260
  interface Commands<ReturnType> {
262
- katex: {
263
- setKatex: (arg?: IKatexAttrs) => ReturnType;
261
+ lineHeight: {
262
+ setLineHeight: (lineHeight: string) => ReturnType;
263
+ unsetLineHeight: () => ReturnType;
264
264
  };
265
265
  }
266
266
  }
package/lib/Mermaid.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { h as $, m as X } from "./index-DI9T3iLd.js";
2
- import { w as Z, x as J, A as K, y as Y, z as Q, F as tt, B as et, G as rt, J as V, K as it, N as at } from "./RichTextEditor-DjTnd5Uu.js";
2
+ import { w as Z, x as J, A as K, y as Y, z as Q, F as tt, B as et, G as rt, J as V, K as it, N as at } from "./RichTextEditor-CqgbZwS5.js";
3
3
  import { N as st, R as nt } from "./dom-dataset-Di3tIRrR.js";
4
4
  import { jsxs as C, jsx as o } from "react/jsx-runtime";
5
5
  import { useState as g, useRef as ot, useCallback as y, useEffect as E, useMemo as k } from "react";
6
6
  import { s as lt, i as ct } from "./shortId-WJVkrvml.js";
7
- import { T as ht } from "./textarea-6c8drwXJ.js";
7
+ import { T as ht } from "./textarea-ClmQTGYC.js";
8
8
  import { I as q, h as dt, i as W } from "./index-Tj3Ci7xM.js";
9
9
  const j = `graph TB
10
10
  a-->b`, ut = ({ editor: r, upload: t }) => {
package/lib/MoreMark.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./index-ByRfqzMr.cjs"),l=require("./index-Z4b9rzn-.cjs"),c=require("react/jsx-runtime"),x=require("react"),s=require("./RichTextEditor-CAxwVWUE.cjs");function b(t){var n;const i=x.useMemo(()=>{var r;const e=(r=t==null?void 0:t.items)==null?void 0:r.find(u=>u.isActive());return e&&!e.default?{...e,icon:e!=null&&e.icon?e==null?void 0:e.icon:t==null?void 0:t.icon}:{title:t.tooltip,icon:t.icon,isActive:()=>!1}},[t]);return c.jsxs(s.DropdownMenu,{children:[c.jsx(s.DropdownMenuTrigger,{asChild:!0,disabled:t==null?void 0:t.disabled,children:c.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:c.jsx(s.MenuDown,{className:"richtext-size-3 richtext-text-gray-500"})})}),c.jsx(s.DropdownMenuContent,{className:"w-full",children:(n=t==null?void 0:t.items)==null?void 0:n.map((e,o)=>c.jsxs(s.DropdownMenuCheckboxItem,{checked:i.title===e.title,className:"richtext-flex richtext-items-center richtext-gap-3",onClick:e.action,children:[c.jsx(s.IconComponent,{name:e==null?void 0:e.icon}),c.jsx("span",{className:"richtext-ml-1",children:e.title}),!!(e!=null&&e.shortcutKeys)&&c.jsx("span",{className:"richtext-ml-auto richtext-text-xs richtext-tracking-widest richtext-opacity-60",children:s.getShortcutKeys(e.shortcutKeys)})]},`more-mark-${o}`))})]})}const m=h.Extension.create({name:"moreMark",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button({editor:i,extension:n,t:e}){const o=n.options.subscript,r=n.options.superscript,u={action:()=>i.commands.toggleSubscript(),isActive:()=>i.isActive("subscript")||!1,disabled:!i.can().toggleSubscript(),icon:"Subscript",title:e("editor.subscript.tooltip"),shortcutKeys:["mod","."]},d={action:()=>i.commands.toggleSuperscript(),isActive:()=>i.isActive("superscript")||!1,disabled:!i.can().toggleSuperscript(),icon:"Superscript",title:e("editor.superscript.tooltip"),shortcutKeys:["mod",","]},a=[];return o!==!1&&a.push(u),r!==!1&&a.push(d),{component:b,componentProps:{icon:"Type",tooltip:e("editor.moremark"),disabled:!i.isEditable,items:a}}}}},addExtensions(){const t=[];return this.options.subscript!==!1&&t.push(l.Subscript.configure(this.options.subscript)),this.options.superscript!==!1&&t.push(l.Superscript.configure(this.options.superscript)),t}});exports.MoreMark=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./index-ByRfqzMr.cjs"),l=require("./index-Z4b9rzn-.cjs"),c=require("react/jsx-runtime"),x=require("react"),s=require("./RichTextEditor-BnC1uaUo.cjs");function b(t){var n;const i=x.useMemo(()=>{var r;const e=(r=t==null?void 0:t.items)==null?void 0:r.find(u=>u.isActive());return e&&!e.default?{...e,icon:e!=null&&e.icon?e==null?void 0:e.icon:t==null?void 0:t.icon}:{title:t.tooltip,icon:t.icon,isActive:()=>!1}},[t]);return c.jsxs(s.DropdownMenu,{children:[c.jsx(s.DropdownMenuTrigger,{asChild:!0,disabled:t==null?void 0:t.disabled,children:c.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:c.jsx(s.MenuDown,{className:"richtext-size-3 richtext-text-gray-500"})})}),c.jsx(s.DropdownMenuContent,{className:"w-full",children:(n=t==null?void 0:t.items)==null?void 0:n.map((e,o)=>c.jsxs(s.DropdownMenuCheckboxItem,{checked:i.title===e.title,className:"richtext-flex richtext-items-center richtext-gap-3",onClick:e.action,children:[c.jsx(s.IconComponent,{name:e==null?void 0:e.icon}),c.jsx("span",{className:"richtext-ml-1",children:e.title}),!!(e!=null&&e.shortcutKeys)&&c.jsx("span",{className:"richtext-ml-auto richtext-text-xs richtext-tracking-widest richtext-opacity-60",children:s.getShortcutKeys(e.shortcutKeys)})]},`more-mark-${o}`))})]})}const m=h.Extension.create({name:"moreMark",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button({editor:i,extension:n,t:e}){const o=n.options.subscript,r=n.options.superscript,u={action:()=>i.commands.toggleSubscript(),isActive:()=>i.isActive("subscript")||!1,disabled:!i.can().toggleSubscript(),icon:"Subscript",title:e("editor.subscript.tooltip"),shortcutKeys:["mod","."]},d={action:()=>i.commands.toggleSuperscript(),isActive:()=>i.isActive("superscript")||!1,disabled:!i.can().toggleSuperscript(),icon:"Superscript",title:e("editor.superscript.tooltip"),shortcutKeys:["mod",","]},a=[];return o!==!1&&a.push(u),r!==!1&&a.push(d),{component:b,componentProps:{icon:"Type",tooltip:e("editor.moremark"),disabled:!i.isEditable,items:a}}}}},addExtensions(){const t=[];return this.options.subscript!==!1&&t.push(l.Subscript.configure(this.options.subscript)),this.options.superscript!==!1&&t.push(l.Superscript.configure(this.options.superscript)),t}});exports.MoreMark=m;