Repository navigation
feat(studio): an element's source-parsed animations are part of Studio's API - #8061
Merged
Merged
Conversation
jrusso1020
approved these changes
Nov 17, 2026
jrusso1020
left a comment
Collaborator
There was a problem hiding this comment.
APPROVE at 13879ab2
- Export only:
index.tsaddsfetchParsedAnimationsandgetAnimationsForElementfromhooks/useGsapTweenCache. Their code and the server routefetchParsedAnimationscalls are unchanged, so no new server surface. elementAnimations.test.tsimports through the package entry and checks the id and selector matches. With the export removed, it fails withgetAnimationsForElement is not a function, which matches the "fails without the fix" line.- The commit is verified. No version bump.
Need ✅ · Size ✅ · Reuse ✅ (hosts reuse Studio's parser and matcher instead of copying them) · Simpler ✅
Risk: none. Additive API.
— Rames
miguel-heygen
enabled auto-merge
November 17, 2026 08:55
Contributor
Edit accuracy: accurate 267 (base branch 267), smooth 102 of thoseThe gate passes. Quarantined, measured but not gated (8)
Unstable (1)
|
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
@hyperframes/studionow exportsfetchParsedAnimationsandgetAnimationsForElement, the two steps Studio's own panels use to find the GSAP tweens that address an element:fetchParsedAnimationsparses the element's source file on the server.getAnimationsForElementmatches the parsed tweens to the element by id or selector.No behaviour changes.
Why
A host that embeds Studio decides whether a hand move would fight a tween. Until now it read the film's live
gsap. Over an opaque (sealed) preview that window is out of reach, and the editing port has no tween read. The source-parsed animations are the same answer either way, and they come from the one place Studio already keeps them. Exporting them lets a host make that check over a sealed preview without a second copy of the parser or the matcher.What I measured
packages/studio/src/elementAnimations.test.ts: green 3 runs in a row; the studio type check is clean.packages/studio/src/elementAnimations.test.ts"are the parsed tweens that address it by id or selector, read where a sealed preview's host can" fails with the export removed (getAnimationsForElement is not a function).What I did NOT exercise
fetchParsedAnimationsend to end: the function is Studio's own, unchanged; its use in the host comes with the host's change.No visible change
Two exports, no UI.