@rnmapbox/maps 10.3.0 → 10.3.2-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (309) hide show
  1. package/android/src/main/java/com/rnmapbox/rnmbx/RNMBXPackage.kt +4 -0
  2. package/android/src/main/java/com/rnmapbox/rnmbx/components/annotation/RNMBXMarkerView.kt +8 -0
  3. package/android/src/main/java/com/rnmapbox/rnmbx/components/annotation/RNMBXMarkerViewContent.kt +9 -0
  4. package/android/src/main/java/com/rnmapbox/rnmbx/components/annotation/RNMBXMarkerViewContentManager.kt +7 -1
  5. package/android/src/main/java/com/rnmapbox/rnmbx/components/annotation/RNMBXMarkerViewManager.kt +14 -0
  6. package/android/src/main/java/com/rnmapbox/rnmbx/components/camera/RNMBXCamera.kt +3 -0
  7. package/android/src/main/java/com/rnmapbox/rnmbx/components/camera/RNMBXCameraManager.kt +6 -0
  8. package/android/src/main/java/com/rnmapbox/rnmbx/components/camera/RNMBXVIewportManager.kt +6 -0
  9. package/android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImageManager.kt +6 -0
  10. package/android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImagesManager.kt +6 -0
  11. package/android/src/main/java/com/rnmapbox/rnmbx/components/location/RNMBXCustomLocationProviderManager.kt +6 -0
  12. package/android/src/main/java/com/rnmapbox/rnmbx/components/location/RNMBXNativeUserLocationManager.kt +6 -0
  13. package/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapView.kt +13 -0
  14. package/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapViewManager.kt +6 -1
  15. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/RNMBXStyleFactory.kt +748 -0
  16. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/RNMBXStyleImportManager.kt +6 -0
  17. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXBackgroundLayerManager.kt +6 -0
  18. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXCircleLayerManager.kt +6 -0
  19. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXFillExtrusionLayerManager.kt +6 -0
  20. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXFillLayerManager.kt +6 -0
  21. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXHeatmapLayerManager.kt +6 -0
  22. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXHillshadeLayerManager.kt +6 -0
  23. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXLineLayerManager.kt +6 -0
  24. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXModelLayerManager.kt +6 -0
  25. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXRasterLayerManager.kt +6 -0
  26. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXSkyLayerManager.kt +6 -0
  27. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXSymbolLayerManager.kt +6 -0
  28. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/light/RNMBXLightManager.kt +6 -0
  29. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/model/RNMBXModelsManager.kt +6 -0
  30. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/rain/RNMBXRain.kt +83 -0
  31. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/rain/RNMBXRainManager.kt +40 -0
  32. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/snow/RNMBXSnow.kt +66 -0
  33. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/snow/RNMBXSnowManager.kt +40 -0
  34. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXImageSourceManager.kt +6 -0
  35. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXRasterDemSourceManager.kt +6 -0
  36. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXRasterSource.kt +1 -1
  37. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXRasterSourceManager.kt +6 -0
  38. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXShapeSource.kt +8 -0
  39. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXShapeSourceManager.kt +11 -0
  40. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXVectorSourceManager.kt +6 -0
  41. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/terrain/RNMBXTerrainManager.kt +6 -0
  42. package/ios/RNMBX/RNMBXAtmosphereComponentView.mm +2 -1
  43. package/ios/RNMBX/RNMBXBackgroundLayerComponentView.mm +2 -1
  44. package/ios/RNMBX/RNMBXBridgeManager.h +8 -0
  45. package/ios/RNMBX/RNMBXBridgeManager.m +16 -0
  46. package/ios/RNMBX/RNMBXCamera.swift +5 -2
  47. package/ios/RNMBX/RNMBXCircleLayerComponentView.mm +2 -1
  48. package/ios/RNMBX/RNMBXFillExtrusionLayerComponentView.mm +2 -1
  49. package/ios/RNMBX/RNMBXFillLayerComponentView.mm +2 -1
  50. package/ios/RNMBX/RNMBXHeatmapLayerComponentView.mm +2 -1
  51. package/ios/RNMBX/RNMBXHillshadeLayerComponentView.mm +2 -1
  52. package/ios/RNMBX/RNMBXImageModule.h +1 -0
  53. package/ios/RNMBX/RNMBXImageModule.mm +15 -2
  54. package/ios/RNMBX/RNMBXImageQueue.swift +9 -1
  55. package/ios/RNMBX/RNMBXImages.swift +4 -0
  56. package/ios/RNMBX/RNMBXImagesComponentView.mm +2 -1
  57. package/ios/RNMBX/RNMBXLightComponentView.mm +2 -1
  58. package/ios/RNMBX/RNMBXLineLayerComponentView.mm +2 -1
  59. package/ios/RNMBX/RNMBXMapView.swift +16 -0
  60. package/ios/RNMBX/RNMBXMapViewComponentView.mm +10 -0
  61. package/ios/RNMBX/RNMBXModelLayerComponentView.mm +2 -1
  62. package/ios/RNMBX/RNMBXRain.swift +92 -0
  63. package/ios/RNMBX/RNMBXRainComponentView.h +14 -0
  64. package/ios/RNMBX/RNMBXRainComponentView.mm +80 -0
  65. package/ios/RNMBX/RNMBXRasterLayerComponentView.mm +2 -1
  66. package/ios/RNMBX/RNMBXRasterParticleLayerComponentView.mm +2 -1
  67. package/ios/RNMBX/RNMBXShapeSource.swift +5 -0
  68. package/ios/RNMBX/RNMBXShapeSourceComponentView.mm +1 -0
  69. package/ios/RNMBX/RNMBXSkyLayerComponentView.mm +2 -1
  70. package/ios/RNMBX/RNMBXSnow.swift +76 -0
  71. package/ios/RNMBX/RNMBXSnowComponentView.h +14 -0
  72. package/ios/RNMBX/RNMBXSnowComponentView.mm +80 -0
  73. package/ios/RNMBX/RNMBXStyle.swift +477 -9
  74. package/ios/RNMBX/RNMBXStyleValue.swift +7 -1
  75. package/ios/RNMBX/RNMBXSymbolLayerComponentView.mm +2 -1
  76. package/ios/RNMBX/RNMBXTerrainComponentView.mm +2 -1
  77. package/lib/commonjs/plugin/build/withMapbox.d.ts +1 -1
  78. package/lib/commonjs/plugin/install.md +2 -2
  79. package/lib/commonjs/plugin/src/withMapbox.ts +2 -2
  80. package/lib/module/Mapbox.native.js +2 -1
  81. package/lib/module/Mapbox.native.js.map +1 -1
  82. package/lib/module/components/AbstractLayer.js.map +1 -1
  83. package/lib/module/components/Annotation.js.map +1 -1
  84. package/lib/module/components/Callout.js.map +1 -1
  85. package/lib/module/components/Image.js.map +1 -1
  86. package/lib/module/components/Images.js.map +1 -1
  87. package/lib/module/components/MapView.js.map +1 -1
  88. package/lib/module/components/MarkerView.js +6 -2
  89. package/lib/module/components/MarkerView.js.map +1 -1
  90. package/lib/module/components/PointAnnotation.js +11 -4
  91. package/lib/module/components/PointAnnotation.js.map +1 -1
  92. package/lib/module/components/Rain.js +19 -0
  93. package/lib/module/components/Rain.js.map +1 -0
  94. package/lib/module/components/ShapeSource.js +1 -0
  95. package/lib/module/components/ShapeSource.js.map +1 -1
  96. package/lib/module/components/Snow.js +19 -0
  97. package/lib/module/components/Snow.js.map +1 -0
  98. package/lib/module/components/SymbolLayer.js.map +1 -1
  99. package/lib/module/components/UserLocation.js.map +1 -1
  100. package/lib/module/components/VectorSource.js.map +1 -1
  101. package/lib/module/specs/RNMBXCameraNativeComponent.ts +3 -3
  102. package/lib/module/specs/RNMBXCustomLocationProviderNativeComponent.ts +1 -1
  103. package/lib/module/specs/RNMBXImageSourceNativeComponent.ts +1 -1
  104. package/lib/module/specs/RNMBXMapViewNativeComponent.ts +5 -4
  105. package/lib/module/specs/RNMBXMarkerViewNativeComponent.ts +2 -2
  106. package/lib/module/specs/RNMBXModelLayerNativeComponent.ts +2 -2
  107. package/lib/module/specs/RNMBXModelsNativeComponent.ts +1 -1
  108. package/lib/module/specs/RNMBXNativeUserLocationNativeComponent.ts +1 -1
  109. package/lib/module/specs/RNMBXRainNativeComponent.ts +13 -0
  110. package/lib/module/specs/RNMBXRasterArraySourceNativeComponent.ts +1 -1
  111. package/lib/module/specs/RNMBXRasterDemSourceNativeComponent.ts +1 -1
  112. package/lib/module/specs/RNMBXRasterSourceNativeComponent.ts +1 -1
  113. package/lib/module/specs/RNMBXShapeSourceNativeComponent.ts +4 -3
  114. package/lib/module/specs/RNMBXSnowNativeComponent.ts +13 -0
  115. package/lib/module/specs/RNMBXVectorSourceNativeComponent.ts +2 -2
  116. package/lib/module/utils/index.js.map +1 -1
  117. package/lib/module/utils/styleMap.js +26 -0
  118. package/lib/module/utils/styleMap.js.map +1 -1
  119. package/lib/module/web/components/Camera.js.map +1 -1
  120. package/lib/typescript/jest.config.d.ts +3 -3
  121. package/lib/typescript/jest.config.d.ts.map +1 -1
  122. package/lib/typescript/plugin/src/withMapbox.d.ts +1 -1
  123. package/lib/typescript/plugin/src/withMapbox.d.ts.map +1 -1
  124. package/lib/typescript/scripts/autogenHelpers/examplesJsonSchema.d.ts +1 -1
  125. package/lib/typescript/scripts/autogenHelpers/examplesJsonSchema.d.ts.map +1 -1
  126. package/lib/typescript/scripts/autogenHelpers/generateCodeWithEjs.d.mts +71 -2
  127. package/lib/typescript/scripts/autogenHelpers/generateCodeWithEjs.d.mts.map +1 -1
  128. package/lib/typescript/scripts/autogenHelpers/globals.d.mts +1 -1
  129. package/lib/typescript/scripts/autogenHelpers/globals.d.mts.map +1 -1
  130. package/lib/typescript/src/Mapbox.native.d.ts +3 -1
  131. package/lib/typescript/src/Mapbox.native.d.ts.map +1 -1
  132. package/lib/typescript/src/components/AbstractLayer.d.ts +2 -2
  133. package/lib/typescript/src/components/AbstractLayer.d.ts.map +1 -1
  134. package/lib/typescript/src/components/AbstractSource.d.ts +1 -1
  135. package/lib/typescript/src/components/AbstractSource.d.ts.map +1 -1
  136. package/lib/typescript/src/components/Annotation.d.ts +4 -4
  137. package/lib/typescript/src/components/Annotation.d.ts.map +1 -1
  138. package/lib/typescript/src/components/Callout.d.ts +5 -5
  139. package/lib/typescript/src/components/Callout.d.ts.map +1 -1
  140. package/lib/typescript/src/components/Camera.d.ts +1 -1
  141. package/lib/typescript/src/components/Camera.d.ts.map +1 -1
  142. package/lib/typescript/src/components/CameraGestureObserver.d.ts +1 -1
  143. package/lib/typescript/src/components/CameraGestureObserver.d.ts.map +1 -1
  144. package/lib/typescript/src/components/CircleLayer.d.ts +1 -1
  145. package/lib/typescript/src/components/CircleLayer.d.ts.map +1 -1
  146. package/lib/typescript/src/components/CustomLocationProvider.d.ts +1 -1
  147. package/lib/typescript/src/components/CustomLocationProvider.d.ts.map +1 -1
  148. package/lib/typescript/src/components/FillExtrusionLayer.d.ts +1 -1
  149. package/lib/typescript/src/components/FillExtrusionLayer.d.ts.map +1 -1
  150. package/lib/typescript/src/components/HeadingIndicator.d.ts +1 -1
  151. package/lib/typescript/src/components/HeadingIndicator.d.ts.map +1 -1
  152. package/lib/typescript/src/components/HillshadeLayer.d.ts +1 -1
  153. package/lib/typescript/src/components/HillshadeLayer.d.ts.map +1 -1
  154. package/lib/typescript/src/components/Image.d.ts +1 -1
  155. package/lib/typescript/src/components/Image.d.ts.map +1 -1
  156. package/lib/typescript/src/components/ImageSource.d.ts +1 -1
  157. package/lib/typescript/src/components/ImageSource.d.ts.map +1 -1
  158. package/lib/typescript/src/components/Images.d.ts +2 -2
  159. package/lib/typescript/src/components/Images.d.ts.map +1 -1
  160. package/lib/typescript/src/components/LineLayer.d.ts +1 -1
  161. package/lib/typescript/src/components/LineLayer.d.ts.map +1 -1
  162. package/lib/typescript/src/components/MapView.d.ts +5 -1
  163. package/lib/typescript/src/components/MapView.d.ts.map +1 -1
  164. package/lib/typescript/src/components/MarkerView.d.ts +1 -1
  165. package/lib/typescript/src/components/MarkerView.d.ts.map +1 -1
  166. package/lib/typescript/src/components/ModelLayer.d.ts +1 -1
  167. package/lib/typescript/src/components/ModelLayer.d.ts.map +1 -1
  168. package/lib/typescript/src/components/NativeBridgeComponent.d.ts +1 -1
  169. package/lib/typescript/src/components/NativeBridgeComponent.d.ts.map +1 -1
  170. package/lib/typescript/src/components/PointAnnotation.d.ts +3 -3
  171. package/lib/typescript/src/components/PointAnnotation.d.ts.map +1 -1
  172. package/lib/typescript/src/components/Rain.d.ts +17 -0
  173. package/lib/typescript/src/components/Rain.d.ts.map +1 -0
  174. package/lib/typescript/src/components/RasterArraySource.d.ts +1 -1
  175. package/lib/typescript/src/components/RasterArraySource.d.ts.map +1 -1
  176. package/lib/typescript/src/components/RasterLayer.d.ts +1 -1
  177. package/lib/typescript/src/components/RasterLayer.d.ts.map +1 -1
  178. package/lib/typescript/src/components/RasterParticleLayer.d.ts +1 -1
  179. package/lib/typescript/src/components/RasterParticleLayer.d.ts.map +1 -1
  180. package/lib/typescript/src/components/RasterSource.d.ts +1 -1
  181. package/lib/typescript/src/components/RasterSource.d.ts.map +1 -1
  182. package/lib/typescript/src/components/ShapeSource.d.ts +8 -3
  183. package/lib/typescript/src/components/ShapeSource.d.ts.map +1 -1
  184. package/lib/typescript/src/components/SkyLayer.d.ts +1 -1
  185. package/lib/typescript/src/components/SkyLayer.d.ts.map +1 -1
  186. package/lib/typescript/src/components/Snow.d.ts +8 -0
  187. package/lib/typescript/src/components/Snow.d.ts.map +1 -0
  188. package/lib/typescript/src/components/SymbolLayer.d.ts +1 -1
  189. package/lib/typescript/src/components/SymbolLayer.d.ts.map +1 -1
  190. package/lib/typescript/src/components/UserLocation.d.ts +1 -1
  191. package/lib/typescript/src/components/UserLocation.d.ts.map +1 -1
  192. package/lib/typescript/src/components/VectorSource.d.ts +2 -2
  193. package/lib/typescript/src/components/VectorSource.d.ts.map +1 -1
  194. package/lib/typescript/src/modules/location/locationManager.d.ts +1 -1
  195. package/lib/typescript/src/modules/location/locationManager.d.ts.map +1 -1
  196. package/lib/typescript/src/modules/offline/offlineManager.d.ts +1 -1
  197. package/lib/typescript/src/modules/offline/offlineManager.d.ts.map +1 -1
  198. package/lib/typescript/src/shapeAnimators/ChangeLineOffsetsShapeAnimator.d.ts +1 -1
  199. package/lib/typescript/src/shapeAnimators/ChangeLineOffsetsShapeAnimator.d.ts.map +1 -1
  200. package/lib/typescript/src/shapeAnimators/MovePointShapeAnimator.d.ts +2 -2
  201. package/lib/typescript/src/shapeAnimators/MovePointShapeAnimator.d.ts.map +1 -1
  202. package/lib/typescript/src/specs/RNMBXCameraNativeComponent.d.ts +1 -1
  203. package/lib/typescript/src/specs/RNMBXCameraNativeComponent.d.ts.map +1 -1
  204. package/lib/typescript/src/specs/RNMBXCustomLocationProviderNativeComponent.d.ts +1 -1
  205. package/lib/typescript/src/specs/RNMBXCustomLocationProviderNativeComponent.d.ts.map +1 -1
  206. package/lib/typescript/src/specs/RNMBXImageSourceNativeComponent.d.ts +1 -1
  207. package/lib/typescript/src/specs/RNMBXImageSourceNativeComponent.d.ts.map +1 -1
  208. package/lib/typescript/src/specs/RNMBXMapViewNativeComponent.d.ts +2 -1
  209. package/lib/typescript/src/specs/RNMBXMapViewNativeComponent.d.ts.map +1 -1
  210. package/lib/typescript/src/specs/RNMBXMarkerViewNativeComponent.d.ts +2 -2
  211. package/lib/typescript/src/specs/RNMBXMarkerViewNativeComponent.d.ts.map +1 -1
  212. package/lib/typescript/src/specs/RNMBXModelLayerNativeComponent.d.ts +2 -2
  213. package/lib/typescript/src/specs/RNMBXModelLayerNativeComponent.d.ts.map +1 -1
  214. package/lib/typescript/src/specs/RNMBXModelsNativeComponent.d.ts +1 -1
  215. package/lib/typescript/src/specs/RNMBXModelsNativeComponent.d.ts.map +1 -1
  216. package/lib/typescript/src/specs/RNMBXNativeUserLocationNativeComponent.d.ts +1 -1
  217. package/lib/typescript/src/specs/RNMBXNativeUserLocationNativeComponent.d.ts.map +1 -1
  218. package/lib/typescript/src/specs/RNMBXRainNativeComponent.d.ts +8 -0
  219. package/lib/typescript/src/specs/RNMBXRainNativeComponent.d.ts.map +1 -0
  220. package/lib/typescript/src/specs/RNMBXRasterArraySourceNativeComponent.d.ts +1 -1
  221. package/lib/typescript/src/specs/RNMBXRasterArraySourceNativeComponent.d.ts.map +1 -1
  222. package/lib/typescript/src/specs/RNMBXRasterDemSourceNativeComponent.d.ts +1 -1
  223. package/lib/typescript/src/specs/RNMBXRasterDemSourceNativeComponent.d.ts.map +1 -1
  224. package/lib/typescript/src/specs/RNMBXRasterSourceNativeComponent.d.ts +1 -1
  225. package/lib/typescript/src/specs/RNMBXRasterSourceNativeComponent.d.ts.map +1 -1
  226. package/lib/typescript/src/specs/RNMBXShapeSourceNativeComponent.d.ts +2 -1
  227. package/lib/typescript/src/specs/RNMBXShapeSourceNativeComponent.d.ts.map +1 -1
  228. package/lib/typescript/src/specs/RNMBXSnowNativeComponent.d.ts +8 -0
  229. package/lib/typescript/src/specs/RNMBXSnowNativeComponent.d.ts.map +1 -0
  230. package/lib/typescript/src/specs/RNMBXVectorSourceNativeComponent.d.ts +1 -1
  231. package/lib/typescript/src/specs/RNMBXVectorSourceNativeComponent.d.ts.map +1 -1
  232. package/lib/typescript/src/types/index.d.ts +2 -2
  233. package/lib/typescript/src/types/index.d.ts.map +1 -1
  234. package/lib/typescript/src/utils/Logger.d.ts +1 -1
  235. package/lib/typescript/src/utils/Logger.d.ts.map +1 -1
  236. package/lib/typescript/src/utils/MapboxStyles.d.ts +202 -2
  237. package/lib/typescript/src/utils/MapboxStyles.d.ts.map +1 -1
  238. package/lib/typescript/src/utils/StyleValue.d.ts +1 -1
  239. package/lib/typescript/src/utils/StyleValue.d.ts.map +1 -1
  240. package/lib/typescript/src/utils/index.d.ts +2 -2
  241. package/lib/typescript/src/utils/index.d.ts.map +1 -1
  242. package/lib/typescript/src/utils/nativeRef.d.ts +1 -1
  243. package/lib/typescript/src/utils/nativeRef.d.ts.map +1 -1
  244. package/lib/typescript/src/utils/styleMap.d.ts.map +1 -1
  245. package/lib/typescript/src/web/components/Camera.d.ts +3 -3
  246. package/lib/typescript/src/web/components/Camera.d.ts.map +1 -1
  247. package/package.json +12 -3
  248. package/plugin/build/withMapbox.d.ts +1 -1
  249. package/plugin/install.md +2 -2
  250. package/plugin/src/withMapbox.ts +2 -2
  251. package/src/Mapbox.native.ts +3 -1
  252. package/src/components/AbstractLayer.tsx +2 -2
  253. package/src/components/AbstractSource.tsx +1 -1
  254. package/src/components/Annotation.tsx +4 -4
  255. package/src/components/Callout.tsx +3 -3
  256. package/src/components/Camera.tsx +1 -1
  257. package/src/components/CameraGestureObserver.tsx +1 -1
  258. package/src/components/CircleLayer.tsx +1 -1
  259. package/src/components/CustomLocationProvider.tsx +1 -1
  260. package/src/components/FillExtrusionLayer.tsx +1 -1
  261. package/src/components/HeadingIndicator.tsx +1 -1
  262. package/src/components/HillshadeLayer.tsx +1 -1
  263. package/src/components/Image.tsx +1 -1
  264. package/src/components/ImageSource.tsx +1 -1
  265. package/src/components/Images.tsx +6 -3
  266. package/src/components/LineLayer.tsx +1 -1
  267. package/src/components/MapView.tsx +10 -5
  268. package/src/components/MarkerView.tsx +10 -3
  269. package/src/components/ModelLayer.tsx +1 -1
  270. package/src/components/NativeBridgeComponent.tsx +1 -1
  271. package/src/components/PointAnnotation.tsx +18 -5
  272. package/src/components/Rain.tsx +31 -0
  273. package/src/components/RasterArraySource.tsx +1 -1
  274. package/src/components/RasterLayer.tsx +1 -1
  275. package/src/components/RasterParticleLayer.tsx +1 -1
  276. package/src/components/RasterSource.tsx +1 -1
  277. package/src/components/ShapeSource.tsx +11 -4
  278. package/src/components/SkyLayer.tsx +1 -1
  279. package/src/components/Snow.tsx +22 -0
  280. package/src/components/SymbolLayer.tsx +1 -1
  281. package/src/components/UserLocation.tsx +2 -2
  282. package/src/components/VectorSource.tsx +2 -2
  283. package/src/modules/location/locationManager.ts +3 -3
  284. package/src/modules/offline/offlineManager.ts +1 -1
  285. package/src/shapeAnimators/ChangeLineOffsetsShapeAnimator.ts +1 -1
  286. package/src/shapeAnimators/MovePointShapeAnimator.ts +2 -2
  287. package/src/specs/RNMBXCameraNativeComponent.ts +3 -3
  288. package/src/specs/RNMBXCustomLocationProviderNativeComponent.ts +1 -1
  289. package/src/specs/RNMBXImageSourceNativeComponent.ts +1 -1
  290. package/src/specs/RNMBXMapViewNativeComponent.ts +5 -4
  291. package/src/specs/RNMBXMarkerViewNativeComponent.ts +2 -2
  292. package/src/specs/RNMBXModelLayerNativeComponent.ts +2 -2
  293. package/src/specs/RNMBXModelsNativeComponent.ts +1 -1
  294. package/src/specs/RNMBXNativeUserLocationNativeComponent.ts +1 -1
  295. package/src/specs/RNMBXRainNativeComponent.ts +13 -0
  296. package/src/specs/RNMBXRasterArraySourceNativeComponent.ts +1 -1
  297. package/src/specs/RNMBXRasterDemSourceNativeComponent.ts +1 -1
  298. package/src/specs/RNMBXRasterSourceNativeComponent.ts +1 -1
  299. package/src/specs/RNMBXShapeSourceNativeComponent.ts +4 -3
  300. package/src/specs/RNMBXSnowNativeComponent.ts +13 -0
  301. package/src/specs/RNMBXVectorSourceNativeComponent.ts +2 -2
  302. package/src/types/index.ts +2 -2
  303. package/src/utils/Logger.ts +1 -1
  304. package/src/utils/MapboxStyles.ts +222 -1
  305. package/src/utils/StyleValue.ts +1 -1
  306. package/src/utils/index.ts +3 -3
  307. package/src/utils/nativeRef.ts +1 -1
  308. package/src/utils/styleMap.ts +28 -0
  309. package/src/web/components/Camera.tsx +8 -4
@@ -3,6 +3,7 @@
3
3
  #import "RNMBXFabricHelpers.h"
4
4
 
5
5
  #import <React/RCTBridge+Private.h>
6
+ #import "RNMBXBridgeManager.h"
6
7
  #import <React/RCTConversions.h>
7
8
  #import <React/RCTFabricComponentsPlugins.h>
8
9
 
@@ -40,7 +41,7 @@ using namespace facebook::react;
40
41
  - (void)prepareView
41
42
  {
42
43
  _view = [[RNMBXBackgroundLayer alloc] init];
43
- _view.bridge = [RCTBridge currentBridge];
44
+ _view.bridge = [RNMBXBridgeManager currentBridge];
44
45
  self.contentView = _view;
45
46
  }
46
47
 
@@ -0,0 +1,8 @@
1
+ #import <React/RCTBridge.h>
2
+
3
+ @interface RNMBXBridgeManager : NSObject
4
+
5
+ + (void)setBridge:(RCTBridge *)bridge;
6
+ + (RCTBridge *)currentBridge;
7
+
8
+ @end
@@ -0,0 +1,16 @@
1
+ #import "RNMBXBridgeManager.h"
2
+ #import <React/RCTBridge+Private.h>
3
+
4
+ static __weak RCTBridge *_rnmbxBridge = nil;
5
+
6
+ @implementation RNMBXBridgeManager
7
+
8
+ + (void)setBridge:(RCTBridge *)bridge {
9
+ _rnmbxBridge = bridge;
10
+ }
11
+
12
+ + (RCTBridge *)currentBridge {
13
+ return [RCTBridge currentBridge] ?: _rnmbxBridge;
14
+ }
15
+
16
+ @end
@@ -331,8 +331,9 @@ open class RNMBXCamera : RNMBXMapAndMapViewComponentBase {
331
331
 
332
332
  func _updateMaxBounds() {
333
333
  withMapView { map in
334
+ let current = map.mapboxMap.cameraBounds
334
335
  var options = CameraBoundsOptions()
335
-
336
+
336
337
  if let maxBounds = self.maxBoundsFeature {
337
338
  logged("RNMBXCamera._updateMaxBounds._toCoordinateBounds") {
338
339
  options.bounds = try self._toCoordinateBounds(maxBounds)
@@ -342,7 +343,9 @@ open class RNMBXCamera : RNMBXMapAndMapViewComponentBase {
342
343
  }
343
344
  options.minZoom = self.minZoomLevel?.CGFloat
344
345
  options.maxZoom = self.maxZoomLevel?.CGFloat
345
-
346
+ options.minPitch = current.minPitch
347
+ options.maxPitch = current.maxPitch
348
+
346
349
  logged("RNMBXCamera._updateMaxBounds") {
347
350
  try map.mapboxMap.setCameraBounds(with: options)
348
351
  }
@@ -5,6 +5,7 @@
5
5
  #import <React/RCTConversions.h>
6
6
  #import <React/RCTFabricComponentsPlugins.h>
7
7
  #import <React/RCTBridge+Private.h>
8
+ #import "RNMBXBridgeManager.h"
8
9
 
9
10
  #import <react/renderer/components/rnmapbox_maps_specs/ComponentDescriptors.h>
10
11
  #import <react/renderer/components/rnmapbox_maps_specs/EventEmitters.h>
@@ -40,7 +41,7 @@ using namespace facebook::react;
40
41
  - (void)prepareView
41
42
  {
42
43
  _view = [[RNMBXCircleLayer alloc] init];
43
- _view.bridge = [RCTBridge currentBridge];
44
+ _view.bridge = [RNMBXBridgeManager currentBridge];
44
45
  self.contentView = _view;
45
46
  }
46
47
 
@@ -5,6 +5,7 @@
5
5
  #import <React/RCTConversions.h>
6
6
  #import <React/RCTFabricComponentsPlugins.h>
7
7
  #import <React/RCTBridge+Private.h>
8
+ #import "RNMBXBridgeManager.h"
8
9
 
9
10
  #import <react/renderer/components/rnmapbox_maps_specs/ComponentDescriptors.h>
10
11
  #import <react/renderer/components/rnmapbox_maps_specs/EventEmitters.h>
@@ -40,7 +41,7 @@ using namespace facebook::react;
40
41
  - (void)prepareView
41
42
  {
42
43
  _view = [[RNMBXFillExtrusionLayer alloc] init];
43
- _view.bridge = [RCTBridge currentBridge];
44
+ _view.bridge = [RNMBXBridgeManager currentBridge];
44
45
  self.contentView = _view;
45
46
  }
46
47
 
@@ -5,6 +5,7 @@
5
5
  #import <React/RCTConversions.h>
6
6
  #import <React/RCTFabricComponentsPlugins.h>
7
7
  #import <React/RCTBridge+Private.h>
8
+ #import "RNMBXBridgeManager.h"
8
9
 
9
10
  #import <react/renderer/components/rnmapbox_maps_specs/ComponentDescriptors.h>
10
11
  #import <react/renderer/components/rnmapbox_maps_specs/EventEmitters.h>
@@ -40,7 +41,7 @@ using namespace facebook::react;
40
41
  - (void)prepareView
41
42
  {
42
43
  _view = [[RNMBXFillLayer alloc] init];
43
- _view.bridge = [RCTBridge currentBridge];
44
+ _view.bridge = [RNMBXBridgeManager currentBridge];
44
45
  self.contentView = _view;
45
46
  }
46
47
 
@@ -5,6 +5,7 @@
5
5
  #import <React/RCTConversions.h>
6
6
  #import <React/RCTFabricComponentsPlugins.h>
7
7
  #import <React/RCTBridge+Private.h>
8
+ #import "RNMBXBridgeManager.h"
8
9
 
9
10
  #import <react/renderer/components/rnmapbox_maps_specs/ComponentDescriptors.h>
10
11
  #import <react/renderer/components/rnmapbox_maps_specs/EventEmitters.h>
@@ -40,7 +41,7 @@ using namespace facebook::react;
40
41
  - (void)prepareView
41
42
  {
42
43
  _view = [[RNMBXHeatmapLayer alloc] init];
43
- _view.bridge = [RCTBridge currentBridge];
44
+ _view.bridge = [RNMBXBridgeManager currentBridge];
44
45
  self.contentView = _view;
45
46
  }
46
47
  #pragma mark - RCTComponentViewProtocol
@@ -5,6 +5,7 @@
5
5
  #import <React/RCTConversions.h>
6
6
  #import <React/RCTFabricComponentsPlugins.h>
7
7
  #import <React/RCTBridge+Private.h>
8
+ #import "RNMBXBridgeManager.h"
8
9
 
9
10
  #import <react/renderer/components/rnmapbox_maps_specs/ComponentDescriptors.h>
10
11
  #import <react/renderer/components/rnmapbox_maps_specs/EventEmitters.h>
@@ -40,7 +41,7 @@ using namespace facebook::react;
40
41
  - (void)prepareView
41
42
  {
42
43
  _view = [[RNMBXHillshadeLayer alloc] init];
43
- _view.bridge = [RCTBridge currentBridge];
44
+ _view.bridge = [RNMBXBridgeManager currentBridge];
44
45
  self.contentView = _view;
45
46
  }
46
47
 
@@ -14,3 +14,4 @@
14
14
  @end
15
15
 
16
16
  #endif
17
+
@@ -4,15 +4,28 @@
4
4
 
5
5
  #import "RNMBXImageModule.h"
6
6
  #import "RNMBXImageComponentView.h"
7
+ #import "RNMBXBridgeManager.h"
7
8
 
8
9
  #import "rnmapbox_maps-Swift.pre.h"
9
10
 
10
- @implementation RNMBXImageModule
11
+ @implementation RNMBXImageModule {
12
+ id _bridgeBacking;
13
+ }
11
14
 
12
15
  RCT_EXPORT_MODULE();
13
16
 
14
17
  @synthesize viewRegistry_DEPRECATED = _viewRegistry_DEPRECATED;
15
- @synthesize bridge = _bridge;
18
+
19
+ - (void)setBridge:(RCTBridge *)bridge {
20
+ _bridgeBacking = bridge;
21
+ if (bridge != nil) {
22
+ [RNMBXBridgeManager setBridge:bridge];
23
+ }
24
+ }
25
+
26
+ - (RCTBridge *)bridge {
27
+ return _bridgeBacking;
28
+ }
16
29
 
17
30
  - (dispatch_queue_t)methodQueue
18
31
  {
@@ -67,7 +67,15 @@ class RNMBXImageQueueOperation : Operation {
67
67
 
68
68
  DispatchQueue.global(qos: .default).async {
69
69
  if let weakSelf = weakSelf {
70
- let loader : RCTImageLoaderProtocol = weakSelf.bridge!.module(forName: "ImageLoader", lazilyLoadIfNecessary: true) as! RCTImageLoaderProtocol
70
+ guard let bridge = weakSelf.bridge else {
71
+ Logger.log(level: .error, message: "RNMBXImageQueue: bridge is nil, cannot load image")
72
+ if let completionHandler = weakSelf.completionHandler {
73
+ completionHandler(NSError(domain: "RNMBXImageQueue", code: 1, userInfo: [NSLocalizedDescriptionKey: "bridge is nil"]), nil)
74
+ }
75
+ _ = weakSelf.setState(state:.Finished, except:.Finished)
76
+ return
77
+ }
78
+ let loader : RCTImageLoaderProtocol = bridge.module(forName: "ImageLoader", lazilyLoadIfNecessary: true) as! RCTImageLoaderProtocol
71
79
 
72
80
  let cancellationBlock = loader.loadImage(with: weakSelf.urlRequest, size: .zero, scale: CGFloat(weakSelf.scale), clipped: true, resizeMode: .stretch, progressBlock: { _,_ in }, partialLoad: { _ in }) { error, image in
73
81
  if let completionHandler = weakSelf.completionHandler {
@@ -130,6 +130,10 @@ open class RNMBXImages : UIView, RNMBXMapComponent {
130
130
  }
131
131
 
132
132
  if missingImages.count > 0 {
133
+ guard let bridge = bridge else {
134
+ Logger.log(level: .error, message: "RNMBXImages: bridge is nil, cannot fetch images. Use nativeAssetImages instead.")
135
+ return
136
+ }
133
137
  RNMBXUtils.fetchImages(bridge, style: style, objects: missingImages, forceUpdate: true) { name, image in
134
138
  self.loadedImages.insert(name)
135
139
  self.imageManager?.resolve(name: name, image: image)
@@ -5,6 +5,7 @@
5
5
  #include "RNMBXImageComponentView.h"
6
6
 
7
7
  #import <React/RCTBridge+Private.h>
8
+ #import "RNMBXBridgeManager.h"
8
9
  #import <React/RCTConversions.h>
9
10
  #import <React/RCTFabricComponentsPlugins.h>
10
11
 
@@ -42,7 +43,7 @@ using namespace facebook::react;
42
43
  - (void)prepareView
43
44
  {
44
45
  _view = [[RNMBXImages alloc] init];
45
- _view.bridge = [RCTBridge currentBridge];
46
+ _view.bridge = [RNMBXBridgeManager currentBridge];
46
47
 
47
48
  // capture weak self reference to prevent retain cycle
48
49
  __weak __typeof__(self) weakSelf = self;
@@ -3,6 +3,7 @@
3
3
  #import "RNMBXFabricHelpers.h"
4
4
 
5
5
  #import <React/RCTBridge+Private.h>
6
+ #import "RNMBXBridgeManager.h"
6
7
  #import <React/RCTConversions.h>
7
8
  #import <React/RCTFabricComponentsPlugins.h>
8
9
 
@@ -40,7 +41,7 @@ using namespace facebook::react;
40
41
  - (void)prepareView
41
42
  {
42
43
  _view = [[RNMBXLight alloc] init];
43
- _view.bridge = [RCTBridge currentBridge];
44
+ _view.bridge = [RNMBXBridgeManager currentBridge];
44
45
  self.contentView = _view;
45
46
  }
46
47
 
@@ -5,6 +5,7 @@
5
5
  #import <React/RCTConversions.h>
6
6
  #import <React/RCTFabricComponentsPlugins.h>
7
7
  #import <React/RCTBridge+Private.h>
8
+ #import "RNMBXBridgeManager.h"
8
9
 
9
10
  #import <react/renderer/components/rnmapbox_maps_specs/ComponentDescriptors.h>
10
11
  #import <react/renderer/components/rnmapbox_maps_specs/EventEmitters.h>
@@ -40,7 +41,7 @@ using namespace facebook::react;
40
41
  - (void)prepareView
41
42
  {
42
43
  _view = [[RNMBXLineLayer alloc] init];
43
- _view.bridge = [RCTBridge currentBridge];
44
+ _view.bridge = [RNMBXBridgeManager currentBridge];
44
45
  self.contentView = _view;
45
46
  }
46
47
 
@@ -823,6 +823,7 @@ open class RNMBXMapView: UIView, RCTInvalidating {
823
823
  var scaleBarEnabled: Bool? = nil
824
824
  var scaleBarPosition: OrnamentPosition? = nil
825
825
  var scaleBarMargins: CGPoint? = nil
826
+ var scaleBarUnits: String? = nil
826
827
 
827
828
  @objc public func setReactScaleBarEnabled(_ value: Bool) {
828
829
  scaleBarEnabled = value
@@ -836,6 +837,11 @@ open class RNMBXMapView: UIView, RCTInvalidating {
836
837
  }
837
838
  }
838
839
 
840
+ @objc public func setReactScaleBarUnits(_ value: NSString?) {
841
+ scaleBarUnits = value as? String
842
+ changed(.scaleBar)
843
+ }
844
+
839
845
  func applyScaleBar() {
840
846
  if let enabled = scaleBarEnabled {
841
847
  mapView.ornaments.options.scaleBar.visibility = enabled ? .visible : .hidden
@@ -846,6 +852,16 @@ open class RNMBXMapView: UIView, RCTInvalidating {
846
852
  if let margins = scaleBarMargins {
847
853
  mapView.ornaments.options.scaleBar.margins = margins
848
854
  }
855
+ if let units = scaleBarUnits {
856
+ switch units {
857
+ case "imperial":
858
+ mapView.ornaments.options.scaleBar.units = .imperial
859
+ case "nautical":
860
+ mapView.ornaments.options.scaleBar.units = .nautical
861
+ default:
862
+ mapView.ornaments.options.scaleBar.units = .metric
863
+ }
864
+ }
849
865
  }
850
866
 
851
867
  @objc override public func didSetProps(_ props: [String]) {
@@ -185,6 +185,11 @@ using namespace facebook::react;
185
185
  _view.reactScaleBarPosition = scaleBarPosition;
186
186
  }
187
187
 
188
+ id scaleBarUnits = RNMBXConvertFollyDynamicToId(newViewProps.scaleBarUnits);
189
+ if (scaleBarUnits != nil) {
190
+ [_view setReactScaleBarUnits:scaleBarUnits];
191
+ }
192
+
188
193
  RNMBX_REMAP_OPTIONAL_PROP_BOOL(zoomEnabled, reactZoomEnabled)
189
194
 
190
195
  RNMBX_REMAP_OPTIONAL_PROP_BOOL(scrollEnabled, reactScrollEnabled)
@@ -192,6 +197,11 @@ using namespace facebook::react;
192
197
  RNMBX_REMAP_OPTIONAL_PROP_BOOL(rotateEnabled, reactRotateEnabled)
193
198
 
194
199
  RNMBX_REMAP_OPTIONAL_PROP_BOOL(pitchEnabled, reactPitchEnabled)
200
+
201
+ id maxPitch = RNMBXConvertFollyDynamicToId(newViewProps.maxPitch);
202
+ if (maxPitch != nil) {
203
+ _view.reactMaxPitch = maxPitch;
204
+ }
195
205
 
196
206
  RNMBX_REMAP_OPTIONAL_PROP_NSDictionary(gestureSettings, reactGestureSettings)
197
207
 
@@ -5,6 +5,7 @@
5
5
  #import <React/RCTConversions.h>
6
6
  #import <React/RCTFabricComponentsPlugins.h>
7
7
  #import <React/RCTBridge+Private.h>
8
+ #import "RNMBXBridgeManager.h"
8
9
 
9
10
  #import <react/renderer/components/rnmapbox_maps_specs/ComponentDescriptors.h>
10
11
  #import <react/renderer/components/rnmapbox_maps_specs/EventEmitters.h>
@@ -40,7 +41,7 @@ using namespace facebook::react;
40
41
  - (void)prepareView
41
42
  {
42
43
  _view = [[RNMBXModelLayer alloc] init];
43
- _view.bridge = [RCTBridge currentBridge];
44
+ _view.bridge = [RNMBXBridgeManager currentBridge];
44
45
  self.contentView = _view;
45
46
  }
46
47
 
@@ -0,0 +1,92 @@
1
+ @_spi(Experimental) import MapboxMaps
2
+
3
+ @objc(RNMBXRain)
4
+ public class RNMBXRain : RNMBXSingletonLayer, RNMBXMapComponent, RNMBXSourceConsumer {
5
+ var rain : Rain? = nil
6
+
7
+ func makeRain() -> Rain {
8
+ return Rain()
9
+ }
10
+
11
+ public func addToMap(_ map: RNMBXMapView, style: Style) {
12
+ self.map = map
13
+ self.style = style
14
+
15
+ warnIfMeasureLightUnavailable(style: style)
16
+
17
+ let rain = self.makeRain()
18
+ self.rain = rain
19
+ addStylesAndUpdate()
20
+ }
21
+
22
+ private func warnIfMeasureLightUnavailable(style: Style) {
23
+ let hasLights = !style.allLightIdentifiers.isEmpty
24
+ if hasLights { return }
25
+
26
+ let affectedProps = ["color", "opacity", "vignetteColor"]
27
+ let missingProps = affectedProps.filter { reactStyle?[$0] == nil }
28
+ if missingProps.isEmpty { return }
29
+
30
+ Logger.log(level: .warn, message: "RNMBXRain: The current style has no 3D lights, so " +
31
+ "measure-light(\"brightness\") expressions used in default rain " +
32
+ "\(missingProps.joined(separator: ", ")) will fail. Use a Standard style or set " +
33
+ "explicit values for: \(missingProps.joined(separator: ", "))")
34
+ }
35
+
36
+ public func removeFromMap(_ map: RNMBXMapView, reason _: RemovalReason) -> Bool {
37
+ self.map = nil
38
+
39
+ guard let mapboxMap = map.mapboxMap else {
40
+ return false
41
+ }
42
+
43
+ let style = mapboxMap.style
44
+ removeFromMap(map, style: style)
45
+ return true
46
+ }
47
+
48
+ public func waitForStyleLoad() -> Bool {
49
+ return true
50
+ }
51
+
52
+ func removeFromMap(_ map: RNMBXMapView, style: Style) {
53
+ logged("RNMBXRain.removeFromMap") {
54
+ try style.removeRain()
55
+ }
56
+ }
57
+
58
+ override func addStylesAndUpdate() {
59
+ guard rain != nil else {
60
+ return
61
+ }
62
+
63
+ super.addStylesAndUpdate()
64
+ }
65
+
66
+ override func addStyles() {
67
+ if let style : Style = self.style,
68
+ let reactStyle = self.reactStyle {
69
+ let styler = RNMBXStyle(style: style)
70
+ styler.bridge = self.bridge
71
+
72
+ if var rain = rain {
73
+ styler.rainLayer(
74
+ layer: &rain,
75
+ reactStyle: reactStyle,
76
+ oldReactStyle: oldReactStyle,
77
+ applyUpdater: { (updater) in fatalError("Rain: TODO - implement apply updater")},
78
+ isValid: { fatalError("Rain: TODO - no isValid") }
79
+ )
80
+ self.rain = rain
81
+ } else {
82
+ fatalError("[xxx] rain is nil \(optional: self.rain)")
83
+ }
84
+ }
85
+ }
86
+
87
+ override func apply(style : Style) throws {
88
+ if let rain = rain {
89
+ try style.setRain(rain)
90
+ }
91
+ }
92
+ }
@@ -0,0 +1,14 @@
1
+ #ifdef __cplusplus
2
+
3
+ #import <UIKit/UIKit.h>
4
+
5
+ #import <React/RCTUIManager.h>
6
+ #import <React/RCTViewComponentView.h>
7
+
8
+ NS_ASSUME_NONNULL_BEGIN
9
+
10
+ @interface RNMBXRainComponentView : RCTViewComponentView
11
+ @end
12
+
13
+ NS_ASSUME_NONNULL_END
14
+ #endif // __cplusplus
@@ -0,0 +1,80 @@
1
+
2
+ #import "RNMBXRainComponentView.h"
3
+ #import "RNMBXFabricHelpers.h"
4
+
5
+ #import <React/RCTBridge+Private.h>
6
+ #import "RNMBXBridgeManager.h"
7
+ #import <React/RCTConversions.h>
8
+ #import <React/RCTFabricComponentsPlugins.h>
9
+
10
+ #import <react/renderer/components/rnmapbox_maps_specs/ComponentDescriptors.h>
11
+ #import <react/renderer/components/rnmapbox_maps_specs/EventEmitters.h>
12
+ #import <react/renderer/components/rnmapbox_maps_specs/Props.h>
13
+ #import <react/renderer/components/rnmapbox_maps_specs/RCTComponentViewHelpers.h>
14
+
15
+ using namespace facebook::react;
16
+
17
+ @interface RNMBXRainComponentView () <RCTRNMBXRainViewProtocol>
18
+ @end
19
+
20
+ @implementation RNMBXRainComponentView {
21
+ RNMBXRain *_view;
22
+ }
23
+
24
+ // Needed because of this: https://github.com/facebook/react-native/pull/37274
25
+ + (void)load
26
+ {
27
+ [super load];
28
+ }
29
+
30
+ - (instancetype)initWithFrame:(CGRect)frame
31
+ {
32
+ if (self = [super initWithFrame:frame]) {
33
+ static const auto defaultProps = std::make_shared<const RNMBXRainProps>();
34
+ _props = defaultProps;
35
+ [self prepareView];
36
+ }
37
+
38
+ return self;
39
+ }
40
+
41
+ - (void)prepareView
42
+ {
43
+ _view = [[RNMBXRain alloc] init];
44
+ _view.bridge = [RNMBXBridgeManager currentBridge];
45
+
46
+ self.contentView = _view;
47
+ }
48
+
49
+ #pragma mark - RCTComponentViewProtocol
50
+
51
+ + (ComponentDescriptorProvider)componentDescriptorProvider
52
+ {
53
+ return concreteComponentDescriptorProvider<RNMBXRainComponentDescriptor>();
54
+ }
55
+
56
+
57
+ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared &)oldProps
58
+ {
59
+ const auto &newProps = static_cast<const RNMBXRainProps &>(*props);
60
+ id reactStyle = RNMBXConvertFollyDynamicToId(newProps.reactStyle);
61
+ if (reactStyle != nil) {
62
+ _view.reactStyle = reactStyle;
63
+ }
64
+
65
+ [super updateProps:props oldProps:oldProps];
66
+ }
67
+
68
+ - (void)prepareForRecycle
69
+ {
70
+ [super prepareForRecycle];
71
+ [self prepareView];
72
+ }
73
+
74
+
75
+ @end
76
+
77
+ Class<RCTComponentViewProtocol> RNMBXRainCls(void)
78
+ {
79
+ return RNMBXRainComponentView.class;
80
+ }
@@ -5,6 +5,7 @@
5
5
  #import <React/RCTConversions.h>
6
6
  #import <React/RCTFabricComponentsPlugins.h>
7
7
  #import <React/RCTBridge+Private.h>
8
+ #import "RNMBXBridgeManager.h"
8
9
 
9
10
  #import <react/renderer/components/rnmapbox_maps_specs/ComponentDescriptors.h>
10
11
  #import <react/renderer/components/rnmapbox_maps_specs/EventEmitters.h>
@@ -40,7 +41,7 @@ using namespace facebook::react;
40
41
  - (void)prepareView
41
42
  {
42
43
  _view = [[RNMBXRasterLayer alloc] init];
43
- _view.bridge = [RCTBridge currentBridge];
44
+ _view.bridge = [RNMBXBridgeManager currentBridge];
44
45
  self.contentView = _view;
45
46
  }
46
47
 
@@ -5,6 +5,7 @@
5
5
  #import <React/RCTConversions.h>
6
6
  #import <React/RCTFabricComponentsPlugins.h>
7
7
  #import <React/RCTBridge+Private.h>
8
+ #import "RNMBXBridgeManager.h"
8
9
 
9
10
  #import <react/renderer/components/rnmapbox_maps_specs/ComponentDescriptors.h>
10
11
  #import <react/renderer/components/rnmapbox_maps_specs/EventEmitters.h>
@@ -40,7 +41,7 @@ using namespace facebook::react;
40
41
  - (void)prepareView
41
42
  {
42
43
  _view = [[RNMBXRasterParticleLayer alloc] init];
43
- _view.bridge = [RCTBridge currentBridge];
44
+ _view.bridge = [RNMBXBridgeManager currentBridge];
44
45
  self.contentView = _view;
45
46
  }
46
47
 
@@ -85,6 +85,7 @@ public class RNMBXShapeSource : RNMBXSource {
85
85
  @objc public var clusterProperties : [String: [Any]]?;
86
86
 
87
87
  @objc public var maxZoomLevel : NSNumber?
88
+ @objc public var minZoomLevel : NSNumber?
88
89
  @objc public var buffer : NSNumber?
89
90
  @objc public var tolerance : NSNumber?
90
91
  @objc public var lineMetrics : Bool = false
@@ -136,6 +137,10 @@ public class RNMBXShapeSource : RNMBXSource {
136
137
  result.maxzoom = maxZoomLevel.doubleValue
137
138
  }
138
139
 
140
+ if let minZoomLevel = minZoomLevel {
141
+ result.minzoom = minZoomLevel.doubleValue
142
+ }
143
+
139
144
  if let buffer = buffer {
140
145
  result.buffer = buffer.doubleValue
141
146
  }
@@ -102,6 +102,7 @@ using namespace facebook::react;
102
102
  RNMBX_OPTIONAL_PROP_NSNumber(clusterMaxZoomLevel)
103
103
  RNMBX_OPTIONAL_PROP_NSDictionary(clusterProperties)
104
104
  RNMBX_OPTIONAL_PROP_NSNumber(maxZoomLevel)
105
+ RNMBX_OPTIONAL_PROP_NSNumber(minZoomLevel)
105
106
  RNMBX_OPTIONAL_PROP_NSNumber(buffer)
106
107
  RNMBX_OPTIONAL_PROP_NSNumber(tolerance)
107
108
  RNMBX_OPTIONAL_PROP_BOOL(lineMetrics)
@@ -5,6 +5,7 @@
5
5
  #import <React/RCTConversions.h>
6
6
  #import <React/RCTFabricComponentsPlugins.h>
7
7
  #import <React/RCTBridge+Private.h>
8
+ #import "RNMBXBridgeManager.h"
8
9
 
9
10
  #import <react/renderer/components/rnmapbox_maps_specs/ComponentDescriptors.h>
10
11
  #import <react/renderer/components/rnmapbox_maps_specs/EventEmitters.h>
@@ -40,7 +41,7 @@ using namespace facebook::react;
40
41
  - (void)prepareView
41
42
  {
42
43
  _view = [[RNMBXSkyLayer alloc] init];
43
- _view.bridge = [RCTBridge currentBridge];
44
+ _view.bridge = [RNMBXBridgeManager currentBridge];
44
45
  self.contentView = _view;
45
46
  }
46
47