@rnmapbox/maps 10.3.0 → 10.3.2-rc.0
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/annotation/RNMBXMarkerView.kt +8 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/annotation/RNMBXMarkerViewContent.kt +9 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/annotation/RNMBXMarkerViewContentManager.kt +7 -1
- package/android/src/main/java/com/rnmapbox/rnmbx/components/annotation/RNMBXMarkerViewManager.kt +14 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/camera/RNMBXCamera.kt +3 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/camera/RNMBXCameraManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/camera/RNMBXVIewportManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImageManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImagesManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/location/RNMBXCustomLocationProviderManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/location/RNMBXNativeUserLocationManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapView.kt +13 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapViewManager.kt +6 -1
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/RNMBXStyleFactory.kt +748 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/RNMBXStyleImportManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXBackgroundLayerManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXCircleLayerManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXFillExtrusionLayerManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXFillLayerManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXHeatmapLayerManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXHillshadeLayerManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXLineLayerManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXModelLayerManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXRasterLayerManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXSkyLayerManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXSymbolLayerManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/light/RNMBXLightManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/model/RNMBXModelsManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/rain/RNMBXRain.kt +83 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/rain/RNMBXRainManager.kt +40 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/snow/RNMBXSnow.kt +66 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/snow/RNMBXSnowManager.kt +40 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXImageSourceManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXRasterDemSourceManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXRasterSource.kt +1 -1
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXRasterSourceManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXShapeSource.kt +8 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXShapeSourceManager.kt +11 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXVectorSourceManager.kt +6 -0
- package/android/src/main/java/com/rnmapbox/rnmbx/components/styles/terrain/RNMBXTerrainManager.kt +6 -0
- package/ios/RNMBX/RNMBXAtmosphereComponentView.mm +2 -1
- package/ios/RNMBX/RNMBXBackgroundLayerComponentView.mm +2 -1
- package/ios/RNMBX/RNMBXBridgeManager.h +8 -0
- package/ios/RNMBX/RNMBXBridgeManager.m +16 -0
- package/ios/RNMBX/RNMBXCamera.swift +5 -2
- package/ios/RNMBX/RNMBXCircleLayerComponentView.mm +2 -1
- package/ios/RNMBX/RNMBXFillExtrusionLayerComponentView.mm +2 -1
- package/ios/RNMBX/RNMBXFillLayerComponentView.mm +2 -1
- package/ios/RNMBX/RNMBXHeatmapLayerComponentView.mm +2 -1
- package/ios/RNMBX/RNMBXHillshadeLayerComponentView.mm +2 -1
- package/ios/RNMBX/RNMBXImageModule.h +1 -0
- package/ios/RNMBX/RNMBXImageModule.mm +15 -2
- package/ios/RNMBX/RNMBXImageQueue.swift +9 -1
- package/ios/RNMBX/RNMBXImages.swift +4 -0
- package/ios/RNMBX/RNMBXImagesComponentView.mm +2 -1
- package/ios/RNMBX/RNMBXLightComponentView.mm +2 -1
- package/ios/RNMBX/RNMBXLineLayerComponentView.mm +2 -1
- package/ios/RNMBX/RNMBXMapView.swift +16 -0
- package/ios/RNMBX/RNMBXMapViewComponentView.mm +10 -0
- package/ios/RNMBX/RNMBXModelLayerComponentView.mm +2 -1
- package/ios/RNMBX/RNMBXRain.swift +92 -0
- package/ios/RNMBX/RNMBXRainComponentView.h +14 -0
- package/ios/RNMBX/RNMBXRainComponentView.mm +80 -0
- package/ios/RNMBX/RNMBXRasterLayerComponentView.mm +2 -1
- package/ios/RNMBX/RNMBXRasterParticleLayerComponentView.mm +2 -1
- package/ios/RNMBX/RNMBXShapeSource.swift +5 -0
- package/ios/RNMBX/RNMBXShapeSourceComponentView.mm +1 -0
- package/ios/RNMBX/RNMBXSkyLayerComponentView.mm +2 -1
- package/ios/RNMBX/RNMBXSnow.swift +76 -0
- package/ios/RNMBX/RNMBXSnowComponentView.h +14 -0
- package/ios/RNMBX/RNMBXSnowComponentView.mm +80 -0
- package/ios/RNMBX/RNMBXStyle.swift +477 -9
- package/ios/RNMBX/RNMBXStyleValue.swift +7 -1
- package/ios/RNMBX/RNMBXSymbolLayerComponentView.mm +2 -1
- package/ios/RNMBX/RNMBXTerrainComponentView.mm +2 -1
- package/lib/commonjs/plugin/build/withMapbox.d.ts +1 -1
- package/lib/commonjs/plugin/install.md +2 -2
- package/lib/commonjs/plugin/src/withMapbox.ts +2 -2
- package/lib/module/Mapbox.native.js +2 -1
- package/lib/module/Mapbox.native.js.map +1 -1
- package/lib/module/components/AbstractLayer.js.map +1 -1
- package/lib/module/components/Annotation.js.map +1 -1
- package/lib/module/components/Callout.js.map +1 -1
- package/lib/module/components/Image.js.map +1 -1
- package/lib/module/components/Images.js.map +1 -1
- package/lib/module/components/MapView.js.map +1 -1
- package/lib/module/components/MarkerView.js +6 -2
- package/lib/module/components/MarkerView.js.map +1 -1
- package/lib/module/components/PointAnnotation.js +11 -4
- package/lib/module/components/PointAnnotation.js.map +1 -1
- package/lib/module/components/Rain.js +19 -0
- package/lib/module/components/Rain.js.map +1 -0
- package/lib/module/components/ShapeSource.js +1 -0
- package/lib/module/components/ShapeSource.js.map +1 -1
- package/lib/module/components/Snow.js +19 -0
- package/lib/module/components/Snow.js.map +1 -0
- package/lib/module/components/SymbolLayer.js.map +1 -1
- package/lib/module/components/UserLocation.js.map +1 -1
- package/lib/module/components/VectorSource.js.map +1 -1
- package/lib/module/specs/RNMBXCameraNativeComponent.ts +3 -3
- package/lib/module/specs/RNMBXCustomLocationProviderNativeComponent.ts +1 -1
- package/lib/module/specs/RNMBXImageSourceNativeComponent.ts +1 -1
- package/lib/module/specs/RNMBXMapViewNativeComponent.ts +5 -4
- package/lib/module/specs/RNMBXMarkerViewNativeComponent.ts +2 -2
- package/lib/module/specs/RNMBXModelLayerNativeComponent.ts +2 -2
- package/lib/module/specs/RNMBXModelsNativeComponent.ts +1 -1
- package/lib/module/specs/RNMBXNativeUserLocationNativeComponent.ts +1 -1
- package/lib/module/specs/RNMBXRainNativeComponent.ts +13 -0
- package/lib/module/specs/RNMBXRasterArraySourceNativeComponent.ts +1 -1
- package/lib/module/specs/RNMBXRasterDemSourceNativeComponent.ts +1 -1
- package/lib/module/specs/RNMBXRasterSourceNativeComponent.ts +1 -1
- package/lib/module/specs/RNMBXShapeSourceNativeComponent.ts +4 -3
- package/lib/module/specs/RNMBXSnowNativeComponent.ts +13 -0
- package/lib/module/specs/RNMBXVectorSourceNativeComponent.ts +2 -2
- package/lib/module/utils/index.js.map +1 -1
- package/lib/module/utils/styleMap.js +26 -0
- package/lib/module/utils/styleMap.js.map +1 -1
- package/lib/module/web/components/Camera.js.map +1 -1
- package/lib/typescript/jest.config.d.ts +3 -3
- package/lib/typescript/jest.config.d.ts.map +1 -1
- package/lib/typescript/plugin/src/withMapbox.d.ts +1 -1
- package/lib/typescript/plugin/src/withMapbox.d.ts.map +1 -1
- package/lib/typescript/scripts/autogenHelpers/examplesJsonSchema.d.ts +1 -1
- package/lib/typescript/scripts/autogenHelpers/examplesJsonSchema.d.ts.map +1 -1
- package/lib/typescript/scripts/autogenHelpers/generateCodeWithEjs.d.mts +71 -2
- package/lib/typescript/scripts/autogenHelpers/generateCodeWithEjs.d.mts.map +1 -1
- package/lib/typescript/scripts/autogenHelpers/globals.d.mts +1 -1
- package/lib/typescript/scripts/autogenHelpers/globals.d.mts.map +1 -1
- package/lib/typescript/src/Mapbox.native.d.ts +3 -1
- package/lib/typescript/src/Mapbox.native.d.ts.map +1 -1
- package/lib/typescript/src/components/AbstractLayer.d.ts +2 -2
- package/lib/typescript/src/components/AbstractLayer.d.ts.map +1 -1
- package/lib/typescript/src/components/AbstractSource.d.ts +1 -1
- package/lib/typescript/src/components/AbstractSource.d.ts.map +1 -1
- package/lib/typescript/src/components/Annotation.d.ts +4 -4
- package/lib/typescript/src/components/Annotation.d.ts.map +1 -1
- package/lib/typescript/src/components/Callout.d.ts +5 -5
- package/lib/typescript/src/components/Callout.d.ts.map +1 -1
- package/lib/typescript/src/components/Camera.d.ts +1 -1
- package/lib/typescript/src/components/Camera.d.ts.map +1 -1
- package/lib/typescript/src/components/CameraGestureObserver.d.ts +1 -1
- package/lib/typescript/src/components/CameraGestureObserver.d.ts.map +1 -1
- package/lib/typescript/src/components/CircleLayer.d.ts +1 -1
- package/lib/typescript/src/components/CircleLayer.d.ts.map +1 -1
- package/lib/typescript/src/components/CustomLocationProvider.d.ts +1 -1
- package/lib/typescript/src/components/CustomLocationProvider.d.ts.map +1 -1
- package/lib/typescript/src/components/FillExtrusionLayer.d.ts +1 -1
- package/lib/typescript/src/components/FillExtrusionLayer.d.ts.map +1 -1
- package/lib/typescript/src/components/HeadingIndicator.d.ts +1 -1
- package/lib/typescript/src/components/HeadingIndicator.d.ts.map +1 -1
- package/lib/typescript/src/components/HillshadeLayer.d.ts +1 -1
- package/lib/typescript/src/components/HillshadeLayer.d.ts.map +1 -1
- package/lib/typescript/src/components/Image.d.ts +1 -1
- package/lib/typescript/src/components/Image.d.ts.map +1 -1
- package/lib/typescript/src/components/ImageSource.d.ts +1 -1
- package/lib/typescript/src/components/ImageSource.d.ts.map +1 -1
- package/lib/typescript/src/components/Images.d.ts +2 -2
- package/lib/typescript/src/components/Images.d.ts.map +1 -1
- package/lib/typescript/src/components/LineLayer.d.ts +1 -1
- package/lib/typescript/src/components/LineLayer.d.ts.map +1 -1
- package/lib/typescript/src/components/MapView.d.ts +5 -1
- package/lib/typescript/src/components/MapView.d.ts.map +1 -1
- package/lib/typescript/src/components/MarkerView.d.ts +1 -1
- package/lib/typescript/src/components/MarkerView.d.ts.map +1 -1
- package/lib/typescript/src/components/ModelLayer.d.ts +1 -1
- package/lib/typescript/src/components/ModelLayer.d.ts.map +1 -1
- package/lib/typescript/src/components/NativeBridgeComponent.d.ts +1 -1
- package/lib/typescript/src/components/NativeBridgeComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/PointAnnotation.d.ts +3 -3
- package/lib/typescript/src/components/PointAnnotation.d.ts.map +1 -1
- package/lib/typescript/src/components/Rain.d.ts +17 -0
- package/lib/typescript/src/components/Rain.d.ts.map +1 -0
- package/lib/typescript/src/components/RasterArraySource.d.ts +1 -1
- package/lib/typescript/src/components/RasterArraySource.d.ts.map +1 -1
- package/lib/typescript/src/components/RasterLayer.d.ts +1 -1
- package/lib/typescript/src/components/RasterLayer.d.ts.map +1 -1
- package/lib/typescript/src/components/RasterParticleLayer.d.ts +1 -1
- package/lib/typescript/src/components/RasterParticleLayer.d.ts.map +1 -1
- package/lib/typescript/src/components/RasterSource.d.ts +1 -1
- package/lib/typescript/src/components/RasterSource.d.ts.map +1 -1
- package/lib/typescript/src/components/ShapeSource.d.ts +8 -3
- package/lib/typescript/src/components/ShapeSource.d.ts.map +1 -1
- package/lib/typescript/src/components/SkyLayer.d.ts +1 -1
- package/lib/typescript/src/components/SkyLayer.d.ts.map +1 -1
- package/lib/typescript/src/components/Snow.d.ts +8 -0
- package/lib/typescript/src/components/Snow.d.ts.map +1 -0
- package/lib/typescript/src/components/SymbolLayer.d.ts +1 -1
- package/lib/typescript/src/components/SymbolLayer.d.ts.map +1 -1
- package/lib/typescript/src/components/UserLocation.d.ts +1 -1
- package/lib/typescript/src/components/UserLocation.d.ts.map +1 -1
- package/lib/typescript/src/components/VectorSource.d.ts +2 -2
- package/lib/typescript/src/components/VectorSource.d.ts.map +1 -1
- package/lib/typescript/src/modules/location/locationManager.d.ts +1 -1
- package/lib/typescript/src/modules/location/locationManager.d.ts.map +1 -1
- package/lib/typescript/src/modules/offline/offlineManager.d.ts +1 -1
- package/lib/typescript/src/modules/offline/offlineManager.d.ts.map +1 -1
- package/lib/typescript/src/shapeAnimators/ChangeLineOffsetsShapeAnimator.d.ts +1 -1
- package/lib/typescript/src/shapeAnimators/ChangeLineOffsetsShapeAnimator.d.ts.map +1 -1
- package/lib/typescript/src/shapeAnimators/MovePointShapeAnimator.d.ts +2 -2
- package/lib/typescript/src/shapeAnimators/MovePointShapeAnimator.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXCameraNativeComponent.d.ts +1 -1
- package/lib/typescript/src/specs/RNMBXCameraNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXCustomLocationProviderNativeComponent.d.ts +1 -1
- package/lib/typescript/src/specs/RNMBXCustomLocationProviderNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXImageSourceNativeComponent.d.ts +1 -1
- package/lib/typescript/src/specs/RNMBXImageSourceNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXMapViewNativeComponent.d.ts +2 -1
- package/lib/typescript/src/specs/RNMBXMapViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXMarkerViewNativeComponent.d.ts +2 -2
- package/lib/typescript/src/specs/RNMBXMarkerViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXModelLayerNativeComponent.d.ts +2 -2
- package/lib/typescript/src/specs/RNMBXModelLayerNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXModelsNativeComponent.d.ts +1 -1
- package/lib/typescript/src/specs/RNMBXModelsNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXNativeUserLocationNativeComponent.d.ts +1 -1
- package/lib/typescript/src/specs/RNMBXNativeUserLocationNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXRainNativeComponent.d.ts +8 -0
- package/lib/typescript/src/specs/RNMBXRainNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/specs/RNMBXRasterArraySourceNativeComponent.d.ts +1 -1
- package/lib/typescript/src/specs/RNMBXRasterArraySourceNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXRasterDemSourceNativeComponent.d.ts +1 -1
- package/lib/typescript/src/specs/RNMBXRasterDemSourceNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXRasterSourceNativeComponent.d.ts +1 -1
- package/lib/typescript/src/specs/RNMBXRasterSourceNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXShapeSourceNativeComponent.d.ts +2 -1
- package/lib/typescript/src/specs/RNMBXShapeSourceNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXSnowNativeComponent.d.ts +8 -0
- package/lib/typescript/src/specs/RNMBXSnowNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/specs/RNMBXVectorSourceNativeComponent.d.ts +1 -1
- package/lib/typescript/src/specs/RNMBXVectorSourceNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/types/index.d.ts +2 -2
- package/lib/typescript/src/types/index.d.ts.map +1 -1
- package/lib/typescript/src/utils/Logger.d.ts +1 -1
- package/lib/typescript/src/utils/Logger.d.ts.map +1 -1
- package/lib/typescript/src/utils/MapboxStyles.d.ts +202 -2
- package/lib/typescript/src/utils/MapboxStyles.d.ts.map +1 -1
- package/lib/typescript/src/utils/StyleValue.d.ts +1 -1
- package/lib/typescript/src/utils/StyleValue.d.ts.map +1 -1
- package/lib/typescript/src/utils/index.d.ts +2 -2
- package/lib/typescript/src/utils/index.d.ts.map +1 -1
- package/lib/typescript/src/utils/nativeRef.d.ts +1 -1
- package/lib/typescript/src/utils/nativeRef.d.ts.map +1 -1
- package/lib/typescript/src/utils/styleMap.d.ts.map +1 -1
- package/lib/typescript/src/web/components/Camera.d.ts +3 -3
- package/lib/typescript/src/web/components/Camera.d.ts.map +1 -1
- package/package.json +12 -3
- package/plugin/build/withMapbox.d.ts +1 -1
- package/plugin/install.md +2 -2
- package/plugin/src/withMapbox.ts +2 -2
- package/src/Mapbox.native.ts +3 -1
- package/src/components/AbstractLayer.tsx +2 -2
- package/src/components/AbstractSource.tsx +1 -1
- package/src/components/Annotation.tsx +4 -4
- package/src/components/Callout.tsx +3 -3
- package/src/components/Camera.tsx +1 -1
- package/src/components/CameraGestureObserver.tsx +1 -1
- package/src/components/CircleLayer.tsx +1 -1
- package/src/components/CustomLocationProvider.tsx +1 -1
- package/src/components/FillExtrusionLayer.tsx +1 -1
- package/src/components/HeadingIndicator.tsx +1 -1
- package/src/components/HillshadeLayer.tsx +1 -1
- package/src/components/Image.tsx +1 -1
- package/src/components/ImageSource.tsx +1 -1
- package/src/components/Images.tsx +6 -3
- package/src/components/LineLayer.tsx +1 -1
- package/src/components/MapView.tsx +10 -5
- package/src/components/MarkerView.tsx +10 -3
- package/src/components/ModelLayer.tsx +1 -1
- package/src/components/NativeBridgeComponent.tsx +1 -1
- package/src/components/PointAnnotation.tsx +18 -5
- package/src/components/Rain.tsx +31 -0
- package/src/components/RasterArraySource.tsx +1 -1
- package/src/components/RasterLayer.tsx +1 -1
- package/src/components/RasterParticleLayer.tsx +1 -1
- package/src/components/RasterSource.tsx +1 -1
- package/src/components/ShapeSource.tsx +11 -4
- package/src/components/SkyLayer.tsx +1 -1
- package/src/components/Snow.tsx +22 -0
- package/src/components/SymbolLayer.tsx +1 -1
- package/src/components/UserLocation.tsx +2 -2
- package/src/components/VectorSource.tsx +2 -2
- package/src/modules/location/locationManager.ts +3 -3
- package/src/modules/offline/offlineManager.ts +1 -1
- package/src/shapeAnimators/ChangeLineOffsetsShapeAnimator.ts +1 -1
- package/src/shapeAnimators/MovePointShapeAnimator.ts +2 -2
- package/src/specs/RNMBXCameraNativeComponent.ts +3 -3
- package/src/specs/RNMBXCustomLocationProviderNativeComponent.ts +1 -1
- package/src/specs/RNMBXImageSourceNativeComponent.ts +1 -1
- package/src/specs/RNMBXMapViewNativeComponent.ts +5 -4
- package/src/specs/RNMBXMarkerViewNativeComponent.ts +2 -2
- package/src/specs/RNMBXModelLayerNativeComponent.ts +2 -2
- package/src/specs/RNMBXModelsNativeComponent.ts +1 -1
- package/src/specs/RNMBXNativeUserLocationNativeComponent.ts +1 -1
- package/src/specs/RNMBXRainNativeComponent.ts +13 -0
- package/src/specs/RNMBXRasterArraySourceNativeComponent.ts +1 -1
- package/src/specs/RNMBXRasterDemSourceNativeComponent.ts +1 -1
- package/src/specs/RNMBXRasterSourceNativeComponent.ts +1 -1
- package/src/specs/RNMBXShapeSourceNativeComponent.ts +4 -3
- package/src/specs/RNMBXSnowNativeComponent.ts +13 -0
- package/src/specs/RNMBXVectorSourceNativeComponent.ts +2 -2
- package/src/types/index.ts +2 -2
- package/src/utils/Logger.ts +1 -1
- package/src/utils/MapboxStyles.ts +222 -1
- package/src/utils/StyleValue.ts +1 -1
- package/src/utils/index.ts +3 -3
- package/src/utils/nativeRef.ts +1 -1
- package/src/utils/styleMap.ts +28 -0
- package/src/web/components/Camera.tsx +8 -4
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
@_spi(Experimental) import MapboxMaps
|
|
2
|
+
|
|
3
|
+
@objc(RNMBXSnow)
|
|
4
|
+
public class RNMBXSnow : RNMBXSingletonLayer, RNMBXMapComponent, RNMBXSourceConsumer {
|
|
5
|
+
var snow : Snow? = nil
|
|
6
|
+
|
|
7
|
+
func makeSnow() -> Snow {
|
|
8
|
+
return Snow()
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
public func addToMap(_ map: RNMBXMapView, style: Style) {
|
|
12
|
+
self.map = map
|
|
13
|
+
self.style = style
|
|
14
|
+
|
|
15
|
+
let snow = self.makeSnow()
|
|
16
|
+
self.snow = snow
|
|
17
|
+
addStylesAndUpdate()
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
public func removeFromMap(_ map: RNMBXMapView, reason _: RemovalReason) -> Bool {
|
|
21
|
+
self.map = nil
|
|
22
|
+
|
|
23
|
+
guard let mapboxMap = map.mapboxMap else {
|
|
24
|
+
return false
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
let style = mapboxMap.style
|
|
28
|
+
removeFromMap(map, style: style)
|
|
29
|
+
return true
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
public func waitForStyleLoad() -> Bool {
|
|
33
|
+
return true
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
func removeFromMap(_ map: RNMBXMapView, style: Style) {
|
|
37
|
+
logged("RNMBXSnow.removeFromMap") {
|
|
38
|
+
try style.removeSnow()
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
override func addStylesAndUpdate() {
|
|
43
|
+
guard snow != nil else {
|
|
44
|
+
return
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
super.addStylesAndUpdate()
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
override func addStyles() {
|
|
51
|
+
if let style : Style = self.style,
|
|
52
|
+
let reactStyle = self.reactStyle {
|
|
53
|
+
let styler = RNMBXStyle(style: style)
|
|
54
|
+
styler.bridge = self.bridge
|
|
55
|
+
|
|
56
|
+
if var snow = snow {
|
|
57
|
+
styler.snowLayer(
|
|
58
|
+
layer: &snow,
|
|
59
|
+
reactStyle: reactStyle,
|
|
60
|
+
oldReactStyle: oldReactStyle,
|
|
61
|
+
applyUpdater: { (updater) in fatalError("Snow: TODO - implement apply updater")},
|
|
62
|
+
isValid: { fatalError("Snow: TODO - no isValid") }
|
|
63
|
+
)
|
|
64
|
+
self.snow = snow
|
|
65
|
+
} else {
|
|
66
|
+
fatalError("[xxx] snow is nil \(optional: self.snow)")
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
override func apply(style : Style) throws {
|
|
72
|
+
if let snow = snow {
|
|
73
|
+
try style.setSnow(snow)
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#ifdef __cplusplus
|
|
2
|
+
|
|
3
|
+
#import <UIKit/UIKit.h>
|
|
4
|
+
|
|
5
|
+
#import <React/RCTUIManager.h>
|
|
6
|
+
#import <React/RCTViewComponentView.h>
|
|
7
|
+
|
|
8
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
9
|
+
|
|
10
|
+
@interface RNMBXSnowComponentView : RCTViewComponentView
|
|
11
|
+
@end
|
|
12
|
+
|
|
13
|
+
NS_ASSUME_NONNULL_END
|
|
14
|
+
#endif // __cplusplus
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
|
|
2
|
+
#import "RNMBXSnowComponentView.h"
|
|
3
|
+
#import "RNMBXFabricHelpers.h"
|
|
4
|
+
|
|
5
|
+
#import <React/RCTBridge+Private.h>
|
|
6
|
+
#import "RNMBXBridgeManager.h"
|
|
7
|
+
#import <React/RCTConversions.h>
|
|
8
|
+
#import <React/RCTFabricComponentsPlugins.h>
|
|
9
|
+
|
|
10
|
+
#import <react/renderer/components/rnmapbox_maps_specs/ComponentDescriptors.h>
|
|
11
|
+
#import <react/renderer/components/rnmapbox_maps_specs/EventEmitters.h>
|
|
12
|
+
#import <react/renderer/components/rnmapbox_maps_specs/Props.h>
|
|
13
|
+
#import <react/renderer/components/rnmapbox_maps_specs/RCTComponentViewHelpers.h>
|
|
14
|
+
|
|
15
|
+
using namespace facebook::react;
|
|
16
|
+
|
|
17
|
+
@interface RNMBXSnowComponentView () <RCTRNMBXSnowViewProtocol>
|
|
18
|
+
@end
|
|
19
|
+
|
|
20
|
+
@implementation RNMBXSnowComponentView {
|
|
21
|
+
RNMBXSnow *_view;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Needed because of this: https://github.com/facebook/react-native/pull/37274
|
|
25
|
+
+ (void)load
|
|
26
|
+
{
|
|
27
|
+
[super load];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
- (instancetype)initWithFrame:(CGRect)frame
|
|
31
|
+
{
|
|
32
|
+
if (self = [super initWithFrame:frame]) {
|
|
33
|
+
static const auto defaultProps = std::make_shared<const RNMBXSnowProps>();
|
|
34
|
+
_props = defaultProps;
|
|
35
|
+
[self prepareView];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return self;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
- (void)prepareView
|
|
42
|
+
{
|
|
43
|
+
_view = [[RNMBXSnow alloc] init];
|
|
44
|
+
_view.bridge = [RNMBXBridgeManager currentBridge];
|
|
45
|
+
|
|
46
|
+
self.contentView = _view;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
#pragma mark - RCTComponentViewProtocol
|
|
50
|
+
|
|
51
|
+
+ (ComponentDescriptorProvider)componentDescriptorProvider
|
|
52
|
+
{
|
|
53
|
+
return concreteComponentDescriptorProvider<RNMBXSnowComponentDescriptor>();
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
- (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared &)oldProps
|
|
58
|
+
{
|
|
59
|
+
const auto &newProps = static_cast<const RNMBXSnowProps &>(*props);
|
|
60
|
+
id reactStyle = RNMBXConvertFollyDynamicToId(newProps.reactStyle);
|
|
61
|
+
if (reactStyle != nil) {
|
|
62
|
+
_view.reactStyle = reactStyle;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
[super updateProps:props oldProps:oldProps];
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
- (void)prepareForRecycle
|
|
69
|
+
{
|
|
70
|
+
[super prepareForRecycle];
|
|
71
|
+
[self prepareView];
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
@end
|
|
76
|
+
|
|
77
|
+
Class<RCTComponentViewProtocol> RNMBXSnowCls(void)
|
|
78
|
+
{
|
|
79
|
+
return RNMBXSnowComponentView.class;
|
|
80
|
+
}
|