@skypath-io/web-sdk 0.5.28 → 0.5.30

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.
@@ -26,3 +26,8 @@ export const API_BASE_URLS: {
26
26
  [ENVIRONMENTS.STAGING]: string;
27
27
  [ENVIRONMENTS.PRODUCTION]: string;
28
28
  };
29
+ export namespace NETWORK_ERROR_MESSAGES {
30
+ let CHROME: string;
31
+ let FIREFOX: string;
32
+ let SAFARI: string;
33
+ }
@@ -1,3 +1,13 @@
1
+ /**
2
+ * Checks if an error is a network connectivity error (fetch failure).
3
+ * Handles cross-browser differences:
4
+ * - Chrome/Edge: "Failed to fetch"
5
+ * - Firefox: "NetworkError when attempting to fetch resource."
6
+ * - Safari: "Load failed"
7
+ * @param {Error} error
8
+ * @returns {boolean}
9
+ */
10
+ export function isNetworkError(error: Error): boolean;
1
11
  export function getErrorMessage({ response }: {
2
12
  response: any;
3
13
  }): Promise<string>;
@@ -1,4 +1,5 @@
1
1
  export namespace PATHS {
2
2
  let TOKEN: string;
3
3
  }
4
- export const ERROR_DELAY_IN_MS: number;
4
+ export const BASE_ERROR_DELAY_MS: 10000;
5
+ export const MAX_ERROR_DELAY_MS: 300000;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skypath-io/web-sdk",
3
- "version": "0.5.28",
3
+ "version": "0.5.30",
4
4
  "type": "module",
5
5
  "main": "dist/bundle.cjs.js",
6
6
  "module": "dist/bundle.es.js",
@@ -60,7 +60,12 @@
60
60
  },
61
61
  "dependencies": {
62
62
  "@datadog/browser-logs": "^6.0.0",
63
- "@turf/turf": "^6.5.0",
63
+ "@turf/area": "^6.5.0",
64
+ "@turf/bbox": "^6.5.0",
65
+ "@turf/bbox-polygon": "^6.5.0",
66
+ "@turf/buffer": "^6.5.0",
67
+ "@turf/helpers": "^6.5.0",
68
+ "@turf/transform-scale": "^6.5.0",
64
69
  "dayjs": "^1.11.11",
65
70
  "geojson": "^0.5.0",
66
71
  "h3-js": "^4.1.0"