@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,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*/
|
|
9
|
-
.StickyNode__contentEditable {
|
|
10
|
-
min-height: 20px;
|
|
11
|
-
border: 0;
|
|
12
|
-
resize: none;
|
|
13
|
-
cursor: text;
|
|
14
|
-
font-size: 24px;
|
|
15
|
-
caret-color: rgb(5, 5, 5);
|
|
16
|
-
display: block;
|
|
17
|
-
position: relative;
|
|
18
|
-
outline: 0;
|
|
19
|
-
padding: 10px;
|
|
20
|
-
user-select: text;
|
|
21
|
-
white-space: pre-wrap;
|
|
22
|
-
word-wrap: break-word;
|
|
23
|
-
}
|
|
24
|
-
.StickyNode__placeholder {
|
|
25
|
-
font-size: 24px;
|
|
26
|
-
color: #999;
|
|
27
|
-
overflow: hidden;
|
|
28
|
-
position: absolute;
|
|
29
|
-
text-overflow: ellipsis;
|
|
30
|
-
top: 30px;
|
|
31
|
-
left: 20px;
|
|
32
|
-
width: 120px;
|
|
33
|
-
user-select: none;
|
|
34
|
-
white-space: nowrap;
|
|
35
|
-
display: inline-block;
|
|
36
|
-
pointer-events: none;
|
|
37
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
import type { EditorConfig, LexicalEditor, LexicalNode, LexicalUpdateJSON, NodeKey, SerializedEditor, SerializedLexicalNode, Spread } from 'lexical';
|
|
9
|
-
import type { JSX } from 'react';
|
|
10
|
-
import { DecoratorNode } from 'lexical';
|
|
11
|
-
type StickyNoteColor = 'pink' | 'yellow';
|
|
12
|
-
export type SerializedStickyNode = Spread<{
|
|
13
|
-
xOffset: number;
|
|
14
|
-
yOffset: number;
|
|
15
|
-
color: StickyNoteColor;
|
|
16
|
-
caption: SerializedEditor;
|
|
17
|
-
}, SerializedLexicalNode>;
|
|
18
|
-
export declare class StickyNode extends DecoratorNode<JSX.Element> {
|
|
19
|
-
__x: number;
|
|
20
|
-
__y: number;
|
|
21
|
-
__color: StickyNoteColor;
|
|
22
|
-
__caption: LexicalEditor;
|
|
23
|
-
static getType(): string;
|
|
24
|
-
static clone(node: StickyNode): StickyNode;
|
|
25
|
-
static importJSON(serializedNode: SerializedStickyNode): StickyNode;
|
|
26
|
-
updateFromJSON(serializedNode: LexicalUpdateJSON<SerializedStickyNode>): this;
|
|
27
|
-
constructor(x: number, y: number, color: 'pink' | 'yellow', caption?: LexicalEditor, key?: NodeKey);
|
|
28
|
-
exportJSON(): SerializedStickyNode;
|
|
29
|
-
createDOM(config: EditorConfig): HTMLElement;
|
|
30
|
-
updateDOM(): false;
|
|
31
|
-
setPosition(x: number, y: number): void;
|
|
32
|
-
toggleColor(): void;
|
|
33
|
-
decorate(editor: LexicalEditor, config: EditorConfig): JSX.Element;
|
|
34
|
-
isIsolated(): true;
|
|
35
|
-
}
|
|
36
|
-
export declare function $isStickyNode(node: LexicalNode | null | undefined): node is StickyNode;
|
|
37
|
-
export declare function $createStickyNode(xOffset: number, yOffset: number): StickyNode;
|
|
38
|
-
export {};
|
|
39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,IAAI,oBAAoB;IAUlC,SAAS,CAAC,MAAM,EAAE,YAAY,GAAG,WAAW;IAM5C,SAAS,IAAI,KAAK;IAIlB,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI;IAOvC,WAAW,IAAI,IAAI;IAKnB,QAAQ,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO;IAalE,UAAU,IAAI,IAAI;CAGnB;AAED,wBAAgB,aAAa,CAC3B,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GACnC,IAAI,IAAI,UAAU,CAEpB;AAED,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,UAAU,CAEZ"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { $setSelection, createEditor, DecoratorNode } from 'lexical';
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { createPortal } from 'react-dom';
|
|
5
|
-
const StickyComponent = React.lazy(() => import('./StickyComponent'));
|
|
6
|
-
export class StickyNode extends DecoratorNode {
|
|
7
|
-
static getType() {
|
|
8
|
-
return 'sticky';
|
|
9
|
-
}
|
|
10
|
-
static clone(node) {
|
|
11
|
-
return new StickyNode(node.__x, node.__y, node.__color, node.__caption, node.__key);
|
|
12
|
-
}
|
|
13
|
-
static importJSON(serializedNode) {
|
|
14
|
-
return new StickyNode(serializedNode.xOffset, serializedNode.yOffset, serializedNode.color).updateFromJSON(serializedNode);
|
|
15
|
-
}
|
|
16
|
-
updateFromJSON(serializedNode) {
|
|
17
|
-
const stickyNode = super.updateFromJSON(serializedNode);
|
|
18
|
-
const caption = serializedNode.caption;
|
|
19
|
-
const nestedEditor = stickyNode.__caption;
|
|
20
|
-
const editorState = nestedEditor.parseEditorState(caption.editorState);
|
|
21
|
-
if (!editorState.isEmpty()) {
|
|
22
|
-
nestedEditor.setEditorState(editorState);
|
|
23
|
-
}
|
|
24
|
-
return stickyNode;
|
|
25
|
-
}
|
|
26
|
-
constructor(x, y, color, caption, key) {
|
|
27
|
-
super(key);
|
|
28
|
-
this.__x = x;
|
|
29
|
-
this.__y = y;
|
|
30
|
-
this.__caption = caption || createEditor();
|
|
31
|
-
this.__color = color;
|
|
32
|
-
}
|
|
33
|
-
exportJSON() {
|
|
34
|
-
return Object.assign(Object.assign({}, super.exportJSON()), { caption: this.__caption.toJSON(), color: this.__color, xOffset: this.__x, yOffset: this.__y });
|
|
35
|
-
}
|
|
36
|
-
createDOM(config) {
|
|
37
|
-
const div = document.createElement('div');
|
|
38
|
-
div.style.display = 'contents';
|
|
39
|
-
return div;
|
|
40
|
-
}
|
|
41
|
-
updateDOM() {
|
|
42
|
-
return false;
|
|
43
|
-
}
|
|
44
|
-
setPosition(x, y) {
|
|
45
|
-
const writable = this.getWritable();
|
|
46
|
-
writable.__x = x;
|
|
47
|
-
writable.__y = y;
|
|
48
|
-
$setSelection(null);
|
|
49
|
-
}
|
|
50
|
-
toggleColor() {
|
|
51
|
-
const writable = this.getWritable();
|
|
52
|
-
writable.__color = writable.__color === 'pink' ? 'yellow' : 'pink';
|
|
53
|
-
}
|
|
54
|
-
decorate(editor, config) {
|
|
55
|
-
return createPortal(_jsx(StickyComponent, { color: this.__color, x: this.__x, y: this.__y, nodeKey: this.getKey(), caption: this.__caption }), document.body);
|
|
56
|
-
}
|
|
57
|
-
isIsolated() {
|
|
58
|
-
return true;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
export function $isStickyNode(node) {
|
|
62
|
-
return node instanceof StickyNode;
|
|
63
|
-
}
|
|
64
|
-
export function $createStickyNode(xOffset, yOffset) {
|
|
65
|
-
return new StickyNode(xOffset, yOffset, 'yellow');
|
|
66
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TweetNode.d.ts","sourceRoot":"","sources":["../../src/nodes/TweetNode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O,EAAE,MAAM,GAAG,WAAW,CAE/D;AAED,wBAAgB,cAAc,CAC5B,IAAI,EAAE,WAAW,GAAG,WAAW,GAAG,IAAI,GAAG,SAAS,GACjD,IAAI,IAAI,WAAW,CAErB"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
import type { JSX } from "react";
|
|
9
|
-
export default function DocsPlugin(): JSX.Element;
|
|
10
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/DocsPlugin/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,CAAC,OAAO,UAAU,UAAU,IAAI,GAAG,CAAC,OAAO,CAUhD"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
export default function DocsPlugin() {
|
|
3
|
-
return (_jsx("a", { target: "__blank", href: "https://lexical.dev/docs/intro", children: _jsx("button", { id: "docs-button", className: "editor-dev-button", title: "Lexical Docs" }) }));
|
|
4
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
export declare function MaxLengthPlugin({ maxLength }: {
|
|
9
|
-
maxLength: number;
|
|
10
|
-
}): null;
|
|
11
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/MaxLengthPlugin/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAQH,wBAAgB,eAAe,CAAC,EAAC,SAAS,EAAC,EAAE;IAAC,SAAS,EAAE,MAAM,CAAA;CAAC,GAAG,IAAI,CAsCtE"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
9
|
-
import { $trimTextContentFromAnchor } from '@lexical/selection';
|
|
10
|
-
import { $restoreEditorState } from '@lexical/utils';
|
|
11
|
-
import { $getSelection, $isRangeSelection, RootNode } from 'lexical';
|
|
12
|
-
import { useEffect } from 'react';
|
|
13
|
-
export function MaxLengthPlugin({ maxLength }) {
|
|
14
|
-
const [editor] = useLexicalComposerContext();
|
|
15
|
-
useEffect(() => {
|
|
16
|
-
let lastRestoredEditorState = null;
|
|
17
|
-
return editor.registerNodeTransform(RootNode, (rootNode) => {
|
|
18
|
-
const selection = $getSelection();
|
|
19
|
-
if (!$isRangeSelection(selection) || !selection.isCollapsed()) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
const prevEditorState = editor.getEditorState();
|
|
23
|
-
const prevTextContentSize = prevEditorState.read(() => rootNode.getTextContentSize());
|
|
24
|
-
const textContentSize = rootNode.getTextContentSize();
|
|
25
|
-
if (prevTextContentSize !== textContentSize) {
|
|
26
|
-
const delCount = textContentSize - maxLength;
|
|
27
|
-
const anchor = selection.anchor;
|
|
28
|
-
if (delCount > 0) {
|
|
29
|
-
// Restore the old editor state instead if the last
|
|
30
|
-
// text content was already at the limit.
|
|
31
|
-
if (prevTextContentSize === maxLength &&
|
|
32
|
-
lastRestoredEditorState !== prevEditorState) {
|
|
33
|
-
lastRestoredEditorState = prevEditorState;
|
|
34
|
-
$restoreEditorState(editor, prevEditorState);
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
$trimTextContentFromAnchor(editor, anchor, delCount);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
}, [editor, maxLength]);
|
|
43
|
-
return null;
|
|
44
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/MentionsPlugin/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,OAAO,CAAC;AAylB/B,MAAM,CAAC,OAAO,UAAU,iBAAiB,IAAI,GAAG,CAAC,OAAO,GAAG,IAAI,CAwF9D"}
|