Move remaining files into src

This commit is contained in:
Deepen Timalsina 2025-04-14 21:24:23 +05:45
parent 676e89f018
commit 85d4af2e3d
276 changed files with 451 additions and 463 deletions

View file

@ -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 {

View file

@ -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,

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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" ||

View file

@ -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";

View file

@ -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,

View file

@ -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,

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -8,7 +8,7 @@ import type {
AppClassProperties,
DataURL,
BinaryFiles,
} from "@excalidraw/excalidraw/types";
} from "@excalidraw/excalidraw/src/types";
import { isInitializedImageElement } from "./typeChecks";

View file

@ -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";

View file

@ -24,7 +24,7 @@ import type {
ElementsPendingErasure,
PendingExcalidrawElements,
NormalizedZoomValue,
} from "@excalidraw/excalidraw/types";
} from "@excalidraw/excalidraw/src/types";
import type {
StaticCanvasRenderConfig,

View file

@ -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";

View file

@ -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 {

View file

@ -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";

View file

@ -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";

View file

@ -1,4 +1,4 @@
import type { UIAppState } from "@excalidraw/excalidraw/types";
import type { UIAppState } from "@excalidraw/excalidraw/src/types";
import { getSelectedElements } from "./selection";

View file

@ -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";

View file

@ -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";

View file

@ -12,7 +12,7 @@ import type {
Device,
InteractiveCanvasAppState,
Zoom,
} from "@excalidraw/excalidraw/types";
} from "@excalidraw/excalidraw/src/types";
import { getElementAbsoluteCoords } from "./bounds";
import {

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -1,6 +1,6 @@
import { pointFrom } from "@excalidraw/math";
import { Excalidraw } from "@excalidraw/excalidraw";
import { Excalidraw } from "@excalidraw/excalidraw/src";
import {
KEYS,
getSizeFromPoints,

View file

@ -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";