UNPKG

@mui/internal-docs-infra

Version:

MUI Infra - internal documentation creation tools.

29 lines 1.19 kB
import * as React from 'react'; import type { LoadCodeMeta, LoadSource, LoadVariantMeta, SourceEnhancers } from "../CodeHighlighter/types.mjs"; /** * Provides client-side functions for fetching source code and highlighting it. * Designed for cases where you need to render code blocks or demos based on * client-side state or dynamic content loading. * * The heavy functions are bundled eagerly here, so they resolve instantly with * no fetch - best when a layout will definitely render code. To keep them out of * the initial bundle (loaded on demand, deduped across the page), use * `CodeProviderLazy` instead. */ export declare function CodeProvider({ children, loadCodeMeta, loadVariantMeta, loadSource, sourceEnhancers }: { /** Child components that will have access to the code handling context */ children: React.ReactNode; /** Function to load code metadata from a URL */ loadCodeMeta?: LoadCodeMeta; /** Function to load specific variant metadata */ loadVariantMeta?: LoadVariantMeta; /** Function to load raw source code and dependencies */ loadSource?: LoadSource; sourceEnhancers?: SourceEnhancers; }): import("react/jsx-runtime").JSX.Element;