@windycom/plugin-devtools 1.0.8 → 2.0.0

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 (52) hide show
  1. package/README.md +2 -0
  2. package/package.json +1 -1
  3. package/types/client/Drag.d.ts +8 -1
  4. package/types/client/MobileCalendar.d.ts +4 -0
  5. package/types/client/Overlay.d.ts +1 -1
  6. package/types/client/OverlayClasses.d.ts +1 -1
  7. package/types/client/Plugin.d.ts +4 -4
  8. package/types/client/Product.d.ts +14 -2
  9. package/types/client/ProductSwitch.d.ts +1 -1
  10. package/types/client/SveltePanePlugin.d.ts +4 -3
  11. package/types/client/Window.d.ts +0 -4
  12. package/types/client/WindowPlugin.d.ts +9 -8
  13. package/types/client/d.ts.files/broadcast.d.ts +7 -8
  14. package/types/client/d.ts.files/dataSpecifications.d.ts +24 -21
  15. package/types/client/d.ts.files/plugin-params.d.ts +12 -13
  16. package/types/client/d.ts.files/plugins.d.ts +11 -14
  17. package/types/client/d.ts.files/products.d.ts +5 -0
  18. package/types/client/d.ts.files/satellite.d.ts +1 -0
  19. package/types/client/device.d.ts +0 -1
  20. package/types/client/embed2.d.ts +3 -5
  21. package/types/client/fetch.d.ts +4 -10
  22. package/types/client/ga.d.ts +4 -0
  23. package/types/client/geolocation.d.ts +0 -1
  24. package/types/client/interpolator.d.ts +1 -1
  25. package/types/client/lib.d.ts +0 -4
  26. package/types/client/libHtml.d.ts +1 -1
  27. package/types/client/mobile.d.ts +5 -7
  28. package/types/client/models.d.ts +1 -1
  29. package/types/client/patchAndPromoCtrl.d.ts +13 -0
  30. package/types/client/permanentPromos.d.ts +0 -1
  31. package/types/client/pluginsCtrl.d.ts +12 -3
  32. package/types/client/promo.d.ts +25 -31
  33. package/types/client/renderTile.d.ts +1 -1
  34. package/types/client/renderers.d.ts +1 -1
  35. package/types/client/rootScope.d.ts +22 -14
  36. package/types/client/router.d.ts +1 -1
  37. package/types/client/{hp.d.ts → startupWeather.d.ts} +10 -2
  38. package/types/client/tileInterpolator.d.ts +3 -3
  39. package/types/client/user.d.ts +9 -4
  40. package/types/client/userFavs.d.ts +5 -12
  41. package/types/client/utils.d.ts +20 -6
  42. package/types/iconfont.d.ts +5 -4
  43. package/types/interfaces.d.ts +198 -202
  44. package/types/lang-files.d.ts +58 -18
  45. package/types/types.d.ts +64 -10
  46. package/publishExamples.sh +0 -19
  47. package/types/client/BindedDropDown.d.ts +0 -14
  48. package/types/client/Detail1hCheckbox.d.ts +0 -4
  49. package/types/client/DropDown.d.ts +0 -37
  50. package/types/client/Webcams.d.ts +0 -66
  51. package/types/client/loadersUI.d.ts +0 -1
  52. /package/types/client/d.ts.files/{tileInterpolator.d.ts → interpolatorTypes.d.ts} +0 -0
@@ -59,22 +59,16 @@ export declare const getWebcamMetricsUrl: (id: string | number) => string;
59
59
  *
60
60
  * @param model Forecast model
61
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
62
+ * @param pointForecastOptions Additional options of point forecast API
63
+ * @param httpOptions Additional HTTP options
65
64
  * @returns Promise with HTTP payload
66
65
  */
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>>>;
66
+ export declare const getPointForecastData: <T extends LatLonStep>(model: Products, { lat, lon, step, interpolate }: T, pointForecastOptions?: Record<string, string>, httpOptions?: HttpOptions) => Promise<HttpPayload<WeatherDataPayload<DataHash>>>;
68
67
  /**
69
68
  * 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
69
  * @returns Promise with HTTP payload
76
70
  */
77
- export declare const getMeteogramForecastData: <T extends LatLonStep>(model: Products, { lat, lon, step }: T, options?: HttpOptions) => Promise<HttpPayload<MeteogramDataPayload>>;
71
+ export declare const getMeteogramForecastData: <T extends LatLonStep>(model: Products, { lat, lon, step }: T, pointForecastOptions?: Record<string, string>, options?: HttpOptions) => Promise<HttpPayload<MeteogramDataPayload>>;
78
72
  /**
79
73
  * Returns URL for getting archive forecast
80
74
  * @ignore
@@ -1 +1,5 @@
1
+ export declare const getSedlinaRequestParams: (page: string) => {
2
+ code: number;
3
+ qs: string;
4
+ };
1
5
  export declare const pageview: (page: string) => void;
@@ -1,6 +1,5 @@
1
1
  import '@windy/router';
2
2
  import type { GeolocationInfo, HomeLocation } from '@windy/interfaces.d';
3
- import type { PositionOptions } from '@capacitor/geolocation';
4
3
  /**
5
4
  * Returns either GPS or IP location whichever is newer.
6
5
  *
@@ -1,4 +1,4 @@
1
- import type { CoordsInterpolationFun, PixelInterpolationFun, RGBNumValues, InterpolatorPossibleReturns } from '@windy/tileInterpolator.d';
1
+ import type { CoordsInterpolationFun, PixelInterpolationFun, RGBNumValues, InterpolatorPossibleReturns } from '@windy/interpolatorTypes';
2
2
  export type { CoordsInterpolationFun, PixelInterpolationFun, RGBNumValues, InterpolatorPossibleReturns, };
3
3
  export type InterpolatorFactory = {
4
4
  createFun: (cb: <T>(...args: unknown[]) => T | void) => void;
@@ -57,13 +57,11 @@ export * as pluginsCtrl from '../pluginSystem/pluginsCtrl';
57
57
  export * as Bar from '../uiClasses/Bar';
58
58
  export * as BindedBar from '../uiClasses/BindedBar';
59
59
  export * as BindedCheckbox from '../uiClasses/BindedCheckbox';
60
- export * as BindedDropDown from '../uiClasses/BindedDropDown';
61
60
  export * as BindedSwitch from '../uiClasses/BindedSwitch';
62
61
  export * as BottomSlide from '../uiClasses/BottomSlide';
63
62
  export * as ClickHandler from '../uiClasses/ClickHandler';
64
63
  export * as Drag from '../uiClasses/Drag';
65
64
  export * as DraggableDiv from '../uiClasses/DraggableDiv';
66
- export * as DropDown from '../uiClasses/DropDown';
67
65
  export * as GhostBox from '../uiClasses/GhostBox';
68
66
  export * as LongTap from '../uiClasses/LongTap';
69
67
  export * as MobileCalendar from '../uiClasses/MobileCalendar';
@@ -72,9 +70,7 @@ export * as Scrollable from '../uiClasses/Scrollable';
72
70
  export * as Swipe from '../uiClasses/Swipe';
73
71
  export * as Switch from '../uiClasses/Switch';
74
72
  export * as TimestampBar from '../uiClasses/TimestampBar';
75
- export * as Webcams from '../uiClasses/Webcams';
76
73
  export * as Window from '../uiClasses/Window';
77
- export * as loadersUI from '../ui/loadersUI';
78
74
  export * as rhMessage from '../ui/rhMessage';
79
75
  export * as timeAnimation from '../ui/timeAnimation';
80
76
  export * as visibility from '../ui/visibility';
@@ -1,2 +1,2 @@
1
- declare const _default: "\n\n<div id=\"map-container\"\n style=\"position: absolute; top: 0; bottom: 0; left: 0; right: 0; width: 100%; height: 100%;\"\n class=\"noselect\"></div>\n\n<div id=\"bottom\" class=\"shy right-border\">\n\n\n <!-- progress bar -->\n <div id=\"progress-bar\" class=\"progress-bar\">\n\n <div class=\"progress-line\">\n <div class=\"played\"></div><div class=\"avbl\"></div>\n <i></i>\n </div>\n\n <!-- GHOST -->\n <div class=\"timecode ghost-timecode\">\n <div class=\"box\"></div>\n </div>\n\n <!-- M A I N -->\n <div data-title=\"D_LT2\" class=\"timecode main-timecode\">\n <div class=\"box\"></div><div class=\"loading ld-gray-light size-l loader-path\"></div><!-- dayLoader -->\n </div>\n\n <!-- PLAY BUTTON apply class play/pause-->\n <div id=\"playpause\" class=\"play-pause iconfont clickable\"></div>\n\n <!-- CALENDAR WITH DAYS -->\n <div id=\"calendar\"></div>\n\n </div>\n\n <!-- ACCUMULATIONS -->\n <div id=\"accumulations\" class=\"size-s fg-yellow\">\n\n <span id=\"acc-title-rain\" data-t=\"RAINACCU\" class=\"capitalize\"></span>\n <span id=\"acc-title-snow\" data-t=\"SNOWACCU\" class=\"capitalize\"></span>\n\n <div class=\"switch switch--variant-uiswitch notap\"></div>\n\n </div>\n\n <!-- mobile version of calendar -->\n <div id=\"mobile-calendar\">\n\n <div id=\"timecode-mobile\" data-title=\"D_LT2\" class=\"timecode\">\n <div id=\"mobile_box\" class=\"box\"></div><div class=\"loading ld-gray-light size-l loader-path\"></div><!-- dayLoader -->\n </div>\n\n <div id=\"days\"></div>\n\n <!-- PLAY BUTTON FOR MOBILE VERSION apply class play/pause-->\n <div id=\"playpause-mobile\" class=\"play-pause iconfont\"></div>\n\n </div>\n\n</div>\n\n<!-- LOGO -->\n<div id=\"logo-wrapper\" class=\"top-border right-border\">\n <a id=\"logo\" href=\"https://www.windy.com/?utm_medium=__APIUSER__&utm_source=api4\" target=\"_top\">\n <img class=\"clickable-size\" alt=\"Windy.com\" src=\"<!-- @echo IMG_ABSOLUTE_PATH -->/logo201802/logo-full-windycom-white.svg\" />\n </a>\n</div>\n\n\n<div id=\"plugins\" class=\"shy\"></div>\n\n<div id=\"mobile-ovr-select\" data-icon=\"<!-- @echo icon-wind -->\" class=\"top-border clickable\" data-do=\"rqstOpen,menu\"></div>\n\n<div id=\"embed-zoom\">\n <div data-do=\"bcast,zoomIn\" class=\"clickable iconfont zoom-ctrl zoom-plus\" title=\"Zoom in\"><!-- @echo icon-plus --></div>\n <div data-do=\"bcast,zoomOut\" class=\"clickable iconfont zoom-ctrl zoom-minus\" title=\"Zoom out\"><!-- @echo icon-minus --></div>\n</div>\n";
1
+ declare const _default: "\n\n<div id=\"map-container\"\n style=\"position: absolute; top: 0; bottom: 0; left: 0; right: 0; width: 100%; height: 100%;\"\n class=\"noselect\"></div>\n\n<div id=\"bottom\" class=\"hide-on-picker-drag right-border\">\n\n\n <!-- progress bar -->\n <div id=\"progress-bar\" class=\"progress-bar\">\n\n <div class=\"progress-line\">\n <div class=\"played\"></div><div class=\"avbl\"></div>\n <i></i>\n </div>\n\n <!-- GHOST -->\n <div class=\"timecode ghost-timecode\">\n <div class=\"box\"></div>\n </div>\n\n <!-- M A I N -->\n <div data-title=\"D_LT2\" class=\"timecode main-timecode\">\n <div class=\"box\"></div><div class=\"loading loading--variant-gray size-l loader-path\"></div><!-- dayLoader -->\n </div>\n\n <!-- PLAY BUTTON apply class play/pause-->\n <div id=\"playpause\" class=\"play-pause iconfont clickable\"></div>\n\n <!-- CALENDAR WITH DAYS -->\n <div id=\"calendar\"></div>\n\n </div>\n\n <!-- ACCUMULATIONS -->\n <div id=\"accumulations\" class=\"size-s fg-yellow\">\n\n <span id=\"acc-title-rain\" data-t=\"RAINACCU\" class=\"capitalize\"></span>\n <span id=\"acc-title-snow\" data-t=\"SNOWACCU\" class=\"capitalize\"></span>\n\n <div class=\"switch switch--variant-uiswitch notap\"></div>\n\n </div>\n\n <!-- mobile version of calendar -->\n <div id=\"mobile-calendar\">\n\n <div id=\"timecode-mobile\" data-title=\"D_LT2\" class=\"timecode\">\n <div id=\"mobile_box\" class=\"box\"></div><div class=\"loading loading--variant-gray size-l loader-path\"></div><!-- dayLoader -->\n </div>\n\n <div id=\"days\"></div>\n\n <!-- PLAY BUTTON FOR MOBILE VERSION apply class play/pause-->\n <div id=\"playpause-mobile\" class=\"play-pause iconfont\"></div>\n\n </div>\n\n</div>\n\n<!-- LOGO -->\n<div id=\"logo-wrapper\" class=\"top-border right-border\">\n <a id=\"logo\" href=\"https://www.windy.com/?utm_medium=__APIUSER__&utm_source=api4\" target=\"_top\">\n <img class=\"clickable\" alt=\"Windy.com\" src=\"<!-- @echo IMG_ABSOLUTE_PATH -->/logo201802/logo-full-windycom-white.svg\" />\n </a>\n</div>\n\n\n<div id=\"plugins\" class=\"hide-on-picker-drag\"></div>\n\n<div id=\"mobile-ovr-select\" data-icon=\"<!-- @echo icon-wind -->\" class=\"top-border clickable\" data-do=\"rqstOpen,menu\"></div>\n\n<div id=\"embed-zoom\">\n <div data-do=\"bcast,zoomIn\" class=\"clickable iconfont zoom-ctrl zoom-plus\" title=\"Zoom in\"><!-- @echo icon-plus --></div>\n <div data-do=\"bcast,zoomOut\" class=\"clickable iconfont zoom-ctrl zoom-minus\" title=\"Zoom out\"><!-- @echo icon-minus --></div>\n</div>\n";
2
2
  export default _default;
@@ -67,21 +67,20 @@ export * as BottomTagPlugin from './pluginSystem/BottomTagPlugin';
67
67
  export * as Plugin from './pluginSystem/Plugin';
68
68
  export * as SveltePanePlugin from './pluginSystem/SveltePanePlugin';
69
69
  export * as SveltePlugin from './pluginSystem/SveltePlugin';
70
+ export * as ExternalSveltePlugin from './pluginSystem/ExternalSveltePlugin';
70
71
  export * as TagPlugin from './pluginSystem/TagPlugin';
71
72
  export * as WindowPlugin from './pluginSystem/WindowPlugin';
72
73
  export { default as plugins } from './pluginSystem/plugins';
73
74
  export * as pluginsCtrl from './pluginSystem/pluginsCtrl';
75
+ export * as externalPlugins from './pluginSystem/externalPlugins';
74
76
  export * as Bar from './uiClasses/Bar';
75
77
  export * as BindedBar from './uiClasses/BindedBar';
76
78
  export * as BindedCheckbox from './uiClasses/BindedCheckbox';
77
- export * as BindedDropDown from './uiClasses/BindedDropDown';
78
79
  export * as BindedSwitch from './uiClasses/BindedSwitch';
79
80
  export * as BottomSlide from './uiClasses/BottomSlide';
80
81
  export * as ClickHandler from './uiClasses/ClickHandler';
81
- export * as Detail1hCheckbox from './uiClasses/Detail1hCheckbox';
82
82
  export * as Drag from './uiClasses/Drag';
83
83
  export * as DraggableDiv from './uiClasses/DraggableDiv';
84
- export * as DropDown from './uiClasses/DropDown';
85
84
  export * as GhostBox from './uiClasses/GhostBox';
86
85
  export * as LongTap from './uiClasses/LongTap';
87
86
  export * as MobileCalendar from './uiClasses/MobileCalendar';
@@ -90,15 +89,13 @@ export * as Scrollable from './uiClasses/Scrollable';
90
89
  export * as Swipe from './uiClasses/Swipe';
91
90
  export * as Switch from './uiClasses/Switch';
92
91
  export * as TimestampBar from './uiClasses/TimestampBar';
93
- export * as Webcams from './uiClasses/Webcams';
94
92
  export * as Window from './uiClasses/Window';
95
93
  export * as components from './ui/components';
96
- export * as hp from './ui/hp';
94
+ export * as startupWeather from './ui/startupWeather';
97
95
  export * as keyboard from './ui/keyboard';
98
- export * as loadersUI from './ui/loadersUI';
99
96
  export * as location from './ui/location';
100
97
  export * as permanentPromos from './ui/permanentPromos';
101
- export { default as promo } from './ui/promo';
98
+ export * as promo from './ui/promo';
102
99
  export * as query from './ui/query';
103
100
  export * as rhMessage from './ui/rhMessage';
104
101
  export * as timeAnimation from './ui/timeAnimation';
@@ -136,3 +133,4 @@ export * as mobileUtils from './capacitor/mobileUtils';
136
133
  export * as nativeStorage from './capacitor/nativeStorage';
137
134
  export * as pushNotifications from './capacitor/pushNotifications';
138
135
  export * as seoParser from './dummyModules/seoParser';
136
+ import './ui/patchAndPromoCtrl';
@@ -26,7 +26,7 @@ export declare const getIconModel: (rqrdProduct: Products, avProducts: Products[
26
26
  /**
27
27
  * Return idents of visible local products available in the current map boundaries (or empty array undefined)
28
28
  */
29
- export declare const betterProducts: <T extends LatLon, PT extends boolean, R extends PT extends true ? "icon" | "gfs" | "ecmwf" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeReunion" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "ukv" | "mblue" : "icon" | "radar" | "satellite" | "capAlerts" | "gfs" | "ecmwf" | "ecmwfAnalysis" | "ecmwfWaves" | "gfsWaves" | "iconWaves" | "cams" | "efi" | "cmems" | "drought" | "fireDanger" | "activeFires" | "nems" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeReunion" | "camsEu" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "ukv" | "mblue">(latLon: T, pointFcts?: PT) => R[];
29
+ export declare const betterProducts: <T extends LatLon, PT extends boolean, R extends PT extends true ? "icon" | "gfs" | "ecmwf" | "ecmwfAifs" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "mblue" : "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">(latLon: T, pointFcts?: PT) => R[];
30
30
  /**
31
31
  * Return product string on a basis of overlay & wanted forecast model
32
32
  */
@@ -0,0 +1,13 @@
1
+ /**
2
+ * # @windy/patchAndPromoCtrl
3
+ *
4
+ * This module is responsible for initializing and running promos and patches
5
+ * loaded from `patch.ts` ES module (repository `client-patch`).
6
+ *
7
+ * IMPORTANT: Some promos are displayed after startup-weather is shown in the
8
+ * position of startup-articles. Therefore it is this module that
9
+ * determines if, and initiates load of `startup-articles` plugin.
10
+ *
11
+ * @module patchAndPromoCtrl
12
+ */
13
+ export {};
@@ -1,2 +1 @@
1
- import '@windy/geolocation';
2
1
  export declare const neverDisplayLongTapPromo: () => void;
@@ -1,7 +1,16 @@
1
1
  /**
2
- * @module pluginsCtrl
2
+ * # @windy/pluginCtrl
3
+ *
4
+ * Handles opening and closing of plugins, solving UI collisions by closing plugins
5
+ * that can overlap other plugins.
6
+ *
7
+ * Can be used from other modules
8
+ * just by emitting `rqstOpen`, `rqstClose` or `closeAllPlugins` events,
9
+ * on {@link module:bcast} channel in order to avoid circular dependencies.
3
10
  *
4
- * Handles opening and closing of plugins. Can be used from other modules
5
- * just by emitting `rqstOpen`, `rqstClose` or `closeAllPlugins` events.
11
+ * Unless we are opening external plugins, `openPlugin` provides satisfactory
12
+ * type safety of provided plugin parameters.
13
+ *
14
+ * @module pluginsCtrl
6
15
  */
7
16
  export {};
@@ -1,37 +1,31 @@
1
- import '@windy/geolocation';
1
+ import type { StorageData } from '@windy/storage.d';
2
2
  export interface PromoInfoObject {
3
3
  displayed: number;
4
4
  ts: number;
5
5
  }
6
6
  /**
7
- * TODO: Keep this as default export due to backward compatibility with client-patch
7
+ * Get raw promo object from localStorage
8
+ *
9
+ * @returns Local promos
8
10
  */
9
- declare const _default: {
10
- /**
11
- * Get basic info about promo
12
- *
13
- * @param ident Identificator
14
- * @returns Promo info object
15
- */
16
- getCounter2: (ident: string) => PromoInfoObject;
17
- /**
18
- * Increases 'seen' counter for particular promo
19
- *
20
- * @param ident Ident
21
- */
22
- hitCounter: (ident: string) => void;
23
- /**
24
- * Flag the promo to be never seen again (by setting
25
- * its number to 1000)
26
- *
27
- * @param ident Ident
28
- */
29
- neverSee: (ident: string) => void;
30
- /**
31
- * Get raw promo object from localStorage
32
- *
33
- * @returns Local promos
34
- */
35
- getAll: () => Record<string, number>;
36
- };
37
- export default _default;
11
+ export declare const getAll: () => StorageData['promos2'];
12
+ /**
13
+ * Get basic info about promo
14
+ *
15
+ * @param ident Identification
16
+ * @returns Promo info object
17
+ */
18
+ export declare const getCounter2: (ident: string) => PromoInfoObject;
19
+ /**
20
+ * Increases 'seen' counter for particular promo
21
+ *
22
+ * @param ident Ident
23
+ */
24
+ export declare const hitCounter: (ident: string) => void;
25
+ /**
26
+ * Flag the promo to be never seen again (by setting
27
+ * its number to 1000)
28
+ *
29
+ * @param ident Ident
30
+ */
31
+ export declare const neverSee: (ident: string) => void;
@@ -3,4 +3,4 @@ import type { TileParams } from '@windy/Renderer.d';
3
3
  import type { TileLayerCanvas } from '@windy/TileLayerCanvas.d';
4
4
  declare const renderNoDataTile: (canvas: HTMLCanvasElement, url?: string) => void;
5
5
  declare const renderTile: (this: TileLayerCanvas, step: 1 | 2, canvas: HTMLCanvasElement, rqrdSyncNum: number, tInfo: TileParams, dTile: DataTile) => void;
6
- export { renderTile, renderNoDataTile };
6
+ export { renderNoDataTile, renderTile };
@@ -8,7 +8,7 @@ declare const renderers: {
8
8
  */
9
9
  tileLayer: TileLayer;
10
10
  noUserControl: TileLayer;
11
- radar: Renderer<"radar", typeof import("../../plugins/_radar/radar")>;
11
+ radar: Renderer<"radar", typeof import("../../plugins/radar/radar")>;
12
12
  satellite: Renderer<"satellite", typeof import("../../plugins/satellite/satellite")>;
13
13
  capAlerts: Renderer<"cap-alerts", typeof import("../../plugins/cap-alerts/cap-alerts")>;
14
14
  isolines: Renderer<"isolines", typeof import("../../plugins/isolines/isolines")>;
@@ -62,16 +62,11 @@ export declare const assets: string;
62
62
  * Supported list of weather levels
63
63
  */
64
64
  export declare const levels: readonly ["surface", "100m", "975h", "950h", "925h", "900h", "850h", "800h", "700h", "600h", "500h", "400h", "300h", "250h", "200h", "150h", "10h"];
65
- /**
66
- * Point forecast API endpoint prefix
67
- * @ignore
68
- */
69
- export declare const pointForecast = "v2.7";
70
65
  /**
71
66
  * Directory containing latest weather icons
72
67
  * @ignore
73
68
  */
74
- export declare const iconsDir = "<!-- @echo IMG_RELATIVE_PATH -->/icons6";
69
+ export declare const iconsDir = "<!-- @echo IMG_RELATIVE_PATH -->/icons7";
75
70
  /**
76
71
  * List of valid overlay identifiers
77
72
  */
@@ -79,19 +74,23 @@ export declare const overlays: readonly ["radar", "satellite", "wind", "gust", "
79
74
  /**
80
75
  * List of valid accumulation times
81
76
  */
82
- export declare const acTimes: readonly ["next12h", "next24h", "next2d", "next48h", "next60h", "next3d", "next5d", "next10d"];
77
+ export declare const acTimes: readonly ["next12h", "next24h", "next36h", "next2d", "next48h", "next60h", "next3d", "next5d", "next10d"];
83
78
  /**
84
79
  * Identifier of products that cover only certain area
85
80
  */
86
- export declare const localProducts: readonly ["nems", "namConus", "namHawaii", "namAlaska", "iconEu", "iconD2", "arome", "aromeAntilles", "aromeReunion", "camsEu", "iconEuWaves", "hrrrAlaska", "hrrrConus", "bomAccess", "ukv"];
81
+ export declare const localProducts: readonly ["nems", "namConus", "namHawaii", "namAlaska", "iconEu", "iconD2", "arome", "aromeAntilles", "aromeReunion", "canHrdps", "canRdwpsWaves", "camsEu", "iconEuWaves", "hrrrAlaska", "hrrrConus", "bomAccess", "ukv", "jmaMsm", "jmaCwmWaves"];
87
82
  /**
88
83
  * Identifiers of global products
89
84
  */
90
- export declare const globalProducts: readonly ["gfs", "ecmwf", "ecmwfAnalysis", "radar", "ecmwfWaves", "gfsWaves", "icon", "iconWaves", "capAlerts", "cams", "efi", "satellite", "cmems", "drought", "fireDanger", "activeFires"];
85
+ export declare const globalProducts: readonly ["gfs", "ecmwf", "ecmwfAnalysis", "ecmwfAifs", "radar", "ecmwfWaves", "gfsWaves", "icon", "iconWaves", "capAlerts", "cams", "efi", "satellite", "cmems", "drought", "fireDanger", "activeFires"];
91
86
  /**
92
87
  * Identifiers of sea products
93
88
  */
94
- export declare const seaProducts: readonly ["ecmwfWaves", "gfsWaves", "iconWaves", "iconEuWaves", "cmems"];
89
+ export declare const seaProducts: readonly ["ecmwfWaves", "gfsWaves", "iconWaves", "iconEuWaves", "canRdwpsWaves", "cmems", "jmaCwmWaves"];
90
+ /**
91
+ * Identifiers of wave products, if product is not here, it will be considered as air product
92
+ */
93
+ export declare const waveProducts: readonly ["ecmwfWaves", "gfsWaves", "iconWaves", "iconEuWaves", "jmaCwmWaves", "canRdwpsWaves"];
95
94
  /**
96
95
  * identifiers of air quality product
97
96
  */
@@ -99,19 +98,19 @@ export declare const airQualityProducts: readonly ["cams", "camsEu"];
99
98
  /**
100
99
  * identifiers of local products, that have point forecast
101
100
  */
102
- export declare const localPointProducts: readonly ["namConus", "namHawaii", "namAlaska", "iconD2", "iconEu", "iconEuWaves", "arome", "aromeAntilles", "aromeReunion", "hrrrAlaska", "hrrrConus", "bomAccess", "ukv"];
101
+ export declare const localPointProducts: readonly ["namConus", "namHawaii", "namAlaska", "iconD2", "iconEu", "iconEuWaves", "arome", "aromeAntilles", "aromeReunion", "canHrdps", "canRdwpsWaves", "hrrrAlaska", "hrrrConus", "bomAccess", "ukv", "jmaMsm", "jmaCwmWaves"];
103
102
  /**
104
103
  * Identifiers of global products, that have point forecast
105
104
  */
106
- export declare const globalPointProducts: readonly ["gfs", "ecmwf", "icon", "mblue"];
105
+ export declare const globalPointProducts: readonly ["gfs", "ecmwf", "ecmwfAifs", "icon", "mblue"];
107
106
  /**
108
107
  * Identifiers of all land products combined
109
108
  */
110
- export declare const products: readonly ["gfs", "ecmwf", "ecmwfAnalysis", "radar", "ecmwfWaves", "gfsWaves", "icon", "iconWaves", "capAlerts", "cams", "efi", "satellite", "cmems", "drought", "fireDanger", "activeFires", "nems", "namConus", "namHawaii", "namAlaska", "iconEu", "iconD2", "arome", "aromeAntilles", "aromeReunion", "camsEu", "iconEuWaves", "hrrrAlaska", "hrrrConus", "bomAccess", "ukv", "cams", "camsEu", "mblue"];
109
+ export declare const products: readonly ["gfs", "ecmwf", "ecmwfAnalysis", "ecmwfAifs", "radar", "ecmwfWaves", "gfsWaves", "icon", "iconWaves", "capAlerts", "cams", "efi", "satellite", "cmems", "drought", "fireDanger", "activeFires", "nems", "namConus", "namHawaii", "namAlaska", "iconEu", "iconD2", "arome", "aromeAntilles", "aromeReunion", "canHrdps", "canRdwpsWaves", "camsEu", "iconEuWaves", "hrrrAlaska", "hrrrConus", "bomAccess", "ukv", "jmaMsm", "jmaCwmWaves", "cams", "camsEu", "mblue"];
111
110
  /**
112
111
  * Identifiers of all point products combines
113
112
  */
114
- export declare const pointProducts: readonly ["gfs", "ecmwf", "icon", "mblue", "namConus", "namHawaii", "namAlaska", "iconD2", "iconEu", "iconEuWaves", "arome", "aromeAntilles", "aromeReunion", "hrrrAlaska", "hrrrConus", "bomAccess", "ukv"];
113
+ export declare const pointProducts: readonly ["gfs", "ecmwf", "ecmwfAifs", "icon", "mblue", "namConus", "namHawaii", "namAlaska", "iconD2", "iconEu", "iconEuWaves", "arome", "aromeAntilles", "aromeReunion", "canHrdps", "canRdwpsWaves", "hrrrAlaska", "hrrrConus", "bomAccess", "ukv", "jmaMsm", "jmaCwmWaves"];
115
114
  /**
116
115
  * IndicatesIndicates that that browsing device is mobile
117
116
  */
@@ -140,6 +139,10 @@ export declare const prefLang: string;
140
139
  export declare const levelsData: {
141
140
  [L in (typeof levels)[number]]: [string, string];
142
141
  };
142
+ /**
143
+ * Maximum number of fav POIs displayed in the GUI
144
+ */
145
+ export declare const maxFavPoisDesktop = 7;
143
146
  /**
144
147
  * Valid POI layers, their name and icon
145
148
  * @ignore this will crash Markdown parser
@@ -150,3 +153,8 @@ export declare const pois: Record<Pois, [keyof LoadedTranslations | string, Icon
150
153
  * @ignore this will crash Markdown parser
151
154
  */
152
155
  export declare const isolines: Isolines[];
156
+ /**
157
+ * Location of internal Windy plugins
158
+ * TODO: Mobile apps have probably different location
159
+ */
160
+ export declare const pluginsLocation: string;
@@ -1,7 +1,7 @@
1
1
  import { type ParsedQueryString } from '../utils/queryString';
2
+ import type { PluginIdent } from '@windy/Plugin';
2
3
  import type { Coords, PickerCoords } from '@windy/interfaces.d';
3
4
  import type { ExternalPluginIdent } from '@windy/types';
4
- import type { PluginIdent } from '@windy/Plugin';
5
5
  type StartupCoords = {
6
6
  sharedCoords: Coords | null;
7
7
  pickerCoords: PickerCoords | null;
@@ -1,10 +1,19 @@
1
+ /**
2
+ *
3
+ * # @windy/startupWeather
4
+ *
5
+ * Controls display & hiding of 4 days weather on Windy after startup
6
+ *
7
+ * @module startupWeather
8
+ */
1
9
  import type { GeolocationInfo, HomeLocation } from '@windy/interfaces.d';
10
+ export declare function removeListeners(): void;
2
11
  /**
3
12
  * Show the weather box on HP
4
13
  *
5
14
  * @param coords At which location show the HP
6
15
  */
7
- export declare function show(coords: HomeLocation | GeolocationInfo): void;
16
+ export declare function show(coords: HomeLocation | GeolocationInfo, displayArticles?: boolean): void;
8
17
  /**
9
18
  * Hides, the weather DIV
10
19
  *
@@ -12,4 +21,3 @@ export declare function show(coords: HomeLocation | GeolocationInfo): void;
12
21
  */
13
22
  export declare function hide(ev?: MouseEvent | KeyboardEvent | TouchEvent): void;
14
23
  export declare const getCancelShow: () => boolean;
15
- export declare const setCancelShow: () => boolean;
@@ -9,10 +9,10 @@
9
9
  * @module tileInterpolator
10
10
  */
11
11
  import { DataTiler } from '@windy/DataTiler';
12
- import type { PixelInterpolationFun, CoordsInterpolationFun } from './d.ts.files/tileInterpolator.d';
12
+ import type { PixelInterpolationFun, CoordsInterpolationFun } from '@windy/interpolatorTypes';
13
13
  import type { DataTile } from './dataLoader';
14
- import type { ExtendedTileParams } from './d.ts.files/DataTiler.d';
15
- import type { FullRenderParameters } from './d.ts.files/Layer.d';
14
+ import type { ExtendedTileParams } from '@windy/DataTiler.d';
15
+ import type { FullRenderParameters } from '@windy/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
1
  /**
2
- * @module user
2
+ * # @windy/user
3
3
  *
4
4
  * 1) Wrapper for the user store object.
5
5
  * 2) Loads user info from the server.
@@ -8,6 +8,8 @@
8
8
  *
9
9
  * data-user='logged-in' or 'logged-out' attr is added to the body tag when we know the state of the user (a CSS way of isUserLoggedIn function).
10
10
  * it's to avoid unnecessary render of "login" button when the user is logged in, but we still wait for the server response
11
+ *
12
+ * @module user
11
13
  */
12
14
  /**
13
15
  * We use ./filename to motivate rollup treeshaking
@@ -15,8 +17,10 @@
15
17
  import type { User } from './d.ts.files/dataSpecifications.d';
16
18
  import type { HttpPayload } from './d.ts.files/http.d';
17
19
  import type { AccountLoginResponse, UserInfo } from './d.ts.files/user.d';
20
+ /**
21
+ * Quick check is user is loggedIn
22
+ */
18
23
  export declare const isLoggedIn: () => boolean;
19
- export declare const isPublisher: () => boolean;
20
24
  export declare const getInfo: () => User | null;
21
25
  /**
22
26
  * Safe way how to retrieve use avatar
@@ -34,16 +38,17 @@ export declare const register: () => void;
34
38
  /**
35
39
  * Log out the user - remove credentials and reload all things that depends on logged-in user
36
40
  */
37
- export declare const logout: () => void;
41
+ export declare const logout: () => Promise<void>;
38
42
  export declare const setExplicitConsent: (analytics: boolean) => void;
39
43
  export declare const setImplicitConsent: () => void;
40
44
  /**
41
45
  * Check if we have received valid auth object and if yes, save it and open user plugin
42
46
  *
43
47
  * @param userInfo user info from account or node users
48
+ * @param handleConsent should we handle analytics consent (api/info endpoint)
44
49
  * @returns true if user is authenticated
45
50
  */
46
- export declare const checkAuth: (userInfo: UserInfo) => boolean;
51
+ export declare const checkAuth: (userInfo: UserInfo, handleConsent: boolean) => boolean;
47
52
  /**
48
53
  * Get info about current user from account
49
54
  *
@@ -22,22 +22,16 @@ interface FavsTypes {
22
22
  declare class SavedFavs extends Favs<SavedFav> {
23
23
  protected ident: "favs2";
24
24
  private triggeredAlerts;
25
- private favsMenuOpened;
26
25
  /**
27
26
  * Supported types in this version
28
27
  */
29
28
  private types;
30
29
  private overflowedKey;
31
- latestParams: Fav;
32
30
  on: Evented<FavsTypes>['on'];
33
31
  off: Evented<FavsTypes>['off'];
34
32
  emit: Evented<FavsTypes>['emit'];
35
33
  constructor();
36
34
  isValidFavourite(item: Fav): boolean;
37
- /**
38
- * Called on detail open or picker move. Always have latest { lat, lon } !!!!
39
- */
40
- update(params: Fav): void;
41
35
  /**
42
36
  * Check if object is an alert (or near) and have triggered timestamps
43
37
  * item = latLonObj or alert id
@@ -45,7 +39,7 @@ declare class SavedFavs extends Favs<SavedFav> {
45
39
  */
46
40
  hasTimestamps<T extends LatLon | string>(item: T): number[] | null;
47
41
  /**
48
- * Add favourite
42
+ * Add favorite
49
43
  */
50
44
  add(item: Fav): boolean | Promise<string>;
51
45
  /**
@@ -58,10 +52,6 @@ declare class SavedFavs extends Favs<SavedFav> {
58
52
  */
59
53
  getArray(deduped?: boolean, editedAlert?: Fav): SavedFav[];
60
54
  isFreeLimitExceeded(editedAlert?: Fav): boolean;
61
- /**
62
- * Updates CSS info
63
- */
64
- updateCSS(): void;
65
55
  /**
66
56
  * Emits info about favs status change
67
57
  */
@@ -95,11 +85,14 @@ declare class SavedFavs extends Favs<SavedFav> {
95
85
  * start to sync some overflowed
96
86
  */
97
87
  syncOverflowed(fav: Fav): void;
88
+ /**
89
+ * Toggle pinning fav to top or to homepage
90
+ */
91
+ togglePin(fav: SavedFav, whereToPin: 'pin2top' | 'pin2homepage', forcedTimestamp?: Timestamp): null | undefined | Timestamp;
98
92
  /**
99
93
  * Load from cloud
100
94
  */
101
95
  private loadFromCloud;
102
- private debouncedUpdate;
103
96
  /**
104
97
  * Alert related methods
105
98
  * item = fav || key
@@ -4,8 +4,8 @@ import type { RGBA } from '@windy/Color.d';
4
4
  import type { HttpError } from '@windy/http';
5
5
  import type { QueryStringSource } from '@windy/http.d';
6
6
  import type { LatLon, LinearScale, TilePoint } from '@windy/interfaces.d';
7
- import type { RGBNumValues } from '@windy/tileInterpolator.d';
8
- import type { HTMLString, Timestamp, ExtendedStationType } from '@windy/types.d';
7
+ import type { RGBNumValues } from '@windy/interpolatorTypes';
8
+ import type { ExtendedStationType, HTMLString, NumOrNull, Timestamp } from '@windy/types.d';
9
9
  /**
10
10
  * One minute in ms.
11
11
  *
@@ -18,6 +18,12 @@ export declare const tsMinute: Timestamp;
18
18
  * @type {Timestamp}
19
19
  */
20
20
  export declare const tsHour: Timestamp;
21
+ /**
22
+ * One day in ms.
23
+ *
24
+ * @type {Timestamp}
25
+ */
26
+ export declare const tsDay: Timestamp;
21
27
  /**
22
28
  * Long press time in ms. to be used everywhere
23
29
  */
@@ -60,6 +66,10 @@ export declare const emptyFun: () => void;
60
66
  * @type {string}
61
67
  */
62
68
  export declare const emptyGIF = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";
69
+ /**
70
+ * Checks if the given object is empty (has no keys).
71
+ */
72
+ export declare const isEmptyObject: (obj: Record<string, unknown>) => obj is Record<string, never>;
63
73
  /**
64
74
  * Check if obj is a valid obj contaning lat,lon
65
75
  * TODO - it returns true also for string coords, but guarding LatLon with only numbered coords!
@@ -273,7 +283,7 @@ export declare const getAdjustedNow: (syncTime?: number) => number;
273
283
  */
274
284
  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
285
  /**
276
- * Safely joins server name (without trailing / ) and path
286
+ * Safely joins server name and path
277
287
  *
278
288
  * @param url1 URL to join
279
289
  * @param url2 URL to join
@@ -299,7 +309,7 @@ export declare const qs: (tokensObj: QueryStringSource) => string;
299
309
  * Loads .js file by appendig it as script element appended to the <head> section of the page
300
310
  *
301
311
  * @param {string} url URL of script to be loaded
302
- * @param callback Callback to be called on HTML script element
312
+ * @param callback Callback to be called on HTML script element (WARNING: it is not called on script load)
303
313
  * @returns
304
314
  */
305
315
  export declare const loadScript: (url: string, callback?: (s: HTMLScriptElement) => void) => Promise<void>;
@@ -394,7 +404,7 @@ export declare const sendMessageToServiceWorker: (message: ClientMessage) => voi
394
404
  * Same as scale linear from d3 library except with different params
395
405
  * https://d3js.org/d3-scale/linear
396
406
  * @param Object { domain: [ ], range: [] }
397
- * @returns Object { get, ivert }
407
+ * @returns Object { get, invert }
398
408
  */
399
409
  export declare const scaleLinear: ({ domain, range, clip, }: {
400
410
  domain: [number, number];
@@ -421,4 +431,8 @@ export declare const wrapCoords: (tilePoint: TilePoint) => TilePoint;
421
431
  * based on target and provided locatio returns URL where to load .js asset
422
432
  * @param location
423
433
  */
424
- export declare const getLoacationOfJsAssets: (location: string) => string;
434
+ export declare const getLocationOfJsAssets: (location: string) => string;
435
+ /**
436
+ * Is valid NumValue
437
+ */
438
+ export declare const isValidNumber: (d: NumOrNull | undefined) => boolean;
@@ -1,10 +1,7 @@
1
1
  // !!! Automatically generated file by make/iconfont.ts !!!
2
2
 
3
3
  export type Iconfont =
4
- | '<!-- @echo icon-share -->'
5
- | '<!-- @echo icon-bell-plus -->'
6
- | '<!-- @echo icon-x -->'
7
- | '<!-- @echo icon-twitter -->'
4
+ | '<!-- @echo icon-upload -->'
8
5
  | '<!-- @echo icon-long-tap -->'
9
6
  | '<!-- @echo icon-moving-cloud -->'
10
7
  | '<!-- @echo icon-uv -->'
@@ -185,6 +182,10 @@ export type Iconfont =
185
182
  | '<!-- @echo icon-crown-king -->'
186
183
  | '<!-- @echo icon-tide -->'
187
184
  | '<!-- @echo icon-car -->'
185
+ | '<!-- @echo icon-share -->'
186
+ | '<!-- @echo icon-bell-plus -->'
187
+ | '<!-- @echo icon-x -->'
188
+ | '<!-- @echo icon-twitter -->'
188
189
  | '<!-- @echo icon-github -->'
189
190
  | '<!-- @echo icon-link -->'
190
191
  | '<!-- @echo icon-plane-snowflake -->'