build: correct incorrect imports for excalidraw-app build

This commit is contained in:
Deepen Timalsina 2025-04-15 21:37:40 +05:45
parent 81b70e221f
commit b8b6e67559
10 changed files with 21 additions and 20 deletions

View file

@ -18,7 +18,7 @@ import {
} from "@excalidraw/math"; } from "@excalidraw/math";
import { isCurve } from "@excalidraw/math/curve"; import { isCurve } from "@excalidraw/math/curve";
import type { DebugElement } from "@excalidraw/excalidraw/visualdebug"; import type { DebugElement } from "@excalidraw/excalidraw/src/visualdebug";
import type { Curve } from "@excalidraw/math"; import type { Curve } from "@excalidraw/math";

View file

@ -1,9 +1,10 @@
import { API } from ".././tests/helpers/api";
import { import {
createPasteEvent, createPasteEvent,
parseClipboard, parseClipboard,
serializeAsClipboardJSON, serializeAsClipboardJSON,
} from "./clipboard"; } from "./clipboard";
import { API } from "./tests/helpers/api";
describe("parseClipboard()", () => { describe("parseClipboard()", () => {
it("should parse JSON as plaintext if not excalidraw-api/clipboard data", async () => { it("should parse JSON as plaintext if not excalidraw-api/clipboard data", async () => {

View file

@ -2,12 +2,12 @@ import React from "react";
import { DEFAULT_SIDEBAR } from "@excalidraw/common"; import { DEFAULT_SIDEBAR } from "@excalidraw/common";
import { DefaultSidebar } from "../src/index"; import { DefaultSidebar } from "../index";
import { import {
fireEvent, fireEvent,
waitFor, waitFor,
withExcalidrawDimensions, withExcalidrawDimensions,
} from "../tests/test-utils"; } from "../../tests/test-utils";
import { import {
assertExcalidrawWithSidebar, assertExcalidrawWithSidebar,

View file

@ -3,7 +3,7 @@ import { vi } from "vitest";
import { DEFAULT_SIDEBAR } from "@excalidraw/common"; import { DEFAULT_SIDEBAR } from "@excalidraw/common";
import { Excalidraw, Sidebar } from "../../src/index"; import { Excalidraw, Sidebar } from "../../index";
import { import {
act, act,
fireEvent, fireEvent,
@ -12,7 +12,7 @@ import {
render, render,
waitFor, waitFor,
withExcalidrawDimensions, withExcalidrawDimensions,
} from "../../tests/test-utils"; } from "../../../tests/test-utils";
import { import {
assertExcalidrawWithSidebar, assertExcalidrawWithSidebar,

View file

@ -6,7 +6,7 @@ import {
queryByTestId, queryByTestId,
render, render,
withExcalidrawDimensions, withExcalidrawDimensions,
} from "../../tests/test-utils"; } from "../../../tests/test-utils";
export const assertSidebarDockButton = async <T extends boolean>( export const assertSidebarDockButton = async <T extends boolean>(
hasDockButton: T, hasDockButton: T,

View file

@ -18,18 +18,18 @@ import type {
} from "@excalidraw/element/types"; } from "@excalidraw/element/types";
import { Excalidraw, getCommonBounds, mutateElement } from "../.."; import { Excalidraw, getCommonBounds, mutateElement } from "../..";
import { actionGroup } from "../../src/actions"; import { actionGroup } from "../../../src/actions";
import { t } from "../../i18n"; import { t } from "../../i18n";
import * as StaticScene from "../../src/renderer/staticScene"; import * as StaticScene from "../../../src/renderer/staticScene";
import { API } from "../../tests/helpers/api"; import { API } from "../../../tests/helpers/api";
import { Keyboard, Pointer, UI } from "../../tests/helpers/ui"; import { Keyboard, Pointer, UI } from "../../../tests/helpers/ui";
import { getTextEditor, updateTextEditor } from "../../tests/queries/dom"; import { getTextEditor, updateTextEditor } from "../../../tests/queries/dom";
import { import {
GlobalTestState, GlobalTestState,
mockBoundingClientRect, mockBoundingClientRect,
render, render,
restoreOriginalGetBoundingClientRect, restoreOriginalGetBoundingClientRect,
} from "../../tests/test-utils"; } from "../../../tests/test-utils";
import { getStepSizedValue } from "./utils"; import { getStepSizedValue } from "./utils";

View file

@ -1,7 +1,7 @@
import { render } from "@testing-library/react"; import { render } from "@testing-library/react";
import { EditorJotaiProvider } from "../editor-jotai"; import { EditorJotaiProvider } from "../editor-jotai";
import fallbackLangData from "../src/locales/en.json"; import fallbackLangData from "../../src/locales/en.json";
import Trans from "./Trans"; import Trans from "./Trans";

View file

@ -2,14 +2,14 @@ import React from "react";
import { KEYS } from "@excalidraw/common"; import { KEYS } from "@excalidraw/common";
import { Excalidraw } from "../../src/index"; import { Excalidraw } from "../../index";
import { Keyboard } from "../../tests/helpers/ui"; import { Keyboard } from "../../../tests/helpers/ui";
import { import {
render, render,
waitFor, waitFor,
getByTestId, getByTestId,
fireEvent, fireEvent,
} from "../../tests/test-utils"; } from "../../../tests/test-utils";
describe("Test <DropdownMenu/>", () => { describe("Test <DropdownMenu/>", () => {
it("should", async () => { it("should", async () => {

View file

@ -1,7 +1,7 @@
import React from "react"; import React from "react";
import { Excalidraw, MainMenu } from "../../src/index"; import { Excalidraw, MainMenu } from "../../../src/index";
import { render, queryAllByTestId } from "../../tests/test-utils"; import { render, queryAllByTestId } from "../../../tests/test-utils";
describe("Test internal component fallback rendering", () => { describe("Test internal component fallback rendering", () => {
it("should render only one menu per excalidraw instance (custom menu first scenario)", async () => { it("should render only one menu per excalidraw instance (custom menu first scenario)", async () => {

View file

@ -10,7 +10,7 @@ import type {
ImageCrop, ImageCrop,
} from "@excalidraw/element/types"; } from "@excalidraw/element/types";
import { Excalidraw, exportToCanvas, exportToSvg } from ".."; import { Excalidraw, exportToCanvas, exportToSvg } from "../src";
import { actionFlipHorizontal, actionFlipVertical } from "../src/actions"; import { actionFlipHorizontal, actionFlipVertical } from "../src/actions";
import { API } from "./helpers/api"; import { API } from "./helpers/api";