@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
@@ -10,9 +10,9 @@ export interface Transition {
10
10
  delay: number;
11
11
  }
12
12
 
13
- export type FormattedString = string; /* TODO */
13
+ export type FormattedString = string;
14
14
 
15
- type ExpressionName =
15
+ export type ExpressionName =
16
16
  // Types
17
17
  | "array"
18
18
  | "boolean"
@@ -107,7 +107,7 @@ type ExpressionName =
107
107
  | "zoom"
108
108
  | "heatmap-density";
109
109
 
110
- type ExpressionField =
110
+ export type ExpressionField =
111
111
  | string
112
112
  | number
113
113
  | boolean
@@ -129,305 +129,13 @@ type ExpressionParameters =
129
129
 
130
130
  type ResolvedImageType = ImageSourcePropType | string;
131
131
 
132
+ // @ts-ignore
132
133
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
133
134
  export type Value<T, AllowedParameters extends ExpressionParameters[] = []> =
134
135
  | T
135
136
  | Expression;
136
137
 
137
- export enum VisibilityEnum {
138
- /** The layer is shown. */
139
- Visible = "visible",
140
- /** The layer is not shown. */
141
- None = "none",
142
- }
143
- type VisibilityEnumValues = "visible" | "none";
144
- export enum FillTranslateAnchorEnum {
145
- /** The fill is translated relative to the map. */
146
- Map = "map",
147
- /** The fill is translated relative to the viewport. */
148
- Viewport = "viewport",
149
- }
150
- type FillTranslateAnchorEnumValues = "map" | "viewport";
151
- export enum LineCapEnum {
152
- /** A cap with a squared-off end which is drawn to the exact endpoint of the line. */
153
- Butt = "butt",
154
- /** A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line. */
155
- Round = "round",
156
- /** A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width. */
157
- Square = "square",
158
- }
159
- type LineCapEnumValues = "butt" | "round" | "square";
160
- export enum LineJoinEnum {
161
- /** A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width. */
162
- Bevel = "bevel",
163
- /** A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line. */
164
- Round = "round",
165
- /** A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet. */
166
- Miter = "miter",
167
- }
168
- type LineJoinEnumValues = "bevel" | "round" | "miter";
169
- export enum LineTranslateAnchorEnum {
170
- /** The line is translated relative to the map. */
171
- Map = "map",
172
- /** The line is translated relative to the viewport. */
173
- Viewport = "viewport",
174
- }
175
- type LineTranslateAnchorEnumValues = "map" | "viewport";
176
- export enum SymbolPlacementEnum {
177
- /** The label is placed at the point where the geometry is located. */
178
- Point = "point",
179
- /** The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries. */
180
- Line = "line",
181
- /** The label is placed at the center of the line of the geometry. Can only be used on `LineString` and `Polygon` geometries. Note that a single feature in a vector tile may contain multiple line geometries. */
182
- LineCenter = "line-center",
183
- }
184
- type SymbolPlacementEnumValues = "point" | "line" | "line-center";
185
- export enum SymbolZOrderEnum {
186
- /** Sorts symbols by `symbol-sort-key` if set. Otherwise, sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`. */
187
- Auto = "auto",
188
- /** Sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`. */
189
- ViewportY = "viewport-y",
190
- /** Sorts symbols by `symbol-sort-key` if set. Otherwise, no sorting is applied; symbols are rendered in the same order as the source data. */
191
- Source = "source",
192
- }
193
- type SymbolZOrderEnumValues = "auto" | "viewport-y" | "source";
194
- export enum IconRotationAlignmentEnum {
195
- /** When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line` or `line-center`, aligns icon x-axes with the line. */
196
- Map = "map",
197
- /** Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`. */
198
- Viewport = "viewport",
199
- /** When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`. */
200
- Auto = "auto",
201
- }
202
- type IconRotationAlignmentEnumValues = "map" | "viewport" | "auto";
203
- export enum IconTextFitEnum {
204
- /** The icon is displayed at its intrinsic aspect ratio. */
205
- None = "none",
206
- /** The icon is scaled in the x-dimension to fit the width of the text. */
207
- Width = "width",
208
- /** The icon is scaled in the y-dimension to fit the height of the text. */
209
- Height = "height",
210
- /** The icon is scaled in both x- and y-dimensions. */
211
- Both = "both",
212
- }
213
- type IconTextFitEnumValues = "none" | "width" | "height" | "both";
214
- export enum IconAnchorEnum {
215
- /** The center of the icon is placed closest to the anchor. */
216
- Center = "center",
217
- /** The left side of the icon is placed closest to the anchor. */
218
- Left = "left",
219
- /** The right side of the icon is placed closest to the anchor. */
220
- Right = "right",
221
- /** The top of the icon is placed closest to the anchor. */
222
- Top = "top",
223
- /** The bottom of the icon is placed closest to the anchor. */
224
- Bottom = "bottom",
225
- /** The top left corner of the icon is placed closest to the anchor. */
226
- TopLeft = "top-left",
227
- /** The top right corner of the icon is placed closest to the anchor. */
228
- TopRight = "top-right",
229
- /** The bottom left corner of the icon is placed closest to the anchor. */
230
- BottomLeft = "bottom-left",
231
- /** The bottom right corner of the icon is placed closest to the anchor. */
232
- BottomRight = "bottom-right",
233
- }
234
- type IconAnchorEnumValues =
235
- | "center"
236
- | "left"
237
- | "right"
238
- | "top"
239
- | "bottom"
240
- | "top-left"
241
- | "top-right"
242
- | "bottom-left"
243
- | "bottom-right";
244
- export enum IconPitchAlignmentEnum {
245
- /** The icon is aligned to the plane of the map. */
246
- Map = "map",
247
- /** The icon is aligned to the plane of the viewport. */
248
- Viewport = "viewport",
249
- /** Automatically matches the value of `icon-rotation-alignment`. */
250
- Auto = "auto",
251
- }
252
- type IconPitchAlignmentEnumValues = "map" | "viewport" | "auto";
253
- export enum TextPitchAlignmentEnum {
254
- /** The text is aligned to the plane of the map. */
255
- Map = "map",
256
- /** The text is aligned to the plane of the viewport. */
257
- Viewport = "viewport",
258
- /** Automatically matches the value of `text-rotation-alignment`. */
259
- Auto = "auto",
260
- }
261
- type TextPitchAlignmentEnumValues = "map" | "viewport" | "auto";
262
- export enum TextRotationAlignmentEnum {
263
- /** When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line` or `line-center`, aligns text x-axes with the line. */
264
- Map = "map",
265
- /** Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`. */
266
- Viewport = "viewport",
267
- /** When `symbol-placement` is set to `point`, aligns text to the x-axis of the viewport. When `symbol-placement` is set to `line` or `line-center`, aligns glyphs to the x-axis of the viewport and places them along the line. */
268
- ViewportGlyph = "viewport-glyph",
269
- /** When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`. */
270
- Auto = "auto",
271
- }
272
- type TextRotationAlignmentEnumValues =
273
- | "map"
274
- | "viewport"
275
- | "viewport-glyph"
276
- | "auto";
277
- export enum TextJustifyEnum {
278
- /** The text is aligned towards the anchor position. */
279
- Auto = "auto",
280
- /** The text is aligned to the left. */
281
- Left = "left",
282
- /** The text is centered. */
283
- Center = "center",
284
- /** The text is aligned to the right. */
285
- Right = "right",
286
- }
287
- type TextJustifyEnumValues = "auto" | "left" | "center" | "right";
288
- export enum TextVariableAnchorEnum {
289
- /** The center of the text is placed closest to the anchor. */
290
- Center = "center",
291
- /** The left side of the text is placed closest to the anchor. */
292
- Left = "left",
293
- /** The right side of the text is placed closest to the anchor. */
294
- Right = "right",
295
- /** The top of the text is placed closest to the anchor. */
296
- Top = "top",
297
- /** The bottom of the text is placed closest to the anchor. */
298
- Bottom = "bottom",
299
- /** The top left corner of the text is placed closest to the anchor. */
300
- TopLeft = "top-left",
301
- /** The top right corner of the text is placed closest to the anchor. */
302
- TopRight = "top-right",
303
- /** The bottom left corner of the text is placed closest to the anchor. */
304
- BottomLeft = "bottom-left",
305
- /** The bottom right corner of the text is placed closest to the anchor. */
306
- BottomRight = "bottom-right",
307
- }
308
- type TextVariableAnchorEnumValues =
309
- | "center"
310
- | "left"
311
- | "right"
312
- | "top"
313
- | "bottom"
314
- | "top-left"
315
- | "top-right"
316
- | "bottom-left"
317
- | "bottom-right";
318
- export enum TextAnchorEnum {
319
- /** The center of the text is placed closest to the anchor. */
320
- Center = "center",
321
- /** The left side of the text is placed closest to the anchor. */
322
- Left = "left",
323
- /** The right side of the text is placed closest to the anchor. */
324
- Right = "right",
325
- /** The top of the text is placed closest to the anchor. */
326
- Top = "top",
327
- /** The bottom of the text is placed closest to the anchor. */
328
- Bottom = "bottom",
329
- /** The top left corner of the text is placed closest to the anchor. */
330
- TopLeft = "top-left",
331
- /** The top right corner of the text is placed closest to the anchor. */
332
- TopRight = "top-right",
333
- /** The bottom left corner of the text is placed closest to the anchor. */
334
- BottomLeft = "bottom-left",
335
- /** The bottom right corner of the text is placed closest to the anchor. */
336
- BottomRight = "bottom-right",
337
- }
338
- type TextAnchorEnumValues =
339
- | "center"
340
- | "left"
341
- | "right"
342
- | "top"
343
- | "bottom"
344
- | "top-left"
345
- | "top-right"
346
- | "bottom-left"
347
- | "bottom-right";
348
- export enum TextWritingModeEnum {
349
- /** If a text's language supports horizontal writing mode, symbols with point placement would be laid out horizontally. */
350
- Horizontal = "horizontal",
351
- /** If a text's language supports vertical writing mode, symbols with point placement would be laid out vertically. */
352
- Vertical = "vertical",
353
- }
354
- type TextWritingModeEnumValues = "horizontal" | "vertical";
355
- export enum TextTransformEnum {
356
- /** The text is not altered. */
357
- None = "none",
358
- /** Forces all letters to be displayed in uppercase. */
359
- Uppercase = "uppercase",
360
- /** Forces all letters to be displayed in lowercase. */
361
- Lowercase = "lowercase",
362
- }
363
- type TextTransformEnumValues = "none" | "uppercase" | "lowercase";
364
- export enum IconTranslateAnchorEnum {
365
- /** Icons are translated relative to the map. */
366
- Map = "map",
367
- /** Icons are translated relative to the viewport. */
368
- Viewport = "viewport",
369
- }
370
- type IconTranslateAnchorEnumValues = "map" | "viewport";
371
- export enum TextTranslateAnchorEnum {
372
- /** The text is translated relative to the map. */
373
- Map = "map",
374
- /** The text is translated relative to the viewport. */
375
- Viewport = "viewport",
376
- }
377
- type TextTranslateAnchorEnumValues = "map" | "viewport";
378
- export enum CircleTranslateAnchorEnum {
379
- /** The circle is translated relative to the map. */
380
- Map = "map",
381
- /** The circle is translated relative to the viewport. */
382
- Viewport = "viewport",
383
- }
384
- type CircleTranslateAnchorEnumValues = "map" | "viewport";
385
- export enum CirclePitchScaleEnum {
386
- /** Circles are scaled according to their apparent distance to the camera. */
387
- Map = "map",
388
- /** Circles are not scaled. */
389
- Viewport = "viewport",
390
- }
391
- type CirclePitchScaleEnumValues = "map" | "viewport";
392
- export enum CirclePitchAlignmentEnum {
393
- /** The circle is aligned to the plane of the map. */
394
- Map = "map",
395
- /** The circle is aligned to the plane of the viewport. */
396
- Viewport = "viewport",
397
- }
398
- type CirclePitchAlignmentEnumValues = "map" | "viewport";
399
- export enum FillExtrusionTranslateAnchorEnum {
400
- /** The fill extrusion is translated relative to the map. */
401
- Map = "map",
402
- /** The fill extrusion is translated relative to the viewport. */
403
- Viewport = "viewport",
404
- }
405
- type FillExtrusionTranslateAnchorEnumValues = "map" | "viewport";
406
- export enum RasterResamplingEnum {
407
- /** (Bi)linear filtering interpolates pixel values using the weighted average of the four closest original source pixels creating a smooth but blurry look when overscaled */
408
- Linear = "linear",
409
- /** Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled */
410
- Nearest = "nearest",
411
- }
412
- type RasterResamplingEnumValues = "linear" | "nearest";
413
- export enum HillshadeIlluminationAnchorEnum {
414
- /** The hillshade illumination is relative to the north direction. */
415
- Map = "map",
416
- /** The hillshade illumination is relative to the top of the viewport. */
417
- Viewport = "viewport",
418
- }
419
- type HillshadeIlluminationAnchorEnumValues = "map" | "viewport";
420
- export enum AnchorEnum {
421
- /** The position of the light source is aligned to the rotation of the map. */
422
- Map = "map",
423
- /** The position of the light source is aligned to the rotation of the viewport. */
424
- Viewport = "viewport",
425
- }
426
- type AnchorEnumValues = "map" | "viewport";
427
-
428
- type Enum<EnumType, EnumValues> = EnumType | EnumValues;
429
-
430
- export interface FillLayerStyleProps {
138
+ export interface FillLayerStyle {
431
139
  /**
432
140
  * Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.
433
141
  */
@@ -435,7 +143,7 @@ export interface FillLayerStyleProps {
435
143
  /**
436
144
  * Whether this layer is displayed.
437
145
  */
438
- visibility?: Enum<VisibilityEnum, VisibilityEnumValues>;
146
+ visibility?: "visible" | "none";
439
147
  /**
440
148
  * Whether or not the fill should be antialiased.
441
149
  */
@@ -485,10 +193,7 @@ export interface FillLayerStyleProps {
485
193
  *
486
194
  * @requires fillTranslate
487
195
  */
488
- fillTranslateAnchor?: Value<
489
- Enum<FillTranslateAnchorEnum, FillTranslateAnchorEnumValues>,
490
- ["zoom"]
491
- >;
196
+ fillTranslateAnchor?: Value<"map" | "viewport", ["zoom"]>;
492
197
  /**
493
198
  * Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoomDependent expressions will be evaluated only at integer zoom levels.
494
199
  */
@@ -499,15 +204,15 @@ export interface FillLayerStyleProps {
499
204
  */
500
205
  fillPatternTransition?: Transition;
501
206
  }
502
- export interface LineLayerStyleProps {
207
+ export interface LineLayerStyle {
503
208
  /**
504
209
  * The display of line endings.
505
210
  */
506
- lineCap?: Value<Enum<LineCapEnum, LineCapEnumValues>, ["zoom"]>;
211
+ lineCap?: Value<"butt" | "round" | "square", ["zoom"]>;
507
212
  /**
508
213
  * The display of lines when joining.
509
214
  */
510
- lineJoin?: Value<Enum<LineJoinEnum, LineJoinEnumValues>, ["zoom", "feature"]>;
215
+ lineJoin?: Value<"bevel" | "round" | "miter", ["zoom", "feature"]>;
511
216
  /**
512
217
  * Used to automatically convert miter joins to bevel joins for sharp angles.
513
218
  */
@@ -523,7 +228,7 @@ export interface LineLayerStyleProps {
523
228
  /**
524
229
  * Whether this layer is displayed.
525
230
  */
526
- visibility?: Enum<VisibilityEnum, VisibilityEnumValues>;
231
+ visibility?: "visible" | "none";
527
232
  /**
528
233
  * The opacity at which the line will be drawn.
529
234
  */
@@ -558,10 +263,7 @@ export interface LineLayerStyleProps {
558
263
  *
559
264
  * @requires lineTranslate
560
265
  */
561
- lineTranslateAnchor?: Value<
562
- Enum<LineTranslateAnchorEnum, LineTranslateAnchorEnumValues>,
563
- ["zoom"]
564
- >;
266
+ lineTranslateAnchor?: Value<"map" | "viewport", ["zoom"]>;
565
267
  /**
566
268
  * Stroke thickness.
567
269
  */
@@ -625,14 +327,11 @@ export interface LineLayerStyleProps {
625
327
  */
626
328
  lineGradient?: Value<string, ["line-progress"]>;
627
329
  }
628
- export interface SymbolLayerStyleProps {
330
+ export interface SymbolLayerStyle {
629
331
  /**
630
332
  * Label placement relative to its geometry.
631
333
  */
632
- symbolPlacement?: Value<
633
- Enum<SymbolPlacementEnum, SymbolPlacementEnumValues>,
634
- ["zoom"]
635
- >;
334
+ symbolPlacement?: Value<"point" | "line" | "line-center", ["zoom"]>;
636
335
  /**
637
336
  * Distance between two symbol anchors.
638
337
  */
@@ -648,10 +347,7 @@ export interface SymbolLayerStyleProps {
648
347
  /**
649
348
  * Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their yPosition relative to the viewport. To control the order and prioritization of symbols otherwise, use `symbolSortKey`.
650
349
  */
651
- symbolZOrder?: Value<
652
- Enum<SymbolZOrderEnum, SymbolZOrderEnumValues>,
653
- ["zoom"]
654
- >;
350
+ symbolZOrder?: Value<"auto" | "viewport-y" | "source", ["zoom"]>;
655
351
  /**
656
352
  * If true, the icon will be visible even if it collides with other previously drawn symbols.
657
353
  *
@@ -677,10 +373,7 @@ export interface SymbolLayerStyleProps {
677
373
  *
678
374
  * @requires iconImage
679
375
  */
680
- iconRotationAlignment?: Value<
681
- Enum<IconRotationAlignmentEnum, IconRotationAlignmentEnumValues>,
682
- ["zoom"]
683
- >;
376
+ iconRotationAlignment?: Value<"map" | "viewport" | "auto", ["zoom"]>;
684
377
  /**
685
378
  * Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `iconSize`. 1 is the original size; 3 triples the size of the image.
686
379
  *
@@ -692,7 +385,7 @@ export interface SymbolLayerStyleProps {
692
385
  *
693
386
  * @requires iconImage, textField
694
387
  */
695
- iconTextFit?: Value<Enum<IconTextFitEnum, IconTextFitEnumValues>, ["zoom"]>;
388
+ iconTextFit?: Value<"none" | "width" | "height" | "both", ["zoom"]>;
696
389
  /**
697
390
  * Size of the additional area added to dimensions determined by `iconTextFit`, in clockwise order: top, right, bottom, left.
698
391
  *
@@ -733,7 +426,15 @@ export interface SymbolLayerStyleProps {
733
426
  * @requires iconImage
734
427
  */
735
428
  iconAnchor?: Value<
736
- Enum<IconAnchorEnum, IconAnchorEnumValues>,
429
+ | "center"
430
+ | "left"
431
+ | "right"
432
+ | "top"
433
+ | "bottom"
434
+ | "top-left"
435
+ | "top-right"
436
+ | "bottom-left"
437
+ | "bottom-right",
737
438
  ["zoom", "feature"]
738
439
  >;
739
440
  /**
@@ -741,26 +442,20 @@ export interface SymbolLayerStyleProps {
741
442
  *
742
443
  * @requires iconImage
743
444
  */
744
- iconPitchAlignment?: Value<
745
- Enum<IconPitchAlignmentEnum, IconPitchAlignmentEnumValues>,
746
- ["zoom"]
747
- >;
445
+ iconPitchAlignment?: Value<"map" | "viewport" | "auto", ["zoom"]>;
748
446
  /**
749
447
  * Orientation of text when map is pitched.
750
448
  *
751
449
  * @requires textField
752
450
  */
753
- textPitchAlignment?: Value<
754
- Enum<TextPitchAlignmentEnum, TextPitchAlignmentEnumValues>,
755
- ["zoom"]
756
- >;
451
+ textPitchAlignment?: Value<"map" | "viewport" | "auto", ["zoom"]>;
757
452
  /**
758
453
  * In combination with `symbolPlacement`, determines the rotation behavior of the individual glyphs forming the text.
759
454
  *
760
455
  * @requires textField
761
456
  */
762
457
  textRotationAlignment?: Value<
763
- Enum<TextRotationAlignmentEnum, TextRotationAlignmentEnumValues>,
458
+ "map" | "viewport" | "viewport-glyph" | "auto",
764
459
  ["zoom"]
765
460
  >;
766
461
  /**
@@ -803,7 +498,7 @@ export interface SymbolLayerStyleProps {
803
498
  * @requires textField
804
499
  */
805
500
  textJustify?: Value<
806
- Enum<TextJustifyEnum, TextJustifyEnumValues>,
501
+ "auto" | "left" | "center" | "right",
807
502
  ["zoom", "feature"]
808
503
  >;
809
504
  /**
@@ -818,7 +513,17 @@ export interface SymbolLayerStyleProps {
818
513
  * @requires textField
819
514
  */
820
515
  textVariableAnchor?: Value<
821
- Enum<TextVariableAnchorEnum, TextVariableAnchorEnumValues>[],
516
+ (
517
+ | "center"
518
+ | "left"
519
+ | "right"
520
+ | "top"
521
+ | "bottom"
522
+ | "top-left"
523
+ | "top-right"
524
+ | "bottom-left"
525
+ | "bottom-right"
526
+ )[],
822
527
  ["zoom"]
823
528
  >;
824
529
  /**
@@ -829,7 +534,15 @@ export interface SymbolLayerStyleProps {
829
534
  * @disabledBy textVariableAnchor
830
535
  */
831
536
  textAnchor?: Value<
832
- Enum<TextAnchorEnum, TextAnchorEnumValues>,
537
+ | "center"
538
+ | "left"
539
+ | "right"
540
+ | "top"
541
+ | "bottom"
542
+ | "top-left"
543
+ | "top-right"
544
+ | "bottom-left"
545
+ | "bottom-right",
833
546
  ["zoom", "feature"]
834
547
  >;
835
548
  /**
@@ -843,10 +556,7 @@ export interface SymbolLayerStyleProps {
843
556
  *
844
557
  * @requires textField
845
558
  */
846
- textWritingMode?: Value<
847
- Enum<TextWritingModeEnum, TextWritingModeEnumValues>[],
848
- ["zoom"]
849
- >;
559
+ textWritingMode?: Value<("horizontal" | "vertical")[], ["zoom"]>;
850
560
  /**
851
561
  * Rotates the text clockwise.
852
562
  *
@@ -871,7 +581,7 @@ export interface SymbolLayerStyleProps {
871
581
  * @requires textField
872
582
  */
873
583
  textTransform?: Value<
874
- Enum<TextTransformEnum, TextTransformEnumValues>,
584
+ "none" | "uppercase" | "lowercase",
875
585
  ["zoom", "feature"]
876
586
  >;
877
587
  /**
@@ -905,7 +615,7 @@ export interface SymbolLayerStyleProps {
905
615
  /**
906
616
  * Whether this layer is displayed.
907
617
  */
908
- visibility?: Enum<VisibilityEnum, VisibilityEnumValues>;
618
+ visibility?: "visible" | "none";
909
619
  /**
910
620
  * The opacity at which the icon will be drawn.
911
621
  *
@@ -979,10 +689,7 @@ The unit is in pixels only for SDF sprites that were created with a blur radius
979
689
  *
980
690
  * @requires iconImage, iconTranslate
981
691
  */
982
- iconTranslateAnchor?: Value<
983
- Enum<IconTranslateAnchorEnum, IconTranslateAnchorEnumValues>,
984
- ["zoom"]
985
- >;
692
+ iconTranslateAnchor?: Value<"map" | "viewport", ["zoom"]>;
986
693
  /**
987
694
  * The opacity at which the text will be drawn.
988
695
  *
@@ -1054,12 +761,9 @@ The unit is in pixels only for SDF sprites that were created with a blur radius
1054
761
  *
1055
762
  * @requires textField, textTranslate
1056
763
  */
1057
- textTranslateAnchor?: Value<
1058
- Enum<TextTranslateAnchorEnum, TextTranslateAnchorEnumValues>,
1059
- ["zoom"]
1060
- >;
764
+ textTranslateAnchor?: Value<"map" | "viewport", ["zoom"]>;
1061
765
  }
1062
- export interface CircleLayerStyleProps {
766
+ export interface CircleLayerStyle {
1063
767
  /**
1064
768
  * Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.
1065
769
  */
@@ -1067,7 +771,7 @@ export interface CircleLayerStyleProps {
1067
771
  /**
1068
772
  * Whether this layer is displayed.
1069
773
  */
1070
- visibility?: Enum<VisibilityEnum, VisibilityEnumValues>;
774
+ visibility?: "visible" | "none";
1071
775
  /**
1072
776
  * Circle radius.
1073
777
  */
@@ -1118,24 +822,15 @@ export interface CircleLayerStyleProps {
1118
822
  *
1119
823
  * @requires circleTranslate
1120
824
  */
1121
- circleTranslateAnchor?: Value<
1122
- Enum<CircleTranslateAnchorEnum, CircleTranslateAnchorEnumValues>,
1123
- ["zoom"]
1124
- >;
825
+ circleTranslateAnchor?: Value<"map" | "viewport", ["zoom"]>;
1125
826
  /**
1126
827
  * Controls the scaling behavior of the circle when the map is pitched.
1127
828
  */
1128
- circlePitchScale?: Value<
1129
- Enum<CirclePitchScaleEnum, CirclePitchScaleEnumValues>,
1130
- ["zoom"]
1131
- >;
829
+ circlePitchScale?: Value<"map" | "viewport", ["zoom"]>;
1132
830
  /**
1133
831
  * Orientation of circle when map is pitched.
1134
832
  */
1135
- circlePitchAlignment?: Value<
1136
- Enum<CirclePitchAlignmentEnum, CirclePitchAlignmentEnumValues>,
1137
- ["zoom"]
1138
- >;
833
+ circlePitchAlignment?: Value<"map" | "viewport", ["zoom"]>;
1139
834
  /**
1140
835
  * The width of the circle's stroke. Strokes are placed outside of the `circleRadius`.
1141
836
  */
@@ -1164,11 +859,11 @@ export interface CircleLayerStyleProps {
1164
859
  */
1165
860
  circleStrokeOpacityTransition?: Transition;
1166
861
  }
1167
- export interface HeatmapLayerStyleProps {
862
+ export interface HeatmapLayerStyle {
1168
863
  /**
1169
864
  * Whether this layer is displayed.
1170
865
  */
1171
- visibility?: Enum<VisibilityEnum, VisibilityEnumValues>;
866
+ visibility?: "visible" | "none";
1172
867
  /**
1173
868
  * Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed.
1174
869
  */
@@ -1205,11 +900,11 @@ export interface HeatmapLayerStyleProps {
1205
900
  */
1206
901
  heatmapOpacityTransition?: Transition;
1207
902
  }
1208
- export interface FillExtrusionLayerStyleProps {
903
+ export interface FillExtrusionLayerStyle {
1209
904
  /**
1210
905
  * Whether this layer is displayed.
1211
906
  */
1212
- visibility?: Enum<VisibilityEnum, VisibilityEnumValues>;
907
+ visibility?: "visible" | "none";
1213
908
  /**
1214
909
  * The opacity of the entire fill extrusion layer. This is rendered on a perLayer, not perFeature, basis, and dataDriven styling is not available.
1215
910
  */
@@ -1244,13 +939,7 @@ export interface FillExtrusionLayerStyleProps {
1244
939
  *
1245
940
  * @requires fillExtrusionTranslate
1246
941
  */
1247
- fillExtrusionTranslateAnchor?: Value<
1248
- Enum<
1249
- FillExtrusionTranslateAnchorEnum,
1250
- FillExtrusionTranslateAnchorEnumValues
1251
- >,
1252
- ["zoom"]
1253
- >;
942
+ fillExtrusionTranslateAnchor?: Value<"map" | "viewport", ["zoom"]>;
1254
943
  /**
1255
944
  * Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoomDependent expressions will be evaluated only at integer zoom levels.
1256
945
  */
@@ -1285,11 +974,11 @@ export interface FillExtrusionLayerStyleProps {
1285
974
  */
1286
975
  fillExtrusionVerticalGradient?: Value<boolean, ["zoom"]>;
1287
976
  }
1288
- export interface RasterLayerStyleProps {
977
+ export interface RasterLayerStyle {
1289
978
  /**
1290
979
  * Whether this layer is displayed.
1291
980
  */
1292
- visibility?: Enum<VisibilityEnum, VisibilityEnumValues>;
981
+ visibility?: "visible" | "none";
1293
982
  /**
1294
983
  * The opacity at which the image will be drawn.
1295
984
  */
@@ -1347,20 +1036,17 @@ export interface RasterLayerStyleProps {
1347
1036
  /**
1348
1037
  * The resampling/interpolation method to use for overscaling, also known as texture magnification filter
1349
1038
  */
1350
- rasterResampling?: Value<
1351
- Enum<RasterResamplingEnum, RasterResamplingEnumValues>,
1352
- ["zoom"]
1353
- >;
1039
+ rasterResampling?: Value<"linear" | "nearest", ["zoom"]>;
1354
1040
  /**
1355
1041
  * Fade duration when a new tile is added, or when a video is started or its coordinates are updated.
1356
1042
  */
1357
1043
  rasterFadeDuration?: Value<number, ["zoom"]>;
1358
1044
  }
1359
- export interface HillshadeLayerStyleProps {
1045
+ export interface HillshadeLayerStyle {
1360
1046
  /**
1361
1047
  * Whether this layer is displayed.
1362
1048
  */
1363
- visibility?: Enum<VisibilityEnum, VisibilityEnumValues>;
1049
+ visibility?: "visible" | "none";
1364
1050
  /**
1365
1051
  * The direction of the light source used to generate the hillshading with 0 as the top of the viewport if `hillshadeIlluminationAnchor` is set to `viewport` and due north if `hillshadeIlluminationAnchor` is set to `map`.
1366
1052
  */
@@ -1368,13 +1054,7 @@ export interface HillshadeLayerStyleProps {
1368
1054
  /**
1369
1055
  * Direction of light source when map is rotated.
1370
1056
  */
1371
- hillshadeIlluminationAnchor?: Value<
1372
- Enum<
1373
- HillshadeIlluminationAnchorEnum,
1374
- HillshadeIlluminationAnchorEnumValues
1375
- >,
1376
- ["zoom"]
1377
- >;
1057
+ hillshadeIlluminationAnchor?: Value<"map" | "viewport", ["zoom"]>;
1378
1058
  /**
1379
1059
  * Intensity of the hillshade
1380
1060
  */
@@ -1412,11 +1092,11 @@ export interface HillshadeLayerStyleProps {
1412
1092
  */
1413
1093
  hillshadeAccentColorTransition?: Transition;
1414
1094
  }
1415
- export interface BackgroundLayerStyleProps {
1095
+ export interface BackgroundLayerStyle {
1416
1096
  /**
1417
1097
  * Whether this layer is displayed.
1418
1098
  */
1419
- visibility?: Enum<VisibilityEnum, VisibilityEnumValues>;
1099
+ visibility?: "visible" | "none";
1420
1100
  /**
1421
1101
  * The color with which the background will be drawn.
1422
1102
  *
@@ -1447,11 +1127,11 @@ export interface BackgroundLayerStyleProps {
1447
1127
  */
1448
1128
  backgroundOpacityTransition?: Transition;
1449
1129
  }
1450
- export interface LightLayerStyleProps {
1130
+ export interface LightLayerStyle {
1451
1131
  /**
1452
1132
  * Whether extruded geometries are lit relative to the map or viewport.
1453
1133
  */
1454
- anchor?: Value<Enum<AnchorEnum, AnchorEnumValues>, ["zoom"]>;
1134
+ anchor?: Value<"map" | "viewport", ["zoom"]>;
1455
1135
  /**
1456
1136
  * Position of the light source relative to lit (extruded) geometries, in [r radial coordinate, a azimuthal angle, p polar angle] where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0° (0° when `light.anchor` is set to `viewport` corresponds to the top of the viewport, or 0° when `light.anchor` is set to `map` corresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0°, directly above, to 180°, directly below).
1457
1137
  */
@@ -1481,14 +1161,14 @@ export interface LightLayerStyleProps {
1481
1161
  intensityTransition?: Transition;
1482
1162
  }
1483
1163
 
1484
- export type AllLayerStyleProps =
1485
- | FillLayerStyleProps
1486
- | LineLayerStyleProps
1487
- | SymbolLayerStyleProps
1488
- | CircleLayerStyleProps
1489
- | HeatmapLayerStyleProps
1490
- | FillExtrusionLayerStyleProps
1491
- | RasterLayerStyleProps
1492
- | HillshadeLayerStyleProps
1493
- | BackgroundLayerStyleProps
1494
- | LightLayerStyleProps;
1164
+ export type AllLayerStyle =
1165
+ | FillLayerStyle
1166
+ | LineLayerStyle
1167
+ | SymbolLayerStyle
1168
+ | CircleLayerStyle
1169
+ | HeatmapLayerStyle
1170
+ | FillExtrusionLayerStyle
1171
+ | RasterLayerStyle
1172
+ | HillshadeLayerStyle
1173
+ | BackgroundLayerStyle
1174
+ | LightLayerStyle;