Repository Public
1import type { Locale, Source } from "@/schema";23/** Passed to every block component. */4export interface RenderCtx {5 locale: Locale;6 /** public: reader · editor: inside the studio (interactions stay live) · print: static, for PDF/PNG export and crawlers. */7 mode: "public" | "editor" | "print";8 /** Sources of the document, in citation order (index + 1 is the number shown to the reader). */9 sources: Source[];10 /** URL of an uploaded asset (image) from its `assets[].assetId`. */11 assetUrl: (assetId: string) => string;12 /** assets[].id → asset reference, for image and dataset blocks. */13 assets: Record<string, { assetId: string; alt: string; credit?: string; kind: "image" | "dataset" }>;14}15