@windycom/plugin-devtools 3.0.0 → 3.0.2
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 +2 -0
- package/package.json +1 -1
- package/types/client/BottomSlide.d.ts +3 -0
- package/types/client/Calendar.d.ts +101 -71
- package/types/client/Color.d.ts +19 -6
- package/types/client/DataTiler.d.ts +1 -1
- package/types/client/ExternalSveltePlugin.d.ts +6 -1
- package/types/client/IDB.d.ts +7 -1
- package/types/client/Layer.d.ts +95 -26
- package/types/client/LayerClasses.d.ts +5 -0
- package/types/client/Metric.d.ts +32 -43
- package/types/client/Overlay.d.ts +7 -10
- package/types/client/OverlayClasses.d.ts +8 -0
- package/types/client/Particles.d.ts +1 -1
- package/types/client/Plugin.d.ts +4 -0
- package/types/client/Product.d.ts +31 -73
- package/types/client/ProductClasses.d.ts +44 -0
- package/types/client/Renderer.d.ts +41 -13
- package/types/client/SveltePlugin.d.ts +7 -0
- package/types/client/TileLayer.d.ts +2 -2
- package/types/client/TopoMap.d.ts +2 -3
- package/types/client/WindowPlugin.d.ts +9 -5
- package/types/client/colorGradients.d.ts +5 -10
- package/types/client/colors.d.ts +1 -2
- package/types/client/compatibilityCheck.d.ts +1 -0
- package/types/client/connection.d.ts +1 -1
- package/types/client/d.ts.files/LabelsLayer.d.ts +2 -2
- package/types/client/d.ts.files/Metric.d.ts +21 -2
- package/types/client/d.ts.files/TileLayerCanvas.d.ts +3 -3
- package/types/client/d.ts.files/alerts.d.ts +2 -2
- package/types/client/d.ts.files/broadcast.d.ts +17 -12
- package/types/client/d.ts.files/dataSpecifications.d.ts +76 -53
- package/types/client/d.ts.files/favs.d.ts +18 -30
- package/types/client/d.ts.files/http.d.ts +5 -0
- package/types/client/d.ts.files/lib.d.ts +5 -8
- package/types/client/d.ts.files/plugin-params.d.ts +32 -20
- package/types/client/d.ts.files/plugins.d.ts +2 -3
- package/types/client/d.ts.files/rootScope.d.ts +14 -12
- package/types/client/d.ts.files/startup.d.ts +17 -11
- package/types/client/d.ts.files/user.d.ts +3 -0
- package/types/client/d.ts.files/{Webcams.d.ts → webcams.d.ts} +9 -2
- package/types/client/dataLoader.d.ts +2 -2
- package/types/client/device.d.ts +1 -0
- package/types/client/embed.d.ts +68 -0
- package/types/client/errorLogger.d.ts +28 -3
- package/types/client/errors.d.ts +6 -0
- package/types/client/externalPlugins.d.ts +2 -0
- package/types/client/fetch.d.ts +42 -6
- package/types/client/format.d.ts +2 -1
- package/types/client/glTileRender.d.ts +1 -7
- package/types/client/http.d.ts +0 -6
- package/types/client/idbInstances.d.ts +123 -21
- package/types/client/imakerMain.d.ts +49 -0
- package/types/client/latestBroadcasts.d.ts +1 -1
- package/types/client/layers.d.ts +3 -1
- package/types/client/legends.d.ts +1 -1
- package/types/client/lib.d.ts +1 -10
- package/types/client/libHtml.d.ts +1 -1
- package/types/client/liveAlerts.d.ts +5 -0
- package/types/client/liveAlerts.types.d.ts +28 -0
- package/types/client/location.d.ts +5 -0
- package/types/client/log.d.ts +3 -1
- package/types/client/map.d.ts +7 -1
- package/types/client/mobile.d.ts +3 -9
- package/types/client/models.d.ts +7 -9
- package/types/client/notifications.d.ts +2 -5
- package/types/client/overlays.d.ts +2 -1
- package/types/client/particleRenderers.d.ts +1 -1
- package/types/client/products.d.ts +54 -2
- package/types/client/promo.d.ts +28 -5
- package/types/client/pushNotifications.d.ts +7 -1
- package/types/client/renderCtrl.d.ts +1 -1
- package/types/client/renderTile.d.ts +2 -2
- package/types/client/renderUtils.d.ts +16 -36
- package/types/client/renderers.d.ts +2 -4
- package/types/client/reverseName.d.ts +2 -1
- package/types/client/rhMessage.d.ts +1 -1
- package/types/client/rootScope.d.ts +22 -6
- package/types/client/router.d.ts +8 -5
- package/types/client/store.d.ts +20 -52
- package/types/client/storeLastPosition.d.ts +4 -1
- package/types/client/tileInterpolator.d.ts +1 -1
- package/types/client/user.d.ts +2 -0
- package/types/client/userAlerts.d.ts +0 -4
- package/types/client/userFavs.d.ts +12 -0
- package/types/client/utils.d.ts +57 -20
- package/types/iconfont.d.ts +7 -0
- package/types/interfaces.d.ts +339 -81
- package/types/lang-files.d.ts +783 -19
- package/types/types.d.ts +352 -23
- package/types/client/d.ts.files/Calendar.d.ts +0 -96
- package/types/client/d.ts.files/Color.d.ts +0 -93
- package/types/client/d.ts.files/Layer.d.ts +0 -191
- package/types/client/d.ts.files/Renderer.d.ts +0 -44
- package/types/client/d.ts.files/errorLogger.d.ts +0 -35
- package/types/client/d.ts.files/products.d.ts +0 -61
- package/types/offline.d.ts +0 -100
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
TODO: Minimize amount of these events and reduce their usage
|
|
9
9
|
|
|
10
10
|
*/
|
|
11
|
-
import { DetailLocChangeParams } from '@plugins/detail/detail.d';
|
|
12
11
|
import { ParsLocation as GlobeParsLocation } from '@plugins/globe/main/receiver.d';
|
|
13
12
|
import { Params as GlobeParams, Poi as GlobePoi } from '@plugins/globe/types.d';
|
|
14
13
|
import { ExtendedDataAndParams } from '@plugins/isolines/IsolinesCanvas2D.d';
|
|
@@ -25,6 +24,7 @@ import type { CenterOptions } from '@windy/map';
|
|
|
25
24
|
import type { AnimationOptions, FitBoundsOptions, LngLatBoundsLike } from '@windycom/maplibre-gl';
|
|
26
25
|
import type { ViewportBounds } from '@plugins/_shared/maplibre/utils/maplibreUtils';
|
|
27
26
|
import type { RadarPlusLayer } from '@plugins/radar-plus/types';
|
|
27
|
+
import type { ParsedStartupValues } from './router';
|
|
28
28
|
|
|
29
29
|
type BcastTypesNonGeneric = {
|
|
30
30
|
/**
|
|
@@ -80,9 +80,6 @@ export interface BasicBcastTypes<T extends keyof Plugins> {
|
|
|
80
80
|
/** Plugin was successfully closed */
|
|
81
81
|
pluginOpened: [PluginIdent | string];
|
|
82
82
|
|
|
83
|
-
/** Svelte plugin was successfully mounted */
|
|
84
|
-
pluginMounted: [PluginIdent | string];
|
|
85
|
-
|
|
86
83
|
/**
|
|
87
84
|
* Triggered when Windy has successfully loaded and rendered requested data.
|
|
88
85
|
* Use this for triggering your own tasks.
|
|
@@ -100,7 +97,7 @@ export interface BasicBcastTypes<T extends keyof Plugins> {
|
|
|
100
97
|
* Do not not use this event to start any intensive action since Windy now
|
|
101
98
|
* must load and render all the data. We recommend to use `redrawFinished` instead.
|
|
102
99
|
*/
|
|
103
|
-
paramsChanged: [WeatherParameters, keyof WeatherParameters | undefined];
|
|
100
|
+
paramsChanged: [WeatherParameters, keyof WeatherParameters | 'path' | undefined];
|
|
104
101
|
|
|
105
102
|
/**
|
|
106
103
|
* Indicates that user changed any of the units (wind, temp, ...).
|
|
@@ -114,17 +111,26 @@ export interface BasicBcastTypes<T extends keyof Plugins> {
|
|
|
114
111
|
alertChanged: [];
|
|
115
112
|
|
|
116
113
|
/**
|
|
117
|
-
* Indicates, that router has parsed URL
|
|
118
|
-
|
|
114
|
+
* Indicates, that router has parsed URL
|
|
115
|
+
*/
|
|
116
|
+
routerParsed: [PluginIdent | ExternalPluginIdent | void, ParsedStartupValues | undefined];
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Indicates that mobile ui of plugin using BottomSlide was half opened
|
|
120
|
+
*/
|
|
121
|
+
pluginHalfOpened: [PluginIdent, boolean];
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Request to half open plugin, used in BottomSlide
|
|
119
125
|
*/
|
|
120
|
-
|
|
126
|
+
rqstHalfOpen: [ident: PluginIdent, value: boolean | undefined, emit: boolean | undefined];
|
|
121
127
|
|
|
122
128
|
// prettier-ignore
|
|
123
129
|
/** @ignore */ globeOpened: [];
|
|
124
130
|
/** @ignore */ globeClose: [];
|
|
125
131
|
/** @ignore */ globeFailed: [];
|
|
126
132
|
|
|
127
|
-
/** @ignore */ 'globe-detail': [
|
|
133
|
+
/** @ignore */ 'globe-detail': [LatLon & PluginSource];
|
|
128
134
|
/** @ignore */ 'globe-isolines': [ExtendedDataAndParams | null];
|
|
129
135
|
/** @ignore */ 'globe-poi': [GlobeParsLocation & { type?: string; id?: string }];
|
|
130
136
|
/** @ignore */ 'globe-zoomIn': [[number, number] | null] | [];
|
|
@@ -155,13 +161,12 @@ export interface BasicBcastTypes<T extends keyof Plugins> {
|
|
|
155
161
|
];
|
|
156
162
|
/** @ignore */ 'radarPlus-open-layer': [RadarPlusLayer, boolean | undefined]; // Layer to open, whether to open layer for color editing
|
|
157
163
|
/** @ignore */ detailClose: [];
|
|
158
|
-
/** @ignore */ detailRendered: []; // used only in
|
|
164
|
+
/** @ignore */ detailRendered: []; // used only in embed indicates that detail is ready
|
|
165
|
+
/** @ignore */ stationRendered: []; // used only in embed indicates that detail is ready
|
|
159
166
|
/** @ignore */ reloadFavs: [];
|
|
160
167
|
/** @ignore */ notifPrefChanged: [NotificationPreferences | undefined];
|
|
161
168
|
/** @ignore */ satBackupReload: [];
|
|
162
169
|
/** @ignore */ promptSavePassword: [];
|
|
163
|
-
/** @ignore */ screenshotReady: [];
|
|
164
|
-
/** @ignore */ screenshotError: [Error];
|
|
165
170
|
/** @ignore */ onResume: [];
|
|
166
171
|
/** @ignore */ back2home: [];
|
|
167
172
|
/** @ignore */ reloadMobileApp: [];
|
|
@@ -12,33 +12,35 @@ import {
|
|
|
12
12
|
|
|
13
13
|
import {
|
|
14
14
|
Consent,
|
|
15
|
+
DetailExtendedLatLon,
|
|
15
16
|
GeolocationInfo,
|
|
16
17
|
HomeLocation,
|
|
17
|
-
InstalledExternalPluginConfig,
|
|
18
18
|
LatLon,
|
|
19
19
|
} from '@windy/interfaces.d';
|
|
20
20
|
|
|
21
21
|
import {
|
|
22
22
|
MenuItems,
|
|
23
|
-
Path,
|
|
24
23
|
PickerMobileTimeout,
|
|
25
24
|
ShowableError,
|
|
26
25
|
SubTier,
|
|
27
26
|
Timestamp,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
Hours,
|
|
28
|
+
RouteMotionSpeed,
|
|
29
|
+
UsedMapLibrary,
|
|
30
|
+
UserInterest,
|
|
31
|
+
type ISOCountryCode,
|
|
32
32
|
} from '@windy/types.d';
|
|
33
33
|
|
|
34
34
|
import { MetricItem } from '@windy/Metric.d';
|
|
35
35
|
|
|
36
|
-
import type {
|
|
36
|
+
import type { LoginAndFinishAction, User } from '@windy/user.d';
|
|
37
37
|
|
|
38
38
|
import type { SubscriptionInfo } from '@plugins/_shared/subscription-services/subscription-services.d';
|
|
39
39
|
import type RadarCalendar from '@plugins/radar/calendar/RadarCalendar';
|
|
40
40
|
import type SatelliteCalendar from '@plugins/satellite/calendar/SatelliteCalendar';
|
|
41
|
-
import type { NumberRange } from '
|
|
41
|
+
import type { NumberRange } from '@windy/alerts.d';
|
|
42
|
+
import type { FavType } from '@windy/favs.d';
|
|
43
|
+
import type RadarPlusCalendar from '@plugins/radar-plus/calendar/radarPlusCalendar';
|
|
42
44
|
|
|
43
45
|
/**
|
|
44
46
|
* Custom animation particles settings
|
|
@@ -72,6 +74,7 @@ export interface ReverseResult extends LatLon {
|
|
|
72
74
|
lang: string;
|
|
73
75
|
region?: string;
|
|
74
76
|
country?: string;
|
|
77
|
+
cc?: ISOCountryCode;
|
|
75
78
|
name: string;
|
|
76
79
|
nameValid?: boolean;
|
|
77
80
|
}
|
|
@@ -102,7 +105,7 @@ export interface DataSpecificationsObject<T> {
|
|
|
102
105
|
allowed: Readonly<T[]> | ((d: T) => boolean);
|
|
103
106
|
|
|
104
107
|
/**
|
|
105
|
-
*
|
|
108
|
+
* Persistent item. Save this item to localStorage
|
|
106
109
|
*/
|
|
107
110
|
save?: boolean;
|
|
108
111
|
|
|
@@ -149,6 +152,17 @@ export interface DataSpecificationsObject<T> {
|
|
|
149
152
|
* Setter function - asynchronous (will be run before value is set)
|
|
150
153
|
*/
|
|
151
154
|
asyncSet?: (...args: unknown[]) => Promise<T>;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* This item can be set only by syncSet or asyncSet (so basically it is derived store)
|
|
158
|
+
* This so far does not do anything, it's merely a flag for developer
|
|
159
|
+
*/
|
|
160
|
+
readOnly?: boolean;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export interface FeatureFlags {
|
|
164
|
+
disableSatellitePlus: boolean;
|
|
165
|
+
disableNewRadarPlusGui: boolean;
|
|
152
166
|
}
|
|
153
167
|
|
|
154
168
|
/**
|
|
@@ -205,12 +219,6 @@ export interface DataSpecifications {
|
|
|
205
219
|
*/
|
|
206
220
|
timestamp: DataSpecificationsObject<Timestamp>;
|
|
207
221
|
|
|
208
|
-
/**
|
|
209
|
-
* Read only value! UTC string containing time of actually rendered data that are available for current overlay and weather model.
|
|
210
|
-
* @ignore
|
|
211
|
-
*/
|
|
212
|
-
path: DataSpecificationsObject<Path>;
|
|
213
|
-
|
|
214
222
|
/**
|
|
215
223
|
* Which type of isolines to render
|
|
216
224
|
*/
|
|
@@ -266,11 +274,6 @@ export interface DataSpecifications {
|
|
|
266
274
|
*/
|
|
267
275
|
particlesAnim: DataSpecificationsObject<'on' | 'off' | 'intensive'>;
|
|
268
276
|
|
|
269
|
-
/**
|
|
270
|
-
* Last modified timestamp of just rendered data (read only)
|
|
271
|
-
*/
|
|
272
|
-
lastModified: DataSpecificationsObject<Timestamp>;
|
|
273
|
-
|
|
274
277
|
/**
|
|
275
278
|
* Display graticule over the map
|
|
276
279
|
*/
|
|
@@ -281,6 +284,11 @@ export interface DataSpecifications {
|
|
|
281
284
|
*/
|
|
282
285
|
latlon: DataSpecificationsObject<boolean>;
|
|
283
286
|
|
|
287
|
+
/**
|
|
288
|
+
* Display altitude on picker
|
|
289
|
+
*/
|
|
290
|
+
showPickerElevation: DataSpecificationsObject<boolean>;
|
|
291
|
+
|
|
284
292
|
/**
|
|
285
293
|
* Desired language for Windy. By default is determined by user's browser setting and set to `auto`.
|
|
286
294
|
* Use `store.getAllowed('lang')` to get list of avail langs defined in `supportedLanguages.
|
|
@@ -292,6 +300,11 @@ export interface DataSpecifications {
|
|
|
292
300
|
*/
|
|
293
301
|
englishLabels: DataSpecificationsObject<boolean>;
|
|
294
302
|
|
|
303
|
+
/**
|
|
304
|
+
* Consent to receive newsletter
|
|
305
|
+
*/
|
|
306
|
+
marketingConsent: DataSpecificationsObject<boolean>;
|
|
307
|
+
|
|
295
308
|
/**
|
|
296
309
|
* Display directions in Weather picker as number or as a string (for example NW).
|
|
297
310
|
*/
|
|
@@ -329,16 +342,6 @@ export interface DataSpecifications {
|
|
|
329
342
|
|
|
330
343
|
stormSettingsLightning: DataSpecificationsObject<boolean>;
|
|
331
344
|
|
|
332
|
-
/**
|
|
333
|
-
* Is WebGL disabled?
|
|
334
|
-
*/
|
|
335
|
-
disableWebGL: DataSpecificationsObject<boolean>;
|
|
336
|
-
|
|
337
|
-
/**
|
|
338
|
-
* Indicates whether glParticles are on or off
|
|
339
|
-
*/
|
|
340
|
-
glParticlesOn: DataSpecificationsObject<boolean>;
|
|
341
|
-
|
|
342
345
|
/**
|
|
343
346
|
* Finally used language (the one which is successfully loaded in trans module)
|
|
344
347
|
*/
|
|
@@ -384,6 +387,11 @@ export interface DataSpecifications {
|
|
|
384
387
|
*/
|
|
385
388
|
startUpLastOverlay: DataSpecificationsObject<boolean>;
|
|
386
389
|
|
|
390
|
+
/**
|
|
391
|
+
* User selected default zoom
|
|
392
|
+
*/
|
|
393
|
+
startUpZoom: DataSpecificationsObject<number | null>;
|
|
394
|
+
|
|
387
395
|
/**
|
|
388
396
|
* Save forecast resolution step to be used at startup.
|
|
389
397
|
* 1: 1h step
|
|
@@ -448,7 +456,7 @@ export interface DataSpecifications {
|
|
|
448
456
|
* Detail's location - TODO: get rid of async name property
|
|
449
457
|
* @ignore
|
|
450
458
|
*/
|
|
451
|
-
detailLocation: DataSpecificationsObject<
|
|
459
|
+
detailLocation: DataSpecificationsObject<DetailExtendedLatLon | null>;
|
|
452
460
|
|
|
453
461
|
/**
|
|
454
462
|
* 1h step of forecast
|
|
@@ -475,12 +483,8 @@ export interface DataSpecifications {
|
|
|
475
483
|
*/
|
|
476
484
|
camsPreviews: DataSpecificationsObject<boolean>;
|
|
477
485
|
|
|
478
|
-
//
|
|
479
|
-
// CAP alerts
|
|
480
|
-
//
|
|
481
|
-
|
|
482
486
|
/**
|
|
483
|
-
* Today,
|
|
487
|
+
* Today, tomorrow, later
|
|
484
488
|
*/
|
|
485
489
|
capDisplay: DataSpecificationsObject<'all' | 'today' | 'tomm' | 'later'>;
|
|
486
490
|
|
|
@@ -603,7 +607,7 @@ export interface DataSpecifications {
|
|
|
603
607
|
zuluMode: DataSpecificationsObject<boolean>;
|
|
604
608
|
|
|
605
609
|
/**
|
|
606
|
-
* Sorting of nearest
|
|
610
|
+
* Sorting of nearest weather stations
|
|
607
611
|
* @ignore
|
|
608
612
|
*/
|
|
609
613
|
stationsSort: DataSpecificationsObject<'profi' | 'distance'>;
|
|
@@ -697,12 +701,6 @@ export interface DataSpecifications {
|
|
|
697
701
|
*/
|
|
698
702
|
mapCoords: DataSpecificationsObject<MapCoordinates | null>;
|
|
699
703
|
|
|
700
|
-
/**
|
|
701
|
-
* Whether app has been launched from some source which requires different init state
|
|
702
|
-
* @ignore
|
|
703
|
-
*/
|
|
704
|
-
launchedBy: DataSpecificationsObject<'radar-widget' | null>;
|
|
705
|
-
|
|
706
704
|
/**
|
|
707
705
|
* Any stored metric
|
|
708
706
|
* @ignore
|
|
@@ -777,7 +775,7 @@ export interface DataSpecifications {
|
|
|
777
775
|
pickerMobileTimeout: DataSpecificationsObject<PickerMobileTimeout>;
|
|
778
776
|
|
|
779
777
|
/**
|
|
780
|
-
*
|
|
778
|
+
* Enable/disable change of detail location, when map is dragged
|
|
781
779
|
*/
|
|
782
780
|
changeDetailOnMapDrag: DataSpecificationsObject<boolean>;
|
|
783
781
|
|
|
@@ -786,6 +784,11 @@ export interface DataSpecifications {
|
|
|
786
784
|
*/
|
|
787
785
|
radsatTimestamp: DataSpecificationsObject<Timestamp>;
|
|
788
786
|
|
|
787
|
+
/**
|
|
788
|
+
* RadarPlus calendar
|
|
789
|
+
*/
|
|
790
|
+
radarPlusCalendar: DataSpecificationsObject<RadarPlusCalendar | null>;
|
|
791
|
+
|
|
789
792
|
/**
|
|
790
793
|
* Display this type of WX stations on POI map
|
|
791
794
|
* @ignore
|
|
@@ -836,12 +839,6 @@ export interface DataSpecifications {
|
|
|
836
839
|
*/
|
|
837
840
|
appLocalStorageCounter: DataSpecificationsObject<number | null>;
|
|
838
841
|
|
|
839
|
-
/**
|
|
840
|
-
* List of installed external plugins
|
|
841
|
-
* @ignore
|
|
842
|
-
*/
|
|
843
|
-
installedPlugins: DataSpecificationsObject<InstalledExternalPluginConfig[]>;
|
|
844
|
-
|
|
845
842
|
/*
|
|
846
843
|
* User has entered into arrange mode in RH menu
|
|
847
844
|
*/
|
|
@@ -872,13 +869,39 @@ export interface DataSpecifications {
|
|
|
872
869
|
/**
|
|
873
870
|
* If user wants to display just some type of favs in favs plugin
|
|
874
871
|
*/
|
|
875
|
-
favsFilter: DataSpecificationsObject<
|
|
872
|
+
favsFilter: DataSpecificationsObject<FavType[]>;
|
|
876
873
|
|
|
877
874
|
/**
|
|
878
875
|
* Contains information, that registration hash for pushNotifications has been
|
|
879
876
|
* successfully sent to the backend
|
|
880
877
|
*/
|
|
881
878
|
pushNotificationsReady: DataSpecificationsObject<boolean>;
|
|
879
|
+
|
|
880
|
+
/**
|
|
881
|
+
* Feature flags to enable/disable features without the need to re-release the client
|
|
882
|
+
*/
|
|
883
|
+
featureFlags: DataSpecificationsObject<FeatureFlags>;
|
|
884
|
+
|
|
885
|
+
/**
|
|
886
|
+
* Whenever fullscreen plugin is opened on mobile device suspend potential
|
|
887
|
+
* sound & haptic feedback on radar/sat layers
|
|
888
|
+
*/
|
|
889
|
+
suspendSoundAndHaptic: DataSpecificationsObject<boolean>;
|
|
890
|
+
|
|
891
|
+
/**
|
|
892
|
+
* User has enabled advanced features in debug console
|
|
893
|
+
*/
|
|
894
|
+
advancedDebugConsole: DataSpecificationsObject<boolean>;
|
|
895
|
+
|
|
896
|
+
/**
|
|
897
|
+
* Installed version of windy idb
|
|
898
|
+
*/
|
|
899
|
+
installedIdbVersion: DataSpecificationsObject<number>;
|
|
900
|
+
|
|
901
|
+
/**
|
|
902
|
+
* Active tab in pin menu (fav-layers plugin)
|
|
903
|
+
*/
|
|
904
|
+
pinMenuActiveTab: DataSpecificationsObject<'models' | 'layers'>;
|
|
882
905
|
}
|
|
883
906
|
|
|
884
907
|
/**
|
|
@@ -899,7 +922,7 @@ export type PickDataSpecificationPropsByType<U, Strict = true> = Pick<
|
|
|
899
922
|
: never
|
|
900
923
|
: never
|
|
901
924
|
: U extends DataSpecifications[P]['def']
|
|
902
|
-
|
|
903
|
-
|
|
925
|
+
? P
|
|
926
|
+
: never;
|
|
904
927
|
}[keyof DataSpecifications]
|
|
905
928
|
>;
|
|
@@ -1,39 +1,31 @@
|
|
|
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
|
-
export type FavFragment =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
title: string;
|
|
18
|
-
}) &
|
|
19
|
-
(
|
|
20
|
-
| { type: 'fav' }
|
|
11
|
+
export type FavFragment = (LatLon & {
|
|
12
|
+
/** Title of the fav */
|
|
13
|
+
title: string;
|
|
21
14
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
15
|
+
/** Lowercase ISO 2 letter CC or xx if fav is in the ocean for example */
|
|
16
|
+
cc?: ISOCountryCode | 'xx';
|
|
17
|
+
}) &
|
|
18
|
+
(
|
|
19
|
+
| { type: 'fav' }
|
|
28
20
|
|
|
29
|
-
|
|
30
|
-
|
|
21
|
+
/** Airport ICAO code in case of airport */
|
|
22
|
+
| { type: 'airport'; icao: string; iata?: string }
|
|
31
23
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
24
|
+
/** Weather station ID (if WX station) */
|
|
25
|
+
| { type: 'station'; stationId: StationId }
|
|
26
|
+
| { type: 'webcam'; webcamId: number }
|
|
27
|
+
| { type: 'route'; route: RouteAsString }
|
|
28
|
+
);
|
|
37
29
|
|
|
38
30
|
export type Fav = FavFragment & {
|
|
39
31
|
/** Unique mongoDb ID of item */
|
|
@@ -57,10 +49,6 @@ export type Fav = FavFragment & {
|
|
|
57
49
|
updated: Timestamp;
|
|
58
50
|
};
|
|
59
51
|
|
|
60
|
-
export type ObsoleteFav = FavFragment & {
|
|
61
|
-
key: string;
|
|
62
|
-
};
|
|
63
|
-
|
|
64
52
|
export type FavQuery =
|
|
65
53
|
| { webcamsId: number }
|
|
66
54
|
| { stationId: StationId }
|
|
@@ -59,6 +59,11 @@ export interface HttpOptions {
|
|
|
59
59
|
* Custom headers object
|
|
60
60
|
*/
|
|
61
61
|
customHeaders?: Record<string, string>;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Use already prepared and ongoing fetch requests if available
|
|
65
|
+
*/
|
|
66
|
+
ongoingFetchRequest?: ReturnType<typeof fetch>;
|
|
62
67
|
}
|
|
63
68
|
|
|
64
69
|
/**
|
|
@@ -15,7 +15,6 @@ type AllowedDataSpecifications = Pick<
|
|
|
15
15
|
| 'particles'
|
|
16
16
|
| 'numDirection'
|
|
17
17
|
| 'lang'
|
|
18
|
-
| 'disableWebGL'
|
|
19
18
|
| 'graticule'
|
|
20
19
|
| 'particlesAnim'
|
|
21
20
|
| 'timestamp'
|
|
@@ -41,12 +40,11 @@ export interface InitOptions extends WindyAPIOptions {
|
|
|
41
40
|
zoom?: number;
|
|
42
41
|
}
|
|
43
42
|
|
|
44
|
-
type ApiPicker =
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
};
|
|
43
|
+
type ApiPicker = typeof import('@windy/picker') & {
|
|
44
|
+
open: (latLon: LatLon) => void;
|
|
45
|
+
close: () => void;
|
|
46
|
+
getParams: () => PluginsOpenParams['picker'];
|
|
47
|
+
};
|
|
50
48
|
|
|
51
49
|
export type InitCb = (windyAPI: {
|
|
52
50
|
map: WModules['map']['map'];
|
|
@@ -61,7 +59,6 @@ export type InitCb = (windyAPI: {
|
|
|
61
59
|
export interface ApiAuthResponse {
|
|
62
60
|
domains: string;
|
|
63
61
|
paid: boolean;
|
|
64
|
-
apiUser: string;
|
|
65
62
|
id: string;
|
|
66
63
|
name: string;
|
|
67
64
|
type: string;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { Fav, FavId } from '@windy/favs.d';
|
|
2
2
|
import { StartupArticleData, WhatsNewData } from '@windy/startup.d';
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import {
|
|
4
|
+
HiddenReasonType,
|
|
5
|
+
ReasonTypes,
|
|
6
|
+
SubscriptionSource,
|
|
7
|
+
} from '@plugins/subscription/subscription';
|
|
5
8
|
import { HttpPayload } from '@windy/http.d';
|
|
6
9
|
import {
|
|
7
10
|
CapAlertHeadline,
|
|
@@ -11,6 +14,7 @@ import {
|
|
|
11
14
|
PickerCoords,
|
|
12
15
|
SummaryDataHash,
|
|
13
16
|
WeatherDataPayload,
|
|
17
|
+
FullRenderParameters,
|
|
14
18
|
} from '@windy/interfaces.d';
|
|
15
19
|
import { Pois, Products } from '@windy/rootScope.d';
|
|
16
20
|
import { SingleClickParams } from '@windy/singleclick.d';
|
|
@@ -23,6 +27,9 @@ import {
|
|
|
23
27
|
} from '@windy/types.d';
|
|
24
28
|
import { WebcamCategoryType } from '@windy/webcams';
|
|
25
29
|
|
|
30
|
+
import type { StoryPreview } from '@plugins/stories/stories.d';
|
|
31
|
+
import type { StationDisplayType } from '@plugins/station/station';
|
|
32
|
+
|
|
26
33
|
/**
|
|
27
34
|
* Type of source event, that led to opening any plugin
|
|
28
35
|
*/
|
|
@@ -30,11 +37,12 @@ export type PluginOpenEventSource =
|
|
|
30
37
|
| 'contextmenu'
|
|
31
38
|
| 'hp'
|
|
32
39
|
| 'url'
|
|
40
|
+
| 'singleclick'
|
|
33
41
|
| 'poi-icon'
|
|
34
42
|
| 'search'
|
|
35
43
|
| 'detail'
|
|
36
|
-
| 'singleclick'
|
|
37
44
|
| 'favs-page'
|
|
45
|
+
| 'alerts-page'
|
|
38
46
|
| 'favs-on-hp'
|
|
39
47
|
| 'picker'
|
|
40
48
|
| 'meta'
|
|
@@ -75,13 +83,7 @@ export interface DetailOpenParams extends PluginSource, LatLon {
|
|
|
75
83
|
id?: string;
|
|
76
84
|
|
|
77
85
|
/**
|
|
78
|
-
*
|
|
79
|
-
*/
|
|
80
|
-
sourceEl?: HTMLElement;
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Detail was opened by clicking on Alert notification so detail table should be scrolled to
|
|
84
|
-
* particular timestamp
|
|
86
|
+
* Detail should be scrolled to this timestamp
|
|
85
87
|
*/
|
|
86
88
|
moveToTimestamp?: boolean;
|
|
87
89
|
|
|
@@ -109,7 +111,8 @@ type RplannerDistanceParams =
|
|
|
109
111
|
| {
|
|
110
112
|
import: boolean;
|
|
111
113
|
content: string;
|
|
112
|
-
}
|
|
114
|
+
} // Uploaded GPX
|
|
115
|
+
| undefined;
|
|
113
116
|
|
|
114
117
|
export type PickerOpenParams =
|
|
115
118
|
| (PluginSource &
|
|
@@ -122,8 +125,12 @@ export type PluginsOpenParams = {
|
|
|
122
125
|
detail: DetailOpenParams;
|
|
123
126
|
picker: PickerOpenParams;
|
|
124
127
|
'picker-mobile': PickerOpenParams;
|
|
125
|
-
favs: PluginSource
|
|
126
|
-
station: PluginSource & {
|
|
128
|
+
favs: PluginSource;
|
|
129
|
+
station: PluginSource & {
|
|
130
|
+
id: string;
|
|
131
|
+
moveToTimestamp?: Timestamp;
|
|
132
|
+
view?: StationDisplayType;
|
|
133
|
+
};
|
|
127
134
|
multimodel: LatLon & PluginSource & { name?: string | null };
|
|
128
135
|
webcams: (PluginSource & { category: WebcamCategoryType }) | undefined;
|
|
129
136
|
'webcams-detail': PluginSource & WebcamDetailOpenParams;
|
|
@@ -142,16 +149,20 @@ export type PluginsOpenParams = {
|
|
|
142
149
|
name?: string;
|
|
143
150
|
};
|
|
144
151
|
contextmenu: PluginSource & LatLon & { containerPoint?: L.Point };
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Typing is incorrect here. If called from ClickHandler it has a string as params
|
|
155
|
+
*/
|
|
145
156
|
subscription:
|
|
146
|
-
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
157
|
+
| PluginSource
|
|
158
|
+
| (PluginSource &
|
|
159
|
+
(
|
|
160
|
+
| { promote?: ReasonTypes | HiddenReasonType; subsSource: SubscriptionSource }
|
|
161
|
+
| { pendingError: Error & { responseText: string } }
|
|
162
|
+
));
|
|
151
163
|
'alerts-edit': PluginSource &
|
|
152
164
|
(
|
|
153
165
|
| { action: 'edit'; id: string }
|
|
154
|
-
| { action: 'migration'; favId: string }
|
|
155
166
|
| {
|
|
156
167
|
action: 'new';
|
|
157
168
|
lat: number;
|
|
@@ -177,7 +188,7 @@ export type PluginsOpenParams = {
|
|
|
177
188
|
radiosonde: PluginSource & { id: string; lat?: number; lon?: number };
|
|
178
189
|
startup: PluginSource;
|
|
179
190
|
'startup-whats-new': PluginSource & { data: WhatsNewData };
|
|
180
|
-
'startup-articles': PluginSource & { data: StartupArticleData
|
|
191
|
+
'startup-articles': PluginSource & { data: StartupArticleData };
|
|
181
192
|
'startup-weather': PluginSource & {
|
|
182
193
|
coords: HomeLocation | GeolocationInfo;
|
|
183
194
|
promises: {
|
|
@@ -207,6 +218,7 @@ export type PluginsOpenParams = {
|
|
|
207
218
|
'developer-mode': (PluginSource & { qs: Record<string, string> | undefined }) | undefined;
|
|
208
219
|
'windy-external-plugin': PluginSource & LatLon;
|
|
209
220
|
menu: PluginSource & { scrollTo?: 'pois' };
|
|
221
|
+
stories: { id: string; sortedAndEnhancedPreviews?: StoryPreview[] } & PluginSource;
|
|
210
222
|
onboarding: (PluginSource & { getUserInterests?: boolean }) | undefined;
|
|
211
223
|
'heatmaps-redirect': PluginSource & { id?: string };
|
|
212
224
|
} & {
|
|
@@ -64,6 +64,7 @@ export interface SveltePlugins {
|
|
|
64
64
|
'watch-faces'?: SveltePlugin<'watch-faces'>;
|
|
65
65
|
'app-review-dialog'?: SveltePlugin<'app-review-dialog'>;
|
|
66
66
|
widgets?: SveltePlugin<'widgets'>;
|
|
67
|
+
garmin?: SveltePlugin<'garmin'>;
|
|
67
68
|
'fav-layers'?: SveltePlugin<'fav-layers'>;
|
|
68
69
|
onboarding?: SveltePlugin<'onboarding'>;
|
|
69
70
|
'developer-mode'?: SveltePlugin<'developer-mode'>;
|
|
@@ -78,7 +79,6 @@ export interface SveltePlugins {
|
|
|
78
79
|
'embed-ui'?: SveltePlugin<'embed-ui'>;
|
|
79
80
|
contextmenu?: SveltePlugin<'contextmenu'>;
|
|
80
81
|
upload: SveltePlugin<'upload'>;
|
|
81
|
-
screenshot: SveltePlugin<'screenshot'>;
|
|
82
82
|
search: SveltePlugin<'search'>;
|
|
83
83
|
'startup-articles'?: SveltePlugin<'startup-articles'>;
|
|
84
84
|
'picker-mobile'?: SveltePlugin<'picker-mobile'>; // to Svelte plugin
|
|
@@ -86,12 +86,11 @@ export interface SveltePlugins {
|
|
|
86
86
|
// Used as fake plugin for any other external plugin
|
|
87
87
|
// basically we are unable to type each individual external plugin
|
|
88
88
|
'windy-external-plugin'?: SveltePlugin<'windy-external-plugin'>;
|
|
89
|
+
stories: SveltePlugin<'stories'>;
|
|
89
90
|
}
|
|
90
91
|
|
|
91
92
|
export interface PlainPlugins {
|
|
92
93
|
'gl-particles': Plugin<'gl-particles'>;
|
|
93
|
-
'legacy-tile-render': Plugin<'legacy-tile-render'>;
|
|
94
|
-
particles: Plugin<'particles'>;
|
|
95
94
|
isolines: Plugin<'isolines'>;
|
|
96
95
|
}
|
|
97
96
|
|
|
@@ -1,25 +1,27 @@
|
|
|
1
|
-
export type Levels = typeof import('./rootScope').levels[number];
|
|
1
|
+
export type Levels = (typeof import('./rootScope').levels)[number];
|
|
2
2
|
|
|
3
|
-
export type Overlays = typeof import('./rootScope').overlays[number];
|
|
3
|
+
export type Overlays = (typeof import('./rootScope').overlays)[number];
|
|
4
4
|
|
|
5
|
-
export type LocalProducts = typeof import('./rootScope').localProducts[number];
|
|
5
|
+
export type LocalProducts = (typeof import('./rootScope').localProducts)[number];
|
|
6
6
|
|
|
7
|
-
export type GlobalProducts = typeof import('./rootScope').globalProducts[number];
|
|
7
|
+
export type GlobalProducts = (typeof import('./rootScope').globalProducts)[number];
|
|
8
8
|
|
|
9
|
-
export type SeaProducts = typeof import('./rootScope').seaProducts[number];
|
|
9
|
+
export type SeaProducts = (typeof import('./rootScope').seaProducts)[number];
|
|
10
10
|
|
|
11
|
-
export type AirQualityProducts = typeof import('./rootScope').airQualityProducts[number];
|
|
11
|
+
export type AirQualityProducts = (typeof import('./rootScope').airQualityProducts)[number];
|
|
12
12
|
|
|
13
|
-
export type LocalPointProducts = typeof import('./rootScope').localPointProducts[number];
|
|
13
|
+
export type LocalPointProducts = (typeof import('./rootScope').localPointProducts)[number];
|
|
14
14
|
|
|
15
|
-
export type GlobalPointProducts = typeof import('./rootScope').globalPointProducts[number];
|
|
15
|
+
export type GlobalPointProducts = (typeof import('./rootScope').globalPointProducts)[number];
|
|
16
16
|
|
|
17
|
-
export type PointProducts = typeof import('./rootScope').pointProducts[number];
|
|
17
|
+
export type PointProducts = (typeof import('./rootScope').pointProducts)[number];
|
|
18
18
|
|
|
19
|
-
export type Products = typeof import('./rootScope').products[number];
|
|
19
|
+
export type Products = (typeof import('./rootScope').products)[number];
|
|
20
20
|
|
|
21
|
-
export type SupportedLanguages = typeof import('./rootScope').supportedLanguages[number];
|
|
21
|
+
export type SupportedLanguages = (typeof import('./rootScope').supportedLanguages)[number];
|
|
22
22
|
|
|
23
23
|
export type Pois = keyof typeof import('./rootScope').pois;
|
|
24
24
|
|
|
25
|
-
export type Isolines = typeof import('./rootScope').isolinesType[number];
|
|
25
|
+
export type Isolines = (typeof import('./rootScope').isolinesType)[number];
|
|
26
|
+
|
|
27
|
+
export type PollenProducts = keyof typeof import('./rootScope').pollenProducts;
|