@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.
- package/README.md +1 -0
- package/package.json +1 -1
- package/types/client/Calendar.d.ts +104 -70
- package/types/client/Color.d.ts +25 -5
- package/types/client/DataTiler.d.ts +2 -2
- package/types/client/EcmwfProduct.d.ts +22 -0
- package/types/client/EventManager.d.ts +69 -0
- package/types/client/ExternalSveltePlugin.d.ts +4 -3
- package/types/client/GlBuffer.d.ts +45 -0
- package/types/client/GlMesh.d.ts +147 -0
- package/types/client/GlProgram.d.ts +41 -0
- package/types/client/GlRenderer.d.ts +95 -0
- package/types/client/GlTexture.d.ts +98 -0
- package/types/client/GlVertexArray.d.ts +38 -0
- package/types/client/IDB.d.ts +25 -4
- package/types/client/LabelsLayer.d.ts +69 -2
- package/types/client/Layer.d.ts +96 -26
- package/types/client/LayerClasses.d.ts +5 -0
- package/types/client/Metric.d.ts +31 -46
- package/types/client/MetricClasses.d.ts +1 -1
- package/types/client/Overlay.d.ts +5 -12
- package/types/client/OverlayClasses.d.ts +8 -0
- package/types/client/Particles.d.ts +1 -1
- package/types/client/Product.d.ts +38 -67
- package/types/client/ProductClasses.d.ts +51 -0
- package/types/client/RadarPlusProduct.d.ts +1 -1
- package/types/client/Renderer.d.ts +44 -19
- package/types/client/SatelliteProduct.d.ts +1 -1
- package/types/client/ShaderStorage.d.ts +25 -0
- package/types/client/StartupElementPlugin.d.ts +8 -0
- package/types/client/SveltePlugin.d.ts +5 -5
- package/types/client/SwitchableTileCache.d.ts +104 -0
- package/types/client/TileLayer.d.ts +12 -3
- package/types/client/TileLayerCustom.d.ts +51 -0
- package/types/client/TileLayerMulti.d.ts +53 -0
- package/types/client/TileLayerPreprocessorStandalone.d.ts +45 -0
- package/types/client/TileLayerRenderer.d.ts +24 -0
- package/types/client/TileLayerUtils.d.ts +43 -0
- package/types/client/TilePreprocessor.d.ts +27 -0
- package/types/client/TopoMap.d.ts +4 -4
- package/types/client/WindowPlugin.d.ts +7 -6
- package/types/client/appsFlyer.d.ts +2 -1
- package/types/client/baseMap.d.ts +12 -2
- package/types/client/broadcast.d.ts +1 -1
- package/types/client/cityLabels.d.ts +2 -3
- package/types/client/colorGradients.d.ts +4 -10
- package/types/client/colors.d.ts +1 -2
- package/types/client/css.test.d.ts +1 -0
- package/types/client/customProtocol.d.ts +11 -0
- package/types/client/d.ts.files/GlObj.d.ts +1 -5
- package/types/client/d.ts.files/Metric.d.ts +23 -2
- package/types/client/d.ts.files/alerts.d.ts +1 -0
- package/types/client/d.ts.files/broadcast.d.ts +31 -35
- package/types/client/d.ts.files/dataSpecifications.d.ts +82 -66
- package/types/client/d.ts.files/favs.d.ts +7 -18
- package/types/client/d.ts.files/glUtils.d.ts +71 -0
- package/types/client/d.ts.files/http.d.ts +4 -4
- package/types/client/d.ts.files/interpolatorTypes.d.ts +5 -5
- package/types/client/d.ts.files/lib.d.ts +1 -2
- package/types/client/d.ts.files/liveAlerts.d.ts +52 -0
- package/types/client/d.ts.files/mapUtils.d.ts +25 -0
- package/types/client/d.ts.files/outgoingMessages.d.ts +1 -1
- package/types/client/d.ts.files/plugin-params.d.ts +46 -24
- package/types/client/d.ts.files/plugins.d.ts +44 -31
- package/types/client/d.ts.files/rootScope.d.ts +2 -0
- package/types/client/d.ts.files/singleclick.d.ts +4 -2
- package/types/client/d.ts.files/startup.d.ts +7 -52
- package/types/client/d.ts.files/storage.d.ts +0 -11
- package/types/client/d.ts.files/user.d.ts +6 -1
- 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 +2 -7
- package/types/client/errorLogger.d.ts +20 -1
- package/types/client/externalPlugins.d.ts +5 -1
- package/types/client/fetch.d.ts +62 -5
- package/types/client/format.d.ts +12 -0
- package/types/client/glContextUtils.d.ts +9 -0
- package/types/client/glStatus.d.ts +7 -0
- package/types/client/glTileRender.d.ts +1 -7
- package/types/client/glUtils.d.ts +119 -0
- package/types/client/http.d.ts +0 -6
- package/types/client/idbConnection.d.ts +13 -0
- package/types/client/idbInstances.d.ts +118 -13
- package/types/client/landLayer.d.ts +3 -0
- package/types/client/layers.d.ts +5 -2
- package/types/client/legends.d.ts +1 -1
- package/types/client/lib.d.ts +11 -21
- package/types/client/liveAlerts.d.ts +2 -2
- package/types/client/location.d.ts +1 -1
- package/types/client/map.d.ts +94 -15
- package/types/client/mapUtils.d.ts +66 -0
- package/types/client/math.d.ts +14 -0
- package/types/client/mobile.d.ts +16 -41
- package/types/client/mobileUtils.d.ts +10 -0
- package/types/client/models.d.ts +2 -6
- package/types/client/overlays.d.ts +4 -3
- package/types/client/particleRenderers.d.ts +1 -1
- package/types/client/picker.d.ts +4 -8
- package/types/client/plugins.d.ts +0 -4
- package/types/client/products.d.ts +53 -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 +21 -27
- package/types/client/renderers.d.ts +6 -9
- package/types/client/reverseName.d.ts +2 -1
- package/types/client/rhMessage.d.ts +1 -1
- package/types/client/rootScope.d.ts +17 -9
- package/types/client/router.d.ts +41 -9
- package/types/client/seoParser.d.ts +35 -0
- package/types/client/showableErrorsService.d.ts +10 -6
- package/types/client/singleclick.d.ts +1 -1
- package/types/client/startup.d.ts +48 -0
- package/types/client/startupUtils.d.ts +19 -0
- package/types/client/store.d.ts +20 -52
- package/types/client/subscription.d.ts +3 -26
- package/types/client/throttler.d.ts +32 -0
- package/types/client/tileHelpers.d.ts +35 -0
- package/types/client/tileInterpolator.d.ts +1 -1
- package/types/client/tileLayerInterpolator.d.ts +40 -0
- package/types/client/tileLayerSource.d.ts +98 -0
- package/types/client/timestampUtils.test.d.ts +1 -0
- package/types/client/topMessage.d.ts +22 -0
- package/types/client/user.d.ts +1 -0
- package/types/client/userAlerts.d.ts +0 -4
- package/types/client/userConsent.d.ts +0 -2
- package/types/client/userFavs.d.ts +17 -12
- package/types/client/utils.d.ts +78 -25
- package/types/client/utils.test.d.ts +1 -0
- package/types/iconfont.d.ts +2 -5
- package/types/interfaces.d.ts +290 -88
- package/types/lang-files.d.ts +578 -98
- package/types/leaflet-gl.d.ts +12773 -0
- package/types/types.d.ts +323 -11
- package/types/client/d.ts.files/Calendar.d.ts +0 -96
- package/types/client/d.ts.files/CanvasLayer.d.ts +0 -70
- package/types/client/d.ts.files/Color.d.ts +0 -94
- package/types/client/d.ts.files/DataTiler.d.ts +0 -45
- package/types/client/d.ts.files/LandMask.d.ts +0 -17
- package/types/client/d.ts.files/Layer.d.ts +0 -191
- package/types/client/d.ts.files/PoisOverlay.d.ts +0 -27
- package/types/client/d.ts.files/Renderer.d.ts +0 -44
- package/types/client/d.ts.files/TileLayerCanvas.d.ts +0 -78
- package/types/client/d.ts.files/TileLayerMultiPatch.d.ts +0 -13
- 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
package/types/client/Metric.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { Color } from './d.ts.files/Color';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type { HTMLString, NumValue, LoadedTranslations } from './d.ts.files/types.d';
|
|
2
|
+
import type { ConvObj, Legend, LegendDescription, LegendLines, MetricIdent, MetricInitParams, MetricItem } from './d.ts.files/Metric.d';
|
|
3
|
+
import type { NumValue, LoadedTranslations, RGBString } from './d.ts.files/types.d';
|
|
5
4
|
export declare const rtrnSelf: (x: NumValue) => NumValue;
|
|
6
5
|
/**
|
|
7
6
|
* # @windy/Metric
|
|
@@ -13,26 +12,23 @@ export declare const rtrnSelf: (x: NumValue) => NumValue;
|
|
|
13
12
|
* Never ever, change users selected metric without their consent.
|
|
14
13
|
*/
|
|
15
14
|
export declare abstract class Metric<T extends string | number = string | number> {
|
|
16
|
-
/**
|
|
17
|
-
* Identifies metric
|
|
18
|
-
*/
|
|
19
|
-
ident: MetricIdent;
|
|
20
15
|
/**
|
|
21
16
|
* Store key
|
|
22
17
|
*/
|
|
23
|
-
key
|
|
18
|
+
private key;
|
|
24
19
|
/**
|
|
25
|
-
*
|
|
20
|
+
* Keeps cohesion in between multiple metric instances. For example setting `in`
|
|
21
|
+
* in rain will set `in` in snow also
|
|
26
22
|
*/
|
|
27
|
-
|
|
23
|
+
cohesion?: {
|
|
24
|
+
[ident in MetricIdent]?: {
|
|
25
|
+
[unit in MetricItem]?: MetricItem;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
28
|
/**
|
|
29
29
|
* Conversion functions
|
|
30
30
|
*/
|
|
31
31
|
conv: ConvObj;
|
|
32
|
-
/**
|
|
33
|
-
* Backward conversion functions
|
|
34
|
-
*/
|
|
35
|
-
backConv?: ConvObj;
|
|
36
32
|
/**
|
|
37
33
|
* number ' ' metric separator
|
|
38
34
|
*/
|
|
@@ -47,22 +43,25 @@ export declare abstract class Metric<T extends string | number = string | number
|
|
|
47
43
|
*/
|
|
48
44
|
nativeSync: boolean;
|
|
49
45
|
/**
|
|
50
|
-
*
|
|
46
|
+
* Identifies metric
|
|
51
47
|
*/
|
|
52
|
-
|
|
48
|
+
ident: MetricIdent;
|
|
49
|
+
/**
|
|
50
|
+
* Backward conversion functions
|
|
51
|
+
*/
|
|
52
|
+
backConv?: ConvObj;
|
|
53
53
|
/**
|
|
54
54
|
* Array defining how the legend will look like
|
|
55
55
|
*/
|
|
56
56
|
lines: LegendLines;
|
|
57
57
|
/**
|
|
58
|
-
*
|
|
59
|
-
* in rain will set `in` in snow also
|
|
58
|
+
* Actually selected metric
|
|
60
59
|
*/
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
metric: MetricItem;
|
|
61
|
+
/**
|
|
62
|
+
* Legend description
|
|
63
|
+
*/
|
|
64
|
+
description: LegendDescription;
|
|
66
65
|
/**
|
|
67
66
|
* Some metrics have discrete legend.
|
|
68
67
|
* If so, these labels define it, where NumValue is numerical value, to grab color from color table
|
|
@@ -81,18 +80,7 @@ export declare abstract class Metric<T extends string | number = string | number
|
|
|
81
80
|
*/
|
|
82
81
|
labels: [keyof LoadedTranslations, RGBString][];
|
|
83
82
|
};
|
|
84
|
-
/**
|
|
85
|
-
* Colors used to render discrete legend
|
|
86
|
-
* @param params
|
|
87
|
-
*/
|
|
88
83
|
constructor(params: MetricInitParams);
|
|
89
|
-
/**
|
|
90
|
-
* Returns metric value
|
|
91
|
-
*/
|
|
92
|
-
getMetric(): MetricItem;
|
|
93
|
-
onMetricChanged(metric: MetricItem): void;
|
|
94
|
-
getDefault(): MetricItem;
|
|
95
|
-
setDefault(): void;
|
|
96
84
|
/**
|
|
97
85
|
* get value + label on a basis of user selected metric
|
|
98
86
|
*/
|
|
@@ -106,7 +94,7 @@ export declare abstract class Metric<T extends string | number = string | number
|
|
|
106
94
|
*/
|
|
107
95
|
abstract convertNumber(value: NumValue, forcedPrecision?: number, metric?: MetricItem): T;
|
|
108
96
|
/**
|
|
109
|
-
* List all avail
|
|
97
|
+
* List all avail units
|
|
110
98
|
*/
|
|
111
99
|
listMetrics(): MetricItem[];
|
|
112
100
|
/**
|
|
@@ -116,21 +104,18 @@ export declare abstract class Metric<T extends string | number = string | number
|
|
|
116
104
|
/**
|
|
117
105
|
* Stores required metric into storage
|
|
118
106
|
*/
|
|
119
|
-
setMetric(metric: MetricItem,
|
|
107
|
+
setMetric(metric: MetricItem, ignoreCohesion?: boolean): void;
|
|
120
108
|
/**
|
|
121
109
|
* Cycles throu different metrics (for example after clicking on a legend)
|
|
122
110
|
*/
|
|
123
|
-
cycleMetric(
|
|
124
|
-
static getGradientLegend: (col: Color | undefined, legend: Legend, metric: MetricItem) => {
|
|
125
|
-
background: string;
|
|
126
|
-
content: HTMLString;
|
|
127
|
-
} | null;
|
|
111
|
+
cycleMetric(): void;
|
|
128
112
|
/** color object is required for classic gradient metrics, discrete ones do not need it as colors are hardcoded for them */
|
|
129
113
|
renderLegend(col: Color | undefined, el: HTMLDivElement, legend: Legend): void;
|
|
130
|
-
renderDiscreteLegend(): {
|
|
131
|
-
background: '';
|
|
132
|
-
content: HTMLString;
|
|
133
|
-
};
|
|
134
114
|
protected initProperties(): void;
|
|
135
|
-
private
|
|
115
|
+
private onMetricChanged;
|
|
116
|
+
private getDefault;
|
|
117
|
+
private setDefault;
|
|
118
|
+
private getGradientLegend;
|
|
119
|
+
private renderDiscreteLegend;
|
|
120
|
+
private createKey;
|
|
136
121
|
}
|
|
@@ -31,7 +31,7 @@ export declare class SatelliteMetric extends NumberedMetric {
|
|
|
31
31
|
* Dynamic update from minifest/info.json
|
|
32
32
|
* @param pars various pars depending on concrete instance
|
|
33
33
|
*/
|
|
34
|
-
updateLines(pars: [number, number],
|
|
34
|
+
updateLines(pars: [number, number], _radarEnabled?: boolean): void;
|
|
35
35
|
}
|
|
36
36
|
export declare class PrecipMetric extends NumberedMetric {
|
|
37
37
|
initProperties(): void;
|
|
@@ -1,13 +1,11 @@
|
|
|
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
|
-
|
|
10
|
-
export type UsedOverlays = Overlays | 'swell' | 'satelliteIRBT';
|
|
7
|
+
import type { LoadedTranslations, HTMLString, RGBString } from '@windy/types';
|
|
8
|
+
export type UsedOverlays = Overlays | 'swell';
|
|
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;
|
|
13
11
|
type MetricProperty<M extends Metric | undefined, P extends keyof Metric> = M extends Metric ? M[P] : undefined;
|
|
@@ -112,7 +110,7 @@ export declare class Overlay<I extends Overlays = Overlays, M extends I extends
|
|
|
112
110
|
* Optional promo badge to be displayed in GUI
|
|
113
111
|
*/
|
|
114
112
|
promoBadge?: string;
|
|
115
|
-
promoBadgeColor?:
|
|
113
|
+
promoBadgeColor?: RGBString;
|
|
116
114
|
/**
|
|
117
115
|
* Optional menu image thumbnail
|
|
118
116
|
*/
|
|
@@ -146,11 +144,6 @@ export declare class Overlay<I extends Overlays = Overlays, M extends I extends
|
|
|
146
144
|
* Return ident of menu item (usualy `ident` but some inner overlays has `partOf` and are not directly in menu)
|
|
147
145
|
*/
|
|
148
146
|
getMenuIdent(): Overlays;
|
|
149
|
-
/**
|
|
150
|
-
* Custom onopen methods, currently unused
|
|
151
|
-
*/
|
|
152
|
-
onopen?(): void;
|
|
153
|
-
onclose?(): void;
|
|
154
147
|
/**
|
|
155
148
|
* Create part of inner text of picker
|
|
156
149
|
* @param values Interpolated values
|
|
@@ -159,7 +152,7 @@ export declare class Overlay<I extends Overlays = Overlays, M extends I extends
|
|
|
159
152
|
/**
|
|
160
153
|
* Just proxy to the Metric's metric property
|
|
161
154
|
*/
|
|
162
|
-
get metric(): import("./Metric").MetricItem
|
|
155
|
+
get metric(): "" | import("./Metric").MetricItem;
|
|
163
156
|
protected initProperties(): void;
|
|
164
157
|
}
|
|
165
158
|
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,26 @@
|
|
|
1
1
|
import { Calendar } from '@windy/Calendar';
|
|
2
|
-
import
|
|
3
|
-
import type { MinifestObject } from '@windy/Calendar
|
|
4
|
-
import type { Layers } from '@windy/Layer
|
|
2
|
+
import { type LeafletGlMap } from '@leafletGl';
|
|
3
|
+
import type { MinifestObject } from '@windy/Calendar';
|
|
4
|
+
import type { Layers } from '@windy/Layer';
|
|
5
5
|
import type { LatLon } from '@windy/interfaces';
|
|
6
6
|
import type { Isolines, Levels, Overlays, Products } from '@windy/rootScope.d';
|
|
7
|
-
import type { ISODateString, ProductCategory, ProductIdent, Timestamp,
|
|
7
|
+
import type { ISODateString, ProductCategory, ProductIdent, Timestamp, TimeRangeMs, Path, Minutes } from '@windy/types';
|
|
8
8
|
export type DataQuality = 'normal' | 'high' | 'low' | 'ultra' | 'extreme';
|
|
9
9
|
export type FileSuffix = 'png' | 'jpg' | 'webp';
|
|
10
|
-
export type ProductInitParams = Pick<Product, 'modelName' | 'provider' | 'interval'> & Partial<Pick<Product, 'provider' | 'ident' | 'maxTileZoom' | 'animationSpeed' | 'animationSpeed1h' | 'fileSuffix' | 'fileSuffixFallback' | 'JPGtransparency' | 'PNGtransparency' | 'dataQuality' | 'betterDataQuality' | 'animation' | 'labelsTemp' | 'overlays' | 'preferredProduct' | '
|
|
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' | 'isolines' | 'directory' | 'category' | 'modelIdent' | 'intervalPremium' | 'server' | 'modelResolution' | 'levels' | 'levelsOverride' | 'logo' | 'preferredWaveProduct' | 'preferredAirProduct' | 'hasAccumulations' | 'hasMinifest' | 'freeProduct' | 'hideProductSwitch' | 'modelDescription' | 'supportsMeteogram'>> & {
|
|
11
11
|
forecastSize?: number;
|
|
12
12
|
bounds?: [number, number][][];
|
|
13
13
|
};
|
|
14
14
|
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
15
|
/**
|
|
32
16
|
* Boundaries of the product in a format [[north, west], [north, east], [south, east], [south, west]] or any more accurate polygon
|
|
33
17
|
*/
|
|
34
18
|
private bounds?;
|
|
19
|
+
protected minifestExpirationTime: TimeRangeMs;
|
|
35
20
|
/**
|
|
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
|
|
21
|
+
* Minifest loading promise
|
|
46
22
|
*/
|
|
47
|
-
protected
|
|
23
|
+
protected loadingPromise?: null | Promise<Calendar | undefined | void>;
|
|
48
24
|
/**
|
|
49
25
|
* Must contain ident of self
|
|
50
26
|
*/
|
|
@@ -101,14 +77,18 @@ export declare class Product {
|
|
|
101
77
|
/**
|
|
102
78
|
* Description of product for purpose of UI
|
|
103
79
|
*/
|
|
104
|
-
modelName: string;
|
|
80
|
+
modelName: string | '';
|
|
105
81
|
modelResolution?: number;
|
|
106
82
|
provider?: string;
|
|
83
|
+
/**
|
|
84
|
+
* Optional model description
|
|
85
|
+
*/
|
|
86
|
+
modelDescription?: string;
|
|
107
87
|
/**
|
|
108
88
|
* Update interval (in minutes)
|
|
109
89
|
*/
|
|
110
|
-
interval:
|
|
111
|
-
intervalPremium?:
|
|
90
|
+
interval: Minutes;
|
|
91
|
+
intervalPremium?: Minutes;
|
|
112
92
|
/**
|
|
113
93
|
* Usual length of forecast in hours (used upon creation of backup minifest)
|
|
114
94
|
*/
|
|
@@ -164,21 +144,16 @@ export declare class Product {
|
|
|
164
144
|
* Holder of the latest minifest
|
|
165
145
|
*/
|
|
166
146
|
minifest?: MinifestObject | null;
|
|
167
|
-
/**
|
|
168
|
-
* How the data image path should be constructed
|
|
169
|
-
*/
|
|
170
|
-
pathGenerator: string;
|
|
171
147
|
/**
|
|
172
148
|
* Alternative servers, where the data are loaded from
|
|
173
149
|
*/
|
|
174
150
|
server?: string;
|
|
175
|
-
metadataServer?: string;
|
|
176
151
|
/**
|
|
177
|
-
* Some product
|
|
152
|
+
* Some product doesn't have meaningful
|
|
178
153
|
* information about the model and time of the next update.
|
|
179
154
|
* Set this to false to hide the info where not relevant (f.ex. Info plugin)
|
|
180
155
|
*/
|
|
181
|
-
|
|
156
|
+
hasMinifest: boolean;
|
|
182
157
|
/**
|
|
183
158
|
* This product supper accumulations
|
|
184
159
|
*/
|
|
@@ -191,36 +166,32 @@ export declare class Product {
|
|
|
191
166
|
* Hide product switch in GUI, when this product is selected
|
|
192
167
|
*/
|
|
193
168
|
hideProductSwitch?: boolean;
|
|
169
|
+
/**
|
|
170
|
+
* Time when minifest was last updated
|
|
171
|
+
*/
|
|
172
|
+
minifestLastUpdate?: Timestamp;
|
|
173
|
+
/**
|
|
174
|
+
* Point fcst backend for this product supports airgram/meteogram
|
|
175
|
+
*/
|
|
176
|
+
supportsMeteogram?: boolean;
|
|
194
177
|
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;
|
|
178
|
+
getRefTimeISOFormat(): Promise<ISODateString | undefined>;
|
|
179
|
+
getRefTime(): Promise<Path | undefined>;
|
|
180
|
+
/**
|
|
181
|
+
* Loads & returns a minifest. Since our @windy/http module has its own cache, we don't need to
|
|
182
|
+
* cache ongoing requests promise and simplify the code as much as possible
|
|
183
|
+
*/
|
|
184
|
+
loadMinifest(): Promise<MinifestObject>;
|
|
206
185
|
/**
|
|
207
186
|
* Checks if lat,lon is within bounds
|
|
208
187
|
*/
|
|
209
188
|
pointIsInBounds<T extends LatLon>(this: this, paramsMap: T): boolean;
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
getCalendar(): Promise<Calendar>;
|
|
213
|
-
protected expire(): void;
|
|
214
|
-
protected setExpireTime(): void;
|
|
215
|
-
/**
|
|
216
|
-
* Major reason for this error is user's bad connection, which is handled
|
|
217
|
-
* by standard no connection red message
|
|
218
|
-
*
|
|
219
|
-
* We delay 0.3 sec to test properly connection
|
|
189
|
+
/**
|
|
190
|
+
* Detects if the the bounds are in viewport
|
|
220
191
|
*/
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
192
|
+
boundsAreInViewport(map: LeafletGlMap): boolean;
|
|
193
|
+
close(): void;
|
|
194
|
+
open(): void;
|
|
195
|
+
getCalendar(): Promise<Calendar | undefined>;
|
|
224
196
|
private isPointInsidePolygon;
|
|
225
|
-
private removeLogo;
|
|
226
197
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
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
|
+
/**
|
|
34
|
+
* Auxiliary product with fake calendar required for rendering of isolines on top of overlays, that do not have calendar nor load minifest
|
|
35
|
+
* - provides timestamp array with single timestamp pair equal to the current time
|
|
36
|
+
*/
|
|
37
|
+
export declare class FakeCalendarProduct extends Product {
|
|
38
|
+
loadMinifest(): Promise<MinifestObject>;
|
|
39
|
+
}
|
|
40
|
+
export declare class NamProducts extends Product {
|
|
41
|
+
constructor(params: Partial<ProductInitParams>);
|
|
42
|
+
}
|
|
43
|
+
export declare class AccessProduct extends Product {
|
|
44
|
+
constructor(params: Partial<ProductInitParams>);
|
|
45
|
+
}
|
|
46
|
+
export declare class AccessCProduct extends AccessProduct {
|
|
47
|
+
constructor(params: Partial<ProductInitParams>);
|
|
48
|
+
}
|
|
49
|
+
export declare class AromeProduct extends Product {
|
|
50
|
+
constructor(params: Partial<ProductInitParams>);
|
|
51
|
+
}
|
|
@@ -1,11 +1,38 @@
|
|
|
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
|
+
export type AllowedRenderPlugins = Pick<Plugins, 'radar' | 'radar-plus' | 'cap-alerts' | 'isolines' | 'gl-particles'>;
|
|
7
|
+
interface DependencyModuleMap {
|
|
8
|
+
radar: WPluginModules['@plugins/radar'];
|
|
9
|
+
'radar-plus': WPluginModules['@plugins/radar-plus'];
|
|
10
|
+
'cap-alerts': WPluginModules['@plugins/cap-alerts'];
|
|
11
|
+
isolines: WPluginModules['@plugins/isolines'];
|
|
12
|
+
'gl-particles': WPluginModules['@plugins/gl-particles'];
|
|
13
|
+
}
|
|
14
|
+
export type Renderers = 'tileLayer' | 'radar' | 'radarPlus' | 'capAlerts' | 'isolines' | 'particles' | 'accumulations' | 'daySwitcher' | 'noUserControl' | 'topoMap';
|
|
15
|
+
export interface TileParams extends TilePoint {
|
|
16
|
+
url: string;
|
|
17
|
+
intX: number;
|
|
18
|
+
intY: number;
|
|
19
|
+
trans: number;
|
|
20
|
+
transformR: TransformFunction | null;
|
|
21
|
+
transformG: TransformFunction | null;
|
|
22
|
+
transformB: TransformFunction | null;
|
|
23
|
+
}
|
|
24
|
+
export type AllowedUserControls = keyof BottomSveltePlugins | keyof SveltePlugins | 'none';
|
|
25
|
+
export interface RendererInitParams {
|
|
26
|
+
ident: Renderers;
|
|
27
|
+
dependency?: keyof AllowedRenderPlugins;
|
|
28
|
+
userControl?: AllowedUserControls;
|
|
29
|
+
requiresFullRenderParams?: boolean;
|
|
30
|
+
}
|
|
4
31
|
/**
|
|
5
|
-
* Renderer class
|
|
6
|
-
*
|
|
32
|
+
* Renderer class acts as a proxy between renderController and code, which is responsible for
|
|
33
|
+
* rendering a particular layer
|
|
7
34
|
*/
|
|
8
|
-
export declare class Renderer
|
|
35
|
+
export declare class Renderer {
|
|
9
36
|
isOpen: boolean;
|
|
10
37
|
/**
|
|
11
38
|
* Ident of renderer. Not used in runtime, but essential for debugging.
|
|
@@ -15,7 +42,7 @@ export declare class Renderer<K extends keyof AllowedRenderPlugins | undefined =
|
|
|
15
42
|
/**
|
|
16
43
|
* Dependency plugin that wil be loaded before renderer is launched
|
|
17
44
|
*
|
|
18
|
-
* Dependency plugin can
|
|
45
|
+
* Dependency plugin can optionally export these methods:
|
|
19
46
|
*
|
|
20
47
|
* - onRenderStart
|
|
21
48
|
* - onRenderEnd
|
|
@@ -23,11 +50,11 @@ export declare class Renderer<K extends keyof AllowedRenderPlugins | undefined =
|
|
|
23
50
|
* - redraw
|
|
24
51
|
* - interpolator
|
|
25
52
|
*/
|
|
26
|
-
dependency?:
|
|
53
|
+
dependency?: keyof AllowedRenderPlugins;
|
|
27
54
|
/**
|
|
28
55
|
* Loaded version of plugin dependency
|
|
29
56
|
*/
|
|
30
|
-
loadedDependency?:
|
|
57
|
+
loadedDependency?: DependencyModuleMap[keyof DependencyModuleMap];
|
|
31
58
|
/**
|
|
32
59
|
* ID of plugin, that serve as user control, which can be attached to DOM
|
|
33
60
|
* usually to #plugin-bottom div.
|
|
@@ -43,19 +70,17 @@ export declare class Renderer<K extends keyof AllowedRenderPlugins | undefined =
|
|
|
43
70
|
* userControl opening and closing is handles by rndrCtrl
|
|
44
71
|
*/
|
|
45
72
|
userControl?: AllowedUserControls;
|
|
46
|
-
/**
|
|
47
|
-
* Picker ingerpolation factory
|
|
48
|
-
*/
|
|
73
|
+
/** Picker interpolation factory */
|
|
49
74
|
interpolator?: InterpolatorFactory;
|
|
75
|
+
/** Requires FullRenderParameters */
|
|
76
|
+
requiresFullRenderParams: boolean;
|
|
50
77
|
constructor(params: RendererInitParams);
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
* Called by rndrCtrl
|
|
54
|
-
* list of required renderers, so we kno who will replace us
|
|
55
|
-
*/
|
|
78
|
+
private static hasProp;
|
|
79
|
+
open(layerIdent: Layers, weatherParams: WeatherParameters, timestamp: Timestamp): Promise<void>;
|
|
56
80
|
close(_rqrdRenderers: Renderers[]): void;
|
|
57
|
-
onopen(params
|
|
81
|
+
onopen(params?: FullRenderParameters): void;
|
|
58
82
|
onclose(): void;
|
|
59
|
-
paramsChanged(
|
|
83
|
+
paramsChanged(layerIdent: Layers, weatherParams: WeatherParameters, timestamp: Timestamp): Promise<void>;
|
|
60
84
|
redraw(): void;
|
|
61
85
|
}
|
|
86
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @class Shader source storage for different WebGL contexts
|
|
3
|
+
* - we aim for using WebGL1 shaders where possible to minimize duplicate code, unless we need some WebGL2-specific features
|
|
4
|
+
* - therefore we use WebGL1 sources also in case of WebGL2 context, but it can be overridden in case it is necessary
|
|
5
|
+
*/
|
|
6
|
+
export declare class ShaderStorage {
|
|
7
|
+
static WGL2: {
|
|
8
|
+
vTileTextureBlit: string;
|
|
9
|
+
vScreenQuad: string;
|
|
10
|
+
fTileTextureBlit: string;
|
|
11
|
+
fTextureDebug: string;
|
|
12
|
+
fTextureBlit: string;
|
|
13
|
+
fTileLayerPreprocess: string;
|
|
14
|
+
fTileLayerPtypePreprocess: string;
|
|
15
|
+
};
|
|
16
|
+
static WGL1: {
|
|
17
|
+
vTileTextureBlit: string;
|
|
18
|
+
vScreenQuad: string;
|
|
19
|
+
fTileTextureBlit: string;
|
|
20
|
+
fTextureDebug: string;
|
|
21
|
+
fTextureBlit: string;
|
|
22
|
+
fTileLayerPreprocess: string;
|
|
23
|
+
fTileLayerPtypePreprocess: string;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SveltePlugin } from '@windy/SveltePlugin';
|
|
2
|
+
import type { SveltePluginInitParams } from '@windy/SveltePlugin';
|
|
3
|
+
import type { StartupElementPlugins } from '@windy/plugins.d';
|
|
4
|
+
export type StartupElementPluginInitParams<P extends keyof StartupElementPlugins> = Omit<SveltePluginInitParams<P>, 'ident'> & Pick<StartupElementPlugin<P>, 'ident'>;
|
|
5
|
+
export declare class StartupElementPlugin<P extends keyof StartupElementPlugins> extends SveltePlugin<P> {
|
|
6
|
+
ident: P;
|
|
7
|
+
constructor(params: StartupElementPluginInitParams<P>);
|
|
8
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { WindowPlugin } from '@windy/WindowPlugin';
|
|
2
2
|
import type { WindowPluginInitParams } from '@windy/WindowPlugin';
|
|
3
3
|
import type { PluginsOpenParams, PluginsQsParams } from '@windy/plugin-params.d';
|
|
4
|
-
import type { BottomSveltePlugins, SveltePanePlugins, SveltePlugins } from '@windy/plugins.d';
|
|
4
|
+
import type { BottomSveltePlugins, StartupElementPlugins, SveltePanePlugins, SveltePlugins } from '@windy/plugins.d';
|
|
5
5
|
import type { InterpolatorFactory } from '@windy/interpolator';
|
|
6
|
-
import type { FullRenderParameters } from '@windy/
|
|
7
|
-
export declare class SvelteApp<P extends keyof SveltePlugins | keyof SveltePanePlugins | keyof BottomSveltePlugins> {
|
|
6
|
+
import type { FullRenderParameters } from '@windy/interfaces';
|
|
7
|
+
export declare class SvelteApp<P extends keyof SveltePlugins | keyof SveltePanePlugins | keyof BottomSveltePlugins | keyof StartupElementPlugins> {
|
|
8
8
|
interpolator?: InterpolatorFactory;
|
|
9
9
|
constructor(_args: {
|
|
10
10
|
target: HTMLElement;
|
|
@@ -30,8 +30,8 @@ export declare class ExternalSvelteApp {
|
|
|
30
30
|
$destroy(): void;
|
|
31
31
|
}
|
|
32
32
|
/** Allowed params to SveltePlugin constructor (private and protected props are omited by default) */
|
|
33
|
-
export type SveltePluginInitParams<P extends keyof SveltePlugins | keyof SveltePanePlugins | keyof BottomSveltePlugins> = Omit<WindowPluginInitParams<P>, 'ident'> & Pick<SveltePlugin<P>, 'ident'> & Partial<SveltePlugin<P>>;
|
|
34
|
-
export declare class SveltePlugin<P extends keyof SveltePlugins | keyof SveltePanePlugins | keyof BottomSveltePlugins> extends WindowPlugin<P> {
|
|
33
|
+
export type SveltePluginInitParams<P extends keyof SveltePlugins | keyof SveltePanePlugins | keyof BottomSveltePlugins | keyof StartupElementPlugins> = Omit<WindowPluginInitParams<P>, 'ident'> & Pick<SveltePlugin<P>, 'ident'> & Partial<SveltePlugin<P>>;
|
|
34
|
+
export declare class SveltePlugin<P extends keyof SveltePlugins | keyof SveltePanePlugins | keyof BottomSveltePlugins | keyof StartupElementPlugins> extends WindowPlugin<P> {
|
|
35
35
|
/**
|
|
36
36
|
* Holder of SvelteApp
|
|
37
37
|
*/
|