@hyperframes/studio 0.9.45 → 0.9.47

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 (34) hide show
  1. package/dist/assets/{hyperframes-player-C7JtYIRD.js → hyperframes-player-DTdMXCCs.js} +1 -1
  2. package/dist/assets/{index-C7EGuz1n.js → index-CdtV6F8j.js} +121 -121
  3. package/dist/assets/index-DA5GM2Mj.js +469 -0
  4. package/dist/assets/pausedVideoDecoder-B4OsoiOL.js +1 -0
  5. package/dist/{chunk-FQ3VRKMC.js → chunk-5ZHKYODQ.js} +1 -0
  6. package/dist/index.d.ts +2 -2
  7. package/dist/index.html +1 -1
  8. package/dist/index.js +569 -534
  9. package/dist/{keys-CaWcxUST.d.ts → keys-B163OjLN.d.ts} +1 -0
  10. package/dist/keys.d.ts +1 -1
  11. package/dist/keys.js +1 -1
  12. package/package.json +9 -9
  13. package/src/captions/hooks/useCaptionSync.test.ts +45 -0
  14. package/src/captions/hooks/useCaptionSync.ts +8 -3
  15. package/src/hooks/gsapMutationClient.ts +6 -2
  16. package/src/hooks/useDomEditCommitsHelpers.test.ts +16 -0
  17. package/src/hooks/useDomEditCommitsHelpers.ts +3 -1
  18. package/src/hooks/useElementLifecycleOps.ts +1 -0
  19. package/src/hooks/useFreezeFrame.test.ts +9 -0
  20. package/src/hooks/useFreezeFrame.ts +3 -1
  21. package/src/hooks/useGroupCommits.ts +3 -0
  22. package/src/hooks/useTimelineDeleteOps.test.tsx +26 -0
  23. package/src/hooks/useTimelineDeleteOps.ts +3 -1
  24. package/src/player/components/ShortcutsPanel.test.tsx +75 -0
  25. package/src/player/components/ShortcutsPanel.tsx +20 -4
  26. package/src/player/components/studioKeyDefaults.ts +1 -0
  27. package/src/player/components/studioShortcuts.ts +1 -0
  28. package/src/player/lib/mediabunnyHevcSps.test.ts +169 -0
  29. package/src/utils/studioSaveDiagnostics.test.ts +10 -0
  30. package/src/utils/studioSaveDiagnostics.ts +10 -0
  31. package/src/utils/timelineCompositionInsert.ts +3 -1
  32. package/dist/assets/codec-DQ7n-U_9.js +0 -314
  33. package/dist/assets/index-CByWY7fK.js +0 -150
  34. package/dist/assets/pausedVideoDecoder-Bnvo9NIs.js +0 -1
@@ -8,6 +8,7 @@ import {
8
8
  StudioSaveHttpError,
9
9
  StudioSaveNetworkError,
10
10
  createStudioSaveHttpError,
11
+ heldFileWordsOf,
11
12
  buildStudioSaveFailureProperties,
12
13
  getStudioSaveStatusCode,
13
14
  retryStudioSave,
@@ -32,6 +33,15 @@ describe("a file the server says is held or protected", () => {
32
33
  expect(error.statusCode).toBe(status);
33
34
  });
34
35
 
36
+ it("reads a refused answer's words from a copy, leaving its body for the caller", async () => {
37
+ const response = new Response(JSON.stringify({ error: "x", why: "busy" }), { status: 423 });
38
+ expect(await heldFileWordsOf(response, "a/index.html")).toBe(
39
+ "index.html is open in another program. Close it there, then try again.",
40
+ );
41
+ expect(await response.json()).toEqual({ error: "x", why: "busy" });
42
+ expect(await heldFileWordsOf(new Response("boom", { status: 500 }), "index.html")).toBeNull();
43
+ });
44
+
35
45
  it("keeps the status and body for any other answer, and without a path", async () => {
36
46
  const other = await createStudioSaveHttpError(
37
47
  new Response("boom", { status: 500 }),
@@ -211,6 +211,16 @@ function heldFileMessage(body: string, path: string | undefined): string | null
211
211
  }
212
212
  }
213
213
 
214
+ export async function heldFileWordsOf(response: Response, path: string): Promise<string | null> {
215
+ return heldFileMessage(
216
+ await response
217
+ .clone()
218
+ .text()
219
+ .catch(() => ""),
220
+ path,
221
+ );
222
+ }
223
+
214
224
  export async function createStudioSaveHttpError(
215
225
  response: Response,
216
226
  fallbackMessage: string,
@@ -49,7 +49,9 @@ async function insertTimelineComposition(input: {
49
49
  },
50
50
  );
51
51
  if (!response.ok) {
52
- throw await createStudioSaveHttpError(response, "Failed to add composition to timeline");
52
+ throw await createStudioSaveHttpError(response, "Failed to add composition to timeline", {
53
+ path: input.targetPath,
54
+ });
53
55
  }
54
56
  return (await response.json()) as TimelineCompositionInsertionResult;
55
57
  }