@maplibre/maplibre-react-native 11.0.0-alpha.16 → 11.0.0-alpha.17
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.
- package/android/src/main/java/org/maplibre/reactnative/components/camera/MLRNCameraManager.kt +3 -5
- package/android/src/main/java/org/maplibre/reactnative/components/location/LocationComponentManager.kt +154 -0
- package/android/src/main/java/org/maplibre/reactnative/components/location/MLRNNativeUserLocation.kt +70 -0
- package/android/src/main/java/org/maplibre/reactnative/components/location/MLRNNativeUserLocationManager.kt +50 -0
- package/android/src/main/java/org/maplibre/reactnative/modules/MLRNLocationModule.kt +20 -4
- package/ios/components/camera/MLRNCameraComponentView.h +0 -8
- package/ios/components/map-view/MLRNMapView.m +1 -1
- package/ios/components/map-view/MLRNMapViewComponentView.h +0 -5
- package/ios/components/user-location/MLRNNativeUserLocation.h +1 -1
- package/ios/components/user-location/MLRNNativeUserLocation.m +6 -5
- package/ios/components/user-location/MLRNNativeUserLocationComponentView.h +10 -0
- package/ios/components/user-location/MLRNNativeUserLocationComponentView.mm +51 -0
- package/ios/modules/location/MLRNLocation.m +17 -14
- package/ios/modules/logging/MLRNLogging.h +0 -5
- package/lib/commonjs/components/annotations/Annotation.js +2 -1
- package/lib/commonjs/components/annotations/Annotation.js.map +1 -1
- package/lib/commonjs/components/sources/ShapeSource.js +1 -0
- package/lib/commonjs/components/sources/ShapeSource.js.map +1 -1
- package/lib/commonjs/components/user-location/NativeUserLocation.js +3 -4
- package/lib/commonjs/components/user-location/NativeUserLocation.js.map +1 -1
- package/lib/commonjs/components/user-location/UserLocation.js +22 -132
- package/lib/commonjs/components/user-location/UserLocation.js.map +1 -1
- package/lib/commonjs/components/user-location/UserLocationNativeComponent.ts +19 -0
- package/lib/commonjs/components/user-location/UserLocationPuck.js +34 -22
- package/lib/commonjs/components/user-location/UserLocationPuck.js.map +1 -1
- package/lib/commonjs/components/user-location/UserLocationPuckHeading.js +3 -2
- package/lib/commonjs/components/user-location/UserLocationPuckHeading.js.map +1 -1
- package/lib/commonjs/hooks/useCurrentPosition.js +34 -0
- package/lib/commonjs/hooks/useCurrentPosition.js.map +1 -0
- package/lib/commonjs/index.js +12 -11
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/utils/animated/Animated.js +1 -7
- package/lib/commonjs/utils/animated/Animated.js.map +1 -1
- package/lib/module/components/annotations/Annotation.js +3 -2
- package/lib/module/components/annotations/Annotation.js.map +1 -1
- package/lib/module/components/sources/ShapeSource.js +1 -0
- package/lib/module/components/sources/ShapeSource.js.map +1 -1
- package/lib/module/components/user-location/NativeUserLocation.js +2 -4
- package/lib/module/components/user-location/NativeUserLocation.js.map +1 -1
- package/lib/module/components/user-location/UserLocation.js +22 -132
- package/lib/module/components/user-location/UserLocation.js.map +1 -1
- package/lib/module/components/user-location/UserLocationNativeComponent.ts +19 -0
- package/lib/module/components/user-location/UserLocationPuck.js +34 -22
- package/lib/module/components/user-location/UserLocationPuck.js.map +1 -1
- package/lib/module/components/user-location/UserLocationPuckHeading.js +3 -2
- package/lib/module/components/user-location/UserLocationPuckHeading.js.map +1 -1
- package/lib/module/hooks/useCurrentPosition.js +30 -0
- package/lib/module/hooks/useCurrentPosition.js.map +1 -0
- package/lib/module/index.js +3 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/utils/animated/Animated.js +0 -6
- package/lib/module/utils/animated/Animated.js.map +1 -1
- package/lib/typescript/commonjs/src/components/annotations/Annotation.d.ts +3 -2
- package/lib/typescript/commonjs/src/components/annotations/Annotation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/sources/ShapeSource.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/user-location/NativeUserLocation.d.ts +12 -13
- package/lib/typescript/commonjs/src/components/user-location/NativeUserLocation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/user-location/UserLocation.d.ts +13 -53
- package/lib/typescript/commonjs/src/components/user-location/UserLocation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/user-location/UserLocationNativeComponent.d.ts +8 -0
- package/lib/typescript/commonjs/src/components/user-location/UserLocationNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/user-location/UserLocationPuck.d.ts +2 -1
- package/lib/typescript/commonjs/src/components/user-location/UserLocationPuck.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/user-location/UserLocationPuckHeading.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/hooks/useCurrentPosition.d.ts +18 -0
- package/lib/typescript/commonjs/src/hooks/useCurrentPosition.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +3 -3
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/location/LocationManager.d.ts +3 -3
- package/lib/typescript/commonjs/src/modules/location/LocationManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/location/NativeLocationModule.d.ts +3 -3
- package/lib/typescript/commonjs/src/modules/location/NativeLocationModule.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/animated/Animated.d.ts +1 -13
- package/lib/typescript/commonjs/src/utils/animated/Animated.d.ts.map +1 -1
- package/lib/typescript/module/src/components/annotations/Annotation.d.ts +3 -2
- package/lib/typescript/module/src/components/annotations/Annotation.d.ts.map +1 -1
- package/lib/typescript/module/src/components/sources/ShapeSource.d.ts.map +1 -1
- package/lib/typescript/module/src/components/user-location/NativeUserLocation.d.ts +12 -13
- package/lib/typescript/module/src/components/user-location/NativeUserLocation.d.ts.map +1 -1
- package/lib/typescript/module/src/components/user-location/UserLocation.d.ts +13 -53
- package/lib/typescript/module/src/components/user-location/UserLocation.d.ts.map +1 -1
- package/lib/typescript/module/src/components/user-location/UserLocationNativeComponent.d.ts +8 -0
- package/lib/typescript/module/src/components/user-location/UserLocationNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/src/components/user-location/UserLocationPuck.d.ts +2 -1
- package/lib/typescript/module/src/components/user-location/UserLocationPuck.d.ts.map +1 -1
- package/lib/typescript/module/src/components/user-location/UserLocationPuckHeading.d.ts.map +1 -1
- package/lib/typescript/module/src/hooks/useCurrentPosition.d.ts +18 -0
- package/lib/typescript/module/src/hooks/useCurrentPosition.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +3 -3
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/location/LocationManager.d.ts +3 -3
- package/lib/typescript/module/src/modules/location/LocationManager.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/location/NativeLocationModule.d.ts +3 -3
- package/lib/typescript/module/src/modules/location/NativeLocationModule.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/animated/Animated.d.ts +1 -13
- package/lib/typescript/module/src/utils/animated/Animated.d.ts.map +1 -1
- package/package.json +3 -2
- package/src/components/annotations/Annotation.tsx +7 -5
- package/src/components/sources/ShapeSource.tsx +1 -0
- package/src/components/user-location/NativeUserLocation.tsx +15 -19
- package/src/components/user-location/UserLocation.tsx +65 -249
- package/src/components/user-location/UserLocationNativeComponent.ts +19 -0
- package/src/components/user-location/UserLocationPuck.tsx +47 -28
- package/src/components/user-location/UserLocationPuckHeading.tsx +2 -1
- package/src/hooks/useCurrentPosition.ts +53 -0
- package/src/index.ts +5 -6
- package/src/modules/location/LocationManager.ts +3 -3
- package/src/modules/location/NativeLocationModule.ts +3 -3
- package/src/utils/animated/Animated.ts +1 -28
- package/android/src/main/java/org/maplibre/reactnative/components/location/LocationComponentManager.java +0 -165
- package/android/src/main/java/org/maplibre/reactnative/components/location/MLRNNativeUserLocation.java +0 -76
- package/android/src/main/java/org/maplibre/reactnative/components/location/MLRNNativeUserLocationManager.java +0 -40
- package/ios/components/user-location/MLRNNativeUserLocationManager.h +0 -5
- package/ios/components/user-location/MLRNNativeUserLocationManager.m +0 -21
- package/lib/commonjs/modules/location/requestAndroidLocationPermissions.js +0 -14
- package/lib/commonjs/modules/location/requestAndroidLocationPermissions.js.map +0 -1
- package/lib/module/modules/location/requestAndroidLocationPermissions.js +0 -11
- package/lib/module/modules/location/requestAndroidLocationPermissions.js.map +0 -1
- package/lib/typescript/commonjs/src/modules/location/requestAndroidLocationPermissions.d.ts +0 -5
- package/lib/typescript/commonjs/src/modules/location/requestAndroidLocationPermissions.d.ts.map +0 -1
- package/lib/typescript/module/src/modules/location/requestAndroidLocationPermissions.d.ts +0 -5
- package/lib/typescript/module/src/modules/location/requestAndroidLocationPermissions.d.ts.map +0 -1
- package/src/modules/location/requestAndroidLocationPermissions.ts +0 -8
|
@@ -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,
|
|
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"}
|
package/lib/typescript/commonjs/src/components/user-location/UserLocationPuckHeading.d.ts.map
CHANGED
|
@@ -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,
|
|
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
|
|
9
|
-
export
|
|
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";
|
|
@@ -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;
|
|
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,YA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AM,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,MAAM,EAAE,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEzD,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;
|
|
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,GAAG,IAAI,CAAC;IAExB;;OAEG;IACH,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC;;OAEG;IACH,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;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;
|
|
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"}
|
|
@@ -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,
|
|
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?:
|
|
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,
|
|
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,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAKrE,UAAU,eAAgB,SAAQ,SAAS;IACzC,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,gBAAgB,CAAC;IACzB,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,2GA4FtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShapeSource.d.ts","sourceRoot":"","sources":["../../../../../../src/components/sources/ShapeSource.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAGT,KAAK,SAAS,EAGf,MAAM,OAAO,CAAC;AACf,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,oBAAoB,EAE1B,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AASrE,eAAO,MAAM,kBAAkB,oBAAoB,CAAC;AAEpD,UAAU,WAAW;IACnB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAED,KAAK,sBAAsB,GAAG,SAAS,CAAC,WAAW,CAAC,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAC;AAE/E,MAAM,WAAW,gBAAiB,SAAQ,SAAS;IACjD;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,CAAC,EACF,OAAO,CAAC,kBAAkB,GAC1B,OAAO,CAAC,OAAO,GACf,OAAO,CAAC,iBAAiB,GACzB,OAAO,CAAC,QAAQ,CAAC;IAErB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;;OAIG;IAC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|
-
*
|
|
4
|
+
* Rendering mode
|
|
4
5
|
*
|
|
5
|
-
* -
|
|
6
|
-
* -
|
|
7
|
-
* -
|
|
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
|
-
* @
|
|
10
|
+
* @default "default"
|
|
10
11
|
*/
|
|
11
|
-
|
|
12
|
+
mode?: "default" | "heading" | "course";
|
|
12
13
|
/**
|
|
13
|
-
*
|
|
14
|
+
* Limit the maximum frames per second for location updates on Android
|
|
14
15
|
*
|
|
15
|
-
*
|
|
16
|
-
|
|
17
|
-
|
|
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":"
|
|
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
|
-
|
|
3
|
-
interface UserLocationProps {
|
|
2
|
+
export interface UserLocationProps {
|
|
4
3
|
/**
|
|
5
|
-
*
|
|
4
|
+
* Children to render inside the UserLocation Annotation, e.g. CircleLayer, SymbolLayer
|
|
6
5
|
*/
|
|
7
|
-
|
|
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
|
-
*
|
|
8
|
+
* Whether the UserLocation Annotation is animated between updates
|
|
29
9
|
*/
|
|
30
|
-
|
|
10
|
+
animated?: boolean;
|
|
31
11
|
/**
|
|
32
|
-
*
|
|
12
|
+
* Render a circle which indicates the accuracy of the location
|
|
33
13
|
*/
|
|
34
|
-
|
|
14
|
+
accuracy?: boolean;
|
|
35
15
|
/**
|
|
36
|
-
*
|
|
16
|
+
* Render an arrow which indicates direction the device is pointing relative to north
|
|
37
17
|
*/
|
|
38
|
-
|
|
18
|
+
heading?: boolean;
|
|
39
19
|
/**
|
|
40
|
-
* Minimum
|
|
20
|
+
* Minimum delta in meters for location updates
|
|
41
21
|
*/
|
|
42
22
|
minDisplacement?: number;
|
|
43
23
|
/**
|
|
44
|
-
*
|
|
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
|
-
|
|
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").
|
|
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,
|
|
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
|
package/lib/typescript/module/src/components/user-location/UserLocationNativeComponent.d.ts.map
ADDED
|
@@ -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,
|
|
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,
|
|
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
|
|
9
|
-
export
|
|
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";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA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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,MAAM,EAAE,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEzD,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;
|
|
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,GAAG,IAAI,CAAC;IAExB;;OAEG;IACH,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC;;OAEG;IACH,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;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;
|
|
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"}
|
|
@@ -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,
|
|
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.
|
|
4
|
+
"version": "11.0.0-alpha.17",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
7
7
|
"provenance": true
|
|
@@ -128,7 +128,8 @@
|
|
|
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",
|
|
@@ -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 {
|
|
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?:
|
|
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
|
-
<
|
|
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
|
-
</
|
|
144
|
+
</Animated.ShapeSource>
|
|
143
145
|
);
|
|
144
146
|
},
|
|
145
147
|
);
|