import { BuiltinTheme, Highlighter as Highlighter$1, ShikiTransformer, HighlighterCore } from 'shiki'; import { Processor } from 'unified'; import { ElementContent } from 'hast'; type MdcThemeOptions = BuiltinTheme | string | Record; interface HighlighterOptions { highlights?: number[]; meta?: string; } interface HighlightResult { tree: ElementContent[]; className?: string; style?: string; inlineStyle?: string; } type Highlighter = (code: string, lang: string, theme: MdcThemeOptions, options: Partial) => Promise; interface RehypeHighlightOption { theme?: MdcThemeOptions; highlighter?: Highlighter; } type Awaitable = T | Promise; interface MdcConfig { /** * Hooks for the unified markdown pipeline */ unified?: { /** * Custom setup for unified processor before other plugins */ pre?: (processor: Processor) => Awaitable; /** * Custom setup for unified processor after remark but before rehype */ remark?: (processor: Processor) => Awaitable; /** * Custom setup for unified processor after rehype */ rehype?: (processor: Processor) => Awaitable; /** * Custom setup for unified processor after all plugins */ post?: (processor: Processor) => Awaitable; }; /** * Custom hightlighter, available when `highlighter` is set to `custom` */ highlighter?: Highlighter$1; /** * Hooks for shiki */ shiki?: { /** * Get transformers for shiki */ transformers?: ShikiTransformer[] | ((code: string, lang: string, theme: MdcThemeOptions, options: Partial) => Awaitable); /** * Custom setup for shiki instance, only called once on server or client */ setup?: (highlighter: HighlighterCore) => Awaitable; }; } declare function defineConfig(config: MdcConfig): MdcConfig; export { type Awaitable as A, type HighlighterOptions as H, type MdcConfig as M, type RehypeHighlightOption as R, type MdcThemeOptions as a, type HighlightResult as b, type Highlighter as c, defineConfig as d };