mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-12 07:09:59 +00:00
refactor(studio): tighten the expanded-lane cache and height helpers
Validate the parse response before reading `.animations` instead of casting the JSON blind, and narrow the fetch's return type to the slice callers read. Route the AST cache load through the shared clip-keyframe and cache-key helpers so it can't drift from the other writer. Drop the unused numeric track-count branches from `trackHeights`/`getTimelineCanvasHeight`, and pick the widest keyframed clip with a reduce so there's no index assertion.
This commit is contained in:
@@ -36,7 +36,7 @@ export type ElementAnimationsOutcome =
|
||||
* so the caller can apply the right retry budget to each.
|
||||
*/
|
||||
export function selectElementAnimationsOrRetry(
|
||||
parsed: ParsedGsap | null,
|
||||
parsed: Pick<ParsedGsap, "animations"> | null,
|
||||
target: { id: string | null; selector: string | null },
|
||||
): ElementAnimationsOutcome {
|
||||
if (!parsed) return { kind: "fetch-error" };
|
||||
|
||||
Reference in New Issue
Block a user