refactor(commands): centralize command ids

This commit is contained in:
syntaxbullet
2026-07-03 11:31:02 +02:00
parent 8320203f11
commit 84a610f019
15 changed files with 66 additions and 38 deletions

View File

@@ -1,4 +1,5 @@
import { documentCommands } from "@commands/document";
import { commandIds } from "@commands/ids";
import { createCommandRegistry } from "@commands/registry";
import { selectionCommands } from "@commands/selection";
import { toolCommands } from "@commands/tool";
@@ -13,7 +14,7 @@ export function createImageStudioApp(options?: { documentName?: string; createDe
const store = createAppStore(createInitialAppState(options?.documentName), registry);
if (options?.createDefaultArtboard !== false) {
store.dispatch("document.addArtboard", {
store.dispatch(commandIds.documentAddArtboard, {
id: crypto.randomUUID(),
name: "Artboard 1",
bounds: { x: -400, y: -300, w: 800, h: 600 },