import type { Effect } from "../types.js"; import type { VFX } from "../vfx.js"; import { type TransitionFrame, TransitionStage } from "./effect.js"; import { type HistorySpecs } from "./history.js"; import type { AddTransitionOpts, RunOpts, ShowOpts, SlideRef, Transition, TransitionClass, TransitionEase, TransitionHandle } from "./types.js"; import { type UATransitions } from "./ua-transition.js"; export type ResolvedSpec = { transition: Transition | TransitionClass; /** Constructor params. Only used with a class. */ params: unknown; reverse: boolean; duration: number; /** The spec's own; the transition's fills in later. */ overflow: true | number | undefined; ease: TransitionEase | undefined; }; /** * Put `top` over `base`, field by field. * A `top` that sets `transition` drops the base params, so they never reach another class. */ export declare function layerSpec(base: RunOpts, top: RunOpts): RunOpts; /** Put the run options over the container defaults, then fill in the rest. */ export declare function resolveSpec(opts: AddTransitionOpts, run?: RunOpts): ResolvedSpec; /** Shallow equal; arrays compare by item. Missing params equal empty ones. */ export declare function sameParams(a: unknown, b: unknown): boolean; /** Wait for pending images, videos and `fonts`, or until the timeout. */ export declare function waitForMedia(root: ParentNode, fonts: Promise | undefined, timeoutMs?: number): Promise; export type TransitionHost = Pick; export type TransitionStageLike = Effect & Pick & { readonly frame: TransitionFrame | null; }; export declare class TransitionController implements TransitionHandle { #private; constructor(vfx: TransitionHost, element: HTMLElement, opts?: AddTransitionOpts, onDestroy?: () => void, stage?: TransitionStageLike, history?: HistorySpecs, uaTransitions?: UATransitions); get running(): boolean; show(slide: SlideRef, opts?: ShowOpts): Promise; run(cb: () => void | Promise, opts?: RunOpts | (() => RunOpts)): Promise; cancel(): void; destroy(): void; }