UNPKG

@atlaskit/motion

Version:

A set of utilities to apply motion in your application.

15 lines (14 loc) • 631 B
import type { ResizingOpts } from './use-resizing'; export interface ResizingObserver { suppress: () => void; disconnect: () => void; } /** * Observe natural sizes and let the browser own the animation timeline. A mutation * temporarily detaches the effect so the next observation sees the natural size. * If that size is unchanged, reattach the same effect without restarting its clock. * This keeps content mounted and preserves CSS constraints and text truncation. */ export declare function observeResizing(element: HTMLElement, getOptions: () => ResizingOpts & { shouldAnimate: boolean; }): ResizingObserver;