UNPKG

document-outline-extractor

Version:

Extract structured outlines from documents with optional AI enhancement

38 lines 1.29 kB
import { OutlineNode, Heading, OutlineFormat } from './types'; /** * Extract headings from markdown content */ export declare function extractHeadings(content: string): Heading[]; /** * Build hierarchical outline tree from flat headings */ export declare function buildOutlineTree(headings: Heading[]): OutlineNode[]; /** * Render outline tree as indented text */ export declare function renderOutline(nodes: OutlineNode[], depth?: number): string; /** * Format outline in specified format */ export declare function formatOutline(nodes: OutlineNode[], format: OutlineFormat): string; /** * Parse JSON outline response into OutlineNode array */ export declare function parseJsonOutline(jsonString: string): OutlineNode[]; /** * Compute outline quality score */ export declare function computeOutlineScore(headings: Heading[], totalLines: number): number; /** * Split content by headings */ export declare function splitByHeadings(content: string, maxSize: number): string[]; /** * Split content by size */ export declare function splitBySize(content: string, maxSize: number): string[]; /** * Smart split: prefer heading boundaries, fall back to size */ export declare function smartSplit(content: string, maxSize: number): string[]; //# sourceMappingURL=utils.d.ts.map