@maplibre/maplibre-react-native 10.0.0-beta.11 → 10.0.0-beta.13

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 (433) hide show
  1. package/README.md +3 -3
  2. package/android/build.gradle +1 -1
  3. package/ios/MLRN/MLRNStyle.m +0 -40
  4. package/lib/commonjs/MapLibreRN.js +77 -59
  5. package/lib/commonjs/MapLibreRN.js.map +1 -1
  6. package/lib/commonjs/components/Annotation.js +7 -9
  7. package/lib/commonjs/components/Annotation.js.map +1 -1
  8. package/lib/commonjs/components/BackgroundLayer.js +6 -8
  9. package/lib/commonjs/components/BackgroundLayer.js.map +1 -1
  10. package/lib/commonjs/components/Callout.js +2 -2
  11. package/lib/commonjs/components/Callout.js.map +1 -1
  12. package/lib/commonjs/components/Camera.js +2 -3
  13. package/lib/commonjs/components/Camera.js.map +1 -1
  14. package/lib/commonjs/components/CircleLayer.js +6 -8
  15. package/lib/commonjs/components/CircleLayer.js.map +1 -1
  16. package/lib/commonjs/components/FillExtrusionLayer.js +6 -8
  17. package/lib/commonjs/components/FillExtrusionLayer.js.map +1 -1
  18. package/lib/commonjs/components/FillLayer.js +6 -8
  19. package/lib/commonjs/components/FillLayer.js.map +1 -1
  20. package/lib/commonjs/components/HeadingIndicator.js +4 -4
  21. package/lib/commonjs/components/HeadingIndicator.js.map +1 -1
  22. package/lib/commonjs/components/HeatmapLayer.js +6 -8
  23. package/lib/commonjs/components/HeatmapLayer.js.map +1 -1
  24. package/lib/commonjs/components/ImageSource.js +4 -5
  25. package/lib/commonjs/components/ImageSource.js.map +1 -1
  26. package/lib/commonjs/components/Images.js +2 -2
  27. package/lib/commonjs/components/Images.js.map +1 -1
  28. package/lib/commonjs/components/Light.js +4 -6
  29. package/lib/commonjs/components/Light.js.map +1 -1
  30. package/lib/commonjs/components/LineLayer.js +6 -8
  31. package/lib/commonjs/components/LineLayer.js.map +1 -1
  32. package/lib/commonjs/components/MapView.js +38 -39
  33. package/lib/commonjs/components/MapView.js.map +1 -1
  34. package/lib/commonjs/components/MarkerView.js +4 -5
  35. package/lib/commonjs/components/MarkerView.js.map +1 -1
  36. package/lib/commonjs/components/NativeUserLocation.js +2 -2
  37. package/lib/commonjs/components/NativeUserLocation.js.map +1 -1
  38. package/lib/commonjs/components/PointAnnotation.js +4 -6
  39. package/lib/commonjs/components/PointAnnotation.js.map +1 -1
  40. package/lib/commonjs/components/RasterLayer.js +6 -8
  41. package/lib/commonjs/components/RasterLayer.js.map +1 -1
  42. package/lib/commonjs/components/RasterSource.js +8 -10
  43. package/lib/commonjs/components/RasterSource.js.map +1 -1
  44. package/lib/commonjs/components/ShapeSource.js +6 -8
  45. package/lib/commonjs/components/ShapeSource.js.map +1 -1
  46. package/lib/commonjs/components/SymbolLayer.js +6 -7
  47. package/lib/commonjs/components/SymbolLayer.js.map +1 -1
  48. package/lib/commonjs/components/UserLocation.js +20 -22
  49. package/lib/commonjs/components/UserLocation.js.map +1 -1
  50. package/lib/commonjs/components/VectorSource.js +8 -10
  51. package/lib/commonjs/components/VectorSource.js.map +1 -1
  52. package/lib/commonjs/hooks/useAbstractLayer.js +1 -1
  53. package/lib/commonjs/hooks/useAbstractLayer.js.map +1 -1
  54. package/lib/commonjs/hooks/useAbstractSource.js +1 -1
  55. package/lib/commonjs/hooks/useAbstractSource.js.map +1 -1
  56. package/lib/commonjs/hooks/useNativeBridge.js +2 -2
  57. package/lib/commonjs/hooks/useNativeBridge.js.map +1 -1
  58. package/lib/commonjs/hooks/useOnce.js +2 -2
  59. package/lib/commonjs/hooks/useOnce.js.map +1 -1
  60. package/lib/commonjs/index.js +3 -0
  61. package/lib/commonjs/index.js.map +1 -1
  62. package/lib/commonjs/modules/location/{locationManager.js → LocationManager.js} +10 -10
  63. package/lib/commonjs/modules/location/LocationManager.js.map +1 -0
  64. package/lib/commonjs/modules/offline/OfflineCreatePackOptions.js +2 -2
  65. package/lib/commonjs/modules/offline/OfflineCreatePackOptions.js.map +1 -1
  66. package/lib/commonjs/modules/offline/{offlineManager.js → OfflineManager.js} +26 -28
  67. package/lib/commonjs/modules/offline/OfflineManager.js.map +1 -0
  68. package/lib/commonjs/modules/offline/OfflinePack.js +2 -2
  69. package/lib/commonjs/modules/offline/OfflinePack.js.map +1 -1
  70. package/lib/commonjs/modules/snapshot/{snapshotManager.js → SnapshotManager.js} +12 -14
  71. package/lib/commonjs/modules/snapshot/SnapshotManager.js.map +1 -0
  72. package/lib/commonjs/modules/snapshot/SnapshotOptions.js +3 -4
  73. package/lib/commonjs/modules/snapshot/SnapshotOptions.js.map +1 -1
  74. package/lib/commonjs/utils/BridgeValue.js +2 -2
  75. package/lib/commonjs/utils/BridgeValue.js.map +1 -1
  76. package/lib/commonjs/utils/Logger.js +2 -2
  77. package/lib/commonjs/utils/Logger.js.map +1 -1
  78. package/lib/commonjs/utils/StyleValue.js +2 -3
  79. package/lib/commonjs/utils/StyleValue.js.map +1 -1
  80. package/lib/commonjs/utils/animated/AbstractAnimatedCoordinates.js +2 -2
  81. package/lib/commonjs/utils/animated/AbstractAnimatedCoordinates.js.map +1 -1
  82. package/lib/commonjs/utils/animated/Animated.js +29 -31
  83. package/lib/commonjs/utils/animated/Animated.js.map +1 -1
  84. package/lib/commonjs/utils/animated/AnimatedCoordinatesArray.js +4 -5
  85. package/lib/commonjs/utils/animated/AnimatedCoordinatesArray.js.map +1 -1
  86. package/lib/commonjs/utils/animated/AnimatedExtractCoordinateFromArray.js +2 -2
  87. package/lib/commonjs/utils/animated/AnimatedExtractCoordinateFromArray.js.map +1 -1
  88. package/lib/commonjs/utils/animated/AnimatedPoint.js +1 -2
  89. package/lib/commonjs/utils/animated/AnimatedPoint.js.map +1 -1
  90. package/lib/commonjs/utils/animated/AnimatedRouteCoordinatesArray.js +4 -4
  91. package/lib/commonjs/utils/animated/AnimatedRouteCoordinatesArray.js.map +1 -1
  92. package/lib/commonjs/utils/animated/AnimatedShape.js +2 -2
  93. package/lib/commonjs/utils/animated/AnimatedShape.js.map +1 -1
  94. package/lib/module/MapLibreRN.js +40 -28
  95. package/lib/module/MapLibreRN.js.map +1 -1
  96. package/lib/module/components/Annotation.js +5 -6
  97. package/lib/module/components/Annotation.js.map +1 -1
  98. package/lib/module/components/BackgroundLayer.js +4 -6
  99. package/lib/module/components/BackgroundLayer.js.map +1 -1
  100. package/lib/module/components/Callout.js +2 -3
  101. package/lib/module/components/Callout.js.map +1 -1
  102. package/lib/module/components/Camera.js +1 -2
  103. package/lib/module/components/Camera.js.map +1 -1
  104. package/lib/module/components/CircleLayer.js +4 -6
  105. package/lib/module/components/CircleLayer.js.map +1 -1
  106. package/lib/module/components/FillExtrusionLayer.js +4 -6
  107. package/lib/module/components/FillExtrusionLayer.js.map +1 -1
  108. package/lib/module/components/FillLayer.js +4 -6
  109. package/lib/module/components/FillLayer.js.map +1 -1
  110. package/lib/module/components/HeadingIndicator.js +2 -3
  111. package/lib/module/components/HeadingIndicator.js.map +1 -1
  112. package/lib/module/components/HeatmapLayer.js +4 -6
  113. package/lib/module/components/HeatmapLayer.js.map +1 -1
  114. package/lib/module/components/ImageSource.js +2 -3
  115. package/lib/module/components/ImageSource.js.map +1 -1
  116. package/lib/module/components/Images.js +2 -3
  117. package/lib/module/components/Images.js.map +1 -1
  118. package/lib/module/components/Light.js +2 -4
  119. package/lib/module/components/Light.js.map +1 -1
  120. package/lib/module/components/LineLayer.js +4 -6
  121. package/lib/module/components/LineLayer.js.map +1 -1
  122. package/lib/module/components/MapView.js +34 -35
  123. package/lib/module/components/MapView.js.map +1 -1
  124. package/lib/module/components/MarkerView.js +2 -3
  125. package/lib/module/components/MarkerView.js.map +1 -1
  126. package/lib/module/components/NativeUserLocation.js +1 -2
  127. package/lib/module/components/NativeUserLocation.js.map +1 -1
  128. package/lib/module/components/PointAnnotation.js +2 -3
  129. package/lib/module/components/PointAnnotation.js.map +1 -1
  130. package/lib/module/components/RasterLayer.js +4 -6
  131. package/lib/module/components/RasterLayer.js.map +1 -1
  132. package/lib/module/components/RasterSource.js +5 -7
  133. package/lib/module/components/RasterSource.js.map +1 -1
  134. package/lib/module/components/ShapeSource.js +4 -5
  135. package/lib/module/components/ShapeSource.js.map +1 -1
  136. package/lib/module/components/SymbolLayer.js +4 -5
  137. package/lib/module/components/SymbolLayer.js.map +1 -1
  138. package/lib/module/components/UserLocation.js +13 -14
  139. package/lib/module/components/UserLocation.js.map +1 -1
  140. package/lib/module/components/VectorSource.js +5 -6
  141. package/lib/module/components/VectorSource.js.map +1 -1
  142. package/lib/module/hooks/useAbstractLayer.js +1 -1
  143. package/lib/module/hooks/useAbstractLayer.js.map +1 -1
  144. package/lib/module/hooks/useAbstractSource.js +1 -1
  145. package/lib/module/hooks/useAbstractSource.js.map +1 -1
  146. package/lib/module/hooks/useNativeBridge.js +1 -2
  147. package/lib/module/hooks/useNativeBridge.js.map +1 -1
  148. package/lib/module/hooks/useNativeRef.js.map +1 -1
  149. package/lib/module/hooks/useOnce.js +1 -2
  150. package/lib/module/hooks/useOnce.js.map +1 -1
  151. package/lib/module/index.js +4 -0
  152. package/lib/module/index.js.map +1 -1
  153. package/lib/module/modules/location/{locationManager.js → LocationManager.js} +10 -9
  154. package/lib/module/modules/location/LocationManager.js.map +1 -0
  155. package/lib/module/modules/offline/OfflineCreatePackOptions.js +1 -2
  156. package/lib/module/modules/offline/OfflineCreatePackOptions.js.map +1 -1
  157. package/lib/module/modules/offline/{offlineManager.js → OfflineManager.js} +22 -22
  158. package/lib/module/modules/offline/OfflineManager.js.map +1 -0
  159. package/lib/module/modules/offline/OfflinePack.js +1 -2
  160. package/lib/module/modules/offline/OfflinePack.js.map +1 -1
  161. package/lib/module/modules/snapshot/{snapshotManager.js → SnapshotManager.js} +10 -10
  162. package/lib/module/modules/snapshot/{snapshotManager.js.map → SnapshotManager.js.map} +1 -1
  163. package/lib/module/modules/snapshot/SnapshotOptions.js +2 -3
  164. package/lib/module/modules/snapshot/SnapshotOptions.js.map +1 -1
  165. package/lib/module/utils/BridgeValue.js +1 -1
  166. package/lib/module/utils/BridgeValue.js.map +1 -1
  167. package/lib/module/utils/Logger.js +1 -2
  168. package/lib/module/utils/Logger.js.map +1 -1
  169. package/lib/module/utils/StyleValue.js +1 -1
  170. package/lib/module/utils/StyleValue.js.map +1 -1
  171. package/lib/module/utils/animated/AbstractAnimatedCoordinates.js +1 -2
  172. package/lib/module/utils/animated/AbstractAnimatedCoordinates.js.map +1 -1
  173. package/lib/module/utils/animated/Animated.js +14 -15
  174. package/lib/module/utils/animated/Animated.js.map +1 -1
  175. package/lib/module/utils/animated/AnimatedCoordinatesArray.js +2 -3
  176. package/lib/module/utils/animated/AnimatedCoordinatesArray.js.map +1 -1
  177. package/lib/module/utils/animated/AnimatedExtractCoordinateFromArray.js +1 -1
  178. package/lib/module/utils/animated/AnimatedExtractCoordinateFromArray.js.map +1 -1
  179. package/lib/module/utils/animated/AnimatedPoint.js +0 -1
  180. package/lib/module/utils/animated/AnimatedPoint.js.map +1 -1
  181. package/lib/module/utils/animated/AnimatedRouteCoordinatesArray.js +2 -2
  182. package/lib/module/utils/animated/AnimatedRouteCoordinatesArray.js.map +1 -1
  183. package/lib/module/utils/animated/AnimatedShape.js +1 -2
  184. package/lib/module/utils/animated/AnimatedShape.js.map +1 -1
  185. package/lib/typescript/commonjs/src/MLRNModule.d.ts +1 -1
  186. package/lib/typescript/commonjs/src/MLRNModule.d.ts.map +1 -1
  187. package/lib/typescript/commonjs/src/MapLibreRN.d.ts +41 -29
  188. package/lib/typescript/commonjs/src/MapLibreRN.d.ts.map +1 -1
  189. package/lib/typescript/commonjs/src/components/Annotation.d.ts +4 -4
  190. package/lib/typescript/commonjs/src/components/Annotation.d.ts.map +1 -1
  191. package/lib/typescript/commonjs/src/components/BackgroundLayer.d.ts +1 -3
  192. package/lib/typescript/commonjs/src/components/BackgroundLayer.d.ts.map +1 -1
  193. package/lib/typescript/commonjs/src/components/Callout.d.ts +3 -4
  194. package/lib/typescript/commonjs/src/components/Callout.d.ts.map +1 -1
  195. package/lib/typescript/commonjs/src/components/Camera.d.ts +4 -4
  196. package/lib/typescript/commonjs/src/components/Camera.d.ts.map +1 -1
  197. package/lib/typescript/commonjs/src/components/CircleLayer.d.ts +1 -3
  198. package/lib/typescript/commonjs/src/components/CircleLayer.d.ts.map +1 -1
  199. package/lib/typescript/commonjs/src/components/FillExtrusionLayer.d.ts +1 -3
  200. package/lib/typescript/commonjs/src/components/FillExtrusionLayer.d.ts.map +1 -1
  201. package/lib/typescript/commonjs/src/components/FillLayer.d.ts +1 -3
  202. package/lib/typescript/commonjs/src/components/FillLayer.d.ts.map +1 -1
  203. package/lib/typescript/commonjs/src/components/HeadingIndicator.d.ts +2 -3
  204. package/lib/typescript/commonjs/src/components/HeadingIndicator.d.ts.map +1 -1
  205. package/lib/typescript/commonjs/src/components/HeatmapLayer.d.ts +1 -3
  206. package/lib/typescript/commonjs/src/components/HeatmapLayer.d.ts.map +1 -1
  207. package/lib/typescript/commonjs/src/components/ImageSource.d.ts +3 -4
  208. package/lib/typescript/commonjs/src/components/ImageSource.d.ts.map +1 -1
  209. package/lib/typescript/commonjs/src/components/Images.d.ts +4 -4
  210. package/lib/typescript/commonjs/src/components/Images.d.ts.map +1 -1
  211. package/lib/typescript/commonjs/src/components/Light.d.ts +2 -3
  212. package/lib/typescript/commonjs/src/components/Light.d.ts.map +1 -1
  213. package/lib/typescript/commonjs/src/components/LineLayer.d.ts +1 -3
  214. package/lib/typescript/commonjs/src/components/LineLayer.d.ts.map +1 -1
  215. package/lib/typescript/commonjs/src/components/MapView.d.ts +4 -4
  216. package/lib/typescript/commonjs/src/components/MapView.d.ts.map +1 -1
  217. package/lib/typescript/commonjs/src/components/MarkerView.d.ts +3 -3
  218. package/lib/typescript/commonjs/src/components/MarkerView.d.ts.map +1 -1
  219. package/lib/typescript/commonjs/src/components/NativeUserLocation.d.ts +2 -3
  220. package/lib/typescript/commonjs/src/components/NativeUserLocation.d.ts.map +1 -1
  221. package/lib/typescript/commonjs/src/components/PointAnnotation.d.ts +4 -3
  222. package/lib/typescript/commonjs/src/components/PointAnnotation.d.ts.map +1 -1
  223. package/lib/typescript/commonjs/src/components/RasterLayer.d.ts +1 -3
  224. package/lib/typescript/commonjs/src/components/RasterLayer.d.ts.map +1 -1
  225. package/lib/typescript/commonjs/src/components/RasterSource.d.ts +4 -4
  226. package/lib/typescript/commonjs/src/components/RasterSource.d.ts.map +1 -1
  227. package/lib/typescript/commonjs/src/components/ShapeSource.d.ts +4 -4
  228. package/lib/typescript/commonjs/src/components/ShapeSource.d.ts.map +1 -1
  229. package/lib/typescript/commonjs/src/components/SymbolLayer.d.ts +1 -2
  230. package/lib/typescript/commonjs/src/components/SymbolLayer.d.ts.map +1 -1
  231. package/lib/typescript/commonjs/src/components/UserLocation.d.ts +6 -6
  232. package/lib/typescript/commonjs/src/components/UserLocation.d.ts.map +1 -1
  233. package/lib/typescript/commonjs/src/components/VectorSource.d.ts +4 -3
  234. package/lib/typescript/commonjs/src/components/VectorSource.d.ts.map +1 -1
  235. package/lib/typescript/commonjs/src/hooks/useAbstractLayer.d.ts +3 -2
  236. package/lib/typescript/commonjs/src/hooks/useAbstractLayer.d.ts.map +1 -1
  237. package/lib/typescript/commonjs/src/hooks/useAbstractSource.d.ts +4 -3
  238. package/lib/typescript/commonjs/src/hooks/useAbstractSource.d.ts.map +1 -1
  239. package/lib/typescript/commonjs/src/hooks/useNativeBridge.d.ts +5 -5
  240. package/lib/typescript/commonjs/src/hooks/useNativeBridge.d.ts.map +1 -1
  241. package/lib/typescript/commonjs/src/hooks/useNativeRef.d.ts +2 -2
  242. package/lib/typescript/commonjs/src/hooks/useNativeRef.d.ts.map +1 -1
  243. package/lib/typescript/commonjs/src/hooks/useOnce.d.ts +1 -2
  244. package/lib/typescript/commonjs/src/hooks/useOnce.d.ts.map +1 -1
  245. package/lib/typescript/commonjs/src/index.d.ts +3 -0
  246. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  247. package/lib/typescript/commonjs/src/modules/location/LocationManager.d.ts +33 -0
  248. package/lib/typescript/commonjs/src/modules/location/LocationManager.d.ts.map +1 -0
  249. package/lib/typescript/commonjs/src/modules/offline/OfflineCreatePackOptions.d.ts +1 -2
  250. package/lib/typescript/commonjs/src/modules/offline/OfflineCreatePackOptions.d.ts.map +1 -1
  251. package/lib/typescript/commonjs/src/modules/offline/{offlineManager.d.ts → OfflineManager.d.ts} +17 -17
  252. package/lib/typescript/commonjs/src/modules/offline/OfflineManager.d.ts.map +1 -0
  253. package/lib/typescript/commonjs/src/modules/offline/OfflinePack.d.ts +2 -3
  254. package/lib/typescript/commonjs/src/modules/offline/OfflinePack.d.ts.map +1 -1
  255. package/lib/typescript/{module/src/modules/snapshot/snapshotManager.d.ts → commonjs/src/modules/snapshot/SnapshotManager.d.ts} +9 -9
  256. package/lib/typescript/commonjs/src/modules/snapshot/SnapshotManager.d.ts.map +1 -0
  257. package/lib/typescript/commonjs/src/modules/snapshot/SnapshotOptions.d.ts +1 -1
  258. package/lib/typescript/commonjs/src/modules/snapshot/SnapshotOptions.d.ts.map +1 -1
  259. package/lib/typescript/commonjs/src/utils/BridgeValue.d.ts +1 -1
  260. package/lib/typescript/commonjs/src/utils/BridgeValue.d.ts.map +1 -1
  261. package/lib/typescript/commonjs/src/utils/Logger.d.ts +2 -2
  262. package/lib/typescript/commonjs/src/utils/Logger.d.ts.map +1 -1
  263. package/lib/typescript/commonjs/src/utils/StyleValue.d.ts.map +1 -1
  264. package/lib/typescript/commonjs/src/utils/animated/AbstractAnimatedCoordinates.d.ts +2 -2
  265. package/lib/typescript/commonjs/src/utils/animated/AbstractAnimatedCoordinates.d.ts.map +1 -1
  266. package/lib/typescript/commonjs/src/utils/animated/Animated.d.ts +19 -19
  267. package/lib/typescript/commonjs/src/utils/animated/Animated.d.ts.map +1 -1
  268. package/lib/typescript/commonjs/src/utils/animated/AnimatedCoordinatesArray.d.ts +3 -3
  269. package/lib/typescript/commonjs/src/utils/animated/AnimatedCoordinatesArray.d.ts.map +1 -1
  270. package/lib/typescript/commonjs/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts +1 -1
  271. package/lib/typescript/commonjs/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts.map +1 -1
  272. package/lib/typescript/commonjs/src/utils/animated/AnimatedPoint.d.ts +1 -1
  273. package/lib/typescript/commonjs/src/utils/animated/AnimatedPoint.d.ts.map +1 -1
  274. package/lib/typescript/commonjs/src/utils/animated/AnimatedRouteCoordinatesArray.d.ts +2 -2
  275. package/lib/typescript/commonjs/src/utils/animated/AnimatedRouteCoordinatesArray.d.ts.map +1 -1
  276. package/lib/typescript/commonjs/src/utils/animated/AnimatedShape.d.ts +5 -5
  277. package/lib/typescript/commonjs/src/utils/animated/AnimatedShape.d.ts.map +1 -1
  278. package/lib/typescript/module/src/MLRNModule.d.ts +1 -1
  279. package/lib/typescript/module/src/MLRNModule.d.ts.map +1 -1
  280. package/lib/typescript/module/src/MapLibreRN.d.ts +41 -29
  281. package/lib/typescript/module/src/MapLibreRN.d.ts.map +1 -1
  282. package/lib/typescript/module/src/components/Annotation.d.ts +4 -4
  283. package/lib/typescript/module/src/components/Annotation.d.ts.map +1 -1
  284. package/lib/typescript/module/src/components/BackgroundLayer.d.ts +1 -3
  285. package/lib/typescript/module/src/components/BackgroundLayer.d.ts.map +1 -1
  286. package/lib/typescript/module/src/components/Callout.d.ts +3 -4
  287. package/lib/typescript/module/src/components/Callout.d.ts.map +1 -1
  288. package/lib/typescript/module/src/components/Camera.d.ts +4 -4
  289. package/lib/typescript/module/src/components/Camera.d.ts.map +1 -1
  290. package/lib/typescript/module/src/components/CircleLayer.d.ts +1 -3
  291. package/lib/typescript/module/src/components/CircleLayer.d.ts.map +1 -1
  292. package/lib/typescript/module/src/components/FillExtrusionLayer.d.ts +1 -3
  293. package/lib/typescript/module/src/components/FillExtrusionLayer.d.ts.map +1 -1
  294. package/lib/typescript/module/src/components/FillLayer.d.ts +1 -3
  295. package/lib/typescript/module/src/components/FillLayer.d.ts.map +1 -1
  296. package/lib/typescript/module/src/components/HeadingIndicator.d.ts +2 -3
  297. package/lib/typescript/module/src/components/HeadingIndicator.d.ts.map +1 -1
  298. package/lib/typescript/module/src/components/HeatmapLayer.d.ts +1 -3
  299. package/lib/typescript/module/src/components/HeatmapLayer.d.ts.map +1 -1
  300. package/lib/typescript/module/src/components/ImageSource.d.ts +3 -4
  301. package/lib/typescript/module/src/components/ImageSource.d.ts.map +1 -1
  302. package/lib/typescript/module/src/components/Images.d.ts +4 -4
  303. package/lib/typescript/module/src/components/Images.d.ts.map +1 -1
  304. package/lib/typescript/module/src/components/Light.d.ts +2 -3
  305. package/lib/typescript/module/src/components/Light.d.ts.map +1 -1
  306. package/lib/typescript/module/src/components/LineLayer.d.ts +1 -3
  307. package/lib/typescript/module/src/components/LineLayer.d.ts.map +1 -1
  308. package/lib/typescript/module/src/components/MapView.d.ts +4 -4
  309. package/lib/typescript/module/src/components/MapView.d.ts.map +1 -1
  310. package/lib/typescript/module/src/components/MarkerView.d.ts +3 -3
  311. package/lib/typescript/module/src/components/MarkerView.d.ts.map +1 -1
  312. package/lib/typescript/module/src/components/NativeUserLocation.d.ts +2 -3
  313. package/lib/typescript/module/src/components/NativeUserLocation.d.ts.map +1 -1
  314. package/lib/typescript/module/src/components/PointAnnotation.d.ts +4 -3
  315. package/lib/typescript/module/src/components/PointAnnotation.d.ts.map +1 -1
  316. package/lib/typescript/module/src/components/RasterLayer.d.ts +1 -3
  317. package/lib/typescript/module/src/components/RasterLayer.d.ts.map +1 -1
  318. package/lib/typescript/module/src/components/RasterSource.d.ts +4 -4
  319. package/lib/typescript/module/src/components/RasterSource.d.ts.map +1 -1
  320. package/lib/typescript/module/src/components/ShapeSource.d.ts +4 -4
  321. package/lib/typescript/module/src/components/ShapeSource.d.ts.map +1 -1
  322. package/lib/typescript/module/src/components/SymbolLayer.d.ts +1 -2
  323. package/lib/typescript/module/src/components/SymbolLayer.d.ts.map +1 -1
  324. package/lib/typescript/module/src/components/UserLocation.d.ts +6 -6
  325. package/lib/typescript/module/src/components/UserLocation.d.ts.map +1 -1
  326. package/lib/typescript/module/src/components/VectorSource.d.ts +4 -3
  327. package/lib/typescript/module/src/components/VectorSource.d.ts.map +1 -1
  328. package/lib/typescript/module/src/hooks/useAbstractLayer.d.ts +3 -2
  329. package/lib/typescript/module/src/hooks/useAbstractLayer.d.ts.map +1 -1
  330. package/lib/typescript/module/src/hooks/useAbstractSource.d.ts +4 -3
  331. package/lib/typescript/module/src/hooks/useAbstractSource.d.ts.map +1 -1
  332. package/lib/typescript/module/src/hooks/useNativeBridge.d.ts +5 -5
  333. package/lib/typescript/module/src/hooks/useNativeBridge.d.ts.map +1 -1
  334. package/lib/typescript/module/src/hooks/useNativeRef.d.ts +2 -2
  335. package/lib/typescript/module/src/hooks/useNativeRef.d.ts.map +1 -1
  336. package/lib/typescript/module/src/hooks/useOnce.d.ts +1 -2
  337. package/lib/typescript/module/src/hooks/useOnce.d.ts.map +1 -1
  338. package/lib/typescript/module/src/index.d.ts +3 -0
  339. package/lib/typescript/module/src/index.d.ts.map +1 -1
  340. package/lib/typescript/module/src/modules/location/LocationManager.d.ts +33 -0
  341. package/lib/typescript/module/src/modules/location/LocationManager.d.ts.map +1 -0
  342. package/lib/typescript/module/src/modules/offline/OfflineCreatePackOptions.d.ts +1 -2
  343. package/lib/typescript/module/src/modules/offline/OfflineCreatePackOptions.d.ts.map +1 -1
  344. package/lib/typescript/module/src/modules/offline/{offlineManager.d.ts → OfflineManager.d.ts} +17 -17
  345. package/lib/typescript/module/src/modules/offline/OfflineManager.d.ts.map +1 -0
  346. package/lib/typescript/module/src/modules/offline/OfflinePack.d.ts +2 -3
  347. package/lib/typescript/module/src/modules/offline/OfflinePack.d.ts.map +1 -1
  348. package/lib/typescript/{commonjs/src/modules/snapshot/snapshotManager.d.ts → module/src/modules/snapshot/SnapshotManager.d.ts} +9 -9
  349. package/lib/typescript/module/src/modules/snapshot/SnapshotManager.d.ts.map +1 -0
  350. package/lib/typescript/module/src/modules/snapshot/SnapshotOptions.d.ts +1 -1
  351. package/lib/typescript/module/src/modules/snapshot/SnapshotOptions.d.ts.map +1 -1
  352. package/lib/typescript/module/src/utils/BridgeValue.d.ts +1 -1
  353. package/lib/typescript/module/src/utils/BridgeValue.d.ts.map +1 -1
  354. package/lib/typescript/module/src/utils/Logger.d.ts +2 -2
  355. package/lib/typescript/module/src/utils/Logger.d.ts.map +1 -1
  356. package/lib/typescript/module/src/utils/StyleValue.d.ts.map +1 -1
  357. package/lib/typescript/module/src/utils/animated/AbstractAnimatedCoordinates.d.ts +2 -2
  358. package/lib/typescript/module/src/utils/animated/AbstractAnimatedCoordinates.d.ts.map +1 -1
  359. package/lib/typescript/module/src/utils/animated/Animated.d.ts +19 -19
  360. package/lib/typescript/module/src/utils/animated/Animated.d.ts.map +1 -1
  361. package/lib/typescript/module/src/utils/animated/AnimatedCoordinatesArray.d.ts +3 -3
  362. package/lib/typescript/module/src/utils/animated/AnimatedCoordinatesArray.d.ts.map +1 -1
  363. package/lib/typescript/module/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts +1 -1
  364. package/lib/typescript/module/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts.map +1 -1
  365. package/lib/typescript/module/src/utils/animated/AnimatedPoint.d.ts +1 -1
  366. package/lib/typescript/module/src/utils/animated/AnimatedPoint.d.ts.map +1 -1
  367. package/lib/typescript/module/src/utils/animated/AnimatedRouteCoordinatesArray.d.ts +2 -2
  368. package/lib/typescript/module/src/utils/animated/AnimatedRouteCoordinatesArray.d.ts.map +1 -1
  369. package/lib/typescript/module/src/utils/animated/AnimatedShape.d.ts +5 -5
  370. package/lib/typescript/module/src/utils/animated/AnimatedShape.d.ts.map +1 -1
  371. package/maplibre-react-native.podspec +1 -1
  372. package/package.json +7 -5
  373. package/src/MLRNModule.ts +1 -1
  374. package/src/MapLibreRN.ts +46 -30
  375. package/src/components/Annotation.tsx +9 -11
  376. package/src/components/BackgroundLayer.tsx +5 -7
  377. package/src/components/Callout.tsx +8 -10
  378. package/src/components/Camera.tsx +3 -5
  379. package/src/components/CircleLayer.tsx +5 -7
  380. package/src/components/FillExtrusionLayer.tsx +5 -7
  381. package/src/components/FillLayer.tsx +5 -7
  382. package/src/components/HeadingIndicator.tsx +2 -6
  383. package/src/components/HeatmapLayer.tsx +5 -7
  384. package/src/components/ImageSource.tsx +4 -6
  385. package/src/components/Images.tsx +6 -8
  386. package/src/components/Light.tsx +3 -5
  387. package/src/components/LineLayer.tsx +5 -7
  388. package/src/components/MapView.tsx +36 -37
  389. package/src/components/MarkerView.tsx +4 -6
  390. package/src/components/NativeUserLocation.tsx +1 -4
  391. package/src/components/PointAnnotation.tsx +7 -6
  392. package/src/components/RasterLayer.tsx +5 -7
  393. package/src/components/RasterSource.tsx +7 -9
  394. package/src/components/ShapeSource.tsx +6 -8
  395. package/src/components/SymbolLayer.tsx +5 -6
  396. package/src/components/UserLocation.tsx +18 -19
  397. package/src/components/VectorSource.tsx +7 -9
  398. package/src/hooks/useAbstractLayer.ts +5 -5
  399. package/src/hooks/useAbstractSource.ts +6 -6
  400. package/src/hooks/useNativeBridge.ts +9 -6
  401. package/src/hooks/useNativeRef.ts +2 -2
  402. package/src/hooks/useOnce.ts +3 -3
  403. package/src/index.ts +3 -0
  404. package/src/modules/location/{locationManager.ts → LocationManager.ts} +16 -15
  405. package/src/modules/offline/OfflineCreatePackOptions.ts +1 -3
  406. package/src/modules/offline/{offlineManager.ts → OfflineManager.ts} +22 -21
  407. package/src/modules/offline/OfflinePack.ts +2 -4
  408. package/src/modules/snapshot/{snapshotManager.ts → SnapshotManager.ts} +9 -9
  409. package/src/modules/snapshot/SnapshotOptions.ts +2 -4
  410. package/src/types/MapLibreRNStyles.ts +1 -1
  411. package/src/utils/BridgeValue.ts +1 -1
  412. package/src/utils/Logger.ts +1 -3
  413. package/src/utils/StyleValue.ts +2 -1
  414. package/src/utils/animated/AbstractAnimatedCoordinates.ts +3 -3
  415. package/src/utils/animated/Animated.ts +23 -21
  416. package/src/utils/animated/AnimatedCoordinatesArray.ts +3 -4
  417. package/src/utils/animated/AnimatedExtractCoordinateFromArray.ts +1 -1
  418. package/src/utils/animated/AnimatedPoint.ts +0 -2
  419. package/src/utils/animated/AnimatedRouteCoordinatesArray.ts +3 -2
  420. package/src/utils/animated/AnimatedShape.ts +4 -6
  421. package/lib/commonjs/modules/location/locationManager.js.map +0 -1
  422. package/lib/commonjs/modules/offline/offlineManager.js.map +0 -1
  423. package/lib/commonjs/modules/snapshot/snapshotManager.js.map +0 -1
  424. package/lib/module/modules/location/locationManager.js.map +0 -1
  425. package/lib/module/modules/offline/offlineManager.js.map +0 -1
  426. package/lib/typescript/commonjs/src/modules/location/locationManager.d.ts +0 -64
  427. package/lib/typescript/commonjs/src/modules/location/locationManager.d.ts.map +0 -1
  428. package/lib/typescript/commonjs/src/modules/offline/offlineManager.d.ts.map +0 -1
  429. package/lib/typescript/commonjs/src/modules/snapshot/snapshotManager.d.ts.map +0 -1
  430. package/lib/typescript/module/src/modules/location/locationManager.d.ts +0 -64
  431. package/lib/typescript/module/src/modules/location/locationManager.d.ts.map +0 -1
  432. package/lib/typescript/module/src/modules/offline/offlineManager.d.ts.map +0 -1
  433. package/lib/typescript/module/src/modules/snapshot/snapshotManager.d.ts.map +0 -1
@@ -22,17 +22,17 @@ import {
22
22
  type NativeSyntheticEvent,
23
23
  } from "react-native";
24
24
 
25
- import useNativeBridge from "../hooks/useNativeBridge";
26
- import useOnce from "../hooks/useOnce";
27
- import { type Location } from "../modules/location/locationManager";
25
+ import { useNativeBridge } from "../hooks/useNativeBridge";
26
+ import { useOnce } from "../hooks/useOnce";
27
+ import { type Location } from "../modules/location/LocationManager";
28
28
  import { type BaseProps } from "../types/BaseProps";
29
29
  import { type FilterExpression } from "../types/MapLibreRNStyles";
30
30
  import { isFunction, isAndroid } from "../utils";
31
- import Logger from "../utils/Logger";
31
+ import { Logger } from "../utils/Logger";
32
32
  import { getFilter } from "../utils/filterUtils";
33
33
 
34
- const MapLibreRN = NativeModules.MLRNModule;
35
- if (MapLibreRN == null) {
34
+ const MLRNModule = NativeModules.MLRNModule;
35
+ if (MLRNModule == null) {
36
36
  console.error(
37
37
  "Native module of @maplibre/maplibre-react-native library was not registered properly, please consult the docs: https://github.com/maplibre/maplibre-react-native",
38
38
  );
@@ -67,7 +67,7 @@ interface MapViewProps extends BaseProps {
67
67
  */
68
68
  style?: ViewProps["style"];
69
69
  /**
70
- * Style for map - either a URL or a Style JSON (https://maplibre.org/maplibre-style-spec/). Default: `MapLibreRN.StyleURL.Default`
70
+ * Style for map - either a URL or a Style JSON (https://maplibre.org/maplibre-style-spec/). Default: `StyleURL.Default`
71
71
  */
72
72
  mapStyle?: string | object;
73
73
  /**
@@ -278,7 +278,7 @@ export interface MapViewRef {
278
278
  /**
279
279
  * MapView backed by MapLibre Native
280
280
  */
281
- const MapView = memo(
281
+ export const MapView = memo(
282
282
  forwardRef<MapViewRef, MapViewProps>(
283
283
  (
284
284
  {
@@ -433,46 +433,46 @@ const MapView = memo(
433
433
  const events = [];
434
434
 
435
435
  if (props.onRegionWillChange) {
436
- events.push(MapLibreRN.EventTypes.RegionWillChange);
436
+ events.push(MLRNModule.EventTypes.RegionWillChange);
437
437
  }
438
438
  if (props.onRegionIsChanging) {
439
- events.push(MapLibreRN.EventTypes.RegionIsChanging);
439
+ events.push(MLRNModule.EventTypes.RegionIsChanging);
440
440
  }
441
441
  if (props.onRegionDidChange) {
442
- events.push(MapLibreRN.EventTypes.RegionDidChange);
442
+ events.push(MLRNModule.EventTypes.RegionDidChange);
443
443
  }
444
444
  if (props.onUserLocationUpdate) {
445
- events.push(MapLibreRN.EventTypes.UserLocationUpdated);
445
+ events.push(MLRNModule.EventTypes.UserLocationUpdated);
446
446
  }
447
447
  if (props.onWillStartLoadingMap) {
448
- events.push(MapLibreRN.EventTypes.WillStartLoadingMap);
448
+ events.push(MLRNModule.EventTypes.WillStartLoadingMap);
449
449
  }
450
450
  if (props.onDidFinishLoadingMap) {
451
- events.push(MapLibreRN.EventTypes.DidFinishLoadingMap);
451
+ events.push(MLRNModule.EventTypes.DidFinishLoadingMap);
452
452
  }
453
453
  if (props.onDidFailLoadingMap) {
454
- events.push(MapLibreRN.EventTypes.DidFailLoadingMap);
454
+ events.push(MLRNModule.EventTypes.DidFailLoadingMap);
455
455
  }
456
456
  if (props.onWillStartRenderingFrame) {
457
- events.push(MapLibreRN.EventTypes.WillStartRenderingFrame);
457
+ events.push(MLRNModule.EventTypes.WillStartRenderingFrame);
458
458
  }
459
459
  if (props.onDidFinishRenderingFrame) {
460
- events.push(MapLibreRN.EventTypes.DidFinishRenderingFrame);
460
+ events.push(MLRNModule.EventTypes.DidFinishRenderingFrame);
461
461
  }
462
462
  if (props.onDidFinishRenderingFrameFully) {
463
- events.push(MapLibreRN.EventTypes.DidFinishRenderingFrameFully);
463
+ events.push(MLRNModule.EventTypes.DidFinishRenderingFrameFully);
464
464
  }
465
465
  if (props.onWillStartRenderingMap) {
466
- events.push(MapLibreRN.EventTypes.WillStartRenderingMap);
466
+ events.push(MLRNModule.EventTypes.WillStartRenderingMap);
467
467
  }
468
468
  if (props.onDidFinishRenderingMap) {
469
- events.push(MapLibreRN.EventTypes.DidFinishRenderingMap);
469
+ events.push(MLRNModule.EventTypes.DidFinishRenderingMap);
470
470
  }
471
471
  if (props.onDidFinishRenderingMapFully) {
472
- events.push(MapLibreRN.EventTypes.DidFinishRenderingMapFully);
472
+ events.push(MLRNModule.EventTypes.DidFinishRenderingMapFully);
473
473
  }
474
474
  if (props.onDidFinishLoadingStyle) {
475
- events.push(MapLibreRN.EventTypes.DidFinishLoadingStyle);
475
+ events.push(MLRNModule.EventTypes.DidFinishLoadingStyle);
476
476
  }
477
477
 
478
478
  _runNativeCommand(
@@ -656,7 +656,7 @@ const MapView = memo(
656
656
  let propName: CallableProps | undefined;
657
657
 
658
658
  switch (type) {
659
- case MapLibreRN.EventTypes.RegionWillChange:
659
+ case MLRNModule.EventTypes.RegionWillChange:
660
660
  if (
661
661
  regionWillChangeDebounceTime &&
662
662
  regionWillChangeDebounceTime > 0
@@ -670,10 +670,10 @@ const MapView = memo(
670
670
  propName = "onRegionWillChange";
671
671
  }
672
672
  break;
673
- case MapLibreRN.EventTypes.RegionIsChanging:
673
+ case MLRNModule.EventTypes.RegionIsChanging:
674
674
  propName = "onRegionIsChanging";
675
675
  break;
676
- case MapLibreRN.EventTypes.RegionDidChange:
676
+ case MLRNModule.EventTypes.RegionDidChange:
677
677
  if (
678
678
  regionDidChangeDebounceTime &&
679
679
  regionDidChangeDebounceTime > 0
@@ -687,37 +687,37 @@ const MapView = memo(
687
687
  propName = "onRegionDidChange";
688
688
  }
689
689
  break;
690
- case MapLibreRN.EventTypes.UserLocationUpdated:
690
+ case MLRNModule.EventTypes.UserLocationUpdated:
691
691
  propName = "onUserLocationUpdate";
692
692
  break;
693
- case MapLibreRN.EventTypes.WillStartLoadingMap:
693
+ case MLRNModule.EventTypes.WillStartLoadingMap:
694
694
  propName = "onWillStartLoadingMap";
695
695
  break;
696
- case MapLibreRN.EventTypes.DidFinishLoadingMap:
696
+ case MLRNModule.EventTypes.DidFinishLoadingMap:
697
697
  propName = "onDidFinishLoadingMap";
698
698
  break;
699
- case MapLibreRN.EventTypes.DidFailLoadingMap:
699
+ case MLRNModule.EventTypes.DidFailLoadingMap:
700
700
  propName = "onDidFailLoadingMap";
701
701
  break;
702
- case MapLibreRN.EventTypes.WillStartRenderingFrame:
702
+ case MLRNModule.EventTypes.WillStartRenderingFrame:
703
703
  propName = "onWillStartRenderingFrame";
704
704
  break;
705
- case MapLibreRN.EventTypes.DidFinishRenderingFrame:
705
+ case MLRNModule.EventTypes.DidFinishRenderingFrame:
706
706
  propName = "onDidFinishRenderingFrame";
707
707
  break;
708
- case MapLibreRN.EventTypes.DidFinishRenderingFrameFully:
708
+ case MLRNModule.EventTypes.DidFinishRenderingFrameFully:
709
709
  propName = "onDidFinishRenderingFrameFully";
710
710
  break;
711
- case MapLibreRN.EventTypes.WillStartRenderingMap:
711
+ case MLRNModule.EventTypes.WillStartRenderingMap:
712
712
  propName = "onWillStartRenderingMap";
713
713
  break;
714
- case MapLibreRN.EventTypes.DidFinishRenderingMap:
714
+ case MLRNModule.EventTypes.DidFinishRenderingMap:
715
715
  propName = "onDidFinishRenderingMap";
716
716
  break;
717
- case MapLibreRN.EventTypes.DidFinishRenderingMapFully:
717
+ case MLRNModule.EventTypes.DidFinishRenderingMapFully:
718
718
  propName = "onDidFinishRenderingMapFully";
719
719
  break;
720
- case MapLibreRN.EventTypes.DidFinishLoadingStyle:
720
+ case MLRNModule.EventTypes.DidFinishLoadingStyle:
721
721
  propName = "onDidFinishLoadingStyle";
722
722
  break;
723
723
  default:
@@ -852,4 +852,3 @@ if (isAndroid()) {
852
852
  ANDROID_TEXTURE_NATIVE_MODULE_NAME,
853
853
  );
854
854
  }
855
- export default MapView;
@@ -2,7 +2,7 @@ import { point } from "@turf/helpers";
2
2
  import { type ReactElement, useMemo } from "react";
3
3
  import { Platform, requireNativeComponent, type ViewProps } from "react-native";
4
4
 
5
- import PointAnnotation from "./PointAnnotation";
5
+ import { PointAnnotation } from "./PointAnnotation";
6
6
  import { toJSONString } from "../utils";
7
7
 
8
8
  export const NATIVE_MODULE_NAME = "MLRNMarkerView";
@@ -35,7 +35,7 @@ interface MarkerViewProps extends ViewProps {
35
35
  /**
36
36
  * Expects one child - can be container with multiple elements
37
37
  */
38
- children: React.ReactElement;
38
+ children: ReactElement;
39
39
  }
40
40
 
41
41
  interface NativeProps extends ViewProps {
@@ -53,12 +53,12 @@ interface NativeProps extends ViewProps {
53
53
  * This is based on [MakerView plugin](https://docs.mapbox.com/android/plugins/overview/markerview/) on Android
54
54
  * and PointAnnotation on iOS.
55
55
  */
56
- const MarkerView = ({
56
+ export const MarkerView = ({
57
57
  anchor = { x: 0.5, y: 0.5 },
58
58
  allowOverlap = false,
59
59
  isSelected = false,
60
60
  ...rest
61
- }: MarkerViewProps): ReactElement => {
61
+ }: MarkerViewProps) => {
62
62
  const props = { anchor, allowOverlap, isSelected, ...rest };
63
63
  const coordinate = props.coordinate
64
64
  ? toJSONString(point(props.coordinate))
@@ -84,5 +84,3 @@ const MarkerView = ({
84
84
  let lastId = 0;
85
85
 
86
86
  const MLRNMarkerView = requireNativeComponent<NativeProps>(NATIVE_MODULE_NAME);
87
-
88
- export default MarkerView;
@@ -1,4 +1,3 @@
1
- import { type ReactElement } from "react";
2
1
  import { requireNativeComponent } from "react-native";
3
2
 
4
3
  const NATIVE_MODULE_NAME = "MLRNNativeUserLocation";
@@ -26,10 +25,8 @@ interface NativeUserLocationProps {
26
25
  androidPreferredFramesPerSecond?: number;
27
26
  }
28
27
 
29
- const NativeUserLocation = (props: NativeUserLocationProps): ReactElement => {
28
+ export const NativeUserLocation = (props: NativeUserLocationProps) => {
30
29
  return <MLRNNativeUserLocation {...props} />;
31
30
  };
32
31
 
33
32
  const MLRNNativeUserLocation = requireNativeComponent(NATIVE_MODULE_NAME);
34
-
35
- export default NativeUserLocation;
@@ -14,7 +14,7 @@ import {
14
14
  requireNativeComponent,
15
15
  } from "react-native";
16
16
 
17
- import useNativeBridge, { type RNMLEvent } from "../hooks/useNativeBridge";
17
+ import { useNativeBridge, type RNMLEvent } from "../hooks/useNativeBridge";
18
18
  import { isFunction, toJSONString } from "../utils";
19
19
 
20
20
  export const NATIVE_MODULE_NAME = "MLRNPointAnnotation";
@@ -102,7 +102,7 @@ export interface PointAnnotationProps {
102
102
  /**
103
103
  * Expects one child, and an optional callout can be added as well
104
104
  */
105
- children: React.ReactElement | [React.ReactElement, React.ReactElement];
105
+ children: ReactElement | [ReactElement, ReactElement];
106
106
 
107
107
  style?: ViewProps["style"];
108
108
  }
@@ -125,7 +125,10 @@ export interface PointAnnotationRef {
125
125
  * If you need interctive views please use MarkerView,
126
126
  * as with PointAnnotation on Android child views are rendered onto a bitmap for better performance.
127
127
  */
128
- const PointAnnotation = forwardRef<PointAnnotationRef, PointAnnotationProps>(
128
+ export const PointAnnotation = forwardRef<
129
+ PointAnnotationRef,
130
+ PointAnnotationProps
131
+ >(
129
132
  (
130
133
  {
131
134
  anchor = { x: 0.5, y: 0.5 },
@@ -133,7 +136,7 @@ const PointAnnotation = forwardRef<PointAnnotationRef, PointAnnotationProps>(
133
136
  ...props
134
137
  }: PointAnnotationProps,
135
138
  ref,
136
- ): ReactElement => {
139
+ ) => {
137
140
  useImperativeHandle(
138
141
  ref,
139
142
  (): PointAnnotationRef => ({
@@ -241,5 +244,3 @@ PointAnnotation.displayName = "PointAnnotation";
241
244
 
242
245
  const MLRNPointAnnotation =
243
246
  requireNativeComponent<NativeProps>(NATIVE_MODULE_NAME);
244
-
245
- export default PointAnnotation;
@@ -1,14 +1,14 @@
1
- import React from "react";
2
1
  import { NativeModules, requireNativeComponent } from "react-native";
3
2
 
4
- import useAbstractLayer, {
3
+ import {
4
+ useAbstractLayer,
5
5
  type BaseLayerProps,
6
6
  type NativeBaseProps,
7
7
  } from "../hooks/useAbstractLayer";
8
8
  import { type BaseProps } from "../types/BaseProps";
9
9
  import { type RasterLayerStyle } from "../types/MapLibreRNStyles";
10
10
 
11
- const MapLibreRN = NativeModules.MLRNModule;
11
+ const MLRNModule = NativeModules.MLRNModule;
12
12
 
13
13
  export const NATIVE_MODULE_NAME = "MLRNRasterLayer";
14
14
 
@@ -25,8 +25,8 @@ interface NativeProps
25
25
 
26
26
  const MLRNRasterLayer = requireNativeComponent<NativeProps>(NATIVE_MODULE_NAME);
27
27
 
28
- const RasterLayer: React.FC<RasterLayerProps> = ({
29
- sourceID = MapLibreRN.StyleSource.DefaultSourceID,
28
+ export const RasterLayer = ({
29
+ sourceID = MLRNModule.StyleSource.DefaultSourceID,
30
30
  ...props
31
31
  }: RasterLayerProps) => {
32
32
  const { baseProps, setNativeLayer } = useAbstractLayer<
@@ -39,5 +39,3 @@ const RasterLayer: React.FC<RasterLayerProps> = ({
39
39
 
40
40
  return <MLRNRasterLayer ref={setNativeLayer} {...baseProps} />;
41
41
  };
42
-
43
- export default RasterLayer;
@@ -1,12 +1,12 @@
1
- import React from "react";
1
+ import { type ReactNode } from "react";
2
2
  import { NativeModules, requireNativeComponent } from "react-native";
3
3
 
4
- import useAbstractSource from "../hooks/useAbstractSource";
5
- import useOnce from "../hooks/useOnce";
4
+ import { useAbstractSource } from "../hooks/useAbstractSource";
5
+ import { useOnce } from "../hooks/useOnce";
6
6
  import { type BaseProps } from "../types/BaseProps";
7
7
  import { cloneReactChildrenWithProps } from "../utils";
8
8
 
9
- const MapLibreRN = NativeModules.MLRNModule;
9
+ const MLRNModule = NativeModules.MLRNModule;
10
10
 
11
11
  export const NATIVE_MODULE_NAME = "MLRNRasterSource";
12
12
 
@@ -55,7 +55,7 @@ interface RasterSourceProps extends BaseProps {
55
55
  */
56
56
  attribution?: string;
57
57
 
58
- children?: React.ReactElement | React.ReactElement[];
58
+ children?: ReactNode;
59
59
  }
60
60
 
61
61
  type NativeProps = RasterSourceProps;
@@ -68,8 +68,8 @@ const MLRNRasterSource =
68
68
  * The location of and metadata about the tiles are defined either by an option dictionary
69
69
  * or by an external file that conforms to the TileJSON specification.
70
70
  */
71
- const RasterSource: React.FC<RasterSourceProps> = ({
72
- id = MapLibreRN.StyleSource.DefaultSourceID,
71
+ export const RasterSource = ({
72
+ id = MLRNModule.StyleSource.DefaultSourceID,
73
73
  ...props
74
74
  }: RasterSourceProps) => {
75
75
  useOnce(() => {
@@ -110,5 +110,3 @@ const RasterSource: React.FC<RasterSourceProps> = ({
110
110
  </MLRNRasterSource>
111
111
  );
112
112
  };
113
-
114
- export default RasterSource;
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  Component,
3
- type ReactElement,
4
3
  forwardRef,
5
4
  memo,
5
+ type ReactNode,
6
6
  useImperativeHandle,
7
7
  useRef,
8
8
  } from "react";
@@ -13,7 +13,7 @@ import {
13
13
  requireNativeComponent,
14
14
  } from "react-native";
15
15
 
16
- import useNativeBridge from "../hooks/useNativeBridge";
16
+ import { useNativeBridge } from "../hooks/useNativeBridge";
17
17
  import { type BaseProps } from "../types/BaseProps";
18
18
  import {
19
19
  type ExpressionField,
@@ -28,7 +28,7 @@ import {
28
28
  } from "../utils";
29
29
  import { getFilter } from "../utils/filterUtils";
30
30
 
31
- const MapLibreRN = NativeModules.MLRNModule;
31
+ const MLRNModule = NativeModules.MLRNModule;
32
32
  export const NATIVE_MODULE_NAME = "MLRNShapeSource";
33
33
 
34
34
  interface NativeProps {
@@ -133,7 +133,7 @@ export interface ShapeSourceProps extends BaseProps {
133
133
  height: number;
134
134
  };
135
135
 
136
- children?: ReactElement | ReactElement[];
136
+ children?: ReactNode;
137
137
  }
138
138
 
139
139
  export interface ShapeSourceRef {
@@ -158,11 +158,11 @@ export interface ShapeSourceRef {
158
158
  * ShapeSource is a map content source that supplies vector shapes to be shown on the map.
159
159
  * The shape may be a url or a GeoJSON object
160
160
  */
161
- const ShapeSource = memo(
161
+ export const ShapeSource = memo(
162
162
  forwardRef<ShapeSourceRef, ShapeSourceProps>(
163
163
  (
164
164
  {
165
- id: shapeId = MapLibreRN.StyleSource.DefaultSourceID,
165
+ id: shapeId = MLRNModule.StyleSource.DefaultSourceID,
166
166
  ...props
167
167
  }: ShapeSourceProps,
168
168
  ref,
@@ -364,5 +364,3 @@ const ShapeSource = memo(
364
364
  );
365
365
 
366
366
  const MLRNShapeSource = requireNativeComponent<NativeProps>(NATIVE_MODULE_NAME);
367
-
368
- export default ShapeSource;
@@ -1,13 +1,14 @@
1
1
  import { NativeModules, requireNativeComponent } from "react-native";
2
2
 
3
- import useAbstractLayer, {
3
+ import {
4
+ useAbstractLayer,
4
5
  type BaseLayerProps,
5
6
  type NativeBaseProps,
6
7
  } from "../hooks/useAbstractLayer";
7
8
  import { type BaseProps } from "../types/BaseProps";
8
9
  import { type SymbolLayerStyle } from "../types/MapLibreRNStyles";
9
10
 
10
- const MapLibreRN = NativeModules.MLRNModule;
11
+ const MLRNModule = NativeModules.MLRNModule;
11
12
 
12
13
  export const NATIVE_MODULE_NAME = "MLRNSymbolLayer";
13
14
 
@@ -27,8 +28,8 @@ const MLRNSymbolLayer = requireNativeComponent<NativeProps>(NATIVE_MODULE_NAME);
27
28
  /**
28
29
  * SymbolLayer is a style layer that renders icon and text labels at points or along lines on the map.
29
30
  */
30
- const SymbolLayer: React.FC<SymbolLayerProps> = ({
31
- sourceID = MapLibreRN.StyleSource.DefaultSourceID,
31
+ export const SymbolLayer = ({
32
+ sourceID = MLRNModule.StyleSource.DefaultSourceID,
32
33
  ...props
33
34
  }: SymbolLayerProps) => {
34
35
  const { baseProps, setNativeLayer } = useAbstractLayer<
@@ -45,5 +46,3 @@ const SymbolLayer: React.FC<SymbolLayerProps> = ({
45
46
 
46
47
  return <MLRNSymbolLayer ref={setNativeLayer} {...updatedProps} />;
47
48
  };
48
-
49
- export default SymbolLayer;
@@ -1,20 +1,21 @@
1
1
  import {
2
2
  forwardRef,
3
3
  memo,
4
- type ReactElement,
4
+ type ReactNode,
5
5
  useEffect,
6
6
  useImperativeHandle,
7
7
  useRef,
8
8
  useState,
9
9
  } from "react";
10
10
 
11
- import Annotation from "./Annotation";
12
- import CircleLayer from "./CircleLayer";
13
- import HeadingIndicator from "./HeadingIndicator";
14
- import NativeUserLocation from "./NativeUserLocation";
15
- import locationManager, {
11
+ import { Annotation } from "./Annotation";
12
+ import { CircleLayer } from "./CircleLayer";
13
+ import { HeadingIndicator } from "./HeadingIndicator";
14
+ import { NativeUserLocation } from "./NativeUserLocation";
15
+ import {
16
16
  type Location,
17
- } from "../modules/location/locationManager";
17
+ LocationManager,
18
+ } from "../modules/location/LocationManager";
18
19
  import { type CircleLayerStyle } from "../types/MapLibreRNStyles";
19
20
 
20
21
  const mapboxBlue = "rgba(51, 181, 229, 100)";
@@ -41,7 +42,7 @@ const layerStyles: Record<string, CircleLayerStyle> = {
41
42
  export const normalIcon = (
42
43
  showsUserHeadingIndicator?: boolean,
43
44
  heading?: number,
44
- ): ReactElement[] => [
45
+ ) => [
45
46
  <CircleLayer
46
47
  key="mapboxUserLocationPluseCircle"
47
48
  id="mapboxUserLocationPluseCircle"
@@ -114,7 +115,7 @@ interface UserLocationProps {
114
115
  *
115
116
  * NOTE: Forking maintainer does not understand the above comment.
116
117
  */
117
- children?: ReactElement | ReactElement[];
118
+ children?: ReactNode;
118
119
  }
119
120
 
120
121
  interface UserLocationState {
@@ -134,7 +135,7 @@ export interface UserLocationRef {
134
135
  _onLocationUpdate: (location: Location | null) => void;
135
136
  }
136
137
 
137
- const UserLocation = memo(
138
+ export const UserLocation = memo(
138
139
  forwardRef<UserLocationRef, UserLocationProps>(
139
140
  (
140
141
  {
@@ -163,7 +164,7 @@ const UserLocation = memo(
163
164
  ref,
164
165
  (): UserLocationRef => ({
165
166
  /**
166
- * Whether to start or stop listening to the locationManager
167
+ * Whether to start or stop listening to the LocationManager
167
168
  *
168
169
  * Notice, that listening will start automatically when
169
170
  * either `onUpdate` or `visible` are set
@@ -175,7 +176,7 @@ const UserLocation = memo(
175
176
  setLocationManager,
176
177
  /**
177
178
  *
178
- * If locationManager should be running
179
+ * If LocationManager should be running
179
180
  *
180
181
  * @return {boolean}
181
182
  */
@@ -194,7 +195,7 @@ const UserLocation = memo(
194
195
  return;
195
196
  }
196
197
 
197
- locationManager.setMinDisplacement(minDisplacement ?? 0);
198
+ LocationManager.setMinDisplacement(minDisplacement ?? 0);
198
199
  });
199
200
 
200
201
  return (): void => {
@@ -205,7 +206,7 @@ const UserLocation = memo(
205
206
  }, []);
206
207
 
207
208
  useEffect(() => {
208
- locationManager.setMinDisplacement(minDisplacement ?? 0);
209
+ LocationManager.setMinDisplacement(minDisplacement ?? 0);
209
210
  }, [minDisplacement]);
210
211
 
211
212
  useEffect(() => {
@@ -227,11 +228,11 @@ const UserLocation = memo(
227
228
  locationManagerRunning.current = running;
228
229
 
229
230
  if (running) {
230
- locationManager.addListener(_onLocationUpdate);
231
- const location = await locationManager.getLastKnownLocation();
231
+ LocationManager.addListener(_onLocationUpdate);
232
+ const location = await LocationManager.getLastKnownLocation();
232
233
  _onLocationUpdate(location);
233
234
  } else {
234
- locationManager.removeListener(_onLocationUpdate);
235
+ LocationManager.removeListener(_onLocationUpdate);
235
236
  }
236
237
  }
237
238
  }
@@ -303,5 +304,3 @@ const UserLocation = memo(
303
304
  },
304
305
  ),
305
306
  );
306
-
307
- export default UserLocation;
@@ -1,20 +1,20 @@
1
1
  import { featureCollection } from "@turf/helpers";
2
- import { forwardRef, memo, useImperativeHandle } from "react";
2
+ import { forwardRef, memo, type ReactNode, useImperativeHandle } from "react";
3
3
  import {
4
4
  NativeModules,
5
5
  type NativeSyntheticEvent,
6
6
  requireNativeComponent,
7
7
  } from "react-native";
8
8
 
9
- import useAbstractSource from "../hooks/useAbstractSource";
10
- import useNativeBridge from "../hooks/useNativeBridge";
9
+ import { useAbstractSource } from "../hooks/useAbstractSource";
10
+ import { useNativeBridge } from "../hooks/useNativeBridge";
11
11
  import { type BaseProps } from "../types/BaseProps";
12
12
  import { type FilterExpression } from "../types/MapLibreRNStyles";
13
13
  import { type OnPressEvent } from "../types/OnPressEvent";
14
14
  import { cloneReactChildrenWithProps, isFunction, isAndroid } from "../utils";
15
15
  import { getFilter } from "../utils/filterUtils";
16
16
 
17
- const MapLibreRN = NativeModules.MLRNModule;
17
+ const MLRNModule = NativeModules.MLRNModule;
18
18
 
19
19
  export const NATIVE_MODULE_NAME = "MLRNVectorSource";
20
20
 
@@ -77,7 +77,7 @@ interface VectorSourceProps extends BaseProps {
77
77
  height: number;
78
78
  };
79
79
 
80
- children?: React.ReactElement | React.ReactElement[];
80
+ children?: ReactNode;
81
81
  }
82
82
 
83
83
  type NativeProps = VectorSourceProps;
@@ -89,11 +89,11 @@ const MLRNVectorSource =
89
89
  * VectorSource is a map content source that supplies tiled vector data in Mapbox Vector Tile format to be shown on the map.
90
90
  * 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.
91
91
  */
92
- const VectorSource = memo(
92
+ export const VectorSource = memo(
93
93
  forwardRef(
94
94
  (
95
95
  {
96
- id = MapLibreRN.StyleSource.DefaultSourceID,
96
+ id = MLRNModule.StyleSource.DefaultSourceID,
97
97
  ...props
98
98
  }: VectorSourceProps,
99
99
  ref,
@@ -198,5 +198,3 @@ const VectorSource = memo(
198
198
  },
199
199
  ),
200
200
  );
201
-
202
- export default VectorSource;
@@ -1,4 +1,4 @@
1
- import { useMemo, useRef } from "react";
1
+ import { type Component, useMemo, useRef } from "react";
2
2
  import { processColor, type NativeMethods } from "react-native";
3
3
 
4
4
  import { type BaseProps } from "../types/BaseProps";
@@ -60,7 +60,7 @@ export interface NativeBaseProps {
60
60
  reactStyle?: { [key: string]: StyleValue };
61
61
  }
62
62
 
63
- export default function useAbstractLayer<
63
+ export function useAbstractLayer<
64
64
  Props extends BaseProps,
65
65
  NativeProps extends NativeBaseProps,
66
66
  >(
@@ -68,13 +68,13 @@ export default function useAbstractLayer<
68
68
  ): {
69
69
  baseProps: Props & BaseLayerProps;
70
70
  setNativeLayer: (
71
- instance: (React.Component<NativeProps> & Readonly<NativeMethods>) | null,
71
+ instance: (Component<NativeProps> & Readonly<NativeMethods>) | null,
72
72
  ) => void;
73
73
  getStyleTypeFormatter: (styleType: string) => typeof processColor | undefined;
74
74
  setNativeProps: (nativeProps: { [key: string]: unknown }) => void;
75
75
  } {
76
76
  const nativeLayer = useRef<
77
- (React.Component<NativeProps> & Readonly<NativeMethods>) | null
77
+ (Component<NativeProps> & Readonly<NativeMethods>) | null
78
78
  >(null);
79
79
 
80
80
  const baseProps = useMemo(() => {
@@ -94,7 +94,7 @@ export default function useAbstractLayer<
94
94
  }, [props]);
95
95
 
96
96
  const setNativeLayer = (
97
- instance: (React.Component<NativeProps> & Readonly<NativeMethods>) | null,
97
+ instance: (Component<NativeProps> & Readonly<NativeMethods>) | null,
98
98
  ): void => {
99
99
  nativeLayer.current = instance;
100
100
  };