import { type Animatable, type Scheduler } from '@underlying/core'; import type { PathGeometry } from './geometry'; import { type ScalarControls } from './handle'; /** A path element whose shape this package rewrites: geometry plus the `d` attribute. */ export interface MorphElement extends PathGeometry { getAttribute(name: string): string | null; setAttribute(name: string, value: string): void; } /** The shape to morph toward: raw path data (`"M ..."`) or any geometry/element. */ export type MorphTarget = string | PathGeometry; export interface MorphOptions { scheduler?: Scheduler; /** Points sampled along each outline; more is smoother (and heavier). Default 64. */ samples?: number; /** Close the interpolated outline - for closed shapes (a star, a blob). */ closed?: boolean; /** Initial morph fraction, 0..1 (0 = original shape, 1 = target). Default 0. */ from?: number; /** Spring to this fraction on creation. */ to?: number; } export interface Morph extends ScalarControls { /** The live 0..1 morph fraction (0 original, 1 target). Compose it anywhere. */ readonly fraction: Animatable; } /** * Morph one path into another, physics-first. Both outlines are resampled into * `samples` points along their length and interpolated, so any two shapes morph * (no matching command structure needed). The fraction is a live Animatable - * spring it, scrub it, or grab it mid-morph. `revert()` restores the original `d`. */ export declare function morph(element: MorphElement, target: MorphTarget, options?: MorphOptions): Morph; //# sourceMappingURL=morph.d.ts.map