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/types.d.ts
ADDED
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import { Editor as CoreEditor, Extension, JSONContent } from '@tiptap/core';
|
|
2
|
+
import { Editor } from '@tiptap/react';
|
|
3
|
+
import { ActionButtonProps } from './components';
|
|
4
|
+
export type { Editor, JSONContent } from '@tiptap/core';
|
|
5
|
+
/**
|
|
6
|
+
* Represents the onChange event for EchoEditor.
|
|
7
|
+
*/
|
|
8
|
+
export interface EchoEditorOnChange {
|
|
9
|
+
/** Editor object */
|
|
10
|
+
editor: CoreEditor;
|
|
11
|
+
/** Output content, can be a string or JSON content */
|
|
12
|
+
output: string | JSONContent;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Represents the keys for different extensions.
|
|
16
|
+
*/
|
|
17
|
+
export type ExtensionNameKeys = 'bold' | 'italic' | 'underline' | 'strike' | 'color' | 'highlight' | 'heading' | 'textAlign' | 'bulletList' | 'orderedList' | 'taskList' | 'indent' | 'link' | 'image' | 'video' | 'table' | 'blockquote' | 'horizontalRule' | 'code' | 'codeBlock' | 'clear' | 'history' | 'twitter' | 'katex' | 'excalidraw' | 'mermaid' | 'drawer';
|
|
18
|
+
/**
|
|
19
|
+
* Represents the general options for Tiptap extensions.
|
|
20
|
+
*/
|
|
21
|
+
export interface GeneralOptions<T> {
|
|
22
|
+
/** Enabled divider */
|
|
23
|
+
divider: boolean;
|
|
24
|
+
/** Enabled spacer */
|
|
25
|
+
spacer: boolean;
|
|
26
|
+
/** Button view function */
|
|
27
|
+
button: ButtonView<T>;
|
|
28
|
+
/** Show on Toolbar */
|
|
29
|
+
toolbar?: boolean;
|
|
30
|
+
/** Shortcut keys override */
|
|
31
|
+
shortcutKeys?: string[] | string[][];
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Represents the props for the ButtonView component.
|
|
35
|
+
*/
|
|
36
|
+
export interface ButtonViewReturnComponentProps {
|
|
37
|
+
/** Method triggered when action is performed */
|
|
38
|
+
action?: (value?: any) => void;
|
|
39
|
+
/** Whether it is in the active state */
|
|
40
|
+
isActive?: () => boolean;
|
|
41
|
+
/** Button icon */
|
|
42
|
+
icon?: any;
|
|
43
|
+
/** Text displayed on hover */
|
|
44
|
+
tooltip?: string;
|
|
45
|
+
[x: string]: any;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Represents the slots for the ButtonView component.
|
|
49
|
+
*/
|
|
50
|
+
export interface ButtonViewReturnComponentSlots {
|
|
51
|
+
/** Dialog slot */
|
|
52
|
+
dialog: () => any;
|
|
53
|
+
[x: string]: () => any;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Represents the return value for the ButtonView component.
|
|
57
|
+
*/
|
|
58
|
+
export interface ButtonViewReturn {
|
|
59
|
+
/** Component */
|
|
60
|
+
component: unknown;
|
|
61
|
+
/** Component props */
|
|
62
|
+
componentProps: ButtonViewReturnComponentProps;
|
|
63
|
+
/** Component slots */
|
|
64
|
+
componentSlots?: ButtonViewReturnComponentSlots;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Represents the parameters for the ButtonView function.
|
|
68
|
+
*/
|
|
69
|
+
export interface ButtonViewParams<T = any> {
|
|
70
|
+
/** Editor object */
|
|
71
|
+
editor: Editor;
|
|
72
|
+
/** Extension object */
|
|
73
|
+
extension: Extension<T>;
|
|
74
|
+
/** Translation function */
|
|
75
|
+
t: (path: string) => string;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Represents the ButtonView function.
|
|
79
|
+
*/
|
|
80
|
+
export type ButtonView<T = any> = (options: ButtonViewParams<T>) => ButtonViewReturn | ButtonViewReturn[];
|
|
81
|
+
/**
|
|
82
|
+
* Represents the BubbleMenuRenderProps.
|
|
83
|
+
*/
|
|
84
|
+
export interface BubbleMenuRenderProps {
|
|
85
|
+
editor: Editor;
|
|
86
|
+
disabled: boolean;
|
|
87
|
+
bubbleMenu: BubbleMenuProps;
|
|
88
|
+
extensionsNames: string[];
|
|
89
|
+
}
|
|
90
|
+
export interface TableMenuConfig {
|
|
91
|
+
/**
|
|
92
|
+
* @description Column menu hidden
|
|
93
|
+
* @default false
|
|
94
|
+
*/
|
|
95
|
+
hidden?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* custom menu actions
|
|
98
|
+
*/
|
|
99
|
+
actions?: ActionButtonProps[];
|
|
100
|
+
/**
|
|
101
|
+
* hidden default actions, if any
|
|
102
|
+
*/
|
|
103
|
+
hiddenActions?: string[];
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Represents the BubbleMenuProps.
|
|
107
|
+
*/
|
|
108
|
+
export interface BubbleMenuProps {
|
|
109
|
+
columnConfig?: {
|
|
110
|
+
/**
|
|
111
|
+
* @description Column menu hidden
|
|
112
|
+
* @default false
|
|
113
|
+
*/
|
|
114
|
+
hidden?: boolean;
|
|
115
|
+
};
|
|
116
|
+
tableConfig?: TableMenuConfig;
|
|
117
|
+
floatingMenuConfig?: {
|
|
118
|
+
/**
|
|
119
|
+
* @description Floating menu hidden
|
|
120
|
+
* @default false
|
|
121
|
+
*/
|
|
122
|
+
hidden?: boolean;
|
|
123
|
+
};
|
|
124
|
+
linkConfig?: {
|
|
125
|
+
/**
|
|
126
|
+
* @description Link menu hidden
|
|
127
|
+
* @default false
|
|
128
|
+
*/
|
|
129
|
+
hidden?: boolean;
|
|
130
|
+
};
|
|
131
|
+
textConfig?: {
|
|
132
|
+
/**
|
|
133
|
+
* @description Text menu hidden
|
|
134
|
+
* @default false
|
|
135
|
+
*/
|
|
136
|
+
hidden?: boolean;
|
|
137
|
+
};
|
|
138
|
+
imageConfig?: {
|
|
139
|
+
/**
|
|
140
|
+
* @description Image menu hidden
|
|
141
|
+
* @default false
|
|
142
|
+
*/
|
|
143
|
+
hidden?: boolean;
|
|
144
|
+
};
|
|
145
|
+
imageGifConfig?: {
|
|
146
|
+
/**
|
|
147
|
+
* @description Image menu hidden
|
|
148
|
+
* @default false
|
|
149
|
+
*/
|
|
150
|
+
hidden?: boolean;
|
|
151
|
+
};
|
|
152
|
+
videoConfig?: {
|
|
153
|
+
/**
|
|
154
|
+
* @description Video menu hidden
|
|
155
|
+
* @default false
|
|
156
|
+
*/
|
|
157
|
+
hidden?: boolean;
|
|
158
|
+
};
|
|
159
|
+
katexConfig?: {
|
|
160
|
+
/**
|
|
161
|
+
* @description katex menu hidden
|
|
162
|
+
* @default false
|
|
163
|
+
*/
|
|
164
|
+
hidden?: boolean;
|
|
165
|
+
};
|
|
166
|
+
excalidrawConfig?: {
|
|
167
|
+
/**
|
|
168
|
+
* @description excalidraw menu hidden
|
|
169
|
+
* @default false
|
|
170
|
+
*/
|
|
171
|
+
hidden?: boolean;
|
|
172
|
+
};
|
|
173
|
+
iframeConfig?: {
|
|
174
|
+
/**
|
|
175
|
+
* @description iframe menu hidden
|
|
176
|
+
* @default false
|
|
177
|
+
*/
|
|
178
|
+
hidden?: boolean;
|
|
179
|
+
};
|
|
180
|
+
mermaidConfig?: {
|
|
181
|
+
/**
|
|
182
|
+
* @description mermaid menu hidden
|
|
183
|
+
* @default false
|
|
184
|
+
*/
|
|
185
|
+
hidden?: boolean;
|
|
186
|
+
};
|
|
187
|
+
twitterConfig?: {
|
|
188
|
+
/**
|
|
189
|
+
* @description twitter menu hidden
|
|
190
|
+
* @default false
|
|
191
|
+
*/
|
|
192
|
+
hidden?: boolean;
|
|
193
|
+
};
|
|
194
|
+
drawerConfig?: {
|
|
195
|
+
/**
|
|
196
|
+
* @description twitter menu hidden
|
|
197
|
+
* @default false
|
|
198
|
+
*/
|
|
199
|
+
hidden?: boolean;
|
|
200
|
+
};
|
|
201
|
+
render?: (props: BubbleMenuRenderProps, dom: React.ReactNode) => React.ReactNode;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Represents the ToolbarItemProps.
|
|
205
|
+
*/
|
|
206
|
+
export interface ToolbarItemProps {
|
|
207
|
+
button: {
|
|
208
|
+
component: React.ComponentType<any>;
|
|
209
|
+
componentProps: Record<string, any>;
|
|
210
|
+
};
|
|
211
|
+
divider: boolean;
|
|
212
|
+
spacer: boolean;
|
|
213
|
+
type: string;
|
|
214
|
+
name: string;
|
|
215
|
+
}
|
|
216
|
+
export interface ToolbarRenderProps {
|
|
217
|
+
editor: Editor;
|
|
218
|
+
disabled: boolean;
|
|
219
|
+
}
|
|
220
|
+
export interface ToolbarProps {
|
|
221
|
+
render?: (props: ToolbarRenderProps, toolbarItems: ToolbarItemProps[], dom: any[], containerDom: (innerContent: React.ReactNode) => React.ReactNode) => React.ReactNode;
|
|
222
|
+
tooltipSide?: 'top' | 'bottom';
|
|
223
|
+
}
|
|
224
|
+
export interface NameValueOption<T = string> {
|
|
225
|
+
name: string;
|
|
226
|
+
value: T;
|
|
227
|
+
}
|
|
228
|
+
export type VideoAlignment = 'flex-start' | 'center' | 'flex-end';
|
|
229
|
+
export type PaperSize = 'Legal' | 'Letter' | 'Tabloid' | 'A0' | 'A1' | 'A2' | 'A3' | 'A4' | 'A5';
|
|
230
|
+
export type PageMargin = '0in' | '0.25in' | '0.4in' | '0.5in' | '0.75in' | '1in' | '1.25in' | '1.5in' | '1.75in' | '2in' | '0cm' | '0.5cm' | '1cm' | '1.5cm' | '2cm' | '2.5cm' | '3cm' | '4cm' | '5cm' | '0mm' | '5mm' | '10mm' | '15mm' | '20mm' | '25mm' | '30mm' | '40mm' | '50mm' | '0pt' | '18pt' | '36pt' | '54pt' | '72pt' | '90pt' | '108pt' | '144pt';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const z=require("@tiptap/pm/state"),L=require("@tiptap/pm/view"),G=require("./index-
|
|
1
|
+
"use strict";const z=require("@tiptap/pm/state"),L=require("@tiptap/pm/view"),G=require("./index-DLqogznp.cjs"),U=require("./floating-ui.dom-VCrc58uF.cjs");function Q(f){var l;const{char:y,allowSpaces:I,allowToIncludeChar:h,allowedPrefixes:m,startOfLine:k,$position:v}=f,B=I&&!h,q=G.escapeForRegEx(y),O=new RegExp(`\\s${q}$`),S=k?"^":"",M=h?"":q,C=B?new RegExp(`${S}${q}.*?(?=\\s${M}|$)`,"gm"):new RegExp(`${S}(?:^)?${q}[^\\s${M}]*`,"gm"),$=((l=v.nodeBefore)==null?void 0:l.isText)&&v.nodeBefore.text;if(!$)return null;const F=v.pos-$.length,a=Array.from($.matchAll(C)).pop();if(!a||a.input===void 0||a.index===void 0)return null;const e=a.input.slice(Math.max(0,a.index-1),a.index),K=new RegExp(`^[${m==null?void 0:m.join("")}\0]?$`).test(e);if(m!==null&&!K)return null;const _=F+a.index;let x=_+a[0].length;return B&&O.test($.slice(x-1,x+1))&&(a[0]+=" ",x+=1),_<v.pos&&x>=v.pos?{range:{from:_,to:x},query:a[0].slice(y.length),text:a[0]}:null}var V=new z.PluginKey("suggestion");function H({pluginKey:f=V,editor:l,char:y="@",allowSpaces:I=!1,allowToIncludeChar:h=!1,allowedPrefixes:m=[" "],startOfLine:k=!1,decorationTag:v="span",decorationClass:B="suggestion",decorationContent:q="",decorationEmptyClass:O="is-empty",command:S=()=>null,items:M=()=>[],render:C=()=>({}),allow:$=()=>!0,findSuggestionMatch:F=Q}){let a;const e=C==null?void 0:C(),K=()=>{const n=l.state.selection.$anchor.pos,i=l.view.coordsAtPos(n),{top:r,right:s,bottom:o,left:c}=i;try{return new DOMRect(c,r,s-c,o-r)}catch{return null}},_=(n,i)=>i?()=>{const r=f.getState(l.state),s=r==null?void 0:r.decorationId,o=n.dom.querySelector(`[data-decoration-id="${s}"]`);return(o==null?void 0:o.getBoundingClientRect())||null}:K;function x(n,i){var r;try{const o=f.getState(n.state),c=o!=null&&o.decorationId?n.dom.querySelector(`[data-decoration-id="${o.decorationId}"]`):null,d={editor:l,range:(o==null?void 0:o.range)||{from:0,to:0},query:(o==null?void 0:o.query)||null,text:(o==null?void 0:o.text)||null,items:[],command:p=>S({editor:l,range:(o==null?void 0:o.range)||{from:0,to:0},props:p}),decorationNode:c,clientRect:_(n,c)};(r=e==null?void 0:e.onExit)==null||r.call(e,d)}catch{}const s=n.state.tr.setMeta(i,{exit:!0});n.dispatch(s)}const N=new z.Plugin({key:f,view(){return{update:async(n,i)=>{var r,s,o,c,d,p,E;const t=(r=this.key)==null?void 0:r.getState(i),g=(s=this.key)==null?void 0:s.getState(n.state),u=t.active&&g.active&&t.range.from!==g.range.from,R=!t.active&&g.active,b=t.active&&!g.active,P=!R&&!b&&t.query!==g.query,D=R||u&&P,A=P||u,T=b||u&&P;if(!D&&!A&&!T)return;const w=T&&!D?t:g,j=n.dom.querySelector(`[data-decoration-id="${w.decorationId}"]`);a={editor:l,range:w.range,query:w.query,text:w.text,items:[],command:J=>S({editor:l,range:w.range,props:J}),decorationNode:j,clientRect:_(n,j)},D&&((o=e==null?void 0:e.onBeforeStart)==null||o.call(e,a)),A&&((c=e==null?void 0:e.onBeforeUpdate)==null||c.call(e,a)),(A||D)&&(a.items=await M({editor:l,query:w.query})),T&&((d=e==null?void 0:e.onExit)==null||d.call(e,a)),A&&((p=e==null?void 0:e.onUpdate)==null||p.call(e,a)),D&&((E=e==null?void 0:e.onStart)==null||E.call(e,a))},destroy:()=>{var n;a&&((n=e==null?void 0:e.onExit)==null||n.call(e,a))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(n,i,r,s){const{isEditable:o}=l,{composing:c}=l.view,{selection:d}=n,{empty:p,from:E}=d,t={...i},g=n.getMeta(f);if(g&&g.exit)return t.active=!1,t.decorationId=null,t.range={from:0,to:0},t.query=null,t.text=null,t;if(t.composing=c,o&&(p||l.view.composing)){(E<i.range.from||E>i.range.to)&&!c&&!i.composing&&(t.active=!1);const u=F({char:y,allowSpaces:I,allowToIncludeChar:h,allowedPrefixes:m,startOfLine:k,$position:d.$from}),R=`id_${Math.floor(Math.random()*4294967295)}`;u&&$({editor:l,state:s,range:u.range,isActive:i.active})?(t.active=!0,t.decorationId=i.decorationId?i.decorationId:R,t.range=u.range,t.query=u.query,t.text=u.text):t.active=!1}else t.active=!1;return t.active||(t.decorationId=null,t.range={from:0,to:0},t.query=null,t.text=null),t}},props:{handleKeyDown(n,i){var r,s,o,c;const{active:d,range:p}=N.getState(n.state);if(!d)return!1;if(i.key==="Escape"||i.key==="Esc"){const t=N.getState(n.state),g=(r=a==null?void 0:a.decorationNode)!=null?r:null,u=g??(t!=null&&t.decorationId?n.dom.querySelector(`[data-decoration-id="${t.decorationId}"]`):null);if(((s=e==null?void 0:e.onKeyDown)==null?void 0:s.call(e,{view:n,event:i,range:t.range}))||!1)return!0;const b={editor:l,range:t.range,query:t.query,text:t.text,items:[],command:P=>S({editor:l,range:t.range,props:P}),decorationNode:u,clientRect:u?()=>u.getBoundingClientRect()||null:null};return(o=e==null?void 0:e.onExit)==null||o.call(e,b),x(n,f),!0}return((c=e==null?void 0:e.onKeyDown)==null?void 0:c.call(e,{view:n,event:i,range:p}))||!1},decorations(n){const{active:i,range:r,decorationId:s,query:o}=N.getState(n);if(!i)return null;const c=!(o!=null&&o.length),d=[B];return c&&d.push(O),L.DecorationSet.create(n.doc,[L.Decoration.inline(r.from,r.to,{nodeName:v,class:d.join(" "),"data-decoration-id":s,"data-decoration-content":q})])}}});return N}var W=H;function X(f,l){const y={getBoundingClientRect:()=>G.posToDOMRect(f.view,f.state.selection.from,f.state.selection.to)};U.computePosition(y,l,{placement:"bottom-start",strategy:"absolute",middleware:[U.shift(),U.flip()]}).then(({x:I,y:h,strategy:m})=>{l.style.width="max-content",l.style.position=m,l.style.left=`${I}px`,l.style.top=`${h}px`})}exports.Suggestion=H;exports.index_default=W;exports.updatePosition=X;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PluginKey as L, Plugin as z } from "@tiptap/pm/state";
|
|
2
2
|
import { DecorationSet as G, Decoration as H } from "@tiptap/pm/view";
|
|
3
|
-
import { e as J,
|
|
3
|
+
import { e as J, f as Q } from "./index-nFjllrEl.js";
|
|
4
4
|
import { c as V, s as W, f as X } from "./floating-ui.dom-U1vPFQ5f.js";
|
|
5
5
|
function Y(g) {
|
|
6
6
|
var a;
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import * as E from "react";
|
|
2
|
+
import { useState as m, useEffect as b, useMemo as a } from "react";
|
|
3
|
+
import { b as S } from "./index-ClAEwR0V.js";
|
|
4
|
+
import { O as h, P as C } from "./index-nFjllrEl.js";
|
|
5
|
+
import { u as M } from "./index-CEbbM7Gx.js";
|
|
6
|
+
let l;
|
|
7
|
+
function p() {
|
|
8
|
+
return l === void 0 && (l = navigator.platform.includes("Mac")), l;
|
|
9
|
+
}
|
|
10
|
+
function x(t) {
|
|
11
|
+
return `${t}`.toLowerCase() === "mod" ? p() ? "⌘" : "Ctrl" : `${t}`.toLowerCase() === "alt" ? p() ? "⌥" : "Alt" : `${t}`.toLowerCase() === "shift" ? p() ? "⇧" : "Shift" : t;
|
|
12
|
+
}
|
|
13
|
+
function F(t) {
|
|
14
|
+
return t.map(x).join(" ");
|
|
15
|
+
}
|
|
16
|
+
function D(t) {
|
|
17
|
+
const { editor: n } = h(), r = E.useMemo(
|
|
18
|
+
() => n,
|
|
19
|
+
[t, n]
|
|
20
|
+
);
|
|
21
|
+
return C({
|
|
22
|
+
editor: r,
|
|
23
|
+
selector(e) {
|
|
24
|
+
return e.editor ? {
|
|
25
|
+
editor: e.editor,
|
|
26
|
+
editorState: e.editor.state,
|
|
27
|
+
canCommand: e.editor.can
|
|
28
|
+
} : {
|
|
29
|
+
editor: null,
|
|
30
|
+
editorState: void 0,
|
|
31
|
+
canCommand: void 0
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
}) || { editor: null };
|
|
35
|
+
}
|
|
36
|
+
function f() {
|
|
37
|
+
return D().editor;
|
|
38
|
+
}
|
|
39
|
+
const g = () => !1;
|
|
40
|
+
function K(t = g) {
|
|
41
|
+
const n = S(), [r, o] = m(() => {
|
|
42
|
+
const s = t();
|
|
43
|
+
return typeof s == "boolean" ? !s : s;
|
|
44
|
+
}), e = f();
|
|
45
|
+
b(() => {
|
|
46
|
+
if (!e || !t) return;
|
|
47
|
+
const s = () => {
|
|
48
|
+
const c = t();
|
|
49
|
+
o(typeof c == "boolean" ? !c : c);
|
|
50
|
+
};
|
|
51
|
+
return s(), e.on("selectionUpdate", s), e.on("transaction", s), () => {
|
|
52
|
+
e.off("selectionUpdate", s), e.off("transaction", s);
|
|
53
|
+
};
|
|
54
|
+
}, [e, t]);
|
|
55
|
+
const u = a(() => !n || !e ? !0 : typeof r == "boolean" ? r : !1, [n, e, r]), i = a(() => !n || !e, [n, e]);
|
|
56
|
+
return {
|
|
57
|
+
disabled: u,
|
|
58
|
+
// can not action, opacity < 1
|
|
59
|
+
dataState: r,
|
|
60
|
+
// true => show background, false => no background
|
|
61
|
+
editorDisabled: i
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
function O(t = g) {
|
|
65
|
+
const n = S(), [r, o] = m({}), [e, u] = m(t()), i = f();
|
|
66
|
+
b(() => {
|
|
67
|
+
if (!i || !t) return;
|
|
68
|
+
const d = () => {
|
|
69
|
+
u(t());
|
|
70
|
+
};
|
|
71
|
+
return d(), i.on("selectionUpdate", d), () => {
|
|
72
|
+
i.off("selectionUpdate", d);
|
|
73
|
+
};
|
|
74
|
+
}, [r, i, t]);
|
|
75
|
+
const s = a(() => !n || !i, [n, i]), c = a(() => !n || !i, [n, i]);
|
|
76
|
+
return {
|
|
77
|
+
disabled: s,
|
|
78
|
+
// can not action, opacity < 1
|
|
79
|
+
dataState: e,
|
|
80
|
+
// true => show background, false => no background
|
|
81
|
+
editorDisabled: c,
|
|
82
|
+
update: () => o({})
|
|
83
|
+
// force update
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
function U(t) {
|
|
87
|
+
const n = f();
|
|
88
|
+
return a(() => n ? n.extensionManager.extensions.find((o) => o.name === t) : null, [n, t]);
|
|
89
|
+
}
|
|
90
|
+
function R(t, n, r) {
|
|
91
|
+
return t < n ? n : t > r ? r : t;
|
|
92
|
+
}
|
|
93
|
+
const y = (t) => typeof t == "number", N = (t) => typeof t == "string", L = (t) => typeof t == "function";
|
|
94
|
+
function T(t, n = "px") {
|
|
95
|
+
if (!t)
|
|
96
|
+
return t;
|
|
97
|
+
const r = y(t) ? String(t) : t, o = Number.parseFloat(r), e = r.match(/[%a-z]+$/i), u = e ? e[0] : n;
|
|
98
|
+
return Number.isNaN(o) ? t : o + u;
|
|
99
|
+
}
|
|
100
|
+
function V(t, n) {
|
|
101
|
+
if (!t)
|
|
102
|
+
return !1;
|
|
103
|
+
const { extensions: r = [] } = (t == null ? void 0 : t.extensionManager) ?? {};
|
|
104
|
+
return !!r.find((e) => e.name === n);
|
|
105
|
+
}
|
|
106
|
+
function z(t) {
|
|
107
|
+
return t.map((n) => N(n) ? { value: n, name: n } : n);
|
|
108
|
+
}
|
|
109
|
+
function B(t) {
|
|
110
|
+
const n = f(), r = U(t), { t: o } = M();
|
|
111
|
+
return a(() => {
|
|
112
|
+
if (!n || !r)
|
|
113
|
+
return null;
|
|
114
|
+
const {
|
|
115
|
+
button: e
|
|
116
|
+
} = r.options;
|
|
117
|
+
return !e || !L(e) ? null : e({
|
|
118
|
+
editor: n,
|
|
119
|
+
extension: r,
|
|
120
|
+
t: o
|
|
121
|
+
});
|
|
122
|
+
}, [n, r, o]);
|
|
123
|
+
}
|
|
124
|
+
export {
|
|
125
|
+
O as a,
|
|
126
|
+
K as b,
|
|
127
|
+
f as c,
|
|
128
|
+
U as d,
|
|
129
|
+
z as e,
|
|
130
|
+
T as f,
|
|
131
|
+
F as g,
|
|
132
|
+
x as h,
|
|
133
|
+
R as i,
|
|
134
|
+
V as j,
|
|
135
|
+
B as u
|
|
136
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const s=require("react"),b=require("./index-DM3mpxB-.cjs"),m=require("./index-DLqogznp.cjs"),M=require("./index-B0fWAhpK.cjs");function h(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const x=h(s);let l;function p(){return l===void 0&&(l=navigator.platform.includes("Mac")),l}function g(t){return`${t}`.toLowerCase()==="mod"?p()?"⌘":"Ctrl":`${t}`.toLowerCase()==="alt"?p()?"⌥":"Alt":`${t}`.toLowerCase()==="shift"?p()?"⇧":"Shift":t}function y(t){return t.map(g).join(" ")}function C(t){const{editor:e}=m.useCurrentEditor(),n=x.useMemo(()=>e,[t,e]);return m.useEditorState({editor:n,selector(r){return r.editor?{editor:r.editor,editorState:r.editor.state,canCommand:r.editor.can}:{editor:null,editorState:void 0,canCommand:void 0}}})||{editor:null}}function f(){return C().editor}const S=()=>!1;function D(t=S){const e=b.useEditableEditor(),[n,o]=s.useState(()=>{const u=t();return typeof u=="boolean"?!u:u}),r=f();s.useEffect(()=>{if(!r||!t)return;const u=()=>{const c=t();o(typeof c=="boolean"?!c:c)};return u(),r.on("selectionUpdate",u),r.on("transaction",u),()=>{r.off("selectionUpdate",u),r.off("transaction",u)}},[r,t]);const a=s.useMemo(()=>!e||!r?!0:typeof n=="boolean"?n:!1,[e,r,n]),i=s.useMemo(()=>!e||!r,[e,r]);return{disabled:a,dataState:n,editorDisabled:i}}function N(t=S){const e=b.useEditableEditor(),[n,o]=s.useState({}),[r,a]=s.useState(t()),i=f();s.useEffect(()=>{if(!i||!t)return;const d=()=>{a(t())};return d(),i.on("selectionUpdate",d),()=>{i.off("selectionUpdate",d)}},[n,i,t]);const u=s.useMemo(()=>!e||!i,[e,i]),c=s.useMemo(()=>!e||!i,[e,i]);return{disabled:u,dataState:r,editorDisabled:c,update:()=>o({})}}function E(t){const e=f();return s.useMemo(()=>e?e.extensionManager.extensions.find(o=>o.name===t):null,[e,t])}function O(t,e,n){return t<e?e:t>n?n:t}const U=t=>typeof t=="number",P=t=>typeof t=="string",$=t=>typeof t=="function";function j(t,e="px"){if(!t)return t;const n=U(t)?String(t):t,o=Number.parseFloat(n),r=n.match(/[%a-z]+$/i),a=r?r[0]:e;return Number.isNaN(o)?t:o+a}function q(t,e){if(!t)return!1;const{extensions:n=[]}=(t==null?void 0:t.extensionManager)??{};return!!n.find(r=>r.name===e)}function w(t){return t.map(e=>P(e)?{value:e,name:e}:e)}function K(t){const e=f(),n=E(t),{t:o}=M.useLocale();return s.useMemo(()=>{if(!e||!n)return null;const{button:r}=n.options;return!r||!$(r)?null:r({editor:e,extension:n,t:o})},[e,n,o])}exports.clamp=O;exports.ensureNameValueOptions=w;exports.getCssUnitWithDefault=j;exports.getShortcutKey=g;exports.getShortcutKeys=y;exports.hasExtension=q;exports.useActive=D;exports.useButtonProps=K;exports.useEditorInstance=f;exports.useExtension=E;exports.useToggleActive=N;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const OPEN_COUNT_SETTING_MODAL = "OPEN_COUNT_SETTING_MODAL";
|
|
2
|
+
export declare const OPEN_LINK_SETTING_MODAL = "OPEN_LINK_SETTING_MODAL";
|
|
3
|
+
export declare const OPEN_FLOW_SETTING_MODAL = "OPEN_FLOW_SETTING_MODAL";
|
|
4
|
+
export declare const OPEN_MIND_SETTING_MODAL = "OPEN_MIND_SETTING_MODAL";
|
|
5
|
+
export declare const OPEN_EXCALIDRAW_SETTING_MODAL = "OPEN_EXCALIDRAW_SETTING_MODAL";
|
|
6
|
+
export declare const OPEN_DRAWER_SETTING_MODAL = "OPEN_DRAWER_SETTING_MODAL";
|
|
7
|
+
export declare function subject(eventName: any, handler: any): void;
|
|
8
|
+
export declare function cancelSubject(eventName: any, handler: any): void;
|
|
9
|
+
export declare function triggerOpenCountSettingModal(data: any): void;
|
|
10
|
+
export declare function triggerOpenLinkSettingModal(data: any): void;
|
|
11
|
+
export declare function triggerOpenFlowSettingModal(data: any): void;
|
|
12
|
+
export declare function triggerOpenMindSettingModal(data: any): void;
|
|
13
|
+
export declare function triggerOpenExcalidrawSettingModal(data: any): void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EditorState } from '@tiptap/pm/state';
|
|
2
|
+
export declare function createColumn(colType: any, index: any, colContent?: null): any;
|
|
3
|
+
export declare function getColumnsNodeTypes(schema: any): any;
|
|
4
|
+
export declare function createColumns(schema: any, colsCount: any, colContent?: null): any;
|
|
5
|
+
export declare function addOrDeleteCol({ state, dispatch, type, }: {
|
|
6
|
+
state: EditorState;
|
|
7
|
+
dispatch: any;
|
|
8
|
+
type: 'addBefore' | 'addAfter' | 'delete';
|
|
9
|
+
}): boolean;
|
|
10
|
+
export declare function gotoCol({ state, dispatch, type }: {
|
|
11
|
+
state: EditorState;
|
|
12
|
+
dispatch: any;
|
|
13
|
+
type: 'before' | 'after';
|
|
14
|
+
}): boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const EVENTS: {
|
|
2
|
+
readonly UPLOAD_IMAGE: (id: any) => string;
|
|
3
|
+
readonly UPLOAD_VIDEO: (id: string) => string;
|
|
4
|
+
readonly CHANGE_THEME: "CHANGE_THEME";
|
|
5
|
+
readonly CHANGE_COLOR: "CHANGE_COLOR";
|
|
6
|
+
readonly CHANGE_BORDER_RADIUS: "CHANGE_BORDER_RADIUS";
|
|
7
|
+
readonly CHANGE_LANGUAGE: "CHANGE_LANGUAGE";
|
|
8
|
+
};
|
|
9
|
+
export type EventValues = any;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param json
|
|
3
|
+
*/
|
|
4
|
+
export declare function jsonToStr(json: Record<string, unknown>): string;
|
|
5
|
+
/**
|
|
6
|
+
* @param str
|
|
7
|
+
*/
|
|
8
|
+
export declare function strToJSON(str: string): any;
|
|
9
|
+
/**
|
|
10
|
+
* @param element
|
|
11
|
+
* @param json
|
|
12
|
+
*/
|
|
13
|
+
export declare function jsonToDOMDataset(json: Record<string, unknown>): {
|
|
14
|
+
key: string;
|
|
15
|
+
value: string;
|
|
16
|
+
}[];
|
|
17
|
+
/**
|
|
18
|
+
* @param element
|
|
19
|
+
* @param attribute
|
|
20
|
+
* @param transformToJSON
|
|
21
|
+
*/
|
|
22
|
+
export declare function getDatasetAttribute(attribute: string, transformToJSON?: boolean): (element: HTMLElement) => any;
|
|
23
|
+
/**
|
|
24
|
+
* 将节点属性转换为 dataset
|
|
25
|
+
* @param node
|
|
26
|
+
* @returns
|
|
27
|
+
*/
|
|
28
|
+
export declare function nodeAttrsToDataset(node: Node): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function downloadFromBlob(blob: Blob, filename: string): Promise<void>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type ContainerType = Element | ShadowRoot;
|
|
2
|
+
export type Prepend = boolean | 'queue';
|
|
3
|
+
export type AppendType = 'prependQueue' | 'append' | 'prepend';
|
|
4
|
+
export default function contains(root: Node | null | undefined, n?: Node): boolean;
|
|
5
|
+
interface Options {
|
|
6
|
+
attachTo?: ContainerType;
|
|
7
|
+
csp?: {
|
|
8
|
+
nonce?: string;
|
|
9
|
+
};
|
|
10
|
+
prepend?: Prepend;
|
|
11
|
+
/**
|
|
12
|
+
* Config the `priority` of `prependQueue`. Default is `0`.
|
|
13
|
+
* It's useful if you need to insert style before other style.
|
|
14
|
+
*/
|
|
15
|
+
priority?: number;
|
|
16
|
+
mark?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function injectCSS(css: string, option?: Options): HTMLStyleElement;
|
|
19
|
+
export declare function removeCSS(key: string, option?: Options): void;
|
|
20
|
+
/**
|
|
21
|
+
* manually clear container cache to avoid global cache in unit testes
|
|
22
|
+
*/
|
|
23
|
+
export declare function clearContainerCache(): void;
|
|
24
|
+
export declare function updateCSS(css: string, key: string, option?: Options): HTMLStyleElement;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 获取文件名
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* > extractFilename('https://gitlab.com/images/logo-full.png')
|
|
6
|
+
* < 'logo-full'
|
|
7
|
+
*
|
|
8
|
+
* @param {string} src The URL to extract filename from
|
|
9
|
+
* @returns {string}
|
|
10
|
+
*/
|
|
11
|
+
export declare function extractFilename(src: any): any;
|
|
12
|
+
/**
|
|
13
|
+
* extractFileExtension
|
|
14
|
+
* @param {string} fileName The file name to extract extension from
|
|
15
|
+
* @returns {string}
|
|
16
|
+
*/
|
|
17
|
+
export declare function extractFileExtension(fileName: any): any;
|
|
18
|
+
export declare function normalizeFileSize(size: any): string;
|
|
19
|
+
export type FileType = 'image' | 'audio' | 'video' | 'pdf' | 'word' | 'excel' | 'ppt' | 'file';
|
|
20
|
+
export declare function normalizeFileType(fileType: any): FileType;
|
|
21
|
+
export declare function readImageAsBase64(file: File): Promise<{
|
|
22
|
+
alt: string;
|
|
23
|
+
src: string;
|
|
24
|
+
}>;
|
|
25
|
+
export declare function getImageWidthHeight(url: string): Promise<{
|
|
26
|
+
width: number | string;
|
|
27
|
+
height: number | string;
|
|
28
|
+
}>;
|
|
29
|
+
export declare const FILE_CHUNK_SIZE: number;
|
|
30
|
+
export declare function dataURLtoFile(dataurl: string, filename: string): File;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Command } from '@tiptap/core';
|
|
2
|
+
import { Transaction } from '@tiptap/pm/state';
|
|
3
|
+
export declare const enum IndentProps {
|
|
4
|
+
max = 7,
|
|
5
|
+
min = 0,
|
|
6
|
+
more = 1,
|
|
7
|
+
less = -1
|
|
8
|
+
}
|
|
9
|
+
export declare function clamp(val: number, min: number, max: number): number;
|
|
10
|
+
export declare function setNodeIndentMarkup(tr: Transaction, pos: number, delta: number): Transaction;
|
|
11
|
+
export declare function createIndentCommand({ delta, types }: {
|
|
12
|
+
delta: number;
|
|
13
|
+
types: string[];
|
|
14
|
+
}): Command;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
interface HttpRequestHeadersInterfaceMock {
|
|
2
|
+
[id: string]: string | string[] | undefined;
|
|
3
|
+
}
|
|
4
|
+
interface HttpRequestInterfaceMock {
|
|
5
|
+
headers: HttpRequestHeadersInterfaceMock;
|
|
6
|
+
[id: string]: any;
|
|
7
|
+
}
|
|
8
|
+
export interface IsMobileOptions {
|
|
9
|
+
ua?: string | HttpRequestInterfaceMock;
|
|
10
|
+
tablet?: boolean;
|
|
11
|
+
featureDetect?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Determines if the current device is a mobile or tablet device.
|
|
15
|
+
* @param opts - Options for the detection.
|
|
16
|
+
* @returns `true` if the device is mobile or tablet, `false` otherwise.
|
|
17
|
+
*/
|
|
18
|
+
export declare function isMobile(opts?: IsMobileOptions): boolean;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
declare class Node {
|
|
2
|
+
key: string;
|
|
3
|
+
value: string | number;
|
|
4
|
+
prev: Node | null;
|
|
5
|
+
next: Node | null;
|
|
6
|
+
constructor(key: any, value: any);
|
|
7
|
+
}
|
|
8
|
+
export declare class LRUCache {
|
|
9
|
+
private capacity;
|
|
10
|
+
private usedCapacity;
|
|
11
|
+
private head;
|
|
12
|
+
private tail;
|
|
13
|
+
private store;
|
|
14
|
+
constructor(capacity: any);
|
|
15
|
+
private removeNode;
|
|
16
|
+
private addToHead;
|
|
17
|
+
private moveToHead;
|
|
18
|
+
private removeTail;
|
|
19
|
+
get(key: any): string | number;
|
|
20
|
+
put(key: any, value: any): void;
|
|
21
|
+
keys(): any[];
|
|
22
|
+
values(): any[];
|
|
23
|
+
toJSON(): Record<string, Node>;
|
|
24
|
+
}
|
|
25
|
+
export declare function createKeysLocalStorageLRUCache(storageKey: any, capacity: any): {
|
|
26
|
+
syncFromStorage(): void;
|
|
27
|
+
syncToStorage(): void;
|
|
28
|
+
put(key: any): void;
|
|
29
|
+
get(key?: string): string | number | any[];
|
|
30
|
+
};
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* copy to https://github.com/developit/mitt
|
|
3
|
+
*/
|
|
4
|
+
export type EventType = string | symbol;
|
|
5
|
+
export type Handler<T = unknown> = (event: T) => void;
|
|
6
|
+
export type WildcardHandler<T = Record<string, unknown>> = (type: keyof T, event: T[keyof T]) => void;
|
|
7
|
+
export type EventHandlerList<T = unknown> = Array<Handler<T>>;
|
|
8
|
+
export type WildCardEventHandlerList<T = Record<string, unknown>> = Array<WildcardHandler<T>>;
|
|
9
|
+
export type EventHandlerMap<Events extends Record<EventType, unknown>> = Map<keyof Events | '*', EventHandlerList<Events[keyof Events]> | WildCardEventHandlerList<Events>>;
|
|
10
|
+
export interface Emitter<Events extends Record<EventType, unknown>> {
|
|
11
|
+
all: EventHandlerMap<Events>;
|
|
12
|
+
on: (<Key extends keyof Events>(type: Key, handler: Handler<Events[Key]>) => void) & ((type: '*', handler: WildcardHandler<Events>) => void);
|
|
13
|
+
off: (<Key extends keyof Events>(type: Key, handler?: Handler<Events[Key]>) => void) & ((type: '*', handler: WildcardHandler<Events>) => void);
|
|
14
|
+
emit: (<Key extends keyof Events>(type: Key, event: Events[Key]) => void) & (<Key extends keyof Events>(type: undefined extends Events[Key] ? Key : never) => void);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Mitt: Tiny (~200b) functional event emitter / pubsub.
|
|
18
|
+
* @name mitt
|
|
19
|
+
* @returns {Mitt}
|
|
20
|
+
*/
|
|
21
|
+
export default function mitt<Events extends Record<EventType, unknown>>(all?: EventHandlerMap<Events>): Emitter<Events>;
|