@plait/core 0.24.0-next.10 → 0.24.0-next.12

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.
@@ -504,6 +504,9 @@ const RectangleClient = {
504
504
  [rectangle.x + rectangle.width / 2, rectangle.y + rectangle.height],
505
505
  [rectangle.x, rectangle.y + rectangle.height / 2]
506
506
  ];
507
+ },
508
+ getConnectionPoint: (rectangle, point) => {
509
+ return [rectangle.x + rectangle.width * point[0], rectangle.y + rectangle.height * point[1]];
507
510
  }
508
511
  };
509
512
 
@@ -1815,6 +1818,14 @@ const ThemeColors = [
1815
1818
  StarryThemeColor
1816
1819
  ];
1817
1820
 
1821
+ var Direction;
1822
+ (function (Direction) {
1823
+ Direction["left"] = "left";
1824
+ Direction["top"] = "top";
1825
+ Direction["right"] = "right";
1826
+ Direction["bottom"] = "bottom";
1827
+ })(Direction || (Direction = {}));
1828
+
1818
1829
  function getRectangleByElements(board, elements, recursion) {
1819
1830
  const boundaryBox = {
1820
1831
  left: Number.MAX_VALUE,
@@ -2805,6 +2816,7 @@ function withViewport(board) {
2805
2816
  return board;
2806
2817
  }
2807
2818
 
2819
+ const ALIGN_TOLERANCE = 2;
2808
2820
  class ReactionManager {
2809
2821
  constructor(board, activeElements, activeRectangle) {
2810
2822
  this.board = board;
@@ -2833,13 +2845,8 @@ class ReactionManager {
2833
2845
  handleAlign() {
2834
2846
  const alignRectangles = this.getAlignRectangle();
2835
2847
  const g = createG();
2836
- const alignLines = [];
2848
+ let alignLines = [];
2837
2849
  const offset = 12;
2838
- const options = {
2839
- stroke: SELECTION_BORDER_COLOR,
2840
- strokeWidth: 1,
2841
- strokeLineDash: [4, 4]
2842
- };
2843
2850
  let deltaX = 0;
2844
2851
  let deltaY = 0;
2845
2852
  let isCorrectX = false;
@@ -2847,7 +2854,7 @@ class ReactionManager {
2847
2854
  for (let alignRectangle of alignRectangles) {
2848
2855
  const closestDistances = this.calculateClosestDistances(this.activeRectangle, alignRectangle);
2849
2856
  let canDrawHorizontal = false;
2850
- if (!isCorrectX && closestDistances.absXDistance < 5) {
2857
+ if (!isCorrectX && closestDistances.absXDistance < ALIGN_TOLERANCE) {
2851
2858
  deltaX = closestDistances.xDistance;
2852
2859
  this.activeRectangle.x -= deltaX;
2853
2860
  isCorrectX = true;
@@ -2897,7 +2904,7 @@ class ReactionManager {
2897
2904
  isCorrectX = true;
2898
2905
  }
2899
2906
  let canDrawVertical = false;
2900
- if (!isCorrectY && closestDistances.absYDistance < 5) {
2907
+ if (!isCorrectY && closestDistances.absYDistance < ALIGN_TOLERANCE) {
2901
2908
  deltaY = closestDistances.yDistance;
2902
2909
  this.activeRectangle.y -= deltaY;
2903
2910
  isCorrectY = true;
@@ -2946,13 +2953,33 @@ class ReactionManager {
2946
2953
  }
2947
2954
  }
2948
2955
  }
2956
+ const alignDeltaX = deltaX;
2957
+ const alignDeltaY = deltaY;
2958
+ this.activeRectangle.x += deltaX;
2959
+ const distributeHorizontalResult = this.alignDistribute(alignRectangles, true);
2960
+ const distributeVerticalResult = this.alignDistribute(alignRectangles, false);
2961
+ const distributeLines = [...distributeHorizontalResult.distributeLines, ...distributeVerticalResult.distributeLines];
2962
+ if (distributeHorizontalResult.delta) {
2963
+ deltaX = distributeHorizontalResult.delta;
2964
+ if (alignDeltaX !== deltaX) {
2965
+ alignLines[0] = [];
2966
+ alignLines[1] = [];
2967
+ alignLines[2] = [];
2968
+ }
2969
+ }
2970
+ if (distributeVerticalResult.delta) {
2971
+ deltaY = distributeVerticalResult.delta;
2972
+ if (alignDeltaY !== deltaY) {
2973
+ alignLines[3] = [];
2974
+ alignLines[4] = [];
2975
+ alignLines[5] = [];
2976
+ }
2977
+ }
2949
2978
  if (alignLines.length) {
2950
- alignLines.forEach(points => {
2951
- if (!points.length)
2952
- return;
2953
- const xAlign = PlaitBoard.getRoughSVG(this.board).line(points[0], points[1], points[2], points[3], options);
2954
- g.appendChild(xAlign);
2955
- });
2979
+ this.drawAlignLines(alignLines, g);
2980
+ }
2981
+ if (distributeLines.length) {
2982
+ this.drawDistributeLines(distributeLines, g);
2956
2983
  }
2957
2984
  return { deltaX, deltaY, g };
2958
2985
  }
@@ -2984,6 +3011,175 @@ class ReactionManager {
2984
3011
  indexY
2985
3012
  };
2986
3013
  }
3014
+ alignDistribute(alignRectangles, isHorizontal) {
3015
+ let distributeLines = [];
3016
+ let delta = 0;
3017
+ let rectangles = [];
3018
+ const axis = isHorizontal ? 'x' : 'y';
3019
+ const side = isHorizontal ? 'width' : 'height';
3020
+ const activeRectangleCenter = this.activeRectangle[axis] + this.activeRectangle[side] / 2;
3021
+ alignRectangles.forEach(rec => {
3022
+ const isCross = isHorizontal ? isHorizontalCross(rec, this.activeRectangle) : isVerticalCross(rec, this.activeRectangle);
3023
+ if (isCross && !RectangleClient.isHit(rec, this.activeRectangle)) {
3024
+ rectangles.push(rec);
3025
+ }
3026
+ });
3027
+ rectangles = [...rectangles, this.activeRectangle].sort((a, b) => a[axis] - b[axis]);
3028
+ const refArray = [];
3029
+ let distributeDistance = 0;
3030
+ let beforeIndex = undefined;
3031
+ let afterIndex = undefined;
3032
+ for (let i = 0; i < rectangles.length; i++) {
3033
+ for (let j = i + 1; j < rectangles.length; j++) {
3034
+ const before = rectangles[i];
3035
+ const after = rectangles[j];
3036
+ const distance = after[axis] - (before[axis] + before[side]);
3037
+ let dif = Infinity;
3038
+ if (refArray[i]?.after) {
3039
+ refArray[i].after.push({ distance, index: j });
3040
+ }
3041
+ else {
3042
+ refArray[i] = { ...refArray[i], after: [{ distance, index: j }] };
3043
+ }
3044
+ if (refArray[j]?.before) {
3045
+ refArray[j].before.push({ distance, index: i });
3046
+ }
3047
+ else {
3048
+ refArray[j] = { ...refArray[j], before: [{ distance, index: i }] };
3049
+ }
3050
+ //middle
3051
+ let _center = (before[axis] + before[side] + after[axis]) / 2;
3052
+ dif = Math.abs(activeRectangleCenter - _center);
3053
+ if (dif < ALIGN_TOLERANCE) {
3054
+ distributeDistance = (after[axis] - (before[axis] + before[side]) - this.activeRectangle[side]) / 2;
3055
+ delta = activeRectangleCenter - _center;
3056
+ beforeIndex = i;
3057
+ afterIndex = j;
3058
+ }
3059
+ //after
3060
+ const distanceRight = after[axis] - (before[axis] + before[side]);
3061
+ _center = after[axis] + after[side] + distanceRight + this.activeRectangle[side] / 2;
3062
+ dif = Math.abs(activeRectangleCenter - _center);
3063
+ if (!distributeDistance && dif < ALIGN_TOLERANCE) {
3064
+ distributeDistance = distanceRight;
3065
+ beforeIndex = j;
3066
+ delta = activeRectangleCenter - _center;
3067
+ }
3068
+ //before
3069
+ const distanceBefore = after[axis] - (before[axis] + before[side]);
3070
+ _center = before[axis] - distanceBefore - this.activeRectangle[side] / 2;
3071
+ dif = Math.abs(activeRectangleCenter - _center);
3072
+ if (!distributeDistance && dif < ALIGN_TOLERANCE) {
3073
+ distributeDistance = distanceBefore;
3074
+ afterIndex = i;
3075
+ delta = activeRectangleCenter - _center;
3076
+ }
3077
+ }
3078
+ }
3079
+ const activeIndex = rectangles.indexOf(this.activeRectangle);
3080
+ let beforeIndexes = [];
3081
+ let afterIndexes = [];
3082
+ if (beforeIndex !== undefined) {
3083
+ beforeIndexes.push(beforeIndex);
3084
+ findRectangle(distributeDistance, refArray[beforeIndex], 'before', beforeIndexes);
3085
+ }
3086
+ if (afterIndex !== undefined) {
3087
+ afterIndexes.push(afterIndex);
3088
+ findRectangle(distributeDistance, refArray[afterIndex], 'after', afterIndexes);
3089
+ }
3090
+ if (beforeIndexes.length || afterIndexes.length) {
3091
+ const indexArr = [...beforeIndexes.reverse(), activeIndex, ...afterIndexes];
3092
+ this.activeRectangle[axis] -= delta;
3093
+ for (let i = 1; i < indexArr.length; i++) {
3094
+ distributeLines.push(getLinePoints(rectangles[indexArr[i - 1]], rectangles[indexArr[i]]));
3095
+ }
3096
+ }
3097
+ function findRectangle(distance, ref, direction, rectangleIndexes) {
3098
+ const arr = ref[direction];
3099
+ const index = refArray.indexOf(ref);
3100
+ if ((index === 0 && direction === 'before') || (index === refArray.length - 1 && direction === 'after'))
3101
+ return;
3102
+ for (let i = 0; i < arr.length; i++) {
3103
+ if (Math.abs(arr[i].distance - distance) < 0.1) {
3104
+ rectangleIndexes.push(arr[i].index);
3105
+ findRectangle(distance, refArray[arr[i].index], direction, rectangleIndexes);
3106
+ return;
3107
+ }
3108
+ }
3109
+ }
3110
+ function getLinePoints(beforeRectangle, afterRectangle) {
3111
+ const oppositeAxis = axis === 'x' ? 'y' : 'x';
3112
+ const oppositeSide = side === 'width' ? 'height' : 'width';
3113
+ const align = [
3114
+ beforeRectangle[oppositeAxis],
3115
+ beforeRectangle[oppositeAxis] + beforeRectangle[oppositeSide],
3116
+ afterRectangle[oppositeAxis],
3117
+ afterRectangle[oppositeAxis] + afterRectangle[oppositeSide]
3118
+ ];
3119
+ const sortArr = align.sort((a, b) => a - b);
3120
+ const average = (sortArr[1] + sortArr[2]) / 2;
3121
+ const offset = 3;
3122
+ return isHorizontal
3123
+ ? [
3124
+ [beforeRectangle.x + beforeRectangle.width + offset, average],
3125
+ [afterRectangle.x - offset, average]
3126
+ ]
3127
+ : [
3128
+ [average, beforeRectangle.y + beforeRectangle.height + offset],
3129
+ [average, afterRectangle.y - offset]
3130
+ ];
3131
+ }
3132
+ return { delta, distributeLines };
3133
+ }
3134
+ drawAlignLines(lines, g) {
3135
+ lines.forEach(points => {
3136
+ if (!points.length)
3137
+ return;
3138
+ const xAlign = PlaitBoard.getRoughSVG(this.board).line(points[0], points[1], points[2], points[3], {
3139
+ stroke: SELECTION_BORDER_COLOR,
3140
+ strokeWidth: 1,
3141
+ strokeLineDash: [4, 4]
3142
+ });
3143
+ g.appendChild(xAlign);
3144
+ });
3145
+ }
3146
+ drawDistributeLines(lines, g) {
3147
+ lines.forEach(line => {
3148
+ if (!line.length)
3149
+ return;
3150
+ let isHorizontal = line[0][1] === line[1][1];
3151
+ const yAlign = PlaitBoard.getRoughSVG(this.board).line(line[0][0], line[0][1], line[1][0], line[1][1], {
3152
+ stroke: SELECTION_BORDER_COLOR,
3153
+ strokeWidth: 1
3154
+ });
3155
+ g.appendChild(yAlign);
3156
+ line.forEach(point => {
3157
+ const barPoint = getBarPoint(point, isHorizontal);
3158
+ const bar = PlaitBoard.getRoughSVG(this.board).line(barPoint[0][0], barPoint[0][1], barPoint[1][0], barPoint[1][1], {
3159
+ stroke: SELECTION_BORDER_COLOR,
3160
+ strokeWidth: 1
3161
+ });
3162
+ g.appendChild(bar);
3163
+ });
3164
+ });
3165
+ }
3166
+ }
3167
+ function isHorizontalCross(rectangle, other) {
3168
+ return !(rectangle.y + rectangle.height < other.y || rectangle.y > other.y + other.height);
3169
+ }
3170
+ function isVerticalCross(rectangle, other) {
3171
+ return !(rectangle.x + rectangle.width < other.x || rectangle.x > other.x + other.width);
3172
+ }
3173
+ function getBarPoint(point, isHorizontal) {
3174
+ return isHorizontal
3175
+ ? [
3176
+ [point[0], point[1] - 4],
3177
+ [point[0], point[1] + 4]
3178
+ ]
3179
+ : [
3180
+ [point[0] - 4, point[1]],
3181
+ [point[0] + 4, point[1]]
3182
+ ];
2987
3183
  }
2988
3184
 
2989
3185
  function withMoving(board) {
@@ -3025,18 +3221,18 @@ function withMoving(board) {
3025
3221
  const endPoint = transformPoint(board, toPoint(event.x, event.y, host));
3026
3222
  offsetX = endPoint[0] - startPoint[0];
3027
3223
  offsetY = endPoint[1] - startPoint[1];
3028
- const activeElementsRectangle = getRectangleByElements(board, activeElements, true);
3029
- activeElementsRectangle.x += offsetX;
3030
- activeElementsRectangle.y += offsetY;
3031
- const reactionManager = new ReactionManager(board, activeElements, activeElementsRectangle);
3032
- const ref = reactionManager.handleAlign();
3033
- offsetX -= ref.deltaX;
3034
- offsetY -= ref.deltaY;
3035
- alignG = ref.g;
3036
- PlaitBoard.getElementActiveHost(board).append(alignG);
3037
- const offsetBuffer = 5;
3038
- if (Math.abs(offsetX) > offsetBuffer || Math.abs(offsetY) > offsetBuffer || getMovingElements(board).length > 0 || ref.deltaX) {
3224
+ const tolerance = 5;
3225
+ if (Math.abs(offsetX) > tolerance || Math.abs(offsetY) > tolerance || getMovingElements(board).length > 0) {
3039
3226
  throttleRAF(() => {
3227
+ const activeElementsRectangle = getRectangleByElements(board, activeElements, true);
3228
+ activeElementsRectangle.x += offsetX;
3229
+ activeElementsRectangle.y += offsetY;
3230
+ const reactionManager = new ReactionManager(board, activeElements, activeElementsRectangle);
3231
+ const ref = reactionManager.handleAlign();
3232
+ offsetX -= ref.deltaX;
3233
+ offsetY -= ref.deltaY;
3234
+ alignG = ref.g;
3235
+ PlaitBoard.getElementActiveHost(board).append(alignG);
3040
3236
  handleTouchTarget(board);
3041
3237
  const currentElements = activeElements.map(activeElement => {
3042
3238
  const points = activeElement.points || [];
@@ -3962,5 +4158,5 @@ function createModModifierKeys() {
3962
4158
  * Generated bundle index. Do not edit.
3963
4159
  */
3964
4160
 
3965
- export { A, ACTIVE_STROKE_WIDTH, ALT, APOSTROPHE, ATTACHED_ELEMENT_CLASS_NAME, 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_TOUCH_REF, BOARD_TO_VIEWPORT_ORIGINATION, BoardTransforms, C, CAPS_LOCK, CLIP_BOARD_FORMAT_KEY, CLOSE_SQUARE_BRACKET, COMMA, CONTEXT_MENU, CONTROL, ColorfulThemeColor, CoreTransforms, 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, PRESS_AND_MOVE_BUFFER, PRINT_SCREEN, Path, PlaitBoard, PlaitBoardComponent, PlaitChildrenElement, PlaitContextService, PlaitElement, PlaitElementComponent, PlaitHistoryBoard, PlaitIslandBaseComponent, PlaitIslandPopoverBaseComponent, PlaitModule, PlaitNode, PlaitOperation, PlaitPluginElementComponent, PlaitPluginKey, PlaitPointerType, Point, Q, QUESTION_MARK, R, RIGHT_ARROW, RectangleClient, ResizeCursorClass, RetroThemeColor, S, SAVING, SCROLL_BAR_WIDTH, SCROLL_LOCK, SELECTION_BORDER_COLOR, SELECTION_FILL_COLOR, SELECTION_RECTANGLE_CLASS_NAME, 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, createMask, createModModifierKeys, createMouseEvent, createPath, createPointerEvent, createRect, createSVG, createSelectionRectangleG, createTestingBoard, createText, createTouchEvent, debounce, deleteTemporaryElements, depthFirstRecursion, distanceBetweenPointAndPoint, distanceBetweenPointAndRectangle, distanceBetweenPointAndSegment, distanceBetweenPointAndSegments, downloadImage, drawArrow, drawBezierPath, drawCircle, drawLine, drawLinearPath, drawRectangle, drawRoundRectangle, fakeNodeWeakMap, findElements, getBoardRectangle, getClipboardByKey, getClipboardDataByMedia, getDataFromClipboard, getElementById, getElementHostBBox, getHitElementOfRoot, getHitElements, getIsRecursionFunc, getMovingElements, getNearestPointBetweenPointAndSegment, getNearestPointBetweenPointAndSegments, getRealScrollBarWidth, getRectangleByElements, getSelectedElements, getTemporaryElements, getTemporaryRef, getTextFromClipboard, getViewBox, getViewBoxCenterPoint, getViewportContainerRect, getViewportOrigination, handleTouchTarget, hasBeforeContextChange, hasInputOrTextareaTarget, hasOnBoardChange, hasOnContextChanged, hotkeys, idCreator, initializeViewBox, initializeViewportContainer, initializeViewportOffset, inverse, isDOMElement, isDOMNode, isFromScrolling, isFromViewportChange, isHitElements, isInPlaitBoard, isLineHitLine, isMainPointer, isNullOrUndefined, isPointInEllipse, isPointInPolygon, isPointInRoundRectangle, isPolylineHitRectangle, isPreventTouchMove, isSecondaryPointer, isSelectedElement, isSelectionMoving, isSetViewportOperation, normalizePoint, preventTouchMove, removeMovingElements, removeSelectedElement, rotate, scrollToRectangle, setClipboardData, setClipboardDataByMedia, setClipboardDataByText, setIsFromScrolling, setIsFromViewportChange, setPathStrokeLinecap, setSVGViewBox, setSelectionMoving, setStrokeLinecap, shouldClear, shouldMerge, shouldSave, throttleRAF, toImage, toPoint, transformPoint, transformPoints, updateForeignObject, updateForeignObjectWidth, updateViewportContainerScroll, updateViewportOffset, updateViewportOrigination, withMoving, withOptions, withSelection };
4161
+ export { A, ACTIVE_STROKE_WIDTH, ALT, APOSTROPHE, ATTACHED_ELEMENT_CLASS_NAME, 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_TOUCH_REF, BOARD_TO_VIEWPORT_ORIGINATION, BoardTransforms, C, CAPS_LOCK, CLIP_BOARD_FORMAT_KEY, CLOSE_SQUARE_BRACKET, COMMA, CONTEXT_MENU, CONTROL, ColorfulThemeColor, CoreTransforms, D, DASH, DELETE, DOWN_ARROW, DarkThemeColor, DefaultThemeColor, Direction, 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, PRESS_AND_MOVE_BUFFER, PRINT_SCREEN, Path, PlaitBoard, PlaitBoardComponent, PlaitChildrenElement, PlaitContextService, PlaitElement, PlaitElementComponent, PlaitHistoryBoard, PlaitIslandBaseComponent, PlaitIslandPopoverBaseComponent, PlaitModule, PlaitNode, PlaitOperation, PlaitPluginElementComponent, PlaitPluginKey, PlaitPointerType, Point, Q, QUESTION_MARK, R, RIGHT_ARROW, RectangleClient, ResizeCursorClass, RetroThemeColor, S, SAVING, SCROLL_BAR_WIDTH, SCROLL_LOCK, SELECTION_BORDER_COLOR, SELECTION_FILL_COLOR, SELECTION_RECTANGLE_CLASS_NAME, 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, createMask, createModModifierKeys, createMouseEvent, createPath, createPointerEvent, createRect, createSVG, createSelectionRectangleG, createTestingBoard, createText, createTouchEvent, debounce, deleteTemporaryElements, depthFirstRecursion, distanceBetweenPointAndPoint, distanceBetweenPointAndRectangle, distanceBetweenPointAndSegment, distanceBetweenPointAndSegments, downloadImage, drawArrow, drawBezierPath, drawCircle, drawLine, drawLinearPath, drawRectangle, drawRoundRectangle, fakeNodeWeakMap, findElements, getBoardRectangle, getClipboardByKey, getClipboardDataByMedia, getDataFromClipboard, getElementById, getElementHostBBox, getHitElementOfRoot, getHitElements, getIsRecursionFunc, getMovingElements, getNearestPointBetweenPointAndSegment, getNearestPointBetweenPointAndSegments, getRealScrollBarWidth, getRectangleByElements, getSelectedElements, getTemporaryElements, getTemporaryRef, getTextFromClipboard, getViewBox, getViewBoxCenterPoint, getViewportContainerRect, getViewportOrigination, handleTouchTarget, hasBeforeContextChange, hasInputOrTextareaTarget, hasOnBoardChange, hasOnContextChanged, hotkeys, idCreator, initializeViewBox, initializeViewportContainer, initializeViewportOffset, inverse, isDOMElement, isDOMNode, isFromScrolling, isFromViewportChange, isHitElements, isInPlaitBoard, isLineHitLine, isMainPointer, isNullOrUndefined, isPointInEllipse, isPointInPolygon, isPointInRoundRectangle, isPolylineHitRectangle, isPreventTouchMove, isSecondaryPointer, isSelectedElement, isSelectionMoving, isSetViewportOperation, normalizePoint, preventTouchMove, removeMovingElements, removeSelectedElement, rotate, scrollToRectangle, setClipboardData, setClipboardDataByMedia, setClipboardDataByText, setIsFromScrolling, setIsFromViewportChange, setPathStrokeLinecap, setSVGViewBox, setSelectionMoving, setStrokeLinecap, shouldClear, shouldMerge, shouldSave, throttleRAF, toImage, toPoint, transformPoint, transformPoints, updateForeignObject, updateForeignObjectWidth, updateViewportContainerScroll, updateViewportOffset, updateViewportOrigination, withMoving, withOptions, withSelection };
3966
4162
  //# sourceMappingURL=plait-core.mjs.map