@windycom/plugin-devtools 3.0.1 → 3.0.3

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 (149) hide show
  1. package/README.md +1 -0
  2. package/package.json +1 -1
  3. package/types/client/Calendar.d.ts +104 -70
  4. package/types/client/Color.d.ts +25 -5
  5. package/types/client/DataTiler.d.ts +2 -2
  6. package/types/client/EcmwfProduct.d.ts +22 -0
  7. package/types/client/EventManager.d.ts +69 -0
  8. package/types/client/ExternalSveltePlugin.d.ts +4 -3
  9. package/types/client/GlBuffer.d.ts +45 -0
  10. package/types/client/GlMesh.d.ts +147 -0
  11. package/types/client/GlProgram.d.ts +41 -0
  12. package/types/client/GlRenderer.d.ts +95 -0
  13. package/types/client/GlTexture.d.ts +98 -0
  14. package/types/client/GlVertexArray.d.ts +38 -0
  15. package/types/client/IDB.d.ts +25 -4
  16. package/types/client/LabelsLayer.d.ts +69 -2
  17. package/types/client/Layer.d.ts +96 -26
  18. package/types/client/LayerClasses.d.ts +5 -0
  19. package/types/client/Metric.d.ts +31 -46
  20. package/types/client/MetricClasses.d.ts +1 -1
  21. package/types/client/Overlay.d.ts +5 -12
  22. package/types/client/OverlayClasses.d.ts +8 -0
  23. package/types/client/Particles.d.ts +1 -1
  24. package/types/client/Product.d.ts +38 -67
  25. package/types/client/ProductClasses.d.ts +51 -0
  26. package/types/client/RadarPlusProduct.d.ts +1 -1
  27. package/types/client/Renderer.d.ts +44 -19
  28. package/types/client/SatelliteProduct.d.ts +1 -1
  29. package/types/client/ShaderStorage.d.ts +25 -0
  30. package/types/client/StartupElementPlugin.d.ts +8 -0
  31. package/types/client/SveltePlugin.d.ts +5 -5
  32. package/types/client/SwitchableTileCache.d.ts +104 -0
  33. package/types/client/TileLayer.d.ts +12 -3
  34. package/types/client/TileLayerCustom.d.ts +51 -0
  35. package/types/client/TileLayerMulti.d.ts +53 -0
  36. package/types/client/TileLayerPreprocessorStandalone.d.ts +45 -0
  37. package/types/client/TileLayerRenderer.d.ts +24 -0
  38. package/types/client/TileLayerUtils.d.ts +43 -0
  39. package/types/client/TilePreprocessor.d.ts +27 -0
  40. package/types/client/TopoMap.d.ts +4 -4
  41. package/types/client/WindowPlugin.d.ts +7 -6
  42. package/types/client/appsFlyer.d.ts +2 -1
  43. package/types/client/baseMap.d.ts +12 -2
  44. package/types/client/broadcast.d.ts +1 -1
  45. package/types/client/cityLabels.d.ts +2 -3
  46. package/types/client/colorGradients.d.ts +4 -10
  47. package/types/client/colors.d.ts +1 -2
  48. package/types/client/css.test.d.ts +1 -0
  49. package/types/client/customProtocol.d.ts +11 -0
  50. package/types/client/d.ts.files/GlObj.d.ts +1 -5
  51. package/types/client/d.ts.files/Metric.d.ts +23 -2
  52. package/types/client/d.ts.files/alerts.d.ts +1 -0
  53. package/types/client/d.ts.files/broadcast.d.ts +31 -35
  54. package/types/client/d.ts.files/dataSpecifications.d.ts +82 -66
  55. package/types/client/d.ts.files/favs.d.ts +7 -18
  56. package/types/client/d.ts.files/glUtils.d.ts +71 -0
  57. package/types/client/d.ts.files/http.d.ts +4 -4
  58. package/types/client/d.ts.files/interpolatorTypes.d.ts +5 -5
  59. package/types/client/d.ts.files/lib.d.ts +1 -2
  60. package/types/client/d.ts.files/liveAlerts.d.ts +52 -0
  61. package/types/client/d.ts.files/mapUtils.d.ts +25 -0
  62. package/types/client/d.ts.files/outgoingMessages.d.ts +1 -1
  63. package/types/client/d.ts.files/plugin-params.d.ts +46 -24
  64. package/types/client/d.ts.files/plugins.d.ts +44 -31
  65. package/types/client/d.ts.files/rootScope.d.ts +2 -0
  66. package/types/client/d.ts.files/singleclick.d.ts +4 -2
  67. package/types/client/d.ts.files/startup.d.ts +7 -52
  68. package/types/client/d.ts.files/storage.d.ts +0 -11
  69. package/types/client/d.ts.files/user.d.ts +6 -1
  70. package/types/client/d.ts.files/webcams.d.ts +9 -2
  71. package/types/client/dataLoader.d.ts +2 -2
  72. package/types/client/detectDevice.d.ts +3 -0
  73. package/types/client/embed.d.ts +2 -7
  74. package/types/client/errorLogger.d.ts +20 -1
  75. package/types/client/externalPlugins.d.ts +5 -1
  76. package/types/client/fetch.d.ts +62 -5
  77. package/types/client/format.d.ts +12 -0
  78. package/types/client/glContextUtils.d.ts +9 -0
  79. package/types/client/glStatus.d.ts +7 -0
  80. package/types/client/glTileRender.d.ts +1 -7
  81. package/types/client/glUtils.d.ts +119 -0
  82. package/types/client/http.d.ts +0 -6
  83. package/types/client/idbConnection.d.ts +13 -0
  84. package/types/client/idbInstances.d.ts +118 -13
  85. package/types/client/landLayer.d.ts +3 -0
  86. package/types/client/layers.d.ts +5 -2
  87. package/types/client/legends.d.ts +1 -1
  88. package/types/client/lib.d.ts +11 -21
  89. package/types/client/liveAlerts.d.ts +2 -2
  90. package/types/client/location.d.ts +1 -1
  91. package/types/client/map.d.ts +94 -15
  92. package/types/client/mapUtils.d.ts +66 -0
  93. package/types/client/math.d.ts +14 -0
  94. package/types/client/mobile.d.ts +16 -41
  95. package/types/client/mobileUtils.d.ts +10 -0
  96. package/types/client/models.d.ts +2 -6
  97. package/types/client/overlays.d.ts +4 -3
  98. package/types/client/particleRenderers.d.ts +1 -1
  99. package/types/client/picker.d.ts +4 -8
  100. package/types/client/plugins.d.ts +0 -4
  101. package/types/client/products.d.ts +53 -2
  102. package/types/client/promo.d.ts +28 -5
  103. package/types/client/pushNotifications.d.ts +19 -1
  104. package/types/client/renderCtrl.d.ts +1 -1
  105. package/types/client/renderTile.d.ts +2 -2
  106. package/types/client/renderUtils.d.ts +21 -27
  107. package/types/client/renderers.d.ts +6 -9
  108. package/types/client/reverseName.d.ts +2 -1
  109. package/types/client/rhMessage.d.ts +1 -1
  110. package/types/client/rootScope.d.ts +17 -9
  111. package/types/client/router.d.ts +41 -9
  112. package/types/client/seoParser.d.ts +35 -0
  113. package/types/client/showableErrorsService.d.ts +10 -6
  114. package/types/client/singleclick.d.ts +1 -1
  115. package/types/client/startup.d.ts +48 -0
  116. package/types/client/startupUtils.d.ts +19 -0
  117. package/types/client/store.d.ts +20 -52
  118. package/types/client/subscription.d.ts +3 -26
  119. package/types/client/throttler.d.ts +32 -0
  120. package/types/client/tileHelpers.d.ts +35 -0
  121. package/types/client/tileInterpolator.d.ts +1 -1
  122. package/types/client/tileLayerInterpolator.d.ts +40 -0
  123. package/types/client/tileLayerSource.d.ts +98 -0
  124. package/types/client/timestampUtils.test.d.ts +1 -0
  125. package/types/client/topMessage.d.ts +22 -0
  126. package/types/client/user.d.ts +1 -0
  127. package/types/client/userAlerts.d.ts +0 -4
  128. package/types/client/userConsent.d.ts +0 -2
  129. package/types/client/userFavs.d.ts +17 -12
  130. package/types/client/utils.d.ts +78 -25
  131. package/types/client/utils.test.d.ts +1 -0
  132. package/types/iconfont.d.ts +2 -5
  133. package/types/interfaces.d.ts +290 -88
  134. package/types/lang-files.d.ts +578 -98
  135. package/types/leaflet-gl.d.ts +12773 -0
  136. package/types/types.d.ts +323 -11
  137. package/types/client/d.ts.files/Calendar.d.ts +0 -96
  138. package/types/client/d.ts.files/CanvasLayer.d.ts +0 -70
  139. package/types/client/d.ts.files/Color.d.ts +0 -94
  140. package/types/client/d.ts.files/DataTiler.d.ts +0 -45
  141. package/types/client/d.ts.files/LandMask.d.ts +0 -17
  142. package/types/client/d.ts.files/Layer.d.ts +0 -191
  143. package/types/client/d.ts.files/PoisOverlay.d.ts +0 -27
  144. package/types/client/d.ts.files/Renderer.d.ts +0 -44
  145. package/types/client/d.ts.files/TileLayerCanvas.d.ts +0 -78
  146. package/types/client/d.ts.files/TileLayerMultiPatch.d.ts +0 -13
  147. package/types/client/d.ts.files/products.d.ts +0 -60
  148. package/types/client/imaker.d.ts +0 -112
  149. package/types/offline.d.ts +0 -100
@@ -1,43 +1,49 @@
1
1
  /**
2
2
  * Main Windy interfaces
3
3
  */
4
- import { Weekday } from '@windy/Calendar.d';
5
- import { ExtendedTileParams } from '@windy/DataTiler.d';
4
+ import { Weekday } from '@windy/Calendar';
6
5
  import { FavId } from '@windy/favs';
7
- import { FullRenderParameters } from '@windy/Layer.d';
8
- import { Particles } from '@windy/Particles';
9
- import { PluginsOpenParams, PluginOpenEventSource, PluginsQsParams } from '@windy/plugin-params.d';
6
+ import { Layers } from '@windy/Layer';
7
+ import { PluginOpenEventSource, PluginsOpenParams, PluginsQsParams } from '@windy/plugin-params.d';
10
8
  import { Plugins } from '@windy/plugins.d';
9
+ import { DataQuality } from '@windy/Product';
11
10
  import { Isolines, Levels, Overlays, PointProducts, Products } from '@windy/rootScope.d';
12
11
  import {
13
12
  BatteryPreferences,
14
13
  CapAlertInfo,
15
14
  CapAlertSeverity,
16
15
  CapAlertType,
16
+ CustomAppIcon,
17
17
  DetailDisplayType,
18
18
  DetailRows,
19
19
  Directions,
20
20
  GoogleServicesPreferences,
21
21
  GpsPreferences,
22
+ Hours,
22
23
  ISODateString,
24
+ ISOCountryCode,
23
25
  LocationPreferences,
24
26
  MeteogramLayers,
25
27
  MeteogramLevels,
28
+ Minutes,
26
29
  NotificationPreferences,
27
30
  NumOrNull,
28
31
  NumValue,
32
+ ParticlesIdent,
29
33
  Path,
34
+ PatternType,
30
35
  Pixel,
31
36
  Platform,
37
+ RenderChannels,
38
+ SubTier,
32
39
  Timestamp,
40
+ TransformFunction,
33
41
  WidgetNotificationPreferences,
34
42
  WidgetType,
35
43
  YearMonthDay,
36
- Hours,
37
- Minutes,
38
- SubTier,
39
- CustomAppIcon,
44
+ type SemVersion,
40
45
  } from '@windy/types.d';
46
+ import type { LatLng, Marker, PaddingOptions, RequireAtLeastOne } from '@leafletGl';
41
47
 
42
48
  export interface ExportedObj {
43
49
  default?: unknown;
@@ -101,7 +107,7 @@ export interface GeolocationInfo extends LatLon {
101
107
  /**
102
108
  * Optional lowercase 2 letter ISO country code
103
109
  */
104
- cc?: string;
110
+ cc?: ISOCountryCode;
105
111
 
106
112
  /**
107
113
  * Optional name of the place
@@ -251,12 +257,11 @@ export interface AlertProps {
251
257
  }
252
258
 
253
259
  export interface WeatherParameters {
254
- acRange: Timestamp;
260
+ acRange: Hours;
255
261
  overlay: Overlays;
256
262
  level: Levels;
257
263
  isolinesType: Isolines;
258
264
  isolinesOn: boolean;
259
- path: Path;
260
265
  product: Products;
261
266
  }
262
267
 
@@ -275,9 +280,9 @@ export interface LastSentDevice {
275
280
  deviceID: string;
276
281
  platform: string;
277
282
  target: string;
278
- version: string;
283
+ version: SemVersion;
279
284
  subscription: SubTier;
280
- cc: string;
285
+ cc: ISOCountryCode | 'xx';
281
286
  deactivated?: boolean;
282
287
  updated?: number;
283
288
  screen?: {
@@ -306,9 +311,9 @@ export interface TilePoint {
306
311
  }
307
312
 
308
313
  /**
309
- * Celestial object as received from backend
314
+ * Timezone information as received from backend
310
315
  */
311
- export interface Celestial {
316
+ export interface TZinfo {
312
317
  /**
313
318
  * Time zone abbreviation (for instance CEST)
314
319
  */
@@ -338,7 +343,12 @@ export interface Celestial {
338
343
  * Type of TZ type t..terrestrial, n..nautical
339
344
  */
340
345
  TZtype: 't' | 'n';
346
+ }
341
347
 
348
+ /**
349
+ * Celestial object as received from backend
350
+ */
351
+ export interface Celestial extends TZinfo {
342
352
  /**
343
353
  * Determines probability if the location is at sea or not as number from 1..0
344
354
  * Unfortunately the number is inverted, so 1 means land, and 0 means sea
@@ -372,6 +382,11 @@ export interface Celestial {
372
382
  sunsetTs: Timestamp;
373
383
  }
374
384
 
385
+ export type CelestialWithoutTimezone = Pick<
386
+ Celestial,
387
+ 'night' | 'sunsetTs' | 'sunriseTs' | 'duskTs' | 'isDay' | 'atSea'
388
+ >;
389
+
375
390
  /**
376
391
  * Summary day as received from backend
377
392
  */
@@ -488,7 +503,6 @@ export interface IsDay {
488
503
  /**
489
504
  * Weather data object as received from backend (full version)
490
505
  */
491
-
492
506
  export interface DataHash extends SummaryDataHash, IsDay {
493
507
  /**
494
508
  * Day identifier
@@ -508,7 +522,7 @@ export interface DataHash extends SummaryDataHash, IsDay {
508
522
  /**
509
523
  * Local Time hour for given place in 24h format
510
524
  */
511
- hour: number[];
525
+ hour: Hours[];
512
526
 
513
527
  /**
514
528
  * Weather icon identifier
@@ -645,6 +659,80 @@ export type PickDataHashPropsByType<U, Strict = true> = Pick<
645
659
  }[keyof DataHash]
646
660
  >;
647
661
 
662
+ export interface AirQDataHash extends IsDay {
663
+ /**
664
+ * Timestamp of beginning of segment
665
+ */
666
+ ts: Timestamp[];
667
+
668
+ /**
669
+ * Day identifier
670
+ */
671
+ day: YearMonthDay[];
672
+
673
+ /**
674
+ * Local Time hour for given place in 24h format
675
+ */
676
+ hour: Hours[];
677
+
678
+ /**
679
+ * CAMS airq properties
680
+ */
681
+ aqiUs: NumValue[];
682
+ /**
683
+ * Concentration of carbon monoxide (CO) in the air.
684
+ */
685
+ chemsCosc: NumValue[];
686
+ /**
687
+ * Concentration of dust particles (coarse particulate matter) in the air.
688
+ */
689
+ chemsDustsm: NumValue[];
690
+ /**
691
+ * Concentration of sulfur dioxide (SO2) in the air.
692
+ */
693
+ chemsSo2sm: NumValue[];
694
+ /**
695
+ * Ground-level ozone (O3) concentration.
696
+ */
697
+ go3: NumValue[];
698
+ /**
699
+ * Nitrogen dioxide (NO2) concentration.
700
+ */
701
+ no2: NumValue[];
702
+ /**
703
+ * Particulate matter with a diameter of 10 micrometers or less.
704
+ */
705
+ pm10: NumValue[];
706
+ /**
707
+ * Particulate matter with a diameter of 2.5 micrometers or less.
708
+ */
709
+ pm2p5: NumValue[];
710
+ /**
711
+ * Concentration of Alder pollen.
712
+ */
713
+ pollenAlder?: NumValue[];
714
+ /**
715
+ * Concentration of Birch pollen.
716
+ */
717
+ pollenBirch?: NumValue[];
718
+ /**
719
+ * Concentration of Grass pollen.
720
+ */
721
+ pollenGrass?: NumValue[];
722
+ /**
723
+ * Concentration of Mugwort pollen.
724
+ */
725
+ pollenMugwort?: NumValue[];
726
+ /**
727
+ * Concentration of Olive pollen.
728
+ */
729
+ pollenOlive?: NumValue[];
730
+ /**
731
+ * Concentration of Ragweed pollen.
732
+ */
733
+ pollenRagweed?: NumValue[];
734
+ }
735
+
648
736
  /**
649
737
  * node-forecast header object
650
738
  */
@@ -772,7 +860,9 @@ export interface WeatherDataNow {
772
860
  /**
773
861
  * Weather data or Summary Weather data JSON as received from node-forecast
774
862
  */
775
- export interface WeatherDataPayload<T extends DataHash | SummaryDataHash> {
863
+ export interface WeatherDataPayload<
864
+ T extends DataHash | SummaryDataHash | AirQDataHash = DataHash,
865
+ > {
776
866
  header: NodeForecastHeader;
777
867
  celestial: Celestial;
778
868
  summary: Record<YearMonthDay, SummaryDay>;
@@ -837,7 +927,7 @@ export type WeatherTableRenderingOptions = {
837
927
  * Should we use 12h format for time?
838
928
  */
839
929
  is12hFormat?: boolean;
840
- } & Pick<DetailParams, 'display' | 'step' | 'rows' | 'days'>;
930
+ } & Pick<DetailParams, 'display' | 'step' | 'days'>;
841
931
 
842
932
  /**
843
933
  * Parameters used for displaying detail (point forecast)
@@ -912,25 +1002,6 @@ export interface MeteogramDataPayload {
912
1002
  data: MeteogramDataHash;
913
1003
  }
914
1004
 
915
- /**
916
- * Particle animation parameters
917
- */
918
- export interface ExtendedRenderParams extends ExtendedTileParams, FullRenderParameters {
919
- canvas: HTMLCanvasElement;
920
-
921
- /**
922
- * Actual instance of particles
923
- */
924
- partObj: Particles;
925
-
926
- /**
927
- * Pointer to dest table
928
- */
929
- vectors: Float32Array;
930
-
931
- speed2pixel: number;
932
- }
933
-
934
1005
  /**
935
1006
  * How good are observations by this AD or WX station?
936
1007
  */
@@ -942,7 +1013,7 @@ export interface ObservationInfo {
942
1013
  }
943
1014
 
944
1015
  export interface ServiceGeoipResponse {
945
- country: string;
1016
+ country: ISOCountryCode;
946
1017
  region: `${number}`;
947
1018
  eu: '0' | '1';
948
1019
  timezone: string;
@@ -951,11 +1022,6 @@ export interface ServiceGeoipResponse {
951
1022
  metro: number;
952
1023
  area: number;
953
1024
  ip: string;
954
-
955
- /**
956
- * @deprecated
957
- */
958
- hash: 'oiurouoweruouoiuou';
959
1025
  }
960
1026
 
961
1027
  export interface BillingPluginMinimalProduct {
@@ -1136,18 +1202,38 @@ export interface WindyWatchPlugin {
1136
1202
  addWatchFace: () => Promise<unknown>;
1137
1203
  }
1138
1204
 
1139
- export interface WindyServicePlugin {
1205
+ export interface WindyServicesPlugin {
1140
1206
  openSettings: () => Promise<void | string>;
1141
1207
  getLocationPermissions: () => Promise<LocationPreferences>;
1142
1208
  getNotificationPermissions: () => Promise<NotificationPreferences>;
1143
1209
  openApplicationSettings: () => Promise<void | string>;
1144
1210
  isGpsEnabled: () => Promise<GpsPreferences>;
1145
- getBatteryUsagePermissions: () => Promise<BatteryPreferences>;
1211
+ /**
1212
+ * Android-only function that checks whether the app has battery usage permissions.
1213
+ *
1214
+ * - If the user has no widget installed, it always resolves to "authorized".
1215
+ * - Otherwise, it may resolve to:
1216
+ * - "authorized" → permission granted
1217
+ * - "denied" → permission restricted
1218
+ *
1219
+ * May be undefined on non-Android platforms.
1220
+ *
1221
+ * @returns {Promise<BatteryPreferences>} A promise resolving to "authorized" or "denied".
1222
+ * */
1223
+ getBatteryUsagePermissions?: () => Promise<BatteryPreferences>;
1146
1224
  openBatterySettings: () => Promise<void>;
1147
1225
  getGoogleServicesAvailability: () => Promise<GoogleServicesPreferences>;
1148
1226
  getWidgetNotificationPermissions: () => Promise<WidgetNotificationPreferences>;
1149
1227
  openWidgetNotificationSettings: () => Promise<void>;
1150
1228
  getBackgroundLocationPermission: () => Promise<GpsPreferences>;
1229
+ /**
1230
+ * Android-only function that checks whether the app has battery usage permissions.
1231
+ *
1232
+ * May be undefined on non-Android platforms.
1233
+ *
1234
+ * @returns {Promise<BatteryPreferences>} A promise resolving to "authorized" or "denied".
1235
+ */
1236
+ getBatteryStatus?: () => Promise<BatteryPreferences>;
1151
1237
  openBackgroundLocationSettings: () => Promise<void>;
1152
1238
  logError: (arg: { moduleName: string; msg: string; error?: string }) => Promise<void>;
1153
1239
  getId: () => Promise<{ identifier: string }>;
@@ -1248,6 +1334,74 @@ export interface WindyMigrationPlugin {
1248
1334
  getOldLocalStorageDataAndroid: () => Promise<{ result: string | null }>;
1249
1335
  }
1250
1336
 
1337
+ export interface ImageOptions {
1338
+ maxWidth?: number;
1339
+ maxHeight?: number;
1340
+ quality?: number; // 0..1
1341
+ format?: 'jpeg' | 'png'; // default 'jpeg'
1342
+ }
1343
+
1344
+ export interface VideoOptions {
1345
+ preset?: 'medium' | 'low' | 'h264_720p' | 'h264_1080p' | 'passthrough'; // Medium is default
1346
+ }
1347
+
1348
+ export interface CompressOptions {
1349
+ imageOptions?: ImageOptions;
1350
+ videoOptions?: VideoOptions;
1351
+ }
1352
+
1353
+ export interface OneCompressOptions extends CompressOptions {
1354
+ id: string;
1355
+ }
1356
+
1357
+ export interface PickedItem {
1358
+ id: string;
1359
+ kind: 'image' | 'video' | 'unknown';
1360
+ filename?: string;
1361
+ mimeType?: string;
1362
+ originalPath?: string; // POSIX path to original temp file
1363
+ width?: number;
1364
+ height?: number;
1365
+ duration?: number;
1366
+ size?: number; // bytes
1367
+ }
1368
+
1369
+ export interface CompressedItem extends PickedItem {
1370
+ compressedPath: string; // POSIX path to compressed file
1371
+ compressedSize: number; // bytes
1372
+ }
1373
+
1374
+ /**
1375
+ * Extended MediaItem type that supports both native compressed items
1376
+ * and web-based items with blob references
1377
+ */
1378
+ export interface MediaItem extends PickedItem {
1379
+ compressedPath?: string; // For native plugin
1380
+ compressedSize?: number;
1381
+ blob?: Blob; // For web fallback (full-size, no compression)
1382
+ blobUrl?: string; // Object URL for preview
1383
+ }
1384
+
1385
+ type PickOptions = {
1386
+ selectionLimit?: number;
1387
+ };
1388
+
1389
+ // iOS only
1390
+ export interface WindyMediaPlugin {
1391
+ pick(options?: PickOptions): Promise<{ items: PickedItem[] }>;
1392
+ getPicked(): Promise<{ items: PickedItem[] }>;
1393
+ removeFromPicked(id: string): Promise<{ success: boolean }>;
1394
+ pickAndCompress(options?: PickOptions): Promise<{ items: CompressedItem[] }>;
1395
+ compressOne(arg: OneCompressOptions): Promise<{ item: CompressedItem }>;
1396
+ // CompressAll - if compress options are not provided, default options will be used
1397
+ compressAll(arg: CompressOptions | undefined): Promise<{ items: CompressedItem[] }>;
1398
+ clearAll(): Promise<void>;
1399
+ addListener(
1400
+ eventName: 'compressionProgress',
1401
+ listener: (payload: { total: number; done: number; percent: number }) => void,
1402
+ ): { remove: () => void };
1403
+ }
1404
+
1251
1405
  export interface SocialLoginParams {
1252
1406
  purpose: string;
1253
1407
  deviceId: string;
@@ -1321,8 +1475,8 @@ export interface PluginOpeningOptions<P extends keyof Plugins> extends WindowOpe
1321
1475
  */
1322
1476
  export interface RplannerPoint {
1323
1477
  ident: number;
1324
- marker: L.Marker;
1325
- position: L.LatLng;
1478
+ marker: Marker;
1479
+ position: LatLng;
1326
1480
  }
1327
1481
 
1328
1482
  /**
@@ -1332,7 +1486,7 @@ export interface RplannerWaypoint {
1332
1486
  distance?: number;
1333
1487
  ident?: number;
1334
1488
  initialBearing?: number;
1335
- point: L.LatLng;
1489
+ point: LatLng;
1336
1490
  rads?: {
1337
1491
  cosInitialBearing: number;
1338
1492
  cosLat: number;
@@ -1443,7 +1597,7 @@ export interface ExternalPluginConfig {
1443
1597
  *
1444
1598
  * @example '1.0.0'
1445
1599
  */
1446
- version: string;
1600
+ version: SemVersion;
1447
1601
 
1448
1602
  /**
1449
1603
  * Official title of the plugin, that will be displayed as a browser title,
@@ -1563,6 +1717,11 @@ export interface CompiledExternalPluginConfig extends ExternalPluginConfig {
1563
1717
  * Already installed external plugin
1564
1718
  */
1565
1719
  export interface InstalledExternalPluginConfig extends CompiledExternalPluginConfig {
1720
+ /**
1721
+ * ID must be present to enable backend cloud sync
1722
+ */
1723
+ id: string;
1724
+
1566
1725
  /**
1567
1726
  * URL of the plugin is used as unique identifier
1568
1727
  */
@@ -1571,7 +1730,7 @@ export interface InstalledExternalPluginConfig extends CompiledExternalPluginCon
1571
1730
  /**
1572
1731
  * From which process was plugin installed
1573
1732
  */
1574
- installedBy: 'dev' | 'gallery' | 'url' | 'patch';
1733
+ installedBy: 'dev' | 'gallery' | 'url';
1575
1734
 
1576
1735
  /**
1577
1736
  * When was this plugin installed by specific user
@@ -1586,71 +1745,103 @@ interface PromoFilteringParams {
1586
1745
  }
1587
1746
 
1588
1747
  /**
1589
- * Main promo object, used in `client-patch`
1748
+ * Amount of active hurricanes as returnd from hurricane tracker backend
1749
+ */
1750
+ export interface ActiveStormCountPayload {
1751
+ activeStormCount: number;
1752
+ }
1753
+
1754
+ /**
1755
+ * These properties are passed directly to renderer by enhancing returned params
1590
1756
  */
1591
- interface PromoObj {
1757
+ interface RenderParams {
1592
1758
  /**
1593
- * Main ID of the promo. This key is also used in `promo` object in localStorage
1759
+ * Which channels contain tile rendering data
1594
1760
  */
1595
- readonly id: string;
1761
+ renderFrom?: RenderChannels;
1596
1762
 
1597
1763
  /**
1598
- * ISO date, when the promo expires
1764
+ * Not confirmed: Display map as a sea, meaning the sea layers are below surface layers
1599
1765
  */
1600
- readonly end: string;
1766
+ sea?: boolean;
1601
1767
 
1602
1768
  /**
1603
- * How many times display promo to the user (respective on one device)
1769
+ * Display map as a land, meaning the sea area is hidden with mask
1604
1770
  */
1605
- counter: number;
1771
+ landOnly?: boolean;
1606
1772
 
1607
1773
  /**
1608
- * How often to display promo on particular device (in ms)
1774
+ * Identifier of particle type
1609
1775
  */
1610
- delay: number;
1776
+ particlesIdent?: ParticlesIdent;
1611
1777
 
1612
1778
  /**
1613
- * Any others filters, deciding whether to display promo or not
1779
+ * Uses two instances of Color for rendering
1614
1780
  */
1615
- filter: () => boolean;
1781
+ isMultiColor?: boolean;
1616
1782
 
1617
1783
  /**
1618
- * Should we display HP articles together with promo
1619
- * @deprecated
1784
+ * Should green channel be interpolated to nearest discreet value
1620
1785
  */
1621
- loadArticles?: boolean;
1786
+ interpolateNearestG?: boolean;
1622
1787
 
1623
1788
  /**
1624
- * Required method to be run, when promo is executed. In this stage we can also
1625
- * do some additional checks, if promo should be displayed or not, so we must
1626
- * call `promo.hitCounter()` method ourselves.
1789
+ * Name of interpolator method
1627
1790
  */
1628
- readonly run: () => void;
1791
+ interpolate?: 'interpolateOverlay' | 'interpolateWaves';
1629
1792
 
1630
1793
  /**
1631
- * Optional HTML code to be used internally in `run` method
1794
+ * Used patternator
1632
1795
  */
1633
- html?: string;
1796
+ pattern?: PatternType;
1634
1797
  }
1635
1798
 
1636
1799
  /**
1637
- * Client patch object
1800
+ * Set of params required to render the layer
1638
1801
  */
1639
- interface ClientPatch {
1640
- __version: string;
1641
- __css: string;
1642
- exclusivePromos: PromoObj[];
1643
- otherPromos: PromoObj[];
1644
- }
1802
+ interface FullRenderParameters extends WeatherParameters, RenderParams {
1803
+ layer: Layers;
1804
+ JPGtransparency?: boolean;
1805
+ PNGtransparency?: boolean;
1806
+ transformR?: TransformFunction;
1807
+ transformG?: TransformFunction;
1808
+ transformB?: TransformFunction;
1809
+ directory: string;
1810
+
1811
+ /**
1812
+ * Specify zoom of mercator data tiles in dependence of map zoom
1813
+ */
1814
+ dataQuality?: DataQuality;
1815
+ maxTileZoom?: {
1816
+ free: number;
1817
+ premium: number;
1818
+ };
1645
1819
 
1646
- /**
1647
- * Amount of active hurricanes as returnd from hurricane tracker backend
1648
- */
1649
- export interface ActiveStormCountPayload {
1650
- activeStormCount: number;
1820
+ /**
1821
+ * bump data quality by 1 level for particular overlay/layer
1822
+ */
1823
+ upgradeDataQuality?: boolean;
1824
+
1825
+ /**
1826
+ * Force to select particular zoom of data tiles
1827
+ */
1828
+ dataTilesZoom?: number;
1829
+
1830
+ level: Levels;
1831
+ refTime: Path;
1832
+ fullPath: string;
1833
+ path: Path;
1834
+
1835
+ /**
1836
+ * Optional accumulation range in hours
1837
+ */
1838
+ acRangeInHours?: number;
1839
+
1840
+ // TODO: Why this does not use FileSuffix type?
1841
+ fileSuffix?: 'png' | 'jpg' | 'json';
1651
1842
  }
1652
1843
 
1653
- /**
1844
+ /*
1654
1845
  * Cap alert was slided from left to right on startup screen
1655
1846
  */
1656
1847
  export interface CapAlertSlided {
@@ -1661,7 +1852,7 @@ export interface CapAlertSlided {
1661
1852
  /**
1662
1853
  * Handy payload or reusable data that helps to render Forecast Table
1663
1854
  */
1664
- export interface WeatherTableRenderingData {
1855
+ export interface WeatherTableRenderingData<T extends DataHash | AirQDataHash = DataHash> {
1665
1856
  /**
1666
1857
  * Day identifiers, that were used in data object (above)
1667
1858
  */
@@ -1670,7 +1861,12 @@ export interface WeatherTableRenderingData {
1670
1861
  /**
1671
1862
  * Loaded data.data (modified later by splicing data arrays)
1672
1863
  */
1673
- data: DataHash;
1864
+ data: T;
1865
+
1866
+ /**
1867
+ * Type of the data above
1868
+ */
1869
+ dataType: 'forecast' | 'airq';
1674
1870
 
1675
1871
  /**
1676
1872
  * Length of used forecast as a umber of TD segments
@@ -1686,6 +1882,7 @@ export interface WeatherTableRenderingData {
1686
1882
  tsWidth: Timestamp;
1687
1883
  pxWidth: Pixel;
1688
1884
  px2ts: number;
1885
+ tdWidth: Pixel;
1689
1886
 
1690
1887
  /**
1691
1888
  * UTC offset in hours
@@ -1707,3 +1904,8 @@ export interface WeatherTableRenderingData {
1707
1904
  */
1708
1905
  summary: Record<YearMonthDay, SummaryDay>;
1709
1906
  }
1907
+
1908
+ export interface SimplifiedGetBoundsOptions {
1909
+ animate?: boolean;
1910
+ padding?: RequireAtLeastOne<PaddingOptions>;
1911
+ }