import { FusionSurfaceBud, FusionSurfaceTransition } from './types'; export interface FusionSurfaceDriverHooks { path: () => SVGPathElement | null; layer: (id: string) => HTMLElement | null; onBreak: (id: string) => void; onSettle: () => void; /** A bud removed from `buds` has finished closing and is gone. */ onLeave: (id: string) => void; } export interface FusionSurfaceDriverOptions { radius: number; fillet: number; breakAt: number; transition: FusionSurfaceTransition; contentBlur: number; reducedMotion: boolean; } export declare function fusionSurfaceOpenTarget(open: FusionSurfaceBud['open']): number; /** The layer's CSS box: `width` runs along the edge, `height` out of it. */ export declare function fusionSurfaceLayerSize(decl: FusionSurfaceBud): [number, number]; export declare class FusionSurfaceDriver { private readonly buds; private readonly hooks; private options; private size; private raf; private lastNow; private lastD; private destroyed; constructor(hooks: FusionSurfaceDriverHooks, options: FusionSurfaceDriverOptions); configure(options: Partial): void; setSize(width: number, height: number): void; /** Declarations in, targets out. A new bud starts closed and opens; a bud * that disappears from the list closes before it is dropped. */ setBuds(decls: readonly FusionSurfaceBud[]): void; /** Buds that were removed from the list and are still closing. */ leavingBuds(): FusionSurfaceBud[]; destroy(): void; private create; private edgeLength; private retarget; private wake; /** Whether a frame would change anything. Waking only then is what keeps * `settle` meaning "a motion finished" rather than "something re-rendered". */ private needsFrame; /** The neck has narrowed past the break point this frame. */ private breaks; private breakCache; /** The detach at which the default pinch reaches the break point (about * 96% of `breakAt`), by bisection; cached per `breakAt`. */ private breakDistance; /** A closed bud whose remnant has sunk is a fresh bud again: opening it * grows a new one instead of re-inflating the old drop. */ private reopens; /** A removed bud that has finished closing. */ private gone; private readonly tick; /** One frame of every spring, then the break, reopen and removal rules. */ private step; private shapeOf; draw(): void; private writeLayer; }