@rnmapbox/maps 10.1.0-beta.11 → 10.1.0-beta.14

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 (510) hide show
  1. package/android/src/main/java/com/rnmapbox/rnmbx/RNMBXPackage.kt +19 -8
  2. package/android/src/main/java/com/rnmapbox/rnmbx/components/AbstractMapFeature.kt +2 -0
  3. package/android/src/main/java/com/rnmapbox/rnmbx/components/camera/RNMBXCamera.kt +66 -9
  4. package/android/src/main/java/com/rnmapbox/rnmbx/components/location/LocationComponentManager.kt +1 -1
  5. package/android/src/main/java/com/rnmapbox/rnmbx/components/location/UserTrackingMode.kt +1 -0
  6. package/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/NativeMapViewModule.kt +1 -1
  7. package/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXAndroidTextureMapViewManager.kt +1 -1
  8. package/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapView.kt +22 -19
  9. package/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapViewManager.kt +52 -1
  10. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXSkyLayerManager.kt +0 -6
  11. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXImageSource.kt +1 -1
  12. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXShapeSource.kt +21 -23
  13. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXShapeSourceManager.kt +0 -46
  14. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXShapeSourceModule.kt +61 -0
  15. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/{RCTSource.kt → RNMBXSource.kt} +8 -8
  16. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXTileSource.kt +1 -1
  17. package/android/src/main/java/com/rnmapbox/rnmbx/events/FeatureClickEvent.java +4 -4
  18. package/android/src/main/java/com/rnmapbox/rnmbx/utils/ViewTagResolver.kt +6 -5
  19. package/android/src/main/java/com/rnmapbox/rnmbx/utils/extensions/ReadableMap.kt +35 -0
  20. package/android/src/main/mapbox-v11-compat/v11/com/{mapbox → rnmapbox}/rnmbx/v11compat/Image.kt +1 -1
  21. package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXImageSourceManagerDelegate.java +41 -0
  22. package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXImageSourceManagerInterface.java +20 -0
  23. package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXMapViewManagerDelegate.java +3 -0
  24. package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXMapViewManagerInterface.java +1 -0
  25. package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXRasterDemSourceManagerDelegate.java +50 -0
  26. package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXRasterDemSourceManagerInterface.java +23 -0
  27. package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXRasterSourceManagerDelegate.java +56 -0
  28. package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXRasterSourceManagerInterface.java +25 -0
  29. package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXShapeSourceManagerDelegate.java +77 -0
  30. package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXShapeSourceManagerInterface.java +32 -0
  31. package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXVectorSourceManagerDelegate.java +59 -0
  32. package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXVectorSourceManagerInterface.java +26 -0
  33. package/android/src/main/old-arch/com/rnmapbox/rnmbx/NativeRNMBXShapeSourceModuleSpec.java +48 -0
  34. package/ios/RNMBX/CustomHttpHeaders.swift +11 -0
  35. package/ios/RNMBX/RNMBXBackgroundLayerComponentView.mm +2 -0
  36. package/ios/RNMBX/RNMBXCircleLayerComponentView.mm +2 -0
  37. package/ios/RNMBX/RNMBXFillExtrusionLayerComponentView.mm +3 -1
  38. package/ios/RNMBX/RNMBXFillLayerComponentView.mm +2 -0
  39. package/ios/RNMBX/RNMBXHeatmapLayerComponentView.mm +2 -0
  40. package/ios/RNMBX/RNMBXImageSource.swift +3 -3
  41. package/ios/RNMBX/RNMBXImageSourceComponentView.h +15 -0
  42. package/ios/RNMBX/RNMBXImageSourceComponentView.mm +100 -0
  43. package/ios/RNMBX/{RNMBXImageSourceManager.m → RNMBXImageSourceViewManager.m} +1 -1
  44. package/ios/RNMBX/{RNMBXImageSourceManager.swift → RNMBXImageSourceViewManager.swift} +2 -2
  45. package/ios/RNMBX/RNMBXInteractiveElement.swift +7 -7
  46. package/ios/RNMBX/RNMBXLayer.swift +1 -1
  47. package/ios/RNMBX/RNMBXLineLayerComponentView.mm +2 -0
  48. package/ios/RNMBX/RNMBXMapFeatureView.h +7 -0
  49. package/ios/RNMBX/RNMBXMapView.swift +56 -1
  50. package/ios/RNMBX/RNMBXMapViewManager.m +2 -0
  51. package/ios/RNMBX/RNMBXRasterDemSource.swift +6 -6
  52. package/ios/RNMBX/RNMBXRasterDemSourceComponentView.h +17 -0
  53. package/ios/RNMBX/RNMBXRasterDemSourceComponentView.mm +116 -0
  54. package/ios/RNMBX/{RNMBXRasterDemSourceManager.m → RNMBXRasterDemSourceViewManager.m} +1 -7
  55. package/ios/RNMBX/{RNMBXRasterDemSourceManager.swift → RNMBXRasterDemSourceViewManager.swift} +2 -2
  56. package/ios/RNMBX/RNMBXRasterLayerComponentView.mm +2 -0
  57. package/ios/RNMBX/RNMBXRasterSource.swift +8 -8
  58. package/ios/RNMBX/RNMBXRasterSourceComponentView.h +17 -0
  59. package/ios/RNMBX/RNMBXRasterSourceComponentView.mm +124 -0
  60. package/ios/RNMBX/{RNMBXRasterSourceManager.m → RNMBXRasterSourceViewManager.m} +1 -1
  61. package/ios/RNMBX/{RNMBXRasterSourceManager.swift → RNMBXRasterSourceViewManager.swift} +2 -2
  62. package/ios/RNMBX/RNMBXShapeSource.swift +11 -11
  63. package/ios/RNMBX/RNMBXShapeSourceComponentView.h +17 -0
  64. package/ios/RNMBX/RNMBXShapeSourceComponentView.mm +153 -0
  65. package/ios/RNMBX/RNMBXShapeSourceModule.h +18 -0
  66. package/ios/RNMBX/RNMBXShapeSourceModule.mm +87 -0
  67. package/ios/RNMBX/RNMBXShapeSourceViewManager.m +26 -0
  68. package/ios/RNMBX/{RNMBXShapeSourceManager.swift → RNMBXShapeSourceViewManager.swift} +12 -42
  69. package/ios/RNMBX/RNMBXSkyLayerComponentView.mm +2 -0
  70. package/ios/RNMBX/RNMBXSource.swift +36 -27
  71. package/ios/RNMBX/RNMBXSymbolLayerComponentView.mm +2 -0
  72. package/ios/RNMBX/RNMBXTileSource.swift +2 -2
  73. package/ios/RNMBX/RNMBXVectorSource.swift +6 -6
  74. package/ios/RNMBX/RNMBXVectorSourceComponentView.h +17 -0
  75. package/ios/RNMBX/RNMBXVectorSourceComponentView.mm +141 -0
  76. package/ios/RNMBX/{RNMBXVectorSourceManager.m → RNMBXVectorSourceViewManager.m} +1 -1
  77. package/ios/RNMBX/{RNMBXVectorSourceManager.swift → RNMBXVectorSourceViewManager.swift} +2 -2
  78. package/ios/install.md +2 -1
  79. package/lib/commonjs/components/AbstractLayer.js +1 -2
  80. package/lib/commonjs/components/AbstractLayer.js.map +1 -1
  81. package/lib/commonjs/components/Annotation.js +2 -3
  82. package/lib/commonjs/components/Annotation.js.map +1 -1
  83. package/lib/commonjs/components/Camera.js +7 -10
  84. package/lib/commonjs/components/Camera.js.map +1 -1
  85. package/lib/commonjs/components/ImageSource.js +10 -7
  86. package/lib/commonjs/components/ImageSource.js.map +1 -1
  87. package/lib/commonjs/components/Light.js +1 -2
  88. package/lib/commonjs/components/Light.js.map +1 -1
  89. package/lib/commonjs/components/MapView.js +2 -5
  90. package/lib/commonjs/components/MapView.js.map +1 -1
  91. package/lib/commonjs/components/RasterDemSource.js +11 -8
  92. package/lib/commonjs/components/RasterDemSource.js.map +1 -1
  93. package/lib/commonjs/components/RasterSource.js +11 -8
  94. package/lib/commonjs/components/RasterSource.js.map +1 -1
  95. package/lib/commonjs/components/ShapeSource.js +32 -54
  96. package/lib/commonjs/components/ShapeSource.js.map +1 -1
  97. package/lib/commonjs/components/SymbolLayer.js +1 -1
  98. package/lib/commonjs/components/SymbolLayer.js.map +1 -1
  99. package/lib/commonjs/components/VectorSource.js +26 -39
  100. package/lib/commonjs/components/VectorSource.js.map +1 -1
  101. package/lib/commonjs/specs/NativeRNMBXShapeSourceModule.js +10 -0
  102. package/lib/commonjs/specs/NativeRNMBXShapeSourceModule.js.map +1 -0
  103. package/lib/commonjs/specs/RNMBXBackgroundLayerNativeComponent.js +1 -0
  104. package/lib/commonjs/specs/RNMBXBackgroundLayerNativeComponent.js.map +1 -1
  105. package/lib/commonjs/specs/RNMBXCameraNativeComponent.js +1 -0
  106. package/lib/commonjs/specs/RNMBXCameraNativeComponent.js.map +1 -1
  107. package/lib/commonjs/specs/RNMBXCircleLayerNativeComponent.js +1 -0
  108. package/lib/commonjs/specs/RNMBXCircleLayerNativeComponent.js.map +1 -1
  109. package/lib/commonjs/specs/RNMBXFillExtrusionLayerNativeComponent.js +1 -0
  110. package/lib/commonjs/specs/RNMBXFillExtrusionLayerNativeComponent.js.map +1 -1
  111. package/lib/commonjs/specs/RNMBXFillLayerNativeComponent.js +1 -0
  112. package/lib/commonjs/specs/RNMBXFillLayerNativeComponent.js.map +1 -1
  113. package/lib/commonjs/specs/RNMBXHeatmapLayerNativeComponent.js +1 -0
  114. package/lib/commonjs/specs/RNMBXHeatmapLayerNativeComponent.js.map +1 -1
  115. package/lib/commonjs/specs/RNMBXImageSourceNativeComponent.js +10 -0
  116. package/lib/commonjs/specs/RNMBXImageSourceNativeComponent.js.map +1 -0
  117. package/lib/commonjs/specs/RNMBXLineLayerNativeComponent.js +1 -0
  118. package/lib/commonjs/specs/RNMBXLineLayerNativeComponent.js.map +1 -1
  119. package/lib/commonjs/specs/RNMBXMapViewNativeComponent.js +1 -0
  120. package/lib/commonjs/specs/RNMBXMapViewNativeComponent.js.map +1 -1
  121. package/lib/commonjs/specs/RNMBXRasterDemSourceNativeComponent.js +10 -0
  122. package/lib/commonjs/specs/RNMBXRasterDemSourceNativeComponent.js.map +1 -0
  123. package/lib/commonjs/specs/RNMBXRasterLayerNativeComponent.js +1 -0
  124. package/lib/commonjs/specs/RNMBXRasterLayerNativeComponent.js.map +1 -1
  125. package/lib/commonjs/specs/RNMBXRasterSourceNativeComponent.js +10 -0
  126. package/lib/commonjs/specs/RNMBXRasterSourceNativeComponent.js.map +1 -0
  127. package/lib/commonjs/specs/RNMBXShapeSourceNativeComponent.js +10 -0
  128. package/lib/commonjs/specs/RNMBXShapeSourceNativeComponent.js.map +1 -0
  129. package/lib/commonjs/specs/RNMBXSkyLayerNativeComponent.js +1 -0
  130. package/lib/commonjs/specs/RNMBXSkyLayerNativeComponent.js.map +1 -1
  131. package/lib/commonjs/specs/RNMBXSymbolLayerNativeComponent.js +1 -0
  132. package/lib/commonjs/specs/RNMBXSymbolLayerNativeComponent.js.map +1 -1
  133. package/lib/commonjs/specs/RNMBXVectorSourceNativeComponent.js +10 -0
  134. package/lib/commonjs/specs/RNMBXVectorSourceNativeComponent.js.map +1 -0
  135. package/lib/commonjs/utils/Logger.js +1 -2
  136. package/lib/commonjs/utils/Logger.js.map +1 -1
  137. package/lib/module/components/AbstractLayer.js +1 -2
  138. package/lib/module/components/AbstractLayer.js.map +1 -1
  139. package/lib/module/components/Annotation.js +2 -3
  140. package/lib/module/components/Annotation.js.map +1 -1
  141. package/lib/module/components/Camera.js +7 -10
  142. package/lib/module/components/Camera.js.map +1 -1
  143. package/lib/module/components/ImageSource.js +10 -7
  144. package/lib/module/components/ImageSource.js.map +1 -1
  145. package/lib/module/components/Light.js +1 -2
  146. package/lib/module/components/Light.js.map +1 -1
  147. package/lib/module/components/MapView.js +2 -5
  148. package/lib/module/components/MapView.js.map +1 -1
  149. package/lib/module/components/RasterDemSource.js +11 -8
  150. package/lib/module/components/RasterDemSource.js.map +1 -1
  151. package/lib/module/components/RasterSource.js +11 -8
  152. package/lib/module/components/RasterSource.js.map +1 -1
  153. package/lib/module/components/ShapeSource.js +33 -55
  154. package/lib/module/components/ShapeSource.js.map +1 -1
  155. package/lib/module/components/SymbolLayer.js +1 -1
  156. package/lib/module/components/SymbolLayer.js.map +1 -1
  157. package/lib/module/components/VectorSource.js +28 -41
  158. package/lib/module/components/VectorSource.js.map +1 -1
  159. package/lib/module/specs/NativeRNMBXShapeSourceModule.js +5 -0
  160. package/lib/module/specs/NativeRNMBXShapeSourceModule.js.map +1 -0
  161. package/lib/module/specs/RNMBXBackgroundLayerNativeComponent.js +3 -0
  162. package/lib/module/specs/RNMBXBackgroundLayerNativeComponent.js.map +1 -1
  163. package/lib/module/specs/RNMBXCameraNativeComponent.js +3 -0
  164. package/lib/module/specs/RNMBXCameraNativeComponent.js.map +1 -1
  165. package/lib/module/specs/RNMBXCircleLayerNativeComponent.js +3 -0
  166. package/lib/module/specs/RNMBXCircleLayerNativeComponent.js.map +1 -1
  167. package/lib/module/specs/RNMBXFillExtrusionLayerNativeComponent.js +3 -0
  168. package/lib/module/specs/RNMBXFillExtrusionLayerNativeComponent.js.map +1 -1
  169. package/lib/module/specs/RNMBXFillLayerNativeComponent.js +3 -0
  170. package/lib/module/specs/RNMBXFillLayerNativeComponent.js.map +1 -1
  171. package/lib/module/specs/RNMBXHeatmapLayerNativeComponent.js +3 -0
  172. package/lib/module/specs/RNMBXHeatmapLayerNativeComponent.js.map +1 -1
  173. package/lib/module/specs/RNMBXImageSourceNativeComponent.js +3 -0
  174. package/lib/module/specs/RNMBXImageSourceNativeComponent.js.map +1 -0
  175. package/lib/module/specs/RNMBXLineLayerNativeComponent.js +3 -0
  176. package/lib/module/specs/RNMBXLineLayerNativeComponent.js.map +1 -1
  177. package/lib/module/specs/RNMBXMapViewNativeComponent.js +3 -0
  178. package/lib/module/specs/RNMBXMapViewNativeComponent.js.map +1 -1
  179. package/lib/module/specs/RNMBXRasterDemSourceNativeComponent.js +3 -0
  180. package/lib/module/specs/RNMBXRasterDemSourceNativeComponent.js.map +1 -0
  181. package/lib/module/specs/RNMBXRasterLayerNativeComponent.js +3 -0
  182. package/lib/module/specs/RNMBXRasterLayerNativeComponent.js.map +1 -1
  183. package/lib/module/specs/RNMBXRasterSourceNativeComponent.js +3 -0
  184. package/lib/module/specs/RNMBXRasterSourceNativeComponent.js.map +1 -0
  185. package/lib/module/specs/RNMBXShapeSourceNativeComponent.js +3 -0
  186. package/lib/module/specs/RNMBXShapeSourceNativeComponent.js.map +1 -0
  187. package/lib/module/specs/RNMBXSkyLayerNativeComponent.js +3 -0
  188. package/lib/module/specs/RNMBXSkyLayerNativeComponent.js.map +1 -1
  189. package/lib/module/specs/RNMBXSymbolLayerNativeComponent.js +3 -0
  190. package/lib/module/specs/RNMBXSymbolLayerNativeComponent.js.map +1 -1
  191. package/lib/module/specs/RNMBXVectorSourceNativeComponent.js +3 -0
  192. package/lib/module/specs/RNMBXVectorSourceNativeComponent.js.map +1 -0
  193. package/lib/module/utils/Logger.js +1 -2
  194. package/lib/module/utils/Logger.js.map +1 -1
  195. package/lib/typescript/jest.config.d.ts +4 -0
  196. package/lib/typescript/jest.config.d.ts.map +1 -0
  197. package/lib/typescript/src/Mapbox.d.ts.map +1 -0
  198. package/lib/typescript/src/RNMBXModule.d.ts.map +1 -0
  199. package/lib/typescript/src/components/AbstractLayer.d.ts.map +1 -0
  200. package/lib/typescript/src/components/AbstractSource.d.ts.map +1 -0
  201. package/lib/typescript/src/components/Annotation.d.ts.map +1 -0
  202. package/lib/typescript/src/components/Atmosphere.d.ts.map +1 -0
  203. package/lib/typescript/src/components/BackgroundLayer.d.ts.map +1 -0
  204. package/lib/typescript/src/components/Callout.d.ts.map +1 -0
  205. package/lib/typescript/src/components/Camera.d.ts.map +1 -0
  206. package/lib/typescript/src/components/CircleLayer.d.ts.map +1 -0
  207. package/lib/typescript/src/components/FillExtrusionLayer.d.ts.map +1 -0
  208. package/lib/typescript/src/components/FillLayer.d.ts.map +1 -0
  209. package/lib/typescript/src/components/HeadingIndicator.d.ts.map +1 -0
  210. package/lib/typescript/src/components/HeatmapLayer.d.ts.map +1 -0
  211. package/lib/typescript/src/components/Image.d.ts.map +1 -0
  212. package/lib/typescript/src/components/ImageSource.d.ts.map +1 -0
  213. package/lib/typescript/src/components/Images.d.ts.map +1 -0
  214. package/lib/typescript/src/components/Light.d.ts.map +1 -0
  215. package/lib/typescript/src/components/LineLayer.d.ts.map +1 -0
  216. package/lib/typescript/{components → src/components}/MapView.d.ts +64 -0
  217. package/lib/typescript/src/components/MapView.d.ts.map +1 -0
  218. package/lib/typescript/src/components/MarkerView.d.ts.map +1 -0
  219. package/lib/typescript/src/components/NativeBridgeComponent.d.ts.map +1 -0
  220. package/lib/typescript/src/components/NativeUserLocation.d.ts.map +1 -0
  221. package/lib/typescript/src/components/PointAnnotation.d.ts.map +1 -0
  222. package/lib/typescript/{components → src/components}/RasterDemSource.d.ts +0 -1
  223. package/lib/typescript/src/components/RasterDemSource.d.ts.map +1 -0
  224. package/lib/typescript/src/components/RasterLayer.d.ts.map +1 -0
  225. package/lib/typescript/{components → src/components}/RasterSource.d.ts +0 -1
  226. package/lib/typescript/src/components/RasterSource.d.ts.map +1 -0
  227. package/lib/typescript/{components → src/components}/ShapeSource.d.ts +2 -58
  228. package/lib/typescript/src/components/ShapeSource.d.ts.map +1 -0
  229. package/lib/typescript/src/components/SkyLayer.d.ts.map +1 -0
  230. package/lib/typescript/src/components/Style.d.ts.map +1 -0
  231. package/lib/typescript/src/components/StyleImport.d.ts.map +1 -0
  232. package/lib/typescript/src/components/SymbolLayer.d.ts.map +1 -0
  233. package/lib/typescript/src/components/Terrain.d.ts.map +1 -0
  234. package/lib/typescript/src/components/UserLocation.d.ts.map +1 -0
  235. package/lib/typescript/src/components/VectorSource.d.ts +88 -0
  236. package/lib/typescript/src/components/VectorSource.d.ts.map +1 -0
  237. package/lib/typescript/src/index.d.ts.map +1 -0
  238. package/lib/typescript/src/modules/location/locationManager.d.ts.map +1 -0
  239. package/lib/typescript/src/modules/offline/OfflineCreatePackOptions.d.ts.map +1 -0
  240. package/lib/typescript/src/modules/offline/OfflinePack.d.ts.map +1 -0
  241. package/lib/typescript/src/modules/offline/offlineManager.d.ts.map +1 -0
  242. package/lib/typescript/src/modules/snapshot/SnapshotOptions.d.ts.map +1 -0
  243. package/lib/typescript/src/modules/snapshot/snapshotManager.d.ts.map +1 -0
  244. package/lib/typescript/src/requestAndroidLocationPermissions.d.ts.map +1 -0
  245. package/lib/typescript/src/specs/NativeMapViewModule.d.ts.map +1 -0
  246. package/lib/typescript/src/specs/NativeRNMBXShapeSourceModule.d.ts +11 -0
  247. package/lib/typescript/src/specs/NativeRNMBXShapeSourceModule.d.ts.map +1 -0
  248. package/lib/typescript/src/specs/RNMBXAndroidTextureMapViewNativeComponent.d.ts.map +1 -0
  249. package/lib/typescript/src/specs/RNMBXAtmosphereNativeComponent.d.ts.map +1 -0
  250. package/lib/typescript/{specs → src/specs}/RNMBXBackgroundLayerNativeComponent.d.ts +7 -6
  251. package/lib/typescript/src/specs/RNMBXBackgroundLayerNativeComponent.d.ts.map +1 -0
  252. package/lib/typescript/{specs → src/specs}/RNMBXCameraNativeComponent.d.ts +12 -11
  253. package/lib/typescript/src/specs/RNMBXCameraNativeComponent.d.ts.map +1 -0
  254. package/lib/typescript/src/specs/RNMBXCircleLayerNativeComponent.d.ts +20 -0
  255. package/lib/typescript/src/specs/RNMBXCircleLayerNativeComponent.d.ts.map +1 -0
  256. package/lib/typescript/{specs → src/specs}/RNMBXFillExtrusionLayerNativeComponent.d.ts +10 -9
  257. package/lib/typescript/src/specs/RNMBXFillExtrusionLayerNativeComponent.d.ts.map +1 -0
  258. package/lib/typescript/src/specs/RNMBXFillLayerNativeComponent.d.ts +20 -0
  259. package/lib/typescript/src/specs/RNMBXFillLayerNativeComponent.d.ts.map +1 -0
  260. package/lib/typescript/src/specs/RNMBXHeatmapLayerNativeComponent.d.ts +20 -0
  261. package/lib/typescript/src/specs/RNMBXHeatmapLayerNativeComponent.d.ts.map +1 -0
  262. package/lib/typescript/src/specs/RNMBXImageSourceNativeComponent.d.ts +11 -0
  263. package/lib/typescript/src/specs/RNMBXImageSourceNativeComponent.d.ts.map +1 -0
  264. package/lib/typescript/src/specs/RNMBXLineLayerNativeComponent.d.ts +20 -0
  265. package/lib/typescript/src/specs/RNMBXLineLayerNativeComponent.d.ts.map +1 -0
  266. package/lib/typescript/{specs → src/specs}/RNMBXMapViewNativeComponent.d.ts +23 -15
  267. package/lib/typescript/src/specs/RNMBXMapViewNativeComponent.d.ts.map +1 -0
  268. package/lib/typescript/src/specs/RNMBXRasterDemSourceNativeComponent.d.ts +15 -0
  269. package/lib/typescript/src/specs/RNMBXRasterDemSourceNativeComponent.d.ts.map +1 -0
  270. package/lib/typescript/src/specs/RNMBXRasterLayerNativeComponent.d.ts +20 -0
  271. package/lib/typescript/src/specs/RNMBXRasterLayerNativeComponent.d.ts.map +1 -0
  272. package/lib/typescript/src/specs/RNMBXRasterSourceNativeComponent.d.ts +17 -0
  273. package/lib/typescript/src/specs/RNMBXRasterSourceNativeComponent.d.ts.map +1 -0
  274. package/lib/typescript/src/specs/RNMBXShapeSourceNativeComponent.d.ts +29 -0
  275. package/lib/typescript/src/specs/RNMBXShapeSourceNativeComponent.d.ts.map +1 -0
  276. package/lib/typescript/src/specs/RNMBXSkyLayerNativeComponent.d.ts +19 -0
  277. package/lib/typescript/src/specs/RNMBXSkyLayerNativeComponent.d.ts.map +1 -0
  278. package/lib/typescript/src/specs/RNMBXStyleImportNativeComponent.d.ts.map +1 -0
  279. package/lib/typescript/src/specs/RNMBXSymbolLayerNativeComponent.d.ts +20 -0
  280. package/lib/typescript/src/specs/RNMBXSymbolLayerNativeComponent.d.ts.map +1 -0
  281. package/lib/typescript/src/specs/RNMBXVectorSourceNativeComponent.d.ts +23 -0
  282. package/lib/typescript/src/specs/RNMBXVectorSourceNativeComponent.d.ts.map +1 -0
  283. package/lib/typescript/{specs → src/specs}/codegenUtils.d.ts +1 -0
  284. package/lib/typescript/src/specs/codegenUtils.d.ts.map +1 -0
  285. package/lib/typescript/src/types/BaseProps.d.ts.map +1 -0
  286. package/lib/typescript/src/types/OnPressEvent.d.ts.map +1 -0
  287. package/lib/typescript/src/types/Position.d.ts.map +1 -0
  288. package/lib/typescript/src/types/index.d.ts.map +1 -0
  289. package/lib/typescript/src/utils/BridgeValue.d.ts.map +1 -0
  290. package/lib/typescript/src/utils/Logger.d.ts.map +1 -0
  291. package/lib/typescript/src/utils/StyleValue.d.ts.map +1 -0
  292. package/lib/typescript/src/utils/animated/Animated.d.ts.map +1 -0
  293. package/lib/typescript/src/utils/checkRequiredProps.d.ts.map +1 -0
  294. package/lib/typescript/src/utils/deprecation.d.ts.map +1 -0
  295. package/lib/typescript/src/utils/filterUtils.d.ts.map +1 -0
  296. package/lib/typescript/src/utils/geoUtils.d.ts.map +1 -0
  297. package/lib/typescript/src/utils/getAnnotationsLayerID.d.ts.map +1 -0
  298. package/lib/typescript/src/utils/index.d.ts.map +1 -0
  299. package/lib/typescript/src/utils/nativeRef.d.ts.map +1 -0
  300. package/lib/typescript/src/utils/styleMap.d.ts.map +1 -0
  301. package/lib/typescript/src/web/MapContext.d.ts.map +1 -0
  302. package/lib/typescript/src/web/components/Camera.d.ts.map +1 -0
  303. package/lib/typescript/src/web/components/MapView.d.ts.map +1 -0
  304. package/lib/typescript/src/web/utils/Logger.d.ts.map +1 -0
  305. package/package.json +10 -25
  306. package/plugin/build/withMapbox.d.ts +5 -4
  307. package/plugin/build/withMapbox.js +46 -19
  308. package/plugin/install.md +20 -0
  309. package/plugin/src/withMapbox.ts +79 -21
  310. package/rnmapbox-maps.podspec +3 -0
  311. package/setup-jest.js +25 -4
  312. package/src/components/ImageSource.tsx +4 -6
  313. package/src/components/MapView.tsx +66 -1
  314. package/src/components/RasterDemSource.tsx +5 -8
  315. package/src/components/RasterSource.tsx +5 -8
  316. package/src/components/ShapeSource.tsx +39 -86
  317. package/src/components/VectorSource.tsx +20 -44
  318. package/src/specs/NativeRNMBXShapeSourceModule.ts +23 -0
  319. package/src/specs/RNMBXBackgroundLayerNativeComponent.ts +9 -6
  320. package/src/specs/RNMBXCameraNativeComponent.ts +14 -11
  321. package/src/specs/RNMBXCircleLayerNativeComponent.ts +11 -8
  322. package/src/specs/RNMBXFillExtrusionLayerNativeComponent.ts +12 -9
  323. package/src/specs/RNMBXFillLayerNativeComponent.ts +11 -8
  324. package/src/specs/RNMBXHeatmapLayerNativeComponent.ts +12 -9
  325. package/src/specs/RNMBXImageSourceNativeComponent.ts +15 -0
  326. package/src/specs/RNMBXLineLayerNativeComponent.ts +11 -8
  327. package/src/specs/RNMBXMapViewNativeComponent.ts +27 -15
  328. package/src/specs/RNMBXRasterDemSourceNativeComponent.ts +19 -0
  329. package/src/specs/RNMBXRasterLayerNativeComponent.ts +12 -9
  330. package/src/specs/RNMBXRasterSourceNativeComponent.ts +21 -0
  331. package/src/specs/RNMBXShapeSourceNativeComponent.ts +35 -0
  332. package/src/specs/RNMBXSkyLayerNativeComponent.ts +12 -9
  333. package/src/specs/RNMBXSymbolLayerNativeComponent.ts +12 -9
  334. package/src/specs/RNMBXVectorSourceNativeComponent.ts +28 -0
  335. package/src/specs/codegenUtils.ts +5 -0
  336. package/ios/RNMBX/RNMBXShapeSourceManager.m +0 -45
  337. package/lib/typescript/Mapbox.d.ts.map +0 -1
  338. package/lib/typescript/RNMBXModule.d.ts.map +0 -1
  339. package/lib/typescript/components/AbstractLayer.d.ts.map +0 -1
  340. package/lib/typescript/components/AbstractSource.d.ts.map +0 -1
  341. package/lib/typescript/components/Annotation.d.ts.map +0 -1
  342. package/lib/typescript/components/Atmosphere.d.ts.map +0 -1
  343. package/lib/typescript/components/BackgroundLayer.d.ts.map +0 -1
  344. package/lib/typescript/components/Callout.d.ts.map +0 -1
  345. package/lib/typescript/components/Camera.d.ts.map +0 -1
  346. package/lib/typescript/components/CircleLayer.d.ts.map +0 -1
  347. package/lib/typescript/components/FillExtrusionLayer.d.ts.map +0 -1
  348. package/lib/typescript/components/FillLayer.d.ts.map +0 -1
  349. package/lib/typescript/components/HeadingIndicator.d.ts.map +0 -1
  350. package/lib/typescript/components/HeatmapLayer.d.ts.map +0 -1
  351. package/lib/typescript/components/Image.d.ts.map +0 -1
  352. package/lib/typescript/components/ImageSource.d.ts.map +0 -1
  353. package/lib/typescript/components/Images.d.ts.map +0 -1
  354. package/lib/typescript/components/Light.d.ts.map +0 -1
  355. package/lib/typescript/components/LineLayer.d.ts.map +0 -1
  356. package/lib/typescript/components/MapView.d.ts.map +0 -1
  357. package/lib/typescript/components/MarkerView.d.ts.map +0 -1
  358. package/lib/typescript/components/NativeBridgeComponent.d.ts.map +0 -1
  359. package/lib/typescript/components/NativeUserLocation.d.ts.map +0 -1
  360. package/lib/typescript/components/PointAnnotation.d.ts.map +0 -1
  361. package/lib/typescript/components/RasterDemSource.d.ts.map +0 -1
  362. package/lib/typescript/components/RasterLayer.d.ts.map +0 -1
  363. package/lib/typescript/components/RasterSource.d.ts.map +0 -1
  364. package/lib/typescript/components/ShapeSource.d.ts.map +0 -1
  365. package/lib/typescript/components/SkyLayer.d.ts.map +0 -1
  366. package/lib/typescript/components/Style.d.ts.map +0 -1
  367. package/lib/typescript/components/StyleImport.d.ts.map +0 -1
  368. package/lib/typescript/components/SymbolLayer.d.ts.map +0 -1
  369. package/lib/typescript/components/Terrain.d.ts.map +0 -1
  370. package/lib/typescript/components/UserLocation.d.ts.map +0 -1
  371. package/lib/typescript/components/VectorSource.d.ts +0 -149
  372. package/lib/typescript/components/VectorSource.d.ts.map +0 -1
  373. package/lib/typescript/index.d.ts.map +0 -1
  374. package/lib/typescript/modules/location/locationManager.d.ts.map +0 -1
  375. package/lib/typescript/modules/offline/OfflineCreatePackOptions.d.ts.map +0 -1
  376. package/lib/typescript/modules/offline/OfflinePack.d.ts.map +0 -1
  377. package/lib/typescript/modules/offline/offlineManager.d.ts.map +0 -1
  378. package/lib/typescript/modules/snapshot/SnapshotOptions.d.ts.map +0 -1
  379. package/lib/typescript/modules/snapshot/snapshotManager.d.ts.map +0 -1
  380. package/lib/typescript/requestAndroidLocationPermissions.d.ts.map +0 -1
  381. package/lib/typescript/specs/NativeMapViewModule.d.ts.map +0 -1
  382. package/lib/typescript/specs/RNMBXAndroidTextureMapViewNativeComponent.d.ts.map +0 -1
  383. package/lib/typescript/specs/RNMBXAtmosphereNativeComponent.d.ts.map +0 -1
  384. package/lib/typescript/specs/RNMBXBackgroundLayerNativeComponent.d.ts.map +0 -1
  385. package/lib/typescript/specs/RNMBXCameraNativeComponent.d.ts.map +0 -1
  386. package/lib/typescript/specs/RNMBXCircleLayerNativeComponent.d.ts +0 -19
  387. package/lib/typescript/specs/RNMBXCircleLayerNativeComponent.d.ts.map +0 -1
  388. package/lib/typescript/specs/RNMBXFillExtrusionLayerNativeComponent.d.ts.map +0 -1
  389. package/lib/typescript/specs/RNMBXFillLayerNativeComponent.d.ts +0 -19
  390. package/lib/typescript/specs/RNMBXFillLayerNativeComponent.d.ts.map +0 -1
  391. package/lib/typescript/specs/RNMBXHeatmapLayerNativeComponent.d.ts +0 -19
  392. package/lib/typescript/specs/RNMBXHeatmapLayerNativeComponent.d.ts.map +0 -1
  393. package/lib/typescript/specs/RNMBXLineLayerNativeComponent.d.ts +0 -19
  394. package/lib/typescript/specs/RNMBXLineLayerNativeComponent.d.ts.map +0 -1
  395. package/lib/typescript/specs/RNMBXMapViewNativeComponent.d.ts.map +0 -1
  396. package/lib/typescript/specs/RNMBXRasterLayerNativeComponent.d.ts +0 -19
  397. package/lib/typescript/specs/RNMBXRasterLayerNativeComponent.d.ts.map +0 -1
  398. package/lib/typescript/specs/RNMBXSkyLayerNativeComponent.d.ts +0 -18
  399. package/lib/typescript/specs/RNMBXSkyLayerNativeComponent.d.ts.map +0 -1
  400. package/lib/typescript/specs/RNMBXStyleImportNativeComponent.d.ts.map +0 -1
  401. package/lib/typescript/specs/RNMBXSymbolLayerNativeComponent.d.ts +0 -19
  402. package/lib/typescript/specs/RNMBXSymbolLayerNativeComponent.d.ts.map +0 -1
  403. package/lib/typescript/specs/codegenUtils.d.ts.map +0 -1
  404. package/lib/typescript/types/BaseProps.d.ts.map +0 -1
  405. package/lib/typescript/types/OnPressEvent.d.ts.map +0 -1
  406. package/lib/typescript/types/Position.d.ts.map +0 -1
  407. package/lib/typescript/types/index.d.ts.map +0 -1
  408. package/lib/typescript/utils/BridgeValue.d.ts.map +0 -1
  409. package/lib/typescript/utils/Logger.d.ts.map +0 -1
  410. package/lib/typescript/utils/StyleValue.d.ts.map +0 -1
  411. package/lib/typescript/utils/animated/Animated.d.ts.map +0 -1
  412. package/lib/typescript/utils/checkRequiredProps.d.ts.map +0 -1
  413. package/lib/typescript/utils/deprecation.d.ts.map +0 -1
  414. package/lib/typescript/utils/filterUtils.d.ts.map +0 -1
  415. package/lib/typescript/utils/geoUtils.d.ts.map +0 -1
  416. package/lib/typescript/utils/getAnnotationsLayerID.d.ts.map +0 -1
  417. package/lib/typescript/utils/index.d.ts.map +0 -1
  418. package/lib/typescript/utils/nativeRef.d.ts.map +0 -1
  419. package/lib/typescript/utils/styleMap.d.ts.map +0 -1
  420. package/lib/typescript/web/MapContext.d.ts.map +0 -1
  421. package/lib/typescript/web/components/Camera.d.ts.map +0 -1
  422. package/lib/typescript/web/components/MapView.d.ts.map +0 -1
  423. package/lib/typescript/web/utils/Logger.d.ts.map +0 -1
  424. /package/android/src/main/mapbox-v11-compat/v10/com/{mapbox → rnmapbox}/rnmbx/v11compat/Annotation.kt +0 -0
  425. /package/android/src/main/mapbox-v11-compat/v10/com/{mapbox → rnmapbox}/rnmbx/v11compat/Event.kt +0 -0
  426. /package/android/src/main/mapbox-v11-compat/v10/com/{mapbox → rnmapbox}/rnmbx/v11compat/Feature.kt +0 -0
  427. /package/android/src/main/mapbox-v11-compat/v10/com/{mapbox → rnmapbox}/rnmbx/v11compat/HttpInterceptor.kt +0 -0
  428. /package/android/src/main/mapbox-v11-compat/v10/com/{mapbox → rnmapbox}/rnmbx/v11compat/Image.kt +0 -0
  429. /package/android/src/main/mapbox-v11-compat/v10/com/{mapbox → rnmapbox}/rnmbx/v11compat/Light.kt +0 -0
  430. /package/android/src/main/mapbox-v11-compat/v10/com/{mapbox → rnmapbox}/rnmbx/v11compat/Location.kt +0 -0
  431. /package/android/src/main/mapbox-v11-compat/v10/com/{mapbox → rnmapbox}/rnmbx/v11compat/MapboxMap.kt +0 -0
  432. /package/android/src/main/mapbox-v11-compat/v10/com/{mapbox → rnmapbox}/rnmbx/v11compat/OfflineManager.kt +0 -0
  433. /package/android/src/main/mapbox-v11-compat/v10/com/{mapbox → rnmapbox}/rnmbx/v11compat/OrnamentSettings.kt +0 -0
  434. /package/android/src/main/mapbox-v11-compat/v10/com/{mapbox → rnmapbox}/rnmbx/v11compat/ResourceOption.kt +0 -0
  435. /package/android/src/main/mapbox-v11-compat/v10/com/{mapbox → rnmapbox}/rnmbx/v11compat/Snapshot.kt +0 -0
  436. /package/android/src/main/mapbox-v11-compat/v10/com/{mapbox → rnmapbox}/rnmbx/v11compat/style.kt +0 -0
  437. /package/android/src/main/mapbox-v11-compat/v11/com/{mapbox → rnmapbox}/rnmbx/v11compat/Annotation.kt +0 -0
  438. /package/android/src/main/mapbox-v11-compat/v11/com/{mapbox → rnmapbox}/rnmbx/v11compat/Event.kt +0 -0
  439. /package/android/src/main/mapbox-v11-compat/v11/com/{mapbox → rnmapbox}/rnmbx/v11compat/Feature.kt +0 -0
  440. /package/android/src/main/mapbox-v11-compat/v11/com/{mapbox → rnmapbox}/rnmbx/v11compat/HttpInterceptor.kt +0 -0
  441. /package/android/src/main/mapbox-v11-compat/v11/com/{mapbox → rnmapbox}/rnmbx/v11compat/Light.kt +0 -0
  442. /package/android/src/main/mapbox-v11-compat/v11/com/{mapbox → rnmapbox}/rnmbx/v11compat/Location.kt +0 -0
  443. /package/android/src/main/mapbox-v11-compat/v11/com/{mapbox → rnmapbox}/rnmbx/v11compat/MapboxMap.kt +0 -0
  444. /package/android/src/main/mapbox-v11-compat/v11/com/{mapbox → rnmapbox}/rnmbx/v11compat/OfflineManager.kt +0 -0
  445. /package/android/src/main/mapbox-v11-compat/v11/com/{mapbox → rnmapbox}/rnmbx/v11compat/OrnamentSettings.kt +0 -0
  446. /package/android/src/main/mapbox-v11-compat/v11/com/{mapbox → rnmapbox}/rnmbx/v11compat/ResourceOption.kt +0 -0
  447. /package/android/src/main/mapbox-v11-compat/v11/com/{mapbox → rnmapbox}/rnmbx/v11compat/Snapshot.kt +0 -0
  448. /package/android/src/main/mapbox-v11-compat/v11/com/{mapbox → rnmapbox}/rnmbx/v11compat/style.kt +0 -0
  449. /package/lib/typescript/{Mapbox.d.ts → src/Mapbox.d.ts} +0 -0
  450. /package/lib/typescript/{RNMBXModule.d.ts → src/RNMBXModule.d.ts} +0 -0
  451. /package/lib/typescript/{components → src/components}/AbstractLayer.d.ts +0 -0
  452. /package/lib/typescript/{components → src/components}/AbstractSource.d.ts +0 -0
  453. /package/lib/typescript/{components → src/components}/Annotation.d.ts +0 -0
  454. /package/lib/typescript/{components → src/components}/Atmosphere.d.ts +0 -0
  455. /package/lib/typescript/{components → src/components}/BackgroundLayer.d.ts +0 -0
  456. /package/lib/typescript/{components → src/components}/Callout.d.ts +0 -0
  457. /package/lib/typescript/{components → src/components}/Camera.d.ts +0 -0
  458. /package/lib/typescript/{components → src/components}/CircleLayer.d.ts +0 -0
  459. /package/lib/typescript/{components → src/components}/FillExtrusionLayer.d.ts +0 -0
  460. /package/lib/typescript/{components → src/components}/FillLayer.d.ts +0 -0
  461. /package/lib/typescript/{components → src/components}/HeadingIndicator.d.ts +0 -0
  462. /package/lib/typescript/{components → src/components}/HeatmapLayer.d.ts +0 -0
  463. /package/lib/typescript/{components → src/components}/Image.d.ts +0 -0
  464. /package/lib/typescript/{components → src/components}/ImageSource.d.ts +0 -0
  465. /package/lib/typescript/{components → src/components}/Images.d.ts +0 -0
  466. /package/lib/typescript/{components → src/components}/Light.d.ts +0 -0
  467. /package/lib/typescript/{components → src/components}/LineLayer.d.ts +0 -0
  468. /package/lib/typescript/{components → src/components}/MarkerView.d.ts +0 -0
  469. /package/lib/typescript/{components → src/components}/NativeBridgeComponent.d.ts +0 -0
  470. /package/lib/typescript/{components → src/components}/NativeUserLocation.d.ts +0 -0
  471. /package/lib/typescript/{components → src/components}/PointAnnotation.d.ts +0 -0
  472. /package/lib/typescript/{components → src/components}/RasterLayer.d.ts +0 -0
  473. /package/lib/typescript/{components → src/components}/SkyLayer.d.ts +0 -0
  474. /package/lib/typescript/{components → src/components}/Style.d.ts +0 -0
  475. /package/lib/typescript/{components → src/components}/StyleImport.d.ts +0 -0
  476. /package/lib/typescript/{components → src/components}/SymbolLayer.d.ts +0 -0
  477. /package/lib/typescript/{components → src/components}/Terrain.d.ts +0 -0
  478. /package/lib/typescript/{components → src/components}/UserLocation.d.ts +0 -0
  479. /package/lib/typescript/{index.d.ts → src/index.d.ts} +0 -0
  480. /package/lib/typescript/{modules → src/modules}/location/locationManager.d.ts +0 -0
  481. /package/lib/typescript/{modules → src/modules}/offline/OfflineCreatePackOptions.d.ts +0 -0
  482. /package/lib/typescript/{modules → src/modules}/offline/OfflinePack.d.ts +0 -0
  483. /package/lib/typescript/{modules → src/modules}/offline/offlineManager.d.ts +0 -0
  484. /package/lib/typescript/{modules → src/modules}/snapshot/SnapshotOptions.d.ts +0 -0
  485. /package/lib/typescript/{modules → src/modules}/snapshot/snapshotManager.d.ts +0 -0
  486. /package/lib/typescript/{requestAndroidLocationPermissions.d.ts → src/requestAndroidLocationPermissions.d.ts} +0 -0
  487. /package/lib/typescript/{specs → src/specs}/NativeMapViewModule.d.ts +0 -0
  488. /package/lib/typescript/{specs → src/specs}/RNMBXAndroidTextureMapViewNativeComponent.d.ts +0 -0
  489. /package/lib/typescript/{specs → src/specs}/RNMBXAtmosphereNativeComponent.d.ts +0 -0
  490. /package/lib/typescript/{specs → src/specs}/RNMBXStyleImportNativeComponent.d.ts +0 -0
  491. /package/lib/typescript/{types → src/types}/BaseProps.d.ts +0 -0
  492. /package/lib/typescript/{types → src/types}/OnPressEvent.d.ts +0 -0
  493. /package/lib/typescript/{types → src/types}/Position.d.ts +0 -0
  494. /package/lib/typescript/{types → src/types}/index.d.ts +0 -0
  495. /package/lib/typescript/{utils → src/utils}/BridgeValue.d.ts +0 -0
  496. /package/lib/typescript/{utils → src/utils}/Logger.d.ts +0 -0
  497. /package/lib/typescript/{utils → src/utils}/StyleValue.d.ts +0 -0
  498. /package/lib/typescript/{utils → src/utils}/animated/Animated.d.ts +0 -0
  499. /package/lib/typescript/{utils → src/utils}/checkRequiredProps.d.ts +0 -0
  500. /package/lib/typescript/{utils → src/utils}/deprecation.d.ts +0 -0
  501. /package/lib/typescript/{utils → src/utils}/filterUtils.d.ts +0 -0
  502. /package/lib/typescript/{utils → src/utils}/geoUtils.d.ts +0 -0
  503. /package/lib/typescript/{utils → src/utils}/getAnnotationsLayerID.d.ts +0 -0
  504. /package/lib/typescript/{utils → src/utils}/index.d.ts +0 -0
  505. /package/lib/typescript/{utils → src/utils}/nativeRef.d.ts +0 -0
  506. /package/lib/typescript/{utils → src/utils}/styleMap.d.ts +0 -0
  507. /package/lib/typescript/{web → src/web}/MapContext.d.ts +0 -0
  508. /package/lib/typescript/{web → src/web}/components/Camera.d.ts +0 -0
  509. /package/lib/typescript/{web → src/web}/components/MapView.d.ts +0 -0
  510. /package/lib/typescript/{web → src/web}/utils/Logger.d.ts +0 -0
@@ -3,10 +3,11 @@ import {
3
3
  NativeMethods,
4
4
  NativeModules,
5
5
  NativeSyntheticEvent,
6
- requireNativeComponent,
6
+ findNodeHandle,
7
7
  } from 'react-native';
8
8
 
9
- import { getFilter } from '../utils/filterUtils';
9
+ import RNMBXShapeSourceNativeComponent from '../specs/RNMBXShapeSourceNativeComponent';
10
+ import NativeRNMBXShapeSourceModule from '../specs/NativeRNMBXShapeSourceModule';
10
11
  import {
11
12
  toJSONString,
12
13
  cloneReactChildrenWithProps,
@@ -17,7 +18,6 @@ import { copyPropertiesAsDeprecated } from '../utils/deprecation';
17
18
  import { OnPressEvent } from '../types/OnPressEvent';
18
19
 
19
20
  import AbstractSource from './AbstractSource';
20
- import NativeBridgeComponent from './NativeBridgeComponent';
21
21
 
22
22
  const MapboxGL = NativeModules.RNMBXModule;
23
23
 
@@ -148,10 +148,7 @@ export type Props = {
148
148
  * ShapeSource is a map content source that supplies vector shapes to be shown on the map.
149
149
  * The shape may be an url or a GeoJSON object
150
150
  */
151
- export class ShapeSource extends NativeBridgeComponent(
152
- AbstractSource<Props, NativeProps>,
153
- NATIVE_MODULE_NAME,
154
- ) {
151
+ export class ShapeSource extends AbstractSource<Props, NativeProps> {
155
152
  static NATIVE_ASSETS_KEY = 'assets';
156
153
 
157
154
  static defaultProps = {
@@ -166,31 +163,6 @@ export class ShapeSource extends NativeBridgeComponent(
166
163
  nativeRef: React.Component<NativeProps> & Readonly<NativeMethods>,
167
164
  ) {
168
165
  this.setNativeRef(nativeRef);
169
- super._runPendingNativeCommands(nativeRef);
170
- }
171
-
172
- /**
173
- * Returns all features from the source that match the query parameters whether the feature is currently
174
- * rendered on the map.
175
- *
176
- * @example
177
- * shapeSource.features()
178
- *
179
- * @param {Array=} filter - an optional filter statement to filter the returned Features.
180
- * @return {FeatureCollection}
181
- */
182
- async features(filter: Array<string> = []) {
183
- const res: { data: string } = await this._runNativeCommand(
184
- 'features',
185
- this._nativeRef,
186
- getFilter(filter),
187
- );
188
-
189
- if (isAndroid()) {
190
- return JSON.parse(res.data);
191
- }
192
-
193
- return res.data;
194
166
  }
195
167
 
196
168
  /**
@@ -209,19 +181,14 @@ export class ShapeSource extends NativeBridgeComponent(
209
181
  console.warn(
210
182
  'Using cluster_id is deprecated and will be removed from the future releases. Please use cluster as an argument instead.',
211
183
  );
212
- const res: { data: number } = await this._runNativeCommand(
213
- 'getClusterExpansionZoomById',
214
- this._nativeRef,
215
- [feature],
216
- );
217
- return res.data;
218
184
  }
219
185
 
220
- const res: { data: number } = await this._runNativeCommand(
221
- 'getClusterExpansionZoom',
222
- this._nativeRef,
223
- [JSON.stringify(feature)],
224
- );
186
+ const handle = findNodeHandle(this._nativeRef as any);
187
+
188
+ const res = (await NativeRNMBXShapeSourceModule.getClusterExpansionZoom(
189
+ handle,
190
+ JSON.stringify(feature),
191
+ )) as { data: number };
225
192
  return res.data;
226
193
  }
227
194
 
@@ -245,24 +212,16 @@ export class ShapeSource extends NativeBridgeComponent(
245
212
  console.warn(
246
213
  'Using cluster_id is deprecated and will be removed from the future releases. Please use cluster as an argument instead.',
247
214
  );
248
- const res: { data: string } = await this._runNativeCommand(
249
- 'getClusterLeavesById',
250
- this._nativeRef,
251
- [feature, limit, offset],
252
- );
253
-
254
- if (isAndroid()) {
255
- return JSON.parse(res.data);
256
- }
257
-
258
- return res.data;
259
215
  }
260
216
 
261
- const res: { data: string } = await this._runNativeCommand(
262
- 'getClusterLeaves',
263
- this._nativeRef,
264
- [JSON.stringify(feature), limit, offset],
265
- );
217
+ const handle = findNodeHandle(this._nativeRef as any);
218
+
219
+ const res = (await NativeRNMBXShapeSourceModule.getClusterLeaves(
220
+ handle,
221
+ JSON.stringify(feature),
222
+ limit,
223
+ offset,
224
+ )) as { data: string };
266
225
 
267
226
  if (isAndroid()) {
268
227
  return JSON.parse(res.data);
@@ -285,24 +244,14 @@ export class ShapeSource extends NativeBridgeComponent(
285
244
  console.warn(
286
245
  'Using cluster_id is deprecated and will be removed from the future releases. Please use cluster as an argument instead.',
287
246
  );
288
- const res: { data: string } = await this._runNativeCommand(
289
- 'getClusterChildrenById',
290
- this._nativeRef,
291
- [feature],
292
- );
293
-
294
- if (isAndroid()) {
295
- return JSON.parse(res.data);
296
- }
297
-
298
- return res.data;
299
247
  }
300
248
 
301
- const res: { data: string } = await this._runNativeCommand(
302
- 'getClusterChildren',
303
- this._nativeRef,
304
- [JSON.stringify(feature)],
305
- );
249
+ const handle = findNodeHandle(this._nativeRef as any);
250
+
251
+ const res = (await NativeRNMBXShapeSourceModule.getClusterChildren(
252
+ handle,
253
+ JSON.stringify(feature),
254
+ )) as { data: string };
306
255
 
307
256
  if (isAndroid()) {
308
257
  return JSON.parse(res.data);
@@ -329,16 +278,23 @@ export class ShapeSource extends NativeBridgeComponent(
329
278
  return toJSONString(this.props.shape);
330
279
  }
331
280
 
281
+ _decodePayload(payload: OnPressEvent | string): OnPressEvent {
282
+ // we check whether the payload is a string, since the strict type safety is enforced only on iOS on the new arch
283
+ // on Android, on both archs, the payload is an object
284
+ if (typeof payload === 'string') {
285
+ return JSON.parse(payload);
286
+ } else {
287
+ return payload;
288
+ }
289
+ }
290
+
332
291
  onPress(
333
292
  event: NativeSyntheticEvent<{
334
293
  payload: OnPressEvent;
335
294
  }>,
336
295
  ) {
337
- const {
338
- nativeEvent: {
339
- payload: { features, coordinates, point },
340
- },
341
- } = event;
296
+ const payload = this._decodePayload(event.nativeEvent.payload);
297
+ const { features, coordinates, point } = payload;
342
298
  let newEvent: OnPressEventDeprecated = {
343
299
  features,
344
300
  coordinates,
@@ -384,15 +340,15 @@ export class ShapeSource extends NativeBridgeComponent(
384
340
  ref: (
385
341
  nativeRef: React.Component<NativeProps> & Readonly<NativeMethods>,
386
342
  ) => this._setNativeRef(nativeRef),
387
- onAndroidCallback: isAndroid() ? this._onAndroidCallback : undefined,
388
343
  };
389
344
 
390
345
  return (
391
- <RNMBXShapeSource {...props}>
346
+ // @ts-expect-error just codegen stuff
347
+ <RNMBXShapeSourceNativeComponent {...props}>
392
348
  {cloneReactChildrenWithProps(this.props.children, {
393
349
  sourceID: this.props.id,
394
350
  })}
395
- </RNMBXShapeSource>
351
+ </RNMBXShapeSourceNativeComponent>
396
352
  );
397
353
  }
398
354
  }
@@ -401,6 +357,3 @@ type NativeProps = {
401
357
  id: string;
402
358
  shape?: string;
403
359
  };
404
-
405
- const RNMBXShapeSource =
406
- requireNativeComponent<NativeProps>(NATIVE_MODULE_NAME);
@@ -3,16 +3,14 @@ import {
3
3
  NativeMethods,
4
4
  NativeModules,
5
5
  NativeSyntheticEvent,
6
- requireNativeComponent,
7
6
  } from 'react-native';
8
7
 
9
- import { cloneReactChildrenWithProps, isFunction, isAndroid } from '../utils';
10
- import { getFilter } from '../utils/filterUtils';
8
+ import RNMBXVectorSourceNativeComponent from '../specs/RNMBXVectorSourceNativeComponent';
9
+ import { cloneReactChildrenWithProps, isFunction } from '../utils';
11
10
  import { copyPropertiesAsDeprecated } from '../utils/deprecation';
12
11
  import { OnPressEvent } from '../types/OnPressEvent';
13
12
 
14
13
  import AbstractSource from './AbstractSource';
15
- import NativeBridgeComponent from './NativeBridgeComponent';
16
14
 
17
15
  const MapboxGL = NativeModules.RNMBXModule;
18
16
 
@@ -99,10 +97,7 @@ type NativeProps = Props; // Omit<Props, 'children'>;
99
97
  * VectorSource is a map content source that supplies tiled vector data in Mapbox Vector Tile format to be shown on the map.
100
98
  * The location of and metadata about the tiles are defined either by an option dictionary or by an external file that conforms to the TileJSON specification.
101
99
  */
102
- class VectorSource extends NativeBridgeComponent(
103
- AbstractSource<Props, NativeProps>,
104
- NATIVE_MODULE_NAME,
105
- ) {
100
+ class VectorSource extends AbstractSource<Props, NativeProps> {
106
101
  static defaultProps = {
107
102
  id: MapboxGL.StyleSource.DefaultSourceID,
108
103
  };
@@ -117,46 +112,26 @@ class VectorSource extends NativeBridgeComponent(
117
112
  if (nativeRef) {
118
113
  this.setNativeRef(nativeRef);
119
114
  // this._nativeRef = nativeRef;
120
- super._runPendingNativeCommands(nativeRef);
121
115
  }
122
116
  }
123
117
 
124
- /**
125
- * Returns all features that match the query parameters regardless of whether or not the feature is
126
- * currently rendered on the map. The domain of the query includes all currently-loaded vector tiles
127
- * and GeoJSON source tiles. This function does not check tiles outside of the visible viewport.
128
- *
129
- * @example
130
- * vectorSource.features(['id1', 'id2'])
131
- *
132
- * @param {Array=} layerIDs - A set of strings that correspond to the names of layers defined in the current style. Only the features contained in these layers are included in the returned array.
133
- * @param {Array=} filter - an optional filter statement to filter the returned Features.
134
- * @return {FeatureCollection}
135
- */
136
- async features(layerIDs = [], filter = []) {
137
- const res: { data: string } = await this._runNativeCommand(
138
- 'features',
139
- this._nativeRef,
140
- [layerIDs, getFilter(filter)],
141
- );
142
-
143
- if (isAndroid()) {
144
- return JSON.parse(res.data);
118
+ _decodePayload(payload: OnPressEvent | string): OnPressEvent {
119
+ // we check whether the payload is a string, since the strict type safety is enforced only on iOS on the new arch
120
+ // on Android, on both archs, the payload is an object
121
+ if (typeof payload === 'string') {
122
+ return JSON.parse(payload);
123
+ } else {
124
+ return payload;
145
125
  }
146
-
147
- return res.data;
148
126
  }
149
127
 
150
128
  onPress(
151
129
  event: NativeSyntheticEvent<{
152
- payload: OnPressEvent;
130
+ payload: OnPressEvent | string;
153
131
  }>,
154
132
  ) {
155
- const {
156
- nativeEvent: {
157
- payload: { features, coordinates, point },
158
- },
159
- } = event;
133
+ const payload = this._decodePayload(event.nativeEvent.payload);
134
+ const { features, coordinates, point } = payload;
160
135
  let newEvent = {
161
136
  features,
162
137
  coordinates,
@@ -197,19 +172,20 @@ class VectorSource extends NativeBridgeComponent(
197
172
  hasPressListener: isFunction(this.props.onPress),
198
173
  onMapboxVectorSourcePress: this.onPress.bind(this),
199
174
  onPress: undefined,
200
- onAndroidCallback: isAndroid() ? this._onAndroidCallback : undefined,
201
175
  };
202
176
  return (
203
- <RNMBXVectorSource ref={(r) => this._setNativeRef(r)} {...props}>
177
+ // @ts-expect-error just codegen stuff
178
+ <RNMBXVectorSourceNativeComponent
179
+ // @ts-expect-error just codegen stuff
180
+ ref={(r) => this._setNativeRef(r)}
181
+ {...props}
182
+ >
204
183
  {cloneReactChildrenWithProps(this.props.children, {
205
184
  sourceID: this.props.id,
206
185
  })}
207
- </RNMBXVectorSource>
186
+ </RNMBXVectorSourceNativeComponent>
208
187
  );
209
188
  }
210
189
  }
211
190
 
212
- const RNMBXVectorSource =
213
- requireNativeComponent<NativeProps>(NATIVE_MODULE_NAME);
214
-
215
191
  export default VectorSource;
@@ -0,0 +1,23 @@
1
+ /* eslint-disable @typescript-eslint/ban-types */
2
+ import type { TurboModule } from 'react-native/Libraries/TurboModule/RCTExport';
3
+ import { Int32 } from 'react-native/Libraries/Types/CodegenTypes';
4
+ import { TurboModuleRegistry } from 'react-native';
5
+
6
+ export interface Spec extends TurboModule {
7
+ getClusterExpansionZoom: (
8
+ viewRef: Int32 | null,
9
+ featureJSON: string,
10
+ ) => Promise<Object>;
11
+ getClusterLeaves: (
12
+ viewRef: Int32 | null,
13
+ featureJSON: string,
14
+ number: Int32,
15
+ offset: Int32,
16
+ ) => Promise<Object>;
17
+ getClusterChildren: (
18
+ viewRef: Int32 | null,
19
+ featureJSON: string,
20
+ ) => Promise<Object>;
21
+ }
22
+
23
+ export default TurboModuleRegistry.getEnforcing<Spec>('RNMBXShapeSourceModule');
@@ -4,19 +4,22 @@ import { Double, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
4
4
 
5
5
  import type { UnsafeMixed } from './codegenUtils';
6
6
 
7
+ // see https://github.com/rnmapbox/maps/wiki/FabricOptionalProp
8
+ type OptionalProp<T> = UnsafeMixed<T>;
9
+
7
10
  export interface NativeProps extends ViewProps {
8
11
  id: UnsafeMixed<string>;
9
12
  sourceID: UnsafeMixed<string>;
10
- existing: UnsafeMixed<boolean>;
13
+ existing?: OptionalProp<boolean>;
11
14
  filter: UnsafeMixed<any[]>;
12
15
 
13
- aboveLayerID: UnsafeMixed<string>;
14
- belowLayerID: UnsafeMixed<string>;
15
- layerIndex: UnsafeMixed<Int32>;
16
+ aboveLayerID?: OptionalProp<string>;
17
+ belowLayerID?: OptionalProp<string>;
18
+ layerIndex?: OptionalProp<Int32>;
16
19
  reactStyle: UnsafeMixed<any>;
17
20
 
18
- maxZoomLevel: UnsafeMixed<Double>;
19
- minZoomLevel: UnsafeMixed<Double>;
21
+ maxZoomLevel?: OptionalProp<Double>;
22
+ minZoomLevel?: OptionalProp<Double>;
20
23
  }
21
24
 
22
25
  export default codegenNativeComponent<NativeProps>(
@@ -8,6 +8,9 @@ import {
8
8
 
9
9
  import type { NativeCameraStop, UnsafeMixed } from './codegenUtils';
10
10
 
11
+ // see https://github.com/rnmapbox/maps/wiki/FabricOptionalProp
12
+ type OptionalProp<T> = UnsafeMixed<T>;
13
+
11
14
  type UserTrackingModeChangeEventType = {
12
15
  type: string;
13
16
  payloadRenamed: {
@@ -18,21 +21,21 @@ type UserTrackingModeChangeEventType = {
18
21
 
19
22
  export interface NativeProps extends ViewProps {
20
23
  maxBounds?: UnsafeMixed<string | null>;
21
- animationDuration?: UnsafeMixed<Double>;
22
- animationMode?: UnsafeMixed<string>;
24
+ animationDuration?: OptionalProp<Double>;
25
+ animationMode?: OptionalProp<string>;
23
26
  defaultStop?: UnsafeMixed<NativeCameraStop>;
24
- userTrackingMode?: UnsafeMixed<Int32>;
27
+ userTrackingMode?: OptionalProp<Int32>;
25
28
 
26
- followUserLocation?: UnsafeMixed<boolean>;
27
- followUserMode?: UnsafeMixed<string>;
28
- followZoomLevel?: UnsafeMixed<Double>;
29
- followPitch?: UnsafeMixed<Double>;
30
- followHeading?: UnsafeMixed<Double>;
29
+ followUserLocation?: OptionalProp<boolean>;
30
+ followUserMode?: OptionalProp<string>;
31
+ followZoomLevel?: OptionalProp<Double>;
32
+ followPitch?: OptionalProp<Double>;
33
+ followHeading?: OptionalProp<Double>;
31
34
  followPadding?: UnsafeMixed<any>;
32
35
 
33
- zoomLevel?: UnsafeMixed<Double>;
34
- maxZoomLevel?: UnsafeMixed<Double>;
35
- minZoomLevel?: UnsafeMixed<Double>;
36
+ zoomLevel?: OptionalProp<Double>;
37
+ maxZoomLevel?: OptionalProp<Double>;
38
+ minZoomLevel?: OptionalProp<Double>;
36
39
  stop?: UnsafeMixed<NativeCameraStop>;
37
40
 
38
41
  onUserTrackingModeChange?: DirectEventHandler<UserTrackingModeChangeEventType>;
@@ -4,20 +4,23 @@ import { Double, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
4
4
 
5
5
  import type { UnsafeMixed } from './codegenUtils';
6
6
 
7
+ // see https://github.com/rnmapbox/maps/wiki/FabricOptionalProp
8
+ type OptionalProp<T> = UnsafeMixed<T>;
9
+
7
10
  export interface NativeProps extends ViewProps {
8
11
  id: UnsafeMixed<string>;
9
- sourceID: UnsafeMixed<string>;
10
- existing: UnsafeMixed<boolean>;
12
+ sourceID: OptionalProp<string>;
13
+ existing: OptionalProp<boolean>;
11
14
  filter: UnsafeMixed<any[]>;
12
15
 
13
- aboveLayerID: UnsafeMixed<string>;
14
- belowLayerID: UnsafeMixed<string>;
15
- layerIndex: UnsafeMixed<Int32>;
16
+ aboveLayerID: OptionalProp<string>;
17
+ belowLayerID: OptionalProp<string>;
18
+ layerIndex: OptionalProp<Int32>;
16
19
  reactStyle: UnsafeMixed<any>;
17
20
 
18
- maxZoomLevel: UnsafeMixed<Double>;
19
- minZoomLevel: UnsafeMixed<Double>;
20
- sourceLayerID: UnsafeMixed<string>;
21
+ maxZoomLevel: OptionalProp<Double>;
22
+ minZoomLevel: OptionalProp<Double>;
23
+ sourceLayerID: OptionalProp<string>;
21
24
  }
22
25
 
23
26
  export default codegenNativeComponent<NativeProps>(
@@ -4,20 +4,23 @@ import { Double, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
4
4
 
5
5
  import type { UnsafeMixed } from './codegenUtils';
6
6
 
7
+ // see https://github.com/rnmapbox/maps/wiki/FabricOptionalProp
8
+ type OptionalProp<T> = UnsafeMixed<T>;
9
+
7
10
  export interface NativeProps extends ViewProps {
8
- id: UnsafeMixed<string>;
9
- sourceID: UnsafeMixed<string>;
10
- existing: UnsafeMixed<boolean>;
11
+ id?: UnsafeMixed<string>;
12
+ sourceID?: OptionalProp<string>;
13
+ existing?: OptionalProp<boolean>;
11
14
  filter: UnsafeMixed<any[]>;
12
15
 
13
- aboveLayerID: UnsafeMixed<string>;
14
- belowLayerID: UnsafeMixed<string>;
15
- layerIndex: UnsafeMixed<Int32>;
16
+ aboveLayerID?: OptionalProp<string>;
17
+ belowLayerID?: OptionalProp<string>;
18
+ layerIndex?: OptionalProp<Int32>;
16
19
  reactStyle: UnsafeMixed<any>;
17
20
 
18
- maxZoomLevel: UnsafeMixed<Double>;
19
- minZoomLevel: UnsafeMixed<Double>;
20
- sourceLayerID: UnsafeMixed<string>;
21
+ maxZoomLevel?: OptionalProp<Double>;
22
+ minZoomLevel?: OptionalProp<Double>;
23
+ sourceLayerID?: OptionalProp<string>;
21
24
  }
22
25
 
23
26
  export default codegenNativeComponent<NativeProps>(
@@ -4,20 +4,23 @@ import { Double, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
4
4
 
5
5
  import type { UnsafeMixed } from './codegenUtils';
6
6
 
7
+ // see https://github.com/rnmapbox/maps/wiki/FabricOptionalProp
8
+ type OptionalProp<T> = UnsafeMixed<T>;
9
+
7
10
  export interface NativeProps extends ViewProps {
8
11
  id: UnsafeMixed<string>;
9
- sourceID: UnsafeMixed<string>;
10
- existing: UnsafeMixed<boolean>;
12
+ sourceID?: OptionalProp<string>;
13
+ existing?: OptionalProp<boolean>;
11
14
  filter: UnsafeMixed<any[]>;
12
15
 
13
- aboveLayerID: UnsafeMixed<string>;
14
- belowLayerID: UnsafeMixed<string>;
15
- layerIndex: UnsafeMixed<Int32>;
16
+ aboveLayerID?: OptionalProp<string>;
17
+ belowLayerID?: OptionalProp<string>;
18
+ layerIndex?: OptionalProp<Int32>;
16
19
  reactStyle: UnsafeMixed<any>;
17
20
 
18
- maxZoomLevel: UnsafeMixed<Double>;
19
- minZoomLevel: UnsafeMixed<Double>;
20
- sourceLayerID: UnsafeMixed<string>;
21
+ maxZoomLevel?: OptionalProp<Double>;
22
+ minZoomLevel?: OptionalProp<Double>;
23
+ sourceLayerID?: OptionalProp<string>;
21
24
  }
22
25
 
23
26
  export default codegenNativeComponent<NativeProps>(
@@ -4,20 +4,23 @@ import { Double, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
4
4
 
5
5
  import type { UnsafeMixed } from './codegenUtils';
6
6
 
7
+ // see https://github.com/rnmapbox/maps/wiki/FabricOptionalProp
8
+ type OptionalProp<T> = UnsafeMixed<T>;
9
+
7
10
  export interface NativeProps extends ViewProps {
8
- id: UnsafeMixed<string>;
9
- sourceID: UnsafeMixed<string>;
10
- existing: UnsafeMixed<boolean>;
11
+ id: OptionalProp<string>;
12
+ sourceID?: OptionalProp<string>;
13
+ existing?: OptionalProp<boolean>;
11
14
  filter: UnsafeMixed<any[]>;
12
15
 
13
- aboveLayerID: UnsafeMixed<string>;
14
- belowLayerID: UnsafeMixed<string>;
15
- layerIndex: UnsafeMixed<Int32>;
16
+ aboveLayerID?: OptionalProp<string>;
17
+ belowLayerID?: OptionalProp<string>;
18
+ layerIndex?: OptionalProp<Int32>;
16
19
  reactStyle: UnsafeMixed<any>;
17
20
 
18
- maxZoomLevel: UnsafeMixed<Double>;
19
- minZoomLevel: UnsafeMixed<Double>;
20
- sourceLayerID: UnsafeMixed<string>;
21
+ maxZoomLevel?: OptionalProp<Double>;
22
+ minZoomLevel?: OptionalProp<Double>;
23
+ sourceLayerID?: OptionalProp<string>;
21
24
  }
22
25
 
23
26
  export default codegenNativeComponent<NativeProps>(
@@ -0,0 +1,15 @@
1
+ import type { HostComponent, ViewProps } from 'react-native';
2
+ import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
3
+
4
+ import { UnsafeMixed } from './codegenUtils';
5
+
6
+ export interface NativeProps extends ViewProps {
7
+ id: UnsafeMixed<string>;
8
+ existing: UnsafeMixed<boolean>;
9
+ url: UnsafeMixed<string>;
10
+ coordinates: UnsafeMixed<any>;
11
+ }
12
+
13
+ export default codegenNativeComponent<NativeProps>(
14
+ 'RNMBXImageSource',
15
+ ) as HostComponent<NativeProps>;
@@ -4,20 +4,23 @@ import { Double, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
4
4
 
5
5
  import type { UnsafeMixed } from './codegenUtils';
6
6
 
7
+ // see https://github.com/rnmapbox/maps/wiki/FabricOptionalProp
8
+ type OptionalProp<T> = UnsafeMixed<T>;
9
+
7
10
  export interface NativeProps extends ViewProps {
8
11
  id: UnsafeMixed<string>;
9
- sourceID: UnsafeMixed<string>;
10
- existing: UnsafeMixed<boolean>;
12
+ sourceID?: OptionalProp<string>;
13
+ existing?: OptionalProp<boolean>;
11
14
  filter: UnsafeMixed<any[]>;
12
15
 
13
- aboveLayerID: UnsafeMixed<string>;
14
- belowLayerID: UnsafeMixed<string>;
15
- layerIndex: UnsafeMixed<Int32>;
16
+ aboveLayerID?: OptionalProp<string>;
17
+ belowLayerID?: OptionalProp<string>;
18
+ layerIndex?: OptionalProp<Int32>;
16
19
  reactStyle: UnsafeMixed<any>;
17
20
 
18
- maxZoomLevel: UnsafeMixed<Double>;
19
- minZoomLevel: UnsafeMixed<Double>;
20
- sourceLayerID: UnsafeMixed<string>;
21
+ maxZoomLevel?: OptionalProp<Double>;
22
+ minZoomLevel?: OptionalProp<Double>;
23
+ sourceLayerID?: OptionalProp<string>;
21
24
  }
22
25
 
23
26
  export default codegenNativeComponent<NativeProps>(