@sendbird/actionbook-core 0.10.10 → 0.10.11

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/dist/ui/index.js CHANGED
@@ -3590,7 +3590,25 @@ var joinListItemBackward = (state, dispatch) => {
3590
3590
  }
3591
3591
  return liftListItem(listItem)(state, dispatch);
3592
3592
  };
3593
+ var backspaceDeleteFirstEmptyParagraph = (state, dispatch) => {
3594
+ const { $from } = state.selection;
3595
+ if (!state.selection.empty) return false;
3596
+ if ($from.parent.type.name !== "paragraph") return false;
3597
+ if (!isEffectivelyEmpty($from.parent)) return false;
3598
+ if ($from.depth !== 1) return false;
3599
+ const indexInDoc = $from.index(0);
3600
+ if (indexInDoc !== 0) return false;
3601
+ if (state.doc.childCount < 2) return false;
3602
+ if (dispatch) {
3603
+ const from = $from.before(1);
3604
+ const to = $from.after(1);
3605
+ const tr = state.tr.delete(from, to);
3606
+ dispatch(tr.scrollIntoView());
3607
+ }
3608
+ return true;
3609
+ };
3593
3610
  var backspaceCommand = chainCommands(
3611
+ backspaceDeleteFirstEmptyParagraph,
3594
3612
  backspaceDeleteEmptyBlock,
3595
3613
  backspaceAfterList,
3596
3614
  backspaceAfterLeafBlock,