import { ParametersController, type ParameterCommandOptions, type ParametersControllerOptions, type ParameterSetResult, type ParametersState, type ParameterValue, type ParametersSnapshot } from "@pixerate/editor/parameters"; import type { EditorDocument } from "@pixerate/editor/persistence"; export interface SvelteParameters { readonly controller: ParametersController; /** The save / load / undo contract (for `createEditorAutosave` or `createDocumentToolProvider`). */ readonly editorDocument: EditorDocument; /** The controller's state (reactive). */ readonly state: ParametersState; /** Shorthand for `state.values` (reactive). */ readonly values: ParametersState["values"]; setValue(id: string, value: ParameterValue): ParameterSetResult; undo(): void; redo(): void; reset(ids?: readonly string[]): void; randomize(ids?: readonly string[]): void; /** Stops listening to the controller. */ destroy(): void; } /** * Svelte 5 rune: subscribes to a `ParametersController` (or creates one from options) and * exposes its state reactively with bound actions. */ export declare function createParameters(controllerOrOptions: ParametersController | ParametersControllerOptions): SvelteParameters; /** Anything with `register(specs) → unregister` (a `CommandRegistry`). */ export interface ParameterCommandTarget { register(specs: any): () => void; } /** * Registers the controller's palette / agent commands (`parameters.set`, `…randomize`, …) * for the lifetime of the calling component (call it during initialisation), so * `createCommandToolProvider` exposes them to agents. Pass a getter to follow a changing * registry. */ export declare function useParameterCommands(registry: ParameterCommandTarget | null | undefined | (() => ParameterCommandTarget | null | undefined), controller: ParametersController, options?: ParameterCommandOptions): void;