import { type Animatable, type Scheduler } from '@underlying/core'; import { type ScalarControls } from './handle'; /** An element that can be stroke-drawn: reports its length and has a writable style. */ export interface DrawElement { getTotalLength(): number; style: { strokeDasharray: string; strokeDashoffset: string; }; } /** A draw source: a CSS selector or a stroked geometry element. */ export type DrawInput = string | DrawElement; export interface DrawOptions { /** Scheduler driving the value and the style flush. Defaults to the shared one. */ scheduler?: Scheduler; /** Initial draw fraction, 0..1 (0 hidden, 1 drawn). Default 0. */ from?: number; /** Spring to this fraction on creation - a familiar one-call form. */ to?: number; } /** * Low-level binder: map a driver Animatable (0..1) onto an element's stroke * draw-on (0 = hidden, 1 = fully drawn) via stroke-dasharray/offset. You own the * driver. Returns an unbind fn that restores the original dash properties. */ export declare function bindDraw(path: DrawInput, source: Animatable, options?: DrawOptions): () => void; export interface Draw extends ScalarControls { /** The live 0..1 draw fraction (0 hidden, 1 drawn). Compose it anywhere. */ readonly fraction: Animatable; } /** * Draw a stroke on, physics-first. The fraction is a live Animatable - spring it * in (it can overshoot), interrupt it mid-draw, flick it, or scrub it from * scroll. Restores the original stroke-dash properties on revert(). */ export declare function draw(path: DrawInput, options?: DrawOptions): Draw; //# sourceMappingURL=draw.d.ts.map