Skip to content

Commit b8988a4

Browse files
committed
chore: bump dev to latest react
1 parent d2e7db5 commit b8988a4

20 files changed

Lines changed: 60 additions & 67 deletions

package-lock.json

Lines changed: 31 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@
114114
"@types/mdast": "^4.0.3",
115115
"@types/multer": "^1.4.7",
116116
"@types/node": "^20.2.5",
117-
"@types/react": "^18.2.7",
118-
"@types/react-dom": "^18.2.4",
117+
"@types/react": "^19.2.7",
118+
"@types/react-dom": "^19.2.3",
119119
"@types/unist": "^3.0.2",
120120
"@typescript-eslint/eslint-plugin": "^7.9.0",
121121
"@typescript-eslint/parser": "^7.9.0",
@@ -144,8 +144,8 @@
144144
"postcss-mixins": "^9.0.4",
145145
"postcss-nesting": "^11.2.2",
146146
"prettier": "^3.1.1",
147-
"react": "^19.1.0",
148-
"react-dom": "^19.1.0",
147+
"react": "^19.2.1",
148+
"react-dom": "^19.2.1",
149149
"semantic-release": "^25.0.2",
150150
"svgo": "^3.3.2",
151151
"terser": "^5.26.0",

src/MDXEditor.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useCellValue, useCellValues, usePublisher, useRealm } from '@mdxeditor/gurx'
2-
import React from 'react'
2+
import React, { JSX } from 'react'
33
import {
44
activeEditor$,
55
AdditionalLexicalNode,
@@ -61,7 +61,7 @@ const RichTextEditor: React.FC = () => {
6161
const setEditorRootWrapperElement = usePublisher(contentEditableWrapperElement$)
6262
const onRef = (el: HTMLDivElement | null) => {
6363
setEditorRootWrapperElement(el)
64-
setContentEditableRef({ current: el })
64+
setContentEditableRef(el ? ({ current: el } as React.RefObject<HTMLDivElement>) : null)
6565
}
6666

6767
const [contentEditableClassName, spellCheck, composerChildren, topAreaChildren, editorWrappers, placeholder, bottomAreaChildren] =
@@ -212,8 +212,8 @@ const EditorRootElement: React.FC<{
212212
const container = overlayContainer ?? document.body
213213
container.appendChild(popupContainer)
214214
editorRootElementRef.current = popupContainer
215-
setEditorRootElementRef(editorRootElementRef)
216-
setEditorWrapperElementRef(wrapperElementRef)
215+
setEditorRootElementRef(editorRootElementRef as React.RefObject<HTMLDivElement>)
216+
setEditorWrapperElementRef(wrapperElementRef as React.RefObject<HTMLDivElement>)
217217
return () => {
218218
popupContainer.remove()
219219
}
@@ -256,7 +256,7 @@ const Methods: React.FC<{ mdxRef: React.ForwardedRef<MDXEditorMethods> }> = ({ m
256256
realm.getValue(rootEditor$)?.focus(callbackFn, opts)
257257
},
258258
getContentEditableHTML: () => {
259-
return realm.getValue(contentEditableRef$)?.current?.innerHTML ?? ''
259+
return realm.getValue(contentEditableRef$)?.current.innerHTML ?? ''
260260
},
261261
getSelectionMarkdown: () => {
262262
// Return empty string in source/diff mode

src/plugins/codeblock/CodeBlockNode.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { useCellValue } from '@mdxeditor/gurx'
2+
import { JSX } from 'react'
23
import {
34
DecoratorNode,
45
DOMConversionMap,

src/plugins/directives/DirectiveNode.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react'
1+
import React, { JSX } from 'react'
22
import type { EditorConfig, LexicalEditor, LexicalNode, NodeKey, SerializedLexicalNode, Spread } from 'lexical'
33
import { DecoratorNode } from 'lexical'
44
import { Directives } from 'mdast-util-directive'

src/plugins/frontmatter/FrontmatterNode.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { DecoratorNode, EditorConfig, LexicalEditor, LexicalNode, NodeKey, SerializedLexicalNode, Spread } from 'lexical'
2-
import React from 'react'
2+
import React, { JSX } from 'react'
33
import { FrontmatterEditor } from './FrontmatterEditor'
44

55
/**

src/plugins/image/EditImageToolbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext
22
import { useCellValues, usePublisher } from '@mdxeditor/gurx'
33
import classNames from 'classnames'
44
import { $getNodeByKey } from 'lexical'
5-
import React from 'react'
5+
import React, { JSX } from 'react'
66
import { disableImageSettingsButton$, openEditImageDialog$, parseImageDimension } from '.'
77
import styles from '../../styles/ui.module.css'
88
import { iconComponentFor$, readOnly$, useTranslation } from '../core'

src/plugins/image/ImageEditor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react'
1+
import React, { JSX } from 'react'
22

33
import type { BaseSelection, LexicalEditor } from 'lexical'
44

src/plugins/image/ImageNode.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react'
1+
import React, { JSX } from 'react'
22
import type {
33
DOMConversionMap,
44
DOMConversionOutput,

src/plugins/image/ImageResizer.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import type { LexicalEditor } from 'lexical'
1010

1111
import * as React from 'react'
12+
import { JSX } from 'react'
1213
import { useRef } from 'react'
1314
import styles from '../../styles/ui.module.css'
1415
import classNames from 'classnames'

0 commit comments

Comments
 (0)