import { AnimationEditorController, type AnimationEffectsToolProviderOptions, type AnimationEditorOptions, type AnimationEditorState, type AnimationEditorToolProviderOptions, type MotionScene } from "@pixerate/editor/animation-editor"; import type { EditorDocument } from "@pixerate/editor/persistence"; import type { ToolRegistry } from "@pixerate/editor/tools"; export interface SvelteAnimationEditor { readonly controller: AnimationEditorController; /** The save / load / undo contract (for `createEditorAutosave` or `createDocumentToolProvider`). */ readonly editorDocument: EditorDocument; /** The controller's state (reactive, including each played frame). */ readonly state: AnimationEditorState; play(): void; pause(): void; toggle(): void; seek(time: number): void; undo(): void; redo(): void; /** The frame at the playhead as SVG. */ toSvg(): string; /** Stops listening to the controller (and destroys it when this rune created it). */ destroy(): void; } /** * Svelte 5 rune: subscribes to an `AnimationEditorController` (or creates one from options) * and exposes its state reactively with bound actions. */ export declare function createAnimationEditor(controllerOrOptions?: AnimationEditorController | AnimationEditorOptions): SvelteAnimationEditor; /** Reactive state of a (possibly replaced) controller prop, for use inside components. */ export declare function animationEditorStateOf(getController: () => AnimationEditorController): { readonly current: AnimationEditorState; }; /** * Registers the animation editor's agent tools (`get_animation`, `add_commands`, * `export_flair_effect`, …) for the lifetime of the calling component (call it during * initialisation). Pass a getter to follow a changing registry. */ export declare function useAnimationEditorTools(registry: ToolRegistry | null | undefined | (() => ToolRegistry | null | undefined), controller: AnimationEditorController, options?: AnimationEditorToolProviderOptions): void; /** * Registers the animation editor's provider-effect tools (`search_effects`, `apply_effect`, * `add_vector_effect`, …) for the lifetime of the calling component. They work once an effects * provider is registered (see `useEffects`). */ export declare function useAnimationEffectsTools(registry: ToolRegistry | null | undefined | (() => ToolRegistry | null | undefined), controller: AnimationEditorController, options?: AnimationEffectsToolProviderOptions): void;