diff --git a/package.json b/package.json index 97105ec6a..c79b22e27 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ "locales-coverage:description": "node scripts/locales-coverage-description.js", "prepare": "husky install", "prettier": "prettier \"**/*.{css,scss,json,md,html,yml}\" --ignore-path=.eslintignore", - "start": "yarn workspace @excalidraw/utils run build:esm && yarn --cwd ./excalidraw-app start", + "start": "yarn clear:workspaces && yarn workspace @excalidraw/utils run build:esm && yarn --cwd ./excalidraw-app start", "start:app:production": "npm run build && npx http-server build -a localhost -p 5001 -o", "test:all": "yarn test:typecheck && yarn test:code && yarn test:other && yarn test:app --watch=false", "test:app": "vitest", diff --git a/packages/excalidraw/components/App.tsx b/packages/excalidraw/components/App.tsx index 54481e1fd..9193a85ba 100644 --- a/packages/excalidraw/components/App.tsx +++ b/packages/excalidraw/components/App.tsx @@ -231,8 +231,8 @@ import { getFreedrawShape, getPolygonShape, getSelectionBoxShape, -} from "../../utils/geometry/shape"; -import { isPointInShape } from "../../utils/collision"; +} from "@excalidraw/utils"; +import { isPointInShape } from "@excalidraw/utils"; import { AppClassProperties, AppProps, diff --git a/packages/excalidraw/element/collision.ts b/packages/excalidraw/element/collision.ts index 6d1a0c04b..7173cc817 100644 --- a/packages/excalidraw/element/collision.ts +++ b/packages/excalidraw/element/collision.ts @@ -12,7 +12,7 @@ import { Polygon, GeometricShape, getPolygonShape, -} from "../../utils/geometry/shape"; +} from "@excalidraw/utils"; import { isPointInShape, isPointOnShape } from "@excalidraw/utils"; import { isTransparent } from "../utils"; import { diff --git a/packages/excalidraw/element/resizeTest.ts b/packages/excalidraw/element/resizeTest.ts index 0ff65aca0..fccc96f80 100644 --- a/packages/excalidraw/element/resizeTest.ts +++ b/packages/excalidraw/element/resizeTest.ts @@ -17,12 +17,8 @@ import { import { AppState, Device, Zoom } from "../types"; import { Bounds, getElementAbsoluteCoords } from "./bounds"; import { SIDE_RESIZING_THRESHOLD } from "../constants"; -import { - angleToDegrees, - pointOnLine, - pointRotate, -} from "../../utils/geometry/geometry"; -import { Line, Point } from "../../utils/geometry/shape"; +import { angleToDegrees, pointOnLine, pointRotate } from "@excalidraw/utils"; +import { Line, Point } from "@excalidraw/utils"; import { isLinearElement } from "./typeChecks"; const isInsideTransformHandle = ( diff --git a/packages/utils/index.ts b/packages/utils/index.ts index 66e448b17..2abce2791 100644 --- a/packages/utils/index.ts +++ b/packages/utils/index.ts @@ -2,3 +2,5 @@ export * from "./export"; export * from "./withinBounds"; export * from "./bbox"; export * from "./collision"; +export * from "./geometry/shape"; +export * from "./geometry/geometry";