be57821457
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FbMbJPadPzVwvt9rU9GBNo
15 lines
1.2 KiB
TypeScript
15 lines
1.2 KiB
TypeScript
// Client-safe types for analysis articles (see db/analysis-schema.sql).
|
|
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[] }
|