@rnmapbox/maps 10.1.0-beta.24 → 10.1.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/android/src/main/java/com/rnmapbox/rnmbx/RNMBXPackage.kt +4 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImagesManager.kt +27 -3
- package/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/NativeMapViewModule.kt +1 -1
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/RNMBXStyleFactory.kt +1184 -109
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXModelLayer.kt +33 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXModelLayerManager.kt +85 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/model/RNMBXModels.kt +33 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/model/RNMBXModelsManager.kt +59 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/modules/RNMBXOfflineModule.kt +4 -1
- package/android/src/main/mapbox-v11-compat/v10/com/rnmapbox/rnmbx/v11compat/OfflineManager.kt +6 -0
- package/android/src/main/mapbox-v11-compat/v10/com/rnmapbox/rnmbx/v11compat/StyleFactory.kt +395 -0
- package/android/src/main/mapbox-v11-compat/v11/com/rnmapbox/rnmbx/v11compat/OfflineManager.kt +4 -0
- package/android/src/main/mapbox-v11-compat/v11/com/rnmapbox/rnmbx/v11compat/StyleFactory.kt +8 -0
- package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXModelLayerManagerDelegate.java +65 -0
- package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXModelLayerManagerInterface.java +28 -0
- package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXModelsManagerDelegate.java +32 -0
- package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXModelsManagerInterface.java +17 -0
- package/ios/RNMBX/CustomHttpHeaders.swift +2 -9
- package/ios/RNMBX/RNMBXModelLayer.swift +59 -0
- package/ios/RNMBX/RNMBXModelLayerComponentView.h +15 -0
- package/ios/RNMBX/RNMBXModelLayerComponentView.mm +70 -0
- package/ios/RNMBX/RNMBXModelLayerViewManager.m +12 -0
- package/ios/RNMBX/RNMBXModelLayerViewManager.swift +13 -0
- package/ios/RNMBX/RNMBXModels.swift +63 -0
- package/ios/RNMBX/RNMBXModelsComponentView.h +17 -0
- package/ios/RNMBX/RNMBXModelsComponentView.mm +67 -0
- package/ios/RNMBX/RNMBXModelsManager.mm +9 -0
- package/ios/RNMBX/RNMBXModelsManager.swift +13 -0
- package/ios/RNMBX/RNMBXStyle.swift +786 -1
- package/ios/RNMBX/RNMBXStyleValue.swift +34 -3
- package/lib/commonjs/Mapbox.js +16 -0
- package/lib/commonjs/Mapbox.js.map +1 -1
- package/lib/commonjs/components/AbstractLayer.js +1 -1
- package/lib/commonjs/components/AbstractLayer.js.map +1 -1
- package/lib/commonjs/components/ModelLayer.js +37 -0
- package/lib/commonjs/components/ModelLayer.js.map +1 -0
- package/lib/commonjs/components/Models.js +43 -0
- package/lib/commonjs/components/Models.js.map +1 -0
- package/lib/commonjs/specs/RNMBXCircleLayerNativeComponent.js.map +1 -1
- package/lib/commonjs/specs/RNMBXFillLayerNativeComponent.js.map +1 -1
- package/lib/commonjs/specs/RNMBXHeatmapLayerNativeComponent.js.map +1 -1
- package/lib/commonjs/specs/RNMBXLineLayerNativeComponent.js.map +1 -1
- package/lib/commonjs/specs/RNMBXModelLayerNativeComponent.js +13 -0
- package/lib/commonjs/specs/RNMBXModelLayerNativeComponent.js.map +1 -0
- package/lib/commonjs/specs/RNMBXModelsNativeComponent.js +10 -0
- package/lib/commonjs/specs/RNMBXModelsNativeComponent.js.map +1 -0
- package/lib/commonjs/specs/RNMBXRasterLayerNativeComponent.js.map +1 -1
- package/lib/commonjs/specs/RNMBXSymbolLayerNativeComponent.js.map +1 -1
- package/lib/commonjs/specs/codeparts/CommonLayerNativeComponentsProps.codepart-ts +11 -10
- package/lib/commonjs/utils/MapboxStyles.d.js +5 -0
- package/lib/commonjs/utils/MapboxStyles.d.js.map +1 -1
- package/lib/commonjs/utils/styleMap.js +67 -2
- package/lib/commonjs/utils/styleMap.js.map +1 -1
- package/lib/module/Mapbox.js +2 -0
- package/lib/module/Mapbox.js.map +1 -1
- package/lib/module/components/AbstractLayer.js +1 -1
- package/lib/module/components/AbstractLayer.js.map +1 -1
- package/lib/module/components/ModelLayer.js +30 -0
- package/lib/module/components/ModelLayer.js.map +1 -0
- package/lib/module/components/Models.js +36 -0
- package/lib/module/components/Models.js.map +1 -0
- package/lib/module/specs/RNMBXCircleLayerNativeComponent.js +2 -0
- package/lib/module/specs/RNMBXCircleLayerNativeComponent.js.map +1 -1
- package/lib/module/specs/RNMBXFillLayerNativeComponent.js +2 -0
- package/lib/module/specs/RNMBXFillLayerNativeComponent.js.map +1 -1
- package/lib/module/specs/RNMBXHeatmapLayerNativeComponent.js +2 -0
- package/lib/module/specs/RNMBXHeatmapLayerNativeComponent.js.map +1 -1
- package/lib/module/specs/RNMBXLineLayerNativeComponent.js +2 -0
- package/lib/module/specs/RNMBXLineLayerNativeComponent.js.map +1 -1
- package/lib/module/specs/RNMBXModelLayerNativeComponent.js +9 -0
- package/lib/module/specs/RNMBXModelLayerNativeComponent.js.map +1 -0
- package/lib/module/specs/RNMBXModelsNativeComponent.js +3 -0
- package/lib/module/specs/RNMBXModelsNativeComponent.js.map +1 -0
- package/lib/module/specs/RNMBXRasterLayerNativeComponent.js +2 -0
- package/lib/module/specs/RNMBXRasterLayerNativeComponent.js.map +1 -1
- package/lib/module/specs/RNMBXSymbolLayerNativeComponent.js +2 -0
- package/lib/module/specs/RNMBXSymbolLayerNativeComponent.js.map +1 -1
- package/lib/module/specs/RNMBXViewportNativeComponent.js +2 -0
- package/lib/module/specs/RNMBXViewportNativeComponent.js.map +1 -1
- package/lib/module/specs/codeparts/CommonLayerNativeComponentsProps.codepart-ts +11 -10
- package/lib/module/utils/MapboxStyles.d.js +5 -0
- package/lib/module/utils/MapboxStyles.d.js.map +1 -1
- package/lib/module/utils/styleMap.js +67 -2
- package/lib/module/utils/styleMap.js.map +1 -1
- package/lib/typescript/src/Mapbox.d.ts +3 -1
- package/lib/typescript/src/Mapbox.d.ts.map +1 -1
- package/lib/typescript/src/components/AbstractLayer.d.ts +9 -4
- package/lib/typescript/src/components/AbstractLayer.d.ts.map +1 -1
- package/lib/typescript/src/components/MapView.d.ts +1 -5
- package/lib/typescript/src/components/MapView.d.ts.map +1 -1
- package/lib/typescript/src/components/ModelLayer.d.ts +77 -0
- package/lib/typescript/src/components/ModelLayer.d.ts.map +1 -0
- package/lib/typescript/src/components/Models.d.ts +15 -0
- package/lib/typescript/src/components/Models.d.ts.map +1 -0
- package/lib/typescript/src/components/Viewport.d.ts +1 -1
- package/lib/typescript/src/specs/RNMBXCircleLayerNativeComponent.d.ts +12 -10
- package/lib/typescript/src/specs/RNMBXCircleLayerNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXFillLayerNativeComponent.d.ts +12 -10
- package/lib/typescript/src/specs/RNMBXFillLayerNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXHeatmapLayerNativeComponent.d.ts +12 -10
- package/lib/typescript/src/specs/RNMBXHeatmapLayerNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXLineLayerNativeComponent.d.ts +12 -10
- package/lib/typescript/src/specs/RNMBXLineLayerNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXModelLayerNativeComponent.d.ts +28 -0
- package/lib/typescript/src/specs/RNMBXModelLayerNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/specs/RNMBXModelsNativeComponent.d.ts +15 -0
- package/lib/typescript/src/specs/RNMBXModelsNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/specs/RNMBXRasterLayerNativeComponent.d.ts +12 -10
- package/lib/typescript/src/specs/RNMBXRasterLayerNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXSymbolLayerNativeComponent.d.ts +12 -10
- package/lib/typescript/src/specs/RNMBXSymbolLayerNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/utils/styleMap.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/Mapbox.ts +3 -0
- package/src/components/AbstractLayer.tsx +11 -5
- package/src/components/ModelLayer.tsx +107 -0
- package/src/components/Models.tsx +44 -0
- package/src/components/Viewport.tsx +1 -1
- package/src/specs/RNMBXCircleLayerNativeComponent.ts +15 -12
- package/src/specs/RNMBXFillLayerNativeComponent.ts +15 -12
- package/src/specs/RNMBXHeatmapLayerNativeComponent.ts +15 -12
- package/src/specs/RNMBXLineLayerNativeComponent.ts +15 -12
- package/src/specs/RNMBXModelLayerNativeComponent.ts +38 -0
- package/src/specs/RNMBXModelsNativeComponent.ts +18 -0
- package/src/specs/RNMBXRasterLayerNativeComponent.ts +15 -12
- package/src/specs/RNMBXSymbolLayerNativeComponent.ts +15 -12
- package/src/specs/codeparts/CommonLayerNativeComponentsProps.codepart-ts +11 -10
- package/src/utils/MapboxStyles.d.ts +526 -63
- package/src/utils/styleMap.ts +69 -2
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { NativeModules } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { FilterExpression, ModelLayerStyleProps } from '../utils/MapboxStyles';
|
|
5
|
+
import { StyleValue } from '../utils/StyleValue';
|
|
6
|
+
import RNMBXModelLayerNativeComponent from '../specs/RNMBXModelLayerNativeComponent';
|
|
7
|
+
|
|
8
|
+
import AbstractLayer from './AbstractLayer';
|
|
9
|
+
|
|
10
|
+
const Mapbox = NativeModules.RNMBXModule;
|
|
11
|
+
|
|
12
|
+
// @{codepart-replace-start(LayerPropsCommon.codepart-tsx)}
|
|
13
|
+
type Slot = 'bottom' | 'middle' | 'top';
|
|
14
|
+
|
|
15
|
+
type LayerPropsCommon = {
|
|
16
|
+
/**
|
|
17
|
+
* A string that uniquely identifies the source in the style to which it is added.
|
|
18
|
+
*/
|
|
19
|
+
id: string;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The id refers to en existing layer in the style. Does not create a new layer.
|
|
23
|
+
*/
|
|
24
|
+
existing?: boolean;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* The source from which to obtain the data to style.
|
|
28
|
+
* If the source has not yet been added to the current style, the behavior is undefined.
|
|
29
|
+
* Inferred from parent source only if the layer is a direct child to it.
|
|
30
|
+
*/
|
|
31
|
+
sourceID?: string;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Identifier of the layer within the source identified by the sourceID property from which the receiver obtains the data to style.
|
|
35
|
+
*/
|
|
36
|
+
sourceLayerID?: string;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Inserts a layer above aboveLayerID.
|
|
40
|
+
*/
|
|
41
|
+
aboveLayerID?: string;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Inserts a layer below belowLayerID
|
|
45
|
+
*/
|
|
46
|
+
belowLayerID?: string;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Inserts a layer at a specified index
|
|
50
|
+
*/
|
|
51
|
+
layerIndex?: number;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Filter only the features in the source layer that satisfy a condition that you define
|
|
55
|
+
*/
|
|
56
|
+
filter?: FilterExpression;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* The minimum zoom level at which the layer gets parsed and appears.
|
|
60
|
+
*/
|
|
61
|
+
minZoomLevel?: number;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* The maximum zoom level at which the layer gets parsed and appears.
|
|
65
|
+
*/
|
|
66
|
+
maxZoomLevel?: number;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The slot this layer is assigned to. If specified, and a slot with that name exists, it will be placed at that position in the layer order.
|
|
70
|
+
*
|
|
71
|
+
* v11 only
|
|
72
|
+
*/
|
|
73
|
+
slot?: Slot;
|
|
74
|
+
};
|
|
75
|
+
// @{codepart-replace-end}
|
|
76
|
+
|
|
77
|
+
export type Props = LayerPropsCommon & {
|
|
78
|
+
/**
|
|
79
|
+
* Customizable style attributes
|
|
80
|
+
*/
|
|
81
|
+
style?: ModelLayerStyleProps;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
type NativeTypeProps = Omit<Props, 'style'> & {
|
|
85
|
+
reactStyle?: { [key: string]: StyleValue };
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* ModelLayer is a style layer that renders one or more stroked polylines on the map.
|
|
90
|
+
*/
|
|
91
|
+
class ModelLayer extends AbstractLayer<Props, NativeTypeProps> {
|
|
92
|
+
static defaultProps = {
|
|
93
|
+
sourceID: Mapbox.StyleSource.DefaultSourceID,
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
render() {
|
|
97
|
+
const props = {
|
|
98
|
+
...this.baseProps,
|
|
99
|
+
sourceLayerID: this.props.sourceLayerID,
|
|
100
|
+
};
|
|
101
|
+
return (
|
|
102
|
+
<RNMBXModelLayerNativeComponent ref={this.setNativeLayer} {...props} />
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export default ModelLayer;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Image } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import NativeModels from '../specs/RNMBXModelsNativeComponent';
|
|
5
|
+
|
|
6
|
+
type Props = {
|
|
7
|
+
/**
|
|
8
|
+
* pair odf model name to gltf and gbl file path/url, or asset id.
|
|
9
|
+
*/
|
|
10
|
+
models: { [key: string]: string | number };
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
type Asset = {
|
|
14
|
+
__packager_asset?: boolean;
|
|
15
|
+
uri?: string;
|
|
16
|
+
url?: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
function _resolveAssets(models: Props['models']): {
|
|
20
|
+
[key: string]: Asset;
|
|
21
|
+
} {
|
|
22
|
+
const resolvedModels: { [key: string]: Asset } = {};
|
|
23
|
+
Object.keys(models).forEach((key) => {
|
|
24
|
+
const model = models[key];
|
|
25
|
+
if (typeof model === 'string') {
|
|
26
|
+
resolvedModels[key] = { url: model };
|
|
27
|
+
} else {
|
|
28
|
+
const asset = Image.resolveAssetSource(model);
|
|
29
|
+
if (!asset) {
|
|
30
|
+
throw new Error(`Could not resolve model asset: ${model}`);
|
|
31
|
+
}
|
|
32
|
+
resolvedModels[key] = asset;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
return resolvedModels;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Name of 3D model assets to be used in the map
|
|
40
|
+
*/
|
|
41
|
+
export default function Models(props: Props) {
|
|
42
|
+
const { models, ...restOfProps } = props;
|
|
43
|
+
return <NativeModels {...restOfProps} models={_resolveAssets(models)} />;
|
|
44
|
+
}
|
|
@@ -41,7 +41,7 @@ type FollowPuckOptions = {
|
|
|
41
41
|
* - number: sets the camera bearing to the constant value on every frame
|
|
42
42
|
*
|
|
43
43
|
* On Android, 'heading' and 'coruse' sets the camera bearing to the same as the location puck's bearing. See
|
|
44
|
-
* [syncWithLocationPuck](https://docs.mapbox.com/android/maps/api/11.0.0
|
|
44
|
+
* [syncWithLocationPuck](https://docs.mapbox.com/android/maps/api/11.0.0/mapbox-maps-android/com.mapbox.maps.plugin.viewport.data/-follow-puck-viewport-state-bearing/-sync-with-location-puck/)
|
|
45
45
|
*
|
|
46
46
|
* @default 'heading'
|
|
47
47
|
*/
|
|
@@ -2,25 +2,28 @@ import type { HostComponent, ViewProps } from 'react-native';
|
|
|
2
2
|
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
3
3
|
import { Double, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
|
|
4
4
|
|
|
5
|
+
import { FilterExpression } from '../utils/MapboxStyles';
|
|
6
|
+
|
|
5
7
|
import type { UnsafeMixed } from './codegenUtils';
|
|
6
8
|
|
|
7
9
|
// @{codepart-replace-start(CommonLayerNativeComponentsProps.codepart-ts)}
|
|
8
10
|
// see https://github.com/rnmapbox/maps/wiki/FabricOptionalProp
|
|
9
11
|
type OptionalProp<T> = UnsafeMixed<T>;
|
|
12
|
+
type Slot = 'bottom' | 'middle' | 'top';
|
|
10
13
|
|
|
11
14
|
type CommonProps = {
|
|
12
|
-
sourceID
|
|
13
|
-
existing
|
|
14
|
-
filter
|
|
15
|
-
|
|
16
|
-
aboveLayerID
|
|
17
|
-
belowLayerID
|
|
18
|
-
layerIndex
|
|
19
|
-
|
|
20
|
-
maxZoomLevel
|
|
21
|
-
minZoomLevel
|
|
22
|
-
sourceLayerID
|
|
23
|
-
slot
|
|
15
|
+
sourceID?: OptionalProp<string>;
|
|
16
|
+
existing?: OptionalProp<boolean>;
|
|
17
|
+
filter?: UnsafeMixed<FilterExpression>;
|
|
18
|
+
|
|
19
|
+
aboveLayerID?: OptionalProp<string>;
|
|
20
|
+
belowLayerID?: OptionalProp<string>;
|
|
21
|
+
layerIndex?: OptionalProp<Int32>;
|
|
22
|
+
|
|
23
|
+
maxZoomLevel?: OptionalProp<Double>;
|
|
24
|
+
minZoomLevel?: OptionalProp<Double>;
|
|
25
|
+
sourceLayerID?: OptionalProp<string>;
|
|
26
|
+
slot?: OptionalProp<Slot>;
|
|
24
27
|
};
|
|
25
28
|
// @{codepart-replace-end}
|
|
26
29
|
|
|
@@ -2,25 +2,28 @@ import type { HostComponent, ViewProps } from 'react-native';
|
|
|
2
2
|
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
3
3
|
import { Double, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
|
|
4
4
|
|
|
5
|
+
import { FilterExpression } from '../utils/MapboxStyles';
|
|
6
|
+
|
|
5
7
|
import type { UnsafeMixed } from './codegenUtils';
|
|
6
8
|
|
|
7
9
|
// @{codepart-replace-start(CommonLayerNativeComponentsProps.codepart-ts)}
|
|
8
10
|
// see https://github.com/rnmapbox/maps/wiki/FabricOptionalProp
|
|
9
11
|
type OptionalProp<T> = UnsafeMixed<T>;
|
|
12
|
+
type Slot = 'bottom' | 'middle' | 'top';
|
|
10
13
|
|
|
11
14
|
type CommonProps = {
|
|
12
|
-
sourceID
|
|
13
|
-
existing
|
|
14
|
-
filter
|
|
15
|
-
|
|
16
|
-
aboveLayerID
|
|
17
|
-
belowLayerID
|
|
18
|
-
layerIndex
|
|
19
|
-
|
|
20
|
-
maxZoomLevel
|
|
21
|
-
minZoomLevel
|
|
22
|
-
sourceLayerID
|
|
23
|
-
slot
|
|
15
|
+
sourceID?: OptionalProp<string>;
|
|
16
|
+
existing?: OptionalProp<boolean>;
|
|
17
|
+
filter?: UnsafeMixed<FilterExpression>;
|
|
18
|
+
|
|
19
|
+
aboveLayerID?: OptionalProp<string>;
|
|
20
|
+
belowLayerID?: OptionalProp<string>;
|
|
21
|
+
layerIndex?: OptionalProp<Int32>;
|
|
22
|
+
|
|
23
|
+
maxZoomLevel?: OptionalProp<Double>;
|
|
24
|
+
minZoomLevel?: OptionalProp<Double>;
|
|
25
|
+
sourceLayerID?: OptionalProp<string>;
|
|
26
|
+
slot?: OptionalProp<Slot>;
|
|
24
27
|
};
|
|
25
28
|
// @{codepart-replace-end}
|
|
26
29
|
|
|
@@ -2,25 +2,28 @@ import type { HostComponent, ViewProps } from 'react-native';
|
|
|
2
2
|
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
3
3
|
import { Double, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
|
|
4
4
|
|
|
5
|
+
import { FilterExpression } from '../utils/MapboxStyles';
|
|
6
|
+
|
|
5
7
|
import type { UnsafeMixed } from './codegenUtils';
|
|
6
8
|
|
|
7
9
|
// @{codepart-replace-start(CommonLayerNativeComponentsProps.codepart-ts)}
|
|
8
10
|
// see https://github.com/rnmapbox/maps/wiki/FabricOptionalProp
|
|
9
11
|
type OptionalProp<T> = UnsafeMixed<T>;
|
|
12
|
+
type Slot = 'bottom' | 'middle' | 'top';
|
|
10
13
|
|
|
11
14
|
type CommonProps = {
|
|
12
|
-
sourceID
|
|
13
|
-
existing
|
|
14
|
-
filter
|
|
15
|
-
|
|
16
|
-
aboveLayerID
|
|
17
|
-
belowLayerID
|
|
18
|
-
layerIndex
|
|
19
|
-
|
|
20
|
-
maxZoomLevel
|
|
21
|
-
minZoomLevel
|
|
22
|
-
sourceLayerID
|
|
23
|
-
slot
|
|
15
|
+
sourceID?: OptionalProp<string>;
|
|
16
|
+
existing?: OptionalProp<boolean>;
|
|
17
|
+
filter?: UnsafeMixed<FilterExpression>;
|
|
18
|
+
|
|
19
|
+
aboveLayerID?: OptionalProp<string>;
|
|
20
|
+
belowLayerID?: OptionalProp<string>;
|
|
21
|
+
layerIndex?: OptionalProp<Int32>;
|
|
22
|
+
|
|
23
|
+
maxZoomLevel?: OptionalProp<Double>;
|
|
24
|
+
minZoomLevel?: OptionalProp<Double>;
|
|
25
|
+
sourceLayerID?: OptionalProp<string>;
|
|
26
|
+
slot?: OptionalProp<Slot>;
|
|
24
27
|
};
|
|
25
28
|
// @{codepart-replace-end}
|
|
26
29
|
|
|
@@ -2,25 +2,28 @@ import type { HostComponent, ViewProps } from 'react-native';
|
|
|
2
2
|
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
3
3
|
import { Double, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
|
|
4
4
|
|
|
5
|
+
import { FilterExpression } from '../utils/MapboxStyles';
|
|
6
|
+
|
|
5
7
|
import type { UnsafeMixed } from './codegenUtils';
|
|
6
8
|
|
|
7
9
|
// @{codepart-replace-start(CommonLayerNativeComponentsProps.codepart-ts)}
|
|
8
10
|
// see https://github.com/rnmapbox/maps/wiki/FabricOptionalProp
|
|
9
11
|
type OptionalProp<T> = UnsafeMixed<T>;
|
|
12
|
+
type Slot = 'bottom' | 'middle' | 'top';
|
|
10
13
|
|
|
11
14
|
type CommonProps = {
|
|
12
|
-
sourceID
|
|
13
|
-
existing
|
|
14
|
-
filter
|
|
15
|
-
|
|
16
|
-
aboveLayerID
|
|
17
|
-
belowLayerID
|
|
18
|
-
layerIndex
|
|
19
|
-
|
|
20
|
-
maxZoomLevel
|
|
21
|
-
minZoomLevel
|
|
22
|
-
sourceLayerID
|
|
23
|
-
slot
|
|
15
|
+
sourceID?: OptionalProp<string>;
|
|
16
|
+
existing?: OptionalProp<boolean>;
|
|
17
|
+
filter?: UnsafeMixed<FilterExpression>;
|
|
18
|
+
|
|
19
|
+
aboveLayerID?: OptionalProp<string>;
|
|
20
|
+
belowLayerID?: OptionalProp<string>;
|
|
21
|
+
layerIndex?: OptionalProp<Int32>;
|
|
22
|
+
|
|
23
|
+
maxZoomLevel?: OptionalProp<Double>;
|
|
24
|
+
minZoomLevel?: OptionalProp<Double>;
|
|
25
|
+
sourceLayerID?: OptionalProp<string>;
|
|
26
|
+
slot?: OptionalProp<Slot>;
|
|
24
27
|
};
|
|
25
28
|
// @{codepart-replace-end}
|
|
26
29
|
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
2
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
3
|
+
import { Double, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
|
|
4
|
+
|
|
5
|
+
import { FilterExpression } from '../utils/MapboxStyles';
|
|
6
|
+
import { StyleValue } from '../utils/StyleValue';
|
|
7
|
+
|
|
8
|
+
import { UnsafeMixed } from './codegenUtils';
|
|
9
|
+
|
|
10
|
+
// @{codepart-replace-start(CommonLayerNativeComponentsProps.codepart-ts)}
|
|
11
|
+
// see https://github.com/rnmapbox/maps/wiki/FabricOptionalProp
|
|
12
|
+
type OptionalProp<T> = UnsafeMixed<T>;
|
|
13
|
+
type Slot = 'bottom' | 'middle' | 'top';
|
|
14
|
+
|
|
15
|
+
type CommonProps = {
|
|
16
|
+
sourceID?: OptionalProp<string>;
|
|
17
|
+
existing?: OptionalProp<boolean>;
|
|
18
|
+
filter?: UnsafeMixed<FilterExpression>;
|
|
19
|
+
|
|
20
|
+
aboveLayerID?: OptionalProp<string>;
|
|
21
|
+
belowLayerID?: OptionalProp<string>;
|
|
22
|
+
layerIndex?: OptionalProp<Int32>;
|
|
23
|
+
|
|
24
|
+
maxZoomLevel?: OptionalProp<Double>;
|
|
25
|
+
minZoomLevel?: OptionalProp<Double>;
|
|
26
|
+
sourceLayerID?: OptionalProp<string>;
|
|
27
|
+
slot?: OptionalProp<Slot>;
|
|
28
|
+
};
|
|
29
|
+
// @{codepart-replace-end}
|
|
30
|
+
|
|
31
|
+
export interface NativeProps extends ViewProps, CommonProps {
|
|
32
|
+
id: OptionalProp<string>;
|
|
33
|
+
reactStyle?: UnsafeMixed<{ [key: string]: StyleValue }>;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export default codegenNativeComponent<NativeProps>(
|
|
37
|
+
'RNMBXModelLayer',
|
|
38
|
+
) as HostComponent<NativeProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
2
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
3
|
+
|
|
4
|
+
import { UnsafeMixed } from './codegenUtils';
|
|
5
|
+
|
|
6
|
+
type Asset = {
|
|
7
|
+
__packager_asset?: boolean;
|
|
8
|
+
uri?: string;
|
|
9
|
+
url?: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export interface NativeProps extends ViewProps {
|
|
13
|
+
models: UnsafeMixed<{ [key: string]: Asset }>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default codegenNativeComponent<NativeProps>(
|
|
17
|
+
'RNMBXModels',
|
|
18
|
+
) as HostComponent<NativeProps>;
|
|
@@ -2,25 +2,28 @@ import type { HostComponent, ViewProps } from 'react-native';
|
|
|
2
2
|
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
3
3
|
import { Double, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
|
|
4
4
|
|
|
5
|
+
import { FilterExpression } from '../utils/MapboxStyles';
|
|
6
|
+
|
|
5
7
|
import type { UnsafeMixed } from './codegenUtils';
|
|
6
8
|
|
|
7
9
|
// @{codepart-replace-start(CommonLayerNativeComponentsProps.codepart-ts)}
|
|
8
10
|
// see https://github.com/rnmapbox/maps/wiki/FabricOptionalProp
|
|
9
11
|
type OptionalProp<T> = UnsafeMixed<T>;
|
|
12
|
+
type Slot = 'bottom' | 'middle' | 'top';
|
|
10
13
|
|
|
11
14
|
type CommonProps = {
|
|
12
|
-
sourceID
|
|
13
|
-
existing
|
|
14
|
-
filter
|
|
15
|
-
|
|
16
|
-
aboveLayerID
|
|
17
|
-
belowLayerID
|
|
18
|
-
layerIndex
|
|
19
|
-
|
|
20
|
-
maxZoomLevel
|
|
21
|
-
minZoomLevel
|
|
22
|
-
sourceLayerID
|
|
23
|
-
slot
|
|
15
|
+
sourceID?: OptionalProp<string>;
|
|
16
|
+
existing?: OptionalProp<boolean>;
|
|
17
|
+
filter?: UnsafeMixed<FilterExpression>;
|
|
18
|
+
|
|
19
|
+
aboveLayerID?: OptionalProp<string>;
|
|
20
|
+
belowLayerID?: OptionalProp<string>;
|
|
21
|
+
layerIndex?: OptionalProp<Int32>;
|
|
22
|
+
|
|
23
|
+
maxZoomLevel?: OptionalProp<Double>;
|
|
24
|
+
minZoomLevel?: OptionalProp<Double>;
|
|
25
|
+
sourceLayerID?: OptionalProp<string>;
|
|
26
|
+
slot?: OptionalProp<Slot>;
|
|
24
27
|
};
|
|
25
28
|
// @{codepart-replace-end}
|
|
26
29
|
|
|
@@ -2,25 +2,28 @@ import type { HostComponent, ViewProps } from 'react-native';
|
|
|
2
2
|
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
3
3
|
import { Double, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
|
|
4
4
|
|
|
5
|
+
import { FilterExpression } from '../utils/MapboxStyles';
|
|
6
|
+
|
|
5
7
|
import type { UnsafeMixed } from './codegenUtils';
|
|
6
8
|
|
|
7
9
|
// @{codepart-replace-start(CommonLayerNativeComponentsProps.codepart-ts)}
|
|
8
10
|
// see https://github.com/rnmapbox/maps/wiki/FabricOptionalProp
|
|
9
11
|
type OptionalProp<T> = UnsafeMixed<T>;
|
|
12
|
+
type Slot = 'bottom' | 'middle' | 'top';
|
|
10
13
|
|
|
11
14
|
type CommonProps = {
|
|
12
|
-
sourceID
|
|
13
|
-
existing
|
|
14
|
-
filter
|
|
15
|
-
|
|
16
|
-
aboveLayerID
|
|
17
|
-
belowLayerID
|
|
18
|
-
layerIndex
|
|
19
|
-
|
|
20
|
-
maxZoomLevel
|
|
21
|
-
minZoomLevel
|
|
22
|
-
sourceLayerID
|
|
23
|
-
slot
|
|
15
|
+
sourceID?: OptionalProp<string>;
|
|
16
|
+
existing?: OptionalProp<boolean>;
|
|
17
|
+
filter?: UnsafeMixed<FilterExpression>;
|
|
18
|
+
|
|
19
|
+
aboveLayerID?: OptionalProp<string>;
|
|
20
|
+
belowLayerID?: OptionalProp<string>;
|
|
21
|
+
layerIndex?: OptionalProp<Int32>;
|
|
22
|
+
|
|
23
|
+
maxZoomLevel?: OptionalProp<Double>;
|
|
24
|
+
minZoomLevel?: OptionalProp<Double>;
|
|
25
|
+
sourceLayerID?: OptionalProp<string>;
|
|
26
|
+
slot?: OptionalProp<Slot>;
|
|
24
27
|
};
|
|
25
28
|
// @{codepart-replace-end}
|
|
26
29
|
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
// see https://github.com/rnmapbox/maps/wiki/FabricOptionalProp
|
|
2
2
|
type OptionalProp<T> = UnsafeMixed<T>;
|
|
3
|
+
type Slot = 'bottom' | 'middle' | 'top';
|
|
3
4
|
|
|
4
5
|
type CommonProps = {
|
|
5
|
-
sourceID
|
|
6
|
-
existing
|
|
7
|
-
filter
|
|
6
|
+
sourceID?: OptionalProp<string>;
|
|
7
|
+
existing?: OptionalProp<boolean>;
|
|
8
|
+
filter?: UnsafeMixed<FilterExpression>;
|
|
8
9
|
|
|
9
|
-
aboveLayerID
|
|
10
|
-
belowLayerID
|
|
11
|
-
layerIndex
|
|
10
|
+
aboveLayerID?: OptionalProp<string>;
|
|
11
|
+
belowLayerID?: OptionalProp<string>;
|
|
12
|
+
layerIndex?: OptionalProp<Int32>;
|
|
12
13
|
|
|
13
|
-
maxZoomLevel
|
|
14
|
-
minZoomLevel
|
|
15
|
-
sourceLayerID
|
|
16
|
-
slot
|
|
14
|
+
maxZoomLevel?: OptionalProp<Double>;
|
|
15
|
+
minZoomLevel?: OptionalProp<Double>;
|
|
16
|
+
sourceLayerID?: OptionalProp<string>;
|
|
17
|
+
slot?: OptionalProp<Slot>;
|
|
17
18
|
};
|