@windycom/plugin-devtools 1.0.4 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/README.md +3 -1
  2. package/index.mjs +3 -2
  3. package/package.json +5 -2
  4. package/types/client/Calendar.d.ts +4 -4
  5. package/types/client/Color.d.ts +3 -3
  6. package/types/client/DataTiler.d.ts +2 -2
  7. package/types/client/GlObj.d.ts +1 -1
  8. package/types/client/Layer.d.ts +11 -11
  9. package/types/client/Metric.d.ts +5 -5
  10. package/types/client/Product.d.ts +6 -6
  11. package/types/client/Renderer.d.ts +4 -4
  12. package/types/client/Webcams.d.ts +4 -4
  13. package/types/client/d.ts.files/Calendar.d.ts +87 -0
  14. package/types/client/d.ts.files/CanvasLayer.d.ts +70 -0
  15. package/types/client/d.ts.files/Color.d.ts +82 -0
  16. package/types/client/d.ts.files/DataTiler.d.ts +45 -0
  17. package/types/client/d.ts.files/GlObj.d.ts +92 -0
  18. package/types/client/d.ts.files/LabelsLayer.d.ts +51 -0
  19. package/types/client/d.ts.files/LandMask.d.ts +17 -0
  20. package/types/client/d.ts.files/Layer.d.ts +184 -0
  21. package/types/client/d.ts.files/Metric.d.ts +192 -0
  22. package/types/client/d.ts.files/PoisOverlay.d.ts +27 -0
  23. package/types/client/d.ts.files/Product.d.ts +37 -0
  24. package/types/client/d.ts.files/Renderer.d.ts +23 -0
  25. package/types/client/d.ts.files/TileLayerCanvas.d.ts +78 -0
  26. package/types/client/d.ts.files/TileLayerMultiPatch.d.ts +13 -0
  27. package/types/client/d.ts.files/Webcams.d.ts +160 -0
  28. package/types/client/d.ts.files/broadcast.d.ts +177 -0
  29. package/types/client/d.ts.files/dataSpecifications.d.ts +943 -0
  30. package/types/client/d.ts.files/errorLogger.d.ts +35 -0
  31. package/types/client/d.ts.files/format.d.ts +48 -0
  32. package/types/client/d.ts.files/http.d.ts +87 -0
  33. package/types/client/d.ts.files/incomingMessages.d.ts +88 -0
  34. package/types/client/d.ts.files/lib.d.ts +74 -0
  35. package/types/client/d.ts.files/notifications.d.ts +39 -0
  36. package/types/client/d.ts.files/outgoingMessages.d.ts +75 -0
  37. package/types/client/d.ts.files/plugin-params.d.ts +236 -0
  38. package/types/client/d.ts.files/plugins.d.ts +132 -0
  39. package/types/client/d.ts.files/pois.d.ts +11 -0
  40. package/types/client/d.ts.files/products.d.ts +44 -0
  41. package/types/client/d.ts.files/rootScope.d.ts +43 -0
  42. package/types/client/d.ts.files/satellite.d.ts +50 -0
  43. package/types/client/d.ts.files/singleclick.d.ts +31 -0
  44. package/types/client/d.ts.files/storage.d.ts +120 -0
  45. package/types/client/d.ts.files/store.d.ts +61 -0
  46. package/types/client/d.ts.files/tileInterpolator.d.ts +35 -0
  47. package/types/client/d.ts.files/trans.d.ts +55 -0
  48. package/types/client/d.ts.files/user.d.ts +58 -0
  49. package/types/client/dataSpecifications.d.ts +1 -1
  50. package/types/client/embed2.d.ts +3 -4
  51. package/types/client/errorLogger.d.ts +1 -1
  52. package/types/client/fetch.d.ts +30 -3
  53. package/types/client/format.d.ts +2 -2
  54. package/types/client/http.d.ts +1 -1
  55. package/types/client/notifications.d.ts +2 -2
  56. package/types/client/plugins.d.ts +1 -1
  57. package/types/client/pois.d.ts +1 -1
  58. package/types/client/products.d.ts +1 -1
  59. package/types/client/rootScope.d.ts +4 -4
  60. package/types/client/singleclick.d.ts +2 -2
  61. package/types/client/storage.d.ts +1 -1
  62. package/types/client/store.d.ts +2 -2
  63. package/types/client/tileInterpolator.d.ts +3 -3
  64. package/types/client/trans.d.ts +3 -3
  65. package/types/client/user.d.ts +3 -3
  66. package/types/client/utils.d.ts +1 -1
@@ -3,7 +3,7 @@
3
3
  * Defines global `logError( moduleName, msg, errObj )` for custom err loggin.
4
4
  * Licences go here since this is the first minified file
5
5
  */
6
- import type { ErrorPayload } from '@windy/errorLogger.d';
6
+ import type { ErrorPayload } from './d.ts.files/errorLogger.d';
7
7
  /**
8
8
  * Array of all errors reported to kibana, to show them in debug mode
9
9
  * plugin
@@ -7,12 +7,16 @@ interface LatLonStep extends LatLon {
7
7
  step?: number;
8
8
  interpolate?: boolean;
9
9
  }
10
+ /**
11
+ * @ignore
12
+ */
10
13
  export declare const getReftimeIso: (model: Products) => any;
11
14
  /**
12
15
  * Returns URL for webcam detail by id
13
16
  *
14
17
  * @param id Webcam id
15
18
  * @returns URL for getting the webcam
19
+ * @ignore
16
20
  */
17
21
  export declare const getWebcamDetailUrl: (id: string | number) => string;
18
22
  /**
@@ -20,6 +24,7 @@ export declare const getWebcamDetailUrl: (id: string | number) => string;
20
24
  *
21
25
  * @param latLon Object with `lat` and `lon` properties
22
26
  * @returns URL for getting list of webcams nearby lat and lon
27
+ * @ignore
23
28
  */
24
29
  export declare const getWebcamsListUrl: <T extends LatLon & {
25
30
  limit?: number;
@@ -29,6 +34,7 @@ export declare const getWebcamsListUrl: <T extends LatLon & {
29
34
  *
30
35
  * @param id Webcam id
31
36
  * @returns URL for getting webcam archive
37
+ * @ignore
32
38
  */
33
39
  export declare const getWebcamArchiveUrl: (id: string | number, hourly?: boolean) => string;
34
40
  /**
@@ -37,6 +43,7 @@ export declare const getWebcamArchiveUrl: (id: string | number, hourly?: boolean
37
43
  * @param {string} textQuery search query
38
44
  * @param {LatLon} [latLon] circle center coordinates
39
45
  * @returns {string} URL for searching webcam views
46
+ * @ignore
40
47
  */
41
48
  export declare const getSearchWebcamViewsUrl: (textQuery: string, latLon?: LatLon) => string;
42
49
  /**
@@ -44,18 +51,33 @@ export declare const getSearchWebcamViewsUrl: (textQuery: string, latLon?: LatLo
44
51
  *
45
52
  * @param id Webcam id
46
53
  * @returns URL for ping webcam metrics
54
+ * @ignore
47
55
  */
48
56
  export declare const getWebcamMetricsUrl: (id: string | number) => string;
49
57
  /**
50
- * Returns URL for getting point forecast
58
+ * Gets point forecast data for given location
59
+ *
60
+ * @param model Forecast model
61
+ * @param params LalLon of the location and additional parameters
62
+ * @param source Who is the initiator of this request (name of you plugin)
63
+ * @param qs Additional query string
64
+ * @param options Additional HTTP options
65
+ * @returns Promise with HTTP payload
51
66
  */
52
67
  export declare const getPointForecastData: <T extends LatLonStep>(model: Products, { lat, lon, step, interpolate }: T, source: string, qs?: string, options?: HttpOptions) => Promise<HttpPayload<WeatherDataPayload<DataHash>>>;
53
68
  /**
54
- * Returns URL for getting meteogram forecast
69
+ * Gets enhanced point forecast meteogram data for given location
70
+ * @param model Forecast model
71
+ * @param params LalLon of the location and additional parameters
72
+ * @param source Who is the initiator of this request (name of you plugin)
73
+ * @param qs Additional query string
74
+ * @param options Additional HTTP options
75
+ * @returns Promise with HTTP payload
55
76
  */
56
77
  export declare const getMeteogramForecastData: <T extends LatLonStep>(model: Products, { lat, lon, step }: T, options?: HttpOptions) => Promise<HttpPayload<MeteogramDataPayload>>;
57
78
  /**
58
79
  * Returns URL for getting archive forecast
80
+ * @ignore
59
81
  */
60
82
  export declare const getArchiveForecastData: <T extends LatLon>(model: Products, { lat, lon }: T, source: string, qs?: string, options?: HttpOptions) => Promise<HttpPayload<WeatherDataPayload<DataHash>>>;
61
83
  /**
@@ -65,24 +87,29 @@ export declare const getArchiveForecastData: <T extends LatLon>(model: Products,
65
87
  * @param frag Mercator frag in {z}/{x}/{y} format
66
88
  * @param options HTTP options
67
89
  * @returns URL for getting citytile forecast
90
+ * @ignore
68
91
  */
69
92
  export declare const getCitytileData: (model: Products, frag: string, options?: HttpOptions) => Promise<HttpPayload<CityForecastData> | null>;
70
93
  /**
71
94
  * Returns URL for nearest POI items (stations, airQ, ...)
72
95
  * @param param0
73
- * @returns
96
+ * @returns URL for getting nearest POI items
97
+ * @ignore
74
98
  */
75
99
  export declare const getNearestPoiItemsUrl: (type: Pois | 'stations', { lat, lon }: LatLon) => string;
76
100
  /**
77
101
  * Returns URL for tide forecast
102
+ * @ignore
78
103
  */
79
104
  export declare const getTideForecastUrl: <T extends LatLonStep>({ lat, lon }: T) => string;
80
105
  /**
81
106
  * Returns URL for tide POI
107
+ * @ignore
82
108
  */
83
109
  export declare const getTidePoiUrl: (id: string) => string;
84
110
  /**
85
111
  * Get observations URL
112
+ * @ignore
86
113
  */
87
114
  export declare const getObservationsUrl: (type: ExtendedStationType, id: string, daysFrom: number, daysTo?: number) => string;
88
115
  export {};
@@ -3,8 +3,8 @@
3
3
  *
4
4
  * Various formatting utils based on user language and settings
5
5
  */
6
- import type { DirectionFunction, HowOldOptions, TimeFormatFunction } from '@windy/format.d';
7
- import type { Timestamp } from '@windy/types';
6
+ import type { DirectionFunction, HowOldOptions, TimeFormatFunction } from './d.ts.files/format.d';
7
+ import type { Timestamp } from './d.ts.files/types';
8
8
  /**
9
9
  * Returns function for displaying hours (either 12,24h format) on a basis of locale store of a browser
10
10
  * US, UK, PH, CA, AU, NZ, IN, EG, SA, CO, PK, MY - AM,PM format
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * HTTP fetch lib using Promises, authorization and lru caching
3
3
  */
4
- import type { HttpOptions, HttpPayload } from '@windy/http.d';
4
+ import type { HttpOptions, HttpPayload } from './d.ts.files/http.d';
5
5
  export declare const getURL: (url: string) => string;
6
6
  export declare class HttpError extends Error {
7
7
  status: number;
@@ -1,7 +1,7 @@
1
1
  import { Evented } from '@windy/Evented';
2
2
  import * as http from '@windy/http';
3
- import type { HttpPayload } from '@windy/http.d';
4
- import type { NotificationInfo } from '@windy/notifications.d';
3
+ import type { HttpPayload } from './d.ts.files/http.d';
4
+ import type { NotificationInfo } from './d.ts.files/notifications.d';
5
5
  declare class Notification extends Evented<Notification> {
6
6
  data: Record<string, unknown>;
7
7
  eventSource: null | EventSource;
@@ -1,3 +1,3 @@
1
- import type { Plugins } from '@windy/plugins.d';
1
+ import type { Plugins } from './d.ts.files/plugins.d';
2
2
  declare const plugins: Plugins;
3
3
  export default plugins;
@@ -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 '@windy/pois.d';
5
+ import type { PoisCheckboxes } from './d.ts.files/pois.d';
6
6
  /**
7
7
  * Config for checkboxes of specified poi
8
8
  *
@@ -1,3 +1,3 @@
1
- import type { products as Iproducts } from '@windy/products.d';
1
+ import type { products as Iproducts } from './d.ts.files/products.d';
2
2
  declare const products: Iproducts;
3
3
  export default products;
@@ -1,6 +1,6 @@
1
- import type { Iconfont } from '@windy/iconfont';
2
- import type { Isolines, Pois } from '@windy/rootScope.d';
3
- import type { LoadedTranslations } from '@windy/trans.d';
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: "index" | "mobile" | "lib" | "embed2";
13
+ export declare const target: "mobile" | "index" | "lib" | "embed2";
14
14
  /**
15
15
  * Platform
16
16
  * @ignore
@@ -19,8 +19,8 @@
19
19
  * @module singleclick
20
20
  */
21
21
  import { Evented } from '@windy/Evented';
22
- import type { PluginIdent } from '@windy/Plugin';
23
- import type { SingleclickTypes, ListeningPriority } from '@windy/singleclick.d';
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
  *
@@ -1,3 +1,3 @@
1
- import type { Storage } from '@windy/storage.d';
1
+ import type { Storage } from './d.ts.files/storage.d';
2
2
  declare const _default: Storage;
3
3
  export default _default;
@@ -38,8 +38,8 @@
38
38
  * @module store
39
39
  */
40
40
  import { Evented } from '@windy/Evented';
41
- import type { DataSpecifications, DataSpecificationsObject } from '@windy/dataSpecifications.d';
42
- import type { SetReturnType, StoreOptions, StoreTypes } from '@windy/store.d';
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
@@ -9,10 +9,10 @@
9
9
  * @module tileInterpolator
10
10
  */
11
11
  import { DataTiler } from '@windy/DataTiler';
12
- import type { PixelInterpolationFun, CoordsInterpolationFun } from '@windy/tileInterpolator.d';
12
+ import type { PixelInterpolationFun, CoordsInterpolationFun } from './d.ts.files/tileInterpolator.d';
13
13
  import type { DataTile } from './dataLoader';
14
- import type { ExtendedTileParams } from '@windy/DataTiler.d';
15
- import type { FullRenderParameters } from '@windy/Layer.d';
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;
@@ -1,5 +1,5 @@
1
- import type { SupportedLangFiles, Translations } from '@windy/lang-files.d';
2
- import type { LoadedTranslations, LoadingOptions, TransFileInfo } from '@windy/trans.d';
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?: "id" | "hr" | "th" | "tr" | "en" | "zh-TW" | "zh" | "ja" | "fr" | "ko" | "it" | "ru" | "nl" | "cs" | "pl" | "sv" | "fi" | "ro" | "el" | "hu" | "ca" | "da" | "ar" | "fa" | "hi" | "ta" | "sk" | "uk" | "bg" | "he" | "is" | "lt" | "et" | "vi" | "sl" | "sr" | "sq" | "pt" | "nb" | "es" | "de" | "bn") => Promise<void | Translations>;
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 '@windy/dataSpecifications.d';
16
- import type { HttpPayload } from '@windy/http.d';
17
- import type { AccountLoginResponse, UserInfo } from '@windy/user.d';
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 "id" | "hr" | "th" | "tr" | "en" | "zh-TW" | "zh" | "ja" | "fr" | "ko" | "it" | "ru" | "nl" | "cs" | "pl" | "sv" | "fi" | "ro" | "el" | "hu" | "ca" | "da" | "ar" | "fa" | "hi" | "ta" | "sk" | "uk" | "bg" | "he" | "is" | "lt" | "et" | "vi" | "sl" | "sr" | "sq" | "pt" | "nb" | "es" | "de" | "bn";
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
  *