@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
@@ -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,OA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AAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAEjE,OAAO,EACL,eAAe,EACf,KAAK,mBAAmB,GACzB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,YAAY,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACzE,YAAY,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AACtF,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,YAAY,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAE/E,YAAY,EAAE,MAAM,EAAE,MAAM,gBAAgB,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,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;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,IAA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Z,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,SA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ED,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"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maplibre/maplibre-react-native",
3
3
  "description": "React Native library for creating maps with MapLibre Native for Android & iOS",
4
- "version": "11.0.0-alpha.16",
4
+ "version": "11.0.0-alpha.18",
5
5
  "publishConfig": {
6
6
  "access": "public",
7
7
  "provenance": true
@@ -128,11 +128,13 @@
128
128
  "ios": {
129
129
  "componentProvider": {
130
130
  "MLRNCamera": "MLRNCameraComponentView",
131
- "MLRNMapView": "MLRNMapViewComponentView"
131
+ "MLRNMapView": "MLRNMapViewComponentView",
132
+ "MLRNNativeUserLocation": "MLRNNativeUserLocationComponentView"
132
133
  },
133
134
  "modulesProvider": {
134
135
  "MLRNCameraModule": "MLRNCameraModule",
135
136
  "MLRNLocationModule": "MLRNLocationModule",
137
+ "MLRNLogModule": "MLRNLogModule",
136
138
  "MLRNMapViewModule": "MLRNMapViewModule"
137
139
  }
138
140
  }
@@ -11,13 +11,14 @@ import {
11
11
  type NativeSyntheticEvent,
12
12
  } from "react-native";
13
13
 
14
+ import type { BaseProps } from "../../types/BaseProps";
14
15
  import { type SymbolLayerStyle } from "../../types/MapLibreRNStyles";
15
16
  import { type PressEventWithFeatures } from "../../types/PressEvent";
16
- import { AnimatedShapeSource } from "../../utils/animated/Animated";
17
+ import { Animated } from "../../utils/animated/Animated";
17
18
  import { AnimatedPoint } from "../../utils/animated/AnimatedPoint";
18
19
  import { SymbolLayer } from "../layers/SymbolLayer";
19
20
 
20
- interface AnnotationProps {
21
+ interface AnnotationProps extends BaseProps {
21
22
  id: string;
22
23
  animated?: boolean;
23
24
  animationDuration?: number;
@@ -25,7 +26,7 @@ interface AnnotationProps {
25
26
  coordinates?: number[];
26
27
  onPress?: (event: NativeSyntheticEvent<PressEventWithFeatures>) => void;
27
28
  children?: ReactNode;
28
- style?: object;
29
+ style?: SymbolLayerStyle;
29
30
  icon?: string | number | object;
30
31
  }
31
32
 
@@ -133,13 +134,14 @@ export const Annotation = forwardRef<AnnotationRef, AnnotationProps>(
133
134
  }
134
135
 
135
136
  return (
136
- <AnimatedShapeSource
137
+ <Animated.ShapeSource
137
138
  id={props.id}
139
+ testID={props.testID}
138
140
  onPress={props.onPress}
139
141
  shape={shape as RNAnimated.WithAnimatedObject<GeoJSON.Point>}
140
142
  >
141
143
  {children}
142
- </AnimatedShapeSource>
144
+ </Animated.ShapeSource>
143
145
  );
144
146
  },
145
147
  );
@@ -27,7 +27,7 @@ import MapViewNativeComponent, {
27
27
  type NativeProps,
28
28
  } from "./MapViewNativeComponent";
29
29
  import NativeMapViewModule from "./NativeMapViewModule";
30
- import { Logger } from "../../modules/Logger";
30
+ import { LogManager } from "../../modules/log/LogManager";
31
31
  import { type BaseProps } from "../../types/BaseProps";
32
32
  import type { Bounds } from "../../types/Bounds";
33
33
  import {
@@ -547,10 +547,10 @@ export const MapView = memo(
547
547
 
548
548
  // Start before rendering
549
549
  useLayoutEffect(() => {
550
- Logger.sharedInstance().start();
550
+ LogManager.start();
551
551
 
552
552
  return () => {
553
- Logger.sharedInstance().stop();
553
+ LogManager.stop();
554
554
  };
555
555
  }, []);
556
556
 
@@ -332,6 +332,7 @@ export const ShapeSource = memo(
332
332
 
333
333
  const shapeProps = {
334
334
  id: shapeId,
335
+ testID: props.testID,
335
336
  url: props.url,
336
337
  shape: _getShape(),
337
338
  hitbox: props.hitbox,
@@ -1,32 +1,28 @@
1
- import { requireNativeComponent } from "react-native";
1
+ import UserLocationNativeComponent from "./UserLocationNativeComponent";
2
+ import type { BaseProps } from "../../types/BaseProps";
2
3
 
3
- const NATIVE_MODULE_NAME = "MLRNNativeUserLocation";
4
-
5
- interface NativeUserLocationProps {
4
+ interface NativeUserLocationProps extends BaseProps {
6
5
  /**
7
- * Android render mode.
6
+ * Rendering mode
8
7
  *
9
- * - normal: just a circle
10
- * - compass: triangle with heading
11
- * - gps: large arrow
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"
12
11
  *
13
- * @platform android
12
+ * @default "default"
14
13
  */
15
- androidRenderMode?: "normal" | "compass" | "gps";
14
+ mode?: "default" | "heading" | "course";
15
+
16
16
  /**
17
- * iOS only. A Boolean value indicating whether the user location annotation may display a permanent heading indicator.
17
+ * Limit the maximum frames per second for location updates on Android
18
18
  *
19
- * @platform ios
20
- */
21
- iosShowsUserHeadingIndicator?: boolean;
22
- /**
23
- * 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.
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.
20
+ *
21
+ * @platform android
24
22
  */
25
23
  androidPreferredFramesPerSecond?: number;
26
24
  }
27
25
 
28
26
  export const NativeUserLocation = (props: NativeUserLocationProps) => {
29
- return <MLRNNativeUserLocation {...props} />;
27
+ return <UserLocationNativeComponent {...props} />;
30
28
  };
31
-
32
- const MLRNNativeUserLocation = requireNativeComponent(NATIVE_MODULE_NAME);