chore: release @excalidraw/excalidraw@18.0.0 🎉 (#9127)

This commit is contained in:
Marcel Mraz 2025-02-28 16:49:09 +01:00 committed by GitHub
parent 392118bf26
commit ecef5d12f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
232 changed files with 3412 additions and 2851 deletions

View file

@ -19,7 +19,7 @@ import type {
import type { Bounds } from "./bounds";
import { getCenterForBounds } from "./bounds";
import type { AppState } from "../types";
import { isPointOnShape } from "../../utils/collision";
import { isPointOnShape } from "@excalidraw/utils/collision";
import {
isArrowElement,
isBindableElement,
@ -53,7 +53,7 @@ import {
vectorToHeading,
type Heading,
} from "./heading";
import type { LocalPoint, Radians } from "../../math";
import type { LocalPoint, Radians } from "@excalidraw/math";
import {
lineSegment,
pointFrom,
@ -69,7 +69,7 @@ import {
vectorCross,
pointsEqual,
lineSegmentIntersectionPoints,
} from "../../math";
} from "@excalidraw/math";
import { intersectElementWithLineSegment } from "./collision";
import { distanceToBindableElement } from "./distance";

View file

@ -1,5 +1,5 @@
import type { LocalPoint } from "../../math";
import { pointFrom } from "../../math";
import type { LocalPoint } from "@excalidraw/math";
import { pointFrom } from "@excalidraw/math";
import { ROUNDNESS } from "../constants";
import { arrayToMap } from "../utils";
import { getElementAbsoluteCoords, getElementBounds } from "./bounds";

View file

@ -30,7 +30,7 @@ import type {
LineSegment,
LocalPoint,
Radians,
} from "../../math";
} from "@excalidraw/math";
import {
degreesToRadians,
lineSegment,
@ -38,7 +38,7 @@ import {
pointDistance,
pointFromArray,
pointRotateRads,
} from "../../math";
} from "@excalidraw/math";
import type { Mutable } from "../utility-types";
export type RectangleBox = {

View file

@ -8,9 +8,9 @@ import type {
} from "./types";
import { getElementBounds } from "./bounds";
import type { FrameNameBounds } from "../types";
import type { GeometricShape } from "../../utils/geometry/shape";
import { getPolygonShape } from "../../utils/geometry/shape";
import { isPointInShape, isPointOnShape } from "../../utils/collision";
import type { GeometricShape } from "@excalidraw/utils/geometry/shape";
import { getPolygonShape } from "@excalidraw/utils/geometry/shape";
import { isPointInShape, isPointOnShape } from "@excalidraw/utils/collision";
import { isTransparent } from "../utils";
import {
hasBoundTextElement,
@ -25,7 +25,7 @@ import type {
LocalPoint,
Polygon,
Radians,
} from "../../math";
} from "@excalidraw/math";
import {
curveIntersectLineSegment,
isPointWithinBounds,
@ -35,8 +35,11 @@ import {
pointFrom,
pointRotateRads,
pointsEqual,
} from "../../math";
import { ellipse, ellipseLineIntersectionPoints } from "../../math/ellipse";
} from "@excalidraw/math";
import {
ellipse,
ellipseLineIntersectionPoints,
} from "@excalidraw/math/ellipse";
import {
deconstructDiamondElement,
deconstructRectanguloidElement,

View file

@ -12,7 +12,7 @@ import {
pointFromVector,
clamp,
isCloseTo,
} from "../../math";
} from "@excalidraw/math";
import type { TransformHandleType } from "./transformHandles";
import type {
ElementsMap,

View file

@ -1,11 +1,11 @@
import type { GlobalPoint, Radians } from "../../math";
import type { GlobalPoint, Radians } from "@excalidraw/math";
import {
curvePointDistance,
distanceToLineSegment,
pointFrom,
pointRotateRads,
} from "../../math";
import { ellipse, ellipseDistanceFromPoint } from "../../math/ellipse";
} from "@excalidraw/math";
import { ellipse, ellipseDistanceFromPoint } from "@excalidraw/math/ellipse";
import type {
ExcalidrawBindableElement,
ExcalidrawDiamondElement,

View file

@ -16,9 +16,9 @@ import type {
ExcalidrawElbowArrowElement,
} from "./types";
import { ARROW_TYPE } from "../constants";
import type { LocalPoint } from "../../math";
import { pointFrom } from "../../math";
import "../../utils/test-utils";
import type { LocalPoint } from "@excalidraw/math";
import { pointFrom } from "@excalidraw/math";
const { h } = window;

View file

@ -11,7 +11,7 @@ import {
vectorScale,
type GlobalPoint,
type LocalPoint,
} from "../../math";
} from "@excalidraw/math";
import BinaryHeap from "../binaryheap";
import { getSizeFromPoints } from "../points";
import { aabbForElement, pointInsideBounds } from "../shapes";

View file

@ -12,7 +12,7 @@ import type {
IframeData,
} from "./types";
import type { MarkRequired } from "../utility-types";
import { StoreAction } from "../store";
import { CaptureUpdateAction } from "../store";
type IframeDataWithSandbox = MarkRequired<IframeData, "sandbox">;
@ -340,7 +340,7 @@ export const actionSetEmbeddableAsActiveTool = register({
type: "embeddable",
}),
},
storeAction: StoreAction.NONE,
captureUpdate: CaptureUpdateAction.EVENTUALLY,
};
},
});

View file

@ -31,7 +31,7 @@ import {
isFlowchartNodeElement,
} from "./typeChecks";
import { invariant, toBrandedType } from "../utils";
import { pointFrom, type LocalPoint } from "../../math";
import { pointFrom, type LocalPoint } from "@excalidraw/math";
import { aabbForElement } from "../shapes";
import { updateElbowArrowPoints } from "./elbowArrow";

View file

@ -4,7 +4,7 @@ import type {
Triangle,
Vector,
Radians,
} from "../../math";
} from "@excalidraw/math";
import {
pointFrom,
pointRotateRads,
@ -12,7 +12,7 @@ import {
radiansToDegrees,
triangleIncludesPoint,
vectorFromPoint,
} from "../../math";
} from "@excalidraw/math";
import { getCenterForBounds, type Bounds } from "./bounds";
import type { ExcalidrawBindableElement } from "./types";

View file

@ -47,7 +47,7 @@ import type { Mutable } from "../utility-types";
import { ShapeCache } from "../scene/ShapeCache";
import type { Store } from "../store";
import type Scene from "../scene/Scene";
import type { Radians } from "../../math";
import type { Radians } from "@excalidraw/math";
import {
pointCenter,
pointFrom,
@ -59,7 +59,7 @@ import {
pointDistance,
pointTranslate,
vectorFromPoint,
} from "../../math";
} from "@excalidraw/math";
import {
getBezierCurveLength,
getBezierXY,

View file

@ -7,7 +7,7 @@ import type { Mutable } from "../utility-types";
import { ShapeCache } from "../scene/ShapeCache";
import { isElbowArrow } from "./typeChecks";
import { updateElbowArrowPoints } from "./elbowArrow";
import type { Radians } from "../../math";
import type { Radians } from "@excalidraw/math";
export type ElementUpdate<TElement extends ExcalidrawElement> = Omit<
Partial<TElement>,

View file

@ -4,8 +4,8 @@ import { API } from "../tests/helpers/api";
import { FONT_FAMILY, ROUNDNESS } from "../constants";
import { isPrimitive } from "../utils";
import type { ExcalidrawLinearElement } from "./types";
import type { LocalPoint } from "../../math";
import { pointFrom } from "../../math";
import type { LocalPoint } from "@excalidraw/math";
import { pointFrom } from "@excalidraw/math";
const assertCloneObjects = (source: any, clone: any) => {
for (const key in clone) {

View file

@ -46,7 +46,7 @@ import {
} from "../constants";
import type { MarkOptional, Merge, Mutable } from "../utility-types";
import { getLineHeight } from "../fonts";
import type { Radians } from "../../math";
import type { Radians } from "@excalidraw/math";
import { normalizeText, measureText } from "./textMeasurements";
export type ElementConstructorOpts = MarkOptional<

View file

@ -50,7 +50,7 @@ import {
import { wrapText } from "./textWrapping";
import { LinearElementEditor } from "./linearElementEditor";
import { isInGroup } from "../groups";
import type { GlobalPoint } from "../../math";
import type { GlobalPoint } from "@excalidraw/math";
import {
pointCenter,
normalizeRadians,
@ -59,7 +59,7 @@ import {
pointRotateRads,
type Radians,
type LocalPoint,
} from "../../math";
} from "@excalidraw/math";
import {
getMinTextElementWidth,
measureText,

View file

@ -21,13 +21,13 @@ import type { Bounds } from "./bounds";
import { getElementAbsoluteCoords } from "./bounds";
import { SIDE_RESIZING_THRESHOLD } from "../constants";
import { isImageElement, isLinearElement } from "./typeChecks";
import type { GlobalPoint, LineSegment, LocalPoint } from "../../math";
import type { GlobalPoint, LineSegment, LocalPoint } from "@excalidraw/math";
import {
pointFrom,
pointOnLineSegment,
pointRotateRads,
type Radians,
} from "../../math";
} from "@excalidraw/math";
const isInsideTransformHandle = (
transformHandle: TransformHandle,

View file

@ -23,7 +23,7 @@ import type {
import { API } from "../tests/helpers/api";
import { getOriginalContainerHeightFromCache } from "./containerCache";
import { getTextEditor, updateTextEditor } from "../tests/queries/dom";
import { pointFrom } from "../../math";
import { pointFrom } from "@excalidraw/math";
unmountComponent();

View file

@ -19,8 +19,8 @@ import {
isAndroid,
isIOS,
} from "../constants";
import type { Radians } from "../../math";
import { pointFrom, pointRotateRads } from "../../math";
import type { Radians } from "@excalidraw/math";
import { pointFrom, pointRotateRads } from "@excalidraw/math";
export type TransformHandleDirection =
| "n"

View file

@ -1,4 +1,4 @@
import type { LocalPoint, Radians } from "../../math";
import type { LocalPoint, Radians } from "@excalidraw/math";
import type {
FONT_FAMILY,
ROUNDNESS,

View file

@ -1,5 +1,5 @@
import { getDiamondPoints } from ".";
import type { Curve, LineSegment } from "../../math";
import type { Curve, LineSegment } from "@excalidraw/math";
import {
curve,
lineSegment,
@ -10,7 +10,7 @@ import {
vectorNormalize,
vectorScale,
type GlobalPoint,
} from "../../math";
} from "@excalidraw/math";
import { getCornerRadius } from "../shapes";
import type {
ExcalidrawDiamondElement,