aeat.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 both transports through the shared _theme palette, so the offline xls and online Sheets present the same official-modelo look. Keeping this computation in one place is what makes the design uniform across every modelo and every transport.

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: