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,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = ExcalidrawImage;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var excalidraw_1 = require("@excalidraw/excalidraw");
|
|
6
|
+
var React = tslib_1.__importStar(require("react"));
|
|
7
|
+
var react_1 = require("react");
|
|
8
|
+
// exportToSvg has fonts from excalidraw.com
|
|
9
|
+
// We don't want them to be used in open source
|
|
10
|
+
var removeStyleFromSvg_HACK = function (svg) {
|
|
11
|
+
var _a;
|
|
12
|
+
var styleTag = (_a = svg === null || svg === void 0 ? void 0 : svg.firstElementChild) === null || _a === void 0 ? void 0 : _a.firstElementChild;
|
|
13
|
+
// Generated SVG is getting double-sized by height and width attributes
|
|
14
|
+
// We want to match the real size of the SVG element
|
|
15
|
+
var viewBox = svg.getAttribute('viewBox');
|
|
16
|
+
if (viewBox != null) {
|
|
17
|
+
var viewBoxDimensions = viewBox.split(' ');
|
|
18
|
+
svg.setAttribute('width', viewBoxDimensions[2]);
|
|
19
|
+
svg.setAttribute('height', viewBoxDimensions[3]);
|
|
20
|
+
}
|
|
21
|
+
if (styleTag && styleTag.tagName === 'style') {
|
|
22
|
+
styleTag.remove();
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* @explorer-desc
|
|
27
|
+
* A component for rendering Excalidraw elements as a static image
|
|
28
|
+
*/
|
|
29
|
+
function ExcalidrawImage(_a) {
|
|
30
|
+
var _this = this;
|
|
31
|
+
var _b;
|
|
32
|
+
var appState = _a.appState, elements = _a.elements, files = _a.files, imageContainerRef = _a.imageContainerRef, _c = _a.rootClassName, rootClassName = _c === void 0 ? null : _c;
|
|
33
|
+
var _d = (0, react_1.useState)(null), Svg = _d[0], setSvg = _d[1];
|
|
34
|
+
(0, react_1.useEffect)(function () {
|
|
35
|
+
var setContent = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
36
|
+
var svg;
|
|
37
|
+
return tslib_1.__generator(this, function (_a) {
|
|
38
|
+
switch (_a.label) {
|
|
39
|
+
case 0: return [4 /*yield*/, (0, excalidraw_1.exportToSvg)({
|
|
40
|
+
appState: appState,
|
|
41
|
+
elements: elements,
|
|
42
|
+
files: files,
|
|
43
|
+
})];
|
|
44
|
+
case 1:
|
|
45
|
+
svg = _a.sent();
|
|
46
|
+
removeStyleFromSvg_HACK(svg);
|
|
47
|
+
svg.setAttribute('width', '100%');
|
|
48
|
+
svg.setAttribute('height', '100%');
|
|
49
|
+
svg.setAttribute('display', 'block');
|
|
50
|
+
setSvg(svg);
|
|
51
|
+
return [2 /*return*/];
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}); };
|
|
55
|
+
setContent();
|
|
56
|
+
}, [elements, files, appState]);
|
|
57
|
+
return (React.createElement("div", { ref: imageContainerRef, className: rootClassName !== null && rootClassName !== void 0 ? rootClassName : '', dangerouslySetInnerHTML: { __html: (_b = Svg === null || Svg === void 0 ? void 0 : Svg.outerHTML) !== null && _b !== void 0 ? _b : '' } }));
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=ExcalidrawImage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExcalidrawImage.js","sourceRoot":"","sources":["../../../../../../src/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawImage.tsx"],"names":[],"mappings":";;AA0EA,kCAkCC;;AA5GD,qDAAoD;AAGpD,mDAA8B;AAC9B,+BAA2C;AA+C3C,4CAA4C;AAC5C,+CAA+C;AAC/C,IAAM,uBAAuB,GAAG,UAAC,GAAe;;IAC9C,IAAM,QAAQ,GAAG,MAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,iBAAiB,0CAAE,iBAAiB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CAAC,GAAG,CAAC,CAAA;;;;aACZ,CAAA;QACD,UAAU,EAAE,CAAA;IACd,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAA;IAE/B,OAAO,CACL,6BACE,GAAG,EAAE,iBAAiB,EACtB,SAAS,EAAE,aAAa,aAAb,aAAa,cAAb,aAAa,GAAI,EAAE,EAC9B,uBAAuB,EAAE,EAAE,MAAM,EAAE,MAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,SAAS,mCAAI,EAAE,EAAE,GACzD,CACH,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { AppState, BinaryFiles, ExcalidrawImperativeAPI } from '@excalidraw/excalidraw/types/types';
|
|
2
|
+
import { ReactPortal } from 'react';
|
|
3
|
+
export type ExcalidrawElementFragment = {
|
|
4
|
+
isDeleted?: boolean;
|
|
5
|
+
};
|
|
6
|
+
type Props = {
|
|
7
|
+
closeOnClickOutside?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* The initial set of elements to draw into the scene
|
|
10
|
+
*/
|
|
11
|
+
initialElements: ReadonlyArray<ExcalidrawElementFragment>;
|
|
12
|
+
/**
|
|
13
|
+
* The initial set of elements to draw into the scene
|
|
14
|
+
*/
|
|
15
|
+
initialAppState: AppState;
|
|
16
|
+
/**
|
|
17
|
+
* The initial set of elements to draw into the scene
|
|
18
|
+
*/
|
|
19
|
+
initialFiles: BinaryFiles;
|
|
20
|
+
/**
|
|
21
|
+
* Controls the visibility of the modal
|
|
22
|
+
*/
|
|
23
|
+
isShown?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Callback when closing and discarding the new changes
|
|
26
|
+
*/
|
|
27
|
+
onClose(): void;
|
|
28
|
+
/**
|
|
29
|
+
* Completely remove Excalidraw component
|
|
30
|
+
*/
|
|
31
|
+
onDelete(): void;
|
|
32
|
+
/**
|
|
33
|
+
* Callback when the save button is clicked
|
|
34
|
+
*/
|
|
35
|
+
onSave(elements: ReadonlyArray<ExcalidrawElementFragment>, appState: Partial<AppState>, files: BinaryFiles): void;
|
|
36
|
+
};
|
|
37
|
+
export declare const useCallbackRefState: () => readonly [ExcalidrawImperativeAPI | null, (value: ExcalidrawImperativeAPI | null) => void];
|
|
38
|
+
/**
|
|
39
|
+
* @explorer-desc
|
|
40
|
+
* A component which renders a modal with Excalidraw (a painting app)
|
|
41
|
+
* which can be used to export an editable image
|
|
42
|
+
*/
|
|
43
|
+
export default function ExcalidrawModal({ closeOnClickOutside, initialAppState, initialElements, initialFiles, isShown, onClose, onDelete, onSave, }: Props): ReactPortal | null;
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useCallbackRefState = void 0;
|
|
4
|
+
exports.default = ExcalidrawModal;
|
|
5
|
+
var tslib_1 = require("tslib");
|
|
6
|
+
var excalidraw_1 = require("@excalidraw/excalidraw");
|
|
7
|
+
var React = tslib_1.__importStar(require("react"));
|
|
8
|
+
var react_1 = require("react");
|
|
9
|
+
var react_dom_1 = require("react-dom");
|
|
10
|
+
var Button_1 = tslib_1.__importDefault(require("../../ui/Button"));
|
|
11
|
+
var Modal_1 = tslib_1.__importDefault(require("../../ui/Modal"));
|
|
12
|
+
var useCallbackRefState = function () {
|
|
13
|
+
var _a = React.useState(null), refValue = _a[0], setRefValue = _a[1];
|
|
14
|
+
var refCallback = React.useCallback(function (value) { return setRefValue(value); }, []);
|
|
15
|
+
return [refValue, refCallback];
|
|
16
|
+
};
|
|
17
|
+
exports.useCallbackRefState = useCallbackRefState;
|
|
18
|
+
/**
|
|
19
|
+
* @explorer-desc
|
|
20
|
+
* A component which renders a modal with Excalidraw (a painting app)
|
|
21
|
+
* which can be used to export an editable image
|
|
22
|
+
*/
|
|
23
|
+
function ExcalidrawModal(_a) {
|
|
24
|
+
var _b = _a.closeOnClickOutside, closeOnClickOutside = _b === void 0 ? false : _b, initialAppState = _a.initialAppState, initialElements = _a.initialElements, initialFiles = _a.initialFiles, _c = _a.isShown, isShown = _c === void 0 ? false : _c, onClose = _a.onClose, onDelete = _a.onDelete, onSave = _a.onSave;
|
|
25
|
+
var excaliDrawModelRef = (0, react_1.useRef)(null);
|
|
26
|
+
var _d = (0, exports.useCallbackRefState)(), excalidrawAPI = _d[0], excalidrawAPIRefCallback = _d[1];
|
|
27
|
+
var _e = (0, react_1.useState)(false), discardModalOpen = _e[0], setDiscardModalOpen = _e[1];
|
|
28
|
+
var _f = (0, react_1.useState)(initialElements), elements = _f[0], setElements = _f[1];
|
|
29
|
+
var _g = (0, react_1.useState)(initialFiles), files = _g[0], setFiles = _g[1];
|
|
30
|
+
(0, react_1.useEffect)(function () {
|
|
31
|
+
if (excaliDrawModelRef.current !== null) {
|
|
32
|
+
excaliDrawModelRef.current.focus();
|
|
33
|
+
}
|
|
34
|
+
}, []);
|
|
35
|
+
(0, react_1.useEffect)(function () {
|
|
36
|
+
var _a;
|
|
37
|
+
var modalOverlayElement = null;
|
|
38
|
+
var clickOutsideHandler = function (event) {
|
|
39
|
+
var target = event.target;
|
|
40
|
+
if (excaliDrawModelRef.current !== null &&
|
|
41
|
+
!excaliDrawModelRef.current.contains(target) &&
|
|
42
|
+
closeOnClickOutside) {
|
|
43
|
+
onDelete();
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
if (excaliDrawModelRef.current !== null) {
|
|
47
|
+
modalOverlayElement = (_a = excaliDrawModelRef.current) === null || _a === void 0 ? void 0 : _a.parentElement;
|
|
48
|
+
if (modalOverlayElement !== null) {
|
|
49
|
+
modalOverlayElement === null || modalOverlayElement === void 0 ? void 0 : modalOverlayElement.addEventListener('click', clickOutsideHandler);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return function () {
|
|
53
|
+
if (modalOverlayElement !== null) {
|
|
54
|
+
modalOverlayElement === null || modalOverlayElement === void 0 ? void 0 : modalOverlayElement.removeEventListener('click', clickOutsideHandler);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
}, [closeOnClickOutside, onDelete]);
|
|
58
|
+
(0, react_1.useLayoutEffect)(function () {
|
|
59
|
+
var currentModalRef = excaliDrawModelRef.current;
|
|
60
|
+
var onKeyDown = function (event) {
|
|
61
|
+
if (event.key === 'Escape') {
|
|
62
|
+
onDelete();
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
if (currentModalRef !== null) {
|
|
66
|
+
currentModalRef.addEventListener('keydown', onKeyDown);
|
|
67
|
+
}
|
|
68
|
+
return function () {
|
|
69
|
+
if (currentModalRef !== null) {
|
|
70
|
+
currentModalRef.removeEventListener('keydown', onKeyDown);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
}, [elements, files, onDelete]);
|
|
74
|
+
var save = function () {
|
|
75
|
+
if (elements.filter(function (el) { return !el.isDeleted; }).length > 0) {
|
|
76
|
+
var appState = excalidrawAPI === null || excalidrawAPI === void 0 ? void 0 : excalidrawAPI.getAppState();
|
|
77
|
+
// We only need a subset of the state
|
|
78
|
+
var partialState = {
|
|
79
|
+
exportBackground: appState === null || appState === void 0 ? void 0 : appState.exportBackground,
|
|
80
|
+
exportScale: appState === null || appState === void 0 ? void 0 : appState.exportScale,
|
|
81
|
+
exportWithDarkMode: (appState === null || appState === void 0 ? void 0 : appState.theme) === 'dark',
|
|
82
|
+
isBindingEnabled: appState === null || appState === void 0 ? void 0 : appState.isBindingEnabled,
|
|
83
|
+
isLoading: appState === null || appState === void 0 ? void 0 : appState.isLoading,
|
|
84
|
+
name: appState === null || appState === void 0 ? void 0 : appState.name,
|
|
85
|
+
theme: appState === null || appState === void 0 ? void 0 : appState.theme,
|
|
86
|
+
viewBackgroundColor: appState === null || appState === void 0 ? void 0 : appState.viewBackgroundColor,
|
|
87
|
+
viewModeEnabled: appState === null || appState === void 0 ? void 0 : appState.viewModeEnabled,
|
|
88
|
+
zenModeEnabled: appState === null || appState === void 0 ? void 0 : appState.zenModeEnabled,
|
|
89
|
+
zoom: appState === null || appState === void 0 ? void 0 : appState.zoom,
|
|
90
|
+
};
|
|
91
|
+
onSave(elements, partialState, files);
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
// delete node if the scene is clear
|
|
95
|
+
onDelete();
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
var discard = function () {
|
|
99
|
+
if (elements.filter(function (el) { return !el.isDeleted; }).length === 0) {
|
|
100
|
+
// delete node if the scene is clear
|
|
101
|
+
onDelete();
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
// Otherwise, show confirmation dialog before closing
|
|
105
|
+
setDiscardModalOpen(true);
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
function ShowDiscardDialog() {
|
|
109
|
+
return (React.createElement(Modal_1.default, { closeOnClickOutside: false, onClose: function () {
|
|
110
|
+
setDiscardModalOpen(false);
|
|
111
|
+
}, title: 'Discard' },
|
|
112
|
+
"Are you sure you want to discard the changes?",
|
|
113
|
+
React.createElement("div", { className: 'ExcalidrawModal__discardModal' },
|
|
114
|
+
React.createElement(Button_1.default, { onClick: function () {
|
|
115
|
+
setDiscardModalOpen(false);
|
|
116
|
+
onClose();
|
|
117
|
+
} }, "Discard"),
|
|
118
|
+
' ',
|
|
119
|
+
React.createElement(Button_1.default, { onClick: function () {
|
|
120
|
+
setDiscardModalOpen(false);
|
|
121
|
+
} }, "Cancel"))));
|
|
122
|
+
}
|
|
123
|
+
if (isShown === false) {
|
|
124
|
+
return null;
|
|
125
|
+
}
|
|
126
|
+
var onChange = function (els, _, fls) {
|
|
127
|
+
setElements(els);
|
|
128
|
+
setFiles(fls);
|
|
129
|
+
};
|
|
130
|
+
return (0, react_dom_1.createPortal)(React.createElement("div", { className: 'ExcalidrawModal__overlay', role: 'dialog' },
|
|
131
|
+
React.createElement("div", { ref: excaliDrawModelRef, className: 'ExcalidrawModal__modal', tabIndex: -1 },
|
|
132
|
+
React.createElement("div", { className: 'ExcalidrawModal__row' },
|
|
133
|
+
discardModalOpen && React.createElement(ShowDiscardDialog, null),
|
|
134
|
+
React.createElement(excalidraw_1.Excalidraw, { excalidrawAPI: excalidrawAPIRefCallback, initialData: {
|
|
135
|
+
appState: initialAppState || { isLoading: false },
|
|
136
|
+
elements: initialElements,
|
|
137
|
+
files: initialFiles,
|
|
138
|
+
}, onChange: onChange }),
|
|
139
|
+
React.createElement("div", { className: 'ExcalidrawModal__actions' },
|
|
140
|
+
React.createElement("button", { className: 'action-button', onClick: discard, type: 'button' }, "Discard"),
|
|
141
|
+
React.createElement("button", { className: 'action-button', onClick: save, type: 'button' }, "Save"))))), document.body);
|
|
142
|
+
}
|
|
143
|
+
//# sourceMappingURL=ExcalidrawModal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExcalidrawModal.js","sourceRoot":"","sources":["../../../../../../src/components/TextEditorV2/nodes/ExcalidrawNode/ExcalidrawModal.tsx"],"names":[],"mappings":";;;AAwDA,kCA2KC;;AAnOD,qDAAmD;AAGnD,mDAA8B;AAC9B,+BAAiF;AACjF,uCAAwC;AACxC,mEAAoC;AACpC,iEAAkC;AAsC3B,IAAM,mBAAmB,GAAG;IAC3B,IAAA,KAA0B,KAAK,CAAC,QAAQ,CAAiC,IAAI,CAAC,EAA7E,QAAQ,QAAA,EAAE,WAAW,QAAwD,CAAA;IACpF,IAAM,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC,UAAC,KAAqC,IAAK,OAAA,WAAW,CAAC,KAAK,CAAC,EAAlB,CAAkB,EAAE,EAAE,CAAC,CAAA;IACxG,OAAO,CAAC,QAAQ,EAAE,WAAW,CAAU,CAAA;AACzC,CAAC,CAAA;AAJY,QAAA,mBAAmB,uBAI/B;AAED;;;;GAIG;AACH,SAAwB,eAAe,CAAC,EAShC;QARN,2BAA2B,EAA3B,mBAAmB,mBAAG,KAAK,KAAA,EAC3B,eAAe,qBAAA,EACf,eAAe,qBAAA,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,SAAS,EAAC,eAAe,EAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,QAAQ,cAExD;oBACT,gCAAQ,SAAS,EAAC,eAAe,EAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAC,QAAQ,WAErD,CACL,CACF,CACF,CACF,EACN,QAAQ,CAAC,IAAI,CACd,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { DOMConversionMap, DOMExportOutput, EditorConfig, LexicalEditor, LexicalNode, NodeKey, SerializedLexicalNode, Spread } from 'lexical';
|
|
2
|
+
import { DecoratorNode } from 'lexical';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
export type SerializedExcalidrawNode = Spread<{
|
|
5
|
+
data: string;
|
|
6
|
+
}, SerializedLexicalNode>;
|
|
7
|
+
export declare class ExcalidrawNode extends DecoratorNode<React.JSX.Element> {
|
|
8
|
+
__data: string;
|
|
9
|
+
static getType(): string;
|
|
10
|
+
static clone(node: ExcalidrawNode): ExcalidrawNode;
|
|
11
|
+
static importJSON(serializedNode: SerializedExcalidrawNode): ExcalidrawNode;
|
|
12
|
+
exportJSON(): SerializedExcalidrawNode;
|
|
13
|
+
constructor(data?: string, key?: NodeKey);
|
|
14
|
+
createDOM(config: EditorConfig): HTMLElement;
|
|
15
|
+
updateDOM(): false;
|
|
16
|
+
static importDOM(): DOMConversionMap<HTMLSpanElement> | null;
|
|
17
|
+
exportDOM(editor: LexicalEditor): DOMExportOutput;
|
|
18
|
+
setData(data: string): void;
|
|
19
|
+
decorate(): React.JSX.Element;
|
|
20
|
+
}
|
|
21
|
+
export declare function $createExcalidrawNode(): ExcalidrawNode;
|
|
22
|
+
export declare function $isExcalidrawNode(node: LexicalNode | null): node is ExcalidrawNode;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExcalidrawNode = void 0;
|
|
4
|
+
exports.$createExcalidrawNode = $createExcalidrawNode;
|
|
5
|
+
exports.$isExcalidrawNode = $isExcalidrawNode;
|
|
6
|
+
var tslib_1 = require("tslib");
|
|
7
|
+
var lexical_1 = require("lexical");
|
|
8
|
+
var React = tslib_1.__importStar(require("react"));
|
|
9
|
+
var react_1 = require("react");
|
|
10
|
+
var ExcalidrawComponent = React.lazy(
|
|
11
|
+
// @ts-ignore
|
|
12
|
+
function () { return Promise.resolve().then(function () { return tslib_1.__importStar(require('./ExcalidrawComponent')); }); });
|
|
13
|
+
function convertExcalidrawElement(domNode) {
|
|
14
|
+
var excalidrawData = domNode.getAttribute('data-lexical-excalidraw-json');
|
|
15
|
+
if (excalidrawData) {
|
|
16
|
+
var node = $createExcalidrawNode();
|
|
17
|
+
node.__data = excalidrawData;
|
|
18
|
+
return {
|
|
19
|
+
node: node,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
var ExcalidrawNode = /** @class */ (function (_super) {
|
|
25
|
+
tslib_1.__extends(ExcalidrawNode, _super);
|
|
26
|
+
function ExcalidrawNode(data, key) {
|
|
27
|
+
if (data === void 0) { data = '[]'; }
|
|
28
|
+
var _this = _super.call(this, key) || this;
|
|
29
|
+
_this.__data = data;
|
|
30
|
+
return _this;
|
|
31
|
+
}
|
|
32
|
+
ExcalidrawNode.getType = function () {
|
|
33
|
+
return 'excalidraw';
|
|
34
|
+
};
|
|
35
|
+
ExcalidrawNode.clone = function (node) {
|
|
36
|
+
return new ExcalidrawNode(node.__data, node.__key);
|
|
37
|
+
};
|
|
38
|
+
ExcalidrawNode.importJSON = function (serializedNode) {
|
|
39
|
+
return new ExcalidrawNode(serializedNode.data);
|
|
40
|
+
};
|
|
41
|
+
ExcalidrawNode.prototype.exportJSON = function () {
|
|
42
|
+
return {
|
|
43
|
+
data: this.__data,
|
|
44
|
+
type: 'excalidraw',
|
|
45
|
+
version: 1,
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
// View
|
|
49
|
+
ExcalidrawNode.prototype.createDOM = function (config) {
|
|
50
|
+
var span = document.createElement('span');
|
|
51
|
+
var theme = config.theme;
|
|
52
|
+
var className = theme.image;
|
|
53
|
+
if (className !== undefined) {
|
|
54
|
+
span.className = className;
|
|
55
|
+
}
|
|
56
|
+
return span;
|
|
57
|
+
};
|
|
58
|
+
ExcalidrawNode.prototype.updateDOM = function () {
|
|
59
|
+
return false;
|
|
60
|
+
};
|
|
61
|
+
ExcalidrawNode.importDOM = function () {
|
|
62
|
+
return {
|
|
63
|
+
span: function (domNode) {
|
|
64
|
+
if (!domNode.hasAttribute('data-lexical-excalidraw-json')) {
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
conversion: convertExcalidrawElement,
|
|
69
|
+
priority: 1,
|
|
70
|
+
};
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
ExcalidrawNode.prototype.exportDOM = function (editor) {
|
|
75
|
+
var element = document.createElement('span');
|
|
76
|
+
var content = editor.getElementByKey(this.getKey());
|
|
77
|
+
if (content !== null) {
|
|
78
|
+
var svg = content.querySelector('svg');
|
|
79
|
+
if (svg !== null) {
|
|
80
|
+
element.innerHTML = svg.outerHTML;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
element.setAttribute('data-lexical-excalidraw-json', this.__data);
|
|
84
|
+
return { element: element };
|
|
85
|
+
};
|
|
86
|
+
ExcalidrawNode.prototype.setData = function (data) {
|
|
87
|
+
var self = this.getWritable();
|
|
88
|
+
self.__data = data;
|
|
89
|
+
};
|
|
90
|
+
ExcalidrawNode.prototype.decorate = function () {
|
|
91
|
+
return (React.createElement(react_1.Suspense, { fallback: null },
|
|
92
|
+
React.createElement(ExcalidrawComponent, { data: this.__data, nodeKey: this.getKey() })));
|
|
93
|
+
};
|
|
94
|
+
return ExcalidrawNode;
|
|
95
|
+
}(lexical_1.DecoratorNode));
|
|
96
|
+
exports.ExcalidrawNode = ExcalidrawNode;
|
|
97
|
+
function $createExcalidrawNode() {
|
|
98
|
+
return new ExcalidrawNode();
|
|
99
|
+
}
|
|
100
|
+
function $isExcalidrawNode(node) {
|
|
101
|
+
return node instanceof ExcalidrawNode;
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/TextEditorV2/nodes/ExcalidrawNode/index.tsx"],"names":[],"mappings":";;;AA2HA,sDAEC;AAED,8CAEC;;AAtHD,mCAAuC;AACvC,mDAA8B;AAC9B,+BAAgC;AAEhC,IAAM,mBAAmB,GAAG,KAAK,CAAC,IAAI;AACpC,aAAa;AACb,cAAM,gFAAO,uBAAuB,QAA9B,CAA+B,CACtC,CAAA;AASD,SAAS,wBAAwB,CAAC,OAAoB;IACpD,IAAM,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC,8BAA8B,CAAC,CAAA;IAC3E,IAAI,cAAc,EAAE,CAAC;QACnB,IAAM,IAAI,GAAG,qBAAqB,EAAE,CAAA;QACpC,IAAI,CAAC,MAAM,GAAG,cAAc,CAAA;QAC5B,OAAO;YACL,IAAI,MAAA;SACL,CAAA;IACH,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC;AAED;IAAoC,0CAAgC;IAuBlE,wBAAY,IAAW,EAAE,GAAa;QAA1B,qBAAA,EAAA,WAAW;QACrB,YAAA,MAAK,YAAC,GAAG,CAAC,SAAA;QACV,KAAI,CAAC,MAAM,GAAG,IAAI,CAAA;;IACpB,CAAC;IAvBa,sBAAO,GAArB;QACE,OAAO,YAAY,CAAA;IACrB,CAAC;IAEa,oBAAK,GAAnB,UAAoB,IAAoB;QACtC,OAAO,IAAI,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,CAAA;IACpD,CAAC;IAEa,yBAAU,GAAxB,UAAyB,cAAwC;QAC/D,OAAO,IAAI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AS,GAAG,GAAG,CAAC,SAAS,CAAA;YACnC,CAAC;QACH,CAAC;QACD,OAAO,CAAC,YAAY,CAAC,8BAA8B,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;QACjE,OAAO,EAAE,OAAO,SAAA,EAAE,CAAA;IACpB,CAAC;IAEM,gCAAO,GAAd,UAAe,IAAY;QACzB,IAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAA;QAC/B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAA;IACpB,CAAC;IAEM,iCAAQ,GAAf;QACE,OAAO,CACL,oBAAC,gBAAQ,IAAC,QAAQ,EAAE,IAAI;YACtB,oBAAC,mBAAmB,IAAC,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE,GAAI,CACzD,CACZ,CAAA;IACH,CAAC;IACH,qBAAC;AAAD,CAAC,AAlFD,CAAoC,uBAAa,GAkFhD;AAlFY,wCAAc;AAoF3B,SAAgB,qBAAqB;IACnC,OAAO,IAAI,cAAc,EAAE,CAAA;AAC7B,CAAC;AAED,SAAgB,iBAAiB,CAAC,IAAwB;IACxD,OAAO,IAAI,YAAY,cAAc,CAAA;AACvC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { NodeKey, TextNode, LexicalNode } from 'lexical';
|
|
2
|
+
export declare class ExtendedTextNode extends TextNode {
|
|
3
|
+
constructor(text: string, key?: NodeKey);
|
|
4
|
+
private static getType;
|
|
5
|
+
private static clone;
|
|
6
|
+
private static importDOM;
|
|
7
|
+
private static importJSON;
|
|
8
|
+
private isSimpleText;
|
|
9
|
+
private exportJSON;
|
|
10
|
+
}
|
|
11
|
+
export declare function $createExtendedTextNode(text: string): ExtendedTextNode;
|
|
12
|
+
export declare function $isExtendedTextNode(node: LexicalNode | null | undefined): node is ExtendedTextNode;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExtendedTextNode = void 0;
|
|
4
|
+
exports.$createExtendedTextNode = $createExtendedTextNode;
|
|
5
|
+
exports.$isExtendedTextNode = $isExtendedTextNode;
|
|
6
|
+
var tslib_1 = require("tslib");
|
|
7
|
+
var lexical_1 = require("lexical");
|
|
8
|
+
// @ts-ignore
|
|
9
|
+
var ExtendedTextNode = /** @class */ (function (_super) {
|
|
10
|
+
tslib_1.__extends(ExtendedTextNode, _super);
|
|
11
|
+
function ExtendedTextNode(text, key) {
|
|
12
|
+
return _super.call(this, text, key) || this;
|
|
13
|
+
}
|
|
14
|
+
// @ts-ignore
|
|
15
|
+
ExtendedTextNode.getType = function () {
|
|
16
|
+
return 'extended-text';
|
|
17
|
+
};
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
ExtendedTextNode.clone = function (node) {
|
|
20
|
+
return new ExtendedTextNode(node.__text, node.__key);
|
|
21
|
+
};
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
ExtendedTextNode.importDOM = function () {
|
|
24
|
+
var importers = lexical_1.TextNode.importDOM();
|
|
25
|
+
return tslib_1.__assign(tslib_1.__assign({}, importers), { code: function () { return ({
|
|
26
|
+
conversion: patchStyleConversion(importers === null || importers === void 0 ? void 0 : importers.code),
|
|
27
|
+
priority: 1,
|
|
28
|
+
}); }, em: function () { return ({
|
|
29
|
+
conversion: patchStyleConversion(importers === null || importers === void 0 ? void 0 : importers.em),
|
|
30
|
+
priority: 1,
|
|
31
|
+
}); }, span: function () { return ({
|
|
32
|
+
conversion: patchStyleConversion(importers === null || importers === void 0 ? void 0 : importers.span),
|
|
33
|
+
priority: 1,
|
|
34
|
+
}); }, strong: function () { return ({
|
|
35
|
+
conversion: patchStyleConversion(importers === null || importers === void 0 ? void 0 : importers.strong),
|
|
36
|
+
priority: 1,
|
|
37
|
+
}); }, sub: function () { return ({
|
|
38
|
+
conversion: patchStyleConversion(importers === null || importers === void 0 ? void 0 : importers.sub),
|
|
39
|
+
priority: 1,
|
|
40
|
+
}); }, sup: function () { return ({
|
|
41
|
+
conversion: patchStyleConversion(importers === null || importers === void 0 ? void 0 : importers.sup),
|
|
42
|
+
priority: 1,
|
|
43
|
+
}); } });
|
|
44
|
+
};
|
|
45
|
+
// @ts-ignore
|
|
46
|
+
ExtendedTextNode.importJSON = function (serializedNode) {
|
|
47
|
+
return lexical_1.TextNode.importJSON(serializedNode);
|
|
48
|
+
};
|
|
49
|
+
// @ts-ignore
|
|
50
|
+
ExtendedTextNode.prototype.isSimpleText = function () {
|
|
51
|
+
return this.__type === 'extended-text' && this.__mode === 0;
|
|
52
|
+
};
|
|
53
|
+
// @ts-ignore
|
|
54
|
+
ExtendedTextNode.prototype.exportJSON = function () {
|
|
55
|
+
return tslib_1.__assign(tslib_1.__assign({}, _super.prototype.exportJSON.call(this)), { type: 'extended-text', version: 1 });
|
|
56
|
+
};
|
|
57
|
+
return ExtendedTextNode;
|
|
58
|
+
}(lexical_1.TextNode));
|
|
59
|
+
exports.ExtendedTextNode = ExtendedTextNode;
|
|
60
|
+
function $createExtendedTextNode(text) {
|
|
61
|
+
// @ts-ignore
|
|
62
|
+
return (0, lexical_1.$applyNodeReplacement)(new ExtendedTextNode(text));
|
|
63
|
+
}
|
|
64
|
+
function $isExtendedTextNode(node) {
|
|
65
|
+
return node instanceof ExtendedTextNode;
|
|
66
|
+
}
|
|
67
|
+
function patchStyleConversion(originalDOMConverter) {
|
|
68
|
+
return function (node) {
|
|
69
|
+
var original = originalDOMConverter === null || originalDOMConverter === void 0 ? void 0 : originalDOMConverter(node);
|
|
70
|
+
if (!original) {
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
var originalOutput = original.conversion(node);
|
|
74
|
+
if (!originalOutput) {
|
|
75
|
+
return originalOutput;
|
|
76
|
+
}
|
|
77
|
+
var backgroundColor = node.style.backgroundColor;
|
|
78
|
+
var color = node.style.color;
|
|
79
|
+
var fontFamily = node.style.fontFamily;
|
|
80
|
+
var fontWeight = node.style.fontWeight;
|
|
81
|
+
var fontSize = node.style.fontSize;
|
|
82
|
+
var textDecoration = node.style.textDecoration;
|
|
83
|
+
return tslib_1.__assign(tslib_1.__assign({}, originalOutput), { forChild: function (lexicalNode, parent) {
|
|
84
|
+
var _a;
|
|
85
|
+
var originalForChild = (_a = originalOutput === null || originalOutput === void 0 ? void 0 : originalOutput.forChild) !== null && _a !== void 0 ? _a : (function (x) { return x; });
|
|
86
|
+
var result = originalForChild(lexicalNode, parent);
|
|
87
|
+
if ((0, lexical_1.$isTextNode)(result)) {
|
|
88
|
+
var style = [
|
|
89
|
+
backgroundColor ? "background-color: ".concat(backgroundColor) : null,
|
|
90
|
+
color ? "color: ".concat(color) : null,
|
|
91
|
+
fontFamily ? "font-family: ".concat(fontFamily) : null,
|
|
92
|
+
fontWeight ? "font-weight: ".concat(fontWeight) : null,
|
|
93
|
+
fontSize ? "font-size: ".concat(fontSize) : null,
|
|
94
|
+
textDecoration ? "text-decoration: ".concat(textDecoration) : null,
|
|
95
|
+
]
|
|
96
|
+
.filter(function (value) { return value != null; })
|
|
97
|
+
.join('; ');
|
|
98
|
+
if (style.length > 0) {
|
|
99
|
+
return result.setStyle(style);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return result;
|
|
103
|
+
} });
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=ExtendedTextNode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExtendedTextNode.js","sourceRoot":"","sources":["../../../../../src/components/TextEditorV2/nodes/ExtendedTextNode.tsx"],"names":[],"mappings":";;;AA4EA,0DAGC;AAED,kDAKC;;AAtFD,mCAUgB;AAEhB,aAAa;AACb;IAAsC,4CAAQ;IAC5C,0BAAY,IAAY,EAAE,GAAa;QACrC,OAAA,MAAK,YAAC,IAAI,EAAE,GAAG,CAAC,SAAA;IAClB,CAAC;IAED,aAAa;IACE,wBAAO,GAAtB;QACE,OAAO,eAAe,CAA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Q,CAAC,KAAK,CAAC,CAAA;oBAC/B,CAAC;gBACH,CAAC;gBACD,OAAO,MAAM,CAAA;YACf,CAAC,IACF;IACH,CAAC,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DecoratorBlockNode, SerializedDecoratorBlockNode } from '@lexical/react/LexicalDecoratorBlockNode';
|
|
2
|
+
import type { EditorConfig, ElementFormatType, LexicalEditor, LexicalNode, NodeKey, Spread } from 'lexical';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
export type SerializedFigmaNode = Spread<{
|
|
5
|
+
documentID: string;
|
|
6
|
+
}, SerializedDecoratorBlockNode>;
|
|
7
|
+
export declare class FigmaNode extends DecoratorBlockNode {
|
|
8
|
+
__id: string;
|
|
9
|
+
static getType(): string;
|
|
10
|
+
static clone(node: FigmaNode): FigmaNode;
|
|
11
|
+
static importJSON(serializedNode: SerializedFigmaNode): FigmaNode;
|
|
12
|
+
exportJSON(): SerializedFigmaNode;
|
|
13
|
+
constructor(id: string, format?: ElementFormatType, key?: NodeKey);
|
|
14
|
+
updateDOM(): false;
|
|
15
|
+
getTextContent(_includeInert?: boolean | undefined, _includeDirectionless?: false | undefined): string;
|
|
16
|
+
decorate(_editor: LexicalEditor, config: EditorConfig): React.JSX.Element;
|
|
17
|
+
}
|
|
18
|
+
export declare function $createFigmaNode(documentID: string): FigmaNode;
|
|
19
|
+
export declare function $isFigmaNode(node: FigmaNode | LexicalNode | null | undefined): node is FigmaNode;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FigmaNode = void 0;
|
|
4
|
+
exports.$createFigmaNode = $createFigmaNode;
|
|
5
|
+
exports.$isFigmaNode = $isFigmaNode;
|
|
6
|
+
var tslib_1 = require("tslib");
|
|
7
|
+
var LexicalBlockWithAlignableContents_1 = require("@lexical/react/LexicalBlockWithAlignableContents");
|
|
8
|
+
var LexicalDecoratorBlockNode_1 = require("@lexical/react/LexicalDecoratorBlockNode");
|
|
9
|
+
var React = tslib_1.__importStar(require("react"));
|
|
10
|
+
function FigmaComponent(_a) {
|
|
11
|
+
var className = _a.className, documentID = _a.documentID, format = _a.format, nodeKey = _a.nodeKey;
|
|
12
|
+
return (React.createElement(LexicalBlockWithAlignableContents_1.BlockWithAlignableContents, { className: className, format: format, nodeKey: nodeKey },
|
|
13
|
+
React.createElement("iframe", { allowFullScreen: true, height: '315', src: "https://www.figma.com/embed?embed_host=lexical&url= https://www.figma.com/file/".concat(documentID), width: '560' })));
|
|
14
|
+
}
|
|
15
|
+
var FigmaNode = /** @class */ (function (_super) {
|
|
16
|
+
tslib_1.__extends(FigmaNode, _super);
|
|
17
|
+
function FigmaNode(id, format, key) {
|
|
18
|
+
var _this = _super.call(this, format, key) || this;
|
|
19
|
+
_this.__id = id;
|
|
20
|
+
return _this;
|
|
21
|
+
}
|
|
22
|
+
FigmaNode.getType = function () {
|
|
23
|
+
return 'figma';
|
|
24
|
+
};
|
|
25
|
+
FigmaNode.clone = function (node) {
|
|
26
|
+
return new FigmaNode(node.__id, node.__format, node.__key);
|
|
27
|
+
};
|
|
28
|
+
FigmaNode.importJSON = function (serializedNode) {
|
|
29
|
+
var node = $createFigmaNode(serializedNode.documentID);
|
|
30
|
+
node.setFormat(serializedNode.format);
|
|
31
|
+
return node;
|
|
32
|
+
};
|
|
33
|
+
FigmaNode.prototype.exportJSON = function () {
|
|
34
|
+
return tslib_1.__assign(tslib_1.__assign({}, _super.prototype.exportJSON.call(this)), { documentID: this.__id, type: 'figma', version: 1 });
|
|
35
|
+
};
|
|
36
|
+
FigmaNode.prototype.updateDOM = function () {
|
|
37
|
+
return false;
|
|
38
|
+
};
|
|
39
|
+
FigmaNode.prototype.getTextContent = function (
|
|
40
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
41
|
+
_includeInert,
|
|
42
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
43
|
+
_includeDirectionless) {
|
|
44
|
+
return "https://www.figma.com/file/".concat(this.__id);
|
|
45
|
+
};
|
|
46
|
+
FigmaNode.prototype.decorate = function (_editor, config) {
|
|
47
|
+
var embedBlockTheme = config.theme.embedBlock || {};
|
|
48
|
+
var className = {
|
|
49
|
+
base: embedBlockTheme.base || '',
|
|
50
|
+
focus: embedBlockTheme.focus || '',
|
|
51
|
+
};
|
|
52
|
+
return (React.createElement(FigmaComponent, { className: className, documentID: this.__id, format: this.__format, nodeKey: this.getKey() }));
|
|
53
|
+
};
|
|
54
|
+
return FigmaNode;
|
|
55
|
+
}(LexicalDecoratorBlockNode_1.DecoratorBlockNode));
|
|
56
|
+
exports.FigmaNode = FigmaNode;
|
|
57
|
+
function $createFigmaNode(documentID) {
|
|
58
|
+
return new FigmaNode(documentID);
|
|
59
|
+
}
|
|
60
|
+
function $isFigmaNode(node) {
|
|
61
|
+
return node instanceof FigmaNode;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=FigmaNode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FigmaNode.js","sourceRoot":"","sources":["../../../../../src/components/TextEditorV2/nodes/FigmaNode.tsx"],"names":[],"mappings":";;;AA4FA,4CAEC;AAED,oCAEC;;AAlGD,sGAA6F;AAC7F,sFAA2G;AAE3G,mDAA8B;AAY9B,SAAS,cAAc,CAAC,EAA+D;QAA7D,SAAS,eAAA,EAAE,UAAU,gBAAA,EAAE,MAAM,YAAA,EAAE,OAAO,aAAA;IAC9D,OAAO,CACL,oBAAC,8DAA0B,IAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;QAChF,gCACE,eAAe,QACf,MAAM,EAAC,KAAK,EACZ,GAAG,EAAE,gGACwB,UAAU,CAAE,EACzC,KAAK,EAAC,KAAK,GACX,CACyB,CAC9B,CAAA;AACH,CAAC;AASD;IAA+B,qCAAkB;IA0B/C,mBAAY,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I,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE,GAAI,CAC/G,CAAA;IACH,CAAC;IACH,gBAAC;AAAD,CAAC,AAtDD,CAA+B,8CAAkB,GAsDhD;AAtDY,8BAAS;AAwDtB,SAAgB,gBAAgB,CAAC,UAAkB;IACjD,OAAO,IAAI,SAAS,CAAC,UAAU,CAAC,CAAA;AAClC,CAAC;AAED,SAAgB,YAAY,CAAC,IAAgD;IAC3E,OAAO,IAAI,YAAY,SAAS,CAAA;AAClC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { LexicalCommand, LexicalEditor, NodeKey } from 'lexical';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export declare const RIGHT_CLICK_IMAGE_COMMAND: LexicalCommand<MouseEvent>;
|
|
4
|
+
export default function ImageComponent({ altText, caption, height, maxWidth, nodeKey, resizable, showCaption, src, width, }: {
|
|
5
|
+
altText: string;
|
|
6
|
+
caption: LexicalEditor;
|
|
7
|
+
height: 'inherit' | number;
|
|
8
|
+
maxWidth: number;
|
|
9
|
+
nodeKey: NodeKey;
|
|
10
|
+
resizable: boolean;
|
|
11
|
+
showCaption: boolean;
|
|
12
|
+
src: string;
|
|
13
|
+
width: 'inherit' | number;
|
|
14
|
+
}): React.JSX.Element;
|