reactjs-tiptap-editor 1.0.1 → 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.
- package/lib/{ActionMenuButton-DLQyd_gx.cjs → ActionMenuButton-BRWFTb3V.cjs} +1 -1
- package/lib/{ActionMenuButton-BKOg7hkq.js → ActionMenuButton-DgjFjzC8.js} +8 -8
- package/lib/Attachment.cjs +2 -2
- package/lib/Attachment.js +27 -29
- package/lib/Blockquote.cjs +1 -1
- package/lib/Blockquote.js +4 -4
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.js +7 -7
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.js +4 -4
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.js +3 -3
- package/lib/Code.cjs +1 -1
- package/lib/Code.js +7 -7
- package/lib/CodeBlock.cjs +36 -36
- package/lib/CodeBlock.js +593 -596
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.js +4 -4
- package/lib/Color.cjs +1 -1
- package/lib/Color.js +9 -9
- package/lib/Column.cjs +1 -1
- package/lib/Column.js +9 -9
- package/lib/Drawer-1_PmP-H0.cjs +1 -0
- package/lib/{Drawer-DZ5jvmrX.js → Drawer-DNnkwfnI.js} +48 -49
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.js +5 -6
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.js +155 -150
- package/lib/Excalidraw-DreGyrmJ.cjs +1 -0
- package/lib/Excalidraw-StBAUhjt.js +355 -0
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.js +4 -5
- package/lib/ExportPdf.cjs +1 -1
- package/lib/ExportPdf.js +4 -4
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.js +4 -4
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.js +6 -6
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.js +6 -6
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.js +6 -6
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.js +9 -9
- package/lib/History.cjs +1 -1
- package/lib/History.js +36 -36
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.js +4 -4
- package/lib/{Icon-DUpv2cI6.cjs → Icon-B9hI3gal.cjs} +1 -1
- package/lib/{Icon-jKs8Hr6p.js → Icon-D3AdnMCj.js} +2 -2
- package/lib/Iframe-BDm-w-lg.cjs +1 -0
- package/lib/{Iframe-CmXkEqOd.js → Iframe-BIgQtyZo.js} +26 -28
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.js +4 -5
- package/lib/Image.cjs +1 -1
- package/lib/Image.js +208 -229
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.js +98 -91
- package/lib/ImportWord.cjs +28 -28
- package/lib/ImportWord.js +5 -5
- package/lib/Indent-BzyTbroV.cjs +1 -0
- package/lib/Indent-CnPAv7eT.js +153 -0
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.js +4 -149
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.js +4 -4
- package/lib/Katex-BE_GROI2.cjs +4 -0
- package/lib/{Katex-DsYXsjSS.js → Katex-D-SUWkkU.js} +771 -783
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.js +4 -5
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.js +17 -17
- package/lib/Link.cjs +1 -1
- package/lib/Link.js +2 -2
- package/lib/LinkEditBlock-5NRB9DRC.cjs +5 -0
- package/lib/{LinkEditBlock-CB8yIffE.js → LinkEditBlock-DcxIMK_D.js} +221 -221
- package/lib/Mention.cjs +1 -1
- package/lib/Mention.js +17 -19
- package/lib/Mermaid.cjs +2 -2
- package/lib/Mermaid.js +24 -26
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.js +16 -16
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.js +4 -4
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.js +52 -52
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.js +125 -120
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.js +4 -4
- package/lib/Table-BYg26eMf.cjs +9 -0
- package/lib/{Table-Db8TcQX8.js → Table-DtC2-bqx.js} +30 -30
- package/lib/Table.cjs +1 -1
- package/lib/Table.js +1 -1
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.js +4 -4
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.js +14 -13
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.js +7 -7
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.js +4 -4
- package/lib/{Twitter-CXmmjz9R.js → Twitter-B3n8vc45.js} +73 -75
- package/lib/Twitter-DJ6JzZPJ.cjs +1 -0
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.js +3 -4
- package/lib/Video.cjs +1 -1
- package/lib/Video.js +41 -33
- package/lib/bubble.cjs +4 -2
- package/lib/bubble.d.ts +1 -310
- package/lib/bubble.js +8782 -1104
- package/lib/button-BTnV4TZ7.cjs +1 -0
- package/lib/{button-DXMsXUEn.js → button-DHZeIKzF.js} +6 -6
- package/lib/checkbox-BoBTXwkF.cjs +1 -0
- package/lib/checkbox-Dm8Nfwg8.js +27 -0
- package/lib/components/ActionButton.d.ts +23 -0
- package/lib/components/ActionMenuButton.d.ts +28 -0
- package/lib/components/Bubble/RichTextBubbleColumns.d.ts +1 -0
- package/lib/components/Bubble/RichTextBubbleDrawer.d.ts +1 -0
- package/lib/components/Bubble/RichTextBubbleExcalidraw.d.ts +1 -0
- package/lib/components/Bubble/RichTextBubbleIframe.d.ts +1 -0
- package/lib/components/Bubble/RichTextBubbleKatex.d.ts +1 -0
- package/lib/components/Bubble/RichTextBubbleLink.d.ts +6 -0
- package/lib/components/Bubble/RichTextBubbleMedia.d.ts +4 -0
- package/lib/components/Bubble/RichTextBubbleMenuDragHandle.d.ts +1 -0
- package/lib/components/Bubble/RichTextBubbleMermaid.d.ts +1 -0
- package/lib/components/Bubble/RichTextBubbleTable.d.ts +5 -0
- package/lib/components/Bubble/RichTextBubbleText.d.ts +5 -0
- package/lib/components/Bubble/RichTextBubbleTwitter.d.ts +1 -0
- package/lib/components/Bubble/formatBubble.d.ts +55 -0
- package/lib/components/Bubble/index.d.ts +12 -0
- package/lib/components/ColorPicker.d.ts +11 -0
- package/lib/components/RichTextProvider.d.ts +8 -0
- package/lib/components/SizeSetter/SizeSetter.d.ts +13 -0
- package/lib/components/icons/Activity.d.ts +2 -0
- package/lib/components/icons/Animas.d.ts +2 -0
- package/lib/components/icons/AspectRatio.d.ts +2 -0
- package/lib/components/icons/Blockquote.d.ts +2 -0
- package/lib/components/icons/CodeView.d.ts +1 -0
- package/lib/components/icons/ColumnAddLeft.d.ts +1 -0
- package/lib/components/icons/ColumnAddRight.d.ts +1 -0
- package/lib/components/icons/DeleteColumn.d.ts +2 -0
- package/lib/components/icons/DeleteRow.d.ts +2 -0
- package/lib/components/icons/Direction.d.ts +1 -0
- package/lib/components/icons/Excalidraw.d.ts +1 -0
- package/lib/components/icons/ExportPdf.d.ts +1 -0
- package/lib/components/icons/ExportWord.d.ts +2 -0
- package/lib/components/icons/FileWordOutline.d.ts +2 -0
- package/lib/components/icons/Flag.d.ts +2 -0
- package/lib/components/icons/Food.d.ts +2 -0
- package/lib/components/icons/GIfIcon.d.ts +1 -0
- package/lib/components/icons/Html.d.ts +1 -0
- package/lib/components/icons/Icon.d.ts +8 -0
- package/lib/components/icons/IconColorFill.d.ts +5 -0
- package/lib/components/icons/IconHighlightFill.d.ts +3 -0
- package/lib/components/icons/ImportWord.d.ts +2 -0
- package/lib/components/icons/LeftToRight.d.ts +1 -0
- package/lib/components/icons/LineHeight.d.ts +2 -0
- package/lib/components/icons/MenuDown.d.ts +2 -0
- package/lib/components/icons/Mermaid.d.ts +1 -0
- package/lib/components/icons/NoFill.d.ts +1 -0
- package/lib/components/icons/Object.d.ts +2 -0
- package/lib/components/icons/RightToLeft.d.ts +1 -0
- package/lib/components/icons/SizeL.d.ts +2 -0
- package/lib/components/icons/SizeM.d.ts +2 -0
- package/lib/components/icons/SizeS.d.ts +2 -0
- package/lib/components/icons/Symbol.d.ts +2 -0
- package/lib/components/icons/Travel.d.ts +2 -0
- package/lib/components/icons/Twitter.d.ts +1 -0
- package/lib/components/icons/icons.d.ts +1 -0
- package/lib/components/icons/index.d.ts +12 -0
- package/lib/components/index.d.ts +6 -0
- package/lib/components/ui/button.d.ts +11 -0
- package/lib/components/ui/checkbox.d.ts +4 -0
- package/lib/components/ui/dialog.d.ts +19 -0
- package/lib/components/ui/dropdown-menu.d.ts +27 -0
- package/lib/components/ui/emoji-picker.d.ts +7 -0
- package/lib/components/ui/index.d.ts +14 -0
- package/lib/components/ui/input.d.ts +5 -0
- package/lib/components/ui/label.d.ts +5 -0
- package/lib/components/ui/popover.d.ts +6 -0
- package/lib/components/ui/select.d.ts +13 -0
- package/lib/components/ui/separator.d.ts +4 -0
- package/lib/components/ui/switch.d.ts +4 -0
- package/lib/components/ui/tabs.d.ts +7 -0
- package/lib/components/ui/textarea.d.ts +5 -0
- package/lib/components/ui/toast.d.ts +15 -0
- package/lib/components/ui/toaster.d.ts +1 -0
- package/lib/components/ui/toggle.d.ts +12 -0
- package/lib/components/ui/tooltip.d.ts +7 -0
- package/lib/components/ui/use-toast.d.ts +44 -0
- package/lib/constants/index.d.ts +47 -0
- package/lib/constants/resetCSS.d.ts +1 -0
- package/lib/dialog-DXF2Q8LZ.cjs +1 -0
- package/lib/dialog-xrO7nV_z.js +101 -0
- package/lib/dropdown-menu-Bh-wEgI8.cjs +1 -0
- package/lib/{dropdown-menu-BPp2Z_U-.js → dropdown-menu-ByeBPPyv.js} +32 -26
- package/lib/events.constant-B-VGURJp.cjs +1 -0
- package/lib/events.constant-CBPIqO_g.js +25 -0
- package/lib/extensions/Attachment/Attachment.d.ts +15 -0
- package/lib/extensions/Attachment/components/NodeViewAttachment/FileIcon.d.ts +1 -0
- package/lib/extensions/Attachment/components/NodeViewAttachment/FileIconString.d.ts +1 -0
- package/lib/extensions/Attachment/components/NodeViewAttachment/NodeViewAttachment.d.ts +1 -0
- package/lib/extensions/Attachment/components/RichTextAttachment.d.ts +1 -0
- package/lib/extensions/Attachment/index.d.ts +1 -0
- package/lib/extensions/Blockquote/Blockquote.d.ts +6 -0
- package/lib/extensions/Blockquote/components/RichTextBlockquote.d.ts +1 -0
- package/lib/extensions/Blockquote/index.d.ts +1 -0
- package/lib/extensions/Bold/Bold.d.ts +6 -0
- package/lib/extensions/Bold/components/RichTextBold.d.ts +1 -0
- package/lib/extensions/Bold/index.d.ts +1 -0
- package/lib/extensions/BulletList/BulletList.d.ts +6 -0
- package/lib/extensions/BulletList/components/RichTextBulletList.d.ts +1 -0
- package/lib/extensions/BulletList/index.d.ts +1 -0
- package/lib/extensions/Clear/Clear.d.ts +6 -0
- package/lib/extensions/Clear/components/RichTextClear.d.ts +1 -0
- package/lib/extensions/Clear/index.d.ts +1 -0
- package/lib/extensions/Code/Code.d.ts +6 -0
- package/lib/extensions/Code/components/RichTextCode.d.ts +1 -0
- package/lib/extensions/Code/index.d.ts +1 -0
- package/lib/extensions/CodeBlock/CodeBlock.d.ts +21 -0
- package/lib/extensions/CodeBlock/components/NodeViewCodeBlock/NodeViewCodeBlock.d.ts +1 -0
- package/lib/extensions/CodeBlock/components/RichTextCodeBlock.d.ts +1 -0
- package/lib/extensions/CodeBlock/index.d.ts +1 -0
- package/lib/extensions/CodeView/CodeView.d.ts +17 -0
- package/lib/extensions/CodeView/components/RichTextCodeView.d.ts +1 -0
- package/lib/extensions/CodeView/index.d.ts +1 -0
- package/lib/extensions/Color/Color.d.ts +22 -0
- package/lib/extensions/Color/components/RichTextColor.d.ts +1 -0
- package/lib/extensions/Color/index.d.ts +1 -0
- package/lib/extensions/Column/Column.d.ts +17 -0
- package/lib/extensions/Column/components/RichTextColumn.d.ts +1 -0
- package/lib/extensions/Column/index.d.ts +1 -0
- package/lib/extensions/Drawer/Drawer.d.ts +15 -0
- package/lib/extensions/Drawer/components/ControlDrawer/ControlDrawer.d.ts +2 -0
- package/lib/extensions/Drawer/components/ControlDrawer/icon.d.ts +28 -0
- package/lib/extensions/Drawer/components/EditDrawerBlock.d.ts +1 -0
- package/lib/extensions/Drawer/components/NodeViewDrawer/NodeViewDrawer.d.ts +1 -0
- package/lib/extensions/Drawer/components/RichTextDrawer.d.ts +1 -0
- package/lib/extensions/Drawer/index.d.ts +1 -0
- package/lib/extensions/Emoji/Emoji.d.ts +3 -0
- package/lib/extensions/Emoji/components/EmojiList/EmojiNodeView.d.ts +3 -0
- package/lib/extensions/Emoji/components/EmojiList/emojis.d.ts +4 -0
- package/lib/extensions/Emoji/components/RichTextEmoji.d.ts +1 -0
- package/lib/extensions/Emoji/index.d.ts +1 -0
- package/lib/extensions/Excalidraw/Excalidraw.d.ts +17 -0
- package/lib/extensions/Excalidraw/components/NodeViewExcalidraw/NodeViewExcalidraw.d.ts +2 -0
- package/lib/extensions/Excalidraw/components/RichTextExcalidraw.d.ts +1 -0
- package/lib/extensions/Excalidraw/index.d.ts +1 -0
- package/lib/extensions/ExportPdf/ExportPdf.d.ts +21 -0
- package/lib/extensions/ExportPdf/components/RichTextExportPdf.d.ts +1 -0
- package/lib/extensions/ExportPdf/index.d.ts +1 -0
- package/lib/extensions/ExportWord/ExportWord.d.ts +13 -0
- package/lib/extensions/ExportWord/components/RichTextExportWord.d.ts +1 -0
- package/lib/extensions/ExportWord/index.d.ts +1 -0
- package/lib/extensions/FontFamily/FontFamily.d.ts +10 -0
- package/lib/extensions/FontFamily/components/RichTextFontFamily.d.ts +15 -0
- package/lib/extensions/FontFamily/index.d.ts +1 -0
- package/lib/extensions/FontSize/FontSize.d.ts +32 -0
- package/lib/extensions/FontSize/components/RichTextFontSize.d.ts +12 -0
- package/lib/extensions/FontSize/index.d.ts +1 -0
- package/lib/extensions/Heading/Heading.d.ts +6 -0
- package/lib/extensions/Heading/components/RichTextHeading.d.ts +15 -0
- package/lib/extensions/Heading/index.d.ts +1 -0
- package/lib/extensions/Highlight/Highlight.d.ts +18 -0
- package/lib/extensions/Highlight/components/RichTextHighlight.d.ts +1 -0
- package/lib/extensions/Highlight/index.d.ts +1 -0
- package/lib/extensions/History/History.d.ts +6 -0
- package/lib/extensions/History/components/RichTextHistory.d.ts +2 -0
- package/lib/extensions/History/index.d.ts +1 -0
- package/lib/extensions/HorizontalRule/HorizontalRule.d.ts +6 -0
- package/lib/extensions/HorizontalRule/components/RichTextHorizontalRule.d.ts +1 -0
- package/lib/extensions/HorizontalRule/index.d.ts +1 -0
- package/lib/extensions/Iframe/Iframe.d.ts +16 -0
- package/lib/extensions/Iframe/components/IframeNodeView.d.ts +2 -0
- package/lib/extensions/Iframe/components/RichTextIframe.d.ts +1 -0
- package/lib/extensions/Iframe/index.d.ts +1 -0
- package/lib/extensions/Iframe/utils.d.ts +9 -0
- package/lib/extensions/Image/Image.d.ts +56 -0
- package/lib/extensions/Image/components/ImageCropper.d.ts +1 -0
- package/lib/extensions/Image/components/ImageView.d.ts +2 -0
- package/lib/extensions/Image/components/RichTextImage.d.ts +1 -0
- package/lib/extensions/Image/index.d.ts +1 -0
- package/lib/extensions/Image/store.d.ts +4 -0
- package/lib/extensions/ImageGif/ImageGif.d.ts +39 -0
- package/lib/extensions/ImageGif/components/ImageGifView.d.ts +2 -0
- package/lib/extensions/ImageGif/components/RichTextImageGif.d.ts +1 -0
- package/lib/extensions/ImageGif/components/services.d.ts +458 -0
- package/lib/extensions/ImageGif/index.d.ts +1 -0
- package/lib/extensions/ImportWord/ImportWord.d.ts +18 -0
- package/lib/extensions/ImportWord/components/RichTextImportWord.d.ts +1 -0
- package/lib/extensions/ImportWord/index.d.ts +1 -0
- package/lib/extensions/Indent/Indent.d.ts +23 -0
- package/lib/extensions/Indent/components/RichTextIndent.d.ts +1 -0
- package/lib/extensions/Indent/index.d.ts +1 -0
- package/lib/extensions/Italic/Italic.d.ts +6 -0
- package/lib/extensions/Italic/components/RichTextItalic.d.ts +1 -0
- package/lib/extensions/Italic/index.d.ts +1 -0
- package/lib/extensions/Katex/Katex.d.ts +17 -0
- package/lib/extensions/Katex/components/KatexWrapper.d.ts +1 -0
- package/lib/extensions/Katex/components/RichTextKatex.d.ts +1 -0
- package/lib/extensions/Katex/index.d.ts +1 -0
- package/lib/extensions/LineHeight/LineHeight.d.ts +7 -0
- package/lib/extensions/LineHeight/components/RichTextLightHeight.d.ts +1 -0
- package/lib/extensions/LineHeight/index.d.ts +1 -0
- package/lib/extensions/Link/Link.d.ts +6 -0
- package/lib/extensions/Link/components/LinkEditBlock.d.ts +8 -0
- package/lib/extensions/Link/components/LinkViewBlock.d.ts +8 -0
- package/lib/extensions/Link/components/RichTextLink.d.ts +1 -0
- package/lib/extensions/Link/index.d.ts +1 -0
- package/lib/extensions/Mention/Mention.d.ts +1 -0
- package/lib/extensions/Mention/components/NodeViewMentionList.d.ts +10 -0
- package/lib/extensions/Mention/index.d.ts +1 -0
- package/lib/extensions/Mermaid/Mermaid.d.ts +15 -0
- package/lib/extensions/Mermaid/components/EditMermaidBlock.d.ts +8 -0
- package/lib/extensions/Mermaid/components/NodeViewMermaid/NodeViewMermaid.d.ts +1 -0
- package/lib/extensions/Mermaid/components/RichTextMermaid.d.ts +1 -0
- package/lib/extensions/Mermaid/index.d.ts +1 -0
- package/lib/extensions/MoreMark/MoreMark.d.ts +20 -0
- package/lib/extensions/MoreMark/components/RichTextMoreMark.d.ts +14 -0
- package/lib/extensions/MoreMark/index.d.ts +1 -0
- package/lib/extensions/OrderedList/OrderedList.d.ts +6 -0
- package/lib/extensions/OrderedList/components/RichTextOrderedList.d.ts +1 -0
- package/lib/extensions/OrderedList/index.d.ts +1 -0
- package/lib/extensions/SearchAndReplace/SearchAndReplace.d.ts +36 -0
- package/lib/extensions/SearchAndReplace/components/RichTextSearchAndReplace.d.ts +1 -0
- package/lib/extensions/SearchAndReplace/index.d.ts +1 -0
- package/lib/extensions/SlashCommand/SlashCommand.d.ts +4 -0
- package/lib/extensions/SlashCommand/components/SlashCommandList.d.ts +6 -0
- package/lib/extensions/SlashCommand/components/SlashCommandNodeView.d.ts +3 -0
- package/lib/extensions/SlashCommand/index.d.ts +1 -0
- package/lib/extensions/SlashCommand/renderCommandListDefault.d.ts +7 -0
- package/lib/extensions/SlashCommand/types.d.ts +19 -0
- package/lib/extensions/Strike/Strike.d.ts +6 -0
- package/lib/extensions/Strike/components/RichTextStrike.d.ts +1 -0
- package/lib/extensions/Strike/index.d.ts +1 -0
- package/lib/extensions/Table/Table.d.ts +21 -0
- package/lib/extensions/Table/TableCellBackground.d.ts +14 -0
- package/lib/extensions/Table/components/CreateTablePopover.d.ts +7 -0
- package/lib/extensions/Table/components/RichTextTable.d.ts +1 -0
- package/lib/extensions/Table/index.d.ts +1 -0
- package/lib/extensions/TaskList/TaskList.d.ts +11 -0
- package/lib/extensions/TaskList/components/RichTextTaskList.d.ts +1 -0
- package/lib/extensions/TaskList/index.d.ts +1 -0
- package/lib/extensions/TextAlign/TextAlign.d.ts +17 -0
- package/lib/extensions/TextAlign/components/RichTextAlign.d.ts +14 -0
- package/lib/extensions/TextAlign/index.d.ts +1 -0
- package/lib/extensions/TextDirection/TextDirection.d.ts +5 -0
- package/lib/extensions/TextDirection/components/RichTextTextDirection.d.ts +15 -0
- package/lib/extensions/TextDirection/index.d.ts +1 -0
- package/lib/extensions/TextUnderline/TextUnderline.d.ts +6 -0
- package/lib/extensions/TextUnderline/components/RichTextUnderline.d.ts +1 -0
- package/lib/extensions/TextUnderline/index.d.ts +1 -0
- package/lib/extensions/Twitter/Twitter.d.ts +46 -0
- package/lib/extensions/Twitter/components/FormEditLinkTwitter.d.ts +6 -0
- package/lib/extensions/Twitter/components/NodeViewTweet.d.ts +8 -0
- package/lib/extensions/Twitter/components/RichTextTwitter.d.ts +1 -0
- package/lib/extensions/Twitter/index.d.ts +1 -0
- package/lib/extensions/Video/Video.d.ts +66 -0
- package/lib/extensions/Video/components/RichTextVideo.d.ts +1 -0
- package/lib/extensions/Video/index.d.ts +1 -0
- package/lib/extensions/Video/store.d.ts +4 -0
- package/lib/hooks/useActive.d.ts +21 -0
- package/lib/hooks/useAttributes.d.ts +2 -0
- package/lib/hooks/useButtonProps.d.ts +1 -0
- package/lib/hooks/useCopy.d.ts +5 -0
- package/lib/hooks/useExtension.d.ts +1 -0
- package/lib/hooks/useLocalStorage.d.ts +13 -0
- package/lib/index-B0fWAhpK.cjs +1 -0
- package/lib/{icons-Cllpys39.js → index-BQ17A_37.js} +173 -142
- package/lib/{index-Bnmd0WvY.js → index-BeUrdBxf.js} +23 -23
- package/lib/{index-DYkucCoF.js → index-CEbbM7Gx.js} +57 -76
- package/lib/{index-BPfVXs5_.js → index-ClAEwR0V.js} +580 -403
- package/lib/{index-CBce_TWY.js → index-D-FhWysc.js} +1 -1
- package/lib/{index-DzvuNTxo.cjs → index-DCJheRBq.cjs} +1 -1
- package/lib/index-DLqogznp.cjs +54 -0
- package/lib/index-DM3mpxB-.cjs +7 -0
- package/lib/index-DmOTQudI.cjs +1 -0
- package/lib/{index-N--9MohJ.cjs → index-DylewabB.cjs} +1 -1
- package/lib/{index-D-5U8dY8.cjs → index-TMqmkmT6.cjs} +1 -1
- package/lib/index-nFjllrEl.js +7390 -0
- package/lib/{index-D2TUfKkC.js → index-prphFVsp.js} +1 -1
- package/lib/index.cjs +3 -27
- package/lib/index.d.ts +1 -279
- package/lib/index.js +22 -129
- package/lib/input-CadAYBdT.cjs +1 -0
- package/lib/input-U-XBy56K.js +21 -0
- package/lib/{isNumber-ClPupm7P.cjs → isNumber-C2saEiG2.cjs} +1 -1
- package/lib/{isNumber-fpLGS0AZ.js → isNumber-CTm1pIvN.js} +1 -1
- package/lib/label-23SJWQ49.js +19 -0
- package/lib/label-C09fAh5p.cjs +1 -0
- package/lib/lib/utils.d.ts +2 -0
- package/lib/locale-bundle.cjs +1 -1
- package/lib/locale-bundle.d.ts +1 -6722
- package/lib/locale-bundle.js +1 -1
- package/lib/locales/en.d.ts +179 -0
- package/lib/locales/fi.d.ts +179 -0
- package/lib/locales/hu.d.ts +179 -0
- package/lib/{locale-bundle.d.cts → locales/index.d.ts} +5365 -6707
- package/lib/locales/pt-br.d.ts +179 -0
- package/lib/locales/vi.d.ts +179 -0
- package/lib/locales/zh-cn.d.ts +179 -0
- package/lib/plugins/image-upload.d.ts +13 -0
- package/lib/popover-C64cn4Pd.cjs +1 -0
- package/lib/{popover-CAuEW0Mr.js → popover-ydZ2mHXy.js} +7 -6
- package/lib/separator-BoKhvBG9.cjs +1 -0
- package/lib/separator-DqqiRHfY.js +241 -0
- package/lib/store/ProviderUniqueId.d.ts +6 -0
- package/lib/store/commandList.d.ts +2 -0
- package/lib/store/editor.d.ts +21 -0
- package/lib/store/fast-context.d.ts +7 -0
- package/lib/store/store.d.ts +23 -0
- package/lib/store-BPiGnThe.cjs +1 -0
- package/lib/store-Cu0gDf4G.js +10 -0
- package/lib/style.css +1 -1
- package/lib/{tabs-B5mVSN1I.js → tabs-BiYU230B.js} +3 -3
- package/lib/{tabs-BoLCMcCI.cjs → tabs-DebGjFBg.cjs} +1 -1
- package/lib/{textarea-DUUM1jZd.js → textarea--_-Ve3AB.js} +3 -3
- package/lib/textarea-BIkB9h_0.cjs +1 -0
- package/lib/theme/theme.d.ts +364 -0
- package/lib/theme.cjs +1 -0
- package/lib/theme.js +372 -0
- package/lib/{throttle-CdwDrFpn.js → throttle-CGM5M2yG.js} +10 -10
- package/lib/{throttle-qX7Yjtsg.cjs → throttle-DXN-aiH5.cjs} +1 -1
- package/lib/toggle-BWfca8kh.cjs +1 -0
- package/lib/{toggle-Cdp4IT2U.js → toggle-Crvm3Tcn.js} +20 -13
- package/lib/tooltip-9jtsGIcX.cjs +1 -0
- package/lib/tooltip-D_0vo9Xj.js +24 -0
- package/lib/types.d.ts +230 -0
- package/lib/{updatePosition-8Sdem5jb.cjs → updatePosition-C17CDdjq.cjs} +1 -1
- package/lib/{updatePosition-BPmcE0YD.js → updatePosition-DpMKxYdN.js} +1 -1
- package/lib/useButtonProps--5ytUuGi.js +136 -0
- package/lib/useButtonProps-DJ51kDtM.cjs +1 -0
- package/lib/utils/_event.d.ts +13 -0
- package/lib/utils/base64.d.ts +2 -0
- package/lib/utils/color.d.ts +7 -0
- package/lib/utils/columns.d.ts +14 -0
- package/lib/utils/customEvents/customEvents.d.ts +3 -0
- package/lib/utils/customEvents/events.constant.d.ts +9 -0
- package/lib/utils/delete-node.d.ts +2 -0
- package/lib/utils/dom-dataset.d.ts +28 -0
- package/lib/utils/download.d.ts +1 -0
- package/lib/utils/dynamicCSS.d.ts +25 -0
- package/lib/utils/editor-container-size.d.ts +4 -0
- package/lib/utils/file.d.ts +30 -0
- package/lib/utils/getRenderContainer.d.ts +3 -0
- package/lib/utils/indent.d.ts +14 -0
- package/lib/utils/is-mobile.d.ts +19 -0
- package/lib/utils/json.d.ts +2 -0
- package/lib/utils/lru-cache.d.ts +31 -0
- package/lib/utils/mitt.d.ts +21 -0
- package/lib/utils/node.d.ts +15 -0
- package/lib/utils/pdf.d.ts +3 -0
- package/lib/utils/plateform.d.ts +11 -0
- package/lib/utils/shortId.d.ts +1 -0
- package/lib/utils/storage.d.ts +2 -0
- package/lib/utils/updatePosition.d.ts +1 -0
- package/lib/utils/utils.d.ts +20 -0
- package/lib/utils/validateFile.d.ts +16 -0
- package/package.json +155 -169
- package/lib/Attachment.d.cts +0 -351
- package/lib/Attachment.d.ts +0 -351
- package/lib/Blockquote.d.cts +0 -350
- package/lib/Blockquote.d.ts +0 -350
- package/lib/Bold.d.cts +0 -350
- package/lib/Bold.d.ts +0 -350
- package/lib/BulletList.d.cts +0 -350
- package/lib/BulletList.d.ts +0 -350
- package/lib/Clear.d.cts +0 -349
- package/lib/Clear.d.ts +0 -349
- package/lib/Code.d.cts +0 -350
- package/lib/Code.d.ts +0 -350
- package/lib/CodeBlock.d.cts +0 -359
- package/lib/CodeBlock.d.ts +0 -359
- package/lib/CodeView.d.cts +0 -349
- package/lib/CodeView.d.ts +0 -349
- package/lib/Color.d.cts +0 -361
- package/lib/Color.d.ts +0 -361
- package/lib/Column.d.cts +0 -280
- package/lib/Column.d.ts +0 -280
- package/lib/Drawer-SRhwOc6T.cjs +0 -1
- package/lib/Drawer.d.cts +0 -351
- package/lib/Drawer.d.ts +0 -351
- package/lib/Emoji.d.cts +0 -279
- package/lib/Emoji.d.ts +0 -279
- package/lib/Excalidraw-DwBRXEtC.js +0 -345
- package/lib/Excalidraw-ZN3DQvDC.cjs +0 -1
- package/lib/Excalidraw.d.cts +0 -283
- package/lib/Excalidraw.d.ts +0 -283
- package/lib/ExportPdf.d.cts +0 -360
- package/lib/ExportPdf.d.ts +0 -360
- package/lib/ExportWord.d.cts +0 -348
- package/lib/ExportWord.d.ts +0 -348
- package/lib/FontFamily.d.cts +0 -372
- package/lib/FontFamily.d.ts +0 -372
- package/lib/FontSize.d.cts +0 -374
- package/lib/FontSize.d.ts +0 -374
- package/lib/Heading.d.cts +0 -364
- package/lib/Heading.d.ts +0 -364
- package/lib/Highlight.d.cts +0 -359
- package/lib/Highlight.d.ts +0 -359
- package/lib/History.d.cts +0 -352
- package/lib/History.d.ts +0 -352
- package/lib/HorizontalRule.d.cts +0 -350
- package/lib/HorizontalRule.d.ts +0 -350
- package/lib/Iframe-Cvca2G7X.cjs +0 -1
- package/lib/Iframe.d.cts +0 -275
- package/lib/Iframe.d.ts +0 -275
- package/lib/Image.d.cts +0 -384
- package/lib/Image.d.ts +0 -384
- package/lib/ImageGif.d.cts +0 -296
- package/lib/ImageGif.d.ts +0 -296
- package/lib/ImportWord.d.cts +0 -360
- package/lib/ImportWord.d.ts +0 -360
- package/lib/Indent.d.cts +0 -351
- package/lib/Indent.d.ts +0 -351
- package/lib/Italic.d.cts +0 -350
- package/lib/Italic.d.ts +0 -350
- package/lib/Katex-XfrNne6U.cjs +0 -4
- package/lib/Katex.d.cts +0 -284
- package/lib/Katex.d.ts +0 -284
- package/lib/LineHeight.d.cts +0 -350
- package/lib/LineHeight.d.ts +0 -350
- package/lib/Link.d.cts +0 -350
- package/lib/Link.d.ts +0 -350
- package/lib/LinkEditBlock-BZenZq-Z.cjs +0 -5
- package/lib/Mention.d.cts +0 -274
- package/lib/Mention.d.ts +0 -274
- package/lib/Mermaid.d.cts +0 -351
- package/lib/Mermaid.d.ts +0 -351
- package/lib/MoreMark.d.cts +0 -375
- package/lib/MoreMark.d.ts +0 -375
- package/lib/OrderedList.d.cts +0 -350
- package/lib/OrderedList.d.ts +0 -350
- package/lib/SearchAndReplace.d.cts +0 -292
- package/lib/SearchAndReplace.d.ts +0 -292
- package/lib/SlashCommand.d.cts +0 -309
- package/lib/SlashCommand.d.ts +0 -309
- package/lib/Strike.d.cts +0 -350
- package/lib/Strike.d.ts +0 -350
- package/lib/Table-B1j1Ebmh.cjs +0 -9
- package/lib/Table.d.cts +0 -371
- package/lib/Table.d.ts +0 -371
- package/lib/TaskList.d.cts +0 -356
- package/lib/TaskList.d.ts +0 -356
- package/lib/TextAlign.d.cts +0 -373
- package/lib/TextAlign.d.ts +0 -373
- package/lib/TextDirection.d.cts +0 -304
- package/lib/TextDirection.d.ts +0 -304
- package/lib/TextUnderline.d.cts +0 -350
- package/lib/TextUnderline.d.ts +0 -350
- package/lib/Twitter-CtVTIWJW.cjs +0 -1
- package/lib/Twitter.d.cts +0 -300
- package/lib/Twitter.d.ts +0 -300
- package/lib/Video.d.cts +0 -385
- package/lib/Video.d.ts +0 -385
- package/lib/bubble.d.cts +0 -310
- package/lib/button-B12K7BJ4.cjs +0 -1
- package/lib/clsx-C11secjj.cjs +0 -1
- package/lib/clsx-OuTLNxxd.js +0 -16
- package/lib/dialog-CaCS-W5S.cjs +0 -1
- package/lib/dialog-PtQivpHS.js +0 -100
- package/lib/dropdown-menu-CdSm4emp.cjs +0 -1
- package/lib/icons-CqHjeW5T.cjs +0 -1
- package/lib/index-BH4bc3jN.cjs +0 -33
- package/lib/index-DV5kbgRU.cjs +0 -1
- package/lib/index-Dfmm6FTT.cjs +0 -1
- package/lib/index-DnWWK9F_.js +0 -6374
- package/lib/index-DzcKxutn.js +0 -632
- package/lib/index-RfTlOzIr.cjs +0 -22
- package/lib/index.d.cts +0 -279
- package/lib/input-_ECRfn3Y.cjs +0 -1
- package/lib/input-wJ9PDEzZ.js +0 -21
- package/lib/label-BkgAe7IY.cjs +0 -1
- package/lib/label-CGdLYWv7.js +0 -19
- package/lib/popover-BgmUNMHj.cjs +0 -1
- package/lib/separator-CuBW_w98.js +0 -328
- package/lib/separator-DRIrVZ2N.cjs +0 -1
- package/lib/store-DX599H5W.js +0 -10
- package/lib/store-WStcMOiW.cjs +0 -1
- package/lib/switch-CnLJ7Y-b.cjs +0 -1
- package/lib/switch-Coix_FA1.js +0 -27
- package/lib/textarea-B-6zTKQz.cjs +0 -1
- package/lib/theme-B7aAsK_T.js +0 -15
- package/lib/theme-D8_cxGqB.cjs +0 -1
- package/lib/toggle-D41PzQLJ.cjs +0 -1
- package/lib/tooltip-BuEiE96N.cjs +0 -1
- package/lib/tooltip-CopwsU8q.js +0 -23
- package/lib/useButtonProps-BsEd4zYM.js +0 -141
- package/lib/useButtonProps-C6Vpn190.cjs +0 -1
package/lib/Image.js
CHANGED
|
@@ -1,86 +1,65 @@
|
|
|
1
|
-
import { m as
|
|
2
|
-
import { a as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { a as
|
|
19
|
-
import {
|
|
20
|
-
import
|
|
21
|
-
import {
|
|
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
|
|
50
|
-
var O, d,
|
|
51
|
-
const [t, a] =
|
|
52
|
-
width:
|
|
53
|
-
height:
|
|
54
|
-
}), [s, f] =
|
|
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] =
|
|
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] =
|
|
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
|
|
70
|
-
const { src: n, alt: y, width: i, height:
|
|
71
|
-
|
|
72
|
-
const
|
|
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:
|
|
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]),
|
|
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
|
|
74
|
+
function M() {
|
|
96
75
|
const { editor: n, getPos: y } = e;
|
|
97
76
|
n.commands.setNodeSelection(y());
|
|
98
77
|
}
|
|
99
|
-
const
|
|
100
|
-
|
|
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
|
-
},
|
|
85
|
+
}, J),
|
|
107
86
|
[e == null ? void 0 : e.editor]
|
|
108
87
|
);
|
|
109
|
-
function
|
|
88
|
+
function z(n, y) {
|
|
110
89
|
n.preventDefault(), n.stopPropagation();
|
|
111
|
-
const i = s.width,
|
|
112
|
-
let
|
|
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
|
-
|
|
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:
|
|
96
|
+
w: l,
|
|
118
97
|
h: w,
|
|
119
98
|
dir: y
|
|
120
99
|
});
|
|
121
100
|
}
|
|
122
101
|
const A = F(
|
|
123
|
-
|
|
102
|
+
q((n) => {
|
|
124
103
|
if (n.preventDefault(), n.stopPropagation(), !g)
|
|
125
104
|
return;
|
|
126
|
-
const { x: y, w: i, dir:
|
|
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:
|
|
107
|
+
width: l,
|
|
129
108
|
height: null
|
|
130
109
|
});
|
|
131
|
-
},
|
|
132
|
-
[g,
|
|
110
|
+
}, J),
|
|
111
|
+
[g, m, t, e.updateAttributes]
|
|
133
112
|
), p = F(
|
|
134
113
|
(n) => {
|
|
135
|
-
n.preventDefault(), n.stopPropagation(), g && (
|
|
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),
|
|
120
|
+
}), v(!1), M());
|
|
142
121
|
},
|
|
143
|
-
[g,
|
|
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(() =>
|
|
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__ */
|
|
156
|
-
|
|
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: ((
|
|
166
|
-
..._ ? {} :
|
|
144
|
+
width: ((N = S.style) == null ? void 0 : N.width) ?? "auto",
|
|
145
|
+
..._ ? {} : k
|
|
167
146
|
},
|
|
168
|
-
children: /* @__PURE__ */
|
|
147
|
+
children: /* @__PURE__ */ b(
|
|
169
148
|
"div",
|
|
170
149
|
{
|
|
171
150
|
"data-drag-handle": !0,
|
|
172
151
|
draggable: "true",
|
|
173
|
-
style:
|
|
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__ */
|
|
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:
|
|
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__ */
|
|
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) =>
|
|
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
|
|
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
|
|
220
|
-
return g == null ? void 0 : g.startsWith(
|
|
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
|
|
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((
|
|
228
|
-
if (!
|
|
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:
|
|
232
|
-
file:
|
|
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:
|
|
214
|
+
title: f("editor.upload.fileTypeNotSupported", { fileName: m.name })
|
|
236
215
|
});
|
|
237
216
|
return;
|
|
238
217
|
}
|
|
239
|
-
if (
|
|
240
|
-
const
|
|
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:
|
|
244
|
-
file:
|
|
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:
|
|
226
|
+
title: f("editor.upload.fileSizeTooBig", { fileName: m.name, size: x })
|
|
248
227
|
});
|
|
249
228
|
return;
|
|
250
229
|
}
|
|
251
|
-
g.push(
|
|
230
|
+
g.push(m);
|
|
252
231
|
}), g;
|
|
253
232
|
}
|
|
254
|
-
function
|
|
233
|
+
function Ue({ editor: e, imageInline: t, onClose: a, disabled: s, alt: f }) {
|
|
255
234
|
var n, y;
|
|
256
|
-
const { t: u } =
|
|
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 =
|
|
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
|
|
263
|
-
R(
|
|
241
|
+
const r = U(T.current, i);
|
|
242
|
+
R(r);
|
|
264
243
|
}
|
|
265
244
|
}
|
|
266
|
-
function U(i,
|
|
267
|
-
const
|
|
268
|
-
|
|
269
|
-
const I =
|
|
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
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
251
|
+
r.x * l,
|
|
252
|
+
r.y * w,
|
|
253
|
+
r.width * l,
|
|
254
|
+
r.height * w,
|
|
276
255
|
0,
|
|
277
256
|
0,
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
)),
|
|
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 (!
|
|
263
|
+
if (!x) {
|
|
285
264
|
C(!0);
|
|
286
265
|
try {
|
|
287
|
-
const
|
|
288
|
-
let
|
|
289
|
-
p.upload ?
|
|
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
|
-
}),
|
|
293
|
-
} catch (
|
|
294
|
-
console.log("Error cropping image",
|
|
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
|
-
}, [
|
|
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
|
|
302
|
-
i.preventDefault(), (
|
|
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
|
|
307
|
-
if (!e || e.isDestroyed ||
|
|
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
|
|
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 (
|
|
297
|
+
if (h.length <= 0) {
|
|
319
298
|
i.target.value = "";
|
|
320
299
|
return;
|
|
321
300
|
}
|
|
322
|
-
const
|
|
323
|
-
|
|
301
|
+
const l = h[0], w = await Te(l);
|
|
302
|
+
m(!0), z({
|
|
324
303
|
src: w.src,
|
|
325
|
-
file:
|
|
304
|
+
file: l
|
|
326
305
|
});
|
|
327
|
-
},
|
|
328
|
-
|
|
306
|
+
}, N = () => {
|
|
307
|
+
M.current && (M.current.value = "");
|
|
329
308
|
};
|
|
330
|
-
return /* @__PURE__ */
|
|
331
|
-
/* @__PURE__ */
|
|
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__ */
|
|
342
|
-
|
|
320
|
+
/* @__PURE__ */ b(
|
|
321
|
+
re,
|
|
343
322
|
{
|
|
344
323
|
open: v,
|
|
345
324
|
onOpenChange: (i) => {
|
|
346
|
-
|
|
325
|
+
m(i), i || (z({ src: "", file: null }), N());
|
|
347
326
|
},
|
|
348
327
|
children: [
|
|
349
|
-
/* @__PURE__ */
|
|
350
|
-
/* @__PURE__ */
|
|
351
|
-
/* @__PURE__ */
|
|
352
|
-
/* @__PURE__ */
|
|
353
|
-
|
|
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__ */
|
|
338
|
+
children: /* @__PURE__ */ o(
|
|
360
339
|
"img",
|
|
361
340
|
{
|
|
362
341
|
alt: "Crop me",
|
|
363
342
|
ref: T,
|
|
364
|
-
src:
|
|
343
|
+
src: E.src
|
|
365
344
|
}
|
|
366
345
|
)
|
|
367
346
|
}
|
|
368
347
|
) }),
|
|
369
|
-
/* @__PURE__ */
|
|
370
|
-
/* @__PURE__ */
|
|
348
|
+
/* @__PURE__ */ b(we, { children: [
|
|
349
|
+
/* @__PURE__ */ b(
|
|
371
350
|
B,
|
|
372
351
|
{
|
|
373
|
-
disabled:
|
|
352
|
+
disabled: x,
|
|
374
353
|
onClick: () => {
|
|
375
|
-
|
|
354
|
+
m(!1), z({
|
|
376
355
|
src: "",
|
|
377
356
|
file: null
|
|
378
|
-
}),
|
|
357
|
+
}), N();
|
|
379
358
|
},
|
|
380
359
|
children: [
|
|
381
360
|
u("editor.imageUpload.cancel"),
|
|
382
|
-
/* @__PURE__ */
|
|
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__ */
|
|
371
|
+
/* @__PURE__ */ o(
|
|
393
372
|
B,
|
|
394
373
|
{
|
|
395
374
|
className: "richtext-w-fit",
|
|
396
|
-
disabled:
|
|
375
|
+
disabled: x || !_,
|
|
397
376
|
onClick: D,
|
|
398
|
-
children:
|
|
377
|
+
children: x ? /* @__PURE__ */ b(H, { children: [
|
|
399
378
|
u("editor.imageUpload.uploading"),
|
|
400
|
-
/* @__PURE__ */
|
|
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__ */
|
|
386
|
+
] }) : /* @__PURE__ */ b(H, { children: [
|
|
408
387
|
u("editor.imageUpload.crop"),
|
|
409
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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:
|
|
409
|
+
ref: M,
|
|
431
410
|
style: { display: "none" },
|
|
432
411
|
type: "file"
|
|
433
412
|
}
|
|
434
413
|
)
|
|
435
414
|
] });
|
|
436
415
|
}
|
|
437
|
-
function
|
|
438
|
-
const { t: e } =
|
|
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 } =
|
|
442
|
-
|
|
443
|
-
}, [S,
|
|
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 =
|
|
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
|
|
453
|
-
if (!a || a.isDestroyed ||
|
|
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 =
|
|
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 (
|
|
472
|
-
let
|
|
473
|
-
return c.upload ?
|
|
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((
|
|
476
|
-
a.chain().focus().setImageInline({ src:
|
|
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
|
|
481
|
-
c.upload ?
|
|
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
|
-
|
|
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(),
|
|
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
|
|
501
|
-
d.preventDefault(), (
|
|
479
|
+
var N;
|
|
480
|
+
d.preventDefault(), (N = E.current) == null || N.click();
|
|
502
481
|
}
|
|
503
|
-
return s ? /* @__PURE__ */
|
|
504
|
-
|
|
482
|
+
return s ? /* @__PURE__ */ b(
|
|
483
|
+
re,
|
|
505
484
|
{
|
|
506
|
-
onOpenChange:
|
|
485
|
+
onOpenChange: m,
|
|
507
486
|
open: v,
|
|
508
487
|
children: [
|
|
509
|
-
/* @__PURE__ */
|
|
510
|
-
|
|
488
|
+
/* @__PURE__ */ o(
|
|
489
|
+
le,
|
|
511
490
|
{
|
|
512
491
|
asChild: !0,
|
|
513
|
-
children: /* @__PURE__ */
|
|
514
|
-
|
|
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 ||
|
|
499
|
+
g || m(!0);
|
|
521
500
|
}
|
|
522
501
|
}
|
|
523
502
|
)
|
|
524
503
|
}
|
|
525
504
|
),
|
|
526
|
-
/* @__PURE__ */
|
|
527
|
-
/* @__PURE__ */
|
|
528
|
-
/* @__PURE__ */
|
|
529
|
-
|
|
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__ */
|
|
535
|
-
/* @__PURE__ */
|
|
536
|
-
/* @__PURE__ */
|
|
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__ */
|
|
539
|
-
/* @__PURE__ */
|
|
540
|
-
|
|
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__ */
|
|
527
|
+
/* @__PURE__ */ o(te, { children: e("editor.link.dialog.inline") })
|
|
549
528
|
] }),
|
|
550
|
-
c.enableAlt && /* @__PURE__ */
|
|
551
|
-
/* @__PURE__ */
|
|
552
|
-
/* @__PURE__ */
|
|
553
|
-
|
|
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) =>
|
|
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__ */
|
|
563
|
-
/* @__PURE__ */
|
|
564
|
-
/* @__PURE__ */
|
|
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:
|
|
547
|
+
disabled: x,
|
|
569
548
|
onClick: O,
|
|
570
549
|
size: "sm",
|
|
571
|
-
children:
|
|
550
|
+
children: x ? /* @__PURE__ */ b(H, { children: [
|
|
572
551
|
e("editor.imageUpload.uploading"),
|
|
573
|
-
/* @__PURE__ */
|
|
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__ */
|
|
584
|
-
|
|
562
|
+
/* @__PURE__ */ o(
|
|
563
|
+
Ue,
|
|
585
564
|
{
|
|
586
565
|
alt: R,
|
|
587
|
-
disabled:
|
|
566
|
+
disabled: x,
|
|
588
567
|
editor: a,
|
|
589
568
|
imageInline: A,
|
|
590
569
|
onClose: () => {
|
|
591
|
-
|
|
570
|
+
Me.setOpen(a.id, !1), M("");
|
|
592
571
|
}
|
|
593
572
|
}
|
|
594
573
|
)
|
|
595
574
|
] }),
|
|
596
|
-
/* @__PURE__ */
|
|
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:
|
|
581
|
+
ref: E,
|
|
603
582
|
style: { display: "none" },
|
|
604
583
|
type: "file"
|
|
605
584
|
}
|
|
606
585
|
)
|
|
607
586
|
] }),
|
|
608
|
-
/* @__PURE__ */
|
|
609
|
-
/* @__PURE__ */
|
|
610
|
-
|
|
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) =>
|
|
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__ */
|
|
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__ */
|
|
607
|
+
) : /* @__PURE__ */ o(H, {});
|
|
629
608
|
}
|
|
630
|
-
const
|
|
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
|
-
},
|
|
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
|
-
...
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
849
|
-
|
|
827
|
+
G as Image,
|
|
828
|
+
rt as RichTextImage
|
|
850
829
|
};
|