import visit from 'unist-util-visit'; import type { IDumiUnifiedTransformer, IDumiElmNode } from '.'; import type { Transformer } from 'unified'; import type unified from 'unified'; type ICompiler = (this: Pick, 'data'>, node: Parameters>[0], index: Parameters>[1], parent: Parameters>[2], vFile: Parameters[1]) => ReturnType>; export interface IMarkdwonComponent { /** * The markdown component name which should always start with a capital letter */ name: string; /** * The component path */ component: string; /** * The compiler function about how to parse the HTML Abstract Syntax Tree parsed by rehype * @see https://github.com/syntax-tree/hast for more details about the HTML Abstract Syntax Tree * @see https://github.com/syntax-tree/unist-util-visit-parents#returns for more details about the return value for this function */ compiler: ICompiler; } export declare function registerMdComponent(comp: IMarkdwonComponent): void; /** * remark plugin for parsing the customize markdwon components */ export default function mdComponent(): IDumiUnifiedTransformer; export {};