refactor: separate elements logic into a standalone package (#9285)

This commit is contained in:
Marcel Mraz
2025-03-26 15:24:59 +01:00
committed by GitHub
parent a18f059188
commit 432a46ef9e
372 changed files with 3463 additions and 2463 deletions
@@ -1,15 +1,20 @@
import React, { useEffect, useRef } from "react";
import { CURSOR_TYPE } from "../../constants";
import { t } from "../../i18n";
import { isRenderThrottlingEnabled } from "../../reactUtils";
import { renderInteractiveScene } from "../../renderer/interactiveScene";
import { isShallowEqual, sceneCoordsToViewportCoords } from "../../utils";
import {
CURSOR_TYPE,
isShallowEqual,
sceneCoordsToViewportCoords,
} from "@excalidraw/common";
import type {
NonDeletedExcalidrawElement,
NonDeletedSceneElementsMap,
} from "../../element/types";
} from "@excalidraw/element/types";
import { t } from "../../i18n";
import { isRenderThrottlingEnabled } from "../../reactUtils";
import { renderInteractiveScene } from "../../renderer/interactiveScene";
import type {
InteractiveCanvasRenderConfig,
RenderableElementsMap,
@@ -1,9 +1,10 @@
import { useEffect, useRef } from "react";
import type { NonDeletedSceneElementsMap } from "@excalidraw/element/types";
import { isRenderThrottlingEnabled } from "../../reactUtils";
import { renderNewElementScene } from "../../renderer/renderNewElementScene";
import type { NonDeletedSceneElementsMap } from "../../element/types";
import type {
RenderableElementsMap,
StaticCanvasRenderConfig,
@@ -1,13 +1,15 @@
import React, { useEffect, useRef } from "react";
import { isRenderThrottlingEnabled } from "../../reactUtils";
import { renderStaticScene } from "../../renderer/staticScene";
import { isShallowEqual } from "../../utils";
import { isShallowEqual } from "@excalidraw/common";
import type {
NonDeletedExcalidrawElement,
NonDeletedSceneElementsMap,
} from "../../element/types";
} from "@excalidraw/element/types";
import { isRenderThrottlingEnabled } from "../../reactUtils";
import { renderStaticScene } from "../../renderer/staticScene";
import type {
RenderableElementsMap,
StaticCanvasRenderConfig,