/** * Show Normalizer * * Transforms CslItem into a flat, agent-friendly normalized structure * for JSON output and as data source for pretty formatting. */ import type { CslItem } from "../../core/csl-json/types.js"; export interface NormalizedFulltext { pdf: string | null; markdown: string | null; } export interface NormalizedAttachment { filename: string; role: string; } /** Resolved successor pointer (#108). */ export interface NormalizedSuperseded { /** Citation key of the successor, or null when the pointer dangles */ id: string | null; /** uuid the pointer names, kept so a dangling pointer is still traceable */ uuid: string; reason: string; at: string | null; /** True when the successor chain loops; the library was edited outside `ref deprecate` */ cycle: boolean; } export interface NormalizedReference { id: string; uuid: string | null; type: string; title: string | null; authors: string[] | null; year: number | null; journal: string | null; volume: string | null; issue: string | null; page: string | null; doi: string | null; pmid: string | null; pmcid: string | null; url: string | null; abstract: string | null; tags: string[] | null; created: string | null; modified: string | null; fulltext: NormalizedFulltext | null; attachments: NormalizedAttachment[] | null; /** Null when the reference is not superseded, or when no library was supplied to resolve against */ superseded: NormalizedSuperseded | null; raw: CslItem; } export interface NormalizeOptions { attachmentsDirectory?: string; /** * The whole library, needed to turn a `superseded_by` uuid back into a citation key. * Omit it and `superseded` stays null. */ allItems?: CslItem[]; } export declare function normalizeReference(item: CslItem, options?: NormalizeOptions): NormalizedReference; //# sourceMappingURL=show-normalizer.d.ts.map