/** * The references of a document (#268): CSL items written in its front * matter (`references:`, as Pandoc reads them) and in `:::references` * blocks (BibTeX, CSL-JSON or CSL-YAML), and the works it lists without * citing them (`nocite`). */ import type { ContentBlock } from '../parse/index.js'; import type { CslItem } from './types.js'; /** Something wrong with the reference data, where it is written. */ export interface ReferenceIssue { message: string; sourceStart: number; sourceEnd: number; } /** The references and `nocite` keys of a document. */ export interface ReferenceData { items: CslItem[]; /** Keys listed without a citation; `'*'` lists every reference. */ nocite: string[]; issues: ReferenceIssue[]; } /** A reference as YAML or JSON wrote it, as a CSL item; undefined without * an id. Types default to `book`; dates and names are normalised; numbers * become strings. */ export declare function normalizeCslItem(raw: unknown): CslItem | undefined; /** The `nocite` field of a front matter: `'@*'`, `'@a, @b'`, `['@a']`. */ export declare function nociteKeys(value: unknown): string[]; /** The items of a `:::references` block, in its `format` (`bibtex`, * `csl-json`, `csl-yaml`; guessed from the body when unset). */ export declare function referencesOfBlock(block: ContentBlock, issues: ReferenceIssue[]): CslItem[]; /** The references of a document: its front matter's `references` and * `nocite`, and every `:::references` block, in order. A key written twice * keeps its first entry. */ export declare function documentReferences(metadata: Record | undefined, blocks: readonly ContentBlock[]): ReferenceData; //# sourceMappingURL=data.d.ts.map