@windycom/plugin-devtools 2.0.0 → 3.0.1

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 (143) hide show
  1. package/README.md +4 -0
  2. package/index.mjs +2 -2
  3. package/package.json +2 -3
  4. package/types/client/AccessProducts.d.ts +8 -0
  5. package/types/client/BottomSlide.d.ts +3 -0
  6. package/types/client/BottomSveltePlugins.d.ts +8 -0
  7. package/types/client/Calendar.d.ts +9 -17
  8. package/types/client/Color.d.ts +44 -91
  9. package/types/client/EcmwfProduct.d.ts +0 -22
  10. package/types/client/Evented.d.ts +4 -0
  11. package/types/client/ExternalSveltePlugin.d.ts +8 -2
  12. package/types/client/IDB.d.ts +69 -0
  13. package/types/client/IconProducts.d.ts +2 -0
  14. package/types/client/Layer.d.ts +1 -2
  15. package/types/client/Metric.d.ts +13 -9
  16. package/types/client/MetricClasses.d.ts +4 -3
  17. package/types/client/Overlay.d.ts +31 -16
  18. package/types/client/OverlayClasses.d.ts +11 -7
  19. package/types/client/Plugin.d.ts +6 -2
  20. package/types/client/Product.d.ts +33 -30
  21. package/types/client/RadarPlusProduct.d.ts +19 -0
  22. package/types/client/Renderer.d.ts +2 -10
  23. package/types/client/SatelliteProduct.d.ts +1 -1
  24. package/types/client/SveltePlugin.d.ts +16 -5
  25. package/types/client/TileLayer.d.ts +1 -2
  26. package/types/client/TopoMap.d.ts +10 -0
  27. package/types/client/WindowPlugin.d.ts +9 -4
  28. package/types/client/appsFlyer.d.ts +2 -0
  29. package/types/client/baseMap.d.ts +8 -5
  30. package/types/client/cityLabels.d.ts +10 -2
  31. package/types/client/cloudSync.d.ts +3 -1
  32. package/types/client/colorGradients.d.ts +13 -0
  33. package/types/client/compatibilityCheck.d.ts +1 -0
  34. package/types/client/connection.d.ts +1 -1
  35. package/types/client/customColors.d.ts +1 -0
  36. package/types/client/d.ts.files/Calendar.d.ts +11 -2
  37. package/types/client/d.ts.files/Color.d.ts +17 -5
  38. package/types/client/d.ts.files/LabelsLayer.d.ts +3 -20
  39. package/types/client/d.ts.files/Layer.d.ts +8 -1
  40. package/types/client/d.ts.files/Metric.d.ts +1 -0
  41. package/types/client/d.ts.files/Renderer.d.ts +22 -1
  42. package/types/client/d.ts.files/alerts.d.ts +119 -0
  43. package/types/client/d.ts.files/broadcast.d.ts +51 -18
  44. package/types/client/d.ts.files/dataSpecifications.d.ts +121 -137
  45. package/types/client/d.ts.files/favs.d.ts +68 -0
  46. package/types/client/d.ts.files/incomingMessages.d.ts +0 -4
  47. package/types/client/d.ts.files/lib.d.ts +5 -7
  48. package/types/client/d.ts.files/notifications.d.ts +2 -2
  49. package/types/client/d.ts.files/plugin-params.d.ts +53 -57
  50. package/types/client/d.ts.files/plugins.d.ts +31 -42
  51. package/types/client/d.ts.files/pois.d.ts +1 -1
  52. package/types/client/d.ts.files/products.d.ts +16 -5
  53. package/types/client/d.ts.files/rootScope.d.ts +13 -31
  54. package/types/client/d.ts.files/startup.d.ts +65 -0
  55. package/types/client/d.ts.files/storage.d.ts +12 -35
  56. package/types/client/d.ts.files/user.d.ts +82 -24
  57. package/types/client/detectDevice.d.ts +0 -3
  58. package/types/client/device.d.ts +1 -0
  59. package/types/client/deviceLogging.d.ts +2 -1
  60. package/types/client/embed.d.ts +70 -0
  61. package/types/client/embed2.d.ts +14 -31
  62. package/types/client/errorLogger.d.ts +28 -3
  63. package/types/client/errors.d.ts +6 -0
  64. package/types/client/fetch.d.ts +41 -16
  65. package/types/client/format.d.ts +1 -1
  66. package/types/client/ga.d.ts +1 -1
  67. package/types/client/geolocation.d.ts +15 -7
  68. package/types/client/globals.d.ts +1 -0
  69. package/types/client/http.d.ts +17 -6
  70. package/types/client/idbInstances.d.ts +36 -0
  71. package/types/client/imaker.d.ts +112 -0
  72. package/types/client/imakerMain.d.ts +49 -0
  73. package/types/client/langFiles.d.ts +2 -0
  74. package/types/client/latestBroadcasts.d.ts +1 -1
  75. package/types/client/layers.d.ts +2 -0
  76. package/types/client/lib.d.ts +6 -22
  77. package/types/client/libHtml.d.ts +1 -1
  78. package/types/client/liveAlerts.d.ts +5 -0
  79. package/types/client/liveAlerts.types.d.ts +28 -0
  80. package/types/client/loadArticlesOrWhatsNew.d.ts +1 -0
  81. package/types/client/location.d.ts +5 -0
  82. package/types/client/log.d.ts +4 -1
  83. package/types/client/lruCache.d.ts +6 -0
  84. package/types/client/map.d.ts +17 -6
  85. package/types/client/mobile.d.ts +31 -22
  86. package/types/client/models.d.ts +7 -5
  87. package/types/client/notifications.d.ts +29 -67
  88. package/types/client/overlays.d.ts +4 -1
  89. package/types/client/params.d.ts +0 -1
  90. package/types/client/permanentPromos.d.ts +1 -1
  91. package/types/client/persistentStorage.d.ts +8 -0
  92. package/types/client/picker.d.ts +1 -1
  93. package/types/client/plugins.d.ts +4 -0
  94. package/types/client/pois.d.ts +1 -2
  95. package/types/client/promo.d.ts +6 -16
  96. package/types/client/pushNotifications.d.ts +1 -1
  97. package/types/client/queryString.d.ts +1 -1
  98. package/types/client/renderUtils.d.ts +1 -1
  99. package/types/client/renderers.d.ts +7 -3
  100. package/types/client/rootScope.d.ts +23 -24
  101. package/types/client/router.d.ts +9 -29
  102. package/types/client/seoParser.d.ts +0 -14
  103. package/types/client/serviceWorkerCtrl.d.ts +8 -0
  104. package/types/client/showableErrorsService.d.ts +6 -10
  105. package/types/client/startupWeather.d.ts +13 -9
  106. package/types/client/store.d.ts +2 -2
  107. package/types/client/storeLastPosition.d.ts +4 -0
  108. package/types/client/subscription.d.ts +1 -0
  109. package/types/client/swDownloader.d.ts +7 -7
  110. package/types/client/swProxy.d.ts +1 -1
  111. package/types/client/swUtils.d.ts +3 -3
  112. package/types/client/trans.d.ts +26 -37
  113. package/types/client/user.d.ts +7 -13
  114. package/types/client/userAlerts.d.ts +68 -0
  115. package/types/client/userConsent.d.ts +6 -0
  116. package/types/client/userFavs.d.ts +46 -122
  117. package/types/client/utils.d.ts +67 -9
  118. package/types/iconfont.d.ts +8 -0
  119. package/types/interfaces.d.ts +226 -284
  120. package/types/lang-files.d.ts +1334 -142
  121. package/types/offline.d.ts +100 -0
  122. package/types/types.d.ts +108 -34
  123. package/types/client/Bar.d.ts +0 -114
  124. package/types/client/BindedBar.d.ts +0 -51
  125. package/types/client/BindedCheckbox.d.ts +0 -30
  126. package/types/client/BindedSwitch.d.ts +0 -35
  127. package/types/client/BottomTagPlugin.d.ts +0 -8
  128. package/types/client/DraggableDiv.d.ts +0 -21
  129. package/types/client/GhostBox.d.ts +0 -17
  130. package/types/client/Legend.d.ts +0 -6
  131. package/types/client/LongTap.d.ts +0 -21
  132. package/types/client/MobileCalendar.d.ts +0 -51
  133. package/types/client/OfflineMessagesClasses.d.ts +0 -30
  134. package/types/client/ProductSwitch.d.ts +0 -14
  135. package/types/client/Scrollable.d.ts +0 -14
  136. package/types/client/Switch.d.ts +0 -24
  137. package/types/client/TimestampBar.d.ts +0 -8
  138. package/types/client/d.ts.files/Product.d.ts +0 -37
  139. package/types/client/d.ts.files/errorLogger.d.ts +0 -35
  140. package/types/client/d.ts.files/trans.d.ts +0 -55
  141. package/types/client/favs.d.ts +0 -83
  142. package/types/client/offlineController.d.ts +0 -20
  143. /package/types/client/d.ts.files/{Webcams.d.ts → webcams.d.ts} +0 -0
@@ -1,51 +0,0 @@
1
- import { Scrollable } from '@windy/Scrollable';
2
- import type { Calendar } from '@windy/Calendar';
3
- import type { ScrollableInitParams } from '@windy/Scrollable';
4
- import type { TimeFormatFunction } from '@windy/format.d';
5
- import type { Timestamp } from '@windy/types.d';
6
- export type MobileCalendarInitParams = {
7
- boxEl: HTMLDivElement;
8
- wrapperEl: HTMLDivElement;
9
- scrolling: boolean;
10
- noAnimation: boolean;
11
- tsPx: number;
12
- calExpandedTimeout: ReturnType<typeof setTimeout> | null;
13
- UIident: string;
14
- bindedStore?: 'timestamp';
15
- } & ScrollableInitParams;
16
- export declare class MobileCalendar extends Scrollable {
17
- private scrolling;
18
- private noAnimation;
19
- private wrapperEl;
20
- /**
21
- * timestamp per pixel ratio - must be in sync with CSS
22
- * 3 hour = 20px
23
- */
24
- private tsPx;
25
- /**
26
- * Handle of a timeout that controls the `mobile-calendar-expanded` class
27
- */
28
- private calExpandedTimeout;
29
- /**
30
- * Request to change timestamp was initiated by external element
31
- */
32
- private doNotChangeTimestamp;
33
- private bindedStore;
34
- localeHours: TimeFormatFunction;
35
- zuluMode: boolean;
36
- boxEl: HTMLDivElement;
37
- UIident: string;
38
- timestamp: Timestamp;
39
- calendar: Calendar | null;
40
- constructor(params: MobileCalendarInitParams);
41
- unmount(): void;
42
- onscroll(ev: Event): void;
43
- render(): void;
44
- renderBox(): void;
45
- /**
46
- * Scrolls to selected ts
47
- */
48
- set(ts: Timestamp, UIident?: string): void;
49
- protected onscrollend(): void;
50
- private slideUp;
51
- }
@@ -1,30 +0,0 @@
1
- import { Window } from '@windy/Window';
2
- import type { DownloadProgress } from '@plugins/offline/offline.d';
3
- import type { Timestamp } from '@windy/types';
4
- export declare class OfflineModeTopMessage extends Window {
5
- lastTimeDownloaded: Timestamp;
6
- timer: ReturnType<typeof setInterval> | null;
7
- constructor(lastTimeDownloaded: Timestamp);
8
- onclose(): void;
9
- onopen(): void;
10
- }
11
- export declare class DownloadingProgressTopMessage extends Window {
12
- bindedOnProgress: ({ data }: {
13
- data: DownloadProgress;
14
- }) => void;
15
- progressEl: HTMLDivElement;
16
- progressBarEl: HTMLDivElement;
17
- constructor();
18
- onProgress({ data }: {
19
- data: DownloadProgress;
20
- }): void;
21
- onclose(): void;
22
- onopen(): void;
23
- }
24
- export declare class GoOfflineModeTopMessage extends Window {
25
- expires: Timestamp;
26
- timer: ReturnType<typeof setInterval> | null;
27
- constructor(expires: Timestamp);
28
- onclose(): void;
29
- onopen(): void;
30
- }
@@ -1,14 +0,0 @@
1
- import { BindedSwitch } from '@windy/BindedSwitch';
2
- import type { BindedSwitchInitParams } from '@windy/BindedSwitch';
3
- export type ProductSwitchInitParams = {
4
- showResolution?: boolean;
5
- } & Omit<BindedSwitchInitParams<'product'>, 'bindStore'>;
6
- export declare class ProductSwitch extends BindedSwitch<'product'> {
7
- showResolution: boolean;
8
- constructor(params: ProductSwitchInitParams);
9
- printHTML(prods?: ("icon" | "satellite" | "radar" | "drought" | "capAlerts" | "gfs" | "ecmwf" | "ecmwfAnalysis" | "ecmwfAifs" | "ecmwfWaves" | "gfsWaves" | "iconWaves" | "cams" | "efi" | "cmems" | "fireDanger" | "activeFires" | "nems" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "camsEu" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "mblue")[]): void;
10
- /**
11
- * The menu is already in a DOM since we do not modify products so often
12
- */
13
- protected redraw(): void;
14
- }
@@ -1,14 +0,0 @@
1
- export type ScrollableInitParams = Pick<Scrollable, 'scrollEl'>;
2
- export declare class Scrollable {
3
- scrollTicking: boolean;
4
- protected scrollEndTimer: ReturnType<typeof setTimeout> | null;
5
- scrollEl: HTMLElement;
6
- constructor(params: ScrollableInitParams);
7
- onscroll(_ev: Event): void;
8
- /**
9
- * Forces to scroll table to selected @stop position
10
- */
11
- scrollTo(stop: number): void;
12
- protected onscrollend(): void;
13
- private scrollFired;
14
- }
@@ -1,24 +0,0 @@
1
- import { ClickHandler } from '@windy/ClickHandler';
2
- import type { ClickHandlerInitParams } from '@windy/ClickHandler';
3
- export type SwitchInitParams<T> = ClickHandlerInitParams<T> & {
4
- initValue?: T | null;
5
- onset?(_value: T): void;
6
- };
7
- export declare class Switch<T> extends ClickHandler<T> {
8
- /**
9
- * Init value
10
- */
11
- protected initValue: T | null;
12
- protected selected: T | null;
13
- constructor(params: SwitchInitParams<T>);
14
- set(value: T, noEmit?: boolean): void;
15
- /**
16
- * Returns first element with particular value
17
- */
18
- protected getEl(value: T): HTMLElement | null;
19
- protected click(command: string, value: T, noEmit?: boolean): void;
20
- /**
21
- * Will be called upon click on something
22
- */
23
- protected onset(_value: T): void;
24
- }
@@ -1,8 +0,0 @@
1
- import { BindedBar } from '@windy/BindedBar';
2
- import type { BindedBarInitParams } from '@windy/BindedBar';
3
- export type TimestampBarInitParams = Omit<BindedBarInitParams, 'bindTimestamp' | 'bindCalendar' | 'bindAnimation'>;
4
- export declare class TimestampBar extends BindedBar {
5
- constructor(params: TimestampBarInitParams);
6
- protected createText(el: HTMLElement): string;
7
- protected createGhostText(ghostLeft: number): string;
8
- }
@@ -1,37 +0,0 @@
1
- import { Overlays, Levels } from '@windy/rootScope.d';
2
- import { Bounds } from '@windy/interfaces.d';
3
-
4
- export type ProductKey = `lastMinifest/${string}`; // TODO - directory instead of string
5
-
6
- export interface ProductParam {
7
- color: [number, number[]][];
8
- description_en: string;
9
- name_en: string;
10
- encoding: {
11
- func: string; // TODO: set exact function names
12
- zero: number;
13
- };
14
- level: Levels[];
15
- units: string;
16
- }
17
-
18
- export interface ProductInfoJson {
19
- about: {
20
- name: string;
21
- copyright: string;
22
- description: string;
23
- modelResolution: number;
24
- provider: string;
25
- url: string;
26
- };
27
- bounds: null | Bounds;
28
- interval: number;
29
- maxZoom: number;
30
- param: Record<Overlays, ProductParam>;
31
- version: string;
32
- zoom2zoom: string; // TODO: set exact string
33
- }
34
-
35
- export type DataQuality = 'normal' | 'high' | 'low' | 'ultra' | 'extreme';
36
-
37
- export type FileSuffix = 'png' | 'jpg' | 'webp';
@@ -1,35 +0,0 @@
1
- import type { HttpError } from '@windy/http';
2
-
3
- /** Payload sent to backend */
4
- export interface ErrorPayload {
5
- timestamp: number;
6
- runningMs: number;
7
- type: string;
8
- module: string | null | undefined;
9
- msg: string;
10
- line: number | null | undefined;
11
- col: number | null | undefined;
12
- url: string | undefined;
13
- script: string | null | undefined;
14
- ver: string;
15
- target: string;
16
- stack: string | undefined;
17
- error: string;
18
- isOnline: boolean;
19
- repeated?: number;
20
- scriptLine?: string;
21
- latestBcast?: string;
22
- sessionName?: string;
23
- sessionCounter?: number;
24
- lang?: string;
25
- size?: string;
26
- platform?: string;
27
- errorID?: string;
28
- beta?: boolean;
29
- }
30
-
31
- export interface CustomError {
32
- msg: string;
33
- moduleName: string;
34
- errorObject?: Error | HttpError | Event | ErrorEvent;
35
- }
@@ -1,55 +0,0 @@
1
- import { MainLangFile, PluginTranslations, Translations } from '@windy/lang-files.d';
2
-
3
- import type { Overlays } from '@windy/rootScope.d';
4
-
5
- /**
6
- * test loaded file, if everything was correct
7
- *
8
- * Key 'waves' is used in productsLang.js, since we use IDs of
9
- * overlays
10
- */
11
- export type ValidTranslationKey = keyof Translations | Overlays;
12
-
13
- export interface TransFileInfo {
14
- /**
15
- * Which lang file is loaded to client
16
- */
17
- loaded?: string;
18
-
19
- /**
20
- * Relative URL of file
21
- */
22
- filename: string;
23
-
24
- /**
25
- * test loaded file, if everything was correct
26
- */
27
- test: ValidTranslationKey;
28
- }
29
-
30
- export interface StoredTransFile {
31
- /**
32
- * All translations in a key-value pairs
33
- */
34
- data: Translations;
35
-
36
- /**
37
- * Client version
38
- */
39
- version: string;
40
- }
41
-
42
- export interface LoadingOptions {
43
- /**
44
- * Absolute URL to load lang file from (handy in client patch for example)
45
- */
46
- absoluteURL?: string | boolean;
47
-
48
- /**
49
- * Optional test string, that can overload standard test string
50
- */
51
- test?: ValidTranslationKey;
52
- }
53
-
54
- // TODO - there must be better solution how to reflect keys for files and let plugin keys mandatory for loaded files
55
- export type LoadedTranslations = MainLangFile & PluginTranslations;
@@ -1,83 +0,0 @@
1
- import type { Fav, UpcomingFav } from '@windy/interfaces.d';
2
- export type FavKey = string;
3
- export type FavsInitParams = {
4
- ident: `favs${number}` | `recents${number}`;
5
- };
6
- export declare class Favs<T extends Fav> {
7
- /** Local storage key (under which are data stored) */
8
- protected ident: `favs${number}` | `recents${number}`;
9
- private lastModified?;
10
- /** Major data holder */
11
- data: Record<FavKey, T>;
12
- constructor(params: FavsInitParams);
13
- /**
14
- * Returning key for item key is either ICAO code or lat/lon stripped to 3 decimals or alertID
15
- */
16
- key(item: Partial<Fav> | string): string;
17
- /**
18
- * Add airport or location to local storage
19
- */
20
- prepareAdd(item: UpcomingFav): FavKey;
21
- /**
22
- * Add airport or location to local storage and sync with cloud
23
- * query parameter is only for inherited classes, it is not used in this class
24
- */
25
- add(item: Fav, _query?: string): boolean | Promise<string> | void;
26
- findFavByProperties(item: Partial<Fav> | FavKey): Fav | undefined;
27
- /**
28
- * Deduplicates two collections for example favs, recents, search results
29
- * returns deduplicated and mergedcollection, whereas collection2 has higher proprity
30
- */
31
- dedupeAndConcat(collection1: Fav[], collection2: Fav[]): Fav[];
32
- /**
33
- * Dedupe
34
- */
35
- dedupeFav(item: Partial<Fav> | FavKey, findingFun: (cmp: (i: Fav) => boolean) => Fav | undefined): Fav | undefined;
36
- /**
37
- * Check if this is favorite or not
38
- */
39
- isFav(item: FavKey | Partial<Fav>): boolean;
40
- /**
41
- * Save all in localStorage
42
- */
43
- save(): void;
44
- /**
45
- * Update timestamp in localStorage
46
- */
47
- updateTimestamp(): void;
48
- /**
49
- * Load from localStorage
50
- */
51
- load(): void;
52
- /**
53
- * Called upon add/removal
54
- */
55
- onchange(): void;
56
- /**
57
- * Remove fav item from local storage - key or object
58
- */
59
- prepareRename(fav: Fav, name: string): boolean;
60
- rename(fav: Fav, name: string): void;
61
- /**
62
- * Remove fav item from local storage - key or object
63
- */
64
- prepareRemove(item: Fav | FavKey): void;
65
- /**
66
- * Remove fav item. Second parameter and promise return type is to stay consistent with child types inheriting from this
67
- */
68
- remove(item: Fav | FavKey, _isAlert?: boolean): Promise<void>;
69
- getAll(): Record<string, T>;
70
- /**
71
- * increase counter of item
72
- */
73
- hit(item: Fav): void;
74
- /**
75
- * Filters && sorts items and rtrns a list of keys
76
- */
77
- sortFavs(query: string | undefined | null, sortProperty: 'timestamp' | 'counter', excludeItems?: FavKey[] | null): FavKey[];
78
- /**
79
- * Returns array of up to @num most popular items filtered by @query and sorted by @sortProperty. @exclude is list
80
- * of items containing keys that should be excluded from result
81
- */
82
- get(num: number, query: string | undefined | null, sortProperty: 'timestamp' | 'counter', exclude?: Fav[]): Fav[];
83
- }
@@ -1,20 +0,0 @@
1
- import type { Timestamp } from '@windy/types';
2
- /**
3
- * Min zoom used for offline download
4
- */
5
- export declare const minZoom = 5;
6
- /**
7
- * Max zoom used for offline download
8
- */
9
- export declare const maxZoom = 8;
10
- export declare const installServiceWorker: () => void;
11
- export declare const checkOfflinePlugin: () => void;
12
- export declare const uninstallSericeWorker: () => void;
13
- export declare const isServiceWorkerSupported: () => boolean;
14
- export declare const getServiceWorkerError: () => string | null;
15
- export declare const closeTopMessages: () => void;
16
- export declare const showErrorMessage: (message: string) => void;
17
- export declare const showReadyToGoOfflineMessage: (expires: Timestamp) => void;
18
- export declare const showOfflineModeMessage: (lastTimeDownloaded: Timestamp) => void;
19
- export declare const showDownloadingProgressMessage: () => void;
20
- export declare const isProgressMessageOn: () => boolean;