lexical 0.29.1-nightly.20250331.0 → 0.29.1-nightly.20250401.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 +8 -5
- package/Lexical.dev.mjs +8 -5
- package/Lexical.prod.js +1 -1
- package/Lexical.prod.mjs +1 -1
- package/caret/LexicalCaret.d.ts +1 -1
- package/package.json +1 -1
package/Lexical.dev.js
CHANGED
|
@@ -10291,7 +10291,7 @@ class LexicalEditor {
|
|
|
10291
10291
|
};
|
|
10292
10292
|
}
|
|
10293
10293
|
}
|
|
10294
|
-
LexicalEditor.version = "0.29.1-nightly.
|
|
10294
|
+
LexicalEditor.version = "0.29.1-nightly.20250401.0+dev.cjs";
|
|
10295
10295
|
|
|
10296
10296
|
let keyCounter = 1;
|
|
10297
10297
|
function resetRandomKey() {
|
|
@@ -12091,7 +12091,7 @@ function $getTextPointCaret(origin, direction, offset) {
|
|
|
12091
12091
|
|
|
12092
12092
|
/**
|
|
12093
12093
|
* Get a normalized offset into a TextNode given a numeric offset or a
|
|
12094
|
-
* direction for which end of the string to use. Throws if the offset
|
|
12094
|
+
* direction for which end of the string to use. Throws in dev if the offset
|
|
12095
12095
|
* is not in the bounds of the text content size.
|
|
12096
12096
|
*
|
|
12097
12097
|
* @param origin a TextNode
|
|
@@ -12100,9 +12100,12 @@ function $getTextPointCaret(origin, direction, offset) {
|
|
|
12100
12100
|
*/
|
|
12101
12101
|
function $getTextNodeOffset(origin, offset) {
|
|
12102
12102
|
const size = origin.getTextContentSize();
|
|
12103
|
-
|
|
12104
|
-
if (
|
|
12105
|
-
|
|
12103
|
+
let numericOffset = offset === 'next' ? size : offset === 'previous' ? 0 : offset;
|
|
12104
|
+
if (numericOffset < 0 || numericOffset > size) {
|
|
12105
|
+
{
|
|
12106
|
+
formatDevErrorMessage(`$getTextNodeOffset: invalid offset ${String(offset)} for size ${String(size)} at key ${origin.getKey()}`);
|
|
12107
|
+
} // Clamp invalid offsets in prod
|
|
12108
|
+
numericOffset = numericOffset < 0 ? 0 : size;
|
|
12106
12109
|
}
|
|
12107
12110
|
return numericOffset;
|
|
12108
12111
|
}
|
package/Lexical.dev.mjs
CHANGED
|
@@ -10289,7 +10289,7 @@ class LexicalEditor {
|
|
|
10289
10289
|
};
|
|
10290
10290
|
}
|
|
10291
10291
|
}
|
|
10292
|
-
LexicalEditor.version = "0.29.1-nightly.
|
|
10292
|
+
LexicalEditor.version = "0.29.1-nightly.20250401.0+dev.esm";
|
|
10293
10293
|
|
|
10294
10294
|
let keyCounter = 1;
|
|
10295
10295
|
function resetRandomKey() {
|
|
@@ -12089,7 +12089,7 @@ function $getTextPointCaret(origin, direction, offset) {
|
|
|
12089
12089
|
|
|
12090
12090
|
/**
|
|
12091
12091
|
* Get a normalized offset into a TextNode given a numeric offset or a
|
|
12092
|
-
* direction for which end of the string to use. Throws if the offset
|
|
12092
|
+
* direction for which end of the string to use. Throws in dev if the offset
|
|
12093
12093
|
* is not in the bounds of the text content size.
|
|
12094
12094
|
*
|
|
12095
12095
|
* @param origin a TextNode
|
|
@@ -12098,9 +12098,12 @@ function $getTextPointCaret(origin, direction, offset) {
|
|
|
12098
12098
|
*/
|
|
12099
12099
|
function $getTextNodeOffset(origin, offset) {
|
|
12100
12100
|
const size = origin.getTextContentSize();
|
|
12101
|
-
|
|
12102
|
-
if (
|
|
12103
|
-
|
|
12101
|
+
let numericOffset = offset === 'next' ? size : offset === 'previous' ? 0 : offset;
|
|
12102
|
+
if (numericOffset < 0 || numericOffset > size) {
|
|
12103
|
+
{
|
|
12104
|
+
formatDevErrorMessage(`$getTextNodeOffset: invalid offset ${String(offset)} for size ${String(size)} at key ${origin.getKey()}`);
|
|
12105
|
+
} // Clamp invalid offsets in prod
|
|
12106
|
+
numericOffset = numericOffset < 0 ? 0 : size;
|
|
12104
12107
|
}
|
|
12105
12108
|
return numericOffset;
|
|
12106
12109
|
}
|