@hyperframes/studio 0.8.79 → 0.8.80

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 (74) hide show
  1. package/dist/assets/hyperframes-player-CgnoxDoD.js +464 -0
  2. package/dist/assets/{index-DBKySIo7.js → index-CsG24Jub.js} +190 -187
  3. package/dist/assets/{index-CJP92F4-.js → index-DZGVvqDT.js} +1 -1
  4. package/dist/assets/{index-ORZXYB0k.js → index-J9HXe7mU.js} +1 -1
  5. package/dist/index.d.ts +18 -1
  6. package/dist/index.html +1 -1
  7. package/dist/index.js +1491 -1177
  8. package/dist/index.js.map +1 -1
  9. package/package.json +8 -8
  10. package/src/App.tsx +5 -1
  11. package/src/components/editor/TimelineFxPopover.test.tsx +1 -1
  12. package/src/components/editor/TimelineFxPopover.tsx +1 -1
  13. package/src/components/editor/manualEdits.ts +1 -0
  14. package/src/components/editor/manualEditsParsing.ts +4 -0
  15. package/src/components/editor/useFxAudition.ts +3 -3
  16. package/src/components/nle/useTimelineEditCallbacks.ts +4 -0
  17. package/src/contexts/DomEditContext.tsx +4 -0
  18. package/src/contexts/TimelineEditContext.tsx +2 -0
  19. package/src/hooks/liveLanes.ts +147 -0
  20. package/src/hooks/timelineAudioGroupVolume.ts +81 -47
  21. package/src/hooks/timelineEditPermission.ts +9 -1
  22. package/src/hooks/timelineEditingHelpers.test.ts +16 -0
  23. package/src/hooks/timelineEditingHelpers.ts +69 -43
  24. package/src/hooks/timelineElementFxAttribute.ts +82 -36
  25. package/src/hooks/useAppHotkeys.ts +1 -1
  26. package/src/hooks/useAutomationSelectionKeyboard.test.tsx +125 -21
  27. package/src/hooks/useAutomationSelectionKeyboard.ts +21 -25
  28. package/src/hooks/useBlockHandlers.test.tsx +65 -0
  29. package/src/hooks/useBlockHandlers.ts +7 -4
  30. package/src/hooks/useDomEditAttributeCommits.ts +3 -17
  31. package/src/hooks/useDomEditSession.ts +1 -0
  32. package/src/hooks/useEditHistoryActions.ts +4 -3
  33. package/src/hooks/useExternalFileChangeCoordinator.test.tsx +49 -0
  34. package/src/hooks/useExternalFileChangeCoordinator.ts +15 -6
  35. package/src/hooks/useTimelineEditing.ts +19 -16
  36. package/src/hooks/useTimelineGroupEditing.ts +2 -1
  37. package/src/hooks/useToast.ts +2 -1
  38. package/src/player/components/ImageThumbnail.tsx +3 -12
  39. package/src/player/components/Player.test.ts +23 -0
  40. package/src/player/components/Player.tsx +4 -2
  41. package/src/player/components/TimelineAutomationLane.test.tsx +38 -0
  42. package/src/player/components/TimelineAutomationLane.tsx +18 -13
  43. package/src/player/components/TimelineAutomationLaneSlot.test.tsx +0 -2
  44. package/src/player/components/TimelineClipFades.test.tsx +24 -3
  45. package/src/player/components/TimelineClipFades.tsx +5 -2
  46. package/src/player/components/TimelineFxButton.tsx +1 -1
  47. package/src/player/components/TimelineGroupHeader.tsx +1 -1
  48. package/src/player/components/TimelineGroupRow.test.tsx +0 -1
  49. package/src/player/components/TimelineGroupRow.tsx +17 -11
  50. package/src/player/components/TimelineTrackHeader.tsx +21 -6
  51. package/src/player/components/groupAutomationElement.ts +9 -1
  52. package/src/player/components/timelineCallbacks.ts +2 -0
  53. package/src/player/components/timelineClipDragPreview.test.ts +41 -0
  54. package/src/player/components/timelineClipDragPreview.ts +15 -24
  55. package/src/player/components/timelineEditing.test.ts +99 -1
  56. package/src/player/components/timelineEditing.ts +5 -8
  57. package/src/player/components/timelineGroupEditing.test.ts +27 -0
  58. package/src/player/components/timelineGroupEditing.ts +18 -15
  59. package/src/player/components/timelineStackingSync.ts +5 -5
  60. package/src/player/components/timelineZones.ts +2 -3
  61. package/src/player/components/useAutomationEdgeStretch.ts +4 -4
  62. package/src/player/components/useAutomationLaneGestures.ts +1 -1
  63. package/src/player/components/useAutomationLanes.save.test.tsx +1406 -0
  64. package/src/player/components/useAutomationLanes.ts +58 -74
  65. package/src/player/lib/automationStoreSync.ts +30 -3
  66. package/src/player/lib/thumbnailImageDecoder.test.ts +82 -0
  67. package/src/player/lib/thumbnailImageDecoder.ts +73 -0
  68. package/src/player/lib/timelineDOM.test.ts +28 -8
  69. package/src/player/lib/timelineElementHelpers.ts +3 -4
  70. package/src/player/lib/timelineGroupInfo.ts +23 -23
  71. package/src/utils/studioFileHistory.ts +36 -30
  72. package/dist/assets/hyperframes-player-Bx_Kw4Ey.js +0 -464
  73. package/src/player/components/automationGestureKeys.test.ts +0 -49
  74. package/src/player/components/automationGestureKeys.ts +0 -49
@@ -1,49 +0,0 @@
1
- /**
2
- * Undo grouping for a lane gesture.
3
- *
4
- * Dragging a point persists on every move and once more on release. History
5
- * coalesces entries that share a key and land within 300ms of each other, and
6
- * these writes did neither: the moves and the release used different keys, and a
7
- * drag slower than the window split into several entries. Undo then took back
8
- * whatever fragment happened to be last, leaving the point near where the drag
9
- * had dropped it — which reads as undo not working at all.
10
- *
11
- * So a gesture mints one key and holds it: every move and the release that ends
12
- * it record under that key with no window to expire, and the next gesture gets a
13
- * fresh one so two drags never collapse into a single step.
14
- */
15
-
16
- export interface CoalesceHint {
17
- key: string;
18
- /** No expiry: a gesture is one step however long the pointer is held. */
19
- ms: number;
20
- }
21
-
22
- export interface AutomationGestureKeys {
23
- /** A continuous write. Opens a gesture if one is not already open. */
24
- live(): CoalesceHint;
25
- /** The persisting write that ends a gesture — or a standalone edit. */
26
- commit(): CoalesceHint;
27
- }
28
-
29
- export function createAutomationGestureKeys(
30
- mint: () => string = () => `automation-gesture:${++counter}`,
31
- ): AutomationGestureKeys {
32
- let open: string | null = null;
33
- const hint = (key: string): CoalesceHint => ({ key, ms: Number.POSITIVE_INFINITY });
34
- return {
35
- live: () => {
36
- open ??= mint();
37
- return hint(open);
38
- },
39
- commit: () => {
40
- // A commit with no drag before it — a Delete, a paste, a typed value — is
41
- // its own step, so it mints rather than joining anything.
42
- const key = open ?? mint();
43
- open = null;
44
- return hint(key);
45
- },
46
- };
47
- }
48
-
49
- let counter = 0;