@rnmapbox/maps 10.1.45 → 10.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (751) hide show
  1. package/android/build.gradle +10 -2
  2. package/android/install.md +3 -14
  3. package/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapView.kt +4 -2
  4. package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/RNMBXStyleFactory.kt +514 -0
  5. package/android/src/main/mapbox-v11-compat/v10/com/rnmapbox/rnmbx/v11compat/StyleFactory.kt +341 -1
  6. package/android/src/main/mapbox-v11-compat/v11/com/rnmapbox/rnmbx/v11compat/Annotation.kt +1 -1
  7. package/ios/RNMBX/RNMBXMapViewComponentView.mm +8 -3
  8. package/ios/RNMBX/RNMBXStyle.swift +382 -0
  9. package/lib/commonjs/plugin/build/generateCode.js +0 -1
  10. package/lib/commonjs/plugin/build/withMapbox.js +14 -4
  11. package/lib/commonjs/plugin/install.md +18 -18
  12. package/lib/commonjs/plugin/src/generateCode.ts +0 -1
  13. package/lib/commonjs/plugin/src/withMapbox.ts +24 -4
  14. package/lib/module/Mapbox.js +3 -80
  15. package/lib/module/Mapbox.js.map +1 -1
  16. package/lib/module/Mapbox.native.js +83 -0
  17. package/lib/module/Mapbox.native.js.map +1 -0
  18. package/lib/module/RNMBXModule.js +0 -1
  19. package/lib/module/RNMBXModule.js.map +1 -1
  20. package/lib/module/classes/AnimatedRouteCoordinatesArray.js +2 -4
  21. package/lib/module/classes/AnimatedRouteCoordinatesArray.js.map +1 -1
  22. package/lib/module/classes/index.js +5 -5
  23. package/lib/module/classes/index.js.map +1 -1
  24. package/lib/module/components/AbstractLayer.js +2 -2
  25. package/lib/module/components/AbstractLayer.js.map +1 -1
  26. package/lib/module/components/Annotation.js +7 -4
  27. package/lib/module/components/Annotation.js.map +1 -1
  28. package/lib/module/components/Atmosphere.js +2 -2
  29. package/lib/module/components/Atmosphere.js.map +1 -1
  30. package/lib/module/components/BackgroundLayer.js +11 -9
  31. package/lib/module/components/BackgroundLayer.js.map +1 -1
  32. package/lib/module/components/Camera.js +16 -12
  33. package/lib/module/components/Camera.js.map +1 -1
  34. package/lib/module/components/CircleLayer.js +1 -1
  35. package/lib/module/components/CircleLayer.js.map +1 -1
  36. package/lib/module/components/CustomLocationProvider.js +1 -1
  37. package/lib/module/components/CustomLocationProvider.js.map +1 -1
  38. package/lib/module/components/FillExtrusionLayer.js +11 -9
  39. package/lib/module/components/FillExtrusionLayer.js.map +1 -1
  40. package/lib/module/components/FillLayer.js +1 -1
  41. package/lib/module/components/FillLayer.js.map +1 -1
  42. package/lib/module/components/HeadingIndicator.js +2 -2
  43. package/lib/module/components/HeadingIndicator.js.map +1 -1
  44. package/lib/module/components/HeatmapLayer.js +1 -1
  45. package/lib/module/components/HeatmapLayer.js.map +1 -1
  46. package/lib/module/components/Image.js +2 -2
  47. package/lib/module/components/Image.js.map +1 -1
  48. package/lib/module/components/ImageSource.js +2 -2
  49. package/lib/module/components/ImageSource.js.map +1 -1
  50. package/lib/module/components/Images.js +2 -2
  51. package/lib/module/components/Images.js.map +1 -1
  52. package/lib/module/components/Light.js +3 -5
  53. package/lib/module/components/Light.js.map +1 -1
  54. package/lib/module/components/LineLayer.js +1 -2
  55. package/lib/module/components/LineLayer.js.map +1 -1
  56. package/lib/module/components/LocationPuck.js +1 -1
  57. package/lib/module/components/LocationPuck.js.map +1 -1
  58. package/lib/module/components/MapView.js +12 -7
  59. package/lib/module/components/MapView.js.map +1 -1
  60. package/lib/module/components/MarkerView.js +5 -5
  61. package/lib/module/components/MarkerView.js.map +1 -1
  62. package/lib/module/components/ModelLayer.js +1 -2
  63. package/lib/module/components/ModelLayer.js.map +1 -1
  64. package/lib/module/components/Models.js +0 -1
  65. package/lib/module/components/Models.js.map +1 -1
  66. package/lib/module/components/NativeBridgeComponent.js +1 -1
  67. package/lib/module/components/NativeBridgeComponent.js.map +1 -1
  68. package/lib/module/components/PointAnnotation.js +5 -5
  69. package/lib/module/components/PointAnnotation.js.map +1 -1
  70. package/lib/module/components/RasterDemSource.js +4 -4
  71. package/lib/module/components/RasterDemSource.js.map +1 -1
  72. package/lib/module/components/RasterLayer.js +1 -1
  73. package/lib/module/components/RasterLayer.js.map +1 -1
  74. package/lib/module/components/RasterSource.js +4 -4
  75. package/lib/module/components/RasterSource.js.map +1 -1
  76. package/lib/module/components/ShapeSource.js +7 -7
  77. package/lib/module/components/ShapeSource.js.map +1 -1
  78. package/lib/module/components/SkyLayer.js +9 -7
  79. package/lib/module/components/SkyLayer.js.map +1 -1
  80. package/lib/module/components/Style.js +14 -14
  81. package/lib/module/components/Style.js.map +1 -1
  82. package/lib/module/components/StyleImport.js +1 -1
  83. package/lib/module/components/StyleImport.js.map +1 -1
  84. package/lib/module/components/SymbolLayer.js +1 -1
  85. package/lib/module/components/SymbolLayer.js.map +1 -1
  86. package/lib/module/components/Terrain.js +2 -2
  87. package/lib/module/components/Terrain.js.map +1 -1
  88. package/lib/module/components/UserLocation.js +5 -5
  89. package/lib/module/components/UserLocation.js.map +1 -1
  90. package/lib/module/components/VectorSource.js +5 -5
  91. package/lib/module/components/VectorSource.js.map +1 -1
  92. package/lib/module/components/Viewport.js +6 -3
  93. package/lib/module/components/Viewport.js.map +1 -1
  94. package/lib/module/components/codeparts/LayerPropsCommon.codepart-tsx +1 -1
  95. package/lib/module/index.native.js +6 -0
  96. package/lib/module/index.native.js.map +1 -0
  97. package/lib/module/modules/location/locationManager.js +20 -17
  98. package/lib/module/modules/location/locationManager.js.map +1 -1
  99. package/lib/module/modules/offline/OfflineCreatePackOptions.js +2 -2
  100. package/lib/module/modules/offline/OfflineCreatePackOptions.js.map +1 -1
  101. package/lib/module/modules/offline/TileStore.js +1 -1
  102. package/lib/module/modules/offline/TileStore.js.map +1 -1
  103. package/lib/module/modules/offline/offlineManager.js +4 -4
  104. package/lib/module/modules/offline/offlineManager.js.map +1 -1
  105. package/lib/module/modules/offline/offlineManagerLegacy.js +3 -3
  106. package/lib/module/modules/offline/offlineManagerLegacy.js.map +1 -1
  107. package/lib/module/modules/snapshot/SnapshotOptions.js +2 -2
  108. package/lib/module/modules/snapshot/SnapshotOptions.js.map +1 -1
  109. package/lib/module/modules/snapshot/snapshotManager.js +1 -1
  110. package/lib/module/modules/snapshot/snapshotManager.js.map +1 -1
  111. package/lib/module/package.json +1 -0
  112. package/lib/module/requestAndroidLocationPermissions.js +1 -1
  113. package/lib/module/requestAndroidLocationPermissions.js.map +1 -1
  114. package/lib/module/shapeAnimators/ChangeLineOffsetsShapeAnimator.js +4 -2
  115. package/lib/module/shapeAnimators/ChangeLineOffsetsShapeAnimator.js.map +1 -1
  116. package/lib/module/shapeAnimators/MovePointShapeAnimator.js +2 -2
  117. package/lib/module/shapeAnimators/MovePointShapeAnimator.js.map +1 -1
  118. package/lib/module/specs/NativeMapViewModule.js +1 -1
  119. package/lib/module/specs/NativeMapViewModule.js.map +1 -1
  120. package/lib/module/specs/NativeRNMBXCameraModule.js +3 -1
  121. package/lib/module/specs/NativeRNMBXCameraModule.js.map +1 -1
  122. package/lib/module/specs/NativeRNMBXChangeLineOffsetsShapeAnimatorModule.js +3 -0
  123. package/lib/module/specs/NativeRNMBXChangeLineOffsetsShapeAnimatorModule.js.map +1 -1
  124. package/lib/module/specs/NativeRNMBXImageModule.js +1 -1
  125. package/lib/module/specs/NativeRNMBXImageModule.js.map +1 -1
  126. package/lib/module/specs/NativeRNMBXLocationModule.js +3 -1
  127. package/lib/module/specs/NativeRNMBXLocationModule.js.map +1 -1
  128. package/lib/module/specs/NativeRNMBXMovePointShapeAnimatorModule.js +2 -0
  129. package/lib/module/specs/NativeRNMBXMovePointShapeAnimatorModule.js.map +1 -1
  130. package/lib/module/specs/NativeRNMBXPointAnnotationModule.js +1 -1
  131. package/lib/module/specs/NativeRNMBXPointAnnotationModule.js.map +1 -1
  132. package/lib/module/specs/NativeRNMBXShapeSourceModule.js +1 -1
  133. package/lib/module/specs/NativeRNMBXShapeSourceModule.js.map +1 -1
  134. package/lib/module/specs/NativeRNMBXTileStoreModule.js +3 -1
  135. package/lib/module/specs/NativeRNMBXTileStoreModule.js.map +1 -1
  136. package/lib/module/specs/NativeRNMBXViewportModule.js +3 -1
  137. package/lib/module/specs/NativeRNMBXViewportModule.js.map +1 -1
  138. package/lib/module/specs/RNMBXAtmosphereNativeComponent.ts +1 -0
  139. package/lib/module/specs/RNMBXBackgroundLayerNativeComponent.ts +2 -0
  140. package/lib/module/specs/RNMBXCalloutNativeComponent.ts +1 -1
  141. package/lib/module/specs/RNMBXCameraNativeComponent.ts +2 -0
  142. package/lib/module/specs/RNMBXCircleLayerNativeComponent.ts +2 -0
  143. package/lib/module/specs/RNMBXCustomLocationProviderNativeComponent.ts +2 -0
  144. package/lib/module/specs/RNMBXFillExtrusionLayerNativeComponent.ts +2 -0
  145. package/lib/module/specs/RNMBXFillLayerNativeComponent.ts +2 -0
  146. package/lib/module/specs/RNMBXHeatmapLayerNativeComponent.ts +2 -0
  147. package/lib/module/specs/RNMBXImageNativeComponent.ts +2 -0
  148. package/lib/module/specs/RNMBXImageSourceNativeComponent.ts +1 -0
  149. package/lib/module/specs/RNMBXImagesNativeComponent.ts +2 -0
  150. package/lib/module/specs/RNMBXLightNativeComponent.ts +1 -0
  151. package/lib/module/specs/RNMBXLineLayerNativeComponent.ts +2 -0
  152. package/lib/module/specs/RNMBXMapViewNativeComponent.ts +2 -0
  153. package/lib/module/specs/RNMBXMarkerViewContentNativeComponent.ts +2 -2
  154. package/lib/module/specs/RNMBXMarkerViewNativeComponent.ts +2 -0
  155. package/lib/module/specs/RNMBXModelLayerNativeComponent.ts +2 -0
  156. package/lib/module/specs/RNMBXModelsNativeComponent.ts +1 -0
  157. package/lib/module/specs/RNMBXNativeUserLocationNativeComponent.ts +1 -0
  158. package/lib/module/specs/RNMBXPointAnnotationNativeComponent.ts +2 -0
  159. package/lib/module/specs/RNMBXRasterDemSourceNativeComponent.ts +2 -0
  160. package/lib/module/specs/RNMBXRasterLayerNativeComponent.ts +2 -0
  161. package/lib/module/specs/RNMBXRasterSourceNativeComponent.ts +2 -0
  162. package/lib/module/specs/RNMBXShapeSourceNativeComponent.ts +2 -0
  163. package/lib/module/specs/RNMBXSkyLayerNativeComponent.ts +2 -0
  164. package/lib/module/specs/RNMBXStyleImportNativeComponent.ts +1 -0
  165. package/lib/module/specs/RNMBXSymbolLayerNativeComponent.ts +2 -0
  166. package/lib/module/specs/RNMBXTerrainNativeComponent.ts +1 -0
  167. package/lib/module/specs/RNMBXVectorSourceNativeComponent.ts +2 -0
  168. package/lib/module/specs/RNMBXViewportNativeComponent.ts +2 -0
  169. package/lib/module/utils/BridgeValue.js +1 -1
  170. package/lib/module/utils/BridgeValue.js.map +1 -1
  171. package/lib/module/utils/Logger.js.map +1 -1
  172. package/lib/module/utils/MapboxStyles.d.js +48 -0
  173. package/lib/module/utils/MapboxStyles.d.js.map +1 -1
  174. package/lib/module/utils/NativeCommands.js.map +1 -1
  175. package/lib/module/utils/StyleValue.js +2 -2
  176. package/lib/module/utils/StyleValue.js.map +1 -1
  177. package/lib/module/utils/animated/Animated.js +9 -9
  178. package/lib/module/utils/animated/Animated.js.map +1 -1
  179. package/lib/module/utils/geoUtils.js +6 -1
  180. package/lib/module/utils/geoUtils.js.map +1 -1
  181. package/lib/module/utils/index.js +0 -1
  182. package/lib/module/utils/index.js.map +1 -1
  183. package/lib/module/utils/styleMap.js +31 -1
  184. package/lib/module/utils/styleMap.js.map +1 -1
  185. package/lib/module/web/MapboxModule.js +15 -8
  186. package/lib/module/web/MapboxModule.js.map +1 -1
  187. package/lib/module/web/components/Camera.js +3 -1
  188. package/lib/module/web/components/Camera.js.map +1 -1
  189. package/lib/module/web/components/MapView.js +1 -1
  190. package/lib/module/web/components/MapView.js.map +1 -1
  191. package/lib/module/web/components/MarkerView.js +1 -1
  192. package/lib/module/web/components/MarkerView.js.map +1 -1
  193. package/lib/module/web/index.js +6 -5
  194. package/lib/module/web/index.js.map +1 -1
  195. package/lib/module/web/utils/Logger.js +0 -2
  196. package/lib/module/web/utils/Logger.js.map +1 -1
  197. package/lib/typescript/app.plugin.d.ts +3 -0
  198. package/lib/typescript/app.plugin.d.ts.map +1 -0
  199. package/lib/typescript/babel.config.d.ts +10 -0
  200. package/lib/typescript/babel.config.d.ts.map +1 -0
  201. package/lib/typescript/eslint.config.d.mts +3 -0
  202. package/lib/typescript/eslint.config.d.mts.map +1 -0
  203. package/lib/typescript/example/src/examples/common/ExampleMetadata.d.ts +9 -0
  204. package/lib/typescript/example/src/examples/common/ExampleMetadata.d.ts.map +1 -0
  205. package/lib/typescript/index.d.ts +1 -0
  206. package/lib/typescript/index.d.ts.map +1 -0
  207. package/lib/typescript/package.json +1 -0
  208. package/lib/typescript/plugin/build/generateCode.d.ts +41 -0
  209. package/lib/typescript/plugin/build/generateCode.d.ts.map +1 -0
  210. package/lib/typescript/plugin/build/withMapbox.d.ts +26 -0
  211. package/lib/typescript/plugin/build/withMapbox.d.ts.map +1 -0
  212. package/lib/typescript/plugin/copy-plugin.d.ts +2 -0
  213. package/lib/typescript/plugin/copy-plugin.d.ts.map +1 -0
  214. package/lib/typescript/plugin/jest.config.d.ts +3 -0
  215. package/lib/typescript/plugin/jest.config.d.ts.map +1 -0
  216. package/lib/typescript/plugin/src/generateCode.d.ts +43 -0
  217. package/lib/typescript/plugin/src/generateCode.d.ts.map +1 -0
  218. package/lib/typescript/plugin/src/withMapbox.d.ts +20 -0
  219. package/lib/typescript/plugin/src/withMapbox.d.ts.map +1 -0
  220. package/lib/typescript/scripts/actions/lint-code-example-in-issues/fetch-issue-for-testing.d.ts +2 -0
  221. package/lib/typescript/scripts/actions/lint-code-example-in-issues/fetch-issue-for-testing.d.ts.map +1 -0
  222. package/lib/typescript/scripts/actions/lint-code-example-in-issues/lint-code-example-in-issues.d.ts +2 -0
  223. package/lib/typescript/scripts/actions/lint-code-example-in-issues/lint-code-example-in-issues.d.ts.map +1 -0
  224. package/lib/typescript/scripts/autogenHelpers/DocJSONBuilder.d.mts +20 -0
  225. package/lib/typescript/scripts/autogenHelpers/DocJSONBuilder.d.mts.map +1 -0
  226. package/lib/typescript/scripts/autogenHelpers/JSDocNodeTree.d.ts +47 -0
  227. package/lib/typescript/scripts/autogenHelpers/JSDocNodeTree.d.ts.map +1 -0
  228. package/lib/typescript/scripts/autogenHelpers/MarkdownBuilder.d.mts +21 -0
  229. package/lib/typescript/scripts/autogenHelpers/MarkdownBuilder.d.mts.map +1 -0
  230. package/lib/typescript/scripts/autogenHelpers/docconfig.d.ts +13 -0
  231. package/lib/typescript/scripts/autogenHelpers/docconfig.d.ts.map +1 -0
  232. package/lib/typescript/scripts/autogenHelpers/examplesJsonSchema.d.ts +18 -0
  233. package/lib/typescript/scripts/autogenHelpers/examplesJsonSchema.d.ts.map +1 -0
  234. package/lib/typescript/scripts/autogenHelpers/generateCodeWithEjs.d.mts +40 -0
  235. package/lib/typescript/scripts/autogenHelpers/generateCodeWithEjs.d.mts.map +1 -0
  236. package/lib/typescript/scripts/autogenHelpers/generateIOSComponents.d.mts +17 -0
  237. package/lib/typescript/scripts/autogenHelpers/generateIOSComponents.d.mts.map +1 -0
  238. package/lib/typescript/scripts/autogenHelpers/globals.d.mts +34 -0
  239. package/lib/typescript/scripts/autogenHelpers/globals.d.mts.map +1 -0
  240. package/lib/typescript/scripts/autogenHelpers/screenshotsJsonSchema.d.ts +10 -0
  241. package/lib/typescript/scripts/autogenHelpers/screenshotsJsonSchema.d.ts.map +1 -0
  242. package/lib/typescript/scripts/autogenerate.d.mts +2 -0
  243. package/lib/typescript/scripts/autogenerate.d.mts.map +1 -0
  244. package/lib/typescript/scripts/codegen-old-arch.d.ts +3 -0
  245. package/lib/typescript/scripts/codegen-old-arch.d.ts.map +1 -0
  246. package/lib/typescript/scripts/codepart-replace.d.mts +9 -0
  247. package/lib/typescript/scripts/codepart-replace.d.mts.map +1 -0
  248. package/lib/typescript/scripts/doc-generate.d.mts +2 -0
  249. package/lib/typescript/scripts/doc-generate.d.mts.map +1 -0
  250. package/lib/typescript/scripts/docjsongenerate.d.mts +2 -0
  251. package/lib/typescript/scripts/docjsongenerate.d.mts.map +1 -0
  252. package/lib/typescript/scripts/example-docs.d.ts +5 -0
  253. package/lib/typescript/scripts/example-docs.d.ts.map +1 -0
  254. package/lib/typescript/setup-jest.d.ts +2 -0
  255. package/lib/typescript/setup-jest.d.ts.map +1 -0
  256. package/lib/typescript/src/Mapbox.d.ts +3 -70
  257. package/lib/typescript/src/Mapbox.d.ts.map +1 -1
  258. package/lib/typescript/src/Mapbox.native.d.ts +71 -0
  259. package/lib/typescript/src/Mapbox.native.d.ts.map +1 -0
  260. package/lib/typescript/src/RNMBXModule.d.ts.map +1 -1
  261. package/lib/typescript/src/classes/AnimatedCoordinatesArray.d.ts +46 -0
  262. package/lib/typescript/src/classes/AnimatedCoordinatesArray.d.ts.map +1 -0
  263. package/lib/typescript/src/classes/AnimatedExtractCoordinateFromArray.d.ts +12 -0
  264. package/lib/typescript/src/classes/AnimatedExtractCoordinateFromArray.d.ts.map +1 -0
  265. package/lib/typescript/src/classes/AnimatedPoint.d.ts +38 -0
  266. package/lib/typescript/src/classes/AnimatedPoint.d.ts.map +1 -0
  267. package/lib/typescript/src/classes/AnimatedRouteCoordinatesArray.d.ts +23 -0
  268. package/lib/typescript/src/classes/AnimatedRouteCoordinatesArray.d.ts.map +1 -0
  269. package/lib/typescript/src/classes/AnimatedShape.d.ts +24 -0
  270. package/lib/typescript/src/classes/AnimatedShape.d.ts.map +1 -0
  271. package/lib/typescript/src/classes/index.d.ts +6 -0
  272. package/lib/typescript/src/classes/index.d.ts.map +1 -0
  273. package/lib/typescript/src/components/AbstractLayer.d.ts +2 -2
  274. package/lib/typescript/src/components/AbstractLayer.d.ts.map +1 -1
  275. package/lib/typescript/src/components/Annotation.d.ts +2 -2
  276. package/lib/typescript/src/components/Annotation.d.ts.map +1 -1
  277. package/lib/typescript/src/components/Atmosphere.d.ts +1 -2
  278. package/lib/typescript/src/components/Atmosphere.d.ts.map +1 -1
  279. package/lib/typescript/src/components/BackgroundLayer.d.ts +4 -4
  280. package/lib/typescript/src/components/BackgroundLayer.d.ts.map +1 -1
  281. package/lib/typescript/src/components/Callout.d.ts +167 -3
  282. package/lib/typescript/src/components/Callout.d.ts.map +1 -1
  283. package/lib/typescript/src/components/Camera.d.ts.map +1 -1
  284. package/lib/typescript/src/components/CircleLayer.d.ts +2 -2
  285. package/lib/typescript/src/components/CustomLocationProvider.d.ts +1 -2
  286. package/lib/typescript/src/components/CustomLocationProvider.d.ts.map +1 -1
  287. package/lib/typescript/src/components/FillExtrusionLayer.d.ts +2 -2
  288. package/lib/typescript/src/components/FillLayer.d.ts +4 -4
  289. package/lib/typescript/src/components/FillLayer.d.ts.map +1 -1
  290. package/lib/typescript/src/components/HeadingIndicator.d.ts +1 -2
  291. package/lib/typescript/src/components/HeadingIndicator.d.ts.map +1 -1
  292. package/lib/typescript/src/components/HeatmapLayer.d.ts +4 -4
  293. package/lib/typescript/src/components/HeatmapLayer.d.ts.map +1 -1
  294. package/lib/typescript/src/components/ImageSource.d.ts +2 -2
  295. package/lib/typescript/src/components/Images.d.ts +2 -2
  296. package/lib/typescript/src/components/Images.d.ts.map +1 -1
  297. package/lib/typescript/src/components/Light.d.ts.map +1 -1
  298. package/lib/typescript/src/components/LineLayer.d.ts +2 -3
  299. package/lib/typescript/src/components/LineLayer.d.ts.map +1 -1
  300. package/lib/typescript/src/components/LocationPuck.d.ts +1 -2
  301. package/lib/typescript/src/components/LocationPuck.d.ts.map +1 -1
  302. package/lib/typescript/src/components/MapView.d.ts +3 -3
  303. package/lib/typescript/src/components/MapView.d.ts.map +1 -1
  304. package/lib/typescript/src/components/MarkerView.d.ts +1 -1
  305. package/lib/typescript/src/components/ModelLayer.d.ts +2 -3
  306. package/lib/typescript/src/components/ModelLayer.d.ts.map +1 -1
  307. package/lib/typescript/src/components/Models.d.ts +1 -2
  308. package/lib/typescript/src/components/Models.d.ts.map +1 -1
  309. package/lib/typescript/src/components/PointAnnotation.d.ts +1 -1
  310. package/lib/typescript/src/components/RasterDemSource.d.ts +2 -2
  311. package/lib/typescript/src/components/RasterLayer.d.ts +2 -2
  312. package/lib/typescript/src/components/RasterSource.d.ts +2 -2
  313. package/lib/typescript/src/components/ShapeSource.d.ts +2 -2
  314. package/lib/typescript/src/components/SkyLayer.d.ts +2 -2
  315. package/lib/typescript/src/components/Style.d.ts +1 -2
  316. package/lib/typescript/src/components/Style.d.ts.map +1 -1
  317. package/lib/typescript/src/components/StyleImport.d.ts +1 -2
  318. package/lib/typescript/src/components/StyleImport.d.ts.map +1 -1
  319. package/lib/typescript/src/components/SymbolLayer.d.ts +2 -2
  320. package/lib/typescript/src/components/Terrain.d.ts +1 -2
  321. package/lib/typescript/src/components/Terrain.d.ts.map +1 -1
  322. package/lib/typescript/src/components/UserLocation.d.ts +2 -2
  323. package/lib/typescript/src/components/UserLocation.d.ts.map +1 -1
  324. package/lib/typescript/src/components/VectorSource.d.ts +2 -2
  325. package/lib/typescript/src/components/Viewport.d.ts.map +1 -1
  326. package/lib/typescript/src/index.native.d.ts +4 -0
  327. package/lib/typescript/src/index.native.d.ts.map +1 -0
  328. package/lib/typescript/src/modules/location/locationManager.d.ts +1 -1
  329. package/lib/typescript/src/modules/location/locationManager.d.ts.map +1 -1
  330. package/lib/typescript/src/modules/offline/offlineManager.d.ts +1 -1
  331. package/lib/typescript/src/modules/offline/offlineManager.d.ts.map +1 -1
  332. package/lib/typescript/src/modules/offline/offlineManagerLegacy.d.ts.map +1 -1
  333. package/lib/typescript/src/shapeAnimators/ChangeLineOffsetsShapeAnimator.d.ts.map +1 -1
  334. package/lib/typescript/src/specs/NativeMapViewModule.d.ts.map +1 -1
  335. package/lib/typescript/src/specs/NativeRNMBXCameraModule.d.ts +1 -1
  336. package/lib/typescript/src/specs/NativeRNMBXCameraModule.d.ts.map +1 -1
  337. package/lib/typescript/src/specs/NativeRNMBXChangeLineOffsetsShapeAnimatorModule.d.ts.map +1 -1
  338. package/lib/typescript/src/specs/NativeRNMBXImageModule.d.ts.map +1 -1
  339. package/lib/typescript/src/specs/NativeRNMBXLocationModule.d.ts +1 -1
  340. package/lib/typescript/src/specs/NativeRNMBXLocationModule.d.ts.map +1 -1
  341. package/lib/typescript/src/specs/NativeRNMBXMovePointShapeAnimatorModule.d.ts.map +1 -1
  342. package/lib/typescript/src/specs/NativeRNMBXPointAnnotationModule.d.ts.map +1 -1
  343. package/lib/typescript/src/specs/NativeRNMBXShapeSourceModule.d.ts.map +1 -1
  344. package/lib/typescript/src/specs/NativeRNMBXTileStoreModule.d.ts +1 -1
  345. package/lib/typescript/src/specs/NativeRNMBXTileStoreModule.d.ts.map +1 -1
  346. package/lib/typescript/src/specs/NativeRNMBXViewportModule.d.ts +1 -1
  347. package/lib/typescript/src/specs/NativeRNMBXViewportModule.d.ts.map +1 -1
  348. package/lib/typescript/src/specs/RNMBXAtmosphereNativeComponent.d.ts.map +1 -1
  349. package/lib/typescript/src/specs/RNMBXBackgroundLayerNativeComponent.d.ts.map +1 -1
  350. package/lib/typescript/src/specs/RNMBXCalloutNativeComponent.d.ts.map +1 -1
  351. package/lib/typescript/src/specs/RNMBXCameraNativeComponent.d.ts.map +1 -1
  352. package/lib/typescript/src/specs/RNMBXCircleLayerNativeComponent.d.ts.map +1 -1
  353. package/lib/typescript/src/specs/RNMBXCustomLocationProviderNativeComponent.d.ts.map +1 -1
  354. package/lib/typescript/src/specs/RNMBXFillExtrusionLayerNativeComponent.d.ts.map +1 -1
  355. package/lib/typescript/src/specs/RNMBXFillLayerNativeComponent.d.ts.map +1 -1
  356. package/lib/typescript/src/specs/RNMBXHeatmapLayerNativeComponent.d.ts.map +1 -1
  357. package/lib/typescript/src/specs/RNMBXImageNativeComponent.d.ts.map +1 -1
  358. package/lib/typescript/src/specs/RNMBXImageSourceNativeComponent.d.ts.map +1 -1
  359. package/lib/typescript/src/specs/RNMBXImagesNativeComponent.d.ts.map +1 -1
  360. package/lib/typescript/src/specs/RNMBXLightNativeComponent.d.ts.map +1 -1
  361. package/lib/typescript/src/specs/RNMBXLineLayerNativeComponent.d.ts.map +1 -1
  362. package/lib/typescript/src/specs/RNMBXMapViewNativeComponent.d.ts.map +1 -1
  363. package/lib/typescript/src/specs/RNMBXMarkerViewContentNativeComponent.d.ts +1 -1
  364. package/lib/typescript/src/specs/RNMBXMarkerViewContentNativeComponent.d.ts.map +1 -1
  365. package/lib/typescript/src/specs/RNMBXMarkerViewNativeComponent.d.ts.map +1 -1
  366. package/lib/typescript/src/specs/RNMBXModelLayerNativeComponent.d.ts.map +1 -1
  367. package/lib/typescript/src/specs/RNMBXModelsNativeComponent.d.ts.map +1 -1
  368. package/lib/typescript/src/specs/RNMBXNativeUserLocationNativeComponent.d.ts.map +1 -1
  369. package/lib/typescript/src/specs/RNMBXPointAnnotationNativeComponent.d.ts.map +1 -1
  370. package/lib/typescript/src/specs/RNMBXRasterDemSourceNativeComponent.d.ts.map +1 -1
  371. package/lib/typescript/src/specs/RNMBXRasterLayerNativeComponent.d.ts.map +1 -1
  372. package/lib/typescript/src/specs/RNMBXRasterSourceNativeComponent.d.ts.map +1 -1
  373. package/lib/typescript/src/specs/RNMBXShapeSourceNativeComponent.d.ts.map +1 -1
  374. package/lib/typescript/src/specs/RNMBXSkyLayerNativeComponent.d.ts.map +1 -1
  375. package/lib/typescript/src/specs/RNMBXStyleImportNativeComponent.d.ts.map +1 -1
  376. package/lib/typescript/src/specs/RNMBXSymbolLayerNativeComponent.d.ts.map +1 -1
  377. package/lib/typescript/src/specs/RNMBXTerrainNativeComponent.d.ts.map +1 -1
  378. package/lib/typescript/src/specs/RNMBXVectorSourceNativeComponent.d.ts.map +1 -1
  379. package/lib/typescript/src/specs/RNMBXViewportNativeComponent.d.ts.map +1 -1
  380. package/lib/typescript/src/specs/codegenUtils.d.ts.map +1 -1
  381. package/lib/typescript/src/utils/NativeCommands.d.ts.map +1 -1
  382. package/lib/typescript/src/utils/animated/Animated.d.ts +165 -9
  383. package/lib/typescript/src/utils/animated/Animated.d.ts.map +1 -1
  384. package/lib/typescript/src/utils/geoUtils.d.ts +7 -9
  385. package/lib/typescript/src/utils/geoUtils.d.ts.map +1 -1
  386. package/lib/typescript/src/utils/getAnnotationsLayerID.d.ts +1 -1
  387. package/lib/typescript/src/utils/getAnnotationsLayerID.d.ts.map +1 -1
  388. package/lib/typescript/src/utils/index.d.ts.map +1 -1
  389. package/lib/typescript/src/utils/nativeRef.d.ts +1 -1
  390. package/lib/typescript/src/utils/nativeRef.d.ts.map +1 -1
  391. package/lib/typescript/src/utils/styleMap.d.ts.map +1 -1
  392. package/lib/typescript/src/web/MapboxModule.d.ts +24 -0
  393. package/lib/typescript/src/web/MapboxModule.d.ts.map +1 -0
  394. package/lib/typescript/src/web/UnimplementedComponent.d.ts +47 -0
  395. package/lib/typescript/src/web/UnimplementedComponent.d.ts.map +1 -0
  396. package/lib/typescript/src/web/components/Camera.d.ts +1 -1
  397. package/lib/typescript/src/web/components/Camera.d.ts.map +1 -1
  398. package/lib/typescript/src/web/components/MapView.d.ts +1 -1
  399. package/lib/typescript/src/web/components/MarkerView.d.ts +1 -1
  400. package/lib/typescript/src/web/components/MarkerView.d.ts.map +1 -1
  401. package/lib/typescript/src/web/index.d.ts +28 -0
  402. package/lib/typescript/src/web/index.d.ts.map +1 -0
  403. package/lib/typescript/src/web/utils/Logger.d.ts.map +1 -1
  404. package/package.json +141 -97
  405. package/plugin/build/generateCode.js +0 -1
  406. package/plugin/build/withMapbox.js +14 -4
  407. package/plugin/install.md +18 -18
  408. package/plugin/src/generateCode.ts +0 -1
  409. package/plugin/src/withMapbox.ts +24 -4
  410. package/rnmapbox-maps.podspec +20 -4
  411. package/setup-jest.js +1 -0
  412. package/src/Mapbox.native.ts +125 -0
  413. package/src/Mapbox.ts +3 -124
  414. package/src/RNMBXModule.ts +0 -1
  415. package/src/classes/AnimatedRouteCoordinatesArray.js +1 -1
  416. package/src/components/Annotation.tsx +2 -0
  417. package/src/components/Atmosphere.tsx +1 -1
  418. package/src/components/BackgroundLayer.tsx +6 -6
  419. package/src/components/Camera.tsx +29 -16
  420. package/src/components/CircleLayer.tsx +1 -1
  421. package/src/components/CustomLocationProvider.tsx +1 -1
  422. package/src/components/FillExtrusionLayer.tsx +4 -4
  423. package/src/components/FillLayer.tsx +6 -3
  424. package/src/components/HeatmapLayer.tsx +3 -3
  425. package/src/components/Image.tsx +1 -1
  426. package/src/components/ImageSource.tsx +1 -1
  427. package/src/components/Images.tsx +13 -12
  428. package/src/components/Light.tsx +0 -1
  429. package/src/components/LineLayer.tsx +1 -2
  430. package/src/components/LocationPuck.tsx +1 -1
  431. package/src/components/MapView.tsx +8 -4
  432. package/src/components/MarkerView.tsx +3 -3
  433. package/src/components/ModelLayer.tsx +1 -2
  434. package/src/components/Models.tsx +1 -2
  435. package/src/components/RasterDemSource.tsx +3 -3
  436. package/src/components/RasterLayer.tsx +1 -1
  437. package/src/components/RasterSource.tsx +3 -3
  438. package/src/components/ShapeSource.tsx +3 -3
  439. package/src/components/SkyLayer.tsx +2 -2
  440. package/src/components/Style.tsx +4 -4
  441. package/src/components/StyleImport.tsx +1 -1
  442. package/src/components/SymbolLayer.tsx +1 -1
  443. package/src/components/Terrain.tsx +1 -1
  444. package/src/components/UserLocation.tsx +6 -1
  445. package/src/components/VectorSource.tsx +3 -3
  446. package/src/components/Viewport.tsx +2 -0
  447. package/src/components/codeparts/LayerPropsCommon.codepart-tsx +1 -1
  448. package/src/index.native.ts +4 -0
  449. package/src/modules/location/locationManager.ts +34 -23
  450. package/src/modules/offline/offlineManager.ts +7 -8
  451. package/src/modules/offline/offlineManagerLegacy.ts +3 -4
  452. package/src/requestAndroidLocationPermissions.ts +1 -1
  453. package/src/shapeAnimators/ChangeLineOffsetsShapeAnimator.ts +1 -0
  454. package/src/specs/NativeMapViewModule.ts +1 -1
  455. package/src/specs/NativeRNMBXCameraModule.ts +3 -2
  456. package/src/specs/NativeRNMBXChangeLineOffsetsShapeAnimatorModule.ts +2 -0
  457. package/src/specs/NativeRNMBXImageModule.ts +1 -1
  458. package/src/specs/NativeRNMBXLocationModule.ts +21 -21
  459. package/src/specs/NativeRNMBXMovePointShapeAnimatorModule.ts +1 -0
  460. package/src/specs/NativeRNMBXPointAnnotationModule.ts +1 -1
  461. package/src/specs/NativeRNMBXShapeSourceModule.ts +1 -1
  462. package/src/specs/NativeRNMBXTileStoreModule.ts +3 -2
  463. package/src/specs/NativeRNMBXViewportModule.ts +3 -2
  464. package/src/specs/RNMBXAtmosphereNativeComponent.ts +1 -0
  465. package/src/specs/RNMBXBackgroundLayerNativeComponent.ts +2 -0
  466. package/src/specs/RNMBXCalloutNativeComponent.ts +1 -1
  467. package/src/specs/RNMBXCameraNativeComponent.ts +2 -0
  468. package/src/specs/RNMBXCircleLayerNativeComponent.ts +2 -0
  469. package/src/specs/RNMBXCustomLocationProviderNativeComponent.ts +2 -0
  470. package/src/specs/RNMBXFillExtrusionLayerNativeComponent.ts +2 -0
  471. package/src/specs/RNMBXFillLayerNativeComponent.ts +2 -0
  472. package/src/specs/RNMBXHeatmapLayerNativeComponent.ts +2 -0
  473. package/src/specs/RNMBXImageNativeComponent.ts +2 -0
  474. package/src/specs/RNMBXImageSourceNativeComponent.ts +1 -0
  475. package/src/specs/RNMBXImagesNativeComponent.ts +2 -0
  476. package/src/specs/RNMBXLightNativeComponent.ts +1 -0
  477. package/src/specs/RNMBXLineLayerNativeComponent.ts +2 -0
  478. package/src/specs/RNMBXMapViewNativeComponent.ts +2 -0
  479. package/src/specs/RNMBXMarkerViewContentNativeComponent.ts +2 -2
  480. package/src/specs/RNMBXMarkerViewNativeComponent.ts +2 -0
  481. package/src/specs/RNMBXModelLayerNativeComponent.ts +2 -0
  482. package/src/specs/RNMBXModelsNativeComponent.ts +1 -0
  483. package/src/specs/RNMBXNativeUserLocationNativeComponent.ts +1 -0
  484. package/src/specs/RNMBXPointAnnotationNativeComponent.ts +2 -0
  485. package/src/specs/RNMBXRasterDemSourceNativeComponent.ts +2 -0
  486. package/src/specs/RNMBXRasterLayerNativeComponent.ts +2 -0
  487. package/src/specs/RNMBXRasterSourceNativeComponent.ts +2 -0
  488. package/src/specs/RNMBXShapeSourceNativeComponent.ts +2 -0
  489. package/src/specs/RNMBXSkyLayerNativeComponent.ts +2 -0
  490. package/src/specs/RNMBXStyleImportNativeComponent.ts +1 -0
  491. package/src/specs/RNMBXSymbolLayerNativeComponent.ts +2 -0
  492. package/src/specs/RNMBXTerrainNativeComponent.ts +1 -0
  493. package/src/specs/RNMBXVectorSourceNativeComponent.ts +2 -0
  494. package/src/specs/RNMBXViewportNativeComponent.ts +2 -0
  495. package/src/specs/codegenUtils.ts +1 -0
  496. package/src/utils/BridgeValue.ts +1 -1
  497. package/src/utils/Logger.ts +1 -1
  498. package/src/utils/MapboxStyles.d.ts +238 -0
  499. package/src/utils/NativeCommands.ts +2 -4
  500. package/src/utils/geoUtils.ts +3 -0
  501. package/src/utils/index.ts +2 -3
  502. package/src/utils/nativeRef.ts +1 -1
  503. package/src/utils/styleMap.ts +30 -0
  504. package/src/web/MapboxModule.ts +24 -0
  505. package/src/web/components/Camera.tsx +2 -1
  506. package/src/web/components/MarkerView.tsx +2 -2
  507. package/src/web/{index.js → index.tsx} +3 -0
  508. package/src/web/utils/Logger.ts +0 -1
  509. package/android/.classpath +0 -6
  510. package/lib/commonjs/Mapbox.js +0 -456
  511. package/lib/commonjs/Mapbox.js.map +0 -1
  512. package/lib/commonjs/RNMBXModule.js +0 -46
  513. package/lib/commonjs/RNMBXModule.js.map +0 -1
  514. package/lib/commonjs/assets/heading.png +0 -0
  515. package/lib/commonjs/assets/heading@2x.png +0 -0
  516. package/lib/commonjs/assets/heading@3x.png +0 -0
  517. package/lib/commonjs/classes/AnimatedCoordinatesArray.js +0 -164
  518. package/lib/commonjs/classes/AnimatedCoordinatesArray.js.map +0 -1
  519. package/lib/commonjs/classes/AnimatedExtractCoordinateFromArray.js +0 -42
  520. package/lib/commonjs/classes/AnimatedExtractCoordinateFromArray.js.map +0 -1
  521. package/lib/commonjs/classes/AnimatedPoint.js +0 -111
  522. package/lib/commonjs/classes/AnimatedPoint.js.map +0 -1
  523. package/lib/commonjs/classes/AnimatedRouteCoordinatesArray.js +0 -153
  524. package/lib/commonjs/classes/AnimatedRouteCoordinatesArray.js.map +0 -1
  525. package/lib/commonjs/classes/AnimatedShape.js +0 -77
  526. package/lib/commonjs/classes/AnimatedShape.js.map +0 -1
  527. package/lib/commonjs/classes/index.d.js +0 -18
  528. package/lib/commonjs/classes/index.d.js.map +0 -1
  529. package/lib/commonjs/classes/index.js +0 -61
  530. package/lib/commonjs/classes/index.js.map +0 -1
  531. package/lib/commonjs/components/AbstractLayer.js +0 -56
  532. package/lib/commonjs/components/AbstractLayer.js.map +0 -1
  533. package/lib/commonjs/components/AbstractSource.js +0 -20
  534. package/lib/commonjs/components/AbstractSource.js.map +0 -1
  535. package/lib/commonjs/components/Annotation.js +0 -99
  536. package/lib/commonjs/components/Annotation.js.map +0 -1
  537. package/lib/commonjs/components/Atmosphere.js +0 -25
  538. package/lib/commonjs/components/Atmosphere.js.map +0 -1
  539. package/lib/commonjs/components/BackgroundLayer.js +0 -32
  540. package/lib/commonjs/components/BackgroundLayer.js.map +0 -1
  541. package/lib/commonjs/components/Callout.js +0 -95
  542. package/lib/commonjs/components/Callout.js.map +0 -1
  543. package/lib/commonjs/components/Camera.js +0 -389
  544. package/lib/commonjs/components/Camera.js.map +0 -1
  545. package/lib/commonjs/components/CircleLayer.js +0 -43
  546. package/lib/commonjs/components/CircleLayer.js.map +0 -1
  547. package/lib/commonjs/components/CustomLocationProvider.js +0 -18
  548. package/lib/commonjs/components/CustomLocationProvider.js.map +0 -1
  549. package/lib/commonjs/components/FillExtrusionLayer.js +0 -36
  550. package/lib/commonjs/components/FillExtrusionLayer.js.map +0 -1
  551. package/lib/commonjs/components/FillLayer.js +0 -42
  552. package/lib/commonjs/components/FillLayer.js.map +0 -1
  553. package/lib/commonjs/components/HeadingIndicator.js +0 -39
  554. package/lib/commonjs/components/HeadingIndicator.js.map +0 -1
  555. package/lib/commonjs/components/HeatmapLayer.js +0 -43
  556. package/lib/commonjs/components/HeatmapLayer.js.map +0 -1
  557. package/lib/commonjs/components/Image.js +0 -47
  558. package/lib/commonjs/components/Image.js.map +0 -1
  559. package/lib/commonjs/components/ImageSource.js +0 -51
  560. package/lib/commonjs/components/ImageSource.js.map +0 -1
  561. package/lib/commonjs/components/Images.js +0 -110
  562. package/lib/commonjs/components/Images.js.map +0 -1
  563. package/lib/commonjs/components/Light.js +0 -45
  564. package/lib/commonjs/components/Light.js.map +0 -1
  565. package/lib/commonjs/components/LineLayer.js +0 -42
  566. package/lib/commonjs/components/LineLayer.js.map +0 -1
  567. package/lib/commonjs/components/LocationPuck.js +0 -68
  568. package/lib/commonjs/components/LocationPuck.js.map +0 -1
  569. package/lib/commonjs/components/MapView.js +0 -649
  570. package/lib/commonjs/components/MapView.js.map +0 -1
  571. package/lib/commonjs/components/MarkerView.js +0 -102
  572. package/lib/commonjs/components/MarkerView.js.map +0 -1
  573. package/lib/commonjs/components/ModelLayer.js +0 -38
  574. package/lib/commonjs/components/ModelLayer.js.map +0 -1
  575. package/lib/commonjs/components/Models.js +0 -44
  576. package/lib/commonjs/components/Models.js.map +0 -1
  577. package/lib/commonjs/components/NativeBridgeComponent.js +0 -41
  578. package/lib/commonjs/components/NativeBridgeComponent.js.map +0 -1
  579. package/lib/commonjs/components/PointAnnotation.js +0 -140
  580. package/lib/commonjs/components/PointAnnotation.js.map +0 -1
  581. package/lib/commonjs/components/RasterDemSource.js +0 -64
  582. package/lib/commonjs/components/RasterDemSource.js.map +0 -1
  583. package/lib/commonjs/components/RasterLayer.js +0 -39
  584. package/lib/commonjs/components/RasterLayer.js.map +0 -1
  585. package/lib/commonjs/components/RasterSource.js +0 -71
  586. package/lib/commonjs/components/RasterSource.js.map +0 -1
  587. package/lib/commonjs/components/ShapeSource.js +0 -163
  588. package/lib/commonjs/components/ShapeSource.js.map +0 -1
  589. package/lib/commonjs/components/SkyLayer.js +0 -31
  590. package/lib/commonjs/components/SkyLayer.js.map +0 -1
  591. package/lib/commonjs/components/Style.js +0 -265
  592. package/lib/commonjs/components/Style.js.map +0 -1
  593. package/lib/commonjs/components/StyleImport.js +0 -22
  594. package/lib/commonjs/components/StyleImport.js.map +0 -1
  595. package/lib/commonjs/components/SymbolLayer.js +0 -64
  596. package/lib/commonjs/components/SymbolLayer.js.map +0 -1
  597. package/lib/commonjs/components/Terrain.js +0 -35
  598. package/lib/commonjs/components/Terrain.js.map +0 -1
  599. package/lib/commonjs/components/UserLocation.js +0 -210
  600. package/lib/commonjs/components/UserLocation.js.map +0 -1
  601. package/lib/commonjs/components/VectorSource.js +0 -97
  602. package/lib/commonjs/components/VectorSource.js.map +0 -1
  603. package/lib/commonjs/components/Viewport.js +0 -64
  604. package/lib/commonjs/components/Viewport.js.map +0 -1
  605. package/lib/commonjs/components/codeparts/LayerPropsCommon.codepart-tsx +0 -62
  606. package/lib/commonjs/global.d.js +0 -2
  607. package/lib/commonjs/global.d.js.map +0 -1
  608. package/lib/commonjs/index.js +0 -22
  609. package/lib/commonjs/index.js.map +0 -1
  610. package/lib/commonjs/index.web.js +0 -26
  611. package/lib/commonjs/index.web.js.map +0 -1
  612. package/lib/commonjs/modules/location/locationManager.js +0 -155
  613. package/lib/commonjs/modules/location/locationManager.js.map +0 -1
  614. package/lib/commonjs/modules/offline/OfflineCreatePackOptions.js +0 -43
  615. package/lib/commonjs/modules/offline/OfflineCreatePackOptions.js.map +0 -1
  616. package/lib/commonjs/modules/offline/OfflinePack.js +0 -40
  617. package/lib/commonjs/modules/offline/OfflinePack.js.map +0 -1
  618. package/lib/commonjs/modules/offline/OfflinePackLegacy.js +0 -40
  619. package/lib/commonjs/modules/offline/OfflinePackLegacy.js.map +0 -1
  620. package/lib/commonjs/modules/offline/TileStore.js +0 -46
  621. package/lib/commonjs/modules/offline/TileStore.js.map +0 -1
  622. package/lib/commonjs/modules/offline/offlineManager.js +0 -373
  623. package/lib/commonjs/modules/offline/offlineManager.js.map +0 -1
  624. package/lib/commonjs/modules/offline/offlineManagerLegacy.js +0 -166
  625. package/lib/commonjs/modules/offline/offlineManagerLegacy.js.map +0 -1
  626. package/lib/commonjs/modules/snapshot/SnapshotOptions.js +0 -58
  627. package/lib/commonjs/modules/snapshot/SnapshotOptions.js.map +0 -1
  628. package/lib/commonjs/modules/snapshot/snapshotManager.js +0 -66
  629. package/lib/commonjs/modules/snapshot/snapshotManager.js.map +0 -1
  630. package/lib/commonjs/package.json +0 -1
  631. package/lib/commonjs/requestAndroidLocationPermissions.js +0 -25
  632. package/lib/commonjs/requestAndroidLocationPermissions.js.map +0 -1
  633. package/lib/commonjs/shapeAnimators/ChangeLineOffsetsShapeAnimator.js +0 -27
  634. package/lib/commonjs/shapeAnimators/ChangeLineOffsetsShapeAnimator.js.map +0 -1
  635. package/lib/commonjs/shapeAnimators/MovePointShapeAnimator.js +0 -21
  636. package/lib/commonjs/shapeAnimators/MovePointShapeAnimator.js.map +0 -1
  637. package/lib/commonjs/shapeAnimators/ShapeAnimatorManager.js +0 -15
  638. package/lib/commonjs/shapeAnimators/ShapeAnimatorManager.js.map +0 -1
  639. package/lib/commonjs/shapeAnimators/index.js +0 -2
  640. package/lib/commonjs/shapeAnimators/index.js.map +0 -1
  641. package/lib/commonjs/specs/NativeMapViewModule.js +0 -10
  642. package/lib/commonjs/specs/NativeMapViewModule.js.map +0 -1
  643. package/lib/commonjs/specs/NativeRNMBXCameraModule.js +0 -10
  644. package/lib/commonjs/specs/NativeRNMBXCameraModule.js.map +0 -1
  645. package/lib/commonjs/specs/NativeRNMBXChangeLineOffsetsShapeAnimatorModule.js +0 -10
  646. package/lib/commonjs/specs/NativeRNMBXChangeLineOffsetsShapeAnimatorModule.js.map +0 -1
  647. package/lib/commonjs/specs/NativeRNMBXImageModule.js +0 -10
  648. package/lib/commonjs/specs/NativeRNMBXImageModule.js.map +0 -1
  649. package/lib/commonjs/specs/NativeRNMBXLocationModule.js +0 -9
  650. package/lib/commonjs/specs/NativeRNMBXLocationModule.js.map +0 -1
  651. package/lib/commonjs/specs/NativeRNMBXMovePointShapeAnimatorModule.js +0 -10
  652. package/lib/commonjs/specs/NativeRNMBXMovePointShapeAnimatorModule.js.map +0 -1
  653. package/lib/commonjs/specs/NativeRNMBXPointAnnotationModule.js +0 -10
  654. package/lib/commonjs/specs/NativeRNMBXPointAnnotationModule.js.map +0 -1
  655. package/lib/commonjs/specs/NativeRNMBXShapeSourceModule.js +0 -10
  656. package/lib/commonjs/specs/NativeRNMBXShapeSourceModule.js.map +0 -1
  657. package/lib/commonjs/specs/NativeRNMBXTileStoreModule.js +0 -11
  658. package/lib/commonjs/specs/NativeRNMBXTileStoreModule.js.map +0 -1
  659. package/lib/commonjs/specs/NativeRNMBXViewportModule.js +0 -10
  660. package/lib/commonjs/specs/NativeRNMBXViewportModule.js.map +0 -1
  661. package/lib/commonjs/specs/RNMBXAtmosphereNativeComponent.ts +0 -12
  662. package/lib/commonjs/specs/RNMBXBackgroundLayerNativeComponent.ts +0 -27
  663. package/lib/commonjs/specs/RNMBXCalloutNativeComponent.ts +0 -9
  664. package/lib/commonjs/specs/RNMBXCameraNativeComponent.ts +0 -46
  665. package/lib/commonjs/specs/RNMBXCircleLayerNativeComponent.ts +0 -37
  666. package/lib/commonjs/specs/RNMBXCustomLocationProviderNativeComponent.ts +0 -19
  667. package/lib/commonjs/specs/RNMBXFillExtrusionLayerNativeComponent.ts +0 -28
  668. package/lib/commonjs/specs/RNMBXFillLayerNativeComponent.ts +0 -37
  669. package/lib/commonjs/specs/RNMBXHeatmapLayerNativeComponent.ts +0 -37
  670. package/lib/commonjs/specs/RNMBXImageNativeComponent.ts +0 -18
  671. package/lib/commonjs/specs/RNMBXImageSourceNativeComponent.ts +0 -15
  672. package/lib/commonjs/specs/RNMBXImagesNativeComponent.ts +0 -21
  673. package/lib/commonjs/specs/RNMBXLightNativeComponent.ts +0 -12
  674. package/lib/commonjs/specs/RNMBXLineLayerNativeComponent.ts +0 -37
  675. package/lib/commonjs/specs/RNMBXMapViewNativeComponent.ts +0 -141
  676. package/lib/commonjs/specs/RNMBXMarkerViewContentNativeComponent.ts +0 -9
  677. package/lib/commonjs/specs/RNMBXMarkerViewNativeComponent.ts +0 -24
  678. package/lib/commonjs/specs/RNMBXModelLayerNativeComponent.ts +0 -38
  679. package/lib/commonjs/specs/RNMBXModelsNativeComponent.ts +0 -18
  680. package/lib/commonjs/specs/RNMBXNativeUserLocationNativeComponent.ts +0 -39
  681. package/lib/commonjs/specs/RNMBXPointAnnotationNativeComponent.ts +0 -40
  682. package/lib/commonjs/specs/RNMBXRasterDemSourceNativeComponent.ts +0 -19
  683. package/lib/commonjs/specs/RNMBXRasterLayerNativeComponent.ts +0 -37
  684. package/lib/commonjs/specs/RNMBXRasterSourceNativeComponent.ts +0 -22
  685. package/lib/commonjs/specs/RNMBXShapeSourceNativeComponent.ts +0 -33
  686. package/lib/commonjs/specs/RNMBXSkyLayerNativeComponent.ts +0 -27
  687. package/lib/commonjs/specs/RNMBXStyleImportNativeComponent.ts +0 -14
  688. package/lib/commonjs/specs/RNMBXSymbolLayerNativeComponent.ts +0 -37
  689. package/lib/commonjs/specs/RNMBXTerrainNativeComponent.ts +0 -13
  690. package/lib/commonjs/specs/RNMBXVectorSourceNativeComponent.ts +0 -28
  691. package/lib/commonjs/specs/RNMBXViewportNativeComponent.ts +0 -117
  692. package/lib/commonjs/specs/codegenUtils.js +0 -6
  693. package/lib/commonjs/specs/codegenUtils.js.map +0 -1
  694. package/lib/commonjs/specs/codeparts/CommonLayerNativeComponentsProps.codepart-ts +0 -18
  695. package/lib/commonjs/types/BaseProps.js +0 -2
  696. package/lib/commonjs/types/BaseProps.js.map +0 -1
  697. package/lib/commonjs/types/OnPressEvent.js +0 -2
  698. package/lib/commonjs/types/OnPressEvent.js.map +0 -1
  699. package/lib/commonjs/types/Position.js +0 -2
  700. package/lib/commonjs/types/Position.js.map +0 -1
  701. package/lib/commonjs/types/index.js +0 -6
  702. package/lib/commonjs/types/index.js.map +0 -1
  703. package/lib/commonjs/utils/BridgeValue.js +0 -64
  704. package/lib/commonjs/utils/BridgeValue.js.map +0 -1
  705. package/lib/commonjs/utils/Logger.js +0 -122
  706. package/lib/commonjs/utils/Logger.js.map +0 -1
  707. package/lib/commonjs/utils/MapboxStyles.d.js +0 -282
  708. package/lib/commonjs/utils/MapboxStyles.d.js.map +0 -1
  709. package/lib/commonjs/utils/NativeCommands.js +0 -50
  710. package/lib/commonjs/utils/NativeCommands.js.map +0 -1
  711. package/lib/commonjs/utils/StyleValue.js +0 -44
  712. package/lib/commonjs/utils/StyleValue.js.map +0 -1
  713. package/lib/commonjs/utils/animated/Animated.js +0 -32
  714. package/lib/commonjs/utils/animated/Animated.js.map +0 -1
  715. package/lib/commonjs/utils/checkRequiredProps.js +0 -14
  716. package/lib/commonjs/utils/checkRequiredProps.js.map +0 -1
  717. package/lib/commonjs/utils/deprecation.js +0 -39
  718. package/lib/commonjs/utils/deprecation.js.map +0 -1
  719. package/lib/commonjs/utils/filterUtils.js +0 -13
  720. package/lib/commonjs/utils/filterUtils.js.map +0 -1
  721. package/lib/commonjs/utils/geoUtils.js +0 -32
  722. package/lib/commonjs/utils/geoUtils.js.map +0 -1
  723. package/lib/commonjs/utils/getAnnotationsLayerID.js +0 -21
  724. package/lib/commonjs/utils/getAnnotationsLayerID.js.map +0 -1
  725. package/lib/commonjs/utils/index.js +0 -91
  726. package/lib/commonjs/utils/index.js.map +0 -1
  727. package/lib/commonjs/utils/nativeRef.js +0 -27
  728. package/lib/commonjs/utils/nativeRef.js.map +0 -1
  729. package/lib/commonjs/utils/styleMap.js +0 -343
  730. package/lib/commonjs/utils/styleMap.js.map +0 -1
  731. package/lib/commonjs/web/MapContext.js +0 -11
  732. package/lib/commonjs/web/MapContext.js.map +0 -1
  733. package/lib/commonjs/web/MapboxModule.js +0 -20
  734. package/lib/commonjs/web/MapboxModule.js.map +0 -1
  735. package/lib/commonjs/web/UnimplementedComponent.js +0 -18
  736. package/lib/commonjs/web/UnimplementedComponent.js.map +0 -1
  737. package/lib/commonjs/web/components/Camera.js +0 -185
  738. package/lib/commonjs/web/components/Camera.js.map +0 -1
  739. package/lib/commonjs/web/components/MapView.js +0 -67
  740. package/lib/commonjs/web/components/MapView.js.map +0 -1
  741. package/lib/commonjs/web/components/MarkerView.js +0 -63
  742. package/lib/commonjs/web/components/MarkerView.js.map +0 -1
  743. package/lib/commonjs/web/index.js +0 -49
  744. package/lib/commonjs/web/index.js.map +0 -1
  745. package/lib/commonjs/web/install.md +0 -25
  746. package/lib/commonjs/web/utils/Logger.js +0 -97
  747. package/lib/commonjs/web/utils/Logger.js.map +0 -1
  748. package/lib/module/index.web.js +0 -5
  749. package/lib/module/index.web.js.map +0 -1
  750. package/src/index.web.js +0 -2
  751. package/src/web/MapboxModule.js +0 -16
@@ -1,373 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "OfflineCreatePackOptions", {
7
- enumerable: true,
8
- get: function () {
9
- return _OfflineCreatePackOptions.default;
10
- }
11
- });
12
- exports.default = exports.OfflineModuleEventEmitter = void 0;
13
- var _reactNative = require("react-native");
14
- var _utils = require("../../utils");
15
- var _OfflineCreatePackOptions = _interopRequireDefault(require("./OfflineCreatePackOptions"));
16
- var _OfflinePack = _interopRequireDefault(require("./OfflinePack"));
17
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
18
- const {
19
- RNMBXModule
20
- } = _reactNative.NativeModules;
21
- const MapboxOfflineManager = _reactNative.NativeModules.RNMBXOfflineModule;
22
- const OfflineModuleEventEmitter = exports.OfflineModuleEventEmitter = new _reactNative.NativeEventEmitter(MapboxOfflineManager);
23
- /**
24
- * OfflineManager implements a singleton (shared object) that manages offline packs.
25
- * All of this class’s instance methods are asynchronous, reflecting the fact that offline resources are stored in a database.
26
- * The shared object maintains a canonical collection of offline packs.
27
- */
28
- class OfflineManager {
29
- constructor() {
30
- this._hasInitialized = false;
31
- this._offlinePacks = {};
32
- this._progressListeners = {};
33
- this._errorListeners = {};
34
- this._onProgress = this._onProgress.bind(this);
35
- this._onError = this._onError.bind(this);
36
- this.subscriptionProgress = null;
37
- this.subscriptionError = null;
38
- }
39
-
40
- /**
41
- * Creates and registers an offline pack that downloads the resources needed to use the given region offline.
42
- *
43
- * @example
44
- *
45
- * const progressListener = (offlineRegion, status) => console.log(offlineRegion, status);
46
- * const errorListener = (offlineRegion, err) => console.log(offlineRegion, err);
47
- *
48
- * await Mapbox.offlineManager.createPack({
49
- * name: 'offlinePack',
50
- * styleURL: 'mapbox://...',
51
- * minZoom: 14,
52
- * maxZoom: 20,
53
- * bounds: [[neLng, neLat], [swLng, swLat]]
54
- * }, progressListener, errorListener)
55
- *
56
- * @param {OfflineCreatePackOptions} options Create options for a offline pack that specifices zoom levels, style url, and the region to download.
57
- * @param {Callback=} progressListener Callback that listens for status events while downloading the offline resource.
58
- * @param {Callback=} errorListener Callback that listens for status events while downloading the offline resource.
59
- * @return {void}
60
- */
61
- async createPack(options, progressListener, errorListener) {
62
- await this._initialize();
63
- const packOptions = new _OfflineCreatePackOptions.default(options);
64
- if (this._offlinePacks[packOptions.name]) {
65
- throw new Error(`Offline pack with name ${packOptions.name} already exists.`);
66
- }
67
- this.subscribe(packOptions.name, progressListener, errorListener);
68
- const nativeOfflinePack = await MapboxOfflineManager.createPack(packOptions);
69
- this._offlinePacks[packOptions.name] = new _OfflinePack.default(nativeOfflinePack);
70
- }
71
-
72
- /**
73
- * Invalidates the specified offline pack. This method checks that the tiles in the specified offline pack match those from the server. Local tiles that do not match the latest version on the server are updated.
74
- *
75
- * This is more efficient than deleting the offline pack and downloading it again. If the data stored locally matches that on the server, new data will not be downloaded.
76
- *
77
- * @example
78
- * await Mapbox.offlineManager.invalidatePack('packName')
79
- *
80
- * @param {String} name Name of the offline pack.
81
- * @return {void}
82
- */
83
- async invalidatePack(name) {
84
- if (!name) {
85
- return;
86
- }
87
- await this._initialize();
88
- const offlinePack = this._offlinePacks[name];
89
- if (offlinePack) {
90
- await MapboxOfflineManager.invalidatePack(name);
91
- }
92
- }
93
-
94
- /**
95
- * Unregisters the given offline pack and allows resources that are no longer required by any remaining packs to be potentially freed.
96
- *
97
- * @example
98
- * await Mapbox.offlineManager.deletePack('packName')
99
- *
100
- * @param {String} name Name of the offline pack.
101
- * @return {void}
102
- */
103
- async deletePack(name) {
104
- if (!name) {
105
- return;
106
- }
107
- await this._initialize();
108
- const offlinePack = this._offlinePacks[name];
109
- if (offlinePack) {
110
- await MapboxOfflineManager.deletePack(name);
111
- delete this._offlinePacks[name];
112
- }
113
- }
114
-
115
- /**
116
- * Forces a revalidation of the tiles in the ambient cache and downloads a fresh version of the tiles from the tile server.
117
- * This is the recommend method for clearing the cache.
118
- * This is the most efficient method because tiles in the ambient cache are re-downloaded to remove outdated data from a device.
119
- * It does not erase resources from the ambient cache or delete the database, which can be computationally expensive operations that may carry unintended side effects.
120
- *
121
- * @deprecated Not implemented in v10
122
- *
123
- * @example
124
- * await Mapbox.offlineManager.invalidateAmbientCache();
125
- *
126
- * @return {void}
127
- */
128
- async invalidateAmbientCache() {
129
- if (RNMBXModule.MapboxV10) {
130
- console.warn('RNMapbox: invalidateAmbientCache is not implemented on v10');
131
- return;
132
- }
133
- await this._initialize();
134
- await MapboxOfflineManager.invalidateAmbientCache();
135
- }
136
-
137
- /**
138
- * Erases resources from the ambient cache.
139
- * This method clears the cache and decreases the amount of space that map resources take up on the device.
140
- *
141
- * @deprecated Not implemented in v10
142
- *
143
- * @example
144
- * await Mapbox.offlineManager.clearAmbientCache();
145
- *
146
- * @return {void}
147
- */
148
- async clearAmbientCache() {
149
- if (RNMBXModule.MapboxV10) {
150
- console.warn('RNMapbox: clearAmbientCache is not implemented on v10');
151
- return;
152
- }
153
- await this._initialize();
154
- await MapboxOfflineManager.clearAmbientCache();
155
- }
156
-
157
- /**
158
- * Migrates the offline cache from pre-v10 SDKs to the new v10 cache location
159
- *
160
- * @example
161
- * await Mapbox.offlineManager.migrateOfflineCache()
162
- *
163
- * @return {void}
164
- */
165
- async migrateOfflineCache() {
166
- await MapboxOfflineManager.migrateOfflineCache();
167
- }
168
-
169
- /**
170
- * Sets the maximum size of the ambient cache in bytes. Disables the ambient cache if set to 0.
171
- * This method may be computationally expensive because it will erase resources from the ambient cache if its size is decreased.
172
- *
173
- * @example
174
- * await Mapbox.offlineManager.setMaximumAmbientCacheSize(5000000);
175
- *
176
- * @param {Number} size Size of ambient cache.
177
- * @return {void}
178
- */
179
- async setMaximumAmbientCacheSize(size) {
180
- await this._initialize();
181
- await MapboxOfflineManager.setMaximumAmbientCacheSize(size);
182
- }
183
-
184
- /**
185
- * Deletes the existing database, which includes both the ambient cache and offline packs, then reinitializes it.
186
- *
187
- * @example
188
- * await Mapbox.offlineManager.resetDatabase();
189
- *
190
- * @return {void}
191
- */
192
- async resetDatabase() {
193
- await MapboxOfflineManager.resetDatabase();
194
- this._offlinePacks = {};
195
- await this._initialize(true);
196
- }
197
-
198
- /**
199
- * Retrieves all the current offline packs that are stored in the database.
200
- *
201
- * @example
202
- * const offlinePacks = await Mapbox.offlineManager.getPacks();
203
- *
204
- * @return {Array<OfflinePack>}
205
- */
206
- async getPacks() {
207
- await this._initialize(true);
208
- return Object.keys(this._offlinePacks).map(name => this._offlinePacks[name]);
209
- }
210
-
211
- /**
212
- * Retrieves an offline pack that is stored in the database by name.
213
- *
214
- * @example
215
- * const offlinePack = await Mapbox.offlineManager.getPack();
216
- *
217
- * @param {String} name Name of the offline pack.
218
- * @return {OfflinePack}
219
- */
220
- async getPack(name) {
221
- await this._initialize(true);
222
- return this._offlinePacks[name];
223
- }
224
-
225
- /**
226
- * Sideloads offline db
227
- *
228
- * @example
229
- * await Mapbox.offlineManager.mergeOfflineRegions(path);
230
- *
231
- * @param {String} path Path to offline tile db on file system.
232
- * @return {void}
233
- */
234
- async mergeOfflineRegions(path) {
235
- await this._initialize();
236
- return MapboxOfflineManager.mergeOfflineRegions(path);
237
- }
238
-
239
- /**
240
- * Sets the maximum number of Mapbox-hosted tiles that may be downloaded and stored on the current device.
241
- * The Mapbox Terms of Service prohibit changing or bypassing this limit without permission from Mapbox.
242
- *
243
- * @example
244
- * Mapbox.offlineManager.setTileCountLimit(1000);
245
- *
246
- * @param {Number} limit Map tile limit count.
247
- * @return {void}
248
- */
249
- setTileCountLimit(limit) {
250
- MapboxOfflineManager.setTileCountLimit(limit);
251
- }
252
-
253
- /**
254
- * Sets the period at which download status events will be sent over the React Native bridge.
255
- * The default is 300ms.
256
- *
257
- * @example
258
- * Mapbox.offlineManager.setProgressEventThrottle(500);
259
- *
260
- * @param {Number} throttleValue event throttle value in ms.
261
- * @return {void}
262
- */
263
- setProgressEventThrottle(throttleValue) {
264
- MapboxOfflineManager.setProgressEventThrottle(throttleValue);
265
- }
266
-
267
- /**
268
- * Subscribe to download status/error events for the requested offline pack.
269
- * Note that createPack calls this internally if listeners are provided.
270
- *
271
- * @example
272
- * const progressListener = (offlinePack, status) => console.log(offlinePack, status)
273
- * const errorListener = (offlinePack, err) => console.log(offlinePack, err)
274
- * Mapbox.offlineManager.subscribe('packName', progressListener, errorListener)
275
- *
276
- * @param {String} packName Name of the offline pack.
277
- * @param {Callback} progressListener Callback that listens for status events while downloading the offline resource.
278
- * @param {Callback} errorListener Callback that listens for status events while downloading the offline resource.
279
- * @return {void}
280
- */
281
- async subscribe(packName, progressListener, errorListener) {
282
- const totalProgressListeners = Object.keys(this._progressListeners).length;
283
- if ((0, _utils.isFunction)(progressListener)) {
284
- if (totalProgressListeners === 0) {
285
- this.subscriptionProgress = OfflineModuleEventEmitter.addListener(RNMBXModule.OfflineCallbackName.Progress, this._onProgress);
286
- }
287
- this._progressListeners[packName] = progressListener;
288
- }
289
- const totalErrorListeners = Object.keys(this._errorListeners).length;
290
- if ((0, _utils.isFunction)(errorListener)) {
291
- if (totalErrorListeners === 0) {
292
- this.subscriptionError = OfflineModuleEventEmitter.addListener(RNMBXModule.OfflineCallbackName.Error, this._onError);
293
- }
294
- this._errorListeners[packName] = errorListener;
295
- }
296
-
297
- // we need to manually set the pack observer on Android
298
- // if we're resuming a pack download instead of going thru the create flow
299
- if ((0, _utils.isAndroid)() && this._offlinePacks[packName]) {
300
- try {
301
- // manually set a listener, since listeners are only set on create flow
302
- await MapboxOfflineManager.setPackObserver(packName);
303
- } catch (e) {
304
- console.log('Unable to set pack observer', e);
305
- }
306
- }
307
- }
308
-
309
- /**
310
- * Unsubscribes any listeners associated with the offline pack.
311
- * It's a good idea to call this on componentWillUnmount.
312
- *
313
- * @example
314
- * Mapbox.offlineManager.unsubscribe('packName')
315
- *
316
- * @param {String} packName Name of the offline pack.
317
- * @return {void}
318
- */
319
- unsubscribe(packName) {
320
- delete this._progressListeners[packName];
321
- delete this._errorListeners[packName];
322
- if (Object.keys(this._progressListeners).length === 0 && this.subscriptionProgress) {
323
- this.subscriptionProgress.remove();
324
- }
325
- if (Object.keys(this._errorListeners).length === 0 && this.subscriptionError) {
326
- this.subscriptionError.remove();
327
- }
328
- }
329
- async _initialize(forceInit) {
330
- if (this._hasInitialized && !forceInit) {
331
- return true;
332
- }
333
- const nativeOfflinePacks = await MapboxOfflineManager.getPacks();
334
- for (const nativeOfflinePack of nativeOfflinePacks) {
335
- const offlinePack = new _OfflinePack.default(nativeOfflinePack);
336
- this._offlinePacks[offlinePack.name] = offlinePack;
337
- }
338
- this._hasInitialized = true;
339
- return true;
340
- }
341
- _onProgress(e) {
342
- const {
343
- name,
344
- state
345
- } = e.payload;
346
- if (!this._hasListeners(name, this._progressListeners)) {
347
- return;
348
- }
349
- const pack = this._offlinePacks[name];
350
- this._progressListeners[name](pack, e.payload);
351
-
352
- // cleanup listeners now that they are no longer needed
353
- if (state === RNMBXModule.OfflinePackDownloadState.Complete) {
354
- this.unsubscribe(name);
355
- }
356
- }
357
- _onError(e) {
358
- const {
359
- name
360
- } = e.payload;
361
- if (!this._hasListeners(name, this._errorListeners)) {
362
- return;
363
- }
364
- const pack = this._offlinePacks[name];
365
- this._errorListeners[name](pack, e.payload);
366
- }
367
- _hasListeners(name, listenerMap) {
368
- return !(0, _utils.isUndefined)(this._offlinePacks[name]) && (0, _utils.isFunction)(listenerMap[name]);
369
- }
370
- }
371
- const offlineManager = new OfflineManager();
372
- var _default = exports.default = offlineManager;
373
- //# sourceMappingURL=offlineManager.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNative","require","_utils","_OfflineCreatePackOptions","_interopRequireDefault","_OfflinePack","e","__esModule","default","RNMBXModule","NativeModules","MapboxOfflineManager","RNMBXOfflineModule","OfflineModuleEventEmitter","exports","NativeEventEmitter","OfflineManager","constructor","_hasInitialized","_offlinePacks","_progressListeners","_errorListeners","_onProgress","bind","_onError","subscriptionProgress","subscriptionError","createPack","options","progressListener","errorListener","_initialize","packOptions","OfflineCreatePackOptions","name","Error","subscribe","nativeOfflinePack","OfflinePack","invalidatePack","offlinePack","deletePack","invalidateAmbientCache","MapboxV10","console","warn","clearAmbientCache","migrateOfflineCache","setMaximumAmbientCacheSize","size","resetDatabase","getPacks","Object","keys","map","getPack","mergeOfflineRegions","path","setTileCountLimit","limit","setProgressEventThrottle","throttleValue","packName","totalProgressListeners","length","isFunction","addListener","OfflineCallbackName","Progress","totalErrorListeners","isAndroid","setPackObserver","log","unsubscribe","remove","forceInit","nativeOfflinePacks","state","payload","_hasListeners","pack","OfflinePackDownloadState","Complete","listenerMap","isUndefined","offlineManager","_default"],"sourceRoot":"../../../../src","sources":["modules/offline/offlineManager.ts"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAMA,IAAAC,MAAA,GAAAD,OAAA;AAEA,IAAAE,yBAAA,GAAAC,sBAAA,CAAAH,OAAA;AAOA,IAAAI,YAAA,GAAAD,sBAAA,CAAAH,OAAA;AAAwC,SAAAG,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,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IAAA+B,iBAAU,EAACkB,WAAW,CAACjD,IAAI,CAAC,CAAC;EAE3E;AACF;AAEA,MAAMmD,cAAc,GAAG,IAAIrE,cAAc,CAAC,CAAC;AAAC,IAAAsE,QAAA,GAAAxE,OAAA,CAAAN,OAAA,GAC7B6E,cAAc","ignoreList":[]}
@@ -1,166 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "OfflineCreatePackOptions", {
7
- enumerable: true,
8
- get: function () {
9
- return _OfflineCreatePackOptions.default;
10
- }
11
- });
12
- exports.default = void 0;
13
- var _reactNative = require("react-native");
14
- var _OfflineCreatePackOptions = _interopRequireDefault(require("./OfflineCreatePackOptions"));
15
- var _OfflinePackLegacy = _interopRequireDefault(require("./OfflinePackLegacy"));
16
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
17
- const MapboxOfflineManager = _reactNative.NativeModules.RNMBXOfflineModuleLegacy;
18
-
19
- /**
20
- * OfflineManagerLegacy implements a singleton (shared object) that manages offline packs.
21
- * All of this class’s instance methods are asynchronous, reflecting the fact that offline resources are stored in a database.
22
- * The shared object maintains a canonical collection of offline packs.
23
- */
24
- class OfflineManagerLegacy {
25
- constructor() {
26
- this._hasInitialized = false;
27
- this._offlinePacks = {};
28
- }
29
-
30
- /**
31
- * Creates and registers an offline pack that downloads the resources needed to use the given region offline.
32
- *
33
- * @example
34
- *
35
- * await Mapbox.offlineManager.createPack({
36
- * name: 'offlinePack',
37
- * styleURL: 'mapbox://...',
38
- * minZoom: 14,
39
- * maxZoom: 20,
40
- * bounds: [[neLng, neLat], [swLng, swLat]]
41
- * })
42
- *
43
- * @param {OfflineCreatePackOptions} options Create options for a offline pack that specifices zoom levels, style url, and the region to download.
44
- * @return {void}
45
- */
46
- async createPack(options) {
47
- await this._initialize();
48
- const packOptions = new _OfflineCreatePackOptions.default(options);
49
- if (this._offlinePacks[packOptions.name]) {
50
- throw new Error(`Offline pack with name ${packOptions.name} already exists.`);
51
- }
52
- const nativeOfflinePack = await MapboxOfflineManager.createPack(packOptions);
53
- this._offlinePacks[packOptions.name] = new _OfflinePackLegacy.default(nativeOfflinePack);
54
- }
55
-
56
- /**
57
- * Invalidates the specified offline pack. This method checks that the tiles in the specified offline pack match those from the server. Local tiles that do not match the latest version on the server are updated.
58
- *
59
- * This is more efficient than deleting the offline pack and downloading it again. If the data stored locally matches that on the server, new data will not be downloaded.
60
- *
61
- * @example
62
- * await Mapbox.offlineManagerLegacy.invalidatePack('packName')
63
- *
64
- * @param {String} name Name of the offline pack.
65
- * @return {void}
66
- */
67
- async invalidatePack(name) {
68
- if (!name) {
69
- return;
70
- }
71
- await this._initialize();
72
- const offlinePack = this._offlinePacks[name];
73
- if (offlinePack) {
74
- await MapboxOfflineManager.invalidatePack(name);
75
- }
76
- }
77
-
78
- /**
79
- * Unregisters the given offline pack and allows resources that are no longer required by any remaining packs to be potentially freed.
80
- *
81
- * @example
82
- * await Mapbox.offlineManagerLegacy.deletePack('packName')
83
- *
84
- * @param {String} name Name of the offline pack.
85
- * @return {void}
86
- */
87
- async deletePack(name) {
88
- if (!name) {
89
- return;
90
- }
91
- await this._initialize();
92
- const offlinePack = this._offlinePacks[name];
93
- if (offlinePack) {
94
- await MapboxOfflineManager.deletePack(name);
95
- delete this._offlinePacks[name];
96
- }
97
- }
98
-
99
- /**
100
- * Migrates the offline cache from pre-v10 SDKs to the new v10 cache location
101
- *
102
- * @example
103
- * await Mapbox.offlineManager.migrateOfflineCache()
104
- *
105
- * @return {void}
106
- */
107
- async migrateOfflineCache() {
108
- await MapboxOfflineManager.migrateOfflineCache();
109
- }
110
-
111
- /**
112
- * Deletes the existing database, which includes both the ambient cache and offline packs, then reinitializes it.
113
- *
114
- * @example
115
- * await Mapbox.offlineManager.resetDatabase();
116
- *
117
- * @return {void}
118
- */
119
- async resetDatabase() {
120
- await MapboxOfflineManager.resetDatabase();
121
- this._offlinePacks = {};
122
- await this._initialize(true);
123
- }
124
-
125
- /**
126
- * Retrieves all the current offline packs that are stored in the database.
127
- *
128
- * @example
129
- * const offlinePacks = await Mapbox.offlineManagerLegacy.getPacks();
130
- *
131
- * @return {Array<OfflinePack>}
132
- */
133
- async getPacks() {
134
- await this._initialize();
135
- return Object.keys(this._offlinePacks).map(name => this._offlinePacks[name]);
136
- }
137
-
138
- /**
139
- * Retrieves an offline pack that is stored in the database by name.
140
- *
141
- * @example
142
- * const offlinePack = await Mapbox.offlineManagerLegacy.getPack();
143
- *
144
- * @param {String} name Name of the offline pack.
145
- * @return {OfflinePack}
146
- */
147
- async getPack(name) {
148
- await this._initialize();
149
- return this._offlinePacks[name];
150
- }
151
- async _initialize(forceInit) {
152
- if (this._hasInitialized && !forceInit) {
153
- return true;
154
- }
155
- const nativeOfflinePacks = await MapboxOfflineManager.getPacks();
156
- for (const nativeOfflinePack of nativeOfflinePacks) {
157
- const offlinePack = new _OfflinePackLegacy.default(nativeOfflinePack);
158
- this._offlinePacks[offlinePack.name] = offlinePack;
159
- }
160
- this._hasInitialized = true;
161
- return true;
162
- }
163
- }
164
- const offlineManagerLegacy = new OfflineManagerLegacy();
165
- var _default = exports.default = offlineManagerLegacy;
166
- //# sourceMappingURL=offlineManagerLegacy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNative","require","_OfflineCreatePackOptions","_interopRequireDefault","_OfflinePackLegacy","e","__esModule","default","MapboxOfflineManager","NativeModules","RNMBXOfflineModuleLegacy","OfflineManagerLegacy","constructor","_hasInitialized","_offlinePacks","createPack","options","_initialize","packOptions","OfflineCreatePackOptions","name","Error","nativeOfflinePack","OfflinePack","invalidatePack","offlinePack","deletePack","migrateOfflineCache","resetDatabase","getPacks","Object","keys","map","getPack","forceInit","nativeOfflinePacks","offlineManagerLegacy","_default","exports"],"sourceRoot":"../../../../src","sources":["modules/offline/offlineManagerLegacy.ts"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,y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AACiB,SAAmB,EAAoB;IACvD,IAAI,IAAI,CAACrB,eAAe,IAAI,CAACqB,SAAS,EAAE;MACtC,OAAO,IAAI;IACb;IAEA,MAAMC,kBAAkB,GAAG,MAAM3B,oBAAoB,CAACqB,QAAQ,CAAC,CAAC;IAEhE,KAAK,MAAMP,iBAAiB,IAAIa,kBAAkB,EAAE;MAClD,MAAMV,WAAW,GAAG,IAAIF,0BAAW,CAACD,iBAAiB,CAAC;MACtD,IAAI,CAACR,aAAa,CAACW,WAAW,CAACL,IAAI,CAAC,GAAGK,WAAW;IACpD;IAEA,IAAI,CAACZ,eAAe,GAAG,IAAI;IAC3B,OAAO,IAAI;EACb;AACF;AAEA,MAAMuB,oBAAoB,GAAG,IAAIzB,oBAAoB,CAAC,CAAC;AAAC,IAAA0B,QAAA,GAAAC,OAAA,CAAA/B,OAAA,GACzC6B,oBAAoB","ignoreList":[]}
@@ -1,58 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _reactNative = require("react-native");
8
- var _utils = require("../../utils");
9
- var _geoUtils = require("../../utils/geoUtils");
10
- const MapboxGL = _reactNative.NativeModules.RNMBXModule;
11
- class SnapshotOptions {
12
- constructor(options = {}) {
13
- if (!options.centerCoordinate && !options.bounds) {
14
- throw new Error('Center coordinate or bounds must be supplied in order to take a snapshot');
15
- }
16
- this.styleURL = options.styleURL || MapboxGL.StyleURL.Street;
17
- this.heading = options.heading || 0.0;
18
- this.pitch = options.pitch || 0.0;
19
- this.zoomLevel = options.zoomLevel || 16.0;
20
- this.width = options.width || 50.0;
21
- this.height = options.height || 50.0;
22
- this.writeToDisk = options.writeToDisk || false;
23
- this.withLogo = options.withLogo === undefined ? true : options.withLogo;
24
- if (options.centerCoordinate) {
25
- this.centerCoordinate = this._createCenterCoordPoint(options.centerCoordinate);
26
- }
27
- if (options.bounds) {
28
- this.bounds = this._createBoundsCollection(options.bounds);
29
- }
30
- }
31
- toJSON() {
32
- return {
33
- styleURL: this.styleURL,
34
- heading: this.heading,
35
- pitch: this.pitch,
36
- zoomLevel: this.zoomLevel,
37
- width: this.width,
38
- height: this.height,
39
- writeToDisk: this.writeToDisk,
40
- centerCoordinate: this.centerCoordinate,
41
- bounds: this.bounds,
42
- withLogo: this.withLogo
43
- };
44
- }
45
- _createCenterCoordPoint(centerCoordinate) {
46
- const point = (0, _geoUtils.makePoint)(centerCoordinate);
47
- return (0, _utils.toJSONString)(point);
48
- }
49
- _createBoundsCollection(bounds) {
50
- const features = [];
51
- for (const bound of bounds) {
52
- features.push((0, _geoUtils.makePoint)(bound));
53
- }
54
- return (0, _utils.toJSONString)((0, _geoUtils.makeFeatureCollection)(features));
55
- }
56
- }
57
- var _default = exports.default = SnapshotOptions;
58
- //# sourceMappingURL=SnapshotOptions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNative","require","_utils","_geoUtils","MapboxGL","NativeModules","RNMBXModule","SnapshotOptions","constructor","options","centerCoordinate","bounds","Error","styleURL","StyleURL","Street","heading","pitch","zoomLevel","width","height","writeToDisk","withLogo","undefined","_createCenterCoordPoint","_createBoundsCollection","toJSON","point","makePoint","toJSONString","features","bound","push","makeFeatureCollection","_default","exports","default"],"sourceRoot":"../../../../src","sources":["modules/snapshot/SnapshotOptions.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAEA,MAAMG,QAAQ,GAAGC,0BAAa,CAACC,WAAW;AAe1C,MAAMC,eAAe,CAAC;EAYpBC,WAAWA,CAACC,OAA4B,GAAG,CAAC,CAAC,EAAE;IAC7C,IAAI,CAACA,OAAO,CAACC,gBAAgB,IAAI,CAACD,OAAO,CAACE,MAAM,EAAE;MAChD,MAAM,IAAIC,KAAK,CACb,0EACF,CAAC;IACH;IAEA,IAAI,CAACC,QAAQ,GAAGJ,OAAO,CAACI,QAAQ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