tempo-sdk 0.0.44 → 0.0.45

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.
@@ -1,3 +1,6 @@
1
+ import {
2
+ VITE_ERROR_FEED_KEY
3
+ } from "../chunk-K3EYTZLL.js";
1
4
  import {
2
5
  Canvas,
3
6
  CanvasContext,
@@ -14,15 +17,15 @@ import {
14
17
  useActiveState,
15
18
  useRenderErrorRecovery,
16
19
  useRequiredCanvasHost
17
- } from "../chunk-KQHC77IF.js";
20
+ } from "../chunk-7O6DPEMF.js";
18
21
  import {
19
22
  installTempoInteractProjectionSource
20
- } from "../chunk-U52RN7MP.js";
23
+ } from "../chunk-FIIU52RN.js";
21
24
  import {
22
25
  TEMPO_INTERACT_FRAME_NAME,
23
26
  isTempoInteractFrameName
24
27
  } from "../chunk-65B52AR7.js";
25
- import "../chunk-ZT2REPH4.js";
28
+ import "../chunk-57KAYXHF.js";
26
29
 
27
30
  // canvas/canvas-host.tsx
28
31
  import {
@@ -1025,6 +1028,19 @@ function installCanvasHostRuntimeProblemTracking(tracker) {
1025
1028
  };
1026
1029
  }
1027
1030
  function installViteErrorStream(tracker) {
1031
+ const receive = (problem) => {
1032
+ if (problem === null) {
1033
+ tracker.clearHostProblem(["vite-hmr-error"]);
1034
+ return;
1035
+ }
1036
+ if (typeof problem?.message !== "string") return;
1037
+ tracker.reportHostProblem("vite-hmr-error", problem.message, {
1038
+ stack: problem.stack,
1039
+ filename: problem.file ?? problem.loc?.file
1040
+ });
1041
+ };
1042
+ const feed = globalThis[VITE_ERROR_FEED_KEY];
1043
+ if (feed) return feed.subscribe(receive);
1028
1044
  if (typeof EventSource === "undefined") return () => {
1029
1045
  };
1030
1046
  const source = new EventSource("/__tempo/errors");
@@ -1035,15 +1051,7 @@ function installViteErrorStream(tracker) {
1035
1051
  } catch {
1036
1052
  return;
1037
1053
  }
1038
- if (problem === null) {
1039
- tracker.clearHostProblem(["vite-hmr-error"]);
1040
- return;
1041
- }
1042
- if (typeof problem?.message !== "string") return;
1043
- tracker.reportHostProblem("vite-hmr-error", problem.message, {
1044
- stack: problem.stack,
1045
- filename: problem.file ?? problem.loc?.file
1046
- });
1054
+ receive(problem);
1047
1055
  };
1048
1056
  return () => {
1049
1057
  source.close();