import { Ref } from 'vue'; /** ECharts' built-in easing names, restricted to the ones the defaults use. */ export type EasingName = 'linear' | 'cubicIn' | 'cubicOut' | 'cubicInOut'; export type Easing = (t: number) => number; /** Cubic easing functions matching zrender's implementations. */ export declare const easings: Record; /** * Cubic-bezier easing in the CSS sense — `cubicBezier(0.23, 1, 0.32, 1)` is the * curve ECharts' tooltip uses for position transitions. It is the library's one * bezier solver (`createCubicBezier` in utils), kept under this name for the * charts entry's animation vocabulary. */ export declare const cubicBezier: (x1: number, y1: number, x2: number, y2: number) => Easing; /** ECharts renders without animation above this many points. */ export declare const ANIMATION_THRESHOLD = 2000; /** First-render animation timing (ECharts `animationDuration`). */ export declare const ENTER_DURATION = 1000; /** Data-update animation timing (ECharts `animationDurationUpdate`). */ export declare const UPDATE_DURATION = 500; /** Hover/focus state timing (ECharts `stateAnimation.duration`). */ export declare const STATE_DURATION = 300; /** Tooltip fade timing (ECharts tooltip DOM transitions). */ export declare const TOOLTIP_FADE_DURATION = 200; /** Tooltip position timing (ECharts `tooltip.transitionDuration`). */ export declare const TOOLTIP_MOVE_DURATION = 400; /** ECharts tooltip hide delay, in milliseconds. */ export declare const TOOLTIP_HIDE_DELAY = 100; /** ECharts throttles tooltip pointer tracking to this interval. */ export declare const TOOLTIP_TRACK_THROTTLE = 50; /** Tooltip position easing: `cubic-bezier(0.23, 1, 0.32, 1)`. */ export declare const tooltipMoveEasing: Easing; /** True when the host asks for reduced motion, or when there is no DOM. */ export declare function prefersReducedMotion(): boolean; export interface TweenOptions { /** Duration in milliseconds. */ duration: number; /** Easing applied to the normalised progress. */ easing?: Easing; /** Milliseconds before the tween starts. */ delay?: number; /** Called with the eased progress on every frame. */ onUpdate: (progress: number) => void; /** Called once the tween reaches 1 (not called when cancelled). */ onComplete?: () => void; } /** * Run a one-shot animation; returns a cancel function. Returns a no-op cancel * when reduced motion is requested, after applying the final frame. */ export declare function tween(options: TweenOptions): () => void; export interface EnterProgressOptions { duration?: number; easing?: Easing; /** Return false to skip the enter animation (e.g. data above threshold). */ enabled?: () => boolean; } /** * Progress of the series' first render: 0 on the first frame, 1 once the enter * animation finished. Stays at 1 when reduced motion is requested or the data * exceeds ECharts' animation threshold. */ export declare function useEnterProgress(options?: EnterProgressOptions): Ref; export interface TweenedNumbersOptions { /** Update duration in milliseconds. */ duration?: number; easing?: Easing; /** * Starting value for indices that have no previous sample (a series that * just mounted, a data point that just appeared). Defaults to the target, so * new entries appear in place while existing ones animate. */ enter?: (index: number, target: number) => number; /** * Return false to update without animating (e.g. the series just mounted and * is already running its enter animation). */ enabled?: () => boolean; } /** * Tween a flat array of numbers towards its latest source on every change. * * Series flatten their geometry into a number array (`[x0, y0, x1, y1, …]`) and * read the tweened values back, which reproduces ECharts' `updateProps` morph * for data updates. Values are matched by index, so appending a point to a time * series animates only the new tail. */ export declare function useTweenedNumbers(source: () => readonly number[], options?: TweenedNumbersOptions): Ref;