Type fixes

This commit is contained in:
Mark Tolmacs 2025-03-26 19:42:40 +01:00
parent f4abdc751e
commit fdd7420e65
6 changed files with 18 additions and 5 deletions

View file

@ -1,4 +1,10 @@
import { average } from "@excalidraw/math";
import {
average,
type GlobalPoint,
type LocalPoint,
pointTranslate,
vector,
} from "@excalidraw/math";
import type {
ExcalidrawBindableElement,

View file

@ -26,7 +26,7 @@ import {
PRECISION,
} from "@excalidraw/math";
import { isPointOnShape } from "@excalidraw/utils/collision";
import { isPointInShape, isPointOnShape } from "@excalidraw/utils/collision";
import type { LocalPoint, Radians } from "@excalidraw/math";

View file

@ -3,11 +3,13 @@ import { type GlobalPoint, pointFrom } from "@excalidraw/math";
import {
maybeBindLinearElement,
bindOrUnbindLinearElement,
getHoveredElementForBinding,
} from "@excalidraw/element/binding";
import { LinearElementEditor } from "@excalidraw/element/linearElementEditor";
import { mutateElement } from "@excalidraw/element/mutateElement";
import {
isBindingElement,
isElbowArrow,
isLinearElement,
} from "@excalidraw/element/typeChecks";

View file

@ -101,6 +101,7 @@ import {
arrayToMap,
type EXPORT_IMAGE_TYPES,
randomInteger,
toLocalPoint,
} from "@excalidraw/common";
import {
@ -119,6 +120,8 @@ import {
shouldEnableBindingForPointerEvent,
updateBoundElements,
getSuggestedBindingsForArrows,
getOutlineAvoidingPoint,
FIXED_BINDING_DISTANCE,
} from "@excalidraw/element/binding";
import { LinearElementEditor } from "@excalidraw/element/linearElementEditor";
@ -230,6 +233,7 @@ import {
hitElementBoundText,
hitElementBoundingBoxOnly,
hitElementItself,
intersectElementWithLineSegment,
} from "@excalidraw/element/collision";
import { getVisibleSceneBounds } from "@excalidraw/element/bounds";
@ -330,7 +334,7 @@ import type {
ExcalidrawArrowElement,
} from "@excalidraw/element/types";
import type { ValueOf } from "@excalidraw/common/utility-types";
import type { Mutable, ValueOf } from "@excalidraw/common/utility-types";
import {
actionAddToLibrary,

View file

@ -1,6 +1,8 @@
import { pointFrom } from "@excalidraw/math";
import { vi } from "vitest";
import { FIXED_BINDING_DISTANCE } from "@excalidraw/element/binding";
import type { ExcalidrawArrowElement } from "@excalidraw/element/types";
import { convertToExcalidrawElements } from "./transform";

View file

@ -6,6 +6,7 @@ import {
waitFor,
} from "@testing-library/react";
import { vi } from "vitest";
import { FIXED_BINDING_DISTANCE } from "@excalidraw/element/binding";
import { pointFrom } from "@excalidraw/math";
import { newElementWith } from "@excalidraw/element/mutateElement";
@ -52,8 +53,6 @@ import * as StaticScene from "../renderer/staticScene";
import { Snapshot, CaptureUpdateAction } from "../store";
import { AppStateChange, ElementsChange } from "../change";
import { FIXED_BINDING_DISTANCE } from "../element/binding.js";
import { API } from "./helpers/api";
import { Keyboard, Pointer, UI } from "./helpers/ui";
import {