@hyperframes/studio 0.8.189 → 0.8.191
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-CkK8Zijf.js → hyperframes-player-Bv9hQ3v7.js} +1 -1
- package/dist/assets/index-CBO8uz7-.css +1 -0
- package/dist/assets/{index-B2JcCaRF.js → index-D_QqfWhx.js} +133 -132
- package/dist/assets/{index-ATnRoBug.js → index-Df14bh-L.js} +1 -1
- package/dist/{chunk-563JPIL4.js → chunk-IWO4UENE.js} +8 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.html +2 -2
- package/dist/index.js +4166 -3922
- package/dist/player.js +1 -1
- package/dist/styles.css +1 -1
- package/package.json +8 -8
- package/src/captions/parser.dom.test.ts +126 -0
- package/src/captions/parser.ts +45 -23
- package/src/components/StudioRightPanels.tsx +9 -0
- package/src/components/dock/DockTab.tsx +2 -0
- package/src/components/dock/dockAccessibility.test.ts +3 -3
- package/src/components/dock/dockLayout.ts +1 -1
- package/src/components/dock/panelRegistry.ts +6 -0
- package/src/components/editor/overlayFrameLoop.test.ts +42 -0
- package/src/components/editor/overlayFrameLoop.ts +11 -3
- package/src/components/panels/MotionBlurPanel.test.tsx +177 -0
- package/src/components/panels/MotionBlurPanel.tsx +163 -0
- package/src/components/panels/motionBlurPanelModel.test.ts +143 -0
- package/src/components/panels/motionBlurPanelModel.ts +98 -0
- package/src/components/renders/useRenderQueue.ts +0 -8
- package/src/hooks/usePanelLayout.test.ts +1 -1
- package/src/player/components/PlayerControls.test.tsx +67 -2
- package/src/player/components/PlayerControls.tsx +5 -3
- package/src/player/components/PreviewSeekBar.tsx +47 -0
- package/src/player/components/TimelineClip.filmstrip.test.tsx +1 -1
- package/src/player/components/timelineMotionStyles.test.ts +1 -1
- package/src/styles/theme.css +1 -1
- package/src/utils/studioHelpers.ts +2 -1
- package/src/utils/studioUrlState.ts +8 -1
- package/dist/assets/index-CESvLzz0.css +0 -1
- package/src/components/renders/useRenderQueueMotionBlur.test.tsx +0 -61
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
// @vitest-environment happy-dom
|
|
2
|
-
|
|
3
|
-
// WYSIWYG: a render only blurs what the Studio preview could show, and only the browser knows
|
|
4
|
-
// whether it has html-in-canvas. The request body is how it tells the server.
|
|
5
|
-
|
|
6
|
-
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
7
|
-
import { startRenderAndReadBody, type MountedQueue } from "./renderQueueTestHarness";
|
|
8
|
-
|
|
9
|
-
vi.mock("../../telemetry/events", () => ({ trackStudioRenderStart: vi.fn() }));
|
|
10
|
-
|
|
11
|
-
const { useRenderQueue } = await import("./useRenderQueue");
|
|
12
|
-
|
|
13
|
-
let queue: MountedQueue | null = null;
|
|
14
|
-
|
|
15
|
-
async function startRenderBody(): Promise<Record<string, unknown>> {
|
|
16
|
-
const started = await startRenderAndReadBody(useRenderQueue, {
|
|
17
|
-
opts: { fps: 30, quality: "standard", format: "mp4" },
|
|
18
|
-
});
|
|
19
|
-
queue = started.queue;
|
|
20
|
-
return started.body;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function stubHtmlInCanvas(members: string[]): void {
|
|
24
|
-
vi.stubGlobal(
|
|
25
|
-
"CanvasRenderingContext2D",
|
|
26
|
-
class {
|
|
27
|
-
drawElementImage(): void {}
|
|
28
|
-
},
|
|
29
|
-
);
|
|
30
|
-
const proto = HTMLCanvasElement.prototype as unknown as Record<string, unknown>;
|
|
31
|
-
for (const name of ["requestPaint", ...members]) proto[name] = () => {};
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
afterEach(() => {
|
|
35
|
-
queue?.unmount();
|
|
36
|
-
queue = null;
|
|
37
|
-
document.body.innerHTML = "";
|
|
38
|
-
for (const name of ["requestPaint", "layoutSubtree", "updateElementGeometry"]) {
|
|
39
|
-
delete (HTMLCanvasElement.prototype as unknown as Record<string, unknown>)[name];
|
|
40
|
-
}
|
|
41
|
-
vi.unstubAllGlobals();
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
describe("render request previewMotionBlur", () => {
|
|
45
|
-
it("is false in a browser without html-in-canvas", async () => {
|
|
46
|
-
expect((await startRenderBody())["previewMotionBlur"]).toBe(false);
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
it.each([
|
|
50
|
-
["the layoutsubtree form", "layoutSubtree"],
|
|
51
|
-
["the content=drawable form", "updateElementGeometry"],
|
|
52
|
-
])("is true in a browser with html-in-canvas in %s", async (_name, member) => {
|
|
53
|
-
stubHtmlInCanvas([member]);
|
|
54
|
-
expect((await startRenderBody())["previewMotionBlur"]).toBe(true);
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
it("is false when html-in-canvas has neither known form", async () => {
|
|
58
|
-
stubHtmlInCanvas([]);
|
|
59
|
-
expect((await startRenderBody())["previewMotionBlur"]).toBe(false);
|
|
60
|
-
});
|
|
61
|
-
});
|