@hyperframes/studio 0.8.77 → 0.8.78
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-BdnQGwG5.js +464 -0
- package/dist/assets/{index-2GgHjQq-.js → index-CX_4MYbk.js} +4 -4
- package/dist/assets/{index-DcxWQ7Za.js → index-C_n__Uh3.js} +1 -1
- package/dist/assets/{index-CsFCRdMo.js → index-DdpuHaGN.js} +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.html +1 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/package.json +8 -7
- package/src/index.ts +7 -0
- package/src/telemetry/client.test.ts +26 -0
- package/src/telemetry/policy.test.ts +10 -0
- package/src/telemetry/policy.ts +7 -0
- package/dist/assets/hyperframes-player-BSDTJ9EF.js +0 -464
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/studio",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.78",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -52,11 +52,12 @@
|
|
|
52
52
|
"dockview-react": "8.3.1",
|
|
53
53
|
"gsap": "^3.13.0",
|
|
54
54
|
"mediabunny": "^1.45.3",
|
|
55
|
-
"@hyperframes/
|
|
56
|
-
"@hyperframes/
|
|
57
|
-
"@hyperframes/
|
|
58
|
-
"@hyperframes/
|
|
59
|
-
"@hyperframes/
|
|
55
|
+
"@hyperframes/parsers": "0.8.78",
|
|
56
|
+
"@hyperframes/sdk": "0.8.78",
|
|
57
|
+
"@hyperframes/player": "0.8.78",
|
|
58
|
+
"@hyperframes/shader-transitions": "0.8.78",
|
|
59
|
+
"@hyperframes/studio-server": "0.8.78",
|
|
60
|
+
"@hyperframes/core": "0.8.78"
|
|
60
61
|
},
|
|
61
62
|
"devDependencies": {
|
|
62
63
|
"@tailwindcss/vite": "^4.3.3",
|
|
@@ -72,7 +73,7 @@
|
|
|
72
73
|
"vite": "^6.4.2",
|
|
73
74
|
"vitest": "^4.1.11",
|
|
74
75
|
"zustand": "^5.0.0",
|
|
75
|
-
"@hyperframes/producer": "0.8.
|
|
76
|
+
"@hyperframes/producer": "0.8.78"
|
|
76
77
|
},
|
|
77
78
|
"peerDependencies": {
|
|
78
79
|
"react": "19",
|
package/src/index.ts
CHANGED
|
@@ -183,3 +183,10 @@ export type { TimelinePaneProps } from "./components/nle/TimelinePane";
|
|
|
183
183
|
export { TimelineEditProvider } from "./contexts/TimelineEditContext";
|
|
184
184
|
export type { TimelineEditCallbacks } from "./player/components/timelineCallbacks";
|
|
185
185
|
export type { BlockedTimelineEditIntent } from "./player/components/timelineEditing";
|
|
186
|
+
|
|
187
|
+
export {
|
|
188
|
+
playSeamTransitionLoop,
|
|
189
|
+
type SeamTransitionFrameSource,
|
|
190
|
+
type SeamTransitionLoopHandle,
|
|
191
|
+
type SeamTransitionLoopOptions,
|
|
192
|
+
} from "@hyperframes/shader-transitions";
|
|
@@ -30,6 +30,7 @@ describe("studio client shouldTrack", () => {
|
|
|
30
30
|
setDev(false);
|
|
31
31
|
setNoTelemetry(undefined);
|
|
32
32
|
localStorage.clear();
|
|
33
|
+
delete window.__HF_CLI_TELEMETRY_DISABLED;
|
|
33
34
|
vi.unstubAllGlobals();
|
|
34
35
|
});
|
|
35
36
|
|
|
@@ -89,3 +90,28 @@ describe("studio client shouldTrack", () => {
|
|
|
89
90
|
expect(shouldTrack()).toBe(false);
|
|
90
91
|
});
|
|
91
92
|
});
|
|
93
|
+
|
|
94
|
+
it("suppresses actual render events in a CLI-opted-out Studio while the enabled control sends", async () => {
|
|
95
|
+
vi.useFakeTimers();
|
|
96
|
+
vi.resetModules();
|
|
97
|
+
setDev(false);
|
|
98
|
+
setNoTelemetry(undefined);
|
|
99
|
+
localStorage.clear();
|
|
100
|
+
const send = vi.fn().mockResolvedValue(new Response());
|
|
101
|
+
vi.stubGlobal("fetch", send);
|
|
102
|
+
try {
|
|
103
|
+
const { trackEvent } = await import("./client");
|
|
104
|
+
window.__HF_CLI_TELEMETRY_DISABLED = true;
|
|
105
|
+
trackEvent("render_complete", { duration: 1 });
|
|
106
|
+
await vi.advanceTimersByTimeAsync(1100);
|
|
107
|
+
expect(send).not.toHaveBeenCalled();
|
|
108
|
+
window.__HF_CLI_TELEMETRY_DISABLED = false;
|
|
109
|
+
trackEvent("render_complete", { duration: 1 });
|
|
110
|
+
await vi.advanceTimersByTimeAsync(1100);
|
|
111
|
+
expect(send).toHaveBeenCalledOnce();
|
|
112
|
+
} finally {
|
|
113
|
+
delete window.__HF_CLI_TELEMETRY_DISABLED;
|
|
114
|
+
vi.useRealTimers();
|
|
115
|
+
vi.unstubAllGlobals();
|
|
116
|
+
}
|
|
117
|
+
});
|
|
@@ -15,6 +15,7 @@ describe("browserTelemetryAllowed", () => {
|
|
|
15
15
|
|
|
16
16
|
beforeEach(async () => {
|
|
17
17
|
localStorage.clear();
|
|
18
|
+
delete window.__HF_CLI_TELEMETRY_DISABLED;
|
|
18
19
|
vi.resetModules();
|
|
19
20
|
// vitest sets import.meta.env.DEV; the policy suppresses under it, so the
|
|
20
21
|
// baseline has to be an explicitly production-like env.
|
|
@@ -28,6 +29,15 @@ describe("browserTelemetryAllowed", () => {
|
|
|
28
29
|
vi.unstubAllEnvs();
|
|
29
30
|
});
|
|
30
31
|
|
|
32
|
+
it("refuses a CLI opt-out even when browser storage permits telemetry", () => {
|
|
33
|
+
expect(browserTelemetryAllowed()).toBe(true);
|
|
34
|
+
window.__HF_CLI_TELEMETRY_DISABLED = true;
|
|
35
|
+
expect(browserTelemetryAllowed()).toBe(false);
|
|
36
|
+
expect(localStorage.getItem(DOCUMENTED_OPT_OUT)).toBeNull();
|
|
37
|
+
window.__HF_CLI_TELEMETRY_DISABLED = false;
|
|
38
|
+
expect(browserTelemetryAllowed()).toBe(true);
|
|
39
|
+
});
|
|
40
|
+
|
|
31
41
|
it("allows telemetry with no control set", () => {
|
|
32
42
|
expect(browserTelemetryAllowed()).toBe(true);
|
|
33
43
|
});
|
package/src/telemetry/policy.ts
CHANGED
|
@@ -92,10 +92,17 @@ export function browserTelemetryAllowed(): boolean {
|
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
+
declare global {
|
|
96
|
+
interface Window {
|
|
97
|
+
__HF_CLI_TELEMETRY_DISABLED?: boolean;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
95
101
|
function allowed(): boolean {
|
|
96
102
|
return (
|
|
97
103
|
isApiKeyConfigured() &&
|
|
98
104
|
!isBuildTimeOptOut() &&
|
|
105
|
+
!(typeof window !== "undefined" && window.__HF_CLI_TELEMETRY_DISABLED === true) &&
|
|
99
106
|
!isViteDevMode() &&
|
|
100
107
|
!isOptedOut() &&
|
|
101
108
|
!isLegacyOptedOut() &&
|