From 8bdc894690752b1a9b29beb98d128eb0eec27d42 Mon Sep 17 00:00:00 2001 From: Maze Winther Date: Sat, 18 Apr 2026 16:01:35 +0200 Subject: fix: migrate commands to CommandResult selection contract --- apps/web/src/lib/commands/base-command.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'apps/web/src/lib/commands/base-command.ts') diff --git a/apps/web/src/lib/commands/base-command.ts b/apps/web/src/lib/commands/base-command.ts index 2d0d04b7..b244f2f3 100644 --- a/apps/web/src/lib/commands/base-command.ts +++ b/apps/web/src/lib/commands/base-command.ts @@ -1,9 +1,23 @@ import type { EditorSelectionPatch } from "@/lib/selection/editor-selection"; +import type { ElementRef } from "@/lib/timeline/types"; export interface CommandResult { selection?: EditorSelectionPatch; } +export function createElementSelectionResult( + selectedElements: ElementRef[], +): CommandResult { + return { + selection: { + selectedElements, + selectedKeyframes: [], + keyframeSelectionAnchor: null, + selectedMaskPoints: null, + }, + }; +} + export abstract class Command { abstract execute(): CommandResult | undefined; -- cgit v1.3.1