@windycom/plugin-devtools 3.0.0 → 3.0.1
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/BottomSlide.d.ts +3 -0
- package/types/client/Color.d.ts +1 -1
- package/types/client/EcmwfProduct.d.ts +0 -22
- package/types/client/ExternalSveltePlugin.d.ts +6 -1
- package/types/client/IDB.d.ts +7 -1
- package/types/client/Metric.d.ts +5 -1
- package/types/client/Overlay.d.ts +1 -1
- package/types/client/Plugin.d.ts +4 -0
- package/types/client/Product.d.ts +2 -10
- package/types/client/RadarPlusProduct.d.ts +1 -1
- package/types/client/SatelliteProduct.d.ts +1 -1
- package/types/client/SveltePlugin.d.ts +7 -0
- package/types/client/WindowPlugin.d.ts +3 -2
- package/types/client/appsFlyer.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/Color.d.ts +1 -0
- package/types/client/d.ts.files/LabelsLayer.d.ts +2 -2
- package/types/client/d.ts.files/alerts.d.ts +1 -2
- package/types/client/d.ts.files/broadcast.d.ts +16 -11
- package/types/client/d.ts.files/dataSpecifications.d.ts +46 -21
- package/types/client/d.ts.files/favs.d.ts +19 -20
- package/types/client/d.ts.files/lib.d.ts +5 -7
- package/types/client/d.ts.files/plugin-params.d.ts +19 -11
- package/types/client/d.ts.files/plugins.d.ts +2 -1
- package/types/client/d.ts.files/products.d.ts +1 -2
- package/types/client/d.ts.files/rootScope.d.ts +12 -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/detectDevice.d.ts +0 -3
- package/types/client/device.d.ts +1 -0
- package/types/client/embed.d.ts +70 -0
- package/types/client/errorLogger.d.ts +28 -3
- package/types/client/errors.d.ts +6 -0
- package/types/client/fetch.d.ts +15 -3
- package/types/client/format.d.ts +1 -1
- package/types/client/http.d.ts +0 -6
- package/types/client/idbInstances.d.ts +21 -30
- package/types/client/imaker.d.ts +112 -0
- package/types/client/imakerMain.d.ts +49 -0
- package/types/client/latestBroadcasts.d.ts +1 -1
- package/types/client/lib.d.ts +1 -3
- 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/mobile.d.ts +3 -2
- package/types/client/models.d.ts +7 -5
- package/types/client/notifications.d.ts +2 -5
- package/types/client/plugins.d.ts +4 -0
- package/types/client/promo.d.ts +1 -1
- package/types/client/pushNotifications.d.ts +1 -13
- package/types/client/rootScope.d.ts +9 -1
- package/types/client/router.d.ts +9 -33
- package/types/client/seoParser.d.ts +0 -35
- package/types/client/showableErrorsService.d.ts +6 -10
- package/types/client/storeLastPosition.d.ts +4 -1
- package/types/client/user.d.ts +2 -0
- package/types/client/userFavs.d.ts +10 -11
- package/types/client/utils.d.ts +40 -4
- package/types/iconfont.d.ts +7 -0
- package/types/interfaces.d.ts +150 -73
- package/types/lang-files.d.ts +625 -1
- package/types/types.d.ts +56 -17
- package/types/client/d.ts.files/errorLogger.d.ts +0 -35
- /package/types/client/d.ts.files/{Webcams.d.ts → webcams.d.ts} +0 -0
|
@@ -23,6 +23,10 @@ import {
|
|
|
23
23
|
} from '@windy/types.d';
|
|
24
24
|
import { WebcamCategoryType } from '@windy/webcams';
|
|
25
25
|
|
|
26
|
+
import type { StoryPreview } from '@plugins/stories/stories.d';
|
|
27
|
+
import type { StationDisplayType } from '@plugins/station/station';
|
|
28
|
+
import type { PluginsListResponseDto } from '@plugins/external-plugins/external-plugins';
|
|
29
|
+
|
|
26
30
|
/**
|
|
27
31
|
* Type of source event, that led to opening any plugin
|
|
28
32
|
*/
|
|
@@ -30,11 +34,12 @@ export type PluginOpenEventSource =
|
|
|
30
34
|
| 'contextmenu'
|
|
31
35
|
| 'hp'
|
|
32
36
|
| 'url'
|
|
37
|
+
| 'singleclick'
|
|
33
38
|
| 'poi-icon'
|
|
34
39
|
| 'search'
|
|
35
40
|
| 'detail'
|
|
36
|
-
| 'singleclick'
|
|
37
41
|
| 'favs-page'
|
|
42
|
+
| 'alerts-page'
|
|
38
43
|
| 'favs-on-hp'
|
|
39
44
|
| 'picker'
|
|
40
45
|
| 'meta'
|
|
@@ -75,13 +80,7 @@ export interface DetailOpenParams extends PluginSource, LatLon {
|
|
|
75
80
|
id?: string;
|
|
76
81
|
|
|
77
82
|
/**
|
|
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
|
|
83
|
+
* Detail should be scrolled to this timestamp
|
|
85
84
|
*/
|
|
86
85
|
moveToTimestamp?: boolean;
|
|
87
86
|
|
|
@@ -123,7 +122,11 @@ export type PluginsOpenParams = {
|
|
|
123
122
|
picker: PickerOpenParams;
|
|
124
123
|
'picker-mobile': PickerOpenParams;
|
|
125
124
|
favs: PluginSource & { importObsoleteFavs?: boolean };
|
|
126
|
-
station: PluginSource & {
|
|
125
|
+
station: PluginSource & {
|
|
126
|
+
id: string;
|
|
127
|
+
moveToTimestamp?: Timestamp;
|
|
128
|
+
view?: StationDisplayType;
|
|
129
|
+
};
|
|
127
130
|
multimodel: LatLon & PluginSource & { name?: string | null };
|
|
128
131
|
webcams: (PluginSource & { category: WebcamCategoryType }) | undefined;
|
|
129
132
|
'webcams-detail': PluginSource & WebcamDetailOpenParams;
|
|
@@ -171,13 +174,17 @@ export type PluginsOpenParams = {
|
|
|
171
174
|
'nearest-webcams-mobile': PluginSource & LatLon;
|
|
172
175
|
'nearest-webcams': PluginSource & LatLon;
|
|
173
176
|
'external-plugins':
|
|
174
|
-
| (PluginSource & {
|
|
177
|
+
| (PluginSource & {
|
|
178
|
+
id?: string;
|
|
179
|
+
qs?: PluginsQsParams['external-plugins'];
|
|
180
|
+
installPlugin?: PluginsListResponseDto;
|
|
181
|
+
})
|
|
175
182
|
| undefined;
|
|
176
183
|
sounding: PluginSource & LatLon & { name?: string };
|
|
177
184
|
radiosonde: PluginSource & { id: string; lat?: number; lon?: number };
|
|
178
185
|
startup: PluginSource;
|
|
179
186
|
'startup-whats-new': PluginSource & { data: WhatsNewData };
|
|
180
|
-
'startup-articles': PluginSource & { data: StartupArticleData
|
|
187
|
+
'startup-articles': PluginSource & { data: StartupArticleData };
|
|
181
188
|
'startup-weather': PluginSource & {
|
|
182
189
|
coords: HomeLocation | GeolocationInfo;
|
|
183
190
|
promises: {
|
|
@@ -207,6 +214,7 @@ export type PluginsOpenParams = {
|
|
|
207
214
|
'developer-mode': (PluginSource & { qs: Record<string, string> | undefined }) | undefined;
|
|
208
215
|
'windy-external-plugin': PluginSource & LatLon;
|
|
209
216
|
menu: PluginSource & { scrollTo?: 'pois' };
|
|
217
|
+
stories: { id: string; sortedAndEnhancedPreviews?: StoryPreview[] } & PluginSource;
|
|
210
218
|
onboarding: (PluginSource & { getUserInterests?: boolean }) | undefined;
|
|
211
219
|
'heatmaps-redirect': PluginSource & { id?: string };
|
|
212
220
|
} & {
|
|
@@ -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,6 +86,7 @@ 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 {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AccessProduct, AccessCProduct } from '@windy/AccessProducts';
|
|
2
2
|
import { AromeProduct } from '@windy/AromeProduct';
|
|
3
|
-
import { EcmwfAnalysisProduct } from '@windy/EcmwfAnalysisProduct';
|
|
4
3
|
import { EcmwfProduct } from '@windy/EcmwfProduct';
|
|
5
4
|
import { Product } from '@windy/Product';
|
|
6
5
|
import { RadarPlusProduct } from '@windy/RadarPlusProduct';
|
|
@@ -22,7 +21,7 @@ export type products = Implements<
|
|
|
22
21
|
mblue: Product;
|
|
23
22
|
ecmwf: EcmwfProduct;
|
|
24
23
|
ecmwfWaves: Product;
|
|
25
|
-
ecmwfAnalysis:
|
|
24
|
+
ecmwfAnalysis: EcmwfProduct;
|
|
26
25
|
canHrdps: Product;
|
|
27
26
|
canRdwpsWaves: Product;
|
|
28
27
|
cams: Product;
|
|
@@ -1,25 +1,25 @@
|
|
|
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];
|
|
@@ -31,21 +31,10 @@ export interface WhatsNewData extends StartupItem {
|
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
export interface EnhancedStartupArticle extends StartupArticleData {
|
|
35
|
-
key: string;
|
|
36
|
-
count: number;
|
|
37
|
-
lastDisplayed: number;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
34
|
/**
|
|
41
35
|
* Info about articles, user has already seen
|
|
42
36
|
*/
|
|
43
37
|
export interface SeenArticle {
|
|
44
|
-
/**
|
|
45
|
-
* Last time, the article has been displayed to the user
|
|
46
|
-
*/
|
|
47
|
-
lastDisplayed: Timestamp;
|
|
48
|
-
|
|
49
38
|
/**
|
|
50
39
|
* How many times the article has been seen
|
|
51
40
|
* (one count is added only if the article has been seen after 12 hours from the last seen time)
|
|
@@ -56,4 +45,21 @@ export interface SeenArticle {
|
|
|
56
45
|
* Marks beginning of 12h interval
|
|
57
46
|
*/
|
|
58
47
|
seen: Timestamp;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Article was liked by user
|
|
51
|
+
*/
|
|
52
|
+
liked?: boolean;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface SeenStory {
|
|
56
|
+
/**
|
|
57
|
+
* Timestamp when was story seen
|
|
58
|
+
*/
|
|
59
|
+
seen: Timestamp;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Story was liked by user
|
|
63
|
+
*/
|
|
64
|
+
liked?: boolean;
|
|
59
65
|
}
|
package/types/client/device.d.ts
CHANGED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import './leafletExt/CanvasLayer';
|
|
2
|
+
import './services/params';
|
|
3
|
+
import './pluginSystem/Plugin';
|
|
4
|
+
import './pluginSystem/SveltePlugin';
|
|
5
|
+
import './pluginSystem/TagPlugin';
|
|
6
|
+
import './pluginSystem/WindowPlugin';
|
|
7
|
+
import './pluginSystem/pluginsCtrl';
|
|
8
|
+
import './ui/timeAnimation';
|
|
9
|
+
import './ui/visibility';
|
|
10
|
+
import './render/renderTile';
|
|
11
|
+
import './render/tileLayerInstance';
|
|
12
|
+
export * as detectDevice from './dummyModules/detectDevice';
|
|
13
|
+
export * as log from './dummyModules/log';
|
|
14
|
+
export * as promo from './dummyModules/promo';
|
|
15
|
+
export * as location from './dummyModules/location';
|
|
16
|
+
export * as router from './dummyModules/router';
|
|
17
|
+
export * as showableErrorsService from './dummyModules/showableErrorsService';
|
|
18
|
+
export * as userFavs from './dummyModules/userFavs';
|
|
19
|
+
export * as share from './dummyModules/share';
|
|
20
|
+
import bcast from './services/broadcast';
|
|
21
|
+
import * as rootScope from './services/rootScope';
|
|
22
|
+
import { default as store } from './services/store';
|
|
23
|
+
export * as user from './services/user';
|
|
24
|
+
import * as ga from './utils/ga';
|
|
25
|
+
import { $ } from './utils/utils';
|
|
26
|
+
import { default as overlays } from './weather/overlays';
|
|
27
|
+
export { rootScope };
|
|
28
|
+
export * as map from './map/map';
|
|
29
|
+
export * as baseMap from './map/baseMap';
|
|
30
|
+
export * as cityLabels from './map/cityLabels';
|
|
31
|
+
export * as mapGlobeCtrl from './map/mapGlobeCtrl';
|
|
32
|
+
export * as picker from './map/picker';
|
|
33
|
+
export * as singleclick from './map/singleclick';
|
|
34
|
+
export { default as plugins } from './pluginSystem/plugins';
|
|
35
|
+
export * as interpolator from './render/interpolator';
|
|
36
|
+
export { default as particleRenderers } from './render/particleRenderers';
|
|
37
|
+
export * as renderUtils from './render/renderUtils';
|
|
38
|
+
export * as DataTiler from './renderClasses/DataTiler';
|
|
39
|
+
export { default as colors } from './services/colors';
|
|
40
|
+
export * as connection from './services/connection';
|
|
41
|
+
export * as device from './services/device';
|
|
42
|
+
export * as geolocation from './services/geolocation';
|
|
43
|
+
export * as notifications from './services/notifications';
|
|
44
|
+
export * as pois from './services/pois';
|
|
45
|
+
export * as reverseName from './services/reverseName';
|
|
46
|
+
export * as trans from './services/trans';
|
|
47
|
+
export * as query from './ui/query';
|
|
48
|
+
export * as rhMessage from './ui/rhMessage';
|
|
49
|
+
export * as BottomSlide from './uiClasses/BottomSlide';
|
|
50
|
+
export * as ClickHandler from './uiClasses/ClickHandler';
|
|
51
|
+
export * as Drag from './uiClasses/Drag';
|
|
52
|
+
export * as Swipe from './uiClasses/Swipe';
|
|
53
|
+
export * as Window from './uiClasses/Window';
|
|
54
|
+
export * as Evented from './utils/Evented';
|
|
55
|
+
export * as errorLogger from './utils/errorLogger';
|
|
56
|
+
export * as fetch from './utils/fetch';
|
|
57
|
+
export * as format from './utils/format';
|
|
58
|
+
export * as http from './utils/http';
|
|
59
|
+
export { default as lruCache } from './utils/lruCache';
|
|
60
|
+
export { default as storage } from './utils/storage';
|
|
61
|
+
export * as subscription from './utils/subscription';
|
|
62
|
+
export * as utils from './utils/utils';
|
|
63
|
+
export { default as metrics } from './weather/metrics';
|
|
64
|
+
export * as models from './weather/models';
|
|
65
|
+
export { default as products } from './weather/products';
|
|
66
|
+
export * as Calendar from './weatherClasses/Calendar';
|
|
67
|
+
export * as Color from './weatherClasses/Color';
|
|
68
|
+
export * as IconProducts from './weatherClasses/IconProducts';
|
|
69
|
+
export { default as GlObj } from './wgUtils/GlObj';
|
|
70
|
+
export { $, bcast as broadcast, ga, overlays, store };
|
|
@@ -1,11 +1,36 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* catches all runtimes exceptions and sends them to kibana on backend.
|
|
3
|
-
* Defines global `logError( moduleName, msg, errObj )` for custom err
|
|
4
|
-
* Licences go here since this is the first minified file
|
|
3
|
+
* Defines global `logError( moduleName, msg, errObj )` for custom err leggin.
|
|
5
4
|
*/
|
|
6
|
-
import type {
|
|
5
|
+
import type { Overlays } from '@windy/rootScope.d';
|
|
6
|
+
import type { Device, Platform, Timestamp } from '@windy/types';
|
|
7
|
+
type RunningPhase = '1_loading' | '2_dependenciesResolved' | '3_redrawFinished' | 'documentIsHidden';
|
|
8
|
+
type ErrorTypes = 'error' | 'customLogError' | 'unhandledRejection';
|
|
9
|
+
/** Payload sent to backend */
|
|
10
|
+
interface ErrorPayload {
|
|
11
|
+
errorID: string;
|
|
12
|
+
type: ErrorTypes;
|
|
13
|
+
platform: Platform;
|
|
14
|
+
device: Device;
|
|
15
|
+
ver: string;
|
|
16
|
+
target: 'index' | 'mobile' | 'embed' | 'lib' | 'imaker';
|
|
17
|
+
msg: string;
|
|
18
|
+
timestamp: Timestamp;
|
|
19
|
+
runningMinutes: number;
|
|
20
|
+
runningPhase: RunningPhase;
|
|
21
|
+
overlay: Overlays;
|
|
22
|
+
url: string;
|
|
23
|
+
module?: string;
|
|
24
|
+
line?: number;
|
|
25
|
+
col?: number;
|
|
26
|
+
script?: string;
|
|
27
|
+
stack?: string;
|
|
28
|
+
repeated?: number;
|
|
29
|
+
latestBcast?: string;
|
|
30
|
+
}
|
|
7
31
|
/**
|
|
8
32
|
* Array of all errors reported to kibana, to show them in debug mode
|
|
9
33
|
* plugin
|
|
10
34
|
*/
|
|
11
35
|
export declare const sentErrors: ErrorPayload[];
|
|
36
|
+
export {};
|
package/types/client/fetch.d.ts
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* # @windy/fetch
|
|
3
|
+
*
|
|
4
|
+
* Basic HTTP requests for getting URLs of our
|
|
5
|
+
* backend services or fetching data from Windy API.
|
|
6
|
+
* Although it works as wrapper around our {@link http} module,
|
|
7
|
+
* it ensures standardized way of fetching data.
|
|
8
|
+
*
|
|
9
|
+
* @module fetch
|
|
10
|
+
*/
|
|
11
|
+
import * as http from '@windy/http';
|
|
1
12
|
import type { CityTemperaturesDto } from '@windy-types/citytile2';
|
|
2
|
-
import type { DataHash, LatLon, MeteogramDataPayload, WeatherDataPayload, ActiveStormCountPayload } from '@windy/interfaces.d';
|
|
13
|
+
import type { DataHash, LatLon, MeteogramDataPayload, WeatherDataPayload, CapAlertHeadline, ActiveStormCountPayload } from '@windy/interfaces.d';
|
|
3
14
|
import type { Pois, Products } from '@windy/rootScope.d';
|
|
4
15
|
import type { ExtendedStationType, StationOrPoiType } from '@windy/types';
|
|
5
|
-
import type { HttpOptions, HttpPayload, QueryStringSource } from '
|
|
16
|
+
import type { HttpOptions, HttpPayload, QueryStringSource } from '@windy/http.d';
|
|
6
17
|
interface LatLonStep extends LatLon {
|
|
7
18
|
step?: number;
|
|
8
19
|
interpolate?: boolean;
|
|
@@ -116,7 +127,8 @@ export declare const getObservationsUrl: (type: ExtendedStationType, id: string,
|
|
|
116
127
|
*/
|
|
117
128
|
export declare const getObservationPoiUrl: (type: StationOrPoiType | 'stations', id: string) => string;
|
|
118
129
|
/**
|
|
119
|
-
* Returns
|
|
130
|
+
* Returns loading promise for cap alert headlines
|
|
120
131
|
*/
|
|
132
|
+
export declare const getCapAlertsSummary: ({ lat, lon }: LatLon) => Promise<http.HttpPayload<CapAlertHeadline[]>>;
|
|
121
133
|
export declare const getHurricanesCount: () => Promise<HttpPayload<ActiveStormCountPayload>>;
|
|
122
134
|
export {};
|
package/types/client/format.d.ts
CHANGED
|
@@ -99,4 +99,4 @@ export declare const seoLang: (lang: string) => string;
|
|
|
99
99
|
* @param viewcount Number to show at animation end
|
|
100
100
|
* @param el HTML element where animate counting and show the final number
|
|
101
101
|
*/
|
|
102
|
-
export declare const animateViews: (viewcount: number, el: HTMLElement) => void;
|
|
102
|
+
export declare const animateViews: (viewcount: number, el: HTMLElement, useViewsText?: boolean) => void;
|
package/types/client/http.d.ts
CHANGED
|
@@ -12,12 +12,6 @@ export declare const acceptHeader: string;
|
|
|
12
12
|
* Enhances URL with server, tokens and auth counter
|
|
13
13
|
*/
|
|
14
14
|
export declare const getURL: (url: string) => string;
|
|
15
|
-
export declare class HttpError extends Error {
|
|
16
|
-
status: number;
|
|
17
|
-
message: string;
|
|
18
|
-
responseText?: string;
|
|
19
|
-
constructor(status: number, message: string, responseText?: string);
|
|
20
|
-
}
|
|
21
15
|
/**
|
|
22
16
|
* Create Event Source for SSE with tokens for authentication
|
|
23
17
|
* Do not forget to close the EventSource, otherwise there will be an error event when the page closes.
|
|
@@ -1,45 +1,36 @@
|
|
|
1
1
|
import { IDB } from '@windy/IDB';
|
|
2
|
-
import type { Fav } from '@windy/favs.d';
|
|
3
|
-
import type { SearchRecent } from '@plugins/search/search';
|
|
4
|
-
import type { AlertResponse, AlertRequest } from '@windy/alerts';
|
|
5
2
|
import type { MarkedNotams } from '@plugins/airport/airport';
|
|
6
|
-
import type {
|
|
7
|
-
import type { SeenArticle } from '@windy/startup.d';
|
|
8
|
-
import type { PromoInfoObject } from '@windy/promo';
|
|
3
|
+
import type { SearchRecent } from '@plugins/search/search';
|
|
9
4
|
import type { AnyColorIdent, UserColor } from '@windy/Color.d';
|
|
5
|
+
import type { AlertRequest, AlertResponse } from '@windy/alerts';
|
|
6
|
+
import type { Fav, FavFragment } from '@windy/favs.d';
|
|
7
|
+
import type { CapAlertSlided, InstalledExternalPluginConfig } from '@windy/interfaces';
|
|
8
|
+
import type { PromoInfoObject } from '@windy/promo';
|
|
9
|
+
import type { SeenArticle, SeenStory } from '@windy/startup.d';
|
|
10
10
|
export declare const initPromise: Promise<IDBDatabase>;
|
|
11
11
|
/** Db of stored user favourites */
|
|
12
|
-
export declare const userFavsIdb: IDB<string, Fav,
|
|
13
|
-
title: string;
|
|
14
|
-
} & ({
|
|
15
|
-
type: "fav";
|
|
16
|
-
} | {
|
|
17
|
-
type: "alert";
|
|
18
|
-
alert: import("../../types/interfaces").Alert;
|
|
19
|
-
alertProps: import("../../types/interfaces").AlertProps;
|
|
20
|
-
} | {
|
|
21
|
-
type: "airport";
|
|
22
|
-
icao: string;
|
|
23
|
-
} | {
|
|
24
|
-
type: "station";
|
|
25
|
-
stationId: `radiation-${string}` | `airq-${string}` | `ad-${string}` | `wmo-${string}` | `madis-${string}` | `buoy-${string}` | `dbuoy-${string}` | `pws-${string}` | `ship-${string}`;
|
|
26
|
-
} | {
|
|
27
|
-
type: "webcam";
|
|
28
|
-
webcamId: number;
|
|
29
|
-
} | {
|
|
30
|
-
type: "route";
|
|
31
|
-
route: `car/${string}` | `vfr/${string}` | `ifr/${string}` | `elevation/${string}` | `boat/${string}` | `airgram/${string}`;
|
|
32
|
-
})>;
|
|
12
|
+
export declare const userFavsIdb: IDB<string, Fav, FavFragment>;
|
|
33
13
|
export declare const searchRecentsIdb: IDB<string, SearchRecent, SearchRecent>;
|
|
34
14
|
/** Db of stored user alerts */
|
|
35
15
|
export declare const userAlertsIdb: IDB<string, AlertResponse, AlertRequest>;
|
|
36
16
|
/** Db of stored notams marked as read */
|
|
37
17
|
export declare const markedNotamsIdb: IDB<`${string}_${string}/${string}`, MarkedNotams, MarkedNotams>;
|
|
38
|
-
/** Latest used minifests */
|
|
39
|
-
export declare const minifestsIdb: IDB<string, MinifestObject, MinifestObject>;
|
|
40
18
|
/** Seen articles */
|
|
41
|
-
export declare const seenArticlesIdb: IDB<string, SeenArticle, SeenArticle>;
|
|
19
|
+
export declare const seenArticlesIdb: IDB<string | number, SeenArticle, SeenArticle>;
|
|
42
20
|
/** Seen promos */
|
|
43
21
|
export declare const seenPromosIdb: IDB<string, PromoInfoObject, PromoInfoObject>;
|
|
44
22
|
/** Custom user colors */
|
|
45
23
|
export declare const customColorsIdb: IDB<AnyColorIdent, UserColor, UserColor>;
|
|
24
|
+
/** Cap alerts that were slided from left to right on startup screen */
|
|
25
|
+
export declare const slidedCapAlertsIdb: IDB<string, CapAlertSlided, CapAlertSlided>;
|
|
26
|
+
/** Seen stories */
|
|
27
|
+
export declare const seenStoriesIdb: IDB<string, SeenStory, SeenStory>;
|
|
28
|
+
/** Log of pages & events that happened on this device */
|
|
29
|
+
export declare const logIdb: IDB<`airport/${string}` | `articles/${string}` | `garmin/${string}` | `onboarding/${string}` | `station/${string}` | `subscription/${string}` | `pois/${string}` | `version/${string}` | `overlay/${string}` | `level/${string}` | `acRange/${string}` | `path/${string}` | `isolinesType/${string}` | `isolinesOn/${string}` | `product/${string}` | `plugin/${string}` | `startup/${string}` | `404/${string}` | `promo/${string}` | `appRating/${string}` | `appOpening/${string}` | `detail2/${string}` | `appsflyer/${string}` | `weather/${string}` | `events/${string}` | `locationPermissionPopup/${string}` | `widgetPromo/${string}` | `storyEvent/${string}`, number, number>;
|
|
30
|
+
/** Log of locations, that user uses on this device */
|
|
31
|
+
export declare const popularLocationsIdb: IDB<string, number, number>;
|
|
32
|
+
/** Seen stories */
|
|
33
|
+
export declare const likedStoryCommentsIdb: IDB<string, boolean, boolean>;
|
|
34
|
+
/** Installed external plugins */
|
|
35
|
+
export declare const installedPluginsIdb: IDB<`windy-plugin-${string}`, InstalledExternalPluginConfig, InstalledExternalPluginConfig>;
|
|
36
|
+
export declare const clearIndexedDB: () => Promise<void>;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import './leafletExt/CanvasLayer';
|
|
2
|
+
export * as detectDevice from './dummyModules/detectDevice';
|
|
3
|
+
export * as log from './dummyModules/log';
|
|
4
|
+
export * as promo from './dummyModules/promo';
|
|
5
|
+
export * as location from './dummyModules/location';
|
|
6
|
+
export * as router from './dummyModules/router';
|
|
7
|
+
export * as showableErrorsService from './dummyModules/showableErrorsService';
|
|
8
|
+
export * as userFavs from './dummyModules/userFavs';
|
|
9
|
+
export * as share from './dummyModules/share';
|
|
10
|
+
export * as Evented from './utils/Evented';
|
|
11
|
+
export * as css from './utils/css';
|
|
12
|
+
export * as fetch from './utils/fetch';
|
|
13
|
+
export * as format from './utils/format';
|
|
14
|
+
export * as ga from './utils/ga';
|
|
15
|
+
export * as http from './utils/http';
|
|
16
|
+
export * as levelUtils from './utils/levelUtils';
|
|
17
|
+
export { default as lruCache } from './utils/lruCache';
|
|
18
|
+
export { default as storage } from './utils/storage';
|
|
19
|
+
export * as IDB from './utils/IDB';
|
|
20
|
+
export * as idbInstances from './utils/idbInstances';
|
|
21
|
+
export * as subscription from './utils/subscription';
|
|
22
|
+
export * as utils from './utils/utils';
|
|
23
|
+
export * as Calendar from './weatherClasses/Calendar';
|
|
24
|
+
export * as Color from './weatherClasses/Color';
|
|
25
|
+
export * as EcmwfProduct from './weatherClasses/EcmwfProduct';
|
|
26
|
+
export * as HrrrProducts from './weatherClasses/HrrrProducts';
|
|
27
|
+
export * as IconProducts from './weatherClasses/IconProducts';
|
|
28
|
+
export * as Layer from './weatherClasses/Layer';
|
|
29
|
+
export * as Metric from './weatherClasses/Metric';
|
|
30
|
+
export * as MetricClasses from './weatherClasses/MetricClasses';
|
|
31
|
+
export * as NamProducts from './weatherClasses/NamProducts';
|
|
32
|
+
export * as Overlay from './weatherClasses/Overlay';
|
|
33
|
+
export * as OverlayClasses from './weatherClasses/OverlayClasses';
|
|
34
|
+
export * as Product from './weatherClasses/Product';
|
|
35
|
+
export * as SatelliteProduct from './weatherClasses/SatelliteProduct';
|
|
36
|
+
export * as StaticProduct from './weatherClasses/StaticProduct';
|
|
37
|
+
export { default as layers } from './weather/layers';
|
|
38
|
+
export { default as legends } from './weather/legends';
|
|
39
|
+
export { default as metrics } from './weather/metrics';
|
|
40
|
+
export * as models from './weather/models';
|
|
41
|
+
export { default as overlays } from './weather/overlays';
|
|
42
|
+
export { default as products } from './weather/products';
|
|
43
|
+
export { default as broadcast } from './services/broadcast';
|
|
44
|
+
export * as cloudSync from './services/cloudSync';
|
|
45
|
+
export { default as colors } from './services/colors';
|
|
46
|
+
export * as connection from './services/connection';
|
|
47
|
+
export { default as dataSpecifications } from './services/dataSpecifications';
|
|
48
|
+
export * as device from './services/device';
|
|
49
|
+
export * as deviceLogging from './services/deviceLogging';
|
|
50
|
+
export * as geolocation from './services/geolocation';
|
|
51
|
+
export * as notifications from './services/notifications';
|
|
52
|
+
export * as ogTags from './services/ogTags';
|
|
53
|
+
export * as params from './services/params';
|
|
54
|
+
export * as pois from './services/pois';
|
|
55
|
+
export * as reverseName from './services/reverseName';
|
|
56
|
+
export * as rootScope from './services/rootScope';
|
|
57
|
+
export { default as store } from './services/store';
|
|
58
|
+
export * as trans from './services/trans';
|
|
59
|
+
export * as userAlerts from './services/userAlerts';
|
|
60
|
+
export * as userConsent from './services/userConsent';
|
|
61
|
+
export * as user from './services/user';
|
|
62
|
+
export * as Plugin from './pluginSystem/Plugin';
|
|
63
|
+
export * as SveltePanePlugin from './pluginSystem/SveltePanePlugin';
|
|
64
|
+
export * as SveltePlugin from './pluginSystem/SveltePlugin';
|
|
65
|
+
export * as ExternalSveltePlugin from './pluginSystem/ExternalSveltePlugin';
|
|
66
|
+
export * as TagPlugin from './pluginSystem/TagPlugin';
|
|
67
|
+
export * as WindowPlugin from './pluginSystem/WindowPlugin';
|
|
68
|
+
export { default as plugins } from './pluginSystem/plugins';
|
|
69
|
+
export * as pluginsCtrl from './pluginSystem/pluginsCtrl';
|
|
70
|
+
export * as externalPlugins from './pluginSystem/externalPlugins';
|
|
71
|
+
export * as BottomSlide from './uiClasses/BottomSlide';
|
|
72
|
+
export * as ClickHandler from './uiClasses/ClickHandler';
|
|
73
|
+
export * as Drag from './uiClasses/Drag';
|
|
74
|
+
export * as Swipe from './uiClasses/Swipe';
|
|
75
|
+
export * as Window from './uiClasses/Window';
|
|
76
|
+
export * as components from './ui/components';
|
|
77
|
+
export * as startupWeather from './ui/startupWeather';
|
|
78
|
+
export * as keyboard from './ui/keyboard';
|
|
79
|
+
export * as permanentPromos from './ui/permanentPromos';
|
|
80
|
+
export * as query from './ui/query';
|
|
81
|
+
export * as rhMessage from './ui/rhMessage';
|
|
82
|
+
export * as timeAnimation from './ui/timeAnimation';
|
|
83
|
+
export * as visibility from './ui/visibility';
|
|
84
|
+
export * as loadArticlesOrWhatsNew from './ui/loadArticlesOrWhatsNew';
|
|
85
|
+
export * as DataTiler from './renderClasses/DataTiler';
|
|
86
|
+
export * as Particles from './renderClasses/Particles';
|
|
87
|
+
export * as Renderer from './renderClasses/Renderer';
|
|
88
|
+
export * as TileLayer from './renderClasses/TileLayer';
|
|
89
|
+
export { default as TileLayerCanvas } from './renderClasses/TileLayerCanvas';
|
|
90
|
+
export * as dataLoader from './render/dataLoader';
|
|
91
|
+
export * as interpolator from './render/interpolator';
|
|
92
|
+
export { default as particleRenderers } from './render/particleRenderers';
|
|
93
|
+
export * as renderCtrl from './render/renderCtrl';
|
|
94
|
+
export * as renderUtils from './render/renderUtils';
|
|
95
|
+
export { default as renderers } from './render/renderers';
|
|
96
|
+
export * as tileInterpolator from './render/tileInterpolator';
|
|
97
|
+
export { default as glTileRender } from './render/glTileRender';
|
|
98
|
+
export * as renderTile from './render/renderTile';
|
|
99
|
+
export * as tileLayer from './render/tileLayerInstance';
|
|
100
|
+
export { default as GlObj } from './wgUtils/GlObj';
|
|
101
|
+
export { default as LabelsLayer } from './mapClasses/LabelsLayer';
|
|
102
|
+
export { default as LandMask } from './mapClasses/LandMask';
|
|
103
|
+
export { default as TileLayerMultiPatch } from './mapClasses/TileLayerMultiPatch';
|
|
104
|
+
export * as baseMap from './map/baseMap';
|
|
105
|
+
export * as cityLabels from './map/cityLabels';
|
|
106
|
+
export * as map from './map/map';
|
|
107
|
+
export * as mapGlobeCtrl from './map/mapGlobeCtrl';
|
|
108
|
+
export * as picker from './map/picker';
|
|
109
|
+
export * as singleclick from './map/singleclick';
|
|
110
|
+
export * as pushNotifications from './dummyModules/pushNotifications';
|
|
111
|
+
export * as appsFlyer from './dummyModules/appsFlyer';
|
|
112
|
+
export * as imaker from './services/imakerMain';
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { LatLon } from '@windy/interfaces';
|
|
2
|
+
import type { Overlays, Products, Pois, Levels } from '@windy/rootScope.d';
|
|
3
|
+
import type { DetailDisplayType, StationId, Timestamp } from '@windy/types';
|
|
4
|
+
export type QueryStringImakerParams = LatLon & {
|
|
5
|
+
zoom: number;
|
|
6
|
+
overlay?: Overlays;
|
|
7
|
+
level?: Levels;
|
|
8
|
+
displayPressureIsolines?: boolean;
|
|
9
|
+
product?: Products;
|
|
10
|
+
pois?: Pois;
|
|
11
|
+
timestamp?: Timestamp;
|
|
12
|
+
} & ({
|
|
13
|
+
type: 'map';
|
|
14
|
+
} | {
|
|
15
|
+
type: 'detail';
|
|
16
|
+
detailDisplay?: DetailDisplayType;
|
|
17
|
+
detailProduct?: Products;
|
|
18
|
+
/** Can be absolute or relative number (for debugging purposes) */
|
|
19
|
+
moveToTimestamp?: Timestamp;
|
|
20
|
+
} | {
|
|
21
|
+
type: 'station';
|
|
22
|
+
/** Format is the same as used in URL, for example `wmo-1158` */
|
|
23
|
+
stationId: StationId;
|
|
24
|
+
/** Can be absolute or relative number (for debugging purposes) */
|
|
25
|
+
moveToTimestamp?: Timestamp;
|
|
26
|
+
});
|
|
27
|
+
export interface RenderMapParams extends LatLon {
|
|
28
|
+
zoom: number;
|
|
29
|
+
overlay?: Overlays;
|
|
30
|
+
level?: Levels;
|
|
31
|
+
displayPressureIsolines?: boolean;
|
|
32
|
+
displayParticles?: boolean;
|
|
33
|
+
product?: Products;
|
|
34
|
+
pois?: Pois;
|
|
35
|
+
timestamp?: Timestamp;
|
|
36
|
+
}
|
|
37
|
+
export interface RenderDetailParams extends RenderMapParams {
|
|
38
|
+
detailDisplay?: DetailDisplayType;
|
|
39
|
+
detailProduct?: Products;
|
|
40
|
+
/** Can be absolute or relative number (for debugging purposes) */
|
|
41
|
+
moveToTimestamp?: Timestamp;
|
|
42
|
+
}
|
|
43
|
+
export interface RenderStationParams extends RenderMapParams {
|
|
44
|
+
stationId: StationId;
|
|
45
|
+
moveToTimestamp?: Timestamp;
|
|
46
|
+
}
|
|
47
|
+
export declare const renderMap: (params: RenderMapParams) => Promise<string[]>;
|
|
48
|
+
export declare const renderDetail: (params: RenderDetailParams) => Promise<string[]>;
|
|
49
|
+
export declare const renderStation: (params: RenderStationParams) => Promise<string[]>;
|
|
@@ -10,5 +10,5 @@ export declare const latestBcasts: BcastHistory[];
|
|
|
10
10
|
* @param msg
|
|
11
11
|
* @param data
|
|
12
12
|
*/
|
|
13
|
-
export declare const addLatestBcast: (ident: string, msg: string, data?: unknown) => void;
|
|
13
|
+
export declare const addLatestBcast: (ident: string, msg: string, data?: string | unknown) => void;
|
|
14
14
|
export declare const getLatestBcasts: (now: Timestamp) => string | undefined;
|