import type { DirectoryNode } from '@diskette/fs'; import type { Heading } from './mdx/schema.ts'; import type { TocItem } from './types.ts'; export declare function buildToc(headings: Heading[]): TocItem[]; export declare function formatDocumentPath(root: string, filePath: string): string; /** * Transforms a path like `/docs/01-guides/02-styling.mdx` to `/docs/guides/styling` */ export declare function cleanPath(filePath: string): string; /** Removes file extensions and ordering prefixes */ export declare const cleanFilename: (name: string) => string; /** Removes /index from the end of paths */ export declare const stripIndex: (path: string) => string; /** Builds cumulative ancestor paths from a document path */ export declare function buildFolderPaths(path: string): string[]; /** * Visualize a directory tree in the console. */ export declare function printTree(dir: DirectoryNode, options?: { prefix?: string; logger?: (...data: any[]) => void; }): void; export declare const isString: (value: unknown) => value is string; export declare const isObject: (value: unknown) => value is Record; export declare function invariant(condition: unknown, message?: string | Error): asserts condition;