cadrumo.application.storage.calc_sheets._styling module

Compute the presentation facets (styled ranges, widths, freezes, filters).

Pure functions that derive the workbook’s visual layout from the resolved SheetLayout plus the already-computed structural facets (section headers, anchors, provenance / evidence extents). The output is consumed verbatim by the live Sheets transport through the shared theme palette. Keeping this computation in one place makes the design uniform across every modelo.

Both data tabs use the column layout A=Sección B=Casilla C=Concepto D=Valor with an anchor column F; the Procedencia / Evidencia / Detalle / Guía tabs have their own widths declared below.

compute_styling(*, layout, section_headers, anchors, provenance, guide_paragraphs)[source]

Derive (styled_ranges, column_widths, frozen_views, auto_filters).

Returns a four-tuple of (SheetStyledRange, SheetColumnWidth, SheetFrozenView, SheetAutoFilter) tuples.

A pure function of the resolved layout and the structural facets: two runs over the same inputs produce the same facets, so the design is deterministic and the two transports stay in lock-step.

Return type:

tuple[tuple[SheetStyledRange, ...], tuple[SheetColumnWidth, ...], tuple[SheetFrozenView, ...], tuple[SheetAutoFilter, ...]]

Parameters: