import { KeyValue, Timing, Interp } from '@antv/x6-common'; import { Cell } from './cell'; export declare class Animation { protected readonly cell: Cell; protected readonly ids: { [path: string]: number; }; protected readonly cache: { [path: string]: { startValue: any; targetValue: any; options: Animation.StartOptions; }; }; constructor(cell: Cell); get(): string[]; start(path: string | string[], targetValue: T, options?: Animation.StartOptions, delim?: string): () => void; stop(path: string | string[], options?: Animation.StopOptions, delim?: string): this; private clean; private getTiming; private getInterp; private getArgs; } export declare namespace Animation { interface BaseOptions { delay: number; duration: number; timing: Timing.Names | Timing.Definition; } type TargetValue = string | number | KeyValue; interface CallbackArgs { cell: Cell; path: string; startValue: T; targetValue: T; } interface ProgressArgs extends CallbackArgs { progress: number; currentValue: T; } interface StopArgs extends CallbackArgs { jumpedToEnd?: boolean; } interface StartOptions extends Partial, StopOptions { interp?: Interp.Definition; /** * A function to call when the animation begins. */ start?: (options: CallbackArgs) => void; /** * A function to be called after each step of the animation, only once per * animated element regardless of the number of animated properties. */ progress?: (options: ProgressArgs) => void; } interface StopOptions { /** * A Boolean indicating whether to complete the animation immediately. * Defaults to `false`. */ jumpedToEnd?: boolean; /** * A function that is called once the animation completes. */ complete?: (options: CallbackArgs) => void; /** * A function to be called when the animation stops. */ stop?: (options: StopArgs) => void; /** * A function to be called when the animation completes or stops. */ finish?: (options: CallbackArgs) => void; } const defaultOptions: BaseOptions; }