/** * Display format functions for interactive search */ import type { CslItem } from "../../core/csl-json/types.js"; /** * CSL name type (author structure) */ type CslName = NonNullable[number]; /** * Format author list for display * - Single author: "Smith, J." * - Two authors: "Smith, J., & Doe, A." * - Three authors: "Smith, J., Doe, A., & Johnson, B." * - More than three: "Smith, J., et al." * * @param authors - Array of CSL author objects * @returns Formatted author string */ export declare function formatAuthors(authors: CslName[] | undefined): string; /** * Truncate title to fit terminal width * * @param title - Title string * @param maxWidth - Maximum display width * @returns Truncated title with ellipsis if needed */ export declare function formatTitle(title: string | undefined, maxWidth: number): string; /** * Compose a complete search result line * * Format: * ``` * [1] Smith, J., & Doe, A. (2020) * Machine learning in medicine: A comprehensive review * DOI: 10.1000/example | PMID: 12345678 * ``` * * @param item - CSL item * @param index - Display index (1-based) * @param terminalWidth - Terminal width for title truncation * @returns Multi-line formatted string */ export declare function formatSearchResult(item: CslItem, index: number, terminalWidth: number): string; export {}; //# sourceMappingURL=format.d.ts.map