From 811023fd592cb085d2708cb79c8397d85d8bb653 Mon Sep 17 00:00:00 2001 From: Deepen Timalsina Date: Tue, 15 Apr 2025 17:11:07 +0545 Subject: [PATCH] Move lasso folder, animated-trail.ts & animation-frame-handler.ts in src --- packages/excalidraw/components/App.tsx | 6 +++--- packages/excalidraw/components/SVGLayer.tsx | 2 +- packages/excalidraw/laser-trails.ts | 6 +++--- packages/excalidraw/{ => src}/animated-trail.ts | 4 ++-- packages/excalidraw/{ => src}/animation-frame-handler.ts | 0 packages/excalidraw/{ => src}/lasso/index.ts | 2 +- packages/excalidraw/{ => src}/lasso/utils.ts | 0 7 files changed, 10 insertions(+), 10 deletions(-) rename packages/excalidraw/{ => src}/animated-trail.ts (98%) rename packages/excalidraw/{ => src}/animation-frame-handler.ts (100%) rename packages/excalidraw/{ => src}/lasso/index.ts (99%) rename packages/excalidraw/{ => src}/lasso/utils.ts (100%) diff --git a/packages/excalidraw/components/App.tsx b/packages/excalidraw/components/App.tsx index 8dcaa0464..bcea51f11 100644 --- a/packages/excalidraw/components/App.tsx +++ b/packages/excalidraw/components/App.tsx @@ -380,7 +380,7 @@ import { ActionManager } from "../actions/manager"; import { actions } from "../actions/register"; import { getShortcutFromShortcutName } from "../actions/shortcuts"; import { trackEvent } from "../analytics"; -import { AnimationFrameHandler } from "../animation-frame-handler"; +import { AnimationFrameHandler } from "../src/animation-frame-handler"; import { getDefaultAppState, isEraserActive, @@ -454,7 +454,7 @@ import { import { Emitter } from "../emitter"; import { ElementCanvasButtons } from "../components/ElementCanvasButtons"; import { Store, CaptureUpdateAction } from "../store"; -import { AnimatedTrail } from "../animated-trail"; +import { AnimatedTrail } from "../src/animated-trail"; import { LaserTrails } from "../laser-trails"; import { withBatchedUpdates, withBatchedUpdatesThrottled } from "../reactUtils"; import { textWysiwyg } from "../src/wysiwyg/textWysiwyg"; @@ -462,7 +462,7 @@ import { isOverScrollBars } from "../src/scene/scrollbars"; import { isMaybeMermaidDefinition } from "../mermaid"; -import { LassoTrail } from "../lasso"; +import { LassoTrail } from "../src/lasso"; import { activeConfirmDialogAtom } from "./ActiveConfirmDialog"; import BraveMeasureTextError from "./BraveMeasureTextError"; diff --git a/packages/excalidraw/components/SVGLayer.tsx b/packages/excalidraw/components/SVGLayer.tsx index 815d463a3..5e74ddab4 100644 --- a/packages/excalidraw/components/SVGLayer.tsx +++ b/packages/excalidraw/components/SVGLayer.tsx @@ -2,7 +2,7 @@ import { useEffect, useRef } from "react"; import "./SVGLayer.scss"; -import type { Trail } from "../animated-trail"; +import type { Trail } from "../src/animated-trail"; type SVGLayerProps = { trails: Trail[]; diff --git a/packages/excalidraw/laser-trails.ts b/packages/excalidraw/laser-trails.ts index 7956ae5d2..d496c8efb 100644 --- a/packages/excalidraw/laser-trails.ts +++ b/packages/excalidraw/laser-trails.ts @@ -2,11 +2,11 @@ import { DEFAULT_LASER_COLOR, easeOut } from "@excalidraw/common"; import type { LaserPointerOptions } from "@excalidraw/laser-pointer"; -import { AnimatedTrail } from "./animated-trail"; +import { AnimatedTrail } from "./src/animated-trail"; import { getClientColor } from "./clients"; -import type { Trail } from "./animated-trail"; -import type { AnimationFrameHandler } from "./animation-frame-handler"; +import type { Trail } from "./src/animated-trail"; +import type { AnimationFrameHandler } from "./src/animation-frame-handler"; import type App from "./components/App"; import type { SocketId } from "./types"; diff --git a/packages/excalidraw/animated-trail.ts b/packages/excalidraw/src/animated-trail.ts similarity index 98% rename from packages/excalidraw/animated-trail.ts rename to packages/excalidraw/src/animated-trail.ts index af6162e99..02361407c 100644 --- a/packages/excalidraw/animated-trail.ts +++ b/packages/excalidraw/src/animated-trail.ts @@ -9,8 +9,8 @@ import { import type { LaserPointerOptions } from "@excalidraw/laser-pointer"; import type { AnimationFrameHandler } from "./animation-frame-handler"; -import type App from "./components/App"; -import type { AppState } from "./types"; +import type App from "../components/App"; +import type { AppState } from "../types"; export interface Trail { start(container: SVGSVGElement): void; diff --git a/packages/excalidraw/animation-frame-handler.ts b/packages/excalidraw/src/animation-frame-handler.ts similarity index 100% rename from packages/excalidraw/animation-frame-handler.ts rename to packages/excalidraw/src/animation-frame-handler.ts diff --git a/packages/excalidraw/lasso/index.ts b/packages/excalidraw/src/lasso/index.ts similarity index 99% rename from packages/excalidraw/lasso/index.ts rename to packages/excalidraw/src/lasso/index.ts index d59b2d743..8de752b39 100644 --- a/packages/excalidraw/lasso/index.ts +++ b/packages/excalidraw/src/lasso/index.ts @@ -31,7 +31,7 @@ import { AnimatedTrail } from "../animated-trail"; import { getLassoSelectedElementIds } from "./utils"; -import type App from "../components/App"; +import type App from "../../components/App"; export class LassoTrail extends AnimatedTrail { private intersectedElements: Set = new Set(); diff --git a/packages/excalidraw/lasso/utils.ts b/packages/excalidraw/src/lasso/utils.ts similarity index 100% rename from packages/excalidraw/lasso/utils.ts rename to packages/excalidraw/src/lasso/utils.ts