@mui/internal-docs-infra
Version:
MUI Infra - internal documentation creation tools.
16 lines • 787 B
text/typescript
import type { UseCoordinatedSwapOptions, UseCoordinatedSwapResult } from "./types.mjs";
/**
* The generalized fallback<->content swap state machine extracted from
* `CodeHighlighterClient`. Decides whether to show the fallback or the content,
* owns the force-mount-once behavior, collects data hoisted up from the
* fallback, suppresses nested-fallback flicker, and registers with a settle
* gate so the page can coordinate when every initial swap has landed.
*
* `showFallback` is the generalization of `isFallbackRendered`:
* ```ts
* hasFallback && !skipFallback && (
* !ready || defer || isNested || !fallbackMounted || (requireHoist && !hasHoisted)
* )
* ```
*/
export declare function useCoordinatedSwap(options: UseCoordinatedSwapOptions): UseCoordinatedSwapResult;