hyperframes
hyperframes copied to clipboard
fix(core): align sub-composition scoping across runtime and bundler
What
Align sub-composition scoping and identity handling across runtime and bundler
Why
Runtime and bundled output could diverge for duplicate sub-composition instances. That affected scoped roots, per-instance variables, repeat loads, and inline template mounts.
How
- Preserve the authored inner root wrapper without keeping duplicate DOM ids.
- Use per-instance composition ids where needed for duplicate mounts.
- Keep scoped root aliasing working through
data-hf-authored-id. - Align runtime and bundled sub-compositions on per-instance variable lookup with
window.__hfVariablesByComp. - Add cleanup for stale scoped variable entries during repeat loads and removed-host cases.
Test plan
How was this tested?
- [x] Unit tests added/updated
- [x] Manual testing performed
- [ ] Documentation updated (if applicable)