import type { RsbuildConfig } from '@rsbuild/core'; import { RspressPlugin } from '@rspress/core'; declare interface CustomEntry { demoPath: string; } declare type IframeOptions = { /** * framework in the iframe * @default 'react' * @deprecated */ framework?: 'react'; /** * dev server port for the iframe * @default 7890 */ devPort?: number; builderConfig?: RsbuildConfig; /** * custom support for other web frameworks */ customEntry?: (meta: CustomEntry) => string; }; export declare type Options = { /** * determine how to handle a internal code block without meta like \`\`\`tsx * @default 'pure' */ defaultRenderMode?: 'pure' | 'preview'; /** * determine how to preview \`\`\`tsx preview code block * @default 'internal' */ defaultPreviewMode?: 'internal' | 'iframe-fixed' | 'iframe-follow'; /** * enable when preview mode is iframe. */ iframeOptions?: IframeOptions; /** * Supported languages to be previewed * @default ['jsx', 'tsx'] */ previewLanguages?: string[]; /** * Transform previewed code in custom way * @default ({ code }) => code */ previewCodeTransform?: (codeInfo: { language: string; code: string; }) => string; }; /** * The plugin is used to preview component. */ export declare function pluginPreview(options?: Options): RspressPlugin; export { }