import { VideoEditorController, TranscriptVideoController, type TranscriptVideoOptions, type TranscriptVideoState, type VideoDialogueToolProviderOptions, type VideoMusicToolProviderOptions, type VideoEffectsToolProviderOptions, type VideoEditorOptions, type VideoEditorState, type VideoEditorToolProviderOptions, type VideoEditResult, type VideoProject } from "@pixerate/editor/video-editor"; import type { EditorDocument } from "@pixerate/editor/persistence"; import type { ToolRegistry } from "@pixerate/editor/tools"; export interface SvelteVideoEditor { readonly controller: VideoEditorController; /** The save / load / undo contract (for `createEditorAutosave` or `createDocumentToolProvider`). */ readonly editorDocument: EditorDocument; /** The controller's state (reactive, including the playhead while playing). */ readonly state: VideoEditorState; play(): void; pause(): void; toggle(): void; /** Moves the playhead (ms). */ seek(time: number): void; /** Moves the playhead by whole frames (negative steps back), pausing. */ step(frames: number): void; undo(): void; redo(): void; /** Splits the selected clips (or every clip) under the playhead, as one undo step. */ splitAtPlayhead(): VideoEditResult; /** Deletes the selected clips; `ripple` closes the gaps they leave. */ deleteSelection(options?: { ripple?: boolean; }): VideoEditResult; /** Stops listening to the controller (and destroys it when this rune created it). */ destroy(): void; } /** * Svelte 5 rune: subscribes to a `VideoEditorController` (or creates one from options) and * exposes its state reactively with bound actions. */ export declare function createVideoEditor(controllerOrOptions?: VideoEditorController | VideoEditorOptions): SvelteVideoEditor; /** Reactive state of a (possibly replaced) controller prop, for use inside components. */ export declare function videoEditorStateOf(getController: () => VideoEditorController): { readonly current: VideoEditorState; }; /** * Registers the video editor's agent tools (`get_video_project`, `add_video_clip`, * `render_video_frame`, …) for the lifetime of the calling component (call it during * initialisation). Pass a getter to follow a changing registry. */ export declare function useVideoEditorTools(registry: ToolRegistry | null | undefined | (() => ToolRegistry | null | undefined), controller: VideoEditorController, options?: VideoEditorToolProviderOptions): void; /** * Registers the video editor's effect tools (`search_effects`, `describe_effect`, `apply_effect`, * `add_video_effect_clip`, `set_video_effect_transition`, …) for the lifetime of the calling * component. They work once an effects provider is registered (see `useEffects`); before that the * read tools say so and the write tools refuse. */ export declare function useVideoEffectsTools(registry: ToolRegistry | null | undefined | (() => ToolRegistry | null | undefined), controller: VideoEditorController, options?: VideoEffectsToolProviderOptions): void; /** * Registers the talking-head cleanup tools (`find_video_disfluencies`, `plan_video_dialogue_cleanup`) * for the lifetime of the calling component (skill `pixerate-talking-head-edit`). */ export declare function useVideoDialogueTools(registry: ToolRegistry | null | undefined | (() => ToolRegistry | null | undefined), controller: VideoEditorController, options?: VideoDialogueToolProviderOptions): void; /** * Registers the music and mix tools (`find_video_beats`, `plan_video_beat_snap`, `duck_video_music`, * `measure_video_loudness`, `normalize_video_loudness`) for the lifetime of the calling component * (skill `pixerate-bgm-alignment`). */ export declare function useVideoMusicTools(registry: ToolRegistry | null | undefined | (() => ToolRegistry | null | undefined), controller: VideoEditorController, options?: VideoMusicToolProviderOptions): void; /** * Svelte 5 rune: a `TranscriptVideoController` over a video editor and its reactive state. It is * rebuilt when the editor, track or `planFirst` change, and destroyed with the calling component. */ export declare function transcriptVideoOf(getController: () => VideoEditorController, getOptions?: () => TranscriptVideoOptions): { readonly current: TranscriptVideoState; readonly transcript: TranscriptVideoController; };