/** * FLIP animation helpers. * * @module bquery/motion */ import type { ElementBounds, FlipGroupOptions, FlipOptions } from './types'; /** * Capture the current bounds of an element for FLIP animation. * * @param element - The DOM element to measure * @returns The element's current position and size */ export declare const capturePosition: (element: Element) => ElementBounds; /** * Perform a FLIP (First, Last, Invert, Play) animation. * Animates an element from its captured position to its current position. * * @param element - The element to animate * @param firstBounds - The previously captured bounds * @param options - Animation configuration * @returns Promise that resolves when animation completes * * @example * ```ts * const first = capturePosition(element); * // ... DOM changes that move the element ... * await flip(element, first, { duration: 300 }); * ``` */ export declare const flip: (element: Element, firstBounds: ElementBounds, options?: FlipOptions) => Promise; /** * FLIP helper for animating a list of elements. * Useful for reordering lists with smooth animations. * * @param elements - Array of elements to animate * @param performUpdate - Function that performs the DOM update * @param options - Animation configuration * * @example * ```ts * await flipList(listItems, () => { * container.appendChild(container.firstChild); // Move first to last * }); * ``` */ export declare const flipList: (elements: Element[], performUpdate: () => void, options?: FlipOptions) => Promise; /** * FLIP helper with optional stagger support. * * @param elements - Array of elements to animate * @param performUpdate - Function that performs the DOM update * @param options - Animation configuration */ export declare const flipElements: (elements: Element[], performUpdate: () => void, options?: FlipGroupOptions) => Promise; //# sourceMappingURL=flip.d.ts.map