@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
package/src/MapLibreRN.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export * from "./MLRNModule";
2
2
  export {
3
- default as Camera,
3
+ Camera,
4
4
  UserTrackingMode,
5
5
  type CameraPadding,
6
6
  type CameraAnimationMode,
@@ -8,53 +8,69 @@ export {
8
8
  type CameraRef,
9
9
  } from "./components/Camera";
10
10
  export {
11
- default as MapView,
11
+ MapView,
12
12
  type MapViewRef,
13
13
  type RegionPayload,
14
14
  } from "./components/MapView";
15
- export { default as Light } from "./components/Light";
16
- export { default as PointAnnotation } from "./components/PointAnnotation";
15
+ export { Light } from "./components/Light";
16
+ export { PointAnnotation } from "./components/PointAnnotation";
17
17
  export type { PointAnnotationRef } from "./components/PointAnnotation";
18
- export { default as Annotation } from "./components/Annotation";
19
- export { default as Callout } from "./components/Callout";
18
+ export { Annotation } from "./components/Annotation";
19
+ export { Callout } from "./components/Callout";
20
20
  export { requestAndroidLocationPermissions } from "./requestAndroidLocationPermissions";
21
21
  export {
22
- default as UserLocation,
22
+ UserLocation,
23
23
  UserLocationRenderMode,
24
24
  } from "./components/UserLocation";
25
25
  export type { UserLocationRef } from "./components/UserLocation";
26
- export { default as VectorSource } from "./components/VectorSource";
27
- export { default as ShapeSource } from "./components/ShapeSource";
26
+ export { VectorSource } from "./components/VectorSource";
27
+ export { ShapeSource } from "./components/ShapeSource";
28
28
  export type { ShapeSourceRef } from "./components/ShapeSource";
29
- export { default as RasterSource } from "./components/RasterSource";
30
- export { default as ImageSource } from "./components/ImageSource";
31
- export { default as Images } from "./components/Images";
32
- export { default as FillLayer } from "./components/FillLayer";
33
- export { default as FillExtrusionLayer } from "./components/FillExtrusionLayer";
34
- export { default as HeatmapLayer } from "./components/HeatmapLayer";
35
- export { default as LineLayer } from "./components/LineLayer";
36
- export { default as CircleLayer } from "./components/CircleLayer";
37
- export { default as SymbolLayer } from "./components/SymbolLayer";
38
- export { default as RasterLayer } from "./components/RasterLayer";
39
- export { default as BackgroundLayer } from "./components/BackgroundLayer";
40
- export { default as MarkerView } from "./components/MarkerView";
29
+ export { RasterSource } from "./components/RasterSource";
30
+ export { ImageSource } from "./components/ImageSource";
31
+ export { Images } from "./components/Images";
32
+ export { FillLayer } from "./components/FillLayer";
33
+ export { FillExtrusionLayer } from "./components/FillExtrusionLayer";
34
+ export { HeatmapLayer } from "./components/HeatmapLayer";
35
+ export { LineLayer } from "./components/LineLayer";
36
+ export { CircleLayer } from "./components/CircleLayer";
37
+ export { SymbolLayer } from "./components/SymbolLayer";
38
+ export { RasterLayer } from "./components/RasterLayer";
39
+ export { BackgroundLayer } from "./components/BackgroundLayer";
40
+ export { MarkerView } from "./components/MarkerView";
41
41
 
42
42
  export {
43
- default as locationManager,
43
+ LocationManager,
44
+ /**
45
+ * @deprecated Use LocationManager instead
46
+ */
47
+ LocationManager as locationManager,
44
48
  type Location,
45
- } from "./modules/location/locationManager";
46
- export { default as offlineManager } from "./modules/offline/offlineManager";
47
- export type { OfflinePackError } from "./modules/offline/offlineManager";
49
+ } from "./modules/location/LocationManager";
50
+ export {
51
+ OfflineManager,
52
+ /**
53
+ * @deprecated Use OfflineManager instead
54
+ */
55
+ OfflineManager as offlineManager,
56
+ } from "./modules/offline/OfflineManager";
57
+ export type { OfflinePackError } from "./modules/offline/OfflineManager";
48
58
  export type { OfflinePackStatus } from "./modules/offline/OfflinePack";
49
- export { default as OfflinePack } from "./modules/offline/OfflinePack";
50
- export { default as OfflineCreatePackOptions } from "./modules/offline/OfflineCreatePackOptions";
51
- export { default as snapshotManager } from "./modules/snapshot/snapshotManager";
59
+ export { OfflinePack } from "./modules/offline/OfflinePack";
60
+ export { OfflineCreatePackOptions } from "./modules/offline/OfflineCreatePackOptions";
61
+ export {
62
+ SnapshotManager,
63
+ /**
64
+ * @deprecated Use SnapshotManager instead
65
+ */
66
+ SnapshotManager as snapshotManager,
67
+ } from "./modules/snapshot/SnapshotManager";
52
68
  export type { SnapshotInputOptions } from "./modules/snapshot/SnapshotOptions";
53
69
 
54
70
  export type { MapLibreRNEvent } from "./types/MapLibreRNEvent";
55
71
 
56
- export { default as Animated } from "./utils/animated/Animated";
57
- export { default as Logger, type LogLevel } from "./utils/Logger";
72
+ export { Animated } from "./utils/animated/Animated";
73
+ export { Logger, type LogLevel } from "./utils/Logger";
58
74
  export type {
59
75
  FillLayerStyle,
60
76
  LineLayerStyle,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  forwardRef,
3
- type ReactElement,
3
+ type ReactNode,
4
4
  useCallback,
5
5
  useEffect,
6
6
  useImperativeHandle,
@@ -8,11 +8,11 @@ import {
8
8
  } from "react";
9
9
  import { Animated as RNAnimated, Easing } from "react-native";
10
10
 
11
- import SymbolLayer from "./SymbolLayer";
11
+ import { SymbolLayer } from "./SymbolLayer";
12
12
  import { type SymbolLayerStyle } from "../types/MapLibreRNStyles";
13
13
  import { type OnPressEvent } from "../types/OnPressEvent";
14
14
  import { AnimatedShapeSource } from "../utils/animated/Animated";
15
- import AnimatedMapPoint from "../utils/animated/AnimatedPoint";
15
+ import { AnimatedPoint } from "../utils/animated/AnimatedPoint";
16
16
 
17
17
  interface AnnotationProps {
18
18
  id: string;
@@ -21,12 +21,12 @@ interface AnnotationProps {
21
21
  animationEasingFunction?(x: number): number;
22
22
  coordinates?: number[];
23
23
  onPress?(event: OnPressEvent): void;
24
- children?: ReactElement | ReactElement[];
24
+ children?: ReactNode;
25
25
  style?: object;
26
26
  icon?: string | number | object;
27
27
  }
28
28
 
29
- type Shape = AnimatedMapPoint | GeoJSON.Point;
29
+ type Shape = AnimatedPoint | GeoJSON.Point;
30
30
 
31
31
  function getShapeFromProps(props: Partial<AnnotationProps> = {}): Shape {
32
32
  const lng = props.coordinates?.[0] || 0;
@@ -34,14 +34,14 @@ function getShapeFromProps(props: Partial<AnnotationProps> = {}): Shape {
34
34
  const point: GeoJSON.Point = { type: "Point", coordinates: [lng, lat] };
35
35
 
36
36
  if (props.animated) {
37
- return new AnimatedMapPoint(point);
37
+ return new AnimatedPoint(point);
38
38
  }
39
39
 
40
40
  return point;
41
41
  }
42
42
 
43
- function isShapeAnimated(shape: Shape): shape is AnimatedMapPoint {
44
- return shape instanceof AnimatedMapPoint;
43
+ function isShapeAnimated(shape: Shape): shape is AnimatedPoint {
44
+ return shape instanceof AnimatedPoint;
45
45
  }
46
46
 
47
47
  interface AnnotationRef {
@@ -49,7 +49,7 @@ interface AnnotationRef {
49
49
  symbolStyle: SymbolLayerStyle | undefined;
50
50
  }
51
51
 
52
- const Annotation = forwardRef<AnnotationRef, AnnotationProps>(
52
+ export const Annotation = forwardRef<AnnotationRef, AnnotationProps>(
53
53
  (
54
54
  {
55
55
  animated = false,
@@ -160,5 +160,3 @@ const Annotation = forwardRef<AnnotationRef, AnnotationProps>(
160
160
  );
161
161
 
162
162
  Annotation.displayName = "Annotation";
163
-
164
- export default Annotation;
@@ -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 BackgroundLayerStyle } from "../types/MapLibreRNStyles";
10
10
 
11
- const MapLibreRN = NativeModules.MLRNModule;
11
+ const MLRNModule = NativeModules.MLRNModule;
12
12
 
13
13
  export const NATIVE_MODULE_NAME = "MLRNBackgroundLayer";
14
14
 
@@ -26,8 +26,8 @@ interface NativeProps
26
26
  const MLRNBackgroundLayer =
27
27
  requireNativeComponent<BackgroundLayerProps>(NATIVE_MODULE_NAME);
28
28
 
29
- const BackgroundLayer: React.FC<BackgroundLayerProps> = ({
30
- sourceID = MapLibreRN.StyleSource.DefaultSourceID,
29
+ export const BackgroundLayer = ({
30
+ sourceID = MLRNModule.StyleSource.DefaultSourceID,
31
31
  ...props
32
32
  }: BackgroundLayerProps) => {
33
33
  const { baseProps, setNativeLayer } = useAbstractLayer<
@@ -46,5 +46,3 @@ const BackgroundLayer: React.FC<BackgroundLayerProps> = ({
46
46
  />
47
47
  );
48
48
  };
49
-
50
- export default BackgroundLayer;
@@ -1,13 +1,13 @@
1
- import { Children, type ReactElement } from "react";
1
+ import { Children } from "react";
2
2
  import {
3
- View,
4
- Text,
5
3
  Animated,
6
4
  requireNativeComponent,
5
+ type StyleProp,
7
6
  StyleSheet,
8
- type ViewStyle,
7
+ Text,
8
+ View,
9
9
  type ViewProps,
10
- type StyleProp,
10
+ type ViewStyle,
11
11
  } from "react-native";
12
12
 
13
13
  export const NATIVE_MODULE_NAME = "MLRNCallout";
@@ -82,7 +82,7 @@ interface NativeProps extends Omit<CalloutProps, "style"> {
82
82
  /**
83
83
  * Callout that displays information about a selected annotation near the annotation.
84
84
  */
85
- const Callout = (props: CalloutProps): ReactElement => {
85
+ export const Callout = (props: CalloutProps) => {
86
86
  const {
87
87
  title,
88
88
  style,
@@ -104,7 +104,7 @@ const Callout = (props: CalloutProps): ReactElement => {
104
104
 
105
105
  const _hasChildren = Children.count(children) > 0;
106
106
 
107
- const _renderDefaultCallout = (): ReactElement => {
107
+ const _renderDefaultCallout = () => {
108
108
  return (
109
109
  <Animated.View testID="container" style={[styles.container, style]}>
110
110
  <View testID="wrapper" style={[styles.content, contentStyle]}>
@@ -117,7 +117,7 @@ const Callout = (props: CalloutProps): ReactElement => {
117
117
  );
118
118
  };
119
119
 
120
- const _renderCustomCallout = (): ReactElement => {
120
+ const _renderCustomCallout = () => {
121
121
  return (
122
122
  <Animated.View testID="container" {...props} style={style}>
123
123
  {children}
@@ -137,5 +137,3 @@ const Callout = (props: CalloutProps): ReactElement => {
137
137
  };
138
138
 
139
139
  const MLRNCallout = requireNativeComponent<NativeProps>(NATIVE_MODULE_NAME);
140
-
141
- export default Callout;
@@ -6,7 +6,7 @@ import { CameraModes } from "../MLRNModule";
6
6
  import { useNativeRef } from "../hooks/useNativeRef";
7
7
  import { type BaseProps } from "../types/BaseProps";
8
8
  import { CameraMode } from "../types/CameraMode";
9
- import type { MapLibreRNEvent } from "../types/MapLibreRNEvent";
9
+ import { type MapLibreRNEvent } from "../types/MapLibreRNEvent";
10
10
  import { makeNativeBounds } from "../utils/makeNativeBounds";
11
11
 
12
12
  export const NATIVE_MODULE_NAME = "MLRNCamera";
@@ -211,7 +211,7 @@ export interface CameraProps extends BaseProps, CameraStop {
211
211
  followUserLocation?: boolean;
212
212
 
213
213
  /**
214
- * The mode used to track the user location on the map. One of; "normal", "compass", "course". Each mode string is also available as a member on the `MapLibreGL.UserTrackingMode` object. `Follow` (normal), `FollowWithHeading` (compass), `FollowWithCourse` (course). NOTE: `followUserLocation` must be set to `true` for any of the modes to take effect. [Example](/packages/examples/src/examples/Camera/SetUserTrackingMode.js)
214
+ * The mode used to track the user location on the map. One of; "normal", "compass", "course". Each mode string is also available as a member on the `UserTrackingMode` object. `Follow` (normal), `FollowWithHeading` (compass), `FollowWithCourse` (course). NOTE: `followUserLocation` must be set to `true` for any of the modes to take effect. [Example](/packages/examples/src/examples/Camera/SetUserTrackingMode.js)
215
215
  */
216
216
  followUserMode?: UserTrackingMode;
217
217
 
@@ -244,7 +244,7 @@ export interface NativeCameraProps
244
244
  defaultStop?: NativeCameraStop;
245
245
  }
246
246
 
247
- const Camera = memo(
247
+ export const Camera = memo(
248
248
  forwardRef<CameraRef, CameraProps>(
249
249
  (
250
250
  {
@@ -488,5 +488,3 @@ const Camera = memo(
488
488
 
489
489
  const MLRNCamera =
490
490
  requireNativeComponent<NativeCameraProps>(NATIVE_MODULE_NAME);
491
-
492
- export default Camera;
@@ -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 CircleLayerStyle } from "../types/MapLibreRNStyles";
10
10
 
11
- const MapLibreRN = NativeModules.MLRNModule;
11
+ const MLRNModule = NativeModules.MLRNModule;
12
12
 
13
13
  export const NATIVE_MODULE_NAME = "MLRNCircleLayer";
14
14
 
@@ -28,8 +28,8 @@ const MLRNCircleLayer = requireNativeComponent<NativeProps>(NATIVE_MODULE_NAME);
28
28
  /**
29
29
  * CircleLayer is a style layer that renders one or more filled circles on the map.
30
30
  */
31
- const CircleLayer: React.FC<CircleLayerProps> = ({
32
- sourceID = MapLibreRN.StyleSource.DefaultSourceID,
31
+ export const CircleLayer = ({
32
+ sourceID = MLRNModule.StyleSource.DefaultSourceID,
33
33
  ...props
34
34
  }: CircleLayerProps) => {
35
35
  const { baseProps, setNativeLayer } = useAbstractLayer<
@@ -48,5 +48,3 @@ const CircleLayer: React.FC<CircleLayerProps> = ({
48
48
  />
49
49
  );
50
50
  };
51
-
52
- export default CircleLayer;
@@ -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 FillExtrusionLayerStyle } from "../types/MapLibreRNStyles";
10
10
 
11
- const MapLibreRN = NativeModules.MLRNModule;
11
+ const MLRNModule = NativeModules.MLRNModule;
12
12
 
13
13
  export const NATIVE_MODULE_NAME = "MLRNFillExtrusionLayer";
14
14
 
@@ -29,8 +29,8 @@ const MLRNFillExtrusionLayer =
29
29
  /**
30
30
  * FillExtrusionLayer is a style layer that renders one or more 3D extruded polygons on the map.
31
31
  */
32
- const FillExtrusionLayer: React.FC<FillExtrusionLayerProps> = ({
33
- sourceID = MapLibreRN.StyleSource.DefaultSourceID,
32
+ export const FillExtrusionLayer = ({
33
+ sourceID = MLRNModule.StyleSource.DefaultSourceID,
34
34
  ...props
35
35
  }: FillExtrusionLayerProps) => {
36
36
  const { baseProps, setNativeLayer } = useAbstractLayer<
@@ -43,5 +43,3 @@ const FillExtrusionLayer: React.FC<FillExtrusionLayerProps> = ({
43
43
 
44
44
  return <MLRNFillExtrusionLayer ref={setNativeLayer} {...baseProps} />;
45
45
  };
46
-
47
- export default FillExtrusionLayer;
@@ -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 FillLayerStyle } from "../types/MapLibreRNStyles";
10
10
 
11
- const MapLibreRN = NativeModules.MLRNModule;
11
+ const MLRNModule = NativeModules.MLRNModule;
12
12
 
13
13
  export const NATIVE_MODULE_NAME = "MLRNFillLayer";
14
14
 
@@ -26,8 +26,8 @@ const MLRNFillLayer = requireNativeComponent<NativeProps>(NATIVE_MODULE_NAME);
26
26
  /**
27
27
  * FillLayer is a style layer that renders one or more filled (and optionally stroked) polygons on the map.
28
28
  */
29
- const FillLayer: React.FC<FillLayerProps> = ({
30
- sourceID = MapLibreRN.StyleSource.DefaultSourceID,
29
+ export const FillLayer = ({
30
+ sourceID = MLRNModule.StyleSource.DefaultSourceID,
31
31
  ...props
32
32
  }: FillLayerProps) => {
33
33
  const { baseProps, setNativeLayer } = useAbstractLayer<
@@ -40,5 +40,3 @@ const FillLayer: React.FC<FillLayerProps> = ({
40
40
 
41
41
  return <MLRNFillLayer ref={setNativeLayer} {...baseProps} />;
42
42
  };
43
-
44
- export default FillLayer;
@@ -1,6 +1,4 @@
1
- import { type ReactElement } from "react";
2
-
3
- import SymbolLayer from "./SymbolLayer";
1
+ import { SymbolLayer } from "./SymbolLayer";
4
2
  import headingIcon from "../assets/heading.png";
5
3
  import { type BaseProps } from "../types/BaseProps";
6
4
 
@@ -15,7 +13,7 @@ interface HeadingIndicatorProps extends BaseProps {
15
13
  heading?: number;
16
14
  }
17
15
 
18
- const HeadingIndicator = ({ heading }: HeadingIndicatorProps): ReactElement => (
16
+ export const HeadingIndicator = ({ heading }: HeadingIndicatorProps) => (
19
17
  <SymbolLayer
20
18
  key="mapboxUserLocationHeadingIndicator"
21
19
  id="mapboxUserLocationHeadingIndicator"
@@ -26,5 +24,3 @@ const HeadingIndicator = ({ heading }: HeadingIndicatorProps): ReactElement => (
26
24
  }}
27
25
  />
28
26
  );
29
-
30
- export default HeadingIndicator;
@@ -1,14 +1,14 @@
1
- import React from "react";
2
1
  import { NativeModules, requireNativeComponent } from "react-native";
3
2
 
4
- import useAbstractLayer, {
3
+ import {
5
4
  type BaseLayerProps,
6
5
  type NativeBaseProps,
6
+ useAbstractLayer,
7
7
  } from "../hooks/useAbstractLayer";
8
8
  import { type BaseProps } from "../types/BaseProps";
9
9
  import { type HeatmapLayerStyle } from "../types/MapLibreRNStyles";
10
10
 
11
- const MapLibreRN = NativeModules.MLRNModule;
11
+ const MLRNModule = NativeModules.MLRNModule;
12
12
 
13
13
  export const NATIVE_MODULE_NAME = "MLRNHeatmapLayer";
14
14
 
@@ -28,8 +28,8 @@ const MLRNHeatmapLayer =
28
28
  /**
29
29
  * HeatmapLayer is a style layer that renders one or more filled circles on the map.
30
30
  */
31
- const HeatmapLayer: React.FC<HeatmapLayerProps> = ({
32
- sourceID = MapLibreRN.StyleSource.DefaultSourceID,
31
+ export const HeatmapLayer = ({
32
+ sourceID = MLRNModule.StyleSource.DefaultSourceID,
33
33
  ...props
34
34
  }: HeatmapLayerProps) => {
35
35
  const { baseProps, setNativeLayer } = useAbstractLayer<
@@ -42,5 +42,3 @@ const HeatmapLayer: React.FC<HeatmapLayerProps> = ({
42
42
 
43
43
  return <MLRNHeatmapLayer ref={setNativeLayer} {...baseProps} />;
44
44
  };
45
-
46
- export default HeatmapLayer;
@@ -1,7 +1,7 @@
1
- import { type ReactElement } from "react";
1
+ import { type ReactNode } from "react";
2
2
  import { requireNativeComponent } from "react-native";
3
3
 
4
- import useAbstractSource from "../hooks/useAbstractSource";
4
+ import { useAbstractSource } from "../hooks/useAbstractSource";
5
5
  import { type BaseProps } from "../types/BaseProps";
6
6
  import {
7
7
  cloneReactChildrenWithProps,
@@ -31,7 +31,7 @@ export interface ImageSourceProps extends BaseProps {
31
31
  GeoJSON.Position,
32
32
  ];
33
33
 
34
- children?: ReactElement | ReactElement[];
34
+ children?: ReactNode;
35
35
  }
36
36
 
37
37
  type NativeProps = ImageSourceProps;
@@ -42,7 +42,7 @@ const MLRNImageSource = requireNativeComponent<NativeProps>(NATIVE_MODULE_NAME);
42
42
  * ImageSource is a content source that is used for a georeferenced raster image to be shown on the map.
43
43
  * The georeferenced image scales and rotates as the user zooms and rotates the map
44
44
  */
45
- const ImageSource: React.FC<ImageSourceProps> = (props: ImageSourceProps) => {
45
+ export const ImageSource = (props: ImageSourceProps) => {
46
46
  const { setNativeRef } = useAbstractSource<NativeProps>();
47
47
 
48
48
  const _getURL = (): string | undefined => {
@@ -66,5 +66,3 @@ const ImageSource: React.FC<ImageSourceProps> = (props: ImageSourceProps) => {
66
66
  </MLRNImageSource>
67
67
  );
68
68
  };
69
-
70
- export default ImageSource;
@@ -1,10 +1,10 @@
1
- import { type ReactElement } from "react";
1
+ import { type ReactNode } from "react";
2
2
  import {
3
- requireNativeComponent,
4
3
  Image,
5
- type NativeSyntheticEvent,
6
4
  type ImageSourcePropType,
7
5
  type ImageURISource,
6
+ type NativeSyntheticEvent,
7
+ requireNativeComponent,
8
8
  } from "react-native";
9
9
 
10
10
  import { type BaseProps } from "../types/BaseProps";
@@ -55,19 +55,19 @@ interface ImagesProps extends BaseProps {
55
55
 
56
56
  id?: string;
57
57
 
58
- children?: ReactElement;
58
+ children?: ReactNode;
59
59
  }
60
60
 
61
61
  /**
62
62
  * Images defines the images used in Symbol etc layers
63
63
  */
64
- const Images = ({
64
+ export const Images = ({
65
65
  images,
66
66
  nativeAssetImages,
67
67
  onImageMissing,
68
68
  id,
69
69
  children,
70
- }: ImagesProps): ReactElement => {
70
+ }: ImagesProps) => {
71
71
  const _getImages = (): {
72
72
  images?: { [key: string]: ImageEntry };
73
73
  nativeImages?: ImageEntry[];
@@ -123,5 +123,3 @@ const Images = ({
123
123
  };
124
124
 
125
125
  const MLRNImages = requireNativeComponent(NATIVE_MODULE_NAME);
126
-
127
- export default Images;
@@ -1,7 +1,7 @@
1
- import React from "react";
2
1
  import { requireNativeComponent } from "react-native";
3
2
 
4
- import useAbstractLayer, {
3
+ import {
4
+ useAbstractLayer,
5
5
  type BaseLayerProps,
6
6
  } from "../hooks/useAbstractLayer";
7
7
  import { type BaseProps } from "../types/BaseProps";
@@ -26,7 +26,7 @@ const MLRNLight = requireNativeComponent<NativeProps>(NATIVE_MODULE_NAME);
26
26
  /**
27
27
  * Light represents the light source for extruded geometries
28
28
  */
29
- const Light: React.FC<LightProps> = (props: LightProps) => {
29
+ export const Light = (props: LightProps) => {
30
30
  const { baseProps, setNativeLayer } = useAbstractLayer<
31
31
  LightProps,
32
32
  NativeProps
@@ -36,5 +36,3 @@ const Light: React.FC<LightProps> = (props: LightProps) => {
36
36
 
37
37
  return <MLRNLight ref={setNativeLayer} testID="mlrnLight" {...baseProps} />;
38
38
  };
39
-
40
- export default Light;
@@ -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 LineLayerStyle } from "../types/MapLibreRNStyles";
10
10
 
11
- const MapLibreRN = NativeModules.MLRNModule;
11
+ const MLRNModule = NativeModules.MLRNModule;
12
12
 
13
13
  export const NATIVE_MODULE_NAME = "MLRNLineLayer";
14
14
 
@@ -27,8 +27,8 @@ const MLRNLineLayer =
27
27
  /**
28
28
  * LineLayer is a style layer that renders one or more stroked polylines on the map.
29
29
  */
30
- const LineLayer: React.FC<LineLayerProps> = ({
31
- sourceID = MapLibreRN.StyleSource.DefaultSourceID,
30
+ export const LineLayer = ({
31
+ sourceID = MLRNModule.StyleSource.DefaultSourceID,
32
32
  ...props
33
33
  }: LineLayerProps) => {
34
34
  const { baseProps, setNativeLayer } = useAbstractLayer<
@@ -41,5 +41,3 @@ const LineLayer: React.FC<LineLayerProps> = ({
41
41
 
42
42
  return <MLRNLineLayer ref={setNativeLayer} {...baseProps} />;
43
43
  };
44
-
45
- export default LineLayer;