import type { UiProjectFile } from '@histoire/shared';
/**
 * Project-relative POSIX paths of mentionable files.
 * @param root Project root.
 */
export declare function listProjectFiles(root: string): Promise<string[]>;
/**
 * Cached file list, refreshed at most every `ttl` milliseconds.
 * @param root Project root.
 * @param ttl Cache lifetime.
 */
export declare function createProjectFileIndex(root: string, ttl?: number): {
    /** Current file list; concurrent callers share one listing. */
    files(): Promise<string[]>;
};
/**
 * Ranks files for an `@` mention: exact name, name prefix, name substring, path substring, then fuzzy; shorter paths first.
 * @param files Project-relative paths.
 * @param query User-typed text after `@`.
 * @param limit Maximum results.
 */
export declare function searchProjectFiles(files: readonly string[], query: string, limit?: number): UiProjectFile[];
//# sourceMappingURL=files-search.d.ts.map