/** * Pure helpers for doc-source tree navigation — shared by client hook and RSC SSR. * README convention (folder-index file) is configurable but defaults to 'README.md'. */ import type { DocNode } from '../types/doc-source'; /** * Canonical folder-index filename. Single SSOT consumed by `doc-tree-nav` * pure helpers, `useDocumentTree` (default config), `DocSeoContent` (fallback * fetch path), and `multi-level-navigation`'s visual-selection logic. Stays * in canonical case here; consumers that do case-insensitive comparison * (the navigation) lowercase locally. */ export declare const DEFAULT_FOLDER_INDEX_FILE = "README.md"; /** * Strip the folder-index filename from a path, returning the folder path. * For default 'README.md': 'folder/README.md' → 'folder', 'README.md' → '', 'folder/file.md' → 'folder/file.md' */ export declare function stripFolderIndexFromPath(path: string, folderIndexFile?: string): string; export declare function findDocNodeByPath(path: string, nodes: DocNode[]): DocNode | null; /** * Given a node path like "folder1/subfolder2", return DOM-style node IDs for each segment * (accordion sidebar — matches use-document-tree). */ export declare function getDocAncestorNodeIds(nodePath: string): string[]; /** * Resolve which storage path to load (matches use-document-tree content effect). */ export declare function resolveContentFetchPath(selectedPath: string, structure: DocNode[], folderIndexFile?: string): string | null; export declare function getInitialExpandedNodeIds(cleanInitialPath: string): string[]; /** * When a doc source's root has no top-level folder-index file, navigate to the first * folder that does. Matches the historical knowledge-base default. */ export declare function getDocSourceDefaultPath(structure: DocNode[], folderIndexFile?: string): string | null; //# sourceMappingURL=doc-tree-nav.d.ts.map