mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
refactor: old paths updated to reflect new path for files in excalidraw package
This commit is contained in:
parent
98e7946887
commit
18a187e470
107 changed files with 256 additions and 242 deletions
|
@ -31,11 +31,11 @@ import {
|
|||
isRunningInIframe,
|
||||
isDevEnv,
|
||||
} from "@excalidraw/common";
|
||||
import polyfill from "@excalidraw/excalidraw/src/src/polyfill";
|
||||
import polyfill from "@excalidraw/excalidraw/src/polyfill";
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import { loadFromBlob } from "@excalidraw/excalidraw/src/data/blob";
|
||||
import { useCallbackRefState } from "@excalidraw/excalidraw/src/hooks/useCallbackRefState";
|
||||
import { t } from "@excalidraw/excalidraw/src/src/i18n";
|
||||
import { t } from "@excalidraw/excalidraw/src/i18n";
|
||||
|
||||
import {
|
||||
GithubIcon,
|
||||
|
@ -73,7 +73,7 @@ import type {
|
|||
BinaryFiles,
|
||||
ExcalidrawInitialDataState,
|
||||
UIAppState,
|
||||
} from "@excalidraw/excalidraw/src/src/types";
|
||||
} from "@excalidraw/excalidraw/src/types";
|
||||
import type { ResolutionType } from "@excalidraw/common/utility-types";
|
||||
import type { ResolvablePromise } from "@excalidraw/common/utils";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { base64urlToString } from "@excalidraw/excalidraw/data/encode";
|
||||
import { base64urlToString } from "@excalidraw/excalidraw/src/data/encode";
|
||||
import { ExcalidrawError } from "@excalidraw/excalidraw/src/errors";
|
||||
import { useLayoutEffect, useRef } from "react";
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import {
|
|||
zoomToFitBounds,
|
||||
reconcileElements,
|
||||
} from "@excalidraw/excalidraw/src";
|
||||
import { ErrorDialog } from "@excalidraw/excalidraw/components/ErrorDialog";
|
||||
import { ErrorDialog } from "@excalidraw/excalidraw/src/components/ErrorDialog";
|
||||
import { APP_NAME, EVENT } from "@excalidraw/common";
|
||||
import {
|
||||
IDLE_THRESHOLD,
|
||||
|
@ -18,7 +18,7 @@ import {
|
|||
resolvablePromise,
|
||||
throttleRAF,
|
||||
} from "@excalidraw/common";
|
||||
import { decryptData } from "@excalidraw/excalidraw/data/encryption";
|
||||
import { decryptData } from "@excalidraw/excalidraw/src/data/encryption";
|
||||
import { getVisibleSceneBounds } from "@excalidraw/element/bounds";
|
||||
import { newElementWith } from "@excalidraw/element/mutateElement";
|
||||
import {
|
||||
|
@ -35,8 +35,8 @@ import { PureComponent } from "react";
|
|||
import type {
|
||||
ReconciledExcalidrawElement,
|
||||
RemoteExcalidrawElement,
|
||||
} from "@excalidraw/excalidraw/data/reconcile";
|
||||
import type { ImportedDataState } from "@excalidraw/excalidraw/data/types";
|
||||
} from "@excalidraw/excalidraw/src/data/reconcile";
|
||||
import type { ImportedDataState } from "@excalidraw/excalidraw/src/data/types";
|
||||
import type {
|
||||
ExcalidrawElement,
|
||||
FileId,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Tooltip } from "@excalidraw/excalidraw/components/Tooltip";
|
||||
import { warning } from "@excalidraw/excalidraw/components/icons";
|
||||
import { Tooltip } from "@excalidraw/excalidraw/src/components/Tooltip";
|
||||
import { warning } from "@excalidraw/excalidraw/src/components/icons";
|
||||
import clsx from "clsx";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { CaptureUpdateAction } from "@excalidraw/excalidraw/src";
|
||||
import { trackEvent } from "@excalidraw/excalidraw/analytics";
|
||||
import { encryptData } from "@excalidraw/excalidraw/data/encryption";
|
||||
import { trackEvent } from "@excalidraw/excalidraw/src/analytics";
|
||||
import { encryptData } from "@excalidraw/excalidraw/src/data/encryption";
|
||||
import { newElementWith } from "@excalidraw/element/mutateElement";
|
||||
import throttle from "lodash.throttle";
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import {
|
|||
MIME_TYPES,
|
||||
TTDDialog,
|
||||
} from "@excalidraw/excalidraw/src";
|
||||
import { getDataURL } from "@excalidraw/excalidraw/data/blob";
|
||||
import { getDataURL } from "@excalidraw/excalidraw/src/data/blob";
|
||||
import { safelyParseJSON } from "@excalidraw/common";
|
||||
|
||||
import type { ExcalidrawImperativeAPI } from "@excalidraw/excalidraw/src/types";
|
||||
|
|
|
@ -2,7 +2,7 @@ import {
|
|||
loginIcon,
|
||||
ExcalLogo,
|
||||
eyeIcon,
|
||||
} from "@excalidraw/excalidraw/components/icons";
|
||||
} from "@excalidraw/excalidraw/src/components/icons";
|
||||
import { MainMenu } from "@excalidraw/excalidraw/src/index";
|
||||
import React from "react";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { loginIcon } from "@excalidraw/excalidraw/components/icons";
|
||||
import { loginIcon } from "@excalidraw/excalidraw/src/components/icons";
|
||||
import { POINTER_EVENTS } from "@excalidraw/common";
|
||||
import { useI18n } from "@excalidraw/excalidraw/src/i18n";
|
||||
import { WelcomeScreen } from "@excalidraw/excalidraw/src/index";
|
||||
|
|
|
@ -2,11 +2,11 @@ import {
|
|||
ArrowheadArrowIcon,
|
||||
CloseIcon,
|
||||
TrashIcon,
|
||||
} from "@excalidraw/excalidraw/components/icons";
|
||||
} from "@excalidraw/excalidraw/src/components/icons";
|
||||
import {
|
||||
bootstrapCanvas,
|
||||
getNormalizedCanvasDimensions,
|
||||
} from "@excalidraw/excalidraw/renderer/helpers";
|
||||
} from "@excalidraw/excalidraw/src/renderer/helpers";
|
||||
import { type AppState } from "@excalidraw/excalidraw/src/types";
|
||||
import { throttleRAF } from "@excalidraw/common";
|
||||
import { useCallback, useImperativeHandle, useRef } from "react";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Tooltip } from "@excalidraw/excalidraw/components/Tooltip";
|
||||
import { shield } from "@excalidraw/excalidraw/components/icons";
|
||||
import { Tooltip } from "@excalidraw/excalidraw/src/components/Tooltip";
|
||||
import { shield } from "@excalidraw/excalidraw/src/components/icons";
|
||||
import { useI18n } from "@excalidraw/excalidraw/src/i18n";
|
||||
|
||||
export const EncryptedIcon = () => {
|
||||
|
|
|
@ -2,16 +2,16 @@ import React from "react";
|
|||
import { uploadBytes, ref } from "firebase/storage";
|
||||
import { nanoid } from "nanoid";
|
||||
|
||||
import { trackEvent } from "@excalidraw/excalidraw/analytics";
|
||||
import { Card } from "@excalidraw/excalidraw/components/Card";
|
||||
import { ExcalidrawLogo } from "@excalidraw/excalidraw/components/ExcalidrawLogo";
|
||||
import { ToolButton } from "@excalidraw/excalidraw/components/ToolButton";
|
||||
import { trackEvent } from "@excalidraw/excalidraw/src/analytics";
|
||||
import { Card } from "@excalidraw/excalidraw/src/components/Card";
|
||||
import { ExcalidrawLogo } from "@excalidraw/excalidraw/src/components/ExcalidrawLogo";
|
||||
import { ToolButton } from "@excalidraw/excalidraw/src/components/ToolButton";
|
||||
import { MIME_TYPES, getFrame } from "@excalidraw/common";
|
||||
import {
|
||||
encryptData,
|
||||
generateEncryptionKey,
|
||||
} from "@excalidraw/excalidraw/data/encryption";
|
||||
import { serializeAsJSON } from "@excalidraw/excalidraw/data/json";
|
||||
} from "@excalidraw/excalidraw/src/data/encryption";
|
||||
import { serializeAsJSON } from "@excalidraw/excalidraw/src/data/json";
|
||||
import { isInitializedImageElement } from "@excalidraw/element/typeChecks";
|
||||
import { useI18n } from "@excalidraw/excalidraw/src/i18n";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import Trans from "@excalidraw/excalidraw/components/Trans";
|
||||
import Trans from "@excalidraw/excalidraw/src/components/Trans";
|
||||
import { t } from "@excalidraw/excalidraw/src/i18n";
|
||||
import * as Sentry from "@sentry/browser";
|
||||
import React from "react";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { CaptureUpdateAction } from "@excalidraw/excalidraw/src";
|
||||
import { compressData } from "@excalidraw/excalidraw/data/encode";
|
||||
import { compressData } from "@excalidraw/excalidraw/src/data/encode";
|
||||
import { newElementWith } from "@excalidraw/element/mutateElement";
|
||||
import { isInitializedImageElement } from "@excalidraw/element/typeChecks";
|
||||
import { t } from "@excalidraw/excalidraw/src/i18n";
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
* (localStorage, indexedDB).
|
||||
*/
|
||||
|
||||
import { clearAppStateForLocalStorage } from "@excalidraw/excalidraw/appState";
|
||||
import { clearAppStateForLocalStorage } from "@excalidraw/excalidraw/src/appState";
|
||||
import {
|
||||
CANVAS_SEARCH_TAB,
|
||||
DEFAULT_SIDEBAR,
|
||||
|
@ -27,8 +27,8 @@ import {
|
|||
get,
|
||||
} from "idb-keyval";
|
||||
|
||||
import type { LibraryPersistedData } from "@excalidraw/excalidraw/data/library";
|
||||
import type { ImportedDataState } from "@excalidraw/excalidraw/data/types";
|
||||
import type { LibraryPersistedData } from "@excalidraw/excalidraw/src/data/library";
|
||||
import type { ImportedDataState } from "@excalidraw/excalidraw/src/data/types";
|
||||
import type { ExcalidrawElement, FileId } from "@excalidraw/element/types";
|
||||
import type {
|
||||
AppState,
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import { reconcileElements } from "@excalidraw/excalidraw/src";
|
||||
import { MIME_TYPES } from "@excalidraw/common";
|
||||
import { decompressData } from "@excalidraw/excalidraw/data/encode";
|
||||
import { decompressData } from "@excalidraw/excalidraw/src/data/encode";
|
||||
import {
|
||||
encryptData,
|
||||
decryptData,
|
||||
} from "@excalidraw/excalidraw/data/encryption";
|
||||
import { restoreElements } from "@excalidraw/excalidraw/data/restore";
|
||||
} from "@excalidraw/excalidraw/src/data/encryption";
|
||||
import { restoreElements } from "@excalidraw/excalidraw/src/data/restore";
|
||||
import { getSceneVersion } from "@excalidraw/element";
|
||||
import { initializeApp } from "firebase/app";
|
||||
import {
|
||||
|
@ -17,7 +17,7 @@ import {
|
|||
} from "firebase/firestore";
|
||||
import { getStorage, ref, uploadBytes } from "firebase/storage";
|
||||
|
||||
import type { RemoteExcalidrawElement } from "@excalidraw/excalidraw/data/reconcile";
|
||||
import type { RemoteExcalidrawElement } from "@excalidraw/excalidraw/src/data/reconcile";
|
||||
import type {
|
||||
ExcalidrawElement,
|
||||
FileId,
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
import {
|
||||
compressData,
|
||||
decompressData,
|
||||
} from "@excalidraw/excalidraw/data/encode";
|
||||
} from "@excalidraw/excalidraw/src/data/encode";
|
||||
import {
|
||||
decryptData,
|
||||
generateEncryptionKey,
|
||||
IV_LENGTH_BYTES,
|
||||
} from "@excalidraw/excalidraw/data/encryption";
|
||||
import { serializeAsJSON } from "@excalidraw/excalidraw/data/json";
|
||||
import { restore } from "@excalidraw/excalidraw/data/restore";
|
||||
} from "@excalidraw/excalidraw/src/data/encryption";
|
||||
import { serializeAsJSON } from "@excalidraw/excalidraw/src/data/json";
|
||||
import { restore } from "@excalidraw/excalidraw/src/data/restore";
|
||||
import { isInvisiblySmallElement } from "@excalidraw/element/sizeHelpers";
|
||||
import { isInitializedImageElement } from "@excalidraw/element/typeChecks";
|
||||
import { t } from "@excalidraw/excalidraw/src/i18n";
|
||||
import { bytesToHexString } from "@excalidraw/common";
|
||||
|
||||
import type { UserIdleState } from "@excalidraw/common";
|
||||
import type { ImportedDataState } from "@excalidraw/excalidraw/data/types";
|
||||
import type { ImportedDataState } from "@excalidraw/excalidraw/src/data/types";
|
||||
import type { SceneBounds } from "@excalidraw/element/bounds";
|
||||
import type {
|
||||
ExcalidrawElement,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import {
|
||||
clearAppStateForLocalStorage,
|
||||
getDefaultAppState,
|
||||
} from "@excalidraw/excalidraw/appState";
|
||||
} from "@excalidraw/excalidraw/src/appState";
|
||||
import { clearElementsForLocalStorage } from "@excalidraw/element";
|
||||
|
||||
import type { ExcalidrawElement } from "@excalidraw/element/types";
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { trackEvent } from "@excalidraw/excalidraw/analytics";
|
||||
import { trackEvent } from "@excalidraw/excalidraw/src/analytics";
|
||||
import { copyTextToSystemClipboard } from "@excalidraw/excalidraw/src/clipboard";
|
||||
import { Dialog } from "@excalidraw/excalidraw/components/Dialog";
|
||||
import { FilledButton } from "@excalidraw/excalidraw/components/FilledButton";
|
||||
import { TextField } from "@excalidraw/excalidraw/components/TextField";
|
||||
import { Dialog } from "@excalidraw/excalidraw/src/components/Dialog";
|
||||
import { FilledButton } from "@excalidraw/excalidraw/src/components/FilledButton";
|
||||
import { TextField } from "@excalidraw/excalidraw/src/components/TextField";
|
||||
import {
|
||||
copyIcon,
|
||||
LinkIcon,
|
||||
|
@ -11,9 +11,9 @@ import {
|
|||
share,
|
||||
shareIOS,
|
||||
shareWindows,
|
||||
} from "@excalidraw/excalidraw/components/icons";
|
||||
import { useUIAppState } from "@excalidraw/excalidraw/context/ui-appState";
|
||||
import { useCopyStatus } from "@excalidraw/excalidraw/hooks/useCopiedIndicator";
|
||||
} from "@excalidraw/excalidraw/src/components/icons";
|
||||
import { useUIAppState } from "@excalidraw/excalidraw/src/context/ui-appState";
|
||||
import { useCopyStatus } from "@excalidraw/excalidraw/src/hooks/useCopiedIndicator";
|
||||
import { useI18n } from "@excalidraw/excalidraw/src/i18n";
|
||||
import { KEYS, getFrame } from "@excalidraw/common";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
|
|
|
@ -5,7 +5,7 @@ import {
|
|||
import {
|
||||
createRedoAction,
|
||||
createUndoAction,
|
||||
} from "@excalidraw/excalidraw/actions/actionHistory";
|
||||
} from "@excalidraw/excalidraw/src/actions/actionHistory";
|
||||
import { syncInvalidIndices } from "@excalidraw/element/fractionalIndex";
|
||||
import { API } from "@excalidraw/excalidraw/tests/helpers/api";
|
||||
import { act, render, waitFor } from "@excalidraw/excalidraw/tests/test-utils";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue