Skip to content

feat(domformat): port retained adapter techniques - #86

Merged
alowpoly merged 6 commits into
mainfrom
domformat-adapter-techniques
Aug 17, 2026
Merged

feat(domformat): port retained adapter techniques#86
alowpoly merged 6 commits into
mainfrom
domformat-adapter-techniques

Conversation

@alowpoly

Copy link
Copy Markdown
Contributor

Summary

  • port the reusable retained-DOM techniques from the stable cssGraphics demos into DOMFORMAT's closed, validated codecs and runtime
  • add sparse class variants, packed two-axis surface positions, verified paged playback/variant state, bounded residency, responsive presentation/profile timelines, parametric leaf layouts, profile-by-frame visibility, typed orbit input, compositor timing, rational cadence/catch-up, and host-selected retained bank handoff
  • keep production, alternate viewer, N-version JavaScript, and Python readers aligned, including fail-closed resource, ordering, memory, cancellation, and atomic-publication checks
  • migrate gallery source identity from the singleton sourceArtifact field to bounded artifacts[], and update all 295 affected canonical corpus documents
  • code-split and Terser-minify the npm runtime while retaining stable public entry points and declarations

Why

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:coverage
  • pnpm --filter @layoutit/polycss-domformat test:release
  • pnpm gallery:domformat:verify
  • pnpm test
  • pnpm build
  • pnpm check:readmes
  • pnpm test:scripts
  • git diff --check

The 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.

@alowpoly
alowpoly marked this pull request as ready for review August 17, 2026 21:11
@alowpoly
alowpoly merged commit cc8da73 into main Aug 17, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant