fix(studio): keep useGsapTweenCache under the size cap + correct non-sticky drill test (#1770)

- extract deduplicateKeyframes + synthesizeFlatTweenKeyframes into gsapTweenSynth.ts
  so useGsapTweenCache.ts drops from 628 to 573 lines (600-line cap)
- the drilled-into-group selection test asserted the old sticky behavior; the code
  is intentionally non-sticky (clicking outside exits the group and resolves the
  clicked element), so the test now asserts that
This commit is contained in:
Miguel Ángel
2026-06-27 11:48:17 -04:00
committed by GitHub
parent de42af438a
commit a44ef47e1a
3 changed files with 70 additions and 60 deletions
@@ -154,7 +154,7 @@ describe("resolveDomEditSelection — data-hf-group capture", () => {
expect(scoped).not.toContain("outside");
});
it("returns null when clicking outside the group the user is drilled into", async () => {
it("exits the drilled-into group and selects the outside element (non-sticky drill)", async () => {
const { parent, inner } = buildNestedGroups();
const outside = document.createElement("div");
outside.id = "outside";
@@ -167,6 +167,8 @@ describe("resolveDomEditSelection — data-hf-group capture", () => {
document.body.removeChild(parent);
document.body.removeChild(outside);
expect(selection).toBeNull();
// Drill-in is non-sticky: clicking outside the active group exits it and
// resolves the clicked element normally (rather than selecting nothing).
expect(selection?.id).toBe("outside");
});
});