UNPKG

@mui/internal-docs-infra

Version:

MUI Infra - internal documentation creation tools.

24 lines 1.08 kB
/** * Four-state paused→active animation phase shared by * `useTransformManagement` and `useVariantSelection`. Each swap * window enters a "paused" value first (`'collapsed'` pre-swap or * `'expanded'` post-swap) so the rendered `<Pre>` can settle into * the animation start state; the host then advances to the matching * active value (`'expanding'` / `'collapsing'`) once readiness fires. */ export type TransitionPhase = 'collapsed' | 'expanding' | 'expanded' | 'collapsing' | null; /** * Tracks the paused→active handshake for a single phase source. * * `windowKey` is an opaque identifier the caller composes from * whatever uniquely identifies the current swap window (typically * `(from, to, postSwap)`). The readiness flag is keyed against it so * every new window starts with a fresh wait — `notify()` only marks * the current window ready, and a subsequent window flip * automatically falls back to "not ready" without any explicit * reset. */ export declare function useTransitionPhase(windowKey: string): { ready: boolean; notify: () => void; };