feat(studio): route GSAP keyframe add through SDK (§3.5 PR2) (#1470)

Co-authored-by: Miguel Ángel <miguel07alm@protonmail.com>
This commit is contained in:
Vance Ingalls
2026-06-17 16:43:34 -07:00
committed by GitHub
co-authored by Miguel Ángel
parent 592f7c775d
commit 7ca4490328
6 changed files with 211 additions and 9 deletions
+22
View File
@@ -189,6 +189,28 @@ export async function sdkGsapTweenPersist(
}
}
export async function sdkGsapKeyframePersist(
targetPath: string,
animationId: string,
position: number,
value: Record<string, unknown>,
sdkSession: Composition | null | undefined,
deps: CutoverDeps,
options?: CutoverOptions,
): Promise<boolean> {
if (!sdkSession) return false;
try {
const before = sdkSession.serialize();
sdkSession.dispatch({ type: "addGsapKeyframe", animationId, position, value });
await persistSdkSerialize(sdkSession, targetPath, before, deps, options);
trackStudioEvent("sdk_cutover_success", { opCount: 1 });
return true;
} catch (err) {
trackStudioEvent("sdk_cutover_fallback", { error: String(err) });
return false;
}
}
export async function sdkDeletePersist(
hfId: string,
originalContent: string,