@hyperframes/studio 0.7.90 → 0.7.93

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 (170) hide show
  1. package/dist/assets/{hyperframes-player-RS9ROX_S.js → hyperframes-player-NSdcoOcK.js} +1 -1
  2. package/dist/assets/{index-CquRJgm-.js → index-CCGnc_0M.js} +1 -1
  3. package/dist/assets/index-D78KEjgB.css +1 -0
  4. package/dist/assets/index-Dp1zVb9X.js +428 -0
  5. package/dist/assets/{index-Bi-CwQDX.js → index-wS6f7F5q.js} +1 -1
  6. package/dist/index.d.ts +40 -36
  7. package/dist/index.html +2 -2
  8. package/dist/index.js +9598 -6798
  9. package/dist/index.js.map +1 -1
  10. package/package.json +8 -7
  11. package/src/App.tsx +14 -14
  12. package/src/components/DesignPanelPromoteProvider.tsx +1 -1
  13. package/src/components/ExternalFileConflictBanner.test.tsx +142 -0
  14. package/src/components/ExternalFileConflictBanner.tsx +255 -0
  15. package/src/components/StudioRightPanel.tsx +1 -1
  16. package/src/components/editor/GsapAnimationList.tsx +84 -0
  17. package/src/components/editor/GsapAnimationSection.test.tsx +100 -11
  18. package/src/components/editor/GsapAnimationSection.tsx +11 -41
  19. package/src/components/editor/PropertyPanel.tsx +1 -1
  20. package/src/components/editor/PropertyPanelFlat.tsx +29 -26
  21. package/src/components/editor/gsapAnimationCallbacks.ts +0 -10
  22. package/src/components/editor/propertyPanel3dTransform.tsx +1 -1
  23. package/src/components/editor/propertyPanelCommitField.tsx +37 -2
  24. package/src/components/editor/propertyPanelFlatDescriptors.ts +20 -0
  25. package/src/components/editor/propertyPanelFlatMotionSection.test.tsx +56 -55
  26. package/src/components/editor/propertyPanelFlatMotionSection.tsx +9 -37
  27. package/src/components/editor/propertyPanelFlatPrimitives.test.tsx +69 -0
  28. package/src/components/editor/propertyPanelFlatPrimitives.tsx +2 -2
  29. package/src/components/editor/propertyPanelPrimitives.tsx +2 -2
  30. package/src/components/editor/propertyPanelTransformCommit.test.ts +57 -0
  31. package/src/components/editor/propertyPanelTransformCommit.ts +14 -14
  32. package/src/components/editor/propertyPanelTypes.ts +10 -4
  33. package/src/components/editor/useInspectorGestureTransaction.test.tsx +65 -0
  34. package/src/components/editor/useInspectorGestureTransaction.ts +66 -10
  35. package/src/components/nle/useTimelineEditCallbacks.test.tsx +78 -4
  36. package/src/components/nle/useTimelineEditCallbacks.ts +12 -7
  37. package/src/components/renders/useRenderQueue.ts +16 -3
  38. package/src/components/renders/useRenderQueueTelemetry.test.tsx +104 -0
  39. package/src/components/sidebar/AssetCard.tsx +4 -3
  40. package/src/components/sidebar/AudioRow.tsx +4 -3
  41. package/src/contexts/DomEditContext.tsx +1 -1
  42. package/src/contexts/FileManagerContext.tsx +12 -0
  43. package/src/hooks/externalFileChangeOwnership.test.ts +17 -0
  44. package/src/hooks/externalFileReloadBus.test.ts +34 -0
  45. package/src/hooks/externalFileReloadBus.ts +18 -0
  46. package/src/hooks/gsapDragCommit.test.ts +39 -1
  47. package/src/hooks/gsapDragCommit.ts +12 -40
  48. package/src/hooks/gsapEditOutcome.ts +72 -0
  49. package/src/hooks/gsapResizeIntercept.test.ts +90 -2
  50. package/src/hooks/gsapResizeIntercept.ts +44 -16
  51. package/src/hooks/gsapRuntimeBridge.test.ts +195 -27
  52. package/src/hooks/gsapRuntimeBridge.ts +93 -28
  53. package/src/hooks/useAnimatedPropertyCommit.test.tsx +194 -24
  54. package/src/hooks/useAnimatedPropertyCommit.ts +101 -49
  55. package/src/hooks/useAppHotkeys.textEditing.test.tsx +215 -0
  56. package/src/hooks/useDomEditSession.test.tsx +1 -1
  57. package/src/hooks/useDomEditSession.ts +1 -1
  58. package/src/hooks/useDomGeometryCommits.test.tsx +61 -0
  59. package/src/hooks/useDomGeometryCommits.ts +20 -0
  60. package/src/hooks/useEditorSave.test.tsx +131 -0
  61. package/src/hooks/useEditorSave.ts +113 -39
  62. package/src/hooks/useExternalFileChangeCoordinator.test.tsx +221 -0
  63. package/src/hooks/useExternalFileChangeCoordinator.ts +429 -0
  64. package/src/hooks/useFileManager.projectOwnership.test.tsx +139 -7
  65. package/src/hooks/useFileManager.ts +32 -3
  66. package/src/hooks/useGsapAnimationFetchFallback.ts +45 -24
  67. package/src/hooks/useGsapAwareEditing.test.tsx +125 -39
  68. package/src/hooks/useGsapAwareEditing.ts +88 -27
  69. package/src/hooks/useGsapInteractionFailureTelemetry.test.tsx +42 -0
  70. package/src/hooks/useGsapInteractionFailureTelemetry.ts +5 -1
  71. package/src/hooks/useGsapKeyframeOps.test.tsx +83 -5
  72. package/src/hooks/useGsapKeyframeOps.ts +20 -9
  73. package/src/hooks/usePreviewPersistence.test.ts +23 -0
  74. package/src/hooks/usePreviewPersistence.ts +22 -58
  75. package/src/hooks/useSdkSession.ts +8 -52
  76. package/src/hooks/useStudioExternalFileChanges.ts +81 -0
  77. package/src/hooks/useStudioSdkSessions.ts +2 -7
  78. package/src/hooks/useStudioSessionStart.ts +15 -0
  79. package/src/hooks/useStudioTestHooks.test.tsx +11 -7
  80. package/src/player/components/BeatStrip.test.tsx +374 -0
  81. package/src/player/components/BeatStrip.tsx +295 -37
  82. package/src/player/components/KeyframeDiamondContextMenu.test.tsx +16 -1
  83. package/src/player/components/KeyframeDiamondContextMenu.tsx +6 -5
  84. package/src/player/components/LayerDisclosureRow.tsx +2 -0
  85. package/src/player/components/Timeline.test.ts +26 -8
  86. package/src/player/components/Timeline.tsx +87 -88
  87. package/src/player/components/Timeline.virtualization.test.tsx +54 -11
  88. package/src/player/components/TimelineCanvas.tsx +14 -71
  89. package/src/player/components/TimelineClip.test.tsx +17 -2
  90. package/src/player/components/TimelineClip.tsx +20 -5
  91. package/src/player/components/TimelineClipDiamonds.test.tsx +536 -27
  92. package/src/player/components/TimelineClipDiamonds.tsx +118 -223
  93. package/src/player/components/TimelineCompactDiamonds.tsx +84 -0
  94. package/src/player/components/TimelineDiamondConnectors.tsx +31 -3
  95. package/src/player/components/TimelineGestureOverlay.test.tsx +90 -0
  96. package/src/player/components/TimelineGestureOverlay.tsx +96 -0
  97. package/src/player/components/TimelineLanes.test.tsx +64 -7
  98. package/src/player/components/TimelineLanes.tsx +84 -66
  99. package/src/player/components/TimelineOverlays.test.ts +161 -0
  100. package/src/player/components/TimelineOverlays.tsx +104 -11
  101. package/src/player/components/TimelinePropertyLanes.test.tsx +9 -5
  102. package/src/player/components/TimelinePropertyLanes.tsx +9 -2
  103. package/src/player/components/TimelineTrackHeader.test.tsx +1 -0
  104. package/src/player/components/TimelineTrackHeader.tsx +16 -0
  105. package/src/player/components/TimelineTrackRow.tsx +58 -7
  106. package/src/player/components/timelineCallbacks.ts +1 -1
  107. package/src/player/components/timelineClipDragGestureLifecycle.test.ts +18 -3
  108. package/src/player/components/timelineClipDragGestureLifecycle.ts +199 -51
  109. package/src/player/components/timelineClipDragPreview.test.ts +33 -0
  110. package/src/player/components/timelineClipDragPreview.ts +18 -12
  111. package/src/player/components/timelineClipDragTypes.ts +12 -0
  112. package/src/player/components/timelineDiamondTypes.ts +18 -21
  113. package/src/player/components/timelineDragDrop.test.tsx +206 -0
  114. package/src/player/components/timelineDragDrop.ts +152 -30
  115. package/src/player/components/timelineKeyboardNavigation.test.ts +303 -0
  116. package/src/player/components/timelineKeyboardNavigation.ts +337 -0
  117. package/src/player/components/timelineLaneProps.ts +3 -1
  118. package/src/player/components/timelineMarquee.test.ts +73 -25
  119. package/src/player/components/timelineMarquee.ts +44 -16
  120. package/src/player/components/timelineNavigationIdentity.ts +38 -0
  121. package/src/player/components/timelineTestViewport.ts +13 -0
  122. package/src/player/components/timelineViewModel.ts +4 -4
  123. package/src/player/components/useTimelineClipDrag.resize.test.tsx +219 -17
  124. package/src/player/components/useTimelineClipDrag.ts +112 -70
  125. package/src/player/components/useTimelineClipRenderWindow.ts +8 -39
  126. package/src/player/components/useTimelineFocusCoordinator.test.tsx +174 -0
  127. package/src/player/components/useTimelineFocusCoordinator.ts +221 -0
  128. package/src/player/components/useTimelineKeyboardActor.test.tsx +267 -0
  129. package/src/player/components/useTimelineKeyboardActor.ts +147 -0
  130. package/src/player/components/useTimelineKeyframeHandlers.test.tsx +43 -7
  131. package/src/player/components/useTimelineKeyframeHandlers.ts +465 -2
  132. package/src/player/components/useTimelineLaneMoveRefresh.ts +7 -0
  133. package/src/player/components/useTimelineLogicalFocus.ts +80 -0
  134. package/src/player/components/useTimelineLogicalRows.test.tsx +57 -0
  135. package/src/player/components/useTimelineLogicalRows.ts +47 -0
  136. package/src/player/components/useTimelineRangeSelection.test.tsx +204 -0
  137. package/src/player/components/useTimelineRangeSelection.ts +202 -69
  138. package/src/player/components/useTimelineRangeSelectionScrub.test.tsx +3 -2
  139. package/src/player/components/useTimelineRowVirtualization.ts +26 -29
  140. package/src/player/components/useTrackGapMenu.test.tsx +64 -0
  141. package/src/player/components/useTrackGapMenu.ts +32 -9
  142. package/src/player/store/keyframeSlice.ts +59 -18
  143. package/src/player/store/liveTime.ts +11 -0
  144. package/src/player/store/playerStore.test.ts +106 -23
  145. package/src/player/store/playerStore.ts +43 -40
  146. package/src/player/store/timelineFocusState.ts +15 -0
  147. package/src/telemetry/canary.test.ts +325 -0
  148. package/src/telemetry/canary.ts +268 -0
  149. package/src/telemetry/client.test.ts +8 -3
  150. package/src/telemetry/client.ts +13 -43
  151. package/src/telemetry/config.ts +16 -2
  152. package/src/telemetry/distinctId.test.ts +35 -0
  153. package/src/telemetry/distinctId.ts +11 -2
  154. package/src/telemetry/policy.test.ts +81 -0
  155. package/src/telemetry/policy.ts +104 -0
  156. package/src/utils/domEditSaveQueue.test.ts +37 -1
  157. package/src/utils/domEditSaveQueue.ts +22 -4
  158. package/src/utils/externalConflictStorage.test.ts +95 -0
  159. package/src/utils/externalConflictStorage.ts +172 -0
  160. package/src/utils/studioFileVersion.test.ts +28 -1
  161. package/src/utils/studioFileVersion.ts +30 -0
  162. package/src/utils/studioPendingEdits.test.ts +108 -1
  163. package/src/utils/studioPendingEdits.ts +39 -2
  164. package/src/utils/studioSaveDiagnostics.ts +5 -0
  165. package/src/utils/studioTelemetry.test.ts +76 -0
  166. package/src/utils/studioTelemetry.ts +14 -6
  167. package/dist/assets/index-BXkzp_OU.css +0 -1
  168. package/dist/assets/index-Cql15Yur.js +0 -428
  169. package/src/player/components/useTimelineRevealClip.test.tsx +0 -139
  170. package/src/player/components/useTimelineRevealClip.ts +0 -180
@@ -1,4 +1,4 @@
1
- import{n as Qi}from"./index-Cql15Yur.js";/*!
1
+ import{n as Qi}from"./index-Dp1zVb9X.js";/*!
2
2
  * Copyright (c) 2026-present, Vanilagy and contributors
3
3
  *
4
4
  * This Source Code Form is subject to the terms of the Mozilla Public
package/dist/index.d.ts CHANGED
@@ -92,6 +92,16 @@ interface KeyframeCacheEntry {
92
92
  ease?: string;
93
93
  easeEach?: string;
94
94
  }
95
+ interface FocusedEaseSegment {
96
+ animationId: string;
97
+ collidingAnimationTargets?: AnimationKeyframeTarget[];
98
+ tweenPercentage: number;
99
+ elementId: string;
100
+ projectId: string | null;
101
+ sessionEpoch: number;
102
+ nonce: number;
103
+ }
104
+ type FocusedEaseSegmentTarget = Omit<FocusedEaseSegment, "projectId" | "sessionEpoch" | "nonce">;
95
105
  interface KeyframeSlice {
96
106
  /** Selected collapsed (`element:pct`) or expanded (`element:group:animation:clipPct`) diamonds. */
97
107
  selectedKeyframes: Set<string>;
@@ -103,20 +113,14 @@ interface KeyframeSlice {
103
113
  setClipExpanded: (id: string, expanded: boolean) => void;
104
114
  /** Union-expand clips (keyframed clips are expanded by default on load). */
105
115
  expandClips: (ids: readonly string[]) => void;
106
- /** elementId scopes the request to one element so a shared (class-selector)
107
- * animation id can't open the ease editor on the wrong element. */
108
- focusedEaseSegment: {
109
- animationId: string;
110
- collidingAnimationTargets?: AnimationKeyframeTarget[];
111
- tweenPercentage: number;
112
- elementId: string;
113
- } | null;
114
- setFocusedEaseSegment: (target: {
115
- animationId: string;
116
- collidingAnimationTargets?: AnimationKeyframeTarget[];
117
- tweenPercentage: number;
118
- elementId: string;
119
- } | null) => void;
116
+ /**
117
+ * Project/session/element-scoped request. Its nonce is monotonic across store
118
+ * resets so a stale consumer can never collide with a later request.
119
+ */
120
+ focusedEaseSegment: FocusedEaseSegment | null;
121
+ focusedEaseRequestNonce: number;
122
+ setFocusedEaseSegment: (target: FocusedEaseSegmentTarget) => void;
123
+ clearFocusedEaseSegment: (nonce: number) => void;
120
124
  /** Keyframe data per element id, populated from parsed GSAP animations. */
121
125
  keyframeCache: Map<string, KeyframeCacheEntry>;
122
126
  /** Unmerged source tweens per element; expanded property lanes read this, never keyframeCache. */
@@ -125,6 +129,19 @@ interface KeyframeSlice {
125
129
  setKeyframeCache: (elementId: string, data: KeyframeCacheEntry | undefined) => void;
126
130
  }
127
131
 
132
+ interface TimelineFocusRequest {
133
+ id: string;
134
+ projectId: string | null;
135
+ sessionEpoch: number;
136
+ nonce: number;
137
+ }
138
+
139
+ type TimeListener = (time: number) => void;
140
+ declare const liveTime: {
141
+ notify: (time: number) => void;
142
+ subscribe: (listener: TimeListener) => () => boolean;
143
+ };
144
+
128
145
  interface TimelineElement {
129
146
  id: string;
130
147
  label?: string;
@@ -299,18 +316,10 @@ interface PlayerState extends KeyframeSlice {
299
316
  requestedSeekTime: number | null;
300
317
  requestSeek: (time: number) => void;
301
318
  clearSeekRequest: () => void;
302
- /**
303
- * Request the timeline to scroll a clip into view (e.g. clicking an
304
- * already-added asset card in the sidebar). Consumed and cleared by
305
- * useTimelineRevealClip. The nonce makes repeat requests for the same
306
- * clip observable so a second click re-reveals after the user scrolls away.
307
- */
308
- clipRevealRequest: {
309
- elementId: string;
310
- nonce: number;
311
- } | null;
312
- requestClipReveal: (elementId: string) => void;
313
- clearClipRevealRequest: () => void;
319
+ timelineFocus: TimelineFocusRequest | null;
320
+ timelineFocusNonce: number;
321
+ requestTimelineFocus: (id: string) => void;
322
+ clearTimelineFocus: (nonce: number) => void;
314
323
  lintFindingsByElement: Map<string, {
315
324
  count: number;
316
325
  messages: string[];
@@ -360,11 +369,6 @@ interface BeatHistoryEntry {
360
369
  at: number;
361
370
  label: string;
362
371
  }
363
- type TimeListener = (time: number) => void;
364
- declare const liveTime: {
365
- notify: (t: number) => void;
366
- subscribe: (cb: TimeListener) => () => boolean;
367
- };
368
372
  declare const usePlayerStore: zustand.UseBoundStore<zustand.StoreApi<PlayerState>>;
369
373
 
370
374
  /**
@@ -514,7 +518,7 @@ interface TimelineEditCallbacks {
514
518
  onRazorSplit?: (element: TimelineElement, splitTime: number) => Promise<void> | void;
515
519
  onRazorSplitAll?: (splitTime: number) => Promise<void> | void;
516
520
  onDeleteKeyframe?: (elementId: string, keyframe: TimelineKeyframeTarget) => void;
517
- onDeleteAllKeyframes?: (element: TimelineElement) => void;
521
+ onDeleteAllKeyframes?: (element: TimelineElement, animationId?: string) => void;
518
522
  onMoveKeyframeToPlayhead?: (element: TimelineElement, keyframe: TimelineKeyframeTarget) => void;
519
523
  /** Drag-to-retime: `keyframe` identifies the dragged keyframe (its percentage
520
524
  * is clip-relative), `toClipPercentage` is the neighbour-clamped drop. */
@@ -842,14 +846,14 @@ interface PropertyPanelProps {
842
846
  onSetManualOffset: (element: DomEditSelection, next: {
843
847
  x: number;
844
848
  y: number;
845
- }) => void;
849
+ }) => void | Promise<void>;
846
850
  onSetManualSize: (element: DomEditSelection, next: {
847
851
  width: number;
848
852
  height: number;
849
- }) => void;
853
+ }) => void | Promise<void>;
850
854
  onSetManualRotation: (element: DomEditSelection, next: {
851
855
  angle: number;
852
- }) => void;
856
+ }) => void | Promise<void>;
853
857
  onSetText: (value: string, fieldKey?: string) => void;
854
858
  onSetTextFieldStyle: (fieldKey: string, property: string, value: string) => void;
855
859
  onPreviewTextFieldStyle?: (fieldKey: string, property: string, value: string) => void;
@@ -888,8 +892,8 @@ interface PropertyPanelProps {
888
892
  onAddKeyframe?: (animationId: string, percentage: number, property: string, value: number | string) => void;
889
893
  onRemoveKeyframe?: (animationId: string, percentage: number) => void;
890
894
  onUpdateKeyframeEase?: (animationId: string, percentage: number, ease: string) => void;
891
- onSetAllKeyframeEases?: (animationId: string, ease: string) => void;
892
895
  onUpdateSegmentEase?: NonNullable<GsapAnimationEditCallbacks["onUpdateSegmentEase"]>;
896
+ onSetAllKeyframeEases?: (animationId: string, ease: string) => void;
893
897
  onConvertToKeyframes?: (animationId: string, duration?: number) => void;
894
898
  onCommitAnimatedProperty?: (selection: DomEditSelection, property: string, value: number | string) => Promise<void>;
895
899
  onCommitAnimatedProperties?: (selection: DomEditSelection, props: Record<string, number | string>) => Promise<void>;
package/dist/index.html CHANGED
@@ -5,8 +5,8 @@
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-Cql15Yur.js"></script>
9
- <link rel="stylesheet" crossorigin href="/assets/index-BXkzp_OU.css">
8
+ <script type="module" crossorigin src="/assets/index-Dp1zVb9X.js"></script>
9
+ <link rel="stylesheet" crossorigin href="/assets/index-D78KEjgB.css">
10
10
  </head>
11
11
  <body>
12
12
  <div data-hf-id="hf-aph5" id="root"></div>