mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-19 19:36:04 +00:00
* fix(core): keep print-only and non-CSS head styles apart when bundling * fix(core): inline each linked stylesheet where its link was, keeping its media * fix(core): merge a titled head style only with styles of the same title A style with a non-empty title belongs to a style sheet set; the browser enables only the preferred set, so merging it into an untitled (persistent) style or one with another title changes what applies. An empty title is persistent, like no title; titles compare case-sensitively. An inlined linked sheet carries its link's title. The merge key returns undefined for a non-CSS type (never merged or inlined) and treats media="all" as no media, as the browser does. * fix(core): leave a disabled stylesheet link as a link instead of inlining it * fix(producer): render keeps conditional head styles apart, as the preview does * test(core): pin case and padding in head style merge keys, drop a subsumed case * fix(core): keep a composition style's media, and leave its non-CSS styles out of CSS * fix(core): emit a conditional composition style as its own element, keeping media and title * test(core): make the non-CSS composition style fixture able to fail * fix(core): a composition's link keeps its own media and title when another links the same file Hoisted composition links are deduped on href, rel, condition, type and disabled rather than href alone, in the bundle, the render and the live mount, and keep their type and disabled state. * fix(core): the bundle keeps a font's only applied copy when an alternate style repeats it The font dedupe asks cssStyleMergeKey whether a style always applies, so a titled style no longer counts as always applied. * fix(core): the bundle inlines a linked sheet whose type names a charset Chrome applies <link type="text/css; charset=utf-8">, so a link's type is read by its MIME essence; a style's type still has to be exactly text/css. Adds a test for a template with no matching root and a non-CSS style. * style(core): drop a comment the constant's name already says * fix(core): hoisted links dedupe on CORS mode, integrity and referrer policy, not noscript copies One helper, hasSameLink, decides whether a hoisted link duplicates a live one, for the bundle, the render and the mount. inlineSubCompositions no longer dedupes its result on its own. Tests cover rel, disabled, non-CSS type, CORS, integrity, referrer policy and a root noscript link. * fix(core): a root link and a composition's same link differing only in fetch attributes ship once The link key goes back to href, rel, condition and disabled; crossorigin, integrity and referrerpolicy are not compared, so a root snippet repeated in a composition is emitted once and the root's override styles keep their order.