phx-react 1.3.1718 → 1.3.1720
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/BlockStack/BlockStack.d.ts +2 -2
- package/dist/cjs/components/BlockStack/BlockStack.js +7 -1
- package/dist/cjs/components/BlockStack/BlockStack.js.map +1 -1
- package/dist/cjs/components/Box/Box.d.ts +11 -11
- package/dist/cjs/components/Box/Box.js +13 -13
- package/dist/cjs/components/Box/Box.js.map +1 -1
- package/dist/cjs/components/InlineGrid/InlineGrid.d.ts +2 -2
- package/dist/cjs/components/InlineGrid/InlineGrid.js +17 -10
- package/dist/cjs/components/InlineGrid/InlineGrid.js.map +1 -1
- package/dist/cjs/components/TableV3/TableV3.d.ts +1 -1
- package/dist/cjs/components/TableV5/TableV5.d.ts +1 -1
- package/dist/cjs/components/TableV6/TableV6.d.ts +1 -1
- 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/cjs/components/TextV2/TextV2.d.ts +13 -13
- package/dist/cjs/components/TextV2/TextV2.js +24 -24
- package/dist/cjs/components/TextV2/TextV2.js.map +1 -1
- package/dist/cjs/components/types.d.ts +7 -0
- package/dist/cjs/helpers/helpers.d.ts +2 -0
- package/dist/cjs/helpers/helpers.js +22 -1
- package/dist/cjs/helpers/helpers.js.map +1 -1
- package/dist/esm/components/BlockStack/BlockStack.d.ts +2 -2
- package/dist/esm/components/BlockStack/BlockStack.js +7 -1
- package/dist/esm/components/BlockStack/BlockStack.js.map +1 -1
- package/dist/esm/components/Box/Box.d.ts +11 -11
- package/dist/esm/components/Box/Box.js +13 -13
- package/dist/esm/components/Box/Box.js.map +1 -1
- package/dist/esm/components/InlineGrid/InlineGrid.d.ts +2 -2
- package/dist/esm/components/InlineGrid/InlineGrid.js +17 -10
- package/dist/esm/components/InlineGrid/InlineGrid.js.map +1 -1
- package/dist/esm/components/TableV3/TableV3.d.ts +1 -1
- package/dist/esm/components/TableV5/TableV5.d.ts +1 -1
- package/dist/esm/components/TableV6/TableV6.d.ts +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/dist/esm/components/TextV2/TextV2.d.ts +13 -13
- package/dist/esm/components/TextV2/TextV2.js +24 -24
- package/dist/esm/components/TextV2/TextV2.js.map +1 -1
- package/dist/esm/components/types.d.ts +7 -0
- package/dist/esm/helpers/helpers.d.ts +2 -0
- package/dist/esm/helpers/helpers.js +20 -0
- package/dist/esm/helpers/helpers.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,547 +0,0 @@
|
|
|
1
|
-
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
2
|
-
import { LexicalTypeaheadMenuPlugin, MenuOption, useBasicTypeaheadTriggerMatch, } from '@lexical/react/LexicalTypeaheadMenuPlugin';
|
|
3
|
-
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
import * as ReactDOM from 'react-dom';
|
|
6
|
-
import { $createMentionNode } from '../../nodes/MentionNode';
|
|
7
|
-
const PUNCTUATION = '\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%\'"~=<>_:;';
|
|
8
|
-
const NAME = '\\b[A-Z][^\\s' + PUNCTUATION + ']';
|
|
9
|
-
const DocumentMentionsRegex = {
|
|
10
|
-
NAME,
|
|
11
|
-
PUNCTUATION,
|
|
12
|
-
};
|
|
13
|
-
const PUNC = DocumentMentionsRegex.PUNCTUATION;
|
|
14
|
-
const TRIGGERS = ['@'].join('');
|
|
15
|
-
// Chars we expect to see in a mention (non-space, non-punctuation).
|
|
16
|
-
const VALID_CHARS = '[^' + TRIGGERS + PUNC + '\\s]';
|
|
17
|
-
// Non-standard series of chars. Each series must be preceded and followed by
|
|
18
|
-
// a valid char.
|
|
19
|
-
const VALID_JOINS = '(?:' +
|
|
20
|
-
'\\.[ |$]|' + // E.g. "r. " in "Mr. Smith"
|
|
21
|
-
' |' + // E.g. " " in "Josh Duck"
|
|
22
|
-
'[' +
|
|
23
|
-
PUNC +
|
|
24
|
-
']|' + // E.g. "-' in "Salier-Hellendag"
|
|
25
|
-
')';
|
|
26
|
-
const LENGTH_LIMIT = 75;
|
|
27
|
-
const AtSignMentionsRegex = new RegExp('(^|\\s|\\()(' + '[' + TRIGGERS + ']' + '((?:' + VALID_CHARS + VALID_JOINS + '){0,' + LENGTH_LIMIT + '})' + ')$');
|
|
28
|
-
// 50 is the longest alias length limit.
|
|
29
|
-
const ALIAS_LENGTH_LIMIT = 50;
|
|
30
|
-
// Regex used to match alias.
|
|
31
|
-
const AtSignMentionsRegexAliasRegex = new RegExp('(^|\\s|\\()(' + '[' + TRIGGERS + ']' + '((?:' + VALID_CHARS + '){0,' + ALIAS_LENGTH_LIMIT + '})' + ')$');
|
|
32
|
-
// At most, 5 suggestions are shown in the popup.
|
|
33
|
-
const SUGGESTION_LIST_LENGTH_LIMIT = 5;
|
|
34
|
-
const mentionsCache = new Map();
|
|
35
|
-
const dummyMentionsData = [
|
|
36
|
-
'Aayla Secura',
|
|
37
|
-
'Adi Gallia',
|
|
38
|
-
'Admiral Dodd Rancit',
|
|
39
|
-
'Admiral Firmus Piett',
|
|
40
|
-
'Admiral Gial Ackbar',
|
|
41
|
-
'Admiral Ozzel',
|
|
42
|
-
'Admiral Raddus',
|
|
43
|
-
'Admiral Terrinald Screed',
|
|
44
|
-
'Admiral Trench',
|
|
45
|
-
'Admiral U.O. Statura',
|
|
46
|
-
'Agen Kolar',
|
|
47
|
-
'Agent Kallus',
|
|
48
|
-
'Aiolin and Morit Astarte',
|
|
49
|
-
'Aks Moe',
|
|
50
|
-
'Almec',
|
|
51
|
-
'Alton Kastle',
|
|
52
|
-
'Amee',
|
|
53
|
-
'AP-5',
|
|
54
|
-
'Armitage Hux',
|
|
55
|
-
'Artoo',
|
|
56
|
-
'Arvel Crynyd',
|
|
57
|
-
'Asajj Ventress',
|
|
58
|
-
'Aurra Sing',
|
|
59
|
-
'AZI-3',
|
|
60
|
-
'Bala-Tik',
|
|
61
|
-
'Barada',
|
|
62
|
-
'Bargwill Tomder',
|
|
63
|
-
'Baron Papanoida',
|
|
64
|
-
'Barriss Offee',
|
|
65
|
-
'Baze Malbus',
|
|
66
|
-
'Bazine Netal',
|
|
67
|
-
'BB-8',
|
|
68
|
-
'BB-9E',
|
|
69
|
-
'Ben Quadinaros',
|
|
70
|
-
'Berch Teller',
|
|
71
|
-
'Beru Lars',
|
|
72
|
-
'Bib Fortuna',
|
|
73
|
-
'Biggs Darklighter',
|
|
74
|
-
'Black Krrsantan',
|
|
75
|
-
'Bo-Katan Kryze',
|
|
76
|
-
'Boba Fett',
|
|
77
|
-
'Bobbajo',
|
|
78
|
-
'Bodhi Rook',
|
|
79
|
-
'Borvo the Hutt',
|
|
80
|
-
'Boss Nass',
|
|
81
|
-
'Bossk',
|
|
82
|
-
'Breha Antilles-Organa',
|
|
83
|
-
'Bren Derlin',
|
|
84
|
-
'Brendol Hux',
|
|
85
|
-
'BT-1',
|
|
86
|
-
'C-3PO',
|
|
87
|
-
'C1-10P',
|
|
88
|
-
'Cad Bane',
|
|
89
|
-
'Caluan Ematt',
|
|
90
|
-
'Captain Gregor',
|
|
91
|
-
'Captain Phasma',
|
|
92
|
-
'Captain Quarsh Panaka',
|
|
93
|
-
'Captain Rex',
|
|
94
|
-
'Carlist Rieekan',
|
|
95
|
-
'Casca Panzoro',
|
|
96
|
-
'Cassian Andor',
|
|
97
|
-
'Cassio Tagge',
|
|
98
|
-
'Cham Syndulla',
|
|
99
|
-
'Che Amanwe Papanoida',
|
|
100
|
-
'Chewbacca',
|
|
101
|
-
'Chi Eekway Papanoida',
|
|
102
|
-
'Chief Chirpa',
|
|
103
|
-
'Chirrut Îmwe',
|
|
104
|
-
'Ciena Ree',
|
|
105
|
-
'Cin Drallig',
|
|
106
|
-
'Clegg Holdfast',
|
|
107
|
-
'Cliegg Lars',
|
|
108
|
-
'Coleman Kcaj',
|
|
109
|
-
'Coleman Trebor',
|
|
110
|
-
'Colonel Kaplan',
|
|
111
|
-
'Commander Bly',
|
|
112
|
-
'Commander Cody (CC-2224)',
|
|
113
|
-
'Commander Fil (CC-3714)',
|
|
114
|
-
'Commander Fox',
|
|
115
|
-
'Commander Gree',
|
|
116
|
-
'Commander Jet',
|
|
117
|
-
'Commander Wolffe',
|
|
118
|
-
'Conan Antonio Motti',
|
|
119
|
-
'Conder Kyl',
|
|
120
|
-
'Constable Zuvio',
|
|
121
|
-
'Cordé',
|
|
122
|
-
'Cpatain Typho',
|
|
123
|
-
'Crix Madine',
|
|
124
|
-
'Cut Lawquane',
|
|
125
|
-
'Dak Ralter',
|
|
126
|
-
'Dapp',
|
|
127
|
-
'Darth Bane',
|
|
128
|
-
'Darth Maul',
|
|
129
|
-
'Darth Tyranus',
|
|
130
|
-
'Daultay Dofine',
|
|
131
|
-
'Del Meeko',
|
|
132
|
-
'Delian Mors',
|
|
133
|
-
'Dengar',
|
|
134
|
-
'Depa Billaba',
|
|
135
|
-
'Derek Klivian',
|
|
136
|
-
'Dexter Jettster',
|
|
137
|
-
'Dineé Ellberger',
|
|
138
|
-
'DJ',
|
|
139
|
-
'Doctor Aphra',
|
|
140
|
-
'Doctor Evazan',
|
|
141
|
-
'Dogma',
|
|
142
|
-
'Dormé',
|
|
143
|
-
'Dr. Cylo',
|
|
144
|
-
'Droidbait',
|
|
145
|
-
'Droopy McCool',
|
|
146
|
-
'Dryden Vos',
|
|
147
|
-
'Dud Bolt',
|
|
148
|
-
'Ebe E. Endocott',
|
|
149
|
-
'Echuu Shen-Jon',
|
|
150
|
-
'Eeth Koth',
|
|
151
|
-
'Eighth Brother',
|
|
152
|
-
'Eirtaé',
|
|
153
|
-
'Eli Vanto',
|
|
154
|
-
'Ellé',
|
|
155
|
-
'Ello Asty',
|
|
156
|
-
'Embo',
|
|
157
|
-
'Eneb Ray',
|
|
158
|
-
'Enfys Nest',
|
|
159
|
-
'EV-9D9',
|
|
160
|
-
'Evaan Verlaine',
|
|
161
|
-
'Even Piell',
|
|
162
|
-
'Ezra Bridger',
|
|
163
|
-
'Faro Argyus',
|
|
164
|
-
'Feral',
|
|
165
|
-
'Fifth Brother',
|
|
166
|
-
'Finis Valorum',
|
|
167
|
-
'Finn',
|
|
168
|
-
'Fives',
|
|
169
|
-
'FN-1824',
|
|
170
|
-
'FN-2003',
|
|
171
|
-
'Fodesinbeed Annodue',
|
|
172
|
-
'Fulcrum',
|
|
173
|
-
'FX-7',
|
|
174
|
-
'GA-97',
|
|
175
|
-
'Galen Erso',
|
|
176
|
-
'Gallius Rax',
|
|
177
|
-
'Garazeb "Zeb" Orrelios',
|
|
178
|
-
'Gardulla the Hutt',
|
|
179
|
-
'Garrick Versio',
|
|
180
|
-
'Garven Dreis',
|
|
181
|
-
'Gavyn Sykes',
|
|
182
|
-
'Gideon Hask',
|
|
183
|
-
'Gizor Dellso',
|
|
184
|
-
'Gonk droid',
|
|
185
|
-
'Grand Inquisitor',
|
|
186
|
-
'Greeata Jendowanian',
|
|
187
|
-
'Greedo',
|
|
188
|
-
'Greer Sonnel',
|
|
189
|
-
'Grievous',
|
|
190
|
-
'Grummgar',
|
|
191
|
-
'Gungi',
|
|
192
|
-
'Hammerhead',
|
|
193
|
-
'Han Solo',
|
|
194
|
-
'Harter Kalonia',
|
|
195
|
-
'Has Obbit',
|
|
196
|
-
'Hera Syndulla',
|
|
197
|
-
'Hevy',
|
|
198
|
-
'Hondo Ohnaka',
|
|
199
|
-
'Huyang',
|
|
200
|
-
'Iden Versio',
|
|
201
|
-
'IG-88',
|
|
202
|
-
'Ima-Gun Di',
|
|
203
|
-
'Inquisitors',
|
|
204
|
-
'Inspector Thanoth',
|
|
205
|
-
'Jabba',
|
|
206
|
-
'Jacen Syndulla',
|
|
207
|
-
'Jan Dodonna',
|
|
208
|
-
'Jango Fett',
|
|
209
|
-
'Janus Greejatus',
|
|
210
|
-
'Jar Jar Binks',
|
|
211
|
-
'Jas Emari',
|
|
212
|
-
'Jaxxon',
|
|
213
|
-
'Jek Tono Porkins',
|
|
214
|
-
'Jeremoch Colton',
|
|
215
|
-
'Jira',
|
|
216
|
-
'Jobal Naberrie',
|
|
217
|
-
'Jocasta Nu',
|
|
218
|
-
'Joclad Danva',
|
|
219
|
-
'Joh Yowza',
|
|
220
|
-
'Jom Barell',
|
|
221
|
-
'Joph Seastriker',
|
|
222
|
-
'Jova Tarkin',
|
|
223
|
-
'Jubnuk',
|
|
224
|
-
'Jyn Erso',
|
|
225
|
-
'K-2SO',
|
|
226
|
-
'Kanan Jarrus',
|
|
227
|
-
'Karbin',
|
|
228
|
-
'Karina the Great',
|
|
229
|
-
'Kes Dameron',
|
|
230
|
-
'Ketsu Onyo',
|
|
231
|
-
'Ki-Adi-Mundi',
|
|
232
|
-
'King Katuunko',
|
|
233
|
-
'Kit Fisto',
|
|
234
|
-
'Kitster Banai',
|
|
235
|
-
'Klaatu',
|
|
236
|
-
'Klik-Klak',
|
|
237
|
-
'Korr Sella',
|
|
238
|
-
'Kylo Ren',
|
|
239
|
-
'L3-37',
|
|
240
|
-
'Lama Su',
|
|
241
|
-
'Lando Calrissian',
|
|
242
|
-
'Lanever Villecham',
|
|
243
|
-
'Leia Organa',
|
|
244
|
-
'Letta Turmond',
|
|
245
|
-
'Lieutenant Kaydel Ko Connix',
|
|
246
|
-
'Lieutenant Thire',
|
|
247
|
-
'Lobot',
|
|
248
|
-
'Logray',
|
|
249
|
-
'Lok Durd',
|
|
250
|
-
'Longo Two-Guns',
|
|
251
|
-
'Lor San Tekka',
|
|
252
|
-
'Lorth Needa',
|
|
253
|
-
'Lott Dod',
|
|
254
|
-
'Luke Skywalker',
|
|
255
|
-
'Lumat',
|
|
256
|
-
'Luminara Unduli',
|
|
257
|
-
'Lux Bonteri',
|
|
258
|
-
'Lyn Me',
|
|
259
|
-
'Lyra Erso',
|
|
260
|
-
'Mace Windu',
|
|
261
|
-
'Malakili',
|
|
262
|
-
'Mama the Hutt',
|
|
263
|
-
'Mars Guo',
|
|
264
|
-
'Mas Amedda',
|
|
265
|
-
'Mawhonic',
|
|
266
|
-
'Max Rebo',
|
|
267
|
-
'Maximilian Veers',
|
|
268
|
-
'Maz Kanata',
|
|
269
|
-
'ME-8D9',
|
|
270
|
-
'Meena Tills',
|
|
271
|
-
'Mercurial Swift',
|
|
272
|
-
'Mina Bonteri',
|
|
273
|
-
'Miraj Scintel',
|
|
274
|
-
'Mister Bones',
|
|
275
|
-
'Mod Terrik',
|
|
276
|
-
'Moden Canady',
|
|
277
|
-
'Mon Mothma',
|
|
278
|
-
'Moradmin Bast',
|
|
279
|
-
'Moralo Eval',
|
|
280
|
-
'Morley',
|
|
281
|
-
'Mother Talzin',
|
|
282
|
-
'Nahdar Vebb',
|
|
283
|
-
'Nahdonnis Praji',
|
|
284
|
-
'Nien Nunb',
|
|
285
|
-
'Niima the Hutt',
|
|
286
|
-
'Nines',
|
|
287
|
-
'Norra Wexley',
|
|
288
|
-
'Nute Gunray',
|
|
289
|
-
'Nuvo Vindi',
|
|
290
|
-
'Obi-Wan Kenobi',
|
|
291
|
-
'Odd Ball',
|
|
292
|
-
'Ody Mandrell',
|
|
293
|
-
'Omi',
|
|
294
|
-
'Onaconda Farr',
|
|
295
|
-
'Oola',
|
|
296
|
-
'OOM-9',
|
|
297
|
-
'Oppo Rancisis',
|
|
298
|
-
'Orn Free Taa',
|
|
299
|
-
'Oro Dassyne',
|
|
300
|
-
'Orrimarko',
|
|
301
|
-
'Osi Sobeck',
|
|
302
|
-
'Owen Lars',
|
|
303
|
-
'Pablo-Jill',
|
|
304
|
-
'Padmé Amidala',
|
|
305
|
-
'Pagetti Rook',
|
|
306
|
-
'Paige Tico',
|
|
307
|
-
'Paploo',
|
|
308
|
-
'Petty Officer Thanisson',
|
|
309
|
-
'Pharl McQuarrie',
|
|
310
|
-
'Plo Koon',
|
|
311
|
-
'Po Nudo',
|
|
312
|
-
'Poe Dameron',
|
|
313
|
-
'Poggle the Lesser',
|
|
314
|
-
'Pong Krell',
|
|
315
|
-
'Pooja Naberrie',
|
|
316
|
-
'PZ-4CO',
|
|
317
|
-
'Quarrie',
|
|
318
|
-
'Quay Tolsite',
|
|
319
|
-
'Queen Apailana',
|
|
320
|
-
'Queen Jamillia',
|
|
321
|
-
'Queen Neeyutnee',
|
|
322
|
-
'Qui-Gon Jinn',
|
|
323
|
-
'Quiggold',
|
|
324
|
-
'Quinlan Vos',
|
|
325
|
-
'R2-D2',
|
|
326
|
-
'R2-KT',
|
|
327
|
-
'R3-S6',
|
|
328
|
-
'R4-P17',
|
|
329
|
-
'R5-D4',
|
|
330
|
-
'RA-7',
|
|
331
|
-
'Rabé',
|
|
332
|
-
'Rako Hardeen',
|
|
333
|
-
'Ransolm Casterfo',
|
|
334
|
-
'Rappertunie',
|
|
335
|
-
'Ratts Tyerell',
|
|
336
|
-
'Raymus Antilles',
|
|
337
|
-
'Ree-Yees',
|
|
338
|
-
'Reeve Panzoro',
|
|
339
|
-
'Rey',
|
|
340
|
-
'Ric Olié',
|
|
341
|
-
'Riff Tamson',
|
|
342
|
-
'Riley',
|
|
343
|
-
'Rinnriyin Di',
|
|
344
|
-
'Rio Durant',
|
|
345
|
-
'Rogue Squadron',
|
|
346
|
-
'Romba',
|
|
347
|
-
'Roos Tarpals',
|
|
348
|
-
'Rose Tico',
|
|
349
|
-
'Rotta the Hutt',
|
|
350
|
-
'Rukh',
|
|
351
|
-
'Rune Haako',
|
|
352
|
-
'Rush Clovis',
|
|
353
|
-
'Ruwee Naberrie',
|
|
354
|
-
'Ryoo Naberrie',
|
|
355
|
-
'Sabé',
|
|
356
|
-
'Sabine Wren',
|
|
357
|
-
'Saché',
|
|
358
|
-
'Saelt-Marae',
|
|
359
|
-
'Saesee Tiin',
|
|
360
|
-
'Salacious B. Crumb',
|
|
361
|
-
'San Hill',
|
|
362
|
-
'Sana Starros',
|
|
363
|
-
'Sarco Plank',
|
|
364
|
-
'Sarkli',
|
|
365
|
-
'Satine Kryze',
|
|
366
|
-
'Savage Opress',
|
|
367
|
-
'Sebulba',
|
|
368
|
-
'Senator Organa',
|
|
369
|
-
'Sergeant Kreel',
|
|
370
|
-
'Seventh Sister',
|
|
371
|
-
'Shaak Ti',
|
|
372
|
-
'Shara Bey',
|
|
373
|
-
'Shmi Skywalker',
|
|
374
|
-
'Shu Mai',
|
|
375
|
-
'Sidon Ithano',
|
|
376
|
-
'Sifo-Dyas',
|
|
377
|
-
'Sim Aloo',
|
|
378
|
-
'Siniir Rath Velus',
|
|
379
|
-
'Sio Bibble',
|
|
380
|
-
'Sixth Brother',
|
|
381
|
-
'Slowen Lo',
|
|
382
|
-
'Sly Moore',
|
|
383
|
-
'Snaggletooth',
|
|
384
|
-
'Snap Wexley',
|
|
385
|
-
'Snoke',
|
|
386
|
-
'Sola Naberrie',
|
|
387
|
-
'Sora Bulq',
|
|
388
|
-
'Strono Tuggs',
|
|
389
|
-
'Sy Snootles',
|
|
390
|
-
'Tallissan Lintra',
|
|
391
|
-
'Tarfful',
|
|
392
|
-
'Tasu Leech',
|
|
393
|
-
'Taun We',
|
|
394
|
-
'TC-14',
|
|
395
|
-
'Tee Watt Kaa',
|
|
396
|
-
'Teebo',
|
|
397
|
-
'Teedo',
|
|
398
|
-
'Teemto Pagalies',
|
|
399
|
-
'Temiri Blagg',
|
|
400
|
-
'Tessek',
|
|
401
|
-
'Tey How',
|
|
402
|
-
'Thane Kyrell',
|
|
403
|
-
'The Bendu',
|
|
404
|
-
'The Smuggler',
|
|
405
|
-
'Thrawn',
|
|
406
|
-
'Tiaan Jerjerrod',
|
|
407
|
-
'Tion Medon',
|
|
408
|
-
'Tobias Beckett',
|
|
409
|
-
'Tulon Voidgazer',
|
|
410
|
-
'Tup',
|
|
411
|
-
'U9-C4',
|
|
412
|
-
'Unkar Plutt',
|
|
413
|
-
'Val Beckett',
|
|
414
|
-
'Vanden Willard',
|
|
415
|
-
'Vice Admiral Amilyn Holdo',
|
|
416
|
-
'Vober Dand',
|
|
417
|
-
'WAC-47',
|
|
418
|
-
'Wag Too',
|
|
419
|
-
'Wald',
|
|
420
|
-
'Walrus Man',
|
|
421
|
-
'Warok',
|
|
422
|
-
'Wat Tambor',
|
|
423
|
-
'Watto',
|
|
424
|
-
'Wedge Antilles',
|
|
425
|
-
'Wes Janson',
|
|
426
|
-
'Wicket W. Warrick',
|
|
427
|
-
'Wilhuff Tarkin',
|
|
428
|
-
'Wollivan',
|
|
429
|
-
'Wuher',
|
|
430
|
-
'Wullf Yularen',
|
|
431
|
-
'Xamuel Lennox',
|
|
432
|
-
'Yaddle',
|
|
433
|
-
'Yarael Poof',
|
|
434
|
-
'Yoda',
|
|
435
|
-
'Zam Wesell',
|
|
436
|
-
'Zev Senesca',
|
|
437
|
-
'Ziro the Hutt',
|
|
438
|
-
'Zuckuss',
|
|
439
|
-
];
|
|
440
|
-
const dummyLookupService = {
|
|
441
|
-
search(string, callback) {
|
|
442
|
-
setTimeout(() => {
|
|
443
|
-
const results = dummyMentionsData.filter((mention) => mention.toLowerCase().includes(string.toLowerCase()));
|
|
444
|
-
callback(results);
|
|
445
|
-
}, 500);
|
|
446
|
-
},
|
|
447
|
-
};
|
|
448
|
-
function useMentionLookupService(mentionString) {
|
|
449
|
-
const [results, setResults] = useState([]);
|
|
450
|
-
useEffect(() => {
|
|
451
|
-
const cachedResults = mentionsCache.get(mentionString);
|
|
452
|
-
if (mentionString == null) {
|
|
453
|
-
setResults([]);
|
|
454
|
-
return;
|
|
455
|
-
}
|
|
456
|
-
if (cachedResults === null) {
|
|
457
|
-
return;
|
|
458
|
-
}
|
|
459
|
-
else if (cachedResults !== undefined) {
|
|
460
|
-
setResults(cachedResults);
|
|
461
|
-
return;
|
|
462
|
-
}
|
|
463
|
-
mentionsCache.set(mentionString, null);
|
|
464
|
-
dummyLookupService.search(mentionString, (newResults) => {
|
|
465
|
-
mentionsCache.set(mentionString, newResults);
|
|
466
|
-
setResults(newResults);
|
|
467
|
-
});
|
|
468
|
-
}, [mentionString]);
|
|
469
|
-
return results;
|
|
470
|
-
}
|
|
471
|
-
function checkForAtSignMentions(text, minMatchLength) {
|
|
472
|
-
let match = AtSignMentionsRegex.exec(text);
|
|
473
|
-
if (match === null) {
|
|
474
|
-
match = AtSignMentionsRegexAliasRegex.exec(text);
|
|
475
|
-
}
|
|
476
|
-
if (match !== null) {
|
|
477
|
-
// The strategy ignores leading whitespace but we need to know it's
|
|
478
|
-
// length to add it to the leadOffset
|
|
479
|
-
const maybeLeadingWhitespace = match[1];
|
|
480
|
-
const matchingString = match[3];
|
|
481
|
-
if (matchingString.length >= minMatchLength) {
|
|
482
|
-
return {
|
|
483
|
-
leadOffset: match.index + maybeLeadingWhitespace.length,
|
|
484
|
-
matchingString,
|
|
485
|
-
replaceableString: match[2],
|
|
486
|
-
};
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
return null;
|
|
490
|
-
}
|
|
491
|
-
function getPossibleQueryMatch(text) {
|
|
492
|
-
return checkForAtSignMentions(text, 1);
|
|
493
|
-
}
|
|
494
|
-
class MentionTypeaheadOption extends MenuOption {
|
|
495
|
-
constructor(name, picture) {
|
|
496
|
-
super(name);
|
|
497
|
-
this.name = name;
|
|
498
|
-
this.picture = picture;
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
function MentionsTypeaheadMenuItem({ index, isSelected, onClick, onMouseEnter, option, }) {
|
|
502
|
-
let className = 'item';
|
|
503
|
-
if (isSelected) {
|
|
504
|
-
className += ' selected';
|
|
505
|
-
}
|
|
506
|
-
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 },
|
|
507
|
-
option.picture,
|
|
508
|
-
React.createElement("span", { className: 'text' }, option.name)));
|
|
509
|
-
}
|
|
510
|
-
export default function NewMentionsPlugin() {
|
|
511
|
-
const [editor] = useLexicalComposerContext();
|
|
512
|
-
const [queryString, setQueryString] = useState(null);
|
|
513
|
-
const results = useMentionLookupService(queryString);
|
|
514
|
-
const checkForSlashTriggerMatch = useBasicTypeaheadTriggerMatch('/', {
|
|
515
|
-
minLength: 0,
|
|
516
|
-
});
|
|
517
|
-
const options = useMemo(() => results
|
|
518
|
-
.map((result) => new MentionTypeaheadOption(result, React.createElement("i", { className: 'icon user' })))
|
|
519
|
-
.slice(0, SUGGESTION_LIST_LENGTH_LIMIT), [results]);
|
|
520
|
-
const onSelectOption = useCallback((selectedOption, nodeToReplace, closeMenu) => {
|
|
521
|
-
editor.update(() => {
|
|
522
|
-
const mentionNode = $createMentionNode(selectedOption.name);
|
|
523
|
-
if (nodeToReplace) {
|
|
524
|
-
nodeToReplace.replace(mentionNode);
|
|
525
|
-
}
|
|
526
|
-
mentionNode.select();
|
|
527
|
-
closeMenu();
|
|
528
|
-
});
|
|
529
|
-
}, [editor]);
|
|
530
|
-
const checkForMentionMatch = useCallback((text) => {
|
|
531
|
-
const slashMatch = checkForSlashTriggerMatch(text, editor);
|
|
532
|
-
if (slashMatch !== null) {
|
|
533
|
-
return null;
|
|
534
|
-
}
|
|
535
|
-
return getPossibleQueryMatch(text);
|
|
536
|
-
}, [checkForSlashTriggerMatch, editor]);
|
|
537
|
-
return (React.createElement(LexicalTypeaheadMenuPlugin, { menuRenderFn: (anchorElementRef, { selectOptionAndCleanUp, selectedIndex, setHighlightedIndex }) => anchorElementRef.current && results.length > 0
|
|
538
|
-
? ReactDOM.createPortal(React.createElement("div", { className: 'typeahead-popover mentions-menu' },
|
|
539
|
-
React.createElement("ul", null, options.map((option, i) => (React.createElement(MentionsTypeaheadMenuItem, { key: option.key, index: i, isSelected: selectedIndex === i, onClick: () => {
|
|
540
|
-
setHighlightedIndex(i);
|
|
541
|
-
selectOptionAndCleanUp(option);
|
|
542
|
-
}, onMouseEnter: () => {
|
|
543
|
-
setHighlightedIndex(i);
|
|
544
|
-
}, option: option }))))), anchorElementRef.current)
|
|
545
|
-
: null, onQueryChange: setQueryString, onSelectOption: onSelectOption, options: options, triggerFn: checkForMentionMatch }));
|
|
546
|
-
}
|
|
547
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/TextEditorV2/plugins/MentionsPlugin/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAA;AACjF,OAAO,EACL,0BAA0B,EAC1B,UAAU,EAEV,6BAA6B,GAC9B,MAAM,2CAA2C,CAAA;AAElD,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACjE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,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,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;QAC1D,IAAI,UAAU,KAAK,IAAI,EAAE,CAAC;YACxB,OAAO,IAAI,CAAA;QACb,CAAC;QACD,OAAO,qBAAqB,CAAC,IAAI,CAAC,CAAA;IACpC,CAAC,EACD,CAAC,yBAAyB,EAAE,MAAM,CAAC,CACpC,CAAA;IAED,OAAO,CACL,oBAAC,0BAA0B,IACzB,YAAY,EAAE,CAAC,gBAAgB,EAAE,EAAE,sBAAsB,EAAE,aAAa,EAAE,mBAAmB,EAAE,EAAE,EAAE,CACjG,gBAAgB,CAAC,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;YAC5C,CAAC,CAAC,QAAQ,CAAC,YAAY,CACnB,6BAAK,SAAS,EAAC,iCAAiC;gBAC9C,gCACG,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAS,EAAE,EAAE,CAAC,CAClC,oBAAC,yBAAyB,IACxB,GAAG,EAAE,MAAM,CAAC,GAAG,EACf,KAAK,EAAE,CAAC,EACR,UAAU,EAAE,aAAa,KAAK,CAAC,EAC/B,OAAO,EAAE,GAAG,EAAE;wBACZ,mBAAmB,CAAC,CAAC,CAAC,CAAA;wBACtB,sBAAsB,CAAC,MAAM,CAAC,CAAA;oBAChC,CAAC,EACD,YAAY,EAAE,GAAG,EAAE;wBACjB,mBAAmB,CAAC,CAAC,CAAC,CAAA;oBACxB,CAAC,EACD,MAAM,EAAE,MAAM,GACd,CACH,CAAC,CACC,CACD,EACN,gBAAgB,CAAC,OAAO,CACzB;YACH,CAAC,CAAC,IAAI,EAEV,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc,EAC9B,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,oBAAoB,GAC/B,CACH,CAAA;AACH,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
2
|
-
import { $insertNodeToNearestRoot, mergeRegister } from '@lexical/utils';
|
|
3
|
-
import { $getSelection, $isRangeSelection, COMMAND_PRIORITY_EDITOR, createCommand } from 'lexical';
|
|
4
|
-
import { useEffect } from 'react';
|
|
5
|
-
import { $createPageBreakNode, PageBreakNode } from '../../nodes/PageBreakNode';
|
|
6
|
-
export const INSERT_PAGE_BREAK = createCommand();
|
|
7
|
-
export default function PageBreakPlugin() {
|
|
8
|
-
const [editor] = useLexicalComposerContext();
|
|
9
|
-
useEffect(() => {
|
|
10
|
-
if (!editor.hasNodes([PageBreakNode])) {
|
|
11
|
-
throw new Error('PageBreakPlugin: PageBreakNode is not registered on editor');
|
|
12
|
-
}
|
|
13
|
-
return mergeRegister(editor.registerCommand(INSERT_PAGE_BREAK, () => {
|
|
14
|
-
const selection = $getSelection();
|
|
15
|
-
if (!$isRangeSelection(selection))
|
|
16
|
-
return false;
|
|
17
|
-
const focusNode = selection.focus.getNode();
|
|
18
|
-
if (focusNode !== null) {
|
|
19
|
-
const pgBreak = $createPageBreakNode();
|
|
20
|
-
$insertNodeToNearestRoot(pgBreak);
|
|
21
|
-
}
|
|
22
|
-
return true;
|
|
23
|
-
}, COMMAND_PRIORITY_EDITOR));
|
|
24
|
-
}, [editor]);
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/TextEditorV2/plugins/PageBreakPlugin/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAA;AACjF,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AACxE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,aAAa,EAAkB,MAAM,SAAS,CAAA;AAClH,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAE/E,MAAM,CAAC,MAAM,iBAAiB,GAA8B,aAAa,EAAE,CAAA;AAE3E,MAAM,CAAC,OAAO,UAAU,eAAe;IACrC,MAAM,CAAC,MAAM,CAAC,GAAG,yBAAyB,EAAE,CAAA;IAE5C,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC;YACtC,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAA;QAC/E,CAAC;QAED,OAAO,aAAa,CAClB,MAAM,CAAC,eAAe,CACpB,iBAAiB,EACjB,GAAG,EAAE;YACH,MAAM,SAAS,GAAG,aAAa,EAAE,CAAA;YAEjC,IAAI,CAAC,iBAAiB,CAAC,SAAS,CAAC;gBAAE,OAAO,KAAK,CAAA;YAE/C,MAAM,SAAS,GAAG,SAAS,CAAC,KAAK,CAAC,OAAO,EAAE,CAAA;YAC3C,IAAI,SAAS,KAAK,IAAI,EAAE,CAAC;gBACvB,MAAM,OAAO,GAAG,oBAAoB,EAAE,CAAA;gBACtC,wBAAwB,CAAC,OAAO,CAAC,CAAA;YACnC,CAAC;YAED,OAAO,IAAI,CAAA;QACb,CAAC,EACD,uBAAuB,CACxB,CACF,CAAA;IACH,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;IAEZ,OAAO,IAAI,CAAA;AACb,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { LexicalCommand, LexicalEditor } from 'lexical';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
export declare const INSERT_POLL_COMMAND: LexicalCommand<string>;
|
|
4
|
-
export declare function InsertPollDialog({ activeEditor, onClose, }: {
|
|
5
|
-
activeEditor: LexicalEditor;
|
|
6
|
-
onClose(): void;
|
|
7
|
-
}): React.JSX.Element;
|
|
8
|
-
export default function PollPlugin(): React.JSX.Element | null;
|
|
@@ -1,39 +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, useState } from 'react';
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
import { $createPollNode, createPollOption, PollNode } from '../../nodes/PollNode';
|
|
7
|
-
import Button from '../../ui/Button';
|
|
8
|
-
import { DialogActions } from '../../ui/Dialog';
|
|
9
|
-
import TextInput from '../../ui/TextInput';
|
|
10
|
-
export const INSERT_POLL_COMMAND = createCommand('INSERT_POLL_COMMAND');
|
|
11
|
-
export function InsertPollDialog({ activeEditor, onClose, }) {
|
|
12
|
-
const [question, setQuestion] = useState('');
|
|
13
|
-
const onClick = () => {
|
|
14
|
-
activeEditor.dispatchCommand(INSERT_POLL_COMMAND, question);
|
|
15
|
-
onClose();
|
|
16
|
-
};
|
|
17
|
-
return (React.createElement(React.Fragment, null,
|
|
18
|
-
React.createElement(TextInput, { label: 'Question', onChange: setQuestion, value: question }),
|
|
19
|
-
React.createElement(DialogActions, null,
|
|
20
|
-
React.createElement(Button, { disabled: question.trim() === '', onClick: onClick }, "Confirm"))));
|
|
21
|
-
}
|
|
22
|
-
export default function PollPlugin() {
|
|
23
|
-
const [editor] = useLexicalComposerContext();
|
|
24
|
-
useEffect(() => {
|
|
25
|
-
if (!editor.hasNodes([PollNode])) {
|
|
26
|
-
throw new Error('PollPlugin: PollNode not registered on editor');
|
|
27
|
-
}
|
|
28
|
-
return editor.registerCommand(INSERT_POLL_COMMAND, (payload) => {
|
|
29
|
-
const pollNode = $createPollNode(payload, [createPollOption(), createPollOption()]);
|
|
30
|
-
$insertNodes([pollNode]);
|
|
31
|
-
if ($isRootOrShadowRoot(pollNode.getParentOrThrow())) {
|
|
32
|
-
$wrapNodeInElement(pollNode, $createParagraphNode).selectEnd();
|
|
33
|
-
}
|
|
34
|
-
return true;
|
|
35
|
-
}, COMMAND_PRIORITY_EDITOR);
|
|
36
|
-
}, [editor]);
|
|
37
|
-
return null;
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/TextEditorV2/plugins/PollPlugin/index.tsx"],"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,GAGd,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAClF,OAAO,MAAM,MAAM,iBAAiB,CAAA;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,SAAS,MAAM,oBAAoB,CAAA;AAE1C,MAAM,CAAC,MAAM,mBAAmB,GAA2B,aAAa,CAAC,qBAAqB,CAAC,CAAA;AAE/F,MAAM,UAAU,gBAAgB,CAAC,EAC/B,YAAY,EACZ,OAAO,GAIR;IACC,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAA;IAE5C,MAAM,OAAO,GAAG,GAAG,EAAE;QACnB,YAAY,CAAC,eAAe,CAAC,mBAAmB,EAAE,QAAQ,CAAC,CAAA;QAC3D,OAAO,EAAE,CAAA;IACX,CAAC,CAAA;IAED,OAAO,CACL;QACE,oBAAC,SAAS,IAAC,KAAK,EAAC,UAAU,EAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,GAAI;QACtE,oBAAC,aAAa;YACZ,oBAAC,MAAM,IAAC,QAAQ,EAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,cAEjD,CACK,CACf,CACJ,CAAA;AACH,CAAC;AAED,MAAM,CAAC,OAAO,UAAU,UAAU;IAChC,MAAM,CAAC,MAAM,CAAC,GAAG,yBAAyB,EAAE,CAAA;IAC5C,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAA;QAClE,CAAC;QAED,OAAO,MAAM,CAAC,eAAe,CAC3B,mBAAmB,EACnB,CAAC,OAAO,EAAE,EAAE;YACV,MAAM,QAAQ,GAAG,eAAe,CAAC,OAAO,EAAE,CAAC,gBAAgB,EAAE,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAA;YACnF,YAAY,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAA;YACxB,IAAI,mBAAmB,CAAC,QAAQ,CAAC,gBAAgB,EAAE,CAAC,EAAE,CAAC;gBACrD,kBAAkB,CAAC,QAAQ,EAAE,oBAAoB,CAAC,CAAC,SAAS,EAAE,CAAA;YAChE,CAAC;YAED,OAAO,IAAI,CAAA;QACb,CAAC,EACD,uBAAuB,CACxB,CAAA;IACH,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;IACZ,OAAO,IAAI,CAAA;AACb,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function StickyPlugin(): React.JSX.Element | null;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
2
|
-
import { useEffect } from 'react';
|
|
3
|
-
import { StickyNode } from '../../nodes/StickyNode';
|
|
4
|
-
export default function StickyPlugin() {
|
|
5
|
-
const [editor] = useLexicalComposerContext();
|
|
6
|
-
useEffect(() => {
|
|
7
|
-
if (!editor.hasNodes([StickyNode])) {
|
|
8
|
-
throw new Error('StickyPlugin: StickyNode not registered on editor');
|
|
9
|
-
}
|
|
10
|
-
}, [editor]);
|
|
11
|
-
return null;
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/TextEditorV2/plugins/StickyPlugin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAA;AACjF,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAEnD,MAAM,CAAC,OAAO,UAAU,YAAY;IAClC,MAAM,CAAC,MAAM,CAAC,GAAG,yBAAyB,EAAE,CAAA;IAC5C,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC;YACnC,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAA;QACtE,CAAC;IACH,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;IACZ,OAAO,IAAI,CAAA;AACb,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function TabFocusPlugin(): null;
|