@maplibre/maplibre-react-native 10.0.0-beta.2 → 10.0.0-beta.21

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 (584) hide show
  1. package/README.md +12 -56
  2. package/android/build.gradle +120 -50
  3. package/android/gradle.properties +15 -0
  4. package/android/src/main/AndroidManifest.xml +4 -2
  5. package/android/src/main/AndroidManifestNew.xml +5 -0
  6. package/android/src/main/java/org/maplibre/reactnative/MLRNPackage.java +0 -5
  7. package/android/src/main/java/org/maplibre/reactnative/components/camera/MLRNCamera.java +37 -48
  8. package/android/src/main/java/org/maplibre/reactnative/components/location/LocationComponentManager.java +16 -9
  9. package/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapView.java +11 -13
  10. package/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapViewManager.java +4 -11
  11. package/android/src/main/java/org/maplibre/reactnative/components/styles/MLRNStyle.java +1 -4
  12. package/android/src/main/java/org/maplibre/reactnative/components/styles/MLRNStyleFactory.java +10 -11
  13. package/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNShapeSource.java +0 -66
  14. package/android/src/main/java/org/maplibre/reactnative/components/styles/sources/MLRNShapeSourceManager.java +0 -28
  15. package/android/src/main/java/org/maplibre/reactnative/location/LocationManager.java +7 -11
  16. package/android/src/main/java/org/maplibre/reactnative/location/engine/DefaultLocationEngineProvider.java +18 -0
  17. package/android/src/main/java/org/maplibre/reactnative/location/engine/LocationEngineProvidable.java +9 -0
  18. package/android/src/main/java/org/maplibre/reactnative/modules/MLRNModule.java +27 -148
  19. package/android/src/main/java/org/maplibre/reactnative/modules/MLRNOfflineModule.java +1 -3
  20. package/android/src/main/java/org/maplibre/reactnative/utils/GeoJSONUtils.java +123 -18
  21. package/android/src/main/location-engine-default/org/maplibre/reactnative/location/engine/LocationEngineProvider.java +12 -0
  22. package/android/src/main/location-engine-google/org/maplibre/reactnative/location/engine/GoogleLocationEngineImpl.java +151 -0
  23. package/android/src/main/location-engine-google/org/maplibre/reactnative/location/engine/GoogleLocationEngineProvider.java +24 -0
  24. package/android/src/main/location-engine-google/org/maplibre/reactnative/location/engine/LocationEngineProvider.java +12 -0
  25. package/app.plugin.js +1 -1
  26. package/ios/MLRN/MLRNBackgroundLayer.h +0 -1
  27. package/ios/MLRN/MLRNCamera.m +6 -7
  28. package/ios/MLRN/MLRNFillExtrusionLayer.h +0 -1
  29. package/ios/MLRN/MLRNFillLayer.h +0 -1
  30. package/ios/MLRN/MLRNFillLayer.m +1 -0
  31. package/ios/MLRN/MLRNLineLayer.h +0 -1
  32. package/ios/MLRN/MLRNMapView.h +1 -1
  33. package/ios/MLRN/MLRNMapView.m +7 -7
  34. package/ios/MLRN/MLRNMapViewManager.m +1 -1
  35. package/ios/MLRN/MLRNModule.m +8 -139
  36. package/ios/MLRN/MLRNRasterLayer.h +0 -1
  37. package/ios/MLRN/MLRNShapeSource.h +0 -11
  38. package/ios/MLRN/MLRNShapeSource.m +0 -38
  39. package/ios/MLRN/MLRNShapeSourceManager.m +0 -68
  40. package/ios/MLRN/MLRNStyle.m +0 -40
  41. package/ios/MLRN/MLRNSymbolLayer.h +1 -7
  42. package/ios/MLRN/MLRNSymbolLayer.m +1 -89
  43. package/ios/MLRN/MLRNSymbolLayerManager.m +0 -1
  44. package/lib/commonjs/MLRNModule.js +7 -5
  45. package/lib/commonjs/MLRNModule.js.map +1 -1
  46. package/lib/commonjs/MapLibreRN.js +74 -68
  47. package/lib/commonjs/MapLibreRN.js.map +1 -1
  48. package/lib/commonjs/components/Annotation.js +7 -9
  49. package/lib/commonjs/components/Annotation.js.map +1 -1
  50. package/lib/commonjs/components/BackgroundLayer.js +6 -8
  51. package/lib/commonjs/components/BackgroundLayer.js.map +1 -1
  52. package/lib/commonjs/components/Callout.js +2 -2
  53. package/lib/commonjs/components/Callout.js.map +1 -1
  54. package/lib/commonjs/components/Camera.js +111 -63
  55. package/lib/commonjs/components/Camera.js.map +1 -1
  56. package/lib/commonjs/components/CircleLayer.js +6 -8
  57. package/lib/commonjs/components/CircleLayer.js.map +1 -1
  58. package/lib/commonjs/components/FillExtrusionLayer.js +6 -8
  59. package/lib/commonjs/components/FillExtrusionLayer.js.map +1 -1
  60. package/lib/commonjs/components/FillLayer.js +6 -8
  61. package/lib/commonjs/components/FillLayer.js.map +1 -1
  62. package/lib/commonjs/components/HeadingIndicator.js +4 -4
  63. package/lib/commonjs/components/HeadingIndicator.js.map +1 -1
  64. package/lib/commonjs/components/HeatmapLayer.js +6 -8
  65. package/lib/commonjs/components/HeatmapLayer.js.map +1 -1
  66. package/lib/commonjs/components/ImageSource.js +4 -5
  67. package/lib/commonjs/components/ImageSource.js.map +1 -1
  68. package/lib/commonjs/components/Images.js +3 -7
  69. package/lib/commonjs/components/Images.js.map +1 -1
  70. package/lib/commonjs/components/Light.js +4 -6
  71. package/lib/commonjs/components/Light.js.map +1 -1
  72. package/lib/commonjs/components/LineLayer.js +6 -8
  73. package/lib/commonjs/components/LineLayer.js.map +1 -1
  74. package/lib/commonjs/components/MapView.js +69 -83
  75. package/lib/commonjs/components/MapView.js.map +1 -1
  76. package/lib/commonjs/components/MarkerView.js +4 -5
  77. package/lib/commonjs/components/MarkerView.js.map +1 -1
  78. package/lib/commonjs/components/NativeUserLocation.js +2 -2
  79. package/lib/commonjs/components/NativeUserLocation.js.map +1 -1
  80. package/lib/commonjs/components/PointAnnotation.js +7 -10
  81. package/lib/commonjs/components/PointAnnotation.js.map +1 -1
  82. package/lib/commonjs/components/RasterLayer.js +6 -8
  83. package/lib/commonjs/components/RasterLayer.js.map +1 -1
  84. package/lib/commonjs/components/RasterSource.js +8 -10
  85. package/lib/commonjs/components/RasterSource.js.map +1 -1
  86. package/lib/commonjs/components/ShapeSource.js +11 -45
  87. package/lib/commonjs/components/ShapeSource.js.map +1 -1
  88. package/lib/commonjs/components/SymbolLayer.js +8 -24
  89. package/lib/commonjs/components/SymbolLayer.js.map +1 -1
  90. package/lib/commonjs/components/UserLocation.js +21 -23
  91. package/lib/commonjs/components/UserLocation.js.map +1 -1
  92. package/lib/commonjs/components/VectorSource.js +9 -21
  93. package/lib/commonjs/components/VectorSource.js.map +1 -1
  94. package/lib/commonjs/hooks/useAbstractLayer.js +1 -1
  95. package/lib/commonjs/hooks/useAbstractLayer.js.map +1 -1
  96. package/lib/commonjs/hooks/useAbstractSource.js +1 -1
  97. package/lib/commonjs/hooks/useAbstractSource.js.map +1 -1
  98. package/lib/commonjs/hooks/useNativeBridge.js +2 -2
  99. package/lib/commonjs/hooks/useNativeBridge.js.map +1 -1
  100. package/lib/commonjs/hooks/useOnce.js +2 -2
  101. package/lib/commonjs/hooks/useOnce.js.map +1 -1
  102. package/lib/commonjs/index.js +3 -0
  103. package/lib/commonjs/index.js.map +1 -1
  104. package/lib/commonjs/modules/location/{locationManager.js → LocationManager.js} +10 -10
  105. package/lib/commonjs/modules/location/LocationManager.js.map +1 -0
  106. package/lib/commonjs/modules/offline/OfflineCreatePackOptions.js +2 -2
  107. package/lib/commonjs/modules/offline/OfflineCreatePackOptions.js.map +1 -1
  108. package/lib/commonjs/modules/offline/{offlineManager.js → OfflineManager.js} +34 -36
  109. package/lib/commonjs/modules/offline/OfflineManager.js.map +1 -0
  110. package/lib/commonjs/modules/offline/OfflinePack.js +2 -2
  111. package/lib/commonjs/modules/offline/OfflinePack.js.map +1 -1
  112. package/lib/commonjs/modules/snapshot/{snapshotManager.js → SnapshotManager.js} +12 -14
  113. package/lib/commonjs/modules/snapshot/SnapshotManager.js.map +1 -0
  114. package/lib/commonjs/modules/snapshot/SnapshotOptions.js +3 -4
  115. package/lib/commonjs/modules/snapshot/SnapshotOptions.js.map +1 -1
  116. package/lib/commonjs/plugin/MapLibrePluginProps.js +2 -0
  117. package/lib/commonjs/plugin/MapLibrePluginProps.js.map +1 -0
  118. package/lib/commonjs/plugin/android.js +41 -0
  119. package/lib/commonjs/plugin/android.js.map +1 -0
  120. package/lib/commonjs/plugin/ios.js +131 -0
  121. package/lib/commonjs/plugin/ios.js.map +1 -0
  122. package/lib/commonjs/plugin/withMapLibre.js +31 -0
  123. package/lib/commonjs/plugin/withMapLibre.js.map +1 -0
  124. package/lib/commonjs/types/MapLibreRNStyles.js +6 -0
  125. package/lib/commonjs/types/MapLibreRNStyles.js.map +1 -0
  126. package/lib/commonjs/utils/BridgeValue.js +2 -2
  127. package/lib/commonjs/utils/BridgeValue.js.map +1 -1
  128. package/lib/commonjs/utils/Logger.js +2 -2
  129. package/lib/commonjs/utils/Logger.js.map +1 -1
  130. package/lib/commonjs/utils/StyleValue.js +4 -5
  131. package/lib/commonjs/utils/StyleValue.js.map +1 -1
  132. package/lib/commonjs/utils/animated/AbstractAnimatedCoordinates.js +2 -2
  133. package/lib/commonjs/utils/animated/AbstractAnimatedCoordinates.js.map +1 -1
  134. package/lib/commonjs/utils/animated/Animated.js +29 -31
  135. package/lib/commonjs/utils/animated/Animated.js.map +1 -1
  136. package/lib/commonjs/utils/animated/AnimatedCoordinatesArray.js +4 -5
  137. package/lib/commonjs/utils/animated/AnimatedCoordinatesArray.js.map +1 -1
  138. package/lib/commonjs/utils/animated/AnimatedExtractCoordinateFromArray.js +2 -2
  139. package/lib/commonjs/utils/animated/AnimatedExtractCoordinateFromArray.js.map +1 -1
  140. package/lib/commonjs/utils/animated/AnimatedPoint.js +1 -2
  141. package/lib/commonjs/utils/animated/AnimatedPoint.js.map +1 -1
  142. package/lib/commonjs/utils/animated/AnimatedRouteCoordinatesArray.js +4 -4
  143. package/lib/commonjs/utils/animated/AnimatedRouteCoordinatesArray.js.map +1 -1
  144. package/lib/commonjs/utils/animated/AnimatedShape.js +2 -2
  145. package/lib/commonjs/utils/animated/AnimatedShape.js.map +1 -1
  146. package/lib/commonjs/utils/getStylePropertyType.js +252 -0
  147. package/lib/commonjs/utils/getStylePropertyType.js.map +1 -0
  148. package/lib/module/MLRNModule.js +3 -2
  149. package/lib/module/MLRNModule.js.map +1 -1
  150. package/lib/module/MapLibreRN.js +40 -32
  151. package/lib/module/MapLibreRN.js.map +1 -1
  152. package/lib/module/components/Annotation.js +5 -6
  153. package/lib/module/components/Annotation.js.map +1 -1
  154. package/lib/module/components/BackgroundLayer.js +4 -6
  155. package/lib/module/components/BackgroundLayer.js.map +1 -1
  156. package/lib/module/components/Callout.js +2 -3
  157. package/lib/module/components/Callout.js.map +1 -1
  158. package/lib/module/components/Camera.js +112 -64
  159. package/lib/module/components/Camera.js.map +1 -1
  160. package/lib/module/components/CircleLayer.js +4 -6
  161. package/lib/module/components/CircleLayer.js.map +1 -1
  162. package/lib/module/components/FillExtrusionLayer.js +4 -6
  163. package/lib/module/components/FillExtrusionLayer.js.map +1 -1
  164. package/lib/module/components/FillLayer.js +4 -6
  165. package/lib/module/components/FillLayer.js.map +1 -1
  166. package/lib/module/components/HeadingIndicator.js +2 -3
  167. package/lib/module/components/HeadingIndicator.js.map +1 -1
  168. package/lib/module/components/HeatmapLayer.js +4 -6
  169. package/lib/module/components/HeatmapLayer.js.map +1 -1
  170. package/lib/module/components/ImageSource.js +2 -3
  171. package/lib/module/components/ImageSource.js.map +1 -1
  172. package/lib/module/components/Images.js +3 -8
  173. package/lib/module/components/Images.js.map +1 -1
  174. package/lib/module/components/Light.js +2 -4
  175. package/lib/module/components/Light.js.map +1 -1
  176. package/lib/module/components/LineLayer.js +4 -6
  177. package/lib/module/components/LineLayer.js.map +1 -1
  178. package/lib/module/components/MapView.js +65 -79
  179. package/lib/module/components/MapView.js.map +1 -1
  180. package/lib/module/components/MarkerView.js +2 -3
  181. package/lib/module/components/MarkerView.js.map +1 -1
  182. package/lib/module/components/NativeUserLocation.js +1 -2
  183. package/lib/module/components/NativeUserLocation.js.map +1 -1
  184. package/lib/module/components/PointAnnotation.js +5 -7
  185. package/lib/module/components/PointAnnotation.js.map +1 -1
  186. package/lib/module/components/RasterLayer.js +4 -6
  187. package/lib/module/components/RasterLayer.js.map +1 -1
  188. package/lib/module/components/RasterSource.js +5 -7
  189. package/lib/module/components/RasterSource.js.map +1 -1
  190. package/lib/module/components/ShapeSource.js +9 -42
  191. package/lib/module/components/ShapeSource.js.map +1 -1
  192. package/lib/module/components/SymbolLayer.js +7 -23
  193. package/lib/module/components/SymbolLayer.js.map +1 -1
  194. package/lib/module/components/UserLocation.js +14 -15
  195. package/lib/module/components/UserLocation.js.map +1 -1
  196. package/lib/module/components/VectorSource.js +6 -17
  197. package/lib/module/components/VectorSource.js.map +1 -1
  198. package/lib/module/hooks/useAbstractLayer.js +1 -1
  199. package/lib/module/hooks/useAbstractLayer.js.map +1 -1
  200. package/lib/module/hooks/useAbstractSource.js +1 -1
  201. package/lib/module/hooks/useAbstractSource.js.map +1 -1
  202. package/lib/module/hooks/useNativeBridge.js +1 -2
  203. package/lib/module/hooks/useNativeBridge.js.map +1 -1
  204. package/lib/module/hooks/useNativeRef.js.map +1 -1
  205. package/lib/module/hooks/useOnce.js +1 -2
  206. package/lib/module/hooks/useOnce.js.map +1 -1
  207. package/lib/module/index.js +4 -0
  208. package/lib/module/index.js.map +1 -1
  209. package/lib/module/modules/location/{locationManager.js → LocationManager.js} +10 -9
  210. package/lib/module/modules/location/LocationManager.js.map +1 -0
  211. package/lib/module/modules/offline/OfflineCreatePackOptions.js +1 -2
  212. package/lib/module/modules/offline/OfflineCreatePackOptions.js.map +1 -1
  213. package/lib/module/modules/offline/{offlineManager.js → OfflineManager.js} +30 -30
  214. package/lib/module/modules/offline/OfflineManager.js.map +1 -0
  215. package/lib/module/modules/offline/OfflinePack.js +1 -2
  216. package/lib/module/modules/offline/OfflinePack.js.map +1 -1
  217. package/lib/module/modules/snapshot/{snapshotManager.js → SnapshotManager.js} +10 -10
  218. package/lib/module/modules/snapshot/{snapshotManager.js.map → SnapshotManager.js.map} +1 -1
  219. package/lib/module/modules/snapshot/SnapshotOptions.js +2 -3
  220. package/lib/module/modules/snapshot/SnapshotOptions.js.map +1 -1
  221. package/lib/module/plugin/MapLibrePluginProps.js +2 -0
  222. package/lib/module/plugin/MapLibrePluginProps.js.map +1 -0
  223. package/lib/module/plugin/android.js +34 -0
  224. package/lib/module/plugin/android.js.map +1 -0
  225. package/lib/module/plugin/ios.js +123 -0
  226. package/lib/module/plugin/ios.js.map +1 -0
  227. package/lib/module/plugin/withMapLibre.js +27 -0
  228. package/lib/module/plugin/withMapLibre.js.map +1 -0
  229. package/lib/module/types/MapLibreRNStyles.js +4 -0
  230. package/lib/module/types/MapLibreRNStyles.js.map +1 -0
  231. package/lib/module/utils/BridgeValue.js +1 -1
  232. package/lib/module/utils/BridgeValue.js.map +1 -1
  233. package/lib/module/utils/Logger.js +1 -2
  234. package/lib/module/utils/Logger.js.map +1 -1
  235. package/lib/module/utils/StyleValue.js +3 -3
  236. package/lib/module/utils/StyleValue.js.map +1 -1
  237. package/lib/module/utils/animated/AbstractAnimatedCoordinates.js +1 -2
  238. package/lib/module/utils/animated/AbstractAnimatedCoordinates.js.map +1 -1
  239. package/lib/module/utils/animated/Animated.js +14 -15
  240. package/lib/module/utils/animated/Animated.js.map +1 -1
  241. package/lib/module/utils/animated/AnimatedCoordinatesArray.js +2 -3
  242. package/lib/module/utils/animated/AnimatedCoordinatesArray.js.map +1 -1
  243. package/lib/module/utils/animated/AnimatedExtractCoordinateFromArray.js +1 -1
  244. package/lib/module/utils/animated/AnimatedExtractCoordinateFromArray.js.map +1 -1
  245. package/lib/module/utils/animated/AnimatedPoint.js +0 -1
  246. package/lib/module/utils/animated/AnimatedPoint.js.map +1 -1
  247. package/lib/module/utils/animated/AnimatedRouteCoordinatesArray.js +2 -2
  248. package/lib/module/utils/animated/AnimatedRouteCoordinatesArray.js.map +1 -1
  249. package/lib/module/utils/animated/AnimatedShape.js +1 -2
  250. package/lib/module/utils/animated/AnimatedShape.js.map +1 -1
  251. package/lib/module/utils/getStylePropertyType.js +248 -0
  252. package/lib/module/utils/getStylePropertyType.js.map +1 -0
  253. package/lib/typescript/commonjs/src/MLRNModule.d.ts +3 -7
  254. package/lib/typescript/commonjs/src/MLRNModule.d.ts.map +1 -1
  255. package/lib/typescript/commonjs/src/MapLibreRN.d.ts +44 -34
  256. package/lib/typescript/commonjs/src/MapLibreRN.d.ts.map +1 -1
  257. package/lib/typescript/commonjs/src/components/Annotation.d.ts +6 -6
  258. package/lib/typescript/commonjs/src/components/Annotation.d.ts.map +1 -1
  259. package/lib/typescript/commonjs/src/components/BackgroundLayer.d.ts +3 -5
  260. package/lib/typescript/commonjs/src/components/BackgroundLayer.d.ts.map +1 -1
  261. package/lib/typescript/commonjs/src/components/Callout.d.ts +3 -4
  262. package/lib/typescript/commonjs/src/components/Callout.d.ts.map +1 -1
  263. package/lib/typescript/commonjs/src/components/Camera.d.ts +4 -4
  264. package/lib/typescript/commonjs/src/components/Camera.d.ts.map +1 -1
  265. package/lib/typescript/commonjs/src/components/CircleLayer.d.ts +3 -5
  266. package/lib/typescript/commonjs/src/components/CircleLayer.d.ts.map +1 -1
  267. package/lib/typescript/commonjs/src/components/FillExtrusionLayer.d.ts +3 -5
  268. package/lib/typescript/commonjs/src/components/FillExtrusionLayer.d.ts.map +1 -1
  269. package/lib/typescript/commonjs/src/components/FillLayer.d.ts +3 -5
  270. package/lib/typescript/commonjs/src/components/FillLayer.d.ts.map +1 -1
  271. package/lib/typescript/commonjs/src/components/HeadingIndicator.d.ts +2 -3
  272. package/lib/typescript/commonjs/src/components/HeadingIndicator.d.ts.map +1 -1
  273. package/lib/typescript/commonjs/src/components/HeatmapLayer.d.ts +3 -5
  274. package/lib/typescript/commonjs/src/components/HeatmapLayer.d.ts.map +1 -1
  275. package/lib/typescript/commonjs/src/components/ImageSource.d.ts +3 -4
  276. package/lib/typescript/commonjs/src/components/ImageSource.d.ts.map +1 -1
  277. package/lib/typescript/commonjs/src/components/Images.d.ts +5 -5
  278. package/lib/typescript/commonjs/src/components/Images.d.ts.map +1 -1
  279. package/lib/typescript/commonjs/src/components/Light.d.ts +4 -5
  280. package/lib/typescript/commonjs/src/components/Light.d.ts.map +1 -1
  281. package/lib/typescript/commonjs/src/components/LineLayer.d.ts +3 -5
  282. package/lib/typescript/commonjs/src/components/LineLayer.d.ts.map +1 -1
  283. package/lib/typescript/commonjs/src/components/MapView.d.ts +12 -16
  284. package/lib/typescript/commonjs/src/components/MapView.d.ts.map +1 -1
  285. package/lib/typescript/commonjs/src/components/MarkerView.d.ts +3 -3
  286. package/lib/typescript/commonjs/src/components/MarkerView.d.ts.map +1 -1
  287. package/lib/typescript/commonjs/src/components/NativeUserLocation.d.ts +2 -3
  288. package/lib/typescript/commonjs/src/components/NativeUserLocation.d.ts.map +1 -1
  289. package/lib/typescript/commonjs/src/components/PointAnnotation.d.ts +7 -8
  290. package/lib/typescript/commonjs/src/components/PointAnnotation.d.ts.map +1 -1
  291. package/lib/typescript/commonjs/src/components/RasterLayer.d.ts +3 -5
  292. package/lib/typescript/commonjs/src/components/RasterLayer.d.ts.map +1 -1
  293. package/lib/typescript/commonjs/src/components/RasterSource.d.ts +4 -4
  294. package/lib/typescript/commonjs/src/components/RasterSource.d.ts.map +1 -1
  295. package/lib/typescript/commonjs/src/components/ShapeSource.d.ts +8 -16
  296. package/lib/typescript/commonjs/src/components/ShapeSource.d.ts.map +1 -1
  297. package/lib/typescript/commonjs/src/components/SymbolLayer.d.ts +3 -10
  298. package/lib/typescript/commonjs/src/components/SymbolLayer.d.ts.map +1 -1
  299. package/lib/typescript/commonjs/src/components/UserLocation.d.ts +6 -6
  300. package/lib/typescript/commonjs/src/components/UserLocation.d.ts.map +1 -1
  301. package/lib/typescript/commonjs/src/components/VectorSource.d.ts +4 -8
  302. package/lib/typescript/commonjs/src/components/VectorSource.d.ts.map +1 -1
  303. package/lib/typescript/commonjs/src/hooks/useAbstractLayer.d.ts +5 -4
  304. package/lib/typescript/commonjs/src/hooks/useAbstractLayer.d.ts.map +1 -1
  305. package/lib/typescript/commonjs/src/hooks/useAbstractSource.d.ts +4 -3
  306. package/lib/typescript/commonjs/src/hooks/useAbstractSource.d.ts.map +1 -1
  307. package/lib/typescript/commonjs/src/hooks/useNativeBridge.d.ts +5 -5
  308. package/lib/typescript/commonjs/src/hooks/useNativeBridge.d.ts.map +1 -1
  309. package/lib/typescript/commonjs/src/hooks/useNativeRef.d.ts +2 -2
  310. package/lib/typescript/commonjs/src/hooks/useNativeRef.d.ts.map +1 -1
  311. package/lib/typescript/commonjs/src/hooks/useOnce.d.ts +1 -2
  312. package/lib/typescript/commonjs/src/hooks/useOnce.d.ts.map +1 -1
  313. package/lib/typescript/commonjs/src/index.d.ts +3 -0
  314. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  315. package/lib/typescript/commonjs/src/modules/location/LocationManager.d.ts +33 -0
  316. package/lib/typescript/commonjs/src/modules/location/LocationManager.d.ts.map +1 -0
  317. package/lib/typescript/commonjs/src/modules/offline/OfflineCreatePackOptions.d.ts +1 -2
  318. package/lib/typescript/commonjs/src/modules/offline/OfflineCreatePackOptions.d.ts.map +1 -1
  319. package/lib/typescript/{module/src/modules/offline/offlineManager.d.ts → commonjs/src/modules/offline/OfflineManager.d.ts} +27 -37
  320. package/lib/typescript/commonjs/src/modules/offline/OfflineManager.d.ts.map +1 -0
  321. package/lib/typescript/commonjs/src/modules/offline/OfflinePack.d.ts +3 -4
  322. package/lib/typescript/commonjs/src/modules/offline/OfflinePack.d.ts.map +1 -1
  323. package/lib/typescript/{module/src/modules/snapshot/snapshotManager.d.ts → commonjs/src/modules/snapshot/SnapshotManager.d.ts} +9 -9
  324. package/lib/typescript/commonjs/src/modules/snapshot/SnapshotManager.d.ts.map +1 -0
  325. package/lib/typescript/commonjs/src/modules/snapshot/SnapshotOptions.d.ts +1 -1
  326. package/lib/typescript/commonjs/src/modules/snapshot/SnapshotOptions.d.ts.map +1 -1
  327. package/lib/typescript/commonjs/src/plugin/MapLibrePluginProps.d.ts +77 -0
  328. package/lib/typescript/commonjs/src/plugin/MapLibrePluginProps.d.ts.map +1 -0
  329. package/lib/typescript/commonjs/src/plugin/android.d.ts +16 -0
  330. package/lib/typescript/commonjs/src/plugin/android.d.ts.map +1 -0
  331. package/lib/typescript/commonjs/src/plugin/ios.d.ts +17 -0
  332. package/lib/typescript/commonjs/src/plugin/ios.d.ts.map +1 -0
  333. package/lib/typescript/commonjs/src/plugin/withMapLibre.d.ts +5 -0
  334. package/lib/typescript/commonjs/src/plugin/withMapLibre.d.ts.map +1 -0
  335. package/lib/typescript/commonjs/src/types/MapLibreRNStyles.d.ts +960 -0
  336. package/lib/typescript/commonjs/src/types/MapLibreRNStyles.d.ts.map +1 -0
  337. package/lib/typescript/commonjs/src/utils/BridgeValue.d.ts +1 -1
  338. package/lib/typescript/commonjs/src/utils/BridgeValue.d.ts.map +1 -1
  339. package/lib/typescript/commonjs/src/utils/Logger.d.ts +2 -2
  340. package/lib/typescript/commonjs/src/utils/Logger.d.ts.map +1 -1
  341. package/lib/typescript/commonjs/src/utils/StyleValue.d.ts +2 -2
  342. package/lib/typescript/commonjs/src/utils/StyleValue.d.ts.map +1 -1
  343. package/lib/typescript/commonjs/src/utils/animated/AbstractAnimatedCoordinates.d.ts +2 -2
  344. package/lib/typescript/commonjs/src/utils/animated/AbstractAnimatedCoordinates.d.ts.map +1 -1
  345. package/lib/typescript/commonjs/src/utils/animated/Animated.d.ts +19 -19
  346. package/lib/typescript/commonjs/src/utils/animated/Animated.d.ts.map +1 -1
  347. package/lib/typescript/commonjs/src/utils/animated/AnimatedCoordinatesArray.d.ts +3 -3
  348. package/lib/typescript/commonjs/src/utils/animated/AnimatedCoordinatesArray.d.ts.map +1 -1
  349. package/lib/typescript/commonjs/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts +1 -1
  350. package/lib/typescript/commonjs/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts.map +1 -1
  351. package/lib/typescript/commonjs/src/utils/animated/AnimatedPoint.d.ts +1 -1
  352. package/lib/typescript/commonjs/src/utils/animated/AnimatedPoint.d.ts.map +1 -1
  353. package/lib/typescript/commonjs/src/utils/animated/AnimatedRouteCoordinatesArray.d.ts +2 -2
  354. package/lib/typescript/commonjs/src/utils/animated/AnimatedRouteCoordinatesArray.d.ts.map +1 -1
  355. package/lib/typescript/commonjs/src/utils/animated/AnimatedShape.d.ts +5 -5
  356. package/lib/typescript/commonjs/src/utils/animated/AnimatedShape.d.ts.map +1 -1
  357. package/lib/typescript/commonjs/src/utils/filterUtils.d.ts +1 -1
  358. package/lib/typescript/commonjs/src/utils/filterUtils.d.ts.map +1 -1
  359. package/lib/typescript/commonjs/src/utils/getStylePropertyType.d.ts +35 -0
  360. package/lib/typescript/commonjs/src/utils/getStylePropertyType.d.ts.map +1 -0
  361. package/lib/typescript/module/src/MLRNModule.d.ts +3 -7
  362. package/lib/typescript/module/src/MLRNModule.d.ts.map +1 -1
  363. package/lib/typescript/module/src/MapLibreRN.d.ts +44 -34
  364. package/lib/typescript/module/src/MapLibreRN.d.ts.map +1 -1
  365. package/lib/typescript/module/src/components/Annotation.d.ts +6 -6
  366. package/lib/typescript/module/src/components/Annotation.d.ts.map +1 -1
  367. package/lib/typescript/module/src/components/BackgroundLayer.d.ts +3 -5
  368. package/lib/typescript/module/src/components/BackgroundLayer.d.ts.map +1 -1
  369. package/lib/typescript/module/src/components/Callout.d.ts +3 -4
  370. package/lib/typescript/module/src/components/Callout.d.ts.map +1 -1
  371. package/lib/typescript/module/src/components/Camera.d.ts +4 -4
  372. package/lib/typescript/module/src/components/Camera.d.ts.map +1 -1
  373. package/lib/typescript/module/src/components/CircleLayer.d.ts +3 -5
  374. package/lib/typescript/module/src/components/CircleLayer.d.ts.map +1 -1
  375. package/lib/typescript/module/src/components/FillExtrusionLayer.d.ts +3 -5
  376. package/lib/typescript/module/src/components/FillExtrusionLayer.d.ts.map +1 -1
  377. package/lib/typescript/module/src/components/FillLayer.d.ts +3 -5
  378. package/lib/typescript/module/src/components/FillLayer.d.ts.map +1 -1
  379. package/lib/typescript/module/src/components/HeadingIndicator.d.ts +2 -3
  380. package/lib/typescript/module/src/components/HeadingIndicator.d.ts.map +1 -1
  381. package/lib/typescript/module/src/components/HeatmapLayer.d.ts +3 -5
  382. package/lib/typescript/module/src/components/HeatmapLayer.d.ts.map +1 -1
  383. package/lib/typescript/module/src/components/ImageSource.d.ts +3 -4
  384. package/lib/typescript/module/src/components/ImageSource.d.ts.map +1 -1
  385. package/lib/typescript/module/src/components/Images.d.ts +5 -5
  386. package/lib/typescript/module/src/components/Images.d.ts.map +1 -1
  387. package/lib/typescript/module/src/components/Light.d.ts +4 -5
  388. package/lib/typescript/module/src/components/Light.d.ts.map +1 -1
  389. package/lib/typescript/module/src/components/LineLayer.d.ts +3 -5
  390. package/lib/typescript/module/src/components/LineLayer.d.ts.map +1 -1
  391. package/lib/typescript/module/src/components/MapView.d.ts +12 -16
  392. package/lib/typescript/module/src/components/MapView.d.ts.map +1 -1
  393. package/lib/typescript/module/src/components/MarkerView.d.ts +3 -3
  394. package/lib/typescript/module/src/components/MarkerView.d.ts.map +1 -1
  395. package/lib/typescript/module/src/components/NativeUserLocation.d.ts +2 -3
  396. package/lib/typescript/module/src/components/NativeUserLocation.d.ts.map +1 -1
  397. package/lib/typescript/module/src/components/PointAnnotation.d.ts +7 -8
  398. package/lib/typescript/module/src/components/PointAnnotation.d.ts.map +1 -1
  399. package/lib/typescript/module/src/components/RasterLayer.d.ts +3 -5
  400. package/lib/typescript/module/src/components/RasterLayer.d.ts.map +1 -1
  401. package/lib/typescript/module/src/components/RasterSource.d.ts +4 -4
  402. package/lib/typescript/module/src/components/RasterSource.d.ts.map +1 -1
  403. package/lib/typescript/module/src/components/ShapeSource.d.ts +8 -16
  404. package/lib/typescript/module/src/components/ShapeSource.d.ts.map +1 -1
  405. package/lib/typescript/module/src/components/SymbolLayer.d.ts +3 -10
  406. package/lib/typescript/module/src/components/SymbolLayer.d.ts.map +1 -1
  407. package/lib/typescript/module/src/components/UserLocation.d.ts +6 -6
  408. package/lib/typescript/module/src/components/UserLocation.d.ts.map +1 -1
  409. package/lib/typescript/module/src/components/VectorSource.d.ts +4 -8
  410. package/lib/typescript/module/src/components/VectorSource.d.ts.map +1 -1
  411. package/lib/typescript/module/src/hooks/useAbstractLayer.d.ts +5 -4
  412. package/lib/typescript/module/src/hooks/useAbstractLayer.d.ts.map +1 -1
  413. package/lib/typescript/module/src/hooks/useAbstractSource.d.ts +4 -3
  414. package/lib/typescript/module/src/hooks/useAbstractSource.d.ts.map +1 -1
  415. package/lib/typescript/module/src/hooks/useNativeBridge.d.ts +5 -5
  416. package/lib/typescript/module/src/hooks/useNativeBridge.d.ts.map +1 -1
  417. package/lib/typescript/module/src/hooks/useNativeRef.d.ts +2 -2
  418. package/lib/typescript/module/src/hooks/useNativeRef.d.ts.map +1 -1
  419. package/lib/typescript/module/src/hooks/useOnce.d.ts +1 -2
  420. package/lib/typescript/module/src/hooks/useOnce.d.ts.map +1 -1
  421. package/lib/typescript/module/src/index.d.ts +3 -0
  422. package/lib/typescript/module/src/index.d.ts.map +1 -1
  423. package/lib/typescript/module/src/modules/location/LocationManager.d.ts +33 -0
  424. package/lib/typescript/module/src/modules/location/LocationManager.d.ts.map +1 -0
  425. package/lib/typescript/module/src/modules/offline/OfflineCreatePackOptions.d.ts +1 -2
  426. package/lib/typescript/module/src/modules/offline/OfflineCreatePackOptions.d.ts.map +1 -1
  427. package/lib/typescript/{commonjs/src/modules/offline/offlineManager.d.ts → module/src/modules/offline/OfflineManager.d.ts} +27 -37
  428. package/lib/typescript/module/src/modules/offline/OfflineManager.d.ts.map +1 -0
  429. package/lib/typescript/module/src/modules/offline/OfflinePack.d.ts +3 -4
  430. package/lib/typescript/module/src/modules/offline/OfflinePack.d.ts.map +1 -1
  431. package/lib/typescript/{commonjs/src/modules/snapshot/snapshotManager.d.ts → module/src/modules/snapshot/SnapshotManager.d.ts} +9 -9
  432. package/lib/typescript/module/src/modules/snapshot/SnapshotManager.d.ts.map +1 -0
  433. package/lib/typescript/module/src/modules/snapshot/SnapshotOptions.d.ts +1 -1
  434. package/lib/typescript/module/src/modules/snapshot/SnapshotOptions.d.ts.map +1 -1
  435. package/lib/typescript/module/src/plugin/MapLibrePluginProps.d.ts +77 -0
  436. package/lib/typescript/module/src/plugin/MapLibrePluginProps.d.ts.map +1 -0
  437. package/lib/typescript/module/src/plugin/android.d.ts +16 -0
  438. package/lib/typescript/module/src/plugin/android.d.ts.map +1 -0
  439. package/lib/typescript/module/src/plugin/ios.d.ts +17 -0
  440. package/lib/typescript/module/src/plugin/ios.d.ts.map +1 -0
  441. package/lib/typescript/module/src/plugin/withMapLibre.d.ts +5 -0
  442. package/lib/typescript/module/src/plugin/withMapLibre.d.ts.map +1 -0
  443. package/lib/typescript/module/src/types/MapLibreRNStyles.d.ts +960 -0
  444. package/lib/typescript/module/src/types/MapLibreRNStyles.d.ts.map +1 -0
  445. package/lib/typescript/module/src/utils/BridgeValue.d.ts +1 -1
  446. package/lib/typescript/module/src/utils/BridgeValue.d.ts.map +1 -1
  447. package/lib/typescript/module/src/utils/Logger.d.ts +2 -2
  448. package/lib/typescript/module/src/utils/Logger.d.ts.map +1 -1
  449. package/lib/typescript/module/src/utils/StyleValue.d.ts +2 -2
  450. package/lib/typescript/module/src/utils/StyleValue.d.ts.map +1 -1
  451. package/lib/typescript/module/src/utils/animated/AbstractAnimatedCoordinates.d.ts +2 -2
  452. package/lib/typescript/module/src/utils/animated/AbstractAnimatedCoordinates.d.ts.map +1 -1
  453. package/lib/typescript/module/src/utils/animated/Animated.d.ts +19 -19
  454. package/lib/typescript/module/src/utils/animated/Animated.d.ts.map +1 -1
  455. package/lib/typescript/module/src/utils/animated/AnimatedCoordinatesArray.d.ts +3 -3
  456. package/lib/typescript/module/src/utils/animated/AnimatedCoordinatesArray.d.ts.map +1 -1
  457. package/lib/typescript/module/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts +1 -1
  458. package/lib/typescript/module/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts.map +1 -1
  459. package/lib/typescript/module/src/utils/animated/AnimatedPoint.d.ts +1 -1
  460. package/lib/typescript/module/src/utils/animated/AnimatedPoint.d.ts.map +1 -1
  461. package/lib/typescript/module/src/utils/animated/AnimatedRouteCoordinatesArray.d.ts +2 -2
  462. package/lib/typescript/module/src/utils/animated/AnimatedRouteCoordinatesArray.d.ts.map +1 -1
  463. package/lib/typescript/module/src/utils/animated/AnimatedShape.d.ts +5 -5
  464. package/lib/typescript/module/src/utils/animated/AnimatedShape.d.ts.map +1 -1
  465. package/lib/typescript/module/src/utils/filterUtils.d.ts +1 -1
  466. package/lib/typescript/module/src/utils/filterUtils.d.ts.map +1 -1
  467. package/lib/typescript/module/src/utils/getStylePropertyType.d.ts +35 -0
  468. package/lib/typescript/module/src/utils/getStylePropertyType.d.ts.map +1 -0
  469. package/maplibre-react-native.podspec +15 -14
  470. package/package.json +17 -14
  471. package/src/MLRNModule.ts +24 -10
  472. package/src/MapLibreRN.ts +66 -49
  473. package/src/components/Annotation.tsx +12 -14
  474. package/src/components/BackgroundLayer.tsx +7 -9
  475. package/src/components/Callout.tsx +8 -10
  476. package/src/components/Camera.tsx +154 -78
  477. package/src/components/CircleLayer.tsx +7 -9
  478. package/src/components/FillExtrusionLayer.tsx +7 -9
  479. package/src/components/FillLayer.tsx +7 -9
  480. package/src/components/HeadingIndicator.tsx +2 -6
  481. package/src/components/HeatmapLayer.tsx +7 -9
  482. package/src/components/ImageSource.tsx +4 -6
  483. package/src/components/Images.tsx +8 -19
  484. package/src/components/Light.tsx +5 -7
  485. package/src/components/LineLayer.tsx +7 -9
  486. package/src/components/MapView.tsx +85 -105
  487. package/src/components/MarkerView.tsx +4 -6
  488. package/src/components/NativeUserLocation.tsx +1 -4
  489. package/src/components/PointAnnotation.tsx +10 -11
  490. package/src/components/RasterLayer.tsx +7 -9
  491. package/src/components/RasterSource.tsx +7 -9
  492. package/src/components/ShapeSource.tsx +22 -95
  493. package/src/components/SymbolLayer.tsx +12 -41
  494. package/src/components/UserLocation.tsx +21 -22
  495. package/src/components/VectorSource.tsx +12 -35
  496. package/src/hooks/useAbstractLayer.ts +8 -8
  497. package/src/hooks/useAbstractSource.ts +6 -6
  498. package/src/hooks/useNativeBridge.ts +9 -6
  499. package/src/hooks/useNativeRef.ts +2 -2
  500. package/src/hooks/useOnce.ts +3 -3
  501. package/src/index.ts +3 -0
  502. package/src/modules/location/{locationManager.ts → LocationManager.ts} +16 -15
  503. package/src/modules/offline/OfflineCreatePackOptions.ts +1 -3
  504. package/src/modules/offline/{offlineManager.ts → OfflineManager.ts} +32 -45
  505. package/src/modules/offline/OfflinePack.ts +3 -5
  506. package/src/modules/snapshot/{snapshotManager.ts → SnapshotManager.ts} +9 -9
  507. package/src/modules/snapshot/SnapshotOptions.ts +2 -4
  508. package/src/plugin/MapLibrePluginProps.ts +83 -0
  509. package/src/plugin/android.ts +64 -0
  510. package/src/plugin/ios.ts +166 -0
  511. package/src/plugin/withMapLibre.ts +30 -0
  512. package/src/{utils/MapLibreRNStyles.d.ts → types/MapLibreRNStyles.ts} +86 -406
  513. package/src/utils/BridgeValue.ts +1 -1
  514. package/src/utils/Logger.ts +1 -3
  515. package/src/utils/StyleValue.ts +6 -5
  516. package/src/utils/animated/AbstractAnimatedCoordinates.ts +3 -3
  517. package/src/utils/animated/Animated.ts +23 -21
  518. package/src/utils/animated/AnimatedCoordinatesArray.ts +3 -4
  519. package/src/utils/animated/AnimatedExtractCoordinateFromArray.ts +1 -1
  520. package/src/utils/animated/AnimatedPoint.ts +0 -2
  521. package/src/utils/animated/AnimatedRouteCoordinatesArray.ts +3 -2
  522. package/src/utils/animated/AnimatedShape.ts +4 -6
  523. package/src/utils/filterUtils.ts +1 -1
  524. package/src/utils/getStylePropertyType.ts +265 -0
  525. package/android/src/main/res/values/strings.xml +0 -3
  526. package/lib/commonjs/components/Style.js +0 -266
  527. package/lib/commonjs/components/Style.js.map +0 -1
  528. package/lib/commonjs/modules/location/locationManager.js.map +0 -1
  529. package/lib/commonjs/modules/offline/offlineManager.js.map +0 -1
  530. package/lib/commonjs/modules/snapshot/snapshotManager.js.map +0 -1
  531. package/lib/commonjs/types/StyleURL.js +0 -11
  532. package/lib/commonjs/types/StyleURL.js.map +0 -1
  533. package/lib/commonjs/utils/MapLibreRNStyles.d.js +0 -181
  534. package/lib/commonjs/utils/MapLibreRNStyles.d.js.map +0 -1
  535. package/lib/commonjs/utils/deprecation.js +0 -31
  536. package/lib/commonjs/utils/deprecation.js.map +0 -1
  537. package/lib/commonjs/utils/styleMap.js +0 -255
  538. package/lib/commonjs/utils/styleMap.js.map +0 -1
  539. package/lib/module/components/Style.js +0 -261
  540. package/lib/module/components/Style.js.map +0 -1
  541. package/lib/module/modules/location/locationManager.js.map +0 -1
  542. package/lib/module/modules/offline/offlineManager.js.map +0 -1
  543. package/lib/module/types/StyleURL.js +0 -7
  544. package/lib/module/types/StyleURL.js.map +0 -1
  545. package/lib/module/utils/MapLibreRNStyles.d.js +0 -180
  546. package/lib/module/utils/MapLibreRNStyles.d.js.map +0 -1
  547. package/lib/module/utils/deprecation.js +0 -27
  548. package/lib/module/utils/deprecation.js.map +0 -1
  549. package/lib/module/utils/styleMap.js +0 -249
  550. package/lib/module/utils/styleMap.js.map +0 -1
  551. package/lib/typescript/commonjs/jest.config.d.ts +0 -2
  552. package/lib/typescript/commonjs/jest.config.d.ts.map +0 -1
  553. package/lib/typescript/commonjs/src/components/Style.d.ts +0 -81
  554. package/lib/typescript/commonjs/src/components/Style.d.ts.map +0 -1
  555. package/lib/typescript/commonjs/src/modules/location/locationManager.d.ts +0 -64
  556. package/lib/typescript/commonjs/src/modules/location/locationManager.d.ts.map +0 -1
  557. package/lib/typescript/commonjs/src/modules/offline/offlineManager.d.ts.map +0 -1
  558. package/lib/typescript/commonjs/src/modules/snapshot/snapshotManager.d.ts.map +0 -1
  559. package/lib/typescript/commonjs/src/types/StyleURL.d.ts +0 -4
  560. package/lib/typescript/commonjs/src/types/StyleURL.d.ts.map +0 -1
  561. package/lib/typescript/commonjs/src/utils/deprecation.d.ts +0 -6
  562. package/lib/typescript/commonjs/src/utils/deprecation.d.ts.map +0 -1
  563. package/lib/typescript/commonjs/src/utils/styleMap.d.ts +0 -231
  564. package/lib/typescript/commonjs/src/utils/styleMap.d.ts.map +0 -1
  565. package/lib/typescript/module/jest.config.d.ts +0 -2
  566. package/lib/typescript/module/jest.config.d.ts.map +0 -1
  567. package/lib/typescript/module/src/components/Style.d.ts +0 -81
  568. package/lib/typescript/module/src/components/Style.d.ts.map +0 -1
  569. package/lib/typescript/module/src/modules/location/locationManager.d.ts +0 -64
  570. package/lib/typescript/module/src/modules/location/locationManager.d.ts.map +0 -1
  571. package/lib/typescript/module/src/modules/offline/offlineManager.d.ts.map +0 -1
  572. package/lib/typescript/module/src/modules/snapshot/snapshotManager.d.ts.map +0 -1
  573. package/lib/typescript/module/src/types/StyleURL.d.ts +0 -4
  574. package/lib/typescript/module/src/types/StyleURL.d.ts.map +0 -1
  575. package/lib/typescript/module/src/utils/deprecation.d.ts +0 -6
  576. package/lib/typescript/module/src/utils/deprecation.d.ts.map +0 -1
  577. package/lib/typescript/module/src/utils/styleMap.d.ts +0 -231
  578. package/lib/typescript/module/src/utils/styleMap.d.ts.map +0 -1
  579. package/plugin/build/withMapLibre.d.ts +0 -12
  580. package/plugin/build/withMapLibre.js +0 -148
  581. package/src/components/Style.tsx +0 -371
  582. package/src/types/StyleURL.ts +0 -3
  583. package/src/utils/deprecation.ts +0 -31
  584. package/src/utils/styleMap.ts +0 -265
@@ -1,371 +0,0 @@
1
- import {
2
- useMemo,
3
- useState,
4
- useEffect,
5
- type ReactElement,
6
- type ComponentType,
7
- } from "react";
8
-
9
- import BackgroundLayer, { type BackgroundLayerProps } from "./BackgroundLayer";
10
- import CircleLayer, { type CircleLayerProps } from "./CircleLayer";
11
- import FillExtrusionLayer, {
12
- type FillExtrusionLayerProps,
13
- } from "./FillExtrusionLayer";
14
- import FillLayer, { type FillLayerProps } from "./FillLayer";
15
- import HeatmapLayer, { type HeatmapLayerProps } from "./HeatmapLayer";
16
- import ImageSource from "./ImageSource";
17
- import LineLayer, { type LineLayerProps } from "./LineLayer";
18
- import RasterLayer, { type RasterLayerProps } from "./RasterLayer";
19
- import RasterSource from "./RasterSource";
20
- import ShapeSource from "./ShapeSource";
21
- import SymbolLayer, { type SymbolLayerProps } from "./SymbolLayer";
22
- import VectorSource from "./VectorSource";
23
- import {
24
- type ExpressionField,
25
- type FilterExpression,
26
- } from "../utils/MapLibreRNStyles";
27
-
28
- function toCamelCase(s: string): string {
29
- return s.replace(/([-_][a-z])/gi, ($1) => {
30
- return $1.toUpperCase().replace("-", "").replace("_", "");
31
- });
32
- }
33
-
34
- // Patches the Mapbox Style Specification keys into the style props attributes:
35
- // icon-allow-overlap -> iconAllowOverlap
36
- function toCamelCaseKeys(
37
- oldObj: Record<string, unknown>,
38
- ): Record<string, unknown> {
39
- if (!oldObj) {
40
- return {};
41
- }
42
- const newObj: Record<string, unknown> = {};
43
- Object.keys(oldObj).forEach((key) => {
44
- const value = oldObj[key];
45
- if (key.includes("-")) {
46
- newObj[toCamelCase(key)] = value;
47
- } else {
48
- newObj[key] = value;
49
- }
50
- });
51
- return newObj;
52
- }
53
-
54
- type LayerProps =
55
- | CircleLayerProps
56
- | SymbolLayerProps
57
- | RasterLayerProps
58
- | LineLayerProps
59
- | FillLayerProps
60
- | FillExtrusionLayerProps
61
- | BackgroundLayerProps
62
- | HeatmapLayerProps;
63
-
64
- function getLayerComponentType(
65
- layer: MapLibreJSONLayer,
66
- ): ComponentType<LayerProps> | null {
67
- const { type } = layer;
68
-
69
- switch (type) {
70
- case "circle":
71
- return CircleLayer;
72
- case "symbol":
73
- return SymbolLayer;
74
- case "raster":
75
- return RasterLayer;
76
- case "line":
77
- return LineLayer;
78
- case "fill":
79
- return FillLayer;
80
- case "fill-extrusion":
81
- return FillExtrusionLayer;
82
- case "background":
83
- return BackgroundLayer;
84
- case "heatmap":
85
- return HeatmapLayer;
86
- }
87
-
88
- console.warn(`Mapbox layer type '${type}' is not supported/`);
89
-
90
- return null;
91
- }
92
-
93
- interface MapLibreJSONLayer {
94
- type: string;
95
- paint: { [k: string]: unknown };
96
- layout: { [k: string]: unknown };
97
- source?: string;
98
- "source-layer"?: string;
99
- minzoom?: number;
100
- maxzoom?: number;
101
- filter?: FilterExpression;
102
- id: string;
103
- }
104
-
105
- function asLayerComponent(
106
- layer: MapLibreJSONLayer,
107
- ): ReactElement<LayerProps> | null {
108
- const LayerComponent = getLayerComponentType(layer);
109
-
110
- if (!LayerComponent) {
111
- return null;
112
- }
113
-
114
- const style = {
115
- ...toCamelCaseKeys(layer.paint),
116
- ...toCamelCaseKeys(layer.layout),
117
- };
118
-
119
- const layerProps: Partial<LayerProps> = {};
120
-
121
- if (layer.source) {
122
- layerProps.sourceID = layer.source;
123
- }
124
- if (layer["source-layer"]) {
125
- layerProps.sourceLayerID = layer["source-layer"];
126
- }
127
- if (layer.minzoom) {
128
- layerProps.minZoomLevel = layer.minzoom;
129
- }
130
- if (layer.maxzoom) {
131
- layerProps.maxZoomLevel = layer.maxzoom;
132
- }
133
- if (layer.filter) {
134
- layerProps.filter = layer.filter;
135
- }
136
- if (Object.keys(style).length) {
137
- layerProps.style = style;
138
- }
139
-
140
- return <LayerComponent key={layer.id} id={layer.id} {...layerProps} />;
141
- }
142
-
143
- interface MapLibreJSONSource {
144
- type: string;
145
- url?: string;
146
- tiles?: string[];
147
- minzoom?: number;
148
- maxzoom?: number;
149
- attribution?: string;
150
- scheme?: "xyz" | "tms";
151
- bounds?: number[];
152
- buffer?: number;
153
- tileSize?: number;
154
- coordinates?: [
155
- [number, number],
156
- [number, number],
157
- [number, number],
158
- [number, number],
159
- ];
160
- cluster?: boolean;
161
- clusterMaxZoom?: number;
162
- clusterMinPoints?: number;
163
- clusterRadius?: number;
164
- clusterProperties?: { [propertyName: string]: ExpressionField };
165
- data?: string | object;
166
- filter?: FilterExpression;
167
- generateId?: boolean;
168
- lineMetrics?: boolean;
169
- tolerance?: number;
170
- }
171
-
172
- type SourceProps = {
173
- url?: string;
174
- tileUrlTemplates?: string[];
175
- minZoomLevel?: number;
176
- maxZoomLevel?: number;
177
- attribution?: string;
178
- tms?: boolean;
179
- };
180
-
181
- function getTileSourceProps(source: MapLibreJSONSource): SourceProps {
182
- const sourceProps: Partial<SourceProps> = {};
183
- if (source.url) {
184
- sourceProps.url = source.url;
185
- }
186
- if (source.tiles) {
187
- sourceProps.tileUrlTemplates = source.tiles;
188
- }
189
- if (source.minzoom !== undefined) {
190
- sourceProps.minZoomLevel = source.minzoom;
191
- }
192
- if (source.maxzoom !== undefined) {
193
- sourceProps.maxZoomLevel = source.maxzoom;
194
- }
195
- if (source.attribution) {
196
- sourceProps.attribution = source.attribution;
197
- }
198
- if (source.scheme && source.scheme === "tms") {
199
- sourceProps.tms = true;
200
- }
201
- return sourceProps;
202
- }
203
-
204
- function getVectorSource(id: string, source: MapLibreJSONSource): ReactElement {
205
- const sourceProps = { ...getTileSourceProps(source) };
206
- return <VectorSource key={id} id={id} {...sourceProps} />;
207
- }
208
-
209
- function getRasterSource(id: string, source: MapLibreJSONSource): ReactElement {
210
- const sourceProps: SourceProps & { tileSize?: number } = {
211
- ...getTileSourceProps(source),
212
- };
213
- if (source.tileSize) {
214
- sourceProps.tileSize = source.tileSize;
215
- }
216
- return <RasterSource key={id} id={id} {...sourceProps} />;
217
- }
218
-
219
- function getImageSource(id: string, source: MapLibreJSONSource): ReactElement {
220
- const sourceProps = {
221
- url: source.url,
222
- coordinates: source.coordinates,
223
- };
224
- return <ImageSource key={id} id={id} {...sourceProps} />;
225
- }
226
-
227
- type ShapeSourceShape = (typeof ShapeSource.prototype.props)["shape"];
228
-
229
- function getShapeSource(id: string, source: MapLibreJSONSource): ReactElement {
230
- const sourceProps: SourceProps & {
231
- shape?: ShapeSourceShape;
232
- cluster?: boolean;
233
- clusterRadius?: number;
234
- clusterMaxZoomLevel?: number;
235
- clusterProperties?: { [propertyName: string]: ExpressionField };
236
- buffer?: number;
237
- tolerance?: number;
238
- lineMetrics?: boolean;
239
- } = {};
240
- if (source.data && typeof source.data === "string") {
241
- sourceProps.url = source.data;
242
- } else if (source.data && typeof source.data === "object") {
243
- sourceProps.shape = source.data as ShapeSourceShape;
244
- }
245
- if (source.cluster !== undefined) {
246
- sourceProps.cluster = source.cluster;
247
- }
248
- if (source.clusterRadius !== undefined) {
249
- sourceProps.clusterRadius = source.clusterRadius;
250
- }
251
- if (source.maxzoom !== undefined) {
252
- sourceProps.maxZoomLevel = source.maxzoom;
253
- }
254
- if (source.clusterMaxZoom !== undefined) {
255
- sourceProps.clusterMaxZoomLevel = source.clusterMaxZoom;
256
- }
257
- if (source.clusterProperties !== undefined) {
258
- sourceProps.clusterProperties = source.clusterProperties;
259
- }
260
- if (source.buffer !== undefined) {
261
- sourceProps.buffer = source.buffer;
262
- }
263
- if (source.tolerance !== undefined) {
264
- sourceProps.tolerance = source.tolerance;
265
- }
266
- if (source.lineMetrics !== undefined) {
267
- sourceProps.lineMetrics = source.lineMetrics;
268
- }
269
- return <ShapeSource key={id} id={id} {...sourceProps} />;
270
- }
271
-
272
- function asSourceComponent(
273
- id: string,
274
- source: MapLibreJSONSource,
275
- ): ReactElement | null {
276
- switch (source.type) {
277
- case "vector":
278
- return getVectorSource(id, source);
279
- case "raster":
280
- return getRasterSource(id, source);
281
- case "image":
282
- return getImageSource(id, source);
283
- case "geojson":
284
- return getShapeSource(id, source);
285
- }
286
-
287
- console.warn(`MapLibre source type '${source.type}' is not supported`);
288
-
289
- return null;
290
- }
291
-
292
- interface MapLibreJSON {
293
- layers?: MapLibreJSONLayer[];
294
- sources?: { [key: string]: MapLibreJSONSource };
295
- }
296
-
297
- interface StyleProps {
298
- /**
299
- * A JSON object conforming to the schema described in the MapLibre Style Specification, or a URL to such JSON.
300
- */
301
- json?: MapLibreJSON | URL;
302
- }
303
-
304
- /**
305
- * Style is a component that automatically adds sources / layers to the map using MapLibre Style Spec.
306
- * Only [`sources`](https://maplibre.org/maplibre-gl-js-docs/style-spec/sources/) & [`layers`](https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/) are supported.
307
- * Other fields such as `sprites`, `glyphs` etc. will be ignored. Not all layer / source attributes from the style spec are supported, in general the supported attributes will be mentioned under https://github.com/maplibre/maplibre-react-native/tree/main/docs.
308
- *
309
- * TODO: Maintainer forking this project does not understand the above comment regarding what is supported.
310
- */
311
- const Style = (props: StyleProps): ReactElement => {
312
- const [fetchedJson, setFetchedJson] = useState({});
313
- const json: MapLibreJSON =
314
- typeof props.json === "object" ? props.json : fetchedJson;
315
-
316
- // Fetch style when props.json is a URL
317
- useEffect(() => {
318
- const abortController = new AbortController();
319
- const fetchStyleJson = async (url: string): Promise<void> => {
320
- try {
321
- const response = await fetch(url, {
322
- signal: abortController.signal,
323
- });
324
- const responseJson = await response.json();
325
- setFetchedJson(responseJson);
326
- } catch (error: unknown) {
327
- const e = error as { name?: string };
328
- if (e.name === "AbortError") {
329
- return;
330
- }
331
- throw e;
332
- }
333
- };
334
- if (typeof props.json === "string") {
335
- fetchStyleJson(props.json);
336
- }
337
- return function cleanup(): void {
338
- abortController.abort();
339
- };
340
- }, [props.json]);
341
-
342
- // Extract layer components from json
343
- const layerComponents = useMemo(() => {
344
- if (!json.layers) {
345
- return [];
346
- }
347
- return json.layers
348
- .map(asLayerComponent)
349
- .filter((x: ReactElement | null) => !!x);
350
- }, [json.layers]);
351
-
352
- // Extract source components from json
353
- const sourceComponents = useMemo(() => {
354
- const { sources } = json;
355
- if (!sources || !Object.keys(sources)) {
356
- return [];
357
- }
358
- return Object.entries(sources)
359
- .map(([id, source]) => asSourceComponent(id, source))
360
- .filter((x) => !!x);
361
- }, [json]);
362
-
363
- return (
364
- <>
365
- {sourceComponents}
366
- {layerComponents}
367
- </>
368
- );
369
- };
370
-
371
- export default Style;
@@ -1,3 +0,0 @@
1
- export enum StyleURL {
2
- Default = "https://demotiles.maplibre.org/style.json",
3
- }
@@ -1,31 +0,0 @@
1
- /**
2
- * Copy properties from origObject to newObject, which not exists in newObject,
3
- * calls onDeprecatedCalled callback in case a copied property is invoked.
4
- */
5
-
6
- export function copyPropertiesAsDeprecated<
7
- DeprecatedType extends object,
8
- WithDeprecatedType extends Record<string, unknown>,
9
- >(
10
- origObject: DeprecatedType,
11
- newObject: WithDeprecatedType,
12
- onDeprecatedCalled: (key: string) => void,
13
- accessors: Record<string, (value: any) => unknown> = {},
14
- ): WithDeprecatedType {
15
- const result = { ...newObject };
16
-
17
- for (const [key, value] of Object.entries(origObject)) {
18
- if (!(key in newObject)) {
19
- Object.defineProperty(result, key, {
20
- get() {
21
- onDeprecatedCalled(key);
22
- return accessors[key] ? accessors[key](value) : value;
23
- },
24
- enumerable: true, // Ensure the property is enumerable
25
- configurable: true, // Ensure the property can be reconfigured
26
- });
27
- }
28
- }
29
-
30
- return result;
31
- }
@@ -1,265 +0,0 @@
1
- /* eslint-disable */
2
- // DO NOT MODIFY
3
- // This file is auto-generated from scripts/templates/styleMap.ts.ejs
4
-
5
- import { isAndroid } from "./index";
6
-
7
- export const StyleTypes = {
8
- Constant: "constant",
9
- Color: "color",
10
- Transition: "transition",
11
- Translation: "translation",
12
- Function: "function",
13
- Image: "image",
14
- Enum: "enum",
15
- };
16
-
17
- export function getStyleType(styleProp: keyof typeof styleExtras): string {
18
- if (!isAndroid() && styleExtras[styleProp]) {
19
- return styleExtras[styleProp].iosType;
20
- }
21
-
22
- if (styleMap[styleProp]) {
23
- return styleMap[styleProp];
24
- }
25
-
26
- throw new Error(`${styleProp} is not a valid MapLibre layer style`);
27
- }
28
-
29
- const styleMap = {
30
- fillSortKey: StyleTypes.Constant,
31
- fillAntialias: StyleTypes.Constant,
32
- fillOpacity: StyleTypes.Constant,
33
- fillOpacityTransition: StyleTypes.Transition,
34
- fillColor: StyleTypes.Color,
35
- fillColorTransition: StyleTypes.Transition,
36
- fillOutlineColor: StyleTypes.Color,
37
- fillOutlineColorTransition: StyleTypes.Transition,
38
- fillTranslate: StyleTypes.Translation,
39
- fillTranslateTransition: StyleTypes.Transition,
40
- fillTranslateAnchor: StyleTypes.Enum,
41
- fillPattern: StyleTypes.Image,
42
- fillPatternTransition: StyleTypes.Transition,
43
-
44
- lineCap: StyleTypes.Enum,
45
- lineJoin: StyleTypes.Enum,
46
- lineMiterLimit: StyleTypes.Constant,
47
- lineRoundLimit: StyleTypes.Constant,
48
- lineSortKey: StyleTypes.Constant,
49
- lineOpacity: StyleTypes.Constant,
50
- lineOpacityTransition: StyleTypes.Transition,
51
- lineColor: StyleTypes.Color,
52
- lineColorTransition: StyleTypes.Transition,
53
- lineTranslate: StyleTypes.Translation,
54
- lineTranslateTransition: StyleTypes.Transition,
55
- lineTranslateAnchor: StyleTypes.Enum,
56
- lineWidth: StyleTypes.Constant,
57
- lineWidthTransition: StyleTypes.Transition,
58
- lineGapWidth: StyleTypes.Constant,
59
- lineGapWidthTransition: StyleTypes.Transition,
60
- lineOffset: StyleTypes.Constant,
61
- lineOffsetTransition: StyleTypes.Transition,
62
- lineBlur: StyleTypes.Constant,
63
- lineBlurTransition: StyleTypes.Transition,
64
- lineDasharray: StyleTypes.Constant,
65
- lineDasharrayTransition: StyleTypes.Transition,
66
- linePattern: StyleTypes.Image,
67
- linePatternTransition: StyleTypes.Transition,
68
- lineGradient: StyleTypes.Color,
69
-
70
- symbolPlacement: StyleTypes.Enum,
71
- symbolSpacing: StyleTypes.Constant,
72
- symbolAvoidEdges: StyleTypes.Constant,
73
- symbolSortKey: StyleTypes.Constant,
74
- symbolZOrder: StyleTypes.Enum,
75
- iconAllowOverlap: StyleTypes.Constant,
76
- iconIgnorePlacement: StyleTypes.Constant,
77
- iconOptional: StyleTypes.Constant,
78
- iconRotationAlignment: StyleTypes.Enum,
79
- iconSize: StyleTypes.Constant,
80
- iconTextFit: StyleTypes.Enum,
81
- iconTextFitPadding: StyleTypes.Constant,
82
- iconImage: StyleTypes.Image,
83
- iconRotate: StyleTypes.Constant,
84
- iconPadding: StyleTypes.Constant,
85
- iconKeepUpright: StyleTypes.Constant,
86
- iconOffset: StyleTypes.Constant,
87
- iconAnchor: StyleTypes.Enum,
88
- iconPitchAlignment: StyleTypes.Enum,
89
- textPitchAlignment: StyleTypes.Enum,
90
- textRotationAlignment: StyleTypes.Enum,
91
- textField: StyleTypes.Constant,
92
- textFont: StyleTypes.Constant,
93
- textSize: StyleTypes.Constant,
94
- textMaxWidth: StyleTypes.Constant,
95
- textLineHeight: StyleTypes.Constant,
96
- textLetterSpacing: StyleTypes.Constant,
97
- textJustify: StyleTypes.Enum,
98
- textRadialOffset: StyleTypes.Constant,
99
- textVariableAnchor: StyleTypes.Constant,
100
- textAnchor: StyleTypes.Enum,
101
- textMaxAngle: StyleTypes.Constant,
102
- textWritingMode: StyleTypes.Constant,
103
- textRotate: StyleTypes.Constant,
104
- textPadding: StyleTypes.Constant,
105
- textKeepUpright: StyleTypes.Constant,
106
- textTransform: StyleTypes.Enum,
107
- textOffset: StyleTypes.Constant,
108
- textAllowOverlap: StyleTypes.Constant,
109
- textIgnorePlacement: StyleTypes.Constant,
110
- textOptional: StyleTypes.Constant,
111
- iconOpacity: StyleTypes.Constant,
112
- iconOpacityTransition: StyleTypes.Transition,
113
- iconColor: StyleTypes.Color,
114
- iconColorTransition: StyleTypes.Transition,
115
- iconHaloColor: StyleTypes.Color,
116
- iconHaloColorTransition: StyleTypes.Transition,
117
- iconHaloWidth: StyleTypes.Constant,
118
- iconHaloWidthTransition: StyleTypes.Transition,
119
- iconHaloBlur: StyleTypes.Constant,
120
- iconHaloBlurTransition: StyleTypes.Transition,
121
- iconTranslate: StyleTypes.Translation,
122
- iconTranslateTransition: StyleTypes.Transition,
123
- iconTranslateAnchor: StyleTypes.Enum,
124
- textOpacity: StyleTypes.Constant,
125
- textOpacityTransition: StyleTypes.Transition,
126
- textColor: StyleTypes.Color,
127
- textColorTransition: StyleTypes.Transition,
128
- textHaloColor: StyleTypes.Color,
129
- textHaloColorTransition: StyleTypes.Transition,
130
- textHaloWidth: StyleTypes.Constant,
131
- textHaloWidthTransition: StyleTypes.Transition,
132
- textHaloBlur: StyleTypes.Constant,
133
- textHaloBlurTransition: StyleTypes.Transition,
134
- textTranslate: StyleTypes.Translation,
135
- textTranslateTransition: StyleTypes.Transition,
136
- textTranslateAnchor: StyleTypes.Enum,
137
-
138
- circleSortKey: StyleTypes.Constant,
139
- circleRadius: StyleTypes.Constant,
140
- circleRadiusTransition: StyleTypes.Transition,
141
- circleColor: StyleTypes.Color,
142
- circleColorTransition: StyleTypes.Transition,
143
- circleBlur: StyleTypes.Constant,
144
- circleBlurTransition: StyleTypes.Transition,
145
- circleOpacity: StyleTypes.Constant,
146
- circleOpacityTransition: StyleTypes.Transition,
147
- circleTranslate: StyleTypes.Translation,
148
- circleTranslateTransition: StyleTypes.Transition,
149
- circleTranslateAnchor: StyleTypes.Enum,
150
- circlePitchScale: StyleTypes.Enum,
151
- circlePitchAlignment: StyleTypes.Enum,
152
- circleStrokeWidth: StyleTypes.Constant,
153
- circleStrokeWidthTransition: StyleTypes.Transition,
154
- circleStrokeColor: StyleTypes.Color,
155
- circleStrokeColorTransition: StyleTypes.Transition,
156
- circleStrokeOpacity: StyleTypes.Constant,
157
- circleStrokeOpacityTransition: StyleTypes.Transition,
158
-
159
- heatmapRadius: StyleTypes.Constant,
160
- heatmapRadiusTransition: StyleTypes.Transition,
161
- heatmapWeight: StyleTypes.Constant,
162
- heatmapIntensity: StyleTypes.Constant,
163
- heatmapIntensityTransition: StyleTypes.Transition,
164
- heatmapColor: StyleTypes.Color,
165
- heatmapOpacity: StyleTypes.Constant,
166
- heatmapOpacityTransition: StyleTypes.Transition,
167
-
168
- fillExtrusionOpacity: StyleTypes.Constant,
169
- fillExtrusionOpacityTransition: StyleTypes.Transition,
170
- fillExtrusionColor: StyleTypes.Color,
171
- fillExtrusionColorTransition: StyleTypes.Transition,
172
- fillExtrusionTranslate: StyleTypes.Translation,
173
- fillExtrusionTranslateTransition: StyleTypes.Transition,
174
- fillExtrusionTranslateAnchor: StyleTypes.Enum,
175
- fillExtrusionPattern: StyleTypes.Image,
176
- fillExtrusionPatternTransition: StyleTypes.Transition,
177
- fillExtrusionHeight: StyleTypes.Constant,
178
- fillExtrusionHeightTransition: StyleTypes.Transition,
179
- fillExtrusionBase: StyleTypes.Constant,
180
- fillExtrusionBaseTransition: StyleTypes.Transition,
181
- fillExtrusionVerticalGradient: StyleTypes.Constant,
182
-
183
- rasterOpacity: StyleTypes.Constant,
184
- rasterOpacityTransition: StyleTypes.Transition,
185
- rasterHueRotate: StyleTypes.Constant,
186
- rasterHueRotateTransition: StyleTypes.Transition,
187
- rasterBrightnessMin: StyleTypes.Constant,
188
- rasterBrightnessMinTransition: StyleTypes.Transition,
189
- rasterBrightnessMax: StyleTypes.Constant,
190
- rasterBrightnessMaxTransition: StyleTypes.Transition,
191
- rasterSaturation: StyleTypes.Constant,
192
- rasterSaturationTransition: StyleTypes.Transition,
193
- rasterContrast: StyleTypes.Constant,
194
- rasterContrastTransition: StyleTypes.Transition,
195
- rasterResampling: StyleTypes.Enum,
196
- rasterFadeDuration: StyleTypes.Constant,
197
-
198
- hillshadeIlluminationDirection: StyleTypes.Constant,
199
- hillshadeIlluminationAnchor: StyleTypes.Enum,
200
- hillshadeExaggeration: StyleTypes.Constant,
201
- hillshadeExaggerationTransition: StyleTypes.Transition,
202
- hillshadeShadowColor: StyleTypes.Color,
203
- hillshadeShadowColorTransition: StyleTypes.Transition,
204
- hillshadeHighlightColor: StyleTypes.Color,
205
- hillshadeHighlightColorTransition: StyleTypes.Transition,
206
- hillshadeAccentColor: StyleTypes.Color,
207
- hillshadeAccentColorTransition: StyleTypes.Transition,
208
-
209
- backgroundColor: StyleTypes.Color,
210
- backgroundColorTransition: StyleTypes.Transition,
211
- backgroundPattern: StyleTypes.Image,
212
- backgroundPatternTransition: StyleTypes.Transition,
213
- backgroundOpacity: StyleTypes.Constant,
214
- backgroundOpacityTransition: StyleTypes.Transition,
215
-
216
- anchor: StyleTypes.Enum,
217
- position: StyleTypes.Constant,
218
- positionTransition: StyleTypes.Transition,
219
- color: StyleTypes.Color,
220
- colorTransition: StyleTypes.Transition,
221
- intensity: StyleTypes.Constant,
222
- intensityTransition: StyleTypes.Transition,
223
-
224
- visibility: StyleTypes.Constant,
225
- };
226
-
227
- export const styleExtras = {
228
- // padding
229
- iconTextFitPadding: {
230
- iosType: "edgeinsets",
231
- },
232
-
233
- // offsets
234
- iconOffset: {
235
- iosType: "vector",
236
- },
237
- textOffset: {
238
- iosType: "vector",
239
- },
240
- lineOffset: {
241
- iosType: "vector",
242
- },
243
-
244
- // translates
245
- fillTranslate: {
246
- iosType: "vector",
247
- },
248
- lineTranslate: {
249
- iosType: "vector",
250
- },
251
- iconTranslate: {
252
- iosType: "vector",
253
- },
254
- textTranslate: {
255
- iosType: "vector",
256
- },
257
- circleTranslate: {
258
- iosType: "vector",
259
- },
260
- fillExtrusionTranslate: {
261
- iosType: "vector",
262
- },
263
- };
264
-
265
- export default styleMap;