import { VectorEditorController, type VectorEffectsToolProviderOptions, type VectorGenerationToolProviderOptions, type VectorCommandOptions, type VectorEditorOptions, type VectorEditorState, type VectorTool, type VectorDocument } from "@pixerate/editor/vector"; import type { EditorDocument } from "@pixerate/editor/persistence"; import type { ToolRegistry } from "@pixerate/editor/tools"; export interface SvelteVectorEditor { readonly controller: VectorEditorController; /** The save / load / undo contract (for `createEditorAutosave` or `createDocumentToolProvider`). */ readonly editorDocument: EditorDocument; /** The controller's state (reactive). */ readonly state: VectorEditorState; setTool(tool: VectorTool): void; undo(): void; redo(): void; deleteSelection(): void; toSvg(): string; /** Stops listening to the controller (and destroys it when this rune created it). */ destroy(): void; } /** * Svelte 5 rune: subscribes to a `VectorEditorController` (or creates one from options) and * exposes its state reactively with bound actions. */ export declare function createVectorEditor(controllerOrOptions?: VectorEditorController | VectorEditorOptions): SvelteVectorEditor; /** Anything with `register(specs) → unregister` (a `CommandRegistry`). */ export interface VectorCommandTarget { register(specs: any): () => void; } /** * Registers the controller's palette / agent commands (`vector.addShape`, `vector.boolean`, …) * 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 useVectorCommands(registry: VectorCommandTarget | null | undefined | (() => VectorCommandTarget | null | undefined), controller: VectorEditorController, options?: VectorCommandOptions): void; /** * Registers the vector editor's provider-effect tools (`search_effects`, `apply_effect`, …) for the * lifetime of the calling component. They work once an effects provider is registered (see * `useEffects`). */ export declare function useVectorEffectsTools(registry: ToolRegistry | null | undefined | (() => ToolRegistry | null | undefined), controller: VectorEditorController, options?: VectorEffectsToolProviderOptions): void; /** * Registers the vector editor's generative-prompt tools (`list_vector_art_models`, * `generate_vector_art`, `regenerate_vector_art`) for the lifetime of the calling component. * Pass `options` as a function to change models or the generator later. */ export declare function useVectorGenerationTools(registry: ToolRegistry | null | undefined | (() => ToolRegistry | null | undefined), controller: VectorEditorController, options: VectorGenerationToolProviderOptions | (() => VectorGenerationToolProviderOptions)): void;