@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/Table.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Table-BEhNBeuA.cjs");exports.RichTextTable=e.RichTextTable;exports.Table=e.Table;
|
package/lib/Table.js
ADDED
package/lib/TaskList.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index-BCzvbrf5.cjs"),e=require("react/jsx-runtime"),n=require("./index-D9oM__YW.cjs");require("react");require("./theme.cjs");function k(){const t=n.useButtonProps(u.name),{icon:s=void 0,tooltip:i=void 0,shortcutKeys:o=void 0,tooltipOptions:d={},action:a=void 0,isActive:l=void 0}=(t==null?void 0:t.componentProps)??{},{dataState:p,disabled:r,update:m}=n.useToggleActive(l),T=()=>{r||a&&(a(),m())};return t?e.jsx(n.ActionButton,{action:T,dataState:p,disabled:r,icon:s,shortcutKeys:o,tooltip:i,tooltipOptions:d}):e.jsx(e.Fragment,{})}const u=c.TaskList.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),HTMLAttributes:{class:"task-list"},taskItem:{HTMLAttributes:{class:"task-list-item"}},button:({editor:s,t:i,extension:o})=>({componentProps:{action:()=>s.commands.toggleTaskList(),isActive:()=>s.isActive("taskList"),disabled:!1,icon:"ListTodo",shortcutKeys:o.options.shortcutKeys??["shift","mod","9"],tooltip:i("editor.tasklist.tooltip")}})}},addExtensions(){return[c.TaskItem.configure(this.options.taskItem)]}});exports.RichTextTaskList=k;exports.TaskList=u;
|
package/lib/TaskList.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { T as u, a as l } from "./index-DjDf4BK8.js";
|
|
2
|
+
import { jsx as a, Fragment as k } from "react/jsx-runtime";
|
|
3
|
+
import { u as T, d as f, A as v } from "./index-lj3VWExo.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import "./theme.js";
|
|
6
|
+
function y() {
|
|
7
|
+
const t = T(A.name), {
|
|
8
|
+
icon: s = void 0,
|
|
9
|
+
tooltip: o = void 0,
|
|
10
|
+
shortcutKeys: i = void 0,
|
|
11
|
+
tooltipOptions: r = {},
|
|
12
|
+
action: e = void 0,
|
|
13
|
+
isActive: c = void 0
|
|
14
|
+
} = (t == null ? void 0 : t.componentProps) ?? {}, { dataState: d, disabled: n, update: p } = f(c), m = () => {
|
|
15
|
+
n || e && (e(), p());
|
|
16
|
+
};
|
|
17
|
+
return t ? /* @__PURE__ */ a(
|
|
18
|
+
v,
|
|
19
|
+
{
|
|
20
|
+
action: m,
|
|
21
|
+
dataState: d,
|
|
22
|
+
disabled: n,
|
|
23
|
+
icon: s,
|
|
24
|
+
shortcutKeys: i,
|
|
25
|
+
tooltip: o,
|
|
26
|
+
tooltipOptions: r
|
|
27
|
+
}
|
|
28
|
+
) : /* @__PURE__ */ a(k, {});
|
|
29
|
+
}
|
|
30
|
+
const A = /* @__PURE__ */ u.extend({
|
|
31
|
+
//@ts-expect-error
|
|
32
|
+
addOptions() {
|
|
33
|
+
var t;
|
|
34
|
+
return {
|
|
35
|
+
...(t = this.parent) == null ? void 0 : t.call(this),
|
|
36
|
+
HTMLAttributes: {
|
|
37
|
+
class: "task-list"
|
|
38
|
+
},
|
|
39
|
+
taskItem: {
|
|
40
|
+
HTMLAttributes: {
|
|
41
|
+
class: "task-list-item"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
button: ({ editor: s, t: o, extension: i }) => ({
|
|
45
|
+
componentProps: {
|
|
46
|
+
action: () => s.commands.toggleTaskList(),
|
|
47
|
+
isActive: () => s.isActive("taskList"),
|
|
48
|
+
disabled: !1,
|
|
49
|
+
icon: "ListTodo",
|
|
50
|
+
shortcutKeys: i.options.shortcutKeys ?? ["shift", "mod", "9"],
|
|
51
|
+
tooltip: o("editor.tasklist.tooltip")
|
|
52
|
+
}
|
|
53
|
+
})
|
|
54
|
+
};
|
|
55
|
+
},
|
|
56
|
+
addExtensions() {
|
|
57
|
+
return [l.configure(this.options.taskItem)];
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
export {
|
|
61
|
+
y as RichTextTaskList,
|
|
62
|
+
A as TaskList
|
|
63
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const M=require("./clsx-CXbNJWDD.cjs"),s=require("react/jsx-runtime"),y=require("react"),r=require("./index-D9oM__YW.cjs");require("./theme.cjs");const T=require("./popover-D-hUKDYu.cjs");var S=M.Extension.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:e=>{const t=e.style.textAlign;return this.options.alignments.includes(t)?t:this.options.defaultAlignment},renderHTML:e=>e.textAlign?{style:`text-align: ${e.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:e=>({commands:t})=>this.options.alignments.includes(e)?this.options.types.map(n=>t.updateAttributes(n,{textAlign:e})).some(n=>n):!1,unsetTextAlign:()=>({commands:e})=>this.options.types.map(t=>e.resetAttributes(t,"textAlign")).some(t=>t),toggleTextAlign:e=>({editor:t,commands:n})=>this.options.alignments.includes(e)?t.isActive({textAlign:e})?n.unsetTextAlign():n.setTextAlign(e):!1}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),C=S;function K(){const[e,t]=y.useState(!1),n=r.useButtonProps(b.name),{icon:x=void 0,tooltip:A=void 0,items:l=[],isActive:m=void 0}=(n==null?void 0:n.componentProps)??{},{disabled:c,dataState:a}=r.useActive(m),h=y.useMemo(()=>(a==null?void 0:a.title)||"",[a]),d=y.useMemo(()=>l==null?void 0:l.some(i=>i.title===h),[l,h]);return n?s.jsxs(T.Popover,{modal:!0,onOpenChange:t,open:e,children:[s.jsx(T.PopoverTrigger,{asChild:!0,className:"hover:richtext-bg-accent data-[state=on]:richtext-bg-accent","data-state":d?"on":"off",disabled:c,children:s.jsx(r.ActionButton,{customClass:"!richtext-w-12 richtext-h-12",disabled:c,icon:x,tooltip:A,children:s.jsx(r.IconComponent,{className:"richtext-ml-1 richtext-size-3 richtext-text-zinc-500",name:"MenuDown"})})}),s.jsx(T.PopoverContent,{align:"start",className:"richtext-flex richtext-w-full richtext-min-w-4 richtext-flex-row richtext-gap-1 !richtext-p-[4px]",side:"bottom",children:l==null?void 0:l.map((i,p)=>{var o,u;return s.jsxs(r.Tooltip,{children:[s.jsx(r.TooltipTrigger,{asChild:!0,children:s.jsx(r.Toggle,{className:"richtext-size-7 richtext-p-1","data-state":h===i.title?"on":"off",size:"sm",onClick:()=>{i==null||i.action(),t(!1)},children:(i==null?void 0:i.icon)&&s.jsx(r.IconComponent,{name:i.icon})})}),s.jsxs(r.TooltipContent,{className:"richtext-flex richtext-flex-col richtext-items-center",children:[s.jsx("span",{children:i.title}),!!((o=i.shortcutKeys)!=null&&o.length)&&s.jsx("span",{children:(u=i.shortcutKeys)==null?void 0:u.map(g=>r.getShortcutKey(g)).join(" ")})]})]},`text-align-${p}`)})})]}):s.jsx(s.Fragment,{})}const b=C.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),types:["heading","paragraph","list_item","title"],button({editor:t,extension:n,t:x}){var a,h,d,i,p;const A=((a=n.options)==null?void 0:a.alignments)||[],l={left:((h=n.options.shortcutKeys)==null?void 0:h[0])??["mod","Shift","L"],center:((d=n.options.shortcutKeys)==null?void 0:d[1])??["mod","Shift","E"],right:((i=n.options.shortcutKeys)==null?void 0:i[2])??["mod","Shift","R"],justify:((p=n.options.shortcutKeys)==null?void 0:p[3])??["mod","Shift","J"]},m={left:"AlignLeft",center:"AlignCenter",right:"AlignRight",justify:"AlignJustify"},c=A.map(o=>{var u,g,j;return{title:x(`editor.textalign.${o}.tooltip`),icon:m[o],shortcutKeys:l[o],isActive:()=>t.isActive({textAlign:o})||!1,action:()=>{var f,v;return(v=(f=t.commands)==null?void 0:f.setTextAlign)==null?void 0:v.call(f,o)},disabled:!((j=(g=(u=t==null?void 0:t.can)==null?void 0:u.call(t))==null?void 0:g.setTextAlign)!=null&&j.call(g,o))}});return{componentProps:{icon:"AlignJustify",tooltip:x("editor.textalign.tooltip"),items:c,isActive:()=>c==null?void 0:c.find(u=>u.isActive())}}}}}});exports.RichTextAlign=K;exports.TextAlign=b;
|
package/lib/TextAlign.js
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { E as C } from "./clsx-CDyrfCnw.js";
|
|
2
|
+
import { jsx as o, Fragment as K, jsxs as m } from "react/jsx-runtime";
|
|
3
|
+
import M, { useMemo as v } from "react";
|
|
4
|
+
import { u as S, e as j, A as P, I as b, T as w, a as N, k as z, b as L, l as O } from "./index-lj3VWExo.js";
|
|
5
|
+
import "./theme.js";
|
|
6
|
+
import { P as R, a as _, b as $ } from "./popover-CPr9bHYn.js";
|
|
7
|
+
var E = C.create({
|
|
8
|
+
name: "textAlign",
|
|
9
|
+
addOptions() {
|
|
10
|
+
return {
|
|
11
|
+
types: [],
|
|
12
|
+
alignments: ["left", "center", "right", "justify"],
|
|
13
|
+
defaultAlignment: null
|
|
14
|
+
};
|
|
15
|
+
},
|
|
16
|
+
addGlobalAttributes() {
|
|
17
|
+
return [
|
|
18
|
+
{
|
|
19
|
+
types: this.options.types,
|
|
20
|
+
attributes: {
|
|
21
|
+
textAlign: {
|
|
22
|
+
default: this.options.defaultAlignment,
|
|
23
|
+
parseHTML: (e) => {
|
|
24
|
+
const t = e.style.textAlign;
|
|
25
|
+
return this.options.alignments.includes(t) ? t : this.options.defaultAlignment;
|
|
26
|
+
},
|
|
27
|
+
renderHTML: (e) => e.textAlign ? { style: `text-align: ${e.textAlign}` } : {}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
];
|
|
32
|
+
},
|
|
33
|
+
addCommands() {
|
|
34
|
+
return {
|
|
35
|
+
setTextAlign: (e) => ({ commands: t }) => this.options.alignments.includes(e) ? this.options.types.map((n) => t.updateAttributes(n, { textAlign: e })).some((n) => n) : !1,
|
|
36
|
+
unsetTextAlign: () => ({ commands: e }) => this.options.types.map((t) => e.resetAttributes(t, "textAlign")).some((t) => t),
|
|
37
|
+
toggleTextAlign: (e) => ({ editor: t, commands: n }) => this.options.alignments.includes(e) ? t.isActive({ textAlign: e }) ? n.unsetTextAlign() : n.setTextAlign(e) : !1
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
addKeyboardShortcuts() {
|
|
41
|
+
return {
|
|
42
|
+
"Mod-Shift-l": () => this.editor.commands.setTextAlign("left"),
|
|
43
|
+
"Mod-Shift-e": () => this.editor.commands.setTextAlign("center"),
|
|
44
|
+
"Mod-Shift-r": () => this.editor.commands.setTextAlign("right"),
|
|
45
|
+
"Mod-Shift-j": () => this.editor.commands.setTextAlign("justify")
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
}), J = E;
|
|
49
|
+
function Q() {
|
|
50
|
+
const [e, t] = M.useState(!1), n = S(B.name), {
|
|
51
|
+
icon: g = void 0,
|
|
52
|
+
tooltip: x = void 0,
|
|
53
|
+
items: r = [],
|
|
54
|
+
isActive: A = void 0
|
|
55
|
+
} = (n == null ? void 0 : n.componentProps) ?? {}, { disabled: l, dataState: a } = j(A), h = v(() => (a == null ? void 0 : a.title) || "", [a]), p = v(() => r == null ? void 0 : r.some((i) => i.title === h), [r, h]);
|
|
56
|
+
return n ? /* @__PURE__ */ m(R, { modal: !0, onOpenChange: t, open: e, children: [
|
|
57
|
+
/* @__PURE__ */ o(
|
|
58
|
+
_,
|
|
59
|
+
{
|
|
60
|
+
asChild: !0,
|
|
61
|
+
className: "hover:richtext-bg-accent data-[state=on]:richtext-bg-accent",
|
|
62
|
+
"data-state": p ? "on" : "off",
|
|
63
|
+
disabled: l,
|
|
64
|
+
children: /* @__PURE__ */ o(
|
|
65
|
+
P,
|
|
66
|
+
{
|
|
67
|
+
customClass: "!richtext-w-12 richtext-h-12",
|
|
68
|
+
disabled: l,
|
|
69
|
+
icon: g,
|
|
70
|
+
tooltip: x,
|
|
71
|
+
children: /* @__PURE__ */ o(
|
|
72
|
+
b,
|
|
73
|
+
{
|
|
74
|
+
className: "richtext-ml-1 richtext-size-3 richtext-text-zinc-500",
|
|
75
|
+
name: "MenuDown"
|
|
76
|
+
}
|
|
77
|
+
)
|
|
78
|
+
}
|
|
79
|
+
)
|
|
80
|
+
}
|
|
81
|
+
),
|
|
82
|
+
/* @__PURE__ */ o(
|
|
83
|
+
$,
|
|
84
|
+
{
|
|
85
|
+
align: "start",
|
|
86
|
+
className: "richtext-flex richtext-w-full richtext-min-w-4 richtext-flex-row richtext-gap-1 !richtext-p-[4px]",
|
|
87
|
+
side: "bottom",
|
|
88
|
+
children: r == null ? void 0 : r.map((i, d) => {
|
|
89
|
+
var s, c;
|
|
90
|
+
return /* @__PURE__ */ m(w, { children: [
|
|
91
|
+
/* @__PURE__ */ o(N, { asChild: !0, children: /* @__PURE__ */ o(
|
|
92
|
+
z,
|
|
93
|
+
{
|
|
94
|
+
className: "richtext-size-7 richtext-p-1",
|
|
95
|
+
"data-state": h === i.title ? "on" : "off",
|
|
96
|
+
size: "sm",
|
|
97
|
+
onClick: () => {
|
|
98
|
+
i == null || i.action(), t(!1);
|
|
99
|
+
},
|
|
100
|
+
children: (i == null ? void 0 : i.icon) && /* @__PURE__ */ o(b, { name: i.icon })
|
|
101
|
+
}
|
|
102
|
+
) }),
|
|
103
|
+
/* @__PURE__ */ m(L, { className: "richtext-flex richtext-flex-col richtext-items-center", children: [
|
|
104
|
+
/* @__PURE__ */ o("span", { children: i.title }),
|
|
105
|
+
!!((s = i.shortcutKeys) != null && s.length) && /* @__PURE__ */ o("span", { children: (c = i.shortcutKeys) == null ? void 0 : c.map((u) => O(u)).join(" ") })
|
|
106
|
+
] })
|
|
107
|
+
] }, `text-align-${d}`);
|
|
108
|
+
})
|
|
109
|
+
}
|
|
110
|
+
)
|
|
111
|
+
] }) : /* @__PURE__ */ o(K, {});
|
|
112
|
+
}
|
|
113
|
+
const B = /* @__PURE__ */ J.extend({
|
|
114
|
+
//@ts-expect-error
|
|
115
|
+
addOptions() {
|
|
116
|
+
var e;
|
|
117
|
+
return {
|
|
118
|
+
...(e = this.parent) == null ? void 0 : e.call(this),
|
|
119
|
+
types: ["heading", "paragraph", "list_item", "title"],
|
|
120
|
+
button({
|
|
121
|
+
editor: t,
|
|
122
|
+
extension: n,
|
|
123
|
+
t: g
|
|
124
|
+
}) {
|
|
125
|
+
var a, h, p, i, d;
|
|
126
|
+
const x = ((a = n.options) == null ? void 0 : a.alignments) || [], r = {
|
|
127
|
+
left: ((h = n.options.shortcutKeys) == null ? void 0 : h[0]) ?? ["mod", "Shift", "L"],
|
|
128
|
+
center: ((p = n.options.shortcutKeys) == null ? void 0 : p[1]) ?? ["mod", "Shift", "E"],
|
|
129
|
+
right: ((i = n.options.shortcutKeys) == null ? void 0 : i[2]) ?? ["mod", "Shift", "R"],
|
|
130
|
+
justify: ((d = n.options.shortcutKeys) == null ? void 0 : d[3]) ?? ["mod", "Shift", "J"]
|
|
131
|
+
}, A = {
|
|
132
|
+
left: "AlignLeft",
|
|
133
|
+
center: "AlignCenter",
|
|
134
|
+
right: "AlignRight",
|
|
135
|
+
justify: "AlignJustify"
|
|
136
|
+
}, l = x.map((s) => {
|
|
137
|
+
var c, u, y;
|
|
138
|
+
return {
|
|
139
|
+
title: g(`editor.textalign.${s}.tooltip`),
|
|
140
|
+
icon: A[s],
|
|
141
|
+
shortcutKeys: r[s],
|
|
142
|
+
isActive: () => t.isActive({ textAlign: s }) || !1,
|
|
143
|
+
action: () => {
|
|
144
|
+
var f, T;
|
|
145
|
+
return (T = (f = t.commands) == null ? void 0 : f.setTextAlign) == null ? void 0 : T.call(f, s);
|
|
146
|
+
},
|
|
147
|
+
disabled: !((y = (u = (c = t == null ? void 0 : t.can) == null ? void 0 : c.call(t)) == null ? void 0 : u.setTextAlign) != null && y.call(u, s))
|
|
148
|
+
};
|
|
149
|
+
});
|
|
150
|
+
return {
|
|
151
|
+
componentProps: {
|
|
152
|
+
icon: "AlignJustify",
|
|
153
|
+
tooltip: g("editor.textalign.tooltip"),
|
|
154
|
+
items: l,
|
|
155
|
+
isActive: () => l == null ? void 0 : l.find((c) => c.isActive())
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
export {
|
|
163
|
+
Q as RichTextAlign,
|
|
164
|
+
B as TextAlign
|
|
165
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("./clsx-CXbNJWDD.cjs"),e=require("react/jsx-runtime"),f=require("react"),o=require("./index-D9oM__YW.cjs");require("./theme.cjs");const T=require("./popover-D-hUKDYu.cjs");function v(){const n=o.useButtonProps(m.name),[s,u]=f.useState(!1),{icon:h=void 0,tooltip:d=void 0,items:l=[],isActive:p=void 0}=(n==null?void 0:n.componentProps)??{},{editorDisabled:a,dataState:i}=o.useActive(p),r=f.useMemo(()=>(i==null?void 0:i.dir)||"unset",[i]);return n?e.jsxs(T.Popover,{open:s,onOpenChange:u,modal:!0,children:[e.jsx(T.PopoverTrigger,{asChild:!0,disabled:a,children:e.jsx(o.ActionButton,{customClass:"!richtext-w-12 richtext-h-12",disabled:a,icon:h,tooltip:d,children:e.jsx(o.IconComponent,{className:"richtext-ml-1 richtext-size-3 richtext-text-zinc-500",name:"MenuDown"})})}),e.jsx(T.PopoverContent,{align:"start",className:"richtext-flex richtext-w-full richtext-min-w-4 richtext-flex-row richtext-gap-1 !richtext-p-[4px]",side:"bottom",hideWhenDetached:!0,children:l==null?void 0:l.map((t,c)=>{var x,g;return e.jsxs(o.Tooltip,{children:[e.jsx(o.TooltipTrigger,{"data-state":r===t.value?"on":"off",asChild:!0,children:e.jsx(o.Toggle,{className:"richtext-size-7 richtext-p-1",onClick:()=>{t==null||t.action(),u(!1)},size:"sm",children:(t==null?void 0:t.icon)&&e.jsx(o.IconComponent,{name:t.icon})})}),e.jsxs(o.TooltipContent,{className:"richtext-flex richtext-flex-col richtext-items-center",children:[e.jsx("span",{children:t.title}),!!((x=t.shortcutKeys)!=null&&x.length)&&e.jsx("span",{children:(g=t.shortcutKeys)==null?void 0:g.map(j=>o.getShortcutKey(j)).join(" ")})]})]},`text-direction-${c}`)})})]}):e.jsx(e.Fragment,{})}const m=D.Extension.create({name:"richTextTextDirection",addOptions(){var n;return{...(n=this.parent)==null?void 0:n.call(this),directions:["auto","ltr","rtl","unset"],defaultDirection:"auto",button({editor:s,extension:u,t:h}){var a;const d=((a=u.options)==null?void 0:a.directions)||[],l={auto:"TextDirection",ltr:"LeftToRight",rtl:"RightToLeft",unset:"X"},p=d.map(i=>({title:h(`editor.textDirection.${i}.tooltip`),value:i,icon:l[i],action:()=>{var r,t,c,x;if(i==="unset"){(t=(r=s.commands)==null?void 0:r.unsetTextDirection)==null||t.call(r);return}(x=(c=s.commands)==null?void 0:c.setTextDirection)==null||x.call(c,i)},disabled:!1}));return{componentProps:{icon:"TextDirection",tooltip:h("editor.textDirection.tooltip"),items:p,isActive:()=>s.getAttributes("paragraph")}}}}}});exports.RichTextTextDirection=v;exports.TextDirection=m;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { E as g } from "./clsx-CDyrfCnw.js";
|
|
2
|
+
import { jsx as o, Fragment as D, jsxs as x } from "react/jsx-runtime";
|
|
3
|
+
import v, { useMemo as b } from "react";
|
|
4
|
+
import { u as C, e as A, A as P, I as f, T as w, a as z, k as N, b as R, l as j } from "./index-lj3VWExo.js";
|
|
5
|
+
import "./theme.js";
|
|
6
|
+
import { P as y, a as K, b as M } from "./popover-CPr9bHYn.js";
|
|
7
|
+
function F() {
|
|
8
|
+
const i = C(O.name), [c, h] = v.useState(!1), {
|
|
9
|
+
icon: p = void 0,
|
|
10
|
+
tooltip: u = void 0,
|
|
11
|
+
items: s = [],
|
|
12
|
+
isActive: d = void 0
|
|
13
|
+
} = (i == null ? void 0 : i.componentProps) ?? {}, { editorDisabled: a, dataState: e } = A(d), r = b(() => (e == null ? void 0 : e.dir) || "unset", [e]);
|
|
14
|
+
return i ? /* @__PURE__ */ x(y, { open: c, onOpenChange: h, modal: !0, children: [
|
|
15
|
+
/* @__PURE__ */ o(K, { asChild: !0, disabled: a, children: /* @__PURE__ */ o(
|
|
16
|
+
P,
|
|
17
|
+
{
|
|
18
|
+
customClass: "!richtext-w-12 richtext-h-12",
|
|
19
|
+
disabled: a,
|
|
20
|
+
icon: p,
|
|
21
|
+
tooltip: u,
|
|
22
|
+
children: /* @__PURE__ */ o(
|
|
23
|
+
f,
|
|
24
|
+
{
|
|
25
|
+
className: "richtext-ml-1 richtext-size-3 richtext-text-zinc-500",
|
|
26
|
+
name: "MenuDown"
|
|
27
|
+
}
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
) }),
|
|
31
|
+
/* @__PURE__ */ o(
|
|
32
|
+
M,
|
|
33
|
+
{
|
|
34
|
+
align: "start",
|
|
35
|
+
className: "richtext-flex richtext-w-full richtext-min-w-4 richtext-flex-row richtext-gap-1 !richtext-p-[4px]",
|
|
36
|
+
side: "bottom",
|
|
37
|
+
hideWhenDetached: !0,
|
|
38
|
+
children: s == null ? void 0 : s.map((t, n) => {
|
|
39
|
+
var l, m;
|
|
40
|
+
return /* @__PURE__ */ x(w, { children: [
|
|
41
|
+
/* @__PURE__ */ o(z, { "data-state": r === t.value ? "on" : "off", asChild: !0, children: /* @__PURE__ */ o(
|
|
42
|
+
N,
|
|
43
|
+
{
|
|
44
|
+
className: "richtext-size-7 richtext-p-1",
|
|
45
|
+
onClick: () => {
|
|
46
|
+
t == null || t.action(), h(!1);
|
|
47
|
+
},
|
|
48
|
+
size: "sm",
|
|
49
|
+
children: (t == null ? void 0 : t.icon) && /* @__PURE__ */ o(f, { name: t.icon })
|
|
50
|
+
}
|
|
51
|
+
) }),
|
|
52
|
+
/* @__PURE__ */ x(R, { className: "richtext-flex richtext-flex-col richtext-items-center", children: [
|
|
53
|
+
/* @__PURE__ */ o("span", { children: t.title }),
|
|
54
|
+
!!((l = t.shortcutKeys) != null && l.length) && /* @__PURE__ */ o("span", { children: (m = t.shortcutKeys) == null ? void 0 : m.map((T) => j(T)).join(" ") })
|
|
55
|
+
] })
|
|
56
|
+
] }, `text-direction-${n}`);
|
|
57
|
+
})
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
] }) : /* @__PURE__ */ o(D, {});
|
|
61
|
+
}
|
|
62
|
+
const O = /* @__PURE__ */ g.create({
|
|
63
|
+
name: "richTextTextDirection",
|
|
64
|
+
addOptions() {
|
|
65
|
+
var i;
|
|
66
|
+
return {
|
|
67
|
+
...(i = this.parent) == null ? void 0 : i.call(this),
|
|
68
|
+
directions: ["auto", "ltr", "rtl", "unset"],
|
|
69
|
+
defaultDirection: "auto",
|
|
70
|
+
button({
|
|
71
|
+
editor: c,
|
|
72
|
+
extension: h,
|
|
73
|
+
t: p
|
|
74
|
+
}) {
|
|
75
|
+
var a;
|
|
76
|
+
const u = ((a = h.options) == null ? void 0 : a.directions) || [], s = {
|
|
77
|
+
auto: "TextDirection",
|
|
78
|
+
ltr: "LeftToRight",
|
|
79
|
+
rtl: "RightToLeft",
|
|
80
|
+
unset: "X"
|
|
81
|
+
}, d = u.map((e) => ({
|
|
82
|
+
title: p(`editor.textDirection.${e}.tooltip`),
|
|
83
|
+
value: e,
|
|
84
|
+
icon: s[e],
|
|
85
|
+
action: () => {
|
|
86
|
+
var r, t, n, l;
|
|
87
|
+
if (e === "unset") {
|
|
88
|
+
(t = (r = c.commands) == null ? void 0 : r.unsetTextDirection) == null || t.call(r);
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
(l = (n = c.commands) == null ? void 0 : n.setTextDirection) == null || l.call(n, e);
|
|
92
|
+
},
|
|
93
|
+
disabled: !1
|
|
94
|
+
}));
|
|
95
|
+
return {
|
|
96
|
+
componentProps: {
|
|
97
|
+
icon: "TextDirection",
|
|
98
|
+
tooltip: p("editor.textDirection.tooltip"),
|
|
99
|
+
items: d,
|
|
100
|
+
isActive: () => c.getAttributes("paragraph")
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
export {
|
|
108
|
+
F as RichTextTextDirection,
|
|
109
|
+
O as TextDirection
|
|
110
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./clsx-CXbNJWDD.cjs"),s=require("react/jsx-runtime"),d=require("./index-D9oM__YW.cjs");require("react");require("./theme.cjs");var h=a.Mark.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",a.mergeAttributes(this.options.HTMLAttributes,e),0]},parseMarkdown(e,n){return n.applyMark(this.name||"underline",n.parseInline(e.tokens||[]))},renderMarkdown(e,n){return`++${n.renderChildren(e)}++`},markdownTokenizer:{name:"underline",level:"inline",start(e){return e.indexOf("++")},tokenize(e,n,t){const r=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!r)return;const i=r[2].trim();return{type:"underline",raw:r[0],text:i,tokens:t.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),k=h;function v(){const e=d.useButtonProps(l.name),{icon:n=void 0,tooltip:t=void 0,shortcutKeys:o=void 0,tooltipOptions:r={},action:i=void 0,isActive:c=void 0}=(e==null?void 0:e.componentProps)??{},{dataState:m,disabled:u,update:p}=d.useToggleActive(c),g=()=>{u||i&&(i(),p())};return e?s.jsx(d.ActionButton,{action:g,dataState:m,disabled:u,icon:n,shortcutKeys:o,tooltip:t,tooltipOptions:r}):s.jsx(s.Fragment,{})}const l=k.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button({editor:n,t,extension:o}){return{componentProps:{action:()=>n.commands.toggleUnderline(),isActive:()=>n.isActive("underline")||!1,disabled:!1,icon:"Underline",shortcutKeys:o.options.shortcutKeys??["mod","U"],tooltip:t("editor.underline.tooltip")}}}}}});exports.RichTextUnderline=v;exports.TextUnderline=l;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { M as m, m as p } from "./clsx-CDyrfCnw.js";
|
|
2
|
+
import { jsx as d, Fragment as g } from "react/jsx-runtime";
|
|
3
|
+
import { u as f, d as h, A as k } from "./index-lj3VWExo.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import "./theme.js";
|
|
6
|
+
var M = m.create({
|
|
7
|
+
name: "underline",
|
|
8
|
+
addOptions() {
|
|
9
|
+
return {
|
|
10
|
+
HTMLAttributes: {}
|
|
11
|
+
};
|
|
12
|
+
},
|
|
13
|
+
parseHTML() {
|
|
14
|
+
return [
|
|
15
|
+
{
|
|
16
|
+
tag: "u"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
style: "text-decoration",
|
|
20
|
+
consuming: !1,
|
|
21
|
+
getAttrs: (e) => e.includes("underline") ? {} : !1
|
|
22
|
+
}
|
|
23
|
+
];
|
|
24
|
+
},
|
|
25
|
+
renderHTML({ HTMLAttributes: e }) {
|
|
26
|
+
return ["u", p(this.options.HTMLAttributes, e), 0];
|
|
27
|
+
},
|
|
28
|
+
parseMarkdown(e, t) {
|
|
29
|
+
return t.applyMark(this.name || "underline", t.parseInline(e.tokens || []));
|
|
30
|
+
},
|
|
31
|
+
renderMarkdown(e, t) {
|
|
32
|
+
return `++${t.renderChildren(e)}++`;
|
|
33
|
+
},
|
|
34
|
+
markdownTokenizer: {
|
|
35
|
+
name: "underline",
|
|
36
|
+
level: "inline",
|
|
37
|
+
start(e) {
|
|
38
|
+
return e.indexOf("++");
|
|
39
|
+
},
|
|
40
|
+
tokenize(e, t, n) {
|
|
41
|
+
const r = /^(\+\+)([\s\S]+?)(\+\+)/.exec(e);
|
|
42
|
+
if (!r)
|
|
43
|
+
return;
|
|
44
|
+
const o = r[2].trim();
|
|
45
|
+
return {
|
|
46
|
+
type: "underline",
|
|
47
|
+
raw: r[0],
|
|
48
|
+
text: o,
|
|
49
|
+
tokens: n.inlineTokens(o)
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
addCommands() {
|
|
54
|
+
return {
|
|
55
|
+
setUnderline: () => ({ commands: e }) => e.setMark(this.name),
|
|
56
|
+
toggleUnderline: () => ({ commands: e }) => e.toggleMark(this.name),
|
|
57
|
+
unsetUnderline: () => ({ commands: e }) => e.unsetMark(this.name)
|
|
58
|
+
};
|
|
59
|
+
},
|
|
60
|
+
addKeyboardShortcuts() {
|
|
61
|
+
return {
|
|
62
|
+
"Mod-u": () => this.editor.commands.toggleUnderline(),
|
|
63
|
+
"Mod-U": () => this.editor.commands.toggleUnderline()
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
}), v = M;
|
|
67
|
+
function w() {
|
|
68
|
+
const e = f(U.name), {
|
|
69
|
+
icon: t = void 0,
|
|
70
|
+
tooltip: n = void 0,
|
|
71
|
+
shortcutKeys: i = void 0,
|
|
72
|
+
tooltipOptions: r = {},
|
|
73
|
+
action: o = void 0,
|
|
74
|
+
isActive: a = void 0
|
|
75
|
+
} = (e == null ? void 0 : e.componentProps) ?? {}, { dataState: u, disabled: s, update: l } = h(a), c = () => {
|
|
76
|
+
s || o && (o(), l());
|
|
77
|
+
};
|
|
78
|
+
return e ? /* @__PURE__ */ d(
|
|
79
|
+
k,
|
|
80
|
+
{
|
|
81
|
+
action: c,
|
|
82
|
+
dataState: u,
|
|
83
|
+
disabled: s,
|
|
84
|
+
icon: t,
|
|
85
|
+
shortcutKeys: i,
|
|
86
|
+
tooltip: n,
|
|
87
|
+
tooltipOptions: r
|
|
88
|
+
}
|
|
89
|
+
) : /* @__PURE__ */ d(g, {});
|
|
90
|
+
}
|
|
91
|
+
const U = /* @__PURE__ */ v.extend({
|
|
92
|
+
//@ts-expect-error
|
|
93
|
+
addOptions() {
|
|
94
|
+
var e;
|
|
95
|
+
return {
|
|
96
|
+
...(e = this.parent) == null ? void 0 : e.call(this),
|
|
97
|
+
button({ editor: t, t: n, extension: i }) {
|
|
98
|
+
return {
|
|
99
|
+
componentProps: {
|
|
100
|
+
action: () => t.commands.toggleUnderline(),
|
|
101
|
+
isActive: () => t.isActive("underline") || !1,
|
|
102
|
+
disabled: !1,
|
|
103
|
+
icon: "Underline",
|
|
104
|
+
shortcutKeys: i.options.shortcutKeys ?? ["mod", "U"],
|
|
105
|
+
tooltip: n("editor.underline.tooltip")
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
export {
|
|
113
|
+
w as RichTextUnderline,
|
|
114
|
+
U as TextUnderline
|
|
115
|
+
};
|