@windycom/plugin-devtools 2.0.0 → 3.0.0
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 +3 -0
- package/index.mjs +2 -2
- package/package.json +2 -3
- package/types/client/AccessProducts.d.ts +8 -0
- package/types/client/BottomSveltePlugins.d.ts +8 -0
- package/types/client/Calendar.d.ts +9 -17
- package/types/client/Color.d.ts +43 -90
- package/types/client/Evented.d.ts +4 -0
- package/types/client/ExternalSveltePlugin.d.ts +2 -1
- package/types/client/IDB.d.ts +63 -0
- package/types/client/IconProducts.d.ts +2 -0
- package/types/client/Layer.d.ts +1 -2
- package/types/client/Metric.d.ts +8 -8
- package/types/client/MetricClasses.d.ts +4 -3
- package/types/client/Overlay.d.ts +30 -15
- package/types/client/OverlayClasses.d.ts +11 -7
- package/types/client/Plugin.d.ts +2 -2
- package/types/client/Product.d.ts +40 -29
- package/types/client/RadarPlusProduct.d.ts +19 -0
- package/types/client/Renderer.d.ts +2 -10
- package/types/client/SveltePlugin.d.ts +9 -5
- package/types/client/TileLayer.d.ts +1 -2
- package/types/client/TopoMap.d.ts +10 -0
- package/types/client/WindowPlugin.d.ts +7 -3
- package/types/client/appsFlyer.d.ts +3 -0
- package/types/client/baseMap.d.ts +8 -5
- package/types/client/cityLabels.d.ts +10 -2
- package/types/client/cloudSync.d.ts +3 -1
- package/types/client/colorGradients.d.ts +13 -0
- package/types/client/customColors.d.ts +1 -0
- package/types/client/d.ts.files/Calendar.d.ts +11 -2
- package/types/client/d.ts.files/Color.d.ts +16 -5
- package/types/client/d.ts.files/LabelsLayer.d.ts +1 -18
- package/types/client/d.ts.files/Layer.d.ts +8 -1
- package/types/client/d.ts.files/Metric.d.ts +1 -0
- package/types/client/d.ts.files/Renderer.d.ts +22 -1
- package/types/client/d.ts.files/alerts.d.ts +120 -0
- package/types/client/d.ts.files/broadcast.d.ts +38 -10
- package/types/client/d.ts.files/dataSpecifications.d.ts +81 -122
- package/types/client/d.ts.files/favs.d.ts +69 -0
- package/types/client/d.ts.files/incomingMessages.d.ts +0 -4
- package/types/client/d.ts.files/notifications.d.ts +2 -2
- package/types/client/d.ts.files/plugin-params.d.ts +35 -47
- package/types/client/d.ts.files/plugins.d.ts +30 -42
- package/types/client/d.ts.files/pois.d.ts +1 -1
- package/types/client/d.ts.files/products.d.ts +15 -3
- package/types/client/d.ts.files/rootScope.d.ts +3 -21
- package/types/client/d.ts.files/startup.d.ts +59 -0
- package/types/client/d.ts.files/storage.d.ts +12 -35
- package/types/client/d.ts.files/user.d.ts +79 -24
- package/types/client/deviceLogging.d.ts +2 -1
- package/types/client/embed2.d.ts +14 -31
- package/types/client/fetch.d.ts +29 -16
- package/types/client/ga.d.ts +1 -1
- package/types/client/geolocation.d.ts +15 -7
- package/types/client/globals.d.ts +1 -0
- package/types/client/http.d.ts +17 -0
- package/types/client/idbInstances.d.ts +45 -0
- package/types/client/langFiles.d.ts +2 -0
- package/types/client/layers.d.ts +2 -0
- package/types/client/lib.d.ts +7 -21
- package/types/client/loadArticlesOrWhatsNew.d.ts +1 -0
- package/types/client/log.d.ts +1 -0
- package/types/client/lruCache.d.ts +6 -0
- package/types/client/map.d.ts +17 -6
- package/types/client/mobile.d.ts +28 -20
- package/types/client/models.d.ts +1 -1
- package/types/client/notifications.d.ts +32 -67
- package/types/client/overlays.d.ts +4 -1
- package/types/client/params.d.ts +0 -1
- package/types/client/permanentPromos.d.ts +1 -1
- package/types/client/persistentStorage.d.ts +8 -0
- package/types/client/picker.d.ts +1 -1
- package/types/client/pois.d.ts +1 -2
- package/types/client/promo.d.ts +6 -16
- package/types/client/pushNotifications.d.ts +13 -1
- package/types/client/queryString.d.ts +1 -1
- package/types/client/renderUtils.d.ts +1 -1
- package/types/client/renderers.d.ts +7 -3
- package/types/client/rootScope.d.ts +14 -23
- package/types/client/router.d.ts +9 -5
- package/types/client/seoParser.d.ts +21 -0
- package/types/client/serviceWorkerCtrl.d.ts +8 -0
- package/types/client/startupWeather.d.ts +13 -9
- package/types/client/store.d.ts +2 -2
- package/types/client/storeLastPosition.d.ts +1 -0
- package/types/client/subscription.d.ts +1 -0
- package/types/client/swDownloader.d.ts +7 -7
- package/types/client/swProxy.d.ts +1 -1
- package/types/client/swUtils.d.ts +3 -3
- package/types/client/trans.d.ts +26 -37
- package/types/client/user.d.ts +5 -13
- package/types/client/userAlerts.d.ts +68 -0
- package/types/client/userConsent.d.ts +6 -0
- package/types/client/userFavs.d.ts +46 -121
- package/types/client/utils.d.ts +28 -6
- package/types/iconfont.d.ts +1 -0
- package/types/interfaces.d.ts +90 -225
- package/types/lang-files.d.ts +687 -119
- package/types/offline.d.ts +100 -0
- package/types/types.d.ts +59 -24
- package/types/client/Bar.d.ts +0 -114
- package/types/client/BindedBar.d.ts +0 -51
- package/types/client/BindedCheckbox.d.ts +0 -30
- package/types/client/BindedSwitch.d.ts +0 -35
- package/types/client/BottomTagPlugin.d.ts +0 -8
- package/types/client/DraggableDiv.d.ts +0 -21
- package/types/client/GhostBox.d.ts +0 -17
- package/types/client/Legend.d.ts +0 -6
- package/types/client/LongTap.d.ts +0 -21
- package/types/client/MobileCalendar.d.ts +0 -51
- package/types/client/OfflineMessagesClasses.d.ts +0 -30
- package/types/client/ProductSwitch.d.ts +0 -14
- package/types/client/Scrollable.d.ts +0 -14
- package/types/client/Switch.d.ts +0 -24
- package/types/client/TimestampBar.d.ts +0 -8
- package/types/client/d.ts.files/Product.d.ts +0 -37
- package/types/client/d.ts.files/trans.d.ts +0 -55
- package/types/client/favs.d.ts +0 -83
- package/types/client/offlineController.d.ts +0 -20
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { FavEventTypes } from '@plugins/favs/favs.d';
|
|
4
|
-
import { StartupArticleData, WhatsNewData } from '@plugins/startup/startup.d';
|
|
1
|
+
import { Fav, FavId } from '@windy/favs.d';
|
|
2
|
+
import { StartupArticleData, WhatsNewData } from '@windy/startup.d';
|
|
5
3
|
import { HiddenReasonType, ReasonTypes } from '@plugins/subscription/subscription';
|
|
6
4
|
import { FullRenderParameters } from '@windy/Layer.d';
|
|
7
5
|
import { HttpPayload } from '@windy/http.d';
|
|
@@ -11,8 +9,6 @@ import {
|
|
|
11
9
|
HomeLocation,
|
|
12
10
|
LatLon,
|
|
13
11
|
PickerCoords,
|
|
14
|
-
SavedAlertFav,
|
|
15
|
-
SavedFav,
|
|
16
12
|
SummaryDataHash,
|
|
17
13
|
WeatherDataPayload,
|
|
18
14
|
} from '@windy/interfaces.d';
|
|
@@ -22,7 +18,8 @@ import {
|
|
|
22
18
|
DetailDisplayType,
|
|
23
19
|
RouteType,
|
|
24
20
|
StationOrPoiType,
|
|
25
|
-
|
|
21
|
+
ExternalPluginIdent,
|
|
22
|
+
type Timestamp,
|
|
26
23
|
} from '@windy/types.d';
|
|
27
24
|
import { WebcamCategoryType } from '@windy/webcams';
|
|
28
25
|
|
|
@@ -33,7 +30,6 @@ export type PluginOpenEventSource =
|
|
|
33
30
|
| 'contextmenu'
|
|
34
31
|
| 'hp'
|
|
35
32
|
| 'url'
|
|
36
|
-
| 'sigleclick'
|
|
37
33
|
| 'poi-icon'
|
|
38
34
|
| 'search'
|
|
39
35
|
| 'detail'
|
|
@@ -49,6 +45,7 @@ export type PluginOpenEventSource =
|
|
|
49
45
|
| 'api'
|
|
50
46
|
| 'last'
|
|
51
47
|
| 'back-button'
|
|
48
|
+
| 'other'
|
|
52
49
|
| 'label';
|
|
53
50
|
|
|
54
51
|
export interface PluginSource {
|
|
@@ -56,7 +53,7 @@ export interface PluginSource {
|
|
|
56
53
|
poiType?: StationOrPoiType | Pois | 'stations';
|
|
57
54
|
}
|
|
58
55
|
|
|
59
|
-
interface DetailOpenParams extends PluginSource, LatLon {
|
|
56
|
+
export interface DetailOpenParams extends PluginSource, LatLon {
|
|
60
57
|
/**
|
|
61
58
|
* How to display detail
|
|
62
59
|
*/
|
|
@@ -83,16 +80,15 @@ interface DetailOpenParams extends PluginSource, LatLon {
|
|
|
83
80
|
sourceEl?: HTMLElement;
|
|
84
81
|
|
|
85
82
|
/**
|
|
86
|
-
* Detail was opened by clicking on Alert
|
|
83
|
+
* Detail was opened by clicking on Alert notification so detail table should be scrolled to
|
|
87
84
|
* particular timestamp
|
|
88
85
|
*/
|
|
89
86
|
moveToTimestamp?: boolean;
|
|
90
87
|
|
|
91
88
|
/**
|
|
92
|
-
* Array of
|
|
93
|
-
* where numbers are timestamps / tsHour
|
|
89
|
+
* Array of timestamp, when Alert was triggered
|
|
94
90
|
*/
|
|
95
|
-
|
|
91
|
+
timestamps?: Timestamp[] | null;
|
|
96
92
|
}
|
|
97
93
|
|
|
98
94
|
type WebcamDetailOpenParams =
|
|
@@ -102,8 +98,9 @@ type WebcamDetailOpenParams =
|
|
|
102
98
|
| undefined;
|
|
103
99
|
|
|
104
100
|
type RplannerDistanceParams =
|
|
101
|
+
| { view: RouteType; coords: string; id: FavId; isFav: true } // Opening from favourites
|
|
105
102
|
| { view?: RouteType; coords: string; id?: string } // Opening from URL
|
|
106
|
-
|
|
|
103
|
+
| Fav
|
|
107
104
|
// | RplannerOpeningAsFavs // Clicking on route stored as fav
|
|
108
105
|
| LatLon[] // User puts two airports is search bar
|
|
109
106
|
| (LatLon & {
|
|
@@ -125,12 +122,7 @@ export type PluginsOpenParams = {
|
|
|
125
122
|
detail: DetailOpenParams;
|
|
126
123
|
picker: PickerOpenParams;
|
|
127
124
|
'picker-mobile': PickerOpenParams;
|
|
128
|
-
favs:
|
|
129
|
-
| (PluginSource & {
|
|
130
|
-
msg?: FavEventTypes;
|
|
131
|
-
})
|
|
132
|
-
| undefined;
|
|
133
|
-
|
|
125
|
+
favs: PluginSource & { importObsoleteFavs?: boolean };
|
|
134
126
|
station: PluginSource & { id: string };
|
|
135
127
|
multimodel: LatLon & PluginSource & { name?: string | null };
|
|
136
128
|
webcams: (PluginSource & { category: WebcamCategoryType }) | undefined;
|
|
@@ -152,32 +144,27 @@ export type PluginsOpenParams = {
|
|
|
152
144
|
contextmenu: PluginSource & LatLon & { containerPoint?: L.Point };
|
|
153
145
|
subscription:
|
|
154
146
|
| (PluginSource & {
|
|
155
|
-
fscNext?: string;
|
|
156
147
|
promote?: ReasonTypes | HiddenReasonType;
|
|
157
148
|
pendingError?: Error & { responseText: string };
|
|
158
149
|
})
|
|
159
150
|
| undefined;
|
|
160
|
-
alerts:
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
151
|
+
'alerts-edit': PluginSource &
|
|
152
|
+
(
|
|
153
|
+
| { action: 'edit'; id: string }
|
|
154
|
+
| { action: 'migration'; favId: string }
|
|
155
|
+
| {
|
|
156
|
+
action: 'new';
|
|
157
|
+
lat: number;
|
|
158
|
+
lon: number;
|
|
159
|
+
locationName?: string;
|
|
160
|
+
}
|
|
161
|
+
);
|
|
162
|
+
alerts: PluginSource & {
|
|
163
|
+
message?: string;
|
|
164
|
+
};
|
|
170
165
|
distance: PluginSource & RplannerDistanceParams;
|
|
171
166
|
rplanner: PluginSource & RplannerDistanceParams;
|
|
172
|
-
airport: PluginSource & {
|
|
173
|
-
// Airport plugin can receive ICAO code as id || icao property
|
|
174
|
-
icao?: string;
|
|
175
|
-
id?: string;
|
|
176
|
-
};
|
|
177
|
-
'save-password': PluginSource & {
|
|
178
|
-
username: string;
|
|
179
|
-
password: string;
|
|
180
|
-
};
|
|
167
|
+
airport: PluginSource & { id: string };
|
|
181
168
|
share: undefined;
|
|
182
169
|
'nearest-stations': PluginSource & LatLon & { compactVersion?: boolean; includeAirq?: boolean };
|
|
183
170
|
'nearest-airq': PluginSource & LatLon;
|
|
@@ -186,10 +173,6 @@ export type PluginsOpenParams = {
|
|
|
186
173
|
'external-plugins':
|
|
187
174
|
| (PluginSource & { id?: string; qs?: PluginsQsParams['external-plugins'] })
|
|
188
175
|
| undefined;
|
|
189
|
-
browser: PluginSource & {
|
|
190
|
-
options: OpenOptions;
|
|
191
|
-
onFinished?: () => void;
|
|
192
|
-
};
|
|
193
176
|
sounding: PluginSource & LatLon & { name?: string };
|
|
194
177
|
radiosonde: PluginSource & { id: string; lat?: number; lon?: number };
|
|
195
178
|
startup: PluginSource;
|
|
@@ -216,10 +199,16 @@ export type PluginsOpenParams = {
|
|
|
216
199
|
showSystemDialog?: boolean;
|
|
217
200
|
})
|
|
218
201
|
| undefined;
|
|
219
|
-
|
|
202
|
+
'location-permission':
|
|
203
|
+
| (PluginSource & {
|
|
204
|
+
resolve?: (value: boolean | PromiseLike<boolean>) => void;
|
|
205
|
+
})
|
|
206
|
+
| undefined;
|
|
220
207
|
'developer-mode': (PluginSource & { qs: Record<string, string> | undefined }) | undefined;
|
|
221
208
|
'windy-external-plugin': PluginSource & LatLon;
|
|
222
|
-
menu: PluginSource
|
|
209
|
+
menu: PluginSource & { scrollTo?: 'pois' };
|
|
210
|
+
onboarding: (PluginSource & { getUserInterests?: boolean }) | undefined;
|
|
211
|
+
'heatmaps-redirect': PluginSource & { id?: string };
|
|
223
212
|
} & {
|
|
224
213
|
[external: ExternalPluginIdent]:
|
|
225
214
|
| (PluginSource & { query: Record<string, string> | undefined })
|
|
@@ -228,7 +217,6 @@ export type PluginsOpenParams = {
|
|
|
228
217
|
} & { [others: string]: undefined };
|
|
229
218
|
|
|
230
219
|
export type PluginsQsParams = {
|
|
231
|
-
subscription: ProviderConstructorParams | undefined;
|
|
232
220
|
'external-plugins': Record<string, string> | undefined;
|
|
233
221
|
'developer-mode': Record<string, string> | undefined;
|
|
234
222
|
detail: { hrTimestamps?: string; name?: string; moveToTimestamp?: string };
|
|
@@ -1,25 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BottomSveltePlugin } from '@windy/BottomSveltePlugins';
|
|
2
2
|
import { Plugin } from '@windy/Plugin';
|
|
3
3
|
import { SveltePanePlugin } from '@windy/SveltePanePlugin';
|
|
4
4
|
import { SveltePlugin } from '@windy/SveltePlugin';
|
|
5
5
|
import { TagPlugin } from '@windy/TagPlugin';
|
|
6
6
|
|
|
7
|
-
export interface
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
satellite: BottomTagPlugin<'satellite'>;
|
|
11
|
-
'cap-alerts': BottomTagPlugin<'cap-alerts'>;
|
|
12
|
-
'day-switcher': BottomTagPlugin<'day-switcher'>;
|
|
7
|
+
export interface BottomSveltePlugins {
|
|
8
|
+
'mobile-calendar'?: BottomSveltePlugin<'mobile-calendar'>;
|
|
9
|
+
'progress-bar'?: BottomSveltePlugin<'progress-bar'>;
|
|
13
10
|
|
|
14
|
-
|
|
15
|
-
'
|
|
16
|
-
|
|
17
|
-
// embed or desktop only
|
|
18
|
-
'progress-bar'?: BottomTagPlugin<'progress-bar'>;
|
|
11
|
+
'day-switcher': BottomSveltePlugin<'day-switcher'>;
|
|
12
|
+
'cap-alerts': BottomSveltePlugin<'cap-alerts'>;
|
|
13
|
+
accumulations: BottomSveltePlugin<'accumulations'>;
|
|
19
14
|
}
|
|
20
15
|
|
|
21
16
|
export interface SveltePanePlugins {
|
|
22
17
|
favs: SveltePanePlugin<'favs'>;
|
|
18
|
+
'alerts-edit': SveltePanePlugin<'alerts-edit'>;
|
|
23
19
|
alerts: SveltePanePlugin<'alerts'>;
|
|
24
20
|
colors: SveltePanePlugin<'colors'>;
|
|
25
21
|
articles: SveltePanePlugin<'articles'>;
|
|
@@ -32,12 +28,12 @@ export interface SveltePanePlugins {
|
|
|
32
28
|
radiosonde: SveltePanePlugin<'radiosonde'>;
|
|
33
29
|
airport: SveltePanePlugin<'airport'>;
|
|
34
30
|
info: SveltePanePlugin<'info'>;
|
|
35
|
-
offline: SveltePlugin<'offline'>;
|
|
36
31
|
webcams: SveltePanePlugin<'webcams'>;
|
|
37
32
|
'webcams-detail': SveltePanePlugin<'webcams-detail'>;
|
|
38
33
|
'webcams-add': SveltePanePlugin<'webcams-add'>;
|
|
39
34
|
'webcams-edit': SveltePanePlugin<'webcams-edit'>;
|
|
40
35
|
'webcams-remove': SveltePanePlugin<'webcams-remove'>;
|
|
36
|
+
|
|
41
37
|
uploader?: SveltePanePlugin<'uploader'>;
|
|
42
38
|
'external-plugins'?: SveltePanePlugin<'external-plugins'>;
|
|
43
39
|
}
|
|
@@ -58,18 +54,34 @@ export interface SveltePlugins {
|
|
|
58
54
|
rplanner: SveltePlugin<'rplanner'>;
|
|
59
55
|
menu: SveltePlugin<'menu'>;
|
|
60
56
|
'fav-alert-menu': SveltePlugin<'fav-alert-menu'>;
|
|
57
|
+
radar: SveltePlugin<'radar'>;
|
|
58
|
+
satellite: SveltePlugin<'satellite'>;
|
|
59
|
+
'radar-plus': SveltePlugin<'radar-plus'>;
|
|
60
|
+
'map-selector': SveltePlugin<'map-selector'>;
|
|
61
61
|
|
|
62
62
|
// Mobile/desktop only plugins
|
|
63
63
|
distance?: SveltePlugin<'distance'>;
|
|
64
64
|
'watch-faces'?: SveltePlugin<'watch-faces'>;
|
|
65
65
|
'app-review-dialog'?: SveltePlugin<'app-review-dialog'>;
|
|
66
|
+
widgets?: SveltePlugin<'widgets'>;
|
|
66
67
|
'fav-layers'?: SveltePlugin<'fav-layers'>;
|
|
68
|
+
onboarding?: SveltePlugin<'onboarding'>;
|
|
67
69
|
'developer-mode'?: SveltePlugin<'developer-mode'>;
|
|
68
70
|
'pin-to-homepage'?: SveltePlugin<'pin-to-homepage'>;
|
|
69
71
|
'startup-whats-new'?: SveltePlugin<'startup-whats-new'>;
|
|
70
72
|
'rhpane-top': SveltePlugin<'rhpane-top'>;
|
|
73
|
+
rhbottom?: SveltePlugin<'rhbottom'>;
|
|
74
|
+
'location-permission'?: SveltePlugin<'location-permission'>;
|
|
71
75
|
|
|
72
76
|
'startup-weather'?: SveltePlugin<'startup-weather'>;
|
|
77
|
+
'mobile-ui'?: SveltePlugin<'mobile-ui'>;
|
|
78
|
+
'embed-ui'?: SveltePlugin<'embed-ui'>;
|
|
79
|
+
contextmenu?: SveltePlugin<'contextmenu'>;
|
|
80
|
+
upload: SveltePlugin<'upload'>;
|
|
81
|
+
screenshot: SveltePlugin<'screenshot'>;
|
|
82
|
+
search: SveltePlugin<'search'>;
|
|
83
|
+
'startup-articles'?: SveltePlugin<'startup-articles'>;
|
|
84
|
+
'picker-mobile'?: SveltePlugin<'picker-mobile'>; // to Svelte plugin
|
|
73
85
|
|
|
74
86
|
// Used as fake plugin for any other external plugin
|
|
75
87
|
// basically we are unable to type each individual external plugin
|
|
@@ -80,39 +92,15 @@ export interface PlainPlugins {
|
|
|
80
92
|
'gl-particles': Plugin<'gl-particles'>;
|
|
81
93
|
'legacy-tile-render': Plugin<'legacy-tile-render'>;
|
|
82
94
|
particles: Plugin<'particles'>;
|
|
83
|
-
|
|
95
|
+
isolines: Plugin<'isolines'>;
|
|
84
96
|
}
|
|
85
97
|
|
|
86
98
|
export interface TagPlugins {
|
|
87
|
-
|
|
88
|
-
* Libraries with possible CSS, that remains opened
|
|
89
|
-
*/
|
|
90
|
-
rhbottom: TagPlugin<'rhbottom'>;
|
|
99
|
+
// These plugins have css only (no html)
|
|
91
100
|
'poi-libs': TagPlugin<'poi-libs'>;
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Tag Plugins
|
|
95
|
-
*/
|
|
96
|
-
upload: TagPlugin<'upload'>;
|
|
97
|
-
screenshot: TagPlugin<'screenshot'>;
|
|
98
|
-
isolines: TagPlugin<'isolines'>;
|
|
99
|
-
search: TagPlugin<'search'>;
|
|
100
|
-
|
|
101
|
-
// not embed plugins
|
|
102
|
-
'startup-articles'?: TagPlugin<'startup-articles'>;
|
|
103
|
-
|
|
104
|
-
// desktop only plugins
|
|
105
|
-
contextmenu?: TagPlugin<'contextmenu'>;
|
|
106
101
|
picker?: TagPlugin<'picker'>;
|
|
107
102
|
globe?: TagPlugin<'globe'>;
|
|
108
|
-
|
|
109
|
-
// mobile only plugins
|
|
110
|
-
'picker-mobile'?: TagPlugin<'picker-mobile'>;
|
|
111
|
-
'promo-mobile-intro'?: TagPlugin<'promo-mobile-intro'>;
|
|
112
|
-
profile?: TagPlugin<'profile'>;
|
|
113
|
-
'save-password'?: TagPlugin<'save-password'>;
|
|
114
|
-
browser?: TagPlugin<'browser'>;
|
|
115
|
-
'map-selector'?: TagPlugin<'map-selector'>;
|
|
103
|
+
'heatmaps-redirect': TagPlugin<'heatmaps-redirect'>;
|
|
116
104
|
}
|
|
117
105
|
|
|
118
106
|
export interface Plugins
|
|
@@ -120,10 +108,10 @@ export interface Plugins
|
|
|
120
108
|
SveltePlugins,
|
|
121
109
|
SveltePanePlugins,
|
|
122
110
|
PlainPlugins,
|
|
123
|
-
|
|
111
|
+
BottomSveltePlugins {}
|
|
124
112
|
|
|
125
113
|
export interface WindowPlugins
|
|
126
114
|
extends TagPlugins,
|
|
127
115
|
SveltePlugins,
|
|
128
116
|
SveltePanePlugins,
|
|
129
|
-
|
|
117
|
+
BottomSveltePlugins {}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DataSpecifications } from '@windy/dataSpecifications.d';
|
|
2
2
|
import type { Pois } from '@windy/rootScope.d';
|
|
3
|
-
import type { LoadedTranslations } from '@windy/
|
|
3
|
+
import type { LoadedTranslations } from '@windy/types';
|
|
4
4
|
|
|
5
5
|
export type PoisCheckboxeDef = {
|
|
6
6
|
checkboxTranslation?: keyof LoadedTranslations;
|
|
@@ -1,33 +1,43 @@
|
|
|
1
|
+
import { AccessProduct, AccessCProduct } from '@windy/AccessProducts';
|
|
1
2
|
import { AromeProduct } from '@windy/AromeProduct';
|
|
2
3
|
import { EcmwfAnalysisProduct } from '@windy/EcmwfAnalysisProduct';
|
|
3
4
|
import { EcmwfProduct } from '@windy/EcmwfProduct';
|
|
4
5
|
import { Product } from '@windy/Product';
|
|
6
|
+
import { RadarPlusProduct } from '@windy/RadarPlusProduct';
|
|
5
7
|
import { SatelliteProduct } from '@windy/SatelliteProduct';
|
|
8
|
+
|
|
6
9
|
import { Products } from '@windy/rootScope.d';
|
|
7
10
|
|
|
8
11
|
export type products = Implements<
|
|
9
12
|
{ [P in Products]: Product },
|
|
10
13
|
{
|
|
11
|
-
bomAccess:
|
|
14
|
+
bomAccess: AccessProduct;
|
|
15
|
+
bomAccessAd: AccessCProduct;
|
|
16
|
+
bomAccessBn: AccessCProduct;
|
|
17
|
+
bomAccessDn: AccessCProduct;
|
|
18
|
+
bomAccessNq: AccessCProduct;
|
|
19
|
+
bomAccessPh: AccessCProduct;
|
|
20
|
+
bomAccessSy: AccessCProduct;
|
|
21
|
+
bomAccessVt: AccessCProduct;
|
|
12
22
|
mblue: Product;
|
|
13
23
|
ecmwf: EcmwfProduct;
|
|
14
24
|
ecmwfWaves: Product;
|
|
15
|
-
ecmwfAifs: Product;
|
|
16
25
|
ecmwfAnalysis: EcmwfAnalysisProduct;
|
|
17
26
|
canHrdps: Product;
|
|
18
27
|
canRdwpsWaves: Product;
|
|
19
28
|
cams: Product;
|
|
20
29
|
camsEu: Product;
|
|
21
30
|
cmems: Product;
|
|
31
|
+
czeAladin: Product;
|
|
22
32
|
gfs: Product;
|
|
23
33
|
gfsWaves: Product;
|
|
24
34
|
icon: Product;
|
|
25
35
|
iconD2: Product;
|
|
26
36
|
iconEu: Product;
|
|
27
37
|
iconEuWaves: Product;
|
|
28
|
-
iconWaves: Product;
|
|
29
38
|
arome: Product;
|
|
30
39
|
aromeAntilles: AromeProduct;
|
|
40
|
+
aromeFrance: AromeProduct;
|
|
31
41
|
aromeReunion: AromeProduct;
|
|
32
42
|
nems: Product;
|
|
33
43
|
namAlaska: Product;
|
|
@@ -37,6 +47,7 @@ export type products = Implements<
|
|
|
37
47
|
efi: Product;
|
|
38
48
|
radar: Product;
|
|
39
49
|
satellite: SatelliteProduct;
|
|
50
|
+
radarPlus: RadarPlusProduct;
|
|
40
51
|
hrrrAlaska: Product;
|
|
41
52
|
hrrrConus: Product;
|
|
42
53
|
ukv: Product;
|
|
@@ -45,5 +56,6 @@ export type products = Implements<
|
|
|
45
56
|
activeFires: Product;
|
|
46
57
|
jmaMsm: Product;
|
|
47
58
|
jmaCwmWaves: Product;
|
|
59
|
+
topoMap: Product;
|
|
48
60
|
}
|
|
49
61
|
>;
|
|
@@ -2,8 +2,6 @@ export type Levels = typeof import('./rootScope').levels[number];
|
|
|
2
2
|
|
|
3
3
|
export type Overlays = typeof import('./rootScope').overlays[number];
|
|
4
4
|
|
|
5
|
-
export type AcTimes = typeof import('./rootScope').acTimes[number];
|
|
6
|
-
|
|
7
5
|
export type LocalProducts = typeof import('./rootScope').localProducts[number];
|
|
8
6
|
|
|
9
7
|
export type GlobalProducts = typeof import('./rootScope').globalProducts[number];
|
|
@@ -22,22 +20,6 @@ export type Products = typeof import('./rootScope').products[number];
|
|
|
22
20
|
|
|
23
21
|
export type SupportedLanguages = typeof import('./rootScope').supportedLanguages[number];
|
|
24
22
|
|
|
25
|
-
export type Pois =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
| 'wind'
|
|
29
|
-
| 'temp'
|
|
30
|
-
| 'precip'
|
|
31
|
-
| 'metars'
|
|
32
|
-
| 'radiosonde'
|
|
33
|
-
| 'cams'
|
|
34
|
-
| 'pgspots'
|
|
35
|
-
| 'kitespots'
|
|
36
|
-
| 'surfspots'
|
|
37
|
-
| 'tide'
|
|
38
|
-
| 'radiation'
|
|
39
|
-
| 'firespots'
|
|
40
|
-
| 'airq'
|
|
41
|
-
| 'empty';
|
|
42
|
-
|
|
43
|
-
export type Isolines = 'off' | 'pressure' | 'gh' | 'temp' | 'deg0';
|
|
23
|
+
export type Pois = keyof typeof import('./rootScope').pois;
|
|
24
|
+
|
|
25
|
+
export type Isolines = typeof import('./rootScope').isolinesType[number];
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { RelatedHomepageArticlesResponseDto } from '@plugins/articles/articles.d';
|
|
2
|
+
import type { Timestamp } from '@windy/types';
|
|
3
|
+
|
|
4
|
+
export type StartupNewsType = 'hp-article' | 'whats-new';
|
|
5
|
+
|
|
6
|
+
export interface StartupItem {
|
|
7
|
+
type: StartupNewsType;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface StartupResponse {
|
|
11
|
+
'hp-articles'?: StartupArticleData[];
|
|
12
|
+
'whats-new'?: WhatsNewData;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface StartupArticleData extends RelatedHomepageArticlesResponseDto, StartupItem {
|
|
16
|
+
type: 'hp-article';
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface WhatsNewData extends StartupItem {
|
|
20
|
+
type: 'whats-new';
|
|
21
|
+
id: string;
|
|
22
|
+
title: string;
|
|
23
|
+
contributors: {
|
|
24
|
+
name: string;
|
|
25
|
+
avatarUrl: string;
|
|
26
|
+
}[];
|
|
27
|
+
content: {
|
|
28
|
+
new?: string;
|
|
29
|
+
improved?: string;
|
|
30
|
+
fixed?: string;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface EnhancedStartupArticle extends StartupArticleData {
|
|
35
|
+
key: string;
|
|
36
|
+
count: number;
|
|
37
|
+
lastDisplayed: number;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Info about articles, user has already seen
|
|
42
|
+
*/
|
|
43
|
+
export interface SeenArticle {
|
|
44
|
+
/**
|
|
45
|
+
* Last time, the article has been displayed to the user
|
|
46
|
+
*/
|
|
47
|
+
lastDisplayed: Timestamp;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* How many times the article has been seen
|
|
51
|
+
* (one count is added only if the article has been seen after 12 hours from the last seen time)
|
|
52
|
+
*/
|
|
53
|
+
count: number;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Marks beginning of 12h interval
|
|
57
|
+
*/
|
|
58
|
+
seen: Timestamp;
|
|
59
|
+
}
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import { MinifestObject } from '@windy/Calendar.d';
|
|
2
|
-
import { Fav, LastSentDevice, SavedFav, SeenArticle } from '@windy/interfaces.d';
|
|
3
|
-
import { StoredTransFile } from '@windy/trans.d';
|
|
4
1
|
import { Timestamp } from '@windy/types.d';
|
|
5
|
-
|
|
6
|
-
import
|
|
2
|
+
import { Fav, type ObsoleteFav } from '@windy/favs.d';
|
|
3
|
+
import { SearchRecent } from '@plugins/search/search';
|
|
7
4
|
|
|
8
5
|
export interface StorageData {
|
|
9
|
-
/**
|
|
10
|
-
* Number of hits for every single promo2 id.
|
|
11
|
-
*/
|
|
6
|
+
/** @deprecated replaced by IDB */
|
|
12
7
|
promos2?: Record<string, number>;
|
|
13
8
|
|
|
14
9
|
/**
|
|
@@ -35,18 +30,6 @@ export interface StorageData {
|
|
|
35
30
|
*/
|
|
36
31
|
rateDialogShown?: Timestamp;
|
|
37
32
|
|
|
38
|
-
lastSentDevice?: LastSentDevice;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Articles, user has seen on particular device
|
|
42
|
-
*/
|
|
43
|
-
articles?: Record<string, SeenArticle>;
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Airport detail offline cache
|
|
47
|
-
*/
|
|
48
|
-
'offline/airport'?: ReturnType<LRUCache<string>['toJSON']>;
|
|
49
|
-
|
|
50
33
|
/**
|
|
51
34
|
* Used by dev plugin for plugins development
|
|
52
35
|
*/
|
|
@@ -54,27 +37,21 @@ export interface StorageData {
|
|
|
54
37
|
|
|
55
38
|
version?: string;
|
|
56
39
|
|
|
57
|
-
// TODO - centralize all these template strings to the logic directly in their modules
|
|
58
|
-
|
|
59
40
|
[key: `settings_${string}_ts`]: Timestamp | null;
|
|
60
41
|
|
|
61
|
-
[key: `lang/${string}.json`]: StoredTransFile | null;
|
|
62
|
-
|
|
63
|
-
[key: `favs${number}`]: Record<string, SavedFav> | null;
|
|
64
|
-
|
|
65
|
-
// TODO - remove this
|
|
66
|
-
[key: `favs${number}_overflowed`]: Record<string, SavedFav> | null;
|
|
67
|
-
|
|
68
|
-
[key: `favs${number}_ts`]: Timestamp | null;
|
|
69
|
-
|
|
70
|
-
[key: `recents${number}`]: Record<string, Fav> | null;
|
|
71
|
-
|
|
72
|
-
[key: `lastMinifest/${string}`]: MinifestObject | null;
|
|
73
|
-
|
|
74
42
|
/**
|
|
75
43
|
* Other dynamically add storage data
|
|
76
44
|
*/
|
|
77
45
|
[ident: string]: unknown | null;
|
|
46
|
+
|
|
47
|
+
/** @deprecated & replaced by IDB */
|
|
48
|
+
[key: `recents${number}`]: Record<string, SearchRecent> | null;
|
|
49
|
+
|
|
50
|
+
/** @deprecated & replaced by IDB */
|
|
51
|
+
[key: `favs${number}`]: Record<string, Fav | ObsoleteFav> | null;
|
|
52
|
+
|
|
53
|
+
/** @deprecated & replaced by IDB */
|
|
54
|
+
[key: `favs${number}_ts`]: Timestamp | null;
|
|
78
55
|
}
|
|
79
56
|
|
|
80
57
|
export type StorageDataKey = keyof StorageData & string;
|
|
@@ -1,35 +1,56 @@
|
|
|
1
1
|
import { SubscriptionInfo } from '@plugins/_shared/subscription-services/subscription-services.d';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { SubTier, type ExternalPluginIdent } from '@windy/types.d';
|
|
3
|
+
import { FavFragment } from '@windy/favs';
|
|
4
|
+
import type { PluginsOpenParams } from '@windy/plugin-params';
|
|
5
|
+
|
|
6
|
+
export interface User {
|
|
7
|
+
avatar?: string;
|
|
8
|
+
email?: string;
|
|
9
|
+
fullname?: string;
|
|
10
|
+
id: number;
|
|
11
|
+
username: string;
|
|
12
|
+
userslug: string;
|
|
13
|
+
verifiedEmail?: string;
|
|
14
|
+
|
|
15
|
+
/** Based on user location, cookie consent can be shown to the user if needed */
|
|
16
|
+
requiresCookieConsent: boolean;
|
|
17
|
+
|
|
18
|
+
/** TimeStamp of user registration */
|
|
19
|
+
joindate?: number;
|
|
20
|
+
|
|
21
|
+
/** TimeStamp of user last login */
|
|
22
|
+
logindate?: number;
|
|
23
|
+
}
|
|
4
24
|
|
|
5
25
|
/**
|
|
6
26
|
* user info as it's returned from account or node users
|
|
7
27
|
*/
|
|
8
|
-
export
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
28
|
+
export type UserInfo = {
|
|
29
|
+
/** aka userToken in storage */
|
|
30
|
+
token: string;
|
|
31
|
+
} & (
|
|
32
|
+
| {
|
|
33
|
+
auth: false;
|
|
34
|
+
userInfo: {
|
|
35
|
+
requiresCookieConsent: boolean;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
| {
|
|
39
|
+
/** true if user is authenticated */
|
|
40
|
+
auth: true;
|
|
18
41
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
* tier level of user premium - TODO remove
|
|
22
|
-
*/
|
|
23
|
-
subscription?: SubTier;
|
|
42
|
+
/** @deprecated */
|
|
43
|
+
subscription?: SubTier;
|
|
24
44
|
|
|
25
|
-
|
|
26
|
-
|
|
45
|
+
/** Detail info about subscription. It is undefined if no subscription is available for the user. */
|
|
46
|
+
subscriptionInfo?: SubscriptionInfo;
|
|
27
47
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
48
|
+
/**
|
|
49
|
+
* user as in storage definition
|
|
50
|
+
*/
|
|
51
|
+
userInfo: User;
|
|
52
|
+
}
|
|
53
|
+
);
|
|
33
54
|
|
|
34
55
|
/**
|
|
35
56
|
* @typedef {Object} LoginResponse login response as it's returned from account or node login
|
|
@@ -56,3 +77,37 @@ export interface AccountLoginResponse {
|
|
|
56
77
|
*/
|
|
57
78
|
authHash: string;
|
|
58
79
|
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* In order to motivate users to register/login, we show login/register popup
|
|
83
|
+
* in certain situations. This object contains
|
|
84
|
+
*
|
|
85
|
+
*/
|
|
86
|
+
export type LoginAndFinishAction =
|
|
87
|
+
| {
|
|
88
|
+
action: 'addFav';
|
|
89
|
+
params: FavFragment;
|
|
90
|
+
}
|
|
91
|
+
| {
|
|
92
|
+
action: 'alerts-edit';
|
|
93
|
+
params: PluginsOpenParams['alerts-edit'];
|
|
94
|
+
}
|
|
95
|
+
| {
|
|
96
|
+
action: 'uploader';
|
|
97
|
+
params: PluginsOpenParams['uploader'];
|
|
98
|
+
}
|
|
99
|
+
| {
|
|
100
|
+
action: 'favs';
|
|
101
|
+
params: PluginsOpenParams['favs'];
|
|
102
|
+
}
|
|
103
|
+
| {
|
|
104
|
+
action: 'colors';
|
|
105
|
+
params: PluginsOpenParams['colors'];
|
|
106
|
+
}
|
|
107
|
+
| {
|
|
108
|
+
action: 'openExternalPlugin';
|
|
109
|
+
params: {
|
|
110
|
+
name: ExternalPluginIdent;
|
|
111
|
+
openParams: PluginsOpenParams['windy-external-plugin'];
|
|
112
|
+
};
|
|
113
|
+
};
|