@maplibre/maplibre-react-native 11.0.0-beta.25 → 11.0.0-beta.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ios/modules/offline/MLRNOfflineModule.h +1 -2
- package/ios/modules/offline/MLRNOfflineModule.mm +9 -9
- package/lib/commonjs/components/annotations/callout/Callout.js +2 -1
- package/lib/commonjs/components/annotations/callout/Callout.js.map +1 -1
- package/lib/commonjs/components/annotations/marker/Marker.js +4 -2
- package/lib/commonjs/components/annotations/marker/Marker.js.map +1 -1
- package/lib/commonjs/components/annotations/view-annotation/ViewAnnotation.js +6 -5
- package/lib/commonjs/components/annotations/view-annotation/ViewAnnotation.js.map +1 -1
- package/lib/commonjs/components/camera/Camera.js.map +1 -1
- package/lib/commonjs/components/images/Images.js +2 -2
- package/lib/commonjs/components/layer/Layer.js +0 -1
- package/lib/commonjs/components/layer/Layer.js.map +1 -1
- package/lib/commonjs/components/map/Map.js.map +1 -1
- package/lib/commonjs/components/sources/geojson-source/GeoJSONSource.js +2 -2
- package/lib/commonjs/components/sources/geojson-source/GeoJSONSource.js.map +1 -1
- package/lib/commonjs/components/sources/image-source/ImageSource.js +3 -2
- package/lib/commonjs/components/sources/image-source/ImageSource.js.map +1 -1
- package/lib/commonjs/components/sources/raster-source/RasterSource.js +4 -3
- package/lib/commonjs/components/sources/raster-source/RasterSource.js.map +1 -1
- package/lib/commonjs/components/sources/vector-source/VectorSource.js +4 -2
- package/lib/commonjs/components/sources/vector-source/VectorSource.js.map +1 -1
- package/lib/commonjs/components/user-location/NativeUserLocation.js.map +1 -1
- package/lib/commonjs/components/user-location/UserLocation.js.map +1 -1
- package/lib/commonjs/modules/log/LogManager.js +5 -4
- package/lib/commonjs/modules/log/LogManager.js.map +1 -1
- package/lib/commonjs/modules/network/NetworkManager.js +7 -7
- package/lib/commonjs/modules/network/NetworkManager.js.map +1 -1
- package/lib/commonjs/modules/offline/OfflineManager.js +63 -47
- package/lib/commonjs/modules/offline/OfflineManager.js.map +1 -1
- package/lib/commonjs/modules/transform-request/TransformRequestManager.js +50 -45
- package/lib/commonjs/modules/transform-request/TransformRequestManager.js.map +1 -1
- package/lib/commonjs/plugin/ios.js +9 -8
- package/lib/commonjs/plugin/ios.js.map +1 -1
- package/lib/commonjs/types/Anchor.js +5 -6
- package/lib/commonjs/types/Anchor.js.map +1 -1
- package/lib/commonjs/utils/animated/AbstractAnimatedCoordinates.js +2 -2
- package/lib/commonjs/utils/animated/AnimatedCoordinatesArray.js +6 -6
- package/lib/commonjs/utils/animated/AnimatedGeoJSON.js +2 -1
- package/lib/commonjs/utils/animated/AnimatedGeoJSON.js.map +1 -1
- package/lib/commonjs/utils/animated/AnimatedRouteCoordinatesArray.js +6 -6
- package/lib/commonjs/utils/convertStyleSpec.js +4 -4
- package/lib/module/components/annotations/callout/Callout.js +2 -1
- package/lib/module/components/annotations/callout/Callout.js.map +1 -1
- package/lib/module/components/annotations/marker/Marker.js +4 -2
- package/lib/module/components/annotations/marker/Marker.js.map +1 -1
- package/lib/module/components/annotations/view-annotation/ViewAnnotation.js +6 -5
- package/lib/module/components/annotations/view-annotation/ViewAnnotation.js.map +1 -1
- package/lib/module/components/camera/Camera.js.map +1 -1
- package/lib/module/components/images/Images.js +2 -2
- package/lib/module/components/layer/Layer.js +0 -1
- package/lib/module/components/layer/Layer.js.map +1 -1
- package/lib/module/components/map/Map.js.map +1 -1
- package/lib/module/components/sources/geojson-source/GeoJSONSource.js +2 -2
- package/lib/module/components/sources/geojson-source/GeoJSONSource.js.map +1 -1
- package/lib/module/components/sources/image-source/ImageSource.js +3 -2
- package/lib/module/components/sources/image-source/ImageSource.js.map +1 -1
- package/lib/module/components/sources/raster-source/RasterSource.js +4 -3
- package/lib/module/components/sources/raster-source/RasterSource.js.map +1 -1
- package/lib/module/components/sources/vector-source/VectorSource.js +4 -2
- package/lib/module/components/sources/vector-source/VectorSource.js.map +1 -1
- package/lib/module/components/user-location/NativeUserLocation.js.map +1 -1
- package/lib/module/components/user-location/UserLocation.js.map +1 -1
- package/lib/module/modules/log/LogManager.js +5 -4
- package/lib/module/modules/log/LogManager.js.map +1 -1
- package/lib/module/modules/network/NetworkManager.js +7 -7
- package/lib/module/modules/network/NetworkManager.js.map +1 -1
- package/lib/module/modules/offline/OfflineManager.js +63 -47
- package/lib/module/modules/offline/OfflineManager.js.map +1 -1
- package/lib/module/modules/transform-request/TransformRequestManager.js +50 -45
- package/lib/module/modules/transform-request/TransformRequestManager.js.map +1 -1
- package/lib/module/plugin/ios.js +9 -8
- package/lib/module/plugin/ios.js.map +1 -1
- package/lib/module/types/Anchor.js +5 -6
- package/lib/module/types/Anchor.js.map +1 -1
- package/lib/module/utils/animated/AbstractAnimatedCoordinates.js +2 -2
- package/lib/module/utils/animated/AnimatedCoordinatesArray.js +6 -6
- package/lib/module/utils/animated/AnimatedGeoJSON.js +2 -1
- package/lib/module/utils/animated/AnimatedGeoJSON.js.map +1 -1
- package/lib/module/utils/animated/AnimatedRouteCoordinatesArray.js +6 -6
- package/lib/module/utils/convertStyleSpec.js +4 -4
- package/lib/typescript/commonjs/components/annotations/callout/Callout.d.ts +3 -2
- package/lib/typescript/commonjs/components/annotations/callout/Callout.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/annotations/marker/Marker.d.ts +15 -14
- package/lib/typescript/commonjs/components/annotations/marker/Marker.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/annotations/view-annotation/ViewAnnotation.d.ts +26 -24
- package/lib/typescript/commonjs/components/annotations/view-annotation/ViewAnnotation.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/camera/Camera.d.ts +10 -24
- package/lib/typescript/commonjs/components/camera/Camera.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/images/Images.d.ts +12 -12
- package/lib/typescript/commonjs/components/layer/Layer.d.ts +0 -1
- package/lib/typescript/commonjs/components/layer/Layer.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/map/Map.d.ts +54 -51
- package/lib/typescript/commonjs/components/map/Map.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/sources/geojson-source/GeoJSONSource.d.ts +40 -41
- package/lib/typescript/commonjs/components/sources/geojson-source/GeoJSONSource.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/sources/image-source/ImageSource.d.ts +5 -3
- package/lib/typescript/commonjs/components/sources/image-source/ImageSource.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/sources/raster-source/RasterSource.d.ts +20 -15
- package/lib/typescript/commonjs/components/sources/raster-source/RasterSource.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/sources/vector-source/VectorSource.d.ts +23 -20
- package/lib/typescript/commonjs/components/sources/vector-source/VectorSource.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/user-location/NativeUserLocation.d.ts +9 -6
- package/lib/typescript/commonjs/components/user-location/NativeUserLocation.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/user-location/UserLocation.d.ts +4 -2
- package/lib/typescript/commonjs/components/user-location/UserLocation.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks/useCurrentPosition.d.ts +2 -2
- package/lib/typescript/commonjs/modules/log/LogManager.d.ts +5 -4
- package/lib/typescript/commonjs/modules/log/LogManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/modules/network/NetworkManager.d.ts +7 -7
- package/lib/typescript/commonjs/modules/network/NetworkManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/modules/offline/OfflineManager.d.ts +63 -47
- package/lib/typescript/commonjs/modules/offline/OfflineManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/modules/static-map/StaticMapManager.d.ts +2 -2
- package/lib/typescript/commonjs/modules/transform-request/TransformRequestManager.d.ts +56 -49
- package/lib/typescript/commonjs/modules/transform-request/TransformRequestManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/plugin/MapLibrePluginProps.d.ts +10 -15
- package/lib/typescript/commonjs/plugin/MapLibrePluginProps.d.ts.map +1 -1
- package/lib/typescript/commonjs/plugin/ios.d.ts +2 -2
- package/lib/typescript/commonjs/plugin/ios.d.ts.map +1 -1
- package/lib/typescript/commonjs/types/Anchor.d.ts +5 -6
- package/lib/typescript/commonjs/types/Anchor.d.ts.map +1 -1
- package/lib/typescript/commonjs/types/LngLatBounds.d.ts +2 -1
- package/lib/typescript/commonjs/types/LngLatBounds.d.ts.map +1 -1
- package/lib/typescript/commonjs/types/MapLibreRNStyles.d.ts +243 -93
- package/lib/typescript/commonjs/types/MapLibreRNStyles.d.ts.map +1 -1
- package/lib/typescript/commonjs/types/sources/PressableSourceProps.d.ts +1 -2
- package/lib/typescript/commonjs/types/sources/PressableSourceProps.d.ts.map +1 -1
- package/lib/typescript/commonjs/utils/animated/AbstractAnimatedCoordinates.d.ts +2 -2
- package/lib/typescript/commonjs/utils/animated/AnimatedCoordinatesArray.d.ts +6 -6
- package/lib/typescript/commonjs/utils/animated/AnimatedGeoJSON.d.ts +2 -1
- package/lib/typescript/commonjs/utils/animated/AnimatedGeoJSON.d.ts.map +1 -1
- package/lib/typescript/commonjs/utils/animated/AnimatedRouteCoordinatesArray.d.ts +6 -6
- package/lib/typescript/commonjs/utils/convertStyleSpec.d.ts +4 -4
- package/lib/typescript/module/components/annotations/callout/Callout.d.ts +3 -2
- package/lib/typescript/module/components/annotations/callout/Callout.d.ts.map +1 -1
- package/lib/typescript/module/components/annotations/marker/Marker.d.ts +15 -14
- package/lib/typescript/module/components/annotations/marker/Marker.d.ts.map +1 -1
- package/lib/typescript/module/components/annotations/view-annotation/ViewAnnotation.d.ts +26 -24
- package/lib/typescript/module/components/annotations/view-annotation/ViewAnnotation.d.ts.map +1 -1
- package/lib/typescript/module/components/camera/Camera.d.ts +10 -24
- package/lib/typescript/module/components/camera/Camera.d.ts.map +1 -1
- package/lib/typescript/module/components/images/Images.d.ts +12 -12
- package/lib/typescript/module/components/layer/Layer.d.ts +0 -1
- package/lib/typescript/module/components/layer/Layer.d.ts.map +1 -1
- package/lib/typescript/module/components/map/Map.d.ts +54 -51
- package/lib/typescript/module/components/map/Map.d.ts.map +1 -1
- package/lib/typescript/module/components/sources/geojson-source/GeoJSONSource.d.ts +40 -41
- package/lib/typescript/module/components/sources/geojson-source/GeoJSONSource.d.ts.map +1 -1
- package/lib/typescript/module/components/sources/image-source/ImageSource.d.ts +5 -3
- package/lib/typescript/module/components/sources/image-source/ImageSource.d.ts.map +1 -1
- package/lib/typescript/module/components/sources/raster-source/RasterSource.d.ts +20 -15
- package/lib/typescript/module/components/sources/raster-source/RasterSource.d.ts.map +1 -1
- package/lib/typescript/module/components/sources/vector-source/VectorSource.d.ts +23 -20
- package/lib/typescript/module/components/sources/vector-source/VectorSource.d.ts.map +1 -1
- package/lib/typescript/module/components/user-location/NativeUserLocation.d.ts +9 -6
- package/lib/typescript/module/components/user-location/NativeUserLocation.d.ts.map +1 -1
- package/lib/typescript/module/components/user-location/UserLocation.d.ts +4 -2
- package/lib/typescript/module/components/user-location/UserLocation.d.ts.map +1 -1
- package/lib/typescript/module/hooks/useCurrentPosition.d.ts +2 -2
- package/lib/typescript/module/modules/log/LogManager.d.ts +5 -4
- package/lib/typescript/module/modules/log/LogManager.d.ts.map +1 -1
- package/lib/typescript/module/modules/network/NetworkManager.d.ts +7 -7
- package/lib/typescript/module/modules/network/NetworkManager.d.ts.map +1 -1
- package/lib/typescript/module/modules/offline/OfflineManager.d.ts +63 -47
- package/lib/typescript/module/modules/offline/OfflineManager.d.ts.map +1 -1
- package/lib/typescript/module/modules/static-map/StaticMapManager.d.ts +2 -2
- package/lib/typescript/module/modules/transform-request/TransformRequestManager.d.ts +56 -49
- package/lib/typescript/module/modules/transform-request/TransformRequestManager.d.ts.map +1 -1
- package/lib/typescript/module/plugin/MapLibrePluginProps.d.ts +10 -15
- package/lib/typescript/module/plugin/MapLibrePluginProps.d.ts.map +1 -1
- package/lib/typescript/module/plugin/ios.d.ts +2 -2
- package/lib/typescript/module/plugin/ios.d.ts.map +1 -1
- package/lib/typescript/module/types/Anchor.d.ts +5 -6
- package/lib/typescript/module/types/Anchor.d.ts.map +1 -1
- package/lib/typescript/module/types/LngLatBounds.d.ts +2 -1
- package/lib/typescript/module/types/LngLatBounds.d.ts.map +1 -1
- package/lib/typescript/module/types/MapLibreRNStyles.d.ts +243 -93
- package/lib/typescript/module/types/MapLibreRNStyles.d.ts.map +1 -1
- package/lib/typescript/module/types/sources/PressableSourceProps.d.ts +1 -2
- package/lib/typescript/module/types/sources/PressableSourceProps.d.ts.map +1 -1
- package/lib/typescript/module/utils/animated/AbstractAnimatedCoordinates.d.ts +2 -2
- package/lib/typescript/module/utils/animated/AnimatedCoordinatesArray.d.ts +6 -6
- package/lib/typescript/module/utils/animated/AnimatedGeoJSON.d.ts +2 -1
- package/lib/typescript/module/utils/animated/AnimatedGeoJSON.d.ts.map +1 -1
- package/lib/typescript/module/utils/animated/AnimatedRouteCoordinatesArray.d.ts +6 -6
- package/lib/typescript/module/utils/convertStyleSpec.d.ts +4 -4
- package/package.json +1 -2
- package/src/components/annotations/callout/Callout.tsx +3 -2
- package/src/components/annotations/marker/Marker.tsx +15 -14
- package/src/components/annotations/view-annotation/ViewAnnotation.tsx +26 -24
- package/src/components/camera/Camera.tsx +10 -24
- package/src/components/images/Images.tsx +12 -12
- package/src/components/layer/Layer.tsx +0 -1
- package/src/components/map/Map.tsx +54 -51
- package/src/components/sources/geojson-source/GeoJSONSource.tsx +40 -41
- package/src/components/sources/image-source/ImageSource.tsx +5 -3
- package/src/components/sources/raster-source/RasterSource.tsx +20 -15
- package/src/components/sources/vector-source/VectorSource.tsx +23 -20
- package/src/components/user-location/NativeUserLocation.tsx +9 -6
- package/src/components/user-location/UserLocation.tsx +4 -2
- package/src/hooks/useCurrentPosition.ts +2 -2
- package/src/modules/log/LogManager.ts +5 -4
- package/src/modules/network/NetworkManager.ts +7 -7
- package/src/modules/offline/OfflineManager.ts +63 -47
- package/src/modules/static-map/StaticMapManager.ts +2 -2
- package/src/modules/transform-request/TransformRequestManager.ts +56 -49
- package/src/plugin/MapLibrePluginProps.ts +10 -15
- package/src/plugin/ios.ts +9 -8
- package/src/types/Anchor.ts +5 -6
- package/src/types/LngLatBounds.ts +2 -1
- package/src/types/MapLibreRNStyles.ts +243 -93
- package/src/types/sources/PressableSourceProps.ts +1 -2
- package/src/utils/animated/AbstractAnimatedCoordinates.ts +2 -2
- package/src/utils/animated/AnimatedCoordinatesArray.ts +6 -6
- package/src/utils/animated/AnimatedGeoJSON.ts +2 -1
- package/src/utils/animated/AnimatedRouteCoordinatesArray.ts +6 -6
- package/src/utils/convertStyleSpec.ts +4 -4
|
@@ -8,22 +8,24 @@ export interface TransformOptions {
|
|
|
8
8
|
* Optional regex to be used as the condition, if the transform should be
|
|
9
9
|
* applied. When omitted the transform will always be applied.
|
|
10
10
|
*
|
|
11
|
-
* Global flags are (like `/i`) are not supported. Supports only inline flags,
|
|
11
|
+
* Global flags are (like `/i` ) are not supported. Supports only inline flags,
|
|
12
|
+
* e.g. `(?i)` for case-insensitive matching.
|
|
12
13
|
*/
|
|
13
14
|
match?: RegExp | string;
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
16
17
|
* A serializable transform for rewriting MapLibre request URLs.
|
|
17
18
|
*
|
|
18
|
-
* Transforms are applied as a pipeline in the order they were added: transform
|
|
19
|
-
* the URL *after* transform N has possibly changed it.
|
|
19
|
+
* Transforms are applied as a pipeline in the order they were added: transform
|
|
20
|
+
* N+1 sees the URL *after* transform N has possibly changed it.
|
|
20
21
|
*/
|
|
21
22
|
export interface UrlTransformOptions extends TransformOptions {
|
|
22
23
|
/**
|
|
23
|
-
* Regex to find the portion of the URL to replace.
|
|
24
|
-
*
|
|
24
|
+
* Regex to find the portion of the URL to replace. Supports capture groups that
|
|
25
|
+
* can be back-referenced in `replace` as `$1` , `$2` , …
|
|
25
26
|
*
|
|
26
|
-
* Global flags are (like `/i`) are not supported. Supports only inline flags,
|
|
27
|
+
* Global flags are (like `/i` ) are not supported. Supports only inline flags,
|
|
28
|
+
* e.g. `(?i)` for case-insensitive matching.
|
|
27
29
|
*/
|
|
28
30
|
find: RegExp | string;
|
|
29
31
|
/**
|
|
@@ -50,18 +52,18 @@ export interface HeaderOptions extends TransformOptions {
|
|
|
50
52
|
value: string;
|
|
51
53
|
}
|
|
52
54
|
/**
|
|
53
|
-
* TransformRequestManager provides methods for managing HTTP requests made by
|
|
55
|
+
* TransformRequestManager provides methods for managing HTTP requests made by
|
|
56
|
+
* MapLibre.
|
|
54
57
|
*
|
|
55
58
|
* Transformations are possible in three ways:
|
|
56
59
|
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
+
* - Transforming the URL with search and replace
|
|
61
|
+
* - Adding URL search params
|
|
62
|
+
* - Adding HTTP headers
|
|
60
63
|
*
|
|
61
64
|
* Transforms are applied in this order. The `match` conditions are applied to
|
|
62
65
|
* possibly already transformed URLs.
|
|
63
66
|
*
|
|
64
|
-
* @remarks
|
|
65
67
|
* To gain insight into which transforms are applied set the log level to
|
|
66
68
|
* `"debug"` via {@link LogManager}:
|
|
67
69
|
*
|
|
@@ -76,50 +78,51 @@ declare class TransformRequestManager {
|
|
|
76
78
|
* Transforms execute in insertion order. Therefore `match` and `find` regexes
|
|
77
79
|
* are matched against possibly already modified URL by previous transforms.
|
|
78
80
|
*
|
|
79
|
-
* Re-adding an existing `id` updates the transform
|
|
80
|
-
*
|
|
81
|
-
*
|
|
81
|
+
* Re-adding an existing `id` updates the transform **in-place**, preserving its
|
|
82
|
+
* position in the pipeline. This makes it safe to refresh tokens or swap
|
|
83
|
+
* domains without disrupting the order of other transforms.
|
|
82
84
|
*
|
|
83
85
|
* URL transforms are applied before `addUrlSearchParam` and `addHeader`.
|
|
84
86
|
*
|
|
85
|
-
* @
|
|
86
|
-
*
|
|
87
|
+
* @param options - The transform. Set {@link TransformOptions.id} to a stable string to enable
|
|
88
|
+
* in-place updates; if omitted an id is auto-generated and returned.
|
|
89
|
+
* @returns The id of the transform (the value of `transform.id` when provided, otherwise the auto-generated one). Pass it to {@link removeUrlTransform} to remove it later.
|
|
90
|
+
*
|
|
91
|
+
* @example Upgrade all requests to HTTPS
|
|
92
|
+
* ```ts
|
|
87
93
|
* TransformRequestManager.addUrlTransform({
|
|
88
94
|
* id: "force-https",
|
|
89
95
|
* find: "^http://",
|
|
90
96
|
* replace: "https://",
|
|
91
97
|
* });
|
|
98
|
+
* ```
|
|
92
99
|
*
|
|
93
|
-
* @example
|
|
94
|
-
*
|
|
100
|
+
* @example Redirect a specific domain through a proxy
|
|
101
|
+
* ```ts
|
|
95
102
|
* TransformRequestManager.addUrlTransform({
|
|
96
103
|
* id: "proxy",
|
|
97
104
|
* match: "tiles\\.example\\.com",
|
|
98
105
|
* find: "tiles\\.example\\.com",
|
|
99
106
|
* replace: "proxy.example.com",
|
|
100
107
|
* });
|
|
108
|
+
* ```
|
|
101
109
|
*
|
|
102
|
-
* @example
|
|
103
|
-
*
|
|
110
|
+
* @example Inject an API key into the path using a capture group
|
|
111
|
+
* ```ts
|
|
104
112
|
* TransformRequestManager.addUrlTransform({
|
|
105
113
|
* id: "api-key",
|
|
106
114
|
* match: "api\\.example\\.com",
|
|
107
115
|
* find: "(https://api\\.example\\.com/)(.*)",
|
|
108
116
|
* replace: "$1mySecretKey/$2",
|
|
109
117
|
* });
|
|
110
|
-
*
|
|
111
|
-
* @param options The transform. Set {@link TransformOptions.id} to a stable string to
|
|
112
|
-
* enable in-place updates; if omitted an id is auto-generated and returned.
|
|
113
|
-
*
|
|
114
|
-
* @returns The id of the transform (the value of `transform.id` when provided, otherwise
|
|
115
|
-
* the auto-generated one). Pass it to {@link removeUrlTransform} to remove it later.
|
|
118
|
+
* ```
|
|
116
119
|
*/
|
|
117
120
|
addUrlTransform(options: UrlTransformOptions): string;
|
|
118
121
|
/**
|
|
119
|
-
* Removes the URL transform with the given `id
|
|
120
|
-
*
|
|
122
|
+
* Removes the URL transform with the given `id` . No-op if the id is not
|
|
123
|
+
* registered.
|
|
121
124
|
*
|
|
122
|
-
* @param id The identifier passed to/returned from {@link addUrlTransform}.
|
|
125
|
+
* @param id - The identifier passed to/returned from {@link addUrlTransform}.
|
|
123
126
|
*/
|
|
124
127
|
removeUrlTransform(id: string): void;
|
|
125
128
|
/**
|
|
@@ -127,51 +130,55 @@ declare class TransformRequestManager {
|
|
|
127
130
|
*/
|
|
128
131
|
clearUrlTransforms(): void;
|
|
129
132
|
/**
|
|
130
|
-
* Adds or updates a URL query parameter identified by `id` that will be
|
|
131
|
-
* matching map resource requests. Re-adding an existing `id`
|
|
133
|
+
* Adds or updates a URL query parameter identified by `id` that will be
|
|
134
|
+
* appended to all matching map resource requests. Re-adding an existing `id`
|
|
135
|
+
* updates the param in-place.
|
|
132
136
|
*
|
|
133
|
-
* @
|
|
134
|
-
*
|
|
137
|
+
* @param options - The options. Set {@link TransformOptions.id} to a stable string to enable
|
|
138
|
+
* in-place updates; if omitted an id is auto-generated and returned.
|
|
139
|
+
* @returns The id of the options. Pass it to {@link removeUrlSearchParam} to remove it later.
|
|
140
|
+
*
|
|
141
|
+
* @example Add apiKey to for a specific domain
|
|
142
|
+
* ```ts
|
|
135
143
|
* TransformRequestManager.addUrlSearchParam({
|
|
136
144
|
* match: /tiles\.example\.com/,
|
|
137
145
|
* name: "apiKey",
|
|
138
146
|
* value: "your-api-key",
|
|
139
147
|
* });
|
|
148
|
+
* ```
|
|
140
149
|
*
|
|
141
150
|
* // Add apiKey to all requests (no match = applies to all)
|
|
142
151
|
* TransformRequestManager.addUrlSearchParam({ name: "apiKey", value: "your-api-key" });
|
|
143
|
-
*
|
|
144
|
-
* @param options The options. Set {@link TransformOptions.id} to a stable string to
|
|
145
|
-
* enable in-place updates; if omitted an id is auto-generated and returned.
|
|
146
|
-
*
|
|
147
|
-
* @returns The id of the options. Pass it to {@link removeUrlSearchParam} to remove it later.
|
|
148
152
|
*/
|
|
149
153
|
addUrlSearchParam(options: UrlSearchParamOptions): string;
|
|
150
154
|
/**
|
|
151
155
|
* Removes a previously added URL query parameter by its `id`.
|
|
152
156
|
*
|
|
153
|
-
* @param id The identifier passed to/returned from {@link addUrlSearchParam}.
|
|
157
|
+
* @param id - The identifier passed to/returned from {@link addUrlSearchParam}.
|
|
154
158
|
*/
|
|
155
159
|
removeUrlSearchParam(id: string): void;
|
|
156
160
|
/**
|
|
157
161
|
* Adds or updates an HTTP header identified by `id` that will be sent with all
|
|
158
|
-
* matching map resource requests. Re-adding an existing `id` updates the header
|
|
162
|
+
* matching map resource requests. Re-adding an existing `id` updates the header
|
|
163
|
+
* in-place.
|
|
164
|
+
*
|
|
165
|
+
* @param options - The options. Set {@link TransformOptions.id} to a stable string to enable
|
|
166
|
+
* in-place updates; if omitted an id is auto-generated and returned.
|
|
167
|
+
* @returns The id of the options. Pass it to {@link removeHeader} to remove it later.
|
|
159
168
|
*
|
|
160
|
-
* @example
|
|
161
|
-
*
|
|
169
|
+
* @example Add header to all requests
|
|
170
|
+
* ```
|
|
162
171
|
* TransformRequestManager.addHeader({ name: "Authorization", value: "Bearer token123" });
|
|
172
|
+
* ```
|
|
163
173
|
*
|
|
164
|
-
*
|
|
174
|
+
* @example Add header only to requests matching a pattern
|
|
175
|
+
* ```ts
|
|
165
176
|
* TransformRequestManager.addHeader({
|
|
166
177
|
* name: "X-API-Key",
|
|
167
178
|
* value: "key123",
|
|
168
179
|
* match: /https:\/\/api\.example\.com\/tiles\//,
|
|
169
180
|
* });
|
|
170
|
-
*
|
|
171
|
-
* @param options The options. Set {@link TransformOptions.id} to a stable string to
|
|
172
|
-
* enable in-place updates; if omitted an id is auto-generated and returned.
|
|
173
|
-
*
|
|
174
|
-
* @returns The id of the options. Pass it to {@link removeHeader} to remove it later.
|
|
181
|
+
* ```
|
|
175
182
|
*/
|
|
176
183
|
addHeader(options: HeaderOptions): string;
|
|
177
184
|
/**
|
|
@@ -181,7 +188,7 @@ declare class TransformRequestManager {
|
|
|
181
188
|
/**
|
|
182
189
|
* Removes a previously added HTTP header by its `id`.
|
|
183
190
|
*
|
|
184
|
-
* @param id The identifier passed to/returned from {@link addHeader}.
|
|
191
|
+
* @param id - The identifier passed to/returned from {@link addHeader}.
|
|
185
192
|
*/
|
|
186
193
|
removeHeader(id: string): void;
|
|
187
194
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransformRequestManager.d.ts","sourceRoot":"","sources":["../../../../../src/modules/transform-request/TransformRequestManager.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ
|
|
1
|
+
{"version":3,"file":"TransformRequestManager.d.ts","sourceRoot":"","sources":["../../../../../src/modules/transform-request/TransformRequestManager.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAED;;;;;GAKG;AACH,MAAM,WAAW,mBAAoB,SAAQ,gBAAgB;IAC3D;;;;;;OAMG;IACH,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IAEtB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB;IAC7D,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAC;IAEb,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,gBAAgB;IACrD,iDAAiD;IACjD,IAAI,EAAE,MAAM,CAAC;IAEb,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,cAAM,uBAAuB;IAC3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4CG;IACH,eAAe,CAAC,OAAO,EAAE,mBAAmB,GAAG,MAAM;IAarD;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAIpC;;OAEG;IACH,kBAAkB,IAAI,IAAI;IAI1B;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,iBAAiB,CAAC,OAAO,EAAE,qBAAqB,GAAG,MAAM;IAazD;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAItC;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,SAAS,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM;IAazC;;OAEG;IACH,oBAAoB,IAAI,IAAI;IAI5B;;;;OAIG;IACH,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAI9B;;OAEG;IACH,YAAY,IAAI,IAAI;IAIpB;;OAEG;IACH,KAAK,IAAI,IAAI;IAMb,OAAO,CAAC,MAAM,CAAc;IAE5B,OAAO,CAAC,KAAK;IAMb,OAAO,CAAC,MAAM,CAAC,aAAa;CAgB7B;AAED,QAAA,MAAM,uBAAuB,yBAAgC,CAAC;AAE9D,OAAO,EAAE,uBAAuB,IAAI,uBAAuB,EAAE,CAAC"}
|
|
@@ -3,7 +3,7 @@ export type MapLibrePluginProps = {
|
|
|
3
3
|
/**
|
|
4
4
|
* Properties relevant only for Android
|
|
5
5
|
*
|
|
6
|
-
* @platform
|
|
6
|
+
* @platform Android
|
|
7
7
|
*/
|
|
8
8
|
android?: {
|
|
9
9
|
/**
|
|
@@ -13,7 +13,7 @@ export type MapLibrePluginProps = {
|
|
|
13
13
|
/**
|
|
14
14
|
* Variant of `org.maplibre.gl:android-sdk-*`
|
|
15
15
|
*
|
|
16
|
-
* @
|
|
16
|
+
* @defaultValue "opengl"
|
|
17
17
|
*/
|
|
18
18
|
nativeVariant?: "opengl" | "vulkan";
|
|
19
19
|
/**
|
|
@@ -32,20 +32,22 @@ export type MapLibrePluginProps = {
|
|
|
32
32
|
* Location engine to be used
|
|
33
33
|
*
|
|
34
34
|
* - `default`: Used per default from MapLibre; F-Droid compatible
|
|
35
|
-
* - `google`: Google Play Services Location Engine for higher precision; F-Droid
|
|
35
|
+
* - `google`: Google Play Services Location Engine for higher precision; F-Droid
|
|
36
|
+
* incompatible
|
|
36
37
|
*
|
|
37
|
-
* @
|
|
38
|
+
* @defaultValue "default"
|
|
38
39
|
*/
|
|
39
40
|
locationEngine?: "default" | "google";
|
|
40
41
|
/**
|
|
41
|
-
* Version for `com.google.android.gms:play-services-location
|
|
42
|
+
* Version for `com.google.android.gms:play-services-location` , only used with
|
|
43
|
+
* `locationEngine: "google"`
|
|
42
44
|
*/
|
|
43
45
|
googlePlayServicesLocationVersion?: VersionString;
|
|
44
46
|
};
|
|
45
47
|
/**
|
|
46
48
|
* Properties relevant only for iOS
|
|
47
49
|
*
|
|
48
|
-
* @platform
|
|
50
|
+
* @platform iOS
|
|
49
51
|
*/
|
|
50
52
|
ios?: {
|
|
51
53
|
/**
|
|
@@ -55,14 +57,7 @@ export type MapLibrePluginProps = {
|
|
|
55
57
|
/**
|
|
56
58
|
* Swift Package Manager spec to override the selected version range
|
|
57
59
|
*
|
|
58
|
-
* @
|
|
59
|
-
* url: "https://github.com/maplibre/maplibre-gl-native-distribution",
|
|
60
|
-
* requirement: {
|
|
61
|
-
* kind: "exactVersion",
|
|
62
|
-
* version: $MLRN_NATIVE_VERSION
|
|
63
|
-
* },
|
|
64
|
-
* product_name: "MapLibre"
|
|
65
|
-
* }`
|
|
60
|
+
* @defaultValue `{ url: "https://github.com/maplibre/maplibre-gl-native-distribution", requirement: { kind: "exactVersion", version: $MLRN_NATIVE_VERSION }, product_name: "MapLibre" }`
|
|
66
61
|
*
|
|
67
62
|
* @example
|
|
68
63
|
* ```ts
|
|
@@ -73,7 +68,7 @@ export type MapLibrePluginProps = {
|
|
|
73
68
|
* minimumVersion: "x.x.x"
|
|
74
69
|
* },
|
|
75
70
|
* product_name: "MapLibre"
|
|
76
|
-
* }
|
|
71
|
+
* }`;
|
|
77
72
|
* ```
|
|
78
73
|
*/
|
|
79
74
|
spmSpec?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapLibrePluginProps.d.ts","sourceRoot":"","sources":["../../../../src/plugin/MapLibrePluginProps.ts"],"names":[],"mappings":"AAAA,KAAK,aAAa,GACd,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,GAC/B,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,CAAC;AAE9C,MAAM,MAAM,mBAAmB,GAC3B;IACE;;;;OAIG;IACH,OAAO,CAAC,EAAE;QACR;;WAEG;QACH,aAAa,CAAC,EAAE,aAAa,CAAC;QAC9B;;;;WAIG;QACH,aAAa,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;QACpC;;WAEG;QACH,aAAa,CAAC,EAAE,aAAa,CAAC;QAC9B;;WAEG;QACH,WAAW,CAAC,EAAE,aAAa,CAAC;QAC5B;;WAEG;QACH,aAAa,CAAC,EAAE,aAAa,CAAC;QAE9B
|
|
1
|
+
{"version":3,"file":"MapLibrePluginProps.d.ts","sourceRoot":"","sources":["../../../../src/plugin/MapLibrePluginProps.ts"],"names":[],"mappings":"AAAA,KAAK,aAAa,GACd,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,GAC/B,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,CAAC;AAE9C,MAAM,MAAM,mBAAmB,GAC3B;IACE;;;;OAIG;IACH,OAAO,CAAC,EAAE;QACR;;WAEG;QACH,aAAa,CAAC,EAAE,aAAa,CAAC;QAC9B;;;;WAIG;QACH,aAAa,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;QACpC;;WAEG;QACH,aAAa,CAAC,EAAE,aAAa,CAAC;QAC9B;;WAEG;QACH,WAAW,CAAC,EAAE,aAAa,CAAC;QAC5B;;WAEG;QACH,aAAa,CAAC,EAAE,aAAa,CAAC;QAE9B;;;;;;;;WAQG;QACH,cAAc,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;QACtC;;;WAGG;QACH,iCAAiC,CAAC,EAAE,aAAa,CAAC;KACnD,CAAC;IAEF;;;;OAIG;IACH,GAAG,CAAC,EAAE;QACJ;;WAEG;QACH,aAAa,CAAC,EAAE,aAAa,CAAC;QAE9B;;;;;;;;;;;;;;;;WAgBG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;CACH,GACD,SAAS,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type ConfigPlugin } from "@expo/config-plugins";
|
|
2
2
|
import type { MapLibrePluginProps } from "./MapLibrePluginProps";
|
|
3
3
|
/**
|
|
4
|
-
* Only the post-install block is required, the post installer block is used for
|
|
5
|
-
* doesn't currently support.
|
|
4
|
+
* Only the post-install block is required, the post installer block is used for
|
|
5
|
+
* SPM (Swift Package Manager) which Expo doesn't currently support.
|
|
6
6
|
*/
|
|
7
7
|
export declare function applyPodfilePostInstall(contents: string): string;
|
|
8
8
|
export declare const applyPodfileGlobalVariables: (contents: string, props: MapLibrePluginProps) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ios.d.ts","sourceRoot":"","sources":["../../../../src/plugin/ios.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EAGlB,MAAM,sBAAsB,CAAC;AAM9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAIjE;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAehE;AAUD,eAAO,MAAM,2BAA2B,GACtC,UAAU,MAAM,EAChB,OAAO,mBAAmB,KACzB,MA2BF,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,YAAY,CAAC,mBAAmB,CAYxE,CAAC;
|
|
1
|
+
{"version":3,"file":"ios.d.ts","sourceRoot":"","sources":["../../../../src/plugin/ios.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EAGlB,MAAM,sBAAsB,CAAC;AAM9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAIjE;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAehE;AAUD,eAAO,MAAM,2BAA2B,GACtC,UAAU,MAAM,EAChB,OAAO,mBAAmB,KACzB,MA2BF,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,YAAY,CAAC,mBAAmB,CAYxE,CAAC;AA+DF,eAAO,MAAM,GAAG;;;;;CAKf,CAAC"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Position anchor for markers and annotations.
|
|
3
|
-
*
|
|
2
|
+
* Position anchor for markers and annotations. Follows MapLibre GL JS
|
|
3
|
+
* PositionAnchor format.
|
|
4
4
|
*
|
|
5
|
-
* @see https://maplibre.org/maplibre-gl-js/docs/API/type-aliases/PositionAnchor/
|
|
5
|
+
* @see {@link https://maplibre.org/maplibre-gl-js/docs/API/type-aliases/PositionAnchor/}
|
|
6
6
|
*/
|
|
7
7
|
export type Anchor = "center" | "top" | "bottom" | "left" | "right" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
8
8
|
/**
|
|
9
|
-
* Converts an Anchor string to native {x, y} format.
|
|
10
|
-
*
|
|
11
|
-
* y: 0 = top, 0.5 = center, 1 = bottom
|
|
9
|
+
* Converts an Anchor string to native {x, y} format. x: 0 = left, 0.5 = center,
|
|
10
|
+
* 1 = right y: 0 = top, 0.5 = center, 1 = bottom
|
|
12
11
|
*/
|
|
13
12
|
export declare function anchorToNative(anchor: Anchor): {
|
|
14
13
|
x: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Anchor.d.ts","sourceRoot":"","sources":["../../../../src/types/Anchor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,MAAM,GACd,QAAQ,GACR,KAAK,GACL,QAAQ,GACR,MAAM,GACN,OAAO,GACP,UAAU,GACV,WAAW,GACX,aAAa,GACb,cAAc,CAAC;AAEnB
|
|
1
|
+
{"version":3,"file":"Anchor.d.ts","sourceRoot":"","sources":["../../../../src/types/Anchor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,MAAM,GACd,QAAQ,GACR,KAAK,GACL,QAAQ,GACR,MAAM,GACN,OAAO,GACP,UAAU,GACV,WAAW,GACX,aAAa,GACb,cAAc,CAAC;AAEnB;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAqBvE"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Represents bounds in geographic coordinates
|
|
3
3
|
*
|
|
4
|
-
* Uses order of south-west and north-east corners in flat style per GeoJSON
|
|
4
|
+
* Uses order of south-west and north-east corners in flat style per GeoJSON
|
|
5
|
+
* RFC.
|
|
5
6
|
*/
|
|
6
7
|
export type LngLatBounds = [
|
|
7
8
|
west: number,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LngLatBounds.d.ts","sourceRoot":"","sources":["../../../../src/types/LngLatBounds.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"LngLatBounds.d.ts","sourceRoot":"","sources":["../../../../src/types/LngLatBounds.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,MAAM;IACb,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,MAAM;CACd,CAAC"}
|