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,159 @@
|
|
|
1
|
+
import { __awaiter, __generator } from "tslib";
|
|
2
|
+
import React, { useState } from 'react';
|
|
3
|
+
import { PHXModal } from '../../../../Modal';
|
|
4
|
+
import { FormUpload } from '../../../../UploadFile/FormUpload';
|
|
5
|
+
import { INSERT_IMAGE_COMMAND } from '../../ImagesPlugin';
|
|
6
|
+
export default function UploadPdf(_a) {
|
|
7
|
+
var _this = this;
|
|
8
|
+
var apiCdnUpload = _a.apiCdnUpload, editor = _a.editor;
|
|
9
|
+
var _b = useState(false), openPdfModal = _b[0], setOpenPdfModal = _b[1];
|
|
10
|
+
var _c = useState(null), pdfFile = _c[0], setPdfFile = _c[1];
|
|
11
|
+
var _d = useState(false), loadingConvertPdf = _d[0], setLoadingConvertPdf = _d[1];
|
|
12
|
+
var uploadImageFunction = function (formData) { return __awaiter(_this, void 0, void 0, function () {
|
|
13
|
+
var response;
|
|
14
|
+
return __generator(this, function (_a) {
|
|
15
|
+
switch (_a.label) {
|
|
16
|
+
case 0: return [4 /*yield*/, fetch(apiCdnUpload, {
|
|
17
|
+
method: 'POST',
|
|
18
|
+
body: formData,
|
|
19
|
+
})];
|
|
20
|
+
case 1:
|
|
21
|
+
response = _a.sent();
|
|
22
|
+
if (response.ok) {
|
|
23
|
+
return [2 /*return*/, response.json()];
|
|
24
|
+
}
|
|
25
|
+
return [2 /*return*/];
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}); };
|
|
29
|
+
var uploadImage = function (file) { return __awaiter(_this, void 0, void 0, function () {
|
|
30
|
+
var formData, res, error_1;
|
|
31
|
+
return __generator(this, function (_a) {
|
|
32
|
+
switch (_a.label) {
|
|
33
|
+
case 0:
|
|
34
|
+
_a.trys.push([0, 2, , 3]);
|
|
35
|
+
formData = new FormData();
|
|
36
|
+
formData.append('file', file);
|
|
37
|
+
formData.append('projectId', 'phx-rich-text');
|
|
38
|
+
formData.append('moduleId', 'pdf');
|
|
39
|
+
return [4 /*yield*/, uploadImageFunction(formData)];
|
|
40
|
+
case 1:
|
|
41
|
+
res = _a.sent();
|
|
42
|
+
if (res) {
|
|
43
|
+
return [2 /*return*/, res.link];
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
return [2 /*return*/, null];
|
|
47
|
+
}
|
|
48
|
+
return [3 /*break*/, 3];
|
|
49
|
+
case 2:
|
|
50
|
+
error_1 = _a.sent();
|
|
51
|
+
console.error(error_1);
|
|
52
|
+
return [2 /*return*/, null];
|
|
53
|
+
case 3: return [2 /*return*/];
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
}); };
|
|
57
|
+
var handleConvertPdfToImage = function (file) { return __awaiter(_this, void 0, void 0, function () {
|
|
58
|
+
var PDFJS, fileURL, pdfDoc_1, numPages, uploadTasks, _loop_1, i, results, BATCH_SIZE, totalUploadTasks, i, batch, batchResults, sorted, _i, sorted_1, image;
|
|
59
|
+
var _this = this;
|
|
60
|
+
return __generator(this, function (_a) {
|
|
61
|
+
switch (_a.label) {
|
|
62
|
+
case 0:
|
|
63
|
+
setLoadingConvertPdf(true);
|
|
64
|
+
_a.label = 1;
|
|
65
|
+
case 1:
|
|
66
|
+
_a.trys.push([1, , 7, 8]);
|
|
67
|
+
PDFJS = window.pdfjsLib;
|
|
68
|
+
fileURL = URL.createObjectURL(file);
|
|
69
|
+
return [4 /*yield*/, PDFJS.getDocument({ url: fileURL }).promise];
|
|
70
|
+
case 2:
|
|
71
|
+
pdfDoc_1 = _a.sent();
|
|
72
|
+
numPages = pdfDoc_1.numPages;
|
|
73
|
+
uploadTasks = [];
|
|
74
|
+
_loop_1 = function (i) {
|
|
75
|
+
uploadTasks.push(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
76
|
+
var page, viewport, canvas, context, blob, fileName, imageFile, link;
|
|
77
|
+
return __generator(this, function (_a) {
|
|
78
|
+
switch (_a.label) {
|
|
79
|
+
case 0: return [4 /*yield*/, pdfDoc_1.getPage(i)];
|
|
80
|
+
case 1:
|
|
81
|
+
page = _a.sent();
|
|
82
|
+
viewport = page.getViewport({ scale: 2 });
|
|
83
|
+
canvas = document.createElement('canvas');
|
|
84
|
+
context = canvas.getContext('2d');
|
|
85
|
+
canvas.width = viewport.width;
|
|
86
|
+
canvas.height = viewport.height;
|
|
87
|
+
return [4 /*yield*/, page.render({ canvasContext: context, viewport: viewport }).promise];
|
|
88
|
+
case 2:
|
|
89
|
+
_a.sent();
|
|
90
|
+
return [4 /*yield*/, new Promise(function (resolve) { return canvas.toBlob(function (b) { return resolve(b); }, 'image/webp'); })];
|
|
91
|
+
case 3:
|
|
92
|
+
blob = _a.sent();
|
|
93
|
+
fileName = "".concat(file.name.replace(/\.[^/.]+$/, ''), "-page-").concat(i, ".webp");
|
|
94
|
+
imageFile = new File([blob], fileName, { type: 'image/webp' });
|
|
95
|
+
return [4 /*yield*/, uploadImage(imageFile)];
|
|
96
|
+
case 4:
|
|
97
|
+
link = _a.sent();
|
|
98
|
+
return [2 /*return*/, { index: i, link: link }];
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
}); });
|
|
102
|
+
};
|
|
103
|
+
for (i = 1; i <= numPages; i++) {
|
|
104
|
+
_loop_1(i);
|
|
105
|
+
}
|
|
106
|
+
results = [];
|
|
107
|
+
BATCH_SIZE = 5;
|
|
108
|
+
totalUploadTasks = uploadTasks.length;
|
|
109
|
+
i = 0;
|
|
110
|
+
_a.label = 3;
|
|
111
|
+
case 3:
|
|
112
|
+
if (!(i < totalUploadTasks)) return [3 /*break*/, 6];
|
|
113
|
+
batch = uploadTasks.slice(i, i + BATCH_SIZE);
|
|
114
|
+
return [4 /*yield*/, Promise.all(batch.map(function (fn) { return fn(); }))];
|
|
115
|
+
case 4:
|
|
116
|
+
batchResults = _a.sent();
|
|
117
|
+
results.push.apply(results, batchResults);
|
|
118
|
+
_a.label = 5;
|
|
119
|
+
case 5:
|
|
120
|
+
i += BATCH_SIZE;
|
|
121
|
+
return [3 /*break*/, 3];
|
|
122
|
+
case 6:
|
|
123
|
+
sorted = results.filter(function (r) { return r.link; }).sort(function (a, b) { return a.index - b.index; });
|
|
124
|
+
for (_i = 0, sorted_1 = sorted; _i < sorted_1.length; _i++) {
|
|
125
|
+
image = sorted_1[_i];
|
|
126
|
+
if (image.link) {
|
|
127
|
+
editor.dispatchCommand(INSERT_IMAGE_COMMAND, {
|
|
128
|
+
altText: 'photo',
|
|
129
|
+
showCaption: false,
|
|
130
|
+
src: image.link,
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
return [3 /*break*/, 8];
|
|
135
|
+
case 7:
|
|
136
|
+
setLoadingConvertPdf(false);
|
|
137
|
+
setOpenPdfModal(false);
|
|
138
|
+
setPdfFile(null);
|
|
139
|
+
return [7 /*endfinally*/];
|
|
140
|
+
case 8: return [2 /*return*/];
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
}); };
|
|
144
|
+
return (React.createElement(React.Fragment, null,
|
|
145
|
+
React.createElement(PHXModal, { disableSubmit: !pdfFile, show: openPdfModal, onHide: function () { return setOpenPdfModal(false); }, title: 'T\u1EA3i l\u00EAn t\u00E0i li\u1EC7u PDF', onPrimaryClick: function () {
|
|
146
|
+
if (pdfFile)
|
|
147
|
+
handleConvertPdfToImage(pdfFile);
|
|
148
|
+
}, primaryLoading: loadingConvertPdf },
|
|
149
|
+
React.createElement(FormUpload, { fileName: pdfFile === null || pdfFile === void 0 ? void 0 : pdfFile.name, fileType: 'pdf', helpText: 'PDF, t\u1ED1i \u0111a 20MB', isHorizontalLayout: true, handleFileChange: function (e) {
|
|
150
|
+
setPdfFile(e.target.files[0]);
|
|
151
|
+
} })),
|
|
152
|
+
React.createElement("div", { className: 'flex items-center gap-x-2' },
|
|
153
|
+
React.createElement("button", { type: 'button', "data-color-button": 'true', className: 'p-1 rounded-md duration-200 hover:bg-gray-200 cursor-pointer', onClick: function () { return setOpenPdfModal(true); } },
|
|
154
|
+
React.createElement("span", null,
|
|
155
|
+
React.createElement("svg", { width: '20', height: '20', viewBox: '0 0 20 20', fill: 'none', xmlns: 'http://www.w3.org/2000/svg' },
|
|
156
|
+
React.createElement("path", { fillRule: 'evenodd', clipRule: 'evenodd', d: 'M5.5 5.75C5.5 5.05964 6.05964 4.5 6.75 4.5H9.5V7.75C9.5 8.7165 10.2835 9.5 11.25 9.5H14.5V10.25C14.5 10.6642 14.8358 11 15.25 11C15.6642 11 16 10.6642 16 10.25V8.75C16 8.55109 15.921 8.36032 15.7803 8.21967L10.7803 3.21967C10.6397 3.07902 10.4489 3 10.25 3H6.75C5.23122 3 4 4.23122 4 5.75V14.25C4 15.7688 5.23122 17 6.75 17H10.5C10.9142 17 11.25 16.6642 11.25 16.25C11.25 15.8358 10.9142 15.5 10.5 15.5H6.75C6.05964 15.5 5.5 14.9404 5.5 14.25V5.75ZM13.4393 8L11 5.56066V7.75C11 7.88807 11.1119 8 11.25 8H13.4393Z', fill: '#4A4A4A' }),
|
|
157
|
+
React.createElement("path", { d: 'M15 14.3107V17.25C15 17.6642 14.6642 18 14.25 18C13.8358 18 13.5 17.6642 13.5 17.25V14.3107L12.7803 15.0303C12.4874 15.3232 12.0126 15.3232 11.7197 15.0303C11.4268 14.7374 11.4268 14.2626 11.7197 13.9697L13.7197 11.9697C14.0126 11.6768 14.4874 11.6768 14.7803 11.9697L16.7803 13.9697C17.0732 14.2626 17.0732 14.7374 16.7803 15.0303C16.4874 15.3232 16.0126 15.3232 15.7197 15.0303L15 14.3107Z', fill: '#4A4A4A' })))))));
|
|
158
|
+
}
|
|
159
|
+
//# sourceMappingURL=upload-pdf.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload-pdf.js","sourceRoot":"","sources":["../../../../../../../src/components/TextEditorV2/plugins/ToolbarPlugin/components/upload-pdf.tsx"],"names":[],"m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D,CACO;QACX,6BAAK,SAAS,EAAC,2BAA2B;YACxC,gCACE,IAAI,EAAC,QAAQ,uBACK,MAAM,EACxB,SAAS,EAAC,+DAA+D,EACzE,OAAO,EAAE,cAAM,OAAA,eAAe,CAAC,IAAI,CAAC,EAArB,CAAqB;gBAEpC;oBACE,6BAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B;wBAC5F,8BACE,QAAQ,EAAC,SAAS,EAClB,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,kgBAAkgB,EACpgB,IAAI,EAAC,SAAS,GACR;wBACR,8BACE,CAAC,EAAC,yYAAyY,EAC3Y,IAAI,EAAC,SAAS,GACR,CACJ,CACD,CACA,CACL,CACL,CACJ,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { $isCodeNode } from '@lexical/code';
|
|
2
|
+
import { $isLinkNode, TOGGLE_LINK_COMMAND } from '@lexical/link';
|
|
3
|
+
import { $isListNode, ListNode } from '@lexical/list';
|
|
4
|
+
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
5
|
+
import { $isHeadingNode } from '@lexical/rich-text';
|
|
6
|
+
import { $getSelectionStyleValueForProperty } from '@lexical/selection';
|
|
7
|
+
import { $findMatchingParent, $getNearestNodeOfType, mergeRegister } from '@lexical/utils';
|
|
8
|
+
import { $getSelection, $isElementNode, $isRangeSelection, $isRootOrShadowRoot, COMMAND_PRIORITY_CRITICAL, COMMAND_PRIORITY_NORMAL, KEY_MODIFIER_COMMAND, SELECTION_CHANGE_COMMAND, } from 'lexical';
|
|
9
|
+
import { useCallback, useEffect, useState } from 'react';
|
|
10
|
+
import * as React from 'react';
|
|
11
|
+
import { getSelectedNode } from '../../utils/getSelectedNode';
|
|
12
|
+
import { sanitizeUrl } from '../../utils/url';
|
|
13
|
+
import HeaderDropdown from './components/heading';
|
|
14
|
+
import FontSize from './components/font-size';
|
|
15
|
+
import BoldText from './components/bold-text';
|
|
16
|
+
import ItalicText from './components/italic-text';
|
|
17
|
+
import UnderlineText from './components/underline-text';
|
|
18
|
+
import TextColor from './components/text-color';
|
|
19
|
+
import TextAlign from './components/text-align';
|
|
20
|
+
import Bullet from './components/bullet';
|
|
21
|
+
import NumberBullet from './components/number-bullet';
|
|
22
|
+
import UploadPdf from './components/upload-pdf';
|
|
23
|
+
import UploadImage from './components/upload-image';
|
|
24
|
+
import Link from './components/link';
|
|
25
|
+
var blockTypeToBlockName = {
|
|
26
|
+
bullet: 'Bulleted List',
|
|
27
|
+
check: 'Check List',
|
|
28
|
+
code: 'Code Block',
|
|
29
|
+
h1: 'Heading 1',
|
|
30
|
+
h2: 'Heading 2',
|
|
31
|
+
h3: 'Heading 3',
|
|
32
|
+
h4: 'Heading 4',
|
|
33
|
+
h5: 'Heading 5',
|
|
34
|
+
h6: 'Heading 6',
|
|
35
|
+
number: 'Numbered List',
|
|
36
|
+
paragraph: 'Normal',
|
|
37
|
+
quote: 'Quote',
|
|
38
|
+
};
|
|
39
|
+
export default function ToolbarPlugin(_a) {
|
|
40
|
+
var apiCdnUpload = _a.apiCdnUpload;
|
|
41
|
+
var editor = useLexicalComposerContext()[0];
|
|
42
|
+
var _b = useState(editor), activeEditor = _b[0], setActiveEditor = _b[1];
|
|
43
|
+
var _c = useState('paragraph'), blockType = _c[0], setBlockType = _c[1];
|
|
44
|
+
var _d = useState('14px'), fontSize = _d[0], setFontSize = _d[1];
|
|
45
|
+
var _e = useState('#000'), fontColor = _e[0], setFontColor = _e[1];
|
|
46
|
+
var _f = useState('left'), elementFormat = _f[0], setElementFormat = _f[1];
|
|
47
|
+
var _g = useState(false), isLink = _g[0], setIsLink = _g[1];
|
|
48
|
+
var _h = useState(false), isBold = _h[0], setIsBold = _h[1];
|
|
49
|
+
var _j = useState(false), isItalic = _j[0], setIsItalic = _j[1];
|
|
50
|
+
var _k = useState(false), isUnderline = _k[0], setIsUnderline = _k[1];
|
|
51
|
+
var $updateToolbar = useCallback(function () {
|
|
52
|
+
var selection = $getSelection();
|
|
53
|
+
if ($isRangeSelection(selection)) {
|
|
54
|
+
var anchorNode = selection.anchor.getNode();
|
|
55
|
+
var element = anchorNode.getKey() === 'root'
|
|
56
|
+
? anchorNode
|
|
57
|
+
: $findMatchingParent(anchorNode, function (e) {
|
|
58
|
+
var parent = e.getParent();
|
|
59
|
+
return parent !== null && $isRootOrShadowRoot(parent);
|
|
60
|
+
});
|
|
61
|
+
if (element === null) {
|
|
62
|
+
element = anchorNode.getTopLevelElementOrThrow();
|
|
63
|
+
}
|
|
64
|
+
var elementKey = element.getKey();
|
|
65
|
+
var elementDOM = activeEditor.getElementByKey(elementKey);
|
|
66
|
+
// Update text format
|
|
67
|
+
setIsBold(selection.hasFormat('bold'));
|
|
68
|
+
setIsItalic(selection.hasFormat('italic'));
|
|
69
|
+
setIsUnderline(selection.hasFormat('underline'));
|
|
70
|
+
// Update links
|
|
71
|
+
var node = getSelectedNode(selection);
|
|
72
|
+
var parent_1 = node.getParent();
|
|
73
|
+
if ($isLinkNode(parent_1) || $isLinkNode(node)) {
|
|
74
|
+
setIsLink(true);
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
setIsLink(false);
|
|
78
|
+
}
|
|
79
|
+
if (elementDOM !== null) {
|
|
80
|
+
if ($isListNode(element)) {
|
|
81
|
+
var parentList = $getNearestNodeOfType(anchorNode, ListNode);
|
|
82
|
+
var type = parentList ? parentList.getListType() : element.getListType();
|
|
83
|
+
setBlockType(type);
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
var type = $isHeadingNode(element) ? element.getTag() : element.getType();
|
|
87
|
+
if (type in blockTypeToBlockName) {
|
|
88
|
+
setBlockType(type);
|
|
89
|
+
}
|
|
90
|
+
if ($isCodeNode(element)) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
// Handle buttons
|
|
96
|
+
var fontSize_1 = $getSelectionStyleValueForProperty(selection, 'font-size', '14px') || '14px';
|
|
97
|
+
setFontSize(fontSize_1);
|
|
98
|
+
setFontColor($getSelectionStyleValueForProperty(selection, 'color', '#000'));
|
|
99
|
+
var matchingParent = void 0;
|
|
100
|
+
if ($isLinkNode(parent_1)) {
|
|
101
|
+
// If node is a link, we need to fetch the parent paragraph node to set format
|
|
102
|
+
matchingParent = $findMatchingParent(node, function (parentNode) { return $isElementNode(parentNode) && !parentNode.isInline(); });
|
|
103
|
+
}
|
|
104
|
+
// If matchingParent is a valid node, pass it's format type
|
|
105
|
+
setElementFormat($isElementNode(matchingParent)
|
|
106
|
+
? matchingParent.getFormatType()
|
|
107
|
+
: $isElementNode(node)
|
|
108
|
+
? node.getFormatType()
|
|
109
|
+
: (parent_1 === null || parent_1 === void 0 ? void 0 : parent_1.getFormatType()) || 'left');
|
|
110
|
+
}
|
|
111
|
+
}, [activeEditor]);
|
|
112
|
+
useEffect(function () {
|
|
113
|
+
return editor.registerCommand(SELECTION_CHANGE_COMMAND, function (_payload, newEditor) {
|
|
114
|
+
$updateToolbar();
|
|
115
|
+
setActiveEditor(newEditor);
|
|
116
|
+
return false;
|
|
117
|
+
}, COMMAND_PRIORITY_CRITICAL);
|
|
118
|
+
}, [editor, $updateToolbar]);
|
|
119
|
+
useEffect(function () {
|
|
120
|
+
return mergeRegister(activeEditor.registerUpdateListener(function (_a) {
|
|
121
|
+
var editorState = _a.editorState;
|
|
122
|
+
editorState.read(function () {
|
|
123
|
+
$updateToolbar();
|
|
124
|
+
});
|
|
125
|
+
}));
|
|
126
|
+
}, [$updateToolbar, activeEditor, editor]);
|
|
127
|
+
useEffect(function () {
|
|
128
|
+
return activeEditor.registerCommand(KEY_MODIFIER_COMMAND, function (payload) {
|
|
129
|
+
var event = payload;
|
|
130
|
+
var code = event.code, ctrlKey = event.ctrlKey, metaKey = event.metaKey;
|
|
131
|
+
if (code === 'KeyK' && (ctrlKey || metaKey)) {
|
|
132
|
+
event.preventDefault();
|
|
133
|
+
return activeEditor.dispatchCommand(TOGGLE_LINK_COMMAND, sanitizeUrl('https://'));
|
|
134
|
+
}
|
|
135
|
+
return false;
|
|
136
|
+
}, COMMAND_PRIORITY_NORMAL);
|
|
137
|
+
}, [activeEditor, isLink]);
|
|
138
|
+
useEffect(function () {
|
|
139
|
+
if (!window.pdfjsLib) {
|
|
140
|
+
var script = document.createElement('script');
|
|
141
|
+
script.src = 'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.min.js';
|
|
142
|
+
document.body.appendChild(script);
|
|
143
|
+
}
|
|
144
|
+
}, []);
|
|
145
|
+
return (React.createElement("div", { className: 'flex flex-wrap gap-1 p-2 bg-gray-100 border-b border-gray-300' },
|
|
146
|
+
blockType in blockTypeToBlockName && activeEditor === editor && (React.createElement(HeaderDropdown, { value: blockType, editor: activeEditor })),
|
|
147
|
+
React.createElement(FontSize, { editor: activeEditor, fontSize: parseInt(fontSize, 10) }),
|
|
148
|
+
React.createElement(BoldText, { isActive: isBold, editor: activeEditor }),
|
|
149
|
+
React.createElement(ItalicText, { isActive: isItalic, editor: activeEditor }),
|
|
150
|
+
React.createElement(UnderlineText, { isActive: isUnderline, editor: activeEditor }),
|
|
151
|
+
React.createElement(TextColor, { editor: activeEditor, color: fontColor }),
|
|
152
|
+
React.createElement(TextAlign, { value: elementFormat, editor: activeEditor }),
|
|
153
|
+
React.createElement(Bullet, { isActive: blockType === 'bullet', editor: activeEditor }),
|
|
154
|
+
React.createElement(NumberBullet, { isActive: blockType === 'number', editor: activeEditor }),
|
|
155
|
+
React.createElement(UploadPdf, { editor: activeEditor, apiCdnUpload: apiCdnUpload }),
|
|
156
|
+
React.createElement(UploadImage, { editor: activeEditor, apiCdnUpload: apiCdnUpload }),
|
|
157
|
+
React.createElement(Link, { editor: activeEditor })));
|
|
158
|
+
}
|
|
159
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +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E,YAAY,GAAI;QACzD,oBAAC,MAAM,IAAC,QAAQ,EAAE,SAAS,KAAK,QAAQ,EAAE,MAAM,EAAE,YAAY,GAAI;QAClE,oBAAC,YAAY,IAAC,QAAQ,EAAE,SAAS,KAAK,QAAQ,EAAE,MAAM,EAAE,YAAY,GAAI;QACxE,oBAAC,SAAS,IAAC,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,GAAI;QAC/D,oBAAC,WAAW,IAAC,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,GAAI;QACjE,oBAAC,IAAI,IAAC,MAAM,EAAE,YAAY,GAAI,CAC1B,CACP,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
2
|
+
import { TreeView } from '@lexical/react/LexicalTreeView';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
export default function TreeViewPlugin() {
|
|
5
|
+
var editor = useLexicalComposerContext()[0];
|
|
6
|
+
return (React.createElement(TreeView, { editor: editor, timeTravelButtonClassName: 'debug-timetravel-button', timeTravelPanelButtonClassName: 'debug-timetravel-panel-button', timeTravelPanelClassName: 'debug-timetravel-panel', timeTravelPanelSliderClassName: 'debug-timetravel-panel-slider', treeTypeButtonClassName: 'debug-treetype-button', viewClassName: 'tree-view-output' }));
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/TextEditorV2/plugins/TreeViewPlugin/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAA;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAA;AACzD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,MAAM,CAAC,OAAO,UAAU,cAAc;IAC7B,IAAA,MAAM,GAAI,yBAAyB,EAAE,GAA/B,CAA+B;IAC5C,OAAO,CACL,oBAAC,QAAQ,IACP,MAAM,EAAE,MAAM,EACd,yBAAyB,EAAC,yBAAyB,EACnD,8BAA8B,EAAC,+BAA+B,EAC9D,wBAAwB,EAAC,wBAAwB,EACjD,8BAA8B,EAAC,+BAA+B,EAC9D,uBAAuB,EAAC,uBAAuB,EAC/C,aAAa,EAAC,kBAAkB,GAChC,CACH,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
2
|
+
import { $insertNodeToNearestRoot } from '@lexical/utils';
|
|
3
|
+
import { COMMAND_PRIORITY_EDITOR, createCommand } from 'lexical';
|
|
4
|
+
import { useEffect } from 'react';
|
|
5
|
+
import { $createTweetNode, TweetNode } from '../../nodes/TweetNode';
|
|
6
|
+
export var INSERT_TWEET_COMMAND = createCommand('INSERT_TWEET_COMMAND');
|
|
7
|
+
export default function TwitterPlugin() {
|
|
8
|
+
var editor = useLexicalComposerContext()[0];
|
|
9
|
+
useEffect(function () {
|
|
10
|
+
if (!editor.hasNodes([TweetNode])) {
|
|
11
|
+
throw new Error('TwitterPlugin: TweetNode not registered on editor');
|
|
12
|
+
}
|
|
13
|
+
return editor.registerCommand(INSERT_TWEET_COMMAND, function (payload) {
|
|
14
|
+
var tweetNode = $createTweetNode(payload);
|
|
15
|
+
$insertNodeToNearestRoot(tweetNode);
|
|
16
|
+
return true;
|
|
17
|
+
}, COMMAND_PRIORITY_EDITOR);
|
|
18
|
+
}, [editor]);
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/TextEditorV2/plugins/TwitterPlugin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAA;AACjF,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AACzD,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAkB,MAAM,SAAS,CAAA;AAChF,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEnE,MAAM,CAAC,IAAM,oBAAoB,GAA2B,aAAa,CAAC,sBAAsB,CAAC,CAAA;AAEjG,MAAM,CAAC,OAAO,UAAU,aAAa;IAC5B,IAAA,MAAM,GAAI,yBAAyB,EAAE,GAA/B,CAA+B;IAE5C,SAAS,CAAC;QACR,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC;YAClC,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAA;QACtE,CAAC;QAED,OAAO,MAAM,CAAC,eAAe,CAC3B,oBAAoB,EACpB,UAAC,OAAO;YACN,IAAM,SAAS,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAA;YAC3C,wBAAwB,CAAC,SAAS,CAAC,CAAA;YAEnC,OAAO,IAAI,CAAA;QACb,CAAC,EACD,uBAAuB,CACxB,CAAA;IACH,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;IAEZ,OAAO,IAAI,CAAA;AACb,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
2
|
+
import { $insertNodeToNearestRoot } from '@lexical/utils';
|
|
3
|
+
import { COMMAND_PRIORITY_EDITOR, createCommand } from 'lexical';
|
|
4
|
+
import { useEffect } from 'react';
|
|
5
|
+
import { $createYouTubeNode, YouTubeNode } from '../../nodes/YouTubeNode';
|
|
6
|
+
export var INSERT_YOUTUBE_COMMAND = createCommand('INSERT_YOUTUBE_COMMAND');
|
|
7
|
+
export default function YouTubePlugin() {
|
|
8
|
+
var editor = useLexicalComposerContext()[0];
|
|
9
|
+
useEffect(function () {
|
|
10
|
+
if (!editor.hasNodes([YouTubeNode])) {
|
|
11
|
+
throw new Error('YouTubePlugin: YouTubeNode not registered on editor');
|
|
12
|
+
}
|
|
13
|
+
return editor.registerCommand(INSERT_YOUTUBE_COMMAND, function (payload) {
|
|
14
|
+
var youTubeNode = $createYouTubeNode(payload);
|
|
15
|
+
$insertNodeToNearestRoot(youTubeNode);
|
|
16
|
+
return true;
|
|
17
|
+
}, COMMAND_PRIORITY_EDITOR);
|
|
18
|
+
}, [editor]);
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/TextEditorV2/plugins/YouTubePlugin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAA;AACjF,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AACzD,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAkB,MAAM,SAAS,CAAA;AAChF,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAEzE,MAAM,CAAC,IAAM,sBAAsB,GAA2B,aAAa,CAAC,wBAAwB,CAAC,CAAA;AAErG,MAAM,CAAC,OAAO,UAAU,aAAa;IAC5B,IAAA,MAAM,GAAI,yBAAyB,EAAE,GAA/B,CAA+B;IAE5C,SAAS,CAAC;QACR,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC;YACpC,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAA;QACxE,CAAC;QAED,OAAO,MAAM,CAAC,eAAe,CAC3B,sBAAsB,EACtB,UAAC,OAAO;YACN,IAAM,WAAW,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAA;YAC/C,wBAAwB,CAAC,WAAW,CAAC,CAAA;YAErC,OAAO,IAAI,CAAA;QACb,CAAC,EACD,uBAAuB,CACxB,CAAA;IACH,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;IAEZ,OAAO,IAAI,CAAA;AACb,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CAN_USE_DOM: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canUseDOM.js","sourceRoot":"","sources":["../../../../../src/components/TextEditorV2/shared/canUseDOM.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,WAAW,GACtB,OAAO,MAAM,KAAK,WAAW;IAC7B,OAAO,MAAM,CAAC,QAAQ,KAAK,WAAW;IACtC,OAAO,MAAM,CAAC,QAAQ,CAAC,aAAa,KAAK,WAAW,CAAA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export default function caretFromPoint(x, y) {
|
|
2
|
+
if (typeof document.caretRangeFromPoint !== 'undefined') {
|
|
3
|
+
var range = document.caretRangeFromPoint(x, y);
|
|
4
|
+
if (range === null) {
|
|
5
|
+
return null;
|
|
6
|
+
}
|
|
7
|
+
return {
|
|
8
|
+
node: range.startContainer,
|
|
9
|
+
offset: range.startOffset,
|
|
10
|
+
};
|
|
11
|
+
// @ts-ignore
|
|
12
|
+
}
|
|
13
|
+
else if (document.caretPositionFromPoint !== 'undefined') {
|
|
14
|
+
// @ts-ignore FF - no types
|
|
15
|
+
var range = document.caretPositionFromPoint(x, y);
|
|
16
|
+
if (range === null) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
return {
|
|
20
|
+
node: range.offsetNode,
|
|
21
|
+
offset: range.offset,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
// Gracefully handle IE
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=caretFromPoint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"caretFromPoint.js","sourceRoot":"","sources":["../../../../../src/components/TextEditorV2/shared/caretFromPoint.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,CAAS,EACT,CAAS;IAKT,IAAI,OAAO,QAAQ,CAAC,mBAAmB,KAAK,WAAW,EAAE,CAAC;QACxD,IAAM,KAAK,GAAG,QAAQ,CAAC,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QAChD,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;YACnB,OAAO,IAAI,CAAA;QACb,CAAC;QACD,OAAO;YACL,IAAI,EAAE,KAAK,CAAC,cAAc;YAC1B,MAAM,EAAE,KAAK,CAAC,WAAW;SAC1B,CAAA;QACD,aAAa;IACf,CAAC;SAAM,IAAI,QAAQ,CAAC,sBAAsB,KAAK,WAAW,EAAE,CAAC;QAC3D,2BAA2B;QAC3B,IAAM,KAAK,GAAG,QAAQ,CAAC,sBAAsB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QACnD,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;YACnB,OAAO,IAAI,CAAA;QACb,CAAC;QACD,OAAO;YACL,IAAI,EAAE,KAAK,CAAC,UAAU;YACtB,MAAM,EAAE,KAAK,CAAC,MAAM;SACrB,CAAA;IACH,CAAC;SAAM,CAAC;QACN,uBAAuB;QACvB,OAAO,IAAI,CAAA;IACb,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
interface Document {
|
|
3
|
+
documentMode?: unknown;
|
|
4
|
+
}
|
|
5
|
+
interface Window {
|
|
6
|
+
MSStream?: unknown;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export declare const IS_APPLE: boolean;
|
|
10
|
+
export declare const IS_FIREFOX: boolean;
|
|
11
|
+
export declare const CAN_USE_BEFORE_INPUT: boolean;
|
|
12
|
+
export declare const IS_SAFARI: boolean;
|
|
13
|
+
export declare const IS_IOS: boolean;
|
|
14
|
+
export declare const IS_ANDROID: boolean;
|
|
15
|
+
export declare const IS_CHROME: boolean;
|
|
16
|
+
export declare const IS_APPLE_WEBKIT: boolean;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CAN_USE_DOM } from './canUseDOM';
|
|
2
|
+
var documentMode = CAN_USE_DOM && 'documentMode' in document ? document.documentMode : null;
|
|
3
|
+
export var IS_APPLE = CAN_USE_DOM && /Mac|iPod|iPhone|iPad/.test(navigator.platform);
|
|
4
|
+
export var IS_FIREFOX = CAN_USE_DOM && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);
|
|
5
|
+
export var CAN_USE_BEFORE_INPUT = CAN_USE_DOM && 'InputEvent' in window && !documentMode ? 'getTargetRanges' in new window.InputEvent('input') : false;
|
|
6
|
+
export var IS_SAFARI = CAN_USE_DOM && /Version\/[\d.]+.*Safari/.test(navigator.userAgent);
|
|
7
|
+
export var IS_IOS = CAN_USE_DOM && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
|
8
|
+
export var IS_ANDROID = CAN_USE_DOM && /Android/.test(navigator.userAgent);
|
|
9
|
+
// Keep these in case we need to use them in the future.
|
|
10
|
+
// export const IS_WINDOWS: boolean = CAN_USE_DOM && /Win/.test(navigator.platform);
|
|
11
|
+
export var IS_CHROME = CAN_USE_DOM && /^(?=.*Chrome).*/i.test(navigator.userAgent);
|
|
12
|
+
// export const canUseTextInputEvent: boolean = CAN_USE_DOM && 'TextEvent' in window && !documentMode;
|
|
13
|
+
export var IS_APPLE_WEBKIT = CAN_USE_DOM && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !IS_CHROME;
|
|
14
|
+
//# sourceMappingURL=environment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environment.js","sourceRoot":"","sources":["../../../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AS,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function invariant(cond?: boolean, message?: string): asserts cond;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// invariant(condition, message) will refine types based on "condition", and
|
|
2
|
+
// if "condition" is false will throw an error. This function is special-cased
|
|
3
|
+
// in flow itself, so we can't name it anything else.
|
|
4
|
+
export default function invariant(cond, message) {
|
|
5
|
+
if (cond) {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
throw new Error('Internal Lexical error: invariant() is meant to be replaced at compile ' +
|
|
9
|
+
'time. There is no runtime version. Error: ' +
|
|
10
|
+
message);
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=invariant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invariant.js","sourceRoot":"","sources":["../../../../../src/components/TextEditorV2/shared/invariant.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,8EAA8E;AAC9E,qDAAqD;AACrD,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,IAAc,EAAE,OAAgB;IAChE,IAAI,IAAI,EAAE,CAAC;QACT,OAAM;IACR,CAAC;IAED,MAAM,IAAI,KAAK,CACb,yEAAyE;QACvE,4CAA4C;QAC5C,OAAO,CACV,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export default function simpleDiffWithCursor(a, b, cursor) {
|
|
2
|
+
var aLength = a.length;
|
|
3
|
+
var bLength = b.length;
|
|
4
|
+
var left = 0; // number of same characters counting from left
|
|
5
|
+
var right = 0; // number of same characters counting from right
|
|
6
|
+
// Iterate left to the right until we find a changed character
|
|
7
|
+
// First iteration considers the current cursor position
|
|
8
|
+
while (left < aLength && left < bLength && a[left] === b[left] && left < cursor) {
|
|
9
|
+
left++;
|
|
10
|
+
}
|
|
11
|
+
// Iterate right to the left until we find a changed character
|
|
12
|
+
while (right + left < aLength && right + left < bLength && a[aLength - right - 1] === b[bLength - right - 1]) {
|
|
13
|
+
right++;
|
|
14
|
+
}
|
|
15
|
+
// Try to iterate left further to the right without caring about the current cursor position
|
|
16
|
+
while (right + left < aLength && right + left < bLength && a[left] === b[left]) {
|
|
17
|
+
left++;
|
|
18
|
+
}
|
|
19
|
+
return {
|
|
20
|
+
index: left,
|
|
21
|
+
insert: b.slice(left, bLength - right),
|
|
22
|
+
remove: aLength - left - right,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=simpleDiffWithCursor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simpleDiffWithCursor.js","sourceRoot":"","sources":["../../../../../src/components/TextEditorV2/shared/simpleDiffWithCursor.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAC1C,CAAS,EACT,CAAS,EACT,MAAc;IAEd,IAAM,OAAO,GAAG,CAAC,CAAC,MAAM,CAAA;IACxB,IAAM,OAAO,GAAG,CAAC,CAAC,MAAM,CAAA;IACxB,IAAI,IAAI,GAAG,CAAC,CAAA,CAAC,+CAA+C;IAC5D,IAAI,KAAK,GAAG,CAAC,CAAA,CAAC,gDAAgD;IAC9D,8DAA8D;IAC9D,wDAAwD;IACxD,OAAO,IAAI,GAAG,OAAO,IAAI,IAAI,GAAG,OAAO,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,MAAM,EAAE,CAAC;QAChF,IAAI,EAAE,CAAA;IACR,CAAC;IACD,8DAA8D;IAC9D,OAAO,KAAK,GAAG,IAAI,GAAG,OAAO,IAAI,KAAK,GAAG,IAAI,GAAG,OAAO,IAAI,CAAC,CAAC,OAAO,GAAG,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,GAAG,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC;QAC7G,KAAK,EAAE,CAAA;IACT,CAAC;IACD,4FAA4F;IAC5F,OAAO,KAAK,GAAG,IAAI,GAAG,OAAO,IAAI,KAAK,GAAG,IAAI,GAAG,OAAO,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;QAC/E,IAAI,EAAE,CAAA;IACR,CAAC;IACD,OAAO;QACL,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,GAAG,KAAK,CAAC;QACtC,MAAM,EAAE,OAAO,GAAG,IAAI,GAAG,KAAK;KAC/B,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLayoutEffect.js","sourceRoot":"","sources":["../../../../../src/components/TextEditorV2/shared/useLayoutEffect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,OAAO,CAAA;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEzC,IAAM,mBAAmB,GAA2B,WAAW,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,CAAA;AAE7F,eAAe,mBAAmB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function warnOnlyOnce(message: string): () => void;
|