Fx imports and most tests

This commit is contained in:
Marcel Mraz 2025-03-20 13:50:36 +01:00
parent ddac2e969a
commit 40ff1b08ae
70 changed files with 335 additions and 305 deletions

View file

@ -13,14 +13,13 @@ import {
promiseTry,
resolvablePromise,
toValidURL,
Queue,
} from "@excalidraw/common";
import { hashElementsVersion, hashString } from "@excalidraw/element";
import { getCommonBoundingBox } from "@excalidraw/element/bounds";
import { Queue } from "@excalidraw/common/queue";
import type { ExcalidrawElement } from "@excalidraw/element/types";
import type { MaybePromise } from "@excalidraw/common/utility-types";

View file

@ -18,12 +18,7 @@ import {
normalizeLink,
getLineHeight,
} from "@excalidraw/common";
import {
getNonDeletedElements,
getNormalizedDimensions,
isInvisiblySmallElement,
refreshTextDimensions,
} from "@excalidraw/element";
import { getNonDeletedElements } from "@excalidraw/element";
import { normalizeFixedPoint } from "@excalidraw/element/binding";
import {
updateElbowArrowPoints,
@ -44,6 +39,10 @@ import {
import { syncInvalidIndices } from "@excalidraw/element/fractionalIndex";
import { refreshTextDimensions } from "@excalidraw/element/newElement";
import { getNormalizedDimensions } from "@excalidraw/element/sizeHelpers";
import type { LocalPoint, Radians } from "@excalidraw/math";
import type {
@ -72,6 +71,8 @@ import {
getNormalizedZoom,
} from "../scene";
import { isInvisiblySmallElement } from "..";
import type { AppState, BinaryFiles, LibraryItem } from "../types";
import type { ImportedDataState, LegacyAppState } from "./types";

View file

@ -15,17 +15,14 @@ import {
toBrandedType,
getLineHeight,
} from "@excalidraw/common";
import {
getCommonBounds,
newElement,
newLinearElement,
redrawTextBoundingBox,
} from "@excalidraw/element";
import { bindLinearElement } from "@excalidraw/element/binding";
import {
newArrowElement,
newElement,
newFrameElement,
newImageElement,
newLinearElement,
newMagicFrameElement,
newTextElement,
} from "@excalidraw/element/newElement";
@ -37,6 +34,8 @@ import { isArrowElement } from "@excalidraw/element/typeChecks";
import { syncInvalidIndices } from "@excalidraw/element/fractionalIndex";
import { redrawTextBoundingBox } from "@excalidraw/element/textElement";
import type { ElementConstructorOpts } from "@excalidraw/element/newElement";
import type {
@ -62,6 +61,8 @@ import type {
import type { MarkOptional } from "@excalidraw/common/utility-types";
import { getCommonBounds } from "..";
export type ValidLinearElement = {
type: "arrow" | "line";
x: number;