// Client-safe types for analysis articles (schema: lib/analysis-schema.ts; written through /api/articles). export type Block = | { type: 'markdown'; data: { text: string } } | { type: 'list'; data: { items: string[]; ordered?: boolean } } | { type: 'callout'; data: { text: string; title?: string; tone?: 'info' | 'note' | 'warn' } } | { type: 'table'; data: { columns: string[]; rows: string[][]; caption?: string; numeric?: boolean; highlightCol?: number } } | { type: 'chart'; data: { kind: 'bar'; title: string; labels: string[]; series: { name: string; values: number[] }[]; unit?: string; note?: string; highlight?: number[] } } | { type: 'mermaid'; data: { code: string; caption?: string } } | { type: 'figure'; data: { src: string; alt: string; caption?: string } } | { type: 'code'; data: { text: string; lang?: string } }; export interface Section { key: string; title: string; level: number; blocks: Block[]; children: Section[] } export interface ArticleLink { kind: string; title: string; url: string; note: string | null } export interface ArticleData { slug: string; title: string; summary: string | null; revision: number; updatedAt: string; sections: Section[]; links: ArticleLink[] }