Fix all but components & tests

This commit is contained in:
Marcel Mraz 2025-03-17 19:42:10 +01:00
parent e2c2218f62
commit 44837c9bde
No known key found for this signature in database
GPG key ID: 4EBD6E62DC830CD2
103 changed files with 1284 additions and 1003 deletions

View file

@ -7,71 +7,19 @@ import type {
NonDeleted,
} from "./src/types";
export {
aabbForElement,
getElementShape,
pointInsideBounds,
} from "./src/shapes";
export {
newElement,
newTextElement,
refreshTextDimensions,
newLinearElement,
newArrowElement,
newImageElement,
duplicateElement,
} from "./src/newElement";
export {
getElementAbsoluteCoords,
getElementBounds,
getCommonBounds,
getDiamondPoints,
getArrowheadPoints,
getClosestElementBounds,
} from "./src/bounds";
export {
OMIT_SIDES_FOR_MULTIPLE_ELEMENTS,
getTransformHandlesFromCoords,
getTransformHandles,
} from "./src/transformHandles";
export {
resizeTest,
getCursorForResizingElement,
getElementWithTransformHandleType,
getTransformHandleTypeFromCoords,
} from "./src/resizeTest";
export {
transformElements,
getResizeOffsetXY,
getResizeArrowDirection,
} from "./src/resizeElements";
export {
dragSelectedElements,
getDragOffsetXY,
dragNewElement,
} from "./src/dragElements";
export { isTextElement, isExcalidrawElement } from "./src/typeChecks";
export { redrawTextBoundingBox, getTextFromElements } from "./src/textElement";
export {
getPerfectElementSize,
getLockedLinearCursorAlignSize,
isInvisiblySmallElement,
resizePerfectLineForNWHandler,
getNormalizedDimensions,
} from "./src/sizeHelpers";
export { showSelectedShapeActions } from "./src/showSelectedShapeActions";
export * from "./src/bounds";
export * from "./src/dragElements";
export * from "./src/frame";
export * from "./src/mutateElement";
export * from "./src/newElement";
export * from "./src/resizeElements";
export * from "./src/resizeTest";
export * from "./src/shapes";
export * from "./src/showSelectedShapeActions";
export * from "./src/textElement";
export * from "./src/typeChecks";
export * from "./src/transformHandles";
export * from "./src/sizeHelpers";
/**
* @deprecated unsafe, use hashElementsVersion instead

View file

@ -1,3 +1,10 @@
import {
DEFAULT_ADAPTIVE_RADIUS,
DEFAULT_PROPORTIONAL_RADIUS,
LINE_CONFIRM_THRESHOLD,
ROUNDNESS,
invariant,
} from "@excalidraw/common";
import {
isPoint,
pointFrom,
@ -18,27 +25,22 @@ import {
type GeometricShape,
} from "@excalidraw/utils/geometry/shape";
import {
DEFAULT_ADAPTIVE_RADIUS,
DEFAULT_PROPORTIONAL_RADIUS,
LINE_CONFIRM_THRESHOLD,
ROUNDNESS,
} from "./constants";
import { getElementAbsoluteCoords } from "./element";
import { shouldTestInside } from "./element/collision";
import { LinearElementEditor } from "./element/linearElementEditor";
import { getBoundTextElement } from "./element/textElement";
import { ShapeCache } from "./scene/ShapeCache";
import { invariant } from "./utils";
import type { NormalizedZoomValue, Zoom } from "@excalidraw/excalidraw/types";
import type { Bounds } from "./element/bounds";
import { getElementAbsoluteCoords } from "../index";
import { shouldTestInside } from "./collision";
import { LinearElementEditor } from "./linearElementEditor";
import { getBoundTextElement } from "./textElement";
import { ShapeCache } from "./scene/ShapeCache";
import type { Bounds } from "./bounds";
import type {
ElementsMap,
ExcalidrawElement,
ExcalidrawLinearElement,
NonDeleted,
} from "./element/types";
import type { NormalizedZoomValue, Zoom } from "./types";
} from "./types";
/**
* get the pure geometric shape of an excalidraw elementw