mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 12:52:44 +00:00
fix(runtime): immediateRender for set tweens + array timeline normalization (#1692)
* chore(studio): remove all console.* calls from studio package * chore(studio): address review — remove dead stubs, restore consent notice - Delete empty if-blocks left after console removal (snapTargetCollection, Player asset-poll, useTimelineSyncCallbacks 5s probe, useGestureRecording dev guard + now-unused isDevBuild) and the stale "surface in dev" comment. - Drop the dangling no-console pragma + dead duplicate-id branch in sourcePatcher. - Restore the one-time telemetry consent disclosure in showNoticeOnce (kept behind a pragma — it is a user-facing notice, not debug noise). - Remove the missed timelineIcons console.warn while preserving the `tag || "div"` null-safety fallback. - Route caption auto-save failures (a data-loss path) through telemetry instead of swallowing silently. - Restore the accidentally-clobbered css-var-fonts output.mp4 fixture. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(runtime): immediateRender for set tweens + array timeline normalization - Set tweens now emit immediateRender:true so they render on page load without requiring the runtime to seek past position 0 - Runtime IIFE normalizes array timelines (window.__timelines = [tl]) to keyed objects, and auto-adds data-start on root elements - Drag teardown clears translate:none to prevent #1673 fly-off - Position-only set tweens hidden from timeline diamonds (3 cache paths) - Parser: ease-only keyframe update preserves existing properties * fix(runtime): address review — restore perf gate, debug surface, scrub restore - Restore the #1651 skipForInjectedVideo gate in media.ts that was dropped on restack — avoids ~2400 wasted per-tick seeks on video-heavy renders. - Restore the console.debug body + docstring bullet of swallow() in diagnostics.ts: the __hfDebug opt-in debug surface had been gutted to an empty if-block. - Rebind: after the progress-cycle set() kick, seek to state.currentTime via totalTime() instead of snapping to 0, so a rebind after scrub / soft-reload restore keeps the playhead. - Array __timelines normalization + data-start default now resolve the root via a shared findRootCompositionEl() that honors data-root="true" first (matches resolveRootCompositionElement, which now delegates to it). - Ease-only keyframe update leaves a primitive (non-object) keyframe value untouched instead of wiping it to {}; add a preservation unit test. - Document the boundDuration<=0 progress(1) kick + restore the STATIC-case comment in gsapRuntimeBridge. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
adb40321d6
commit
6987447a75
@@ -443,6 +443,14 @@ export function endManualOffsetDragMembers(members: ManualOffsetDragMember[]): v
|
||||
member.element.removeAttribute("data-hf-drag-initial-offset-y");
|
||||
member.element.removeAttribute("data-hf-drag-gsap-base-x");
|
||||
member.element.removeAttribute("data-hf-drag-gsap-base-y");
|
||||
// Clear the draft's `translate: none` so the soft reload starts clean —
|
||||
// otherwise button-less pointermoves after the reload compute deltas
|
||||
// from a stale base and fling the element off-screen (#1673).
|
||||
// Do NOT clearProps:"transform" — that nukes the committed GSAP position
|
||||
// and causes a visual snap-back before the soft reload re-applies it.
|
||||
if (member.element.style.getPropertyValue("translate") === "none") {
|
||||
member.element.style.removeProperty("translate");
|
||||
}
|
||||
resumeGsapTimelines(member.element);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -239,7 +239,9 @@ export async function tryGsapDragIntercept(
|
||||
// `tl.set("#el",{x,y})`, not a keyframe conversion: re-nudge an existing set in
|
||||
// place (idempotent), else add a new one. This also covers the stale-cache
|
||||
// phantom — committing a set is correct because the element genuinely has no live motion.
|
||||
if (!hasNonHoldTweenForElement(iframe, selector)) {
|
||||
const hasNonHold = hasNonHoldTweenForElement(iframe, selector);
|
||||
|
||||
if (!hasNonHold) {
|
||||
const existingSet =
|
||||
posAnim && posAnim.method === "set" && posAnim.targetSelector === selector
|
||||
? posAnim
|
||||
@@ -251,7 +253,9 @@ export async function tryGsapDragIntercept(
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!posAnim) return false;
|
||||
if (!posAnim) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Verify the anim ID is still valid in the current file. The React-state
|
||||
// `animations` list can lag behind the file after a prior mutation changed
|
||||
|
||||
Reference in New Issue
Block a user