@refraction-ui/react 0.8.0 → 0.9.0

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.cjs CHANGED
@@ -43666,6 +43666,10 @@ function createTelemetry(config) {
43666
43666
  }
43667
43667
 
43668
43668
  // ../react-logger/dist/index.js
43669
+ var noopTelemetry = null;
43670
+ function getNoopTelemetry() {
43671
+ return noopTelemetry ??= createNoopTelemetry();
43672
+ }
43669
43673
  var TelemetryContext = React11__namespace.createContext(null);
43670
43674
  function TelemetryProvider({ children, ...config }) {
43671
43675
  const telemetryRef = React11__namespace.useRef(null);
@@ -43683,9 +43687,9 @@ function useTelemetry() {
43683
43687
  if (!ctx) {
43684
43688
  devWarn(
43685
43689
  "react-logger/use-telemetry-outside-provider",
43686
- "useTelemetry() (or useSpan(), which depends on it) was called outside a <TelemetryProvider>. Wrap your app (or the consuming subtree) in <TelemetryProvider> so the telemetry context is available."
43690
+ "useTelemetry() (or useLogger()/useSpan(), which depend on it) was called outside a <TelemetryProvider>. Telemetry is a no-op here; wrap your app (or the consuming subtree) in <TelemetryProvider> to enable it."
43687
43691
  );
43688
- throw new Error("useTelemetry must be used within a <TelemetryProvider>");
43692
+ return getNoopTelemetry();
43689
43693
  }
43690
43694
  return ctx.telemetry;
43691
43695
  }