Files
hyperframes/packages
Miguel Ángel a7330da47b fix(core): stop dropping a mounted composition's styles and scripts
A composition mounted as a sub-composition lost its entire stylesheet and
scripts whenever they were authored as siblings of the composition root inside
its template. mountCompositionContent collected assets from the composition root
element, so sibling nodes were invisible to it.

The shape is legal and common, so the result was three catalog components
rendering completely unstyled in live preview. oversized-cursor drew its pointer
at 1280px against an authored 7cqw, roughly 134px at 1920, because width: 7cqw
was never declared at all -- the whole stylesheet was missing. Confirmed in the
mounted document, where only the host's own style element was present.

Collect from the source node, which is a superset of the root and the single
point every mount path routes through: external fetch, inline template, nested.

Strip the mounted clone rather than the source. The previous code removed the
extracted nodes from the node it was given, which on the inline-template path is
a live template still in the document -- a remount would have found it emptied.

Why nothing caught it: every CLI gate reaches the compiler path through
bundleToSingleHtml, and the compiler always collected from the whole template.
Nothing in the CLI exercises the mount path, which is reachable only through the
player and Studio. So the rendered video was correct the entire time and only
the preview was wrong. A test spanning both paths lands separately.

The regression test fails on the pre-fix code, asserting that the mounted
document contains the composition's own container-type declaration and finding
an empty string instead -- the stylesheet that never arrived -- and passes
after. Verified in both directions rather than assumed.
2026-08-07 20:48:38 +00:00
..
2026-08-07 15:31:57 +00:00
2026-08-07 15:31:57 +00:00
2026-08-07 15:31:57 +00:00
2026-08-07 15:31:57 +00:00
2026-08-07 15:31:57 +00:00
2026-08-07 15:31:57 +00:00
2026-08-07 15:31:57 +00:00
2026-08-07 15:31:57 +00:00
2026-08-07 15:31:57 +00:00
2026-08-07 15:31:57 +00:00
2026-08-07 15:31:57 +00:00