@maplibre/maplibre-react-native 11.0.0-alpha.16 → 11.0.0-alpha.18

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 (161) hide show
  1. package/android/src/main/java/org/maplibre/reactnative/MLRNPackage.kt +6 -6
  2. package/android/src/main/java/org/maplibre/reactnative/components/camera/MLRNCameraManager.kt +3 -5
  3. package/android/src/main/java/org/maplibre/reactnative/components/location/LocationComponentManager.kt +154 -0
  4. package/android/src/main/java/org/maplibre/reactnative/components/location/MLRNNativeUserLocation.kt +70 -0
  5. package/android/src/main/java/org/maplibre/reactnative/components/location/MLRNNativeUserLocationManager.kt +50 -0
  6. package/android/src/main/java/org/maplibre/reactnative/modules/MLRNLocationModule.kt +20 -4
  7. package/android/src/main/java/org/maplibre/reactnative/modules/MLRNLogModule.kt +99 -0
  8. package/ios/components/camera/MLRNCameraComponentView.h +0 -8
  9. package/ios/components/map-view/MLRNMapView.m +1 -1
  10. package/ios/components/map-view/MLRNMapViewComponentView.h +0 -5
  11. package/ios/components/user-location/MLRNNativeUserLocation.h +1 -1
  12. package/ios/components/user-location/MLRNNativeUserLocation.m +6 -5
  13. package/ios/components/user-location/MLRNNativeUserLocationComponentView.h +10 -0
  14. package/ios/components/user-location/MLRNNativeUserLocationComponentView.mm +51 -0
  15. package/ios/modules/location/MLRNLocation.m +17 -14
  16. package/ios/modules/logging/MLRNLogModule.h +10 -0
  17. package/ios/modules/logging/MLRNLogModule.mm +39 -0
  18. package/ios/modules/logging/MLRNLogging.h +15 -7
  19. package/ios/modules/logging/MLRNLogging.m +22 -55
  20. package/lib/commonjs/components/annotations/Annotation.js +2 -1
  21. package/lib/commonjs/components/annotations/Annotation.js.map +1 -1
  22. package/lib/commonjs/components/map-view/MapView.js +3 -3
  23. package/lib/commonjs/components/map-view/MapView.js.map +1 -1
  24. package/lib/commonjs/components/sources/ShapeSource.js +1 -0
  25. package/lib/commonjs/components/sources/ShapeSource.js.map +1 -1
  26. package/lib/commonjs/components/user-location/NativeUserLocation.js +3 -4
  27. package/lib/commonjs/components/user-location/NativeUserLocation.js.map +1 -1
  28. package/lib/commonjs/components/user-location/UserLocation.js +22 -132
  29. package/lib/commonjs/components/user-location/UserLocation.js.map +1 -1
  30. package/lib/commonjs/components/user-location/UserLocationNativeComponent.ts +19 -0
  31. package/lib/commonjs/components/user-location/UserLocationPuck.js +34 -22
  32. package/lib/commonjs/components/user-location/UserLocationPuck.js.map +1 -1
  33. package/lib/commonjs/components/user-location/UserLocationPuckHeading.js +3 -2
  34. package/lib/commonjs/components/user-location/UserLocationPuckHeading.js.map +1 -1
  35. package/lib/commonjs/hooks/useCurrentPosition.js +34 -0
  36. package/lib/commonjs/hooks/useCurrentPosition.js.map +1 -0
  37. package/lib/commonjs/index.js +16 -15
  38. package/lib/commonjs/index.js.map +1 -1
  39. package/lib/commonjs/modules/log/LogManager.js +99 -0
  40. package/lib/commonjs/modules/log/LogManager.js.map +1 -0
  41. package/lib/commonjs/modules/log/NativeLogModule.js +9 -0
  42. package/lib/commonjs/modules/log/NativeLogModule.js.map +1 -0
  43. package/lib/commonjs/utils/animated/Animated.js +1 -7
  44. package/lib/commonjs/utils/animated/Animated.js.map +1 -1
  45. package/lib/module/components/annotations/Annotation.js +3 -2
  46. package/lib/module/components/annotations/Annotation.js.map +1 -1
  47. package/lib/module/components/map-view/MapView.js +3 -3
  48. package/lib/module/components/map-view/MapView.js.map +1 -1
  49. package/lib/module/components/sources/ShapeSource.js +1 -0
  50. package/lib/module/components/sources/ShapeSource.js.map +1 -1
  51. package/lib/module/components/user-location/NativeUserLocation.js +2 -4
  52. package/lib/module/components/user-location/NativeUserLocation.js.map +1 -1
  53. package/lib/module/components/user-location/UserLocation.js +22 -132
  54. package/lib/module/components/user-location/UserLocation.js.map +1 -1
  55. package/lib/module/components/user-location/UserLocationNativeComponent.ts +19 -0
  56. package/lib/module/components/user-location/UserLocationPuck.js +34 -22
  57. package/lib/module/components/user-location/UserLocationPuck.js.map +1 -1
  58. package/lib/module/components/user-location/UserLocationPuckHeading.js +3 -2
  59. package/lib/module/components/user-location/UserLocationPuckHeading.js.map +1 -1
  60. package/lib/module/hooks/useCurrentPosition.js +30 -0
  61. package/lib/module/hooks/useCurrentPosition.js.map +1 -0
  62. package/lib/module/index.js +4 -3
  63. package/lib/module/index.js.map +1 -1
  64. package/lib/module/modules/log/LogManager.js +96 -0
  65. package/lib/module/modules/log/LogManager.js.map +1 -0
  66. package/lib/module/modules/log/NativeLogModule.js +5 -0
  67. package/lib/module/modules/log/NativeLogModule.js.map +1 -0
  68. package/lib/module/utils/animated/Animated.js +0 -6
  69. package/lib/module/utils/animated/Animated.js.map +1 -1
  70. package/lib/typescript/commonjs/src/components/annotations/Annotation.d.ts +3 -2
  71. package/lib/typescript/commonjs/src/components/annotations/Annotation.d.ts.map +1 -1
  72. package/lib/typescript/commonjs/src/components/sources/ShapeSource.d.ts.map +1 -1
  73. package/lib/typescript/commonjs/src/components/user-location/NativeUserLocation.d.ts +12 -13
  74. package/lib/typescript/commonjs/src/components/user-location/NativeUserLocation.d.ts.map +1 -1
  75. package/lib/typescript/commonjs/src/components/user-location/UserLocation.d.ts +13 -53
  76. package/lib/typescript/commonjs/src/components/user-location/UserLocation.d.ts.map +1 -1
  77. package/lib/typescript/commonjs/src/components/user-location/UserLocationNativeComponent.d.ts +8 -0
  78. package/lib/typescript/commonjs/src/components/user-location/UserLocationNativeComponent.d.ts.map +1 -0
  79. package/lib/typescript/commonjs/src/components/user-location/UserLocationPuck.d.ts +2 -1
  80. package/lib/typescript/commonjs/src/components/user-location/UserLocationPuck.d.ts.map +1 -1
  81. package/lib/typescript/commonjs/src/components/user-location/UserLocationPuckHeading.d.ts.map +1 -1
  82. package/lib/typescript/commonjs/src/hooks/useCurrentPosition.d.ts +18 -0
  83. package/lib/typescript/commonjs/src/hooks/useCurrentPosition.d.ts.map +1 -0
  84. package/lib/typescript/commonjs/src/index.d.ts +4 -4
  85. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  86. package/lib/typescript/commonjs/src/modules/location/LocationManager.d.ts +3 -3
  87. package/lib/typescript/commonjs/src/modules/location/LocationManager.d.ts.map +1 -1
  88. package/lib/typescript/commonjs/src/modules/location/NativeLocationModule.d.ts +3 -3
  89. package/lib/typescript/commonjs/src/modules/location/NativeLocationModule.d.ts.map +1 -1
  90. package/lib/typescript/commonjs/src/modules/log/LogManager.d.ts +45 -0
  91. package/lib/typescript/commonjs/src/modules/log/LogManager.d.ts.map +1 -0
  92. package/lib/typescript/commonjs/src/modules/log/NativeLogModule.d.ts +13 -0
  93. package/lib/typescript/commonjs/src/modules/log/NativeLogModule.d.ts.map +1 -0
  94. package/lib/typescript/commonjs/src/utils/animated/Animated.d.ts +1 -13
  95. package/lib/typescript/commonjs/src/utils/animated/Animated.d.ts.map +1 -1
  96. package/lib/typescript/module/src/components/annotations/Annotation.d.ts +3 -2
  97. package/lib/typescript/module/src/components/annotations/Annotation.d.ts.map +1 -1
  98. package/lib/typescript/module/src/components/sources/ShapeSource.d.ts.map +1 -1
  99. package/lib/typescript/module/src/components/user-location/NativeUserLocation.d.ts +12 -13
  100. package/lib/typescript/module/src/components/user-location/NativeUserLocation.d.ts.map +1 -1
  101. package/lib/typescript/module/src/components/user-location/UserLocation.d.ts +13 -53
  102. package/lib/typescript/module/src/components/user-location/UserLocation.d.ts.map +1 -1
  103. package/lib/typescript/module/src/components/user-location/UserLocationNativeComponent.d.ts +8 -0
  104. package/lib/typescript/module/src/components/user-location/UserLocationNativeComponent.d.ts.map +1 -0
  105. package/lib/typescript/module/src/components/user-location/UserLocationPuck.d.ts +2 -1
  106. package/lib/typescript/module/src/components/user-location/UserLocationPuck.d.ts.map +1 -1
  107. package/lib/typescript/module/src/components/user-location/UserLocationPuckHeading.d.ts.map +1 -1
  108. package/lib/typescript/module/src/hooks/useCurrentPosition.d.ts +18 -0
  109. package/lib/typescript/module/src/hooks/useCurrentPosition.d.ts.map +1 -0
  110. package/lib/typescript/module/src/index.d.ts +4 -4
  111. package/lib/typescript/module/src/index.d.ts.map +1 -1
  112. package/lib/typescript/module/src/modules/location/LocationManager.d.ts +3 -3
  113. package/lib/typescript/module/src/modules/location/LocationManager.d.ts.map +1 -1
  114. package/lib/typescript/module/src/modules/location/NativeLocationModule.d.ts +3 -3
  115. package/lib/typescript/module/src/modules/location/NativeLocationModule.d.ts.map +1 -1
  116. package/lib/typescript/module/src/modules/log/LogManager.d.ts +45 -0
  117. package/lib/typescript/module/src/modules/log/LogManager.d.ts.map +1 -0
  118. package/lib/typescript/module/src/modules/log/NativeLogModule.d.ts +13 -0
  119. package/lib/typescript/module/src/modules/log/NativeLogModule.d.ts.map +1 -0
  120. package/lib/typescript/module/src/utils/animated/Animated.d.ts +1 -13
  121. package/lib/typescript/module/src/utils/animated/Animated.d.ts.map +1 -1
  122. package/package.json +4 -2
  123. package/src/components/annotations/Annotation.tsx +7 -5
  124. package/src/components/map-view/MapView.tsx +3 -3
  125. package/src/components/sources/ShapeSource.tsx +1 -0
  126. package/src/components/user-location/NativeUserLocation.tsx +15 -19
  127. package/src/components/user-location/UserLocation.tsx +65 -249
  128. package/src/components/user-location/UserLocationNativeComponent.ts +19 -0
  129. package/src/components/user-location/UserLocationPuck.tsx +47 -28
  130. package/src/components/user-location/UserLocationPuckHeading.tsx +2 -1
  131. package/src/hooks/useCurrentPosition.ts +53 -0
  132. package/src/index.ts +6 -7
  133. package/src/modules/location/LocationManager.ts +3 -3
  134. package/src/modules/location/NativeLocationModule.ts +3 -3
  135. package/src/modules/log/LogManager.ts +114 -0
  136. package/src/modules/log/NativeLogModule.ts +16 -0
  137. package/src/utils/animated/Animated.ts +1 -28
  138. package/android/src/main/java/org/maplibre/reactnative/components/location/LocationComponentManager.java +0 -165
  139. package/android/src/main/java/org/maplibre/reactnative/components/location/MLRNNativeUserLocation.java +0 -76
  140. package/android/src/main/java/org/maplibre/reactnative/components/location/MLRNNativeUserLocationManager.java +0 -40
  141. package/android/src/main/java/org/maplibre/reactnative/modules/MLRNLogging.java +0 -140
  142. package/ios/components/user-location/MLRNNativeUserLocationManager.h +0 -5
  143. package/ios/components/user-location/MLRNNativeUserLocationManager.m +0 -21
  144. package/lib/commonjs/modules/Logger.js +0 -112
  145. package/lib/commonjs/modules/Logger.js.map +0 -1
  146. package/lib/commonjs/modules/location/requestAndroidLocationPermissions.js +0 -14
  147. package/lib/commonjs/modules/location/requestAndroidLocationPermissions.js.map +0 -1
  148. package/lib/module/modules/Logger.js +0 -107
  149. package/lib/module/modules/Logger.js.map +0 -1
  150. package/lib/module/modules/location/requestAndroidLocationPermissions.js +0 -11
  151. package/lib/module/modules/location/requestAndroidLocationPermissions.js.map +0 -1
  152. package/lib/typescript/commonjs/src/modules/Logger.d.ts +0 -49
  153. package/lib/typescript/commonjs/src/modules/Logger.d.ts.map +0 -1
  154. package/lib/typescript/commonjs/src/modules/location/requestAndroidLocationPermissions.d.ts +0 -5
  155. package/lib/typescript/commonjs/src/modules/location/requestAndroidLocationPermissions.d.ts.map +0 -1
  156. package/lib/typescript/module/src/modules/Logger.d.ts +0 -49
  157. package/lib/typescript/module/src/modules/Logger.d.ts.map +0 -1
  158. package/lib/typescript/module/src/modules/location/requestAndroidLocationPermissions.d.ts +0 -5
  159. package/lib/typescript/module/src/modules/location/requestAndroidLocationPermissions.d.ts.map +0 -1
  160. package/src/modules/Logger.ts +0 -127
  161. package/src/modules/location/requestAndroidLocationPermissions.ts +0 -8
@@ -1,69 +1,29 @@
1
1
  import { type ReactNode } from "react";
2
- import { type GeolocationPosition } from "../../modules/location/LocationManager";
3
- interface UserLocationProps {
2
+ export interface UserLocationProps {
4
3
  /**
5
- * Whether location icon is animated between updates
4
+ * Children to render inside the UserLocation Annotation, e.g. CircleLayer, SymbolLayer
6
5
  */
7
- animated?: boolean;
8
- /**
9
- * Which render mode to use.
10
- * Can either be `normal` or `native`
11
- */
12
- renderMode?: "normal" | "native";
13
- /**
14
- * native/android only render mode
15
- *
16
- * - normal: just a circle
17
- * - compass: triangle with heading
18
- * - gps: large arrow
19
- *
20
- * @platform android
21
- */
22
- androidRenderMode?: "normal" | "compass" | "gps";
23
- /**
24
- * Whether location icon is visible
25
- */
26
- visible?: boolean;
6
+ children?: ReactNode;
27
7
  /**
28
- * Callback that is triggered on location icon press
8
+ * Whether the UserLocation Annotation is animated between updates
29
9
  */
30
- onPress?: () => void;
10
+ animated?: boolean;
31
11
  /**
32
- * Callback that is triggered on location update
12
+ * Render a circle which indicates the accuracy of the location
33
13
  */
34
- onUpdate?: (location: GeolocationPosition) => void;
14
+ accuracy?: boolean;
35
15
  /**
36
- * Show or hide small arrow which indicates direction the device is pointing relative to north.
16
+ * Render an arrow which indicates direction the device is pointing relative to north
37
17
  */
38
- showsUserHeadingIndicator?: boolean;
18
+ heading?: boolean;
39
19
  /**
40
- * Minimum amount of movement before GPS location is updated in meters
20
+ * Minimum delta in meters for location updates
41
21
  */
42
22
  minDisplacement?: number;
43
23
  /**
44
- * Android only. Set max FPS at which location animators can output updates. Use this setting to limit animation rate of the location puck on higher zoom levels to decrease the stress on the device's CPU which can directly improve battery life, without sacrificing UX.
45
- *
46
- * @platform android
47
- */
48
- androidPreferredFramesPerSecond?: number;
49
- /**
50
- * Custom location icon of type mapbox-gl-native components
51
- *
52
- * NOTE: Forking maintainer does not understand the above comment.
24
+ * Event triggered on pressing the UserLocation Annotation
53
25
  */
54
- children?: ReactNode;
55
- }
56
- export declare enum UserLocationRenderMode {
57
- Native = "native",
58
- Normal = "normal"
59
- }
60
- export interface UserLocationRef {
61
- setLocationManager: (props: {
62
- running: boolean;
63
- }) => Promise<void>;
64
- needsLocationManagerRunning: () => boolean;
65
- _onLocationUpdate: (location: GeolocationPosition | undefined) => void;
26
+ onPress?: () => void;
66
27
  }
67
- export declare const UserLocation: import("react").NamedExoticComponent<UserLocationProps & import("react").RefAttributes<UserLocationRef>>;
68
- export {};
28
+ export declare const UserLocation: import("react").MemoExoticComponent<({ animated, accuracy, heading, minDisplacement, children, onPress, }: UserLocationProps) => import("react/jsx-runtime").JSX.Element | null>;
69
29
  //# sourceMappingURL=UserLocation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UserLocation.d.ts","sourceRoot":"","sources":["../../../../../../src/components/user-location/UserLocation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AAIf,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,wCAAwC,CAAC;AAKhD,UAAU,iBAAiB;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,UAAU,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IACjC;;;;;;;;OAQG;IACH,iBAAiB,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,KAAK,CAAC;IACjD;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACnD;;OAEG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,+BAA+B,CAAC,EAAE,MAAM,CAAC;IACzC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAQD,oBAAY,sBAAsB;IAChC,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,kBAAkB,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACnE,2BAA2B,EAAE,MAAM,OAAO,CAAC;IAC3C,iBAAiB,EAAE,CAAC,QAAQ,EAAE,mBAAmB,GAAG,SAAS,KAAK,IAAI,CAAC;CACxE;AAED,eAAO,MAAM,YAAY,0GAkLxB,CAAC"}
1
+ {"version":3,"file":"UserLocation.d.ts","sourceRoot":"","sources":["../../../../../../src/components/user-location/UserLocation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,SAAS,EAAW,MAAM,OAAO,CAAC;AAMtD,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,YAAY,6GAQpB,iBAAiB,oDAuCrB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { type CodegenTypes, type HostComponent, type ViewProps } from "react-native";
2
+ export interface NativeProps extends ViewProps {
3
+ mode?: CodegenTypes.WithDefault<"default" | "heading" | "course", "default">;
4
+ androidPreferredFramesPerSecond?: CodegenTypes.WithDefault<CodegenTypes.Int32, -1>;
5
+ }
6
+ declare const _default: HostComponent<NativeProps>;
7
+ export default _default;
8
+ //# sourceMappingURL=UserLocationNativeComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserLocationNativeComponent.d.ts","sourceRoot":"","sources":["../../../../../../src/components/user-location/UserLocationNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,IAAI,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,SAAS,GAAG,SAAS,GAAG,QAAQ,EAAE,SAAS,CAAC,CAAC;IAE7E,+BAA+B,CAAC,EAAE,YAAY,CAAC,WAAW,CACxD,YAAY,CAAC,KAAK,EAClB,CAAC,CAAC,CACH,CAAC;CACH;wBAII,aAAa,CAAC,WAAW,CAAC;AAF/B,wBAEgC"}
@@ -1,9 +1,10 @@
1
1
  import type { BaseProps } from "../../types/BaseProps";
2
2
  interface UserLocationPuckProps extends BaseProps {
3
3
  sourceID: string;
4
+ accuracy?: number;
4
5
  heading?: number;
5
6
  belowLayerID?: string;
6
7
  }
7
- export declare const UserLocationPuck: import("react").MemoExoticComponent<({ sourceID, heading }: UserLocationPuckProps) => import("react/jsx-runtime").JSX.Element>;
8
+ export declare const UserLocationPuck: import("react").MemoExoticComponent<({ sourceID, accuracy, heading }: UserLocationPuckProps) => import("react/jsx-runtime").JSX.Element>;
8
9
  export {};
9
10
  //# sourceMappingURL=UserLocationPuck.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UserLocationPuck.d.ts","sourceRoot":"","sources":["../../../../../../src/components/user-location/UserLocationPuck.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAyBvD,UAAU,qBAAsB,SAAQ,SAAS;IAC/C,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,gBAAgB,8DACH,qBAAqB,6CA0B9C,CAAC"}
1
+ {"version":3,"file":"UserLocationPuck.d.ts","sourceRoot":"","sources":["../../../../../../src/components/user-location/UserLocationPuck.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAyBvD,UAAU,qBAAsB,SAAQ,SAAS;IAC/C,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,gBAAgB,wEACO,qBAAqB,6CA4CxD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"UserLocationPuckHeading.d.ts","sourceRoot":"","sources":["../../../../../../src/components/user-location/UserLocationPuckHeading.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAWvD,UAAU,4BAA6B,SAAQ,SAAS;IACtD,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,uBAAuB,4EACI,4BAA4B,6CAWnE,CAAC"}
1
+ {"version":3,"file":"UserLocationPuckHeading.d.ts","sourceRoot":"","sources":["../../../../../../src/components/user-location/UserLocationPuckHeading.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAWvD,UAAU,4BAA6B,SAAQ,SAAS;IACtD,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,uBAAuB,4EACI,4BAA4B,6CAYnE,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { type GeolocationPosition } from "../modules/location/LocationManager";
2
+ interface UseCurrentPositionOptions {
3
+ /**
4
+ * Enable or disable position updates
5
+ *
6
+ * @default true
7
+ */
8
+ enabled?: boolean;
9
+ /**
10
+ * Minimum displacement in meters to trigger position update
11
+ *
12
+ * @default 0
13
+ */
14
+ minDisplacement?: number;
15
+ }
16
+ export declare function useCurrentPosition({ enabled, minDisplacement, }?: UseCurrentPositionOptions): GeolocationPosition | undefined;
17
+ export {};
18
+ //# sourceMappingURL=useCurrentPosition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCurrentPosition.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/useCurrentPosition.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,qCAAqC,CAAC;AAE7C,UAAU,yBAAyB;IACjC;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,kBAAkB,CAAC,EACjC,OAAc,EACd,eAAe,GAChB,GAAE,yBAA8B,mCA0BhC"}
@@ -5,8 +5,9 @@ export { PointAnnotation } from "./components/annotations/PointAnnotation";
5
5
  export type { PointAnnotationRef } from "./components/annotations/PointAnnotation";
6
6
  export { Annotation } from "./components/annotations/Annotation";
7
7
  export { Callout } from "./components/annotations/Callout";
8
- export { UserLocation, UserLocationRenderMode, } from "./components/user-location/UserLocation";
9
- export type { UserLocationRef } from "./components/user-location/UserLocation";
8
+ export { UserLocation } from "./components/user-location/UserLocation";
9
+ export { NativeUserLocation } from "./components/user-location/NativeUserLocation";
10
+ export { useCurrentPosition } from "./hooks/useCurrentPosition";
10
11
  export { VectorSource } from "./components/sources/VectorSource";
11
12
  export { ShapeSource } from "./components/sources/ShapeSource";
12
13
  export type { ShapeSourceRef } from "./components/sources/ShapeSource";
@@ -23,7 +24,6 @@ export { RasterLayer } from "./components/layers/RasterLayer";
23
24
  export { BackgroundLayer } from "./components/layers/BackgroundLayer";
24
25
  export { MarkerView } from "./components/annotations/MarkerView";
25
26
  export { LocationManager, type GeolocationPosition, } from "./modules/location/LocationManager";
26
- export { requestAndroidLocationPermissions } from "./modules/location/requestAndroidLocationPermissions";
27
27
  export { OfflineManager } from "./modules/offline/OfflineManager";
28
28
  export type { OfflinePackError } from "./modules/offline/OfflineManager";
29
29
  export type { OfflinePackStatus } from "./modules/offline/OfflinePack";
@@ -36,6 +36,6 @@ export type { FillLayerStyle, LineLayerStyle, SymbolLayerStyle, CircleLayerStyle
36
36
  export type { PressEvent, PressEventWithFeatures } from "./types/PressEvent";
37
37
  export type { ViewPadding } from "./types/ViewPadding";
38
38
  export { Animated } from "./utils/animated/Animated";
39
- export { Logger, type LogLevel } from "./modules/Logger";
39
+ export { LogManager, type LogLevel } from "./modules/log/LogManager";
40
40
  export type { MapLibrePluginProps } from "./plugin/MapLibrePluginProps";
41
41
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAE7B,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,iBAAiB,EACtB,KAAK,4BAA4B,EACjC,KAAK,WAAW,EAChB,MAAM,GACP,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACL,OAAO,EACP,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,oBAAoB,GAC1B,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAC3E,YAAY,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EACL,YAAY,EACZ,sBAAsB,GACvB,MAAM,yCAAyC,CAAC;AACjD,YAAY,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC/E,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,YAAY,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAA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CAAC;AAC7C,YAAY,EACV,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,uBAAuB,EACvB,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,EACf,UAAU,GACX,MAAM,0BAA0B,CAAC;AAClC,YAAY,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,KAAK,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAErE,YAAY,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC"}
@@ -14,7 +14,7 @@ interface GeolocationCoordinates {
14
14
  /**
15
15
  * Altitude in meters
16
16
  */
17
- altitude: number;
17
+ altitude: number | null;
18
18
  /**
19
19
  * Accuracy for altitude in meters
20
20
  */
@@ -22,11 +22,11 @@ interface GeolocationCoordinates {
22
22
  /**
23
23
  * Direction in which the device is traveling in degrees, relative to north
24
24
  */
25
- heading: number;
25
+ heading: number | null;
26
26
  /**
27
27
  * Instantaneous speed of the device in meters per second
28
28
  */
29
- speed: number;
29
+ speed: number | null;
30
30
  }
31
31
  export interface GeolocationPosition {
32
32
  coords: GeolocationCoordinates;
@@ -1 +1 @@
1
- {"version":3,"file":"LocationManager.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/location/LocationManager.ts"],"names":[],"mappings":"AASA,UAAU,sBAAsB;IAC9B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC;;OAEG;IACH,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AAC;IAEvB;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,sBAAsB,CAAC;IAE/B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,cAAM,eAAe;IACnB,OAAO,CAAC,SAAS,CAAmD;IACpE,OAAO,CAAC,eAAe,CAA8C;IACrE,OAAO,CAAC,WAAW,CAAkB;IAErC,OAAO,CAAC,YAAY,CAA4C;;IAM1D,kBAAkB,IAAI,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC;IAcpE,WAAW,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE,mBAAmB,KAAK,IAAI,GAAG,IAAI;IAcvE,cAAc,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE,mBAAmB,KAAK,IAAI,GAAG,IAAI;IAU1E,kBAAkB,IAAI,IAAI;IAM1B,KAAK,IAAI,IAAI;IAUb,IAAI,IAAI,IAAI;IAUZ,kBAAkB,CAAC,eAAe,EAAE,MAAM,GAAG,IAAI;IAIjD,OAAO,CAAC,YAAY;IAMd,yBAAyB,IAAI,OAAO,CAAC,OAAO,CAAC;CAcpD;AAED,QAAA,MAAM,eAAe,iBAAwB,CAAC;AAC9C,OAAO,EAAE,eAAe,IAAI,eAAe,EAAE,CAAC"}
@@ -3,10 +3,10 @@ type NativeGeolocationCoordinates = {
3
3
  longitude: CodegenTypes.Double;
4
4
  latitude: CodegenTypes.Double;
5
5
  accuracy: CodegenTypes.Double;
6
- altitude: CodegenTypes.Double;
6
+ altitude: CodegenTypes.Double | null;
7
7
  altitudeAccuracy: CodegenTypes.Double | null;
8
- heading: CodegenTypes.Double;
9
- speed: CodegenTypes.Double;
8
+ heading: CodegenTypes.Double | null;
9
+ speed: CodegenTypes.Double | null;
10
10
  };
11
11
  type NativeGeolocationPosition = {
12
12
  coords: NativeGeolocationCoordinates;
@@ -1 +1 @@
1
- {"version":3,"file":"NativeLocationModule.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/location/NativeLocationModule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAG9D,KAAK,4BAA4B,GAAG;IAClC,SAAS,EAAE,YAAY,CAAC,MAAM,CAAC;IAC/B,QAAQ,EAAE,YAAY,CAAC,MAAM,CAAC;IAC9B,QAAQ,EAAE,YAAY,CAAC,MAAM,CAAC;IAC9B,QAAQ,EAAE,YAAY,CAAC,MAAM,CAAC;IAC9B,gBAAgB,EAAE,YAAY,CAAC,MAAM,GAAG,IAAI,CAAC;IAC7C,OAAO,EAAE,YAAY,CAAC,MAAM,CAAC;IAC7B,KAAK,EAAE,YAAY,CAAC,MAAM,CAAC;CAC5B,CAAC;AAEF,KAAK,yBAAyB,GAAG;IAC/B,MAAM,EAAE,4BAA4B,CAAC;IACrC,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,KAAK,IAAI,IAAI,CAAC;IAEd,IAAI,IAAI,IAAI,CAAC;IAEb,kBAAkB,IAAI,OAAO,CAAC,yBAAyB,CAAC,CAAC;IAEzD,kBAAkB,CAAC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAElD,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC,YAAY,CAAC,yBAAyB,CAAC,CAAC;CACzE;;AAED,wBAA4E"}
1
+ {"version":3,"file":"NativeLocationModule.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/location/NativeLocationModule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAG9D,KAAK,4BAA4B,GAAG;IAClC,SAAS,EAAE,YAAY,CAAC,MAAM,CAAC;IAC/B,QAAQ,EAAE,YAAY,CAAC,MAAM,CAAC;IAC9B,QAAQ,EAAE,YAAY,CAAC,MAAM,CAAC;IAC9B,QAAQ,EAAE,YAAY,CAAC,MAAM,GAAG,IAAI,CAAC;IACrC,gBAAgB,EAAE,YAAY,CAAC,MAAM,GAAG,IAAI,CAAC;IAC7C,OAAO,EAAE,YAAY,CAAC,MAAM,GAAG,IAAI,CAAC;IACpC,KAAK,EAAE,YAAY,CAAC,MAAM,GAAG,IAAI,CAAC;CACnC,CAAC;AAEF,KAAK,yBAAyB,GAAG;IAC/B,MAAM,EAAE,4BAA4B,CAAC;IACrC,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,KAAK,IAAI,IAAI,CAAC;IAEd,IAAI,IAAI,IAAI,CAAC;IAEb,kBAAkB,IAAI,OAAO,CAAC,yBAAyB,CAAC,CAAC;IAEzD,kBAAkB,CAAC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAElD,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC,YAAY,CAAC,yBAAyB,CAAC,CAAC;CACzE;;AAED,wBAA4E"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Log levels in decreasing order of severity
3
+ */
4
+ export type LogLevel = "error" | "warn" | "info" | "debug" | "verbose";
5
+ interface LogEvent {
6
+ level: LogLevel;
7
+ tag: string;
8
+ message: string;
9
+ }
10
+ /**
11
+ * Handler for `onLog` events
12
+ *
13
+ * Called before logging a message, return false to proceed with default logging.
14
+ *
15
+ * @param event
16
+ */
17
+ type LogHandler = (event: LogEvent) => boolean;
18
+ declare class LogManager {
19
+ private logLevel;
20
+ private startedCount;
21
+ private logHandler;
22
+ private subscription;
23
+ constructor();
24
+ /**
25
+ * Override logging behavior
26
+ *
27
+ * @param logHandler
28
+ */
29
+ onLog(logHandler: LogHandler): void;
30
+ /**
31
+ * Set the minimum log level for a message to be logged
32
+ *
33
+ * @param level Minimum log level
34
+ */
35
+ setLogLevel(level: LogLevel): void;
36
+ start(): void;
37
+ stop(): void;
38
+ private subscribe;
39
+ private unsubscribe;
40
+ private effectiveLevel;
41
+ private handleLog;
42
+ }
43
+ declare const logManager: LogManager;
44
+ export { logManager as LogManager };
45
+ //# sourceMappingURL=LogManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LogManager.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/log/LogManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAEvE,UAAU,QAAQ;IAChB,KAAK,EAAE,QAAQ,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;GAMG;AACH,KAAK,UAAU,GAAG,CAAC,KAAK,EAAE,QAAQ,KAAK,OAAO,CAAC;AAE/C,cAAM,UAAU;IACd,OAAO,CAAC,QAAQ,CAAoB;IACpC,OAAO,CAAC,YAAY,CAAa;IACjC,OAAO,CAAC,UAAU,CAAqC;IACvD,OAAO,CAAC,YAAY,CAA4C;;IAMhE;;;;OAIG;IACH,KAAK,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI;IAInC;;;;OAIG;IACH,WAAW,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;IAKlC,KAAK,IAAI,IAAI;IAQb,IAAI,IAAI,IAAI;IAQZ,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,WAAW;IAOnB,OAAO,CAAC,cAAc;IAatB,OAAO,CAAC,SAAS;CAgBlB;AAED,QAAA,MAAM,UAAU,YAAmB,CAAC;AAEpC,OAAO,EAAE,UAAU,IAAI,UAAU,EAAE,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { TurboModule, CodegenTypes } from "react-native";
2
+ type NativeLogLevel = "error" | "warn" | "info" | "debug" | "verbose";
3
+ export interface Spec extends TurboModule {
4
+ setLogLevel(logLevel: NativeLogLevel): void;
5
+ readonly onLog: CodegenTypes.EventEmitter<{
6
+ level: NativeLogLevel;
7
+ tag: string;
8
+ message: string;
9
+ }>;
10
+ }
11
+ declare const _default: Spec;
12
+ export default _default;
13
+ //# sourceMappingURL=NativeLogModule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeLogModule.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/log/NativeLogModule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAG9D,KAAK,cAAc,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAEtE,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,WAAW,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAC;IAE5C,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC,YAAY,CAAC;QACxC,KAAK,EAAE,cAAc,CAAC;QACtB,GAAG,EAAE,MAAM,CAAC;QACZ,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC,CAAC;CACJ;;AAED,wBAAuE"}
@@ -1,12 +1,10 @@
1
- import { type ForwardRefExoticComponent, type MemoExoticComponent, type RefAttributes } from "react";
2
1
  import { Animated as RNAnimated } from "react-native";
3
2
  import { AnimatedCoordinatesArray } from "./AnimatedCoordinatesArray";
4
3
  import { AnimatedExtractCoordinateFromArray } from "./AnimatedExtractCoordinateFromArray";
5
4
  import { AnimatedRouteCoordinatesArray } from "./AnimatedRouteCoordinatesArray";
6
5
  import { AnimatedShape } from "./AnimatedShape";
7
- import { type ShapeSourceProps, type ShapeSourceRef } from "../../components/sources/ShapeSource";
8
6
  export declare const Animated: {
9
- ShapeSource: RNAnimated.AnimatedComponent<import("react").NamedExoticComponent<ShapeSourceProps & RefAttributes<ShapeSourceRef>>>;
7
+ ShapeSource: RNAnimated.AnimatedComponent<import("react").NamedExoticComponent<import("../../components/sources/ShapeSource").ShapeSourceProps & import("react").RefAttributes<import("../..").ShapeSourceRef>>>;
10
8
  ImageSource: RNAnimated.AnimatedComponent<(props: import("../../components/sources/ImageSource").ImageSourceProps) => import("react/jsx-runtime").JSX.Element | null>;
11
9
  FillLayer: RNAnimated.AnimatedComponent<({ sourceID, ...props }: import("../../components/layers/FillLayer").FillLayerProps) => import("react/jsx-runtime").JSX.Element>;
12
10
  FillExtrusionLayer: RNAnimated.AnimatedComponent<({ sourceID, ...props }: import("../../components/layers/FillExtrusionLayer").FillExtrusionLayerProps) => import("react/jsx-runtime").JSX.Element>;
@@ -20,14 +18,4 @@ export declare const Animated: {
20
18
  Shape: typeof AnimatedShape;
21
19
  ExtractCoordinateFromArray: typeof AnimatedExtractCoordinateFromArray;
22
20
  };
23
- type ShapeSourcePropsWithRef = ShapeSourceProps & RefAttributes<ShapeSourceRef>;
24
- type BaseShapeSourceComponent = ForwardRefExoticComponent<ShapeSourcePropsWithRef>;
25
- type AnimatedShapeSourceType = RNAnimated.AnimatedComponent<BaseShapeSourceComponent> & MemoExoticComponent<BaseShapeSourceComponent>;
26
- /**
27
- * Manual typing is required for AnimatedShapeSource because the
28
- * following error:
29
- * `Type instantiation is excessively deep and possibly infinite.ts(2589)`
30
- */
31
- export declare const AnimatedShapeSource: AnimatedShapeSourceType;
32
- export {};
33
21
  //# sourceMappingURL=Animated.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Animated.d.ts","sourceRoot":"","sources":["../../../../../../src/utils/animated/Animated.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,aAAa,EACnB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,QAAQ,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAShD,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACpB,MAAM,sCAAsC,CAAC;AAE9C,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;CAmBpB,CAAC;AAEF,KAAK,uBAAuB,GAAG,gBAAgB,GAAG,aAAa,CAAC,cAAc,CAAC,CAAC;AAEhF,KAAK,wBAAwB,GAC3B,yBAAyB,CAAC,uBAAuB,CAAC,CAAC;AAErD,KAAK,uBAAuB,GAC1B,UAAU,CAAC,iBAAiB,CAAC,wBAAwB,CAAC,GACpD,mBAAmB,CAAC,wBAAwB,CAAC,CAAC;AAElD;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAE3B,uBAAuB,CAAC"}
1
+ {"version":3,"file":"Animated.d.ts","sourceRoot":"","sources":["../../../../../../src/utils/animated/Animated.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAWhD,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;CAmBpB,CAAC"}
@@ -1,8 +1,9 @@
1
1
  import { type ReactNode } from "react";
2
2
  import { type NativeSyntheticEvent } from "react-native";
3
+ import type { BaseProps } from "../../types/BaseProps";
3
4
  import { type SymbolLayerStyle } from "../../types/MapLibreRNStyles";
4
5
  import { type PressEventWithFeatures } from "../../types/PressEvent";
5
- interface AnnotationProps {
6
+ interface AnnotationProps extends BaseProps {
6
7
  id: string;
7
8
  animated?: boolean;
8
9
  animationDuration?: number;
@@ -10,7 +11,7 @@ interface AnnotationProps {
10
11
  coordinates?: number[];
11
12
  onPress?: (event: NativeSyntheticEvent<PressEventWithFeatures>) => void;
12
13
  children?: ReactNode;
13
- style?: object;
14
+ style?: SymbolLayerStyle;
14
15
  icon?: string | number | object;
15
16
  }
16
17
  interface AnnotationRef {
@@ -1 +1 @@
1
- {"version":3,"file":"Annotation.d.ts","sourceRoot":"","sources":["../../../../../../src/components/annotations/Annotation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,SAAS,EAIf,MAAM,OAAO,CAAC;AACf,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAKrE,UAAU,eAAe;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,uBAAuB,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IAChD,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC,sBAAsB,CAAC,KAAK,IAAI,CAAC;IACxE,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;CACjC;AAoBD,UAAU,aAAa;IACrB,WAAW,EAAE,gBAAgB,GAAG,SAAS,CAAC;CAC3C;AAED,eAAO,MAAM,UAAU,2GA2FtB,CAAC"}
1
+ {"version":3,"file":"Annotation.d.ts","sourceRoot":"","sources":["../../../../../../src/components/annotations/Annotation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,SAAS,EAIf,MAAM,OAAO,CAAC;AACf,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,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AAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAEnE,gBAAgB,CACd,OAAO,EAAE,OAAO,CAAC,OAAO,EACxB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAEtC,kBAAkB,CAChB,OAAO,EAAE,OAAO,CAAC,OAAO,GACvB,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAEtC,cAAc,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;IAG7C,UAAU,EAAE,sBAAsB,GAAG,IAAI,CAAC;CAC3C;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,wGA8LvB,CAAC"}
@@ -1,22 +1,21 @@
1
- interface NativeUserLocationProps {
1
+ import type { BaseProps } from "../../types/BaseProps";
2
+ interface NativeUserLocationProps extends BaseProps {
2
3
  /**
3
- * Android render mode.
4
+ * Rendering mode
4
5
  *
5
- * - normal: just a circle
6
- * - compass: triangle with heading
7
- * - gps: large arrow
6
+ * - "default": Renders only a puck
7
+ * - "heading": Renders a puck with triangle indicating device heading based on compass
8
+ * - "course": Android renders an arrow indicating device heading based on GPS course, iOS behaves like mode="heading"
8
9
  *
9
- * @platform android
10
+ * @default "default"
10
11
  */
11
- androidRenderMode?: "normal" | "compass" | "gps";
12
+ mode?: "default" | "heading" | "course";
12
13
  /**
13
- * iOS only. A Boolean value indicating whether the user location annotation may display a permanent heading indicator.
14
+ * Limit the maximum frames per second for location updates on Android
14
15
  *
15
- * @platform ios
16
- */
17
- iosShowsUserHeadingIndicator?: boolean;
18
- /**
19
- * Android only. Set max FPS at which location animators can output updates. Use this setting to limit animation rate of the location puck on higher zoom levels to decrease the stress on the device's CPU which can directly improve battery life, without sacrificing UX.
16
+ * 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.
17
+ *
18
+ * @platform android
20
19
  */
21
20
  androidPreferredFramesPerSecond?: number;
22
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"NativeUserLocation.d.ts","sourceRoot":"","sources":["../../../../../../src/components/user-location/NativeUserLocation.tsx"],"names":[],"mappings":"AAIA,UAAU,uBAAuB;IAC/B;;;;;;;;OAQG;IACH,iBAAiB,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,KAAK,CAAC;IACjD;;;;OAIG;IACH,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC;;OAEG;IACH,+BAA+B,CAAC,EAAE,MAAM,CAAC;CAC1C;AAED,eAAO,MAAM,kBAAkB,GAAI,OAAO,uBAAuB,4CAEhE,CAAC"}
1
+ {"version":3,"file":"NativeUserLocation.d.ts","sourceRoot":"","sources":["../../../../../../src/components/user-location/NativeUserLocation.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,UAAU,uBAAwB,SAAQ,SAAS;IACjD;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;IAExC;;;;;;OAMG;IACH,+BAA+B,CAAC,EAAE,MAAM,CAAC;CAC1C;AAED,eAAO,MAAM,kBAAkB,GAAI,OAAO,uBAAuB,4CAEhE,CAAC"}
@@ -1,69 +1,29 @@
1
1
  import { type ReactNode } from "react";
2
- import { type GeolocationPosition } from "../../modules/location/LocationManager";
3
- interface UserLocationProps {
2
+ export interface UserLocationProps {
4
3
  /**
5
- * Whether location icon is animated between updates
4
+ * Children to render inside the UserLocation Annotation, e.g. CircleLayer, SymbolLayer
6
5
  */
7
- animated?: boolean;
8
- /**
9
- * Which render mode to use.
10
- * Can either be `normal` or `native`
11
- */
12
- renderMode?: "normal" | "native";
13
- /**
14
- * native/android only render mode
15
- *
16
- * - normal: just a circle
17
- * - compass: triangle with heading
18
- * - gps: large arrow
19
- *
20
- * @platform android
21
- */
22
- androidRenderMode?: "normal" | "compass" | "gps";
23
- /**
24
- * Whether location icon is visible
25
- */
26
- visible?: boolean;
6
+ children?: ReactNode;
27
7
  /**
28
- * Callback that is triggered on location icon press
8
+ * Whether the UserLocation Annotation is animated between updates
29
9
  */
30
- onPress?: () => void;
10
+ animated?: boolean;
31
11
  /**
32
- * Callback that is triggered on location update
12
+ * Render a circle which indicates the accuracy of the location
33
13
  */
34
- onUpdate?: (location: GeolocationPosition) => void;
14
+ accuracy?: boolean;
35
15
  /**
36
- * Show or hide small arrow which indicates direction the device is pointing relative to north.
16
+ * Render an arrow which indicates direction the device is pointing relative to north
37
17
  */
38
- showsUserHeadingIndicator?: boolean;
18
+ heading?: boolean;
39
19
  /**
40
- * Minimum amount of movement before GPS location is updated in meters
20
+ * Minimum delta in meters for location updates
41
21
  */
42
22
  minDisplacement?: number;
43
23
  /**
44
- * Android only. Set max FPS at which location animators can output updates. Use this setting to limit animation rate of the location puck on higher zoom levels to decrease the stress on the device's CPU which can directly improve battery life, without sacrificing UX.
45
- *
46
- * @platform android
47
- */
48
- androidPreferredFramesPerSecond?: number;
49
- /**
50
- * Custom location icon of type mapbox-gl-native components
51
- *
52
- * NOTE: Forking maintainer does not understand the above comment.
24
+ * Event triggered on pressing the UserLocation Annotation
53
25
  */
54
- children?: ReactNode;
55
- }
56
- export declare enum UserLocationRenderMode {
57
- Native = "native",
58
- Normal = "normal"
59
- }
60
- export interface UserLocationRef {
61
- setLocationManager: (props: {
62
- running: boolean;
63
- }) => Promise<void>;
64
- needsLocationManagerRunning: () => boolean;
65
- _onLocationUpdate: (location: GeolocationPosition | undefined) => void;
26
+ onPress?: () => void;
66
27
  }
67
- export declare const UserLocation: import("react").NamedExoticComponent<UserLocationProps & import("react").RefAttributes<UserLocationRef>>;
68
- export {};
28
+ export declare const UserLocation: import("react").MemoExoticComponent<({ animated, accuracy, heading, minDisplacement, children, onPress, }: UserLocationProps) => import("react/jsx-runtime").JSX.Element | null>;
69
29
  //# sourceMappingURL=UserLocation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UserLocation.d.ts","sourceRoot":"","sources":["../../../../../../src/components/user-location/UserLocation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AAIf,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,wCAAwC,CAAC;AAKhD,UAAU,iBAAiB;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,UAAU,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IACjC;;;;;;;;OAQG;IACH,iBAAiB,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,KAAK,CAAC;IACjD;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACnD;;OAEG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,+BAA+B,CAAC,EAAE,MAAM,CAAC;IACzC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAQD,oBAAY,sBAAsB;IAChC,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,kBAAkB,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACnE,2BAA2B,EAAE,MAAM,OAAO,CAAC;IAC3C,iBAAiB,EAAE,CAAC,QAAQ,EAAE,mBAAmB,GAAG,SAAS,KAAK,IAAI,CAAC;CACxE;AAED,eAAO,MAAM,YAAY,0GAkLxB,CAAC"}
1
+ {"version":3,"file":"UserLocation.d.ts","sourceRoot":"","sources":["../../../../../../src/components/user-location/UserLocation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,SAAS,EAAW,MAAM,OAAO,CAAC;AAMtD,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,YAAY,6GAQpB,iBAAiB,oDAuCrB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { type CodegenTypes, type HostComponent, type ViewProps } from "react-native";
2
+ export interface NativeProps extends ViewProps {
3
+ mode?: CodegenTypes.WithDefault<"default" | "heading" | "course", "default">;
4
+ androidPreferredFramesPerSecond?: CodegenTypes.WithDefault<CodegenTypes.Int32, -1>;
5
+ }
6
+ declare const _default: HostComponent<NativeProps>;
7
+ export default _default;
8
+ //# sourceMappingURL=UserLocationNativeComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserLocationNativeComponent.d.ts","sourceRoot":"","sources":["../../../../../../src/components/user-location/UserLocationNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,IAAI,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,SAAS,GAAG,SAAS,GAAG,QAAQ,EAAE,SAAS,CAAC,CAAC;IAE7E,+BAA+B,CAAC,EAAE,YAAY,CAAC,WAAW,CACxD,YAAY,CAAC,KAAK,EAClB,CAAC,CAAC,CACH,CAAC;CACH;wBAII,aAAa,CAAC,WAAW,CAAC;AAF/B,wBAEgC"}
@@ -1,9 +1,10 @@
1
1
  import type { BaseProps } from "../../types/BaseProps";
2
2
  interface UserLocationPuckProps extends BaseProps {
3
3
  sourceID: string;
4
+ accuracy?: number;
4
5
  heading?: number;
5
6
  belowLayerID?: string;
6
7
  }
7
- export declare const UserLocationPuck: import("react").MemoExoticComponent<({ sourceID, heading }: UserLocationPuckProps) => import("react/jsx-runtime").JSX.Element>;
8
+ export declare const UserLocationPuck: import("react").MemoExoticComponent<({ sourceID, accuracy, heading }: UserLocationPuckProps) => import("react/jsx-runtime").JSX.Element>;
8
9
  export {};
9
10
  //# sourceMappingURL=UserLocationPuck.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UserLocationPuck.d.ts","sourceRoot":"","sources":["../../../../../../src/components/user-location/UserLocationPuck.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAyBvD,UAAU,qBAAsB,SAAQ,SAAS;IAC/C,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,gBAAgB,8DACH,qBAAqB,6CA0B9C,CAAC"}
1
+ {"version":3,"file":"UserLocationPuck.d.ts","sourceRoot":"","sources":["../../../../../../src/components/user-location/UserLocationPuck.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAyBvD,UAAU,qBAAsB,SAAQ,SAAS;IAC/C,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,gBAAgB,wEACO,qBAAqB,6CA4CxD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"UserLocationPuckHeading.d.ts","sourceRoot":"","sources":["../../../../../../src/components/user-location/UserLocationPuckHeading.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAWvD,UAAU,4BAA6B,SAAQ,SAAS;IACtD,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,uBAAuB,4EACI,4BAA4B,6CAWnE,CAAC"}
1
+ {"version":3,"file":"UserLocationPuckHeading.d.ts","sourceRoot":"","sources":["../../../../../../src/components/user-location/UserLocationPuckHeading.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAWvD,UAAU,4BAA6B,SAAQ,SAAS;IACtD,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,uBAAuB,4EACI,4BAA4B,6CAYnE,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { type GeolocationPosition } from "../modules/location/LocationManager";
2
+ interface UseCurrentPositionOptions {
3
+ /**
4
+ * Enable or disable position updates
5
+ *
6
+ * @default true
7
+ */
8
+ enabled?: boolean;
9
+ /**
10
+ * Minimum displacement in meters to trigger position update
11
+ *
12
+ * @default 0
13
+ */
14
+ minDisplacement?: number;
15
+ }
16
+ export declare function useCurrentPosition({ enabled, minDisplacement, }?: UseCurrentPositionOptions): GeolocationPosition | undefined;
17
+ export {};
18
+ //# sourceMappingURL=useCurrentPosition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCurrentPosition.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/useCurrentPosition.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,qCAAqC,CAAC;AAE7C,UAAU,yBAAyB;IACjC;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,kBAAkB,CAAC,EACjC,OAAc,EACd,eAAe,GAChB,GAAE,yBAA8B,mCA0BhC"}