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,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.INSERT_POLL_COMMAND = void 0;
|
|
4
|
+
exports.InsertPollDialog = InsertPollDialog;
|
|
5
|
+
exports.default = PollPlugin;
|
|
6
|
+
var tslib_1 = require("tslib");
|
|
7
|
+
var LexicalComposerContext_1 = require("@lexical/react/LexicalComposerContext");
|
|
8
|
+
var utils_1 = require("@lexical/utils");
|
|
9
|
+
var lexical_1 = require("lexical");
|
|
10
|
+
var react_1 = require("react");
|
|
11
|
+
var React = tslib_1.__importStar(require("react"));
|
|
12
|
+
var PollNode_1 = require("../../nodes/PollNode");
|
|
13
|
+
var Button_1 = tslib_1.__importDefault(require("../../ui/Button"));
|
|
14
|
+
var Dialog_1 = require("../../ui/Dialog");
|
|
15
|
+
var TextInput_1 = tslib_1.__importDefault(require("../../ui/TextInput"));
|
|
16
|
+
exports.INSERT_POLL_COMMAND = (0, lexical_1.createCommand)('INSERT_POLL_COMMAND');
|
|
17
|
+
function InsertPollDialog(_a) {
|
|
18
|
+
var activeEditor = _a.activeEditor, onClose = _a.onClose;
|
|
19
|
+
var _b = (0, react_1.useState)(''), question = _b[0], setQuestion = _b[1];
|
|
20
|
+
var onClick = function () {
|
|
21
|
+
activeEditor.dispatchCommand(exports.INSERT_POLL_COMMAND, question);
|
|
22
|
+
onClose();
|
|
23
|
+
};
|
|
24
|
+
return (React.createElement(React.Fragment, null,
|
|
25
|
+
React.createElement(TextInput_1.default, { label: 'Question', onChange: setQuestion, value: question }),
|
|
26
|
+
React.createElement(Dialog_1.DialogActions, null,
|
|
27
|
+
React.createElement(Button_1.default, { disabled: question.trim() === '', onClick: onClick }, "Confirm"))));
|
|
28
|
+
}
|
|
29
|
+
function PollPlugin() {
|
|
30
|
+
var editor = (0, LexicalComposerContext_1.useLexicalComposerContext)()[0];
|
|
31
|
+
(0, react_1.useEffect)(function () {
|
|
32
|
+
if (!editor.hasNodes([PollNode_1.PollNode])) {
|
|
33
|
+
throw new Error('PollPlugin: PollNode not registered on editor');
|
|
34
|
+
}
|
|
35
|
+
return editor.registerCommand(exports.INSERT_POLL_COMMAND, function (payload) {
|
|
36
|
+
var pollNode = (0, PollNode_1.$createPollNode)(payload, [(0, PollNode_1.createPollOption)(), (0, PollNode_1.createPollOption)()]);
|
|
37
|
+
(0, lexical_1.$insertNodes)([pollNode]);
|
|
38
|
+
if ((0, lexical_1.$isRootOrShadowRoot)(pollNode.getParentOrThrow())) {
|
|
39
|
+
(0, utils_1.$wrapNodeInElement)(pollNode, lexical_1.$createParagraphNode).selectEnd();
|
|
40
|
+
}
|
|
41
|
+
return true;
|
|
42
|
+
}, lexical_1.COMMAND_PRIORITY_EDITOR);
|
|
43
|
+
}, [editor]);
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/TextEditorV2/plugins/PollPlugin/index.tsx"],"names":[],"mappings":";;;AAoBA,4CAwBC;AAED,6BAsBC;;AApED,gFAAiF;AACjF,wCAAmD;AACnD,mCAQgB;AAChB,+BAA2C;AAC3C,mDAA8B;AAC9B,iDAAkF;AAClF,mEAAoC;AACpC,0CAA+C;AAC/C,yEAA0C;AAE7B,QAAA,mBAAmB,GAA2B,IAAA,uBAAa,EAAC,qBAAqB,CAAC,CAAA;AAE/F,SAAgB,gBAAgB,CAAC,EAMhC;QALC,YAAY,kBAAA,EACZ,OAAO,aAAA;IAKD,IAAA,KAA0B,IAAA,gBAAQ,EAAC,EAAE,CAAC,EAArC,QAAQ,QAAA,EAAE,WAAW,QAAgB,CAAA;IAE5C,IAAM,OAAO,GAAG;QACd,YAAY,CAAC,eAAe,CAAC,2BAAmB,EAAE,QAAQ,CAAC,CAAA;QAC3D,OAAO,EAAE,CAAA;IACX,CAAC,CAAA;IAED,OAAO,CACL;QACE,oBAAC,mBAAS,IAAC,KAAK,EAAC,UAAU,EAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,GAAI;QACtE,oBAAC,sBAAa;YACZ,oBAAC,gBAAM,IAAC,QAAQ,EAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,cAEjD,CACK,CACf,CACJ,CAAA;AACH,CAAC;AAED,SAAwB,UAAU;IACzB,IAAA,MAAM,GAAI,IAAA,kDAAyB,GAAE,GAA/B,CAA+B;IAC5C,IAAA,iBAAS,EAAC;QACR,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,mBAAQ,CAAC,CAAC,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAA;QAClE,CAAC;QAED,OAAO,MAAM,CAAC,eAAe,CAC3B,2BAAmB,EACnB,UAAC,OAAO;YACN,IAAM,QAAQ,GAAG,IAAA,0BAAe,EAAC,OAAO,EAAE,CAAC,IAAA,2BAAgB,GAAE,EAAE,IAAA,2BAAgB,GAAE,CAAC,CAAC,CAAA;YACnF,IAAA,sBAAY,EAAC,CAAC,QAAQ,CAAC,CAAC,CAAA;YACxB,IAAI,IAAA,6BAAmB,EAAC,QAAQ,CAAC,gBAAgB,EAAE,CAAC,EAAE,CAAC;gBACrD,IAAA,0BAAkB,EAAC,QAAQ,EAAE,8BAAoB,CAAC,CAAC,SAAS,EAAE,CAAA;YAChE,CAAC;YAED,OAAO,IAAI,CAAA;QACb,CAAC,EACD,iCAAuB,CACxB,CAAA;IACH,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;IACZ,OAAO,IAAI,CAAA;AACb,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function StickyPlugin(): React.JSX.Element | null;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = StickyPlugin;
|
|
4
|
+
var LexicalComposerContext_1 = require("@lexical/react/LexicalComposerContext");
|
|
5
|
+
var react_1 = require("react");
|
|
6
|
+
var StickyNode_1 = require("../../nodes/StickyNode");
|
|
7
|
+
function StickyPlugin() {
|
|
8
|
+
var editor = (0, LexicalComposerContext_1.useLexicalComposerContext)()[0];
|
|
9
|
+
(0, react_1.useEffect)(function () {
|
|
10
|
+
if (!editor.hasNodes([StickyNode_1.StickyNode])) {
|
|
11
|
+
throw new Error('StickyPlugin: StickyNode not registered on editor');
|
|
12
|
+
}
|
|
13
|
+
}, [editor]);
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/TextEditorV2/plugins/StickyPlugin/index.ts"],"names":[],"mappings":";;AAIA,+BAQC;AAZD,gFAAiF;AACjF,+BAAiC;AACjC,qDAAmD;AAEnD,SAAwB,YAAY;IAC3B,IAAA,MAAM,GAAI,IAAA,kDAAyB,GAAE,GAA/B,CAA+B;IAC5C,IAAA,iBAAS,EAAC;QACR,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,uBAAU,CAAC,CAAC,EAAE,CAAC;YACnC,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAA;QACtE,CAAC;IACH,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;IACZ,OAAO,IAAI,CAAA;AACb,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function TabFocusPlugin(): null;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = TabFocusPlugin;
|
|
4
|
+
var LexicalComposerContext_1 = require("@lexical/react/LexicalComposerContext");
|
|
5
|
+
var lexical_1 = require("lexical");
|
|
6
|
+
var react_1 = require("react");
|
|
7
|
+
var COMMAND_PRIORITY_LOW = 1;
|
|
8
|
+
var TAB_TO_FOCUS_INTERVAL = 100;
|
|
9
|
+
var lastTabKeyDownTimestamp = 0;
|
|
10
|
+
var hasRegisteredKeyDownListener = false;
|
|
11
|
+
function registerKeyTimeStampTracker() {
|
|
12
|
+
window.addEventListener('keydown', function (event) {
|
|
13
|
+
// Tab
|
|
14
|
+
if (event.key === 'Tab') {
|
|
15
|
+
lastTabKeyDownTimestamp = event.timeStamp;
|
|
16
|
+
}
|
|
17
|
+
}, true);
|
|
18
|
+
}
|
|
19
|
+
function TabFocusPlugin() {
|
|
20
|
+
var editor = (0, LexicalComposerContext_1.useLexicalComposerContext)()[0];
|
|
21
|
+
(0, react_1.useEffect)(function () {
|
|
22
|
+
if (!hasRegisteredKeyDownListener) {
|
|
23
|
+
registerKeyTimeStampTracker();
|
|
24
|
+
hasRegisteredKeyDownListener = true;
|
|
25
|
+
}
|
|
26
|
+
return editor.registerCommand(lexical_1.FOCUS_COMMAND, function (event) {
|
|
27
|
+
var selection = (0, lexical_1.$getSelection)();
|
|
28
|
+
if ((0, lexical_1.$isRangeSelection)(selection)) {
|
|
29
|
+
if (lastTabKeyDownTimestamp + TAB_TO_FOCUS_INTERVAL > event.timeStamp) {
|
|
30
|
+
(0, lexical_1.$setSelection)(selection.clone());
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return false;
|
|
34
|
+
}, COMMAND_PRIORITY_LOW);
|
|
35
|
+
}, [editor]);
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/TextEditorV2/plugins/TabFocusPlugin/index.tsx"],"names":[],"mappings":";;AAuBA,iCAyBC;AAhDD,gFAAiF;AACjF,mCAAwF;AACxF,+BAAiC;AAEjC,IAAM,oBAAoB,GAAG,CAAC,CAAA;AAC9B,IAAM,qBAAqB,GAAG,GAAG,CAAA;AAEjC,IAAI,uBAAuB,GAAG,CAAC,CAAA;AAC/B,IAAI,4BAA4B,GAAG,KAAK,CAAA;AAExC,SAAS,2BAA2B;IAClC,MAAM,CAAC,gBAAgB,CACrB,SAAS,EACT,UAAC,KAAoB;QACnB,MAAM;QACN,IAAI,KAAK,CAAC,GAAG,KAAK,KAAK,EAAE,CAAC;YACxB,uBAAuB,GAAG,KAAK,CAAC,SAAS,CAAA;QAC3C,CAAC;IACH,CAAC,EACD,IAAI,CACL,CAAA;AACH,CAAC;AAED,SAAwB,cAAc;IAC7B,IAAA,MAAM,GAAI,IAAA,kDAAyB,GAAE,GAA/B,CAA+B;IAE5C,IAAA,iBAAS,EAAC;QACR,IAAI,CAAC,4BAA4B,EAAE,CAAC;YAClC,2BAA2B,EAAE,CAAA;YAC7B,4BAA4B,GAAG,IAAI,CAAA;QACrC,CAAC;QAED,OAAO,MAAM,CAAC,eAAe,CAC3B,uBAAa,EACb,UAAC,KAAiB;YAChB,IAAM,SAAS,GAAG,IAAA,uBAAa,GAAE,CAAA;YACjC,IAAI,IAAA,2BAAiB,EAAC,SAAS,CAAC,EAAE,CAAC;gBACjC,IAAI,uBAAuB,GAAG,qBAAqB,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;oBACtE,IAAA,uBAAa,EAAC,SAAS,CAAC,KAAK,EAAE,CAAC,CAAA;gBAClC,CAAC;YACH,CAAC;YACD,OAAO,KAAK,CAAA;QACd,CAAC,EACD,oBAAoB,CACrB,CAAA;IACH,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;IAEZ,OAAO,IAAI,CAAA;AACb,CAAC"}
|
|
@@ -0,0 +1,487 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = TableActionMenuPlugin;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var LexicalComposerContext_1 = require("@lexical/react/LexicalComposerContext");
|
|
6
|
+
var useLexicalEditable_1 = tslib_1.__importDefault(require("@lexical/react/useLexicalEditable"));
|
|
7
|
+
var table_1 = require("@lexical/table");
|
|
8
|
+
var lexical_1 = require("lexical");
|
|
9
|
+
var React = tslib_1.__importStar(require("react"));
|
|
10
|
+
var react_1 = require("react");
|
|
11
|
+
var react_dom_1 = require("react-dom");
|
|
12
|
+
var useModal_1 = tslib_1.__importDefault(require("../../hooks/useModal"));
|
|
13
|
+
var invariant_1 = tslib_1.__importDefault(require("../../shared/invariant"));
|
|
14
|
+
var ColorPicker_1 = tslib_1.__importDefault(require("../../ui/ColorPicker"));
|
|
15
|
+
function computeSelectionCount(selection) {
|
|
16
|
+
var selectionShape = selection.getShape();
|
|
17
|
+
return {
|
|
18
|
+
columns: selectionShape.toX - selectionShape.fromX + 1,
|
|
19
|
+
rows: selectionShape.toY - selectionShape.fromY + 1,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
// This is important when merging cells as there is no good way to re-merge weird shapes (a result
|
|
23
|
+
// of selecting merged cells and non-merged)
|
|
24
|
+
function isGridSelectionRectangular(selection) {
|
|
25
|
+
var nodes = selection.getNodes();
|
|
26
|
+
var currentRows = [];
|
|
27
|
+
var currentRow = null;
|
|
28
|
+
var expectedColumns = null;
|
|
29
|
+
var currentColumns = 0;
|
|
30
|
+
for (var i = 0; i < nodes.length; i++) {
|
|
31
|
+
var node = nodes[i];
|
|
32
|
+
if ((0, table_1.$isTableCellNode)(node)) {
|
|
33
|
+
var row = node.getParentOrThrow();
|
|
34
|
+
(0, invariant_1.default)((0, table_1.$isTableRowNode)(row), 'Expected CellNode to have a RowNode parent');
|
|
35
|
+
if (currentRow !== row) {
|
|
36
|
+
if (expectedColumns !== null && currentColumns !== expectedColumns) {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
if (currentRow !== null) {
|
|
40
|
+
expectedColumns = currentColumns;
|
|
41
|
+
}
|
|
42
|
+
currentRow = row;
|
|
43
|
+
currentColumns = 0;
|
|
44
|
+
}
|
|
45
|
+
var colSpan = node.__colSpan;
|
|
46
|
+
for (var j = 0; j < colSpan; j++) {
|
|
47
|
+
if (currentRows[currentColumns + j] === undefined) {
|
|
48
|
+
currentRows[currentColumns + j] = 0;
|
|
49
|
+
}
|
|
50
|
+
currentRows[currentColumns + j] += node.__rowSpan;
|
|
51
|
+
}
|
|
52
|
+
currentColumns += colSpan;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return ((expectedColumns === null || currentColumns === expectedColumns) && currentRows.every(function (v) { return v === currentRows[0]; }));
|
|
56
|
+
}
|
|
57
|
+
function $canUnmerge() {
|
|
58
|
+
var selection = (0, lexical_1.$getSelection)();
|
|
59
|
+
if (((0, lexical_1.$isRangeSelection)(selection) && !selection.isCollapsed()) ||
|
|
60
|
+
((0, lexical_1.DEPRECATED_$isGridSelection)(selection) && !selection.anchor.is(selection.focus)) ||
|
|
61
|
+
(!(0, lexical_1.$isRangeSelection)(selection) && !(0, lexical_1.DEPRECATED_$isGridSelection)(selection))) {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
var cell = (0, lexical_1.DEPRECATED_$getNodeTriplet)(selection.anchor)[0];
|
|
65
|
+
return cell.__colSpan > 1 || cell.__rowSpan > 1;
|
|
66
|
+
}
|
|
67
|
+
function $cellContainsEmptyParagraph(cell) {
|
|
68
|
+
if (cell.getChildrenSize() !== 1) {
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
var firstChild = cell.getFirstChildOrThrow();
|
|
72
|
+
if (!(0, lexical_1.$isParagraphNode)(firstChild) || !firstChild.isEmpty()) {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
return true;
|
|
76
|
+
}
|
|
77
|
+
function $selectLastDescendant(node) {
|
|
78
|
+
var lastDescendant = node.getLastDescendant();
|
|
79
|
+
if ((0, lexical_1.$isTextNode)(lastDescendant)) {
|
|
80
|
+
lastDescendant.select();
|
|
81
|
+
}
|
|
82
|
+
else if ((0, lexical_1.$isElementNode)(lastDescendant)) {
|
|
83
|
+
lastDescendant.selectEnd();
|
|
84
|
+
}
|
|
85
|
+
else if (lastDescendant !== null) {
|
|
86
|
+
lastDescendant.selectNext();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
function currentCellBackgroundColor(editor) {
|
|
90
|
+
return editor.getEditorState().read(function () {
|
|
91
|
+
var selection = (0, lexical_1.$getSelection)();
|
|
92
|
+
if ((0, lexical_1.$isRangeSelection)(selection) || (0, lexical_1.DEPRECATED_$isGridSelection)(selection)) {
|
|
93
|
+
var cell = (0, lexical_1.DEPRECATED_$getNodeTriplet)(selection.anchor)[0];
|
|
94
|
+
if ((0, table_1.$isTableCellNode)(cell)) {
|
|
95
|
+
return cell.getBackgroundColor();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return null;
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
function TableActionMenu(_a) {
|
|
102
|
+
var cellMerge = _a.cellMerge, contextRef = _a.contextRef, onClose = _a.onClose, setIsMenuOpen = _a.setIsMenuOpen, showColorPickerModal = _a.showColorPickerModal, _tableCellNode = _a.tableCellNode;
|
|
103
|
+
var editor = (0, LexicalComposerContext_1.useLexicalComposerContext)()[0];
|
|
104
|
+
var dropDownRef = (0, react_1.useRef)(null);
|
|
105
|
+
var _b = (0, react_1.useState)(_tableCellNode), tableCellNode = _b[0], updateTableCellNode = _b[1];
|
|
106
|
+
var _c = (0, react_1.useState)({
|
|
107
|
+
columns: 1,
|
|
108
|
+
rows: 1,
|
|
109
|
+
}), selectionCounts = _c[0], updateSelectionCounts = _c[1];
|
|
110
|
+
var _d = (0, react_1.useState)(false), canMergeCells = _d[0], setCanMergeCells = _d[1];
|
|
111
|
+
var _e = (0, react_1.useState)(false), canUnmergeCell = _e[0], setCanUnmergeCell = _e[1];
|
|
112
|
+
var _f = (0, react_1.useState)(function () { return currentCellBackgroundColor(editor) || ''; }), backgroundColor = _f[0], setBackgroundColor = _f[1];
|
|
113
|
+
(0, react_1.useEffect)(function () {
|
|
114
|
+
return editor.registerMutationListener(table_1.TableCellNode, function (nodeMutations) {
|
|
115
|
+
var nodeUpdated = nodeMutations.get(tableCellNode.getKey()) === 'updated';
|
|
116
|
+
if (nodeUpdated) {
|
|
117
|
+
editor.getEditorState().read(function () {
|
|
118
|
+
updateTableCellNode(tableCellNode.getLatest());
|
|
119
|
+
});
|
|
120
|
+
setBackgroundColor(currentCellBackgroundColor(editor) || '');
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
}, [editor, tableCellNode]);
|
|
124
|
+
(0, react_1.useEffect)(function () {
|
|
125
|
+
editor.getEditorState().read(function () {
|
|
126
|
+
var selection = (0, lexical_1.$getSelection)();
|
|
127
|
+
// Merge cells
|
|
128
|
+
if ((0, lexical_1.DEPRECATED_$isGridSelection)(selection)) {
|
|
129
|
+
var currentSelectionCounts = computeSelectionCount(selection);
|
|
130
|
+
updateSelectionCounts(computeSelectionCount(selection));
|
|
131
|
+
setCanMergeCells(isGridSelectionRectangular(selection) &&
|
|
132
|
+
(currentSelectionCounts.columns > 1 || currentSelectionCounts.rows > 1));
|
|
133
|
+
}
|
|
134
|
+
// Unmerge cell
|
|
135
|
+
setCanUnmergeCell($canUnmerge());
|
|
136
|
+
});
|
|
137
|
+
}, [editor]);
|
|
138
|
+
(0, react_1.useEffect)(function () {
|
|
139
|
+
var menuButtonElement = contextRef.current;
|
|
140
|
+
var dropDownElement = dropDownRef.current;
|
|
141
|
+
var rootElement = editor.getRootElement();
|
|
142
|
+
if (menuButtonElement != null && dropDownElement != null && rootElement != null) {
|
|
143
|
+
var rootEleRect = rootElement.getBoundingClientRect();
|
|
144
|
+
var menuButtonRect = menuButtonElement.getBoundingClientRect();
|
|
145
|
+
dropDownElement.style.opacity = '1';
|
|
146
|
+
var dropDownElementRect = dropDownElement.getBoundingClientRect();
|
|
147
|
+
var margin = 5;
|
|
148
|
+
var leftPosition = menuButtonRect.right + margin;
|
|
149
|
+
if (leftPosition + dropDownElementRect.width > window.innerWidth ||
|
|
150
|
+
leftPosition + dropDownElementRect.width > rootEleRect.right) {
|
|
151
|
+
var position = menuButtonRect.left - dropDownElementRect.width - margin;
|
|
152
|
+
leftPosition = (position < 0 ? margin : position) + window.pageXOffset;
|
|
153
|
+
}
|
|
154
|
+
dropDownElement.style.left = "".concat(leftPosition + window.pageXOffset, "px");
|
|
155
|
+
var topPosition = menuButtonRect.top;
|
|
156
|
+
if (topPosition + dropDownElementRect.height > window.innerHeight) {
|
|
157
|
+
var position = menuButtonRect.bottom - dropDownElementRect.height;
|
|
158
|
+
topPosition = (position < 0 ? margin : position) + window.pageYOffset;
|
|
159
|
+
}
|
|
160
|
+
dropDownElement.style.top = "".concat(topPosition + +window.pageYOffset, "px");
|
|
161
|
+
}
|
|
162
|
+
}, [contextRef, dropDownRef, editor]);
|
|
163
|
+
(0, react_1.useEffect)(function () {
|
|
164
|
+
function handleClickOutside(event) {
|
|
165
|
+
if (dropDownRef.current != null &&
|
|
166
|
+
contextRef.current != null &&
|
|
167
|
+
!dropDownRef.current.contains(event.target) &&
|
|
168
|
+
!contextRef.current.contains(event.target)) {
|
|
169
|
+
setIsMenuOpen(false);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
window.addEventListener('click', handleClickOutside);
|
|
173
|
+
return function () { return window.removeEventListener('click', handleClickOutside); };
|
|
174
|
+
}, [setIsMenuOpen, contextRef]);
|
|
175
|
+
var clearTableSelection = (0, react_1.useCallback)(function () {
|
|
176
|
+
editor.update(function () {
|
|
177
|
+
if (tableCellNode.isAttached()) {
|
|
178
|
+
var tableNode = (0, table_1.$getTableNodeFromLexicalNodeOrThrow)(tableCellNode);
|
|
179
|
+
var tableElement = editor.getElementByKey(tableNode.getKey());
|
|
180
|
+
if (!tableElement) {
|
|
181
|
+
throw new Error('Expected to find tableElement in DOM');
|
|
182
|
+
}
|
|
183
|
+
var tableSelection = (0, table_1.getTableSelectionFromTableElement)(tableElement);
|
|
184
|
+
if (tableSelection !== null) {
|
|
185
|
+
tableSelection.clearHighlight();
|
|
186
|
+
}
|
|
187
|
+
tableNode.markDirty();
|
|
188
|
+
updateTableCellNode(tableCellNode.getLatest());
|
|
189
|
+
}
|
|
190
|
+
var rootNode = (0, lexical_1.$getRoot)();
|
|
191
|
+
rootNode.selectStart();
|
|
192
|
+
});
|
|
193
|
+
}, [editor, tableCellNode]);
|
|
194
|
+
var mergeTableCellsAtSelection = function () {
|
|
195
|
+
editor.update(function () {
|
|
196
|
+
var selection = (0, lexical_1.$getSelection)();
|
|
197
|
+
if ((0, lexical_1.DEPRECATED_$isGridSelection)(selection)) {
|
|
198
|
+
var _a = computeSelectionCount(selection), columns = _a.columns, rows = _a.rows;
|
|
199
|
+
var nodes = selection.getNodes();
|
|
200
|
+
var firstCell = null;
|
|
201
|
+
for (var i = 0; i < nodes.length; i++) {
|
|
202
|
+
var node = nodes[i];
|
|
203
|
+
if ((0, lexical_1.DEPRECATED_$isGridCellNode)(node)) {
|
|
204
|
+
if (firstCell === null) {
|
|
205
|
+
node.setColSpan(columns).setRowSpan(rows);
|
|
206
|
+
firstCell = node;
|
|
207
|
+
var isEmpty = $cellContainsEmptyParagraph(node);
|
|
208
|
+
var firstChild = void 0;
|
|
209
|
+
if (isEmpty && (0, lexical_1.$isParagraphNode)((firstChild = node.getFirstChild()))) {
|
|
210
|
+
firstChild.remove();
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
else if ((0, lexical_1.DEPRECATED_$isGridCellNode)(firstCell)) {
|
|
214
|
+
var isEmpty = $cellContainsEmptyParagraph(node);
|
|
215
|
+
if (!isEmpty) {
|
|
216
|
+
firstCell.append.apply(firstCell, node.getChildren());
|
|
217
|
+
}
|
|
218
|
+
node.remove();
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
if (firstCell !== null) {
|
|
223
|
+
if (firstCell.getChildrenSize() === 0) {
|
|
224
|
+
firstCell.append((0, lexical_1.$createParagraphNode)());
|
|
225
|
+
}
|
|
226
|
+
$selectLastDescendant(firstCell);
|
|
227
|
+
}
|
|
228
|
+
onClose();
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
};
|
|
232
|
+
var unmergeTableCellsAtSelection = function () {
|
|
233
|
+
editor.update(function () {
|
|
234
|
+
(0, table_1.$unmergeCell)();
|
|
235
|
+
});
|
|
236
|
+
};
|
|
237
|
+
var insertTableRowAtSelection = (0, react_1.useCallback)(function (shouldInsertAfter) {
|
|
238
|
+
editor.update(function () {
|
|
239
|
+
(0, table_1.$insertTableRow__EXPERIMENTAL)(shouldInsertAfter);
|
|
240
|
+
onClose();
|
|
241
|
+
});
|
|
242
|
+
}, [editor, onClose]);
|
|
243
|
+
var insertTableColumnAtSelection = (0, react_1.useCallback)(function (shouldInsertAfter) {
|
|
244
|
+
editor.update(function () {
|
|
245
|
+
for (var i = 0; i < selectionCounts.columns; i++) {
|
|
246
|
+
(0, table_1.$insertTableColumn__EXPERIMENTAL)(shouldInsertAfter);
|
|
247
|
+
}
|
|
248
|
+
onClose();
|
|
249
|
+
});
|
|
250
|
+
}, [editor, onClose, selectionCounts.columns]);
|
|
251
|
+
var deleteTableRowAtSelection = (0, react_1.useCallback)(function () {
|
|
252
|
+
editor.update(function () {
|
|
253
|
+
(0, table_1.$deleteTableRow__EXPERIMENTAL)();
|
|
254
|
+
onClose();
|
|
255
|
+
});
|
|
256
|
+
}, [editor, onClose]);
|
|
257
|
+
var deleteTableAtSelection = (0, react_1.useCallback)(function () {
|
|
258
|
+
editor.update(function () {
|
|
259
|
+
var tableNode = (0, table_1.$getTableNodeFromLexicalNodeOrThrow)(tableCellNode);
|
|
260
|
+
tableNode.remove();
|
|
261
|
+
clearTableSelection();
|
|
262
|
+
onClose();
|
|
263
|
+
});
|
|
264
|
+
}, [editor, tableCellNode, clearTableSelection, onClose]);
|
|
265
|
+
var deleteTableColumnAtSelection = (0, react_1.useCallback)(function () {
|
|
266
|
+
editor.update(function () {
|
|
267
|
+
(0, table_1.$deleteTableColumn__EXPERIMENTAL)();
|
|
268
|
+
onClose();
|
|
269
|
+
});
|
|
270
|
+
}, [editor, onClose]);
|
|
271
|
+
var toggleTableRowIsHeader = (0, react_1.useCallback)(function () {
|
|
272
|
+
editor.update(function () {
|
|
273
|
+
var tableNode = (0, table_1.$getTableNodeFromLexicalNodeOrThrow)(tableCellNode);
|
|
274
|
+
var tableRowIndex = (0, table_1.$getTableRowIndexFromTableCellNode)(tableCellNode);
|
|
275
|
+
var tableRows = tableNode.getChildren();
|
|
276
|
+
if (tableRowIndex >= tableRows.length || tableRowIndex < 0) {
|
|
277
|
+
throw new Error('Expected table cell to be inside of table row.');
|
|
278
|
+
}
|
|
279
|
+
var tableRow = tableRows[tableRowIndex];
|
|
280
|
+
if (!(0, table_1.$isTableRowNode)(tableRow)) {
|
|
281
|
+
throw new Error('Expected table row');
|
|
282
|
+
}
|
|
283
|
+
tableRow.getChildren().forEach(function (tableCell) {
|
|
284
|
+
if (!(0, table_1.$isTableCellNode)(tableCell)) {
|
|
285
|
+
throw new Error('Expected table cell');
|
|
286
|
+
}
|
|
287
|
+
tableCell.toggleHeaderStyle(table_1.TableCellHeaderStates.ROW);
|
|
288
|
+
});
|
|
289
|
+
clearTableSelection();
|
|
290
|
+
onClose();
|
|
291
|
+
});
|
|
292
|
+
}, [editor, tableCellNode, clearTableSelection, onClose]);
|
|
293
|
+
var toggleTableColumnIsHeader = (0, react_1.useCallback)(function () {
|
|
294
|
+
editor.update(function () {
|
|
295
|
+
var tableNode = (0, table_1.$getTableNodeFromLexicalNodeOrThrow)(tableCellNode);
|
|
296
|
+
var tableColumnIndex = (0, table_1.$getTableColumnIndexFromTableCellNode)(tableCellNode);
|
|
297
|
+
var tableRows = tableNode.getChildren();
|
|
298
|
+
var maxRowsLength = Math.max.apply(Math, tableRows.map(function (row) { return row.getChildren().length; }));
|
|
299
|
+
if (tableColumnIndex >= maxRowsLength || tableColumnIndex < 0) {
|
|
300
|
+
throw new Error('Expected table cell to be inside of table row.');
|
|
301
|
+
}
|
|
302
|
+
for (var r = 0; r < tableRows.length; r++) {
|
|
303
|
+
var tableRow = tableRows[r];
|
|
304
|
+
if (!(0, table_1.$isTableRowNode)(tableRow)) {
|
|
305
|
+
throw new Error('Expected table row');
|
|
306
|
+
}
|
|
307
|
+
var tableCells = tableRow.getChildren();
|
|
308
|
+
if (tableColumnIndex >= tableCells.length) {
|
|
309
|
+
// if cell is outside of bounds for the current row (for example various merge cell cases) we shouldn't highlight it
|
|
310
|
+
continue;
|
|
311
|
+
}
|
|
312
|
+
var tableCell = tableCells[tableColumnIndex];
|
|
313
|
+
if (!(0, table_1.$isTableCellNode)(tableCell)) {
|
|
314
|
+
throw new Error('Expected table cell');
|
|
315
|
+
}
|
|
316
|
+
tableCell.toggleHeaderStyle(table_1.TableCellHeaderStates.COLUMN);
|
|
317
|
+
}
|
|
318
|
+
clearTableSelection();
|
|
319
|
+
onClose();
|
|
320
|
+
});
|
|
321
|
+
}, [editor, tableCellNode, clearTableSelection, onClose]);
|
|
322
|
+
var handleCellBackgroundColor = (0, react_1.useCallback)(function (value) {
|
|
323
|
+
editor.update(function () {
|
|
324
|
+
var selection = (0, lexical_1.$getSelection)();
|
|
325
|
+
if ((0, lexical_1.$isRangeSelection)(selection) || (0, lexical_1.DEPRECATED_$isGridSelection)(selection)) {
|
|
326
|
+
var cell = (0, lexical_1.DEPRECATED_$getNodeTriplet)(selection.anchor)[0];
|
|
327
|
+
if ((0, table_1.$isTableCellNode)(cell)) {
|
|
328
|
+
cell.setBackgroundColor(value);
|
|
329
|
+
}
|
|
330
|
+
if ((0, lexical_1.DEPRECATED_$isGridSelection)(selection)) {
|
|
331
|
+
var nodes = selection.getNodes();
|
|
332
|
+
for (var i = 0; i < nodes.length; i++) {
|
|
333
|
+
var node = nodes[i];
|
|
334
|
+
if ((0, lexical_1.DEPRECATED_$isGridCellNode)(node)) {
|
|
335
|
+
node.setBackgroundColor(value);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
}, [editor]);
|
|
342
|
+
var mergeCellButton = null;
|
|
343
|
+
if (cellMerge) {
|
|
344
|
+
if (canMergeCells) {
|
|
345
|
+
mergeCellButton = (React.createElement("button", { className: 'item', "data-test-id": 'table-merge-cells', onClick: function () { return mergeTableCellsAtSelection(); }, type: 'button' }, "Merge cells"));
|
|
346
|
+
}
|
|
347
|
+
else if (canUnmergeCell) {
|
|
348
|
+
mergeCellButton = (React.createElement("button", { className: 'item', "data-test-id": 'table-unmerge-cells', onClick: function () { return unmergeTableCellsAtSelection(); }, type: 'button' }, "Unmerge cells"));
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
return (0, react_dom_1.createPortal)(React.createElement("div", { ref: dropDownRef, className: 'dropdown', onClick: function (e) {
|
|
352
|
+
e.stopPropagation();
|
|
353
|
+
} },
|
|
354
|
+
mergeCellButton,
|
|
355
|
+
React.createElement("button", { className: 'item', "data-test-id": 'table-background-color', onClick: function () {
|
|
356
|
+
return showColorPickerModal('Cell background color', function () { return (React.createElement(ColorPicker_1.default, { color: backgroundColor, onChange: handleCellBackgroundColor })); });
|
|
357
|
+
}, type: 'button' },
|
|
358
|
+
React.createElement("span", { className: 'text' }, "Background color")),
|
|
359
|
+
React.createElement("hr", null),
|
|
360
|
+
React.createElement("button", { className: 'item', "data-test-id": 'table-insert-row-above', onClick: function () { return insertTableRowAtSelection(false); }, type: 'button' },
|
|
361
|
+
React.createElement("span", { className: 'text' },
|
|
362
|
+
"Insert ",
|
|
363
|
+
selectionCounts.rows === 1 ? 'row' : "".concat(selectionCounts.rows, " rows"),
|
|
364
|
+
" above")),
|
|
365
|
+
React.createElement("button", { className: 'item', "data-test-id": 'table-insert-row-below', onClick: function () { return insertTableRowAtSelection(true); }, type: 'button' },
|
|
366
|
+
React.createElement("span", { className: 'text' },
|
|
367
|
+
"Insert ",
|
|
368
|
+
selectionCounts.rows === 1 ? 'row' : "".concat(selectionCounts.rows, " rows"),
|
|
369
|
+
" below")),
|
|
370
|
+
React.createElement("hr", null),
|
|
371
|
+
React.createElement("button", { className: 'item', "data-test-id": 'table-insert-column-before', onClick: function () { return insertTableColumnAtSelection(false); }, type: 'button' },
|
|
372
|
+
React.createElement("span", { className: 'text' },
|
|
373
|
+
"Insert ",
|
|
374
|
+
selectionCounts.columns === 1 ? 'column' : "".concat(selectionCounts.columns, " columns"),
|
|
375
|
+
" left")),
|
|
376
|
+
React.createElement("button", { className: 'item', "data-test-id": 'table-insert-column-after', onClick: function () { return insertTableColumnAtSelection(true); }, type: 'button' },
|
|
377
|
+
React.createElement("span", { className: 'text' },
|
|
378
|
+
"Insert ",
|
|
379
|
+
selectionCounts.columns === 1 ? 'column' : "".concat(selectionCounts.columns, " columns"),
|
|
380
|
+
" right")),
|
|
381
|
+
React.createElement("hr", null),
|
|
382
|
+
React.createElement("button", { className: 'item', "data-test-id": 'table-delete-columns', onClick: function () { return deleteTableColumnAtSelection(); }, type: 'button' },
|
|
383
|
+
React.createElement("span", { className: 'text' }, "Delete column")),
|
|
384
|
+
React.createElement("button", { className: 'item', "data-test-id": 'table-delete-rows', onClick: function () { return deleteTableRowAtSelection(); }, type: 'button' },
|
|
385
|
+
React.createElement("span", { className: 'text' }, "Delete row")),
|
|
386
|
+
React.createElement("button", { className: 'item', "data-test-id": 'table-delete', onClick: function () { return deleteTableAtSelection(); }, type: 'button' },
|
|
387
|
+
React.createElement("span", { className: 'text' }, "Delete table")),
|
|
388
|
+
React.createElement("hr", null),
|
|
389
|
+
React.createElement("button", { className: 'item', onClick: function () { return toggleTableRowIsHeader(); }, type: 'button' },
|
|
390
|
+
React.createElement("span", { className: 'text' },
|
|
391
|
+
(tableCellNode.__headerState & table_1.TableCellHeaderStates.ROW) === table_1.TableCellHeaderStates.ROW ? 'Remove' : 'Add',
|
|
392
|
+
' ',
|
|
393
|
+
"row header")),
|
|
394
|
+
React.createElement("button", { className: 'item', "data-test-id": 'table-column-header', onClick: function () { return toggleTableColumnIsHeader(); }, type: 'button' },
|
|
395
|
+
React.createElement("span", { className: 'text' },
|
|
396
|
+
(tableCellNode.__headerState & table_1.TableCellHeaderStates.COLUMN) === table_1.TableCellHeaderStates.COLUMN
|
|
397
|
+
? 'Remove'
|
|
398
|
+
: 'Add',
|
|
399
|
+
' ',
|
|
400
|
+
"column header"))), document.body);
|
|
401
|
+
}
|
|
402
|
+
function TableCellActionMenuContainer(_a) {
|
|
403
|
+
var anchorElem = _a.anchorElem, cellMerge = _a.cellMerge;
|
|
404
|
+
var editor = (0, LexicalComposerContext_1.useLexicalComposerContext)()[0];
|
|
405
|
+
var menuButtonRef = (0, react_1.useRef)(null);
|
|
406
|
+
var menuRootRef = (0, react_1.useRef)(null);
|
|
407
|
+
var _b = (0, react_1.useState)(false), isMenuOpen = _b[0], setIsMenuOpen = _b[1];
|
|
408
|
+
var _c = (0, react_1.useState)(null), tableCellNode = _c[0], setTableMenuCellNode = _c[1];
|
|
409
|
+
var _d = (0, useModal_1.default)(), colorPickerModal = _d[0], showColorPickerModal = _d[1];
|
|
410
|
+
var moveMenu = (0, react_1.useCallback)(function () {
|
|
411
|
+
var menu = menuButtonRef.current;
|
|
412
|
+
var selection = (0, lexical_1.$getSelection)();
|
|
413
|
+
var nativeSelection = window.getSelection();
|
|
414
|
+
var activeElement = document.activeElement;
|
|
415
|
+
if (selection == null || menu == null) {
|
|
416
|
+
setTableMenuCellNode(null);
|
|
417
|
+
return;
|
|
418
|
+
}
|
|
419
|
+
var rootElement = editor.getRootElement();
|
|
420
|
+
if ((0, lexical_1.$isRangeSelection)(selection) &&
|
|
421
|
+
rootElement !== null &&
|
|
422
|
+
nativeSelection !== null &&
|
|
423
|
+
rootElement.contains(nativeSelection.anchorNode)) {
|
|
424
|
+
var tableCellNodeFromSelection = (0, table_1.$getTableCellNodeFromLexicalNode)(selection.anchor.getNode());
|
|
425
|
+
if (tableCellNodeFromSelection == null) {
|
|
426
|
+
setTableMenuCellNode(null);
|
|
427
|
+
return;
|
|
428
|
+
}
|
|
429
|
+
var tableCellParentNodeDOM = editor.getElementByKey(tableCellNodeFromSelection.getKey());
|
|
430
|
+
if (tableCellParentNodeDOM == null) {
|
|
431
|
+
setTableMenuCellNode(null);
|
|
432
|
+
return;
|
|
433
|
+
}
|
|
434
|
+
setTableMenuCellNode(tableCellNodeFromSelection);
|
|
435
|
+
}
|
|
436
|
+
else if (!activeElement) {
|
|
437
|
+
setTableMenuCellNode(null);
|
|
438
|
+
}
|
|
439
|
+
}, [editor]);
|
|
440
|
+
(0, react_1.useEffect)(function () {
|
|
441
|
+
return editor.registerUpdateListener(function () {
|
|
442
|
+
editor.getEditorState().read(function () {
|
|
443
|
+
moveMenu();
|
|
444
|
+
});
|
|
445
|
+
});
|
|
446
|
+
});
|
|
447
|
+
(0, react_1.useEffect)(function () {
|
|
448
|
+
var menuButtonDOM = menuButtonRef.current;
|
|
449
|
+
if (menuButtonDOM != null && tableCellNode != null) {
|
|
450
|
+
var tableCellNodeDOM = editor.getElementByKey(tableCellNode.getKey());
|
|
451
|
+
if (tableCellNodeDOM != null) {
|
|
452
|
+
var tableCellRect = tableCellNodeDOM.getBoundingClientRect();
|
|
453
|
+
var menuRect = menuButtonDOM.getBoundingClientRect();
|
|
454
|
+
var anchorRect = anchorElem.getBoundingClientRect();
|
|
455
|
+
var top_1 = tableCellRect.top - anchorRect.top + 4;
|
|
456
|
+
var left = tableCellRect.right - menuRect.width - 10 - anchorRect.left;
|
|
457
|
+
menuButtonDOM.style.opacity = '1';
|
|
458
|
+
menuButtonDOM.style.transform = "translate(".concat(left, "px, ").concat(top_1, "px)");
|
|
459
|
+
}
|
|
460
|
+
else {
|
|
461
|
+
menuButtonDOM.style.opacity = '0';
|
|
462
|
+
menuButtonDOM.style.transform = 'translate(-10000px, -10000px)';
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
}, [menuButtonRef, tableCellNode, editor, anchorElem]);
|
|
466
|
+
var prevTableCellDOM = (0, react_1.useRef)(tableCellNode);
|
|
467
|
+
(0, react_1.useEffect)(function () {
|
|
468
|
+
if (prevTableCellDOM.current !== tableCellNode) {
|
|
469
|
+
setIsMenuOpen(false);
|
|
470
|
+
}
|
|
471
|
+
prevTableCellDOM.current = tableCellNode;
|
|
472
|
+
}, [prevTableCellDOM, tableCellNode]);
|
|
473
|
+
return (React.createElement("div", { ref: menuButtonRef, className: 'table-cell-action-button-container' }, tableCellNode != null && (React.createElement(React.Fragment, null,
|
|
474
|
+
React.createElement("button", { ref: menuRootRef, className: 'table-cell-action-button chevron-down', onClick: function (e) {
|
|
475
|
+
e.stopPropagation();
|
|
476
|
+
setIsMenuOpen(!isMenuOpen);
|
|
477
|
+
}, type: 'button' },
|
|
478
|
+
React.createElement("i", { className: 'chevron-down' })),
|
|
479
|
+
colorPickerModal,
|
|
480
|
+
isMenuOpen && (React.createElement(TableActionMenu, { cellMerge: cellMerge, contextRef: menuRootRef, onClose: function () { return setIsMenuOpen(false); }, setIsMenuOpen: setIsMenuOpen, showColorPickerModal: showColorPickerModal, tableCellNode: tableCellNode }))))));
|
|
481
|
+
}
|
|
482
|
+
function TableActionMenuPlugin(_a) {
|
|
483
|
+
var _b = _a.anchorElem, anchorElem = _b === void 0 ? document.body : _b, _c = _a.cellMerge, cellMerge = _c === void 0 ? false : _c;
|
|
484
|
+
var isEditable = (0, useLexicalEditable_1.default)();
|
|
485
|
+
return (0, react_dom_1.createPortal)(isEditable ? React.createElement(TableCellActionMenuContainer, { anchorElem: anchorElem, cellMerge: cellMerge }) : null, anchorElem);
|
|
486
|
+
}
|
|
487
|
+
//# sourceMappingURL=index.js.map
|