From 3e89d2998588f8e35c524e523ba2ee853f0f6475 Mon Sep 17 00:00:00 2001 From: Maze Winther Date: Mon, 20 Apr 2026 11:31:17 +0200 Subject: refactor: restructure files to their domains, new preview overlay system, and dep graph --- apps/web/src/lib/clipboard/handlers/elements.ts | 48 ------------------------- 1 file changed, 48 deletions(-) delete mode 100644 apps/web/src/lib/clipboard/handlers/elements.ts (limited to 'apps/web/src/lib/clipboard/handlers/elements.ts') diff --git a/apps/web/src/lib/clipboard/handlers/elements.ts b/apps/web/src/lib/clipboard/handlers/elements.ts deleted file mode 100644 index 1b58ac78..00000000 --- a/apps/web/src/lib/clipboard/handlers/elements.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { PasteCommand } from "@/lib/commands/timeline"; -import type { ClipboardHandler } from "../types"; - -export const ElementsClipboardHandler = { - type: "elements", - - canCopy({ selectedElements }) { - return selectedElements.length > 0; - }, - - copy({ editor, selectedElements }) { - if (selectedElements.length === 0) { - return null; - } - - const results = editor.timeline.getElementsWithTracks({ - elements: selectedElements, - }); - const items = results.map(({ track, element }) => { - const { id: _elementId, ...elementWithoutId } = element; - return { - trackId: track.id, - trackType: track.type, - element: elementWithoutId, - }; - }); - - if (items.length === 0) { - return null; - } - - return { - type: "elements", - items, - }; - }, - - paste(entry, context) { - if (entry.items.length === 0) { - return null; - } - - return new PasteCommand({ - time: context.time, - clipboardItems: entry.items, - }); - }, -} satisfies ClipboardHandler<"elements">; -- cgit v1.3.1