@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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTimeComponent.d.ts","sourceRoot":"","sources":["../../../src/nodes/DateTimeNode/DateTimeComponent.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DateTimeComponent.d.ts","sourceRoot":"","sources":["../../../src/nodes/DateTimeNode/DateTimeComponent.tsx"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,4BAA4B,CAAC;AACpC,OAAO,oBAAoB,CAAC;AAkB5B,OAAO,EAAiB,OAAO,EAAE,MAAM,SAAS,CAAC;AASjD,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACxC,QAAQ,EACR,OAAO,GACR,EAAE;IACD,QAAQ,EAAE,IAAI,GAAG,SAAS,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;CAClB,GAAG,GAAG,CAAC,OAAO,CA6Md"}
|
|
@@ -32,3 +32,24 @@
|
|
|
32
32
|
--rdp-accent-color: #76b6ff;
|
|
33
33
|
--rdp-accent-background-color: #f0f0f0;
|
|
34
34
|
}
|
|
35
|
+
|
|
36
|
+
@media (prefers-color-scheme: dark) {
|
|
37
|
+
.dateTimePill {
|
|
38
|
+
background: #3a3a3a;
|
|
39
|
+
border: 1px solid #3a3a3a;
|
|
40
|
+
color: #ddd;
|
|
41
|
+
}
|
|
42
|
+
.dateTimePill:hover {
|
|
43
|
+
background: #4a4a4a;
|
|
44
|
+
}
|
|
45
|
+
.dateTimePicker {
|
|
46
|
+
background: #2a2a2a;
|
|
47
|
+
border: 1px solid #444;
|
|
48
|
+
box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7);
|
|
49
|
+
color: #ddd;
|
|
50
|
+
}
|
|
51
|
+
.rdp-root {
|
|
52
|
+
--rdp-accent-color: #1768ff;
|
|
53
|
+
--rdp-accent-background-color: #333;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FigmaNode.d.ts","sourceRoot":"","sources":["../../../src/nodes/FigmaNode/FigmaNode.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,OAAO,EACP,MAAM,EACP,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAGjC,OAAO,EACL,kBAAkB,EAClB,4BAA4B,EAC7B,MAAM,0CAA0C,CAAC;AAmClD,MAAM,MAAM,mBAAmB,GAAG,MAAM,CACtC;IACE,UAAU,EAAE,MAAM,CAAC;CACpB,EACD,4BAA4B,CAC7B,CAAC;AAEF,qBAAa,SAAU,SAAQ,kBAAkB;IAC/C,IAAI,EAAE,MAAM,CAAC;IAEb,MAAM,CAAC,OAAO,IAAI,MAAM;IAIxB,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS;IAIxC,MAAM,CAAC,UAAU,CAAC,cAAc,EAAE,mBAAmB,GAAG,SAAS;IAMjE,UAAU,IAAI,mBAAmB;gBAOrB,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,iBAAiB,EAAE,GAAG,CAAC,EAAE,OAAO;IAKjE,SAAS,IAAI,KAAK;IAIlB,KAAK,IAAI,MAAM;IAIf,cAAc,CACZ,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,EACnC,qBAAqB,CAAC,EAAE,KAAK,GAAG,SAAS,GACxC,MAAM;IAIT,QAAQ,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO;CAepE;AAED,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAE9D;AAED,wBAAgB,YAAY,CAC1B,IAAI,EAAE,SAAS,GAAG,WAAW,GAAG,IAAI,GAAG,SAAS,GAC/C,IAAI,IAAI,SAAS,CAEnB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { EditorConfig, ElementFormatType, LexicalEditor, LexicalNode, NodeKey, Spread } from "lexical";
|
|
2
|
+
import type { JSX } from "react";
|
|
3
|
+
import { DecoratorBlockNode, SerializedDecoratorBlockNode } from "@lexical/react/LexicalDecoratorBlockNode";
|
|
4
|
+
export type SerializedFigmaNode = Spread<{
|
|
5
|
+
documentID: string;
|
|
6
|
+
}, SerializedDecoratorBlockNode>;
|
|
7
|
+
export declare class FigmaNode extends DecoratorBlockNode {
|
|
8
|
+
__id: string;
|
|
9
|
+
static getType(): string;
|
|
10
|
+
static clone(node: FigmaNode): FigmaNode;
|
|
11
|
+
static importJSON(serializedNode: SerializedFigmaNode): FigmaNode;
|
|
12
|
+
exportJSON(): SerializedFigmaNode;
|
|
13
|
+
constructor(id: string, format?: ElementFormatType, key?: NodeKey);
|
|
14
|
+
updateDOM(): false;
|
|
15
|
+
getId(): string;
|
|
16
|
+
getTextContent(_includeInert?: boolean | undefined, _includeDirectionless?: false | undefined): string;
|
|
17
|
+
decorate(_editor: LexicalEditor, config: EditorConfig): JSX.Element;
|
|
18
|
+
}
|
|
19
|
+
export declare function $createFigmaNode(documentID: string): FigmaNode;
|
|
20
|
+
export declare function $isFigmaNode(node: FigmaNode | LexicalNode | null | undefined): node is FigmaNode;
|
|
21
|
+
//# sourceMappingURL=ServerFigmaNode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ServerFigmaNode.d.ts","sourceRoot":"","sources":["../../../src/nodes/FigmaNode/ServerFigmaNode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,OAAO,EACP,MAAM,EACP,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAGjC,OAAO,EACL,kBAAkB,EAClB,4BAA4B,EAC7B,MAAM,0CAA0C,CAAC;AAmClD,MAAM,MAAM,mBAAmB,GAAG,MAAM,CACtC;IACE,UAAU,EAAE,MAAM,CAAC;CACpB,EACD,4BAA4B,CAC7B,CAAC;AAEF,qBAAa,SAAU,SAAQ,kBAAkB;IAC/C,IAAI,EAAE,MAAM,CAAC;IAEb,MAAM,CAAC,OAAO,IAAI,MAAM;IAIxB,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS;IAIxC,MAAM,CAAC,UAAU,CAAC,cAAc,EAAE,mBAAmB,GAAG,SAAS;IAMjE,UAAU,IAAI,mBAAmB;gBAOrB,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,iBAAiB,EAAE,GAAG,CAAC,EAAE,OAAO;IAKjE,SAAS,IAAI,KAAK;IAIlB,KAAK,IAAI,MAAM;IAIf,cAAc,CACZ,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,EACnC,qBAAqB,CAAC,EAAE,KAAK,GAAG,SAAS,GACxC,MAAM;IAIT,QAAQ,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO;CAepE;AAED,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAE9D;AAED,wBAAgB,YAAY,CAC1B,IAAI,EAAE,SAAS,GAAG,WAAW,GAAG,IAAI,GAAG,SAAS,GAC/C,IAAI,IAAI,SAAS,CAEnB"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ServerBlockWithAlignableContents as BlockWithAlignableContents } from "../../utils/ServerBlockWithAlignableContents";
|
|
3
|
+
import { DecoratorBlockNode, } from "@lexical/react/LexicalDecoratorBlockNode";
|
|
4
|
+
function FigmaComponent({ className, format, nodeKey, documentID, }) {
|
|
5
|
+
return (_jsx(BlockWithAlignableContents, { className: className, format: format, nodeKey: nodeKey, children: _jsx("iframe", { width: "560", height: "315", src: `https://www.figma.com/embed?embed_host=lexical&url=\
|
|
6
|
+
https://www.figma.com/file/${documentID}`, allowFullScreen: true }) }));
|
|
7
|
+
}
|
|
8
|
+
export class FigmaNode extends DecoratorBlockNode {
|
|
9
|
+
static getType() {
|
|
10
|
+
return "figma";
|
|
11
|
+
}
|
|
12
|
+
static clone(node) {
|
|
13
|
+
return new FigmaNode(node.__id, node.__format, node.__key);
|
|
14
|
+
}
|
|
15
|
+
static importJSON(serializedNode) {
|
|
16
|
+
return $createFigmaNode(serializedNode.documentID).updateFromJSON(serializedNode);
|
|
17
|
+
}
|
|
18
|
+
exportJSON() {
|
|
19
|
+
return Object.assign(Object.assign({}, super.exportJSON()), { documentID: this.__id });
|
|
20
|
+
}
|
|
21
|
+
constructor(id, format, key) {
|
|
22
|
+
super(format, key);
|
|
23
|
+
this.__id = id;
|
|
24
|
+
}
|
|
25
|
+
updateDOM() {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
getId() {
|
|
29
|
+
return this.__id;
|
|
30
|
+
}
|
|
31
|
+
getTextContent(_includeInert, _includeDirectionless) {
|
|
32
|
+
return `https://www.figma.com/file/${this.__id}`;
|
|
33
|
+
}
|
|
34
|
+
decorate(_editor, config) {
|
|
35
|
+
const embedBlockTheme = config.theme.embedBlock || {};
|
|
36
|
+
const className = {
|
|
37
|
+
base: embedBlockTheme.base || "",
|
|
38
|
+
focus: embedBlockTheme.focus || "",
|
|
39
|
+
};
|
|
40
|
+
return (_jsx(FigmaComponent, { className: className, format: this.__format, nodeKey: this.getKey(), documentID: this.__id }));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
export function $createFigmaNode(documentID) {
|
|
44
|
+
return new FigmaNode(documentID);
|
|
45
|
+
}
|
|
46
|
+
export function $isFigmaNode(node) {
|
|
47
|
+
return node instanceof FigmaNode;
|
|
48
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageComponent.d.ts","sourceRoot":"","sources":["../../src/nodes/ImageComponent.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACtE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"ImageComponent.d.ts","sourceRoot":"","sources":["../../src/nodes/ImageComponent.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACtE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,iBAAiB,CAAC;AAkDzB,eAAO,MAAM,yBAAyB,EAAE,cAAc,CAAC,UAAU,CACrB,CAAC;AA2J7C,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,GAAG,EACH,OAAO,EACP,OAAO,EACP,KAAK,EACL,MAAM,EACN,QAAQ,EACR,SAAS,EACT,WAAW,EACX,OAAO,EACP,eAAe,GAChB,EAAE;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,aAAa,CAAC;IACvB,MAAM,EAAE,SAAS,GAAG,MAAM,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,SAAS,GAAG,MAAM,CAAC;IAC1B,eAAe,EAAE,OAAO,CAAC;CAC1B,GAAG,GAAG,CAAC,OAAO,CA0Qd"}
|
|
@@ -14,7 +14,6 @@ import brokenImage from "../images/image-broken.svg";
|
|
|
14
14
|
import EmojisPlugin from "../plugins/EmojisPlugin";
|
|
15
15
|
import KeywordsPlugin from "../plugins/KeywordsPlugin";
|
|
16
16
|
import LinkPlugin from "../plugins/LinkPlugin";
|
|
17
|
-
import MentionsPlugin from "../plugins/MentionsPlugin";
|
|
18
17
|
import ContentEditable from "../ui/ContentEditable";
|
|
19
18
|
import ImageResizer from "../ui/ImageResizer";
|
|
20
19
|
import { $isCaptionEditorEmpty, $isImageNode } from "./ImageNode";
|
|
@@ -250,5 +249,5 @@ export default function ImageComponent({ src, altText, nodeKey, width, height, m
|
|
|
250
249
|
const isFocused = (isSelected || isResizing) && isEditable;
|
|
251
250
|
return (_jsx(Suspense, { fallback: null, children: _jsxs(_Fragment, { children: [_jsx("div", { draggable: draggable, children: isLoadError ? (_jsx(BrokenImage, {})) : (_jsx(LazyImage, { className: isFocused
|
|
252
251
|
? `focused ${isInNodeSelection ? "draggable" : ""}`
|
|
253
|
-
: null, src: src, altText: altText, imageRef: imageRef, width: width, height: height, maxWidth: maxWidth, onError: () => setIsLoadError(true) })) }), showCaption && (_jsx("div", { className: "image-caption-container", children: _jsxs(LexicalNestedComposer, { initialEditor: caption, children: [_jsx(DisableCaptionOnBlur, { setShowCaption: setShowCaption }), _jsx(
|
|
252
|
+
: null, src: src, altText: altText, imageRef: imageRef, width: width, height: height, maxWidth: maxWidth, onError: () => setIsLoadError(true) })) }), showCaption && (_jsx("div", { className: "image-caption-container", children: _jsxs(LexicalNestedComposer, { initialEditor: caption, children: [_jsx(DisableCaptionOnBlur, { setShowCaption: setShowCaption }), _jsx(LinkPlugin, {}), _jsx(EmojisPlugin, {}), _jsx(HashtagPlugin, {}), _jsx(KeywordsPlugin, {}), _jsx(RichTextPlugin, { contentEditable: _jsx(ContentEditable, { placeholder: "Enter a caption...", placeholderClassName: "ImageNode__placeholder", className: "ImageNode__contentEditable" }), ErrorBoundary: LexicalErrorBoundary })] }) })), resizable && isInNodeSelection && isFocused && (_jsx(ImageResizer, { showCaption: showCaption, setShowCaption: setShowCaption, editor: editor, buttonRef: buttonRef, imageRef: imageRef, maxWidth: maxWidth, onResizeStart: onResizeStart, onResizeEnd: onResizeEnd, captionsEnabled: !isLoadError && captionsEnabled }))] }) }));
|
|
254
253
|
}
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import type { DOMConversionMap, DOMExportOutput, EditorConfig, LexicalEditor, LexicalNode, LexicalUpdateJSON, NodeKey, SerializedEditor, SerializedLexicalNode, Spread } from
|
|
9
|
-
import type { JSX } from
|
|
10
|
-
import { DecoratorNode } from
|
|
8
|
+
import type { DOMConversionMap, DOMExportOutput, EditorConfig, LexicalEditor, LexicalNode, LexicalUpdateJSON, NodeKey, SerializedEditor, SerializedLexicalNode, Spread } from "lexical";
|
|
9
|
+
import type { JSX } from "react";
|
|
10
|
+
import { DecoratorNode } from "lexical";
|
|
11
11
|
export interface ImagePayload {
|
|
12
12
|
altText: string;
|
|
13
13
|
caption?: LexicalEditor;
|
|
@@ -32,8 +32,8 @@ export type SerializedImageNode = Spread<{
|
|
|
32
32
|
export declare class ImageNode extends DecoratorNode<JSX.Element> {
|
|
33
33
|
__src: string;
|
|
34
34
|
__altText: string;
|
|
35
|
-
__width:
|
|
36
|
-
__height:
|
|
35
|
+
__width: "inherit" | number;
|
|
36
|
+
__height: "inherit" | number;
|
|
37
37
|
__maxWidth: number;
|
|
38
38
|
__showCaption: boolean;
|
|
39
39
|
__caption: LexicalEditor;
|
|
@@ -44,9 +44,9 @@ export declare class ImageNode extends DecoratorNode<JSX.Element> {
|
|
|
44
44
|
updateFromJSON(serializedNode: LexicalUpdateJSON<SerializedImageNode>): this;
|
|
45
45
|
exportDOM(): DOMExportOutput;
|
|
46
46
|
static importDOM(): DOMConversionMap | null;
|
|
47
|
-
constructor(src: string, altText: string, maxWidth: number, width?:
|
|
47
|
+
constructor(src: string, altText: string, maxWidth: number, width?: "inherit" | number, height?: "inherit" | number, showCaption?: boolean, caption?: LexicalEditor, captionsEnabled?: boolean, key?: NodeKey);
|
|
48
48
|
exportJSON(): SerializedImageNode;
|
|
49
|
-
setWidthAndHeight(width:
|
|
49
|
+
setWidthAndHeight(width: "inherit" | number, height: "inherit" | number): void;
|
|
50
50
|
setShowCaption(showCaption: boolean): void;
|
|
51
51
|
createDOM(config: EditorConfig): HTMLElement;
|
|
52
52
|
updateDOM(): false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageNode.d.ts","sourceRoot":"","sources":["../../src/nodes/ImageNode.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,gBAAgB,EAEhB,eAAe,EACf,YAAY,EACZ,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,OAAO,EAEP,gBAAgB,EAChB,qBAAqB,EACrB,MAAM,EACP,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"ImageNode.d.ts","sourceRoot":"","sources":["../../src/nodes/ImageNode.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,gBAAgB,EAEhB,eAAe,EACf,YAAY,EACZ,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,OAAO,EAEP,gBAAgB,EAChB,qBAAqB,EACrB,MAAM,EACP,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAMjC,OAAO,EAYL,aAAa,EAMd,MAAM,SAAS,CAAC;AAQjB,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAsBD,wBAAgB,qBAAqB,IAAI,OAAO,CAW/C;AAED,MAAM,MAAM,mBAAmB,GAAG,MAAM,CACtC;IACE,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,gBAAgB,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,EACD,qBAAqB,CACtB,CAAC;AAEF,qBAAa,SAAU,SAAQ,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,SAAS,GAAG,MAAM,CAAC;IAC5B,QAAQ,EAAE,SAAS,GAAG,MAAM,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,aAAa,CAAC;IAEzB,iBAAiB,EAAE,OAAO,CAAC;IAE3B,MAAM,CAAC,OAAO,IAAI,MAAM;IAIxB,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS;IAcxC,MAAM,CAAC,UAAU,CAAC,cAAc,EAAE,mBAAmB,GAAG,SAAS;IAajE,cAAc,CAAC,cAAc,EAAE,iBAAiB,CAAC,mBAAmB,CAAC,GAAG,IAAI;IAY5E,SAAS,IAAI,eAAe;IA6C5B,MAAM,CAAC,SAAS,IAAI,gBAAgB,GAAG,IAAI;gBA4CzC,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,KAAK,CAAC,EAAE,SAAS,GAAG,MAAM,EAC1B,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,EAC3B,WAAW,CAAC,EAAE,OAAO,EACrB,OAAO,CAAC,EAAE,aAAa,EACvB,eAAe,CAAC,EAAE,OAAO,EACzB,GAAG,CAAC,EAAE,OAAO;IA2Bf,UAAU,IAAI,mBAAmB;IAajC,iBAAiB,CACf,KAAK,EAAE,SAAS,GAAG,MAAM,EACzB,MAAM,EAAE,SAAS,GAAG,MAAM,GACzB,IAAI;IAMP,cAAc,CAAC,WAAW,EAAE,OAAO,GAAG,IAAI;IAO1C,SAAS,CAAC,MAAM,EAAE,YAAY,GAAG,WAAW;IAU5C,SAAS,IAAI,KAAK;IAIlB,MAAM,IAAI,MAAM;IAIhB,UAAU,IAAI,MAAM;IAIpB,QAAQ,IAAI,GAAG,CAAC,OAAO;CAgBxB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,MAAM,EACN,QAAc,EACd,eAAe,EACf,GAAG,EACH,KAAK,EACL,WAAW,EACX,OAAO,EACP,GAAG,GACJ,EAAE,YAAY,GAAG,SAAS,CAc1B;AAED,wBAAgB,YAAY,CAC1B,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GACnC,IAAI,IAAI,SAAS,CAEnB"}
|
package/build/nodes/ImageNode.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { $insertGeneratedNodes } from
|
|
3
|
-
import { HashtagNode } from
|
|
4
|
-
import { $generateHtmlFromNodes, $generateNodesFromDOM } from
|
|
5
|
-
import { LinkNode } from
|
|
6
|
-
import { $applyNodeReplacement, $createRangeSelection, $extendCaretToRange, $getChildCaret, $getEditor, $getRoot, $isElementNode, $isParagraphNode, $selectAll, $setSelection, createEditor, DecoratorNode, LineBreakNode, ParagraphNode, RootNode, SKIP_DOM_SELECTION_TAG, TextNode, } from
|
|
7
|
-
import * as React from
|
|
8
|
-
import { EmojiNode } from
|
|
9
|
-
import { KeywordNode } from
|
|
10
|
-
const ImageComponent = React.lazy(() => import(
|
|
2
|
+
import { $insertGeneratedNodes } from "@lexical/clipboard";
|
|
3
|
+
import { HashtagNode } from "@lexical/hashtag";
|
|
4
|
+
import { $generateHtmlFromNodes, $generateNodesFromDOM } from "@lexical/html";
|
|
5
|
+
import { LinkNode } from "@lexical/link";
|
|
6
|
+
import { $applyNodeReplacement, $createRangeSelection, $extendCaretToRange, $getChildCaret, $getEditor, $getRoot, $isElementNode, $isParagraphNode, $selectAll, $setSelection, createEditor, DecoratorNode, LineBreakNode, ParagraphNode, RootNode, SKIP_DOM_SELECTION_TAG, TextNode, } from "lexical";
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { EmojiNode } from "./EmojiNode";
|
|
9
|
+
import { KeywordNode } from "./KeywordNode";
|
|
10
|
+
const ImageComponent = React.lazy(() => import("./ImageComponent"));
|
|
11
11
|
function isGoogleDocCheckboxImg(img) {
|
|
12
12
|
return (img.parentElement != null &&
|
|
13
|
-
img.parentElement.tagName ===
|
|
13
|
+
img.parentElement.tagName === "LI" &&
|
|
14
14
|
img.previousSibling === null &&
|
|
15
|
-
img.getAttribute(
|
|
15
|
+
img.getAttribute("aria-roledescription") === "checkbox");
|
|
16
16
|
}
|
|
17
17
|
function $convertImageElement(domNode) {
|
|
18
18
|
const img = domNode;
|
|
19
|
-
const src = img.getAttribute(
|
|
20
|
-
if (!src || src.startsWith(
|
|
19
|
+
const src = img.getAttribute("src");
|
|
20
|
+
if (!src || src.startsWith("file:///") || isGoogleDocCheckboxImg(img)) {
|
|
21
21
|
return null;
|
|
22
22
|
}
|
|
23
23
|
const { alt: altText, width, height } = img;
|
|
@@ -27,7 +27,7 @@ function $convertImageElement(domNode) {
|
|
|
27
27
|
export function $isCaptionEditorEmpty() {
|
|
28
28
|
// Search the document for any non-element node
|
|
29
29
|
// to determine if it's empty or not
|
|
30
|
-
for (const { origin } of $extendCaretToRange($getChildCaret($getRoot(),
|
|
30
|
+
for (const { origin } of $extendCaretToRange($getChildCaret($getRoot(), "next"))) {
|
|
31
31
|
if (!$isElementNode(origin)) {
|
|
32
32
|
return false;
|
|
33
33
|
}
|
|
@@ -36,7 +36,7 @@ export function $isCaptionEditorEmpty() {
|
|
|
36
36
|
}
|
|
37
37
|
export class ImageNode extends DecoratorNode {
|
|
38
38
|
static getType() {
|
|
39
|
-
return
|
|
39
|
+
return "image";
|
|
40
40
|
}
|
|
41
41
|
static clone(node) {
|
|
42
42
|
return new ImageNode(node.__src, node.__altText, node.__maxWidth, node.__width, node.__height, node.__showCaption, node.__caption, node.__captionsEnabled, node.__key);
|
|
@@ -63,11 +63,11 @@ export class ImageNode extends DecoratorNode {
|
|
|
63
63
|
return node;
|
|
64
64
|
}
|
|
65
65
|
exportDOM() {
|
|
66
|
-
const imgElement = document.createElement(
|
|
67
|
-
imgElement.setAttribute(
|
|
68
|
-
imgElement.setAttribute(
|
|
69
|
-
imgElement.setAttribute(
|
|
70
|
-
imgElement.setAttribute(
|
|
66
|
+
const imgElement = document.createElement("img");
|
|
67
|
+
imgElement.setAttribute("src", this.__src);
|
|
68
|
+
imgElement.setAttribute("alt", this.__altText);
|
|
69
|
+
imgElement.setAttribute("width", this.__width.toString());
|
|
70
|
+
imgElement.setAttribute("height", this.__height.toString());
|
|
71
71
|
if (this.__showCaption && this.__caption) {
|
|
72
72
|
const captionEditor = this.__caption;
|
|
73
73
|
const captionHtml = captionEditor.read(() => {
|
|
@@ -80,14 +80,14 @@ export class ImageNode extends DecoratorNode {
|
|
|
80
80
|
if ($isParagraphNode(firstChild) &&
|
|
81
81
|
firstChild.getNextSibling() === null) {
|
|
82
82
|
selection = $createRangeSelection();
|
|
83
|
-
selection.anchor.set(firstChild.getKey(), 0,
|
|
84
|
-
selection.focus.set(firstChild.getKey(), firstChild.getChildrenSize(),
|
|
83
|
+
selection.anchor.set(firstChild.getKey(), 0, "element");
|
|
84
|
+
selection.focus.set(firstChild.getKey(), firstChild.getChildrenSize(), "element");
|
|
85
85
|
}
|
|
86
86
|
return $generateHtmlFromNodes(captionEditor, selection);
|
|
87
87
|
});
|
|
88
88
|
if (captionHtml) {
|
|
89
|
-
const figureElement = document.createElement(
|
|
90
|
-
const figcaptionElement = document.createElement(
|
|
89
|
+
const figureElement = document.createElement("figure");
|
|
90
|
+
const figcaptionElement = document.createElement("figcaption");
|
|
91
91
|
figcaptionElement.innerHTML = captionHtml;
|
|
92
92
|
figureElement.appendChild(imgElement);
|
|
93
93
|
figureElement.appendChild(figcaptionElement);
|
|
@@ -107,7 +107,7 @@ export class ImageNode extends DecoratorNode {
|
|
|
107
107
|
return {
|
|
108
108
|
after: (childNodes) => {
|
|
109
109
|
const imageNodes = childNodes.filter($isImageNode);
|
|
110
|
-
const figcaption = node.querySelector(
|
|
110
|
+
const figcaption = node.querySelector("figcaption");
|
|
111
111
|
if (figcaption) {
|
|
112
112
|
for (const imgNode of imageNodes) {
|
|
113
113
|
imgNode.setShowCaption(true);
|
|
@@ -136,13 +136,13 @@ export class ImageNode extends DecoratorNode {
|
|
|
136
136
|
this.__src = src;
|
|
137
137
|
this.__altText = altText;
|
|
138
138
|
this.__maxWidth = maxWidth;
|
|
139
|
-
this.__width = width ||
|
|
140
|
-
this.__height = height ||
|
|
139
|
+
this.__width = width || "inherit";
|
|
140
|
+
this.__height = height || "inherit";
|
|
141
141
|
this.__showCaption = showCaption || false;
|
|
142
142
|
this.__caption =
|
|
143
143
|
caption ||
|
|
144
144
|
createEditor({
|
|
145
|
-
namespace:
|
|
145
|
+
namespace: "Playground/ImageNodeCaption",
|
|
146
146
|
nodes: [
|
|
147
147
|
RootNode,
|
|
148
148
|
TextNode,
|
|
@@ -157,7 +157,7 @@ export class ImageNode extends DecoratorNode {
|
|
|
157
157
|
this.__captionsEnabled = captionsEnabled || captionsEnabled === undefined;
|
|
158
158
|
}
|
|
159
159
|
exportJSON() {
|
|
160
|
-
return Object.assign(Object.assign({}, super.exportJSON()), { altText: this.getAltText(), caption: this.__caption.toJSON(), height: this.__height ===
|
|
160
|
+
return Object.assign(Object.assign({}, super.exportJSON()), { altText: this.getAltText(), caption: this.__caption.toJSON(), height: this.__height === "inherit" ? 0 : this.__height, maxWidth: this.__maxWidth, showCaption: this.__showCaption, src: this.getSrc(), width: this.__width === "inherit" ? 0 : this.__width });
|
|
161
161
|
}
|
|
162
162
|
setWidthAndHeight(width, height) {
|
|
163
163
|
const writable = this.getWritable();
|
|
@@ -170,7 +170,7 @@ export class ImageNode extends DecoratorNode {
|
|
|
170
170
|
}
|
|
171
171
|
// View
|
|
172
172
|
createDOM(config) {
|
|
173
|
-
const span = document.createElement(
|
|
173
|
+
const span = document.createElement("span");
|
|
174
174
|
const theme = config.theme;
|
|
175
175
|
const className = theme.image;
|
|
176
176
|
if (className !== undefined) {
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import type { DOMConversionMap, DOMExportOutput, EditorConfig, LexicalNode, LexicalUpdateJSON, NodeKey, SerializedElementNode, Spread } from
|
|
9
|
-
import { ElementNode } from
|
|
8
|
+
import type { DOMConversionMap, DOMExportOutput, EditorConfig, LexicalNode, LexicalUpdateJSON, NodeKey, SerializedElementNode, Spread } from "lexical";
|
|
9
|
+
import { ElementNode } from "lexical";
|
|
10
10
|
export type SerializedLayoutContainerNode = Spread<{
|
|
11
11
|
templateColumns: string;
|
|
12
12
|
}, SerializedElementNode>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutContainerNode.d.ts","sourceRoot":"","sources":["../../src/nodes/LayoutContainerNode.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,gBAAgB,EAEhB,eAAe,EACf,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,OAAO,EACP,qBAAqB,EACrB,MAAM,EACP,MAAM,SAAS,CAAC;AAGjB,OAAO,
|
|
1
|
+
{"version":3,"file":"LayoutContainerNode.d.ts","sourceRoot":"","sources":["../../src/nodes/LayoutContainerNode.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,gBAAgB,EAEhB,eAAe,EACf,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,OAAO,EACP,qBAAqB,EACrB,MAAM,EACP,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,MAAM,MAAM,6BAA6B,GAAG,MAAM,CAChD;IACE,eAAe,EAAE,MAAM,CAAC;CACzB,EACD,qBAAqB,CACtB,CAAC;AAgBF,qBAAa,mBAAoB,SAAQ,WAAW;IAClD,iBAAiB,EAAE,MAAM,CAAC;gBAEd,eAAe,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO;IAKlD,MAAM,CAAC,OAAO,IAAI,MAAM;IAIxB,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,mBAAmB,GAAG,mBAAmB;IAI5D,SAAS,CAAC,MAAM,EAAE,YAAY,GAAG,WAAW;IAS5C,SAAS,IAAI,eAAe;IAO5B,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,WAAW,GAAG,OAAO;IAOpD,MAAM,CAAC,SAAS,IAAI,gBAAgB,GAAG,IAAI;IAc3C,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,6BAA6B,GAAG,mBAAmB;IAI3E,cAAc,CACZ,cAAc,EAAE,iBAAiB,CAAC,6BAA6B,CAAC,GAC/D,IAAI;IAMP,YAAY,IAAI,OAAO;IAIvB,UAAU,IAAI,OAAO;IAIrB,UAAU,IAAI,6BAA6B;IAO3C,kBAAkB,IAAI,MAAM;IAI5B,kBAAkB,CAAC,eAAe,EAAE,MAAM,GAAG,IAAI;CAKlD;AAED,wBAAgB,0BAA0B,CACxC,eAAe,GAAE,MAAW,GAC3B,mBAAmB,CAErB;AAED,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GACnC,IAAI,IAAI,mBAAmB,CAE7B"}
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import { addClassNamesToElement } from
|
|
9
|
-
import { ElementNode } from
|
|
8
|
+
import { addClassNamesToElement } from "@lexical/utils";
|
|
9
|
+
import { ElementNode } from "lexical";
|
|
10
10
|
function $convertLayoutContainerElement(domNode) {
|
|
11
11
|
const styleAttributes = window.getComputedStyle(domNode);
|
|
12
|
-
const templateColumns = styleAttributes.getPropertyValue(
|
|
12
|
+
const templateColumns = styleAttributes.getPropertyValue("grid-template-columns");
|
|
13
13
|
if (templateColumns) {
|
|
14
14
|
const node = $createLayoutContainerNode(templateColumns);
|
|
15
15
|
return { node };
|
|
@@ -22,23 +22,23 @@ export class LayoutContainerNode extends ElementNode {
|
|
|
22
22
|
this.__templateColumns = templateColumns;
|
|
23
23
|
}
|
|
24
24
|
static getType() {
|
|
25
|
-
return
|
|
25
|
+
return "layout-container";
|
|
26
26
|
}
|
|
27
27
|
static clone(node) {
|
|
28
28
|
return new LayoutContainerNode(node.__templateColumns, node.__key);
|
|
29
29
|
}
|
|
30
30
|
createDOM(config) {
|
|
31
|
-
const dom = document.createElement(
|
|
31
|
+
const dom = document.createElement("div");
|
|
32
32
|
dom.style.gridTemplateColumns = this.__templateColumns;
|
|
33
|
-
if (typeof config.theme.layoutContainer ===
|
|
33
|
+
if (typeof config.theme.layoutContainer === "string") {
|
|
34
34
|
addClassNamesToElement(dom, config.theme.layoutContainer);
|
|
35
35
|
}
|
|
36
36
|
return dom;
|
|
37
37
|
}
|
|
38
38
|
exportDOM() {
|
|
39
|
-
const element = document.createElement(
|
|
39
|
+
const element = document.createElement("div");
|
|
40
40
|
element.style.gridTemplateColumns = this.__templateColumns;
|
|
41
|
-
element.setAttribute(
|
|
41
|
+
element.setAttribute("data-lexical-layout-container", "true");
|
|
42
42
|
return { element };
|
|
43
43
|
}
|
|
44
44
|
updateDOM(prevNode, dom) {
|
|
@@ -50,7 +50,7 @@ export class LayoutContainerNode extends ElementNode {
|
|
|
50
50
|
static importDOM() {
|
|
51
51
|
return {
|
|
52
52
|
div: (domNode) => {
|
|
53
|
-
if (!domNode.hasAttribute(
|
|
53
|
+
if (!domNode.hasAttribute("data-lexical-layout-container")) {
|
|
54
54
|
return null;
|
|
55
55
|
}
|
|
56
56
|
return {
|
|
@@ -86,7 +86,7 @@ export class LayoutContainerNode extends ElementNode {
|
|
|
86
86
|
return self;
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
export function $createLayoutContainerNode(templateColumns =
|
|
89
|
+
export function $createLayoutContainerNode(templateColumns = "") {
|
|
90
90
|
return new LayoutContainerNode(templateColumns);
|
|
91
91
|
}
|
|
92
92
|
export function $isLayoutContainerNode(node) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlaygroundNodes.d.ts","sourceRoot":"","sources":["../../../src/nodes/PlaygroundNodes/PlaygroundNodes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAgClD,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CA+B9C,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -5,32 +5,32 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
8
|
+
import { CodeNode } from "../CodeNode/CodeNode";
|
|
9
|
+
import { CodeHighlightNode } from "../CodeNode/CodeHighlightNode";
|
|
10
|
+
// import { CodeNode, CodeHighlightNode } from "@lexical/code";
|
|
9
11
|
import { HashtagNode } from "@lexical/hashtag";
|
|
10
12
|
import { AutoLinkNode, LinkNode } from "@lexical/link";
|
|
11
13
|
import { ListItemNode, ListNode } from "@lexical/list";
|
|
12
14
|
import { MarkNode } from "@lexical/mark";
|
|
13
15
|
import { OverflowNode } from "@lexical/overflow";
|
|
14
|
-
import { HorizontalRuleNode } from "@lexical/
|
|
16
|
+
import { HorizontalRuleNode } from "@lexical/extension";
|
|
15
17
|
import { HeadingNode, QuoteNode } from "@lexical/rich-text";
|
|
16
18
|
import { TableCellNode, TableNode, TableRowNode } from "@lexical/table";
|
|
17
|
-
import { CollapsibleContainerNode } from "
|
|
18
|
-
import { CollapsibleContentNode } from "
|
|
19
|
-
import { CollapsibleTitleNode } from "
|
|
20
|
-
import { DateTimeNode } from "
|
|
21
|
-
import { EmojiNode } from "
|
|
22
|
-
import { EquationNode } from "
|
|
23
|
-
import { FigmaNode } from "
|
|
24
|
-
import { ImageNode } from "
|
|
25
|
-
import { KeywordNode } from "
|
|
26
|
-
import { LayoutContainerNode } from "
|
|
27
|
-
import { LayoutItemNode } from "
|
|
28
|
-
import { MentionNode } from "
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import { TweetNode } from "./TweetNode";
|
|
33
|
-
import { YouTubeNode } from "./YouTubeNode";
|
|
19
|
+
import { CollapsibleContainerNode } from "../../plugins/CollapsiblePlugin/CollapsibleContainerNode";
|
|
20
|
+
import { CollapsibleContentNode } from "../../plugins/CollapsiblePlugin/CollapsibleContentNode";
|
|
21
|
+
import { CollapsibleTitleNode } from "../../plugins/CollapsiblePlugin/CollapsibleTitleNode";
|
|
22
|
+
import { DateTimeNode } from "../DateTimeNode/DateTimeNode";
|
|
23
|
+
import { EmojiNode } from "../EmojiNode";
|
|
24
|
+
import { EquationNode } from "../EquationNode";
|
|
25
|
+
import { FigmaNode } from "../FigmaNode/FigmaNode";
|
|
26
|
+
import { ImageNode } from "../ImageNode";
|
|
27
|
+
import { KeywordNode } from "../KeywordNode";
|
|
28
|
+
import { LayoutContainerNode } from "../LayoutContainerNode";
|
|
29
|
+
import { LayoutItemNode } from "../LayoutItemNode";
|
|
30
|
+
import { MentionNode } from "../MentionNode";
|
|
31
|
+
import { SpecialTextNode } from "../SpecialTextNode";
|
|
32
|
+
import { TweetNode } from "../TweetNode/TweetNode";
|
|
33
|
+
import { YouTubeNode } from "../YouTubeNode/YouTubeNode";
|
|
34
34
|
const PlaygroundNodes = [
|
|
35
35
|
HeadingNode,
|
|
36
36
|
ListNode,
|
|
@@ -45,7 +45,6 @@ const PlaygroundNodes = [
|
|
|
45
45
|
AutoLinkNode,
|
|
46
46
|
LinkNode,
|
|
47
47
|
OverflowNode,
|
|
48
|
-
PollNode,
|
|
49
48
|
ImageNode,
|
|
50
49
|
MentionNode,
|
|
51
50
|
EmojiNode,
|
|
@@ -59,7 +58,6 @@ const PlaygroundNodes = [
|
|
|
59
58
|
CollapsibleContainerNode,
|
|
60
59
|
CollapsibleContentNode,
|
|
61
60
|
CollapsibleTitleNode,
|
|
62
|
-
PageBreakNode,
|
|
63
61
|
LayoutContainerNode,
|
|
64
62
|
LayoutItemNode,
|
|
65
63
|
SpecialTextNode,
|
|
@@ -0,0 +1,11 @@
|
|
|
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 { Klass, LexicalNode } from "lexical";
|
|
9
|
+
declare const ServerPlaygroundNodes: Array<Klass<LexicalNode>>;
|
|
10
|
+
export default ServerPlaygroundNodes;
|
|
11
|
+
//# sourceMappingURL=ServerPlaygroundNodes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ServerPlaygroundNodes.d.ts","sourceRoot":"","sources":["../../../src/nodes/PlaygroundNodes/ServerPlaygroundNodes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AA8BlD,QAAA,MAAM,qBAAqB,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CA+BpD,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
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 { HashtagNode } from "@lexical/hashtag";
|
|
9
|
+
import { AutoLinkNode, LinkNode } from "@lexical/link";
|
|
10
|
+
import { ListItemNode, ListNode } from "@lexical/list";
|
|
11
|
+
import { MarkNode } from "@lexical/mark";
|
|
12
|
+
import { OverflowNode } from "@lexical/overflow";
|
|
13
|
+
import { HorizontalRuleNode } from "@lexical/extension";
|
|
14
|
+
import { HeadingNode, QuoteNode } from "@lexical/rich-text";
|
|
15
|
+
import { TableCellNode, TableNode, TableRowNode } from "@lexical/table";
|
|
16
|
+
import { CollapsibleContainerNode } from "../../plugins/CollapsiblePlugin/CollapsibleContainerNode";
|
|
17
|
+
import { CollapsibleContentNode } from "../../plugins/CollapsiblePlugin/CollapsibleContentNode";
|
|
18
|
+
import { CollapsibleTitleNode } from "../../plugins/CollapsiblePlugin/CollapsibleTitleNode";
|
|
19
|
+
import { DateTimeNode } from "../DateTimeNode/DateTimeNode";
|
|
20
|
+
import { EmojiNode } from "../EmojiNode";
|
|
21
|
+
import { EquationNode } from "../EquationNode";
|
|
22
|
+
import { ImageNode } from "../ImageNode";
|
|
23
|
+
import { KeywordNode } from "../KeywordNode";
|
|
24
|
+
import { LayoutContainerNode } from "../LayoutContainerNode";
|
|
25
|
+
import { LayoutItemNode } from "../LayoutItemNode";
|
|
26
|
+
import { MentionNode } from "../MentionNode";
|
|
27
|
+
import { SpecialTextNode } from "../SpecialTextNode";
|
|
28
|
+
import { CodeNode } from "../CodeNode/CodeNode";
|
|
29
|
+
import { CodeHighlightNode } from "../CodeNode/CodeHighlightNode";
|
|
30
|
+
import { TweetNode } from "../TweetNode/ServerTweetNode";
|
|
31
|
+
import { YouTubeNode } from "../YouTubeNode/ServerYouTubeNode";
|
|
32
|
+
import { FigmaNode } from "../FigmaNode/ServerFigmaNode";
|
|
33
|
+
const ServerPlaygroundNodes = [
|
|
34
|
+
HeadingNode,
|
|
35
|
+
ListNode,
|
|
36
|
+
ListItemNode,
|
|
37
|
+
QuoteNode,
|
|
38
|
+
CodeNode,
|
|
39
|
+
TableNode,
|
|
40
|
+
TableCellNode,
|
|
41
|
+
TableRowNode,
|
|
42
|
+
HashtagNode,
|
|
43
|
+
CodeHighlightNode,
|
|
44
|
+
AutoLinkNode,
|
|
45
|
+
LinkNode,
|
|
46
|
+
OverflowNode,
|
|
47
|
+
ImageNode,
|
|
48
|
+
MentionNode,
|
|
49
|
+
EmojiNode,
|
|
50
|
+
EquationNode,
|
|
51
|
+
KeywordNode,
|
|
52
|
+
HorizontalRuleNode,
|
|
53
|
+
TweetNode,
|
|
54
|
+
YouTubeNode,
|
|
55
|
+
FigmaNode,
|
|
56
|
+
MarkNode,
|
|
57
|
+
CollapsibleContainerNode,
|
|
58
|
+
CollapsibleContentNode,
|
|
59
|
+
CollapsibleTitleNode,
|
|
60
|
+
LayoutContainerNode,
|
|
61
|
+
LayoutItemNode,
|
|
62
|
+
SpecialTextNode,
|
|
63
|
+
DateTimeNode,
|
|
64
|
+
];
|
|
65
|
+
export default ServerPlaygroundNodes;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { DOMConversionMap, DOMExportOutput, ElementFormatType, LexicalNode, NodeKey, Spread } from "lexical";
|
|
2
|
+
import { DecoratorBlockNode, SerializedDecoratorBlockNode } from "@lexical/react/LexicalDecoratorBlockNode";
|
|
3
|
+
export type SerializedTweetNode = Spread<{
|
|
4
|
+
id: string;
|
|
5
|
+
}, SerializedDecoratorBlockNode>;
|
|
6
|
+
export declare class TweetNode extends DecoratorBlockNode {
|
|
7
|
+
__id: string;
|
|
8
|
+
static getType(): string;
|
|
9
|
+
static clone(node: TweetNode): TweetNode;
|
|
10
|
+
static importJSON(serializedNode: SerializedTweetNode): TweetNode;
|
|
11
|
+
exportJSON(): SerializedTweetNode;
|
|
12
|
+
static importDOM(): DOMConversionMap<HTMLDivElement> | null;
|
|
13
|
+
exportDOM(): DOMExportOutput;
|
|
14
|
+
constructor(id: string, format?: ElementFormatType, key?: NodeKey);
|
|
15
|
+
getId(): string;
|
|
16
|
+
getTextContent(_includeInert?: boolean | undefined, _includeDirectionless?: false | undefined): string;
|
|
17
|
+
}
|
|
18
|
+
export declare function $createTweetNode(tweetID: string): TweetNode;
|
|
19
|
+
export declare function $isTweetNode(node: TweetNode | LexicalNode | null | undefined): node is TweetNode;
|
|
20
|
+
//# sourceMappingURL=ServerTweetNode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ServerTweetNode.d.ts","sourceRoot":"","sources":["../../../src/nodes/TweetNode/ServerTweetNode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAEhB,eAAe,EACf,iBAAiB,EACjB,WAAW,EACX,OAAO,EACP,MAAM,EACP,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,kBAAkB,EAClB,4BAA4B,EAC7B,MAAM,0CAA0C,CAAC;AAalD,MAAM,MAAM,mBAAmB,GAAG,MAAM,CACtC;IACE,EAAE,EAAE,MAAM,CAAC;CACZ,EACD,4BAA4B,CAC7B,CAAC;AAEF,qBAAa,SAAU,SAAQ,kBAAkB;IAC/C,IAAI,EAAE,MAAM,CAAC;IAEb,MAAM,CAAC,OAAO,IAAI,MAAM;IAIxB,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS;IAIxC,MAAM,CAAC,UAAU,CAAC,cAAc,EAAE,mBAAmB,GAAG,SAAS;IAIjE,UAAU,IAAI,mBAAmB;IAOjC,MAAM,CAAC,SAAS,IAAI,gBAAgB,CAAC,cAAc,CAAC,GAAG,IAAI;IAc3D,SAAS,IAAI,eAAe;gBAQhB,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,iBAAiB,EAAE,GAAG,CAAC,EAAE,OAAO;IAKjE,KAAK,IAAI,MAAM;IAIf,cAAc,CACZ,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,EACnC,qBAAqB,CAAC,EAAE,KAAK,GAAG,SAAS,GACxC,MAAM;CAGV;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAE3D;AAED,wBAAgB,YAAY,CAC1B,IAAI,EAAE,SAAS,GAAG,WAAW,GAAG,IAAI,GAAG,SAAS,GAC/C,IAAI,IAAI,SAAS,CAEnB"}
|