@maplibre/maplibre-react-native 11.0.0-beta.24 → 11.0.0-beta.26

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 (218) hide show
  1. package/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapView.kt +10 -8
  2. package/ios/modules/offline/MLRNOfflineModule.h +1 -2
  3. package/ios/modules/offline/MLRNOfflineModule.mm +9 -9
  4. package/lib/commonjs/components/annotations/callout/Callout.js +2 -1
  5. package/lib/commonjs/components/annotations/callout/Callout.js.map +1 -1
  6. package/lib/commonjs/components/annotations/marker/Marker.js +4 -2
  7. package/lib/commonjs/components/annotations/marker/Marker.js.map +1 -1
  8. package/lib/commonjs/components/annotations/view-annotation/ViewAnnotation.js +6 -5
  9. package/lib/commonjs/components/annotations/view-annotation/ViewAnnotation.js.map +1 -1
  10. package/lib/commonjs/components/camera/Camera.js.map +1 -1
  11. package/lib/commonjs/components/images/Images.js +2 -2
  12. package/lib/commonjs/components/layer/Layer.js +0 -1
  13. package/lib/commonjs/components/layer/Layer.js.map +1 -1
  14. package/lib/commonjs/components/map/Map.js.map +1 -1
  15. package/lib/commonjs/components/sources/geojson-source/GeoJSONSource.js +2 -2
  16. package/lib/commonjs/components/sources/geojson-source/GeoJSONSource.js.map +1 -1
  17. package/lib/commonjs/components/sources/image-source/ImageSource.js +3 -2
  18. package/lib/commonjs/components/sources/image-source/ImageSource.js.map +1 -1
  19. package/lib/commonjs/components/sources/raster-source/RasterSource.js +4 -3
  20. package/lib/commonjs/components/sources/raster-source/RasterSource.js.map +1 -1
  21. package/lib/commonjs/components/sources/vector-source/VectorSource.js +4 -2
  22. package/lib/commonjs/components/sources/vector-source/VectorSource.js.map +1 -1
  23. package/lib/commonjs/components/user-location/NativeUserLocation.js.map +1 -1
  24. package/lib/commonjs/components/user-location/UserLocation.js.map +1 -1
  25. package/lib/commonjs/modules/log/LogManager.js +5 -4
  26. package/lib/commonjs/modules/log/LogManager.js.map +1 -1
  27. package/lib/commonjs/modules/network/NetworkManager.js +7 -7
  28. package/lib/commonjs/modules/network/NetworkManager.js.map +1 -1
  29. package/lib/commonjs/modules/offline/OfflineManager.js +63 -47
  30. package/lib/commonjs/modules/offline/OfflineManager.js.map +1 -1
  31. package/lib/commonjs/modules/transform-request/TransformRequestManager.js +50 -45
  32. package/lib/commonjs/modules/transform-request/TransformRequestManager.js.map +1 -1
  33. package/lib/commonjs/plugin/ios.js +9 -8
  34. package/lib/commonjs/plugin/ios.js.map +1 -1
  35. package/lib/commonjs/types/Anchor.js +5 -6
  36. package/lib/commonjs/types/Anchor.js.map +1 -1
  37. package/lib/commonjs/utils/animated/AbstractAnimatedCoordinates.js +2 -2
  38. package/lib/commonjs/utils/animated/AnimatedCoordinatesArray.js +6 -6
  39. package/lib/commonjs/utils/animated/AnimatedGeoJSON.js +2 -1
  40. package/lib/commonjs/utils/animated/AnimatedGeoJSON.js.map +1 -1
  41. package/lib/commonjs/utils/animated/AnimatedRouteCoordinatesArray.js +6 -6
  42. package/lib/commonjs/utils/convertStyleSpec.js +4 -4
  43. package/lib/module/components/annotations/callout/Callout.js +2 -1
  44. package/lib/module/components/annotations/callout/Callout.js.map +1 -1
  45. package/lib/module/components/annotations/marker/Marker.js +4 -2
  46. package/lib/module/components/annotations/marker/Marker.js.map +1 -1
  47. package/lib/module/components/annotations/view-annotation/ViewAnnotation.js +6 -5
  48. package/lib/module/components/annotations/view-annotation/ViewAnnotation.js.map +1 -1
  49. package/lib/module/components/camera/Camera.js.map +1 -1
  50. package/lib/module/components/images/Images.js +2 -2
  51. package/lib/module/components/layer/Layer.js +0 -1
  52. package/lib/module/components/layer/Layer.js.map +1 -1
  53. package/lib/module/components/map/Map.js.map +1 -1
  54. package/lib/module/components/sources/geojson-source/GeoJSONSource.js +2 -2
  55. package/lib/module/components/sources/geojson-source/GeoJSONSource.js.map +1 -1
  56. package/lib/module/components/sources/image-source/ImageSource.js +3 -2
  57. package/lib/module/components/sources/image-source/ImageSource.js.map +1 -1
  58. package/lib/module/components/sources/raster-source/RasterSource.js +4 -3
  59. package/lib/module/components/sources/raster-source/RasterSource.js.map +1 -1
  60. package/lib/module/components/sources/vector-source/VectorSource.js +4 -2
  61. package/lib/module/components/sources/vector-source/VectorSource.js.map +1 -1
  62. package/lib/module/components/user-location/NativeUserLocation.js.map +1 -1
  63. package/lib/module/components/user-location/UserLocation.js.map +1 -1
  64. package/lib/module/modules/log/LogManager.js +5 -4
  65. package/lib/module/modules/log/LogManager.js.map +1 -1
  66. package/lib/module/modules/network/NetworkManager.js +7 -7
  67. package/lib/module/modules/network/NetworkManager.js.map +1 -1
  68. package/lib/module/modules/offline/OfflineManager.js +63 -47
  69. package/lib/module/modules/offline/OfflineManager.js.map +1 -1
  70. package/lib/module/modules/transform-request/TransformRequestManager.js +50 -45
  71. package/lib/module/modules/transform-request/TransformRequestManager.js.map +1 -1
  72. package/lib/module/plugin/ios.js +9 -8
  73. package/lib/module/plugin/ios.js.map +1 -1
  74. package/lib/module/types/Anchor.js +5 -6
  75. package/lib/module/types/Anchor.js.map +1 -1
  76. package/lib/module/utils/animated/AbstractAnimatedCoordinates.js +2 -2
  77. package/lib/module/utils/animated/AnimatedCoordinatesArray.js +6 -6
  78. package/lib/module/utils/animated/AnimatedGeoJSON.js +2 -1
  79. package/lib/module/utils/animated/AnimatedGeoJSON.js.map +1 -1
  80. package/lib/module/utils/animated/AnimatedRouteCoordinatesArray.js +6 -6
  81. package/lib/module/utils/convertStyleSpec.js +4 -4
  82. package/lib/typescript/commonjs/components/annotations/callout/Callout.d.ts +3 -2
  83. package/lib/typescript/commonjs/components/annotations/callout/Callout.d.ts.map +1 -1
  84. package/lib/typescript/commonjs/components/annotations/marker/Marker.d.ts +15 -14
  85. package/lib/typescript/commonjs/components/annotations/marker/Marker.d.ts.map +1 -1
  86. package/lib/typescript/commonjs/components/annotations/view-annotation/ViewAnnotation.d.ts +26 -24
  87. package/lib/typescript/commonjs/components/annotations/view-annotation/ViewAnnotation.d.ts.map +1 -1
  88. package/lib/typescript/commonjs/components/camera/Camera.d.ts +10 -24
  89. package/lib/typescript/commonjs/components/camera/Camera.d.ts.map +1 -1
  90. package/lib/typescript/commonjs/components/images/Images.d.ts +12 -12
  91. package/lib/typescript/commonjs/components/layer/Layer.d.ts +0 -1
  92. package/lib/typescript/commonjs/components/layer/Layer.d.ts.map +1 -1
  93. package/lib/typescript/commonjs/components/map/Map.d.ts +54 -51
  94. package/lib/typescript/commonjs/components/map/Map.d.ts.map +1 -1
  95. package/lib/typescript/commonjs/components/sources/geojson-source/GeoJSONSource.d.ts +40 -41
  96. package/lib/typescript/commonjs/components/sources/geojson-source/GeoJSONSource.d.ts.map +1 -1
  97. package/lib/typescript/commonjs/components/sources/image-source/ImageSource.d.ts +5 -3
  98. package/lib/typescript/commonjs/components/sources/image-source/ImageSource.d.ts.map +1 -1
  99. package/lib/typescript/commonjs/components/sources/raster-source/RasterSource.d.ts +20 -15
  100. package/lib/typescript/commonjs/components/sources/raster-source/RasterSource.d.ts.map +1 -1
  101. package/lib/typescript/commonjs/components/sources/vector-source/VectorSource.d.ts +23 -20
  102. package/lib/typescript/commonjs/components/sources/vector-source/VectorSource.d.ts.map +1 -1
  103. package/lib/typescript/commonjs/components/user-location/NativeUserLocation.d.ts +9 -6
  104. package/lib/typescript/commonjs/components/user-location/NativeUserLocation.d.ts.map +1 -1
  105. package/lib/typescript/commonjs/components/user-location/UserLocation.d.ts +4 -2
  106. package/lib/typescript/commonjs/components/user-location/UserLocation.d.ts.map +1 -1
  107. package/lib/typescript/commonjs/hooks/useCurrentPosition.d.ts +2 -2
  108. package/lib/typescript/commonjs/modules/log/LogManager.d.ts +5 -4
  109. package/lib/typescript/commonjs/modules/log/LogManager.d.ts.map +1 -1
  110. package/lib/typescript/commonjs/modules/network/NetworkManager.d.ts +7 -7
  111. package/lib/typescript/commonjs/modules/network/NetworkManager.d.ts.map +1 -1
  112. package/lib/typescript/commonjs/modules/offline/OfflineManager.d.ts +63 -47
  113. package/lib/typescript/commonjs/modules/offline/OfflineManager.d.ts.map +1 -1
  114. package/lib/typescript/commonjs/modules/static-map/StaticMapManager.d.ts +2 -2
  115. package/lib/typescript/commonjs/modules/transform-request/TransformRequestManager.d.ts +56 -49
  116. package/lib/typescript/commonjs/modules/transform-request/TransformRequestManager.d.ts.map +1 -1
  117. package/lib/typescript/commonjs/plugin/MapLibrePluginProps.d.ts +10 -15
  118. package/lib/typescript/commonjs/plugin/MapLibrePluginProps.d.ts.map +1 -1
  119. package/lib/typescript/commonjs/plugin/ios.d.ts +2 -2
  120. package/lib/typescript/commonjs/plugin/ios.d.ts.map +1 -1
  121. package/lib/typescript/commonjs/types/Anchor.d.ts +5 -6
  122. package/lib/typescript/commonjs/types/Anchor.d.ts.map +1 -1
  123. package/lib/typescript/commonjs/types/LngLatBounds.d.ts +2 -1
  124. package/lib/typescript/commonjs/types/LngLatBounds.d.ts.map +1 -1
  125. package/lib/typescript/commonjs/types/MapLibreRNStyles.d.ts +243 -93
  126. package/lib/typescript/commonjs/types/MapLibreRNStyles.d.ts.map +1 -1
  127. package/lib/typescript/commonjs/types/sources/PressableSourceProps.d.ts +1 -2
  128. package/lib/typescript/commonjs/types/sources/PressableSourceProps.d.ts.map +1 -1
  129. package/lib/typescript/commonjs/utils/animated/AbstractAnimatedCoordinates.d.ts +2 -2
  130. package/lib/typescript/commonjs/utils/animated/AnimatedCoordinatesArray.d.ts +6 -6
  131. package/lib/typescript/commonjs/utils/animated/AnimatedGeoJSON.d.ts +2 -1
  132. package/lib/typescript/commonjs/utils/animated/AnimatedGeoJSON.d.ts.map +1 -1
  133. package/lib/typescript/commonjs/utils/animated/AnimatedRouteCoordinatesArray.d.ts +6 -6
  134. package/lib/typescript/commonjs/utils/convertStyleSpec.d.ts +4 -4
  135. package/lib/typescript/module/components/annotations/callout/Callout.d.ts +3 -2
  136. package/lib/typescript/module/components/annotations/callout/Callout.d.ts.map +1 -1
  137. package/lib/typescript/module/components/annotations/marker/Marker.d.ts +15 -14
  138. package/lib/typescript/module/components/annotations/marker/Marker.d.ts.map +1 -1
  139. package/lib/typescript/module/components/annotations/view-annotation/ViewAnnotation.d.ts +26 -24
  140. package/lib/typescript/module/components/annotations/view-annotation/ViewAnnotation.d.ts.map +1 -1
  141. package/lib/typescript/module/components/camera/Camera.d.ts +10 -24
  142. package/lib/typescript/module/components/camera/Camera.d.ts.map +1 -1
  143. package/lib/typescript/module/components/images/Images.d.ts +12 -12
  144. package/lib/typescript/module/components/layer/Layer.d.ts +0 -1
  145. package/lib/typescript/module/components/layer/Layer.d.ts.map +1 -1
  146. package/lib/typescript/module/components/map/Map.d.ts +54 -51
  147. package/lib/typescript/module/components/map/Map.d.ts.map +1 -1
  148. package/lib/typescript/module/components/sources/geojson-source/GeoJSONSource.d.ts +40 -41
  149. package/lib/typescript/module/components/sources/geojson-source/GeoJSONSource.d.ts.map +1 -1
  150. package/lib/typescript/module/components/sources/image-source/ImageSource.d.ts +5 -3
  151. package/lib/typescript/module/components/sources/image-source/ImageSource.d.ts.map +1 -1
  152. package/lib/typescript/module/components/sources/raster-source/RasterSource.d.ts +20 -15
  153. package/lib/typescript/module/components/sources/raster-source/RasterSource.d.ts.map +1 -1
  154. package/lib/typescript/module/components/sources/vector-source/VectorSource.d.ts +23 -20
  155. package/lib/typescript/module/components/sources/vector-source/VectorSource.d.ts.map +1 -1
  156. package/lib/typescript/module/components/user-location/NativeUserLocation.d.ts +9 -6
  157. package/lib/typescript/module/components/user-location/NativeUserLocation.d.ts.map +1 -1
  158. package/lib/typescript/module/components/user-location/UserLocation.d.ts +4 -2
  159. package/lib/typescript/module/components/user-location/UserLocation.d.ts.map +1 -1
  160. package/lib/typescript/module/hooks/useCurrentPosition.d.ts +2 -2
  161. package/lib/typescript/module/modules/log/LogManager.d.ts +5 -4
  162. package/lib/typescript/module/modules/log/LogManager.d.ts.map +1 -1
  163. package/lib/typescript/module/modules/network/NetworkManager.d.ts +7 -7
  164. package/lib/typescript/module/modules/network/NetworkManager.d.ts.map +1 -1
  165. package/lib/typescript/module/modules/offline/OfflineManager.d.ts +63 -47
  166. package/lib/typescript/module/modules/offline/OfflineManager.d.ts.map +1 -1
  167. package/lib/typescript/module/modules/static-map/StaticMapManager.d.ts +2 -2
  168. package/lib/typescript/module/modules/transform-request/TransformRequestManager.d.ts +56 -49
  169. package/lib/typescript/module/modules/transform-request/TransformRequestManager.d.ts.map +1 -1
  170. package/lib/typescript/module/plugin/MapLibrePluginProps.d.ts +10 -15
  171. package/lib/typescript/module/plugin/MapLibrePluginProps.d.ts.map +1 -1
  172. package/lib/typescript/module/plugin/ios.d.ts +2 -2
  173. package/lib/typescript/module/plugin/ios.d.ts.map +1 -1
  174. package/lib/typescript/module/types/Anchor.d.ts +5 -6
  175. package/lib/typescript/module/types/Anchor.d.ts.map +1 -1
  176. package/lib/typescript/module/types/LngLatBounds.d.ts +2 -1
  177. package/lib/typescript/module/types/LngLatBounds.d.ts.map +1 -1
  178. package/lib/typescript/module/types/MapLibreRNStyles.d.ts +243 -93
  179. package/lib/typescript/module/types/MapLibreRNStyles.d.ts.map +1 -1
  180. package/lib/typescript/module/types/sources/PressableSourceProps.d.ts +1 -2
  181. package/lib/typescript/module/types/sources/PressableSourceProps.d.ts.map +1 -1
  182. package/lib/typescript/module/utils/animated/AbstractAnimatedCoordinates.d.ts +2 -2
  183. package/lib/typescript/module/utils/animated/AnimatedCoordinatesArray.d.ts +6 -6
  184. package/lib/typescript/module/utils/animated/AnimatedGeoJSON.d.ts +2 -1
  185. package/lib/typescript/module/utils/animated/AnimatedGeoJSON.d.ts.map +1 -1
  186. package/lib/typescript/module/utils/animated/AnimatedRouteCoordinatesArray.d.ts +6 -6
  187. package/lib/typescript/module/utils/convertStyleSpec.d.ts +4 -4
  188. package/package.json +1 -2
  189. package/src/components/annotations/callout/Callout.tsx +3 -2
  190. package/src/components/annotations/marker/Marker.tsx +15 -14
  191. package/src/components/annotations/view-annotation/ViewAnnotation.tsx +26 -24
  192. package/src/components/camera/Camera.tsx +10 -24
  193. package/src/components/images/Images.tsx +12 -12
  194. package/src/components/layer/Layer.tsx +0 -1
  195. package/src/components/map/Map.tsx +54 -51
  196. package/src/components/sources/geojson-source/GeoJSONSource.tsx +40 -41
  197. package/src/components/sources/image-source/ImageSource.tsx +5 -3
  198. package/src/components/sources/raster-source/RasterSource.tsx +20 -15
  199. package/src/components/sources/vector-source/VectorSource.tsx +23 -20
  200. package/src/components/user-location/NativeUserLocation.tsx +9 -6
  201. package/src/components/user-location/UserLocation.tsx +4 -2
  202. package/src/hooks/useCurrentPosition.ts +2 -2
  203. package/src/modules/log/LogManager.ts +5 -4
  204. package/src/modules/network/NetworkManager.ts +7 -7
  205. package/src/modules/offline/OfflineManager.ts +63 -47
  206. package/src/modules/static-map/StaticMapManager.ts +2 -2
  207. package/src/modules/transform-request/TransformRequestManager.ts +56 -49
  208. package/src/plugin/MapLibrePluginProps.ts +10 -15
  209. package/src/plugin/ios.ts +9 -8
  210. package/src/types/Anchor.ts +5 -6
  211. package/src/types/LngLatBounds.ts +2 -1
  212. package/src/types/MapLibreRNStyles.ts +243 -93
  213. package/src/types/sources/PressableSourceProps.ts +1 -2
  214. package/src/utils/animated/AbstractAnimatedCoordinates.ts +2 -2
  215. package/src/utils/animated/AnimatedCoordinatesArray.ts +6 -6
  216. package/src/utils/animated/AnimatedGeoJSON.ts +2 -1
  217. package/src/utils/animated/AnimatedRouteCoordinatesArray.ts +6 -6
  218. package/src/utils/convertStyleSpec.ts +4 -4
@@ -5,20 +5,23 @@ interface NativeUserLocationProps extends BaseProps {
5
5
  /**
6
6
  * Rendering mode
7
7
  *
8
- * - "default": Renders only a puck
9
- * - "heading": Renders a puck with triangle indicating device heading based on compass
10
- * - "course": Android renders an arrow indicating device heading based on GPS course, iOS behaves like mode="heading"
8
+ * - "default": Renders only a puck
9
+ * - "heading": Renders a puck with triangle indicating device heading based on
10
+ * compass
11
+ * - "course": Android renders an arrow indicating device heading based on GPS
12
+ * course, iOS behaves like mode="heading"
11
13
  *
12
- * @default "default"
14
+ * @defaultValue "default"
13
15
  */
14
16
  mode?: "default" | "heading" | "course";
15
17
 
16
18
  /**
17
19
  * Limit the maximum frames per second for location updates on Android
18
20
  *
19
- * Use this setting to limit animation rate of the location puck to decrease the stress on the device's CPU which could improve battery life.
21
+ * Use this setting to limit animation rate of the location puck to decrease the
22
+ * stress on the device's CPU which could improve battery life.
20
23
  *
21
- * @platform android
24
+ * @platform Android
22
25
  */
23
26
  androidPreferredFramesPerSecond?: number;
24
27
  }
@@ -9,7 +9,8 @@ import { Images } from "../images/Images";
9
9
 
10
10
  export interface UserLocationProps {
11
11
  /**
12
- * Children to render inside the UserLocation Annotation, e.g. CircleLayer, SymbolLayer
12
+ * Children to render inside the UserLocation Annotation, e.g. CircleLayer,
13
+ * SymbolLayer
13
14
  */
14
15
  children?: ReactNode;
15
16
 
@@ -24,7 +25,8 @@ export interface UserLocationProps {
24
25
  accuracy?: boolean;
25
26
 
26
27
  /**
27
- * Render an arrow which indicates direction the device is pointing relative to north
28
+ * Render an arrow which indicates direction the device is pointing relative to
29
+ * north
28
30
  */
29
31
  heading?: boolean;
30
32
 
@@ -9,14 +9,14 @@ interface UseCurrentPositionOptions {
9
9
  /**
10
10
  * Enable or disable position updates
11
11
  *
12
- * @default true
12
+ * @defaultValue true
13
13
  */
14
14
  enabled?: boolean;
15
15
 
16
16
  /**
17
17
  * Minimum displacement in meters to trigger position update
18
18
  *
19
- * @default 0
19
+ * @defaultValue 0
20
20
  */
21
21
  minDisplacement?: number;
22
22
  }
@@ -16,9 +16,10 @@ interface LogEvent {
16
16
  /**
17
17
  * Handler for `onLog` events
18
18
  *
19
- * Called before logging a message, return false to proceed with default logging.
19
+ * Called before logging a message, return false to proceed with default
20
+ * logging.
20
21
  *
21
- * @param event
22
+ * @param event -
22
23
  */
23
24
  type LogHandler = (event: LogEvent) => boolean;
24
25
 
@@ -35,7 +36,7 @@ class LogManager {
35
36
  /**
36
37
  * Override logging behavior
37
38
  *
38
- * @param logHandler
39
+ * @param logHandler -
39
40
  */
40
41
  onLog(logHandler: LogHandler): void {
41
42
  this.logHandler = logHandler;
@@ -44,7 +45,7 @@ class LogManager {
44
45
  /**
45
46
  * Set the minimum log level for a message to be logged
46
47
  *
47
- * @param level Minimum log level
48
+ * @param level - Minimum log level
48
49
  */
49
50
  setLogLevel(level: LogLevel): void {
50
51
  this.logLevel = level;
@@ -1,24 +1,24 @@
1
1
  import NativeNetworkModule from "./NativeNetworkModule";
2
2
 
3
3
  /**
4
- * NetworkManager provides methods for managing and controlling network connectivity.
4
+ * NetworkManager provides methods for managing and controlling network
5
+ * connectivity.
5
6
  */
6
7
  class NetworkManager {
7
8
  /**
8
- * Android only: Sets the connectivity state of the map. When set to false, the map will
9
- * not make any network requests and will only use cached tiles. This is
10
- * useful for implementing offline mode or reducing data usage.
9
+ * Android only: Sets the connectivity state of the map. When set to false, the
10
+ * map will not make any network requests and will only use cached tiles. This
11
+ * is useful for implementing offline mode or reducing data usage.
12
+ *
13
+ * @param connected - Whether the map should be connected to the network
11
14
  *
12
15
  * @example
13
16
  * ```ts
14
17
  * // Enable offline mode
15
18
  * NetworkManager.setConnected(false);
16
- *
17
19
  * // Re-enable network requests
18
20
  * NetworkManager.setConnected(true);
19
21
  * ```
20
- *
21
- * @param connected Whether the map should be connected to the network
22
22
  */
23
23
  static setConnected(connected: boolean): void {
24
24
  NativeNetworkModule.setConnected(connected);
@@ -36,9 +36,10 @@ export type OfflinePackErrorListener = (
36
36
  ) => void;
37
37
 
38
38
  /**
39
- * OfflineManager implements a singleton (shared object) that manages offline packs.
40
- * All of this class's instance methods are asynchronous, reflecting the fact that offline resources are stored in a database.
41
- * The shared object maintains a canonical collection of offline packs.
39
+ * OfflineManager implements a singleton (shared object) that manages offline
40
+ * packs. All of this class's instance methods are asynchronous, reflecting the
41
+ * fact that offline resources are stored in a database. The shared object
42
+ * maintains a canonical collection of offline packs.
42
43
  */
43
44
  class OfflineManager {
44
45
  private initialized: boolean;
@@ -70,10 +71,18 @@ class OfflineManager {
70
71
  }
71
72
 
72
73
  /**
73
- * Creates and registers an offline pack that downloads the resources needed to use the given region offline.
74
+ * Creates and registers an offline pack that downloads the resources needed to
75
+ * use the given region offline.
74
76
  *
75
- * @example
77
+ * @param options - Create options for offline pack that specifies zoom levels, style url, and
78
+ * the region to download.
79
+ * @param progressListener - Callback that listens for status events while downloading the offline
80
+ * resource.
81
+ * @param errorListener - Callback that listens for status events while downloading the offline
82
+ * resource.
83
+ * @returns The created offline pack with its generated ID.
76
84
  *
85
+ * @example
77
86
  * const progressListener = (offlineRegion, status) => console.log(offlineRegion, status);
78
87
  * const errorListener = (offlineRegion, error) => console.log(offlineRegion, error);
79
88
  *
@@ -84,12 +93,6 @@ class OfflineManager {
84
93
  * bounds: [west, south, east, north],
85
94
  * metadata: { customValue: 'myValue' }
86
95
  * }, progressListener, errorListener)
87
- *
88
- * @param options Create options for offline pack that specifies zoom levels, style url, and the region to download.
89
- * @param progressListener Callback that listens for status events while downloading the offline resource.
90
- * @param errorListener Callback that listens for status events while downloading the offline resource.
91
- *
92
- * @return The created offline pack with its generated ID.
93
96
  */
94
97
  async createPack(
95
98
  options: OfflinePackCreateOptions,
@@ -117,14 +120,18 @@ class OfflineManager {
117
120
  }
118
121
 
119
122
  /**
120
- * Invalidates the specified offline pack. This method checks that the tiles in the specified offline pack match those from the server. Local tiles that do not match the latest version on the server are updated.
123
+ * Invalidates the specified offline pack. This method checks that the tiles in
124
+ * the specified offline pack match those from the server. Local tiles that do
125
+ * not match the latest version on the server are updated.
126
+ *
127
+ * This is more efficient than deleting the offline pack and downloading it
128
+ * again. If the data stored locally matches that on the server, new data will
129
+ * not be downloaded.
121
130
  *
122
- * This is more efficient than deleting the offline pack and downloading it again. If the data stored locally matches that on the server, new data will not be downloaded.
131
+ * @param id - ID of the OfflinePack.
123
132
  *
124
133
  * @example
125
134
  * await OfflineManager.invalidatePack(pack.id)
126
- *
127
- * @param id ID of the OfflinePack.
128
135
  */
129
136
  async invalidatePack(id: string): Promise<void> {
130
137
  await this.initialize();
@@ -134,12 +141,13 @@ class OfflineManager {
134
141
  }
135
142
 
136
143
  /**
137
- * Unregisters the given OfflinePack and allows resources that are no longer required by any remaining packs to be potentially freed.
144
+ * Unregisters the given OfflinePack and allows resources that are no longer
145
+ * required by any remaining packs to be potentially freed.
146
+ *
147
+ * @param id - ID of the OfflinePack.
138
148
  *
139
149
  * @example
140
150
  * await OfflineManager.deletePack(pack.id)
141
- *
142
- * @param id ID of the OfflinePack.
143
151
  */
144
152
  async deletePack(id: string): Promise<void> {
145
153
  await this.initialize();
@@ -150,10 +158,13 @@ class OfflineManager {
150
158
  }
151
159
 
152
160
  /**
153
- * Forces a revalidation of the tiles in the ambient cache and downloads a fresh version of the tiles from the tile server.
154
- * This is the recommend method for clearing the cache.
155
- * This is the most efficient method because tiles in the ambient cache are re-downloaded to remove outdated data from a device.
156
- * It does not erase resources from the ambient cache or delete the database, which can be computationally expensive operations that may carry unintended side effects.
161
+ * Forces a revalidation of the tiles in the ambient cache and downloads a fresh
162
+ * version of the tiles from the tile server. This is the recommend method for
163
+ * clearing the cache. This is the most efficient method because tiles in the
164
+ * ambient cache are re-downloaded to remove outdated data from a device. It
165
+ * does not erase resources from the ambient cache or delete the database, which
166
+ * can be computationally expensive operations that may carry unintended side
167
+ * effects.
157
168
  *
158
169
  * @example
159
170
  * await OfflineManager.invalidateAmbientCache();
@@ -164,8 +175,8 @@ class OfflineManager {
164
175
  }
165
176
 
166
177
  /**
167
- * Erases resources from the ambient cache.
168
- * This method clears the cache and decreases the amount of space that map resources take up on the device.
178
+ * Erases resources from the ambient cache. This method clears the cache and
179
+ * decreases the amount of space that map resources take up on the device.
169
180
  *
170
181
  * @example
171
182
  * await OfflineManager.clearAmbientCache();
@@ -176,13 +187,14 @@ class OfflineManager {
176
187
  }
177
188
 
178
189
  /**
179
- * Sets the maximum size of the ambient cache in bytes. Disables the ambient cache if set to 0.
180
- * This method may be computationally expensive because it will erase resources from the ambient cache if its size is decreased.
190
+ * Sets the maximum size of the ambient cache in bytes. Disables the ambient
191
+ * cache if set to 0. This method may be computationally expensive because it
192
+ * will erase resources from the ambient cache if its size is decreased.
193
+ *
194
+ * @param size - Size of ambient cache.
181
195
  *
182
196
  * @example
183
197
  * await OfflineManager.setMaximumAmbientCacheSize(5000000);
184
- *
185
- * @param size Size of ambient cache.
186
198
  */
187
199
  async setMaximumAmbientCacheSize(size: number): Promise<void> {
188
200
  await this.initialize();
@@ -190,7 +202,8 @@ class OfflineManager {
190
202
  }
191
203
 
192
204
  /**
193
- * Deletes the existing database, which includes both the ambient cache and offline packs, then reinitializes it.
205
+ * Deletes the existing database, which includes both the ambient cache and
206
+ * offline packs, then reinitializes it.
194
207
  *
195
208
  * @example
196
209
  * await OfflineManager.resetDatabase();
@@ -232,10 +245,10 @@ class OfflineManager {
232
245
  /**
233
246
  * Sideloads offline db
234
247
  *
248
+ * @param path - Path to offline tile db on file system.
249
+ *
235
250
  * @example
236
251
  * await OfflineManager.mergeOfflineRegions(path);
237
- *
238
- * @param path Path to offline tile db on file system.
239
252
  */
240
253
  async mergeOfflineRegions(path: string): Promise<void> {
241
254
  await this.initialize();
@@ -243,26 +256,27 @@ class OfflineManager {
243
256
  }
244
257
 
245
258
  /**
246
- * Sets the maximum number of tiles that may be downloaded and stored on the current device.
247
- * Consult the Terms of Service for your map tile host before changing this value.
259
+ * Sets the maximum number of tiles that may be downloaded and stored on the
260
+ * current device. Consult the Terms of Service for your map tile host before
261
+ * changing this value.
262
+ *
263
+ * @param limit - Map tile limit count.
248
264
  *
249
265
  * @example
250
266
  * OfflineManager.setTileCountLimit(1000);
251
- *
252
- * @param limit Map tile limit count.
253
267
  */
254
268
  setTileCountLimit(limit: number): void {
255
269
  NativeOfflineModule.setTileCountLimit(limit);
256
270
  }
257
271
 
258
272
  /**
259
- * Sets the period at which download status events will be sent over the React Native bridge.
260
- * The default is 500ms.
273
+ * Sets the period at which download status events will be sent over the React
274
+ * Native bridge. The default is 500ms.
275
+ *
276
+ * @param throttleValue - Event throttle value in ms.
261
277
  *
262
278
  * @example
263
279
  * OfflineManager.setProgressEventThrottle(500);
264
- *
265
- * @param throttleValue Event throttle value in ms.
266
280
  */
267
281
  setProgressEventThrottle(throttleValue: number): void {
268
282
  NativeOfflineModule.setProgressEventThrottle(throttleValue);
@@ -272,14 +286,16 @@ class OfflineManager {
272
286
  * Subscribe to download status/error events for the requested offline pack.
273
287
  * Note that createPack calls this internally if listeners are provided.
274
288
  *
289
+ * @param id - ID of the offline pack.
290
+ * @param progressListener - Callback that listens for status events while downloading the offline
291
+ * resource.
292
+ * @param errorListener - Callback that listens for status events while downloading the offline
293
+ * resource.
294
+ *
275
295
  * @example
276
296
  * const progressListener = (offlinePack, status) => console.log(offlinePack, status)
277
297
  * const errorListener = (offlinePack, error) => console.log(offlinePack, error)
278
298
  * OfflineManager.addListener(pack.id, progressListener, errorListener)
279
- *
280
- * @param id ID of the offline pack.
281
- * @param progressListener Callback that listens for status events while downloading the offline resource.
282
- * @param errorListener Callback that listens for status events while downloading the offline resource.
283
299
  */
284
300
  async addListener(
285
301
  id: string,
@@ -306,8 +322,10 @@ class OfflineManager {
306
322
  }
307
323
 
308
324
  /**
309
- * Unsubscribes any listeners associated with the offline pack.
310
- * Should be called when the component unmounts.
325
+ * Unsubscribes any listeners associated with the offline pack. Should be called
326
+ * when the component unmounts.
327
+ *
328
+ * @param packId - ID of the offline pack.
311
329
  *
312
330
  * @example
313
331
  * useEffect(() => {
@@ -315,8 +333,6 @@ class OfflineManager {
315
333
  * OfflineManager.removeListener(pack.id);
316
334
  * }
317
335
  * }, []);
318
- *
319
- * @param packId ID of the offline pack.
320
336
  */
321
337
  removeListener(packId: string): void {
322
338
  delete this.progressListeners[packId];
@@ -6,7 +6,7 @@ export interface StaticMapOptions {
6
6
  /**
7
7
  * Maplibre style - either a URL or a Style JSON.
8
8
  *
9
- * @see https://maplibre.org/maplibre-style-spec/
9
+ * @see {@link https://maplibre.org/maplibre-style-spec/}
10
10
  */
11
11
  mapStyle: string | object;
12
12
 
@@ -48,7 +48,7 @@ export type StaticMapCenterOptions = StaticMapOptions & {
48
48
  zoom?: number;
49
49
 
50
50
  /**
51
- * The bearing (rotation) of the map.
51
+ * The bearing (rotation) of the map.
52
52
  */
53
53
  bearing?: number;
54
54
 
@@ -11,7 +11,8 @@ export interface TransformOptions {
11
11
  * Optional regex to be used as the condition, if the transform should be
12
12
  * applied. When omitted the transform will always be applied.
13
13
  *
14
- * Global flags are (like `/i`) are not supported. Supports only inline flags, e.g. `(?i)` for case-insensitive matching.
14
+ * Global flags are (like `/i` ) are not supported. Supports only inline flags,
15
+ * e.g. `(?i)` for case-insensitive matching.
15
16
  */
16
17
  match?: RegExp | string;
17
18
  }
@@ -19,15 +20,16 @@ export interface TransformOptions {
19
20
  /**
20
21
  * A serializable transform for rewriting MapLibre request URLs.
21
22
  *
22
- * Transforms are applied as a pipeline in the order they were added: transform N+1 sees
23
- * the URL *after* transform N has possibly changed it.
23
+ * Transforms are applied as a pipeline in the order they were added: transform
24
+ * N+1 sees the URL *after* transform N has possibly changed it.
24
25
  */
25
26
  export interface UrlTransformOptions extends TransformOptions {
26
27
  /**
27
- * Regex to find the portion of the URL to replace.
28
- * Supports capture groups that can be back-referenced in `replace` as `$1`, `$2`,
28
+ * Regex to find the portion of the URL to replace. Supports capture groups that
29
+ * can be back-referenced in `replace` as `$1` , `$2` ,
29
30
  *
30
- * Global flags are (like `/i`) are not supported. Supports only inline flags, e.g. `(?i)` for case-insensitive matching.
31
+ * Global flags are (like `/i` ) are not supported. Supports only inline flags,
32
+ * e.g. `(?i)` for case-insensitive matching.
31
33
  */
32
34
  find: RegExp | string;
33
35
 
@@ -60,18 +62,18 @@ export interface HeaderOptions extends TransformOptions {
60
62
  }
61
63
 
62
64
  /**
63
- * TransformRequestManager provides methods for managing HTTP requests made by MapLibre.
65
+ * TransformRequestManager provides methods for managing HTTP requests made by
66
+ * MapLibre.
64
67
  *
65
68
  * Transformations are possible in three ways:
66
69
  *
67
- * 1. Transforming the URL with search and replace
68
- * 2. Adding URL search params
69
- * 3. Adding HTTP headers
70
+ * - Transforming the URL with search and replace
71
+ * - Adding URL search params
72
+ * - Adding HTTP headers
70
73
  *
71
74
  * Transforms are applied in this order. The `match` conditions are applied to
72
75
  * possibly already transformed URLs.
73
76
  *
74
- * @remarks
75
77
  * To gain insight into which transforms are applied set the log level to
76
78
  * `"debug"` via {@link LogManager}:
77
79
  *
@@ -86,43 +88,44 @@ class TransformRequestManager {
86
88
  * Transforms execute in insertion order. Therefore `match` and `find` regexes
87
89
  * are matched against possibly already modified URL by previous transforms.
88
90
  *
89
- * Re-adding an existing `id` updates the transform
90
- * **in-place**, preserving its position in the pipeline. This makes it safe to
91
- * refresh tokens or swap domains without disrupting the order of other transforms.
91
+ * Re-adding an existing `id` updates the transform **in-place**, preserving its
92
+ * position in the pipeline. This makes it safe to refresh tokens or swap
93
+ * domains without disrupting the order of other transforms.
92
94
  *
93
95
  * URL transforms are applied before `addUrlSearchParam` and `addHeader`.
94
96
  *
95
- * @example
96
- * // Upgrade all requests to HTTPS
97
+ * @param options - The transform. Set {@link TransformOptions.id} to a stable string to enable
98
+ * in-place updates; if omitted an id is auto-generated and returned.
99
+ * @returns The id of the transform (the value of `transform.id` when provided, otherwise the auto-generated one). Pass it to {@link removeUrlTransform} to remove it later.
100
+ *
101
+ * @example Upgrade all requests to HTTPS
102
+ * ```ts
97
103
  * TransformRequestManager.addUrlTransform({
98
104
  * id: "force-https",
99
105
  * find: "^http://",
100
106
  * replace: "https://",
101
107
  * });
108
+ * ```
102
109
  *
103
- * @example
104
- * // Redirect a specific domain through a proxy
110
+ * @example Redirect a specific domain through a proxy
111
+ * ```ts
105
112
  * TransformRequestManager.addUrlTransform({
106
113
  * id: "proxy",
107
114
  * match: "tiles\\.example\\.com",
108
115
  * find: "tiles\\.example\\.com",
109
116
  * replace: "proxy.example.com",
110
117
  * });
118
+ * ```
111
119
  *
112
- * @example
113
- * // Inject an API key into the path using a capture group
120
+ * @example Inject an API key into the path using a capture group
121
+ * ```ts
114
122
  * TransformRequestManager.addUrlTransform({
115
123
  * id: "api-key",
116
124
  * match: "api\\.example\\.com",
117
125
  * find: "(https://api\\.example\\.com/)(.*)",
118
126
  * replace: "$1mySecretKey/$2",
119
127
  * });
120
- *
121
- * @param options The transform. Set {@link TransformOptions.id} to a stable string to
122
- * enable in-place updates; if omitted an id is auto-generated and returned.
123
- *
124
- * @returns The id of the transform (the value of `transform.id` when provided, otherwise
125
- * the auto-generated one). Pass it to {@link removeUrlTransform} to remove it later.
128
+ * ```
126
129
  */
127
130
  addUrlTransform(options: UrlTransformOptions): string {
128
131
  const id = options.id ?? this.getId();
@@ -138,10 +141,10 @@ class TransformRequestManager {
138
141
  }
139
142
 
140
143
  /**
141
- * Removes the URL transform with the given `id`.
142
- * No-op if the id is not registered.
144
+ * Removes the URL transform with the given `id` . No-op if the id is not
145
+ * registered.
143
146
  *
144
- * @param id The identifier passed to/returned from {@link addUrlTransform}.
147
+ * @param id - The identifier passed to/returned from {@link addUrlTransform}.
145
148
  */
146
149
  removeUrlTransform(id: string): void {
147
150
  NativeTransformRequestModule.removeUrlTransform(id);
@@ -155,24 +158,25 @@ class TransformRequestManager {
155
158
  }
156
159
 
157
160
  /**
158
- * Adds or updates a URL query parameter identified by `id` that will be appended to all
159
- * matching map resource requests. Re-adding an existing `id` updates the param in-place.
161
+ * Adds or updates a URL query parameter identified by `id` that will be
162
+ * appended to all matching map resource requests. Re-adding an existing `id`
163
+ * updates the param in-place.
160
164
  *
161
- * @example
162
- * // Add apiKey to for a specific domain
165
+ * @param options - The options. Set {@link TransformOptions.id} to a stable string to enable
166
+ * in-place updates; if omitted an id is auto-generated and returned.
167
+ * @returns The id of the options. Pass it to {@link removeUrlSearchParam} to remove it later.
168
+ *
169
+ * @example Add apiKey to for a specific domain
170
+ * ```ts
163
171
  * TransformRequestManager.addUrlSearchParam({
164
172
  * match: /tiles\.example\.com/,
165
173
  * name: "apiKey",
166
174
  * value: "your-api-key",
167
175
  * });
176
+ * ```
168
177
  *
169
178
  * // Add apiKey to all requests (no match = applies to all)
170
179
  * TransformRequestManager.addUrlSearchParam({ name: "apiKey", value: "your-api-key" });
171
- *
172
- * @param options The options. Set {@link TransformOptions.id} to a stable string to
173
- * enable in-place updates; if omitted an id is auto-generated and returned.
174
- *
175
- * @returns The id of the options. Pass it to {@link removeUrlSearchParam} to remove it later.
176
180
  */
177
181
  addUrlSearchParam(options: UrlSearchParamOptions): string {
178
182
  const id = options.id ?? this.getId();
@@ -190,7 +194,7 @@ class TransformRequestManager {
190
194
  /**
191
195
  * Removes a previously added URL query parameter by its `id`.
192
196
  *
193
- * @param id The identifier passed to/returned from {@link addUrlSearchParam}.
197
+ * @param id - The identifier passed to/returned from {@link addUrlSearchParam}.
194
198
  */
195
199
  removeUrlSearchParam(id: string): void {
196
200
  NativeTransformRequestModule.removeUrlSearchParam(id);
@@ -198,23 +202,26 @@ class TransformRequestManager {
198
202
 
199
203
  /**
200
204
  * Adds or updates an HTTP header identified by `id` that will be sent with all
201
- * matching map resource requests. Re-adding an existing `id` updates the header in-place.
205
+ * matching map resource requests. Re-adding an existing `id` updates the header
206
+ * in-place.
207
+ *
208
+ * @param options - The options. Set {@link TransformOptions.id} to a stable string to enable
209
+ * in-place updates; if omitted an id is auto-generated and returned.
210
+ * @returns The id of the options. Pass it to {@link removeHeader} to remove it later.
202
211
  *
203
- * @example
204
- * // Add header to all requests
212
+ * @example Add header to all requests
213
+ * ```
205
214
  * TransformRequestManager.addHeader({ name: "Authorization", value: "Bearer token123" });
215
+ * ```
206
216
  *
207
- * // Add header only to requests matching a pattern
217
+ * @example Add header only to requests matching a pattern
218
+ * ```ts
208
219
  * TransformRequestManager.addHeader({
209
220
  * name: "X-API-Key",
210
221
  * value: "key123",
211
222
  * match: /https:\/\/api\.example\.com\/tiles\//,
212
223
  * });
213
- *
214
- * @param options The options. Set {@link TransformOptions.id} to a stable string to
215
- * enable in-place updates; if omitted an id is auto-generated and returned.
216
- *
217
- * @returns The id of the options. Pass it to {@link removeHeader} to remove it later.
224
+ * ```
218
225
  */
219
226
  addHeader(options: HeaderOptions): string {
220
227
  const id = options.id ?? this.getId();
@@ -239,7 +246,7 @@ class TransformRequestManager {
239
246
  /**
240
247
  * Removes a previously added HTTP header by its `id`.
241
248
  *
242
- * @param id The identifier passed to/returned from {@link addHeader}.
249
+ * @param id - The identifier passed to/returned from {@link addHeader}.
243
250
  */
244
251
  removeHeader(id: string): void {
245
252
  NativeTransformRequestModule.removeHeader(id);
@@ -7,7 +7,7 @@ export type MapLibrePluginProps =
7
7
  /**
8
8
  * Properties relevant only for Android
9
9
  *
10
- * @platform android
10
+ * @platform Android
11
11
  */
12
12
  android?: {
13
13
  /**
@@ -17,7 +17,7 @@ export type MapLibrePluginProps =
17
17
  /**
18
18
  * Variant of `org.maplibre.gl:android-sdk-*`
19
19
  *
20
- * @default "opengl"
20
+ * @defaultValue "opengl"
21
21
  */
22
22
  nativeVariant?: "opengl" | "vulkan";
23
23
  /**
@@ -37,13 +37,15 @@ export type MapLibrePluginProps =
37
37
  * Location engine to be used
38
38
  *
39
39
  * - `default`: Used per default from MapLibre; F-Droid compatible
40
- * - `google`: Google Play Services Location Engine for higher precision; F-Droid incompatible
40
+ * - `google`: Google Play Services Location Engine for higher precision; F-Droid
41
+ * incompatible
41
42
  *
42
- * @default "default"
43
+ * @defaultValue "default"
43
44
  */
44
45
  locationEngine?: "default" | "google";
45
46
  /**
46
- * Version for `com.google.android.gms:play-services-location`, only used with `locationEngine: "google"`
47
+ * Version for `com.google.android.gms:play-services-location` , only used with
48
+ * `locationEngine: "google"`
47
49
  */
48
50
  googlePlayServicesLocationVersion?: VersionString;
49
51
  };
@@ -51,7 +53,7 @@ export type MapLibrePluginProps =
51
53
  /**
52
54
  * Properties relevant only for iOS
53
55
  *
54
- * @platform ios
56
+ * @platform iOS
55
57
  */
56
58
  ios?: {
57
59
  /**
@@ -62,14 +64,7 @@ export type MapLibrePluginProps =
62
64
  /**
63
65
  * Swift Package Manager spec to override the selected version range
64
66
  *
65
- * @default `{
66
- * url: "https://github.com/maplibre/maplibre-gl-native-distribution",
67
- * requirement: {
68
- * kind: "exactVersion",
69
- * version: $MLRN_NATIVE_VERSION
70
- * },
71
- * product_name: "MapLibre"
72
- * }`
67
+ * @defaultValue `{ url: "https://github.com/maplibre/maplibre-gl-native-distribution", requirement: { kind: "exactVersion", version: $MLRN_NATIVE_VERSION }, product_name: "MapLibre" }`
73
68
  *
74
69
  * @example
75
70
  * ```ts
@@ -80,7 +75,7 @@ export type MapLibrePluginProps =
80
75
  * minimumVersion: "x.x.x"
81
76
  * },
82
77
  * product_name: "MapLibre"
83
- * }`
78
+ * }`;
84
79
  * ```
85
80
  */
86
81
  spmSpec?: string;