@hyperframes/studio 0.8.123 → 0.8.125
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.
- package/dist/assets/{hyperframes-player-yABdb6yk.js → hyperframes-player-CmIh-wq9.js} +1 -1
- package/dist/assets/{index-D77MIjSJ.js → index-4LRR6o2F.js} +1 -1
- package/dist/assets/{index-Dt7lWtY7.js → index-CrYoEZ5p.js} +139 -139
- package/dist/assets/{index-LrNlT5Tg.css → index-D11atkBt.css} +1 -1
- package/dist/assets/{index-DWjF2Kxw.js → index-yCK8osBg.js} +1 -1
- package/dist/index.d.ts +43 -35
- package/dist/index.html +2 -2
- package/dist/index.js +283 -143
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +8 -8
- package/src/components/OpenInDesktopButton.dom.test.tsx +27 -10
- package/src/components/OpenInDesktopButton.tsx +22 -15
- package/src/components/editor/domEditOverlayGestures.ts +2 -0
- package/src/components/editor/domEditOverlayStartGesture.ts +6 -0
- package/src/components/editor/dragUndoPaint.test.ts +170 -2
- package/src/components/editor/gestureUndoRevert.ts +104 -0
- package/src/components/editor/manualOffsetDrag.ts +1 -12
- package/src/components/editor/useDomEditNudge.ts +1 -1
- package/src/components/editor/useDomEditOverlayGestures.ts +9 -5
- package/src/hooks/gestureTransaction.test.ts +60 -0
- package/src/hooks/gestureTransaction.ts +5 -2
- package/src/hooks/gsapGestureOutcome.ts +9 -2
- package/src/hooks/gsapResizeDropPoint.test.ts +39 -1
- package/src/hooks/gsapResizeElementSize.test.tsx +27 -0
- package/src/hooks/gsapResizeIntercept.ts +55 -68
- package/src/hooks/gsapScriptCommitTypes.ts +2 -0
- package/src/hooks/useGsapAwareEditing.groupPlan.test.tsx +29 -1
- package/src/hooks/useGsapAwareEditing.test.tsx +1 -0
- package/src/hooks/useGsapAwareEditing.ts +21 -25
- package/src/hooks/useGsapAwareGroupMove.ts +4 -6
- package/src/hooks/useGsapScriptCommits.test.tsx +42 -1
- package/src/hooks/useGsapScriptCommits.ts +12 -3
- package/src/player/components/AudibleVideoClipContent.test.tsx +67 -0
- package/src/player/components/AudibleVideoClipContent.tsx +5 -4
- package/src/player/components/AudioWaveform.tsx +2 -1
- package/src/player/components/ClipPeakMarks.tsx +5 -2
- package/src/player/components/OutOfSyncBadge.tsx +1 -1
- package/src/player/components/Timeline.trackPadding.test.tsx +1 -3
- package/src/player/components/TimelineCanvas.tsx +1 -0
- package/src/player/components/TimelineClip.filmstrip.test.tsx +27 -0
- package/src/player/components/TimelineClipFades.test.tsx +2 -1
- package/src/player/components/timelineClipDragPreview.test.ts +31 -0
- package/src/player/components/timelineClipDragPreview.ts +42 -37
- package/src/player/hooks/useTimelinePlayer.seek.test.ts +11 -0
- package/src/styles/components.css +33 -3
- package/src/utils/studioPendingEdits.test.ts +52 -0
- package/src/utils/studioPendingEdits.ts +55 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as P}from"./index-
|
|
1
|
+
import{g as P}from"./index-CrYoEZ5p.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};
|
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,8 +14,8 @@
|
|
|
14
14
|
document.documentElement.dataset.theme = "paper";
|
|
15
15
|
}
|
|
16
16
|
</script>
|
|
17
|
-
<script type="module" crossorigin src="/assets/index-
|
|
18
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
17
|
+
<script type="module" crossorigin src="/assets/index-CrYoEZ5p.js"></script>
|
|
18
|
+
<link rel="stylesheet" crossorigin href="/assets/index-D11atkBt.css">
|
|
19
19
|
</head>
|
|
20
20
|
<body>
|
|
21
21
|
<div data-hf-id="hf-aph5" id="root"></div>
|