mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-11-18 11:44:23 +01:00
refactor: separate elements logic into a standalone package (#9285)
This commit is contained in:
@@ -1,25 +1,3 @@
|
||||
import {
|
||||
BoundElement,
|
||||
BindableElement,
|
||||
bindingProperties,
|
||||
updateBoundElements,
|
||||
} from "./element/binding";
|
||||
import { LinearElementEditor } from "./element/linearElementEditor";
|
||||
import { mutateElement, newElementWith } from "./element/mutateElement";
|
||||
import {
|
||||
getBoundTextElementId,
|
||||
redrawTextBoundingBox,
|
||||
} from "./element/textElement";
|
||||
import {
|
||||
hasBoundTextElement,
|
||||
isBindableElement,
|
||||
isBoundToContainer,
|
||||
isImageElement,
|
||||
isTextElement,
|
||||
} from "./element/typeChecks";
|
||||
import { orderByFractionalIndex, syncMovedIndices } from "./fractionalIndex";
|
||||
import { getNonDeletedGroupIds } from "./groups";
|
||||
import { getObservedAppState } from "./store";
|
||||
import {
|
||||
arrayToMap,
|
||||
arrayToObject,
|
||||
@@ -28,10 +6,41 @@ import {
|
||||
isShallowEqual,
|
||||
isTestEnv,
|
||||
toBrandedType,
|
||||
} from "./utils";
|
||||
} from "@excalidraw/common";
|
||||
import {
|
||||
BoundElement,
|
||||
BindableElement,
|
||||
bindingProperties,
|
||||
updateBoundElements,
|
||||
} from "@excalidraw/element/binding";
|
||||
import { LinearElementEditor } from "@excalidraw/element/linearElementEditor";
|
||||
import {
|
||||
mutateElement,
|
||||
newElementWith,
|
||||
} from "@excalidraw/element/mutateElement";
|
||||
import {
|
||||
getBoundTextElementId,
|
||||
redrawTextBoundingBox,
|
||||
} from "@excalidraw/element/textElement";
|
||||
import {
|
||||
hasBoundTextElement,
|
||||
isBindableElement,
|
||||
isBoundToContainer,
|
||||
isImageElement,
|
||||
isTextElement,
|
||||
} from "@excalidraw/element/typeChecks";
|
||||
|
||||
import { getNonDeletedGroupIds } from "@excalidraw/element/groups";
|
||||
|
||||
import {
|
||||
orderByFractionalIndex,
|
||||
syncMovedIndices,
|
||||
} from "@excalidraw/element/fractionalIndex";
|
||||
|
||||
import type { BindableProp, BindingProp } from "@excalidraw/element/binding";
|
||||
|
||||
import type { ElementUpdate } from "@excalidraw/element/mutateElement";
|
||||
|
||||
import type { BindableProp, BindingProp } from "./element/binding";
|
||||
import type { ElementUpdate } from "./element/mutateElement";
|
||||
import type {
|
||||
ExcalidrawElement,
|
||||
ExcalidrawImageElement,
|
||||
@@ -41,14 +50,18 @@ import type {
|
||||
Ordered,
|
||||
OrderedExcalidrawElement,
|
||||
SceneElementsMap,
|
||||
} from "./element/types";
|
||||
} from "@excalidraw/element/types";
|
||||
|
||||
import type { SubtypeOf, ValueOf } from "@excalidraw/common/utility-types";
|
||||
|
||||
import { getObservedAppState } from "./store";
|
||||
|
||||
import type {
|
||||
AppState,
|
||||
ObservedAppState,
|
||||
ObservedElementsAppState,
|
||||
ObservedStandaloneAppState,
|
||||
} from "./types";
|
||||
import type { SubtypeOf, ValueOf } from "./utility-types";
|
||||
|
||||
/**
|
||||
* Represents the difference between two objects of the same type.
|
||||
|
||||
Reference in New Issue
Block a user