import type { RenderableTreeNode, Schema } from "@markdoc/markdoc"; import type { SluggerType } from "./types.ts"; export interface Heading { /** * The heading level (1-6) */ level: number; /** * The heading text content */ title: string; /** * The heading id attribute */ id?: string; } export interface HeadingsObject { headings: Heading[]; node: RenderableTreeNode; } /** * Recursively collects all heading nodes from tree * after transform (to resolve variables and the like) * @param topNode - The top-level renderable tree node of the document * @param sluggifier - The function to create an ID if not present * @returns Array of heading objects with title, level, and other attributes and nodes without extraneous attributes */ export declare function collectHeadings(topNode: RenderableTreeNode, sluggifier: SluggerType): HeadingsObject; export declare const heading: Schema;