Use version (1 for legacy, 2 for compact) instead of format strings
("compact" / "legacy") throughout the export pipeline. Matches the
backend pattern where version alone determines format behavior. Added
validation that rejects invalid versions with a clear error.
AI-assisted-by: deepseek-v4-pro
Embed compact shapes in page entries for library exports, add geometry
verification and structure tests for backend, and remove the redundant
:format field from the manifest — version alone determines format.
AI-assisted-by: deepseek-v4-pro