@windycom/plugin-devtools 1.0.2-beta.2 → 1.0.5
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 +5 -0
- package/index.mjs +3 -2
- package/package.json +1 -1
- package/publishExamples.sh +1 -1
- package/types/client/BindedDropDown.d.ts +14 -0
- package/types/{Calendar.d.ts → client/Calendar.d.ts} +4 -4
- package/types/client/CanvasLayer.d.ts +1 -0
- package/types/{Color.d.ts → client/Color.d.ts} +3 -3
- package/types/{DataTiler.d.ts → client/DataTiler.d.ts} +2 -2
- package/types/client/Detail1hCheckbox.d.ts +4 -0
- package/types/{ExternalSveltePlugin.d.ts → client/ExternalSveltePlugin.d.ts} +2 -1
- package/types/{GlObj.d.ts → client/GlObj.d.ts} +1 -1
- package/types/{Layer.d.ts → client/Layer.d.ts} +11 -11
- package/types/{Metric.d.ts → client/Metric.d.ts} +5 -5
- package/types/{Plugin.d.ts → client/Plugin.d.ts} +4 -2
- package/types/{Product.d.ts → client/Product.d.ts} +8 -8
- package/types/{ProductSwitch.d.ts → client/ProductSwitch.d.ts} +1 -1
- package/types/{Renderer.d.ts → client/Renderer.d.ts} +4 -4
- package/types/{Webcams.d.ts → client/Webcams.d.ts} +4 -4
- package/types/client/components.d.ts +1 -0
- package/types/client/d.ts.files/Calendar.d.ts +87 -0
- package/types/client/d.ts.files/CanvasLayer.d.ts +70 -0
- package/types/client/d.ts.files/Color.d.ts +82 -0
- package/types/client/d.ts.files/DataTiler.d.ts +45 -0
- package/types/client/d.ts.files/GlObj.d.ts +92 -0
- package/types/client/d.ts.files/LabelsLayer.d.ts +51 -0
- package/types/client/d.ts.files/LandMask.d.ts +17 -0
- package/types/client/d.ts.files/Layer.d.ts +184 -0
- package/types/client/d.ts.files/Metric.d.ts +192 -0
- package/types/client/d.ts.files/PoisOverlay.d.ts +27 -0
- package/types/client/d.ts.files/Product.d.ts +37 -0
- package/types/client/d.ts.files/Renderer.d.ts +23 -0
- package/types/client/d.ts.files/TileLayerCanvas.d.ts +78 -0
- package/types/client/d.ts.files/TileLayerMultiPatch.d.ts +13 -0
- package/types/client/d.ts.files/Webcams.d.ts +160 -0
- package/types/client/d.ts.files/broadcast.d.ts +177 -0
- package/types/client/d.ts.files/dataSpecifications.d.ts +943 -0
- package/types/client/d.ts.files/errorLogger.d.ts +35 -0
- package/types/client/d.ts.files/format.d.ts +48 -0
- package/types/client/d.ts.files/http.d.ts +87 -0
- package/types/client/d.ts.files/incomingMessages.d.ts +88 -0
- package/types/client/d.ts.files/lib.d.ts +74 -0
- package/types/client/d.ts.files/notifications.d.ts +39 -0
- package/types/client/d.ts.files/outgoingMessages.d.ts +75 -0
- package/types/client/d.ts.files/plugin-params.d.ts +236 -0
- package/types/client/d.ts.files/plugins.d.ts +132 -0
- package/types/client/d.ts.files/pois.d.ts +11 -0
- package/types/client/d.ts.files/products.d.ts +44 -0
- package/types/client/d.ts.files/rootScope.d.ts +43 -0
- package/types/client/d.ts.files/satellite.d.ts +50 -0
- package/types/client/d.ts.files/singleclick.d.ts +31 -0
- package/types/client/d.ts.files/storage.d.ts +120 -0
- package/types/client/d.ts.files/store.d.ts +61 -0
- package/types/client/d.ts.files/tileInterpolator.d.ts +35 -0
- package/types/client/d.ts.files/trans.d.ts +55 -0
- package/types/client/d.ts.files/user.d.ts +58 -0
- package/types/{dataSpecifications.d.ts → client/dataSpecifications.d.ts} +1 -1
- package/types/client/debugPremiumIssues.d.ts +22 -0
- package/types/client/embed2.d.ts +92 -0
- package/types/client/errorLogger.d.ts +11 -0
- package/types/client/externalPlugins.d.ts +6 -0
- package/types/{fetch.d.ts → client/fetch.d.ts} +30 -3
- package/types/{format.d.ts → client/format.d.ts} +2 -2
- package/types/{geolocation.d.ts → client/geolocation.d.ts} +11 -3
- package/types/client/globals.d.ts +3 -0
- package/types/{http.d.ts → client/http.d.ts} +2 -2
- package/types/client/index.d.ts +1 -0
- package/types/client/keyboard.d.ts +1 -0
- package/types/client/lib.d.ts +112 -0
- package/types/client/libHtml.d.ts +2 -0
- package/types/client/loadersUI.d.ts +1 -0
- package/types/client/mapGlobeCtrl.d.ts +1 -0
- package/types/client/mobile.d.ts +138 -0
- package/types/{models.d.ts → client/models.d.ts} +1 -1
- package/types/client/nativeStorage.d.ts +17 -0
- package/types/{notifications.d.ts → client/notifications.d.ts} +6 -5
- package/types/client/ogTags.d.ts +22 -0
- package/types/client/params.d.ts +2 -0
- package/types/{plugins.d.ts → client/plugins.d.ts} +1 -1
- package/types/client/pluginsCtrl.d.ts +7 -0
- package/types/{pois.d.ts → client/pois.d.ts} +1 -1
- package/types/client/products.d.ts +3 -0
- package/types/client/pushNotifications.d.ts +1 -0
- package/types/{renderers.d.ts → client/renderers.d.ts} +5 -5
- package/types/{reverseName.d.ts → client/reverseName.d.ts} +12 -0
- package/types/{rootScope.d.ts → client/rootScope.d.ts} +4 -4
- package/types/client/serviceWorker.d.ts +1 -0
- package/types/{singleclick.d.ts → client/singleclick.d.ts} +2 -2
- package/types/{storage.d.ts → client/storage.d.ts} +1 -1
- package/types/{store.d.ts → client/store.d.ts} +2 -2
- package/types/client/swDownloader.d.ts +16 -0
- package/types/client/swProxy.d.ts +4 -0
- package/types/client/swUtils.d.ts +16 -0
- package/types/{tileInterpolator.d.ts → client/tileInterpolator.d.ts} +3 -3
- package/types/client/timeAnimation.d.ts +1 -0
- package/types/{trans.d.ts → client/trans.d.ts} +3 -3
- package/types/client/typeGuards.d.ts +2 -0
- package/types/{user.d.ts → client/user.d.ts} +3 -3
- package/types/{utils.d.ts → client/utils.d.ts} +1 -1
- package/types/client/visibility.d.ts +5 -0
- package/types/interfaces.d.ts +54 -10
- package/types/leaflet.d.ts +2 -15
- package/types/glsl-modules.d.ts +0 -26
- package/types/index.d.ts +0 -1
- package/types/node-modules.d.ts +0 -16
- package/types/products.d.ts +0 -3
- package/types/ts-interfaces.d.ts +0 -66
- package/types/ts-types.d.ts +0 -43
- package/types/variables.d.ts +0 -238
- package/types/windy-modules.d.ts +0 -7
- /package/types/{AromeProduct.d.ts → client/AromeProduct.d.ts} +0 -0
- /package/types/{Bar.d.ts → client/Bar.d.ts} +0 -0
- /package/types/{BindedBar.d.ts → client/BindedBar.d.ts} +0 -0
- /package/types/{BindedCheckbox.d.ts → client/BindedCheckbox.d.ts} +0 -0
- /package/types/{BindedSwitch.d.ts → client/BindedSwitch.d.ts} +0 -0
- /package/types/{BottomSlide.d.ts → client/BottomSlide.d.ts} +0 -0
- /package/types/{BottomTagPlugin.d.ts → client/BottomTagPlugin.d.ts} +0 -0
- /package/types/{ClickHandler.d.ts → client/ClickHandler.d.ts} +0 -0
- /package/types/{Drag.d.ts → client/Drag.d.ts} +0 -0
- /package/types/{DraggableDiv.d.ts → client/DraggableDiv.d.ts} +0 -0
- /package/types/{DropDown.d.ts → client/DropDown.d.ts} +0 -0
- /package/types/{EcmwfAnalysisProduct.d.ts → client/EcmwfAnalysisProduct.d.ts} +0 -0
- /package/types/{EcmwfProduct.d.ts → client/EcmwfProduct.d.ts} +0 -0
- /package/types/{Evented.d.ts → client/Evented.d.ts} +0 -0
- /package/types/{GhostBox.d.ts → client/GhostBox.d.ts} +0 -0
- /package/types/{HrrrProducts.d.ts → client/HrrrProducts.d.ts} +0 -0
- /package/types/{IconProducts.d.ts → client/IconProducts.d.ts} +0 -0
- /package/types/{LabelsLayer.d.ts → client/LabelsLayer.d.ts} +0 -0
- /package/types/{LandMask.d.ts → client/LandMask.d.ts} +0 -0
- /package/types/{Legend.d.ts → client/Legend.d.ts} +0 -0
- /package/types/{LongTap.d.ts → client/LongTap.d.ts} +0 -0
- /package/types/{MetricClasses.d.ts → client/MetricClasses.d.ts} +0 -0
- /package/types/{MobileCalendar.d.ts → client/MobileCalendar.d.ts} +0 -0
- /package/types/{NamProducts.d.ts → client/NamProducts.d.ts} +0 -0
- /package/types/{OfflineMessagesClasses.d.ts → client/OfflineMessagesClasses.d.ts} +0 -0
- /package/types/{Overlay.d.ts → client/Overlay.d.ts} +0 -0
- /package/types/{OverlayClasses.d.ts → client/OverlayClasses.d.ts} +0 -0
- /package/types/{Particles.d.ts → client/Particles.d.ts} +0 -0
- /package/types/{SatelliteProduct.d.ts → client/SatelliteProduct.d.ts} +0 -0
- /package/types/{Scrollable.d.ts → client/Scrollable.d.ts} +0 -0
- /package/types/{StaticProduct.d.ts → client/StaticProduct.d.ts} +0 -0
- /package/types/{SveltePanePlugin.d.ts → client/SveltePanePlugin.d.ts} +0 -0
- /package/types/{SveltePlugin.d.ts → client/SveltePlugin.d.ts} +0 -0
- /package/types/{Swipe.d.ts → client/Swipe.d.ts} +0 -0
- /package/types/{Switch.d.ts → client/Switch.d.ts} +0 -0
- /package/types/{TagPlugin.d.ts → client/TagPlugin.d.ts} +0 -0
- /package/types/{TileLayer.d.ts → client/TileLayer.d.ts} +0 -0
- /package/types/{TileLayerCanvas.d.ts → client/TileLayerCanvas.d.ts} +0 -0
- /package/types/{TileLayerMultiPatch.d.ts → client/TileLayerMultiPatch.d.ts} +0 -0
- /package/types/{TimestampBar.d.ts → client/TimestampBar.d.ts} +0 -0
- /package/types/{Window.d.ts → client/Window.d.ts} +0 -0
- /package/types/{WindowPlugin.d.ts → client/WindowPlugin.d.ts} +0 -0
- /package/types/{baseMap.d.ts → client/baseMap.d.ts} +0 -0
- /package/types/{broadcast.d.ts → client/broadcast.d.ts} +0 -0
- /package/types/{cityLabels.d.ts → client/cityLabels.d.ts} +0 -0
- /package/types/{cloudSync.d.ts → client/cloudSync.d.ts} +0 -0
- /package/types/{colors.d.ts → client/colors.d.ts} +0 -0
- /package/types/{connection.d.ts → client/connection.d.ts} +0 -0
- /package/types/{css.d.ts → client/css.d.ts} +0 -0
- /package/types/{dataLoader.d.ts → client/dataLoader.d.ts} +0 -0
- /package/types/{detectDevice.d.ts → client/detectDevice.d.ts} +0 -0
- /package/types/{device.d.ts → client/device.d.ts} +0 -0
- /package/types/{deviceLogging.d.ts → client/deviceLogging.d.ts} +0 -0
- /package/types/{Favs.d.ts → client/favs.d.ts} +0 -0
- /package/types/{ga.d.ts → client/ga.d.ts} +0 -0
- /package/types/{glTileRender.d.ts → client/glTileRender.d.ts} +0 -0
- /package/types/{hp.d.ts → client/hp.d.ts} +0 -0
- /package/types/{interpolator.d.ts → client/interpolator.d.ts} +0 -0
- /package/types/{latestBroadcasts.d.ts → client/latestBroadcasts.d.ts} +0 -0
- /package/types/{layers.d.ts → client/layers.d.ts} +0 -0
- /package/types/{legends.d.ts → client/legends.d.ts} +0 -0
- /package/types/{levelUtils.d.ts → client/levelUtils.d.ts} +0 -0
- /package/types/{libGuard.d.ts → client/libGuard.d.ts} +0 -0
- /package/types/{location.d.ts → client/location.d.ts} +0 -0
- /package/types/{log.d.ts → client/log.d.ts} +0 -0
- /package/types/{lruCache.d.ts → client/lruCache.d.ts} +0 -0
- /package/types/{map.d.ts → client/map.d.ts} +0 -0
- /package/types/{metrics.d.ts → client/metrics.d.ts} +0 -0
- /package/types/{mobileUtils.d.ts → client/mobileUtils.d.ts} +0 -0
- /package/types/{offlineController.d.ts → client/offlineController.d.ts} +0 -0
- /package/types/{overlays.d.ts → client/overlays.d.ts} +0 -0
- /package/types/{particleRenderers.d.ts → client/particleRenderers.d.ts} +0 -0
- /package/types/{permanentPromos.d.ts → client/permanentPromos.d.ts} +0 -0
- /package/types/{picker.d.ts → client/picker.d.ts} +0 -0
- /package/types/{promo.d.ts → client/promo.d.ts} +0 -0
- /package/types/{query.d.ts → client/query.d.ts} +0 -0
- /package/types/{queryString.d.ts → client/queryString.d.ts} +0 -0
- /package/types/{renderCtrl.d.ts → client/renderCtrl.d.ts} +0 -0
- /package/types/{renderTile.d.ts → client/renderTile.d.ts} +0 -0
- /package/types/{renderUtils.d.ts → client/renderUtils.d.ts} +0 -0
- /package/types/{rhMessage.d.ts → client/rhMessage.d.ts} +0 -0
- /package/types/{router.d.ts → client/router.d.ts} +0 -0
- /package/types/{seoParser.d.ts → client/seoParser.d.ts} +0 -0
- /package/types/{share.d.ts → client/share.d.ts} +0 -0
- /package/types/{showableErrorsService.d.ts → client/showableErrorsService.d.ts} +0 -0
- /package/types/{subscription.d.ts → client/subscription.d.ts} +0 -0
- /package/types/{tileLayerInstance.d.ts → client/tileLayerInstance.d.ts} +0 -0
- /package/types/{timestampUtils.d.ts → client/timestampUtils.d.ts} +0 -0
- /package/types/{userFavs.d.ts → client/userFavs.d.ts} +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module ogTags Tools to change og:tags & twitter:tags in header
|
|
3
|
+
*/
|
|
4
|
+
type AllowedTags = 'title' | 'type' | 'url' | 'description' | 'published' | 'image' | 'imageWidth' | 'imageHeight';
|
|
5
|
+
type OGTags = {
|
|
6
|
+
[K in AllowedTags]?: string | number;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Set og:tags values content. Empty string is used if no value is presented for passed key
|
|
10
|
+
*
|
|
11
|
+
* @param params Tags to set
|
|
12
|
+
*/
|
|
13
|
+
export declare const save: () => void;
|
|
14
|
+
/**
|
|
15
|
+
* Saves current OG tags values in HEAD to be restored later
|
|
16
|
+
*/
|
|
17
|
+
export declare const set: (params: OGTags) => void;
|
|
18
|
+
/**
|
|
19
|
+
* Restore OG tags to previous values
|
|
20
|
+
*/
|
|
21
|
+
export declare const restore: () => void;
|
|
22
|
+
export {};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @module pois
|
|
3
3
|
* Single purpose of this module is to load `poi-libs` plugin whenever user selects non-empty poi or has/adds alert/favourite
|
|
4
4
|
*/
|
|
5
|
-
import type { PoisCheckboxes } from '
|
|
5
|
+
import type { PoisCheckboxes } from './d.ts.files/pois.d';
|
|
6
6
|
/**
|
|
7
7
|
* Config for checkboxes of specified poi
|
|
8
8
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function registerDevice(): Promise<string | unknown>;
|
|
@@ -8,11 +8,11 @@ declare const renderers: {
|
|
|
8
8
|
*/
|
|
9
9
|
tileLayer: TileLayer;
|
|
10
10
|
noUserControl: TileLayer;
|
|
11
|
-
radar: Renderer<"radar", typeof import("
|
|
12
|
-
satellite: Renderer<"satellite", typeof import("
|
|
13
|
-
capAlerts: Renderer<"cap-alerts", typeof import("
|
|
14
|
-
isolines: Renderer<"isolines", typeof import("
|
|
15
|
-
particles: Renderer<"gl-particles", typeof import("
|
|
11
|
+
radar: Renderer<"radar", typeof import("../../plugins/_radar/radar")>;
|
|
12
|
+
satellite: Renderer<"satellite", typeof import("../../plugins/satellite/satellite")>;
|
|
13
|
+
capAlerts: Renderer<"cap-alerts", typeof import("../../plugins/cap-alerts/cap-alerts")>;
|
|
14
|
+
isolines: Renderer<"isolines", typeof import("../../plugins/isolines/isolines")>;
|
|
15
|
+
particles: Renderer<"gl-particles", typeof import("../../plugins/gl-particles/gl-particles")> | Renderer<"particles", typeof import("../../plugins/particles/particles")>;
|
|
16
16
|
/** Extreme forecast and intersucho layers */
|
|
17
17
|
daySwitcher: TileLayer;
|
|
18
18
|
accumulations: TileLayer;
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import type { ReverseResult } from '@windy/dataSpecifications.d';
|
|
2
2
|
import type { LatLon } from '@windy/interfaces.d';
|
|
3
|
+
export interface ReverseHttpPayload<IncludeIds extends boolean = false> {
|
|
4
|
+
city?: string;
|
|
5
|
+
country?: string;
|
|
6
|
+
country_code?: string;
|
|
7
|
+
county?: string;
|
|
8
|
+
district?: string;
|
|
9
|
+
locality?: string;
|
|
10
|
+
state?: string;
|
|
11
|
+
suburb?: string;
|
|
12
|
+
island?: string;
|
|
13
|
+
ids: IncludeIds extends true ? ReverseHttpPayload : never;
|
|
14
|
+
}
|
|
3
15
|
/**
|
|
4
16
|
* Returns reverse data for given lat,lon
|
|
5
17
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Iconfont } from '
|
|
2
|
-
import type { Isolines, Pois } from '
|
|
3
|
-
import type { LoadedTranslations } from '
|
|
1
|
+
import type { Iconfont } from './d.ts.files/iconfont';
|
|
2
|
+
import type { Isolines, Pois } from './d.ts.files/rootScope.d';
|
|
3
|
+
import type { LoadedTranslations } from './d.ts.files/trans.d';
|
|
4
4
|
/**
|
|
5
5
|
* Version of Windy.com client (as taken from package.json)
|
|
6
6
|
* @ignore
|
|
@@ -10,7 +10,7 @@ export declare const version: string;
|
|
|
10
10
|
* Target
|
|
11
11
|
* @ignore
|
|
12
12
|
*/
|
|
13
|
-
export declare const target: "
|
|
13
|
+
export declare const target: "mobile" | "index" | "lib" | "embed2";
|
|
14
14
|
/**
|
|
15
15
|
* Platform
|
|
16
16
|
* @ignore
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
* @module singleclick
|
|
20
20
|
*/
|
|
21
21
|
import { Evented } from '@windy/Evented';
|
|
22
|
-
import type { PluginIdent } from '
|
|
23
|
-
import type { SingleclickTypes, ListeningPriority } from '
|
|
22
|
+
import type { PluginIdent } from './d.ts.files/Plugin';
|
|
23
|
+
import type { SingleclickTypes, ListeningPriority } from './d.ts.files/singleclick.d';
|
|
24
24
|
/**
|
|
25
25
|
* Main singleclick event emitter (instance of class {@link Evented.Evented | Evented }.)
|
|
26
26
|
*
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
* @module store
|
|
39
39
|
*/
|
|
40
40
|
import { Evented } from '@windy/Evented';
|
|
41
|
-
import type { DataSpecifications, DataSpecificationsObject } from '
|
|
42
|
-
import type { SetReturnType, StoreOptions, StoreTypes } from '
|
|
41
|
+
import type { DataSpecifications, DataSpecificationsObject } from './d.ts.files/dataSpecifications.d';
|
|
42
|
+
import type { SetReturnType, StoreOptions, StoreTypes } from './d.ts.files/store.d';
|
|
43
43
|
declare class Store extends Evented<StoreTypes> {
|
|
44
44
|
/**
|
|
45
45
|
* Set default value for given key
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DownloadPayload, DownloadedInfo } from '../../plugins/offline/offline';
|
|
2
|
+
export declare const cacheUrl: (cache: Cache, url: string, testIfUrlIsInCache?: boolean, tryTwice2DownloadFiles?: boolean) => Promise<boolean>;
|
|
3
|
+
export declare const cancelOngoingDownloads: () => boolean;
|
|
4
|
+
/**
|
|
5
|
+
* Download all files in parallel
|
|
6
|
+
* @param cache instance of Cache
|
|
7
|
+
* @param urls list of rqrd URLs
|
|
8
|
+
* @param checkIfUrlIsInCache Should we check if URKL is in cache before attempting to doqnload it?
|
|
9
|
+
* @param calledOnDownlodedOneFile callback that is called each time one file is downloaded
|
|
10
|
+
* @returns all Erorred urls or null if task was cenceled
|
|
11
|
+
*/
|
|
12
|
+
export declare const downloadFilesInParallel: (cache: Cache, urls: string[], checkIfUrlIsInCache: boolean, tryTwice2DownloadFiles: boolean, calledOnDownlodedOneFile: () => void) => Promise<{
|
|
13
|
+
result: 'downloadingCanceled' | 'ok';
|
|
14
|
+
errors?: string[];
|
|
15
|
+
}>;
|
|
16
|
+
export declare function download({ numberOfFiles, batches, mapBoundaries, overlays, products, daysToLoad, lastTimestamp, assets, mainEntryPoint, }: DownloadPayload): Promise<DownloadedInfo | void>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
export declare const putInCache: (request: Request, response: Response) => Promise<void>;
|
|
3
|
+
export declare const getFallbackResponse: () => Promise<Response>;
|
|
4
|
+
export declare const cacheFirst: (request: Request, isConnectedToInternet: boolean) => Promise<Response>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Timestamp } from '@windy/types.d';
|
|
2
|
+
import type { DownloadProgress, ServiceWorkerMessage } from '@plugins/offline/offline';
|
|
3
|
+
/**
|
|
4
|
+
* The reson why we are using this function to wrap postMessage is that
|
|
5
|
+
* we can use TS to check typings of the message
|
|
6
|
+
*/
|
|
7
|
+
export declare const sendMessageToClient: (message: ServiceWorkerMessage['data'] | DownloadProgress) => Promise<void>;
|
|
8
|
+
export declare const storeData: <T extends Object>(key: string, data: T) => Promise<void>;
|
|
9
|
+
export declare const getData: <T extends Object>(key: string) => Promise<void | T>;
|
|
10
|
+
export declare const deleteData: (key: string) => Promise<void>;
|
|
11
|
+
/**
|
|
12
|
+
* Soteres mainEntryPoint as /index.html so it will be always available on this URL
|
|
13
|
+
* This is basically symlink in serviceWorker cache
|
|
14
|
+
*/
|
|
15
|
+
export declare const storeMainEntryPoint: (mainEntryPoint: string) => Promise<void>;
|
|
16
|
+
export declare const isReadyForOfflineMode: () => Promise<void | Timestamp>;
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
* @module tileInterpolator
|
|
10
10
|
*/
|
|
11
11
|
import { DataTiler } from '@windy/DataTiler';
|
|
12
|
-
import type { PixelInterpolationFun, CoordsInterpolationFun } from '
|
|
12
|
+
import type { PixelInterpolationFun, CoordsInterpolationFun } from './d.ts.files/tileInterpolator.d';
|
|
13
13
|
import type { DataTile } from './dataLoader';
|
|
14
|
-
import type { ExtendedTileParams } from '
|
|
15
|
-
import type { FullRenderParameters } from '
|
|
14
|
+
import type { ExtendedTileParams } from './d.ts.files/DataTiler.d';
|
|
15
|
+
import type { FullRenderParameters } from './d.ts.files/Layer.d';
|
|
16
16
|
export declare class TileInterpolator extends DataTiler {
|
|
17
17
|
cb<T extends true | false>(f1: CoordsInterpolationFun, // async interpolator does not use fakeFun with null return type
|
|
18
18
|
f2: PixelInterpolationFun | (() => null), isAsync?: T & (true | false)): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { SupportedLangFiles, Translations } from '
|
|
2
|
-
import type { LoadedTranslations, LoadingOptions, TransFileInfo } from '
|
|
1
|
+
import type { SupportedLangFiles, Translations } from './d.ts.files/lang-files.d';
|
|
2
|
+
import type { LoadedTranslations, LoadingOptions, TransFileInfo } from './d.ts.files/trans.d';
|
|
3
3
|
export declare const files: Record<keyof SupportedLangFiles, TransFileInfo>;
|
|
4
4
|
/**
|
|
5
5
|
* key-value pairs with all loaded lang strings
|
|
@@ -34,7 +34,7 @@ declare const getFile: (filename: string, options?: LoadingOptions) => Promise<T
|
|
|
34
34
|
* @param lang Optionally forced language, client lang is used by default
|
|
35
35
|
* @returns Translations in key-pair object. Missing translations are presented in default english lang.
|
|
36
36
|
*/
|
|
37
|
-
declare const loadLangFile: (id: keyof SupportedLangFiles, lang?: "
|
|
37
|
+
declare const loadLangFile: (id: keyof SupportedLangFiles, lang?: "en" | "zh-TW" | "zh" | "ja" | "fr" | "ko" | "it" | "ru" | "nl" | "cs" | "tr" | "pl" | "sv" | "fi" | "ro" | "el" | "hu" | "hr" | "ca" | "da" | "ar" | "fa" | "hi" | "ta" | "sk" | "uk" | "bg" | "he" | "is" | "lt" | "et" | "vi" | "sl" | "sr" | "id" | "th" | "sq" | "pt" | "nb" | "es" | "de" | "bn") => Promise<void | Translations>;
|
|
38
38
|
/**
|
|
39
39
|
* Replace all `[data-*]` translation tags with proper translation in HTML element. It overrides its innerHTML
|
|
40
40
|
* Supported data suffixes: 'title', 'placeholder', 't', 'afterbegin', 'beforeend', 'tooltipsrc'
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
/**
|
|
13
13
|
* We use ./filename to motivate rollup treeshaking
|
|
14
14
|
*/
|
|
15
|
-
import type { User } from '
|
|
16
|
-
import type { HttpPayload } from '
|
|
17
|
-
import type { AccountLoginResponse, UserInfo } from '
|
|
15
|
+
import type { User } from './d.ts.files/dataSpecifications.d';
|
|
16
|
+
import type { HttpPayload } from './d.ts.files/http.d';
|
|
17
|
+
import type { AccountLoginResponse, UserInfo } from './d.ts.files/user.d';
|
|
18
18
|
export declare const isLoggedIn: () => boolean;
|
|
19
19
|
export declare const isPublisher: () => boolean;
|
|
20
20
|
export declare const getInfo: () => User | null;
|
|
@@ -271,7 +271,7 @@ export declare const getAdjustedNow: (syncTime?: number) => number;
|
|
|
271
271
|
* @param lang Language code
|
|
272
272
|
* @returns True if language is supported, false otherwise
|
|
273
273
|
*/
|
|
274
|
-
export declare const isValidLang: (lang: string) => lang is "
|
|
274
|
+
export declare const isValidLang: (lang: string) => lang is "en" | "zh-TW" | "zh" | "ja" | "fr" | "ko" | "it" | "ru" | "nl" | "cs" | "tr" | "pl" | "sv" | "fi" | "ro" | "el" | "hu" | "hr" | "ca" | "da" | "ar" | "fa" | "hi" | "ta" | "sk" | "uk" | "bg" | "he" | "is" | "lt" | "et" | "vi" | "sl" | "sr" | "id" | "th" | "sq" | "pt" | "nb" | "es" | "de" | "bn";
|
|
275
275
|
/**
|
|
276
276
|
* Safely joins server name (without trailing / ) and path
|
|
277
277
|
*
|
package/types/interfaces.d.ts
CHANGED
|
@@ -51,22 +51,24 @@ export interface ExportedObj {
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
54
|
+
* # LatLon
|
|
55
55
|
*
|
|
56
|
-
*
|
|
57
|
-
* client as string. It is probablly result of URL parmaeters parsing
|
|
58
|
-
* or result of @method normalizeLatLon in @module utils.
|
|
56
|
+
* Major LatLon Windy's interface.
|
|
59
57
|
*
|
|
60
|
-
*
|
|
58
|
+
* Although Leaflet uses `{ lat, lng }` we use `{ lat, lon }`.
|
|
61
59
|
*/
|
|
62
60
|
export interface LatLon {
|
|
63
61
|
/**
|
|
64
|
-
*
|
|
62
|
+
* Latitude.
|
|
63
|
+
*
|
|
64
|
+
* While typed as number, due to some parsing, it can be string in some cases.
|
|
65
65
|
*/
|
|
66
66
|
lat: number;
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
|
-
*
|
|
69
|
+
* Longitude.
|
|
70
|
+
*
|
|
71
|
+
* While typed as number, due to some parsing, it can be string in some cases.
|
|
70
72
|
*/
|
|
71
73
|
lon: number;
|
|
72
74
|
}
|
|
@@ -85,14 +87,36 @@ export interface BcastHistory {
|
|
|
85
87
|
txt: string;
|
|
86
88
|
}
|
|
87
89
|
|
|
90
|
+
/**
|
|
91
|
+
* # GeolocationInfo
|
|
92
|
+
*
|
|
93
|
+
* Represents information about user's location.
|
|
94
|
+
*/
|
|
88
95
|
export interface GeolocationInfo extends LatLon {
|
|
96
|
+
/**
|
|
97
|
+
* Which source was used to get the last location
|
|
98
|
+
*/
|
|
89
99
|
source: 'fallback' | 'gps' | 'ip' | 'meta' | 'api' | 'last';
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Recommended map zoom level based on precision of the location.
|
|
103
|
+
*
|
|
104
|
+
* Higher precision means higher zoom level, we can offer to the user.
|
|
105
|
+
*/
|
|
90
106
|
zoom?: number;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Optional lowercase 2 letter ISO country code
|
|
110
|
+
*/
|
|
91
111
|
cc?: string;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Optional name of the place
|
|
115
|
+
*/
|
|
92
116
|
name?: string;
|
|
93
117
|
|
|
94
118
|
/**
|
|
95
|
-
* Time of last update
|
|
119
|
+
* Time of the last update of location info
|
|
96
120
|
*/
|
|
97
121
|
ts: Timestamp;
|
|
98
122
|
}
|
|
@@ -1567,8 +1591,28 @@ export interface WindyOfflinePlugin {
|
|
|
1567
1591
|
}
|
|
1568
1592
|
|
|
1569
1593
|
/**
|
|
1570
|
-
*
|
|
1571
|
-
*
|
|
1594
|
+
* # Plugin configuration
|
|
1595
|
+
*
|
|
1596
|
+
* Your plugin's main configuration file is named `pluginConfig.ts` and must adhere to `ExternalPluginConfig` interface.
|
|
1597
|
+
*
|
|
1598
|
+
* Properly configured editor, will help you to edit this file, and will provide you with autocompletion and type checking.
|
|
1599
|
+
*
|
|
1600
|
+
* Just remember, that any external plugin, must have a name, that starts with `windy-plugin-` prefix.
|
|
1601
|
+
*
|
|
1602
|
+
* @example
|
|
1603
|
+
* ```typescript
|
|
1604
|
+
* const config: ExternalPluginConfig = {
|
|
1605
|
+
* name: 'windy-plugin-airspace-example',
|
|
1606
|
+
* version: '1.0.0',
|
|
1607
|
+
* title: 'Airspaces example',
|
|
1608
|
+
* icon: '🚁',
|
|
1609
|
+
* description: 'This plugin demonstrates capabilities...',
|
|
1610
|
+
* author: 'IL (Windy.com)',
|
|
1611
|
+
* repository: 'https://github.com/windycom/windy-plugins',
|
|
1612
|
+
* desktopUI: 'embedded',
|
|
1613
|
+
* mobileUI: 'small',
|
|
1614
|
+
*};
|
|
1615
|
+
*```
|
|
1572
1616
|
*/
|
|
1573
1617
|
export interface ExternalPluginConfig {
|
|
1574
1618
|
/**
|
package/types/leaflet.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
|
|
3
|
-
// IT IS COPY-PASTED AND MODIFIED @types/
|
|
3
|
+
// IT IS COPY-PASTED AND MODIFIED @types/leaflet 1.4.7
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
|
-
We use a lot of Leaflet plugins and leaflet private properties. So we need to extend
|
|
6
|
+
We use a lot of Leaflet plugins and leaflet private properties. So we need to extend existing Leaflet,
|
|
7
7
|
but leaflet in its typings exports self as a namespace. And it is impossible to change TS namespace declaration.
|
|
8
8
|
|
|
9
9
|
That is why we modified typings and enhance them with our properties (private variables & plugins)
|
|
@@ -564,8 +564,6 @@ declare namespace L {
|
|
|
564
564
|
_fixTileDef(tileDef: TileDef): TileDef;
|
|
565
565
|
}
|
|
566
566
|
|
|
567
|
-
export class CanvasLayer extends (await import('@windy/CanvasLayer.d')).CanvasLayer {}
|
|
568
|
-
|
|
569
567
|
export interface TileLayerOptions extends GridLayerOptions {
|
|
570
568
|
minZoom?: number;
|
|
571
569
|
maxZoom?: number;
|
|
@@ -1879,17 +1877,6 @@ declare namespace L {
|
|
|
1879
1877
|
|
|
1880
1878
|
export function setOptions(thisArgument: any, opts: any): unknown;
|
|
1881
1879
|
|
|
1882
|
-
export class GPX extends (await import('@plugins/_shared/upload/leaflet-gpx.d')).GPX {}
|
|
1883
|
-
|
|
1884
|
-
export class KML extends (await import('@plugins/_shared/upload/leaflet-kml.d')).KML {}
|
|
1885
|
-
|
|
1886
|
-
export class KMLIcon extends (await import('@plugins/_shared/upload/leaflet-kml.d')).KMLIcon {}
|
|
1887
|
-
|
|
1888
|
-
export class KMLMarker extends (await import('@plugins/_shared/upload/leaflet-kml.d'))
|
|
1889
|
-
.KMLMarker {}
|
|
1890
|
-
export class RotatedImageOverlay extends (await import('@plugins/_shared/upload/leaflet-kml.d'))
|
|
1891
|
-
.RotatedImageOverlay {}
|
|
1892
|
-
|
|
1893
1880
|
export class MultiPolygon extends Polygon {}
|
|
1894
1881
|
|
|
1895
1882
|
export type DistanceProp = {
|
package/types/glsl-modules.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// Definitions for importing GLSL files
|
|
2
|
-
|
|
3
|
-
declare module '*.vert' {
|
|
4
|
-
const value: string;
|
|
5
|
-
export default value;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
declare module '*.vs' {
|
|
9
|
-
const value: string;
|
|
10
|
-
export default value;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
declare module '*.frag' {
|
|
14
|
-
const value: string;
|
|
15
|
-
export default value;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
declare module '*.fs' {
|
|
19
|
-
const value: string;
|
|
20
|
-
export default value;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
declare module '*.glsl' {
|
|
24
|
-
const value: string;
|
|
25
|
-
export default value;
|
|
26
|
-
}
|
package/types/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
// empty, the file exists only to satisfy tsc as it is a subfolder of typeRoot folder
|
package/types/node-modules.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// DEV tools without typings --> for purpose of make.ts
|
|
2
|
-
|
|
3
|
-
declare module 'preprocess';
|
|
4
|
-
declare module 'tiny-lr';
|
|
5
|
-
declare module 'less-plugin-autoprefixer';
|
|
6
|
-
|
|
7
|
-
// just shut up svelte-preprocess with its missing dependency
|
|
8
|
-
declare module 'sass' {
|
|
9
|
-
type LegacyStringOptions<T> = unknown & T;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
// Nothing should be imported from svelte/internal as it can break in ANY Svelte update
|
|
13
|
-
// TODO Remove all imports of this module before updating to Svelte 5
|
|
14
|
-
declare module 'svelte/internal' {
|
|
15
|
-
function get_current_component(): import('svelte').SvelteComponent;
|
|
16
|
-
}
|
package/types/products.d.ts
DELETED
package/types/ts-interfaces.d.ts
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
declare interface HTMLCanvasElement extends HTMLElement {
|
|
2
|
-
getContext(
|
|
3
|
-
contextId: 'experimental-webgl',
|
|
4
|
-
options?: WebGLContextAttributes,
|
|
5
|
-
): WebGLRenderingContext | null;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
// We use <const> typed arrays (rootScope), but we want to allow `includes` check for all similar types.
|
|
9
|
-
// eg. for <const>['rain', 'thunder'] we want to allow `includes('abc'), but still disallow `includes(true)`
|
|
10
|
-
// this does the job and retype property if result is true (type guards)
|
|
11
|
-
declare interface ReadonlyArray<T> {
|
|
12
|
-
includes<U>(
|
|
13
|
-
x: U & (T & U extends never ? never : unknown),
|
|
14
|
-
): x is U & (T & U extends never ? never : T);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
// And same for Array
|
|
18
|
-
declare interface Array<T> {
|
|
19
|
-
includes<U>(
|
|
20
|
-
x: U & (T & U extends never ? never : unknown),
|
|
21
|
-
): x is U & (T & U extends never ? never : T);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// Make Object.keys generic and do not return the stupid string[] everytime!
|
|
25
|
-
/* eslint-disable */
|
|
26
|
-
declare interface ObjectConstructor {
|
|
27
|
-
keys<T extends object>(o: T): (keyof T)[];
|
|
28
|
-
}
|
|
29
|
-
/* eslint-enable */
|
|
30
|
-
|
|
31
|
-
declare interface Element {
|
|
32
|
-
webkitRequestFullscreen(options?: FullscreenOptions): Promise<void> | undefined;
|
|
33
|
-
mozRequestFullScreen(options?: FullscreenOptions): Promise<void>;
|
|
34
|
-
msRequestFullscreen(options?: FullscreenOptions): Promise<void>;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
declare interface Document {
|
|
38
|
-
webkitExitFullscreen(): Promise<void> | undefined;
|
|
39
|
-
mozCancelFullScreen(): Promise<void>;
|
|
40
|
-
msExitFullscreen(): Promise<void>;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
declare interface DocumentOrShadowRoot {
|
|
44
|
-
readonly webkitFullscreenElement: Element | null;
|
|
45
|
-
readonly mozFullScreenElement: Element | null;
|
|
46
|
-
readonly msFullscreenElement: Element | null;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// parseInt & parseFloat work great even for number
|
|
50
|
-
declare function parseInt(string: string | number, radix?: number): number;
|
|
51
|
-
declare function parseFloat(string: string | number): number;
|
|
52
|
-
|
|
53
|
-
// isNaN works great even for undefined
|
|
54
|
-
declare function isNaN(number?: number): boolean;
|
|
55
|
-
|
|
56
|
-
// TS thinks we have nodejs application for some reason... retype timers to the DOM variant
|
|
57
|
-
/* eslint-disable */
|
|
58
|
-
declare module 'timers' {
|
|
59
|
-
global {
|
|
60
|
-
function clearInterval(handle?: number): void;
|
|
61
|
-
function clearTimeout(handle?: number): void;
|
|
62
|
-
function setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
|
|
63
|
-
function setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
/* eslint-enable */
|
package/types/ts-types.d.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
// When we need to ensure some interface implements type/interface (strict mode, no property can miss or overstay)
|
|
2
|
-
// TS has no support for "interface implements interface" yet, so we need to use this helper
|
|
3
|
-
declare type Implements<
|
|
4
|
-
T,
|
|
5
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6
|
-
R extends T & keyof R extends keyof T ? (keyof T extends keyof R ? any : never) : never,
|
|
7
|
-
> = R;
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Avoid optional parameters from interface/type
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ExcludeOptional<{ a: string; b?: string }> => { a: string }
|
|
14
|
-
*/
|
|
15
|
-
declare type ExcludeOptional<T> = {
|
|
16
|
-
[P in keyof Required<T>]: Pick<T, P> extends Required<Pick<T, P>> ? T[P] : never;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
/** `key: value[] | undefined` to `key: value | undefined` */
|
|
20
|
-
declare type UnwrapArray<T> = T extends (infer U)[] ? U : T;
|
|
21
|
-
|
|
22
|
-
/** Trims undefined from tuple.
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
* [string, undefined] => [string, undefined] | [string]
|
|
26
|
-
* [string, string | undefined] => [string, string | undefined] | [string]
|
|
27
|
-
* [string, string | undefined, string | undefined] => [string, string | undefined, string | undefined] | [string, string | undefined] | [string]
|
|
28
|
-
* [string, string | undefined, string] => [string, string | undefined, string]
|
|
29
|
-
**/
|
|
30
|
-
declare type TrimUndefinedFromRight<T extends unknown[]> = T extends [...infer R, infer H]
|
|
31
|
-
? undefined extends H
|
|
32
|
-
? TrimUndefinedFromRight<R> | [...R, H]
|
|
33
|
-
: [...R, H]
|
|
34
|
-
: T;
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Converts any type to array.
|
|
38
|
-
*
|
|
39
|
-
* @example
|
|
40
|
-
* string => [string];
|
|
41
|
-
* string[] => string[]
|
|
42
|
-
**/
|
|
43
|
-
declare type Arrayify<T> = T extends [...infer R] ? [...R] : [T];
|