@maplibre/maplibre-react-native 10.0.0-alpha.26 → 10.0.0-alpha.28

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 (627) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +2 -2
  3. package/android/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleFactory.java +1 -1
  4. package/ios/RCTMLN/RCTMLNStyle.h +1 -1
  5. package/ios/RCTMLN/RCTMLNStyle.m +1 -1
  6. package/lib/commonjs/MLNModule.js +27 -0
  7. package/lib/commonjs/MLNModule.js.map +1 -0
  8. package/lib/commonjs/MapLibreRN.js +281 -0
  9. package/lib/commonjs/MapLibreRN.js.map +1 -0
  10. package/lib/commonjs/assets/png.d.js +2 -0
  11. package/lib/commonjs/assets/png.d.js.map +1 -0
  12. package/lib/commonjs/components/Annotation.js +109 -0
  13. package/lib/commonjs/components/Annotation.js.map +1 -0
  14. package/lib/commonjs/components/BackgroundLayer.js +33 -0
  15. package/lib/commonjs/components/BackgroundLayer.js.map +1 -0
  16. package/lib/commonjs/components/Callout.js +101 -0
  17. package/lib/commonjs/components/Callout.js.map +1 -0
  18. package/lib/commonjs/components/Camera.js +285 -0
  19. package/lib/commonjs/components/Camera.js.map +1 -0
  20. package/lib/commonjs/components/CircleLayer.js +37 -0
  21. package/lib/commonjs/components/CircleLayer.js.map +1 -0
  22. package/lib/commonjs/components/FillExtrusionLayer.js +36 -0
  23. package/lib/commonjs/components/FillExtrusionLayer.js.map +1 -0
  24. package/lib/commonjs/components/FillLayer.js +36 -0
  25. package/lib/commonjs/components/FillLayer.js.map +1 -0
  26. package/lib/commonjs/components/HeadingIndicator.js +28 -0
  27. package/lib/commonjs/components/HeadingIndicator.js.map +1 -0
  28. package/lib/commonjs/components/HeatmapLayer.js +35 -0
  29. package/lib/commonjs/components/HeatmapLayer.js.map +1 -0
  30. package/lib/commonjs/components/ImageSource.js +42 -0
  31. package/lib/commonjs/components/ImageSource.js.map +1 -0
  32. package/lib/commonjs/components/Images.js +80 -0
  33. package/lib/commonjs/components/Images.js.map +1 -0
  34. package/lib/commonjs/components/Light.js +32 -0
  35. package/lib/commonjs/components/Light.js.map +1 -0
  36. package/lib/commonjs/components/LineLayer.js +36 -0
  37. package/lib/commonjs/components/LineLayer.js.map +1 -0
  38. package/lib/commonjs/components/MapView.js +463 -0
  39. package/lib/commonjs/components/MapView.js.map +1 -0
  40. package/lib/commonjs/components/MarkerView.js +61 -0
  41. package/lib/commonjs/components/MarkerView.js.map +1 -0
  42. package/lib/commonjs/components/NativeUserLocation.js +17 -0
  43. package/lib/commonjs/components/NativeUserLocation.js.map +1 -0
  44. package/lib/commonjs/components/PointAnnotation.js +121 -0
  45. package/lib/commonjs/components/PointAnnotation.js.map +1 -0
  46. package/lib/commonjs/components/RasterLayer.js +32 -0
  47. package/lib/commonjs/components/RasterLayer.js.map +1 -0
  48. package/lib/commonjs/components/RasterSource.js +67 -0
  49. package/lib/commonjs/components/RasterSource.js.map +1 -0
  50. package/lib/commonjs/components/ShapeSource.js +203 -0
  51. package/lib/commonjs/components/ShapeSource.js.map +1 -0
  52. package/lib/commonjs/components/Style.js +266 -0
  53. package/lib/commonjs/components/Style.js.map +1 -0
  54. package/lib/commonjs/components/SymbolLayer.js +53 -0
  55. package/lib/commonjs/components/SymbolLayer.js.map +1 -0
  56. package/lib/commonjs/components/UserLocation.js +188 -0
  57. package/lib/commonjs/components/UserLocation.js.map +1 -0
  58. package/lib/commonjs/components/VectorSource.js +129 -0
  59. package/lib/commonjs/components/VectorSource.js.map +1 -0
  60. package/lib/commonjs/hooks/useAbstractLayer.js +53 -0
  61. package/lib/commonjs/hooks/useAbstractLayer.js.map +1 -0
  62. package/lib/commonjs/hooks/useAbstractSource.js +24 -0
  63. package/lib/commonjs/hooks/useAbstractSource.js.map +1 -0
  64. package/lib/commonjs/hooks/useNativeBridge.js +84 -0
  65. package/lib/commonjs/hooks/useNativeBridge.js.map +1 -0
  66. package/lib/commonjs/hooks/useNativeRef.js +14 -0
  67. package/lib/commonjs/hooks/useNativeRef.js.map +1 -0
  68. package/lib/commonjs/hooks/useOnce.js +16 -0
  69. package/lib/commonjs/hooks/useOnce.js.map +1 -0
  70. package/lib/commonjs/index.js +23 -0
  71. package/lib/commonjs/index.js.map +1 -0
  72. package/lib/commonjs/modules/location/locationManager.js +91 -0
  73. package/lib/commonjs/modules/location/locationManager.js.map +1 -0
  74. package/lib/commonjs/modules/offline/OfflineCreatePackOptions.js +37 -0
  75. package/lib/commonjs/modules/offline/OfflineCreatePackOptions.js.map +1 -0
  76. package/lib/commonjs/modules/offline/OfflinePack.js +40 -0
  77. package/lib/commonjs/modules/offline/OfflinePack.js.map +1 -0
  78. package/lib/commonjs/modules/offline/offlineManager.js +346 -0
  79. package/lib/commonjs/modules/offline/offlineManager.js.map +1 -0
  80. package/lib/commonjs/modules/snapshot/SnapshotOptions.js +58 -0
  81. package/lib/commonjs/modules/snapshot/SnapshotOptions.js.map +1 -0
  82. package/lib/commonjs/modules/snapshot/snapshotManager.js +66 -0
  83. package/lib/commonjs/modules/snapshot/snapshotManager.js.map +1 -0
  84. package/lib/commonjs/requestAndroidLocationPermissions.js +25 -0
  85. package/lib/commonjs/requestAndroidLocationPermissions.js.map +1 -0
  86. package/lib/commonjs/types/BaseProps.js +2 -0
  87. package/lib/commonjs/types/BaseProps.js.map +1 -0
  88. package/lib/commonjs/types/CameraMode.js +14 -0
  89. package/lib/commonjs/types/CameraMode.js.map +1 -0
  90. package/lib/commonjs/types/MapLibreRNEvent.js +6 -0
  91. package/lib/commonjs/types/MapLibreRNEvent.js.map +1 -0
  92. package/lib/commonjs/types/OnPressEvent.js +2 -0
  93. package/lib/commonjs/types/OnPressEvent.js.map +1 -0
  94. package/lib/commonjs/types/StyleURL.js +11 -0
  95. package/lib/commonjs/types/StyleURL.js.map +1 -0
  96. package/lib/commonjs/utils/BridgeValue.js +59 -0
  97. package/lib/commonjs/utils/BridgeValue.js.map +1 -0
  98. package/lib/commonjs/utils/Logger.js +118 -0
  99. package/lib/commonjs/utils/Logger.js.map +1 -0
  100. package/lib/commonjs/utils/MapLibreRNStyles.d.js +181 -0
  101. package/lib/commonjs/utils/MapLibreRNStyles.d.js.map +1 -0
  102. package/lib/commonjs/utils/StyleValue.js +39 -0
  103. package/lib/commonjs/utils/StyleValue.js.map +1 -0
  104. package/lib/commonjs/utils/animated/AbstractAnimatedCoordinates.js +95 -0
  105. package/lib/commonjs/utils/animated/AbstractAnimatedCoordinates.js.map +1 -0
  106. package/lib/commonjs/utils/animated/Animated.js +47 -0
  107. package/lib/commonjs/utils/animated/Animated.js.map +1 -0
  108. package/lib/commonjs/utils/animated/AnimatedCoordinatesArray.js +92 -0
  109. package/lib/commonjs/utils/animated/AnimatedCoordinatesArray.js.map +1 -0
  110. package/lib/commonjs/utils/animated/AnimatedExtractCoordinateFromArray.js +40 -0
  111. package/lib/commonjs/utils/animated/AnimatedExtractCoordinateFromArray.js.map +1 -0
  112. package/lib/commonjs/utils/animated/AnimatedPoint.js +111 -0
  113. package/lib/commonjs/utils/animated/AnimatedPoint.js.map +1 -0
  114. package/lib/commonjs/utils/animated/AnimatedRouteCoordinatesArray.js +137 -0
  115. package/lib/commonjs/utils/animated/AnimatedRouteCoordinatesArray.js.map +1 -0
  116. package/lib/commonjs/utils/animated/AnimatedShape.js +75 -0
  117. package/lib/commonjs/utils/animated/AnimatedShape.js.map +1 -0
  118. package/lib/commonjs/utils/deprecation.js +31 -0
  119. package/lib/commonjs/utils/deprecation.js.map +1 -0
  120. package/lib/commonjs/utils/filterUtils.js +13 -0
  121. package/lib/commonjs/utils/filterUtils.js.map +1 -0
  122. package/lib/commonjs/utils/index.js +97 -0
  123. package/lib/commonjs/utils/index.js.map +1 -0
  124. package/lib/commonjs/utils/makeNativeBounds.js +11 -0
  125. package/lib/commonjs/utils/makeNativeBounds.js.map +1 -0
  126. package/lib/commonjs/utils/styleMap.js +255 -0
  127. package/lib/commonjs/utils/styleMap.js.map +1 -0
  128. package/lib/module/MLNModule.js +15 -0
  129. package/lib/module/MLNModule.js.map +1 -0
  130. package/lib/module/MapLibreRN.js +37 -0
  131. package/lib/module/MapLibreRN.js.map +1 -0
  132. package/lib/module/assets/heading.png +0 -0
  133. package/lib/module/assets/heading@2x.png +0 -0
  134. package/lib/module/assets/heading@3x.png +0 -0
  135. package/lib/module/assets/png.d.js +2 -0
  136. package/lib/module/assets/png.d.js.map +1 -0
  137. package/lib/module/components/Annotation.js +104 -0
  138. package/lib/module/components/Annotation.js.map +1 -0
  139. package/lib/module/components/BackgroundLayer.js +28 -0
  140. package/lib/module/components/BackgroundLayer.js.map +1 -0
  141. package/lib/module/components/Callout.js +97 -0
  142. package/lib/module/components/Callout.js.map +1 -0
  143. package/lib/module/components/Camera.js +280 -0
  144. package/lib/module/components/Camera.js.map +1 -0
  145. package/lib/module/components/CircleLayer.js +32 -0
  146. package/lib/module/components/CircleLayer.js.map +1 -0
  147. package/lib/module/components/FillExtrusionLayer.js +31 -0
  148. package/lib/module/components/FillExtrusionLayer.js.map +1 -0
  149. package/lib/module/components/FillLayer.js +31 -0
  150. package/lib/module/components/FillLayer.js.map +1 -0
  151. package/lib/module/components/HeadingIndicator.js +23 -0
  152. package/lib/module/components/HeadingIndicator.js.map +1 -0
  153. package/lib/module/components/HeatmapLayer.js +30 -0
  154. package/lib/module/components/HeatmapLayer.js.map +1 -0
  155. package/lib/module/components/ImageSource.js +37 -0
  156. package/lib/module/components/ImageSource.js.map +1 -0
  157. package/lib/module/components/Images.js +76 -0
  158. package/lib/module/components/Images.js.map +1 -0
  159. package/lib/module/components/Light.js +27 -0
  160. package/lib/module/components/Light.js.map +1 -0
  161. package/lib/module/components/LineLayer.js +31 -0
  162. package/lib/module/components/LineLayer.js.map +1 -0
  163. package/lib/module/components/MapView.js +458 -0
  164. package/lib/module/components/MapView.js.map +1 -0
  165. package/lib/module/components/MarkerView.js +56 -0
  166. package/lib/module/components/MarkerView.js.map +1 -0
  167. package/lib/module/components/NativeUserLocation.js +13 -0
  168. package/lib/module/components/NativeUserLocation.js.map +1 -0
  169. package/lib/module/components/PointAnnotation.js +116 -0
  170. package/lib/module/components/PointAnnotation.js.map +1 -0
  171. package/lib/module/components/RasterLayer.js +27 -0
  172. package/lib/module/components/RasterLayer.js.map +1 -0
  173. package/lib/module/components/RasterSource.js +62 -0
  174. package/lib/module/components/RasterSource.js.map +1 -0
  175. package/lib/module/components/ShapeSource.js +198 -0
  176. package/lib/module/components/ShapeSource.js.map +1 -0
  177. package/lib/module/components/Style.js +261 -0
  178. package/lib/module/components/Style.js.map +1 -0
  179. package/lib/module/components/SymbolLayer.js +48 -0
  180. package/lib/module/components/SymbolLayer.js.map +1 -0
  181. package/lib/module/components/UserLocation.js +182 -0
  182. package/lib/module/components/UserLocation.js.map +1 -0
  183. package/lib/module/components/VectorSource.js +124 -0
  184. package/lib/module/components/VectorSource.js.map +1 -0
  185. package/lib/module/hooks/useAbstractLayer.js +49 -0
  186. package/lib/module/hooks/useAbstractLayer.js.map +1 -0
  187. package/lib/module/hooks/useAbstractSource.js +20 -0
  188. package/lib/module/hooks/useAbstractSource.js.map +1 -0
  189. package/lib/module/hooks/useNativeBridge.js +80 -0
  190. package/lib/module/hooks/useNativeBridge.js.map +1 -0
  191. package/lib/module/hooks/useNativeRef.js +10 -0
  192. package/lib/module/hooks/useNativeRef.js.map +1 -0
  193. package/lib/module/hooks/useOnce.js +12 -0
  194. package/lib/module/hooks/useOnce.js.map +1 -0
  195. package/lib/module/index.js +6 -0
  196. package/lib/module/index.js.map +1 -0
  197. package/lib/module/modules/location/locationManager.js +87 -0
  198. package/lib/module/modules/location/locationManager.js.map +1 -0
  199. package/lib/module/modules/offline/OfflineCreatePackOptions.js +33 -0
  200. package/lib/module/modules/offline/OfflineCreatePackOptions.js.map +1 -0
  201. package/lib/module/modules/offline/OfflinePack.js +36 -0
  202. package/lib/module/modules/offline/OfflinePack.js.map +1 -0
  203. package/lib/module/modules/offline/offlineManager.js +341 -0
  204. package/lib/module/modules/offline/offlineManager.js.map +1 -0
  205. package/lib/module/modules/snapshot/SnapshotOptions.js +53 -0
  206. package/lib/module/modules/snapshot/SnapshotOptions.js.map +1 -0
  207. package/lib/module/modules/snapshot/snapshotManager.js +61 -0
  208. package/lib/module/modules/snapshot/snapshotManager.js.map +1 -0
  209. package/lib/module/requestAndroidLocationPermissions.js +21 -0
  210. package/lib/module/requestAndroidLocationPermissions.js.map +1 -0
  211. package/lib/module/types/BaseProps.js +2 -0
  212. package/lib/module/types/BaseProps.js.map +1 -0
  213. package/lib/module/types/CameraMode.js +10 -0
  214. package/lib/module/types/CameraMode.js.map +1 -0
  215. package/lib/module/types/MapLibreRNEvent.js +4 -0
  216. package/lib/module/types/MapLibreRNEvent.js.map +1 -0
  217. package/lib/module/types/OnPressEvent.js +2 -0
  218. package/lib/module/types/OnPressEvent.js.map +1 -0
  219. package/lib/module/types/StyleURL.js +7 -0
  220. package/lib/module/types/StyleURL.js.map +1 -0
  221. package/lib/module/utils/BridgeValue.js +54 -0
  222. package/lib/module/utils/BridgeValue.js.map +1 -0
  223. package/lib/module/utils/Logger.js +114 -0
  224. package/lib/module/utils/Logger.js.map +1 -0
  225. package/lib/module/utils/MapLibreRNStyles.d.js +180 -0
  226. package/lib/module/utils/MapLibreRNStyles.d.js.map +1 -0
  227. package/lib/module/utils/StyleValue.js +34 -0
  228. package/lib/module/utils/StyleValue.js.map +1 -0
  229. package/lib/module/utils/animated/AbstractAnimatedCoordinates.js +92 -0
  230. package/lib/module/utils/animated/AbstractAnimatedCoordinates.js.map +1 -0
  231. package/lib/module/utils/animated/Animated.js +42 -0
  232. package/lib/module/utils/animated/Animated.js.map +1 -0
  233. package/lib/module/utils/animated/AnimatedCoordinatesArray.js +87 -0
  234. package/lib/module/utils/animated/AnimatedCoordinatesArray.js.map +1 -0
  235. package/lib/module/utils/animated/AnimatedExtractCoordinateFromArray.js +36 -0
  236. package/lib/module/utils/animated/AnimatedExtractCoordinateFromArray.js.map +1 -0
  237. package/lib/module/utils/animated/AnimatedPoint.js +107 -0
  238. package/lib/module/utils/animated/AnimatedPoint.js.map +1 -0
  239. package/lib/module/utils/animated/AnimatedRouteCoordinatesArray.js +131 -0
  240. package/lib/module/utils/animated/AnimatedRouteCoordinatesArray.js.map +1 -0
  241. package/lib/module/utils/animated/AnimatedShape.js +71 -0
  242. package/lib/module/utils/animated/AnimatedShape.js.map +1 -0
  243. package/lib/module/utils/deprecation.js +27 -0
  244. package/lib/module/utils/deprecation.js.map +1 -0
  245. package/lib/module/utils/filterUtils.js +9 -0
  246. package/lib/module/utils/filterUtils.js.map +1 -0
  247. package/lib/module/utils/index.js +81 -0
  248. package/lib/module/utils/index.js.map +1 -0
  249. package/lib/module/utils/makeNativeBounds.js +7 -0
  250. package/lib/module/utils/makeNativeBounds.js.map +1 -0
  251. package/lib/module/utils/styleMap.js +249 -0
  252. package/lib/module/utils/styleMap.js.map +1 -0
  253. package/lib/typescript/commonjs/package.json +1 -0
  254. package/lib/typescript/commonjs/src/MLNModule.d.ts +21 -0
  255. package/lib/typescript/commonjs/src/MLNModule.d.ts.map +1 -0
  256. package/lib/typescript/commonjs/src/MapLibreRN.d.ts +42 -0
  257. package/lib/typescript/commonjs/src/MapLibreRN.d.ts.map +1 -0
  258. package/lib/typescript/commonjs/src/components/Annotation.d.ts +21 -0
  259. package/lib/typescript/commonjs/src/components/Annotation.d.ts.map +1 -0
  260. package/lib/typescript/commonjs/src/components/BackgroundLayer.d.ts +14 -0
  261. package/lib/typescript/commonjs/src/components/BackgroundLayer.d.ts.map +1 -0
  262. package/lib/typescript/commonjs/src/components/Callout.d.ts +35 -0
  263. package/lib/typescript/commonjs/src/components/Callout.d.ts.map +1 -0
  264. package/lib/typescript/commonjs/src/components/Camera.d.ts +134 -0
  265. package/lib/typescript/commonjs/src/components/Camera.d.ts.map +1 -0
  266. package/lib/typescript/commonjs/src/components/CircleLayer.d.ts +17 -0
  267. package/lib/typescript/commonjs/src/components/CircleLayer.d.ts.map +1 -0
  268. package/lib/typescript/commonjs/src/components/FillExtrusionLayer.d.ts +17 -0
  269. package/lib/typescript/commonjs/src/components/FillExtrusionLayer.d.ts.map +1 -0
  270. package/lib/typescript/commonjs/src/components/FillLayer.d.ts +17 -0
  271. package/lib/typescript/commonjs/src/components/FillLayer.d.ts.map +1 -0
  272. package/lib/typescript/commonjs/src/components/HeadingIndicator.d.ts +8 -0
  273. package/lib/typescript/commonjs/src/components/HeadingIndicator.d.ts.map +1 -0
  274. package/lib/typescript/commonjs/src/components/HeatmapLayer.d.ts +17 -0
  275. package/lib/typescript/commonjs/src/components/HeatmapLayer.d.ts.map +1 -0
  276. package/lib/typescript/commonjs/src/components/ImageSource.d.ts +31 -0
  277. package/lib/typescript/commonjs/src/components/ImageSource.d.ts.map +1 -0
  278. package/lib/typescript/commonjs/src/components/Images.d.ts +33 -0
  279. package/lib/typescript/commonjs/src/components/Images.d.ts.map +1 -0
  280. package/lib/typescript/commonjs/src/components/Light.d.ts +17 -0
  281. package/lib/typescript/commonjs/src/components/Light.d.ts.map +1 -0
  282. package/lib/typescript/commonjs/src/components/LineLayer.d.ts +17 -0
  283. package/lib/typescript/commonjs/src/components/LineLayer.d.ts.map +1 -0
  284. package/lib/typescript/commonjs/src/components/MapView.d.ts +235 -0
  285. package/lib/typescript/commonjs/src/components/MapView.d.ts.map +1 -0
  286. package/lib/typescript/commonjs/src/components/MarkerView.d.ts +44 -0
  287. package/lib/typescript/commonjs/src/components/MarkerView.d.ts.map +1 -0
  288. package/lib/typescript/commonjs/src/components/NativeUserLocation.d.ts +26 -0
  289. package/lib/typescript/commonjs/src/components/NativeUserLocation.d.ts.map +1 -0
  290. package/lib/typescript/commonjs/src/components/PointAnnotation.d.ts +91 -0
  291. package/lib/typescript/commonjs/src/components/PointAnnotation.d.ts.map +1 -0
  292. package/lib/typescript/commonjs/src/components/RasterLayer.d.ts +14 -0
  293. package/lib/typescript/commonjs/src/components/RasterLayer.d.ts.map +1 -0
  294. package/lib/typescript/commonjs/src/components/RasterSource.d.ts +53 -0
  295. package/lib/typescript/commonjs/src/components/RasterSource.d.ts.map +1 -0
  296. package/lib/typescript/commonjs/src/components/ShapeSource.d.ts +124 -0
  297. package/lib/typescript/commonjs/src/components/ShapeSource.d.ts.map +1 -0
  298. package/lib/typescript/commonjs/src/components/Style.d.ts +81 -0
  299. package/lib/typescript/commonjs/src/components/Style.d.ts.map +1 -0
  300. package/lib/typescript/commonjs/src/components/SymbolLayer.d.ts +22 -0
  301. package/lib/typescript/commonjs/src/components/SymbolLayer.d.ts.map +1 -0
  302. package/lib/typescript/commonjs/src/components/UserLocation.d.ts +70 -0
  303. package/lib/typescript/commonjs/src/components/UserLocation.d.ts.map +1 -0
  304. package/lib/typescript/commonjs/src/components/VectorSource.d.ts +70 -0
  305. package/lib/typescript/commonjs/src/components/VectorSource.d.ts.map +1 -0
  306. package/lib/typescript/commonjs/src/hooks/useAbstractLayer.d.ts +62 -0
  307. package/lib/typescript/commonjs/src/hooks/useAbstractLayer.d.ts.map +1 -0
  308. package/lib/typescript/commonjs/src/hooks/useAbstractSource.d.ts +7 -0
  309. package/lib/typescript/commonjs/src/hooks/useAbstractSource.d.ts.map +1 -0
  310. package/lib/typescript/commonjs/src/hooks/useNativeBridge.d.ts +21 -0
  311. package/lib/typescript/commonjs/src/hooks/useNativeBridge.d.ts.map +1 -0
  312. package/lib/typescript/commonjs/src/hooks/useNativeRef.d.ts +8 -0
  313. package/lib/typescript/commonjs/src/hooks/useNativeRef.d.ts.map +1 -0
  314. package/lib/typescript/commonjs/src/hooks/useOnce.d.ts +3 -0
  315. package/lib/typescript/commonjs/src/hooks/useOnce.d.ts.map +1 -0
  316. package/lib/typescript/commonjs/src/index.d.ts +4 -0
  317. package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
  318. package/lib/typescript/commonjs/src/modules/location/locationManager.d.ts +64 -0
  319. package/lib/typescript/commonjs/src/modules/location/locationManager.d.ts.map +1 -0
  320. package/lib/typescript/commonjs/src/modules/offline/OfflineCreatePackOptions.d.ts +21 -0
  321. package/lib/typescript/commonjs/src/modules/offline/OfflineCreatePackOptions.d.ts.map +1 -0
  322. package/lib/typescript/commonjs/src/modules/offline/OfflinePack.d.ts +24 -0
  323. package/lib/typescript/commonjs/src/modules/offline/OfflinePack.d.ts.map +1 -0
  324. package/lib/typescript/commonjs/src/modules/offline/offlineManager.d.ts +210 -0
  325. package/lib/typescript/commonjs/src/modules/offline/offlineManager.d.ts.map +1 -0
  326. package/lib/typescript/commonjs/src/modules/snapshot/SnapshotOptions.d.ts +42 -0
  327. package/lib/typescript/commonjs/src/modules/snapshot/SnapshotOptions.d.ts.map +1 -0
  328. package/lib/typescript/commonjs/src/modules/snapshot/snapshotManager.d.ts +52 -0
  329. package/lib/typescript/commonjs/src/modules/snapshot/snapshotManager.d.ts.map +1 -0
  330. package/lib/typescript/commonjs/src/requestAndroidLocationPermissions.d.ts +2 -0
  331. package/lib/typescript/commonjs/src/requestAndroidLocationPermissions.d.ts.map +1 -0
  332. package/lib/typescript/commonjs/src/types/BaseProps.d.ts +4 -0
  333. package/lib/typescript/commonjs/src/types/BaseProps.d.ts.map +1 -0
  334. package/lib/typescript/commonjs/src/types/CameraMode.d.ts +7 -0
  335. package/lib/typescript/commonjs/src/types/CameraMode.d.ts.map +1 -0
  336. package/lib/typescript/commonjs/src/types/MapLibreRNEvent.d.ts +6 -0
  337. package/lib/typescript/commonjs/src/types/MapLibreRNEvent.d.ts.map +1 -0
  338. package/lib/typescript/commonjs/src/types/OnPressEvent.d.ts +12 -0
  339. package/lib/typescript/commonjs/src/types/OnPressEvent.d.ts.map +1 -0
  340. package/lib/typescript/commonjs/src/types/StyleURL.d.ts +4 -0
  341. package/lib/typescript/commonjs/src/types/StyleURL.d.ts.map +1 -0
  342. package/lib/typescript/commonjs/src/utils/BridgeValue.d.ts +29 -0
  343. package/lib/typescript/commonjs/src/utils/BridgeValue.d.ts.map +1 -0
  344. package/lib/typescript/commonjs/src/utils/Logger.d.ts +52 -0
  345. package/lib/typescript/commonjs/src/utils/Logger.d.ts.map +1 -0
  346. package/lib/typescript/commonjs/src/utils/StyleValue.d.ts +10 -0
  347. package/lib/typescript/commonjs/src/utils/StyleValue.d.ts.map +1 -0
  348. package/lib/typescript/commonjs/src/utils/animated/AbstractAnimatedCoordinates.d.ts +36 -0
  349. package/lib/typescript/commonjs/src/utils/animated/AbstractAnimatedCoordinates.d.ts.map +1 -0
  350. package/lib/typescript/commonjs/src/utils/animated/Animated.d.ts +33 -0
  351. package/lib/typescript/commonjs/src/utils/animated/Animated.d.ts.map +1 -0
  352. package/lib/typescript/commonjs/src/utils/animated/AnimatedCoordinatesArray.d.ts +40 -0
  353. package/lib/typescript/commonjs/src/utils/animated/AnimatedCoordinatesArray.d.ts.map +1 -0
  354. package/lib/typescript/commonjs/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts +11 -0
  355. package/lib/typescript/commonjs/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts.map +1 -0
  356. package/lib/typescript/commonjs/src/utils/animated/AnimatedPoint.d.ts +31 -0
  357. package/lib/typescript/commonjs/src/utils/animated/AnimatedPoint.d.ts.map +1 -0
  358. package/lib/typescript/commonjs/src/utils/animated/AnimatedRouteCoordinatesArray.d.ts +54 -0
  359. package/lib/typescript/commonjs/src/utils/animated/AnimatedRouteCoordinatesArray.d.ts.map +1 -0
  360. package/lib/typescript/commonjs/src/utils/animated/AnimatedShape.d.ts +27 -0
  361. package/lib/typescript/commonjs/src/utils/animated/AnimatedShape.d.ts.map +1 -0
  362. package/lib/typescript/commonjs/src/utils/deprecation.d.ts +6 -0
  363. package/lib/typescript/commonjs/src/utils/deprecation.d.ts.map +1 -0
  364. package/lib/typescript/commonjs/src/utils/filterUtils.d.ts +3 -0
  365. package/lib/typescript/commonjs/src/utils/filterUtils.d.ts.map +1 -0
  366. package/lib/typescript/commonjs/src/utils/index.d.ts +21 -0
  367. package/lib/typescript/commonjs/src/utils/index.d.ts.map +1 -0
  368. package/lib/typescript/commonjs/src/utils/makeNativeBounds.d.ts +2 -0
  369. package/lib/typescript/commonjs/src/utils/makeNativeBounds.d.ts.map +1 -0
  370. package/lib/typescript/commonjs/src/utils/styleMap.d.ts +231 -0
  371. package/lib/typescript/commonjs/src/utils/styleMap.d.ts.map +1 -0
  372. package/lib/typescript/module/package.json +1 -0
  373. package/lib/typescript/module/src/MLNModule.d.ts +21 -0
  374. package/lib/typescript/module/src/MLNModule.d.ts.map +1 -0
  375. package/lib/typescript/module/src/MapLibreRN.d.ts +42 -0
  376. package/lib/typescript/module/src/MapLibreRN.d.ts.map +1 -0
  377. package/lib/typescript/module/src/components/Annotation.d.ts +21 -0
  378. package/lib/typescript/module/src/components/Annotation.d.ts.map +1 -0
  379. package/lib/typescript/module/src/components/BackgroundLayer.d.ts +14 -0
  380. package/lib/typescript/module/src/components/BackgroundLayer.d.ts.map +1 -0
  381. package/lib/typescript/module/src/components/Callout.d.ts +35 -0
  382. package/lib/typescript/module/src/components/Callout.d.ts.map +1 -0
  383. package/lib/typescript/module/src/components/Camera.d.ts +134 -0
  384. package/lib/typescript/module/src/components/Camera.d.ts.map +1 -0
  385. package/lib/typescript/module/src/components/CircleLayer.d.ts +17 -0
  386. package/lib/typescript/module/src/components/CircleLayer.d.ts.map +1 -0
  387. package/lib/typescript/module/src/components/FillExtrusionLayer.d.ts +17 -0
  388. package/lib/typescript/module/src/components/FillExtrusionLayer.d.ts.map +1 -0
  389. package/lib/typescript/module/src/components/FillLayer.d.ts +17 -0
  390. package/lib/typescript/module/src/components/FillLayer.d.ts.map +1 -0
  391. package/lib/typescript/module/src/components/HeadingIndicator.d.ts +8 -0
  392. package/lib/typescript/module/src/components/HeadingIndicator.d.ts.map +1 -0
  393. package/lib/typescript/module/src/components/HeatmapLayer.d.ts +17 -0
  394. package/lib/typescript/module/src/components/HeatmapLayer.d.ts.map +1 -0
  395. package/lib/typescript/module/src/components/ImageSource.d.ts +31 -0
  396. package/lib/typescript/module/src/components/ImageSource.d.ts.map +1 -0
  397. package/lib/typescript/module/src/components/Images.d.ts +33 -0
  398. package/lib/typescript/module/src/components/Images.d.ts.map +1 -0
  399. package/lib/typescript/module/src/components/Light.d.ts +17 -0
  400. package/lib/typescript/module/src/components/Light.d.ts.map +1 -0
  401. package/lib/typescript/module/src/components/LineLayer.d.ts +17 -0
  402. package/lib/typescript/module/src/components/LineLayer.d.ts.map +1 -0
  403. package/lib/typescript/module/src/components/MapView.d.ts +235 -0
  404. package/lib/typescript/module/src/components/MapView.d.ts.map +1 -0
  405. package/lib/typescript/module/src/components/MarkerView.d.ts +44 -0
  406. package/lib/typescript/module/src/components/MarkerView.d.ts.map +1 -0
  407. package/lib/typescript/module/src/components/NativeUserLocation.d.ts +26 -0
  408. package/lib/typescript/module/src/components/NativeUserLocation.d.ts.map +1 -0
  409. package/lib/typescript/module/src/components/PointAnnotation.d.ts +91 -0
  410. package/lib/typescript/module/src/components/PointAnnotation.d.ts.map +1 -0
  411. package/lib/typescript/module/src/components/RasterLayer.d.ts +14 -0
  412. package/lib/typescript/module/src/components/RasterLayer.d.ts.map +1 -0
  413. package/lib/typescript/module/src/components/RasterSource.d.ts +53 -0
  414. package/lib/typescript/module/src/components/RasterSource.d.ts.map +1 -0
  415. package/lib/typescript/module/src/components/ShapeSource.d.ts +124 -0
  416. package/lib/typescript/module/src/components/ShapeSource.d.ts.map +1 -0
  417. package/lib/typescript/module/src/components/Style.d.ts +81 -0
  418. package/lib/typescript/module/src/components/Style.d.ts.map +1 -0
  419. package/lib/typescript/module/src/components/SymbolLayer.d.ts +22 -0
  420. package/lib/typescript/module/src/components/SymbolLayer.d.ts.map +1 -0
  421. package/lib/typescript/module/src/components/UserLocation.d.ts +70 -0
  422. package/lib/typescript/module/src/components/UserLocation.d.ts.map +1 -0
  423. package/lib/typescript/module/src/components/VectorSource.d.ts +70 -0
  424. package/lib/typescript/module/src/components/VectorSource.d.ts.map +1 -0
  425. package/lib/typescript/module/src/hooks/useAbstractLayer.d.ts +62 -0
  426. package/lib/typescript/module/src/hooks/useAbstractLayer.d.ts.map +1 -0
  427. package/lib/typescript/module/src/hooks/useAbstractSource.d.ts +7 -0
  428. package/lib/typescript/module/src/hooks/useAbstractSource.d.ts.map +1 -0
  429. package/lib/typescript/module/src/hooks/useNativeBridge.d.ts +21 -0
  430. package/lib/typescript/module/src/hooks/useNativeBridge.d.ts.map +1 -0
  431. package/lib/typescript/module/src/hooks/useNativeRef.d.ts +8 -0
  432. package/lib/typescript/module/src/hooks/useNativeRef.d.ts.map +1 -0
  433. package/lib/typescript/module/src/hooks/useOnce.d.ts +3 -0
  434. package/lib/typescript/module/src/hooks/useOnce.d.ts.map +1 -0
  435. package/lib/typescript/module/src/index.d.ts +4 -0
  436. package/lib/typescript/module/src/index.d.ts.map +1 -0
  437. package/lib/typescript/module/src/modules/location/locationManager.d.ts +64 -0
  438. package/lib/typescript/module/src/modules/location/locationManager.d.ts.map +1 -0
  439. package/lib/typescript/module/src/modules/offline/OfflineCreatePackOptions.d.ts +21 -0
  440. package/lib/typescript/module/src/modules/offline/OfflineCreatePackOptions.d.ts.map +1 -0
  441. package/lib/typescript/module/src/modules/offline/OfflinePack.d.ts +24 -0
  442. package/lib/typescript/module/src/modules/offline/OfflinePack.d.ts.map +1 -0
  443. package/lib/typescript/module/src/modules/offline/offlineManager.d.ts +210 -0
  444. package/lib/typescript/module/src/modules/offline/offlineManager.d.ts.map +1 -0
  445. package/lib/typescript/module/src/modules/snapshot/SnapshotOptions.d.ts +42 -0
  446. package/lib/typescript/module/src/modules/snapshot/SnapshotOptions.d.ts.map +1 -0
  447. package/lib/typescript/module/src/modules/snapshot/snapshotManager.d.ts +52 -0
  448. package/lib/typescript/module/src/modules/snapshot/snapshotManager.d.ts.map +1 -0
  449. package/lib/typescript/module/src/requestAndroidLocationPermissions.d.ts +2 -0
  450. package/lib/typescript/module/src/requestAndroidLocationPermissions.d.ts.map +1 -0
  451. package/lib/typescript/module/src/types/BaseProps.d.ts +4 -0
  452. package/lib/typescript/module/src/types/BaseProps.d.ts.map +1 -0
  453. package/lib/typescript/module/src/types/CameraMode.d.ts +7 -0
  454. package/lib/typescript/module/src/types/CameraMode.d.ts.map +1 -0
  455. package/lib/typescript/module/src/types/MapLibreRNEvent.d.ts +6 -0
  456. package/lib/typescript/module/src/types/MapLibreRNEvent.d.ts.map +1 -0
  457. package/lib/typescript/module/src/types/OnPressEvent.d.ts +12 -0
  458. package/lib/typescript/module/src/types/OnPressEvent.d.ts.map +1 -0
  459. package/lib/typescript/module/src/types/StyleURL.d.ts +4 -0
  460. package/lib/typescript/module/src/types/StyleURL.d.ts.map +1 -0
  461. package/lib/typescript/module/src/utils/BridgeValue.d.ts +29 -0
  462. package/lib/typescript/module/src/utils/BridgeValue.d.ts.map +1 -0
  463. package/lib/typescript/module/src/utils/Logger.d.ts +52 -0
  464. package/lib/typescript/module/src/utils/Logger.d.ts.map +1 -0
  465. package/lib/typescript/module/src/utils/StyleValue.d.ts +10 -0
  466. package/lib/typescript/module/src/utils/StyleValue.d.ts.map +1 -0
  467. package/lib/typescript/module/src/utils/animated/AbstractAnimatedCoordinates.d.ts +36 -0
  468. package/lib/typescript/module/src/utils/animated/AbstractAnimatedCoordinates.d.ts.map +1 -0
  469. package/lib/typescript/module/src/utils/animated/Animated.d.ts +33 -0
  470. package/lib/typescript/module/src/utils/animated/Animated.d.ts.map +1 -0
  471. package/lib/typescript/module/src/utils/animated/AnimatedCoordinatesArray.d.ts +40 -0
  472. package/lib/typescript/module/src/utils/animated/AnimatedCoordinatesArray.d.ts.map +1 -0
  473. package/lib/typescript/module/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts +11 -0
  474. package/lib/typescript/module/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts.map +1 -0
  475. package/lib/typescript/module/src/utils/animated/AnimatedPoint.d.ts +31 -0
  476. package/lib/typescript/module/src/utils/animated/AnimatedPoint.d.ts.map +1 -0
  477. package/lib/typescript/module/src/utils/animated/AnimatedRouteCoordinatesArray.d.ts +54 -0
  478. package/lib/typescript/module/src/utils/animated/AnimatedRouteCoordinatesArray.d.ts.map +1 -0
  479. package/lib/typescript/module/src/utils/animated/AnimatedShape.d.ts +27 -0
  480. package/lib/typescript/module/src/utils/animated/AnimatedShape.d.ts.map +1 -0
  481. package/lib/typescript/module/src/utils/deprecation.d.ts +6 -0
  482. package/lib/typescript/module/src/utils/deprecation.d.ts.map +1 -0
  483. package/lib/typescript/module/src/utils/filterUtils.d.ts +3 -0
  484. package/lib/typescript/module/src/utils/filterUtils.d.ts.map +1 -0
  485. package/lib/typescript/module/src/utils/index.d.ts +21 -0
  486. package/lib/typescript/module/src/utils/index.d.ts.map +1 -0
  487. package/lib/typescript/module/src/utils/makeNativeBounds.d.ts +2 -0
  488. package/lib/typescript/module/src/utils/makeNativeBounds.d.ts.map +1 -0
  489. package/lib/typescript/module/src/utils/styleMap.d.ts +231 -0
  490. package/lib/typescript/module/src/utils/styleMap.d.ts.map +1 -0
  491. package/package.json +83 -6
  492. package/plugin/build/withMapLibre.d.ts +1 -1
  493. package/{javascript/Maplibre.ts → src/MapLibreRN.ts} +1 -1
  494. package/src/assets/heading.png +0 -0
  495. package/src/assets/heading@2x.png +0 -0
  496. package/src/assets/heading@3x.png +0 -0
  497. package/src/assets/png.d.ts +4 -0
  498. package/{javascript → src}/components/Annotation.tsx +8 -8
  499. package/{javascript → src}/components/BackgroundLayer.tsx +4 -4
  500. package/{javascript → src}/components/Callout.tsx +5 -5
  501. package/{javascript → src}/components/Camera.tsx +5 -5
  502. package/{javascript → src}/components/CircleLayer.tsx +4 -4
  503. package/{javascript → src}/components/FillExtrusionLayer.tsx +4 -4
  504. package/{javascript → src}/components/FillLayer.tsx +4 -4
  505. package/{javascript → src}/components/HeadingIndicator.tsx +3 -4
  506. package/{javascript → src}/components/HeatmapLayer.tsx +4 -4
  507. package/{javascript → src}/components/ImageSource.tsx +2 -2
  508. package/{javascript → src}/components/Images.tsx +7 -7
  509. package/{javascript → src}/components/Light.tsx +6 -4
  510. package/{javascript → src}/components/LineLayer.tsx +4 -4
  511. package/{javascript → src}/components/MapView.tsx +12 -11
  512. package/{javascript → src}/components/MarkerView.tsx +2 -2
  513. package/{javascript → src}/components/NativeUserLocation.tsx +1 -1
  514. package/{javascript → src}/components/PointAnnotation.tsx +5 -5
  515. package/{javascript → src}/components/RasterLayer.tsx +4 -4
  516. package/{javascript → src}/components/RasterSource.tsx +1 -1
  517. package/{javascript → src}/components/ShapeSource.tsx +13 -9
  518. package/{javascript → src}/components/Style.tsx +32 -29
  519. package/{javascript → src}/components/SymbolLayer.tsx +7 -7
  520. package/{javascript → src}/components/UserLocation.tsx +18 -8
  521. package/{javascript → src}/components/VectorSource.tsx +6 -6
  522. package/{javascript → src}/hooks/useAbstractLayer.ts +9 -9
  523. package/{javascript → src}/hooks/useAbstractSource.ts +2 -2
  524. package/{javascript → src}/hooks/useNativeBridge.ts +2 -2
  525. package/{javascript → src}/hooks/useNativeRef.ts +2 -2
  526. package/src/index.ts +4 -0
  527. package/{javascript → src}/modules/location/locationManager.ts +1 -1
  528. package/{javascript → src}/modules/offline/offlineManager.ts +18 -13
  529. package/{javascript → src}/modules/snapshot/snapshotManager.ts +1 -1
  530. package/{javascript → src}/requestAndroidLocationPermissions.ts +3 -3
  531. package/src/types/BaseProps.ts +3 -0
  532. package/src/types/MapLibreRNEvent.ts +7 -0
  533. package/{javascript → src}/types/OnPressEvent.ts +1 -3
  534. package/src/types/StyleURL.ts +3 -0
  535. package/{javascript → src}/utils/BridgeValue.ts +8 -8
  536. package/{javascript → src}/utils/Logger.ts +1 -1
  537. package/{javascript/utils/MaplibreStyles.d.ts → src/utils/MapLibreRNStyles.d.ts} +3 -1
  538. package/{javascript → src}/utils/StyleValue.ts +2 -2
  539. package/{javascript → src}/utils/animated/Animated.ts +2 -2
  540. package/{javascript → src}/utils/animated/AnimatedCoordinatesArray.ts +24 -19
  541. package/{javascript → src}/utils/animated/AnimatedPoint.ts +4 -4
  542. package/{javascript → src}/utils/animated/AnimatedRouteCoordinatesArray.ts +14 -9
  543. package/{javascript → src}/utils/filterUtils.ts +1 -1
  544. package/{javascript → src}/utils/index.ts +13 -12
  545. package/{javascript → src}/utils/styleMap.ts +1 -1
  546. package/.eslintrc.js +0 -5
  547. package/.git-blame-ignore-revs +0 -3
  548. package/.gitattributes +0 -1
  549. package/.nvmrc +0 -1
  550. package/.sonarcloud.properties +0 -15
  551. package/CODE_OF_CONDUCT.md +0 -2
  552. package/CONTRIBUTING.md +0 -61
  553. package/RELEASE.md +0 -30
  554. package/assets/indoor_building_map_android.png +0 -0
  555. package/assets/indoor_building_map_ios.png +0 -0
  556. package/babel.config.js +0 -12
  557. package/docs/Annotation.md +0 -29
  558. package/docs/Annotations.md +0 -12
  559. package/docs/BackgroundLayer.md +0 -166
  560. package/docs/Callout.md +0 -16
  561. package/docs/Camera.md +0 -132
  562. package/docs/CircleLayer.md +0 -487
  563. package/docs/CustomHttpHeaders.md +0 -87
  564. package/docs/FillExtrusionLayer.md +0 -349
  565. package/docs/FillLayer.md +0 -317
  566. package/docs/GettingStarted.md +0 -113
  567. package/docs/HeadingIndicator.md +0 -11
  568. package/docs/HeatmapLayer.md +0 -214
  569. package/docs/ImageSource.md +0 -14
  570. package/docs/Images.md +0 -15
  571. package/docs/Light.md +0 -167
  572. package/docs/LineLayer.md +0 -603
  573. package/docs/Logger.md +0 -23
  574. package/docs/MapLibreGL.md +0 -65
  575. package/docs/MapView.md +0 -178
  576. package/docs/MarkerView.md +0 -17
  577. package/docs/NativeUserLocation.md +0 -13
  578. package/docs/PointAnnotation.md +0 -28
  579. package/docs/RasterLayer.md +0 -357
  580. package/docs/RasterSource.md +0 -19
  581. package/docs/ShapeSource.md +0 -104
  582. package/docs/Style.md +0 -11
  583. package/docs/StyleSheet.md +0 -451
  584. package/docs/SymbolLayer.md +0 -1752
  585. package/docs/UserLocation.md +0 -43
  586. package/docs/VectorSource.md +0 -50
  587. package/docs/coordinates.md +0 -7
  588. package/docs/docs.json +0 -5390
  589. package/docs/location.md +0 -7
  590. package/docs/offlineManager.md +0 -231
  591. package/docs/snapshotManager.md +0 -54
  592. package/ios/RCTMLN/index.d.ts +0 -1183
  593. package/javascript/index.ts +0 -4
  594. package/javascript/types/BaseProps.ts +0 -5
  595. package/javascript/types/index.ts +0 -11
  596. package/jest-setup.ts +0 -113
  597. package/jest.config.js +0 -8
  598. package/plugin/install.md +0 -25
  599. package/scripts/.eslintrc.js +0 -3
  600. package/scripts/codegen.ts +0 -340
  601. package/scripts/templates/MaplibreStyles.ts.ejs +0 -100
  602. package/scripts/templates/RCTMLNStyle.h.ejs +0 -34
  603. package/scripts/templates/RCTMLNStyle.m.ejs +0 -98
  604. package/scripts/templates/RCTMLNStyleFactory.java.ejs +0 -108
  605. package/scripts/templates/component.md.ejs +0 -125
  606. package/scripts/templates/index.d.ts.ejs +0 -86
  607. package/scripts/templates/styleMap.ts.ejs +0 -86
  608. package/scripts/utils/DocJSONBuilder.ts +0 -463
  609. package/scripts/utils/JSDocNodeTree.ts +0 -135
  610. package/scripts/utils/MarkdownBuilder.ts +0 -44
  611. package/scripts/utils/TemplateHelpers.ts +0 -499
  612. package/scripts/utils/getNativeVersion.ts +0 -53
  613. package/tsconfig.json +0 -22
  614. /package/{assets → lib/commonjs/assets}/heading.png +0 -0
  615. /package/{assets → lib/commonjs/assets}/heading@2x.png +0 -0
  616. /package/{assets → lib/commonjs/assets}/heading@3x.png +0 -0
  617. /package/{javascript → src}/MLNModule.ts +0 -0
  618. /package/{javascript → src}/hooks/useOnce.ts +0 -0
  619. /package/{javascript → src}/modules/offline/OfflineCreatePackOptions.ts +0 -0
  620. /package/{javascript → src}/modules/offline/OfflinePack.ts +0 -0
  621. /package/{javascript → src}/modules/snapshot/SnapshotOptions.ts +0 -0
  622. /package/{javascript → src}/types/CameraMode.ts +0 -0
  623. /package/{javascript → src}/utils/animated/AbstractAnimatedCoordinates.ts +0 -0
  624. /package/{javascript → src}/utils/animated/AnimatedExtractCoordinateFromArray.ts +0 -0
  625. /package/{javascript → src}/utils/animated/AnimatedShape.ts +0 -0
  626. /package/{javascript → src}/utils/deprecation.ts +0 -0
  627. /package/{javascript → src}/utils/makeNativeBounds.ts +0 -0
@@ -1,9 +1,10 @@
1
1
  import debounce from "debounce";
2
- import React, {
2
+ import {
3
3
  Component,
4
+ forwardRef,
4
5
  memo,
5
- ReactElement,
6
- ReactNode,
6
+ type ReactElement,
7
+ type ReactNode,
7
8
  useCallback,
8
9
  useEffect,
9
10
  useImperativeHandle,
@@ -16,18 +17,18 @@ import {
16
17
  StyleSheet,
17
18
  NativeModules,
18
19
  requireNativeComponent,
19
- ViewProps,
20
- NativeMethods,
21
- NativeSyntheticEvent,
20
+ type ViewProps,
21
+ type NativeMethods,
22
+ type NativeSyntheticEvent,
22
23
  } from "react-native";
23
24
 
24
25
  import useNativeBridge from "../hooks/useNativeBridge";
25
26
  import useOnce from "../hooks/useOnce";
26
- import { Location } from "../modules/location/locationManager";
27
- import BaseProps from "../types/BaseProps";
27
+ import { type Location } from "../modules/location/locationManager";
28
+ import { type BaseProps } from "../types/BaseProps";
28
29
  import { isFunction, isAndroid } from "../utils";
29
30
  import Logger from "../utils/Logger";
30
- import { FilterExpression } from "../utils/MaplibreStyles";
31
+ import { type FilterExpression } from "../utils/MapLibreRNStyles";
31
32
  import { getFilter } from "../utils/filterUtils";
32
33
 
33
34
  const MapLibreGL = NativeModules.MLNModule;
@@ -284,7 +285,7 @@ export interface MapViewRef {
284
285
  * MapView backed by MapLibre Native
285
286
  */
286
287
  const MapView = memo(
287
- React.forwardRef<MapViewRef, MapViewProps>(
288
+ forwardRef<MapViewRef, MapViewProps>(
288
289
  (
289
290
  {
290
291
  localizeLabels = false,
@@ -760,7 +761,7 @@ const MapView = memo(
760
761
 
761
762
  const contentInsetValue = useMemo(() => {
762
763
  if (props.contentInset === undefined) {
763
- return;
764
+ return undefined;
764
765
  }
765
766
 
766
767
  if (!Array.isArray(props.contentInset)) {
@@ -1,6 +1,6 @@
1
1
  import { point } from "@turf/helpers";
2
- import React, { ReactElement, useMemo } from "react";
3
- import { Platform, requireNativeComponent, ViewProps } from "react-native";
2
+ import { type ReactElement, useMemo } from "react";
3
+ import { Platform, requireNativeComponent, type ViewProps } from "react-native";
4
4
 
5
5
  import PointAnnotation from "./PointAnnotation";
6
6
  import { toJSONString } from "../utils";
@@ -1,4 +1,4 @@
1
- import React, { ReactElement } from "react";
1
+ import { type ReactElement } from "react";
2
2
  import { requireNativeComponent } from "react-native";
3
3
 
4
4
  const NATIVE_MODULE_NAME = "RCTMLNNativeUserLocation";
@@ -1,20 +1,20 @@
1
1
  import { point } from "@turf/helpers";
2
- import React, {
2
+ import {
3
3
  Component,
4
- SyntheticEvent,
4
+ type SyntheticEvent,
5
5
  forwardRef,
6
6
  useImperativeHandle,
7
7
  useRef,
8
- ReactElement,
8
+ type ReactElement,
9
9
  } from "react";
10
10
  import {
11
11
  Platform,
12
12
  StyleSheet,
13
- ViewProps,
13
+ type ViewProps,
14
14
  requireNativeComponent,
15
15
  } from "react-native";
16
16
 
17
- import useNativeBridge, { 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 = "RCTMLNPointAnnotation";
@@ -2,11 +2,11 @@ import React from "react";
2
2
  import { NativeModules, requireNativeComponent } from "react-native";
3
3
 
4
4
  import useAbstractLayer, {
5
- BaseLayerProps,
6
- NativeBaseProps,
5
+ type BaseLayerProps,
6
+ type NativeBaseProps,
7
7
  } from "../hooks/useAbstractLayer";
8
- import BaseProps from "../types/BaseProps";
9
- import { RasterLayerStyleProps } from "../utils/MaplibreStyles";
8
+ import { type BaseProps } from "../types/BaseProps";
9
+ import { type RasterLayerStyleProps } from "../utils/MapLibreRNStyles";
10
10
 
11
11
  const MapLibreGL = NativeModules.MLNModule;
12
12
 
@@ -3,7 +3,7 @@ import { NativeModules, requireNativeComponent } from "react-native";
3
3
 
4
4
  import useAbstractSource from "../hooks/useAbstractSource";
5
5
  import useOnce from "../hooks/useOnce";
6
- import BaseProps from "../types/BaseProps";
6
+ import { type BaseProps } from "../types/BaseProps";
7
7
  import { cloneReactChildrenWithProps } from "../utils";
8
8
 
9
9
  const MapLibreGL = NativeModules.MLNModule;
@@ -1,27 +1,31 @@
1
- import React, {
1
+ import {
2
2
  Component,
3
- ReactElement,
3
+ type ReactElement,
4
+ forwardRef,
4
5
  memo,
5
6
  useImperativeHandle,
6
7
  useRef,
7
8
  } from "react";
8
9
  import {
9
- NativeMethods,
10
+ type NativeMethods,
10
11
  NativeModules,
11
- NativeSyntheticEvent,
12
+ type NativeSyntheticEvent,
12
13
  requireNativeComponent,
13
14
  } from "react-native";
14
15
 
15
16
  import useNativeBridge from "../hooks/useNativeBridge";
16
- import BaseProps from "../types/BaseProps";
17
- import OnPressEvent from "../types/OnPressEvent";
17
+ import { type BaseProps } from "../types/BaseProps";
18
+ import { type OnPressEvent } from "../types/OnPressEvent";
18
19
  import {
19
20
  cloneReactChildrenWithProps,
20
21
  isAndroid,
21
22
  isFunction,
22
23
  toJSONString,
23
24
  } from "../utils";
24
- import { ExpressionField, FilterExpression } from "../utils/MaplibreStyles";
25
+ import {
26
+ type ExpressionField,
27
+ type FilterExpression,
28
+ } from "../utils/MapLibreRNStyles";
25
29
  import { copyPropertiesAsDeprecated } from "../utils/deprecation";
26
30
  import { getFilter } from "../utils/filterUtils";
27
31
 
@@ -158,7 +162,7 @@ export interface ShapeSourceRef {
158
162
  * The shape may be a url or a GeoJSON object
159
163
  */
160
164
  const ShapeSource = memo(
161
- React.forwardRef<ShapeSourceRef, ShapeSourceProps>(
165
+ forwardRef<ShapeSourceRef, ShapeSourceProps>(
162
166
  (
163
167
  {
164
168
  id: shapeId = MapLibreGL.StyleSource.DefaultSourceID,
@@ -356,7 +360,7 @@ const ShapeSource = memo(
356
360
 
357
361
  function _getShape(): string | undefined {
358
362
  if (!props.shape) {
359
- return;
363
+ return undefined;
360
364
  }
361
365
  return toJSONString(props.shape);
362
366
  }
@@ -1,26 +1,29 @@
1
- import React, {
1
+ import {
2
2
  useMemo,
3
3
  useState,
4
4
  useEffect,
5
- ReactElement,
6
- ComponentType,
5
+ type ReactElement,
6
+ type ComponentType,
7
7
  } from "react";
8
8
 
9
- import BackgroundLayer, { BackgroundLayerProps } from "./BackgroundLayer";
10
- import CircleLayer, { CircleLayerProps } from "./CircleLayer";
9
+ import BackgroundLayer, { type BackgroundLayerProps } from "./BackgroundLayer";
10
+ import CircleLayer, { type CircleLayerProps } from "./CircleLayer";
11
11
  import FillExtrusionLayer, {
12
- FillExtrusionLayerProps,
12
+ type FillExtrusionLayerProps,
13
13
  } from "./FillExtrusionLayer";
14
- import FillLayer, { FillLayerProps } from "./FillLayer";
15
- import HeatmapLayer, { HeatmapLayerProps } from "./HeatmapLayer";
14
+ import FillLayer, { type FillLayerProps } from "./FillLayer";
15
+ import HeatmapLayer, { type HeatmapLayerProps } from "./HeatmapLayer";
16
16
  import ImageSource from "./ImageSource";
17
- import LineLayer, { LineLayerProps } from "./LineLayer";
18
- import RasterLayer, { RasterLayerProps } from "./RasterLayer";
17
+ import LineLayer, { type LineLayerProps } from "./LineLayer";
18
+ import RasterLayer, { type RasterLayerProps } from "./RasterLayer";
19
19
  import RasterSource from "./RasterSource";
20
20
  import ShapeSource from "./ShapeSource";
21
- import SymbolLayer, { SymbolLayerProps } from "./SymbolLayer";
21
+ import SymbolLayer, { type SymbolLayerProps } from "./SymbolLayer";
22
22
  import VectorSource from "./VectorSource";
23
- import { ExpressionField, FilterExpression } from "../utils/MaplibreStyles";
23
+ import {
24
+ type ExpressionField,
25
+ type FilterExpression,
26
+ } from "../utils/MapLibreRNStyles";
24
27
 
25
28
  function toCamelCase(s: string): string {
26
29
  return s.replace(/([-_][a-z])/gi, ($1) => {
@@ -59,7 +62,7 @@ type LayerProps =
59
62
  | HeatmapLayerProps;
60
63
 
61
64
  function getLayerComponentType(
62
- layer: MaplibreJSONLayer,
65
+ layer: MapLibreJSONLayer,
63
66
  ): ComponentType<LayerProps> | null {
64
67
  const { type } = layer;
65
68
 
@@ -87,7 +90,7 @@ function getLayerComponentType(
87
90
  return null;
88
91
  }
89
92
 
90
- interface MaplibreJSONLayer {
93
+ interface MapLibreJSONLayer {
91
94
  type: string;
92
95
  paint: { [k: string]: unknown };
93
96
  layout: { [k: string]: unknown };
@@ -100,7 +103,7 @@ interface MaplibreJSONLayer {
100
103
  }
101
104
 
102
105
  function asLayerComponent(
103
- layer: MaplibreJSONLayer,
106
+ layer: MapLibreJSONLayer,
104
107
  ): ReactElement<LayerProps> | null {
105
108
  const LayerComponent = getLayerComponentType(layer);
106
109
 
@@ -137,7 +140,7 @@ function asLayerComponent(
137
140
  return <LayerComponent key={layer.id} id={layer.id} {...layerProps} />;
138
141
  }
139
142
 
140
- interface MaplibreJSONSource {
143
+ interface MapLibreJSONSource {
141
144
  type: string;
142
145
  url?: string;
143
146
  tiles?: string[];
@@ -175,7 +178,7 @@ type SourceProps = {
175
178
  tms?: boolean;
176
179
  };
177
180
 
178
- function getTileSourceProps(source: MaplibreJSONSource): SourceProps {
181
+ function getTileSourceProps(source: MapLibreJSONSource): SourceProps {
179
182
  const sourceProps: Partial<SourceProps> = {};
180
183
  if (source.url) {
181
184
  sourceProps.url = source.url;
@@ -198,12 +201,12 @@ function getTileSourceProps(source: MaplibreJSONSource): SourceProps {
198
201
  return sourceProps;
199
202
  }
200
203
 
201
- function getVectorSource(id: string, source: MaplibreJSONSource): ReactElement {
204
+ function getVectorSource(id: string, source: MapLibreJSONSource): ReactElement {
202
205
  const sourceProps = { ...getTileSourceProps(source) };
203
206
  return <VectorSource key={id} id={id} {...sourceProps} />;
204
207
  }
205
208
 
206
- function getRasterSource(id: string, source: MaplibreJSONSource): ReactElement {
209
+ function getRasterSource(id: string, source: MapLibreJSONSource): ReactElement {
207
210
  const sourceProps: SourceProps & { tileSize?: number } = {
208
211
  ...getTileSourceProps(source),
209
212
  };
@@ -213,7 +216,7 @@ function getRasterSource(id: string, source: MaplibreJSONSource): ReactElement {
213
216
  return <RasterSource key={id} id={id} {...sourceProps} />;
214
217
  }
215
218
 
216
- function getImageSource(id: string, source: MaplibreJSONSource): ReactElement {
219
+ function getImageSource(id: string, source: MapLibreJSONSource): ReactElement {
217
220
  const sourceProps = {
218
221
  url: source.url,
219
222
  coordinates: source.coordinates,
@@ -223,7 +226,7 @@ function getImageSource(id: string, source: MaplibreJSONSource): ReactElement {
223
226
 
224
227
  type ShapeSourceShape = (typeof ShapeSource.prototype.props)["shape"];
225
228
 
226
- function getShapeSource(id: string, source: MaplibreJSONSource): ReactElement {
229
+ function getShapeSource(id: string, source: MapLibreJSONSource): ReactElement {
227
230
  const sourceProps: SourceProps & {
228
231
  shape?: ShapeSourceShape;
229
232
  cluster?: boolean;
@@ -268,7 +271,7 @@ function getShapeSource(id: string, source: MaplibreJSONSource): ReactElement {
268
271
 
269
272
  function asSourceComponent(
270
273
  id: string,
271
- source: MaplibreJSONSource,
274
+ source: MapLibreJSONSource,
272
275
  ): ReactElement | null {
273
276
  switch (source.type) {
274
277
  case "vector":
@@ -286,16 +289,16 @@ function asSourceComponent(
286
289
  return null;
287
290
  }
288
291
 
289
- interface MaplibreJSON {
290
- layers?: MaplibreJSONLayer[];
291
- sources?: { [key: string]: MaplibreJSONSource };
292
+ interface MapLibreJSON {
293
+ layers?: MapLibreJSONLayer[];
294
+ sources?: { [key: string]: MapLibreJSONSource };
292
295
  }
293
296
 
294
297
  interface StyleProps {
295
298
  /**
296
299
  * A JSON object conforming to the schema described in the MapLibre Style Specification, or a URL to such JSON.
297
300
  */
298
- json?: MaplibreJSON | URL;
301
+ json?: MapLibreJSON | URL;
299
302
  }
300
303
 
301
304
  /**
@@ -307,7 +310,7 @@ interface StyleProps {
307
310
  */
308
311
  const Style = (props: StyleProps): ReactElement => {
309
312
  const [fetchedJson, setFetchedJson] = useState({});
310
- const json: MaplibreJSON =
313
+ const json: MapLibreJSON =
311
314
  typeof props.json === "object" ? props.json : fetchedJson;
312
315
 
313
316
  // Fetch style when props.json is a URL
@@ -352,8 +355,8 @@ const Style = (props: StyleProps): ReactElement => {
352
355
  if (!sources || !Object.keys(sources)) {
353
356
  return [];
354
357
  }
355
- return Object.keys(sources)
356
- .map((id) => asSourceComponent(id, sources[id]))
358
+ return Object.entries(sources)
359
+ .map(([id, source]) => asSourceComponent(id, source))
357
360
  .filter((x) => !!x);
358
361
  }, [json]);
359
362
 
@@ -1,12 +1,12 @@
1
- import React, { ReactElement } from "react";
1
+ import { Children, type ReactElement } from "react";
2
2
  import { View, NativeModules, requireNativeComponent } from "react-native";
3
3
 
4
4
  import useAbstractLayer, {
5
- BaseLayerProps,
6
- NativeBaseProps,
5
+ type BaseLayerProps,
6
+ type NativeBaseProps,
7
7
  } from "../hooks/useAbstractLayer";
8
- import BaseProps from "../types/BaseProps";
9
- import { type SymbolLayerStyleProps } from "../utils/MaplibreStyles";
8
+ import { type BaseProps } from "../types/BaseProps";
9
+ import { type SymbolLayerStyleProps } from "../utils/MapLibreRNStyles";
10
10
 
11
11
  const MapLibreGL = NativeModules.MLNModule;
12
12
 
@@ -50,11 +50,11 @@ const SymbolLayer: React.FC<SymbolLayerProps> = ({
50
50
  const _shouldSnapshot = (): boolean => {
51
51
  let isSnapshot = false;
52
52
 
53
- if (React.Children.count(props.children) <= 0) {
53
+ if (Children.count(props.children) <= 0) {
54
54
  return isSnapshot;
55
55
  }
56
56
 
57
- React.Children.forEach(props.children, (child) => {
57
+ Children.forEach(props.children, (child) => {
58
58
  if (child?.type === View) {
59
59
  isSnapshot = true;
60
60
  }
@@ -1,11 +1,21 @@
1
- import React, { ReactElement, useEffect, useImperativeHandle } from "react";
1
+ import {
2
+ forwardRef,
3
+ memo,
4
+ type ReactElement,
5
+ useEffect,
6
+ useImperativeHandle,
7
+ useRef,
8
+ useState,
9
+ } from "react";
2
10
 
3
11
  import Annotation from "./Annotation";
4
12
  import CircleLayer from "./CircleLayer";
5
13
  import HeadingIndicator from "./HeadingIndicator";
6
14
  import NativeUserLocation from "./NativeUserLocation";
7
- import locationManager, { Location } from "../modules/location/locationManager";
8
- import { CircleLayerStyleProps } from "../utils/MaplibreStyles";
15
+ import locationManager, {
16
+ type Location,
17
+ } from "../modules/location/locationManager";
18
+ import { type CircleLayerStyleProps } from "../utils/MapLibreRNStyles";
9
19
 
10
20
  const mapboxBlue = "rgba(51, 181, 229, 100)";
11
21
 
@@ -124,8 +134,8 @@ export interface UserLocationRef {
124
134
  _onLocationUpdate: (location: Location | null) => void;
125
135
  }
126
136
 
127
- const UserLocation = React.memo(
128
- React.forwardRef<UserLocationRef, UserLocationProps>(
137
+ const UserLocation = memo(
138
+ forwardRef<UserLocationRef, UserLocationProps>(
129
139
  (
130
140
  {
131
141
  animated = true,
@@ -141,11 +151,11 @@ const UserLocation = React.memo(
141
151
  }: UserLocationProps,
142
152
  ref,
143
153
  ) => {
144
- const _isMounted = React.useRef<boolean | null>(null);
145
- const locationManagerRunning = React.useRef<boolean>(false);
154
+ const _isMounted = useRef<boolean | null>(null);
155
+ const locationManagerRunning = useRef<boolean>(false);
146
156
 
147
157
  const [userLocationState, setUserLocationState] =
148
- React.useState<UserLocationState>({
158
+ useState<UserLocationState>({
149
159
  shouldShowUserLocation: false,
150
160
  });
151
161
 
@@ -1,17 +1,17 @@
1
1
  import { featureCollection } from "@turf/helpers";
2
- import React, { memo, useImperativeHandle } from "react";
2
+ import { forwardRef, memo, useImperativeHandle } from "react";
3
3
  import {
4
4
  NativeModules,
5
- NativeSyntheticEvent,
5
+ type NativeSyntheticEvent,
6
6
  requireNativeComponent,
7
7
  } from "react-native";
8
8
 
9
9
  import useAbstractSource from "../hooks/useAbstractSource";
10
10
  import useNativeBridge from "../hooks/useNativeBridge";
11
- import BaseProps from "../types/BaseProps";
12
- import OnPressEvent from "../types/OnPressEvent";
11
+ import { type BaseProps } from "../types/BaseProps";
12
+ import { type OnPressEvent } from "../types/OnPressEvent";
13
13
  import { cloneReactChildrenWithProps, isFunction, isAndroid } from "../utils";
14
- import { FilterExpression } from "../utils/MaplibreStyles";
14
+ import { type FilterExpression } from "../utils/MapLibreRNStyles";
15
15
  import { copyPropertiesAsDeprecated } from "../utils/deprecation";
16
16
  import { getFilter } from "../utils/filterUtils";
17
17
 
@@ -91,7 +91,7 @@ const RCTMLNVectorSource =
91
91
  * 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.
92
92
  */
93
93
  const VectorSource = memo(
94
- React.forwardRef(
94
+ forwardRef(
95
95
  (
96
96
  {
97
97
  id = MapLibreGL.StyleSource.DefaultSourceID,
@@ -1,14 +1,14 @@
1
- import React, { useMemo, useRef } from "react";
2
- import { processColor, NativeMethods } from "react-native";
1
+ import { useMemo, useRef } from "react";
2
+ import { processColor, type NativeMethods } from "react-native";
3
3
 
4
- import BaseProps from "../types/BaseProps";
4
+ import { type BaseProps } from "../types/BaseProps";
5
5
  import {
6
- AllLayerStyleProps,
7
- ExpressionField,
8
- ExpressionName,
9
- FilterExpression,
10
- } from "../utils/MaplibreStyles";
11
- import { StyleValue, transformStyle } from "../utils/StyleValue";
6
+ type AllLayerStyleProps,
7
+ type ExpressionField,
8
+ type ExpressionName,
9
+ type FilterExpression,
10
+ } from "../utils/MapLibreRNStyles";
11
+ import { type StyleValue, transformStyle } from "../utils/StyleValue";
12
12
  import { getFilter } from "../utils/filterUtils";
13
13
 
14
14
  export interface BaseLayerProps {
@@ -1,5 +1,5 @@
1
- import React, { useRef } from "react";
2
- import { NativeMethods } from "react-native";
1
+ import { useRef } from "react";
2
+ import { type NativeMethods } from "react-native";
3
3
 
4
4
  export default function useAbstractSource<NativePropsType extends object>(): {
5
5
  _nativeRef:
@@ -1,6 +1,6 @@
1
- import React, { Component, SyntheticEvent, useRef } from "react";
1
+ import { Component, type SyntheticEvent, useRef } from "react";
2
2
 
3
- import { runNativeCommand, isAndroid, NativeArg } from "../utils";
3
+ import { runNativeCommand, isAndroid, type NativeArg } from "../utils";
4
4
 
5
5
  export type RNMLEvent<PayloadType = { [key: string]: string }> = {
6
6
  payload: PayloadType;
@@ -1,5 +1,5 @@
1
- import React, { Component, useRef } from "react";
2
- import { NativeMethods } from "react-native";
1
+ import { Component, useRef } from "react";
2
+ import { type NativeMethods } from "react-native";
3
3
 
4
4
  export type NativeRef<NativeProps> = Component<NativeProps> &
5
5
  Readonly<NativeMethods>;
package/src/index.ts ADDED
@@ -0,0 +1,4 @@
1
+ import * as MapLibreRN from "./MapLibreRN";
2
+ export * from "./MapLibreRN";
3
+
4
+ export default MapLibreRN;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  NativeModules,
3
3
  NativeEventEmitter,
4
- EmitterSubscription,
4
+ type EmitterSubscription,
5
5
  } from "react-native";
6
6
 
7
7
  const MapLibreGL = NativeModules.MLNModule;
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  NativeModules,
3
3
  NativeEventEmitter,
4
- EventSubscription,
4
+ type EventSubscription,
5
5
  } from "react-native";
6
6
 
7
7
  import OfflineCreatePackOptions, {
8
- OfflineCreatePackInputOptions,
8
+ type OfflineCreatePackInputOptions,
9
9
  } from "./OfflineCreatePackOptions";
10
10
  import OfflinePack from "./OfflinePack";
11
11
  import { isUndefined, isFunction, isAndroid } from "../../utils";
@@ -90,8 +90,8 @@ class OfflineManager {
90
90
  * }, progressListener, errorListener)
91
91
  *
92
92
  * @param {OfflineCreatePackOptions} options Create options for a offline pack that specifices zoom levels, style url, and the region to download.
93
- * @param {Callback=} progressListener Callback that listens for status events while downloading the offline resource.
94
- * @param {Callback=} errorListener Callback that listens for status events while downloading the offline resource.
93
+ * @param {ProgressListener} progressListener Callback that listens for status events while downloading the offline resource.
94
+ * @param {ErrorListener} errorListener Callback that listens for status events while downloading the offline resource.
95
95
  * @return {void}
96
96
  */
97
97
  async createPack(
@@ -230,9 +230,10 @@ class OfflineManager {
230
230
  */
231
231
  async getPacks(): Promise<OfflinePack[]> {
232
232
  await this._initialize();
233
- return Object.keys(this._offlinePacks).map(
234
- (name) => this._offlinePacks[name],
235
- );
233
+
234
+ return Object.keys(this._offlinePacks)
235
+ .map((name) => this._offlinePacks[name])
236
+ .filter((pack) => !!pack);
236
237
  }
237
238
 
238
239
  /**
@@ -244,7 +245,7 @@ class OfflineManager {
244
245
  * @param {String} name Name of the offline pack.
245
246
  * @return {OfflinePack}
246
247
  */
247
- async getPack(name: string): Promise<OfflinePack> {
248
+ async getPack(name: string) {
248
249
  await this._initialize();
249
250
  return this._offlinePacks[name];
250
251
  }
@@ -300,9 +301,9 @@ class OfflineManager {
300
301
  * const errorListener = (offlinePack, err) => console.log(offlinePack, err)
301
302
  * MapLibreGL.offlineManager.subscribe('packName', progressListener, errorListener)
302
303
  *
303
- * @param {String} packName Name of the offline pack.
304
- * @param {Callback} progressListener Callback that listens for status events while downloading the offline resource.
305
- * @param {Callback} errorListener Callback that listens for status events while downloading the offline resource.
304
+ * @param {string} packName Name of the offline pack.
305
+ * @param {ProgressListener} progressListener Callback that listens for status events while downloading the offline resource.
306
+ * @param {ErrorListener} errorListener Callback that listens for status events while downloading the offline resource.
306
307
  * @return {void}
307
308
  */
308
309
  async subscribe(
@@ -399,7 +400,9 @@ class OfflineManager {
399
400
  }
400
401
 
401
402
  const pack = this._offlinePacks[name];
402
- this._progressListeners[name](pack, e.payload);
403
+ if (pack) {
404
+ this._progressListeners[name]?.(pack, e.payload);
405
+ }
403
406
 
404
407
  // cleanup listeners now that they are no longer needed
405
408
  if (state === MapLibreGL.OfflinePackDownloadState.Complete) {
@@ -415,7 +418,9 @@ class OfflineManager {
415
418
  }
416
419
 
417
420
  const pack = this._offlinePacks[name];
418
- this._errorListeners[name](pack, e.payload);
421
+ if (pack) {
422
+ this._errorListeners[name]?.(pack, e.payload);
423
+ }
419
424
  }
420
425
 
421
426
  _hasListeners(
@@ -1,6 +1,6 @@
1
1
  import { NativeModules } from "react-native";
2
2
 
3
- import SnapshotOptions, { SnapshotInputOptions } from "./SnapshotOptions";
3
+ import SnapshotOptions, { type SnapshotInputOptions } from "./SnapshotOptions";
4
4
 
5
5
  const MapLibreGLSnapshotManger = NativeModules.MLNSnapshotModule;
6
6
 
@@ -1,12 +1,12 @@
1
- import { Permission, PermissionsAndroid } from "react-native";
1
+ import { type Permission, PermissionsAndroid } from "react-native";
2
2
 
3
3
  import { isAndroid } from "./utils";
4
4
 
5
5
  export async function requestAndroidLocationPermissions(): Promise<boolean> {
6
6
  if (isAndroid()) {
7
7
  const res = await PermissionsAndroid.requestMultiple([
8
- PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION,
9
- PermissionsAndroid.PERMISSIONS.ACCESS_COARSE_LOCATION,
8
+ PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION as Permission,
9
+ PermissionsAndroid.PERMISSIONS.ACCESS_COARSE_LOCATION as Permission,
10
10
  ]);
11
11
 
12
12
  if (!res) {
@@ -0,0 +1,3 @@
1
+ export interface BaseProps {
2
+ testID?: string;
3
+ }
@@ -0,0 +1,7 @@
1
+ import { type SyntheticEvent } from "react";
2
+
3
+ export type MapLibreRNEvent<
4
+ T extends string,
5
+ P = GeoJSON.Feature,
6
+ V = Element,
7
+ > = SyntheticEvent<V, { type: T; payload: P }>;