reactjs-tiptap-editor 1.0.0 → 1.0.2

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 (590) hide show
  1. package/lib/{ActionMenuButton-DLQyd_gx.cjs → ActionMenuButton-BRWFTb3V.cjs} +1 -1
  2. package/lib/{ActionMenuButton-BKOg7hkq.js → ActionMenuButton-DgjFjzC8.js} +8 -8
  3. package/lib/Attachment.cjs +2 -2
  4. package/lib/Attachment.js +27 -29
  5. package/lib/Blockquote.cjs +1 -1
  6. package/lib/Blockquote.js +4 -4
  7. package/lib/Bold.cjs +1 -1
  8. package/lib/Bold.js +7 -7
  9. package/lib/BulletList.cjs +1 -1
  10. package/lib/BulletList.js +4 -4
  11. package/lib/Clear.cjs +1 -1
  12. package/lib/Clear.js +3 -3
  13. package/lib/Code.cjs +1 -1
  14. package/lib/Code.js +7 -7
  15. package/lib/CodeBlock.cjs +36 -36
  16. package/lib/CodeBlock.js +593 -596
  17. package/lib/CodeView.cjs +1 -1
  18. package/lib/CodeView.js +4 -4
  19. package/lib/Color.cjs +1 -1
  20. package/lib/Color.js +20 -20
  21. package/lib/Column.cjs +1 -1
  22. package/lib/Column.js +9 -9
  23. package/lib/Drawer-1_PmP-H0.cjs +1 -0
  24. package/lib/{Drawer-DZ5jvmrX.js → Drawer-DNnkwfnI.js} +48 -49
  25. package/lib/Drawer.cjs +1 -1
  26. package/lib/Drawer.js +5 -6
  27. package/lib/Emoji.cjs +1 -1
  28. package/lib/Emoji.js +155 -150
  29. package/lib/Excalidraw-DreGyrmJ.cjs +1 -0
  30. package/lib/Excalidraw-StBAUhjt.js +355 -0
  31. package/lib/Excalidraw.cjs +1 -1
  32. package/lib/Excalidraw.js +4 -5
  33. package/lib/ExportPdf.cjs +1 -1
  34. package/lib/ExportPdf.js +4 -4
  35. package/lib/ExportWord.cjs +1 -1
  36. package/lib/ExportWord.js +4 -4
  37. package/lib/FontFamily.cjs +1 -1
  38. package/lib/FontFamily.js +6 -6
  39. package/lib/FontSize.cjs +1 -1
  40. package/lib/FontSize.js +6 -6
  41. package/lib/Heading.cjs +1 -1
  42. package/lib/Heading.js +6 -6
  43. package/lib/Highlight.cjs +1 -1
  44. package/lib/Highlight.js +30 -30
  45. package/lib/History.cjs +1 -1
  46. package/lib/History.js +36 -36
  47. package/lib/HorizontalRule.cjs +1 -1
  48. package/lib/HorizontalRule.js +4 -4
  49. package/lib/{Icon-DUpv2cI6.cjs → Icon-B9hI3gal.cjs} +1 -1
  50. package/lib/{Icon-jKs8Hr6p.js → Icon-D3AdnMCj.js} +2 -2
  51. package/lib/Iframe-BDm-w-lg.cjs +1 -0
  52. package/lib/{Iframe-CmXkEqOd.js → Iframe-BIgQtyZo.js} +26 -28
  53. package/lib/Iframe.cjs +1 -1
  54. package/lib/Iframe.js +4 -5
  55. package/lib/Image.cjs +1 -1
  56. package/lib/Image.js +208 -229
  57. package/lib/ImageGif.cjs +1 -1
  58. package/lib/ImageGif.js +98 -91
  59. package/lib/ImportWord.cjs +29 -29
  60. package/lib/ImportWord.js +568 -568
  61. package/lib/Indent-BzyTbroV.cjs +1 -0
  62. package/lib/Indent-CnPAv7eT.js +153 -0
  63. package/lib/Indent.cjs +1 -1
  64. package/lib/Indent.js +4 -149
  65. package/lib/Italic.cjs +1 -1
  66. package/lib/Italic.js +4 -4
  67. package/lib/Katex-BE_GROI2.cjs +4 -0
  68. package/lib/{Katex-DsYXsjSS.js → Katex-D-SUWkkU.js} +771 -783
  69. package/lib/Katex.cjs +1 -1
  70. package/lib/Katex.js +4 -5
  71. package/lib/LineHeight.cjs +1 -1
  72. package/lib/LineHeight.js +17 -17
  73. package/lib/Link.cjs +1 -1
  74. package/lib/Link.js +2 -2
  75. package/lib/LinkEditBlock-5NRB9DRC.cjs +5 -0
  76. package/lib/{LinkEditBlock-CB8yIffE.js → LinkEditBlock-DcxIMK_D.js} +221 -221
  77. package/lib/Mention.cjs +1 -1
  78. package/lib/Mention.js +17 -19
  79. package/lib/Mermaid.cjs +2 -2
  80. package/lib/Mermaid.js +24 -26
  81. package/lib/MoreMark.cjs +1 -1
  82. package/lib/MoreMark.js +16 -16
  83. package/lib/OrderedList.cjs +1 -1
  84. package/lib/OrderedList.js +4 -4
  85. package/lib/SearchAndReplace.cjs +1 -1
  86. package/lib/SearchAndReplace.js +52 -52
  87. package/lib/SlashCommand.cjs +1 -1
  88. package/lib/SlashCommand.js +125 -120
  89. package/lib/Strike.cjs +1 -1
  90. package/lib/Strike.js +4 -4
  91. package/lib/Table-BYg26eMf.cjs +9 -0
  92. package/lib/{Table-Db8TcQX8.js → Table-DtC2-bqx.js} +30 -30
  93. package/lib/Table.cjs +1 -1
  94. package/lib/Table.js +1 -1
  95. package/lib/TaskList.cjs +1 -1
  96. package/lib/TaskList.js +4 -4
  97. package/lib/TextAlign.cjs +1 -1
  98. package/lib/TextAlign.js +14 -13
  99. package/lib/TextDirection.cjs +1 -1
  100. package/lib/TextDirection.js +7 -7
  101. package/lib/TextUnderline.cjs +1 -1
  102. package/lib/TextUnderline.js +4 -4
  103. package/lib/{Twitter-CXmmjz9R.js → Twitter-B3n8vc45.js} +73 -75
  104. package/lib/Twitter-DJ6JzZPJ.cjs +1 -0
  105. package/lib/Twitter.cjs +1 -1
  106. package/lib/Twitter.js +3 -4
  107. package/lib/Video.cjs +1 -1
  108. package/lib/Video.js +41 -33
  109. package/lib/bubble.cjs +4 -2
  110. package/lib/bubble.d.ts +1 -310
  111. package/lib/bubble.js +8782 -1104
  112. package/lib/button-BTnV4TZ7.cjs +1 -0
  113. package/lib/{button-DXMsXUEn.js → button-DHZeIKzF.js} +6 -6
  114. package/lib/checkbox-BoBTXwkF.cjs +1 -0
  115. package/lib/checkbox-Dm8Nfwg8.js +27 -0
  116. package/lib/components/ActionButton.d.ts +23 -0
  117. package/lib/components/ActionMenuButton.d.ts +28 -0
  118. package/lib/components/Bubble/RichTextBubbleColumns.d.ts +1 -0
  119. package/lib/components/Bubble/RichTextBubbleDrawer.d.ts +1 -0
  120. package/lib/components/Bubble/RichTextBubbleExcalidraw.d.ts +1 -0
  121. package/lib/components/Bubble/RichTextBubbleIframe.d.ts +1 -0
  122. package/lib/components/Bubble/RichTextBubbleKatex.d.ts +1 -0
  123. package/lib/components/Bubble/RichTextBubbleLink.d.ts +6 -0
  124. package/lib/components/Bubble/RichTextBubbleMedia.d.ts +4 -0
  125. package/lib/components/Bubble/RichTextBubbleMenuDragHandle.d.ts +1 -0
  126. package/lib/components/Bubble/RichTextBubbleMermaid.d.ts +1 -0
  127. package/lib/components/Bubble/RichTextBubbleTable.d.ts +5 -0
  128. package/lib/components/Bubble/RichTextBubbleText.d.ts +5 -0
  129. package/lib/components/Bubble/RichTextBubbleTwitter.d.ts +1 -0
  130. package/lib/components/Bubble/formatBubble.d.ts +55 -0
  131. package/lib/components/Bubble/index.d.ts +12 -0
  132. package/lib/components/ColorPicker.d.ts +11 -0
  133. package/lib/components/RichTextProvider.d.ts +8 -0
  134. package/lib/components/SizeSetter/SizeSetter.d.ts +13 -0
  135. package/lib/components/icons/Activity.d.ts +2 -0
  136. package/lib/components/icons/Animas.d.ts +2 -0
  137. package/lib/components/icons/AspectRatio.d.ts +2 -0
  138. package/lib/components/icons/Blockquote.d.ts +2 -0
  139. package/lib/components/icons/CodeView.d.ts +1 -0
  140. package/lib/components/icons/ColumnAddLeft.d.ts +1 -0
  141. package/lib/components/icons/ColumnAddRight.d.ts +1 -0
  142. package/lib/components/icons/DeleteColumn.d.ts +2 -0
  143. package/lib/components/icons/DeleteRow.d.ts +2 -0
  144. package/lib/components/icons/Direction.d.ts +1 -0
  145. package/lib/components/icons/Excalidraw.d.ts +1 -0
  146. package/lib/components/icons/ExportPdf.d.ts +1 -0
  147. package/lib/components/icons/ExportWord.d.ts +2 -0
  148. package/lib/components/icons/FileWordOutline.d.ts +2 -0
  149. package/lib/components/icons/Flag.d.ts +2 -0
  150. package/lib/components/icons/Food.d.ts +2 -0
  151. package/lib/components/icons/GIfIcon.d.ts +1 -0
  152. package/lib/components/icons/Html.d.ts +1 -0
  153. package/lib/components/icons/Icon.d.ts +8 -0
  154. package/lib/components/icons/IconColorFill.d.ts +5 -0
  155. package/lib/components/icons/IconHighlightFill.d.ts +3 -0
  156. package/lib/components/icons/ImportWord.d.ts +2 -0
  157. package/lib/components/icons/LeftToRight.d.ts +1 -0
  158. package/lib/components/icons/LineHeight.d.ts +2 -0
  159. package/lib/components/icons/MenuDown.d.ts +2 -0
  160. package/lib/components/icons/Mermaid.d.ts +1 -0
  161. package/lib/components/icons/NoFill.d.ts +1 -0
  162. package/lib/components/icons/Object.d.ts +2 -0
  163. package/lib/components/icons/RightToLeft.d.ts +1 -0
  164. package/lib/components/icons/SizeL.d.ts +2 -0
  165. package/lib/components/icons/SizeM.d.ts +2 -0
  166. package/lib/components/icons/SizeS.d.ts +2 -0
  167. package/lib/components/icons/Symbol.d.ts +2 -0
  168. package/lib/components/icons/Travel.d.ts +2 -0
  169. package/lib/components/icons/Twitter.d.ts +1 -0
  170. package/lib/components/icons/icons.d.ts +1 -0
  171. package/lib/components/icons/index.d.ts +12 -0
  172. package/lib/components/index.d.ts +6 -0
  173. package/lib/components/ui/button.d.ts +11 -0
  174. package/lib/components/ui/checkbox.d.ts +4 -0
  175. package/lib/components/ui/dialog.d.ts +19 -0
  176. package/lib/components/ui/dropdown-menu.d.ts +27 -0
  177. package/lib/components/ui/emoji-picker.d.ts +7 -0
  178. package/lib/components/ui/index.d.ts +14 -0
  179. package/lib/components/ui/input.d.ts +5 -0
  180. package/lib/components/ui/label.d.ts +5 -0
  181. package/lib/components/ui/popover.d.ts +6 -0
  182. package/lib/components/ui/select.d.ts +13 -0
  183. package/lib/components/ui/separator.d.ts +4 -0
  184. package/lib/components/ui/switch.d.ts +4 -0
  185. package/lib/components/ui/tabs.d.ts +7 -0
  186. package/lib/components/ui/textarea.d.ts +5 -0
  187. package/lib/components/ui/toast.d.ts +15 -0
  188. package/lib/components/ui/toaster.d.ts +1 -0
  189. package/lib/components/ui/toggle.d.ts +12 -0
  190. package/lib/components/ui/tooltip.d.ts +7 -0
  191. package/lib/components/ui/use-toast.d.ts +44 -0
  192. package/lib/constants/index.d.ts +47 -0
  193. package/lib/constants/resetCSS.d.ts +1 -0
  194. package/lib/dialog-DXF2Q8LZ.cjs +1 -0
  195. package/lib/dialog-xrO7nV_z.js +101 -0
  196. package/lib/dropdown-menu-Bh-wEgI8.cjs +1 -0
  197. package/lib/{dropdown-menu-BPp2Z_U-.js → dropdown-menu-ByeBPPyv.js} +32 -26
  198. package/lib/events.constant-B-VGURJp.cjs +1 -0
  199. package/lib/events.constant-CBPIqO_g.js +25 -0
  200. package/lib/extensions/Attachment/Attachment.d.ts +15 -0
  201. package/lib/extensions/Attachment/components/NodeViewAttachment/FileIcon.d.ts +1 -0
  202. package/lib/extensions/Attachment/components/NodeViewAttachment/FileIconString.d.ts +1 -0
  203. package/lib/extensions/Attachment/components/NodeViewAttachment/NodeViewAttachment.d.ts +1 -0
  204. package/lib/extensions/Attachment/components/RichTextAttachment.d.ts +1 -0
  205. package/lib/extensions/Attachment/index.d.ts +1 -0
  206. package/lib/extensions/Blockquote/Blockquote.d.ts +6 -0
  207. package/lib/extensions/Blockquote/components/RichTextBlockquote.d.ts +1 -0
  208. package/lib/extensions/Blockquote/index.d.ts +1 -0
  209. package/lib/extensions/Bold/Bold.d.ts +6 -0
  210. package/lib/extensions/Bold/components/RichTextBold.d.ts +1 -0
  211. package/lib/extensions/Bold/index.d.ts +1 -0
  212. package/lib/extensions/BulletList/BulletList.d.ts +6 -0
  213. package/lib/extensions/BulletList/components/RichTextBulletList.d.ts +1 -0
  214. package/lib/extensions/BulletList/index.d.ts +1 -0
  215. package/lib/extensions/Clear/Clear.d.ts +6 -0
  216. package/lib/extensions/Clear/components/RichTextClear.d.ts +1 -0
  217. package/lib/extensions/Clear/index.d.ts +1 -0
  218. package/lib/extensions/Code/Code.d.ts +6 -0
  219. package/lib/extensions/Code/components/RichTextCode.d.ts +1 -0
  220. package/lib/extensions/Code/index.d.ts +1 -0
  221. package/lib/extensions/CodeBlock/CodeBlock.d.ts +21 -0
  222. package/lib/extensions/CodeBlock/components/NodeViewCodeBlock/NodeViewCodeBlock.d.ts +1 -0
  223. package/lib/extensions/CodeBlock/components/RichTextCodeBlock.d.ts +1 -0
  224. package/lib/extensions/CodeBlock/index.d.ts +1 -0
  225. package/lib/extensions/CodeView/CodeView.d.ts +17 -0
  226. package/lib/extensions/CodeView/components/RichTextCodeView.d.ts +1 -0
  227. package/lib/extensions/CodeView/index.d.ts +1 -0
  228. package/lib/extensions/Color/Color.d.ts +22 -0
  229. package/lib/extensions/Color/components/RichTextColor.d.ts +1 -0
  230. package/lib/extensions/Color/index.d.ts +1 -0
  231. package/lib/extensions/Column/Column.d.ts +17 -0
  232. package/lib/extensions/Column/components/RichTextColumn.d.ts +1 -0
  233. package/lib/extensions/Column/index.d.ts +1 -0
  234. package/lib/extensions/Drawer/Drawer.d.ts +15 -0
  235. package/lib/extensions/Drawer/components/ControlDrawer/ControlDrawer.d.ts +2 -0
  236. package/lib/extensions/Drawer/components/ControlDrawer/icon.d.ts +28 -0
  237. package/lib/extensions/Drawer/components/EditDrawerBlock.d.ts +1 -0
  238. package/lib/extensions/Drawer/components/NodeViewDrawer/NodeViewDrawer.d.ts +1 -0
  239. package/lib/extensions/Drawer/components/RichTextDrawer.d.ts +1 -0
  240. package/lib/extensions/Drawer/index.d.ts +1 -0
  241. package/lib/extensions/Emoji/Emoji.d.ts +3 -0
  242. package/lib/extensions/Emoji/components/EmojiList/EmojiNodeView.d.ts +3 -0
  243. package/lib/extensions/Emoji/components/EmojiList/emojis.d.ts +4 -0
  244. package/lib/extensions/Emoji/components/RichTextEmoji.d.ts +1 -0
  245. package/lib/extensions/Emoji/index.d.ts +1 -0
  246. package/lib/extensions/Excalidraw/Excalidraw.d.ts +17 -0
  247. package/lib/extensions/Excalidraw/components/NodeViewExcalidraw/NodeViewExcalidraw.d.ts +2 -0
  248. package/lib/extensions/Excalidraw/components/RichTextExcalidraw.d.ts +1 -0
  249. package/lib/extensions/Excalidraw/index.d.ts +1 -0
  250. package/lib/extensions/ExportPdf/ExportPdf.d.ts +21 -0
  251. package/lib/extensions/ExportPdf/components/RichTextExportPdf.d.ts +1 -0
  252. package/lib/extensions/ExportPdf/index.d.ts +1 -0
  253. package/lib/extensions/ExportWord/ExportWord.d.ts +13 -0
  254. package/lib/extensions/ExportWord/components/RichTextExportWord.d.ts +1 -0
  255. package/lib/extensions/ExportWord/index.d.ts +1 -0
  256. package/lib/extensions/FontFamily/FontFamily.d.ts +10 -0
  257. package/lib/extensions/FontFamily/components/RichTextFontFamily.d.ts +15 -0
  258. package/lib/extensions/FontFamily/index.d.ts +1 -0
  259. package/lib/extensions/FontSize/FontSize.d.ts +32 -0
  260. package/lib/extensions/FontSize/components/RichTextFontSize.d.ts +12 -0
  261. package/lib/extensions/FontSize/index.d.ts +1 -0
  262. package/lib/extensions/Heading/Heading.d.ts +6 -0
  263. package/lib/extensions/Heading/components/RichTextHeading.d.ts +15 -0
  264. package/lib/extensions/Heading/index.d.ts +1 -0
  265. package/lib/extensions/Highlight/Highlight.d.ts +18 -0
  266. package/lib/extensions/Highlight/components/RichTextHighlight.d.ts +1 -0
  267. package/lib/extensions/Highlight/index.d.ts +1 -0
  268. package/lib/extensions/History/History.d.ts +6 -0
  269. package/lib/extensions/History/components/RichTextHistory.d.ts +2 -0
  270. package/lib/extensions/History/index.d.ts +1 -0
  271. package/lib/extensions/HorizontalRule/HorizontalRule.d.ts +6 -0
  272. package/lib/extensions/HorizontalRule/components/RichTextHorizontalRule.d.ts +1 -0
  273. package/lib/extensions/HorizontalRule/index.d.ts +1 -0
  274. package/lib/extensions/Iframe/Iframe.d.ts +16 -0
  275. package/lib/extensions/Iframe/components/IframeNodeView.d.ts +2 -0
  276. package/lib/extensions/Iframe/components/RichTextIframe.d.ts +1 -0
  277. package/lib/extensions/Iframe/index.d.ts +1 -0
  278. package/lib/extensions/Iframe/utils.d.ts +9 -0
  279. package/lib/extensions/Image/Image.d.ts +56 -0
  280. package/lib/extensions/Image/components/ImageCropper.d.ts +1 -0
  281. package/lib/extensions/Image/components/ImageView.d.ts +2 -0
  282. package/lib/extensions/Image/components/RichTextImage.d.ts +1 -0
  283. package/lib/extensions/Image/index.d.ts +1 -0
  284. package/lib/extensions/Image/store.d.ts +4 -0
  285. package/lib/extensions/ImageGif/ImageGif.d.ts +39 -0
  286. package/lib/extensions/ImageGif/components/ImageGifView.d.ts +2 -0
  287. package/lib/extensions/ImageGif/components/RichTextImageGif.d.ts +1 -0
  288. package/lib/extensions/ImageGif/components/services.d.ts +458 -0
  289. package/lib/extensions/ImageGif/index.d.ts +1 -0
  290. package/lib/extensions/ImportWord/ImportWord.d.ts +18 -0
  291. package/lib/extensions/ImportWord/components/RichTextImportWord.d.ts +1 -0
  292. package/lib/extensions/ImportWord/index.d.ts +1 -0
  293. package/lib/extensions/Indent/Indent.d.ts +23 -0
  294. package/lib/extensions/Indent/components/RichTextIndent.d.ts +1 -0
  295. package/lib/extensions/Indent/index.d.ts +1 -0
  296. package/lib/extensions/Italic/Italic.d.ts +6 -0
  297. package/lib/extensions/Italic/components/RichTextItalic.d.ts +1 -0
  298. package/lib/extensions/Italic/index.d.ts +1 -0
  299. package/lib/extensions/Katex/Katex.d.ts +17 -0
  300. package/lib/extensions/Katex/components/KatexWrapper.d.ts +1 -0
  301. package/lib/extensions/Katex/components/RichTextKatex.d.ts +1 -0
  302. package/lib/extensions/Katex/index.d.ts +1 -0
  303. package/lib/extensions/LineHeight/LineHeight.d.ts +7 -0
  304. package/lib/extensions/LineHeight/components/RichTextLightHeight.d.ts +1 -0
  305. package/lib/extensions/LineHeight/index.d.ts +1 -0
  306. package/lib/extensions/Link/Link.d.ts +6 -0
  307. package/lib/extensions/Link/components/LinkEditBlock.d.ts +8 -0
  308. package/lib/extensions/Link/components/LinkViewBlock.d.ts +8 -0
  309. package/lib/extensions/Link/components/RichTextLink.d.ts +1 -0
  310. package/lib/extensions/Link/index.d.ts +1 -0
  311. package/lib/extensions/Mention/Mention.d.ts +1 -0
  312. package/lib/extensions/Mention/components/NodeViewMentionList.d.ts +10 -0
  313. package/lib/extensions/Mention/index.d.ts +1 -0
  314. package/lib/extensions/Mermaid/Mermaid.d.ts +15 -0
  315. package/lib/extensions/Mermaid/components/EditMermaidBlock.d.ts +8 -0
  316. package/lib/extensions/Mermaid/components/NodeViewMermaid/NodeViewMermaid.d.ts +1 -0
  317. package/lib/extensions/Mermaid/components/RichTextMermaid.d.ts +1 -0
  318. package/lib/extensions/Mermaid/index.d.ts +1 -0
  319. package/lib/extensions/MoreMark/MoreMark.d.ts +20 -0
  320. package/lib/extensions/MoreMark/components/RichTextMoreMark.d.ts +14 -0
  321. package/lib/extensions/MoreMark/index.d.ts +1 -0
  322. package/lib/extensions/OrderedList/OrderedList.d.ts +6 -0
  323. package/lib/extensions/OrderedList/components/RichTextOrderedList.d.ts +1 -0
  324. package/lib/extensions/OrderedList/index.d.ts +1 -0
  325. package/lib/extensions/SearchAndReplace/SearchAndReplace.d.ts +36 -0
  326. package/lib/extensions/SearchAndReplace/components/RichTextSearchAndReplace.d.ts +1 -0
  327. package/lib/extensions/SearchAndReplace/index.d.ts +1 -0
  328. package/lib/extensions/SlashCommand/SlashCommand.d.ts +4 -0
  329. package/lib/extensions/SlashCommand/components/SlashCommandList.d.ts +6 -0
  330. package/lib/extensions/SlashCommand/components/SlashCommandNodeView.d.ts +3 -0
  331. package/lib/extensions/SlashCommand/index.d.ts +1 -0
  332. package/lib/extensions/SlashCommand/renderCommandListDefault.d.ts +7 -0
  333. package/lib/extensions/SlashCommand/types.d.ts +19 -0
  334. package/lib/extensions/Strike/Strike.d.ts +6 -0
  335. package/lib/extensions/Strike/components/RichTextStrike.d.ts +1 -0
  336. package/lib/extensions/Strike/index.d.ts +1 -0
  337. package/lib/extensions/Table/Table.d.ts +21 -0
  338. package/lib/extensions/Table/TableCellBackground.d.ts +14 -0
  339. package/lib/extensions/Table/components/CreateTablePopover.d.ts +7 -0
  340. package/lib/extensions/Table/components/RichTextTable.d.ts +1 -0
  341. package/lib/extensions/Table/index.d.ts +1 -0
  342. package/lib/extensions/TaskList/TaskList.d.ts +11 -0
  343. package/lib/extensions/TaskList/components/RichTextTaskList.d.ts +1 -0
  344. package/lib/extensions/TaskList/index.d.ts +1 -0
  345. package/lib/extensions/TextAlign/TextAlign.d.ts +17 -0
  346. package/lib/extensions/TextAlign/components/RichTextAlign.d.ts +14 -0
  347. package/lib/extensions/TextAlign/index.d.ts +1 -0
  348. package/lib/extensions/TextDirection/TextDirection.d.ts +5 -0
  349. package/lib/extensions/TextDirection/components/RichTextTextDirection.d.ts +15 -0
  350. package/lib/extensions/TextDirection/index.d.ts +1 -0
  351. package/lib/extensions/TextUnderline/TextUnderline.d.ts +6 -0
  352. package/lib/extensions/TextUnderline/components/RichTextUnderline.d.ts +1 -0
  353. package/lib/extensions/TextUnderline/index.d.ts +1 -0
  354. package/lib/extensions/Twitter/Twitter.d.ts +46 -0
  355. package/lib/extensions/Twitter/components/FormEditLinkTwitter.d.ts +6 -0
  356. package/lib/extensions/Twitter/components/NodeViewTweet.d.ts +8 -0
  357. package/lib/extensions/Twitter/components/RichTextTwitter.d.ts +1 -0
  358. package/lib/extensions/Twitter/index.d.ts +1 -0
  359. package/lib/extensions/Video/Video.d.ts +66 -0
  360. package/lib/extensions/Video/components/RichTextVideo.d.ts +1 -0
  361. package/lib/extensions/Video/index.d.ts +1 -0
  362. package/lib/extensions/Video/store.d.ts +4 -0
  363. package/lib/hooks/useActive.d.ts +21 -0
  364. package/lib/hooks/useAttributes.d.ts +2 -0
  365. package/lib/hooks/useButtonProps.d.ts +1 -0
  366. package/lib/hooks/useCopy.d.ts +5 -0
  367. package/lib/hooks/useExtension.d.ts +1 -0
  368. package/lib/hooks/useLocalStorage.d.ts +13 -0
  369. package/lib/index-B0fWAhpK.cjs +1 -0
  370. package/lib/{icons-Cllpys39.js → index-BQ17A_37.js} +173 -142
  371. package/lib/{index-Bnmd0WvY.js → index-BeUrdBxf.js} +23 -23
  372. package/lib/{index-DYkucCoF.js → index-CEbbM7Gx.js} +57 -76
  373. package/lib/{index-BPfVXs5_.js → index-ClAEwR0V.js} +580 -403
  374. package/lib/{index-CBce_TWY.js → index-D-FhWysc.js} +1 -1
  375. package/lib/{index-DzvuNTxo.cjs → index-DCJheRBq.cjs} +1 -1
  376. package/lib/index-DLqogznp.cjs +54 -0
  377. package/lib/index-DM3mpxB-.cjs +7 -0
  378. package/lib/index-DmOTQudI.cjs +1 -0
  379. package/lib/{index-N--9MohJ.cjs → index-DylewabB.cjs} +1 -1
  380. package/lib/{index-D-5U8dY8.cjs → index-TMqmkmT6.cjs} +1 -1
  381. package/lib/index-nFjllrEl.js +7390 -0
  382. package/lib/{index-D2TUfKkC.js → index-prphFVsp.js} +1 -1
  383. package/lib/index.cjs +3 -27
  384. package/lib/index.d.ts +1 -279
  385. package/lib/index.js +22 -129
  386. package/lib/input-CadAYBdT.cjs +1 -0
  387. package/lib/input-U-XBy56K.js +21 -0
  388. package/lib/{isNumber-ClPupm7P.cjs → isNumber-C2saEiG2.cjs} +1 -1
  389. package/lib/{isNumber-fpLGS0AZ.js → isNumber-CTm1pIvN.js} +1 -1
  390. package/lib/label-23SJWQ49.js +19 -0
  391. package/lib/label-C09fAh5p.cjs +1 -0
  392. package/lib/lib/utils.d.ts +2 -0
  393. package/lib/locale-bundle.cjs +1 -1
  394. package/lib/locale-bundle.d.ts +1 -6722
  395. package/lib/locale-bundle.js +1 -1
  396. package/lib/locales/en.d.ts +179 -0
  397. package/lib/locales/fi.d.ts +179 -0
  398. package/lib/locales/hu.d.ts +179 -0
  399. package/lib/{locale-bundle.d.cts → locales/index.d.ts} +5365 -6707
  400. package/lib/locales/pt-br.d.ts +179 -0
  401. package/lib/locales/vi.d.ts +179 -0
  402. package/lib/locales/zh-cn.d.ts +179 -0
  403. package/lib/plugins/image-upload.d.ts +13 -0
  404. package/lib/popover-C64cn4Pd.cjs +1 -0
  405. package/lib/{popover-CAuEW0Mr.js → popover-ydZ2mHXy.js} +7 -6
  406. package/lib/separator-BoKhvBG9.cjs +1 -0
  407. package/lib/separator-DqqiRHfY.js +241 -0
  408. package/lib/store/ProviderUniqueId.d.ts +6 -0
  409. package/lib/store/commandList.d.ts +2 -0
  410. package/lib/store/editor.d.ts +21 -0
  411. package/lib/store/fast-context.d.ts +7 -0
  412. package/lib/store/store.d.ts +23 -0
  413. package/lib/store-BPiGnThe.cjs +1 -0
  414. package/lib/store-Cu0gDf4G.js +10 -0
  415. package/lib/style.css +1 -1
  416. package/lib/{tabs-B5mVSN1I.js → tabs-BiYU230B.js} +3 -3
  417. package/lib/{tabs-BoLCMcCI.cjs → tabs-DebGjFBg.cjs} +1 -1
  418. package/lib/{textarea-DUUM1jZd.js → textarea--_-Ve3AB.js} +3 -3
  419. package/lib/textarea-BIkB9h_0.cjs +1 -0
  420. package/lib/theme/theme.d.ts +364 -0
  421. package/lib/theme.cjs +1 -0
  422. package/lib/theme.js +372 -0
  423. package/lib/{throttle-CdwDrFpn.js → throttle-CGM5M2yG.js} +10 -10
  424. package/lib/{throttle-qX7Yjtsg.cjs → throttle-DXN-aiH5.cjs} +1 -1
  425. package/lib/toggle-BWfca8kh.cjs +1 -0
  426. package/lib/{toggle-Cdp4IT2U.js → toggle-Crvm3Tcn.js} +20 -13
  427. package/lib/tooltip-9jtsGIcX.cjs +1 -0
  428. package/lib/tooltip-D_0vo9Xj.js +24 -0
  429. package/lib/types.d.ts +230 -0
  430. package/lib/{updatePosition-8Sdem5jb.cjs → updatePosition-C17CDdjq.cjs} +1 -1
  431. package/lib/{updatePosition-BPmcE0YD.js → updatePosition-DpMKxYdN.js} +1 -1
  432. package/lib/useButtonProps--5ytUuGi.js +136 -0
  433. package/lib/useButtonProps-DJ51kDtM.cjs +1 -0
  434. package/lib/utils/_event.d.ts +13 -0
  435. package/lib/utils/base64.d.ts +2 -0
  436. package/lib/utils/color.d.ts +7 -0
  437. package/lib/utils/columns.d.ts +14 -0
  438. package/lib/utils/customEvents/customEvents.d.ts +3 -0
  439. package/lib/utils/customEvents/events.constant.d.ts +9 -0
  440. package/lib/utils/delete-node.d.ts +2 -0
  441. package/lib/utils/dom-dataset.d.ts +28 -0
  442. package/lib/utils/download.d.ts +1 -0
  443. package/lib/utils/dynamicCSS.d.ts +25 -0
  444. package/lib/utils/editor-container-size.d.ts +4 -0
  445. package/lib/utils/file.d.ts +30 -0
  446. package/lib/utils/getRenderContainer.d.ts +3 -0
  447. package/lib/utils/indent.d.ts +14 -0
  448. package/lib/utils/is-mobile.d.ts +19 -0
  449. package/lib/utils/json.d.ts +2 -0
  450. package/lib/utils/lru-cache.d.ts +31 -0
  451. package/lib/utils/mitt.d.ts +21 -0
  452. package/lib/utils/node.d.ts +15 -0
  453. package/lib/utils/pdf.d.ts +3 -0
  454. package/lib/utils/plateform.d.ts +11 -0
  455. package/lib/utils/shortId.d.ts +1 -0
  456. package/lib/utils/storage.d.ts +2 -0
  457. package/lib/utils/updatePosition.d.ts +1 -0
  458. package/lib/utils/utils.d.ts +20 -0
  459. package/lib/utils/validateFile.d.ts +16 -0
  460. package/package.json +155 -169
  461. package/lib/Attachment.d.cts +0 -351
  462. package/lib/Attachment.d.ts +0 -351
  463. package/lib/Blockquote.d.cts +0 -350
  464. package/lib/Blockquote.d.ts +0 -350
  465. package/lib/Bold.d.cts +0 -350
  466. package/lib/Bold.d.ts +0 -350
  467. package/lib/BulletList.d.cts +0 -350
  468. package/lib/BulletList.d.ts +0 -350
  469. package/lib/Clear.d.cts +0 -349
  470. package/lib/Clear.d.ts +0 -349
  471. package/lib/Code.d.cts +0 -350
  472. package/lib/Code.d.ts +0 -350
  473. package/lib/CodeBlock.d.cts +0 -359
  474. package/lib/CodeBlock.d.ts +0 -359
  475. package/lib/CodeView.d.cts +0 -349
  476. package/lib/CodeView.d.ts +0 -349
  477. package/lib/Color.d.cts +0 -361
  478. package/lib/Color.d.ts +0 -361
  479. package/lib/Column.d.cts +0 -280
  480. package/lib/Column.d.ts +0 -280
  481. package/lib/Drawer-SRhwOc6T.cjs +0 -1
  482. package/lib/Drawer.d.cts +0 -351
  483. package/lib/Drawer.d.ts +0 -351
  484. package/lib/Emoji.d.cts +0 -279
  485. package/lib/Emoji.d.ts +0 -279
  486. package/lib/Excalidraw-DwBRXEtC.js +0 -345
  487. package/lib/Excalidraw-ZN3DQvDC.cjs +0 -1
  488. package/lib/Excalidraw.d.cts +0 -283
  489. package/lib/Excalidraw.d.ts +0 -283
  490. package/lib/ExportPdf.d.cts +0 -360
  491. package/lib/ExportPdf.d.ts +0 -360
  492. package/lib/ExportWord.d.cts +0 -348
  493. package/lib/ExportWord.d.ts +0 -348
  494. package/lib/FontFamily.d.cts +0 -372
  495. package/lib/FontFamily.d.ts +0 -372
  496. package/lib/FontSize.d.cts +0 -374
  497. package/lib/FontSize.d.ts +0 -374
  498. package/lib/Heading.d.cts +0 -364
  499. package/lib/Heading.d.ts +0 -364
  500. package/lib/Highlight.d.cts +0 -359
  501. package/lib/Highlight.d.ts +0 -359
  502. package/lib/History.d.cts +0 -352
  503. package/lib/History.d.ts +0 -352
  504. package/lib/HorizontalRule.d.cts +0 -350
  505. package/lib/HorizontalRule.d.ts +0 -350
  506. package/lib/Iframe-Cvca2G7X.cjs +0 -1
  507. package/lib/Iframe.d.cts +0 -275
  508. package/lib/Iframe.d.ts +0 -275
  509. package/lib/Image.d.cts +0 -384
  510. package/lib/Image.d.ts +0 -384
  511. package/lib/ImageGif.d.cts +0 -296
  512. package/lib/ImageGif.d.ts +0 -296
  513. package/lib/ImportWord.d.cts +0 -360
  514. package/lib/ImportWord.d.ts +0 -360
  515. package/lib/Indent.d.cts +0 -351
  516. package/lib/Indent.d.ts +0 -351
  517. package/lib/Italic.d.cts +0 -350
  518. package/lib/Italic.d.ts +0 -350
  519. package/lib/Katex-XfrNne6U.cjs +0 -4
  520. package/lib/Katex.d.cts +0 -284
  521. package/lib/Katex.d.ts +0 -284
  522. package/lib/LineHeight.d.cts +0 -350
  523. package/lib/LineHeight.d.ts +0 -350
  524. package/lib/Link.d.cts +0 -350
  525. package/lib/Link.d.ts +0 -350
  526. package/lib/LinkEditBlock-BZenZq-Z.cjs +0 -5
  527. package/lib/Mention.d.cts +0 -274
  528. package/lib/Mention.d.ts +0 -274
  529. package/lib/Mermaid.d.cts +0 -351
  530. package/lib/Mermaid.d.ts +0 -351
  531. package/lib/MoreMark.d.cts +0 -375
  532. package/lib/MoreMark.d.ts +0 -375
  533. package/lib/OrderedList.d.cts +0 -350
  534. package/lib/OrderedList.d.ts +0 -350
  535. package/lib/SearchAndReplace.d.cts +0 -292
  536. package/lib/SearchAndReplace.d.ts +0 -292
  537. package/lib/SlashCommand.d.cts +0 -309
  538. package/lib/SlashCommand.d.ts +0 -309
  539. package/lib/Strike.d.cts +0 -350
  540. package/lib/Strike.d.ts +0 -350
  541. package/lib/Table-B1j1Ebmh.cjs +0 -9
  542. package/lib/Table.d.cts +0 -371
  543. package/lib/Table.d.ts +0 -371
  544. package/lib/TaskList.d.cts +0 -356
  545. package/lib/TaskList.d.ts +0 -356
  546. package/lib/TextAlign.d.cts +0 -373
  547. package/lib/TextAlign.d.ts +0 -373
  548. package/lib/TextDirection.d.cts +0 -304
  549. package/lib/TextDirection.d.ts +0 -304
  550. package/lib/TextUnderline.d.cts +0 -350
  551. package/lib/TextUnderline.d.ts +0 -350
  552. package/lib/Twitter-CtVTIWJW.cjs +0 -1
  553. package/lib/Twitter.d.cts +0 -300
  554. package/lib/Twitter.d.ts +0 -300
  555. package/lib/Video.d.cts +0 -385
  556. package/lib/Video.d.ts +0 -385
  557. package/lib/bubble.d.cts +0 -310
  558. package/lib/button-B12K7BJ4.cjs +0 -1
  559. package/lib/clsx-C11secjj.cjs +0 -1
  560. package/lib/clsx-OuTLNxxd.js +0 -16
  561. package/lib/dialog-CaCS-W5S.cjs +0 -1
  562. package/lib/dialog-PtQivpHS.js +0 -100
  563. package/lib/dropdown-menu-CdSm4emp.cjs +0 -1
  564. package/lib/icons-CqHjeW5T.cjs +0 -1
  565. package/lib/index-BH4bc3jN.cjs +0 -33
  566. package/lib/index-DV5kbgRU.cjs +0 -1
  567. package/lib/index-Dfmm6FTT.cjs +0 -1
  568. package/lib/index-DnWWK9F_.js +0 -6374
  569. package/lib/index-DzcKxutn.js +0 -632
  570. package/lib/index-RfTlOzIr.cjs +0 -22
  571. package/lib/index.d.cts +0 -279
  572. package/lib/input-_ECRfn3Y.cjs +0 -1
  573. package/lib/input-wJ9PDEzZ.js +0 -21
  574. package/lib/label-BkgAe7IY.cjs +0 -1
  575. package/lib/label-CGdLYWv7.js +0 -19
  576. package/lib/popover-BgmUNMHj.cjs +0 -1
  577. package/lib/separator-CuBW_w98.js +0 -328
  578. package/lib/separator-DRIrVZ2N.cjs +0 -1
  579. package/lib/store-DX599H5W.js +0 -10
  580. package/lib/store-WStcMOiW.cjs +0 -1
  581. package/lib/switch-CnLJ7Y-b.cjs +0 -1
  582. package/lib/switch-Coix_FA1.js +0 -27
  583. package/lib/textarea-B-6zTKQz.cjs +0 -1
  584. package/lib/theme-B7aAsK_T.js +0 -15
  585. package/lib/theme-D8_cxGqB.cjs +0 -1
  586. package/lib/toggle-D41PzQLJ.cjs +0 -1
  587. package/lib/tooltip-BuEiE96N.cjs +0 -1
  588. package/lib/tooltip-CopwsU8q.js +0 -23
  589. package/lib/useButtonProps-BsEd4zYM.js +0 -141
  590. package/lib/useButtonProps-C6Vpn190.cjs +0 -1
package/lib/Image.js CHANGED
@@ -1,86 +1,65 @@
1
- import { m as pe } from "./index-DnWWK9F_.js";
2
- import { a as Z, c as xe } from "./throttle-CdwDrFpn.js";
3
- import { N as be, R as ye } from "./index-DzcKxutn.js";
4
- import { jsx as r, jsxs as x, Fragment as H } from "react/jsx-runtime";
5
- import * as we from "react";
6
- import j, { useState as M, useMemo as P, useCallback as F, useEffect as W, useRef as ne } from "react";
7
- import { I as J, m as K, n as Ie, u as le, k as ve, E as Te } from "./index-DYkucCoF.js";
8
- import { i as Q, c as Ae } from "./isNumber-fpLGS0AZ.js";
9
- import { A as Ce } from "./toggle-Cdp4IT2U.js";
10
- import { c as ee, a as Ne } from "./index-BPfVXs5_.js";
11
- import { I as $ } from "./Icon-jKs8Hr6p.js";
12
- import { D as oe, a as se, b as ce, c as de, d as Ee } from "./dialog-PtQivpHS.js";
13
- import Me from "react-image-crop";
14
- import { B } from "./button-DXMsXUEn.js";
15
- import { d as Le, r as Se } from "./file-BLas99n7.js";
16
- import { d as ue, u as _e, a as ke } from "./useButtonProps-BsEd4zYM.js";
17
- import { u as he } from "./use-toast-Crf7-q5H.js";
18
- import { a as Re } from "./store-DX599H5W.js";
19
- import { T as ze, a as Ue, b as te, c as ie } from "./tabs-B5mVSN1I.js";
20
- import * as G from "@radix-ui/react-checkbox";
21
- import { Check as De } from "lucide-react";
22
- import { L as ae } from "./label-CGdLYWv7.js";
23
- import { I as re } from "./input-wJ9PDEzZ.js";
24
- const me = we.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ r(
25
- G.Root,
26
- {
27
- ref: a,
28
- className: ee(
29
- "!richtext-peer !richtext-h-4 !richtext-w-4 !richtext-p-0 !richtext-shrink-0 !richtext-rounded-sm !richtext-border !richtext-border-primary !richtext-ring-offset-background focus-visible:!richtext-outline-none focus-visible:!richtext-ring-2 focus-visible:!richtext-ring-ring focus-visible:!richtext-ring-offset-2 disabled:!richtext-cursor-not-allowed disabled:!richtext-opacity-50 data-[state=checked]:!richtext-bg-primary data-[state=checked]:!richtext-text-primary-foreground",
30
- e
31
- ),
32
- ...t,
33
- children: /* @__PURE__ */ r(
34
- G.Indicator,
35
- {
36
- className: ee("!richtext-flex !richtext-p-0 !richtext-items-center !richtext-justify-center !richtext-text-current"),
37
- children: /* @__PURE__ */ r(De, { className: "!richtext-h-4 !richtext-w-4" })
38
- }
39
- )
40
- }
41
- ));
42
- me.displayName = G.Root.displayName;
1
+ import { s as he, m as fe, R as ge } from "./index-nFjllrEl.js";
2
+ import { a as q, c as pe } from "./throttle-CGM5M2yG.js";
3
+ import { jsx as o, jsxs as b, Fragment as H } from "react/jsx-runtime";
4
+ import j, { useState as L, useMemo as P, useCallback as F, useEffect as W, useRef as ae } from "react";
5
+ import { I as Z, j as J, k as be, u as ne } from "./index-CEbbM7Gx.js";
6
+ import { i as K, c as xe } from "./isNumber-CTm1pIvN.js";
7
+ import { A as ye } from "./toggle-Crvm3Tcn.js";
8
+ import "./index-ClAEwR0V.js";
9
+ import { D as re, a as le, b as oe, c as se, d as we } from "./dialog-xrO7nV_z.js";
10
+ import Ie from "react-image-crop";
11
+ import { B } from "./button-DHZeIKzF.js";
12
+ import { d as ve, r as Te } from "./file-BLas99n7.js";
13
+ import { d as ce, c as Ae, u as Ce, a as Ee } from "./useButtonProps--5ytUuGi.js";
14
+ import { u as de } from "./use-toast-Crf7-q5H.js";
15
+ import { I as $ } from "./Icon-D3AdnMCj.js";
16
+ import { a as Me } from "./store-Cu0gDf4G.js";
17
+ import { l as Le, E as Ne } from "./events.constant-CBPIqO_g.js";
18
+ import { T as Se, a as _e, b as Q, c as ee } from "./tabs-BiYU230B.js";
19
+ import { C as ze } from "./checkbox-Dm8Nfwg8.js";
20
+ import { L as te } from "./label-23SJWQ49.js";
21
+ import { I as ie } from "./input-U-XBy56K.js";
43
22
  const X = {
44
23
  TOP_LEFT: "tl",
45
24
  TOP_RIGHT: "tr",
46
25
  BOTTOM_LEFT: "bl",
47
26
  BOTTOM_RIGHT: "br"
48
27
  };
49
- function Oe(e) {
50
- var O, d, L;
51
- const [t, a] = M({
52
- width: J,
53
- height: J
54
- }), [s, f] = M({
28
+ function Re(e) {
29
+ var O, d, N;
30
+ const [t, a] = L({
31
+ width: Z,
32
+ height: Z
33
+ }), [s, f] = L({
55
34
  width: 0,
56
35
  height: 0
57
- }), [u] = M([
36
+ }), [u] = L([
58
37
  X.TOP_LEFT,
59
38
  X.TOP_RIGHT,
60
39
  X.BOTTOM_LEFT,
61
40
  X.BOTTOM_RIGHT
62
- ]), [g, v] = M(!1), [h, b] = M({
41
+ ]), [g, v] = L(!1), [m, x] = L({
63
42
  x: 0,
64
43
  y: 0,
65
44
  w: 0,
66
45
  h: 0,
67
46
  dir: ""
68
47
  }), { align: C, inline: T } = (O = e == null ? void 0 : e.node) == null ? void 0 : O.attrs, _ = T && (C === "left" || C === "right"), S = P(() => {
69
- var q;
70
- const { src: n, alt: y, width: i, height: l, flipX: m, flipY: o } = (q = e == null ? void 0 : e.node) == null ? void 0 : q.attrs, w = Q(i) ? `${i}px` : i, I = Q(l) ? `${l}px` : l, Y = [];
71
- m && Y.push("rotateX(180deg)"), o && Y.push("rotateY(180deg)");
72
- const ge = Y.join(" ");
48
+ var V;
49
+ const { src: n, alt: y, width: i, height: r, flipX: h, flipY: l } = (V = e == null ? void 0 : e.node) == null ? void 0 : V.attrs, w = K(i) ? `${i}px` : i, I = K(r) ? `${r}px` : r, Y = [];
50
+ h && Y.push("rotateX(180deg)"), l && Y.push("rotateY(180deg)");
51
+ const me = Y.join(" ");
73
52
  return {
74
53
  src: n || void 0,
75
54
  alt: y || void 0,
76
55
  style: {
77
56
  width: w || void 0,
78
57
  height: I || void 0,
79
- transform: ge || "none",
58
+ transform: me || "none",
80
59
  ..._ ? { float: C } : {}
81
60
  }
82
61
  };
83
- }, [(d = e == null ? void 0 : e.node) == null ? void 0 : d.attrs]), z = P(() => {
62
+ }, [(d = e == null ? void 0 : e.node) == null ? void 0 : d.attrs]), k = P(() => {
84
63
  const {
85
64
  style: { width: n }
86
65
  } = S;
@@ -92,55 +71,55 @@ function Oe(e) {
92
71
  height: n.target.height
93
72
  });
94
73
  }
95
- function E() {
74
+ function M() {
96
75
  const { editor: n, getPos: y } = e;
97
76
  n.commands.setNodeSelection(y());
98
77
  }
99
- const N = F(
100
- Z(() => {
78
+ const E = F(
79
+ q(() => {
101
80
  const { editor: n } = e, { width: y } = getComputedStyle(n.view.dom);
102
81
  a((i) => ({
103
82
  ...i,
104
83
  width: Number.parseInt(y, 10)
105
84
  }));
106
- }, K),
85
+ }, J),
107
86
  [e == null ? void 0 : e.editor]
108
87
  );
109
- function k(n, y) {
88
+ function z(n, y) {
110
89
  n.preventDefault(), n.stopPropagation();
111
- const i = s.width, l = s.height, m = i / l;
112
- let o = Number(e.node.attrs.width), w = Number(e.node.attrs.height);
90
+ const i = s.width, r = s.height, h = i / r;
91
+ let l = Number(e.node.attrs.width), w = Number(e.node.attrs.height);
113
92
  const I = t.width;
114
- o && !w ? (o = o > I ? I : o, w = Math.round(o / m)) : w && !o ? (o = Math.round(w * m), o = o > I ? I : o) : !o && !w ? (o = i > I ? I : i, w = Math.round(o / m)) : o = o > I ? I : o, v(!0), b({
93
+ l && !w ? (l = l > I ? I : l, w = Math.round(l / h)) : w && !l ? (l = Math.round(w * h), l = l > I ? I : l) : !l && !w ? (l = i > I ? I : i, w = Math.round(l / h)) : l = l > I ? I : l, v(!0), x({
115
94
  x: n.clientX,
116
95
  y: n.clientY,
117
- w: o,
96
+ w: l,
118
97
  h: w,
119
98
  dir: y
120
99
  });
121
100
  }
122
101
  const A = F(
123
- Z((n) => {
102
+ q((n) => {
124
103
  if (n.preventDefault(), n.stopPropagation(), !g)
125
104
  return;
126
- const { x: y, w: i, dir: l } = h, m = (n.clientX - y) * (/l/.test(l) ? -1 : 1), o = Ae(i + m, Ie, t.width);
105
+ const { x: y, w: i, dir: r } = m, h = (n.clientX - y) * (/l/.test(r) ? -1 : 1), l = xe(i + h, be, t.width);
127
106
  e.updateAttributes({
128
- width: o,
107
+ width: l,
129
108
  height: null
130
109
  });
131
- }, K),
132
- [g, h, t, e.updateAttributes]
110
+ }, J),
111
+ [g, m, t, e.updateAttributes]
133
112
  ), p = F(
134
113
  (n) => {
135
- n.preventDefault(), n.stopPropagation(), g && (b({
114
+ n.preventDefault(), n.stopPropagation(), g && (x({
136
115
  x: 0,
137
116
  y: 0,
138
117
  w: 0,
139
118
  h: 0,
140
119
  dir: ""
141
- }), v(!1), E());
120
+ }), v(!1), M());
142
121
  },
143
- [g, E]
122
+ [g, M]
144
123
  ), c = F(() => {
145
124
  document == null || document.addEventListener("mousemove", A, !0), document == null || document.addEventListener("mouseup", p, !0);
146
125
  }, [A, p]), U = F(() => {
@@ -149,11 +128,11 @@ function Oe(e) {
149
128
  W(() => (g ? c() : U(), () => {
150
129
  U();
151
130
  }), [g, c, U]);
152
- const D = P(() => new ResizeObserver(() => N()), [N]);
131
+ const D = P(() => new ResizeObserver(() => E()), [E]);
153
132
  return W(() => (D.observe(e.editor.view.dom), () => {
154
133
  D.disconnect();
155
- }), [e.editor.view.dom, D]), /* @__PURE__ */ r(
156
- be,
134
+ }), [e.editor.view.dom, D]), /* @__PURE__ */ o(
135
+ he,
157
136
  {
158
137
  as: T ? "span" : "div",
159
138
  className: "image-view",
@@ -162,34 +141,34 @@ function Oe(e) {
162
141
  margin: _ ? C === "left" ? "1em 1em 1em 0" : "1em 0 1em 1em" : void 0,
163
142
  display: T ? "inline" : "block",
164
143
  textAlign: _ ? void 0 : C,
165
- width: ((L = S.style) == null ? void 0 : L.width) ?? "auto",
166
- ..._ ? {} : z
144
+ width: ((N = S.style) == null ? void 0 : N.width) ?? "auto",
145
+ ..._ ? {} : k
167
146
  },
168
- children: /* @__PURE__ */ x(
147
+ children: /* @__PURE__ */ b(
169
148
  "div",
170
149
  {
171
150
  "data-drag-handle": !0,
172
151
  draggable: "true",
173
- style: z,
152
+ style: k,
174
153
  className: `image-view__body ${e != null && e.selected ? "image-view__body--focused" : ""} ${g ? "image-view__body--resizing" : ""}`,
175
154
  children: [
176
- /* @__PURE__ */ r(
155
+ /* @__PURE__ */ o(
177
156
  "img",
178
157
  {
179
158
  alt: S.alt,
180
159
  className: "image-view__body__image block",
181
160
  height: "auto",
182
- onClick: E,
161
+ onClick: M,
183
162
  onLoad: R,
184
163
  src: S.src,
185
164
  style: S.style
186
165
  }
187
166
  ),
188
- (e == null ? void 0 : e.editor.view.editable) && ((e == null ? void 0 : e.selected) || g) && /* @__PURE__ */ r("div", { className: "image-resizer", children: u == null ? void 0 : u.map((n) => /* @__PURE__ */ r(
167
+ (e == null ? void 0 : e.editor.view.editable) && ((e == null ? void 0 : e.selected) || g) && /* @__PURE__ */ o("div", { className: "image-resizer", children: u == null ? void 0 : u.map((n) => /* @__PURE__ */ o(
189
168
  "span",
190
169
  {
191
170
  className: `image-resizer__handler image-resizer__handler--${n}`,
192
- onMouseDown: (y) => k(y, n)
171
+ onMouseDown: (y) => z(y, n)
193
172
  },
194
173
  `image-dir-${n}`
195
174
  )) })
@@ -199,7 +178,7 @@ function Oe(e) {
199
178
  }
200
179
  );
201
180
  }
202
- function Fe(e, t) {
181
+ function ke(e, t) {
203
182
  const a = e.type, s = e.name.toLowerCase(), f = s.split(".").pop();
204
183
  if (!f) return !1;
205
184
  const g = a || {
@@ -216,119 +195,119 @@ function Fe(e, t) {
216
195
  if (v.startsWith("."))
217
196
  return s.endsWith(v);
218
197
  if (v.endsWith("/*")) {
219
- const h = v.split("/")[0];
220
- return g == null ? void 0 : g.startsWith(h + "/");
198
+ const m = v.split("/")[0];
199
+ return g == null ? void 0 : g.startsWith(m + "/");
221
200
  }
222
201
  return g === v;
223
202
  });
224
203
  }
225
- function fe(e, t) {
204
+ function ue(e, t) {
226
205
  const { acceptMimes: a, maxSize: s, t: f, toast: u } = t, g = [];
227
- return (Array.isArray(e) ? e : Object.values(e)).forEach((h) => {
228
- if (!Fe(h, a)) {
206
+ return (Array.isArray(e) ? e : Object.values(e)).forEach((m) => {
207
+ if (!ke(m, a)) {
229
208
  t.onError ? t.onError({
230
209
  type: "type",
231
- message: f("editor.upload.fileTypeNotSupported", { fileName: h.name }),
232
- file: h
210
+ message: f("editor.upload.fileTypeNotSupported", { fileName: m.name }),
211
+ file: m
233
212
  }) : u({
234
213
  variant: "default",
235
- title: f("editor.upload.fileTypeNotSupported", { fileName: h.name })
214
+ title: f("editor.upload.fileTypeNotSupported", { fileName: m.name })
236
215
  });
237
216
  return;
238
217
  }
239
- if (h.size > s) {
240
- const b = (s / 1024 / 1024).toFixed(2);
218
+ if (m.size > s) {
219
+ const x = (s / 1024 / 1024).toFixed(2);
241
220
  t.onError ? t.onError({
242
221
  type: "size",
243
- message: f("editor.upload.fileSizeTooBig", { fileName: h.name, size: b }),
244
- file: h
222
+ message: f("editor.upload.fileSizeTooBig", { fileName: m.name, size: x }),
223
+ file: m
245
224
  }) : u({
246
225
  variant: "default",
247
- title: f("editor.upload.fileSizeTooBig", { fileName: h.name, size: b })
226
+ title: f("editor.upload.fileSizeTooBig", { fileName: m.name, size: x })
248
227
  });
249
228
  return;
250
229
  }
251
- g.push(h);
230
+ g.push(m);
252
231
  }), g;
253
232
  }
254
- function He({ editor: e, imageInline: t, onClose: a, disabled: s, alt: f }) {
233
+ function Ue({ editor: e, imageInline: t, onClose: a, disabled: s, alt: f }) {
255
234
  var n, y;
256
- const { t: u } = le(), { toast: g } = he(), [v, h] = M(!1), [b, C] = M(!1), T = j.useRef(null), [_, S] = j.useState(), [z, R] = j.useState(""), E = ne(null), [N, k] = M({
235
+ const { t: u } = ne(), { toast: g } = de(), [v, m] = L(!1), [x, C] = L(!1), T = j.useRef(null), [_, S] = j.useState(), [k, R] = j.useState(""), M = ae(null), [E, z] = L({
257
236
  src: "",
258
237
  file: null
259
- }), A = ue(V.name), p = P(() => (A == null ? void 0 : A.options) ?? {}, [A]);
238
+ }), A = ce(G.name), p = P(() => (A == null ? void 0 : A.options) ?? {}, [A]);
260
239
  function c(i) {
261
240
  if (T.current && i.width && i.height) {
262
- const l = U(T.current, i);
263
- R(l);
241
+ const r = U(T.current, i);
242
+ R(r);
264
243
  }
265
244
  }
266
- function U(i, l) {
267
- const m = document.createElement("canvas"), o = i.naturalWidth / i.width, w = i.naturalHeight / i.height;
268
- m.width = l.width * o, m.height = l.height * w;
269
- const I = m.getContext("2d");
245
+ function U(i, r) {
246
+ const h = document.createElement("canvas"), l = i.naturalWidth / i.width, w = i.naturalHeight / i.height;
247
+ h.width = r.width * l, h.height = r.height * w;
248
+ const I = h.getContext("2d");
270
249
  return I && (I.imageSmoothingEnabled = !1, I.drawImage(
271
250
  i,
272
- l.x * o,
273
- l.y * w,
274
- l.width * o,
275
- l.height * w,
251
+ r.x * l,
252
+ r.y * w,
253
+ r.width * l,
254
+ r.height * w,
276
255
  0,
277
256
  0,
278
- l.width * o,
279
- l.height * w
280
- )), m.toDataURL("image/png", 1);
257
+ r.width * l,
258
+ r.height * w
259
+ )), h.toDataURL("image/png", 1);
281
260
  }
282
261
  const D = j.useCallback(async () => {
283
262
  var i;
284
- if (!b) {
263
+ if (!x) {
285
264
  C(!0);
286
265
  try {
287
- const l = Le(z, ((i = N == null ? void 0 : N.file) == null ? void 0 : i.name) || "image.png");
288
- let m = "";
289
- p.upload ? m = await p.upload(l) : m = URL.createObjectURL(l), e.chain().focus().setImageInline({ src: m, inline: t, alt: f }).run(), h(!1), k({
266
+ const r = ve(k, ((i = E == null ? void 0 : E.file) == null ? void 0 : i.name) || "image.png");
267
+ let h = "";
268
+ p.upload ? h = await p.upload(r) : h = URL.createObjectURL(r), e.chain().focus().setImageInline({ src: h, inline: t, alt: f }).run(), m(!1), z({
290
269
  src: "",
291
270
  file: null
292
- }), L(), a();
293
- } catch (l) {
294
- console.log("Error cropping image", l);
271
+ }), N(), a();
272
+ } catch (r) {
273
+ console.log("Error cropping image", r);
295
274
  } finally {
296
275
  C(!1);
297
276
  }
298
277
  }
299
- }, [z, e, t, b, a, (n = N == null ? void 0 : N.file) == null ? void 0 : n.name, p]);
278
+ }, [k, e, t, x, a, (n = E == null ? void 0 : E.file) == null ? void 0 : n.name, p]);
300
279
  function O(i) {
301
- var l;
302
- i.preventDefault(), (l = E.current) == null || l.click();
280
+ var r;
281
+ i.preventDefault(), (r = M.current) == null || r.click();
303
282
  }
304
283
  const d = async (i) => {
305
284
  var I;
306
- const l = (I = i == null ? void 0 : i.target) == null ? void 0 : I.files;
307
- if (!e || e.isDestroyed || l.length === 0) {
285
+ const r = (I = i == null ? void 0 : i.target) == null ? void 0 : I.files;
286
+ if (!e || e.isDestroyed || r.length === 0) {
308
287
  i.target.value = "";
309
288
  return;
310
289
  }
311
- const m = fe(l, {
290
+ const h = ue(r, {
312
291
  acceptMimes: p == null ? void 0 : p.acceptMimes,
313
292
  maxSize: p == null ? void 0 : p.maxSize,
314
293
  t: u,
315
294
  toast: g,
316
295
  onError: p.onError
317
296
  });
318
- if (m.length <= 0) {
297
+ if (h.length <= 0) {
319
298
  i.target.value = "";
320
299
  return;
321
300
  }
322
- const o = m[0], w = await Se(o);
323
- h(!0), k({
301
+ const l = h[0], w = await Te(l);
302
+ m(!0), z({
324
303
  src: w.src,
325
- file: o
304
+ file: l
326
305
  });
327
- }, L = () => {
328
- E.current && (E.current.value = "");
306
+ }, N = () => {
307
+ M.current && (M.current.value = "");
329
308
  };
330
- return /* @__PURE__ */ x(H, { children: [
331
- /* @__PURE__ */ r(
309
+ return /* @__PURE__ */ b(H, { children: [
310
+ /* @__PURE__ */ o(
332
311
  B,
333
312
  {
334
313
  className: "richtext-mt-1 richtext-w-full",
@@ -338,48 +317,48 @@ function He({ editor: e, imageInline: t, onClose: a, disabled: s, alt: f }) {
338
317
  children: u("editor.image.dialog.tab.uploadCrop")
339
318
  }
340
319
  ),
341
- /* @__PURE__ */ x(
342
- oe,
320
+ /* @__PURE__ */ b(
321
+ re,
343
322
  {
344
323
  open: v,
345
324
  onOpenChange: (i) => {
346
- h(i), i || (k({ src: "", file: null }), L());
325
+ m(i), i || (z({ src: "", file: null }), N());
347
326
  },
348
327
  children: [
349
- /* @__PURE__ */ r(se, {}),
350
- /* @__PURE__ */ x(ce, { children: [
351
- /* @__PURE__ */ r(de, { children: u("editor.image.dialog.tab.uploadCrop") }),
352
- /* @__PURE__ */ r("div", { children: N.src && /* @__PURE__ */ r(
353
- Me,
328
+ /* @__PURE__ */ o(le, {}),
329
+ /* @__PURE__ */ b(oe, { children: [
330
+ /* @__PURE__ */ o(se, { children: u("editor.image.dialog.tab.uploadCrop") }),
331
+ /* @__PURE__ */ o("div", { children: E.src && /* @__PURE__ */ o(
332
+ Ie,
354
333
  {
355
334
  className: "richtext-w-full",
356
335
  crop: _,
357
336
  onChange: (i) => S(i),
358
337
  onComplete: (i) => c(i),
359
- children: /* @__PURE__ */ r(
338
+ children: /* @__PURE__ */ o(
360
339
  "img",
361
340
  {
362
341
  alt: "Crop me",
363
342
  ref: T,
364
- src: N.src
343
+ src: E.src
365
344
  }
366
345
  )
367
346
  }
368
347
  ) }),
369
- /* @__PURE__ */ x(Ee, { children: [
370
- /* @__PURE__ */ x(
348
+ /* @__PURE__ */ b(we, { children: [
349
+ /* @__PURE__ */ b(
371
350
  B,
372
351
  {
373
- disabled: b,
352
+ disabled: x,
374
353
  onClick: () => {
375
- h(!1), k({
354
+ m(!1), z({
376
355
  src: "",
377
356
  file: null
378
- }), L();
357
+ }), N();
379
358
  },
380
359
  children: [
381
360
  u("editor.imageUpload.cancel"),
382
- /* @__PURE__ */ r(
361
+ /* @__PURE__ */ o(
383
362
  $,
384
363
  {
385
364
  className: "richtext-ml-1",
@@ -389,24 +368,24 @@ function He({ editor: e, imageInline: t, onClose: a, disabled: s, alt: f }) {
389
368
  ]
390
369
  }
391
370
  ),
392
- /* @__PURE__ */ r(
371
+ /* @__PURE__ */ o(
393
372
  B,
394
373
  {
395
374
  className: "richtext-w-fit",
396
- disabled: b || !_,
375
+ disabled: x || !_,
397
376
  onClick: D,
398
- children: b ? /* @__PURE__ */ x(H, { children: [
377
+ children: x ? /* @__PURE__ */ b(H, { children: [
399
378
  u("editor.imageUpload.uploading"),
400
- /* @__PURE__ */ r(
379
+ /* @__PURE__ */ o(
401
380
  $,
402
381
  {
403
382
  className: "richtext-ml-1 richtext-animate-spin",
404
383
  name: "Loader"
405
384
  }
406
385
  )
407
- ] }) : /* @__PURE__ */ x(H, { children: [
386
+ ] }) : /* @__PURE__ */ b(H, { children: [
408
387
  u("editor.imageUpload.crop"),
409
- /* @__PURE__ */ r(
388
+ /* @__PURE__ */ o(
410
389
  $,
411
390
  {
412
391
  className: "richtext-ml-1",
@@ -421,40 +400,40 @@ function He({ editor: e, imageInline: t, onClose: a, disabled: s, alt: f }) {
421
400
  ]
422
401
  }
423
402
  ),
424
- /* @__PURE__ */ r(
403
+ /* @__PURE__ */ o(
425
404
  "input",
426
405
  {
427
406
  accept: ((y = p == null ? void 0 : p.acceptMimes) == null ? void 0 : y.join(",")) || "image/*",
428
407
  multiple: !1,
429
408
  onChange: d,
430
- ref: E,
409
+ ref: M,
431
410
  style: { display: "none" },
432
411
  type: "file"
433
412
  }
434
413
  )
435
414
  ] });
436
415
  }
437
- function ct() {
438
- const { t: e } = le(), { toast: t } = he(), a = Ne(), s = _e(V.name), {
416
+ function rt() {
417
+ const { t: e } = ne(), { toast: t } = de(), a = Ae(), s = Ce(G.name), {
439
418
  icon: f,
440
419
  tooltip: u
441
- } = (s == null ? void 0 : s.componentProps) ?? {}, { editorDisabled: g } = ke(), [v, h] = M(!1), [b, C] = M(!1), T = ue(V.name), _ = (d) => {
442
- h(d.detail);
443
- }, [S, z] = M(""), [R, E] = M(""), N = ne(null), k = (T == null ? void 0 : T.options.defaultInline) || !1, [A, p] = M(k), c = P(() => T == null ? void 0 : T.options, [T]);
420
+ } = (s == null ? void 0 : s.componentProps) ?? {}, { editorDisabled: g } = Ee(), [v, m] = L(!1), [x, C] = L(!1), T = ce(G.name), _ = (d) => {
421
+ m(d.detail);
422
+ }, [S, k] = L(""), [R, M] = L(""), E = ae(null), z = (T == null ? void 0 : T.options.defaultInline) || !1, [A, p] = L(z), c = P(() => T == null ? void 0 : T.options, [T]);
444
423
  W(() => {
445
- const d = ve(Te.UPLOAD_IMAGE(a.id), _);
424
+ const d = Le(Ne.UPLOAD_IMAGE(a.id), _);
446
425
  return () => {
447
426
  d();
448
427
  };
449
428
  }, []);
450
429
  async function U(d) {
451
430
  var y;
452
- const L = (y = d == null ? void 0 : d.target) == null ? void 0 : y.files;
453
- if (!a || a.isDestroyed || L.length === 0 || b) {
431
+ const N = (y = d == null ? void 0 : d.target) == null ? void 0 : y.files;
432
+ if (!a || a.isDestroyed || N.length === 0 || x) {
454
433
  d.target.value = "";
455
434
  return;
456
435
  }
457
- const n = fe(L, {
436
+ const n = ue(N, {
458
437
  acceptMimes: c == null ? void 0 : c.acceptMimes,
459
438
  maxSize: c == null ? void 0 : c.maxSize,
460
439
  t: e,
@@ -468,19 +447,19 @@ function ct() {
468
447
  C(!0);
469
448
  try {
470
449
  if (c != null && c.multiple) {
471
- const i = n.map(async (m) => {
472
- let o = "";
473
- return c.upload ? o = await c.upload(m) : o = URL.createObjectURL(m), o;
450
+ const i = n.map(async (h) => {
451
+ let l = "";
452
+ return c.upload ? l = await c.upload(h) : l = URL.createObjectURL(h), l;
474
453
  });
475
- (await Promise.all(i)).forEach((m) => {
476
- a.chain().focus().setImageInline({ src: m, inline: A, alt: R }).run();
454
+ (await Promise.all(i)).forEach((h) => {
455
+ a.chain().focus().setImageInline({ src: h, inline: A, alt: R }).run();
477
456
  });
478
457
  } else {
479
458
  const i = n[0];
480
- let l = "";
481
- c.upload ? l = await c.upload(i) : l = URL.createObjectURL(i), a.chain().focus().setImageInline({ src: l, inline: A, alt: R }).run();
459
+ let r = "";
460
+ c.upload ? r = await c.upload(i) : r = URL.createObjectURL(i), a.chain().focus().setImageInline({ src: r, inline: A, alt: R }).run();
482
461
  }
483
- h(!1), E(""), p(k);
462
+ m(!1), M(""), p(z);
484
463
  } catch (i) {
485
464
  console.error("Error uploading image", i), c.onError ? c.onError({
486
465
  type: "upload",
@@ -494,50 +473,50 @@ function ct() {
494
473
  }
495
474
  }
496
475
  function D(d) {
497
- d.preventDefault(), d.stopPropagation(), a.chain().focus().setImageInline({ src: S, inline: A, alt: R }).run(), h(!1), p(k), z(""), E("");
476
+ d.preventDefault(), d.stopPropagation(), a.chain().focus().setImageInline({ src: S, inline: A, alt: R }).run(), m(!1), p(z), k(""), M("");
498
477
  }
499
478
  function O(d) {
500
- var L;
501
- d.preventDefault(), (L = N.current) == null || L.click();
479
+ var N;
480
+ d.preventDefault(), (N = E.current) == null || N.click();
502
481
  }
503
- return s ? /* @__PURE__ */ x(
504
- oe,
482
+ return s ? /* @__PURE__ */ b(
483
+ re,
505
484
  {
506
- onOpenChange: h,
485
+ onOpenChange: m,
507
486
  open: v,
508
487
  children: [
509
- /* @__PURE__ */ r(
510
- se,
488
+ /* @__PURE__ */ o(
489
+ le,
511
490
  {
512
491
  asChild: !0,
513
- children: /* @__PURE__ */ r(
514
- Ce,
492
+ children: /* @__PURE__ */ o(
493
+ ye,
515
494
  {
516
495
  disabled: g,
517
496
  icon: f,
518
497
  tooltip: u,
519
498
  action: () => {
520
- g || h(!0);
499
+ g || m(!0);
521
500
  }
522
501
  }
523
502
  )
524
503
  }
525
504
  ),
526
- /* @__PURE__ */ x(ce, { children: [
527
- /* @__PURE__ */ r(de, { children: e("editor.image.dialog.title") }),
528
- /* @__PURE__ */ x(
529
- ze,
505
+ /* @__PURE__ */ b(oe, { children: [
506
+ /* @__PURE__ */ o(se, { children: e("editor.image.dialog.title") }),
507
+ /* @__PURE__ */ b(
508
+ Se,
530
509
  {
531
510
  activationMode: "manual",
532
511
  defaultValue: c.resourceImage === "both" || c.resourceImage === "upload" ? "upload" : "link",
533
512
  children: [
534
- c.resourceImage === "both" && /* @__PURE__ */ x(Ue, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
535
- /* @__PURE__ */ r(te, { value: "upload", children: e("editor.image.dialog.tab.upload") }),
536
- /* @__PURE__ */ r(te, { value: "link", children: e("editor.image.dialog.tab.url") })
513
+ c.resourceImage === "both" && /* @__PURE__ */ b(_e, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
514
+ /* @__PURE__ */ o(Q, { value: "upload", children: e("editor.image.dialog.tab.upload") }),
515
+ /* @__PURE__ */ o(Q, { value: "link", children: e("editor.image.dialog.tab.url") })
537
516
  ] }),
538
- /* @__PURE__ */ x("div", { className: "richtext-my-[10px] richtext-flex richtext-items-center richtext-gap-[4px]", children: [
539
- /* @__PURE__ */ r(
540
- me,
517
+ /* @__PURE__ */ b("div", { className: "richtext-my-[10px] richtext-flex richtext-items-center richtext-gap-[4px]", children: [
518
+ /* @__PURE__ */ o(
519
+ ze,
541
520
  {
542
521
  checked: A,
543
522
  onCheckedChange: (d) => {
@@ -545,32 +524,32 @@ function ct() {
545
524
  }
546
525
  }
547
526
  ),
548
- /* @__PURE__ */ r(ae, { children: e("editor.link.dialog.inline") })
527
+ /* @__PURE__ */ o(te, { children: e("editor.link.dialog.inline") })
549
528
  ] }),
550
- c.enableAlt && /* @__PURE__ */ x("div", { className: "richtext-my-[10px] ", children: [
551
- /* @__PURE__ */ r(ae, { className: "mb-[6px]", children: e("editor.imageUpload.alt") }),
552
- /* @__PURE__ */ r(
553
- re,
529
+ c.enableAlt && /* @__PURE__ */ b("div", { className: "richtext-my-[10px] ", children: [
530
+ /* @__PURE__ */ o(te, { className: "mb-[6px]", children: e("editor.imageUpload.alt") }),
531
+ /* @__PURE__ */ o(
532
+ ie,
554
533
  {
555
- onChange: (d) => E(d.target.value),
534
+ onChange: (d) => M(d.target.value),
556
535
  required: !0,
557
536
  type: "text",
558
537
  value: R
559
538
  }
560
539
  )
561
540
  ] }),
562
- /* @__PURE__ */ x(ie, { value: "upload", children: [
563
- /* @__PURE__ */ x("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: [
564
- /* @__PURE__ */ r(
541
+ /* @__PURE__ */ b(ee, { value: "upload", children: [
542
+ /* @__PURE__ */ b("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: [
543
+ /* @__PURE__ */ o(
565
544
  B,
566
545
  {
567
546
  className: "richtext-mt-1 richtext-w-full",
568
- disabled: b,
547
+ disabled: x,
569
548
  onClick: O,
570
549
  size: "sm",
571
- children: b ? /* @__PURE__ */ x(H, { children: [
550
+ children: x ? /* @__PURE__ */ b(H, { children: [
572
551
  e("editor.imageUpload.uploading"),
573
- /* @__PURE__ */ r(
552
+ /* @__PURE__ */ o(
574
553
  $,
575
554
  {
576
555
  className: "richtext-ml-1 richtext-animate-spin",
@@ -580,44 +559,44 @@ function ct() {
580
559
  ] }) : e("editor.image.dialog.tab.upload")
581
560
  }
582
561
  ),
583
- /* @__PURE__ */ r(
584
- He,
562
+ /* @__PURE__ */ o(
563
+ Ue,
585
564
  {
586
565
  alt: R,
587
- disabled: b,
566
+ disabled: x,
588
567
  editor: a,
589
568
  imageInline: A,
590
569
  onClose: () => {
591
- Re.setOpen(a.id, !1), E("");
570
+ Me.setOpen(a.id, !1), M("");
592
571
  }
593
572
  }
594
573
  )
595
574
  ] }),
596
- /* @__PURE__ */ r(
575
+ /* @__PURE__ */ o(
597
576
  "input",
598
577
  {
599
578
  accept: c.acceptMimes.join(",") || "image/*",
600
579
  multiple: c.multiple,
601
580
  onChange: U,
602
- ref: N,
581
+ ref: E,
603
582
  style: { display: "none" },
604
583
  type: "file"
605
584
  }
606
585
  )
607
586
  ] }),
608
- /* @__PURE__ */ r(ie, { value: "link", children: /* @__PURE__ */ r("form", { onSubmit: D, children: /* @__PURE__ */ x("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
609
- /* @__PURE__ */ r(
610
- re,
587
+ /* @__PURE__ */ o(ee, { value: "link", children: /* @__PURE__ */ o("form", { onSubmit: D, children: /* @__PURE__ */ b("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
588
+ /* @__PURE__ */ o(
589
+ ie,
611
590
  {
612
591
  autoFocus: !0,
613
- onChange: (d) => z(d.target.value),
592
+ onChange: (d) => k(d.target.value),
614
593
  placeholder: e("editor.image.dialog.placeholder"),
615
594
  required: !0,
616
595
  type: "url",
617
596
  value: S
618
597
  }
619
598
  ),
620
- /* @__PURE__ */ r(B, { type: "submit", children: e("editor.image.dialog.button.apply") })
599
+ /* @__PURE__ */ o(B, { type: "submit", children: e("editor.image.dialog.button.apply") })
621
600
  ] }) }) })
622
601
  ]
623
602
  }
@@ -625,9 +604,9 @@ function ct() {
625
604
  ] })
626
605
  ]
627
606
  }
628
- ) : /* @__PURE__ */ r(H, {});
607
+ ) : /* @__PURE__ */ o(H, {});
629
608
  }
630
- const Pe = {
609
+ const De = {
631
610
  acceptMimes: ["image/jpeg", "image/gif", "image/png", "image/jpg"],
632
611
  maxSize: 1024 * 1024 * 5,
633
612
  // 5MB
@@ -635,7 +614,7 @@ const Pe = {
635
614
  resourceImage: "both",
636
615
  defaultInline: !1,
637
616
  enableAlt: !0
638
- }, V = /* @__PURE__ */ xe.extend({
617
+ }, G = /* @__PURE__ */ pe.extend({
639
618
  group: "inline",
640
619
  inline: !0,
641
620
  defining: !0,
@@ -644,7 +623,7 @@ const Pe = {
644
623
  addOptions() {
645
624
  var e;
646
625
  return {
647
- ...Pe,
626
+ ...De,
648
627
  ...(e = this.parent) == null ? void 0 : e.call(this),
649
628
  upload: () => Promise.reject("Image Upload Function"),
650
629
  button: ({
@@ -710,7 +689,7 @@ const Pe = {
710
689
  };
711
690
  },
712
691
  addNodeView() {
713
- return ye(Oe);
692
+ return ge(Re);
714
693
  },
715
694
  addCommands() {
716
695
  var e;
@@ -737,7 +716,7 @@ const Pe = {
737
716
  },
738
717
  [
739
718
  "img",
740
- pe(
719
+ fe(
741
720
  {
742
721
  height: "auto",
743
722
  style: C
@@ -845,6 +824,6 @@ const Pe = {
845
824
  // },
846
825
  });
847
826
  export {
848
- V as Image,
849
- ct as RichTextImage
827
+ G as Image,
828
+ rt as RichTextImage
850
829
  };