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";
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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)[],
|
||||
|
|
|
@ -13,7 +13,7 @@ import type {
|
|||
ToolType,
|
||||
UnsubscribeCallback,
|
||||
Zoom,
|
||||
} from "@excalidraw/excalidraw/types";
|
||||
} from "@excalidraw/excalidraw/src/types";
|
||||
|
||||
import { COLOR_PALETTE } from "./colors";
|
||||
import {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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" ||
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -8,7 +8,7 @@ import type {
|
|||
AppClassProperties,
|
||||
DataURL,
|
||||
BinaryFiles,
|
||||
} from "@excalidraw/excalidraw/types";
|
||||
} from "@excalidraw/excalidraw/src/types";
|
||||
|
||||
import { isInitializedImageElement } from "./typeChecks";
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ import type {
|
|||
ElementsPendingErasure,
|
||||
PendingExcalidrawElements,
|
||||
NormalizedZoomValue,
|
||||
} from "@excalidraw/excalidraw/types";
|
||||
} from "@excalidraw/excalidraw/src/types";
|
||||
|
||||
import type {
|
||||
StaticCanvasRenderConfig,
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import type { UIAppState } from "@excalidraw/excalidraw/types";
|
||||
import type { UIAppState } from "@excalidraw/excalidraw/src/types";
|
||||
|
||||
import { getSelectedElements } from "./selection";
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import type {
|
|||
Device,
|
||||
InteractiveCanvasAppState,
|
||||
Zoom,
|
||||
} from "@excalidraw/excalidraw/types";
|
||||
} from "@excalidraw/excalidraw/src/types";
|
||||
|
||||
import { getElementAbsoluteCoords } from "./bounds";
|
||||
import {
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { pointFrom } from "@excalidraw/math";
|
||||
|
||||
import { Excalidraw } from "@excalidraw/excalidraw";
|
||||
import { Excalidraw } from "@excalidraw/excalidraw/src";
|
||||
import {
|
||||
KEYS,
|
||||
getSizeFromPoints,
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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[],
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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 = (
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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 =
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue