/** * Declarative enter/leave/move transitions for the view layer. * * This is a thin declarative binding over the existing `motion` primitives — * it does not implement a second animation engine. Enter/leave keyframes run * through the Web Animations API (the same path `motion` uses), FLIP moves * delegate to `motion`'s `flip()` / `capturePosition()`, and every transition * honours the shared reduced-motion preference via `prefersReducedMotion()`. * * Authors attach transitions with plain companion attributes that the * structural directives (`bq-if`, `bq-show`, `bq-for`) read: * * ```html *
*
  • *
  • * ``` * * @module bquery/view * @since 1.15.0 */ /** * Companion attributes consumed by structural directives to drive transitions. * The view pipeline treats these as passive (never warns about them and never * processes them as standalone directives). * * @internal */ export declare const TRANSITION_ATTRS: readonly ["transition", "transition-duration", "transition-easing", "in", "out", "animate"]; /** Resolved transition configuration for an element. */ export type ViewTransitionConfig = { /** Enter keyframes (hidden → visible), or `null` when no enter transition. */ enter: Keyframe[] | null; /** Leave keyframes (visible → hidden), or `null` when no leave transition. */ leave: Keyframe[] | null; /** Duration in milliseconds. */ duration: number; /** CSS easing string. */ easing: string; }; /** * Reads the transition companion attributes from an element and resolves them * into enter/leave keyframes plus timing. Returns `null` when the element has * no transition attributes at all, so callers can take their synchronous path. * * @internal */ export declare const resolveTransition: (el: Element, prefix: string) => ViewTransitionConfig | null; /** * Cancels any animations currently running on an element. Used to clear a * `fill: 'forwards'` leave animation before re-entering, and to avoid stacking * animations on rapid toggles. No-ops where `Element.getAnimations` is absent * (e.g. some test DOMs). * * @internal */ export declare const cancelTransitions: (el: Element) => void; /** * Runs a keyframe transition on an element and resolves when it finishes. * * Resolves immediately (a no-op) when there are no keyframes, when the user * prefers reduced motion, or when the Web Animations API is unavailable — in * every such case the caller's commit logic still runs, so behaviour is * identical to having no transition. * * @param fill - `'none'` for enter (revert to natural styles afterwards), * `'forwards'` for leave (hold the hidden end-state until the element is * removed, preventing a visible flash). * @internal */ export declare const runTransition: (el: Element, keyframes: Keyframe[] | null, config: ViewTransitionConfig, fill: "none" | "forwards") => Promise; //# sourceMappingURL=transitions.d.ts.map