@rnmapbox/maps 10.0.0-beta.74 → 10.0.0-beta.76
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/README.md +3 -3
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/camera/CameraStop.kt +61 -46
- package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/images/RCTMGLImagesManager.kt +5 -5
- package/ios/RCTMGL-v10/RCMTGLImage.swift +2 -1
- package/ios/RCTMGL-v10/RCTMGLImages.swift +57 -17
- package/ios/RCTMGL-v10/RCTMGLMapView.swift +11 -1
- package/ios/RCTMGL-v10/RCTMGLUtils.swift +14 -5
- package/javascript/MGLModule.ts +54 -0
- package/javascript/Mapbox.ts +97 -0
- package/javascript/classes/index.d.ts +20 -1
- package/javascript/components/Annotation.tsx +141 -0
- package/javascript/components/Callout.d.ts +35 -0
- package/javascript/components/ImageSource.tsx +81 -0
- package/javascript/components/Images.tsx +58 -6
- package/javascript/components/{MapView.js → MapView.tsx} +456 -383
- package/javascript/components/MarkerView.tsx +3 -2
- package/javascript/components/NativeBridgeComponent.tsx +1 -1
- package/javascript/components/PointAnnotation.tsx +4 -3
- package/javascript/components/RasterDemSource.tsx +105 -0
- package/javascript/components/RasterSource.tsx +124 -0
- package/javascript/components/ShapeSource.tsx +1 -1
- package/javascript/components/{Style.js → Style.tsx} +117 -35
- package/javascript/components/Terrain.tsx +8 -7
- package/javascript/components/{UserLocation.js → UserLocation.tsx} +105 -94
- package/javascript/components/VectorSource.tsx +1 -1
- package/javascript/index.ts +4 -0
- package/javascript/modules/offline/{OfflineCreatePackOptions.js → OfflineCreatePackOptions.ts} +21 -6
- package/javascript/modules/offline/{OfflinePack.js → OfflinePack.ts} +19 -4
- package/javascript/modules/offline/{offlineManager.js → offlineManager.ts} +81 -21
- package/javascript/modules/snapshot/{SnapshotOptions.js → SnapshotOptions.ts} +27 -3
- package/javascript/modules/snapshot/{snapshotManager.js → snapshotManager.ts} +2 -1
- package/javascript/types/Position.ts +1 -0
- package/javascript/utils/Logger.ts +1 -1
- package/javascript/utils/geoUtils.ts +56 -0
- package/javascript/utils/{index.js → index.ts} +41 -19
- package/lib/commonjs/MGLModule.js +37 -0
- package/lib/commonjs/MGLModule.js.map +1 -0
- package/lib/commonjs/Mapbox.js +372 -0
- package/lib/commonjs/Mapbox.js.map +1 -0
- package/lib/commonjs/classes/index.d.js +2 -0
- package/lib/commonjs/classes/index.d.js.map +1 -1
- package/lib/commonjs/components/{annotations/Annotation.js → Annotation.js} +26 -27
- package/lib/commonjs/components/Annotation.js.map +1 -0
- package/lib/commonjs/components/Callout.d.js +9 -0
- package/lib/commonjs/components/Callout.d.js.map +1 -0
- package/lib/commonjs/components/ImageSource.js +8 -25
- package/lib/commonjs/components/ImageSource.js.map +1 -1
- package/lib/commonjs/components/Images.js +17 -1
- package/lib/commonjs/components/Images.js.map +1 -1
- package/lib/commonjs/components/MapView.js +30 -289
- package/lib/commonjs/components/MapView.js.map +1 -1
- package/lib/commonjs/components/MarkerView.js.map +1 -1
- package/lib/commonjs/components/NativeBridgeComponent.js.map +1 -1
- package/lib/commonjs/components/PointAnnotation.js.map +1 -1
- package/lib/commonjs/components/RasterDemSource.js +3 -37
- package/lib/commonjs/components/RasterDemSource.js.map +1 -1
- package/lib/commonjs/components/RasterSource.js +2 -46
- package/lib/commonjs/components/RasterSource.js.map +1 -1
- package/lib/commonjs/components/Style.js +11 -15
- package/lib/commonjs/components/Style.js.map +1 -1
- package/lib/commonjs/components/Terrain.js.map +1 -1
- package/lib/commonjs/components/UserLocation.js +26 -77
- package/lib/commonjs/components/UserLocation.js.map +1 -1
- package/lib/commonjs/index.js +16 -339
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/modules/offline/OfflineCreatePackOptions.js +2 -4
- package/lib/commonjs/modules/offline/OfflineCreatePackOptions.js.map +1 -1
- package/lib/commonjs/modules/offline/OfflinePack.js.map +1 -1
- package/lib/commonjs/modules/offline/offlineManager.js +7 -2
- package/lib/commonjs/modules/offline/offlineManager.js.map +1 -1
- package/lib/commonjs/modules/snapshot/SnapshotOptions.js.map +1 -1
- package/lib/commonjs/modules/snapshot/snapshotManager.js.map +1 -1
- package/lib/commonjs/types/Position.js +2 -0
- package/lib/commonjs/{utils/index.d.js.map → types/Position.js.map} +1 -1
- package/lib/commonjs/utils/animated/Animated.js.map +1 -1
- package/lib/commonjs/utils/geoUtils.js +12 -38
- package/lib/commonjs/utils/geoUtils.js.map +1 -1
- package/lib/commonjs/utils/index.js +3 -6
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/module/MGLModule.js +19 -0
- package/lib/module/MGLModule.js.map +1 -0
- package/lib/module/Mapbox.js +59 -0
- package/lib/module/Mapbox.js.map +1 -0
- package/lib/module/classes/index.d.js +2 -0
- package/lib/module/classes/index.d.js.map +1 -1
- package/lib/module/components/{annotations/Annotation.js → Annotation.js} +26 -27
- package/lib/module/components/Annotation.js.map +1 -0
- package/lib/module/components/Callout.d.js +2 -0
- package/lib/module/components/Callout.d.js.map +1 -0
- package/lib/module/components/ImageSource.js +8 -25
- package/lib/module/components/ImageSource.js.map +1 -1
- package/lib/module/components/Images.js +17 -1
- package/lib/module/components/Images.js.map +1 -1
- package/lib/module/components/MapView.js +31 -290
- package/lib/module/components/MapView.js.map +1 -1
- package/lib/module/components/MarkerView.js.map +1 -1
- package/lib/module/components/NativeBridgeComponent.js.map +1 -1
- package/lib/module/components/PointAnnotation.js.map +1 -1
- package/lib/module/components/RasterDemSource.js +4 -38
- package/lib/module/components/RasterDemSource.js.map +1 -1
- package/lib/module/components/RasterSource.js +3 -47
- package/lib/module/components/RasterSource.js.map +1 -1
- package/lib/module/components/Style.js +11 -15
- package/lib/module/components/Style.js.map +1 -1
- package/lib/module/components/Terrain.js.map +1 -1
- package/lib/module/components/UserLocation.js +25 -76
- package/lib/module/components/UserLocation.js.map +1 -1
- package/lib/module/index.js +3 -108
- package/lib/module/index.js.map +1 -1
- package/lib/module/modules/offline/OfflineCreatePackOptions.js +2 -4
- package/lib/module/modules/offline/OfflineCreatePackOptions.js.map +1 -1
- package/lib/module/modules/offline/OfflinePack.js.map +1 -1
- package/lib/module/modules/offline/offlineManager.js +1 -1
- package/lib/module/modules/offline/offlineManager.js.map +1 -1
- package/lib/module/modules/snapshot/SnapshotOptions.js.map +1 -1
- package/lib/module/modules/snapshot/snapshotManager.js.map +1 -1
- package/lib/module/types/Position.js +2 -0
- package/lib/module/{utils/index.d.js.map → types/Position.js.map} +1 -1
- package/lib/module/utils/animated/Animated.js.map +1 -1
- package/lib/module/utils/geoUtils.js +5 -32
- package/lib/module/utils/geoUtils.js.map +1 -1
- package/lib/module/utils/index.js +3 -5
- package/lib/module/utils/index.js.map +1 -1
- package/lib/typescript/MGLModule.d.ts +22 -0
- package/lib/typescript/MGLModule.d.ts.map +1 -0
- package/lib/typescript/Mapbox.d.ts +54 -0
- package/lib/typescript/Mapbox.d.ts.map +1 -0
- package/lib/typescript/components/Annotation.d.ts +34 -0
- package/lib/typescript/components/Annotation.d.ts.map +1 -0
- package/lib/typescript/components/ImageSource.d.ts +32 -0
- package/lib/typescript/components/ImageSource.d.ts.map +1 -0
- package/lib/typescript/components/Images.d.ts +24 -2
- package/lib/typescript/components/Images.d.ts.map +1 -1
- package/lib/typescript/components/MapView.d.ts +469 -0
- package/lib/typescript/components/MapView.d.ts.map +1 -0
- package/lib/typescript/components/MarkerView.d.ts +3 -2
- package/lib/typescript/components/MarkerView.d.ts.map +1 -1
- package/lib/typescript/components/NativeBridgeComponent.d.ts +1 -1
- package/lib/typescript/components/NativeBridgeComponent.d.ts.map +1 -1
- package/lib/typescript/components/PointAnnotation.d.ts +10 -4
- package/lib/typescript/components/PointAnnotation.d.ts.map +1 -1
- package/lib/typescript/components/RasterDemSource.d.ts +46 -0
- package/lib/typescript/components/RasterDemSource.d.ts.map +1 -0
- package/lib/typescript/components/RasterSource.d.ts +59 -0
- package/lib/typescript/components/RasterSource.d.ts.map +1 -0
- package/lib/typescript/components/ShapeSource.d.ts +2 -2
- package/lib/typescript/components/ShapeSource.d.ts.map +1 -1
- package/lib/typescript/components/Style.d.ts +74 -0
- package/lib/typescript/components/Style.d.ts.map +1 -0
- package/lib/typescript/components/Terrain.d.ts +2 -2
- package/lib/typescript/components/Terrain.d.ts.map +1 -1
- package/lib/typescript/components/UserLocation.d.ts +102 -0
- package/lib/typescript/components/UserLocation.d.ts.map +1 -0
- package/lib/typescript/components/VectorSource.d.ts +2 -2
- package/lib/typescript/components/VectorSource.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +4 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/modules/offline/OfflineCreatePackOptions.d.ts +22 -0
- package/lib/typescript/modules/offline/OfflineCreatePackOptions.d.ts.map +1 -0
- package/lib/typescript/modules/offline/OfflinePack.d.ts +24 -0
- package/lib/typescript/modules/offline/OfflinePack.d.ts.map +1 -0
- package/lib/typescript/modules/offline/offlineManager.d.ts +220 -0
- package/lib/typescript/modules/offline/offlineManager.d.ts.map +1 -0
- package/lib/typescript/modules/snapshot/SnapshotOptions.d.ts +41 -0
- package/lib/typescript/modules/snapshot/SnapshotOptions.d.ts.map +1 -0
- package/lib/typescript/modules/snapshot/snapshotManager.d.ts +52 -0
- package/lib/typescript/modules/snapshot/snapshotManager.d.ts.map +1 -0
- package/lib/typescript/types/Position.d.ts +2 -0
- package/lib/typescript/types/Position.d.ts.map +1 -0
- package/lib/typescript/utils/Logger.d.ts +1 -1
- package/lib/typescript/utils/Logger.d.ts.map +1 -1
- package/lib/typescript/utils/animated/Animated.d.ts +23 -0
- package/lib/typescript/utils/animated/Animated.d.ts.map +1 -0
- package/lib/typescript/utils/geoUtils.d.ts +15 -0
- package/lib/typescript/utils/geoUtils.d.ts.map +1 -0
- package/lib/typescript/utils/index.d.ts +48 -0
- package/lib/typescript/utils/index.d.ts.map +1 -0
- package/package.json +4 -4
- package/index.d.ts +0 -745
- package/javascript/components/ImageSource.js +0 -82
- package/javascript/components/RasterDemSource.js +0 -106
- package/javascript/components/RasterSource.js +0 -124
- package/javascript/components/annotations/Annotation.js +0 -122
- package/javascript/index.js +0 -162
- package/javascript/utils/geoUtils.d.ts +0 -10
- package/javascript/utils/geoUtils.js +0 -73
- package/javascript/utils/index.d.ts +0 -27
- package/lib/commonjs/components/annotations/Annotation.js.map +0 -1
- package/lib/commonjs/utils/geoUtils.d.js +0 -2
- package/lib/commonjs/utils/geoUtils.d.js.map +0 -1
- package/lib/commonjs/utils/index.d.js +0 -2
- package/lib/module/components/annotations/Annotation.js.map +0 -1
- package/lib/module/utils/geoUtils.d.js +0 -2
- package/lib/module/utils/geoUtils.d.js.map +0 -1
- package/lib/module/utils/index.d.js +0 -2
- /package/javascript/utils/animated/{Animated.js → Animated.ts} +0 -0
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import { requireNativeComponent } from 'react-native';
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
cloneReactChildrenWithProps,
|
|
7
|
-
viewPropTypes,
|
|
8
|
-
isNumber,
|
|
9
|
-
resolveImagePath,
|
|
10
|
-
} from '../utils';
|
|
11
|
-
|
|
12
|
-
import AbstractSource from './AbstractSource';
|
|
13
|
-
|
|
14
|
-
export const NATIVE_MODULE_NAME = 'RCTMGLImageSource';
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* ImageSource is a content source that is used for a georeferenced raster image to be shown on the map.
|
|
18
|
-
* The georeferenced image scales and rotates as the user zooms and rotates the map
|
|
19
|
-
*/
|
|
20
|
-
class ImageSource extends AbstractSource {
|
|
21
|
-
static propTypes = {
|
|
22
|
-
...viewPropTypes,
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* A string that uniquely identifies the source.
|
|
26
|
-
*/
|
|
27
|
-
id: PropTypes.string.isRequired,
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* An HTTP(S) URL, absolute file URL, or local file URL to the source image.
|
|
31
|
-
* Gifs are currently not supported.
|
|
32
|
-
*/
|
|
33
|
-
url: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* The top left, top right, bottom right, and bottom left coordinates for the image.
|
|
37
|
-
*/
|
|
38
|
-
coordinates: PropTypes.arrayOf(
|
|
39
|
-
PropTypes.arrayOf(PropTypes.number).isRequired,
|
|
40
|
-
).isRequired,
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
_getURL() {
|
|
44
|
-
let { url } = this.props;
|
|
45
|
-
|
|
46
|
-
if (isNumber(this.props.url)) {
|
|
47
|
-
url = resolveImagePath(this.props.url);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
return url;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
render() {
|
|
54
|
-
if (
|
|
55
|
-
!this.props.url ||
|
|
56
|
-
!this.props.coordinates ||
|
|
57
|
-
!this.props.coordinates.length
|
|
58
|
-
) {
|
|
59
|
-
return null;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
const props = {
|
|
63
|
-
...this.props,
|
|
64
|
-
url: this._getURL(),
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
return (
|
|
68
|
-
<RCTMGLImageSource ref="nativeSource" {...props}>
|
|
69
|
-
{cloneReactChildrenWithProps(this.props.children, {
|
|
70
|
-
sourceID: this.props.id,
|
|
71
|
-
})}
|
|
72
|
-
</RCTMGLImageSource>
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
const RCTMGLImageSource = requireNativeComponent(
|
|
78
|
-
NATIVE_MODULE_NAME,
|
|
79
|
-
ImageSource,
|
|
80
|
-
);
|
|
81
|
-
|
|
82
|
-
export default ImageSource;
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import { NativeModules, requireNativeComponent } from 'react-native';
|
|
4
|
-
|
|
5
|
-
import { cloneReactChildrenWithProps, viewPropTypes } from '../utils';
|
|
6
|
-
|
|
7
|
-
import AbstractSource from './AbstractSource';
|
|
8
|
-
|
|
9
|
-
const isTileTemplateUrl = (url) =>
|
|
10
|
-
url &&
|
|
11
|
-
(url.includes('{z}') || url.includes('{bbox-') || url.includes('{quadkey}'));
|
|
12
|
-
|
|
13
|
-
const MapboxGL = NativeModules.MGLModule;
|
|
14
|
-
|
|
15
|
-
export const NATIVE_MODULE_NAME = 'RCTMGLRasterDemSource';
|
|
16
|
-
|
|
17
|
-
class RasterDemSource extends AbstractSource {
|
|
18
|
-
static propTypes = {
|
|
19
|
-
...viewPropTypes,
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* A string that uniquely identifies the source.
|
|
23
|
-
*/
|
|
24
|
-
id: PropTypes.string.isRequired,
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* A URL to a TileJSON configuration file describing the source’s contents and other metadata.
|
|
28
|
-
*/
|
|
29
|
-
url: PropTypes.string,
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* An array of tile URL templates. If multiple endpoints are specified, clients may use any combination of endpoints.
|
|
33
|
-
* Example: https://example.com/raster-tiles/{z}/{x}/{y}.png
|
|
34
|
-
*/
|
|
35
|
-
tileUrlTemplates: PropTypes.arrayOf(PropTypes.string),
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* An unsigned integer that specifies the minimum zoom level at which to display tiles from the source.
|
|
39
|
-
* The value should be between 0 and 22, inclusive, and less than
|
|
40
|
-
* maxZoomLevel, if specified. The default value for this option is 0.
|
|
41
|
-
*/
|
|
42
|
-
minZoomLevel: PropTypes.number,
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* An unsigned integer that specifies the maximum zoom level at which to display tiles from the source.
|
|
46
|
-
* The value should be between 0 and 22, inclusive, and less than
|
|
47
|
-
* minZoomLevel, if specified. The default value for this option is 22.
|
|
48
|
-
*/
|
|
49
|
-
maxZoomLevel: PropTypes.number,
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Size of the map tiles.
|
|
53
|
-
* Mapbox urls default to 256, all others default to 512.
|
|
54
|
-
*/
|
|
55
|
-
tileSize: PropTypes.number,
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
static defaultProps = {
|
|
59
|
-
id: MapboxGL.StyleSource.DefaultSourceID,
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
constructor(props) {
|
|
63
|
-
super(props);
|
|
64
|
-
if (isTileTemplateUrl(props.url)) {
|
|
65
|
-
console.warn(
|
|
66
|
-
`RasterDemSource 'url' property contains a Tile URL Template, but is intended for a StyleJSON URL. Please migrate your VectorSource to use: \`tileUrlTemplates=["${props.url}"]\` instead.`,
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
render() {
|
|
72
|
-
let { url } = this.props;
|
|
73
|
-
let { tileUrlTemplates } = this.props;
|
|
74
|
-
|
|
75
|
-
// Swapping url for tileUrlTemplates to provide backward compatibility
|
|
76
|
-
// when RasterSource supported only tile url as url prop
|
|
77
|
-
if (isTileTemplateUrl(url)) {
|
|
78
|
-
tileUrlTemplates = [url];
|
|
79
|
-
url = undefined;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
const props = {
|
|
83
|
-
...this.props,
|
|
84
|
-
id: this.props.id,
|
|
85
|
-
url,
|
|
86
|
-
tileUrlTemplates,
|
|
87
|
-
minZoomLevel: this.props.minZoomLevel,
|
|
88
|
-
maxZoomLevel: this.props.maxZoomLevel,
|
|
89
|
-
tileSize: this.props.tileSize,
|
|
90
|
-
};
|
|
91
|
-
return (
|
|
92
|
-
<RCTMGLRasterDemSource ref="nativeSource" {...props}>
|
|
93
|
-
{cloneReactChildrenWithProps(this.props.children, {
|
|
94
|
-
sourceID: this.props.id,
|
|
95
|
-
})}
|
|
96
|
-
</RCTMGLRasterDemSource>
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
const RCTMGLRasterDemSource = requireNativeComponent(
|
|
102
|
-
NATIVE_MODULE_NAME,
|
|
103
|
-
RasterDemSource,
|
|
104
|
-
);
|
|
105
|
-
|
|
106
|
-
export default RasterDemSource;
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import { NativeModules, requireNativeComponent } from 'react-native';
|
|
4
|
-
|
|
5
|
-
import { cloneReactChildrenWithProps, viewPropTypes } from '../utils';
|
|
6
|
-
|
|
7
|
-
import AbstractSource from './AbstractSource';
|
|
8
|
-
|
|
9
|
-
const MapboxGL = NativeModules.MGLModule;
|
|
10
|
-
|
|
11
|
-
export const NATIVE_MODULE_NAME = 'RCTMGLRasterSource';
|
|
12
|
-
|
|
13
|
-
const isTileTemplateUrl = (url) =>
|
|
14
|
-
url &&
|
|
15
|
-
(url.includes('{z}') || url.includes('{bbox-') || url.includes('{quadkey}'));
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* RasterSource is a map content source that supplies raster image tiles to be shown on the map.
|
|
19
|
-
* The location of and metadata about the tiles are defined either by an option dictionary
|
|
20
|
-
* or by an external file that conforms to the TileJSON specification.
|
|
21
|
-
*/
|
|
22
|
-
class RasterSource extends AbstractSource {
|
|
23
|
-
static propTypes = {
|
|
24
|
-
...viewPropTypes,
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* A string that uniquely identifies the source.
|
|
28
|
-
*/
|
|
29
|
-
id: PropTypes.string.isRequired,
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* A URL to a TileJSON configuration file describing the source’s contents and other metadata.
|
|
33
|
-
*/
|
|
34
|
-
url: PropTypes.string,
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* An array of tile URL templates. If multiple endpoints are specified, clients may use any combination of endpoints.
|
|
38
|
-
* Example: https://example.com/raster-tiles/{z}/{x}/{y}.png
|
|
39
|
-
*/
|
|
40
|
-
tileUrlTemplates: PropTypes.arrayOf(PropTypes.string),
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* An unsigned integer that specifies the minimum zoom level at which to display tiles from the source.
|
|
44
|
-
* The value should be between 0 and 22, inclusive, and less than
|
|
45
|
-
* maxZoomLevel, if specified. The default value for this option is 0.
|
|
46
|
-
*/
|
|
47
|
-
minZoomLevel: PropTypes.number,
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* An unsigned integer that specifies the maximum zoom level at which to display tiles from the source.
|
|
51
|
-
* The value should be between 0 and 22, inclusive, and less than
|
|
52
|
-
* minZoomLevel, if specified. The default value for this option is 22.
|
|
53
|
-
*/
|
|
54
|
-
maxZoomLevel: PropTypes.number,
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Size of the map tiles.
|
|
58
|
-
* Mapbox urls default to 256, all others default to 512.
|
|
59
|
-
*/
|
|
60
|
-
tileSize: PropTypes.number,
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Influences the y direction of the tile coordinates. (tms inverts y axis)
|
|
64
|
-
*/
|
|
65
|
-
tms: PropTypes.bool,
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* An HTML or literal text string defining the buttons to be displayed in an action sheet when the
|
|
69
|
-
* source is part of a map view’s style and the map view’s attribution button is pressed.
|
|
70
|
-
*/
|
|
71
|
-
attribution: PropTypes.string,
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
static defaultProps = {
|
|
75
|
-
id: MapboxGL.StyleSource.DefaultSourceID,
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
constructor(props) {
|
|
79
|
-
super(props);
|
|
80
|
-
if (isTileTemplateUrl(props.url)) {
|
|
81
|
-
console.warn(
|
|
82
|
-
`RasterSource 'url' property contains a Tile URL Template, but is intended for a StyleJSON URL. Please migrate your VectorSource to use: \`tileUrlTemplates=["${props.url}"]\` instead.`,
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
render() {
|
|
88
|
-
let { url } = this.props;
|
|
89
|
-
let { tileUrlTemplates } = this.props;
|
|
90
|
-
|
|
91
|
-
// Swapping url for tileUrlTemplates to provide backward compatibility
|
|
92
|
-
// when RasterSource supported only tile url as url prop
|
|
93
|
-
if (isTileTemplateUrl(url)) {
|
|
94
|
-
tileUrlTemplates = [url];
|
|
95
|
-
url = undefined;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
const props = {
|
|
99
|
-
...this.props,
|
|
100
|
-
id: this.props.id,
|
|
101
|
-
url,
|
|
102
|
-
tileUrlTemplates,
|
|
103
|
-
minZoomLevel: this.props.minZoomLevel,
|
|
104
|
-
maxZoomLevel: this.props.maxZoomLevel,
|
|
105
|
-
tileSize: this.props.tileSize,
|
|
106
|
-
tms: this.props.tms,
|
|
107
|
-
attribution: this.props.attribution,
|
|
108
|
-
};
|
|
109
|
-
return (
|
|
110
|
-
<RCTMGLRasterSource ref={this.setNativeRef} {...props}>
|
|
111
|
-
{cloneReactChildrenWithProps(this.props.children, {
|
|
112
|
-
sourceID: this.props.id,
|
|
113
|
-
})}
|
|
114
|
-
</RCTMGLRasterSource>
|
|
115
|
-
);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
const RCTMGLRasterSource = requireNativeComponent(
|
|
120
|
-
NATIVE_MODULE_NAME,
|
|
121
|
-
RasterSource,
|
|
122
|
-
);
|
|
123
|
-
|
|
124
|
-
export default RasterSource;
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Easing } from 'react-native';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
|
|
5
|
-
import { SymbolLayer } from '../SymbolLayer';
|
|
6
|
-
import Animated from '../../utils/animated/Animated';
|
|
7
|
-
import { AnimatedPoint } from '../../classes';
|
|
8
|
-
|
|
9
|
-
class Annotation extends React.Component {
|
|
10
|
-
static propTypes = {
|
|
11
|
-
id: PropTypes.string.isRequired,
|
|
12
|
-
animated: PropTypes.bool,
|
|
13
|
-
animationDuration: PropTypes.number,
|
|
14
|
-
animationEasingFunction: PropTypes.func,
|
|
15
|
-
coordinates: PropTypes.arrayOf(PropTypes.number),
|
|
16
|
-
onPress: PropTypes.func,
|
|
17
|
-
children: PropTypes.any,
|
|
18
|
-
style: PropTypes.any,
|
|
19
|
-
icon: PropTypes.oneOfType([
|
|
20
|
-
PropTypes.string,
|
|
21
|
-
PropTypes.number,
|
|
22
|
-
PropTypes.object,
|
|
23
|
-
]),
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
static defaultProps = {
|
|
27
|
-
animated: false,
|
|
28
|
-
animationDuration: 1000,
|
|
29
|
-
animationEasingFunction: Easing.linear,
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
constructor(props) {
|
|
33
|
-
super(props);
|
|
34
|
-
|
|
35
|
-
const shape = this._getShapeFromProps(props);
|
|
36
|
-
|
|
37
|
-
this.state = {
|
|
38
|
-
shape: props.animated ? new AnimatedPoint(shape) : shape,
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
this.onPress = this.onPress.bind(this);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
componentDidUpdate(prevProps) {
|
|
45
|
-
if (!Array.isArray(this.props.coordinates)) {
|
|
46
|
-
this.setState({ shape: null });
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const hasCoordChanged =
|
|
51
|
-
prevProps.coordinates[0] !== this.props.coordinates[0] ||
|
|
52
|
-
prevProps.coordinates[1] !== this.props.coordinates[1];
|
|
53
|
-
|
|
54
|
-
if (
|
|
55
|
-
prevProps.animated !== this.props.animated ||
|
|
56
|
-
(hasCoordChanged && (!this.state.shape || !this.props.animated))
|
|
57
|
-
) {
|
|
58
|
-
const shape = this._getShapeFromProps(this.props);
|
|
59
|
-
|
|
60
|
-
this.setState({
|
|
61
|
-
shape: this.props.animated ? new AnimatedPoint(shape) : shape,
|
|
62
|
-
});
|
|
63
|
-
} else if (hasCoordChanged && this.props.animated && this.state.shape) {
|
|
64
|
-
// flush current animations
|
|
65
|
-
this.state.shape.stopAnimation();
|
|
66
|
-
|
|
67
|
-
this.state.shape
|
|
68
|
-
.timing({
|
|
69
|
-
coordinates: this.props.coordinates,
|
|
70
|
-
easing: this.props.animationEasingFunction,
|
|
71
|
-
duration: this.props.animationDuration,
|
|
72
|
-
})
|
|
73
|
-
.start();
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
onPress() {
|
|
78
|
-
if (this.props.onPress) {
|
|
79
|
-
this.props.onPress();
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
_getShapeFromProps(props = {}) {
|
|
84
|
-
const lng = props.coordinates[0] || 0;
|
|
85
|
-
const lat = props.coordinates[1] || 0;
|
|
86
|
-
return { type: 'Point', coordinates: [lng, lat] };
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
get symbolStyle() {
|
|
90
|
-
if (!this.props.icon) {
|
|
91
|
-
return undefined;
|
|
92
|
-
}
|
|
93
|
-
return Object.assign({}, this.props.style, {
|
|
94
|
-
iconImage: this.props.icon,
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
render() {
|
|
99
|
-
if (!this.props.coordinates) {
|
|
100
|
-
return null;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
return (
|
|
104
|
-
<Animated.ShapeSource
|
|
105
|
-
id={this.props.id}
|
|
106
|
-
ref="source"
|
|
107
|
-
onPress={this.onPress}
|
|
108
|
-
shape={this.state.shape}
|
|
109
|
-
>
|
|
110
|
-
{this.symbolStyle && (
|
|
111
|
-
<SymbolLayer
|
|
112
|
-
id={`${this.props.id}-symbol`}
|
|
113
|
-
style={this.symbolStyle}
|
|
114
|
-
/>
|
|
115
|
-
)}
|
|
116
|
-
{this.props.children}
|
|
117
|
-
</Animated.ShapeSource>
|
|
118
|
-
);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
export default Annotation;
|
package/javascript/index.js
DELETED
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
import { NativeModules } from 'react-native';
|
|
2
|
-
|
|
3
|
-
import { Camera, UserTrackingMode } from './components/Camera';
|
|
4
|
-
import { Atmosphere } from './components/Atmosphere';
|
|
5
|
-
import MapView from './components/MapView';
|
|
6
|
-
import Light from './components/Light';
|
|
7
|
-
import PointAnnotation from './components/PointAnnotation';
|
|
8
|
-
import Annotation from './components/annotations/Annotation';
|
|
9
|
-
import Callout from './components/Callout';
|
|
10
|
-
import UserLocation from './components/UserLocation';
|
|
11
|
-
import VectorSource from './components/VectorSource';
|
|
12
|
-
import { ShapeSource } from './components/ShapeSource';
|
|
13
|
-
import RasterSource from './components/RasterSource';
|
|
14
|
-
import RasterDemSource from './components/RasterDemSource';
|
|
15
|
-
import ImageSource from './components/ImageSource';
|
|
16
|
-
import Images from './components/Images';
|
|
17
|
-
import Image from './components/Image';
|
|
18
|
-
import FillLayer from './components/FillLayer';
|
|
19
|
-
import FillExtrusionLayer from './components/FillExtrusionLayer';
|
|
20
|
-
import HeatmapLayer from './components/HeatmapLayer';
|
|
21
|
-
import LineLayer from './components/LineLayer';
|
|
22
|
-
import CircleLayer from './components/CircleLayer';
|
|
23
|
-
import SkyLayer from './components/SkyLayer';
|
|
24
|
-
import { SymbolLayer } from './components/SymbolLayer';
|
|
25
|
-
import RasterLayer from './components/RasterLayer';
|
|
26
|
-
import BackgroundLayer from './components/BackgroundLayer';
|
|
27
|
-
import { Terrain } from './components/Terrain';
|
|
28
|
-
import locationManager from './modules/location/locationManager';
|
|
29
|
-
import offlineManager from './modules/offline/offlineManager';
|
|
30
|
-
import snapshotManager from './modules/snapshot/snapshotManager';
|
|
31
|
-
import MarkerView from './components/MarkerView';
|
|
32
|
-
import Animated from './utils/animated/Animated';
|
|
33
|
-
import {
|
|
34
|
-
AnimatedCoordinatesArray,
|
|
35
|
-
AnimatedExtractCoordinateFromArray,
|
|
36
|
-
AnimatedPoint,
|
|
37
|
-
AnimatedRouteCoordinatesArray,
|
|
38
|
-
AnimatedShape,
|
|
39
|
-
} from './classes';
|
|
40
|
-
import Style from './components/Style';
|
|
41
|
-
import Logger from './utils/Logger';
|
|
42
|
-
import { deprecatedClass } from './utils/deprecation';
|
|
43
|
-
import { requestAndroidLocationPermissions } from './requestAndroidLocationPermissions';
|
|
44
|
-
import { getAnnotationsLayerID } from './utils/getAnnotationsLayerID';
|
|
45
|
-
|
|
46
|
-
const MapboxGL = { ...NativeModules.MGLModule };
|
|
47
|
-
|
|
48
|
-
// static methods
|
|
49
|
-
MapboxGL.requestAndroidLocationPermissions = requestAndroidLocationPermissions;
|
|
50
|
-
MapboxGL.UserTrackingModes = UserTrackingMode;
|
|
51
|
-
|
|
52
|
-
// components
|
|
53
|
-
MapboxGL.MapView = MapView;
|
|
54
|
-
MapboxGL.Light = Light;
|
|
55
|
-
MapboxGL.PointAnnotation = PointAnnotation;
|
|
56
|
-
MapboxGL.Callout = Callout;
|
|
57
|
-
MapboxGL.UserLocation = UserLocation;
|
|
58
|
-
MapboxGL.Camera = Camera;
|
|
59
|
-
MapboxGL.Style = Style;
|
|
60
|
-
|
|
61
|
-
// classes
|
|
62
|
-
MapboxGL.AnimatedPoint = AnimatedPoint;
|
|
63
|
-
MapboxGL.AnimatedMapPoint = deprecatedClass(
|
|
64
|
-
AnimatedPoint,
|
|
65
|
-
'AnimatedMapPoint is deprecated please use AnimatedPoint',
|
|
66
|
-
);
|
|
67
|
-
MapboxGL.AnimatedShape = AnimatedShape;
|
|
68
|
-
MapboxGL.AnimatedCoordinatesArray = AnimatedCoordinatesArray;
|
|
69
|
-
MapboxGL.AnimatedExtractCoordinateFromArray =
|
|
70
|
-
AnimatedExtractCoordinateFromArray;
|
|
71
|
-
MapboxGL.AnimatedRouteCoordinatesArray = AnimatedRouteCoordinatesArray;
|
|
72
|
-
|
|
73
|
-
// annotations
|
|
74
|
-
MapboxGL.Annotation = Annotation;
|
|
75
|
-
MapboxGL.MarkerView = MarkerView;
|
|
76
|
-
|
|
77
|
-
// sources
|
|
78
|
-
MapboxGL.VectorSource = VectorSource;
|
|
79
|
-
MapboxGL.ShapeSource = ShapeSource;
|
|
80
|
-
MapboxGL.RasterSource = RasterSource;
|
|
81
|
-
MapboxGL.ImageSource = ImageSource;
|
|
82
|
-
MapboxGL.Images = Images;
|
|
83
|
-
MapboxGL.Image = Image;
|
|
84
|
-
MapboxGL.RasterDemSource = RasterDemSource;
|
|
85
|
-
|
|
86
|
-
// layers
|
|
87
|
-
MapboxGL.FillLayer = FillLayer;
|
|
88
|
-
MapboxGL.FillExtrusionLayer = FillExtrusionLayer;
|
|
89
|
-
MapboxGL.HeatmapLayer = HeatmapLayer;
|
|
90
|
-
MapboxGL.LineLayer = LineLayer;
|
|
91
|
-
MapboxGL.CircleLayer = CircleLayer;
|
|
92
|
-
MapboxGL.SkyLayer = SkyLayer;
|
|
93
|
-
MapboxGL.SymbolLayer = SymbolLayer;
|
|
94
|
-
MapboxGL.RasterLayer = RasterLayer;
|
|
95
|
-
MapboxGL.BackgroundLayer = BackgroundLayer;
|
|
96
|
-
|
|
97
|
-
MapboxGL.Terrain = Terrain;
|
|
98
|
-
MapboxGL.Atmosphere = Atmosphere;
|
|
99
|
-
|
|
100
|
-
// modules
|
|
101
|
-
MapboxGL.locationManager = locationManager;
|
|
102
|
-
MapboxGL.offlineManager = offlineManager;
|
|
103
|
-
MapboxGL.snapshotManager = snapshotManager;
|
|
104
|
-
|
|
105
|
-
// animated
|
|
106
|
-
MapboxGL.Animated = Animated;
|
|
107
|
-
MapboxGL.Animated.RouteCoordinatesArray = AnimatedRouteCoordinatesArray; // For backwards compatibiilty.
|
|
108
|
-
MapboxGL.Animated.ExtractCoordinateFromArray =
|
|
109
|
-
AnimatedExtractCoordinateFromArray; // For backwards compatibiilty.
|
|
110
|
-
|
|
111
|
-
// utils
|
|
112
|
-
MapboxGL.Logger = Logger;
|
|
113
|
-
MapboxGL.getAnnotationsLayerID = getAnnotationsLayerID;
|
|
114
|
-
|
|
115
|
-
const { LineJoin } = MapboxGL;
|
|
116
|
-
|
|
117
|
-
const AnimatedMapPoint = AnimatedPoint; // For backwards compatibiilty.
|
|
118
|
-
|
|
119
|
-
export {
|
|
120
|
-
MapView,
|
|
121
|
-
Light,
|
|
122
|
-
PointAnnotation,
|
|
123
|
-
Callout,
|
|
124
|
-
UserLocation,
|
|
125
|
-
Camera,
|
|
126
|
-
Annotation,
|
|
127
|
-
MarkerView,
|
|
128
|
-
VectorSource,
|
|
129
|
-
ShapeSource,
|
|
130
|
-
RasterSource,
|
|
131
|
-
RasterDemSource,
|
|
132
|
-
ImageSource,
|
|
133
|
-
Images,
|
|
134
|
-
Image,
|
|
135
|
-
FillLayer,
|
|
136
|
-
FillExtrusionLayer,
|
|
137
|
-
HeatmapLayer,
|
|
138
|
-
LineLayer,
|
|
139
|
-
CircleLayer,
|
|
140
|
-
SkyLayer,
|
|
141
|
-
SymbolLayer,
|
|
142
|
-
RasterLayer,
|
|
143
|
-
BackgroundLayer,
|
|
144
|
-
Terrain,
|
|
145
|
-
Atmosphere,
|
|
146
|
-
AnimatedCoordinatesArray,
|
|
147
|
-
AnimatedExtractCoordinateFromArray,
|
|
148
|
-
AnimatedPoint,
|
|
149
|
-
AnimatedMapPoint,
|
|
150
|
-
AnimatedRouteCoordinatesArray,
|
|
151
|
-
AnimatedShape,
|
|
152
|
-
locationManager,
|
|
153
|
-
offlineManager,
|
|
154
|
-
snapshotManager,
|
|
155
|
-
Animated,
|
|
156
|
-
LineJoin,
|
|
157
|
-
Logger,
|
|
158
|
-
getAnnotationsLayerID,
|
|
159
|
-
Style,
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
export default MapboxGL;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export function makeLatLngBounds<G = Geometry, P = Properties>(
|
|
2
|
-
northEastCoordinates: Position[],
|
|
3
|
-
southWestCoordinates: Position[],
|
|
4
|
-
): FeatureCollection<G, P>;
|
|
5
|
-
|
|
6
|
-
export function makePoint<P = Properties>(
|
|
7
|
-
coordinates: Position,
|
|
8
|
-
properties?: P,
|
|
9
|
-
options?: PositionsOptions,
|
|
10
|
-
): Feature<GeoJSON.Point, P>;
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { featureCollection, point, feature, lineString } from '@turf/helpers';
|
|
2
|
-
import distance from '@turf/distance';
|
|
3
|
-
import along from '@turf/along';
|
|
4
|
-
import geoViewport from '@mapbox/geo-viewport';
|
|
5
|
-
|
|
6
|
-
const VECTOR_TILE_SIZE = 512;
|
|
7
|
-
|
|
8
|
-
export function makePoint(coordinates, properties, options) {
|
|
9
|
-
return point(coordinates, properties, options);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export function makeLineString(coordinates, properties, options) {
|
|
13
|
-
return lineString(coordinates, properties, options);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export function makeLatLngBounds(northEastCoordinates, southWestCoordinates) {
|
|
17
|
-
return featureCollection([
|
|
18
|
-
point(northEastCoordinates),
|
|
19
|
-
point(southWestCoordinates),
|
|
20
|
-
]);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export function makeFeature(geometry, properties) {
|
|
24
|
-
return feature(geometry, properties);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export function makeFeatureCollection(features = [], options) {
|
|
28
|
-
return featureCollection(features, options);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export function addToFeatureCollection(newFeatureCollection, newFeature) {
|
|
32
|
-
return {
|
|
33
|
-
...newFeatureCollection,
|
|
34
|
-
features: [...newFeatureCollection.features, newFeature],
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export function calculateDistance(origin, dest, options) {
|
|
39
|
-
return distance(origin, dest, options);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export function pointAlongLine(newLineString, distAlong, options) {
|
|
43
|
-
return along(newLineString, distAlong, options);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export function getOrCalculateVisibleRegion(
|
|
47
|
-
coord,
|
|
48
|
-
zoomLevel,
|
|
49
|
-
width,
|
|
50
|
-
height,
|
|
51
|
-
nativeRegion,
|
|
52
|
-
) {
|
|
53
|
-
const region = {
|
|
54
|
-
ne: [0, 0],
|
|
55
|
-
sw: [0, 0],
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
if (!nativeRegion || !Array.isArray(nativeRegion.visibleBounds)) {
|
|
59
|
-
const bounds = geoViewport.bounds(
|
|
60
|
-
coord,
|
|
61
|
-
zoomLevel,
|
|
62
|
-
[width, height],
|
|
63
|
-
VECTOR_TILE_SIZE,
|
|
64
|
-
);
|
|
65
|
-
region.ne = [bounds[3], bounds[2]];
|
|
66
|
-
region.sw = [bounds[1], bounds[0]];
|
|
67
|
-
} else {
|
|
68
|
-
region.ne = nativeRegion.properties.visibleBounds[0];
|
|
69
|
-
region.sw = nativeRegion.properties.visibleBounds[1];
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
return region;
|
|
73
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
export type NativeArg =
|
|
4
|
-
| string
|
|
5
|
-
| number
|
|
6
|
-
| { [k: string]: NativeArg }
|
|
7
|
-
| NativeArg[];
|
|
8
|
-
|
|
9
|
-
export function isAndroid(): boolean;
|
|
10
|
-
export function isBoolean(argument: unknown): argument is boolean;
|
|
11
|
-
export function isNumber(argument: unknown): argument is number;
|
|
12
|
-
export function isString(argument: unknown): argument is string;
|
|
13
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
14
|
-
export function isFunction(argument: unknown): argument is Function;
|
|
15
|
-
|
|
16
|
-
export function toJSONString(_: unknown): string;
|
|
17
|
-
export function runNativeCommand<RefType, ReturnType = NativeArg>(
|
|
18
|
-
module: string,
|
|
19
|
-
name: string,
|
|
20
|
-
nativeRef: RefType,
|
|
21
|
-
args: NativeArg[],
|
|
22
|
-
): Promise<ReturnType>;
|
|
23
|
-
|
|
24
|
-
export function cloneReactChildrenWithProps(
|
|
25
|
-
children: React.ReactElement | React.ReactElement[],
|
|
26
|
-
propsToAdd: { [key: string]: string } = {},
|
|
27
|
-
): React.ReactElement | React.ReactElement[];
|