@scottjgilbert/lexical-blog-editor 0.1.4 → 1.0.0-beta.2
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/README.md +73 -67
- package/build/Editor.d.ts +8 -3
- package/build/Editor.d.ts.map +1 -1
- package/build/Editor.js +13 -8
- package/build/EditorExport.d.ts +4 -0
- package/build/EditorExport.d.ts.map +1 -0
- package/build/EditorExport.js +13 -0
- package/build/appSettings.d.ts +1 -1
- package/build/appSettings.js +1 -1
- package/build/buildHTMLConfig.d.ts +1 -1
- package/build/buildHTMLConfig.d.ts.map +1 -1
- package/build/buildHTMLConfig.js +35 -11
- package/build/context/FlashMessageContext.d.ts +2 -2
- package/build/context/FlashMessageContext.d.ts.map +1 -1
- package/build/context/FlashMessageContext.js +4 -3
- package/build/context/SharedHistoryContext.d.ts +3 -3
- package/build/context/SharedHistoryContext.d.ts.map +1 -1
- package/build/context/SharedHistoryContext.js +3 -2
- package/build/context/ToolbarContext.d.ts +1 -0
- package/build/context/ToolbarContext.d.ts.map +1 -1
- package/build/context/ToolbarContext.js +2 -0
- package/build/hooks/useModal.d.ts.map +1 -1
- package/build/hooks/useModal.js +1 -0
- package/build/hooks/useReport.d.ts +0 -7
- package/build/hooks/useReport.d.ts.map +1 -1
- package/build/hooks/useReport.js +1 -0
- package/build/index.css +283 -246
- package/build/index.d.ts +3 -3
- package/build/index.d.ts.map +1 -1
- package/build/index.js +2 -2
- package/build/nodes/CodeNode/CodeHighlightNode.d.ts +35 -0
- package/build/nodes/CodeNode/CodeHighlightNode.d.ts.map +1 -0
- package/build/nodes/CodeNode/CodeHighlightNode.js +88 -0
- package/build/nodes/CodeNode/CodeHighlighterShiki.d.ts +22 -0
- package/build/nodes/CodeNode/CodeHighlighterShiki.d.ts.map +1 -0
- package/build/nodes/CodeNode/CodeHighlighterShiki.js +644 -0
- package/build/nodes/CodeNode/CodeNode.d.ts +48 -0
- package/build/nodes/CodeNode/CodeNode.d.ts.map +1 -0
- package/build/nodes/CodeNode/CodeNode.js +367 -0
- package/build/nodes/CodeNode/FacadeShiki.d.ts +18 -0
- package/build/nodes/CodeNode/FacadeShiki.d.ts.map +1 -0
- package/build/nodes/CodeNode/FacadeShiki.js +159 -0
- package/build/nodes/CodeNode/FlatStructureUtils.d.ts +21 -0
- package/build/nodes/CodeNode/FlatStructureUtils.d.ts.map +1 -0
- package/build/nodes/CodeNode/FlatStructureUtils.js +85 -0
- package/build/nodes/CodeNode/invariant.d.ts +2 -0
- package/build/nodes/CodeNode/invariant.d.ts.map +1 -0
- package/build/nodes/CodeNode/invariant.js +6 -0
- package/build/nodes/DateTimeNode/DateTimeComponent.d.ts.map +1 -1
- package/build/nodes/DateTimeNode/DateTimeComponent.js +1 -0
- package/build/nodes/DateTimeNode/DateTimeNode.css +21 -0
- package/build/nodes/FigmaNode/FigmaNode.d.ts.map +1 -0
- package/build/nodes/FigmaNode/ServerFigmaNode.d.ts +21 -0
- package/build/nodes/FigmaNode/ServerFigmaNode.d.ts.map +1 -0
- package/build/nodes/FigmaNode/ServerFigmaNode.js +48 -0
- package/build/nodes/ImageComponent.d.ts.map +1 -1
- package/build/nodes/ImageComponent.js +1 -2
- package/build/nodes/ImageNode.d.ts +7 -7
- package/build/nodes/ImageNode.d.ts.map +1 -1
- package/build/nodes/ImageNode.js +30 -30
- package/build/nodes/LayoutContainerNode.d.ts +2 -2
- package/build/nodes/LayoutContainerNode.d.ts.map +1 -1
- package/build/nodes/LayoutContainerNode.js +10 -10
- package/build/nodes/PlaygroundNodes/PlaygroundNodes.d.ts.map +1 -0
- package/build/nodes/{PlaygroundNodes.js → PlaygroundNodes/PlaygroundNodes.js} +19 -21
- package/build/nodes/PlaygroundNodes/ServerPlaygroundNodes.d.ts +11 -0
- package/build/nodes/PlaygroundNodes/ServerPlaygroundNodes.d.ts.map +1 -0
- package/build/nodes/PlaygroundNodes/ServerPlaygroundNodes.js +65 -0
- package/build/nodes/TweetNode/ServerTweetNode.d.ts +20 -0
- package/build/nodes/TweetNode/ServerTweetNode.d.ts.map +1 -0
- package/build/nodes/TweetNode/ServerTweetNode.js +59 -0
- package/build/nodes/TweetNode/TweetNode.d.ts.map +1 -0
- package/build/nodes/YouTubeNode/ServerYouTubeNode.d.ts +21 -0
- package/build/nodes/YouTubeNode/ServerYouTubeNode.d.ts.map +1 -0
- package/build/nodes/YouTubeNode/ServerYouTubeNode.js +67 -0
- package/build/nodes/YouTubeNode/YouTubeNode.d.ts.map +1 -0
- package/build/plugins/ActionsPlugin/index.d.ts +0 -7
- package/build/plugins/ActionsPlugin/index.d.ts.map +1 -1
- package/build/plugins/ActionsPlugin/index.js +2 -1
- package/build/plugins/AutoEmbedPlugin/index.d.ts +2 -9
- package/build/plugins/AutoEmbedPlugin/index.d.ts.map +1 -1
- package/build/plugins/AutoEmbedPlugin/index.js +30 -29
- package/build/plugins/AutoLinkPlugin/index.d.ts +1 -1
- package/build/plugins/AutoLinkPlugin/index.d.ts.map +1 -1
- package/build/plugins/AutoLinkPlugin/index.js +3 -2
- package/build/plugins/CodeActionMenuPlugin/components/CopyButton/index.d.ts +1 -1
- package/build/plugins/CodeActionMenuPlugin/components/CopyButton/index.d.ts.map +1 -1
- package/build/plugins/CodeActionMenuPlugin/components/CopyButton/index.js +7 -6
- package/build/plugins/CodeActionMenuPlugin/components/PrettierButton/index.d.ts +2 -2
- package/build/plugins/CodeActionMenuPlugin/components/PrettierButton/index.d.ts.map +1 -1
- package/build/plugins/CodeActionMenuPlugin/components/PrettierButton/index.js +25 -24
- package/build/plugins/CodeActionMenuPlugin/index.d.ts +2 -9
- package/build/plugins/CodeActionMenuPlugin/index.d.ts.map +1 -1
- package/build/plugins/CodeActionMenuPlugin/index.js +22 -20
- package/build/plugins/CodeActionMenuPlugin/utils.d.ts.map +1 -1
- package/build/plugins/CodeActionMenuPlugin/utils.js +3 -2
- package/build/plugins/CodeHighlightPrismPlugin/index.d.ts +1 -1
- package/build/plugins/CodeHighlightPrismPlugin/index.d.ts.map +1 -1
- package/build/plugins/CodeHighlightPrismPlugin/index.js +4 -10
- package/build/plugins/CodeHighlightShikiPlugin/index.d.ts +1 -1
- package/build/plugins/CodeHighlightShikiPlugin/index.d.ts.map +1 -1
- package/build/plugins/CodeHighlightShikiPlugin/index.js +3 -3
- package/build/plugins/CollapsiblePlugin/Collapsible.css +17 -1
- package/build/plugins/CollapsiblePlugin/index.d.ts +1 -1
- package/build/plugins/CollapsiblePlugin/index.d.ts.map +1 -1
- package/build/plugins/CollapsiblePlugin/index.js +11 -10
- package/build/plugins/ComponentPickerPlugin/index.d.ts.map +1 -1
- package/build/plugins/ComponentPickerPlugin/index.js +3 -8
- package/build/plugins/ContextMenuPlugin/index.d.ts +1 -1
- package/build/plugins/ContextMenuPlugin/index.d.ts.map +1 -1
- package/build/plugins/ContextMenuPlugin/index.js +15 -14
- package/build/plugins/DateTimePlugin/index.d.ts +2 -2
- package/build/plugins/DateTimePlugin/index.d.ts.map +1 -1
- package/build/plugins/DateTimePlugin/index.js +8 -14
- package/build/plugins/DragDropPastePlugin/index.d.ts +0 -7
- package/build/plugins/DragDropPastePlugin/index.d.ts.map +1 -1
- package/build/plugins/DragDropPastePlugin/index.js +12 -11
- package/build/plugins/DraggableBlockPlugin/index.css +6 -0
- package/build/plugins/DraggableBlockPlugin/index.d.ts +2 -2
- package/build/plugins/DraggableBlockPlugin/index.d.ts.map +1 -1
- package/build/plugins/DraggableBlockPlugin/index.js +23 -22
- package/build/plugins/EmojiPickerPlugin/index.d.ts +0 -7
- package/build/plugins/EmojiPickerPlugin/index.d.ts.map +1 -1
- package/build/plugins/EmojiPickerPlugin/index.js +1 -0
- package/build/plugins/EmojisPlugin/index.d.ts +1 -8
- package/build/plugins/EmojisPlugin/index.d.ts.map +1 -1
- package/build/plugins/EmojisPlugin/index.js +10 -16
- package/build/plugins/EquationsPlugin/index.d.ts +3 -3
- package/build/plugins/EquationsPlugin/index.d.ts.map +1 -1
- package/build/plugins/EquationsPlugin/index.js +14 -10
- package/build/plugins/FigmaPlugin/index.d.ts +2 -2
- package/build/plugins/FigmaPlugin/index.d.ts.map +1 -1
- package/build/plugins/FigmaPlugin/index.js +8 -14
- package/build/plugins/FloatingLinkEditorPlugin/index.css +11 -0
- package/build/plugins/FloatingLinkEditorPlugin/index.d.ts +3 -3
- package/build/plugins/FloatingLinkEditorPlugin/index.d.ts.map +1 -1
- package/build/plugins/FloatingLinkEditorPlugin/index.js +28 -27
- package/build/plugins/FloatingTextFormatToolbarPlugin/index.css +15 -0
- package/build/plugins/FloatingTextFormatToolbarPlugin/index.d.ts.map +1 -1
- package/build/plugins/FloatingTextFormatToolbarPlugin/index.js +2 -1
- package/build/plugins/ImagesPlugin/index.d.ts +3 -3
- package/build/plugins/ImagesPlugin/index.d.ts.map +1 -1
- package/build/plugins/ImagesPlugin/index.js +38 -37
- package/build/plugins/KeywordsPlugin/index.d.ts +1 -8
- package/build/plugins/KeywordsPlugin/index.d.ts.map +1 -1
- package/build/plugins/KeywordsPlugin/index.js +6 -12
- package/build/plugins/LayoutPlugin/InsertLayoutDialog.d.ts +2 -2
- package/build/plugins/LayoutPlugin/InsertLayoutDialog.d.ts.map +1 -1
- package/build/plugins/LayoutPlugin/InsertLayoutDialog.js +10 -9
- package/build/plugins/LayoutPlugin/LayoutPlugin.d.ts +1 -1
- package/build/plugins/LayoutPlugin/LayoutPlugin.d.ts.map +1 -1
- package/build/plugins/LayoutPlugin/LayoutPlugin.js +8 -14
- package/build/plugins/LinkPlugin/index.d.ts.map +1 -1
- package/build/plugins/LinkPlugin/index.js +1 -0
- package/build/plugins/MarkdownShortcutPlugin/index.d.ts.map +1 -1
- package/build/plugins/MarkdownShortcutPlugin/index.js +1 -0
- package/build/plugins/MarkdownTransformers/index.d.ts +1 -1
- package/build/plugins/MarkdownTransformers/index.d.ts.map +1 -1
- package/build/plugins/MarkdownTransformers/index.js +25 -25
- package/build/plugins/PasteLogPlugin/index.d.ts.map +1 -1
- package/build/plugins/PasteLogPlugin/index.js +1 -0
- package/build/plugins/ShortcutsPlugin/index.d.ts +0 -7
- package/build/plugins/ShortcutsPlugin/index.d.ts.map +1 -1
- package/build/plugins/ShortcutsPlugin/index.js +1 -0
- package/build/plugins/SpeechToTextPlugin/index.d.ts +2 -2
- package/build/plugins/SpeechToTextPlugin/index.d.ts.map +1 -1
- package/build/plugins/SpeechToTextPlugin/index.js +7 -11
- package/build/plugins/TabFocusPlugin/index.d.ts +0 -7
- package/build/plugins/TabFocusPlugin/index.d.ts.map +1 -1
- package/build/plugins/TabFocusPlugin/index.js +6 -5
- package/build/plugins/TableActionMenuPlugin/index.d.ts +1 -8
- package/build/plugins/TableActionMenuPlugin/index.d.ts.map +1 -1
- package/build/plugins/TableActionMenuPlugin/index.js +41 -40
- package/build/plugins/TableCellResizer/index.d.ts +2 -2
- package/build/plugins/TableCellResizer/index.d.ts.map +1 -1
- package/build/plugins/TableCellResizer/index.js +43 -42
- package/build/plugins/TableHoverActionsPlugin/index.d.ts +1 -8
- package/build/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -1
- package/build/plugins/TableHoverActionsPlugin/index.js +19 -18
- package/build/plugins/TableHoverActionsV2Plugin/index.d.ts.map +1 -1
- package/build/plugins/TableHoverActionsV2Plugin/index.js +1 -0
- package/build/plugins/TablePlugin.d.ts +2 -2
- package/build/plugins/TablePlugin.d.ts.map +1 -1
- package/build/plugins/TablePlugin.js +11 -10
- package/build/plugins/TableScrollShadowPlugin/index.d.ts +0 -7
- package/build/plugins/TableScrollShadowPlugin/index.d.ts.map +1 -1
- package/build/plugins/TableScrollShadowPlugin/index.js +9 -8
- package/build/plugins/TestRecorderPlugin/index.d.ts +1 -8
- package/build/plugins/TestRecorderPlugin/index.d.ts.map +1 -1
- package/build/plugins/TestRecorderPlugin/index.js +45 -44
- package/build/plugins/ToolbarPlugin/fontSize.d.ts +2 -2
- package/build/plugins/ToolbarPlugin/fontSize.d.ts.map +1 -1
- package/build/plugins/ToolbarPlugin/fontSize.js +19 -18
- package/build/plugins/ToolbarPlugin/index.d.ts.map +1 -1
- package/build/plugins/ToolbarPlugin/index.js +68 -60
- package/build/plugins/ToolbarPlugin/languages.d.ts +14 -0
- package/build/plugins/ToolbarPlugin/languages.d.ts.map +1 -0
- package/build/plugins/ToolbarPlugin/languages.js +185 -0
- package/build/plugins/ToolbarPlugin/utils.d.ts +2 -2
- package/build/plugins/ToolbarPlugin/utils.js +21 -21
- package/build/plugins/TwitterPlugin/index.d.ts +2 -2
- package/build/plugins/TwitterPlugin/index.d.ts.map +1 -1
- package/build/plugins/TwitterPlugin/index.js +8 -14
- package/build/plugins/YouTubePlugin/index.d.ts +2 -2
- package/build/plugins/YouTubePlugin/index.d.ts.map +1 -1
- package/build/plugins/YouTubePlugin/index.js +8 -14
- package/build/themes/PlaygroundEditorTheme.css +301 -33
- package/build/themes/ViewerTheme.css +899 -0
- package/build/{plugins/MentionsPlugin/index.d.ts → themes/ViewerTheme.d.ts} +5 -3
- package/build/themes/ViewerTheme.d.ts.map +1 -0
- package/build/themes/ViewerTheme.js +124 -0
- package/build/themes/ViewerThemeComplete.css +1043 -0
- package/build/ui/ColorPicker.d.ts +2 -2
- package/build/ui/ColorPicker.d.ts.map +1 -1
- package/build/ui/ColorPicker.js +47 -46
- package/build/ui/DropDown.d.ts.map +1 -1
- package/build/ui/DropDown.js +1 -0
- package/build/ui/FlashMessage.d.ts +3 -3
- package/build/ui/FlashMessage.d.ts.map +1 -1
- package/build/ui/FlashMessage.js +3 -2
- package/build/ui/ImageResizer.d.ts +3 -3
- package/build/ui/ImageResizer.d.ts.map +1 -1
- package/build/ui/ImageResizer.js +20 -19
- package/build/ui/KatexEquationAlterer.css +3 -1
- package/build/ui/KatexEquationAlterer.d.ts.map +1 -1
- package/build/ui/KatexEquationAlterer.js +1 -0
- package/build/ui/KatexRenderer.d.ts.map +1 -1
- package/build/ui/KatexRenderer.js +1 -0
- package/build/ui/Modal.d.ts.map +1 -1
- package/build/ui/Modal.js +1 -0
- package/build/ui/Switch.d.ts +2 -2
- package/build/ui/Switch.d.ts.map +1 -1
- package/build/ui/Switch.js +3 -2
- package/build/ui/TextInput.d.ts.map +1 -1
- package/build/ui/TextInput.js +1 -0
- package/build/utils/ServerBlockWithAlignableContents.d.ts +22 -0
- package/build/utils/ServerBlockWithAlignableContents.d.ts.map +1 -0
- package/build/utils/ServerBlockWithAlignableContents.js +6 -0
- package/build/utils/focusUtils.d.ts.map +1 -1
- package/build/utils/focusUtils.js +4 -3
- package/build/utils/getDOMRangeRect.d.ts.map +1 -1
- package/build/utils/getDOMRangeRect.js +1 -0
- package/build/utils/setFloatingElemPosition.d.ts.map +1 -1
- package/build/utils/setFloatingElemPosition.js +5 -4
- package/build/utils/swipe.d.ts +0 -7
- package/build/utils/swipe.d.ts.map +1 -1
- package/build/utils/swipe.js +5 -11
- package/build/viewer/Viewer.d.ts +18 -0
- package/build/viewer/Viewer.d.ts.map +1 -0
- package/build/viewer/Viewer.js +105 -0
- package/build/viewer/client.d.ts +18 -0
- package/build/viewer/client.d.ts.map +1 -0
- package/build/viewer/client.js +97 -0
- package/build/viewer/index.d.ts +4 -0
- package/build/viewer/index.d.ts.map +1 -0
- package/build/viewer/index.js +2 -0
- package/package.json +58 -36
- package/build/collaboration.d.ts +0 -12
- package/build/collaboration.d.ts.map +0 -1
- package/build/collaboration.js +0 -32
- package/build/nodes/FigmaNode.d.ts.map +0 -1
- package/build/nodes/PageBreakNode/index.css +0 -64
- package/build/nodes/PageBreakNode/index.d.ts +0 -25
- package/build/nodes/PageBreakNode/index.d.ts.map +0 -1
- package/build/nodes/PageBreakNode/index.js +0 -83
- package/build/nodes/PlaygroundNodes.d.ts.map +0 -1
- package/build/nodes/PollComponent.d.ts +0 -17
- package/build/nodes/PollComponent.d.ts.map +0 -1
- package/build/nodes/PollComponent.js +0 -85
- package/build/nodes/PollNode.css +0 -165
- package/build/nodes/PollNode.d.ts +0 -51
- package/build/nodes/PollNode.d.ts.map +0 -1
- package/build/nodes/PollNode.js +0 -153
- package/build/nodes/StickyComponent.d.ts +0 -18
- package/build/nodes/StickyComponent.d.ts.map +0 -1
- package/build/nodes/StickyComponent.js +0 -155
- package/build/nodes/StickyNode.css +0 -37
- package/build/nodes/StickyNode.d.ts +0 -39
- package/build/nodes/StickyNode.d.ts.map +0 -1
- package/build/nodes/StickyNode.js +0 -66
- package/build/nodes/TweetNode.d.ts.map +0 -1
- package/build/nodes/YouTubeNode.d.ts.map +0 -1
- package/build/plugins/DocsPlugin/index.d.ts +0 -10
- package/build/plugins/DocsPlugin/index.d.ts.map +0 -1
- package/build/plugins/DocsPlugin/index.js +0 -4
- package/build/plugins/MaxLengthPlugin/index.d.ts +0 -11
- package/build/plugins/MaxLengthPlugin/index.d.ts.map +0 -1
- package/build/plugins/MaxLengthPlugin/index.js +0 -44
- package/build/plugins/MentionsPlugin/index.d.ts.map +0 -1
- package/build/plugins/MentionsPlugin/index.js +0 -562
- package/build/plugins/PageBreakPlugin/index.d.ts +0 -12
- package/build/plugins/PageBreakPlugin/index.d.ts.map +0 -1
- package/build/plugins/PageBreakPlugin/index.js +0 -34
- package/build/plugins/StickyPlugin/index.d.ts +0 -10
- package/build/plugins/StickyPlugin/index.d.ts.map +0 -1
- package/build/plugins/StickyPlugin/index.js +0 -19
- package/build/plugins/TreeViewPlugin/index.d.ts +0 -10
- package/build/plugins/TreeViewPlugin/index.d.ts.map +0 -1
- package/build/plugins/TreeViewPlugin/index.js +0 -7
- package/build/plugins/TypingPerfPlugin/index.d.ts +0 -10
- package/build/plugins/TypingPerfPlugin/index.d.ts.map +0 -1
- package/build/plugins/TypingPerfPlugin/index.js +0 -100
- package/build/plugins/VersionsPlugin/index.css +0 -57
- package/build/plugins/VersionsPlugin/index.d.ts +0 -14
- package/build/plugins/VersionsPlugin/index.d.ts.map +0 -1
- package/build/plugins/VersionsPlugin/index.js +0 -147
- /package/build/nodes/{FigmaNode.d.ts → FigmaNode/FigmaNode.d.ts} +0 -0
- /package/build/nodes/{FigmaNode.js → FigmaNode/FigmaNode.js} +0 -0
- /package/build/nodes/{PlaygroundNodes.d.ts → PlaygroundNodes/PlaygroundNodes.d.ts} +0 -0
- /package/build/nodes/{TweetNode.d.ts → TweetNode/TweetNode.d.ts} +0 -0
- /package/build/nodes/{TweetNode.js → TweetNode/TweetNode.js} +0 -0
- /package/build/nodes/{YouTubeNode.d.ts → YouTubeNode/YouTubeNode.d.ts} +0 -0
- /package/build/nodes/{YouTubeNode.js → YouTubeNode/YouTubeNode.js} +0 -0
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
9
|
-
import { useLexicalTextEntity } from '@lexical/react/useLexicalTextEntity';
|
|
10
|
-
import { useCallback, useEffect } from 'react';
|
|
11
|
-
import { $createKeywordNode, KeywordNode } from '../../nodes/KeywordNode';
|
|
1
|
+
"use client";
|
|
2
|
+
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
3
|
+
import { useLexicalTextEntity } from "@lexical/react/useLexicalTextEntity";
|
|
4
|
+
import { useCallback, useEffect } from "react";
|
|
5
|
+
import { $createKeywordNode, KeywordNode } from "../../nodes/KeywordNode";
|
|
12
6
|
const KEYWORDS_REGEX = /(^|$|[^A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎↃↄⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〆〱-〵〻〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛥꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ])(congrats|congratulations|gratuluju|gratuluji|gratulujeme|blahopřeju|blahopřeji|blahopřejeme|Til lykke|Tillykke|Glückwunsch|Gratuliere|felicitaciones|enhorabuena|paljon onnea|onnittelut|Félicitations|gratula|gratulálok|gratulálunk|congratulazioni|complimenti|おめでとう|おめでとうございます|축하해|축하해요|gratulerer|Gefeliciteerd|gratulacje|Parabéns|parabéns|felicitações|felicitări|мои поздравления|поздравляем|поздравляю|gratulujem|blahoželám|ยินดีด้วย|ขอแสดงความยินดี|tebrikler|tebrik ederim|恭喜|祝贺你|恭喜你|恭喜|恭喜|baie geluk|veels geluk|অভিনন্দন|Čestitam|Čestitke|Čestitamo|Συγχαρητήρια|Μπράβο|અભિનંદન|badhai|बधाई|अभिनंदन|Честитам|Свака част|hongera|வாழ்த்துகள்|வாழ்த்துக்கள்|అభినందనలు|അഭിനന്ദനങ്ങൾ|Chúc mừng|מזל טוב|mazel tov|mazal tov)(^|$|[^A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎↃↄⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〆〱-〵〻〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛥꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ])/i;
|
|
13
7
|
export default function KeywordsPlugin() {
|
|
14
8
|
const [editor] = useLexicalComposerContext();
|
|
15
9
|
useEffect(() => {
|
|
16
10
|
if (!editor.hasNodes([KeywordNode])) {
|
|
17
|
-
throw new Error(
|
|
11
|
+
throw new Error("KeywordsPlugin: KeywordNode not registered on editor");
|
|
18
12
|
}
|
|
19
13
|
}, [editor]);
|
|
20
14
|
const $createKeywordNode_ = useCallback((textNode) => {
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import type { JSX } from
|
|
9
|
-
import { LexicalEditor } from
|
|
8
|
+
import type { JSX } from "react";
|
|
9
|
+
import { LexicalEditor } from "lexical";
|
|
10
10
|
export default function InsertLayoutDialog({ activeEditor, onClose, }: {
|
|
11
11
|
activeEditor: LexicalEditor;
|
|
12
12
|
onClose: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InsertLayoutDialog.d.ts","sourceRoot":"","sources":["../../../src/plugins/LayoutPlugin/InsertLayoutDialog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InsertLayoutDialog.d.ts","sourceRoot":"","sources":["../../../src/plugins/LayoutPlugin/InsertLayoutDialog.tsx"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAexC,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EACzC,YAAY,EACZ,OAAO,GACR,EAAE;IACD,YAAY,EAAE,aAAa,CAAC;IAC5B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,GAAG,GAAG,CAAC,OAAO,CA4Bd"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from
|
|
3
|
-
import Button from
|
|
4
|
-
import DropDown, { DropDownItem } from
|
|
5
|
-
import { INSERT_LAYOUT_COMMAND } from
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import Button from "../../ui/Button";
|
|
5
|
+
import DropDown, { DropDownItem } from "../../ui/DropDown";
|
|
6
|
+
import { INSERT_LAYOUT_COMMAND } from "./LayoutPlugin";
|
|
6
7
|
const LAYOUTS = [
|
|
7
|
-
{ label:
|
|
8
|
-
{ label:
|
|
9
|
-
{ label:
|
|
10
|
-
{ label:
|
|
11
|
-
{ label:
|
|
8
|
+
{ label: "2 columns (equal width)", value: "1fr 1fr" },
|
|
9
|
+
{ label: "2 columns (25% - 75%)", value: "1fr 3fr" },
|
|
10
|
+
{ label: "3 columns (equal width)", value: "1fr 1fr 1fr" },
|
|
11
|
+
{ label: "3 columns (25% - 50% - 25%)", value: "1fr 2fr 1fr" },
|
|
12
|
+
{ label: "4 columns (equal width)", value: "1fr 1fr 1fr 1fr" },
|
|
12
13
|
];
|
|
13
14
|
export default function InsertLayoutDialog({ activeEditor, onClose, }) {
|
|
14
15
|
var _a;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import type { LexicalCommand, NodeKey } from
|
|
8
|
+
import type { LexicalCommand, NodeKey } from "lexical";
|
|
9
9
|
export declare const INSERT_LAYOUT_COMMAND: LexicalCommand<string>;
|
|
10
10
|
export declare const UPDATE_LAYOUT_COMMAND: LexicalCommand<{
|
|
11
11
|
template: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutPlugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/LayoutPlugin/LayoutPlugin.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LayoutPlugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/LayoutPlugin/LayoutPlugin.tsx"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,OAAO,KAAK,EAEV,cAAc,EAEd,OAAO,EACR,MAAM,SAAS,CAAC;AAkCjB,eAAO,MAAM,qBAAqB,EAAE,cAAc,CAAC,MAAM,CAChC,CAAC;AAE1B,eAAO,MAAM,qBAAqB,EAAE,cAAc,CAAC;IACjD,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;CAClB,CAA2D,CAAC;AAE7D,wBAAgB,YAAY,IAAI,IAAI,CAuLnC"}
|
|
@@ -1,23 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
9
|
-
import { $findMatchingParent, $insertNodeToNearestRoot, mergeRegister, } from '@lexical/utils';
|
|
10
|
-
import { $createParagraphNode, $getNodeByKey, $getSelection, $isRangeSelection, COMMAND_PRIORITY_EDITOR, COMMAND_PRIORITY_LOW, createCommand, KEY_ARROW_DOWN_COMMAND, KEY_ARROW_LEFT_COMMAND, KEY_ARROW_RIGHT_COMMAND, KEY_ARROW_UP_COMMAND, } from 'lexical';
|
|
11
|
-
import { useEffect } from 'react';
|
|
12
|
-
import { $createLayoutContainerNode, $isLayoutContainerNode, LayoutContainerNode, } from '../../nodes/LayoutContainerNode';
|
|
13
|
-
import { $createLayoutItemNode, $isLayoutItemNode, LayoutItemNode, } from '../../nodes/LayoutItemNode';
|
|
1
|
+
"use client";
|
|
2
|
+
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
3
|
+
import { $findMatchingParent, $insertNodeToNearestRoot, mergeRegister, } from "@lexical/utils";
|
|
4
|
+
import { $createParagraphNode, $getNodeByKey, $getSelection, $isRangeSelection, COMMAND_PRIORITY_EDITOR, COMMAND_PRIORITY_LOW, createCommand, KEY_ARROW_DOWN_COMMAND, KEY_ARROW_LEFT_COMMAND, KEY_ARROW_RIGHT_COMMAND, KEY_ARROW_UP_COMMAND, } from "lexical";
|
|
5
|
+
import { useEffect } from "react";
|
|
6
|
+
import { $createLayoutContainerNode, $isLayoutContainerNode, LayoutContainerNode, } from "../../nodes/LayoutContainerNode";
|
|
7
|
+
import { $createLayoutItemNode, $isLayoutItemNode, LayoutItemNode, } from "../../nodes/LayoutItemNode";
|
|
14
8
|
export const INSERT_LAYOUT_COMMAND = createCommand();
|
|
15
9
|
export const UPDATE_LAYOUT_COMMAND = createCommand();
|
|
16
10
|
export function LayoutPlugin() {
|
|
17
11
|
const [editor] = useLexicalComposerContext();
|
|
18
12
|
useEffect(() => {
|
|
19
13
|
if (!editor.hasNodes([LayoutContainerNode, LayoutItemNode])) {
|
|
20
|
-
throw new Error(
|
|
14
|
+
throw new Error("LayoutPlugin: LayoutContainerNode, or LayoutItemNode not registered on editor");
|
|
21
15
|
}
|
|
22
16
|
const $onEscape = (before) => {
|
|
23
17
|
var _a, _b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/LinkPlugin/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/LinkPlugin/index.tsx"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAIjC,KAAK,KAAK,GAAG;IACX,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,iBAAyB,GAC1B,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAarB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/MarkdownShortcutPlugin/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/MarkdownShortcutPlugin/index.tsx"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAMjC,MAAM,CAAC,OAAO,UAAU,cAAc,IAAI,GAAG,CAAC,OAAO,CAEpD"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import { ElementTransformer, TextMatchTransformer, Transformer } from
|
|
8
|
+
import { ElementTransformer, TextMatchTransformer, Transformer } from "@lexical/markdown";
|
|
9
9
|
export declare const HR: ElementTransformer;
|
|
10
10
|
export declare const IMAGE: TextMatchTransformer;
|
|
11
11
|
export declare const EMOJI: TextMatchTransformer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/MarkdownTransformers/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAKL,kBAAkB,EAIlB,oBAAoB,EACpB,WAAW,EACZ,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/MarkdownTransformers/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAKL,kBAAkB,EAIlB,oBAAoB,EACpB,WAAW,EACZ,MAAM,mBAAmB,CAAC;AA0C3B,eAAO,MAAM,EAAE,EAAE,kBAmBhB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,oBAsBnB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,oBAanB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,oBAkBtB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,kBAgBnB,CAAC;AAMF,eAAO,MAAM,KAAK,EAAE,kBAoInB,CAAC;AAsBF,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,WAAW,CAYtD,CAAC"}
|
|
@@ -5,18 +5,18 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import { $convertFromMarkdownString, $convertToMarkdownString, CHECK_LIST, ELEMENT_TRANSFORMERS, MULTILINE_ELEMENT_TRANSFORMERS, TEXT_FORMAT_TRANSFORMERS, TEXT_MATCH_TRANSFORMERS, } from
|
|
9
|
-
import { $createHorizontalRuleNode, $isHorizontalRuleNode, HorizontalRuleNode, } from
|
|
10
|
-
import { $createTableCellNode, $createTableNode, $createTableRowNode, $isTableCellNode, $isTableNode, $isTableRowNode, TableCellHeaderStates, TableCellNode, TableNode, TableRowNode, } from
|
|
11
|
-
import { $createTextNode, $isParagraphNode, $isTextNode, } from
|
|
12
|
-
import { $createEquationNode, $isEquationNode, EquationNode, } from
|
|
13
|
-
import { $createImageNode, $isImageNode, ImageNode } from
|
|
14
|
-
import { $createTweetNode, $isTweetNode, TweetNode } from
|
|
15
|
-
import emojiList from
|
|
8
|
+
import { $convertFromMarkdownString, $convertToMarkdownString, CHECK_LIST, ELEMENT_TRANSFORMERS, MULTILINE_ELEMENT_TRANSFORMERS, TEXT_FORMAT_TRANSFORMERS, TEXT_MATCH_TRANSFORMERS, } from "@lexical/markdown";
|
|
9
|
+
import { $createHorizontalRuleNode, $isHorizontalRuleNode, HorizontalRuleNode, } from "@lexical/extension";
|
|
10
|
+
import { $createTableCellNode, $createTableNode, $createTableRowNode, $isTableCellNode, $isTableNode, $isTableRowNode, TableCellHeaderStates, TableCellNode, TableNode, TableRowNode, } from "@lexical/table";
|
|
11
|
+
import { $createTextNode, $isParagraphNode, $isTextNode, } from "lexical";
|
|
12
|
+
import { $createEquationNode, $isEquationNode, EquationNode, } from "../../nodes/EquationNode";
|
|
13
|
+
import { $createImageNode, $isImageNode, ImageNode, } from "../../nodes/ImageNode";
|
|
14
|
+
import { $createTweetNode, $isTweetNode, TweetNode, } from "../../nodes/TweetNode/TweetNode";
|
|
15
|
+
import emojiList from "../../utils/emoji-list";
|
|
16
16
|
export const HR = {
|
|
17
17
|
dependencies: [HorizontalRuleNode],
|
|
18
18
|
export: (node) => {
|
|
19
|
-
return $isHorizontalRuleNode(node) ?
|
|
19
|
+
return $isHorizontalRuleNode(node) ? "***" : null;
|
|
20
20
|
},
|
|
21
21
|
regExp: /^(---|\*\*\*|___)\s?$/,
|
|
22
22
|
replace: (parentNode, _1, _2, isImport) => {
|
|
@@ -30,7 +30,7 @@ export const HR = {
|
|
|
30
30
|
}
|
|
31
31
|
line.selectNext();
|
|
32
32
|
},
|
|
33
|
-
type:
|
|
33
|
+
type: "element",
|
|
34
34
|
};
|
|
35
35
|
export const IMAGE = {
|
|
36
36
|
dependencies: [ImageNode],
|
|
@@ -51,8 +51,8 @@ export const IMAGE = {
|
|
|
51
51
|
});
|
|
52
52
|
textNode.replace(imageNode);
|
|
53
53
|
},
|
|
54
|
-
trigger:
|
|
55
|
-
type:
|
|
54
|
+
trigger: ")",
|
|
55
|
+
type: "text-match",
|
|
56
56
|
};
|
|
57
57
|
export const EMOJI = {
|
|
58
58
|
dependencies: [],
|
|
@@ -66,8 +66,8 @@ export const EMOJI = {
|
|
|
66
66
|
textNode.replace($createTextNode(emoji));
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
|
-
trigger:
|
|
70
|
-
type:
|
|
69
|
+
trigger: ":",
|
|
70
|
+
type: "text-match",
|
|
71
71
|
};
|
|
72
72
|
export const EQUATION = {
|
|
73
73
|
dependencies: [EquationNode],
|
|
@@ -84,8 +84,8 @@ export const EQUATION = {
|
|
|
84
84
|
const equationNode = $createEquationNode(equation, true);
|
|
85
85
|
textNode.replace(equationNode);
|
|
86
86
|
},
|
|
87
|
-
trigger:
|
|
88
|
-
type:
|
|
87
|
+
trigger: "$",
|
|
88
|
+
type: "text-match",
|
|
89
89
|
};
|
|
90
90
|
export const TWEET = {
|
|
91
91
|
dependencies: [TweetNode],
|
|
@@ -101,7 +101,7 @@ export const TWEET = {
|
|
|
101
101
|
const tweetNode = $createTweetNode(id);
|
|
102
102
|
textNode.replace(tweetNode);
|
|
103
103
|
},
|
|
104
|
-
type:
|
|
104
|
+
type: "element",
|
|
105
105
|
};
|
|
106
106
|
// Very primitive table setup
|
|
107
107
|
const TABLE_ROW_REG_EXP = /^(?:\|)(.+)(?:\|)\s?$/;
|
|
@@ -123,19 +123,19 @@ export const TABLE = {
|
|
|
123
123
|
// It's TableCellNode so it's just to make flow happy
|
|
124
124
|
if ($isTableCellNode(cell)) {
|
|
125
125
|
rowOutput.push($convertToMarkdownString(PLAYGROUND_TRANSFORMERS, cell)
|
|
126
|
-
.replace(/\n/g,
|
|
126
|
+
.replace(/\n/g, "\\n")
|
|
127
127
|
.trim());
|
|
128
128
|
if (cell.__headerState === TableCellHeaderStates.ROW) {
|
|
129
129
|
isHeaderRow = true;
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
-
output.push(`| ${rowOutput.join(
|
|
133
|
+
output.push(`| ${rowOutput.join(" | ")} |`);
|
|
134
134
|
if (isHeaderRow) {
|
|
135
|
-
output.push(`| ${rowOutput.map((_) =>
|
|
135
|
+
output.push(`| ${rowOutput.map((_) => "---").join(" | ")} |`);
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
|
-
return output.join(
|
|
138
|
+
return output.join("\n");
|
|
139
139
|
},
|
|
140
140
|
regExp: TABLE_ROW_REG_EXP,
|
|
141
141
|
replace: (parentNode, _1, match) => {
|
|
@@ -194,7 +194,7 @@ export const TABLE = {
|
|
|
194
194
|
const tableRow = $createTableRowNode();
|
|
195
195
|
table.append(tableRow);
|
|
196
196
|
for (let i = 0; i < maxCells; i++) {
|
|
197
|
-
tableRow.append(i < cells.length ? cells[i] : $createTableCell(
|
|
197
|
+
tableRow.append(i < cells.length ? cells[i] : $createTableCell(""));
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
200
|
const previousSibling = parentNode.getPreviousSibling();
|
|
@@ -208,14 +208,14 @@ export const TABLE = {
|
|
|
208
208
|
}
|
|
209
209
|
table.selectEnd();
|
|
210
210
|
},
|
|
211
|
-
type:
|
|
211
|
+
type: "element",
|
|
212
212
|
};
|
|
213
213
|
function getTableColumnsSize(table) {
|
|
214
214
|
const row = table.getFirstChild();
|
|
215
215
|
return $isTableRowNode(row) ? row.getChildrenSize() : 0;
|
|
216
216
|
}
|
|
217
217
|
const $createTableCell = (textContent) => {
|
|
218
|
-
textContent = textContent.replace(/\\n/g,
|
|
218
|
+
textContent = textContent.replace(/\\n/g, "\n");
|
|
219
219
|
const cell = $createTableCellNode(TableCellHeaderStates.NO_STATUS);
|
|
220
220
|
$convertFromMarkdownString(textContent, PLAYGROUND_TRANSFORMERS, cell);
|
|
221
221
|
return cell;
|
|
@@ -225,7 +225,7 @@ const mapToTableCells = (textContent) => {
|
|
|
225
225
|
if (!match || !match[1]) {
|
|
226
226
|
return null;
|
|
227
227
|
}
|
|
228
|
-
return match[1].split(
|
|
228
|
+
return match[1].split("|").map((text) => $createTableCell(text));
|
|
229
229
|
};
|
|
230
230
|
export const PLAYGROUND_TRANSFORMERS = [
|
|
231
231
|
TABLE,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/PasteLogPlugin/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/PasteLogPlugin/index.tsx"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAMjC,MAAM,CAAC,OAAO,UAAU,cAAc,IAAI,GAAG,CAAC,OAAO,CAwCpD"}
|
|
@@ -1,10 +1,3 @@
|
|
|
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
1
|
import { LexicalEditor } from "lexical";
|
|
9
2
|
import { Dispatch } from "react";
|
|
10
3
|
export default function ShortcutsPlugin({ editor, setIsLinkEditMode, }: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/ShortcutsPlugin/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/ShortcutsPlugin/index.tsx"],"names":[],"mappings":"AAYA,OAAO,EAOL,aAAa,EAEd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,QAAQ,EAAa,MAAM,OAAO,CAAC;AA2C5C,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACtC,MAAM,EACN,iBAAiB,GAClB,EAAE;IACD,MAAM,EAAE,aAAa,CAAC;IACtB,iBAAiB,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;CACtC,GAAG,IAAI,CA0FP"}
|
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
import type { LexicalCommand } from "lexical";
|
|
9
9
|
export declare const SPEECH_TO_TEXT_COMMAND: LexicalCommand<boolean>;
|
|
10
10
|
export declare const SUPPORT_SPEECH_RECOGNITION: boolean;
|
|
11
|
-
declare
|
|
12
|
-
export default
|
|
11
|
+
declare function SpeechToTextPlugin(): null;
|
|
12
|
+
export default SpeechToTextPlugin;
|
|
13
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/SpeechToTextPlugin/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/SpeechToTextPlugin/index.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAiC,MAAM,SAAS,CAAC;AAe7E,eAAO,MAAM,sBAAsB,EAAE,cAAc,CAAC,OAAO,CAE1D,CAAC;AAmBF,eAAO,MAAM,0BAA0B,EAAE,OAE+B,CAAC;AAEzE,iBAAS,kBAAkB,IAAI,IAAI,CA6ElC;AAED,eAAe,kBAAkB,CAAC"}
|
|
@@ -1,10 +1,4 @@
|
|
|
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
|
-
*/
|
|
1
|
+
"use client";
|
|
8
2
|
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
9
3
|
import { $getSelection, $isRangeSelection, COMMAND_PRIORITY_EDITOR, createCommand, REDO_COMMAND, UNDO_COMMAND, } from "lexical";
|
|
10
4
|
import { useEffect, useRef, useState } from "react";
|
|
@@ -21,8 +15,12 @@ const VOICE_COMMANDS = {
|
|
|
21
15
|
editor.dispatchCommand(UNDO_COMMAND, undefined);
|
|
22
16
|
},
|
|
23
17
|
};
|
|
24
|
-
export const SUPPORT_SPEECH_RECOGNITION =
|
|
18
|
+
export const SUPPORT_SPEECH_RECOGNITION = typeof window !== "undefined" &&
|
|
19
|
+
("SpeechRecognition" in window || "webkitSpeechRecognition" in window);
|
|
25
20
|
function SpeechToTextPlugin() {
|
|
21
|
+
if (!SUPPORT_SPEECH_RECOGNITION) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
26
24
|
const [editor] = useLexicalComposerContext();
|
|
27
25
|
const [isEnabled, setIsEnabled] = useState(false);
|
|
28
26
|
const SpeechRecognition =
|
|
@@ -84,6 +82,4 @@ function SpeechToTextPlugin() {
|
|
|
84
82
|
}, [editor]);
|
|
85
83
|
return null;
|
|
86
84
|
}
|
|
87
|
-
export default
|
|
88
|
-
? SpeechToTextPlugin
|
|
89
|
-
: () => null);
|
|
85
|
+
export default SpeechToTextPlugin;
|
|
@@ -1,9 +1,2 @@
|
|
|
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
1
|
export default function TabFocusPlugin(): null;
|
|
9
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/TabFocusPlugin/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/TabFocusPlugin/index.tsx"],"names":[],"mappings":"AAsCA,MAAM,CAAC,OAAO,UAAU,cAAc,IAAI,IAAI,CA4B7C"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
/**
|
|
2
3
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
4
|
*
|
|
@@ -5,16 +6,16 @@
|
|
|
5
6
|
* LICENSE file in the root directory of this source tree.
|
|
6
7
|
*
|
|
7
8
|
*/
|
|
8
|
-
import { useLexicalComposerContext } from
|
|
9
|
-
import { $getSelection, $isRangeSelection, $setSelection, COMMAND_PRIORITY_LOW, FOCUS_COMMAND, } from
|
|
10
|
-
import { useEffect } from
|
|
9
|
+
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
10
|
+
import { $getSelection, $isRangeSelection, $setSelection, COMMAND_PRIORITY_LOW, FOCUS_COMMAND, } from "lexical";
|
|
11
|
+
import { useEffect } from "react";
|
|
11
12
|
const TAB_TO_FOCUS_INTERVAL = 100;
|
|
12
13
|
let lastTabKeyDownTimestamp = 0;
|
|
13
14
|
let hasRegisteredKeyDownListener = false;
|
|
14
15
|
function registerKeyTimeStampTracker() {
|
|
15
|
-
window.addEventListener(
|
|
16
|
+
window.addEventListener("keydown", (event) => {
|
|
16
17
|
// Tab
|
|
17
|
-
if (event.key ===
|
|
18
|
+
if (event.key === "Tab") {
|
|
18
19
|
lastTabKeyDownTimestamp = event.timeStamp;
|
|
19
20
|
}
|
|
20
21
|
}, true);
|
|
@@ -1,11 +1,4 @@
|
|
|
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 { ReactPortal } from 'react';
|
|
1
|
+
import { ReactPortal } from "react";
|
|
9
2
|
export default function TableActionMenuPlugin({ anchorElem, cellMerge, }: {
|
|
10
3
|
anchorElem?: HTMLElement;
|
|
11
4
|
cellMerge?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/TableActionMenuPlugin/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/TableActionMenuPlugin/index.tsx"],"names":[],"mappings":"AAiDA,OAAO,EAAE,WAAW,EAA4C,MAAM,OAAO,CAAC;AA63B9E,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,EAC5C,UAA0B,EAC1B,SAAiB,GAClB,EAAE;IACD,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,GAAG,IAAI,GAAG,WAAW,CAWrB"}
|