@windycom/plugin-devtools 3.0.2 → 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 (112) hide show
  1. package/package.json +1 -1
  2. package/types/client/Calendar.d.ts +4 -0
  3. package/types/client/Color.d.ts +9 -2
  4. package/types/client/DataTiler.d.ts +2 -2
  5. package/types/client/EventManager.d.ts +69 -0
  6. package/types/client/ExternalSveltePlugin.d.ts +4 -3
  7. package/types/client/GlBuffer.d.ts +45 -0
  8. package/types/client/GlMesh.d.ts +147 -0
  9. package/types/client/GlProgram.d.ts +41 -0
  10. package/types/client/GlRenderer.d.ts +95 -0
  11. package/types/client/GlTexture.d.ts +98 -0
  12. package/types/client/GlVertexArray.d.ts +38 -0
  13. package/types/client/IDB.d.ts +25 -4
  14. package/types/client/LabelsLayer.d.ts +69 -2
  15. package/types/client/Layer.d.ts +2 -1
  16. package/types/client/MetricClasses.d.ts +1 -1
  17. package/types/client/Overlay.d.ts +1 -5
  18. package/types/client/Product.d.ts +10 -5
  19. package/types/client/ProductClasses.d.ts +7 -0
  20. package/types/client/Renderer.d.ts +16 -19
  21. package/types/client/ShaderStorage.d.ts +25 -0
  22. package/types/client/StartupElementPlugin.d.ts +8 -0
  23. package/types/client/SveltePlugin.d.ts +4 -4
  24. package/types/client/SwitchableTileCache.d.ts +104 -0
  25. package/types/client/TileLayer.d.ts +11 -2
  26. package/types/client/TileLayerCustom.d.ts +51 -0
  27. package/types/client/TileLayerMulti.d.ts +53 -0
  28. package/types/client/TileLayerPreprocessorStandalone.d.ts +45 -0
  29. package/types/client/TileLayerRenderer.d.ts +24 -0
  30. package/types/client/TileLayerUtils.d.ts +43 -0
  31. package/types/client/TilePreprocessor.d.ts +27 -0
  32. package/types/client/TopoMap.d.ts +2 -1
  33. package/types/client/WindowPlugin.d.ts +1 -3
  34. package/types/client/baseMap.d.ts +12 -2
  35. package/types/client/broadcast.d.ts +1 -1
  36. package/types/client/cityLabels.d.ts +2 -3
  37. package/types/client/colorGradients.d.ts +1 -2
  38. package/types/client/css.test.d.ts +1 -0
  39. package/types/client/customProtocol.d.ts +11 -0
  40. package/types/client/d.ts.files/GlObj.d.ts +1 -5
  41. package/types/client/d.ts.files/Metric.d.ts +2 -0
  42. package/types/client/d.ts.files/broadcast.d.ts +28 -32
  43. package/types/client/d.ts.files/dataSpecifications.d.ts +60 -42
  44. package/types/client/d.ts.files/glUtils.d.ts +71 -0
  45. package/types/client/d.ts.files/http.d.ts +0 -5
  46. package/types/client/d.ts.files/interpolatorTypes.d.ts +5 -5
  47. package/types/client/d.ts.files/lib.d.ts +1 -1
  48. package/types/client/d.ts.files/liveAlerts.d.ts +52 -0
  49. package/types/client/d.ts.files/mapUtils.d.ts +25 -0
  50. package/types/client/d.ts.files/outgoingMessages.d.ts +1 -1
  51. package/types/client/d.ts.files/plugin-params.d.ts +31 -13
  52. package/types/client/d.ts.files/plugins.d.ts +44 -29
  53. package/types/client/d.ts.files/singleclick.d.ts +4 -2
  54. package/types/client/d.ts.files/startup.d.ts +7 -52
  55. package/types/client/d.ts.files/storage.d.ts +0 -11
  56. package/types/client/d.ts.files/user.d.ts +6 -1
  57. package/types/client/embed.d.ts +2 -5
  58. package/types/client/errorLogger.d.ts +19 -0
  59. package/types/client/externalPlugins.d.ts +4 -2
  60. package/types/client/fetch.d.ts +38 -5
  61. package/types/client/format.d.ts +11 -0
  62. package/types/client/glContextUtils.d.ts +9 -0
  63. package/types/client/glStatus.d.ts +7 -0
  64. package/types/client/glUtils.d.ts +119 -0
  65. package/types/client/http.d.ts +0 -6
  66. package/types/client/idbConnection.d.ts +13 -0
  67. package/types/client/idbInstances.d.ts +36 -42
  68. package/types/client/landLayer.d.ts +3 -0
  69. package/types/client/layers.d.ts +2 -1
  70. package/types/client/lib.d.ts +11 -14
  71. package/types/client/liveAlerts.d.ts +2 -2
  72. package/types/client/location.d.ts +1 -1
  73. package/types/client/map.d.ts +95 -22
  74. package/types/client/mapUtils.d.ts +66 -0
  75. package/types/client/math.d.ts +14 -0
  76. package/types/client/mobile.d.ts +16 -34
  77. package/types/client/mobileUtils.d.ts +10 -0
  78. package/types/client/models.d.ts +1 -1
  79. package/types/client/overlays.d.ts +2 -2
  80. package/types/client/picker.d.ts +4 -8
  81. package/types/client/products.d.ts +0 -1
  82. package/types/client/promo.d.ts +1 -1
  83. package/types/client/renderUtils.d.ts +14 -0
  84. package/types/client/renderers.d.ts +5 -6
  85. package/types/client/rootScope.d.ts +9 -9
  86. package/types/client/router.d.ts +7 -2
  87. package/types/client/singleclick.d.ts +1 -1
  88. package/types/client/startup.d.ts +48 -0
  89. package/types/client/startupUtils.d.ts +19 -0
  90. package/types/client/subscription.d.ts +3 -26
  91. package/types/client/throttler.d.ts +32 -0
  92. package/types/client/tileHelpers.d.ts +35 -0
  93. package/types/client/tileLayerInterpolator.d.ts +40 -0
  94. package/types/client/tileLayerSource.d.ts +98 -0
  95. package/types/client/timestampUtils.test.d.ts +1 -0
  96. package/types/client/topMessage.d.ts +22 -0
  97. package/types/client/user.d.ts +1 -0
  98. package/types/client/userConsent.d.ts +0 -2
  99. package/types/client/userFavs.d.ts +0 -8
  100. package/types/client/utils.d.ts +62 -10
  101. package/types/client/utils.test.d.ts +1 -0
  102. package/types/iconfont.d.ts +2 -5
  103. package/types/interfaces.d.ts +121 -100
  104. package/types/lang-files.d.ts +412 -72
  105. package/types/leaflet-gl.d.ts +12773 -0
  106. package/types/types.d.ts +28 -6
  107. package/types/client/d.ts.files/CanvasLayer.d.ts +0 -70
  108. package/types/client/d.ts.files/DataTiler.d.ts +0 -45
  109. package/types/client/d.ts.files/LandMask.d.ts +0 -17
  110. package/types/client/d.ts.files/PoisOverlay.d.ts +0 -27
  111. package/types/client/d.ts.files/TileLayerCanvas.d.ts +0 -78
  112. package/types/client/d.ts.files/TileLayerMultiPatch.d.ts +0 -13
@@ -0,0 +1,71 @@
1
+ import type { Vector2, Vector3, Vector4 } from '@windy/math';
2
+ import type { GlTexture } from '@windy/GlTexture';
3
+ import type { GlslDataType } from '@windy/glUtils';
4
+
5
+ export interface UniformRecord {
6
+ uniformId: string; // uniform identifier inside fragment shader
7
+ uniformLocation: WebGLUniformLocation | null; // bound uniform location
8
+ glDataType: GlslDataType;
9
+ value: UniformDataType;
10
+ }
11
+
12
+ /**
13
+ * Combined type of all possible numeric typed arrays in javascript
14
+ */
15
+ export type TypedArray =
16
+ | Uint8Array
17
+ | Uint8ClampedArray
18
+ | Uint16Array
19
+ | Uint32Array
20
+ | Int8Array
21
+ | Int16Array
22
+ | Int32Array
23
+ | Float32Array
24
+ | Float64Array;
25
+
26
+ export type UniformDataType =
27
+ | Float32List
28
+ | Vector4
29
+ | Vector3
30
+ | Vector2
31
+ | GlTexture
32
+ | WebGLTexture
33
+ | number
34
+ | undefined
35
+ | null;
36
+
37
+ export type Gl2ColorFormat = WebGL2RenderingContextBase['RG8'] | WebGL2RenderingContextBase['R8'];
38
+
39
+ export type GlColorFormat =
40
+ | WebGLRenderingContextBase['ALPHA']
41
+ | WebGLRenderingContextBase['RGB']
42
+ | WebGLRenderingContextBase['RGBA']
43
+ | WebGLRenderingContextBase['LUMINANCE']
44
+ | WebGLRenderingContextBase['LUMINANCE_ALPHA']
45
+ | Gl2ColorFormat;
46
+
47
+ // https://developer.mozilla.org/en-US/docs/Web/API/EXT_disjoint_timer_query
48
+ interface TimerQueryBase {
49
+ QUERY_COUNTER_BITS_EXT: GLenum;
50
+ CURRENT_QUERY_EXT: GLenum;
51
+ QUERY_RESULT_EXT: GLenum; // GLuint64EXT
52
+ QUERY_RESULT_AVAILABLE_EXT: GLenum;
53
+ TIME_ELAPSED_EXT: GLenum;
54
+ TIMESTAMP_EXT: GLenum;
55
+ GPU_DISJOINT_EXT: GLenum;
56
+ createQueryEXT: () => WebGLQuery;
57
+ deleteQueryEXT: (query: WebGLQuery) => void;
58
+ isQueryEXT: (query: WebGLQuery) => GLboolean;
59
+ beginQueryEXT: (target: GLenum, query: WebGLQuery) => void;
60
+ endQueryEXT: (target: GLenum) => void;
61
+ queryCounterEXT: (target: GLenum, query: WebGLQuery) => void;
62
+ getQueryEXT: (target: GLenum, pname: GLenum) => WebGLQuery | GLint;
63
+ }
64
+
65
+ export interface EXT_disjoint_timer_query extends TimerQueryBase {
66
+ getQueryObjectEXT: (query: WebGLQuery, pname: GLenum) => GLuint64 | GLboolean;
67
+ }
68
+
69
+ export interface EXT_disjoint_timer_query_webgl2 extends TimerQueryBase {
70
+ getQueryParameter: (query: WebGLQuery, pname: GLenum) => GLuint64 | GLboolean;
71
+ }
@@ -50,11 +50,6 @@ export interface HttpOptions {
50
50
  */
51
51
  ttl?: Timestamp;
52
52
 
53
- /**
54
- * Request timeout (in ms)
55
- */
56
- timeout?: Timestamp;
57
-
58
53
  /**
59
54
  * Custom headers object
60
55
  */
@@ -1,5 +1,5 @@
1
1
  import { NumValue } from '@windy/types.d';
2
- import { LatLon } from '@windy/interfaces.d';
2
+ import { LatLon, type FullRenderParameters } from '@windy/interfaces.d';
3
3
 
4
4
  /**
5
5
  * Returned values in data RGB channels as tuple [NumValue, NumValue, NumValue]
@@ -23,13 +23,13 @@ export type InterpolatorPossibleReturns = RGBNumValues | null | undefined | numb
23
23
  * Interpolates pixel to tuple weather values from RGB channels
24
24
  */
25
25
  export type PixelInterpolationFun = (
26
- x: number,
27
- y: number,
28
26
  mercXpx?: number, // mercator coords in pixels (needed for radar and satellite)
29
27
  mercYpx?: number,
30
- ) => InterpolatorPossibleReturns;
28
+ abort?: AbortController,
29
+ params?: FullRenderParameters
30
+ ) => Promise<InterpolatorPossibleReturns>;
31
31
 
32
32
  /**
33
33
  * Interpolates coordinates to tuple weather values from RGB channels
34
34
  */
35
- export type CoordsInterpolationFun = <T extends LatLon>(latLon: T) => InterpolatorPossibleReturns;
35
+ export type CoordsInterpolationFun = <T extends LatLon>(latLon: T, abort?: AbortController, params?: FullRenderParameters) => Promise<InterpolatorPossibleReturns>;
@@ -19,7 +19,7 @@ type AllowedDataSpecifications = Pick<
19
19
  | 'particlesAnim'
20
20
  | 'timestamp'
21
21
  | 'isolines'
22
- | 'isImperial'
22
+ | 'defaultUnits'
23
23
  | 'latlon'
24
24
  | 'hourFormat'
25
25
  | 'favOverlays'
@@ -0,0 +1,52 @@
1
+ import type { Platform } from '@windy/types';
2
+
3
+ // In the future, the settings may look like this
4
+ // "services": {
5
+ // "storms": {
6
+ // "enabled": true,
7
+ // "trackCurrentLocation": true,
8
+ // "locations": [{ "lat": 1, "lon": 2 }]
9
+ // },
10
+ // "tornadoes": {
11
+ // "enabled": true,
12
+ // "minForce": "F5",
13
+ // "trackCurrentLocation": true,
14
+ // },
15
+ // "earthquakes": {
16
+ // "enabled": true,
17
+ // "minMagnitude": 5,
18
+ // "trackCurrentLocation": true,
19
+ // "locations": [{ "lat": 1, "lon": 2 }]
20
+ // }
21
+ // }
22
+ export interface LocationEntityServices {
23
+ storms: {
24
+ enabled: boolean;
25
+ };
26
+ rain: {
27
+ enabled: boolean;
28
+ };
29
+ // TODO Enable for all when supported by BE
30
+ // For some reason, BE uses unclear acronym instead of tropicalCyclones
31
+ tc?: {
32
+ enabled: boolean;
33
+ };
34
+ cap?: {
35
+ enabled: boolean;
36
+ };
37
+ }
38
+
39
+ export type DistanceUnit = 'km' | 'mi' | 'NM';
40
+
41
+ export interface LocationEntity {
42
+ services: LocationEntityServices;
43
+ platform: Platform;
44
+ deviceToken: string;
45
+ language: string;
46
+ lat?: number;
47
+ locationEntityId?: string;
48
+ lon?: number;
49
+ units: {
50
+ distance: DistanceUnit;
51
+ };
52
+ }
@@ -0,0 +1,25 @@
1
+ import type { Coords } from '@leafletGl';
2
+
3
+ export type ViewportBounds = { xMin: number; yMin: number; xMax: number; yMax: number };
4
+
5
+ export type TransformedUrlPayload = {
6
+ modifiedUrl: string;
7
+ tileCoords?: Coords;
8
+ };
9
+
10
+ export type TileDataPreprocessCallback = (
11
+ imgData: Blob,
12
+ urlPayload: TransformedUrlPayload,
13
+ ) => Promise<ImageBitmap>;
14
+
15
+ export type GeneratedProtocol = `protocol-${string}`;
16
+
17
+ export type CustomProtocol =
18
+ | 'rad-data'
19
+ | 'rad-flow'
20
+ | 'sat-data'
21
+ | 'sat-flow'
22
+ | 'rad-nowcast'
23
+ | 'forecast'
24
+ | 'rad-ptype'
25
+ | GeneratedProtocol;
@@ -3,7 +3,7 @@
3
3
  */
4
4
 
5
5
  import type { MetricItem } from '@windy/Metric.d';
6
- import type { LatLon } from '../../types/interfaces';
6
+ import type { LatLon } from '@windy/interfaces';
7
7
 
8
8
  /**
9
9
  * Types of valid messages sent to the embed config via window.postMessage.
@@ -1,10 +1,6 @@
1
1
  import { Fav, FavId } from '@windy/favs.d';
2
- import { StartupArticleData, WhatsNewData } from '@windy/startup.d';
3
- import {
4
- HiddenReasonType,
5
- ReasonTypes,
6
- SubscriptionSource,
7
- } from '@plugins/subscription/subscription';
2
+ import { WhatsNewData } from '@windy/startup.d';
3
+
8
4
  import { HttpPayload } from '@windy/http.d';
9
5
  import {
10
6
  CapAlertHeadline,
@@ -26,15 +22,23 @@ import {
26
22
  type Timestamp,
27
23
  } from '@windy/types.d';
28
24
  import { WebcamCategoryType } from '@windy/webcams';
25
+ import type { Point } from '@leafletGl';
29
26
 
30
- import type { StoryPreview } from '@plugins/stories/stories.d';
31
27
  import type { StationDisplayType } from '@plugins/station/station';
28
+ import type { LiveAlertEvent } from '@plugins/startup-live-alerts/startup-live-alerts';
29
+ import type { ArticleStartupData } from '@plugins/articles/articles.d';
30
+ import type {
31
+ HiddenReasonType,
32
+ ReasonTypes,
33
+ SubscriptionSource,
34
+ } from '@plugins/subscription/subscription';
32
35
 
33
36
  /**
34
37
  * Type of source event, that led to opening any plugin
35
38
  */
36
39
  export type PluginOpenEventSource =
37
40
  | 'contextmenu'
41
+ | 'beta-drop-down'
38
42
  | 'hp'
39
43
  | 'url'
40
44
  | 'singleclick'
@@ -45,6 +49,8 @@ export type PluginOpenEventSource =
45
49
  | 'alerts-page'
46
50
  | 'favs-on-hp'
47
51
  | 'picker'
52
+ | 'picker-mobile'
53
+ | 'picker-mobile-settings'
48
54
  | 'meta'
49
55
  | 'fallback'
50
56
  | 'gps'
@@ -136,7 +142,6 @@ export type PluginsOpenParams = {
136
142
  'webcams-detail': PluginSource & WebcamDetailOpenParams;
137
143
  'webcams-edit': PluginSource & WebcamDetailOpenParams;
138
144
  'webcams-remove': PluginSource & WebcamDetailOpenParams;
139
- //settings: (PluginSource & { id: string }) | undefined;
140
145
  settings: PluginSource | undefined;
141
146
  articles: (PluginSource & { id: number | string }) | undefined;
142
147
  upload: PluginSource & { id: string };
@@ -148,7 +153,8 @@ export type PluginsOpenParams = {
148
153
  */
149
154
  name?: string;
150
155
  };
151
- contextmenu: PluginSource & LatLon & { containerPoint?: L.Point };
156
+ contextmenu: PluginSource & LatLon & { containerPoint?: Point };
157
+ 'beta-drop-down': undefined;
152
158
 
153
159
  /**
154
160
  * Typing is incorrect here. If called from ClickHandler it has a string as params
@@ -177,6 +183,8 @@ export type PluginsOpenParams = {
177
183
  rplanner: PluginSource & RplannerDistanceParams;
178
184
  airport: PluginSource & { id: string };
179
185
  share: undefined;
186
+ 'report-issue': PluginSource & { openedFrom?: 'radar' | 'satellite' | 'betaDropDown' };
187
+ 'sun-moon': (PluginSource & LatLon) | undefined;
180
188
  'nearest-stations': PluginSource & LatLon & { compactVersion?: boolean; includeAirq?: boolean };
181
189
  'nearest-airq': PluginSource & LatLon;
182
190
  'nearest-webcams-mobile': PluginSource & LatLon;
@@ -186,9 +194,9 @@ export type PluginsOpenParams = {
186
194
  | undefined;
187
195
  sounding: PluginSource & LatLon & { name?: string };
188
196
  radiosonde: PluginSource & { id: string; lat?: number; lon?: number };
189
- startup: PluginSource;
190
- 'startup-whats-new': PluginSource & { data: WhatsNewData };
191
- 'startup-articles': PluginSource & { data: StartupArticleData };
197
+ 'whats-new': PluginSource & { data: WhatsNewData };
198
+ 'startup-articles': PluginSource & { data: ArticleStartupData };
199
+ 'startup-promos': PluginSource & { typeOfPromo: 'obsoleteApp' | 'premium' | 'mapyCom' };
192
200
  'startup-weather': PluginSource & {
193
201
  coords: HomeLocation | GeolocationInfo;
194
202
  promises: {
@@ -196,6 +204,12 @@ export type PluginsOpenParams = {
196
204
  capAlerts: Promise<HttpPayload<CapAlertHeadline[]>>;
197
205
  };
198
206
  };
207
+ 'startup-pin2hp': PluginSource;
208
+ 'startup-live-alerts': PluginSource & {
209
+ coords: LatLon | GeolocationInfo | HomeLocation;
210
+ alerts: LiveAlertEvent[];
211
+ };
212
+ 'startup-debug': PluginSource;
199
213
  login:
200
214
  | (PluginSource & {
201
215
  reason?: 'login' | 'register';
@@ -218,9 +232,13 @@ export type PluginsOpenParams = {
218
232
  'developer-mode': (PluginSource & { qs: Record<string, string> | undefined }) | undefined;
219
233
  'windy-external-plugin': PluginSource & LatLon;
220
234
  menu: PluginSource & { scrollTo?: 'pois' };
221
- stories: { id: string; sortedAndEnhancedPreviews?: StoryPreview[] } & PluginSource;
222
235
  onboarding: (PluginSource & { getUserInterests?: boolean }) | undefined;
223
236
  'heatmaps-redirect': PluginSource & { id?: string };
237
+ 'beta-cookie': PluginSource & { action?: 'activate' | 'remove' };
238
+ 'radar-plus-use-satellite': PluginSource | undefined;
239
+ info: PluginSource & {
240
+ displayOverlayInfoFirst?: boolean;
241
+ };
224
242
  } & {
225
243
  [external: ExternalPluginIdent]:
226
244
  | (PluginSource & { query: Record<string, string> | undefined })
@@ -3,11 +3,11 @@ import { Plugin } from '@windy/Plugin';
3
3
  import { SveltePanePlugin } from '@windy/SveltePanePlugin';
4
4
  import { SveltePlugin } from '@windy/SveltePlugin';
5
5
  import { TagPlugin } from '@windy/TagPlugin';
6
+ import { StartupElementPlugin } from '@windy/StartupElementPlugin';
6
7
 
7
8
  export interface BottomSveltePlugins {
8
- 'mobile-calendar'?: BottomSveltePlugin<'mobile-calendar'>;
9
- 'progress-bar'?: BottomSveltePlugin<'progress-bar'>;
10
-
9
+ 'mobile-calendar': BottomSveltePlugin<'mobile-calendar'>;
10
+ 'progress-bar': BottomSveltePlugin<'progress-bar'>;
11
11
  'day-switcher': BottomSveltePlugin<'day-switcher'>;
12
12
  'cap-alerts': BottomSveltePlugin<'cap-alerts'>;
13
13
  accumulations: BottomSveltePlugin<'accumulations'>;
@@ -33,9 +33,11 @@ export interface SveltePanePlugins {
33
33
  'webcams-add': SveltePanePlugin<'webcams-add'>;
34
34
  'webcams-edit': SveltePanePlugin<'webcams-edit'>;
35
35
  'webcams-remove': SveltePanePlugin<'webcams-remove'>;
36
+ 'report-issue': SveltePanePlugin<'report-issue'>;
37
+ 'external-plugins': SveltePanePlugin<'external-plugins'>;
36
38
 
37
- uploader?: SveltePanePlugin<'uploader'>;
38
- 'external-plugins'?: SveltePanePlugin<'external-plugins'>;
39
+ uploader: SveltePanePlugin<'uploader'>;
40
+ 'whats-new': SveltePanePlugin<'whats-new'>;
39
41
  }
40
42
 
41
43
  export interface SveltePlugins {
@@ -55,38 +57,46 @@ export interface SveltePlugins {
55
57
  menu: SveltePlugin<'menu'>;
56
58
  'fav-alert-menu': SveltePlugin<'fav-alert-menu'>;
57
59
  radar: SveltePlugin<'radar'>;
58
- satellite: SveltePlugin<'satellite'>;
59
60
  'radar-plus': SveltePlugin<'radar-plus'>;
61
+ 'radar-plus-use-satellite': SveltePlugin<'radar-plus-use-satellite'>;
60
62
  'map-selector': SveltePlugin<'map-selector'>;
61
63
 
62
64
  // Mobile/desktop only plugins
63
- distance?: SveltePlugin<'distance'>;
64
- 'watch-faces'?: SveltePlugin<'watch-faces'>;
65
- 'app-review-dialog'?: SveltePlugin<'app-review-dialog'>;
66
- widgets?: SveltePlugin<'widgets'>;
67
- garmin?: SveltePlugin<'garmin'>;
68
- 'fav-layers'?: SveltePlugin<'fav-layers'>;
69
- onboarding?: SveltePlugin<'onboarding'>;
70
- 'developer-mode'?: SveltePlugin<'developer-mode'>;
71
- 'pin-to-homepage'?: SveltePlugin<'pin-to-homepage'>;
72
- 'startup-whats-new'?: SveltePlugin<'startup-whats-new'>;
65
+ distance: SveltePlugin<'distance'>;
66
+ 'watch-faces': SveltePlugin<'watch-faces'>;
67
+ 'app-review-dialog': SveltePlugin<'app-review-dialog'>;
68
+ widgets: SveltePlugin<'widgets'>;
69
+ garmin: SveltePlugin<'garmin'>;
70
+ 'fav-layers': SveltePlugin<'fav-layers'>;
71
+ onboarding: SveltePlugin<'onboarding'>;
72
+ 'developer-mode': SveltePlugin<'developer-mode'>;
73
+
73
74
  'rhpane-top': SveltePlugin<'rhpane-top'>;
74
- rhbottom?: SveltePlugin<'rhbottom'>;
75
- 'location-permission'?: SveltePlugin<'location-permission'>;
75
+ rhbottom: SveltePlugin<'rhbottom'>;
76
+ 'location-permission': SveltePlugin<'location-permission'>;
76
77
 
77
- 'startup-weather'?: SveltePlugin<'startup-weather'>;
78
- 'mobile-ui'?: SveltePlugin<'mobile-ui'>;
79
- 'embed-ui'?: SveltePlugin<'embed-ui'>;
80
- contextmenu?: SveltePlugin<'contextmenu'>;
78
+ 'mobile-ui': SveltePlugin<'mobile-ui'>;
79
+ 'embed-ui': SveltePlugin<'embed-ui'>;
80
+ contextmenu: SveltePlugin<'contextmenu'>;
81
+ 'beta-drop-down': SveltePlugin<'beta-drop-down'>;
81
82
  upload: SveltePlugin<'upload'>;
82
83
  search: SveltePlugin<'search'>;
83
- 'startup-articles'?: SveltePlugin<'startup-articles'>;
84
- 'picker-mobile'?: SveltePlugin<'picker-mobile'>; // to Svelte plugin
84
+ 'picker-mobile': SveltePlugin<'picker-mobile'>; // to Svelte plugin
85
+ 'perf-overlay': SveltePlugin<'perf-overlay'>;
86
+ 'sun-moon': SveltePlugin<'sun-moon'>;
85
87
 
86
88
  // Used as fake plugin for any other external plugin
87
89
  // basically we are unable to type each individual external plugin
88
90
  'windy-external-plugin'?: SveltePlugin<'windy-external-plugin'>;
89
- stories: SveltePlugin<'stories'>;
91
+ }
92
+
93
+ export interface StartupElementPlugins {
94
+ 'startup-articles': StartupElementPlugin<'startup-articles'>;
95
+ 'startup-promos': StartupElementPlugin<'startup-promos'>;
96
+ 'startup-live-alerts': StartupElementPlugin<'startup-live-alerts'>;
97
+ 'startup-debug': StartupElementPlugin<'startup-debug'>;
98
+ 'startup-pin2hp': StartupElementPlugin<'startup-pin2hp'>;
99
+ 'startup-weather': StartupElementPlugin<'startup-weather'>;
90
100
  }
91
101
 
92
102
  export interface PlainPlugins {
@@ -97,20 +107,25 @@ export interface PlainPlugins {
97
107
  export interface TagPlugins {
98
108
  // These plugins have css only (no html)
99
109
  'poi-libs': TagPlugin<'poi-libs'>;
100
- picker?: TagPlugin<'picker'>;
101
- globe?: TagPlugin<'globe'>;
110
+ picker: TagPlugin<'picker'>;
111
+ globe: TagPlugin<'globe'>;
102
112
  'heatmaps-redirect': TagPlugin<'heatmaps-redirect'>;
113
+ 'beta-cookie': TagPlugin<'beta-cookie'>;
103
114
  }
104
115
 
116
+ // Includes plain plugins
105
117
  export interface Plugins
106
118
  extends TagPlugins,
107
119
  SveltePlugins,
108
120
  SveltePanePlugins,
109
121
  PlainPlugins,
110
- BottomSveltePlugins {}
122
+ BottomSveltePlugins,
123
+ StartupElementPlugins {}
111
124
 
125
+ // Only descendants of WindowPlugin§
112
126
  export interface WindowPlugins
113
127
  extends TagPlugins,
114
128
  SveltePlugins,
115
129
  SveltePanePlugins,
116
- BottomSveltePlugins {}
130
+ BottomSveltePlugins,
131
+ StartupElementPlugins {}
@@ -9,12 +9,14 @@ export interface SingleClickParams extends LatLon {
9
9
  source: 'singleclick';
10
10
  }
11
11
 
12
+ type PoiKeys = `poi-${Pois | 'stations' | 'label'}`;
13
+
12
14
  type SingleclickPoiTypes = {
13
- [key in `poi-${Pois | 'stations' | 'label'}`]: [HTMLElement];
15
+ [key in PoiKeys]: [HTMLElement];
14
16
  };
15
17
 
16
18
  export type SingleclickPluginTypes = {
17
- [key in PluginIdent]: [SingleClickParams];
19
+ [key in Exclude<PluginIdent, PoiKeys>]: [SingleClickParams];
18
20
  };
19
21
 
20
22
  export type SingleclickEternalPluginTypes = {
@@ -1,23 +1,11 @@
1
- import type { RelatedHomepageArticlesResponseDto } from '@plugins/articles/articles.d';
2
- import type { Timestamp } from '@windy/types';
1
+ import type { SemVersion, Timestamp } from '@windy/types';
3
2
 
4
- export type StartupNewsType = 'hp-article' | 'whats-new';
3
+ export type WhatsNewObsolete = {
4
+ minVersion: SemVersion;
5
+ published: Timestamp;
6
+ };
5
7
 
6
- export interface StartupItem {
7
- type: StartupNewsType;
8
- }
9
-
10
- export interface StartupResponse {
11
- 'hp-articles'?: StartupArticleData[];
12
- 'whats-new'?: WhatsNewData;
13
- }
14
-
15
- export interface StartupArticleData extends RelatedHomepageArticlesResponseDto, StartupItem {
16
- type: 'hp-article';
17
- }
18
-
19
- export interface WhatsNewData extends StartupItem {
20
- type: 'whats-new';
8
+ export type WhatsNewData = {
21
9
  id: string;
22
10
  title: string;
23
11
  contributors: {
@@ -29,37 +17,4 @@ export interface WhatsNewData extends StartupItem {
29
17
  improved?: string;
30
18
  fixed?: string;
31
19
  };
32
- }
33
-
34
- /**
35
- * Info about articles, user has already seen
36
- */
37
- export interface SeenArticle {
38
- /**
39
- * How many times the article has been seen
40
- * (one count is added only if the article has been seen after 12 hours from the last seen time)
41
- */
42
- count: number;
43
-
44
- /**
45
- * Marks beginning of 12h interval
46
- */
47
- seen: Timestamp;
48
-
49
- /**
50
- * Article was liked by user
51
- */
52
- liked?: boolean;
53
- }
54
-
55
- export interface SeenStory {
56
- /**
57
- * Timestamp when was story seen
58
- */
59
- seen: Timestamp;
60
-
61
- /**
62
- * Story was liked by user
63
- */
64
- liked?: boolean;
65
- }
20
+ };
@@ -1,6 +1,4 @@
1
1
  import { Timestamp } from '@windy/types.d';
2
- import { Fav, type ObsoleteFav } from '@windy/favs.d';
3
- import { SearchRecent } from '@plugins/search/search';
4
2
 
5
3
  export interface StorageData {
6
4
  /** @deprecated replaced by IDB */
@@ -43,15 +41,6 @@ export interface StorageData {
43
41
  * Other dynamically add storage data
44
42
  */
45
43
  [ident: string]: unknown | null;
46
-
47
- /** @deprecated & replaced by IDB */
48
- [key: `recents${number}`]: Record<string, SearchRecent> | null;
49
-
50
- /** @deprecated & replaced by IDB */
51
- [key: `favs${number}`]: Record<string, Fav | ObsoleteFav> | null;
52
-
53
- /** @deprecated & replaced by IDB */
54
- [key: `favs${number}_ts`]: Timestamp | null;
55
44
  }
56
45
 
57
46
  export type StorageDataKey = keyof StorageData & string;
@@ -1,6 +1,7 @@
1
- import { SubscriptionInfo } from '@plugins/_shared/subscription-services/subscription-services.d';
2
1
  import { SubTier, type ExternalPluginIdent } from '@windy/types.d';
3
2
  import { FavFragment } from '@windy/favs';
3
+
4
+ import type { SubscriptionInfo } from '@plugins/shared/subscription-services/subscription-services.d';
4
5
  import type { PluginsOpenParams } from '@windy/plugin-params';
5
6
 
6
7
  export interface User {
@@ -107,6 +108,10 @@ export type LoginAndFinishAction =
107
108
  action: 'colors';
108
109
  params: PluginsOpenParams['colors'];
109
110
  }
111
+ | {
112
+ action: 'external-plugins';
113
+ params: PluginsOpenParams['external-plugins'];
114
+ }
110
115
  | {
111
116
  action: 'openExternalPlugin';
112
117
  params: {
@@ -1,4 +1,3 @@
1
- import './leafletExt/CanvasLayer';
2
1
  import './services/params';
3
2
  import './pluginSystem/Plugin';
4
3
  import './pluginSystem/SveltePlugin';
@@ -8,7 +7,6 @@ import './pluginSystem/pluginsCtrl';
8
7
  import './ui/timeAnimation';
9
8
  import './ui/visibility';
10
9
  import './render/renderTile';
11
- import './render/tileLayerInstance';
12
10
  export * as detectDevice from './dummyModules/detectDevice';
13
11
  export * as log from './dummyModules/log';
14
12
  export * as promo from './dummyModules/promo';
@@ -33,9 +31,7 @@ export * as picker from './map/picker';
33
31
  export * as singleclick from './map/singleclick';
34
32
  export { default as plugins } from './pluginSystem/plugins';
35
33
  export * as interpolator from './render/interpolator';
36
- export { default as particleRenderers } from './render/particleRenderers';
37
34
  export * as renderUtils from './render/renderUtils';
38
- export * as DataTiler from './renderClasses/DataTiler';
39
35
  export { default as colors } from './services/colors';
40
36
  export * as connection from './services/connection';
41
37
  export * as device from './services/device';
@@ -59,10 +55,11 @@ export { default as lruCache } from './utils/lruCache';
59
55
  export { default as storage } from './utils/storage';
60
56
  export * as subscription from './utils/subscription';
61
57
  export * as utils from './utils/utils';
58
+ export * as EventManager from './utils/EventManager';
62
59
  export { default as metrics } from './weather/metrics';
63
60
  export * as models from './weather/models';
64
61
  export { default as products } from './weather/products';
65
62
  export * as Calendar from './weatherClasses/Calendar';
66
63
  export * as Color from './weatherClasses/Color';
67
- export { default as GlObj } from './wgUtils/GlObj';
68
64
  export { $, bcast as broadcast, ga, overlays, store };
65
+ export * as glUtils from './glUtils/glUtils';
@@ -27,10 +27,29 @@ interface ErrorPayload {
27
27
  stack?: string;
28
28
  repeated?: number;
29
29
  latestBcast?: string;
30
+ network?: Record<string, string | number>;
30
31
  }
31
32
  /**
32
33
  * Array of all errors reported to kibana, to show them in debug mode
33
34
  * plugin
34
35
  */
35
36
  export declare const sentErrors: ErrorPayload[];
37
+ /**
38
+ * Suspend further error reporting (for example after launching 3rd party plugin, that may cause errors)
39
+ */
40
+ export declare const suspendErrorLogging: () => void;
41
+ /**
42
+ * Get NetworkInformation from navigator.connection if available
43
+ * https://developer.mozilla.org/en-US/docs/Web/API/Network_Information_API
44
+ * https://caniuse.com/netinfo
45
+ * @returns NetworkInformation or empty object
46
+ */
47
+ export declare function getNetworkInformation(): {
48
+ downlink: any;
49
+ downlinkMax: any;
50
+ effectiveType: any;
51
+ rtt: any;
52
+ saveData: any;
53
+ type: any;
54
+ };
36
55
  export {};
@@ -4,5 +4,7 @@ export type ExternalPluginError = {
4
4
  type: 'network' | 'installation' | 'open';
5
5
  msg: string;
6
6
  };
7
- export declare const installExternalPlugin: (url: string, installedBy: InstalledExternalPluginConfig['installedBy']) => Promise<InstalledExternalPluginConfig | ExternalPluginError>;
8
- export declare const loadExternalPlugins: (forceReload?: boolean) => Promise<ExternalSveltePlugin[]>;
7
+ export declare const installExternalPlugin: (url: string, installedBy: InstalledExternalPluginConfig['installedBy']) => Promise<InstalledExternalPluginConfig>;
8
+ export declare const loadExternalPlugins: () => Promise<ExternalSveltePlugin[]>;
9
+ /** Removes ext plugin */
10
+ export declare const removeExternalPlugin: (name: InstalledExternalPluginConfig['name']) => Promise<void>;