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
|
@@ -12,11 +12,9 @@ function FontSize({ fontSize, editor }) {
|
|
|
12
12
|
const handleChangeSize = (nextSize) => {
|
|
13
13
|
editor.update(() => {
|
|
14
14
|
const selection = (0, lexical_1.$getSelection)();
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
});
|
|
19
|
-
}
|
|
15
|
+
(0, selection_1.$patchStyleText)(selection, {
|
|
16
|
+
'font-size': `${nextSize}px`,
|
|
17
|
+
});
|
|
20
18
|
});
|
|
21
19
|
setShowDropDown(false);
|
|
22
20
|
};
|
|
@@ -53,7 +51,7 @@ function FontSize({ fontSize, editor }) {
|
|
|
53
51
|
react_1.default.createElement("path", { fillRule: 'evenodd', clipRule: 'evenodd', d: 'M6 10C6 9.58579 6.33579 9.25 6.75 9.25H13.25C13.6642 9.25 14 9.58579 14 10C14 10.4142 13.6642 10.75 13.25 10.75H6.75C6.33579 10.75 6 10.4142 6 10Z', fill: '#1F2937' }))))),
|
|
54
52
|
react_1.default.createElement("div", { className: 'flex items-center gap-x-2' },
|
|
55
53
|
react_1.default.createElement("div", { className: 'relative flex items-center' },
|
|
56
|
-
react_1.default.createElement("
|
|
54
|
+
react_1.default.createElement("button", { type: 'button', onClick: () => setShowDropDown((prev) => !prev), className: 'w-10 p-0 text-xs leading-5 text-center bg-transparent bg-white border border-gray-500 rounded-md focus:ring-0 focus:border-gray-500' }, fontSize))),
|
|
57
55
|
react_1.default.createElement("div", { className: 'flex items-center gap-x-2' },
|
|
58
56
|
react_1.default.createElement("button", { type: 'button', "data-color-button": 'true', className: 'p-1 rounded-md duration-200 hover:bg-gray-200 cursor-pointer', onClick: () => handleIncre(1) },
|
|
59
57
|
react_1.default.createElement("span", null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"font-size.js","sourceRoot":"","sources":["../../../../../../../src/components/TextEditorV2/plugins/ToolbarPlugin/components/font-size.tsx"],"names":[],"mappings":";;AAIA,2BA4GC;;AAhHD,
|
|
1
|
+
{"version":3,"file":"font-size.js","sourceRoot":"","sources":["../../../../../../../src/components/TextEditorV2/plugins/ToolbarPlugin/components/font-size.tsx"],"names":[],"mappings":";;AAIA,2BA4GC;;AAhHD,qCAAsD;AACtD,uDAA0D;AAC1D,kDAAoD;AAEpD,SAAwB,QAAQ,CAAC,EAAE,QAAQ,EAAE,MAAM,EAA+C;IAChG,MAAM,UAAU,GAAG,CAAC,E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I,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,EAC/C,SAAS,EAAC,qIAAqI,IAE9I,QAAQ,CACF,CACL,CACF;QACN,uCAAK,SAAS,EAAC,2BAA2B;YACxC,0CACE,IAAI,EAAC,QAAQ,uBACK,MAAM,EACxB,SAAS,EAAC,+DAA+D,EACzE,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;gBAE7B;oBACE,uCAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B;wBAC5F,wCACE,CAAC,EAAC,sUAAsU,EACxU,IAAI,EAAC,SAAS,GACR,CACJ,CACD,CACA;YACT,uCAAK,SAAS,EAAC,yBAAyB,GAAO,CAC3C,CACF,CACP,CAAA;AACH,CAAC"}
|
|
@@ -2,10 +2,27 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = HeaderDropdown;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const lexical_1 = require("lexical");
|
|
6
5
|
const selection_1 = require("@lexical/selection");
|
|
7
6
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
8
7
|
const rich_text_1 = require("@lexical/rich-text");
|
|
8
|
+
const lexical_1 = require("lexical");
|
|
9
|
+
const DEFAULT_HEADING_FONT_SIZES = {
|
|
10
|
+
h1: '34px',
|
|
11
|
+
h2: '29px',
|
|
12
|
+
h3: '24px',
|
|
13
|
+
h4: '21px',
|
|
14
|
+
h5: '18px',
|
|
15
|
+
h6: '16px',
|
|
16
|
+
};
|
|
17
|
+
function applyHeadingFontSize(node, defaultFontSize) {
|
|
18
|
+
node.getAllTextNodes().forEach((textNode) => {
|
|
19
|
+
const styles = (0, selection_1.getStyleObjectFromCSS)(textNode.getStyle());
|
|
20
|
+
textNode.setStyle((0, selection_1.getCSSFromStyleObject)({
|
|
21
|
+
...styles,
|
|
22
|
+
'font-size': defaultFontSize,
|
|
23
|
+
}));
|
|
24
|
+
});
|
|
25
|
+
}
|
|
9
26
|
function HeaderDropdown({ editor, value }) {
|
|
10
27
|
const listHeading = [
|
|
11
28
|
{
|
|
@@ -37,25 +54,20 @@ function HeaderDropdown({ editor, value }) {
|
|
|
37
54
|
if (nextValue === 'paragraph') {
|
|
38
55
|
editor.update(() => {
|
|
39
56
|
const selection = (0, lexical_1.$getSelection)();
|
|
40
|
-
|
|
41
|
-
(0, selection_1.$setBlocksType)(selection, () => (0, lexical_1.$createParagraphNode)());
|
|
42
|
-
}
|
|
57
|
+
(0, selection_1.$setBlocksType)(selection, () => (0, lexical_1.$createParagraphNode)());
|
|
43
58
|
});
|
|
44
59
|
}
|
|
45
60
|
else if (nextValue === 'quote') {
|
|
46
61
|
editor.update(() => {
|
|
47
62
|
const selection = (0, lexical_1.$getSelection)();
|
|
48
|
-
|
|
49
|
-
(0, selection_1.$setBlocksType)(selection, () => (0, rich_text_1.$createQuoteNode)());
|
|
50
|
-
}
|
|
63
|
+
(0, selection_1.$setBlocksType)(selection, () => (0, rich_text_1.$createQuoteNode)());
|
|
51
64
|
});
|
|
52
65
|
}
|
|
53
66
|
else {
|
|
54
67
|
editor.update(() => {
|
|
55
68
|
const selection = (0, lexical_1.$getSelection)();
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
69
|
+
const headingTag = nextValue;
|
|
70
|
+
(0, selection_1.$setBlocksType)(selection, () => (0, rich_text_1.$createHeadingNode)(headingTag), (prevNode) => applyHeadingFontSize(prevNode, DEFAULT_HEADING_FONT_SIZES[headingTag]));
|
|
59
71
|
});
|
|
60
72
|
}
|
|
61
73
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heading.js","sourceRoot":"","sources":["../../../../../../../src/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.tsx"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"heading.js","sourceRoot":"","sources":["../../../../../../../src/components/TextEditorV2/plugins/ToolbarPlugin/components/heading.tsx"],"names":[],"mappings":";;AA2BA,iCAyEC;;AApGD,kDAAiG;AACjG,0DAAyB;AACzB,kDAAyF;AACzF,qCAAyF;AAEzF,MAAM,0BAA0B,GAAmC;IACjE,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,MAAM;CACX,CAAA;AAED,SAAS,oBAAoB,CAAC,IAAiB,EAAE,eAAuB;IACtE,IAAI,CAAC,eAAe,EAAE,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;QAC1C,MAAM,MAAM,GAAG,IAAA,iCAAqB,EAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAA;QAEzD,QAAQ,CAAC,QAAQ,CACf,IAAA,iCAAqB,EAAC;YACpB,GAAG,MAAM;YACT,WAAW,EAAE,eAAe;SAC7B,CAAC,CACH,CAAA;IACH,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,SAAwB,cAAc,CAAC,EAAE,MAAM,EAAE,KAAK,EAA4C;IAChG,MAAM,WAAW,GAAG;QAClB;YACE,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,WAAW;SACnB;QACD;YACE,IAAI,EAAE,WAAW;YACjB,KAAK,EAAE,IAAI;SACZ;QACD;YACE,IAAI,EAAE,WAAW;YACjB,KAAK,EAAE,IAAI;SACZ;QACD;YACE,IAAI,EAAE,WAAW;YACjB,KAAK,EAAE,IAAI;SACZ;QACD;YACE,IAAI,EAAE,WAAW;YACjB,KAAK,EAAE,IAAI;SACZ;QACD;YACE,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,OAAO;SACf;KACF,CAAA;IAED,MAAM,gBAAgB,GAAG,CAAC,SAAiB,EAAE,EAAE;QAC7C,IAAI,SAAS,KAAK,WAAW,EAAE,CAAC;YAC9B,MAAM,CAAC,MAA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,IAAI,CACN,CACV,CAAA;QACH,CAAC,CAAC,CACK;QACT,uCAAK,SAAS,EAAC,yBAAyB,GAAO,CAC3C,CACP,CAAA;AACH,CAAC"}
|
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = ItalicText;
|
|
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 ItalicText({ 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-style': isActive ? null : 'italic' });
|
|
11
13
|
editor.dispatchCommand(lexical_1.FORMAT_TEXT_COMMAND, 'italic');
|
|
12
14
|
} },
|
|
13
15
|
react_1.default.createElement("span", null,
|
package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/italic-text.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"italic-text.js","sourceRoot":"","sources":["../../../../../../../src/components/TextEditorV2/plugins/ToolbarPlugin/components/italic-text.tsx"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"italic-text.js","sourceRoot":"","sources":["../../../../../../../src/components/TextEditorV2/plugins/ToolbarPlugin/components/italic-text.tsx"],"names":[],"mappings":";;AAKA,6BA0BC;;AA/BD,6DAAgE;AAChE,qCAA4D;AAC5D,0DAAyB;AACzB,6CAA8C;AAE9C,SAAwB,UAAU,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAgD;IACnG,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,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAA;gBAC/E,MAAM,CAAC,eAAe,CAAC,6BAAmB,EAAE,QAAQ,CAAC,CAAA;YACvD,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,CAAC,EAAC,sUAAsU,EACxU,IAAI,EAAC,SAAS,GACR,CACJ,CACD,CACA,CACL,CACP,CAAA;AACH,CAAC"}
|
package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/list-marker-format.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.syncListMarkerFormatStyle = syncListMarkerFormatStyle;
|
|
4
|
+
const list_1 = require("@lexical/list");
|
|
5
|
+
const selection_1 = require("@lexical/selection");
|
|
6
|
+
const utils_1 = require("@lexical/utils");
|
|
7
|
+
const lexical_1 = require("lexical");
|
|
8
|
+
function isInsideListItem(node) {
|
|
9
|
+
return (0, list_1.$isListItemNode)(node) || (0, utils_1.$findMatchingParent)(node, (parent) => (0, list_1.$isListItemNode)(parent)) !== null;
|
|
10
|
+
}
|
|
11
|
+
function syncListMarkerFormatStyle(editor, patch) {
|
|
12
|
+
editor.update(() => {
|
|
13
|
+
const selection = (0, lexical_1.$getSelection)();
|
|
14
|
+
if (!(0, lexical_1.$isRangeSelection)(selection)) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
const nodes = selection.getNodes();
|
|
18
|
+
const isListSelection = nodes.length > 0
|
|
19
|
+
? nodes.some((node) => isInsideListItem(node))
|
|
20
|
+
: isInsideListItem(selection.anchor.getNode()) || isInsideListItem(selection.focus.getNode());
|
|
21
|
+
if (!isListSelection) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
(0, selection_1.$patchStyleText)(selection, patch);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=list-marker-format.js.map
|
package/dist/cjs/components/TextEditorV2/plugins/ToolbarPlugin/components/list-marker-format.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-marker-format.js","sourceRoot":"","sources":["../../../../../../../src/components/TextEditorV2/plugins/ToolbarPlugin/components/list-marker-format.ts"],"names":[],"mappings":";;AASA,8DA0BC;AAnCD,wCAA+C;AAC/C,kDAAoD;AACpD,0CAAoD;AACpD,qCAAsF;AAEtF,SAAS,gBAAgB,CAAC,IAAiB;IACzC,OAAO,IAAA,sBAAe,EAAC,IAAI,CAAC,IAAI,IAAA,2BAAmB,EAAC,IAAI,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,IAAA,sBAAe,EAAC,MAAM,CAAC,CAAC,KAAK,IAAI,CAAA;AACzG,CAAC;AAED,SAAgB,yBAAyB,CACvC,MAAqB,EACrB,KAGC;IAED,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE;QACjB,MAAM,SAAS,GAAG,IAAA,uBAAa,GAAE,CAAA;QAEjC,IAAI,CAAC,IAAA,2BAAiB,EAAC,SAAS,CAAC,EAAE,CAAC;YAClC,OAAM;QACR,CAAC;QAED,MAAM,KAAK,GAAG,SAAS,CAAC,QAAQ,EAAE,CAAA;QAClC,MAAM,eAAe,GACnB,KAAK,CAAC,MAAM,GAAG,CAAC;YACd,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;YAC9C,CAAC,CAAC,gBAAgB,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,IAAI,gBAAgB,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAA;QAEjG,IAAI,CAAC,eAAe,EAAE,CAAC;YACrB,OAAM;QACR,CAAC;QAED,IAAA,2BAAe,EAAC,SAAS,EAAE,KAAK,CAAC,CAAA;IACnC,CAAC,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -11,9 +11,7 @@ function TextColor({ color, editor }) {
|
|
|
11
11
|
react_1.default.createElement("input", { className: 'opacity-0 top-2.5 absolute', ref: colorPickerRef, type: 'color', value: color, onChange: (e) => {
|
|
12
12
|
editor.update(() => {
|
|
13
13
|
const selection = (0, lexical_1.$getSelection)();
|
|
14
|
-
|
|
15
|
-
(0, selection_1.$patchStyleText)(selection, { color: e.target.value });
|
|
16
|
-
}
|
|
14
|
+
(0, selection_1.$patchStyleText)(selection, { color: e.target.value });
|
|
17
15
|
});
|
|
18
16
|
} }),
|
|
19
17
|
react_1.default.createElement("button", { type: 'button', "data-color-button": 'true', className: 'p-1 z-10 rounded-md duration-200 hover:bg-gray-200 cursor-pointer', onClick: () => { var _a; return (_a = colorPickerRef.current) === null || _a === void 0 ? void 0 : _a.click(); } },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-color.js","sourceRoot":"","sources":["../../../../../../../src/components/TextEditorV2/plugins/ToolbarPlugin/components/text-color.tsx"],"names":[],"mappings":";;AAIA,4BAiDC;;AArDD,
|
|
1
|
+
{"version":3,"file":"text-color.js","sourceRoot":"","sources":["../../../../../../../src/components/TextEditorV2/plugins/ToolbarPlugin/components/text-color.tsx"],"names":[],"mappings":";;AAIA,4BAiDC;;AArDD,qCAAsD;AACtD,uDAAq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CACP,CAAA;AACH,CAAC"}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = ToolbarPlugin;
|
|
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 list_1 = require("@lexical/list");
|
|
8
7
|
const LexicalComposerContext_1 = require("@lexical/react/LexicalComposerContext");
|
|
@@ -90,9 +89,6 @@ function ToolbarPlugin({ apiCdnUpload, disabled, }) {
|
|
|
90
89
|
if (type in blockTypeToBlockName) {
|
|
91
90
|
setBlockType(type);
|
|
92
91
|
}
|
|
93
|
-
if ((0, code_1.$isCodeNode)(element)) {
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
92
|
}
|
|
97
93
|
}
|
|
98
94
|
// Handle buttons
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/TextEditorV2/plugins/ToolbarPlugin/index.tsx"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/TextEditorV2/plugins/ToolbarPlugin/index.tsx"],"names":[],"mappings":";;AAiDA,gCAoKC;;AArND,wCAAgE;AAChE,wCAAqD;AACrD,kFAAiF;AACjF,kDAAmD;AACnD,kDAAuE;AACvE,0CAA0F;AAC1F,qCAUgB;AAChB,iCAAwD;AACxD,qDAA8B;AAC9B,iEAA6D;AAC7D,yCAA6C;AAC7C,2EAAiD;AACjD,+EAA6C;AAC7C,+EAA6C;AAC7C,mFAAiD;AACjD,yFAAuD;AACvD,iFAA+C;AAC/C,iFAA+C;AAC/C,yEAAwC;AACxC,uFAAqD;AACrD,iFAA+C;AAC/C,qFAAmD;AACnD,qEAAoC;AAEpC,MAAM,oBAAoB,GAAG;IAC3B,MAAM,EAAE,eAAe;IACvB,KAAK,EAAE,YAAY;IACnB,IAAI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S,IAAC,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,GAAI;QACrD,oBAAC,oBAAS,IAAC,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,GAAI;QACzD,oBAAC,gBAAM,IAAC,QAAQ,EAAE,SAAS,KAAK,QAAQ,EAAE,MAAM,EAAE,YAAY,GAAI;QAClE,oBAAC,uBAAY,IAAC,QAAQ,EAAE,SAAS,KAAK,QAAQ,EAAE,MAAM,EAAE,YAAY,GAAI;QACxE,oBAAC,oBAAS,IAAC,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,GAAI;QAC/D,oBAAC,sBAAW,IAAC,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,GAAI;QACjE,oBAAC,cAAI,IAAC,MAAM,EAAE,YAAY,GAAI,CAC1B,CACP,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
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 ErrorInfo, type JSX } from 'react';
|
|
9
|
+
export type LexicalErrorBoundaryProps = {
|
|
10
|
+
children: JSX.Element;
|
|
11
|
+
onError: (error: Error, info: ErrorInfo) => void;
|
|
12
|
+
};
|
|
13
|
+
export declare function LexicalErrorBoundary({ children, onError }: LexicalErrorBoundaryProps): JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.LexicalErrorBoundary = LexicalErrorBoundary;
|
|
11
|
+
const tslib_1 = require("tslib");
|
|
12
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
13
|
+
const react_2 = require("react");
|
|
14
|
+
const react_error_boundary_1 = require("react-error-boundary");
|
|
15
|
+
function LexicalErrorBoundary({ children, onError }) {
|
|
16
|
+
const wrappedOnError = (0, react_2.useCallback)((err, info) => {
|
|
17
|
+
onError(err instanceof Error ? err : new Error(String(err), { cause: err }), info);
|
|
18
|
+
}, [onError]);
|
|
19
|
+
return (react_1.default.createElement(react_error_boundary_1.ErrorBoundary, { fallback: react_1.default.createElement("div", { style: {
|
|
20
|
+
border: '1px solid #f00',
|
|
21
|
+
color: '#f00',
|
|
22
|
+
padding: '8px',
|
|
23
|
+
} }, "An error was thrown."), onError: wrappedOnError }, children));
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=LexicalErrorBoundary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LexicalErrorBoundary.js","sourceRoot":"","sources":["../../../../../src/components/TextEditorV2/shared/LexicalErrorBoundary.tsx"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAWH,oDAyBC;;AAlCD,0DAAyB;AACzB,iCAA6D;AAC7D,+DAAoD;AAOpD,SAAgB,oBAAoB,CAAC,EAAE,QAAQ,EAAE,OAAO,EAA6B;IACnF,MAAM,cAAc,GAAG,IAAA,mBAAW,EAChC,CAAC,GAAY,EAAE,IAAe,EAAE,EAAE;QAChC,OAAO,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,CAAC,CAAA;IACpF,CAAC,EACD,CAAC,OAAO,CAAC,CACV,CAAA;IACD,OAAO,CACL,8BAAC,oCAAa,IACZ,QAAQ,EACN,uCACE,KAAK,EAAE;gBACL,MAAM,EAAE,gBAAgB;gBACxB,KAAK,EAAE,MAAM;gBACb,OAAO,EAAE,KAAK;aACf,2BAGG,EAER,OAAO,EAAE,cAAc,IAEtB,QAAQ,CACK,CACjB,CAAA;AACH,CAAC"}
|
|
@@ -1113,6 +1113,21 @@ function EditorStyle() {
|
|
|
1113
1113
|
list-style-position: inside;
|
|
1114
1114
|
}
|
|
1115
1115
|
|
|
1116
|
+
.PlaygroundEditorTheme__listItem {
|
|
1117
|
+
font-family: var(--listitem-marker-font-family);
|
|
1118
|
+
font-size: var(--listitem-marker-font-size);
|
|
1119
|
+
background-color: var(--listitem-marker-background-color);
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
.PlaygroundEditorTheme__listItem::marker {
|
|
1123
|
+
color: var(--listitem-marker-color);
|
|
1124
|
+
background-color: var(--listitem-marker-background-color);
|
|
1125
|
+
font-family: var(--listitem-marker-font-family);
|
|
1126
|
+
font-size: var(--listitem-marker-font-size);
|
|
1127
|
+
font-style: var(--listitem-marker-font-style);
|
|
1128
|
+
font-weight: var(--listitem-marker-font-weight);
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1116
1131
|
.PlaygroundEditorTheme__listItemChecked,
|
|
1117
1132
|
.PlaygroundEditorTheme__listItemUnchecked {
|
|
1118
1133
|
position: relative;
|
|
@@ -1374,6 +1389,11 @@ function EditorStyle() {
|
|
|
1374
1389
|
}
|
|
1375
1390
|
}
|
|
1376
1391
|
|
|
1392
|
+
.PHXTextEditorV2__contentEditable {
|
|
1393
|
+
font-size: 14px;
|
|
1394
|
+
line-height: normal;
|
|
1395
|
+
}
|
|
1396
|
+
|
|
1377
1397
|
.DialogActions {
|
|
1378
1398
|
display: flex;
|
|
1379
1399
|
flex-direction: row;
|
|
@@ -1563,6 +1583,7 @@ function EditorStyle() {
|
|
|
1563
1583
|
|
|
1564
1584
|
|
|
1565
1585
|
|
|
1586
|
+
|
|
1566
1587
|
`));
|
|
1567
1588
|
}
|
|
1568
1589
|
//# sourceMappingURL=style.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.js","sourceRoot":"","sources":["../../../../src/components/TextEditorV2/style.tsx"],"names":[],"mappings":";;AAEA,
|
|
1
|
+
{"version":3,"file":"style.js","sourceRoot":"","sources":["../../../../src/components/TextEditorV2/style.tsx"],"names":[],"mappings":";;AAEA,8BAkjDC;;AApjDD,0DAAyB;AAEzB,SAAwB,WAAW;IACjC,OAAO,CACL,6CACG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4iDN,CACW,CACT,CAAA;AACH,CAAC"}
|
|
@@ -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";
|
|
@@ -322,6 +322,21 @@ export const styleTag = `
|
|
|
322
322
|
list-style-position: inside !important;;
|
|
323
323
|
}
|
|
324
324
|
|
|
325
|
+
.PlaygroundEditorTheme__listItem {
|
|
326
|
+
font-family: var(--listitem-marker-font-family);
|
|
327
|
+
font-size: var(--listitem-marker-font-size);
|
|
328
|
+
background-color: var(--listitem-marker-background-color);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.PlaygroundEditorTheme__listItem::marker {
|
|
332
|
+
color: var(--listitem-marker-color);
|
|
333
|
+
background-color: var(--listitem-marker-background-color);
|
|
334
|
+
font-family: var(--listitem-marker-font-family);
|
|
335
|
+
font-size: var(--listitem-marker-font-size);
|
|
336
|
+
font-style: var(--listitem-marker-font-style);
|
|
337
|
+
font-weight: var(--listitem-marker-font-weight);
|
|
338
|
+
}
|
|
339
|
+
|
|
325
340
|
.PlaygroundEditorTheme__listItemChecked,
|
|
326
341
|
.PlaygroundEditorTheme__listItemUnchecked {
|
|
327
342
|
position: relative;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/components/TextEditorV2/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/components/TextEditorV2/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsdvB,CAAA"}
|
|
@@ -10,54 +10,30 @@ import PlaygroundNodes from './nodes/PlaygroundNodes';
|
|
|
10
10
|
import { TableContext } from './plugins/TablePlugin';
|
|
11
11
|
import { CAN_USE_DOM } from './shared/canUseDOM';
|
|
12
12
|
import PlaygroundEditorTheme from './themes/PlaygroundEditorTheme';
|
|
13
|
-
import { CharacterLimitPlugin } from '@lexical/react/LexicalCharacterLimitPlugin';
|
|
14
13
|
import { CheckListPlugin } from '@lexical/react/LexicalCheckListPlugin';
|
|
15
14
|
import { ClearEditorPlugin } from '@lexical/react/LexicalClearEditorPlugin';
|
|
16
|
-
import LexicalClickableLinkPlugin from '@lexical/react/LexicalClickableLinkPlugin';
|
|
17
|
-
import LexicalErrorBoundary from '@lexical/react/LexicalErrorBoundary';
|
|
18
|
-
import { HashtagPlugin } from '@lexical/react/LexicalHashtagPlugin';
|
|
19
15
|
import { HistoryPlugin } from '@lexical/react/LexicalHistoryPlugin';
|
|
20
|
-
import { HorizontalRulePlugin } from '@lexical/react/LexicalHorizontalRulePlugin';
|
|
21
16
|
import { ListPlugin } from '@lexical/react/LexicalListPlugin';
|
|
22
17
|
import { OnChangePlugin } from '@lexical/react/LexicalOnChangePlugin';
|
|
23
18
|
import { RichTextPlugin } from '@lexical/react/LexicalRichTextPlugin';
|
|
24
19
|
import { TabIndentationPlugin } from '@lexical/react/LexicalTabIndentationPlugin';
|
|
25
|
-
import { TablePlugin } from '@lexical/react/LexicalTablePlugin';
|
|
26
|
-
import AutoEmbedPlugin from './plugins/AutoEmbedPlugin';
|
|
27
|
-
import AutocompletePlugin from './plugins/AutocompletePlugin';
|
|
28
|
-
import CodeHighlightPlugin from './plugins/CodeHighlightPlugin';
|
|
29
|
-
import CollapsiblePlugin from './plugins/CollapsiblePlugin';
|
|
30
|
-
import ContextMenuPlugin from './plugins/ContextMenuPlugin';
|
|
31
|
-
import EmojiPickerPlugin from './plugins/EmojiPickerPlugin';
|
|
32
|
-
import EmojisPlugin from './plugins/EmojisPlugin';
|
|
33
|
-
import EquationsPlugin from './plugins/EquationsPlugin';
|
|
34
|
-
import ExcalidrawPlugin from './plugins/ExcalidrawPlugin';
|
|
35
|
-
import FigmaPlugin from './plugins/FigmaPlugin';
|
|
36
20
|
import ImagesPlugin from './plugins/ImagesPlugin';
|
|
37
21
|
import InlineImagePlugin from './plugins/InlineImagePlugin';
|
|
38
|
-
import KeywordsPlugin from './plugins/KeywordsPlugin';
|
|
39
|
-
import { LayoutPlugin } from './plugins/LayoutPlugin/LayoutPlugin';
|
|
40
|
-
import LinkPlugin from './plugins/LinkPlugin';
|
|
41
22
|
import ListMaxIndentLevelPlugin from './plugins/ListMaxIndentLevelPlugin';
|
|
42
|
-
import MarkdownShortcutPlugin from './plugins/MarkdownShortcutPlugin';
|
|
43
23
|
import { MaxLengthPlugin } from './plugins/MaxLengthPlugin';
|
|
44
|
-
import
|
|
45
|
-
import PageBreakPlugin from './plugins/PageBreakPlugin';
|
|
24
|
+
import SanitizePastePlugin from './plugins/SanitizePastePlugin';
|
|
46
25
|
import ContentEditable from './ui/ContentEditable';
|
|
47
|
-
import PollPlugin from './plugins/PollPlugin';
|
|
48
|
-
import TabFocusPlugin from './plugins/TabFocusPlugin';
|
|
49
|
-
import TableCellResizer from './plugins/TableCellResizer';
|
|
50
|
-
import TableOfContentsPlugin from './plugins/TableOfContentsPlugin';
|
|
51
26
|
import ToolbarPlugin from './plugins/ToolbarPlugin';
|
|
52
|
-
import TwitterPlugin from './plugins/TwitterPlugin';
|
|
53
|
-
import YouTubePlugin from './plugins/YouTubePlugin';
|
|
54
27
|
import { useSettings } from './context/SettingsContext';
|
|
55
28
|
import { styleTag } from './constants';
|
|
56
29
|
import EditorStyle from './style';
|
|
30
|
+
import { ClickableLinkPlugin } from '@lexical/react/LexicalClickableLinkPlugin';
|
|
31
|
+
import { LinkPlugin } from '@lexical/react/LexicalLinkPlugin';
|
|
32
|
+
import { LexicalErrorBoundary } from './shared/LexicalErrorBoundary';
|
|
57
33
|
export default function PHXTextEditorV2({ defaultValue, label, onChange, placeholder, apiCdnUpload, disabled = false, }) {
|
|
58
34
|
const [isSmallWidthViewport, setIsSmallWidthViewport] = useState(false);
|
|
59
35
|
const { historyState } = useSharedHistoryContext();
|
|
60
|
-
const { settings: {
|
|
36
|
+
const { settings: { isMaxLength }, } = useSettings();
|
|
61
37
|
const editorConfig = {
|
|
62
38
|
theme: PlaygroundEditorTheme,
|
|
63
39
|
editorState: prepopulatedRichText,
|
|
@@ -138,41 +114,17 @@ export default function PHXTextEditorV2({ defaultValue, label, onChange, placeho
|
|
|
138
114
|
React.createElement("div", { className: 'relative' },
|
|
139
115
|
isMaxLength && React.createElement(MaxLengthPlugin, { maxLength: 30 }),
|
|
140
116
|
React.createElement(ClearEditorPlugin, null),
|
|
141
|
-
React.createElement(EmojiPickerPlugin, null),
|
|
142
|
-
React.createElement(AutoEmbedPlugin, null),
|
|
143
|
-
React.createElement(MentionsPlugin, null),
|
|
144
|
-
React.createElement(EmojisPlugin, null),
|
|
145
|
-
React.createElement(HashtagPlugin, null),
|
|
146
|
-
React.createElement(KeywordsPlugin, null),
|
|
147
117
|
React.createElement(OnChangePlugin, { onChange: handleChange }),
|
|
148
118
|
React.createElement(HistoryPlugin, { externalHistoryState: historyState }),
|
|
149
|
-
React.createElement(
|
|
150
|
-
React.createElement(
|
|
151
|
-
React.createElement(CodeHighlightPlugin, null),
|
|
119
|
+
React.createElement(SanitizePastePlugin, null),
|
|
120
|
+
React.createElement(RichTextPlugin, { contentEditable: React.createElement(ContentEditable, { className: 'PHXTextEditorV2__contentEditable px-2 py-1.5 h-[20rem] overflow-y-auto outline-none' }), ErrorBoundary: 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) }),
|
|
152
121
|
React.createElement(ListPlugin, null),
|
|
153
122
|
React.createElement(CheckListPlugin, null),
|
|
154
123
|
React.createElement(ListMaxIndentLevelPlugin, { maxDepth: 7 }),
|
|
155
|
-
React.createElement(TablePlugin, { hasCellBackgroundColor: tableCellBackgroundColor, hasCellMerge: tableCellMerge }),
|
|
156
|
-
React.createElement(TableCellResizer, null),
|
|
157
124
|
React.createElement(ImagesPlugin, null),
|
|
158
125
|
React.createElement(InlineImagePlugin, null),
|
|
159
126
|
React.createElement(LinkPlugin, null),
|
|
160
|
-
React.createElement(
|
|
161
|
-
React.createElement(
|
|
162
|
-
React.createElement(YouTubePlugin, null),
|
|
163
|
-
React.createElement(FigmaPlugin, null),
|
|
164
|
-
React.createElement(LexicalClickableLinkPlugin, null),
|
|
165
|
-
React.createElement(HorizontalRulePlugin, null),
|
|
166
|
-
React.createElement(EquationsPlugin, null),
|
|
167
|
-
React.createElement(ExcalidrawPlugin, null),
|
|
168
|
-
React.createElement(TabFocusPlugin, null),
|
|
169
|
-
React.createElement(TabIndentationPlugin, null),
|
|
170
|
-
React.createElement(CollapsiblePlugin, null),
|
|
171
|
-
React.createElement(PageBreakPlugin, null),
|
|
172
|
-
React.createElement(LayoutPlugin, null),
|
|
173
|
-
(isCharLimit || isCharLimitUtf8) && (React.createElement(CharacterLimitPlugin, { charset: isCharLimit ? 'UTF-16' : 'UTF-8', maxLength: 5 })),
|
|
174
|
-
isAutocomplete && React.createElement(AutocompletePlugin, null),
|
|
175
|
-
React.createElement("div", null, showTableOfContents && React.createElement(TableOfContentsPlugin, null)),
|
|
176
|
-
shouldUseLexicalContextMenu && React.createElement(ContextMenuPlugin, null)))))))));
|
|
127
|
+
React.createElement(ClickableLinkPlugin, { newTab: true }),
|
|
128
|
+
React.createElement(TabIndentationPlugin, null)))))))));
|
|
177
129
|
}
|
|
178
130
|
//# sourceMappingURL=editor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor.js","sourceRoot":"","sources":["../../../../src/components/TextEditorV2/editor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,EAAE,QAAQ,EAAiB,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACzE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAA;AAC/E,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAA;AAC9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,eAAe,MAAM,yBAAyB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