@plait/core 0.92.0 → 0.92.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.
@@ -2739,22 +2739,20 @@ async function convertImageToBase64(url) {
2739
2739
  * @param nativeNode source node
2740
2740
  * @param clonedNode clone node
2741
2741
  */
2742
- function cloneCSSStyle(nativeNode, clonedNode) {
2742
+ function cloneCSSStyle(nativeNode, clonedNode, styleNames) {
2743
2743
  const targetStyle = clonedNode?.style;
2744
2744
  if (!targetStyle) {
2745
2745
  return;
2746
2746
  }
2747
2747
  const sourceStyle = window.getComputedStyle(nativeNode);
2748
- if (sourceStyle.cssText) {
2749
- targetStyle.cssText = sourceStyle.cssText;
2750
- targetStyle.transformOrigin = sourceStyle.transformOrigin;
2751
- }
2752
- else {
2753
- Array.from(sourceStyle).forEach(name => {
2754
- let value = sourceStyle.getPropertyValue(name);
2755
- targetStyle.setProperty(name, value, sourceStyle.getPropertyPriority(name));
2756
- });
2757
- }
2748
+ // Only clone a subset of styles
2749
+ (styleNames || []).forEach((prop) => {
2750
+ const value = sourceStyle.getPropertyValue(prop);
2751
+ const priority = sourceStyle.getPropertyPriority(prop);
2752
+ if (value) {
2753
+ targetStyle.setProperty(prop, value, priority);
2754
+ }
2755
+ });
2758
2756
  }
2759
2757
  /**
2760
2758
  * batch clone target styles
@@ -2762,20 +2760,22 @@ function cloneCSSStyle(nativeNode, clonedNode) {
2762
2760
  * @param cloneNode
2763
2761
  * @param inlineStyleClassNames
2764
2762
  */
2765
- function batchCloneCSSStyle(sourceNode, cloneNode, inlineStyleClassNames) {
2763
+ function batchCloneCSSStyle(sourceNode, cloneNode, inlineStyleClassNames, styleNames) {
2764
+ // handle text style, Hardcoded to slate editor framework
2765
+ const textSelector = '[data-slate-node="text"]';
2766
+ const textStyle = ['font-size', 'font-family', 'line-height', 'text-decoration', 'font-weight', 'font-style', 'word-break'];
2767
+ const sourceTextNodes = Array.from(sourceNode.querySelectorAll(textSelector));
2768
+ const cloneTextNodes = Array.from(cloneNode.querySelectorAll(textSelector));
2769
+ sourceTextNodes.map((node, index) => {
2770
+ cloneCSSStyle(node, cloneTextNodes[index], textStyle);
2771
+ });
2772
+ // expand
2766
2773
  if (inlineStyleClassNames) {
2767
- const classNames = inlineStyleClassNames + `, ${FOREIGN_OBJECT_EXPRESSION}`;
2774
+ const classNames = inlineStyleClassNames;
2768
2775
  const sourceNodes = Array.from(sourceNode.querySelectorAll(classNames));
2769
2776
  const cloneNodes = Array.from(cloneNode.querySelectorAll(classNames));
2770
- sourceNodes.forEach((node, index) => {
2771
- const childElements = Array.from(node.querySelectorAll('*')).filter(isElementNode);
2772
- const cloneChildElements = Array.from(cloneNodes[index].querySelectorAll('*')).filter(isElementNode);
2773
- sourceNodes.push(...childElements);
2774
- cloneNodes.push(...cloneChildElements);
2775
- });
2776
- // processing styles
2777
2777
  sourceNodes.map((node, index) => {
2778
- cloneCSSStyle(node, cloneNodes[index]);
2778
+ cloneCSSStyle(node, cloneNodes[index], styleNames);
2779
2779
  });
2780
2780
  }
2781
2781
  }
@@ -2788,7 +2788,7 @@ async function batchConvertImage(sourceNode, cloneNode) {
2788
2788
  const sourceImageNodes = Array.from(sourceNode.querySelectorAll(`${FOREIGN_OBJECT_EXPRESSION}`));
2789
2789
  const cloneImageNodes = Array.from(cloneNode.querySelectorAll(`${FOREIGN_OBJECT_EXPRESSION}`));
2790
2790
  await Promise.all(sourceImageNodes.map((_, index) => {
2791
- return new Promise(resolve => {
2791
+ return new Promise((resolve) => {
2792
2792
  const cloneImageNode = cloneImageNodes[index];
2793
2793
  // processing image
2794
2794
  const image = cloneImageNode.querySelector('img');
@@ -2796,7 +2796,7 @@ async function batchConvertImage(sourceNode, cloneNode) {
2796
2796
  if (!url) {
2797
2797
  return resolve(true);
2798
2798
  }
2799
- convertImageToBase64(url).then(base64Image => {
2799
+ convertImageToBase64(url).then((base64Image) => {
2800
2800
  image?.setAttribute('src', base64Image);
2801
2801
  resolve(true);
2802
2802
  });
@@ -2811,9 +2811,9 @@ async function batchConvertImage(sourceNode, cloneNode) {
2811
2811
  */
2812
2812
  async function cloneSvg(board, elements, rectangle, options) {
2813
2813
  const { width, height, x, y } = rectangle;
2814
- const { padding = 4, inlineStyleClassNames } = options;
2814
+ const { padding = 4, inlineStyleClassNames, styleNames } = options;
2815
2815
  const sourceSvg = PlaitBoard.getHost(board);
2816
- const selectedGElements = elements.map(value => PlaitElement.getElementG(value));
2816
+ const selectedGElements = elements.map((value) => PlaitElement.getElementG(value));
2817
2817
  const cloneSvgElement = sourceSvg.cloneNode();
2818
2818
  const newHostElement = PlaitBoard.getElementHost(board).cloneNode();
2819
2819
  cloneSvgElement.style.width = `${width}px`;
@@ -2825,7 +2825,7 @@ async function cloneSvg(board, elements, rectangle, options) {
2825
2825
  const promiseArray = new Array(selectedGElements.length);
2826
2826
  await Promise.all(selectedGElements.map(async (child, i) => {
2827
2827
  const cloneChild = child.cloneNode(true);
2828
- batchCloneCSSStyle(child, cloneChild, inlineStyleClassNames);
2828
+ batchCloneCSSStyle(child, cloneChild, inlineStyleClassNames, styleNames);
2829
2829
  await batchConvertImage(child, cloneChild);
2830
2830
  promiseArray[i] = cloneChild;
2831
2831
  }));
@@ -2833,6 +2833,13 @@ async function cloneSvg(board, elements, rectangle, options) {
2833
2833
  cloneSvgElement.appendChild(newHostElement);
2834
2834
  return cloneSvgElement;
2835
2835
  }
2836
+ async function toSvgData(board, options) {
2837
+ const elements = options.elements || findElements(board, { match: () => true, recursion: () => true, isReverse: false });
2838
+ const targetRectangle = getRectangleByElements(board, elements, false);
2839
+ const cloneSvgElement = await cloneSvg(board, elements, targetRectangle, options);
2840
+ const svgData = new XMLSerializer().serializeToString(cloneSvgElement);
2841
+ return svgData;
2842
+ }
2836
2843
  /**
2837
2844
  * current board transfer pictures
2838
2845
  * @param board board
@@ -2849,10 +2856,9 @@ async function toImage(board, options) {
2849
2856
  const { width, height } = targetRectangle;
2850
2857
  const ratioWidth = width * ratio;
2851
2858
  const ratioHeight = height * ratio;
2852
- const cloneSvgElement = await cloneSvg(board, elements, targetRectangle, options);
2859
+ const svgData = await toSvgData(board, options);
2853
2860
  const { canvas, ctx } = createCanvas(ratioWidth, ratioHeight, fillStyle);
2854
- const svgStr = new XMLSerializer().serializeToString(cloneSvgElement);
2855
- const imgSrc = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(svgStr)}`;
2861
+ const imgSrc = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(svgData)}`;
2856
2862
  try {
2857
2863
  const img = await loadImage(imgSrc);
2858
2864
  ctx.drawImage(img, 0, 0, ratioWidth, ratioHeight);
@@ -2863,6 +2869,10 @@ async function toImage(board, options) {
2863
2869
  return undefined;
2864
2870
  }
2865
2871
  }
2872
+ async function toSvg(board, options) {
2873
+ const svgData = await toSvgData(board, options);
2874
+ return svgData;
2875
+ }
2866
2876
  /**
2867
2877
  * download the file with the specified name
2868
2878
  * @param url download url
@@ -6983,5 +6993,5 @@ function createModModifierKeys() {
6983
6993
  * Generated bundle index. Do not edit.
6984
6994
  */
6985
6995
 
6986
- 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, DRAG_SELECTION_PRESS_AND_MOVE_BUFFER, 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_HAND_MODE, IS_IOS, IS_MAC, IS_SAFARI, IS_TEXT_EDITABLE, IS_WINDOWS, 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, 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, VIEWPORT_PADDING_RATIO, VOLUME_DOWN, VOLUME_UP, Viewport, W, WritableClipboardOperationType, WritableClipboardType, X, Y, Z, ZERO, ZOOM_STEP, addClipboardContext, addOrCreateClipboardContext, addSelectedElement, approximately, arrowPoints, buildPlaitHtml, cacheClipboardData, cacheMovingElements, cacheSelectedElements, cacheSelectedElementsWithGroup, cacheSelectedElementsWithGroupOnShift, calcNewViewBox, calculateViewBox, 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, getAllGroups, getAllMoveOptions, getAngleBetweenPoints, getAngleByElement, getBarPoint, getBoardRectangle, getBoundingRectangleByElements, getCachedClipboardData, getClipboardData, getClipboardFromHtml, getCrossingPointsBetweenEllipseAndSegment, getDataTransferClipboard, getDataTransferClipboardText, getEditingGroup, getElementById, getElementHostBBox, getElementMap, getElementsInGroup, getElementsInGroupByElement, getElementsIndices, getEllipseArcCenter, getEllipseTangentSlope, getGroupByElement, getHighestGroup, getHighestIndexOfElement, getHighestSelectedElements, getHighestSelectedGroup, getHighestSelectedGroups, getHitElementByPoint, getHitElementsByPoint, getHitElementsBySelection, getHitSelectedElements, getI18nValue, getIsRecursionFunc, getMinPointDelta, getMovingElements, getNearestDelta, getNearestPointBetweenPointAndArc, getNearestPointBetweenPointAndDiscreteSegments, 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, isHandMode, isHandleSelection, isHitElement, isHitSelectedRectangle, isHorizontalDirection, isInPlaitBoard, isInVisibleViewport, isIndicesContinuous, isLineHitLine, isLineHitRectangle, isLineHitRectangleEdge, isMainPointer, isMobileDeviceEvent, isMouseEvent, isMovingElements, isNullOrUndefined, isPencilEvent, isPointInEllipse, isPointInPolygon, isPointInRoundRectangle, isSecondaryPointer, isSelectedAllElementsInGroup, isSelectedElement, isSelectedElementOrGroup, isSelectionMoving, isSetSelectionOperation, isSetThemeOperation, isSetViewportOperation, isSingleLineHitRectangleEdge, isSnapPoint, isTouchDevice, isTouchEvent, isValidAngle, isVerticalDirection, isWheelPointer, mountElementG, moveElementsToNewPath, moveElementsToNewPathAfterAddGroup, nonGroupInHighestSelectedElements, normalizeAngle, normalizePoint, prepareElementBBox, radiansToDegrees, removeMovingElements, removeSelectedElement, replaceAngleBrackets, replaceSelectedElement, reverseReplaceAngleBrackets, rgbaToHEX, rotate, rotateAntiPointsByElement, rotateElements, rotatePoints, rotatePointsByAngle, rotatePointsByElement, rotatedDataPoints, scrollToVisibleWhenKeyboardOpening, setAngleForG, setClipboardData, setDataTransferClipboard, setDataTransferClipboardText, setDragging, setFragment, setIsFromScrolling, setIsFromViewportChange, setPathStrokeLinecap, setSVGViewBox, setSelectedElementsWithGroup, setSelectionMoving, setSelectionOptions, setStrokeLinecap, shouldClear, shouldMerge, shouldSave, sortElements, stripHtml, temporaryDisableSelection, throttleRAF, toActivePoint, toActivePointFromViewBoxPoint, toActiveRectangleFromViewBoxRectangle, toDomPrecision, toFixed, toHostPoint, toHostPointFromViewBoxPoint, toImage, toScreenPointFromActivePoint, toScreenPointFromHostPoint, toViewBoxPoint, toViewBoxPoints, uniqueById, updateForeignObject, updateForeignObjectWidth, updatePoints, updateViewBox, updateViewportByScrolling, updateViewportContainerScroll, updateViewportOffset, updateViewportOrigination, withArrowMoving, withBoard, withHandPointer, withHistory, withHotkey, withI18n, withMoving, withOptions, withRelatedFragment, withSelection };
6996
+ 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, DRAG_SELECTION_PRESS_AND_MOVE_BUFFER, 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_HAND_MODE, IS_IOS, IS_MAC, IS_SAFARI, IS_TEXT_EDITABLE, IS_WINDOWS, 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, 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, VIEWPORT_PADDING_RATIO, VOLUME_DOWN, VOLUME_UP, Viewport, W, WritableClipboardOperationType, WritableClipboardType, X, Y, Z, ZERO, ZOOM_STEP, addClipboardContext, addOrCreateClipboardContext, addSelectedElement, approximately, arrowPoints, buildPlaitHtml, cacheClipboardData, cacheMovingElements, cacheSelectedElements, cacheSelectedElementsWithGroup, cacheSelectedElementsWithGroupOnShift, calcNewViewBox, calculateViewBox, 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, getAllGroups, getAllMoveOptions, getAngleBetweenPoints, getAngleByElement, getBarPoint, getBoardRectangle, getBoundingRectangleByElements, getCachedClipboardData, getClipboardData, getClipboardFromHtml, getCrossingPointsBetweenEllipseAndSegment, getDataTransferClipboard, getDataTransferClipboardText, getEditingGroup, getElementById, getElementHostBBox, getElementMap, getElementsInGroup, getElementsInGroupByElement, getElementsIndices, getEllipseArcCenter, getEllipseTangentSlope, getGroupByElement, getHighestGroup, getHighestIndexOfElement, getHighestSelectedElements, getHighestSelectedGroup, getHighestSelectedGroups, getHitElementByPoint, getHitElementsByPoint, getHitElementsBySelection, getHitSelectedElements, getI18nValue, getIsRecursionFunc, getMinPointDelta, getMovingElements, getNearestDelta, getNearestPointBetweenPointAndArc, getNearestPointBetweenPointAndDiscreteSegments, 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, isHandMode, isHandleSelection, isHitElement, isHitSelectedRectangle, isHorizontalDirection, isInPlaitBoard, isInVisibleViewport, isIndicesContinuous, isLineHitLine, isLineHitRectangle, isLineHitRectangleEdge, isMainPointer, isMobileDeviceEvent, isMouseEvent, isMovingElements, isNullOrUndefined, isPencilEvent, isPointInEllipse, isPointInPolygon, isPointInRoundRectangle, isSecondaryPointer, isSelectedAllElementsInGroup, isSelectedElement, isSelectedElementOrGroup, isSelectionMoving, isSetSelectionOperation, isSetThemeOperation, isSetViewportOperation, isSingleLineHitRectangleEdge, isSnapPoint, isTouchDevice, isTouchEvent, isValidAngle, isVerticalDirection, isWheelPointer, mountElementG, moveElementsToNewPath, moveElementsToNewPathAfterAddGroup, nonGroupInHighestSelectedElements, normalizeAngle, normalizePoint, prepareElementBBox, radiansToDegrees, removeMovingElements, removeSelectedElement, replaceAngleBrackets, replaceSelectedElement, reverseReplaceAngleBrackets, rgbaToHEX, rotate, rotateAntiPointsByElement, rotateElements, rotatePoints, rotatePointsByAngle, rotatePointsByElement, rotatedDataPoints, scrollToVisibleWhenKeyboardOpening, setAngleForG, setClipboardData, setDataTransferClipboard, setDataTransferClipboardText, setDragging, setFragment, setIsFromScrolling, setIsFromViewportChange, setPathStrokeLinecap, setSVGViewBox, setSelectedElementsWithGroup, setSelectionMoving, setSelectionOptions, setStrokeLinecap, shouldClear, shouldMerge, shouldSave, sortElements, stripHtml, temporaryDisableSelection, throttleRAF, toActivePoint, toActivePointFromViewBoxPoint, toActiveRectangleFromViewBoxRectangle, toDomPrecision, toFixed, toHostPoint, toHostPointFromViewBoxPoint, toImage, toScreenPointFromActivePoint, toScreenPointFromHostPoint, toSvg, toSvgData, toViewBoxPoint, toViewBoxPoints, uniqueById, updateForeignObject, updateForeignObjectWidth, updatePoints, updateViewBox, updateViewportByScrolling, updateViewportContainerScroll, updateViewportOffset, updateViewportOrigination, withArrowMoving, withBoard, withHandPointer, withHistory, withHotkey, withI18n, withMoving, withOptions, withRelatedFragment, withSelection };
6987
6997
  //# sourceMappingURL=plait-core.mjs.map