@windycom/plugin-devtools 2.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 (143) hide show
  1. package/README.md +4 -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/BottomSlide.d.ts +3 -0
  6. package/types/client/BottomSveltePlugins.d.ts +8 -0
  7. package/types/client/Calendar.d.ts +9 -17
  8. package/types/client/Color.d.ts +44 -91
  9. package/types/client/EcmwfProduct.d.ts +0 -22
  10. package/types/client/Evented.d.ts +4 -0
  11. package/types/client/ExternalSveltePlugin.d.ts +8 -2
  12. package/types/client/IDB.d.ts +69 -0
  13. package/types/client/IconProducts.d.ts +2 -0
  14. package/types/client/Layer.d.ts +1 -2
  15. package/types/client/Metric.d.ts +13 -9
  16. package/types/client/MetricClasses.d.ts +4 -3
  17. package/types/client/Overlay.d.ts +31 -16
  18. package/types/client/OverlayClasses.d.ts +11 -7
  19. package/types/client/Plugin.d.ts +6 -2
  20. package/types/client/Product.d.ts +33 -30
  21. package/types/client/RadarPlusProduct.d.ts +19 -0
  22. package/types/client/Renderer.d.ts +2 -10
  23. package/types/client/SatelliteProduct.d.ts +1 -1
  24. package/types/client/SveltePlugin.d.ts +16 -5
  25. package/types/client/TileLayer.d.ts +1 -2
  26. package/types/client/TopoMap.d.ts +10 -0
  27. package/types/client/WindowPlugin.d.ts +9 -4
  28. package/types/client/appsFlyer.d.ts +2 -0
  29. package/types/client/baseMap.d.ts +8 -5
  30. package/types/client/cityLabels.d.ts +10 -2
  31. package/types/client/cloudSync.d.ts +3 -1
  32. package/types/client/colorGradients.d.ts +13 -0
  33. package/types/client/compatibilityCheck.d.ts +1 -0
  34. package/types/client/connection.d.ts +1 -1
  35. package/types/client/customColors.d.ts +1 -0
  36. package/types/client/d.ts.files/Calendar.d.ts +11 -2
  37. package/types/client/d.ts.files/Color.d.ts +17 -5
  38. package/types/client/d.ts.files/LabelsLayer.d.ts +3 -20
  39. package/types/client/d.ts.files/Layer.d.ts +8 -1
  40. package/types/client/d.ts.files/Metric.d.ts +1 -0
  41. package/types/client/d.ts.files/Renderer.d.ts +22 -1
  42. package/types/client/d.ts.files/alerts.d.ts +119 -0
  43. package/types/client/d.ts.files/broadcast.d.ts +51 -18
  44. package/types/client/d.ts.files/dataSpecifications.d.ts +121 -137
  45. package/types/client/d.ts.files/favs.d.ts +68 -0
  46. package/types/client/d.ts.files/incomingMessages.d.ts +0 -4
  47. package/types/client/d.ts.files/lib.d.ts +5 -7
  48. package/types/client/d.ts.files/notifications.d.ts +2 -2
  49. package/types/client/d.ts.files/plugin-params.d.ts +53 -57
  50. package/types/client/d.ts.files/plugins.d.ts +31 -42
  51. package/types/client/d.ts.files/pois.d.ts +1 -1
  52. package/types/client/d.ts.files/products.d.ts +16 -5
  53. package/types/client/d.ts.files/rootScope.d.ts +13 -31
  54. package/types/client/d.ts.files/startup.d.ts +65 -0
  55. package/types/client/d.ts.files/storage.d.ts +12 -35
  56. package/types/client/d.ts.files/user.d.ts +82 -24
  57. package/types/client/detectDevice.d.ts +0 -3
  58. package/types/client/device.d.ts +1 -0
  59. package/types/client/deviceLogging.d.ts +2 -1
  60. package/types/client/embed.d.ts +70 -0
  61. package/types/client/embed2.d.ts +14 -31
  62. package/types/client/errorLogger.d.ts +28 -3
  63. package/types/client/errors.d.ts +6 -0
  64. package/types/client/fetch.d.ts +41 -16
  65. package/types/client/format.d.ts +1 -1
  66. package/types/client/ga.d.ts +1 -1
  67. package/types/client/geolocation.d.ts +15 -7
  68. package/types/client/globals.d.ts +1 -0
  69. package/types/client/http.d.ts +17 -6
  70. package/types/client/idbInstances.d.ts +36 -0
  71. package/types/client/imaker.d.ts +112 -0
  72. package/types/client/imakerMain.d.ts +49 -0
  73. package/types/client/langFiles.d.ts +2 -0
  74. package/types/client/latestBroadcasts.d.ts +1 -1
  75. package/types/client/layers.d.ts +2 -0
  76. package/types/client/lib.d.ts +6 -22
  77. package/types/client/libHtml.d.ts +1 -1
  78. package/types/client/liveAlerts.d.ts +5 -0
  79. package/types/client/liveAlerts.types.d.ts +28 -0
  80. package/types/client/loadArticlesOrWhatsNew.d.ts +1 -0
  81. package/types/client/location.d.ts +5 -0
  82. package/types/client/log.d.ts +4 -1
  83. package/types/client/lruCache.d.ts +6 -0
  84. package/types/client/map.d.ts +17 -6
  85. package/types/client/mobile.d.ts +31 -22
  86. package/types/client/models.d.ts +7 -5
  87. package/types/client/notifications.d.ts +29 -67
  88. package/types/client/overlays.d.ts +4 -1
  89. package/types/client/params.d.ts +0 -1
  90. package/types/client/permanentPromos.d.ts +1 -1
  91. package/types/client/persistentStorage.d.ts +8 -0
  92. package/types/client/picker.d.ts +1 -1
  93. package/types/client/plugins.d.ts +4 -0
  94. package/types/client/pois.d.ts +1 -2
  95. package/types/client/promo.d.ts +6 -16
  96. package/types/client/pushNotifications.d.ts +1 -1
  97. package/types/client/queryString.d.ts +1 -1
  98. package/types/client/renderUtils.d.ts +1 -1
  99. package/types/client/renderers.d.ts +7 -3
  100. package/types/client/rootScope.d.ts +23 -24
  101. package/types/client/router.d.ts +9 -29
  102. package/types/client/seoParser.d.ts +0 -14
  103. package/types/client/serviceWorkerCtrl.d.ts +8 -0
  104. package/types/client/showableErrorsService.d.ts +6 -10
  105. package/types/client/startupWeather.d.ts +13 -9
  106. package/types/client/store.d.ts +2 -2
  107. package/types/client/storeLastPosition.d.ts +4 -0
  108. package/types/client/subscription.d.ts +1 -0
  109. package/types/client/swDownloader.d.ts +7 -7
  110. package/types/client/swProxy.d.ts +1 -1
  111. package/types/client/swUtils.d.ts +3 -3
  112. package/types/client/trans.d.ts +26 -37
  113. package/types/client/user.d.ts +7 -13
  114. package/types/client/userAlerts.d.ts +68 -0
  115. package/types/client/userConsent.d.ts +6 -0
  116. package/types/client/userFavs.d.ts +46 -122
  117. package/types/client/utils.d.ts +67 -9
  118. package/types/iconfont.d.ts +8 -0
  119. package/types/interfaces.d.ts +226 -284
  120. package/types/lang-files.d.ts +1334 -142
  121. package/types/offline.d.ts +100 -0
  122. package/types/types.d.ts +108 -34
  123. package/types/client/Bar.d.ts +0 -114
  124. package/types/client/BindedBar.d.ts +0 -51
  125. package/types/client/BindedCheckbox.d.ts +0 -30
  126. package/types/client/BindedSwitch.d.ts +0 -35
  127. package/types/client/BottomTagPlugin.d.ts +0 -8
  128. package/types/client/DraggableDiv.d.ts +0 -21
  129. package/types/client/GhostBox.d.ts +0 -17
  130. package/types/client/Legend.d.ts +0 -6
  131. package/types/client/LongTap.d.ts +0 -21
  132. package/types/client/MobileCalendar.d.ts +0 -51
  133. package/types/client/OfflineMessagesClasses.d.ts +0 -30
  134. package/types/client/ProductSwitch.d.ts +0 -14
  135. package/types/client/Scrollable.d.ts +0 -14
  136. package/types/client/Switch.d.ts +0 -24
  137. package/types/client/TimestampBar.d.ts +0 -8
  138. package/types/client/d.ts.files/Product.d.ts +0 -37
  139. package/types/client/d.ts.files/errorLogger.d.ts +0 -35
  140. package/types/client/d.ts.files/trans.d.ts +0 -55
  141. package/types/client/favs.d.ts +0 -83
  142. package/types/client/offlineController.d.ts +0 -20
  143. /package/types/client/d.ts.files/{Webcams.d.ts → webcams.d.ts} +0 -0
@@ -5,13 +5,13 @@ import type { DirectionFunction } from '@windy/format.d';
5
5
  import type { Iconfont } from '@windy/iconfont.d';
6
6
  import type { Overlays } from '@windy/rootScope.d';
7
7
  import type { RGBNumValues } from '@windy/interpolatorTypes';
8
- import type { LoadedTranslations } from '@windy/trans.d';
9
- import type { HTMLString } from '@windy/types';
10
- export type UsedOverlays = Overlays | 'gh' | 'swell' | 'satelliteIRBT';
8
+ import type { LoadedTranslations, HTMLString } from '@windy/types';
9
+ import type { RGBAString } from '@windy/Color.d';
10
+ export type UsedOverlays = Overlays | 'swell' | 'satelliteIRBT';
11
11
  export type OverlayInitParams = Pick<Overlay, 'ident'> & Partial<Overlay>;
12
12
  type LayerProperty<L extends Layer | undefined, P extends keyof Layer> = L extends Layer ? L[P] : undefined;
13
13
  type MetricProperty<M extends Metric | undefined, P extends keyof Metric> = M extends Metric ? M[P] : undefined;
14
- export declare class Overlay<I extends Overlays | 'gh' = Overlays | 'gh', M extends I extends Layers ? LayerMetricType[I] : undefined = I extends Layers ? LayerMetricType[I] : undefined, L extends Layer<M> | undefined = I extends Layers ? Layer<M> : undefined> {
14
+ export declare class Overlay<I extends Overlays = Overlays, M extends I extends Layers ? LayerMetricType[I] : undefined = I extends Layers ? LayerMetricType[I] : undefined, L extends Layer<M> | undefined = I extends Layers ? Layer<M> : undefined> {
15
15
  /**
16
16
  * Main ident
17
17
  */
@@ -53,6 +53,10 @@ export declare class Overlay<I extends Overlays | 'gh' = Overlays | 'gh', M exte
53
53
  * Hide interpolated weather value over cities, when user switches to POI cities
54
54
  */
55
55
  hideWxLabels?: boolean;
56
+ /**
57
+ * Hide elevation in the desktop picker
58
+ */
59
+ hidePickerElevation?: boolean;
56
60
  /**
57
61
  * Eg. in day-switcher we need as short name as possible
58
62
  */
@@ -74,7 +78,7 @@ export declare class Overlay<I extends Overlays | 'gh' = Overlays | 'gh', M exte
74
78
  */
75
79
  partOf?: Overlays;
76
80
  /**
77
- * Applies class 'hide-particles' to the body
81
+ * Hides particle on/off switch in GUI (so far used only in desktop GUI)
78
82
  */
79
83
  hideParticles?: boolean;
80
84
  /**
@@ -100,7 +104,24 @@ export declare class Overlay<I extends Overlays | 'gh' = Overlays | 'gh', M exte
100
104
  c: LayerProperty<L, 'c'>;
101
105
  l: LayerProperty<L, 'l'>;
102
106
  cm: LayerProperty<L, 'cm'>;
107
+ /**
108
+ * Do not display this overlay in URL
109
+ */
110
+ hideFromURL?: boolean;
111
+ /**
112
+ * Optional promo badge to be displayed in GUI
113
+ */
114
+ promoBadge?: string;
115
+ promoBadgeColor?: RGBAString;
116
+ /**
117
+ * Optional menu image thumbnail
118
+ */
119
+ menuImage?: string;
103
120
  constructor(params: OverlayInitParams);
121
+ /**
122
+ * When clicking on overlay in menu, do the following action (ready to be overloaded)
123
+ */
124
+ onClick(): void;
104
125
  /**
105
126
  * Render's overlay's legend inside el
106
127
  */
@@ -111,6 +132,10 @@ export declare class Overlay<I extends Overlays | 'gh' = Overlays | 'gh', M exte
111
132
  * @param short If true, return shortened version of description if avail
112
133
  */
113
134
  getName(short?: boolean): string;
135
+ /**
136
+ * Return URL of image for overlay
137
+ */
138
+ getMenuImagePath(): string;
114
139
  /**
115
140
  * Get menu title
116
141
  *
@@ -131,20 +156,10 @@ export declare class Overlay<I extends Overlays | 'gh' = Overlays | 'gh', M exte
131
156
  * @param values Interpolated values
132
157
  */
133
158
  createPickerHTML(values: RGBNumValues, _directionFormattingFunction: DirectionFunction): HTMLString;
134
- /**
135
- * In case of picker interpolator returns null value, this method is called
136
- * (is consumed by PickerMobile only so far)
137
- */
138
- createPickerInvalidHTML(): HTMLString;
139
- /**
140
- * Create title for picker content
141
- * @param alternativeContent Alternative text inside title
142
- */
143
- createPickerTitle(alternativeContent?: string): HTMLString;
144
159
  /**
145
160
  * Just proxy to the Metric's metric property
146
161
  */
147
- get metric(): "" | import("./Metric").MetricItem;
162
+ get metric(): import("./Metric").MetricItem | "";
148
163
  protected initProperties(): void;
149
164
  }
150
165
  export {};
@@ -2,28 +2,32 @@ import { Overlay } from '@windy/Overlay';
2
2
  import type { DirectionFunction } from '@windy/format.d';
3
3
  import type { Overlays } from '@windy/rootScope.d';
4
4
  import type { RGBNumValues } from '@windy/interpolatorTypes';
5
- import type { LoadedTranslations } from '@windy/trans.d';
6
- export declare class CurrentOverlay<I extends Overlays | 'gh' = Overlays | 'gh'> extends Overlay<I> {
5
+ import type { LoadedTranslations } from '@windy/types';
6
+ export declare class CurrentOverlay<I extends Overlays = Overlays> extends Overlay<I> {
7
+ hidePickerElevation: boolean;
7
8
  createPickerHTML(values: RGBNumValues, formatDir: DirectionFunction): string;
8
9
  }
9
- export declare class WaveOverlay<I extends Overlays | 'gh' = Overlays | 'gh'> extends Overlay<I> {
10
+ export declare class WaveOverlay<I extends Overlays = Overlays> extends Overlay<I> {
11
+ hidePickerElevation: boolean;
10
12
  createPickerHTML(values: RGBNumValues, formatDir: DirectionFunction): string;
11
13
  }
12
- export declare class AwpOverlay<I extends Overlays | 'gh' = Overlays | 'gh'> extends Overlay<I> {
14
+ export declare class AwpOverlay<I extends Overlays = Overlays> extends Overlay<I> {
13
15
  labels: {
14
16
  [value: number]: keyof LoadedTranslations;
15
17
  };
16
18
  createPickerHTML(values: RGBNumValues): string;
17
19
  }
18
- export declare class FwiOverlay<I extends Overlays | 'gh' = Overlays | 'gh'> extends Overlay<I> {
20
+ export declare class FwiOverlay<I extends Overlays = Overlays> extends Overlay<I> {
19
21
  labels: {
20
22
  [value: number]: keyof LoadedTranslations;
21
23
  };
22
24
  createPickerHTML(values: RGBNumValues): string;
23
25
  }
24
- export declare class RainPtypeOverlay<I extends Overlays | 'gh' = Overlays | 'gh'> extends Overlay<I> {
26
+ export declare class RainPtypeOverlay<I extends Overlays = Overlays> extends Overlay<I> {
27
+ hidePickerElevation: boolean;
25
28
  createPickerHTML(values: RGBNumValues): string;
26
29
  }
27
- export declare class CloudsOverlay<I extends Overlays | 'gh' = Overlays | 'gh'> extends Overlay<I> {
30
+ export declare class CloudsOverlay<I extends Overlays = Overlays> extends Overlay<I> {
31
+ hidePickerElevation: boolean;
28
32
  createPickerHTML(values: RGBNumValues): string;
29
33
  }
@@ -45,7 +45,7 @@ export declare class Plugin<P extends PluginIdent> {
45
45
  /**
46
46
  * Required language files
47
47
  */
48
- langFiles?: LangFileKey[];
48
+ langFiles: LangFileKey[];
49
49
  /**
50
50
  * Status of the plugin (is loaded or not)
51
51
  */
@@ -60,7 +60,7 @@ export declare class Plugin<P extends PluginIdent> {
60
60
  */
61
61
  pane?: PluginPane;
62
62
  /**
63
- * Is the tag currentlly open?
63
+ * Is the tag currently open?
64
64
  */
65
65
  isOpen?: boolean;
66
66
  /**
@@ -109,6 +109,10 @@ export declare class Plugin<P extends PluginIdent> {
109
109
  * Ready to be overloaded
110
110
  */
111
111
  paramsChanged(..._args: unknown[]): void;
112
+ /**
113
+ * Ready to be overloaded
114
+ */
115
+ onRenderStart(..._args: unknown[]): void;
112
116
  protected initProperties(): void;
113
117
  }
114
118
  export {};
@@ -1,13 +1,13 @@
1
1
  import { Calendar } from '@windy/Calendar';
2
2
  import * as http from '@windy/http';
3
- import type { MinifestObject } from './d.ts.files/Calendar.d';
4
- import type { Layers } from './d.ts.files/Layer.d';
5
- import type { DataQuality, FileSuffix } from './d.ts.files/Product.d';
6
- import type { LatLon } from './d.ts.files/interfaces';
7
- import type { AcTimes, Isolines, Levels, Overlays, Products } from './d.ts.files/rootScope.d';
8
- import type { ProductCategory, ProductIdent } from './d.ts.files/types';
9
- export type ProductInitParams = Pick<Product, 'modelName' | 'provider' | 'interval'> & Partial<Pick<Product, 'provider' | 'ident' | 'maxTileZoom' | 'animationSpeed' | 'animationSpeed1h' | 'fileSuffix' | 'fileSuffixFallback' | 'JPGtransparency' | 'PNGtransparency' | 'dataQuality' | 'betterDataQuality' | 'animation' | 'labelsTemp' | 'overlays' | 'preferredProduct' | 'pathGenerator' | 'isolines' | 'directory' | 'category' | 'modelIdent' | 'intervalPremium' | 'server' | 'modelResolution' | 'levels' | 'levelsOverride' | 'logo' | 'acTimes' | 'preferredWaveProduct' | 'preferredAirProduct'>> & {
10
- requiresInfoJson?: boolean;
3
+ import type { MinifestObject } from '@windy/Calendar.d';
4
+ import type { Layers } from '@windy/Layer.d';
5
+ import type { LatLon } from '@windy/interfaces';
6
+ import type { Isolines, Levels, Overlays, Products } from '@windy/rootScope.d';
7
+ import type { ISODateString, ProductCategory, ProductIdent, Timestamp, YYYYMMDDHH } from '@windy/types';
8
+ export type DataQuality = 'normal' | 'high' | 'low' | 'ultra' | 'extreme';
9
+ export type FileSuffix = 'png' | 'jpg' | 'webp';
10
+ export type ProductInitParams = Pick<Product, 'modelName' | 'provider' | 'interval'> & Partial<Pick<Product, 'provider' | 'ident' | 'maxTileZoom' | 'animationSpeed' | 'animationSpeed1h' | 'fileSuffix' | 'fileSuffixFallback' | 'JPGtransparency' | 'PNGtransparency' | 'dataQuality' | 'betterDataQuality' | 'animation' | 'labelsTemp' | 'overlays' | 'preferredProduct' | 'pathGenerator' | 'isolines' | 'directory' | 'category' | 'modelIdent' | 'intervalPremium' | 'server' | 'metadataServer' | 'modelResolution' | 'levels' | 'levelsOverride' | 'logo' | 'preferredWaveProduct' | 'preferredAirProduct' | 'hasAccumulations' | 'freeProduct' | 'hideProductSwitch'>> & {
11
11
  forecastSize?: number;
12
12
  bounds?: [number, number][][];
13
13
  };
@@ -42,7 +42,7 @@ export declare class Product {
42
42
  */
43
43
  private productExpires;
44
44
  /**
45
- * Unefective, but simple refTime solutions for data that are updated once a day
45
+ * Noneffective, but simple refTime solutions for data that are updated once a day
46
46
  */
47
47
  protected dailyCache?: string;
48
48
  /**
@@ -148,7 +148,6 @@ export declare class Product {
148
148
  * List of avail isolines
149
149
  */
150
150
  isolines: Isolines[];
151
- requiresInfoJson: boolean;
152
151
  /**
153
152
  * If we drag out of bounds, which product we should use (must be global air product)
154
153
  */
@@ -170,54 +169,58 @@ export declare class Product {
170
169
  */
171
170
  pathGenerator: string;
172
171
  /**
173
- * List of available accumulationTime
174
- */
175
- acTimes?: AcTimes[];
176
- /**
177
- * Alternative server, where the data are loaded from
172
+ * Alternative servers, where the data are loaded from
178
173
  */
179
174
  server?: string;
175
+ metadataServer?: string;
180
176
  /**
181
177
  * Some product (f.ex. StaticProduct) doesn't have meaningful
182
178
  * information about the model and time of the next update.
183
179
  * Set this to false to hide the info where not relevant (f.ex. Info plugin)
184
180
  */
185
181
  hasRefTime: boolean;
182
+ /**
183
+ * This product supper accumulations
184
+ */
185
+ hasAccumulations?: boolean;
186
+ /**
187
+ * This product is free for all users during whole timeline
188
+ */
189
+ freeProduct?: boolean;
190
+ /**
191
+ * Hide product switch in GUI, when this product is selected
192
+ */
193
+ hideProductSwitch?: boolean;
186
194
  constructor(params: ProductInitParams);
187
- refTime(): string;
195
+ refTime(): YYYYMMDDHH | undefined;
188
196
  getUpdateTimes(): {
189
- refTime: string;
190
- minUpdate: number;
191
- } | {
192
- refTime?: undefined;
193
- minUpdate?: undefined;
194
- };
195
- moveTs(moveRight: boolean, isAccu?: boolean): boolean | void;
197
+ refTime: ISODateString;
198
+ minUpdate: Timestamp;
199
+ } | null;
200
+ moveTs(moveRight: boolean, isAccu?: boolean): boolean;
196
201
  getMinifestUrl(): string;
197
202
  loadMinifest(): Promise<http.HttpPayload<MinifestObject>>;
203
+ loadAndGetReftime(): Promise<ISODateString | undefined>;
198
204
  open(): Promise<void | Calendar>;
199
205
  close(): void;
200
206
  /**
201
207
  * Checks if lat,lon is within bounds
202
208
  */
203
209
  pointIsInBounds<T extends LatLon>(this: this, paramsMap: T): boolean;
210
+ boundsAreInViewport(map: L.Map): boolean;
204
211
  printLogo(): void;
205
- getInfoFileUrl(): string;
206
212
  getCalendar(): Promise<Calendar>;
207
213
  protected expire(): void;
208
- protected getStoreKey(): `lastMinifest/${string}`;
209
- protected setMinifest(minifest: MinifestObject): void;
210
214
  protected setExpireTime(): void;
211
215
  /**
212
216
  * Major reason for this error is user's bad connection, which is handled
213
- * by standard no connetion red message
217
+ * by standard no connection red message
214
218
  *
215
- * We delay 0.3 sec to test properlly connection
219
+ * We delay 0.3 sec to test properly connection
216
220
  */
217
221
  protected showErrorMessage(err: string): void;
218
222
  protected loadAndProcessMinifest(forced?: boolean): Promise<void>;
219
- protected loadAndProcessInfo(): Promise<void>;
220
- private loadInfo;
221
223
  private checkNewMinifest;
224
+ private isPointInsidePolygon;
222
225
  private removeLogo;
223
226
  }
@@ -0,0 +1,19 @@
1
+ import { StaticProduct } from './StaticProduct';
2
+ import type { HttpPayload } from '@windy/http.d';
3
+ import type { SatelliteInfoJson } from '@windy/satellite.d';
4
+ import type { ProductInitParams } from './Product';
5
+ export type SatelliteProductInitParams = Pick<RadarPlusProduct, 'urlSuff' | 'urlSuffFlow'> & ProductInitParams;
6
+ export declare class RadarPlusProduct extends StaticProduct {
7
+ urlSuff: string;
8
+ urlSuffFlow: string;
9
+ constructor(params: SatelliteProductInitParams);
10
+ open(): Promise<undefined>;
11
+ /**
12
+ * Return info.json loading promise (https://sat.windy.com/satellite/info.json)
13
+ */
14
+ loadInfoJson(noCache?: boolean): Promise<HttpPayload<SatelliteInfoJson>>;
15
+ /**
16
+ * Handling keyboard shortcuts
17
+ */
18
+ moveTs(moveRight: boolean): boolean;
19
+ }
@@ -1,13 +1,6 @@
1
1
  import type { FullRenderParameters } from './d.ts.files/Layer.d';
2
- import type { Renderers } from './d.ts.files/Renderer.d';
2
+ import type { Renderers, AllowedUserControls, AllowedRenderPlugins, RendererInitParams } from './d.ts.files/Renderer.d';
3
3
  import type { InterpolatorFactory } from './d.ts.files/interpolator';
4
- import type { BottomTagPlugins, Plugins } from './d.ts.files/plugins.d';
5
- type AllowedRenderPlugins = Pick<Plugins, 'radar' | 'satellite' | 'cap-alerts' | 'isolines' | 'gl-particles' | 'particles'>;
6
- export interface RendererInitParams {
7
- ident: Renderers;
8
- dependency?: keyof AllowedRenderPlugins;
9
- userControl?: keyof BottomTagPlugins;
10
- }
11
4
  /**
12
5
  * Renderer class act as a proxy between renderController and code, which is responsible to
13
6
  * render particullar layer.
@@ -49,7 +42,7 @@ export declare class Renderer<K extends keyof AllowedRenderPlugins | undefined =
49
42
  *
50
43
  * userControl opening and closing is handles by rndrCtrl
51
44
  */
52
- userControl?: keyof BottomTagPlugins;
45
+ userControl?: AllowedUserControls;
53
46
  /**
54
47
  * Picker ingerpolation factory
55
48
  */
@@ -66,4 +59,3 @@ export declare class Renderer<K extends keyof AllowedRenderPlugins | undefined =
66
59
  paramsChanged(params: FullRenderParameters): void;
67
60
  redraw(): void;
68
61
  }
69
- export {};
@@ -15,5 +15,5 @@ export declare class SatelliteProduct extends StaticProduct {
15
15
  /**
16
16
  * Handling keyboard shortcuts
17
17
  */
18
- moveTs(moveRight: boolean): void;
18
+ moveTs(moveRight: boolean): boolean;
19
19
  }
@@ -1,14 +1,19 @@
1
1
  import { WindowPlugin } from '@windy/WindowPlugin';
2
2
  import type { WindowPluginInitParams } from '@windy/WindowPlugin';
3
3
  import type { PluginsOpenParams, PluginsQsParams } from '@windy/plugin-params.d';
4
- import type { SveltePanePlugins, SveltePlugins } from '@windy/plugins.d';
5
- export declare class SvelteApp<P extends keyof SveltePlugins | keyof SveltePanePlugins> {
4
+ import type { BottomSveltePlugins, SveltePanePlugins, SveltePlugins } from '@windy/plugins.d';
5
+ import type { InterpolatorFactory } from '@windy/interpolator';
6
+ import type { FullRenderParameters } from '@windy/Layer.d';
7
+ export declare class SvelteApp<P extends keyof SveltePlugins | keyof SveltePanePlugins | keyof BottomSveltePlugins> {
8
+ interpolator?: InterpolatorFactory;
6
9
  constructor(_args: {
7
10
  target: HTMLElement;
8
11
  anchor: HTMLElement;
9
12
  });
10
13
  onopen(params?: PluginsOpenParams[P], qs?: PluginsQsParams[P]): void;
11
14
  onclose(): void;
15
+ paramsChanged(params?: FullRenderParameters): void;
16
+ onRenderStart(params?: FullRenderParameters): void;
12
17
  $destroy(): void;
13
18
  }
14
19
  /**
@@ -25,16 +30,22 @@ export declare class ExternalSvelteApp {
25
30
  $destroy(): void;
26
31
  }
27
32
  /** Allowed params to SveltePlugin constructor (private and protected props are omited by default) */
28
- export type SveltePluginInitParams<P extends keyof SveltePlugins | keyof SveltePanePlugins> = Omit<WindowPluginInitParams<P>, 'ident'> & Pick<SveltePlugin<P>, 'ident'> & Partial<SveltePlugin<P>>;
29
- export declare class SveltePlugin<P extends keyof SveltePlugins | keyof SveltePanePlugins> extends WindowPlugin<P> {
33
+ export type SveltePluginInitParams<P extends keyof SveltePlugins | keyof SveltePanePlugins | keyof BottomSveltePlugins> = Omit<WindowPluginInitParams<P>, 'ident'> & Pick<SveltePlugin<P>, 'ident'> & Partial<SveltePlugin<P>>;
34
+ export declare class SveltePlugin<P extends keyof SveltePlugins | keyof SveltePanePlugins | keyof BottomSveltePlugins> extends WindowPlugin<P> {
30
35
  /**
31
36
  * Holder of SvelteApp
32
37
  */
33
- private svelteApp?;
38
+ svelteApp?: SvelteApp<P> | ExternalSvelteApp | null;
39
+ needsPluginRoot?: boolean;
34
40
  ident: P;
35
41
  plugin: WPluginModules[`@plugins/${P}`] & AdditionalSvelteAssets;
42
+ constructor(params: WindowPluginInitParams<P> & {
43
+ needsPluginRoot?: boolean;
44
+ });
36
45
  onopen(params?: PluginsOpenParams[P], _qs?: PluginsQsParams[P]): void;
37
46
  ondestroy(): void;
47
+ paramsChanged(params?: FullRenderParameters): void;
48
+ onRenderStart: (params?: FullRenderParameters) => void;
38
49
  protected mount(): void;
39
50
  protected unmount(): void;
40
51
  }
@@ -1,7 +1,6 @@
1
1
  import { Renderer } from '@windy/Renderer';
2
2
  import type { FullRenderParameters } from '@windy/Layer.d';
3
- import type { RendererInitParams } from '@windy/Renderer';
4
- import type { Renderers } from '@windy/Renderer.d';
3
+ import type { RendererInitParams, Renderers } from '@windy/Renderer.d';
5
4
  export declare class TileLayer extends Renderer {
6
5
  constructor(params: RendererInitParams);
7
6
  onopen(params?: FullRenderParameters): void;
@@ -0,0 +1,10 @@
1
+ import { Renderer } from '@windy/Renderer';
2
+ import type { FullRenderParameters } from '@windy/Layer.d';
3
+ import type { Renderers } from '@windy/Renderer.d';
4
+ export declare class TopoMap extends Renderer {
5
+ baseLayer: L.GridLayer | null;
6
+ open(_params: FullRenderParameters): Promise<void>;
7
+ close(rqrdRenderers: Renderers[]): void;
8
+ addOrUpdateBaseLayer(): void;
9
+ removeBaseLayer(): void;
10
+ }
@@ -1,3 +1,4 @@
1
+ import { BottomSlide } from '@windy/BottomSlide';
1
2
  import { Plugin } from '@windy/Plugin';
2
3
  import { Window } from '@windy/Window';
3
4
  import type { PluginInitParams } from '@windy/Plugin';
@@ -5,11 +6,10 @@ import type { WindowInitParams } from '@windy/Window';
5
6
  import type { PluginOpeningOptions, WindowClosingOptions } from '@windy/interfaces.d';
6
7
  import type { InterpolatorFactory } from '@windy/interpolator';
7
8
  import type { PluginsOpenParams, PluginsQsParams } from '@windy/plugin-params.d';
8
- import type { BottomTagPlugins, SveltePanePlugins, SveltePlugins, TagPlugins } from '@windy/plugins.d';
9
- import type { ParsedQueryString } from '@windy/queryString';
9
+ import type { BottomSveltePlugins, SveltePanePlugins, SveltePlugins, TagPlugins } from '@windy/plugins.d';
10
10
  import type { ListeningPriority } from '@windy/singleclick.d';
11
- import type { LoadedTranslations } from '@windy/trans.d';
12
- export interface WindowPlugins extends TagPlugins, SveltePlugins, SveltePanePlugins, BottomTagPlugins {
11
+ import type { LoadedTranslations, ParsedQueryString } from '@windy/types';
12
+ export interface WindowPlugins extends TagPlugins, SveltePlugins, SveltePanePlugins, BottomSveltePlugins {
13
13
  }
14
14
  /** Allowed params to WindowPlugin constructor (private and protected props are omited by default) */
15
15
  export type WindowPluginInitParams<P extends keyof WindowPlugins> = PluginInitParams<P> & Omit<WindowInitParams, 'ident' | 'html'> & Partial<Omit<WindowPlugin<P>, 'open' | 'load' | 'refs' | 'node' | 'domEl'>>;
@@ -26,6 +26,7 @@ export declare abstract class WindowPlugin<P extends keyof WindowPlugins> extend
26
26
  * ID of CSS style
27
27
  */
28
28
  protected cssID: `plugin-css-${string}`;
29
+ protected bottomSlide?: BottomSlide;
29
30
  /**
30
31
  * Was CSS inserted into the DOM
31
32
  */
@@ -117,6 +118,10 @@ export declare abstract class WindowPlugin<P extends keyof WindowPlugins> extend
117
118
  * header with title (adds .no-header class to the plugin container)
118
119
  */
119
120
  noHeader?: boolean;
121
+ /**
122
+ * While plugin was being opened, closing was requested
123
+ */
124
+ closingRequested?: boolean;
120
125
  constructor(params: WindowPluginInitParams<P>);
121
126
  /**
122
127
  * Check if plugin is loaded and decides if load or open. Params are passed to onopen fun
@@ -0,0 +1,2 @@
1
+ export declare const appsFlyerPromise: Promise<undefined>;
2
+ export declare function logAppsFlyerProductChange(): void;
@@ -1,10 +1,13 @@
1
1
  export type MapTilesKeys = 'graymap' | 'landmaskmap' | 'simplemap' | 'graymapPatch5' | 'graymapPatch11' | 'simplemapPatch5' | 'simplemapPatch9' | 'sznmap' | 'winter' | 'satLocal' | 'sat';
2
- /**
3
- * Leaflet instance of actually used base layer
4
- */
5
- export declare let baseLayer: L.GridLayer;
6
2
  /**
7
3
  * Return just record of different map tilesURLs that we use as basemap
8
4
  */
9
5
  export declare const mapTilesRecord: (patchType?: string | null) => Record<MapTilesKeys, string>;
10
- export declare function updateBasemap(map: L.Map): L.GridLayer;
6
+ /**
7
+ * Adds basemap to Leaflet map or updates source of tiles it if already exists
8
+ */
9
+ export declare function addOrUpdateBasemap(map: L.Map): void;
10
+ /**
11
+ * Remove basemap from Leaflet map
12
+ */
13
+ export declare function removeBasemap(map: L.Map): void;
@@ -1,2 +1,10 @@
1
- declare const _default: any;
2
- export default _default;
1
+ /**
2
+ * Handles adding/removing or disabling/enabling city labels on the map.
3
+ *
4
+ * @module cityLabels.ts
5
+ */
6
+ export declare const labelsLayer: any;
7
+ export declare const add: () => void;
8
+ export declare const remove: () => void;
9
+ export declare const disable: () => void;
10
+ export declare const enable: () => void;
@@ -8,5 +8,7 @@ import '@windy/metrics';
8
8
  export declare function storeSettings(): Promise<boolean>;
9
9
  /**
10
10
  * Loads settings from a cloud and merge them
11
+ *
12
+ * @returns true if there were any data to merge
11
13
  */
12
- export declare function loadAndMergeSettingFromCloud(): Promise<void>;
14
+ export declare function loadAndMergeSettingFromCloud(): Promise<boolean>;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Reusable color gradients
3
+ */
4
+ import type { RGBA, ColorGradient } from '@windy/Color.d';
5
+ import type { NumValue } from '@windy/types';
6
+ export declare const moistureAnomaly: RGBA[];
7
+ export declare const airPollutant: RGBA[];
8
+ export declare const cloudBaseAndVisibility: RGBA[];
9
+ export declare const radarGradientAndValues: ColorGradient;
10
+ /**
11
+ * Creates a color gradient from array of prepared ones
12
+ */
13
+ export declare const createColorGradient: (gradient: RGBA[], numValues: NumValue[]) => ColorGradient;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Connection is lost, user is offline
3
3
  */
4
- export declare function testNetworkConnection(): void;
4
+ export declare function testNetworkConnection(): Promise<void>;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,4 @@
1
- import { LoadedTranslations } from '@windy/trans.d';
2
- import { Timestamp, ISODateString } from '@windy/types.d';
1
+ import { Timestamp, ISODateString, LoadedTranslations } from '@windy/types.d';
3
2
 
4
3
  /**
5
4
  * Main minifest object. Mother of all forecasts
@@ -79,6 +78,16 @@ export interface CalendarDay {
79
78
  * year
80
79
  */
81
80
  year: number;
81
+
82
+ /**
83
+ * Forecast for this day is for Premium users only
84
+ */
85
+ premium: boolean;
86
+
87
+ /**
88
+ * Forecast for this day is available
89
+ */
90
+ hasForecast: boolean;
82
91
  }
83
92
 
84
93
  /**
@@ -39,7 +39,6 @@ export type ColorIdent =
39
39
  | 'rainAccu'
40
40
  | 'waves'
41
41
  | 'currents'
42
- | 'currentsTide'
43
42
  | 'visibility'
44
43
  | 'gtco3'
45
44
  | 'aod550'
@@ -51,6 +50,7 @@ export type ColorIdent =
51
50
  | 'dust'
52
51
  | 'satellite'
53
52
  | 'radar'
53
+ | 'radarPlus'
54
54
  | 'fog'
55
55
  | 'justGray'
56
56
  | 'efiWind'
@@ -58,16 +58,15 @@ export type ColorIdent =
58
58
  | 'efiRain'
59
59
  | 'moistureAnom40'
60
60
  | 'moistureAnom100'
61
- | 'drought40'
62
- | 'drought100'
63
- | 'soilMoisture40'
64
- | 'soilMoisture100'
61
+ | 'drought'
62
+ | 'soilMoisture'
65
63
  | 'fwi'
66
64
  | 'dfm10h'
67
65
  | 'solarpower'
68
66
  | 'uvindex'
69
67
  | 'turbulence'
70
68
  | 'icing'
69
+ | 'dewpoint'
71
70
  | 'wetbulbtemp';
72
71
 
73
72
  type PluginColorIdent =
@@ -80,3 +79,16 @@ type PluginColorIdent =
80
79
  | 'dewpointSpreadDetail'
81
80
  | 'blitz'
82
81
  | 'radiation';
82
+
83
+ // pressureIsolines color is dynamically created in @plugins/isolines
84
+ export type AnyColorIdent =
85
+ | ColorIdent
86
+ | PluginColorIdent
87
+ | 'pressureIsolines'
88
+ | 'temporary'
89
+ | 'direction';
90
+
91
+ export interface UserColor {
92
+ id: AnyColorIdent;
93
+ gradient: ColorGradient;
94
+ }
@@ -1,25 +1,8 @@
1
- import { Timestamp } from '@windy/types.d';
1
+ import { Timestamp, type NumOrNull } from '@windy/types.d';
2
2
 
3
3
  type CityDivId = string; // `${x}:${y}`
4
4
  type CityLabelId = string; // `${lat}/${lon}`
5
5
 
6
- /** Loaded forecast data from `/citytile/*` URL endpoint */
7
- export type CityForecastData = {
8
- /**
9
- * Forecasted temperatures for cities on the tile
10
- */
11
- forecast: {
12
- /**
13
- * Keys (coordinates) are in "lat/lon" format, value the forecasted temperature
14
- */
15
- [coordinates: string]: number[];
16
- };
17
- /** Reftime */
18
- reftime: Timestamp;
19
- /** Time from reftime in hours for every temperature value in the returned array */
20
- hours: number[];
21
- };
22
-
23
6
  /**
24
7
  * Loaded labels data from tiles.windy.com endpoint
25
8
  * Format of inner arrays is [id, title to show, category of label used for CSS class, lon, lat, width in px, height in px]
@@ -28,14 +11,14 @@ export type CityLabelData = [string, string, string, number, number, number, num
28
11
 
29
12
  /** Represantation of single one HTML label with its temperature data */
30
13
  export interface CityLabel {
31
- /** Id of the label, it is same as a key for CityForecastData, so it is used for pairing label with temperature data */
14
+ /** Id of the label, it is same as a key for `CityTemperaturesDto`, so it is used for pairing label with temperature data */
32
15
  id: CityLabelId;
33
16
 
34
17
  /** HTML element of the label for binding labels and temperature values */
35
18
  el: HTMLDivElement;
36
19
 
37
20
  /** Forecast data with temperature in K, it is lazy loaded with forecast request */
38
- data?: number[];
21
+ data?: NumOrNull[];
39
22
  }
40
23
 
41
24
  /** Representation of one leaflet tile with its CityLabels */