# UnifiedSpread dev-21.0.0 FormulaEngineFoundation

This milestone expands the NativeGrid formatting layer from a basic metadata foundation into a more practical spreadsheet formatting model.

## Implemented scope

- Number formats: General, integer, thousands, decimal, percent, currency, date, datetime, time, and text metadata.
- Font controls: family, size, bold, italic, underline, foreground color, background color.
- Alignment controls: horizontal left/center/right, vertical top/middle/bottom, wrap, shrink-to-fit, and indent metadata.
- Border controls: all, outer, inner, top, right, bottom, left, and clear.
- Cell style presets: normal, header, input, good, warning, and bad.
- Conditional formatting foundation: greater-than / less-than rules for the selected range, plus rule clear.
- XLSX style mapping extension for per-edge borders, alignment, shrink-to-fit, indent and number formats.

## Design notes

Cell values and visual styles remain separated. Values live in `sheet.data`; style metadata lives in `sheet.styles`; conditional formatting rules live in `sheet.config.conditionalFormats`.

The renderer uses `getEffectiveCellStyle(row, col)` so conditional formatting is layered over manual styles without overwriting the original formatting. This is important for future rule editing, XLSX import/export and undo/redo.

Border metadata is stored per edge (`bdTop`, `bdRight`, `bdBottom`, `bdLeft`) instead of relying only on a single `bd` flag. That keeps outside/inside/top/bottom commands deterministic and easier to map to XLSX.
