@skypath-io/web-sdk 0.4.20 → 0.4.22
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/CHANGELOG.md +12 -0
- package/dist/bundle.cjs.js +2 -2
- package/dist/bundle.es.js +2 -2
- package/dist/bundle.iife.js +2 -2
- package/dist/types/src/core/auth/consts.d.ts +0 -5
- package/dist/types/src/core/flow/consts.d.ts +12 -0
- package/dist/types/src/core/geo/geo.d.ts +119 -53
- package/dist/types/src/core/utils/utils.d.ts +72 -20
- package/dist/types/src/features/adsb/consts.d.ts +0 -9
- package/dist/types/src/features/adsb/utils.d.ts +0 -1
- package/dist/types/src/features/nowcasting/consts.d.ts +0 -1
- package/dist/types/src/features/observations/consts.d.ts +0 -21
- package/dist/types/src/features/observations/utils.d.ts +0 -1
- package/dist/types/src/features/oneLayer/consts.d.ts +6 -40
- package/package.json +3 -3
|
@@ -16,3 +16,15 @@ export namespace DEFAULT_FILTER_VALUES {
|
|
|
16
16
|
let ALT_FROM: number;
|
|
17
17
|
let ALT_TO: number;
|
|
18
18
|
}
|
|
19
|
+
export const SIZE_TO_RESOLUTION_MAP: {
|
|
20
|
+
[x: string]: number;
|
|
21
|
+
};
|
|
22
|
+
export namespace POLYGON_TYPE {
|
|
23
|
+
let SMALL: string;
|
|
24
|
+
let MEDIUM: string;
|
|
25
|
+
let LARGE: string;
|
|
26
|
+
let CORRIDOR: string;
|
|
27
|
+
}
|
|
28
|
+
export const POLYGON_SIZE_TO_ZOOM_THRESHOLD_MAP: {
|
|
29
|
+
[x: string]: number;
|
|
30
|
+
};
|
|
@@ -6,110 +6,146 @@ export const CORRIDOR_POLYGON_MAX_AREA_NM: 2500000;
|
|
|
6
6
|
export function validateCorridorArea({ polygon }: {
|
|
7
7
|
polygon: any;
|
|
8
8
|
}): void;
|
|
9
|
-
export namespace POLYGON_TYPE {
|
|
10
|
-
let SMALL: string;
|
|
11
|
-
let MEDIUM: string;
|
|
12
|
-
let LARGE: string;
|
|
13
|
-
let CORRIDOR: string;
|
|
14
|
-
}
|
|
15
9
|
/**
|
|
16
10
|
* Generates a GeoJSON FeatureCollection from H3 hexagon IDs, adjusting coordinates for antimeridian crossing
|
|
17
11
|
* and ensuring valid longitude and latitude ranges, without mutating the original data.
|
|
18
12
|
*
|
|
19
|
-
* @param {
|
|
20
|
-
* @param {
|
|
13
|
+
* @param {Object} params - The function parameter object.
|
|
14
|
+
* @param {Array<{hexId: string}>} params.hexagons - Array of objects containing 'hexId' for H3 hexagons.
|
|
15
|
+
* @param {number} [params.scale] - Optional. The scale factor to apply to the hexagons.
|
|
21
16
|
* @returns {Object} A GeoJSON FeatureCollection representing the hexagons.
|
|
22
17
|
*/
|
|
23
|
-
export function getHexagonsFeatureCollection(hexagons
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
export function getHexagonsFeatureCollection({ hexagons, scale }: {
|
|
19
|
+
hexagons: Array<{
|
|
20
|
+
hexId: string;
|
|
21
|
+
}>;
|
|
22
|
+
scale?: number;
|
|
23
|
+
}): any;
|
|
26
24
|
/**
|
|
27
25
|
* Gets H3 hexagon IDs that intersect with the given map bounds at a specified resolution.
|
|
28
26
|
*
|
|
29
|
-
* @param {
|
|
30
|
-
* @param {number}
|
|
27
|
+
* @param {Object} params - The function parameter object.
|
|
28
|
+
* @param {Array<number>} params.mapBounds - The bounding box of the map.
|
|
29
|
+
* @param {number} [params.resolution=0] - The H3 resolution to use.
|
|
31
30
|
* @returns {Array<string>} An array of H3 hexagon IDs.
|
|
32
31
|
*/
|
|
33
|
-
export function getHexIdsByMapBoundsAndResolution(mapBounds
|
|
32
|
+
export function getHexIdsByMapBoundsAndResolution({ mapBounds, resolution }: {
|
|
33
|
+
mapBounds: Array<number>;
|
|
34
|
+
resolution?: number;
|
|
35
|
+
}): Array<string>;
|
|
34
36
|
/**
|
|
35
37
|
* Gets viewport H3 hexagon IDs from a Mapbox map instance.
|
|
36
38
|
*
|
|
37
|
-
* @param {
|
|
38
|
-
* @param {
|
|
39
|
+
* @param {Object} params - The function parameter object.
|
|
40
|
+
* @param {Object} params.map - The Mapbox map instance.
|
|
41
|
+
* @param {number} [params.resolution] - Optional, The H3 resolution to use.
|
|
39
42
|
* @returns {Array<string>} An array of H3 hexagon IDs.
|
|
40
43
|
*/
|
|
41
|
-
export function getHexIdsFromMapboxMap(map
|
|
44
|
+
export function getHexIdsFromMapboxMap({ map, resolution }: {
|
|
45
|
+
map: any;
|
|
46
|
+
resolution?: number;
|
|
47
|
+
}): Array<string>;
|
|
42
48
|
/**
|
|
43
49
|
* Gets H3 hexagon IDs that intersect with the given polygon at a specified resolution.
|
|
44
50
|
*
|
|
45
|
-
* @param {
|
|
46
|
-
* @param {number}
|
|
47
|
-
* @param {
|
|
51
|
+
* @param {Object} params - The function parameter object.
|
|
52
|
+
* @param {Array<Array<number>>} params.polygon - The polygon coordinates.
|
|
53
|
+
* @param {number} [params.resolution=0] - The H3 resolution to use.
|
|
54
|
+
* @param {boolean} [params.shouldInvertLatLng=true] - Whether to invert latitude and longitude.
|
|
48
55
|
* @returns {Array<string>} An array of H3 hexagon IDs.
|
|
49
56
|
*/
|
|
50
|
-
export function getHexIdsByPolygonAndResolution(polygon
|
|
57
|
+
export function getHexIdsByPolygonAndResolution({ polygon, resolution, shouldInvertLatLng, }: {
|
|
58
|
+
polygon: Array<Array<number>>;
|
|
59
|
+
resolution?: number;
|
|
60
|
+
shouldInvertLatLng?: boolean;
|
|
61
|
+
}): Array<string>;
|
|
51
62
|
/**
|
|
52
63
|
* Gets viewport polygon from a Mapbox map instance.
|
|
53
64
|
*
|
|
54
|
-
* @param {
|
|
65
|
+
* @param {Object} params - The function parameter object.
|
|
66
|
+
* @param {Object} params.map - The Mapbox map instance.
|
|
55
67
|
* @returns {number[][]} lat lng polygon.
|
|
56
68
|
*/
|
|
57
|
-
export function getMapPolygon(map
|
|
69
|
+
export function getMapPolygon({ map }: {
|
|
70
|
+
map: any;
|
|
71
|
+
}): number[][];
|
|
58
72
|
/**
|
|
59
73
|
* Inverts the order of longitude and latitude in a coordinate pair.
|
|
60
74
|
*
|
|
61
|
-
* @param {
|
|
75
|
+
* @param {Object} params - The function parameter object.
|
|
76
|
+
* @param {Array<number>} params.coordinate - The coordinate pair to invert.
|
|
62
77
|
* @returns {Array<number>} The inverted coordinate pair.
|
|
63
78
|
*/
|
|
64
|
-
export function invertLatLng(
|
|
79
|
+
export function invertLatLng({ coordinate }: {
|
|
80
|
+
coordinate: Array<number>;
|
|
81
|
+
}): Array<number>;
|
|
65
82
|
/**
|
|
66
83
|
* Adjusts the longitude of geographical coordinates in an array to account for antimeridian crossing.
|
|
67
84
|
* The antimeridian is a meridian at 180 degrees longitude, crossing which requires adjusting coordinates
|
|
68
85
|
* for continuity in geographical data representation.
|
|
69
86
|
*
|
|
70
|
-
* @param {
|
|
71
|
-
* @
|
|
72
|
-
*/
|
|
73
|
-
export function adjustAntiMeridianCrossing(coordinates
|
|
87
|
+
* @param {Object} coordinates - An object containing an array of coordinates.
|
|
88
|
+
* @param {Array<Array<number>>} coordinates.coordinates - An array of coordinates, where each coordinate is a cortege of 2 numbers. The first element in each coordinate array is expected to be the longitude.
|
|
89
|
+
* */
|
|
90
|
+
export function adjustAntiMeridianCrossing({ coordinates }: {
|
|
91
|
+
coordinates: Array<Array<number>>;
|
|
92
|
+
}): number[][];
|
|
74
93
|
/**
|
|
75
94
|
* Adjusts the coordinates of a feature to handle antimeridian crossing and ensures
|
|
76
95
|
* that longitude and latitude values are within their valid ranges.
|
|
77
96
|
*
|
|
78
|
-
* @param {
|
|
97
|
+
* @param {Object} params - The function parameter object.
|
|
98
|
+
* @param {Array<Array<number>>} params.coordinates - The array of coordinates to adjust.
|
|
79
99
|
* @returns {Array<Array<number>>} The adjusted array of coordinates.
|
|
80
100
|
*/
|
|
81
|
-
export function adjustFeatureCoordinates(coordinates
|
|
101
|
+
export function adjustFeatureCoordinates({ coordinates }: {
|
|
102
|
+
coordinates: Array<Array<number>>;
|
|
103
|
+
}): Array<Array<number>>;
|
|
82
104
|
/**
|
|
83
105
|
* Convert a single H3 hexagon to a `Polygon` GEOJson feature
|
|
84
106
|
*
|
|
85
|
-
* @param
|
|
86
|
-
* @param
|
|
87
|
-
* @
|
|
107
|
+
* @param {Object} params - The function parameter object.
|
|
108
|
+
* @param {string} params.h3Index - Hexagon index.
|
|
109
|
+
* @param {Object} [params.properties] - Optional feature properties.
|
|
110
|
+
* @returns {Object} GeoJSON Feature object.
|
|
88
111
|
*/
|
|
89
|
-
export function h3ToFeature(h3Index
|
|
112
|
+
export function h3ToFeature({ h3Index, properties }: {
|
|
113
|
+
h3Index: string;
|
|
114
|
+
properties?: any;
|
|
115
|
+
}): any;
|
|
90
116
|
/**
|
|
91
|
-
*
|
|
117
|
+
* Converts a set of H3 hexagons to a GeoJSON `FeatureCollection` with each hexagon
|
|
92
118
|
* in a separate `Polygon` feature with optional properties.
|
|
93
119
|
*
|
|
94
|
-
* @param
|
|
95
|
-
* @param
|
|
96
|
-
* @
|
|
120
|
+
* @param {Object} params - The function parameter object.
|
|
121
|
+
* @param {Array<string>} params.hexagons - Hexagon addresses.
|
|
122
|
+
* @param {Function} [params.getProperties] - Optional function returning properties for a hexagon: f(h3Index) => Object.
|
|
123
|
+
* @returns {Object} GeoJSON FeatureCollection object.
|
|
97
124
|
*/
|
|
98
|
-
export function h3SetToFeatureCollection(hexagons
|
|
125
|
+
export function h3SetToFeatureCollection({ hexagons, getProperties }: {
|
|
126
|
+
hexagons: Array<string>;
|
|
127
|
+
getProperties?: Function;
|
|
128
|
+
}): any;
|
|
99
129
|
/**
|
|
100
130
|
* Normalizes the coordinates of a polygon or line string to account for antimeridian crossing.
|
|
101
131
|
*
|
|
102
|
-
* @param {
|
|
132
|
+
* @param {Object} props - The function parameter object.
|
|
133
|
+
* @param {Array<Array<number>>} props.coordinates - The array of coordinates to normalize.
|
|
103
134
|
* @returns {Array<Array<number>>} The normalized array of coordinates.
|
|
104
135
|
*/
|
|
105
|
-
export function normalizeAntiMeridian(
|
|
136
|
+
export function normalizeAntiMeridian({ coordinates }: {
|
|
137
|
+
coordinates: Array<Array<number>>;
|
|
138
|
+
}): Array<Array<number>>;
|
|
106
139
|
/**
|
|
107
140
|
* Ensures longitude and latitude values are within their valid ranges.
|
|
108
141
|
*
|
|
109
|
-
* @param {
|
|
142
|
+
* @param {Object} props - The function parameter object.
|
|
143
|
+
* @param {Array<number>} props.coordinate - The [longitude, latitude] pair to adjust.
|
|
110
144
|
* @returns {Array<number>} The adjusted [longitude, latitude] pair.
|
|
111
145
|
*/
|
|
112
|
-
export function clampCoordinates(
|
|
146
|
+
export function clampCoordinates({ coordinate }: {
|
|
147
|
+
coordinate: Array<number>;
|
|
148
|
+
}): Array<number>;
|
|
113
149
|
/**
|
|
114
150
|
* Filters hexagons (observations, ADS-B) data based on provided filters.
|
|
115
151
|
*
|
|
@@ -200,21 +236,42 @@ export function getZoomLevel({ polygon, precision }: {
|
|
|
200
236
|
polygon: Array<Array<number>>;
|
|
201
237
|
precision?: number;
|
|
202
238
|
}): number;
|
|
203
|
-
|
|
204
|
-
|
|
239
|
+
/**
|
|
240
|
+
* Determines the size of a polygon based on its zoom level.
|
|
241
|
+
*
|
|
242
|
+
* @param {Object} params - The function parameter object.
|
|
243
|
+
* @param {Array<Array<number>>} params.polygon - The polygon coordinates.
|
|
244
|
+
* @param {Object} [params.mapping] - The mapping of polygon types to zoom level thresholds.
|
|
245
|
+
* @returns {string} The polygon size type.
|
|
246
|
+
*/
|
|
247
|
+
export function getPolygonSize({ polygon, mapping, }: {
|
|
248
|
+
polygon: Array<Array<number>>;
|
|
249
|
+
mapping?: any;
|
|
205
250
|
}): string;
|
|
206
251
|
/**
|
|
207
252
|
* Get mercator center from bbox
|
|
208
253
|
*
|
|
209
|
-
*
|
|
254
|
+
* @param {Object} params - The function parameter object.
|
|
255
|
+
* @param {number[]} params.bbox - [minLon, minLat, maxLon, maxLat]
|
|
210
256
|
* @returns {number[]} [lat, lon]
|
|
211
257
|
*/
|
|
212
|
-
export function getMercatorCenterFromBbox(bbox
|
|
258
|
+
export function getMercatorCenterFromBbox({ bbox }: {
|
|
259
|
+
bbox: number[];
|
|
260
|
+
}): number[];
|
|
261
|
+
/**
|
|
262
|
+
* Gets the middle area of a polygon by extending it based on the resolution and extension factor.
|
|
263
|
+
*
|
|
264
|
+
* @param {Object} params - The function parameter object.
|
|
265
|
+
* @param {Array<Array<number>>} params.polygon - The polygon coordinates.
|
|
266
|
+
* @param {number} params.resolution - The resolution to use.
|
|
267
|
+
* @param {number} params.extensionFactor - The factor by which to extend the polygon.
|
|
268
|
+
* @returns {Array<Array<number>>} The extended polygon coordinates.
|
|
269
|
+
*/
|
|
213
270
|
export function getMiddleArea({ polygon, resolution, extensionFactor }: {
|
|
214
|
-
polygon:
|
|
215
|
-
resolution:
|
|
216
|
-
extensionFactor:
|
|
217
|
-
}): number
|
|
271
|
+
polygon: Array<Array<number>>;
|
|
272
|
+
resolution: number;
|
|
273
|
+
extensionFactor: number;
|
|
274
|
+
}): Array<Array<number>>;
|
|
218
275
|
/**
|
|
219
276
|
* Groups hexagons by `hexId` and selects the most severe (highest `sev`) for each group.
|
|
220
277
|
*
|
|
@@ -225,4 +282,13 @@ export function getMiddleArea({ polygon, resolution, extensionFactor }: {
|
|
|
225
282
|
export function groupByHexIdAndSelectMostSevere({ hexagons }: {
|
|
226
283
|
hexagons: any[];
|
|
227
284
|
}): any;
|
|
228
|
-
|
|
285
|
+
/**
|
|
286
|
+
* Converts an area from square meters to nautical miles.
|
|
287
|
+
*
|
|
288
|
+
* @param {Object} params - The function parameter object.
|
|
289
|
+
* @param {number} params.squareMeters - The area in square meters.
|
|
290
|
+
* @returns {number} The area in nautical miles.
|
|
291
|
+
*/
|
|
292
|
+
export function squareMetersToNauticalMiles({ squareMeters }: {
|
|
293
|
+
squareMeters: number;
|
|
294
|
+
}): number;
|
|
@@ -1,28 +1,41 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Debounces a function to prevent it from being called multiple times within a specified delay.
|
|
3
3
|
*
|
|
4
|
-
* @param {
|
|
5
|
-
* @param {
|
|
4
|
+
* @param {Object} params - The parameters.
|
|
5
|
+
* @param {Function} params.fn - The function to debounce.
|
|
6
|
+
* @param {number} params.delay - The delay in milliseconds.
|
|
6
7
|
* @returns {Function} - The debounced function.
|
|
7
8
|
*/
|
|
8
|
-
export function debounce(fn
|
|
9
|
+
export function debounce({ fn, delay }: {
|
|
10
|
+
fn: Function;
|
|
11
|
+
delay: number;
|
|
12
|
+
}): Function;
|
|
9
13
|
/**
|
|
10
14
|
* Throttles a function to prevent it from being called multiple times within a specified delay.
|
|
11
15
|
*
|
|
12
|
-
* @param {
|
|
13
|
-
* @param {
|
|
16
|
+
* @param {Object} params - The parameters.
|
|
17
|
+
* @param {Function} params.fn - The function to throttle.
|
|
18
|
+
* @param {number} params.delay - The delay in milliseconds.
|
|
14
19
|
* @returns {Function} - The throttled function.
|
|
15
20
|
*/
|
|
16
|
-
export function throttle(fn
|
|
21
|
+
export function throttle({ fn, delay }: {
|
|
22
|
+
fn: Function;
|
|
23
|
+
delay: number;
|
|
24
|
+
}): Function;
|
|
17
25
|
/**
|
|
18
26
|
* Merges two arrays of objects by a specified property.
|
|
19
27
|
*
|
|
20
|
-
* @param {
|
|
21
|
-
* @param {
|
|
22
|
-
* @param {
|
|
23
|
-
* @
|
|
28
|
+
* @param {Object} params - The parameters.
|
|
29
|
+
* @param {Object[]} params.target - The target array of objects.
|
|
30
|
+
* @param {Object[]} params.source - The source array of objects.
|
|
31
|
+
* @param {string} params.propName - The property name to merge by.
|
|
32
|
+
* @returns {Object[]} The merged array of objects.
|
|
24
33
|
*/
|
|
25
|
-
export function mergeByProperty(target
|
|
34
|
+
export function mergeByProperty({ target, source, propName }: {
|
|
35
|
+
target: any[];
|
|
36
|
+
source: any[];
|
|
37
|
+
propName: string;
|
|
38
|
+
}): any[];
|
|
26
39
|
/**
|
|
27
40
|
* Builds a data key from components.
|
|
28
41
|
* @param {object} options
|
|
@@ -57,18 +70,57 @@ export function mapAircraftIcaoToAircraftType({ icao, mapping }: {
|
|
|
57
70
|
icao: string;
|
|
58
71
|
mapping: object[];
|
|
59
72
|
}): string;
|
|
60
|
-
export function isUndefined(value
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
export function
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
73
|
+
export function isUndefined({ value }: {
|
|
74
|
+
value: any;
|
|
75
|
+
}): boolean;
|
|
76
|
+
export function isFunction({ fn }: {
|
|
77
|
+
fn: any;
|
|
78
|
+
}): boolean;
|
|
79
|
+
export function isObject({ value }: {
|
|
80
|
+
value: any;
|
|
81
|
+
}): boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Checks if there are any changes between the current and next values.
|
|
84
|
+
*
|
|
85
|
+
* @param {Object} params - The function parameter object.
|
|
86
|
+
* @param {*} params.current - The current value.
|
|
87
|
+
* @param {*} params.next - The next value.
|
|
88
|
+
* @returns {boolean} - Returns true if there are changes, otherwise false.
|
|
89
|
+
*/
|
|
90
|
+
export function isChanged({ current, next }: {
|
|
91
|
+
current: any;
|
|
92
|
+
next: any;
|
|
93
|
+
}): boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Creates a timer with run and cancel methods.
|
|
96
|
+
*
|
|
97
|
+
* @param {Object} params - The function parameter object.
|
|
98
|
+
* @param {number} params.time - The time in milliseconds for the timer.
|
|
99
|
+
* @returns {Object} - An object with run and cancel methods.
|
|
100
|
+
*/
|
|
101
|
+
export function getTimer({ time }: {
|
|
102
|
+
time: number;
|
|
103
|
+
}): any;
|
|
104
|
+
/**
|
|
105
|
+
* Gets the fields that have changed between the current and next objects.
|
|
106
|
+
*
|
|
107
|
+
* @param {Object} params - The function parameter object.
|
|
108
|
+
* @param {Object} params.current - The current object.
|
|
109
|
+
* @param {Object} params.next - The next object.
|
|
110
|
+
* @returns {Set<string>} - A set of changed field names.
|
|
111
|
+
*/
|
|
68
112
|
export function getChangedFields({ current, next }: {
|
|
69
113
|
current: any;
|
|
70
114
|
next: any;
|
|
71
|
-
}): Set<
|
|
115
|
+
}): Set<string>;
|
|
116
|
+
/**
|
|
117
|
+
* Merges two objects, excluding properties with undefined values from the next object.
|
|
118
|
+
*
|
|
119
|
+
* @param {Object} params - The function parameter object.
|
|
120
|
+
* @param {Object} params.current - The current object.
|
|
121
|
+
* @param {Object} params.next - The next object.
|
|
122
|
+
* @returns {Object} - The merged object.
|
|
123
|
+
*/
|
|
72
124
|
export function mergeWithoutUndefined({ current, next }: {
|
|
73
125
|
current: any;
|
|
74
126
|
next: any;
|
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
export namespace PATHS {
|
|
2
2
|
let DATA: string;
|
|
3
3
|
}
|
|
4
|
-
export namespace DEFAULT_FILTER_VALUES {
|
|
5
|
-
let HOURS_AGO: number;
|
|
6
|
-
let SEVERITY: number;
|
|
7
|
-
let ALT_FROM: number;
|
|
8
|
-
let ALT_TO: number;
|
|
9
|
-
}
|
|
10
|
-
export const SIZE_TO_RESOLUTION_MAP: {
|
|
11
|
-
[x: string]: number;
|
|
12
|
-
};
|
|
13
4
|
export const SIZE_TO_MIN_SEVERITY_MAP: {
|
|
14
5
|
[x: string]: number;
|
|
15
6
|
};
|
|
@@ -9,6 +9,5 @@ export function mapPolygonToHexIds({ polygon, polygonSize }: {
|
|
|
9
9
|
hexIds: string[];
|
|
10
10
|
childCells: string[];
|
|
11
11
|
};
|
|
12
|
-
export function mapReportsArrayToReportsObject(reports: any): any;
|
|
13
12
|
export function storeToResult(store: any, selector: any, options?: {}): any;
|
|
14
13
|
export function mapResponseToReportsArray(response: any): any;
|
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
export namespace PATHS {
|
|
2
2
|
let DATA: string;
|
|
3
3
|
}
|
|
4
|
-
export namespace DEFAULT_FILTER_VALUES {
|
|
5
|
-
let HOURS_AGO: number;
|
|
6
|
-
let SEVERITY: number;
|
|
7
|
-
let ALT_FROM: number;
|
|
8
|
-
let ALT_TO: number;
|
|
9
|
-
}
|
|
10
|
-
export const SIZE_TO_RESOLUTION_MAP: {
|
|
11
|
-
[x: string]: number;
|
|
12
|
-
};
|
|
13
4
|
export const SIZE_TO_MIN_SEVERITY_MAP: {
|
|
14
5
|
[x: string]: number;
|
|
15
6
|
};
|
|
@@ -56,22 +47,10 @@ export namespace SEVERITY {
|
|
|
56
47
|
}
|
|
57
48
|
export const MAX_ALT: 52;
|
|
58
49
|
export const MIN_ALT: 5;
|
|
59
|
-
export const UPDATE_INTERVAL_MS: number;
|
|
60
|
-
export const GLOBAL_OBSERVATION_DATA_EXPIRY_SEC: number;
|
|
61
|
-
export const HEXAGON_OBSERVATION_DATA_EXPIRY_MS: number;
|
|
62
50
|
export const DEFAULT_RESOLUTION: 1;
|
|
63
51
|
export const MAP_RESOLUTION: 5;
|
|
64
|
-
export namespace FLOW_OPERATION_MODES {
|
|
65
|
-
let DEFAULT: string;
|
|
66
|
-
let CORRIDOR: string;
|
|
67
|
-
}
|
|
68
52
|
export namespace LARGE_POLYGON_HANDLING_BEHAVIOR {
|
|
69
53
|
let IGNORE: string;
|
|
70
54
|
let USE_MIDDLE_AREA: string;
|
|
71
55
|
let EXCLUDE_SMOOTH_SEVERITY: string;
|
|
72
56
|
}
|
|
73
|
-
export const MIDDLE_AREA_EXTENSION_FACTOR: 4;
|
|
74
|
-
export namespace ZOOM_LEVEL_THRESHOLDS {
|
|
75
|
-
let PREVENT_FETCHING: number;
|
|
76
|
-
let LARGE_POLYGON_FETCHING: number;
|
|
77
|
-
}
|
|
@@ -14,7 +14,6 @@ export function mapPolygonToHexIds({ polygon, polygonSize }: {
|
|
|
14
14
|
hexIds: string[];
|
|
15
15
|
childCells: string[];
|
|
16
16
|
};
|
|
17
|
-
export function mapReportsArrayToReportsObject(reports: any): any;
|
|
18
17
|
export function storeToResult(store: any, selector: any, options?: {}): any;
|
|
19
18
|
export function mapResponseToReportsArray(response: any): any;
|
|
20
19
|
export function buildObservationsData(data: any): {
|
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
export namespace PATHS {
|
|
2
2
|
let DATA: string;
|
|
3
3
|
}
|
|
4
|
-
export namespace DEFAULT_FILTER_VALUES {
|
|
5
|
-
let HOURS_AGO: number;
|
|
6
|
-
let SEVERITY: number;
|
|
7
|
-
let ALT_FROM: number;
|
|
8
|
-
let ALT_TO: number;
|
|
9
|
-
}
|
|
10
|
-
export const SIZE_TO_RESOLUTION_MAP: {
|
|
11
|
-
[x: string]: number;
|
|
12
|
-
};
|
|
13
4
|
export const SIZE_TO_MIN_SEVERITY_MAP: {
|
|
14
5
|
[x: string]: number;
|
|
15
6
|
};
|
|
@@ -19,13 +10,12 @@ export const SIZE_TO_EXTENSION_FACTOR_MAP: {
|
|
|
19
10
|
export const DEBOUNCE_TIME_SEC: number;
|
|
20
11
|
export const REFRESH_TIME_SEC: number;
|
|
21
12
|
export namespace CONFIG_KEYS {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
let
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
export let NOWCASTING_ALT: string;
|
|
13
|
+
let POLYGON: string;
|
|
14
|
+
let IS_CORRIDOR_MODE: string;
|
|
15
|
+
let AIRCRAFT_CATEGORY: string;
|
|
16
|
+
let HOURS_AGO: string;
|
|
17
|
+
let FORECAST_TS: string;
|
|
18
|
+
let NOWCASTING_ALT: string;
|
|
29
19
|
}
|
|
30
20
|
export namespace AIRCRAFT_CATEGORY {
|
|
31
21
|
let C10: string;
|
|
@@ -46,31 +36,7 @@ export namespace HISTORY_HOURS {
|
|
|
46
36
|
let twoHours: string;
|
|
47
37
|
let fourHours: string;
|
|
48
38
|
}
|
|
49
|
-
export namespace SEVERITY {
|
|
50
|
-
let smooth: number;
|
|
51
|
-
let light: number;
|
|
52
|
-
let lightModerate: number;
|
|
53
|
-
let moderate: number;
|
|
54
|
-
let moderateSevere: number;
|
|
55
|
-
}
|
|
56
39
|
export const MAX_ALT: 52;
|
|
57
40
|
export const MIN_ALT: 5;
|
|
58
|
-
export const UPDATE_INTERVAL_MS: number;
|
|
59
|
-
export const GLOBAL_OBSERVATION_DATA_EXPIRY_SEC: number;
|
|
60
|
-
export const HEXAGON_OBSERVATION_DATA_EXPIRY_MS: number;
|
|
61
41
|
export const DEFAULT_RESOLUTION: 1;
|
|
62
42
|
export const MAP_RESOLUTION: 5;
|
|
63
|
-
export namespace FLOW_OPERATION_MODES {
|
|
64
|
-
let DEFAULT: string;
|
|
65
|
-
let CORRIDOR: string;
|
|
66
|
-
}
|
|
67
|
-
export namespace LARGE_POLYGON_HANDLING_BEHAVIOR {
|
|
68
|
-
let IGNORE: string;
|
|
69
|
-
let USE_MIDDLE_AREA: string;
|
|
70
|
-
let EXCLUDE_SMOOTH_SEVERITY: string;
|
|
71
|
-
}
|
|
72
|
-
export const MIDDLE_AREA_EXTENSION_FACTOR: 4;
|
|
73
|
-
export namespace ZOOM_LEVEL_THRESHOLDS {
|
|
74
|
-
let PREVENT_FETCHING: number;
|
|
75
|
-
let LARGE_POLYGON_FETCHING: number;
|
|
76
|
-
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skypath-io/web-sdk",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.22",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/bundle.cjs.js",
|
|
6
6
|
"module": "dist/bundle.es.js",
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
"lint-staged": "^15.2.2",
|
|
49
49
|
"nodemon": "^3.1.2",
|
|
50
50
|
"prettier": "^3.2.5",
|
|
51
|
-
"rollup": "^4.
|
|
51
|
+
"rollup": "^4.22.4",
|
|
52
52
|
"typescript": "^5.4.5",
|
|
53
|
-
"vitest": "^1.
|
|
53
|
+
"vitest": "^3.1.1"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@datadog/browser-logs": "^6.0.0",
|