/** * Animates an element using keyframes. Returns a promise that resolves after the animation completes or gets canceled. */ export declare function animateTo(el: HTMLElement, keyframes: Keyframe[], options?: KeyframeAnimationOptions): Promise; /** Parses a CSS duration and returns the number of milliseconds. */ export declare function parseDuration(delay: number | string): number; /** Tells if the user has enabled the "reduced motion" setting in their browser or OS. */ export declare function prefersReducedMotion(): boolean; /** * Stops all active animations on the target element. Returns a promise that resolves after all animations are canceled. */ export declare function stopAnimations(el: HTMLElement): Promise; /** * We can't animate `height: auto`, but we can calculate the height and shim keyframes by replacing it with the * element's scrollHeight before the animation. */ export declare function shimKeyframesHeightAuto(keyframes: Keyframe[], calculatedHeight: number): { height: string | number | null | undefined; composite?: CompositeOperationOrAuto; easing?: string; offset?: number | null; }[]; /** * 显示动画 * * await animateTo(this.contentElement,shimKeyframesHeightAuto(this.active ?animate_show:animate_hide,this.active?currentHeight:oldHeight), { * duration: duration, * easing: 'ease' * }); */ export declare const animate_show: ({ height: number; overflow: string; } | { height: string; overflow: string; })[]; /** * 隐藏动画 */ export declare const animate_hide: ({ height: string; overflow: string; } | { height: number; overflow: string; })[];