@plait/core 0.15.0 → 0.15.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.
@@ -4,7 +4,7 @@ import rough from 'roughjs/bin/rough';
4
4
  import { timer, Subject, fromEvent } from 'rxjs';
5
5
  import { takeUntil, filter, tap } from 'rxjs/operators';
6
6
  import produce, { createDraft, finishDraft, isDraft } from 'immer';
7
- import isHotkey$1, { isKeyHotkey, isHotkey } from 'is-hotkey';
7
+ import { isKeyHotkey, isHotkey } from 'is-hotkey';
8
8
  import * as i1 from '@angular/common';
9
9
  import { CommonModule } from '@angular/common';
10
10
 
@@ -2633,7 +2633,7 @@ const withHotkey = (board) => {
2633
2633
  const { keydown, globalKeydown } = board;
2634
2634
  board.keydown = (event) => {
2635
2635
  const options = board.getPluginOptions(PlaitPluginKey.withSelection);
2636
- if (!PlaitBoard.isReadonly(board) && options.isMultiple && isHotkey$1('mod+a', event)) {
2636
+ if (!PlaitBoard.isReadonly(board) && options.isMultiple && isHotkey('mod+a', event)) {
2637
2637
  event.preventDefault();
2638
2638
  let elements = [];
2639
2639
  depthFirstRecursion(board, node => {
@@ -2653,22 +2653,22 @@ const withHotkey = (board) => {
2653
2653
  };
2654
2654
  board.globalKeydown = (event) => {
2655
2655
  if (PlaitBoard.getMovingPointInBoard(board) || PlaitBoard.isMovingPointInBoard(board)) {
2656
- if (isHotkey$1(['mod+=', 'mod++'], { byKey: true })(event)) {
2656
+ if (isHotkey(['mod+=', 'mod++'], { byKey: true })(event)) {
2657
2657
  event.preventDefault();
2658
2658
  BoardTransforms.updateZoom(board, board.viewport.zoom + 0.1, false);
2659
2659
  return;
2660
2660
  }
2661
- if (isHotkey$1(['mod+shift+=', 'mod+shift++'], { byKey: true })(event)) {
2661
+ if (isHotkey(['mod+shift+=', 'mod+shift++'], { byKey: true })(event)) {
2662
2662
  event.preventDefault();
2663
2663
  BoardTransforms.fitViewport(board);
2664
2664
  return;
2665
2665
  }
2666
- if (isHotkey$1(['mod+-', 'mod+shift+-'])(event)) {
2666
+ if (isHotkey(['mod+-', 'mod+shift+-'])(event)) {
2667
2667
  event.preventDefault();
2668
2668
  BoardTransforms.updateZoom(board, board.viewport.zoom - 0.1);
2669
2669
  return;
2670
2670
  }
2671
- if (isHotkey$1(['mod+0', 'mod+shift+0'], { byKey: true })(event)) {
2671
+ if (isHotkey(['mod+0', 'mod+shift+0'], { byKey: true })(event)) {
2672
2672
  event.preventDefault();
2673
2673
  BoardTransforms.updateZoom(board, 1);
2674
2674
  return;