@mui/internal-docs-infra
Version:
MUI Infra - internal documentation creation tools.
17 lines • 963 B
text/typescript
import type { SourceEnhancer } from "../../CodeHighlighter/types.mjs";
/**
* Warms the emphasis-enhancer chunk so the next enhancement runs synchronously
* (no flash during live-edit re-enhancement). Optional — the wrapper loads on
* first use anyway; this is a head start, e.g. when a block becomes editable.
*/
export declare function preloadCodeEmphasis(): Promise<void>;
/** Clears the module cache. Intended for tests exercising the cold path. */
export declare function resetCodeEmphasisCache(): void;
/**
* Defers the `enhanceCodeEmphasis` chunk until a block actually enhances
* (client highlight or live edit). Runs synchronously once the chunk is warm so
* live-edit re-enhancement does not flash; returns a promise on the first cold
* call (the existing async-enhancer path handles it). Carries the same
* `enhancerName` so precomputed HAST skips it without loading anything.
*/
export declare const enhanceCodeEmphasisLazy: SourceEnhancer;