Document ModelHow a panel design is represented as data — layers, geometry, and history — and how that data is versioned and serialized.Document state & layersDocState, the Layer union, the mm coordinate space, and how a document serializes to PanelConfig.Panel sizingThe fixed HP width table and fixed 3U panel height, quoted from panel-sizes.ts.The 3-color paletteThe fixed 3-color palette and its physical PCB meaning, from palette.ts.Undo / redo historyThe snapshot-based history reducer, gesture batching, and the 50-entry cap, from history.ts.Geometry & editing contractsbbox math, hit-testing rules, layer-list ops, path geometry, resize gating, and grid snapping.NextDocument state & layers