hyperframes 0.8.54 → 0.8.55

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.
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
6
6
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
7
7
  <title>HyperFrames Studio</title>
8
- <script type="module" crossorigin src="/assets/index-DPUJoO8n.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-TcBZyzNA.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/assets/index-DrHQAuGO.css">
10
10
  </head>
11
11
  <body>
@@ -17164,9 +17164,15 @@ function buildStudioSaveFailureProperties(input) {
17164
17164
  label: input.label ?? void 0,
17165
17165
  target_id: input.targetId ?? void 0,
17166
17166
  target_selector: input.targetSelector ?? void 0,
17167
- target_source_file: input.targetSourceFile ?? void 0
17167
+ target_source_file: input.targetSourceFile ?? void 0,
17168
+ block_detail: gsapBlockDetail(input.error)
17168
17169
  };
17169
17170
  }
17171
+ function gsapBlockDetail(error) {
17172
+ if (!(error instanceof Error) || error.name !== "GsapEditBlockedError") return void 0;
17173
+ const detail = error.detail;
17174
+ return typeof detail === "string" ? detail : void 0;
17175
+ }
17170
17176
  function trackStudioSaveFailure(input) {
17171
17177
  trackStudioEvent("save_failure", buildStudioSaveFailureProperties(input));
17172
17178
  }
@@ -38001,21 +38007,29 @@ var COPY = {
38001
38007
  "source-uneditable": "This animation is computed at runtime. Edit the animation in the Code tab."
38002
38008
  };
38003
38009
  var GsapEditBlockedError = class extends Error {
38004
- constructor(reason) {
38010
+ constructor(reason, detail) {
38005
38011
  super(COPY[reason]);
38006
38012
  this.reason = reason;
38013
+ this.detail = detail;
38007
38014
  this.name = "GsapEditBlockedError";
38008
38015
  }
38009
38016
  reason;
38017
+ detail;
38010
38018
  };
38011
38019
  function assertGsapEditPersisted(outcome) {
38012
- if (outcome.status === "blocked") throw new GsapEditBlockedError(outcome.reason);
38020
+ if (outcome.status === "blocked") throw new GsapEditBlockedError(outcome.reason, outcome.detail);
38013
38021
  }
38014
38022
  function assertGsapAnimationDirectlyEditable(animation) {
38015
38023
  const editability = editabilityForProvenance(animation.provenance);
38016
38024
  if (editability === "unroll") throw new GsapEditBlockedError("unroll-required");
38017
- if (editability === "source" || animation.hasUnresolvedKeyframes || animation.hasUnresolvedSelector) {
38018
- throw new GsapEditBlockedError("source-uneditable");
38025
+ if (editability === "source") {
38026
+ throw new GsapEditBlockedError("source-uneditable", "provenance-runtime-dynamic");
38027
+ }
38028
+ if (animation.hasUnresolvedKeyframes) {
38029
+ throw new GsapEditBlockedError("source-uneditable", "unresolved-keyframes");
38030
+ }
38031
+ if (animation.hasUnresolvedSelector) {
38032
+ throw new GsapEditBlockedError("source-uneditable", "unresolved-selector");
38019
38033
  }
38020
38034
  }
38021
38035
  function isGsapEditBlockedError(error) {
@@ -38035,7 +38049,8 @@ function directEditOutcomeForProperties(animations, properties) {
38035
38049
  }
38036
38050
  return { status: "persisted" };
38037
38051
  } catch (error) {
38038
- if (isGsapEditBlockedError(error)) return { status: "blocked", reason: error.reason };
38052
+ if (isGsapEditBlockedError(error))
38053
+ return { status: "blocked", reason: error.reason, detail: error.detail };
38039
38054
  throw error;
38040
38055
  }
38041
38056
  }
@@ -38092,7 +38107,7 @@ async function materializeIfDynamic(anim, iframe, commitMutation, selection) {
38092
38107
  void iframe;
38093
38108
  void commitMutation;
38094
38109
  void selection;
38095
- throw new GsapEditBlockedError("source-uneditable");
38110
+ throw new GsapEditBlockedError("source-uneditable", "geometry-unresolved-source");
38096
38111
  }
38097
38112
  async function commitStaticGsapPosition(selection, studioOffset, gsapPos, selector, existingSet, callbacks) {
38098
38113
  const { newX, newY } = computeDraggedGsapPosition(selection.element, studioOffset, gsapPos);
@@ -42361,7 +42376,11 @@ async function preflightGsapDragIntercept(selection, animations, iframe, fetchFa
42361
42376
  const posAnim = findGsapPositionAnimation(sourceAnimations, selector);
42362
42377
  const hasLivePosition = hasNonHoldTweenForElement(iframe, selector, void 0, POSITION_CHANNELS);
42363
42378
  if (hasLivePosition && !posAnim) {
42364
- return { status: "blocked", reason: "source-uneditable" };
42379
+ return {
42380
+ status: "blocked",
42381
+ reason: "source-uneditable",
42382
+ detail: "live-position-no-source-tween"
42383
+ };
42365
42384
  }
42366
42385
  if (!posAnim && !writeTargetSelector(selection)) {
42367
42386
  return { status: "blocked", reason: "no-selector" };
@@ -42430,7 +42449,7 @@ async function tryGsapDragIntercept(selection, offset, animations, iframe, commi
42430
42449
  return { status: "persisted" };
42431
42450
  }
42432
42451
  if (!posAnim) {
42433
- return { status: "blocked", reason: "source-uneditable" };
42452
+ return { status: "blocked", reason: "source-uneditable", detail: "no-position-tween" };
42434
42453
  }
42435
42454
  if (fetchFallbackAnimations) {
42436
42455
  const fresh = await fetchFallbackAnimations();
@@ -42476,7 +42495,11 @@ async function tryGsapRotationIntercept(selection, angle, animations, iframe, co
42476
42495
  const liveSelector = selectorFromSelection(selection);
42477
42496
  const hasLiveRotationTween = liveSelector ? hasNonHoldTweenForElement(iframe, liveSelector, void 0, ROTATION_CHANNELS) : false;
42478
42497
  if (!anim && hasLiveRotationTween) {
42479
- return { status: "blocked", reason: "source-uneditable" };
42498
+ return {
42499
+ status: "blocked",
42500
+ reason: "source-uneditable",
42501
+ detail: "live-rotation-no-source-tween"
42502
+ };
42480
42503
  }
42481
42504
  const newRotation = Math.round(angle);
42482
42505
  if (!anim || isInstantHold(anim)) {
@@ -75039,7 +75062,11 @@ async function tryGsapResizeIntercept(selection, size, animations, iframe, commi
75039
75062
  const liveSelector = selectorFromSelection(selection);
75040
75063
  const hasLiveResizeTween = liveSelector ? hasNonHoldTweenForElement(iframe, liveSelector, void 0, [...resizeProperties]) : false;
75041
75064
  if (!anim && hasLiveResizeTween) {
75042
- return { status: "blocked", reason: "source-uneditable" };
75065
+ return {
75066
+ status: "blocked",
75067
+ reason: "source-uneditable",
75068
+ detail: "live-resize-no-source-tween"
75069
+ };
75043
75070
  }
75044
75071
  logResize("intercept-enter", {
75045
75072
  hasScaleGroup,
@@ -75077,7 +75104,9 @@ async function tryGsapResizeIntercept(selection, size, animations, iframe, commi
75077
75104
  return { status: "persisted" };
75078
75105
  }
75079
75106
  const tweenDuration = resolveTweenDuration(anim);
75080
- if (tweenDuration <= 0) return { status: "blocked", reason: "source-uneditable" };
75107
+ if (tweenDuration <= 0) {
75108
+ return { status: "blocked", reason: "source-uneditable", detail: "zero-duration-tween" };
75109
+ }
75081
75110
  const { activeKeyframePct, setActiveKeyframePct } = usePlayerStore.getState();
75082
75111
  const pct = activeKeyframePct ?? computeCurrentPercentage(selection, anim);
75083
75112
  if (activeKeyframePct != null) setActiveKeyframePct(null);