import type { Handle } from 'mdast-util-to-markdown'; import type { PageFrontmatter } from 'myst-frontmatter'; import type { Root } from 'myst-spec'; import type { VFile } from 'vfile'; import type { NestedKinds, NestedState, Validator } from './types.js'; type Kind = keyof NestedKinds; export declare function incrementNestedLevel(kind: Kind, state: NestedState, value?: number): void; export declare function popNestedLevel(kind: Kind, state: NestedState, value?: number): number; /** * Create a mdast-to-markdown handler for all unsupported node types * * This is then able to log an error rather than throwing. */ export declare function unsupportedHandlers(tree: Root, supported: string[], file: VFile): Record; /** * Run tree validation functions for specified node types * * This validation is separate from the mdast-to-markdown handlers so it may * log errors to vfile. Then, handlers can take into account the validated structure. */ export declare function runValidators(tree: Root, validators: Record, file: VFile): void; /** * Add frontmatter to the beginning of markdown content as yaml * * If no frontmatter is provided, the markdown content is returned as-is. * Frontmatter is not validated, and the only coercion is reducing license to a * string rather than structured object. */ export declare function addFrontmatter(page: string, frontmatter?: PageFrontmatter): string; export {}; //# sourceMappingURL=utils.d.ts.map