lexical 0.27.0 → 0.27.1
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 -6
- package/Lexical.dev.mjs +8 -6
- package/Lexical.prod.js +1 -1
- package/Lexical.prod.mjs +1 -1
- package/package.json +1 -1
package/Lexical.dev.js
CHANGED
|
@@ -3216,7 +3216,9 @@ class LexicalNode {
|
|
|
3216
3216
|
* @param node - the other node to find the common ancestor of.
|
|
3217
3217
|
*/
|
|
3218
3218
|
getCommonAncestor(node) {
|
|
3219
|
-
const
|
|
3219
|
+
const a = $isElementNode(this) ? this : this.getParent();
|
|
3220
|
+
const b = $isElementNode(node) ? node : node.getParent();
|
|
3221
|
+
const result = a && b ? $getCommonAncestor(a, b) : null;
|
|
3220
3222
|
return result ? result.commonAncestor /* TODO this type cast is a lie, but fixing it would break backwards compatibility */ : null;
|
|
3221
3223
|
}
|
|
3222
3224
|
|
|
@@ -8897,6 +8899,10 @@ class ElementNode extends LexicalNode {
|
|
|
8897
8899
|
// (see https://github.com/facebook/lexical/pull/4025)
|
|
8898
8900
|
element.style.paddingInlineStart = `${indent * 40}px`;
|
|
8899
8901
|
}
|
|
8902
|
+
const direction = this.getDirection();
|
|
8903
|
+
if (direction) {
|
|
8904
|
+
element.dir = direction;
|
|
8905
|
+
}
|
|
8900
8906
|
}
|
|
8901
8907
|
return {
|
|
8902
8908
|
element
|
|
@@ -9288,10 +9294,6 @@ class ParagraphNode extends ElementNode {
|
|
|
9288
9294
|
}
|
|
9289
9295
|
const formatType = this.getFormatType();
|
|
9290
9296
|
element.style.textAlign = formatType;
|
|
9291
|
-
const direction = this.getDirection();
|
|
9292
|
-
if (direction) {
|
|
9293
|
-
element.dir = direction;
|
|
9294
|
-
}
|
|
9295
9297
|
}
|
|
9296
9298
|
return {
|
|
9297
9299
|
element
|
|
@@ -10221,7 +10223,7 @@ class LexicalEditor {
|
|
|
10221
10223
|
};
|
|
10222
10224
|
}
|
|
10223
10225
|
}
|
|
10224
|
-
LexicalEditor.version = "0.27.
|
|
10226
|
+
LexicalEditor.version = "0.27.1+dev.cjs";
|
|
10225
10227
|
|
|
10226
10228
|
let keyCounter = 1;
|
|
10227
10229
|
function resetRandomKey() {
|
package/Lexical.dev.mjs
CHANGED
|
@@ -3214,7 +3214,9 @@ class LexicalNode {
|
|
|
3214
3214
|
* @param node - the other node to find the common ancestor of.
|
|
3215
3215
|
*/
|
|
3216
3216
|
getCommonAncestor(node) {
|
|
3217
|
-
const
|
|
3217
|
+
const a = $isElementNode(this) ? this : this.getParent();
|
|
3218
|
+
const b = $isElementNode(node) ? node : node.getParent();
|
|
3219
|
+
const result = a && b ? $getCommonAncestor(a, b) : null;
|
|
3218
3220
|
return result ? result.commonAncestor /* TODO this type cast is a lie, but fixing it would break backwards compatibility */ : null;
|
|
3219
3221
|
}
|
|
3220
3222
|
|
|
@@ -8895,6 +8897,10 @@ class ElementNode extends LexicalNode {
|
|
|
8895
8897
|
// (see https://github.com/facebook/lexical/pull/4025)
|
|
8896
8898
|
element.style.paddingInlineStart = `${indent * 40}px`;
|
|
8897
8899
|
}
|
|
8900
|
+
const direction = this.getDirection();
|
|
8901
|
+
if (direction) {
|
|
8902
|
+
element.dir = direction;
|
|
8903
|
+
}
|
|
8898
8904
|
}
|
|
8899
8905
|
return {
|
|
8900
8906
|
element
|
|
@@ -9286,10 +9292,6 @@ class ParagraphNode extends ElementNode {
|
|
|
9286
9292
|
}
|
|
9287
9293
|
const formatType = this.getFormatType();
|
|
9288
9294
|
element.style.textAlign = formatType;
|
|
9289
|
-
const direction = this.getDirection();
|
|
9290
|
-
if (direction) {
|
|
9291
|
-
element.dir = direction;
|
|
9292
|
-
}
|
|
9293
9295
|
}
|
|
9294
9296
|
return {
|
|
9295
9297
|
element
|
|
@@ -10219,7 +10221,7 @@ class LexicalEditor {
|
|
|
10219
10221
|
};
|
|
10220
10222
|
}
|
|
10221
10223
|
}
|
|
10222
|
-
LexicalEditor.version = "0.27.
|
|
10224
|
+
LexicalEditor.version = "0.27.1+dev.esm";
|
|
10223
10225
|
|
|
10224
10226
|
let keyCounter = 1;
|
|
10225
10227
|
function resetRandomKey() {
|