@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
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { M as y, m as p, E as l } from "./clsx-CDyrfCnw.js";
|
|
2
|
+
var d = 20, u = (t, e = 0) => {
|
|
3
|
+
const r = [];
|
|
4
|
+
return !t.children.length || e > d || Array.from(t.children).forEach((o) => {
|
|
5
|
+
o.tagName === "SPAN" ? r.push(o) : o.children.length && r.push(...u(o, e + 1));
|
|
6
|
+
}), r;
|
|
7
|
+
}, f = (t) => {
|
|
8
|
+
if (!t.children.length)
|
|
9
|
+
return;
|
|
10
|
+
const e = u(t);
|
|
11
|
+
e && e.forEach((r) => {
|
|
12
|
+
var o, n;
|
|
13
|
+
const s = r.getAttribute("style"), i = (n = (o = r.parentElement) == null ? void 0 : o.closest("span")) == null ? void 0 : n.getAttribute("style");
|
|
14
|
+
r.setAttribute("style", `${i};${s}`);
|
|
15
|
+
});
|
|
16
|
+
}, c = y.create({
|
|
17
|
+
name: "textStyle",
|
|
18
|
+
priority: 101,
|
|
19
|
+
addOptions() {
|
|
20
|
+
return {
|
|
21
|
+
HTMLAttributes: {},
|
|
22
|
+
mergeNestedSpanStyles: !0
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
parseHTML() {
|
|
26
|
+
return [
|
|
27
|
+
{
|
|
28
|
+
tag: "span",
|
|
29
|
+
consuming: !1,
|
|
30
|
+
getAttrs: (t) => t.hasAttribute("style") ? (this.options.mergeNestedSpanStyles && f(t), {}) : !1
|
|
31
|
+
}
|
|
32
|
+
];
|
|
33
|
+
},
|
|
34
|
+
renderHTML({ HTMLAttributes: t }) {
|
|
35
|
+
return ["span", p(this.options.HTMLAttributes, t), 0];
|
|
36
|
+
},
|
|
37
|
+
addCommands() {
|
|
38
|
+
return {
|
|
39
|
+
toggleTextStyle: (t) => ({ commands: e }) => e.toggleMark(this.name, t),
|
|
40
|
+
removeEmptyTextStyle: () => ({ tr: t }) => {
|
|
41
|
+
const { selection: e } = t;
|
|
42
|
+
return t.doc.nodesBetween(e.from, e.to, (r, o) => {
|
|
43
|
+
if (r.isTextblock)
|
|
44
|
+
return !0;
|
|
45
|
+
r.marks.filter((n) => n.type === this.type).some((n) => Object.values(n.attrs).some((s) => !!s)) || t.removeMark(o, o + r.nodeSize, this.type);
|
|
46
|
+
}), !0;
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
}), m = l.create({
|
|
51
|
+
name: "backgroundColor",
|
|
52
|
+
addOptions() {
|
|
53
|
+
return {
|
|
54
|
+
types: ["textStyle"]
|
|
55
|
+
};
|
|
56
|
+
},
|
|
57
|
+
addGlobalAttributes() {
|
|
58
|
+
return [
|
|
59
|
+
{
|
|
60
|
+
types: this.options.types,
|
|
61
|
+
attributes: {
|
|
62
|
+
backgroundColor: {
|
|
63
|
+
default: null,
|
|
64
|
+
parseHTML: (t) => {
|
|
65
|
+
var e;
|
|
66
|
+
const r = t.getAttribute("style");
|
|
67
|
+
if (r) {
|
|
68
|
+
const o = r.split(";").map((n) => n.trim()).filter(Boolean);
|
|
69
|
+
for (let n = o.length - 1; n >= 0; n -= 1) {
|
|
70
|
+
const s = o[n].split(":");
|
|
71
|
+
if (s.length >= 2) {
|
|
72
|
+
const i = s[0].trim().toLowerCase(), a = s.slice(1).join(":").trim();
|
|
73
|
+
if (i === "background-color")
|
|
74
|
+
return a.replace(/['"]+/g, "");
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return (e = t.style.backgroundColor) == null ? void 0 : e.replace(/['"]+/g, "");
|
|
79
|
+
},
|
|
80
|
+
renderHTML: (t) => t.backgroundColor ? {
|
|
81
|
+
style: `background-color: ${t.backgroundColor}`
|
|
82
|
+
} : {}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
];
|
|
87
|
+
},
|
|
88
|
+
addCommands() {
|
|
89
|
+
return {
|
|
90
|
+
setBackgroundColor: (t) => ({ chain: e }) => e().setMark("textStyle", { backgroundColor: t }).run(),
|
|
91
|
+
unsetBackgroundColor: () => ({ chain: t }) => t().setMark("textStyle", { backgroundColor: null }).removeEmptyTextStyle().run()
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
}), g = l.create({
|
|
95
|
+
name: "color",
|
|
96
|
+
addOptions() {
|
|
97
|
+
return {
|
|
98
|
+
types: ["textStyle"]
|
|
99
|
+
};
|
|
100
|
+
},
|
|
101
|
+
addGlobalAttributes() {
|
|
102
|
+
return [
|
|
103
|
+
{
|
|
104
|
+
types: this.options.types,
|
|
105
|
+
attributes: {
|
|
106
|
+
color: {
|
|
107
|
+
default: null,
|
|
108
|
+
parseHTML: (t) => {
|
|
109
|
+
var e;
|
|
110
|
+
const r = t.getAttribute("style");
|
|
111
|
+
if (r) {
|
|
112
|
+
const o = r.split(";").map((n) => n.trim()).filter(Boolean);
|
|
113
|
+
for (let n = o.length - 1; n >= 0; n -= 1) {
|
|
114
|
+
const s = o[n].split(":");
|
|
115
|
+
if (s.length >= 2) {
|
|
116
|
+
const i = s[0].trim().toLowerCase(), a = s.slice(1).join(":").trim();
|
|
117
|
+
if (i === "color")
|
|
118
|
+
return a.replace(/['"]+/g, "");
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
return (e = t.style.color) == null ? void 0 : e.replace(/['"]+/g, "");
|
|
123
|
+
},
|
|
124
|
+
renderHTML: (t) => t.color ? {
|
|
125
|
+
style: `color: ${t.color}`
|
|
126
|
+
} : {}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
];
|
|
131
|
+
},
|
|
132
|
+
addCommands() {
|
|
133
|
+
return {
|
|
134
|
+
setColor: (t) => ({ chain: e }) => e().setMark("textStyle", { color: t }).run(),
|
|
135
|
+
unsetColor: () => ({ chain: t }) => t().setMark("textStyle", { color: null }).removeEmptyTextStyle().run()
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
}), h = l.create({
|
|
139
|
+
name: "fontFamily",
|
|
140
|
+
addOptions() {
|
|
141
|
+
return {
|
|
142
|
+
types: ["textStyle"]
|
|
143
|
+
};
|
|
144
|
+
},
|
|
145
|
+
addGlobalAttributes() {
|
|
146
|
+
return [
|
|
147
|
+
{
|
|
148
|
+
types: this.options.types,
|
|
149
|
+
attributes: {
|
|
150
|
+
fontFamily: {
|
|
151
|
+
default: null,
|
|
152
|
+
parseHTML: (t) => t.style.fontFamily,
|
|
153
|
+
renderHTML: (t) => t.fontFamily ? {
|
|
154
|
+
style: `font-family: ${t.fontFamily}`
|
|
155
|
+
} : {}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
];
|
|
160
|
+
},
|
|
161
|
+
addCommands() {
|
|
162
|
+
return {
|
|
163
|
+
setFontFamily: (t) => ({ chain: e }) => e().setMark("textStyle", { fontFamily: t }).run(),
|
|
164
|
+
unsetFontFamily: () => ({ chain: t }) => t().setMark("textStyle", { fontFamily: null }).removeEmptyTextStyle().run()
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
}), S = l.create({
|
|
168
|
+
name: "fontSize",
|
|
169
|
+
addOptions() {
|
|
170
|
+
return {
|
|
171
|
+
types: ["textStyle"]
|
|
172
|
+
};
|
|
173
|
+
},
|
|
174
|
+
addGlobalAttributes() {
|
|
175
|
+
return [
|
|
176
|
+
{
|
|
177
|
+
types: this.options.types,
|
|
178
|
+
attributes: {
|
|
179
|
+
fontSize: {
|
|
180
|
+
default: null,
|
|
181
|
+
parseHTML: (t) => t.style.fontSize,
|
|
182
|
+
renderHTML: (t) => t.fontSize ? {
|
|
183
|
+
style: `font-size: ${t.fontSize}`
|
|
184
|
+
} : {}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
];
|
|
189
|
+
},
|
|
190
|
+
addCommands() {
|
|
191
|
+
return {
|
|
192
|
+
setFontSize: (t) => ({ chain: e }) => e().setMark("textStyle", { fontSize: t }).run(),
|
|
193
|
+
unsetFontSize: () => ({ chain: t }) => t().setMark("textStyle", { fontSize: null }).removeEmptyTextStyle().run()
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
}), b = l.create({
|
|
197
|
+
name: "lineHeight",
|
|
198
|
+
addOptions() {
|
|
199
|
+
return {
|
|
200
|
+
types: ["textStyle"]
|
|
201
|
+
};
|
|
202
|
+
},
|
|
203
|
+
addGlobalAttributes() {
|
|
204
|
+
return [
|
|
205
|
+
{
|
|
206
|
+
types: this.options.types,
|
|
207
|
+
attributes: {
|
|
208
|
+
lineHeight: {
|
|
209
|
+
default: null,
|
|
210
|
+
parseHTML: (t) => t.style.lineHeight,
|
|
211
|
+
renderHTML: (t) => t.lineHeight ? {
|
|
212
|
+
style: `line-height: ${t.lineHeight}`
|
|
213
|
+
} : {}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
];
|
|
218
|
+
},
|
|
219
|
+
addCommands() {
|
|
220
|
+
return {
|
|
221
|
+
setLineHeight: (t) => ({ chain: e }) => e().setMark("textStyle", { lineHeight: t }).run(),
|
|
222
|
+
unsetLineHeight: () => ({ chain: t }) => t().setMark("textStyle", { lineHeight: null }).removeEmptyTextStyle().run()
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
l.create({
|
|
227
|
+
name: "textStyleKit",
|
|
228
|
+
addExtensions() {
|
|
229
|
+
const t = [];
|
|
230
|
+
return this.options.backgroundColor !== !1 && t.push(m.configure(this.options.backgroundColor)), this.options.color !== !1 && t.push(g.configure(this.options.color)), this.options.fontFamily !== !1 && t.push(h.configure(this.options.fontFamily)), this.options.fontSize !== !1 && t.push(S.configure(this.options.fontSize)), this.options.lineHeight !== !1 && t.push(b.configure(this.options.lineHeight)), this.options.textStyle !== !1 && t.push(c.configure(this.options.textStyle)), t;
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
export {
|
|
234
|
+
g as C,
|
|
235
|
+
h as F,
|
|
236
|
+
b as L
|
|
237
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const i=require("./clsx-CXbNJWDD.cjs");var c=20,u=(t,e=0)=>{const r=[];return!t.children.length||e>c||Array.from(t.children).forEach(o=>{o.tagName==="SPAN"?r.push(o):o.children.length&&r.push(...u(o,e+1))}),r},f=t=>{if(!t.children.length)return;const e=u(t);e&&e.forEach(r=>{var o,n;const s=r.getAttribute("style"),l=(n=(o=r.parentElement)==null?void 0:o.closest("span"))==null?void 0:n.getAttribute("style");r.setAttribute("style",`${l};${s}`)})},m=i.Mark.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!0}},parseHTML(){return[{tag:"span",consuming:!1,getAttrs:t=>t.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&f(t),{}):!1}]},renderHTML({HTMLAttributes:t}){return["span",i.mergeAttributes(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleTextStyle:t=>({commands:e})=>e.toggleMark(this.name,t),removeEmptyTextStyle:()=>({tr:t})=>{const{selection:e}=t;return t.doc.nodesBetween(e.from,e.to,(r,o)=>{if(r.isTextblock)return!0;r.marks.filter(n=>n.type===this.type).some(n=>Object.values(n.attrs).some(s=>!!s))||t.removeMark(o,o+r.nodeSize,this.type)}),!0}}}}),g=i.Extension.create({name:"backgroundColor",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{backgroundColor:{default:null,parseHTML:t=>{var e;const r=t.getAttribute("style");if(r){const o=r.split(";").map(n=>n.trim()).filter(Boolean);for(let n=o.length-1;n>=0;n-=1){const s=o[n].split(":");if(s.length>=2){const l=s[0].trim().toLowerCase(),a=s.slice(1).join(":").trim();if(l==="background-color")return a.replace(/['"]+/g,"")}}}return(e=t.style.backgroundColor)==null?void 0:e.replace(/['"]+/g,"")},renderHTML:t=>t.backgroundColor?{style:`background-color: ${t.backgroundColor}`}:{}}}}]},addCommands(){return{setBackgroundColor:t=>({chain:e})=>e().setMark("textStyle",{backgroundColor:t}).run(),unsetBackgroundColor:()=>({chain:t})=>t().setMark("textStyle",{backgroundColor:null}).removeEmptyTextStyle().run()}}}),y=i.Extension.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:t=>{var e;const r=t.getAttribute("style");if(r){const o=r.split(";").map(n=>n.trim()).filter(Boolean);for(let n=o.length-1;n>=0;n-=1){const s=o[n].split(":");if(s.length>=2){const l=s[0].trim().toLowerCase(),a=s.slice(1).join(":").trim();if(l==="color")return a.replace(/['"]+/g,"")}}}return(e=t.style.color)==null?void 0:e.replace(/['"]+/g,"")},renderHTML:t=>t.color?{style:`color: ${t.color}`}:{}}}}]},addCommands(){return{setColor:t=>({chain:e})=>e().setMark("textStyle",{color:t}).run(),unsetColor:()=>({chain:t})=>t().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),p=i.Extension.create({name:"fontFamily",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:t=>t.style.fontFamily,renderHTML:t=>t.fontFamily?{style:`font-family: ${t.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:t=>({chain:e})=>e().setMark("textStyle",{fontFamily:t}).run(),unsetFontFamily:()=>({chain:t})=>t().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}}),h=i.Extension.create({name:"fontSize",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:t=>t.style.fontSize,renderHTML:t=>t.fontSize?{style:`font-size: ${t.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:t=>({chain:e})=>e().setMark("textStyle",{fontSize:t}).run(),unsetFontSize:()=>({chain:t})=>t().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}}),d=i.Extension.create({name:"lineHeight",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:t=>t.style.lineHeight,renderHTML:t=>t.lineHeight?{style:`line-height: ${t.lineHeight}`}:{}}}}]},addCommands(){return{setLineHeight:t=>({chain:e})=>e().setMark("textStyle",{lineHeight:t}).run(),unsetLineHeight:()=>({chain:t})=>t().setMark("textStyle",{lineHeight:null}).removeEmptyTextStyle().run()}}});i.Extension.create({name:"textStyleKit",addExtensions(){const t=[];return this.options.backgroundColor!==!1&&t.push(g.configure(this.options.backgroundColor)),this.options.color!==!1&&t.push(y.configure(this.options.color)),this.options.fontFamily!==!1&&t.push(p.configure(this.options.fontFamily)),this.options.fontSize!==!1&&t.push(h.configure(this.options.fontSize)),this.options.lineHeight!==!1&&t.push(d.configure(this.options.lineHeight)),this.options.textStyle!==!1&&t.push(m.configure(this.options.textStyle)),t}});exports.Color=y;exports.FontFamily=p;exports.LineHeight=d;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const Mt=require("@tiptap/pm/state"),Rt=require("@tiptap/pm/view"),Jt=require("./clsx-CXbNJWDD.cjs"),_t=["top","right","bottom","left"],At=["start","end"],Ot=_t.reduce((t,e)=>t.concat(e,e+"-"+At[0],e+"-"+At[1]),[]),j=Math.min,M=Math.max,rt=Math.round,H=t=>({x:t,y:t}),Qt={left:"right",right:"left",bottom:"top",top:"bottom"},Zt={start:"end",end:"start"};function ht(t,e,o){return M(t,j(e,o))}function Y(t,e){return typeof t=="function"?t(e):t}function F(t){return t.split("-")[0]}function q(t){return t.split("-")[1]}function Nt(t){return t==="x"?"y":"x"}function wt(t){return t==="y"?"height":"width"}const te=new Set(["top","bottom"]);function V(t){return te.has(F(t))?"y":"x"}function xt(t){return Nt(V(t))}function Ft(t,e,o){o===void 0&&(o=!1);const n=q(t),i=xt(t),s=wt(i);let r=i==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=lt(r)),[r,lt(r)]}function ee(t){const e=lt(t);return[ct(t),e,ct(e)]}function ct(t){return t.replace(/start|end/g,e=>Zt[e])}const Ct=["left","right"],Pt=["right","left"],ne=["top","bottom"],oe=["bottom","top"];function ie(t,e,o){switch(t){case"top":case"bottom":return o?e?Pt:Ct:e?Ct:Pt;case"left":case"right":return e?ne:oe;default:return[]}}function se(t,e,o,n){const i=q(t);let s=ie(F(t),o==="start",n);return i&&(s=s.map(r=>r+"-"+i),e&&(s=s.concat(s.map(ct)))),s}function lt(t){return t.replace(/left|right|bottom|top/g,e=>Qt[e])}function re(t){return{top:0,right:0,bottom:0,left:0,...t}}function yt(t){return typeof t!="number"?re(t):{top:t,right:t,bottom:t,left:t}}function Q(t){const{x:e,y:o,width:n,height:i}=t;return{width:n,height:i,top:o,left:e,right:e+n,bottom:o+i,x:e,y:o}}function Et(t,e,o){let{reference:n,floating:i}=t;const s=V(e),r=xt(e),c=wt(r),f=F(e),a=s==="y",u=n.x+n.width/2-i.width/2,l=n.y+n.height/2-i.height/2,w=n[c]/2-i[c]/2;let g;switch(f){case"top":g={x:u,y:n.y-i.height};break;case"bottom":g={x:u,y:n.y+n.height};break;case"right":g={x:n.x+n.width,y:l};break;case"left":g={x:n.x-i.width,y:l};break;default:g={x:n.x,y:n.y}}switch(q(e)){case"start":g[r]-=w*(o&&a?-1:1);break;case"end":g[r]+=w*(o&&a?-1:1);break}return g}const ce=async(t,e,o)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:r}=o,c=s.filter(Boolean),f=await(r.isRTL==null?void 0:r.isRTL(e));let a=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:l}=Et(a,n,f),w=n,g={},p=0;for(let v=0;v<c.length;v++){const{name:d,fn:m}=c[v],{x:S,y:A,data:E,reset:O}=await m({x:u,y:l,initialPlacement:n,placement:w,strategy:i,middlewareData:g,rects:a,platform:r,elements:{reference:t,floating:e}});u=S??u,l=A??l,g={...g,[d]:{...g[d],...E}},O&&p<=50&&(p++,typeof O=="object"&&(O.placement&&(w=O.placement),O.rects&&(a=O.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):O.rects),{x:u,y:l}=Et(a,w,f)),v=-1)}return{x:u,y:l,placement:w,strategy:i,middlewareData:g}};async function Z(t,e){var o;e===void 0&&(e={});const{x:n,y:i,platform:s,rects:r,elements:c,strategy:f}=t,{boundary:a="clippingAncestors",rootBoundary:u="viewport",elementContext:l="floating",altBoundary:w=!1,padding:g=0}=Y(e,t),p=yt(g),d=c[w?l==="floating"?"reference":"floating":l],m=Q(await s.getClippingRect({element:(o=await(s.isElement==null?void 0:s.isElement(d)))==null||o?d:d.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:a,rootBoundary:u,strategy:f})),S=l==="floating"?{x:n,y:i,width:r.floating.width,height:r.floating.height}:r.reference,A=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),E=await(s.isElement==null?void 0:s.isElement(A))?await(s.getScale==null?void 0:s.getScale(A))||{x:1,y:1}:{x:1,y:1},O=Q(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:S,offsetParent:A,strategy:f}):S);return{top:(m.top-O.top+p.top)/E.y,bottom:(O.bottom-m.bottom+p.bottom)/E.y,left:(m.left-O.left+p.left)/E.x,right:(O.right-m.right+p.right)/E.x}}const le=t=>({name:"arrow",options:t,async fn(e){const{x:o,y:n,placement:i,rects:s,platform:r,elements:c,middlewareData:f}=e,{element:a,padding:u=0}=Y(t,e)||{};if(a==null)return{};const l=yt(u),w={x:o,y:n},g=xt(i),p=wt(g),v=await r.getDimensions(a),d=g==="y",m=d?"top":"left",S=d?"bottom":"right",A=d?"clientHeight":"clientWidth",E=s.reference[p]+s.reference[g]-w[g]-s.floating[p],O=w[g]-s.reference[g],y=await(r.getOffsetParent==null?void 0:r.getOffsetParent(a));let b=y?y[A]:0;(!b||!await(r.isElement==null?void 0:r.isElement(y)))&&(b=c.floating[A]||s.floating[p]);const C=E/2-O/2,P=b/2-v[p]/2-1,h=j(l[m],P),R=j(l[S],P),D=h,k=b-v[p]-R,L=b/2-v[p]/2+C,x=ht(D,L,k),$=!f.arrow&&q(i)!=null&&L!==x&&s.reference[p]/2-(L<D?h:R)-v[p]/2<0,T=$?L<D?L-D:L-k:0;return{[g]:w[g]+T,data:{[g]:x,centerOffset:L-x-T,...$&&{alignmentOffset:T}},reset:$}}});function ae(t,e,o){return(t?[...o.filter(i=>q(i)===t),...o.filter(i=>q(i)!==t)]:o.filter(i=>F(i)===i)).filter(i=>t?q(i)===t||(e?ct(i)!==i:!1):!0)}const fe=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var o,n,i;const{rects:s,middlewareData:r,placement:c,platform:f,elements:a}=e,{crossAxis:u=!1,alignment:l,allowedPlacements:w=Ot,autoAlignment:g=!0,...p}=Y(t,e),v=l!==void 0||w===Ot?ae(l||null,g,w):w,d=await Z(e,p),m=((o=r.autoPlacement)==null?void 0:o.index)||0,S=v[m];if(S==null)return{};const A=Ft(S,s,await(f.isRTL==null?void 0:f.isRTL(a.floating)));if(c!==S)return{reset:{placement:v[0]}};const E=[d[F(S)],d[A[0]],d[A[1]]],O=[...((n=r.autoPlacement)==null?void 0:n.overflows)||[],{placement:S,overflows:E}],y=v[m+1];if(y)return{data:{index:m+1,overflows:O},reset:{placement:y}};const b=O.map(h=>{const R=q(h.placement);return[h.placement,R&&u?h.overflows.slice(0,2).reduce((D,k)=>D+k,0):h.overflows[0],h.overflows]}).sort((h,R)=>h[1]-R[1]),P=((i=b.filter(h=>h[2].slice(0,q(h[0])?2:3).every(R=>R<=0))[0])==null?void 0:i[0])||b[0][0];return P!==c?{data:{index:m+1,overflows:O},reset:{placement:P}}:{}}}},ue=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var o,n;const{placement:i,middlewareData:s,rects:r,initialPlacement:c,platform:f,elements:a}=e,{mainAxis:u=!0,crossAxis:l=!0,fallbackPlacements:w,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:v=!0,...d}=Y(t,e);if((o=s.arrow)!=null&&o.alignmentOffset)return{};const m=F(i),S=V(c),A=F(c)===c,E=await(f.isRTL==null?void 0:f.isRTL(a.floating)),O=w||(A||!v?[lt(c)]:ee(c)),y=p!=="none";!w&&y&&O.push(...se(c,v,p,E));const b=[c,...O],C=await Z(e,d),P=[];let h=((n=s.flip)==null?void 0:n.overflows)||[];if(u&&P.push(C[m]),l){const L=Ft(i,r,E);P.push(C[L[0]],C[L[1]])}if(h=[...h,{placement:i,overflows:P}],!P.every(L=>L<=0)){var R,D;const L=(((R=s.flip)==null?void 0:R.index)||0)+1,x=b[L];if(x&&(!(l==="alignment"?S!==V(x):!1)||h.every(B=>V(B.placement)===S?B.overflows[0]>0:!0)))return{data:{index:L,overflows:h},reset:{placement:x}};let $=(D=h.filter(T=>T.overflows[0]<=0).sort((T,B)=>T.overflows[1]-B.overflows[1])[0])==null?void 0:D.placement;if(!$)switch(g){case"bestFit":{var k;const T=(k=h.filter(B=>{if(y){const _=V(B.placement);return _===S||_==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(_=>_>0).reduce((_,U)=>_+U,0)]).sort((B,_)=>B[1]-_[1])[0])==null?void 0:k[0];T&&($=T);break}case"initialPlacement":$=c;break}if(i!==$)return{reset:{placement:$}}}return{}}}};function Dt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Tt(t){return _t.some(e=>t[e]>=0)}const de=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:o}=e,{strategy:n="referenceHidden",...i}=Y(t,e);switch(n){case"referenceHidden":{const s=await Z(e,{...i,elementContext:"reference"}),r=Dt(s,o.reference);return{data:{referenceHiddenOffsets:r,referenceHidden:Tt(r)}}}case"escaped":{const s=await Z(e,{...i,altBoundary:!0}),r=Dt(s,o.floating);return{data:{escapedOffsets:r,escaped:Tt(r)}}}default:return{}}}}};function qt(t){const e=j(...t.map(s=>s.left)),o=j(...t.map(s=>s.top)),n=M(...t.map(s=>s.right)),i=M(...t.map(s=>s.bottom));return{x:e,y:o,width:n-e,height:i-o}}function me(t){const e=t.slice().sort((i,s)=>i.y-s.y),o=[];let n=null;for(let i=0;i<e.length;i++){const s=e[i];!n||s.y-n.y>n.height/2?o.push([s]):o[o.length-1].push(s),n=s}return o.map(i=>Q(qt(i)))}const ge=function(t){return t===void 0&&(t={}),{name:"inline",options:t,async fn(e){const{placement:o,elements:n,rects:i,platform:s,strategy:r}=e,{padding:c=2,x:f,y:a}=Y(t,e),u=Array.from(await(s.getClientRects==null?void 0:s.getClientRects(n.reference))||[]),l=me(u),w=Q(qt(u)),g=yt(c);function p(){if(l.length===2&&l[0].left>l[1].right&&f!=null&&a!=null)return l.find(d=>f>d.left-g.left&&f<d.right+g.right&&a>d.top-g.top&&a<d.bottom+g.bottom)||w;if(l.length>=2){if(V(o)==="y"){const h=l[0],R=l[l.length-1],D=F(o)==="top",k=h.top,L=R.bottom,x=D?h.left:R.left,$=D?h.right:R.right,T=$-x,B=L-k;return{top:k,bottom:L,left:x,right:$,width:T,height:B,x,y:k}}const d=F(o)==="left",m=M(...l.map(h=>h.right)),S=j(...l.map(h=>h.left)),A=l.filter(h=>d?h.left===S:h.right===m),E=A[0].top,O=A[A.length-1].bottom,y=S,b=m,C=b-y,P=O-E;return{top:E,bottom:O,left:y,right:b,width:C,height:P,x:y,y:E}}return w}const v=await s.getElementRects({reference:{getBoundingClientRect:p},floating:n.floating,strategy:r});return i.reference.x!==v.reference.x||i.reference.y!==v.reference.y||i.reference.width!==v.reference.width||i.reference.height!==v.reference.height?{reset:{rects:v}}:{}}}},he=new Set(["left","top"]);async function pe(t,e){const{placement:o,platform:n,elements:i}=t,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),r=F(o),c=q(o),f=V(o)==="y",a=he.has(r)?-1:1,u=s&&f?-1:1,l=Y(e,t);let{mainAxis:w,crossAxis:g,alignmentAxis:p}=typeof l=="number"?{mainAxis:l,crossAxis:0,alignmentAxis:null}:{mainAxis:l.mainAxis||0,crossAxis:l.crossAxis||0,alignmentAxis:l.alignmentAxis};return c&&typeof p=="number"&&(g=c==="end"?p*-1:p),f?{x:g*u,y:w*a}:{x:w*a,y:g*u}}const we=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var o,n;const{x:i,y:s,placement:r,middlewareData:c}=e,f=await pe(e,t);return r===((o=c.offset)==null?void 0:o.placement)&&(n=c.arrow)!=null&&n.alignmentOffset?{}:{x:i+f.x,y:s+f.y,data:{...f,placement:r}}}}},xe=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:n,placement:i}=e,{mainAxis:s=!0,crossAxis:r=!1,limiter:c={fn:d=>{let{x:m,y:S}=d;return{x:m,y:S}}},...f}=Y(t,e),a={x:o,y:n},u=await Z(e,f),l=V(F(i)),w=Nt(l);let g=a[w],p=a[l];if(s){const d=w==="y"?"top":"left",m=w==="y"?"bottom":"right",S=g+u[d],A=g-u[m];g=ht(S,g,A)}if(r){const d=l==="y"?"top":"left",m=l==="y"?"bottom":"right",S=p+u[d],A=p-u[m];p=ht(S,p,A)}const v=c.fn({...e,[w]:g,[l]:p});return{...v,data:{x:v.x-o,y:v.y-n,enabled:{[w]:s,[l]:r}}}}}},ye=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var o,n;const{placement:i,rects:s,platform:r,elements:c}=e,{apply:f=()=>{},...a}=Y(t,e),u=await Z(e,a),l=F(i),w=q(i),g=V(i)==="y",{width:p,height:v}=s.floating;let d,m;l==="top"||l==="bottom"?(d=l,m=w===(await(r.isRTL==null?void 0:r.isRTL(c.floating))?"start":"end")?"left":"right"):(m=l,d=w==="end"?"top":"bottom");const S=v-u.top-u.bottom,A=p-u.left-u.right,E=j(v-u[d],S),O=j(p-u[m],A),y=!e.middlewareData.shift;let b=E,C=O;if((o=e.middlewareData.shift)!=null&&o.enabled.x&&(C=A),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(b=S),y&&!w){const h=M(u.left,0),R=M(u.right,0),D=M(u.top,0),k=M(u.bottom,0);g?C=p-2*(h!==0||R!==0?h+R:M(u.left,u.right)):b=v-2*(D!==0||k!==0?D+k:M(u.top,u.bottom))}await f({...e,availableWidth:C,availableHeight:b});const P=await r.getDimensions(c.floating);return p!==P.width||v!==P.height?{reset:{rects:!0}}:{}}}};function at(){return typeof window<"u"}function et(t){return It(t)?(t.nodeName||"").toLowerCase():"#document"}function N(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function z(t){var e;return(e=(It(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function It(t){return at()?t instanceof Node||t instanceof N(t).Node:!1}function I(t){return at()?t instanceof Element||t instanceof N(t).Element:!1}function X(t){return at()?t instanceof HTMLElement||t instanceof N(t).HTMLElement:!1}function Lt(t){return!at()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof N(t).ShadowRoot}const ve=new Set(["inline","contents"]);function it(t){const{overflow:e,overflowX:o,overflowY:n,display:i}=W(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+o)&&!ve.has(i)}const be=new Set(["table","td","th"]);function Se(t){return be.has(et(t))}const Re=[":popover-open",":modal"];function ft(t){return Re.some(e=>{try{return t.matches(e)}catch{return!1}})}const Ae=["transform","translate","scale","rotate","perspective"],Oe=["transform","translate","scale","rotate","perspective","filter"],Ce=["paint","layout","strict","content"];function vt(t){const e=bt(),o=I(t)?W(t):t;return Ae.some(n=>o[n]?o[n]!=="none":!1)||(o.containerType?o.containerType!=="normal":!1)||!e&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!e&&(o.filter?o.filter!=="none":!1)||Oe.some(n=>(o.willChange||"").includes(n))||Ce.some(n=>(o.contain||"").includes(n))}function Pe(t){let e=K(t);for(;X(e)&&!tt(e);){if(vt(e))return e;if(ft(e))return null;e=K(e)}return null}function bt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ee=new Set(["html","body","#document"]);function tt(t){return Ee.has(et(t))}function W(t){return N(t).getComputedStyle(t)}function ut(t){return I(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function K(t){if(et(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Lt(t)&&t.host||z(t);return Lt(e)?e.host:e}function Wt(t){const e=K(t);return tt(e)?t.ownerDocument?t.ownerDocument.body:t.body:X(e)&&it(e)?e:Wt(e)}function Vt(t,e,o){var n;e===void 0&&(e=[]);const i=Wt(t),s=i===((n=t.ownerDocument)==null?void 0:n.body),r=N(i);return s?(pt(r),e.concat(r,r.visualViewport||[],it(i)?i:[],[])):e.concat(i,Vt(i,[]))}function pt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Ht(t){const e=W(t);let o=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=X(t),s=i?t.offsetWidth:o,r=i?t.offsetHeight:n,c=rt(o)!==s||rt(n)!==r;return c&&(o=s,n=r),{width:o,height:n,$:c}}function jt(t){return I(t)?t:t.contextElement}function J(t){const e=jt(t);if(!X(e))return H(1);const o=e.getBoundingClientRect(),{width:n,height:i,$:s}=Ht(e);let r=(s?rt(o.width):o.width)/n,c=(s?rt(o.height):o.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!c||!Number.isFinite(c))&&(c=1),{x:r,y:c}}const De=H(0);function Xt(t){const e=N(t);return!bt()||!e.visualViewport?De:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Te(t,e,o){return e===void 0&&(e=!1),!o||e&&o!==N(t)?!1:e}function ot(t,e,o,n){e===void 0&&(e=!1),o===void 0&&(o=!1);const i=t.getBoundingClientRect(),s=jt(t);let r=H(1);e&&(n?I(n)&&(r=J(n)):r=J(t));const c=Te(s,o,n)?Xt(s):H(0);let f=(i.left+c.x)/r.x,a=(i.top+c.y)/r.y,u=i.width/r.x,l=i.height/r.y;if(s){const w=N(s),g=n&&I(n)?N(n):n;let p=w,v=pt(p);for(;v&&n&&g!==p;){const d=J(v),m=v.getBoundingClientRect(),S=W(v),A=m.left+(v.clientLeft+parseFloat(S.paddingLeft))*d.x,E=m.top+(v.clientTop+parseFloat(S.paddingTop))*d.y;f*=d.x,a*=d.y,u*=d.x,l*=d.y,f+=A,a+=E,p=N(v),v=pt(p)}}return Q({width:u,height:l,x:f,y:a})}function dt(t,e){const o=ut(t).scrollLeft;return e?e.left+o:ot(z(t)).left+o}function Yt(t,e){const o=t.getBoundingClientRect(),n=o.left+e.scrollLeft-dt(t,o),i=o.top+e.scrollTop;return{x:n,y:i}}function Le(t){let{elements:e,rect:o,offsetParent:n,strategy:i}=t;const s=i==="fixed",r=z(n),c=e?ft(e.floating):!1;if(n===r||c&&s)return o;let f={scrollLeft:0,scrollTop:0},a=H(1);const u=H(0),l=X(n);if((l||!l&&!s)&&((et(n)!=="body"||it(r))&&(f=ut(n)),X(n))){const g=ot(n);a=J(n),u.x=g.x+n.clientLeft,u.y=g.y+n.clientTop}const w=r&&!l&&!s?Yt(r,f):H(0);return{width:o.width*a.x,height:o.height*a.y,x:o.x*a.x-f.scrollLeft*a.x+u.x+w.x,y:o.y*a.y-f.scrollTop*a.y+u.y+w.y}}function $e(t){return Array.from(t.getClientRects())}function ke(t){const e=z(t),o=ut(t),n=t.ownerDocument.body,i=M(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=M(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let r=-o.scrollLeft+dt(t);const c=-o.scrollTop;return W(n).direction==="rtl"&&(r+=M(e.clientWidth,n.clientWidth)-i),{width:i,height:s,x:r,y:c}}const $t=25;function Be(t,e){const o=N(t),n=z(t),i=o.visualViewport;let s=n.clientWidth,r=n.clientHeight,c=0,f=0;if(i){s=i.width,r=i.height;const u=bt();(!u||u&&e==="fixed")&&(c=i.offsetLeft,f=i.offsetTop)}const a=dt(n);if(a<=0){const u=n.ownerDocument,l=u.body,w=getComputedStyle(l),g=u.compatMode==="CSS1Compat"&&parseFloat(w.marginLeft)+parseFloat(w.marginRight)||0,p=Math.abs(n.clientWidth-l.clientWidth-g);p<=$t&&(s-=p)}else a<=$t&&(s+=a);return{width:s,height:r,x:c,y:f}}const Me=new Set(["absolute","fixed"]);function _e(t,e){const o=ot(t,!0,e==="fixed"),n=o.top+t.clientTop,i=o.left+t.clientLeft,s=X(t)?J(t):H(1),r=t.clientWidth*s.x,c=t.clientHeight*s.y,f=i*s.x,a=n*s.y;return{width:r,height:c,x:f,y:a}}function kt(t,e,o){let n;if(e==="viewport")n=Be(t,o);else if(e==="document")n=ke(z(t));else if(I(e))n=_e(e,o);else{const i=Xt(t);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Q(n)}function zt(t,e){const o=K(t);return o===e||!I(o)||tt(o)?!1:W(o).position==="fixed"||zt(o,e)}function Ne(t,e){const o=e.get(t);if(o)return o;let n=Vt(t,[]).filter(c=>I(c)&&et(c)!=="body"),i=null;const s=W(t).position==="fixed";let r=s?K(t):t;for(;I(r)&&!tt(r);){const c=W(r),f=vt(r);!f&&c.position==="fixed"&&(i=null),(s?!f&&!i:!f&&c.position==="static"&&!!i&&Me.has(i.position)||it(r)&&!f&&zt(t,r))?n=n.filter(u=>u!==r):i=c,r=K(r)}return e.set(t,n),n}function Fe(t){let{element:e,boundary:o,rootBoundary:n,strategy:i}=t;const r=[...o==="clippingAncestors"?ft(e)?[]:Ne(e,this._c):[].concat(o),n],c=r[0],f=r.reduce((a,u)=>{const l=kt(e,u,i);return a.top=M(l.top,a.top),a.right=j(l.right,a.right),a.bottom=j(l.bottom,a.bottom),a.left=M(l.left,a.left),a},kt(e,c,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function qe(t){const{width:e,height:o}=Ht(t);return{width:e,height:o}}function Ie(t,e,o){const n=X(e),i=z(e),s=o==="fixed",r=ot(t,!0,s,e);let c={scrollLeft:0,scrollTop:0};const f=H(0);function a(){f.x=dt(i)}if(n||!n&&!s)if((et(e)!=="body"||it(i))&&(c=ut(e)),n){const g=ot(e,!0,s,e);f.x=g.x+e.clientLeft,f.y=g.y+e.clientTop}else i&&a();s&&!n&&i&&a();const u=i&&!n&&!s?Yt(i,c):H(0),l=r.left+c.scrollLeft-f.x-u.x,w=r.top+c.scrollTop-f.y-u.y;return{x:l,y:w,width:r.width,height:r.height}}function gt(t){return W(t).position==="static"}function Bt(t,e){if(!X(t)||W(t).position==="fixed")return null;if(e)return e(t);let o=t.offsetParent;return z(t)===o&&(o=o.ownerDocument.body),o}function Kt(t,e){const o=N(t);if(ft(t))return o;if(!X(t)){let i=K(t);for(;i&&!tt(i);){if(I(i)&&!gt(i))return i;i=K(i)}return o}let n=Bt(t,e);for(;n&&Se(n)&>(n);)n=Bt(n,e);return n&&tt(n)&>(n)&&!vt(n)?o:n||Pe(t)||o}const We=async function(t){const e=this.getOffsetParent||Kt,o=this.getDimensions,n=await o(t.floating);return{reference:Ie(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Ve(t){return W(t).direction==="rtl"}const He={convertOffsetParentRelativeRectToViewportRelativeRect:Le,getDocumentElement:z,getClippingRect:Fe,getOffsetParent:Kt,getElementRects:We,getClientRects:$e,getDimensions:qe,getScale:J,isElement:I,isRTL:Ve},je=we,Xe=fe,Ye=xe,ze=ue,Ke=ye,Ue=de,Ge=le,Je=ge,Qe=(t,e,o)=>{const n=new Map,i={platform:He,...o},s={...i.platform,_c:n};return ce(t,e,{...i,platform:s})};function Ze(t){var e;const{char:o,allowSpaces:n,allowToIncludeChar:i,allowedPrefixes:s,startOfLine:r,$position:c}=t,f=n&&!i,a=Jt.escapeForRegEx(o),u=new RegExp(`\\s${a}$`),l=r?"^":"",w=i?"":a,g=f?new RegExp(`${l}${a}.*?(?=\\s${w}|$)`,"gm"):new RegExp(`${l}(?:^)?${a}[^\\s${w}]*`,"gm"),p=((e=c.nodeBefore)==null?void 0:e.isText)&&c.nodeBefore.text;if(!p)return null;const v=c.pos-p.length,d=Array.from(p.matchAll(g)).pop();if(!d||d.input===void 0||d.index===void 0)return null;const m=d.input.slice(Math.max(0,d.index-1),d.index),S=new RegExp(`^[${s==null?void 0:s.join("")}\0]?$`).test(m);if(s!==null&&!S)return null;const A=v+d.index;let E=A+d[0].length;return f&&u.test(p.slice(E-1,E+1))&&(d[0]+=" ",E+=1),A<c.pos&&E>=c.pos?{range:{from:A,to:E},query:d[0].slice(o.length),text:d[0]}:null}var tn=new Mt.PluginKey("suggestion");function Ut({pluginKey:t=tn,editor:e,char:o="@",allowSpaces:n=!1,allowToIncludeChar:i=!1,allowedPrefixes:s=[" "],startOfLine:r=!1,decorationTag:c="span",decorationClass:f="suggestion",decorationContent:a="",decorationEmptyClass:u="is-empty",command:l=()=>null,items:w=()=>[],render:g=()=>({}),allow:p=()=>!0,findSuggestionMatch:v=Ze}){let d;const m=g==null?void 0:g(),S=()=>{const y=e.state.selection.$anchor.pos,b=e.view.coordsAtPos(y),{top:C,right:P,bottom:h,left:R}=b;try{return new DOMRect(R,C,P-R,h-C)}catch{return null}},A=(y,b)=>b?()=>{const C=t.getState(e.state),P=C==null?void 0:C.decorationId,h=y.dom.querySelector(`[data-decoration-id="${P}"]`);return(h==null?void 0:h.getBoundingClientRect())||null}:S;function E(y,b){var C;try{const h=t.getState(y.state),R=h!=null&&h.decorationId?y.dom.querySelector(`[data-decoration-id="${h.decorationId}"]`):null,D={editor:e,range:(h==null?void 0:h.range)||{from:0,to:0},query:(h==null?void 0:h.query)||null,text:(h==null?void 0:h.text)||null,items:[],command:k=>l({editor:e,range:(h==null?void 0:h.range)||{from:0,to:0},props:k}),decorationNode:R,clientRect:A(y,R)};(C=m==null?void 0:m.onExit)==null||C.call(m,D)}catch{}const P=y.state.tr.setMeta(b,{exit:!0});y.dispatch(P)}const O=new Mt.Plugin({key:t,view(){return{update:async(y,b)=>{var C,P,h,R,D,k,L;const x=(C=this.key)==null?void 0:C.getState(b),$=(P=this.key)==null?void 0:P.getState(y.state),T=x.active&&$.active&&x.range.from!==$.range.from,B=!x.active&&$.active,_=x.active&&!$.active,U=!B&&!_&&x.query!==$.query,nt=B||T&&U,st=U||T,mt=_||T&&U;if(!nt&&!st&&!mt)return;const G=mt&&!nt?x:$,St=y.dom.querySelector(`[data-decoration-id="${G.decorationId}"]`);d={editor:e,range:G.range,query:G.query,text:G.text,items:[],command:Gt=>l({editor:e,range:G.range,props:Gt}),decorationNode:St,clientRect:A(y,St)},nt&&((h=m==null?void 0:m.onBeforeStart)==null||h.call(m,d)),st&&((R=m==null?void 0:m.onBeforeUpdate)==null||R.call(m,d)),(st||nt)&&(d.items=await w({editor:e,query:G.query})),mt&&((D=m==null?void 0:m.onExit)==null||D.call(m,d)),st&&((k=m==null?void 0:m.onUpdate)==null||k.call(m,d)),nt&&((L=m==null?void 0:m.onStart)==null||L.call(m,d))},destroy:()=>{var y;d&&((y=m==null?void 0:m.onExit)==null||y.call(m,d))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(y,b,C,P){const{isEditable:h}=e,{composing:R}=e.view,{selection:D}=y,{empty:k,from:L}=D,x={...b},$=y.getMeta(t);if($&&$.exit)return x.active=!1,x.decorationId=null,x.range={from:0,to:0},x.query=null,x.text=null,x;if(x.composing=R,h&&(k||e.view.composing)){(L<b.range.from||L>b.range.to)&&!R&&!b.composing&&(x.active=!1);const T=v({char:o,allowSpaces:n,allowToIncludeChar:i,allowedPrefixes:s,startOfLine:r,$position:D.$from}),B=`id_${Math.floor(Math.random()*4294967295)}`;T&&p({editor:e,state:P,range:T.range,isActive:b.active})?(x.active=!0,x.decorationId=b.decorationId?b.decorationId:B,x.range=T.range,x.query=T.query,x.text=T.text):x.active=!1}else x.active=!1;return x.active||(x.decorationId=null,x.range={from:0,to:0},x.query=null,x.text=null),x}},props:{handleKeyDown(y,b){var C,P,h,R;const{active:D,range:k}=O.getState(y.state);if(!D)return!1;if(b.key==="Escape"||b.key==="Esc"){const x=O.getState(y.state),$=(C=d==null?void 0:d.decorationNode)!=null?C:null,T=$??(x!=null&&x.decorationId?y.dom.querySelector(`[data-decoration-id="${x.decorationId}"]`):null);if(((P=m==null?void 0:m.onKeyDown)==null?void 0:P.call(m,{view:y,event:b,range:x.range}))||!1)return!0;const _={editor:e,range:x.range,query:x.query,text:x.text,items:[],command:U=>l({editor:e,range:x.range,props:U}),decorationNode:T,clientRect:T?()=>T.getBoundingClientRect()||null:null};return(h=m==null?void 0:m.onExit)==null||h.call(m,_),E(y,t),!0}return((R=m==null?void 0:m.onKeyDown)==null?void 0:R.call(m,{view:y,event:b,range:k}))||!1},decorations(y){const{active:b,range:C,decorationId:P,query:h}=O.getState(y);if(!b)return null;const R=!(h!=null&&h.length),D=[f];return R&&D.push(u),Rt.DecorationSet.create(y.doc,[Rt.Decoration.inline(C.from,C.to,{nodeName:c,class:D.join(" "),"data-decoration-id":P,"data-decoration-content":a})])}}});return O}var en=Ut;exports.Suggestion=Ut;exports.arrow=Ge;exports.autoPlacement=Xe;exports.computePosition=Qe;exports.flip=ze;exports.hide=Ue;exports.index_default=en;exports.inline=Je;exports.offset=je;exports.shift=Ye;exports.size=Ke;
|