phx-react 1.3.1718 → 1.3.1719
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/TextEditorV2/constants.d.ts +1 -1
- package/dist/cjs/components/TextEditorV2/constants.js +15 -0
- package/dist/cjs/components/TextEditorV2/constants.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/editor.js +10 -58
- package/dist/cjs/components/TextEditorV2/editor.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/nodes/ImageComponent.js +2 -8
- package/dist/cjs/components/TextEditorV2/nodes/ImageComponent.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/nodes/InlineImageComponent.js +2 -2
- package/dist/cjs/components/TextEditorV2/nodes/InlineImageComponent.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/nodes/PlaygroundNodes.js +0 -19
- package/dist/cjs/components/TextEditorV2/nodes/PlaygroundNodes.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/plugins/FloatingTextFormatToolbarPlugin/index.js +1 -2
- package/dist/cjs/components/TextEditorV2/plugins/FloatingTextFormatToolbarPlugin/index.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/plugins/SanitizePastePlugin/index.d.ts +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/SanitizePastePlugin/index.js +58 -0
- package/dist/cjs/components/TextEditorV2/plugins/SanitizePastePlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/bold-text.js +2 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/bold-text.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/font-size.js +4 -6
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/font-size.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.d.ts +1 -1
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.js +22 -10
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/italic-text.js +2 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/italic-text.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/list-marker-format.d.ts +5 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/list-marker-format.js +27 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/list-marker-format.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/text-color.js +1 -3
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/text-color.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/index.js +0 -4
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/index.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/shared/LexicalErrorBoundary.d.ts +13 -0
- package/dist/cjs/components/TextEditorV2/shared/LexicalErrorBoundary.js +25 -0
- package/dist/cjs/components/TextEditorV2/shared/LexicalErrorBoundary.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/style.js +21 -0
- package/dist/cjs/components/TextEditorV2/style.js.map +1 -1
- package/dist/esm/components/TextEditorV2/constants.d.ts +1 -1
- package/dist/esm/components/TextEditorV2/constants.js +15 -0
- package/dist/esm/components/TextEditorV2/constants.js.map +1 -1
- package/dist/esm/components/TextEditorV2/editor.js +9 -57
- package/dist/esm/components/TextEditorV2/editor.js.map +1 -1
- package/dist/esm/components/TextEditorV2/nodes/ImageComponent.js +1 -7
- package/dist/esm/components/TextEditorV2/nodes/ImageComponent.js.map +1 -1
- package/dist/esm/components/TextEditorV2/nodes/InlineImageComponent.js +1 -1
- package/dist/esm/components/TextEditorV2/nodes/InlineImageComponent.js.map +1 -1
- package/dist/esm/components/TextEditorV2/nodes/PlaygroundNodes.js +0 -19
- package/dist/esm/components/TextEditorV2/nodes/PlaygroundNodes.js.map +1 -1
- package/dist/esm/components/TextEditorV2/plugins/FloatingTextFormatToolbarPlugin/index.js +1 -2
- package/dist/esm/components/TextEditorV2/plugins/FloatingTextFormatToolbarPlugin/index.js.map +1 -1
- package/dist/esm/components/TextEditorV2/plugins/SanitizePastePlugin/index.d.ts +1 -0
- package/dist/esm/components/TextEditorV2/plugins/SanitizePastePlugin/index.js +55 -0
- package/dist/esm/components/TextEditorV2/plugins/SanitizePastePlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/bold-text.js +2 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/bold-text.js.map +1 -1
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/font-size.js +5 -7
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/font-size.js.map +1 -1
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.d.ts +1 -1
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.js +23 -11
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.js.map +1 -1
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/italic-text.js +2 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/italic-text.js.map +1 -1
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/list-marker-format.d.ts +5 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/list-marker-format.js +24 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/list-marker-format.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/text-color.js +2 -4
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/text-color.js.map +1 -1
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/index.js +0 -4
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/index.js.map +1 -1
- package/dist/esm/components/TextEditorV2/shared/LexicalErrorBoundary.d.ts +13 -0
- package/dist/esm/components/TextEditorV2/shared/LexicalErrorBoundary.js +21 -0
- package/dist/esm/components/TextEditorV2/shared/LexicalErrorBoundary.js.map +1 -0
- package/dist/esm/components/TextEditorV2/style.js +21 -0
- package/dist/esm/components/TextEditorV2/style.js.map +1 -1
- package/package.json +9 -7
- package/dist/cjs/components/TextEditorV2/nodes/AutocompleteNode.d.ts +0 -25
- package/dist/cjs/components/TextEditorV2/nodes/AutocompleteNode.js +0 -60
- package/dist/cjs/components/TextEditorV2/nodes/AutocompleteNode.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/nodes/EmojiNode.d.ts +0 -18
- package/dist/cjs/components/TextEditorV2/nodes/EmojiNode.js +0 -62
- package/dist/cjs/components/TextEditorV2/nodes/EmojiNode.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/nodes/EquationComponent.d.ts +0 -9
- package/dist/cjs/components/TextEditorV2/nodes/EquationComponent.js +0 -70
- package/dist/cjs/components/TextEditorV2/nodes/EquationComponent.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/nodes/EquationNode.d.ts +0 -26
- package/dist/cjs/components/TextEditorV2/nodes/EquationNode.js +0 -121
- package/dist/cjs/components/TextEditorV2/nodes/EquationNode.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/nodes/PollComponent.d.ts +0 -8
- package/dist/cjs/components/TextEditorV2/nodes/PollComponent.js +0 -108
- package/dist/cjs/components/TextEditorV2/nodes/PollComponent.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/nodes/PollNode.d.ts +0 -33
- package/dist/cjs/components/TextEditorV2/nodes/PollNode.js +0 -145
- package/dist/cjs/components/TextEditorV2/nodes/PollNode.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/nodes/StickyComponent.d.ts +0 -9
- package/dist/cjs/components/TextEditorV2/nodes/StickyComponent.js +0 -166
- package/dist/cjs/components/TextEditorV2/nodes/StickyComponent.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/nodes/StickyNode.d.ts +0 -37
- package/dist/cjs/components/TextEditorV2/nodes/StickyNode.js +0 -91
- package/dist/cjs/components/TextEditorV2/nodes/StickyNode.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/ActionsPlugin/index.d.ts +0 -2
- package/dist/cjs/components/TextEditorV2/plugins/ActionsPlugin/index.js +0 -148
- package/dist/cjs/components/TextEditorV2/plugins/ActionsPlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/AutoEmbedPlugin/index.d.ts +0 -19
- package/dist/cjs/components/TextEditorV2/plugins/AutoEmbedPlugin/index.js +0 -168
- package/dist/cjs/components/TextEditorV2/plugins/AutoEmbedPlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/AutocompletePlugin/index.d.ts +0 -2
- package/dist/cjs/components/TextEditorV2/plugins/AutocompletePlugin/index.js +0 -2459
- package/dist/cjs/components/TextEditorV2/plugins/AutocompletePlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/CodeHighlightPlugin/index.d.ts +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/CodeHighlightPlugin/index.js +0 -12
- package/dist/cjs/components/TextEditorV2/plugins/CodeHighlightPlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContainerNode.d.ts +0 -23
- package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContainerNode.js +0 -88
- package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContainerNode.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContentNode.d.ts +0 -17
- package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContentNode.js +0 -68
- package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContentNode.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleTitleNode.d.ts +0 -18
- package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleTitleNode.js +0 -92
- package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleTitleNode.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/index.d.ts +0 -3
- package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/index.js +0 -145
- package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/ContextMenuPlugin/index.d.ts +0 -11
- package/dist/cjs/components/TextEditorV2/plugins/ContextMenuPlugin/index.js +0 -129
- package/dist/cjs/components/TextEditorV2/plugins/ContextMenuPlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/EmojiPickerPlugin/index.d.ts +0 -2
- package/dist/cjs/components/TextEditorV2/plugins/EmojiPickerPlugin/index.js +0 -83
- package/dist/cjs/components/TextEditorV2/plugins/EmojiPickerPlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/EmojisPlugin/index.d.ts +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/EmojisPlugin/index.js +0 -63
- package/dist/cjs/components/TextEditorV2/plugins/EmojisPlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/EquationsPlugin/index.d.ts +0 -14
- package/dist/cjs/components/TextEditorV2/plugins/EquationsPlugin/index.js +0 -41
- package/dist/cjs/components/TextEditorV2/plugins/EquationsPlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/ExcalidrawPlugin/index.d.ts +0 -3
- package/dist/cjs/components/TextEditorV2/plugins/ExcalidrawPlugin/index.js +0 -28
- package/dist/cjs/components/TextEditorV2/plugins/ExcalidrawPlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/FigmaPlugin/index.d.ts +0 -3
- package/dist/cjs/components/TextEditorV2/plugins/FigmaPlugin/index.js +0 -25
- package/dist/cjs/components/TextEditorV2/plugins/FigmaPlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/KeywordsPlugin/index.d.ts +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/KeywordsPlugin/index.js +0 -33
- package/dist/cjs/components/TextEditorV2/plugins/KeywordsPlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/LayoutPlugin/InsertLayoutDialog.d.ts +0 -6
- package/dist/cjs/components/TextEditorV2/plugins/LayoutPlugin/InsertLayoutDialog.js +0 -30
- package/dist/cjs/components/TextEditorV2/plugins/LayoutPlugin/InsertLayoutDialog.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/LayoutPlugin/LayoutPlugin.d.ts +0 -7
- package/dist/cjs/components/TextEditorV2/plugins/LayoutPlugin/LayoutPlugin.js +0 -85
- package/dist/cjs/components/TextEditorV2/plugins/LayoutPlugin/LayoutPlugin.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/MarkdownShortcutPlugin/index.d.ts +0 -2
- package/dist/cjs/components/TextEditorV2/plugins/MarkdownShortcutPlugin/index.js +0 -11
- package/dist/cjs/components/TextEditorV2/plugins/MarkdownShortcutPlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/MarkdownTransformers/index.d.ts +0 -8
- package/dist/cjs/components/TextEditorV2/plugins/MarkdownTransformers/index.js +0 -241
- package/dist/cjs/components/TextEditorV2/plugins/MarkdownTransformers/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/MentionsPlugin/index.d.ts +0 -2
- package/dist/cjs/components/TextEditorV2/plugins/MentionsPlugin/index.js +0 -551
- package/dist/cjs/components/TextEditorV2/plugins/MentionsPlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/PageBreakPlugin/index.d.ts +0 -3
- package/dist/cjs/components/TextEditorV2/plugins/PageBreakPlugin/index.js +0 -31
- package/dist/cjs/components/TextEditorV2/plugins/PageBreakPlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/PollPlugin/index.d.ts +0 -8
- package/dist/cjs/components/TextEditorV2/plugins/PollPlugin/index.js +0 -45
- package/dist/cjs/components/TextEditorV2/plugins/PollPlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/StickyPlugin/index.d.ts +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/StickyPlugin/index.js +0 -16
- package/dist/cjs/components/TextEditorV2/plugins/StickyPlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/TabFocusPlugin/index.d.ts +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/TabFocusPlugin/index.js +0 -38
- package/dist/cjs/components/TextEditorV2/plugins/TabFocusPlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/TableCellResizer/index.d.ts +0 -2
- package/dist/cjs/components/TextEditorV2/plugins/TableCellResizer/index.js +0 -248
- package/dist/cjs/components/TextEditorV2/plugins/TableCellResizer/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/TableOfContentsPlugin/index.d.ts +0 -2
- package/dist/cjs/components/TextEditorV2/plugins/TableOfContentsPlugin/index.js +0 -116
- package/dist/cjs/components/TextEditorV2/plugins/TableOfContentsPlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/TwitterPlugin/index.d.ts +0 -3
- package/dist/cjs/components/TextEditorV2/plugins/TwitterPlugin/index.js +0 -25
- package/dist/cjs/components/TextEditorV2/plugins/TwitterPlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/YouTubePlugin/index.d.ts +0 -3
- package/dist/cjs/components/TextEditorV2/plugins/YouTubePlugin/index.js +0 -25
- package/dist/cjs/components/TextEditorV2/plugins/YouTubePlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/ui/KatexEquationAlterer.d.ts +0 -7
- package/dist/cjs/components/TextEditorV2/ui/KatexEquationAlterer.js +0 -38
- package/dist/cjs/components/TextEditorV2/ui/KatexEquationAlterer.js.map +0 -1
- package/dist/esm/components/TextEditorV2/nodes/AutocompleteNode.d.ts +0 -25
- package/dist/esm/components/TextEditorV2/nodes/AutocompleteNode.js +0 -54
- package/dist/esm/components/TextEditorV2/nodes/AutocompleteNode.js.map +0 -1
- package/dist/esm/components/TextEditorV2/nodes/EmojiNode.d.ts +0 -18
- package/dist/esm/components/TextEditorV2/nodes/EmojiNode.js +0 -56
- package/dist/esm/components/TextEditorV2/nodes/EmojiNode.js.map +0 -1
- package/dist/esm/components/TextEditorV2/nodes/EquationComponent.d.ts +0 -9
- package/dist/esm/components/TextEditorV2/nodes/EquationComponent.js +0 -66
- package/dist/esm/components/TextEditorV2/nodes/EquationComponent.js.map +0 -1
- package/dist/esm/components/TextEditorV2/nodes/EquationNode.d.ts +0 -26
- package/dist/esm/components/TextEditorV2/nodes/EquationNode.js +0 -114
- package/dist/esm/components/TextEditorV2/nodes/EquationNode.js.map +0 -1
- package/dist/esm/components/TextEditorV2/nodes/PollComponent.d.ts +0 -8
- package/dist/esm/components/TextEditorV2/nodes/PollComponent.js +0 -104
- package/dist/esm/components/TextEditorV2/nodes/PollComponent.js.map +0 -1
- package/dist/esm/components/TextEditorV2/nodes/PollNode.d.ts +0 -33
- package/dist/esm/components/TextEditorV2/nodes/PollNode.js +0 -137
- package/dist/esm/components/TextEditorV2/nodes/PollNode.js.map +0 -1
- package/dist/esm/components/TextEditorV2/nodes/StickyComponent.d.ts +0 -9
- package/dist/esm/components/TextEditorV2/nodes/StickyComponent.js +0 -162
- package/dist/esm/components/TextEditorV2/nodes/StickyComponent.js.map +0 -1
- package/dist/esm/components/TextEditorV2/nodes/StickyNode.d.ts +0 -37
- package/dist/esm/components/TextEditorV2/nodes/StickyNode.js +0 -84
- package/dist/esm/components/TextEditorV2/nodes/StickyNode.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/ActionsPlugin/index.d.ts +0 -2
- package/dist/esm/components/TextEditorV2/plugins/ActionsPlugin/index.js +0 -144
- package/dist/esm/components/TextEditorV2/plugins/ActionsPlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/AutoEmbedPlugin/index.d.ts +0 -19
- package/dist/esm/components/TextEditorV2/plugins/AutoEmbedPlugin/index.js +0 -162
- package/dist/esm/components/TextEditorV2/plugins/AutoEmbedPlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/AutocompletePlugin/index.d.ts +0 -2
- package/dist/esm/components/TextEditorV2/plugins/AutocompletePlugin/index.js +0 -2455
- package/dist/esm/components/TextEditorV2/plugins/AutocompletePlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/CodeHighlightPlugin/index.d.ts +0 -1
- package/dist/esm/components/TextEditorV2/plugins/CodeHighlightPlugin/index.js +0 -9
- package/dist/esm/components/TextEditorV2/plugins/CodeHighlightPlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContainerNode.d.ts +0 -23
- package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContainerNode.js +0 -81
- package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContainerNode.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContentNode.d.ts +0 -17
- package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContentNode.js +0 -61
- package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContentNode.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleTitleNode.d.ts +0 -18
- package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleTitleNode.js +0 -85
- package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleTitleNode.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/index.d.ts +0 -3
- package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/index.js +0 -141
- package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/ContextMenuPlugin/index.d.ts +0 -11
- package/dist/esm/components/TextEditorV2/plugins/ContextMenuPlugin/index.js +0 -123
- package/dist/esm/components/TextEditorV2/plugins/ContextMenuPlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/EmojiPickerPlugin/index.d.ts +0 -2
- package/dist/esm/components/TextEditorV2/plugins/EmojiPickerPlugin/index.js +0 -79
- package/dist/esm/components/TextEditorV2/plugins/EmojiPickerPlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/EmojisPlugin/index.d.ts +0 -1
- package/dist/esm/components/TextEditorV2/plugins/EmojisPlugin/index.js +0 -60
- package/dist/esm/components/TextEditorV2/plugins/EmojisPlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/EquationsPlugin/index.d.ts +0 -14
- package/dist/esm/components/TextEditorV2/plugins/EquationsPlugin/index.js +0 -35
- package/dist/esm/components/TextEditorV2/plugins/EquationsPlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/ExcalidrawPlugin/index.d.ts +0 -3
- package/dist/esm/components/TextEditorV2/plugins/ExcalidrawPlugin/index.js +0 -24
- package/dist/esm/components/TextEditorV2/plugins/ExcalidrawPlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/FigmaPlugin/index.d.ts +0 -3
- package/dist/esm/components/TextEditorV2/plugins/FigmaPlugin/index.js +0 -21
- package/dist/esm/components/TextEditorV2/plugins/FigmaPlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/KeywordsPlugin/index.d.ts +0 -1
- package/dist/esm/components/TextEditorV2/plugins/KeywordsPlugin/index.js +0 -30
- package/dist/esm/components/TextEditorV2/plugins/KeywordsPlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/LayoutPlugin/InsertLayoutDialog.d.ts +0 -6
- package/dist/esm/components/TextEditorV2/plugins/LayoutPlugin/InsertLayoutDialog.js +0 -26
- package/dist/esm/components/TextEditorV2/plugins/LayoutPlugin/InsertLayoutDialog.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/LayoutPlugin/LayoutPlugin.d.ts +0 -7
- package/dist/esm/components/TextEditorV2/plugins/LayoutPlugin/LayoutPlugin.js +0 -81
- package/dist/esm/components/TextEditorV2/plugins/LayoutPlugin/LayoutPlugin.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/MarkdownShortcutPlugin/index.d.ts +0 -2
- package/dist/esm/components/TextEditorV2/plugins/MarkdownShortcutPlugin/index.js +0 -7
- package/dist/esm/components/TextEditorV2/plugins/MarkdownShortcutPlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/MarkdownTransformers/index.d.ts +0 -8
- package/dist/esm/components/TextEditorV2/plugins/MarkdownTransformers/index.js +0 -237
- package/dist/esm/components/TextEditorV2/plugins/MarkdownTransformers/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/MentionsPlugin/index.d.ts +0 -2
- package/dist/esm/components/TextEditorV2/plugins/MentionsPlugin/index.js +0 -547
- package/dist/esm/components/TextEditorV2/plugins/MentionsPlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/PageBreakPlugin/index.d.ts +0 -3
- package/dist/esm/components/TextEditorV2/plugins/PageBreakPlugin/index.js +0 -27
- package/dist/esm/components/TextEditorV2/plugins/PageBreakPlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/PollPlugin/index.d.ts +0 -8
- package/dist/esm/components/TextEditorV2/plugins/PollPlugin/index.js +0 -39
- package/dist/esm/components/TextEditorV2/plugins/PollPlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/StickyPlugin/index.d.ts +0 -1
- package/dist/esm/components/TextEditorV2/plugins/StickyPlugin/index.js +0 -13
- package/dist/esm/components/TextEditorV2/plugins/StickyPlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/TabFocusPlugin/index.d.ts +0 -1
- package/dist/esm/components/TextEditorV2/plugins/TabFocusPlugin/index.js +0 -35
- package/dist/esm/components/TextEditorV2/plugins/TabFocusPlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/TableCellResizer/index.d.ts +0 -2
- package/dist/esm/components/TextEditorV2/plugins/TableCellResizer/index.js +0 -244
- package/dist/esm/components/TextEditorV2/plugins/TableCellResizer/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/TableOfContentsPlugin/index.d.ts +0 -2
- package/dist/esm/components/TextEditorV2/plugins/TableOfContentsPlugin/index.js +0 -112
- package/dist/esm/components/TextEditorV2/plugins/TableOfContentsPlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/TwitterPlugin/index.d.ts +0 -3
- package/dist/esm/components/TextEditorV2/plugins/TwitterPlugin/index.js +0 -21
- package/dist/esm/components/TextEditorV2/plugins/TwitterPlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/YouTubePlugin/index.d.ts +0 -3
- package/dist/esm/components/TextEditorV2/plugins/YouTubePlugin/index.js +0 -21
- package/dist/esm/components/TextEditorV2/plugins/YouTubePlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/ui/KatexEquationAlterer.d.ts +0 -7
- package/dist/esm/components/TextEditorV2/ui/KatexEquationAlterer.js +0 -34
- package/dist/esm/components/TextEditorV2/ui/KatexEquationAlterer.js.map +0 -1
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
2
|
-
import { LexicalContextMenuPlugin, MenuOption } from '@lexical/react/LexicalContextMenuPlugin';
|
|
3
|
-
import { $getSelection, $isRangeSelection, COPY_COMMAND, CUT_COMMAND, PASTE_COMMAND } from 'lexical';
|
|
4
|
-
import { useCallback, useMemo } from 'react';
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
import * as ReactDOM from 'react-dom';
|
|
7
|
-
function ContextMenuItem({ index, isSelected, onClick, onMouseEnter, option, }) {
|
|
8
|
-
let className = 'item';
|
|
9
|
-
if (isSelected) {
|
|
10
|
-
className += ' selected';
|
|
11
|
-
}
|
|
12
|
-
return (React.createElement("li", { key: option.key, ref: option.setRefElement, "aria-selected": isSelected, className: className, id: 'typeahead-item-' + index, onClick: onClick, onMouseEnter: onMouseEnter, role: 'option', tabIndex: -1 },
|
|
13
|
-
React.createElement("span", { className: 'text' }, option.title)));
|
|
14
|
-
}
|
|
15
|
-
function ContextMenu({ onOptionClick, onOptionMouseEnter, options, selectedItemIndex, }) {
|
|
16
|
-
return (React.createElement("div", { className: 'typeahead-popover' },
|
|
17
|
-
React.createElement("ul", null, options.map((option, i) => (React.createElement(ContextMenuItem, { key: option.key, index: i, isSelected: selectedItemIndex === i, onClick: () => onOptionClick(option, i), onMouseEnter: () => onOptionMouseEnter(i), option: option }))))));
|
|
18
|
-
}
|
|
19
|
-
export class ContextMenuOption extends MenuOption {
|
|
20
|
-
constructor(title, options) {
|
|
21
|
-
super(title);
|
|
22
|
-
this.title = title;
|
|
23
|
-
this.onSelect = options.onSelect.bind(this);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
export default function ContextMenuPlugin() {
|
|
27
|
-
const [editor] = useLexicalComposerContext();
|
|
28
|
-
const options = useMemo(() => [
|
|
29
|
-
new ContextMenuOption(`Copy`, {
|
|
30
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
31
|
-
onSelect: (_node) => {
|
|
32
|
-
editor.dispatchCommand(COPY_COMMAND, null);
|
|
33
|
-
},
|
|
34
|
-
}),
|
|
35
|
-
new ContextMenuOption(`Cut`, {
|
|
36
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
37
|
-
onSelect: (_node) => {
|
|
38
|
-
editor.dispatchCommand(CUT_COMMAND, null);
|
|
39
|
-
},
|
|
40
|
-
}),
|
|
41
|
-
new ContextMenuOption(`Paste`, {
|
|
42
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
43
|
-
onSelect: (_node) => {
|
|
44
|
-
navigator.clipboard.read().then(async () => {
|
|
45
|
-
const data = new DataTransfer();
|
|
46
|
-
const items = await navigator.clipboard.read();
|
|
47
|
-
const item = items[0];
|
|
48
|
-
const permission = await navigator.permissions.query({
|
|
49
|
-
// @ts-ignore These types are incorrect.
|
|
50
|
-
name: 'clipboard-read',
|
|
51
|
-
});
|
|
52
|
-
if (permission.state === 'denied') {
|
|
53
|
-
alert('Not allowed to paste from clipboard.');
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
for (const type of item.types) {
|
|
57
|
-
const dataString = await (await item.getType(type)).text();
|
|
58
|
-
data.setData(type, dataString);
|
|
59
|
-
}
|
|
60
|
-
const event = new ClipboardEvent('paste', {
|
|
61
|
-
clipboardData: data,
|
|
62
|
-
});
|
|
63
|
-
editor.dispatchCommand(PASTE_COMMAND, event);
|
|
64
|
-
});
|
|
65
|
-
},
|
|
66
|
-
}),
|
|
67
|
-
new ContextMenuOption(`Paste as Plain Text`, {
|
|
68
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
69
|
-
onSelect: (_node) => {
|
|
70
|
-
navigator.clipboard.read().then(async () => {
|
|
71
|
-
const permission = await navigator.permissions.query({
|
|
72
|
-
// @ts-ignore These types are incorrect.
|
|
73
|
-
name: 'clipboard-read',
|
|
74
|
-
});
|
|
75
|
-
if (permission.state === 'denied') {
|
|
76
|
-
alert('Not allowed to paste from clipboard.');
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
const data = new DataTransfer();
|
|
80
|
-
const items = await navigator.clipboard.readText();
|
|
81
|
-
data.setData('text/plain', items);
|
|
82
|
-
const event = new ClipboardEvent('paste', {
|
|
83
|
-
clipboardData: data,
|
|
84
|
-
});
|
|
85
|
-
editor.dispatchCommand(PASTE_COMMAND, event);
|
|
86
|
-
});
|
|
87
|
-
},
|
|
88
|
-
}),
|
|
89
|
-
new ContextMenuOption(`Delete Node`, {
|
|
90
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
91
|
-
onSelect: (_node) => {
|
|
92
|
-
const selection = $getSelection();
|
|
93
|
-
if ($isRangeSelection(selection)) {
|
|
94
|
-
const currentNode = selection.anchor.getNode();
|
|
95
|
-
const ancestorNodeWithRootAsParent = currentNode.getParents().at(-2);
|
|
96
|
-
ancestorNodeWithRootAsParent === null || ancestorNodeWithRootAsParent === void 0 ? void 0 : ancestorNodeWithRootAsParent.remove();
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
}),
|
|
100
|
-
], [editor]);
|
|
101
|
-
const onSelectOption = useCallback((selectedOption, targetNode, closeMenu) => {
|
|
102
|
-
editor.update(() => {
|
|
103
|
-
selectedOption.onSelect(targetNode);
|
|
104
|
-
closeMenu();
|
|
105
|
-
});
|
|
106
|
-
}, [editor]);
|
|
107
|
-
return (React.createElement(LexicalContextMenuPlugin, { menuRenderFn: (anchorElementRef, {
|
|
108
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
109
|
-
options: _options, selectOptionAndCleanUp, selectedIndex, setHighlightedIndex, }, { setMenuRef }) => anchorElementRef.current
|
|
110
|
-
? ReactDOM.createPortal(React.createElement("div", { ref: setMenuRef, className: 'typeahead-popover auto-embed-menu', style: {
|
|
111
|
-
marginLeft: anchorElementRef.current.style.width,
|
|
112
|
-
userSelect: 'none',
|
|
113
|
-
width: 200,
|
|
114
|
-
} },
|
|
115
|
-
React.createElement(ContextMenu, { onOptionClick: (option, index) => {
|
|
116
|
-
setHighlightedIndex(index);
|
|
117
|
-
selectOptionAndCleanUp(option);
|
|
118
|
-
}, onOptionMouseEnter: (index) => {
|
|
119
|
-
setHighlightedIndex(index);
|
|
120
|
-
}, options: options, selectedItemIndex: selectedIndex })), anchorElementRef.current)
|
|
121
|
-
: null, onSelectOption: onSelectOption, options: options }));
|
|
122
|
-
}
|
|
123
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/TextEditorV2/plugins/ContextMenuPlugin/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAA;AACjF,OAAO,EAAE,wBAAwB,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAA;AAC9F,OAAO,EAAoB,aAAa,EAAE,iBAAiB,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AACtH,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAC5C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,QAAQ,MAAM,WAAW,CAAA;AAErC,SAAS,eAAe,CAAC,EACvB,KAAK,EACL,UAAU,EACV,OAAO,EACP,YAAY,EACZ,MAAM,GAQP;IACC,IAAI,SAAS,GAAG,MAAM,CAAA;IACtB,IAAI,UAAU,EAAE,CAAC;QACf,SAAS,IAAI,WAAW,CAAA;IAC1B,CAAC;IACD,OAAO,CACL,4BACE,GAAG,EAAE,MAAM,CAAC,GAAG,EACf,GAAG,EAAE,MAAM,CAAC,aAAa,mBACV,UAAU,EACzB,SAAS,EAAE,SAAS,EACpB,EAAE,EAAE,iBAAiB,GAAG,KAAK,EAC7B,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,YAAY,EAC1B,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,CAAC,CAAC;QAEZ,8BAAM,SAAS,EAAC,MAAM,IAAE,MAAM,CAAC,KAAK,CAAQ,CACzC,CACN,CAAA;AACH,CAAC;AAED,SAAS,WAAW,CAAC,EACnB,aAAa,EACb,kBAAkB,EAClB,OAAO,EACP,iBAAiB,GAQlB;IACC,OAAO,CACL,6BAAK,SAAS,EAA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AE;YACjB,cAAc,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAA;YACnC,SAAS,EAAE,CAAA;QACb,CAAC,CAAC,CAAA;IACJ,CAAC,EACD,CAAC,MAAM,CAAC,CACT,CAAA;IAED,OAAO,CACL,oBAAC,wBAAwB,IACvB,YAAY,EAAE,CACZ,gBAAgB,EAChB;QACE,6DAA6D;QAC7D,OAAO,EAAE,QAAQ,EACjB,sBAAsB,EACtB,aAAa,EACb,mBAAmB,GACpB,EACD,EAAE,UAAU,EAAE,EACd,EAAE,CACF,gBAAgB,CAAC,OAAO;YACtB,CAAC,CAAC,QAAQ,CAAC,YAAY,CACnB,6BACE,GAAG,EAAE,UAAU,EACf,SAAS,EAAC,mCAAmC,EAC7C,KAAK,EAAE;oBACL,UAAU,EAAE,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK;oBAChD,UAAU,EAAE,MAAM;oBAClB,KAAK,EAAE,GAAG;iBACX;gBAED,oBAAC,WAAW,IACV,aAAa,EAAE,CAAC,MAAyB,EAAE,KAAa,EAAE,EAAE;wBAC1D,mBAAmB,CAAC,KAAK,CAAC,CAAA;wBAC1B,sBAAsB,CAAC,MAAM,CAAC,CAAA;oBAChC,CAAC,EACD,kBAAkB,EAAE,CAAC,KAAa,EAAE,EAAE;wBACpC,mBAAmB,CAAC,KAAK,CAAC,CAAA;oBAC5B,CAAC,EACD,OAAO,EAAE,OAAO,EAChB,iBAAiB,EAAE,aAAa,GAChC,CACE,EACN,gBAAgB,CAAC,OAAO,CACzB;YACH,CAAC,CAAC,IAAI,EAEV,cAAc,EAAE,cAAc,EAC9B,OAAO,EAAE,OAAO,GAChB,CACH,CAAA;AACH,CAAC"}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
2
|
-
import { LexicalTypeaheadMenuPlugin, MenuOption, useBasicTypeaheadTriggerMatch, } from '@lexical/react/LexicalTypeaheadMenuPlugin';
|
|
3
|
-
import { $createTextNode, $getSelection, $isRangeSelection } from 'lexical';
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
6
|
-
import * as ReactDOM from 'react-dom';
|
|
7
|
-
class EmojiOption extends MenuOption {
|
|
8
|
-
constructor(title, emoji, options) {
|
|
9
|
-
super(title);
|
|
10
|
-
this.title = title;
|
|
11
|
-
this.emoji = emoji;
|
|
12
|
-
this.keywords = options.keywords || [];
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
function EmojiMenuItem({ index, isSelected, onClick, onMouseEnter, option, }) {
|
|
16
|
-
let className = 'item';
|
|
17
|
-
if (isSelected) {
|
|
18
|
-
className += ' selected';
|
|
19
|
-
}
|
|
20
|
-
return (React.createElement("li", { key: option.key, ref: option.setRefElement, "aria-selected": isSelected, className: className, id: 'typeahead-item-' + index, onClick: onClick, onMouseEnter: onMouseEnter, role: 'option', tabIndex: -1 },
|
|
21
|
-
React.createElement("span", { className: 'text' },
|
|
22
|
-
option.emoji,
|
|
23
|
-
" ",
|
|
24
|
-
option.title)));
|
|
25
|
-
}
|
|
26
|
-
const MAX_EMOJI_SUGGESTION_COUNT = 10;
|
|
27
|
-
export default function EmojiPickerPlugin() {
|
|
28
|
-
const [editor] = useLexicalComposerContext();
|
|
29
|
-
const [queryString, setQueryString] = useState(null);
|
|
30
|
-
const [emojis, setEmojis] = useState([]);
|
|
31
|
-
useEffect(() => {
|
|
32
|
-
// @ts-ignore
|
|
33
|
-
import('../../utils/emoji-list.js').then((file) => setEmojis(file.default));
|
|
34
|
-
}, []);
|
|
35
|
-
const emojiOptions = useMemo(() => emojis != null
|
|
36
|
-
? emojis.map(({ aliases, emoji, tags }) => new EmojiOption(aliases[0], emoji, {
|
|
37
|
-
keywords: [...aliases, ...tags],
|
|
38
|
-
}))
|
|
39
|
-
: [], [emojis]);
|
|
40
|
-
const checkForTriggerMatch = useBasicTypeaheadTriggerMatch(':', {
|
|
41
|
-
minLength: 0,
|
|
42
|
-
});
|
|
43
|
-
const options = useMemo(() => emojiOptions
|
|
44
|
-
.filter((option) => queryString != null
|
|
45
|
-
? new RegExp(queryString, 'gi').exec(option.title) || option.keywords != null
|
|
46
|
-
? option.keywords.some((keyword) => new RegExp(queryString, 'gi').exec(keyword))
|
|
47
|
-
: false
|
|
48
|
-
: emojiOptions)
|
|
49
|
-
.slice(0, MAX_EMOJI_SUGGESTION_COUNT), [emojiOptions, queryString]);
|
|
50
|
-
const onSelectOption = useCallback((selectedOption, nodeToRemove, closeMenu) => {
|
|
51
|
-
editor.update(() => {
|
|
52
|
-
const selection = $getSelection();
|
|
53
|
-
if (!$isRangeSelection(selection) || selectedOption == null) {
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
if (nodeToRemove) {
|
|
57
|
-
nodeToRemove.remove();
|
|
58
|
-
}
|
|
59
|
-
selection.insertNodes([$createTextNode(selectedOption.emoji)]);
|
|
60
|
-
closeMenu();
|
|
61
|
-
});
|
|
62
|
-
}, [editor]);
|
|
63
|
-
return (React.createElement(LexicalTypeaheadMenuPlugin, { menuRenderFn: (anchorElementRef, { selectOptionAndCleanUp, selectedIndex, setHighlightedIndex }) => {
|
|
64
|
-
if (anchorElementRef.current == null || options.length === 0) {
|
|
65
|
-
return null;
|
|
66
|
-
}
|
|
67
|
-
return anchorElementRef.current && options.length > 0
|
|
68
|
-
? ReactDOM.createPortal(React.createElement("div", { className: 'typeahead-popover emoji-menu' },
|
|
69
|
-
React.createElement("ul", null, options.map((option, index) => (React.createElement("div", { key: option.key },
|
|
70
|
-
React.createElement(EmojiMenuItem, { index: index, isSelected: selectedIndex === index, onClick: () => {
|
|
71
|
-
setHighlightedIndex(index);
|
|
72
|
-
selectOptionAndCleanUp(option);
|
|
73
|
-
}, onMouseEnter: () => {
|
|
74
|
-
setHighlightedIndex(index);
|
|
75
|
-
}, option: option })))))), anchorElementRef.current)
|
|
76
|
-
: null;
|
|
77
|
-
}, onQueryChange: setQueryString, onSelectOption: onSelectOption, options: options, triggerFn: checkForTriggerMatch }));
|
|
78
|
-
}
|
|
79
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/TextEditorV2/plugins/EmojiPickerPlugin/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAA;AACjF,OAAO,EACL,0BAA0B,EAC1B,UAAU,EACV,6BAA6B,GAC9B,MAAM,2CAA2C,CAAA;AAClD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,iBAAiB,EAAY,MAAM,SAAS,CAAA;AACrF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACjE,OAAO,KAAK,QAAQ,MAAM,WAAW,CAAA;AAErC,MAAM,WAAY,SAAQ,UAAU;IAKlC,YACE,KAAa,EACb,KAAa,EACb,OAEC;QAED,KAAK,CAAC,KAAK,CAAC,CAAA;QACZ,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;QAClB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;QAClB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,EAAE,CAAA;IACxC,CAAC;CACF;AACD,SAAS,aAAa,CAAC,EACrB,KAAK,EACL,UAAU,EACV,OAAO,EACP,YAAY,EACZ,MAAM,GAOP;IACC,IAAI,SAAS,GAAG,MAAM,CAAA;IACtB,IAAI,UAAU,EAAE,CAAC;QACf,SAAS,IAAI,WAAW,CAAA;IAC1B,CAAC;IACD,OAAO,CACL,4BACE,GAAG,EAAE,MAAM,CAAC,GAAG,EACf,GAAG,EAAE,MAAM,CAAC,aAAa,mBACV,UAAU,EACzB,SAAS,EAAE,SAAS,EACpB,EAAE,EAAE,iBAAiB,GAAG,KA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AC,OAAO,IAAI,IAAI,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC7D,OAAO,IAAI,CAAA;YACb,CAAC;YAED,OAAO,gBAAgB,CAAC,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;gBACnD,CAAC,CAAC,QAAQ,CAAC,YAAY,CACnB,6BAAK,SAAS,EAAC,8BAA8B;oBAC3C,gCACG,OAAO,CAAC,GAAG,CAAC,CAAC,MAAmB,EAAE,KAAK,EAAE,EAAE,CAAC,CAC3C,6BAAK,GAAG,EAAE,MAAM,CAAC,GAAG;wBAClB,oBAAC,aAAa,IACZ,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,aAAa,KAAK,KAAK,EACnC,OAAO,EAAE,GAAG,EAAE;gCACZ,mBAAmB,CAAC,KAAK,CAAC,CAAA;gCAC1B,sBAAsB,CAAC,MAAM,CAAC,CAAA;4BAChC,CAAC,EACD,YAAY,EAAE,GAAG,EAAE;gCACjB,mBAAmB,CAAC,KAAK,CAAC,CAAA;4BAC5B,CAAC,EACD,MAAM,EAAE,MAAM,GACd,CACE,CACP,CAAC,CACC,CACD,EACN,gBAAgB,CAAC,OAAO,CACzB;gBACH,CAAC,CAAC,IAAI,CAAA;QACV,CAAC,EACD,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc,EAC9B,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,oBAAoB,GAC/B,CACH,CAAA;AACH,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function EmojisPlugin(): React.JSX.Element | null;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-extra-semi */
|
|
2
|
-
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
3
|
-
import { TextNode } from 'lexical';
|
|
4
|
-
import { useEffect } from 'react';
|
|
5
|
-
import { $createEmojiNode, EmojiNode } from '../../nodes/EmojiNode';
|
|
6
|
-
const emojis = new Map([
|
|
7
|
-
[':)', ['emoji happysmile', '🙂']],
|
|
8
|
-
[':D', ['emoji veryhappysmile', '😀']],
|
|
9
|
-
[':(', ['emoji unhappysmile', '🙁']],
|
|
10
|
-
['<3', ['emoji heart', '❤']],
|
|
11
|
-
['🙂', ['emoji happysmile', '🙂']],
|
|
12
|
-
['😀', ['emoji veryhappysmile', '😀']],
|
|
13
|
-
['🙁', ['emoji unhappysmile', '🙁']],
|
|
14
|
-
['❤', ['emoji heart', '❤']],
|
|
15
|
-
]);
|
|
16
|
-
function findAndTransformEmoji(node) {
|
|
17
|
-
const text = node.getTextContent();
|
|
18
|
-
for (let i = 0; i < text.length; i++) {
|
|
19
|
-
const emojiData = emojis.get(text[i]) || emojis.get(text.slice(i, i + 2));
|
|
20
|
-
if (emojiData !== undefined) {
|
|
21
|
-
const [emojiStyle, emojiText] = emojiData;
|
|
22
|
-
let targetNode;
|
|
23
|
-
if (i === 0) {
|
|
24
|
-
;
|
|
25
|
-
[targetNode] = node.splitText(i + 2);
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
;
|
|
29
|
-
[, targetNode] = node.splitText(i, i + 2);
|
|
30
|
-
}
|
|
31
|
-
const emojiNode = $createEmojiNode(emojiStyle, emojiText);
|
|
32
|
-
targetNode.replace(emojiNode);
|
|
33
|
-
return emojiNode;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return null;
|
|
37
|
-
}
|
|
38
|
-
function textNodeTransform(node) {
|
|
39
|
-
let targetNode = node;
|
|
40
|
-
while (targetNode !== null) {
|
|
41
|
-
if (!targetNode.isSimpleText()) {
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
targetNode = findAndTransformEmoji(targetNode);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
function useEmojis(editor) {
|
|
48
|
-
useEffect(() => {
|
|
49
|
-
if (!editor.hasNodes([EmojiNode])) {
|
|
50
|
-
throw new Error('EmojisPlugin: EmojiNode not registered on editor');
|
|
51
|
-
}
|
|
52
|
-
return editor.registerNodeTransform(TextNode, textNodeTransform);
|
|
53
|
-
}, [editor]);
|
|
54
|
-
}
|
|
55
|
-
export default function EmojisPlugin() {
|
|
56
|
-
const [editor] = useLexicalComposerContext();
|
|
57
|
-
useEmojis(editor);
|
|
58
|
-
return null;
|
|
59
|
-
}
|
|
60
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/TextEditorV2/plugins/EmojisPlugin/index.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAA;AAEjF,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEnE,MAAM,MAAM,GAAkC,IAAI,GAAG,CAAC;IACpD,CAAC,IAAI,EAAE,CAAC,kBAAkB,EAAE,IAAI,CAAC,CAAC;IAClC,CAAC,IAAI,EAAE,CAAC,sBAAsB,EAAE,IAAI,CAAC,CAAC;IACtC,CAAC,IAAI,EAAE,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAC;IACpC,CAAC,IAAI,EAAE,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC;IAC5B,CAAC,IAAI,EAAE,CAAC,kBAAkB,EAAE,IAAI,CAAC,CAAC;IAClC,CAAC,IAAI,EAAE,CAAC,sBAAsB,EAAE,IAAI,CAAC,CAAC;IACtC,CAAC,IAAI,EAAE,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAC;IACpC,CAAC,GAAG,EAAE,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC;CAC5B,CAAC,CAAA;AAEF,SAAS,qBAAqB,CAAC,IAAc;IAC3C,MAAM,IAAI,GAAG,IAAI,CAA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AC,GAAG,EAAE;QACb,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC;YAClC,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAA;QACrE,CAAC;QAED,OAAO,MAAM,CAAC,qBAAqB,CAAC,QAAQ,EAAE,iBAAiB,CAAC,CAAA;IAClE,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;AACd,CAAC;AAED,MAAM,CAAC,OAAO,UAAU,YAAY;IAClC,MAAM,CAAC,MAAM,CAAC,GAAG,yBAAyB,EAAE,CAAA;IAC5C,SAAS,CAAC,MAAM,CAAC,CAAA;IACjB,OAAO,IAAI,CAAA;AACb,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import 'katex/dist/katex.css';
|
|
2
|
-
import { LexicalCommand, LexicalEditor } from 'lexical';
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
type CommandPayload = {
|
|
5
|
-
equation: string;
|
|
6
|
-
inline: boolean;
|
|
7
|
-
};
|
|
8
|
-
export declare const INSERT_EQUATION_COMMAND: LexicalCommand<CommandPayload>;
|
|
9
|
-
export declare function InsertEquationDialog({ activeEditor, onClose, }: {
|
|
10
|
-
activeEditor: LexicalEditor;
|
|
11
|
-
onClose(): void;
|
|
12
|
-
}): React.JSX.Element;
|
|
13
|
-
export default function EquationsPlugin(): React.JSX.Element | null;
|
|
14
|
-
export {};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import 'katex/dist/katex.css';
|
|
2
|
-
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
3
|
-
import { $wrapNodeInElement } from '@lexical/utils';
|
|
4
|
-
import { $createParagraphNode, $insertNodes, $isRootOrShadowRoot, COMMAND_PRIORITY_EDITOR, createCommand, } from 'lexical';
|
|
5
|
-
import { useCallback, useEffect } from 'react';
|
|
6
|
-
import * as React from 'react';
|
|
7
|
-
import { $createEquationNode, EquationNode } from '../../nodes/EquationNode';
|
|
8
|
-
import KatexEquationAlterer from '../../ui/KatexEquationAlterer';
|
|
9
|
-
export const INSERT_EQUATION_COMMAND = createCommand('INSERT_EQUATION_COMMAND');
|
|
10
|
-
export function InsertEquationDialog({ activeEditor, onClose, }) {
|
|
11
|
-
const onEquationConfirm = useCallback((equation, inline) => {
|
|
12
|
-
activeEditor.dispatchCommand(INSERT_EQUATION_COMMAND, { equation, inline });
|
|
13
|
-
onClose();
|
|
14
|
-
}, [activeEditor, onClose]);
|
|
15
|
-
return React.createElement(KatexEquationAlterer, { onConfirm: onEquationConfirm });
|
|
16
|
-
}
|
|
17
|
-
export default function EquationsPlugin() {
|
|
18
|
-
const [editor] = useLexicalComposerContext();
|
|
19
|
-
useEffect(() => {
|
|
20
|
-
if (!editor.hasNodes([EquationNode])) {
|
|
21
|
-
throw new Error('EquationsPlugins: EquationsNode not registered on editor');
|
|
22
|
-
}
|
|
23
|
-
return editor.registerCommand(INSERT_EQUATION_COMMAND, (payload) => {
|
|
24
|
-
const { equation, inline } = payload;
|
|
25
|
-
const equationNode = $createEquationNode(equation, inline);
|
|
26
|
-
$insertNodes([equationNode]);
|
|
27
|
-
if ($isRootOrShadowRoot(equationNode.getParentOrThrow())) {
|
|
28
|
-
$wrapNodeInElement(equationNode, $createParagraphNode).selectEnd();
|
|
29
|
-
}
|
|
30
|
-
return true;
|
|
31
|
-
}, COMMAND_PRIORITY_EDITOR);
|
|
32
|
-
}, [editor]);
|
|
33
|
-
return null;
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/TextEditorV2/plugins/EquationsPlugin/index.tsx"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAA;AAE7B,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAA;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;A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AAC,CAAA;YAE1D,YAAY,CAAC,CAAC,YAAY,CAAC,CAAC,CAAA;YAC5B,IAAI,mBAAmB,CAAC,YAAY,CAAC,gBAAgB,EAAE,CAAC,EAAE,CAAC;gBACzD,kBAAkB,CAAC,YAAY,EAAE,oBAAoB,CAAC,CAAC,SAAS,EAAE,CAAA;YACpE,CAAC;YAED,OAAO,IAAI,CAAA;QACb,CAAC,EACD,uBAAuB,CACxB,CAAA;IACH,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;IAEZ,OAAO,IAAI,CAAA;AACb,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
2
|
-
import { $wrapNodeInElement } from '@lexical/utils';
|
|
3
|
-
import { $createParagraphNode, $insertNodes, $isRootOrShadowRoot, COMMAND_PRIORITY_EDITOR, createCommand, } from 'lexical';
|
|
4
|
-
import { useEffect } from 'react';
|
|
5
|
-
import { $createExcalidrawNode, ExcalidrawNode } from '../../nodes/ExcalidrawNode';
|
|
6
|
-
export const INSERT_EXCALIDRAW_COMMAND = createCommand('INSERT_EXCALIDRAW_COMMAND');
|
|
7
|
-
export default function ExcalidrawPlugin() {
|
|
8
|
-
const [editor] = useLexicalComposerContext();
|
|
9
|
-
useEffect(() => {
|
|
10
|
-
if (!editor.hasNodes([ExcalidrawNode])) {
|
|
11
|
-
throw new Error('ExcalidrawPlugin: ExcalidrawNode not registered on editor');
|
|
12
|
-
}
|
|
13
|
-
return editor.registerCommand(INSERT_EXCALIDRAW_COMMAND, () => {
|
|
14
|
-
const excalidrawNode = $createExcalidrawNode();
|
|
15
|
-
$insertNodes([excalidrawNode]);
|
|
16
|
-
if ($isRootOrShadowRoot(excalidrawNode.getParentOrThrow())) {
|
|
17
|
-
$wrapNodeInElement(excalidrawNode, $createParagraphNode).selectEnd();
|
|
18
|
-
}
|
|
19
|
-
return true;
|
|
20
|
-
}, COMMAND_PRIORITY_EDITOR);
|
|
21
|
-
}, [editor]);
|
|
22
|
-
return null;
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/TextEditorV2/plugins/ExcalidrawPlugin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAA;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AACnD,OAAO,EACL,oBAAoB,EACpB,YAAY,EACZ,mBAAmB,EACnB,uBAAuB,EACvB,aAAa,GAEd,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAElF,MAAM,CAAC,MAAM,yBAAyB,GAAyB,aAAa,CAAC,2BAA2B,CAAC,CAAA;AAEzG,MAAM,CAAC,OAAO,UAAU,gBAAgB;IACtC,MAAM,CAAC,MAAM,CAAC,GAAG,yBAAyB,EAAE,CAAA;IAC5C,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC;YACvC,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC,CAAA;QAC9E,CAAC;QAED,OAAO,MAAM,CAAC,eAAe,CAC3B,yBAAyB,EACzB,GAAG,EAAE;YACH,MAAM,cAAc,GAAG,qBAAqB,EAAE,CAAA;YAE9C,YAAY,CAAC,CAAC,cAAc,CAAC,CAAC,CAAA;YAC9B,IAAI,mBAAmB,CAAC,cAAc,CAAC,gBAAgB,EAAE,CAAC,EAAE,CAAC;gBAC3D,kBAAkB,CAAC,cAAc,EAAE,oBAAoB,CAAC,CAAC,SAAS,EAAE,CAAA;YACtE,CAAC;YAED,OAAO,IAAI,CAAA;QACb,CAAC,EACD,uBAAuB,CACxB,CAAA;IACH,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;IAEZ,OAAO,IAAI,CAAA;AACb,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
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 { $createFigmaNode, FigmaNode } from '../../nodes/FigmaNode';
|
|
6
|
-
export const INSERT_FIGMA_COMMAND = createCommand('INSERT_FIGMA_COMMAND');
|
|
7
|
-
export default function FigmaPlugin() {
|
|
8
|
-
const [editor] = useLexicalComposerContext();
|
|
9
|
-
useEffect(() => {
|
|
10
|
-
if (!editor.hasNodes([FigmaNode])) {
|
|
11
|
-
throw new Error('FigmaPlugin: FigmaNode not registered on editor');
|
|
12
|
-
}
|
|
13
|
-
return editor.registerCommand(INSERT_FIGMA_COMMAND, (payload) => {
|
|
14
|
-
const figmaNode = $createFigmaNode(payload);
|
|
15
|
-
$insertNodeToNearestRoot(figmaNode);
|
|
16
|
-
return true;
|
|
17
|
-
}, COMMAND_PRIORITY_EDITOR);
|
|
18
|
-
}, [editor]);
|
|
19
|
-
return null;
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/TextEditorV2/plugins/FigmaPlugin/index.tsx"],"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,MAAM,oBAAoB,GAA2B,aAAa,CAAC,sBAAsB,CAAC,CAAA;AAEjG,MAAM,CAAC,OAAO,UAAU,WAAW;IACjC,MAAM,CAAC,MAAM,CAAC,GAAG,yBAAyB,EAAE,CAAA;IAE5C,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC;YAClC,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAA;QACpE,CAAC;QAED,OAAO,MAAM,CAAC,eAAe,CAC3B,oBAAoB,EACpB,CAAC,OAAO,EAAE,EAAE;YACV,MAAM,SAAS,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAA;YAC3C,wBAAwB,CAAC,SAAS,CAAC,CAAA;YACnC,OAAO,IAAI,CAAA;QACb,CAAC,EACD,uBAAuB,CACxB,CAAA;IACH,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;IAEZ,OAAO,IAAI,CAAA;AACb,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function KeywordsPlugin(): React.JSX.Element | null;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
2
|
-
import { useLexicalTextEntity } from '@lexical/react/useLexicalTextEntity';
|
|
3
|
-
import { useCallback, useEffect } from 'react';
|
|
4
|
-
import { $createKeywordNode, KeywordNode } from '../../nodes/KeywordNode';
|
|
5
|
-
const KEYWORDS_REGEX = /(^|$|[^A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎↃↄⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〆〱-〵〻〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛥꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ])(congrats|congratulations|gratuluju|gratuluji|gratulujeme|blahopřeju|blahopřeji|blahopřejeme|Til lykke|Tillykke|Glückwunsch|Gratuliere|felicitaciones|enhorabuena|paljon onnea|onnittelut|Félicitations|gratula|gratulálok|gratulálunk|congratulazioni|complimenti|おめでとう|おめでとうございます|축하해|축하해요|gratulerer|Gefeliciteerd|gratulacje|Parabéns|parabéns|felicitações|felicitări|мои поздравления|поздравляем|поздравляю|gratulujem|blahoželám|ยินดีด้วย|ขอแสดงความยินดี|tebrikler|tebrik ederim|恭喜|祝贺你|恭喜你|恭喜|恭喜|baie geluk|veels geluk|অভিনন্দন|Čestitam|Čestitke|Čestitamo|Συγχαρητήρια|Μπράβο|અભિનંદન|badhai|बधाई|अभिनंदन|Честитам|Свака част|hongera|வாழ்த்துகள்|வாழ்த்துக்கள்|అభినందనలు|അഭിനന്ദനങ്ങൾ|Chúc mừng|מזל טוב|mazel tov|mazal tov)(^|$|[^A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎↃↄⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〆〱-〵〻〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛥꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ])/i;
|
|
6
|
-
export default function KeywordsPlugin() {
|
|
7
|
-
const [editor] = useLexicalComposerContext();
|
|
8
|
-
useEffect(() => {
|
|
9
|
-
if (!editor.hasNodes([KeywordNode])) {
|
|
10
|
-
throw new Error('KeywordsPlugin: KeywordNode not registered on editor');
|
|
11
|
-
}
|
|
12
|
-
}, [editor]);
|
|
13
|
-
const createKeywordNode = useCallback((textNode) => $createKeywordNode(textNode.getTextContent()), []);
|
|
14
|
-
const getKeywordMatch = useCallback((text) => {
|
|
15
|
-
const matchArr = KEYWORDS_REGEX.exec(text);
|
|
16
|
-
if (matchArr === null) {
|
|
17
|
-
return null;
|
|
18
|
-
}
|
|
19
|
-
const hashtagLength = matchArr[2].length;
|
|
20
|
-
const startOffset = matchArr.index + matchArr[1].length;
|
|
21
|
-
const endOffset = startOffset + hashtagLength;
|
|
22
|
-
return {
|
|
23
|
-
end: endOffset,
|
|
24
|
-
start: startOffset,
|
|
25
|
-
};
|
|
26
|
-
}, []);
|
|
27
|
-
useLexicalTextEntity(getKeywordMatch, KeywordNode, createKeywordNode);
|
|
28
|
-
return null;
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/TextEditorV2/plugins/KeywordsPlugin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAA;AACjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAA;AAE1E,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAC9C,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAEzE,MAAM,cAAc,GAClB,0/EAA0/E,CAAA;AAE5/E,MAAM,CAAC,OAAO,UAAU,cAAc;IACpC,MAAM,CAAC,MAAM,CAAC,GAAG,yBAAyB,EAAE,CAAA;IAE5C,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC;YACpC,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAA;QACzE,CAAC;IACH,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;IAEZ,MAAM,iBAAiB,GAAG,WAAW,CACnC,CAAC,QAAkB,EAAe,EAAE,CAAC,kBAAkB,CAAC,QAAQ,CAAC,cAAc,EAAE,CAAC,EAClF,EAAE,CACH,CAAA;IAED,MAAM,eAAe,GAAG,WAAW,CAAC,CAAC,IAAY,EAAE,EAAE;QACnD,MAAM,QAAQ,GAAG,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAE1C,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;YACtB,OAAO,IAAI,CAAA;QACb,CAAC;QAED,MAAM,aAAa,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAA;QACxC,MAAM,WAAW,GAAG,QAAQ,CAAC,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAA;QACvD,MAAM,SAAS,GAAG,WAAW,GAAG,aAAa,CAAA;QAC7C,OAAO;YACL,GAAG,EAAE,SAAS;YACd,KAAK,EAAE,WAAW;SACnB,CAAA;IACH,CAAC,EAAE,EAAE,CAAC,CAAA;IAEN,oBAAoB,CAAc,eAAe,EAAE,WAAW,EAAE,iBAAiB,CAAC,CAAA;IAElF,OAAO,IAAI,CAAA;AACb,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
import Button from '../../ui/Button';
|
|
4
|
-
import DropDown, { DropDownItem } from '../../ui/DropDown';
|
|
5
|
-
import { INSERT_LAYOUT_COMMAND } from './LayoutPlugin';
|
|
6
|
-
const LAYOUTS = [
|
|
7
|
-
{ label: '2 columns (equal width)', value: '1fr 1fr' },
|
|
8
|
-
{ label: '2 columns (25% - 75%)', value: '1fr 3fr' },
|
|
9
|
-
{ label: '3 columns (equal width)', value: '1fr 1fr 1fr' },
|
|
10
|
-
{ label: '3 columns (25% - 50% - 25%)', value: '1fr 2fr 1fr' },
|
|
11
|
-
{ label: '4 columns (equal width)', value: '1fr 1fr 1fr 1fr' },
|
|
12
|
-
];
|
|
13
|
-
export default function InsertLayoutDialog({ activeEditor, onClose, }) {
|
|
14
|
-
var _a;
|
|
15
|
-
const [layout, setLayout] = useState(LAYOUTS[0].value);
|
|
16
|
-
const buttonLabel = (_a = LAYOUTS.find((item) => item.value === layout)) === null || _a === void 0 ? void 0 : _a.label;
|
|
17
|
-
const onClick = () => {
|
|
18
|
-
activeEditor.dispatchCommand(INSERT_LAYOUT_COMMAND, layout);
|
|
19
|
-
onClose();
|
|
20
|
-
};
|
|
21
|
-
return (React.createElement(React.Fragment, null,
|
|
22
|
-
React.createElement(DropDown, { buttonClassName: 'toolbar-item dialog-dropdown', buttonLabel: buttonLabel }, LAYOUTS.map(({ label, value }) => (React.createElement(DropDownItem, { key: value, className: 'item', onClick: () => setLayout(value) },
|
|
23
|
-
React.createElement("span", { className: 'text' }, label))))),
|
|
24
|
-
React.createElement(Button, { onClick: onClick }, "Insert")));
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=InsertLayoutDialog.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InsertLayoutDialog.js","sourceRoot":"","sources":["../../../../../../src/components/TextEditorV2/plugins/LayoutPlugin/InsertLayoutDialog.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,MAAM,MAAM,iBAAiB,CAAA;AACpC,OAAO,QAAQ,EAAE,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAA;AAEtD,MAAM,OAAO,GAAG;IACd,EAAE,KAAK,EAAE,yBAAyB,EAAE,KAAK,EAAE,SAAS,EAAE;IACtD,EAAE,KAAK,EAAE,uBAAuB,EAAE,KAAK,EAAE,SAAS,EAAE;IACpD,EAAE,KAAK,EAAE,yBAAyB,EAAE,KAAK,EAAE,aAAa,EAAE;IAC1D,EAAE,KAAK,EAAE,6BAA6B,EAAE,KAAK,EAAE,aAAa,EAAE;IAC9D,EAAE,KAAK,EAAE,yBAAyB,EAAE,KAAK,EAAE,iBAAiB,EAAE;CAC/D,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EACzC,YAAY,EACZ,OAAO,GAIR;;IACC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;IACtD,MAAM,WAAW,GAAG,MAAA,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,KAAK,MAAM,CAAC,0CAAE,KAAK,CAAA;IAExE,MAAM,OAAO,GAAG,GAAG,EAAE;QACnB,YAAY,CAAC,eAAe,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAA;QAC3D,OAAO,EAAE,CAAA;IACX,CAAC,CAAA;IAED,OAAO,CACL;QACE,oBAAC,QAAQ,IAAC,eAAe,EAAC,8BAA8B,EAAC,WAAW,EAAE,WAAW,IAC9E,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CACjC,oBAAC,YAAY,IAAC,GAAG,EAAE,KAAK,EAAE,SAAS,EAAC,MAAM,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC;YACxE,8BAAM,SAAS,EAAC,MAAM,IAAE,KAAK,CAAQ,CACxB,CAChB,CAAC,CACO;QACX,oBAAC,MAAM,IAAC,OAAO,EAAE,OAAO,aAAiB,CACxC,CACJ,CAAA;AACH,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { LexicalCommand, NodeKey } from 'lexical';
|
|
2
|
-
export declare const INSERT_LAYOUT_COMMAND: LexicalCommand<string>;
|
|
3
|
-
export declare const UPDATE_LAYOUT_COMMAND: LexicalCommand<{
|
|
4
|
-
template: string;
|
|
5
|
-
nodeKey: NodeKey;
|
|
6
|
-
}>;
|
|
7
|
-
export declare function LayoutPlugin(): null;
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
2
|
-
import { $insertNodeToNearestRoot, mergeRegister } from '@lexical/utils';
|
|
3
|
-
import { $createParagraphNode, $getNodeByKey, COMMAND_PRIORITY_EDITOR, createCommand } from 'lexical';
|
|
4
|
-
import { useEffect } from 'react';
|
|
5
|
-
import { $createLayoutContainerNode, $isLayoutContainerNode, LayoutContainerNode, } from '../../nodes/LayoutContainerNode';
|
|
6
|
-
import { $createLayoutItemNode, $isLayoutItemNode, LayoutItemNode } from '../../nodes/LayoutItemNode';
|
|
7
|
-
export const INSERT_LAYOUT_COMMAND = createCommand();
|
|
8
|
-
export const UPDATE_LAYOUT_COMMAND = createCommand();
|
|
9
|
-
export function LayoutPlugin() {
|
|
10
|
-
const [editor] = useLexicalComposerContext();
|
|
11
|
-
useEffect(() => {
|
|
12
|
-
if (!editor.hasNodes([LayoutContainerNode, LayoutItemNode])) {
|
|
13
|
-
throw new Error('LayoutPlugin: LayoutContainerNode, or LayoutItemNode not registered on editor');
|
|
14
|
-
}
|
|
15
|
-
return mergeRegister(editor.registerCommand(INSERT_LAYOUT_COMMAND, (template) => {
|
|
16
|
-
editor.update(() => {
|
|
17
|
-
const container = $createLayoutContainerNode(template);
|
|
18
|
-
const itemsCount = getItemsCountFromTemplate(template);
|
|
19
|
-
for (let i = 0; i < itemsCount; i++) {
|
|
20
|
-
container.append($createLayoutItemNode().append($createParagraphNode()));
|
|
21
|
-
}
|
|
22
|
-
$insertNodeToNearestRoot(container);
|
|
23
|
-
container.selectStart();
|
|
24
|
-
});
|
|
25
|
-
return true;
|
|
26
|
-
}, COMMAND_PRIORITY_EDITOR), editor.registerCommand(UPDATE_LAYOUT_COMMAND, ({ nodeKey, template }) => {
|
|
27
|
-
editor.update(() => {
|
|
28
|
-
const container = $getNodeByKey(nodeKey);
|
|
29
|
-
if (!$isLayoutContainerNode(container)) {
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
const itemsCount = getItemsCountFromTemplate(template);
|
|
33
|
-
const prevItemsCount = getItemsCountFromTemplate(container.getTemplateColumns());
|
|
34
|
-
// Add or remove extra columns if new template does not match existing one
|
|
35
|
-
if (itemsCount > prevItemsCount) {
|
|
36
|
-
for (let i = prevItemsCount; i < itemsCount; i++) {
|
|
37
|
-
container.append($createLayoutItemNode().append($createParagraphNode()));
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
else if (itemsCount < prevItemsCount) {
|
|
41
|
-
for (let i = prevItemsCount; i < itemsCount; i++) {
|
|
42
|
-
const layoutItem = container.getChildAtIndex(i);
|
|
43
|
-
if ($isLayoutItemNode(layoutItem)) {
|
|
44
|
-
for (const child of layoutItem.getChildren()) {
|
|
45
|
-
container.insertAfter(child);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
container.setTemplateColumns(template);
|
|
51
|
-
});
|
|
52
|
-
return true;
|
|
53
|
-
}, COMMAND_PRIORITY_EDITOR),
|
|
54
|
-
// Structure enforcing transformers for each node type. In case nesting structure is not
|
|
55
|
-
// "Container > Item" it'll unwrap nodes and convert it back
|
|
56
|
-
// to regular content.
|
|
57
|
-
editor.registerNodeTransform(LayoutItemNode, (node) => {
|
|
58
|
-
const parent = node.getParent();
|
|
59
|
-
if (!$isLayoutContainerNode(parent)) {
|
|
60
|
-
const children = node.getChildren();
|
|
61
|
-
for (const child of children) {
|
|
62
|
-
node.insertBefore(child);
|
|
63
|
-
}
|
|
64
|
-
node.remove();
|
|
65
|
-
}
|
|
66
|
-
}), editor.registerNodeTransform(LayoutContainerNode, (node) => {
|
|
67
|
-
const children = node.getChildren();
|
|
68
|
-
if (!children.every($isLayoutItemNode)) {
|
|
69
|
-
for (const child of children) {
|
|
70
|
-
node.insertBefore(child);
|
|
71
|
-
}
|
|
72
|
-
node.remove();
|
|
73
|
-
}
|
|
74
|
-
}));
|
|
75
|
-
}, [editor]);
|
|
76
|
-
return null;
|
|
77
|
-
}
|
|
78
|
-
function getItemsCountFromTemplate(template) {
|
|
79
|
-
return template.trim().split(/\s+/).length;
|
|
80
|
-
}
|
|
81
|
-
//# sourceMappingURL=LayoutPlugin.js.map
|
|
@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