@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
@@ -0,0 +1,132 @@
1
+ import { BottomTagPlugin } from '@windy/BottomTagPlugin';
2
+ import { Plugin } from '@windy/Plugin';
3
+ import { SveltePanePlugin } from '@windy/SveltePanePlugin';
4
+ import { SveltePlugin } from '@windy/SveltePlugin';
5
+ import { TagPlugin } from '@windy/TagPlugin';
6
+
7
+ export interface BottomTagPlugins {
8
+ accumulations: BottomTagPlugin<'accumulations'>;
9
+ radar: BottomTagPlugin<'radar'>;
10
+ satellite: BottomTagPlugin<'satellite'>;
11
+ 'cap-alerts': BottomTagPlugin<'cap-alerts'>;
12
+ 'day-switcher': BottomTagPlugin<'day-switcher'>;
13
+
14
+ // mobile only, not embed
15
+ 'mobile-calendar'?: BottomTagPlugin<'mobile-calendar'>;
16
+
17
+ // embed or desktop only
18
+ 'progress-bar'?: BottomTagPlugin<'progress-bar'>;
19
+ }
20
+
21
+ export interface SveltePanePlugins {
22
+ favs: SveltePanePlugin<'favs'>;
23
+ alerts: SveltePanePlugin<'alerts'>;
24
+ colors: SveltePanePlugin<'colors'>;
25
+ articles: SveltePanePlugin<'articles'>;
26
+
27
+ debug: SveltePanePlugin<'debug'>;
28
+ hurricanes: SveltePanePlugin<'hurricanes'>;
29
+ 'cap-alert': SveltePanePlugin<'cap-alert'>;
30
+ login: SveltePanePlugin<'login'>;
31
+ 'delete-info': SveltePanePlugin<'delete-info'>;
32
+ settings: SveltePanePlugin<'settings'>;
33
+ sounding: SveltePanePlugin<'sounding'>;
34
+ radiosonde: SveltePanePlugin<'radiosonde'>;
35
+ airport: SveltePanePlugin<'airport'>;
36
+ info: SveltePanePlugin<'info'>;
37
+
38
+ webcams: SveltePanePlugin<'webcams'>;
39
+ 'webcams-detail': SveltePanePlugin<'webcams-detail'>;
40
+ 'webcams-add': SveltePanePlugin<'webcams-add'>;
41
+ 'webcams-edit': SveltePanePlugin<'webcams-edit'>;
42
+ 'webcams-remove': SveltePanePlugin<'webcams-remove'>;
43
+ 'webcams-embed': SveltePanePlugin<'webcams-embed'>;
44
+
45
+ uploader?: SveltePanePlugin<'uploader'>;
46
+ 'external-plugins'?: SveltePanePlugin<'external-plugins'>;
47
+ }
48
+
49
+ export interface SveltePlugins {
50
+ 'nearest-webcams': SveltePlugin<'nearest-webcams'>;
51
+ 'nearest-webcams-mobile': SveltePlugin<'nearest-webcams-mobile'>;
52
+ 'nearest-airq': SveltePlugin<'nearest-airq'>;
53
+ 'nearest-stations': SveltePlugin<'nearest-stations'>;
54
+ share: SveltePlugin<'share'>;
55
+ multimodel: SveltePlugin<'multimodel'>;
56
+ subscription: SveltePlugin<'subscription'>;
57
+ 'pending-subscription': SveltePlugin<'pending-subscription'>;
58
+ 'whats-new': SveltePlugin<'whats-new'>;
59
+ offline: SveltePlugin<'offline'>;
60
+ detail: SveltePlugin<'detail'>;
61
+ station: SveltePlugin<'station'>;
62
+ consent: SveltePlugin<'consent'>;
63
+ rplanner: SveltePlugin<'rplanner'>;
64
+ menu: SveltePlugin<'menu'>;
65
+
66
+ // Mobile/desktop only plugins
67
+ distance?: SveltePlugin<'distance'>;
68
+ 'article-publisher'?: SveltePlugin<'article-publisher'>;
69
+ 'beta-test'?: SveltePlugin<'beta-test'>;
70
+ 'watch-faces'?: SveltePlugin<'watch-faces'>;
71
+ 'app-review-dialog'?: SveltePlugin<'app-review-dialog'>;
72
+ 'fav-layers'?: SveltePlugin<'fav-layers'>;
73
+ 'developer-mode'?: SveltePlugin<'developer-mode'>;
74
+
75
+ // Used as fake plugin for any other external plugin
76
+ // basically we are unalble to type each individual external plugin
77
+ 'windy-external-plugin'?: SveltePlugin<'windy-external-plugin'>;
78
+ }
79
+
80
+ export interface PlainPlugins {
81
+ 'gl-particles': Plugin<'gl-particles'>;
82
+ 'legacy-tile-render': Plugin<'legacy-tile-render'>;
83
+ particles: Plugin<'particles'>;
84
+ }
85
+
86
+ export interface TagPlugins {
87
+ /**
88
+ * Libraries with possible CSS, that remains opened
89
+ */
90
+ 'rhpane-top': TagPlugin<'rhpane-top'>;
91
+ rhbottom: TagPlugin<'rhbottom'>;
92
+ patch: TagPlugin<'patch'>;
93
+ 'poi-libs': TagPlugin<'poi-libs'>;
94
+
95
+ /**
96
+ * Tag Plugins
97
+ */
98
+ 'fav-alert-menu': TagPlugin<'fav-alert-menu'>;
99
+ upload: TagPlugin<'upload'>;
100
+ screenshot: TagPlugin<'screenshot'>;
101
+ isolines: TagPlugin<'isolines'>;
102
+ search: TagPlugin<'search'>;
103
+
104
+ // not embed plugins
105
+ 'hp-weather'?: TagPlugin<'hp-weather'>;
106
+
107
+ // desktop only plugins
108
+ contextmenu?: TagPlugin<'contextmenu'>;
109
+ picker?: TagPlugin<'picker'>;
110
+ globe?: TagPlugin<'globe'>;
111
+
112
+ // mobile only plugins
113
+ 'picker-mobile'?: TagPlugin<'picker-mobile'>;
114
+ 'promo-mobile-intro'?: TagPlugin<'promo-mobile-intro'>;
115
+ profile?: TagPlugin<'profile'>;
116
+ 'save-password'?: TagPlugin<'save-password'>;
117
+ browser?: TagPlugin<'browser'>;
118
+ 'map-selector'?: TagPlugin<'map-selector'>;
119
+ }
120
+
121
+ export interface Plugins
122
+ extends TagPlugins,
123
+ SveltePlugins,
124
+ SveltePanePlugins,
125
+ PlainPlugins,
126
+ BottomTagPlugins {}
127
+
128
+ export interface WindowPlugins
129
+ extends TagPlugins,
130
+ SveltePlugins,
131
+ SveltePanePlugins,
132
+ BottomTagPlugins {}
@@ -0,0 +1,11 @@
1
+ import type { DataSpecifications } from '@windy/dataSpecifications.d';
2
+ import type { Pois } from '@windy/rootScope.d';
3
+ import type { LoadedTranslations } from '@windy/trans.d';
4
+
5
+ export type PoisCheckboxeDef = {
6
+ checkboxTranslation?: keyof LoadedTranslations;
7
+ checkboxText?: string;
8
+ bindStore: keyof DataSpecifications;
9
+ };
10
+
11
+ export type PoisCheckboxes = Record<Pois, PoisCheckboxeDef[]>;
@@ -0,0 +1,44 @@
1
+ import { AromeProduct } from '@windy/AromeProduct';
2
+ import { EcmwfAnalysisProduct } from '@windy/EcmwfAnalysisProduct';
3
+ import { EcmwfProduct } from '@windy/EcmwfProduct';
4
+ import { Product } from '@windy/Product';
5
+ import { SatelliteProduct } from '@windy/SatelliteProduct';
6
+ import { Products } from '@windy/rootScope.d';
7
+
8
+ export type products = Implements<
9
+ { [P in Products]: Product },
10
+ {
11
+ bomAccess: Product;
12
+ mblue: Product;
13
+ ecmwf: EcmwfProduct;
14
+ ecmwfWaves: Product;
15
+ ecmwfAnalysis: EcmwfAnalysisProduct;
16
+ cams: Product;
17
+ camsEu: Product;
18
+ cmems: Product;
19
+ gfs: Product;
20
+ gfsWaves: Product;
21
+ icon: Product;
22
+ iconD2: Product;
23
+ iconEu: Product;
24
+ iconEuWaves: Product;
25
+ iconWaves: Product;
26
+ arome: Product;
27
+ aromeAntilles: AromeProduct;
28
+ aromeReunion: AromeProduct;
29
+ nems: Product;
30
+ namAlaska: Product;
31
+ namConus: Product;
32
+ namHawaii: Product;
33
+ capAlerts: Product;
34
+ efi: Product;
35
+ radar: Product;
36
+ satellite: SatelliteProduct;
37
+ hrrrAlaska: Product;
38
+ hrrrConus: Product;
39
+ ukv: Product;
40
+ drought: Product;
41
+ fireDanger: Product;
42
+ activeFires: Product;
43
+ }
44
+ >;
@@ -0,0 +1,43 @@
1
+ export type Levels = typeof import('./rootScope').levels[number];
2
+
3
+ export type Overlays = typeof import('./rootScope').overlays[number];
4
+
5
+ export type AcTimes = typeof import('./rootScope').acTimes[number];
6
+
7
+ export type LocalProducts = typeof import('./rootScope').localProducts[number];
8
+
9
+ export type GlobalProducts = typeof import('./rootScope').globalProducts[number];
10
+
11
+ export type SeaProducts = typeof import('./rootScope').seaProducts[number];
12
+
13
+ export type AirQualityProducts = typeof import('./rootScope').airQualityProducts[number];
14
+
15
+ export type LocalPointProducts = typeof import('./rootScope').localPointProducts[number];
16
+
17
+ export type GlobalPointProducts = typeof import('./rootScope').globalPointProducts[number];
18
+
19
+ export type PointProducts = typeof import('./rootScope').pointProducts[number];
20
+
21
+ export type Products = typeof import('./rootScope').products[number];
22
+
23
+ export type SupportedLanguages = typeof import('./rootScope').supportedLanguages[number];
24
+
25
+ export type Pois =
26
+ | 'favs'
27
+ | 'cities'
28
+ | 'wind'
29
+ | 'temp'
30
+ | 'precip'
31
+ | 'metars'
32
+ | 'radiosonde'
33
+ | 'cams'
34
+ | 'pgspots'
35
+ | 'kitespots'
36
+ | 'surfspots'
37
+ | 'tide'
38
+ | 'radiation'
39
+ | 'firespots'
40
+ | 'airq'
41
+ | 'empty';
42
+
43
+ export type Isolines = 'off' | 'pressure' | 'gh' | 'temp' | 'deg0';
@@ -0,0 +1,50 @@
1
+ import type { ISODateString } from '@windy/types.d';
2
+
3
+ export type ArrayBoundaries = [number, number, number, number];
4
+
5
+ export interface SatelliteInfo {
6
+ compositeExtents: ArrayBoundaries;
7
+ compositeMargins: ArrayBoundaries;
8
+ dstTime: ISODateString[];
9
+ extents: ArrayBoundaries;
10
+ flow: string[];
11
+ flowQuant: number;
12
+ flowZoom: number[];
13
+ lon: number;
14
+ name: string;
15
+ priority: number;
16
+ zoom: number[];
17
+
18
+ flowStep: number; // flow step in minutes for normalized flow tiles
19
+
20
+ /** dateString "2021-09-09T09:00:00Z" */
21
+ importStart: string;
22
+ importEnd: string;
23
+
24
+ // time interval for archive
25
+ minDate: string;
26
+ maxDate: string;
27
+ }
28
+
29
+ /**
30
+ * Info Json as loaded from sat server
31
+ */
32
+ export interface SatelliteInfoJson {
33
+ // original content:
34
+ token: string;
35
+ satellites: SatelliteInfo[];
36
+ tMax: number; // IR temperature range in tiles (optional)
37
+ tMin: number;
38
+
39
+ // start/end time sun filter aplied on backend (dateString: "2021-09-09T09:00:00Z")
40
+ filterStart: string;
41
+ filterEnd: string;
42
+
43
+ // content added during processing:
44
+ hash: number;
45
+ minDateTs: number;
46
+ maxDateTs: number;
47
+
48
+ updateTs: number;
49
+ isArchive: boolean;
50
+ }
@@ -0,0 +1,31 @@
1
+ import { LatLon } from '@windy/interfaces.d';
2
+ import { Pois } from '@windy/rootScope.d';
3
+ import { Pixel, ExternalPluginIdent } from '@windy/types.d';
4
+ import { PluginIdent } from '@windy/Plugin';
5
+
6
+ export interface SingleClickParams extends LatLon {
7
+ x: Pixel;
8
+ y: Pixel;
9
+ source: 'singleclick';
10
+ }
11
+
12
+ type SingleclickPoiTypes = {
13
+ [key in `poi-${Pois | 'stations' | 'label'}`]: [HTMLElement];
14
+ };
15
+
16
+ export type SingleclickPluginTypes = {
17
+ [key in PluginIdent]: [SingleClickParams];
18
+ };
19
+
20
+ export type SingleclickEternalPluginTypes = {
21
+ [key in ExternalPluginIdent]: [SingleClickParams];
22
+ };
23
+
24
+ export interface SingleclickTypes
25
+ extends SingleclickPoiTypes,
26
+ SingleclickPluginTypes,
27
+ SingleclickEternalPluginTypes {
28
+ click: [SingleClickParams];
29
+ }
30
+
31
+ export type ListeningPriority = 'high' | 'low';
@@ -0,0 +1,120 @@
1
+ import { MinifestObject } from '@windy/Calendar.d';
2
+ import { Fav, LastSentDevice, SavedFav, SeenArticle } from '@windy/interfaces.d';
3
+ import { StoredTransFile } from '@windy/trans.d';
4
+ import { Timestamp } from '@windy/types.d';
5
+
6
+ import LRUCache from './lruCache';
7
+
8
+ export interface StorageData {
9
+ /**
10
+ * Number of hits for every single promo2 id.
11
+ */
12
+ promos2?: Record<string, number>;
13
+
14
+ /**
15
+ * Temp value ensures user stayed logged with an old authHash during Cordova -> Capacitor migration
16
+ */
17
+ authHash?: string;
18
+
19
+ /**
20
+ * Timestamp of last pushing settings to cloud
21
+ */
22
+ storedSettings?: number;
23
+
24
+ /**
25
+ * Timestamp of last pulling settings from cloud
26
+ */
27
+ lastSyncableUpdatedItem?: number;
28
+
29
+ UUID?: string;
30
+
31
+ webGLtest3?: { status: string; ua: string };
32
+
33
+ /**
34
+ * Timestamp when rating dialog was shown last time
35
+ */
36
+ rateDialogShown?: Timestamp;
37
+
38
+ lastSentDevice?: LastSentDevice;
39
+
40
+ /**
41
+ * Articles, user has seen on particular device
42
+ */
43
+ articles?: Record<string, SeenArticle>;
44
+
45
+ /**
46
+ * Airport detail offline cache
47
+ */
48
+ 'offline/airport'?: ReturnType<LRUCache<string>['toJSON']>;
49
+
50
+ /**
51
+ * Used by dev plugin for plugins development
52
+ */
53
+ pluginsDev?: { url: string; consent: boolean };
54
+
55
+ version?: string;
56
+
57
+ // TODO - centralize all these template strings to the logic directly in their modules
58
+
59
+ [key: `settings_${string}_ts`]: Timestamp | null;
60
+
61
+ [key: `lang/${string}.json`]: StoredTransFile | null;
62
+
63
+ [key: `favs${number}`]: Record<string, SavedFav> | null;
64
+
65
+ // TODO - remove this
66
+ [key: `favs${number}_overflowed`]: Record<string, SavedFav> | null;
67
+
68
+ [key: `favs${number}_ts`]: Timestamp | null;
69
+
70
+ [key: `recents${number}`]: Record<string, Fav> | null;
71
+
72
+ [key: `lastMinifest/${string}`]: MinifestObject | null;
73
+
74
+ /**
75
+ * Other dynamically add storage data
76
+ */
77
+ [ident: string]: unknown | null;
78
+ }
79
+
80
+ export type StorageDataKey = keyof StorageData & string;
81
+
82
+ export interface Storage {
83
+ /**
84
+ * Is storage available or not?
85
+ */
86
+ isAvbl: boolean;
87
+
88
+ /**
89
+ * Put items to the storage, using `JSON.strigify` to serialize the data
90
+ *
91
+ * @param key Key
92
+ * @param object object
93
+ * @returns
94
+ */
95
+ put: <T extends StorageDataKey>(key: T, object: StorageData[T]) => void;
96
+
97
+ /**
98
+ * Test existence of an item
99
+ *
100
+ * @param key Key
101
+ * @returns True if key is presented
102
+ */
103
+ hasKey: <T extends StorageDataKey>(key: T) => boolean;
104
+
105
+ /**
106
+ * Get item from storage, using `JSON.parse` to deserialize the data
107
+ *
108
+ * @param key Key
109
+ * @returns Data
110
+ */
111
+ get: <T extends StorageDataKey>(key: T) => StorageData[T] | null;
112
+
113
+ /**
114
+ * Removes item from a storage
115
+ *
116
+ * @param key Key
117
+ * @returns
118
+ */
119
+ remove: <T extends StorageDataKey>(key: T) => void;
120
+ }
@@ -0,0 +1,61 @@
1
+ import { Timestamp } from '@windy/types.d';
2
+ import { DataSpecifications } from '@windy/dataSpecifications.d';
3
+
4
+ /**
5
+ * Stores which have `asyncSet` function defined
6
+ */
7
+ export type AsyncStores = 'overlay' | 'product';
8
+
9
+ /**
10
+ * Return type of `store.set` method. If `asyncSet` is defined, returned type is Promise<T>, boolean for sync stores.
11
+ * See store.ts `set` method implementation for more info.
12
+ */
13
+ export type SetReturnType<T extends keyof DataSpecifications> = T extends AsyncStores
14
+ ? ReturnType<NonNullable<DataSpecifications[T]['asyncSet']>>
15
+ : boolean;
16
+
17
+ /**
18
+ * Optional options for setter
19
+ */
20
+ export interface StoreOptions {
21
+ /**
22
+ * Identifier of UI element that emitted the change (is bounced back with evented message)
23
+ */
24
+ UIident?: string;
25
+
26
+ /**
27
+ * Skip validity check
28
+ */
29
+ doNotCheckValidity?: boolean;
30
+
31
+ /**
32
+ * Force change update time
33
+ */
34
+ update?: Timestamp;
35
+
36
+ /**
37
+ * Skip saving to cloud
38
+ */
39
+ doNotSaveToCloud?: boolean;
40
+
41
+ /**
42
+ * Do not store to localStorage
43
+ */
44
+ doNotStore?: boolean;
45
+
46
+ /**
47
+ * Force to change the value, even when is the same as previous
48
+ */
49
+ forceChange?: boolean;
50
+ }
51
+
52
+ type UIIdent = string | undefined;
53
+
54
+ type UnwrappedDataSpecifications = {
55
+ [P in keyof DataSpecifications]: [DataSpecifications[P]['def'], UIIdent];
56
+ };
57
+
58
+ interface StoreTypes extends UnwrappedDataSpecifications {
59
+ _cloudSync: [];
60
+ _nativeSync: [string, unknown];
61
+ }
@@ -0,0 +1,35 @@
1
+ import { NumValue } from '@windy/types.d';
2
+ import { LatLon } from '@windy/interfaces.d';
3
+
4
+ /**
5
+ * Returned values in data RGB channels as tuple [NumValue, NumValue, NumValue]
6
+ */
7
+ export type RGBNumValues = [NumValue, NumValue, NumValue];
8
+
9
+ /**
10
+ * Possible returns from interpolator
11
+ *
12
+ * `null` - out of map
13
+ *
14
+ * `NaN` - no data value
15
+ *
16
+ * `-1` - not suitable renderer
17
+ *
18
+ * `[number,number,number]` - computed values
19
+ */
20
+ export type InterpolatorPossibleReturns = RGBNumValues | null | undefined | number;
21
+
22
+ /**
23
+ * Interpolates pixel to tuple weather values from RGB channels
24
+ */
25
+ export type PixelInterpolationFun = (
26
+ x: number,
27
+ y: number,
28
+ mercXpx?: number, // mercator coords in pixels (needed for radar and satellite)
29
+ mercYpx?: number,
30
+ ) => InterpolatorPossibleReturns;
31
+
32
+ /**
33
+ * Interpolates coordinates to tuple weather values from RGB channels
34
+ */
35
+ export type CoordsInterpolationFun = <T extends LatLon>(latLon: T) => InterpolatorPossibleReturns;
@@ -0,0 +1,55 @@
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;
@@ -0,0 +1,58 @@
1
+ import { SubscriptionInfo } from '@plugins/_shared/subscription-services/subscription-services.d';
2
+ import { User } from '@windy/dataSpecifications.d';
3
+ import { SubTier } from '@windy/types.d';
4
+
5
+ /**
6
+ * user info as it's returned from account or node users
7
+ */
8
+ export interface UserInfo {
9
+ /**
10
+ * true if user is authenticated
11
+ */
12
+ auth?: boolean;
13
+
14
+ /**
15
+ * aka userToken in storage
16
+ */
17
+ token?: string;
18
+
19
+ /**
20
+ * @deprecated
21
+ * tier level of user premium - TODO remove
22
+ */
23
+ subscription?: SubTier;
24
+
25
+ /** Detail info about subscription. It is undefined if no subscription is available for the user. */
26
+ subscriptionInfo?: SubscriptionInfo;
27
+
28
+ /**
29
+ * user as in storage definition
30
+ */
31
+ userInfo?: User;
32
+ }
33
+
34
+ /**
35
+ * @typedef {Object} LoginResponse login response as it's returned from account or node login
36
+ * @property {string} message custom message to be used in errors (or 'ok' if no error)
37
+ * @property {string} authHash as in storage definition
38
+ */
39
+
40
+ /**
41
+ * login response as it's returned from account or node login
42
+ */
43
+ export interface AccountLoginResponse {
44
+ /**
45
+ * custom message to be used in errors (or 'ok' if no error)
46
+ */
47
+ message: string;
48
+
49
+ /**
50
+ * userInfo as information to be stored
51
+ */
52
+ userInfo: UserInfo;
53
+
54
+ /**
55
+ * authHash as in storage definition
56
+ */
57
+ authHash: string;
58
+ }
@@ -4,7 +4,7 @@
4
4
  *
5
5
  * @module dataSpecifications
6
6
  */
7
- import type { DataSpecifications } from '@windy/dataSpecifications.d';
7
+ import type { DataSpecifications } from './d.ts.files/dataSpecifications.d';
8
8
  /**
9
9
  * Mother of all settings. All the user setting (except for large data structures) should go here
10
10
  */
@@ -1,4 +1,3 @@
1
- /// <reference types="@windy/declarations/windy-modules" />
2
1
  import './utils/errorLogger';
3
2
  import './leafletExt/CanvasLayer';
4
3
  import './services/params';
@@ -13,12 +12,12 @@ import './ui/loadersUI';
13
12
  import './ui/timeAnimation';
14
13
  import './ui/visibility';
15
14
  import './render/renderTile';
16
- import './render/tileLayerInstance';
15
+ import './render/tileLayer';
17
16
  import './dummyModules/detectDevice';
18
17
  import './dummyModules/log';
19
18
  import './dummyModules/promo';
20
19
  import './dummyModules/seoParser';
21
- import './map/cityLabels';
20
+ import './map/labelsLayer';
22
21
  import './map/mapGlobeCtrl';
23
22
  import { default as favs } from './dummyModules/favs';
24
23
  export { favs };
@@ -38,7 +37,7 @@ export * as picker from './map/picker';
38
37
  export * as singleclick from './map/singleclick';
39
38
  export { default as plugins } from './pluginSystem/plugins';
40
39
  export * as interpolator from './render/interpolator';
41
- export { default as particles } from './render/particleRenderers';
40
+ export { default as particleRenderers } from './render/particleRenderers';
42
41
  export * as renderUtils from './render/renderUtils';
43
42
  export * as DataTiler from './renderClasses/DataTiler';
44
43
  export { default as colors } from './services/colors';