reactjs-tiptap-editor 0.3.10 → 0.3.12

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-ZOYNohaO.js → ActionMenuButton-BQ2ojtpo.js} +1 -1
  2. package/lib/{ActionMenuButton-D96eTByd.cjs → ActionMenuButton-OfnmanTP.cjs} +1 -1
  3. package/lib/Attachment.cjs +1 -1
  4. package/lib/Attachment.d.cts +12 -12
  5. package/lib/Attachment.d.ts +12 -12
  6. package/lib/Attachment.js +1 -1
  7. package/lib/Blockquote.cjs +1 -1
  8. package/lib/Blockquote.d.cts +12 -12
  9. package/lib/Blockquote.d.ts +12 -12
  10. package/lib/Blockquote.js +1 -1
  11. package/lib/Bold.cjs +1 -1
  12. package/lib/Bold.d.cts +12 -12
  13. package/lib/Bold.d.ts +12 -12
  14. package/lib/Bold.js +1 -1
  15. package/lib/BulletList.cjs +1 -1
  16. package/lib/BulletList.d.cts +12 -12
  17. package/lib/BulletList.d.ts +12 -12
  18. package/lib/BulletList.js +1 -1
  19. package/lib/Clear.cjs +1 -1
  20. package/lib/Clear.d.cts +12 -12
  21. package/lib/Clear.d.ts +12 -12
  22. package/lib/Clear.js +1 -1
  23. package/lib/Code.cjs +1 -1
  24. package/lib/Code.d.cts +12 -12
  25. package/lib/Code.d.ts +12 -12
  26. package/lib/Code.js +1 -1
  27. package/lib/CodeBlock.cjs +1 -1
  28. package/lib/CodeBlock.d.cts +12 -12
  29. package/lib/CodeBlock.d.ts +12 -12
  30. package/lib/CodeBlock.js +1 -1
  31. package/lib/CodeView.cjs +1 -1
  32. package/lib/CodeView.d.cts +12 -12
  33. package/lib/CodeView.d.ts +12 -12
  34. package/lib/CodeView.js +1 -1
  35. package/lib/Color.cjs +1 -1
  36. package/lib/Color.d.cts +12 -12
  37. package/lib/Color.d.ts +12 -12
  38. package/lib/Color.js +1 -1
  39. package/lib/Document.d.cts +12 -12
  40. package/lib/Document.d.ts +12 -12
  41. package/lib/{Drawer-D7VC0bqz.js → Drawer-9QMJnenp.js} +1 -1
  42. package/lib/{Drawer-hzhjTRvj.cjs → Drawer-BN8H4Zb2.cjs} +1 -1
  43. package/lib/Drawer.cjs +1 -1
  44. package/lib/Drawer.d.cts +12 -12
  45. package/lib/Drawer.d.ts +12 -12
  46. package/lib/Drawer.js +2 -2
  47. package/lib/Emoji.cjs +1 -1
  48. package/lib/Emoji.d.cts +12 -12
  49. package/lib/Emoji.d.ts +12 -12
  50. package/lib/Emoji.js +1 -1
  51. package/lib/{Excalidraw-DuV1h_du.js → Excalidraw-B95hkXm5.js} +1 -1
  52. package/lib/{Excalidraw-Bj3dtbC4.cjs → Excalidraw-iG1WleD5.cjs} +1 -1
  53. package/lib/Excalidraw.cjs +1 -1
  54. package/lib/Excalidraw.d.cts +12 -12
  55. package/lib/Excalidraw.d.ts +12 -12
  56. package/lib/Excalidraw.js +1 -1
  57. package/lib/ExportPdf.cjs +1 -1
  58. package/lib/ExportPdf.d.cts +12 -12
  59. package/lib/ExportPdf.d.ts +12 -12
  60. package/lib/ExportPdf.js +1 -1
  61. package/lib/ExportWord.cjs +1 -1
  62. package/lib/ExportWord.d.cts +12 -12
  63. package/lib/ExportWord.d.ts +12 -12
  64. package/lib/ExportWord.js +1 -1
  65. package/lib/FontFamily.cjs +1 -1
  66. package/lib/FontFamily.d.cts +12 -12
  67. package/lib/FontFamily.d.ts +12 -12
  68. package/lib/FontFamily.js +2 -2
  69. package/lib/FontSize.cjs +1 -1
  70. package/lib/FontSize.d.cts +12 -12
  71. package/lib/FontSize.d.ts +12 -12
  72. package/lib/FontSize.js +2 -2
  73. package/lib/FormatPainter.cjs +1 -1
  74. package/lib/FormatPainter.d.cts +12 -12
  75. package/lib/FormatPainter.d.ts +12 -12
  76. package/lib/FormatPainter.js +1 -1
  77. package/lib/Heading.cjs +1 -1
  78. package/lib/Heading.d.cts +12 -12
  79. package/lib/Heading.d.ts +12 -12
  80. package/lib/Heading.js +2 -2
  81. package/lib/Highlight.cjs +1 -1
  82. package/lib/Highlight.d.cts +12 -12
  83. package/lib/Highlight.d.ts +12 -12
  84. package/lib/Highlight.js +1 -1
  85. package/lib/History.cjs +1 -1
  86. package/lib/History.d.cts +12 -12
  87. package/lib/History.d.ts +12 -12
  88. package/lib/History.js +1 -1
  89. package/lib/HorizontalRule.cjs +1 -1
  90. package/lib/HorizontalRule.d.cts +12 -12
  91. package/lib/HorizontalRule.d.ts +12 -12
  92. package/lib/HorizontalRule.js +1 -1
  93. package/lib/Iframe.cjs +1 -1
  94. package/lib/Iframe.d.cts +12 -12
  95. package/lib/Iframe.d.ts +12 -12
  96. package/lib/Iframe.js +1 -1
  97. package/lib/Image.cjs +1 -1
  98. package/lib/Image.d.cts +12 -12
  99. package/lib/Image.d.ts +12 -12
  100. package/lib/Image.js +1 -1
  101. package/lib/ImageGif.cjs +1 -1
  102. package/lib/ImageGif.d.cts +12 -12
  103. package/lib/ImageGif.d.ts +12 -12
  104. package/lib/ImageGif.js +1 -1
  105. package/lib/ImportWord.cjs +1 -1
  106. package/lib/ImportWord.d.cts +12 -12
  107. package/lib/ImportWord.d.ts +12 -12
  108. package/lib/ImportWord.js +1 -1
  109. package/lib/Indent.cjs +1 -1
  110. package/lib/Indent.d.cts +12 -12
  111. package/lib/Indent.d.ts +12 -12
  112. package/lib/Indent.js +1 -1
  113. package/lib/Italic.cjs +1 -1
  114. package/lib/Italic.d.cts +12 -12
  115. package/lib/Italic.d.ts +12 -12
  116. package/lib/Italic.js +1 -1
  117. package/lib/Katex.cjs +1 -1
  118. package/lib/Katex.d.cts +12 -12
  119. package/lib/Katex.d.ts +12 -12
  120. package/lib/Katex.js +2 -2
  121. package/lib/LineHeight.cjs +1 -1
  122. package/lib/LineHeight.d.cts +12 -12
  123. package/lib/LineHeight.d.ts +12 -12
  124. package/lib/LineHeight.js +1 -1
  125. package/lib/Link.cjs +2 -2
  126. package/lib/Link.d.cts +12 -12
  127. package/lib/Link.d.ts +12 -12
  128. package/lib/Link.js +6 -4
  129. package/lib/ListItem.d.cts +12 -12
  130. package/lib/ListItem.d.ts +12 -12
  131. package/lib/Mention.d.cts +12 -12
  132. package/lib/Mention.d.ts +12 -12
  133. package/lib/Mermaid.cjs +1 -1
  134. package/lib/Mermaid.d.cts +12 -12
  135. package/lib/Mermaid.d.ts +12 -12
  136. package/lib/Mermaid.js +2 -2
  137. package/lib/MoreMark.cjs +1 -1
  138. package/lib/MoreMark.d.cts +12 -12
  139. package/lib/MoreMark.d.ts +12 -12
  140. package/lib/MoreMark.js +1 -1
  141. package/lib/MultiColumn.cjs +1 -1
  142. package/lib/MultiColumn.d.cts +12 -12
  143. package/lib/MultiColumn.d.ts +12 -12
  144. package/lib/MultiColumn.js +1 -1
  145. package/lib/OrderedList.cjs +1 -1
  146. package/lib/OrderedList.d.cts +12 -12
  147. package/lib/OrderedList.d.ts +12 -12
  148. package/lib/OrderedList.js +1 -1
  149. package/lib/{RichTextEditor-CRDKX-F8.js → RichTextEditor-CFwUKN9i.js} +2 -1
  150. package/lib/{RichTextEditor-ymQlnG9m.cjs → RichTextEditor-COwI-b24.cjs} +1 -1
  151. package/lib/SearchAndReplace.cjs +1 -1
  152. package/lib/SearchAndReplace.d.cts +12 -12
  153. package/lib/SearchAndReplace.d.ts +12 -12
  154. package/lib/SearchAndReplace.js +1 -1
  155. package/lib/Selection.d.cts +12 -12
  156. package/lib/Selection.d.ts +12 -12
  157. package/lib/SlashCommand.cjs +1 -1
  158. package/lib/SlashCommand.d.cts +12 -12
  159. package/lib/SlashCommand.d.ts +12 -12
  160. package/lib/SlashCommand.js +1 -1
  161. package/lib/Strike.cjs +1 -1
  162. package/lib/Strike.d.cts +12 -12
  163. package/lib/Strike.d.ts +12 -12
  164. package/lib/Strike.js +1 -1
  165. package/lib/SubAndSuperScript.cjs +1 -1
  166. package/lib/SubAndSuperScript.d.cts +12 -12
  167. package/lib/SubAndSuperScript.d.ts +12 -12
  168. package/lib/SubAndSuperScript.js +1 -1
  169. package/lib/Table.cjs +1 -1
  170. package/lib/Table.d.cts +12 -12
  171. package/lib/Table.d.ts +12 -12
  172. package/lib/Table.js +1 -1
  173. package/lib/TableOfContent.cjs +1 -1
  174. package/lib/TableOfContent.d.cts +12 -12
  175. package/lib/TableOfContent.d.ts +12 -12
  176. package/lib/TableOfContent.js +1 -1
  177. package/lib/TaskList.cjs +1 -1
  178. package/lib/TaskList.d.cts +12 -12
  179. package/lib/TaskList.d.ts +12 -12
  180. package/lib/TaskList.js +1 -1
  181. package/lib/TextAlign.cjs +1 -1
  182. package/lib/TextAlign.d.cts +12 -12
  183. package/lib/TextAlign.d.ts +12 -12
  184. package/lib/TextAlign.js +1 -1
  185. package/lib/TextBubble.cjs +1 -1
  186. package/lib/TextBubble.d.cts +12 -12
  187. package/lib/TextBubble.d.ts +12 -12
  188. package/lib/TextBubble.js +1 -1
  189. package/lib/TextDirection.cjs +1 -1
  190. package/lib/TextDirection.d.cts +12 -12
  191. package/lib/TextDirection.d.ts +12 -12
  192. package/lib/TextDirection.js +1 -1
  193. package/lib/TextUnderline.cjs +1 -1
  194. package/lib/TextUnderline.d.cts +12 -12
  195. package/lib/TextUnderline.d.ts +12 -12
  196. package/lib/TextUnderline.js +1 -1
  197. package/lib/TrailingNode.d.cts +12 -12
  198. package/lib/TrailingNode.d.ts +12 -12
  199. package/lib/{Twitter-CjAodXzu.js → Twitter-ChRmdJB0.js} +1 -1
  200. package/lib/{Twitter-CMr6GpHp.cjs → Twitter-DbokWMq-.cjs} +1 -1
  201. package/lib/Twitter.cjs +1 -1
  202. package/lib/Twitter.d.cts +12 -12
  203. package/lib/Twitter.d.ts +12 -12
  204. package/lib/Twitter.js +1 -1
  205. package/lib/Video.cjs +1 -1
  206. package/lib/Video.d.cts +12 -12
  207. package/lib/Video.d.ts +12 -12
  208. package/lib/Video.js +1 -1
  209. package/lib/bubble-extra.cjs +1 -1
  210. package/lib/bubble-extra.d.cts +12 -12
  211. package/lib/bubble-extra.d.ts +12 -12
  212. package/lib/bubble-extra.js +5 -5
  213. package/lib/index.cjs +1 -1
  214. package/lib/index.d.cts +12 -12
  215. package/lib/index.d.ts +12 -12
  216. package/lib/index.js +2 -2
  217. package/lib/locale-bundle.d.cts +12 -12
  218. package/lib/locale-bundle.d.ts +12 -12
  219. package/lib/style.css +1 -1
  220. package/lib/{textarea-Ci1tHD6V.cjs → textarea-BfhvC1nW.cjs} +1 -1
  221. package/lib/{textarea-CtL8w6IS.js → textarea-D5VHsW3K.js} +1 -1
  222. package/package.json +1 -1
package/lib/TaskList.d.ts CHANGED
@@ -198,19 +198,19 @@ declare module '@tiptap/core' {
198
198
 
199
199
  declare module '@tiptap/core' {
200
200
  interface Commands<ReturnType> {
201
- imageGifUpload: {
201
+ imageUpload: {
202
202
  /**
203
- * Add an image gif
203
+ * Add an image
204
204
  */
205
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
205
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
206
206
  /**
207
- * Update an image gif
207
+ * Update an image
208
208
  */
209
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
209
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
210
210
  /**
211
211
  * Set image alignment
212
212
  */
213
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
213
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
214
214
  };
215
215
  }
216
216
  }
@@ -218,19 +218,19 @@ declare module '@tiptap/core' {
218
218
 
219
219
  declare module '@tiptap/core' {
220
220
  interface Commands<ReturnType> {
221
- imageUpload: {
221
+ imageGifUpload: {
222
222
  /**
223
- * Add an image
223
+ * Add an image gif
224
224
  */
225
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
225
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
226
226
  /**
227
- * Update an image
227
+ * Update an image gif
228
228
  */
229
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
229
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
230
230
  /**
231
231
  * Set image alignment
232
232
  */
233
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
233
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
234
234
  };
235
235
  }
236
236
  }
package/lib/TaskList.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { N as m, w as b, m as l } from "./index-CXIIg9Sq.js";
2
- import { A as f } from "./RichTextEditor-CRDKX-F8.js";
2
+ import { A as f } from "./RichTextEditor-CFwUKN9i.js";
3
3
  const L = /^\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-CSvnpArE.cjs"),n=require("react/jsx-runtime"),T=require("react"),s=require("./RichTextEditor-ymQlnG9m.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-CSvnpArE.cjs"),n=require("react/jsx-runtime"),T=require("react"),s=require("./RichTextEditor-COwI-b24.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;
@@ -202,19 +202,19 @@ declare module '@tiptap/core' {
202
202
 
203
203
  declare module '@tiptap/core' {
204
204
  interface Commands<ReturnType> {
205
- imageGifUpload: {
205
+ imageUpload: {
206
206
  /**
207
- * Add an image gif
207
+ * Add an image
208
208
  */
209
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
209
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
210
210
  /**
211
- * Update an image gif
211
+ * Update an image
212
212
  */
213
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
213
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
214
214
  /**
215
215
  * Set image alignment
216
216
  */
217
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
217
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
218
218
  };
219
219
  }
220
220
  }
@@ -222,19 +222,19 @@ declare module '@tiptap/core' {
222
222
 
223
223
  declare module '@tiptap/core' {
224
224
  interface Commands<ReturnType> {
225
- imageUpload: {
225
+ imageGifUpload: {
226
226
  /**
227
- * Add an image
227
+ * Add an image gif
228
228
  */
229
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
229
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
230
230
  /**
231
- * Update an image
231
+ * Update an image gif
232
232
  */
233
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
233
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
234
234
  /**
235
235
  * Set image alignment
236
236
  */
237
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
237
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
238
238
  };
239
239
  }
240
240
  }
@@ -202,19 +202,19 @@ declare module '@tiptap/core' {
202
202
 
203
203
  declare module '@tiptap/core' {
204
204
  interface Commands<ReturnType> {
205
- imageGifUpload: {
205
+ imageUpload: {
206
206
  /**
207
- * Add an image gif
207
+ * Add an image
208
208
  */
209
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
209
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
210
210
  /**
211
- * Update an image gif
211
+ * Update an image
212
212
  */
213
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
213
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
214
214
  /**
215
215
  * Set image alignment
216
216
  */
217
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
217
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
218
218
  };
219
219
  }
220
220
  }
@@ -222,19 +222,19 @@ declare module '@tiptap/core' {
222
222
 
223
223
  declare module '@tiptap/core' {
224
224
  interface Commands<ReturnType> {
225
- imageUpload: {
225
+ imageGifUpload: {
226
226
  /**
227
- * Add an image
227
+ * Add an image gif
228
228
  */
229
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
229
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
230
230
  /**
231
- * Update an image
231
+ * Update an image gif
232
232
  */
233
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
233
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
234
234
  /**
235
235
  * Set image alignment
236
236
  */
237
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
237
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
238
238
  };
239
239
  }
240
240
  }
package/lib/TextAlign.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { E as y } from "./index-CXIIg9Sq.js";
2
2
  import { jsxs as g, jsx as l } from "react/jsx-runtime";
3
3
  import { useMemo as b } from "react";
4
- import { P as v, m as M, A as S, k as A, n as C, T as j, a as K, r as w, b as P, s as z } from "./RichTextEditor-CRDKX-F8.js";
4
+ import { P as v, m as M, A as S, k as A, n as C, T as j, a as K, r as w, b as P, s as z } from "./RichTextEditor-CFwUKN9i.js";
5
5
  const L = y.create({
6
6
  name: "textAlign",
7
7
  addOptions() {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("./index-CSvnpArE.cjs"),t=require("react/jsx-runtime"),l=require("react"),x=require("lucide-react"),c=require("./RichTextEditor-ymQlnG9m.cjs"),g=require("./index-Dz3YxLE7.cjs");function b(e){const{t:i}=g.useLocale(),n=l.useMemo(()=>[{name:"paragraph",label:i("editor.paragraph.tooltip"),iconName:"Heading1",isActive:()=>e.editor.isActive("paragraph")&&!e.editor.isActive("orderedList")&&!e.editor.isActive("bulletList")&&!e.editor.isActive("taskList"),action:()=>e.editor.chain().focus().clearNodes().run()},{name:"heading1",label:i("editor.heading.h1.tooltip"),isActive:()=>e.editor.isActive("heading",{level:1}),iconName:"Heading1",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:1}).run()},{name:"heading2",label:i("editor.heading.h2.tooltip"),isActive:()=>e.editor.isActive("heading",{level:2}),iconName:"Heading2",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:2}).run()},{name:"heading3",label:i("editor.heading.h3.tooltip"),isActive:()=>e.editor.isActive("heading",{level:3}),iconName:"Heading3",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:3}).run()},{name:"bulletList",label:i("editor.bulletlist.tooltip"),isActive:()=>e.editor.isActive("bulletList"),iconName:"List",action:()=>e.editor.chain().focus().clearNodes().toggleBulletList().run()},{name:"numberedList",label:i("editor.orderedlist.tooltip"),isActive:()=>e.editor.isActive("orderedList"),iconName:"ListOrdered",action:()=>e.editor.chain().focus().clearNodes().toggleOrderedList().run()},{name:"taskList",label:i("editor.tasklist.tooltip"),isActive:()=>e.editor.isActive("taskList"),iconName:"ListTodo",action:()=>e.editor.chain().focus().clearNodes().toggleTaskList().run()},{name:"blockquote",label:i("editor.blockquote.tooltip"),isActive:()=>e.editor.isActive("blockquote"),iconName:"TextQuote",action:()=>e.editor.chain().focus().clearNodes().toggleBlockquote().run()}],[e.editor,i]),a=l.useMemo(()=>n.findLast(o=>o.isActive())??{label:"Empty"},[n]);return t.jsxs(c.DropdownMenu,{children:[t.jsx(c.DropdownMenuTrigger,{asChild:!0,children:t.jsxs(c.Button,{className:"richtext-flex richtext-h-[32px] richtext-gap-1 richtext-px-1.5",variant:"ghost",children:[t.jsxs("span",{className:"richtext-whitespace-nowrap richtext-text-sm richtext-font-normal",children:[" ",a==null?void 0:a.label]}),t.jsx(x.ChevronDown,{className:"richtext-size-4"})]})}),t.jsx(c.DropdownMenuContent,{align:"start",className:"richtext-w-full richtext-p-1",hideWhenDetached:!0,sideOffset:5,children:n.map((o,d)=>{var r;const u=c.icons[o.iconName];return t.jsx(c.DropdownMenuCheckboxItem,{checked:((r=o.isActive)==null?void 0:r.call(o))||!1,className:"richtext-cursor-pointer",onClick:()=>o.action(),children:t.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-2 richtext-px-2",children:[t.jsx(u,{className:"richtext-h3 richtext-w-3"}),t.jsxs("span",{children:[" ",o.label]})]})},`text-bubble-${d}`)})})]})}const s=h.Extension.create({name:"text-bubble",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),toolbar:!1,button:()=>({component:b,componentProps:{}})}}});exports.TextBubble=s;exports.default=s;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("./index-CSvnpArE.cjs"),t=require("react/jsx-runtime"),l=require("react"),x=require("lucide-react"),c=require("./RichTextEditor-COwI-b24.cjs"),g=require("./index-Dz3YxLE7.cjs");function b(e){const{t:i}=g.useLocale(),n=l.useMemo(()=>[{name:"paragraph",label:i("editor.paragraph.tooltip"),iconName:"Heading1",isActive:()=>e.editor.isActive("paragraph")&&!e.editor.isActive("orderedList")&&!e.editor.isActive("bulletList")&&!e.editor.isActive("taskList"),action:()=>e.editor.chain().focus().clearNodes().run()},{name:"heading1",label:i("editor.heading.h1.tooltip"),isActive:()=>e.editor.isActive("heading",{level:1}),iconName:"Heading1",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:1}).run()},{name:"heading2",label:i("editor.heading.h2.tooltip"),isActive:()=>e.editor.isActive("heading",{level:2}),iconName:"Heading2",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:2}).run()},{name:"heading3",label:i("editor.heading.h3.tooltip"),isActive:()=>e.editor.isActive("heading",{level:3}),iconName:"Heading3",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:3}).run()},{name:"bulletList",label:i("editor.bulletlist.tooltip"),isActive:()=>e.editor.isActive("bulletList"),iconName:"List",action:()=>e.editor.chain().focus().clearNodes().toggleBulletList().run()},{name:"numberedList",label:i("editor.orderedlist.tooltip"),isActive:()=>e.editor.isActive("orderedList"),iconName:"ListOrdered",action:()=>e.editor.chain().focus().clearNodes().toggleOrderedList().run()},{name:"taskList",label:i("editor.tasklist.tooltip"),isActive:()=>e.editor.isActive("taskList"),iconName:"ListTodo",action:()=>e.editor.chain().focus().clearNodes().toggleTaskList().run()},{name:"blockquote",label:i("editor.blockquote.tooltip"),isActive:()=>e.editor.isActive("blockquote"),iconName:"TextQuote",action:()=>e.editor.chain().focus().clearNodes().toggleBlockquote().run()}],[e.editor,i]),a=l.useMemo(()=>n.findLast(o=>o.isActive())??{label:"Empty"},[n]);return t.jsxs(c.DropdownMenu,{children:[t.jsx(c.DropdownMenuTrigger,{asChild:!0,children:t.jsxs(c.Button,{className:"richtext-flex richtext-h-[32px] richtext-gap-1 richtext-px-1.5",variant:"ghost",children:[t.jsxs("span",{className:"richtext-whitespace-nowrap richtext-text-sm richtext-font-normal",children:[" ",a==null?void 0:a.label]}),t.jsx(x.ChevronDown,{className:"richtext-size-4"})]})}),t.jsx(c.DropdownMenuContent,{align:"start",className:"richtext-w-full richtext-p-1",hideWhenDetached:!0,sideOffset:5,children:n.map((o,d)=>{var r;const u=c.icons[o.iconName];return t.jsx(c.DropdownMenuCheckboxItem,{checked:((r=o.isActive)==null?void 0:r.call(o))||!1,className:"richtext-cursor-pointer",onClick:()=>o.action(),children:t.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-2 richtext-px-2",children:[t.jsx(u,{className:"richtext-h3 richtext-w-3"}),t.jsxs("span",{children:[" ",o.label]})]})},`text-bubble-${d}`)})})]})}const s=h.Extension.create({name:"text-bubble",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),toolbar:!1,button:()=>({component:b,componentProps:{}})}}});exports.TextBubble=s;exports.default=s;
@@ -192,19 +192,19 @@ declare module '@tiptap/core' {
192
192
 
193
193
  declare module '@tiptap/core' {
194
194
  interface Commands<ReturnType> {
195
- imageGifUpload: {
195
+ imageUpload: {
196
196
  /**
197
- * Add an image gif
197
+ * Add an image
198
198
  */
199
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
199
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
200
200
  /**
201
- * Update an image gif
201
+ * Update an image
202
202
  */
203
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
203
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
204
204
  /**
205
205
  * Set image alignment
206
206
  */
207
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
207
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
208
208
  };
209
209
  }
210
210
  }
@@ -212,19 +212,19 @@ declare module '@tiptap/core' {
212
212
 
213
213
  declare module '@tiptap/core' {
214
214
  interface Commands<ReturnType> {
215
- imageUpload: {
215
+ imageGifUpload: {
216
216
  /**
217
- * Add an image
217
+ * Add an image gif
218
218
  */
219
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
219
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
220
220
  /**
221
- * Update an image
221
+ * Update an image gif
222
222
  */
223
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
223
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
224
224
  /**
225
225
  * Set image alignment
226
226
  */
227
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
227
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
228
228
  };
229
229
  }
230
230
  }
@@ -192,19 +192,19 @@ declare module '@tiptap/core' {
192
192
 
193
193
  declare module '@tiptap/core' {
194
194
  interface Commands<ReturnType> {
195
- imageGifUpload: {
195
+ imageUpload: {
196
196
  /**
197
- * Add an image gif
197
+ * Add an image
198
198
  */
199
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
199
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
200
200
  /**
201
- * Update an image gif
201
+ * Update an image
202
202
  */
203
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
203
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
204
204
  /**
205
205
  * Set image alignment
206
206
  */
207
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
207
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
208
208
  };
209
209
  }
210
210
  }
@@ -212,19 +212,19 @@ declare module '@tiptap/core' {
212
212
 
213
213
  declare module '@tiptap/core' {
214
214
  interface Commands<ReturnType> {
215
- imageUpload: {
215
+ imageGifUpload: {
216
216
  /**
217
- * Add an image
217
+ * Add an image gif
218
218
  */
219
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
219
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
220
220
  /**
221
- * Update an image
221
+ * Update an image gif
222
222
  */
223
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
223
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
224
224
  /**
225
225
  * Set image alignment
226
226
  */
227
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
227
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
228
228
  };
229
229
  }
230
230
  }
package/lib/TextBubble.js CHANGED
@@ -2,7 +2,7 @@ import { E as h } from "./index-CXIIg9Sq.js";
2
2
  import { jsxs as o, jsx as a } from "react/jsx-runtime";
3
3
  import { useMemo as l } from "react";
4
4
  import { ChevronDown as u } from "lucide-react";
5
- import { D as m, e as g, B as x, f as b, i as v, h as f } from "./RichTextEditor-CRDKX-F8.js";
5
+ import { D as m, e as g, B as x, f as b, i as v, h as f } from "./RichTextEditor-CFwUKN9i.js";
6
6
  import { u as N } from "./index-D-DR0FPY.js";
7
7
  function A(e) {
8
8
  const { t } = N(), c = l(() => [
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("./index-CSvnpArE.cjs"),i=require("react/jsx-runtime"),b=require("react"),n=require("./RichTextEditor-ymQlnG9m.cjs");function m(t){var s;const c=b.useMemo(()=>{var r;const e=(r=t==null?void 0:t.items)==null?void 0:r.find(o=>o.isActive());return e&&!e.default?{...e,icon:e.icon?e.icon:t.icon}:{title:t==null?void 0:t.tooltip,icon:t.icon,isActive:()=>!1}},[t]);return i.jsxs(n.Popover,{modal:!0,children:[i.jsx(n.PopoverTrigger,{asChild:!0,disabled:t==null?void 0:t.disabled,children:i.jsx(n.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:i.jsx(n.IconComponent,{className:"richtext-ml-1 richtext-size-3 richtext-text-zinc-500",name:"MenuDown"})})}),i.jsx(n.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:(s=t==null?void 0:t.items)==null?void 0:s.map((e,a)=>{var r,o;return i.jsxs(n.Tooltip,{children:[i.jsx(n.TooltipTrigger,{asChild:!0,children:i.jsx(n.Toggle,{className:"richtext-size-7 richtext-p-1","data-state":c.title===e.title?"on":"off",onClick:e==null?void 0:e.action,pressed:c.title===e.title,size:"sm",children:(e==null?void 0:e.icon)&&i.jsx(n.IconComponent,{name:e.icon})})}),i.jsxs(n.TooltipContent,{className:"richtext-flex richtext-flex-col richtext-items-center",children:[i.jsx("span",{children:e.title}),!!((r=e.shortcutKeys)!=null&&r.length)&&i.jsx("span",{children:(o=e.shortcutKeys)==null?void 0:o.map(x=>n.getShortcutKey(x)).join(" ")})]})]},`text-align-${a}`)})})]})}const j=T.Extension.create({name:"text-direction",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["heading","paragraph"],directions:["auto","ltr","rtl"],defaultDirection:"auto",button({editor:c,extension:s,t:e}){var h;const a=((h=s.options)==null?void 0:h.directions)||[],r={auto:"TextDirection",ltr:"LeftToRight",rtl:"RightToLeft"},o=a.map(l=>({title:e(`editor.textDirection.${l}.tooltip`),icon:r[l],isActive:()=>!1,action:()=>{var d,f,u,g;if(l==="auto"){(f=(d=c.commands)==null?void 0:d.unsetTextDirection)==null||f.call(d);return}(g=(u=c.commands)==null?void 0:u.setTextDirection)==null||g.call(u,l)},disabled:!1})),x=o.filter(l=>l.disabled).length===o.length;return{component:m,componentProps:{icon:"TextDirection",tooltip:e("editor.textDirection.tooltip"),disabled:x,items:o}}}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{dir:{default:this.options.defaultDirection,parseHTML:t=>t.attributes.dir&&this.options.directions.includes(t.attributes.dir)?t.attributes.dir.value:this.options.defaultDirection,renderHTML:t=>({dir:t.dir})}}}]},addCommands(){return{setTextDirection:t=>({commands:c})=>this.options.directions.includes(t)?this.options.types.every(s=>c.updateAttributes(s,{dir:t})):!1,unsetTextDirection:()=>({commands:t})=>this.options.types.every(c=>t.resetAttributes(c,"dir"))}}});exports.TextDirection=j;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("./index-CSvnpArE.cjs"),i=require("react/jsx-runtime"),b=require("react"),n=require("./RichTextEditor-COwI-b24.cjs");function m(t){var s;const c=b.useMemo(()=>{var r;const e=(r=t==null?void 0:t.items)==null?void 0:r.find(o=>o.isActive());return e&&!e.default?{...e,icon:e.icon?e.icon:t.icon}:{title:t==null?void 0:t.tooltip,icon:t.icon,isActive:()=>!1}},[t]);return i.jsxs(n.Popover,{modal:!0,children:[i.jsx(n.PopoverTrigger,{asChild:!0,disabled:t==null?void 0:t.disabled,children:i.jsx(n.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:i.jsx(n.IconComponent,{className:"richtext-ml-1 richtext-size-3 richtext-text-zinc-500",name:"MenuDown"})})}),i.jsx(n.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:(s=t==null?void 0:t.items)==null?void 0:s.map((e,a)=>{var r,o;return i.jsxs(n.Tooltip,{children:[i.jsx(n.TooltipTrigger,{asChild:!0,children:i.jsx(n.Toggle,{className:"richtext-size-7 richtext-p-1","data-state":c.title===e.title?"on":"off",onClick:e==null?void 0:e.action,pressed:c.title===e.title,size:"sm",children:(e==null?void 0:e.icon)&&i.jsx(n.IconComponent,{name:e.icon})})}),i.jsxs(n.TooltipContent,{className:"richtext-flex richtext-flex-col richtext-items-center",children:[i.jsx("span",{children:e.title}),!!((r=e.shortcutKeys)!=null&&r.length)&&i.jsx("span",{children:(o=e.shortcutKeys)==null?void 0:o.map(x=>n.getShortcutKey(x)).join(" ")})]})]},`text-align-${a}`)})})]})}const j=T.Extension.create({name:"text-direction",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["heading","paragraph"],directions:["auto","ltr","rtl"],defaultDirection:"auto",button({editor:c,extension:s,t:e}){var h;const a=((h=s.options)==null?void 0:h.directions)||[],r={auto:"TextDirection",ltr:"LeftToRight",rtl:"RightToLeft"},o=a.map(l=>({title:e(`editor.textDirection.${l}.tooltip`),icon:r[l],isActive:()=>!1,action:()=>{var d,f,u,g;if(l==="auto"){(f=(d=c.commands)==null?void 0:d.unsetTextDirection)==null||f.call(d);return}(g=(u=c.commands)==null?void 0:u.setTextDirection)==null||g.call(u,l)},disabled:!1})),x=o.filter(l=>l.disabled).length===o.length;return{component:m,componentProps:{icon:"TextDirection",tooltip:e("editor.textDirection.tooltip"),disabled:x,items:o}}}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{dir:{default:this.options.defaultDirection,parseHTML:t=>t.attributes.dir&&this.options.directions.includes(t.attributes.dir)?t.attributes.dir.value:this.options.defaultDirection,renderHTML:t=>({dir:t.dir})}}}]},addCommands(){return{setTextDirection:t=>({commands:c})=>this.options.directions.includes(t)?this.options.types.every(s=>c.updateAttributes(s,{dir:t})):!1,unsetTextDirection:()=>({commands:t})=>this.options.types.every(c=>t.resetAttributes(c,"dir"))}}});exports.TextDirection=j;
@@ -119,19 +119,19 @@ declare module '@tiptap/core' {
119
119
 
120
120
  declare module '@tiptap/core' {
121
121
  interface Commands<ReturnType> {
122
- imageGifUpload: {
122
+ imageUpload: {
123
123
  /**
124
- * Add an image gif
124
+ * Add an image
125
125
  */
126
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
126
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
127
127
  /**
128
- * Update an image gif
128
+ * Update an image
129
129
  */
130
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
130
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
131
131
  /**
132
132
  * Set image alignment
133
133
  */
134
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
134
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
135
135
  };
136
136
  }
137
137
  }
@@ -139,19 +139,19 @@ declare module '@tiptap/core' {
139
139
 
140
140
  declare module '@tiptap/core' {
141
141
  interface Commands<ReturnType> {
142
- imageUpload: {
142
+ imageGifUpload: {
143
143
  /**
144
- * Add an image
144
+ * Add an image gif
145
145
  */
146
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
146
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
147
147
  /**
148
- * Update an image
148
+ * Update an image gif
149
149
  */
150
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
150
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
151
151
  /**
152
152
  * Set image alignment
153
153
  */
154
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
154
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
155
155
  };
156
156
  }
157
157
  }
@@ -119,19 +119,19 @@ declare module '@tiptap/core' {
119
119
 
120
120
  declare module '@tiptap/core' {
121
121
  interface Commands<ReturnType> {
122
- imageGifUpload: {
122
+ imageUpload: {
123
123
  /**
124
- * Add an image gif
124
+ * Add an image
125
125
  */
126
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
126
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
127
127
  /**
128
- * Update an image gif
128
+ * Update an image
129
129
  */
130
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
130
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
131
131
  /**
132
132
  * Set image alignment
133
133
  */
134
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
134
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
135
135
  };
136
136
  }
137
137
  }
@@ -139,19 +139,19 @@ declare module '@tiptap/core' {
139
139
 
140
140
  declare module '@tiptap/core' {
141
141
  interface Commands<ReturnType> {
142
- imageUpload: {
142
+ imageGifUpload: {
143
143
  /**
144
- * Add an image
144
+ * Add an image gif
145
145
  */
146
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
146
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
147
147
  /**
148
- * Update an image
148
+ * Update an image gif
149
149
  */
150
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
150
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
151
151
  /**
152
152
  * Set image alignment
153
153
  */
154
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
154
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
155
155
  };
156
156
  }
157
157
  }
@@ -1,7 +1,7 @@
1
1
  import { E as b } from "./index-CXIIg9Sq.js";
2
2
  import { jsxs as h, jsx as n } from "react/jsx-runtime";
3
3
  import { useMemo as g } from "react";
4
- import { P as D, m as v, A as y, k as T, n as A, T as C, a as w, r as M, b as P, s as z } from "./RichTextEditor-CRDKX-F8.js";
4
+ import { P as D, m as v, A as y, k as T, n as A, T as C, a as w, r as M, b as P, s as z } from "./RichTextEditor-CFwUKN9i.js";
5
5
  function L(t) {
6
6
  var c;
7
7
  const i = g(() => {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-CSvnpArE.cjs"),i=require("./RichTextEditor-ymQlnG9m.cjs"),o=n.Mark.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",n.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),s=o.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button({editor:t,t:r}){return{component:i.ActionButton,componentProps:{action:()=>t.commands.toggleUnderline(),isActive:()=>t.isActive("underline")||!1,disabled:!1,icon:"Underline",shortcutKeys:["mod","U"],tooltip:r("editor.underline.tooltip")}}}}}});exports.TextUnderline=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-CSvnpArE.cjs"),i=require("./RichTextEditor-COwI-b24.cjs"),o=n.Mark.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",n.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),s=o.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button({editor:t,t:r}){return{component:i.ActionButton,componentProps:{action:()=>t.commands.toggleUnderline(),isActive:()=>t.isActive("underline")||!1,disabled:!1,icon:"Underline",shortcutKeys:["mod","U"],tooltip:r("editor.underline.tooltip")}}}}}});exports.TextUnderline=s;
@@ -192,19 +192,19 @@ declare module '@tiptap/core' {
192
192
 
193
193
  declare module '@tiptap/core' {
194
194
  interface Commands<ReturnType> {
195
- imageGifUpload: {
195
+ imageUpload: {
196
196
  /**
197
- * Add an image gif
197
+ * Add an image
198
198
  */
199
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
199
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
200
200
  /**
201
- * Update an image gif
201
+ * Update an image
202
202
  */
203
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
203
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
204
204
  /**
205
205
  * Set image alignment
206
206
  */
207
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
207
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
208
208
  };
209
209
  }
210
210
  }
@@ -212,19 +212,19 @@ declare module '@tiptap/core' {
212
212
 
213
213
  declare module '@tiptap/core' {
214
214
  interface Commands<ReturnType> {
215
- imageUpload: {
215
+ imageGifUpload: {
216
216
  /**
217
- * Add an image
217
+ * Add an image gif
218
218
  */
219
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
219
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
220
220
  /**
221
- * Update an image
221
+ * Update an image gif
222
222
  */
223
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
223
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
224
224
  /**
225
225
  * Set image alignment
226
226
  */
227
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
227
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
228
228
  };
229
229
  }
230
230
  }
@@ -192,19 +192,19 @@ declare module '@tiptap/core' {
192
192
 
193
193
  declare module '@tiptap/core' {
194
194
  interface Commands<ReturnType> {
195
- imageGifUpload: {
195
+ imageUpload: {
196
196
  /**
197
- * Add an image gif
197
+ * Add an image
198
198
  */
199
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
199
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
200
200
  /**
201
- * Update an image gif
201
+ * Update an image
202
202
  */
203
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
203
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
204
204
  /**
205
205
  * Set image alignment
206
206
  */
207
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
207
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
208
208
  };
209
209
  }
210
210
  }
@@ -212,19 +212,19 @@ declare module '@tiptap/core' {
212
212
 
213
213
  declare module '@tiptap/core' {
214
214
  interface Commands<ReturnType> {
215
- imageUpload: {
215
+ imageGifUpload: {
216
216
  /**
217
- * Add an image
217
+ * Add an image gif
218
218
  */
219
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
219
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
220
220
  /**
221
- * Update an image
221
+ * Update an image gif
222
222
  */
223
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
223
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
224
224
  /**
225
225
  * Set image alignment
226
226
  */
227
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
227
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
228
228
  };
229
229
  }
230
230
  }
@@ -1,5 +1,5 @@
1
1
  import { M as r, m as o } from "./index-CXIIg9Sq.js";
2
- import { A as i } from "./RichTextEditor-CRDKX-F8.js";
2
+ import { A as i } from "./RichTextEditor-CFwUKN9i.js";
3
3
  const s = r.create({
4
4
  name: "underline",
5
5
  addOptions() {