|
@@ -104,10 +104,7 @@ import {
|
|
Emitter,
|
|
Emitter,
|
|
} from "@excalidraw/common";
|
|
} from "@excalidraw/common";
|
|
|
|
|
|
-import {
|
|
|
|
- getCommonBounds,
|
|
|
|
- getElementAbsoluteCoords,
|
|
|
|
-} from "@excalidraw/element/bounds";
|
|
|
|
|
|
+import { getCommonBounds, getElementAbsoluteCoords } from "@excalidraw/element";
|
|
|
|
|
|
import {
|
|
import {
|
|
bindOrUnbindLinearElement,
|
|
bindOrUnbindLinearElement,
|
|
@@ -120,11 +117,11 @@ import {
|
|
shouldEnableBindingForPointerEvent,
|
|
shouldEnableBindingForPointerEvent,
|
|
updateBoundElements,
|
|
updateBoundElements,
|
|
getSuggestedBindingsForArrows,
|
|
getSuggestedBindingsForArrows,
|
|
-} from "@excalidraw/element/binding";
|
|
|
|
|
|
+} from "@excalidraw/element";
|
|
|
|
|
|
-import { LinearElementEditor } from "@excalidraw/element/linearElementEditor";
|
|
|
|
|
|
+import { LinearElementEditor } from "@excalidraw/element";
|
|
|
|
|
|
-import { newElementWith } from "@excalidraw/element/mutateElement";
|
|
|
|
|
|
+import { newElementWith } from "@excalidraw/element";
|
|
|
|
|
|
import {
|
|
import {
|
|
newFrameElement,
|
|
newFrameElement,
|
|
@@ -138,12 +135,9 @@ import {
|
|
newLinearElement,
|
|
newLinearElement,
|
|
newTextElement,
|
|
newTextElement,
|
|
refreshTextDimensions,
|
|
refreshTextDimensions,
|
|
-} from "@excalidraw/element/newElement";
|
|
|
|
|
|
+} from "@excalidraw/element";
|
|
|
|
|
|
-import {
|
|
|
|
- deepCopyElement,
|
|
|
|
- duplicateElements,
|
|
|
|
-} from "@excalidraw/element/duplicate";
|
|
|
|
|
|
+import { deepCopyElement, duplicateElements } from "@excalidraw/element";
|
|
|
|
|
|
import {
|
|
import {
|
|
hasBoundTextElement,
|
|
hasBoundTextElement,
|
|
@@ -166,7 +160,7 @@ import {
|
|
isFlowchartNodeElement,
|
|
isFlowchartNodeElement,
|
|
isBindableElement,
|
|
isBindableElement,
|
|
isTextElement,
|
|
isTextElement,
|
|
-} from "@excalidraw/element/typeChecks";
|
|
|
|
|
|
+} from "@excalidraw/element";
|
|
|
|
|
|
import {
|
|
import {
|
|
getLockedLinearCursorAlignSize,
|
|
getLockedLinearCursorAlignSize,
|
|
@@ -174,28 +168,28 @@ import {
|
|
isElementCompletelyInViewport,
|
|
isElementCompletelyInViewport,
|
|
isElementInViewport,
|
|
isElementInViewport,
|
|
isInvisiblySmallElement,
|
|
isInvisiblySmallElement,
|
|
-} from "@excalidraw/element/sizeHelpers";
|
|
|
|
|
|
+} from "@excalidraw/element";
|
|
|
|
|
|
import {
|
|
import {
|
|
getBoundTextShape,
|
|
getBoundTextShape,
|
|
getCornerRadius,
|
|
getCornerRadius,
|
|
getElementShape,
|
|
getElementShape,
|
|
isPathALoop,
|
|
isPathALoop,
|
|
-} from "@excalidraw/element/shapes";
|
|
|
|
|
|
+} from "@excalidraw/element";
|
|
|
|
|
|
import {
|
|
import {
|
|
createSrcDoc,
|
|
createSrcDoc,
|
|
embeddableURLValidator,
|
|
embeddableURLValidator,
|
|
maybeParseEmbedSrc,
|
|
maybeParseEmbedSrc,
|
|
getEmbedLink,
|
|
getEmbedLink,
|
|
-} from "@excalidraw/element/embeddable";
|
|
|
|
|
|
+} from "@excalidraw/element";
|
|
|
|
|
|
import {
|
|
import {
|
|
getInitializedImageElements,
|
|
getInitializedImageElements,
|
|
loadHTMLImageElement,
|
|
loadHTMLImageElement,
|
|
normalizeSVG,
|
|
normalizeSVG,
|
|
updateImageCache as _updateImageCache,
|
|
updateImageCache as _updateImageCache,
|
|
-} from "@excalidraw/element/image";
|
|
|
|
|
|
+} from "@excalidraw/element";
|
|
|
|
|
|
import {
|
|
import {
|
|
getBoundTextElement,
|
|
getBoundTextElement,
|
|
@@ -203,9 +197,9 @@ import {
|
|
getContainerElement,
|
|
getContainerElement,
|
|
isValidTextContainer,
|
|
isValidTextContainer,
|
|
redrawTextBoundingBox,
|
|
redrawTextBoundingBox,
|
|
-} from "@excalidraw/element/textElement";
|
|
|
|
|
|
+} from "@excalidraw/element";
|
|
|
|
|
|
-import { shouldShowBoundingBox } from "@excalidraw/element/transformHandles";
|
|
|
|
|
|
+import { shouldShowBoundingBox } from "@excalidraw/element";
|
|
|
|
|
|
import {
|
|
import {
|
|
getFrameChildren,
|
|
getFrameChildren,
|
|
@@ -222,30 +216,27 @@ import {
|
|
getFrameLikeTitle,
|
|
getFrameLikeTitle,
|
|
getElementsOverlappingFrame,
|
|
getElementsOverlappingFrame,
|
|
filterElementsEligibleAsFrameChildren,
|
|
filterElementsEligibleAsFrameChildren,
|
|
-} from "@excalidraw/element/frame";
|
|
|
|
|
|
+} from "@excalidraw/element";
|
|
|
|
|
|
import {
|
|
import {
|
|
hitElementBoundText,
|
|
hitElementBoundText,
|
|
hitElementBoundingBoxOnly,
|
|
hitElementBoundingBoxOnly,
|
|
hitElementItself,
|
|
hitElementItself,
|
|
-} from "@excalidraw/element/collision";
|
|
|
|
|
|
+} from "@excalidraw/element";
|
|
|
|
|
|
-import { getVisibleSceneBounds } from "@excalidraw/element/bounds";
|
|
|
|
|
|
+import { getVisibleSceneBounds } from "@excalidraw/element";
|
|
|
|
|
|
import {
|
|
import {
|
|
FlowChartCreator,
|
|
FlowChartCreator,
|
|
FlowChartNavigator,
|
|
FlowChartNavigator,
|
|
getLinkDirectionFromKey,
|
|
getLinkDirectionFromKey,
|
|
-} from "@excalidraw/element/flowchart";
|
|
|
|
|
|
+} from "@excalidraw/element";
|
|
|
|
|
|
-import { cropElement } from "@excalidraw/element/cropElement";
|
|
|
|
|
|
+import { cropElement } from "@excalidraw/element";
|
|
|
|
|
|
-import { wrapText } from "@excalidraw/element/textWrapping";
|
|
|
|
|
|
+import { wrapText } from "@excalidraw/element";
|
|
|
|
|
|
-import {
|
|
|
|
- isElementLink,
|
|
|
|
- parseElementLinkFromURL,
|
|
|
|
-} from "@excalidraw/element/elementLink";
|
|
|
|
|
|
+import { isElementLink, parseElementLinkFromURL } from "@excalidraw/element";
|
|
|
|
|
|
import {
|
|
import {
|
|
isMeasureTextSupported,
|
|
isMeasureTextSupported,
|
|
@@ -255,11 +246,11 @@ import {
|
|
getApproxMinLineWidth,
|
|
getApproxMinLineWidth,
|
|
getApproxMinLineHeight,
|
|
getApproxMinLineHeight,
|
|
getMinTextElementWidth,
|
|
getMinTextElementWidth,
|
|
-} from "@excalidraw/element/textMeasurements";
|
|
|
|
|
|
+} from "@excalidraw/element";
|
|
|
|
|
|
-import { ShapeCache } from "@excalidraw/element/ShapeCache";
|
|
|
|
|
|
+import { ShapeCache } from "@excalidraw/element";
|
|
|
|
|
|
-import { getRenderOpacity } from "@excalidraw/element/renderElement";
|
|
|
|
|
|
+import { getRenderOpacity } from "@excalidraw/element";
|
|
|
|
|
|
import {
|
|
import {
|
|
editGroupForSelectedElement,
|
|
editGroupForSelectedElement,
|
|
@@ -269,44 +260,41 @@ import {
|
|
isElementInGroup,
|
|
isElementInGroup,
|
|
isSelectedViaGroup,
|
|
isSelectedViaGroup,
|
|
selectGroupsForSelectedElements,
|
|
selectGroupsForSelectedElements,
|
|
-} from "@excalidraw/element/groups";
|
|
|
|
|
|
+} from "@excalidraw/element";
|
|
|
|
|
|
-import {
|
|
|
|
- syncInvalidIndices,
|
|
|
|
- syncMovedIndices,
|
|
|
|
-} from "@excalidraw/element/fractionalIndex";
|
|
|
|
|
|
+import { syncInvalidIndices, syncMovedIndices } from "@excalidraw/element";
|
|
|
|
|
|
import {
|
|
import {
|
|
excludeElementsInFramesFromSelection,
|
|
excludeElementsInFramesFromSelection,
|
|
getSelectionStateForElements,
|
|
getSelectionStateForElements,
|
|
makeNextSelectedElementIds,
|
|
makeNextSelectedElementIds,
|
|
-} from "@excalidraw/element/selection";
|
|
|
|
|
|
+} from "@excalidraw/element";
|
|
|
|
|
|
import {
|
|
import {
|
|
getResizeOffsetXY,
|
|
getResizeOffsetXY,
|
|
getResizeArrowDirection,
|
|
getResizeArrowDirection,
|
|
transformElements,
|
|
transformElements,
|
|
-} from "@excalidraw/element/resizeElements";
|
|
|
|
|
|
+} from "@excalidraw/element";
|
|
|
|
|
|
import {
|
|
import {
|
|
getCursorForResizingElement,
|
|
getCursorForResizingElement,
|
|
getElementWithTransformHandleType,
|
|
getElementWithTransformHandleType,
|
|
getTransformHandleTypeFromCoords,
|
|
getTransformHandleTypeFromCoords,
|
|
-} from "@excalidraw/element/resizeTest";
|
|
|
|
|
|
+} from "@excalidraw/element";
|
|
|
|
|
|
import {
|
|
import {
|
|
dragNewElement,
|
|
dragNewElement,
|
|
dragSelectedElements,
|
|
dragSelectedElements,
|
|
getDragOffsetXY,
|
|
getDragOffsetXY,
|
|
-} from "@excalidraw/element/dragElements";
|
|
|
|
|
|
+} from "@excalidraw/element";
|
|
|
|
|
|
import { isNonDeletedElement } from "@excalidraw/element";
|
|
import { isNonDeletedElement } from "@excalidraw/element";
|
|
|
|
|
|
-import Scene from "@excalidraw/element/Scene";
|
|
|
|
|
|
+import { Scene } from "@excalidraw/element";
|
|
|
|
|
|
-import { Store, CaptureUpdateAction } from "@excalidraw/element/store";
|
|
|
|
|
|
+import { Store, CaptureUpdateAction } from "@excalidraw/element";
|
|
|
|
|
|
-import type { ElementUpdate } from "@excalidraw/element/mutateElement";
|
|
|
|
|
|
+import type { ElementUpdate } from "@excalidraw/element";
|
|
|
|
|
|
import type { LocalPoint, Radians } from "@excalidraw/math";
|
|
import type { LocalPoint, Radians } from "@excalidraw/math";
|
|
|
|
|