@hyperframes/studio 0.6.33 → 0.6.35

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/index.html CHANGED
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
6
6
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
7
7
  <title>HyperFrames Studio</title>
8
- <script type="module" crossorigin src="/assets/index-CSG9kRJg.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-CMBmEncK.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/assets/index-SKRp8mGz.css">
10
10
  </head>
11
11
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperframes/studio",
3
- "version": "0.6.33",
3
+ "version": "0.6.35",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
@@ -31,8 +31,8 @@
31
31
  "@codemirror/view": "6.40.0",
32
32
  "@phosphor-icons/react": "^2.1.10",
33
33
  "mediabunny": "^1.45.3",
34
- "@hyperframes/core": "0.6.33",
35
- "@hyperframes/player": "0.6.33"
34
+ "@hyperframes/core": "0.6.35",
35
+ "@hyperframes/player": "0.6.35"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/react": "19",
@@ -46,7 +46,7 @@
46
46
  "vite": "^6.4.2",
47
47
  "vitest": "^3.2.4",
48
48
  "zustand": "^5.0.0",
49
- "@hyperframes/producer": "0.6.33"
49
+ "@hyperframes/producer": "0.6.35"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "react": "19",
@@ -62,7 +62,7 @@ export const STUDIO_MOTION_PANEL_ENABLED = resolveStudioBooleanEnvFlag(
62
62
  export const STUDIO_BLOCKS_PANEL_ENABLED = resolveStudioBooleanEnvFlag(
63
63
  env,
64
64
  ["VITE_STUDIO_ENABLE_BLOCKS_PANEL", "VITE_STUDIO_BLOCKS_PANEL_ENABLED"],
65
- false,
65
+ true,
66
66
  );
67
67
 
68
68
  export const STUDIO_PREVIEW_SELECTION_ENABLED = STUDIO_INSPECTOR_PANELS_ENABLED;
package/src/main.tsx CHANGED
@@ -22,6 +22,16 @@ function errorProps(value: unknown): {
22
22
  return { error_message: String(value), error_name: null, stack_trace: null };
23
23
  }
24
24
 
25
+ function isCompositionAssetError(msg: string): boolean {
26
+ return msg.includes("Error fetching") && (msg.includes("404") || msg.includes("Not Found"));
27
+ }
28
+
29
+ const ERROR_CAP = 50;
30
+ let errorCount = 0;
31
+ let rejectionCount = 0;
32
+ let errorCapSent = false;
33
+ let rejectionCapSent = false;
34
+
25
35
  window.addEventListener("error", (event) => {
26
36
  if (event.message?.includes("ResizeObserver loop")) {
27
37
  event.stopImmediatePropagation();
@@ -29,6 +39,15 @@ window.addEventListener("error", (event) => {
29
39
  return;
30
40
  }
31
41
 
42
+ errorCount++;
43
+ if (errorCount > ERROR_CAP) {
44
+ if (!errorCapSent) {
45
+ errorCapSent = true;
46
+ trackStudioEvent("error_cap_reached", { count: errorCount });
47
+ }
48
+ return;
49
+ }
50
+
32
51
  trackStudioEvent("unhandled_error", {
33
52
  ...errorProps(event.error),
34
53
  error_message: event.message,
@@ -39,7 +58,19 @@ window.addEventListener("error", (event) => {
39
58
  });
40
59
 
41
60
  window.addEventListener("unhandledrejection", (event) => {
42
- trackStudioEvent("unhandled_promise_rejection", errorProps(event.reason));
61
+ const props = errorProps(event.reason);
62
+ if (isCompositionAssetError(props.error_message)) return;
63
+
64
+ rejectionCount++;
65
+ if (rejectionCount > ERROR_CAP) {
66
+ if (!rejectionCapSent) {
67
+ rejectionCapSent = true;
68
+ trackStudioEvent("rejection_cap_reached", { count: rejectionCount });
69
+ }
70
+ return;
71
+ }
72
+
73
+ trackStudioEvent("unhandled_promise_rejection", props);
43
74
  });
44
75
 
45
76
  createRoot(document.getElementById("root")!).render(