From 6a98a477436bf6bc6ac988a8473ec647f7eab38e Mon Sep 17 00:00:00 2001 From: Torleif Berger Date: Fri, 24 Jan 2025 21:46:45 +0100 Subject: [PATCH] [lexical-react] Bug Fix: Import `JSX` type from React to prevent "Cannot find namespace 'JSX'"-error when type-checking with React 19 (#7080) --- examples/react-plain-text/src/plugins/TreeViewPlugin.tsx | 2 ++ examples/react-rich-collab/src/plugins/TreeViewPlugin.tsx | 2 ++ examples/react-rich/src/plugins/TreeViewPlugin.tsx | 2 ++ examples/react-table/src/plugins/TreeViewPlugin.tsx | 2 ++ packages/lexical-devtools-core/src/TreeView.tsx | 1 + .../lexical-history/src/__tests__/unit/LexicalHistory.test.tsx | 2 ++ packages/lexical-playground/src/App.tsx | 2 ++ packages/lexical-playground/src/Editor.tsx | 2 ++ packages/lexical-playground/src/Settings.tsx | 2 ++ .../lexical-playground/src/context/FlashMessageContext.tsx | 2 ++ packages/lexical-playground/src/context/SettingsContext.tsx | 1 + .../lexical-playground/src/context/SharedHistoryContext.tsx | 1 + packages/lexical-playground/src/context/ToolbarContext.tsx | 3 +++ packages/lexical-playground/src/hooks/useModal.tsx | 2 ++ packages/lexical-playground/src/nodes/EquationComponent.tsx | 2 ++ packages/lexical-playground/src/nodes/EquationNode.tsx | 1 + .../src/nodes/ExcalidrawNode/ExcalidrawComponent.tsx | 1 + .../src/nodes/ExcalidrawNode/ExcalidrawImage.tsx | 2 ++ packages/lexical-playground/src/nodes/ExcalidrawNode/index.tsx | 1 + packages/lexical-playground/src/nodes/FigmaNode.tsx | 1 + packages/lexical-playground/src/nodes/ImageComponent.tsx | 1 + packages/lexical-playground/src/nodes/ImageNode.tsx | 1 + .../src/nodes/InlineImageNode/InlineImageComponent.tsx | 1 + .../src/nodes/InlineImageNode/InlineImageNode.tsx | 1 + packages/lexical-playground/src/nodes/PageBreakNode/index.tsx | 3 +++ packages/lexical-playground/src/nodes/PollComponent.tsx | 1 + packages/lexical-playground/src/nodes/PollNode.tsx | 2 ++ packages/lexical-playground/src/nodes/StickyComponent.tsx | 1 + packages/lexical-playground/src/nodes/StickyNode.tsx | 1 + packages/lexical-playground/src/nodes/TweetNode.tsx | 1 + packages/lexical-playground/src/nodes/YouTubeNode.tsx | 1 + .../lexical-playground/src/plugins/ActionsPlugin/index.tsx | 1 + .../lexical-playground/src/plugins/AutoEmbedPlugin/index.tsx | 1 + .../lexical-playground/src/plugins/AutoLinkPlugin/index.tsx | 2 ++ .../src/plugins/AutocompletePlugin/index.tsx | 1 + .../src/plugins/CodeActionMenuPlugin/index.tsx | 2 ++ .../src/plugins/CodeHighlightPlugin/index.ts | 2 ++ .../lexical-playground/src/plugins/CommentPlugin/index.tsx | 1 + .../src/plugins/ComponentPickerPlugin/index.tsx | 2 ++ .../lexical-playground/src/plugins/ContextMenuPlugin/index.tsx | 2 ++ packages/lexical-playground/src/plugins/DocsPlugin/index.tsx | 3 +++ .../src/plugins/DraggableBlockPlugin/index.tsx | 2 ++ packages/lexical-playground/src/plugins/EmojisPlugin/index.ts | 1 + .../lexical-playground/src/plugins/EquationsPlugin/index.tsx | 2 ++ .../lexical-playground/src/plugins/ExcalidrawPlugin/index.tsx | 1 + packages/lexical-playground/src/plugins/FigmaPlugin/index.tsx | 2 ++ .../src/plugins/FloatingLinkEditorPlugin/index.tsx | 2 ++ .../src/plugins/FloatingTextFormatToolbarPlugin/index.tsx | 2 ++ packages/lexical-playground/src/plugins/ImagesPlugin/index.tsx | 3 +++ .../lexical-playground/src/plugins/InlineImagePlugin/index.tsx | 1 + .../lexical-playground/src/plugins/KeywordsPlugin/index.ts | 1 + .../src/plugins/LayoutPlugin/InsertLayoutDialog.tsx | 3 +++ packages/lexical-playground/src/plugins/LinkPlugin/index.tsx | 2 ++ .../src/plugins/MarkdownShortcutPlugin/index.tsx | 2 ++ .../lexical-playground/src/plugins/MentionsPlugin/index.tsx | 2 ++ .../lexical-playground/src/plugins/PageBreakPlugin/index.tsx | 3 +++ .../lexical-playground/src/plugins/PasteLogPlugin/index.tsx | 2 ++ packages/lexical-playground/src/plugins/PollPlugin/index.tsx | 2 ++ .../lexical-playground/src/plugins/SpecialTextPlugin/index.ts | 1 + packages/lexical-playground/src/plugins/StickyPlugin/index.ts | 2 ++ .../src/plugins/TableActionMenuPlugin/index.tsx | 1 + .../lexical-playground/src/plugins/TableCellResizer/index.tsx | 1 + .../src/plugins/TableHoverActionsPlugin/index.tsx | 2 ++ .../src/plugins/TableOfContentsPlugin/index.tsx | 1 + packages/lexical-playground/src/plugins/TablePlugin.tsx | 2 ++ .../src/plugins/TestRecorderPlugin/index.tsx | 1 + .../lexical-playground/src/plugins/ToolbarPlugin/index.tsx | 2 ++ .../lexical-playground/src/plugins/TreeViewPlugin/index.tsx | 2 ++ packages/lexical-playground/src/plugins/TwitterPlugin/index.ts | 2 ++ .../lexical-playground/src/plugins/TypingPerfPlugin/index.ts | 2 ++ packages/lexical-playground/src/plugins/YouTubePlugin/index.ts | 2 ++ packages/lexical-playground/src/ui/Button.tsx | 2 ++ packages/lexical-playground/src/ui/ColorPicker.tsx | 2 ++ packages/lexical-playground/src/ui/ContentEditable.tsx | 2 ++ packages/lexical-playground/src/ui/Dialog.tsx | 2 ++ packages/lexical-playground/src/ui/DropDown.tsx | 2 ++ packages/lexical-playground/src/ui/EquationEditor.tsx | 2 +- packages/lexical-playground/src/ui/ExcalidrawModal.tsx | 2 ++ packages/lexical-playground/src/ui/FileInput.tsx | 2 ++ packages/lexical-playground/src/ui/FlashMessage.tsx | 2 ++ packages/lexical-playground/src/ui/ImageResizer.tsx | 1 + packages/lexical-playground/src/ui/KatexEquationAlterer.tsx | 2 ++ packages/lexical-playground/src/ui/KatexRenderer.tsx | 2 ++ packages/lexical-playground/src/ui/Modal.tsx | 2 ++ packages/lexical-playground/src/ui/Select.tsx | 2 ++ packages/lexical-playground/src/ui/Switch.tsx | 2 ++ packages/lexical-playground/src/ui/TextInput.tsx | 2 ++ packages/lexical-react/src/LexicalAutoEmbedPlugin.tsx | 1 + packages/lexical-react/src/LexicalAutoLinkPlugin.ts | 1 + .../lexical-react/src/LexicalBlockWithAlignableContents.tsx | 1 + packages/lexical-react/src/LexicalCharacterLimitPlugin.tsx | 2 ++ packages/lexical-react/src/LexicalClearEditorPlugin.ts | 2 ++ packages/lexical-react/src/LexicalCollaborationPlugin.tsx | 1 + packages/lexical-react/src/LexicalComposer.tsx | 1 + packages/lexical-react/src/LexicalContentEditable.tsx | 1 + packages/lexical-react/src/LexicalContextMenuPlugin.tsx | 1 + packages/lexical-react/src/LexicalDecoratorBlockNode.ts | 1 + packages/lexical-react/src/LexicalDraggableBlockPlugin.tsx | 2 ++ packages/lexical-react/src/LexicalErrorBoundary.tsx | 2 ++ packages/lexical-react/src/LexicalHashtagPlugin.ts | 1 + packages/lexical-react/src/LexicalHorizontalRuleNode.tsx | 1 + packages/lexical-react/src/LexicalNestedComposer.tsx | 1 + packages/lexical-react/src/LexicalNodeMenuPlugin.tsx | 1 + packages/lexical-react/src/LexicalPlainTextPlugin.tsx | 2 ++ packages/lexical-react/src/LexicalRichTextPlugin.tsx | 2 ++ packages/lexical-react/src/LexicalTableOfContentsPlugin.tsx | 2 ++ packages/lexical-react/src/LexicalTablePlugin.ts | 2 ++ packages/lexical-react/src/LexicalTreeView.tsx | 1 + packages/lexical-react/src/LexicalTypeaheadMenuPlugin.tsx | 1 + .../lexical-react/src/shared/LexicalContentEditableElement.tsx | 1 + packages/lexical-react/src/shared/LexicalMenu.ts | 2 ++ packages/lexical-react/src/shared/useDecorators.tsx | 1 + packages/lexical-react/src/shared/useYjsCollaboration.tsx | 1 + packages/lexical/src/__tests__/unit/LexicalEditor.test.tsx | 2 ++ packages/lexical/src/__tests__/unit/LexicalListPlugin.test.tsx | 3 +++ packages/lexical/src/__tests__/utils/index.tsx | 2 ++ .../src/components/plugins/TreeViewPlugin.tsx | 2 ++ .../fixtures/lexical-esm-nextjs/app/plugins/TreeViewPlugin.tsx | 2 ++ 118 files changed, 195 insertions(+), 1 deletion(-) diff --git a/examples/react-plain-text/src/plugins/TreeViewPlugin.tsx b/examples/react-plain-text/src/plugins/TreeViewPlugin.tsx index 3f8980b7e86..2eb6f2bb365 100644 --- a/examples/react-plain-text/src/plugins/TreeViewPlugin.tsx +++ b/examples/react-plain-text/src/plugins/TreeViewPlugin.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import {TreeView} from '@lexical/react/LexicalTreeView'; diff --git a/examples/react-rich-collab/src/plugins/TreeViewPlugin.tsx b/examples/react-rich-collab/src/plugins/TreeViewPlugin.tsx index 3f8980b7e86..2eb6f2bb365 100644 --- a/examples/react-rich-collab/src/plugins/TreeViewPlugin.tsx +++ b/examples/react-rich-collab/src/plugins/TreeViewPlugin.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import {TreeView} from '@lexical/react/LexicalTreeView'; diff --git a/examples/react-rich/src/plugins/TreeViewPlugin.tsx b/examples/react-rich/src/plugins/TreeViewPlugin.tsx index 3f8980b7e86..2eb6f2bb365 100644 --- a/examples/react-rich/src/plugins/TreeViewPlugin.tsx +++ b/examples/react-rich/src/plugins/TreeViewPlugin.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import {TreeView} from '@lexical/react/LexicalTreeView'; diff --git a/examples/react-table/src/plugins/TreeViewPlugin.tsx b/examples/react-table/src/plugins/TreeViewPlugin.tsx index 3f8980b7e86..2eb6f2bb365 100644 --- a/examples/react-table/src/plugins/TreeViewPlugin.tsx +++ b/examples/react-table/src/plugins/TreeViewPlugin.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import {TreeView} from '@lexical/react/LexicalTreeView'; diff --git a/packages/lexical-devtools-core/src/TreeView.tsx b/packages/lexical-devtools-core/src/TreeView.tsx index 65bc7e51e16..7351bbc0166 100644 --- a/packages/lexical-devtools-core/src/TreeView.tsx +++ b/packages/lexical-devtools-core/src/TreeView.tsx @@ -7,6 +7,7 @@ */ import type {EditorSetOptions, EditorState} from 'lexical'; +import type {JSX} from 'react'; import * as React from 'react'; import {forwardRef, useCallback, useEffect, useRef, useState} from 'react'; diff --git a/packages/lexical-history/src/__tests__/unit/LexicalHistory.test.tsx b/packages/lexical-history/src/__tests__/unit/LexicalHistory.test.tsx index 12eace707a0..345b1b8f8a8 100644 --- a/packages/lexical-history/src/__tests__/unit/LexicalHistory.test.tsx +++ b/packages/lexical-history/src/__tests__/unit/LexicalHistory.test.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {createEmptyHistoryState, registerHistory} from '@lexical/history'; import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import {ContentEditable} from '@lexical/react/LexicalContentEditable'; diff --git a/packages/lexical-playground/src/App.tsx b/packages/lexical-playground/src/App.tsx index aa4852cf87e..d667ed12c32 100644 --- a/packages/lexical-playground/src/App.tsx +++ b/packages/lexical-playground/src/App.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {$createLinkNode} from '@lexical/link'; import {$createListItemNode, $createListNode} from '@lexical/list'; import {LexicalComposer} from '@lexical/react/LexicalComposer'; diff --git a/packages/lexical-playground/src/Editor.tsx b/packages/lexical-playground/src/Editor.tsx index ec1d2c0d1fa..f5fb3421915 100644 --- a/packages/lexical-playground/src/Editor.tsx +++ b/packages/lexical-playground/src/Editor.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {AutoFocusPlugin} from '@lexical/react/LexicalAutoFocusPlugin'; import {CharacterLimitPlugin} from '@lexical/react/LexicalCharacterLimitPlugin'; import {CheckListPlugin} from '@lexical/react/LexicalCheckListPlugin'; diff --git a/packages/lexical-playground/src/Settings.tsx b/packages/lexical-playground/src/Settings.tsx index cc787b5ba56..138fb33e647 100644 --- a/packages/lexical-playground/src/Settings.tsx +++ b/packages/lexical-playground/src/Settings.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {CAN_USE_BEFORE_INPUT} from '@lexical/utils'; import {useEffect, useMemo, useState} from 'react'; diff --git a/packages/lexical-playground/src/context/FlashMessageContext.tsx b/packages/lexical-playground/src/context/FlashMessageContext.tsx index 16f83c39cce..7ee838a0cf3 100644 --- a/packages/lexical-playground/src/context/FlashMessageContext.tsx +++ b/packages/lexical-playground/src/context/FlashMessageContext.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import { createContext, ReactNode, diff --git a/packages/lexical-playground/src/context/SettingsContext.tsx b/packages/lexical-playground/src/context/SettingsContext.tsx index f114c29619b..48b2e1c2007 100644 --- a/packages/lexical-playground/src/context/SettingsContext.tsx +++ b/packages/lexical-playground/src/context/SettingsContext.tsx @@ -7,6 +7,7 @@ */ import type {SettingName} from '../appSettings'; +import type {JSX} from 'react'; import * as React from 'react'; import { diff --git a/packages/lexical-playground/src/context/SharedHistoryContext.tsx b/packages/lexical-playground/src/context/SharedHistoryContext.tsx index 316c337f43c..340360afd95 100644 --- a/packages/lexical-playground/src/context/SharedHistoryContext.tsx +++ b/packages/lexical-playground/src/context/SharedHistoryContext.tsx @@ -7,6 +7,7 @@ */ import type {HistoryState} from '@lexical/react/LexicalHistoryPlugin'; +import type {JSX} from 'react'; import {createEmptyHistoryState} from '@lexical/react/LexicalHistoryPlugin'; import * as React from 'react'; diff --git a/packages/lexical-playground/src/context/ToolbarContext.tsx b/packages/lexical-playground/src/context/ToolbarContext.tsx index f8b1c1f082b..1b6e17ddbc5 100644 --- a/packages/lexical-playground/src/context/ToolbarContext.tsx +++ b/packages/lexical-playground/src/context/ToolbarContext.tsx @@ -5,6 +5,9 @@ * LICENSE file in the root directory of this source tree. * */ + +import type {JSX} from 'react'; + import {ElementFormatType} from 'lexical'; import React, { createContext, diff --git a/packages/lexical-playground/src/hooks/useModal.tsx b/packages/lexical-playground/src/hooks/useModal.tsx index ef68e7c7959..b87e9e04af0 100644 --- a/packages/lexical-playground/src/hooks/useModal.tsx +++ b/packages/lexical-playground/src/hooks/useModal.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {useCallback, useMemo, useState} from 'react'; import * as React from 'react'; diff --git a/packages/lexical-playground/src/nodes/EquationComponent.tsx b/packages/lexical-playground/src/nodes/EquationComponent.tsx index 6929f5363f7..61fc07f12b7 100644 --- a/packages/lexical-playground/src/nodes/EquationComponent.tsx +++ b/packages/lexical-playground/src/nodes/EquationComponent.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import {useLexicalEditable} from '@lexical/react/useLexicalEditable'; import {mergeRegister} from '@lexical/utils'; diff --git a/packages/lexical-playground/src/nodes/EquationNode.tsx b/packages/lexical-playground/src/nodes/EquationNode.tsx index 5b3a37198f1..e98d23600e1 100644 --- a/packages/lexical-playground/src/nodes/EquationNode.tsx +++ b/packages/lexical-playground/src/nodes/EquationNode.tsx @@ -15,6 +15,7 @@ import type { SerializedLexicalNode, Spread, } from 'lexical'; +import type {JSX} from 'react'; import katex from 'katex'; import {$applyNodeReplacement, DecoratorNode, DOMExportOutput} from 'lexical'; diff --git a/packages/lexical-playground/src/nodes/ExcalidrawNode/ExcalidrawComponent.tsx b/packages/lexical-playground/src/nodes/ExcalidrawNode/ExcalidrawComponent.tsx index ee80664f93e..d3d1bc22db8 100644 --- a/packages/lexical-playground/src/nodes/ExcalidrawNode/ExcalidrawComponent.tsx +++ b/packages/lexical-playground/src/nodes/ExcalidrawNode/ExcalidrawComponent.tsx @@ -8,6 +8,7 @@ import type {ExcalidrawInitialElements} from '../../ui/ExcalidrawModal'; import type {NodeKey} from 'lexical'; +import type {JSX} from 'react'; import {AppState, BinaryFiles} from '@excalidraw/excalidraw/types/types'; import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; diff --git a/packages/lexical-playground/src/nodes/ExcalidrawNode/ExcalidrawImage.tsx b/packages/lexical-playground/src/nodes/ExcalidrawNode/ExcalidrawImage.tsx index b5e13a8f59a..6078ad7d9ad 100644 --- a/packages/lexical-playground/src/nodes/ExcalidrawNode/ExcalidrawImage.tsx +++ b/packages/lexical-playground/src/nodes/ExcalidrawNode/ExcalidrawImage.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {exportToSvg} from '@excalidraw/excalidraw'; import { ExcalidrawElement, diff --git a/packages/lexical-playground/src/nodes/ExcalidrawNode/index.tsx b/packages/lexical-playground/src/nodes/ExcalidrawNode/index.tsx index 08cc673ae63..a98f23e0604 100644 --- a/packages/lexical-playground/src/nodes/ExcalidrawNode/index.tsx +++ b/packages/lexical-playground/src/nodes/ExcalidrawNode/index.tsx @@ -17,6 +17,7 @@ import type { SerializedLexicalNode, Spread, } from 'lexical'; +import type {JSX} from 'react'; import {DecoratorNode} from 'lexical'; import * as React from 'react'; diff --git a/packages/lexical-playground/src/nodes/FigmaNode.tsx b/packages/lexical-playground/src/nodes/FigmaNode.tsx index a4c9d10c971..63aa04c8770 100644 --- a/packages/lexical-playground/src/nodes/FigmaNode.tsx +++ b/packages/lexical-playground/src/nodes/FigmaNode.tsx @@ -14,6 +14,7 @@ import type { NodeKey, Spread, } from 'lexical'; +import type {JSX} from 'react'; import {BlockWithAlignableContents} from '@lexical/react/LexicalBlockWithAlignableContents'; import { diff --git a/packages/lexical-playground/src/nodes/ImageComponent.tsx b/packages/lexical-playground/src/nodes/ImageComponent.tsx index 6eb6a3d7cc8..bc4890ccae0 100644 --- a/packages/lexical-playground/src/nodes/ImageComponent.tsx +++ b/packages/lexical-playground/src/nodes/ImageComponent.tsx @@ -12,6 +12,7 @@ import type { LexicalEditor, NodeKey, } from 'lexical'; +import type {JSX} from 'react'; import './ImageNode.css'; diff --git a/packages/lexical-playground/src/nodes/ImageNode.tsx b/packages/lexical-playground/src/nodes/ImageNode.tsx index a7f05e981bd..f1fda7bb767 100644 --- a/packages/lexical-playground/src/nodes/ImageNode.tsx +++ b/packages/lexical-playground/src/nodes/ImageNode.tsx @@ -19,6 +19,7 @@ import type { SerializedLexicalNode, Spread, } from 'lexical'; +import type {JSX} from 'react'; import {$applyNodeReplacement, createEditor, DecoratorNode} from 'lexical'; import * as React from 'react'; diff --git a/packages/lexical-playground/src/nodes/InlineImageNode/InlineImageComponent.tsx b/packages/lexical-playground/src/nodes/InlineImageNode/InlineImageComponent.tsx index 6cbd4377861..f18f6cd00a0 100644 --- a/packages/lexical-playground/src/nodes/InlineImageNode/InlineImageComponent.tsx +++ b/packages/lexical-playground/src/nodes/InlineImageNode/InlineImageComponent.tsx @@ -7,6 +7,7 @@ */ import type {Position} from './InlineImageNode'; import type {BaseSelection, LexicalEditor, NodeKey} from 'lexical'; +import type {JSX} from 'react'; import './InlineImageNode.css'; diff --git a/packages/lexical-playground/src/nodes/InlineImageNode/InlineImageNode.tsx b/packages/lexical-playground/src/nodes/InlineImageNode/InlineImageNode.tsx index aa063fd3f98..84dac17e9f5 100644 --- a/packages/lexical-playground/src/nodes/InlineImageNode/InlineImageNode.tsx +++ b/packages/lexical-playground/src/nodes/InlineImageNode/InlineImageNode.tsx @@ -19,6 +19,7 @@ import type { SerializedLexicalNode, Spread, } from 'lexical'; +import type {JSX} from 'react'; import { $applyNodeReplacement, diff --git a/packages/lexical-playground/src/nodes/PageBreakNode/index.tsx b/packages/lexical-playground/src/nodes/PageBreakNode/index.tsx index 0b4911c4383..4416faa9729 100644 --- a/packages/lexical-playground/src/nodes/PageBreakNode/index.tsx +++ b/packages/lexical-playground/src/nodes/PageBreakNode/index.tsx @@ -5,6 +5,9 @@ * LICENSE file in the root directory of this source tree. * */ + +import type {JSX} from 'react'; + import './index.css'; import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; diff --git a/packages/lexical-playground/src/nodes/PollComponent.tsx b/packages/lexical-playground/src/nodes/PollComponent.tsx index 52119d350cd..70a67de3468 100644 --- a/packages/lexical-playground/src/nodes/PollComponent.tsx +++ b/packages/lexical-playground/src/nodes/PollComponent.tsx @@ -7,6 +7,7 @@ */ import type {Option, Options, PollNode} from './PollNode'; +import type {JSX} from 'react'; import './PollNode.css'; diff --git a/packages/lexical-playground/src/nodes/PollNode.tsx b/packages/lexical-playground/src/nodes/PollNode.tsx index 7f0a20ca816..f4f57f47cda 100644 --- a/packages/lexical-playground/src/nodes/PollNode.tsx +++ b/packages/lexical-playground/src/nodes/PollNode.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import { DecoratorNode, DOMConversionMap, diff --git a/packages/lexical-playground/src/nodes/StickyComponent.tsx b/packages/lexical-playground/src/nodes/StickyComponent.tsx index 469ac869457..9b83e5c2e96 100644 --- a/packages/lexical-playground/src/nodes/StickyComponent.tsx +++ b/packages/lexical-playground/src/nodes/StickyComponent.tsx @@ -7,6 +7,7 @@ */ import type {LexicalEditor, NodeKey} from 'lexical'; +import type {JSX} from 'react'; import './StickyNode.css'; diff --git a/packages/lexical-playground/src/nodes/StickyNode.tsx b/packages/lexical-playground/src/nodes/StickyNode.tsx index 059d9782c4d..bf7e568ce4f 100644 --- a/packages/lexical-playground/src/nodes/StickyNode.tsx +++ b/packages/lexical-playground/src/nodes/StickyNode.tsx @@ -16,6 +16,7 @@ import type { SerializedLexicalNode, Spread, } from 'lexical'; +import type {JSX} from 'react'; import {$setSelection, createEditor, DecoratorNode} from 'lexical'; import * as React from 'react'; diff --git a/packages/lexical-playground/src/nodes/TweetNode.tsx b/packages/lexical-playground/src/nodes/TweetNode.tsx index e309c2091c0..31a9cae05c9 100644 --- a/packages/lexical-playground/src/nodes/TweetNode.tsx +++ b/packages/lexical-playground/src/nodes/TweetNode.tsx @@ -17,6 +17,7 @@ import type { NodeKey, Spread, } from 'lexical'; +import type {JSX} from 'react'; import {BlockWithAlignableContents} from '@lexical/react/LexicalBlockWithAlignableContents'; import { diff --git a/packages/lexical-playground/src/nodes/YouTubeNode.tsx b/packages/lexical-playground/src/nodes/YouTubeNode.tsx index b522ad6d14a..999da5efa07 100644 --- a/packages/lexical-playground/src/nodes/YouTubeNode.tsx +++ b/packages/lexical-playground/src/nodes/YouTubeNode.tsx @@ -17,6 +17,7 @@ import type { NodeKey, Spread, } from 'lexical'; +import type {JSX} from 'react'; import {BlockWithAlignableContents} from '@lexical/react/LexicalBlockWithAlignableContents'; import { diff --git a/packages/lexical-playground/src/plugins/ActionsPlugin/index.tsx b/packages/lexical-playground/src/plugins/ActionsPlugin/index.tsx index 7fa791a2a1b..dcd4cddac8e 100644 --- a/packages/lexical-playground/src/plugins/ActionsPlugin/index.tsx +++ b/packages/lexical-playground/src/plugins/ActionsPlugin/index.tsx @@ -7,6 +7,7 @@ */ import type {LexicalEditor} from 'lexical'; +import type {JSX} from 'react'; import {$createCodeNode, $isCodeNode} from '@lexical/code'; import { diff --git a/packages/lexical-playground/src/plugins/AutoEmbedPlugin/index.tsx b/packages/lexical-playground/src/plugins/AutoEmbedPlugin/index.tsx index 808967b3082..59c672d6e73 100644 --- a/packages/lexical-playground/src/plugins/AutoEmbedPlugin/index.tsx +++ b/packages/lexical-playground/src/plugins/AutoEmbedPlugin/index.tsx @@ -7,6 +7,7 @@ */ import type {LexicalEditor} from 'lexical'; +import type {JSX} from 'react'; import { AutoEmbedOption, diff --git a/packages/lexical-playground/src/plugins/AutoLinkPlugin/index.tsx b/packages/lexical-playground/src/plugins/AutoLinkPlugin/index.tsx index 399b0e5eafa..3686590785b 100644 --- a/packages/lexical-playground/src/plugins/AutoLinkPlugin/index.tsx +++ b/packages/lexical-playground/src/plugins/AutoLinkPlugin/index.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import { AutoLinkPlugin, createLinkMatcherWithRegExp, diff --git a/packages/lexical-playground/src/plugins/AutocompletePlugin/index.tsx b/packages/lexical-playground/src/plugins/AutocompletePlugin/index.tsx index 6f427cdfe7d..6a3da055337 100644 --- a/packages/lexical-playground/src/plugins/AutocompletePlugin/index.tsx +++ b/packages/lexical-playground/src/plugins/AutocompletePlugin/index.tsx @@ -7,6 +7,7 @@ */ import type {BaseSelection, NodeKey, TextNode} from 'lexical'; +import type {JSX} from 'react'; import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import {$isAtNodeEnd} from '@lexical/selection'; diff --git a/packages/lexical-playground/src/plugins/CodeActionMenuPlugin/index.tsx b/packages/lexical-playground/src/plugins/CodeActionMenuPlugin/index.tsx index e0a795a6a05..aeb94e98b87 100644 --- a/packages/lexical-playground/src/plugins/CodeActionMenuPlugin/index.tsx +++ b/packages/lexical-playground/src/plugins/CodeActionMenuPlugin/index.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import './index.css'; import { diff --git a/packages/lexical-playground/src/plugins/CodeHighlightPlugin/index.ts b/packages/lexical-playground/src/plugins/CodeHighlightPlugin/index.ts index 7813912ecb8..2ec110c7bdc 100644 --- a/packages/lexical-playground/src/plugins/CodeHighlightPlugin/index.ts +++ b/packages/lexical-playground/src/plugins/CodeHighlightPlugin/index.ts @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {registerCodeHighlighting} from '@lexical/code'; import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import {useEffect} from 'react'; diff --git a/packages/lexical-playground/src/plugins/CommentPlugin/index.tsx b/packages/lexical-playground/src/plugins/CommentPlugin/index.tsx index 2367d0a165e..0d4d7d03dcc 100644 --- a/packages/lexical-playground/src/plugins/CommentPlugin/index.tsx +++ b/packages/lexical-playground/src/plugins/CommentPlugin/index.tsx @@ -14,6 +14,7 @@ import type { NodeKey, RangeSelection, } from 'lexical'; +import type {JSX} from 'react'; import type {Doc} from 'yjs'; import './index.css'; diff --git a/packages/lexical-playground/src/plugins/ComponentPickerPlugin/index.tsx b/packages/lexical-playground/src/plugins/ComponentPickerPlugin/index.tsx index 19406089056..af099392625 100644 --- a/packages/lexical-playground/src/plugins/ComponentPickerPlugin/index.tsx +++ b/packages/lexical-playground/src/plugins/ComponentPickerPlugin/index.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {$createCodeNode} from '@lexical/code'; import { INSERT_CHECK_LIST_COMMAND, diff --git a/packages/lexical-playground/src/plugins/ContextMenuPlugin/index.tsx b/packages/lexical-playground/src/plugins/ContextMenuPlugin/index.tsx index 36f51ecb2ba..d6c561b1dec 100644 --- a/packages/lexical-playground/src/plugins/ContextMenuPlugin/index.tsx +++ b/packages/lexical-playground/src/plugins/ContextMenuPlugin/index.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {$isLinkNode, TOGGLE_LINK_COMMAND} from '@lexical/link'; import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import { diff --git a/packages/lexical-playground/src/plugins/DocsPlugin/index.tsx b/packages/lexical-playground/src/plugins/DocsPlugin/index.tsx index fe0e24079d1..80738c8bba7 100644 --- a/packages/lexical-playground/src/plugins/DocsPlugin/index.tsx +++ b/packages/lexical-playground/src/plugins/DocsPlugin/index.tsx @@ -5,6 +5,9 @@ * LICENSE file in the root directory of this source tree. * */ + +import type {JSX} from 'react'; + import * as React from 'react'; export default function DocsPlugin(): JSX.Element { diff --git a/packages/lexical-playground/src/plugins/DraggableBlockPlugin/index.tsx b/packages/lexical-playground/src/plugins/DraggableBlockPlugin/index.tsx index 891932c94d0..f8320fd94c6 100644 --- a/packages/lexical-playground/src/plugins/DraggableBlockPlugin/index.tsx +++ b/packages/lexical-playground/src/plugins/DraggableBlockPlugin/index.tsx @@ -5,6 +5,8 @@ * LICENSE file in the root directory of this source tree. * */ +import type {JSX} from 'react'; + import './index.css'; import {DraggableBlockPlugin_EXPERIMENTAL} from '@lexical/react/LexicalDraggableBlockPlugin'; diff --git a/packages/lexical-playground/src/plugins/EmojisPlugin/index.ts b/packages/lexical-playground/src/plugins/EmojisPlugin/index.ts index 7d0b847dfb6..1ace4ff0d95 100644 --- a/packages/lexical-playground/src/plugins/EmojisPlugin/index.ts +++ b/packages/lexical-playground/src/plugins/EmojisPlugin/index.ts @@ -7,6 +7,7 @@ */ import type {LexicalEditor} from 'lexical'; +import type {JSX} from 'react'; import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import {TextNode} from 'lexical'; diff --git a/packages/lexical-playground/src/plugins/EquationsPlugin/index.tsx b/packages/lexical-playground/src/plugins/EquationsPlugin/index.tsx index e22fc558ec1..46f1bf7ae1e 100644 --- a/packages/lexical-playground/src/plugins/EquationsPlugin/index.tsx +++ b/packages/lexical-playground/src/plugins/EquationsPlugin/index.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import 'katex/dist/katex.css'; import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; diff --git a/packages/lexical-playground/src/plugins/ExcalidrawPlugin/index.tsx b/packages/lexical-playground/src/plugins/ExcalidrawPlugin/index.tsx index 4bcc00c4b8f..2f431234ca6 100644 --- a/packages/lexical-playground/src/plugins/ExcalidrawPlugin/index.tsx +++ b/packages/lexical-playground/src/plugins/ExcalidrawPlugin/index.tsx @@ -7,6 +7,7 @@ */ import type {ExcalidrawInitialElements} from '../../ui/ExcalidrawModal'; import type {AppState, BinaryFiles} from '@excalidraw/excalidraw/types/types'; +import type {JSX} from 'react'; import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import {$wrapNodeInElement} from '@lexical/utils'; diff --git a/packages/lexical-playground/src/plugins/FigmaPlugin/index.tsx b/packages/lexical-playground/src/plugins/FigmaPlugin/index.tsx index 36c4637411d..50313f761c6 100644 --- a/packages/lexical-playground/src/plugins/FigmaPlugin/index.tsx +++ b/packages/lexical-playground/src/plugins/FigmaPlugin/index.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import {$insertNodeToNearestRoot} from '@lexical/utils'; import {COMMAND_PRIORITY_EDITOR, createCommand, LexicalCommand} from 'lexical'; diff --git a/packages/lexical-playground/src/plugins/FloatingLinkEditorPlugin/index.tsx b/packages/lexical-playground/src/plugins/FloatingLinkEditorPlugin/index.tsx index 39c9cb2d695..d8255eff11f 100644 --- a/packages/lexical-playground/src/plugins/FloatingLinkEditorPlugin/index.tsx +++ b/packages/lexical-playground/src/plugins/FloatingLinkEditorPlugin/index.tsx @@ -5,6 +5,8 @@ * LICENSE file in the root directory of this source tree. * */ +import type {JSX} from 'react'; + import './index.css'; import { diff --git a/packages/lexical-playground/src/plugins/FloatingTextFormatToolbarPlugin/index.tsx b/packages/lexical-playground/src/plugins/FloatingTextFormatToolbarPlugin/index.tsx index 0cb2730b632..4faffa5333d 100644 --- a/packages/lexical-playground/src/plugins/FloatingTextFormatToolbarPlugin/index.tsx +++ b/packages/lexical-playground/src/plugins/FloatingTextFormatToolbarPlugin/index.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import './index.css'; import {$isCodeHighlightNode} from '@lexical/code'; diff --git a/packages/lexical-playground/src/plugins/ImagesPlugin/index.tsx b/packages/lexical-playground/src/plugins/ImagesPlugin/index.tsx index 41ff0662a1f..4097c58a47f 100644 --- a/packages/lexical-playground/src/plugins/ImagesPlugin/index.tsx +++ b/packages/lexical-playground/src/plugins/ImagesPlugin/index.tsx @@ -5,6 +5,9 @@ * LICENSE file in the root directory of this source tree. * */ + +import type {JSX} from 'react'; + import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import {$wrapNodeInElement, mergeRegister} from '@lexical/utils'; import { diff --git a/packages/lexical-playground/src/plugins/InlineImagePlugin/index.tsx b/packages/lexical-playground/src/plugins/InlineImagePlugin/index.tsx index c54d72e8999..00ce93be3f8 100644 --- a/packages/lexical-playground/src/plugins/InlineImagePlugin/index.tsx +++ b/packages/lexical-playground/src/plugins/InlineImagePlugin/index.tsx @@ -6,6 +6,7 @@ * */ import type {Position} from '../../nodes/InlineImageNode/InlineImageNode'; +import type {JSX} from 'react'; import '../../nodes/InlineImageNode/InlineImageNode.css'; diff --git a/packages/lexical-playground/src/plugins/KeywordsPlugin/index.ts b/packages/lexical-playground/src/plugins/KeywordsPlugin/index.ts index 08e3fe91225..32ed8f5374a 100644 --- a/packages/lexical-playground/src/plugins/KeywordsPlugin/index.ts +++ b/packages/lexical-playground/src/plugins/KeywordsPlugin/index.ts @@ -7,6 +7,7 @@ */ import type {TextNode} from 'lexical'; +import type {JSX} from 'react'; import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import {useLexicalTextEntity} from '@lexical/react/useLexicalTextEntity'; diff --git a/packages/lexical-playground/src/plugins/LayoutPlugin/InsertLayoutDialog.tsx b/packages/lexical-playground/src/plugins/LayoutPlugin/InsertLayoutDialog.tsx index cf333bb8a45..a932c584ba5 100644 --- a/packages/lexical-playground/src/plugins/LayoutPlugin/InsertLayoutDialog.tsx +++ b/packages/lexical-playground/src/plugins/LayoutPlugin/InsertLayoutDialog.tsx @@ -5,6 +5,9 @@ * LICENSE file in the root directory of this source tree. * */ + +import type {JSX} from 'react'; + import {LexicalEditor} from 'lexical'; import * as React from 'react'; import {useState} from 'react'; diff --git a/packages/lexical-playground/src/plugins/LinkPlugin/index.tsx b/packages/lexical-playground/src/plugins/LinkPlugin/index.tsx index 68799491dc5..0d5dad094f6 100644 --- a/packages/lexical-playground/src/plugins/LinkPlugin/index.tsx +++ b/packages/lexical-playground/src/plugins/LinkPlugin/index.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {LinkPlugin as LexicalLinkPlugin} from '@lexical/react/LexicalLinkPlugin'; import * as React from 'react'; diff --git a/packages/lexical-playground/src/plugins/MarkdownShortcutPlugin/index.tsx b/packages/lexical-playground/src/plugins/MarkdownShortcutPlugin/index.tsx index a2eee255c3d..1c801566696 100644 --- a/packages/lexical-playground/src/plugins/MarkdownShortcutPlugin/index.tsx +++ b/packages/lexical-playground/src/plugins/MarkdownShortcutPlugin/index.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {MarkdownShortcutPlugin} from '@lexical/react/LexicalMarkdownShortcutPlugin'; import * as React from 'react'; diff --git a/packages/lexical-playground/src/plugins/MentionsPlugin/index.tsx b/packages/lexical-playground/src/plugins/MentionsPlugin/index.tsx index faaca3496a3..c81bdf6e542 100644 --- a/packages/lexical-playground/src/plugins/MentionsPlugin/index.tsx +++ b/packages/lexical-playground/src/plugins/MentionsPlugin/index.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import { LexicalTypeaheadMenuPlugin, diff --git a/packages/lexical-playground/src/plugins/PageBreakPlugin/index.tsx b/packages/lexical-playground/src/plugins/PageBreakPlugin/index.tsx index 03167c395a0..55b5b4d28d4 100644 --- a/packages/lexical-playground/src/plugins/PageBreakPlugin/index.tsx +++ b/packages/lexical-playground/src/plugins/PageBreakPlugin/index.tsx @@ -5,6 +5,9 @@ * LICENSE file in the root directory of this source tree. * */ + +import type {JSX} from 'react'; + import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import {$insertNodeToNearestRoot, mergeRegister} from '@lexical/utils'; import { diff --git a/packages/lexical-playground/src/plugins/PasteLogPlugin/index.tsx b/packages/lexical-playground/src/plugins/PasteLogPlugin/index.tsx index 245e6bfa26a..f0d8c02bb9b 100644 --- a/packages/lexical-playground/src/plugins/PasteLogPlugin/index.tsx +++ b/packages/lexical-playground/src/plugins/PasteLogPlugin/index.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import {COMMAND_PRIORITY_NORMAL, PASTE_COMMAND} from 'lexical'; import * as React from 'react'; diff --git a/packages/lexical-playground/src/plugins/PollPlugin/index.tsx b/packages/lexical-playground/src/plugins/PollPlugin/index.tsx index 93323331f82..99989b76101 100644 --- a/packages/lexical-playground/src/plugins/PollPlugin/index.tsx +++ b/packages/lexical-playground/src/plugins/PollPlugin/index.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import {$wrapNodeInElement} from '@lexical/utils'; import { diff --git a/packages/lexical-playground/src/plugins/SpecialTextPlugin/index.ts b/packages/lexical-playground/src/plugins/SpecialTextPlugin/index.ts index ecbec844b66..7ad21d61f94 100644 --- a/packages/lexical-playground/src/plugins/SpecialTextPlugin/index.ts +++ b/packages/lexical-playground/src/plugins/SpecialTextPlugin/index.ts @@ -6,6 +6,7 @@ * */ import type {LexicalEditor} from 'lexical'; +import type {JSX} from 'react'; import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import {TextNode} from 'lexical'; diff --git a/packages/lexical-playground/src/plugins/StickyPlugin/index.ts b/packages/lexical-playground/src/plugins/StickyPlugin/index.ts index 719833f2c84..510cf865a66 100644 --- a/packages/lexical-playground/src/plugins/StickyPlugin/index.ts +++ b/packages/lexical-playground/src/plugins/StickyPlugin/index.ts @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import {useEffect} from 'react'; diff --git a/packages/lexical-playground/src/plugins/TableActionMenuPlugin/index.tsx b/packages/lexical-playground/src/plugins/TableActionMenuPlugin/index.tsx index 7fdae2e20c1..06e8510163a 100644 --- a/packages/lexical-playground/src/plugins/TableActionMenuPlugin/index.tsx +++ b/packages/lexical-playground/src/plugins/TableActionMenuPlugin/index.tsx @@ -7,6 +7,7 @@ */ import type {ElementNode, LexicalEditor} from 'lexical'; +import type {JSX} from 'react'; import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import {useLexicalEditable} from '@lexical/react/useLexicalEditable'; diff --git a/packages/lexical-playground/src/plugins/TableCellResizer/index.tsx b/packages/lexical-playground/src/plugins/TableCellResizer/index.tsx index 72f6fe694a8..570ad5d11ff 100644 --- a/packages/lexical-playground/src/plugins/TableCellResizer/index.tsx +++ b/packages/lexical-playground/src/plugins/TableCellResizer/index.tsx @@ -7,6 +7,7 @@ */ import type {TableCellNode, TableDOMCell, TableMapType} from '@lexical/table'; import type {LexicalEditor} from 'lexical'; +import type {JSX} from 'react'; import './index.css'; diff --git a/packages/lexical-playground/src/plugins/TableHoverActionsPlugin/index.tsx b/packages/lexical-playground/src/plugins/TableHoverActionsPlugin/index.tsx index da7e1bd3c21..a326dfa7683 100644 --- a/packages/lexical-playground/src/plugins/TableHoverActionsPlugin/index.tsx +++ b/packages/lexical-playground/src/plugins/TableHoverActionsPlugin/index.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import {useLexicalEditable} from '@lexical/react/useLexicalEditable'; import { diff --git a/packages/lexical-playground/src/plugins/TableOfContentsPlugin/index.tsx b/packages/lexical-playground/src/plugins/TableOfContentsPlugin/index.tsx index 42571d36a18..e8d3256a590 100644 --- a/packages/lexical-playground/src/plugins/TableOfContentsPlugin/index.tsx +++ b/packages/lexical-playground/src/plugins/TableOfContentsPlugin/index.tsx @@ -8,6 +8,7 @@ import type {TableOfContentsEntry} from '@lexical/react/LexicalTableOfContentsPlugin'; import type {HeadingTagType} from '@lexical/rich-text'; import type {NodeKey} from 'lexical'; +import type {JSX} from 'react'; import './index.css'; diff --git a/packages/lexical-playground/src/plugins/TablePlugin.tsx b/packages/lexical-playground/src/plugins/TablePlugin.tsx index 795c784335e..69f8fac4fa7 100644 --- a/packages/lexical-playground/src/plugins/TablePlugin.tsx +++ b/packages/lexical-playground/src/plugins/TablePlugin.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import { INSERT_TABLE_COMMAND, diff --git a/packages/lexical-playground/src/plugins/TestRecorderPlugin/index.tsx b/packages/lexical-playground/src/plugins/TestRecorderPlugin/index.tsx index c97b3de3248..d1ffc174e62 100644 --- a/packages/lexical-playground/src/plugins/TestRecorderPlugin/index.tsx +++ b/packages/lexical-playground/src/plugins/TestRecorderPlugin/index.tsx @@ -7,6 +7,7 @@ */ import type {BaseSelection, LexicalEditor} from 'lexical'; +import type {JSX} from 'react'; import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import { diff --git a/packages/lexical-playground/src/plugins/ToolbarPlugin/index.tsx b/packages/lexical-playground/src/plugins/ToolbarPlugin/index.tsx index 1dd6dc066d4..ab108f41091 100644 --- a/packages/lexical-playground/src/plugins/ToolbarPlugin/index.tsx +++ b/packages/lexical-playground/src/plugins/ToolbarPlugin/index.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import { $isCodeNode, CODE_LANGUAGE_FRIENDLY_NAME_MAP, diff --git a/packages/lexical-playground/src/plugins/TreeViewPlugin/index.tsx b/packages/lexical-playground/src/plugins/TreeViewPlugin/index.tsx index 68eae89a00b..36466c9d22c 100644 --- a/packages/lexical-playground/src/plugins/TreeViewPlugin/index.tsx +++ b/packages/lexical-playground/src/plugins/TreeViewPlugin/index.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import {TreeView} from '@lexical/react/LexicalTreeView'; import * as React from 'react'; diff --git a/packages/lexical-playground/src/plugins/TwitterPlugin/index.ts b/packages/lexical-playground/src/plugins/TwitterPlugin/index.ts index 789b36fe282..42169837ae6 100644 --- a/packages/lexical-playground/src/plugins/TwitterPlugin/index.ts +++ b/packages/lexical-playground/src/plugins/TwitterPlugin/index.ts @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import {$insertNodeToNearestRoot} from '@lexical/utils'; import {COMMAND_PRIORITY_EDITOR, createCommand, LexicalCommand} from 'lexical'; diff --git a/packages/lexical-playground/src/plugins/TypingPerfPlugin/index.ts b/packages/lexical-playground/src/plugins/TypingPerfPlugin/index.ts index 535a9dd1bb4..30577517852 100644 --- a/packages/lexical-playground/src/plugins/TypingPerfPlugin/index.ts +++ b/packages/lexical-playground/src/plugins/TypingPerfPlugin/index.ts @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {useEffect} from 'react'; import useReport from '../../hooks/useReport'; diff --git a/packages/lexical-playground/src/plugins/YouTubePlugin/index.ts b/packages/lexical-playground/src/plugins/YouTubePlugin/index.ts index 76685c6d6f5..4bf5a7e4e62 100644 --- a/packages/lexical-playground/src/plugins/YouTubePlugin/index.ts +++ b/packages/lexical-playground/src/plugins/YouTubePlugin/index.ts @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import {$insertNodeToNearestRoot} from '@lexical/utils'; import {COMMAND_PRIORITY_EDITOR, createCommand, LexicalCommand} from 'lexical'; diff --git a/packages/lexical-playground/src/ui/Button.tsx b/packages/lexical-playground/src/ui/Button.tsx index a83f7a8735a..9980cc4492b 100644 --- a/packages/lexical-playground/src/ui/Button.tsx +++ b/packages/lexical-playground/src/ui/Button.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import './Button.css'; import * as React from 'react'; diff --git a/packages/lexical-playground/src/ui/ColorPicker.tsx b/packages/lexical-playground/src/ui/ColorPicker.tsx index 6934f5a3af8..6593c02389f 100644 --- a/packages/lexical-playground/src/ui/ColorPicker.tsx +++ b/packages/lexical-playground/src/ui/ColorPicker.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import './ColorPicker.css'; import {calculateZoomLevel} from '@lexical/utils'; diff --git a/packages/lexical-playground/src/ui/ContentEditable.tsx b/packages/lexical-playground/src/ui/ContentEditable.tsx index b1ee20b2103..3865709ef40 100644 --- a/packages/lexical-playground/src/ui/ContentEditable.tsx +++ b/packages/lexical-playground/src/ui/ContentEditable.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import './ContentEditable.css'; import {ContentEditable} from '@lexical/react/LexicalContentEditable'; diff --git a/packages/lexical-playground/src/ui/Dialog.tsx b/packages/lexical-playground/src/ui/Dialog.tsx index 36e3b8c5938..7492432f212 100644 --- a/packages/lexical-playground/src/ui/Dialog.tsx +++ b/packages/lexical-playground/src/ui/Dialog.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import './Dialog.css'; import * as React from 'react'; diff --git a/packages/lexical-playground/src/ui/DropDown.tsx b/packages/lexical-playground/src/ui/DropDown.tsx index 19d3065df0e..1d0b8ac23ab 100644 --- a/packages/lexical-playground/src/ui/DropDown.tsx +++ b/packages/lexical-playground/src/ui/DropDown.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {isDOMNode} from 'lexical'; import * as React from 'react'; import { diff --git a/packages/lexical-playground/src/ui/EquationEditor.tsx b/packages/lexical-playground/src/ui/EquationEditor.tsx index ce512aed010..5f23da1075b 100644 --- a/packages/lexical-playground/src/ui/EquationEditor.tsx +++ b/packages/lexical-playground/src/ui/EquationEditor.tsx @@ -6,7 +6,7 @@ * */ -import type {Ref, RefObject} from 'react'; +import type {JSX, Ref, RefObject} from 'react'; import './EquationEditor.css'; diff --git a/packages/lexical-playground/src/ui/ExcalidrawModal.tsx b/packages/lexical-playground/src/ui/ExcalidrawModal.tsx index 221a2c7c818..2e6acd7d2a9 100644 --- a/packages/lexical-playground/src/ui/ExcalidrawModal.tsx +++ b/packages/lexical-playground/src/ui/ExcalidrawModal.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import './ExcalidrawModal.css'; import {Excalidraw} from '@excalidraw/excalidraw'; diff --git a/packages/lexical-playground/src/ui/FileInput.tsx b/packages/lexical-playground/src/ui/FileInput.tsx index 465330bb446..0d264d8ea61 100644 --- a/packages/lexical-playground/src/ui/FileInput.tsx +++ b/packages/lexical-playground/src/ui/FileInput.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import './Input.css'; import * as React from 'react'; diff --git a/packages/lexical-playground/src/ui/FlashMessage.tsx b/packages/lexical-playground/src/ui/FlashMessage.tsx index 5c6fdb0f340..03219aea6a3 100644 --- a/packages/lexical-playground/src/ui/FlashMessage.tsx +++ b/packages/lexical-playground/src/ui/FlashMessage.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import './FlashMessage.css'; import {ReactNode} from 'react'; diff --git a/packages/lexical-playground/src/ui/ImageResizer.tsx b/packages/lexical-playground/src/ui/ImageResizer.tsx index 13e9f48f926..e2c52ebfbc9 100644 --- a/packages/lexical-playground/src/ui/ImageResizer.tsx +++ b/packages/lexical-playground/src/ui/ImageResizer.tsx @@ -7,6 +7,7 @@ */ import type {LexicalEditor} from 'lexical'; +import type {JSX} from 'react'; import {calculateZoomLevel} from '@lexical/utils'; import * as React from 'react'; diff --git a/packages/lexical-playground/src/ui/KatexEquationAlterer.tsx b/packages/lexical-playground/src/ui/KatexEquationAlterer.tsx index 5bbbcbc4db5..ab3dd38abbc 100644 --- a/packages/lexical-playground/src/ui/KatexEquationAlterer.tsx +++ b/packages/lexical-playground/src/ui/KatexEquationAlterer.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import './KatexEquationAlterer.css'; import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; diff --git a/packages/lexical-playground/src/ui/KatexRenderer.tsx b/packages/lexical-playground/src/ui/KatexRenderer.tsx index a6084e77aa8..3b914bf4c16 100644 --- a/packages/lexical-playground/src/ui/KatexRenderer.tsx +++ b/packages/lexical-playground/src/ui/KatexRenderer.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import katex from 'katex'; import * as React from 'react'; import {useEffect, useRef} from 'react'; diff --git a/packages/lexical-playground/src/ui/Modal.tsx b/packages/lexical-playground/src/ui/Modal.tsx index 540d7e9d0b2..253df1aca35 100644 --- a/packages/lexical-playground/src/ui/Modal.tsx +++ b/packages/lexical-playground/src/ui/Modal.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import './Modal.css'; import {isDOMNode} from 'lexical'; diff --git a/packages/lexical-playground/src/ui/Select.tsx b/packages/lexical-playground/src/ui/Select.tsx index 59e5ccc069b..5122aed9890 100644 --- a/packages/lexical-playground/src/ui/Select.tsx +++ b/packages/lexical-playground/src/ui/Select.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import './Select.css'; import * as React from 'react'; diff --git a/packages/lexical-playground/src/ui/Switch.tsx b/packages/lexical-playground/src/ui/Switch.tsx index 4510bd11593..fc6b6b439e6 100644 --- a/packages/lexical-playground/src/ui/Switch.tsx +++ b/packages/lexical-playground/src/ui/Switch.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import * as React from 'react'; import {useMemo} from 'react'; diff --git a/packages/lexical-playground/src/ui/TextInput.tsx b/packages/lexical-playground/src/ui/TextInput.tsx index 7b1765ff286..6d2b7b4f6cb 100644 --- a/packages/lexical-playground/src/ui/TextInput.tsx +++ b/packages/lexical-playground/src/ui/TextInput.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import './Input.css'; import * as React from 'react'; diff --git a/packages/lexical-react/src/LexicalAutoEmbedPlugin.tsx b/packages/lexical-react/src/LexicalAutoEmbedPlugin.tsx index 49ebbb1a270..06f753758a2 100644 --- a/packages/lexical-react/src/LexicalAutoEmbedPlugin.tsx +++ b/packages/lexical-react/src/LexicalAutoEmbedPlugin.tsx @@ -10,6 +10,7 @@ import type { LexicalNode, MutationListener, } from 'lexical'; +import type {JSX} from 'react'; import {$isLinkNode, AutoLinkNode, LinkNode} from '@lexical/link'; import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; diff --git a/packages/lexical-react/src/LexicalAutoLinkPlugin.ts b/packages/lexical-react/src/LexicalAutoLinkPlugin.ts index bb859ca82c6..3fd7314eff9 100644 --- a/packages/lexical-react/src/LexicalAutoLinkPlugin.ts +++ b/packages/lexical-react/src/LexicalAutoLinkPlugin.ts @@ -8,6 +8,7 @@ import type {AutoLinkAttributes} from '@lexical/link'; import type {ElementNode, LexicalEditor, LexicalNode} from 'lexical'; +import type {JSX} from 'react'; import { $createAutoLinkNode, diff --git a/packages/lexical-react/src/LexicalBlockWithAlignableContents.tsx b/packages/lexical-react/src/LexicalBlockWithAlignableContents.tsx index c2b68ff747a..b4a37c04c7a 100644 --- a/packages/lexical-react/src/LexicalBlockWithAlignableContents.tsx +++ b/packages/lexical-react/src/LexicalBlockWithAlignableContents.tsx @@ -7,6 +7,7 @@ */ import type {ElementFormatType, NodeKey} from 'lexical'; +import type {JSX} from 'react'; import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import {$isDecoratorBlockNode} from '@lexical/react/LexicalDecoratorBlockNode'; diff --git a/packages/lexical-react/src/LexicalCharacterLimitPlugin.tsx b/packages/lexical-react/src/LexicalCharacterLimitPlugin.tsx index 7ec19accc0e..125228adec3 100644 --- a/packages/lexical-react/src/LexicalCharacterLimitPlugin.tsx +++ b/packages/lexical-react/src/LexicalCharacterLimitPlugin.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import * as React from 'react'; import {useMemo, useState} from 'react'; diff --git a/packages/lexical-react/src/LexicalClearEditorPlugin.ts b/packages/lexical-react/src/LexicalClearEditorPlugin.ts index b1c77339e6b..11a94da651e 100644 --- a/packages/lexical-react/src/LexicalClearEditorPlugin.ts +++ b/packages/lexical-react/src/LexicalClearEditorPlugin.ts @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import { $createParagraphNode, diff --git a/packages/lexical-react/src/LexicalCollaborationPlugin.tsx b/packages/lexical-react/src/LexicalCollaborationPlugin.tsx index b3018c1af5f..05fec9da468 100644 --- a/packages/lexical-react/src/LexicalCollaborationPlugin.tsx +++ b/packages/lexical-react/src/LexicalCollaborationPlugin.tsx @@ -6,6 +6,7 @@ * */ +import type {JSX} from 'react'; import type {Doc} from 'yjs'; import { diff --git a/packages/lexical-react/src/LexicalComposer.tsx b/packages/lexical-react/src/LexicalComposer.tsx index f5a58ca0a69..1175e1e64fb 100644 --- a/packages/lexical-react/src/LexicalComposer.tsx +++ b/packages/lexical-react/src/LexicalComposer.tsx @@ -7,6 +7,7 @@ */ import type {LexicalComposerContextType} from '@lexical/react/LexicalComposerContext'; +import type {JSX} from 'react'; import { createLexicalComposerContext, diff --git a/packages/lexical-react/src/LexicalContentEditable.tsx b/packages/lexical-react/src/LexicalContentEditable.tsx index 0463ffb4a7a..a4040683728 100644 --- a/packages/lexical-react/src/LexicalContentEditable.tsx +++ b/packages/lexical-react/src/LexicalContentEditable.tsx @@ -8,6 +8,7 @@ import type {Props as ElementProps} from './shared/LexicalContentEditableElement'; import type {LexicalEditor} from 'lexical'; +import type {JSX} from 'react'; import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import {forwardRef, Ref, useLayoutEffect, useState} from 'react'; diff --git a/packages/lexical-react/src/LexicalContextMenuPlugin.tsx b/packages/lexical-react/src/LexicalContextMenuPlugin.tsx index 7f1676f3cf9..5a31e247adb 100644 --- a/packages/lexical-react/src/LexicalContextMenuPlugin.tsx +++ b/packages/lexical-react/src/LexicalContextMenuPlugin.tsx @@ -6,6 +6,7 @@ * */ import type {MenuRenderFn, MenuResolution} from './shared/LexicalMenu'; +import type {JSX} from 'react'; import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import {calculateZoomLevel} from '@lexical/utils'; diff --git a/packages/lexical-react/src/LexicalDecoratorBlockNode.ts b/packages/lexical-react/src/LexicalDecoratorBlockNode.ts index 51d304e42e5..d2f94d010a3 100644 --- a/packages/lexical-react/src/LexicalDecoratorBlockNode.ts +++ b/packages/lexical-react/src/LexicalDecoratorBlockNode.ts @@ -14,6 +14,7 @@ import type { SerializedLexicalNode, Spread, } from 'lexical'; +import type {JSX} from 'react'; import {DecoratorNode} from 'lexical'; diff --git a/packages/lexical-react/src/LexicalDraggableBlockPlugin.tsx b/packages/lexical-react/src/LexicalDraggableBlockPlugin.tsx index be695b76b23..10584389b05 100644 --- a/packages/lexical-react/src/LexicalDraggableBlockPlugin.tsx +++ b/packages/lexical-react/src/LexicalDraggableBlockPlugin.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import {eventFiles} from '@lexical/rich-text'; import {calculateZoomLevel, isHTMLElement, mergeRegister} from '@lexical/utils'; diff --git a/packages/lexical-react/src/LexicalErrorBoundary.tsx b/packages/lexical-react/src/LexicalErrorBoundary.tsx index 5eb59aa741a..5d463e7665f 100644 --- a/packages/lexical-react/src/LexicalErrorBoundary.tsx +++ b/packages/lexical-react/src/LexicalErrorBoundary.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import * as React from 'react'; import {ErrorBoundary as ReactErrorBoundary} from 'react-error-boundary'; diff --git a/packages/lexical-react/src/LexicalHashtagPlugin.ts b/packages/lexical-react/src/LexicalHashtagPlugin.ts index e4b64a9d51b..0f89717f764 100644 --- a/packages/lexical-react/src/LexicalHashtagPlugin.ts +++ b/packages/lexical-react/src/LexicalHashtagPlugin.ts @@ -7,6 +7,7 @@ */ import type {TextNode} from 'lexical'; +import type {JSX} from 'react'; import {$createHashtagNode, HashtagNode} from '@lexical/hashtag'; import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; diff --git a/packages/lexical-react/src/LexicalHorizontalRuleNode.tsx b/packages/lexical-react/src/LexicalHorizontalRuleNode.tsx index 41339c51c7d..850b1eb5f25 100644 --- a/packages/lexical-react/src/LexicalHorizontalRuleNode.tsx +++ b/packages/lexical-react/src/LexicalHorizontalRuleNode.tsx @@ -16,6 +16,7 @@ import type { NodeKey, SerializedLexicalNode, } from 'lexical'; +import type {JSX} from 'react'; import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import {useLexicalNodeSelection} from '@lexical/react/useLexicalNodeSelection'; diff --git a/packages/lexical-react/src/LexicalNestedComposer.tsx b/packages/lexical-react/src/LexicalNestedComposer.tsx index 8aa9326e429..cea1f2dcb23 100644 --- a/packages/lexical-react/src/LexicalNestedComposer.tsx +++ b/packages/lexical-react/src/LexicalNestedComposer.tsx @@ -8,6 +8,7 @@ import type {LexicalComposerContextType} from '@lexical/react/LexicalComposerContext'; import type {KlassConstructor, Transform} from 'lexical'; +import type {JSX} from 'react'; import {useCollaborationContext} from '@lexical/react/LexicalCollaborationContext'; import { diff --git a/packages/lexical-react/src/LexicalNodeMenuPlugin.tsx b/packages/lexical-react/src/LexicalNodeMenuPlugin.tsx index b8f685ad990..068ee9c9791 100644 --- a/packages/lexical-react/src/LexicalNodeMenuPlugin.tsx +++ b/packages/lexical-react/src/LexicalNodeMenuPlugin.tsx @@ -7,6 +7,7 @@ */ import type {MenuRenderFn, MenuResolution} from './shared/LexicalMenu'; +import type {JSX} from 'react'; import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import { diff --git a/packages/lexical-react/src/LexicalPlainTextPlugin.tsx b/packages/lexical-react/src/LexicalPlainTextPlugin.tsx index 108e6aa1914..3b6e86aab04 100644 --- a/packages/lexical-react/src/LexicalPlainTextPlugin.tsx +++ b/packages/lexical-react/src/LexicalPlainTextPlugin.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import {useLexicalEditable} from '@lexical/react/useLexicalEditable'; import * as React from 'react'; diff --git a/packages/lexical-react/src/LexicalRichTextPlugin.tsx b/packages/lexical-react/src/LexicalRichTextPlugin.tsx index 40ce57544d5..2498c87f19f 100644 --- a/packages/lexical-react/src/LexicalRichTextPlugin.tsx +++ b/packages/lexical-react/src/LexicalRichTextPlugin.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import {useLexicalEditable} from '@lexical/react/useLexicalEditable'; import * as React from 'react'; diff --git a/packages/lexical-react/src/LexicalTableOfContentsPlugin.tsx b/packages/lexical-react/src/LexicalTableOfContentsPlugin.tsx index 86f280e0d44..e1da06d7df2 100644 --- a/packages/lexical-react/src/LexicalTableOfContentsPlugin.tsx +++ b/packages/lexical-react/src/LexicalTableOfContentsPlugin.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import {$isHeadingNode, HeadingNode, HeadingTagType} from '@lexical/rich-text'; import {$getNextRightPreorderNode} from '@lexical/utils'; diff --git a/packages/lexical-react/src/LexicalTablePlugin.ts b/packages/lexical-react/src/LexicalTablePlugin.ts index 7d91b0b576c..2136adb2dbf 100644 --- a/packages/lexical-react/src/LexicalTablePlugin.ts +++ b/packages/lexical-react/src/LexicalTablePlugin.ts @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import { registerTableCellUnmergeTransform, diff --git a/packages/lexical-react/src/LexicalTreeView.tsx b/packages/lexical-react/src/LexicalTreeView.tsx index 1b7057b27ef..13b010e0a26 100644 --- a/packages/lexical-react/src/LexicalTreeView.tsx +++ b/packages/lexical-react/src/LexicalTreeView.tsx @@ -7,6 +7,7 @@ */ import type {EditorState, LexicalEditor} from 'lexical'; +import type {JSX} from 'react'; import { CustomPrintNodeFn, diff --git a/packages/lexical-react/src/LexicalTypeaheadMenuPlugin.tsx b/packages/lexical-react/src/LexicalTypeaheadMenuPlugin.tsx index da497dc9aad..9947b97a078 100644 --- a/packages/lexical-react/src/LexicalTypeaheadMenuPlugin.tsx +++ b/packages/lexical-react/src/LexicalTypeaheadMenuPlugin.tsx @@ -12,6 +12,7 @@ import type { MenuTextMatch, TriggerFn, } from './shared/LexicalMenu'; +import type {JSX} from 'react'; import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import { diff --git a/packages/lexical-react/src/shared/LexicalContentEditableElement.tsx b/packages/lexical-react/src/shared/LexicalContentEditableElement.tsx index 64db5d1709b..099619f924e 100644 --- a/packages/lexical-react/src/shared/LexicalContentEditableElement.tsx +++ b/packages/lexical-react/src/shared/LexicalContentEditableElement.tsx @@ -7,6 +7,7 @@ */ import type {LexicalEditor} from 'lexical'; +import type {JSX} from 'react'; import * as React from 'react'; import {forwardRef, Ref, useCallback, useMemo, useState} from 'react'; diff --git a/packages/lexical-react/src/shared/LexicalMenu.ts b/packages/lexical-react/src/shared/LexicalMenu.ts index cda6ca3c5cb..29897b79832 100644 --- a/packages/lexical-react/src/shared/LexicalMenu.ts +++ b/packages/lexical-react/src/shared/LexicalMenu.ts @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import {mergeRegister} from '@lexical/utils'; import { diff --git a/packages/lexical-react/src/shared/useDecorators.tsx b/packages/lexical-react/src/shared/useDecorators.tsx index e3c5a0715c5..aefda99d520 100644 --- a/packages/lexical-react/src/shared/useDecorators.tsx +++ b/packages/lexical-react/src/shared/useDecorators.tsx @@ -7,6 +7,7 @@ */ import type {LexicalEditor, NodeKey} from 'lexical'; +import type {JSX} from 'react'; import {Suspense, useEffect, useMemo, useState} from 'react'; import * as React from 'react'; diff --git a/packages/lexical-react/src/shared/useYjsCollaboration.tsx b/packages/lexical-react/src/shared/useYjsCollaboration.tsx index 457827756ee..b1928457f99 100644 --- a/packages/lexical-react/src/shared/useYjsCollaboration.tsx +++ b/packages/lexical-react/src/shared/useYjsCollaboration.tsx @@ -8,6 +8,7 @@ import type {Binding, Provider, SyncCursorPositionsFn} from '@lexical/yjs'; import type {LexicalEditor} from 'lexical'; +import type {JSX} from 'react'; import {mergeRegister} from '@lexical/utils'; import { diff --git a/packages/lexical/src/__tests__/unit/LexicalEditor.test.tsx b/packages/lexical/src/__tests__/unit/LexicalEditor.test.tsx index 6c7108c43ea..5bfed2efef9 100644 --- a/packages/lexical/src/__tests__/unit/LexicalEditor.test.tsx +++ b/packages/lexical/src/__tests__/unit/LexicalEditor.test.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {$generateHtmlFromNodes, $generateNodesFromDOM} from '@lexical/html'; import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import {ContentEditable} from '@lexical/react/LexicalContentEditable'; diff --git a/packages/lexical/src/__tests__/unit/LexicalListPlugin.test.tsx b/packages/lexical/src/__tests__/unit/LexicalListPlugin.test.tsx index 7638aef0fdb..da669e83ec6 100644 --- a/packages/lexical/src/__tests__/unit/LexicalListPlugin.test.tsx +++ b/packages/lexical/src/__tests__/unit/LexicalListPlugin.test.tsx @@ -5,6 +5,9 @@ * LICENSE file in the root directory of this source tree. * */ + +import type {JSX} from 'react'; + import {ListItemNode, ListNode} from '@lexical/list'; import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import {ContentEditable} from '@lexical/react/LexicalContentEditable'; diff --git a/packages/lexical/src/__tests__/utils/index.tsx b/packages/lexical/src/__tests__/utils/index.tsx index 3fbcaeb2554..8206d550579 100644 --- a/packages/lexical/src/__tests__/utils/index.tsx +++ b/packages/lexical/src/__tests__/utils/index.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {CodeHighlightNode, CodeNode} from '@lexical/code'; import {HashtagNode} from '@lexical/hashtag'; import {createHeadlessEditor} from '@lexical/headless'; diff --git a/scripts/__tests__/integration/fixtures/lexical-esm-astro-react/src/components/plugins/TreeViewPlugin.tsx b/scripts/__tests__/integration/fixtures/lexical-esm-astro-react/src/components/plugins/TreeViewPlugin.tsx index 62eb7425c44..f72600c947e 100644 --- a/scripts/__tests__/integration/fixtures/lexical-esm-astro-react/src/components/plugins/TreeViewPlugin.tsx +++ b/scripts/__tests__/integration/fixtures/lexical-esm-astro-react/src/components/plugins/TreeViewPlugin.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import {TreeView} from '@lexical/react/LexicalTreeView'; // import * as React from 'react'; diff --git a/scripts/__tests__/integration/fixtures/lexical-esm-nextjs/app/plugins/TreeViewPlugin.tsx b/scripts/__tests__/integration/fixtures/lexical-esm-nextjs/app/plugins/TreeViewPlugin.tsx index 62eb7425c44..f72600c947e 100644 --- a/scripts/__tests__/integration/fixtures/lexical-esm-nextjs/app/plugins/TreeViewPlugin.tsx +++ b/scripts/__tests__/integration/fixtures/lexical-esm-nextjs/app/plugins/TreeViewPlugin.tsx @@ -6,6 +6,8 @@ * */ +import type {JSX} from 'react'; + import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import {TreeView} from '@lexical/react/LexicalTreeView'; // import * as React from 'react';