@windycom/plugin-devtools 3.0.1 → 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.
- package/README.md +1 -0
- package/package.json +1 -1
- package/types/client/Calendar.d.ts +101 -71
- package/types/client/Color.d.ts +18 -5
- package/types/client/DataTiler.d.ts +1 -1
- package/types/client/EcmwfProduct.d.ts +22 -0
- package/types/client/IDB.d.ts +1 -1
- package/types/client/Layer.d.ts +95 -26
- package/types/client/LayerClasses.d.ts +5 -0
- package/types/client/Metric.d.ts +31 -46
- package/types/client/Overlay.d.ts +8 -11
- package/types/client/OverlayClasses.d.ts +8 -0
- package/types/client/Particles.d.ts +1 -1
- package/types/client/Product.d.ts +31 -65
- package/types/client/ProductClasses.d.ts +44 -0
- package/types/client/RadarPlusProduct.d.ts +1 -1
- package/types/client/Renderer.d.ts +41 -13
- package/types/client/SatelliteProduct.d.ts +1 -1
- package/types/client/SveltePlugin.d.ts +1 -1
- package/types/client/TileLayer.d.ts +2 -2
- package/types/client/TopoMap.d.ts +2 -3
- package/types/client/WindowPlugin.d.ts +6 -3
- package/types/client/appsFlyer.d.ts +2 -1
- package/types/client/colorGradients.d.ts +5 -10
- package/types/client/colors.d.ts +1 -2
- package/types/client/d.ts.files/Metric.d.ts +21 -2
- package/types/client/d.ts.files/TileLayerCanvas.d.ts +3 -3
- package/types/client/d.ts.files/alerts.d.ts +1 -0
- package/types/client/d.ts.files/broadcast.d.ts +3 -3
- package/types/client/d.ts.files/dataSpecifications.d.ts +32 -34
- package/types/client/d.ts.files/favs.d.ts +7 -18
- package/types/client/d.ts.files/http.d.ts +5 -0
- package/types/client/d.ts.files/lib.d.ts +0 -1
- package/types/client/d.ts.files/plugin-params.d.ts +20 -16
- package/types/client/d.ts.files/plugins.d.ts +0 -2
- package/types/client/d.ts.files/rootScope.d.ts +2 -0
- package/types/client/d.ts.files/webcams.d.ts +9 -2
- package/types/client/dataLoader.d.ts +2 -2
- package/types/client/detectDevice.d.ts +3 -0
- package/types/client/embed.d.ts +0 -2
- package/types/client/errorLogger.d.ts +1 -1
- package/types/client/externalPlugins.d.ts +2 -0
- package/types/client/fetch.d.ts +28 -4
- package/types/client/format.d.ts +1 -0
- package/types/client/glTileRender.d.ts +1 -7
- package/types/client/idbInstances.d.ts +115 -4
- package/types/client/layers.d.ts +3 -1
- package/types/client/legends.d.ts +1 -1
- package/types/client/lib.d.ts +0 -7
- package/types/client/map.d.ts +7 -1
- package/types/client/mobile.d.ts +0 -7
- package/types/client/models.d.ts +2 -6
- package/types/client/overlays.d.ts +2 -1
- package/types/client/particleRenderers.d.ts +1 -1
- package/types/client/plugins.d.ts +0 -4
- package/types/client/products.d.ts +54 -2
- package/types/client/promo.d.ts +28 -5
- package/types/client/pushNotifications.d.ts +19 -1
- package/types/client/renderCtrl.d.ts +1 -1
- package/types/client/renderTile.d.ts +2 -2
- package/types/client/renderUtils.d.ts +16 -36
- package/types/client/renderers.d.ts +2 -4
- package/types/client/reverseName.d.ts +2 -1
- package/types/client/rhMessage.d.ts +1 -1
- package/types/client/rootScope.d.ts +14 -6
- package/types/client/router.d.ts +36 -9
- package/types/client/seoParser.d.ts +35 -0
- package/types/client/showableErrorsService.d.ts +10 -6
- package/types/client/store.d.ts +20 -52
- package/types/client/tileInterpolator.d.ts +1 -1
- package/types/client/userAlerts.d.ts +0 -4
- package/types/client/userFavs.d.ts +23 -10
- package/types/client/utils.d.ts +18 -17
- package/types/interfaces.d.ts +197 -16
- package/types/lang-files.d.ts +167 -27
- package/types/types.d.ts +297 -7
- package/types/client/d.ts.files/Calendar.d.ts +0 -96
- package/types/client/d.ts.files/Color.d.ts +0 -94
- package/types/client/d.ts.files/Layer.d.ts +0 -191
- package/types/client/d.ts.files/Renderer.d.ts +0 -44
- package/types/client/d.ts.files/products.d.ts +0 -60
- package/types/client/imaker.d.ts +0 -112
- package/types/offline.d.ts +0 -100
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import type { Layer } from '@windy/Layer';
|
|
2
|
-
import type { LayerMetricType, Layers } from '@windy/Layer.d';
|
|
1
|
+
import type { LayerMetricType, Layers, Layer } from '@windy/Layer';
|
|
3
2
|
import type { Metric } from '@windy/Metric';
|
|
4
3
|
import type { DirectionFunction } from '@windy/format.d';
|
|
5
4
|
import type { Iconfont } from '@windy/iconfont.d';
|
|
6
5
|
import type { Overlays } from '@windy/rootScope.d';
|
|
7
6
|
import type { RGBNumValues } from '@windy/interpolatorTypes';
|
|
8
|
-
import type { LoadedTranslations, HTMLString } from '@windy/types';
|
|
9
|
-
import type { RGBAString } from '@windy/Color.d';
|
|
7
|
+
import type { LoadedTranslations, HTMLString, RGBString } from '@windy/types';
|
|
10
8
|
export type UsedOverlays = Overlays | 'swell' | 'satelliteIRBT';
|
|
11
9
|
export type OverlayInitParams = Pick<Overlay, 'ident'> & Partial<Overlay>;
|
|
12
10
|
type LayerProperty<L extends Layer | undefined, P extends keyof Layer> = L extends Layer ? L[P] : undefined;
|
|
@@ -81,6 +79,10 @@ export declare class Overlay<I extends Overlays = Overlays, M extends I extends
|
|
|
81
79
|
* Hides particle on/off switch in GUI (so far used only in desktop GUI)
|
|
82
80
|
*/
|
|
83
81
|
hideParticles?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Disables isolines on/off switch in GUI
|
|
84
|
+
*/
|
|
85
|
+
hideIsolines?: boolean;
|
|
84
86
|
/**
|
|
85
87
|
* Given overlay display accumulation
|
|
86
88
|
*/
|
|
@@ -112,7 +114,7 @@ export declare class Overlay<I extends Overlays = Overlays, M extends I extends
|
|
|
112
114
|
* Optional promo badge to be displayed in GUI
|
|
113
115
|
*/
|
|
114
116
|
promoBadge?: string;
|
|
115
|
-
promoBadgeColor?:
|
|
117
|
+
promoBadgeColor?: RGBString;
|
|
116
118
|
/**
|
|
117
119
|
* Optional menu image thumbnail
|
|
118
120
|
*/
|
|
@@ -146,11 +148,6 @@ export declare class Overlay<I extends Overlays = Overlays, M extends I extends
|
|
|
146
148
|
* Return ident of menu item (usualy `ident` but some inner overlays has `partOf` and are not directly in menu)
|
|
147
149
|
*/
|
|
148
150
|
getMenuIdent(): Overlays;
|
|
149
|
-
/**
|
|
150
|
-
* Custom onopen methods, currently unused
|
|
151
|
-
*/
|
|
152
|
-
onopen?(): void;
|
|
153
|
-
onclose?(): void;
|
|
154
151
|
/**
|
|
155
152
|
* Create part of inner text of picker
|
|
156
153
|
* @param values Interpolated values
|
|
@@ -159,7 +156,7 @@ export declare class Overlay<I extends Overlays = Overlays, M extends I extends
|
|
|
159
156
|
/**
|
|
160
157
|
* Just proxy to the Metric's metric property
|
|
161
158
|
*/
|
|
162
|
-
get metric(): import("./Metric").MetricItem
|
|
159
|
+
get metric(): "" | import("./Metric").MetricItem;
|
|
163
160
|
protected initProperties(): void;
|
|
164
161
|
}
|
|
165
162
|
export {};
|
|
@@ -31,3 +31,11 @@ export declare class CloudsOverlay<I extends Overlays = Overlays> extends Overla
|
|
|
31
31
|
hidePickerElevation: boolean;
|
|
32
32
|
createPickerHTML(values: RGBNumValues): string;
|
|
33
33
|
}
|
|
34
|
+
export declare class AqiOverlay<I extends Overlays = Overlays> extends Overlay<I> {
|
|
35
|
+
hidePickerElevation: boolean;
|
|
36
|
+
labels: {
|
|
37
|
+
[value: number]: keyof LoadedTranslations;
|
|
38
|
+
};
|
|
39
|
+
getAirQLabel(aqi: number): string;
|
|
40
|
+
createPickerHTML(values: RGBNumValues): string;
|
|
41
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RGBAString, RGBA } from '@windy/
|
|
1
|
+
import type { RGBAString, RGBA } from '@windy/types.d';
|
|
2
2
|
import type { Levels } from '@windy/rootScope.d';
|
|
3
3
|
import type { ExtendedRenderParams } from '@windy/interfaces.d';
|
|
4
4
|
import type { CustomParticles } from '@windy/dataSpecifications.d';
|
|
@@ -1,50 +1,25 @@
|
|
|
1
1
|
import { Calendar } from '@windy/Calendar';
|
|
2
|
-
import
|
|
3
|
-
import type {
|
|
4
|
-
import type { Layers } from '@windy/Layer.d';
|
|
2
|
+
import type { MinifestObject } from '@windy/Calendar';
|
|
3
|
+
import type { Layers } from '@windy/Layer';
|
|
5
4
|
import type { LatLon } from '@windy/interfaces';
|
|
6
5
|
import type { Isolines, Levels, Overlays, Products } from '@windy/rootScope.d';
|
|
7
|
-
import type { ISODateString, ProductCategory, ProductIdent, Timestamp,
|
|
6
|
+
import type { ISODateString, ProductCategory, ProductIdent, Timestamp, Path, Minutes } from '@windy/types';
|
|
8
7
|
export type DataQuality = 'normal' | 'high' | 'low' | 'ultra' | 'extreme';
|
|
9
8
|
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' | '
|
|
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' | 'isolines' | 'directory' | 'category' | 'modelIdent' | 'intervalPremium' | 'server' | 'modelResolution' | 'levels' | 'levelsOverride' | 'logo' | 'preferredWaveProduct' | 'preferredAirProduct' | 'hasAccumulations' | 'hasMinifest' | 'freeProduct' | 'hideProductSwitch' | 'modelDescription'>> & {
|
|
11
10
|
forecastSize?: number;
|
|
12
11
|
bounds?: [number, number][][];
|
|
13
12
|
};
|
|
14
13
|
export declare class Product {
|
|
15
|
-
/**
|
|
16
|
-
* Minifest loading promise
|
|
17
|
-
*/
|
|
18
|
-
protected loadingPromise?: null | Promise<Calendar | undefined | void>;
|
|
19
|
-
/**
|
|
20
|
-
* Version of minifest used
|
|
21
|
-
*/
|
|
22
|
-
protected infoVersion?: string;
|
|
23
|
-
/**
|
|
24
|
-
* minifest loading timer
|
|
25
|
-
*/
|
|
26
|
-
private refreshInterval?;
|
|
27
|
-
/**
|
|
28
|
-
* Timestamp of last minifest check
|
|
29
|
-
*/
|
|
30
|
-
private minifestTimestamp;
|
|
31
14
|
/**
|
|
32
15
|
* Boundaries of the product in a format [[north, west], [north, east], [south, east], [south, west]] or any more accurate polygon
|
|
33
16
|
*/
|
|
34
17
|
private bounds?;
|
|
18
|
+
private minifestExpirationTime;
|
|
35
19
|
/**
|
|
36
|
-
*
|
|
37
|
-
*/
|
|
38
|
-
private hasListeners;
|
|
39
|
-
private bindedCheckNewMinifest;
|
|
40
|
-
/**
|
|
41
|
-
* When the product will expire (in ms)
|
|
42
|
-
*/
|
|
43
|
-
private productExpires;
|
|
44
|
-
/**
|
|
45
|
-
* Noneffective, but simple refTime solutions for data that are updated once a day
|
|
20
|
+
* Minifest loading promise
|
|
46
21
|
*/
|
|
47
|
-
protected
|
|
22
|
+
protected loadingPromise?: null | Promise<Calendar | undefined | void>;
|
|
48
23
|
/**
|
|
49
24
|
* Must contain ident of self
|
|
50
25
|
*/
|
|
@@ -104,11 +79,15 @@ export declare class Product {
|
|
|
104
79
|
modelName: string;
|
|
105
80
|
modelResolution?: number;
|
|
106
81
|
provider?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Optional model description
|
|
84
|
+
*/
|
|
85
|
+
modelDescription?: string;
|
|
107
86
|
/**
|
|
108
87
|
* Update interval (in minutes)
|
|
109
88
|
*/
|
|
110
|
-
interval:
|
|
111
|
-
intervalPremium?:
|
|
89
|
+
interval: Minutes;
|
|
90
|
+
intervalPremium?: Minutes;
|
|
112
91
|
/**
|
|
113
92
|
* Usual length of forecast in hours (used upon creation of backup minifest)
|
|
114
93
|
*/
|
|
@@ -164,21 +143,16 @@ export declare class Product {
|
|
|
164
143
|
* Holder of the latest minifest
|
|
165
144
|
*/
|
|
166
145
|
minifest?: MinifestObject | null;
|
|
167
|
-
/**
|
|
168
|
-
* How the data image path should be constructed
|
|
169
|
-
*/
|
|
170
|
-
pathGenerator: string;
|
|
171
146
|
/**
|
|
172
147
|
* Alternative servers, where the data are loaded from
|
|
173
148
|
*/
|
|
174
149
|
server?: string;
|
|
175
|
-
metadataServer?: string;
|
|
176
150
|
/**
|
|
177
|
-
* Some product
|
|
151
|
+
* Some product doesn't have meaningful
|
|
178
152
|
* information about the model and time of the next update.
|
|
179
153
|
* Set this to false to hide the info where not relevant (f.ex. Info plugin)
|
|
180
154
|
*/
|
|
181
|
-
|
|
155
|
+
hasMinifest: boolean;
|
|
182
156
|
/**
|
|
183
157
|
* This product supper accumulations
|
|
184
158
|
*/
|
|
@@ -191,36 +165,28 @@ export declare class Product {
|
|
|
191
165
|
* Hide product switch in GUI, when this product is selected
|
|
192
166
|
*/
|
|
193
167
|
hideProductSwitch?: boolean;
|
|
168
|
+
/**
|
|
169
|
+
* Time when minifest was last updated
|
|
170
|
+
*/
|
|
171
|
+
minifestLastUpdate?: Timestamp;
|
|
194
172
|
constructor(params: ProductInitParams);
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
loadMinifest(): Promise<http.HttpPayload<MinifestObject>>;
|
|
203
|
-
loadAndGetReftime(): Promise<ISODateString | undefined>;
|
|
204
|
-
open(): Promise<void | Calendar>;
|
|
205
|
-
close(): void;
|
|
173
|
+
getRefTimeISOFormat(): Promise<ISODateString | undefined>;
|
|
174
|
+
getRefTime(): Promise<Path | undefined>;
|
|
175
|
+
/**
|
|
176
|
+
* Loads & returns a minifest. Since our @windy/http module has its own cache, we don't need to
|
|
177
|
+
* cache ongoing requests promise and simplify the code as much as possible
|
|
178
|
+
*/
|
|
179
|
+
loadMinifest(): Promise<MinifestObject>;
|
|
206
180
|
/**
|
|
207
181
|
* Checks if lat,lon is within bounds
|
|
208
182
|
*/
|
|
209
183
|
pointIsInBounds<T extends LatLon>(this: this, paramsMap: T): boolean;
|
|
210
|
-
boundsAreInViewport(map: L.Map): boolean;
|
|
211
|
-
printLogo(): void;
|
|
212
|
-
getCalendar(): Promise<Calendar>;
|
|
213
|
-
protected expire(): void;
|
|
214
|
-
protected setExpireTime(): void;
|
|
215
184
|
/**
|
|
216
|
-
*
|
|
217
|
-
* by standard no connection red message
|
|
218
|
-
*
|
|
219
|
-
* We delay 0.3 sec to test properly connection
|
|
185
|
+
* Detects if the the bounds are in viewport
|
|
220
186
|
*/
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
187
|
+
boundsAreInViewport(map: L.Map): boolean;
|
|
188
|
+
close(): void;
|
|
189
|
+
open(): void;
|
|
190
|
+
getCalendar(): Promise<Calendar | undefined>;
|
|
224
191
|
private isPointInsidePolygon;
|
|
225
|
-
private removeLogo;
|
|
226
192
|
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Calendar } from '@windy/Calendar';
|
|
2
|
+
import { Product } from '@windy/Product';
|
|
3
|
+
import type { ProductInitParams } from '@windy/Product';
|
|
4
|
+
import type { MinifestObject } from '@windy/Calendar';
|
|
5
|
+
import type { Overlays } from '@windy/rootScope.d';
|
|
6
|
+
export declare class EcmwfProduct extends Product {
|
|
7
|
+
calendar: Calendar;
|
|
8
|
+
constructor(params: Partial<ProductInitParams>);
|
|
9
|
+
}
|
|
10
|
+
export declare class EcmwfForecastProduct extends EcmwfProduct {
|
|
11
|
+
/**
|
|
12
|
+
* Main goal for custom loadMInifest method is to speed up loading of default minifest little bit.
|
|
13
|
+
* Default minifests are loaded ASAP in inlined JS code inside (index|mobile).html so they are
|
|
14
|
+
* available faster, then when loaded after parsing all the rest of JS code.
|
|
15
|
+
*
|
|
16
|
+
* After any change in the code, check in DevTools, that this mechanism actually works.
|
|
17
|
+
*/
|
|
18
|
+
loadMinifest(): Promise<MinifestObject>;
|
|
19
|
+
}
|
|
20
|
+
export declare class HrrrProducts extends Product {
|
|
21
|
+
constructor(params: Partial<ProductInitParams>);
|
|
22
|
+
}
|
|
23
|
+
export declare const iconOverlays: Overlays[];
|
|
24
|
+
export declare class IconProducts extends Product {
|
|
25
|
+
constructor(params: Pick<ProductInitParams, 'modelName'> & Partial<ProductInitParams>);
|
|
26
|
+
}
|
|
27
|
+
export type SatelliteProductInitParams = Pick<SatAndRadarPlusProduct, 'urlSuff' | 'urlSuffFlow'> & ProductInitParams;
|
|
28
|
+
export declare class SatAndRadarPlusProduct extends Product {
|
|
29
|
+
urlSuff: string;
|
|
30
|
+
urlSuffFlow: string;
|
|
31
|
+
constructor(params: SatelliteProductInitParams);
|
|
32
|
+
}
|
|
33
|
+
export declare class NamProducts extends Product {
|
|
34
|
+
constructor(params: Partial<ProductInitParams>);
|
|
35
|
+
}
|
|
36
|
+
export declare class AccessProduct extends Product {
|
|
37
|
+
constructor(params: Partial<ProductInitParams>);
|
|
38
|
+
}
|
|
39
|
+
export declare class AccessCProduct extends AccessProduct {
|
|
40
|
+
constructor(params: Partial<ProductInitParams>);
|
|
41
|
+
}
|
|
42
|
+
export declare class AromeProduct extends Product {
|
|
43
|
+
constructor(params: Partial<ProductInitParams>);
|
|
44
|
+
}
|
|
@@ -1,9 +1,30 @@
|
|
|
1
|
-
import type { FullRenderParameters } from '
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
1
|
+
import type { FullRenderParameters, WeatherParameters, TilePoint } from '@windy/interfaces';
|
|
2
|
+
import type { Timestamp, TransformFunction } from '@windy/types';
|
|
3
|
+
import type { Layers } from '@windy/Layer';
|
|
4
|
+
import type { InterpolatorFactory } from '@windy/interpolator';
|
|
5
|
+
import type { BottomSveltePlugins, Plugins, SveltePlugins } from '@windy/plugins.d';
|
|
6
|
+
import type { TileLayerCanvas } from '@windy/TileLayerCanvas.d';
|
|
7
|
+
export type AllowedRenderPlugins = Pick<Plugins, 'radar' | 'satellite' | 'radar-plus' | 'cap-alerts' | 'isolines' | 'gl-particles'>;
|
|
8
|
+
export type Renderers = 'tileLayer' | 'radar' | 'satellite' | 'radarPlus' | 'capAlerts' | 'isolines' | 'particles' | 'accumulations' | 'daySwitcher' | 'noUserControl' | 'topoMap';
|
|
9
|
+
export interface TileParams extends TilePoint {
|
|
10
|
+
url: string;
|
|
11
|
+
intX: number;
|
|
12
|
+
intY: number;
|
|
13
|
+
trans: number;
|
|
14
|
+
transformR: TransformFunction | null;
|
|
15
|
+
transformG: TransformFunction | null;
|
|
16
|
+
transformB: TransformFunction | null;
|
|
17
|
+
}
|
|
18
|
+
export type AllowedUserControls = keyof BottomSveltePlugins | keyof SveltePlugins | 'none';
|
|
19
|
+
export interface RendererInitParams {
|
|
20
|
+
ident: Renderers;
|
|
21
|
+
dependency?: keyof AllowedRenderPlugins;
|
|
22
|
+
userControl?: AllowedUserControls;
|
|
23
|
+
requiresFullRenderParams?: boolean;
|
|
24
|
+
}
|
|
4
25
|
/**
|
|
5
|
-
* Renderer class
|
|
6
|
-
*
|
|
26
|
+
* Renderer class acts as a proxy between renderController and code, which is responsible for
|
|
27
|
+
* rendering a particular layer
|
|
7
28
|
*/
|
|
8
29
|
export declare class Renderer<K extends keyof AllowedRenderPlugins | undefined = undefined, P extends K extends keyof AllowedRenderPlugins ? WPluginModules[`@plugins/${K}`] : undefined = K extends keyof AllowedRenderPlugins ? WPluginModules[`@plugins/${K}`] : undefined> {
|
|
9
30
|
isOpen: boolean;
|
|
@@ -15,7 +36,7 @@ export declare class Renderer<K extends keyof AllowedRenderPlugins | undefined =
|
|
|
15
36
|
/**
|
|
16
37
|
* Dependency plugin that wil be loaded before renderer is launched
|
|
17
38
|
*
|
|
18
|
-
* Dependency plugin can
|
|
39
|
+
* Dependency plugin can optionally export these methods:
|
|
19
40
|
*
|
|
20
41
|
* - onRenderStart
|
|
21
42
|
* - onRenderEnd
|
|
@@ -27,7 +48,7 @@ export declare class Renderer<K extends keyof AllowedRenderPlugins | undefined =
|
|
|
27
48
|
/**
|
|
28
49
|
* Loaded version of plugin dependency
|
|
29
50
|
*/
|
|
30
|
-
loadedDependency?: P;
|
|
51
|
+
loadedDependency?: P | typeof TileLayerCanvas;
|
|
31
52
|
/**
|
|
32
53
|
* ID of plugin, that serve as user control, which can be attached to DOM
|
|
33
54
|
* usually to #plugin-bottom div.
|
|
@@ -44,18 +65,25 @@ export declare class Renderer<K extends keyof AllowedRenderPlugins | undefined =
|
|
|
44
65
|
*/
|
|
45
66
|
userControl?: AllowedUserControls;
|
|
46
67
|
/**
|
|
47
|
-
* Picker
|
|
68
|
+
* Picker interpolation factory
|
|
48
69
|
*/
|
|
49
70
|
interpolator?: InterpolatorFactory;
|
|
71
|
+
/**
|
|
72
|
+
* Instance of this renderer requires FullRenderParameters to be passed
|
|
73
|
+
* to renderer methods
|
|
74
|
+
*/
|
|
75
|
+
requiresFullRenderParams: boolean;
|
|
50
76
|
constructor(params: RendererInitParams);
|
|
51
|
-
open(
|
|
77
|
+
open(layerIdent: Layers, weatherParams: WeatherParameters, timestamp: Timestamp): Promise<void>;
|
|
52
78
|
/**
|
|
53
|
-
* Called by rndrCtrl
|
|
54
|
-
*
|
|
79
|
+
* Called by rndrCtrl. Requires list of required renderers,
|
|
80
|
+
* so we kno who will replace us. This parameters is here just because of
|
|
81
|
+
* TileLayer, which is just wrapper around Leaflet GridLayer, and we want to
|
|
82
|
+
* keep this Leaflet instance alive.
|
|
55
83
|
*/
|
|
56
84
|
close(_rqrdRenderers: Renderers[]): void;
|
|
57
|
-
onopen(params
|
|
85
|
+
onopen(params?: FullRenderParameters): void;
|
|
58
86
|
onclose(): void;
|
|
59
|
-
paramsChanged(
|
|
87
|
+
paramsChanged(layerIdent: Layers, weatherParams: WeatherParameters, timestamp: Timestamp): Promise<void>;
|
|
60
88
|
redraw(): void;
|
|
61
89
|
}
|
|
@@ -3,7 +3,7 @@ import type { WindowPluginInitParams } from '@windy/WindowPlugin';
|
|
|
3
3
|
import type { PluginsOpenParams, PluginsQsParams } from '@windy/plugin-params.d';
|
|
4
4
|
import type { BottomSveltePlugins, SveltePanePlugins, SveltePlugins } from '@windy/plugins.d';
|
|
5
5
|
import type { InterpolatorFactory } from '@windy/interpolator';
|
|
6
|
-
import type { FullRenderParameters } from '@windy/
|
|
6
|
+
import type { FullRenderParameters } from '@windy/interfaces';
|
|
7
7
|
export declare class SvelteApp<P extends keyof SveltePlugins | keyof SveltePanePlugins | keyof BottomSveltePlugins> {
|
|
8
8
|
interpolator?: InterpolatorFactory;
|
|
9
9
|
constructor(_args: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Renderer } from '@windy/Renderer';
|
|
2
|
-
import type { FullRenderParameters } from '@windy/
|
|
3
|
-
import type { RendererInitParams, Renderers } from '@windy/Renderer
|
|
2
|
+
import type { FullRenderParameters } from '@windy/interfaces';
|
|
3
|
+
import type { RendererInitParams, Renderers } from '@windy/Renderer';
|
|
4
4
|
export declare class TileLayer extends Renderer {
|
|
5
5
|
constructor(params: RendererInitParams);
|
|
6
6
|
onopen(params?: FullRenderParameters): void;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Renderer } from '@windy/Renderer';
|
|
2
|
-
import type {
|
|
3
|
-
import type { Renderers } from '@windy/Renderer.d';
|
|
2
|
+
import type { Renderers } from '@windy/Renderer';
|
|
4
3
|
export declare class TopoMap extends Renderer {
|
|
5
4
|
baseLayer: L.GridLayer | null;
|
|
6
|
-
open(
|
|
5
|
+
open(): Promise<void>;
|
|
7
6
|
close(rqrdRenderers: Renderers[]): void;
|
|
8
7
|
addOrUpdateBaseLayer(): void;
|
|
9
8
|
removeBaseLayer(): void;
|
|
@@ -146,10 +146,13 @@ export declare abstract class WindowPlugin<P extends keyof WindowPlugins> extend
|
|
|
146
146
|
beforeLoad(..._args: unknown[]): void;
|
|
147
147
|
/**
|
|
148
148
|
* Called by router when URL matches plugin's router (feel free to overload it)
|
|
149
|
+
*
|
|
150
|
+
* Typing is difficult here, because captured groups provide just object with string values
|
|
151
|
+
* and we dunno that it adheres to PluginsOpenParams[P] type.
|
|
152
|
+
*
|
|
153
|
+
* Yet the return type MUST BE PluginsOpenParams[P] so it can be used
|
|
149
154
|
*/
|
|
150
|
-
onRouteMatch(
|
|
151
|
-
groups: PluginsOpenParams[P];
|
|
152
|
-
}, _qs?: ParsedQueryString): PluginsOpenParams[P] | undefined;
|
|
155
|
+
onRouteMatch(regExpGroups: Record<string, string>, _qs?: ParsedQueryString): PluginsOpenParams[P];
|
|
153
156
|
/**
|
|
154
157
|
* When called with params, it will create valid URL for plugin
|
|
155
158
|
* as defined in router property.
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import type { AppsFlyerPlugin } from 'appsflyer-capacitor-plugin/src/definitions';
|
|
2
|
+
export declare const appsFlyerPromise: Promise<AppsFlyerPlugin | undefined>;
|
|
2
3
|
export declare function logAppsFlyerProductChange(): void;
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Reusable color gradients
|
|
3
3
|
*/
|
|
4
|
-
import type {
|
|
5
|
-
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
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;
|
|
4
|
+
import type { RGBString, ColorGradientString } from '@windy/types.d';
|
|
5
|
+
export declare const moistureAnomaly: RGBString[];
|
|
6
|
+
export declare const airPollutant: RGBString[];
|
|
7
|
+
export declare const cloudBaseAndVisibility: RGBString[];
|
|
8
|
+
export declare const radarGradientAndValues: ColorGradientString;
|
package/types/client/colors.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
SatelliteMetric,
|
|
7
7
|
UVIndexMetric,
|
|
8
8
|
} from '@windy/MetricClasses';
|
|
9
|
+
import { Metric } from '@windy/Metric';
|
|
9
10
|
import { NumValue } from '@windy/types.d';
|
|
10
11
|
|
|
11
12
|
/*
|
|
@@ -53,7 +54,9 @@ export type MetricItem =
|
|
|
53
54
|
| 'uvindex'
|
|
54
55
|
| 'EDR'
|
|
55
56
|
| 'km²'
|
|
56
|
-
| 'acres'
|
|
57
|
+
| 'acres'
|
|
58
|
+
| 'AQI'
|
|
59
|
+
| 'gr./m³';
|
|
57
60
|
|
|
58
61
|
/**
|
|
59
62
|
* # @windy/metrics
|
|
@@ -121,6 +124,8 @@ export interface MetricTypes {
|
|
|
121
124
|
turbulence: NumberedMetric;
|
|
122
125
|
icing: NumberedMetric;
|
|
123
126
|
area: NumberedMetric;
|
|
127
|
+
aqi: NumberedMetric;
|
|
128
|
+
pollen: NumberedMetric;
|
|
124
129
|
}
|
|
125
130
|
|
|
126
131
|
/** @ignore */
|
|
@@ -190,4 +195,18 @@ export interface Conversion {
|
|
|
190
195
|
export type ConvObj = { [K in MetricItem]?: Conversion };
|
|
191
196
|
|
|
192
197
|
/** @ignore */
|
|
193
|
-
export type MetricInitParams = Pick<
|
|
198
|
+
export type MetricInitParams = Pick<Metric, 'ident'> &
|
|
199
|
+
Partial<
|
|
200
|
+
Pick<
|
|
201
|
+
Metric,
|
|
202
|
+
| 'lines'
|
|
203
|
+
| 'conv'
|
|
204
|
+
| 'backConv'
|
|
205
|
+
| 'defaults'
|
|
206
|
+
| 'cohesion'
|
|
207
|
+
| 'nativeSync'
|
|
208
|
+
| 'description'
|
|
209
|
+
| 'separator'
|
|
210
|
+
| 'discreteLegend'
|
|
211
|
+
>
|
|
212
|
+
>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DataTile } from '@windy/dataLoader';
|
|
2
2
|
|
|
3
|
-
import { FullRenderParameters } from '@windy/
|
|
4
|
-
import { TileParams } from '@windy/Renderer
|
|
3
|
+
import { FullRenderParameters } from '@windy/interfaces';
|
|
4
|
+
import { TileParams } from '@windy/Renderer';
|
|
5
5
|
|
|
6
6
|
export type InternalTile = L.InternalTiles[string] & { el: HTMLCanvasElement };
|
|
7
7
|
|
|
@@ -34,7 +34,7 @@ export class TileLayerCanvas extends L.GridLayer {
|
|
|
34
34
|
_tilesToLoad: number;
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* Overwriting TileLayer method to disable redrawing layers w/o params
|
|
38
38
|
*/
|
|
39
39
|
// @ts-expect-error We rape TS with overloading properties with properties of different input and output (TODO fix)
|
|
40
40
|
onAdd(this: this, map: L.Map): this;
|
|
@@ -97,7 +97,7 @@ export interface BasicBcastTypes<T extends keyof Plugins> {
|
|
|
97
97
|
* Do not not use this event to start any intensive action since Windy now
|
|
98
98
|
* must load and render all the data. We recommend to use `redrawFinished` instead.
|
|
99
99
|
*/
|
|
100
|
-
paramsChanged: [WeatherParameters, keyof WeatherParameters | undefined];
|
|
100
|
+
paramsChanged: [WeatherParameters, keyof WeatherParameters | 'path' | undefined];
|
|
101
101
|
|
|
102
102
|
/**
|
|
103
103
|
* Indicates that user changed any of the units (wind, temp, ...).
|
|
@@ -161,8 +161,8 @@ export interface BasicBcastTypes<T extends keyof Plugins> {
|
|
|
161
161
|
];
|
|
162
162
|
/** @ignore */ 'radarPlus-open-layer': [RadarPlusLayer, boolean | undefined]; // Layer to open, whether to open layer for color editing
|
|
163
163
|
/** @ignore */ detailClose: [];
|
|
164
|
-
/** @ignore */ detailRendered: []; // used only in embed
|
|
165
|
-
/** @ignore */ stationRendered: []; // used only in embed
|
|
164
|
+
/** @ignore */ detailRendered: []; // used only in embed indicates that detail is ready
|
|
165
|
+
/** @ignore */ stationRendered: []; // used only in embed indicates that detail is ready
|
|
166
166
|
/** @ignore */ reloadFavs: [];
|
|
167
167
|
/** @ignore */ notifPrefChanged: [NotificationPreferences | undefined];
|
|
168
168
|
/** @ignore */ satBackupReload: [];
|