import { defineToolcraft } from "../schema/define-toolcraft"; import { createToolcraftState } from "./create-template-state"; import type { ToolcraftInitialState } from "./types"; export function createState(initialState?: ToolcraftInitialState) { const app = defineToolcraft({ base: { identity: { id: "runtime-test", title: "Toolcraft App" }, canvas: { enabled: true, size: { width: 1024, height: 768, unit: "px" }, }, panels: { controls: { sections: [ { id: "test-section-1", controls: { opacity: { applicability: { mode: "always" as const }, defaultValue: 75, target: "selectedLayer.opacity", type: "slider", }, }, }, ], title: "Controls", }, }, }, modules: [], }); return createToolcraftState(app, initialState); }