export interface ViewTransitionControllerOptions { /** The document whose `startViewTransition` should be used. */ document?: Document; /** Whether view transitions are enabled for this viewer. */ enabled: boolean; } /** * `document.startViewTransition` wrapper (#12). Runs the given * update callback inside a view transition, waiting for the DOM * mutation to commit before invoking the `afterUpdate` hook and * then awaiting the full animation. Degrades gracefully to an * instant update on engines without support. */ export declare class ViewTransitionController { private readonly enabled; private readonly doc; constructor(options: ViewTransitionControllerOptions); /** Whether the host environment supports the View Transitions API. */ get supported(): boolean; /** * Run `update` inside a view transition. Resolves once the DOM * callback has committed AND the animation has finished. On * unsupported engines, just runs `update()` directly. * * `afterUpdate` is invoked **inside** the startViewTransition * callback, after `update()` resolves but before the callback * returns. This is critical: the browser captures the new-state * snapshot the moment the callback returns, so any shared * `view-transition-name` on the origin element has to be cleared * before that snapshot or the UA sees two elements sharing the * same name and aborts the morph. #ref: regression from the * pre-refactor implementation which cleared during * updateCallbackDone (too late). */ run(update: () => void | Promise, afterUpdate?: () => void): Promise; }