diff --git a/excalidraw-app/App.tsx b/excalidraw-app/App.tsx index bb62a0e96..9d2d3fb9d 100644 --- a/excalidraw-app/App.tsx +++ b/excalidraw-app/App.tsx @@ -4,7 +4,7 @@ import { TTDDialogTrigger, CaptureUpdateAction, reconcileElements, -} from "@excalidraw/excalidraw"; +} from "@excalidraw/excalidraw/src"; import { trackEvent } from "@excalidraw/excalidraw/analytics"; import { getDefaultAppState } from "@excalidraw/excalidraw/appState"; import { @@ -31,11 +31,11 @@ import { isRunningInIframe, isDevEnv, } from "@excalidraw/common"; -import polyfill from "@excalidraw/excalidraw/polyfill"; +import polyfill from "@excalidraw/excalidraw/src/polyfill"; import { useCallback, useEffect, useRef, useState } from "react"; import { loadFromBlob } from "@excalidraw/excalidraw/data/blob"; import { useCallbackRefState } from "@excalidraw/excalidraw/hooks/useCallbackRefState"; -import { t } from "@excalidraw/excalidraw/i18n"; +import { t } from "@excalidraw/excalidraw/src/i18n"; import { GithubIcon, @@ -70,7 +70,7 @@ import type { BinaryFiles, ExcalidrawInitialDataState, UIAppState, -} from "@excalidraw/excalidraw/types"; +} from "@excalidraw/excalidraw/src/types"; import type { ResolutionType } from "@excalidraw/common/utility-types"; import type { ResolvablePromise } from "@excalidraw/common/utils"; diff --git a/excalidraw-app/CustomStats.tsx b/excalidraw-app/CustomStats.tsx index 543af5cfd..57b9d625f 100644 --- a/excalidraw-app/CustomStats.tsx +++ b/excalidraw-app/CustomStats.tsx @@ -1,16 +1,16 @@ -import { Stats } from "@excalidraw/excalidraw"; -import { copyTextToSystemClipboard } from "@excalidraw/excalidraw/clipboard"; +import { Stats } from "@excalidraw/excalidraw/src"; +import { copyTextToSystemClipboard } from "@excalidraw/excalidraw/src/clipboard"; import { DEFAULT_VERSION, debounce, getVersion, nFormatter, } from "@excalidraw/common"; -import { t } from "@excalidraw/excalidraw/i18n"; +import { t } from "@excalidraw/excalidraw/src/i18n"; import { useEffect, useState } from "react"; import type { NonDeletedExcalidrawElement } from "@excalidraw/element/types"; -import type { UIAppState } from "@excalidraw/excalidraw/types"; +import type { UIAppState } from "@excalidraw/excalidraw/src/types"; import { getElementsStorageSize, diff --git a/excalidraw-app/ExcalidrawPlusIframeExport.tsx b/excalidraw-app/ExcalidrawPlusIframeExport.tsx index 0ad27cafb..898d67dde 100644 --- a/excalidraw-app/ExcalidrawPlusIframeExport.tsx +++ b/excalidraw-app/ExcalidrawPlusIframeExport.tsx @@ -1,12 +1,15 @@ import { base64urlToString } from "@excalidraw/excalidraw/data/encode"; -import { ExcalidrawError } from "@excalidraw/excalidraw/errors"; +import { ExcalidrawError } from "@excalidraw/excalidraw/src/errors"; import { useLayoutEffect, useRef } from "react"; import type { FileId, OrderedExcalidrawElement, } from "@excalidraw/element/types"; -import type { AppState, BinaryFileData } from "@excalidraw/excalidraw/types"; +import type { + AppState, + BinaryFileData, +} from "@excalidraw/excalidraw/src/types"; import { STORAGE_KEYS } from "./app_constants"; import { LocalData } from "./data/LocalData"; diff --git a/excalidraw-app/app-language/LanguageList.tsx b/excalidraw-app/app-language/LanguageList.tsx index b4682f353..4699add83 100644 --- a/excalidraw-app/app-language/LanguageList.tsx +++ b/excalidraw-app/app-language/LanguageList.tsx @@ -1,4 +1,4 @@ -import { useI18n, languages } from "@excalidraw/excalidraw/i18n"; +import { useI18n, languages } from "@excalidraw/excalidraw/src/i18n"; import React from "react"; import { useSetAtom } from "../app-jotai"; diff --git a/excalidraw-app/app-language/language-detector.ts b/excalidraw-app/app-language/language-detector.ts index 535189d0a..1ae2c86c8 100644 --- a/excalidraw-app/app-language/language-detector.ts +++ b/excalidraw-app/app-language/language-detector.ts @@ -1,4 +1,4 @@ -import { defaultLang, languages } from "@excalidraw/excalidraw"; +import { defaultLang, languages } from "@excalidraw/excalidraw/src"; import LanguageDetector from "i18next-browser-languagedetector"; export const languageDetector = new LanguageDetector(); diff --git a/excalidraw-app/collab/Collab.tsx b/excalidraw-app/collab/Collab.tsx index 98c66e425..76f56464f 100644 --- a/excalidraw-app/collab/Collab.tsx +++ b/excalidraw-app/collab/Collab.tsx @@ -4,7 +4,7 @@ import { restoreElements, zoomToFitBounds, reconcileElements, -} from "@excalidraw/excalidraw"; +} from "@excalidraw/excalidraw/src"; import { ErrorDialog } from "@excalidraw/excalidraw/components/ErrorDialog"; import { APP_NAME, EVENT } from "@excalidraw/common"; import { @@ -25,9 +25,9 @@ import { isImageElement, isInitializedImageElement, } from "@excalidraw/element/typeChecks"; -import { AbortError } from "@excalidraw/excalidraw/errors"; -import { t } from "@excalidraw/excalidraw/i18n"; -import { withBatchedUpdates } from "@excalidraw/excalidraw/reactUtils"; +import { AbortError } from "@excalidraw/excalidraw/src/errors"; +import { t } from "@excalidraw/excalidraw/src/i18n"; +import { withBatchedUpdates } from "@excalidraw/excalidraw/src/reactUtils"; import throttle from "lodash.throttle"; import { PureComponent } from "react"; @@ -49,7 +49,7 @@ import type { SocketId, Collaborator, Gesture, -} from "@excalidraw/excalidraw/types"; +} from "@excalidraw/excalidraw/src/types"; import type { Mutable, ValueOf } from "@excalidraw/common/utility-types"; import { appJotaiStore, atom } from "../app-jotai"; diff --git a/excalidraw-app/collab/Portal.tsx b/excalidraw-app/collab/Portal.tsx index 26a7d0d9e..af8a10123 100644 --- a/excalidraw-app/collab/Portal.tsx +++ b/excalidraw-app/collab/Portal.tsx @@ -1,4 +1,4 @@ -import { CaptureUpdateAction } from "@excalidraw/excalidraw"; +import { CaptureUpdateAction } from "@excalidraw/excalidraw/src"; import { trackEvent } from "@excalidraw/excalidraw/analytics"; import { encryptData } from "@excalidraw/excalidraw/data/encryption"; import { newElementWith } from "@excalidraw/element/mutateElement"; @@ -9,7 +9,7 @@ import type { OrderedExcalidrawElement } from "@excalidraw/element/types"; import type { OnUserFollowedPayload, SocketId, -} from "@excalidraw/excalidraw/types"; +} from "@excalidraw/excalidraw/src/types"; import { WS_EVENTS, FILE_UPLOAD_TIMEOUT, WS_SUBTYPES } from "../app_constants"; import { isSyncableElement } from "../data"; diff --git a/excalidraw-app/components/AI.tsx b/excalidraw-app/components/AI.tsx index 4469d74f6..fe370051a 100644 --- a/excalidraw-app/components/AI.tsx +++ b/excalidraw-app/components/AI.tsx @@ -4,11 +4,11 @@ import { getTextFromElements, MIME_TYPES, TTDDialog, -} from "@excalidraw/excalidraw"; +} from "@excalidraw/excalidraw/src"; import { getDataURL } from "@excalidraw/excalidraw/data/blob"; import { safelyParseJSON } from "@excalidraw/common"; -import type { ExcalidrawImperativeAPI } from "@excalidraw/excalidraw/types"; +import type { ExcalidrawImperativeAPI } from "@excalidraw/excalidraw/src/types"; export const AIComponents = ({ excalidrawAPI, diff --git a/excalidraw-app/components/AppFooter.tsx b/excalidraw-app/components/AppFooter.tsx index 7d42d46bf..532ec8b19 100644 --- a/excalidraw-app/components/AppFooter.tsx +++ b/excalidraw-app/components/AppFooter.tsx @@ -1,4 +1,4 @@ -import { Footer } from "@excalidraw/excalidraw/index"; +import { Footer } from "@excalidraw/excalidraw/src/index"; import React from "react"; import { isExcalidrawPlusSignedUser } from "../app_constants"; diff --git a/excalidraw-app/components/AppMainMenu.tsx b/excalidraw-app/components/AppMainMenu.tsx index cd0aca268..92c415452 100644 --- a/excalidraw-app/components/AppMainMenu.tsx +++ b/excalidraw-app/components/AppMainMenu.tsx @@ -3,7 +3,7 @@ import { ExcalLogo, eyeIcon, } from "@excalidraw/excalidraw/components/icons"; -import { MainMenu } from "@excalidraw/excalidraw/index"; +import { MainMenu } from "@excalidraw/excalidraw/src/index"; import React from "react"; import { isDevEnv } from "@excalidraw/common"; diff --git a/excalidraw-app/components/AppWelcomeScreen.tsx b/excalidraw-app/components/AppWelcomeScreen.tsx index 5bb5073e9..88eb0118f 100644 --- a/excalidraw-app/components/AppWelcomeScreen.tsx +++ b/excalidraw-app/components/AppWelcomeScreen.tsx @@ -1,7 +1,7 @@ import { loginIcon } from "@excalidraw/excalidraw/components/icons"; import { POINTER_EVENTS } from "@excalidraw/common"; -import { useI18n } from "@excalidraw/excalidraw/i18n"; -import { WelcomeScreen } from "@excalidraw/excalidraw/index"; +import { useI18n } from "@excalidraw/excalidraw/src/i18n"; +import { WelcomeScreen } from "@excalidraw/excalidraw/src/index"; import React from "react"; import { isExcalidrawPlusSignedUser } from "../app_constants"; diff --git a/excalidraw-app/components/DebugCanvas.tsx b/excalidraw-app/components/DebugCanvas.tsx index e83a62647..8f7251310 100644 --- a/excalidraw-app/components/DebugCanvas.tsx +++ b/excalidraw-app/components/DebugCanvas.tsx @@ -7,7 +7,7 @@ import { bootstrapCanvas, getNormalizedCanvasDimensions, } from "@excalidraw/excalidraw/renderer/helpers"; -import { type AppState } from "@excalidraw/excalidraw/types"; +import { type AppState } from "@excalidraw/excalidraw/src/types"; import { throttleRAF } from "@excalidraw/common"; import { useCallback, useImperativeHandle, useRef } from "react"; @@ -18,7 +18,7 @@ import { } from "@excalidraw/math"; 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"; diff --git a/excalidraw-app/components/EncryptedIcon.tsx b/excalidraw-app/components/EncryptedIcon.tsx index 552e7ca82..ada9af4d2 100644 --- a/excalidraw-app/components/EncryptedIcon.tsx +++ b/excalidraw-app/components/EncryptedIcon.tsx @@ -1,6 +1,6 @@ import { Tooltip } from "@excalidraw/excalidraw/components/Tooltip"; import { shield } from "@excalidraw/excalidraw/components/icons"; -import { useI18n } from "@excalidraw/excalidraw/i18n"; +import { useI18n } from "@excalidraw/excalidraw/src/i18n"; export const EncryptedIcon = () => { const { t } = useI18n(); diff --git a/excalidraw-app/components/ExportToExcalidrawPlus.tsx b/excalidraw-app/components/ExportToExcalidrawPlus.tsx index 60f1608b2..d11dfcd60 100644 --- a/excalidraw-app/components/ExportToExcalidrawPlus.tsx +++ b/excalidraw-app/components/ExportToExcalidrawPlus.tsx @@ -13,7 +13,7 @@ import { } from "@excalidraw/excalidraw/data/encryption"; import { serializeAsJSON } from "@excalidraw/excalidraw/data/json"; import { isInitializedImageElement } from "@excalidraw/element/typeChecks"; -import { useI18n } from "@excalidraw/excalidraw/i18n"; +import { useI18n } from "@excalidraw/excalidraw/src/i18n"; import type { FileId, @@ -23,7 +23,7 @@ import type { AppState, BinaryFileData, BinaryFiles, -} from "@excalidraw/excalidraw/types"; +} from "@excalidraw/excalidraw/src/types"; import { FILE_UPLOAD_MAX_BYTES } from "../app_constants"; import { encodeFilesForUpload } from "../data/FileManager"; diff --git a/excalidraw-app/components/TopErrorBoundary.tsx b/excalidraw-app/components/TopErrorBoundary.tsx index 77d9e5f4f..81fd15f98 100644 --- a/excalidraw-app/components/TopErrorBoundary.tsx +++ b/excalidraw-app/components/TopErrorBoundary.tsx @@ -1,5 +1,5 @@ import Trans from "@excalidraw/excalidraw/components/Trans"; -import { t } from "@excalidraw/excalidraw/i18n"; +import { t } from "@excalidraw/excalidraw/src/i18n"; import * as Sentry from "@sentry/browser"; import React from "react"; diff --git a/excalidraw-app/data/FileManager.ts b/excalidraw-app/data/FileManager.ts index 5d134144f..a00154d13 100644 --- a/excalidraw-app/data/FileManager.ts +++ b/excalidraw-app/data/FileManager.ts @@ -1,8 +1,8 @@ -import { CaptureUpdateAction } from "@excalidraw/excalidraw"; +import { CaptureUpdateAction } from "@excalidraw/excalidraw/src"; import { compressData } from "@excalidraw/excalidraw/data/encode"; import { newElementWith } from "@excalidraw/element/mutateElement"; import { isInitializedImageElement } from "@excalidraw/element/typeChecks"; -import { t } from "@excalidraw/excalidraw/i18n"; +import { t } from "@excalidraw/excalidraw/src/i18n"; import type { ExcalidrawElement, @@ -15,7 +15,7 @@ import type { BinaryFileMetadata, ExcalidrawImperativeAPI, BinaryFiles, -} from "@excalidraw/excalidraw/types"; +} from "@excalidraw/excalidraw/src/types"; type FileVersion = Required["version"]; diff --git a/excalidraw-app/data/LocalData.ts b/excalidraw-app/data/LocalData.ts index 9ad6dc925..685d0b13c 100644 --- a/excalidraw-app/data/LocalData.ts +++ b/excalidraw-app/data/LocalData.ts @@ -34,7 +34,7 @@ import type { AppState, BinaryFileData, BinaryFiles, -} from "@excalidraw/excalidraw/types"; +} from "@excalidraw/excalidraw/src/types"; import type { MaybePromise } from "@excalidraw/common/utility-types"; import { SAVE_TO_LOCAL_STORAGE_TIMEOUT, STORAGE_KEYS } from "../app_constants"; diff --git a/excalidraw-app/data/firebase.ts b/excalidraw-app/data/firebase.ts index 568054f7e..7ef6e96fe 100644 --- a/excalidraw-app/data/firebase.ts +++ b/excalidraw-app/data/firebase.ts @@ -1,4 +1,4 @@ -import { reconcileElements } from "@excalidraw/excalidraw"; +import { reconcileElements } from "@excalidraw/excalidraw/src"; import { MIME_TYPES } from "@excalidraw/common"; import { decompressData } from "@excalidraw/excalidraw/data/encode"; import { @@ -28,7 +28,7 @@ import type { BinaryFileData, BinaryFileMetadata, DataURL, -} from "@excalidraw/excalidraw/types"; +} from "@excalidraw/excalidraw/src/types"; import { FILE_CACHE_MAX_AGE_SEC } from "../app_constants"; diff --git a/excalidraw-app/data/index.ts b/excalidraw-app/data/index.ts index 7bb0f9d8d..7d5a22762 100644 --- a/excalidraw-app/data/index.ts +++ b/excalidraw-app/data/index.ts @@ -11,7 +11,7 @@ import { serializeAsJSON } from "@excalidraw/excalidraw/data/json"; import { restore } from "@excalidraw/excalidraw/data/restore"; import { isInvisiblySmallElement } from "@excalidraw/element/sizeHelpers"; import { isInitializedImageElement } from "@excalidraw/element/typeChecks"; -import { t } from "@excalidraw/excalidraw/i18n"; +import { t } from "@excalidraw/excalidraw/src/i18n"; import { bytesToHexString } from "@excalidraw/common"; import type { UserIdleState } from "@excalidraw/common"; @@ -27,7 +27,7 @@ import type { BinaryFileData, BinaryFiles, SocketId, -} from "@excalidraw/excalidraw/types"; +} from "@excalidraw/excalidraw/src/types"; import type { MakeBrand } from "@excalidraw/common/utility-types"; import { diff --git a/excalidraw-app/data/localStorage.ts b/excalidraw-app/data/localStorage.ts index bc0df4a67..2bdfc272c 100644 --- a/excalidraw-app/data/localStorage.ts +++ b/excalidraw-app/data/localStorage.ts @@ -5,7 +5,7 @@ import { import { clearElementsForLocalStorage } from "@excalidraw/element"; import type { ExcalidrawElement } from "@excalidraw/element/types"; -import type { AppState } from "@excalidraw/excalidraw/types"; +import type { AppState } from "@excalidraw/excalidraw/src/types"; import { STORAGE_KEYS } from "../app_constants"; diff --git a/excalidraw-app/share/ShareDialog.tsx b/excalidraw-app/share/ShareDialog.tsx index 884d64680..c3137c666 100644 --- a/excalidraw-app/share/ShareDialog.tsx +++ b/excalidraw-app/share/ShareDialog.tsx @@ -1,5 +1,5 @@ import { trackEvent } from "@excalidraw/excalidraw/analytics"; -import { copyTextToSystemClipboard } from "@excalidraw/excalidraw/clipboard"; +import { copyTextToSystemClipboard } from "@excalidraw/excalidraw/src/clipboard"; import { Dialog } from "@excalidraw/excalidraw/components/Dialog"; import { FilledButton } from "@excalidraw/excalidraw/components/FilledButton"; import { TextField } from "@excalidraw/excalidraw/components/TextField"; @@ -14,7 +14,7 @@ import { } from "@excalidraw/excalidraw/components/icons"; import { useUIAppState } from "@excalidraw/excalidraw/context/ui-appState"; import { useCopyStatus } from "@excalidraw/excalidraw/hooks/useCopiedIndicator"; -import { useI18n } from "@excalidraw/excalidraw/i18n"; +import { useI18n } from "@excalidraw/excalidraw/src/i18n"; import { KEYS, getFrame } from "@excalidraw/common"; import { useEffect, useRef, useState } from "react"; diff --git a/excalidraw-app/tests/LanguageList.test.tsx b/excalidraw-app/tests/LanguageList.test.tsx index a0cfe0722..fe56a2304 100644 --- a/excalidraw-app/tests/LanguageList.test.tsx +++ b/excalidraw-app/tests/LanguageList.test.tsx @@ -1,4 +1,4 @@ -import { defaultLang } from "@excalidraw/excalidraw/i18n"; +import { defaultLang } from "@excalidraw/excalidraw/src/i18n"; import { UI } from "@excalidraw/excalidraw/tests/helpers/ui"; import { screen, diff --git a/excalidraw-app/tests/collab.test.tsx b/excalidraw-app/tests/collab.test.tsx index 3572303f4..4f1d2ad8b 100644 --- a/excalidraw-app/tests/collab.test.tsx +++ b/excalidraw-app/tests/collab.test.tsx @@ -1,4 +1,7 @@ -import { CaptureUpdateAction, newElementWith } from "@excalidraw/excalidraw"; +import { + CaptureUpdateAction, + newElementWith, +} from "@excalidraw/excalidraw/src"; import { createRedoAction, createUndoAction, diff --git a/excalidraw-app/useHandleAppTheme.ts b/excalidraw-app/useHandleAppTheme.ts index 94f5a3e58..a800f9f29 100644 --- a/excalidraw-app/useHandleAppTheme.ts +++ b/excalidraw-app/useHandleAppTheme.ts @@ -1,4 +1,4 @@ -import { THEME } from "@excalidraw/excalidraw"; +import { THEME } from "@excalidraw/excalidraw/src"; import { EVENT, CODES, KEYS } from "@excalidraw/common"; import { useEffect, useLayoutEffect, useState } from "react"; diff --git a/packages/common/src/constants.ts b/packages/common/src/constants.ts index 7eb36d5d9..d79cbc954 100644 --- a/packages/common/src/constants.ts +++ b/packages/common/src/constants.ts @@ -2,7 +2,7 @@ import type { ExcalidrawElement, FontFamilyValues, } from "@excalidraw/element/types"; -import type { AppProps, AppState } from "@excalidraw/excalidraw/types"; +import type { AppProps, AppState } from "@excalidraw/excalidraw/src/types"; import { COLOR_PALETTE } from "./colors"; diff --git a/packages/common/src/points.ts b/packages/common/src/points.ts index e8f988203..0779d02fe 100644 --- a/packages/common/src/points.ts +++ b/packages/common/src/points.ts @@ -4,7 +4,7 @@ import { type LocalPoint, } from "@excalidraw/math"; -import type { NullableGridSize } from "@excalidraw/excalidraw/types"; +import type { NullableGridSize } from "@excalidraw/excalidraw/src/types"; export const getSizeFromPoints = ( points: readonly (GlobalPoint | LocalPoint)[], diff --git a/packages/common/src/utils.ts b/packages/common/src/utils.ts index b6e9fdd78..3d3170132 100644 --- a/packages/common/src/utils.ts +++ b/packages/common/src/utils.ts @@ -13,7 +13,7 @@ import type { ToolType, UnsubscribeCallback, Zoom, -} from "@excalidraw/excalidraw/types"; +} from "@excalidraw/excalidraw/src/types"; import { COLOR_PALETTE } from "./colors"; import { diff --git a/packages/element/src/Shape.ts b/packages/element/src/Shape.ts index b0d4b716d..f924bede4 100644 --- a/packages/element/src/Shape.ts +++ b/packages/element/src/Shape.ts @@ -5,7 +5,7 @@ import { ROUGHNESS, isTransparent, assertNever } from "@excalidraw/common"; import type { Mutable } from "@excalidraw/common/utility-types"; -import type { EmbedsValidationStatus } from "@excalidraw/excalidraw/types"; +import type { EmbedsValidationStatus } from "@excalidraw/excalidraw/src/types"; import type { ElementShapes } from "@excalidraw/excalidraw/src/scene/types"; import { diff --git a/packages/element/src/ShapeCache.ts b/packages/element/src/ShapeCache.ts index e60255299..e1c98f504 100644 --- a/packages/element/src/ShapeCache.ts +++ b/packages/element/src/ShapeCache.ts @@ -5,7 +5,7 @@ import { COLOR_PALETTE } from "@excalidraw/common"; import type { AppState, EmbedsValidationStatus, -} from "@excalidraw/excalidraw/types"; +} from "@excalidraw/excalidraw/src/types"; import type { ElementShape, ElementShapes, diff --git a/packages/element/src/binding.ts b/packages/element/src/binding.ts index 27ca9b599..bfc3d0daa 100644 --- a/packages/element/src/binding.ts +++ b/packages/element/src/binding.ts @@ -33,7 +33,7 @@ import type { LocalPoint, Radians } from "@excalidraw/math"; import type Scene from "@excalidraw/excalidraw/src/scene/Scene"; -import type { AppState } from "@excalidraw/excalidraw/types"; +import type { AppState } from "@excalidraw/excalidraw/src/types"; import type { Mutable } from "@excalidraw/common/utility-types"; diff --git a/packages/element/src/bounds.ts b/packages/element/src/bounds.ts index 9e723c214..1efc38cd2 100644 --- a/packages/element/src/bounds.ts +++ b/packages/element/src/bounds.ts @@ -24,7 +24,7 @@ import type { Radians, } from "@excalidraw/math"; -import type { AppState } from "@excalidraw/excalidraw/types"; +import type { AppState } from "@excalidraw/excalidraw/src/types"; import type { Mutable } from "@excalidraw/common/utility-types"; diff --git a/packages/element/src/collision.ts b/packages/element/src/collision.ts index 07b17bfde..2005e0d09 100644 --- a/packages/element/src/collision.ts +++ b/packages/element/src/collision.ts @@ -26,7 +26,7 @@ import type { Radians, } from "@excalidraw/math"; -import type { FrameNameBounds } from "@excalidraw/excalidraw/types"; +import type { FrameNameBounds } from "@excalidraw/excalidraw/src/types"; import { getBoundTextShape, isPathALoop } from "./shapes"; import { getElementBounds } from "./bounds"; diff --git a/packages/element/src/comparisons.ts b/packages/element/src/comparisons.ts index 75fac889d..72b6b101c 100644 --- a/packages/element/src/comparisons.ts +++ b/packages/element/src/comparisons.ts @@ -1,4 +1,4 @@ -import type { ElementOrToolType } from "@excalidraw/excalidraw/types"; +import type { ElementOrToolType } from "@excalidraw/excalidraw/src/types"; export const hasBackground = (type: ElementOrToolType) => type === "rectangle" || diff --git a/packages/element/src/dragElements.ts b/packages/element/src/dragElements.ts index cb8a5fc62..6c13b717d 100644 --- a/packages/element/src/dragElements.ts +++ b/packages/element/src/dragElements.ts @@ -9,7 +9,7 @@ import type { NormalizedZoomValue, NullableGridSize, PointerDownState, -} from "@excalidraw/excalidraw/types"; +} from "@excalidraw/excalidraw/src/types"; import type Scene from "@excalidraw/excalidraw/src/scene/Scene"; diff --git a/packages/element/src/duplicate.ts b/packages/element/src/duplicate.ts index ded1fd26c..a2fe9199a 100644 --- a/packages/element/src/duplicate.ts +++ b/packages/element/src/duplicate.ts @@ -11,7 +11,7 @@ import { import type { Mutable } from "@excalidraw/common/utility-types"; -import type { AppState } from "@excalidraw/excalidraw/types"; +import type { AppState } from "@excalidraw/excalidraw/src/types"; import { getElementsInGroup, diff --git a/packages/element/src/elbowArrow.ts b/packages/element/src/elbowArrow.ts index a70e265bc..5a4d5ed66 100644 --- a/packages/element/src/elbowArrow.ts +++ b/packages/element/src/elbowArrow.ts @@ -22,7 +22,7 @@ import { isDevEnv, } from "@excalidraw/common"; -import type { AppState } from "@excalidraw/excalidraw/types"; +import type { AppState } from "@excalidraw/excalidraw/src/types"; import { bindPointToSnapToElementOutline, diff --git a/packages/element/src/elementLink.ts b/packages/element/src/elementLink.ts index 8781e696d..d4809a62e 100644 --- a/packages/element/src/elementLink.ts +++ b/packages/element/src/elementLink.ts @@ -4,7 +4,7 @@ import { ELEMENT_LINK_KEY, normalizeLink } from "@excalidraw/common"; -import type { AppProps, AppState } from "@excalidraw/excalidraw/types"; +import type { AppProps, AppState } from "@excalidraw/excalidraw/src/types"; import { elementsAreInSameGroup } from "./groups"; diff --git a/packages/element/src/embeddable.ts b/packages/element/src/embeddable.ts index e6d6b4af3..e21ba9fe5 100644 --- a/packages/element/src/embeddable.ts +++ b/packages/element/src/embeddable.ts @@ -5,7 +5,7 @@ import { getFontString, } from "@excalidraw/common"; -import type { ExcalidrawProps } from "@excalidraw/excalidraw/types"; +import type { ExcalidrawProps } from "@excalidraw/excalidraw/src/types"; import type { MarkRequired } from "@excalidraw/common/utility-types"; import { newTextElement } from "./newElement"; diff --git a/packages/element/src/flowchart.ts b/packages/element/src/flowchart.ts index 8ee2ba530..1bf03fc9e 100644 --- a/packages/element/src/flowchart.ts +++ b/packages/element/src/flowchart.ts @@ -5,7 +5,7 @@ import { type GlobalPoint, pointFrom, type LocalPoint } from "@excalidraw/math"; import type { AppState, PendingExcalidrawElements, -} from "@excalidraw/excalidraw/types"; +} from "@excalidraw/excalidraw/src/types"; import { bindLinearElement } from "./binding"; import { updateElbowArrowPoints } from "./elbowArrow"; diff --git a/packages/element/src/frame.ts b/packages/element/src/frame.ts index eb2c2138c..60bd23dec 100644 --- a/packages/element/src/frame.ts +++ b/packages/element/src/frame.ts @@ -9,7 +9,7 @@ import type { AppClassProperties, AppState, StaticCanvasAppState, -} from "@excalidraw/excalidraw/types"; +} from "@excalidraw/excalidraw/src/types"; import type { ReadonlySetLike } from "@excalidraw/common/utility-types"; diff --git a/packages/element/src/groups.ts b/packages/element/src/groups.ts index 1cd1536e1..0e3e1ee25 100644 --- a/packages/element/src/groups.ts +++ b/packages/element/src/groups.ts @@ -2,7 +2,7 @@ import type { AppClassProperties, AppState, InteractiveCanvasAppState, -} from "@excalidraw/excalidraw/types"; +} from "@excalidraw/excalidraw/src/types"; import type { Mutable } from "@excalidraw/common/utility-types"; import { getBoundTextElement } from "./textElement"; diff --git a/packages/element/src/image.ts b/packages/element/src/image.ts index 562b48904..722b216de 100644 --- a/packages/element/src/image.ts +++ b/packages/element/src/image.ts @@ -8,7 +8,7 @@ import type { AppClassProperties, DataURL, BinaryFiles, -} from "@excalidraw/excalidraw/types"; +} from "@excalidraw/excalidraw/src/types"; import { isInitializedImageElement } from "./typeChecks"; diff --git a/packages/element/src/linearElementEditor.ts b/packages/element/src/linearElementEditor.ts index 6c8d0a461..7e00f79ea 100644 --- a/packages/element/src/linearElementEditor.ts +++ b/packages/element/src/linearElementEditor.ts @@ -24,7 +24,7 @@ import { // eslint-disable-next-line @typescript-eslint/no-restricted-imports import Scene from "@excalidraw/excalidraw/src/scene/Scene"; -import type { Store } from "@excalidraw/excalidraw/store"; +import type { Store } from "@excalidraw/excalidraw/src/store"; import type { Radians } from "@excalidraw/math"; @@ -35,7 +35,7 @@ import type { AppClassProperties, NullableGridSize, Zoom, -} from "@excalidraw/excalidraw/types"; +} from "@excalidraw/excalidraw/src/types"; import type { Mutable } from "@excalidraw/common/utility-types"; diff --git a/packages/element/src/renderElement.ts b/packages/element/src/renderElement.ts index 44ddd51a7..b957dd9a3 100644 --- a/packages/element/src/renderElement.ts +++ b/packages/element/src/renderElement.ts @@ -24,7 +24,7 @@ import type { ElementsPendingErasure, PendingExcalidrawElements, NormalizedZoomValue, -} from "@excalidraw/excalidraw/types"; +} from "@excalidraw/excalidraw/src/types"; import type { StaticCanvasRenderConfig, diff --git a/packages/element/src/resizeElements.ts b/packages/element/src/resizeElements.ts index 1a12426ee..9e51a4834 100644 --- a/packages/element/src/resizeElements.ts +++ b/packages/element/src/resizeElements.ts @@ -19,7 +19,7 @@ import type { GlobalPoint } from "@excalidraw/math"; import type Scene from "@excalidraw/excalidraw/src/scene/Scene"; -import type { PointerDownState } from "@excalidraw/excalidraw/types"; +import type { PointerDownState } from "@excalidraw/excalidraw/src/types"; import type { Mutable } from "@excalidraw/common/utility-types"; diff --git a/packages/element/src/resizeTest.ts b/packages/element/src/resizeTest.ts index 411dcf9a7..fa3712045 100644 --- a/packages/element/src/resizeTest.ts +++ b/packages/element/src/resizeTest.ts @@ -9,7 +9,7 @@ import { SIDE_RESIZING_THRESHOLD } from "@excalidraw/common"; import type { GlobalPoint, LineSegment, LocalPoint } from "@excalidraw/math"; -import type { AppState, Device, Zoom } from "@excalidraw/excalidraw/types"; +import type { AppState, Device, Zoom } from "@excalidraw/excalidraw/src/types"; import { getElementAbsoluteCoords } from "./bounds"; import { diff --git a/packages/element/src/selection.ts b/packages/element/src/selection.ts index a76703920..4c8666334 100644 --- a/packages/element/src/selection.ts +++ b/packages/element/src/selection.ts @@ -3,7 +3,7 @@ import { isShallowEqual } from "@excalidraw/common"; import type { AppState, InteractiveCanvasAppState, -} from "@excalidraw/excalidraw/types"; +} from "@excalidraw/excalidraw/src/types"; import { getElementAbsoluteCoords, getElementBounds } from "./bounds"; import { isElementInViewport } from "./sizeHelpers"; diff --git a/packages/element/src/shapes.ts b/packages/element/src/shapes.ts index 96542c538..6e2a43e49 100644 --- a/packages/element/src/shapes.ts +++ b/packages/element/src/shapes.ts @@ -26,7 +26,10 @@ import { type GeometricShape, } from "@excalidraw/utils/shape"; -import type { NormalizedZoomValue, Zoom } from "@excalidraw/excalidraw/types"; +import type { + NormalizedZoomValue, + Zoom, +} from "@excalidraw/excalidraw/src/types"; import { shouldTestInside } from "./collision"; import { LinearElementEditor } from "./linearElementEditor"; diff --git a/packages/element/src/showSelectedShapeActions.ts b/packages/element/src/showSelectedShapeActions.ts index 6f918cfbd..5a257bcfb 100644 --- a/packages/element/src/showSelectedShapeActions.ts +++ b/packages/element/src/showSelectedShapeActions.ts @@ -1,4 +1,4 @@ -import type { UIAppState } from "@excalidraw/excalidraw/types"; +import type { UIAppState } from "@excalidraw/excalidraw/src/types"; import { getSelectedElements } from "./selection"; diff --git a/packages/element/src/sizeHelpers.ts b/packages/element/src/sizeHelpers.ts index 7a84dadba..72ee9e7ac 100644 --- a/packages/element/src/sizeHelpers.ts +++ b/packages/element/src/sizeHelpers.ts @@ -3,7 +3,7 @@ import { viewportCoordsToSceneCoords, } from "@excalidraw/common"; -import type { AppState, Offsets, Zoom } from "@excalidraw/excalidraw/types"; +import type { AppState, Offsets, Zoom } from "@excalidraw/excalidraw/src/types"; import { getCommonBounds, getElementBounds } from "./bounds"; import { mutateElement } from "./mutateElement"; diff --git a/packages/element/src/textElement.ts b/packages/element/src/textElement.ts index 55c3f692c..e40867c00 100644 --- a/packages/element/src/textElement.ts +++ b/packages/element/src/textElement.ts @@ -10,7 +10,7 @@ import { invariant, } from "@excalidraw/common"; -import type { AppState } from "@excalidraw/excalidraw/types"; +import type { AppState } from "@excalidraw/excalidraw/src/types"; import type { ExtractSetType } from "@excalidraw/common/utility-types"; diff --git a/packages/element/src/transformHandles.ts b/packages/element/src/transformHandles.ts index f2b0cd278..b3a541918 100644 --- a/packages/element/src/transformHandles.ts +++ b/packages/element/src/transformHandles.ts @@ -12,7 +12,7 @@ import type { Device, InteractiveCanvasAppState, Zoom, -} from "@excalidraw/excalidraw/types"; +} from "@excalidraw/excalidraw/src/types"; import { getElementAbsoluteCoords } from "./bounds"; import { diff --git a/packages/element/src/typeChecks.ts b/packages/element/src/typeChecks.ts index 54619726d..d9ee2bd73 100644 --- a/packages/element/src/typeChecks.ts +++ b/packages/element/src/typeChecks.ts @@ -1,6 +1,6 @@ import { ROUNDNESS, assertNever } from "@excalidraw/common"; -import type { ElementOrToolType } from "@excalidraw/excalidraw/types"; +import type { ElementOrToolType } from "@excalidraw/excalidraw/src/types"; import type { MarkNonNullable } from "@excalidraw/common/utility-types"; diff --git a/packages/element/src/zindex.ts b/packages/element/src/zindex.ts index 16a5936a0..a85acceae 100644 --- a/packages/element/src/zindex.ts +++ b/packages/element/src/zindex.ts @@ -1,6 +1,6 @@ import { arrayToMap, findIndex, findLastIndex } from "@excalidraw/common"; -import type { AppState } from "@excalidraw/excalidraw/types"; +import type { AppState } from "@excalidraw/excalidraw/src/types"; import type Scene from "@excalidraw/excalidraw/src/scene/Scene"; diff --git a/packages/element/tests/align.test.tsx b/packages/element/tests/align.test.tsx index 2dcafc65b..8115e4599 100644 --- a/packages/element/tests/align.test.tsx +++ b/packages/element/tests/align.test.tsx @@ -9,8 +9,8 @@ import { actionAlignLeft, actionAlignRight, } from "@excalidraw/excalidraw/actions"; -import { defaultLang, setLanguage } from "@excalidraw/excalidraw/i18n"; -import { Excalidraw } from "@excalidraw/excalidraw"; +import { defaultLang, setLanguage } from "@excalidraw/excalidraw/src/i18n"; +import { Excalidraw } from "@excalidraw/excalidraw/src"; import { API } from "@excalidraw/excalidraw/tests/helpers/api"; import { UI, Pointer, Keyboard } from "@excalidraw/excalidraw/tests/helpers/ui"; diff --git a/packages/element/tests/binding.test.tsx b/packages/element/tests/binding.test.tsx index f57d7793a..59310eb15 100644 --- a/packages/element/tests/binding.test.tsx +++ b/packages/element/tests/binding.test.tsx @@ -4,7 +4,7 @@ import { pointFrom } from "@excalidraw/math"; import { actionWrapTextInContainer } from "@excalidraw/excalidraw/actions/actionBoundText"; -import { Excalidraw, isLinearElement } from "@excalidraw/excalidraw"; +import { Excalidraw, isLinearElement } from "@excalidraw/excalidraw/src"; import { API } from "@excalidraw/excalidraw/tests/helpers/api"; import { UI, Pointer, Keyboard } from "@excalidraw/excalidraw/tests/helpers/ui"; diff --git a/packages/element/tests/duplicate.test.tsx b/packages/element/tests/duplicate.test.tsx index 7492bcc58..b6c772480 100644 --- a/packages/element/tests/duplicate.test.tsx +++ b/packages/element/tests/duplicate.test.tsx @@ -8,7 +8,7 @@ import { isPrimitive, } from "@excalidraw/common"; -import { Excalidraw } from "@excalidraw/excalidraw"; +import { Excalidraw } from "@excalidraw/excalidraw/src"; import { actionDuplicateSelection } from "@excalidraw/excalidraw/actions"; diff --git a/packages/element/tests/elbowArrow.test.tsx b/packages/element/tests/elbowArrow.test.tsx index b8b5a8b85..55b36d7fc 100644 --- a/packages/element/tests/elbowArrow.test.tsx +++ b/packages/element/tests/elbowArrow.test.tsx @@ -1,6 +1,6 @@ import { ARROW_TYPE } from "@excalidraw/common"; import { pointFrom } from "@excalidraw/math"; -import { Excalidraw, mutateElement } from "@excalidraw/excalidraw"; +import { Excalidraw, mutateElement } from "@excalidraw/excalidraw/src"; import Scene from "@excalidraw/excalidraw/scene/Scene"; import { actionSelectAll } from "@excalidraw/excalidraw/actions"; diff --git a/packages/element/tests/flowchart.test.tsx b/packages/element/tests/flowchart.test.tsx index 0130fb4c8..67644dc30 100644 --- a/packages/element/tests/flowchart.test.tsx +++ b/packages/element/tests/flowchart.test.tsx @@ -1,6 +1,6 @@ import { KEYS, reseed } from "@excalidraw/common"; -import { Excalidraw } from "@excalidraw/excalidraw"; +import { Excalidraw } from "@excalidraw/excalidraw/src"; import { API } from "@excalidraw/excalidraw/tests/helpers/api"; import { UI, Keyboard, Pointer } from "@excalidraw/excalidraw/tests/helpers/ui"; diff --git a/packages/element/tests/frame.test.tsx b/packages/element/tests/frame.test.tsx index 47f2160ac..dc7c83192 100644 --- a/packages/element/tests/frame.test.tsx +++ b/packages/element/tests/frame.test.tsx @@ -1,7 +1,7 @@ import { convertToExcalidrawElements, Excalidraw, -} from "@excalidraw/excalidraw"; +} from "@excalidraw/excalidraw/src"; import { API } from "@excalidraw/excalidraw/tests/helpers/api"; import { Keyboard, Pointer } from "@excalidraw/excalidraw/tests/helpers/ui"; diff --git a/packages/element/tests/resize.test.tsx b/packages/element/tests/resize.test.tsx index f3804e2a2..e7b0fb2d4 100644 --- a/packages/element/tests/resize.test.tsx +++ b/packages/element/tests/resize.test.tsx @@ -1,6 +1,6 @@ import { pointFrom } from "@excalidraw/math"; -import { Excalidraw } from "@excalidraw/excalidraw"; +import { Excalidraw } from "@excalidraw/excalidraw/src"; import { KEYS, getSizeFromPoints, diff --git a/packages/element/tests/zindex.test.tsx b/packages/element/tests/zindex.test.tsx index 997cb56f8..085c45803 100644 --- a/packages/element/tests/zindex.test.tsx +++ b/packages/element/tests/zindex.test.tsx @@ -8,7 +8,7 @@ import { actionDuplicateSelection, } from "@excalidraw/excalidraw/actions"; -import { Excalidraw } from "@excalidraw/excalidraw"; +import { Excalidraw } from "@excalidraw/excalidraw/src"; import { API } from "@excalidraw/excalidraw/tests/helpers/api"; import { @@ -18,7 +18,7 @@ import { unmountComponent, } from "@excalidraw/excalidraw/tests/test-utils"; -import type { AppState } from "@excalidraw/excalidraw/types"; +import type { AppState } from "@excalidraw/excalidraw/src/types"; import { selectGroupsForSelectedElements } from "../src/groups"; diff --git a/packages/excalidraw/.size-limit.json b/packages/excalidraw/src/.size-limit.json similarity index 100% rename from packages/excalidraw/.size-limit.json rename to packages/excalidraw/src/.size-limit.json diff --git a/packages/excalidraw/src/actions/actionAddToLibrary.ts b/packages/excalidraw/src/actions/actionAddToLibrary.ts index 01c14342e..9216e52c2 100644 --- a/packages/excalidraw/src/actions/actionAddToLibrary.ts +++ b/packages/excalidraw/src/actions/actionAddToLibrary.ts @@ -1,8 +1,8 @@ import { LIBRARY_DISABLED_TYPES, randomId } from "@excalidraw/common"; import { deepCopyElement } from "@excalidraw/element/duplicate"; -import { t } from "../../i18n"; -import { CaptureUpdateAction } from "../../store"; +import { t } from "../i18n"; +import { CaptureUpdateAction } from "../store"; import { register } from "./register"; diff --git a/packages/excalidraw/src/actions/actionAlign.tsx b/packages/excalidraw/src/actions/actionAlign.tsx index 22a59c729..46023d61e 100644 --- a/packages/excalidraw/src/actions/actionAlign.tsx +++ b/packages/excalidraw/src/actions/actionAlign.tsx @@ -22,14 +22,14 @@ import { CenterVerticallyIcon, } from "../components/icons"; -import { t } from "../../i18n"; +import { t } from "../i18n"; import { isSomeElementSelected } from "../scene"; -import { CaptureUpdateAction } from "../../store"; +import { CaptureUpdateAction } from "../store"; import { register } from "./register"; -import type { AppClassProperties, AppState, UIAppState } from "../../types"; +import type { AppClassProperties, AppState, UIAppState } from "../types"; export const alignActionsPredicate = ( appState: UIAppState, diff --git a/packages/excalidraw/src/actions/actionBoundText.tsx b/packages/excalidraw/src/actions/actionBoundText.tsx index 2a0da3d48..a8fdde3c6 100644 --- a/packages/excalidraw/src/actions/actionBoundText.tsx +++ b/packages/excalidraw/src/actions/actionBoundText.tsx @@ -43,13 +43,13 @@ import type { import type { Mutable } from "@excalidraw/common/utility-types"; -import { CaptureUpdateAction } from "../../store"; +import { CaptureUpdateAction } from "../store"; import { register } from "./register"; import type { Radians } from "../../../math/src"; -import type { AppState } from "../../types"; +import type { AppState } from "../types"; export const actionUnbindText = register({ name: "unbindText", diff --git a/packages/excalidraw/src/actions/actionCanvas.tsx b/packages/excalidraw/src/actions/actionCanvas.tsx index 95c62c293..c771a98a5 100644 --- a/packages/excalidraw/src/actions/actionCanvas.tsx +++ b/packages/excalidraw/src/actions/actionCanvas.tsx @@ -38,17 +38,17 @@ import { ZoomOutIcon, ZoomResetIcon, } from "../components/icons"; -import { setCursor } from "../../cursor"; +import { setCursor } from "../cursor"; -import { t } from "../../i18n"; +import { t } from "../i18n"; import { getNormalizedZoom } from "../scene"; import { centerScrollOn } from "../scene/scroll"; import { getStateForZoom } from "../scene/zoom"; -import { CaptureUpdateAction } from "../../store"; +import { CaptureUpdateAction } from "../store"; import { register } from "./register"; -import type { AppState, Offsets } from "../../types"; +import type { AppState, Offsets } from "../types"; export const actionChangeViewBackgroundColor = register({ name: "changeViewBackgroundColor", diff --git a/packages/excalidraw/src/actions/actionClipboard.tsx b/packages/excalidraw/src/actions/actionClipboard.tsx index 55a78c580..9de6d70f4 100644 --- a/packages/excalidraw/src/actions/actionClipboard.tsx +++ b/packages/excalidraw/src/actions/actionClipboard.tsx @@ -10,12 +10,12 @@ import { probablySupportsClipboardBlob, probablySupportsClipboardWriteText, readSystemClipboard, -} from "../../clipboard"; +} from "../clipboard"; import { DuplicateIcon, cutIcon, pngIcon, svgIcon } from "../components/icons"; import { exportCanvas, prepareElementsForExport } from "../data/index"; -import { t } from "../../i18n"; +import { t } from "../i18n"; -import { CaptureUpdateAction } from "../../store"; +import { CaptureUpdateAction } from "../store"; import { actionDeleteSelected } from "./actionDeleteSelected"; import { register } from "./register"; diff --git a/packages/excalidraw/src/actions/actionCropEditor.tsx b/packages/excalidraw/src/actions/actionCropEditor.tsx index dd99f641d..1a7b6da69 100644 --- a/packages/excalidraw/src/actions/actionCropEditor.tsx +++ b/packages/excalidraw/src/actions/actionCropEditor.tsx @@ -4,8 +4,8 @@ import type { ExcalidrawImageElement } from "@excalidraw/element/types"; import { ToolButton } from "../components/ToolButton"; import { cropIcon } from "../components/icons"; -import { t } from "../../i18n"; -import { CaptureUpdateAction } from "../../store"; +import { t } from "../i18n"; +import { CaptureUpdateAction } from "../store"; import { register } from "./register"; diff --git a/packages/excalidraw/src/actions/actionDeleteSelected.tsx b/packages/excalidraw/src/actions/actionDeleteSelected.tsx index d559f858c..75e666df0 100644 --- a/packages/excalidraw/src/actions/actionDeleteSelected.tsx +++ b/packages/excalidraw/src/actions/actionDeleteSelected.tsx @@ -22,15 +22,15 @@ import { import type { ExcalidrawElement } from "@excalidraw/element/types"; -import { t } from "../../i18n"; +import { t } from "../i18n"; import { getSelectedElements, isSomeElementSelected } from "../scene"; -import { CaptureUpdateAction } from "../../store"; +import { CaptureUpdateAction } from "../store"; import { TrashIcon } from "../components/icons"; import { ToolButton } from "../components/ToolButton"; import { register } from "./register"; -import type { AppClassProperties, AppState } from "../../types"; +import type { AppClassProperties, AppState } from "../types"; const deleteSelectedElements = ( elements: readonly ExcalidrawElement[], diff --git a/packages/excalidraw/src/actions/actionDistribute.tsx b/packages/excalidraw/src/actions/actionDistribute.tsx index 64723b53d..9f05ab6bf 100644 --- a/packages/excalidraw/src/actions/actionDistribute.tsx +++ b/packages/excalidraw/src/actions/actionDistribute.tsx @@ -18,14 +18,14 @@ import { DistributeVerticallyIcon, } from "../components/icons"; -import { t } from "../../i18n"; +import { t } from "../i18n"; import { isSomeElementSelected } from "../scene"; -import { CaptureUpdateAction } from "../../store"; +import { CaptureUpdateAction } from "../store"; import { register } from "./register"; -import type { AppClassProperties, AppState } from "../../types"; +import type { AppClassProperties, AppState } from "../types"; const enableActionGroup = (appState: AppState, app: AppClassProperties) => { const selectedElements = app.scene.getSelectedElements(appState); diff --git a/packages/excalidraw/src/actions/actionDuplicateSelection.tsx b/packages/excalidraw/src/actions/actionDuplicateSelection.tsx index d73a3c0fd..231fe1913 100644 --- a/packages/excalidraw/src/actions/actionDuplicateSelection.tsx +++ b/packages/excalidraw/src/actions/actionDuplicateSelection.tsx @@ -30,9 +30,9 @@ import type { ExcalidrawElement } from "@excalidraw/element/types"; import { ToolButton } from "../components/ToolButton"; import { DuplicateIcon } from "../components/icons"; -import { t } from "../../i18n"; +import { t } from "../i18n"; import { isSomeElementSelected } from "../scene"; -import { CaptureUpdateAction } from "../../store"; +import { CaptureUpdateAction } from "../store"; import { register } from "./register"; diff --git a/packages/excalidraw/src/actions/actionElementLink.ts b/packages/excalidraw/src/actions/actionElementLink.ts index 6321fb8d4..24ea8bbd6 100644 --- a/packages/excalidraw/src/actions/actionElementLink.ts +++ b/packages/excalidraw/src/actions/actionElementLink.ts @@ -4,11 +4,11 @@ import { getLinkIdAndTypeFromSelection, } from "@excalidraw/element/elementLink"; -import { copyTextToSystemClipboard } from "../../clipboard"; +import { copyTextToSystemClipboard } from "../clipboard"; import { copyIcon, elementLinkIcon } from "../components/icons"; -import { t } from "../../i18n"; +import { t } from "../i18n"; import { getSelectedElements } from "../scene"; -import { CaptureUpdateAction } from "../../store"; +import { CaptureUpdateAction } from "../store"; import { register } from "./register"; diff --git a/packages/excalidraw/src/actions/actionElementLock.ts b/packages/excalidraw/src/actions/actionElementLock.ts index f7a81e730..6bc238a59 100644 --- a/packages/excalidraw/src/actions/actionElementLock.ts +++ b/packages/excalidraw/src/actions/actionElementLock.ts @@ -9,7 +9,7 @@ import type { ExcalidrawElement } from "@excalidraw/element/types"; import { LockedIcon, UnlockedIcon } from "../components/icons"; import { getSelectedElements } from "../scene"; -import { CaptureUpdateAction } from "../../store"; +import { CaptureUpdateAction } from "../store"; import { register } from "./register"; diff --git a/packages/excalidraw/src/actions/actionEmbeddable.ts b/packages/excalidraw/src/actions/actionEmbeddable.ts index 4d22659db..556652240 100644 --- a/packages/excalidraw/src/actions/actionEmbeddable.ts +++ b/packages/excalidraw/src/actions/actionEmbeddable.ts @@ -1,7 +1,7 @@ import { updateActiveTool } from "@excalidraw/common"; -import { setCursorForShape } from "../../cursor"; -import { CaptureUpdateAction } from "../../store"; +import { setCursorForShape } from "../cursor"; +import { CaptureUpdateAction } from "../store"; import { register } from "./register"; diff --git a/packages/excalidraw/src/actions/actionExport.tsx b/packages/excalidraw/src/actions/actionExport.tsx index 7355925e5..8fcaea21b 100644 --- a/packages/excalidraw/src/actions/actionExport.tsx +++ b/packages/excalidraw/src/actions/actionExport.tsx @@ -21,10 +21,10 @@ import { isImageFileHandle } from "../data/blob"; import { nativeFileSystemSupported } from "../data/filesystem"; import { resaveAsImageWithScene } from "../data/resave"; -import { t } from "../../i18n"; +import { t } from "../i18n"; import { getSelectedElements, isSomeElementSelected } from "../scene"; import { getExportSize } from "../scene/export"; -import { CaptureUpdateAction } from "../../store"; +import { CaptureUpdateAction } from "../store"; import "../components/ToolIcon.scss"; diff --git a/packages/excalidraw/src/actions/actionFinalize.tsx b/packages/excalidraw/src/actions/actionFinalize.tsx index 9dd142721..984961656 100644 --- a/packages/excalidraw/src/actions/actionFinalize.tsx +++ b/packages/excalidraw/src/actions/actionFinalize.tsx @@ -16,15 +16,15 @@ import { isPathALoop } from "@excalidraw/element/shapes"; import { isInvisiblySmallElement } from "@excalidraw/element/sizeHelpers"; -import { t } from "../../i18n"; -import { resetCursor } from "../../cursor"; +import { t } from "../i18n"; +import { resetCursor } from "../cursor"; import { done } from "../components/icons"; import { ToolButton } from "../components/ToolButton"; -import { CaptureUpdateAction } from "../../store"; +import { CaptureUpdateAction } from "../store"; import { register } from "./register"; -import type { AppState } from "../../types"; +import type { AppState } from "../types"; export const actionFinalize = register({ name: "finalize", diff --git a/packages/excalidraw/src/actions/actionFlip.ts b/packages/excalidraw/src/actions/actionFlip.ts index 1c8e09c38..62be891cb 100644 --- a/packages/excalidraw/src/actions/actionFlip.ts +++ b/packages/excalidraw/src/actions/actionFlip.ts @@ -27,13 +27,13 @@ import type { } from "@excalidraw/element/types"; import { getSelectedElements } from "../scene"; -import { CaptureUpdateAction } from "../../store"; +import { CaptureUpdateAction } from "../store"; import { flipHorizontal, flipVertical } from "../components/icons"; import { register } from "./register"; -import type { AppClassProperties, AppState } from "../../types"; +import type { AppClassProperties, AppState } from "../types"; export const actionFlipHorizontal = register({ name: "flipHorizontal", diff --git a/packages/excalidraw/src/actions/actionFrame.ts b/packages/excalidraw/src/actions/actionFrame.ts index dccf074c2..13d57b2a1 100644 --- a/packages/excalidraw/src/actions/actionFrame.ts +++ b/packages/excalidraw/src/actions/actionFrame.ts @@ -16,14 +16,14 @@ import { getCommonBounds } from "@excalidraw/element/bounds"; import type { ExcalidrawElement } from "@excalidraw/element/types"; -import { setCursorForShape } from "../../cursor"; +import { setCursorForShape } from "../cursor"; import { frameToolIcon } from "../components/icons"; import { getSelectedElements } from "../scene"; -import { CaptureUpdateAction } from "../../store"; +import { CaptureUpdateAction } from "../store"; import { register } from "./register"; -import type { AppClassProperties, AppState, UIAppState } from "../../types"; +import type { AppClassProperties, AppState, UIAppState } from "../types"; const isSingleFrameSelected = ( appState: UIAppState, diff --git a/packages/excalidraw/src/actions/actionGroup.tsx b/packages/excalidraw/src/actions/actionGroup.tsx index 64bfd21e0..6b47ef969 100644 --- a/packages/excalidraw/src/actions/actionGroup.tsx +++ b/packages/excalidraw/src/actions/actionGroup.tsx @@ -37,14 +37,14 @@ import type { import { ToolButton } from "../components/ToolButton"; import { UngroupIcon, GroupIcon } from "../components/icons"; -import { t } from "../../i18n"; +import { t } from "../i18n"; import { isSomeElementSelected } from "../scene"; -import { CaptureUpdateAction } from "../../store"; +import { CaptureUpdateAction } from "../store"; import { register } from "./register"; -import type { AppClassProperties, AppState } from "../../types"; +import type { AppClassProperties, AppState } from "../types"; const allElementsInSameGroup = (elements: readonly ExcalidrawElement[]) => { if (elements.length >= 2) { diff --git a/packages/excalidraw/src/actions/actionHistory.tsx b/packages/excalidraw/src/actions/actionHistory.tsx index a3680669f..7ddc2c701 100644 --- a/packages/excalidraw/src/actions/actionHistory.tsx +++ b/packages/excalidraw/src/actions/actionHistory.tsx @@ -6,12 +6,12 @@ import { ToolButton } from "../components/ToolButton"; import { UndoIcon, RedoIcon } from "../components/icons"; import { HistoryChangedEvent } from "../../history"; import { useEmitter } from "../../hooks/useEmitter"; -import { t } from "../../i18n"; -import { CaptureUpdateAction } from "../../store"; +import { t } from "../i18n"; +import { CaptureUpdateAction } from "../store"; import type { History } from "../../history"; -import type { Store } from "../../store"; -import type { AppClassProperties, AppState } from "../../types"; +import type { Store } from "../store"; +import type { AppClassProperties, AppState } from "../types"; import type { Action, ActionResult } from "./types"; const executeHistoryAction = ( diff --git a/packages/excalidraw/src/actions/actionLinearEditor.tsx b/packages/excalidraw/src/actions/actionLinearEditor.tsx index f850ce954..56e327bd2 100644 --- a/packages/excalidraw/src/actions/actionLinearEditor.tsx +++ b/packages/excalidraw/src/actions/actionLinearEditor.tsx @@ -8,8 +8,8 @@ import { DEFAULT_CATEGORIES } from "../components/CommandPalette/CommandPalette" import { ToolButton } from "../components/ToolButton"; import { lineEditorIcon } from "../components/icons"; -import { t } from "../../i18n"; -import { CaptureUpdateAction } from "../../store"; +import { t } from "../i18n"; +import { CaptureUpdateAction } from "../store"; import { register } from "./register"; diff --git a/packages/excalidraw/src/actions/actionLink.tsx b/packages/excalidraw/src/actions/actionLink.tsx index 0319ad7de..71426267d 100644 --- a/packages/excalidraw/src/actions/actionLink.tsx +++ b/packages/excalidraw/src/actions/actionLink.tsx @@ -5,10 +5,10 @@ import { KEYS, getShortcutKey } from "@excalidraw/common"; import { ToolButton } from "../components/ToolButton"; import { getContextMenuLabel } from "../components/hyperlink/Hyperlink"; import { LinkIcon } from "../components/icons"; -import { t } from "../../i18n"; +import { t } from "../i18n"; import { getSelectedElements } from "../scene"; -import { CaptureUpdateAction } from "../../store"; +import { CaptureUpdateAction } from "../store"; import { register } from "./register"; diff --git a/packages/excalidraw/src/actions/actionMenu.tsx b/packages/excalidraw/src/actions/actionMenu.tsx index dc96b576d..67863e020 100644 --- a/packages/excalidraw/src/actions/actionMenu.tsx +++ b/packages/excalidraw/src/actions/actionMenu.tsx @@ -6,9 +6,9 @@ import { showSelectedShapeActions } from "@excalidraw/element/showSelectedShapeA import { ToolButton } from "../components/ToolButton"; import { HamburgerMenuIcon, HelpIconThin, palette } from "../components/icons"; -import { t } from "../../i18n"; +import { t } from "../i18n"; -import { CaptureUpdateAction } from "../../store"; +import { CaptureUpdateAction } from "../store"; import { register } from "./register"; diff --git a/packages/excalidraw/src/actions/actionNavigate.tsx b/packages/excalidraw/src/actions/actionNavigate.tsx index 70e958d56..738386839 100644 --- a/packages/excalidraw/src/actions/actionNavigate.tsx +++ b/packages/excalidraw/src/actions/actionNavigate.tsx @@ -1,19 +1,19 @@ import clsx from "clsx"; -import { getClientColor } from "../../clients"; +import { getClientColor } from "../clients"; import { Avatar } from "../components/Avatar"; import { eyeIcon, microphoneIcon, microphoneMutedIcon, } from "../components/icons"; -import { t } from "../../i18n"; -import { CaptureUpdateAction } from "../../store"; +import { t } from "../i18n"; +import { CaptureUpdateAction } from "../store"; import { register } from "./register"; import type { GoToCollaboratorComponentProps } from "../components/UserList"; -import type { Collaborator } from "../../types"; +import type { Collaborator } from "../types"; export const actionGoToCollaborator = register({ name: "goToCollaborator", diff --git a/packages/excalidraw/src/actions/actionProperties.tsx b/packages/excalidraw/src/actions/actionProperties.tsx index 4f325a0c3..ca1cd08b6 100644 --- a/packages/excalidraw/src/actions/actionProperties.tsx +++ b/packages/excalidraw/src/actions/actionProperties.tsx @@ -124,7 +124,7 @@ import { } from "../components/icons"; import { Fonts } from "../../fonts"; -import { getLanguage, t } from "../../i18n"; +import { getLanguage, t } from "../i18n"; import { canHaveArrowheads, getCommonAttributeOfSelectedElements, @@ -132,12 +132,12 @@ import { getTargetElements, isSomeElementSelected, } from "../scene"; -import { CaptureUpdateAction } from "../../store"; +import { CaptureUpdateAction } from "../store"; import { register } from "./register"; -import type { CaptureUpdateActionType } from "../../store"; -import type { AppClassProperties, AppState, Primitive } from "../../types"; +import type { CaptureUpdateActionType } from "../store"; +import type { AppClassProperties, AppState, Primitive } from "../types"; const FONT_SIZE_RELATIVE_INCREASE_STEP = 0.1; diff --git a/packages/excalidraw/src/actions/actionSelectAll.ts b/packages/excalidraw/src/actions/actionSelectAll.ts index 0d3181b6c..d7775774a 100644 --- a/packages/excalidraw/src/actions/actionSelectAll.ts +++ b/packages/excalidraw/src/actions/actionSelectAll.ts @@ -8,7 +8,7 @@ import { selectGroupsForSelectedElements } from "@excalidraw/element/groups"; import type { ExcalidrawElement } from "@excalidraw/element/types"; -import { CaptureUpdateAction } from "../../store"; +import { CaptureUpdateAction } from "../store"; import { selectAllIcon } from "../components/icons"; diff --git a/packages/excalidraw/src/actions/actionStyles.ts b/packages/excalidraw/src/actions/actionStyles.ts index 02c65c8a8..ed3c91e30 100644 --- a/packages/excalidraw/src/actions/actionStyles.ts +++ b/packages/excalidraw/src/actions/actionStyles.ts @@ -28,9 +28,9 @@ import type { ExcalidrawTextElement } from "@excalidraw/element/types"; import { paintIcon } from "../components/icons"; -import { t } from "../../i18n"; +import { t } from "../i18n"; import { getSelectedElements } from "../scene"; -import { CaptureUpdateAction } from "../../store"; +import { CaptureUpdateAction } from "../store"; import { register } from "./register"; diff --git a/packages/excalidraw/src/actions/actionTextAutoResize.ts b/packages/excalidraw/src/actions/actionTextAutoResize.ts index 8f3891f92..4a36cab40 100644 --- a/packages/excalidraw/src/actions/actionTextAutoResize.ts +++ b/packages/excalidraw/src/actions/actionTextAutoResize.ts @@ -6,11 +6,11 @@ import { measureText } from "@excalidraw/element/textMeasurements"; import { isTextElement } from "@excalidraw/element/typeChecks"; import { getSelectedElements } from "../scene"; -import { CaptureUpdateAction } from "../../store"; +import { CaptureUpdateAction } from "../store"; import { register } from "./register"; -import type { AppClassProperties } from "../../types"; +import type { AppClassProperties } from "../types"; export const actionTextAutoResize = register({ name: "autoResize", diff --git a/packages/excalidraw/src/actions/actionToggleGridMode.tsx b/packages/excalidraw/src/actions/actionToggleGridMode.tsx index bdbb878de..9415051f3 100644 --- a/packages/excalidraw/src/actions/actionToggleGridMode.tsx +++ b/packages/excalidraw/src/actions/actionToggleGridMode.tsx @@ -1,11 +1,11 @@ import { CODES, KEYS } from "@excalidraw/common"; import { gridIcon } from "../components/icons"; -import { CaptureUpdateAction } from "../../store"; +import { CaptureUpdateAction } from "../store"; import { register } from "./register"; -import type { AppState } from "../../types"; +import type { AppState } from "../types"; export const actionToggleGridMode = register({ name: "gridMode", diff --git a/packages/excalidraw/src/actions/actionToggleObjectsSnapMode.tsx b/packages/excalidraw/src/actions/actionToggleObjectsSnapMode.tsx index 759dde59b..ba092bff8 100644 --- a/packages/excalidraw/src/actions/actionToggleObjectsSnapMode.tsx +++ b/packages/excalidraw/src/actions/actionToggleObjectsSnapMode.tsx @@ -1,7 +1,7 @@ import { CODES, KEYS } from "@excalidraw/common"; import { magnetIcon } from "../components/icons"; -import { CaptureUpdateAction } from "../../store"; +import { CaptureUpdateAction } from "../store"; import { register } from "./register"; diff --git a/packages/excalidraw/src/actions/actionToggleSearchMenu.ts b/packages/excalidraw/src/actions/actionToggleSearchMenu.ts index 475f3a2d0..ce384fc66 100644 --- a/packages/excalidraw/src/actions/actionToggleSearchMenu.ts +++ b/packages/excalidraw/src/actions/actionToggleSearchMenu.ts @@ -6,11 +6,11 @@ import { } from "@excalidraw/common"; import { searchIcon } from "../components/icons"; -import { CaptureUpdateAction } from "../../store"; +import { CaptureUpdateAction } from "../store"; import { register } from "./register"; -import type { AppState } from "../../types"; +import type { AppState } from "../types"; export const actionToggleSearchMenu = register({ name: "searchMenu", diff --git a/packages/excalidraw/src/actions/actionToggleStats.tsx b/packages/excalidraw/src/actions/actionToggleStats.tsx index ac2100999..ffa812e96 100644 --- a/packages/excalidraw/src/actions/actionToggleStats.tsx +++ b/packages/excalidraw/src/actions/actionToggleStats.tsx @@ -1,7 +1,7 @@ import { CODES, KEYS } from "@excalidraw/common"; import { abacusIcon } from "../components/icons"; -import { CaptureUpdateAction } from "../../store"; +import { CaptureUpdateAction } from "../store"; import { register } from "./register"; diff --git a/packages/excalidraw/src/actions/actionToggleViewMode.tsx b/packages/excalidraw/src/actions/actionToggleViewMode.tsx index eeef01e42..e42a7a102 100644 --- a/packages/excalidraw/src/actions/actionToggleViewMode.tsx +++ b/packages/excalidraw/src/actions/actionToggleViewMode.tsx @@ -1,7 +1,7 @@ import { CODES, KEYS } from "@excalidraw/common"; import { eyeIcon } from "../components/icons"; -import { CaptureUpdateAction } from "../../store"; +import { CaptureUpdateAction } from "../store"; import { register } from "./register"; diff --git a/packages/excalidraw/src/actions/actionToggleZenMode.tsx b/packages/excalidraw/src/actions/actionToggleZenMode.tsx index 982ec8640..e56e02ca7 100644 --- a/packages/excalidraw/src/actions/actionToggleZenMode.tsx +++ b/packages/excalidraw/src/actions/actionToggleZenMode.tsx @@ -1,7 +1,7 @@ import { CODES, KEYS } from "@excalidraw/common"; import { coffeeIcon } from "../components/icons"; -import { CaptureUpdateAction } from "../../store"; +import { CaptureUpdateAction } from "../store"; import { register } from "./register"; diff --git a/packages/excalidraw/src/actions/actionZindex.tsx b/packages/excalidraw/src/actions/actionZindex.tsx index 9baff038b..8eb5a50f2 100644 --- a/packages/excalidraw/src/actions/actionZindex.tsx +++ b/packages/excalidraw/src/actions/actionZindex.tsx @@ -13,8 +13,8 @@ import { SendBackwardIcon, SendToBackIcon, } from "../components/icons"; -import { t } from "../../i18n"; -import { CaptureUpdateAction } from "../../store"; +import { t } from "../i18n"; +import { CaptureUpdateAction } from "../store"; import { register } from "./register"; diff --git a/packages/excalidraw/src/actions/manager.tsx b/packages/excalidraw/src/actions/manager.tsx index 696dd2341..896122520 100644 --- a/packages/excalidraw/src/actions/manager.tsx +++ b/packages/excalidraw/src/actions/manager.tsx @@ -9,7 +9,7 @@ import type { import { trackEvent } from "../../analytics"; -import type { AppClassProperties, AppState } from "../../types"; +import type { AppClassProperties, AppState } from "../types"; import type { Action, UpdaterFn, diff --git a/packages/excalidraw/src/actions/shortcuts.ts b/packages/excalidraw/src/actions/shortcuts.ts index c7ef33245..1a13f1703 100644 --- a/packages/excalidraw/src/actions/shortcuts.ts +++ b/packages/excalidraw/src/actions/shortcuts.ts @@ -2,7 +2,7 @@ import { isDarwin, getShortcutKey } from "@excalidraw/common"; import type { SubtypeOf } from "@excalidraw/common/utility-types"; -import { t } from "../../i18n"; +import { t } from "../i18n"; import type { ActionName } from "./types"; diff --git a/packages/excalidraw/src/actions/types.ts b/packages/excalidraw/src/actions/types.ts index 89b7db670..c63a122e0 100644 --- a/packages/excalidraw/src/actions/types.ts +++ b/packages/excalidraw/src/actions/types.ts @@ -3,14 +3,14 @@ import type { OrderedExcalidrawElement, } from "@excalidraw/element/types"; -import type { CaptureUpdateActionType } from "../../store"; +import type { CaptureUpdateActionType } from "../store"; import type { AppClassProperties, AppState, ExcalidrawProps, BinaryFiles, UIAppState, -} from "../../types"; +} from "../types"; import type React from "react"; export type ActionSource = diff --git a/packages/excalidraw/analytics.ts b/packages/excalidraw/src/analytics.ts similarity index 100% rename from packages/excalidraw/analytics.ts rename to packages/excalidraw/src/analytics.ts diff --git a/packages/excalidraw/animated-trail.ts b/packages/excalidraw/src/animated-trail.ts similarity index 100% rename from packages/excalidraw/animated-trail.ts rename to packages/excalidraw/src/animated-trail.ts diff --git a/packages/excalidraw/animation-frame-handler.ts b/packages/excalidraw/src/animation-frame-handler.ts similarity index 100% rename from packages/excalidraw/animation-frame-handler.ts rename to packages/excalidraw/src/animation-frame-handler.ts diff --git a/packages/excalidraw/appState.ts b/packages/excalidraw/src/appState.ts similarity index 100% rename from packages/excalidraw/appState.ts rename to packages/excalidraw/src/appState.ts diff --git a/packages/excalidraw/change.ts b/packages/excalidraw/src/change.ts similarity index 100% rename from packages/excalidraw/change.ts rename to packages/excalidraw/src/change.ts diff --git a/packages/excalidraw/charts.test.ts b/packages/excalidraw/src/charts.test.ts similarity index 100% rename from packages/excalidraw/charts.test.ts rename to packages/excalidraw/src/charts.test.ts diff --git a/packages/excalidraw/charts.ts b/packages/excalidraw/src/charts.ts similarity index 100% rename from packages/excalidraw/charts.ts rename to packages/excalidraw/src/charts.ts diff --git a/packages/excalidraw/clients.ts b/packages/excalidraw/src/clients.ts similarity index 99% rename from packages/excalidraw/clients.ts rename to packages/excalidraw/src/clients.ts index e542474b3..9467b1362 100644 --- a/packages/excalidraw/clients.ts +++ b/packages/excalidraw/src/clients.ts @@ -8,7 +8,7 @@ import { import { roundRect } from "./renderer/roundRect"; -import type { InteractiveCanvasRenderConfig } from "./src/scene/types"; +import type { InteractiveCanvasRenderConfig } from "./scene/types"; import type { Collaborator, InteractiveCanvasAppState, diff --git a/packages/excalidraw/clipboard.test.ts b/packages/excalidraw/src/clipboard.test.ts similarity index 99% rename from packages/excalidraw/clipboard.test.ts rename to packages/excalidraw/src/clipboard.test.ts index 770bcc90e..3c7a60186 100644 --- a/packages/excalidraw/clipboard.test.ts +++ b/packages/excalidraw/src/clipboard.test.ts @@ -3,7 +3,7 @@ import { parseClipboard, serializeAsClipboardJSON, } from "./clipboard"; -import { API } from "./tests/helpers/api"; +import { API } from "../tests/helpers/api"; describe("parseClipboard()", () => { it("should parse JSON as plaintext if not excalidraw-api/clipboard data", async () => { diff --git a/packages/excalidraw/clipboard.ts b/packages/excalidraw/src/clipboard.ts similarity index 99% rename from packages/excalidraw/clipboard.ts rename to packages/excalidraw/src/clipboard.ts index 1e97685fd..40e4f8b96 100644 --- a/packages/excalidraw/clipboard.ts +++ b/packages/excalidraw/src/clipboard.ts @@ -22,7 +22,7 @@ import type { } from "@excalidraw/element/types"; import { ExcalidrawError } from "./errors"; -import { createFile, isSupportedImageFileType } from "./src/data/blob"; +import { createFile, isSupportedImageFileType } from "./data/blob"; import { tryParseSpreadsheet, VALID_SPREADSHEET } from "./charts"; import type { Spreadsheet } from "./charts"; diff --git a/packages/excalidraw/src/components/Actions.tsx b/packages/excalidraw/src/components/Actions.tsx index 1f1acdcd4..97b199a14 100644 --- a/packages/excalidraw/src/components/Actions.tsx +++ b/packages/excalidraw/src/components/Actions.tsx @@ -36,7 +36,7 @@ import { alignActionsPredicate } from "../actions/actionAlign"; import { trackEvent } from "../../analytics"; import { useTunnels } from "../context/tunnels"; -import { t } from "../../i18n"; +import { t } from "../i18n"; import { canChangeRoundness, canHaveArrowheads, @@ -65,12 +65,7 @@ import { LassoIcon, } from "./icons"; -import type { - AppClassProperties, - AppProps, - UIAppState, - Zoom, -} from "../../types"; +import type { AppClassProperties, AppProps, UIAppState, Zoom } from "../types"; import type { ActionManager } from "../actions/manager"; export const canChangeStrokeColor = ( diff --git a/packages/excalidraw/src/components/ActiveConfirmDialog.tsx b/packages/excalidraw/src/components/ActiveConfirmDialog.tsx index b61d9fe0a..00c6ad579 100644 --- a/packages/excalidraw/src/components/ActiveConfirmDialog.tsx +++ b/packages/excalidraw/src/components/ActiveConfirmDialog.tsx @@ -1,6 +1,6 @@ import { actionClearCanvas } from "../actions"; -import { atom, useAtom } from "../../editor-jotai"; -import { t } from "../../i18n"; +import { atom, useAtom } from "../editor-jotai"; +import { t } from "../i18n"; import { useExcalidrawActionManager } from "./App"; import ConfirmDialog from "./ConfirmDialog"; diff --git a/packages/excalidraw/src/components/App.tsx b/packages/excalidraw/src/components/App.tsx index 4f666e8e4..cb42ba703 100644 --- a/packages/excalidraw/src/components/App.tsx +++ b/packages/excalidraw/src/components/App.tsx @@ -386,19 +386,13 @@ import { isEraserActive, isHandToolActive, } from "../../appState"; -import { copyTextToSystemClipboard, parseClipboard } from "../../clipboard"; +import { copyTextToSystemClipboard, parseClipboard } from "../clipboard"; import { exportCanvas, loadFromBlob } from "../data"; import Library, { distributeLibraryItemsOnSquareGrid } from "../data/library"; import { restore, restoreElements } from "../data/restore"; -import { getCenter, getDistance } from "../../gesture"; +import { getCenter, getDistance } from "../gesture"; import { History } from "../../history"; -import { - defaultLang, - getLanguage, - languages, - setLanguage, - t, -} from "../../i18n"; +import { defaultLang, getLanguage, languages, setLanguage, t } from "../i18n"; import { calculateScrollCenter, @@ -435,8 +429,8 @@ import { } from "./hyperlink/Hyperlink"; import { Fonts } from "../../fonts"; -import { editorJotaiStore } from "../../editor-jotai"; -import { ImageSceneDataError } from "../../errors"; +import { editorJotaiStore } from "../editor-jotai"; +import { ImageSceneDataError } from "../errors"; import { getSnapLinesAtPointer, snapDraggedElements, @@ -448,7 +442,7 @@ import { getReferenceSnapPoints, SnapCache, isGridModeEnabled, -} from "../../snapping"; +} from "../snapping"; import { convertToExcalidrawElements } from "../data/transform"; import { Renderer } from "../scene/Renderer"; import { @@ -456,20 +450,17 @@ import { setCursor, resetCursor, setCursorForShape, -} from "../../cursor"; -import { Emitter } from "../../emitter"; +} from "../cursor"; +import { Emitter } from "../emitter"; import { ElementCanvasButtons } from "./ElementCanvasButtons"; -import { Store, CaptureUpdateAction } from "../../store"; +import { Store, CaptureUpdateAction } from "../store"; import { AnimatedTrail } from "../../animated-trail"; -import { LaserTrails } from "../../laser-trails"; -import { - withBatchedUpdates, - withBatchedUpdatesThrottled, -} from "../../reactUtils"; +import { LaserTrails } from "../laser-trails"; +import { withBatchedUpdates, withBatchedUpdatesThrottled } from "../reactUtils"; import { textWysiwyg } from "../../wysiwyg/textWysiwyg"; import { isOverScrollBars } from "../scene/scrollbars"; -import { isMaybeMermaidDefinition } from "../../mermaid"; +import { isMaybeMermaidDefinition } from "../mermaid"; import { LassoTrail } from "../lasso"; @@ -499,7 +490,7 @@ import type { ScrollBars, } from "../scene/types"; -import type { PastedMixedContent } from "../../clipboard"; +import type { PastedMixedContent } from "../clipboard"; import type { ExportedElements } from "../data"; import type { ContextMenuItems } from "./ContextMenu"; import type { FileSystemHandle } from "../data/filesystem"; @@ -532,7 +523,7 @@ import type { GenerateDiagramToCode, NullableGridSize, Offsets, -} from "../../types"; +} from "../types"; import type { RoughCanvas } from "roughjs/bin/canvas"; import type { Action, ActionResult } from "../actions/types"; diff --git a/packages/excalidraw/src/components/Avatar.tsx b/packages/excalidraw/src/components/Avatar.tsx index 46cca2fd3..648fb5fce 100644 --- a/packages/excalidraw/src/components/Avatar.tsx +++ b/packages/excalidraw/src/components/Avatar.tsx @@ -1,7 +1,7 @@ import clsx from "clsx"; import React, { useState } from "react"; -import { getNameInitial } from "../../clients"; +import { getNameInitial } from "../clients"; import "./Avatar.scss"; diff --git a/packages/excalidraw/src/components/ColorPicker/ColorInput.tsx b/packages/excalidraw/src/components/ColorPicker/ColorInput.tsx index 59d633360..a3f6722eb 100644 --- a/packages/excalidraw/src/components/ColorPicker/ColorInput.tsx +++ b/packages/excalidraw/src/components/ColorPicker/ColorInput.tsx @@ -3,8 +3,8 @@ import { useCallback, useEffect, useRef, useState } from "react"; import { KEYS, getShortcutKey } from "@excalidraw/common"; -import { useAtom } from "../../../editor-jotai"; -import { t } from "../../../i18n"; +import { useAtom } from "../../editor-jotai"; +import { t } from "../../i18n"; import { useDevice } from "../App"; import { activeEyeDropperAtom } from "../EyeDropper"; import { eyeDropperIcon } from "../icons"; diff --git a/packages/excalidraw/src/components/ColorPicker/ColorPicker.tsx b/packages/excalidraw/src/components/ColorPicker/ColorPicker.tsx index 6c73a53d1..eb6d82d9e 100644 --- a/packages/excalidraw/src/components/ColorPicker/ColorPicker.tsx +++ b/packages/excalidraw/src/components/ColorPicker/ColorPicker.tsx @@ -12,8 +12,8 @@ import type { ColorTuple, ColorPaletteCustom } from "@excalidraw/common"; import type { ExcalidrawElement } from "@excalidraw/element/types"; -import { useAtom } from "../../../editor-jotai"; -import { t } from "../../../i18n"; +import { useAtom } from "../../editor-jotai"; +import { t } from "../../i18n"; import { useExcalidrawContainer } from "../App"; import { ButtonSeparator } from "../ButtonSeparator"; import { activeEyeDropperAtom } from "../EyeDropper"; @@ -29,7 +29,7 @@ import "./ColorPicker.scss"; import type { ColorPickerType } from "./colorPickerUtils"; -import type { AppState } from "../../../types"; +import type { AppState } from "../../types"; const isValidColor = (color: string) => { const style = new Option().style; diff --git a/packages/excalidraw/src/components/ColorPicker/CustomColorList.tsx b/packages/excalidraw/src/components/ColorPicker/CustomColorList.tsx index a7b7e81d6..45d5db84c 100644 --- a/packages/excalidraw/src/components/ColorPicker/CustomColorList.tsx +++ b/packages/excalidraw/src/components/ColorPicker/CustomColorList.tsx @@ -1,7 +1,7 @@ import clsx from "clsx"; import { useEffect, useRef } from "react"; -import { useAtom } from "../../../editor-jotai"; +import { useAtom } from "../../editor-jotai"; import HotkeyLabel from "./HotkeyLabel"; import { activeColorPickerSectionAtom } from "./colorPickerUtils"; diff --git a/packages/excalidraw/src/components/ColorPicker/Picker.tsx b/packages/excalidraw/src/components/ColorPicker/Picker.tsx index 95513f3c2..3c54c6769 100644 --- a/packages/excalidraw/src/components/ColorPicker/Picker.tsx +++ b/packages/excalidraw/src/components/ColorPicker/Picker.tsx @@ -12,8 +12,8 @@ import type { ExcalidrawElement } from "@excalidraw/element/types"; import type { ColorPaletteCustom } from "@excalidraw/common"; -import { useAtom } from "../../../editor-jotai"; -import { t } from "../../../i18n"; +import { useAtom } from "../../editor-jotai"; +import { t } from "../../i18n"; import { CustomColorList } from "./CustomColorList"; import PickerColorList from "./PickerColorList"; diff --git a/packages/excalidraw/src/components/ColorPicker/PickerColorList.tsx b/packages/excalidraw/src/components/ColorPicker/PickerColorList.tsx index d657e3f03..38e5cf8c5 100644 --- a/packages/excalidraw/src/components/ColorPicker/PickerColorList.tsx +++ b/packages/excalidraw/src/components/ColorPicker/PickerColorList.tsx @@ -3,8 +3,8 @@ import { useEffect, useRef } from "react"; import type { ColorPaletteCustom } from "@excalidraw/common"; -import { useAtom } from "../../../editor-jotai"; -import { t } from "../../../i18n"; +import { useAtom } from "../../editor-jotai"; +import { t } from "../../i18n"; import HotkeyLabel from "./HotkeyLabel"; import { @@ -13,7 +13,7 @@ import { getColorNameAndShadeFromColor, } from "./colorPickerUtils"; -import type { TranslationKeys } from "../../../i18n"; +import type { TranslationKeys } from "../../i18n"; interface PickerColorListProps { palette: ColorPaletteCustom; diff --git a/packages/excalidraw/src/components/ColorPicker/ShadeList.tsx b/packages/excalidraw/src/components/ColorPicker/ShadeList.tsx index 392f358c5..1c8e4c4eb 100644 --- a/packages/excalidraw/src/components/ColorPicker/ShadeList.tsx +++ b/packages/excalidraw/src/components/ColorPicker/ShadeList.tsx @@ -3,8 +3,8 @@ import { useEffect, useRef } from "react"; import type { ColorPaletteCustom } from "@excalidraw/common"; -import { useAtom } from "../../../editor-jotai"; -import { t } from "../../../i18n"; +import { useAtom } from "../../editor-jotai"; +import { t } from "../../i18n"; import HotkeyLabel from "./HotkeyLabel"; import { diff --git a/packages/excalidraw/src/components/ColorPicker/colorPickerUtils.ts b/packages/excalidraw/src/components/ColorPicker/colorPickerUtils.ts index ed2a277c7..f572bd49f 100644 --- a/packages/excalidraw/src/components/ColorPicker/colorPickerUtils.ts +++ b/packages/excalidraw/src/components/ColorPicker/colorPickerUtils.ts @@ -4,7 +4,7 @@ import type { ExcalidrawElement } from "@excalidraw/element/types"; import type { ColorPickerColor, ColorPaletteCustom } from "@excalidraw/common"; -import { atom } from "../../../editor-jotai"; +import { atom } from "../../editor-jotai"; export const getColorNameAndShadeFromColor = ({ palette, diff --git a/packages/excalidraw/src/components/CommandPalette/CommandPalette.tsx b/packages/excalidraw/src/components/CommandPalette/CommandPalette.tsx index fa5db1fbe..7e92cf32c 100644 --- a/packages/excalidraw/src/components/CommandPalette/CommandPalette.tsx +++ b/packages/excalidraw/src/components/CommandPalette/CommandPalette.tsx @@ -25,9 +25,9 @@ import { import { getShortcutFromShortcutName } from "../../actions/shortcuts"; import { trackEvent } from "../../../analytics"; import { useUIAppState } from "../../context/ui-appState"; -import { deburr } from "../../../deburr"; -import { atom, useAtom, editorJotaiStore } from "../../../editor-jotai"; -import { t } from "../../../i18n"; +import { deburr } from "../../deburr"; +import { atom, useAtom, editorJotaiStore } from "../../editor-jotai"; +import { t } from "../../i18n"; import { useApp, useAppProps, @@ -62,9 +62,9 @@ import * as defaultItems from "./defaultCommandPaletteItems"; import "./CommandPalette.scss"; import type { CommandPaletteItem } from "./types"; -import type { AppProps, AppState, UIAppState } from "../../../types"; +import type { AppProps, AppState, UIAppState } from "../../types"; import type { ShortcutName } from "../../actions/shortcuts"; -import type { TranslationKeys } from "../../../i18n"; +import type { TranslationKeys } from "../../i18n"; import type { Action } from "../../actions/types"; const lastUsedPaletteItem = atom(null); diff --git a/packages/excalidraw/src/components/CommandPalette/types.ts b/packages/excalidraw/src/components/CommandPalette/types.ts index 9ddc356b5..957d69927 100644 --- a/packages/excalidraw/src/components/CommandPalette/types.ts +++ b/packages/excalidraw/src/components/CommandPalette/types.ts @@ -1,6 +1,6 @@ import type { ActionManager } from "../../actions/manager"; import type { Action } from "../../actions/types"; -import type { UIAppState } from "../../../types"; +import type { UIAppState } from "../../types"; export type CommandPaletteItem = { label: string; diff --git a/packages/excalidraw/src/components/ConfirmDialog.tsx b/packages/excalidraw/src/components/ConfirmDialog.tsx index b27246e6e..cb402dd97 100644 --- a/packages/excalidraw/src/components/ConfirmDialog.tsx +++ b/packages/excalidraw/src/components/ConfirmDialog.tsx @@ -1,7 +1,7 @@ import { flushSync } from "react-dom"; -import { useSetAtom } from "../../editor-jotai"; -import { t } from "../../i18n"; +import { useSetAtom } from "../editor-jotai"; +import { t } from "../i18n"; import { Dialog } from "./Dialog"; import DialogActionButton from "./DialogActionButton"; diff --git a/packages/excalidraw/src/components/ContextMenu.tsx b/packages/excalidraw/src/components/ContextMenu.tsx index fdc3fb7f0..3295d1d09 100644 --- a/packages/excalidraw/src/components/ContextMenu.tsx +++ b/packages/excalidraw/src/components/ContextMenu.tsx @@ -2,7 +2,7 @@ import clsx from "clsx"; import React from "react"; import { getShortcutFromShortcutName } from "../actions/shortcuts"; -import { t } from "../../i18n"; +import { t } from "../i18n"; import { useExcalidrawAppState, useExcalidrawElements } from "./App"; @@ -14,7 +14,7 @@ import type { ActionManager } from "../actions/manager"; import type { ShortcutName } from "../actions/shortcuts"; import type { Action } from "../actions/types"; -import type { TranslationKeys } from "../../i18n"; +import type { TranslationKeys } from "../i18n"; export type ContextMenuItem = typeof CONTEXT_MENU_SEPARATOR | Action; diff --git a/packages/excalidraw/src/components/DarkModeToggle.tsx b/packages/excalidraw/src/components/DarkModeToggle.tsx index c81e6e060..474181ba4 100644 --- a/packages/excalidraw/src/components/DarkModeToggle.tsx +++ b/packages/excalidraw/src/components/DarkModeToggle.tsx @@ -2,7 +2,7 @@ import { THEME } from "@excalidraw/common"; import type { Theme } from "@excalidraw/element/types"; -import { t } from "../../i18n"; +import { t } from "../i18n"; import { ToolButton } from "./ToolButton"; diff --git a/packages/excalidraw/src/components/DiagramToCodePlugin/DiagramToCodePlugin.tsx b/packages/excalidraw/src/components/DiagramToCodePlugin/DiagramToCodePlugin.tsx index 226f1f28d..e225ca193 100644 --- a/packages/excalidraw/src/components/DiagramToCodePlugin/DiagramToCodePlugin.tsx +++ b/packages/excalidraw/src/components/DiagramToCodePlugin/DiagramToCodePlugin.tsx @@ -2,7 +2,7 @@ import { useLayoutEffect } from "react"; import { useApp } from "../App"; -import type { GenerateDiagramToCode } from "../../../types"; +import type { GenerateDiagramToCode } from "../../types"; export const DiagramToCodePlugin = (props: { generate: GenerateDiagramToCode; diff --git a/packages/excalidraw/src/components/Dialog.tsx b/packages/excalidraw/src/components/Dialog.tsx index 6612fd886..00ae2be0c 100644 --- a/packages/excalidraw/src/components/Dialog.tsx +++ b/packages/excalidraw/src/components/Dialog.tsx @@ -3,9 +3,9 @@ import React, { useEffect, useState } from "react"; import { KEYS, queryFocusableElements } from "@excalidraw/common"; -import { useSetAtom } from "../../editor-jotai"; +import { useSetAtom } from "../editor-jotai"; import { useCallbackRefState } from "../hooks/useCallbackRefState"; -import { t } from "../../i18n"; +import { t } from "../i18n"; import { useExcalidrawContainer, diff --git a/packages/excalidraw/src/components/ElementCanvasButtons.tsx b/packages/excalidraw/src/components/ElementCanvasButtons.tsx index ad6ade310..faa53ce2e 100644 --- a/packages/excalidraw/src/components/ElementCanvasButtons.tsx +++ b/packages/excalidraw/src/components/ElementCanvasButtons.tsx @@ -10,7 +10,7 @@ import { useExcalidrawAppState } from "./App"; import "./ElementCanvasButtons.scss"; -import type { AppState } from "../../types"; +import type { AppState } from "../types"; const CONTAINER_PADDING = 5; diff --git a/packages/excalidraw/src/components/ElementLinkDialog.tsx b/packages/excalidraw/src/components/ElementLinkDialog.tsx index 6cb220a83..5a0b9107b 100644 --- a/packages/excalidraw/src/components/ElementLinkDialog.tsx +++ b/packages/excalidraw/src/components/ElementLinkDialog.tsx @@ -10,7 +10,7 @@ import { mutateElement } from "@excalidraw/element/mutateElement"; import type { ElementsMap, ExcalidrawElement } from "@excalidraw/element/types"; -import { t } from "../../i18n"; +import { t } from "../i18n"; import { getSelectedElements } from "../scene"; import DialogActionButton from "./DialogActionButton"; @@ -20,7 +20,7 @@ import { TrashIcon } from "./icons"; import "./ElementLinkDialog.scss"; -import type { AppProps, AppState, UIAppState } from "../../types"; +import type { AppProps, AppState, UIAppState } from "../types"; const ElementLinkDialog = ({ sourceElementId, diff --git a/packages/excalidraw/src/components/ErrorDialog.tsx b/packages/excalidraw/src/components/ErrorDialog.tsx index 1a6c7e5f2..132b292b9 100644 --- a/packages/excalidraw/src/components/ErrorDialog.tsx +++ b/packages/excalidraw/src/components/ErrorDialog.tsx @@ -1,6 +1,6 @@ import React, { useState } from "react"; -import { t } from "../../i18n"; +import { t } from "../i18n"; import { useExcalidrawContainer } from "./App"; import { Dialog } from "./Dialog"; diff --git a/packages/excalidraw/src/components/EyeDropper.tsx b/packages/excalidraw/src/components/EyeDropper.tsx index 0f118ea0d..f7f98123d 100644 --- a/packages/excalidraw/src/components/EyeDropper.tsx +++ b/packages/excalidraw/src/components/EyeDropper.tsx @@ -6,7 +6,7 @@ import { EVENT, KEYS, rgbToHex } from "@excalidraw/common"; import type { ExcalidrawElement } from "@excalidraw/element/types"; import { useUIAppState } from "../context/ui-appState"; -import { atom } from "../../editor-jotai"; +import { atom } from "../editor-jotai"; import { useCreatePortalContainer } from "../hooks/useCreatePortalContainer"; import { useOutsideClick } from "../hooks/useOutsideClick"; import { useStable } from "../hooks/useStable"; diff --git a/packages/excalidraw/src/components/FilledButton.tsx b/packages/excalidraw/src/components/FilledButton.tsx index 88d8411a1..53b30a046 100644 --- a/packages/excalidraw/src/components/FilledButton.tsx +++ b/packages/excalidraw/src/components/FilledButton.tsx @@ -3,7 +3,7 @@ import React, { forwardRef, useState } from "react"; import { isPromiseLike } from "@excalidraw/common"; -import { AbortError } from "../../errors"; +import { AbortError } from "../errors"; import Spinner from "./Spinner"; import { tablerCheckIcon } from "./icons"; diff --git a/packages/excalidraw/src/components/FollowMode/FollowMode.tsx b/packages/excalidraw/src/components/FollowMode/FollowMode.tsx index 049261336..e862cb4ea 100644 --- a/packages/excalidraw/src/components/FollowMode/FollowMode.tsx +++ b/packages/excalidraw/src/components/FollowMode/FollowMode.tsx @@ -2,7 +2,7 @@ import { CloseIcon } from "../icons"; import "./FollowMode.scss"; -import type { UserToFollow } from "../../../types"; +import type { UserToFollow } from "../../types"; interface FollowModeProps { width: number; diff --git a/packages/excalidraw/src/components/FontPicker/FontPicker.tsx b/packages/excalidraw/src/components/FontPicker/FontPicker.tsx index 17cb6bb28..546e1fa34 100644 --- a/packages/excalidraw/src/components/FontPicker/FontPicker.tsx +++ b/packages/excalidraw/src/components/FontPicker/FontPicker.tsx @@ -5,7 +5,7 @@ import { FONT_FAMILY } from "@excalidraw/common"; import type { FontFamilyValues } from "@excalidraw/element/types"; -import { t } from "../../../i18n"; +import { t } from "../../i18n"; import { ButtonIconSelect } from "../ButtonIconSelect"; import { ButtonSeparator } from "../ButtonSeparator"; import { diff --git a/packages/excalidraw/src/components/FontPicker/FontPickerList.tsx b/packages/excalidraw/src/components/FontPicker/FontPickerList.tsx index 37db582b1..8397ded57 100644 --- a/packages/excalidraw/src/components/FontPicker/FontPickerList.tsx +++ b/packages/excalidraw/src/components/FontPicker/FontPickerList.tsx @@ -19,7 +19,7 @@ import { import type { ValueOf } from "@excalidraw/common/utility-types"; import { Fonts } from "../../../fonts"; -import { t } from "../../../i18n"; +import { t } from "../../i18n"; import { useApp, useAppProps, useExcalidrawContainer } from "../App"; import { PropertiesPopover } from "../PropertiesPopover"; import { QuickSearch } from "../QuickSearch"; diff --git a/packages/excalidraw/src/components/FontPicker/FontPickerTrigger.tsx b/packages/excalidraw/src/components/FontPicker/FontPickerTrigger.tsx index 8fa4b2299..6f3cc638a 100644 --- a/packages/excalidraw/src/components/FontPicker/FontPickerTrigger.tsx +++ b/packages/excalidraw/src/components/FontPicker/FontPickerTrigger.tsx @@ -3,7 +3,7 @@ import { useMemo } from "react"; import type { FontFamilyValues } from "@excalidraw/element/types"; -import { t } from "../../../i18n"; +import { t } from "../../i18n"; import { ButtonIcon } from "../ButtonIcon"; import { TextIcon } from "../icons"; diff --git a/packages/excalidraw/src/components/HelpButton.tsx b/packages/excalidraw/src/components/HelpButton.tsx index feca06e0e..39c867cde 100644 --- a/packages/excalidraw/src/components/HelpButton.tsx +++ b/packages/excalidraw/src/components/HelpButton.tsx @@ -1,4 +1,4 @@ -import { t } from "../../i18n"; +import { t } from "../i18n"; import { HelpIcon } from "./icons"; diff --git a/packages/excalidraw/src/components/HelpDialog.tsx b/packages/excalidraw/src/components/HelpDialog.tsx index 7a05d6ebe..60fc40372 100644 --- a/packages/excalidraw/src/components/HelpDialog.tsx +++ b/packages/excalidraw/src/components/HelpDialog.tsx @@ -5,8 +5,8 @@ import { isDarwin, isFirefox, isWindows } from "@excalidraw/common"; import { KEYS, getShortcutKey } from "@excalidraw/common"; import { getShortcutFromShortcutName } from "../actions/shortcuts"; -import { probablySupportsClipboardBlob } from "../../clipboard"; -import { t } from "../../i18n"; +import { probablySupportsClipboardBlob } from "../clipboard"; +import { t } from "../i18n"; import { Dialog } from "./Dialog"; import { ExternalLinkIcon, GithubIcon, youtubeIcon } from "./icons"; diff --git a/packages/excalidraw/src/components/HintViewer.tsx b/packages/excalidraw/src/components/HintViewer.tsx index d8103a017..602c42718 100644 --- a/packages/excalidraw/src/components/HintViewer.tsx +++ b/packages/excalidraw/src/components/HintViewer.tsx @@ -12,13 +12,13 @@ import { getShortcutKey } from "@excalidraw/common"; import { isNodeInFlowchart } from "@excalidraw/element/flowchart"; -import { t } from "../../i18n"; +import { t } from "../i18n"; import { isEraserActive } from "../../appState"; -import { isGridModeEnabled } from "../../snapping"; +import { isGridModeEnabled } from "../snapping"; import "./HintViewer.scss"; -import type { AppClassProperties, Device, UIAppState } from "../../types"; +import type { AppClassProperties, Device, UIAppState } from "../types"; interface HintViewerProps { appState: UIAppState; diff --git a/packages/excalidraw/src/components/IconPicker.tsx b/packages/excalidraw/src/components/IconPicker.tsx index 696c2ebab..5630ae8d7 100644 --- a/packages/excalidraw/src/components/IconPicker.tsx +++ b/packages/excalidraw/src/components/IconPicker.tsx @@ -4,8 +4,8 @@ import React, { useEffect } from "react"; import { isArrowKey, KEYS } from "@excalidraw/common"; -import { atom, useAtom } from "../../editor-jotai"; -import { getLanguage, t } from "../../i18n"; +import { atom, useAtom } from "../editor-jotai"; +import { getLanguage, t } from "../i18n"; import Collapsible from "./Stats/Collapsible"; import { useDevice } from "./App"; diff --git a/packages/excalidraw/src/components/ImageExportDialog.tsx b/packages/excalidraw/src/components/ImageExportDialog.tsx index 5bce6806c..e8e0b70f4 100644 --- a/packages/excalidraw/src/components/ImageExportDialog.tsx +++ b/packages/excalidraw/src/components/ImageExportDialog.tsx @@ -18,13 +18,13 @@ import { actionChangeExportScale, actionChangeProjectName, } from "../actions/actionExport"; -import { probablySupportsClipboardBlob } from "../../clipboard"; +import { probablySupportsClipboardBlob } from "../clipboard"; import { prepareElementsForExport } from "../data"; import { canvasToBlob } from "../data/blob"; import { nativeFileSystemSupported } from "../data/filesystem"; import { useCopyStatus } from "../hooks/useCopiedIndicator"; -import { t } from "../../i18n"; +import { t } from "../i18n"; import { isSomeElementSelected } from "../scene"; import { copyIcon, downloadIcon, helpIcon } from "./icons"; @@ -38,7 +38,7 @@ import "./ImageExportDialog.scss"; import type { ActionManager } from "../actions/manager"; -import type { AppClassProperties, BinaryFiles, UIAppState } from "../../types"; +import type { AppClassProperties, BinaryFiles, UIAppState } from "../types"; const supportsContextFilters = "filter" in document.createElement("canvas").getContext("2d")!; diff --git a/packages/excalidraw/src/components/InitializeApp.tsx b/packages/excalidraw/src/components/InitializeApp.tsx index 35b0846ec..1e5dda6dc 100644 --- a/packages/excalidraw/src/components/InitializeApp.tsx +++ b/packages/excalidraw/src/components/InitializeApp.tsx @@ -2,11 +2,11 @@ import React, { useEffect, useState } from "react"; import type { Theme } from "@excalidraw/element/types"; -import { defaultLang, languages, setLanguage } from "../../i18n"; +import { defaultLang, languages, setLanguage } from "../i18n"; import { LoadingMessage } from "./LoadingMessage"; -import type { Language } from "../../i18n"; +import type { Language } from "../i18n"; interface Props { langCode: Language["code"]; diff --git a/packages/excalidraw/src/components/JSONExportDialog.tsx b/packages/excalidraw/src/components/JSONExportDialog.tsx index 426720e66..b9c8d9577 100644 --- a/packages/excalidraw/src/components/JSONExportDialog.tsx +++ b/packages/excalidraw/src/components/JSONExportDialog.tsx @@ -8,7 +8,7 @@ import { actionSaveFileToDisk } from "../actions/actionExport"; import { trackEvent } from "../../analytics"; import { nativeFileSystemSupported } from "../data/filesystem"; -import { t } from "../../i18n"; +import { t } from "../i18n"; import { Card } from "./Card"; import { Dialog } from "./Dialog"; @@ -19,7 +19,7 @@ import "./ExportDialog.scss"; import type { ActionManager } from "../actions/manager"; -import type { ExportOpts, BinaryFiles, UIAppState } from "../../types"; +import type { ExportOpts, BinaryFiles, UIAppState } from "../types"; export type ExportCB = ( elements: readonly NonDeletedExcalidrawElement[], diff --git a/packages/excalidraw/src/components/LayerUI.tsx b/packages/excalidraw/src/components/LayerUI.tsx index 5e33c0554..b710acf41 100644 --- a/packages/excalidraw/src/components/LayerUI.tsx +++ b/packages/excalidraw/src/components/LayerUI.tsx @@ -23,9 +23,9 @@ import { trackEvent } from "../../analytics"; import { isHandToolActive } from "../../appState"; import { TunnelsContext, useInitializeTunnels } from "../context/tunnels"; import { UIAppStateContext } from "../context/ui-appState"; -import { useAtom, useAtomValue } from "../../editor-jotai"; +import { useAtom, useAtomValue } from "../editor-jotai"; -import { t } from "../../i18n"; +import { t } from "../i18n"; import { calculateScrollCenter } from "../scene"; import { SelectedShapeActions, ShapesSwitcher } from "./Actions"; @@ -64,7 +64,7 @@ import "./Toolbar.scss"; import type { ActionManager } from "../actions/manager"; -import type { Language } from "../../i18n"; +import type { Language } from "../i18n"; import type { AppProps, AppState, @@ -72,7 +72,7 @@ import type { BinaryFiles, UIAppState, AppClassProperties, -} from "../../types"; +} from "../types"; interface LayerUIProps { actionManager: ActionManager; diff --git a/packages/excalidraw/src/components/LibraryMenu.tsx b/packages/excalidraw/src/components/LibraryMenu.tsx index 32c0fd68e..35d0af4bf 100644 --- a/packages/excalidraw/src/components/LibraryMenu.tsx +++ b/packages/excalidraw/src/components/LibraryMenu.tsx @@ -24,8 +24,8 @@ import { distributeLibraryItemsOnSquareGrid, libraryItemsAtom, } from "../data/library"; -import { atom, useAtom } from "../../editor-jotai"; -import { t } from "../../i18n"; +import { atom, useAtom } from "../editor-jotai"; +import { t } from "../i18n"; import { getSelectedElements } from "../scene"; @@ -47,7 +47,7 @@ import type { ExcalidrawProps, UIAppState, AppClassProperties, -} from "../../types"; +} from "../types"; import type Library from "../data/library"; export const isLibraryMenuOpenAtom = atom(false); diff --git a/packages/excalidraw/src/components/LibraryMenuBrowseButton.tsx b/packages/excalidraw/src/components/LibraryMenuBrowseButton.tsx index 273570e40..86bd4e2ad 100644 --- a/packages/excalidraw/src/components/LibraryMenuBrowseButton.tsx +++ b/packages/excalidraw/src/components/LibraryMenuBrowseButton.tsx @@ -1,8 +1,8 @@ import { VERSIONS } from "@excalidraw/common"; -import { t } from "../../i18n"; +import { t } from "../i18n"; -import type { ExcalidrawProps, UIAppState } from "../../types"; +import type { ExcalidrawProps, UIAppState } from "../types"; const LibraryMenuBrowseButton = ({ theme, diff --git a/packages/excalidraw/src/components/LibraryMenuControlButtons.tsx b/packages/excalidraw/src/components/LibraryMenuControlButtons.tsx index e04a8bcff..1ea722168 100644 --- a/packages/excalidraw/src/components/LibraryMenuControlButtons.tsx +++ b/packages/excalidraw/src/components/LibraryMenuControlButtons.tsx @@ -2,7 +2,7 @@ import clsx from "clsx"; import LibraryMenuBrowseButton from "./LibraryMenuBrowseButton"; -import type { ExcalidrawProps, UIAppState } from "../../types"; +import type { ExcalidrawProps, UIAppState } from "../types"; export const LibraryMenuControlButtons = ({ libraryReturnUrl, diff --git a/packages/excalidraw/src/components/LibraryMenuHeaderContent.tsx b/packages/excalidraw/src/components/LibraryMenuHeaderContent.tsx index 3b07eb094..5b003effa 100644 --- a/packages/excalidraw/src/components/LibraryMenuHeaderContent.tsx +++ b/packages/excalidraw/src/components/LibraryMenuHeaderContent.tsx @@ -7,9 +7,9 @@ import { useUIAppState } from "../context/ui-appState"; import { fileOpen } from "../data/filesystem"; import { saveLibraryAsJSON } from "../data/json"; import { libraryItemsAtom } from "../data/library"; -import { useAtom } from "../../editor-jotai"; +import { useAtom } from "../editor-jotai"; import { useLibraryCache } from "../hooks/useLibraryItemSvg"; -import { t } from "../../i18n"; +import { t } from "../i18n"; import { useApp, useExcalidrawSetAppState } from "./App"; import ConfirmDialog from "./ConfirmDialog"; @@ -28,7 +28,7 @@ import { } from "./icons"; import type Library from "../data/library"; -import type { LibraryItem, LibraryItems, UIAppState } from "../../types"; +import type { LibraryItem, LibraryItems, UIAppState } from "../types"; const getSelectedItems = ( libraryItems: LibraryItems, diff --git a/packages/excalidraw/src/components/LibraryMenuItems.tsx b/packages/excalidraw/src/components/LibraryMenuItems.tsx index 41fad7b53..f70315953 100644 --- a/packages/excalidraw/src/components/LibraryMenuItems.tsx +++ b/packages/excalidraw/src/components/LibraryMenuItems.tsx @@ -13,7 +13,7 @@ import { duplicateElements } from "@excalidraw/element/duplicate"; import { serializeLibraryAsJSON } from "../data/json"; import { useLibraryCache } from "../hooks/useLibraryItemSvg"; import { useScrollPosition } from "../hooks/useScrollPosition"; -import { t } from "../../i18n"; +import { t } from "../i18n"; import { LibraryMenuControlButtons } from "./LibraryMenuControlButtons"; import { LibraryDropdownMenu } from "./LibraryMenuHeaderContent"; @@ -32,7 +32,7 @@ import type { LibraryItem, LibraryItems, UIAppState, -} from "../../types"; +} from "../types"; // using an odd number of items per batch so the rendering creates an irregular // pattern which looks more organic diff --git a/packages/excalidraw/src/components/LibraryMenuSection.tsx b/packages/excalidraw/src/components/LibraryMenuSection.tsx index 16d2eb501..d98b413fb 100644 --- a/packages/excalidraw/src/components/LibraryMenuSection.tsx +++ b/packages/excalidraw/src/components/LibraryMenuSection.tsx @@ -7,7 +7,7 @@ import { useTransition } from "../hooks/useTransition"; import { EmptyLibraryUnit, LibraryUnit } from "./LibraryUnit"; import type { SvgCache } from "../hooks/useLibraryItemSvg"; -import type { LibraryItem } from "../../types"; +import type { LibraryItem } from "../types"; import type { ReactNode } from "react"; type LibraryOrPendingItem = ( diff --git a/packages/excalidraw/src/components/LibraryUnit.tsx b/packages/excalidraw/src/components/LibraryUnit.tsx index b1d8ac3c0..9cd891715 100644 --- a/packages/excalidraw/src/components/LibraryUnit.tsx +++ b/packages/excalidraw/src/components/LibraryUnit.tsx @@ -9,7 +9,7 @@ import { PlusIcon } from "./icons"; import "./LibraryUnit.scss"; -import type { LibraryItem } from "../../types"; +import type { LibraryItem } from "../types"; import type { SvgCache } from "../hooks/useLibraryItemSvg"; export const LibraryUnit = memo( diff --git a/packages/excalidraw/src/components/LoadingMessage.tsx b/packages/excalidraw/src/components/LoadingMessage.tsx index a2b2855cf..c971b37ee 100644 --- a/packages/excalidraw/src/components/LoadingMessage.tsx +++ b/packages/excalidraw/src/components/LoadingMessage.tsx @@ -5,7 +5,7 @@ import { THEME } from "@excalidraw/common"; import type { Theme } from "@excalidraw/element/types"; -import { t } from "../../i18n"; +import { t } from "../i18n"; import Spinner from "./Spinner"; diff --git a/packages/excalidraw/src/components/MobileMenu.tsx b/packages/excalidraw/src/components/MobileMenu.tsx index 76c56083d..641e9d96d 100644 --- a/packages/excalidraw/src/components/MobileMenu.tsx +++ b/packages/excalidraw/src/components/MobileMenu.tsx @@ -6,7 +6,7 @@ import type { NonDeletedExcalidrawElement } from "@excalidraw/element/types"; import { isHandToolActive } from "../../appState"; import { useTunnels } from "../context/tunnels"; -import { t } from "../../i18n"; +import { t } from "../i18n"; import { calculateScrollCenter } from "../scene"; import { SCROLLBAR_WIDTH, SCROLLBAR_MARGIN } from "../scene/scrollbars"; @@ -28,7 +28,7 @@ import type { Device, ExcalidrawProps, UIAppState, -} from "../../types"; +} from "../types"; import type { JSX } from "react"; type MobileMenuProps = { diff --git a/packages/excalidraw/src/components/Modal.tsx b/packages/excalidraw/src/components/Modal.tsx index ef82885d5..32f42986f 100644 --- a/packages/excalidraw/src/components/Modal.tsx +++ b/packages/excalidraw/src/components/Modal.tsx @@ -8,7 +8,7 @@ import { useCreatePortalContainer } from "../hooks/useCreatePortalContainer"; import "./Modal.scss"; -import type { AppState } from "../../types"; +import type { AppState } from "../types"; export const Modal: React.FC<{ className?: string; diff --git a/packages/excalidraw/src/components/OverwriteConfirm/OverwriteConfirm.tsx b/packages/excalidraw/src/components/OverwriteConfirm/OverwriteConfirm.tsx index 8fef7cdf9..f2de877e0 100644 --- a/packages/excalidraw/src/components/OverwriteConfirm/OverwriteConfirm.tsx +++ b/packages/excalidraw/src/components/OverwriteConfirm/OverwriteConfirm.tsx @@ -1,7 +1,7 @@ import React from "react"; import { useTunnels } from "../../context/tunnels"; -import { useAtom } from "../../../editor-jotai"; +import { useAtom } from "../../editor-jotai"; import { Dialog } from "../Dialog"; import { FilledButton } from "../FilledButton"; import { withInternalFallback } from "../hoc/withInternalFallback"; diff --git a/packages/excalidraw/src/components/OverwriteConfirm/OverwriteConfirmActions.tsx b/packages/excalidraw/src/components/OverwriteConfirm/OverwriteConfirmActions.tsx index 70066df08..e5fb56d85 100644 --- a/packages/excalidraw/src/components/OverwriteConfirm/OverwriteConfirmActions.tsx +++ b/packages/excalidraw/src/components/OverwriteConfirm/OverwriteConfirmActions.tsx @@ -2,7 +2,7 @@ import React from "react"; import { actionSaveFileToDisk } from "../../actions"; import { actionChangeExportEmbedScene } from "../../actions/actionExport"; -import { useI18n } from "../../../i18n"; +import { useI18n } from "../../i18n"; import { useExcalidrawActionManager, useExcalidrawSetAppState } from "../App"; import { FilledButton } from "../FilledButton"; diff --git a/packages/excalidraw/src/components/OverwriteConfirm/OverwriteConfirmState.ts b/packages/excalidraw/src/components/OverwriteConfirm/OverwriteConfirmState.ts index 8a8010da1..cefb2153a 100644 --- a/packages/excalidraw/src/components/OverwriteConfirm/OverwriteConfirmState.ts +++ b/packages/excalidraw/src/components/OverwriteConfirm/OverwriteConfirmState.ts @@ -1,4 +1,4 @@ -import { atom, editorJotaiStore } from "../../../editor-jotai"; +import { atom, editorJotaiStore } from "../../editor-jotai"; import type React from "react"; diff --git a/packages/excalidraw/src/components/PasteChartDialog.tsx b/packages/excalidraw/src/components/PasteChartDialog.tsx index 5716f16f9..abac47d0a 100644 --- a/packages/excalidraw/src/components/PasteChartDialog.tsx +++ b/packages/excalidraw/src/components/PasteChartDialog.tsx @@ -4,8 +4,8 @@ import React, { useLayoutEffect, useRef, useState } from "react"; import type { ChartType } from "@excalidraw/element/types"; import { trackEvent } from "../../analytics"; -import { renderSpreadsheet } from "../../charts"; -import { t } from "../../i18n"; +import { renderSpreadsheet } from "../charts"; +import { t } from "../i18n"; import { exportToSvg } from "../scene/export"; import { useApp } from "./App"; @@ -13,8 +13,8 @@ import { Dialog } from "./Dialog"; import "./PasteChartDialog.scss"; -import type { ChartElements, Spreadsheet } from "../../charts"; -import type { UIAppState } from "../../types"; +import type { ChartElements, Spreadsheet } from "../charts"; +import type { UIAppState } from "../types"; type OnInsertChart = (chartType: ChartType, elements: ChartElements) => void; diff --git a/packages/excalidraw/src/components/PublishLibrary.tsx b/packages/excalidraw/src/components/PublishLibrary.tsx index f9a3455b9..c1db91296 100644 --- a/packages/excalidraw/src/components/PublishLibrary.tsx +++ b/packages/excalidraw/src/components/PublishLibrary.tsx @@ -13,7 +13,7 @@ import { import { EditorLocalStorage } from "../data/EditorLocalStorage"; import { canvasToBlob, resizeImageFile } from "../data/blob"; -import { t } from "../../i18n"; +import { t } from "../i18n"; import { Dialog } from "./Dialog"; import DialogActionButton from "./DialogActionButton"; @@ -25,7 +25,7 @@ import "./PublishLibrary.scss"; import type { ReactNode } from "react"; import type { ExportedLibraryData } from "../data/types"; -import type { LibraryItems, LibraryItem, UIAppState } from "../../types"; +import type { LibraryItems, LibraryItem, UIAppState } from "../types"; interface PublishLibraryDataParams { authorName: string; diff --git a/packages/excalidraw/src/components/Range.tsx b/packages/excalidraw/src/components/Range.tsx index 4a2c6b7ad..3ab9ede15 100644 --- a/packages/excalidraw/src/components/Range.tsx +++ b/packages/excalidraw/src/components/Range.tsx @@ -1,7 +1,7 @@ import React, { useEffect } from "react"; import { getFormValue } from "../actions/actionProperties"; -import { t } from "../../i18n"; +import { t } from "../i18n"; import "./Range.scss"; diff --git a/packages/excalidraw/src/components/SearchMenu.tsx b/packages/excalidraw/src/components/SearchMenu.tsx index e89350473..3e0b31a69 100644 --- a/packages/excalidraw/src/components/SearchMenu.tsx +++ b/packages/excalidraw/src/components/SearchMenu.tsx @@ -21,10 +21,10 @@ import { isTextElement } from "@excalidraw/element/typeChecks"; import type { ExcalidrawTextElement } from "@excalidraw/element/types"; -import { atom, useAtom } from "../../editor-jotai"; +import { atom, useAtom } from "../editor-jotai"; import { useStable } from "../hooks/useStable"; -import { t } from "../../i18n"; +import { t } from "../i18n"; import { useApp, useExcalidrawSetAppState } from "./App"; import { Button } from "./Button"; @@ -33,7 +33,7 @@ import { collapseDownIcon, upIcon, searchIcon } from "./icons"; import "./SearchMenu.scss"; -import type { AppClassProperties } from "../../types"; +import type { AppClassProperties } from "../types"; const searchQueryAtom = atom(""); export const searchItemInFocusAtom = atom(null); diff --git a/packages/excalidraw/src/components/Section.tsx b/packages/excalidraw/src/components/Section.tsx index db2458414..e7e357bb5 100644 --- a/packages/excalidraw/src/components/Section.tsx +++ b/packages/excalidraw/src/components/Section.tsx @@ -1,6 +1,6 @@ import React from "react"; -import { t } from "../../i18n"; +import { t } from "../i18n"; import { useExcalidrawContainer } from "./App"; diff --git a/packages/excalidraw/src/components/ShareableLinkDialog.tsx b/packages/excalidraw/src/components/ShareableLinkDialog.tsx index 0b2540f5e..514a77632 100644 --- a/packages/excalidraw/src/components/ShareableLinkDialog.tsx +++ b/packages/excalidraw/src/components/ShareableLinkDialog.tsx @@ -1,8 +1,8 @@ import { useRef, useState } from "react"; -import { copyTextToSystemClipboard } from "../../clipboard"; +import { copyTextToSystemClipboard } from "../clipboard"; import { useCopyStatus } from "../hooks/useCopiedIndicator"; -import { useI18n } from "../../i18n"; +import { useI18n } from "../i18n"; import { Dialog } from "./Dialog"; import { FilledButton } from "./FilledButton"; diff --git a/packages/excalidraw/src/components/Sidebar/Sidebar.tsx b/packages/excalidraw/src/components/Sidebar/Sidebar.tsx index 4f8e27d58..d08ba5f59 100644 --- a/packages/excalidraw/src/components/Sidebar/Sidebar.tsx +++ b/packages/excalidraw/src/components/Sidebar/Sidebar.tsx @@ -12,7 +12,7 @@ import React, { import { EVENT, isDevEnv, KEYS, updateObject } from "@excalidraw/common"; import { useUIAppState } from "../../context/ui-appState"; -import { atom, useSetAtom } from "../../../editor-jotai"; +import { atom, useSetAtom } from "../../editor-jotai"; import { useOutsideClick } from "../../hooks/useOutsideClick"; import { useDevice, useExcalidrawSetAppState } from "../App"; import { Island } from "../Island"; diff --git a/packages/excalidraw/src/components/Sidebar/SidebarHeader.tsx b/packages/excalidraw/src/components/Sidebar/SidebarHeader.tsx index 7c12a0533..9c9e51cf5 100644 --- a/packages/excalidraw/src/components/Sidebar/SidebarHeader.tsx +++ b/packages/excalidraw/src/components/Sidebar/SidebarHeader.tsx @@ -1,7 +1,7 @@ import clsx from "clsx"; import { useContext } from "react"; -import { t } from "../../../i18n"; +import { t } from "../../i18n"; import { useDevice } from "../App"; import { Button } from "../Button"; import { Tooltip } from "../Tooltip"; diff --git a/packages/excalidraw/src/components/Sidebar/SidebarTab.tsx b/packages/excalidraw/src/components/Sidebar/SidebarTab.tsx index 50623e186..0525662f7 100644 --- a/packages/excalidraw/src/components/Sidebar/SidebarTab.tsx +++ b/packages/excalidraw/src/components/Sidebar/SidebarTab.tsx @@ -1,6 +1,6 @@ import * as RadixTabs from "@radix-ui/react-tabs"; -import type { SidebarTabName } from "../../../types"; +import type { SidebarTabName } from "../../types"; export const SidebarTab = ({ tab, diff --git a/packages/excalidraw/src/components/Sidebar/SidebarTabTrigger.tsx b/packages/excalidraw/src/components/Sidebar/SidebarTabTrigger.tsx index c800273e3..9f2c09bcc 100644 --- a/packages/excalidraw/src/components/Sidebar/SidebarTabTrigger.tsx +++ b/packages/excalidraw/src/components/Sidebar/SidebarTabTrigger.tsx @@ -1,6 +1,6 @@ import * as RadixTabs from "@radix-ui/react-tabs"; -import type { SidebarTabName } from "../../../types"; +import type { SidebarTabName } from "../../types"; export const SidebarTabTrigger = ({ children, diff --git a/packages/excalidraw/src/components/Sidebar/common.ts b/packages/excalidraw/src/components/Sidebar/common.ts index 58792f555..239b16fc9 100644 --- a/packages/excalidraw/src/components/Sidebar/common.ts +++ b/packages/excalidraw/src/components/Sidebar/common.ts @@ -1,6 +1,6 @@ import React from "react"; -import type { AppState, SidebarName, SidebarTabName } from "../../../types"; +import type { AppState, SidebarName, SidebarTabName } from "../../types"; import type { JSX } from "react"; export type SidebarTriggerProps = { diff --git a/packages/excalidraw/src/components/Stats/Angle.tsx b/packages/excalidraw/src/components/Stats/Angle.tsx index 974698029..67693551f 100644 --- a/packages/excalidraw/src/components/Stats/Angle.tsx +++ b/packages/excalidraw/src/components/Stats/Angle.tsx @@ -16,7 +16,7 @@ import { getStepSizedValue, isPropertyEditable, updateBindings } from "./utils"; import type { DragInputCallbackType } from "./DragInput"; import type Scene from "../../scene/Scene"; -import type { AppState } from "../../../types"; +import type { AppState } from "../../types"; interface AngleProps { element: ExcalidrawElement; diff --git a/packages/excalidraw/src/components/Stats/CanvasGrid.tsx b/packages/excalidraw/src/components/Stats/CanvasGrid.tsx index cbbee4ead..4611365f4 100644 --- a/packages/excalidraw/src/components/Stats/CanvasGrid.tsx +++ b/packages/excalidraw/src/components/Stats/CanvasGrid.tsx @@ -4,7 +4,7 @@ import StatsDragInput from "./DragInput"; import { getStepSizedValue } from "./utils"; import type Scene from "../../scene/Scene"; -import type { AppState } from "../../../types"; +import type { AppState } from "../../types"; interface PositionProps { property: "gridStep"; diff --git a/packages/excalidraw/src/components/Stats/Dimension.tsx b/packages/excalidraw/src/components/Stats/Dimension.tsx index 5e36b5f08..142abc407 100644 --- a/packages/excalidraw/src/components/Stats/Dimension.tsx +++ b/packages/excalidraw/src/components/Stats/Dimension.tsx @@ -16,7 +16,7 @@ import { getStepSizedValue, isPropertyEditable } from "./utils"; import type { DragInputCallbackType } from "./DragInput"; import type Scene from "../../scene/Scene"; -import type { AppState } from "../../../types"; +import type { AppState } from "../../types"; interface DimensionDragInputProps { property: "width" | "height"; diff --git a/packages/excalidraw/src/components/Stats/DragInput.tsx b/packages/excalidraw/src/components/Stats/DragInput.tsx index fc35b8b17..b4795308d 100644 --- a/packages/excalidraw/src/components/Stats/DragInput.tsx +++ b/packages/excalidraw/src/components/Stats/DragInput.tsx @@ -7,7 +7,7 @@ import { deepCopyElement } from "@excalidraw/element/duplicate"; import type { ElementsMap, ExcalidrawElement } from "@excalidraw/element/types"; -import { CaptureUpdateAction } from "../../../store"; +import { CaptureUpdateAction } from "../../store"; import { useApp } from "../App"; import { InlineIcon } from "../InlineIcon"; @@ -17,7 +17,7 @@ import "./DragInput.scss"; import type { StatsInputProperty } from "./utils"; import type Scene from "../../scene/Scene"; -import type { AppState } from "../../../types"; +import type { AppState } from "../../types"; export type DragInputCallbackType< P extends StatsInputProperty, diff --git a/packages/excalidraw/src/components/Stats/FontSize.tsx b/packages/excalidraw/src/components/Stats/FontSize.tsx index 5f348b92b..90bdee564 100644 --- a/packages/excalidraw/src/components/Stats/FontSize.tsx +++ b/packages/excalidraw/src/components/Stats/FontSize.tsx @@ -20,7 +20,7 @@ import { getStepSizedValue } from "./utils"; import type { DragInputCallbackType } from "./DragInput"; import type Scene from "../../scene/Scene"; -import type { AppState } from "../../../types"; +import type { AppState } from "../../types"; interface FontSizeProps { element: ExcalidrawElement; diff --git a/packages/excalidraw/src/components/Stats/MultiAngle.tsx b/packages/excalidraw/src/components/Stats/MultiAngle.tsx index 1b2aa0cc4..3cabd19c0 100644 --- a/packages/excalidraw/src/components/Stats/MultiAngle.tsx +++ b/packages/excalidraw/src/components/Stats/MultiAngle.tsx @@ -18,7 +18,7 @@ import { getStepSizedValue, isPropertyEditable } from "./utils"; import type { DragInputCallbackType } from "./DragInput"; import type Scene from "../../scene/Scene"; -import type { AppState } from "../../../types"; +import type { AppState } from "../../types"; interface MultiAngleProps { elements: readonly ExcalidrawElement[]; diff --git a/packages/excalidraw/src/components/Stats/MultiDimension.tsx b/packages/excalidraw/src/components/Stats/MultiDimension.tsx index b40ac475e..b482611af 100644 --- a/packages/excalidraw/src/components/Stats/MultiDimension.tsx +++ b/packages/excalidraw/src/components/Stats/MultiDimension.tsx @@ -30,7 +30,7 @@ import { getElementsInAtomicUnit } from "./utils"; import type { DragInputCallbackType } from "./DragInput"; import type { AtomicUnit } from "./utils"; import type Scene from "../../scene/Scene"; -import type { AppState } from "../../../types"; +import type { AppState } from "../../types"; interface MultiDimensionProps { property: "width" | "height"; diff --git a/packages/excalidraw/src/components/Stats/MultiFontSize.tsx b/packages/excalidraw/src/components/Stats/MultiFontSize.tsx index d31960907..6bac4bd3c 100644 --- a/packages/excalidraw/src/components/Stats/MultiFontSize.tsx +++ b/packages/excalidraw/src/components/Stats/MultiFontSize.tsx @@ -23,7 +23,7 @@ import { getStepSizedValue } from "./utils"; import type { DragInputCallbackType } from "./DragInput"; import type Scene from "../../scene/Scene"; -import type { AppState } from "../../../types"; +import type { AppState } from "../../types"; interface MultiFontSizeProps { elements: readonly ExcalidrawElement[]; diff --git a/packages/excalidraw/src/components/Stats/MultiPosition.tsx b/packages/excalidraw/src/components/Stats/MultiPosition.tsx index 7a14eeaed..98058efec 100644 --- a/packages/excalidraw/src/components/Stats/MultiPosition.tsx +++ b/packages/excalidraw/src/components/Stats/MultiPosition.tsx @@ -19,7 +19,7 @@ import { getElementsInAtomicUnit, moveElement } from "./utils"; import type { DragInputCallbackType } from "./DragInput"; import type { AtomicUnit } from "./utils"; import type Scene from "../../scene/Scene"; -import type { AppState } from "../../../types"; +import type { AppState } from "../../types"; interface MultiPositionProps { property: "x" | "y"; diff --git a/packages/excalidraw/src/components/Stats/Position.tsx b/packages/excalidraw/src/components/Stats/Position.tsx index b294fdd84..bf6dfd161 100644 --- a/packages/excalidraw/src/components/Stats/Position.tsx +++ b/packages/excalidraw/src/components/Stats/Position.tsx @@ -14,7 +14,7 @@ import { getStepSizedValue, moveElement } from "./utils"; import type { DragInputCallbackType } from "./DragInput"; import type Scene from "../../scene/Scene"; -import type { AppState } from "../../../types"; +import type { AppState } from "../../types"; interface PositionProps { property: "x" | "y"; diff --git a/packages/excalidraw/src/components/Stats/index.tsx b/packages/excalidraw/src/components/Stats/index.tsx index 72d736cf2..11a5d6b5d 100644 --- a/packages/excalidraw/src/components/Stats/index.tsx +++ b/packages/excalidraw/src/components/Stats/index.tsx @@ -14,8 +14,8 @@ import { elementsAreInSameGroup } from "@excalidraw/element/groups"; import type { NonDeletedExcalidrawElement } from "@excalidraw/element/types"; -import { t } from "../../../i18n"; -import { isGridModeEnabled } from "../../../snapping"; +import { t } from "../../i18n"; +import { isGridModeEnabled } from "../../snapping"; import { useExcalidrawAppState, useExcalidrawSetAppState } from "../App"; import { Island } from "../Island"; import { CloseIcon } from "../icons"; @@ -38,7 +38,7 @@ import type { AppClassProperties, AppState, ExcalidrawProps, -} from "../../../types"; +} from "../../types"; interface StatsProps { app: AppClassProperties; diff --git a/packages/excalidraw/src/components/Stats/utils.ts b/packages/excalidraw/src/components/Stats/utils.ts index 4ae7428e7..dbb47a234 100644 --- a/packages/excalidraw/src/components/Stats/utils.ts +++ b/packages/excalidraw/src/components/Stats/utils.ts @@ -28,7 +28,7 @@ import type { } from "@excalidraw/element/types"; import type Scene from "../../scene/Scene"; -import type { AppState } from "../../../types"; +import type { AppState } from "../../types"; export type StatsInputProperty = | "x" diff --git a/packages/excalidraw/src/components/TTDDialog/MermaidToExcalidraw.tsx b/packages/excalidraw/src/components/TTDDialog/MermaidToExcalidraw.tsx index f6cd393be..8a4f92840 100644 --- a/packages/excalidraw/src/components/TTDDialog/MermaidToExcalidraw.tsx +++ b/packages/excalidraw/src/components/TTDDialog/MermaidToExcalidraw.tsx @@ -7,7 +7,7 @@ import type { NonDeletedExcalidrawElement } from "@excalidraw/element/types"; import { useApp } from "../App"; import { ArrowRightIcon } from "../icons"; import { EditorLocalStorage } from "../../data/EditorLocalStorage"; -import { t } from "../../../i18n"; +import { t } from "../../i18n"; import Trans from "../Trans"; import { TTDDialogInput } from "./TTDDialogInput"; @@ -23,7 +23,7 @@ import { import "./MermaidToExcalidraw.scss"; -import type { BinaryFiles } from "../../../types"; +import type { BinaryFiles } from "../../types"; import type { MermaidToExcalidrawLibProps } from "./common"; const MERMAID_EXAMPLE = diff --git a/packages/excalidraw/src/components/TTDDialog/TTDDialog.tsx b/packages/excalidraw/src/components/TTDDialog/TTDDialog.tsx index 96821a4ce..e50e87cc9 100644 --- a/packages/excalidraw/src/components/TTDDialog/TTDDialog.tsx +++ b/packages/excalidraw/src/components/TTDDialog/TTDDialog.tsx @@ -6,8 +6,8 @@ import type { NonDeletedExcalidrawElement } from "@excalidraw/element/types"; import { trackEvent } from "../../../analytics"; import { useUIAppState } from "../../context/ui-appState"; -import { atom, useAtom } from "../../../editor-jotai"; -import { t } from "../../../i18n"; +import { atom, useAtom } from "../../editor-jotai"; +import { t } from "../../i18n"; import { useApp, useExcalidrawSetAppState } from "../App"; import { Dialog } from "../Dialog"; import { InlineIcon } from "../InlineIcon"; @@ -36,7 +36,7 @@ import "./TTDDialog.scss"; import type { ChangeEventHandler } from "react"; import type { MermaidToExcalidrawLibProps } from "./common"; -import type { BinaryFiles } from "../../../types"; +import type { BinaryFiles } from "../../types"; const MIN_PROMPT_LENGTH = 3; const MAX_PROMPT_LENGTH = 1000; diff --git a/packages/excalidraw/src/components/TTDDialog/TTDDialogTrigger.tsx b/packages/excalidraw/src/components/TTDDialog/TTDDialogTrigger.tsx index 5f2881199..a0e8a4865 100644 --- a/packages/excalidraw/src/components/TTDDialog/TTDDialogTrigger.tsx +++ b/packages/excalidraw/src/components/TTDDialog/TTDDialogTrigger.tsx @@ -1,6 +1,6 @@ import { trackEvent } from "../../../analytics"; import { useTunnels } from "../../context/tunnels"; -import { t } from "../../../i18n"; +import { t } from "../../i18n"; import { useExcalidrawSetAppState } from "../App"; import DropdownMenu from "../dropdownMenu/DropdownMenu"; import { brainIcon } from "../icons"; diff --git a/packages/excalidraw/src/components/TTDDialog/common.ts b/packages/excalidraw/src/components/TTDDialog/common.ts index 111c310fc..2e59565cf 100644 --- a/packages/excalidraw/src/components/TTDDialog/common.ts +++ b/packages/excalidraw/src/components/TTDDialog/common.ts @@ -7,10 +7,10 @@ import type { NonDeletedExcalidrawElement } from "@excalidraw/element/types"; import { EditorLocalStorage } from "../../data/EditorLocalStorage"; import { canvasToBlob } from "../../data/blob"; -import { t } from "../../../i18n"; -import { convertToExcalidrawElements, exportToCanvas } from "../../../index"; +import { t } from "../../i18n"; +import { convertToExcalidrawElements, exportToCanvas } from "../../index"; -import type { AppClassProperties, BinaryFiles } from "../../../types"; +import type { AppClassProperties, BinaryFiles } from "../../types"; const resetPreview = ({ canvasRef, diff --git a/packages/excalidraw/src/components/ToolButton.tsx b/packages/excalidraw/src/components/ToolButton.tsx index b9d56275b..f833a6d1f 100644 --- a/packages/excalidraw/src/components/ToolButton.tsx +++ b/packages/excalidraw/src/components/ToolButton.tsx @@ -5,7 +5,7 @@ import { isPromiseLike } from "@excalidraw/common"; import type { PointerType } from "@excalidraw/element/types"; -import { AbortError } from "../../errors"; +import { AbortError } from "../errors"; import "./ToolIcon.scss"; diff --git a/packages/excalidraw/src/components/Trans.tsx b/packages/excalidraw/src/components/Trans.tsx index d55b4d072..7a6215c89 100644 --- a/packages/excalidraw/src/components/Trans.tsx +++ b/packages/excalidraw/src/components/Trans.tsx @@ -1,8 +1,8 @@ import React from "react"; -import { useI18n } from "../../i18n"; +import { useI18n } from "../i18n"; -import type { TranslationKeys } from "../../i18n"; +import type { TranslationKeys } from "../i18n"; // Used for splitting i18nKey into tokens in Trans component // Example: diff --git a/packages/excalidraw/src/components/UserList.tsx b/packages/excalidraw/src/components/UserList.tsx index a347c8740..811289329 100644 --- a/packages/excalidraw/src/components/UserList.tsx +++ b/packages/excalidraw/src/components/UserList.tsx @@ -6,7 +6,7 @@ import { supportsResizeObserver, isShallowEqual } from "@excalidraw/common"; import type { MarkRequired } from "@excalidraw/common/utility-types"; -import { t } from "../../i18n"; +import { t } from "../i18n"; import { useExcalidrawActionManager } from "./App"; import { Island } from "./Island"; @@ -17,7 +17,7 @@ import { Tooltip } from "./Tooltip"; import "./UserList.scss"; import type { ActionManager } from "../actions/manager"; -import type { Collaborator, SocketId } from "../../types"; +import type { Collaborator, SocketId } from "../types"; export type GoToCollaboratorComponentProps = { socketId: SocketId; diff --git a/packages/excalidraw/src/components/canvases/InteractiveCanvas.tsx b/packages/excalidraw/src/components/canvases/InteractiveCanvas.tsx index 5a9e15f66..1f4f57433 100644 --- a/packages/excalidraw/src/components/canvases/InteractiveCanvas.tsx +++ b/packages/excalidraw/src/components/canvases/InteractiveCanvas.tsx @@ -11,8 +11,8 @@ import type { NonDeletedSceneElementsMap, } from "@excalidraw/element/types"; -import { t } from "../../../i18n"; -import { isRenderThrottlingEnabled } from "../../../reactUtils"; +import { t } from "../../i18n"; +import { isRenderThrottlingEnabled } from "../../reactUtils"; import { renderInteractiveScene } from "../../renderer/interactiveScene"; import type { @@ -20,11 +20,7 @@ import type { RenderableElementsMap, RenderInteractiveSceneCallback, } from "../../scene/types"; -import type { - AppState, - Device, - InteractiveCanvasAppState, -} from "../../../types"; +import type { AppState, Device, InteractiveCanvasAppState } from "../../types"; import type { DOMAttributes } from "react"; type InteractiveCanvasProps = { diff --git a/packages/excalidraw/src/components/canvases/NewElementCanvas.tsx b/packages/excalidraw/src/components/canvases/NewElementCanvas.tsx index 48e452627..4310f1bd1 100644 --- a/packages/excalidraw/src/components/canvases/NewElementCanvas.tsx +++ b/packages/excalidraw/src/components/canvases/NewElementCanvas.tsx @@ -2,14 +2,14 @@ import { useEffect, useRef } from "react"; import type { NonDeletedSceneElementsMap } from "@excalidraw/element/types"; -import { isRenderThrottlingEnabled } from "../../../reactUtils"; +import { isRenderThrottlingEnabled } from "../../reactUtils"; import { renderNewElementScene } from "../../renderer/renderNewElementScene"; import type { RenderableElementsMap, StaticCanvasRenderConfig, } from "../../scene/types"; -import type { AppState } from "../../../types"; +import type { AppState } from "../../types"; import type { RoughCanvas } from "roughjs/bin/canvas"; interface NewElementCanvasProps { diff --git a/packages/excalidraw/src/components/canvases/StaticCanvas.tsx b/packages/excalidraw/src/components/canvases/StaticCanvas.tsx index 1ab13e96f..5a498ebac 100644 --- a/packages/excalidraw/src/components/canvases/StaticCanvas.tsx +++ b/packages/excalidraw/src/components/canvases/StaticCanvas.tsx @@ -7,14 +7,14 @@ import type { NonDeletedSceneElementsMap, } from "@excalidraw/element/types"; -import { isRenderThrottlingEnabled } from "../../../reactUtils"; +import { isRenderThrottlingEnabled } from "../../reactUtils"; import { renderStaticScene } from "../../renderer/staticScene"; import type { RenderableElementsMap, StaticCanvasRenderConfig, } from "../../scene/types"; -import type { AppState, StaticCanvasAppState } from "../../../types"; +import type { AppState, StaticCanvasAppState } from "../../types"; import type { RoughCanvas } from "roughjs/bin/canvas"; type StaticCanvasProps = { diff --git a/packages/excalidraw/src/components/footer/Footer.tsx b/packages/excalidraw/src/components/footer/Footer.tsx index 234aa0a90..427628e7c 100644 --- a/packages/excalidraw/src/components/footer/Footer.tsx +++ b/packages/excalidraw/src/components/footer/Footer.tsx @@ -14,7 +14,7 @@ import { Section } from "../Section"; import Stack from "../Stack"; import type { ActionManager } from "../../actions/manager"; -import type { UIAppState } from "../../../types"; +import type { UIAppState } from "../../types"; const Footer = ({ appState, diff --git a/packages/excalidraw/src/components/hoc/withInternalFallback.tsx b/packages/excalidraw/src/components/hoc/withInternalFallback.tsx index 0cfb96054..298f58dd9 100644 --- a/packages/excalidraw/src/components/hoc/withInternalFallback.tsx +++ b/packages/excalidraw/src/components/hoc/withInternalFallback.tsx @@ -1,7 +1,7 @@ import React, { useLayoutEffect, useRef } from "react"; import { useTunnels } from "../../context/tunnels"; -import { atom } from "../../../editor-jotai"; +import { atom } from "../../editor-jotai"; export const withInternalFallback = ( componentName: string, diff --git a/packages/excalidraw/src/components/hyperlink/Hyperlink.tsx b/packages/excalidraw/src/components/hyperlink/Hyperlink.tsx index d90a277c9..063444a58 100644 --- a/packages/excalidraw/src/components/hyperlink/Hyperlink.tsx +++ b/packages/excalidraw/src/components/hyperlink/Hyperlink.tsx @@ -42,7 +42,7 @@ import type { import { trackEvent } from "../../../analytics"; import { getTooltipDiv, updateTooltipPosition } from "../Tooltip"; -import { t } from "../../../i18n"; +import { t } from "../../i18n"; import { useAppProps, useDevice, useExcalidrawAppState } from "../App"; import { ToolButton } from "../ToolButton"; @@ -53,7 +53,7 @@ import { getLinkHandleFromCoords } from "./helpers"; import "./Hyperlink.scss"; -import type { AppState, ExcalidrawProps, UIAppState } from "../../../types"; +import type { AppState, ExcalidrawProps, UIAppState } from "../../types"; const POPUP_WIDTH = 380; const POPUP_HEIGHT = 42; diff --git a/packages/excalidraw/src/components/hyperlink/helpers.ts b/packages/excalidraw/src/components/hyperlink/helpers.ts index ef3bad044..d1345db98 100644 --- a/packages/excalidraw/src/components/hyperlink/helpers.ts +++ b/packages/excalidraw/src/components/hyperlink/helpers.ts @@ -14,7 +14,7 @@ import type { NonDeletedExcalidrawElement, } from "@excalidraw/element/types"; -import type { AppState, UIAppState } from "../../../types"; +import type { AppState, UIAppState } from "../../types"; export const EXTERNAL_LINK_IMG = document.createElement("img"); EXTERNAL_LINK_IMG.src = `data:${MIME_TYPES.svg}, ${encodeURIComponent( diff --git a/packages/excalidraw/src/components/live-collaboration/LiveCollaborationTrigger.tsx b/packages/excalidraw/src/components/live-collaboration/LiveCollaborationTrigger.tsx index 3dacef0fd..1aa187167 100644 --- a/packages/excalidraw/src/components/live-collaboration/LiveCollaborationTrigger.tsx +++ b/packages/excalidraw/src/components/live-collaboration/LiveCollaborationTrigger.tsx @@ -1,6 +1,6 @@ import clsx from "clsx"; -import { t } from "../../../i18n"; +import { t } from "../../i18n"; import { Button } from "../Button"; import { share } from "../icons"; import { useUIAppState } from "../../context/ui-appState"; diff --git a/packages/excalidraw/src/components/main-menu/DefaultItems.tsx b/packages/excalidraw/src/components/main-menu/DefaultItems.tsx index 5971c8bb4..a0a7259c4 100644 --- a/packages/excalidraw/src/components/main-menu/DefaultItems.tsx +++ b/packages/excalidraw/src/components/main-menu/DefaultItems.tsx @@ -15,8 +15,8 @@ import { import { getShortcutFromShortcutName } from "../../actions/shortcuts"; import { trackEvent } from "../../../analytics"; import { useUIAppState } from "../../context/ui-appState"; -import { useSetAtom } from "../../../editor-jotai"; -import { useI18n } from "../../../i18n"; +import { useSetAtom } from "../../editor-jotai"; +import { useI18n } from "../../i18n"; import { activeConfirmDialogAtom } from "../ActiveConfirmDialog"; import { useExcalidrawSetAppState, diff --git a/packages/excalidraw/src/components/main-menu/MainMenu.tsx b/packages/excalidraw/src/components/main-menu/MainMenu.tsx index 46b593a85..7c2b5fb4a 100644 --- a/packages/excalidraw/src/components/main-menu/MainMenu.tsx +++ b/packages/excalidraw/src/components/main-menu/MainMenu.tsx @@ -4,7 +4,7 @@ import { composeEventHandlers } from "@excalidraw/common"; import { useTunnels } from "../../context/tunnels"; import { useUIAppState } from "../../context/ui-appState"; -import { t } from "../../../i18n"; +import { t } from "../../i18n"; import { useDevice, useExcalidrawSetAppState } from "../App"; import { UserList } from "../UserList"; import DropdownMenu from "../dropdownMenu/DropdownMenu"; diff --git a/packages/excalidraw/src/components/welcome-screen/WelcomeScreen.Center.tsx b/packages/excalidraw/src/components/welcome-screen/WelcomeScreen.Center.tsx index d094c84b8..bd9b9e55b 100644 --- a/packages/excalidraw/src/components/welcome-screen/WelcomeScreen.Center.tsx +++ b/packages/excalidraw/src/components/welcome-screen/WelcomeScreen.Center.tsx @@ -2,7 +2,7 @@ import { actionLoadScene, actionShortcuts } from "../../actions"; import { getShortcutFromShortcutName } from "../../actions/shortcuts"; import { useTunnels } from "../../context/tunnels"; import { useUIAppState } from "../../context/ui-appState"; -import { t, useI18n } from "../../../i18n"; +import { t, useI18n } from "../../i18n"; import { useDevice, useExcalidrawActionManager } from "../App"; import { ExcalidrawLogo } from "../ExcalidrawLogo"; import { HelpIcon, LoadIcon, usersIcon } from "../icons"; diff --git a/packages/excalidraw/src/components/welcome-screen/WelcomeScreen.Hints.tsx b/packages/excalidraw/src/components/welcome-screen/WelcomeScreen.Hints.tsx index 2cca3ffdc..e47a5a1d3 100644 --- a/packages/excalidraw/src/components/welcome-screen/WelcomeScreen.Hints.tsx +++ b/packages/excalidraw/src/components/welcome-screen/WelcomeScreen.Hints.tsx @@ -1,5 +1,5 @@ import { useTunnels } from "../../context/tunnels"; -import { t } from "../../../i18n"; +import { t } from "../../i18n"; import { WelcomeScreenHelpArrow, WelcomeScreenMenuArrow, diff --git a/packages/excalidraw/src/context/ui-appState.ts b/packages/excalidraw/src/context/ui-appState.ts index f1806d2d7..174b6e89c 100644 --- a/packages/excalidraw/src/context/ui-appState.ts +++ b/packages/excalidraw/src/context/ui-appState.ts @@ -1,6 +1,6 @@ import React from "react"; -import type { UIAppState } from "../../types"; +import type { UIAppState } from "../types"; export const UIAppStateContext = React.createContext(null!); export const useUIAppState = () => React.useContext(UIAppStateContext); diff --git a/packages/excalidraw/cursor.ts b/packages/excalidraw/src/cursor.ts similarity index 100% rename from packages/excalidraw/cursor.ts rename to packages/excalidraw/src/cursor.ts diff --git a/packages/excalidraw/src/data/EditorLocalStorage.ts b/packages/excalidraw/src/data/EditorLocalStorage.ts index 0de858d69..18d305315 100644 --- a/packages/excalidraw/src/data/EditorLocalStorage.ts +++ b/packages/excalidraw/src/data/EditorLocalStorage.ts @@ -1,6 +1,6 @@ import type { EDITOR_LS_KEYS } from "@excalidraw/common"; -import type { JSONValue } from "../../types"; +import type { JSONValue } from "../types"; export class EditorLocalStorage { static has(key: typeof EDITOR_LS_KEYS[keyof typeof EDITOR_LS_KEYS]) { diff --git a/packages/excalidraw/src/data/blob.ts b/packages/excalidraw/src/data/blob.ts index a396d7c57..1cf054446 100644 --- a/packages/excalidraw/src/data/blob.ts +++ b/packages/excalidraw/src/data/blob.ts @@ -14,7 +14,7 @@ import type { ExcalidrawElement, FileId } from "@excalidraw/element/types"; import { cleanAppStateForExport } from "../../appState"; -import { CanvasError, ImageSceneDataError } from "../../errors"; +import { CanvasError, ImageSceneDataError } from "../errors"; import { calculateScrollCenter } from "../scene"; import { decodeSvgBase64Payload } from "../scene/export"; @@ -23,7 +23,7 @@ import { nativeFileSystemSupported } from "./filesystem"; import { isValidExcalidrawData, isValidLibrary } from "./json"; import { restore, restoreLibraryItems } from "./restore"; -import type { AppState, DataURL, LibraryItem } from "../../types"; +import type { AppState, DataURL, LibraryItem } from "../types"; import type { FileSystemHandle } from "./filesystem"; import type { ImportedLibraryData } from "./types"; diff --git a/packages/excalidraw/src/data/filesystem.ts b/packages/excalidraw/src/data/filesystem.ts index 38235698f..0f4ae745f 100644 --- a/packages/excalidraw/src/data/filesystem.ts +++ b/packages/excalidraw/src/data/filesystem.ts @@ -6,7 +6,7 @@ import { import { EVENT, MIME_TYPES, debounce } from "@excalidraw/common"; -import { AbortError } from "../../errors"; +import { AbortError } from "../errors"; import type { FileSystemHandle } from "browser-fs-access"; diff --git a/packages/excalidraw/src/data/index.ts b/packages/excalidraw/src/data/index.ts index b9d071823..ac8147e85 100644 --- a/packages/excalidraw/src/data/index.ts +++ b/packages/excalidraw/src/data/index.ts @@ -22,9 +22,9 @@ import type { import { copyBlobToClipboardAsPng, copyTextToSystemClipboard, -} from "../../clipboard"; +} from "../clipboard"; -import { t } from "../../i18n"; +import { t } from "../i18n"; import { getSelectedElements, isSomeElementSelected } from "../scene"; import { exportToCanvas, exportToSvg } from "../scene/export"; @@ -35,7 +35,7 @@ import { serializeAsJSON } from "./json"; import type { FileSystemHandle } from "./filesystem"; import type { ExportType } from "../scene/types"; -import type { AppState, BinaryFiles } from "../../types"; +import type { AppState, BinaryFiles } from "../types"; export { loadFromBlob } from "./blob"; export { loadFromJSON, saveAsJSON } from "./json"; diff --git a/packages/excalidraw/src/data/json.ts b/packages/excalidraw/src/data/json.ts index 906183adb..c21fbfcd3 100644 --- a/packages/excalidraw/src/data/json.ts +++ b/packages/excalidraw/src/data/json.ts @@ -21,7 +21,7 @@ import { import { isImageFileHandle, loadFromBlob, normalizeFile } from "./blob"; import { fileOpen, fileSave } from "./filesystem"; -import type { AppState, BinaryFiles, LibraryItems } from "../../types"; +import type { AppState, BinaryFiles, LibraryItems } from "../types"; import type { ExportedDataState, ImportedDataState, diff --git a/packages/excalidraw/src/data/library.ts b/packages/excalidraw/src/data/library.ts index 224c2793b..dcd416f24 100644 --- a/packages/excalidraw/src/data/library.ts +++ b/packages/excalidraw/src/data/library.ts @@ -24,12 +24,12 @@ import type { ExcalidrawElement } from "@excalidraw/element/types"; import type { MaybePromise } from "@excalidraw/common/utility-types"; -import { atom, editorJotaiStore } from "../../editor-jotai"; +import { atom, editorJotaiStore } from "../editor-jotai"; -import { Emitter } from "../../emitter"; -import { AbortError } from "../../errors"; +import { Emitter } from "../emitter"; +import { AbortError } from "../errors"; import { libraryItemSvgsCache } from "../../hooks/useLibraryItemSvg"; -import { t } from "../../i18n"; +import { t } from "../i18n"; import { loadLibraryFromBlob } from "./blob"; import { restoreLibraryItems } from "./restore"; @@ -42,7 +42,7 @@ import type { ExcalidrawImperativeAPI, LibraryItemsSource, LibraryItems_anyVersion, -} from "../../types"; +} from "../types"; /** * format: hostname or hostname/pathname diff --git a/packages/excalidraw/src/data/reconcile.ts b/packages/excalidraw/src/data/reconcile.ts index 87a0a1366..a69ee2dee 100644 --- a/packages/excalidraw/src/data/reconcile.ts +++ b/packages/excalidraw/src/data/reconcile.ts @@ -12,7 +12,7 @@ import type { OrderedExcalidrawElement } from "@excalidraw/element/types"; import type { MakeBrand } from "@excalidraw/common/utility-types"; -import type { AppState } from "../../types"; +import type { AppState } from "../types"; export type ReconciledExcalidrawElement = OrderedExcalidrawElement & MakeBrand<"ReconciledElement">; diff --git a/packages/excalidraw/src/data/resave.ts b/packages/excalidraw/src/data/resave.ts index 4e813c5bd..188041d69 100644 --- a/packages/excalidraw/src/data/resave.ts +++ b/packages/excalidraw/src/data/resave.ts @@ -4,7 +4,7 @@ import { getFileHandleType, isImageFileHandleType } from "./blob"; import { exportCanvas, prepareElementsForExport } from "."; -import type { AppState, BinaryFiles } from "../../types"; +import type { AppState, BinaryFiles } from "../types"; export const resaveAsImageWithScene = async ( elements: readonly ExcalidrawElement[], diff --git a/packages/excalidraw/src/data/restore.ts b/packages/excalidraw/src/data/restore.ts index b929d03dc..fc2a42e59 100644 --- a/packages/excalidraw/src/data/restore.ts +++ b/packages/excalidraw/src/data/restore.ts @@ -73,7 +73,7 @@ import { getNormalizedZoom, } from "../scene"; -import type { AppState, BinaryFiles, LibraryItem } from "../../types"; +import type { AppState, BinaryFiles, LibraryItem } from "../types"; import type { ImportedDataState, LegacyAppState } from "./types"; type RestoredAppState = Omit< diff --git a/packages/excalidraw/src/data/transform.ts b/packages/excalidraw/src/data/transform.ts index 4d7bd6866..15ad1ffde 100644 --- a/packages/excalidraw/src/data/transform.ts +++ b/packages/excalidraw/src/data/transform.ts @@ -63,7 +63,7 @@ import type { import type { MarkOptional } from "@excalidraw/common/utility-types"; -import { getCommonBounds } from "../.."; +import { getCommonBounds } from ".."; export type ValidLinearElement = { type: "arrow" | "line"; diff --git a/packages/excalidraw/src/data/types.ts b/packages/excalidraw/src/data/types.ts index f4474c66d..fe472beef 100644 --- a/packages/excalidraw/src/data/types.ts +++ b/packages/excalidraw/src/data/types.ts @@ -8,7 +8,7 @@ import type { BinaryFiles, LibraryItems, LibraryItems_anyVersion, -} from "../../types"; +} from "../types"; export interface ExportedDataState { type: string; diff --git a/packages/excalidraw/deburr.ts b/packages/excalidraw/src/deburr.ts similarity index 100% rename from packages/excalidraw/deburr.ts rename to packages/excalidraw/src/deburr.ts diff --git a/packages/excalidraw/editor-jotai.ts b/packages/excalidraw/src/editor-jotai.ts similarity index 100% rename from packages/excalidraw/editor-jotai.ts rename to packages/excalidraw/src/editor-jotai.ts diff --git a/packages/excalidraw/emitter.ts b/packages/excalidraw/src/emitter.ts similarity index 100% rename from packages/excalidraw/emitter.ts rename to packages/excalidraw/src/emitter.ts diff --git a/packages/excalidraw/env.cjs b/packages/excalidraw/src/env.cjs similarity index 91% rename from packages/excalidraw/env.cjs rename to packages/excalidraw/src/env.cjs index 63c1bde5f..962ada1e5 100644 --- a/packages/excalidraw/env.cjs +++ b/packages/excalidraw/src/env.cjs @@ -1,6 +1,6 @@ const dotenv = require("dotenv"); const { readFileSync } = require("fs"); -const pkg = require("./package.json"); +const pkg = require("../package.json"); const parseEnvVariables = (filepath) => { const envVars = Object.entries(dotenv.parse(readFileSync(filepath))).reduce( (env, [key, value]) => { diff --git a/packages/excalidraw/errors.ts b/packages/excalidraw/src/errors.ts similarity index 100% rename from packages/excalidraw/errors.ts rename to packages/excalidraw/src/errors.ts diff --git a/packages/excalidraw/gesture.ts b/packages/excalidraw/src/gesture.ts similarity index 100% rename from packages/excalidraw/gesture.ts rename to packages/excalidraw/src/gesture.ts diff --git a/packages/excalidraw/history.ts b/packages/excalidraw/src/history.ts similarity index 99% rename from packages/excalidraw/history.ts rename to packages/excalidraw/src/history.ts index 0481c8411..a7d3ba757 100644 --- a/packages/excalidraw/history.ts +++ b/packages/excalidraw/src/history.ts @@ -1,6 +1,6 @@ import type { SceneElementsMap } from "@excalidraw/element/types"; -import { Emitter } from "./emitter"; +import { Emitter } from "./src/emitter"; import type { AppStateChange, ElementsChange } from "./change"; import type { Snapshot } from "./store"; diff --git a/packages/excalidraw/i18n.ts b/packages/excalidraw/src/i18n.ts similarity index 100% rename from packages/excalidraw/i18n.ts rename to packages/excalidraw/src/i18n.ts diff --git a/packages/excalidraw/index-node.ts b/packages/excalidraw/src/index-node.ts similarity index 96% rename from packages/excalidraw/index-node.ts rename to packages/excalidraw/src/index-node.ts index 1608dc293..3b9499149 100644 --- a/packages/excalidraw/index-node.ts +++ b/packages/excalidraw/src/index-node.ts @@ -1,5 +1,5 @@ import { getDefaultAppState } from "./appState"; -import { exportToCanvas } from "./src/scene/export"; +import { exportToCanvas } from "./scene/export"; const fs = require("fs"); diff --git a/packages/excalidraw/index.tsx b/packages/excalidraw/src/index.tsx similarity index 83% rename from packages/excalidraw/index.tsx rename to packages/excalidraw/src/index.tsx index 664444aff..5ea746754 100644 --- a/packages/excalidraw/index.tsx +++ b/packages/excalidraw/src/index.tsx @@ -2,12 +2,12 @@ import React, { useEffect } from "react"; import { DEFAULT_UI_OPTIONS, isShallowEqual } from "@excalidraw/common"; -import App from "./src/components/App"; -import { InitializeApp } from "./src/components/InitializeApp"; -import Footer from "./src/components/footer/FooterCenter"; -import LiveCollaborationTrigger from "./src/components/live-collaboration/LiveCollaborationTrigger"; -import MainMenu from "./src/components/main-menu/MainMenu"; -import WelcomeScreen from "./src/components/welcome-screen/WelcomeScreen"; +import App from "./components/App"; +import { InitializeApp } from "./components/InitializeApp"; +import Footer from "./components/footer/FooterCenter"; +import LiveCollaborationTrigger from "./components/live-collaboration/LiveCollaborationTrigger"; +import MainMenu from "./components/main-menu/MainMenu"; +import WelcomeScreen from "./components/welcome-screen/WelcomeScreen"; import { defaultLang } from "./i18n"; import { EditorJotaiProvider, editorJotaiStore } from "./editor-jotai"; import polyfill from "./polyfill"; @@ -227,9 +227,9 @@ export { restoreAppState, restoreElements, restoreLibraryItems, -} from "./src/data/restore"; +} from "./data/restore"; -export { reconcileElements } from "./src/data/reconcile"; +export { reconcileElements } from "./data/reconcile"; export { exportToCanvas, @@ -238,14 +238,14 @@ export { exportToClipboard, } from "@excalidraw/utils/export"; -export { serializeAsJSON, serializeLibraryAsJSON } from "./src/data/json"; +export { serializeAsJSON, serializeLibraryAsJSON } from "./data/json"; export { loadFromBlob, loadSceneOrLibraryFromBlob, loadLibraryFromBlob, -} from "./src/data/blob"; +} from "./data/blob"; export { getFreeDrawSvgPath } from "@excalidraw/element/renderElement"; -export { mergeLibraryItems, getLibraryItemsHash } from "./src/data/library"; +export { mergeLibraryItems, getLibraryItemsHash } from "./data/library"; export { isLinearElement } from "@excalidraw/element/typeChecks"; export { @@ -266,31 +266,28 @@ export { export { CaptureUpdateAction } from "./store"; -export { - parseLibraryTokensFromUrl, - useHandleLibrary, -} from "./src/data/library"; +export { parseLibraryTokensFromUrl, useHandleLibrary } from "./data/library"; export { sceneCoordsToViewportCoords, viewportCoordsToSceneCoords, } from "@excalidraw/common"; -export { Sidebar } from "./src/components/Sidebar/Sidebar"; -export { Button } from "./src/components/Button"; +export { Sidebar } from "./components/Sidebar/Sidebar"; +export { Button } from "./components/Button"; export { Footer }; export { MainMenu }; -export { useDevice } from "./src/components/App"; +export { useDevice } from "./components/App"; export { WelcomeScreen }; export { LiveCollaborationTrigger }; -export { Stats } from "./src/components/Stats"; +export { Stats } from "./components/Stats"; -export { DefaultSidebar } from "./src/components/DefaultSidebar"; -export { TTDDialog } from "./src/components/TTDDialog/TTDDialog"; -export { TTDDialogTrigger } from "./src/components/TTDDialog/TTDDialogTrigger"; +export { DefaultSidebar } from "./components/DefaultSidebar"; +export { TTDDialog } from "./components/TTDDialog/TTDDialog"; +export { TTDDialogTrigger } from "./components/TTDDialog/TTDDialogTrigger"; -export { zoomToFitBounds } from "./src/actions/actionCanvas"; -export { convertToExcalidrawElements } from "./src/data/transform"; +export { zoomToFitBounds } from "./actions/actionCanvas"; +export { convertToExcalidrawElements } from "./data/transform"; export { getCommonBounds, getVisibleSceneBounds, @@ -302,8 +299,8 @@ export { elementPartiallyOverlapsWithOrContainsBBox, } from "@excalidraw/utils/withinBounds"; -export { DiagramToCodePlugin } from "./src/components/DiagramToCodePlugin/DiagramToCodePlugin"; -export { getDataURL } from "./src/data/blob"; +export { DiagramToCodePlugin } from "./components/DiagramToCodePlugin/DiagramToCodePlugin"; +export { getDataURL } from "./data/blob"; export { isElementLink } from "@excalidraw/element/elementLink"; export { setCustomTextMetricsProvider } from "@excalidraw/element/textMeasurements"; diff --git a/packages/excalidraw/laser-trails.ts b/packages/excalidraw/src/laser-trails.ts similarity index 98% rename from packages/excalidraw/laser-trails.ts rename to packages/excalidraw/src/laser-trails.ts index 1fb3d3cc4..7956ae5d2 100644 --- a/packages/excalidraw/laser-trails.ts +++ b/packages/excalidraw/src/laser-trails.ts @@ -7,7 +7,7 @@ import { getClientColor } from "./clients"; import type { Trail } from "./animated-trail"; import type { AnimationFrameHandler } from "./animation-frame-handler"; -import type App from "./src/components/App"; +import type App from "./components/App"; import type { SocketId } from "./types"; export class LaserTrails implements Trail { diff --git a/packages/excalidraw/mermaid.test.ts b/packages/excalidraw/src/mermaid.test.ts similarity index 100% rename from packages/excalidraw/mermaid.test.ts rename to packages/excalidraw/src/mermaid.test.ts diff --git a/packages/excalidraw/mermaid.ts b/packages/excalidraw/src/mermaid.ts similarity index 100% rename from packages/excalidraw/mermaid.ts rename to packages/excalidraw/src/mermaid.ts diff --git a/packages/excalidraw/polyfill.ts b/packages/excalidraw/src/polyfill.ts similarity index 100% rename from packages/excalidraw/polyfill.ts rename to packages/excalidraw/src/polyfill.ts diff --git a/packages/excalidraw/reactUtils.ts b/packages/excalidraw/src/reactUtils.ts similarity index 100% rename from packages/excalidraw/reactUtils.ts rename to packages/excalidraw/src/reactUtils.ts diff --git a/packages/excalidraw/src/scene/Renderer.ts b/packages/excalidraw/src/scene/Renderer.ts index 86fb7b2e7..95528dce3 100644 --- a/packages/excalidraw/src/scene/Renderer.ts +++ b/packages/excalidraw/src/scene/Renderer.ts @@ -15,7 +15,7 @@ import { renderStaticSceneThrottled } from "../../renderer/staticScene"; import type Scene from "./Scene"; import type { RenderableElementsMap } from "./types"; -import type { AppState } from "../../types"; +import type { AppState } from "../types"; export class Renderer { private scene: Scene; diff --git a/packages/excalidraw/src/scene/Scene.ts b/packages/excalidraw/src/scene/Scene.ts index e705ece90..dc66837fb 100644 --- a/packages/excalidraw/src/scene/Scene.ts +++ b/packages/excalidraw/src/scene/Scene.ts @@ -34,7 +34,7 @@ import type { import type { Assert, SameType } from "@excalidraw/common/utility-types"; -import type { AppState } from "../../types"; +import type { AppState } from "../types"; type ElementIdKey = InstanceType["elementId"]; type ElementKey = ExcalidrawElement | ElementIdKey; diff --git a/packages/excalidraw/src/scene/export.ts b/packages/excalidraw/src/scene/export.ts index 5f8fa335d..581e92b94 100644 --- a/packages/excalidraw/src/scene/export.ts +++ b/packages/excalidraw/src/scene/export.ts @@ -63,7 +63,7 @@ import { renderSceneToSvg } from "../../renderer/staticSvgScene"; import type { RenderableElementsMap } from "./types"; -import type { AppState, BinaryFiles } from "../../types"; +import type { AppState, BinaryFiles } from "../types"; const truncateText = (element: ExcalidrawTextElement, maxWidth: number) => { if (element.width <= maxWidth) { diff --git a/packages/excalidraw/src/scene/normalize.ts b/packages/excalidraw/src/scene/normalize.ts index 55df61651..605ae2fa6 100644 --- a/packages/excalidraw/src/scene/normalize.ts +++ b/packages/excalidraw/src/scene/normalize.ts @@ -2,7 +2,7 @@ import { MAX_ZOOM, MIN_ZOOM } from "@excalidraw/common"; import { clamp, round } from "@excalidraw/math"; -import type { NormalizedZoomValue } from "../../types"; +import type { NormalizedZoomValue } from "../types"; export const getNormalizedZoom = (zoom: number): NormalizedZoomValue => { return clamp(round(zoom, 6), MIN_ZOOM, MAX_ZOOM) as NormalizedZoomValue; diff --git a/packages/excalidraw/src/scene/scroll.ts b/packages/excalidraw/src/scene/scroll.ts index 597f96746..a99ad075f 100644 --- a/packages/excalidraw/src/scene/scroll.ts +++ b/packages/excalidraw/src/scene/scroll.ts @@ -10,7 +10,7 @@ import { getCommonBounds } from "@excalidraw/element/bounds"; import type { ExcalidrawElement } from "@excalidraw/element/types"; -import type { AppState, Offsets, PointerCoords, Zoom } from "../../types"; +import type { AppState, Offsets, PointerCoords, Zoom } from "../types"; const isOutsideViewPort = (appState: AppState, cords: Array) => { const [x1, y1, x2, y2] = cords; diff --git a/packages/excalidraw/src/scene/scrollbars.ts b/packages/excalidraw/src/scene/scrollbars.ts index 4a17ceee5..4fa4349f2 100644 --- a/packages/excalidraw/src/scene/scrollbars.ts +++ b/packages/excalidraw/src/scene/scrollbars.ts @@ -4,9 +4,9 @@ import { getCommonBounds } from "@excalidraw/element/bounds"; import type { ExcalidrawElement } from "@excalidraw/element/types"; -import { getLanguage } from "../../i18n"; +import { getLanguage } from "../i18n"; -import type { InteractiveCanvasAppState } from "../../types"; +import type { InteractiveCanvasAppState } from "../types"; import type { ScrollBars } from "./types"; export const SCROLLBAR_MARGIN = 4; diff --git a/packages/excalidraw/src/scene/types.ts b/packages/excalidraw/src/scene/types.ts index ee3ddc4d4..08b05a57d 100644 --- a/packages/excalidraw/src/scene/types.ts +++ b/packages/excalidraw/src/scene/types.ts @@ -18,7 +18,7 @@ import type { SocketId, Device, PendingExcalidrawElements, -} from "../../types"; +} from "../types"; import type { RoughCanvas } from "roughjs/bin/canvas"; import type { Drawable } from "roughjs/bin/core"; diff --git a/packages/excalidraw/src/scene/zoom.ts b/packages/excalidraw/src/scene/zoom.ts index e6a5ada60..5decf1149 100644 --- a/packages/excalidraw/src/scene/zoom.ts +++ b/packages/excalidraw/src/scene/zoom.ts @@ -1,4 +1,4 @@ -import type { AppState, NormalizedZoomValue } from "../../types"; +import type { AppState, NormalizedZoomValue } from "../types"; export const getStateForZoom = ( { diff --git a/packages/excalidraw/snapping.ts b/packages/excalidraw/src/snapping.ts similarity index 100% rename from packages/excalidraw/snapping.ts rename to packages/excalidraw/src/snapping.ts diff --git a/packages/excalidraw/store.ts b/packages/excalidraw/src/store.ts similarity index 100% rename from packages/excalidraw/store.ts rename to packages/excalidraw/src/store.ts diff --git a/packages/excalidraw/types.ts b/packages/excalidraw/src/types.ts similarity index 98% rename from packages/excalidraw/types.ts rename to packages/excalidraw/src/types.ts index 74c75aa94..717993b43 100644 --- a/packages/excalidraw/types.ts +++ b/packages/excalidraw/src/types.ts @@ -43,19 +43,19 @@ import type { MakeBrand, } from "@excalidraw/common/utility-types"; -import type { Action } from "./src/actions/types"; +import type { Action } from "./actions/types"; import type { Spreadsheet } from "./charts"; import type { ClipboardData } from "./clipboard"; -import type App from "./src/components/App"; -import type Library from "./src/data/library"; -import type { FileSystemHandle } from "./src/data/filesystem"; -import type { ContextMenuItems } from "./src/components/ContextMenu"; +import type App from "./components/App"; +import type Library from "./data/library"; +import type { FileSystemHandle } from "./data/filesystem"; +import type { ContextMenuItems } from "./components/ContextMenu"; import type { SnapLine } from "./snapping"; import type { CaptureUpdateActionType } from "./store"; -import type { ImportedDataState } from "./src/data/types"; +import type { ImportedDataState } from "./data/types"; import type { Language } from "./i18n"; -import type { isOverScrollBars } from "./src/scene/scrollbars"; +import type { isOverScrollBars } from "./scene/scrollbars"; import type React from "react"; import type { JSX } from "react"; diff --git a/packages/excalidraw/visualdebug.ts b/packages/excalidraw/src/visualdebug.ts similarity index 100% rename from packages/excalidraw/visualdebug.ts rename to packages/excalidraw/src/visualdebug.ts diff --git a/packages/excalidraw/workers.ts b/packages/excalidraw/src/workers.ts similarity index 100% rename from packages/excalidraw/workers.ts rename to packages/excalidraw/src/workers.ts diff --git a/packages/excalidraw/tests/App.test.tsx b/packages/excalidraw/tests/App.test.tsx index 7a1790cee..9a362d1a4 100644 --- a/packages/excalidraw/tests/App.test.tsx +++ b/packages/excalidraw/tests/App.test.tsx @@ -3,7 +3,7 @@ import { vi } from "vitest"; import { reseed } from "@excalidraw/common"; -import { Excalidraw } from "../index"; +import { Excalidraw } from "../src/index"; import * as StaticScene from "../renderer/staticScene"; import { render, queryByTestId, unmountComponent } from "../tests/test-utils"; diff --git a/packages/excalidraw/tests/MermaidToExcalidraw.test.tsx b/packages/excalidraw/tests/MermaidToExcalidraw.test.tsx index cedb70487..188faf9ee 100644 --- a/packages/excalidraw/tests/MermaidToExcalidraw.test.tsx +++ b/packages/excalidraw/tests/MermaidToExcalidraw.test.tsx @@ -1,7 +1,7 @@ import React from "react"; import { expect } from "vitest"; -import { Excalidraw } from "../index"; +import { Excalidraw } from "../src/index"; import { mockMermaidToExcalidraw } from "./helpers/mocks"; import { getTextEditor, updateTextEditor } from "./queries/dom"; diff --git a/packages/excalidraw/tests/actionStyles.test.tsx b/packages/excalidraw/tests/actionStyles.test.tsx index e81e9e4e4..ff1a0f05b 100644 --- a/packages/excalidraw/tests/actionStyles.test.tsx +++ b/packages/excalidraw/tests/actionStyles.test.tsx @@ -3,7 +3,7 @@ import React from "react"; import { CODES } from "@excalidraw/common"; import { copiedStyles } from "../actions/actionStyles"; -import { Excalidraw } from "../index"; +import { Excalidraw } from "../src/index"; import { API } from "../tests/helpers/api"; import { Keyboard, Pointer, UI } from "../tests/helpers/ui"; import { diff --git a/packages/excalidraw/tests/appState.test.tsx b/packages/excalidraw/tests/appState.test.tsx index abb7ac176..286934627 100644 --- a/packages/excalidraw/tests/appState.test.tsx +++ b/packages/excalidraw/tests/appState.test.tsx @@ -5,7 +5,7 @@ import { EXPORT_DATA_TYPES, MIME_TYPES } from "@excalidraw/common"; import type { ExcalidrawTextElement } from "@excalidraw/element/types"; import { getDefaultAppState } from "../appState"; -import { Excalidraw } from "../index"; +import { Excalidraw } from "../src/index"; import { API } from "./helpers/api"; import { Pointer, UI } from "./helpers/ui"; diff --git a/packages/excalidraw/tests/charts.test.tsx b/packages/excalidraw/tests/charts.test.tsx index a4bce153b..bf6dfe93a 100644 --- a/packages/excalidraw/tests/charts.test.tsx +++ b/packages/excalidraw/tests/charts.test.tsx @@ -1,4 +1,4 @@ -import { tryParseSpreadsheet } from "../charts"; +import { tryParseSpreadsheet } from "../src/charts"; describe("tryParseSpreadsheet", () => { it("works for numbers with comma in them", () => { diff --git a/packages/excalidraw/tests/clipboard.test.tsx b/packages/excalidraw/tests/clipboard.test.tsx index 0759afd94..77fba4b02 100644 --- a/packages/excalidraw/tests/clipboard.test.tsx +++ b/packages/excalidraw/tests/clipboard.test.tsx @@ -7,9 +7,9 @@ import { KEYS, arrayToMap, getLineHeight } from "@excalidraw/common"; import { getElementBounds } from "@excalidraw/element/bounds"; -import { createPasteEvent, serializeAsClipboardJSON } from "../clipboard"; +import { createPasteEvent, serializeAsClipboardJSON } from "../src/clipboard"; -import { Excalidraw } from "../index"; +import { Excalidraw } from "../src/index"; import { API } from "./helpers/api"; import { mockMermaidToExcalidraw } from "./helpers/mocks"; @@ -21,7 +21,7 @@ import { unmountComponent, } from "./test-utils"; -import type { NormalizedZoomValue } from "../types"; +import type { NormalizedZoomValue } from "../src/types"; const { h } = window; diff --git a/packages/excalidraw/tests/contextmenu.test.tsx b/packages/excalidraw/tests/contextmenu.test.tsx index ef36e3d52..e3d14b5c2 100644 --- a/packages/excalidraw/tests/contextmenu.test.tsx +++ b/packages/excalidraw/tests/contextmenu.test.tsx @@ -6,7 +6,7 @@ import { KEYS, reseed } from "@excalidraw/common"; import { setDateTimeForTests } from "@excalidraw/common"; import { copiedStyles } from "../actions/actionStyles"; -import { Excalidraw } from "../index"; +import { Excalidraw } from "../src/index"; import * as StaticScene from "../renderer/staticScene"; import { API } from "./helpers/api"; diff --git a/packages/excalidraw/tests/cropElement.test.tsx b/packages/excalidraw/tests/cropElement.test.tsx index 8011483fa..249898006 100644 --- a/packages/excalidraw/tests/cropElement.test.tsx +++ b/packages/excalidraw/tests/cropElement.test.tsx @@ -10,14 +10,14 @@ import type { ImageCrop, } from "@excalidraw/element/types"; -import { Excalidraw, exportToCanvas, exportToSvg } from ".."; +import { Excalidraw, exportToCanvas, exportToSvg } from "../src"; import { actionFlipHorizontal, actionFlipVertical } from "../actions"; import { API } from "./helpers/api"; import { Keyboard, Pointer, UI } from "./helpers/ui"; import { act, GlobalTestState, render, unmountComponent } from "./test-utils"; -import type { NormalizedZoomValue } from "../types"; +import type { NormalizedZoomValue } from "../src/types"; const { h } = window; const mouse = new Pointer("mouse"); diff --git a/packages/excalidraw/tests/data/reconcile.test.ts b/packages/excalidraw/tests/data/reconcile.test.ts index 1c0bf13db..dfb1e6b63 100644 --- a/packages/excalidraw/tests/data/reconcile.test.ts +++ b/packages/excalidraw/tests/data/reconcile.test.ts @@ -11,7 +11,7 @@ import { reconcileElements } from "../../data/reconcile"; import type { RemoteExcalidrawElement } from "../../data/reconcile"; -import type { AppState } from "../../types"; +import type { AppState } from "../../src/types"; type Id = string; type ElementLike = { diff --git a/packages/excalidraw/tests/data/restore.test.ts b/packages/excalidraw/tests/data/restore.test.ts index 4b414bbf1..6928715bd 100644 --- a/packages/excalidraw/tests/data/restore.test.ts +++ b/packages/excalidraw/tests/data/restore.test.ts @@ -12,7 +12,7 @@ import type { ExcalidrawLinearElement, ExcalidrawTextElement, } from "@excalidraw/element/types"; -import type { NormalizedZoomValue } from "@excalidraw/excalidraw/types"; +import type { NormalizedZoomValue } from "@excalidraw/excalidraw/src/types"; import { API } from "../helpers/api"; import * as restore from "../../data/restore"; diff --git a/packages/excalidraw/tests/dragCreate.test.tsx b/packages/excalidraw/tests/dragCreate.test.tsx index c33da5e7e..b48efc3cd 100644 --- a/packages/excalidraw/tests/dragCreate.test.tsx +++ b/packages/excalidraw/tests/dragCreate.test.tsx @@ -5,7 +5,7 @@ import { KEYS, reseed } from "@excalidraw/common"; import type { ExcalidrawLinearElement } from "@excalidraw/element/types"; -import { Excalidraw } from "../index"; +import { Excalidraw } from "../src/index"; import * as InteractiveScene from "../renderer/interactiveScene"; import * as StaticScene from "../renderer/staticScene"; diff --git a/packages/excalidraw/tests/elementLocking.test.tsx b/packages/excalidraw/tests/elementLocking.test.tsx index 45e370ed8..b8be03f17 100644 --- a/packages/excalidraw/tests/elementLocking.test.tsx +++ b/packages/excalidraw/tests/elementLocking.test.tsx @@ -5,8 +5,8 @@ import { mutateElement } from "@excalidraw/element/mutateElement"; import { KEYS } from "@excalidraw/common"; import { actionSelectAll } from "../actions"; -import { t } from "../i18n"; -import { Excalidraw } from "../index"; +import { t } from "../src/i18n"; +import { Excalidraw } from "../src/index"; import { API } from "../tests/helpers/api"; import { Keyboard, Pointer, UI } from "../tests/helpers/ui"; diff --git a/packages/excalidraw/tests/excalidraw.test.tsx b/packages/excalidraw/tests/excalidraw.test.tsx index 34135c618..1d54e6efd 100644 --- a/packages/excalidraw/tests/excalidraw.test.tsx +++ b/packages/excalidraw/tests/excalidraw.test.tsx @@ -4,8 +4,8 @@ import { useMemo } from "react"; import { THEME } from "@excalidraw/common"; -import { t } from "../i18n"; -import { Excalidraw, Footer, MainMenu } from "../index"; +import { t } from "../src/i18n"; +import { Excalidraw, Footer, MainMenu } from "../src/index"; import { fireEvent, GlobalTestState, toggleMenu, render } from "./test-utils"; diff --git a/packages/excalidraw/tests/export.test.tsx b/packages/excalidraw/tests/export.test.tsx index a42e56b90..7da68c46f 100644 --- a/packages/excalidraw/tests/export.test.tsx +++ b/packages/excalidraw/tests/export.test.tsx @@ -8,7 +8,7 @@ import { getDefaultAppState } from "../appState"; import { getDataURL } from "../data/blob"; import { encodePngMetadata } from "../data/image"; import { serializeAsJSON } from "../data/json"; -import { Excalidraw } from "../index"; +import { Excalidraw } from "../src/index"; import { decodeSvgBase64Payload, encodeSvgBase64Payload, diff --git a/packages/excalidraw/tests/fitToContent.test.tsx b/packages/excalidraw/tests/fitToContent.test.tsx index bfd16c4e1..6d0d9327b 100644 --- a/packages/excalidraw/tests/fitToContent.test.tsx +++ b/packages/excalidraw/tests/fitToContent.test.tsx @@ -1,7 +1,7 @@ import React from "react"; import { vi } from "vitest"; -import { Excalidraw } from "../index"; +import { Excalidraw } from "../src/index"; import { API } from "./helpers/api"; import { act, render } from "./test-utils"; diff --git a/packages/excalidraw/tests/flip.test.tsx b/packages/excalidraw/tests/flip.test.tsx index 22a6c67f8..b214753c7 100644 --- a/packages/excalidraw/tests/flip.test.tsx +++ b/packages/excalidraw/tests/flip.test.tsx @@ -20,8 +20,8 @@ import type { } from "@excalidraw/element/types"; import { actionFlipHorizontal, actionFlipVertical } from "../actions"; -import { createPasteEvent } from "../clipboard"; -import { Excalidraw } from "../index"; +import { createPasteEvent } from "../src/clipboard"; +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) import * as blobModule from "../data/blob"; @@ -37,7 +37,7 @@ import { waitFor, } from "./test-utils"; -import type { NormalizedZoomValue } from "../types"; +import type { NormalizedZoomValue } from "../src/types"; const { h } = window; const mouse = new Pointer("mouse"); diff --git a/packages/excalidraw/tests/helpers/api.ts b/packages/excalidraw/tests/helpers/api.ts index 09aa308a5..5cc96db66 100644 --- a/packages/excalidraw/tests/helpers/api.ts +++ b/packages/excalidraw/tests/helpers/api.ts @@ -49,7 +49,7 @@ import { GlobalTestState, createEvent, fireEvent, act } from "../test-utils"; import type { Action } from "../../actions/types"; import type App from "../../components/App"; -import type { AppState } from "../../types"; +import type { AppState } from "../../src/types"; const readFile = util.promisify(fs.readFile); diff --git a/packages/excalidraw/tests/helpers/ui.ts b/packages/excalidraw/tests/helpers/ui.ts index 32de489f1..8271eebb1 100644 --- a/packages/excalidraw/tests/helpers/ui.ts +++ b/packages/excalidraw/tests/helpers/ui.ts @@ -44,7 +44,7 @@ import { act, fireEvent, GlobalTestState, screen } from "../test-utils"; import { API } from "./api"; -import type { ToolType } from "../../types"; +import type { ToolType } from "../../src/types"; // so that window.h is available when App.tsx is not imported as well. createTestHook(); diff --git a/packages/excalidraw/tests/history.test.tsx b/packages/excalidraw/tests/history.test.tsx index 8dd65c7a5..afbe65ead 100644 --- a/packages/excalidraw/tests/history.test.tsx +++ b/packages/excalidraw/tests/history.test.tsx @@ -47,9 +47,9 @@ import { createUndoAction, createRedoAction } from "../actions/actionHistory"; import { actionToggleViewMode } from "../actions/actionToggleViewMode"; import { getDefaultAppState } from "../appState"; import { HistoryEntry } from "../history"; -import { Excalidraw } from "../index"; +import { Excalidraw } from "../src/index"; import * as StaticScene from "../renderer/staticScene"; -import { Snapshot, CaptureUpdateAction } from "../store"; +import { Snapshot, CaptureUpdateAction } from "../src/store.js"; import { AppStateChange, ElementsChange } from "../change"; import { API } from "./helpers/api"; @@ -63,7 +63,7 @@ import { getCloneByOrigId, } from "./test-utils"; -import type { AppState } from "../types"; +import type { AppState } from "../src/types.js"; const { h } = window; diff --git a/packages/excalidraw/tests/lasso.test.tsx b/packages/excalidraw/tests/lasso.test.tsx index 00e0ec2b4..83c152713 100644 --- a/packages/excalidraw/tests/lasso.test.tsx +++ b/packages/excalidraw/tests/lasso.test.tsx @@ -25,7 +25,7 @@ import { getElementLineSegments } from "@excalidraw/element/bounds"; import type { ExcalidrawElement } from "@excalidraw/element/types"; -import { Excalidraw } from "../index"; +import { Excalidraw } from "../src/index"; import { getSelectedElements } from "../scene"; diff --git a/packages/excalidraw/tests/library.test.tsx b/packages/excalidraw/tests/library.test.tsx index d2b6c13c8..6f1af466e 100644 --- a/packages/excalidraw/tests/library.test.tsx +++ b/packages/excalidraw/tests/library.test.tsx @@ -11,13 +11,13 @@ import type { ExcalidrawGenericElement } from "@excalidraw/element/types"; import { parseLibraryJSON } from "../data/blob"; import { serializeLibraryAsJSON } from "../data/json"; import { distributeLibraryItemsOnSquareGrid } from "../data/library"; -import { Excalidraw } from "../index"; +import { Excalidraw } from "../src/index"; import { API } from "./helpers/api"; import { UI } from "./helpers/ui"; import { fireEvent, getCloneByOrigId, render, waitFor } from "./test-utils"; -import type { LibraryItem, LibraryItems } from "../types"; +import type { LibraryItem, LibraryItems } from "../src/types"; const { h } = window; diff --git a/packages/excalidraw/tests/linearElementEditor.test.tsx b/packages/excalidraw/tests/linearElementEditor.test.tsx index 861998584..b0eb5b3d5 100644 --- a/packages/excalidraw/tests/linearElementEditor.test.tsx +++ b/packages/excalidraw/tests/linearElementEditor.test.tsx @@ -30,7 +30,7 @@ import type { FontString, } from "@excalidraw/element/types"; -import { Excalidraw, mutateElement } from "../index"; +import { Excalidraw, mutateElement } from "../src/index"; import * as InteractiveCanvas from "../renderer/interactiveScene"; import * as StaticScene from "../renderer/staticScene"; import { API } from "../tests/helpers/api"; diff --git a/packages/excalidraw/tests/move.test.tsx b/packages/excalidraw/tests/move.test.tsx index 77fc7e57d..10f81bb6e 100644 --- a/packages/excalidraw/tests/move.test.tsx +++ b/packages/excalidraw/tests/move.test.tsx @@ -15,7 +15,7 @@ import type { import type Scene from "@excalidraw/excalidraw/scene/Scene"; -import { Excalidraw } from "../index"; +import { Excalidraw } from "../src/index"; import * as InteractiveCanvas from "../renderer/interactiveScene"; import * as StaticScene from "../renderer/staticScene"; diff --git a/packages/excalidraw/tests/multiPointCreate.test.tsx b/packages/excalidraw/tests/multiPointCreate.test.tsx index cde3c7f98..23ec002b6 100644 --- a/packages/excalidraw/tests/multiPointCreate.test.tsx +++ b/packages/excalidraw/tests/multiPointCreate.test.tsx @@ -5,7 +5,7 @@ import { KEYS, reseed } from "@excalidraw/common"; import type { ExcalidrawLinearElement } from "@excalidraw/element/types"; -import { Excalidraw } from "../index"; +import { Excalidraw } from "../src/index"; import * as InteractiveCanvas from "../renderer/interactiveScene"; import * as StaticScene from "../renderer/staticScene"; diff --git a/packages/excalidraw/tests/packages/events.test.tsx b/packages/excalidraw/tests/packages/events.test.tsx index bc4441c40..ee77c3710 100644 --- a/packages/excalidraw/tests/packages/events.test.tsx +++ b/packages/excalidraw/tests/packages/events.test.tsx @@ -3,12 +3,12 @@ import { vi } from "vitest"; import { resolvablePromise } from "@excalidraw/common"; -import { Excalidraw, CaptureUpdateAction } from "../../index"; +import { Excalidraw, CaptureUpdateAction } from "../../src/index"; import { API } from "../helpers/api"; import { Pointer } from "../helpers/ui"; import { render } from "../test-utils"; -import type { ExcalidrawImperativeAPI } from "../../types"; +import type { ExcalidrawImperativeAPI } from "../../src/types"; describe("event callbacks", () => { const h = window.h; diff --git a/packages/excalidraw/tests/queries/toolQueries.ts b/packages/excalidraw/tests/queries/toolQueries.ts index 8413bf5fb..b5d140fae 100644 --- a/packages/excalidraw/tests/queries/toolQueries.ts +++ b/packages/excalidraw/tests/queries/toolQueries.ts @@ -2,7 +2,7 @@ import { queries, buildQueries } from "@testing-library/react"; import { TOOL_TYPE } from "@excalidraw/common"; -import type { ToolType } from "@excalidraw/excalidraw/types"; +import type { ToolType } from "@excalidraw/excalidraw/src/types"; const _getAllByToolName = (container: HTMLElement, tool: ToolType | "lock") => { const toolTitle = tool === "lock" ? "lock" : TOOL_TYPE[tool]; diff --git a/packages/excalidraw/tests/regressionTests.test.tsx b/packages/excalidraw/tests/regressionTests.test.tsx index 68765024e..daf198359 100644 --- a/packages/excalidraw/tests/regressionTests.test.tsx +++ b/packages/excalidraw/tests/regressionTests.test.tsx @@ -7,7 +7,7 @@ import { setDateTimeForTests } from "@excalidraw/common"; import type { ExcalidrawElement } from "@excalidraw/element/types"; -import { Excalidraw } from "../index"; +import { Excalidraw } from "../src/index"; import * as StaticScene from "../renderer/staticScene"; import { API } from "./helpers/api"; diff --git a/packages/excalidraw/tests/rotate.test.tsx b/packages/excalidraw/tests/rotate.test.tsx index 9687b08f2..8176bc39d 100644 --- a/packages/excalidraw/tests/rotate.test.tsx +++ b/packages/excalidraw/tests/rotate.test.tsx @@ -3,7 +3,7 @@ import { expect } from "vitest"; import { reseed } from "@excalidraw/common"; -import { Excalidraw } from "../index"; +import { Excalidraw } from "../src/index"; import { UI } from "./helpers/ui"; import { render, unmountComponent } from "./test-utils"; diff --git a/packages/excalidraw/tests/scroll.test.tsx b/packages/excalidraw/tests/scroll.test.tsx index ef5eb3dbf..dbda58380 100644 --- a/packages/excalidraw/tests/scroll.test.tsx +++ b/packages/excalidraw/tests/scroll.test.tsx @@ -2,7 +2,7 @@ import React from "react"; import { KEYS } from "@excalidraw/common"; -import { Excalidraw } from "../index"; +import { Excalidraw } from "../src/index"; import { API } from "./helpers/api"; import { Keyboard } from "./helpers/ui"; diff --git a/packages/excalidraw/tests/search.test.tsx b/packages/excalidraw/tests/search.test.tsx index 3a42cff62..487386b4c 100644 --- a/packages/excalidraw/tests/search.test.tsx +++ b/packages/excalidraw/tests/search.test.tsx @@ -9,7 +9,7 @@ import { import type { ExcalidrawTextElement } from "@excalidraw/element/types"; -import { Excalidraw } from "../index"; +import { Excalidraw } from "../src/index"; import { API } from "./helpers/api"; import { Keyboard } from "./helpers/ui"; diff --git a/packages/excalidraw/tests/selection.test.tsx b/packages/excalidraw/tests/selection.test.tsx index 10f4f7ad9..f71002855 100644 --- a/packages/excalidraw/tests/selection.test.tsx +++ b/packages/excalidraw/tests/selection.test.tsx @@ -5,7 +5,7 @@ import { KEYS, reseed } from "@excalidraw/common"; import { SHAPES } from "../components/shapes"; -import { Excalidraw } from "../index"; +import { Excalidraw } from "../src/index"; import * as InteractiveCanvas from "../renderer/interactiveScene"; import * as StaticScene from "../renderer/staticScene"; diff --git a/packages/excalidraw/tests/shortcuts.test.tsx b/packages/excalidraw/tests/shortcuts.test.tsx index d4d1cb0de..f0215706c 100644 --- a/packages/excalidraw/tests/shortcuts.test.tsx +++ b/packages/excalidraw/tests/shortcuts.test.tsx @@ -2,7 +2,7 @@ import React from "react"; import { KEYS } from "@excalidraw/common"; -import { Excalidraw } from "../index"; +import { Excalidraw } from "../src/index"; import { API } from "./helpers/api"; import { Keyboard } from "./helpers/ui"; diff --git a/packages/excalidraw/tests/tool.test.tsx b/packages/excalidraw/tests/tool.test.tsx index f7c101c1d..49d732e87 100644 --- a/packages/excalidraw/tests/tool.test.tsx +++ b/packages/excalidraw/tests/tool.test.tsx @@ -2,12 +2,12 @@ import React from "react"; import { resolvablePromise } from "@excalidraw/common"; -import { Excalidraw } from "../index"; +import { Excalidraw } from "../src/index"; import { Pointer } from "./helpers/ui"; import { act, render } from "./test-utils"; -import type { ExcalidrawImperativeAPI } from "../types"; +import type { ExcalidrawImperativeAPI } from "../src/types"; describe("setActiveTool()", () => { const h = window.h; diff --git a/packages/excalidraw/tests/viewMode.test.tsx b/packages/excalidraw/tests/viewMode.test.tsx index 0a94055c7..eeeed7953 100644 --- a/packages/excalidraw/tests/viewMode.test.tsx +++ b/packages/excalidraw/tests/viewMode.test.tsx @@ -2,7 +2,7 @@ import React from "react"; import { CURSOR_TYPE, KEYS } from "@excalidraw/common"; -import { Excalidraw } from "../index"; +import { Excalidraw } from "../src/index"; import { API } from "./helpers/api"; import { Keyboard, Pointer, UI } from "./helpers/ui"; diff --git a/packages/utils/src/export.ts b/packages/utils/src/export.ts index 777a1fcf9..4670511c9 100644 --- a/packages/utils/src/export.ts +++ b/packages/utils/src/export.ts @@ -4,7 +4,7 @@ import { copyBlobToClipboardAsPng, copyTextToSystemClipboard, copyToClipboard, -} from "@excalidraw/excalidraw/clipboard"; +} from "@excalidraw/excalidraw/src/clipboard"; import { encodePngMetadata } from "@excalidraw/excalidraw/src/data/image"; import { serializeAsJSON } from "@excalidraw/excalidraw/src/data/json"; import { restore } from "@excalidraw/excalidraw/src/data/restore"; @@ -18,7 +18,7 @@ import type { ExcalidrawFrameLikeElement, NonDeleted, } from "@excalidraw/element/types"; -import type { AppState, BinaryFiles } from "@excalidraw/excalidraw/types"; +import type { AppState, BinaryFiles } from "@excalidraw/excalidraw/src/types"; export { MIME_TYPES }; diff --git a/tsconfig.json b/tsconfig.json index 45a29dd61..13a9119c6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -21,7 +21,7 @@ "paths": { "@excalidraw/common": ["./packages/common/src/index.ts"], "@excalidraw/common/*": ["./packages/common/src/*"], - "@excalidraw/excalidraw": ["./packages/excalidraw/index.tsx"], + "@excalidraw/excalidraw": ["packages/excalidraw/src/index.tsx"], "@excalidraw/excalidraw/*": ["./packages/excalidraw/*"], "@excalidraw/element": ["./packages/element/src/index.ts"], "@excalidraw/element/*": ["./packages/element/src/*"],