import Link from 'next/link'; import type { ReactNode } from 'react'; import { Badge, ClaimBadge } from '@/components/ui/badge'; import { SourceBadge, TableProvenance, type ProvenanceInfo } from '@/components/ui/source-badge'; import type { PublicationListRow } from '@/lib/queries/publications'; import { fmtDate, fmtInt } from '@/lib/format'; const PUBMED: ProvenanceInfo = { sourceSlug: 'pubmed', sourceName: 'PubMed (NLM)', dataset: 'PubMed E-utilities', layer: 'normalized' }; /** * Publication list. Bibliographic rows all come from PubMed, so one provenance popover sits in the * caption and each row carries a compact badge. Link method / validation status stay per row. * Layout classes live in globals.css (.ci-pub) — the list is repeated 25× per page. */ export function PublicationList({ rows, summary }: { rows: PublicationListRow[]; summary?: ReactNode }) { const latest = rows.reduce((m, p) => (m == null || String(p.updated_at) > String(m) ? p.updated_at : m), null); return (
}> {summary ?? `${fmtInt(rows.length)} publication${rows.length === 1 ? '' : 's'}`} · bibliographic data as recorded by PubMed; abstracts are not reproduced.
    {rows.map((p) => (
  1. {p.pmid ? ( {p.title} ) : ( {p.title} )} {p.retracted ? Retracted : null} {p.is_preprint ? Preprint : null}

    {p.authors.map((a) => a.name).join(', ')} {p.author_count > 3 ? ' et al.' : ''} {p.journal_iso || p.journal ? ` · ${p.journal_iso ?? p.journal}` : ''} {p.pub_date ? ` · ${fmtDate(p.pub_date)}` : p.pub_year ? ` · ${p.pub_year}` : ''} {p.pmid ? ` · PMID ${p.pmid}` : ''} {p.edge_status ? ( <> {' · '} {p.edge_status} {p.method ? {p.method} : null} ) : null}{' '}

  2. ))}
); }