Skip to content

common_reports.contracts.builders

The builder vocabulary — the immutable component tree + the frozen styling it embeds.

components.py Component (base) . Text . Heading . Table . Figure . Image . Kpis/Kpi . Callout . Section . Cell . Row . Columns . Grid . Spacer . Divider . Frontmatter . RenderStyle brand.py Brand (wordmark . crest . palette . type) + the NULL_CAPITAL preset document.py Document — the immutable tree wrapper (.fill / .render / .toc / .unfilled) formats.py PlotType / PlotFormat (+HLine/VLine/Band/Margins), TableFormat family (+ColumnFormat/ColorRule/IndexSpec/HeaderStyle), TextFormat / ImageFormat, the enums, Theme / Palette / Tokens + deterministic colour helpers.

DECISION (b): the *Format objects live HERE (not in schemas/) because the components embed them (Table.fmt: TableFormat) and the law says contracts/ import nothing but stdlib + pydantic — so the embedded, frozen, zero-logic styling sits at the contract layer with the components, keeping the dependency arrow strictly one-way.