@xylabs/sdk-react 2.10.4 → 2.10.5

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,2 +1,2 @@
1
- declare const isLocalhost: boolean;
1
+ declare const isLocalhost: () => boolean;
2
2
  export { isLocalhost };
@@ -1,4 +1,4 @@
1
- const isLocalhost = !!(window.location.hostname === 'localhost' ||
1
+ const isLocalhost = () => !!(window.location.hostname === 'localhost' ||
2
2
  // [::1] is the IPv6 localhost address.
3
3
  window.location.hostname === '[::1]' ||
4
4
  // 127.0.0.0/8 are considered localhost for IPv4.
@@ -1 +1 @@
1
- {"version":3,"file":"isLocalHost.js","sourceRoot":"","sources":["../../src/lib/isLocalHost.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG,CAAC,CAAC,CACpB,MAAM,CAAC,QAAQ,CAAC,QAAQ,KAAK,WAAW;IACxC,uCAAuC;IACvC,MAAM,CAAC,QAAQ,CAAC,QAAQ,KAAK,OAAO;IACpC,iDAAiD;IACjD,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,wDAAwD,CAAC,CACzF,CAAA;AAED,OAAO,EAAE,WAAW,EAAE,CAAA"}
1
+ {"version":3,"file":"isLocalHost.js","sourceRoot":"","sources":["../../src/lib/isLocalHost.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG,GAAG,EAAE,CACvB,CAAC,CAAC,CACA,MAAM,CAAC,QAAQ,CAAC,QAAQ,KAAK,WAAW;IACxC,uCAAuC;IACvC,MAAM,CAAC,QAAQ,CAAC,QAAQ,KAAK,OAAO;IACpC,iDAAiD;IACjD,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,wDAAwD,CAAC,CACzF,CAAA;AAEH,OAAO,EAAE,WAAW,EAAE,CAAA"}
@@ -290,7 +290,7 @@ const getApiStage = () => {
290
290
  return sdkJs.getApiStage(document.location.hostname);
291
291
  };
292
292
 
293
- const isLocalhost = !!(window.location.hostname === 'localhost' ||
293
+ const isLocalhost = () => !!(window.location.hostname === 'localhost' ||
294
294
  // [::1] is the IPv6 localhost address.
295
295
  window.location.hostname === '[::1]' ||
296
296
  // 127.0.0.0/8 are considered localhost for IPv4.