@plait/core 0.74.0 → 0.75.0-next.0

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,7 +504,7 @@ const PlaitNode = {
504
504
  first(board, path) {
505
505
  const p = path.slice();
506
506
  let n = PlaitNode.get(board, p);
507
- if (!n.children) {
507
+ if (!n.children || !board.isExpanded(n)) {
508
508
  return n;
509
509
  }
510
510
  while (n) {
@@ -935,7 +935,7 @@ function getNearestPointBetweenPointAndEllipse(point, center, rx, ry, rotation =
935
935
  let ty = 0.707;
936
936
  const a = Math.abs(rectangleClient.width) / 2;
937
937
  const b = Math.abs(rectangleClient.height) / 2;
938
- [0, 1, 2, 3].forEach(x => {
938
+ [0, 1, 2, 3].forEach((x) => {
939
939
  const xx = a * tx;
940
940
  const yy = b * ty;
941
941
  const ex = ((a * a - b * b) * tx ** 3) / a;
@@ -983,7 +983,7 @@ const isLineHitLine = (a, b, c, d) => {
983
983
  const cd = [d[0] - c[0], d[1] - c[1]];
984
984
  return crossProduct(ab, ac) * crossProduct(ab, ad) <= 0 && crossProduct(cd, ca) * crossProduct(cd, cb) <= 0;
985
985
  };
986
- const isPolylineHitRectangle = (points, rectangle, isClose = true) => {
986
+ const isLineHitRectangle = (points, rectangle, isClose = true) => {
987
987
  const rectanglePoints = RectangleClient.getCornerPoints(rectangle);
988
988
  const len = points.length;
989
989
  for (let i = 0; i < len; i++) {
@@ -991,16 +991,34 @@ const isPolylineHitRectangle = (points, rectangle, isClose = true) => {
991
991
  continue;
992
992
  const p1 = points[i];
993
993
  const p2 = points[(i + 1) % len];
994
- const isHit = isLineHitLine(p1, p2, rectanglePoints[0], rectanglePoints[1]) ||
995
- isLineHitLine(p1, p2, rectanglePoints[1], rectanglePoints[2]) ||
996
- isLineHitLine(p1, p2, rectanglePoints[2], rectanglePoints[3]) ||
997
- isLineHitLine(p1, p2, rectanglePoints[3], rectanglePoints[0]);
994
+ const isHit = isSingleLineHitRectangleEdge(p1, p2, rectangle);
998
995
  if (isHit || isPointInPolygon(p1, rectanglePoints) || isPointInPolygon(p2, rectanglePoints)) {
999
996
  return true;
1000
997
  }
1001
998
  }
1002
999
  return false;
1003
1000
  };
1001
+ const isLineHitRectangleEdge = (points, rectangle, isClose = true) => {
1002
+ const len = points.length;
1003
+ for (let i = 0; i < len; i++) {
1004
+ if (i === len - 1 && !isClose)
1005
+ continue;
1006
+ const p1 = points[i];
1007
+ const p2 = points[(i + 1) % len];
1008
+ const isHit = isSingleLineHitRectangleEdge(p1, p2, rectangle);
1009
+ if (isHit) {
1010
+ return true;
1011
+ }
1012
+ }
1013
+ return false;
1014
+ };
1015
+ const isSingleLineHitRectangleEdge = (p1, p2, rectangle) => {
1016
+ const rectanglePoints = RectangleClient.getCornerPoints(rectangle);
1017
+ return (isLineHitLine(p1, p2, rectanglePoints[0], rectanglePoints[1]) ||
1018
+ isLineHitLine(p1, p2, rectanglePoints[1], rectanglePoints[2]) ||
1019
+ isLineHitLine(p1, p2, rectanglePoints[2], rectanglePoints[3]) ||
1020
+ isLineHitLine(p1, p2, rectanglePoints[3], rectanglePoints[0]));
1021
+ };
1004
1022
  //https://stackoverflow.com/questions/22521982/check-if-point-is-inside-a-polygon
1005
1023
  const isPointInPolygon = (point, points) => {
1006
1024
  // ray-casting algorithm based on
@@ -1182,9 +1200,20 @@ function getCrossingPointsBetweenEllipseAndSegment(startPoint, endPoint, cx, cy,
1182
1200
  }
1183
1201
  return (tValues
1184
1202
  // Filter to only points that are on the segment.
1185
- .filter(t => !segment_only || (t >= 0 && t <= 1))
1203
+ .filter((t) => !segment_only || (t >= 0 && t <= 1))
1186
1204
  // Solve for points.
1187
- .map(t => [startPoint[0] + (endPoint[0] - startPoint[0]) * t + cx, startPoint[1] + (endPoint[1] - startPoint[1]) * t + cy]));
1205
+ .map((t) => [startPoint[0] + (endPoint[0] - startPoint[0]) * t + cx, startPoint[1] + (endPoint[1] - startPoint[1]) * t + cy]));
1206
+ }
1207
+ /**
1208
+ * Get a point between two points.
1209
+ * @param x0 The x-axis coordinate of the first point.
1210
+ * @param y0 The y-axis coordinate of the first point.
1211
+ * @param x1 The x-axis coordinate of the second point.
1212
+ * @param y1 The y-axis coordinate of the second point.
1213
+ * @param d Normalized
1214
+ */
1215
+ function getPointBetween(x0, y0, x1, y1, d = 0.5) {
1216
+ return [x0 + (x1 - x0) * d, y0 + (y1 - y0) * d];
1188
1217
  }
1189
1218
 
1190
1219
  function isInPlaitBoard(board, x, y) {
@@ -1719,7 +1748,7 @@ const getHitElementsBySelection = (board, selection, match = () => true) => {
1719
1748
  return [];
1720
1749
  }
1721
1750
  }
1722
- depthFirstRecursion(board, node => {
1751
+ depthFirstRecursion(board, (node) => {
1723
1752
  if (!PlaitBoard.isBoard(node) && match(node)) {
1724
1753
  let isRectangleHit = false;
1725
1754
  try {
@@ -1737,15 +1766,15 @@ const getHitElementsBySelection = (board, selection, match = () => true) => {
1737
1766
  }, getIsRecursionFunc(board), true);
1738
1767
  return rectangleHitElements;
1739
1768
  };
1740
- const getHitElementsByPoint = (board, point, match = () => true) => {
1769
+ const getHitElementsByPoint = (board, point, match = () => true, isStrict = true) => {
1741
1770
  let hitElements = [];
1742
- depthFirstRecursion(board, node => {
1771
+ depthFirstRecursion(board, (node) => {
1743
1772
  if (PlaitBoard.isBoard(node) || !match(node) || !PlaitElement.hasMounted(node)) {
1744
1773
  return;
1745
1774
  }
1746
1775
  let isHit = false;
1747
1776
  try {
1748
- isHit = board.isHit(node, point);
1777
+ isHit = board.isHit(node, point, isStrict);
1749
1778
  }
1750
1779
  catch (error) {
1751
1780
  if (isDebug()) {
@@ -1759,8 +1788,8 @@ const getHitElementsByPoint = (board, point, match = () => true) => {
1759
1788
  }, getIsRecursionFunc(board), true);
1760
1789
  return hitElements;
1761
1790
  };
1762
- const getHitElementByPoint = (board, point, match = () => true) => {
1763
- const pointHitElements = getHitElementsByPoint(board, point, match);
1791
+ const getHitElementByPoint = (board, point, match = () => true, isStrict = true) => {
1792
+ const pointHitElements = getHitElementsByPoint(board, point, match, isStrict);
1764
1793
  const hitElement = board.getOneHitElement(pointHitElements);
1765
1794
  return hitElement;
1766
1795
  };
@@ -1798,14 +1827,14 @@ const removeSelectedElement = (board, element, isRemoveChildren = false) => {
1798
1827
  if (selectedElements.includes(element)) {
1799
1828
  const targetElements = [];
1800
1829
  if (board.isRecursion(element) && isRemoveChildren) {
1801
- depthFirstRecursion(element, node => {
1830
+ depthFirstRecursion(element, (node) => {
1802
1831
  targetElements.push(node);
1803
- }, node => board.isRecursion(node));
1832
+ }, (node) => board.isRecursion(node));
1804
1833
  }
1805
1834
  else {
1806
1835
  targetElements.push(element);
1807
1836
  }
1808
- const newSelectedElements = selectedElements.filter(value => !targetElements.includes(value));
1837
+ const newSelectedElements = selectedElements.filter((value) => !targetElements.includes(value));
1809
1838
  cacheSelectedElements(board, newSelectedElements);
1810
1839
  }
1811
1840
  };
@@ -1818,7 +1847,7 @@ const clearSelectedElement = (board) => {
1818
1847
  };
1819
1848
  const isSelectedElement = (board, element) => {
1820
1849
  const selectedElements = getSelectedElements(board);
1821
- return !!selectedElements.find(value => value === element);
1850
+ return !!selectedElements.find((value) => value === element);
1822
1851
  };
1823
1852
  const temporaryDisableSelection = (board) => {
1824
1853
  const currentOptions = board.getPluginOptions(PlaitPluginKey.withSelection);
@@ -1968,15 +1997,14 @@ function updateViewport(board, origination, zoom) {
1968
1997
  });
1969
1998
  clearViewportOrigination(board);
1970
1999
  }
1971
- function updateZoom(board, newZoom, isCenter = true) {
2000
+ function updateZoom(board, newZoom, center) {
1972
2001
  newZoom = clampZoomLevel(newZoom);
1973
- const movingPoint = PlaitBoard.getMovingPointInBoard(board);
1974
2002
  const nativeElement = PlaitBoard.getBoardContainer(board);
1975
2003
  const nativeElementRect = nativeElement.getBoundingClientRect();
1976
2004
  const boardContainerRect = PlaitBoard.getBoardContainer(board).getBoundingClientRect();
1977
2005
  let focusPoint = [boardContainerRect.width / 2, boardContainerRect.height / 2];
1978
- if (!isCenter && movingPoint && distanceBetweenPointAndRectangle(movingPoint[0], movingPoint[1], nativeElementRect) === 0) {
1979
- focusPoint = [movingPoint[0] - nativeElementRect.x, movingPoint[1] - nativeElementRect.y];
2006
+ if (center && distanceBetweenPointAndRectangle(center[0], center[1], nativeElementRect) === 0) {
2007
+ focusPoint = [center[0] - nativeElementRect.x, center[1] - nativeElementRect.y];
1980
2008
  }
1981
2009
  const zoom = board.viewport.zoom;
1982
2010
  const origination = getViewportOrigination(board);
@@ -4997,6 +5025,7 @@ class ListRender {
4997
5025
  if (diffResult) {
4998
5026
  const newContexts = [];
4999
5027
  const newInstances = [];
5028
+ // for moving scene: the current index for first element before moving
5000
5029
  let currentIndexForFirstElement = null;
5001
5030
  diffResult.forEachItem((record) => {
5002
5031
  NODE_TO_INDEX.set(record.item, record.currentIndex);
@@ -5163,7 +5192,7 @@ currentIndexForFirstElement = null) => {
5163
5192
  const mountOnItemMove = (element, index, childrenContext, currentIndexForFirstElement) => {
5164
5193
  const containerG = PlaitElement.getContainerG(element, { suppressThrow: false });
5165
5194
  mountElementG(index, containerG, childrenContext, currentIndexForFirstElement);
5166
- if (element.children && !PlaitElement.isRootElement(element)) {
5195
+ if (element.children && !PlaitElement.isRootElement(element) && childrenContext.board.isExpanded(element)) {
5167
5196
  element.children.forEach((child, index) => {
5168
5197
  mountOnItemMove(child, index, { ...childrenContext, parent: element }, null);
5169
5198
  });
@@ -5691,7 +5720,7 @@ const withHotkey = (board) => {
5691
5720
  if (PlaitBoard.getMovingPointInBoard(board) || PlaitBoard.isMovingPointInBoard(board)) {
5692
5721
  if (isHotkey(['mod+=', 'mod++'], { byKey: true })(event)) {
5693
5722
  event.preventDefault();
5694
- BoardTransforms.updateZoom(board, board.viewport.zoom + 0.1, false);
5723
+ BoardTransforms.updateZoom(board, board.viewport.zoom + 0.1);
5695
5724
  return;
5696
5725
  }
5697
5726
  if (isHotkey(['mod+shift+=', 'mod+shift++'], { byKey: true })(event)) {
@@ -6606,5 +6635,5 @@ function createModModifierKeys() {
6606
6635
  * Generated bundle index. Do not edit.
6607
6636
  */
6608
6637
 
6609
- export { A, ACTIVE_MOVING_CLASS_NAME, ACTIVE_STROKE_WIDTH, ALT, APOSTROPHE, ATTACHED_ELEMENT_CLASS_NAME, AT_SIGN, B, BACKSLASH, BACKSPACE, BOARD_TO_AFTER_CHANGE, BOARD_TO_CONTEXT, 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, CLOSE_SQUARE_BRACKET, COMMA, CONTEXT_MENU, CONTROL, ColorfulThemeColor, CoreTransforms, CursorClass, D, DASH, DEFAULT_COLOR, DELETE, DOWN_ARROW, DarkThemeColor, DebugGenerator, DefaultThemeColor, Direction, E, EIGHT, ELEMENT_TO_REF, END, ENTER, EQUALS, ESCAPE, ElementFlavour, 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, HISTORY, HIT_DISTANCE_BUFFER, HOME, HOST_CLASS_NAME, I, INSERT, IS_APPLE, IS_BOARD_ALIVE, IS_BOARD_CACHE, IS_CHROME, IS_CHROME_LEGACY, IS_DRAGGING, IS_EDGE_LEGACY, IS_FIREFOX, IS_IOS, IS_MAC, IS_SAFARI, IS_TEXT_EDITABLE, J, K, KEY_TO_ELEMENT_MAP, L, LAST_MEDIA, LEFT_ARROW, ListRender, M, MAC_ENTER, MAC_META, MAC_WK_CMD_LEFT, MAC_WK_CMD_RIGHT, MAX_RADIUS, MAX_ZOOM, MERGING, META, MIN_ZOOM, MUTE, N, NINE, NODE_TO_CONTAINER_G, NODE_TO_G, 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, PlaitBoardContext, PlaitElement, PlaitGroupElement, PlaitHistoryBoard, PlaitNode, PlaitOperation, PlaitPluginKey, PlaitPointerType, Point, Q, QUESTION_MARK, R, RESIZE_CURSORS, RESIZE_HANDLE_CLASS_NAME, RIGHT_ARROW, ROTATE_HANDLE_CLASS_NAME, RectangleClient, ResizeCursorClass, RetroThemeColor, RgbaToHEX, S, SAVING, SCROLL_BAR_WIDTH, SCROLL_LOCK, SELECTION_BORDER_COLOR, SELECTION_FILL_COLOR, SELECTION_RECTANGLE_BOUNDING_CLASS_NAME, SELECTION_RECTANGLE_CLASS_NAME, SEMICOLON, SEVEN, SHIFT, SINGLE_QUOTE, SIX, SLASH, SNAPPING_STROKE_WIDTH, SNAP_TOLERANCE, SPACE, SPLITTING_ONCE, Selection, SoftThemeColor, StarryThemeColor, T, TAB, THREE, TILDE, TWO, ThemeColorMode, ThemeColors, Transforms, U, UP_ARROW, V, VOLUME_DOWN, VOLUME_UP, Viewport, W, WritableClipboardOperationType, WritableClipboardType, X, Y, Z, ZERO, ZOOM_STEP, addClipboardContext, addOrCreateClipboardContext, addSelectedElement, approximately, arrowPoints, buildPlaitHtml, cacheMovingElements, cacheSelectedElements, cacheSelectedElementsWithGroup, cacheSelectedElementsWithGroupOnShift, calcNewViewBox, canAddGroup, canRemoveGroup, canSetZIndex, catmullRomFitting, ceilToDecimal, clampZoomLevel, clearNodeWeakMap, clearSelectedElement, clearSelectionMoving, clearViewportOrigination, createBoard, createClipboardContext, createDebugGenerator, createFakeEvent, createForeignObject, createG, createGroup, createGroupRectangleG, createKeyboardEvent, createMask, createModModifierKeys, createMouseEvent, createPath, createPointerEvent, createRect, createSVG, createTestingBoard, createText, createTouchEvent, debounce, degreesToRadians, deleteFragment, deleteTemporaryElements, depthFirstRecursion, distanceBetweenPointAndPoint, distanceBetweenPointAndRectangle, distanceBetweenPointAndSegment, distanceBetweenPointAndSegments, downloadImage, drawArrow, drawBezierPath, drawCircle, drawDashedLines, drawLine, drawLinearPath, drawPendingNodesG, drawPointSnapLines, drawRectangle, drawRoundRectangle, drawSelectionRectangleG, drawSolidLines, duplicateElements, fakeNodeWeakMap, filterSelectedGroups, findElements, findIndex, findLastIndex, getAllElementsInGroup, getAllMoveOptions, getAngleBetweenPoints, getAngleByElement, getBarPoint, getBoardRectangle, getBoundingRectangleByElements, getClipboardData, getClipboardFromHtml, getCrossingPointsBetweenEllipseAndSegment, getDataTransferClipboard, getDataTransferClipboardText, getEditingGroup, getElementById, getElementHostBBox, getElementMap, getElementsInGroup, getElementsInGroupByElement, getElementsIndices, getEllipseTangentSlope, getGroupByElement, getHighestGroup, getHighestIndexOfElement, getHighestSelectedElements, getHighestSelectedGroup, getHighestSelectedGroups, getHitElementByPoint, getHitElementsByPoint, getHitElementsBySelection, getHitSelectedElements, getIsRecursionFunc, getMinPointDelta, getMovingElements, getNearestDelta, getNearestPointBetweenPointAndEllipse, getNearestPointBetweenPointAndSegment, getNearestPointBetweenPointAndSegments, getNearestPointRectangle, getOffsetAfterRotate, getOneMoveOptions, getProbablySupportsClipboardRead, getProbablySupportsClipboardWrite, getProbablySupportsClipboardWriteText, getRealScrollBarWidth, getRectangleByAngle, getRectangleByElements, getRectangleByGroup, getRotatedBoundingRectangle, getSelectedElements, getSelectedGroups, getSelectedIsolatedElements, getSelectedIsolatedElementsCanAddToGroup, getSelectedTargetElements, getSelectionAngle, getSelectionOptions, getSnapRectangles, getTemporaryElements, getTemporaryRef, getTripleAxis, getValidElements, getVectorFromPointAndSlope, getViewBox, getViewBoxCenterPoint, getViewportContainerRect, getViewportOrigination, hasBeforeContextChange, hasInputOrTextareaTarget, hasOnContextChanged, hasSameAngle, hasSelectedElementsInSameGroup, hasSetSelectionOperation, hasValidAngle, hotkeys, idCreator, initializeViewBox, initializeViewportContainer, initializeViewportOffset, inverse, isAxisChangedByAngle, isContextmenu, isDOMElement, isDOMNode, isDebug, isDragging, isFromScrolling, isFromViewportChange, isHandleSelection, isHitElement, isHitSelectedRectangle, isInPlaitBoard, isIndicesContinuous, isLineHitLine, isMainPointer, isMovingElements, isNullOrUndefined, isPointInEllipse, isPointInPolygon, isPointInRoundRectangle, isPolylineHitRectangle, isSecondaryPointer, isSelectedAllElementsInGroup, isSelectedElement, isSelectedElementOrGroup, isSelectionMoving, isSetSelectionOperation, isSetThemeOperation, isSetViewportOperation, isSnapPoint, isValidAngle, mountElementG, moveElementsToNewPath, moveElementsToNewPathAfterAddGroup, nonGroupInHighestSelectedElements, normalizeAngle, normalizePoint, radiansToDegrees, removeMovingElements, removeSelectedElement, replaceAngleBrackets, replaceSelectedElement, reverseReplaceAngleBrackets, rotate, rotateAntiPointsByElement, rotateElements, rotatePoints, rotatePointsByAngle, rotatePointsByElement, rotatedDataPoints, scrollToRectangle, setAngleForG, setClipboardData, setDataTransferClipboard, setDataTransferClipboardText, setDragging, setFragment, setIsFromScrolling, setIsFromViewportChange, setPathStrokeLinecap, setSVGViewBox, setSelectedElementsWithGroup, setSelectionMoving, setSelectionOptions, setStrokeLinecap, shouldClear, shouldMerge, shouldSave, sortElements, stripHtml, temporaryDisableSelection, throttleRAF, toDomPrecision, toFixed, toHostPoint, toHostPointFromViewBoxPoint, toImage, toScreenPointFromHostPoint, toViewBoxPoint, toViewBoxPoints, uniqueById, updateForeignObject, updateForeignObjectWidth, updatePoints, updateViewportByScrolling, updateViewportContainerScroll, updateViewportOffset, updateViewportOrigination, withArrowMoving, withBoard, withHandPointer, withHistory, withHotkey, withMoving, withOptions, withRelatedFragment, withSelection, withViewport };
6638
+ export { A, ACTIVE_MOVING_CLASS_NAME, ACTIVE_STROKE_WIDTH, ALT, APOSTROPHE, ATTACHED_ELEMENT_CLASS_NAME, AT_SIGN, B, BACKSLASH, BACKSPACE, BOARD_TO_AFTER_CHANGE, BOARD_TO_CONTEXT, 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, CLOSE_SQUARE_BRACKET, COMMA, CONTEXT_MENU, CONTROL, ColorfulThemeColor, CoreTransforms, CursorClass, D, DASH, DEFAULT_COLOR, DELETE, DOWN_ARROW, DarkThemeColor, DebugGenerator, DefaultThemeColor, Direction, E, EIGHT, ELEMENT_TO_REF, END, ENTER, EQUALS, ESCAPE, ElementFlavour, 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, HISTORY, HIT_DISTANCE_BUFFER, HOME, HOST_CLASS_NAME, I, INSERT, IS_APPLE, IS_BOARD_ALIVE, IS_BOARD_CACHE, IS_CHROME, IS_CHROME_LEGACY, IS_DRAGGING, IS_EDGE_LEGACY, IS_FIREFOX, IS_IOS, IS_MAC, IS_SAFARI, IS_TEXT_EDITABLE, J, K, KEY_TO_ELEMENT_MAP, L, LAST_MEDIA, LEFT_ARROW, ListRender, M, MAC_ENTER, MAC_META, MAC_WK_CMD_LEFT, MAC_WK_CMD_RIGHT, MAX_RADIUS, MAX_ZOOM, MERGING, META, MIN_ZOOM, MUTE, N, NINE, NODE_TO_CONTAINER_G, NODE_TO_G, 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, PlaitBoardContext, PlaitElement, PlaitGroupElement, PlaitHistoryBoard, PlaitNode, PlaitOperation, PlaitPluginKey, PlaitPointerType, Point, Q, QUESTION_MARK, R, RESIZE_CURSORS, RESIZE_HANDLE_CLASS_NAME, RIGHT_ARROW, ROTATE_HANDLE_CLASS_NAME, RectangleClient, ResizeCursorClass, RetroThemeColor, RgbaToHEX, S, SAVING, SCROLL_BAR_WIDTH, SCROLL_LOCK, SELECTION_BORDER_COLOR, SELECTION_FILL_COLOR, SELECTION_RECTANGLE_BOUNDING_CLASS_NAME, SELECTION_RECTANGLE_CLASS_NAME, SEMICOLON, SEVEN, SHIFT, SINGLE_QUOTE, SIX, SLASH, SNAPPING_STROKE_WIDTH, SNAP_TOLERANCE, SPACE, SPLITTING_ONCE, Selection, SoftThemeColor, StarryThemeColor, T, TAB, THREE, TILDE, TWO, ThemeColorMode, ThemeColors, Transforms, U, UP_ARROW, V, VOLUME_DOWN, VOLUME_UP, Viewport, W, WritableClipboardOperationType, WritableClipboardType, X, Y, Z, ZERO, ZOOM_STEP, addClipboardContext, addOrCreateClipboardContext, addSelectedElement, approximately, arrowPoints, buildPlaitHtml, cacheMovingElements, cacheSelectedElements, cacheSelectedElementsWithGroup, cacheSelectedElementsWithGroupOnShift, calcNewViewBox, canAddGroup, canRemoveGroup, canSetZIndex, catmullRomFitting, ceilToDecimal, clampZoomLevel, clearNodeWeakMap, clearSelectedElement, clearSelectionMoving, clearViewportOrigination, createBoard, createClipboardContext, createDebugGenerator, createFakeEvent, createForeignObject, createG, createGroup, createGroupRectangleG, createKeyboardEvent, createMask, createModModifierKeys, createMouseEvent, createPath, createPointerEvent, createRect, createSVG, createTestingBoard, createText, createTouchEvent, debounce, degreesToRadians, deleteFragment, deleteTemporaryElements, depthFirstRecursion, distanceBetweenPointAndPoint, distanceBetweenPointAndRectangle, distanceBetweenPointAndSegment, distanceBetweenPointAndSegments, downloadImage, drawArrow, drawBezierPath, drawCircle, drawDashedLines, drawLine, drawLinearPath, drawPendingNodesG, drawPointSnapLines, drawRectangle, drawRoundRectangle, drawSelectionRectangleG, drawSolidLines, duplicateElements, fakeNodeWeakMap, filterSelectedGroups, findElements, findIndex, findLastIndex, getAllElementsInGroup, getAllMoveOptions, getAngleBetweenPoints, getAngleByElement, getBarPoint, getBoardRectangle, getBoundingRectangleByElements, getClipboardData, getClipboardFromHtml, getCrossingPointsBetweenEllipseAndSegment, getDataTransferClipboard, getDataTransferClipboardText, getEditingGroup, getElementById, getElementHostBBox, getElementMap, getElementsInGroup, getElementsInGroupByElement, getElementsIndices, getEllipseTangentSlope, getGroupByElement, getHighestGroup, getHighestIndexOfElement, getHighestSelectedElements, getHighestSelectedGroup, getHighestSelectedGroups, getHitElementByPoint, getHitElementsByPoint, getHitElementsBySelection, getHitSelectedElements, getIsRecursionFunc, getMinPointDelta, getMovingElements, getNearestDelta, getNearestPointBetweenPointAndEllipse, getNearestPointBetweenPointAndSegment, getNearestPointBetweenPointAndSegments, getNearestPointRectangle, getOffsetAfterRotate, getOneMoveOptions, getPointBetween, getProbablySupportsClipboardRead, getProbablySupportsClipboardWrite, getProbablySupportsClipboardWriteText, getRealScrollBarWidth, getRectangleByAngle, getRectangleByElements, getRectangleByGroup, getRotatedBoundingRectangle, getSelectedElements, getSelectedGroups, getSelectedIsolatedElements, getSelectedIsolatedElementsCanAddToGroup, getSelectedTargetElements, getSelectionAngle, getSelectionOptions, getSnapRectangles, getTemporaryElements, getTemporaryRef, getTripleAxis, getValidElements, getVectorFromPointAndSlope, getViewBox, getViewBoxCenterPoint, getViewportContainerRect, getViewportOrigination, hasBeforeContextChange, hasInputOrTextareaTarget, hasOnContextChanged, hasSameAngle, hasSelectedElementsInSameGroup, hasSetSelectionOperation, hasValidAngle, hotkeys, idCreator, initializeViewBox, initializeViewportContainer, initializeViewportOffset, inverse, isAxisChangedByAngle, isContextmenu, isDOMElement, isDOMNode, isDebug, isDragging, isFromScrolling, isFromViewportChange, isHandleSelection, isHitElement, isHitSelectedRectangle, isInPlaitBoard, isIndicesContinuous, isLineHitLine, isLineHitRectangle, isLineHitRectangleEdge, isMainPointer, isMovingElements, isNullOrUndefined, isPointInEllipse, isPointInPolygon, isPointInRoundRectangle, isSecondaryPointer, isSelectedAllElementsInGroup, isSelectedElement, isSelectedElementOrGroup, isSelectionMoving, isSetSelectionOperation, isSetThemeOperation, isSetViewportOperation, isSingleLineHitRectangleEdge, isSnapPoint, isValidAngle, mountElementG, moveElementsToNewPath, moveElementsToNewPathAfterAddGroup, nonGroupInHighestSelectedElements, normalizeAngle, normalizePoint, radiansToDegrees, removeMovingElements, removeSelectedElement, replaceAngleBrackets, replaceSelectedElement, reverseReplaceAngleBrackets, rotate, rotateAntiPointsByElement, rotateElements, rotatePoints, rotatePointsByAngle, rotatePointsByElement, rotatedDataPoints, scrollToRectangle, setAngleForG, setClipboardData, setDataTransferClipboard, setDataTransferClipboardText, setDragging, setFragment, setIsFromScrolling, setIsFromViewportChange, setPathStrokeLinecap, setSVGViewBox, setSelectedElementsWithGroup, setSelectionMoving, setSelectionOptions, setStrokeLinecap, shouldClear, shouldMerge, shouldSave, sortElements, stripHtml, temporaryDisableSelection, throttleRAF, toDomPrecision, toFixed, toHostPoint, toHostPointFromViewBoxPoint, toImage, toScreenPointFromHostPoint, toViewBoxPoint, toViewBoxPoints, uniqueById, updateForeignObject, updateForeignObjectWidth, updatePoints, updateViewportByScrolling, updateViewportContainerScroll, updateViewportOffset, updateViewportOrigination, withArrowMoving, withBoard, withHandPointer, withHistory, withHotkey, withMoving, withOptions, withRelatedFragment, withSelection, withViewport };
6610
6639
  //# sourceMappingURL=plait-core.mjs.map