import { createCommandRegistry } from "@commands/registry"; import { selectionCommands } from "@commands/selection"; import { viewportCommands } from "@commands/viewport"; import { createInitialAppState } from "@editor/initial-state"; import { createAppStore } from "@editor/store"; export type ImageStudioApp = ReturnType; export function createImageStudioApp(options?: { documentName?: string }) { const registry = createCommandRegistry([...viewportCommands, ...selectionCommands]); const store = createAppStore(createInitialAppState(options?.documentName), registry); return { registry, store, }; }