feat(commands): add tool mode commands

This commit is contained in:
syntaxbullet
2026-07-03 10:12:28 +02:00
parent c23efeb397
commit 9e1050e5f3
5 changed files with 91 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
import { documentCommands } from "@commands/document";
import { createCommandRegistry } from "@commands/registry";
import { selectionCommands } from "@commands/selection";
import { toolCommands } from "@commands/tool";
import { viewportCommands } from "@commands/viewport";
import { createInitialAppState } from "@editor/initial-state";
import { createAppStore } from "@editor/store";
@@ -8,7 +9,7 @@ import { createAppStore } from "@editor/store";
export type ImageStudioApp = ReturnType<typeof createImageStudioApp>;
export function createImageStudioApp(options?: { documentName?: string; createDefaultArtboard?: boolean }) {
const registry = createCommandRegistry([...viewportCommands, ...selectionCommands, ...documentCommands]);
const registry = createCommandRegistry([...viewportCommands, ...selectionCommands, ...documentCommands, ...toolCommands]);
const store = createAppStore(createInitialAppState(options?.documentName), registry);
if (options?.createDefaultArtboard !== false) {