mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
26 lines
1.0 KiB
TypeScript
26 lines
1.0 KiB
TypeScript
import { TransitionState } from "../../core/ui/transition.js";
|
|
import { State } from "@videojs/store";
|
|
//#region src/dom/ui/transition.d.ts
|
|
interface TransitionApi {
|
|
state: State<TransitionState>;
|
|
open(el?: HTMLElement | null): Promise<void>;
|
|
close(el: HTMLElement | null): Promise<void>;
|
|
cancel(): void;
|
|
destroy(): void;
|
|
}
|
|
/**
|
|
* Manages open/close transition lifecycle via `createState`.
|
|
*
|
|
* **Open:** patches `{ active: true, status: 'starting' }`, then after a
|
|
* double-RAF patches `{ status: 'idle' }` so the browser paints the
|
|
* initial ("from") state before transitioning. Reopening an active transition
|
|
* flushes styles first so CSS transitions can restart.
|
|
*
|
|
* **Close:** patches `{ status: 'ending' }` (keeping `active: true` so the
|
|
* element stays mounted), then after a double-RAF waits for
|
|
* `getAnimations()` to settle before patching `{ active: false, status: 'idle' }`.
|
|
*/
|
|
declare function createTransition(): TransitionApi;
|
|
//#endregion
|
|
export { TransitionApi, createTransition };
|
|
//# sourceMappingURL=transition.d.ts.map
|