lexical 0.32.2-nightly.20250624.0 → 0.32.2-nightly.20250626.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/Lexical.dev.js +13 -1
- package/Lexical.dev.mjs +13 -1
- package/Lexical.js.flow +1 -1
- package/Lexical.prod.js +1 -1
- package/Lexical.prod.mjs +1 -1
- package/LexicalNodeState.d.ts +6 -0
- package/package.json +1 -1
package/Lexical.dev.js
CHANGED
|
@@ -1209,6 +1209,16 @@ function hasUnequalRecordEntry(keys, sourceState, otherState) {
|
|
|
1209
1209
|
return false;
|
|
1210
1210
|
}
|
|
1211
1211
|
|
|
1212
|
+
/**
|
|
1213
|
+
* @internal
|
|
1214
|
+
*
|
|
1215
|
+
* Clones the NodeState for a given node. Handles aliasing if the state references the from node.
|
|
1216
|
+
*/
|
|
1217
|
+
function $cloneNodeState(from, to) {
|
|
1218
|
+
const state = from.__state;
|
|
1219
|
+
return state && state.node === from ? state.getWritable(to) : state;
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1212
1222
|
/**
|
|
1213
1223
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1214
1224
|
*
|
|
@@ -5092,6 +5102,7 @@ class TextNode extends LexicalNode {
|
|
|
5092
5102
|
writableNode.__format = format;
|
|
5093
5103
|
writableNode.__style = style;
|
|
5094
5104
|
writableNode.__detail = detail;
|
|
5105
|
+
writableNode.__state = $cloneNodeState(self, writableNode);
|
|
5095
5106
|
hasReplacedSelf = true;
|
|
5096
5107
|
} else {
|
|
5097
5108
|
// For the first part, update the existing node
|
|
@@ -5106,6 +5117,7 @@ class TextNode extends LexicalNode {
|
|
|
5106
5117
|
sibling.__format = format;
|
|
5107
5118
|
sibling.__style = style;
|
|
5108
5119
|
sibling.__detail = detail;
|
|
5120
|
+
sibling.__state = $cloneNodeState(self, sibling);
|
|
5109
5121
|
const siblingKey = sibling.__key;
|
|
5110
5122
|
if (compositionKey === key) {
|
|
5111
5123
|
$setCompositionKey(siblingKey);
|
|
@@ -10711,7 +10723,7 @@ class LexicalEditor {
|
|
|
10711
10723
|
};
|
|
10712
10724
|
}
|
|
10713
10725
|
}
|
|
10714
|
-
LexicalEditor.version = "0.32.2-nightly.
|
|
10726
|
+
LexicalEditor.version = "0.32.2-nightly.20250626.0+dev.cjs";
|
|
10715
10727
|
|
|
10716
10728
|
let pendingNodeToClone = null;
|
|
10717
10729
|
function setPendingNodeToClone(pendingNode) {
|
package/Lexical.dev.mjs
CHANGED
|
@@ -1207,6 +1207,16 @@ function hasUnequalRecordEntry(keys, sourceState, otherState) {
|
|
|
1207
1207
|
return false;
|
|
1208
1208
|
}
|
|
1209
1209
|
|
|
1210
|
+
/**
|
|
1211
|
+
* @internal
|
|
1212
|
+
*
|
|
1213
|
+
* Clones the NodeState for a given node. Handles aliasing if the state references the from node.
|
|
1214
|
+
*/
|
|
1215
|
+
function $cloneNodeState(from, to) {
|
|
1216
|
+
const state = from.__state;
|
|
1217
|
+
return state && state.node === from ? state.getWritable(to) : state;
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1210
1220
|
/**
|
|
1211
1221
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1212
1222
|
*
|
|
@@ -5090,6 +5100,7 @@ class TextNode extends LexicalNode {
|
|
|
5090
5100
|
writableNode.__format = format;
|
|
5091
5101
|
writableNode.__style = style;
|
|
5092
5102
|
writableNode.__detail = detail;
|
|
5103
|
+
writableNode.__state = $cloneNodeState(self, writableNode);
|
|
5093
5104
|
hasReplacedSelf = true;
|
|
5094
5105
|
} else {
|
|
5095
5106
|
// For the first part, update the existing node
|
|
@@ -5104,6 +5115,7 @@ class TextNode extends LexicalNode {
|
|
|
5104
5115
|
sibling.__format = format;
|
|
5105
5116
|
sibling.__style = style;
|
|
5106
5117
|
sibling.__detail = detail;
|
|
5118
|
+
sibling.__state = $cloneNodeState(self, sibling);
|
|
5107
5119
|
const siblingKey = sibling.__key;
|
|
5108
5120
|
if (compositionKey === key) {
|
|
5109
5121
|
$setCompositionKey(siblingKey);
|
|
@@ -10709,7 +10721,7 @@ class LexicalEditor {
|
|
|
10709
10721
|
};
|
|
10710
10722
|
}
|
|
10711
10723
|
}
|
|
10712
|
-
LexicalEditor.version = "0.32.2-nightly.
|
|
10724
|
+
LexicalEditor.version = "0.32.2-nightly.20250626.0+dev.esm";
|
|
10713
10725
|
|
|
10714
10726
|
let pendingNodeToClone = null;
|
|
10715
10727
|
function setPendingNodeToClone(pendingNode) {
|
package/Lexical.js.flow
CHANGED
|
@@ -1351,7 +1351,7 @@ export type StateValueConfig<V> = {
|
|
|
1351
1351
|
|
|
1352
1352
|
export type UnionToIntersection<T> = (
|
|
1353
1353
|
// $FlowFixMe[unclear-type]
|
|
1354
|
-
T extends
|
|
1354
|
+
T extends mixed ? (x: T) => mixed : empty
|
|
1355
1355
|
// $FlowFixMe[unclear-type]
|
|
1356
1356
|
) extends (x: infer R) => any
|
|
1357
1357
|
? R
|