@hyperframes/studio 0.8.124 → 0.8.126

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 (69) hide show
  1. package/dist/assets/{hyperframes-player-ColOZ_78.js → hyperframes-player-BbbN-wWN.js} +1 -1
  2. package/dist/assets/{index-BuSTrK-Z.js → index-B8kU2xXl.js} +177 -177
  3. package/dist/assets/{index-CVuUfURE.js → index-Cll7uTNy.js} +1 -1
  4. package/dist/assets/{index-jQEqFKMk.js → index-nvLF29ZH.js} +1 -1
  5. package/dist/index.d.ts +43 -35
  6. package/dist/index.html +1 -1
  7. package/dist/index.js +4458 -4072
  8. package/dist/index.js.map +1 -1
  9. package/package.json +9 -8
  10. package/src/components/editor/DomEditSelectionChrome.test.tsx +5 -0
  11. package/src/components/editor/DomEditSelectionChrome.tsx +1 -0
  12. package/src/components/editor/MotionPathNode.tsx +56 -0
  13. package/src/components/editor/MotionPathOverlay.layerPress.test.tsx +140 -48
  14. package/src/components/editor/MotionPathOverlay.test.tsx +45 -0
  15. package/src/components/editor/MotionPathOverlay.tsx +30 -61
  16. package/src/components/editor/canvasContextMenuZOrder.ts +1 -10
  17. package/src/components/editor/domEditOverlayGestures.ts +2 -0
  18. package/src/components/editor/domEditOverlayStartGesture.ts +6 -0
  19. package/src/components/editor/dragUndoPaint.test.ts +170 -2
  20. package/src/components/editor/gestureUndoRevert.ts +104 -0
  21. package/src/components/editor/manualEditsSeekReapply.ts +3 -6
  22. package/src/components/editor/manualOffsetDrag.ts +3 -15
  23. package/src/components/editor/motionPathGeometry.test.ts +48 -1
  24. package/src/components/editor/motionPathGeometry.ts +46 -8
  25. package/src/components/editor/motionPathHome.ts +75 -0
  26. package/src/components/editor/motionPathLayerNode.test.ts +43 -35
  27. package/src/components/editor/motionPathLayerNode.ts +20 -16
  28. package/src/components/editor/reapplyPositionEditsAfterSeek.test.ts +20 -0
  29. package/src/components/editor/studioMotion.ts +7 -19
  30. package/src/components/editor/useDomEditNudge.ts +1 -1
  31. package/src/components/editor/useDomEditOverlayGestures.ts +9 -5
  32. package/src/components/editor/useMotionPathData.test.tsx +236 -0
  33. package/src/components/editor/useMotionPathData.ts +23 -61
  34. package/src/components/sidebar/CompositionsTab.thumbnails.test.tsx +1 -0
  35. package/src/hooks/gestureTransaction.test.ts +60 -0
  36. package/src/hooks/gestureTransaction.ts +5 -2
  37. package/src/hooks/gsapGestureOutcome.ts +9 -2
  38. package/src/hooks/gsapParsedTween.ts +16 -0
  39. package/src/hooks/gsapResizeDropPoint.test.ts +39 -1
  40. package/src/hooks/gsapResizeElementSize.test.tsx +27 -0
  41. package/src/hooks/gsapResizeIntercept.ts +55 -68
  42. package/src/hooks/gsapRuntimeKeyframes.realGsap.test.ts +48 -0
  43. package/src/hooks/gsapRuntimeKeyframes.ts +10 -3
  44. package/src/hooks/gsapScriptCommitTypes.ts +2 -0
  45. package/src/hooks/gsapShared.ts +2 -1
  46. package/src/hooks/gsapShared.writeTarget.test.ts +10 -0
  47. package/src/hooks/intersectionObserverTestUtils.ts +16 -0
  48. package/src/hooks/resizeObserverTestUtils.ts +9 -2
  49. package/src/hooks/timelineEditingHelpers.ts +2 -9
  50. package/src/hooks/useGsapAwareEditing.groupPlan.test.tsx +29 -1
  51. package/src/hooks/useGsapAwareEditing.test.tsx +1 -0
  52. package/src/hooks/useGsapAwareEditing.ts +21 -25
  53. package/src/hooks/useGsapAwareGroupMove.ts +4 -6
  54. package/src/hooks/useGsapScriptCommits.test.tsx +42 -1
  55. package/src/hooks/useGsapScriptCommits.ts +12 -3
  56. package/src/hooks/useThumbnailStripSize.test.tsx +236 -1
  57. package/src/hooks/useThumbnailStripSize.ts +206 -17
  58. package/src/noWindowBoundDomChecks.test.ts +31 -0
  59. package/src/player/components/CompositionThumbnail.tsx +10 -6
  60. package/src/player/components/ImageThumbnail.tsx +11 -5
  61. package/src/player/components/ThumbnailTiles.test.tsx +30 -0
  62. package/src/player/components/ThumbnailTiles.tsx +41 -0
  63. package/src/player/components/VideoThumbnail.test.tsx +116 -9
  64. package/src/player/components/VideoThumbnail.tsx +11 -5
  65. package/src/player/lib/timelineGroupInfo.realm.test.ts +20 -0
  66. package/src/player/lib/timelineGroupInfo.ts +2 -1
  67. package/src/utils/studioPendingEdits.test.ts +52 -0
  68. package/src/utils/studioPendingEdits.ts +55 -10
  69. package/src/webmcp/webmcpTestUtils.ts +2 -2
@@ -1 +1 @@
1
- import{g as P}from"./index-BuSTrK-Z.js";function j(c,d){for(var s=0;s<d.length;s++){const a=d[s];if(typeof a!="string"&&!Array.isArray(a)){for(const i in a)if(i!=="default"&&!(i in c)){const l=Object.getOwnPropertyDescriptor(a,i);l&&Object.defineProperty(c,i,l.get?l:{enumerable:!0,get:()=>a[i]})}}}return Object.freeze(Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}))}var v={},w;function k(){if(w)return v;w=1,Object.defineProperty(v,"__esModule",{value:!0}),v.default=d;var c=window.OfflineAudioContext||window.webkitOfflineAudioContext;function d(e){var r=a(e);return r.start(0),[i,y,O(e.sampleRate),s].reduce(function(t,o){return o(t)},r.buffer.getChannelData(0))}function s(e){return e.sort(function(r,t){return t.count-r.count}).splice(0,5)[0].tempo}function a(e){var r=e.length,t=e.numberOfChannels,o=e.sampleRate,n=new c(t,r,o),u=n.createBufferSource();u.buffer=e;var f=n.createBiquadFilter();return f.type="lowpass",u.connect(f),f.connect(n.destination),u}function i(e){for(var r=[],t=.9,o=.3,n=15;r.length<n&&t>=o;)r=l(e,t),t-=.05;if(r.length<n)throw new Error("Could not find enough samples for a reliable detection.");return r}function l(e,r){for(var t=[],o=0,n=e.length;o<n;o+=1)e[o]>r&&(t.push(o),o+=1e4);return t}function y(e){var r=[];return e.forEach(function(t,o){for(var n=function(x){var g=e[o+x]-t,_=r.some(function(h){if(h.interval===g)return h.count+=1});_||r.push({interval:g,count:1})},u=0;u<10;u+=1)n(u)}),r}function O(e){return function(r){var t=[];return r.forEach(function(o){if(o.interval!==0){for(var n=60/(o.interval/e);n<90;)n*=2;for(;n>180;)n/=2;n=Math.round(n);var u=t.some(function(f){if(f.tempo===n)return f.count+=o.count});u||t.push({tempo:n,count:o.count})}}),t}}return v}var p,b;function q(){return b||(b=1,p=k().default),p}var m=q();const A=P(m),D=j({__proto__:null,default:A},[m]);export{D as i};
1
+ import{g as P}from"./index-B8kU2xXl.js";function j(c,d){for(var s=0;s<d.length;s++){const a=d[s];if(typeof a!="string"&&!Array.isArray(a)){for(const i in a)if(i!=="default"&&!(i in c)){const l=Object.getOwnPropertyDescriptor(a,i);l&&Object.defineProperty(c,i,l.get?l:{enumerable:!0,get:()=>a[i]})}}}return Object.freeze(Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}))}var v={},w;function k(){if(w)return v;w=1,Object.defineProperty(v,"__esModule",{value:!0}),v.default=d;var c=window.OfflineAudioContext||window.webkitOfflineAudioContext;function d(e){var r=a(e);return r.start(0),[i,y,O(e.sampleRate),s].reduce(function(t,o){return o(t)},r.buffer.getChannelData(0))}function s(e){return e.sort(function(r,t){return t.count-r.count}).splice(0,5)[0].tempo}function a(e){var r=e.length,t=e.numberOfChannels,o=e.sampleRate,n=new c(t,r,o),u=n.createBufferSource();u.buffer=e;var f=n.createBiquadFilter();return f.type="lowpass",u.connect(f),f.connect(n.destination),u}function i(e){for(var r=[],t=.9,o=.3,n=15;r.length<n&&t>=o;)r=l(e,t),t-=.05;if(r.length<n)throw new Error("Could not find enough samples for a reliable detection.");return r}function l(e,r){for(var t=[],o=0,n=e.length;o<n;o+=1)e[o]>r&&(t.push(o),o+=1e4);return t}function y(e){var r=[];return e.forEach(function(t,o){for(var n=function(x){var g=e[o+x]-t,_=r.some(function(h){if(h.interval===g)return h.count+=1});_||r.push({interval:g,count:1})},u=0;u<10;u+=1)n(u)}),r}function O(e){return function(r){var t=[];return r.forEach(function(o){if(o.interval!==0){for(var n=60/(o.interval/e);n<90;)n*=2;for(;n>180;)n/=2;n=Math.round(n);var u=t.some(function(f){if(f.tempo===n)return f.count+=o.count});u||t.push({tempo:n,count:o.count})}}),t}}return v}var p,b;function q(){return b||(b=1,p=k().default),p}var m=q();const A=P(m),D=j({__proto__:null,default:A},[m]);export{D as i};
@@ -1,4 +1,4 @@
1
- import{n as Qi}from"./index-BuSTrK-Z.js";/*!
1
+ import{n as Qi}from"./index-B8kU2xXl.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
@@ -915,6 +915,48 @@ type TimelineMoveUpdates = Pick<TimelineElement, "start" | "track"> & {
915
915
  stackingReorder?: TimelineStackingReorderIntent | null;
916
916
  };
917
917
 
918
+ declare class StudioSaveHttpError extends Error {
919
+ readonly statusCode: number;
920
+ readonly alreadyToasted: boolean;
921
+ constructor(message: string, statusCode: number, options?: {
922
+ alreadyToasted?: boolean;
923
+ });
924
+ }
925
+ declare class StudioFileConflictError extends StudioSaveHttpError {
926
+ readonly filePath: string;
927
+ readonly currentVersion: string | null;
928
+ readonly currentContent: string | null;
929
+ readonly attemptedContent: string;
930
+ constructor(input: {
931
+ filePath: string;
932
+ currentVersion: string | null;
933
+ currentContent: string | null;
934
+ attemptedContent: string;
935
+ });
936
+ }
937
+ type StudioSaveDrainResult<Failure = unknown> = {
938
+ status: "clean";
939
+ } | {
940
+ status: "conflict";
941
+ error: StudioFileConflictError;
942
+ } | {
943
+ status: "failed";
944
+ error: Failure;
945
+ };
946
+
947
+ type StudioPendingEditsDrainResult = StudioSaveDrainResult;
948
+ interface StudioEditInFlight {
949
+ reverted: () => boolean;
950
+ within: <T>(run: () => T) => T;
951
+ drawUnlessUndone: (draw: () => void) => void;
952
+ drawKeepingUndone: <T>(draw: () => T) => T;
953
+ markSaved: () => void;
954
+ }
955
+ declare function revertNewestStudioPendingEdit(): (() => void) | null;
956
+ declare function flushStudioPendingEdits({ onlyCurrent, }?: {
957
+ onlyCurrent?: boolean | undefined;
958
+ }): Promise<StudioPendingEditsDrainResult>;
959
+
918
960
  /** Value-only channels a `tl.set(...)` patch may touch. */
919
961
  interface SetPatchProps {
920
962
  x?: number;
@@ -984,6 +1026,7 @@ interface CommitMutationOptions {
984
1026
  pending: boolean;
985
1027
  };
986
1028
  beforeReload?: () => void;
1029
+ pendingEdit?: StudioEditInFlight;
987
1030
  /**
988
1031
  * Serialize this commit against others sharing the same key. Used to chain
989
1032
  * per-animationId GSAP meta updates. Every commit independently takes the
@@ -2881,41 +2924,6 @@ declare function useTimelineEditing({ projectId, activeCompPath, timelineElement
2881
2924
  restoreLiveLanes: (restore: Parameters<(restore: LiveLaneRestore) => void>[0]) => void;
2882
2925
  };
2883
2926
 
2884
- declare class StudioSaveHttpError extends Error {
2885
- readonly statusCode: number;
2886
- readonly alreadyToasted: boolean;
2887
- constructor(message: string, statusCode: number, options?: {
2888
- alreadyToasted?: boolean;
2889
- });
2890
- }
2891
- declare class StudioFileConflictError extends StudioSaveHttpError {
2892
- readonly filePath: string;
2893
- readonly currentVersion: string | null;
2894
- readonly currentContent: string | null;
2895
- readonly attemptedContent: string;
2896
- constructor(input: {
2897
- filePath: string;
2898
- currentVersion: string | null;
2899
- currentContent: string | null;
2900
- attemptedContent: string;
2901
- });
2902
- }
2903
- type StudioSaveDrainResult<Failure = unknown> = {
2904
- status: "clean";
2905
- } | {
2906
- status: "conflict";
2907
- error: StudioFileConflictError;
2908
- } | {
2909
- status: "failed";
2910
- error: Failure;
2911
- };
2912
-
2913
- type StudioPendingEditsDrainResult = StudioSaveDrainResult;
2914
- declare function revertNewestStudioPendingEdit(): (() => void) | null;
2915
- declare function flushStudioPendingEdits({ onlyCurrent, }?: {
2916
- onlyCurrent?: boolean | undefined;
2917
- }): Promise<StudioPendingEditsDrainResult>;
2918
-
2919
2927
  interface HistoryResult {
2920
2928
  ok: boolean;
2921
2929
  reason?: string;
package/dist/index.html CHANGED
@@ -14,7 +14,7 @@
14
14
  document.documentElement.dataset.theme = "paper";
15
15
  }
16
16
  </script>
17
- <script type="module" crossorigin src="/assets/index-BuSTrK-Z.js"></script>
17
+ <script type="module" crossorigin src="/assets/index-B8kU2xXl.js"></script>
18
18
  <link rel="stylesheet" crossorigin href="/assets/index-D11atkBt.css">
19
19
  </head>
20
20
  <body>