slate-react 0.133.2-20261010231908 → 0.133.2

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.
@@ -33880,7 +33880,7 @@
33880
33880
  applyPendingSelection();
33881
33881
  var userMarks = EDITOR_TO_USER_MARKS.get(editor);
33882
33882
  EDITOR_TO_USER_MARKS["delete"](editor);
33883
- if (userMarks !== undefined) {
33883
+ if (userMarks !== undefined && userMarks !== editor.marks) {
33884
33884
  editor.marks = userMarks;
33885
33885
  editor.onChange();
33886
33886
  }
@@ -33975,6 +33975,9 @@
33975
33975
  if (hasPendingAction()) {
33976
33976
  _flush();
33977
33977
  }
33978
+ if (actionTimeoutId) {
33979
+ clearTimeout(actionTimeoutId);
33980
+ }
33978
33981
  EDITOR_TO_PENDING_ACTION.set(editor, {
33979
33982
  at: at,
33980
33983
  run: run
@@ -34118,11 +34121,15 @@
34118
34121
  };
34119
34122
  var range = slate.Editor.range(editor, point, point);
34120
34123
  handleUserSelect(range);
34121
- return storeDiff(targetRange.anchor.path, {
34124
+ storeDiff(targetRange.anchor.path, {
34122
34125
  text: '',
34123
34126
  end: end.offset,
34124
34127
  start: start.offset
34125
34128
  });
34129
+ if (type === 'deleteContentBackward') {
34130
+ scheduleFlush();
34131
+ }
34132
+ return;
34126
34133
  }
34127
34134
  return scheduleAction(function () {
34128
34135
  return slate.Editor.deleteFragment(editor, {
@@ -34175,11 +34182,13 @@
34175
34182
  // as an action to ensure correct behavior (mostly happens with mark placeholders)
34176
34183
  var nativeCollapsed = isDOMSelection(nativeTargetRange) ? nativeTargetRange.isCollapsed : !!((_nativeTargetRange = nativeTargetRange) !== null && _nativeTargetRange !== void 0 && _nativeTargetRange.collapsed);
34177
34184
  if (canStoreDiff && nativeCollapsed && slate.Range.isCollapsed(targetRange) && _anchor.offset > 0) {
34178
- return storeDiff(_anchor.path, {
34185
+ storeDiff(_anchor.path, {
34179
34186
  text: '',
34180
34187
  start: _anchor.offset - 1,
34181
34188
  end: _anchor.offset
34182
34189
  });
34190
+ scheduleFlush();
34191
+ return;
34183
34192
  }
34184
34193
  return scheduleAction(function () {
34185
34194
  return slate.Editor.deleteBackward(editor);
@@ -34438,6 +34447,9 @@
34438
34447
  };
34439
34448
  var scheduleFlush = function scheduleFlush() {
34440
34449
  if (!hasPendingAction()) {
34450
+ if (actionTimeoutId) {
34451
+ clearTimeout(actionTimeoutId);
34452
+ }
34441
34453
  actionTimeoutId = setTimeout(_flush);
34442
34454
  }
34443
34455
  };