@rnmapbox/maps 10.1.0-beta.14 → 10.1.0-beta.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +2 -1
- package/android/src/main/AndroidManifest.xml +1 -1
- package/android/src/main/java/com/rnmapbox/rnmbx/RNMBXPackage.kt +25 -6
- package/android/src/main/java/com/rnmapbox/rnmbx/components/annotation/RNMBXCalloutManager.kt +33 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/annotation/RNMBXMarkerViewManager.kt +24 -10
- package/android/src/main/java/com/rnmapbox/rnmbx/components/annotation/RNMBXPointAnnotation.kt +5 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/annotation/RNMBXPointAnnotationManager.kt +83 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/annotation/RNMBXPointAnnotationModule.kt +33 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImage.kt +5 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImageManager.kt +25 -22
- package/android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImageModule.kt +33 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImagesManager.kt +9 -8
- package/android/src/main/java/com/rnmapbox/rnmbx/components/location/RNMBXNativeUserLocationManager.kt +11 -4
- package/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapView.kt +140 -63
- package/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapViewManager.kt +71 -55
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/atmosphere/RNMBXAtmosphereManager.kt +0 -5
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/light/RNMBXLightManager.kt +27 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXImageSourceManager.kt +16 -8
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXRasterDemSourceManager.kt +15 -1
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXRasterSourceManager.kt +11 -3
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXShapeSource.kt +5 -2
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXShapeSourceManager.kt +45 -32
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXSource.kt +1 -1
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXTileSourceManager.kt +17 -17
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXVectorSourceManager.kt +13 -32
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/terrain/RNMBXTerrainManager.kt +8 -11
- package/android/src/main/java/com/rnmapbox/rnmbx/utils/PropertyChanges.kt +68 -0
- package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXCalloutManagerDelegate.java +25 -0
- package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXCalloutManagerInterface.java +16 -0
- package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXImageManagerDelegate.java +47 -0
- package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXImageManagerInterface.java +22 -0
- package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXImagesManagerDelegate.java +38 -0
- package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXImagesManagerInterface.java +19 -0
- package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXLightManagerDelegate.java +32 -0
- package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXLightManagerInterface.java +17 -0
- package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXMapViewManagerDelegate.java +3 -0
- package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXMapViewManagerInterface.java +1 -0
- package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXMarkerViewManagerDelegate.java +41 -0
- package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXMarkerViewManagerInterface.java +20 -0
- package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXNativeUserLocationManagerDelegate.java +35 -0
- package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXNativeUserLocationManagerInterface.java +18 -0
- package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXPointAnnotationManagerDelegate.java +41 -0
- package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXPointAnnotationManagerInterface.java +20 -0
- package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXShapeSourceManagerDelegate.java +0 -6
- package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXShapeSourceManagerInterface.java +0 -2
- package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXTerrainManagerDelegate.java +35 -0
- package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXTerrainManagerInterface.java +18 -0
- package/android/src/main/old-arch/com/rnmapbox/rnmbx/NativeRNMBXImageModuleSpec.java +40 -0
- package/android/src/main/old-arch/com/rnmapbox/rnmbx/NativeRNMBXPointAnnotationModuleSpec.java +40 -0
- package/ios/RNMBX/RNMBXAtmosphereComponentView.mm +3 -1
- package/ios/RNMBX/RNMBXBackgroundLayerComponentView.mm +1 -1
- package/ios/RNMBX/RNMBXCallout.swift +1 -1
- package/ios/RNMBX/RNMBXCalloutComponentView.h +15 -0
- package/ios/RNMBX/RNMBXCalloutComponentView.mm +57 -0
- package/ios/RNMBX/{RNMBXCalloutManager.m → RNMBXCalloutViewManager.m} +1 -1
- package/ios/RNMBX/{RNMBXCalloutManager.swift → RNMBXCalloutViewManager.swift} +2 -2
- package/ios/RNMBX/RNMBXCamera.swift +4 -4
- package/ios/RNMBX/RNMBXCameraComponentView.mm +1 -1
- package/ios/RNMBX/RNMBXCircleLayerComponentView.mm +1 -1
- package/ios/RNMBX/RNMBXFabricHelpers.h +1 -8
- package/ios/RNMBX/RNMBXFillExtrusionLayerComponentView.mm +1 -1
- package/ios/RNMBX/RNMBXFillLayerComponentView.mm +1 -1
- package/ios/RNMBX/RNMBXHeatmapLayerComponentView.mm +1 -1
- package/ios/RNMBX/RNMBXImage.swift +30 -22
- package/ios/RNMBX/RNMBXImageComponentView.h +15 -0
- package/ios/RNMBX/RNMBXImageComponentView.mm +100 -0
- package/ios/RNMBX/RNMBXImageManager.swift +0 -1
- package/ios/RNMBX/RNMBXImageModule.h +17 -0
- package/ios/RNMBX/RNMBXImageModule.mm +67 -0
- package/ios/RNMBX/RNMBXImageSourceComponentView.mm +1 -1
- package/ios/RNMBX/RNMBXImages.swift +9 -9
- package/ios/RNMBX/RNMBXImagesComponentView.h +15 -0
- package/ios/RNMBX/RNMBXImagesComponentView.mm +91 -0
- package/ios/RNMBX/{RNMBXImagesManager.m → RNMBXImagesViewManager.m} +1 -2
- package/ios/RNMBX/{RNMBXImagesManager.swift → RNMBXImagesViewManager.swift} +2 -2
- package/ios/RNMBX/RNMBXLight.swift +7 -7
- package/ios/RNMBX/RNMBXLightComponentView.h +15 -0
- package/ios/RNMBX/RNMBXLightComponentView.mm +68 -0
- package/ios/RNMBX/{RNMBXLightManager.m → RNMBXLightViewManager.m} +1 -1
- package/ios/RNMBX/{RNMBXLightManager.swift → RNMBXLightViewManager.swift} +2 -2
- package/ios/RNMBX/RNMBXLineLayerComponentView.mm +1 -1
- package/ios/RNMBX/RNMBXMapView.swift +326 -136
- package/ios/RNMBX/RNMBXMapViewComponentView.mm +1 -2
- package/ios/RNMBX/RNMBXMarkerView.swift +24 -17
- package/ios/RNMBX/RNMBXMarkerViewComponentView.h +15 -0
- package/ios/RNMBX/RNMBXMarkerViewComponentView.mm +130 -0
- package/ios/RNMBX/RNMBXNativeUserLocation.swift +12 -10
- package/ios/RNMBX/RNMBXNativeUserLocationComponentView.h +15 -0
- package/ios/RNMBX/RNMBXNativeUserLocationComponentView.mm +72 -0
- package/ios/RNMBX/{RNMBXNativeUserLocationManager.m → RNMBXNativeUserLocationViewManager.m} +1 -1
- package/ios/RNMBX/{RNMBXNativeUserLocationManager.swift → RNMBXNativeUserLocationViewManager.swift} +2 -2
- package/ios/RNMBX/RNMBXPointAnnotation.swift +41 -30
- package/ios/RNMBX/RNMBXPointAnnotationComponentView.h +15 -0
- package/ios/RNMBX/RNMBXPointAnnotationComponentView.mm +147 -0
- package/ios/RNMBX/RNMBXPointAnnotationModule.h +17 -0
- package/ios/RNMBX/RNMBXPointAnnotationModule.mm +66 -0
- package/ios/RNMBX/{RNMBXPointAnnotationManager.m → RNMBXPointAnnotationViewManager.m} +1 -6
- package/ios/RNMBX/RNMBXPointAnnotationViewManager.swift +14 -0
- package/ios/RNMBX/RNMBXRasterDemSourceComponentView.h +1 -3
- package/ios/RNMBX/RNMBXRasterDemSourceComponentView.mm +1 -3
- package/ios/RNMBX/RNMBXRasterLayerComponentView.mm +1 -1
- package/ios/RNMBX/RNMBXRasterSourceComponentView.h +1 -3
- package/ios/RNMBX/RNMBXRasterSourceComponentView.mm +1 -3
- package/ios/RNMBX/RNMBXShapeSourceComponentView.h +1 -3
- package/ios/RNMBX/RNMBXShapeSourceComponentView.mm +5 -7
- package/ios/RNMBX/RNMBXShapeSourceModule.mm +1 -9
- package/ios/RNMBX/RNMBXSingletonLayer.swift +1 -1
- package/ios/RNMBX/RNMBXSkyLayerComponentView.mm +1 -1
- package/ios/RNMBX/RNMBXSymbolLayerComponentView.mm +1 -1
- package/ios/RNMBX/RNMBXTerrain.swift +2 -2
- package/ios/RNMBX/RNMBXTerrainComponentView.h +15 -0
- package/ios/RNMBX/RNMBXTerrainComponentView.mm +78 -0
- package/ios/RNMBX/{RNMBXTerrainManager.m → RNMBXTerrainViewManager.m} +1 -1
- package/ios/RNMBX/{RNMBXTerrainManager.swift → RNMBXTerrainViewManager.swift} +2 -2
- package/ios/RNMBX/RNMBXVectorSourceComponentView.h +1 -3
- package/ios/RNMBX/RNMBXVectorSourceComponentView.mm +1 -3
- package/ios/RNMBX/Uitls/PropertyChanges.swift +58 -0
- package/ios/RNMBX/rnmapbox_maps-Swift.pre.h +0 -2
- package/lib/commonjs/components/Callout.js +3 -4
- package/lib/commonjs/components/Callout.js.map +1 -1
- package/lib/commonjs/components/Image.js +20 -4
- package/lib/commonjs/components/Image.js.map +1 -1
- package/lib/commonjs/components/Images.js +6 -3
- package/lib/commonjs/components/Images.js.map +1 -1
- package/lib/commonjs/components/Light.js +5 -5
- package/lib/commonjs/components/Light.js.map +1 -1
- package/lib/commonjs/components/MapView.js +12 -49
- package/lib/commonjs/components/MapView.js.map +1 -1
- package/lib/commonjs/components/MarkerView.js +2 -1
- package/lib/commonjs/components/MarkerView.js.map +1 -1
- package/lib/commonjs/components/NativeBridgeComponent.js +6 -43
- package/lib/commonjs/components/NativeBridgeComponent.js.map +1 -1
- package/lib/commonjs/components/NativeUserLocation.js +3 -4
- package/lib/commonjs/components/NativeUserLocation.js.map +1 -1
- package/lib/commonjs/components/PointAnnotation.js +29 -14
- package/lib/commonjs/components/PointAnnotation.js.map +1 -1
- package/lib/commonjs/components/ShapeSource.js +7 -18
- package/lib/commonjs/components/ShapeSource.js.map +1 -1
- package/lib/commonjs/components/Terrain.js +4 -5
- package/lib/commonjs/components/Terrain.js.map +1 -1
- package/lib/commonjs/components/VectorSource.js +2 -11
- package/lib/commonjs/components/VectorSource.js.map +1 -1
- package/lib/commonjs/specs/NativeRNMBXImageModule.js +10 -0
- package/lib/commonjs/specs/NativeRNMBXImageModule.js.map +1 -0
- package/lib/commonjs/specs/NativeRNMBXPointAnnotationModule.js +10 -0
- package/lib/commonjs/specs/NativeRNMBXPointAnnotationModule.js.map +1 -0
- package/lib/commonjs/specs/RNMBXCalloutNativeComponent.js +11 -0
- package/lib/commonjs/specs/RNMBXCalloutNativeComponent.js.map +1 -0
- package/lib/commonjs/specs/{RNMBXAndroidTextureMapViewNativeComponent.js → RNMBXImageNativeComponent.js} +2 -4
- package/lib/commonjs/specs/RNMBXImageNativeComponent.js.map +1 -0
- package/lib/commonjs/specs/RNMBXImagesNativeComponent.js +10 -0
- package/lib/commonjs/specs/RNMBXImagesNativeComponent.js.map +1 -0
- package/lib/commonjs/specs/RNMBXLightNativeComponent.js +10 -0
- package/lib/commonjs/specs/RNMBXLightNativeComponent.js.map +1 -0
- package/lib/commonjs/specs/RNMBXMapViewNativeComponent.js +1 -1
- package/lib/commonjs/specs/RNMBXMapViewNativeComponent.js.map +1 -1
- package/lib/commonjs/specs/RNMBXMarkerViewNativeComponent.js +10 -0
- package/lib/commonjs/specs/RNMBXMarkerViewNativeComponent.js.map +1 -0
- package/lib/commonjs/specs/RNMBXNativeUserLocationNativeComponent.js +10 -0
- package/lib/commonjs/specs/RNMBXNativeUserLocationNativeComponent.js.map +1 -0
- package/lib/commonjs/specs/RNMBXPointAnnotationNativeComponent.js +10 -0
- package/lib/commonjs/specs/RNMBXPointAnnotationNativeComponent.js.map +1 -0
- package/lib/commonjs/specs/RNMBXShapeSourceNativeComponent.js.map +1 -1
- package/lib/commonjs/specs/RNMBXTerrainNativeComponent.js +10 -0
- package/lib/commonjs/specs/RNMBXTerrainNativeComponent.js.map +1 -0
- package/lib/commonjs/utils/index.js +6 -30
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/module/components/Callout.js +3 -4
- package/lib/module/components/Callout.js.map +1 -1
- package/lib/module/components/Image.js +19 -4
- package/lib/module/components/Image.js.map +1 -1
- package/lib/module/components/Images.js +7 -4
- package/lib/module/components/Images.js.map +1 -1
- package/lib/module/components/Light.js +4 -4
- package/lib/module/components/Light.js.map +1 -1
- package/lib/module/components/MapView.js +12 -49
- package/lib/module/components/MapView.js.map +1 -1
- package/lib/module/components/MarkerView.js +3 -2
- package/lib/module/components/MarkerView.js.map +1 -1
- package/lib/module/components/NativeBridgeComponent.js +7 -44
- package/lib/module/components/NativeBridgeComponent.js.map +1 -1
- package/lib/module/components/NativeUserLocation.js +2 -4
- package/lib/module/components/NativeUserLocation.js.map +1 -1
- package/lib/module/components/PointAnnotation.js +30 -15
- package/lib/module/components/PointAnnotation.js.map +1 -1
- package/lib/module/components/ShapeSource.js +7 -18
- package/lib/module/components/ShapeSource.js.map +1 -1
- package/lib/module/components/Terrain.js +2 -4
- package/lib/module/components/Terrain.js.map +1 -1
- package/lib/module/components/VectorSource.js +2 -11
- package/lib/module/components/VectorSource.js.map +1 -1
- package/lib/module/specs/NativeRNMBXImageModule.js +5 -0
- package/lib/module/specs/NativeRNMBXImageModule.js.map +1 -0
- package/lib/module/specs/NativeRNMBXPointAnnotationModule.js +5 -0
- package/lib/module/specs/NativeRNMBXPointAnnotationModule.js.map +1 -0
- package/lib/module/specs/RNMBXCalloutNativeComponent.js +6 -0
- package/lib/module/specs/RNMBXCalloutNativeComponent.js.map +1 -0
- package/lib/module/specs/RNMBXImageNativeComponent.js +3 -0
- package/lib/module/specs/RNMBXImageNativeComponent.js.map +1 -0
- package/lib/module/specs/RNMBXImagesNativeComponent.js +3 -0
- package/lib/module/specs/RNMBXImagesNativeComponent.js.map +1 -0
- package/lib/module/specs/RNMBXLightNativeComponent.js +3 -0
- package/lib/module/specs/RNMBXLightNativeComponent.js.map +1 -0
- package/lib/module/specs/RNMBXMapViewNativeComponent.js +2 -0
- package/lib/module/specs/RNMBXMapViewNativeComponent.js.map +1 -1
- package/lib/module/specs/RNMBXMarkerViewNativeComponent.js +3 -0
- package/lib/module/specs/RNMBXMarkerViewNativeComponent.js.map +1 -0
- package/lib/module/specs/RNMBXNativeUserLocationNativeComponent.js +3 -0
- package/lib/module/specs/RNMBXNativeUserLocationNativeComponent.js.map +1 -0
- package/lib/module/specs/RNMBXPointAnnotationNativeComponent.js +3 -0
- package/lib/module/specs/RNMBXPointAnnotationNativeComponent.js.map +1 -0
- package/lib/module/specs/RNMBXShapeSourceNativeComponent.js.map +1 -1
- package/lib/module/specs/RNMBXTerrainNativeComponent.js +3 -0
- package/lib/module/specs/RNMBXTerrainNativeComponent.js.map +1 -0
- package/lib/module/utils/index.js +6 -29
- package/lib/module/utils/index.js.map +1 -1
- package/lib/typescript/src/components/Callout.d.ts +0 -1
- package/lib/typescript/src/components/Callout.d.ts.map +1 -1
- package/lib/typescript/src/components/Image.d.ts +0 -1
- package/lib/typescript/src/components/Image.d.ts.map +1 -1
- package/lib/typescript/src/components/Images.d.ts +0 -1
- package/lib/typescript/src/components/Images.d.ts.map +1 -1
- package/lib/typescript/src/components/Light.d.ts +0 -1
- package/lib/typescript/src/components/Light.d.ts.map +1 -1
- package/lib/typescript/src/components/MapView.d.ts +21 -28
- package/lib/typescript/src/components/MapView.d.ts.map +1 -1
- package/lib/typescript/src/components/MarkerView.d.ts.map +1 -1
- package/lib/typescript/src/components/NativeBridgeComponent.d.ts +5 -9
- package/lib/typescript/src/components/NativeBridgeComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/NativeUserLocation.d.ts.map +1 -1
- package/lib/typescript/src/components/PointAnnotation.d.ts +5 -11
- package/lib/typescript/src/components/PointAnnotation.d.ts.map +1 -1
- package/lib/typescript/src/components/ShapeSource.d.ts +40 -2
- package/lib/typescript/src/components/ShapeSource.d.ts.map +1 -1
- package/lib/typescript/src/components/Terrain.d.ts +0 -1
- package/lib/typescript/src/components/Terrain.d.ts.map +1 -1
- package/lib/typescript/src/components/VectorSource.d.ts +1 -2
- package/lib/typescript/src/components/VectorSource.d.ts.map +1 -1
- package/lib/typescript/src/specs/NativeRNMBXImageModule.d.ts +9 -0
- package/lib/typescript/src/specs/NativeRNMBXImageModule.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativeRNMBXPointAnnotationModule.d.ts +9 -0
- package/lib/typescript/src/specs/NativeRNMBXPointAnnotationModule.d.ts.map +1 -0
- package/lib/typescript/src/specs/RNMBXCalloutNativeComponent.d.ts +6 -0
- package/lib/typescript/src/specs/RNMBXCalloutNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/specs/RNMBXImageNativeComponent.d.ts +14 -0
- package/lib/typescript/src/specs/RNMBXImageNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/specs/RNMBXImagesNativeComponent.d.ts +18 -0
- package/lib/typescript/src/specs/RNMBXImagesNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/specs/RNMBXLightNativeComponent.d.ts +8 -0
- package/lib/typescript/src/specs/RNMBXLightNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/specs/RNMBXMapViewNativeComponent.d.ts +52 -3
- package/lib/typescript/src/specs/RNMBXMapViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXMarkerViewNativeComponent.d.ts +16 -0
- package/lib/typescript/src/specs/RNMBXMarkerViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/specs/RNMBXNativeUserLocationNativeComponent.d.ts +9 -0
- package/lib/typescript/src/specs/RNMBXNativeUserLocationNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/specs/RNMBXPointAnnotationNativeComponent.d.ts +37 -0
- package/lib/typescript/src/specs/RNMBXPointAnnotationNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/specs/RNMBXShapeSourceNativeComponent.d.ts +0 -2
- package/lib/typescript/src/specs/RNMBXShapeSourceNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXTerrainNativeComponent.d.ts +9 -0
- package/lib/typescript/src/specs/RNMBXTerrainNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/specs/codegenUtils.d.ts +0 -4
- package/lib/typescript/src/specs/codegenUtils.d.ts.map +1 -1
- package/lib/typescript/src/utils/index.d.ts +2 -3
- package/lib/typescript/src/utils/index.d.ts.map +1 -1
- package/package.json +2 -1
- package/setup-jest.js +8 -0
- package/src/components/Callout.tsx +4 -11
- package/src/components/Image.tsx +17 -13
- package/src/components/Images.tsx +9 -19
- package/src/components/Light.tsx +4 -12
- package/src/components/MapView.tsx +36 -74
- package/src/components/MarkerView.tsx +3 -15
- package/src/components/NativeBridgeComponent.tsx +9 -57
- package/src/components/NativeUserLocation.tsx +2 -8
- package/src/components/PointAnnotation.tsx +32 -24
- package/src/components/ShapeSource.tsx +21 -44
- package/src/components/Terrain.tsx +3 -11
- package/src/components/VectorSource.tsx +2 -19
- package/src/specs/NativeRNMBXImageModule.ts +10 -0
- package/src/specs/NativeRNMBXPointAnnotationModule.ts +12 -0
- package/src/specs/RNMBXCalloutNativeComponent.ts +9 -0
- package/src/specs/RNMBXImageNativeComponent.ts +18 -0
- package/src/specs/RNMBXImagesNativeComponent.ts +18 -0
- package/src/specs/RNMBXLightNativeComponent.ts +12 -0
- package/src/specs/RNMBXMapViewNativeComponent.ts +69 -5
- package/src/specs/RNMBXMarkerViewNativeComponent.ts +21 -0
- package/src/specs/RNMBXNativeUserLocationNativeComponent.ts +13 -0
- package/src/specs/RNMBXPointAnnotationNativeComponent.ts +40 -0
- package/src/specs/RNMBXShapeSourceNativeComponent.ts +0 -2
- package/src/specs/RNMBXTerrainNativeComponent.ts +13 -0
- package/src/specs/codegenUtils.ts +0 -5
- package/src/utils/index.ts +6 -43
- package/android/src/main/java/com/rnmapbox/rnmbx/components/annotation/RNMBXCalloutManager.java +0 -18
- package/android/src/main/java/com/rnmapbox/rnmbx/components/annotation/RNMBXPointAnnotationManager.java +0 -84
- package/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXAndroidTextureMapViewManager.kt +0 -39
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/light/RNMBXLightManager.java +0 -25
- package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXAndroidTextureMapViewManagerDelegate.java +0 -95
- package/android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXAndroidTextureMapViewManagerInterface.java +0 -38
- package/ios/RNMBX/RNMBXCircleLayerManager.m +0 -12
- package/ios/RNMBX/RNMBXCircleLayerManager.swift +0 -13
- package/ios/RNMBX/RNMBXMapFeatureView.h +0 -7
- package/ios/RNMBX/RNMBXPointAnnotationManager.swift +0 -34
- package/lib/commonjs/specs/RNMBXAndroidTextureMapViewNativeComponent.js.map +0 -1
- package/lib/module/specs/RNMBXAndroidTextureMapViewNativeComponent.js +0 -5
- package/lib/module/specs/RNMBXAndroidTextureMapViewNativeComponent.js.map +0 -1
- package/lib/typescript/src/specs/RNMBXAndroidTextureMapViewNativeComponent.d.ts +0 -46
- package/lib/typescript/src/specs/RNMBXAndroidTextureMapViewNativeComponent.d.ts.map +0 -1
- package/src/specs/RNMBXAndroidTextureMapViewNativeComponent.ts +0 -59
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { HostComponent, ViewProps } from 'react-native';
|
|
2
2
|
import { DirectEventHandler, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
|
-
import type {
|
|
3
|
+
import type { Point, UnsafeMixed } from './codegenUtils';
|
|
4
4
|
declare type OptionalProp<T> = UnsafeMixed<T>;
|
|
5
5
|
declare type GestureSettings = {
|
|
6
6
|
doubleTapToZoomInEnabled?: boolean;
|
|
@@ -8,6 +8,10 @@ declare type GestureSettings = {
|
|
|
8
8
|
pinchScrollEnabled?: boolean;
|
|
9
9
|
pinchToZoomDecelerationEnabled?: boolean;
|
|
10
10
|
};
|
|
11
|
+
declare type LocalizeLabels = {
|
|
12
|
+
locale: string;
|
|
13
|
+
layerIds?: string[];
|
|
14
|
+
} | true;
|
|
11
15
|
declare type OnCameraChangedEventType = {
|
|
12
16
|
type: string;
|
|
13
17
|
payload: string;
|
|
@@ -21,7 +25,6 @@ declare type OnMapChangeEventType = {
|
|
|
21
25
|
payload: string;
|
|
22
26
|
};
|
|
23
27
|
export interface NativeProps extends ViewProps {
|
|
24
|
-
onCameraChanged?: DirectEventHandler<OnCameraChangedEventType>;
|
|
25
28
|
attributionEnabled?: OptionalProp<boolean>;
|
|
26
29
|
attributionPosition?: UnsafeMixed<any>;
|
|
27
30
|
logoEnabled?: OptionalProp<boolean>;
|
|
@@ -38,10 +41,11 @@ export interface NativeProps extends ViewProps {
|
|
|
38
41
|
rotateEnabled?: OptionalProp<boolean>;
|
|
39
42
|
pitchEnabled?: OptionalProp<boolean>;
|
|
40
43
|
requestDisallowInterceptTouchEvent?: OptionalProp<boolean>;
|
|
41
|
-
projection?: OptionalProp<
|
|
44
|
+
projection?: OptionalProp<'mercator' | 'globe'>;
|
|
42
45
|
localizeLabels?: UnsafeMixed<LocalizeLabels>;
|
|
43
46
|
styleURL?: OptionalProp<string>;
|
|
44
47
|
gestureSettings?: UnsafeMixed<GestureSettings>;
|
|
48
|
+
surfaceView?: OptionalProp<boolean>;
|
|
45
49
|
scaleBarViewMargins?: UnsafeMixed<any>;
|
|
46
50
|
attributionViewMargins?: UnsafeMixed<any>;
|
|
47
51
|
attributionViewPosition?: UnsafeMixed<any>;
|
|
@@ -49,7 +53,52 @@ export interface NativeProps extends ViewProps {
|
|
|
49
53
|
onPress?: DirectEventHandler<OnPressEventType>;
|
|
50
54
|
onLongPress?: DirectEventHandler<OnPressEventType>;
|
|
51
55
|
onMapChange?: DirectEventHandler<OnMapChangeEventType>;
|
|
56
|
+
onCameraChanged?: DirectEventHandler<OnCameraChangedEventType>;
|
|
52
57
|
}
|
|
53
58
|
declare const _default: HostComponent<NativeProps>;
|
|
54
59
|
export default _default;
|
|
60
|
+
declare type MapState = {
|
|
61
|
+
properties: {
|
|
62
|
+
center: GeoJSON.Position;
|
|
63
|
+
bounds: {
|
|
64
|
+
ne: GeoJSON.Position;
|
|
65
|
+
sw: GeoJSON.Position;
|
|
66
|
+
};
|
|
67
|
+
zoom: number;
|
|
68
|
+
heading: number;
|
|
69
|
+
pitch: number;
|
|
70
|
+
};
|
|
71
|
+
gestures: {
|
|
72
|
+
isGestureActive: boolean;
|
|
73
|
+
};
|
|
74
|
+
timestamp?: number;
|
|
75
|
+
};
|
|
76
|
+
declare type RegionPayload = {
|
|
77
|
+
zoomLevel: number;
|
|
78
|
+
heading: number;
|
|
79
|
+
animated: boolean;
|
|
80
|
+
isUserInteraction: boolean;
|
|
81
|
+
visibleBounds: GeoJSON.Position[];
|
|
82
|
+
pitch: number;
|
|
83
|
+
};
|
|
84
|
+
declare type OnPressEventTypeActual = {
|
|
85
|
+
type: string;
|
|
86
|
+
payload: GeoJSON.Feature | string;
|
|
87
|
+
};
|
|
88
|
+
declare type OnCameraChangedEventTypeActual = {
|
|
89
|
+
type: string;
|
|
90
|
+
payload: MapState | string;
|
|
91
|
+
};
|
|
92
|
+
declare type OnMapChangeEventTypeActual = {
|
|
93
|
+
type: string;
|
|
94
|
+
payload: GeoJSON.Feature<GeoJSON.Point, RegionPayload & {
|
|
95
|
+
isAnimatingFromUserInteraction: boolean;
|
|
96
|
+
}> | string;
|
|
97
|
+
};
|
|
98
|
+
export declare type NativeMapViewActual = HostComponent<Omit<NativeProps, 'onCameraChanged' | 'onLongPress' | 'onMapChange'> & {
|
|
99
|
+
onCameraChanged?: DirectEventHandler<OnCameraChangedEventTypeActual>;
|
|
100
|
+
onLongPress?: DirectEventHandler<OnPressEventTypeActual>;
|
|
101
|
+
onPress?: DirectEventHandler<OnPressEventTypeActual>;
|
|
102
|
+
onMapChange?: DirectEventHandler<OnMapChangeEventTypeActual>;
|
|
103
|
+
}>;
|
|
55
104
|
//# sourceMappingURL=RNMBXMapViewNativeComponent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RNMBXMapViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/specs/RNMBXMapViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE7D,OAAO,EACL,kBAAkB,EAClB,KAAK,EACN,MAAM,2CAA2C,CAAC;AAEnD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"RNMBXMapViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/specs/RNMBXMapViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE7D,OAAO,EACL,kBAAkB,EAClB,KAAK,EACN,MAAM,2CAA2C,CAAC;AAEnD,OAAO,KAAK,EAAE,KAAK,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B,CAAC,sBAAsB,CAAC,CAAC;IACzD,OAAO,CAAC,EAAE,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;IACrD,WAAW,CAAC,EAAE,kBAAkB,CAAC,0BAA0B,CAAC,CAAC;CAC9D,CACF,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
2
|
+
import { Int32 } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
|
+
import { UnsafeMixed } from './codegenUtils';
|
|
4
|
+
declare type Point = {
|
|
5
|
+
x: Int32;
|
|
6
|
+
y: Int32;
|
|
7
|
+
};
|
|
8
|
+
export interface NativeProps extends ViewProps {
|
|
9
|
+
coordinate?: UnsafeMixed<string>;
|
|
10
|
+
anchor: UnsafeMixed<Point>;
|
|
11
|
+
allowOverlap: UnsafeMixed<boolean>;
|
|
12
|
+
isSelected: UnsafeMixed<boolean>;
|
|
13
|
+
}
|
|
14
|
+
declare const _default: HostComponent<NativeProps>;
|
|
15
|
+
export default _default;
|
|
16
|
+
//# sourceMappingURL=RNMBXMarkerViewNativeComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RNMBXMarkerViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/specs/RNMBXMarkerViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE7D,OAAO,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AAElE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,aAAK,KAAK,GAAG;IACX,CAAC,EAAE,KAAK,CAAC;IACT,CAAC,EAAE,KAAK,CAAC;CACV,CAAC;AAEF,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,UAAU,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACjC,MAAM,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IAC3B,YAAY,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IACnC,UAAU,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CAClC;;AAED,wBAEgC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
2
|
+
import { UnsafeMixed } from './codegenUtils';
|
|
3
|
+
export interface NativeProps extends ViewProps {
|
|
4
|
+
androidRenderMode?: UnsafeMixed<string>;
|
|
5
|
+
iosShowsUserHeadingIndicator?: UnsafeMixed<boolean>;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: HostComponent<NativeProps>;
|
|
8
|
+
export default _default;
|
|
9
|
+
//# sourceMappingURL=RNMBXNativeUserLocationNativeComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RNMBXNativeUserLocationNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/specs/RNMBXNativeUserLocationNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG7D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,iBAAiB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACxC,4BAA4B,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACrD;;AAED,wBAEgC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
2
|
+
import { DirectEventHandler } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
|
+
import type { UnsafeMixed } from './codegenUtils';
|
|
4
|
+
declare type OnMapboxPointAnnotationDeselectedEventType = {
|
|
5
|
+
type: string;
|
|
6
|
+
payload: string;
|
|
7
|
+
};
|
|
8
|
+
declare type OnMapboxPointAnnotationDragEventType = {
|
|
9
|
+
type: string;
|
|
10
|
+
payload: string;
|
|
11
|
+
};
|
|
12
|
+
declare type OnMapboxPointAnnotationDragEndEventType = {
|
|
13
|
+
type: string;
|
|
14
|
+
payload: string;
|
|
15
|
+
};
|
|
16
|
+
declare type OnMapboxPointAnnotationDragStartEventType = {
|
|
17
|
+
type: string;
|
|
18
|
+
payload: string;
|
|
19
|
+
};
|
|
20
|
+
declare type OnMapboxPointAnnotationSelectedEventType = {
|
|
21
|
+
type: string;
|
|
22
|
+
payload: string;
|
|
23
|
+
};
|
|
24
|
+
export interface NativeProps extends ViewProps {
|
|
25
|
+
coordinate: UnsafeMixed<string>;
|
|
26
|
+
draggable: UnsafeMixed<boolean>;
|
|
27
|
+
id: UnsafeMixed<string>;
|
|
28
|
+
anchor: UnsafeMixed<any>;
|
|
29
|
+
onMapboxPointAnnotationDeselected: DirectEventHandler<OnMapboxPointAnnotationDeselectedEventType>;
|
|
30
|
+
onMapboxPointAnnotationDrag: DirectEventHandler<OnMapboxPointAnnotationDragEventType>;
|
|
31
|
+
onMapboxPointAnnotationDragEnd: DirectEventHandler<OnMapboxPointAnnotationDragEndEventType>;
|
|
32
|
+
onMapboxPointAnnotationDragStart: DirectEventHandler<OnMapboxPointAnnotationDragStartEventType>;
|
|
33
|
+
onMapboxPointAnnotationSelected: DirectEventHandler<OnMapboxPointAnnotationSelectedEventType>;
|
|
34
|
+
}
|
|
35
|
+
declare const _default: HostComponent<NativeProps>;
|
|
36
|
+
export default _default;
|
|
37
|
+
//# sourceMappingURL=RNMBXPointAnnotationNativeComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RNMBXPointAnnotationNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/specs/RNMBXPointAnnotationNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;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>;
|
|
21
|
-
images: UnsafeMixed<any>;
|
|
22
|
-
nativeImages: UnsafeMixed<Array<any>>;
|
|
23
21
|
hasPressListener: UnsafeMixed<boolean>;
|
|
24
22
|
hitbox: UnsafeMixed<any>;
|
|
25
23
|
onMapboxShapeSourcePress: DirectEventHandler<OnMapboxShapeSourcePressEventType>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RNMBXShapeSourceNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/specs/RNMBXShapeSourceNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE7D,OAAO,EACL,kBAAkB,EAClB,MAAM,EACN,KAAK,EACN,MAAM,2CAA2C,CAAC;AAEnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,aAAK,iCAAiC,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAE3E,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,EAAE,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACxB,QAAQ,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC/B,GAAG,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACzB,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3B,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IAC5B,aAAa,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACnC,mBAAmB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACzC,iBAAiB,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC;IACpC,YAAY,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAClC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC5B,SAAS,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC/B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AiC,CAAC,CAAC;CACjF;;AAED,wBAEgC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
2
|
+
import type { UnsafeMixed } from './codegenUtils';
|
|
3
|
+
export interface NativeProps extends ViewProps {
|
|
4
|
+
sourceID?: UnsafeMixed<string>;
|
|
5
|
+
reactStyle: UnsafeMixed<any>;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: HostComponent<NativeProps>;
|
|
8
|
+
export default _default;
|
|
9
|
+
//# sourceMappingURL=RNMBXTerrainNativeComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RNMBXTerrainNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/specs/RNMBXTerrainNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,QAAQ,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC/B,UAAU,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC;CAC9B;;AAED,wBAEgC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codegenUtils.d.ts","sourceRoot":"","sources":["../../../../src/specs/codegenUtils.ts"],"names":[],"mappings":";AAGA,oBAAY,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC;AAI/B,oBAAY,YAAY,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC;AAE7C,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AAE1E,oBAAY,KAAK,GAAG;IAClB,CAAC,EAAE,KAAK,CAAC;IACT,CAAC,EAAE,KAAK,CAAC;CACV,CAAC;AAEF,oBAAY,
|
|
1
|
+
{"version":3,"file":"codegenUtils.d.ts","sourceRoot":"","sources":["../../../../src/specs/codegenUtils.ts"],"names":[],"mappings":";AAGA,oBAAY,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC;AAI/B,oBAAY,YAAY,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC;AAE7C,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AAE1E,oBAAY,KAAK,GAAG;IAClB,CAAC,EAAE,KAAK,CAAC;IACT,CAAC,EAAE,KAAK,CAAC;CACV,CAAC;AAEF,oBAAY,gBAAgB,GAAG;IAC7B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,IAAI,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ImageSourcePropType } from 'react-native';
|
|
2
|
+
import { ImageSourcePropType, TurboModule } from 'react-native';
|
|
3
3
|
export declare function isAndroid(): boolean;
|
|
4
4
|
export declare function existenceChange(cur: boolean, next: boolean): boolean;
|
|
5
5
|
export declare function isFunction(fn: unknown): fn is boolean;
|
|
@@ -11,12 +11,11 @@ export declare function isPrimitive(value: unknown): value is string | number |
|
|
|
11
11
|
export declare type NativeArg = string | number | boolean | null | {
|
|
12
12
|
[k: string]: NativeArg;
|
|
13
13
|
} | NativeArg[];
|
|
14
|
-
export declare function
|
|
14
|
+
export declare function runNativeMethod<ReturnType = NativeArg>(turboModule: TurboModule, name: string, nativeRef: any, args: NativeArg[]): Promise<ReturnType>;
|
|
15
15
|
export declare function cloneReactChildrenWithProps(children: Parameters<typeof React.Children.map>[0], propsToAdd?: {
|
|
16
16
|
[key: string]: string;
|
|
17
17
|
}): any;
|
|
18
18
|
export declare function resolveImagePath(imageRef: ImageSourcePropType): string;
|
|
19
|
-
export declare function getIOSModuleName(moduleName: string): string;
|
|
20
19
|
export declare function toJSONString(json?: any): string;
|
|
21
20
|
export declare type OrnamentPositonProp = {
|
|
22
21
|
top: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAIL,mBAAmB,EACnB,WAAW,EACZ,MAAM,cAAc,CAAC;AAEtB,wBAAgB,SAAS,IAAI,OAAO,CAEnC;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAKpE;AAED,wBAAgB,UAAU,CAAC,EAAE,EAAE,OAAO,GAAG,EAAE,IAAI,OAAO,CAErD;AAED,wBAAgB,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM,CAEpD;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,SAAS,CAE1D;AAED,wBAAgB,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM,CAEpD;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,OAAO,CAExD;AAED,wBAAgB,WAAW,CACzB,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,MAAM,GAAG,MAAM,GAAG,OAAO,CAEpC;AAED,oBAAY,SAAS,GACjB,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAC1B,SAAS,EAAE,CAAC;AAEhB,wBAAgB,eAAe,CAAC,UAAU,GAAG,SAAS,EACpD,WAAW,EAAE,WAAW,EACxB,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,GAAG,EACd,IAAI,EAAE,SAAS,EAAE,GAChB,OAAO,CAAC,UAAU,CAAC,CASrB;AAED,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,UAAU,CAAC,OAAO,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAClD,UAAU,GAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAO,OAkB3C;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,mBAAmB,GAAG,MAAM,CAGtE;AAED,wBAAgB,YAAY,CAAC,IAAI,GAAE,GAAQ,UAE1C;AAED,oBAAY,mBAAmB,GAC3B;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC7B;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC9B;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAChC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rnmapbox/maps",
|
|
3
3
|
"description": "A Mapbox react native module for creating custom maps",
|
|
4
|
-
"version": "10.1.0-beta.
|
|
4
|
+
"version": "10.1.0-beta.18",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"type:check": "yarn tsc --noEmit",
|
|
51
51
|
"test:plugin": "yarn expo-module test plugin",
|
|
52
52
|
"build:plugin": "yarn tsc --build plugin",
|
|
53
|
+
"build:examples.json": "cd example; jest __tests__/dumpExamplesJson.ts",
|
|
53
54
|
"lint:plugin": "yarn eslint plugin/src/*",
|
|
54
55
|
"build": "yarn bob build",
|
|
55
56
|
"prepare": "yarn bob build && yarn husky install"
|
package/setup-jest.js
CHANGED
|
@@ -155,6 +155,14 @@ NativeModules.RNMBXShapeSourceModule = {
|
|
|
155
155
|
getClusterChildren: jest.fn(),
|
|
156
156
|
};
|
|
157
157
|
|
|
158
|
+
NativeModules.RNMBXImageModule = {
|
|
159
|
+
refresh: jest.fn(),
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
NativeModules.RNMBXPointAnnotationModule = {
|
|
163
|
+
refresh: jest.fn(),
|
|
164
|
+
};
|
|
165
|
+
|
|
158
166
|
NativeModules.RNMBXLogging = nativeModule({});
|
|
159
167
|
|
|
160
168
|
// Mock for global AbortController
|
|
@@ -3,14 +3,12 @@ import {
|
|
|
3
3
|
View,
|
|
4
4
|
Text,
|
|
5
5
|
Animated,
|
|
6
|
-
requireNativeComponent,
|
|
7
6
|
StyleSheet,
|
|
8
7
|
ViewStyle,
|
|
9
8
|
ViewProps,
|
|
10
|
-
StyleProp,
|
|
11
9
|
} from 'react-native';
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
import RNMBXCalloutNativeComponent from '../specs/RNMBXCalloutNativeComponent';
|
|
14
12
|
|
|
15
13
|
const styles = StyleSheet.create({
|
|
16
14
|
container: {
|
|
@@ -48,11 +46,6 @@ const styles = StyleSheet.create({
|
|
|
48
46
|
},
|
|
49
47
|
});
|
|
50
48
|
|
|
51
|
-
type NativeProps = {
|
|
52
|
-
children: ReactNode;
|
|
53
|
-
style: StyleProp<ViewStyle>;
|
|
54
|
-
};
|
|
55
|
-
|
|
56
49
|
type Props = Omit<ViewProps, 'style'> & {
|
|
57
50
|
/**
|
|
58
51
|
* String that gets displayed in the default callout.
|
|
@@ -135,11 +128,11 @@ class Callout extends React.PureComponent<Props> {
|
|
|
135
128
|
? this._renderCustomCallout()
|
|
136
129
|
: this._renderDefaultCallout();
|
|
137
130
|
return (
|
|
138
|
-
<
|
|
131
|
+
<RNMBXCalloutNativeComponent style={this._containerStyle}>
|
|
132
|
+
{calloutContent}
|
|
133
|
+
</RNMBXCalloutNativeComponent>
|
|
139
134
|
);
|
|
140
135
|
}
|
|
141
136
|
}
|
|
142
137
|
|
|
143
|
-
const RNMBXCallout = requireNativeComponent<NativeProps>(NATIVE_MODULE_NAME);
|
|
144
|
-
|
|
145
138
|
export default Callout;
|
package/src/components/Image.tsx
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React, { memo, forwardRef, ReactElement } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { findNodeHandle } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import RNMBXImageNativeComponent from '../specs/RNMBXImageNativeComponent';
|
|
5
|
+
import NativeRNMBXImageModule from '../specs/NativeRNMBXImageModule';
|
|
3
6
|
|
|
4
7
|
interface Props {
|
|
5
8
|
/** ID of the image */
|
|
@@ -42,21 +45,22 @@ const Image = memo(
|
|
|
42
45
|
stretchY,
|
|
43
46
|
children,
|
|
44
47
|
};
|
|
45
|
-
return <RNMBXImage {...nativeProps} />;
|
|
46
|
-
}),
|
|
47
|
-
);
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
49
|
+
const imageRef = React.useRef(null);
|
|
50
|
+
|
|
51
|
+
const refresh = () => {
|
|
52
|
+
const handle = findNodeHandle(imageRef.current as any);
|
|
53
|
+
NativeRNMBXImageModule.refresh(handle);
|
|
54
|
+
};
|
|
56
55
|
|
|
57
|
-
|
|
56
|
+
React.useImperativeHandle(ref, () => {
|
|
57
|
+
return { refresh };
|
|
58
|
+
});
|
|
58
59
|
|
|
59
|
-
|
|
60
|
+
// @ts-expect-error just codegen stuff
|
|
61
|
+
return <RNMBXImageNativeComponent {...nativeProps} ref={imageRef} />;
|
|
62
|
+
}),
|
|
63
|
+
);
|
|
60
64
|
|
|
61
65
|
Image.displayName = 'Image';
|
|
62
66
|
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import React, { ReactNode, ReactElement } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
requireNativeComponent,
|
|
4
|
-
Image as RNImage,
|
|
5
|
-
ImageURISource,
|
|
6
|
-
} from 'react-native';
|
|
2
|
+
import { Image as RNImage, ImageURISource } from 'react-native';
|
|
7
3
|
import { ImageSourcePropType, ImageResolvedAssetSource } from 'react-native';
|
|
8
4
|
|
|
5
|
+
import RNMBXImagesNativeComponent from '../specs/RNMBXImagesNativeComponent';
|
|
6
|
+
|
|
9
7
|
import { ShapeSource } from './ShapeSource';
|
|
10
8
|
import Image from './Image';
|
|
11
9
|
|
|
@@ -101,7 +99,6 @@ interface Props {
|
|
|
101
99
|
*/
|
|
102
100
|
onImageMissing?: (imageKey: string) => void;
|
|
103
101
|
|
|
104
|
-
id?: string;
|
|
105
102
|
children?: TypedReactNode<typeof Image>;
|
|
106
103
|
}
|
|
107
104
|
|
|
@@ -184,25 +181,18 @@ class Images extends React.PureComponent<Props> {
|
|
|
184
181
|
|
|
185
182
|
render() {
|
|
186
183
|
const props = {
|
|
187
|
-
id: this.props.id,
|
|
188
184
|
hasOnImageMissing: !!this.props.onImageMissing,
|
|
189
185
|
onImageMissing: this._onImageMissing.bind(this),
|
|
190
186
|
...this._getImages(),
|
|
191
187
|
};
|
|
192
188
|
|
|
193
|
-
return
|
|
189
|
+
return (
|
|
190
|
+
// @ts-expect-error just codegen stuff
|
|
191
|
+
<RNMBXImagesNativeComponent {...props}>
|
|
192
|
+
{this.props.children}
|
|
193
|
+
</RNMBXImagesNativeComponent>
|
|
194
|
+
);
|
|
194
195
|
}
|
|
195
196
|
}
|
|
196
197
|
|
|
197
|
-
type NativeProps = {
|
|
198
|
-
hasOnImageMissing: boolean;
|
|
199
|
-
onImageMissing?: (event: React.SyntheticEvent<Element, RNMBEvent>) => void;
|
|
200
|
-
images?: {
|
|
201
|
-
[key: string]: string | ImageResolvedAssetSource | ResolvedImageEntryData;
|
|
202
|
-
};
|
|
203
|
-
nativeImages?: NativeImage[];
|
|
204
|
-
};
|
|
205
|
-
|
|
206
|
-
const RNMBXImages = requireNativeComponent<NativeProps>(NATIVE_MODULE_NAME);
|
|
207
|
-
|
|
208
198
|
export default Images;
|
package/src/components/Light.tsx
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import React, { forwardRef, memo, useImperativeHandle, useRef } from 'react';
|
|
2
|
-
import { requireNativeComponent } from 'react-native';
|
|
3
2
|
|
|
3
|
+
import RNMBXLightNativeComponent from '../specs/RNMBXLightNativeComponent';
|
|
4
4
|
import { LightLayerStyleProps } from '../utils/MapboxStyles';
|
|
5
|
-
import { StyleValue } from '../utils/StyleValue';
|
|
6
5
|
import { type BaseProps } from '../types/BaseProps';
|
|
7
6
|
import { transformStyle } from '../utils/StyleValue';
|
|
8
7
|
import nativeRef from '../utils/nativeRef';
|
|
9
8
|
|
|
10
|
-
export const NATIVE_MODULE_NAME = 'RNMBXLight';
|
|
11
|
-
|
|
12
9
|
type Props = BaseProps & {
|
|
13
10
|
/**
|
|
14
11
|
* Customizable style attributes
|
|
@@ -16,10 +13,6 @@ type Props = BaseProps & {
|
|
|
16
13
|
style: LightLayerStyleProps;
|
|
17
14
|
};
|
|
18
15
|
|
|
19
|
-
type NativeProps = Omit<Props, 'style'> & {
|
|
20
|
-
reactStyle?: { [key: string]: StyleValue };
|
|
21
|
-
};
|
|
22
|
-
|
|
23
16
|
interface LightMethods {
|
|
24
17
|
setNativeProps(props: { [key: string]: unknown }): void;
|
|
25
18
|
}
|
|
@@ -30,7 +23,7 @@ interface LightMethods {
|
|
|
30
23
|
function Light(props: Props, ref: React.ForwardedRef<LightMethods>) {
|
|
31
24
|
const { style, ...propWithoutStyle } = props;
|
|
32
25
|
|
|
33
|
-
const nativeLightRef = nativeRef(useRef
|
|
26
|
+
const nativeLightRef = nativeRef(useRef(null));
|
|
34
27
|
|
|
35
28
|
useImperativeHandle(ref, () => ({
|
|
36
29
|
setNativeProps(_props: { [key: string]: unknown }) {
|
|
@@ -46,7 +39,8 @@ function Light(props: Props, ref: React.ForwardedRef<LightMethods>) {
|
|
|
46
39
|
}));
|
|
47
40
|
|
|
48
41
|
return (
|
|
49
|
-
<
|
|
42
|
+
<RNMBXLightNativeComponent
|
|
43
|
+
// @ts-expect-error just codegen stuff
|
|
50
44
|
ref={nativeLightRef}
|
|
51
45
|
testID="RNMBXLight"
|
|
52
46
|
{...propWithoutStyle}
|
|
@@ -55,6 +49,4 @@ function Light(props: Props, ref: React.ForwardedRef<LightMethods>) {
|
|
|
55
49
|
);
|
|
56
50
|
}
|
|
57
51
|
|
|
58
|
-
const RNMBXLight = requireNativeComponent<NativeProps>(NATIVE_MODULE_NAME);
|
|
59
|
-
|
|
60
52
|
export default memo(forwardRef(Light));
|