@lexical/selection 0.52.1-nightly.20261028.0 → 0.53.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.
|
@@ -284,21 +284,15 @@ function $trimTextContentFromAnchor(editor, anchor, delCount) {
|
|
|
284
284
|
}
|
|
285
285
|
while (remaining > 0 && currentNode !== null) {
|
|
286
286
|
if ($isElementNode(currentNode)) {
|
|
287
|
-
// Annotation breaks a circular inference through the loop (TS7022),
|
|
288
|
-
// remove when the deprecated generic signatures from #8661 are removed
|
|
289
287
|
const lastDescendant = currentNode.getLastDescendant();
|
|
290
288
|
if (lastDescendant !== null) {
|
|
291
289
|
currentNode = lastDescendant;
|
|
292
290
|
}
|
|
293
291
|
}
|
|
294
|
-
// Annotation breaks a circular inference through the loop (TS7022),
|
|
295
|
-
// remove when the deprecated generic signatures from #8661 are removed
|
|
296
292
|
let nextNode = currentNode.getPreviousSibling();
|
|
297
293
|
let additionalElementWhitespace = 0;
|
|
298
294
|
if (nextNode === null) {
|
|
299
295
|
let parent = currentNode.getParentOrThrow();
|
|
300
|
-
// Annotation breaks a circular inference through the loop (TS7022),
|
|
301
|
-
// remove when the deprecated generic signatures from #8661 are removed
|
|
302
296
|
let parentSibling = parent.getPreviousSibling();
|
|
303
297
|
while (parentSibling === null) {
|
|
304
298
|
parent = parent.getParent();
|
|
@@ -641,8 +635,6 @@ function $removeParentEmptyElements(startingNode) {
|
|
|
641
635
|
let node = startingNode;
|
|
642
636
|
while (node !== null && !$isRootOrShadowRoot(node)) {
|
|
643
637
|
const latest = node.getLatest();
|
|
644
|
-
// Annotation breaks a circular inference through the loop (TS7022),
|
|
645
|
-
// remove when the deprecated generic signatures from #8661 are removed
|
|
646
638
|
const parentNode = node.getParent();
|
|
647
639
|
if (latest.getChildrenSize() === 0) {
|
|
648
640
|
node.remove(true);
|
|
@@ -736,8 +728,6 @@ function $wrapNodesImpl(selection, nodes, nodesLength, createElement, wrappingEl
|
|
|
736
728
|
let target = firstNodeBlock.isInline() ? firstNodeBlock.getParentOrThrow() : firstNodeBlock;
|
|
737
729
|
let targetIsPrevSibling = false;
|
|
738
730
|
while (target !== null) {
|
|
739
|
-
// Annotation breaks a circular inference through the loop (TS7022),
|
|
740
|
-
// remove when the deprecated generic signatures from #8661 are removed
|
|
741
731
|
const prevSibling = target.getPreviousSibling();
|
|
742
732
|
if (prevSibling !== null) {
|
|
743
733
|
target = prevSibling;
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"selection"
|
|
10
10
|
],
|
|
11
11
|
"license": "MIT",
|
|
12
|
-
"version": "0.
|
|
12
|
+
"version": "0.53.0",
|
|
13
13
|
"main": "./dist/LexicalSelection.js",
|
|
14
14
|
"types": "./dist/typescript-too-old.d.ts",
|
|
15
15
|
"repository": {
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@lexical/internal": "0.
|
|
34
|
-
"lexical": "0.
|
|
33
|
+
"@lexical/internal": "0.53.0",
|
|
34
|
+
"lexical": "0.53.0"
|
|
35
35
|
},
|
|
36
36
|
"files": [
|
|
37
37
|
"dist",
|
package/src/lexical-node.ts
CHANGED
|
@@ -129,22 +129,16 @@ export function $trimTextContentFromAnchor(
|
|
|
129
129
|
|
|
130
130
|
while (remaining > 0 && currentNode !== null) {
|
|
131
131
|
if ($isElementNode(currentNode)) {
|
|
132
|
-
// Annotation breaks a circular inference through the loop (TS7022),
|
|
133
|
-
// remove when the deprecated generic signatures from #8661 are removed
|
|
134
132
|
const lastDescendant: null | LexicalNode =
|
|
135
133
|
currentNode.getLastDescendant();
|
|
136
134
|
if (lastDescendant !== null) {
|
|
137
135
|
currentNode = lastDescendant;
|
|
138
136
|
}
|
|
139
137
|
}
|
|
140
|
-
// Annotation breaks a circular inference through the loop (TS7022),
|
|
141
|
-
// remove when the deprecated generic signatures from #8661 are removed
|
|
142
138
|
let nextNode: LexicalNode | null = currentNode.getPreviousSibling();
|
|
143
139
|
let additionalElementWhitespace = 0;
|
|
144
140
|
if (nextNode === null) {
|
|
145
141
|
let parent: LexicalNode | null = currentNode.getParentOrThrow();
|
|
146
|
-
// Annotation breaks a circular inference through the loop (TS7022),
|
|
147
|
-
// remove when the deprecated generic signatures from #8661 are removed
|
|
148
142
|
let parentSibling: LexicalNode | null = parent.getPreviousSibling();
|
|
149
143
|
|
|
150
144
|
while (parentSibling === null) {
|
package/src/range-selection.ts
CHANGED
|
@@ -207,8 +207,6 @@ function $removeParentEmptyElements(startingNode: ElementNode): void {
|
|
|
207
207
|
|
|
208
208
|
while (node !== null && !$isRootOrShadowRoot(node)) {
|
|
209
209
|
const latest = node.getLatest();
|
|
210
|
-
// Annotation breaks a circular inference through the loop (TS7022),
|
|
211
|
-
// remove when the deprecated generic signatures from #8661 are removed
|
|
212
210
|
const parentNode: ElementNode | null = node.getParent();
|
|
213
211
|
|
|
214
212
|
if (latest.getChildrenSize() === 0) {
|
|
@@ -355,8 +353,6 @@ export function $wrapNodesImpl(
|
|
|
355
353
|
|
|
356
354
|
let targetIsPrevSibling = false;
|
|
357
355
|
while (target !== null) {
|
|
358
|
-
// Annotation breaks a circular inference through the loop (TS7022),
|
|
359
|
-
// remove when the deprecated generic signatures from #8661 are removed
|
|
360
356
|
const prevSibling: LexicalNode | null = target.getPreviousSibling();
|
|
361
357
|
|
|
362
358
|
if (prevSibling !== null) {
|