@lexical/react 0.43.0 → 0.43.1-nightly.20260413.0
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/LexicalCollaborationContext.dev.js +2 -0
- package/LexicalCollaborationContext.dev.mjs +2 -0
- package/LexicalCollaborationPlugin.dev.js +4 -0
- package/LexicalCollaborationPlugin.dev.mjs +4 -0
- package/LexicalContentEditable.dev.js +1 -0
- package/LexicalContentEditable.dev.mjs +1 -0
- package/LexicalEditorRefPlugin.dev.js +1 -1
- package/LexicalEditorRefPlugin.dev.mjs +1 -1
- package/LexicalEditorRefPlugin.prod.js +1 -1
- package/LexicalEditorRefPlugin.prod.mjs +1 -1
- package/LexicalExtensionComponent.dev.js +1 -0
- package/LexicalExtensionComponent.dev.mjs +1 -0
- package/LexicalTablePlugin.dev.js +1 -0
- package/LexicalTablePlugin.dev.mjs +1 -0
- package/package.json +18 -18
|
@@ -56,9 +56,11 @@ function useCollaborationContext(username, color) {
|
|
|
56
56
|
}
|
|
57
57
|
collabContext = collabContext ?? UNSAFE_GLOBAL_CONTEXT;
|
|
58
58
|
if (username != null) {
|
|
59
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
59
60
|
collabContext.name = username;
|
|
60
61
|
}
|
|
61
62
|
if (color != null) {
|
|
63
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
62
64
|
collabContext.color = color;
|
|
63
65
|
}
|
|
64
66
|
return collabContext;
|
|
@@ -54,9 +54,11 @@ function useCollaborationContext(username, color) {
|
|
|
54
54
|
}
|
|
55
55
|
collabContext = collabContext ?? UNSAFE_GLOBAL_CONTEXT;
|
|
56
56
|
if (username != null) {
|
|
57
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
57
58
|
collabContext.name = username;
|
|
58
59
|
}
|
|
59
60
|
if (color != null) {
|
|
61
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
60
62
|
collabContext.color = color;
|
|
61
63
|
}
|
|
62
64
|
return collabContext;
|
|
@@ -292,6 +292,7 @@ function useAwareness(binding, provider) {
|
|
|
292
292
|
function useYjsCursors(binding, cursorsContainerRef) {
|
|
293
293
|
return React.useMemo(() => {
|
|
294
294
|
const ref = element => {
|
|
295
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
295
296
|
binding.cursorsContainer = element;
|
|
296
297
|
};
|
|
297
298
|
return /*#__PURE__*/reactDom.createPortal(/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
@@ -477,6 +478,7 @@ function CollaborationPlugin({
|
|
|
477
478
|
}
|
|
478
479
|
isProviderInitialized.current = true;
|
|
479
480
|
const newProvider = providerFactory(id, yjsDocMap);
|
|
481
|
+
// eslint-disable-next-line react-hooks/set-state-in-effect
|
|
480
482
|
setProvider(newProvider);
|
|
481
483
|
setDoc(yjsDocMap.get(id));
|
|
482
484
|
return () => {
|
|
@@ -493,6 +495,7 @@ function CollaborationPlugin({
|
|
|
493
495
|
}
|
|
494
496
|
isBindingInitialized.current = true;
|
|
495
497
|
const newBinding = yjs.createBinding(editor, provider, id, doc || yjsDocMap.get(id), yjsDocMap, excludedProperties);
|
|
498
|
+
// eslint-disable-next-line react-hooks/set-state-in-effect
|
|
496
499
|
setBinding(newBinding);
|
|
497
500
|
return () => {
|
|
498
501
|
newBinding.root.destroy(newBinding);
|
|
@@ -569,6 +572,7 @@ function CollaborationPluginV2__EXPERIMENTAL({
|
|
|
569
572
|
}
|
|
570
573
|
const useCollabActive = (collabContext, editor) => {
|
|
571
574
|
React.useEffect(() => {
|
|
575
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
572
576
|
collabContext.isCollabActive = true;
|
|
573
577
|
return () => {
|
|
574
578
|
// Resetting flag only when unmount top level editor collab plugin. Nested
|
|
@@ -278,6 +278,7 @@ function useAwareness(binding, provider) {
|
|
|
278
278
|
function useYjsCursors(binding, cursorsContainerRef) {
|
|
279
279
|
return useMemo(() => {
|
|
280
280
|
const ref = element => {
|
|
281
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
281
282
|
binding.cursorsContainer = element;
|
|
282
283
|
};
|
|
283
284
|
return /*#__PURE__*/createPortal(/*#__PURE__*/jsx("div", {
|
|
@@ -463,6 +464,7 @@ function CollaborationPlugin({
|
|
|
463
464
|
}
|
|
464
465
|
isProviderInitialized.current = true;
|
|
465
466
|
const newProvider = providerFactory(id, yjsDocMap);
|
|
467
|
+
// eslint-disable-next-line react-hooks/set-state-in-effect
|
|
466
468
|
setProvider(newProvider);
|
|
467
469
|
setDoc(yjsDocMap.get(id));
|
|
468
470
|
return () => {
|
|
@@ -479,6 +481,7 @@ function CollaborationPlugin({
|
|
|
479
481
|
}
|
|
480
482
|
isBindingInitialized.current = true;
|
|
481
483
|
const newBinding = createBinding(editor, provider, id, doc || yjsDocMap.get(id), yjsDocMap, excludedProperties);
|
|
484
|
+
// eslint-disable-next-line react-hooks/set-state-in-effect
|
|
482
485
|
setBinding(newBinding);
|
|
483
486
|
return () => {
|
|
484
487
|
newBinding.root.destroy(newBinding);
|
|
@@ -555,6 +558,7 @@ function CollaborationPluginV2__EXPERIMENTAL({
|
|
|
555
558
|
}
|
|
556
559
|
const useCollabActive = (collabContext, editor) => {
|
|
557
560
|
useEffect(() => {
|
|
561
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
558
562
|
collabContext.isCollabActive = true;
|
|
559
563
|
return () => {
|
|
560
564
|
// Resetting flag only when unmount top level editor collab plugin. Nested
|
|
@@ -215,6 +215,7 @@ function Placeholder({
|
|
|
215
215
|
const showPlaceholder = useCanShowPlaceholder(editor);
|
|
216
216
|
const [isEditable, setEditable] = react.useState(editor.isEditable());
|
|
217
217
|
react.useLayoutEffect(() => {
|
|
218
|
+
// eslint-disable-next-line react-hooks/set-state-in-effect
|
|
218
219
|
setEditable(editor.isEditable());
|
|
219
220
|
return editor.registerEditableListener(currentIsEditable => {
|
|
220
221
|
setEditable(currentIsEditable);
|
|
@@ -213,6 +213,7 @@ function Placeholder({
|
|
|
213
213
|
const showPlaceholder = useCanShowPlaceholder(editor);
|
|
214
214
|
const [isEditable, setEditable] = useState(editor.isEditable());
|
|
215
215
|
useLayoutEffect(() => {
|
|
216
|
+
// eslint-disable-next-line react-hooks/set-state-in-effect
|
|
216
217
|
setEditable(editor.isEditable());
|
|
217
218
|
return editor.registerEditableListener(currentIsEditable => {
|
|
218
219
|
setEditable(currentIsEditable);
|
|
@@ -46,7 +46,7 @@ function EditorRefPlugin({
|
|
|
46
46
|
React__namespace.useEffect(() => {
|
|
47
47
|
if (typeof editorRef === 'function') {
|
|
48
48
|
editorRef(editor);
|
|
49
|
-
} else if (typeof editorRef === 'object') {
|
|
49
|
+
} else if (typeof editorRef === 'object' && editorRef !== null) {
|
|
50
50
|
editorRef.current = editor;
|
|
51
51
|
}
|
|
52
52
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -31,7 +31,7 @@ function EditorRefPlugin({
|
|
|
31
31
|
React.useEffect(() => {
|
|
32
32
|
if (typeof editorRef === 'function') {
|
|
33
33
|
editorRef(editor);
|
|
34
|
-
} else if (typeof editorRef === 'object') {
|
|
34
|
+
} else if (typeof editorRef === 'object' && editorRef !== null) {
|
|
35
35
|
editorRef.current = editor;
|
|
36
36
|
}
|
|
37
37
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
"use strict";var e=require("@lexical/react/LexicalComposerContext");function t(e){var t=Object.create(null);if(e)for(var r in e)t[r]=e[r];return t.default=e,t}var r=t(require("react"));exports.EditorRefPlugin=function({editorRef:t}){const[
|
|
9
|
+
"use strict";var e=require("@lexical/react/LexicalComposerContext");function t(e){var t=Object.create(null);if(e)for(var r in e)t[r]=e[r];return t.default=e,t}var r=t(require("react"));exports.EditorRefPlugin=function({editorRef:t}){const[n]=e.useLexicalComposerContext();return r.useEffect(()=>{"function"==typeof t?t(n):"object"==typeof t&&null!==t&&(t.current=n)},[n]),null};
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import{useLexicalComposerContext as t}from"@lexical/react/LexicalComposerContext";import*as e from"react";function o({editorRef:o}){const[r]=t();return e.useEffect(()=>{"function"==typeof o?o(r):"object"==typeof o&&(o.current=r)},[r]),null}export{o as EditorRefPlugin};
|
|
9
|
+
import{useLexicalComposerContext as t}from"@lexical/react/LexicalComposerContext";import*as e from"react";function o({editorRef:o}){const[r]=t();return e.useEffect(()=>{"function"==typeof o?o(r):"object"==typeof o&&null!==o&&(o.current=r)},[r]),null}export{o as EditorRefPlugin};
|
|
@@ -73,6 +73,7 @@ function TablePlugin({
|
|
|
73
73
|
function usePropSignal(value) {
|
|
74
74
|
const [configSignal] = react.useState(() => extension.signal(value));
|
|
75
75
|
if (configSignal.peek() !== value) {
|
|
76
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
76
77
|
configSignal.value = value;
|
|
77
78
|
}
|
|
78
79
|
return configSignal;
|
|
@@ -71,6 +71,7 @@ function TablePlugin({
|
|
|
71
71
|
function usePropSignal(value) {
|
|
72
72
|
const [configSignal] = useState(() => signal(value));
|
|
73
73
|
if (configSignal.peek() !== value) {
|
|
74
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
74
75
|
configSignal.value = value;
|
|
75
76
|
}
|
|
76
77
|
return configSignal;
|
package/package.json
CHANGED
|
@@ -8,26 +8,26 @@
|
|
|
8
8
|
"rich-text"
|
|
9
9
|
],
|
|
10
10
|
"license": "MIT",
|
|
11
|
-
"version": "0.43.0",
|
|
11
|
+
"version": "0.43.1-nightly.20260413.0",
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@floating-ui/react": "^0.27.16",
|
|
14
|
-
"@lexical/devtools-core": "0.43.0",
|
|
15
|
-
"@lexical/dragon": "0.43.0",
|
|
16
|
-
"@lexical/extension": "0.43.0",
|
|
17
|
-
"@lexical/hashtag": "0.43.0",
|
|
18
|
-
"@lexical/history": "0.43.0",
|
|
19
|
-
"@lexical/link": "0.43.0",
|
|
20
|
-
"@lexical/list": "0.43.0",
|
|
21
|
-
"@lexical/mark": "0.43.0",
|
|
22
|
-
"@lexical/markdown": "0.43.0",
|
|
23
|
-
"@lexical/overflow": "0.43.0",
|
|
24
|
-
"@lexical/plain-text": "0.43.0",
|
|
25
|
-
"@lexical/rich-text": "0.43.0",
|
|
26
|
-
"@lexical/table": "0.43.0",
|
|
27
|
-
"@lexical/text": "0.43.0",
|
|
28
|
-
"@lexical/utils": "0.43.0",
|
|
29
|
-
"@lexical/yjs": "0.43.0",
|
|
30
|
-
"lexical": "0.43.0",
|
|
14
|
+
"@lexical/devtools-core": "0.43.1-nightly.20260413.0",
|
|
15
|
+
"@lexical/dragon": "0.43.1-nightly.20260413.0",
|
|
16
|
+
"@lexical/extension": "0.43.1-nightly.20260413.0",
|
|
17
|
+
"@lexical/hashtag": "0.43.1-nightly.20260413.0",
|
|
18
|
+
"@lexical/history": "0.43.1-nightly.20260413.0",
|
|
19
|
+
"@lexical/link": "0.43.1-nightly.20260413.0",
|
|
20
|
+
"@lexical/list": "0.43.1-nightly.20260413.0",
|
|
21
|
+
"@lexical/mark": "0.43.1-nightly.20260413.0",
|
|
22
|
+
"@lexical/markdown": "0.43.1-nightly.20260413.0",
|
|
23
|
+
"@lexical/overflow": "0.43.1-nightly.20260413.0",
|
|
24
|
+
"@lexical/plain-text": "0.43.1-nightly.20260413.0",
|
|
25
|
+
"@lexical/rich-text": "0.43.1-nightly.20260413.0",
|
|
26
|
+
"@lexical/table": "0.43.1-nightly.20260413.0",
|
|
27
|
+
"@lexical/text": "0.43.1-nightly.20260413.0",
|
|
28
|
+
"@lexical/utils": "0.43.1-nightly.20260413.0",
|
|
29
|
+
"@lexical/yjs": "0.43.1-nightly.20260413.0",
|
|
30
|
+
"lexical": "0.43.1-nightly.20260413.0",
|
|
31
31
|
"react-error-boundary": "^6.0.0"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|