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,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CollapsibleContentNode = void 0;
|
|
4
|
+
exports.convertCollapsibleContentElement = convertCollapsibleContentElement;
|
|
5
|
+
exports.$createCollapsibleContentNode = $createCollapsibleContentNode;
|
|
6
|
+
exports.$isCollapsibleContentNode = $isCollapsibleContentNode;
|
|
7
|
+
var tslib_1 = require("tslib");
|
|
8
|
+
var lexical_1 = require("lexical");
|
|
9
|
+
function convertCollapsibleContentElement() {
|
|
10
|
+
var node = $createCollapsibleContentNode();
|
|
11
|
+
return {
|
|
12
|
+
node: node,
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
var CollapsibleContentNode = /** @class */ (function (_super) {
|
|
16
|
+
tslib_1.__extends(CollapsibleContentNode, _super);
|
|
17
|
+
function CollapsibleContentNode() {
|
|
18
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
19
|
+
}
|
|
20
|
+
CollapsibleContentNode.getType = function () {
|
|
21
|
+
return 'collapsible-content';
|
|
22
|
+
};
|
|
23
|
+
CollapsibleContentNode.clone = function (node) {
|
|
24
|
+
return new CollapsibleContentNode(node.__key);
|
|
25
|
+
};
|
|
26
|
+
CollapsibleContentNode.prototype.createDOM = function () {
|
|
27
|
+
var dom = document.createElement('div');
|
|
28
|
+
dom.classList.add('Collapsible__content');
|
|
29
|
+
return dom;
|
|
30
|
+
};
|
|
31
|
+
CollapsibleContentNode.prototype.updateDOM = function () {
|
|
32
|
+
return false;
|
|
33
|
+
};
|
|
34
|
+
CollapsibleContentNode.importDOM = function () {
|
|
35
|
+
return {
|
|
36
|
+
div: function (domNode) {
|
|
37
|
+
if (!domNode.hasAttribute('data-lexical-collapsible-content')) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
conversion: convertCollapsibleContentElement,
|
|
42
|
+
priority: 2,
|
|
43
|
+
};
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
CollapsibleContentNode.prototype.exportDOM = function () {
|
|
48
|
+
var element = document.createElement('div');
|
|
49
|
+
element.setAttribute('data-lexical-collapsible-content', 'true');
|
|
50
|
+
return { element: element };
|
|
51
|
+
};
|
|
52
|
+
CollapsibleContentNode.importJSON = function () {
|
|
53
|
+
return $createCollapsibleContentNode();
|
|
54
|
+
};
|
|
55
|
+
CollapsibleContentNode.prototype.isShadowRoot = function () {
|
|
56
|
+
return true;
|
|
57
|
+
};
|
|
58
|
+
CollapsibleContentNode.prototype.exportJSON = function () {
|
|
59
|
+
return tslib_1.__assign(tslib_1.__assign({}, _super.prototype.exportJSON.call(this)), { type: 'collapsible-content', version: 1 });
|
|
60
|
+
};
|
|
61
|
+
return CollapsibleContentNode;
|
|
62
|
+
}(lexical_1.ElementNode));
|
|
63
|
+
exports.CollapsibleContentNode = CollapsibleContentNode;
|
|
64
|
+
function $createCollapsibleContentNode() {
|
|
65
|
+
return new CollapsibleContentNode();
|
|
66
|
+
}
|
|
67
|
+
function $isCollapsibleContentNode(node) {
|
|
68
|
+
return node instanceof CollapsibleContentNode;
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=CollapsibleContentNode.js.map
|
package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContentNode.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CollapsibleContentNode.js","sourceRoot":"","sources":["../../../../../../src/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContentNode.ts"],"names":[],"mappings":";;;AAWA,4EAKC;AA0DD,sEAEC;AAED,8DAEC;;AAhFD,mCAOgB;AAIhB,SAAgB,gCAAgC;IAC9C,IAAM,IAAI,GAAG,6BAA6B,EAAE,CAAA;IAC5C,OAAO;QACL,IAAI,MAAA;KACL,CAAA;AACH,CAAC;AAED;IAA4C,kDAAW;IAAvD;;IAsDA,CAAC;IArDe,8BAAO,GAArB;QACE,OAAO,qBAAqB,CAAA;IAC9B,CAAC;IAEa,4BAAK,GAAnB,UAAoB,IAA4B;QAC9C,OAAO,IAAI,sBAAsB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IAC/C,CAAC;IAEM,0CAAS,GAAhB;QACE,IAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;QACzC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAA;QACzC,OAAO,GAAG,CAAA;IACZ,CAAC;IAEM,0CAAS,GAAhB;QACE,OAAO,KAAK,CAAA;IACd,CAAC;IAEa,gCAAS,GAAvB;QACE,OAAO;YACL,GAAG,EAAE,UAAC,OAAoB;gBACxB,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,kCAAkC,CAAC,EAAE,CAAC;oBAC9D,OAAO,IAAI,CAAA;gBACb,CAAC;gBACD,OAAO;oBACL,UAAU,EAAE,gCAAgC;oBAC5C,QAAQ,EAAE,CAAC;iBACZ,CAAA;YACH,CAAC;SACF,CAAA;IACH,CAAC;IAEM,0CAAS,GAAhB;QACE,IAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;QAC7C,OAAO,CAAC,YAAY,CAAC,kCAAkC,EAAE,MAAM,CAAC,CAAA;QAChE,OAAO,EAAE,OAAO,SAAA,EAAE,CAAA;IACpB,CAAC;IAEa,iCAAU,GAAxB;QACE,OAAO,6BAA6B,EAAE,CAAA;IACxC,CAAC;IAEM,6CAAY,GAAnB;QACE,OAAO,IAAI,CAAA;IACb,CAAC;IAEM,2CAAU,GAAjB;QACE,6CACK,gBAAK,CAAC,UAAU,WAAE,KACrB,IAAI,EAAE,qBAAqB,EAC3B,OAAO,EAAE,CAAC,IACX;IACH,CAAC;IACH,6BAAC;AAAD,CAAC,AAtDD,CAA4C,qBAAW,GAsDtD;AAtDY,wDAAsB;AAwDnC,SAAgB,6BAA6B;IAC3C,OAAO,IAAI,sBAAsB,EAAE,CAAA;AACrC,CAAC;AAED,SAAgB,yBAAyB,CAAC,IAAoC;IAC5E,OAAO,IAAI,YAAY,sBAAsB,CAAA;AAC/C,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DOMConversionMap, DOMConversionOutput, DOMExportOutput, ElementNode, LexicalNode, RangeSelection, SerializedElementNode } from 'lexical';
|
|
2
|
+
type SerializedCollapsibleTitleNode = SerializedElementNode;
|
|
3
|
+
export declare function convertSummaryElement(): DOMConversionOutput | null;
|
|
4
|
+
export declare class CollapsibleTitleNode extends ElementNode {
|
|
5
|
+
static getType(): string;
|
|
6
|
+
static clone(node: CollapsibleTitleNode): CollapsibleTitleNode;
|
|
7
|
+
createDOM(): HTMLElement;
|
|
8
|
+
updateDOM(): boolean;
|
|
9
|
+
static importDOM(): DOMConversionMap | null;
|
|
10
|
+
static importJSON(): CollapsibleTitleNode;
|
|
11
|
+
exportDOM(): DOMExportOutput;
|
|
12
|
+
exportJSON(): SerializedCollapsibleTitleNode;
|
|
13
|
+
collapseAtStart(_selection: RangeSelection): boolean;
|
|
14
|
+
insertNewAfter(_: RangeSelection, restoreSelection?: boolean): ElementNode;
|
|
15
|
+
}
|
|
16
|
+
export declare function $createCollapsibleTitleNode(): CollapsibleTitleNode;
|
|
17
|
+
export declare function $isCollapsibleTitleNode(node: LexicalNode | null | undefined): node is CollapsibleTitleNode;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CollapsibleTitleNode = void 0;
|
|
4
|
+
exports.convertSummaryElement = convertSummaryElement;
|
|
5
|
+
exports.$createCollapsibleTitleNode = $createCollapsibleTitleNode;
|
|
6
|
+
exports.$isCollapsibleTitleNode = $isCollapsibleTitleNode;
|
|
7
|
+
var tslib_1 = require("tslib");
|
|
8
|
+
var lexical_1 = require("lexical");
|
|
9
|
+
var CollapsibleContainerNode_1 = require("./CollapsibleContainerNode");
|
|
10
|
+
var CollapsibleContentNode_1 = require("./CollapsibleContentNode");
|
|
11
|
+
function convertSummaryElement() {
|
|
12
|
+
var node = $createCollapsibleTitleNode();
|
|
13
|
+
return {
|
|
14
|
+
node: node,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
var CollapsibleTitleNode = /** @class */ (function (_super) {
|
|
18
|
+
tslib_1.__extends(CollapsibleTitleNode, _super);
|
|
19
|
+
function CollapsibleTitleNode() {
|
|
20
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
21
|
+
}
|
|
22
|
+
CollapsibleTitleNode.getType = function () {
|
|
23
|
+
return 'collapsible-title';
|
|
24
|
+
};
|
|
25
|
+
CollapsibleTitleNode.clone = function (node) {
|
|
26
|
+
return new CollapsibleTitleNode(node.__key);
|
|
27
|
+
};
|
|
28
|
+
CollapsibleTitleNode.prototype.createDOM = function () {
|
|
29
|
+
var dom = document.createElement('summary');
|
|
30
|
+
dom.classList.add('Collapsible__title');
|
|
31
|
+
return dom;
|
|
32
|
+
};
|
|
33
|
+
CollapsibleTitleNode.prototype.updateDOM = function () {
|
|
34
|
+
return false;
|
|
35
|
+
};
|
|
36
|
+
CollapsibleTitleNode.importDOM = function () {
|
|
37
|
+
return {
|
|
38
|
+
summary: function () { return ({
|
|
39
|
+
conversion: convertSummaryElement,
|
|
40
|
+
priority: 1,
|
|
41
|
+
}); },
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
CollapsibleTitleNode.importJSON = function () {
|
|
45
|
+
return $createCollapsibleTitleNode();
|
|
46
|
+
};
|
|
47
|
+
CollapsibleTitleNode.prototype.exportDOM = function () {
|
|
48
|
+
var element = document.createElement('summary');
|
|
49
|
+
return { element: element };
|
|
50
|
+
};
|
|
51
|
+
CollapsibleTitleNode.prototype.exportJSON = function () {
|
|
52
|
+
return tslib_1.__assign(tslib_1.__assign({}, _super.prototype.exportJSON.call(this)), { type: 'collapsible-title', version: 1 });
|
|
53
|
+
};
|
|
54
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
55
|
+
CollapsibleTitleNode.prototype.collapseAtStart = function (_selection) {
|
|
56
|
+
this.getParentOrThrow().insertBefore(this);
|
|
57
|
+
return true;
|
|
58
|
+
};
|
|
59
|
+
CollapsibleTitleNode.prototype.insertNewAfter = function (_, restoreSelection) {
|
|
60
|
+
if (restoreSelection === void 0) { restoreSelection = true; }
|
|
61
|
+
var containerNode = this.getParentOrThrow();
|
|
62
|
+
if (!(0, CollapsibleContainerNode_1.$isCollapsibleContainerNode)(containerNode)) {
|
|
63
|
+
throw new Error('CollapsibleTitleNode expects to be child of CollapsibleContainerNode');
|
|
64
|
+
}
|
|
65
|
+
if (containerNode.getOpen()) {
|
|
66
|
+
var contentNode = this.getNextSibling();
|
|
67
|
+
if (!(0, CollapsibleContentNode_1.$isCollapsibleContentNode)(contentNode)) {
|
|
68
|
+
throw new Error('CollapsibleTitleNode expects to have CollapsibleContentNode sibling');
|
|
69
|
+
}
|
|
70
|
+
var firstChild = contentNode.getFirstChild();
|
|
71
|
+
if ((0, lexical_1.$isElementNode)(firstChild)) {
|
|
72
|
+
return firstChild;
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
var paragraph = (0, lexical_1.$createParagraphNode)();
|
|
76
|
+
contentNode.append(paragraph);
|
|
77
|
+
return paragraph;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
var paragraph = (0, lexical_1.$createParagraphNode)();
|
|
82
|
+
containerNode.insertAfter(paragraph, restoreSelection);
|
|
83
|
+
return paragraph;
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
return CollapsibleTitleNode;
|
|
87
|
+
}(lexical_1.ElementNode));
|
|
88
|
+
exports.CollapsibleTitleNode = CollapsibleTitleNode;
|
|
89
|
+
function $createCollapsibleTitleNode() {
|
|
90
|
+
return new CollapsibleTitleNode();
|
|
91
|
+
}
|
|
92
|
+
function $isCollapsibleTitleNode(node) {
|
|
93
|
+
return node instanceof CollapsibleTitleNode;
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=CollapsibleTitleNode.js.map
|
package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleTitleNode.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CollapsibleTitleNode.js","sourceRoot":"","sources":["../../../../../../src/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleTitleNode.ts"],"names":[],"mappings":";;;AAgBA,sDAKC;AAkFD,kEAEC;AAED,0DAEC;;AA7GD,mCAUgB;AAChB,uEAAwE;AACxE,mEAAoE;AAIpE,SAAgB,qBAAqB;IACnC,IAAM,IAAI,GAAG,2BAA2B,EAAE,CAAA;IAC1C,OAAO;QACL,IAAI,MAAA;KACL,CAAA;AACH,CAAC;AAED;IAA0C,gDAAW;IAArD;;IA8EA,CAAC;IA7Ee,4BAAO,GAArB;QACE,OAAO,mBAAmB,CAAA;IAC5B,CAAC;IAEa,0BAAK,GAAnB,UAAoB,IAA0B;QAC5C,OAAO,IAAI,oBAAoB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IAC7C,CAAC;IAEM,wCAAS,GAAhB;QACE,IAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,SAAS,CAAC,CAAA;QAC7C,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAA;QACvC,OAAO,GAAG,CAAA;IACZ,CAAC;IAEM,wCAAS,GAAhB;QACE,OAAO,KAAK,CAAA;IACd,CAAC;IAEa,8BAAS,GAAvB;QACE,OAAO;YACL,OAAO,EAAE,cAAM,OAAA,CAAC;gBACd,UAAU,EAAE,qBAAqB;gBACjC,QAAQ,EAAE,CAAC;aACZ,CAAC,EAHa,CAGb;SACH,CAAA;IACH,CAAC;IAEa,+BAAU,GAAxB;QACE,OAAO,2BAA2B,EAAE,CAAA;IACtC,CAAC;IAEM,wCAAS,GAAhB;QACE,IAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,SAAS,CAAC,CAAA;QACjD,OAAO,EAAE,OAAO,SAAA,EAAE,CAAA;IACpB,CAAC;IAEM,yCAAU,GAAjB;QACE,6CACK,gBAAK,CAAC,UAAU,WAAE,KACrB,IAAI,EAAE,mBAAmB,EACzB,OAAO,EAAE,CAAC,IACX;IACH,CAAC;IAED,6DAA6D;IACtD,8CAAe,GAAtB,UAAuB,UAA0B;QAC/C,IAAI,CAAC,gBAAgB,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAA;QAC1C,OAAO,IAAI,CAAA;IACb,CAAC;IAEM,6CAAc,GAArB,UAAsB,CAAiB,EAAE,gBAAuB;QAAvB,iCAAA,EAAA,uBAAuB;QAC9D,IAAM,aAAa,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAA;QAE7C,IAAI,CAAC,IAAA,sDAA2B,EAAC,aAAa,CAAC,EAAE,CAAC;YAChD,MAAM,IAAI,KAAK,CAAC,sEAAsE,CAAC,CAAA;QACzF,CAAC;QAED,IAAI,aAAa,CAAC,OAAO,EAAE,EAAE,CAAC;YAC5B,IAAM,WAAW,GAAG,IAAI,CAAC,cAAc,EAAE,CAAA;YACzC,IAAI,CAAC,IAAA,kDAAyB,EAAC,WAAW,CAAC,EAAE,CAAC;gBAC5C,MAAM,IAAI,KAAK,CAAC,qEAAqE,CAAC,CAAA;YACxF,CAAC;YAED,IAAM,UAAU,GAAG,WAAW,CAAC,aAAa,EAAE,CAAA;YAC9C,IAAI,IAAA,wBAAc,EAAC,UAAU,CAAC,EAAE,CAAC;gBAC/B,OAAO,UAAU,CAAA;YACnB,CAAC;iBAAM,CAAC;gBACN,IAAM,SAAS,GAAG,IAAA,8BAAoB,GAAE,CAAA;gBACxC,WAAW,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;gBAC7B,OAAO,SAAS,CAAA;YAClB,CAAC;QACH,CAAC;aAAM,CAAC;YACN,IAAM,SAAS,GAAG,IAAA,8BAAoB,GAAE,CAAA;YACxC,aAAa,CAAC,WAAW,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAA;YACtD,OAAO,SAAS,CAAA;QAClB,CAAC;IACH,CAAC;IACH,2BAAC;AAAD,CAAC,AA9ED,CAA0C,qBAAW,GA8EpD;AA9EY,oDAAoB;AAgFjC,SAAgB,2BAA2B;IACzC,OAAO,IAAI,oBAAoB,EAAE,CAAA;AACnC,CAAC;AAED,SAAgB,uBAAuB,CAAC,IAAoC;IAC1E,OAAO,IAAI,YAAY,oBAAoB,CAAA;AAC7C,CAAC"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TOGGLE_COLLAPSIBLE_COMMAND = exports.INSERT_COLLAPSIBLE_COMMAND = void 0;
|
|
4
|
+
exports.default = CollapsiblePlugin;
|
|
5
|
+
var LexicalComposerContext_1 = require("@lexical/react/LexicalComposerContext");
|
|
6
|
+
var utils_1 = require("@lexical/utils");
|
|
7
|
+
var lexical_1 = require("lexical");
|
|
8
|
+
var react_1 = require("react");
|
|
9
|
+
var CollapsibleContainerNode_1 = require("./CollapsibleContainerNode");
|
|
10
|
+
var CollapsibleContentNode_1 = require("./CollapsibleContentNode");
|
|
11
|
+
var CollapsibleTitleNode_1 = require("./CollapsibleTitleNode");
|
|
12
|
+
exports.INSERT_COLLAPSIBLE_COMMAND = (0, lexical_1.createCommand)();
|
|
13
|
+
exports.TOGGLE_COLLAPSIBLE_COMMAND = (0, lexical_1.createCommand)();
|
|
14
|
+
function CollapsiblePlugin() {
|
|
15
|
+
var editor = (0, LexicalComposerContext_1.useLexicalComposerContext)()[0];
|
|
16
|
+
(0, react_1.useEffect)(function () {
|
|
17
|
+
if (!editor.hasNodes([CollapsibleContainerNode_1.CollapsibleContainerNode, CollapsibleTitleNode_1.CollapsibleTitleNode, CollapsibleContentNode_1.CollapsibleContentNode])) {
|
|
18
|
+
throw new Error('CollapsiblePlugin: CollapsibleContainerNode, CollapsibleTitleNode, or CollapsibleContentNode not registered on editor');
|
|
19
|
+
}
|
|
20
|
+
var onEscapeUp = function () {
|
|
21
|
+
var _a;
|
|
22
|
+
var selection = (0, lexical_1.$getSelection)();
|
|
23
|
+
if ((0, lexical_1.$isRangeSelection)(selection) && selection.isCollapsed() && selection.anchor.offset === 0) {
|
|
24
|
+
var container = (0, utils_1.$findMatchingParent)(selection.anchor.getNode(), CollapsibleContainerNode_1.$isCollapsibleContainerNode);
|
|
25
|
+
if ((0, CollapsibleContainerNode_1.$isCollapsibleContainerNode)(container)) {
|
|
26
|
+
var parent_1 = container.getParent();
|
|
27
|
+
if (parent_1 !== null &&
|
|
28
|
+
parent_1.getFirstChild() === container &&
|
|
29
|
+
selection.anchor.key === ((_a = container.getFirstDescendant()) === null || _a === void 0 ? void 0 : _a.getKey())) {
|
|
30
|
+
container.insertBefore((0, lexical_1.$createParagraphNode)());
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return false;
|
|
35
|
+
};
|
|
36
|
+
var onEscapeDown = function () {
|
|
37
|
+
var selection = (0, lexical_1.$getSelection)();
|
|
38
|
+
if ((0, lexical_1.$isRangeSelection)(selection) && selection.isCollapsed()) {
|
|
39
|
+
var container = (0, utils_1.$findMatchingParent)(selection.anchor.getNode(), CollapsibleContainerNode_1.$isCollapsibleContainerNode);
|
|
40
|
+
if ((0, CollapsibleContainerNode_1.$isCollapsibleContainerNode)(container)) {
|
|
41
|
+
var parent_2 = container.getParent();
|
|
42
|
+
if (parent_2 !== null && parent_2.getLastChild() === container) {
|
|
43
|
+
var lastDescendant = container.getLastDescendant();
|
|
44
|
+
if (lastDescendant !== null &&
|
|
45
|
+
selection.anchor.key === lastDescendant.getKey() &&
|
|
46
|
+
selection.anchor.offset === lastDescendant.getTextContentSize()) {
|
|
47
|
+
container.insertAfter((0, lexical_1.$createParagraphNode)());
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return false;
|
|
53
|
+
};
|
|
54
|
+
return (0, utils_1.mergeRegister)(
|
|
55
|
+
// Structure enforcing transformers for each node type. In case nesting structure is not
|
|
56
|
+
// "Container > Title + Content" it'll unwrap nodes and convert it back
|
|
57
|
+
// to regular content.
|
|
58
|
+
editor.registerNodeTransform(CollapsibleContentNode_1.CollapsibleContentNode, function (node) {
|
|
59
|
+
var parent = node.getParent();
|
|
60
|
+
if (!(0, CollapsibleContainerNode_1.$isCollapsibleContainerNode)(parent)) {
|
|
61
|
+
var children = node.getChildren();
|
|
62
|
+
for (var _i = 0, children_1 = children; _i < children_1.length; _i++) {
|
|
63
|
+
var child = children_1[_i];
|
|
64
|
+
node.insertBefore(child);
|
|
65
|
+
}
|
|
66
|
+
node.remove();
|
|
67
|
+
}
|
|
68
|
+
}), editor.registerNodeTransform(CollapsibleTitleNode_1.CollapsibleTitleNode, function (node) {
|
|
69
|
+
var _a;
|
|
70
|
+
var parent = node.getParent();
|
|
71
|
+
if (!(0, CollapsibleContainerNode_1.$isCollapsibleContainerNode)(parent)) {
|
|
72
|
+
node.replace((_a = (0, lexical_1.$createParagraphNode)()).append.apply(_a, node.getChildren()));
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
}), editor.registerNodeTransform(CollapsibleContainerNode_1.CollapsibleContainerNode, function (node) {
|
|
76
|
+
var children = node.getChildren();
|
|
77
|
+
if (children.length !== 2 || !(0, CollapsibleTitleNode_1.$isCollapsibleTitleNode)(children[0]) || !(0, CollapsibleContentNode_1.$isCollapsibleContentNode)(children[1])) {
|
|
78
|
+
for (var _i = 0, children_2 = children; _i < children_2.length; _i++) {
|
|
79
|
+
var child = children_2[_i];
|
|
80
|
+
node.insertBefore(child);
|
|
81
|
+
}
|
|
82
|
+
node.remove();
|
|
83
|
+
}
|
|
84
|
+
}),
|
|
85
|
+
// This handles the case when container is collapsed and we delete its previous sibling
|
|
86
|
+
// into it, it would cause collapsed content deleted (since it's display: none, and selection
|
|
87
|
+
// swallows it when deletes single char). Instead we expand container, which is although
|
|
88
|
+
// not perfect, but avoids bigger problem
|
|
89
|
+
editor.registerCommand(lexical_1.DELETE_CHARACTER_COMMAND, function () {
|
|
90
|
+
var selection = (0, lexical_1.$getSelection)();
|
|
91
|
+
if (!(0, lexical_1.$isRangeSelection)(selection) || !selection.isCollapsed() || selection.anchor.offset !== 0) {
|
|
92
|
+
return false;
|
|
93
|
+
}
|
|
94
|
+
var anchorNode = selection.anchor.getNode();
|
|
95
|
+
var topLevelElement = anchorNode.getTopLevelElement();
|
|
96
|
+
if (topLevelElement === null) {
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
// @ts-ignore
|
|
100
|
+
var container = topLevelElement.getPreviousSibling();
|
|
101
|
+
if (!(0, CollapsibleContainerNode_1.$isCollapsibleContainerNode)(container) || container.getOpen()) {
|
|
102
|
+
return false;
|
|
103
|
+
}
|
|
104
|
+
container.setOpen(true);
|
|
105
|
+
return true;
|
|
106
|
+
}, lexical_1.COMMAND_PRIORITY_LOW),
|
|
107
|
+
// When collapsible is the last child pressing down/right arrow will insert paragraph
|
|
108
|
+
// below it to allow adding more content. It's similar what $insertBlockNode
|
|
109
|
+
// (mainly for decorators), except it'll always be possible to continue adding
|
|
110
|
+
// new content even if trailing paragraph is accidentally deleted
|
|
111
|
+
editor.registerCommand(lexical_1.KEY_ARROW_DOWN_COMMAND, onEscapeDown, lexical_1.COMMAND_PRIORITY_LOW), editor.registerCommand(lexical_1.KEY_ARROW_RIGHT_COMMAND, onEscapeDown, lexical_1.COMMAND_PRIORITY_LOW),
|
|
112
|
+
// When collapsible is the first child pressing up/left arrow will insert paragraph
|
|
113
|
+
// above it to allow adding more content. It's similar what $insertBlockNode
|
|
114
|
+
// (mainly for decorators), except it'll always be possible to continue adding
|
|
115
|
+
// new content even if leading paragraph is accidentally deleted
|
|
116
|
+
editor.registerCommand(lexical_1.KEY_ARROW_UP_COMMAND, onEscapeUp, lexical_1.COMMAND_PRIORITY_LOW), editor.registerCommand(lexical_1.KEY_ARROW_LEFT_COMMAND, onEscapeUp, lexical_1.COMMAND_PRIORITY_LOW),
|
|
117
|
+
// Handling CMD+Enter to toggle collapsible element collapsed state
|
|
118
|
+
editor.registerCommand(lexical_1.INSERT_PARAGRAPH_COMMAND, function () {
|
|
119
|
+
var _a;
|
|
120
|
+
// @ts-ignore
|
|
121
|
+
var windowEvent = (_a = editor._window) === null || _a === void 0 ? void 0 : _a.event;
|
|
122
|
+
if (windowEvent && (windowEvent.ctrlKey || windowEvent.metaKey) && windowEvent.key === 'Enter') {
|
|
123
|
+
var selection = (0, lexical_1.$getPreviousSelection)();
|
|
124
|
+
if ((0, lexical_1.$isRangeSelection)(selection) && selection.isCollapsed()) {
|
|
125
|
+
var parent_3 = (0, utils_1.$findMatchingParent)(selection.anchor.getNode(), function (node) { return (0, lexical_1.$isElementNode)(node) && !node.isInline(); });
|
|
126
|
+
if ((0, CollapsibleTitleNode_1.$isCollapsibleTitleNode)(parent_3)) {
|
|
127
|
+
var container = parent_3.getParent();
|
|
128
|
+
if ((0, CollapsibleContainerNode_1.$isCollapsibleContainerNode)(container)) {
|
|
129
|
+
container.toggleOpen();
|
|
130
|
+
(0, lexical_1.$setSelection)(selection.clone());
|
|
131
|
+
return true;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return false;
|
|
137
|
+
}, lexical_1.COMMAND_PRIORITY_LOW), editor.registerCommand(exports.INSERT_COLLAPSIBLE_COMMAND, function () {
|
|
138
|
+
editor.update(function () {
|
|
139
|
+
var title = (0, CollapsibleTitleNode_1.$createCollapsibleTitleNode)();
|
|
140
|
+
(0, utils_1.$insertNodeToNearestRoot)((0, CollapsibleContainerNode_1.$createCollapsibleContainerNode)(true).append(title, (0, CollapsibleContentNode_1.$createCollapsibleContentNode)().append((0, lexical_1.$createParagraphNode)())));
|
|
141
|
+
title.select();
|
|
142
|
+
});
|
|
143
|
+
return true;
|
|
144
|
+
}, lexical_1.COMMAND_PRIORITY_LOW));
|
|
145
|
+
}, [editor]);
|
|
146
|
+
return null;
|
|
147
|
+
}
|
|
148
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/TextEditorV2/plugins/CollapsiblePlugin/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = ComponentPickerMenuPlugin;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var code_1 = require("@lexical/code");
|
|
6
|
+
var list_1 = require("@lexical/list");
|
|
7
|
+
var LexicalAutoEmbedPlugin_1 = require("@lexical/react/LexicalAutoEmbedPlugin");
|
|
8
|
+
var LexicalComposerContext_1 = require("@lexical/react/LexicalComposerContext");
|
|
9
|
+
var LexicalHorizontalRuleNode_1 = require("@lexical/react/LexicalHorizontalRuleNode");
|
|
10
|
+
var LexicalTypeaheadMenuPlugin_1 = require("@lexical/react/LexicalTypeaheadMenuPlugin");
|
|
11
|
+
var rich_text_1 = require("@lexical/rich-text");
|
|
12
|
+
var selection_1 = require("@lexical/selection");
|
|
13
|
+
var table_1 = require("@lexical/table");
|
|
14
|
+
var lexical_1 = require("lexical");
|
|
15
|
+
var react_1 = require("react");
|
|
16
|
+
var React = tslib_1.__importStar(require("react"));
|
|
17
|
+
var ReactDOM = tslib_1.__importStar(require("react-dom"));
|
|
18
|
+
var useModal_1 = tslib_1.__importDefault(require("../../hooks/useModal"));
|
|
19
|
+
var AutoEmbedPlugin_1 = require("../AutoEmbedPlugin");
|
|
20
|
+
var CollapsiblePlugin_1 = require("../CollapsiblePlugin");
|
|
21
|
+
var EquationsPlugin_1 = require("../EquationsPlugin");
|
|
22
|
+
var ExcalidrawPlugin_1 = require("../ExcalidrawPlugin");
|
|
23
|
+
var ImagesPlugin_1 = require("../ImagesPlugin");
|
|
24
|
+
var InsertLayoutDialog_1 = tslib_1.__importDefault(require("../LayoutPlugin/InsertLayoutDialog"));
|
|
25
|
+
var PageBreakPlugin_1 = require("../PageBreakPlugin");
|
|
26
|
+
var PollPlugin_1 = require("../PollPlugin");
|
|
27
|
+
var TablePlugin_1 = require("../TablePlugin");
|
|
28
|
+
var ComponentPickerOption = /** @class */ (function (_super) {
|
|
29
|
+
tslib_1.__extends(ComponentPickerOption, _super);
|
|
30
|
+
function ComponentPickerOption(title, options) {
|
|
31
|
+
var _this = _super.call(this, title) || this;
|
|
32
|
+
_this.title = title;
|
|
33
|
+
_this.keywords = options.keywords || [];
|
|
34
|
+
_this.icon = options.icon;
|
|
35
|
+
_this.keyboardShortcut = options.keyboardShortcut;
|
|
36
|
+
_this.onSelect = options.onSelect.bind(_this);
|
|
37
|
+
return _this;
|
|
38
|
+
}
|
|
39
|
+
return ComponentPickerOption;
|
|
40
|
+
}(LexicalTypeaheadMenuPlugin_1.MenuOption));
|
|
41
|
+
function ComponentPickerMenuItem(_a) {
|
|
42
|
+
var index = _a.index, isSelected = _a.isSelected, onClick = _a.onClick, onMouseEnter = _a.onMouseEnter, option = _a.option;
|
|
43
|
+
var className = 'item';
|
|
44
|
+
if (isSelected) {
|
|
45
|
+
className += ' selected';
|
|
46
|
+
}
|
|
47
|
+
return (React.createElement("li", { key: option.key, ref: option.setRefElement, "aria-selected": isSelected, className: className, id: 'typeahead-item-' + index, onClick: onClick, onMouseEnter: onMouseEnter, role: 'option', tabIndex: -1 },
|
|
48
|
+
option.icon,
|
|
49
|
+
React.createElement("span", { className: 'text' }, option.title)));
|
|
50
|
+
}
|
|
51
|
+
function getDynamicOptions(editor, queryString) {
|
|
52
|
+
var options = [];
|
|
53
|
+
if (queryString == null) {
|
|
54
|
+
return options;
|
|
55
|
+
}
|
|
56
|
+
var tableMatch = queryString.match(/^([1-9]\d?)(?:x([1-9]\d?)?)?$/);
|
|
57
|
+
if (tableMatch !== null) {
|
|
58
|
+
var rows_1 = tableMatch[1];
|
|
59
|
+
var colOptions = tableMatch[2] ? [tableMatch[2]] : [1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map(String);
|
|
60
|
+
options.push.apply(options, colOptions.map(function (columns) {
|
|
61
|
+
return new ComponentPickerOption("".concat(rows_1, "x").concat(columns, " Table"), {
|
|
62
|
+
icon: React.createElement("i", { className: 'icon table' }),
|
|
63
|
+
keywords: ['table'],
|
|
64
|
+
onSelect: function () { return editor.dispatchCommand(table_1.INSERT_TABLE_COMMAND, { columns: columns, rows: rows_1 }); },
|
|
65
|
+
});
|
|
66
|
+
}));
|
|
67
|
+
}
|
|
68
|
+
return options;
|
|
69
|
+
}
|
|
70
|
+
function getBaseOptions(editor, showModal) {
|
|
71
|
+
return tslib_1.__spreadArray(tslib_1.__spreadArray(tslib_1.__spreadArray(tslib_1.__spreadArray(tslib_1.__spreadArray([
|
|
72
|
+
new ComponentPickerOption('Paragraph', {
|
|
73
|
+
icon: React.createElement("i", { className: 'icon paragraph' }),
|
|
74
|
+
keywords: ['normal', 'paragraph', 'p', 'text'],
|
|
75
|
+
onSelect: function () {
|
|
76
|
+
return editor.update(function () {
|
|
77
|
+
var selection = (0, lexical_1.$getSelection)();
|
|
78
|
+
if ((0, lexical_1.$isRangeSelection)(selection)) {
|
|
79
|
+
(0, selection_1.$setBlocksType)(selection, function () { return (0, lexical_1.$createParagraphNode)(); });
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
},
|
|
83
|
+
})
|
|
84
|
+
], [1, 2, 3].map(function (n) {
|
|
85
|
+
return new ComponentPickerOption("Heading ".concat(n), {
|
|
86
|
+
icon: React.createElement("i", { className: "icon h".concat(n) }),
|
|
87
|
+
keywords: ['heading', 'header', "h".concat(n)],
|
|
88
|
+
onSelect: function () {
|
|
89
|
+
return editor.update(function () {
|
|
90
|
+
var selection = (0, lexical_1.$getSelection)();
|
|
91
|
+
if ((0, lexical_1.$isRangeSelection)(selection)) {
|
|
92
|
+
(0, selection_1.$setBlocksType)(selection, function () { return (0, rich_text_1.$createHeadingNode)("h".concat(n)); });
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
}), true), [
|
|
98
|
+
new ComponentPickerOption('Table', {
|
|
99
|
+
icon: React.createElement("i", { className: 'icon table' }),
|
|
100
|
+
keywords: ['table', 'grid', 'spreadsheet', 'rows', 'columns'],
|
|
101
|
+
onSelect: function () {
|
|
102
|
+
return showModal('Insert Table', function (onClose) { return React.createElement(TablePlugin_1.InsertTableDialog, { activeEditor: editor, onClose: onClose }); });
|
|
103
|
+
},
|
|
104
|
+
}),
|
|
105
|
+
new ComponentPickerOption('Numbered List', {
|
|
106
|
+
icon: React.createElement("i", { className: 'icon number' }),
|
|
107
|
+
keywords: ['numbered list', 'ordered list', 'ol'],
|
|
108
|
+
onSelect: function () { return editor.dispatchCommand(list_1.INSERT_ORDERED_LIST_COMMAND, undefined); },
|
|
109
|
+
}),
|
|
110
|
+
new ComponentPickerOption('Bulleted List', {
|
|
111
|
+
icon: React.createElement("i", { className: 'icon bullet' }),
|
|
112
|
+
keywords: ['bulleted list', 'unordered list', 'ul'],
|
|
113
|
+
onSelect: function () { return editor.dispatchCommand(list_1.INSERT_UNORDERED_LIST_COMMAND, undefined); },
|
|
114
|
+
}),
|
|
115
|
+
new ComponentPickerOption('Check List', {
|
|
116
|
+
icon: React.createElement("i", { className: 'icon check' }),
|
|
117
|
+
keywords: ['check list', 'todo list'],
|
|
118
|
+
onSelect: function () { return editor.dispatchCommand(list_1.INSERT_CHECK_LIST_COMMAND, undefined); },
|
|
119
|
+
}),
|
|
120
|
+
new ComponentPickerOption('Quote', {
|
|
121
|
+
icon: React.createElement("i", { className: 'icon quote' }),
|
|
122
|
+
keywords: ['block quote'],
|
|
123
|
+
onSelect: function () {
|
|
124
|
+
return editor.update(function () {
|
|
125
|
+
var selection = (0, lexical_1.$getSelection)();
|
|
126
|
+
if ((0, lexical_1.$isRangeSelection)(selection)) {
|
|
127
|
+
(0, selection_1.$setBlocksType)(selection, function () { return (0, rich_text_1.$createQuoteNode)(); });
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
},
|
|
131
|
+
}),
|
|
132
|
+
new ComponentPickerOption('Code', {
|
|
133
|
+
icon: React.createElement("i", { className: 'icon code' }),
|
|
134
|
+
keywords: ['javascript', 'python', 'js', 'codeblock'],
|
|
135
|
+
onSelect: function () {
|
|
136
|
+
return editor.update(function () {
|
|
137
|
+
var selection = (0, lexical_1.$getSelection)();
|
|
138
|
+
if ((0, lexical_1.$isRangeSelection)(selection)) {
|
|
139
|
+
if (selection.isCollapsed()) {
|
|
140
|
+
(0, selection_1.$setBlocksType)(selection, function () { return (0, code_1.$createCodeNode)(); });
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
// Will this ever happen?
|
|
144
|
+
var textContent = selection.getTextContent();
|
|
145
|
+
var codeNode = (0, code_1.$createCodeNode)();
|
|
146
|
+
selection.insertNodes([codeNode]);
|
|
147
|
+
selection.insertRawText(textContent);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
},
|
|
152
|
+
}),
|
|
153
|
+
new ComponentPickerOption('Divider', {
|
|
154
|
+
icon: React.createElement("i", { className: 'icon horizontal-rule' }),
|
|
155
|
+
keywords: ['horizontal rule', 'divider', 'hr'],
|
|
156
|
+
onSelect: function () { return editor.dispatchCommand(LexicalHorizontalRuleNode_1.INSERT_HORIZONTAL_RULE_COMMAND, undefined); },
|
|
157
|
+
}),
|
|
158
|
+
new ComponentPickerOption('Page Break', {
|
|
159
|
+
icon: React.createElement("i", { className: 'icon page-break' }),
|
|
160
|
+
keywords: ['page break', 'divider'],
|
|
161
|
+
onSelect: function () { return editor.dispatchCommand(PageBreakPlugin_1.INSERT_PAGE_BREAK, undefined); },
|
|
162
|
+
}),
|
|
163
|
+
new ComponentPickerOption('Excalidraw', {
|
|
164
|
+
icon: React.createElement("i", { className: 'icon diagram-2' }),
|
|
165
|
+
keywords: ['excalidraw', 'diagram', 'drawing'],
|
|
166
|
+
onSelect: function () { return editor.dispatchCommand(ExcalidrawPlugin_1.INSERT_EXCALIDRAW_COMMAND, undefined); },
|
|
167
|
+
}),
|
|
168
|
+
new ComponentPickerOption('Poll', {
|
|
169
|
+
icon: React.createElement("i", { className: 'icon poll' }),
|
|
170
|
+
keywords: ['poll', 'vote'],
|
|
171
|
+
onSelect: function () {
|
|
172
|
+
return showModal('Insert Poll', function (onClose) { return React.createElement(PollPlugin_1.InsertPollDialog, { activeEditor: editor, onClose: onClose }); });
|
|
173
|
+
},
|
|
174
|
+
})
|
|
175
|
+
], false), AutoEmbedPlugin_1.EmbedConfigs.map(function (embedConfig) {
|
|
176
|
+
return new ComponentPickerOption("Embed ".concat(embedConfig.contentName), {
|
|
177
|
+
icon: embedConfig.icon,
|
|
178
|
+
keywords: tslib_1.__spreadArray(tslib_1.__spreadArray([], embedConfig.keywords, true), ['embed'], false),
|
|
179
|
+
onSelect: function () { return editor.dispatchCommand(LexicalAutoEmbedPlugin_1.INSERT_EMBED_COMMAND, embedConfig.type); },
|
|
180
|
+
});
|
|
181
|
+
}), true), [
|
|
182
|
+
new ComponentPickerOption('Equation', {
|
|
183
|
+
icon: React.createElement("i", { className: 'icon equation' }),
|
|
184
|
+
keywords: ['equation', 'latex', 'math'],
|
|
185
|
+
onSelect: function () {
|
|
186
|
+
return showModal('Insert Equation', function (onClose) { return React.createElement(EquationsPlugin_1.InsertEquationDialog, { activeEditor: editor, onClose: onClose }); });
|
|
187
|
+
},
|
|
188
|
+
}),
|
|
189
|
+
new ComponentPickerOption('GIF', {
|
|
190
|
+
icon: React.createElement("i", { className: 'icon gif' }),
|
|
191
|
+
keywords: ['gif', 'animate', 'image', 'file'],
|
|
192
|
+
onSelect: function () {
|
|
193
|
+
return editor.dispatchCommand(ImagesPlugin_1.INSERT_IMAGE_COMMAND, {
|
|
194
|
+
altText: 'Cat typing on a laptop',
|
|
195
|
+
src: '',
|
|
196
|
+
});
|
|
197
|
+
},
|
|
198
|
+
}),
|
|
199
|
+
// new ComponentPickerOption('Image', {
|
|
200
|
+
// icon: <i className="icon image" />,
|
|
201
|
+
// keywords: ['image', 'photo', 'picture', 'file'],
|
|
202
|
+
// onSelect: () =>
|
|
203
|
+
// showModal('Insert Image', (onClose) => (
|
|
204
|
+
// <InsertImageDialog activeEditor={editor} onClose={onClose} />
|
|
205
|
+
// ))
|
|
206
|
+
// }),
|
|
207
|
+
new ComponentPickerOption('Collapsible', {
|
|
208
|
+
icon: React.createElement("i", { className: 'icon caret-right' }),
|
|
209
|
+
keywords: ['collapse', 'collapsible', 'toggle'],
|
|
210
|
+
onSelect: function () { return editor.dispatchCommand(CollapsiblePlugin_1.INSERT_COLLAPSIBLE_COMMAND, undefined); },
|
|
211
|
+
}),
|
|
212
|
+
new ComponentPickerOption('Columns Layout', {
|
|
213
|
+
icon: React.createElement("i", { className: 'icon columns' }),
|
|
214
|
+
keywords: ['columns', 'layout', 'grid'],
|
|
215
|
+
onSelect: function () {
|
|
216
|
+
return showModal('Insert Columns Layout', function (onClose) { return React.createElement(InsertLayoutDialog_1.default, { activeEditor: editor, onClose: onClose }); });
|
|
217
|
+
},
|
|
218
|
+
})
|
|
219
|
+
], false), ['left', 'center', 'right', 'justify'].map(function (alignment) {
|
|
220
|
+
return new ComponentPickerOption("Align ".concat(alignment), {
|
|
221
|
+
icon: React.createElement("i", { className: "icon ".concat(alignment, "-align") }),
|
|
222
|
+
keywords: ['align', 'justify', alignment],
|
|
223
|
+
onSelect: function () { return editor.dispatchCommand(lexical_1.FORMAT_ELEMENT_COMMAND, alignment); },
|
|
224
|
+
});
|
|
225
|
+
}), true);
|
|
226
|
+
}
|
|
227
|
+
function ComponentPickerMenuPlugin() {
|
|
228
|
+
var editor = (0, LexicalComposerContext_1.useLexicalComposerContext)()[0];
|
|
229
|
+
var _a = (0, useModal_1.default)(), modal = _a[0], showModal = _a[1];
|
|
230
|
+
var _b = (0, react_1.useState)(null), queryString = _b[0], setQueryString = _b[1];
|
|
231
|
+
var checkForTriggerMatch = (0, LexicalTypeaheadMenuPlugin_1.useBasicTypeaheadTriggerMatch)('/', {
|
|
232
|
+
minLength: 0,
|
|
233
|
+
});
|
|
234
|
+
var options = (0, react_1.useMemo)(function () {
|
|
235
|
+
var baseOptions = getBaseOptions(editor, showModal);
|
|
236
|
+
if (!queryString) {
|
|
237
|
+
return baseOptions;
|
|
238
|
+
}
|
|
239
|
+
var regex = new RegExp(queryString, 'i');
|
|
240
|
+
return tslib_1.__spreadArray(tslib_1.__spreadArray([], getDynamicOptions(editor, queryString), true), baseOptions.filter(function (option) { return regex.test(option.title) || option.keywords.some(function (keyword) { return regex.test(keyword); }); }), true);
|
|
241
|
+
}, [editor, queryString, showModal]);
|
|
242
|
+
var onSelectOption = (0, react_1.useCallback)(function (selectedOption, nodeToRemove, closeMenu, matchingString) {
|
|
243
|
+
editor.update(function () {
|
|
244
|
+
nodeToRemove === null || nodeToRemove === void 0 ? void 0 : nodeToRemove.remove();
|
|
245
|
+
selectedOption.onSelect(matchingString);
|
|
246
|
+
closeMenu();
|
|
247
|
+
});
|
|
248
|
+
}, [editor]);
|
|
249
|
+
return (React.createElement(React.Fragment, null,
|
|
250
|
+
modal,
|
|
251
|
+
React.createElement(LexicalTypeaheadMenuPlugin_1.LexicalTypeaheadMenuPlugin, { menuRenderFn: function (anchorElementRef, _a) {
|
|
252
|
+
var selectOptionAndCleanUp = _a.selectOptionAndCleanUp, selectedIndex = _a.selectedIndex, setHighlightedIndex = _a.setHighlightedIndex;
|
|
253
|
+
return anchorElementRef.current && options.length > 0
|
|
254
|
+
? ReactDOM.createPortal(React.createElement("div", { className: 'typeahead-popover component-picker-menu' },
|
|
255
|
+
React.createElement("ul", null, options.map(function (option, i) { return (React.createElement(ComponentPickerMenuItem, { key: option.key, index: i, isSelected: selectedIndex === i, onClick: function () {
|
|
256
|
+
setHighlightedIndex(i);
|
|
257
|
+
selectOptionAndCleanUp(option);
|
|
258
|
+
}, onMouseEnter: function () {
|
|
259
|
+
setHighlightedIndex(i);
|
|
260
|
+
}, option: option })); }))), anchorElementRef.current)
|
|
261
|
+
: null;
|
|
262
|
+
}, onQueryChange: setQueryString, onSelectOption: onSelectOption, options: options, triggerFn: checkForTriggerMatch })));
|
|
263
|
+
}
|
|
264
|
+
//# sourceMappingURL=index.js.map
|