@plait/core 0.14.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.
@@ -20,6 +20,7 @@ const BOARD_TO_ROUGH_SVG = new WeakMap();
20
20
  const BOARD_TO_HOST = new WeakMap();
21
21
  const BOARD_TO_ELEMENT_HOST = new WeakMap();
22
22
  const BOARD_TO_SELECTED_ELEMENT = new WeakMap();
23
+ const BOARD_TO_MOVING_POINT_IN_BOARD = new WeakMap();
23
24
  const BOARD_TO_MOVING_POINT = new WeakMap();
24
25
  const BOARD_TO_VIEWPORT_ORIGINATION = new WeakMap();
25
26
  const BOARD_TO_IS_SELECTION_MOVING = new WeakMap();
@@ -133,6 +134,54 @@ const ThemeColors = [
133
134
  StarryThemeColor
134
135
  ];
135
136
 
137
+ // https://stackoverflow.com/a/6853926/232122
138
+ function distanceBetweenPointAndSegment(x, y, x1, y1, x2, y2) {
139
+ const A = x - x1;
140
+ const B = y - y1;
141
+ const C = x2 - x1;
142
+ const D = y2 - y1;
143
+ const dot = A * C + B * D;
144
+ const lenSquare = C * C + D * D;
145
+ let param = -1;
146
+ if (lenSquare !== 0) {
147
+ // in case of 0 length line
148
+ param = dot / lenSquare;
149
+ }
150
+ let xx, yy;
151
+ if (param < 0) {
152
+ xx = x1;
153
+ yy = y1;
154
+ }
155
+ else if (param > 1) {
156
+ xx = x2;
157
+ yy = y2;
158
+ }
159
+ else {
160
+ xx = x1 + param * C;
161
+ yy = y1 + param * D;
162
+ }
163
+ const dx = x - xx;
164
+ const dy = y - yy;
165
+ return Math.hypot(dx, dy);
166
+ }
167
+ function rotate(x1, y1, x2, y2, angle) {
168
+ // π‘Žβ€²π‘₯=(π‘Žπ‘₯βˆ’π‘π‘₯)cosπœƒβˆ’(π‘Žπ‘¦βˆ’π‘π‘¦)sinπœƒ+𝑐π‘₯
169
+ // π‘Žβ€²π‘¦=(π‘Žπ‘₯βˆ’π‘π‘₯)sinπœƒ+(π‘Žπ‘¦βˆ’π‘π‘¦)cosπœƒ+𝑐𝑦.
170
+ // https://math.stackexchange.com/questions/2204520/how-do-i-rotate-a-line-segment-in-a-specific-point-on-the-line
171
+ return [(x1 - x2) * Math.cos(angle) - (y1 - y2) * Math.sin(angle) + x2, (x1 - x2) * Math.sin(angle) + (y1 - y2) * Math.cos(angle) + y2];
172
+ }
173
+ function distanceBetweenPointAndPoint(x1, y1, x2, y2) {
174
+ const dx = x1 - x2;
175
+ const dy = y1 - y2;
176
+ return Math.hypot(dx, dy);
177
+ }
178
+ // https://stackoverflow.com/questions/5254838/calculating-distance-between-a-point-and-a-rectangular-box-nearest-point
179
+ function distanceBetweenPointAndRectangle(x, y, rect) {
180
+ var dx = Math.max(rect.x - x, 0, x - (rect.x + rect.width));
181
+ var dy = Math.max(rect.y - y, 0, y - (rect.y + rect.height));
182
+ return Math.sqrt(dx * dx + dy * dy);
183
+ }
184
+
136
185
  const PlaitBoard = {
137
186
  isBoard(value) {
138
187
  const cachedIsBoard = IS_BOARD_CACHE.get(value);
@@ -201,8 +250,16 @@ const PlaitBoard = {
201
250
  isPointer(board, pointer) {
202
251
  return board.pointer === pointer;
203
252
  },
204
- getMovingPoint(board) {
205
- return BOARD_TO_MOVING_POINT.get(board);
253
+ getMovingPointInBoard(board) {
254
+ return BOARD_TO_MOVING_POINT_IN_BOARD.get(board);
255
+ },
256
+ isMovingPointInBoard(board) {
257
+ const point = BOARD_TO_MOVING_POINT.get(board);
258
+ const rect = PlaitBoard.getBoardContainer(board).getBoundingClientRect();
259
+ if (point && distanceBetweenPointAndRectangle(point[0], point[1], rect) === 0) {
260
+ return true;
261
+ }
262
+ return false;
206
263
  },
207
264
  getThemeColors(board) {
208
265
  return (board.options.themeColors || ThemeColors);
@@ -786,6 +843,7 @@ const SINGLE_QUOTE = 222;
786
843
  const MAC_META = 224;
787
844
 
788
845
  const CLIP_BOARD_FORMAT_KEY = 'x-plait-fragment';
846
+ const HOST_CLASS_NAME = 'plait-board-container';
789
847
  const SCROLL_BAR_WIDTH = 20;
790
848
  const MAX_RADIUS = 16;
791
849
  const POINTER_BUTTON = {
@@ -847,54 +905,6 @@ const isMainPointer = (event) => {
847
905
  return event.button === POINTER_BUTTON.MAIN;
848
906
  };
849
907
 
850
- // https://stackoverflow.com/a/6853926/232122
851
- function distanceBetweenPointAndSegment(x, y, x1, y1, x2, y2) {
852
- const A = x - x1;
853
- const B = y - y1;
854
- const C = x2 - x1;
855
- const D = y2 - y1;
856
- const dot = A * C + B * D;
857
- const lenSquare = C * C + D * D;
858
- let param = -1;
859
- if (lenSquare !== 0) {
860
- // in case of 0 length line
861
- param = dot / lenSquare;
862
- }
863
- let xx, yy;
864
- if (param < 0) {
865
- xx = x1;
866
- yy = y1;
867
- }
868
- else if (param > 1) {
869
- xx = x2;
870
- yy = y2;
871
- }
872
- else {
873
- xx = x1 + param * C;
874
- yy = y1 + param * D;
875
- }
876
- const dx = x - xx;
877
- const dy = y - yy;
878
- return Math.hypot(dx, dy);
879
- }
880
- function rotate(x1, y1, x2, y2, angle) {
881
- // π‘Žβ€²π‘₯=(π‘Žπ‘₯βˆ’π‘π‘₯)cosπœƒβˆ’(π‘Žπ‘¦βˆ’π‘π‘¦)sinπœƒ+𝑐π‘₯
882
- // π‘Žβ€²π‘¦=(π‘Žπ‘₯βˆ’π‘π‘₯)sinπœƒ+(π‘Žπ‘¦βˆ’π‘π‘¦)cosπœƒ+𝑐𝑦.
883
- // https://math.stackexchange.com/questions/2204520/how-do-i-rotate-a-line-segment-in-a-specific-point-on-the-line
884
- return [(x1 - x2) * Math.cos(angle) - (y1 - y2) * Math.sin(angle) + x2, (x1 - x2) * Math.sin(angle) + (y1 - y2) * Math.cos(angle) + y2];
885
- }
886
- function distanceBetweenPointAndPoint(x1, y1, x2, y2) {
887
- const dx = x1 - x2;
888
- const dy = y1 - y2;
889
- return Math.hypot(dx, dy);
890
- }
891
- // https://stackoverflow.com/questions/5254838/calculating-distance-between-a-point-and-a-rectangular-box-nearest-point
892
- function distanceBetweenPointAndRectangle(x, y, rect) {
893
- var dx = Math.max(rect.x - x, 0, x - (rect.x + rect.width));
894
- var dy = Math.max(rect.y - y, 0, y - (rect.y + rect.height));
895
- return Math.sqrt(dx * dx + dy * dy);
896
- }
897
-
898
908
  /**
899
909
  * Extendable Custom Types Interface
900
910
  */
@@ -1405,6 +1415,25 @@ function drawLinearPath(points, options) {
1405
1415
  g.appendChild(path);
1406
1416
  return g;
1407
1417
  }
1418
+ function drawBezierPath(points, options) {
1419
+ const g = createG();
1420
+ const path = createPath();
1421
+ let polylinePath = '';
1422
+ for (let i = 0; i < points.length - 3; i += 3) {
1423
+ if (i === 0) {
1424
+ polylinePath += `M ${points[0][0]} ${points[0][1]} `;
1425
+ }
1426
+ else {
1427
+ polylinePath += `C ${points[i + 1][0]} ${points[i + 1][1]}, ${points[i + 2][0]} ${points[i + 2][1]}, ${points[i + 3][0]} ${points[i + 3][1]}`;
1428
+ }
1429
+ }
1430
+ path.setAttribute('d', polylinePath);
1431
+ path.setAttribute('stroke', `${options?.stroke}`);
1432
+ path.setAttribute('stroke-width', `${options?.strokeWidth}`);
1433
+ path.setAttribute('fill', `none`);
1434
+ g.appendChild(path);
1435
+ return g;
1436
+ }
1408
1437
 
1409
1438
  let timerId = null;
1410
1439
  const throttleRAF = (fn) => {
@@ -1893,7 +1922,7 @@ const updatePointerType = (board, pointer) => {
1893
1922
  };
1894
1923
  function updateZoom(board, newZoom, isCenter = true) {
1895
1924
  newZoom = clampZoomLevel(newZoom);
1896
- const mousePoint = PlaitBoard.getMovingPoint(board);
1925
+ const mousePoint = PlaitBoard.getMovingPointInBoard(board);
1897
1926
  const nativeElement = PlaitBoard.getBoardContainer(board);
1898
1927
  const nativeElementRect = nativeElement.getBoundingClientRect();
1899
1928
  const boardContainerRect = PlaitBoard.getBoardContainer(board).getBoundingClientRect();
@@ -2077,6 +2106,7 @@ function createBoard(children, options) {
2077
2106
  mouseup: (event) => { },
2078
2107
  globalMouseup: (event) => { },
2079
2108
  keydown: (event) => { },
2109
+ globalKeydown: (event) => { },
2080
2110
  keyup: (event) => { },
2081
2111
  dblclick: (event) => { },
2082
2112
  setFragment: (data) => { },
@@ -2599,6 +2629,56 @@ const hasOnBoardChange = (value) => {
2599
2629
  }
2600
2630
  };
2601
2631
 
2632
+ const withHotkey = (board) => {
2633
+ const { keydown, globalKeydown } = board;
2634
+ board.keydown = (event) => {
2635
+ const options = board.getPluginOptions(PlaitPluginKey.withSelection);
2636
+ if (!PlaitBoard.isReadonly(board) && options.isMultiple && isHotkey('mod+a', event)) {
2637
+ event.preventDefault();
2638
+ let elements = [];
2639
+ depthFirstRecursion(board, node => {
2640
+ elements.push(node);
2641
+ }, node => {
2642
+ if (PlaitBoard.isBoard(node) || board.isRecursion(node)) {
2643
+ return true;
2644
+ }
2645
+ else {
2646
+ return false;
2647
+ }
2648
+ }, true);
2649
+ Transforms.setSelectionWithTemporaryElements(board, elements);
2650
+ return;
2651
+ }
2652
+ keydown(event);
2653
+ };
2654
+ board.globalKeydown = (event) => {
2655
+ if (PlaitBoard.getMovingPointInBoard(board) || PlaitBoard.isMovingPointInBoard(board)) {
2656
+ if (isHotkey(['mod+=', 'mod++'], { byKey: true })(event)) {
2657
+ event.preventDefault();
2658
+ BoardTransforms.updateZoom(board, board.viewport.zoom + 0.1, false);
2659
+ return;
2660
+ }
2661
+ if (isHotkey(['mod+shift+=', 'mod+shift++'], { byKey: true })(event)) {
2662
+ event.preventDefault();
2663
+ BoardTransforms.fitViewport(board);
2664
+ return;
2665
+ }
2666
+ if (isHotkey(['mod+-', 'mod+shift+-'])(event)) {
2667
+ event.preventDefault();
2668
+ BoardTransforms.updateZoom(board, board.viewport.zoom - 0.1);
2669
+ return;
2670
+ }
2671
+ if (isHotkey(['mod+0', 'mod+shift+0'], { byKey: true })(event)) {
2672
+ event.preventDefault();
2673
+ BoardTransforms.updateZoom(board, 1);
2674
+ return;
2675
+ }
2676
+ }
2677
+ globalKeydown(event);
2678
+ };
2679
+ return board;
2680
+ };
2681
+
2602
2682
  class PlaitElementComponent {
2603
2683
  constructor(renderer2, viewContainerRef) {
2604
2684
  this.renderer2 = renderer2;
@@ -2755,7 +2835,7 @@ class PlaitBoardComponent {
2755
2835
  return this.svg.nativeElement;
2756
2836
  }
2757
2837
  get hostClass() {
2758
- return `plait-board-container pointer-${this.board.pointer} theme-${this.board.theme.themeColorMode}`;
2838
+ return `${HOST_CLASS_NAME} pointer-${this.board.pointer} theme-${this.board.theme.themeColorMode}`;
2759
2839
  }
2760
2840
  get readonly() {
2761
2841
  return this.board.options.readonly;
@@ -2796,6 +2876,11 @@ class PlaitBoardComponent {
2796
2876
  this.initializeHookListener();
2797
2877
  this.viewportScrollListener();
2798
2878
  this.elementResizeListener();
2879
+ fromEvent(document, 'mouseleave')
2880
+ .pipe(takeUntil(this.destroy$))
2881
+ .subscribe((event) => {
2882
+ BOARD_TO_MOVING_POINT.delete(this.board);
2883
+ });
2799
2884
  });
2800
2885
  BOARD_TO_COMPONENT.set(this.board, this);
2801
2886
  BOARD_TO_ROUGH_SVG.set(this.board, roughSVG);
@@ -2842,7 +2927,7 @@ class PlaitBoardComponent {
2842
2927
  initializeViewportOffset(this.board);
2843
2928
  }
2844
2929
  initializePlugins() {
2845
- let board = withHandPointer(withHistory(withSelection(withMoving(withBoard(withViewport(withOptions(createBoard(this.plaitValue, this.plaitOptions))))))));
2930
+ let board = withHotkey(withHandPointer(withHistory(withSelection(withMoving(withBoard(withViewport(withOptions(createBoard(this.plaitValue, this.plaitOptions)))))))));
2846
2931
  this.plaitPlugins.forEach(plugin => {
2847
2932
  board = plugin(board);
2848
2933
  });
@@ -2863,18 +2948,19 @@ class PlaitBoardComponent {
2863
2948
  fromEvent(this.host, 'mousemove')
2864
2949
  .pipe(takeUntil(this.destroy$))
2865
2950
  .subscribe((event) => {
2866
- BOARD_TO_MOVING_POINT.set(this.board, [event.x, event.y]);
2951
+ BOARD_TO_MOVING_POINT_IN_BOARD.set(this.board, [event.x, event.y]);
2867
2952
  this.board.mousemove(event);
2868
2953
  });
2869
2954
  fromEvent(this.host, 'mouseleave')
2870
2955
  .pipe(takeUntil(this.destroy$))
2871
2956
  .subscribe((event) => {
2872
- BOARD_TO_MOVING_POINT.delete(this.board);
2957
+ BOARD_TO_MOVING_POINT_IN_BOARD.delete(this.board);
2873
2958
  this.board.mouseleave(event);
2874
2959
  });
2875
2960
  fromEvent(document, 'mousemove')
2876
2961
  .pipe(takeUntil(this.destroy$))
2877
2962
  .subscribe((event) => {
2963
+ BOARD_TO_MOVING_POINT.set(this.board, [event.x, event.y]);
2878
2964
  this.board.globalMousemove(event);
2879
2965
  });
2880
2966
  fromEvent(this.host, 'mouseup')
@@ -2893,27 +2979,8 @@ class PlaitBoardComponent {
2893
2979
  this.board.dblclick(event);
2894
2980
  });
2895
2981
  fromEvent(document, 'keydown')
2896
- .pipe(takeUntil(this.destroy$), tap((event) => {
2897
- if (PlaitBoard.getMovingPoint(this.board)) {
2898
- if (isHotkey(['mod+=', 'mod++'], { byKey: true })(event)) {
2899
- event.preventDefault();
2900
- BoardTransforms.updateZoom(this.board, this.board.viewport.zoom + 0.1, false);
2901
- }
2902
- if (isHotkey('mod+-', { byKey: true })(event)) {
2903
- event.preventDefault();
2904
- BoardTransforms.updateZoom(this.board, this.board.viewport.zoom - 0.1);
2905
- }
2906
- if (isHotkey('mod+0', { byKey: true })(event)) {
2907
- event.preventDefault();
2908
- BoardTransforms.updateZoom(this.board, 1);
2909
- return;
2910
- }
2911
- if (isHotkey('mod+shift+=', { byKey: true })(event)) {
2912
- event.preventDefault();
2913
- BoardTransforms.fitViewport(this.board);
2914
- return;
2915
- }
2916
- }
2982
+ .pipe(takeUntil(this.destroy$), tap(event => {
2983
+ this.board.globalKeydown(event);
2917
2984
  }), filter(event => this.isFocused && !PlaitBoard.hasBeenTextEditing(this.board) && !hasInputOrTextareaTarget(event.target)))
2918
2985
  .subscribe((event) => {
2919
2986
  this.board?.keydown(event);
@@ -2932,7 +2999,7 @@ class PlaitBoardComponent {
2932
2999
  fromEvent(document, 'paste')
2933
3000
  .pipe(takeUntil(this.destroy$), filter(() => this.isFocused && !PlaitBoard.isReadonly(this.board) && !PlaitBoard.hasBeenTextEditing(this.board)))
2934
3001
  .subscribe((clipboardEvent) => {
2935
- const mousePoint = PlaitBoard.getMovingPoint(this.board);
3002
+ const mousePoint = PlaitBoard.getMovingPointInBoard(this.board);
2936
3003
  if (mousePoint) {
2937
3004
  const targetPoint = transformPoint(this.board, toPoint(mousePoint[0], mousePoint[1], this.host));
2938
3005
  this.board.insertFragment(clipboardEvent.clipboardData, targetPoint);
@@ -3249,5 +3316,5 @@ function createModModifierKeys() {
3249
3316
  * Generated bundle index. Do not edit.
3250
3317
  */
3251
3318
 
3252
- export { A, ALT, APOSTROPHE, AT_SIGN, B, BACKSLASH, BACKSPACE, BOARD_TO_COMPONENT, BOARD_TO_ELEMENT_HOST, BOARD_TO_HOST, BOARD_TO_IS_SELECTION_MOVING, BOARD_TO_MOVING_ELEMENT, BOARD_TO_MOVING_POINT, BOARD_TO_ON_CHANGE, BOARD_TO_ROUGH_SVG, BOARD_TO_SELECTED_ELEMENT, BOARD_TO_TEMPORARY_ELEMENTS, BOARD_TO_VIEWPORT_ORIGINATION, BoardTransforms, C, CAPS_LOCK, CLIP_BOARD_FORMAT_KEY, CLOSE_SQUARE_BRACKET, COMMA, CONTEXT_MENU, CONTROL, ColorfulThemeColor, D, DASH, DELETE, DOWN_ARROW, DarkThemeColor, DefaultThemeColor, E, EIGHT, ELEMENT_TO_COMPONENT, END, ENTER, EQUALS, ESCAPE, F, F1, F10, F11, F12, F2, F3, F4, F5, F6, F7, F8, F9, FF_EQUALS, FF_MINUS, FF_MUTE, FF_SEMICOLON, FF_VOLUME_DOWN, FF_VOLUME_UP, FIRST_MEDIA, FIVE, FLUSHING, FOUR, G, H, HOME, I, INSERT, IS_APPLE, IS_BOARD_CACHE, IS_CHROME, IS_CHROME_LEGACY, IS_EDGE_LEGACY, IS_FIREFOX, IS_IOS, IS_MAC, IS_SAFARI, IS_TEXT_EDITABLE, J, K, L, LAST_MEDIA, LEFT_ARROW, M, MAC_ENTER, MAC_META, MAC_WK_CMD_LEFT, MAC_WK_CMD_RIGHT, MAX_RADIUS, MERGING, META, MUTE, N, NINE, NODE_TO_INDEX, NODE_TO_PARENT, NS, NUMPAD_DIVIDE, NUMPAD_EIGHT, NUMPAD_FIVE, NUMPAD_FOUR, NUMPAD_MINUS, NUMPAD_MULTIPLY, NUMPAD_NINE, NUMPAD_ONE, NUMPAD_PERIOD, NUMPAD_PLUS, NUMPAD_SEVEN, NUMPAD_SIX, NUMPAD_THREE, NUMPAD_TWO, NUMPAD_ZERO, NUM_CENTER, NUM_LOCK, O, ONE, OPEN_SQUARE_BRACKET, P, PAGE_DOWN, PAGE_UP, PATH_REFS, PAUSE, PERIOD, PLUS_SIGN, POINTER_BUTTON, PRINT_SCREEN, Path, PlaitBoard, PlaitBoardComponent, PlaitChildrenElement, PlaitElement, PlaitElementComponent, PlaitHistoryBoard, PlaitIslandBaseComponent, PlaitIslandPopoverBaseComponent, PlaitModule, PlaitNode, PlaitOperation, PlaitPluginElementComponent, PlaitPluginKey, PlaitPointerType, Point, Q, QUESTION_MARK, R, RIGHT_ARROW, RectangleClient, RetroThemeColor, S, SAVING, SCROLL_BAR_WIDTH, SCROLL_LOCK, SELECTION_BORDER_COLOR, SELECTION_FILL_COLOR, SEMICOLON, SEVEN, SHIFT, SINGLE_QUOTE, SIX, SLASH, SPACE, Selection, SoftThemeColor, StarryThemeColor, T, TAB, THREE, TILDE, TWO, ThemeColorMode, ThemeColors, Transforms, U, UP_ARROW, V, VOLUME_DOWN, VOLUME_UP, Viewport, W, X, Y, Z, ZERO, addMovingElements, addSelectedElement, arrowPoints, cacheMovingElements, cacheSelectedElements, clampZoomLevel, clearNodeWeakMap, clearSelectedElement, clearSelectionMoving, clearViewportOrigination, createFakeEvent, createForeignObject, createG, createKeyboardEvent, createModModifierKeys, createMouseEvent, createPath, createPointerEvent, createSVG, createSelectionOuterG, createTestingBoard, createText, createTouchEvent, debounce, deleteTemporaryElements, depthFirstRecursion, distanceBetweenPointAndPoint, distanceBetweenPointAndRectangle, distanceBetweenPointAndSegment, downloadImage, drawAbstractRoundRectangle, drawArrow, drawCircle, drawLine, drawLinearPath, drawRoundRectangle, fakeNodeWeakMap, getBoardRectangle, getElementHostBBox, getHitElementOfRoot, getHitElements, getMovingElements, getRealScrollBarWidth, getRectangleByElements, getSelectedElements, getTemporaryElements, getViewBox, getViewBoxCenterPoint, getViewportContainerRect, getViewportOrigination, hasBeforeContextChange, hasInputOrTextareaTarget, hasOnBoardChange, hasOnContextChanged, hotkeys, idCreator, initializeViewBox, initializeViewportContainer, initializeViewportOffset, inverse, isDOMElement, isDOMNode, isFromScrolling, isFromViewportChange, isHitElements, isInPlaitBoard, isMainPointer, isNullOrUndefined, isSecondaryPointer, isSelectedElement, isSelectionMoving, isSetViewportOperation, normalizePoint, removeMovingElements, removeSelectedElement, rotate, scrollToRectangle, setIsFromScrolling, setIsFromViewportChange, setSVGViewBox, setSelectionMoving, shouldClear, shouldMerge, shouldSave, throttleRAF, toImage, toPoint, transformPoint, transformPoints, updateForeignObject, updateViewportContainerScroll, updateViewportOffset, updateViewportOrigination, withMoving, withOptions, withSelection };
3319
+ export { A, ALT, APOSTROPHE, AT_SIGN, B, BACKSLASH, BACKSPACE, BOARD_TO_COMPONENT, BOARD_TO_ELEMENT_HOST, BOARD_TO_HOST, BOARD_TO_IS_SELECTION_MOVING, BOARD_TO_MOVING_ELEMENT, BOARD_TO_MOVING_POINT, BOARD_TO_MOVING_POINT_IN_BOARD, BOARD_TO_ON_CHANGE, BOARD_TO_ROUGH_SVG, BOARD_TO_SELECTED_ELEMENT, BOARD_TO_TEMPORARY_ELEMENTS, BOARD_TO_VIEWPORT_ORIGINATION, BoardTransforms, C, CAPS_LOCK, CLIP_BOARD_FORMAT_KEY, CLOSE_SQUARE_BRACKET, COMMA, CONTEXT_MENU, CONTROL, ColorfulThemeColor, D, DASH, DELETE, DOWN_ARROW, DarkThemeColor, DefaultThemeColor, E, EIGHT, ELEMENT_TO_COMPONENT, END, ENTER, EQUALS, ESCAPE, F, F1, F10, F11, F12, F2, F3, F4, F5, F6, F7, F8, F9, FF_EQUALS, FF_MINUS, FF_MUTE, FF_SEMICOLON, FF_VOLUME_DOWN, FF_VOLUME_UP, FIRST_MEDIA, FIVE, FLUSHING, FOUR, G, H, HOME, HOST_CLASS_NAME, I, INSERT, IS_APPLE, IS_BOARD_CACHE, IS_CHROME, IS_CHROME_LEGACY, IS_EDGE_LEGACY, IS_FIREFOX, IS_IOS, IS_MAC, IS_SAFARI, IS_TEXT_EDITABLE, J, K, L, LAST_MEDIA, LEFT_ARROW, M, MAC_ENTER, MAC_META, MAC_WK_CMD_LEFT, MAC_WK_CMD_RIGHT, MAX_RADIUS, MERGING, META, MUTE, N, NINE, NODE_TO_INDEX, NODE_TO_PARENT, NS, NUMPAD_DIVIDE, NUMPAD_EIGHT, NUMPAD_FIVE, NUMPAD_FOUR, NUMPAD_MINUS, NUMPAD_MULTIPLY, NUMPAD_NINE, NUMPAD_ONE, NUMPAD_PERIOD, NUMPAD_PLUS, NUMPAD_SEVEN, NUMPAD_SIX, NUMPAD_THREE, NUMPAD_TWO, NUMPAD_ZERO, NUM_CENTER, NUM_LOCK, O, ONE, OPEN_SQUARE_BRACKET, P, PAGE_DOWN, PAGE_UP, PATH_REFS, PAUSE, PERIOD, PLUS_SIGN, POINTER_BUTTON, PRINT_SCREEN, Path, PlaitBoard, PlaitBoardComponent, PlaitChildrenElement, PlaitElement, PlaitElementComponent, PlaitHistoryBoard, PlaitIslandBaseComponent, PlaitIslandPopoverBaseComponent, PlaitModule, PlaitNode, PlaitOperation, PlaitPluginElementComponent, PlaitPluginKey, PlaitPointerType, Point, Q, QUESTION_MARK, R, RIGHT_ARROW, RectangleClient, RetroThemeColor, S, SAVING, SCROLL_BAR_WIDTH, SCROLL_LOCK, SELECTION_BORDER_COLOR, SELECTION_FILL_COLOR, SEMICOLON, SEVEN, SHIFT, SINGLE_QUOTE, SIX, SLASH, SPACE, Selection, SoftThemeColor, StarryThemeColor, T, TAB, THREE, TILDE, TWO, ThemeColorMode, ThemeColors, Transforms, U, UP_ARROW, V, VOLUME_DOWN, VOLUME_UP, Viewport, W, X, Y, Z, ZERO, addMovingElements, addSelectedElement, arrowPoints, cacheMovingElements, cacheSelectedElements, clampZoomLevel, clearNodeWeakMap, clearSelectedElement, clearSelectionMoving, clearViewportOrigination, createFakeEvent, createForeignObject, createG, createKeyboardEvent, createModModifierKeys, createMouseEvent, createPath, createPointerEvent, createSVG, createSelectionOuterG, createTestingBoard, createText, createTouchEvent, debounce, deleteTemporaryElements, depthFirstRecursion, distanceBetweenPointAndPoint, distanceBetweenPointAndRectangle, distanceBetweenPointAndSegment, downloadImage, drawAbstractRoundRectangle, drawArrow, drawBezierPath, drawCircle, drawLine, drawLinearPath, drawRoundRectangle, fakeNodeWeakMap, getBoardRectangle, getElementHostBBox, getHitElementOfRoot, getHitElements, getMovingElements, getRealScrollBarWidth, getRectangleByElements, getSelectedElements, getTemporaryElements, getViewBox, getViewBoxCenterPoint, getViewportContainerRect, getViewportOrigination, hasBeforeContextChange, hasInputOrTextareaTarget, hasOnBoardChange, hasOnContextChanged, hotkeys, idCreator, initializeViewBox, initializeViewportContainer, initializeViewportOffset, inverse, isDOMElement, isDOMNode, isFromScrolling, isFromViewportChange, isHitElements, isInPlaitBoard, isMainPointer, isNullOrUndefined, isSecondaryPointer, isSelectedElement, isSelectionMoving, isSetViewportOperation, normalizePoint, removeMovingElements, removeSelectedElement, rotate, scrollToRectangle, setIsFromScrolling, setIsFromViewportChange, setSVGViewBox, setSelectionMoving, shouldClear, shouldMerge, shouldSave, throttleRAF, toImage, toPoint, transformPoint, transformPoints, updateForeignObject, updateViewportContainerScroll, updateViewportOffset, updateViewportOrigination, withMoving, withOptions, withSelection };
3253
3320
  //# sourceMappingURL=plait-core.mjs.map