feat(domformat): port retained adapter techniques - #86
Merged
Conversation
alowpoly
marked this pull request as ready for review
August 17, 2026 21:11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sourceArtifactfield to boundedartifacts[], and update all 295 affected canonical corpus documentsWhy
DOMFORMAT previously represented only a narrow subset of the prepared state that the cssGraphics adapters already prove useful. That forced viewers to reimplement paging, responsive selection, cadence, sparse publication, input mapping, and retained-bank behavior outside the document contract. This PR moves those deterministic data/runtime mechanisms into DOMFORMAT while keeping product policy and Morph-owned behavior out.
The source review is pinned to cssGraphics revision
bb2d0b030b9a5b15f2268d8221b57b56fb61be30. The compatibility proof covers the seven stable browser demos: 3D Pipes, ElectroPaint, Gears, Gravity Well, Maze, Menger, and Solitaire. Flowerbox is explicitly excluded because it is experimental. SM64's custom/Morph prepared-package path and random bank-selection policy remain outside DOMFORMAT.The compatibility claim is deliberately mechanism-level: it does not claim exact source schedule lowering, producer equivalence, topology equivalence, or pixel parity.
Verification
pnpm --filter @layoutit/polycss-domformat test:coveragepnpm --filter @layoutit/polycss-domformat test:releasepnpm gallery:domformat:verifypnpm testpnpm buildpnpm check:readmespnpm test:scriptsgit diff --checkThe installed-tarball browser proof exercises all seven stable demo contracts through the reference viewer, alternate viewer, and N-version reader, including their actual cadence classes and retained sink changes. Real-size ElectroPaint and Gravity Well state pages also pass the six-path responsiveness/atomicity trace: no observed long tasks and all measured main-thread tasks below 50 ms.
The deterministic release check produces a 98,057-byte tarball (365,000 bytes unpacked, 19 entries), 4,343 bytes below the 100 KiB packed-size ceiling.