@windycom/plugin-devtools 1.0.2-beta.2 → 1.0.5

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 (199) hide show
  1. package/README.md +5 -0
  2. package/index.mjs +3 -2
  3. package/package.json +1 -1
  4. package/publishExamples.sh +1 -1
  5. package/types/client/BindedDropDown.d.ts +14 -0
  6. package/types/{Calendar.d.ts → client/Calendar.d.ts} +4 -4
  7. package/types/client/CanvasLayer.d.ts +1 -0
  8. package/types/{Color.d.ts → client/Color.d.ts} +3 -3
  9. package/types/{DataTiler.d.ts → client/DataTiler.d.ts} +2 -2
  10. package/types/client/Detail1hCheckbox.d.ts +4 -0
  11. package/types/{ExternalSveltePlugin.d.ts → client/ExternalSveltePlugin.d.ts} +2 -1
  12. package/types/{GlObj.d.ts → client/GlObj.d.ts} +1 -1
  13. package/types/{Layer.d.ts → client/Layer.d.ts} +11 -11
  14. package/types/{Metric.d.ts → client/Metric.d.ts} +5 -5
  15. package/types/{Plugin.d.ts → client/Plugin.d.ts} +4 -2
  16. package/types/{Product.d.ts → client/Product.d.ts} +8 -8
  17. package/types/{ProductSwitch.d.ts → client/ProductSwitch.d.ts} +1 -1
  18. package/types/{Renderer.d.ts → client/Renderer.d.ts} +4 -4
  19. package/types/{Webcams.d.ts → client/Webcams.d.ts} +4 -4
  20. package/types/client/components.d.ts +1 -0
  21. package/types/client/d.ts.files/Calendar.d.ts +87 -0
  22. package/types/client/d.ts.files/CanvasLayer.d.ts +70 -0
  23. package/types/client/d.ts.files/Color.d.ts +82 -0
  24. package/types/client/d.ts.files/DataTiler.d.ts +45 -0
  25. package/types/client/d.ts.files/GlObj.d.ts +92 -0
  26. package/types/client/d.ts.files/LabelsLayer.d.ts +51 -0
  27. package/types/client/d.ts.files/LandMask.d.ts +17 -0
  28. package/types/client/d.ts.files/Layer.d.ts +184 -0
  29. package/types/client/d.ts.files/Metric.d.ts +192 -0
  30. package/types/client/d.ts.files/PoisOverlay.d.ts +27 -0
  31. package/types/client/d.ts.files/Product.d.ts +37 -0
  32. package/types/client/d.ts.files/Renderer.d.ts +23 -0
  33. package/types/client/d.ts.files/TileLayerCanvas.d.ts +78 -0
  34. package/types/client/d.ts.files/TileLayerMultiPatch.d.ts +13 -0
  35. package/types/client/d.ts.files/Webcams.d.ts +160 -0
  36. package/types/client/d.ts.files/broadcast.d.ts +177 -0
  37. package/types/client/d.ts.files/dataSpecifications.d.ts +943 -0
  38. package/types/client/d.ts.files/errorLogger.d.ts +35 -0
  39. package/types/client/d.ts.files/format.d.ts +48 -0
  40. package/types/client/d.ts.files/http.d.ts +87 -0
  41. package/types/client/d.ts.files/incomingMessages.d.ts +88 -0
  42. package/types/client/d.ts.files/lib.d.ts +74 -0
  43. package/types/client/d.ts.files/notifications.d.ts +39 -0
  44. package/types/client/d.ts.files/outgoingMessages.d.ts +75 -0
  45. package/types/client/d.ts.files/plugin-params.d.ts +236 -0
  46. package/types/client/d.ts.files/plugins.d.ts +132 -0
  47. package/types/client/d.ts.files/pois.d.ts +11 -0
  48. package/types/client/d.ts.files/products.d.ts +44 -0
  49. package/types/client/d.ts.files/rootScope.d.ts +43 -0
  50. package/types/client/d.ts.files/satellite.d.ts +50 -0
  51. package/types/client/d.ts.files/singleclick.d.ts +31 -0
  52. package/types/client/d.ts.files/storage.d.ts +120 -0
  53. package/types/client/d.ts.files/store.d.ts +61 -0
  54. package/types/client/d.ts.files/tileInterpolator.d.ts +35 -0
  55. package/types/client/d.ts.files/trans.d.ts +55 -0
  56. package/types/client/d.ts.files/user.d.ts +58 -0
  57. package/types/{dataSpecifications.d.ts → client/dataSpecifications.d.ts} +1 -1
  58. package/types/client/debugPremiumIssues.d.ts +22 -0
  59. package/types/client/embed2.d.ts +92 -0
  60. package/types/client/errorLogger.d.ts +11 -0
  61. package/types/client/externalPlugins.d.ts +6 -0
  62. package/types/{fetch.d.ts → client/fetch.d.ts} +30 -3
  63. package/types/{format.d.ts → client/format.d.ts} +2 -2
  64. package/types/{geolocation.d.ts → client/geolocation.d.ts} +11 -3
  65. package/types/client/globals.d.ts +3 -0
  66. package/types/{http.d.ts → client/http.d.ts} +2 -2
  67. package/types/client/index.d.ts +1 -0
  68. package/types/client/keyboard.d.ts +1 -0
  69. package/types/client/lib.d.ts +112 -0
  70. package/types/client/libHtml.d.ts +2 -0
  71. package/types/client/loadersUI.d.ts +1 -0
  72. package/types/client/mapGlobeCtrl.d.ts +1 -0
  73. package/types/client/mobile.d.ts +138 -0
  74. package/types/{models.d.ts → client/models.d.ts} +1 -1
  75. package/types/client/nativeStorage.d.ts +17 -0
  76. package/types/{notifications.d.ts → client/notifications.d.ts} +6 -5
  77. package/types/client/ogTags.d.ts +22 -0
  78. package/types/client/params.d.ts +2 -0
  79. package/types/{plugins.d.ts → client/plugins.d.ts} +1 -1
  80. package/types/client/pluginsCtrl.d.ts +7 -0
  81. package/types/{pois.d.ts → client/pois.d.ts} +1 -1
  82. package/types/client/products.d.ts +3 -0
  83. package/types/client/pushNotifications.d.ts +1 -0
  84. package/types/{renderers.d.ts → client/renderers.d.ts} +5 -5
  85. package/types/{reverseName.d.ts → client/reverseName.d.ts} +12 -0
  86. package/types/{rootScope.d.ts → client/rootScope.d.ts} +4 -4
  87. package/types/client/serviceWorker.d.ts +1 -0
  88. package/types/{singleclick.d.ts → client/singleclick.d.ts} +2 -2
  89. package/types/{storage.d.ts → client/storage.d.ts} +1 -1
  90. package/types/{store.d.ts → client/store.d.ts} +2 -2
  91. package/types/client/swDownloader.d.ts +16 -0
  92. package/types/client/swProxy.d.ts +4 -0
  93. package/types/client/swUtils.d.ts +16 -0
  94. package/types/{tileInterpolator.d.ts → client/tileInterpolator.d.ts} +3 -3
  95. package/types/client/timeAnimation.d.ts +1 -0
  96. package/types/{trans.d.ts → client/trans.d.ts} +3 -3
  97. package/types/client/typeGuards.d.ts +2 -0
  98. package/types/{user.d.ts → client/user.d.ts} +3 -3
  99. package/types/{utils.d.ts → client/utils.d.ts} +1 -1
  100. package/types/client/visibility.d.ts +5 -0
  101. package/types/interfaces.d.ts +54 -10
  102. package/types/leaflet.d.ts +2 -15
  103. package/types/glsl-modules.d.ts +0 -26
  104. package/types/index.d.ts +0 -1
  105. package/types/node-modules.d.ts +0 -16
  106. package/types/products.d.ts +0 -3
  107. package/types/ts-interfaces.d.ts +0 -66
  108. package/types/ts-types.d.ts +0 -43
  109. package/types/variables.d.ts +0 -238
  110. package/types/windy-modules.d.ts +0 -7
  111. /package/types/{AromeProduct.d.ts → client/AromeProduct.d.ts} +0 -0
  112. /package/types/{Bar.d.ts → client/Bar.d.ts} +0 -0
  113. /package/types/{BindedBar.d.ts → client/BindedBar.d.ts} +0 -0
  114. /package/types/{BindedCheckbox.d.ts → client/BindedCheckbox.d.ts} +0 -0
  115. /package/types/{BindedSwitch.d.ts → client/BindedSwitch.d.ts} +0 -0
  116. /package/types/{BottomSlide.d.ts → client/BottomSlide.d.ts} +0 -0
  117. /package/types/{BottomTagPlugin.d.ts → client/BottomTagPlugin.d.ts} +0 -0
  118. /package/types/{ClickHandler.d.ts → client/ClickHandler.d.ts} +0 -0
  119. /package/types/{Drag.d.ts → client/Drag.d.ts} +0 -0
  120. /package/types/{DraggableDiv.d.ts → client/DraggableDiv.d.ts} +0 -0
  121. /package/types/{DropDown.d.ts → client/DropDown.d.ts} +0 -0
  122. /package/types/{EcmwfAnalysisProduct.d.ts → client/EcmwfAnalysisProduct.d.ts} +0 -0
  123. /package/types/{EcmwfProduct.d.ts → client/EcmwfProduct.d.ts} +0 -0
  124. /package/types/{Evented.d.ts → client/Evented.d.ts} +0 -0
  125. /package/types/{GhostBox.d.ts → client/GhostBox.d.ts} +0 -0
  126. /package/types/{HrrrProducts.d.ts → client/HrrrProducts.d.ts} +0 -0
  127. /package/types/{IconProducts.d.ts → client/IconProducts.d.ts} +0 -0
  128. /package/types/{LabelsLayer.d.ts → client/LabelsLayer.d.ts} +0 -0
  129. /package/types/{LandMask.d.ts → client/LandMask.d.ts} +0 -0
  130. /package/types/{Legend.d.ts → client/Legend.d.ts} +0 -0
  131. /package/types/{LongTap.d.ts → client/LongTap.d.ts} +0 -0
  132. /package/types/{MetricClasses.d.ts → client/MetricClasses.d.ts} +0 -0
  133. /package/types/{MobileCalendar.d.ts → client/MobileCalendar.d.ts} +0 -0
  134. /package/types/{NamProducts.d.ts → client/NamProducts.d.ts} +0 -0
  135. /package/types/{OfflineMessagesClasses.d.ts → client/OfflineMessagesClasses.d.ts} +0 -0
  136. /package/types/{Overlay.d.ts → client/Overlay.d.ts} +0 -0
  137. /package/types/{OverlayClasses.d.ts → client/OverlayClasses.d.ts} +0 -0
  138. /package/types/{Particles.d.ts → client/Particles.d.ts} +0 -0
  139. /package/types/{SatelliteProduct.d.ts → client/SatelliteProduct.d.ts} +0 -0
  140. /package/types/{Scrollable.d.ts → client/Scrollable.d.ts} +0 -0
  141. /package/types/{StaticProduct.d.ts → client/StaticProduct.d.ts} +0 -0
  142. /package/types/{SveltePanePlugin.d.ts → client/SveltePanePlugin.d.ts} +0 -0
  143. /package/types/{SveltePlugin.d.ts → client/SveltePlugin.d.ts} +0 -0
  144. /package/types/{Swipe.d.ts → client/Swipe.d.ts} +0 -0
  145. /package/types/{Switch.d.ts → client/Switch.d.ts} +0 -0
  146. /package/types/{TagPlugin.d.ts → client/TagPlugin.d.ts} +0 -0
  147. /package/types/{TileLayer.d.ts → client/TileLayer.d.ts} +0 -0
  148. /package/types/{TileLayerCanvas.d.ts → client/TileLayerCanvas.d.ts} +0 -0
  149. /package/types/{TileLayerMultiPatch.d.ts → client/TileLayerMultiPatch.d.ts} +0 -0
  150. /package/types/{TimestampBar.d.ts → client/TimestampBar.d.ts} +0 -0
  151. /package/types/{Window.d.ts → client/Window.d.ts} +0 -0
  152. /package/types/{WindowPlugin.d.ts → client/WindowPlugin.d.ts} +0 -0
  153. /package/types/{baseMap.d.ts → client/baseMap.d.ts} +0 -0
  154. /package/types/{broadcast.d.ts → client/broadcast.d.ts} +0 -0
  155. /package/types/{cityLabels.d.ts → client/cityLabels.d.ts} +0 -0
  156. /package/types/{cloudSync.d.ts → client/cloudSync.d.ts} +0 -0
  157. /package/types/{colors.d.ts → client/colors.d.ts} +0 -0
  158. /package/types/{connection.d.ts → client/connection.d.ts} +0 -0
  159. /package/types/{css.d.ts → client/css.d.ts} +0 -0
  160. /package/types/{dataLoader.d.ts → client/dataLoader.d.ts} +0 -0
  161. /package/types/{detectDevice.d.ts → client/detectDevice.d.ts} +0 -0
  162. /package/types/{device.d.ts → client/device.d.ts} +0 -0
  163. /package/types/{deviceLogging.d.ts → client/deviceLogging.d.ts} +0 -0
  164. /package/types/{Favs.d.ts → client/favs.d.ts} +0 -0
  165. /package/types/{ga.d.ts → client/ga.d.ts} +0 -0
  166. /package/types/{glTileRender.d.ts → client/glTileRender.d.ts} +0 -0
  167. /package/types/{hp.d.ts → client/hp.d.ts} +0 -0
  168. /package/types/{interpolator.d.ts → client/interpolator.d.ts} +0 -0
  169. /package/types/{latestBroadcasts.d.ts → client/latestBroadcasts.d.ts} +0 -0
  170. /package/types/{layers.d.ts → client/layers.d.ts} +0 -0
  171. /package/types/{legends.d.ts → client/legends.d.ts} +0 -0
  172. /package/types/{levelUtils.d.ts → client/levelUtils.d.ts} +0 -0
  173. /package/types/{libGuard.d.ts → client/libGuard.d.ts} +0 -0
  174. /package/types/{location.d.ts → client/location.d.ts} +0 -0
  175. /package/types/{log.d.ts → client/log.d.ts} +0 -0
  176. /package/types/{lruCache.d.ts → client/lruCache.d.ts} +0 -0
  177. /package/types/{map.d.ts → client/map.d.ts} +0 -0
  178. /package/types/{metrics.d.ts → client/metrics.d.ts} +0 -0
  179. /package/types/{mobileUtils.d.ts → client/mobileUtils.d.ts} +0 -0
  180. /package/types/{offlineController.d.ts → client/offlineController.d.ts} +0 -0
  181. /package/types/{overlays.d.ts → client/overlays.d.ts} +0 -0
  182. /package/types/{particleRenderers.d.ts → client/particleRenderers.d.ts} +0 -0
  183. /package/types/{permanentPromos.d.ts → client/permanentPromos.d.ts} +0 -0
  184. /package/types/{picker.d.ts → client/picker.d.ts} +0 -0
  185. /package/types/{promo.d.ts → client/promo.d.ts} +0 -0
  186. /package/types/{query.d.ts → client/query.d.ts} +0 -0
  187. /package/types/{queryString.d.ts → client/queryString.d.ts} +0 -0
  188. /package/types/{renderCtrl.d.ts → client/renderCtrl.d.ts} +0 -0
  189. /package/types/{renderTile.d.ts → client/renderTile.d.ts} +0 -0
  190. /package/types/{renderUtils.d.ts → client/renderUtils.d.ts} +0 -0
  191. /package/types/{rhMessage.d.ts → client/rhMessage.d.ts} +0 -0
  192. /package/types/{router.d.ts → client/router.d.ts} +0 -0
  193. /package/types/{seoParser.d.ts → client/seoParser.d.ts} +0 -0
  194. /package/types/{share.d.ts → client/share.d.ts} +0 -0
  195. /package/types/{showableErrorsService.d.ts → client/showableErrorsService.d.ts} +0 -0
  196. /package/types/{subscription.d.ts → client/subscription.d.ts} +0 -0
  197. /package/types/{tileLayerInstance.d.ts → client/tileLayerInstance.d.ts} +0 -0
  198. /package/types/{timestampUtils.d.ts → client/timestampUtils.d.ts} +0 -0
  199. /package/types/{userFavs.d.ts → client/userFavs.d.ts} +0 -0
package/README.md CHANGED
@@ -1,3 +1,8 @@
1
1
  # Windy Plugins Developer tools
2
2
 
3
3
  Check out https://docs.windy-plugins.com for more information.
4
+
5
+ # CHANGELOG
6
+
7
+ - 1.0.5 - Fixing .d.ts declarations
8
+ - 1.0.0 - TS declarations for client v42
package/index.mjs CHANGED
@@ -18,8 +18,9 @@ const testLoadedPlugin = config => {
18
18
  );
19
19
 
20
20
  assert(
21
- typeof icon === 'string' && /^.$/u.test(icon),
22
- 'Plugin icon MUSt be just single emoji character',
21
+ typeof icon === 'string' &&
22
+ (icon.length === 1 || /^[\u{0000}-\u{10FFFF}]{1,4}$/u.test(icon)),
23
+ 'Plugin icon must be just single emoji character',
23
24
  );
24
25
 
25
26
  assert(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windycom/plugin-devtools",
3
- "version": "1.0.2-beta.2",
3
+ "version": "1.0.5",
4
4
  "description": "Developer tools and TS declarations for developers of Windy Plugins.",
5
5
  "main": "index.mjs",
6
6
  "module": "index.mjs",
@@ -6,7 +6,7 @@ NAME=example
6
6
  SHA=$(git rev-parse --short HEAD)
7
7
  OWNER=windycom
8
8
 
9
- DIR=dist/example05
9
+ DIR=dist/example06
10
10
 
11
11
  cd ./$DIR
12
12
  echo "Creating plugin archive..."
@@ -0,0 +1,14 @@
1
+ import { BindedSwitch } from '@windy/BindedSwitch';
2
+ import { DropDown } from '@windy/DropDown';
3
+ import type { BindedSwitchInitParams } from '@windy/BindedSwitch';
4
+ import type { DropDownInitParams } from '@windy/DropDown';
5
+ import type { DataSpecifications } from '@windy/dataSpecifications.d';
6
+ export type BindedDropDownInitParams<T extends keyof DataSpecifications> = DropDownInitParams<DataSpecifications[T]['def']> & BindedSwitchInitParams<T>;
7
+ export declare class BindedDropDown<T extends keyof DataSpecifications> extends DropDown<DataSpecifications[T]['def']> {
8
+ protected initValue: DataSpecifications[T]['def'];
9
+ protected selected: DataSpecifications[T]['def'];
10
+ bindedSwitch: BindedSwitch<T>;
11
+ constructor(params: BindedDropDownInitParams<T>);
12
+ set(value: DataSpecifications[T]['def'], _uiIdentOrNoEmit?: string | boolean | void): void;
13
+ unmount(): void;
14
+ }
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * Object containing timestamps and methods for given weather product
3
3
  */
4
- import type { CalendarDay, MinifestObject, Weekday } from '@windy/Calendar.d';
5
- import type { TimeFormatFunction } from '@windy/format.d';
6
- import type { Products } from '@windy/rootScope.d';
7
- import type { ISODateString, Path, Timestamp } from '@windy/types.d';
4
+ import type { CalendarDay, MinifestObject, Weekday } from './d.ts.files/Calendar.d';
5
+ import type { TimeFormatFunction } from './d.ts.files/format.d';
6
+ import type { Products } from './d.ts.files/rootScope.d';
7
+ import type { ISODateString, Path, Timestamp } from './d.ts.files/types.d';
8
8
  export type CalendarInitParams = Pick<Calendar, 'numOfHours' | 'minifestFile'> & {
9
9
  /**
10
10
  * Ident of product that this calendar is for
@@ -0,0 +1 @@
1
+ export {};
@@ -1,6 +1,6 @@
1
- import type { ColorGradient, ColorIdent, PluginColorIdent, RGBA, RGBString } from '@windy/Color.d';
2
- import type { StoreOptions } from '@windy/store.d';
3
- import type { NumValue } from '@windy/types.d';
1
+ import type { ColorGradient, ColorIdent, PluginColorIdent, RGBA, RGBString } from './d.ts.files/Color.d';
2
+ import type { StoreOptions } from './d.ts.files/store.d';
3
+ import type { NumValue } from './d.ts.files/types.d';
4
4
  export type ColorInitParams = Pick<Color, 'ident'> & Partial<Pick<Color, 'qualitative' | 'save'>> & {
5
5
  steps: number;
6
6
  default?: ColorGradient | null;
@@ -1,6 +1,6 @@
1
1
  import { dataLoader } from '@windy/dataLoader';
2
- import type { FullRenderParameters } from '@windy/Layer.d';
3
- import type { DataTile } from '@windy/dataLoader';
2
+ import type { FullRenderParameters } from './d.ts.files/Layer.d';
3
+ import type { DataTile } from './d.ts.files/dataLoader';
4
4
  import type { ExtendedTileParams } from './DataTiler.d';
5
5
  export interface TilePoint {
6
6
  x: number;
@@ -0,0 +1,4 @@
1
+ import { BindedCheckbox } from '@windy/BindedCheckbox';
2
+ export declare class Detail1hCheckbox extends BindedCheckbox<'detail1h'> {
3
+ toggle(): void;
4
+ }
@@ -13,7 +13,8 @@ export type LoadeExternalSveltePlugin = {
13
13
  type Config2config = {
14
14
  className: string;
15
15
  attachPoint?: string;
16
- pane?: PluginPane;
16
+ pane: PluginPane;
17
+ addMObileSliders?: boolean;
17
18
  };
18
19
  export declare class ExternalSveltePlugin extends SveltePlugin<'windy-external-plugin'> {
19
20
  ident: 'windy-external-plugin';
@@ -1,4 +1,4 @@
1
- import type { Canvas, ExtendedWebGLTexture, WebGLProgramObject } from '@windy/GlObj.d';
1
+ import type { Canvas, ExtendedWebGLTexture, WebGLProgramObject } from './d.ts.files/GlObj.d';
2
2
  /**
3
3
  * GLObj - Web GL context wrapper
4
4
  */
@@ -1,14 +1,14 @@
1
- import type { Color } from '@windy/Color';
2
- import type { FullRenderParameters, Layers, RenderParams, TransformFunction } from '@windy/Layer.d';
3
- import type { Metric } from '@windy/Metric';
4
- import type { Legend } from '@windy/Metric.d';
5
- import type { NumberedMetric } from '@windy/MetricClasses';
6
- import type { Product } from '@windy/Product';
7
- import type { DataQuality, FileSuffix } from '@windy/Product.d';
8
- import type { Renderers } from '@windy/Renderer.d';
9
- import type { WeatherParameters } from '@windy/interfaces.d';
10
- import type { Levels, Products } from '@windy/rootScope.d';
11
- import type { Timestamp } from '@windy/types';
1
+ import type { Color } from './d.ts.files/Color';
2
+ import type { FullRenderParameters, Layers, RenderParams, TransformFunction } from './d.ts.files/Layer.d';
3
+ import type { Metric } from './d.ts.files/Metric';
4
+ import type { Legend } from './d.ts.files/Metric.d';
5
+ import type { NumberedMetric } from './d.ts.files/MetricClasses';
6
+ import type { Product } from './d.ts.files/Product';
7
+ import type { DataQuality, FileSuffix } from './d.ts.files/Product.d';
8
+ import type { Renderers } from './d.ts.files/Renderer.d';
9
+ import type { WeatherParameters } from './d.ts.files/interfaces.d';
10
+ import type { Levels, Products } from './d.ts.files/rootScope.d';
11
+ import type { Timestamp } from './d.ts.files/types';
12
12
  type LayerInitParams = Pick<Layer, 'ident'> & Partial<Layer>;
13
13
  export declare class Layer<M extends Metric | undefined = Metric | undefined> {
14
14
  /**
@@ -1,8 +1,8 @@
1
- import type { Color } from '@windy/Color';
2
- import type { RGBString } from '@windy/Color.d';
3
- import type { ConvObj, Legend, LegendDescription, LegendLines, MetricIdent, MetricInitParams, MetricItem, MetricKey } from '@windy/Metric.d';
4
- import type { LoadedTranslations } from '@windy/trans.d';
5
- import type { HTMLString, NumValue } from '@windy/types.d';
1
+ import type { Color } from './d.ts.files/Color';
2
+ import type { RGBString } from './d.ts.files/Color.d';
3
+ import type { ConvObj, Legend, LegendDescription, LegendLines, MetricIdent, MetricInitParams, MetricItem, MetricKey } from './d.ts.files/Metric.d';
4
+ import type { LoadedTranslations } from './d.ts.files/trans.d';
5
+ import type { HTMLString, NumValue } from './d.ts.files/types.d';
6
6
  export declare const rtrnSelf: (x: NumValue) => NumValue;
7
7
  /**
8
8
  * # @windy/Metric
@@ -18,8 +18,10 @@ export type PluginPane =
18
18
  | 'nearest'
19
19
  /** Bottom plugin that ducks under mobile time controls (use only in exception) */
20
20
  | 'small-bottom-bottom'
21
- /** External plugin embedded to HP */
22
- | 'embedded';
21
+ /** Plugin embedded to RHbottom area on desktop (so far used only for external plugins) */
22
+ | 'embedded'
23
+ /** Fullscreen mobile panes */
24
+ | 'fullscreen-mobile';
23
25
  /** Allowed params to Plugin constructor (private and protected props are omited by default) */
24
26
  export type PluginInitParams<P extends PluginIdent> = Pick<Plugin<P>, 'ident'> & Partial<Omit<Plugin<P>, 'isLoaded' | 'isOpen' | 'load' | 'open'>>;
25
27
  export declare class Plugin<P extends PluginIdent> {
@@ -1,11 +1,11 @@
1
1
  import { Calendar } from '@windy/Calendar';
2
- import type { MinifestObject } from '@windy/Calendar.d';
3
- import type { Layers } from '@windy/Layer.d';
4
- import type { DataQuality, FileSuffix } from '@windy/Product.d';
5
- import type { HttpPayload } from '@windy/http.d';
6
- import type { LatLon } from '@windy/interfaces';
7
- import type { AcTimes, Isolines, Levels, Overlays, Products } from '@windy/rootScope.d';
8
- import type { ProductCategory, ProductIdent } from '@windy/types';
2
+ import * as http from '@windy/http';
3
+ import type { MinifestObject } from './d.ts.files/Calendar.d';
4
+ import type { Layers } from './d.ts.files/Layer.d';
5
+ import type { DataQuality, FileSuffix } from './d.ts.files/Product.d';
6
+ import type { LatLon } from './d.ts.files/interfaces';
7
+ import type { AcTimes, Isolines, Levels, Overlays, Products } from './d.ts.files/rootScope.d';
8
+ import type { ProductCategory, ProductIdent } from './d.ts.files/types';
9
9
  export type ProductInitParams = Pick<Product, 'modelName' | 'provider' | 'interval'> & Partial<Pick<Product, 'provider' | 'ident' | 'maxTileZoom' | 'animationSpeed' | 'animationSpeed1h' | 'fileSuffix' | 'fileSuffixFallback' | 'JPGtransparency' | 'PNGtransparency' | 'dataQuality' | 'betterDataQuality' | 'animation' | 'labelsTemp' | 'overlays' | 'prefferedProduct' | 'pathGenerator' | 'isolines' | 'directory' | 'category' | 'modelIdent' | 'intervalPremium' | 'server' | 'modelResolution' | 'levels' | 'logo' | 'acTimes'>> & {
10
10
  requiresInfoJson?: boolean;
11
11
  forecastSize?: number;
@@ -182,7 +182,7 @@ export declare class Product {
182
182
  };
183
183
  moveTs(moveRight: boolean, isAccu?: boolean): boolean | void;
184
184
  getMinifestUrl(): string;
185
- loadMinifest(): Promise<HttpPayload<MinifestObject>>;
185
+ loadMinifest(): Promise<http.HttpPayload<MinifestObject>>;
186
186
  open(): Promise<void | Calendar>;
187
187
  close(): void;
188
188
  /**
@@ -6,7 +6,7 @@ export type ProductSwitchInitParams = {
6
6
  export declare class ProductSwitch extends BindedSwitch<'product'> {
7
7
  showResolution: boolean;
8
8
  constructor(params: ProductSwitchInitParams);
9
- printHTML(prods?: ("radar" | "satellite" | "capAlerts" | "cams" | "icon" | "drought" | "gfs" | "ecmwf" | "ecmwfAnalysis" | "ecmwfWaves" | "gfsWaves" | "iconWaves" | "efi" | "cmems" | "fireDanger" | "activeFires" | "nems" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeReunion" | "camsEu" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "ukv" | "mblue")[]): void;
9
+ printHTML(prods?: ("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")[]): void;
10
10
  /**
11
11
  * The menu is already in a DOM since we do not modify products so often
12
12
  */
@@ -1,7 +1,7 @@
1
- import type { FullRenderParameters } from '@windy/Layer.d';
2
- import type { Renderers } from '@windy/Renderer.d';
3
- import type { InterpolatorFactory } from '@windy/interpolator';
4
- import type { BottomTagPlugins, Plugins } from '@windy/plugins.d';
1
+ import type { FullRenderParameters } from './d.ts.files/Layer.d';
2
+ import type { Renderers } from './d.ts.files/Renderer.d';
3
+ import type { InterpolatorFactory } from './d.ts.files/interpolator';
4
+ import type { BottomTagPlugins, Plugins } from './d.ts.files/plugins.d';
5
5
  type AllowedRenderPlugins = Pick<Plugins, 'radar' | 'satellite' | 'cap-alerts' | 'isolines' | 'gl-particles' | 'particles'>;
6
6
  export interface RendererInitParams {
7
7
  ident: Renderers;
@@ -1,8 +1,8 @@
1
1
  import { ClickHandler } from '@windy/ClickHandler';
2
- import type { ClickHandlerInitParams } from '@windy/ClickHandler';
3
- import type { WebcamDetail, WebcamsLoadingParams, WebcamMetadata } from '@windy/Webcams.d';
4
- import type { Plugins } from '@windy/plugins.d';
5
- import type { LatLon } from '@windy/interfaces';
2
+ import type { ClickHandlerInitParams } from './d.ts.files/ClickHandler';
3
+ import type { WebcamDetail, WebcamsLoadingParams, WebcamMetadata } from './d.ts.files/Webcams.d';
4
+ import type { Plugins } from './d.ts.files/plugins.d';
5
+ import type { LatLon } from './d.ts.files/interfaces';
6
6
  export type WebcamsInitParams = {
7
7
  useHover?: boolean;
8
8
  maxAmount?: number;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,87 @@
1
+ import { LoadedTranslations } from '@windy/trans.d';
2
+ import { Timestamp, ISODateString } from '@windy/types.d';
3
+
4
+ /**
5
+ * Main minifest object. Mother of all forecasts
6
+ */
7
+ export interface MinifestObject {
8
+ /**
9
+ * Version
10
+ */
11
+ v: string;
12
+
13
+ /**
14
+ * Array of hour moments that contain forecast data
15
+ */
16
+ dst: number[][];
17
+
18
+ /**
19
+ * Main identifier, identifiing the refTime on the backend.
20
+ */
21
+ info: string;
22
+
23
+ /**
24
+ * Reference time of forecast
25
+ */
26
+ ref: ISODateString;
27
+
28
+ /**
29
+ * Update time of the forecast
30
+ */
31
+ update: ISODateString;
32
+
33
+ /**
34
+ * In an emergency case backend can set `force` property at minifest. It breaks minifest client cache and set minifest at any circumstances
35
+ */
36
+ forced?: boolean;
37
+ }
38
+
39
+ /**
40
+ * Main Calendar Day Object
41
+ */
42
+ export interface CalendarDay {
43
+ /**
44
+ * Translation ID for week day abbreviation
45
+ */
46
+ display: keyof LoadedTranslations;
47
+
48
+ /**
49
+ * Translation ID for week day abbreviation
50
+ */
51
+ displayLong: keyof LoadedTranslations;
52
+
53
+ /**
54
+ * Start of the day
55
+ */
56
+ start: Timestamp;
57
+
58
+ /**
59
+ * End of the day
60
+ */
61
+ end: Timestamp;
62
+
63
+ /**
64
+ * Midday of the day
65
+ */
66
+ middayTs: Timestamp;
67
+
68
+ /**
69
+ * Day of the month
70
+ */
71
+ day: number;
72
+
73
+ /**
74
+ * month
75
+ */
76
+ month: number;
77
+
78
+ /**
79
+ * year
80
+ */
81
+ year: number;
82
+ }
83
+
84
+ /**
85
+ * Valid translation keys
86
+ */
87
+ export type Weekday = 'SUN' | 'MON' | 'TUE' | 'WED' | 'THU' | 'FRI' | 'SAT';
@@ -0,0 +1,70 @@
1
+ export class CanvasLayer extends L.Layer {
2
+ targetPane?:
3
+ | 'mapPane'
4
+ | 'tilePane'
5
+ | 'overlayPane'
6
+ | 'objectsPane'
7
+ | 'popupPane'
8
+ | 'shadowPane'
9
+ | 'markerPane';
10
+ _showCanvasOn?: boolean;
11
+ failed?: boolean;
12
+ _canvas?: L.CanvasElement | null;
13
+ _center?: L.LatLng;
14
+ _zoom?: number;
15
+ _frame?: number | null;
16
+ wasOnZoom?: boolean;
17
+ options: L.LayerOptions & {
18
+ disableAutoReset: boolean;
19
+ padding: number;
20
+ };
21
+
22
+ initialize(this: this, options?: L.LayerOptions): void;
23
+ onResizeCanvas(this: this, width: number, height: number): void;
24
+ showCanvas(this: this, on: boolean): void;
25
+ reset(this: this): void;
26
+ canvasDisplay(this: this, enable: boolean): void;
27
+ getCanvas(this: this): L.CanvasElement | undefined | null;
28
+ redraw(this: this): void;
29
+
30
+ _resize(this: this, event: L.ResizeEvent): void;
31
+ _animateZoom(this: this, e: L.ZoomAnimEvent): void;
32
+ _onZoom(this: this): void;
33
+ _onZoomStart(this: this): void;
34
+ _onZoomEnd(this: this): void;
35
+ _moveEnd(this: this): void;
36
+ _reset(this: this): void;
37
+ _redraw(this: this): void;
38
+ _updateTransform(center: L.LatLng, zoom: number): void;
39
+
40
+ /** TODO empty by default */
41
+ onInit(this: this): void;
42
+
43
+ /** TODO true by default */
44
+ onCreateCanvas(this: this, canvas?: HTMLElement): boolean;
45
+
46
+ /** TODO empty by default */
47
+ onCanvasFailed(this: this): void;
48
+
49
+ /** TODO empty by default */
50
+ onRemoveCanvas(this: this, canvas?: HTMLElement): void;
51
+
52
+ /** TODO empty by default */
53
+ onMoveEnd(this: this): void;
54
+
55
+ /** TODO empty by default */
56
+ onZoomEnd(this: this): void;
57
+
58
+ /** TODO empty by default */
59
+ onReset(this: this): void;
60
+
61
+ // Just this typings rewrites of leaflet methods
62
+ onAdd(this: this, map: L.Map): this;
63
+ addTo(this: this, map: L.Map): this;
64
+ onRemove(this: this, map: L.Map): this;
65
+
66
+ onContextLost(): void;
67
+ onContextRestored(): void;
68
+ onContextCreationError(e: WebGLContextEvent): void;
69
+ canvasHooks(canvas: L.CanvasElement | null | undefined, on: boolean): void;
70
+ }
@@ -0,0 +1,82 @@
1
+ import { NumValue } from '@windy/types.d';
2
+
3
+ export type RGBA = [number, number, number, number];
4
+
5
+ export type YUVA = [number, number, number, number];
6
+
7
+ export type ColorGradient = [NumValue, RGBA][];
8
+
9
+ /**
10
+ * 'rgb(200,0,150)'
11
+ */
12
+ export type RGBString = string;
13
+
14
+ /**
15
+ * 'rgba(200,0,150,1)'
16
+ */
17
+ export type RGBAString = string;
18
+
19
+ export type ColorIdent =
20
+ | 'temp'
21
+ | 'wind'
22
+ | 'rh'
23
+ | 'pressure'
24
+ | 'cclAltitude'
25
+ | 'altitude'
26
+ | 'deg0'
27
+ | 'levels'
28
+ | 'rain'
29
+ | 'ptype'
30
+ | 'rainClouds'
31
+ | 'clouds'
32
+ | 'lclouds'
33
+ | 'hclouds'
34
+ | 'mclouds'
35
+ | 'cape'
36
+ | 'lightDensity'
37
+ | 'cbase'
38
+ | 'snow'
39
+ | 'rainAccu'
40
+ | 'waves'
41
+ | 'currents'
42
+ | 'currentsTide'
43
+ | 'visibility'
44
+ | 'gtco3'
45
+ | 'aod550'
46
+ | 'pm2p5'
47
+ | 'no2'
48
+ | 'tcso2'
49
+ | 'go3'
50
+ | 'cosc'
51
+ | 'dust'
52
+ | 'satellite'
53
+ | 'radar'
54
+ | 'fog'
55
+ | 'justGray'
56
+ | 'efiWind'
57
+ | 'efiTemp'
58
+ | 'efiRain'
59
+ | 'moistureAnom40'
60
+ | 'moistureAnom100'
61
+ | 'drought40'
62
+ | 'drought100'
63
+ | 'soilMoisture40'
64
+ | 'soilMoisture100'
65
+ | 'fwi'
66
+ | 'dfm10h'
67
+ | 'solarpower'
68
+ | 'uvindex'
69
+ | 'turbulence'
70
+ | 'icing'
71
+ | 'wetbulbtemp';
72
+
73
+ type PluginColorIdent =
74
+ | 'airQ'
75
+ | 'windDetail'
76
+ | 'wavesDetail'
77
+ | 'periodDetail'
78
+ | 'altitudeDetail'
79
+ | 'visibilityDetail'
80
+ | 'dewpointSpreadDetail'
81
+ | 'blitz'
82
+ | 'radiation';
@@ -0,0 +1,45 @@
1
+ import { MapCoordinates } from '@windy/dataSpecifications.d';
2
+
3
+ export interface TilePoint {
4
+ x: number;
5
+ y: number;
6
+ z: number;
7
+ }
8
+
9
+ export interface ExtendedTileParams extends MapCoordinates {
10
+ /**
11
+ * => bounds.min.x of map.getPixelBounds();
12
+ */
13
+ pixelOriginX: number;
14
+
15
+ /**
16
+ * => bounds.min.y of map.getPixelBounds();
17
+ */
18
+ pixelOriginY: number;
19
+
20
+ /**
21
+ * Data zoom
22
+ */
23
+ dZoom: number;
24
+
25
+ /**
26
+ * Size of map in piels
27
+ */
28
+ width: number;
29
+
30
+ /**
31
+ * Size of map in pxels
32
+ */
33
+ height: number;
34
+
35
+ /**
36
+ * Coords of original unwrapped map tiles
37
+ * basicaly map.getPixelBounds();
38
+ */
39
+ origTiles: {
40
+ minX: number;
41
+ minY: number;
42
+ maxX: number;
43
+ maxY: number;
44
+ };
45
+ }
@@ -0,0 +1,92 @@
1
+ import type { Texture2D } from 'plugins/_shared/gl-lib/gl-lib';
2
+ import type {
3
+ Mat2,
4
+ Mat2d,
5
+ Mat3,
6
+ Mat4,
7
+ Quat,
8
+ Quat2,
9
+ Vec2,
10
+ Vec3,
11
+ Vec4,
12
+ } from '@plugins/globe/gl-matrix/types';
13
+
14
+ export interface CustomError extends Error {
15
+ contextLost?: boolean;
16
+ isVertexShader?: boolean;
17
+ name: string;
18
+ full?: string;
19
+ }
20
+
21
+ // export type WebGLProgramObject = {
22
+ // [whatever: string]: any;
23
+ // };
24
+
25
+ export type UniformName = `u${string}`;
26
+
27
+ export type AttributeName = `a${string}`;
28
+
29
+ export type SamplerName = `s${string}`;
30
+
31
+ export type WebGLProgramAttributes = {
32
+ [attribute: AttributeName]: number;
33
+ };
34
+
35
+ export type WebGLProgramUniforms = {
36
+ [uniform: UniformName]: WebGLUniformLocation | null;
37
+ [sampler: SamplerName]: WebGLUniformLocation | null;
38
+ };
39
+
40
+ export type WebGLProgramParams = WebGLProgramAttributes & WebGLProgramUniforms;
41
+
42
+ export type AnyUniform = number | Vec2 | Vec3 | Vec4 | Mat2 | Mat2d | Mat3 | Mat4 | Quat | Quat2;
43
+
44
+ export type ShaderPars = {
45
+ uVPars0?: Vec4;
46
+ uVPars1?: Vec4;
47
+ uVPars2?: Vec4;
48
+
49
+ uMatRot?: Mat3;
50
+
51
+ uPars0?: Vec4;
52
+ uPars1?: Vec4;
53
+ } & {
54
+ [uniform: UniformName]: AnyUniform;
55
+ [uniform: SamplerName]: Texture2D | WebGLTexture | null;
56
+ };
57
+
58
+ export type WebGLProgramObject = {
59
+ program: WebGLProgram | null;
60
+ aPos?: number;
61
+ variantI?: number; // property added in VisualizerShader.compile()
62
+ } & WebGLProgramParams;
63
+
64
+ export interface ExtendedWebGLTexture extends WebGLTexture {
65
+ _width?: GLsizei;
66
+ _height?: GLsizei;
67
+ _format?: GLenum;
68
+ }
69
+
70
+ /**
71
+ * Canvas as HTML element with added properties
72
+ */
73
+ // export interface Canvas extends HTMLCanvasElement {
74
+ // cssWidth: number;
75
+ // cssHeight: number;
76
+ // cssHeightInner: number;
77
+ // pxRatio: number;
78
+ // heightInner: number;
79
+ // }
80
+
81
+ export type HTMLCanvasExtended = HTMLCanvasElement & {
82
+ cssWidth: number;
83
+ cssHeight: number;
84
+ cssHeightInner: number;
85
+ pxRatio: number;
86
+ heightInner: number;
87
+ };
88
+
89
+ /**
90
+ * HTML canvas element or HTML canvas element with added properties
91
+ */
92
+ export type Canvas = HTMLCanvasElement | HTMLCanvasExtended;