ad847faa2ebce981db23ec7ccc2b02f7d4cfb67f
storage.ts owns the blob that survives a restart - boxes, ctx, deck, dir, input - plus validation for text a person pastes into the backup box. Pure: parsing and serialising only. Where it is kept, localStorage mirrored into Capacitor Preferences, stays the shell's problem. STORAGE_KEY is still sp404mk2-layers-v1, unchanged from Phase 1, so progress already on the phone is read rather than orphaned. The test parses a payload copied verbatim out of CapacitorStorage.xml on the device, so a change that would break migration fails the suite. Two levels of strictness, matching the reference: reading our own storage is lenient and falls back per field, while a pasted backup must be an object carrying a boxes object or it is refused outright. input defaults to hold rather than sniffing for a coarse pointer as the reference did - that is a DOM question, so the shell decides it. The domain layer is now complete: entries, layers, drill, format, search, storage. 103 tests. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Description
Releases
1
404 Layers 1.0.0
Latest
Languages
TypeScript
41.6%
HTML
40.3%
CSS
7.3%
JavaScript
6.3%
Shell
3.9%
Other
0.6%