import { AnimateViewProps, ViewAnimationType } from './types'; /** * A live `` component instance. Implemented by the component * composable; consumed by the `startTransition` helper. */ export interface AnimateViewHandle { uid: string; /** * The `view-transition-name`s currently written to the instance's root * element(s). Empty when not participating in a transition. */ layerNames: string[]; /** Write `view-transition-name` to the root element(s). */ applyLayerNames: () => void; /** Remove previously written `view-transition-name`s. */ removeLayerNames: () => void; /** Plain snapshot of the current props (safe to use after unmount). */ getProps: () => AnimateViewProps; /** Current shared-element pairing name (`name` prop), if any. */ getShareName: () => string | undefined; } export interface ViewTransitionParticipant { handle: AnimateViewHandle; layerNames: string[]; type: ViewAnimationType; props: AnimateViewProps; shareName?: string; /** Set when paired into a share animation driven by another participant. */ consumed?: boolean; } export interface ActiveViewTransition { types: string[]; participants: ViewTransitionParticipant[]; } export declare function registerAnimateView(handle: AnimateViewHandle): void; export declare function unregisterAnimateView(handle: AnimateViewHandle): void; export declare function getAnimateViews(): Set; export declare function getActiveViewTransition(): ActiveViewTransition | null; export declare function beginViewTransition(types: string[]): ActiveViewTransition; /** * Close participant registration once the transition's DOM update has * flushed. The transition's pseudo-element snapshot is taken after this * point, so no further lifecycle events can belong to it. */ export declare function closeViewTransitionRegistration(transition: ActiveViewTransition): void; export declare function endViewTransition(transition: ActiveViewTransition): void; /** * Store the cancel function for a participant's layer animation(s). * Multi-root participants produce one call per layer name — compose them. */ export declare function setViewTransitionCleanup(handle: AnimateViewHandle, cleanup: () => void): void; /** * Cancel a layer animation still playing for an unmounted instance. Also * suppresses its `onAnimationComplete` via the cleanup's `active` guard. */ export declare function cancelViewTransitionAnimation(handle: AnimateViewHandle): void; /** * Record that an instance is participating in the active transition. * The first recorded type wins within a single transition — an entering * element that also re-renders stays an "enter", not an "update". */ export declare function recordParticipant(type: ViewAnimationType, handle: AnimateViewHandle, transition?: ActiveViewTransition | null): void;