phx-react 1.3.1569 → 1.3.1571
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/dist/cjs/components/Combobox/Combobox.js +9 -3
- package/dist/cjs/components/Combobox/Combobox.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/commenting/index.d.ts +41 -0
- package/dist/cjs/components/TextEditorV2/commenting/index.js +340 -0
- package/dist/cjs/components/TextEditorV2/commenting/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/constants.d.ts +1 -0
- package/dist/cjs/components/TextEditorV2/constants.js +5 -0
- package/dist/cjs/components/TextEditorV2/constants.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/context/SettingsContext.d.ts +12 -0
- package/dist/cjs/components/TextEditorV2/context/SettingsContext.js +59 -0
- package/dist/cjs/components/TextEditorV2/context/SettingsContext.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/context/SharedAutocompleteContext.d.ts +10 -0
- package/dist/cjs/components/TextEditorV2/context/SharedAutocompleteContext.js +50 -0
- package/dist/cjs/components/TextEditorV2/context/SharedAutocompleteContext.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/context/SharedHistoryContext.d.ts +11 -0
- package/dist/cjs/components/TextEditorV2/context/SharedHistoryContext.js +17 -0
- package/dist/cjs/components/TextEditorV2/context/SharedHistoryContext.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/editor.d.ts +10 -0
- package/dist/cjs/components/TextEditorV2/editor.js +203 -0
- package/dist/cjs/components/TextEditorV2/editor.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/hooks/useModal.d.ts +5 -0
- package/dist/cjs/components/TextEditorV2/hooks/useModal.js +32 -0
- package/dist/cjs/components/TextEditorV2/hooks/useModal.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/hooks/useReport.d.ts +1 -0
- package/dist/cjs/components/TextEditorV2/hooks/useReport.js +45 -0
- package/dist/cjs/components/TextEditorV2/hooks/useReport.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/lib/Settings.d.ts +2 -0
- package/dist/cjs/components/TextEditorV2/lib/Settings.js +52 -0
- package/dist/cjs/components/TextEditorV2/lib/Settings.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/lib/appSettings.d.ts +19 -0
- package/dist/cjs/components/TextEditorV2/lib/appSettings.js +21 -0
- package/dist/cjs/components/TextEditorV2/lib/appSettings.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/lib/collaboration.d.ts +3 -0
- package/dist/cjs/components/TextEditorV2/lib/collaboration.js +26 -0
- package/dist/cjs/components/TextEditorV2/lib/collaboration.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/lib/setupEnv.d.ts +1 -0
- package/dist/cjs/components/TextEditorV2/lib/setupEnv.js +23 -0
- package/dist/cjs/components/TextEditorV2/lib/setupEnv.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/nodes/AutocompleteNode.d.ts +25 -0
- package/dist/cjs/components/TextEditorV2/nodes/AutocompleteNode.js +58 -0
- package/dist/cjs/components/TextEditorV2/nodes/AutocompleteNode.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/nodes/EmojiNode.d.ts +18 -0
- package/dist/cjs/components/TextEditorV2/nodes/EmojiNode.js +62 -0
- package/dist/cjs/components/TextEditorV2/nodes/EmojiNode.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/nodes/EquationComponent.d.ts +9 -0
- package/dist/cjs/components/TextEditorV2/nodes/EquationComponent.js +72 -0
- package/dist/cjs/components/TextEditorV2/nodes/EquationComponent.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/nodes/EquationNode.d.ts +26 -0
- package/dist/cjs/components/TextEditorV2/nodes/EquationNode.js +126 -0
- package/dist/cjs/components/TextEditorV2/nodes/EquationNode.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawComponent.d.ts +6 -0
- package/dist/cjs/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawComponent.js +117 -0
- package/dist/cjs/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawComponent.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawImage.d.ts +50 -0
- package/dist/cjs/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawImage.js +59 -0
- package/dist/cjs/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawImage.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawModal.d.ts +44 -0
- package/dist/cjs/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawModal.js +143 -0
- package/dist/cjs/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawModal.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/nodes/ExcalidrawNode/index.d.ts +22 -0
- package/dist/cjs/components/TextEditorV2/nodes/ExcalidrawNode/index.js +103 -0
- package/dist/cjs/components/TextEditorV2/nodes/ExcalidrawNode/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/nodes/ExtendedTextNode.d.ts +12 -0
- package/dist/cjs/components/TextEditorV2/nodes/ExtendedTextNode.js +106 -0
- package/dist/cjs/components/TextEditorV2/nodes/ExtendedTextNode.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/nodes/FigmaNode.d.ts +19 -0
- package/dist/cjs/components/TextEditorV2/nodes/FigmaNode.js +63 -0
- package/dist/cjs/components/TextEditorV2/nodes/FigmaNode.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/nodes/ImageComponent.d.ts +14 -0
- package/dist/cjs/components/TextEditorV2/nodes/ImageComponent.js +212 -0
- package/dist/cjs/components/TextEditorV2/nodes/ImageComponent.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/nodes/ImageNode.d.ts +56 -0
- package/dist/cjs/components/TextEditorV2/nodes/ImageNode.js +136 -0
- package/dist/cjs/components/TextEditorV2/nodes/ImageNode.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/nodes/InlineImageComponent.d.ts +18 -0
- package/dist/cjs/components/TextEditorV2/nodes/InlineImageComponent.js +194 -0
- package/dist/cjs/components/TextEditorV2/nodes/InlineImageComponent.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/nodes/InlineImageNode.d.ts +54 -0
- package/dist/cjs/components/TextEditorV2/nodes/InlineImageNode.js +142 -0
- package/dist/cjs/components/TextEditorV2/nodes/InlineImageNode.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/nodes/KeywordNode.d.ts +15 -0
- package/dist/cjs/components/TextEditorV2/nodes/KeywordNode.js +54 -0
- package/dist/cjs/components/TextEditorV2/nodes/KeywordNode.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/nodes/LayoutContainerNode.d.ts +21 -0
- package/dist/cjs/components/TextEditorV2/nodes/LayoutContainerNode.js +63 -0
- package/dist/cjs/components/TextEditorV2/nodes/LayoutContainerNode.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/nodes/LayoutItemNode.d.ts +15 -0
- package/dist/cjs/components/TextEditorV2/nodes/LayoutItemNode.js +51 -0
- package/dist/cjs/components/TextEditorV2/nodes/LayoutItemNode.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/nodes/MentionNode.d.ts +20 -0
- package/dist/cjs/components/TextEditorV2/nodes/MentionNode.js +89 -0
- package/dist/cjs/components/TextEditorV2/nodes/MentionNode.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/nodes/PageBreakNode/index.d.ts +17 -0
- package/dist/cjs/components/TextEditorV2/nodes/PageBreakNode/index.js +113 -0
- package/dist/cjs/components/TextEditorV2/nodes/PageBreakNode/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/nodes/PlaygroundNodes.d.ts +3 -0
- package/dist/cjs/components/TextEditorV2/nodes/PlaygroundNodes.js +68 -0
- package/dist/cjs/components/TextEditorV2/nodes/PlaygroundNodes.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/nodes/PollComponent.d.ts +8 -0
- package/dist/cjs/components/TextEditorV2/nodes/PollComponent.js +113 -0
- package/dist/cjs/components/TextEditorV2/nodes/PollComponent.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/nodes/PollNode.d.ts +33 -0
- package/dist/cjs/components/TextEditorV2/nodes/PollNode.js +149 -0
- package/dist/cjs/components/TextEditorV2/nodes/PollNode.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/nodes/StickyComponent.d.ts +9 -0
- package/dist/cjs/components/TextEditorV2/nodes/StickyComponent.js +167 -0
- package/dist/cjs/components/TextEditorV2/nodes/StickyComponent.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/nodes/StickyNode.d.ts +37 -0
- package/dist/cjs/components/TextEditorV2/nodes/StickyNode.js +94 -0
- package/dist/cjs/components/TextEditorV2/nodes/StickyNode.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/nodes/TableNode.d.ts +54 -0
- package/dist/cjs/components/TextEditorV2/nodes/TableNode.js +198 -0
- package/dist/cjs/components/TextEditorV2/nodes/TableNode.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/nodes/TweetNode.d.ts +28 -0
- package/dist/cjs/components/TextEditorV2/nodes/TweetNode.js +156 -0
- package/dist/cjs/components/TextEditorV2/nodes/TweetNode.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/nodes/YouTubeNode.d.ts +28 -0
- package/dist/cjs/components/TextEditorV2/nodes/YouTubeNode.js +103 -0
- package/dist/cjs/components/TextEditorV2/nodes/YouTubeNode.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/ActionsPlugin/index.d.ts +2 -0
- package/dist/cjs/components/TextEditorV2/plugins/ActionsPlugin/index.js +183 -0
- package/dist/cjs/components/TextEditorV2/plugins/ActionsPlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/AutoEmbedPlugin/index.d.ts +19 -0
- package/dist/cjs/components/TextEditorV2/plugins/AutoEmbedPlugin/index.js +179 -0
- package/dist/cjs/components/TextEditorV2/plugins/AutoEmbedPlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/AutoLinkPlugin/index.d.ts +2 -0
- package/dist/cjs/components/TextEditorV2/plugins/AutoLinkPlugin/index.js +16 -0
- package/dist/cjs/components/TextEditorV2/plugins/AutoLinkPlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/AutocompletePlugin/index.d.ts +2 -0
- package/dist/cjs/components/TextEditorV2/plugins/AutocompletePlugin/index.js +2465 -0
- package/dist/cjs/components/TextEditorV2/plugins/AutocompletePlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/CodeActionMenuPlugin/components/CopyButton/index.d.ts +8 -0
- package/dist/cjs/components/TextEditorV2/plugins/CodeActionMenuPlugin/components/CopyButton/index.js +55 -0
- package/dist/cjs/components/TextEditorV2/plugins/CodeActionMenuPlugin/components/CopyButton/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/CodeActionMenuPlugin/components/PrettierButton/index.d.ts +10 -0
- package/dist/cjs/components/TextEditorV2/plugins/CodeActionMenuPlugin/components/PrettierButton/index.js +159 -0
- package/dist/cjs/components/TextEditorV2/plugins/CodeActionMenuPlugin/components/PrettierButton/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/CodeActionMenuPlugin/index.d.ts +4 -0
- package/dist/cjs/components/TextEditorV2/plugins/CodeActionMenuPlugin/index.js +111 -0
- package/dist/cjs/components/TextEditorV2/plugins/CodeActionMenuPlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/CodeActionMenuPlugin/utils.d.ts +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/CodeActionMenuPlugin/utils.js +21 -0
- package/dist/cjs/components/TextEditorV2/plugins/CodeActionMenuPlugin/utils.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/CodeHighlightPlugin/index.d.ts +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/CodeHighlightPlugin/index.js +12 -0
- package/dist/cjs/components/TextEditorV2/plugins/CodeHighlightPlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContainerNode.d.ts +23 -0
- package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContainerNode.js +88 -0
- package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContainerNode.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContentNode.d.ts +17 -0
- package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContentNode.js +70 -0
- package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContentNode.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleTitleNode.d.ts +18 -0
- package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleTitleNode.js +95 -0
- package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleTitleNode.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/index.d.ts +3 -0
- package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/index.js +148 -0
- package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/ComponentPickerPlugin/index.d.ts +2 -0
- package/dist/cjs/components/TextEditorV2/plugins/ComponentPickerPlugin/index.js +264 -0
- package/dist/cjs/components/TextEditorV2/plugins/ComponentPickerPlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/ContextMenuPlugin/index.d.ts +11 -0
- package/dist/cjs/components/TextEditorV2/plugins/ContextMenuPlugin/index.js +171 -0
- package/dist/cjs/components/TextEditorV2/plugins/ContextMenuPlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/DocsPlugin/index.d.ts +2 -0
- package/dist/cjs/components/TextEditorV2/plugins/DocsPlugin/index.js +10 -0
- package/dist/cjs/components/TextEditorV2/plugins/DocsPlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/DragDropPastePlugin/index.d.ts +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/DragDropPastePlugin/index.js +44 -0
- package/dist/cjs/components/TextEditorV2/plugins/DragDropPastePlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/DraggableBlockPlugin/index.d.ts +4 -0
- package/dist/cjs/components/TextEditorV2/plugins/DraggableBlockPlugin/index.js +288 -0
- package/dist/cjs/components/TextEditorV2/plugins/DraggableBlockPlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/EmojiPickerPlugin/index.d.ts +2 -0
- package/dist/cjs/components/TextEditorV2/plugins/EmojiPickerPlugin/index.js +97 -0
- package/dist/cjs/components/TextEditorV2/plugins/EmojiPickerPlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/EmojisPlugin/index.d.ts +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/EmojisPlugin/index.js +64 -0
- package/dist/cjs/components/TextEditorV2/plugins/EmojisPlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/EquationsPlugin/index.d.ts +14 -0
- package/dist/cjs/components/TextEditorV2/plugins/EquationsPlugin/index.js +42 -0
- package/dist/cjs/components/TextEditorV2/plugins/EquationsPlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/ExcalidrawPlugin/index.d.ts +3 -0
- package/dist/cjs/components/TextEditorV2/plugins/ExcalidrawPlugin/index.js +28 -0
- package/dist/cjs/components/TextEditorV2/plugins/ExcalidrawPlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/FigmaPlugin/index.d.ts +3 -0
- package/dist/cjs/components/TextEditorV2/plugins/FigmaPlugin/index.js +25 -0
- package/dist/cjs/components/TextEditorV2/plugins/FigmaPlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/FloatingLinkEditorPlugin/index.d.ts +7 -0
- package/dist/cjs/components/TextEditorV2/plugins/FloatingLinkEditorPlugin/index.js +200 -0
- package/dist/cjs/components/TextEditorV2/plugins/FloatingLinkEditorPlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/FloatingTextFormatToolbarPlugin/index.d.ts +4 -0
- package/dist/cjs/components/TextEditorV2/plugins/FloatingTextFormatToolbarPlugin/index.js +229 -0
- package/dist/cjs/components/TextEditorV2/plugins/FloatingTextFormatToolbarPlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/ImagesPlugin/index.d.ts +22 -0
- package/dist/cjs/components/TextEditorV2/plugins/ImagesPlugin/index.js +188 -0
- package/dist/cjs/components/TextEditorV2/plugins/ImagesPlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/InlineImagePlugin/index.d.ts +17 -0
- package/dist/cjs/components/TextEditorV2/plugins/InlineImagePlugin/index.js +193 -0
- package/dist/cjs/components/TextEditorV2/plugins/InlineImagePlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/KeywordsPlugin/index.d.ts +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/KeywordsPlugin/index.js +33 -0
- package/dist/cjs/components/TextEditorV2/plugins/KeywordsPlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/LayoutPlugin/InsertLayoutDialog.d.ts +6 -0
- package/dist/cjs/components/TextEditorV2/plugins/LayoutPlugin/InsertLayoutDialog.js +34 -0
- package/dist/cjs/components/TextEditorV2/plugins/LayoutPlugin/InsertLayoutDialog.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/LayoutPlugin/LayoutPlugin.d.ts +7 -0
- package/dist/cjs/components/TextEditorV2/plugins/LayoutPlugin/LayoutPlugin.js +89 -0
- package/dist/cjs/components/TextEditorV2/plugins/LayoutPlugin/LayoutPlugin.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/LinkPlugin/index.d.ts +2 -0
- package/dist/cjs/components/TextEditorV2/plugins/LinkPlugin/index.js +11 -0
- package/dist/cjs/components/TextEditorV2/plugins/LinkPlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/ListMaxIndentLevelPlugin/index.d.ts +5 -0
- package/dist/cjs/components/TextEditorV2/plugins/ListMaxIndentLevelPlugin/index.js +44 -0
- package/dist/cjs/components/TextEditorV2/plugins/ListMaxIndentLevelPlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/MarkdownShortcutPlugin/index.d.ts +2 -0
- package/dist/cjs/components/TextEditorV2/plugins/MarkdownShortcutPlugin/index.js +11 -0
- package/dist/cjs/components/TextEditorV2/plugins/MarkdownShortcutPlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/MarkdownTransformers/index.d.ts +8 -0
- package/dist/cjs/components/TextEditorV2/plugins/MarkdownTransformers/index.js +242 -0
- package/dist/cjs/components/TextEditorV2/plugins/MarkdownTransformers/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/MaxLengthPlugin/index.d.ts +3 -0
- package/dist/cjs/components/TextEditorV2/plugins/MaxLengthPlugin/index.js +41 -0
- package/dist/cjs/components/TextEditorV2/plugins/MaxLengthPlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/MentionsPlugin/index.d.ts +2 -0
- package/dist/cjs/components/TextEditorV2/plugins/MentionsPlugin/index.js +560 -0
- package/dist/cjs/components/TextEditorV2/plugins/MentionsPlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/PageBreakPlugin/index.d.ts +3 -0
- package/dist/cjs/components/TextEditorV2/plugins/PageBreakPlugin/index.js +31 -0
- package/dist/cjs/components/TextEditorV2/plugins/PageBreakPlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/PasteLogPlugin/index.d.ts +2 -0
- package/dist/cjs/components/TextEditorV2/plugins/PasteLogPlugin/index.js +37 -0
- package/dist/cjs/components/TextEditorV2/plugins/PasteLogPlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/PollPlugin/index.d.ts +8 -0
- package/dist/cjs/components/TextEditorV2/plugins/PollPlugin/index.js +46 -0
- package/dist/cjs/components/TextEditorV2/plugins/PollPlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/StickyPlugin/index.d.ts +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/StickyPlugin/index.js +16 -0
- package/dist/cjs/components/TextEditorV2/plugins/StickyPlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/TabFocusPlugin/index.d.ts +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/TabFocusPlugin/index.js +38 -0
- package/dist/cjs/components/TextEditorV2/plugins/TabFocusPlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/TableActionMenuPlugin/index.d.ts +5 -0
- package/dist/cjs/components/TextEditorV2/plugins/TableActionMenuPlugin/index.js +487 -0
- package/dist/cjs/components/TextEditorV2/plugins/TableActionMenuPlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/TableCellResizer/index.d.ts +2 -0
- package/dist/cjs/components/TextEditorV2/plugins/TableCellResizer/index.js +253 -0
- package/dist/cjs/components/TextEditorV2/plugins/TableCellResizer/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/TableOfContentsPlugin/index.d.ts +2 -0
- package/dist/cjs/components/TextEditorV2/plugins/TableOfContentsPlugin/index.js +117 -0
- package/dist/cjs/components/TextEditorV2/plugins/TableOfContentsPlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/TablePlugin.d.ts +32 -0
- package/dist/cjs/components/TextEditorV2/plugins/TablePlugin.js +85 -0
- package/dist/cjs/components/TextEditorV2/plugins/TablePlugin.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/bold-text.d.ts +6 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/bold-text.js +18 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/bold-text.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/bullet.d.ts +6 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/bullet.js +28 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/bullet.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/font-size.d.ts +6 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/font-size.js +65 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/font-size.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.d.ts +6 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.js +71 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/italic-text.d.ts +6 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/italic-text.js +18 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/italic-text.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/link.d.ts +5 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/link.js +46 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/link.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/number-bullet.d.ts +6 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/number-bullet.js +28 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/number-bullet.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/text-align.d.ts +6 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/text-align.js +52 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/text-align.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/text-color.d.ts +6 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/text-color.js +28 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/text-color.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/underline-text.d.ts +6 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/underline-text.js +19 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/underline-text.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/upload-image.d.ts +6 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/upload-image.js +41 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/upload-image.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/upload-pdf.d.ts +11 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/upload-pdf.js +162 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/upload-pdf.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/index.d.ts +4 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/index.js +163 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/TreeViewPlugin/index.d.ts +2 -0
- package/dist/cjs/components/TextEditorV2/plugins/TreeViewPlugin/index.js +12 -0
- package/dist/cjs/components/TextEditorV2/plugins/TreeViewPlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/TwitterPlugin/index.d.ts +3 -0
- package/dist/cjs/components/TextEditorV2/plugins/TwitterPlugin/index.js +25 -0
- package/dist/cjs/components/TextEditorV2/plugins/TwitterPlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/YouTubePlugin/index.d.ts +3 -0
- package/dist/cjs/components/TextEditorV2/plugins/YouTubePlugin/index.js +25 -0
- package/dist/cjs/components/TextEditorV2/plugins/YouTubePlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/shared/canUseDOM.d.ts +1 -0
- package/dist/cjs/components/TextEditorV2/shared/canUseDOM.js +7 -0
- package/dist/cjs/components/TextEditorV2/shared/canUseDOM.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/shared/caretFromPoint.d.ts +4 -0
- package/dist/cjs/components/TextEditorV2/shared/caretFromPoint.js +32 -0
- package/dist/cjs/components/TextEditorV2/shared/caretFromPoint.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/shared/environment.d.ts +16 -0
- package/dist/cjs/components/TextEditorV2/shared/environment.js +17 -0
- package/dist/cjs/components/TextEditorV2/shared/environment.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/shared/invariant.d.ts +1 -0
- package/dist/cjs/components/TextEditorV2/shared/invariant.js +15 -0
- package/dist/cjs/components/TextEditorV2/shared/invariant.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/shared/simpleDiffWithCursor.d.ts +5 -0
- package/dist/cjs/components/TextEditorV2/shared/simpleDiffWithCursor.js +28 -0
- package/dist/cjs/components/TextEditorV2/shared/simpleDiffWithCursor.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/shared/useLayoutEffect.d.ts +3 -0
- package/dist/cjs/components/TextEditorV2/shared/useLayoutEffect.js +7 -0
- package/dist/cjs/components/TextEditorV2/shared/useLayoutEffect.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/shared/warnOnlyOnce.d.ts +1 -0
- package/dist/cjs/components/TextEditorV2/shared/warnOnlyOnce.js +16 -0
- package/dist/cjs/components/TextEditorV2/shared/warnOnlyOnce.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/style.d.ts +2 -0
- package/dist/cjs/components/TextEditorV2/style.js +9 -0
- package/dist/cjs/components/TextEditorV2/style.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/themes/CommentEditorTheme.d.ts +3 -0
- package/dist/cjs/components/TextEditorV2/themes/CommentEditorTheme.js +7 -0
- package/dist/cjs/components/TextEditorV2/themes/CommentEditorTheme.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/themes/PlaygroundEditorTheme.d.ts +3 -0
- package/dist/cjs/components/TextEditorV2/themes/PlaygroundEditorTheme.js +107 -0
- package/dist/cjs/components/TextEditorV2/themes/PlaygroundEditorTheme.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/themes/StickyEditorTheme.d.ts +3 -0
- package/dist/cjs/components/TextEditorV2/themes/StickyEditorTheme.js +7 -0
- package/dist/cjs/components/TextEditorV2/themes/StickyEditorTheme.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/ui/Button.d.ts +11 -0
- package/dist/cjs/components/TextEditorV2/ui/Button.js +11 -0
- package/dist/cjs/components/TextEditorV2/ui/Button.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/ui/ColorPicker.d.ts +12 -0
- package/dist/cjs/components/TextEditorV2/ui/ColorPicker.js +216 -0
- package/dist/cjs/components/TextEditorV2/ui/ColorPicker.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/ui/ContentEditable.d.ts +4 -0
- package/dist/cjs/components/TextEditorV2/ui/ContentEditable.js +11 -0
- package/dist/cjs/components/TextEditorV2/ui/ContentEditable.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/ui/Dialog.d.ts +9 -0
- package/dist/cjs/components/TextEditorV2/ui/Dialog.js +15 -0
- package/dist/cjs/components/TextEditorV2/ui/Dialog.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/ui/DropDown.d.ts +17 -0
- package/dist/cjs/components/TextEditorV2/ui/DropDown.js +133 -0
- package/dist/cjs/components/TextEditorV2/ui/DropDown.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/ui/DropdownColorPicker.d.ts +21 -0
- package/dist/cjs/components/TextEditorV2/ui/DropdownColorPicker.js +20 -0
- package/dist/cjs/components/TextEditorV2/ui/DropdownColorPicker.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/ui/EquationEditor.d.ts +8 -0
- package/dist/cjs/components/TextEditorV2/ui/EquationEditor.js +20 -0
- package/dist/cjs/components/TextEditorV2/ui/EquationEditor.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/ui/FileInput.d.ts +9 -0
- package/dist/cjs/components/TextEditorV2/ui/FileInput.js +12 -0
- package/dist/cjs/components/TextEditorV2/ui/FileInput.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/ui/ImageResizer.d.ts +11 -0
- package/dist/cjs/components/TextEditorV2/ui/ImageResizer.js +178 -0
- package/dist/cjs/components/TextEditorV2/ui/ImageResizer.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/ui/KatexEquationAlterer.d.ts +7 -0
- package/dist/cjs/components/TextEditorV2/ui/KatexEquationAlterer.js +39 -0
- package/dist/cjs/components/TextEditorV2/ui/KatexEquationAlterer.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/ui/KatexRenderer.d.ts +6 -0
- package/dist/cjs/components/TextEditorV2/ui/KatexRenderer.js +33 -0
- package/dist/cjs/components/TextEditorV2/ui/KatexRenderer.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/ui/Modal.d.ts +8 -0
- package/dist/cjs/components/TextEditorV2/ui/Modal.js +54 -0
- package/dist/cjs/components/TextEditorV2/ui/Modal.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/ui/Placeholder.d.ts +6 -0
- package/dist/cjs/components/TextEditorV2/ui/Placeholder.js +10 -0
- package/dist/cjs/components/TextEditorV2/ui/Placeholder.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/ui/Select.d.ts +7 -0
- package/dist/cjs/components/TextEditorV2/ui/Select.js +12 -0
- package/dist/cjs/components/TextEditorV2/ui/Select.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/ui/Switch.d.ts +7 -0
- package/dist/cjs/components/TextEditorV2/ui/Switch.js +15 -0
- package/dist/cjs/components/TextEditorV2/ui/Switch.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/ui/TextInput.d.ts +12 -0
- package/dist/cjs/components/TextEditorV2/ui/TextInput.js +14 -0
- package/dist/cjs/components/TextEditorV2/ui/TextInput.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/utils/emoji-list.d.ts +20 -0
- package/dist/cjs/components/TextEditorV2/utils/emoji-list.js +16607 -0
- package/dist/cjs/components/TextEditorV2/utils/emoji-list.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/utils/getDOMRangeRect.d.ts +1 -0
- package/dist/cjs/components/TextEditorV2/utils/getDOMRangeRect.js +19 -0
- package/dist/cjs/components/TextEditorV2/utils/getDOMRangeRect.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/utils/getPrepopulatedRichText.d.ts +1 -0
- package/dist/cjs/components/TextEditorV2/utils/getPrepopulatedRichText.js +35 -0
- package/dist/cjs/components/TextEditorV2/utils/getPrepopulatedRichText.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/utils/getSelectedNode.d.ts +2 -0
- package/dist/cjs/components/TextEditorV2/utils/getSelectedNode.js +21 -0
- package/dist/cjs/components/TextEditorV2/utils/getSelectedNode.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/utils/guard.d.ts +1 -0
- package/dist/cjs/components/TextEditorV2/utils/guard.js +7 -0
- package/dist/cjs/components/TextEditorV2/utils/guard.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/utils/isMobileWidth.d.ts +0 -0
- package/dist/cjs/components/TextEditorV2/utils/isMobileWidth.js +2 -0
- package/dist/cjs/components/TextEditorV2/utils/isMobileWidth.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/utils/joinClasses.d.ts +1 -0
- package/dist/cjs/components/TextEditorV2/utils/joinClasses.js +11 -0
- package/dist/cjs/components/TextEditorV2/utils/joinClasses.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/utils/point.d.ts +14 -0
- package/dist/cjs/components/TextEditorV2/utils/point.js +51 -0
- package/dist/cjs/components/TextEditorV2/utils/point.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/utils/rect.d.ts +38 -0
- package/dist/cjs/components/TextEditorV2/utils/rect.js +125 -0
- package/dist/cjs/components/TextEditorV2/utils/rect.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/utils/setFloatingElemPosition.d.ts +1 -0
- package/dist/cjs/components/TextEditorV2/utils/setFloatingElemPosition.js +33 -0
- package/dist/cjs/components/TextEditorV2/utils/setFloatingElemPosition.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/utils/setFloatingElemPositionForLinkEditor.d.ts +1 -0
- package/dist/cjs/components/TextEditorV2/utils/setFloatingElemPositionForLinkEditor.js +31 -0
- package/dist/cjs/components/TextEditorV2/utils/setFloatingElemPositionForLinkEditor.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/utils/swipe.d.ts +4 -0
- package/dist/cjs/components/TextEditorV2/utils/swipe.js +97 -0
- package/dist/cjs/components/TextEditorV2/utils/swipe.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/utils/url.d.ts +2 -0
- package/dist/cjs/components/TextEditorV2/utils/url.js +26 -0
- package/dist/cjs/components/TextEditorV2/utils/url.js.map +1 -0
- package/dist/cjs/components/Textarea/Textarea.js +28 -4
- package/dist/cjs/components/Textarea/Textarea.js.map +1 -1
- package/dist/cjs/index.d.ts +2 -1
- package/dist/cjs/index.js +5 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/Combobox/Combobox.js +9 -3
- package/dist/esm/components/Combobox/Combobox.js.map +1 -1
- package/dist/esm/components/TextEditorV2/commenting/index.d.ts +41 -0
- package/dist/esm/components/TextEditorV2/commenting/index.js +334 -0
- package/dist/esm/components/TextEditorV2/commenting/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/constants.d.ts +1 -0
- package/dist/esm/components/TextEditorV2/constants.js +2 -0
- package/dist/esm/components/TextEditorV2/constants.js.map +1 -0
- package/dist/esm/components/TextEditorV2/context/SettingsContext.d.ts +12 -0
- package/dist/esm/components/TextEditorV2/context/SettingsContext.js +54 -0
- package/dist/esm/components/TextEditorV2/context/SettingsContext.js.map +1 -0
- package/dist/esm/components/TextEditorV2/context/SharedAutocompleteContext.d.ts +10 -0
- package/dist/esm/components/TextEditorV2/context/SharedAutocompleteContext.js +44 -0
- package/dist/esm/components/TextEditorV2/context/SharedAutocompleteContext.js.map +1 -0
- package/dist/esm/components/TextEditorV2/context/SharedHistoryContext.d.ts +11 -0
- package/dist/esm/components/TextEditorV2/context/SharedHistoryContext.js +11 -0
- package/dist/esm/components/TextEditorV2/context/SharedHistoryContext.js.map +1 -0
- package/dist/esm/components/TextEditorV2/editor.d.ts +10 -0
- package/dist/esm/components/TextEditorV2/editor.js +200 -0
- package/dist/esm/components/TextEditorV2/editor.js.map +1 -0
- package/dist/esm/components/TextEditorV2/hooks/useModal.d.ts +5 -0
- package/dist/esm/components/TextEditorV2/hooks/useModal.js +28 -0
- package/dist/esm/components/TextEditorV2/hooks/useModal.js.map +1 -0
- package/dist/esm/components/TextEditorV2/hooks/useReport.d.ts +1 -0
- package/dist/esm/components/TextEditorV2/hooks/useReport.js +42 -0
- package/dist/esm/components/TextEditorV2/hooks/useReport.js.map +1 -0
- package/dist/esm/components/TextEditorV2/lib/Settings.d.ts +2 -0
- package/dist/esm/components/TextEditorV2/lib/Settings.js +48 -0
- package/dist/esm/components/TextEditorV2/lib/Settings.js.map +1 -0
- package/dist/esm/components/TextEditorV2/lib/appSettings.d.ts +19 -0
- package/dist/esm/components/TextEditorV2/lib/appSettings.js +18 -0
- package/dist/esm/components/TextEditorV2/lib/appSettings.js.map +1 -0
- package/dist/esm/components/TextEditorV2/lib/collaboration.d.ts +3 -0
- package/dist/esm/components/TextEditorV2/lib/collaboration.js +23 -0
- package/dist/esm/components/TextEditorV2/lib/collaboration.js.map +1 -0
- package/dist/esm/components/TextEditorV2/lib/setupEnv.d.ts +1 -0
- package/dist/esm/components/TextEditorV2/lib/setupEnv.js +21 -0
- package/dist/esm/components/TextEditorV2/lib/setupEnv.js.map +1 -0
- package/dist/esm/components/TextEditorV2/nodes/AutocompleteNode.d.ts +25 -0
- package/dist/esm/components/TextEditorV2/nodes/AutocompleteNode.js +54 -0
- package/dist/esm/components/TextEditorV2/nodes/AutocompleteNode.js.map +1 -0
- package/dist/esm/components/TextEditorV2/nodes/EmojiNode.d.ts +18 -0
- package/dist/esm/components/TextEditorV2/nodes/EmojiNode.js +57 -0
- package/dist/esm/components/TextEditorV2/nodes/EmojiNode.js.map +1 -0
- package/dist/esm/components/TextEditorV2/nodes/EquationComponent.d.ts +9 -0
- package/dist/esm/components/TextEditorV2/nodes/EquationComponent.js +68 -0
- package/dist/esm/components/TextEditorV2/nodes/EquationComponent.js.map +1 -0
- package/dist/esm/components/TextEditorV2/nodes/EquationNode.d.ts +26 -0
- package/dist/esm/components/TextEditorV2/nodes/EquationNode.js +121 -0
- package/dist/esm/components/TextEditorV2/nodes/EquationNode.js.map +1 -0
- package/dist/esm/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawComponent.d.ts +6 -0
- package/dist/esm/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawComponent.js +113 -0
- package/dist/esm/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawComponent.js.map +1 -0
- package/dist/esm/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawImage.d.ts +50 -0
- package/dist/esm/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawImage.js +56 -0
- package/dist/esm/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawImage.js.map +1 -0
- package/dist/esm/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawModal.d.ts +44 -0
- package/dist/esm/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawModal.js +137 -0
- package/dist/esm/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawModal.js.map +1 -0
- package/dist/esm/components/TextEditorV2/nodes/ExcalidrawNode/index.d.ts +22 -0
- package/dist/esm/components/TextEditorV2/nodes/ExcalidrawNode/index.js +98 -0
- package/dist/esm/components/TextEditorV2/nodes/ExcalidrawNode/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/nodes/ExtendedTextNode.d.ts +12 -0
- package/dist/esm/components/TextEditorV2/nodes/ExtendedTextNode.js +101 -0
- package/dist/esm/components/TextEditorV2/nodes/ExtendedTextNode.js.map +1 -0
- package/dist/esm/components/TextEditorV2/nodes/FigmaNode.d.ts +19 -0
- package/dist/esm/components/TextEditorV2/nodes/FigmaNode.js +58 -0
- package/dist/esm/components/TextEditorV2/nodes/FigmaNode.js.map +1 -0
- package/dist/esm/components/TextEditorV2/nodes/ImageComponent.d.ts +14 -0
- package/dist/esm/components/TextEditorV2/nodes/ImageComponent.js +207 -0
- package/dist/esm/components/TextEditorV2/nodes/ImageComponent.js.map +1 -0
- package/dist/esm/components/TextEditorV2/nodes/ImageNode.d.ts +56 -0
- package/dist/esm/components/TextEditorV2/nodes/ImageNode.js +131 -0
- package/dist/esm/components/TextEditorV2/nodes/ImageNode.js.map +1 -0
- package/dist/esm/components/TextEditorV2/nodes/InlineImageComponent.d.ts +18 -0
- package/dist/esm/components/TextEditorV2/nodes/InlineImageComponent.js +189 -0
- package/dist/esm/components/TextEditorV2/nodes/InlineImageComponent.js.map +1 -0
- package/dist/esm/components/TextEditorV2/nodes/InlineImageNode.d.ts +54 -0
- package/dist/esm/components/TextEditorV2/nodes/InlineImageNode.js +137 -0
- package/dist/esm/components/TextEditorV2/nodes/InlineImageNode.js.map +1 -0
- package/dist/esm/components/TextEditorV2/nodes/KeywordNode.d.ts +15 -0
- package/dist/esm/components/TextEditorV2/nodes/KeywordNode.js +49 -0
- package/dist/esm/components/TextEditorV2/nodes/KeywordNode.js.map +1 -0
- package/dist/esm/components/TextEditorV2/nodes/LayoutContainerNode.d.ts +21 -0
- package/dist/esm/components/TextEditorV2/nodes/LayoutContainerNode.js +58 -0
- package/dist/esm/components/TextEditorV2/nodes/LayoutContainerNode.js.map +1 -0
- package/dist/esm/components/TextEditorV2/nodes/LayoutItemNode.d.ts +15 -0
- package/dist/esm/components/TextEditorV2/nodes/LayoutItemNode.js +46 -0
- package/dist/esm/components/TextEditorV2/nodes/LayoutItemNode.js.map +1 -0
- package/dist/esm/components/TextEditorV2/nodes/MentionNode.d.ts +20 -0
- package/dist/esm/components/TextEditorV2/nodes/MentionNode.js +84 -0
- package/dist/esm/components/TextEditorV2/nodes/MentionNode.js.map +1 -0
- package/dist/esm/components/TextEditorV2/nodes/PageBreakNode/index.d.ts +17 -0
- package/dist/esm/components/TextEditorV2/nodes/PageBreakNode/index.js +108 -0
- package/dist/esm/components/TextEditorV2/nodes/PageBreakNode/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/nodes/PlaygroundNodes.d.ts +3 -0
- package/dist/esm/components/TextEditorV2/nodes/PlaygroundNodes.js +66 -0
- package/dist/esm/components/TextEditorV2/nodes/PlaygroundNodes.js.map +1 -0
- package/dist/esm/components/TextEditorV2/nodes/PollComponent.d.ts +8 -0
- package/dist/esm/components/TextEditorV2/nodes/PollComponent.js +109 -0
- package/dist/esm/components/TextEditorV2/nodes/PollComponent.js.map +1 -0
- package/dist/esm/components/TextEditorV2/nodes/PollNode.d.ts +33 -0
- package/dist/esm/components/TextEditorV2/nodes/PollNode.js +143 -0
- package/dist/esm/components/TextEditorV2/nodes/PollNode.js.map +1 -0
- package/dist/esm/components/TextEditorV2/nodes/StickyComponent.d.ts +9 -0
- package/dist/esm/components/TextEditorV2/nodes/StickyComponent.js +163 -0
- package/dist/esm/components/TextEditorV2/nodes/StickyComponent.js.map +1 -0
- package/dist/esm/components/TextEditorV2/nodes/StickyNode.d.ts +37 -0
- package/dist/esm/components/TextEditorV2/nodes/StickyNode.js +89 -0
- package/dist/esm/components/TextEditorV2/nodes/StickyNode.js.map +1 -0
- package/dist/esm/components/TextEditorV2/nodes/TableNode.d.ts +54 -0
- package/dist/esm/components/TextEditorV2/nodes/TableNode.js +188 -0
- package/dist/esm/components/TextEditorV2/nodes/TableNode.js.map +1 -0
- package/dist/esm/components/TextEditorV2/nodes/TweetNode.d.ts +28 -0
- package/dist/esm/components/TextEditorV2/nodes/TweetNode.js +151 -0
- package/dist/esm/components/TextEditorV2/nodes/TweetNode.js.map +1 -0
- package/dist/esm/components/TextEditorV2/nodes/YouTubeNode.d.ts +28 -0
- package/dist/esm/components/TextEditorV2/nodes/YouTubeNode.js +98 -0
- package/dist/esm/components/TextEditorV2/nodes/YouTubeNode.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/ActionsPlugin/index.d.ts +2 -0
- package/dist/esm/components/TextEditorV2/plugins/ActionsPlugin/index.js +180 -0
- package/dist/esm/components/TextEditorV2/plugins/ActionsPlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/AutoEmbedPlugin/index.d.ts +19 -0
- package/dist/esm/components/TextEditorV2/plugins/AutoEmbedPlugin/index.js +174 -0
- package/dist/esm/components/TextEditorV2/plugins/AutoEmbedPlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/AutoLinkPlugin/index.d.ts +2 -0
- package/dist/esm/components/TextEditorV2/plugins/AutoLinkPlugin/index.js +12 -0
- package/dist/esm/components/TextEditorV2/plugins/AutoLinkPlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/AutocompletePlugin/index.d.ts +2 -0
- package/dist/esm/components/TextEditorV2/plugins/AutocompletePlugin/index.js +2461 -0
- package/dist/esm/components/TextEditorV2/plugins/AutocompletePlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/CodeActionMenuPlugin/components/CopyButton/index.d.ts +8 -0
- package/dist/esm/components/TextEditorV2/plugins/CodeActionMenuPlugin/components/CopyButton/index.js +52 -0
- package/dist/esm/components/TextEditorV2/plugins/CodeActionMenuPlugin/components/CopyButton/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/CodeActionMenuPlugin/components/PrettierButton/index.d.ts +10 -0
- package/dist/esm/components/TextEditorV2/plugins/CodeActionMenuPlugin/components/PrettierButton/index.js +155 -0
- package/dist/esm/components/TextEditorV2/plugins/CodeActionMenuPlugin/components/PrettierButton/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/CodeActionMenuPlugin/index.d.ts +4 -0
- package/dist/esm/components/TextEditorV2/plugins/CodeActionMenuPlugin/index.js +108 -0
- package/dist/esm/components/TextEditorV2/plugins/CodeActionMenuPlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/CodeActionMenuPlugin/utils.d.ts +1 -0
- package/dist/esm/components/TextEditorV2/plugins/CodeActionMenuPlugin/utils.js +18 -0
- package/dist/esm/components/TextEditorV2/plugins/CodeActionMenuPlugin/utils.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/CodeHighlightPlugin/index.d.ts +1 -0
- package/dist/esm/components/TextEditorV2/plugins/CodeHighlightPlugin/index.js +9 -0
- package/dist/esm/components/TextEditorV2/plugins/CodeHighlightPlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContainerNode.d.ts +23 -0
- package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContainerNode.js +82 -0
- package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContainerNode.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContentNode.d.ts +17 -0
- package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContentNode.js +64 -0
- package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContentNode.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleTitleNode.d.ts +18 -0
- package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleTitleNode.js +89 -0
- package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleTitleNode.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/index.d.ts +3 -0
- package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/index.js +144 -0
- package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/ComponentPickerPlugin/index.d.ts +2 -0
- package/dist/esm/components/TextEditorV2/plugins/ComponentPickerPlugin/index.js +261 -0
- package/dist/esm/components/TextEditorV2/plugins/ComponentPickerPlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/ContextMenuPlugin/index.d.ts +11 -0
- package/dist/esm/components/TextEditorV2/plugins/ContextMenuPlugin/index.js +167 -0
- package/dist/esm/components/TextEditorV2/plugins/ContextMenuPlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/DocsPlugin/index.d.ts +2 -0
- package/dist/esm/components/TextEditorV2/plugins/DocsPlugin/index.js +6 -0
- package/dist/esm/components/TextEditorV2/plugins/DocsPlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/DragDropPastePlugin/index.d.ts +1 -0
- package/dist/esm/components/TextEditorV2/plugins/DragDropPastePlugin/index.js +41 -0
- package/dist/esm/components/TextEditorV2/plugins/DragDropPastePlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/DraggableBlockPlugin/index.d.ts +4 -0
- package/dist/esm/components/TextEditorV2/plugins/DraggableBlockPlugin/index.js +284 -0
- package/dist/esm/components/TextEditorV2/plugins/DraggableBlockPlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/EmojiPickerPlugin/index.d.ts +2 -0
- package/dist/esm/components/TextEditorV2/plugins/EmojiPickerPlugin/index.js +94 -0
- package/dist/esm/components/TextEditorV2/plugins/EmojiPickerPlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/EmojisPlugin/index.d.ts +1 -0
- package/dist/esm/components/TextEditorV2/plugins/EmojisPlugin/index.js +61 -0
- package/dist/esm/components/TextEditorV2/plugins/EmojisPlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/EquationsPlugin/index.d.ts +14 -0
- package/dist/esm/components/TextEditorV2/plugins/EquationsPlugin/index.js +36 -0
- package/dist/esm/components/TextEditorV2/plugins/EquationsPlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/ExcalidrawPlugin/index.d.ts +3 -0
- package/dist/esm/components/TextEditorV2/plugins/ExcalidrawPlugin/index.js +24 -0
- package/dist/esm/components/TextEditorV2/plugins/ExcalidrawPlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/FigmaPlugin/index.d.ts +3 -0
- package/dist/esm/components/TextEditorV2/plugins/FigmaPlugin/index.js +21 -0
- package/dist/esm/components/TextEditorV2/plugins/FigmaPlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/FloatingLinkEditorPlugin/index.d.ts +7 -0
- package/dist/esm/components/TextEditorV2/plugins/FloatingLinkEditorPlugin/index.js +196 -0
- package/dist/esm/components/TextEditorV2/plugins/FloatingLinkEditorPlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/FloatingTextFormatToolbarPlugin/index.d.ts +4 -0
- package/dist/esm/components/TextEditorV2/plugins/FloatingTextFormatToolbarPlugin/index.js +225 -0
- package/dist/esm/components/TextEditorV2/plugins/FloatingTextFormatToolbarPlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/ImagesPlugin/index.d.ts +22 -0
- package/dist/esm/components/TextEditorV2/plugins/ImagesPlugin/index.js +181 -0
- package/dist/esm/components/TextEditorV2/plugins/ImagesPlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/InlineImagePlugin/index.d.ts +17 -0
- package/dist/esm/components/TextEditorV2/plugins/InlineImagePlugin/index.js +187 -0
- package/dist/esm/components/TextEditorV2/plugins/InlineImagePlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/KeywordsPlugin/index.d.ts +1 -0
- package/dist/esm/components/TextEditorV2/plugins/KeywordsPlugin/index.js +30 -0
- package/dist/esm/components/TextEditorV2/plugins/KeywordsPlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/LayoutPlugin/InsertLayoutDialog.d.ts +6 -0
- package/dist/esm/components/TextEditorV2/plugins/LayoutPlugin/InsertLayoutDialog.js +30 -0
- package/dist/esm/components/TextEditorV2/plugins/LayoutPlugin/InsertLayoutDialog.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/LayoutPlugin/LayoutPlugin.d.ts +7 -0
- package/dist/esm/components/TextEditorV2/plugins/LayoutPlugin/LayoutPlugin.js +85 -0
- package/dist/esm/components/TextEditorV2/plugins/LayoutPlugin/LayoutPlugin.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/LinkPlugin/index.d.ts +2 -0
- package/dist/esm/components/TextEditorV2/plugins/LinkPlugin/index.js +7 -0
- package/dist/esm/components/TextEditorV2/plugins/LinkPlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/ListMaxIndentLevelPlugin/index.d.ts +5 -0
- package/dist/esm/components/TextEditorV2/plugins/ListMaxIndentLevelPlugin/index.js +41 -0
- package/dist/esm/components/TextEditorV2/plugins/ListMaxIndentLevelPlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/MarkdownShortcutPlugin/index.d.ts +2 -0
- package/dist/esm/components/TextEditorV2/plugins/MarkdownShortcutPlugin/index.js +7 -0
- package/dist/esm/components/TextEditorV2/plugins/MarkdownShortcutPlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/MarkdownTransformers/index.d.ts +8 -0
- package/dist/esm/components/TextEditorV2/plugins/MarkdownTransformers/index.js +239 -0
- package/dist/esm/components/TextEditorV2/plugins/MarkdownTransformers/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/MaxLengthPlugin/index.d.ts +3 -0
- package/dist/esm/components/TextEditorV2/plugins/MaxLengthPlugin/index.js +38 -0
- package/dist/esm/components/TextEditorV2/plugins/MaxLengthPlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/MentionsPlugin/index.d.ts +2 -0
- package/dist/esm/components/TextEditorV2/plugins/MentionsPlugin/index.js +557 -0
- package/dist/esm/components/TextEditorV2/plugins/MentionsPlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/PageBreakPlugin/index.d.ts +3 -0
- package/dist/esm/components/TextEditorV2/plugins/PageBreakPlugin/index.js +27 -0
- package/dist/esm/components/TextEditorV2/plugins/PageBreakPlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/PasteLogPlugin/index.d.ts +2 -0
- package/dist/esm/components/TextEditorV2/plugins/PasteLogPlugin/index.js +33 -0
- package/dist/esm/components/TextEditorV2/plugins/PasteLogPlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/PollPlugin/index.d.ts +8 -0
- package/dist/esm/components/TextEditorV2/plugins/PollPlugin/index.js +40 -0
- package/dist/esm/components/TextEditorV2/plugins/PollPlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/StickyPlugin/index.d.ts +1 -0
- package/dist/esm/components/TextEditorV2/plugins/StickyPlugin/index.js +13 -0
- package/dist/esm/components/TextEditorV2/plugins/StickyPlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/TabFocusPlugin/index.d.ts +1 -0
- package/dist/esm/components/TextEditorV2/plugins/TabFocusPlugin/index.js +35 -0
- package/dist/esm/components/TextEditorV2/plugins/TabFocusPlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/TableActionMenuPlugin/index.d.ts +5 -0
- package/dist/esm/components/TextEditorV2/plugins/TableActionMenuPlugin/index.js +483 -0
- package/dist/esm/components/TextEditorV2/plugins/TableActionMenuPlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/TableCellResizer/index.d.ts +2 -0
- package/dist/esm/components/TextEditorV2/plugins/TableCellResizer/index.js +249 -0
- package/dist/esm/components/TextEditorV2/plugins/TableCellResizer/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/TableOfContentsPlugin/index.d.ts +2 -0
- package/dist/esm/components/TextEditorV2/plugins/TableOfContentsPlugin/index.js +113 -0
- package/dist/esm/components/TextEditorV2/plugins/TableOfContentsPlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/TablePlugin.d.ts +32 -0
- package/dist/esm/components/TextEditorV2/plugins/TablePlugin.js +78 -0
- package/dist/esm/components/TextEditorV2/plugins/TablePlugin.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/bold-text.d.ts +6 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/bold-text.js +14 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/bold-text.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/bullet.d.ts +6 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/bullet.js +24 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/bullet.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/font-size.d.ts +6 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/font-size.js +61 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/font-size.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.d.ts +6 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.js +67 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/italic-text.d.ts +6 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/italic-text.js +14 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/italic-text.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/link.d.ts +5 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/link.js +42 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/link.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/number-bullet.d.ts +6 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/number-bullet.js +24 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/number-bullet.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/text-align.d.ts +6 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/text-align.js +48 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/text-align.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/text-color.d.ts +6 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/text-color.js +24 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/text-color.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/underline-text.d.ts +6 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/underline-text.js +15 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/underline-text.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/upload-image.d.ts +6 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/upload-image.js +37 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/upload-image.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/upload-pdf.d.ts +11 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/upload-pdf.js +159 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/upload-pdf.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/index.d.ts +4 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/index.js +159 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/TreeViewPlugin/index.d.ts +2 -0
- package/dist/esm/components/TextEditorV2/plugins/TreeViewPlugin/index.js +8 -0
- package/dist/esm/components/TextEditorV2/plugins/TreeViewPlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/TwitterPlugin/index.d.ts +3 -0
- package/dist/esm/components/TextEditorV2/plugins/TwitterPlugin/index.js +21 -0
- package/dist/esm/components/TextEditorV2/plugins/TwitterPlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/YouTubePlugin/index.d.ts +3 -0
- package/dist/esm/components/TextEditorV2/plugins/YouTubePlugin/index.js +21 -0
- package/dist/esm/components/TextEditorV2/plugins/YouTubePlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/shared/canUseDOM.d.ts +1 -0
- package/dist/esm/components/TextEditorV2/shared/canUseDOM.js +4 -0
- package/dist/esm/components/TextEditorV2/shared/canUseDOM.js.map +1 -0
- package/dist/esm/components/TextEditorV2/shared/caretFromPoint.d.ts +4 -0
- package/dist/esm/components/TextEditorV2/shared/caretFromPoint.js +29 -0
- package/dist/esm/components/TextEditorV2/shared/caretFromPoint.js.map +1 -0
- package/dist/esm/components/TextEditorV2/shared/environment.d.ts +16 -0
- package/dist/esm/components/TextEditorV2/shared/environment.js +14 -0
- package/dist/esm/components/TextEditorV2/shared/environment.js.map +1 -0
- package/dist/esm/components/TextEditorV2/shared/invariant.d.ts +1 -0
- package/dist/esm/components/TextEditorV2/shared/invariant.js +12 -0
- package/dist/esm/components/TextEditorV2/shared/invariant.js.map +1 -0
- package/dist/esm/components/TextEditorV2/shared/simpleDiffWithCursor.d.ts +5 -0
- package/dist/esm/components/TextEditorV2/shared/simpleDiffWithCursor.js +25 -0
- package/dist/esm/components/TextEditorV2/shared/simpleDiffWithCursor.js.map +1 -0
- package/dist/esm/components/TextEditorV2/shared/useLayoutEffect.d.ts +3 -0
- package/dist/esm/components/TextEditorV2/shared/useLayoutEffect.js +5 -0
- package/dist/esm/components/TextEditorV2/shared/useLayoutEffect.js.map +1 -0
- package/dist/esm/components/TextEditorV2/shared/warnOnlyOnce.d.ts +1 -0
- package/dist/esm/components/TextEditorV2/shared/warnOnlyOnce.js +13 -0
- package/dist/esm/components/TextEditorV2/shared/warnOnlyOnce.js.map +1 -0
- package/dist/esm/components/TextEditorV2/style.d.ts +2 -0
- package/dist/esm/components/TextEditorV2/style.js +5 -0
- package/dist/esm/components/TextEditorV2/style.js.map +1 -0
- package/dist/esm/components/TextEditorV2/themes/CommentEditorTheme.d.ts +3 -0
- package/dist/esm/components/TextEditorV2/themes/CommentEditorTheme.js +5 -0
- package/dist/esm/components/TextEditorV2/themes/CommentEditorTheme.js.map +1 -0
- package/dist/esm/components/TextEditorV2/themes/PlaygroundEditorTheme.d.ts +3 -0
- package/dist/esm/components/TextEditorV2/themes/PlaygroundEditorTheme.js +105 -0
- package/dist/esm/components/TextEditorV2/themes/PlaygroundEditorTheme.js.map +1 -0
- package/dist/esm/components/TextEditorV2/themes/StickyEditorTheme.d.ts +3 -0
- package/dist/esm/components/TextEditorV2/themes/StickyEditorTheme.js +5 -0
- package/dist/esm/components/TextEditorV2/themes/StickyEditorTheme.js.map +1 -0
- package/dist/esm/components/TextEditorV2/ui/Button.d.ts +11 -0
- package/dist/esm/components/TextEditorV2/ui/Button.js +8 -0
- package/dist/esm/components/TextEditorV2/ui/Button.js.map +1 -0
- package/dist/esm/components/TextEditorV2/ui/ColorPicker.d.ts +12 -0
- package/dist/esm/components/TextEditorV2/ui/ColorPicker.js +212 -0
- package/dist/esm/components/TextEditorV2/ui/ColorPicker.js.map +1 -0
- package/dist/esm/components/TextEditorV2/ui/ContentEditable.d.ts +4 -0
- package/dist/esm/components/TextEditorV2/ui/ContentEditable.js +7 -0
- package/dist/esm/components/TextEditorV2/ui/ContentEditable.js.map +1 -0
- package/dist/esm/components/TextEditorV2/ui/Dialog.d.ts +9 -0
- package/dist/esm/components/TextEditorV2/ui/Dialog.js +10 -0
- package/dist/esm/components/TextEditorV2/ui/Dialog.js.map +1 -0
- package/dist/esm/components/TextEditorV2/ui/DropDown.d.ts +17 -0
- package/dist/esm/components/TextEditorV2/ui/DropDown.js +129 -0
- package/dist/esm/components/TextEditorV2/ui/DropDown.js.map +1 -0
- package/dist/esm/components/TextEditorV2/ui/DropdownColorPicker.d.ts +21 -0
- package/dist/esm/components/TextEditorV2/ui/DropdownColorPicker.js +17 -0
- package/dist/esm/components/TextEditorV2/ui/DropdownColorPicker.js.map +1 -0
- package/dist/esm/components/TextEditorV2/ui/EquationEditor.d.ts +8 -0
- package/dist/esm/components/TextEditorV2/ui/EquationEditor.js +17 -0
- package/dist/esm/components/TextEditorV2/ui/EquationEditor.js.map +1 -0
- package/dist/esm/components/TextEditorV2/ui/FileInput.d.ts +9 -0
- package/dist/esm/components/TextEditorV2/ui/FileInput.js +8 -0
- package/dist/esm/components/TextEditorV2/ui/FileInput.js.map +1 -0
- package/dist/esm/components/TextEditorV2/ui/ImageResizer.d.ts +11 -0
- package/dist/esm/components/TextEditorV2/ui/ImageResizer.js +174 -0
- package/dist/esm/components/TextEditorV2/ui/ImageResizer.js.map +1 -0
- package/dist/esm/components/TextEditorV2/ui/KatexEquationAlterer.d.ts +7 -0
- package/dist/esm/components/TextEditorV2/ui/KatexEquationAlterer.js +35 -0
- package/dist/esm/components/TextEditorV2/ui/KatexEquationAlterer.js.map +1 -0
- package/dist/esm/components/TextEditorV2/ui/KatexRenderer.d.ts +6 -0
- package/dist/esm/components/TextEditorV2/ui/KatexRenderer.js +29 -0
- package/dist/esm/components/TextEditorV2/ui/KatexRenderer.js.map +1 -0
- package/dist/esm/components/TextEditorV2/ui/Modal.d.ts +8 -0
- package/dist/esm/components/TextEditorV2/ui/Modal.js +50 -0
- package/dist/esm/components/TextEditorV2/ui/Modal.js.map +1 -0
- package/dist/esm/components/TextEditorV2/ui/Placeholder.d.ts +6 -0
- package/dist/esm/components/TextEditorV2/ui/Placeholder.js +6 -0
- package/dist/esm/components/TextEditorV2/ui/Placeholder.js.map +1 -0
- package/dist/esm/components/TextEditorV2/ui/Select.d.ts +7 -0
- package/dist/esm/components/TextEditorV2/ui/Select.js +9 -0
- package/dist/esm/components/TextEditorV2/ui/Select.js.map +1 -0
- package/dist/esm/components/TextEditorV2/ui/Switch.d.ts +7 -0
- package/dist/esm/components/TextEditorV2/ui/Switch.js +11 -0
- package/dist/esm/components/TextEditorV2/ui/Switch.js.map +1 -0
- package/dist/esm/components/TextEditorV2/ui/TextInput.d.ts +12 -0
- package/dist/esm/components/TextEditorV2/ui/TextInput.js +10 -0
- package/dist/esm/components/TextEditorV2/ui/TextInput.js.map +1 -0
- package/dist/esm/components/TextEditorV2/utils/emoji-list.d.ts +20 -0
- package/dist/esm/components/TextEditorV2/utils/emoji-list.js +16605 -0
- package/dist/esm/components/TextEditorV2/utils/emoji-list.js.map +1 -0
- package/dist/esm/components/TextEditorV2/utils/getDOMRangeRect.d.ts +1 -0
- package/dist/esm/components/TextEditorV2/utils/getDOMRangeRect.js +16 -0
- package/dist/esm/components/TextEditorV2/utils/getDOMRangeRect.js.map +1 -0
- package/dist/esm/components/TextEditorV2/utils/getPrepopulatedRichText.d.ts +1 -0
- package/dist/esm/components/TextEditorV2/utils/getPrepopulatedRichText.js +32 -0
- package/dist/esm/components/TextEditorV2/utils/getPrepopulatedRichText.js.map +1 -0
- package/dist/esm/components/TextEditorV2/utils/getSelectedNode.d.ts +2 -0
- package/dist/esm/components/TextEditorV2/utils/getSelectedNode.js +18 -0
- package/dist/esm/components/TextEditorV2/utils/getSelectedNode.js.map +1 -0
- package/dist/esm/components/TextEditorV2/utils/guard.d.ts +1 -0
- package/dist/esm/components/TextEditorV2/utils/guard.js +4 -0
- package/dist/esm/components/TextEditorV2/utils/guard.js.map +1 -0
- package/dist/esm/components/TextEditorV2/utils/isMobileWidth.d.ts +0 -0
- package/dist/esm/components/TextEditorV2/utils/isMobileWidth.js +2 -0
- package/dist/esm/components/TextEditorV2/utils/isMobileWidth.js.map +1 -0
- package/dist/esm/components/TextEditorV2/utils/joinClasses.d.ts +1 -0
- package/dist/esm/components/TextEditorV2/utils/joinClasses.js +8 -0
- package/dist/esm/components/TextEditorV2/utils/joinClasses.js.map +1 -0
- package/dist/esm/components/TextEditorV2/utils/point.d.ts +14 -0
- package/dist/esm/components/TextEditorV2/utils/point.js +47 -0
- package/dist/esm/components/TextEditorV2/utils/point.js.map +1 -0
- package/dist/esm/components/TextEditorV2/utils/rect.d.ts +38 -0
- package/dist/esm/components/TextEditorV2/utils/rect.js +122 -0
- package/dist/esm/components/TextEditorV2/utils/rect.js.map +1 -0
- package/dist/esm/components/TextEditorV2/utils/setFloatingElemPosition.d.ts +1 -0
- package/dist/esm/components/TextEditorV2/utils/setFloatingElemPosition.js +30 -0
- package/dist/esm/components/TextEditorV2/utils/setFloatingElemPosition.js.map +1 -0
- package/dist/esm/components/TextEditorV2/utils/setFloatingElemPositionForLinkEditor.d.ts +1 -0
- package/dist/esm/components/TextEditorV2/utils/setFloatingElemPositionForLinkEditor.js +28 -0
- package/dist/esm/components/TextEditorV2/utils/setFloatingElemPositionForLinkEditor.js.map +1 -0
- package/dist/esm/components/TextEditorV2/utils/swipe.d.ts +4 -0
- package/dist/esm/components/TextEditorV2/utils/swipe.js +91 -0
- package/dist/esm/components/TextEditorV2/utils/swipe.js.map +1 -0
- package/dist/esm/components/TextEditorV2/utils/url.d.ts +2 -0
- package/dist/esm/components/TextEditorV2/utils/url.js +22 -0
- package/dist/esm/components/TextEditorV2/utils/url.js.map +1 -0
- package/dist/esm/components/Textarea/Textarea.js +28 -4
- package/dist/esm/components/Textarea/Textarea.js.map +1 -1
- package/dist/esm/index.d.ts +2 -1
- package/dist/esm/index.js +2 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +11 -2
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { $isCodeHighlightNode } from '@lexical/code';
|
|
2
|
+
import { $isLinkNode, TOGGLE_LINK_COMMAND } from '@lexical/link';
|
|
3
|
+
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
4
|
+
import { mergeRegister } from '@lexical/utils';
|
|
5
|
+
import { $getSelection, $isParagraphNode, $isRangeSelection, $isTextNode, COMMAND_PRIORITY_LOW, FORMAT_TEXT_COMMAND, SELECTION_CHANGE_COMMAND, } from 'lexical';
|
|
6
|
+
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import { createPortal } from 'react-dom';
|
|
9
|
+
import { getDOMRangeRect } from '../../utils/getDOMRangeRect';
|
|
10
|
+
import { getSelectedNode } from '../../utils/getSelectedNode';
|
|
11
|
+
import { setFloatingElemPosition } from '../../utils/setFloatingElemPosition';
|
|
12
|
+
function TextFormatFloatingToolbar(_a) {
|
|
13
|
+
var anchorElem = _a.anchorElem, editor = _a.editor, isBold = _a.isBold, isCode = _a.isCode, isItalic = _a.isItalic, isLink = _a.isLink, isStrikethrough = _a.isStrikethrough, isSubscript = _a.isSubscript, isSuperscript = _a.isSuperscript, isUnderline = _a.isUnderline;
|
|
14
|
+
var popupCharStylesEditorRef = useRef(null);
|
|
15
|
+
var insertLink = useCallback(function () {
|
|
16
|
+
if (!isLink) {
|
|
17
|
+
editor.dispatchCommand(TOGGLE_LINK_COMMAND, 'https://');
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
editor.dispatchCommand(TOGGLE_LINK_COMMAND, null);
|
|
21
|
+
}
|
|
22
|
+
}, [editor, isLink]);
|
|
23
|
+
var insertComment = function () {
|
|
24
|
+
console.log('insert comment');
|
|
25
|
+
};
|
|
26
|
+
function mouseMoveListener(e) {
|
|
27
|
+
if ((popupCharStylesEditorRef === null || popupCharStylesEditorRef === void 0 ? void 0 : popupCharStylesEditorRef.current) && (e.buttons === 1 || e.buttons === 3)) {
|
|
28
|
+
if (popupCharStylesEditorRef.current.style.pointerEvents !== 'none') {
|
|
29
|
+
var x = e.clientX;
|
|
30
|
+
var y = e.clientY;
|
|
31
|
+
var elementUnderMouse = document.elementFromPoint(x, y);
|
|
32
|
+
if (!popupCharStylesEditorRef.current.contains(elementUnderMouse)) {
|
|
33
|
+
// Mouse is not over the target element => not a normal click, but probably a drag
|
|
34
|
+
popupCharStylesEditorRef.current.style.pointerEvents = 'none';
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function mouseUpListener() {
|
|
40
|
+
if (popupCharStylesEditorRef === null || popupCharStylesEditorRef === void 0 ? void 0 : popupCharStylesEditorRef.current) {
|
|
41
|
+
if (popupCharStylesEditorRef.current.style.pointerEvents !== 'auto') {
|
|
42
|
+
popupCharStylesEditorRef.current.style.pointerEvents = 'auto';
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
useEffect(function () {
|
|
47
|
+
if (popupCharStylesEditorRef === null || popupCharStylesEditorRef === void 0 ? void 0 : popupCharStylesEditorRef.current) {
|
|
48
|
+
document.addEventListener('mousemove', mouseMoveListener);
|
|
49
|
+
document.addEventListener('mouseup', mouseUpListener);
|
|
50
|
+
return function () {
|
|
51
|
+
document.removeEventListener('mousemove', mouseMoveListener);
|
|
52
|
+
document.removeEventListener('mouseup', mouseUpListener);
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
return function () {
|
|
56
|
+
console.log('clean up');
|
|
57
|
+
};
|
|
58
|
+
}, [popupCharStylesEditorRef]);
|
|
59
|
+
var updateTextFormatFloatingToolbar = useCallback(function () {
|
|
60
|
+
var selection = $getSelection();
|
|
61
|
+
var popupCharStylesEditorElem = popupCharStylesEditorRef.current;
|
|
62
|
+
var nativeSelection = window.getSelection();
|
|
63
|
+
if (popupCharStylesEditorElem === null) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
var rootElement = editor.getRootElement();
|
|
67
|
+
if (selection !== null &&
|
|
68
|
+
nativeSelection !== null &&
|
|
69
|
+
!nativeSelection.isCollapsed &&
|
|
70
|
+
rootElement !== null &&
|
|
71
|
+
rootElement.contains(nativeSelection.anchorNode)) {
|
|
72
|
+
var rangeRect = getDOMRangeRect(nativeSelection, rootElement);
|
|
73
|
+
setFloatingElemPosition(rangeRect, popupCharStylesEditorElem, anchorElem, isLink);
|
|
74
|
+
}
|
|
75
|
+
}, [editor, anchorElem, isLink]);
|
|
76
|
+
useEffect(function () {
|
|
77
|
+
var scrollerElem = anchorElem.parentElement;
|
|
78
|
+
var update = function () {
|
|
79
|
+
editor.getEditorState().read(function () {
|
|
80
|
+
updateTextFormatFloatingToolbar();
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
window.addEventListener('resize', update);
|
|
84
|
+
if (scrollerElem) {
|
|
85
|
+
scrollerElem.addEventListener('scroll', update);
|
|
86
|
+
}
|
|
87
|
+
return function () {
|
|
88
|
+
window.removeEventListener('resize', update);
|
|
89
|
+
if (scrollerElem) {
|
|
90
|
+
scrollerElem.removeEventListener('scroll', update);
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
}, [editor, updateTextFormatFloatingToolbar, anchorElem]);
|
|
94
|
+
useEffect(function () {
|
|
95
|
+
editor.getEditorState().read(function () {
|
|
96
|
+
updateTextFormatFloatingToolbar();
|
|
97
|
+
});
|
|
98
|
+
return mergeRegister(editor.registerUpdateListener(function (_a) {
|
|
99
|
+
var editorState = _a.editorState;
|
|
100
|
+
editorState.read(function () {
|
|
101
|
+
updateTextFormatFloatingToolbar();
|
|
102
|
+
});
|
|
103
|
+
}), editor.registerCommand(SELECTION_CHANGE_COMMAND, function () {
|
|
104
|
+
updateTextFormatFloatingToolbar();
|
|
105
|
+
return false;
|
|
106
|
+
}, COMMAND_PRIORITY_LOW));
|
|
107
|
+
}, [editor, updateTextFormatFloatingToolbar]);
|
|
108
|
+
return (React.createElement("div", { ref: popupCharStylesEditorRef, className: 'floating-text-format-popup' },
|
|
109
|
+
editor.isEditable() && (React.createElement(React.Fragment, null,
|
|
110
|
+
React.createElement("button", { "aria-label": 'Format text as bold', className: 'popup-item spaced ' + (isBold ? 'active' : ''), onClick: function () {
|
|
111
|
+
editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'bold');
|
|
112
|
+
}, type: 'button' },
|
|
113
|
+
React.createElement("i", { className: 'format bold' })),
|
|
114
|
+
React.createElement("button", { "aria-label": 'Format text as italics', className: 'popup-item spaced ' + (isItalic ? 'active' : ''), onClick: function () {
|
|
115
|
+
editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'italic');
|
|
116
|
+
}, type: 'button' },
|
|
117
|
+
React.createElement("i", { className: 'format italic' })),
|
|
118
|
+
React.createElement("button", { "aria-label": 'Format text to underlined', className: 'popup-item spaced ' + (isUnderline ? 'active' : ''), onClick: function () {
|
|
119
|
+
editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'underline');
|
|
120
|
+
}, type: 'button' },
|
|
121
|
+
React.createElement("i", { className: 'format underline' })),
|
|
122
|
+
React.createElement("button", { "aria-label": 'Format text with a strikethrough', className: 'popup-item spaced ' + (isStrikethrough ? 'active' : ''), onClick: function () {
|
|
123
|
+
editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'strikethrough');
|
|
124
|
+
}, type: 'button' },
|
|
125
|
+
React.createElement("i", { className: 'format strikethrough' })),
|
|
126
|
+
React.createElement("button", { "aria-label": 'Format Subscript', className: 'popup-item spaced ' + (isSubscript ? 'active' : ''), onClick: function () {
|
|
127
|
+
editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'subscript');
|
|
128
|
+
}, title: 'Subscript', type: 'button' },
|
|
129
|
+
React.createElement("i", { className: 'format subscript' })),
|
|
130
|
+
React.createElement("button", { "aria-label": 'Format Superscript', className: 'popup-item spaced ' + (isSuperscript ? 'active' : ''), onClick: function () {
|
|
131
|
+
editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'superscript');
|
|
132
|
+
}, title: 'Superscript', type: 'button' },
|
|
133
|
+
React.createElement("i", { className: 'format superscript' })),
|
|
134
|
+
React.createElement("button", { "aria-label": 'Insert code block', className: 'popup-item spaced ' + (isCode ? 'active' : ''), onClick: function () {
|
|
135
|
+
editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'code');
|
|
136
|
+
}, type: 'button' },
|
|
137
|
+
React.createElement("i", { className: 'format code' })),
|
|
138
|
+
React.createElement("button", { "aria-label": 'Insert link', className: 'popup-item spaced ' + (isLink ? 'active' : ''), onClick: insertLink, type: 'button' },
|
|
139
|
+
React.createElement("i", { className: 'format link' })))),
|
|
140
|
+
React.createElement("button", { "aria-label": 'Insert comment', className: 'popup-item spaced insert-comment', onClick: insertComment, type: 'button' },
|
|
141
|
+
React.createElement("i", { className: 'format add-comment' }))));
|
|
142
|
+
}
|
|
143
|
+
function useFloatingTextFormatToolbar(editor, anchorElem) {
|
|
144
|
+
var _a = useState(false), isText = _a[0], setIsText = _a[1];
|
|
145
|
+
var _b = useState(false), isLink = _b[0], setIsLink = _b[1];
|
|
146
|
+
var _c = useState(false), isBold = _c[0], setIsBold = _c[1];
|
|
147
|
+
var _d = useState(false), isItalic = _d[0], setIsItalic = _d[1];
|
|
148
|
+
var _e = useState(false), isUnderline = _e[0], setIsUnderline = _e[1];
|
|
149
|
+
var _f = useState(false), isStrikethrough = _f[0], setIsStrikethrough = _f[1];
|
|
150
|
+
var _g = useState(false), isSubscript = _g[0], setIsSubscript = _g[1];
|
|
151
|
+
var _h = useState(false), isSuperscript = _h[0], setIsSuperscript = _h[1];
|
|
152
|
+
var _j = useState(false), isCode = _j[0], setIsCode = _j[1];
|
|
153
|
+
var updatePopup = useCallback(function () {
|
|
154
|
+
editor.getEditorState().read(function () {
|
|
155
|
+
// Should not to pop up the floating toolbar when using IME input
|
|
156
|
+
if (editor.isComposing()) {
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
var selection = $getSelection();
|
|
160
|
+
var nativeSelection = window.getSelection();
|
|
161
|
+
var rootElement = editor.getRootElement();
|
|
162
|
+
if (nativeSelection !== null &&
|
|
163
|
+
(!$isRangeSelection(selection) || rootElement === null || !rootElement.contains(nativeSelection.anchorNode))) {
|
|
164
|
+
setIsText(false);
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
if (!$isRangeSelection(selection)) {
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
var node = getSelectedNode(selection);
|
|
171
|
+
// Update text format
|
|
172
|
+
setIsBold(selection.hasFormat('bold'));
|
|
173
|
+
setIsItalic(selection.hasFormat('italic'));
|
|
174
|
+
setIsUnderline(selection.hasFormat('underline'));
|
|
175
|
+
setIsStrikethrough(selection.hasFormat('strikethrough'));
|
|
176
|
+
setIsSubscript(selection.hasFormat('subscript'));
|
|
177
|
+
setIsSuperscript(selection.hasFormat('superscript'));
|
|
178
|
+
setIsCode(selection.hasFormat('code'));
|
|
179
|
+
// Update links
|
|
180
|
+
var parent = node.getParent();
|
|
181
|
+
if ($isLinkNode(parent) || $isLinkNode(node)) {
|
|
182
|
+
setIsLink(true);
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
setIsLink(false);
|
|
186
|
+
}
|
|
187
|
+
if (!$isCodeHighlightNode(selection.anchor.getNode()) && selection.getTextContent() !== '') {
|
|
188
|
+
setIsText($isTextNode(node) || $isParagraphNode(node));
|
|
189
|
+
}
|
|
190
|
+
else {
|
|
191
|
+
setIsText(false);
|
|
192
|
+
}
|
|
193
|
+
var rawTextContent = selection.getTextContent().replace(/\n/g, '');
|
|
194
|
+
if (!selection.isCollapsed() && rawTextContent === '') {
|
|
195
|
+
setIsText(false);
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
}, [editor]);
|
|
200
|
+
useEffect(function () {
|
|
201
|
+
document.addEventListener('selectionchange', updatePopup);
|
|
202
|
+
return function () {
|
|
203
|
+
document.removeEventListener('selectionchange', updatePopup);
|
|
204
|
+
};
|
|
205
|
+
}, [updatePopup]);
|
|
206
|
+
useEffect(function () {
|
|
207
|
+
return mergeRegister(editor.registerUpdateListener(function () {
|
|
208
|
+
updatePopup();
|
|
209
|
+
}), editor.registerRootListener(function () {
|
|
210
|
+
if (editor.getRootElement() === null) {
|
|
211
|
+
setIsText(false);
|
|
212
|
+
}
|
|
213
|
+
}));
|
|
214
|
+
}, [editor, updatePopup]);
|
|
215
|
+
if (!isText) {
|
|
216
|
+
return null;
|
|
217
|
+
}
|
|
218
|
+
return createPortal(React.createElement(TextFormatFloatingToolbar, { anchorElem: anchorElem, editor: editor, isBold: isBold, isCode: isCode, isItalic: isItalic, isLink: isLink, isStrikethrough: isStrikethrough, isSubscript: isSubscript, isSuperscript: isSuperscript, isUnderline: isUnderline }), anchorElem);
|
|
219
|
+
}
|
|
220
|
+
export default function FloatingTextFormatToolbarPlugin(_a) {
|
|
221
|
+
var _b = _a.anchorElem, anchorElem = _b === void 0 ? document.body : _b;
|
|
222
|
+
var editor = useLexicalComposerContext()[0];
|
|
223
|
+
return useFloatingTextFormatToolbar(editor, anchorElem);
|
|
224
|
+
}
|
|
225
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/TextEditorV2/plugins/FloatingTextFormatToolbarPlugin/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAA;AACjF,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAC9C,OAAO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@ -0,0 +1,22 @@
|
|
|
1
|
+
import { LexicalCommand, LexicalEditor } from 'lexical';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { ImagePayload } from '../../nodes/ImageNode';
|
|
4
|
+
export type InsertImagePayload = Readonly<ImagePayload>;
|
|
5
|
+
export declare const INSERT_IMAGE_COMMAND: LexicalCommand<InsertImagePayload>;
|
|
6
|
+
export declare function InsertImageUriDialogBody({ onClick }: {
|
|
7
|
+
onClick(payload: InsertImagePayload): void;
|
|
8
|
+
}): React.JSX.Element;
|
|
9
|
+
export declare function InsertImageModal({ activeEditor, setShow, show, }: {
|
|
10
|
+
activeEditor: LexicalEditor;
|
|
11
|
+
show: boolean;
|
|
12
|
+
setShow: any;
|
|
13
|
+
}): React.JSX.Element;
|
|
14
|
+
export default function ImagesPlugin({ captionsEnabled }: {
|
|
15
|
+
captionsEnabled?: boolean;
|
|
16
|
+
}): React.JSX.Element | null;
|
|
17
|
+
declare global {
|
|
18
|
+
interface DragEvent {
|
|
19
|
+
rangeOffset?: number;
|
|
20
|
+
rangeParent?: Node;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
2
|
+
import { $wrapNodeInElement, mergeRegister } from '@lexical/utils';
|
|
3
|
+
import { $createParagraphNode, $createRangeSelection, $getSelection, $insertNodes, $isNodeSelection, $isRootOrShadowRoot, $setSelection, COMMAND_PRIORITY_EDITOR, COMMAND_PRIORITY_HIGH, COMMAND_PRIORITY_LOW, createCommand, DRAGOVER_COMMAND, DRAGSTART_COMMAND, DROP_COMMAND, } from 'lexical';
|
|
4
|
+
import { useEffect, useState } from 'react';
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { $createImageNode, $isImageNode, ImageNode } from '../../nodes/ImageNode';
|
|
7
|
+
import { CAN_USE_DOM } from '../../shared/canUseDOM';
|
|
8
|
+
import Button from '../../ui/Button';
|
|
9
|
+
import { DialogActions } from '../../ui/Dialog';
|
|
10
|
+
import TextInput from '../../ui/TextInput';
|
|
11
|
+
import { PHXModal } from '../../../Modal';
|
|
12
|
+
import { PHXInput } from '../../../Input';
|
|
13
|
+
import { PHXUploadFile } from '../../../UploadFile';
|
|
14
|
+
var getDOMSelection = function (targetWindow) {
|
|
15
|
+
return CAN_USE_DOM ? (targetWindow || window).getSelection() : null;
|
|
16
|
+
};
|
|
17
|
+
export var INSERT_IMAGE_COMMAND = createCommand('INSERT_IMAGE_COMMAND');
|
|
18
|
+
export function InsertImageUriDialogBody(_a) {
|
|
19
|
+
var onClick = _a.onClick;
|
|
20
|
+
var _b = useState(''), src = _b[0], setSrc = _b[1];
|
|
21
|
+
var _c = useState(''), altText = _c[0], setAltText = _c[1];
|
|
22
|
+
var isDisabled = src === '';
|
|
23
|
+
return (React.createElement(React.Fragment, null,
|
|
24
|
+
React.createElement(TextInput, { "data-test-id": 'image-modal-url-input', label: 'Image URL', onChange: setSrc, placeholder: 'i.e. https://source.unsplash.com/random', value: src }),
|
|
25
|
+
React.createElement(TextInput, { "data-test-id": 'image-modal-alt-text-input', label: 'Alt Text', onChange: setAltText, placeholder: 'Random unsplash image', value: altText }),
|
|
26
|
+
React.createElement(DialogActions, null,
|
|
27
|
+
React.createElement(Button, { "data-test-id": 'image-modal-confirm-btn', disabled: isDisabled, onClick: function () { return onClick({ altText: altText, src: src }); } }, "Confirm"))));
|
|
28
|
+
}
|
|
29
|
+
export function InsertImageModal(_a) {
|
|
30
|
+
var activeEditor = _a.activeEditor, setShow = _a.setShow, show = _a.show;
|
|
31
|
+
var _b = useState(''), fileName = _b[0], setFileName = _b[1];
|
|
32
|
+
var _c = useState(''), cdnLink = _c[0], setCdnLink = _c[1];
|
|
33
|
+
var altText = 'photo';
|
|
34
|
+
var onHide = function () {
|
|
35
|
+
setShow(false);
|
|
36
|
+
setCdnLink('');
|
|
37
|
+
setFileName('');
|
|
38
|
+
};
|
|
39
|
+
var handleListenUpload = function (fileUpload, linkCdn) {
|
|
40
|
+
setFileName(fileUpload.name);
|
|
41
|
+
setCdnLink(linkCdn[0]);
|
|
42
|
+
};
|
|
43
|
+
var handleSubmit = function () {
|
|
44
|
+
activeEditor.dispatchCommand(INSERT_IMAGE_COMMAND, { altText: altText, src: cdnLink });
|
|
45
|
+
onHide();
|
|
46
|
+
};
|
|
47
|
+
return (React.createElement(PHXModal, { onHide: onHide, onPrimaryClick: handleSubmit, show: show, title: 'Insert Image' },
|
|
48
|
+
React.createElement("div", { className: 'space-y-4' },
|
|
49
|
+
React.createElement(PHXInput, { defaultValue: altText, label: 'Alt Text', onChange: function (e) { return (altText = e.target.value); } }),
|
|
50
|
+
React.createElement(PHXUploadFile, { apiCdnUpload: '/api/cdn-upload', basePath: '', defaultLink: [cdnLink], fileName: fileName, fileType: 'image', handleListenUpload: handleListenUpload, inCard: false, label: 'Image upload', moduleId: 'insert-editor-image', oneImg: true, projectId: 'phenikaa', titleHeaderAction: '' }))));
|
|
51
|
+
}
|
|
52
|
+
export default function ImagesPlugin(_a) {
|
|
53
|
+
var captionsEnabled = _a.captionsEnabled;
|
|
54
|
+
var editor = useLexicalComposerContext()[0];
|
|
55
|
+
useEffect(function () {
|
|
56
|
+
if (!editor.hasNodes([ImageNode])) {
|
|
57
|
+
throw new Error('ImagesPlugin: ImageNode not registered on editor');
|
|
58
|
+
}
|
|
59
|
+
return mergeRegister(editor.registerCommand(INSERT_IMAGE_COMMAND, function (payload) {
|
|
60
|
+
var imageNode = $createImageNode(payload);
|
|
61
|
+
$insertNodes([imageNode]);
|
|
62
|
+
if ($isRootOrShadowRoot(imageNode.getParentOrThrow())) {
|
|
63
|
+
$wrapNodeInElement(imageNode, $createParagraphNode).selectEnd();
|
|
64
|
+
}
|
|
65
|
+
return true;
|
|
66
|
+
}, COMMAND_PRIORITY_EDITOR), editor.registerCommand(DRAGSTART_COMMAND, function (event) { return onDragStart(event); }, COMMAND_PRIORITY_HIGH), editor.registerCommand(DRAGOVER_COMMAND, function (event) { return onDragover(event); }, COMMAND_PRIORITY_LOW), editor.registerCommand(DROP_COMMAND, function (event) { return onDrop(event, editor); }, COMMAND_PRIORITY_HIGH));
|
|
67
|
+
}, [captionsEnabled, editor]);
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
var TRANSPARENT_IMAGE = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';
|
|
71
|
+
function onDragStart(event) {
|
|
72
|
+
var img = document.createElement('img');
|
|
73
|
+
img.src = TRANSPARENT_IMAGE;
|
|
74
|
+
var node = getImageNodeInSelection();
|
|
75
|
+
if (!node) {
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
var dataTransfer = event.dataTransfer;
|
|
79
|
+
if (!dataTransfer) {
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
dataTransfer.setData('text/plain', '_');
|
|
83
|
+
dataTransfer.setDragImage(img, 0, 0);
|
|
84
|
+
dataTransfer.setData('application/x-lexical-drag', JSON.stringify({
|
|
85
|
+
data: {
|
|
86
|
+
altText: node.__altText,
|
|
87
|
+
caption: node.__caption,
|
|
88
|
+
height: node.__height,
|
|
89
|
+
key: node.getKey(),
|
|
90
|
+
maxWidth: node.__maxWidth,
|
|
91
|
+
showCaption: node.__showCaption,
|
|
92
|
+
src: node.__src,
|
|
93
|
+
width: node.__width,
|
|
94
|
+
},
|
|
95
|
+
type: 'image',
|
|
96
|
+
}));
|
|
97
|
+
return true;
|
|
98
|
+
}
|
|
99
|
+
function onDragover(event) {
|
|
100
|
+
var node = getImageNodeInSelection();
|
|
101
|
+
if (!node) {
|
|
102
|
+
return false;
|
|
103
|
+
}
|
|
104
|
+
if (!canDropImage(event)) {
|
|
105
|
+
event.preventDefault();
|
|
106
|
+
}
|
|
107
|
+
return true;
|
|
108
|
+
}
|
|
109
|
+
function onDrop(event, editor) {
|
|
110
|
+
var node = getImageNodeInSelection();
|
|
111
|
+
if (!node) {
|
|
112
|
+
return false;
|
|
113
|
+
}
|
|
114
|
+
var data = getDragImageData(event);
|
|
115
|
+
if (!data) {
|
|
116
|
+
return false;
|
|
117
|
+
}
|
|
118
|
+
event.preventDefault();
|
|
119
|
+
if (canDropImage(event)) {
|
|
120
|
+
var range = getDragSelection(event);
|
|
121
|
+
node.remove();
|
|
122
|
+
var rangeSelection = $createRangeSelection();
|
|
123
|
+
if (range !== null && range !== undefined) {
|
|
124
|
+
rangeSelection.applyDOMRange(range);
|
|
125
|
+
}
|
|
126
|
+
$setSelection(rangeSelection);
|
|
127
|
+
editor.dispatchCommand(INSERT_IMAGE_COMMAND, data);
|
|
128
|
+
}
|
|
129
|
+
return true;
|
|
130
|
+
}
|
|
131
|
+
function getImageNodeInSelection() {
|
|
132
|
+
var selection = $getSelection();
|
|
133
|
+
if (!$isNodeSelection(selection)) {
|
|
134
|
+
return null;
|
|
135
|
+
}
|
|
136
|
+
var nodes = selection.getNodes();
|
|
137
|
+
var node = nodes[0];
|
|
138
|
+
return $isImageNode(node) ? node : null;
|
|
139
|
+
}
|
|
140
|
+
function getDragImageData(event) {
|
|
141
|
+
var _a;
|
|
142
|
+
var dragData = (_a = event.dataTransfer) === null || _a === void 0 ? void 0 : _a.getData('application/x-lexical-drag');
|
|
143
|
+
if (!dragData) {
|
|
144
|
+
return null;
|
|
145
|
+
}
|
|
146
|
+
var _b = JSON.parse(dragData), data = _b.data, type = _b.type;
|
|
147
|
+
if (type !== 'image') {
|
|
148
|
+
return null;
|
|
149
|
+
}
|
|
150
|
+
return data;
|
|
151
|
+
}
|
|
152
|
+
function canDropImage(event) {
|
|
153
|
+
var target = event.target;
|
|
154
|
+
return !!(target &&
|
|
155
|
+
target instanceof HTMLElement &&
|
|
156
|
+
!target.closest('code, span.editor-image') &&
|
|
157
|
+
target.parentElement &&
|
|
158
|
+
target.parentElement.closest('div.ContentEditable__root'));
|
|
159
|
+
}
|
|
160
|
+
function getDragSelection(event) {
|
|
161
|
+
var range;
|
|
162
|
+
var target = event.target;
|
|
163
|
+
var targetWindow = target == null
|
|
164
|
+
? null
|
|
165
|
+
: target.nodeType === 9
|
|
166
|
+
? target.defaultView
|
|
167
|
+
: target.ownerDocument.defaultView;
|
|
168
|
+
var domSelection = getDOMSelection(targetWindow);
|
|
169
|
+
if (document.caretRangeFromPoint) {
|
|
170
|
+
range = document.caretRangeFromPoint(event.clientX, event.clientY);
|
|
171
|
+
}
|
|
172
|
+
else if (event.rangeParent && domSelection !== null) {
|
|
173
|
+
domSelection.collapse(event.rangeParent, event.rangeOffset || 0);
|
|
174
|
+
range = domSelection.getRangeAt(0);
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
throw Error("Cannot get the selection when dragging");
|
|
178
|
+
}
|
|
179
|
+
return range;
|
|
180
|
+
}
|
|
181
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/TextEditorV2/plugins/ImagesPlugin/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAA;AACjF,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAClE,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,EACb,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,GAGb,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,SAAS,EAAgB,MAAM,uBAAuB,CAAA;AAC/F,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAw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WAAW;YAClC,CAAC,CAAE,MAAkB,CAAC,aAAa,CAAC,WAAW,CAAA;IACnD,IAAM,YAAY,GAAG,eAAe,CAAC,YAAY,CAAC,CAAA;IAClD,IAAI,QAAQ,CAAC,mBAAmB,EAAE,CAAC;QACjC,KAAK,GAAG,QAAQ,CAAC,mBAAmB,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;IACpE,CAAC;SAAM,IAAI,KAAK,CAAC,WAAW,IAAI,YAAY,KAAK,IAAI,EAAE,CAAC;QACtD,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,WAAW,IAAI,CAAC,CAAC,CAAA;QAChE,KAAK,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,CAAA;IACpC,CAAC;SAAM,CAAC;QACN,MAAM,KAAK,CAAC,wCAAwC,CAAC,CAAA;IACvD,CAAC;IAED,OAAO,KAAK,CAAA;AACd,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { LexicalCommand, LexicalEditor } from 'lexical';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { InlineImagePayload } from '../../nodes/InlineImageNode';
|
|
4
|
+
export type InsertInlineImagePayload = Readonly<InlineImagePayload>;
|
|
5
|
+
export declare const INSERT_INLINE_IMAGE_COMMAND: LexicalCommand<InlineImagePayload>;
|
|
6
|
+
export declare function InsertInlineImageModal({ activeEditor, setShow, show, }: {
|
|
7
|
+
activeEditor: LexicalEditor;
|
|
8
|
+
show: boolean;
|
|
9
|
+
setShow: any;
|
|
10
|
+
}): React.JSX.Element;
|
|
11
|
+
export default function InlineImagePlugin(): React.JSX.Element | null;
|
|
12
|
+
declare global {
|
|
13
|
+
interface DragEvent {
|
|
14
|
+
rangeOffset?: number;
|
|
15
|
+
rangeParent?: Node;
|
|
16
|
+
}
|
|
17
|
+
}
|