@hyperframes/studio 0.8.126 → 0.8.127

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/assets/{hyperframes-player-BbbN-wWN.js → hyperframes-player-uqzDaxVL.js} +1 -1
  2. package/dist/assets/{index-nvLF29ZH.js → index-CLBNYlDY.js} +1 -1
  3. package/dist/assets/{index-B8kU2xXl.js → index-COhbL1xq.js} +171 -171
  4. package/dist/assets/{index-Cll7uTNy.js → index-DXSYlqmV.js} +1 -1
  5. package/dist/index.html +1 -1
  6. package/dist/index.js +1008 -893
  7. package/dist/index.js.map +1 -1
  8. package/package.json +8 -8
  9. package/src/components/editor/MotionPathOverlay.layerPress.test.tsx +42 -0
  10. package/src/components/editor/MotionPathOverlay.tsx +20 -26
  11. package/src/components/editor/motionPathCommit.nodeDrop.test.ts +212 -0
  12. package/src/components/editor/motionPathCommit.ts +58 -0
  13. package/src/components/editor/motionPathGeometry.test.ts +13 -0
  14. package/src/components/editor/motionPathGeometry.ts +4 -2
  15. package/src/hooks/gsapDragCommit.ts +33 -1
  16. package/src/hooks/gsapEditOutcome.ts +27 -2
  17. package/src/hooks/gsapParsedTween.test-helpers.ts +28 -1
  18. package/src/hooks/gsapParsedTween.ts +23 -2
  19. package/src/hooks/gsapRuntimeBridge.ts +7 -1
  20. package/src/hooks/gsapRuntimeKeyframes.ts +1 -1
  21. package/src/hooks/gsapShared.test.ts +1 -0
  22. package/src/hooks/gsapShared.ts +6 -2
  23. package/src/hooks/gsapValueAtPlayhead.realGsap.test.ts +107 -5
  24. package/src/hooks/gsapValueAtPlayhead.test.ts +129 -27
  25. package/src/hooks/gsapValueAtPlayhead.ts +46 -6
  26. package/src/hooks/gsapWholePropertyOffsetCommit.test.ts +72 -1
  27. package/src/hooks/gsapWholePropertyOffsetCommit.ts +6 -1
  28. package/src/hooks/useCommitPreflightCapabilities.ts +2 -2
  29. package/src/hooks/useGsapAwareEditing.groupPlan.test.tsx +25 -0
@@ -8,7 +8,11 @@ import { resolveTweenStart, resolveTweenDuration } from "../utils/globalTimeComp
8
8
  import { roundTo3 } from "../utils/rounding";
9
9
  import { keyframeEases, PROPERTY_DEFAULTS } from "./gsapShared";
10
10
  import { synthesizeFlatTweenKeyframes } from "./gsapTweenSynth";
11
- import { materializeIfDynamic, type GsapDragCommitCallbacks } from "./gsapDragCommit";
11
+ import {
12
+ materializeIfDynamic,
13
+ refuseStepListRewrite,
14
+ type GsapDragCommitCallbacks,
15
+ } from "./gsapDragCommit";
12
16
 
13
17
  /**
14
18
  * Generic sibling of commitWholePathOffset for property groups other than
@@ -32,6 +36,7 @@ export async function commitWholePropertyOffset(
32
36
  // fallow-ignore-next-line code-duplication
33
37
  let effectiveAnim = anim;
34
38
  if (anim.keyframes) {
39
+ refuseStepListRewrite(anim);
35
40
  const newId = await materializeIfDynamic(anim, iframe, callbacks.commitMutation, selection);
36
41
  if (newId) effectiveAnim = { ...anim, id: newId };
37
42
  }
@@ -3,7 +3,7 @@ import type { GsapAnimation } from "@hyperframes/core/gsap-parser";
3
3
  import type { DomEditSelection } from "../components/editor/domEditingTypes";
4
4
  import { dragEditOutcome, preflightGsapRotationIntercept } from "./gsapRuntimeBridge";
5
5
  import { preflightGsapResizeIntercept } from "./gsapResizePreflight";
6
- import { GSAP_EDIT_BLOCK_COPY, type GsapEditOutcome } from "./gsapEditOutcome";
6
+ import { gsapEditBlockMessage, type GsapEditOutcome } from "./gsapEditOutcome";
7
7
  import { fetchParsedAnimations, parseCacheKey } from "./keyframeCacheAstLoad";
8
8
  import { getAnimationsForElement } from "./gsapElementMatch";
9
9
  import { gsapSourceFileForSelection } from "./useGsapAnimationFetchFallback";
@@ -44,7 +44,7 @@ const MANUAL_FLAGS = [
44
44
  function refusal(preflight: CommitPreflight | null, check: keyof CommitPreflight): string | null {
45
45
  const outcome = preflight?.[check];
46
46
  if (!outcome) return "";
47
- return outcome.status === "blocked" ? GSAP_EDIT_BLOCK_COPY[outcome.reason] : null;
47
+ return outcome.status === "blocked" ? gsapEditBlockMessage(outcome.reason, outcome.detail) : null;
48
48
  }
49
49
 
50
50
  /** Closes each manual flag whose commit Studio would refuse, and says why. */
@@ -127,6 +127,31 @@ describe("a group drag plans every member before its first write", () => {
127
127
  act(() => h.root.unmount());
128
128
  });
129
129
 
130
+ it("with auto-keyframe off, refuses the whole group when one member's step list holds a step delay", async () => {
131
+ usePlayerStore.setState({ autoKeyframeEnabled: false });
132
+ const steps = {
133
+ format: "object-array",
134
+ keyframes: [
135
+ { percentage: 50, properties: { x: 100, y: 0, delay: 0.5 } },
136
+ { percentage: 100, properties: { x: 200, y: 0 } },
137
+ ],
138
+ };
139
+ const h = mountGroup([
140
+ positionTween("a"),
141
+ positionTween("b", { keyframes: steps } as Partial<GsapAnimation>),
142
+ positionTween("c"),
143
+ ]);
144
+
145
+ await expect(h.groupCommit(h.updates)).rejects.toMatchObject({
146
+ reason: "keyframes-uneditable",
147
+ detail: "array-step-delay",
148
+ });
149
+
150
+ expect(h.written()).toEqual([]);
151
+ expect(trackStudioEditBlocked).toHaveBeenCalledWith(expect.objectContaining({ targetId: "b" }));
152
+ act(() => h.root.unmount());
153
+ });
154
+
130
155
  it("refuses members animated in two files, since the batch writes one file", async () => {
131
156
  const h = mountGroup(["a", "b", "c"].map((id) => positionTween(id)));
132
157
  const updates = h.updates.map((u, i) => ({