refactor: old paths updated to reflect new path for files in excalidraw package

This commit is contained in:
Deepen Timalsina 2025-04-14 22:50:46 +05:45
parent 98e7946887
commit 18a187e470
107 changed files with 256 additions and 242 deletions

View file

@ -9,7 +9,7 @@ import React, {
} from "react"; } from "react";
import type * as TExcalidraw from "@excalidraw/excalidraw"; import type * as TExcalidraw from "@excalidraw/excalidraw";
import type { ImportedLibraryData } from "@excalidraw/excalidraw/data/types"; import type { ImportedLibraryData } from "@excalidraw/excalidraw/src/data/types";
import type { import type {
NonDeletedExcalidrawElement, NonDeletedExcalidrawElement,
Theme, Theme,

View file

@ -1,4 +1,4 @@
import type { ExcalidrawElementSkeleton } from "@excalidraw/excalidraw/data/transform"; import type { ExcalidrawElementSkeleton } from "@excalidraw/excalidraw/src/data/transform";
import type { FileId } from "@excalidraw/excalidraw/element/types"; import type { FileId } from "@excalidraw/excalidraw/element/types";
const elements: ExcalidrawElementSkeleton[] = [ const elements: ExcalidrawElementSkeleton[] = [

View file

@ -31,11 +31,11 @@ import {
isRunningInIframe, isRunningInIframe,
isDevEnv, isDevEnv,
} from "@excalidraw/common"; } from "@excalidraw/common";
import polyfill from "@excalidraw/excalidraw/src/src/polyfill"; import polyfill from "@excalidraw/excalidraw/src/polyfill";
import { useCallback, useEffect, useRef, useState } from "react"; import { useCallback, useEffect, useRef, useState } from "react";
import { loadFromBlob } from "@excalidraw/excalidraw/src/data/blob"; import { loadFromBlob } from "@excalidraw/excalidraw/src/data/blob";
import { useCallbackRefState } from "@excalidraw/excalidraw/src/hooks/useCallbackRefState"; import { useCallbackRefState } from "@excalidraw/excalidraw/src/hooks/useCallbackRefState";
import { t } from "@excalidraw/excalidraw/src/src/i18n"; import { t } from "@excalidraw/excalidraw/src/i18n";
import { import {
GithubIcon, GithubIcon,
@ -73,7 +73,7 @@ import type {
BinaryFiles, BinaryFiles,
ExcalidrawInitialDataState, ExcalidrawInitialDataState,
UIAppState, UIAppState,
} from "@excalidraw/excalidraw/src/src/types"; } from "@excalidraw/excalidraw/src/types";
import type { ResolutionType } from "@excalidraw/common/utility-types"; import type { ResolutionType } from "@excalidraw/common/utility-types";
import type { ResolvablePromise } from "@excalidraw/common/utils"; import type { ResolvablePromise } from "@excalidraw/common/utils";

View file

@ -1,4 +1,4 @@
import { base64urlToString } from "@excalidraw/excalidraw/data/encode"; import { base64urlToString } from "@excalidraw/excalidraw/src/data/encode";
import { ExcalidrawError } from "@excalidraw/excalidraw/src/errors"; import { ExcalidrawError } from "@excalidraw/excalidraw/src/errors";
import { useLayoutEffect, useRef } from "react"; import { useLayoutEffect, useRef } from "react";

View file

@ -5,7 +5,7 @@ import {
zoomToFitBounds, zoomToFitBounds,
reconcileElements, reconcileElements,
} from "@excalidraw/excalidraw/src"; } from "@excalidraw/excalidraw/src";
import { ErrorDialog } from "@excalidraw/excalidraw/components/ErrorDialog"; import { ErrorDialog } from "@excalidraw/excalidraw/src/components/ErrorDialog";
import { APP_NAME, EVENT } from "@excalidraw/common"; import { APP_NAME, EVENT } from "@excalidraw/common";
import { import {
IDLE_THRESHOLD, IDLE_THRESHOLD,
@ -18,7 +18,7 @@ import {
resolvablePromise, resolvablePromise,
throttleRAF, throttleRAF,
} from "@excalidraw/common"; } from "@excalidraw/common";
import { decryptData } from "@excalidraw/excalidraw/data/encryption"; import { decryptData } from "@excalidraw/excalidraw/src/data/encryption";
import { getVisibleSceneBounds } from "@excalidraw/element/bounds"; import { getVisibleSceneBounds } from "@excalidraw/element/bounds";
import { newElementWith } from "@excalidraw/element/mutateElement"; import { newElementWith } from "@excalidraw/element/mutateElement";
import { import {
@ -35,8 +35,8 @@ import { PureComponent } from "react";
import type { import type {
ReconciledExcalidrawElement, ReconciledExcalidrawElement,
RemoteExcalidrawElement, RemoteExcalidrawElement,
} from "@excalidraw/excalidraw/data/reconcile"; } from "@excalidraw/excalidraw/src/data/reconcile";
import type { ImportedDataState } from "@excalidraw/excalidraw/data/types"; import type { ImportedDataState } from "@excalidraw/excalidraw/src/data/types";
import type { import type {
ExcalidrawElement, ExcalidrawElement,
FileId, FileId,

View file

@ -1,5 +1,5 @@
import { Tooltip } from "@excalidraw/excalidraw/components/Tooltip"; import { Tooltip } from "@excalidraw/excalidraw/src/components/Tooltip";
import { warning } from "@excalidraw/excalidraw/components/icons"; import { warning } from "@excalidraw/excalidraw/src/components/icons";
import clsx from "clsx"; import clsx from "clsx";
import { useEffect, useRef, useState } from "react"; import { useEffect, useRef, useState } from "react";

View file

@ -1,6 +1,6 @@
import { CaptureUpdateAction } from "@excalidraw/excalidraw/src"; import { CaptureUpdateAction } from "@excalidraw/excalidraw/src";
import { trackEvent } from "@excalidraw/excalidraw/analytics"; import { trackEvent } from "@excalidraw/excalidraw/src/analytics";
import { encryptData } from "@excalidraw/excalidraw/data/encryption"; import { encryptData } from "@excalidraw/excalidraw/src/data/encryption";
import { newElementWith } from "@excalidraw/element/mutateElement"; import { newElementWith } from "@excalidraw/element/mutateElement";
import throttle from "lodash.throttle"; import throttle from "lodash.throttle";

View file

@ -5,7 +5,7 @@ import {
MIME_TYPES, MIME_TYPES,
TTDDialog, TTDDialog,
} from "@excalidraw/excalidraw/src"; } from "@excalidraw/excalidraw/src";
import { getDataURL } from "@excalidraw/excalidraw/data/blob"; import { getDataURL } from "@excalidraw/excalidraw/src/data/blob";
import { safelyParseJSON } from "@excalidraw/common"; import { safelyParseJSON } from "@excalidraw/common";
import type { ExcalidrawImperativeAPI } from "@excalidraw/excalidraw/src/types"; import type { ExcalidrawImperativeAPI } from "@excalidraw/excalidraw/src/types";

View file

@ -2,7 +2,7 @@ import {
loginIcon, loginIcon,
ExcalLogo, ExcalLogo,
eyeIcon, eyeIcon,
} from "@excalidraw/excalidraw/components/icons"; } from "@excalidraw/excalidraw/src/components/icons";
import { MainMenu } from "@excalidraw/excalidraw/src/index"; import { MainMenu } from "@excalidraw/excalidraw/src/index";
import React from "react"; import React from "react";

View file

@ -1,4 +1,4 @@
import { loginIcon } from "@excalidraw/excalidraw/components/icons"; import { loginIcon } from "@excalidraw/excalidraw/src/components/icons";
import { POINTER_EVENTS } from "@excalidraw/common"; import { POINTER_EVENTS } from "@excalidraw/common";
import { useI18n } from "@excalidraw/excalidraw/src/i18n"; import { useI18n } from "@excalidraw/excalidraw/src/i18n";
import { WelcomeScreen } from "@excalidraw/excalidraw/src/index"; import { WelcomeScreen } from "@excalidraw/excalidraw/src/index";

View file

@ -2,11 +2,11 @@ import {
ArrowheadArrowIcon, ArrowheadArrowIcon,
CloseIcon, CloseIcon,
TrashIcon, TrashIcon,
} from "@excalidraw/excalidraw/components/icons"; } from "@excalidraw/excalidraw/src/components/icons";
import { import {
bootstrapCanvas, bootstrapCanvas,
getNormalizedCanvasDimensions, getNormalizedCanvasDimensions,
} from "@excalidraw/excalidraw/renderer/helpers"; } from "@excalidraw/excalidraw/src/renderer/helpers";
import { type AppState } from "@excalidraw/excalidraw/src/types"; import { type AppState } from "@excalidraw/excalidraw/src/types";
import { throttleRAF } from "@excalidraw/common"; import { throttleRAF } from "@excalidraw/common";
import { useCallback, useImperativeHandle, useRef } from "react"; import { useCallback, useImperativeHandle, useRef } from "react";

View file

@ -1,5 +1,5 @@
import { Tooltip } from "@excalidraw/excalidraw/components/Tooltip"; import { Tooltip } from "@excalidraw/excalidraw/src/components/Tooltip";
import { shield } from "@excalidraw/excalidraw/components/icons"; import { shield } from "@excalidraw/excalidraw/src/components/icons";
import { useI18n } from "@excalidraw/excalidraw/src/i18n"; import { useI18n } from "@excalidraw/excalidraw/src/i18n";
export const EncryptedIcon = () => { export const EncryptedIcon = () => {

View file

@ -2,16 +2,16 @@ import React from "react";
import { uploadBytes, ref } from "firebase/storage"; import { uploadBytes, ref } from "firebase/storage";
import { nanoid } from "nanoid"; import { nanoid } from "nanoid";
import { trackEvent } from "@excalidraw/excalidraw/analytics"; import { trackEvent } from "@excalidraw/excalidraw/src/analytics";
import { Card } from "@excalidraw/excalidraw/components/Card"; import { Card } from "@excalidraw/excalidraw/src/components/Card";
import { ExcalidrawLogo } from "@excalidraw/excalidraw/components/ExcalidrawLogo"; import { ExcalidrawLogo } from "@excalidraw/excalidraw/src/components/ExcalidrawLogo";
import { ToolButton } from "@excalidraw/excalidraw/components/ToolButton"; import { ToolButton } from "@excalidraw/excalidraw/src/components/ToolButton";
import { MIME_TYPES, getFrame } from "@excalidraw/common"; import { MIME_TYPES, getFrame } from "@excalidraw/common";
import { import {
encryptData, encryptData,
generateEncryptionKey, generateEncryptionKey,
} from "@excalidraw/excalidraw/data/encryption"; } from "@excalidraw/excalidraw/src/data/encryption";
import { serializeAsJSON } from "@excalidraw/excalidraw/data/json"; import { serializeAsJSON } from "@excalidraw/excalidraw/src/data/json";
import { isInitializedImageElement } from "@excalidraw/element/typeChecks"; import { isInitializedImageElement } from "@excalidraw/element/typeChecks";
import { useI18n } from "@excalidraw/excalidraw/src/i18n"; import { useI18n } from "@excalidraw/excalidraw/src/i18n";

View file

@ -1,4 +1,4 @@
import Trans from "@excalidraw/excalidraw/components/Trans"; import Trans from "@excalidraw/excalidraw/src/components/Trans";
import { t } from "@excalidraw/excalidraw/src/i18n"; import { t } from "@excalidraw/excalidraw/src/i18n";
import * as Sentry from "@sentry/browser"; import * as Sentry from "@sentry/browser";
import React from "react"; import React from "react";

View file

@ -1,5 +1,5 @@
import { CaptureUpdateAction } from "@excalidraw/excalidraw/src"; import { CaptureUpdateAction } from "@excalidraw/excalidraw/src";
import { compressData } from "@excalidraw/excalidraw/data/encode"; import { compressData } from "@excalidraw/excalidraw/src/data/encode";
import { newElementWith } from "@excalidraw/element/mutateElement"; import { newElementWith } from "@excalidraw/element/mutateElement";
import { isInitializedImageElement } from "@excalidraw/element/typeChecks"; import { isInitializedImageElement } from "@excalidraw/element/typeChecks";
import { t } from "@excalidraw/excalidraw/src/i18n"; import { t } from "@excalidraw/excalidraw/src/i18n";

View file

@ -10,7 +10,7 @@
* (localStorage, indexedDB). * (localStorage, indexedDB).
*/ */
import { clearAppStateForLocalStorage } from "@excalidraw/excalidraw/appState"; import { clearAppStateForLocalStorage } from "@excalidraw/excalidraw/src/appState";
import { import {
CANVAS_SEARCH_TAB, CANVAS_SEARCH_TAB,
DEFAULT_SIDEBAR, DEFAULT_SIDEBAR,
@ -27,8 +27,8 @@ import {
get, get,
} from "idb-keyval"; } from "idb-keyval";
import type { LibraryPersistedData } from "@excalidraw/excalidraw/data/library"; import type { LibraryPersistedData } from "@excalidraw/excalidraw/src/data/library";
import type { ImportedDataState } from "@excalidraw/excalidraw/data/types"; import type { ImportedDataState } from "@excalidraw/excalidraw/src/data/types";
import type { ExcalidrawElement, FileId } from "@excalidraw/element/types"; import type { ExcalidrawElement, FileId } from "@excalidraw/element/types";
import type { import type {
AppState, AppState,

View file

@ -1,11 +1,11 @@
import { reconcileElements } from "@excalidraw/excalidraw/src"; import { reconcileElements } from "@excalidraw/excalidraw/src";
import { MIME_TYPES } from "@excalidraw/common"; import { MIME_TYPES } from "@excalidraw/common";
import { decompressData } from "@excalidraw/excalidraw/data/encode"; import { decompressData } from "@excalidraw/excalidraw/src/data/encode";
import { import {
encryptData, encryptData,
decryptData, decryptData,
} from "@excalidraw/excalidraw/data/encryption"; } from "@excalidraw/excalidraw/src/data/encryption";
import { restoreElements } from "@excalidraw/excalidraw/data/restore"; import { restoreElements } from "@excalidraw/excalidraw/src/data/restore";
import { getSceneVersion } from "@excalidraw/element"; import { getSceneVersion } from "@excalidraw/element";
import { initializeApp } from "firebase/app"; import { initializeApp } from "firebase/app";
import { import {
@ -17,7 +17,7 @@ import {
} from "firebase/firestore"; } from "firebase/firestore";
import { getStorage, ref, uploadBytes } from "firebase/storage"; import { getStorage, ref, uploadBytes } from "firebase/storage";
import type { RemoteExcalidrawElement } from "@excalidraw/excalidraw/data/reconcile"; import type { RemoteExcalidrawElement } from "@excalidraw/excalidraw/src/data/reconcile";
import type { import type {
ExcalidrawElement, ExcalidrawElement,
FileId, FileId,

View file

@ -1,21 +1,21 @@
import { import {
compressData, compressData,
decompressData, decompressData,
} from "@excalidraw/excalidraw/data/encode"; } from "@excalidraw/excalidraw/src/data/encode";
import { import {
decryptData, decryptData,
generateEncryptionKey, generateEncryptionKey,
IV_LENGTH_BYTES, IV_LENGTH_BYTES,
} from "@excalidraw/excalidraw/data/encryption"; } from "@excalidraw/excalidraw/src/data/encryption";
import { serializeAsJSON } from "@excalidraw/excalidraw/data/json"; import { serializeAsJSON } from "@excalidraw/excalidraw/src/data/json";
import { restore } from "@excalidraw/excalidraw/data/restore"; import { restore } from "@excalidraw/excalidraw/src/data/restore";
import { isInvisiblySmallElement } from "@excalidraw/element/sizeHelpers"; import { isInvisiblySmallElement } from "@excalidraw/element/sizeHelpers";
import { isInitializedImageElement } from "@excalidraw/element/typeChecks"; import { isInitializedImageElement } from "@excalidraw/element/typeChecks";
import { t } from "@excalidraw/excalidraw/src/i18n"; import { t } from "@excalidraw/excalidraw/src/i18n";
import { bytesToHexString } from "@excalidraw/common"; import { bytesToHexString } from "@excalidraw/common";
import type { UserIdleState } from "@excalidraw/common"; import type { UserIdleState } from "@excalidraw/common";
import type { ImportedDataState } from "@excalidraw/excalidraw/data/types"; import type { ImportedDataState } from "@excalidraw/excalidraw/src/data/types";
import type { SceneBounds } from "@excalidraw/element/bounds"; import type { SceneBounds } from "@excalidraw/element/bounds";
import type { import type {
ExcalidrawElement, ExcalidrawElement,

View file

@ -1,7 +1,7 @@
import { import {
clearAppStateForLocalStorage, clearAppStateForLocalStorage,
getDefaultAppState, getDefaultAppState,
} from "@excalidraw/excalidraw/appState"; } from "@excalidraw/excalidraw/src/appState";
import { clearElementsForLocalStorage } from "@excalidraw/element"; import { clearElementsForLocalStorage } from "@excalidraw/element";
import type { ExcalidrawElement } from "@excalidraw/element/types"; import type { ExcalidrawElement } from "@excalidraw/element/types";

View file

@ -1,8 +1,8 @@
import { trackEvent } from "@excalidraw/excalidraw/analytics"; import { trackEvent } from "@excalidraw/excalidraw/src/analytics";
import { copyTextToSystemClipboard } from "@excalidraw/excalidraw/src/clipboard"; import { copyTextToSystemClipboard } from "@excalidraw/excalidraw/src/clipboard";
import { Dialog } from "@excalidraw/excalidraw/components/Dialog"; import { Dialog } from "@excalidraw/excalidraw/src/components/Dialog";
import { FilledButton } from "@excalidraw/excalidraw/components/FilledButton"; import { FilledButton } from "@excalidraw/excalidraw/src/components/FilledButton";
import { TextField } from "@excalidraw/excalidraw/components/TextField"; import { TextField } from "@excalidraw/excalidraw/src/components/TextField";
import { import {
copyIcon, copyIcon,
LinkIcon, LinkIcon,
@ -11,9 +11,9 @@ import {
share, share,
shareIOS, shareIOS,
shareWindows, shareWindows,
} from "@excalidraw/excalidraw/components/icons"; } from "@excalidraw/excalidraw/src/components/icons";
import { useUIAppState } from "@excalidraw/excalidraw/context/ui-appState"; import { useUIAppState } from "@excalidraw/excalidraw/src/context/ui-appState";
import { useCopyStatus } from "@excalidraw/excalidraw/hooks/useCopiedIndicator"; import { useCopyStatus } from "@excalidraw/excalidraw/src/hooks/useCopiedIndicator";
import { useI18n } from "@excalidraw/excalidraw/src/i18n"; import { useI18n } from "@excalidraw/excalidraw/src/i18n";
import { KEYS, getFrame } from "@excalidraw/common"; import { KEYS, getFrame } from "@excalidraw/common";
import { useEffect, useRef, useState } from "react"; import { useEffect, useRef, useState } from "react";

View file

@ -5,7 +5,7 @@ import {
import { import {
createRedoAction, createRedoAction,
createUndoAction, createUndoAction,
} from "@excalidraw/excalidraw/actions/actionHistory"; } from "@excalidraw/excalidraw/src/actions/actionHistory";
import { syncInvalidIndices } from "@excalidraw/element/fractionalIndex"; import { syncInvalidIndices } from "@excalidraw/element/fractionalIndex";
import { API } from "@excalidraw/excalidraw/tests/helpers/api"; import { API } from "@excalidraw/excalidraw/tests/helpers/api";
import { act, render, waitFor } from "@excalidraw/excalidraw/tests/test-utils"; import { act, render, waitFor } from "@excalidraw/excalidraw/tests/test-utils";

View file

@ -8,7 +8,7 @@ import {
actionAlignBottom, actionAlignBottom,
actionAlignLeft, actionAlignLeft,
actionAlignRight, actionAlignRight,
} from "@excalidraw/excalidraw/actions"; } from "@excalidraw/excalidraw/src/actions";
import { defaultLang, setLanguage } from "@excalidraw/excalidraw/src/i18n"; import { defaultLang, setLanguage } from "@excalidraw/excalidraw/src/i18n";
import { Excalidraw } from "@excalidraw/excalidraw/src"; import { Excalidraw } from "@excalidraw/excalidraw/src";

View file

@ -2,7 +2,7 @@ import { KEYS, arrayToMap } from "@excalidraw/common";
import { pointFrom } from "@excalidraw/math"; import { pointFrom } from "@excalidraw/math";
import { actionWrapTextInContainer } from "@excalidraw/excalidraw/actions/actionBoundText"; import { actionWrapTextInContainer } from "@excalidraw/excalidraw/src/actions/actionBoundText";
import { Excalidraw, isLinearElement } from "@excalidraw/excalidraw/src"; import { Excalidraw, isLinearElement } from "@excalidraw/excalidraw/src";

View file

@ -10,7 +10,7 @@ import {
import { Excalidraw } from "@excalidraw/excalidraw/src"; import { Excalidraw } from "@excalidraw/excalidraw/src";
import { actionDuplicateSelection } from "@excalidraw/excalidraw/actions"; import { actionDuplicateSelection } from "@excalidraw/excalidraw/src/actions";
import { API } from "@excalidraw/excalidraw/tests/helpers/api"; import { API } from "@excalidraw/excalidraw/tests/helpers/api";

View file

@ -2,9 +2,9 @@ import { ARROW_TYPE } from "@excalidraw/common";
import { pointFrom } from "@excalidraw/math"; import { pointFrom } from "@excalidraw/math";
import { Excalidraw, mutateElement } from "@excalidraw/excalidraw/src"; import { Excalidraw, mutateElement } from "@excalidraw/excalidraw/src";
import Scene from "@excalidraw/excalidraw/scene/Scene"; import Scene from "@excalidraw/excalidraw/src/scene/Scene";
import { actionSelectAll } from "@excalidraw/excalidraw/actions"; import { actionSelectAll } from "@excalidraw/excalidraw/src/actions";
import { actionDuplicateSelection } from "@excalidraw/excalidraw/actions/actionDuplicateSelection"; import { actionDuplicateSelection } from "@excalidraw/excalidraw/src/actions/actionDuplicateSelection";
import { API } from "@excalidraw/excalidraw/tests/helpers/api"; import { API } from "@excalidraw/excalidraw/tests/helpers/api";
import { Pointer, UI } from "@excalidraw/excalidraw/tests/helpers/ui"; import { Pointer, UI } from "@excalidraw/excalidraw/tests/helpers/ui";

View file

@ -6,7 +6,7 @@ import {
actionBringToFront, actionBringToFront,
actionSendToBack, actionSendToBack,
actionDuplicateSelection, actionDuplicateSelection,
} from "@excalidraw/excalidraw/actions"; } from "@excalidraw/excalidraw/src/actions";
import { Excalidraw } from "@excalidraw/excalidraw/src"; import { Excalidraw } from "@excalidraw/excalidraw/src";

View file

@ -23,7 +23,7 @@ import {
getDefaultAppState, getDefaultAppState,
isEraserActive, isEraserActive,
isHandToolActive, isHandToolActive,
} from "../../appState"; } from "../../src/appState";
import { ColorPicker } from "../components/ColorPicker/ColorPicker"; import { ColorPicker } from "../components/ColorPicker/ColorPicker";
import { ToolButton } from "../components/ToolButton"; import { ToolButton } from "../components/ToolButton";
import { Tooltip } from "../components/Tooltip"; import { Tooltip } from "../components/Tooltip";

View file

@ -1,8 +1,12 @@
import React from "react"; import React from "react";
import { Excalidraw, mutateElement } from "../index"; import { Excalidraw, mutateElement } from "../index";
import { API } from "../tests/helpers/api"; import { API } from "@excalidraw/excalidraw/tests/helpers/api";
import { act, assertElements, render } from "../tests/test-utils"; import {
act,
assertElements,
render,
} from "@excalidraw/excalidraw/tests/test-utils";
import { actionDeleteSelected } from "./actionDeleteSelected"; import { actionDeleteSelected } from "./actionDeleteSelected";

View file

@ -1,13 +1,13 @@
import { ORIG_ID } from "@excalidraw/common"; import { ORIG_ID } from "@excalidraw/common";
import { Excalidraw } from "../index"; import { Excalidraw } from "../index";
import { API } from "../tests/helpers/api"; import { API } from "@excalidraw/excalidraw/tests/helpers/api";
import { import {
act, act,
assertElements, assertElements,
getCloneByOrigId, getCloneByOrigId,
render, render,
} from "../tests/test-utils"; } from "@excalidraw/excalidraw/tests/test-utils";
import { actionDuplicateSelection } from "./actionDuplicateSelection"; import { actionDuplicateSelection } from "./actionDuplicateSelection";

View file

@ -2,9 +2,9 @@ import { queryByTestId, fireEvent } from "@testing-library/react";
import React from "react"; import React from "react";
import { Excalidraw } from "../index"; import { Excalidraw } from "../index";
import { API } from "../tests/helpers/api"; import { API } from "@excalidraw/excalidraw/tests/helpers/api";
import { Pointer, UI } from "../tests/helpers/ui"; import { Pointer, UI } from "@excalidraw/excalidraw/tests/helpers/ui";
import { render } from "../tests/test-utils"; import { render } from "@excalidraw/excalidraw/tests/test-utils";
const { h } = window; const { h } = window;
const mouse = new Pointer("mouse"); const mouse = new Pointer("mouse");

View file

@ -1,8 +1,8 @@
import { pointFrom } from "@excalidraw/math"; import { pointFrom } from "@excalidraw/math";
import { Excalidraw } from "../index"; import { Excalidraw } from "../index";
import { API } from "../tests/helpers/api"; import { API } from "@excalidraw/excalidraw/tests/helpers/api";
import { render } from "../tests/test-utils"; import { render } from "@excalidraw/excalidraw/tests/test-utils";
import { actionFlipHorizontal, actionFlipVertical } from "./actionFlip"; import { actionFlipHorizontal, actionFlipVertical } from "./actionFlip";

View file

@ -4,12 +4,12 @@ import type { SceneElementsMap } from "@excalidraw/element/types";
import { ToolButton } from "../components/ToolButton"; import { ToolButton } from "../components/ToolButton";
import { UndoIcon, RedoIcon } from "../components/icons"; import { UndoIcon, RedoIcon } from "../components/icons";
import { HistoryChangedEvent } from "../../history"; import { HistoryChangedEvent } from "../../src/history";
import { useEmitter } from "../../hooks/useEmitter"; import { useEmitter } from "../../src/hooks/useEmitter";
import { t } from "../i18n"; import { t } from "../i18n";
import { CaptureUpdateAction } from "../store"; import { CaptureUpdateAction } from "../store";
import type { History } from "../../history"; import type { History } from "../../src/history";
import type { Store } from "../store"; import type { Store } from "../store";
import type { AppClassProperties, AppState } from "../types"; import type { AppClassProperties, AppState } from "../types";
import type { Action, ActionResult } from "./types"; import type { Action, ActionResult } from "./types";

View file

@ -7,10 +7,12 @@ import {
STROKE_WIDTH, STROKE_WIDTH,
} from "@excalidraw/common"; } from "@excalidraw/common";
import { API } from "@excalidraw/excalidraw/tests/helpers/api";
import { render } from "@excalidraw/excalidraw/tests/test-utils";
import { UI } from "@excalidraw/excalidraw/tests/helpers/ui";
import { Excalidraw } from "../index"; import { Excalidraw } from "../index";
import { API } from "../tests/helpers/api";
import { UI } from "../tests/helpers/ui";
import { render } from "../tests/test-utils";
describe("element locking", () => { describe("element locking", () => {
beforeEach(async () => { beforeEach(async () => {

View file

@ -71,7 +71,7 @@ import type {
NonDeletedSceneElementsMap, NonDeletedSceneElementsMap,
} from "@excalidraw/element/types"; } from "@excalidraw/element/types";
import { trackEvent } from "../../analytics"; import { trackEvent } from "../../src/analytics";
import { ButtonIconSelect } from "../components/ButtonIconSelect"; import { ButtonIconSelect } from "../components/ButtonIconSelect";
import { ColorPicker } from "../components/ColorPicker/ColorPicker"; import { ColorPicker } from "../components/ColorPicker/ColorPicker";
import { FontPicker } from "../components/FontPicker/FontPicker"; import { FontPicker } from "../components/FontPicker/FontPicker";
@ -123,7 +123,7 @@ import {
ArrowheadCrowfootOneOrManyIcon, ArrowheadCrowfootOneOrManyIcon,
} from "../components/icons"; } from "../components/icons";
import { Fonts } from "../../fonts"; import { Fonts } from "../../src/fonts";
import { getLanguage, t } from "../i18n"; import { getLanguage, t } from "../i18n";
import { import {
canHaveArrowheads, canHaveArrowheads,

View file

@ -7,7 +7,7 @@ import type {
OrderedExcalidrawElement, OrderedExcalidrawElement,
} from "@excalidraw/element/types"; } from "@excalidraw/element/types";
import { trackEvent } from "../../analytics"; import { trackEvent } from "../../src/analytics";
import type { AppClassProperties, AppState } from "../types"; import type { AppClassProperties, AppState } from "../types";
import type { import type {

View file

@ -9,9 +9,10 @@ import {
import type { LaserPointerOptions } from "@excalidraw/laser-pointer"; import type { LaserPointerOptions } from "@excalidraw/laser-pointer";
import type { AnimationFrameHandler } from "./animation-frame-handler"; import type { AnimationFrameHandler } from "./animation-frame-handler";
import type App from "./src/components/App";
import type { AppState } from "./types"; import type { AppState } from "./types";
import type App from "./components/App";
export interface Trail { export interface Trail {
start(container: SVGSVGElement): void; start(container: SVGSVGElement): void;
stop(): void; stop(): void;

View file

@ -3,7 +3,7 @@ import {
parseClipboard, parseClipboard,
serializeAsClipboardJSON, serializeAsClipboardJSON,
} from "./clipboard"; } from "./clipboard";
import { API } from "../tests/helpers/api"; import { API } from "@excalidraw/excalidraw/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

@ -33,7 +33,7 @@ import type {
import { actionToggleZenMode } from "../actions"; import { actionToggleZenMode } from "../actions";
import { alignActionsPredicate } from "../actions/actionAlign"; import { alignActionsPredicate } from "../actions/actionAlign";
import { trackEvent } from "../../analytics"; import { trackEvent } from "../../src/analytics";
import { useTunnels } from "../context/tunnels"; import { useTunnels } from "../context/tunnels";
import { t } from "../i18n"; import { t } from "../i18n";

View file

@ -379,19 +379,19 @@ import { actionToggleViewMode } from "../actions/actionToggleViewMode";
import { ActionManager } from "../actions/manager"; import { ActionManager } from "../actions/manager";
import { actions } from "../actions/register"; import { actions } from "../actions/register";
import { getShortcutFromShortcutName } from "../actions/shortcuts"; import { getShortcutFromShortcutName } from "../actions/shortcuts";
import { trackEvent } from "../../analytics"; import { trackEvent } from "../../src/analytics";
import { AnimationFrameHandler } from "../../animation-frame-handler"; import { AnimationFrameHandler } from "../../src/animation-frame-handler";
import { import {
getDefaultAppState, getDefaultAppState,
isEraserActive, isEraserActive,
isHandToolActive, isHandToolActive,
} from "../../appState"; } from "../../src/appState";
import { copyTextToSystemClipboard, parseClipboard } from "../clipboard"; import { copyTextToSystemClipboard, parseClipboard } from "../clipboard";
import { exportCanvas, loadFromBlob } from "../data"; import { exportCanvas, loadFromBlob } from "../data";
import Library, { distributeLibraryItemsOnSquareGrid } from "../data/library"; import Library, { distributeLibraryItemsOnSquareGrid } from "../data/library";
import { restore, restoreElements } from "../data/restore"; import { restore, restoreElements } from "../data/restore";
import { getCenter, getDistance } from "../gesture"; import { getCenter, getDistance } from "../gesture";
import { History } from "../../history"; import { History } from "../../src/history";
import { defaultLang, getLanguage, languages, setLanguage, t } from "../i18n"; import { defaultLang, getLanguage, languages, setLanguage, t } from "../i18n";
import { import {
@ -422,13 +422,8 @@ import {
} from "../data/blob"; } from "../data/blob";
import { fileOpen } from "../data/filesystem"; import { fileOpen } from "../data/filesystem";
import {
showHyperlinkTooltip,
hideHyperlinkToolip,
Hyperlink,
} from "./hyperlink/Hyperlink";
import { Fonts } from "../../fonts"; import { Fonts } from "../../src/fonts";
import { editorJotaiStore } from "../editor-jotai"; import { editorJotaiStore } from "../editor-jotai";
import { ImageSceneDataError } from "../errors"; import { ImageSceneDataError } from "../errors";
import { import {
@ -452,18 +447,25 @@ import {
setCursorForShape, setCursorForShape,
} from "../cursor"; } from "../cursor";
import { Emitter } from "../emitter"; import { Emitter } from "../emitter";
import { ElementCanvasButtons } from "./ElementCanvasButtons";
import { Store, CaptureUpdateAction } from "../store"; import { Store, CaptureUpdateAction } from "../store";
import { AnimatedTrail } from "../../animated-trail"; import { AnimatedTrail } from "../../src/animated-trail";
import { LaserTrails } from "../laser-trails"; import { LaserTrails } from "../laser-trails";
import { withBatchedUpdates, withBatchedUpdatesThrottled } from "../reactUtils"; import { withBatchedUpdates, withBatchedUpdatesThrottled } from "../reactUtils";
import { textWysiwyg } from "../../wysiwyg/textWysiwyg"; import { textWysiwyg } from "../../src/wysiwyg/textWysiwyg";
import { isOverScrollBars } from "../scene/scrollbars"; import { isOverScrollBars } from "../scene/scrollbars";
import { isMaybeMermaidDefinition } from "../mermaid"; import { isMaybeMermaidDefinition } from "../mermaid";
import { LassoTrail } from "../lasso"; import { LassoTrail } from "../lasso";
import { ElementCanvasButtons } from "./ElementCanvasButtons";
import {
showHyperlinkTooltip,
hideHyperlinkToolip,
Hyperlink,
} from "./hyperlink/Hyperlink";
import { activeConfirmDialogAtom } from "./ActiveConfirmDialog"; import { activeConfirmDialogAtom } from "./ActiveConfirmDialog";
import BraveMeasureTextError from "./BraveMeasureTextError"; import BraveMeasureTextError from "./BraveMeasureTextError";
import { ContextMenu, CONTEXT_MENU_SEPARATOR } from "./ContextMenu"; import { ContextMenu, CONTEXT_MENU_SEPARATOR } from "./ContextMenu";

View file

@ -23,7 +23,7 @@ import {
actionLinkToElement, actionLinkToElement,
} from "../../actions/actionElementLink"; } from "../../actions/actionElementLink";
import { getShortcutFromShortcutName } from "../../actions/shortcuts"; import { getShortcutFromShortcutName } from "../../actions/shortcuts";
import { trackEvent } from "../../../analytics"; import { trackEvent } from "../../../src/analytics";
import { useUIAppState } from "../../context/ui-appState"; import { useUIAppState } from "../../context/ui-appState";
import { deburr } from "../../deburr"; import { deburr } from "../../deburr";
import { atom, useAtom, editorJotaiStore } from "../../editor-jotai"; import { atom, useAtom, editorJotaiStore } from "../../editor-jotai";

View file

@ -7,7 +7,7 @@ import {
fireEvent, fireEvent,
waitFor, waitFor,
withExcalidrawDimensions, withExcalidrawDimensions,
} from "../tests/test-utils"; } from "@excalidraw/excalidraw/tests/test-utils";
import { import {
assertExcalidrawWithSidebar, assertExcalidrawWithSidebar,

View file

@ -18,7 +18,7 @@ import {
import type { ValueOf } from "@excalidraw/common/utility-types"; import type { ValueOf } from "@excalidraw/common/utility-types";
import { Fonts } from "../../../fonts"; import { Fonts } from "../../../src/fonts";
import { t } from "../../i18n"; import { t } from "../../i18n";
import { useApp, useAppProps, useExcalidrawContainer } from "../App"; import { useApp, useAppProps, useExcalidrawContainer } from "../App";
import { PropertiesPopover } from "../PropertiesPopover"; import { PropertiesPopover } from "../PropertiesPopover";

View file

@ -13,7 +13,7 @@ import { getShortcutKey } from "@excalidraw/common";
import { isNodeInFlowchart } from "@excalidraw/element/flowchart"; import { isNodeInFlowchart } from "@excalidraw/element/flowchart";
import { t } from "../i18n"; import { t } from "../i18n";
import { isEraserActive } from "../../appState"; import { isEraserActive } from "../../src/appState";
import { isGridModeEnabled } from "../snapping"; import { isGridModeEnabled } from "../snapping";
import "./HintViewer.scss"; import "./HintViewer.scss";

View file

@ -6,7 +6,7 @@ import type { NonDeletedExcalidrawElement } from "@excalidraw/element/types";
import { actionSaveFileToDisk } from "../actions/actionExport"; import { actionSaveFileToDisk } from "../actions/actionExport";
import { trackEvent } from "../../analytics"; import { trackEvent } from "../../src/analytics";
import { nativeFileSystemSupported } from "../data/filesystem"; import { nativeFileSystemSupported } from "../data/filesystem";
import { t } from "../i18n"; import { t } from "../i18n";

View file

@ -19,8 +19,8 @@ import type { NonDeletedExcalidrawElement } from "@excalidraw/element/types";
import Scene from "../scene/Scene"; import Scene from "../scene/Scene";
import { actionToggleStats } from "../actions"; import { actionToggleStats } from "../actions";
import { trackEvent } from "../../analytics"; import { trackEvent } from "../../src/analytics";
import { isHandToolActive } from "../../appState"; import { isHandToolActive } from "../../src/appState";
import { TunnelsContext, useInitializeTunnels } from "../context/tunnels"; import { TunnelsContext, useInitializeTunnels } from "../context/tunnels";
import { UIAppStateContext } from "../context/ui-appState"; import { UIAppStateContext } from "../context/ui-appState";
import { useAtom, useAtomValue } from "../editor-jotai"; import { useAtom, useAtomValue } from "../editor-jotai";

View file

@ -18,7 +18,7 @@ import type {
NonDeletedExcalidrawElement, NonDeletedExcalidrawElement,
} from "@excalidraw/element/types"; } from "@excalidraw/element/types";
import { trackEvent } from "../../analytics"; import { trackEvent } from "../../src/analytics";
import { useUIAppState } from "../context/ui-appState"; import { useUIAppState } from "../context/ui-appState";
import { import {
distributeLibraryItemsOnSquareGrid, distributeLibraryItemsOnSquareGrid,

View file

@ -4,7 +4,7 @@ import { showSelectedShapeActions } from "@excalidraw/element/showSelectedShapeA
import type { NonDeletedExcalidrawElement } from "@excalidraw/element/types"; import type { NonDeletedExcalidrawElement } from "@excalidraw/element/types";
import { isHandToolActive } from "../../appState"; import { isHandToolActive } from "../../src/appState";
import { useTunnels } from "../context/tunnels"; import { useTunnels } from "../context/tunnels";
import { t } from "../i18n"; import { t } from "../i18n";
import { calculateScrollCenter } from "../scene"; import { calculateScrollCenter } from "../scene";

View file

@ -3,7 +3,7 @@ import React, { useLayoutEffect, useRef, useState } from "react";
import type { ChartType } from "@excalidraw/element/types"; import type { ChartType } from "@excalidraw/element/types";
import { trackEvent } from "../../analytics"; import { trackEvent } from "../../src/analytics";
import { renderSpreadsheet } from "../charts"; import { renderSpreadsheet } from "../charts";
import { t } from "../i18n"; import { t } from "../i18n";
import { exportToSvg } from "../scene/export"; import { exportToSvg } from "../scene/export";

View file

@ -2,7 +2,7 @@ import { useEffect, useRef } from "react";
import "./SVGLayer.scss"; import "./SVGLayer.scss";
import type { Trail } from "../../animated-trail"; import type { Trail } from "../../src/animated-trail";
type SVGLayerProps = { type SVGLayerProps = {
trails: Trail[]; trails: Trail[];

View file

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

View file

@ -1,12 +1,13 @@
import React from "react"; import React from "react";
import { Excalidraw } from "../..";
import { import {
GlobalTestState, GlobalTestState,
queryByTestId, queryByTestId,
render, render,
withExcalidrawDimensions, withExcalidrawDimensions,
} from "../../tests/test-utils"; } from "@excalidraw/excalidraw/tests/test-utils";
import { Excalidraw } from "../..";
export const assertSidebarDockButton = async <T extends boolean>( export const assertSidebarDockButton = async <T extends boolean>(
hasDockButton: T, hasDockButton: T,

View file

@ -9,6 +9,22 @@ import { isInGroup } from "@excalidraw/element/groups";
import { isTextElement } from "@excalidraw/element/typeChecks"; import { isTextElement } from "@excalidraw/element/typeChecks";
import { API } from "@excalidraw/excalidraw/tests/helpers/api";
import { Keyboard, Pointer, UI } from "@excalidraw/excalidraw/tests/helpers/ui";
import {
getTextEditor,
updateTextEditor,
} from "@excalidraw/excalidraw/tests/queries/dom";
import {
GlobalTestState,
mockBoundingClientRect,
render,
restoreOriginalGetBoundingClientRect,
} from "@excalidraw/excalidraw/tests/test-utils";
import type { Degrees } from "@excalidraw/math"; import type { Degrees } from "@excalidraw/math";
import type { import type {
@ -21,15 +37,6 @@ import { Excalidraw, getCommonBounds, mutateElement } from "../..";
import { actionGroup } from "../../actions"; import { actionGroup } from "../../actions";
import { t } from "../../i18n"; import { t } from "../../i18n";
import * as StaticScene from "../../renderer/staticScene"; import * as StaticScene from "../../renderer/staticScene";
import { API } from "../../tests/helpers/api";
import { Keyboard, Pointer, UI } from "../../tests/helpers/ui";
import { getTextEditor, updateTextEditor } from "../../tests/queries/dom";
import {
GlobalTestState,
mockBoundingClientRect,
render,
restoreOriginalGetBoundingClientRect,
} from "../../tests/test-utils";
import { getStepSizedValue } from "./utils"; import { getStepSizedValue } from "./utils";

View file

@ -4,7 +4,7 @@ import { isFiniteNumber } from "@excalidraw/math";
import type { NonDeletedExcalidrawElement } from "@excalidraw/element/types"; import type { NonDeletedExcalidrawElement } from "@excalidraw/element/types";
import { trackEvent } from "../../../analytics"; import { trackEvent } from "../../../src/analytics";
import { useUIAppState } from "../../context/ui-appState"; import { useUIAppState } from "../../context/ui-appState";
import { atom, useAtom } from "../../editor-jotai"; import { atom, useAtom } from "../../editor-jotai";
import { t } from "../../i18n"; import { t } from "../../i18n";

View file

@ -1,4 +1,4 @@
import { trackEvent } from "../../../analytics"; import { trackEvent } from "../../../src/analytics";
import { useTunnels } from "../../context/tunnels"; import { useTunnels } from "../../context/tunnels";
import { t } from "../../i18n"; import { t } from "../../i18n";
import { useExcalidrawSetAppState } from "../App"; import { useExcalidrawSetAppState } from "../App";

View file

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

View file

@ -1,7 +1,9 @@
import React from "react"; import {
render,
queryAllByTestId,
} from "@excalidraw/excalidraw/tests/test-utils";
import { Excalidraw, MainMenu } from "../../index"; import { Excalidraw, MainMenu } from "../../index";
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

@ -39,7 +39,7 @@ import type {
NonDeletedExcalidrawElement, NonDeletedExcalidrawElement,
} from "@excalidraw/element/types"; } from "@excalidraw/element/types";
import { trackEvent } from "../../../analytics"; import { trackEvent } from "../../../src/analytics";
import { getTooltipDiv, updateTooltipPosition } from "../Tooltip"; import { getTooltipDiv, updateTooltipPosition } from "../Tooltip";
import { t } from "../../i18n"; import { t } from "../../i18n";

View file

@ -13,7 +13,7 @@ import {
actionToggleTheme, actionToggleTheme,
} from "../../actions"; } from "../../actions";
import { getShortcutFromShortcutName } from "../../actions/shortcuts"; import { getShortcutFromShortcutName } from "../../actions/shortcuts";
import { trackEvent } from "../../../analytics"; import { trackEvent } from "../../../src/analytics";
import { useUIAppState } from "../../context/ui-appState"; import { useUIAppState } from "../../context/ui-appState";
import { useSetAtom } from "../../editor-jotai"; import { useSetAtom } from "../../editor-jotai";
import { useI18n } from "../../i18n"; import { useI18n } from "../../i18n";

View file

@ -12,7 +12,7 @@ import { clearElementsForExport } from "@excalidraw/element";
import type { ValueOf } from "@excalidraw/common/utility-types"; import type { ValueOf } from "@excalidraw/common/utility-types";
import type { ExcalidrawElement, FileId } from "@excalidraw/element/types"; import type { ExcalidrawElement, FileId } from "@excalidraw/element/types";
import { cleanAppStateForExport } from "../../appState"; import { cleanAppStateForExport } from "../../src/appState";
import { CanvasError, ImageSceneDataError } from "../errors"; import { CanvasError, ImageSceneDataError } from "../errors";
import { calculateScrollCenter } from "../scene"; import { calculateScrollCenter } from "../scene";

View file

@ -16,7 +16,7 @@ import type { ExcalidrawElement } from "@excalidraw/element/types";
import { import {
cleanAppStateForExport, cleanAppStateForExport,
clearAppStateForDatabase, clearAppStateForDatabase,
} from "../../appState"; } from "../../src/appState";
import { isImageFileHandle, loadFromBlob, normalizeFile } from "./blob"; import { isImageFileHandle, loadFromBlob, normalizeFile } from "./blob";
import { fileOpen, fileSave } from "./filesystem"; import { fileOpen, fileSave } from "./filesystem";

View file

@ -28,7 +28,7 @@ import { atom, editorJotaiStore } from "../editor-jotai";
import { Emitter } from "../emitter"; import { Emitter } from "../emitter";
import { AbortError } from "../errors"; import { AbortError } from "../errors";
import { libraryItemSvgsCache } from "../../hooks/useLibraryItemSvg"; import { libraryItemSvgsCache } from "../../src/hooks/useLibraryItemSvg";
import { t } from "../i18n"; import { t } from "../i18n";
import { loadLibraryFromBlob } from "./blob"; import { loadLibraryFromBlob } from "./blob";

View file

@ -65,7 +65,7 @@ import type {
import type { MarkOptional, Mutable } from "@excalidraw/common/utility-types"; import type { MarkOptional, Mutable } from "@excalidraw/common/utility-types";
import { getDefaultAppState } from "../../appState"; import { getDefaultAppState } from "../../src/appState";
import { import {
getNormalizedGridSize, getNormalizedGridSize,

View file

@ -2,7 +2,7 @@ import type { VERSIONS } from "@excalidraw/common";
import type { ExcalidrawElement } from "@excalidraw/element/types"; import type { ExcalidrawElement } from "@excalidraw/element/types";
import type { cleanAppStateForExport } from "../../appState"; import type { cleanAppStateForExport } from "../../src/appState";
import type { import type {
AppState, AppState,
BinaryFiles, BinaryFiles,

View file

@ -40,7 +40,7 @@ import { NunitoFontFaces } from "./Nunito";
import { VirgilFontFaces } from "./Virgil"; import { VirgilFontFaces } from "./Virgil";
import { XiaolaiFontFaces } from "./Xiaolai"; import { XiaolaiFontFaces } from "./Xiaolai";
import type Scene from "../src/scene/Scene"; import type Scene from "../scene/Scene";
export class Fonts { export class Fonts {
// it's ok to track fonts across multiple instances only once, so let's use // it's ok to track fonts across multiple instances only once, so let's use

View file

@ -1,6 +1,6 @@
import type { SceneElementsMap } from "@excalidraw/element/types"; import type { SceneElementsMap } from "@excalidraw/element/types";
import { Emitter } from "./src/emitter"; import { Emitter } from "../src/emitter";
import type { AppStateChange, ElementsChange } from "./change"; import type { AppStateChange, ElementsChange } from "./change";
import type { Snapshot } from "./store"; import type { Snapshot } from "./store";

View file

@ -3,7 +3,7 @@ import { useState, useLayoutEffect } from "react";
import { THEME } from "@excalidraw/common"; import { THEME } from "@excalidraw/common";
import { useDevice, useExcalidrawContainer } from "../components/App"; import { useDevice, useExcalidrawContainer } from "../components/App";
import { useUIAppState } from "../src/context/ui-appState"; import { useUIAppState } from "../context/ui-appState";
export const useCreatePortalContainer = (opts?: { export const useCreatePortalContainer = (opts?: {
className?: string; className?: string;

View file

@ -1,7 +1,7 @@
import { THEME, THEME_FILTER } from "@excalidraw/common"; import { THEME, THEME_FILTER } from "@excalidraw/common";
import type { StaticCanvasRenderConfig } from "../src/scene/types";
import type { StaticCanvasAppState, AppState } from "../types"; import type { StaticCanvasAppState, AppState } from "../types";
import type { StaticCanvasRenderConfig } from "../scene/types";
export const fillCircle = ( export const fillCircle = (
context: CanvasRenderingContext2D, context: CanvasRenderingContext2D,

View file

@ -79,7 +79,7 @@ import {
getScrollBars, getScrollBars,
SCROLLBAR_COLOR, SCROLLBAR_COLOR,
SCROLLBAR_WIDTH, SCROLLBAR_WIDTH,
} from "../src/scene/scrollbars"; } from "../scene/scrollbars";
import { type InteractiveCanvasAppState } from "../types"; import { type InteractiveCanvasAppState } from "../types";
import { getClientColor, renderRemoteCursors } from "../clients"; import { getClientColor, renderRemoteCursors } from "../clients";
@ -94,7 +94,7 @@ import type {
InteractiveCanvasRenderConfig, InteractiveCanvasRenderConfig,
InteractiveSceneRenderConfig, InteractiveSceneRenderConfig,
RenderableElementsMap, RenderableElementsMap,
} from "../src/scene/types"; } from "../scene/types";
const renderElbowArrowMidPointHighlight = ( const renderElbowArrowMidPointHighlight = (
context: CanvasRenderingContext2D, context: CanvasRenderingContext2D,

View file

@ -4,7 +4,7 @@ import { renderElement } from "@excalidraw/element/renderElement";
import { bootstrapCanvas, getNormalizedCanvasDimensions } from "./helpers"; import { bootstrapCanvas, getNormalizedCanvasDimensions } from "./helpers";
import type { NewElementSceneRenderConfig } from "../src/scene/types"; import type { NewElementSceneRenderConfig } from "../scene/types";
const _renderNewElementScene = ({ const _renderNewElementScene = ({
canvas, canvas,

View file

@ -34,7 +34,7 @@ import { bootstrapCanvas, getNormalizedCanvasDimensions } from "./helpers";
import type { import type {
StaticCanvasRenderConfig, StaticCanvasRenderConfig,
StaticSceneRenderConfig, StaticSceneRenderConfig,
} from "../src/scene/types"; } from "../scene/types";
import type { StaticCanvasAppState, Zoom } from "../types"; import type { StaticCanvasAppState, Zoom } from "../types";
const GridLineColor = { const GridLineColor = {

View file

@ -47,10 +47,8 @@ import type {
NonDeletedExcalidrawElement, NonDeletedExcalidrawElement,
} from "@excalidraw/element/types"; } from "@excalidraw/element/types";
import type { import type { RenderableElementsMap, SVGRenderConfig } from "../scene/types";
RenderableElementsMap,
SVGRenderConfig,
} from "../src/scene/types";
import type { AppState, BinaryFiles } from "../types"; import type { AppState, BinaryFiles } from "../types";
import type { Drawable } from "roughjs/bin/core"; import type { Drawable } from "roughjs/bin/core";
import type { RoughSVG } from "roughjs/bin/svg"; import type { RoughSVG } from "roughjs/bin/svg";

View file

@ -9,8 +9,8 @@ import type {
NonDeletedExcalidrawElement, NonDeletedExcalidrawElement,
} from "@excalidraw/element/types"; } from "@excalidraw/element/types";
import { renderInteractiveSceneThrottled } from "../../renderer/interactiveScene"; import { renderInteractiveSceneThrottled } from "../../src/renderer/interactiveScene";
import { renderStaticSceneThrottled } from "../../renderer/staticScene"; import { renderStaticSceneThrottled } from "../../src/renderer/staticScene";
import type Scene from "./Scene"; import type Scene from "./Scene";
import type { RenderableElementsMap } from "./types"; import type { RenderableElementsMap } from "./types";

View file

@ -52,14 +52,14 @@ import type {
NonDeletedSceneElementsMap, NonDeletedSceneElementsMap,
} from "@excalidraw/element/types"; } from "@excalidraw/element/types";
import { getDefaultAppState } from "../../appState"; import { getDefaultAppState } from "../../src/appState";
import { base64ToString, decode, encode, stringToBase64 } from "../data/encode"; import { base64ToString, decode, encode, stringToBase64 } from "../data/encode";
import { serializeAsJSON } from "../data/json"; import { serializeAsJSON } from "../data/json";
import { Fonts } from "../../fonts"; import { Fonts } from "../../src/fonts";
import { renderStaticScene } from "../../renderer/staticScene"; import { renderStaticScene } from "../../src/renderer/staticScene";
import { renderSceneToSvg } from "../../renderer/staticSvgScene"; import { renderSceneToSvg } from "../../src/renderer/staticSvgScene";
import type { RenderableElementsMap } from "./types"; import type { RenderableElementsMap } from "./types";

View file

@ -11,26 +11,31 @@ import {
VERTICAL_ALIGN, VERTICAL_ALIGN,
} from "@excalidraw/common"; } from "@excalidraw/common";
import { Keyboard, Pointer, UI } from "@excalidraw/excalidraw/tests/helpers/ui";
import {
getTextEditor,
updateTextEditor,
} from "@excalidraw/excalidraw/tests/queries/dom";
import {
GlobalTestState,
render,
screen,
unmountComponent,
} from "@excalidraw/excalidraw/tests/test-utils";
import {
fireEvent,
mockBoundingClientRect,
restoreOriginalGetBoundingClientRect,
} from "@excalidraw/excalidraw/tests/test-utils";
import { API } from "@excalidraw/excalidraw/tests/helpers/api";
import type { import type {
ExcalidrawTextElement, ExcalidrawTextElement,
ExcalidrawTextElementWithContainer, ExcalidrawTextElementWithContainer,
} from "@excalidraw/element/types"; } from "@excalidraw/element/types";
import { Excalidraw } from "../index"; import { Excalidraw } from "../index";
import { API } from "../tests/helpers/api";
import { Keyboard, Pointer, UI } from "../tests/helpers/ui";
import { getTextEditor, updateTextEditor } from "../tests/queries/dom";
import {
GlobalTestState,
render,
screen,
unmountComponent,
} from "../tests/test-utils";
import {
fireEvent,
mockBoundingClientRect,
restoreOriginalGetBoundingClientRect,
} from "../tests/test-utils";
import { actionBindText } from "../actions"; import { actionBindText } from "../actions";
unmountComponent(); unmountComponent();

View file

@ -43,21 +43,21 @@ import type {
ExcalidrawTextElement, ExcalidrawTextElement,
} from "@excalidraw/element/types"; } from "@excalidraw/element/types";
import { actionSaveToActiveFile } from "../src/actions"; import { actionSaveToActiveFile } from "../actions";
import Scene from "../src/scene/Scene"; import Scene from "../scene/Scene";
import { parseClipboard } from "../clipboard"; import { parseClipboard } from "../clipboard";
import { import {
actionDecreaseFontSize, actionDecreaseFontSize,
actionIncreaseFontSize, actionIncreaseFontSize,
} from "../src/actions/actionProperties"; } from "../actions/actionProperties";
import { import {
actionResetZoom, actionResetZoom,
actionZoomIn, actionZoomIn,
actionZoomOut, actionZoomOut,
} from "../src/actions/actionCanvas"; } from "../actions/actionCanvas";
import type App from "../src/components/App"; import type App from "../components/App";
import type { AppState } from "../types"; import type { AppState } from "../types";
const getTransform = ( const getTransform = (

View file

@ -4,7 +4,7 @@ import { vi } from "vitest";
import { reseed } from "@excalidraw/common"; import { reseed } from "@excalidraw/common";
import { Excalidraw } from "../src/index"; import { Excalidraw } from "../src/index";
import * as StaticScene from "../renderer/staticScene"; import * as StaticScene from "../src/renderer/staticScene";
import { render, queryByTestId, unmountComponent } from "../tests/test-utils"; import { render, queryByTestId, unmountComponent } from "../tests/test-utils";
const renderStaticScene = vi.spyOn(StaticScene, "renderStaticScene"); const renderStaticScene = vi.spyOn(StaticScene, "renderStaticScene");

View file

@ -2,7 +2,7 @@ import React from "react";
import { CODES } from "@excalidraw/common"; import { CODES } from "@excalidraw/common";
import { copiedStyles } from "../actions/actionStyles"; import { copiedStyles } from "../src/actions/actionStyles";
import { Excalidraw } from "../src/index"; import { Excalidraw } from "../src/index";
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";

View file

@ -4,7 +4,7 @@ import { EXPORT_DATA_TYPES, MIME_TYPES } from "@excalidraw/common";
import type { ExcalidrawTextElement } from "@excalidraw/element/types"; import type { ExcalidrawTextElement } from "@excalidraw/element/types";
import { getDefaultAppState } from "../appState"; import { getDefaultAppState } from "../src/appState";
import { Excalidraw } from "../src/index"; import { Excalidraw } from "../src/index";
import { API } from "./helpers/api"; import { API } from "./helpers/api";

View file

@ -1,4 +1,4 @@
import { getNameInitial } from "../clients"; import { getNameInitial } from "../src/clients";
describe("getClientInitials", () => { describe("getClientInitials", () => {
it("returns substring if one name provided", () => { it("returns substring if one name provided", () => {

View file

@ -1,4 +1,3 @@
import React from "react";
import { vi } from "vitest"; import { vi } from "vitest";
import { getLineHeightInPx } from "@excalidraw/element/textMeasurements"; import { getLineHeightInPx } from "@excalidraw/element/textMeasurements";

View file

@ -5,9 +5,9 @@ import { KEYS, reseed } from "@excalidraw/common";
import { setDateTimeForTests } from "@excalidraw/common"; import { setDateTimeForTests } from "@excalidraw/common";
import { copiedStyles } from "../actions/actionStyles"; import { copiedStyles } from "../src/actions/actionStyles";
import { Excalidraw } from "../src/index"; import { Excalidraw } from "../src/index";
import * as StaticScene from "../renderer/staticScene"; import * as StaticScene from "../src/renderer/staticScene";
import { API } from "./helpers/api"; import { API } from "./helpers/api";
import { UI, Pointer, Keyboard } from "./helpers/ui"; import { UI, Pointer, Keyboard } from "./helpers/ui";
@ -25,8 +25,8 @@ import {
unmountComponent, unmountComponent,
} from "./test-utils"; } from "./test-utils";
import type { ShortcutName } from "../actions/shortcuts"; import type { ShortcutName } from "../src/actions/shortcuts";
import type { ActionName } from "../actions/types"; import type { ActionName } from "../src/actions/types";
const checkpoint = (name: string) => { const checkpoint = (name: string) => {
expect(renderStaticScene.mock.calls.length).toMatchSnapshot( expect(renderStaticScene.mock.calls.length).toMatchSnapshot(

View file

@ -11,7 +11,7 @@ import type {
} from "@excalidraw/element/types"; } from "@excalidraw/element/types";
import { Excalidraw, exportToCanvas, exportToSvg } from "../src"; import { Excalidraw, exportToCanvas, exportToSvg } from "../src";
import { actionFlipHorizontal, actionFlipVertical } from "../actions"; import { actionFlipHorizontal, actionFlipVertical } from "../src/actions";
import { API } from "./helpers/api"; import { API } from "./helpers/api";
import { Keyboard, Pointer, UI } from "./helpers/ui"; import { Keyboard, Pointer, UI } from "./helpers/ui";

View file

@ -7,9 +7,9 @@ import type {
OrderedExcalidrawElement, OrderedExcalidrawElement,
} from "@excalidraw/element/types"; } from "@excalidraw/element/types";
import { reconcileElements } from "../../data/reconcile"; import { reconcileElements } from "../../src/data/reconcile";
import type { RemoteExcalidrawElement } from "../../data/reconcile"; import type { RemoteExcalidrawElement } from "../../src/data/reconcile";
import type { AppState } from "../../src/types"; import type { AppState } from "../../src/types";

View file

@ -15,10 +15,10 @@ import type {
import type { NormalizedZoomValue } from "@excalidraw/excalidraw/src/types"; import type { NormalizedZoomValue } from "@excalidraw/excalidraw/src/types";
import { API } from "../helpers/api"; import { API } from "../helpers/api";
import * as restore from "../../data/restore"; import * as restore from "../../src/data/restore";
import { getDefaultAppState } from "../../appState"; import { getDefaultAppState } from "../../src/appState";
import type { ImportedDataState } from "../../data/types"; import type { ImportedDataState } from "../../src/data/types";
describe("restoreElements", () => { describe("restoreElements", () => {
const mockSizeHelper = vi.spyOn(sizeHelpers, "isInvisiblySmallElement"); const mockSizeHelper = vi.spyOn(sizeHelpers, "isInvisiblySmallElement");

View file

@ -6,8 +6,8 @@ import { KEYS, reseed } from "@excalidraw/common";
import type { ExcalidrawLinearElement } from "@excalidraw/element/types"; import type { ExcalidrawLinearElement } from "@excalidraw/element/types";
import { Excalidraw } from "../src/index"; import { Excalidraw } from "../src/index";
import * as InteractiveScene from "../renderer/interactiveScene"; import * as InteractiveScene from "../src/renderer/interactiveScene";
import * as StaticScene from "../renderer/staticScene"; import * as StaticScene from "../src/renderer/staticScene";
import { import {
render, render,

View file

@ -4,7 +4,7 @@ import { mutateElement } from "@excalidraw/element/mutateElement";
import { KEYS } from "@excalidraw/common"; import { KEYS } from "@excalidraw/common";
import { actionSelectAll } from "../actions"; import { actionSelectAll } from "../src/actions";
import { t } from "../src/i18n"; import { t } from "../src/i18n";
import { Excalidraw } from "../src/index"; import { Excalidraw } from "../src/index";

View file

@ -4,16 +4,16 @@ import { SVG_NS } from "@excalidraw/common";
import type { FileId } from "@excalidraw/element/types"; import type { FileId } from "@excalidraw/element/types";
import { getDefaultAppState } from "../appState"; import { getDefaultAppState } from "../src/appState";
import { getDataURL } from "../data/blob"; import { getDataURL } from "../src/data/blob";
import { encodePngMetadata } from "../data/image"; import { encodePngMetadata } from "../src/data/image";
import { serializeAsJSON } from "../data/json"; import { serializeAsJSON } from "../src/data/json";
import { Excalidraw } from "../src/index"; import { Excalidraw } from "../src/index";
import { import {
decodeSvgBase64Payload, decodeSvgBase64Payload,
encodeSvgBase64Payload, encodeSvgBase64Payload,
exportToSvg, exportToSvg,
} from "../scene/export"; } from "../src/scene/export";
import { API } from "./helpers/api"; import { API } from "./helpers/api";
import { render, waitFor } from "./test-utils"; import { render, waitFor } from "./test-utils";

View file

@ -19,12 +19,12 @@ import type {
FileId, FileId,
} from "@excalidraw/element/types"; } from "@excalidraw/element/types";
import { actionFlipHorizontal, actionFlipVertical } from "../actions"; import { actionFlipHorizontal, actionFlipVertical } from "../src/actions";
import { createPasteEvent } from "../src/clipboard"; import { createPasteEvent } from "../src/clipboard";
import { Excalidraw } from "../src/index"; import { Excalidraw } from "../src/index";
// Importing to spy on it and mock the implementation (mocking does not work with simple vi.mock for some reason) // Importing to spy on it and mock the implementation (mocking does not work with simple vi.mock for some reason)
import * as blobModule from "../data/blob"; import * as blobModule from "../src/data/blob";
import { API } from "./helpers/api"; import { API } from "./helpers/api";
import { UI, Pointer, Keyboard } from "./helpers/ui"; import { UI, Pointer, Keyboard } from "./helpers/ui";

View file

@ -42,13 +42,13 @@ import type {
import type { Mutable } from "@excalidraw/common/utility-types"; import type { Mutable } from "@excalidraw/common/utility-types";
import { getMimeType } from "../../data/blob"; import { getMimeType } from "../../src/data/blob";
import { createTestHook } from "../../components/App"; import { createTestHook } from "../../src/components/App";
import { getDefaultAppState } from "../../appState"; import { getDefaultAppState } from "../../src/appState";
import { GlobalTestState, createEvent, fireEvent, act } from "../test-utils"; import { GlobalTestState, createEvent, fireEvent, act } from "../test-utils";
import type { Action } from "../../actions/types"; import type { Action } from "../../src/actions/types";
import type App from "../../components/App"; import type App from "../../src/components/App";
import type { AppState } from "../../src/types"; import type { AppState } from "../../src/types";

View file

@ -38,7 +38,7 @@ import type {
ExcalidrawImageElement, ExcalidrawImageElement,
} from "@excalidraw/element/types"; } from "@excalidraw/element/types";
import { createTestHook } from "../../components/App"; import { createTestHook } from "../../src/components/App";
import { getTextEditor } from "../queries/dom"; import { getTextEditor } from "../queries/dom";
import { act, fireEvent, GlobalTestState, screen } from "../test-utils"; import { act, fireEvent, GlobalTestState, screen } from "../test-utils";

View file

@ -42,15 +42,18 @@ import {
actionSendBackward, actionSendBackward,
actionBringForward, actionBringForward,
actionSendToBack, actionSendToBack,
} from "../actions"; } from "../src/actions";
import { createUndoAction, createRedoAction } from "../actions/actionHistory"; import {
import { actionToggleViewMode } from "../actions/actionToggleViewMode"; createUndoAction,
import { getDefaultAppState } from "../appState"; createRedoAction,
import { HistoryEntry } from "../history"; } from "../src/actions/actionHistory";
import { actionToggleViewMode } from "../src/actions/actionToggleViewMode";
import { getDefaultAppState } from "../src/appState";
import { HistoryEntry } from "../src/history";
import { Excalidraw } from "../src/index"; import { Excalidraw } from "../src/index";
import * as StaticScene from "../renderer/staticScene"; import * as StaticScene from "../src/renderer/staticScene";
import { Snapshot, CaptureUpdateAction } from "../src/store.js"; import { Snapshot, CaptureUpdateAction } from "../src/store.js";
import { AppStateChange, ElementsChange } from "../change"; import { AppStateChange, ElementsChange } from "../src/change";
import { API } from "./helpers/api"; import { API } from "./helpers/api";
import { Keyboard, Pointer, UI } from "./helpers/ui"; import { Keyboard, Pointer, UI } from "./helpers/ui";

View file

@ -27,13 +27,13 @@ import type { ExcalidrawElement } from "@excalidraw/element/types";
import { Excalidraw } from "../src/index"; import { Excalidraw } from "../src/index";
import { getSelectedElements } from "../scene"; import { getSelectedElements } from "../src/scene";
import { getLassoSelectedElementIds } from "../lasso/utils"; import { getLassoSelectedElementIds } from "../src/lasso/utils";
import { act, render } from "./test-utils"; import { act, render } from "./test-utils";
import type { ElementsSegmentsMap } from "../lasso/utils"; import type { ElementsSegmentsMap } from "../src/lasso/utils";
const { h } = window; const { h } = window;

View file

@ -8,9 +8,9 @@ import { getCommonBoundingBox } from "@excalidraw/element/bounds";
import type { ExcalidrawGenericElement } from "@excalidraw/element/types"; import type { ExcalidrawGenericElement } from "@excalidraw/element/types";
import { parseLibraryJSON } from "../data/blob"; import { parseLibraryJSON } from "../src/data/blob";
import { serializeLibraryAsJSON } from "../data/json"; import { serializeLibraryAsJSON } from "../src/data/json";
import { distributeLibraryItemsOnSquareGrid } from "../data/library"; import { distributeLibraryItemsOnSquareGrid } from "../src/data/library";
import { Excalidraw } from "../src/index"; import { Excalidraw } from "../src/index";
import { API } from "./helpers/api"; import { API } from "./helpers/api";

View file

@ -31,8 +31,8 @@ import type {
} from "@excalidraw/element/types"; } from "@excalidraw/element/types";
import { Excalidraw, mutateElement } from "../src/index"; import { Excalidraw, mutateElement } from "../src/index";
import * as InteractiveCanvas from "../renderer/interactiveScene"; import * as InteractiveCanvas from "../src/renderer/interactiveScene";
import * as StaticScene from "../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 "./helpers/ui"; import { Keyboard, Pointer, UI } from "./helpers/ui";

View file

@ -13,11 +13,11 @@ import type {
ExcalidrawRectangleElement, ExcalidrawRectangleElement,
} from "@excalidraw/element/types"; } from "@excalidraw/element/types";
import type Scene from "@excalidraw/excalidraw/scene/Scene"; import type Scene from "@excalidraw/excalidraw/src/scene/Scene";
import { Excalidraw } from "../src/index"; import { Excalidraw } from "../src/index";
import * as InteractiveCanvas from "../renderer/interactiveScene"; import * as InteractiveCanvas from "../src/renderer/interactiveScene";
import * as StaticScene from "../renderer/staticScene"; import * as StaticScene from "../src/renderer/staticScene";
import { UI, Pointer, Keyboard } from "./helpers/ui"; import { UI, Pointer, Keyboard } from "./helpers/ui";
import { render, fireEvent, act, unmountComponent } from "./test-utils"; import { render, fireEvent, act, unmountComponent } from "./test-utils";

View file

@ -1,4 +1,3 @@
import React from "react";
import { vi } from "vitest"; import { vi } from "vitest";
import { KEYS, reseed } from "@excalidraw/common"; import { KEYS, reseed } from "@excalidraw/common";
@ -7,8 +6,8 @@ import type { ExcalidrawLinearElement } from "@excalidraw/element/types";
import { Excalidraw } from "../src/index"; import { Excalidraw } from "../src/index";
import * as InteractiveCanvas from "../renderer/interactiveScene"; import * as InteractiveCanvas from "../src/renderer/interactiveScene";
import * as StaticScene from "../renderer/staticScene"; import * as StaticScene from "../src/renderer/staticScene";
import { import {
render, render,

View file

@ -1,4 +1,3 @@
import React from "react";
import { vi } from "vitest"; import { vi } from "vitest";
import { FONT_FAMILY, CODES, KEYS, reseed } from "@excalidraw/common"; import { FONT_FAMILY, CODES, KEYS, reseed } from "@excalidraw/common";
@ -8,7 +7,7 @@ import { setDateTimeForTests } from "@excalidraw/common";
import type { ExcalidrawElement } from "@excalidraw/element/types"; import type { ExcalidrawElement } from "@excalidraw/element/types";
import { Excalidraw } from "../src/index"; import { Excalidraw } from "../src/index";
import * as StaticScene from "../renderer/staticScene"; import * as StaticScene from "../src/renderer/staticScene";
import { API } from "./helpers/api"; import { API } from "./helpers/api";
import { Keyboard, Pointer, UI } from "./helpers/ui"; import { Keyboard, Pointer, UI } from "./helpers/ui";

View file

@ -1,4 +1,3 @@
import React from "react";
import { expect } from "vitest"; import { expect } from "vitest";
import { reseed } from "@excalidraw/common"; import { reseed } from "@excalidraw/common";

View file

@ -8,8 +8,8 @@ import type {
NonDeletedExcalidrawElement, NonDeletedExcalidrawElement,
} from "@excalidraw/element/types"; } from "@excalidraw/element/types";
import { prepareElementsForExport } from "../../data"; import { prepareElementsForExport } from "../../src/data";
import * as exportUtils from "../../scene/export"; import * as exportUtils from "../../src/scene/export";
import { import {
diamondFixture, diamondFixture,
ellipseFixture, ellipseFixture,

View file

@ -1,5 +1,3 @@
import React from "react";
import { KEYS } from "@excalidraw/common"; import { KEYS } from "@excalidraw/common";
import { Excalidraw } from "../src/index"; import { Excalidraw } from "../src/index";

Some files were not shown because too many files have changed in this diff Show more