mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Move remaining files into src
This commit is contained in:
parent
676e89f018
commit
85d4af2e3d
276 changed files with 451 additions and 463 deletions
|
@ -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";
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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<BinaryFileData>["version"];
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
import { CaptureUpdateAction, newElementWith } from "@excalidraw/excalidraw";
|
||||
import {
|
||||
CaptureUpdateAction,
|
||||
newElementWith,
|
||||
} from "@excalidraw/excalidraw/src";
|
||||
import {
|
||||
createRedoAction,
|
||||
createUndoAction,
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue