import { n as JSExecutorConfig, t as JSExecutor } from "./executor-BemsTZE1.js"; import { ReactNode } from "react"; import { TOCItemType } from "fumadocs-core/toc"; import { RehypeTOCItemType, StructuredData } from "fumadocs-core/mdx-plugins"; import { Root } from "hast"; import { MDXComponents } from "mdx/types"; interface MarkdownRenderer> { structuredData: StructuredData; render: (components?: MDXComponents, context?: Record) => Promise>; renderSync: (components?: MDXComponents, context?: Record) => MarkdownRendererResult; serialize: () => MarkdownRendererSerializedOptions; } interface MarkdownRendererResult> { exports: M; toc: TOCItemType[]; body: ReactNode; } type MarkdownRendererSerializedOptions = ({ type: 'js'; } & MarkdownRendererJSOptions) | ({ type: 'ast'; } & Omit); interface MarkdownRendererJSOptions { code: string; filePath: string; baseUrl?: string; structuredData?: StructuredData; /** the props of the content, like the params of a page of a dynamic file */ props?: Record; } interface MarkdownRendererASTOptions { tree: Root; filePath: string; structuredData?: StructuredData; rehypeToc?: RehypeTOCItemType[]; /** * the engine to execute JavaScript in Markdown, **not used for MDX files, MDX will always use native JS engine.** * * by default, it uses a virtual JS engine with limited features. */ executor?: (ctx: JSExecutorConfig) => JSExecutor; } declare function fromSerialized(options: MarkdownRendererSerializedOptions): MarkdownRenderer; export { MarkdownRendererSerializedOptions as a, MarkdownRendererResult as i, MarkdownRendererASTOptions as n, fromSerialized as o, MarkdownRendererJSOptions as r, MarkdownRenderer as t }; //# sourceMappingURL=renderer-BryMoHk0.d.ts.map