@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.
Files changed (69) hide show
  1. package/README.md +1 -0
  2. package/package.json +1 -1
  3. package/types/client/BottomSlide.d.ts +3 -0
  4. package/types/client/Color.d.ts +1 -1
  5. package/types/client/EcmwfProduct.d.ts +0 -22
  6. package/types/client/ExternalSveltePlugin.d.ts +6 -1
  7. package/types/client/IDB.d.ts +7 -1
  8. package/types/client/Metric.d.ts +5 -1
  9. package/types/client/Overlay.d.ts +1 -1
  10. package/types/client/Plugin.d.ts +4 -0
  11. package/types/client/Product.d.ts +2 -10
  12. package/types/client/RadarPlusProduct.d.ts +1 -1
  13. package/types/client/SatelliteProduct.d.ts +1 -1
  14. package/types/client/SveltePlugin.d.ts +7 -0
  15. package/types/client/WindowPlugin.d.ts +3 -2
  16. package/types/client/appsFlyer.d.ts +1 -2
  17. package/types/client/compatibilityCheck.d.ts +1 -0
  18. package/types/client/connection.d.ts +1 -1
  19. package/types/client/d.ts.files/Color.d.ts +1 -0
  20. package/types/client/d.ts.files/LabelsLayer.d.ts +2 -2
  21. package/types/client/d.ts.files/alerts.d.ts +1 -2
  22. package/types/client/d.ts.files/broadcast.d.ts +16 -11
  23. package/types/client/d.ts.files/dataSpecifications.d.ts +46 -21
  24. package/types/client/d.ts.files/favs.d.ts +19 -20
  25. package/types/client/d.ts.files/lib.d.ts +5 -7
  26. package/types/client/d.ts.files/plugin-params.d.ts +19 -11
  27. package/types/client/d.ts.files/plugins.d.ts +2 -1
  28. package/types/client/d.ts.files/products.d.ts +1 -2
  29. package/types/client/d.ts.files/rootScope.d.ts +12 -12
  30. package/types/client/d.ts.files/startup.d.ts +17 -11
  31. package/types/client/d.ts.files/user.d.ts +3 -0
  32. package/types/client/detectDevice.d.ts +0 -3
  33. package/types/client/device.d.ts +1 -0
  34. package/types/client/embed.d.ts +70 -0
  35. package/types/client/errorLogger.d.ts +28 -3
  36. package/types/client/errors.d.ts +6 -0
  37. package/types/client/fetch.d.ts +15 -3
  38. package/types/client/format.d.ts +1 -1
  39. package/types/client/http.d.ts +0 -6
  40. package/types/client/idbInstances.d.ts +21 -30
  41. package/types/client/imaker.d.ts +112 -0
  42. package/types/client/imakerMain.d.ts +49 -0
  43. package/types/client/latestBroadcasts.d.ts +1 -1
  44. package/types/client/lib.d.ts +1 -3
  45. package/types/client/libHtml.d.ts +1 -1
  46. package/types/client/liveAlerts.d.ts +5 -0
  47. package/types/client/liveAlerts.types.d.ts +28 -0
  48. package/types/client/location.d.ts +5 -0
  49. package/types/client/log.d.ts +3 -1
  50. package/types/client/mobile.d.ts +3 -2
  51. package/types/client/models.d.ts +7 -5
  52. package/types/client/notifications.d.ts +2 -5
  53. package/types/client/plugins.d.ts +4 -0
  54. package/types/client/promo.d.ts +1 -1
  55. package/types/client/pushNotifications.d.ts +1 -13
  56. package/types/client/rootScope.d.ts +9 -1
  57. package/types/client/router.d.ts +9 -33
  58. package/types/client/seoParser.d.ts +0 -35
  59. package/types/client/showableErrorsService.d.ts +6 -10
  60. package/types/client/storeLastPosition.d.ts +4 -1
  61. package/types/client/user.d.ts +2 -0
  62. package/types/client/userFavs.d.ts +10 -11
  63. package/types/client/utils.d.ts +40 -4
  64. package/types/iconfont.d.ts +7 -0
  65. package/types/interfaces.d.ts +150 -73
  66. package/types/lang-files.d.ts +625 -1
  67. package/types/types.d.ts +56 -17
  68. package/types/client/d.ts.files/errorLogger.d.ts +0 -35
  69. /package/types/client/d.ts.files/{Webcams.d.ts → webcams.d.ts} +0 -0
@@ -12,7 +12,6 @@ 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
15
  export * as EcmwfProduct from '../weatherClasses/EcmwfProduct';
17
16
  export * as HrrrProducts from '../weatherClasses/HrrrProducts';
18
17
  export * as IconProducts from '../weatherClasses/IconProducts';
@@ -85,8 +84,7 @@ export * as mapGlobeCtrl from '../map/mapGlobeCtrl';
85
84
  export * as picker from '../map/picker';
86
85
  export * as singleclick from '../map/singleclick';
87
86
  export * as log from '../dummyModules/log';
88
- export { default as promo } from '../dummyModules/promo';
89
- export { default as seoParser } from '../dummyModules/seoParser';
87
+ export * as promo from '../dummyModules/promo';
90
88
  export * as location from '../dummyModules/location';
91
89
  export * as router from '../dummyModules/router';
92
90
  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--variant-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--variant-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--variant-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=__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";
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
  */
@@ -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;
@@ -36,11 +36,11 @@ 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
44
  export * as EcmwfProduct from './weatherClasses/EcmwfProduct';
45
45
  export * as HrrrProducts from './weatherClasses/HrrrProducts';
46
46
  export * as IconProducts from './weatherClasses/IconProducts';
@@ -68,6 +68,7 @@ export * as detectDevice from './services/detectDevice';
68
68
  export * as device from './services/device';
69
69
  export * as deviceLogging from './services/deviceLogging';
70
70
  export * as geolocation from './services/geolocation';
71
+ export * as liveAlerts from './services/liveAlerts';
71
72
  export * as notifications from './services/notifications';
72
73
  export * as ogTags from './services/ogTags';
73
74
  export * as params from './services/params';
@@ -138,7 +139,7 @@ export * as nativeStorage from './capacitor/nativeStorage';
138
139
  export * as pushNotifications from './capacitor/pushNotifications';
139
140
  export * as appsFlyer from './capacitor/appsFlyer';
140
141
  export * as showableErrorsService from './capacitor/showableErrorsService';
141
- export * as seoParser from './dummyModules/seoParser';
142
142
  import './ui/patchAndPromoCtrl';
143
143
  import './ui/storeLastPosition';
144
144
  import './services/customColors';
145
+ import './services/compatibilityCheck';
@@ -18,15 +18,15 @@ export declare const overlay2product: {
18
18
  /**
19
19
  * From list of products deduplicates icon/iconEu, iconWaves/iconEuWaves
20
20
  */
21
- export declare const dedupeIcon: (productsList: Products[]) => Products[];
21
+ export declare const removeModelsFromSameGroup: (productsList: Products[]) => Products[];
22
22
  /**
23
23
  * Return particular icon related model based on rqrd and avbl models
24
24
  */
25
- export declare const getIconModel: (rqrdProduct: Products, avProducts: Products[]) => Products | null;
25
+ export declare const bestModelFromSameGroup: (rqrdProduct: Products, avProducts: Products[]) => Products | null;
26
26
  /**
27
27
  * Return idents of visible local products available in the current map boundaries (or empty array undefined)
28
28
  */
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[];
29
+ export declare const betterProducts: <T extends LatLon, PT extends boolean, R extends PT extends true ? "gfs" | "ecmwf" | "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" | "mblue" : "drought" | "radar" | "satellite" | "radarPlus" | "capAlerts" | "topoMap" | "gfs" | "ecmwf" | "ecmwfAnalysis" | "ecmwfWaves" | "gfsWaves" | "icon" | "cams" | "efi" | "cmems" | "fireDanger" | "activeFires" | "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" | "mblue">(latLon: T, pointFcts?: PT) => R[];
30
30
  /**
31
31
  * Return product string on a basis of overlay & wanted forecast model
32
32
  */
@@ -36,7 +36,9 @@ export declare const getProduct: (overlay: Overlays, rqrdProduct: Products) => P
36
36
  */
37
37
  export declare const getAllPointProducts: <T extends LatLon>(latLon: T) => PointProducts[];
38
38
  /**
39
- * Returns dedupped AIR products for point forecast in given location
39
+ * Returns deduped AIR products for point forecast in given location
40
40
  */
41
- export declare const getPointProducts: <T extends LatLon>(latLon: T) => Products[];
41
+ export declare const getPointProducts: <T extends LatLon>(latLon: T) => PointProducts[];
42
+ export declare const hasMoreProducts: (ovr: Layers | UsedOverlays) => boolean;
43
+ export declare const getDefaultProduct: (overlay: Overlays) => Products | undefined;
42
44
  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,3 +1,7 @@
1
1
  import type { Plugins } from './d.ts.files/plugins.d';
2
2
  declare const plugins: Plugins;
3
+ /**
4
+ * Promise resolves once installed external plugins have loaded into default export
5
+ */
6
+ export declare const externalPluginsLoaded: Promise<void>;
3
7
  export default plugins;
@@ -11,7 +11,7 @@ export declare const getCounter: (id: string) => Promise<PromoInfoObject>;
11
11
  /**
12
12
  * Increases 'seen' counter for particular promo
13
13
  */
14
- export declare const hitCounter: (id: string) => Promise<void>;
14
+ export declare const hitCounter: (id: string, logEvent?: boolean) => Promise<void>;
15
15
  /**
16
16
  * Flag the promo to be never seen again (by setting
17
17
  * its number to 1000)
@@ -1,13 +1 @@
1
- import type { LatLon } from '@windy/interfaces.d';
2
- export interface NotificationExtraPayload extends LatLon {
3
- /** Identifier of the process in node-notif */
4
- processId: string;
5
- id: string | undefined;
6
- hrTimestamps: string;
7
- icao?: string;
8
- category: 'alert' | 'metar';
9
- notificationId?: string;
10
- locationEntityId?: string;
11
- }
12
- export type RegistrationHash = string;
13
- export declare function registerDevice(): Promise<RegistrationHash | null>;
1
+ export declare const registerDevice: () => Promise<null>;
@@ -9,7 +9,7 @@ export declare const version: string;
9
9
  * Target
10
10
  * @ignore
11
11
  */
12
- export declare const target: "mobile" | "index" | "lib" | "embed2";
12
+ export declare const target: "lib" | "embed" | "mobile" | "index" | "imaker";
13
13
  /**
14
14
  * Platform
15
15
  * @ignore
@@ -114,10 +114,18 @@ export declare const isMobile: boolean;
114
114
  * Indicates that browsing device is tablet
115
115
  */
116
116
  export declare const isTablet: boolean;
117
+ /**
118
+ * Indicates that that browsing device is desktop
119
+ */
120
+ export declare const isDesktop: boolean;
117
121
  /**
118
122
  * Indicates that browsing device is mobile or tablet
119
123
  */
120
124
  export declare const isMobileOrTablet: boolean;
125
+ /**
126
+ * Indicates that browsing device is tablet or desktop
127
+ */
128
+ export declare const isDesktopOrTablet: boolean;
121
129
  /**
122
130
  * Indicates that browsing device has retina display
123
131
  * @ignore
@@ -1,34 +1,10 @@
1
- import { type ParsedQueryString } from '../utils/queryString';
2
- import type { PluginIdent } from '@windy/Plugin';
3
- import type { Coords, PickerCoords } from '@windy/interfaces.d';
4
- import type { Overlays, Products } from '@windy/rootScope.d';
5
- import type { ExternalPluginIdent } from '@windy/types';
6
- export type ParsedStartupValues = {
7
- sharedCoords: Coords | null;
8
- pickerCoords: PickerCoords | null;
9
- overlay: Overlays | null;
10
- product: Products | null;
1
+ export declare const sharedCoords: {
2
+ lat: string;
3
+ lon: string;
4
+ zoom: string | number;
11
5
  };
12
- /**
13
- * Parse URL to plugin and its parameters (if any)
14
- *
15
- * @returns true if some of the plugins was matched, false otherwise
16
- */
17
- export declare function resolveRoute(purl: string, source: 'url' | 'back-button', parsedQs?: ParsedQueryString): ExternalPluginIdent | PluginIdent | void;
18
- /**
19
- * Parse search part of the URL
20
- * eg: https://www.windy.com/?overlay,level,lat,lon,zoom,marker
21
- * lat,lon,zoom are obligatory and must go always together
22
- * All other params are optional and can be in any order
23
- * WARNING: This method has thousands of side effects!!
24
- *
25
- * @param searchQuery Search part of the URL, eg: lat,lon,zoom,marker
26
- * @returns Coordinates from the URL (if any) and coordinates of the picker (if any)
27
- */
28
- export declare function parseSearch(searchQuery: string | undefined): ParsedStartupValues | undefined;
29
- /**
30
- * Parsed items from URL
31
- */
32
- export declare const sharedCoords: Coords;
33
- export declare const parsedOverlay: "visibility" | "radar" | "satellite" | "radarPlus" | "wind" | "gust" | "gustAccu" | "turbulence" | "icing" | "rain" | "rainAccu" | "snowAccu" | "snowcover" | "ptype" | "thunder" | "temp" | "dewpoint" | "rh" | "deg0" | "wetbulbtemp" | "solarpower" | "uvindex" | "clouds" | "hclouds" | "mclouds" | "lclouds" | "fog" | "cloudtop" | "cbase" | "cape" | "ccl" | "waves" | "swell1" | "swell2" | "swell3" | "wwaves" | "sst" | "currents" | "currentsTide" | "no2" | "pm2p5" | "aod550" | "gtco3" | "tcso2" | "go3" | "cosc" | "dustsm" | "pressure" | "efiTemp" | "efiWind" | "efiRain" | "capAlerts" | "soilMoisture40" | "soilMoisture100" | "moistureAnom40" | "moistureAnom100" | "drought40" | "drought100" | "fwi" | "dfm10h" | "heatmaps" | "topoMap" | "hurricanes";
34
- export declare const parsedProduct: "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";
6
+ export declare const url: () => void;
7
+ export declare const resolveRoute: () => any;
8
+ export declare const parseSearch: () => any;
9
+ export declare const parsedOverlay = "wind";
10
+ export declare const parsedProduct: any;
@@ -1,40 +1,5 @@
1
- /**
2
- * # seoParser
3
- *
4
- * The main purpose of this module is to parse the SEO related part of URL.
5
- *
6
- * Examples of SEO URLs:
7
- *
8
- * ## https://www.windy.com/cs/... (case [1])
9
- * SEO language, used in @module trans Must be followed by string
10
- *
11
- * ## https://www.windy.com/-Name-Whatever-overlay (case [2])
12
- * SEO Name of Overlay
13
- *
14
- * ## https://www.windy.com/-Name-Whatever/... (case [3])
15
- * SEO NAME of plugin name, followed by any other string
16
- *
17
- * Remember that numbers are not allowed at the beginning of the URL, to distinguish
18
- * any URL from detail.
19
- *
20
- * @module seoParser
21
- */
22
1
  declare const _default: {
23
- /**
24
- * Language parsed from startupUrl, null if cannot be parsed
25
- */
26
- lang: string;
27
- /**
28
- * Path part of the startup URL without SEO parts
29
- */
30
2
  purl: string;
31
- /**
32
- * Path part of the initial URL when client was open
33
- */
34
3
  startupUrl: string;
35
- /**
36
- * Overlay parsed from startupUrl, null if cannot be parsed
37
- */
38
- overlay: string;
39
4
  };
40
5
  export default _default;
@@ -1,31 +1,27 @@
1
1
  import type { ErrorCategory, ShowableError } from '@windy/types.d';
2
- /**
3
- * Add showableError to local storage
4
- * @param error
5
- */
6
- export declare const add: (error: ShowableError) => void;
2
+ export declare const add: (_error: ShowableError) => void;
7
3
  /**
8
4
  * Sets showableError to not be displayed anymore
9
5
  * @param errorId
10
6
  */
11
- export declare const close: (errorId: string) => void;
7
+ export declare const close: (_errorId: string) => void;
12
8
  /**
13
9
  * It return array unresolvedErrors with removed showableError
14
10
  * @param errorId
15
11
  */
16
- export declare const resolve: (errorId: string) => void;
12
+ export declare const resolve: (_errorId: string) => void;
17
13
  /**
18
14
  * It resolve whole category of errors from unresolvedErrors
19
15
  * @param category
20
16
  */
21
- export declare const resolveCategory: (category: ErrorCategory) => void;
17
+ export declare const resolveCategory: (_category: ErrorCategory) => void;
22
18
  /**
23
19
  * Returns unresolved errors
24
20
  * @returns ShowableError[]
25
21
  */
26
- export declare const getUnresolvedErrors: () => ShowableError[];
22
+ export declare const getUnresolvedErrors: () => any[];
27
23
  /**
28
24
  * Control if error was resolved, based on category of the error
29
25
  * @param error
30
26
  */
31
- export declare function checkError(error: ShowableError): void;
27
+ export declare function checkError(_error: ShowableError): void;
@@ -1 +1,4 @@
1
- export {};
1
+ /**
2
+ * Stores timezone offset for node-notif to know when to send notifications.
3
+ */
4
+ export declare const storeLastTimezoneOffset: () => void;
@@ -9,6 +9,7 @@
9
9
  *
10
10
  * @module user
11
11
  */
12
+ import '@windy/liveAlerts';
12
13
  import type { HttpPayload } from './d.ts.files/http.d';
13
14
  import type { AccountLoginResponse, UserInfo, User, LoginAndFinishAction } from './d.ts.files/user.d';
14
15
  /**
@@ -16,6 +17,7 @@ import type { AccountLoginResponse, UserInfo, User, LoginAndFinishAction } from
16
17
  */
17
18
  export declare const isLoggedIn: () => boolean;
18
19
  export declare const getInfo: () => User | null;
20
+ export declare const emptyAvatar = "<!-- @echo IMG_ABSOLUTE_PATH -->/avatar.jpg";
19
21
  /**
20
22
  * Safe way how to retrieve use avatar
21
23
  * @returns link to user avatar or default avatar
@@ -1,30 +1,29 @@
1
- import type { FavFragment, Fav, FavId } from '@windy/favs.d';
2
- import type { Timestamp } from '@windy/types.d';
1
+ import type { Fav, FavId } from '@windy/favs';
3
2
  export declare const emitChange: () => void;
4
3
  /**
5
4
  * Adds a fav to the db
6
5
  */
7
- export declare const add: (item: FavFragment) => Promise<FavId | null>;
6
+ export declare const add: () => Promise<FavId | null>;
8
7
  /**
9
8
  * Update Fav in the db
10
9
  */
11
- export declare const update: (id: FavId, properties2update: Partial<Fav>) => Promise<FavId | null>;
10
+ export declare const update: () => Promise<FavId | null>;
12
11
  /**
13
12
  * Remove fav from db
14
13
  */
15
- export declare const remove: (id: FavId) => Promise<void>;
14
+ export declare const remove: () => Promise<void>;
16
15
  /**
17
16
  * Toggle pinning fav to top or to homepage
18
17
  */
19
- export declare const togglePin: (id: FavId, whereToPin: 'pin2top' | 'pin2homepage', forcedTimestamp?: Timestamp) => Promise<void>;
18
+ export declare const togglePin: () => Promise<void>;
20
19
  /**
21
20
  * Find all favs that match given criteria
22
21
  */
23
- export declare const find: (query: Partial<Fav> | ((f: Fav) => boolean)) => Promise<Fav[]>;
22
+ export declare const find: () => Promise<Fav[]>;
24
23
  /**
25
24
  * Same as find but always returns only the first match
26
25
  */
27
- export declare const findOne: (query: Partial<Fav> | ((f: Fav) => boolean)) => Promise<Fav | undefined>;
26
+ export declare const findOne: () => Promise<Fav | undefined>;
28
27
  /**
29
28
  * Returns all favs as array
30
29
  */
@@ -32,15 +31,15 @@ export declare const getAll: () => Promise<Fav[]>;
32
31
  /**
33
32
  * Quick check if fav with given ids exists
34
33
  */
35
- export declare const isFav: (query: Partial<FavFragment>) => Promise<boolean>;
34
+ export declare const isFav: () => Promise<boolean>;
36
35
  /**
37
36
  * Toggles fav (adds or removes) from db
38
37
  */
39
- export declare const toggle: (query: Partial<FavFragment>, item: FavFragment) => Promise<boolean>;
38
+ export declare const toggle: () => Promise<boolean>;
40
39
  /**
41
40
  * Checks if fav exists
42
41
  */
43
- export declare const hasKey: (key: FavId) => Promise<boolean>;
42
+ export declare const hasKey: () => Promise<boolean>;
44
43
  /**
45
44
  * Removes all favs from the device TODO: Call after logging out
46
45
  */
@@ -1,10 +1,10 @@
1
+ import { HttpError } from './errors';
1
2
  import type { RegistrationError } from '@capacitor/push-notifications';
2
3
  import type { RGBA } from '@windy/Color.d';
3
- import type { HttpError } from '@windy/http';
4
4
  import type { QueryStringSource } from '@windy/http.d';
5
5
  import type { LatLon, LinearScale, TilePoint } from '@windy/interfaces.d';
6
6
  import type { RGBNumValues } from '@windy/interpolatorTypes';
7
- import type { ExtendedStationType, HTMLString, NumOrNull, Timestamp } from '@windy/types.d';
7
+ import type { ExtendedStationType, HTMLString, NumOrNull, Timestamp, ParsedQueryString } from '@windy/types.d';
8
8
  /**
9
9
  * One minute in ms.
10
10
  *
@@ -128,7 +128,11 @@ export declare const radToDeg = 57.2957795;
128
128
  */
129
129
  export declare const debounce: <Args extends unknown[], F extends (...args: Args) => void>(func: (this: ThisParameterType<F>, ...args: Args & Parameters<F>) => void, waitTill: number, immediate?: boolean) => (this: ThisParameterType<F>, ...args: Args & Parameters<F>) => void;
130
130
  /**
131
- * Retun throttling function
131
+ * Returns a throttled variant of the input function, using a timer to limit calls of the input function.
132
+ * If the throttled function is called and the timer is not running, the input function is executed immediatelly and a timer is started.
133
+ * If the throttled function is called again before the timer runs out, the input function is not executed, but the call arguments are stored
134
+ * and the input function is called once the timer runs out.
135
+ * If the throttled function is called multiple times while the timer is running, only the latest call arguments are used once the timer runs out.
132
136
  *
133
137
  * @param this NOT USED, it is only TS explicit this annotation build-time parameter. Consider it as the first parameter would not exist.
134
138
  * @param fn Function to throttle
@@ -167,7 +171,10 @@ export interface WindObject extends DirObject {
167
171
  * @param v Vector [u,v]
168
172
  * @returns Object { wind, dir }
169
173
  */
170
- export declare const wind2obj: ([u, v]: [number, number] | RGBNumValues) => WindObject;
174
+ export declare const wind2obj: ([u, v]: [
175
+ number,
176
+ number
177
+ ] | RGBNumValues) => WindObject;
171
178
  export interface WaveObject extends DirObject {
172
179
  period: number;
173
180
  size: number;
@@ -213,6 +220,7 @@ export declare const isNear: <T extends LatLon, F extends LatLon>(a: T, b: F) =>
213
220
  * @returns Bounded number
214
221
  */
215
222
  export declare const bound: (num: number, min: number, max: number) => number;
223
+ export declare const clamp: (num: number, min: number, max: number) => number;
216
224
  /**
217
225
  * Smoothstep https://en.wikipedia.org/wiki/Smoothstep
218
226
  *
@@ -458,3 +466,31 @@ export declare const removeDiacritics: (s: string) => string;
458
466
  * This differs from the CSS property which capitalizes the first letter of each word.
459
467
  */
460
468
  export declare const capitalize: (text: string) => string;
469
+ export declare const parseQueryString: (searchQuery: string | undefined) => ParsedQueryString | undefined;
470
+ export declare const seoLangRegex: RegExp;
471
+ /**
472
+ * Examples of SEO URLs:
473
+ *
474
+ * ## https://www.windy.com/cs/... (case [1])
475
+ * SEO language, used in @module trans Must be followed by string
476
+ *
477
+ * ## https://www.windy.com/-Name-Whatever-overlay (case [2])
478
+ * SEO Name of Overlay
479
+ *
480
+ * ## https://www.windy.com/-Name-Whatever/... (case [3])
481
+ * SEO NAME of plugin name, followed by any other string
482
+ *
483
+ * Remember that numbers are not allowed at the beginning of the URL, to distinguish
484
+ * any URL from detail.
485
+ *
486
+ */
487
+ export declare const parseSeoUrl: (url: string) => {
488
+ purl: string;
489
+ overlay: string;
490
+ };
491
+ /**
492
+ * Safely URL decoded startup pathname
493
+ */
494
+ export declare const startupPath: any;
495
+ export declare const generateUuidV4: () => string;
496
+ export declare const getErrorMessage: (error: unknown) => string;
@@ -1,6 +1,8 @@
1
1
  // !!! Automatically generated file by make/iconfont.ts !!!
2
2
 
3
3
  export type Iconfont =
4
+ | '<!-- @echo icon-pictures -->'
5
+ | '<!-- @echo icon-comment-o -->'
4
6
  | '<!-- @echo icon-upload -->'
5
7
  | '<!-- @echo icon-long-tap -->'
6
8
  | '<!-- @echo icon-moving-cloud -->'
@@ -187,6 +189,11 @@ export type Iconfont =
187
189
  | '<!-- @echo icon-bell-plus -->'
188
190
  | '<!-- @echo icon-x -->'
189
191
  | '<!-- @echo icon-twitter -->'
192
+ | '<!-- @echo icon-fire-warning -->'
193
+ | '<!-- @echo icon-fire-match -->'
194
+ | '<!-- @echo icon-fire-wind -->'
195
+ | '<!-- @echo icon-crosshair -->'
196
+ | '<!-- @echo icon-pushpin -->'
190
197
  | '<!-- @echo icon-github -->'
191
198
  | '<!-- @echo icon-link -->'
192
199
  | '<!-- @echo icon-plane-snowflake -->'