@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
package/types/client/lib.d.ts
CHANGED
|
@@ -12,19 +12,12 @@ export * as subscription from '../utils/subscription';
|
|
|
12
12
|
export * as utils from '../utils/utils';
|
|
13
13
|
export * as Calendar from '../weatherClasses/Calendar';
|
|
14
14
|
export * as Color from '../weatherClasses/Color';
|
|
15
|
-
export * as EcmwfAnalysisProduct from '../weatherClasses/EcmwfAnalysisProduct';
|
|
16
|
-
export * as EcmwfProduct from '../weatherClasses/EcmwfProduct';
|
|
17
|
-
export * as HrrrProducts from '../weatherClasses/HrrrProducts';
|
|
18
|
-
export * as IconProducts from '../weatherClasses/IconProducts';
|
|
19
15
|
export * as Layer from '../weatherClasses/Layer';
|
|
20
16
|
export * as Metric from '../weatherClasses/Metric';
|
|
21
17
|
export * as MetricClasses from '../weatherClasses/MetricClasses';
|
|
22
|
-
export * as NamProducts from '../weatherClasses/NamProducts';
|
|
23
18
|
export * as Overlay from '../weatherClasses/Overlay';
|
|
24
19
|
export * as OverlayClasses from '../weatherClasses/OverlayClasses';
|
|
25
20
|
export * as Product from '../weatherClasses/Product';
|
|
26
|
-
export * as SatelliteProduct from '../weatherClasses/SatelliteProduct';
|
|
27
|
-
export * as StaticProduct from '../weatherClasses/StaticProduct';
|
|
28
21
|
export { default as layers } from '../weather/layers';
|
|
29
22
|
export { default as legends } from '../weather/legends';
|
|
30
23
|
export { default as metrics } from '../weather/metrics';
|
|
@@ -53,7 +46,6 @@ export * as WindowPlugin from '../pluginSystem/WindowPlugin';
|
|
|
53
46
|
export { default as plugins } from '../pluginSystem/plugins';
|
|
54
47
|
export * as pluginsCtrl from '../pluginSystem/pluginsCtrl';
|
|
55
48
|
export * as BottomSlide from '../uiClasses/BottomSlide';
|
|
56
|
-
export * as ClickHandler from '../uiClasses/ClickHandler';
|
|
57
49
|
export * as Drag from '../uiClasses/Drag';
|
|
58
50
|
export * as Swipe from '../uiClasses/Swipe';
|
|
59
51
|
export * as Window from '../uiClasses/Window';
|
|
@@ -85,8 +77,7 @@ export * as mapGlobeCtrl from '../map/mapGlobeCtrl';
|
|
|
85
77
|
export * as picker from '../map/picker';
|
|
86
78
|
export * as singleclick from '../map/singleclick';
|
|
87
79
|
export * as log from '../dummyModules/log';
|
|
88
|
-
export
|
|
89
|
-
export { default as seoParser } from '../dummyModules/seoParser';
|
|
80
|
+
export * as promo from '../dummyModules/promo';
|
|
90
81
|
export * as location from '../dummyModules/location';
|
|
91
82
|
export * as router from '../dummyModules/router';
|
|
92
83
|
export * as showableErrorsService from '../dummyModules/showableErrorsService';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "\n\n<div id=\"map-container\"\n style=\"position: absolute; top: 0; bottom: 0; left: 0; right: 0; width: 100%; height: 100%;\"\n class=\"noselect\"></div>\n\n<div id=\"bottom\" class=\"hide-on-picker-drag right-border\">\n\n\n <!-- progress bar -->\n <div id=\"progress-bar\" class=\"progress-bar\">\n\n <div class=\"progress-line\">\n <div class=\"played\"></div><div class=\"avbl\"></div>\n <i></i>\n </div>\n\n <!-- GHOST -->\n <div class=\"timecode ghost-timecode\">\n <div class=\"box\"></div>\n </div>\n\n <!-- M A I N -->\n <div data-title=\"D_LT2\" class=\"timecode main-timecode\">\n <div class=\"box\"></div><div class=\"loading loading--
|
|
1
|
+
declare const _default: "\n\n<div id=\"map-container\"\n style=\"position: absolute; top: 0; bottom: 0; left: 0; right: 0; width: 100%; height: 100%;\"\n class=\"noselect\"></div>\n\n<div id=\"bottom\" class=\"hide-on-picker-drag right-border\">\n\n\n <!-- progress bar -->\n <div id=\"progress-bar\" class=\"progress-bar\">\n\n <div class=\"progress-line\">\n <div class=\"played\"></div><div class=\"avbl\"></div>\n <i></i>\n </div>\n\n <!-- GHOST -->\n <div class=\"timecode ghost-timecode\">\n <div class=\"box\"></div>\n </div>\n\n <!-- M A I N -->\n <div data-title=\"D_LT2\" class=\"timecode main-timecode\">\n <div class=\"box\"></div><div class=\"loading loading--gray size-l loader-path\"></div><!-- dayLoader -->\n </div>\n\n <!-- PLAY BUTTON apply class play/pause-->\n <div id=\"playpause\" class=\"play-pause iconfont clickable\"></div>\n\n <!-- CALENDAR WITH DAYS -->\n <div id=\"calendar\"></div>\n\n </div>\n\n <!-- ACCUMULATIONS -->\n <div id=\"accumulations\" class=\"size-s fg-yellow\">\n\n <span id=\"acc-title-rain\" data-t=\"RAINACCU\" class=\"capitalize\"></span>\n <span id=\"acc-title-snow\" data-t=\"SNOWACCU\" class=\"capitalize\"></span>\n\n <div class=\"switch switch--uiswitch notap\"></div>\n\n </div>\n\n <!-- mobile version of calendar -->\n <div id=\"mobile-calendar\">\n\n <div id=\"timecode-mobile\" data-title=\"D_LT2\" class=\"timecode\">\n <div id=\"mobile_box\" class=\"box\"></div><div class=\"loading loading--gray size-l loader-path\"></div><!-- dayLoader -->\n </div>\n\n <div id=\"days\"></div>\n\n <!-- PLAY BUTTON FOR MOBILE VERSION apply class play/pause-->\n <div id=\"playpause-mobile\" class=\"play-pause iconfont\"></div>\n\n </div>\n\n</div>\n\n<!-- LOGO -->\n<div id=\"logo-wrapper\" class=\"top-border right-border\">\n <a id=\"logo\" href=\"https://www.windy.com/?utm_medium=userId-__APIUSER__&utm_source=api4\" target=\"_top\">\n <img class=\"clickable\" alt=\"Windy.com\" src=\"<!-- @echo IMG_ABSOLUTE_PATH -->/logo201802/logo-full-windycom-white.svg\" />\n </a>\n</div>\n\n\n<div id=\"plugins\" class=\"hide-on-picker-drag\"></div>\n\n<div id=\"mobile-ovr-select\" data-icon=\"<!-- @echo icon-wind -->\" class=\"top-border clickable\" data-do=\"rqstOpen,menu\"></div>\n\n<div id=\"embed-zoom\">\n <div data-do=\"bcast,zoomIn\" class=\"clickable iconfont zoom-ctrl zoom-plus\" title=\"Zoom in\"><!-- @echo icon-plus --></div>\n <div data-do=\"bcast,zoomOut\" class=\"clickable iconfont zoom-ctrl zoom-minus\" title=\"Zoom out\"><!-- @echo icon-minus --></div>\n</div>\n";
|
|
2
2
|
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { HttpOptions } from '@windy/http';
|
|
2
|
+
import type { LocationEntity } from '@windy/liveAlerts.types';
|
|
3
|
+
export declare function getLocationEntity(locationEntityId: string): Promise<LocationEntity>;
|
|
4
|
+
export declare function upsertLocationEntity(locationEntityId: string, request: Partial<LocationEntity>, options?: HttpOptions): Promise<LocationEntity>;
|
|
5
|
+
export declare function sendTestNotification(locationEntityId: string): Promise<void>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Platform } from '@windy/types';
|
|
2
|
+
export interface LocationEntityServices {
|
|
3
|
+
storms: {
|
|
4
|
+
enabled: boolean;
|
|
5
|
+
};
|
|
6
|
+
rain: {
|
|
7
|
+
enabled: boolean;
|
|
8
|
+
};
|
|
9
|
+
tc?: {
|
|
10
|
+
enabled: boolean;
|
|
11
|
+
};
|
|
12
|
+
cap?: {
|
|
13
|
+
enabled: boolean;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export type DistanceUnit = 'km' | 'mi' | 'NM';
|
|
17
|
+
export interface LocationEntity {
|
|
18
|
+
services: LocationEntityServices;
|
|
19
|
+
platform: Platform;
|
|
20
|
+
deviceToken: string;
|
|
21
|
+
language: string;
|
|
22
|
+
lat?: number;
|
|
23
|
+
locationEntityId?: string;
|
|
24
|
+
lon?: number;
|
|
25
|
+
units: {
|
|
26
|
+
distance: DistanceUnit;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
@@ -27,6 +27,11 @@ import type { ExternalPluginIdent } from '@windy/types.d';
|
|
|
27
27
|
import type { PluginIdent } from '@windy/Plugin';
|
|
28
28
|
import type { WindowPlugins } from '@windy/WindowPlugin';
|
|
29
29
|
import type { PluginsOpenParams } from '@windy/plugin-params';
|
|
30
|
+
/**
|
|
31
|
+
* At what time, the search string was last time updated
|
|
32
|
+
* @param ovr
|
|
33
|
+
* @returns
|
|
34
|
+
*/
|
|
30
35
|
/**
|
|
31
36
|
* Sets browser's description meta tag for purpose of SEO
|
|
32
37
|
*/
|
package/types/client/log.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import type { LogPaths } from '@windy/types.d';
|
|
1
|
+
import type { LogEvents, LogPaths } from '@windy/types.d';
|
|
2
2
|
/** Log event to GA. Path `appsflyer` is logged as key_event instead of page_view by node-services */
|
|
3
3
|
export declare const logPage: (path: LogPaths, item?: string | boolean) => void;
|
|
4
|
+
/** Logs an event that happens in Windy */
|
|
5
|
+
export declare const logEvent: (eventIdent: LogEvents, eventPath?: string) => void;
|
package/types/client/map.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*
|
|
11
11
|
* @module map
|
|
12
12
|
*/
|
|
13
|
-
import type { LatLon } from '@windy/interfaces.d';
|
|
13
|
+
import type { LatLon, SimplifiedGetBoundsOptions } from '@windy/interfaces.d';
|
|
14
14
|
import type { Pixel } from '@windy/types';
|
|
15
15
|
import type { MapLibreMap } from 'plugins/_shared/maplibre/mapLibreMap';
|
|
16
16
|
/**
|
|
@@ -69,6 +69,12 @@ export declare function ensurePointVisibleY(lat: number, lon: number, offset: nu
|
|
|
69
69
|
* @ignore
|
|
70
70
|
*/
|
|
71
71
|
export declare function panToOffset(y: Pixel, lat: number, lon: number): void;
|
|
72
|
+
/**
|
|
73
|
+
* fitBounds either in Leaflet or in mapLibre using [ W, S, E, N ] coordinates.
|
|
74
|
+
*/
|
|
75
|
+
export declare function fitBounds(boundsArray: [number, number, number, number], options?: SimplifiedGetBoundsOptions): void;
|
|
76
|
+
export declare function toggleLandMask(landOnly: boolean): void;
|
|
77
|
+
export declare function toggleSeaMask(hasSea: boolean): void;
|
|
72
78
|
/**
|
|
73
79
|
* Retrieves the map tiles from the mapTilesRecord.
|
|
74
80
|
* @ignore
|
package/types/client/mobile.d.ts
CHANGED
|
@@ -36,23 +36,17 @@ export { default as lruCache } from './utils/lruCache';
|
|
|
36
36
|
export { default as storage } from './utils/storage';
|
|
37
37
|
export * as subscription from './utils/subscription';
|
|
38
38
|
export * as utils from './utils/utils';
|
|
39
|
+
export * as errors from './utils/errors';
|
|
39
40
|
export * as IDB from './utils/IDB';
|
|
40
41
|
export * as idbInstances from './utils/idbInstances';
|
|
41
42
|
export * as Calendar from './weatherClasses/Calendar';
|
|
42
43
|
export * as Color from './weatherClasses/Color';
|
|
43
|
-
export * as EcmwfAnalysisProduct from './weatherClasses/EcmwfAnalysisProduct';
|
|
44
|
-
export * as EcmwfProduct from './weatherClasses/EcmwfProduct';
|
|
45
|
-
export * as HrrrProducts from './weatherClasses/HrrrProducts';
|
|
46
|
-
export * as IconProducts from './weatherClasses/IconProducts';
|
|
47
44
|
export * as Layer from './weatherClasses/Layer';
|
|
48
45
|
export * as Metric from './weatherClasses/Metric';
|
|
49
46
|
export * as MetricClasses from './weatherClasses/MetricClasses';
|
|
50
|
-
export * as NamProducts from './weatherClasses/NamProducts';
|
|
51
47
|
export * as Overlay from './weatherClasses/Overlay';
|
|
52
48
|
export * as OverlayClasses from './weatherClasses/OverlayClasses';
|
|
53
49
|
export * as Product from './weatherClasses/Product';
|
|
54
|
-
export * as SatelliteProduct from './weatherClasses/SatelliteProduct';
|
|
55
|
-
export * as StaticProduct from './weatherClasses/StaticProduct';
|
|
56
50
|
export { default as layers } from './weather/layers';
|
|
57
51
|
export { default as legends } from './weather/legends';
|
|
58
52
|
export { default as metrics } from './weather/metrics';
|
|
@@ -68,6 +62,7 @@ export * as detectDevice from './services/detectDevice';
|
|
|
68
62
|
export * as device from './services/device';
|
|
69
63
|
export * as deviceLogging from './services/deviceLogging';
|
|
70
64
|
export * as geolocation from './services/geolocation';
|
|
65
|
+
export * as liveAlerts from './services/liveAlerts';
|
|
71
66
|
export * as notifications from './services/notifications';
|
|
72
67
|
export * as ogTags from './services/ogTags';
|
|
73
68
|
export * as params from './services/params';
|
|
@@ -91,7 +86,6 @@ export { default as plugins } from './pluginSystem/plugins';
|
|
|
91
86
|
export * as pluginsCtrl from './pluginSystem/pluginsCtrl';
|
|
92
87
|
export * as externalPlugins from './pluginSystem/externalPlugins';
|
|
93
88
|
export * as BottomSlide from './uiClasses/BottomSlide';
|
|
94
|
-
export * as ClickHandler from './uiClasses/ClickHandler';
|
|
95
89
|
export * as Drag from './uiClasses/Drag';
|
|
96
90
|
export * as Swipe from './uiClasses/Swipe';
|
|
97
91
|
export * as Window from './uiClasses/Window';
|
|
@@ -138,7 +132,7 @@ export * as nativeStorage from './capacitor/nativeStorage';
|
|
|
138
132
|
export * as pushNotifications from './capacitor/pushNotifications';
|
|
139
133
|
export * as appsFlyer from './capacitor/appsFlyer';
|
|
140
134
|
export * as showableErrorsService from './capacitor/showableErrorsService';
|
|
141
|
-
export * as seoParser from './dummyModules/seoParser';
|
|
142
135
|
import './ui/patchAndPromoCtrl';
|
|
143
136
|
import './ui/storeLastPosition';
|
|
144
137
|
import './services/customColors';
|
|
138
|
+
import './services/compatibilityCheck';
|
package/types/client/models.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Layers } from '@windy/Layer
|
|
1
|
+
import type { Layers } from '@windy/Layer';
|
|
2
2
|
import type { UsedOverlays } from '@windy/Overlay';
|
|
3
3
|
import type { LatLon } from '@windy/interfaces.d';
|
|
4
4
|
import type { Overlays, PointProducts, Products } from '@windy/rootScope.d';
|
|
@@ -15,18 +15,14 @@ export declare const layer2product: {
|
|
|
15
15
|
export declare const overlay2product: {
|
|
16
16
|
[P in LayerOrOverlay]?: Products[];
|
|
17
17
|
};
|
|
18
|
-
/**
|
|
19
|
-
* From list of products deduplicates icon/iconEu, iconWaves/iconEuWaves
|
|
20
|
-
*/
|
|
21
|
-
export declare const dedupeIcon: (productsList: Products[]) => Products[];
|
|
22
18
|
/**
|
|
23
19
|
* Return particular icon related model based on rqrd and avbl models
|
|
24
20
|
*/
|
|
25
|
-
export declare const
|
|
21
|
+
export declare const bestModelFromSameGroup: (rqrdProduct: Products, avProducts: Products[]) => Products | null;
|
|
26
22
|
/**
|
|
27
23
|
* Return idents of visible local products available in the current map boundaries (or empty array undefined)
|
|
28
24
|
*/
|
|
29
|
-
export declare const betterProducts: <T extends LatLon, PT extends boolean, R extends PT extends true ? "icon" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeFrance" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "czeAladin" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "bomAccessAd" | "bomAccessBn" | "bomAccessDn" | "bomAccessNq" | "bomAccessPh" | "bomAccessSy" | "bomAccessVt" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "gfs" | "ecmwf" | "mblue" : "icon" | "radar" | "satellite" | "radarPlus" | "capAlerts" | "topoMap" | "nems" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeFrance" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "camsEu" | "czeAladin" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "bomAccessAd" | "bomAccessBn" | "bomAccessDn" | "bomAccessNq" | "bomAccessPh" | "bomAccessSy" | "bomAccessVt" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "gfs" | "ecmwf" | "ecmwfAnalysis" | "ecmwfWaves" | "gfsWaves" | "cams" | "efi" | "cmems" | "drought" | "fireDanger" | "activeFires" | "mblue">(latLon: T, pointFcts?: PT) => R[];
|
|
25
|
+
export declare const betterProducts: <T extends LatLon, PT extends boolean, R extends PT extends true ? "icon" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeFrance" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "camsEu" | "czeAladin" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "bomAccessAd" | "bomAccessBn" | "bomAccessDn" | "bomAccessNq" | "bomAccessPh" | "bomAccessSy" | "bomAccessVt" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "gfs" | "ecmwf" | "cams" | "mblue" : "icon" | "radar" | "satellite" | "radarPlus" | "capAlerts" | "topoMap" | "nems" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeFrance" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "camsEu" | "czeAladin" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "bomAccessAd" | "bomAccessBn" | "bomAccessDn" | "bomAccessNq" | "bomAccessPh" | "bomAccessSy" | "bomAccessVt" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "gfs" | "ecmwf" | "ecmwfAnalysis" | "ecmwfWaves" | "gfsWaves" | "cams" | "efi" | "cmems" | "drought" | "fireDanger" | "activeFires" | "mblue">(latLon: T, pointFcts?: PT) => R[];
|
|
30
26
|
/**
|
|
31
27
|
* Return product string on a basis of overlay & wanted forecast model
|
|
32
28
|
*/
|
|
@@ -36,7 +32,9 @@ export declare const getProduct: (overlay: Overlays, rqrdProduct: Products) => P
|
|
|
36
32
|
*/
|
|
37
33
|
export declare const getAllPointProducts: <T extends LatLon>(latLon: T) => PointProducts[];
|
|
38
34
|
/**
|
|
39
|
-
* Returns
|
|
35
|
+
* Returns deduped AIR products for point forecast in given location
|
|
40
36
|
*/
|
|
41
|
-
export declare const getPointProducts: <T extends LatLon>(latLon: T) =>
|
|
37
|
+
export declare const getPointProducts: <T extends LatLon>(latLon: T) => PointProducts[];
|
|
38
|
+
export declare const hasMoreProducts: (ovr: Layers | UsedOverlays) => boolean;
|
|
39
|
+
export declare const getDefaultProduct: (overlay: Overlays) => Products | undefined;
|
|
42
40
|
export {};
|
|
@@ -2,14 +2,11 @@ import type { NotificationExtraPayload } from './d.ts.files/pushNotifications';
|
|
|
2
2
|
import type { HttpPayload } from './d.ts.files/http';
|
|
3
3
|
export declare const canReceiveNotifications: Promise<void>;
|
|
4
4
|
export declare function loadNotifications(): Promise<void>;
|
|
5
|
+
export declare function watchChanges(): void;
|
|
5
6
|
/**
|
|
6
7
|
* Delete all users notifications
|
|
7
8
|
*/
|
|
8
9
|
export declare function deleteAllNotifications(): Promise<void>;
|
|
9
|
-
/**
|
|
10
|
-
* Mark all users notifications as seen
|
|
11
|
-
*/
|
|
12
|
-
export declare function markAllAsSeen(): Promise<void>;
|
|
13
10
|
/**
|
|
14
11
|
* Mark notification as seen
|
|
15
12
|
*
|
|
@@ -29,4 +26,4 @@ export declare function markNotificationAsReceived(data: NotificationExtraPayloa
|
|
|
29
26
|
* @param type
|
|
30
27
|
* @param device
|
|
31
28
|
*/
|
|
32
|
-
export declare function sendTestNotification(type: NotificationExtraPayload['category'], registrationHash: string): void;
|
|
29
|
+
export declare function sendTestNotification(type: NotificationExtraPayload['category'], registrationHash: string, deviceID: string): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Overlay } from '@windy/Overlay';
|
|
2
|
-
import { AwpOverlay, CloudsOverlay, CurrentOverlay, FwiOverlay, RainPtypeOverlay, WaveOverlay } from '@windy/OverlayClasses';
|
|
2
|
+
import { AqiOverlay, AwpOverlay, CloudsOverlay, CurrentOverlay, FwiOverlay, RainPtypeOverlay, WaveOverlay } from '@windy/OverlayClasses';
|
|
3
3
|
declare const overlays: {
|
|
4
4
|
wind: Overlay<"wind", import("../weatherClasses/MetricClasses").NumberedMetric, import("../weatherClasses/Layer").Layer<import("../weatherClasses/MetricClasses").NumberedMetric>>;
|
|
5
5
|
temp: Overlay<"temp", import("../weatherClasses/MetricClasses").NumberedMetric, import("../weatherClasses/Layer").Layer<import("../weatherClasses/MetricClasses").NumberedMetric>>;
|
|
@@ -66,5 +66,6 @@ declare const overlays: {
|
|
|
66
66
|
heatmaps: Overlay<"heatmaps", undefined, undefined>;
|
|
67
67
|
topoMap: Overlay<"topoMap", undefined, import("../weatherClasses/Layer").Layer<undefined>>;
|
|
68
68
|
hurricanes: Overlay<"hurricanes", undefined, undefined>;
|
|
69
|
+
aqi: AqiOverlay<"aqi">;
|
|
69
70
|
};
|
|
70
71
|
export default overlays;
|
|
@@ -1,3 +1,55 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { Product } from '@windy/Product';
|
|
2
|
+
import { AromeProduct, AccessProduct, AccessCProduct, EcmwfForecastProduct, EcmwfProduct, SatAndRadarPlusProduct } from '@windy/ProductClasses';
|
|
3
|
+
import type { Products } from '@windy/rootScope.d';
|
|
4
|
+
type AllExportedProducts = Implements<{
|
|
5
|
+
[P in Products]: Product;
|
|
6
|
+
}, {
|
|
7
|
+
bomAccess: AccessProduct;
|
|
8
|
+
bomAccessAd: AccessCProduct;
|
|
9
|
+
bomAccessBn: AccessCProduct;
|
|
10
|
+
bomAccessDn: AccessCProduct;
|
|
11
|
+
bomAccessNq: AccessCProduct;
|
|
12
|
+
bomAccessPh: AccessCProduct;
|
|
13
|
+
bomAccessSy: AccessCProduct;
|
|
14
|
+
bomAccessVt: AccessCProduct;
|
|
15
|
+
mblue: Product;
|
|
16
|
+
ecmwf: EcmwfForecastProduct;
|
|
17
|
+
ecmwfWaves: Product;
|
|
18
|
+
ecmwfAnalysis: EcmwfProduct;
|
|
19
|
+
canHrdps: Product;
|
|
20
|
+
canRdwpsWaves: Product;
|
|
21
|
+
cams: Product;
|
|
22
|
+
camsEu: Product;
|
|
23
|
+
cmems: Product;
|
|
24
|
+
czeAladin: Product;
|
|
25
|
+
gfs: Product;
|
|
26
|
+
gfsWaves: Product;
|
|
27
|
+
icon: Product;
|
|
28
|
+
iconD2: Product;
|
|
29
|
+
iconEu: Product;
|
|
30
|
+
iconEuWaves: Product;
|
|
31
|
+
arome: Product;
|
|
32
|
+
aromeAntilles: AromeProduct;
|
|
33
|
+
aromeFrance: AromeProduct;
|
|
34
|
+
aromeReunion: AromeProduct;
|
|
35
|
+
nems: Product;
|
|
36
|
+
namAlaska: Product;
|
|
37
|
+
namConus: Product;
|
|
38
|
+
namHawaii: Product;
|
|
39
|
+
capAlerts: Product;
|
|
40
|
+
efi: Product;
|
|
41
|
+
radar: Product;
|
|
42
|
+
satellite: SatAndRadarPlusProduct;
|
|
43
|
+
radarPlus: SatAndRadarPlusProduct;
|
|
44
|
+
hrrrAlaska: Product;
|
|
45
|
+
hrrrConus: Product;
|
|
46
|
+
ukv: Product;
|
|
47
|
+
drought: Product;
|
|
48
|
+
fireDanger: Product;
|
|
49
|
+
activeFires: Product;
|
|
50
|
+
jmaMsm: Product;
|
|
51
|
+
jmaCwmWaves: Product;
|
|
52
|
+
topoMap: Product;
|
|
53
|
+
}>;
|
|
54
|
+
declare const products: AllExportedProducts;
|
|
3
55
|
export default products;
|
package/types/client/promo.d.ts
CHANGED
|
@@ -1,21 +1,44 @@
|
|
|
1
|
-
import type { Timestamp } from '@windy/types';
|
|
1
|
+
import type { ISODateString, Timestamp, TimeRangeMs } from '@windy/types';
|
|
2
|
+
type PromoUniqueId = string;
|
|
2
3
|
export interface PromoInfoObject {
|
|
3
|
-
id:
|
|
4
|
+
id: PromoUniqueId;
|
|
4
5
|
displayed: number;
|
|
5
6
|
ts: Timestamp;
|
|
6
7
|
}
|
|
7
8
|
/**
|
|
8
9
|
* Get basic info about promo for given ident
|
|
9
10
|
*/
|
|
10
|
-
export declare const getCounter: (id:
|
|
11
|
+
export declare const getCounter: (id: PromoUniqueId) => Promise<PromoInfoObject>;
|
|
11
12
|
/**
|
|
12
13
|
* Increases 'seen' counter for particular promo
|
|
13
14
|
*/
|
|
14
|
-
export declare const hitCounter: (id:
|
|
15
|
+
export declare const hitCounter: (id: PromoUniqueId, logEvent?: boolean) => Promise<void>;
|
|
15
16
|
/**
|
|
16
17
|
* Flag the promo to be never seen again (by setting
|
|
17
18
|
* its number to 1000)
|
|
18
19
|
*
|
|
19
20
|
* @param ident Ident
|
|
20
21
|
*/
|
|
21
|
-
export declare const neverSee: (ident:
|
|
22
|
+
export declare const neverSee: (ident: PromoUniqueId) => void;
|
|
23
|
+
/**
|
|
24
|
+
* Determines if promo should be displayed or not
|
|
25
|
+
*/
|
|
26
|
+
export declare const shouldDisplayPromo: ({ id, end, counter, delay, }: {
|
|
27
|
+
/**
|
|
28
|
+
* Main ID of the promo. This key is also used in `promo` object in localStorage
|
|
29
|
+
*/
|
|
30
|
+
id: PromoUniqueId;
|
|
31
|
+
/**
|
|
32
|
+
* ISO date, when the promo expires
|
|
33
|
+
*/
|
|
34
|
+
end?: ISODateString;
|
|
35
|
+
/**
|
|
36
|
+
* How many times display promo to the user (respective on one device)
|
|
37
|
+
*/
|
|
38
|
+
counter: number;
|
|
39
|
+
/**
|
|
40
|
+
* How often to display promo on particular device (in ms)
|
|
41
|
+
*/
|
|
42
|
+
delay: TimeRangeMs;
|
|
43
|
+
}) => Promise<boolean>;
|
|
44
|
+
export {};
|
|
@@ -5,9 +5,15 @@ export interface NotificationExtraPayload extends LatLon {
|
|
|
5
5
|
id: string | undefined;
|
|
6
6
|
hrTimestamps: string;
|
|
7
7
|
icao?: string;
|
|
8
|
-
category: 'alert' | 'metar';
|
|
8
|
+
category: 'alert' | 'metar' | 'location';
|
|
9
9
|
notificationId?: string;
|
|
10
10
|
locationEntityId?: string;
|
|
11
11
|
}
|
|
12
12
|
export type RegistrationHash = string;
|
|
13
|
+
/**
|
|
14
|
+
* Ask for notif permissions if missing
|
|
15
|
+
*
|
|
16
|
+
* @returns null | registration Hash
|
|
17
|
+
*/
|
|
18
|
+
export declare function requestPermissions(): Promise<RegistrationHash | null>;
|
|
13
19
|
export declare function registerDevice(): Promise<RegistrationHash | null>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DataTile } from '@windy/dataLoader';
|
|
2
|
-
import type { TileParams } from '@windy/Renderer
|
|
2
|
+
import type { TileParams } from '@windy/Renderer';
|
|
3
3
|
import type { TileLayerCanvas } from '@windy/TileLayerCanvas.d';
|
|
4
4
|
declare const renderNoDataTile: (canvas: HTMLCanvasElement, url?: string) => void;
|
|
5
|
-
declare const renderTile: (this: TileLayerCanvas,
|
|
5
|
+
declare const renderTile: (this: TileLayerCanvas, _step: 1 | 2, canvas: HTMLCanvasElement, rqrdSyncNum: number, tInfo: TileParams, dTile: DataTile) => void;
|
|
6
6
|
export { renderNoDataTile, renderTile };
|
|
@@ -1,31 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Shared rendering utilities (and also event
|
|
2
|
+
* Shared rendering utilities (and also event emitter for rendering purposes)
|
|
3
3
|
*/
|
|
4
|
-
import { Evented } from '@windy/Evented';
|
|
5
4
|
import type { Color } from '@windy/Color';
|
|
6
|
-
import type { Layer } from '@windy/Layer';
|
|
7
|
-
import type { FullRenderParameters } from '@windy/Layer.d';
|
|
8
5
|
import type { DataQuality } from '@windy/Product';
|
|
9
|
-
import type { TileParams } from '@windy/Renderer
|
|
10
|
-
import type { TilePoint } from '@windy/interfaces.d';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
glParticlesFailed: [];
|
|
14
|
-
toggleSeaMask: [boolean];
|
|
15
|
-
toggleLandMask: [boolean];
|
|
16
|
-
}
|
|
17
|
-
export declare const emitter: Evented<Events>;
|
|
6
|
+
import type { TileParams } from '@windy/Renderer';
|
|
7
|
+
import type { TilePoint, FullRenderParameters, WeatherParameters } from '@windy/interfaces.d';
|
|
8
|
+
import type { Timestamp } from '@windy/types';
|
|
9
|
+
import type { Layers } from '@windy/Layer';
|
|
18
10
|
/**
|
|
19
11
|
* Zoom2zoom transformation table
|
|
20
12
|
*
|
|
21
|
-
* Maximal
|
|
13
|
+
* Maximal zoom levels:
|
|
22
14
|
*
|
|
23
15
|
* GFS 0, 1, 2
|
|
24
16
|
* ECMWF 0, 1, 2, 3
|
|
25
|
-
* NAM/
|
|
17
|
+
* NAM/MB EUROPE 0, 1, 2, 3, 4, 5
|
|
26
18
|
*
|
|
27
19
|
* WARNING: Minimal dataZoom for map zooms 10,11 is 3 since
|
|
28
|
-
* maximal amount of data -> pixel
|
|
20
|
+
* maximal amount of data -> pixel transition ratio is 256 !!!
|
|
29
21
|
*
|
|
30
22
|
* NOTE: particles don't work for zoom 0 on -180/180 border ("low" map zooms 3 & 4 changed to data zoom 1)
|
|
31
23
|
*/
|
|
@@ -35,7 +27,7 @@ export declare const zoom2zoom: Record<DataQuality, number[]>;
|
|
|
35
27
|
*/
|
|
36
28
|
export declare const tileW: (zoom: number) => number;
|
|
37
29
|
/**
|
|
38
|
-
*
|
|
30
|
+
* Return transformation ratio based on map zoom and data zoom
|
|
39
31
|
*/
|
|
40
32
|
export declare const getTrans: (mapZoom: number, dZoom: number) => number;
|
|
41
33
|
/**
|
|
@@ -50,7 +42,7 @@ export declare const getDataZoom: (params: FullRenderParameters, tileZoom: numbe
|
|
|
50
42
|
export declare const whichTile: (tilePoint: TilePoint, params: FullRenderParameters) => TileParams | null;
|
|
51
43
|
/**
|
|
52
44
|
* Test that values in blue channel are bigger than X,
|
|
53
|
-
* which means
|
|
45
|
+
* which means transparency for this point in JPG data tile
|
|
54
46
|
*/
|
|
55
47
|
export declare const testJPGtransparency: (source: Uint8ClampedArray, sourceIndex: number) => boolean;
|
|
56
48
|
/**
|
|
@@ -80,28 +72,16 @@ export declare const getWTable: (trans: number) => Uint16Array | null;
|
|
|
80
72
|
export type ColorizingFun = (x: number, y: number, scalar: number) => void;
|
|
81
73
|
/**
|
|
82
74
|
* Create function for colorizing x,y, point in step x step area
|
|
83
|
-
*
|
|
75
|
+
* Allowed values of step are 1,2
|
|
84
76
|
* Colorizes only for 256x256 tiles
|
|
85
77
|
*/
|
|
86
78
|
export declare const createFillFun: (dest: Uint8ClampedArray, step: 1 | 2, col: Color) => ColorizingFun;
|
|
87
|
-
export type CombinedColorizingFun = (x: number, y: number, value1: number, value2: number) => void;
|
|
88
79
|
/**
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
* Amount can be 0..4
|
|
92
|
-
*
|
|
93
|
-
* [1,2]
|
|
94
|
-
* [3,4]
|
|
95
|
-
*/
|
|
96
|
-
export declare const createCombinedFillFun: (dest: Uint8ClampedArray, c1: Color, c2: Color, amountFun: Layer['getAmountByColor']) => CombinedColorizingFun;
|
|
97
|
-
/**
|
|
98
|
-
* Reusable 256x256 image data object
|
|
99
|
-
* WARNING: Watch concurency,only one task can use this
|
|
80
|
+
* Interpolates to nearest discreet value either by using interpolation table
|
|
81
|
+
* or a,b,c,d coefficients
|
|
100
82
|
*/
|
|
101
|
-
export declare const
|
|
83
|
+
export declare const interpolateNearest: (w: number[] | null, wIndex: number, G00: number, G01: number, G10: number, G11: number, a: number, b: number, c: number, d: number) => number;
|
|
102
84
|
/**
|
|
103
|
-
*
|
|
104
|
-
* or a,b,c,d coefs
|
|
85
|
+
* Creates RenderingParameters
|
|
105
86
|
*/
|
|
106
|
-
export declare const
|
|
107
|
-
export {};
|
|
87
|
+
export declare const createFullRenderingParams: (layerIdent: Layers, weatherParams: WeatherParameters, timestamp: Timestamp) => Promise<FullRenderParameters>;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { Renderer } from '@windy/Renderer';
|
|
2
|
-
import { TopoMap } from '@windy/TopoMap';
|
|
3
2
|
import { TileLayer } from '@windy/TileLayer';
|
|
3
|
+
import { TopoMap } from '@windy/TopoMap';
|
|
4
4
|
declare const renderers: {
|
|
5
5
|
/**
|
|
6
6
|
* All layers should be now supported by gl-tiles-render
|
|
7
|
-
* Original tileLayer and patternator rendering ('legacy-tile-render')
|
|
8
|
-
* is used as backup (or when "Compatibility mode" is active)
|
|
9
7
|
*/
|
|
10
8
|
tileLayer: TileLayer;
|
|
11
9
|
noUserControl: TileLayer;
|
|
@@ -14,7 +12,7 @@ declare const renderers: {
|
|
|
14
12
|
radarPlus: Renderer<"radar-plus", any>;
|
|
15
13
|
capAlerts: Renderer<"cap-alerts", typeof import("../pluginSystem/SveltePlugin").SvelteApp & typeof import("../../plugins/cap-alerts/cap-alerts")>;
|
|
16
14
|
isolines: Renderer<"isolines", typeof import("../../plugins/isolines/isolines")>;
|
|
17
|
-
particles: Renderer<"gl-particles", typeof import("../../plugins/gl-particles/gl-particles")
|
|
15
|
+
particles: Renderer<"gl-particles", typeof import("../../plugins/gl-particles/gl-particles")>;
|
|
18
16
|
/** Extreme forecast and intersucho layers */
|
|
19
17
|
daySwitcher: TileLayer;
|
|
20
18
|
accumulations: TileLayer;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { ReverseResult } from '@windy/dataSpecifications.d';
|
|
2
2
|
import type { LatLon } from '@windy/interfaces.d';
|
|
3
|
+
import type { ISOCountryCode } from '@windy/types';
|
|
3
4
|
export interface ReverseHttpPayload<IncludeIds extends boolean = false> {
|
|
4
5
|
city?: string;
|
|
5
6
|
country?: string;
|
|
6
|
-
country_code?:
|
|
7
|
+
country_code?: ISOCountryCode;
|
|
7
8
|
county?: string;
|
|
8
9
|
district?: string;
|
|
9
10
|
locality?: string;
|