UNPKG

@mui/internal-docs-infra

Version:

MUI Infra - internal documentation creation tools.

21 lines 1.37 kB
import type { CreateTransformedFiles } from "./TransformEngine.mjs"; import type { TransformEngineLoader } from "../CodeProvider/CodeContext.mjs"; /** Built-in loader, used when no provider supplies a `transformEngineLoader`. */ export declare const defaultTransformEngineLoader: TransformEngineLoader; /** Synchronously reads the cached applier, or `undefined` if not yet resolved. */ export declare function peekTransformEngine(): CreateTransformedFiles | undefined; /** * Resolves the applier (from the warm cache, else via the loader) and caches it. * Returns the cached value synchronously when warm. Rejects if the load fails; * callers decide whether to surface or swallow that. */ export declare function loadTransformEngine(loader?: TransformEngineLoader): CreateTransformedFiles | Promise<CreateTransformedFiles>; /** * Eagerly resolves and caches the applier so the next transform swap (and the * first transform-bearing block's first render) build synchronously instead of * flashing un-transformed files. Fire-and-forget — fails open. Pass the provider's * `transformEngineLoader` to share its page-wide deduplication. */ export declare function preloadTransformEngine(loader?: TransformEngineLoader): Promise<void>; /** Clears the cache so the next resolve loads from scratch. For tests. */ export declare function resetTransformEngineCache(): void;