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,166 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = StickyComponent;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const LexicalCollaborationContext_1 = require("@lexical/react/LexicalCollaborationContext");
|
|
6
|
-
const LexicalCollaborationPlugin_1 = require("@lexical/react/LexicalCollaborationPlugin");
|
|
7
|
-
const LexicalComposerContext_1 = require("@lexical/react/LexicalComposerContext");
|
|
8
|
-
const LexicalErrorBoundary_1 = tslib_1.__importDefault(require("@lexical/react/LexicalErrorBoundary"));
|
|
9
|
-
const LexicalHistoryPlugin_1 = require("@lexical/react/LexicalHistoryPlugin");
|
|
10
|
-
const LexicalNestedComposer_1 = require("@lexical/react/LexicalNestedComposer");
|
|
11
|
-
const LexicalPlainTextPlugin_1 = require("@lexical/react/LexicalPlainTextPlugin");
|
|
12
|
-
const lexical_1 = require("lexical");
|
|
13
|
-
const React = tslib_1.__importStar(require("react"));
|
|
14
|
-
const react_1 = require("react");
|
|
15
|
-
const SharedHistoryContext_1 = require("../context/SharedHistoryContext");
|
|
16
|
-
const collaboration_1 = require("../lib/collaboration");
|
|
17
|
-
const useLayoutEffect_1 = tslib_1.__importDefault(require("../shared/useLayoutEffect"));
|
|
18
|
-
const StickyEditorTheme_1 = tslib_1.__importDefault(require("../themes/StickyEditorTheme"));
|
|
19
|
-
const ContentEditable_1 = tslib_1.__importDefault(require("../ui/ContentEditable"));
|
|
20
|
-
const Placeholder_1 = tslib_1.__importDefault(require("../ui/Placeholder"));
|
|
21
|
-
const StickyNode_1 = require("./StickyNode");
|
|
22
|
-
function positionSticky(stickyElem, positioning) {
|
|
23
|
-
const style = stickyElem.style;
|
|
24
|
-
const rootElementRect = positioning.rootElementRect;
|
|
25
|
-
const rectLeft = rootElementRect !== null ? rootElementRect.left : 0;
|
|
26
|
-
const rectTop = rootElementRect !== null ? rootElementRect.top : 0;
|
|
27
|
-
style.top = rectTop + positioning.y + 'px';
|
|
28
|
-
style.left = rectLeft + positioning.x + 'px';
|
|
29
|
-
}
|
|
30
|
-
function StickyComponent({ caption, color, nodeKey, x, y, }) {
|
|
31
|
-
const [editor] = (0, LexicalComposerContext_1.useLexicalComposerContext)();
|
|
32
|
-
const stickyContainerRef = (0, react_1.useRef)(null);
|
|
33
|
-
const positioningRef = (0, react_1.useRef)({
|
|
34
|
-
isDragging: false,
|
|
35
|
-
offsetX: 0,
|
|
36
|
-
offsetY: 0,
|
|
37
|
-
rootElementRect: null,
|
|
38
|
-
x: 0,
|
|
39
|
-
y: 0,
|
|
40
|
-
});
|
|
41
|
-
const { isCollabActive } = (0, LexicalCollaborationContext_1.useCollaborationContext)();
|
|
42
|
-
(0, react_1.useEffect)(() => {
|
|
43
|
-
const position = positioningRef.current;
|
|
44
|
-
position.x = x;
|
|
45
|
-
position.y = y;
|
|
46
|
-
const stickyContainer = stickyContainerRef.current;
|
|
47
|
-
if (stickyContainer !== null) {
|
|
48
|
-
positionSticky(stickyContainer, position);
|
|
49
|
-
}
|
|
50
|
-
}, [x, y]);
|
|
51
|
-
(0, useLayoutEffect_1.default)(() => {
|
|
52
|
-
const position = positioningRef.current;
|
|
53
|
-
const resizeObserver = new ResizeObserver((entries) => {
|
|
54
|
-
for (let i = 0; i < entries.length; i++) {
|
|
55
|
-
const entry = entries[i];
|
|
56
|
-
const { target } = entry;
|
|
57
|
-
position.rootElementRect = target.getBoundingClientRect();
|
|
58
|
-
const stickyContainer = stickyContainerRef.current;
|
|
59
|
-
if (stickyContainer !== null) {
|
|
60
|
-
positionSticky(stickyContainer, position);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
const removeRootListener = editor.registerRootListener((nextRootElem, prevRootElem) => {
|
|
65
|
-
if (prevRootElem !== null) {
|
|
66
|
-
resizeObserver.unobserve(prevRootElem);
|
|
67
|
-
}
|
|
68
|
-
if (nextRootElem !== null) {
|
|
69
|
-
resizeObserver.observe(nextRootElem);
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
const handleWindowResize = () => {
|
|
73
|
-
const rootElement = editor.getRootElement();
|
|
74
|
-
const stickyContainer = stickyContainerRef.current;
|
|
75
|
-
if (rootElement !== null && stickyContainer !== null) {
|
|
76
|
-
position.rootElementRect = rootElement.getBoundingClientRect();
|
|
77
|
-
positionSticky(stickyContainer, position);
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
window.addEventListener('resize', handleWindowResize);
|
|
81
|
-
return () => {
|
|
82
|
-
window.removeEventListener('resize', handleWindowResize);
|
|
83
|
-
removeRootListener();
|
|
84
|
-
};
|
|
85
|
-
}, [editor]);
|
|
86
|
-
(0, react_1.useEffect)(() => {
|
|
87
|
-
const stickyContainer = stickyContainerRef.current;
|
|
88
|
-
if (stickyContainer !== null) {
|
|
89
|
-
// Delay adding transition so we don't trigger the
|
|
90
|
-
// transition on load of the sticky.
|
|
91
|
-
setTimeout(() => {
|
|
92
|
-
stickyContainer.style.setProperty('transition', 'top 0.3s ease 0s, left 0.3s ease 0s');
|
|
93
|
-
}, 500);
|
|
94
|
-
}
|
|
95
|
-
}, []);
|
|
96
|
-
const handlePointerMove = (event) => {
|
|
97
|
-
const stickyContainer = stickyContainerRef.current;
|
|
98
|
-
const positioning = positioningRef.current;
|
|
99
|
-
const rootElementRect = positioning.rootElementRect;
|
|
100
|
-
if (stickyContainer !== null && positioning.isDragging && rootElementRect !== null) {
|
|
101
|
-
positioning.x = event.pageX - positioning.offsetX - rootElementRect.left;
|
|
102
|
-
positioning.y = event.pageY - positioning.offsetY - rootElementRect.top;
|
|
103
|
-
positionSticky(stickyContainer, positioning);
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
const handlePointerUp = () => {
|
|
107
|
-
const stickyContainer = stickyContainerRef.current;
|
|
108
|
-
const positioning = positioningRef.current;
|
|
109
|
-
if (stickyContainer !== null) {
|
|
110
|
-
positioning.isDragging = false;
|
|
111
|
-
stickyContainer.classList.remove('dragging');
|
|
112
|
-
editor.update(() => {
|
|
113
|
-
const node = (0, lexical_1.$getNodeByKey)(nodeKey);
|
|
114
|
-
if ((0, StickyNode_1.$isStickyNode)(node)) {
|
|
115
|
-
node.setPosition(positioning.x, positioning.y);
|
|
116
|
-
}
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
document.removeEventListener('pointermove', handlePointerMove);
|
|
120
|
-
document.removeEventListener('pointerup', handlePointerUp);
|
|
121
|
-
};
|
|
122
|
-
const handleDelete = () => {
|
|
123
|
-
editor.update(() => {
|
|
124
|
-
const node = (0, lexical_1.$getNodeByKey)(nodeKey);
|
|
125
|
-
if ((0, StickyNode_1.$isStickyNode)(node)) {
|
|
126
|
-
node.remove();
|
|
127
|
-
}
|
|
128
|
-
});
|
|
129
|
-
};
|
|
130
|
-
const handleColorChange = () => {
|
|
131
|
-
editor.update(() => {
|
|
132
|
-
const node = (0, lexical_1.$getNodeByKey)(nodeKey);
|
|
133
|
-
if ((0, StickyNode_1.$isStickyNode)(node)) {
|
|
134
|
-
node.toggleColor();
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
|
-
};
|
|
138
|
-
const { historyState } = (0, SharedHistoryContext_1.useSharedHistoryContext)();
|
|
139
|
-
return (React.createElement("div", { ref: stickyContainerRef, className: 'sticky-note-container' },
|
|
140
|
-
React.createElement("div", { className: `sticky-note ${color}`, onPointerDown: (event) => {
|
|
141
|
-
const stickyContainer = stickyContainerRef.current;
|
|
142
|
-
if (stickyContainer == null || event.button === 2 || event.target !== stickyContainer.firstChild) {
|
|
143
|
-
// Right click or click on editor should not work
|
|
144
|
-
return;
|
|
145
|
-
}
|
|
146
|
-
const stickContainer = stickyContainer;
|
|
147
|
-
const positioning = positioningRef.current;
|
|
148
|
-
if (stickContainer !== null) {
|
|
149
|
-
const { left, top } = stickContainer.getBoundingClientRect();
|
|
150
|
-
positioning.offsetX = event.clientX - left;
|
|
151
|
-
positioning.offsetY = event.clientY - top;
|
|
152
|
-
positioning.isDragging = true;
|
|
153
|
-
stickContainer.classList.add('dragging');
|
|
154
|
-
document.addEventListener('pointermove', handlePointerMove);
|
|
155
|
-
document.addEventListener('pointerup', handlePointerUp);
|
|
156
|
-
event.preventDefault();
|
|
157
|
-
}
|
|
158
|
-
} },
|
|
159
|
-
React.createElement("button", { "aria-label": 'Delete sticky note', className: 'delete', onClick: handleDelete, title: 'Delete', type: 'button' }, "X"),
|
|
160
|
-
React.createElement("button", { "aria-label": 'Change sticky note color', className: 'color', onClick: handleColorChange, title: 'Color', type: 'button' },
|
|
161
|
-
React.createElement("i", { className: 'bucket' })),
|
|
162
|
-
React.createElement(LexicalNestedComposer_1.LexicalNestedComposer, { initialEditor: caption, initialTheme: StickyEditorTheme_1.default },
|
|
163
|
-
isCollabActive ? (React.createElement(LexicalCollaborationPlugin_1.CollaborationPlugin, { id: caption.getKey(), providerFactory: collaboration_1.createWebsocketProvider, shouldBootstrap: true })) : (React.createElement(LexicalHistoryPlugin_1.HistoryPlugin, { externalHistoryState: historyState })),
|
|
164
|
-
React.createElement(LexicalPlainTextPlugin_1.PlainTextPlugin, { contentEditable: React.createElement(ContentEditable_1.default, { className: 'StickyNode__contentEditable' }), ErrorBoundary: LexicalErrorBoundary_1.default, placeholder: React.createElement(Placeholder_1.default, { className: 'StickyNode__placeholder' }, "What's up?") })))));
|
|
165
|
-
}
|
|
166
|
-
//# sourceMappingURL=StickyComponent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StickyComponent.js","sourceRoot":"","sources":["../../../../../src/components/TextEditorV2/nodes/StickyComponent.tsx"],"names":[],"mappings":";;AAqCA,kCA0LC;;AA9ND,4FAAoF;AACpF,0FAA+E;AAC/E,kFAAiF;AACjF,uGAAsE;AACtE,8EAAmE;AACnE,gFAA4E;AAC5E,kFAAuE;AACvE,qCAAuC;AACvC,qDAA8B;AAC9B,iCAAyC;AACzC,0EAAyE;AACzE,wDAA8D;AAC9D,wFAAuD;AACvD,4FAA2D;AAC3D,oFAAmD;AACnD,4EAA2C;AAC3C,6CAA4C;AAW5C,SAAS,cAAc,CAAC,UAAuB,EAAE,WAAwB;IACvE,MAAM,KAAK,GAA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,CAAC;YACH,CAAC;YAED,8CAAmB,oBAAoB,EAAC,SAAS,EAAC,QAAQ,EAAC,OAAO,EAAE,YAAY,EAAE,KAAK,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,QAErG;YACT,8CACa,0BAA0B,EACrC,SAAS,EAAC,OAAO,EACjB,OAAO,EAAE,iBAAiB,EAC1B,KAAK,EAAC,OAAO,EACb,IAAI,EAAC,QAAQ;gBAEb,2BAAG,SAAS,EAAC,QAAQ,GAAG,CACjB;YACT,oBAAC,6CAAqB,IAAC,aAAa,EAAE,OAAO,EAAE,YAAY,EAAE,2BAAiB;gBAC3E,cAAc,CAAC,CAAC,CAAC,CAChB,oBAAC,gDAAmB,IAAC,EAAE,EAAE,OAAO,CAAC,MAAM,EAAE,EAAE,eAAe,EAAE,uCAAuB,EAAE,eAAe,SAAG,CACxG,CAAC,CAAC,CAAC,CACF,oBAAC,oCAAa,IAAC,oBAAoB,EAAE,YAAY,GAAI,CACtD;gBACD,oBAAC,wCAAe,IACd,eAAe,EAAE,oBAAC,yBAAe,IAAC,SAAS,EAAC,6BAA6B,GAAG,EAC5E,aAAa,EAAE,8BAAoB,EACnC,WAAW,EAAE,oBAAC,qBAAW,IAAC,SAAS,EAAC,yBAAyB,iBAA8B,GAC3F,CACoB,CACpB,CACF,CACP,CAAA;AACH,CAAC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
import type { EditorConfig, LexicalEditor, LexicalNode, NodeKey, SerializedEditor, SerializedLexicalNode, Spread } from 'lexical';
|
|
9
|
-
import { DecoratorNode } from 'lexical';
|
|
10
|
-
import * as React from 'react';
|
|
11
|
-
type StickyNoteColor = 'pink' | 'yellow';
|
|
12
|
-
export type SerializedStickyNode = Spread<{
|
|
13
|
-
xOffset: number;
|
|
14
|
-
yOffset: number;
|
|
15
|
-
color: StickyNoteColor;
|
|
16
|
-
caption: SerializedEditor;
|
|
17
|
-
}, SerializedLexicalNode>;
|
|
18
|
-
export declare class StickyNode extends DecoratorNode<React.JSX.Element> {
|
|
19
|
-
__x: number;
|
|
20
|
-
__y: number;
|
|
21
|
-
__color: StickyNoteColor;
|
|
22
|
-
__caption: LexicalEditor;
|
|
23
|
-
static getType(): string;
|
|
24
|
-
static clone(node: StickyNode): StickyNode;
|
|
25
|
-
static importJSON(serializedNode: SerializedStickyNode): StickyNode;
|
|
26
|
-
constructor(x: number, y: number, color: 'pink' | 'yellow', caption?: LexicalEditor, key?: NodeKey);
|
|
27
|
-
exportJSON(): SerializedStickyNode;
|
|
28
|
-
createDOM(config: EditorConfig): HTMLElement;
|
|
29
|
-
updateDOM(): false;
|
|
30
|
-
setPosition(x: number, y: number): void;
|
|
31
|
-
toggleColor(): void;
|
|
32
|
-
decorate(editor: LexicalEditor, config: EditorConfig): React.JSX.Element;
|
|
33
|
-
isIsolated(): true;
|
|
34
|
-
}
|
|
35
|
-
export declare function $isStickyNode(node: LexicalNode | null | undefined): node is StickyNode;
|
|
36
|
-
export declare function $createStickyNode(xOffset: number, yOffset: number): StickyNode;
|
|
37
|
-
export {};
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
3
|
-
/**
|
|
4
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
5
|
-
*
|
|
6
|
-
* This source code is licensed under the MIT license found in the
|
|
7
|
-
* LICENSE file in the root directory of this source tree.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.StickyNode = void 0;
|
|
12
|
-
exports.$isStickyNode = $isStickyNode;
|
|
13
|
-
exports.$createStickyNode = $createStickyNode;
|
|
14
|
-
const tslib_1 = require("tslib");
|
|
15
|
-
const lexical_1 = require("lexical");
|
|
16
|
-
const React = tslib_1.__importStar(require("react"));
|
|
17
|
-
const react_1 = require("react");
|
|
18
|
-
const react_dom_1 = require("react-dom");
|
|
19
|
-
const StickyComponent = React.lazy(
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
() => Promise.resolve().then(() => tslib_1.__importStar(require('./StickyComponent'))));
|
|
22
|
-
class StickyNode extends lexical_1.DecoratorNode {
|
|
23
|
-
static getType() {
|
|
24
|
-
return 'sticky';
|
|
25
|
-
}
|
|
26
|
-
static clone(node) {
|
|
27
|
-
return new StickyNode(node.__x, node.__y, node.__color, node.__caption, node.__key);
|
|
28
|
-
}
|
|
29
|
-
static importJSON(serializedNode) {
|
|
30
|
-
const stickyNode = new StickyNode(serializedNode.xOffset, serializedNode.yOffset, serializedNode.color);
|
|
31
|
-
const caption = serializedNode.caption;
|
|
32
|
-
const nestedEditor = stickyNode.__caption;
|
|
33
|
-
const editorState = nestedEditor.parseEditorState(caption.editorState);
|
|
34
|
-
if (!editorState.isEmpty()) {
|
|
35
|
-
nestedEditor.setEditorState(editorState);
|
|
36
|
-
}
|
|
37
|
-
return stickyNode;
|
|
38
|
-
}
|
|
39
|
-
constructor(x, y, color, caption, key) {
|
|
40
|
-
super(key);
|
|
41
|
-
this.__x = x;
|
|
42
|
-
this.__y = y;
|
|
43
|
-
this.__caption = caption || (0, lexical_1.createEditor)();
|
|
44
|
-
this.__color = color;
|
|
45
|
-
}
|
|
46
|
-
exportJSON() {
|
|
47
|
-
return {
|
|
48
|
-
caption: this.__caption.toJSON(),
|
|
49
|
-
color: this.__color,
|
|
50
|
-
type: 'sticky',
|
|
51
|
-
version: 1,
|
|
52
|
-
xOffset: this.__x,
|
|
53
|
-
yOffset: this.__y,
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
createDOM(config) {
|
|
57
|
-
console.log(config);
|
|
58
|
-
const div = document.createElement('div');
|
|
59
|
-
div.style.display = 'contents';
|
|
60
|
-
return div;
|
|
61
|
-
}
|
|
62
|
-
updateDOM() {
|
|
63
|
-
return false;
|
|
64
|
-
}
|
|
65
|
-
setPosition(x, y) {
|
|
66
|
-
const writable = this.getWritable();
|
|
67
|
-
writable.__x = x;
|
|
68
|
-
writable.__y = y;
|
|
69
|
-
(0, lexical_1.$setSelection)(null);
|
|
70
|
-
}
|
|
71
|
-
toggleColor() {
|
|
72
|
-
const writable = this.getWritable();
|
|
73
|
-
writable.__color = writable.__color === 'pink' ? 'yellow' : 'pink';
|
|
74
|
-
}
|
|
75
|
-
decorate(editor, config) {
|
|
76
|
-
console.log(editor, config);
|
|
77
|
-
return (0, react_dom_1.createPortal)(React.createElement(react_1.Suspense, { fallback: null },
|
|
78
|
-
React.createElement(StickyComponent, { caption: this.__caption, color: this.__color, nodeKey: this.getKey(), x: this.__x, y: this.__y })), document.body);
|
|
79
|
-
}
|
|
80
|
-
isIsolated() {
|
|
81
|
-
return true;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
exports.StickyNode = StickyNode;
|
|
85
|
-
function $isStickyNode(node) {
|
|
86
|
-
return node instanceof StickyNode;
|
|
87
|
-
}
|
|
88
|
-
function $createStickyNode(xOffset, yOffset) {
|
|
89
|
-
return new StickyNode(xOffset, yOffset, 'yellow');
|
|
90
|
-
}
|
|
91
|
-
//# sourceMappingURL=StickyNode.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StickyNode.js","sourceRoot":"","sources":["../../../../../src/components/TextEditorV2/nodes/StickyNode.tsx"],"names":[],"mappings":";AAAA,sDAAsD;AACtD;;;;;;GAMG;;;AAwHH,sCAEC;AAED,8CAEC;;AAnHD,qCAAoE;AACpE,qDAA8B;AAC9B,iCAAgC;AAChC,yCAAwC;AAExC,MAAM,eAAe,GAAG,KAAK,CAAC,IAAI;AAChC,aAAa;AACb,GAAG,EAAE,2DAAQ,mBAAmB,GAAC,CAClC,CAAA;AAcD,MA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d,CAAA;IACH,CAAC;IAEM,UAAU;QACf,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AArFD,gCAqFC;AAED,SAAgB,aAAa,CAAC,IAAoC;IAChE,OAAO,IAAI,YAAY,UAAU,CAAA;AACnC,CAAC;AAED,SAAgB,iBAAiB,CAAC,OAAe,EAAE,OAAe;IAChE,OAAO,IAAI,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAA;AACnD,CAAC"}
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = ActionsPlugin;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const code_1 = require("@lexical/code");
|
|
6
|
-
const file_1 = require("@lexical/file");
|
|
7
|
-
const markdown_1 = require("@lexical/markdown");
|
|
8
|
-
const LexicalCollaborationContext_1 = require("@lexical/react/LexicalCollaborationContext");
|
|
9
|
-
const LexicalComposerContext_1 = require("@lexical/react/LexicalComposerContext");
|
|
10
|
-
const utils_1 = require("@lexical/utils");
|
|
11
|
-
const yjs_1 = require("@lexical/yjs");
|
|
12
|
-
const lexical_1 = require("lexical");
|
|
13
|
-
const React = tslib_1.__importStar(require("react"));
|
|
14
|
-
const react_1 = require("react");
|
|
15
|
-
const useModal_1 = tslib_1.__importDefault(require("../../hooks/useModal"));
|
|
16
|
-
const Button_1 = tslib_1.__importDefault(require("../../ui/Button"));
|
|
17
|
-
const MarkdownTransformers_1 = require("../MarkdownTransformers");
|
|
18
|
-
async function sendEditorState(editor) {
|
|
19
|
-
const stringifiedEditorState = JSON.stringify(editor.getEditorState());
|
|
20
|
-
try {
|
|
21
|
-
await fetch('http://localhost:1235/setEditorState', {
|
|
22
|
-
body: stringifiedEditorState,
|
|
23
|
-
headers: {
|
|
24
|
-
Accept: 'application/json',
|
|
25
|
-
'Content-type': 'application/json',
|
|
26
|
-
},
|
|
27
|
-
method: 'POST',
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
catch (_a) {
|
|
31
|
-
// NO-OP
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
async function validateEditorState(editor) {
|
|
35
|
-
const stringifiedEditorState = JSON.stringify(editor.getEditorState());
|
|
36
|
-
let response = null;
|
|
37
|
-
try {
|
|
38
|
-
response = await fetch('http://localhost:1235/validateEditorState', {
|
|
39
|
-
body: stringifiedEditorState,
|
|
40
|
-
headers: {
|
|
41
|
-
Accept: 'application/json',
|
|
42
|
-
'Content-type': 'application/json',
|
|
43
|
-
},
|
|
44
|
-
method: 'POST',
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
catch (_a) {
|
|
48
|
-
// NO-OP
|
|
49
|
-
}
|
|
50
|
-
if (response !== null && response.status === 403) {
|
|
51
|
-
throw new Error('Editor state validation failed! Server did not accept changes.');
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
function ActionsPlugin() {
|
|
55
|
-
const [editor] = (0, LexicalComposerContext_1.useLexicalComposerContext)();
|
|
56
|
-
const [isEditable, setIsEditable] = (0, react_1.useState)(() => editor.isEditable());
|
|
57
|
-
const [connected, setConnected] = (0, react_1.useState)(false);
|
|
58
|
-
const [isEditorEmpty, setIsEditorEmpty] = (0, react_1.useState)(true);
|
|
59
|
-
const [modal, showModal] = (0, useModal_1.default)();
|
|
60
|
-
const { isCollabActive } = (0, LexicalCollaborationContext_1.useCollaborationContext)();
|
|
61
|
-
(0, react_1.useEffect)(() => (0, utils_1.mergeRegister)(editor.registerEditableListener((editable) => {
|
|
62
|
-
setIsEditable(editable);
|
|
63
|
-
}), editor.registerCommand(yjs_1.CONNECTED_COMMAND, (payload) => {
|
|
64
|
-
const isConnected = payload;
|
|
65
|
-
setConnected(isConnected);
|
|
66
|
-
return false;
|
|
67
|
-
}, lexical_1.COMMAND_PRIORITY_EDITOR)), [editor]);
|
|
68
|
-
(0, react_1.useEffect)(() => editor.registerUpdateListener(({ dirtyElements, tags }) => {
|
|
69
|
-
// If we are in read only mode, send the editor state
|
|
70
|
-
// to server and ask for validation if possible.
|
|
71
|
-
if (!isEditable && dirtyElements.size > 0 && !tags.has('historic') && !tags.has('collaboration')) {
|
|
72
|
-
validateEditorState(editor);
|
|
73
|
-
}
|
|
74
|
-
editor.getEditorState().read(() => {
|
|
75
|
-
const root = (0, lexical_1.$getRoot)();
|
|
76
|
-
const children = root.getChildren();
|
|
77
|
-
if (children.length > 1) {
|
|
78
|
-
setIsEditorEmpty(false);
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
if ((0, lexical_1.$isParagraphNode)(children[0])) {
|
|
82
|
-
const paragraphChildren = children[0].getChildren();
|
|
83
|
-
setIsEditorEmpty(paragraphChildren.length === 0);
|
|
84
|
-
}
|
|
85
|
-
else {
|
|
86
|
-
setIsEditorEmpty(false);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
}), [editor, isEditable]);
|
|
91
|
-
const handleMarkdownToggle = (0, react_1.useCallback)(() => {
|
|
92
|
-
editor.update(() => {
|
|
93
|
-
const root = (0, lexical_1.$getRoot)();
|
|
94
|
-
const firstChild = root.getFirstChild();
|
|
95
|
-
if ((0, code_1.$isCodeNode)(firstChild) && firstChild.getLanguage() === 'markdown') {
|
|
96
|
-
(0, markdown_1.$convertFromMarkdownString)(firstChild.getTextContent(), MarkdownTransformers_1.PLAYGROUND_TRANSFORMERS);
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
const markdown = (0, markdown_1.$convertToMarkdownString)(MarkdownTransformers_1.PLAYGROUND_TRANSFORMERS);
|
|
100
|
-
root.clear().append((0, code_1.$createCodeNode)('markdown').append((0, lexical_1.$createTextNode)(markdown)));
|
|
101
|
-
}
|
|
102
|
-
root.selectEnd();
|
|
103
|
-
});
|
|
104
|
-
}, [editor]);
|
|
105
|
-
return (React.createElement("div", { className: 'actions' },
|
|
106
|
-
React.createElement("button", { "aria-label": 'Import editor state from JSON', className: 'action-button import', onClick: () => (0, file_1.importFile)(editor), title: 'Import', type: 'button' },
|
|
107
|
-
React.createElement("i", { className: 'import' })),
|
|
108
|
-
React.createElement("button", { "aria-label": 'Export editor state to JSON', className: 'action-button export', onClick: () => (0, file_1.exportFile)(editor, {
|
|
109
|
-
fileName: `Playground ${new Date().toISOString()}`,
|
|
110
|
-
source: 'Playground',
|
|
111
|
-
}), title: 'Export', type: 'button' },
|
|
112
|
-
React.createElement("i", { className: 'export' })),
|
|
113
|
-
React.createElement("button", { "aria-label": 'Clear editor contents', className: 'action-button clear', disabled: isEditorEmpty, onClick: () => {
|
|
114
|
-
showModal('Clear editor', (onClose) => React.createElement(ShowClearDialog, { editor: editor, onClose: onClose }));
|
|
115
|
-
}, title: 'Clear', type: 'button' },
|
|
116
|
-
React.createElement("i", { className: 'clear' })),
|
|
117
|
-
React.createElement("button", { "aria-label": `${!isEditable ? 'Unlock' : 'Lock'} read-only mode`, className: `action-button ${!isEditable ? 'unlock' : 'lock'}`, onClick: () => {
|
|
118
|
-
// Send latest editor state to commenting validation server
|
|
119
|
-
if (isEditable) {
|
|
120
|
-
sendEditorState(editor);
|
|
121
|
-
}
|
|
122
|
-
editor.setEditable(!editor.isEditable());
|
|
123
|
-
}, title: 'Read-Only Mode', type: 'button' },
|
|
124
|
-
React.createElement("i", { className: !isEditable ? 'unlock' : 'lock' })),
|
|
125
|
-
React.createElement("button", { "aria-label": 'Convert from markdown', className: 'action-button', onClick: handleMarkdownToggle, title: 'Convert From Markdown', type: 'button' },
|
|
126
|
-
React.createElement("i", { className: 'markdown' })),
|
|
127
|
-
isCollabActive && (React.createElement("button", { "aria-label": `${connected ? 'Disconnect from' : 'Connect to'} a collaborative editing server`, className: 'action-button connect', onClick: () => {
|
|
128
|
-
editor.dispatchCommand(yjs_1.TOGGLE_CONNECT_COMMAND, !connected);
|
|
129
|
-
}, title: `${connected ? 'Disconnect' : 'Connect'} Collaborative Editing`, type: 'button' },
|
|
130
|
-
React.createElement("i", { className: connected ? 'disconnect' : 'connect' }))),
|
|
131
|
-
modal));
|
|
132
|
-
}
|
|
133
|
-
function ShowClearDialog({ editor, onClose }) {
|
|
134
|
-
return (React.createElement(React.Fragment, null,
|
|
135
|
-
"Are you sure you want to clear the editor?",
|
|
136
|
-
React.createElement("div", { className: 'Modal__content' },
|
|
137
|
-
React.createElement(Button_1.default, { onClick: () => {
|
|
138
|
-
editor.dispatchCommand(lexical_1.CLEAR_EDITOR_COMMAND, undefined);
|
|
139
|
-
editor.focus();
|
|
140
|
-
onClose();
|
|
141
|
-
} }, "Clear"),
|
|
142
|
-
' ',
|
|
143
|
-
React.createElement(Button_1.default, { onClick: () => {
|
|
144
|
-
editor.focus();
|
|
145
|
-
onClose();
|
|
146
|
-
} }, "Cancel"))));
|
|
147
|
-
}
|
|
148
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/TextEditorV2/plugins/ActionsPlugin/index.tsx"],"names":[],"mappings":";;AAmDA,gCAiJC;;AApMD,wCAA4D;AAC5D,wCAAsD;AACtD,gDAAwF;AACxF,4FAAoF;AACpF,kFAAiF;AACjF,0CAA8C;AAC9C,sCAAwE;AAExE,qCAAoH;AACpH,qDAA8B;AAC9B,iCAAwD;AACxD,4EAA2C;AAC3C,qEAAoC;AACpC,kEAAiE;AAEjE,KAAK,UAAU,eAAe,CAAC,MAAqB;IAClD,MAAM,sBAAsB,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC,CAAA;IACtE,IAAI,CAAC;QACH,MAAM,KAAK,CAAC,sCAAsC,EAAE;YAClD,IAAI,EAAE,sBAAsB;YAC5B,OAAO,EAAE;gBACP,MAAM,EAAE,kBAAkB;gBAC1B,cAAc,EAAE,kBAAkB;aACnC;YACD,MAAM,EAAE,MAAM;SACf,CAAC,CAAA;IACJ,CAAC;IAAC,WAAM,CAAC;QACP,QAA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GAAG,CACnB;QACR,cAAc,IAAI,CACjB,8CACc,GAAG,SAAS,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,YAAY,iCAAiC,EAC5F,SAAS,EAAC,uBAAuB,EACjC,OAAO,EAAE,GAAG,EAAE;gBACZ,MAAM,CAAC,eAAe,CAAC,4BAAsB,EAAE,CAAC,SAAS,CAAC,CAAA;YAC5D,CAAC,EACD,KAAK,EAAE,GAAG,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,wBAAwB,EACtE,IAAI,EAAC,QAAQ;YAEb,2BAAG,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,GAAI,CAC/C,CACV;QACA,KAAK,CACF,CACP,CAAA;AACH,CAAC;AAED,SAAS,eAAe,CAAC,EAAE,MAAM,EAAE,OAAO,EAA8C;IACtF,OAAO,CACL;;QAEE,6BAAK,SAAS,EAAC,gBAAgB;YAC7B,oBAAC,gBAAM,IACL,OAAO,EAAE,GAAG,EAAE;oBACZ,MAAM,CAAC,eAAe,CAAC,8BAAoB,EAAE,SAAS,CAAC,CAAA;oBACvD,MAAM,CAAC,KAAK,EAAE,CAAA;oBACd,OAAO,EAAE,CAAA;gBACX,CAAC,YAGM;YAAC,GAAG;YACb,oBAAC,gBAAM,IACL,OAAO,EAAE,GAAG,EAAE;oBACZ,MAAM,CAAC,KAAK,EAAE,CAAA;oBACd,OAAO,EAAE,CAAA;gBACX,CAAC,aAGM,CACL,CACL,CACJ,CAAA;AACH,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { EmbedConfig } from '@lexical/react/LexicalAutoEmbedPlugin';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
interface PlaygroundEmbedConfig extends EmbedConfig {
|
|
4
|
-
contentName: string;
|
|
5
|
-
icon?: React.JSX.Element;
|
|
6
|
-
exampleUrl: string;
|
|
7
|
-
keywords: Array<string>;
|
|
8
|
-
description?: string;
|
|
9
|
-
}
|
|
10
|
-
export declare const YoutubeEmbedConfig: PlaygroundEmbedConfig;
|
|
11
|
-
export declare const TwitterEmbedConfig: PlaygroundEmbedConfig;
|
|
12
|
-
export declare const FigmaEmbedConfig: PlaygroundEmbedConfig;
|
|
13
|
-
export declare const EmbedConfigs: PlaygroundEmbedConfig[];
|
|
14
|
-
export declare function AutoEmbedDialog({ embedConfig, onClose, }: {
|
|
15
|
-
embedConfig: PlaygroundEmbedConfig;
|
|
16
|
-
onClose(): void;
|
|
17
|
-
}): React.JSX.Element;
|
|
18
|
-
export default function AutoEmbedPlugin(): React.JSX.Element;
|
|
19
|
-
export {};
|