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

@ -3,13 +3,15 @@ import { KEYS, arrayToMap } from "@excalidraw/common";
import { pointFrom } from "@excalidraw/math";
import { actionWrapTextInContainer } from "@excalidraw/excalidraw/actions/actionBoundText";
import { getTransformHandles } from "@excalidraw/element/transformHandles";
import { Excalidraw, isLinearElement } from "@excalidraw/excalidraw";
import { API } from "@excalidraw/excalidraw/tests/helpers/api";
import { UI, Pointer, Keyboard } from "@excalidraw/excalidraw/tests/helpers/ui";
import { fireEvent, render } from "@excalidraw/excalidraw/tests/test-utils";
import { getTransformHandles } from "../src/transformHandles";
const { h } = window;
const mouse = new Pointer("mouse");

View file

@ -17,17 +17,17 @@ import {
render,
} from "@excalidraw/excalidraw/tests/test-utils";
import { bindLinearElement } from "@excalidraw/element/binding";
import type { LocalPoint } from "@excalidraw/math";
import { bindLinearElement } from "../src/binding";
import "../../utils/test-utils";
import type {
ExcalidrawArrowElement,
ExcalidrawBindableElement,
ExcalidrawElbowArrowElement,
} from "@excalidraw/element/types";
import "../../utils/test-utils";
} from "../src/types";
const { h } = window;

View file

@ -10,7 +10,7 @@ import {
render,
} from "@excalidraw/excalidraw/tests/test-utils";
import type { ExcalidrawElement } from "@excalidraw/element/types";
import type { ExcalidrawElement } from "../src/types";
const { h } = window;
const mouse = new Pointer("mouse");

View file

@ -1,10 +1,4 @@
import { pointFrom } from "@excalidraw/math";
import React from "react";
import { getElementPointsCoords } from "@excalidraw/element/bounds";
import { LinearElementEditor } from "@excalidraw/element/linearElementEditor";
import { resizeSingleElement } from "@excalidraw/element/resizeElements";
import { isLinearElement } from "@excalidraw/element/typeChecks";
import { Excalidraw } from "@excalidraw/excalidraw";
import {
@ -23,12 +17,17 @@ import {
import type { LocalPoint } from "@excalidraw/math";
import type { Bounds } from "@excalidraw/element/bounds";
import { isLinearElement } from "../src/typeChecks";
import { resizeSingleElement } from "../src/resizeElements";
import { LinearElementEditor } from "../src/linearElementEditor";
import { getElementPointsCoords } from "../src/bounds";
import type { Bounds } from "../src/bounds";
import type {
ExcalidrawElbowArrowElement,
ExcalidrawFreeDrawElement,
ExcalidrawLinearElement,
} from "@excalidraw/element/types";
} from "../src/types";
unmountComponent();

View file

@ -1,4 +1,4 @@
import { getLineHeight } from "@excalidraw/common/font-metadata";
import { getLineHeight } from "@excalidraw/common";
import { API } from "@excalidraw/excalidraw/tests/helpers/api";
import { FONT_FAMILY } from "@excalidraw/common";

View file

@ -1,5 +1,3 @@
import { selectGroupsForSelectedElements } from "@excalidraw/element/groups";
import { reseed } from "@excalidraw/common";
import {
@ -20,13 +18,15 @@ import {
unmountComponent,
} from "@excalidraw/excalidraw/tests/test-utils";
import type { AppState } from "@excalidraw/excalidraw/types";
import { selectGroupsForSelectedElements } from "../src/groups";
import type {
ExcalidrawElement,
ExcalidrawFrameElement,
ExcalidrawSelectionElement,
} from "@excalidraw/element/types";
import type { AppState } from "@excalidraw/excalidraw/types";
} from "../src/types";
unmountComponent();