/** * Portable Text block + mark types — Phase 7 of the LLM-authored UI * element instantiation work. * * Mirror of `platform/common/syntrologie_common/sdk/blocks.py`. Closed * vocabulary (block types + mark types) the LLM may author in * `rich_text_blocks` fields. The renderer walks this tree and produces * DOM via `document.createElement` + `textContent` — **agent never * writes HTML strings**. XSS-class attacks have no surface because * there's no HTML on the wire. * * Forward-compat: unknown block types and unknown marks are dropped at * render time (not thrown). A future protocol bump can add new types * without breaking today's renderer. */ /** * The closed inline-mark vocabulary. Adding a mark is a deliberate * code change with review, never an allowlist tweak. */ export type MarkType = 'bold' | 'italic' | 'code' | 'link'; export type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6; export type ListStyle = 'bullet' | 'numbered'; export interface LinkMark { /** Validated server-side; renderer revalidates for defense in depth. */ href: string; } export interface TextSpan { text: string; marks?: MarkType[]; link?: LinkMark; } export interface ParagraphBlock { type: 'paragraph'; spans: TextSpan[]; } export interface HeadingBlock { type: 'heading'; level: HeadingLevel; spans: TextSpan[]; } export interface ListItemBlock { type: 'list_item'; spans: TextSpan[]; } export interface ListBlock { type: 'list'; style: ListStyle; items: ListItemBlock[]; } export interface CodeBlock { type: 'code'; /** Raw code text. Rendered inside `
` via `textContent` —
     *  no HTML interpretation, no syntax-highlight injection. */
    text: string;
    language?: string;
}
export type BlockNode = ParagraphBlock | HeadingBlock | ListBlock | CodeBlock;
//# sourceMappingURL=blocks.d.ts.map