@remarkablejames/editor 0.0.1
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/LICENSE +21 -0
- package/README.md +62 -0
- package/lib/ActionMenuButton-B0EHT9CC.js +35 -0
- package/lib/ActionMenuButton-J1el_e6Z.cjs +1 -0
- package/lib/Attachment.cjs +19 -0
- package/lib/Attachment.js +273 -0
- package/lib/Blockquote.cjs +5 -0
- package/lib/Blockquote.js +107 -0
- package/lib/Bold.cjs +1 -0
- package/lib/Bold.js +123 -0
- package/lib/BulletList.cjs +1 -0
- package/lib/BulletList.js +53 -0
- package/lib/Callout.cjs +1 -0
- package/lib/Callout.js +225 -0
- package/lib/Clear.cjs +1 -0
- package/lib/Clear.js +49 -0
- package/lib/Code.cjs +1 -0
- package/lib/Code.js +100 -0
- package/lib/CodeBlock.cjs +44 -0
- package/lib/CodeBlock.js +4065 -0
- package/lib/CodeView.cjs +1 -0
- package/lib/CodeView.js +81 -0
- package/lib/Color.cjs +1 -0
- package/lib/Color.js +134 -0
- package/lib/Column.cjs +1 -0
- package/lib/Column.js +230 -0
- package/lib/Drawer-BCWVN-4l.js +1125 -0
- package/lib/Drawer-BTouEroZ.cjs +2 -0
- package/lib/Drawer.cjs +1 -0
- package/lib/Drawer.js +7 -0
- package/lib/Emoji.cjs +1 -0
- package/lib/Emoji.js +19888 -0
- package/lib/Excalidraw.cjs +1 -0
- package/lib/Excalidraw.js +276 -0
- package/lib/ExportPdf.cjs +39 -0
- package/lib/ExportPdf.js +142 -0
- package/lib/ExportWord.cjs +1 -0
- package/lib/ExportWord.js +107 -0
- package/lib/FontFamily.cjs +1 -0
- package/lib/FontFamily.js +84 -0
- package/lib/FontSize.cjs +1 -0
- package/lib/FontSize.js +106 -0
- package/lib/Heading.cjs +1 -0
- package/lib/Heading.js +167 -0
- package/lib/Highlight.cjs +1 -0
- package/lib/Highlight.js +203 -0
- package/lib/History.cjs +1 -0
- package/lib/History.js +990 -0
- package/lib/HorizontalRule.cjs +1 -0
- package/lib/HorizontalRule.js +118 -0
- package/lib/Iframe-BdgiWGml.js +416 -0
- package/lib/Iframe-BfBLILDA.cjs +1 -0
- package/lib/Iframe.cjs +1 -0
- package/lib/Iframe.js +7 -0
- package/lib/Image.cjs +1 -0
- package/lib/Image.js +6 -0
- package/lib/ImageGif.cjs +1 -0
- package/lib/ImageGif.js +400 -0
- package/lib/ImportWord.cjs +1 -0
- package/lib/ImportWord.js +145 -0
- package/lib/Indent-BpMcZKok.js +148 -0
- package/lib/Indent-Dvqz_WEn.cjs +1 -0
- package/lib/Indent.cjs +1 -0
- package/lib/Indent.js +6 -0
- package/lib/Italic.cjs +1 -0
- package/lib/Italic.js +123 -0
- package/lib/Katex-B8_uprkO.js +2753 -0
- package/lib/Katex-BQyeCeQ0.cjs +4 -0
- package/lib/Katex.cjs +1 -0
- package/lib/Katex.js +6 -0
- package/lib/LineHeight.cjs +1 -0
- package/lib/LineHeight.js +89 -0
- package/lib/Link.cjs +1 -0
- package/lib/Link.js +6 -0
- package/lib/LinkEditBlock-BX0fXXpF.js +1185 -0
- package/lib/LinkEditBlock-CIshn_8F.cjs +5 -0
- package/lib/Mention.cjs +1 -0
- package/lib/Mention.js +265 -0
- package/lib/Mermaid-0GiGVxn0.cjs +2 -0
- package/lib/Mermaid-D8bbIgAl.js +381 -0
- package/lib/Mermaid.cjs +1 -0
- package/lib/Mermaid.js +7 -0
- package/lib/MoreMark.cjs +1 -0
- package/lib/MoreMark.js +157 -0
- package/lib/OrderedList.cjs +1 -0
- package/lib/OrderedList.js +52 -0
- package/lib/SearchAndReplace.cjs +1 -0
- package/lib/SearchAndReplace.js +305 -0
- package/lib/SlashCommand.cjs +1 -0
- package/lib/SlashCommand.js +90 -0
- package/lib/SlashCommandNodeView-BcmtKbEE.js +249 -0
- package/lib/SlashCommandNodeView-rDJ7OjRd.cjs +1 -0
- package/lib/Strike.cjs +1 -0
- package/lib/Strike.js +112 -0
- package/lib/Table-BEhNBeuA.cjs +5 -0
- package/lib/Table-DbxuP5xh.js +1939 -0
- package/lib/Table.cjs +1 -0
- package/lib/Table.js +5 -0
- package/lib/TaskList.cjs +1 -0
- package/lib/TaskList.js +63 -0
- package/lib/TextAlign.cjs +1 -0
- package/lib/TextAlign.js +165 -0
- package/lib/TextDirection.cjs +1 -0
- package/lib/TextDirection.js +110 -0
- package/lib/TextUnderline.cjs +1 -0
- package/lib/TextUnderline.js +115 -0
- package/lib/Twitter-9I6BLNmg.js +1666 -0
- package/lib/Twitter-BuEBgpi9.cjs +1 -0
- package/lib/Twitter.cjs +1 -0
- package/lib/Twitter.js +6 -0
- package/lib/Video.cjs +1 -0
- package/lib/Video.js +7 -0
- package/lib/bubble.cjs +3 -0
- package/lib/bubble.d.ts +1 -0
- package/lib/bubble.js +9533 -0
- package/lib/clsx-CDyrfCnw.js +7391 -0
- package/lib/clsx-CXbNJWDD.cjs +54 -0
- package/lib/components/ActionButton.d.ts +23 -0
- package/lib/components/ActionMenuButton.d.ts +28 -0
- package/lib/components/Bubble/RichTextBubbleCallout.d.ts +1 -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 +13 -0
- package/lib/components/ColorPicker.d.ts +11 -0
- package/lib/components/ReactBus.d.ts +11 -0
- package/lib/components/RichTextProvider.d.ts +8 -0
- package/lib/components/SizeSetter/SizeSetter.d.ts +13 -0
- package/lib/components/SlashDialogTrigger/RenderDialogUploadImage.d.ts +1 -0
- package/lib/components/SlashDialogTrigger/RenderDialogUploadVideo.d.ts +1 -0
- package/lib/components/SlashDialogTrigger/SlashDialogTrigger.d.ts +5 -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 +15 -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/delete-node-CosiBes5.cjs +1 -0
- package/lib/delete-node-eQHsyyhR.js +24 -0
- package/lib/dom-dataset-BqoJhJXt.cjs +1 -0
- package/lib/dom-dataset-CIEeltF6.js +47 -0
- package/lib/dropdown-menu-Bs69ZBbO.js +143 -0
- package/lib/dropdown-menu-DjWlG2-J.cjs +1 -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/Callout/Callout.d.ts +18 -0
- package/lib/extensions/Callout/components/NodeViewCallout/NodeViewCallout.d.ts +1 -0
- package/lib/extensions/Callout/components/RichTextCallout.d.ts +1 -0
- package/lib/extensions/Callout/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 +5 -0
- package/lib/extensions/Emoji/components/EmojiList/EmojiNodeView.d.ts +11 -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 +64 -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/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 +9 -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 +3 -0
- package/lib/extensions/Mention/components/NodeViewMentionList.d.ts +16 -0
- package/lib/extensions/Mention/index.d.ts +1 -0
- package/lib/extensions/Mermaid/Mermaid.d.ts +27 -0
- package/lib/extensions/Mermaid/components/EditMermaidBlock.d.ts +9 -0
- package/lib/extensions/Mermaid/components/NodeViewMermaid/NodeViewMermaid.d.ts +9 -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 +20 -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/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-4Q5IhypJ.js +1349 -0
- package/lib/index-BCzvbrf5.cjs +12 -0
- package/lib/index-BG0kQamI.js +285 -0
- package/lib/index-C-tDsIKJ.js +1631 -0
- package/lib/index-C1WCZhyA.js +237 -0
- package/lib/index-CjhjjJsN.cjs +1 -0
- package/lib/index-Cs6cp0Y6.cjs +1 -0
- package/lib/index-CsSfYR30.js +1351 -0
- package/lib/index-D9oM__YW.cjs +1 -0
- package/lib/index-DjDf4BK8.js +707 -0
- package/lib/index-NsYff_Ni.cjs +1 -0
- package/lib/index-bVGIXhRg.cjs +1 -0
- package/lib/index-lj3VWExo.js +4883 -0
- package/lib/index-neeeY2o7.cjs +4 -0
- package/lib/index.cjs +115 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +338 -0
- package/lib/jsx-runtime-CT7Pcg-t.js +13 -0
- package/lib/jsx-runtime-C_NLcKys.cjs +1 -0
- package/lib/lib/utils.d.ts +2 -0
- package/lib/locale-bundle.cjs +1 -0
- package/lib/locale-bundle.d.ts +1 -0
- package/lib/locale-bundle.js +11 -0
- package/lib/locales/en.d.ts +196 -0
- package/lib/locales/fi.d.ts +196 -0
- package/lib/locales/hu.d.ts +196 -0
- package/lib/locales/index.d.ts +1198 -0
- package/lib/locales/pt-br.d.ts +196 -0
- package/lib/locales/vi.d.ts +196 -0
- package/lib/locales/zh-cn.d.ts +196 -0
- package/lib/plugins/image-upload.d.ts +13 -0
- package/lib/popover-CPr9bHYn.js +24 -0
- package/lib/popover-D-hUKDYu.cjs +1 -0
- package/lib/renderNodeView-BJSrgyGj.js +28 -0
- package/lib/renderNodeView-DfLmGrgA.cjs +1 -0
- package/lib/select-C2KF4RNg.cjs +1 -0
- package/lib/select-CuE_HaQJ.js +120 -0
- package/lib/separator-CHzYNMVt.js +293 -0
- package/lib/separator-_gvUNba_.cjs +1 -0
- package/lib/store/EditorEditableReactive.d.ts +1 -0
- package/lib/store/ThemeColorReactive.d.ts +1 -0
- package/lib/store/commandList.d.ts +2 -0
- package/lib/store/editor.d.ts +21 -0
- package/lib/store/store.d.ts +3 -0
- package/lib/style.css +1 -0
- package/lib/textarea-DZj6EY-N.cjs +1 -0
- package/lib/textarea-gEoNp9CA.js +20 -0
- package/lib/theme/theme.d.ts +369 -0
- package/lib/theme.cjs +1 -0
- package/lib/theme.js +395 -0
- package/lib/types.d.ts +230 -0
- package/lib/updatePosition-Cjuj2E26.cjs +1 -0
- package/lib/updatePosition-e90ZrFWW.js +16 -0
- package/lib/utils/base64.d.ts +2 -0
- package/lib/utils/checkIsVideoUrl.d.ts +1 -0
- package/lib/utils/color.d.ts +7 -0
- package/lib/utils/columns.d.ts +14 -0
- package/lib/utils/customEvents/events.constant.d.ts +6 -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 +24 -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/renderNodeView.d.ts +6 -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 +845 -0
package/lib/Bold.js
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { M as _, e as a, f as i, m as y } from "./clsx-CDyrfCnw.js";
|
|
2
|
+
import { h as d } from "./jsx-runtime-CT7Pcg-t.js";
|
|
3
|
+
import { u as f, d as M, A as l } from "./index-lj3VWExo.js";
|
|
4
|
+
import { jsx as u, Fragment as v } from "react/jsx-runtime";
|
|
5
|
+
import "react";
|
|
6
|
+
import "./theme.js";
|
|
7
|
+
var B = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, k = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, b = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, A = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g, R = _.create({
|
|
8
|
+
name: "bold",
|
|
9
|
+
addOptions() {
|
|
10
|
+
return {
|
|
11
|
+
HTMLAttributes: {}
|
|
12
|
+
};
|
|
13
|
+
},
|
|
14
|
+
parseHTML() {
|
|
15
|
+
return [
|
|
16
|
+
{
|
|
17
|
+
tag: "strong"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
tag: "b",
|
|
21
|
+
getAttrs: (t) => t.style.fontWeight !== "normal" && null
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
style: "font-weight=400",
|
|
25
|
+
clearMark: (t) => t.type.name === this.name
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
style: "font-weight",
|
|
29
|
+
getAttrs: (t) => /^(bold(er)?|[5-9]\d{2,})$/.test(t) && null
|
|
30
|
+
}
|
|
31
|
+
];
|
|
32
|
+
},
|
|
33
|
+
renderHTML({ HTMLAttributes: t }) {
|
|
34
|
+
return /* @__PURE__ */ d("strong", { ...y(this.options.HTMLAttributes, t), children: /* @__PURE__ */ d("slot", {}) });
|
|
35
|
+
},
|
|
36
|
+
markdownTokenName: "strong",
|
|
37
|
+
parseMarkdown: (t, e) => e.applyMark("bold", e.parseInline(t.tokens || [])),
|
|
38
|
+
renderMarkdown: (t, e) => `**${e.renderChildren(t)}**`,
|
|
39
|
+
addCommands() {
|
|
40
|
+
return {
|
|
41
|
+
setBold: () => ({ commands: t }) => t.setMark(this.name),
|
|
42
|
+
toggleBold: () => ({ commands: t }) => t.toggleMark(this.name),
|
|
43
|
+
unsetBold: () => ({ commands: t }) => t.unsetMark(this.name)
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
addKeyboardShortcuts() {
|
|
47
|
+
return {
|
|
48
|
+
"Mod-b": () => this.editor.commands.toggleBold(),
|
|
49
|
+
"Mod-B": () => this.editor.commands.toggleBold()
|
|
50
|
+
};
|
|
51
|
+
},
|
|
52
|
+
addInputRules() {
|
|
53
|
+
return [
|
|
54
|
+
i({
|
|
55
|
+
find: B,
|
|
56
|
+
type: this.type
|
|
57
|
+
}),
|
|
58
|
+
i({
|
|
59
|
+
find: b,
|
|
60
|
+
type: this.type
|
|
61
|
+
})
|
|
62
|
+
];
|
|
63
|
+
},
|
|
64
|
+
addPasteRules() {
|
|
65
|
+
return [
|
|
66
|
+
a({
|
|
67
|
+
find: k,
|
|
68
|
+
type: this.type
|
|
69
|
+
}),
|
|
70
|
+
a({
|
|
71
|
+
find: A,
|
|
72
|
+
type: this.type
|
|
73
|
+
})
|
|
74
|
+
];
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
function K() {
|
|
78
|
+
const t = f(x.name), {
|
|
79
|
+
icon: e = void 0,
|
|
80
|
+
tooltip: o = void 0,
|
|
81
|
+
shortcutKeys: r = void 0,
|
|
82
|
+
tooltipOptions: p = {},
|
|
83
|
+
action: n = void 0,
|
|
84
|
+
isActive: m = void 0
|
|
85
|
+
} = (t == null ? void 0 : t.componentProps) ?? {}, { dataState: c, disabled: s, update: g } = M(m), h = () => {
|
|
86
|
+
s || n && (n(), g());
|
|
87
|
+
};
|
|
88
|
+
return t ? /* @__PURE__ */ u(
|
|
89
|
+
l,
|
|
90
|
+
{
|
|
91
|
+
action: h,
|
|
92
|
+
dataState: c,
|
|
93
|
+
disabled: s,
|
|
94
|
+
icon: e,
|
|
95
|
+
shortcutKeys: r,
|
|
96
|
+
tooltip: o,
|
|
97
|
+
tooltipOptions: p
|
|
98
|
+
}
|
|
99
|
+
) : /* @__PURE__ */ u(v, {});
|
|
100
|
+
}
|
|
101
|
+
const x = /* @__PURE__ */ R.extend({
|
|
102
|
+
//@ts-expect-error
|
|
103
|
+
addOptions() {
|
|
104
|
+
var t;
|
|
105
|
+
return {
|
|
106
|
+
...(t = this.parent) == null ? void 0 : t.call(this),
|
|
107
|
+
button: ({ editor: e, t: o, extension: r }) => ({
|
|
108
|
+
component: l,
|
|
109
|
+
componentProps: {
|
|
110
|
+
action: () => e.commands.toggleBold(),
|
|
111
|
+
isActive: () => e.isActive("bold"),
|
|
112
|
+
icon: "Bold",
|
|
113
|
+
shortcutKeys: r.options.shortcutKeys ?? ["mod", "B"],
|
|
114
|
+
tooltip: o("editor.bold.tooltip")
|
|
115
|
+
}
|
|
116
|
+
})
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
export {
|
|
121
|
+
x as Bold,
|
|
122
|
+
K as RichTextBold
|
|
123
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("./index-BCzvbrf5.cjs"),s=require("react/jsx-runtime"),n=require("./index-D9oM__YW.cjs");require("react");require("./theme.cjs");function g(){const t=n.useButtonProps(l.name),{icon:e=void 0,tooltip:i=void 0,shortcutKeys:o=void 0,tooltipOptions:r={},action:c=void 0,isActive:d=void 0}=(t==null?void 0:t.componentProps)??{},{dataState:a,disabled:u,update:p}=n.useToggleActive(d),m=()=>{u||c&&(c(),p())};return t?s.jsx(n.ActionButton,{action:m,dataState:a,disabled:u,icon:e,shortcutKeys:o,tooltip:i,tooltipOptions:r}):s.jsx(s.Fragment,{})}const l=v.BulletList.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,t:i,extension:o})=>({componentProps:{action:()=>e.commands.toggleBulletList(),isActive:()=>e.isActive("bulletList"),disabled:!1,shortcutKeys:o.options.shortcutKeys??["shift","mod","8"],icon:"List",tooltip:i("editor.bulletlist.tooltip")}})}}});exports.BulletList=l;exports.RichTextBulletList=g;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { B as d } from "./index-DjDf4BK8.js";
|
|
2
|
+
import { jsx as c, Fragment as m } from "react/jsx-runtime";
|
|
3
|
+
import { u as f, d as v, A } from "./index-lj3VWExo.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import "./theme.js";
|
|
6
|
+
function y() {
|
|
7
|
+
const t = f(B.name), {
|
|
8
|
+
icon: o = void 0,
|
|
9
|
+
tooltip: i = void 0,
|
|
10
|
+
shortcutKeys: s = void 0,
|
|
11
|
+
tooltipOptions: r = {},
|
|
12
|
+
action: e = void 0,
|
|
13
|
+
isActive: l = void 0
|
|
14
|
+
} = (t == null ? void 0 : t.componentProps) ?? {}, { dataState: u, disabled: n, update: a } = v(l), p = () => {
|
|
15
|
+
n || e && (e(), a());
|
|
16
|
+
};
|
|
17
|
+
return t ? /* @__PURE__ */ c(
|
|
18
|
+
A,
|
|
19
|
+
{
|
|
20
|
+
action: p,
|
|
21
|
+
dataState: u,
|
|
22
|
+
disabled: n,
|
|
23
|
+
icon: o,
|
|
24
|
+
shortcutKeys: s,
|
|
25
|
+
tooltip: i,
|
|
26
|
+
tooltipOptions: r
|
|
27
|
+
}
|
|
28
|
+
) : /* @__PURE__ */ c(m, {});
|
|
29
|
+
}
|
|
30
|
+
const B = /* @__PURE__ */ d.extend({
|
|
31
|
+
//@ts-expect-error
|
|
32
|
+
addOptions() {
|
|
33
|
+
var t;
|
|
34
|
+
return {
|
|
35
|
+
...(t = this.parent) == null ? void 0 : t.call(this),
|
|
36
|
+
button: ({ editor: o, t: i, extension: s }) => ({
|
|
37
|
+
// component: ActionButton,
|
|
38
|
+
componentProps: {
|
|
39
|
+
action: () => o.commands.toggleBulletList(),
|
|
40
|
+
isActive: () => o.isActive("bulletList"),
|
|
41
|
+
disabled: !1,
|
|
42
|
+
shortcutKeys: s.options.shortcutKeys ?? ["shift", "mod", "8"],
|
|
43
|
+
icon: "List",
|
|
44
|
+
tooltip: i("editor.bulletlist.tooltip")
|
|
45
|
+
}
|
|
46
|
+
})
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
export {
|
|
51
|
+
B as BulletList,
|
|
52
|
+
y as RichTextBulletList
|
|
53
|
+
};
|
package/lib/Callout.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./clsx-CXbNJWDD.cjs"),o=require("./index-D9oM__YW.cjs"),t=require("react/jsx-runtime"),x=require("react");require("./theme.cjs");const c=require("lucide-react"),s=require("./select-C2KF4RNg.cjs"),k=require("./index-bVGIXhRg.cjs"),j=[{value:"note",label:"Note",icon:c.Info,color:"#1f6feb",background:"#1f6feb1f"},{value:"tip",label:"Tip",icon:c.Lightbulb,color:"#238636",background:"#2386361f"},{value:"important",label:"Important",icon:c.AlertCircle,color:"#ab7df8",background:"#ab7df81f"},{value:"warning",label:"Warning",icon:c.TriangleAlert,color:"#d29922",background:"#d299221f"},{value:"caution",label:"Caution",icon:c.OctagonAlert,color:"#f85149",background:"#f851491f"}];function q({node:e}){const{type:l="note",title:r="",body:u=""}=e.attrs,d=(j.find(h=>h.value===l)||j[0]).icon;return t.jsx(a.NodeViewWrapper,{children:t.jsxs("div",{className:a.clsx("richtext-relative richtext-my-4 richtext-rounded-lg richtext-border richtext-p-4",{"richtext-bg-[#1f6feb1f] richtext-border-[#1f6feb]":l==="note","richtext-bg-[#2386361f] richtext-border-[#238636]":l==="tip","richtext-bg-[#ab7df81f] richtext-border-[#ab7df8]":l==="important","richtext-bg-[#d299221f] richtext-border-[#d29922]":l==="warning","richtext-bg-[#f851491f] richtext-border-[#f85149]":l==="caution"}),children:[t.jsxs("div",{className:a.clsx("richtext-mb-2 richtext-flex richtext-items-center richtext-gap-2",{"richtext-text-[#1f6feb]":l==="note","richtext-text-[#238636]":l==="tip","richtext-text-[#ab7df8]":l==="important","richtext-text-[#d29922]":l==="warning","richtext-text-[#f85149]":l==="caution"}),children:[t.jsx(d,{className:"richtext-size-5"}),t.jsx("span",{className:"richtext-font-semibold",children:r})]}),u&&t.jsx("p",{className:"richtext-pl-[28px]",children:u})]})})}const w=[{value:"note",label:"Note",icon:"Info"},{value:"tip",label:"Tip",icon:"Lightbulb"},{value:"important",label:"Important",icon:"AlertCircle"},{value:"warning",label:"Warning",icon:"TriangleAlert"},{value:"caution",label:"Caution",icon:"OctagonAlert"}];function M(){const{t:e}=k.useLocale(),l=o.useEditorInstance(),r=o.useButtonProps(C.name),[u,n]=x.useState(!1),[d,h]=x.useState("note"),[b,g]=x.useState(""),[f,v]=x.useState(""),{icon:y=void 0,tooltip:T=void 0,shortcutKeys:A=void 0,tooltipOptions:L={},isActive:N=void 0}=(r==null?void 0:r.componentProps)??{},{dataState:S,disabled:m}=o.useToggleActive(N),I=()=>{l&&(l.chain().focus().setCallout({type:d,title:b,body:f}).run(),n(!1),h("note"),g(""),v(""))},O=()=>{m||n(!0)};return r?t.jsxs(o.Dialog,{onOpenChange:n,open:u,children:[t.jsx(o.DialogTrigger,{asChild:!0,children:t.jsx(o.ActionButton,{action:O,dataState:S,disabled:m,icon:y,shortcutKeys:A,tooltip:T,tooltipOptions:L})}),t.jsxs(o.DialogContent,{children:[t.jsx(o.DialogTitle,{children:e("editor.callout.dialog.title")}),t.jsxs("div",{className:"richtext-space-y-4 richtext-py-4",children:[t.jsxs("div",{className:"richtext-space-y-2",children:[t.jsx(o.Label,{children:e("editor.callout.dialog.type")}),t.jsxs(s.Select,{onValueChange:h,value:d,children:[t.jsx(s.SelectTrigger,{children:t.jsx(s.SelectValue,{placeholder:e("editor.callout.dialog.type.placeholder")})}),t.jsx(s.SelectContent,{children:w.map(i=>t.jsx(s.SelectItem,{value:i.value,children:e(`editor.callout.type.${i.value}`)},i.value))})]})]}),t.jsxs("div",{className:"richtext-space-y-2",children:[t.jsx(o.Label,{children:e("editor.callout.dialog.title.label")}),t.jsx(o.Input,{onChange:i=>g(i.target.value),placeholder:e("editor.callout.dialog.title.placeholder"),value:b})]}),t.jsxs("div",{className:"richtext-space-y-2",children:[t.jsx(o.Label,{children:e("editor.callout.dialog.body.label")}),t.jsx(o.Input,{onChange:i=>v(i.target.value),placeholder:e("editor.callout.dialog.body.placeholder"),value:f})]})]}),t.jsxs(o.DialogFooter,{children:[t.jsx(o.Button,{onClick:()=>n(!1),variant:"outline",children:e("editor.callout.dialog.button.cancel")}),t.jsx(o.Button,{onClick:I,children:e("editor.callout.dialog.button.apply")})]})]})]}):t.jsx(t.Fragment,{})}function p(e){return l=>l.getAttribute(e)}const C=a.Node3.create({name:"callout",group:"block",selectable:!0,atom:!0,draggable:!0,inline:!1,addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),HTMLAttributes:{class:"callout"},button:({editor:l,t:r})=>({component:o.ActionButton,componentProps:{action:()=>!0,isActive:()=>l.isActive("callout"),disabled:!1,icon:"Callout",tooltip:r("editor.callout.tooltip")}})}},parseHTML(){return[{tag:"div.callout"}]},renderHTML({HTMLAttributes:e}){return["div",a.mergeAttributes(this.options&&this.options.HTMLAttributes||{},e)]},addAttributes(){return{type:{default:"",parseHTML:p("type")},title:{default:"",parseHTML:p("title")},body:{default:"",parseHTML:p("body")}}},addCommands(){return{setCallout:e=>({chain:l})=>l().insertContent({type:this.name,attrs:e}).run()}},addNodeView(){return a.ReactNodeViewRenderer(q)}});exports.Callout=C;exports.RichTextCallout=M;
|
package/lib/Callout.js
ADDED
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { h as D, j as x, N as H, k as M, m as B } from "./clsx-CDyrfCnw.js";
|
|
2
|
+
import { h as V, u as j, d as P, D as E, m as R, A as T, n as W, o as F, L as u, j as v, p as U, B as C } from "./index-lj3VWExo.js";
|
|
3
|
+
import { jsx as o, jsxs as l, Fragment as Y } from "react/jsx-runtime";
|
|
4
|
+
import { useState as s } from "react";
|
|
5
|
+
import "./theme.js";
|
|
6
|
+
import { Info as _, Lightbulb as $, AlertCircle as z, TriangleAlert as K, OctagonAlert as q } from "lucide-react";
|
|
7
|
+
import { S as G, a as J, b as Q, c as X, d as Z } from "./select-CuE_HaQJ.js";
|
|
8
|
+
import { u as tt } from "./index-4Q5IhypJ.js";
|
|
9
|
+
const y = [
|
|
10
|
+
{
|
|
11
|
+
value: "note",
|
|
12
|
+
label: "Note",
|
|
13
|
+
icon: _,
|
|
14
|
+
color: "#1f6feb",
|
|
15
|
+
background: "#1f6feb1f"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
value: "tip",
|
|
19
|
+
label: "Tip",
|
|
20
|
+
icon: $,
|
|
21
|
+
color: "#238636",
|
|
22
|
+
background: "#2386361f"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
value: "important",
|
|
26
|
+
label: "Important",
|
|
27
|
+
icon: z,
|
|
28
|
+
color: "#ab7df8",
|
|
29
|
+
background: "#ab7df81f"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
value: "warning",
|
|
33
|
+
label: "Warning",
|
|
34
|
+
icon: K,
|
|
35
|
+
color: "#d29922",
|
|
36
|
+
background: "#d299221f"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
value: "caution",
|
|
40
|
+
label: "Caution",
|
|
41
|
+
icon: q,
|
|
42
|
+
color: "#f85149",
|
|
43
|
+
background: "#f851491f"
|
|
44
|
+
}
|
|
45
|
+
];
|
|
46
|
+
function et({ node: t }) {
|
|
47
|
+
const { type: e = "note", title: a = "", body: n = "" } = t.attrs, c = (y.find((d) => d.value === e) || y[0]).icon;
|
|
48
|
+
return /* @__PURE__ */ o(D, { children: /* @__PURE__ */ l(
|
|
49
|
+
"div",
|
|
50
|
+
{
|
|
51
|
+
className: x(
|
|
52
|
+
"richtext-relative richtext-my-4 richtext-rounded-lg richtext-border richtext-p-4",
|
|
53
|
+
{
|
|
54
|
+
"richtext-bg-[#1f6feb1f] richtext-border-[#1f6feb]": e === "note",
|
|
55
|
+
"richtext-bg-[#2386361f] richtext-border-[#238636]": e === "tip",
|
|
56
|
+
"richtext-bg-[#ab7df81f] richtext-border-[#ab7df8]": e === "important",
|
|
57
|
+
"richtext-bg-[#d299221f] richtext-border-[#d29922]": e === "warning",
|
|
58
|
+
"richtext-bg-[#f851491f] richtext-border-[#f85149]": e === "caution"
|
|
59
|
+
}
|
|
60
|
+
),
|
|
61
|
+
children: [
|
|
62
|
+
/* @__PURE__ */ l(
|
|
63
|
+
"div",
|
|
64
|
+
{
|
|
65
|
+
className: x("richtext-mb-2 richtext-flex richtext-items-center richtext-gap-2", {
|
|
66
|
+
"richtext-text-[#1f6feb]": e === "note",
|
|
67
|
+
"richtext-text-[#238636]": e === "tip",
|
|
68
|
+
"richtext-text-[#ab7df8]": e === "important",
|
|
69
|
+
"richtext-text-[#d29922]": e === "warning",
|
|
70
|
+
"richtext-text-[#f85149]": e === "caution"
|
|
71
|
+
}),
|
|
72
|
+
children: [
|
|
73
|
+
/* @__PURE__ */ o(c, { className: "richtext-size-5" }),
|
|
74
|
+
/* @__PURE__ */ o("span", { className: "richtext-font-semibold", children: a })
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
),
|
|
78
|
+
n && /* @__PURE__ */ o("p", { className: "richtext-pl-[28px]", children: n })
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
) });
|
|
82
|
+
}
|
|
83
|
+
const ot = [
|
|
84
|
+
{ value: "note", label: "Note", icon: "Info" },
|
|
85
|
+
{ value: "tip", label: "Tip", icon: "Lightbulb" },
|
|
86
|
+
{ value: "important", label: "Important", icon: "AlertCircle" },
|
|
87
|
+
{ value: "warning", label: "Warning", icon: "TriangleAlert" },
|
|
88
|
+
{ value: "caution", label: "Caution", icon: "OctagonAlert" }
|
|
89
|
+
];
|
|
90
|
+
function ht() {
|
|
91
|
+
const { t } = tt(), e = V(), a = j(lt.name), [n, i] = s(!1), [c, d] = s("note"), [p, b] = s(""), [g, f] = s(""), {
|
|
92
|
+
icon: A = void 0,
|
|
93
|
+
tooltip: N = void 0,
|
|
94
|
+
shortcutKeys: L = void 0,
|
|
95
|
+
tooltipOptions: S = {},
|
|
96
|
+
isActive: k = void 0
|
|
97
|
+
} = (a == null ? void 0 : a.componentProps) ?? {}, { dataState: I, disabled: m } = P(k), w = () => {
|
|
98
|
+
e && (e.chain().focus().setCallout({ type: c, title: p, body: g }).run(), i(!1), d("note"), b(""), f(""));
|
|
99
|
+
}, O = () => {
|
|
100
|
+
m || i(!0);
|
|
101
|
+
};
|
|
102
|
+
return a ? /* @__PURE__ */ l(E, { onOpenChange: i, open: n, children: [
|
|
103
|
+
/* @__PURE__ */ o(R, { asChild: !0, children: /* @__PURE__ */ o(
|
|
104
|
+
T,
|
|
105
|
+
{
|
|
106
|
+
action: O,
|
|
107
|
+
dataState: I,
|
|
108
|
+
disabled: m,
|
|
109
|
+
icon: A,
|
|
110
|
+
shortcutKeys: L,
|
|
111
|
+
tooltip: N,
|
|
112
|
+
tooltipOptions: S
|
|
113
|
+
}
|
|
114
|
+
) }),
|
|
115
|
+
/* @__PURE__ */ l(W, { children: [
|
|
116
|
+
/* @__PURE__ */ o(F, { children: t("editor.callout.dialog.title") }),
|
|
117
|
+
/* @__PURE__ */ l("div", { className: "richtext-space-y-4 richtext-py-4", children: [
|
|
118
|
+
/* @__PURE__ */ l("div", { className: "richtext-space-y-2", children: [
|
|
119
|
+
/* @__PURE__ */ o(u, { children: t("editor.callout.dialog.type") }),
|
|
120
|
+
/* @__PURE__ */ l(G, { onValueChange: d, value: c, children: [
|
|
121
|
+
/* @__PURE__ */ o(J, { children: /* @__PURE__ */ o(Q, { placeholder: t("editor.callout.dialog.type.placeholder") }) }),
|
|
122
|
+
/* @__PURE__ */ o(X, { children: ot.map((r) => /* @__PURE__ */ o(Z, { value: r.value, children: t(`editor.callout.type.${r.value}`) }, r.value)) })
|
|
123
|
+
] })
|
|
124
|
+
] }),
|
|
125
|
+
/* @__PURE__ */ l("div", { className: "richtext-space-y-2", children: [
|
|
126
|
+
/* @__PURE__ */ o(u, { children: t("editor.callout.dialog.title.label") }),
|
|
127
|
+
/* @__PURE__ */ o(
|
|
128
|
+
v,
|
|
129
|
+
{
|
|
130
|
+
onChange: (r) => b(r.target.value),
|
|
131
|
+
placeholder: t("editor.callout.dialog.title.placeholder"),
|
|
132
|
+
value: p
|
|
133
|
+
}
|
|
134
|
+
)
|
|
135
|
+
] }),
|
|
136
|
+
/* @__PURE__ */ l("div", { className: "richtext-space-y-2", children: [
|
|
137
|
+
/* @__PURE__ */ o(u, { children: t("editor.callout.dialog.body.label") }),
|
|
138
|
+
/* @__PURE__ */ o(
|
|
139
|
+
v,
|
|
140
|
+
{
|
|
141
|
+
onChange: (r) => f(r.target.value),
|
|
142
|
+
placeholder: t("editor.callout.dialog.body.placeholder"),
|
|
143
|
+
value: g
|
|
144
|
+
}
|
|
145
|
+
)
|
|
146
|
+
] })
|
|
147
|
+
] }),
|
|
148
|
+
/* @__PURE__ */ l(U, { children: [
|
|
149
|
+
/* @__PURE__ */ o(C, { onClick: () => i(!1), variant: "outline", children: t("editor.callout.dialog.button.cancel") }),
|
|
150
|
+
/* @__PURE__ */ o(C, { onClick: w, children: t("editor.callout.dialog.button.apply") })
|
|
151
|
+
] })
|
|
152
|
+
] })
|
|
153
|
+
] }) : /* @__PURE__ */ o(Y, {});
|
|
154
|
+
}
|
|
155
|
+
function h(t) {
|
|
156
|
+
return (e) => e.getAttribute(t);
|
|
157
|
+
}
|
|
158
|
+
const lt = /* @__PURE__ */ H.create({
|
|
159
|
+
name: "callout",
|
|
160
|
+
group: "block",
|
|
161
|
+
selectable: !0,
|
|
162
|
+
atom: !0,
|
|
163
|
+
draggable: !0,
|
|
164
|
+
inline: !1,
|
|
165
|
+
//@ts-expect-error
|
|
166
|
+
addOptions() {
|
|
167
|
+
var t;
|
|
168
|
+
return {
|
|
169
|
+
...(t = this.parent) == null ? void 0 : t.call(this),
|
|
170
|
+
HTMLAttributes: {
|
|
171
|
+
class: "callout"
|
|
172
|
+
},
|
|
173
|
+
button: ({ editor: e, t: a }) => ({
|
|
174
|
+
component: T,
|
|
175
|
+
componentProps: {
|
|
176
|
+
action: () => !0,
|
|
177
|
+
isActive: () => e.isActive("callout"),
|
|
178
|
+
disabled: !1,
|
|
179
|
+
icon: "Callout",
|
|
180
|
+
tooltip: a("editor.callout.tooltip")
|
|
181
|
+
}
|
|
182
|
+
})
|
|
183
|
+
};
|
|
184
|
+
},
|
|
185
|
+
parseHTML() {
|
|
186
|
+
return [{ tag: "div.callout" }];
|
|
187
|
+
},
|
|
188
|
+
renderHTML({ HTMLAttributes: t }) {
|
|
189
|
+
return [
|
|
190
|
+
"div",
|
|
191
|
+
B(this.options && this.options.HTMLAttributes || {}, t)
|
|
192
|
+
];
|
|
193
|
+
},
|
|
194
|
+
addAttributes() {
|
|
195
|
+
return {
|
|
196
|
+
type: {
|
|
197
|
+
default: "",
|
|
198
|
+
parseHTML: h("type")
|
|
199
|
+
},
|
|
200
|
+
title: {
|
|
201
|
+
default: "",
|
|
202
|
+
parseHTML: h("title")
|
|
203
|
+
},
|
|
204
|
+
body: {
|
|
205
|
+
default: "",
|
|
206
|
+
parseHTML: h("body")
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
},
|
|
210
|
+
addCommands() {
|
|
211
|
+
return {
|
|
212
|
+
setCallout: (t) => ({ chain: e }) => e().insertContent({
|
|
213
|
+
type: this.name,
|
|
214
|
+
attrs: t
|
|
215
|
+
}).run()
|
|
216
|
+
};
|
|
217
|
+
},
|
|
218
|
+
addNodeView() {
|
|
219
|
+
return M(et);
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
export {
|
|
223
|
+
lt as Callout,
|
|
224
|
+
ht as RichTextCallout
|
|
225
|
+
};
|
package/lib/Clear.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./clsx-CXbNJWDD.cjs"),n=require("react/jsx-runtime"),i=require("./index-D9oM__YW.cjs");function v(){const t=i.useButtonProps(s.name),{icon:e=void 0,tooltip:o=void 0,shortcutKeys:a=void 0,tooltipOptions:u={},action:r=void 0,isActive:l=void 0}=(t==null?void 0:t.componentProps)??{},{disabled:c}=i.useActive(l),d=()=>{c||r&&r()};return t?n.jsx(i.ActionButton,{action:d,disabled:c,icon:e,shortcutKeys:a,tooltip:o,tooltipOptions:u}):n.jsx(n.Fragment,{})}const s=p.Node3.create({name:"clear",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,t:o})=>({componentProps:{action:()=>e.chain().focus().clearNodes().unsetAllMarks().run(),isActive:()=>e.can().chain().focus().clearNodes().unsetAllMarks().run(),icon:"Eraser",tooltip:o("editor.clear.tooltip")}})}}});exports.Clear=s;exports.RichTextClear=v;
|
package/lib/Clear.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { N as l } from "./clsx-CDyrfCnw.js";
|
|
2
|
+
import { jsx as r, Fragment as p } from "react/jsx-runtime";
|
|
3
|
+
import { u as d, e as m, A as f } from "./index-lj3VWExo.js";
|
|
4
|
+
function x() {
|
|
5
|
+
const o = d(v.name), {
|
|
6
|
+
icon: t = void 0,
|
|
7
|
+
tooltip: n = void 0,
|
|
8
|
+
shortcutKeys: s = void 0,
|
|
9
|
+
tooltipOptions: c = {},
|
|
10
|
+
action: i = void 0,
|
|
11
|
+
isActive: a = void 0
|
|
12
|
+
} = (o == null ? void 0 : o.componentProps) ?? {}, { disabled: e } = m(a), u = () => {
|
|
13
|
+
e || i && i();
|
|
14
|
+
};
|
|
15
|
+
return o ? /* @__PURE__ */ r(
|
|
16
|
+
f,
|
|
17
|
+
{
|
|
18
|
+
action: u,
|
|
19
|
+
disabled: e,
|
|
20
|
+
icon: t,
|
|
21
|
+
shortcutKeys: s,
|
|
22
|
+
tooltip: n,
|
|
23
|
+
tooltipOptions: c
|
|
24
|
+
}
|
|
25
|
+
) : /* @__PURE__ */ r(p, {});
|
|
26
|
+
}
|
|
27
|
+
const v = /* @__PURE__ */ l.create({
|
|
28
|
+
name: "clear",
|
|
29
|
+
//@ts-expect-error
|
|
30
|
+
addOptions() {
|
|
31
|
+
var o;
|
|
32
|
+
return {
|
|
33
|
+
...(o = this.parent) == null ? void 0 : o.call(this),
|
|
34
|
+
button: ({ editor: t, t: n }) => ({
|
|
35
|
+
// component: ActionButton,
|
|
36
|
+
componentProps: {
|
|
37
|
+
action: () => t.chain().focus().clearNodes().unsetAllMarks().run(),
|
|
38
|
+
isActive: () => t.can().chain().focus().clearNodes().unsetAllMarks().run(),
|
|
39
|
+
icon: "Eraser",
|
|
40
|
+
tooltip: n("editor.clear.tooltip")
|
|
41
|
+
}
|
|
42
|
+
})
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
export {
|
|
47
|
+
v as Clear,
|
|
48
|
+
x as RichTextClear
|
|
49
|
+
};
|
package/lib/Code.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./clsx-CXbNJWDD.cjs"),i=require("react/jsx-runtime"),s=require("./index-D9oM__YW.cjs");require("react");require("./theme.cjs");var h=/(^|[^`])`([^`]+)`(?!`)$/,x=/(^|[^`])`([^`]+)`(?!`)/g,C=o.Mark.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",o.mergeAttributes(this.options.HTMLAttributes,e),0]},markdownTokenName:"codespan",parseMarkdown:(e,t)=>t.applyMark("code",[{type:"text",text:e.text||""}]),renderMarkdown:(e,t)=>e.content?`\`${t.renderChildren(e.content)}\``:"",addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[o.markInputRule({find:h,type:this.type})]},addPasteRules(){return[o.markPasteRule({find:x,type:this.type})]}});function v(){const e=s.useButtonProps(u.name),{icon:t=void 0,tooltip:r=void 0,shortcutKeys:n=void 0,tooltipOptions:c={},action:d=void 0,isActive:p=void 0}=(e==null?void 0:e.componentProps)??{},{dataState:l,disabled:a,update:m}=s.useToggleActive(p),g=()=>{a||d&&(d(),m())};return e?i.jsx(s.ActionButton,{action:g,dataState:l,disabled:a,icon:t,shortcutKeys:n,tooltip:r,tooltipOptions:c}):i.jsx(i.Fragment,{})}const u=C.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,t:r,extension:n})=>({componentProps:{action:()=>t.commands.toggleCode(),isActive:()=>t.isActive("code"),disabled:!t.can().toggleCode(),icon:"Code",shortcutKeys:n.options.shortcutKeys??["mod","E"],tooltip:r("editor.code.tooltip")}})}}});exports.Code=u;exports.RichTextCode=v;
|
package/lib/Code.js
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { M as m, e as l, f as g, m as h } from "./clsx-CDyrfCnw.js";
|
|
2
|
+
import { jsx as a, Fragment as M } from "react/jsx-runtime";
|
|
3
|
+
import { u as v, d as C, A as f } from "./index-lj3VWExo.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import "./theme.js";
|
|
6
|
+
var k = /(^|[^`])`([^`]+)`(?!`)$/, x = /(^|[^`])`([^`]+)`(?!`)/g, y = m.create({
|
|
7
|
+
name: "code",
|
|
8
|
+
addOptions() {
|
|
9
|
+
return {
|
|
10
|
+
HTMLAttributes: {}
|
|
11
|
+
};
|
|
12
|
+
},
|
|
13
|
+
excludes: "_",
|
|
14
|
+
code: !0,
|
|
15
|
+
exitable: !0,
|
|
16
|
+
parseHTML() {
|
|
17
|
+
return [{ tag: "code" }];
|
|
18
|
+
},
|
|
19
|
+
renderHTML({ HTMLAttributes: t }) {
|
|
20
|
+
return ["code", h(this.options.HTMLAttributes, t), 0];
|
|
21
|
+
},
|
|
22
|
+
markdownTokenName: "codespan",
|
|
23
|
+
parseMarkdown: (t, e) => e.applyMark("code", [{ type: "text", text: t.text || "" }]),
|
|
24
|
+
renderMarkdown: (t, e) => t.content ? `\`${e.renderChildren(t.content)}\`` : "",
|
|
25
|
+
addCommands() {
|
|
26
|
+
return {
|
|
27
|
+
setCode: () => ({ commands: t }) => t.setMark(this.name),
|
|
28
|
+
toggleCode: () => ({ commands: t }) => t.toggleMark(this.name),
|
|
29
|
+
unsetCode: () => ({ commands: t }) => t.unsetMark(this.name)
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
addKeyboardShortcuts() {
|
|
33
|
+
return {
|
|
34
|
+
"Mod-e": () => this.editor.commands.toggleCode()
|
|
35
|
+
};
|
|
36
|
+
},
|
|
37
|
+
addInputRules() {
|
|
38
|
+
return [
|
|
39
|
+
g({
|
|
40
|
+
find: k,
|
|
41
|
+
type: this.type
|
|
42
|
+
})
|
|
43
|
+
];
|
|
44
|
+
},
|
|
45
|
+
addPasteRules() {
|
|
46
|
+
return [
|
|
47
|
+
l({
|
|
48
|
+
find: x,
|
|
49
|
+
type: this.type
|
|
50
|
+
})
|
|
51
|
+
];
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
function L() {
|
|
55
|
+
const t = v(A.name), {
|
|
56
|
+
icon: e = void 0,
|
|
57
|
+
tooltip: o = void 0,
|
|
58
|
+
shortcutKeys: r = void 0,
|
|
59
|
+
tooltipOptions: d = {},
|
|
60
|
+
action: n = void 0,
|
|
61
|
+
isActive: i = void 0
|
|
62
|
+
} = (t == null ? void 0 : t.componentProps) ?? {}, { dataState: u, disabled: s, update: c } = C(i), p = () => {
|
|
63
|
+
s || n && (n(), c());
|
|
64
|
+
};
|
|
65
|
+
return t ? /* @__PURE__ */ a(
|
|
66
|
+
f,
|
|
67
|
+
{
|
|
68
|
+
action: p,
|
|
69
|
+
dataState: u,
|
|
70
|
+
disabled: s,
|
|
71
|
+
icon: e,
|
|
72
|
+
shortcutKeys: r,
|
|
73
|
+
tooltip: o,
|
|
74
|
+
tooltipOptions: d
|
|
75
|
+
}
|
|
76
|
+
) : /* @__PURE__ */ a(M, {});
|
|
77
|
+
}
|
|
78
|
+
const A = /* @__PURE__ */ y.extend({
|
|
79
|
+
//@ts-expect-error
|
|
80
|
+
addOptions() {
|
|
81
|
+
var t;
|
|
82
|
+
return {
|
|
83
|
+
...(t = this.parent) == null ? void 0 : t.call(this),
|
|
84
|
+
button: ({ editor: e, t: o, extension: r }) => ({
|
|
85
|
+
componentProps: {
|
|
86
|
+
action: () => e.commands.toggleCode(),
|
|
87
|
+
isActive: () => e.isActive("code"),
|
|
88
|
+
disabled: !e.can().toggleCode(),
|
|
89
|
+
icon: "Code",
|
|
90
|
+
shortcutKeys: r.options.shortcutKeys ?? ["mod", "E"],
|
|
91
|
+
tooltip: o("editor.code.tooltip")
|
|
92
|
+
}
|
|
93
|
+
})
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
export {
|
|
98
|
+
A as Code,
|
|
99
|
+
L as RichTextCode
|
|
100
|
+
};
|