@visactor/vrender-components
Version:
components library for dp visualization
14 lines (13 loc) • 806 B
TypeScript
import type { IAnimate, IGraphic } from '@visactor/vrender-core';
export type ExitReleaseCallbackState = {
finalized: boolean;
removeFromParent: boolean;
onComplete: (() => void)[];
};
export type AnimateExitReleaseState = ExitReleaseCallbackState & {
pendingAnimates: Set<IAnimate>;
};
export declare function collectTrackedAnimates(graphic: IGraphic, animates?: IAnimate[], visited?: Set<IAnimate>): IAnimate[];
export declare function appendExitReleaseCallback(state: ExitReleaseCallbackState | undefined, callback?: () => void): void;
export declare function runExitReleaseCallbacks(callbacks: (() => void)[]): void;
export declare function bindExitReleaseAnimates<T extends AnimateExitReleaseState>(exitAnimates: IAnimate[], getState: () => T | undefined, finalize: () => void): void;