@windycom/plugin-devtools 1.0.9 → 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.
- package/README.md +1 -0
- package/package.json +1 -1
- package/types/client/Drag.d.ts +8 -1
- package/types/client/MobileCalendar.d.ts +4 -0
- package/types/client/Product.d.ts +14 -2
- package/types/client/ProductSwitch.d.ts +1 -1
- package/types/client/SveltePanePlugin.d.ts +4 -3
- package/types/client/Window.d.ts +0 -4
- package/types/client/WindowPlugin.d.ts +9 -8
- package/types/client/d.ts.files/broadcast.d.ts +7 -8
- package/types/client/d.ts.files/dataSpecifications.d.ts +16 -18
- package/types/client/d.ts.files/plugin-params.d.ts +12 -14
- package/types/client/d.ts.files/plugins.d.ts +11 -14
- package/types/client/d.ts.files/products.d.ts +5 -0
- package/types/client/d.ts.files/satellite.d.ts +1 -0
- package/types/client/device.d.ts +0 -1
- package/types/client/embed2.d.ts +2 -5
- package/types/client/fetch.d.ts +4 -10
- package/types/client/ga.d.ts +4 -0
- package/types/client/geolocation.d.ts +0 -1
- package/types/client/interpolator.d.ts +2 -1
- package/types/client/lib.d.ts +0 -4
- package/types/client/libHtml.d.ts +1 -1
- package/types/client/mobile.d.ts +5 -7
- package/types/client/models.d.ts +1 -1
- package/types/client/nativeStorage.d.ts +0 -14
- package/types/client/patchAndPromoCtrl.d.ts +13 -0
- package/types/client/permanentPromos.d.ts +0 -1
- package/types/client/promo.d.ts +25 -31
- package/types/client/rootScope.d.ts +17 -13
- package/types/client/router.d.ts +1 -1
- package/types/client/{hp.d.ts → startupWeather.d.ts} +10 -2
- package/types/client/user.d.ts +9 -4
- package/types/client/userFavs.d.ts +5 -12
- package/types/client/utils.d.ts +18 -4
- package/types/iconfont.d.ts +5 -4
- package/types/interfaces.d.ts +188 -202
- package/types/lang-files.d.ts +58 -18
- package/types/types.d.ts +61 -9
- package/types/client/BindedDropDown.d.ts +0 -14
- package/types/client/Detail1hCheckbox.d.ts +0 -4
- package/types/client/DropDown.d.ts +0 -37
- package/types/client/Webcams.d.ts +0 -66
- package/types/client/loadersUI.d.ts +0 -1
|
@@ -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=\"
|
|
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;
|
package/types/client/mobile.d.ts
CHANGED
|
@@ -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
|
|
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
|
|
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';
|
package/types/client/models.d.ts
CHANGED
|
@@ -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" | "
|
|
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
|
*/
|
|
@@ -14,18 +14,4 @@ export interface WindyWidgetPlugin {
|
|
|
14
14
|
value: boolean;
|
|
15
15
|
}>;
|
|
16
16
|
}
|
|
17
|
-
export interface WindyBackupPlugin {
|
|
18
|
-
syncCounter: (arg: {
|
|
19
|
-
clientCounter: number;
|
|
20
|
-
}) => Promise<{
|
|
21
|
-
nativeCounter: number;
|
|
22
|
-
backup?: string;
|
|
23
|
-
}>;
|
|
24
|
-
saveBackup: (arg: {
|
|
25
|
-
clientCounter: number;
|
|
26
|
-
backup: string;
|
|
27
|
-
}) => Promise<void>;
|
|
28
|
-
reloadApp: () => Promise<void>;
|
|
29
|
-
clearBackup: () => Promise<void>;
|
|
30
|
-
}
|
|
31
17
|
export {};
|
|
@@ -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 {};
|
package/types/client/promo.d.ts
CHANGED
|
@@ -1,37 +1,31 @@
|
|
|
1
|
-
import '@windy/
|
|
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
|
-
*
|
|
7
|
+
* Get raw promo object from localStorage
|
|
8
|
+
*
|
|
9
|
+
* @returns Local promos
|
|
8
10
|
*/
|
|
9
|
-
declare const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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;
|
|
@@ -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 -->/
|
|
69
|
+
export declare const iconsDir = "<!-- @echo IMG_RELATIVE_PATH -->/icons7";
|
|
75
70
|
/**
|
|
76
71
|
* List of valid overlay identifiers
|
|
77
72
|
*/
|
|
@@ -83,15 +78,19 @@ export declare const acTimes: readonly ["next12h", "next24h", "next36h", "next2d
|
|
|
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
|
*/
|
|
@@ -154,3 +153,8 @@ export declare const pois: Record<Pois, [keyof LoadedTranslations | string, Icon
|
|
|
154
153
|
* @ignore this will crash Markdown parser
|
|
155
154
|
*/
|
|
156
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;
|
package/types/client/router.d.ts
CHANGED
|
@@ -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;
|
package/types/client/user.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
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
|
|
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
|
package/types/client/utils.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ 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
7
|
import type { RGBNumValues } from '@windy/interpolatorTypes';
|
|
8
|
-
import type { HTMLString,
|
|
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!
|
|
@@ -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,
|
|
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
|
|
434
|
+
export declare const getLocationOfJsAssets: (location: string) => string;
|
|
435
|
+
/**
|
|
436
|
+
* Is valid NumValue
|
|
437
|
+
*/
|
|
438
|
+
export declare const isValidNumber: (d: NumOrNull | undefined) => boolean;
|
package/types/iconfont.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
// !!! Automatically generated file by make/iconfont.ts !!!
|
|
2
2
|
|
|
3
3
|
export type Iconfont =
|
|
4
|
-
| '<!-- @echo icon-
|
|
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 -->'
|