summaryrefslogtreecommitdiff
path: root/themes/blowfish/assets/lib/mermaid/docs.d.mts
blob: d6c95518cd5c7256e3968d3a9b50837b33cf980d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import type { Root } from 'mdast';
export declare const transformToBlockQuote: (content: string, type: string, customTitle?: string | null) => string;
/** Options for {@link transformMarkdownAst} */
interface TransformMarkdownAstOptions {
    /**
     * Used to indicate the original/source file.
     */
    originalFilename: string;
    /** If `true`, add a warning that the file is autogenerated */
    addAutogeneratedWarning?: boolean;
    /**
     * If `true`, remove the YAML metadata from the Markdown input.
     * Generally, YAML metadata is only used for Vitepress.
     */
    removeYAML?: boolean;
}
/**
 * Remark plugin that transforms mermaid repo markdown to Vitepress/GFM markdown.
 *
 * For any AST node that is a code block: transform it as needed:
 * - blocks marked as MERMAID_DIAGRAM_ONLY will be set to a 'mermaid' code block so it will be rendered as (only) a diagram
 * - blocks marked as MERMAID_EXAMPLE_KEYWORDS will be copied and the original node will be a code only block and the copy with be rendered as the diagram
 * - blocks marked as BLOCK_QUOTE_KEYWORDS will be transformed into block quotes
 *
 * If `addAutogeneratedWarning` is `true`, generates a header stating that this file is autogenerated.
 *
 * @returns plugin function for Remark
 */
export declare function transformMarkdownAst({ originalFilename, addAutogeneratedWarning, removeYAML, }: TransformMarkdownAstOptions): (tree: Root, _file?: any) => Root;
export {};