@hyperframes/studio 0.8.40 → 0.8.42
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-CC4wumKr.js → hyperframes-player-DMsjnQck.js} +1 -1
- package/dist/assets/{index-DOjHPJxU.js → index-BZDSpvtS.js} +114 -114
- package/dist/assets/{index-C9O8J196.js → index-CVKJ_KP2.js} +1 -1
- package/dist/assets/{index-Cyu_JHMD.js → index-DfBPbqKk.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
- package/src/player/components/timelineRowVirtualizationFlag.test.ts +17 -0
- package/src/player/components/timelineRowVirtualizationFlag.ts +1 -1
- package/src/player/lib/thumbnailPolicy.test.ts +14 -0
- package/src/player/lib/thumbnailPolicy.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/studio",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.42",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -48,11 +48,11 @@
|
|
|
48
48
|
"gsap": "^3.13.0",
|
|
49
49
|
"marked": "^14.1.4",
|
|
50
50
|
"mediabunny": "^1.45.3",
|
|
51
|
-
"@hyperframes/core": "0.8.
|
|
52
|
-
"@hyperframes/
|
|
53
|
-
"@hyperframes/
|
|
54
|
-
"@hyperframes/
|
|
55
|
-
"@hyperframes/
|
|
51
|
+
"@hyperframes/core": "0.8.42",
|
|
52
|
+
"@hyperframes/player": "0.8.42",
|
|
53
|
+
"@hyperframes/sdk": "0.8.42",
|
|
54
|
+
"@hyperframes/studio-server": "0.8.42",
|
|
55
|
+
"@hyperframes/parsers": "0.8.42"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@types/react": "19",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"vite": "^6.4.2",
|
|
70
70
|
"vitest": "^4.1.11",
|
|
71
71
|
"zustand": "^5.0.0",
|
|
72
|
-
"@hyperframes/producer": "0.8.
|
|
72
|
+
"@hyperframes/producer": "0.8.42"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
75
|
"react": "19",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
1
2
|
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
2
3
|
|
|
3
4
|
afterEach(() => {
|
|
@@ -20,4 +21,20 @@ describe("timeline row virtualization flag", () => {
|
|
|
20
21
|
|
|
21
22
|
expect(STUDIO_TIMELINE_ROW_VIRTUALIZATION_ENABLED).toBe(false);
|
|
22
23
|
});
|
|
24
|
+
|
|
25
|
+
it("guards the import.meta.env read so it evaluates outside Vite", () => {
|
|
26
|
+
// `import.meta.env` is a Vite-only extension and is undefined in a non-Vite
|
|
27
|
+
// ESM host (e.g. @hyperframes/studio embedded in Turbopack/Next.js), where
|
|
28
|
+
// an unguarded `import.meta.env.VITE_*` read crashes module evaluation. The
|
|
29
|
+
// vitest runtime always provides a real `import.meta.env` object, so this
|
|
30
|
+
// hazard can't be reproduced behaviorally in-environment; assert on the
|
|
31
|
+
// source that the optional-chaining guard is present, matching the repo's
|
|
32
|
+
// existing source-inspection tests (see timelineMotionStyles.test.ts).
|
|
33
|
+
const source = readFileSync(
|
|
34
|
+
new URL("./timelineRowVirtualizationFlag.ts", import.meta.url),
|
|
35
|
+
"utf8",
|
|
36
|
+
);
|
|
37
|
+
expect(source).toContain("import.meta.env?.VITE_STUDIO_TIMELINE_ROW_VIRTUALIZATION_ENABLED");
|
|
38
|
+
expect(source).not.toMatch(/import\.meta\.env\.\w/);
|
|
39
|
+
});
|
|
23
40
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
1
2
|
import { describe, expect, it } from "vitest";
|
|
2
3
|
import { defaultThumbnailMode, effectiveThumbnailMode } from "./thumbnailPolicy";
|
|
3
4
|
|
|
@@ -11,4 +12,17 @@ describe("thumbnail runtime policy", () => {
|
|
|
11
12
|
expect(effectiveThumbnailMode("adaptive", "force-hidden")).toBe("hidden");
|
|
12
13
|
expect(effectiveThumbnailMode("adaptive", "follow-preference")).toBe("adaptive");
|
|
13
14
|
});
|
|
15
|
+
|
|
16
|
+
it("guards the import.meta.env read so it evaluates outside Vite", () => {
|
|
17
|
+
// `import.meta.env` is a Vite-only extension and is undefined in a non-Vite
|
|
18
|
+
// ESM host (e.g. @hyperframes/studio embedded in Turbopack/Next.js), where
|
|
19
|
+
// an unguarded `import.meta.env.VITE_*` read crashes module evaluation. The
|
|
20
|
+
// vitest runtime always provides a real `import.meta.env` object, so this
|
|
21
|
+
// hazard can't be reproduced behaviorally in-environment; assert on the
|
|
22
|
+
// source that the optional-chaining guard is present, matching the repo's
|
|
23
|
+
// existing source-inspection tests (see timelineMotionStyles.test.ts).
|
|
24
|
+
const source = readFileSync(new URL("./thumbnailPolicy.ts", import.meta.url), "utf8");
|
|
25
|
+
expect(source).toContain("import.meta.env?.VITE_STUDIO_TIMELINE_THUMBNAIL_POLICY");
|
|
26
|
+
expect(source).not.toMatch(/import\.meta\.env\.\w/);
|
|
27
|
+
});
|
|
14
28
|
});
|
|
@@ -4,7 +4,7 @@ export type ThumbnailRuntimePolicy = "follow-preference" | "force-hidden" | "leg
|
|
|
4
4
|
// "Adaptive" currently means the scheduler pauses rich work while scrolling.
|
|
5
5
|
// The mode name leaves room for finer-grained runtime heuristics later.
|
|
6
6
|
|
|
7
|
-
const rawPolicy = import.meta.env
|
|
7
|
+
const rawPolicy = import.meta.env?.VITE_STUDIO_TIMELINE_THUMBNAIL_POLICY;
|
|
8
8
|
|
|
9
9
|
const studioThumbnailRuntimePolicy: ThumbnailRuntimePolicy =
|
|
10
10
|
rawPolicy === "force-hidden" || rawPolicy === "legacy-default" ? rawPolicy : "follow-preference";
|