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.
- 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 +20 -20
- 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 +30 -30
- 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 +29 -29
- package/lib/ImportWord.js +568 -568
- 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/Column.d.cts
DELETED
|
@@ -1,280 +0,0 @@
|
|
|
1
|
-
import { Extension } from '@tiptap/core';
|
|
2
|
-
import { JSX } from 'react/jsx-runtime';
|
|
3
|
-
import { Node as Node_2 } from '@tiptap/core';
|
|
4
|
-
|
|
5
|
-
export declare const Column: Extension<any, any>;
|
|
6
|
-
|
|
7
|
-
export declare const ColumnNode: Node_2<any, any>;
|
|
8
|
-
|
|
9
|
-
export declare const MultipleColumnNode: Node_2<any, any>;
|
|
10
|
-
|
|
11
|
-
export declare function RichTextColumn(): JSX.Element;
|
|
12
|
-
|
|
13
|
-
export { }
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
declare module '@tiptap/core' {
|
|
17
|
-
interface Commands<ReturnType> {
|
|
18
|
-
attachment: {
|
|
19
|
-
setAttachment: (attrs?: unknown) => ReturnType;
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
declare module '@tiptap/core' {
|
|
26
|
-
interface Commands<ReturnType> {
|
|
27
|
-
setCodeBlock: {
|
|
28
|
-
setCodeBlock: (options?: any) => ReturnType;
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
declare module '@tiptap/core' {
|
|
35
|
-
interface Commands<ReturnType> {
|
|
36
|
-
codeView: {
|
|
37
|
-
/**
|
|
38
|
-
* Toggle code view mode
|
|
39
|
-
*/
|
|
40
|
-
toggleCodeView: () => ReturnType;
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
declare module '@tiptap/core' {
|
|
47
|
-
interface Storage {
|
|
48
|
-
color: ColorStorage;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
declare module '@tiptap/core' {
|
|
54
|
-
interface Commands<ReturnType> {
|
|
55
|
-
columns: {
|
|
56
|
-
insertColumns: (attrs?: {
|
|
57
|
-
cols: number;
|
|
58
|
-
}) => ReturnType;
|
|
59
|
-
addColBefore: () => ReturnType;
|
|
60
|
-
addColAfter: () => ReturnType;
|
|
61
|
-
deleteCol: () => ReturnType;
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
declare module '@tiptap/core' {
|
|
68
|
-
interface Commands<ReturnType> {
|
|
69
|
-
drawer: {
|
|
70
|
-
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
71
|
-
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
declare module '@tiptap/core' {
|
|
78
|
-
interface Commands<ReturnType> {
|
|
79
|
-
exportPdf: {
|
|
80
|
-
exportToPdf: () => ReturnType;
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
declare module '@tiptap/core' {
|
|
87
|
-
interface Commands<ReturnType> {
|
|
88
|
-
exportWord: {
|
|
89
|
-
exportToWord: (docState: any) => ReturnType;
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
declare module '@tiptap/core' {
|
|
96
|
-
interface Commands<ReturnType> {
|
|
97
|
-
excalidraw: {
|
|
98
|
-
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
declare module '@tiptap/core' {
|
|
105
|
-
interface Commands<ReturnType> {
|
|
106
|
-
fontSize: {
|
|
107
|
-
/**
|
|
108
|
-
* Set the text font size. ex: "12px", "2em", or "small". Must be a valid
|
|
109
|
-
* CSS font-size
|
|
110
|
-
* (https://developer.mozilla.org/en-US/docs/Web/CSS/font-size).
|
|
111
|
-
*/
|
|
112
|
-
setFontSize: (fontSize: string) => ReturnType;
|
|
113
|
-
/**
|
|
114
|
-
* Unset the font size
|
|
115
|
-
*/
|
|
116
|
-
unsetFontSize: () => ReturnType;
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
declare module '@tiptap/core' {
|
|
123
|
-
interface Storage {
|
|
124
|
-
highlight: HighlightStorage;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
declare module '@tiptap/core' {
|
|
130
|
-
interface Commands<ReturnType> {
|
|
131
|
-
iframe: {
|
|
132
|
-
/**
|
|
133
|
-
* Add an iframe
|
|
134
|
-
*/
|
|
135
|
-
setIframe: (options: {
|
|
136
|
-
src: string;
|
|
137
|
-
service: string;
|
|
138
|
-
}) => ReturnType;
|
|
139
|
-
};
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
declare module '@tiptap/core' {
|
|
145
|
-
interface Commands<ReturnType> {
|
|
146
|
-
imageUpload: {
|
|
147
|
-
/**
|
|
148
|
-
* Add an image
|
|
149
|
-
*/
|
|
150
|
-
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
151
|
-
/**
|
|
152
|
-
* Update an image
|
|
153
|
-
*/
|
|
154
|
-
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
155
|
-
/**
|
|
156
|
-
* Set image alignment
|
|
157
|
-
*/
|
|
158
|
-
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
declare module '@tiptap/core' {
|
|
165
|
-
interface Commands<ReturnType> {
|
|
166
|
-
imageGifUpload: {
|
|
167
|
-
/**
|
|
168
|
-
* Add an image gif
|
|
169
|
-
*/
|
|
170
|
-
setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
171
|
-
/**
|
|
172
|
-
* Update an image gif
|
|
173
|
-
*/
|
|
174
|
-
updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
175
|
-
/**
|
|
176
|
-
* Set image alignment
|
|
177
|
-
*/
|
|
178
|
-
setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
declare module '@tiptap/core' {
|
|
185
|
-
interface Commands<ReturnType> {
|
|
186
|
-
indent: {
|
|
187
|
-
/**
|
|
188
|
-
* Set the indent attribute
|
|
189
|
-
*/
|
|
190
|
-
indent: () => ReturnType;
|
|
191
|
-
/**
|
|
192
|
-
* Set the outdent attribute
|
|
193
|
-
*/
|
|
194
|
-
outdent: () => ReturnType;
|
|
195
|
-
};
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
declare module '@tiptap/core' {
|
|
201
|
-
interface Commands<ReturnType> {
|
|
202
|
-
katex: {
|
|
203
|
-
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
204
|
-
};
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
declare module '@tiptap/core' {
|
|
210
|
-
interface Commands<ReturnType> {
|
|
211
|
-
mermaid: {
|
|
212
|
-
setMermaid: (options: any, replace?: any) => ReturnType;
|
|
213
|
-
setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
214
|
-
};
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
declare module '@tiptap/core' {
|
|
220
|
-
interface Commands<ReturnType> {
|
|
221
|
-
search: {
|
|
222
|
-
setSearchTerm: (searchTerm: string) => ReturnType;
|
|
223
|
-
setReplaceTerm: (replaceTerm: string) => ReturnType;
|
|
224
|
-
setCaseSensitive: (caseSensitive: boolean) => ReturnType;
|
|
225
|
-
resetIndex: () => ReturnType;
|
|
226
|
-
nextSearchResult: () => ReturnType;
|
|
227
|
-
previousSearchResult: () => ReturnType;
|
|
228
|
-
replace: () => ReturnType;
|
|
229
|
-
replaceAll: () => ReturnType;
|
|
230
|
-
};
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
declare module '@tiptap/core' {
|
|
236
|
-
interface Storage {
|
|
237
|
-
searchAndReplace: SearchAndReplaceStorage;
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
declare module '@tiptap/core' {
|
|
243
|
-
interface Commands<ReturnType> {
|
|
244
|
-
twitter: {
|
|
245
|
-
/**
|
|
246
|
-
* Insert a tweet
|
|
247
|
-
* @param options The tweet attributes
|
|
248
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
249
|
-
*/
|
|
250
|
-
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
251
|
-
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
252
|
-
};
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
declare module '@tiptap/core' {
|
|
258
|
-
interface Commands<ReturnType> {
|
|
259
|
-
video: {
|
|
260
|
-
/**
|
|
261
|
-
* Add an video
|
|
262
|
-
*/
|
|
263
|
-
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
264
|
-
/**
|
|
265
|
-
* Update an video
|
|
266
|
-
*/
|
|
267
|
-
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
268
|
-
};
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
declare module '@tiptap/core' {
|
|
274
|
-
interface Commands<ReturnType> {
|
|
275
|
-
tableCellBackground: {
|
|
276
|
-
setTableCellBackground: (color: string) => ReturnType;
|
|
277
|
-
unsetTableCellBackground: () => ReturnType;
|
|
278
|
-
};
|
|
279
|
-
}
|
|
280
|
-
}
|
package/lib/Column.d.ts
DELETED
|
@@ -1,280 +0,0 @@
|
|
|
1
|
-
import { Extension } from '@tiptap/core';
|
|
2
|
-
import { JSX } from 'react/jsx-runtime';
|
|
3
|
-
import { Node as Node_2 } from '@tiptap/core';
|
|
4
|
-
|
|
5
|
-
export declare const Column: Extension<any, any>;
|
|
6
|
-
|
|
7
|
-
export declare const ColumnNode: Node_2<any, any>;
|
|
8
|
-
|
|
9
|
-
export declare const MultipleColumnNode: Node_2<any, any>;
|
|
10
|
-
|
|
11
|
-
export declare function RichTextColumn(): JSX.Element;
|
|
12
|
-
|
|
13
|
-
export { }
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
declare module '@tiptap/core' {
|
|
17
|
-
interface Commands<ReturnType> {
|
|
18
|
-
attachment: {
|
|
19
|
-
setAttachment: (attrs?: unknown) => ReturnType;
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
declare module '@tiptap/core' {
|
|
26
|
-
interface Commands<ReturnType> {
|
|
27
|
-
setCodeBlock: {
|
|
28
|
-
setCodeBlock: (options?: any) => ReturnType;
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
declare module '@tiptap/core' {
|
|
35
|
-
interface Commands<ReturnType> {
|
|
36
|
-
codeView: {
|
|
37
|
-
/**
|
|
38
|
-
* Toggle code view mode
|
|
39
|
-
*/
|
|
40
|
-
toggleCodeView: () => ReturnType;
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
declare module '@tiptap/core' {
|
|
47
|
-
interface Storage {
|
|
48
|
-
color: ColorStorage;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
declare module '@tiptap/core' {
|
|
54
|
-
interface Commands<ReturnType> {
|
|
55
|
-
columns: {
|
|
56
|
-
insertColumns: (attrs?: {
|
|
57
|
-
cols: number;
|
|
58
|
-
}) => ReturnType;
|
|
59
|
-
addColBefore: () => ReturnType;
|
|
60
|
-
addColAfter: () => ReturnType;
|
|
61
|
-
deleteCol: () => ReturnType;
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
declare module '@tiptap/core' {
|
|
68
|
-
interface Commands<ReturnType> {
|
|
69
|
-
drawer: {
|
|
70
|
-
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
71
|
-
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
declare module '@tiptap/core' {
|
|
78
|
-
interface Commands<ReturnType> {
|
|
79
|
-
exportPdf: {
|
|
80
|
-
exportToPdf: () => ReturnType;
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
declare module '@tiptap/core' {
|
|
87
|
-
interface Commands<ReturnType> {
|
|
88
|
-
exportWord: {
|
|
89
|
-
exportToWord: (docState: any) => ReturnType;
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
declare module '@tiptap/core' {
|
|
96
|
-
interface Commands<ReturnType> {
|
|
97
|
-
excalidraw: {
|
|
98
|
-
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
declare module '@tiptap/core' {
|
|
105
|
-
interface Commands<ReturnType> {
|
|
106
|
-
fontSize: {
|
|
107
|
-
/**
|
|
108
|
-
* Set the text font size. ex: "12px", "2em", or "small". Must be a valid
|
|
109
|
-
* CSS font-size
|
|
110
|
-
* (https://developer.mozilla.org/en-US/docs/Web/CSS/font-size).
|
|
111
|
-
*/
|
|
112
|
-
setFontSize: (fontSize: string) => ReturnType;
|
|
113
|
-
/**
|
|
114
|
-
* Unset the font size
|
|
115
|
-
*/
|
|
116
|
-
unsetFontSize: () => ReturnType;
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
declare module '@tiptap/core' {
|
|
123
|
-
interface Storage {
|
|
124
|
-
highlight: HighlightStorage;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
declare module '@tiptap/core' {
|
|
130
|
-
interface Commands<ReturnType> {
|
|
131
|
-
iframe: {
|
|
132
|
-
/**
|
|
133
|
-
* Add an iframe
|
|
134
|
-
*/
|
|
135
|
-
setIframe: (options: {
|
|
136
|
-
src: string;
|
|
137
|
-
service: string;
|
|
138
|
-
}) => ReturnType;
|
|
139
|
-
};
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
declare module '@tiptap/core' {
|
|
145
|
-
interface Commands<ReturnType> {
|
|
146
|
-
imageUpload: {
|
|
147
|
-
/**
|
|
148
|
-
* Add an image
|
|
149
|
-
*/
|
|
150
|
-
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
151
|
-
/**
|
|
152
|
-
* Update an image
|
|
153
|
-
*/
|
|
154
|
-
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
155
|
-
/**
|
|
156
|
-
* Set image alignment
|
|
157
|
-
*/
|
|
158
|
-
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
declare module '@tiptap/core' {
|
|
165
|
-
interface Commands<ReturnType> {
|
|
166
|
-
imageGifUpload: {
|
|
167
|
-
/**
|
|
168
|
-
* Add an image gif
|
|
169
|
-
*/
|
|
170
|
-
setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
171
|
-
/**
|
|
172
|
-
* Update an image gif
|
|
173
|
-
*/
|
|
174
|
-
updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
175
|
-
/**
|
|
176
|
-
* Set image alignment
|
|
177
|
-
*/
|
|
178
|
-
setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
declare module '@tiptap/core' {
|
|
185
|
-
interface Commands<ReturnType> {
|
|
186
|
-
indent: {
|
|
187
|
-
/**
|
|
188
|
-
* Set the indent attribute
|
|
189
|
-
*/
|
|
190
|
-
indent: () => ReturnType;
|
|
191
|
-
/**
|
|
192
|
-
* Set the outdent attribute
|
|
193
|
-
*/
|
|
194
|
-
outdent: () => ReturnType;
|
|
195
|
-
};
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
declare module '@tiptap/core' {
|
|
201
|
-
interface Commands<ReturnType> {
|
|
202
|
-
katex: {
|
|
203
|
-
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
204
|
-
};
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
declare module '@tiptap/core' {
|
|
210
|
-
interface Commands<ReturnType> {
|
|
211
|
-
mermaid: {
|
|
212
|
-
setMermaid: (options: any, replace?: any) => ReturnType;
|
|
213
|
-
setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
214
|
-
};
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
declare module '@tiptap/core' {
|
|
220
|
-
interface Commands<ReturnType> {
|
|
221
|
-
search: {
|
|
222
|
-
setSearchTerm: (searchTerm: string) => ReturnType;
|
|
223
|
-
setReplaceTerm: (replaceTerm: string) => ReturnType;
|
|
224
|
-
setCaseSensitive: (caseSensitive: boolean) => ReturnType;
|
|
225
|
-
resetIndex: () => ReturnType;
|
|
226
|
-
nextSearchResult: () => ReturnType;
|
|
227
|
-
previousSearchResult: () => ReturnType;
|
|
228
|
-
replace: () => ReturnType;
|
|
229
|
-
replaceAll: () => ReturnType;
|
|
230
|
-
};
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
declare module '@tiptap/core' {
|
|
236
|
-
interface Storage {
|
|
237
|
-
searchAndReplace: SearchAndReplaceStorage;
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
declare module '@tiptap/core' {
|
|
243
|
-
interface Commands<ReturnType> {
|
|
244
|
-
twitter: {
|
|
245
|
-
/**
|
|
246
|
-
* Insert a tweet
|
|
247
|
-
* @param options The tweet attributes
|
|
248
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
249
|
-
*/
|
|
250
|
-
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
251
|
-
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
252
|
-
};
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
declare module '@tiptap/core' {
|
|
258
|
-
interface Commands<ReturnType> {
|
|
259
|
-
video: {
|
|
260
|
-
/**
|
|
261
|
-
* Add an video
|
|
262
|
-
*/
|
|
263
|
-
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
264
|
-
/**
|
|
265
|
-
* Update an video
|
|
266
|
-
*/
|
|
267
|
-
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
268
|
-
};
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
declare module '@tiptap/core' {
|
|
274
|
-
interface Commands<ReturnType> {
|
|
275
|
-
tableCellBackground: {
|
|
276
|
-
setTableCellBackground: (color: string) => ReturnType;
|
|
277
|
-
unsetTableCellBackground: () => ReturnType;
|
|
278
|
-
};
|
|
279
|
-
}
|
|
280
|
-
}
|
package/lib/Drawer-SRhwOc6T.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const O=require("./index-RfTlOzIr.cjs"),V=require("./throttle-qX7Yjtsg.cjs"),K=require("./index-BH4bc3jN.cjs"),e=require("react/jsx-runtime"),m=require("react"),B=require("./index-Dfmm6FTT.cjs"),G=require("./useButtonProps-C6Vpn190.cjs"),d=require("easydrawer"),Z=require("./shortId-Bfj8TyNr.cjs"),ee=require("./toggle-D41PzQLJ.cjs"),P=require("./dialog-CaCS-W5S.cjs"),g=require("./index-DV5kbgRU.cjs"),te=require("./file-i7e4nQY2.cjs"),re=require("./button-B12K7BJ4.cjs"),D={TOP_LEFT:"tl",TOP_RIGHT:"tr",BOTTOM_LEFT:"bl",BOTTOM_RIGHT:"br"};function oe({editor:t,node:r,updateAttributes:o,getPos:s,selected:f}){const[M,H]=m.useState({width:B.IMAGE_MAX_SIZE,height:B.IMAGE_MAX_SIZE}),[w,h]=m.useState({width:0,height:0}),[L]=m.useState([D.TOP_LEFT,D.TOP_RIGHT,D.BOTTOM_LEFT,D.BOTTOM_RIGHT]),[j,_]=m.useState(!1),[a,c]=m.useState({x:0,y:0,w:0,h:0,dir:""}),{align:T}=r==null?void 0:r.attrs,C=m.useMemo(()=>{const{src:u,alt:y,width:S,height:N}=r==null?void 0:r.attrs,z=O.isNumber(S)?`${S}px`:S,v=O.isNumber(N)?`${N}px`:N;return{src:u||void 0,alt:y||void 0,style:{width:z||void 0,height:v||void 0}}},[r==null?void 0:r.attrs]),n=m.useMemo(()=>{const{style:{width:u}}=C;return{width:u==="100%"?u:void 0}},[C]);function W(u){h({width:u.target.width,height:u.target.height})}function A(){t.commands.setNodeSelection(s())}const I=m.useCallback(V.throttle(()=>{const{width:u}=getComputedStyle(t.view.dom);H(y=>({...y,width:Number.parseInt(u,10)}))},B.IMAGE_THROTTLE_WAIT_TIME),[t]);function F(u,y){u.preventDefault(),u.stopPropagation();const S=w.width,N=w.height,z=S/N;let v=Number(r.attrs.width),E=Number(r.attrs.height);const b=M.width;v&&!E?(v=v>b?b:v,E=Math.round(v/z)):E&&!v?(v=Math.round(E*z),v=v>b?b:v):!v&&!E?(v=S>b?b:S,E=Math.round(v/z)):v=v>b?b:v,_(!0),c({x:u.clientX,y:u.clientY,w:v,h:E,dir:y})}const x=m.useCallback(V.throttle(u=>{if(u.preventDefault(),u.stopPropagation(),!j)return;const{x:y,w:S,dir:N}=a,z=(u.clientX-y)*(/l/.test(N)?-1:1),{width:v,height:E}=r==null?void 0:r.attrs,b=v/E,U=G.clamp(S+z,B.IMAGE_MIN_SIZE,M.width),J=Math.round(U/b);o({width:U,height:J})},B.IMAGE_THROTTLE_WAIT_TIME),[j,a,M,o,r==null?void 0:r.attrs]),i=m.useCallback(u=>{u.preventDefault(),u.stopPropagation(),j&&(c({x:0,y:0,w:0,h:0,dir:""}),_(!1),A())},[j,A]),p=m.useCallback(()=>{document==null||document.addEventListener("mousemove",x,!0),document==null||document.addEventListener("mouseup",i,!0)},[x,i]),k=m.useCallback(()=>{document==null||document.removeEventListener("mousemove",x,!0),document==null||document.removeEventListener("mouseup",i,!0)},[x,i]);m.useEffect(()=>(j?p():k(),()=>{k()}),[j,p,k]);const q=m.useMemo(()=>new ResizeObserver(()=>I()),[I]);return m.useEffect(()=>(q.observe(t.view.dom),()=>{q.disconnect()}),[t.view.dom,q]),e.jsx(K.NodeViewWrapper,{className:"image-view",style:{...n,width:"100%",textAlign:T},children:e.jsxs("div",{"data-drag-handle":!0,draggable:"true",style:{...n,background:"#fff"},className:`image-view__body ${f?"image-view__body--focused":""} ${j?"image-view__body--resizing":""}`,children:[e.jsx("img",{alt:C.alt,className:"image-view__body__image block",height:"auto",onClick:A,onLoad:W,src:C.src,style:C.style}),t.view.editable&&(f||j)&&e.jsx("div",{className:"image-resizer",children:L==null?void 0:L.map(u=>e.jsx("span",{className:`image-resizer__handler image-resizer__handler--${u}`,onMouseDown:y=>F(y,u)},`image-dir-${u}`))})]})})}const le="_wrapper_rraz2_1",ne="_tool_rraz2_17",se="_active_rraz2_37",ie="_pen_rraz2_41",ae="_line_rraz2_48",ce="_options_rraz2_56",he="_colorWrap_rraz2_66",ue="_color_rraz2_66",de="_colorActive_rraz2_83",l={wrapper:le,tool:ne,active:se,pen:ie,line:ae,options:ce,colorWrap:he,color:ue,colorActive:de};function ge(t){return e.jsx("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{color:"currentColor",d:"M2 9.2v3.6M12.8 2H9.2M7.5 20H9M20 7.5V9M2.133 4.699c.155-.727.415-1.274.854-1.712c.426-.426.954-.684 1.652-.84m15.228 2.552c-.155-.727-.415-1.274-.854-1.712c-.417-.417-.932-.673-1.608-.83M4.64 19.853c-.698-.156-1.226-.414-1.652-.84c-.43-.43-.69-.965-.845-1.673m11.638 3.626c-1.812.125-3.607-8.326-2.374-9.559s9.684.561 9.559 2.373c-.087 1.187-2.095 1.656-2.037 2.711c.018.309.408.59 1.188 1.154c.543.39 1.096.77 1.629 1.175a.66.66 0 0 1 .234.687a3.35 3.35 0 0 1-2.472 2.473a.66.66 0 0 1-.688-.235c-.404-.533-.784-1.086-1.175-1.628c-.563-.78-.844-1.17-1.153-1.188c-1.055-.059-1.524 1.95-2.71 2.037",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})})}function me(t){return e.jsx("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{d:"M20.06 18a4 4 0 0 1-.2-.89c-.67.7-1.48 1.05-2.41 1.05c-.83 0-1.52-.24-2.05-.71c-.53-.45-.8-1.06-.8-1.79c0-.88.33-1.56 1-2.05s1.61-.73 2.83-.73h1.4v-.64q0-.735-.45-1.17c-.3-.29-.75-.43-1.33-.43c-.52 0-.95.12-1.3.36c-.35.25-.52.54-.52.89h-1.46c0-.43.15-.84.45-1.24c.28-.4.71-.71 1.22-.94c.51-.21 1.06-.35 1.69-.35c.98 0 1.74.24 2.29.73s.84 1.16.86 2.02V16c0 .8.1 1.42.3 1.88V18zm-2.4-1.12c.45 0 .88-.11 1.29-.32c.4-.21.7-.49.88-.83v-1.57H18.7c-1.77 0-2.66.47-2.66 1.41c0 .43.15.73.46.96c.3.23.68.35 1.16.35m-12.2-3.17h4.07L7.5 8.29zM6.64 6h1.72l4.71 12h-1.93l-.97-2.57H4.82L3.86 18H1.93z",fill:"currentColor"})})}function xe(t){return e.jsx("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{d:"M3 21v-4.25L16.2 3.575q.3-.275.663-.425t.762-.15t.775.15t.65.45L20.425 5q.3.275.438.65T21 6.4q0 .4-.137.763t-.438.662L7.25 21zM17.6 7.8L19 6.4L17.6 5l-1.4 1.4z",fill:"currentColor"})})}function pe(t){return e.jsx("svg",{height:"1em",viewBox:"0 0 256 256",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{d:"M253.66 106.34a8 8 0 0 0-11.32 0L192 156.69L107.31 72l50.35-50.34a8 8 0 1 0-11.32-11.32L96 60.69a16 16 0 0 0-2.82 18.81L72 100.69a16 16 0 0 0 0 22.62l4.69 4.69l-58.35 58.34a8 8 0 0 0 3.13 13.25l72 24A7.9 7.9 0 0 0 96 224a8 8 0 0 0 5.66-2.34L136 187.31l4.69 4.69a16 16 0 0 0 22.62 0l21.19-21.18a16 16 0 0 0 18.81-2.82l50.35-50.34a8 8 0 0 0 0-11.32M93.84 206.85l-55-18.35L88 139.31L124.69 176ZM152 180.69L83.31 112L104 91.31L172.69 160Z",fill:"currentColor"})})}function we(t){return e.jsxs("svg",{height:"1em",viewBox:"0 0 16 16",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:[e.jsx("path",{d:"m2.648 9.937l7.29-7.288a2.21 2.21 0 0 1 3.124 0l2.29 2.288a2.21 2.21 0 0 1 0 3.126L10.413 13H12.5a.5.5 0 0 1 0 1H4.501a2.2 2.2 0 0 1-1.563-.647l.707-.707c.227.226.535.354.856.354h4.005a1.2 1.2 0 0 0 .848-.354l1.292-1.293l-4-4l-3.29 3.291a1.21 1.21 0 0 0 0 1.712l.29.29l-.708.707l-.29-.29a2.21 2.21 0 0 1 0-3.126M8 6h6.89a1.2 1.2 0 0 0-.246-.356L14 5H9zm2-2h3l-.645-.644a1.21 1.21 0 0 0-1.71 0zm4.89 3H7.708l1 1H14l.644-.644A1.2 1.2 0 0 0 14.891 7zM9.708 9l1.646 1.646L13 9z",fill:"currentColor"}),e.jsx("path",{d:"M14 11.5a.5.5 0 1 1-1 0a.5.5 0 0 1 1 0m1.5-.5a.5.5 0 1 0 0-1a.5.5 0 0 0 0 1m-1 2a.5.5 0 0 0 0 1h1a.5.5 0 0 0 0-1z",fill:"currentColor"})]})}function ve(t){return e.jsx("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{d:"M3 3h18v18H3zm2 2v14h14V5z",fill:"currentColor"})})}function Ce(t){return e.jsx("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{d:"M2 20V4h20v16zm2-2h16V6H4zm0 0V6z",fill:"currentColor"})})}function fe(t){return e.jsx("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{d:"M12 22q-2.075 0-3.9-.788t-3.175-2.137T2.788 15.9T2 12t.788-3.9t2.137-3.175T8.1 2.788T12 2t3.9.788t3.175 2.137T21.213 8.1T22 12t-.788 3.9t-2.137 3.175t-3.175 2.138T12 22m0-2q3.35 0 5.675-2.325T20 12t-2.325-5.675T12 4T6.325 6.325T4 12t2.325 5.675T12 20m0-8",fill:"currentColor"})})}function Te(t){return e.jsx("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{d:"M10.363 3.591L2.257 17.125a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636-2.87L13.637 3.59a1.914 1.914 0 0 0-3.274 0z",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})}function je(t){return e.jsx("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{d:"m6.8 21l-5.2-9l5.2-9h10.4l5.2 9l-5.2 9zm1.15-2h8.1l4.025-7l-4.025-7h-8.1L3.9 12zM12 12",fill:"currentColor"})})}function be(t){return e.jsx("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsxs("g",{fill:"none",fillRule:"evenodd",children:[e.jsx("path",{d:"m12.594 23.258l-.012.002l-.071.035l-.02.004l-.014-.004l-.071-.036q-.016-.004-.024.006l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.016-.018m.264-.113l-.014.002l-.184.093l-.01.01l-.003.011l.018.43l.005.012l.008.008l.201.092q.019.005.029-.008l.004-.014l-.034-.614q-.005-.019-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.003-.011l.018-.43l-.003-.012l-.01-.01z"}),e.jsx("path",{d:"M10.586 2.807a2 2 0 0 1 2.828 0l7.778 7.779a2 2 0 0 1 0 2.828l-7.778 7.778a2 2 0 0 1-2.828 0l-7.778-7.778a2 2 0 0 1 0-2.828zM12 4.222L4.222 12L12 19.778L19.778 12z",fill:"currentColor"})]})})}function Me(t){return e.jsx("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{d:"M16.01 11H4v2h12.01v3L20 12l-3.99-4z",fill:"currentColor"})})}function ye(t){return e.jsx("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{clipRule:"evenodd",d:"M7.53 3.47a.75.75 0 0 1 0 1.06L5.81 6.25H15a5.75 5.75 0 0 1 0 11.5H8a.75.75 0 0 1 0-1.5h7a4.25 4.25 0 0 0 0-8.5H5.81l1.72 1.72a.75.75 0 1 1-1.06 1.06l-3-3a.75.75 0 0 1 0-1.06l3-3a.75.75 0 0 1 1.06 0",fill:"currentColor",fillRule:"evenodd"})})}function Se(t){return e.jsx("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{clipRule:"evenodd",d:"M16.47 3.47a.75.75 0 0 1 1.06 0l3 3a.75.75 0 0 1 0 1.06l-3 3a.75.75 0 1 1-1.06-1.06l1.72-1.72H9a4.25 4.25 0 0 0 0 8.5h7a.75.75 0 0 1 0 1.5H9a5.75 5.75 0 0 1 0-11.5h9.19l-1.72-1.72a.75.75 0 0 1 0-1.06",fill:"currentColor",fillRule:"evenodd"})})}function Ee(t){return e.jsx("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{d:"M7 21q-.825 0-1.412-.587T5 19V6H4V4h5V3h6v1h5v2h-1v13q0 .825-.587 1.413T17 21zm2-4h2V8H9zm4 0h2V8h-2z",fill:"currentColor"})})}function He(t){return e.jsx("svg",{height:"1em",viewBox:"0 0 256 256",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{d:"M211.81 83.79a28 28 0 0 1-33.12 4.83l-90.07 90.07a28 28 0 1 1-44.43-6.48a28 28 0 0 1 33.12-4.83l90.07-90.07a28 28 0 1 1 44.43 6.48",fill:"currentColor"})})}function Le(t){return e.jsx("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{d:"M12 20.325q-.35 0-.712-.125t-.638-.4l-1.725-1.575q-2.65-2.425-4.788-4.812T2 8.15Q2 5.8 3.575 4.225T7.5 2.65q1.325 0 2.5.562t2 1.538q.825-.975 2-1.537t2.5-.563q2.35 0 3.925 1.575T22 8.15q0 2.875-2.125 5.275T15.05 18.25l-1.7 1.55q-.275.275-.637.4t-.713.125M11.05 6.75q-.725-1.025-1.55-1.563t-2-.537q-1.5 0-2.5 1t-1 2.5q0 1.3.925 2.763t2.213 2.837t2.65 2.575T12 18.3q.85-.775 2.213-1.975t2.65-2.575t2.212-2.837T20 8.15q0-1.5-1-2.5t-2.5-1q-1.175 0-2 .538T12.95 6.75q-.175.25-.425.375T12 7.25t-.525-.125t-.425-.375m.95 4.725",fill:"currentColor"})})}function ke(t){return e.jsx("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{d:"m7.625 6.4l2.8-3.625q.3-.4.713-.587T12 2t.863.188t.712.587l2.8 3.625l4.25 1.425q.65.2 1.025.738t.375 1.187q0 .3-.088.6t-.287.575l-2.75 3.9l.1 4.1q.025.875-.575 1.475t-1.4.6q-.05 0-.55-.075L12 19.675l-4.475 1.25q-.125.05-.275.063T6.975 21q-.8 0-1.4-.6T5 18.925l.1-4.125l-2.725-3.875q-.2-.275-.288-.575T2 9.75q0-.625.363-1.162t1.012-.763zM8.85 8.125L4 9.725L7.1 14.2L7 18.975l5-1.375l5 1.4l-.1-4.8L20 9.775l-4.85-1.65L12 4zM12 11.5",fill:"currentColor"})})}function Ne(t){return e.jsx("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{d:"M12.01 6c2.61 0 4.89 1.86 5.4 4.43l.3 1.5l1.52.11c1.56.11 2.78 1.41 2.78 2.96c0 1.65-1.35 3-3 3h-13c-2.21 0-4-1.79-4-4c0-2.05 1.53-3.76 3.56-3.97l1.07-.11l.5-.95A5.46 5.46 0 0 1 12.01 6m0-2C9.12 4 6.6 5.64 5.35 8.04C2.35 8.36.01 10.91.01 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5c0-2.64-2.05-4.78-4.64-4.96C18.68 6.59 15.65 4 12.01 4",fill:"currentColor"})})}function ze(t){return e.jsx("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{d:"M5.586 6.45A2 2 0 0 1 7.509 5h11.84a2 2 0 0 1 1.923 2.55l-2.858 10A2 2 0 0 1 16.491 19H4.651a2 2 0 0 1-1.923-2.55z",fill:"none",stroke:"currentColor",strokeWidth:"2"})})}const _e=[d.Color4.blackHighlight,d.Color4.ofRGBA(166/255,81/255,167/255,.3),d.Color4.ofRGBA(247/255,78/255,158/255,.3),d.Color4.ofRGBA(166/255,83/255,88/255,.3),d.Color4.ofRGBA(246/255,130/255,28/255,.3),d.Color4.ofRGBA(166/255,198/255,0,.3),d.Color4.ofRGBA(98/255,186/255,70/255,.3)],X=[d.Color4.black,d.Color4.fromHex("#007AFF"),d.Color4.fromHex("#A651A7"),d.Color4.fromHex("#F74E9E"),d.Color4.fromHex("#FF5358"),d.Color4.fromHex("#F6821C"),d.Color4.fromHex("#FFC600"),d.Color4.fromHex("#62BA46"),d.Color4.fromHex("#E6BFE8"),d.Color4.fromHex("#FEA3D2"),d.Color4.fromHex("#FFA0A3"),d.Color4.fromHex("#FBC276"),d.Color4.fromHex("#FFFB85"),d.Color4.fromHex("#AADC99")];function Ae({onChange:t}){const[r,o]=m.useState(d.Color4.blackHighlight);return e.jsx("div",{className:l.colorWrap,children:_e.map((s,f)=>e.jsx("button",{style:{backgroundColor:s.toHexString()},className:g.cn(l.color,{[l.colorActive]:r.toHexString()===s.toHexString()}),onClick:()=>{o(s),t(s)}},f))})}function $({onChange:t}){const[r,o]=m.useState(d.Color4.black);return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:l.colorWrap,children:X.slice(0,7).map((s,f)=>e.jsx("button",{style:{backgroundColor:s.toHexString()},className:g.cn(l.color,{[l.colorActive]:r.toHexString()===s.toHexString()}),onClick:()=>{o(s),t(s)}},f))}),e.jsx("div",{className:l.colorWrap,children:X.slice(7).map((s,f)=>e.jsx("button",{style:{backgroundColor:s.toHexString()},className:g.cn(l.color,{[l.colorActive]:r.toHexString()===s.toHexString()}),onClick:()=>{o(s),t(s)}},f))})]})}function qe({setColorPen:t,setThicknessPen:r}){const[o,s]=m.useState(2);return e.jsxs("div",{className:l.options,children:[e.jsx("div",{children:e.jsx($,{onChange:f=>t(f)})}),e.jsx("div",{className:l.line}),e.jsx("div",{children:e.jsx("input",{max:10,min:1,step:.1,type:"range",value:o,onChange:f=>{r(Number.parseFloat(f.target.value)),s(Number.parseFloat(f.target.value))}})})]})}function Be({setColorHighlight:t}){return e.jsx("div",{className:l.options,children:e.jsx(Ae,{onChange:r=>t(r)})})}function Pe({changeColorShape:t,changeBorderColorShape:r,onThicknessChange:o}){return e.jsxs("div",{className:l.options,children:[e.jsx("div",{children:e.jsx($,{onChange:s=>t(s)})}),e.jsx("div",{className:l.line}),e.jsx("div",{children:e.jsx($,{onChange:s=>r(s)})}),e.jsx("div",{className:l.line}),e.jsx("div",{children:e.jsx("input",{defaultValue:0,max:20,min:0,step:1,type:"range",onChange:s=>{o(Number.parseFloat(s.target.value))}})})]})}function Q(t){const{setColorPen:r,refEditor:o,setThicknessPen:s,setColorHighlight:f,changeBorderColorShape:M,onUndo:H,changeColorShape:w,changeShape:h,onThicknessChange:L,onRedo:j,onClear:_}=t,[a,c]=m.useState(null),[T,C]=m.useState(0);return e.jsx(e.Fragment,{children:e.jsxs("div",{className:l.wrapper,children:[e.jsxs("div",{className:l.pen,children:[e.jsx("button",{className:g.cn(l.tool,{[l.active]:a==="select"}),onClick:()=>{const n=o.current.toolController.getPrimaryTools();if(a==="select"){c(null),n[0].setEnabled(!1);return}c("select"),n[0].setEnabled(!0)},children:e.jsx(ge,{})}),e.jsx("div",{className:l.line}),e.jsx("button",{className:g.cn(l.tool,{[l.active]:a==="text"}),onClick:()=>{const n=o.current.toolController.getPrimaryTools();if(o.current.toolController.setToolEnabled(n[1]),a==="text"){n[1].setEnabled(!1),c(null);return}c("text"),n[1].setEnabled(!0)},children:e.jsx(me,{})}),e.jsx("div",{className:l.line}),e.jsx("button",{className:g.cn(l.tool,{[l.active]:a==="pencil"}),onClick:()=>{const n=o.current.toolController.getPrimaryTools();if(a==="pencil"){c(null),n[2].setEnabled(!1);return}c("pencil"),n[2].setEnabled(!0)},children:e.jsx(xe,{})}),e.jsx("button",{className:g.cn(l.tool,{[l.active]:a==="highlighter"}),onClick:()=>{const n=o.current.toolController.getPrimaryTools();if(a==="highlighter"){c(null),n[3].setEnabled(!1);return}c("highlighter"),n[3].setEnabled(!0)},children:e.jsx(pe,{})}),e.jsx("div",{className:l.line}),e.jsx("button",{className:g.cn(l.tool,{[l.active]:a==="eraser"}),onClick:()=>{const n=o.current.toolController.getPrimaryTools();if(a==="eraser"){c(null),n[4].setEnabled(!1);return}c("eraser"),n[4].setEnabled(!0)},children:e.jsx(we,{})}),e.jsx("div",{className:l.line}),e.jsx("button",{className:g.cn(l.tool,{[l.active]:a==="shapes"&&T===0}),onClick:()=>{const n=o.current.toolController.getPrimaryTools();o.current.toolController.setToolEnabled(n[5]),c("shapes"),n[5].setEnabled(!0),h(0),C(0)},children:e.jsx(ve,{})}),e.jsx("button",{className:g.cn(l.tool,{[l.active]:a==="shapes"&&T===1}),onClick:()=>{const n=o.current.toolController.getPrimaryTools();o.current.toolController.setToolEnabled(n[5]),c("shapes"),n[5].setEnabled(!0),h(1),C(1)},children:e.jsx(Ce,{})}),e.jsx("button",{className:g.cn(l.tool,{[l.active]:a==="shapes"&&T===2}),onClick:()=>{const n=o.current.toolController.getPrimaryTools();o.current.toolController.setToolEnabled(n[5]),c("shapes"),n[5].setEnabled(!0),h(2),C(2)},children:e.jsx(fe,{})}),e.jsx("button",{className:g.cn(l.tool,{[l.active]:a==="shapes"&&T===3}),onClick:()=>{const n=o.current.toolController.getPrimaryTools();o.current.toolController.setToolEnabled(n[5]),c("shapes"),n[5].setEnabled(!0),h(3),C(3)},children:e.jsx(Te,{})}),e.jsx("button",{className:g.cn(l.tool,{[l.active]:a==="shapes"&&T===4}),onClick:()=>{const n=o.current.toolController.getPrimaryTools();o.current.toolController.setToolEnabled(n[5]),c("shapes"),n[5].setEnabled(!0),h(4),C(4)},children:e.jsx(je,{})}),e.jsx("button",{className:g.cn(l.tool,{[l.active]:a==="shapes"&&T===5}),onClick:()=>{const n=o.current.toolController.getPrimaryTools();o.current.toolController.setToolEnabled(n[5]),c("shapes"),n[5].setEnabled(!0),h(5),C(5)},children:e.jsx(be,{})}),e.jsx("button",{className:g.cn(l.tool,{[l.active]:a==="shapes"&&T===6}),onClick:()=>{const n=o.current.toolController.getPrimaryTools();o.current.toolController.setToolEnabled(n[5]),c("shapes"),n[5].setEnabled(!0),h(6),C(6)},children:e.jsx(Me,{})}),e.jsx("button",{className:g.cn(l.tool,{[l.active]:a==="shapes"&&T===7}),onClick:()=>{const n=o.current.toolController.getPrimaryTools();o.current.toolController.setToolEnabled(n[5]),c("shapes"),n[5].setEnabled(!0),h(7),C(7)},children:e.jsx(He,{})}),e.jsx("button",{className:g.cn(l.tool,{[l.active]:a==="shapes"&&T===8}),onClick:()=>{const n=o.current.toolController.getPrimaryTools();o.current.toolController.setToolEnabled(n[5]),c("shapes"),n[5].setEnabled(!0),h(8),C(8)},children:e.jsx(Le,{})}),e.jsx("button",{className:g.cn(l.tool,{[l.active]:a==="shapes"&&T===9}),onClick:()=>{const n=o.current.toolController.getPrimaryTools();o.current.toolController.setToolEnabled(n[5]),c("shapes"),n[5].setEnabled(!0),h(9),C(9)},children:e.jsx(ke,{})}),e.jsx("button",{className:g.cn(l.tool,{[l.active]:a==="shapes"&&T===10}),onClick:()=>{const n=o.current.toolController.getPrimaryTools();o.current.toolController.setToolEnabled(n[5]),c("shapes"),n[5].setEnabled(!0),h(10),C(10)},children:e.jsx(Ne,{})}),e.jsx("button",{className:g.cn(l.tool,{[l.active]:a==="shapes"&&T===11}),onClick:()=>{const n=o.current.toolController.getPrimaryTools();o.current.toolController.setToolEnabled(n[5]),c("shapes"),n[5].setEnabled(!0),h(11),C(11)},children:e.jsx(ze,{})}),e.jsx("div",{className:l.line}),e.jsx("button",{className:g.cn(l.tool),onClick:H,children:e.jsx(ye,{})}),e.jsx("button",{className:g.cn(l.tool),onClick:j,children:e.jsx(Se,{})}),e.jsx("button",{className:g.cn(l.tool),onClick:_,children:e.jsx(Ee,{})})]}),e.jsxs("div",{className:l.optionsWrap,children:[a==="pencil"&&e.jsx(qe,{setColorPen:r,setThicknessPen:s}),a==="highlighter"&&e.jsx(Be,{setColorHighlight:f}),a==="shapes"&&e.jsx(Pe,{changeBorderColorShape:M,changeColorShape:w,changeShape:h,onThicknessChange:L})]})]})})}let R=!1;function Re(){const t=g.useEditorInstance(),r=G.useButtonProps(Y.name),{isActive:o=void 0,upload:s}=(r==null?void 0:r.componentProps)??{},{editorDisabled:f}=G.useToggleActive(o),[M,H]=m.useState(!1),w=m.useRef(null),h=m.useRef(null),L=()=>{(async()=>{const i=document.querySelector("#easydrawer");i&&(w.current=new d.Editor(i,{wheelEventsEnabled:!1,disableZoom:!0}),h.current=d.makeDropdownToolbar(w.current),h.current.addDefaultToolWidgets())})()};m.useEffect(()=>{M&&setTimeout(()=>{L()},200)},[M]);const j=async()=>{if(w.current){const x=w.current.toSVG(),i=x.outerHTML,p=`drawer-${Z.shortId()}.svg`;let k=Z.i(x.outerHTML);if(s){const q=te.dataURLtoFile(k,p);k=await s(q)}t==null||t.chain().focus().setDrawer({type:"drawer",src:k,alt:encodeURIComponent(i),width:426,height:212},!!i).run()}H(!1)},_=x=>{const i=w.current.toolController.getPrimaryTools()[2],p=h.current.getWidgetById("pen-1");i&&p&&(i.setColor(x),p.serializeState())},a=x=>{const i=w.current.toolController.getPrimaryTools()[2],p=h.current.getWidgetById("pen-1");i&&p&&(i.setThickness(x),p.serializeState())},c=x=>{const i=w.current.toolController.getPrimaryTools()[3],p=h.current.getWidgetById("pen-2");i&&p&&(i.setColor(x),p.serializeState())},T=x=>{const i=h.current.getWidgetById("shape");i&&i.setShapeType(x)},C=x=>{const i=w.current.toolController.getPrimaryTools()[5],p=h.current.getWidgetById("shape");i&&p&&(i.setColor(x),p.serializeState())},n=x=>{const i=w.current.toolController.getPrimaryTools()[5],p=h.current.getWidgetById("shape");i&&p&&(i.setThickness(x),p.serializeState())},W=x=>{const i=w.current.toolController.getPrimaryTools()[5],p=h.current.getWidgetById("shape");i&&p&&(i.setBorderColor(x),p.serializeState())},A=()=>{if(R){for(;w.current.history.redoStackSize>0;)w.current.history.redo();R=!1;return}w.current.history.undo()},I=()=>{R||w.current.history.redo()},F=()=>{if(!R){for(;w.current.history.undoStackSize>0;)A();R=!0}};return r?e.jsxs(P.Dialog,{onOpenChange:H,open:M,children:[e.jsx(P.DialogTrigger,{asChild:!0,children:e.jsx(ee.ActionButton,{disabled:f,action:()=>{f||H(!0)},icon:"PencilRuler",tooltip:"Drawer"})}),e.jsxs(P.DialogContent,{className:"richtext-z-[99999] !richtext-max-w-[1300px]",children:[e.jsx(P.DialogTitle,{children:"Drawer"}),e.jsxs("div",{style:{height:"600px",width:"100%",borderWidth:1,background:"white",position:"relative"},children:[e.jsx("div",{className:"richtext-size-full",id:"easydrawer"}),e.jsx(Q,{changeBorderColorShape:W,changeColorShape:C,changeShape:T,onClear:F,onRedo:I,onThicknessChange:n,onUndo:A,refEditor:w,setColorHighlight:c,setColorPen:_,setThicknessPen:a})]}),e.jsx(P.DialogFooter,{children:e.jsx(re.Button,{onClick:j,type:"button",children:"Save changes"})})]})]}):e.jsx(e.Fragment,{})}const Y=V.index_default.extend({name:"richTextDrawer",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),inline:!1,content:"",marks:"",group:"block",draggable:!1,selectable:!0,atom:!0,HTMLAttributes:{class:"drawer"},button:({t:r,extension:o})=>{var s;return{componentProps:{action:()=>!0,isActive:()=>!1,disabled:!1,icon:"PencilRuler",tooltip:r("editor.drawer.tooltip"),upload:(s=o==null?void 0:o.options)==null?void 0:s.upload}}}}},addAttributes(){var t;return{...(t=this.parent)==null?void 0:t.call(this),width:{default:null,parseHTML:r=>{const o=r.querySelector("img"),s=o==null?void 0:o.getAttribute("width");return s?Number.parseInt(s,10):320},renderHTML:r=>({width:r.width})},height:{default:null,parseHTML:r=>{const o=r.querySelector("img"),s=o==null?void 0:o.getAttribute("height");return s?Number.parseInt(s,10):212},renderHTML:r=>({height:r.height})},align:{default:"center",parseHTML:r=>r.getAttribute("align"),renderHTML:r=>({align:r.align})}}},addNodeView(){return K.ReactNodeViewRenderer(oe)},addCommands(){return{setDrawer:(t,r)=>({commands:o,editor:s})=>r?o.insertContent({type:this.name,attrs:t}):o.insertContentAt(s.state.selection.anchor,{type:this.name,attrs:t}),setAlignImageDrawer:t=>({commands:r})=>r.updateAttributes(this.name,{align:t})}},renderHTML({HTMLAttributes:t}){const{align:r}=t;return["div",{style:r?`text-align: ${r};`:"",class:"imageDrawer"},["img",O.mergeAttributes(this.options.HTMLAttributes,t)]]},parseHTML(){return[{tag:"div[class=imageDrawer]",getAttrs:t=>{const r=t.querySelector("img"),o=r==null?void 0:r.getAttribute("width"),s=r==null?void 0:r.getAttribute("height");return{src:r==null?void 0:r.getAttribute("src"),alt:r==null?void 0:r.getAttribute("alt"),width:o?Number.parseInt(o,10):null,height:s?Number.parseInt(s,10):null,align:(r==null?void 0:r.getAttribute("align"))||t.style.textAlign||null}}}]}});exports.ControlDrawer=Q;exports.Drawer=Y;exports.RichTextDrawer=Re;
|