@aguacerowx/react-native 0.0.53 → 0.0.54

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 (261) hide show
  1. package/LICENSE +21 -0
  2. package/android/src/main/java/com/aguacerowx/reactnative/NexradRadarLayerView.java +14 -2
  3. package/android/src/main/java/com/aguacerowx/reactnative/WeatherFrameProcessorModule.java +77 -0
  4. package/index.js +1 -1
  5. package/ios/WeatherFrameProcessorModule.m +19 -15
  6. package/ios/WeatherFrameProcessorModule.swift +65 -0
  7. package/lib/commonjs/AguaceroContext.js +0 -4
  8. package/lib/commonjs/AguaceroContext.js.map +1 -1
  9. package/lib/commonjs/GridRenderLayer.js +62 -76
  10. package/lib/commonjs/GridRenderLayer.js.map +1 -1
  11. package/lib/commonjs/MapManager.js +110 -224
  12. package/lib/commonjs/MapManager.js.map +1 -1
  13. package/lib/commonjs/MapRegistry.js +21 -33
  14. package/lib/commonjs/MapRegistry.js.map +1 -1
  15. package/lib/commonjs/NexradRadarLayer.android.js +28 -100
  16. package/lib/commonjs/NexradRadarLayer.android.js.map +1 -1
  17. package/lib/commonjs/NexradRadarLayer.ios.js +26 -97
  18. package/lib/commonjs/NexradRadarLayer.ios.js.map +1 -1
  19. package/lib/commonjs/NexradSitesMapLayer.js +41 -61
  20. package/lib/commonjs/NexradSitesMapLayer.js.map +1 -1
  21. package/lib/commonjs/SatelliteLayer.android.js +26 -38
  22. package/lib/commonjs/SatelliteLayer.android.js.map +1 -1
  23. package/lib/commonjs/SatelliteLayer.ios.js +30 -42
  24. package/lib/commonjs/SatelliteLayer.ios.js.map +1 -1
  25. package/lib/commonjs/StyleApplicator.js +129 -175
  26. package/lib/commonjs/StyleApplicator.js.map +1 -1
  27. package/lib/commonjs/WeatherLayerManager.js +995 -1646
  28. package/lib/commonjs/WeatherLayerManager.js.map +1 -1
  29. package/lib/commonjs/aguaceroCoreDebugHooks.js +58 -130
  30. package/lib/commonjs/aguaceroCoreDebugHooks.js.map +1 -1
  31. package/lib/commonjs/aguaceroRnDebug.js +147 -288
  32. package/lib/commonjs/aguaceroRnDebug.js.map +1 -1
  33. package/lib/commonjs/cdnAuthenticatedFetch.js +104 -0
  34. package/lib/commonjs/cdnAuthenticatedFetch.js.map +1 -0
  35. package/lib/commonjs/dispatchViewManagerCommandCompat.js +51 -88
  36. package/lib/commonjs/dispatchViewManagerCommandCompat.js.map +1 -1
  37. package/lib/commonjs/gridCdnAuth.js +41 -50
  38. package/lib/commonjs/gridCdnAuth.js.map +1 -1
  39. package/lib/commonjs/index.js +14 -0
  40. package/lib/commonjs/index.js.map +1 -1
  41. package/lib/commonjs/nexrad/nexradAndroidController.js +851 -863
  42. package/lib/commonjs/nexrad/nexradAndroidController.js.map +1 -1
  43. package/lib/commonjs/nexrad/nexradCrossSectionSampleAtLatLon.bundled.js +62 -85
  44. package/lib/commonjs/nexrad/nexradCrossSectionSampleAtLatLon.bundled.js.map +1 -1
  45. package/lib/commonjs/nexrad/nexradDiag.js +32 -148
  46. package/lib/commonjs/nexrad/nexradDiag.js.map +1 -1
  47. package/lib/commonjs/nexrad/nexradLevel2Keys.js +261 -0
  48. package/lib/commonjs/nexrad/nexradLevel2Keys.js.map +1 -0
  49. package/lib/commonjs/nexrad/nexradLutBuild.js +64 -111
  50. package/lib/commonjs/nexrad/nexradLutBuild.js.map +1 -1
  51. package/lib/commonjs/nexrad/nexradMapboxFrameOpts.bundled.js +136 -164
  52. package/lib/commonjs/nexrad/nexradMapboxFrameOpts.bundled.js.map +1 -1
  53. package/lib/commonjs/nexrad/nexradSdkImports.js +51 -0
  54. package/lib/commonjs/nexrad/nexradSdkImports.js.map +1 -0
  55. package/lib/commonjs/nexrad/radarArchiveCore.bundled.js +2848 -4455
  56. package/lib/commonjs/nexrad/radarArchiveCore.bundled.js.map +1 -1
  57. package/lib/commonjs/nexrad/radarDecode.worker.bundled.js +445 -648
  58. package/lib/commonjs/nexrad/radarDecode.worker.bundled.js.map +1 -1
  59. package/lib/commonjs/nexrad/radarFrameGpuMatch.bundled.js +52 -68
  60. package/lib/commonjs/nexrad/radarFrameGpuMatch.bundled.js.map +1 -1
  61. package/lib/commonjs/nexradNativeCommandIds.js +24 -0
  62. package/lib/commonjs/nexradNativeCommandIds.js.map +1 -0
  63. package/lib/commonjs/nws/NwsAlertsOverlay.android.js.map +1 -1
  64. package/lib/commonjs/nws/NwsAlertsOverlay.ios.js.map +1 -1
  65. package/lib/commonjs/nws/NwsAlertsOverlay.js +3 -3
  66. package/lib/commonjs/nws/NwsAlertsOverlay.js.map +1 -1
  67. package/lib/commonjs/nws/NwsAlertsOverlay.native.js +235 -361
  68. package/lib/commonjs/nws/NwsAlertsOverlay.native.js.map +1 -1
  69. package/lib/commonjs/nws/eventSourceRnPolyfill.js +92 -146
  70. package/lib/commonjs/nws/eventSourceRnPolyfill.js.map +1 -1
  71. package/lib/commonjs/nws/nwsAndroidConstants.js +2 -8
  72. package/lib/commonjs/nws/nwsAndroidConstants.js.map +1 -1
  73. package/lib/commonjs/satellite/satelliteAndroidController.js +117 -202
  74. package/lib/commonjs/satellite/satelliteAndroidController.js.map +1 -1
  75. package/lib/commonjs/satelliteBridgeDiag.js +3 -13
  76. package/lib/commonjs/satelliteBridgeDiag.js.map +1 -1
  77. package/lib/commonjs/satelliteRnDebug.js +117 -218
  78. package/lib/commonjs/satelliteRnDebug.js.map +1 -1
  79. package/lib/module/AguaceroContext.js +2 -7
  80. package/lib/module/AguaceroContext.js.map +1 -1
  81. package/lib/module/GridRenderLayer.js +66 -80
  82. package/lib/module/GridRenderLayer.js.map +1 -1
  83. package/lib/module/MapManager.js +125 -239
  84. package/lib/module/MapManager.js.map +1 -1
  85. package/lib/module/MapRegistry.js +21 -33
  86. package/lib/module/MapRegistry.js.map +1 -1
  87. package/lib/module/NexradRadarLayer.android.js +32 -104
  88. package/lib/module/NexradRadarLayer.android.js.map +1 -1
  89. package/lib/module/NexradRadarLayer.ios.js +30 -101
  90. package/lib/module/NexradRadarLayer.ios.js.map +1 -1
  91. package/lib/module/NexradSitesMapLayer.js +44 -63
  92. package/lib/module/NexradSitesMapLayer.js.map +1 -1
  93. package/lib/module/SatelliteLayer.android.js +32 -44
  94. package/lib/module/SatelliteLayer.android.js.map +1 -1
  95. package/lib/module/SatelliteLayer.ios.js +36 -48
  96. package/lib/module/SatelliteLayer.ios.js.map +1 -1
  97. package/lib/module/StyleApplicator.js +144 -191
  98. package/lib/module/StyleApplicator.js.map +1 -1
  99. package/lib/module/WeatherLayerManager.js +1024 -1675
  100. package/lib/module/WeatherLayerManager.js.map +1 -1
  101. package/lib/module/aguaceroCoreDebugHooks.js +59 -130
  102. package/lib/module/aguaceroCoreDebugHooks.js.map +1 -1
  103. package/lib/module/aguaceroRnDebug.js +151 -292
  104. package/lib/module/aguaceroRnDebug.js.map +1 -1
  105. package/lib/module/cdnAuthenticatedFetch.js +97 -0
  106. package/lib/module/cdnAuthenticatedFetch.js.map +1 -0
  107. package/lib/module/dispatchViewManagerCommandCompat.js +52 -90
  108. package/lib/module/dispatchViewManagerCommandCompat.js.map +1 -1
  109. package/lib/module/gridCdnAuth.js +38 -50
  110. package/lib/module/gridCdnAuth.js.map +1 -1
  111. package/lib/module/index.js +9 -7
  112. package/lib/module/index.js.map +1 -1
  113. package/lib/module/nexrad/nexradAndroidController.js +865 -876
  114. package/lib/module/nexrad/nexradAndroidController.js.map +1 -1
  115. package/lib/module/nexrad/nexradCrossSectionSampleAtLatLon.bundled.js +62 -85
  116. package/lib/module/nexrad/nexradCrossSectionSampleAtLatLon.bundled.js.map +1 -1
  117. package/lib/module/nexrad/nexradDiag.js +31 -145
  118. package/lib/module/nexrad/nexradDiag.js.map +1 -1
  119. package/lib/module/nexrad/nexradLevel2Keys.js +245 -0
  120. package/lib/module/nexrad/nexradLevel2Keys.js.map +1 -0
  121. package/lib/module/nexrad/nexradLutBuild.js +64 -110
  122. package/lib/module/nexrad/nexradLutBuild.js.map +1 -1
  123. package/lib/module/nexrad/nexradMapboxFrameOpts.bundled.js +136 -163
  124. package/lib/module/nexrad/nexradMapboxFrameOpts.bundled.js.map +1 -1
  125. package/lib/module/nexrad/nexradSdkImports.js +4 -0
  126. package/lib/module/nexrad/nexradSdkImports.js.map +1 -0
  127. package/lib/module/nexrad/radarArchiveCore.bundled.js +2839 -4448
  128. package/lib/module/nexrad/radarArchiveCore.bundled.js.map +1 -1
  129. package/lib/module/nexrad/radarDecode.worker.bundled.js +445 -648
  130. package/lib/module/nexrad/radarDecode.worker.bundled.js.map +1 -1
  131. package/lib/module/nexrad/radarFrameGpuMatch.bundled.js +50 -66
  132. package/lib/module/nexrad/radarFrameGpuMatch.bundled.js.map +1 -1
  133. package/lib/module/nexradNativeCommandIds.js +18 -0
  134. package/lib/module/nexradNativeCommandIds.js.map +1 -0
  135. package/lib/module/nws/NwsAlertsOverlay.android.js +1 -1
  136. package/lib/module/nws/NwsAlertsOverlay.android.js.map +1 -1
  137. package/lib/module/nws/NwsAlertsOverlay.ios.js +1 -1
  138. package/lib/module/nws/NwsAlertsOverlay.ios.js.map +1 -1
  139. package/lib/module/nws/NwsAlertsOverlay.js +5 -5
  140. package/lib/module/nws/NwsAlertsOverlay.js.map +1 -1
  141. package/lib/module/nws/NwsAlertsOverlay.native.js +248 -373
  142. package/lib/module/nws/NwsAlertsOverlay.native.js.map +1 -1
  143. package/lib/module/nws/eventSourceRnPolyfill.js +92 -146
  144. package/lib/module/nws/eventSourceRnPolyfill.js.map +1 -1
  145. package/lib/module/nws/nwsAndroidConstants.js +2 -8
  146. package/lib/module/nws/nwsAndroidConstants.js.map +1 -1
  147. package/lib/module/satellite/satelliteAndroidController.js +123 -208
  148. package/lib/module/satellite/satelliteAndroidController.js.map +1 -1
  149. package/lib/module/satelliteBridgeDiag.js +3 -13
  150. package/lib/module/satelliteBridgeDiag.js.map +1 -1
  151. package/lib/module/satelliteRnDebug.js +123 -223
  152. package/lib/module/satelliteRnDebug.js.map +1 -1
  153. package/lib/typescript/AguaceroContext.d.ts +0 -4
  154. package/lib/typescript/AguaceroContext.d.ts.map +1 -1
  155. package/lib/typescript/GridRenderLayer.d.ts.map +1 -1
  156. package/lib/typescript/MapManager.d.ts +0 -12
  157. package/lib/typescript/MapManager.d.ts.map +1 -1
  158. package/lib/typescript/MapRegistry.d.ts +10 -12
  159. package/lib/typescript/MapRegistry.d.ts.map +1 -1
  160. package/lib/typescript/NexradRadarLayer.android.d.ts.map +1 -1
  161. package/lib/typescript/NexradRadarLayer.ios.d.ts.map +1 -1
  162. package/lib/typescript/NexradSitesMapLayer.d.ts +4 -10
  163. package/lib/typescript/NexradSitesMapLayer.d.ts.map +1 -1
  164. package/lib/typescript/SatelliteLayer.android.d.ts.map +1 -1
  165. package/lib/typescript/SatelliteLayer.ios.d.ts.map +1 -1
  166. package/lib/typescript/StyleApplicator.d.ts +1 -1
  167. package/lib/typescript/StyleApplicator.d.ts.map +1 -1
  168. package/lib/typescript/WeatherLayerManager.d.ts.map +1 -1
  169. package/lib/typescript/aguaceroCoreDebugHooks.d.ts +2 -9
  170. package/lib/typescript/aguaceroCoreDebugHooks.d.ts.map +1 -1
  171. package/lib/typescript/aguaceroRnDebug.d.ts +47 -66
  172. package/lib/typescript/aguaceroRnDebug.d.ts.map +1 -1
  173. package/lib/typescript/cdnAuthenticatedFetch.d.ts +10 -0
  174. package/lib/typescript/cdnAuthenticatedFetch.d.ts.map +1 -0
  175. package/lib/typescript/dispatchViewManagerCommandCompat.d.ts +1 -17
  176. package/lib/typescript/dispatchViewManagerCommandCompat.d.ts.map +1 -1
  177. package/lib/typescript/gridCdnAuth.d.ts +16 -21
  178. package/lib/typescript/gridCdnAuth.d.ts.map +1 -1
  179. package/lib/typescript/index.d.ts +1 -0
  180. package/lib/typescript/nexrad/nexradAndroidController.d.ts +39 -89
  181. package/lib/typescript/nexrad/nexradAndroidController.d.ts.map +1 -1
  182. package/lib/typescript/nexrad/nexradCrossSectionSampleAtLatLon.bundled.d.ts +2 -1
  183. package/lib/typescript/nexrad/nexradCrossSectionSampleAtLatLon.bundled.d.ts.map +1 -1
  184. package/lib/typescript/nexrad/nexradDiag.d.ts +13 -101
  185. package/lib/typescript/nexrad/nexradDiag.d.ts.map +1 -1
  186. package/lib/typescript/nexrad/nexradLevel2Keys.d.ts +36 -0
  187. package/lib/typescript/nexrad/nexradLevel2Keys.d.ts.map +1 -0
  188. package/lib/typescript/nexrad/nexradLutBuild.d.ts +3 -10
  189. package/lib/typescript/nexrad/nexradLutBuild.d.ts.map +1 -1
  190. package/lib/typescript/nexrad/nexradMapboxFrameOpts.bundled.d.ts +4 -3
  191. package/lib/typescript/nexrad/nexradMapboxFrameOpts.bundled.d.ts.map +1 -1
  192. package/lib/typescript/nexrad/nexradSdkImports.d.ts +2 -0
  193. package/lib/typescript/nexrad/nexradSdkImports.d.ts.map +1 -0
  194. package/lib/typescript/nexrad/radarArchiveCore.bundled.d.ts +12 -7
  195. package/lib/typescript/nexrad/radarArchiveCore.bundled.d.ts.map +1 -1
  196. package/lib/typescript/nexrad/radarDecode.worker.bundled.d.ts +20 -20
  197. package/lib/typescript/nexrad/radarDecode.worker.bundled.d.ts.map +1 -1
  198. package/lib/typescript/nexrad/radarFrameGpuMatch.bundled.d.ts +4 -3
  199. package/lib/typescript/nexrad/radarFrameGpuMatch.bundled.d.ts.map +1 -1
  200. package/lib/typescript/nexradNativeCommandIds.d.ts +2 -0
  201. package/lib/typescript/nexradNativeCommandIds.d.ts.map +1 -0
  202. package/lib/typescript/nws/NwsAlertsOverlay.native.d.ts +6 -17
  203. package/lib/typescript/nws/NwsAlertsOverlay.native.d.ts.map +1 -1
  204. package/lib/typescript/nws/eventSourceRnPolyfill.d.ts +0 -3
  205. package/lib/typescript/nws/eventSourceRnPolyfill.d.ts.map +1 -1
  206. package/lib/typescript/nws/nwsAndroidConstants.d.ts +0 -5
  207. package/lib/typescript/nws/nwsAndroidConstants.d.ts.map +1 -1
  208. package/lib/typescript/satellite/satelliteAndroidController.d.ts +9 -47
  209. package/lib/typescript/satellite/satelliteAndroidController.d.ts.map +1 -1
  210. package/lib/typescript/satelliteBridgeDiag.d.ts +1 -5
  211. package/lib/typescript/satelliteBridgeDiag.d.ts.map +1 -1
  212. package/lib/typescript/satelliteRnDebug.d.ts +24 -30
  213. package/lib/typescript/satelliteRnDebug.d.ts.map +1 -1
  214. package/package.json +75 -74
  215. package/src/AguaceroContext.js +1 -7
  216. package/src/GridRenderLayer.js +1 -128
  217. package/src/MapManager.js +1 -277
  218. package/src/MapRegistry.js +1 -56
  219. package/src/NexradRadarLayer.android.js +1 -121
  220. package/src/NexradRadarLayer.ios.js +1 -115
  221. package/src/NexradSitesMapLayer.js +1 -75
  222. package/src/SatelliteLayer.android.js +1 -63
  223. package/src/SatelliteLayer.ios.js +1 -70
  224. package/src/StyleApplicator.js +1 -241
  225. package/src/WeatherLayerManager.js +1 -2045
  226. package/src/aguaceroCoreDebugHooks.js +1 -142
  227. package/src/aguaceroRnDebug.js +1 -336
  228. package/src/cdnAuthenticatedFetch.js +1 -0
  229. package/src/dispatchViewManagerCommandCompat.js +1 -100
  230. package/src/gridCdnAuth.js +1 -56
  231. package/src/index.js +1 -27
  232. package/src/nexrad/nexradAndroidController.js +1 -1078
  233. package/src/nexrad/nexradCrossSectionSampleAtLatLon.bundled.js +1 -91
  234. package/src/nexrad/nexradDiag.js +1 -150
  235. package/src/nexrad/nexradLevel2Keys.js +1 -0
  236. package/src/nexrad/nexradLutBuild.js +1 -126
  237. package/src/nexrad/nexradMapboxFrameOpts.bundled.js +1 -245
  238. package/src/nexrad/nexradSdkImports.js +1 -0
  239. package/src/nexrad/radarArchiveCore.bundled.js +1 -7085
  240. package/src/nexrad/radarDecode.worker.bundled.js +1 -813
  241. package/src/nexrad/radarFrameGpuMatch.bundled.js +1 -79
  242. package/src/nexradNativeCommandIds.js +1 -0
  243. package/src/nws/NwsAlertsOverlay.android.js +1 -1
  244. package/src/nws/NwsAlertsOverlay.ios.js +1 -1
  245. package/src/nws/NwsAlertsOverlay.js +1 -7
  246. package/src/nws/NwsAlertsOverlay.native.js +1 -463
  247. package/src/nws/eventSourceRnPolyfill.js +7 -193
  248. package/src/nws/nwsAndroidConstants.js +1 -8
  249. package/src/satellite/satelliteAndroidController.js +1 -257
  250. package/src/satelliteBridgeDiag.js +1 -15
  251. package/src/satelliteRnDebug.js +1 -269
  252. package/lib/commonjs/nexrad/nexradNativeCommandIds.js +0 -51
  253. package/lib/commonjs/nexrad/nexradNativeCommandIds.js.map +0 -1
  254. package/lib/module/nexrad/nexradNativeCommandIds.js +0 -44
  255. package/lib/module/nexrad/nexradNativeCommandIds.js.map +0 -1
  256. package/lib/typescript/nexrad/nexradNativeCommandIds.d.ts +0 -9
  257. package/lib/typescript/nexrad/nexradNativeCommandIds.d.ts.map +0 -1
  258. package/src/nexrad/nexradNativeCommandIds.js +0 -44
  259. /package/lib/commonjs/{nexrad/nexradSitesUs.json → nexradSitesUs.json} +0 -0
  260. /package/lib/module/{nexrad/nexradSitesUs.json → nexradSitesUs.json} +0 -0
  261. /package/src/{nexrad/nexradSitesUs.json → nexradSitesUs.json} +0 -0
@@ -1,101 +1,87 @@
1
- // packages/react-native/src/GridRenderLayer.js
2
-
3
- import React, { useRef, useImperativeHandle, forwardRef } from 'react';
4
- import { UIManager, findNodeHandle, StyleSheet } from 'react-native';
5
- import GridRenderView from './GridRenderLayerNativeComponent';
6
- const NATIVE_COMPONENT_NAME = 'GridRenderLayer';
7
- export const GridRenderLayer = /*#__PURE__*/forwardRef((props, ref) => {
8
- const nativeRef = useRef(null);
9
- const getCommandId = commandName => {
10
- try {
11
- const config = UIManager.getViewManagerConfig(NATIVE_COMPONENT_NAME);
12
- return config?.Commands?.[commandName] ?? null;
13
- } catch {
14
- return null;
15
- }
16
- };
17
- useImperativeHandle(ref, () => ({
18
- updateGeometry: (corners, gridDef) => {
19
- if (!nativeRef.current) return;
20
- const commandId = getCommandId('updateGeometry');
21
- if (commandId == null) return;
22
- const handle = findNodeHandle(nativeRef.current);
23
- UIManager.dispatchViewManagerCommand(handle, commandId, [corners, gridDef]);
1
+ import f, { useRef as g, useImperativeHandle as h, forwardRef as C } from "react";
2
+ import { UIManager as a, findNodeHandle as u, StyleSheet as p } from "react-native";
3
+ import N from "./GridRenderLayerNativeComponent";
4
+ const w = "GridRenderLayer";
5
+ export const GridRenderLayer = /*#__PURE__*/C((l, b) => {
6
+ const r = g(null),
7
+ n = e => {
8
+ try {
9
+ return a.getViewManagerConfig(w)?.Commands?.[e] ?? null;
10
+ } catch {
11
+ return null;
12
+ }
13
+ };
14
+ return h(b, () => ({
15
+ updateGeometry: (e, t) => {
16
+ if (!r.current) return;
17
+ const c = n("updateGeometry");
18
+ if (c == null) return;
19
+ const o = u(r.current);
20
+ a.dispatchViewManagerCommand(o, c, [e, t]);
24
21
  },
25
- setVariable: variableName => {
26
- if (!nativeRef.current) return;
27
- const commandId = getCommandId('setVariable');
28
- if (commandId == null) return;
29
- UIManager.dispatchViewManagerCommand(findNodeHandle(nativeRef.current), commandId, [variableName]);
22
+ setVariable: e => {
23
+ if (!r.current) return;
24
+ const t = n("setVariable");
25
+ t != null && a.dispatchViewManagerCommand(u(r.current), t, [e]);
30
26
  },
31
- updateDataTextureFromFile: (filePath, nx, ny, scale, offset, missing, scaleType) => {
32
- if (!nativeRef.current) return;
33
- const commandId = getCommandId('updateDataTexture');
34
- if (commandId == null) return;
35
- UIManager.dispatchViewManagerCommand(findNodeHandle(nativeRef.current), commandId, [filePath, Number(nx), Number(ny), Number(scale), Number(offset), Number(missing), scaleType || 'linear']);
27
+ updateDataTextureFromFile: (e, t, c, o, m, s, d) => {
28
+ if (!r.current) return;
29
+ const i = n("updateDataTexture");
30
+ i != null && a.dispatchViewManagerCommand(u(r.current), i, [e, Number(t), Number(c), Number(o), Number(m), Number(s), d || "linear"]);
36
31
  },
37
- updateDataTexture: (base64Data, nx, ny, scale, offset, missing, scaleType) => {
38
- if (!nativeRef.current) return;
39
- const commandId = getCommandId('updateDataTexture');
40
- if (commandId == null) return;
41
- UIManager.dispatchViewManagerCommand(findNodeHandle(nativeRef.current), commandId, [base64Data, Number(nx), Number(ny), Number(scale), Number(offset), Number(missing), scaleType || 'linear']);
32
+ updateDataTexture: (e, t, c, o, m, s, d) => {
33
+ if (!r.current) return;
34
+ const i = n("updateDataTexture");
35
+ i != null && a.dispatchViewManagerCommand(u(r.current), i, [e, Number(t), Number(c), Number(o), Number(m), Number(s), d || "linear"]);
42
36
  },
43
- updateColormapTexture: colormapArray => {
44
- if (!nativeRef.current) return;
45
- const commandId = getCommandId('updateColormapTexture');
46
- if (commandId == null) return;
47
- UIManager.dispatchViewManagerCommand(findNodeHandle(nativeRef.current), commandId, [colormapArray]);
37
+ updateColormapTexture: e => {
38
+ if (!r.current) return;
39
+ const t = n("updateColormapTexture");
40
+ t != null && a.dispatchViewManagerCommand(u(r.current), t, [e]);
48
41
  },
49
- updateDataParameters: (scale, offset, missing, scaleType) => {
50
- if (!nativeRef.current) return;
51
- const commandId = getCommandId('updateDataParameters');
52
- if (commandId == null) return;
53
- UIManager.dispatchViewManagerCommand(findNodeHandle(nativeRef.current), commandId, [Number(scale), Number(offset), Number(missing), Number(scaleType)]);
42
+ updateDataParameters: (e, t, c, o) => {
43
+ if (!r.current) return;
44
+ const m = n("updateDataParameters");
45
+ m != null && a.dispatchViewManagerCommand(u(r.current), m, [Number(e), Number(t), Number(c), Number(o)]);
54
46
  },
55
- setSmoothing: enabled => {
56
- if (!nativeRef.current) return;
57
- nativeRef.current.setNativeProps({
58
- smoothing: enabled
47
+ setSmoothing: e => {
48
+ r.current && r.current.setNativeProps({
49
+ smoothing: e
59
50
  });
60
51
  },
61
52
  clear: () => {
62
- if (!nativeRef.current) return;
63
- const commandId = getCommandId('clear');
64
- if (commandId == null) return;
65
- UIManager.dispatchViewManagerCommand(findNodeHandle(nativeRef.current), commandId, []);
53
+ if (!r.current) return;
54
+ const e = n("clear");
55
+ e != null && a.dispatchViewManagerCommand(u(r.current), e, []);
66
56
  },
67
- primeGpuCache: frameInfo => {
68
- if (!nativeRef.current) return;
69
- const commandId = getCommandId('primeGpuCache');
70
- if (commandId == null) return;
71
- UIManager.dispatchViewManagerCommand(findNodeHandle(nativeRef.current), commandId, [frameInfo]);
57
+ primeGpuCache: e => {
58
+ if (!r.current) return;
59
+ const t = n("primeGpuCache");
60
+ t != null && a.dispatchViewManagerCommand(u(r.current), t, [e]);
72
61
  },
73
- setActiveFrame: cacheKey => {
74
- if (!nativeRef.current) return;
75
- const commandId = getCommandId('setActiveFrame');
76
- if (commandId == null) return;
77
- UIManager.dispatchViewManagerCommand(findNodeHandle(nativeRef.current), commandId, [cacheKey]);
62
+ setActiveFrame: e => {
63
+ if (!r.current) return;
64
+ const t = n("setActiveFrame");
65
+ t != null && a.dispatchViewManagerCommand(u(r.current), t, [e]);
78
66
  },
79
67
  clearGpuCache: () => {
80
- if (!nativeRef.current) return;
81
- const commandId = getCommandId('clearGpuCache');
82
- if (commandId == null) return;
83
- UIManager.dispatchViewManagerCommand(findNodeHandle(nativeRef.current), commandId, []);
68
+ if (!r.current) return;
69
+ const e = n("clearGpuCache");
70
+ e != null && a.dispatchViewManagerCommand(u(r.current), e, []);
84
71
  }
85
- }));
86
- return /*#__PURE__*/React.createElement(GridRenderView, {
87
- ref: nativeRef,
88
- opacity: props.opacity,
89
- dataRange: props.dataRange,
90
- belowID: props.belowID,
91
- smoothing: true,
92
- style: styles.overlay,
72
+ })), /*#__PURE__*/f.createElement(N, {
73
+ ref: r,
74
+ opacity: l.opacity,
75
+ dataRange: l.dataRange,
76
+ belowID: l.belowID,
77
+ smoothing: !0,
78
+ style: V.overlay,
93
79
  pointerEvents: "none"
94
80
  });
95
81
  });
96
- const styles = StyleSheet.create({
82
+ const V = p.create({
97
83
  overlay: {
98
- ...StyleSheet.absoluteFillObject
84
+ ...p.absoluteFillObject
99
85
  }
100
86
  });
101
87
  //# sourceMappingURL=GridRenderLayer.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","useRef","useImperativeHandle","forwardRef","UIManager","findNodeHandle","StyleSheet","GridRenderView","NATIVE_COMPONENT_NAME","GridRenderLayer","props","ref","nativeRef","getCommandId","commandName","config","getViewManagerConfig","Commands","updateGeometry","corners","gridDef","current","commandId","handle","dispatchViewManagerCommand","setVariable","variableName","updateDataTextureFromFile","filePath","nx","ny","scale","offset","missing","scaleType","Number","updateDataTexture","base64Data","updateColormapTexture","colormapArray","updateDataParameters","setSmoothing","enabled","setNativeProps","smoothing","clear","primeGpuCache","frameInfo","setActiveFrame","cacheKey","clearGpuCache","createElement","opacity","dataRange","belowID","style","styles","overlay","pointerEvents","create","absoluteFillObject"],"sourceRoot":"..\\..\\src","sources":["GridRenderLayer.js"],"mappings":"AAAA;;AAEA,OAAOA,KAAK,IAAIC,MAAM,EAAEC,mBAAmB,EAAEC,UAAU,QAAQ,OAAO;AACtE,SAASC,SAAS,EAAEC,cAAc,EAAEC,UAAU,QAAQ,cAAc;AACpE,OAAOC,cAAc,MAAM,kCAAkC;AAE7D,MAAMC,qBAAqB,GAAG,iBAAiB;AAE/C,OAAO,MAAMC,eAAe,gBAAGN,UAAU,CAAC,CAACO,KAAK,EAAEC,GAAG,KAAK;EACtD,MAAMC,SAAS,GAAGX,MAAM,CAAC,IAAI,CAAC;EAE9B,MAAMY,YAAY,GAAIC,WAAW,IAAK;IAClC,IAAI;MACA,MAAMC,MAAM,GAAGX,SAAS,CAACY,oBAAoB,CAACR,qBAAqB,CAAC;MACpE,OAAOO,MAAM,EAAEE,QAAQ,GAAGH,WAAW,CAAC,IAAI,IAAI;IAClD,CAAC,CAAC,MAAM;MACJ,OAAO,IAAI;IACf;EACJ,CAAC;EAEDZ,mBAAmB,CAACS,GAAG,EAAE,OAAO;IAC5BO,cAAc,EAAEA,CAACC,OAAO,EAAEC,OAAO,KAAK;MAClC,IAAI,CAACR,SAAS,CAACS,OAAO,EAAE;MACxB,MAAMC,SAAS,GAAGT,YAAY,CAAC,gBAAgB,CAAC;MAChD,IAAIS,SAAS,IAAI,IAAI,EA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,CAAC,CAAC,CAAC;EAEH,oBACItB,KAAA,CAAAmD,aAAA,CAAC5C,cAAc;IACXI,GAAG,EAAEC,SAAU;IACfwC,OAAO,EAAE1C,KAAK,CAAC0C,OAAQ;IACvBC,SAAS,EAAE3C,KAAK,CAAC2C,SAAU;IAC3BC,OAAO,EAAE5C,KAAK,CAAC4C,OAAQ;IACvBV,SAAS,EAAE,IAAK;IAChBW,KAAK,EAAEC,MAAM,CAACC,OAAQ;IACtBC,aAAa,EAAC;EAAM,CACvB,CAAC;AAEV,CAAC,CAAC;AAEF,MAAMF,MAAM,GAAGlD,UAAU,CAACqD,MAAM,CAAC;EAC7BF,OAAO,EAAE;IACL,GAAGnD,UAAU,CAACsD;EAClB;AACJ,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["f","useRef","g","useImperativeHandle","h","forwardRef","C","UIManager","a","findNodeHandle","u","StyleSheet","p","N","w","GridRenderLayer","l","b","r","n","e","getViewManagerConfig","Commands","updateGeometry","t","current","c","o","dispatchViewManagerCommand","setVariable","updateDataTextureFromFile","m","s","d","i","Number","updateDataTexture","updateColormapTexture","updateDataParameters","setSmoothing","setNativeProps","smoothing","clear","primeGpuCache","setActiveFrame","clearGpuCache","createElement","ref","opacity","dataRange","belowID","style","V","overlay","pointerEvents","create","absoluteFillObject"],"sourceRoot":"..\\..\\src","sources":["GridRenderLayer.js"],"mappings":"AAAA,OAAOA,CAAC,IAAEC,MAAM,IAAIC,CAAC,EAACC,mBAAmB,IAAIC,CAAC,EAACC,UAAU,IAAIC,CAAC,QAAK,OAAO;AAAC,SAAOC,SAAS,IAAIC,CAAC,EAACC,cAAc,IAAIC,CAAC,EAACC,UAAU,IAAIC,CAAC,QAAK,cAAc;AAAC,OAAOC,CAAC,MAAK,kCAAkC;AAAC,MAAMC,CAAC,GAAC,iBAAiB;AAAC,OAAO,MAAMC,eAAe,gBAACT,CAAC,CAAC,CAACU,CAAC,EAACC,CAAC,KAAG;EAAC,MAAMC,CAAC,GAACh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AC3B,CAAC,CAACO,OAAO,EAAC;MAAO,MAAML,CAAC,GAACD,CAAC,CAAC,eAAe,CAAC;MAACC,CAAC,IAAE,IAAI,IAAEZ,CAAC,CAACoB,0BAA0B,CAAClB,CAAC,CAACQ,CAAC,CAACO,OAAO,CAAC,EAACL,CAAC,EAAC,EAAE,CAAC;IAAA;EAAC,CAAC,CAAC,CAAC,eAACpB,CAAC,CAAC8C,aAAa,CAACjC,CAAC,EAAC;IAACkC,GAAG,EAAC7B,CAAC;IAAC8B,OAAO,EAAChC,CAAC,CAACgC,OAAO;IAACC,SAAS,EAACjC,CAAC,CAACiC,SAAS;IAACC,OAAO,EAAClC,CAAC,CAACkC,OAAO;IAACT,SAAS,EAAC,CAAC,CAAC;IAACU,KAAK,EAACC,CAAC,CAACC,OAAO;IAACC,aAAa,EAAC;EAAM,CAAC,CAAC;AAAA,CAAC,CAAC;AAAC,MAAMF,CAAC,GAACxC,CAAC,CAAC2C,MAAM,CAAC;EAACF,OAAO,EAAC;IAAC,GAAGzC,CAAC,CAAC4C;EAAkB;AAAC,CAAC,CAAC","ignoreList":[]}
@@ -1,267 +1,153 @@
1
- // packages/react-native/src/MapManager.js
2
-
3
- import React, { useMemo, useEffect, useState, useRef, forwardRef, useImperativeHandle } from 'react';
4
- import { View, StyleSheet, Text } from 'react-native';
5
- import Mapbox from '@rnmapbox/maps';
6
- import { THEME_CONFIGS } from '@aguacerowx/javascript-sdk';
7
- import { StyleApplicator } from './StyleApplicator';
8
- import { AguaceroContext } from './AguaceroContext';
9
- import { mapRegistry } from './MapRegistry';
10
- const BASE_STYLE_URL = 'mapbox://styles/aguacerowx/cmfvox8mq004u01qm5nlg7qkt';
11
-
12
- // --- UTILITIES ---
13
- function isObject(item) {
14
- return item && typeof item === 'object' && !Array.isArray(item);
1
+ import l, { useMemo as E, useEffect as g, useState as V, useRef as R, forwardRef as z, useImperativeHandle as Z } from "react";
2
+ import { View as U, StyleSheet as f, Text as M } from "react-native";
3
+ import y from "@rnmapbox/maps";
4
+ import { THEME_CONFIGS as k } from "@aguacerowx/javascript-sdk";
5
+ import { StyleApplicator as q } from "./StyleApplicator";
6
+ import { AguaceroContext as N } from "./AguaceroContext";
7
+ import { mapRegistry as d } from "./MapRegistry";
8
+ const O = "mapbox://styles/aguacerowx/cmfvox8mq004u01qm5nlg7qkt";
9
+ function b(o) {
10
+ return o && typeof o == "object" && !Array.isArray(o);
15
11
  }
16
- function deepMerge(target, source) {
17
- const output = {
18
- ...target
12
+ function C(o, a) {
13
+ const c = {
14
+ ...o
19
15
  };
20
- if (isObject(target) && isObject(source)) {
21
- Object.keys(source).forEach(key => {
22
- if (isObject(source[key])) {
23
- if (!(key in target)) {
24
- Object.assign(output, {
25
- [key]: source[key]
26
- });
27
- } else {
28
- output[key] = deepMerge(target[key], source[key]);
29
- }
30
- } else {
31
- Object.assign(output, {
32
- [key]: source[key]
33
- });
34
- }
16
+ return b(o) && b(a) && Object.keys(a).forEach(t => {
17
+ b(a[t]) ? t in o ? c[t] = C(o[t], a[t]) : Object.assign(c, {
18
+ [t]: a[t]
19
+ }) : Object.assign(c, {
20
+ [t]: a[t]
35
21
  });
36
- }
37
- return output;
22
+ }), c;
38
23
  }
39
-
40
- /**
41
- * @param {object} props
42
- * @param {string} props.mapboxToken
43
- * @param {object} [props.customStyles]
44
- * @param {'light'|'dark'} [props.theme]
45
- * @param {object} [props.mapOptions] - `style` / `styleURL` / `styleUrl` set the map style when no top-level custom style pair is used (mapsgl parity).
46
- * @param {string} [props.styleURL] - Custom Mapbox style URL (alias: `styleUrl`).
47
- * @param {string} [props.styleUrl]
48
- * @param {string} [props.belowID] - Style layer id to insert Aguacero weather **below** (alias: `weatherBeforeLayerId`). With `styleURL`, required for correct stacking; may be set alone to override the default `AML_-_terrain` anchor on the default style.
49
- * @param {string} [props.weatherBeforeLayerId]
50
- * @param {import('react').ReactNode} [props.children] - Render inside Mapbox.MapView; use for WeatherLayerManager so map sources (e.g. NEXRAD site circles) register on the map.
51
- */
52
- export const MapManager = /*#__PURE__*/forwardRef(({
53
- mapboxToken,
54
- customStyles,
55
- theme = 'light',
56
- mapOptions = {},
57
- styleURL: styleURLProp,
58
- styleUrl: styleUrlProp,
59
- belowID: belowIDProp,
60
- weatherBeforeLayerId: weatherBeforeLayerIdProp,
61
- children
62
- }, ref) => {
63
- const mapRef = useRef(null);
64
- const cameraRef = useRef(null);
65
- const [mapStyle, setMapStyle] = useState(null);
66
- const {
67
- resolvedStyleURL,
68
- weatherBeforeLayerId
69
- } = useMemo(() => {
70
- const mo = mapOptions || {};
71
- let resolved = BASE_STYLE_URL;
72
- if (mo.style !== undefined) {
73
- resolved = mo.style;
74
- } else if (mo.styleURL !== undefined) {
75
- resolved = mo.styleURL;
76
- } else if (mo.styleUrl !== undefined) {
77
- resolved = mo.styleUrl;
78
- }
79
- let anchor = null;
80
- const customStyleUrl = styleURLProp || styleUrlProp;
81
- const customBeforeId = belowIDProp || weatherBeforeLayerIdProp;
82
- if (customStyleUrl) {
83
- if (customBeforeId && String(customBeforeId).trim()) {
84
- resolved = customStyleUrl;
85
- anchor = String(customBeforeId).trim();
86
- } else if (mo.style === undefined && mo.styleURL === undefined && mo.styleUrl === undefined) {
87
- resolved = BASE_STYLE_URL;
88
- }
89
- } else if (customBeforeId && String(customBeforeId).trim()) {
90
- anchor = String(customBeforeId).trim();
91
- }
92
- return {
93
- resolvedStyleURL: resolved,
94
- weatherBeforeLayerId: anchor
95
- };
96
- }, [mapOptions, styleURLProp, styleUrlProp, belowIDProp, weatherBeforeLayerIdProp]);
97
-
98
- // Expose camera and map methods via ref
99
- useImperativeHandle(ref, () => ({
100
- // Camera methods
101
- flyTo: config => {
102
- if (cameraRef.current) {
103
- cameraRef.current.flyTo(config);
104
- }
105
- },
106
- moveTo: config => {
107
- if (cameraRef.current) {
108
- cameraRef.current.moveTo(config);
109
- }
110
- },
111
- zoomTo: (zoomLevel, duration = 2000) => {
112
- if (cameraRef.current) {
113
- cameraRef.current.zoomTo(zoomLevel, duration);
114
- }
115
- },
116
- setCamera: config => {
117
- if (cameraRef.current) {
118
- cameraRef.current.setCamera(config);
119
- }
120
- },
121
- // Map methods
122
- getCenter: async () => {
123
- if (mapRef.current) {
124
- return await mapRef.current.getCenter();
125
- }
126
- return null;
127
- },
128
- getZoom: async () => {
129
- if (mapRef.current) {
130
- return await mapRef.current.getZoom();
131
- }
132
- return null;
24
+ export const MapManager = /*#__PURE__*/z(({
25
+ mapboxToken: o,
26
+ customStyles: a,
27
+ theme: c = "light",
28
+ mapOptions: t = {},
29
+ styleURL: S,
30
+ styleUrl: v,
31
+ belowID: h,
32
+ weatherBeforeLayerId: w,
33
+ children: F
34
+ }, I) => {
35
+ const r = R(null),
36
+ s = R(null),
37
+ [x, P] = V(null),
38
+ {
39
+ resolvedStyleURL: p,
40
+ weatherBeforeLayerId: T
41
+ } = E(() => {
42
+ const e = t || {};
43
+ let n = O;
44
+ e.style !== void 0 ? n = e.style : e.styleURL !== void 0 ? n = e.styleURL : e.styleUrl !== void 0 && (n = e.styleUrl);
45
+ let u = null;
46
+ const L = S || v,
47
+ i = h || w;
48
+ return L ? i && String(i).trim() ? (n = L, u = String(i).trim()) : e.style === void 0 && e.styleURL === void 0 && e.styleUrl === void 0 && (n = O) : i && String(i).trim() && (u = String(i).trim()), {
49
+ resolvedStyleURL: n,
50
+ weatherBeforeLayerId: u
51
+ };
52
+ }, [t, S, v, h, w]);
53
+ Z(I, () => ({
54
+ flyTo: e => {
55
+ s.current && s.current.flyTo(e);
133
56
  },
134
- getCoordinateFromView: async point => {
135
- if (mapRef.current) {
136
- return await mapRef.current.getCoordinateFromView(point);
137
- }
138
- return null;
57
+ moveTo: e => {
58
+ s.current && s.current.moveTo(e);
139
59
  },
140
- getPointInView: async coordinate => {
141
- if (mapRef.current) {
142
- return await mapRef.current.getPointInView(coordinate);
143
- }
144
- return null;
60
+ zoomTo: (e, n = 2e3) => {
61
+ s.current && s.current.zoomTo(e, n);
145
62
  },
146
- queryRenderedFeaturesAtPoint: async (point, filter, layerIds) => {
147
- if (mapRef.current) {
148
- return await mapRef.current.queryRenderedFeaturesAtPoint(point, filter, layerIds);
149
- }
150
- return null;
63
+ setCamera: e => {
64
+ s.current && s.current.setCamera(e);
151
65
  },
152
- // Direct access to refs (for advanced use cases)
153
- getMapRef: () => mapRef.current,
154
- getCameraRef: () => cameraRef.current
155
- }), []);
156
-
157
- // Register map with the global registry when it's ready
158
- useEffect(() => {
159
- if (mapRef.current) {
160
- mapRegistry.setMap(mapRef.current);
161
- }
66
+ getCenter: async () => r.current ? await r.current.getCenter() : null,
67
+ getZoom: async () => r.current ? await r.current.getZoom() : null,
68
+ getCoordinateFromView: async e => r.current ? await r.current.getCoordinateFromView(e) : null,
69
+ getPointInView: async e => r.current ? await r.current.getPointInView(e) : null,
70
+ queryRenderedFeaturesAtPoint: async (e, n, u) => r.current ? await r.current.queryRenderedFeaturesAtPoint(e, n, u) : null,
71
+ getMapRef: () => r.current,
72
+ getCameraRef: () => s.current
73
+ }), []), g(() => {
74
+ r.current && d.setMap(r.current);
162
75
  }, []);
163
- const contextValue = useMemo(() => ({
164
- getMap: () => mapRef.current,
165
- getCenter: () => {
166
- return mapRef.current?._currentCenter || [-95.7129, 37.0902];
167
- },
168
- /** @type {string | null} Null with default Aguacero style — use `AML_-_terrain` for weather insert (see WeatherLayerManager). */
169
- weatherBeforeLayerId,
170
- resolvedStyleURL
171
- }), [weatherBeforeLayerId, resolvedStyleURL]);
172
- useEffect(() => {
173
- let lightTheme = JSON.parse(JSON.stringify(THEME_CONFIGS.light));
174
- let darkTheme = JSON.parse(JSON.stringify(THEME_CONFIGS.dark));
175
- if (customStyles) {
176
- if (customStyles.light) {
177
- lightTheme = deepMerge(lightTheme, customStyles.light);
178
- }
179
- if (customStyles.dark) {
180
- darkTheme = deepMerge(darkTheme, customStyles.dark);
181
- }
182
- }
183
- setMapStyle(theme === 'dark' ? darkTheme : lightTheme);
184
- }, [customStyles, theme]);
185
- useEffect(() => {
186
- if (mapboxToken) {
187
- Mapbox.setAccessToken(mapboxToken);
188
- }
189
- }, [mapboxToken]);
190
- if (!mapboxToken) {
191
- return /*#__PURE__*/React.createElement(View, {
192
- style: [styles.container, styles.centerContent]
193
- }, /*#__PURE__*/React.createElement(Text, {
194
- style: styles.errorText
195
- }, "Mapbox Token Missing"), /*#__PURE__*/React.createElement(Text, {
196
- style: styles.errorSubText
197
- }, "Please provide the 'mapboxToken' prop."));
198
- }
199
- const handleCameraChange = event => {
200
- if (event?.properties?.center) {
201
- const center = event.properties.center;
202
-
203
- // Store the current center in the ref for immediate access
204
- if (mapRef.current) {
205
- mapRef.current._currentCenter = center;
76
+ const j = E(() => ({
77
+ getMap: () => r.current,
78
+ getCenter: () => r.current?._currentCenter || [-95.7129, 37.0902],
79
+ weatherBeforeLayerId: T,
80
+ resolvedStyleURL: p
81
+ }), [T, p]);
82
+ if (g(() => {
83
+ let e = JSON.parse(JSON.stringify(k.light)),
84
+ n = JSON.parse(JSON.stringify(k.dark));
85
+ a && (a.light && (e = C(e, a.light)), a.dark && (n = C(n, a.dark))), P(c === "dark" ? n : e);
86
+ }, [a, c]), g(() => {
87
+ o && y.setAccessToken(o);
88
+ }, [o]), !o) return /*#__PURE__*/l.createElement(U, {
89
+ style: [m.container, m.centerContent]
90
+ }, /*#__PURE__*/l.createElement(M, {
91
+ style: m.errorText
92
+ }, "Mapbox Token Missing"), /*#__PURE__*/l.createElement(M, {
93
+ style: m.errorSubText
94
+ }, "Please provide the 'mapboxToken' prop."));
95
+ const A = e => {
96
+ if (e?.properties?.center) {
97
+ const n = e.properties.center;
98
+ r.current && (r.current._currentCenter = n), d.notifyCameraChange(n);
206
99
  }
207
- mapRegistry.notifyCameraChange(center);
208
- }
209
- };
210
- const handleMapPress = payload => {
211
- mapRegistry.notifyMapPress(payload);
212
- };
213
- return /*#__PURE__*/React.createElement(View, {
214
- style: styles.container
215
- }, /*#__PURE__*/React.createElement(AguaceroContext.Provider, {
216
- value: contextValue
217
- }, /*#__PURE__*/React.createElement(Mapbox.MapView, {
218
- ref: mapRef,
219
- style: styles.map,
220
- styleURL: resolvedStyleURL,
221
- scaleBarEnabled: false,
222
- onCameraChanged: handleCameraChange,
223
- onPress: handleMapPress
224
- }, /*#__PURE__*/React.createElement(Mapbox.Camera, {
225
- ref: cameraRef,
100
+ },
101
+ B = e => {
102
+ d.notifyMapPress(e);
103
+ };
104
+ return /*#__PURE__*/l.createElement(U, {
105
+ style: m.container
106
+ }, /*#__PURE__*/l.createElement(N.Provider, {
107
+ value: j
108
+ }, /*#__PURE__*/l.createElement(y.MapView, {
109
+ ref: r,
110
+ style: m.map,
111
+ styleURL: p,
112
+ scaleBarEnabled: !1,
113
+ onCameraChanged: A,
114
+ onPress: B
115
+ }, /*#__PURE__*/l.createElement(y.Camera, {
116
+ ref: s,
226
117
  defaultSettings: {
227
- centerCoordinate: mapOptions.center || [-15.7129, 37.0902],
228
- zoomLevel: mapOptions.zoom || 0,
229
- pitch: mapOptions.pitch || 0,
230
- bearing: mapOptions.bearing || 0,
231
- minZoomLevel: mapOptions.minZoom || 2,
232
- maxZoomLevel: mapOptions.maxZoom || 12
118
+ centerCoordinate: t.center || [-15.7129, 37.0902],
119
+ zoomLevel: t.zoom || 0,
120
+ pitch: t.pitch || 0,
121
+ bearing: t.bearing || 0,
122
+ minZoomLevel: t.minZoom || 2,
123
+ maxZoomLevel: t.maxZoom || 12
233
124
  }
234
- }), mapStyle && /*#__PURE__*/React.createElement(StyleApplicator, {
235
- styles: mapStyle
236
- }), /*#__PURE__*/React.createElement(Mapbox.VectorSource, {
125
+ }), x && /*#__PURE__*/l.createElement(q, {
126
+ styles: x
127
+ }), /*#__PURE__*/l.createElement(y.VectorSource, {
237
128
  id: "mapbox-dem",
238
129
  url: "mapbox://mapbox.mapbox-terrain-dem-v1"
239
- }), children)));
130
+ }), F)));
240
131
  });
241
- const styles = StyleSheet.create({
242
- /**
243
- * Full-bleed positioning so RNMapbox/Mapbox gets non-zero bounds on the first layout pass.
244
- * A plain flex:1 sibling tree (e.g. map + absolute overlays under Expo Tabs) can still yield
245
- * a transient 0×0 MapView, which triggers maps-core "Invalid size … fall back to {64, 64}".
246
- */
132
+ const m = f.create({
247
133
  container: {
248
- ...StyleSheet.absoluteFillObject,
249
- backgroundColor: '#1a1a2e'
134
+ ...f.absoluteFillObject,
135
+ backgroundColor: "#1a1a2e"
250
136
  },
251
137
  centerContent: {
252
- justifyContent: 'center',
253
- alignItems: 'center'
138
+ justifyContent: "center",
139
+ alignItems: "center"
254
140
  },
255
141
  map: {
256
- ...StyleSheet.absoluteFillObject
142
+ ...f.absoluteFillObject
257
143
  },
258
144
  errorText: {
259
- color: '#FF6B6B',
145
+ color: "#FF6B6B",
260
146
  fontSize: 22,
261
- fontWeight: 'bold'
147
+ fontWeight: "bold"
262
148
  },
263
149
  errorSubText: {
264
- color: 'white',
150
+ color: "white",
265
151
  fontSize: 16,
266
152
  marginTop: 8
267
153
  }