@windycom/plugin-devtools 3.0.0 → 3.0.2

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 (97) hide show
  1. package/README.md +2 -0
  2. package/package.json +1 -1
  3. package/types/client/BottomSlide.d.ts +3 -0
  4. package/types/client/Calendar.d.ts +101 -71
  5. package/types/client/Color.d.ts +19 -6
  6. package/types/client/DataTiler.d.ts +1 -1
  7. package/types/client/ExternalSveltePlugin.d.ts +6 -1
  8. package/types/client/IDB.d.ts +7 -1
  9. package/types/client/Layer.d.ts +95 -26
  10. package/types/client/LayerClasses.d.ts +5 -0
  11. package/types/client/Metric.d.ts +32 -43
  12. package/types/client/Overlay.d.ts +7 -10
  13. package/types/client/OverlayClasses.d.ts +8 -0
  14. package/types/client/Particles.d.ts +1 -1
  15. package/types/client/Plugin.d.ts +4 -0
  16. package/types/client/Product.d.ts +31 -73
  17. package/types/client/ProductClasses.d.ts +44 -0
  18. package/types/client/Renderer.d.ts +41 -13
  19. package/types/client/SveltePlugin.d.ts +7 -0
  20. package/types/client/TileLayer.d.ts +2 -2
  21. package/types/client/TopoMap.d.ts +2 -3
  22. package/types/client/WindowPlugin.d.ts +9 -5
  23. package/types/client/colorGradients.d.ts +5 -10
  24. package/types/client/colors.d.ts +1 -2
  25. package/types/client/compatibilityCheck.d.ts +1 -0
  26. package/types/client/connection.d.ts +1 -1
  27. package/types/client/d.ts.files/LabelsLayer.d.ts +2 -2
  28. package/types/client/d.ts.files/Metric.d.ts +21 -2
  29. package/types/client/d.ts.files/TileLayerCanvas.d.ts +3 -3
  30. package/types/client/d.ts.files/alerts.d.ts +2 -2
  31. package/types/client/d.ts.files/broadcast.d.ts +17 -12
  32. package/types/client/d.ts.files/dataSpecifications.d.ts +76 -53
  33. package/types/client/d.ts.files/favs.d.ts +18 -30
  34. package/types/client/d.ts.files/http.d.ts +5 -0
  35. package/types/client/d.ts.files/lib.d.ts +5 -8
  36. package/types/client/d.ts.files/plugin-params.d.ts +32 -20
  37. package/types/client/d.ts.files/plugins.d.ts +2 -3
  38. package/types/client/d.ts.files/rootScope.d.ts +14 -12
  39. package/types/client/d.ts.files/startup.d.ts +17 -11
  40. package/types/client/d.ts.files/user.d.ts +3 -0
  41. package/types/client/d.ts.files/{Webcams.d.ts → webcams.d.ts} +9 -2
  42. package/types/client/dataLoader.d.ts +2 -2
  43. package/types/client/device.d.ts +1 -0
  44. package/types/client/embed.d.ts +68 -0
  45. package/types/client/errorLogger.d.ts +28 -3
  46. package/types/client/errors.d.ts +6 -0
  47. package/types/client/externalPlugins.d.ts +2 -0
  48. package/types/client/fetch.d.ts +42 -6
  49. package/types/client/format.d.ts +2 -1
  50. package/types/client/glTileRender.d.ts +1 -7
  51. package/types/client/http.d.ts +0 -6
  52. package/types/client/idbInstances.d.ts +123 -21
  53. package/types/client/imakerMain.d.ts +49 -0
  54. package/types/client/latestBroadcasts.d.ts +1 -1
  55. package/types/client/layers.d.ts +3 -1
  56. package/types/client/legends.d.ts +1 -1
  57. package/types/client/lib.d.ts +1 -10
  58. package/types/client/libHtml.d.ts +1 -1
  59. package/types/client/liveAlerts.d.ts +5 -0
  60. package/types/client/liveAlerts.types.d.ts +28 -0
  61. package/types/client/location.d.ts +5 -0
  62. package/types/client/log.d.ts +3 -1
  63. package/types/client/map.d.ts +7 -1
  64. package/types/client/mobile.d.ts +3 -9
  65. package/types/client/models.d.ts +7 -9
  66. package/types/client/notifications.d.ts +2 -5
  67. package/types/client/overlays.d.ts +2 -1
  68. package/types/client/particleRenderers.d.ts +1 -1
  69. package/types/client/products.d.ts +54 -2
  70. package/types/client/promo.d.ts +28 -5
  71. package/types/client/pushNotifications.d.ts +7 -1
  72. package/types/client/renderCtrl.d.ts +1 -1
  73. package/types/client/renderTile.d.ts +2 -2
  74. package/types/client/renderUtils.d.ts +16 -36
  75. package/types/client/renderers.d.ts +2 -4
  76. package/types/client/reverseName.d.ts +2 -1
  77. package/types/client/rhMessage.d.ts +1 -1
  78. package/types/client/rootScope.d.ts +22 -6
  79. package/types/client/router.d.ts +8 -5
  80. package/types/client/store.d.ts +20 -52
  81. package/types/client/storeLastPosition.d.ts +4 -1
  82. package/types/client/tileInterpolator.d.ts +1 -1
  83. package/types/client/user.d.ts +2 -0
  84. package/types/client/userAlerts.d.ts +0 -4
  85. package/types/client/userFavs.d.ts +12 -0
  86. package/types/client/utils.d.ts +57 -20
  87. package/types/iconfont.d.ts +7 -0
  88. package/types/interfaces.d.ts +339 -81
  89. package/types/lang-files.d.ts +783 -19
  90. package/types/types.d.ts +352 -23
  91. package/types/client/d.ts.files/Calendar.d.ts +0 -96
  92. package/types/client/d.ts.files/Color.d.ts +0 -93
  93. package/types/client/d.ts.files/Layer.d.ts +0 -191
  94. package/types/client/d.ts.files/Renderer.d.ts +0 -44
  95. package/types/client/d.ts.files/errorLogger.d.ts +0 -35
  96. package/types/client/d.ts.files/products.d.ts +0 -61
  97. package/types/offline.d.ts +0 -100
@@ -1,191 +0,0 @@
1
- import { NumberedMetric, PrecipMetric, PtypeMetric, UVIndexMetric } from '@windy/MetricClasses';
2
- import { DataQuality, FileSuffix } from '@windy/Product';
3
- import { WeatherParameters } from '@windy/interfaces.d';
4
- import { Levels, Overlays } from '@windy/rootScope.d';
5
- import { NumValue, Path } from '@windy/types.d';
6
-
7
- // TODO: Move to particles.d.ts later
8
- export type ParticlesIdent = 'wind' | 'waves' | 'currents';
9
-
10
- // TODO: Move to Patternator.d.ts later on
11
- export type Patterntype = 'cclPattern' | 'rainPattern' | 'ptypePattern';
12
-
13
- export type TransformFunction = (x: NumValue) => NumValue;
14
-
15
- export type RenderChannels = 'R' | 'RG' | 'B';
16
-
17
- /**
18
- * All available layers and their metric value type
19
- */
20
- export interface LayerMetricType {
21
- capAlerts: undefined;
22
- pressureIsolines: undefined;
23
- ghIsolines: undefined;
24
- tempIsolines: undefined;
25
- deg0Isolines: undefined;
26
- windParticles: undefined;
27
- ecmwfWindParticles: undefined;
28
- ecmwfWindParticles150h: undefined;
29
- ecmwfWindParticles500h: undefined;
30
- ecmwfWindParticles600h: undefined;
31
- waveParticles: undefined;
32
- currentParticles: undefined;
33
- currentsTideParticles: undefined;
34
- wind: NumberedMetric;
35
- temp: NumberedMetric;
36
- wetbulbtemp: NumberedMetric;
37
- solarpower: NumberedMetric;
38
- uvindex: UVIndexMetric;
39
- dewpoint: NumberedMetric;
40
- gust: NumberedMetric;
41
- gustAccu: NumberedMetric;
42
- rh: NumberedMetric;
43
- pressure: NumberedMetric;
44
- ccl: NumberedMetric;
45
- rain: PrecipMetric;
46
- ptype: PtypeMetric;
47
- thunder: NumberedMetric;
48
- clouds: NumberedMetric;
49
- lclouds: NumberedMetric;
50
- mclouds: NumberedMetric;
51
- hclouds: NumberedMetric;
52
- cape: NumberedMetric;
53
- cbase: NumberedMetric;
54
- fog: NumberedMetric;
55
- snowAccu: NumberedMetric;
56
- rainAccu: NumberedMetric;
57
- waves: NumberedMetric;
58
- wwaves: NumberedMetric;
59
- swell1: NumberedMetric;
60
- swell2: NumberedMetric;
61
- swell3: NumberedMetric;
62
- swell: NumberedMetric;
63
- currents: NumberedMetric;
64
- currentsTide: NumberedMetric;
65
- sst: NumberedMetric;
66
- visibility: NumberedMetric;
67
- snowcover: NumberedMetric;
68
- cloudtop: NumberedMetric;
69
- deg0: NumberedMetric;
70
- cosc: NumberedMetric;
71
- dustsm: NumberedMetric;
72
- radar: NumberedMetric;
73
- satellite: NumberedMetric;
74
- radarPlus: NumberedMetric;
75
- gtco3: NumberedMetric;
76
- pm2p5: NumberedMetric;
77
- no2: NumberedMetric;
78
- aod550: NumberedMetric;
79
- tcso2: NumberedMetric;
80
- go3: NumberedMetric;
81
- gh: NumberedMetric;
82
- efiWind: NumberedMetric;
83
- efiTemp: NumberedMetric;
84
- efiRain: NumberedMetric;
85
- moistureAnom40: PrecipMetric;
86
- moistureAnom100: PrecipMetric;
87
- drought40: NumberedMetric;
88
- drought100: NumberedMetric;
89
- soilMoisture40: NumberedMetric;
90
- soilMoisture100: NumberedMetric;
91
- fwi: NumberedMetric;
92
- dfm10h: NumberedMetric;
93
- turbulence: NumberedMetric;
94
- icing: NumberedMetric;
95
- topoMap: undefined;
96
- }
97
-
98
- /**
99
- * All layers available
100
- */
101
- export type Layers = keyof LayerMetricType;
102
-
103
- /**
104
- * These properties are passed directly to renderer by enhancing returned params
105
- */
106
- interface RenderParams {
107
- /**
108
- * Which channels contain tile rendering data
109
- */
110
- renderFrom?: RenderChannels;
111
-
112
- /**
113
- * Not confirmed: Display map as a sea, meaning the sea layers are below surface layers
114
- */
115
- sea?: boolean;
116
-
117
- /**
118
- * Display map as a land, meaning the sea area is hidden with mask
119
- */
120
- landOnly?: boolean;
121
-
122
- /**
123
- * Identifier of particle type
124
- */
125
- particlesIdent?: ParticlesIdent;
126
-
127
- /**
128
- * Have no clue what this is
129
- */
130
- isMultiColor?: boolean;
131
-
132
- /**
133
- * Have no clue what this is
134
- */
135
- interpolateNearestG?: boolean;
136
-
137
- /**
138
- * Name of interpolator method
139
- */
140
- interpolate?: 'interpolateOverlay' | 'interpolateWaves';
141
-
142
- /**
143
- * Used patternator
144
- */
145
- pattern?: Patterntype;
146
- }
147
-
148
- /**
149
- * Set of params required to render the layer
150
- */
151
- interface FullRenderParameters extends WeatherParameters, RenderParams {
152
- layer: Layers;
153
- server: string;
154
- JPGtransparency?: boolean;
155
- PNGtransparency?: boolean;
156
- transformR?: TransformFunction;
157
- transformG?: TransformFunction;
158
- transformB?: TransformFunction;
159
- directory: string;
160
- filename: string | Overlays | Layers;
161
- fileSuffix: FileSuffix;
162
-
163
- /**
164
- * Specifi zoom of mercator data tiles in dependence of map zoom
165
- */
166
- dataQuality?: DataQuality;
167
- maxTileZoom?: {
168
- free: number;
169
- premium: number;
170
- };
171
-
172
- /**
173
- * bump data quality by 1 level for particular overlay/layer
174
- */
175
- upgradeDataQuality?: boolean;
176
-
177
- /**
178
- * Force to slect particular zoom of data tiles
179
- */
180
- dataTilesZoom?: number;
181
-
182
- level: Levels;
183
- refTime: string;
184
- fullPath: string;
185
- path: Path;
186
-
187
- /**
188
- * Optional accumulation range in hours
189
- */
190
- acRangeInHours?: number;
191
- }
@@ -1,44 +0,0 @@
1
- import { TransformFunction } from '@windy/Layer.d';
2
- import { TilePoint } from '@windy/interfaces.d';
3
-
4
- import type { BottomSveltePlugins, Plugins, SveltePlugins } from '@windy/plugins.d';
5
-
6
- export type AllowedRenderPlugins = Pick<
7
- Plugins,
8
- 'radar' | 'satellite' | 'radar-plus' | 'cap-alerts' | 'isolines' | 'gl-particles' | 'particles'
9
- >;
10
-
11
- export type Renderers =
12
- | 'tileLayer'
13
- | 'radar'
14
- | 'satellite'
15
- | 'radarPlus'
16
- | 'capAlerts'
17
- | 'isolines'
18
- | 'particles'
19
- | 'accumulations'
20
- | 'daySwitcher'
21
- | 'noUserControl'
22
- | 'topoMap';
23
-
24
- export interface TileParams extends TilePoint {
25
- url: string;
26
- intX: number;
27
- intY: number;
28
- trans: number;
29
- transformR: TransformFunction | null;
30
- transformG: TransformFunction | null;
31
- transformB: TransformFunction | null;
32
- }
33
-
34
- export type AllowedUserControls =
35
- | keyof BottomSveltePlugins
36
- | keyof SveltePlugins
37
- | 'map-selector'
38
- | 'none';
39
-
40
- export interface RendererInitParams {
41
- ident: Renderers;
42
- dependency?: keyof AllowedRenderPlugins;
43
- userControl?: AllowedUserControls;
44
- }
@@ -1,35 +0,0 @@
1
- import type { HttpError } from '@windy/http';
2
-
3
- /** Payload sent to backend */
4
- export interface ErrorPayload {
5
- timestamp: number;
6
- runningMs: number;
7
- type: string;
8
- module: string | null | undefined;
9
- msg: string;
10
- line: number | null | undefined;
11
- col: number | null | undefined;
12
- url: string | undefined;
13
- script: string | null | undefined;
14
- ver: string;
15
- target: string;
16
- stack: string | undefined;
17
- error: string;
18
- isOnline: boolean;
19
- repeated?: number;
20
- scriptLine?: string;
21
- latestBcast?: string;
22
- sessionName?: string;
23
- sessionCounter?: number;
24
- lang?: string;
25
- size?: string;
26
- platform?: string;
27
- errorID?: string;
28
- beta?: boolean;
29
- }
30
-
31
- export interface CustomError {
32
- msg: string;
33
- moduleName: string;
34
- errorObject?: Error | HttpError | Event | ErrorEvent;
35
- }
@@ -1,61 +0,0 @@
1
- import { AccessProduct, AccessCProduct } from '@windy/AccessProducts';
2
- import { AromeProduct } from '@windy/AromeProduct';
3
- import { EcmwfAnalysisProduct } from '@windy/EcmwfAnalysisProduct';
4
- import { EcmwfProduct } from '@windy/EcmwfProduct';
5
- import { Product } from '@windy/Product';
6
- import { RadarPlusProduct } from '@windy/RadarPlusProduct';
7
- import { SatelliteProduct } from '@windy/SatelliteProduct';
8
-
9
- import { Products } from '@windy/rootScope.d';
10
-
11
- export type products = Implements<
12
- { [P in Products]: Product },
13
- {
14
- bomAccess: AccessProduct;
15
- bomAccessAd: AccessCProduct;
16
- bomAccessBn: AccessCProduct;
17
- bomAccessDn: AccessCProduct;
18
- bomAccessNq: AccessCProduct;
19
- bomAccessPh: AccessCProduct;
20
- bomAccessSy: AccessCProduct;
21
- bomAccessVt: AccessCProduct;
22
- mblue: Product;
23
- ecmwf: EcmwfProduct;
24
- ecmwfWaves: Product;
25
- ecmwfAnalysis: EcmwfAnalysisProduct;
26
- canHrdps: Product;
27
- canRdwpsWaves: Product;
28
- cams: Product;
29
- camsEu: Product;
30
- cmems: Product;
31
- czeAladin: Product;
32
- gfs: Product;
33
- gfsWaves: Product;
34
- icon: Product;
35
- iconD2: Product;
36
- iconEu: Product;
37
- iconEuWaves: Product;
38
- arome: Product;
39
- aromeAntilles: AromeProduct;
40
- aromeFrance: AromeProduct;
41
- aromeReunion: AromeProduct;
42
- nems: Product;
43
- namAlaska: Product;
44
- namConus: Product;
45
- namHawaii: Product;
46
- capAlerts: Product;
47
- efi: Product;
48
- radar: Product;
49
- satellite: SatelliteProduct;
50
- radarPlus: RadarPlusProduct;
51
- hrrrAlaska: Product;
52
- hrrrConus: Product;
53
- ukv: Product;
54
- drought: Product;
55
- fireDanger: Product;
56
- activeFires: Product;
57
- jmaMsm: Product;
58
- jmaCwmWaves: Product;
59
- topoMap: Product;
60
- }
61
- >;
@@ -1,100 +0,0 @@
1
- import type { Timestamp } from '@windy/types.d';
2
-
3
- /**
4
- * Types of data that can be downloaded (for purpose of storage management)
5
- */
6
- export type StorageDataType = 'criticalFiles' | 'images' | 'clientFiles' | 'forecastData';
7
-
8
- export type Client2ServiceWorkerMessage = 'download' | 'ping' | 'cancel' | 'goOffline' | 'goOnline';
9
-
10
- export type ServiceWorkerStatus = 'idle' | 'downloading' | 'offlineMode';
11
-
12
- export type ServiceWorker2ClientMessage =
13
- | ServiceWorkerStatus
14
- | 'progress'
15
- | 'finished'
16
- | 'error'
17
- | 'cancelled'
18
- | 'readyForOfflineMode'
19
- | 'goingOnline';
20
-
21
- export interface ServiceWorkerMessage extends Event {
22
- data: {
23
- type: ServiceWorker2ClientMessage;
24
- error?: string;
25
- downloadedInfo?: DownloadedInfo | void;
26
- expires?: Timestamp;
27
- };
28
- }
29
-
30
- export interface ClientMessage {
31
- type: Client2ServiceWorkerMessage;
32
- payload?: DownloadPayload;
33
- }
34
-
35
- export interface FileInfo {
36
- /**
37
- * Mangled or hash encoded URL, as sent to the backend
38
- */
39
- url: string;
40
-
41
- /**
42
- * Original pure URL
43
- */
44
- originalUrl: string;
45
- }
46
-
47
- /**
48
- * Request to download files from service worker
49
- */
50
- export interface DownloadBatch {
51
- type: StorageDataType;
52
-
53
- /**
54
- * Should we delete all files in this cache before downloading?
55
- */
56
- deleteCache: boolean;
57
-
58
- /**
59
- * Files to download
60
- */
61
- files: FileInfo[];
62
-
63
- /**
64
- * Given URL's are not static, but rather backend generated API calls
65
- */
66
- apiRqst?: boolean;
67
-
68
- /**
69
- * serviceWorker tries twice (with CORS and no-CORS) to download files
70
- */
71
- tryTwice2DownloadFiles?: boolean;
72
- }
73
-
74
- export type ErrorsByType = Record<string, number>;
75
-
76
- export interface DownloadPayload {
77
- assets: string;
78
- acceptHeader: string;
79
- numberOfFiles: number;
80
- batches: DownloadBatch[];
81
- mainEntryPoint: string;
82
- }
83
-
84
- export interface DownloadedInfo {
85
- assets: string;
86
- errors: number;
87
- errorsByType: ErrorsByType;
88
- downloaded: Timestamp;
89
- downloadeAsDate: string;
90
- mainEntryPoint: string;
91
- }
92
-
93
- export interface DownloadProgress {
94
- type: 'progress' | 'finished' | 'error';
95
- downloadedFiles: number;
96
- numberOfFiles: number;
97
- errors: number;
98
- errorUrls: string[];
99
- errorsByType: ErrorsByType;
100
- }