diff options
| author | Maze Winther <mazewinther@gmail.com> | 2026-03-25 16:47:22 +0100 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2026-03-29 15:48:22 +0200 |
| commit | 8db3bead13441a5882d8689dfc6a9f09c82375d9 (patch) | |
| tree | e9d0cafa93904ffcbec3188c37961bcc16c6422d /apps/web/src/lib/actions/definitions.ts | |
| parent | 39ea298a9ccba3104c549c0ca079c231981811f5 (diff) | |
| download | opencut-8db3bead13441a5882d8689dfc6a9f09c82375d9.tar.gz | |
feat: masks, properties refactor, shaders, storage migrations, and more
Diffstat (limited to 'apps/web/src/lib/actions/definitions.ts')
| -rw-r--r-- | apps/web/src/lib/actions/definitions.ts | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/apps/web/src/lib/actions/definitions.ts b/apps/web/src/lib/actions/definitions.ts index 82319216..4d67c1ef 100644 --- a/apps/web/src/lib/actions/definitions.ts +++ b/apps/web/src/lib/actions/definitions.ts @@ -1,4 +1,4 @@ -import type { ShortcutKey } from "@/types/keybinding"; +import type { ShortcutKey } from "@/lib/actions/keybinding"; export type TActionCategory = | "playback" @@ -7,7 +7,8 @@ export type TActionCategory = | "selection" | "history" | "timeline" - | "controls"; + | "controls" + | "assets"; export interface TActionDefinition { description: string; @@ -114,10 +115,14 @@ export const ACTIONS = { category: "selection", defaultShortcuts: ["ctrl+a"], }, + "cancel-interaction": { + description: "Cancel current interaction", + category: "controls", + defaultShortcuts: ["escape"], + }, "deselect-all": { description: "Deselect all elements", category: "selection", - defaultShortcuts: ["escape"], }, "duplicate-selected": { description: "Duplicate selected element", @@ -146,11 +151,25 @@ export const ACTIONS = { category: "history", defaultShortcuts: ["ctrl+shift+z", "ctrl+y"], }, + "remove-media-asset": { + description: "Remove media asset", + category: "assets", + args: { projectId: "string", assetId: "string" }, + }, + "remove-media-assets": { + description: "Remove media assets", + category: "assets", + args: { projectId: "string", assetIds: "string[]" }, + }, } as const satisfies Record<string, TActionDefinition>; export type TAction = keyof typeof ACTIONS; -export function getActionDefinition({ action }: { action: TAction }): TActionDefinition { +export function getActionDefinition({ + action, +}: { + action: TAction; +}): TActionDefinition { return ACTIONS[action]; } |
