@windycom/plugin-devtools 3.0.1 → 3.0.3
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/README.md +1 -0
- package/package.json +1 -1
- package/types/client/Calendar.d.ts +104 -70
- package/types/client/Color.d.ts +25 -5
- package/types/client/DataTiler.d.ts +2 -2
- package/types/client/EcmwfProduct.d.ts +22 -0
- package/types/client/EventManager.d.ts +69 -0
- package/types/client/ExternalSveltePlugin.d.ts +4 -3
- package/types/client/GlBuffer.d.ts +45 -0
- package/types/client/GlMesh.d.ts +147 -0
- package/types/client/GlProgram.d.ts +41 -0
- package/types/client/GlRenderer.d.ts +95 -0
- package/types/client/GlTexture.d.ts +98 -0
- package/types/client/GlVertexArray.d.ts +38 -0
- package/types/client/IDB.d.ts +25 -4
- package/types/client/LabelsLayer.d.ts +69 -2
- package/types/client/Layer.d.ts +96 -26
- package/types/client/LayerClasses.d.ts +5 -0
- package/types/client/Metric.d.ts +31 -46
- package/types/client/MetricClasses.d.ts +1 -1
- package/types/client/Overlay.d.ts +5 -12
- package/types/client/OverlayClasses.d.ts +8 -0
- package/types/client/Particles.d.ts +1 -1
- package/types/client/Product.d.ts +38 -67
- package/types/client/ProductClasses.d.ts +51 -0
- package/types/client/RadarPlusProduct.d.ts +1 -1
- package/types/client/Renderer.d.ts +44 -19
- package/types/client/SatelliteProduct.d.ts +1 -1
- package/types/client/ShaderStorage.d.ts +25 -0
- package/types/client/StartupElementPlugin.d.ts +8 -0
- package/types/client/SveltePlugin.d.ts +5 -5
- package/types/client/SwitchableTileCache.d.ts +104 -0
- package/types/client/TileLayer.d.ts +12 -3
- package/types/client/TileLayerCustom.d.ts +51 -0
- package/types/client/TileLayerMulti.d.ts +53 -0
- package/types/client/TileLayerPreprocessorStandalone.d.ts +45 -0
- package/types/client/TileLayerRenderer.d.ts +24 -0
- package/types/client/TileLayerUtils.d.ts +43 -0
- package/types/client/TilePreprocessor.d.ts +27 -0
- package/types/client/TopoMap.d.ts +4 -4
- package/types/client/WindowPlugin.d.ts +7 -6
- package/types/client/appsFlyer.d.ts +2 -1
- package/types/client/baseMap.d.ts +12 -2
- package/types/client/broadcast.d.ts +1 -1
- package/types/client/cityLabels.d.ts +2 -3
- package/types/client/colorGradients.d.ts +4 -10
- package/types/client/colors.d.ts +1 -2
- package/types/client/css.test.d.ts +1 -0
- package/types/client/customProtocol.d.ts +11 -0
- package/types/client/d.ts.files/GlObj.d.ts +1 -5
- package/types/client/d.ts.files/Metric.d.ts +23 -2
- package/types/client/d.ts.files/alerts.d.ts +1 -0
- package/types/client/d.ts.files/broadcast.d.ts +31 -35
- package/types/client/d.ts.files/dataSpecifications.d.ts +82 -66
- package/types/client/d.ts.files/favs.d.ts +7 -18
- package/types/client/d.ts.files/glUtils.d.ts +71 -0
- package/types/client/d.ts.files/http.d.ts +4 -4
- package/types/client/d.ts.files/interpolatorTypes.d.ts +5 -5
- package/types/client/d.ts.files/lib.d.ts +1 -2
- package/types/client/d.ts.files/liveAlerts.d.ts +52 -0
- package/types/client/d.ts.files/mapUtils.d.ts +25 -0
- package/types/client/d.ts.files/outgoingMessages.d.ts +1 -1
- package/types/client/d.ts.files/plugin-params.d.ts +46 -24
- package/types/client/d.ts.files/plugins.d.ts +44 -31
- package/types/client/d.ts.files/rootScope.d.ts +2 -0
- package/types/client/d.ts.files/singleclick.d.ts +4 -2
- package/types/client/d.ts.files/startup.d.ts +7 -52
- package/types/client/d.ts.files/storage.d.ts +0 -11
- package/types/client/d.ts.files/user.d.ts +6 -1
- package/types/client/d.ts.files/webcams.d.ts +9 -2
- package/types/client/dataLoader.d.ts +2 -2
- package/types/client/detectDevice.d.ts +3 -0
- package/types/client/embed.d.ts +2 -7
- package/types/client/errorLogger.d.ts +20 -1
- package/types/client/externalPlugins.d.ts +5 -1
- package/types/client/fetch.d.ts +62 -5
- package/types/client/format.d.ts +12 -0
- package/types/client/glContextUtils.d.ts +9 -0
- package/types/client/glStatus.d.ts +7 -0
- package/types/client/glTileRender.d.ts +1 -7
- package/types/client/glUtils.d.ts +119 -0
- package/types/client/http.d.ts +0 -6
- package/types/client/idbConnection.d.ts +13 -0
- package/types/client/idbInstances.d.ts +118 -13
- package/types/client/landLayer.d.ts +3 -0
- package/types/client/layers.d.ts +5 -2
- package/types/client/legends.d.ts +1 -1
- package/types/client/lib.d.ts +11 -21
- package/types/client/liveAlerts.d.ts +2 -2
- package/types/client/location.d.ts +1 -1
- package/types/client/map.d.ts +94 -15
- package/types/client/mapUtils.d.ts +66 -0
- package/types/client/math.d.ts +14 -0
- package/types/client/mobile.d.ts +16 -41
- package/types/client/mobileUtils.d.ts +10 -0
- package/types/client/models.d.ts +2 -6
- package/types/client/overlays.d.ts +4 -3
- package/types/client/particleRenderers.d.ts +1 -1
- package/types/client/picker.d.ts +4 -8
- package/types/client/plugins.d.ts +0 -4
- package/types/client/products.d.ts +53 -2
- package/types/client/promo.d.ts +28 -5
- package/types/client/pushNotifications.d.ts +19 -1
- package/types/client/renderCtrl.d.ts +1 -1
- package/types/client/renderTile.d.ts +2 -2
- package/types/client/renderUtils.d.ts +21 -27
- package/types/client/renderers.d.ts +6 -9
- package/types/client/reverseName.d.ts +2 -1
- package/types/client/rhMessage.d.ts +1 -1
- package/types/client/rootScope.d.ts +17 -9
- package/types/client/router.d.ts +41 -9
- package/types/client/seoParser.d.ts +35 -0
- package/types/client/showableErrorsService.d.ts +10 -6
- package/types/client/singleclick.d.ts +1 -1
- package/types/client/startup.d.ts +48 -0
- package/types/client/startupUtils.d.ts +19 -0
- package/types/client/store.d.ts +20 -52
- package/types/client/subscription.d.ts +3 -26
- package/types/client/throttler.d.ts +32 -0
- package/types/client/tileHelpers.d.ts +35 -0
- package/types/client/tileInterpolator.d.ts +1 -1
- package/types/client/tileLayerInterpolator.d.ts +40 -0
- package/types/client/tileLayerSource.d.ts +98 -0
- package/types/client/timestampUtils.test.d.ts +1 -0
- package/types/client/topMessage.d.ts +22 -0
- package/types/client/user.d.ts +1 -0
- package/types/client/userAlerts.d.ts +0 -4
- package/types/client/userConsent.d.ts +0 -2
- package/types/client/userFavs.d.ts +17 -12
- package/types/client/utils.d.ts +78 -25
- package/types/client/utils.test.d.ts +1 -0
- package/types/iconfont.d.ts +2 -5
- package/types/interfaces.d.ts +290 -88
- package/types/lang-files.d.ts +578 -98
- package/types/leaflet-gl.d.ts +12773 -0
- package/types/types.d.ts +323 -11
- package/types/client/d.ts.files/Calendar.d.ts +0 -96
- package/types/client/d.ts.files/CanvasLayer.d.ts +0 -70
- package/types/client/d.ts.files/Color.d.ts +0 -94
- package/types/client/d.ts.files/DataTiler.d.ts +0 -45
- package/types/client/d.ts.files/LandMask.d.ts +0 -17
- package/types/client/d.ts.files/Layer.d.ts +0 -191
- package/types/client/d.ts.files/PoisOverlay.d.ts +0 -27
- package/types/client/d.ts.files/Renderer.d.ts +0 -44
- package/types/client/d.ts.files/TileLayerCanvas.d.ts +0 -78
- package/types/client/d.ts.files/TileLayerMultiPatch.d.ts +0 -13
- package/types/client/d.ts.files/products.d.ts +0 -60
- package/types/client/imaker.d.ts +0 -112
- package/types/offline.d.ts +0 -100
|
@@ -4,27 +4,30 @@
|
|
|
4
4
|
|
|
5
5
|
Now it is better to use close coupled components, with strong type control
|
|
6
6
|
|
|
7
|
-
|
|
8
7
|
TODO: Minimize amount of these events and reduce their usage
|
|
9
8
|
|
|
10
9
|
*/
|
|
11
|
-
|
|
12
|
-
import { Params as GlobeParams, Poi as GlobePoi } from '@plugins/globe/types.d';
|
|
13
|
-
import { ExtendedDataAndParams } from '@plugins/isolines/IsolinesCanvas2D.d';
|
|
10
|
+
|
|
14
11
|
import { Evented } from '@windy/Evented';
|
|
15
12
|
import { MetricIdent, MetricItem } from '@windy/Metric.d';
|
|
16
13
|
import { PluginIdent } from '@windy/Plugin';
|
|
17
14
|
import { NotificationPreferences } from '@windy/dataSpecifications.d';
|
|
18
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
GeolocationInfo,
|
|
17
|
+
LatLon,
|
|
18
|
+
WeatherParameters,
|
|
19
|
+
type FullRenderParameters,
|
|
20
|
+
} from '@windy/interfaces.d';
|
|
19
21
|
import { PluginSource, PluginsOpenParams, PluginsQsParams } from '@windy/plugin-params.d';
|
|
20
22
|
import { Plugins } from '@windy/plugins.d';
|
|
21
23
|
import { Pois } from '@windy/rootScope.d';
|
|
22
24
|
import type { ExternalPluginIdent } from '@windy/types';
|
|
23
|
-
import type {
|
|
24
|
-
import type { AnimationOptions, FitBoundsOptions, LngLatBoundsLike } from '@windycom/maplibre-gl';
|
|
25
|
-
import type { ViewportBounds } from '@plugins/_shared/maplibre/utils/maplibreUtils';
|
|
25
|
+
import type { ZoomOptions } from '@leafletGl';
|
|
26
26
|
import type { RadarPlusLayer } from '@plugins/radar-plus/types';
|
|
27
|
-
import type { ParsedStartupValues } from '
|
|
27
|
+
import type { ParsedStartupValues } from '@windy/router';
|
|
28
|
+
import type { ParsLocation as GlobeParsLocation } from '@plugins/globe/main/receiver.d';
|
|
29
|
+
import type { Params as GlobeParams, Poi as GlobePoi } from '@plugins/globe/types.d';
|
|
30
|
+
import type { ExtendedDataAndParams } from '@plugins/isolines/IsolinesCanvas2D.d';
|
|
28
31
|
|
|
29
32
|
type BcastTypesNonGeneric = {
|
|
30
33
|
/**
|
|
@@ -97,21 +100,25 @@ export interface BasicBcastTypes<T extends keyof Plugins> {
|
|
|
97
100
|
* Do not not use this event to start any intensive action since Windy now
|
|
98
101
|
* must load and render all the data. We recommend to use `redrawFinished` instead.
|
|
99
102
|
*/
|
|
100
|
-
paramsChanged: [WeatherParameters, keyof WeatherParameters | undefined];
|
|
103
|
+
paramsChanged: [WeatherParameters, keyof WeatherParameters | 'path' | undefined];
|
|
101
104
|
|
|
102
105
|
/**
|
|
103
106
|
* Indicates that user changed any of the units (wind, temp, ...).
|
|
104
107
|
*/
|
|
105
108
|
metricChanged: [MetricIdent | undefined, MetricItem | undefined];
|
|
106
109
|
|
|
107
|
-
/** Indicates that user added,
|
|
110
|
+
/** Indicates that user added, removed or rename his fav */
|
|
108
111
|
favChanged: [];
|
|
109
112
|
|
|
110
|
-
/** Indicates that user added,
|
|
113
|
+
/** Indicates that user added, removed or rename his alert */
|
|
111
114
|
alertChanged: [];
|
|
112
115
|
|
|
116
|
+
/** Indicates that user added or removed external plugin */
|
|
117
|
+
externalPluginChanged: [];
|
|
118
|
+
|
|
113
119
|
/**
|
|
114
|
-
* Indicates
|
|
120
|
+
* Indicates that router has parsed new route,
|
|
121
|
+
* used to trigger opening plugins based on url
|
|
115
122
|
*/
|
|
116
123
|
routerParsed: [PluginIdent | ExternalPluginIdent | void, ParsedStartupValues | undefined];
|
|
117
124
|
|
|
@@ -137,32 +144,17 @@ export interface BasicBcastTypes<T extends keyof Plugins> {
|
|
|
137
144
|
/** @ignore */ 'globe-zoomOut': [[number, number] | null] | [];
|
|
138
145
|
/** @ignore */ 'globe-paramsChanged': [GlobeParams];
|
|
139
146
|
|
|
140
|
-
/** @ignore */ '
|
|
141
|
-
/** @ignore */ '
|
|
142
|
-
/** @ignore */ '
|
|
147
|
+
/** @ignore */ 'leafletGl-zoomIn': [number | undefined, ZoomOptions | undefined];
|
|
148
|
+
/** @ignore */ 'leafletGl-zoomOut': [number | undefined, ZoomOptions | undefined];
|
|
149
|
+
/** @ignore */ 'leafletGl-paramsChanged': [
|
|
143
150
|
WeatherParameters,
|
|
144
151
|
keyof WeatherParameters | undefined,
|
|
145
152
|
];
|
|
146
153
|
|
|
147
|
-
/** @ignore */ 'maplibre-zoomIn': [AnimationOptions | undefined, unknown | undefined];
|
|
148
|
-
/** @ignore */ 'maplibre-zoomOut': [AnimationOptions | undefined, unknown | undefined];
|
|
149
|
-
/** @ignore */ 'maplibre-setZoom': [number, unknown | undefined];
|
|
150
|
-
/** @ignore */ 'maplibre-centerMap': [CenterOptions];
|
|
151
|
-
/** @ignore */ 'maplibre-triggerDragging': [boolean];
|
|
152
|
-
/** @ignore */ 'maplibre-fitBounds': [LngLatBoundsLike, FitBoundsOptions | undefined];
|
|
153
|
-
/** @ignore */ 'maplibre-panToOffset': [number, number, number];
|
|
154
|
-
/** @ignore */ 'maplibre-ensurePointVisibleY': [number, number, number];
|
|
155
|
-
/** @ignore */ 'maplibre-moveEnd': [];
|
|
156
|
-
/** @ignore */ 'maplibre-zoomChange': [number];
|
|
157
|
-
/** @ignore */ 'maplibre-boundsChange': [ViewportBounds];
|
|
158
|
-
/** @ignore */ 'maplibre-paramsChanged': [
|
|
159
|
-
WeatherParameters,
|
|
160
|
-
keyof WeatherParameters | undefined,
|
|
161
|
-
];
|
|
162
154
|
/** @ignore */ 'radarPlus-open-layer': [RadarPlusLayer, boolean | undefined]; // Layer to open, whether to open layer for color editing
|
|
163
155
|
/** @ignore */ detailClose: [];
|
|
164
|
-
/** @ignore */ detailRendered: []; // used only in embed
|
|
165
|
-
/** @ignore */ stationRendered: []; // used only in embed
|
|
156
|
+
/** @ignore */ detailRendered: []; // used only in embed indicates that detail is ready
|
|
157
|
+
/** @ignore */ stationRendered: []; // used only in embed indicates that detail is ready
|
|
166
158
|
/** @ignore */ reloadFavs: [];
|
|
167
159
|
/** @ignore */ notifPrefChanged: [NotificationPreferences | undefined];
|
|
168
160
|
/** @ignore */ satBackupReload: [];
|
|
@@ -175,11 +167,15 @@ export interface BasicBcastTypes<T extends keyof Plugins> {
|
|
|
175
167
|
/** @ignore */ loadingFailed: [string];
|
|
176
168
|
/** @ignore */ zoomIn: [];
|
|
177
169
|
/** @ignore */ zoomOut: [];
|
|
178
|
-
/** @ignore */ userReloadInfo: [];
|
|
179
170
|
/** @ignore */ showSocialError: [string];
|
|
180
|
-
/** @ignore */ openCapAlerts: [PluginsOpenParams['picker']];
|
|
181
171
|
/** @ignore */ openapp: [];
|
|
182
172
|
/** @ignore */ openSearch: [];
|
|
173
|
+
/** @ignore */ renderersUpdated: []; // Fired once all renderers have had their params updated.
|
|
174
|
+
/** @ignore */ tileLayerParamsChanged: [FullRenderParameters];
|
|
175
|
+
/** @ignore */ glContextLost: [];
|
|
176
|
+
/** @ignore */ glContextRestored: [];
|
|
177
|
+
/** @ignore */ glRestoreContext: [];
|
|
178
|
+
/** @ignore */ glLoseContext: [];
|
|
183
179
|
}
|
|
184
180
|
|
|
185
181
|
interface BcastTypes<T extends keyof Plugins> extends BcastTypesNonGeneric, BasicBcastTypes<T> {}
|
|
@@ -20,7 +20,6 @@ import {
|
|
|
20
20
|
|
|
21
21
|
import {
|
|
22
22
|
MenuItems,
|
|
23
|
-
Path,
|
|
24
23
|
PickerMobileTimeout,
|
|
25
24
|
ShowableError,
|
|
26
25
|
SubTier,
|
|
@@ -29,17 +28,21 @@ import {
|
|
|
29
28
|
RouteMotionSpeed,
|
|
30
29
|
UsedMapLibrary,
|
|
31
30
|
UserInterest,
|
|
31
|
+
type ISOCountryCode,
|
|
32
|
+
type AnimationSpeed,
|
|
32
33
|
} from '@windy/types.d';
|
|
33
34
|
|
|
34
35
|
import { MetricItem } from '@windy/Metric.d';
|
|
35
36
|
|
|
36
37
|
import type { LoginAndFinishAction, User } from '@windy/user.d';
|
|
37
38
|
|
|
38
|
-
import type { SubscriptionInfo } from '@plugins/
|
|
39
|
-
import type RadarCalendar from '@plugins/radar/calendar/
|
|
40
|
-
import type SatelliteCalendar from '@plugins/
|
|
39
|
+
import type { SubscriptionInfo } from '@plugins/shared/subscription-services/subscription-services.d';
|
|
40
|
+
import type RadarCalendar from '@plugins/radar-plus/calendar/radarCalendar';
|
|
41
|
+
import type { SatelliteCalendar } from '@plugins/radar-plus/calendar/satelliteCalendar';
|
|
41
42
|
import type { NumberRange } from '@windy/alerts.d';
|
|
42
|
-
import type {
|
|
43
|
+
import type { FavType } from '@windy/favs.d';
|
|
44
|
+
import type { Range } from '@plugins/shared/radsat/context';
|
|
45
|
+
import type { TiledPoiClasses } from '@plugins/poi-libs/poi-libs.d';
|
|
43
46
|
|
|
44
47
|
/**
|
|
45
48
|
* Custom animation particles settings
|
|
@@ -73,6 +76,7 @@ export interface ReverseResult extends LatLon {
|
|
|
73
76
|
lang: string;
|
|
74
77
|
region?: string;
|
|
75
78
|
country?: string;
|
|
79
|
+
cc?: ISOCountryCode;
|
|
76
80
|
name: string;
|
|
77
81
|
nameValid?: boolean;
|
|
78
82
|
}
|
|
@@ -103,7 +107,7 @@ export interface DataSpecificationsObject<T> {
|
|
|
103
107
|
allowed: Readonly<T[]> | ((d: T) => boolean);
|
|
104
108
|
|
|
105
109
|
/**
|
|
106
|
-
*
|
|
110
|
+
* Persistent item. Save this item to localStorage
|
|
107
111
|
*/
|
|
108
112
|
save?: boolean;
|
|
109
113
|
|
|
@@ -150,11 +154,22 @@ export interface DataSpecificationsObject<T> {
|
|
|
150
154
|
* Setter function - asynchronous (will be run before value is set)
|
|
151
155
|
*/
|
|
152
156
|
asyncSet?: (...args: unknown[]) => Promise<T>;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* This item can be set only by syncSet or asyncSet (so basically it is derived store)
|
|
160
|
+
* This so far does not do anything, it's merely a flag for developer
|
|
161
|
+
*/
|
|
162
|
+
readOnly?: boolean;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* This item can be used by Premium only users. Free users get always default value,
|
|
166
|
+
* so additional checks before using store.get('item') are not necessary.
|
|
167
|
+
*/
|
|
168
|
+
premiumOnly?: boolean;
|
|
153
169
|
}
|
|
154
170
|
|
|
155
171
|
export interface FeatureFlags {
|
|
156
|
-
|
|
157
|
-
disableNewRadarPlusGui: boolean;
|
|
172
|
+
useNewGui: boolean;
|
|
158
173
|
}
|
|
159
174
|
|
|
160
175
|
/**
|
|
@@ -211,12 +226,6 @@ export interface DataSpecifications {
|
|
|
211
226
|
*/
|
|
212
227
|
timestamp: DataSpecificationsObject<Timestamp>;
|
|
213
228
|
|
|
214
|
-
/**
|
|
215
|
-
* Read only value! UTC string containing time of actually rendered data that are available for current overlay and weather model.
|
|
216
|
-
* @ignore
|
|
217
|
-
*/
|
|
218
|
-
path: DataSpecificationsObject<Path | null>;
|
|
219
|
-
|
|
220
229
|
/**
|
|
221
230
|
* Which type of isolines to render
|
|
222
231
|
*/
|
|
@@ -257,6 +266,11 @@ export interface DataSpecifications {
|
|
|
257
266
|
*/
|
|
258
267
|
animation: DataSpecificationsObject<boolean>;
|
|
259
268
|
|
|
269
|
+
/**
|
|
270
|
+
* Animation playback speed (normal = legacy speed)
|
|
271
|
+
*/
|
|
272
|
+
animationSpeed: DataSpecificationsObject<AnimationSpeed>;
|
|
273
|
+
|
|
260
274
|
/**
|
|
261
275
|
* Actual calendar (instance of `Calendar`) for selected overlay/product (if it has calendar)
|
|
262
276
|
*/
|
|
@@ -272,11 +286,6 @@ export interface DataSpecifications {
|
|
|
272
286
|
*/
|
|
273
287
|
particlesAnim: DataSpecificationsObject<'on' | 'off' | 'intensive'>;
|
|
274
288
|
|
|
275
|
-
/**
|
|
276
|
-
* Last modified timestamp of just rendered data (read only)
|
|
277
|
-
*/
|
|
278
|
-
lastModified: DataSpecificationsObject<Timestamp>;
|
|
279
|
-
|
|
280
289
|
/**
|
|
281
290
|
* Display graticule over the map
|
|
282
291
|
*/
|
|
@@ -292,6 +301,11 @@ export interface DataSpecifications {
|
|
|
292
301
|
*/
|
|
293
302
|
showPickerElevation: DataSpecificationsObject<boolean>;
|
|
294
303
|
|
|
304
|
+
/**
|
|
305
|
+
* Whether picker is being dragged
|
|
306
|
+
*/
|
|
307
|
+
pickerDragging: DataSpecificationsObject<boolean>;
|
|
308
|
+
|
|
295
309
|
/**
|
|
296
310
|
* Desired language for Windy. By default is determined by user's browser setting and set to `auto`.
|
|
297
311
|
* Use `store.getAllowed('lang')` to get list of avail langs defined in `supportedLanguages.
|
|
@@ -321,12 +335,12 @@ export interface DataSpecifications {
|
|
|
321
335
|
/**
|
|
322
336
|
* 2 letter lowercase Country Code
|
|
323
337
|
*/
|
|
324
|
-
country: DataSpecificationsObject<
|
|
338
|
+
country: DataSpecificationsObject<ISOCountryCode | 'xx'>;
|
|
325
339
|
|
|
326
340
|
/**
|
|
327
|
-
*
|
|
341
|
+
* Default units setting (computed on the first visit based on GeoIP)
|
|
328
342
|
*/
|
|
329
|
-
|
|
343
|
+
defaultUnits: DataSpecificationsObject<'unset' | 'imperial' | 'metric'>;
|
|
330
344
|
|
|
331
345
|
/**
|
|
332
346
|
* Type of map tiles map shown in detail
|
|
@@ -345,16 +359,6 @@ export interface DataSpecifications {
|
|
|
345
359
|
|
|
346
360
|
stormSettingsLightning: DataSpecificationsObject<boolean>;
|
|
347
361
|
|
|
348
|
-
/**
|
|
349
|
-
* Is WebGL disabled?
|
|
350
|
-
*/
|
|
351
|
-
disableWebGL: DataSpecificationsObject<boolean>;
|
|
352
|
-
|
|
353
|
-
/**
|
|
354
|
-
* Indicates whether glParticles are on or off
|
|
355
|
-
*/
|
|
356
|
-
glParticlesOn: DataSpecificationsObject<boolean>;
|
|
357
|
-
|
|
358
362
|
/**
|
|
359
363
|
* Finally used language (the one which is successfully loaded in trans module)
|
|
360
364
|
*/
|
|
@@ -476,11 +480,6 @@ export interface DataSpecifications {
|
|
|
476
480
|
*/
|
|
477
481
|
detail1h: DataSpecificationsObject<boolean>;
|
|
478
482
|
|
|
479
|
-
/**
|
|
480
|
-
* Timestamp of detail's progress bar or middleFrame
|
|
481
|
-
*/
|
|
482
|
-
detailTimestamp: DataSpecificationsObject<Timestamp>;
|
|
483
|
-
|
|
484
483
|
/**
|
|
485
484
|
* Detail keeps its 10+ days expanded forecast
|
|
486
485
|
*/
|
|
@@ -496,12 +495,8 @@ export interface DataSpecifications {
|
|
|
496
495
|
*/
|
|
497
496
|
camsPreviews: DataSpecificationsObject<boolean>;
|
|
498
497
|
|
|
499
|
-
//
|
|
500
|
-
// CAP alerts
|
|
501
|
-
//
|
|
502
|
-
|
|
503
498
|
/**
|
|
504
|
-
* Today,
|
|
499
|
+
* Today, tomorrow, later
|
|
505
500
|
*/
|
|
506
501
|
capDisplay: DataSpecificationsObject<'all' | 'today' | 'tomm' | 'later'>;
|
|
507
502
|
|
|
@@ -525,6 +520,11 @@ export interface DataSpecifications {
|
|
|
525
520
|
*/
|
|
526
521
|
blitzSoundOn: DataSpecificationsObject<boolean>;
|
|
527
522
|
|
|
523
|
+
/**
|
|
524
|
+
* Whether to render baseLayer using tiles with thick borders
|
|
525
|
+
*/
|
|
526
|
+
showThickBorders: DataSpecificationsObject<boolean>;
|
|
527
|
+
|
|
528
528
|
/**
|
|
529
529
|
* Timestamp in ms
|
|
530
530
|
*/
|
|
@@ -541,14 +541,9 @@ export interface DataSpecifications {
|
|
|
541
541
|
radSatFlowOn: DataSpecificationsObject<boolean>;
|
|
542
542
|
|
|
543
543
|
/**
|
|
544
|
-
*
|
|
545
|
-
*/
|
|
546
|
-
satelliteExtraOn: DataSpecificationsObject<boolean>;
|
|
547
|
-
|
|
548
|
-
/**
|
|
549
|
-
* this override is needed for video capture
|
|
544
|
+
* Render precipitation type pattern on radar
|
|
550
545
|
*/
|
|
551
|
-
|
|
546
|
+
radarRenderPType: DataSpecificationsObject<boolean>;
|
|
552
547
|
|
|
553
548
|
/**
|
|
554
549
|
* Satellite/Radar archive on
|
|
@@ -565,11 +560,6 @@ export interface DataSpecifications {
|
|
|
565
560
|
*/
|
|
566
561
|
archiveRange: DataSpecificationsObject<number>;
|
|
567
562
|
|
|
568
|
-
/**
|
|
569
|
-
* Information, if startup weather box is shown or not
|
|
570
|
-
*/
|
|
571
|
-
startupWeatherShown: DataSpecificationsObject<boolean>;
|
|
572
|
-
|
|
573
563
|
/**
|
|
574
564
|
* pois layer that user selected
|
|
575
565
|
*
|
|
@@ -624,7 +614,7 @@ export interface DataSpecifications {
|
|
|
624
614
|
zuluMode: DataSpecificationsObject<boolean>;
|
|
625
615
|
|
|
626
616
|
/**
|
|
627
|
-
* Sorting of nearest
|
|
617
|
+
* Sorting of nearest weather stations
|
|
628
618
|
* @ignore
|
|
629
619
|
*/
|
|
630
620
|
stationsSort: DataSpecificationsObject<'profi' | 'distance'>;
|
|
@@ -708,7 +698,8 @@ export interface DataSpecifications {
|
|
|
708
698
|
lastPoiLocation: DataSpecificationsObject<(LatLon & { type?: string }) | null>;
|
|
709
699
|
|
|
710
700
|
/**
|
|
711
|
-
* Picker last location
|
|
701
|
+
* Picker last location, to be consumed by location service to enhance URL
|
|
702
|
+
* Used only on desktop device
|
|
712
703
|
*/
|
|
713
704
|
pickerLocation: DataSpecificationsObject<LatLon | null>;
|
|
714
705
|
|
|
@@ -792,7 +783,7 @@ export interface DataSpecifications {
|
|
|
792
783
|
pickerMobileTimeout: DataSpecificationsObject<PickerMobileTimeout>;
|
|
793
784
|
|
|
794
785
|
/**
|
|
795
|
-
*
|
|
786
|
+
* Enable/disable change of detail location, when map is dragged
|
|
796
787
|
*/
|
|
797
788
|
changeDetailOnMapDrag: DataSpecificationsObject<boolean>;
|
|
798
789
|
|
|
@@ -856,11 +847,6 @@ export interface DataSpecifications {
|
|
|
856
847
|
*/
|
|
857
848
|
rhMenuArrangeMode: DataSpecificationsObject<boolean>;
|
|
858
849
|
|
|
859
|
-
/*
|
|
860
|
-
* If startup widgets should persist
|
|
861
|
-
*/
|
|
862
|
-
persistentWidgets: DataSpecificationsObject<boolean>;
|
|
863
|
-
|
|
864
850
|
/**
|
|
865
851
|
* List of interests user has, based on onboarding picker
|
|
866
852
|
*/
|
|
@@ -881,7 +867,7 @@ export interface DataSpecifications {
|
|
|
881
867
|
/**
|
|
882
868
|
* If user wants to display just some type of favs in favs plugin
|
|
883
869
|
*/
|
|
884
|
-
favsFilter: DataSpecificationsObject<
|
|
870
|
+
favsFilter: DataSpecificationsObject<FavType[]>;
|
|
885
871
|
|
|
886
872
|
/**
|
|
887
873
|
* Contains information, that registration hash for pushNotifications has been
|
|
@@ -889,7 +875,7 @@ export interface DataSpecifications {
|
|
|
889
875
|
*/
|
|
890
876
|
pushNotificationsReady: DataSpecificationsObject<boolean>;
|
|
891
877
|
|
|
892
|
-
|
|
878
|
+
/*
|
|
893
879
|
* Feature flags to enable/disable features without the need to re-release the client
|
|
894
880
|
*/
|
|
895
881
|
featureFlags: DataSpecificationsObject<FeatureFlags>;
|
|
@@ -904,6 +890,36 @@ export interface DataSpecifications {
|
|
|
904
890
|
* User has enabled advanced features in debug console
|
|
905
891
|
*/
|
|
906
892
|
advancedDebugConsole: DataSpecificationsObject<boolean>;
|
|
893
|
+
|
|
894
|
+
/**
|
|
895
|
+
* Active tab in pin menu (fav-layers plugin)
|
|
896
|
+
*/
|
|
897
|
+
pinMenuActiveTab: DataSpecificationsObject<'models' | 'layers'>;
|
|
898
|
+
|
|
899
|
+
/*
|
|
900
|
+
* Range of the currently used segment
|
|
901
|
+
*/
|
|
902
|
+
radarPlusSegmentRange: DataSpecificationsObject<Range>;
|
|
903
|
+
|
|
904
|
+
/**
|
|
905
|
+
* Whether the debug performance overlay (frametimes & FPS) is enabled (DEBUG type setting)
|
|
906
|
+
*/
|
|
907
|
+
perfOverlayEnabled: DataSpecificationsObject<boolean>;
|
|
908
|
+
|
|
909
|
+
/*
|
|
910
|
+
* Instance of TIlePoi, that is used to display POIs
|
|
911
|
+
*/
|
|
912
|
+
tiledPoiLayer: DataSpecificationsObject<TiledPoiClasses | null>;
|
|
913
|
+
|
|
914
|
+
/**
|
|
915
|
+
* Whether to multisample pType composite when rendering pType (to smooth-out transition between precipitation categories)
|
|
916
|
+
*/
|
|
917
|
+
pTypeMultiSampled: DataSpecificationsObject<boolean>;
|
|
918
|
+
|
|
919
|
+
/**
|
|
920
|
+
* Whether to DEBUG airport related stuff
|
|
921
|
+
*/
|
|
922
|
+
airportDebugMode: DataSpecificationsObject<boolean>;
|
|
907
923
|
}
|
|
908
924
|
|
|
909
925
|
/**
|
|
@@ -924,7 +940,7 @@ export type PickDataSpecificationPropsByType<U, Strict = true> = Pick<
|
|
|
924
940
|
: never
|
|
925
941
|
: never
|
|
926
942
|
: U extends DataSpecifications[P]['def']
|
|
927
|
-
|
|
928
|
-
|
|
943
|
+
? P
|
|
944
|
+
: never;
|
|
929
945
|
}[keyof DataSpecifications]
|
|
930
946
|
>;
|
|
@@ -1,32 +1,25 @@
|
|
|
1
|
-
import type { RouteType, StationId, Timestamp } from '@windy/types';
|
|
2
|
-
import type { LatLon
|
|
1
|
+
import type { ISOCountryCode, RouteType, StationId, Timestamp } from '@windy/types';
|
|
2
|
+
import type { LatLon } from '@windy/interfaces';
|
|
3
3
|
|
|
4
4
|
export type FavId = string;
|
|
5
5
|
|
|
6
6
|
/** New fav type not including alerts */
|
|
7
|
-
export type
|
|
8
|
-
|
|
9
|
-
/** @deprecated Old fav type including alert that will be abandoned soon */
|
|
10
|
-
export type FavType = FavTypeNew | 'alert';
|
|
7
|
+
export type FavType = 'fav' | 'airport' | 'station' | 'webcam' | 'route';
|
|
11
8
|
|
|
12
9
|
export type RouteAsString = `${RouteType}/${string}`;
|
|
13
10
|
|
|
14
11
|
export type FavFragment = (LatLon & {
|
|
15
12
|
/** Title of the fav */
|
|
16
13
|
title: string;
|
|
14
|
+
|
|
15
|
+
/** Lowercase ISO 2 letter CC or xx if fav is in the ocean for example */
|
|
16
|
+
cc?: ISOCountryCode | 'xx';
|
|
17
17
|
}) &
|
|
18
18
|
(
|
|
19
19
|
| { type: 'fav' }
|
|
20
20
|
|
|
21
|
-
/** @deprecated use till migration of alerts is in process */
|
|
22
|
-
| {
|
|
23
|
-
type: 'alert';
|
|
24
|
-
alert: Alert;
|
|
25
|
-
alertProps: AlertProps;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
21
|
/** Airport ICAO code in case of airport */
|
|
29
|
-
| { type: 'airport'; icao: string }
|
|
22
|
+
| { type: 'airport'; icao: string; iata?: string }
|
|
30
23
|
|
|
31
24
|
/** Weather station ID (if WX station) */
|
|
32
25
|
| { type: 'station'; stationId: StationId }
|
|
@@ -56,10 +49,6 @@ export type Fav = FavFragment & {
|
|
|
56
49
|
updated: Timestamp;
|
|
57
50
|
};
|
|
58
51
|
|
|
59
|
-
export type ObsoleteFav = FavFragment & {
|
|
60
|
-
key: string;
|
|
61
|
-
};
|
|
62
|
-
|
|
63
52
|
export type FavQuery =
|
|
64
53
|
| { webcamsId: number }
|
|
65
54
|
| { stationId: StationId }
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { Vector2, Vector3, Vector4 } from '@windy/math';
|
|
2
|
+
import type { GlTexture } from '@windy/GlTexture';
|
|
3
|
+
import type { GlslDataType } from '@windy/glUtils';
|
|
4
|
+
|
|
5
|
+
export interface UniformRecord {
|
|
6
|
+
uniformId: string; // uniform identifier inside fragment shader
|
|
7
|
+
uniformLocation: WebGLUniformLocation | null; // bound uniform location
|
|
8
|
+
glDataType: GlslDataType;
|
|
9
|
+
value: UniformDataType;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Combined type of all possible numeric typed arrays in javascript
|
|
14
|
+
*/
|
|
15
|
+
export type TypedArray =
|
|
16
|
+
| Uint8Array
|
|
17
|
+
| Uint8ClampedArray
|
|
18
|
+
| Uint16Array
|
|
19
|
+
| Uint32Array
|
|
20
|
+
| Int8Array
|
|
21
|
+
| Int16Array
|
|
22
|
+
| Int32Array
|
|
23
|
+
| Float32Array
|
|
24
|
+
| Float64Array;
|
|
25
|
+
|
|
26
|
+
export type UniformDataType =
|
|
27
|
+
| Float32List
|
|
28
|
+
| Vector4
|
|
29
|
+
| Vector3
|
|
30
|
+
| Vector2
|
|
31
|
+
| GlTexture
|
|
32
|
+
| WebGLTexture
|
|
33
|
+
| number
|
|
34
|
+
| undefined
|
|
35
|
+
| null;
|
|
36
|
+
|
|
37
|
+
export type Gl2ColorFormat = WebGL2RenderingContextBase['RG8'] | WebGL2RenderingContextBase['R8'];
|
|
38
|
+
|
|
39
|
+
export type GlColorFormat =
|
|
40
|
+
| WebGLRenderingContextBase['ALPHA']
|
|
41
|
+
| WebGLRenderingContextBase['RGB']
|
|
42
|
+
| WebGLRenderingContextBase['RGBA']
|
|
43
|
+
| WebGLRenderingContextBase['LUMINANCE']
|
|
44
|
+
| WebGLRenderingContextBase['LUMINANCE_ALPHA']
|
|
45
|
+
| Gl2ColorFormat;
|
|
46
|
+
|
|
47
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/EXT_disjoint_timer_query
|
|
48
|
+
interface TimerQueryBase {
|
|
49
|
+
QUERY_COUNTER_BITS_EXT: GLenum;
|
|
50
|
+
CURRENT_QUERY_EXT: GLenum;
|
|
51
|
+
QUERY_RESULT_EXT: GLenum; // GLuint64EXT
|
|
52
|
+
QUERY_RESULT_AVAILABLE_EXT: GLenum;
|
|
53
|
+
TIME_ELAPSED_EXT: GLenum;
|
|
54
|
+
TIMESTAMP_EXT: GLenum;
|
|
55
|
+
GPU_DISJOINT_EXT: GLenum;
|
|
56
|
+
createQueryEXT: () => WebGLQuery;
|
|
57
|
+
deleteQueryEXT: (query: WebGLQuery) => void;
|
|
58
|
+
isQueryEXT: (query: WebGLQuery) => GLboolean;
|
|
59
|
+
beginQueryEXT: (target: GLenum, query: WebGLQuery) => void;
|
|
60
|
+
endQueryEXT: (target: GLenum) => void;
|
|
61
|
+
queryCounterEXT: (target: GLenum, query: WebGLQuery) => void;
|
|
62
|
+
getQueryEXT: (target: GLenum, pname: GLenum) => WebGLQuery | GLint;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface EXT_disjoint_timer_query extends TimerQueryBase {
|
|
66
|
+
getQueryObjectEXT: (query: WebGLQuery, pname: GLenum) => GLuint64 | GLboolean;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface EXT_disjoint_timer_query_webgl2 extends TimerQueryBase {
|
|
70
|
+
getQueryParameter: (query: WebGLQuery, pname: GLenum) => GLuint64 | GLboolean;
|
|
71
|
+
}
|
|
@@ -51,14 +51,14 @@ export interface HttpOptions {
|
|
|
51
51
|
ttl?: Timestamp;
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
54
|
+
* Custom headers object
|
|
55
55
|
*/
|
|
56
|
-
|
|
56
|
+
customHeaders?: Record<string, string>;
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
|
-
*
|
|
59
|
+
* Use already prepared and ongoing fetch requests if available
|
|
60
60
|
*/
|
|
61
|
-
|
|
61
|
+
ongoingFetchRequest?: ReturnType<typeof fetch>;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NumValue } from '@windy/types.d';
|
|
2
|
-
import { LatLon } from '@windy/interfaces.d';
|
|
2
|
+
import { LatLon, type FullRenderParameters } from '@windy/interfaces.d';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Returned values in data RGB channels as tuple [NumValue, NumValue, NumValue]
|
|
@@ -23,13 +23,13 @@ export type InterpolatorPossibleReturns = RGBNumValues | null | undefined | numb
|
|
|
23
23
|
* Interpolates pixel to tuple weather values from RGB channels
|
|
24
24
|
*/
|
|
25
25
|
export type PixelInterpolationFun = (
|
|
26
|
-
x: number,
|
|
27
|
-
y: number,
|
|
28
26
|
mercXpx?: number, // mercator coords in pixels (needed for radar and satellite)
|
|
29
27
|
mercYpx?: number,
|
|
30
|
-
|
|
28
|
+
abort?: AbortController,
|
|
29
|
+
params?: FullRenderParameters
|
|
30
|
+
) => Promise<InterpolatorPossibleReturns>;
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
* Interpolates coordinates to tuple weather values from RGB channels
|
|
34
34
|
*/
|
|
35
|
-
export type CoordsInterpolationFun = <T extends LatLon>(latLon: T) => InterpolatorPossibleReturns
|
|
35
|
+
export type CoordsInterpolationFun = <T extends LatLon>(latLon: T, abort?: AbortController, params?: FullRenderParameters) => Promise<InterpolatorPossibleReturns>;
|
|
@@ -15,12 +15,11 @@ type AllowedDataSpecifications = Pick<
|
|
|
15
15
|
| 'particles'
|
|
16
16
|
| 'numDirection'
|
|
17
17
|
| 'lang'
|
|
18
|
-
| 'disableWebGL'
|
|
19
18
|
| 'graticule'
|
|
20
19
|
| 'particlesAnim'
|
|
21
20
|
| 'timestamp'
|
|
22
21
|
| 'isolines'
|
|
23
|
-
| '
|
|
22
|
+
| 'defaultUnits'
|
|
24
23
|
| 'latlon'
|
|
25
24
|
| 'hourFormat'
|
|
26
25
|
| 'favOverlays'
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { Platform } from '@windy/types';
|
|
2
|
+
|
|
3
|
+
// In the future, the settings may look like this
|
|
4
|
+
// "services": {
|
|
5
|
+
// "storms": {
|
|
6
|
+
// "enabled": true,
|
|
7
|
+
// "trackCurrentLocation": true,
|
|
8
|
+
// "locations": [{ "lat": 1, "lon": 2 }]
|
|
9
|
+
// },
|
|
10
|
+
// "tornadoes": {
|
|
11
|
+
// "enabled": true,
|
|
12
|
+
// "minForce": "F5",
|
|
13
|
+
// "trackCurrentLocation": true,
|
|
14
|
+
// },
|
|
15
|
+
// "earthquakes": {
|
|
16
|
+
// "enabled": true,
|
|
17
|
+
// "minMagnitude": 5,
|
|
18
|
+
// "trackCurrentLocation": true,
|
|
19
|
+
// "locations": [{ "lat": 1, "lon": 2 }]
|
|
20
|
+
// }
|
|
21
|
+
// }
|
|
22
|
+
export interface LocationEntityServices {
|
|
23
|
+
storms: {
|
|
24
|
+
enabled: boolean;
|
|
25
|
+
};
|
|
26
|
+
rain: {
|
|
27
|
+
enabled: boolean;
|
|
28
|
+
};
|
|
29
|
+
// TODO Enable for all when supported by BE
|
|
30
|
+
// For some reason, BE uses unclear acronym instead of tropicalCyclones
|
|
31
|
+
tc?: {
|
|
32
|
+
enabled: boolean;
|
|
33
|
+
};
|
|
34
|
+
cap?: {
|
|
35
|
+
enabled: boolean;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type DistanceUnit = 'km' | 'mi' | 'NM';
|
|
40
|
+
|
|
41
|
+
export interface LocationEntity {
|
|
42
|
+
services: LocationEntityServices;
|
|
43
|
+
platform: Platform;
|
|
44
|
+
deviceToken: string;
|
|
45
|
+
language: string;
|
|
46
|
+
lat?: number;
|
|
47
|
+
locationEntityId?: string;
|
|
48
|
+
lon?: number;
|
|
49
|
+
units: {
|
|
50
|
+
distance: DistanceUnit;
|
|
51
|
+
};
|
|
52
|
+
}
|