@windycom/plugin-devtools 2.0.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/README.md +3 -0
  2. package/index.mjs +2 -2
  3. package/package.json +2 -3
  4. package/types/client/AccessProducts.d.ts +8 -0
  5. package/types/client/BottomSveltePlugins.d.ts +8 -0
  6. package/types/client/Calendar.d.ts +9 -17
  7. package/types/client/Color.d.ts +43 -90
  8. package/types/client/Evented.d.ts +4 -0
  9. package/types/client/ExternalSveltePlugin.d.ts +2 -1
  10. package/types/client/IDB.d.ts +63 -0
  11. package/types/client/IconProducts.d.ts +2 -0
  12. package/types/client/Layer.d.ts +1 -2
  13. package/types/client/Metric.d.ts +8 -8
  14. package/types/client/MetricClasses.d.ts +4 -3
  15. package/types/client/Overlay.d.ts +30 -15
  16. package/types/client/OverlayClasses.d.ts +11 -7
  17. package/types/client/Plugin.d.ts +2 -2
  18. package/types/client/Product.d.ts +40 -29
  19. package/types/client/RadarPlusProduct.d.ts +19 -0
  20. package/types/client/Renderer.d.ts +2 -10
  21. package/types/client/SveltePlugin.d.ts +9 -5
  22. package/types/client/TileLayer.d.ts +1 -2
  23. package/types/client/TopoMap.d.ts +10 -0
  24. package/types/client/WindowPlugin.d.ts +7 -3
  25. package/types/client/appsFlyer.d.ts +3 -0
  26. package/types/client/baseMap.d.ts +8 -5
  27. package/types/client/cityLabels.d.ts +10 -2
  28. package/types/client/cloudSync.d.ts +3 -1
  29. package/types/client/colorGradients.d.ts +13 -0
  30. package/types/client/customColors.d.ts +1 -0
  31. package/types/client/d.ts.files/Calendar.d.ts +11 -2
  32. package/types/client/d.ts.files/Color.d.ts +16 -5
  33. package/types/client/d.ts.files/LabelsLayer.d.ts +1 -18
  34. package/types/client/d.ts.files/Layer.d.ts +8 -1
  35. package/types/client/d.ts.files/Metric.d.ts +1 -0
  36. package/types/client/d.ts.files/Renderer.d.ts +22 -1
  37. package/types/client/d.ts.files/alerts.d.ts +120 -0
  38. package/types/client/d.ts.files/broadcast.d.ts +38 -10
  39. package/types/client/d.ts.files/dataSpecifications.d.ts +81 -122
  40. package/types/client/d.ts.files/favs.d.ts +69 -0
  41. package/types/client/d.ts.files/incomingMessages.d.ts +0 -4
  42. package/types/client/d.ts.files/notifications.d.ts +2 -2
  43. package/types/client/d.ts.files/plugin-params.d.ts +35 -47
  44. package/types/client/d.ts.files/plugins.d.ts +30 -42
  45. package/types/client/d.ts.files/pois.d.ts +1 -1
  46. package/types/client/d.ts.files/products.d.ts +15 -3
  47. package/types/client/d.ts.files/rootScope.d.ts +3 -21
  48. package/types/client/d.ts.files/startup.d.ts +59 -0
  49. package/types/client/d.ts.files/storage.d.ts +12 -35
  50. package/types/client/d.ts.files/user.d.ts +79 -24
  51. package/types/client/deviceLogging.d.ts +2 -1
  52. package/types/client/embed2.d.ts +14 -31
  53. package/types/client/fetch.d.ts +29 -16
  54. package/types/client/ga.d.ts +1 -1
  55. package/types/client/geolocation.d.ts +15 -7
  56. package/types/client/globals.d.ts +1 -0
  57. package/types/client/http.d.ts +17 -0
  58. package/types/client/idbInstances.d.ts +45 -0
  59. package/types/client/langFiles.d.ts +2 -0
  60. package/types/client/layers.d.ts +2 -0
  61. package/types/client/lib.d.ts +7 -21
  62. package/types/client/loadArticlesOrWhatsNew.d.ts +1 -0
  63. package/types/client/log.d.ts +1 -0
  64. package/types/client/lruCache.d.ts +6 -0
  65. package/types/client/map.d.ts +17 -6
  66. package/types/client/mobile.d.ts +28 -20
  67. package/types/client/models.d.ts +1 -1
  68. package/types/client/notifications.d.ts +32 -67
  69. package/types/client/overlays.d.ts +4 -1
  70. package/types/client/params.d.ts +0 -1
  71. package/types/client/permanentPromos.d.ts +1 -1
  72. package/types/client/persistentStorage.d.ts +8 -0
  73. package/types/client/picker.d.ts +1 -1
  74. package/types/client/pois.d.ts +1 -2
  75. package/types/client/promo.d.ts +6 -16
  76. package/types/client/pushNotifications.d.ts +13 -1
  77. package/types/client/queryString.d.ts +1 -1
  78. package/types/client/renderUtils.d.ts +1 -1
  79. package/types/client/renderers.d.ts +7 -3
  80. package/types/client/rootScope.d.ts +14 -23
  81. package/types/client/router.d.ts +9 -5
  82. package/types/client/seoParser.d.ts +21 -0
  83. package/types/client/serviceWorkerCtrl.d.ts +8 -0
  84. package/types/client/startupWeather.d.ts +13 -9
  85. package/types/client/store.d.ts +2 -2
  86. package/types/client/storeLastPosition.d.ts +1 -0
  87. package/types/client/subscription.d.ts +1 -0
  88. package/types/client/swDownloader.d.ts +7 -7
  89. package/types/client/swProxy.d.ts +1 -1
  90. package/types/client/swUtils.d.ts +3 -3
  91. package/types/client/trans.d.ts +26 -37
  92. package/types/client/user.d.ts +5 -13
  93. package/types/client/userAlerts.d.ts +68 -0
  94. package/types/client/userConsent.d.ts +6 -0
  95. package/types/client/userFavs.d.ts +46 -121
  96. package/types/client/utils.d.ts +28 -6
  97. package/types/iconfont.d.ts +1 -0
  98. package/types/interfaces.d.ts +90 -225
  99. package/types/lang-files.d.ts +687 -119
  100. package/types/offline.d.ts +100 -0
  101. package/types/types.d.ts +59 -24
  102. package/types/client/Bar.d.ts +0 -114
  103. package/types/client/BindedBar.d.ts +0 -51
  104. package/types/client/BindedCheckbox.d.ts +0 -30
  105. package/types/client/BindedSwitch.d.ts +0 -35
  106. package/types/client/BottomTagPlugin.d.ts +0 -8
  107. package/types/client/DraggableDiv.d.ts +0 -21
  108. package/types/client/GhostBox.d.ts +0 -17
  109. package/types/client/Legend.d.ts +0 -6
  110. package/types/client/LongTap.d.ts +0 -21
  111. package/types/client/MobileCalendar.d.ts +0 -51
  112. package/types/client/OfflineMessagesClasses.d.ts +0 -30
  113. package/types/client/ProductSwitch.d.ts +0 -14
  114. package/types/client/Scrollable.d.ts +0 -14
  115. package/types/client/Switch.d.ts +0 -24
  116. package/types/client/TimestampBar.d.ts +0 -8
  117. package/types/client/d.ts.files/Product.d.ts +0 -37
  118. package/types/client/d.ts.files/trans.d.ts +0 -55
  119. package/types/client/favs.d.ts +0 -83
  120. package/types/client/offlineController.d.ts +0 -20
@@ -1,67 +1,32 @@
1
- import { Evented } from '@windy/Evented';
2
- import * as http from '@windy/http';
3
- import type { HttpPayload } from './d.ts.files/http.d';
4
- import type { NotificationInfo } from './d.ts.files/notifications.d';
5
- declare class Notification extends Evented<Notification> {
6
- data: Record<string, unknown>;
7
- eventSource: null | EventSource;
8
- canReceiveNotif: boolean;
9
- hasUnloadListener: boolean;
10
- constructor();
11
- /**
12
- * Close SSE event stream
13
- */
14
- clean(): void;
15
- /**
16
- * Connect to SSE event stream and hook all event listeners
17
- */
18
- watchChanges(): void;
19
- /**
20
- * Get notifications list (paging is applied)
21
- *
22
- * @param currentPage Page number to get
23
- * @param pageSize Page size to include into list
24
- * @returns Page is updated with received data or error is shown if anything failed
25
- */
26
- loadNotificationList(currentPage: number, pageSize: number): Promise<void | NotificationInfo>;
27
- /**
28
- * Mark alert as seen by its id. This may affect more notifications if the alert has some.
29
- *
30
- * @param id Alert id
31
- * @returns
32
- */
33
- markAlertAsSeen(id: string): Promise<HttpPayload<void>>;
34
- /**
35
- * Mark notification as seen by its id. It affects just and only one specific notification.
36
- *
37
- * @param id Notification id
38
- * @returns
39
- */
40
- markNotificationAsSeen(id: string): Promise<http.HttpPayload<void>>;
41
- /**
42
- * Mark all notifications ad received (= not seen yet, but already delivered)
43
- *
44
- * @returns
45
- */
46
- markNotificationsAsReceived(): Promise<void | http.HttpPayload<void>>;
47
- /**
48
- * Delete all users notifications
49
- *
50
- * @returns
51
- */
52
- deleteAllNotifications(): Promise<http.HttpPayload<void>>;
53
- /**
54
- * Mark all users notifications as seen
55
- */
56
- markAllAsSeen(): void;
57
- /**
58
- * Update notification state. It updates store value so all necessary events are triggered.
59
- *
60
- * @param vals `totalCount` and `newCount` values to set
61
- * @param vals.totalCount Total count of all notifications (already seen is included)
62
- * @param vals.newCount Count of new unseen notifications
63
- */
64
- updateInfo({ totalCount, newCount }: NotificationInfo): void;
65
- }
66
- declare const _default: Notification;
67
- export default _default;
1
+ import type { NotificationExtraPayload } from './d.ts.files/pushNotifications';
2
+ import type { HttpPayload } from './d.ts.files/http';
3
+ export declare const canReceiveNotifications: Promise<void>;
4
+ export declare function loadNotifications(): Promise<void>;
5
+ /**
6
+ * Delete all users notifications
7
+ */
8
+ export declare function deleteAllNotifications(): Promise<void>;
9
+ /**
10
+ * Mark all users notifications as seen
11
+ */
12
+ export declare function markAllAsSeen(): Promise<void>;
13
+ /**
14
+ * Mark notification as seen
15
+ *
16
+ * @param id Alert id
17
+ * @param processId Process id
18
+ */
19
+ export declare function markNotificationAsSeen(data: NotificationExtraPayload): Promise<HttpPayload<void>>;
20
+ /**
21
+ * Mark notification as received
22
+ *
23
+ * @param id Alert id
24
+ * @param processId Process id
25
+ */
26
+ export declare function markNotificationAsReceived(data: NotificationExtraPayload): Promise<HttpPayload<void>>;
27
+ /**
28
+ * After this BE will send notification to device
29
+ * @param type
30
+ * @param device
31
+ */
32
+ export declare function sendTestNotification(type: NotificationExtraPayload['category'], registrationHash: string): void;
@@ -47,9 +47,9 @@ declare const overlays: {
47
47
  dustsm: Overlay<"dustsm", import("../weatherClasses/MetricClasses").NumberedMetric, import("../weatherClasses/Layer").Layer<import("../weatherClasses/MetricClasses").NumberedMetric>>;
48
48
  ptype: RainPtypeOverlay<"ptype">;
49
49
  ccl: Overlay<"ccl", import("../weatherClasses/MetricClasses").NumberedMetric, import("../weatherClasses/Layer").Layer<import("../weatherClasses/MetricClasses").NumberedMetric>>;
50
- gh: Overlay<"gh", import("../weatherClasses/MetricClasses").NumberedMetric, import("../weatherClasses/Layer").Layer<import("../weatherClasses/MetricClasses").NumberedMetric>>;
51
50
  radar: Overlay<"radar", import("../weatherClasses/MetricClasses").NumberedMetric, import("../weatherClasses/Layer").Layer<import("../weatherClasses/MetricClasses").NumberedMetric>>;
52
51
  satellite: Overlay<"satellite", import("../weatherClasses/MetricClasses").NumberedMetric, import("../weatherClasses/Layer").Layer<import("../weatherClasses/MetricClasses").NumberedMetric>>;
52
+ radarPlus: Overlay<"radarPlus", import("../weatherClasses/MetricClasses").NumberedMetric, import("../weatherClasses/Layer").Layer<import("../weatherClasses/MetricClasses").NumberedMetric>>;
53
53
  satelliteIRBT: Overlay<"satellite", import("../weatherClasses/MetricClasses").NumberedMetric, import("../weatherClasses/Layer").Layer<import("../weatherClasses/MetricClasses").NumberedMetric>>;
54
54
  capAlerts: Overlay<"capAlerts", undefined, import("../weatherClasses/Layer").Layer<undefined>>;
55
55
  efiWind: Overlay<"efiWind", import("../weatherClasses/MetricClasses").NumberedMetric, import("../weatherClasses/Layer").Layer<import("../weatherClasses/MetricClasses").NumberedMetric>>;
@@ -63,5 +63,8 @@ declare const overlays: {
63
63
  soilMoisture100: Overlay<"soilMoisture100", import("../weatherClasses/MetricClasses").NumberedMetric, import("../weatherClasses/Layer").Layer<import("../weatherClasses/MetricClasses").NumberedMetric>>;
64
64
  fwi: FwiOverlay<"fwi">;
65
65
  dfm10h: Overlay<"dfm10h", import("../weatherClasses/MetricClasses").NumberedMetric, import("../weatherClasses/Layer").Layer<import("../weatherClasses/MetricClasses").NumberedMetric>>;
66
+ heatmaps: Overlay<"heatmaps", undefined, undefined>;
67
+ topoMap: Overlay<"topoMap", undefined, import("../weatherClasses/Layer").Layer<undefined>>;
68
+ hurricanes: Overlay<"hurricanes", undefined, undefined>;
66
69
  };
67
70
  export default overlays;
@@ -1,2 +1 @@
1
1
  import '@windy/renderCtrl';
2
- import '@windy/router';
@@ -1 +1 @@
1
- export declare const neverDisplayLongTapPromo: () => void;
1
+ export {};
@@ -0,0 +1,8 @@
1
+ declare class PersistentStorage {
2
+ private readonly internalStorage;
3
+ constructor();
4
+ getItem(key: string): Promise<string | null>;
5
+ setItem(key: string, value: string): Promise<void>;
6
+ }
7
+ export declare const persistentStorage: PersistentStorage;
8
+ export {};
@@ -32,7 +32,7 @@ export declare class PickerDot {
32
32
  * Locks picker in position, so any change in picker location
33
33
  * will sync its position to desired lat,lons
34
34
  */
35
- lockPosition(): void;
35
+ lockPosition(): LatLon;
36
36
  unlockPosition(): void;
37
37
  /**
38
38
  * Sets & lock the position of picker dot
@@ -11,6 +11,5 @@ import type { PoisCheckboxes } from './d.ts.files/pois.d';
11
11
  export declare const poisCheckboxes: PoisCheckboxes;
12
12
  /**
13
13
  * Is there something to display on map as a POI
14
- * TODO: Make sure Alerts are included in favs too by creating alert on map
15
14
  */
16
- export declare const displayPoiOnMap: () => boolean;
15
+ export declare const displayPoiOnMap: () => Promise<boolean>;
@@ -1,27 +1,17 @@
1
- import type { StorageData } from '@windy/storage.d';
1
+ import type { Timestamp } from '@windy/types';
2
2
  export interface PromoInfoObject {
3
+ id: string;
3
4
  displayed: number;
4
- ts: number;
5
+ ts: Timestamp;
5
6
  }
6
7
  /**
7
- * Get raw promo object from localStorage
8
- *
9
- * @returns Local promos
10
- */
11
- export declare const getAll: () => StorageData['promos2'];
12
- /**
13
- * Get basic info about promo
14
- *
15
- * @param ident Identification
16
- * @returns Promo info object
8
+ * Get basic info about promo for given ident
17
9
  */
18
- export declare const getCounter2: (ident: string) => PromoInfoObject;
10
+ export declare const getCounter: (id: string) => Promise<PromoInfoObject>;
19
11
  /**
20
12
  * Increases 'seen' counter for particular promo
21
- *
22
- * @param ident Ident
23
13
  */
24
- export declare const hitCounter: (ident: string) => void;
14
+ export declare const hitCounter: (id: string) => Promise<void>;
25
15
  /**
26
16
  * Flag the promo to be never seen again (by setting
27
17
  * its number to 1000)
@@ -1 +1,13 @@
1
- export declare function registerDevice(): Promise<string | unknown>;
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,2 +1,2 @@
1
- export type ParsedQueryString = Record<string, string>;
1
+ export type ParsedQueryString = Record<string, string | undefined>;
2
2
  export declare function parseQueryString(searchQuery: string | undefined): ParsedQueryString | undefined;
@@ -5,7 +5,7 @@ import { Evented } from '@windy/Evented';
5
5
  import type { Color } from '@windy/Color';
6
6
  import type { Layer } from '@windy/Layer';
7
7
  import type { FullRenderParameters } from '@windy/Layer.d';
8
- import type { DataQuality } from '@windy/Product.d';
8
+ import type { DataQuality } from '@windy/Product';
9
9
  import type { TileParams } from '@windy/Renderer.d';
10
10
  import type { TilePoint } from '@windy/interfaces.d';
11
11
  interface Events {
@@ -1,4 +1,5 @@
1
1
  import { Renderer } from '@windy/Renderer';
2
+ import { TopoMap } from '@windy/TopoMap';
2
3
  import { TileLayer } from '@windy/TileLayer';
3
4
  declare const renderers: {
4
5
  /**
@@ -8,13 +9,16 @@ declare const renderers: {
8
9
  */
9
10
  tileLayer: TileLayer;
10
11
  noUserControl: TileLayer;
11
- radar: Renderer<"radar", typeof import("../../plugins/radar/radar")>;
12
- satellite: Renderer<"satellite", typeof import("../../plugins/satellite/satellite")>;
13
- capAlerts: Renderer<"cap-alerts", typeof import("../../plugins/cap-alerts/cap-alerts")>;
12
+ radar: Renderer<"radar", any>;
13
+ satellite: Renderer<"satellite", any>;
14
+ radarPlus: Renderer<"radar-plus", any>;
15
+ capAlerts: Renderer<"cap-alerts", typeof import("../pluginSystem/SveltePlugin").SvelteApp & typeof import("../../plugins/cap-alerts/cap-alerts")>;
14
16
  isolines: Renderer<"isolines", typeof import("../../plugins/isolines/isolines")>;
15
17
  particles: Renderer<"gl-particles", typeof import("../../plugins/gl-particles/gl-particles")> | Renderer<"particles", typeof import("../../plugins/particles/particles")>;
16
18
  /** Extreme forecast and intersucho layers */
17
19
  daySwitcher: TileLayer;
18
20
  accumulations: TileLayer;
21
+ /** Seznam topographic Map */
22
+ topoMap: TopoMap;
19
23
  };
20
24
  export default renderers;
@@ -1,6 +1,5 @@
1
1
  import type { Iconfont } from './d.ts.files/iconfont';
2
- import type { Isolines, Pois } from './d.ts.files/rootScope.d';
3
- import type { LoadedTranslations } from './d.ts.files/trans.d';
2
+ import type { LoadedTranslations } from './d.ts.files/types';
4
3
  /**
5
4
  * Version of Windy.com client (as taken from package.json)
6
5
  * @ignore
@@ -15,12 +14,12 @@ export declare const target: "mobile" | "index" | "lib" | "embed2";
15
14
  * Platform
16
15
  * @ignore
17
16
  */
18
- export declare const platform: import("../../types/types").Platform;
17
+ export declare const platform: import("@windy/types").Platform;
19
18
  /**
20
19
  * Device
21
20
  * @ignore
22
21
  */
23
- export declare const device: import("../../types/types").Device;
22
+ export declare const device: import("@windy/types").Device;
24
23
  /**
25
24
  * List of Windy's supported languages
26
25
  */
@@ -70,27 +69,23 @@ export declare const iconsDir = "<!-- @echo IMG_RELATIVE_PATH -->/icons7";
70
69
  /**
71
70
  * List of valid overlay identifiers
72
71
  */
73
- export declare const overlays: readonly ["radar", "satellite", "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", "visibility", "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"];
74
- /**
75
- * List of valid accumulation times
76
- */
77
- export declare const acTimes: readonly ["next12h", "next24h", "next36h", "next2d", "next48h", "next60h", "next3d", "next5d", "next10d"];
72
+ export declare const overlays: readonly ["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", "visibility", "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"];
78
73
  /**
79
74
  * Identifier of products that cover only certain area
80
75
  */
81
- export declare const localProducts: readonly ["nems", "namConus", "namHawaii", "namAlaska", "iconEu", "iconD2", "arome", "aromeAntilles", "aromeReunion", "canHrdps", "canRdwpsWaves", "camsEu", "iconEuWaves", "hrrrAlaska", "hrrrConus", "bomAccess", "ukv", "jmaMsm", "jmaCwmWaves"];
76
+ export declare const localProducts: readonly ["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"];
82
77
  /**
83
78
  * Identifiers of global products
84
79
  */
85
- export declare const globalProducts: readonly ["gfs", "ecmwf", "ecmwfAnalysis", "ecmwfAifs", "radar", "ecmwfWaves", "gfsWaves", "icon", "iconWaves", "capAlerts", "cams", "efi", "satellite", "cmems", "drought", "fireDanger", "activeFires"];
80
+ export declare const globalProducts: readonly ["gfs", "ecmwf", "ecmwfAnalysis", "radar", "ecmwfWaves", "gfsWaves", "icon", "capAlerts", "cams", "efi", "satellite", "radarPlus", "cmems", "drought", "fireDanger", "activeFires", "topoMap"];
86
81
  /**
87
82
  * Identifiers of sea products
88
83
  */
89
- export declare const seaProducts: readonly ["ecmwfWaves", "gfsWaves", "iconWaves", "iconEuWaves", "canRdwpsWaves", "cmems", "jmaCwmWaves"];
84
+ export declare const seaProducts: readonly ["ecmwfWaves", "gfsWaves", "iconEuWaves", "canRdwpsWaves", "cmems", "jmaCwmWaves"];
90
85
  /**
91
86
  * Identifiers of wave products, if product is not here, it will be considered as air product
92
87
  */
93
- export declare const waveProducts: readonly ["ecmwfWaves", "gfsWaves", "iconWaves", "iconEuWaves", "jmaCwmWaves", "canRdwpsWaves"];
88
+ export declare const waveProducts: readonly ["ecmwfWaves", "gfsWaves", "iconEuWaves", "jmaCwmWaves", "canRdwpsWaves"];
94
89
  /**
95
90
  * identifiers of air quality product
96
91
  */
@@ -98,19 +93,19 @@ export declare const airQualityProducts: readonly ["cams", "camsEu"];
98
93
  /**
99
94
  * identifiers of local products, that have point forecast
100
95
  */
101
- export declare const localPointProducts: readonly ["namConus", "namHawaii", "namAlaska", "iconD2", "iconEu", "iconEuWaves", "arome", "aromeAntilles", "aromeReunion", "canHrdps", "canRdwpsWaves", "hrrrAlaska", "hrrrConus", "bomAccess", "ukv", "jmaMsm", "jmaCwmWaves"];
96
+ export declare const localPointProducts: readonly ["namConus", "namHawaii", "namAlaska", "iconD2", "iconEu", "iconEuWaves", "arome", "aromeAntilles", "aromeFrance", "aromeReunion", "canHrdps", "canRdwpsWaves", "czeAladin", "hrrrAlaska", "hrrrConus", "bomAccess", "bomAccessAd", "bomAccessBn", "bomAccessDn", "bomAccessNq", "bomAccessPh", "bomAccessSy", "bomAccessVt", "ukv", "jmaMsm", "jmaCwmWaves"];
102
97
  /**
103
98
  * Identifiers of global products, that have point forecast
104
99
  */
105
- export declare const globalPointProducts: readonly ["gfs", "ecmwf", "ecmwfAifs", "icon", "mblue"];
100
+ export declare const globalPointProducts: readonly ["gfs", "ecmwf", "icon", "mblue"];
106
101
  /**
107
102
  * Identifiers of all land products combined
108
103
  */
109
- export declare const products: readonly ["gfs", "ecmwf", "ecmwfAnalysis", "ecmwfAifs", "radar", "ecmwfWaves", "gfsWaves", "icon", "iconWaves", "capAlerts", "cams", "efi", "satellite", "cmems", "drought", "fireDanger", "activeFires", "nems", "namConus", "namHawaii", "namAlaska", "iconEu", "iconD2", "arome", "aromeAntilles", "aromeReunion", "canHrdps", "canRdwpsWaves", "camsEu", "iconEuWaves", "hrrrAlaska", "hrrrConus", "bomAccess", "ukv", "jmaMsm", "jmaCwmWaves", "cams", "camsEu", "mblue"];
104
+ export declare const products: readonly ["gfs", "ecmwf", "ecmwfAnalysis", "radar", "ecmwfWaves", "gfsWaves", "icon", "capAlerts", "cams", "efi", "satellite", "radarPlus", "cmems", "drought", "fireDanger", "activeFires", "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", "cams", "camsEu", "mblue"];
110
105
  /**
111
106
  * Identifiers of all point products combines
112
107
  */
113
- export declare const pointProducts: readonly ["gfs", "ecmwf", "ecmwfAifs", "icon", "mblue", "namConus", "namHawaii", "namAlaska", "iconD2", "iconEu", "iconEuWaves", "arome", "aromeAntilles", "aromeReunion", "canHrdps", "canRdwpsWaves", "hrrrAlaska", "hrrrConus", "bomAccess", "ukv", "jmaMsm", "jmaCwmWaves"];
108
+ export declare const pointProducts: readonly ["gfs", "ecmwf", "icon", "mblue", "namConus", "namHawaii", "namAlaska", "iconD2", "iconEu", "iconEuWaves", "arome", "aromeAntilles", "aromeFrance", "aromeReunion", "canHrdps", "canRdwpsWaves", "czeAladin", "hrrrAlaska", "hrrrConus", "bomAccess", "bomAccessAd", "bomAccessBn", "bomAccessDn", "bomAccessNq", "bomAccessPh", "bomAccessSy", "bomAccessVt", "ukv", "jmaMsm", "jmaCwmWaves"];
114
109
  /**
115
110
  * IndicatesIndicates that that browsing device is mobile
116
111
  */
@@ -128,10 +123,6 @@ export declare const isMobileOrTablet: boolean;
128
123
  * @ignore
129
124
  */
130
125
  export declare const isRetina: boolean;
131
- /**
132
- * Preferred browsers' language (not the used one). Can contain language that is not supported by Windy
133
- */
134
- export declare const prefLang: string;
135
126
  /**
136
127
  * Valid levels, their identifier and display string
137
128
  * @ignore this will crash Markdown parser
@@ -147,12 +138,12 @@ export declare const maxFavPoisDesktop = 7;
147
138
  * Valid POI layers, their name and icon
148
139
  * @ignore this will crash Markdown parser
149
140
  */
150
- export declare const pois: Record<Pois, [keyof LoadedTranslations | string, Iconfont]>;
141
+ export declare const pois: Record<string, [keyof LoadedTranslations | string, Iconfont]>;
151
142
  /**
152
143
  * List of valid isoline identifiers
153
144
  * @ignore this will crash Markdown parser
154
145
  */
155
- export declare const isolines: Isolines[];
146
+ export declare const isolinesType: readonly ["pressure", "gh", "temp", "deg0"];
156
147
  /**
157
148
  * Location of internal Windy plugins
158
149
  * TODO: Mobile apps have probably different location
@@ -1,10 +1,13 @@
1
1
  import { type ParsedQueryString } from '../utils/queryString';
2
2
  import type { PluginIdent } from '@windy/Plugin';
3
3
  import type { Coords, PickerCoords } from '@windy/interfaces.d';
4
+ import type { Overlays, Products } from '@windy/rootScope.d';
4
5
  import type { ExternalPluginIdent } from '@windy/types';
5
- type StartupCoords = {
6
+ export type ParsedStartupValues = {
6
7
  sharedCoords: Coords | null;
7
8
  pickerCoords: PickerCoords | null;
9
+ overlay: Overlays | null;
10
+ product: Products | null;
8
11
  };
9
12
  /**
10
13
  * Parse URL to plugin and its parameters (if any)
@@ -14,7 +17,7 @@ type StartupCoords = {
14
17
  export declare function resolveRoute(purl: string, source: 'url' | 'back-button', parsedQs?: ParsedQueryString): ExternalPluginIdent | PluginIdent | void;
15
18
  /**
16
19
  * Parse search part of the URL
17
- * eg: https://www.windy.com/?overlay,level,acTime,lat,lon,zoom,marker
20
+ * eg: https://www.windy.com/?overlay,level,lat,lon,zoom,marker
18
21
  * lat,lon,zoom are obligatory and must go always together
19
22
  * All other params are optional and can be in any order
20
23
  * WARNING: This method has thousands of side effects!!
@@ -22,9 +25,10 @@ export declare function resolveRoute(purl: string, source: 'url' | 'back-button'
22
25
  * @param searchQuery Search part of the URL, eg: lat,lon,zoom,marker
23
26
  * @returns Coordinates from the URL (if any) and coordinates of the picker (if any)
24
27
  */
25
- export declare function parseSearch(searchQuery: string | undefined, parsedQs?: ParsedQueryString): StartupCoords | undefined;
28
+ export declare function parseSearch(searchQuery: string | undefined): ParsedStartupValues | undefined;
26
29
  /**
27
- * Parsed coordinates from URL
30
+ * Parsed items from URL
28
31
  */
29
32
  export declare const sharedCoords: Coords;
30
- export {};
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";
@@ -1,3 +1,24 @@
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
+ */
1
22
  declare const _default: {
2
23
  /**
3
24
  * Language parsed from startupUrl, null if cannot be parsed
@@ -0,0 +1,8 @@
1
+ import type { ClientMessage } from '../../types/offline';
2
+ /**
3
+ * Sends message to service worker
4
+ */
5
+ export declare const sendMessageToServiceWorker: (message: ClientMessage) => void;
6
+ export declare const installServiceWorker: () => void;
7
+ export declare const isServiceWorkerSupported: () => boolean;
8
+ export declare const getServiceWorkerError: () => string | null;
@@ -4,20 +4,24 @@
4
4
  *
5
5
  * Controls display & hiding of 4 days weather on Windy after startup
6
6
  *
7
- * @module startupWeather
8
- */
9
- import type { GeolocationInfo, HomeLocation } from '@windy/interfaces.d';
10
- export declare function removeListeners(): void;
11
- /**
12
- * Show the weather box on HP
7
+ * GUI on desktop works in two different modes:
8
+ *
9
+ * 1. Default mode - user has NO pinned favs on HP or has any, but do not want to see them permanently
10
+ *
11
+ * 2. Persistent mode (desktop only) - user has pinned favs on HP and wants to see them permanently
13
12
  *
14
- * @param coords At which location show the HP
13
+ * Both modes use completely different set of listeners that handle hide / show of HP weather
14
+ *
15
+ * @module startupWeather
15
16
  */
16
- export declare function show(coords: HomeLocation | GeolocationInfo, displayArticles?: boolean): void;
17
17
  /**
18
18
  * Hides, the weather DIV
19
19
  *
20
20
  * @param ev Event that initiated hiding
21
21
  */
22
- export declare function hide(ev?: MouseEvent | KeyboardEvent | TouchEvent): void;
22
+ export declare function hide(ev?: MouseEvent | KeyboardEvent | TouchEvent): Promise<void>;
23
+ /**
24
+ * Click on title or home button
25
+ */
26
+ export declare function back2home(): Promise<void>;
23
27
  export declare const getCancelShow: () => boolean;
@@ -71,7 +71,6 @@ declare class Store extends Evented<StoreTypes> {
71
71
  * @returns True if property exists
72
72
  */
73
73
  hasProperty: <T extends keyof DataSpecifications>(name: T) => boolean;
74
- _set<T extends keyof DataSpecifications, Item extends DataSpecifications[T]>(name: T, item: Item, opts: StoreOptions, value: Item['def'] | null): void;
75
74
  /**
76
75
  * Sets a value in key, value store. If succesfull,a nd value has been changed, store will brodcast message with name and value.
77
76
  * Limitation:** Our store is quite primitive so it can not compare Arrays and Objects. Always create new one or use `forceChange` * option.
@@ -137,6 +136,7 @@ declare class Store extends Evented<StoreTypes> {
137
136
  forceGet: boolean;
138
137
  }): Item['def'];
139
138
  isValid<T>(item: DataSpecificationsObject<T>, value: T): boolean;
139
+ private setFinally;
140
140
  }
141
141
  declare const store: Store;
142
142
  export declare const getAll: () => void, getAllowed: <T extends keyof DataSpecifications, Item extends DataSpecifications[T]>(name: T) => string | Item["allowed"], getDefault: <T extends keyof DataSpecifications, Item extends DataSpecifications[T]>(name: T) => Item["def"], get: <T extends keyof DataSpecifications, Item extends DataSpecifications[T]>(name: T, options?: {
@@ -144,5 +144,5 @@ export declare const getAll: () => void, getAllowed: <T extends keyof DataSpecif
144
144
  }) => Item["def"], on: <K extends keyof StoreTypes, Q extends StoreTypes[K]>(topic: K, callback: (...data: TrimUndefinedFromRight<Arrayify<Q>>) => void, context?: ThisType<unknown>, once?: boolean) => number, off: {
145
145
  (id: number): void;
146
146
  <K extends keyof StoreTypes, Q extends StoreTypes[K]>(topic: K, callback: (...data: TrimUndefinedFromRight<Arrayify<Q>>) => void, context?: ThisType<unknown>): void;
147
- }, once: <K extends keyof StoreTypes, Q extends StoreTypes[K]>(topic: K, callback: (...data: TrimUndefinedFromRight<Arrayify<Q>>) => void, context?: ThisType<unknown>) => number, set: <T extends keyof DataSpecifications, Item extends DataSpecifications[T]>(name: T, value: Item["def"], opts?: StoreOptions) => SetReturnType<T>;
147
+ }, once: <K extends keyof StoreTypes, Q extends StoreTypes[K]>(topic: K, callback: (...data: TrimUndefinedFromRight<Arrayify<Q>>) => void, context?: ThisType<unknown>) => number, set: <T extends keyof DataSpecifications, Item extends DataSpecifications[T]>(name: T, value: Item["def"], opts?: StoreOptions) => SetReturnType<T>, defineProperty: <T extends keyof DataSpecifications, Prop extends keyof DataSpecifications[T], Value extends DataSpecifications[T][Prop]>(name: T, prop: Prop, value: Value) => void, setDefault: <T extends keyof DataSpecifications, Item extends DataSpecifications[T]>(name: T, value: Item["def"]) => void;
148
148
  export default store;
@@ -0,0 +1 @@
1
+ export {};
@@ -62,4 +62,5 @@ export declare const checkPendingSubscription: () => void;
62
62
  * It is used only as a gateway to solving the whole issue. It must be short and clear.
63
63
  */
64
64
  export declare const getBaitTitle: (issue: SubscriptionIssue | null) => string;
65
+ export declare const checkAndRenderSubsIssue: () => void;
65
66
  export {};
@@ -1,16 +1,16 @@
1
- import type { DownloadPayload, DownloadedInfo } from '../../plugins/offline/offline';
2
- export declare const cacheUrl: (cache: Cache, url: string, testIfUrlIsInCache?: boolean, tryTwice2DownloadFiles?: boolean) => Promise<boolean>;
1
+ import type { DownloadPayload, DownloadedInfo, FileInfo } from '../../types/offline';
2
+ export declare const cacheUrl: (cache: Cache, url: string, originalUrl: string, testIfUrlIsInCache?: boolean, tryTwice2DownloadFiles?: boolean) => Promise<boolean>;
3
3
  export declare const cancelOngoingDownloads: () => boolean;
4
4
  /**
5
5
  * Download all files in parallel
6
6
  * @param cache instance of Cache
7
7
  * @param urls list of rqrd URLs
8
- * @param checkIfUrlIsInCache Should we check if URKL is in cache before attempting to doqnload it?
9
- * @param calledOnDownlodedOneFile callback that is called each time one file is downloaded
10
- * @returns all Erorred urls or null if task was cenceled
8
+ * @param checkIfUrlIsInCache Should we check if URL is in cache before attempting to download it?
9
+ * @param calledOnDownloadedOneFile callback that is called each time one file is downloaded
10
+ * @returns all Errored urls or null if task was cancelled
11
11
  */
12
- export declare const downloadFilesInParallel: (cache: Cache, urls: string[], checkIfUrlIsInCache: boolean, tryTwice2DownloadFiles: boolean, calledOnDownlodedOneFile: () => void) => Promise<{
12
+ export declare const downloadFilesInParallel: (cache: Cache, urls: FileInfo[], checkIfUrlIsInCache: boolean, tryTwice2DownloadFiles: boolean, calledOnDownloadedOneFile: () => void) => Promise<{
13
13
  result: 'downloadingCanceled' | 'ok';
14
14
  errors?: string[];
15
15
  }>;
16
- export declare function download({ numberOfFiles, batches, mapBoundaries, overlays, products, daysToLoad, lastTimestamp, assets, mainEntryPoint, }: DownloadPayload): Promise<DownloadedInfo | void>;
16
+ export declare function download({ numberOfFiles, batches, assets, mainEntryPoint, }: DownloadPayload): Promise<DownloadedInfo | void>;
@@ -1,4 +1,4 @@
1
1
  export {};
2
2
  export declare const putInCache: (request: Request, response: Response) => Promise<void>;
3
3
  export declare const getFallbackResponse: () => Promise<Response>;
4
- export declare const cacheFirst: (request: Request, isConnectedToInternet: boolean) => Promise<Response>;
4
+ export declare const cacheFirst: (request: Request) => Promise<Response>;
@@ -1,7 +1,7 @@
1
1
  import type { Timestamp } from '@windy/types.d';
2
- import type { DownloadProgress, ServiceWorkerMessage } from '@plugins/offline/offline';
2
+ import type { DownloadProgress, ServiceWorkerMessage } from '../../types/offline';
3
3
  /**
4
- * The reson why we are using this function to wrap postMessage is that
4
+ * The reason why we are using this function to wrap postMessage is that
5
5
  * we can use TS to check typings of the message
6
6
  */
7
7
  export declare const sendMessageToClient: (message: ServiceWorkerMessage['data'] | DownloadProgress) => Promise<void>;
@@ -9,7 +9,7 @@ export declare const storeData: <T extends Object>(key: string, data: T) => Prom
9
9
  export declare const getData: <T extends Object>(key: string) => Promise<void | T>;
10
10
  export declare const deleteData: (key: string) => Promise<void>;
11
11
  /**
12
- * Soteres mainEntryPoint as /index.html so it will be always available on this URL
12
+ * Stores mainEntryPoint as /index.html so it will be always available on this URL
13
13
  * This is basically symlink in serviceWorker cache
14
14
  */
15
15
  export declare const storeMainEntryPoint: (mainEntryPoint: string) => Promise<void>;