mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-10-30 17:27:09 +00:00
* fix(studio): a copied clip pastes as saved, not with the preview's hidden styles Copy took each clip's markup from the live preview, so a clip copied before its start carried the runtime's visibility:hidden and display:none into the pasted source and could never show. Copy now reads the element from its saved file (matched by data-hf-id, then id, the lookup the GSAP soft reload already used, now shared). Copy still answers the key at once; paste and cut wait for the read, so a cut never deletes before its markup is taken. * fix(studio): copy finds a clip's saved markup in templates and after saves Copy now stamps the saved file the way the preview does, so a film without hf-ids on disk still resolves; searches template contents for sub-composition clips; falls back to the element id; and reads the file after any save in flight. A failed read keeps the previous clipboard and a cut with a failed copy deletes nothing. * fix(studio): a copied sub-composition clip keeps working asset paths when pasted Copy now rebases the saved markup's relative src, href and style url() paths to the project root, as the preview does when it inlines a sub-composition, so a clip copied from compositions/ and pasted into index.html keeps its images. It also waits for DOM edit saves still in flight, as undo does, and parses each file once per copy. The authored-source lookup uses an escaped attribute selector over cached search roots, searches composition templates only, and falls back to an id only for an element with no hf-id; copy alone still tries the id when the hf-id misses. * fix(studio): copy works after a failed save and with any relative asset path Copy waits for DOM edit saves only for their order, so a save that failed no longer makes every later copy, cut or duplicate fail. Asset paths are joined segment by segment instead of through URL and decodeURI, so a path with a stray % or a url() with spaces is rebased instead of crashing or being skipped.