phx-react 1.3.1718 → 1.3.1719
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/TextEditorV2/constants.d.ts +1 -1
- package/dist/cjs/components/TextEditorV2/constants.js +15 -0
- package/dist/cjs/components/TextEditorV2/constants.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/editor.js +10 -58
- package/dist/cjs/components/TextEditorV2/editor.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/nodes/ImageComponent.js +2 -8
- package/dist/cjs/components/TextEditorV2/nodes/ImageComponent.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/nodes/InlineImageComponent.js +2 -2
- package/dist/cjs/components/TextEditorV2/nodes/InlineImageComponent.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/nodes/PlaygroundNodes.js +0 -19
- package/dist/cjs/components/TextEditorV2/nodes/PlaygroundNodes.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/plugins/FloatingTextFormatToolbarPlugin/index.js +1 -2
- package/dist/cjs/components/TextEditorV2/plugins/FloatingTextFormatToolbarPlugin/index.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/plugins/SanitizePastePlugin/index.d.ts +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/SanitizePastePlugin/index.js +58 -0
- package/dist/cjs/components/TextEditorV2/plugins/SanitizePastePlugin/index.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/bold-text.js +2 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/bold-text.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/font-size.js +4 -6
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/font-size.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.d.ts +1 -1
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.js +22 -10
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/italic-text.js +2 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/italic-text.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/list-marker-format.d.ts +5 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/list-marker-format.js +27 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/list-marker-format.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/text-color.js +1 -3
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/text-color.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/index.js +0 -4
- package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/index.js.map +1 -1
- package/dist/cjs/components/TextEditorV2/shared/LexicalErrorBoundary.d.ts +13 -0
- package/dist/cjs/components/TextEditorV2/shared/LexicalErrorBoundary.js +25 -0
- package/dist/cjs/components/TextEditorV2/shared/LexicalErrorBoundary.js.map +1 -0
- package/dist/cjs/components/TextEditorV2/style.js +21 -0
- package/dist/cjs/components/TextEditorV2/style.js.map +1 -1
- package/dist/esm/components/TextEditorV2/constants.d.ts +1 -1
- package/dist/esm/components/TextEditorV2/constants.js +15 -0
- package/dist/esm/components/TextEditorV2/constants.js.map +1 -1
- package/dist/esm/components/TextEditorV2/editor.js +9 -57
- package/dist/esm/components/TextEditorV2/editor.js.map +1 -1
- package/dist/esm/components/TextEditorV2/nodes/ImageComponent.js +1 -7
- package/dist/esm/components/TextEditorV2/nodes/ImageComponent.js.map +1 -1
- package/dist/esm/components/TextEditorV2/nodes/InlineImageComponent.js +1 -1
- package/dist/esm/components/TextEditorV2/nodes/InlineImageComponent.js.map +1 -1
- package/dist/esm/components/TextEditorV2/nodes/PlaygroundNodes.js +0 -19
- package/dist/esm/components/TextEditorV2/nodes/PlaygroundNodes.js.map +1 -1
- package/dist/esm/components/TextEditorV2/plugins/FloatingTextFormatToolbarPlugin/index.js +1 -2
- package/dist/esm/components/TextEditorV2/plugins/FloatingTextFormatToolbarPlugin/index.js.map +1 -1
- package/dist/esm/components/TextEditorV2/plugins/SanitizePastePlugin/index.d.ts +1 -0
- package/dist/esm/components/TextEditorV2/plugins/SanitizePastePlugin/index.js +55 -0
- package/dist/esm/components/TextEditorV2/plugins/SanitizePastePlugin/index.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/bold-text.js +2 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/bold-text.js.map +1 -1
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/font-size.js +5 -7
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/font-size.js.map +1 -1
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.d.ts +1 -1
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.js +23 -11
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.js.map +1 -1
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/italic-text.js +2 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/italic-text.js.map +1 -1
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/list-marker-format.d.ts +5 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/list-marker-format.js +24 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/list-marker-format.js.map +1 -0
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/text-color.js +2 -4
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/components/text-color.js.map +1 -1
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/index.js +0 -4
- package/dist/esm/components/TextEditorV2/plugins/ToolbarPlugin/index.js.map +1 -1
- package/dist/esm/components/TextEditorV2/shared/LexicalErrorBoundary.d.ts +13 -0
- package/dist/esm/components/TextEditorV2/shared/LexicalErrorBoundary.js +21 -0
- package/dist/esm/components/TextEditorV2/shared/LexicalErrorBoundary.js.map +1 -0
- package/dist/esm/components/TextEditorV2/style.js +21 -0
- package/dist/esm/components/TextEditorV2/style.js.map +1 -1
- package/package.json +9 -7
- package/dist/cjs/components/TextEditorV2/nodes/AutocompleteNode.d.ts +0 -25
- package/dist/cjs/components/TextEditorV2/nodes/AutocompleteNode.js +0 -60
- package/dist/cjs/components/TextEditorV2/nodes/AutocompleteNode.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/nodes/EmojiNode.d.ts +0 -18
- package/dist/cjs/components/TextEditorV2/nodes/EmojiNode.js +0 -62
- package/dist/cjs/components/TextEditorV2/nodes/EmojiNode.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/nodes/EquationComponent.d.ts +0 -9
- package/dist/cjs/components/TextEditorV2/nodes/EquationComponent.js +0 -70
- package/dist/cjs/components/TextEditorV2/nodes/EquationComponent.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/nodes/EquationNode.d.ts +0 -26
- package/dist/cjs/components/TextEditorV2/nodes/EquationNode.js +0 -121
- package/dist/cjs/components/TextEditorV2/nodes/EquationNode.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/nodes/PollComponent.d.ts +0 -8
- package/dist/cjs/components/TextEditorV2/nodes/PollComponent.js +0 -108
- package/dist/cjs/components/TextEditorV2/nodes/PollComponent.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/nodes/PollNode.d.ts +0 -33
- package/dist/cjs/components/TextEditorV2/nodes/PollNode.js +0 -145
- package/dist/cjs/components/TextEditorV2/nodes/PollNode.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/nodes/StickyComponent.d.ts +0 -9
- package/dist/cjs/components/TextEditorV2/nodes/StickyComponent.js +0 -166
- package/dist/cjs/components/TextEditorV2/nodes/StickyComponent.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/nodes/StickyNode.d.ts +0 -37
- package/dist/cjs/components/TextEditorV2/nodes/StickyNode.js +0 -91
- package/dist/cjs/components/TextEditorV2/nodes/StickyNode.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/ActionsPlugin/index.d.ts +0 -2
- package/dist/cjs/components/TextEditorV2/plugins/ActionsPlugin/index.js +0 -148
- package/dist/cjs/components/TextEditorV2/plugins/ActionsPlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/AutoEmbedPlugin/index.d.ts +0 -19
- package/dist/cjs/components/TextEditorV2/plugins/AutoEmbedPlugin/index.js +0 -168
- package/dist/cjs/components/TextEditorV2/plugins/AutoEmbedPlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/AutocompletePlugin/index.d.ts +0 -2
- package/dist/cjs/components/TextEditorV2/plugins/AutocompletePlugin/index.js +0 -2459
- package/dist/cjs/components/TextEditorV2/plugins/AutocompletePlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/CodeHighlightPlugin/index.d.ts +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/CodeHighlightPlugin/index.js +0 -12
- package/dist/cjs/components/TextEditorV2/plugins/CodeHighlightPlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContainerNode.d.ts +0 -23
- package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContainerNode.js +0 -88
- package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContainerNode.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContentNode.d.ts +0 -17
- package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContentNode.js +0 -68
- package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContentNode.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleTitleNode.d.ts +0 -18
- package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleTitleNode.js +0 -92
- package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleTitleNode.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/index.d.ts +0 -3
- package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/index.js +0 -145
- package/dist/cjs/components/TextEditorV2/plugins/CollapsiblePlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/ContextMenuPlugin/index.d.ts +0 -11
- package/dist/cjs/components/TextEditorV2/plugins/ContextMenuPlugin/index.js +0 -129
- package/dist/cjs/components/TextEditorV2/plugins/ContextMenuPlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/EmojiPickerPlugin/index.d.ts +0 -2
- package/dist/cjs/components/TextEditorV2/plugins/EmojiPickerPlugin/index.js +0 -83
- package/dist/cjs/components/TextEditorV2/plugins/EmojiPickerPlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/EmojisPlugin/index.d.ts +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/EmojisPlugin/index.js +0 -63
- package/dist/cjs/components/TextEditorV2/plugins/EmojisPlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/EquationsPlugin/index.d.ts +0 -14
- package/dist/cjs/components/TextEditorV2/plugins/EquationsPlugin/index.js +0 -41
- package/dist/cjs/components/TextEditorV2/plugins/EquationsPlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/ExcalidrawPlugin/index.d.ts +0 -3
- package/dist/cjs/components/TextEditorV2/plugins/ExcalidrawPlugin/index.js +0 -28
- package/dist/cjs/components/TextEditorV2/plugins/ExcalidrawPlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/FigmaPlugin/index.d.ts +0 -3
- package/dist/cjs/components/TextEditorV2/plugins/FigmaPlugin/index.js +0 -25
- package/dist/cjs/components/TextEditorV2/plugins/FigmaPlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/KeywordsPlugin/index.d.ts +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/KeywordsPlugin/index.js +0 -33
- package/dist/cjs/components/TextEditorV2/plugins/KeywordsPlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/LayoutPlugin/InsertLayoutDialog.d.ts +0 -6
- package/dist/cjs/components/TextEditorV2/plugins/LayoutPlugin/InsertLayoutDialog.js +0 -30
- package/dist/cjs/components/TextEditorV2/plugins/LayoutPlugin/InsertLayoutDialog.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/LayoutPlugin/LayoutPlugin.d.ts +0 -7
- package/dist/cjs/components/TextEditorV2/plugins/LayoutPlugin/LayoutPlugin.js +0 -85
- package/dist/cjs/components/TextEditorV2/plugins/LayoutPlugin/LayoutPlugin.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/MarkdownShortcutPlugin/index.d.ts +0 -2
- package/dist/cjs/components/TextEditorV2/plugins/MarkdownShortcutPlugin/index.js +0 -11
- package/dist/cjs/components/TextEditorV2/plugins/MarkdownShortcutPlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/MarkdownTransformers/index.d.ts +0 -8
- package/dist/cjs/components/TextEditorV2/plugins/MarkdownTransformers/index.js +0 -241
- package/dist/cjs/components/TextEditorV2/plugins/MarkdownTransformers/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/MentionsPlugin/index.d.ts +0 -2
- package/dist/cjs/components/TextEditorV2/plugins/MentionsPlugin/index.js +0 -551
- package/dist/cjs/components/TextEditorV2/plugins/MentionsPlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/PageBreakPlugin/index.d.ts +0 -3
- package/dist/cjs/components/TextEditorV2/plugins/PageBreakPlugin/index.js +0 -31
- package/dist/cjs/components/TextEditorV2/plugins/PageBreakPlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/PollPlugin/index.d.ts +0 -8
- package/dist/cjs/components/TextEditorV2/plugins/PollPlugin/index.js +0 -45
- package/dist/cjs/components/TextEditorV2/plugins/PollPlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/StickyPlugin/index.d.ts +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/StickyPlugin/index.js +0 -16
- package/dist/cjs/components/TextEditorV2/plugins/StickyPlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/TabFocusPlugin/index.d.ts +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/TabFocusPlugin/index.js +0 -38
- package/dist/cjs/components/TextEditorV2/plugins/TabFocusPlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/TableCellResizer/index.d.ts +0 -2
- package/dist/cjs/components/TextEditorV2/plugins/TableCellResizer/index.js +0 -248
- package/dist/cjs/components/TextEditorV2/plugins/TableCellResizer/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/TableOfContentsPlugin/index.d.ts +0 -2
- package/dist/cjs/components/TextEditorV2/plugins/TableOfContentsPlugin/index.js +0 -116
- package/dist/cjs/components/TextEditorV2/plugins/TableOfContentsPlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/TwitterPlugin/index.d.ts +0 -3
- package/dist/cjs/components/TextEditorV2/plugins/TwitterPlugin/index.js +0 -25
- package/dist/cjs/components/TextEditorV2/plugins/TwitterPlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/plugins/YouTubePlugin/index.d.ts +0 -3
- package/dist/cjs/components/TextEditorV2/plugins/YouTubePlugin/index.js +0 -25
- package/dist/cjs/components/TextEditorV2/plugins/YouTubePlugin/index.js.map +0 -1
- package/dist/cjs/components/TextEditorV2/ui/KatexEquationAlterer.d.ts +0 -7
- package/dist/cjs/components/TextEditorV2/ui/KatexEquationAlterer.js +0 -38
- package/dist/cjs/components/TextEditorV2/ui/KatexEquationAlterer.js.map +0 -1
- package/dist/esm/components/TextEditorV2/nodes/AutocompleteNode.d.ts +0 -25
- package/dist/esm/components/TextEditorV2/nodes/AutocompleteNode.js +0 -54
- package/dist/esm/components/TextEditorV2/nodes/AutocompleteNode.js.map +0 -1
- package/dist/esm/components/TextEditorV2/nodes/EmojiNode.d.ts +0 -18
- package/dist/esm/components/TextEditorV2/nodes/EmojiNode.js +0 -56
- package/dist/esm/components/TextEditorV2/nodes/EmojiNode.js.map +0 -1
- package/dist/esm/components/TextEditorV2/nodes/EquationComponent.d.ts +0 -9
- package/dist/esm/components/TextEditorV2/nodes/EquationComponent.js +0 -66
- package/dist/esm/components/TextEditorV2/nodes/EquationComponent.js.map +0 -1
- package/dist/esm/components/TextEditorV2/nodes/EquationNode.d.ts +0 -26
- package/dist/esm/components/TextEditorV2/nodes/EquationNode.js +0 -114
- package/dist/esm/components/TextEditorV2/nodes/EquationNode.js.map +0 -1
- package/dist/esm/components/TextEditorV2/nodes/PollComponent.d.ts +0 -8
- package/dist/esm/components/TextEditorV2/nodes/PollComponent.js +0 -104
- package/dist/esm/components/TextEditorV2/nodes/PollComponent.js.map +0 -1
- package/dist/esm/components/TextEditorV2/nodes/PollNode.d.ts +0 -33
- package/dist/esm/components/TextEditorV2/nodes/PollNode.js +0 -137
- package/dist/esm/components/TextEditorV2/nodes/PollNode.js.map +0 -1
- package/dist/esm/components/TextEditorV2/nodes/StickyComponent.d.ts +0 -9
- package/dist/esm/components/TextEditorV2/nodes/StickyComponent.js +0 -162
- package/dist/esm/components/TextEditorV2/nodes/StickyComponent.js.map +0 -1
- package/dist/esm/components/TextEditorV2/nodes/StickyNode.d.ts +0 -37
- package/dist/esm/components/TextEditorV2/nodes/StickyNode.js +0 -84
- package/dist/esm/components/TextEditorV2/nodes/StickyNode.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/ActionsPlugin/index.d.ts +0 -2
- package/dist/esm/components/TextEditorV2/plugins/ActionsPlugin/index.js +0 -144
- package/dist/esm/components/TextEditorV2/plugins/ActionsPlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/AutoEmbedPlugin/index.d.ts +0 -19
- package/dist/esm/components/TextEditorV2/plugins/AutoEmbedPlugin/index.js +0 -162
- package/dist/esm/components/TextEditorV2/plugins/AutoEmbedPlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/AutocompletePlugin/index.d.ts +0 -2
- package/dist/esm/components/TextEditorV2/plugins/AutocompletePlugin/index.js +0 -2455
- package/dist/esm/components/TextEditorV2/plugins/AutocompletePlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/CodeHighlightPlugin/index.d.ts +0 -1
- package/dist/esm/components/TextEditorV2/plugins/CodeHighlightPlugin/index.js +0 -9
- package/dist/esm/components/TextEditorV2/plugins/CodeHighlightPlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContainerNode.d.ts +0 -23
- package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContainerNode.js +0 -81
- package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContainerNode.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContentNode.d.ts +0 -17
- package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContentNode.js +0 -61
- package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleContentNode.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleTitleNode.d.ts +0 -18
- package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleTitleNode.js +0 -85
- package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/CollapsibleTitleNode.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/index.d.ts +0 -3
- package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/index.js +0 -141
- package/dist/esm/components/TextEditorV2/plugins/CollapsiblePlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/ContextMenuPlugin/index.d.ts +0 -11
- package/dist/esm/components/TextEditorV2/plugins/ContextMenuPlugin/index.js +0 -123
- package/dist/esm/components/TextEditorV2/plugins/ContextMenuPlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/EmojiPickerPlugin/index.d.ts +0 -2
- package/dist/esm/components/TextEditorV2/plugins/EmojiPickerPlugin/index.js +0 -79
- package/dist/esm/components/TextEditorV2/plugins/EmojiPickerPlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/EmojisPlugin/index.d.ts +0 -1
- package/dist/esm/components/TextEditorV2/plugins/EmojisPlugin/index.js +0 -60
- package/dist/esm/components/TextEditorV2/plugins/EmojisPlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/EquationsPlugin/index.d.ts +0 -14
- package/dist/esm/components/TextEditorV2/plugins/EquationsPlugin/index.js +0 -35
- package/dist/esm/components/TextEditorV2/plugins/EquationsPlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/ExcalidrawPlugin/index.d.ts +0 -3
- package/dist/esm/components/TextEditorV2/plugins/ExcalidrawPlugin/index.js +0 -24
- package/dist/esm/components/TextEditorV2/plugins/ExcalidrawPlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/FigmaPlugin/index.d.ts +0 -3
- package/dist/esm/components/TextEditorV2/plugins/FigmaPlugin/index.js +0 -21
- package/dist/esm/components/TextEditorV2/plugins/FigmaPlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/KeywordsPlugin/index.d.ts +0 -1
- package/dist/esm/components/TextEditorV2/plugins/KeywordsPlugin/index.js +0 -30
- package/dist/esm/components/TextEditorV2/plugins/KeywordsPlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/LayoutPlugin/InsertLayoutDialog.d.ts +0 -6
- package/dist/esm/components/TextEditorV2/plugins/LayoutPlugin/InsertLayoutDialog.js +0 -26
- package/dist/esm/components/TextEditorV2/plugins/LayoutPlugin/InsertLayoutDialog.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/LayoutPlugin/LayoutPlugin.d.ts +0 -7
- package/dist/esm/components/TextEditorV2/plugins/LayoutPlugin/LayoutPlugin.js +0 -81
- package/dist/esm/components/TextEditorV2/plugins/LayoutPlugin/LayoutPlugin.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/MarkdownShortcutPlugin/index.d.ts +0 -2
- package/dist/esm/components/TextEditorV2/plugins/MarkdownShortcutPlugin/index.js +0 -7
- package/dist/esm/components/TextEditorV2/plugins/MarkdownShortcutPlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/MarkdownTransformers/index.d.ts +0 -8
- package/dist/esm/components/TextEditorV2/plugins/MarkdownTransformers/index.js +0 -237
- package/dist/esm/components/TextEditorV2/plugins/MarkdownTransformers/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/MentionsPlugin/index.d.ts +0 -2
- package/dist/esm/components/TextEditorV2/plugins/MentionsPlugin/index.js +0 -547
- package/dist/esm/components/TextEditorV2/plugins/MentionsPlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/PageBreakPlugin/index.d.ts +0 -3
- package/dist/esm/components/TextEditorV2/plugins/PageBreakPlugin/index.js +0 -27
- package/dist/esm/components/TextEditorV2/plugins/PageBreakPlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/PollPlugin/index.d.ts +0 -8
- package/dist/esm/components/TextEditorV2/plugins/PollPlugin/index.js +0 -39
- package/dist/esm/components/TextEditorV2/plugins/PollPlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/StickyPlugin/index.d.ts +0 -1
- package/dist/esm/components/TextEditorV2/plugins/StickyPlugin/index.js +0 -13
- package/dist/esm/components/TextEditorV2/plugins/StickyPlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/TabFocusPlugin/index.d.ts +0 -1
- package/dist/esm/components/TextEditorV2/plugins/TabFocusPlugin/index.js +0 -35
- package/dist/esm/components/TextEditorV2/plugins/TabFocusPlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/TableCellResizer/index.d.ts +0 -2
- package/dist/esm/components/TextEditorV2/plugins/TableCellResizer/index.js +0 -244
- package/dist/esm/components/TextEditorV2/plugins/TableCellResizer/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/TableOfContentsPlugin/index.d.ts +0 -2
- package/dist/esm/components/TextEditorV2/plugins/TableOfContentsPlugin/index.js +0 -112
- package/dist/esm/components/TextEditorV2/plugins/TableOfContentsPlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/TwitterPlugin/index.d.ts +0 -3
- package/dist/esm/components/TextEditorV2/plugins/TwitterPlugin/index.js +0 -21
- package/dist/esm/components/TextEditorV2/plugins/TwitterPlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/plugins/YouTubePlugin/index.d.ts +0 -3
- package/dist/esm/components/TextEditorV2/plugins/YouTubePlugin/index.js +0 -21
- package/dist/esm/components/TextEditorV2/plugins/YouTubePlugin/index.js.map +0 -1
- package/dist/esm/components/TextEditorV2/ui/KatexEquationAlterer.d.ts +0 -7
- package/dist/esm/components/TextEditorV2/ui/KatexEquationAlterer.js +0 -34
- package/dist/esm/components/TextEditorV2/ui/KatexEquationAlterer.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const styleTag = "\n* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n.PlaygroundEditorTheme__ltr {\n text-align: left;\n}\n.PlaygroundEditorTheme__rtl {\n text-align: right;\n}\n\n.PlaygroundEditorTheme__quote {\n margin: 0;\n margin-left: 20px;\n font-size: 15px;\n color: rgb(101, 103, 107);\n border-left-color: rgb(206, 208, 212);\n border-left-width: 4px;\n border-left-style: solid;\n padding-left: 16px;\n}\n.PlaygroundEditorTheme__h1 {\n font-size: 34px;\n margin-bottom: 10px;\n}\n.PlaygroundEditorTheme__h2 {\n font-size: 29px;\n margin-bottom: 10px;\n}\n.PlaygroundEditorTheme__h3 {\n font-size: 24px;\n margin-bottom: 10px;\n}\n.PlaygroundEditorTheme__h4 {\n font-size: 21px;\n margin-bottom: 10px;\n}\n.PlaygroundEditorTheme__h5 {\n font-size: 18px;\n margin-bottom: 10px;\n}\n.PlaygroundEditorTheme__h6 {\n font-size: 16px;\n margin-bottom: 10px;\n}\n.PlaygroundEditorTheme__indent {\n --lexical-indent-base-value: 40px;\n}\n.PlaygroundEditorTheme__textBold {\n font-weight: bold;\n}\n.PlaygroundEditorTheme__textItalic {\n font-style: italic;\n}\n.PlaygroundEditorTheme__textUnderline {\n text-decoration: underline;\n}\n.PlaygroundEditorTheme__textStrikethrough {\n text-decoration: line-through;\n}\n.PlaygroundEditorTheme__textUnderlineStrikethrough {\n text-decoration: underline line-through;\n}\n.PlaygroundEditorTheme__textSubscript {\n font-size: 0.8em;\n vertical-align: sub !important;\n}\n.PlaygroundEditorTheme__textSuperscript {\n font-size: 0.8em;\n vertical-align: super;\n}\n.PlaygroundEditorTheme__textCode {\n background-color: rgb(240, 242, 245);\n padding: 1px 0.25rem;\n font-family: Menlo, Consolas, Monaco, monospace;\n font-size: 94%;\n}\n.PlaygroundEditorTheme__hashtag {\n background-color: rgba(88, 144, 255, 0.15);\n border-bottom: 1px solid rgba(88, 144, 255, 0.3);\n}\n.PlaygroundEditorTheme__link {\n color: rgb(33, 111, 219);\n text-decoration: none;\n}\n.PlaygroundEditorTheme__link:hover {\n text-decoration: underline;\n cursor: pointer;\n}\n.PlaygroundEditorTheme__code {\n background-color: rgb(240, 242, 245);\n font-family: Menlo, Consolas, Monaco, monospace;\n display: block;\n padding: 8px 8px 8px 52px;\n line-height: 1.53;\n font-size: 13px;\n margin: 0;\n margin-top: 8px;\n margin-bottom: 8px;\n overflow-x: auto;\n position: relative;\n tab-size: 2;\n}\n.PlaygroundEditorTheme__code:before {\n content: attr(data-gutter);\n position: absolute;\n background-color: #eee;\n left: 0;\n top: 0;\n border-right: 1px solid #ccc;\n padding: 8px;\n color: #777;\n white-space: pre-wrap;\n text-align: right;\n min-width: 25px;\n}\n.PlaygroundEditorTheme__table {\n border-collapse: collapse;\n border-spacing: 0;\n overflow-y: scroll;\n overflow-x: scroll;\n table-layout: fixed;\n width: max-content;\n margin: 30px 0;\n}\n.PlaygroundEditorTheme__tableSelection *::selection {\n background-color: transparent;\n}\n.PlaygroundEditorTheme__tableSelected {\n outline: 2px solid rgb(60, 132, 244);\n}\n.PlaygroundEditorTheme__tableCell {\n border: 1px solid #bbb;\n width: 75px;\n min-width: 75px;\n vertical-align: top;\n text-align: start;\n padding: 6px 8px;\n position: relative;\n outline: none;\n}\n.PlaygroundEditorTheme__tableCellSortedIndicator {\n display: block;\n opacity: 0.5;\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 4px;\n background-color: #999;\n}\n.PlaygroundEditorTheme__tableCellResizer {\n position: absolute;\n right: -4px;\n height: 100%;\n width: 8px;\n cursor: ew-resize;\n z-index: 10;\n top: 0;\n}\n.PlaygroundEditorTheme__tableCellHeader {\n background-color: #f2f3f5;\n text-align: start;\n}\n.PlaygroundEditorTheme__tableCellSelected {\n background-color: #c9dbf0;\n}\n.PlaygroundEditorTheme__tableCellPrimarySelected {\n border: 2px solid rgb(60, 132, 244);\n display: block;\n height: calc(100% - 2px);\n position: absolute;\n width: calc(100% - 2px);\n left: -1px;\n top: -1px;\n z-index: 2;\n}\n.PlaygroundEditorTheme__tableCellEditing {\n box-shadow: 0 0 5px rgba(0, 0, 0, 0.4);\n border-radius: 3px;\n}\n.PlaygroundEditorTheme__tableAddColumns {\n position: absolute;\n top: 0;\n width: 20px;\n background-color: #eee;\n height: 100%;\n right: -25px;\n animation: table-controls 0.2s ease;\n border: 0;\n cursor: pointer;\n}\n.PlaygroundEditorTheme__tableAddColumns:after {\n background-image: url('/icons/plus.svg');\n background-size: contain;\n background-position: center;\n background-repeat: no-repeat;\n display: block;\n content: ' ';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n opacity: 0.4;\n}\n.PlaygroundEditorTheme__tableAddColumns:hover {\n background-color: #c9dbf0;\n}\n.PlaygroundEditorTheme__tableAddRows {\n position: absolute;\n bottom: -25px;\n width: calc(100% - 25px);\n background-color: #eee;\n height: 20px;\n left: 0;\n animation: table-controls 0.2s ease;\n border: 0;\n cursor: pointer;\n}\n.PlaygroundEditorTheme__tableAddRows:after {\n background-image: url(/icons/plus.svg);\n background-size: contain;\n background-position: center;\n background-repeat: no-repeat;\n display: block;\n content: ' ';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n opacity: 0.4;\n}\n.PlaygroundEditorTheme__tableAddRows:hover {\n background-color: #c9dbf0;\n}\n@keyframes table-controls {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n.PlaygroundEditorTheme__tableCellResizeRuler {\n display: block;\n position: absolute;\n width: 1px;\n background-color: rgb(60, 132, 244);\n height: 100%;\n top: 0;\n}\n.PlaygroundEditorTheme__tableCellActionButtonContainer {\n display: block;\n right: 5px;\n top: 6px;\n position: absolute;\n z-index: 4;\n width: 20px;\n height: 20px;\n}\n.PlaygroundEditorTheme__tableCellActionButton {\n background-color: #eee;\n display: block;\n border: 0;\n border-radius: 20px;\n width: 20px;\n height: 20px;\n color: #222;\n cursor: pointer;\n}\n.PlaygroundEditorTheme__tableCellActionButton:hover {\n background-color: #ddd;\n}\n.PlaygroundEditorTheme__characterLimit {\n display: inline;\n background-color: #ffbbbb !important;\n}\n.PlaygroundEditorTheme__ol1 {\n padding: 0;\n margin: 0;\n list-style-position: inside;\n list-style-type: decimal;\n margin-left: 20px;\n}\n.PlaygroundEditorTheme__ol2 {\n padding: 0;\n margin: 0;\n list-style-type: upper-alpha;\n list-style-position: inside;\n margin-left: 20px;\n}\n.PlaygroundEditorTheme__ol3 {\n padding: 0;\n margin: 0;\n list-style-type: lower-alpha;\n list-style-position: inside;\n margin-left: 20px;\n}\n.PlaygroundEditorTheme__ol4 {\n padding: 0;\n margin: 0;\n list-style-type: upper-roman;\n list-style-position: inside;\n margin-left: 20px;\n}\n.PlaygroundEditorTheme__ol5 {\n padding: 0;\n margin: 0;\n list-style-type: lower-roman;\n list-style-position: inside;\n margin-left: 20px;\n}\n.PlaygroundEditorTheme__ul {\n padding: 0;\n margin: 0;\n list-style: disc;\n margin-left: 20px;\n list-style-position: inside !important;;\n}\n\n.PlaygroundEditorTheme__listItemChecked,\n.PlaygroundEditorTheme__listItemUnchecked {\n position: relative;\n margin-left: 8px;\n margin-right: 8px;\n padding-left: 24px;\n padding-right: 24px;\n list-style-type: none;\n outline: none;\n}\n.PlaygroundEditorTheme__listItemChecked {\n text-decoration: line-through;\n}\n.PlaygroundEditorTheme__listItemUnchecked:before,\n.PlaygroundEditorTheme__listItemChecked:before {\n content: '';\n width: 16px;\n height: 16px;\n top: 2px;\n left: 0;\n cursor: pointer;\n display: block;\n background-size: cover;\n position: absolute;\n}\n.PlaygroundEditorTheme__listItemUnchecked[dir='rtl']:before,\n.PlaygroundEditorTheme__listItemChecked[dir='rtl']:before {\n left: auto;\n right: 0;\n}\n.PlaygroundEditorTheme__listItemUnchecked:focus:before,\n.PlaygroundEditorTheme__listItemChecked:focus:before {\n box-shadow: 0 0 0 2px #a6cdfe;\n border-radius: 2px;\n}\n.PlaygroundEditorTheme__listItemUnchecked:before {\n border: 1px solid #999;\n border-radius: 2px;\n}\n.PlaygroundEditorTheme__listItemChecked:before {\n border: 1px solid rgb(61, 135, 245);\n border-radius: 2px;\n background-color: #3d87f5;\n background-repeat: no-repeat;\n}\n.PlaygroundEditorTheme__listItemChecked:after {\n content: '';\n cursor: pointer;\n border-color: #fff;\n border-style: solid;\n position: absolute;\n display: block;\n top: 6px;\n width: 3px;\n left: 7px;\n right: 7px;\n height: 6px;\n transform: rotate(45deg);\n border-width: 0 2px 2px 0;\n}\n.PlaygroundEditorTheme__nestedListItem {\n list-style-type: none;\n}\n.PlaygroundEditorTheme__nestedListItem:before,\n.PlaygroundEditorTheme__nestedListItem:after {\n display: none;\n}\n.PlaygroundEditorTheme__tokenComment {\n color: slategray;\n}\n.PlaygroundEditorTheme__tokenPunctuation {\n color: #999;\n}\n.PlaygroundEditorTheme__tokenProperty {\n color: #905;\n}\n.PlaygroundEditorTheme__tokenSelector {\n color: #690;\n}\n.PlaygroundEditorTheme__tokenOperator {\n color: #9a6e3a;\n}\n.PlaygroundEditorTheme__tokenAttr {\n color: #07a;\n}\n.PlaygroundEditorTheme__tokenVariable {\n color: #e90;\n}\n.PlaygroundEditorTheme__tokenFunction {\n color: #dd4a68;\n}\n.PlaygroundEditorTheme__mark {\n background: rgba(255, 212, 0, 0.14);\n border-bottom: 2px solid rgba(255, 212, 0, 0.3);\n padding-bottom: 2px;\n}\n.PlaygroundEditorTheme__markOverlap {\n background: rgba(255, 212, 0, 0.3);\n border-bottom: 2px solid rgba(255, 212, 0, 0.7);\n}\n.PlaygroundEditorTheme__mark.selected {\n background: rgba(255, 212, 0, 0.5);\n border-bottom: 2px solid rgba(255, 212, 0, 1);\n}\n.PlaygroundEditorTheme__markOverlap.selected {\n background: rgba(255, 212, 0, 0.7);\n border-bottom: 2px solid rgba(255, 212, 0, 0.7);\n}\n.PlaygroundEditorTheme__embedBlock {\n user-select: none;\n}\n.PlaygroundEditorTheme__embedBlockFocus {\n outline: 2px solid rgb(60, 132, 244);\n}\n.PlaygroundEditorTheme__layoutContaner {\n display: grid;\n gap: 10px;\n margin: 10px 0;\n}\n.PlaygroundEditorTheme__layoutItem {\n border: 1px dashed #ddd;\n padding: 8px 16px;\n}\n\n.editor-image img {\n margin-left: auto;\n margin-right: auto;\n max-width: 90% !important;\n border: 1px solid #e5e7eb;\n margin-bottom: 10px;\n}\n";
|
|
1
|
+
export declare const styleTag = "\n* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n.PlaygroundEditorTheme__ltr {\n text-align: left;\n}\n.PlaygroundEditorTheme__rtl {\n text-align: right;\n}\n\n.PlaygroundEditorTheme__quote {\n margin: 0;\n margin-left: 20px;\n font-size: 15px;\n color: rgb(101, 103, 107);\n border-left-color: rgb(206, 208, 212);\n border-left-width: 4px;\n border-left-style: solid;\n padding-left: 16px;\n}\n.PlaygroundEditorTheme__h1 {\n font-size: 34px;\n margin-bottom: 10px;\n}\n.PlaygroundEditorTheme__h2 {\n font-size: 29px;\n margin-bottom: 10px;\n}\n.PlaygroundEditorTheme__h3 {\n font-size: 24px;\n margin-bottom: 10px;\n}\n.PlaygroundEditorTheme__h4 {\n font-size: 21px;\n margin-bottom: 10px;\n}\n.PlaygroundEditorTheme__h5 {\n font-size: 18px;\n margin-bottom: 10px;\n}\n.PlaygroundEditorTheme__h6 {\n font-size: 16px;\n margin-bottom: 10px;\n}\n.PlaygroundEditorTheme__indent {\n --lexical-indent-base-value: 40px;\n}\n.PlaygroundEditorTheme__textBold {\n font-weight: bold;\n}\n.PlaygroundEditorTheme__textItalic {\n font-style: italic;\n}\n.PlaygroundEditorTheme__textUnderline {\n text-decoration: underline;\n}\n.PlaygroundEditorTheme__textStrikethrough {\n text-decoration: line-through;\n}\n.PlaygroundEditorTheme__textUnderlineStrikethrough {\n text-decoration: underline line-through;\n}\n.PlaygroundEditorTheme__textSubscript {\n font-size: 0.8em;\n vertical-align: sub !important;\n}\n.PlaygroundEditorTheme__textSuperscript {\n font-size: 0.8em;\n vertical-align: super;\n}\n.PlaygroundEditorTheme__textCode {\n background-color: rgb(240, 242, 245);\n padding: 1px 0.25rem;\n font-family: Menlo, Consolas, Monaco, monospace;\n font-size: 94%;\n}\n.PlaygroundEditorTheme__hashtag {\n background-color: rgba(88, 144, 255, 0.15);\n border-bottom: 1px solid rgba(88, 144, 255, 0.3);\n}\n.PlaygroundEditorTheme__link {\n color: rgb(33, 111, 219);\n text-decoration: none;\n}\n.PlaygroundEditorTheme__link:hover {\n text-decoration: underline;\n cursor: pointer;\n}\n.PlaygroundEditorTheme__code {\n background-color: rgb(240, 242, 245);\n font-family: Menlo, Consolas, Monaco, monospace;\n display: block;\n padding: 8px 8px 8px 52px;\n line-height: 1.53;\n font-size: 13px;\n margin: 0;\n margin-top: 8px;\n margin-bottom: 8px;\n overflow-x: auto;\n position: relative;\n tab-size: 2;\n}\n.PlaygroundEditorTheme__code:before {\n content: attr(data-gutter);\n position: absolute;\n background-color: #eee;\n left: 0;\n top: 0;\n border-right: 1px solid #ccc;\n padding: 8px;\n color: #777;\n white-space: pre-wrap;\n text-align: right;\n min-width: 25px;\n}\n.PlaygroundEditorTheme__table {\n border-collapse: collapse;\n border-spacing: 0;\n overflow-y: scroll;\n overflow-x: scroll;\n table-layout: fixed;\n width: max-content;\n margin: 30px 0;\n}\n.PlaygroundEditorTheme__tableSelection *::selection {\n background-color: transparent;\n}\n.PlaygroundEditorTheme__tableSelected {\n outline: 2px solid rgb(60, 132, 244);\n}\n.PlaygroundEditorTheme__tableCell {\n border: 1px solid #bbb;\n width: 75px;\n min-width: 75px;\n vertical-align: top;\n text-align: start;\n padding: 6px 8px;\n position: relative;\n outline: none;\n}\n.PlaygroundEditorTheme__tableCellSortedIndicator {\n display: block;\n opacity: 0.5;\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 4px;\n background-color: #999;\n}\n.PlaygroundEditorTheme__tableCellResizer {\n position: absolute;\n right: -4px;\n height: 100%;\n width: 8px;\n cursor: ew-resize;\n z-index: 10;\n top: 0;\n}\n.PlaygroundEditorTheme__tableCellHeader {\n background-color: #f2f3f5;\n text-align: start;\n}\n.PlaygroundEditorTheme__tableCellSelected {\n background-color: #c9dbf0;\n}\n.PlaygroundEditorTheme__tableCellPrimarySelected {\n border: 2px solid rgb(60, 132, 244);\n display: block;\n height: calc(100% - 2px);\n position: absolute;\n width: calc(100% - 2px);\n left: -1px;\n top: -1px;\n z-index: 2;\n}\n.PlaygroundEditorTheme__tableCellEditing {\n box-shadow: 0 0 5px rgba(0, 0, 0, 0.4);\n border-radius: 3px;\n}\n.PlaygroundEditorTheme__tableAddColumns {\n position: absolute;\n top: 0;\n width: 20px;\n background-color: #eee;\n height: 100%;\n right: -25px;\n animation: table-controls 0.2s ease;\n border: 0;\n cursor: pointer;\n}\n.PlaygroundEditorTheme__tableAddColumns:after {\n background-image: url('/icons/plus.svg');\n background-size: contain;\n background-position: center;\n background-repeat: no-repeat;\n display: block;\n content: ' ';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n opacity: 0.4;\n}\n.PlaygroundEditorTheme__tableAddColumns:hover {\n background-color: #c9dbf0;\n}\n.PlaygroundEditorTheme__tableAddRows {\n position: absolute;\n bottom: -25px;\n width: calc(100% - 25px);\n background-color: #eee;\n height: 20px;\n left: 0;\n animation: table-controls 0.2s ease;\n border: 0;\n cursor: pointer;\n}\n.PlaygroundEditorTheme__tableAddRows:after {\n background-image: url(/icons/plus.svg);\n background-size: contain;\n background-position: center;\n background-repeat: no-repeat;\n display: block;\n content: ' ';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n opacity: 0.4;\n}\n.PlaygroundEditorTheme__tableAddRows:hover {\n background-color: #c9dbf0;\n}\n@keyframes table-controls {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n.PlaygroundEditorTheme__tableCellResizeRuler {\n display: block;\n position: absolute;\n width: 1px;\n background-color: rgb(60, 132, 244);\n height: 100%;\n top: 0;\n}\n.PlaygroundEditorTheme__tableCellActionButtonContainer {\n display: block;\n right: 5px;\n top: 6px;\n position: absolute;\n z-index: 4;\n width: 20px;\n height: 20px;\n}\n.PlaygroundEditorTheme__tableCellActionButton {\n background-color: #eee;\n display: block;\n border: 0;\n border-radius: 20px;\n width: 20px;\n height: 20px;\n color: #222;\n cursor: pointer;\n}\n.PlaygroundEditorTheme__tableCellActionButton:hover {\n background-color: #ddd;\n}\n.PlaygroundEditorTheme__characterLimit {\n display: inline;\n background-color: #ffbbbb !important;\n}\n.PlaygroundEditorTheme__ol1 {\n padding: 0;\n margin: 0;\n list-style-position: inside;\n list-style-type: decimal;\n margin-left: 20px;\n}\n.PlaygroundEditorTheme__ol2 {\n padding: 0;\n margin: 0;\n list-style-type: upper-alpha;\n list-style-position: inside;\n margin-left: 20px;\n}\n.PlaygroundEditorTheme__ol3 {\n padding: 0;\n margin: 0;\n list-style-type: lower-alpha;\n list-style-position: inside;\n margin-left: 20px;\n}\n.PlaygroundEditorTheme__ol4 {\n padding: 0;\n margin: 0;\n list-style-type: upper-roman;\n list-style-position: inside;\n margin-left: 20px;\n}\n.PlaygroundEditorTheme__ol5 {\n padding: 0;\n margin: 0;\n list-style-type: lower-roman;\n list-style-position: inside;\n margin-left: 20px;\n}\n.PlaygroundEditorTheme__ul {\n padding: 0;\n margin: 0;\n list-style: disc;\n margin-left: 20px;\n list-style-position: inside !important;;\n}\n\n.PlaygroundEditorTheme__listItem {\n font-family: var(--listitem-marker-font-family);\n font-size: var(--listitem-marker-font-size);\n background-color: var(--listitem-marker-background-color);\n}\n\n.PlaygroundEditorTheme__listItem::marker {\n color: var(--listitem-marker-color);\n background-color: var(--listitem-marker-background-color);\n font-family: var(--listitem-marker-font-family);\n font-size: var(--listitem-marker-font-size);\n font-style: var(--listitem-marker-font-style);\n font-weight: var(--listitem-marker-font-weight);\n}\n\n.PlaygroundEditorTheme__listItemChecked,\n.PlaygroundEditorTheme__listItemUnchecked {\n position: relative;\n margin-left: 8px;\n margin-right: 8px;\n padding-left: 24px;\n padding-right: 24px;\n list-style-type: none;\n outline: none;\n}\n.PlaygroundEditorTheme__listItemChecked {\n text-decoration: line-through;\n}\n.PlaygroundEditorTheme__listItemUnchecked:before,\n.PlaygroundEditorTheme__listItemChecked:before {\n content: '';\n width: 16px;\n height: 16px;\n top: 2px;\n left: 0;\n cursor: pointer;\n display: block;\n background-size: cover;\n position: absolute;\n}\n.PlaygroundEditorTheme__listItemUnchecked[dir='rtl']:before,\n.PlaygroundEditorTheme__listItemChecked[dir='rtl']:before {\n left: auto;\n right: 0;\n}\n.PlaygroundEditorTheme__listItemUnchecked:focus:before,\n.PlaygroundEditorTheme__listItemChecked:focus:before {\n box-shadow: 0 0 0 2px #a6cdfe;\n border-radius: 2px;\n}\n.PlaygroundEditorTheme__listItemUnchecked:before {\n border: 1px solid #999;\n border-radius: 2px;\n}\n.PlaygroundEditorTheme__listItemChecked:before {\n border: 1px solid rgb(61, 135, 245);\n border-radius: 2px;\n background-color: #3d87f5;\n background-repeat: no-repeat;\n}\n.PlaygroundEditorTheme__listItemChecked:after {\n content: '';\n cursor: pointer;\n border-color: #fff;\n border-style: solid;\n position: absolute;\n display: block;\n top: 6px;\n width: 3px;\n left: 7px;\n right: 7px;\n height: 6px;\n transform: rotate(45deg);\n border-width: 0 2px 2px 0;\n}\n.PlaygroundEditorTheme__nestedListItem {\n list-style-type: none;\n}\n.PlaygroundEditorTheme__nestedListItem:before,\n.PlaygroundEditorTheme__nestedListItem:after {\n display: none;\n}\n.PlaygroundEditorTheme__tokenComment {\n color: slategray;\n}\n.PlaygroundEditorTheme__tokenPunctuation {\n color: #999;\n}\n.PlaygroundEditorTheme__tokenProperty {\n color: #905;\n}\n.PlaygroundEditorTheme__tokenSelector {\n color: #690;\n}\n.PlaygroundEditorTheme__tokenOperator {\n color: #9a6e3a;\n}\n.PlaygroundEditorTheme__tokenAttr {\n color: #07a;\n}\n.PlaygroundEditorTheme__tokenVariable {\n color: #e90;\n}\n.PlaygroundEditorTheme__tokenFunction {\n color: #dd4a68;\n}\n.PlaygroundEditorTheme__mark {\n background: rgba(255, 212, 0, 0.14);\n border-bottom: 2px solid rgba(255, 212, 0, 0.3);\n padding-bottom: 2px;\n}\n.PlaygroundEditorTheme__markOverlap {\n background: rgba(255, 212, 0, 0.3);\n border-bottom: 2px solid rgba(255, 212, 0, 0.7);\n}\n.PlaygroundEditorTheme__mark.selected {\n background: rgba(255, 212, 0, 0.5);\n border-bottom: 2px solid rgba(255, 212, 0, 1);\n}\n.PlaygroundEditorTheme__markOverlap.selected {\n background: rgba(255, 212, 0, 0.7);\n border-bottom: 2px solid rgba(255, 212, 0, 0.7);\n}\n.PlaygroundEditorTheme__embedBlock {\n user-select: none;\n}\n.PlaygroundEditorTheme__embedBlockFocus {\n outline: 2px solid rgb(60, 132, 244);\n}\n.PlaygroundEditorTheme__layoutContaner {\n display: grid;\n gap: 10px;\n margin: 10px 0;\n}\n.PlaygroundEditorTheme__layoutItem {\n border: 1px dashed #ddd;\n padding: 8px 16px;\n}\n\n.editor-image img {\n margin-left: auto;\n margin-right: auto;\n max-width: 90% !important;\n border: 1px solid #e5e7eb;\n margin-bottom: 10px;\n}\n";
|
|
@@ -325,6 +325,21 @@ exports.styleTag = `
|
|
|
325
325
|
list-style-position: inside !important;;
|
|
326
326
|
}
|
|
327
327
|
|
|
328
|
+
.PlaygroundEditorTheme__listItem {
|
|
329
|
+
font-family: var(--listitem-marker-font-family);
|
|
330
|
+
font-size: var(--listitem-marker-font-size);
|
|
331
|
+
background-color: var(--listitem-marker-background-color);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.PlaygroundEditorTheme__listItem::marker {
|
|
335
|
+
color: var(--listitem-marker-color);
|
|
336
|
+
background-color: var(--listitem-marker-background-color);
|
|
337
|
+
font-family: var(--listitem-marker-font-family);
|
|
338
|
+
font-size: var(--listitem-marker-font-size);
|
|
339
|
+
font-style: var(--listitem-marker-font-style);
|
|
340
|
+
font-weight: var(--listitem-marker-font-weight);
|
|
341
|
+
}
|
|
342
|
+
|
|
328
343
|
.PlaygroundEditorTheme__listItemChecked,
|
|
329
344
|
.PlaygroundEditorTheme__listItemUnchecked {
|
|
330
345
|
position: relative;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/components/TextEditorV2/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,QAAQ,GAAG
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/components/TextEditorV2/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsdvB,CAAA"}
|
|
@@ -14,54 +14,30 @@ const PlaygroundNodes_1 = tslib_1.__importDefault(require("./nodes/PlaygroundNod
|
|
|
14
14
|
const TablePlugin_1 = require("./plugins/TablePlugin");
|
|
15
15
|
const canUseDOM_1 = require("./shared/canUseDOM");
|
|
16
16
|
const PlaygroundEditorTheme_1 = tslib_1.__importDefault(require("./themes/PlaygroundEditorTheme"));
|
|
17
|
-
const LexicalCharacterLimitPlugin_1 = require("@lexical/react/LexicalCharacterLimitPlugin");
|
|
18
17
|
const LexicalCheckListPlugin_1 = require("@lexical/react/LexicalCheckListPlugin");
|
|
19
18
|
const LexicalClearEditorPlugin_1 = require("@lexical/react/LexicalClearEditorPlugin");
|
|
20
|
-
const LexicalClickableLinkPlugin_1 = tslib_1.__importDefault(require("@lexical/react/LexicalClickableLinkPlugin"));
|
|
21
|
-
const LexicalErrorBoundary_1 = tslib_1.__importDefault(require("@lexical/react/LexicalErrorBoundary"));
|
|
22
|
-
const LexicalHashtagPlugin_1 = require("@lexical/react/LexicalHashtagPlugin");
|
|
23
19
|
const LexicalHistoryPlugin_1 = require("@lexical/react/LexicalHistoryPlugin");
|
|
24
|
-
const LexicalHorizontalRulePlugin_1 = require("@lexical/react/LexicalHorizontalRulePlugin");
|
|
25
20
|
const LexicalListPlugin_1 = require("@lexical/react/LexicalListPlugin");
|
|
26
21
|
const LexicalOnChangePlugin_1 = require("@lexical/react/LexicalOnChangePlugin");
|
|
27
22
|
const LexicalRichTextPlugin_1 = require("@lexical/react/LexicalRichTextPlugin");
|
|
28
23
|
const LexicalTabIndentationPlugin_1 = require("@lexical/react/LexicalTabIndentationPlugin");
|
|
29
|
-
const LexicalTablePlugin_1 = require("@lexical/react/LexicalTablePlugin");
|
|
30
|
-
const AutoEmbedPlugin_1 = tslib_1.__importDefault(require("./plugins/AutoEmbedPlugin"));
|
|
31
|
-
const AutocompletePlugin_1 = tslib_1.__importDefault(require("./plugins/AutocompletePlugin"));
|
|
32
|
-
const CodeHighlightPlugin_1 = tslib_1.__importDefault(require("./plugins/CodeHighlightPlugin"));
|
|
33
|
-
const CollapsiblePlugin_1 = tslib_1.__importDefault(require("./plugins/CollapsiblePlugin"));
|
|
34
|
-
const ContextMenuPlugin_1 = tslib_1.__importDefault(require("./plugins/ContextMenuPlugin"));
|
|
35
|
-
const EmojiPickerPlugin_1 = tslib_1.__importDefault(require("./plugins/EmojiPickerPlugin"));
|
|
36
|
-
const EmojisPlugin_1 = tslib_1.__importDefault(require("./plugins/EmojisPlugin"));
|
|
37
|
-
const EquationsPlugin_1 = tslib_1.__importDefault(require("./plugins/EquationsPlugin"));
|
|
38
|
-
const ExcalidrawPlugin_1 = tslib_1.__importDefault(require("./plugins/ExcalidrawPlugin"));
|
|
39
|
-
const FigmaPlugin_1 = tslib_1.__importDefault(require("./plugins/FigmaPlugin"));
|
|
40
24
|
const ImagesPlugin_1 = tslib_1.__importDefault(require("./plugins/ImagesPlugin"));
|
|
41
25
|
const InlineImagePlugin_1 = tslib_1.__importDefault(require("./plugins/InlineImagePlugin"));
|
|
42
|
-
const KeywordsPlugin_1 = tslib_1.__importDefault(require("./plugins/KeywordsPlugin"));
|
|
43
|
-
const LayoutPlugin_1 = require("./plugins/LayoutPlugin/LayoutPlugin");
|
|
44
|
-
const LinkPlugin_1 = tslib_1.__importDefault(require("./plugins/LinkPlugin"));
|
|
45
26
|
const ListMaxIndentLevelPlugin_1 = tslib_1.__importDefault(require("./plugins/ListMaxIndentLevelPlugin"));
|
|
46
|
-
const MarkdownShortcutPlugin_1 = tslib_1.__importDefault(require("./plugins/MarkdownShortcutPlugin"));
|
|
47
27
|
const MaxLengthPlugin_1 = require("./plugins/MaxLengthPlugin");
|
|
48
|
-
const
|
|
49
|
-
const PageBreakPlugin_1 = tslib_1.__importDefault(require("./plugins/PageBreakPlugin"));
|
|
28
|
+
const SanitizePastePlugin_1 = tslib_1.__importDefault(require("./plugins/SanitizePastePlugin"));
|
|
50
29
|
const ContentEditable_1 = tslib_1.__importDefault(require("./ui/ContentEditable"));
|
|
51
|
-
const PollPlugin_1 = tslib_1.__importDefault(require("./plugins/PollPlugin"));
|
|
52
|
-
const TabFocusPlugin_1 = tslib_1.__importDefault(require("./plugins/TabFocusPlugin"));
|
|
53
|
-
const TableCellResizer_1 = tslib_1.__importDefault(require("./plugins/TableCellResizer"));
|
|
54
|
-
const TableOfContentsPlugin_1 = tslib_1.__importDefault(require("./plugins/TableOfContentsPlugin"));
|
|
55
30
|
const ToolbarPlugin_1 = tslib_1.__importDefault(require("./plugins/ToolbarPlugin"));
|
|
56
|
-
const TwitterPlugin_1 = tslib_1.__importDefault(require("./plugins/TwitterPlugin"));
|
|
57
|
-
const YouTubePlugin_1 = tslib_1.__importDefault(require("./plugins/YouTubePlugin"));
|
|
58
31
|
const SettingsContext_1 = require("./context/SettingsContext");
|
|
59
32
|
const constants_1 = require("./constants");
|
|
60
33
|
const style_1 = tslib_1.__importDefault(require("./style"));
|
|
34
|
+
const LexicalClickableLinkPlugin_1 = require("@lexical/react/LexicalClickableLinkPlugin");
|
|
35
|
+
const LexicalLinkPlugin_1 = require("@lexical/react/LexicalLinkPlugin");
|
|
36
|
+
const LexicalErrorBoundary_1 = require("./shared/LexicalErrorBoundary");
|
|
61
37
|
function PHXTextEditorV2({ defaultValue, label, onChange, placeholder, apiCdnUpload, disabled = false, }) {
|
|
62
38
|
const [isSmallWidthViewport, setIsSmallWidthViewport] = (0, react_1.useState)(false);
|
|
63
39
|
const { historyState } = (0, SharedHistoryContext_1.useSharedHistoryContext)();
|
|
64
|
-
const { settings: {
|
|
40
|
+
const { settings: { isMaxLength }, } = (0, SettingsContext_1.useSettings)();
|
|
65
41
|
const editorConfig = {
|
|
66
42
|
theme: PlaygroundEditorTheme_1.default,
|
|
67
43
|
editorState: prepopulatedRichText,
|
|
@@ -142,41 +118,17 @@ function PHXTextEditorV2({ defaultValue, label, onChange, placeholder, apiCdnUpl
|
|
|
142
118
|
React.createElement("div", { className: 'relative' },
|
|
143
119
|
isMaxLength && React.createElement(MaxLengthPlugin_1.MaxLengthPlugin, { maxLength: 30 }),
|
|
144
120
|
React.createElement(LexicalClearEditorPlugin_1.ClearEditorPlugin, null),
|
|
145
|
-
React.createElement(EmojiPickerPlugin_1.default, null),
|
|
146
|
-
React.createElement(AutoEmbedPlugin_1.default, null),
|
|
147
|
-
React.createElement(MentionsPlugin_1.default, null),
|
|
148
|
-
React.createElement(EmojisPlugin_1.default, null),
|
|
149
|
-
React.createElement(LexicalHashtagPlugin_1.HashtagPlugin, null),
|
|
150
|
-
React.createElement(KeywordsPlugin_1.default, null),
|
|
151
121
|
React.createElement(LexicalOnChangePlugin_1.OnChangePlugin, { onChange: handleChange }),
|
|
152
122
|
React.createElement(LexicalHistoryPlugin_1.HistoryPlugin, { externalHistoryState: historyState }),
|
|
153
|
-
React.createElement(
|
|
154
|
-
React.createElement(
|
|
155
|
-
React.createElement(CodeHighlightPlugin_1.default, null),
|
|
123
|
+
React.createElement(SanitizePastePlugin_1.default, null),
|
|
124
|
+
React.createElement(LexicalRichTextPlugin_1.RichTextPlugin, { contentEditable: React.createElement(ContentEditable_1.default, { className: 'PHXTextEditorV2__contentEditable px-2 py-1.5 h-[20rem] overflow-y-auto outline-none' }), ErrorBoundary: LexicalErrorBoundary_1.LexicalErrorBoundary, placeholder: React.createElement("p", { className: 'absolute top-1.5 left-2 text-xs text-[#999] z-10 overflow-hidden text-ellipsis inline-block select-none pointer-events-none' }, placeholder) }),
|
|
156
125
|
React.createElement(LexicalListPlugin_1.ListPlugin, null),
|
|
157
126
|
React.createElement(LexicalCheckListPlugin_1.CheckListPlugin, null),
|
|
158
127
|
React.createElement(ListMaxIndentLevelPlugin_1.default, { maxDepth: 7 }),
|
|
159
|
-
React.createElement(LexicalTablePlugin_1.TablePlugin, { hasCellBackgroundColor: tableCellBackgroundColor, hasCellMerge: tableCellMerge }),
|
|
160
|
-
React.createElement(TableCellResizer_1.default, null),
|
|
161
128
|
React.createElement(ImagesPlugin_1.default, null),
|
|
162
129
|
React.createElement(InlineImagePlugin_1.default, null),
|
|
163
|
-
React.createElement(
|
|
164
|
-
React.createElement(
|
|
165
|
-
React.createElement(
|
|
166
|
-
React.createElement(YouTubePlugin_1.default, null),
|
|
167
|
-
React.createElement(FigmaPlugin_1.default, null),
|
|
168
|
-
React.createElement(LexicalClickableLinkPlugin_1.default, null),
|
|
169
|
-
React.createElement(LexicalHorizontalRulePlugin_1.HorizontalRulePlugin, null),
|
|
170
|
-
React.createElement(EquationsPlugin_1.default, null),
|
|
171
|
-
React.createElement(ExcalidrawPlugin_1.default, null),
|
|
172
|
-
React.createElement(TabFocusPlugin_1.default, null),
|
|
173
|
-
React.createElement(LexicalTabIndentationPlugin_1.TabIndentationPlugin, null),
|
|
174
|
-
React.createElement(CollapsiblePlugin_1.default, null),
|
|
175
|
-
React.createElement(PageBreakPlugin_1.default, null),
|
|
176
|
-
React.createElement(LayoutPlugin_1.LayoutPlugin, null),
|
|
177
|
-
(isCharLimit || isCharLimitUtf8) && (React.createElement(LexicalCharacterLimitPlugin_1.CharacterLimitPlugin, { charset: isCharLimit ? 'UTF-16' : 'UTF-8', maxLength: 5 })),
|
|
178
|
-
isAutocomplete && React.createElement(AutocompletePlugin_1.default, null),
|
|
179
|
-
React.createElement("div", null, showTableOfContents && React.createElement(TableOfContentsPlugin_1.default, null)),
|
|
180
|
-
shouldUseLexicalContextMenu && React.createElement(ContextMenuPlugin_1.default, null)))))))));
|
|
130
|
+
React.createElement(LexicalLinkPlugin_1.LinkPlugin, null),
|
|
131
|
+
React.createElement(LexicalClickableLinkPlugin_1.ClickableLinkPlugin, { newTab: true }),
|
|
132
|
+
React.createElement(LexicalTabIndentationPlugin_1.TabIndentationPlugin, null)))))))));
|
|
181
133
|
}
|
|
182
134
|
//# sourceMappingURL=editor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor.js","sourceRoot":"","sources":["../../../../src/components/TextEditorV2/editor.tsx"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"editor.js","sourceRoot":"","sources":["../../../../src/components/TextEditorV2/editor.tsx"],"names":[],"mappings":";;AA0CA,kCA2IC;;AArLD,wCAA6E;AAC7E,oEAAgE;AAChE,qCAAyE;AACzE,qDAA8B;AAC9B,iCAA2C;AAC3C,mFAA+E;AAC/E,yEAA8F;AAC9F,+DAA2D;AAC3D,sFAAqD;AACrD,uDAAoD;AACpD,kDAAgD;AAChD,mGAAkE;AAClE,kFAAuE;AACvE,sFAA2E;AAC3E,8EAAmE;AACnE,wEAA6D;AAC7D,gFAAqE;AACrE,gFAAqE;AACrE,4FAAiF;AACjF,kFAAiD;AACjD,4FAA2D;AAC3D,0GAAyE;AACzE,+DAA2D;AAC3D,gGAA+D;AAC/D,mFAAkD;AAClD,oFAAmD;AACnD,+DAAuD;AACvD,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T,2BAAG,SAAS,EAAC,6HAA6H,IACvI,WAAW,CACV,GAEN;gCACF,oBAAC,8BAAU,OAAG;gCACd,oBAAC,wCAAe,OAAG;gCACnB,oBAAC,kCAAwB,IAAC,QAAQ,EAAE,CAAC,GAAI;gCACzC,oBAAC,sBAAY,OAAG;gCAChB,oBAAC,2BAAiB,OAAG;gCACrB,oBAAC,8BAAU,OAAG;gCACd,oBAAC,gDAAmB,IAAC,MAAM,SAAG;gCAC9B,oBAAC,kDAAoB,OAAG,CACpB,CACF,CACoB,CACf,CACM,CACP,CACd,CACP,CAAA;AACH,CAAC"}
|
|
@@ -7,7 +7,6 @@ const LexicalAutoFocusPlugin_1 = require("@lexical/react/LexicalAutoFocusPlugin"
|
|
|
7
7
|
const LexicalCollaborationContext_1 = require("@lexical/react/LexicalCollaborationContext");
|
|
8
8
|
const LexicalCollaborationPlugin_1 = require("@lexical/react/LexicalCollaborationPlugin");
|
|
9
9
|
const LexicalComposerContext_1 = require("@lexical/react/LexicalComposerContext");
|
|
10
|
-
const LexicalErrorBoundary_1 = tslib_1.__importDefault(require("@lexical/react/LexicalErrorBoundary"));
|
|
11
10
|
const LexicalHashtagPlugin_1 = require("@lexical/react/LexicalHashtagPlugin");
|
|
12
11
|
const LexicalHistoryPlugin_1 = require("@lexical/react/LexicalHistoryPlugin");
|
|
13
12
|
const LexicalNestedComposer_1 = require("@lexical/react/LexicalNestedComposer");
|
|
@@ -20,15 +19,13 @@ const react_1 = require("react");
|
|
|
20
19
|
const SettingsContext_1 = require("../context/SettingsContext");
|
|
21
20
|
const SharedHistoryContext_1 = require("../context/SharedHistoryContext");
|
|
22
21
|
const collaboration_1 = require("../lib/collaboration");
|
|
23
|
-
const EmojisPlugin_1 = tslib_1.__importDefault(require("../plugins/EmojisPlugin"));
|
|
24
|
-
const KeywordsPlugin_1 = tslib_1.__importDefault(require("../plugins/KeywordsPlugin"));
|
|
25
22
|
const LinkPlugin_1 = tslib_1.__importDefault(require("../plugins/LinkPlugin"));
|
|
26
|
-
const MentionsPlugin_1 = tslib_1.__importDefault(require("../plugins/MentionsPlugin"));
|
|
27
23
|
const TreeViewPlugin_1 = tslib_1.__importDefault(require("../plugins/TreeViewPlugin"));
|
|
28
24
|
const ContentEditable_1 = tslib_1.__importDefault(require("../ui/ContentEditable"));
|
|
29
25
|
const ImageResizer_1 = tslib_1.__importDefault(require("../ui/ImageResizer"));
|
|
30
26
|
const Placeholder_1 = tslib_1.__importDefault(require("../ui/Placeholder"));
|
|
31
27
|
const ImageNode_1 = require("./ImageNode");
|
|
28
|
+
const LexicalErrorBoundary_1 = require("../shared/LexicalErrorBoundary");
|
|
32
29
|
const imageCache = new Set();
|
|
33
30
|
exports.RIGHT_CLICK_IMAGE_COMMAND = (0, lexical_1.createCommand)('RIGHT_CLICK_IMAGE_COMMAND');
|
|
34
31
|
function useSuspenseImage(src) {
|
|
@@ -196,13 +193,10 @@ function ImageComponent({ altText, caption, height, maxWidth, nodeKey, resizable
|
|
|
196
193
|
showCaption && (React.createElement("div", { className: 'image-caption-container' },
|
|
197
194
|
React.createElement(LexicalNestedComposer_1.LexicalNestedComposer, { initialEditor: caption },
|
|
198
195
|
React.createElement(LexicalAutoFocusPlugin_1.AutoFocusPlugin, null),
|
|
199
|
-
React.createElement(MentionsPlugin_1.default, null),
|
|
200
196
|
React.createElement(LinkPlugin_1.default, null),
|
|
201
|
-
React.createElement(EmojisPlugin_1.default, null),
|
|
202
197
|
React.createElement(LexicalHashtagPlugin_1.HashtagPlugin, null),
|
|
203
|
-
React.createElement(KeywordsPlugin_1.default, null),
|
|
204
198
|
isCollabActive ? (React.createElement(LexicalCollaborationPlugin_1.CollaborationPlugin, { id: caption.getKey(), providerFactory: collaboration_1.createWebsocketProvider, shouldBootstrap: true })) : (React.createElement(LexicalHistoryPlugin_1.HistoryPlugin, { externalHistoryState: historyState })),
|
|
205
|
-
React.createElement(LexicalRichTextPlugin_1.RichTextPlugin, { contentEditable: React.createElement(ContentEditable_1.default, { className: 'ImageNode__contentEditable' }), ErrorBoundary: LexicalErrorBoundary_1.
|
|
199
|
+
React.createElement(LexicalRichTextPlugin_1.RichTextPlugin, { contentEditable: React.createElement(ContentEditable_1.default, { className: 'ImageNode__contentEditable' }), ErrorBoundary: LexicalErrorBoundary_1.LexicalErrorBoundary, placeholder: React.createElement(Placeholder_1.default, { className: 'ImageNode__placeholder' }, "Enter a caption...") }),
|
|
206
200
|
showNestedEditorTreeView === true ? React.createElement(TreeViewPlugin_1.default, null) : null))),
|
|
207
201
|
resizable && (0, lexical_1.$isNodeSelection)(selection) && isFocused && (React.createElement(ImageResizer_1.default, { editor: editor, imageRef: imageRef, maxWidth: maxWidth, onResizeEnd: onResizeEnd, onResizeStart: onResizeStart })))));
|
|
208
202
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageComponent.js","sourceRoot":"","sources":["../../../../../src/components/TextEditorV2/nodes/ImageComponent.tsx"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ImageComponent.js","sourceRoot":"","sources":["../../../../../src/components/TextEditorV2/nodes/ImageComponent.tsx"],"names":[],"mappings":";;;AA4FA,iCA8PC;;AAxVD,kFAAuE;AACvE,4FAAoF;AACpF,0FAA+E;AAC/E,kFAAiF;AACjF,8EAAmE;AACnE,8EAAmE;AACnE,gFAA4E;AAC5E,gFAAqE;AACrE,oFAAgF;AAChF,0CAA8C;AAC9C,qCAegB;AAChB,qDAA8B;AAC9B,iCAA0E;AAC1E,gEAAwD;AACxD,0EAAyE;AACzE,wDAA8D;AAC9D,+EAA8C;AAC9C,uFAAsD;AACtD,oFAAmD;AACnD,8EAA6C;AAC7C,4EAA2C;AAC3C,2CAA0C;AAC1C,yEAAqE;AAErE,MAAM,UAAU,GAAG,IAAI,GAAG,EAAE,CAAA;AAEf,QAAA,yBAAyB,GAA+B,IAAA,uBAAa,EAAC,2BAA2B,CAAC,CAAA;AAE/G,SAAS,gBAAgB,CAAC,GAAW;IACnC,IAAI,CAAC,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GAAG,EACR,KAAK,EAAE,KAAK,GACZ,CACE;YACL,WAAW,IAAI,CACd,6BAAK,SAAS,EAAC,yBAAyB;gBACtC,oBAAC,6CAAqB,IAAC,aAAa,EAAE,OAAO;oBAC3C,oBAAC,wCAAe,OAAG;oBACnB,oBAAC,oBAAU,OAAG;oBACd,oBAAC,oCAAa,OAAG;oBAChB,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;oBACD,oBAAC,sCAAc,IACb,eAAe,EAAE,oBAAC,yBAAe,IAAC,SAAS,EAAC,4BAA4B,GAAG,EAC3E,aAAa,EAAE,2CAAoB,EACnC,WAAW,EAAE,oBAAC,qBAAW,IAAC,SAAS,EAAC,wBAAwB,yBAAiC,GAC7F;oBACD,wBAAwB,KAAK,IAAI,CAAC,CAAC,CAAC,oBAAC,wBAAc,OAAG,CAAC,CAAC,CAAC,IAAI,CACxC,CACpB,CACP;YACA,SAAS,IAAI,IAAA,0BAAgB,EAAC,SAAS,CAAC,IAAI,SAAS,IAAI,CACxD,oBAAC,sBAAY,IACX,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,aAAa,GAC5B,CACH,CACA,CACM,CACZ,CAAA;AACH,CAAC"}
|
|
@@ -5,7 +5,6 @@ exports.default = InlineImageComponent;
|
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
6
|
const LexicalAutoFocusPlugin_1 = require("@lexical/react/LexicalAutoFocusPlugin");
|
|
7
7
|
const LexicalComposerContext_1 = require("@lexical/react/LexicalComposerContext");
|
|
8
|
-
const LexicalErrorBoundary_1 = tslib_1.__importDefault(require("@lexical/react/LexicalErrorBoundary"));
|
|
9
8
|
const LexicalNestedComposer_1 = require("@lexical/react/LexicalNestedComposer");
|
|
10
9
|
const LexicalRichTextPlugin_1 = require("@lexical/react/LexicalRichTextPlugin");
|
|
11
10
|
const useLexicalNodeSelection_1 = require("@lexical/react/useLexicalNodeSelection");
|
|
@@ -24,6 +23,7 @@ const Placeholder_1 = tslib_1.__importDefault(require("../ui/Placeholder"));
|
|
|
24
23
|
const Select_1 = tslib_1.__importDefault(require("../ui/Select"));
|
|
25
24
|
const TextInput_1 = tslib_1.__importDefault(require("../ui/TextInput"));
|
|
26
25
|
const InlineImageNode_1 = require("./InlineImageNode");
|
|
26
|
+
const LexicalErrorBoundary_1 = require("../shared/LexicalErrorBoundary");
|
|
27
27
|
const imageCache = new Set();
|
|
28
28
|
function useSuspenseImage(src) {
|
|
29
29
|
if (!imageCache.has(src)) {
|
|
@@ -184,7 +184,7 @@ function InlineImageComponent({ altText, caption, height, nodeKey, position, sho
|
|
|
184
184
|
console.log('FloatingLinkEditorPlugin');
|
|
185
185
|
} }),
|
|
186
186
|
React.createElement(FloatingTextFormatToolbarPlugin_1.default, null),
|
|
187
|
-
React.createElement(LexicalRichTextPlugin_1.RichTextPlugin, { contentEditable: React.createElement(ContentEditable_1.default, { className: 'InlineImageNode__contentEditable' }), ErrorBoundary: LexicalErrorBoundary_1.
|
|
187
|
+
React.createElement(LexicalRichTextPlugin_1.RichTextPlugin, { contentEditable: React.createElement(ContentEditable_1.default, { className: 'InlineImageNode__contentEditable' }), ErrorBoundary: LexicalErrorBoundary_1.LexicalErrorBoundary, placeholder: React.createElement(Placeholder_1.default, { className: 'InlineImageNode__placeholder' }, "Enter a caption...") }))))),
|
|
188
188
|
modal));
|
|
189
189
|
}
|
|
190
190
|
//# sourceMappingURL=InlineImageComponent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineImageComponent.js","sourceRoot":"","sources":["../../../../../src/components/TextEditorV2/nodes/InlineImageComponent.tsx"],"names":[],"mappings":";;AAuFA,0DAsEC;AAED,uCAgMC;;AA7VD,kFAAuE;AACvE,kFAAiF;AACjF,
|
|
1
|
+
{"version":3,"file":"InlineImageComponent.js","sourceRoot":"","sources":["../../../../../src/components/TextEditorV2/nodes/InlineImageComponent.tsx"],"names":[],"mappings":";;AAuFA,0DAsEC;AAED,uCAgMC;;AA7VD,kFAAuE;AACvE,kFAAiF;AACjF,gFAA4E;AAC5E,gFAAqE;AACrE,oFAAgF;AAChF,0CAA8C;AAC9C,qCAagB;AAChB,qDAA8B;AAC9B,iCAA0E;AAC1E,yEAAwC;AACxC,2GAA0E;AAC1E,yHAAwF;AACxF,+EAA8C;AAC9C,kEAAiC;AACjC,oFAAmD;AACnD,yCAA4C;AAC5C,4EAA2C;AAC3C,kEAAiC;AACjC,wEAAuC;AACvC,uDAAuE;AACvE,yEAAqE;AAErE,MAAM,UAAU,GAAG,IAAI,GAAG,EAAE,CAAA;AAE5B,SAAS,gBAAgB,CAAC,GAAW;IACnC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC5B,MAAM,GAAG,GAAG,IAAI,KAAK,EAAE,CAAA;YACvB,GAAG,CAAC,GAAG,GAAG,GAAG,CAAA;YACb,GAAG,CAAC,MAAM,GAAG,GAAG,EAAE;gBAChB,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;gBACnB,OAAO,CAAC,IAAI,CAAC,CAAA;YACf,CAAC,CAAA;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;AACH,CAAC;AAED,SAAS,SAAS,CAAC,EACjB,OAAO,EACP,SAAS,EACT,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,GAAG,EACH,KAAK,GASN;IACC,gBAAgB,CAAC,GAAG,CAAC,CAAA;IACrB,OAAO,CACL,6BACE,GAAG,EAAE,QAAQ,EACb,GAAG,EAAE,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BAAyB;gBACtC,oBAAC,6CAAqB,IAAC,aAAa,EAAE,OAAO;oBAC3C,oBAAC,wCAAe,OAAG;oBACnB,oBAAC,oBAAU,OAAG;oBACd,oBAAC,kCAAwB,IACvB,cAAc,EAAE,KAAK,EACrB,iBAAiB,EAAE,GAAG,EAAE;4BACtB,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAA;wBACzC,CAAC,GACD;oBACF,oBAAC,yCAA+B,OAAG;oBACnC,oBAAC,sCAAc,IACb,eAAe,EAAE,oBAAC,yBAAe,IAAC,SAAS,EAAC,kCAAkC,GAAG,EACjF,aAAa,EAAE,2CAAoB,EACnC,WAAW,EAAE,oBAAC,qBAAW,IAAC,SAAS,EAAC,8BAA8B,yBAAiC,GACnG,CACoB,CACpB,CACP,CACA;QACF,KAAK,CACG,CACZ,CAAA;AACH,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const code_1 = require("@lexical/code");
|
|
4
3
|
const hashtag_1 = require("@lexical/hashtag");
|
|
5
4
|
const link_1 = require("@lexical/link");
|
|
6
5
|
const list_1 = require("@lexical/list");
|
|
@@ -9,12 +8,6 @@ const overflow_1 = require("@lexical/overflow");
|
|
|
9
8
|
const LexicalHorizontalRuleNode_1 = require("@lexical/react/LexicalHorizontalRuleNode");
|
|
10
9
|
const rich_text_1 = require("@lexical/rich-text");
|
|
11
10
|
const table_1 = require("@lexical/table");
|
|
12
|
-
const CollapsibleContainerNode_1 = require("../plugins/CollapsiblePlugin/CollapsibleContainerNode");
|
|
13
|
-
const CollapsibleContentNode_1 = require("../plugins/CollapsiblePlugin/CollapsibleContentNode");
|
|
14
|
-
const CollapsibleTitleNode_1 = require("../plugins/CollapsiblePlugin/CollapsibleTitleNode");
|
|
15
|
-
const AutocompleteNode_1 = require("./AutocompleteNode");
|
|
16
|
-
const EmojiNode_1 = require("./EmojiNode");
|
|
17
|
-
const EquationNode_1 = require("./EquationNode");
|
|
18
11
|
const ExcalidrawNode_1 = require("./ExcalidrawNode");
|
|
19
12
|
const FigmaNode_1 = require("./FigmaNode");
|
|
20
13
|
const ImageNode_1 = require("./ImageNode");
|
|
@@ -24,8 +17,6 @@ const LayoutContainerNode_1 = require("./LayoutContainerNode");
|
|
|
24
17
|
const LayoutItemNode_1 = require("./LayoutItemNode");
|
|
25
18
|
const MentionNode_1 = require("./MentionNode");
|
|
26
19
|
const PageBreakNode_1 = require("./PageBreakNode");
|
|
27
|
-
const PollNode_1 = require("./PollNode");
|
|
28
|
-
const StickyNode_1 = require("./StickyNode");
|
|
29
20
|
const TweetNode_1 = require("./TweetNode");
|
|
30
21
|
const YouTubeNode_1 = require("./YouTubeNode");
|
|
31
22
|
const PlaygroundNodes = [
|
|
@@ -33,33 +24,23 @@ const PlaygroundNodes = [
|
|
|
33
24
|
list_1.ListNode,
|
|
34
25
|
list_1.ListItemNode,
|
|
35
26
|
rich_text_1.QuoteNode,
|
|
36
|
-
code_1.CodeNode,
|
|
37
27
|
table_1.TableNode,
|
|
38
28
|
table_1.TableCellNode,
|
|
39
29
|
table_1.TableRowNode,
|
|
40
30
|
hashtag_1.HashtagNode,
|
|
41
|
-
code_1.CodeHighlightNode,
|
|
42
31
|
link_1.AutoLinkNode,
|
|
43
32
|
link_1.LinkNode,
|
|
44
33
|
overflow_1.OverflowNode,
|
|
45
|
-
PollNode_1.PollNode,
|
|
46
|
-
StickyNode_1.StickyNode,
|
|
47
34
|
ImageNode_1.ImageNode,
|
|
48
35
|
InlineImageNode_1.InlineImageNode,
|
|
49
36
|
MentionNode_1.MentionNode,
|
|
50
|
-
EmojiNode_1.EmojiNode,
|
|
51
37
|
ExcalidrawNode_1.ExcalidrawNode,
|
|
52
|
-
EquationNode_1.EquationNode,
|
|
53
|
-
AutocompleteNode_1.AutocompleteNode,
|
|
54
38
|
KeywordNode_1.KeywordNode,
|
|
55
39
|
LexicalHorizontalRuleNode_1.HorizontalRuleNode,
|
|
56
40
|
TweetNode_1.TweetNode,
|
|
57
41
|
YouTubeNode_1.YouTubeNode,
|
|
58
42
|
FigmaNode_1.FigmaNode,
|
|
59
43
|
mark_1.MarkNode,
|
|
60
|
-
CollapsibleContainerNode_1.CollapsibleContainerNode,
|
|
61
|
-
CollapsibleContentNode_1.CollapsibleContentNode,
|
|
62
|
-
CollapsibleTitleNode_1.CollapsibleTitleNode,
|
|
63
44
|
PageBreakNode_1.PageBreakNode,
|
|
64
45
|
LayoutContainerNode_1.LayoutContainerNode,
|
|
65
46
|
LayoutItemNode_1.LayoutItemNode,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlaygroundNodes.js","sourceRoot":"","sources":["../../../../../src/components/TextEditorV2/nodes/PlaygroundNodes.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"PlaygroundNodes.js","sourceRoot":"","sources":["../../../../../src/components/TextEditorV2/nodes/PlaygroundNodes.ts"],"names":[],"mappings":";;AAAA,8CAA8C;AAC9C,wCAAsD;AACtD,wCAAsD;AACtD,wCAAwC;AACxC,gDAAgD;AAChD,wFAA6E;AAC7E,kDAA2D;AAC3D,0CAAuE;AAEvE,qDAAiD;AACjD,2CAAuC;AACvC,2CAAuC;AACvC,uDAAmD;AACnD,+CAA2C;AAC3C,+DAA2D;AAC3D,qDAAiD;AACjD,+CAA2C;AAC3C,mDAA+C;AAC/C,2CAAuC;AACvC,+CAA2C;AAE3C,MAAM,eAAe,GAA8B;IACjD,uBAAW;IACX,eAAQ;IACR,mBAAY;IACZ,qBAAS;IACT,iBAAS;IACT,qBAAa;IACb,oBAAY;IACZ,qBAAW;IACX,mBAAY;IACZ,eAAQ;IACR,uBAAY;IACZ,qBAAS;IACT,iCAAe;IACf,yBAAW;IACX,+BAAc;IACd,yBAAW;IACX,8CAAkB;IAClB,qBAAS;IACT,yBAAW;IACX,qBAAS;IACT,eAAQ;IACR,6BAAa;IACb,yCAAmB;IACnB,+BAAc;CACf,CAAA;AAED,kBAAe,eAAe,CAAA"}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = FloatingTextFormatToolbarPlugin;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const code_1 = require("@lexical/code");
|
|
6
5
|
const link_1 = require("@lexical/link");
|
|
7
6
|
const LexicalComposerContext_1 = require("@lexical/react/LexicalComposerContext");
|
|
8
7
|
const utils_1 = require("@lexical/utils");
|
|
@@ -186,7 +185,7 @@ function useFloatingTextFormatToolbar(editor, anchorElem) {
|
|
|
186
185
|
else {
|
|
187
186
|
setIsLink(false);
|
|
188
187
|
}
|
|
189
|
-
if (
|
|
188
|
+
if (selection.getTextContent() !== '') {
|
|
190
189
|
setIsText((0, lexical_1.$isTextNode)(node) || (0, lexical_1.$isParagraphNode)(node));
|
|
191
190
|
}
|
|
192
191
|
else {
|
package/dist/cjs/components/TextEditorV2/plugins/FloatingTextFormatToolbarPlugin/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/TextEditorV2/plugins/FloatingTextFormatToolbarPlugin/index.tsx"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/TextEditorV2/plugins/FloatingTextFormatToolbarPlugin/index.tsx"],"names":[],"mappings":";;AAkXA,kDAOC;;AAzXD,wCAAgE;AAChE,kFAAiF;AACjF,0CAA8C;AAC9C,qCASgB;AAChB,iCAAgE;AAChE,qDAA8B;AAC9B,yCAAwC;AACxC,iEAA6D;AAC7D,iEAA6D;AAC7D,iFAA6E;AAE7E,SAAS,yBAAyB,CAAC,EACjC,UAAU,EACV,MAAM,EACN,MAAM,EACN,MAAM,EACN,QAAQ,EACR,MAAM,EACN,eAAe,EACf,WAAW,EACX,aAAa,EACb,WAAW,GAYZ;IACC,MAAM,wBAA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AA,qBAAa,EACX,MAAM,CAAC,sBAAsB,CAAC,GAAG,EAAE;QACjC,WAAW,EAAE,CAAA;IACf,CAAC,CAAC,EACF,MAAM,CAAC,oBAAoB,CAAC,GAAG,EAAE;QAC/B,IAAI,MAAM,CAAC,cAAc,EAAE,KAAK,IAAI,EAAE,CAAC;YACrC,SAAS,CAAC,KAAK,CAAC,CAAA;QAClB,CAAC;IACH,CAAC,CAAC,CACH,EACH,CAAC,MAAM,EAAE,WAAW,CAAC,CACtB,CAAA;IAED,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,IAAI,CAAA;IACb,CAAC;IAED,OAAO,IAAA,wBAAY,EACjB,oBAAC,yBAAyB,IACxB,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,eAAe,EAChC,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,aAAa,EAC5B,WAAW,EAAE,WAAW,GACxB,EACF,UAAU,CACX,CAAA;AACH,CAAC;AAED,SAAwB,+BAA+B,CAAC,EACtD,UAAU,GAAG,QAAQ,CAAC,IAAI,GAG3B;IACC,MAAM,CAAC,MAAM,CAAC,GAAG,IAAA,kDAAyB,GAAE,CAAA;IAC5C,OAAO,4BAA4B,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;AACzD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function SanitizePastePlugin(): null;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = SanitizePastePlugin;
|
|
4
|
+
const clipboard_1 = require("@lexical/clipboard");
|
|
5
|
+
const html_1 = require("@lexical/html");
|
|
6
|
+
const LexicalComposerContext_1 = require("@lexical/react/LexicalComposerContext");
|
|
7
|
+
const lexical_1 = require("lexical");
|
|
8
|
+
const react_1 = require("react");
|
|
9
|
+
const LEXICAL_MIME_TYPE = 'application/x-lexical-editor';
|
|
10
|
+
const PRESENTATIONAL_ATTRIBUTES = ['class', 'id', 'style'];
|
|
11
|
+
const LEGACY_PRESENTATIONAL_ATTRIBUTES = ['align', 'bgcolor', 'color', 'face', 'size'];
|
|
12
|
+
const REMOVED_TAGS = ['link', 'meta', 'script', 'style'];
|
|
13
|
+
function sanitizePastedHTMLDocument(doc) {
|
|
14
|
+
REMOVED_TAGS.forEach((tagName) => {
|
|
15
|
+
doc.querySelectorAll(tagName).forEach((node) => node.remove());
|
|
16
|
+
});
|
|
17
|
+
doc.body.querySelectorAll('*').forEach((element) => {
|
|
18
|
+
PRESENTATIONAL_ATTRIBUTES.forEach((attribute) => {
|
|
19
|
+
element.removeAttribute(attribute);
|
|
20
|
+
});
|
|
21
|
+
if (element.tagName === 'FONT') {
|
|
22
|
+
LEGACY_PRESENTATIONAL_ATTRIBUTES.forEach((attribute) => {
|
|
23
|
+
element.removeAttribute(attribute);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function SanitizePastePlugin() {
|
|
29
|
+
const [editor] = (0, LexicalComposerContext_1.useLexicalComposerContext)();
|
|
30
|
+
(0, react_1.useEffect)(() => editor.registerCommand(lexical_1.PASTE_COMMAND, (event) => {
|
|
31
|
+
if (!('clipboardData' in event) || event.clipboardData == null) {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
const { clipboardData } = event;
|
|
35
|
+
if (clipboardData.types.includes(LEXICAL_MIME_TYPE)) {
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
const html = clipboardData.getData('text/html');
|
|
39
|
+
if (!html) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
event.preventDefault();
|
|
43
|
+
editor.update(() => {
|
|
44
|
+
const selection = (0, lexical_1.$getSelection)();
|
|
45
|
+
if (selection == null) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const parser = new DOMParser();
|
|
49
|
+
const doc = parser.parseFromString(html, 'text/html');
|
|
50
|
+
sanitizePastedHTMLDocument(doc);
|
|
51
|
+
const nodes = (0, html_1.$generateNodesFromDOM)(editor, doc);
|
|
52
|
+
(0, clipboard_1.$insertGeneratedNodes)(editor, nodes, selection);
|
|
53
|
+
});
|
|
54
|
+
return true;
|
|
55
|
+
}, lexical_1.COMMAND_PRIORITY_HIGH), [editor]);
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/TextEditorV2/plugins/SanitizePastePlugin/index.tsx"],"names":[],"mappings":";;AA6BA,sCAkDC;AA/ED,kDAA0D;AAC1D,wCAAqD;AACrD,kFAAiF;AACjF,qCAA6E;AAC7E,iCAAiC;AAEjC,MAAM,iBAAiB,GAAG,8BAA8B,CAAA;AACxD,MAAM,yBAAyB,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,CAAA;AAC1D,MAAM,gCAAgC,GAAG,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;AACtF,MAAM,YAAY,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAA;AAExD,SAAS,0BAA0B,CAAC,GAAa;IAC/C,YAAY,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC/B,GAAG,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAA;IAChE,CAAC,CAAC,CAAA;IAEF,GAAG,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,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;YAC9B,MAAM,GAAG,GAAG,MAAM,CAAC,eAAe,CAAC,IAAI,EAAE,WAAW,CAAC,CAAA;YAErD,0BAA0B,CAAC,GAAG,CAAC,CAAA;YAE/B,MAAM,KAAK,GAAG,IAAA,4BAAqB,EAAC,MAAM,EAAE,GAAG,CAAC,CAAA;YAChD,IAAA,iCAAqB,EAAC,MAAM,EAAE,KAAK,EAAE,SAAS,CAAC,CAAA;QACjD,CAAC,CAAC,CAAA;QAEF,OAAO,IAAI,CAAA;IACb,CAAC,EACD,+BAAqB,CACtB,EACH,CAAC,MAAM,CAAC,CACT,CAAA;IAED,OAAO,IAAI,CAAA;AACb,CAAC"}
|
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = BoldText;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
+
const list_marker_format_1 = require("./list-marker-format");
|
|
5
6
|
const lexical_1 = require("lexical");
|
|
6
7
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
7
8
|
const types_1 = require("../../../../types");
|
|
8
9
|
function BoldText({ editor, isActive }) {
|
|
9
10
|
return (react_1.default.createElement("div", { className: 'flex items-center gap-x-2' },
|
|
10
11
|
react_1.default.createElement("button", { type: 'button', "data-color-button": 'true', className: (0, types_1.classNames)('p-1 rounded-md duration-200 cursor-pointer', isActive ? 'bg-gray-200' : 'hover:bg-gray-200'), onClick: () => {
|
|
12
|
+
(0, list_marker_format_1.syncListMarkerFormatStyle)(editor, { 'font-weight': isActive ? null : 'bold' });
|
|
11
13
|
editor.dispatchCommand(lexical_1.FORMAT_TEXT_COMMAND, 'bold');
|
|
12
14
|
} },
|
|
13
15
|
react_1.default.createElement("span", null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bold-text.js","sourceRoot":"","sources":["../../../../../../../src/components/TextEditorV2/plugins/ToolbarPlugin/components/bold-text.tsx"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"bold-text.js","sourceRoot":"","sources":["../../../../../../../src/components/TextEditorV2/plugins/ToolbarPlugin/components/bold-text.tsx"],"names":[],"mappings":";;AAKA,2BA4BC;;AAjCD,6DAAgE;AAChE,qCAA4D;AAC5D,0DAAyB;AACzB,6CAA8C;AAE9C,SAAwB,QAAQ,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAgD;IACjG,OAAO,CACL,uCAAK,SAAS,EAAC,2BAA2B;QACxC,0CACE,IAAI,EAAC,QAAQ,uBACK,MAAM,EACxB,SAAS,EAAE,IAAA,kBAAU,EACnB,4CAA4C,EAC5C,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,mBAAmB,CAC/C,EACD,OAAO,EAAE,GAAG,EAAE;gBACZ,IAAA,8CAAyB,EAAC,MAAM,EAAE,EAAE,aAAa,EAAE,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAA;gBAC9E,MAAM,CAAC,eAAe,CAAC,6BAAmB,EAAE,MAAM,CAAC,CAAA;YACrD,CAAC;YAED;gBACE,uCAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B;oBAC5F,wCACE,QAAQ,EAAC,SAAS,EAClB,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,0YAA0Y,EAC5Y,IAAI,EAAC,SAAS,GACR,CACJ,CACD,CACA,CACL,CACP,CAAA;AACH,CAAC"}
|