import { SpringPreset } from '../core/spring'; import { IconInput } from '../core/types'; import { Morph, MorphOptions, PathEl, ReducedMotionMode } from './index'; /** Imperative surface exposed by every binding (ref / bind:this / element). */ export interface MorphHandle { morphTo: (icon: IconInput, spring?: SpringPreset | MorphOptions) => void; set: (icon: IconInput) => void; seek?: (icon: IconInput, t: number) => void; } /** The mode-deciding props, shared by every binding's prop surface. */ export interface MorphModeProps { icon?: IconInput; from?: IconInput; to?: IconInput; progress?: number; } export interface MorphCtrlProps extends MorphModeProps { reducedMotion?: ReducedMotionMode; } export interface MorphWatchProps extends MorphCtrlProps { spring?: SpringPreset | MorphOptions; } /** The initial d is a constant for every binding: computed once from the * mount-time props (server and client produce the same string → hydration * without mismatch) and from then on only the driver mutates it outside the * template. */ export declare function computeInitialD({ icon, from, to, progress }: MorphModeProps): string; /** Per-instance driver state — the exact logic of the React/Vue bindings * (mount, mode watch, controlled seek with re-basing, imperative). * * Lifecycle contract: * - Lazy driver: an iconless mount keeps the element and births the driver * on the FIRST icon that shows up (prop or imperative). `morphTo` with no * driver behaves as `set` — there is nothing to fly from. * - Controlled wins: while `from` and `to` are both present the pair owns * the path and `icon` changes are ignored; dropping the pair hands the * path back to `icon`. * - Every exit from controlled mode (imperative call or icon takeover) * invalidates the frozen pair, so returning to it re-bases on `from`. */ export declare function createController({ icon, from, to, progress, reducedMotion, }: MorphCtrlProps): { mount(mountEl: PathEl, { icon: mIcon, from: mFrom, to: mTo, progress: mProgress, reducedMotion: mReducedMotion }: MorphCtrlProps): void; destroy(): void; watch({ icon: wIcon, from: wFrom, to: wTo, progress: wProgress, spring, reducedMotion: wReducedMotion }: MorphWatchProps): void; morphTo(targetIcon: IconInput, spring?: SpringPreset | MorphOptions): void; set(targetIcon: IconInput): void; seek(targetIcon: IconInput, t: number): void; getMorph(): Morph | null; };