mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-08 10:46:06 +00:00
fix: propagate data-timeline-locked in compiler inliners
The runtime path (compositionLoader.ts) already propagated data-timeline-locked from inner root to host, but both compiler inliners (bundler + producer) did not. Bundled output re-opened in Studio would lose the lock. Now propagated in inlineSubCompositions alongside the existing data-hf-authored-id propagation.
This commit is contained in:
@@ -197,6 +197,25 @@ describe("inlineSubCompositions – #ID selector scoping divergence", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("propagates data-timeline-locked from inner root to host element", () => {
|
||||
const lockedSubComp = `<!doctype html>
|
||||
<html><head></head><body>
|
||||
<div id="captions" data-composition-id="captions" data-timeline-locked data-width="1920" data-height="1080">
|
||||
<span>Hello</span>
|
||||
</div>
|
||||
</body></html>`;
|
||||
|
||||
const document = makeHostDocument("captions");
|
||||
const host = document.querySelector('[data-composition-src="intro.html"]')!;
|
||||
|
||||
inlineSubCompositions(document, [host], {
|
||||
resolveHtml: () => lockedSubComp,
|
||||
parseHtml: (html) => parseHTML(html).document,
|
||||
});
|
||||
|
||||
expect(host.hasAttribute("data-timeline-locked")).toBe(true);
|
||||
});
|
||||
|
||||
it("producer path propagates data-hf-authored-id to host when inner root has id", () => {
|
||||
const document = makeHostDocument("intro");
|
||||
const host = document.querySelector('[data-composition-src="intro.html"]')!;
|
||||
|
||||
Reference in New Issue
Block a user