lexical 0.31.3-nightly.20250523.0 → 0.31.3-nightly.20250527.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 CHANGED
@@ -582,7 +582,7 @@ class StateConfig {
582
582
  /**
583
583
  * Create a StateConfig for the given string key and StateValueConfig.
584
584
  *
585
- * The key must be locally unique. In dev you wil get a key collision error
585
+ * The key must be locally unique. In dev you will get a key collision error
586
586
  * when you use two separate StateConfig on the same node with the same key.
587
587
  *
588
588
  * The returned StateConfig value should be used with {@link $getState} and
@@ -2167,8 +2167,8 @@ function onClick(event, editor) {
2167
2167
  }
2168
2168
  }
2169
2169
  }
2170
- } else if (event.pointerType === 'touch') {
2171
- // This is used to update the selection on touch devices when the user clicks on text after a
2170
+ } else if (event.pointerType === 'touch' || event.pointerType === 'pen') {
2171
+ // This is used to update the selection on touch devices (including Apple Pencil) when the user clicks on text after a
2172
2172
  // node selection. See isSelectionChangeFromMouseDown for the inverse
2173
2173
  const domAnchorNode = domSelection.anchorNode;
2174
2174
  // If the user is attempting to click selection back onto text, then
@@ -2188,7 +2188,7 @@ function onPointerDown(event, editor) {
2188
2188
  // TODO implement text drag & drop
2189
2189
  const target = event.target;
2190
2190
  const pointerType = event.pointerType;
2191
- if (isDOMNode(target) && pointerType !== 'touch' && event.button === 0) {
2191
+ if (isDOMNode(target) && pointerType !== 'touch' && pointerType !== 'pen' && event.button === 0) {
2192
2192
  updateEditorSync(editor, () => {
2193
2193
  // Drag & drop should not recompute selection until mouse up; otherwise the initially
2194
2194
  // selected content is lost.
@@ -10456,7 +10456,7 @@ class LexicalEditor {
10456
10456
  };
10457
10457
  }
10458
10458
  }
10459
- LexicalEditor.version = "0.31.3-nightly.20250523.0+dev.cjs";
10459
+ LexicalEditor.version = "0.31.3-nightly.20250527.0+dev.cjs";
10460
10460
 
10461
10461
  let keyCounter = 1;
10462
10462
  function resetRandomKey() {
@@ -12948,7 +12948,7 @@ function $removeTextFromCaretRange(initialRange, sliceMode = 'removeEmptySlices'
12948
12948
  }
12949
12949
 
12950
12950
  /**
12951
- * Determine if the two caret orgins are in distinct blocks that
12951
+ * Determine if the two caret origins are in distinct blocks that
12952
12952
  * should be merged.
12953
12953
  *
12954
12954
  * The returned block pair will be the closest blocks to their
package/Lexical.dev.mjs CHANGED
@@ -580,7 +580,7 @@ class StateConfig {
580
580
  /**
581
581
  * Create a StateConfig for the given string key and StateValueConfig.
582
582
  *
583
- * The key must be locally unique. In dev you wil get a key collision error
583
+ * The key must be locally unique. In dev you will get a key collision error
584
584
  * when you use two separate StateConfig on the same node with the same key.
585
585
  *
586
586
  * The returned StateConfig value should be used with {@link $getState} and
@@ -2165,8 +2165,8 @@ function onClick(event, editor) {
2165
2165
  }
2166
2166
  }
2167
2167
  }
2168
- } else if (event.pointerType === 'touch') {
2169
- // This is used to update the selection on touch devices when the user clicks on text after a
2168
+ } else if (event.pointerType === 'touch' || event.pointerType === 'pen') {
2169
+ // This is used to update the selection on touch devices (including Apple Pencil) when the user clicks on text after a
2170
2170
  // node selection. See isSelectionChangeFromMouseDown for the inverse
2171
2171
  const domAnchorNode = domSelection.anchorNode;
2172
2172
  // If the user is attempting to click selection back onto text, then
@@ -2186,7 +2186,7 @@ function onPointerDown(event, editor) {
2186
2186
  // TODO implement text drag & drop
2187
2187
  const target = event.target;
2188
2188
  const pointerType = event.pointerType;
2189
- if (isDOMNode(target) && pointerType !== 'touch' && event.button === 0) {
2189
+ if (isDOMNode(target) && pointerType !== 'touch' && pointerType !== 'pen' && event.button === 0) {
2190
2190
  updateEditorSync(editor, () => {
2191
2191
  // Drag & drop should not recompute selection until mouse up; otherwise the initially
2192
2192
  // selected content is lost.
@@ -10454,7 +10454,7 @@ class LexicalEditor {
10454
10454
  };
10455
10455
  }
10456
10456
  }
10457
- LexicalEditor.version = "0.31.3-nightly.20250523.0+dev.esm";
10457
+ LexicalEditor.version = "0.31.3-nightly.20250527.0+dev.esm";
10458
10458
 
10459
10459
  let keyCounter = 1;
10460
10460
  function resetRandomKey() {
@@ -12946,7 +12946,7 @@ function $removeTextFromCaretRange(initialRange, sliceMode = 'removeEmptySlices'
12946
12946
  }
12947
12947
 
12948
12948
  /**
12949
- * Determine if the two caret orgins are in distinct blocks that
12949
+ * Determine if the two caret origins are in distinct blocks that
12950
12950
  * should be merged.
12951
12951
  *
12952
12952
  * The returned block pair will be the closest blocks to their