@maplibre/maplibre-react-native 10.0.0-alpha.26 → 10.0.0-alpha.28
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/CHANGELOG.md +8 -0
- package/README.md +2 -2
- package/android/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleFactory.java +1 -1
- package/ios/RCTMLN/RCTMLNStyle.h +1 -1
- package/ios/RCTMLN/RCTMLNStyle.m +1 -1
- package/lib/commonjs/MLNModule.js +27 -0
- package/lib/commonjs/MLNModule.js.map +1 -0
- package/lib/commonjs/MapLibreRN.js +281 -0
- package/lib/commonjs/MapLibreRN.js.map +1 -0
- package/lib/commonjs/assets/png.d.js +2 -0
- package/lib/commonjs/assets/png.d.js.map +1 -0
- package/lib/commonjs/components/Annotation.js +109 -0
- package/lib/commonjs/components/Annotation.js.map +1 -0
- package/lib/commonjs/components/BackgroundLayer.js +33 -0
- package/lib/commonjs/components/BackgroundLayer.js.map +1 -0
- package/lib/commonjs/components/Callout.js +101 -0
- package/lib/commonjs/components/Callout.js.map +1 -0
- package/lib/commonjs/components/Camera.js +285 -0
- package/lib/commonjs/components/Camera.js.map +1 -0
- package/lib/commonjs/components/CircleLayer.js +37 -0
- package/lib/commonjs/components/CircleLayer.js.map +1 -0
- package/lib/commonjs/components/FillExtrusionLayer.js +36 -0
- package/lib/commonjs/components/FillExtrusionLayer.js.map +1 -0
- package/lib/commonjs/components/FillLayer.js +36 -0
- package/lib/commonjs/components/FillLayer.js.map +1 -0
- package/lib/commonjs/components/HeadingIndicator.js +28 -0
- package/lib/commonjs/components/HeadingIndicator.js.map +1 -0
- package/lib/commonjs/components/HeatmapLayer.js +35 -0
- package/lib/commonjs/components/HeatmapLayer.js.map +1 -0
- package/lib/commonjs/components/ImageSource.js +42 -0
- package/lib/commonjs/components/ImageSource.js.map +1 -0
- package/lib/commonjs/components/Images.js +80 -0
- package/lib/commonjs/components/Images.js.map +1 -0
- package/lib/commonjs/components/Light.js +32 -0
- package/lib/commonjs/components/Light.js.map +1 -0
- package/lib/commonjs/components/LineLayer.js +36 -0
- package/lib/commonjs/components/LineLayer.js.map +1 -0
- package/lib/commonjs/components/MapView.js +463 -0
- package/lib/commonjs/components/MapView.js.map +1 -0
- package/lib/commonjs/components/MarkerView.js +61 -0
- package/lib/commonjs/components/MarkerView.js.map +1 -0
- package/lib/commonjs/components/NativeUserLocation.js +17 -0
- package/lib/commonjs/components/NativeUserLocation.js.map +1 -0
- package/lib/commonjs/components/PointAnnotation.js +121 -0
- package/lib/commonjs/components/PointAnnotation.js.map +1 -0
- package/lib/commonjs/components/RasterLayer.js +32 -0
- package/lib/commonjs/components/RasterLayer.js.map +1 -0
- package/lib/commonjs/components/RasterSource.js +67 -0
- package/lib/commonjs/components/RasterSource.js.map +1 -0
- package/lib/commonjs/components/ShapeSource.js +203 -0
- package/lib/commonjs/components/ShapeSource.js.map +1 -0
- package/lib/commonjs/components/Style.js +266 -0
- package/lib/commonjs/components/Style.js.map +1 -0
- package/lib/commonjs/components/SymbolLayer.js +53 -0
- package/lib/commonjs/components/SymbolLayer.js.map +1 -0
- package/lib/commonjs/components/UserLocation.js +188 -0
- package/lib/commonjs/components/UserLocation.js.map +1 -0
- package/lib/commonjs/components/VectorSource.js +129 -0
- package/lib/commonjs/components/VectorSource.js.map +1 -0
- package/lib/commonjs/hooks/useAbstractLayer.js +53 -0
- package/lib/commonjs/hooks/useAbstractLayer.js.map +1 -0
- package/lib/commonjs/hooks/useAbstractSource.js +24 -0
- package/lib/commonjs/hooks/useAbstractSource.js.map +1 -0
- package/lib/commonjs/hooks/useNativeBridge.js +84 -0
- package/lib/commonjs/hooks/useNativeBridge.js.map +1 -0
- package/lib/commonjs/hooks/useNativeRef.js +14 -0
- package/lib/commonjs/hooks/useNativeRef.js.map +1 -0
- package/lib/commonjs/hooks/useOnce.js +16 -0
- package/lib/commonjs/hooks/useOnce.js.map +1 -0
- package/lib/commonjs/index.js +23 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/modules/location/locationManager.js +91 -0
- package/lib/commonjs/modules/location/locationManager.js.map +1 -0
- package/lib/commonjs/modules/offline/OfflineCreatePackOptions.js +37 -0
- package/lib/commonjs/modules/offline/OfflineCreatePackOptions.js.map +1 -0
- package/lib/commonjs/modules/offline/OfflinePack.js +40 -0
- package/lib/commonjs/modules/offline/OfflinePack.js.map +1 -0
- package/lib/commonjs/modules/offline/offlineManager.js +346 -0
- package/lib/commonjs/modules/offline/offlineManager.js.map +1 -0
- package/lib/commonjs/modules/snapshot/SnapshotOptions.js +58 -0
- package/lib/commonjs/modules/snapshot/SnapshotOptions.js.map +1 -0
- package/lib/commonjs/modules/snapshot/snapshotManager.js +66 -0
- package/lib/commonjs/modules/snapshot/snapshotManager.js.map +1 -0
- package/lib/commonjs/requestAndroidLocationPermissions.js +25 -0
- package/lib/commonjs/requestAndroidLocationPermissions.js.map +1 -0
- package/lib/commonjs/types/BaseProps.js +2 -0
- package/lib/commonjs/types/BaseProps.js.map +1 -0
- package/lib/commonjs/types/CameraMode.js +14 -0
- package/lib/commonjs/types/CameraMode.js.map +1 -0
- package/lib/commonjs/types/MapLibreRNEvent.js +6 -0
- package/lib/commonjs/types/MapLibreRNEvent.js.map +1 -0
- package/lib/commonjs/types/OnPressEvent.js +2 -0
- package/lib/commonjs/types/OnPressEvent.js.map +1 -0
- package/lib/commonjs/types/StyleURL.js +11 -0
- package/lib/commonjs/types/StyleURL.js.map +1 -0
- package/lib/commonjs/utils/BridgeValue.js +59 -0
- package/lib/commonjs/utils/BridgeValue.js.map +1 -0
- package/lib/commonjs/utils/Logger.js +118 -0
- package/lib/commonjs/utils/Logger.js.map +1 -0
- package/lib/commonjs/utils/MapLibreRNStyles.d.js +181 -0
- package/lib/commonjs/utils/MapLibreRNStyles.d.js.map +1 -0
- package/lib/commonjs/utils/StyleValue.js +39 -0
- package/lib/commonjs/utils/StyleValue.js.map +1 -0
- package/lib/commonjs/utils/animated/AbstractAnimatedCoordinates.js +95 -0
- package/lib/commonjs/utils/animated/AbstractAnimatedCoordinates.js.map +1 -0
- package/lib/commonjs/utils/animated/Animated.js +47 -0
- package/lib/commonjs/utils/animated/Animated.js.map +1 -0
- package/lib/commonjs/utils/animated/AnimatedCoordinatesArray.js +92 -0
- package/lib/commonjs/utils/animated/AnimatedCoordinatesArray.js.map +1 -0
- package/lib/commonjs/utils/animated/AnimatedExtractCoordinateFromArray.js +40 -0
- package/lib/commonjs/utils/animated/AnimatedExtractCoordinateFromArray.js.map +1 -0
- package/lib/commonjs/utils/animated/AnimatedPoint.js +111 -0
- package/lib/commonjs/utils/animated/AnimatedPoint.js.map +1 -0
- package/lib/commonjs/utils/animated/AnimatedRouteCoordinatesArray.js +137 -0
- package/lib/commonjs/utils/animated/AnimatedRouteCoordinatesArray.js.map +1 -0
- package/lib/commonjs/utils/animated/AnimatedShape.js +75 -0
- package/lib/commonjs/utils/animated/AnimatedShape.js.map +1 -0
- package/lib/commonjs/utils/deprecation.js +31 -0
- package/lib/commonjs/utils/deprecation.js.map +1 -0
- package/lib/commonjs/utils/filterUtils.js +13 -0
- package/lib/commonjs/utils/filterUtils.js.map +1 -0
- package/lib/commonjs/utils/index.js +97 -0
- package/lib/commonjs/utils/index.js.map +1 -0
- package/lib/commonjs/utils/makeNativeBounds.js +11 -0
- package/lib/commonjs/utils/makeNativeBounds.js.map +1 -0
- package/lib/commonjs/utils/styleMap.js +255 -0
- package/lib/commonjs/utils/styleMap.js.map +1 -0
- package/lib/module/MLNModule.js +15 -0
- package/lib/module/MLNModule.js.map +1 -0
- package/lib/module/MapLibreRN.js +37 -0
- package/lib/module/MapLibreRN.js.map +1 -0
- package/lib/module/assets/heading.png +0 -0
- package/lib/module/assets/heading@2x.png +0 -0
- package/lib/module/assets/heading@3x.png +0 -0
- package/lib/module/assets/png.d.js +2 -0
- package/lib/module/assets/png.d.js.map +1 -0
- package/lib/module/components/Annotation.js +104 -0
- package/lib/module/components/Annotation.js.map +1 -0
- package/lib/module/components/BackgroundLayer.js +28 -0
- package/lib/module/components/BackgroundLayer.js.map +1 -0
- package/lib/module/components/Callout.js +97 -0
- package/lib/module/components/Callout.js.map +1 -0
- package/lib/module/components/Camera.js +280 -0
- package/lib/module/components/Camera.js.map +1 -0
- package/lib/module/components/CircleLayer.js +32 -0
- package/lib/module/components/CircleLayer.js.map +1 -0
- package/lib/module/components/FillExtrusionLayer.js +31 -0
- package/lib/module/components/FillExtrusionLayer.js.map +1 -0
- package/lib/module/components/FillLayer.js +31 -0
- package/lib/module/components/FillLayer.js.map +1 -0
- package/lib/module/components/HeadingIndicator.js +23 -0
- package/lib/module/components/HeadingIndicator.js.map +1 -0
- package/lib/module/components/HeatmapLayer.js +30 -0
- package/lib/module/components/HeatmapLayer.js.map +1 -0
- package/lib/module/components/ImageSource.js +37 -0
- package/lib/module/components/ImageSource.js.map +1 -0
- package/lib/module/components/Images.js +76 -0
- package/lib/module/components/Images.js.map +1 -0
- package/lib/module/components/Light.js +27 -0
- package/lib/module/components/Light.js.map +1 -0
- package/lib/module/components/LineLayer.js +31 -0
- package/lib/module/components/LineLayer.js.map +1 -0
- package/lib/module/components/MapView.js +458 -0
- package/lib/module/components/MapView.js.map +1 -0
- package/lib/module/components/MarkerView.js +56 -0
- package/lib/module/components/MarkerView.js.map +1 -0
- package/lib/module/components/NativeUserLocation.js +13 -0
- package/lib/module/components/NativeUserLocation.js.map +1 -0
- package/lib/module/components/PointAnnotation.js +116 -0
- package/lib/module/components/PointAnnotation.js.map +1 -0
- package/lib/module/components/RasterLayer.js +27 -0
- package/lib/module/components/RasterLayer.js.map +1 -0
- package/lib/module/components/RasterSource.js +62 -0
- package/lib/module/components/RasterSource.js.map +1 -0
- package/lib/module/components/ShapeSource.js +198 -0
- package/lib/module/components/ShapeSource.js.map +1 -0
- package/lib/module/components/Style.js +261 -0
- package/lib/module/components/Style.js.map +1 -0
- package/lib/module/components/SymbolLayer.js +48 -0
- package/lib/module/components/SymbolLayer.js.map +1 -0
- package/lib/module/components/UserLocation.js +182 -0
- package/lib/module/components/UserLocation.js.map +1 -0
- package/lib/module/components/VectorSource.js +124 -0
- package/lib/module/components/VectorSource.js.map +1 -0
- package/lib/module/hooks/useAbstractLayer.js +49 -0
- package/lib/module/hooks/useAbstractLayer.js.map +1 -0
- package/lib/module/hooks/useAbstractSource.js +20 -0
- package/lib/module/hooks/useAbstractSource.js.map +1 -0
- package/lib/module/hooks/useNativeBridge.js +80 -0
- package/lib/module/hooks/useNativeBridge.js.map +1 -0
- package/lib/module/hooks/useNativeRef.js +10 -0
- package/lib/module/hooks/useNativeRef.js.map +1 -0
- package/lib/module/hooks/useOnce.js +12 -0
- package/lib/module/hooks/useOnce.js.map +1 -0
- package/lib/module/index.js +6 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/modules/location/locationManager.js +87 -0
- package/lib/module/modules/location/locationManager.js.map +1 -0
- package/lib/module/modules/offline/OfflineCreatePackOptions.js +33 -0
- package/lib/module/modules/offline/OfflineCreatePackOptions.js.map +1 -0
- package/lib/module/modules/offline/OfflinePack.js +36 -0
- package/lib/module/modules/offline/OfflinePack.js.map +1 -0
- package/lib/module/modules/offline/offlineManager.js +341 -0
- package/lib/module/modules/offline/offlineManager.js.map +1 -0
- package/lib/module/modules/snapshot/SnapshotOptions.js +53 -0
- package/lib/module/modules/snapshot/SnapshotOptions.js.map +1 -0
- package/lib/module/modules/snapshot/snapshotManager.js +61 -0
- package/lib/module/modules/snapshot/snapshotManager.js.map +1 -0
- package/lib/module/requestAndroidLocationPermissions.js +21 -0
- package/lib/module/requestAndroidLocationPermissions.js.map +1 -0
- package/lib/module/types/BaseProps.js +2 -0
- package/lib/module/types/BaseProps.js.map +1 -0
- package/lib/module/types/CameraMode.js +10 -0
- package/lib/module/types/CameraMode.js.map +1 -0
- package/lib/module/types/MapLibreRNEvent.js +4 -0
- package/lib/module/types/MapLibreRNEvent.js.map +1 -0
- package/lib/module/types/OnPressEvent.js +2 -0
- package/lib/module/types/OnPressEvent.js.map +1 -0
- package/lib/module/types/StyleURL.js +7 -0
- package/lib/module/types/StyleURL.js.map +1 -0
- package/lib/module/utils/BridgeValue.js +54 -0
- package/lib/module/utils/BridgeValue.js.map +1 -0
- package/lib/module/utils/Logger.js +114 -0
- package/lib/module/utils/Logger.js.map +1 -0
- package/lib/module/utils/MapLibreRNStyles.d.js +180 -0
- package/lib/module/utils/MapLibreRNStyles.d.js.map +1 -0
- package/lib/module/utils/StyleValue.js +34 -0
- package/lib/module/utils/StyleValue.js.map +1 -0
- package/lib/module/utils/animated/AbstractAnimatedCoordinates.js +92 -0
- package/lib/module/utils/animated/AbstractAnimatedCoordinates.js.map +1 -0
- package/lib/module/utils/animated/Animated.js +42 -0
- package/lib/module/utils/animated/Animated.js.map +1 -0
- package/lib/module/utils/animated/AnimatedCoordinatesArray.js +87 -0
- package/lib/module/utils/animated/AnimatedCoordinatesArray.js.map +1 -0
- package/lib/module/utils/animated/AnimatedExtractCoordinateFromArray.js +36 -0
- package/lib/module/utils/animated/AnimatedExtractCoordinateFromArray.js.map +1 -0
- package/lib/module/utils/animated/AnimatedPoint.js +107 -0
- package/lib/module/utils/animated/AnimatedPoint.js.map +1 -0
- package/lib/module/utils/animated/AnimatedRouteCoordinatesArray.js +131 -0
- package/lib/module/utils/animated/AnimatedRouteCoordinatesArray.js.map +1 -0
- package/lib/module/utils/animated/AnimatedShape.js +71 -0
- package/lib/module/utils/animated/AnimatedShape.js.map +1 -0
- package/lib/module/utils/deprecation.js +27 -0
- package/lib/module/utils/deprecation.js.map +1 -0
- package/lib/module/utils/filterUtils.js +9 -0
- package/lib/module/utils/filterUtils.js.map +1 -0
- package/lib/module/utils/index.js +81 -0
- package/lib/module/utils/index.js.map +1 -0
- package/lib/module/utils/makeNativeBounds.js +7 -0
- package/lib/module/utils/makeNativeBounds.js.map +1 -0
- package/lib/module/utils/styleMap.js +249 -0
- package/lib/module/utils/styleMap.js.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/src/MLNModule.d.ts +21 -0
- package/lib/typescript/commonjs/src/MLNModule.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/MapLibreRN.d.ts +42 -0
- package/lib/typescript/commonjs/src/MapLibreRN.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Annotation.d.ts +21 -0
- package/lib/typescript/commonjs/src/components/Annotation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/BackgroundLayer.d.ts +14 -0
- package/lib/typescript/commonjs/src/components/BackgroundLayer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Callout.d.ts +35 -0
- package/lib/typescript/commonjs/src/components/Callout.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Camera.d.ts +134 -0
- package/lib/typescript/commonjs/src/components/Camera.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/CircleLayer.d.ts +17 -0
- package/lib/typescript/commonjs/src/components/CircleLayer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/FillExtrusionLayer.d.ts +17 -0
- package/lib/typescript/commonjs/src/components/FillExtrusionLayer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/FillLayer.d.ts +17 -0
- package/lib/typescript/commonjs/src/components/FillLayer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/HeadingIndicator.d.ts +8 -0
- package/lib/typescript/commonjs/src/components/HeadingIndicator.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/HeatmapLayer.d.ts +17 -0
- package/lib/typescript/commonjs/src/components/HeatmapLayer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ImageSource.d.ts +31 -0
- package/lib/typescript/commonjs/src/components/ImageSource.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Images.d.ts +33 -0
- package/lib/typescript/commonjs/src/components/Images.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Light.d.ts +17 -0
- package/lib/typescript/commonjs/src/components/Light.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/LineLayer.d.ts +17 -0
- package/lib/typescript/commonjs/src/components/LineLayer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/MapView.d.ts +235 -0
- package/lib/typescript/commonjs/src/components/MapView.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/MarkerView.d.ts +44 -0
- package/lib/typescript/commonjs/src/components/MarkerView.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/NativeUserLocation.d.ts +26 -0
- package/lib/typescript/commonjs/src/components/NativeUserLocation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/PointAnnotation.d.ts +91 -0
- package/lib/typescript/commonjs/src/components/PointAnnotation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/RasterLayer.d.ts +14 -0
- package/lib/typescript/commonjs/src/components/RasterLayer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/RasterSource.d.ts +53 -0
- package/lib/typescript/commonjs/src/components/RasterSource.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ShapeSource.d.ts +124 -0
- package/lib/typescript/commonjs/src/components/ShapeSource.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Style.d.ts +81 -0
- package/lib/typescript/commonjs/src/components/Style.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/SymbolLayer.d.ts +22 -0
- package/lib/typescript/commonjs/src/components/SymbolLayer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/UserLocation.d.ts +70 -0
- package/lib/typescript/commonjs/src/components/UserLocation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/VectorSource.d.ts +70 -0
- package/lib/typescript/commonjs/src/components/VectorSource.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hooks/useAbstractLayer.d.ts +62 -0
- package/lib/typescript/commonjs/src/hooks/useAbstractLayer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hooks/useAbstractSource.d.ts +7 -0
- package/lib/typescript/commonjs/src/hooks/useAbstractSource.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hooks/useNativeBridge.d.ts +21 -0
- package/lib/typescript/commonjs/src/hooks/useNativeBridge.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hooks/useNativeRef.d.ts +8 -0
- package/lib/typescript/commonjs/src/hooks/useNativeRef.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hooks/useOnce.d.ts +3 -0
- package/lib/typescript/commonjs/src/hooks/useOnce.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +4 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/location/locationManager.d.ts +64 -0
- package/lib/typescript/commonjs/src/modules/location/locationManager.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/offline/OfflineCreatePackOptions.d.ts +21 -0
- package/lib/typescript/commonjs/src/modules/offline/OfflineCreatePackOptions.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/offline/OfflinePack.d.ts +24 -0
- package/lib/typescript/commonjs/src/modules/offline/OfflinePack.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/offline/offlineManager.d.ts +210 -0
- package/lib/typescript/commonjs/src/modules/offline/offlineManager.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/snapshot/SnapshotOptions.d.ts +42 -0
- package/lib/typescript/commonjs/src/modules/snapshot/SnapshotOptions.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/snapshot/snapshotManager.d.ts +52 -0
- package/lib/typescript/commonjs/src/modules/snapshot/snapshotManager.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/requestAndroidLocationPermissions.d.ts +2 -0
- package/lib/typescript/commonjs/src/requestAndroidLocationPermissions.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/BaseProps.d.ts +4 -0
- package/lib/typescript/commonjs/src/types/BaseProps.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/CameraMode.d.ts +7 -0
- package/lib/typescript/commonjs/src/types/CameraMode.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/MapLibreRNEvent.d.ts +6 -0
- package/lib/typescript/commonjs/src/types/MapLibreRNEvent.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/OnPressEvent.d.ts +12 -0
- package/lib/typescript/commonjs/src/types/OnPressEvent.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/StyleURL.d.ts +4 -0
- package/lib/typescript/commonjs/src/types/StyleURL.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/utils/BridgeValue.d.ts +29 -0
- package/lib/typescript/commonjs/src/utils/BridgeValue.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/utils/Logger.d.ts +52 -0
- package/lib/typescript/commonjs/src/utils/Logger.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/utils/StyleValue.d.ts +10 -0
- package/lib/typescript/commonjs/src/utils/StyleValue.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/utils/animated/AbstractAnimatedCoordinates.d.ts +36 -0
- package/lib/typescript/commonjs/src/utils/animated/AbstractAnimatedCoordinates.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/utils/animated/Animated.d.ts +33 -0
- package/lib/typescript/commonjs/src/utils/animated/Animated.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/utils/animated/AnimatedCoordinatesArray.d.ts +40 -0
- package/lib/typescript/commonjs/src/utils/animated/AnimatedCoordinatesArray.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts +11 -0
- package/lib/typescript/commonjs/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/utils/animated/AnimatedPoint.d.ts +31 -0
- package/lib/typescript/commonjs/src/utils/animated/AnimatedPoint.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/utils/animated/AnimatedRouteCoordinatesArray.d.ts +54 -0
- package/lib/typescript/commonjs/src/utils/animated/AnimatedRouteCoordinatesArray.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/utils/animated/AnimatedShape.d.ts +27 -0
- package/lib/typescript/commonjs/src/utils/animated/AnimatedShape.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/utils/deprecation.d.ts +6 -0
- package/lib/typescript/commonjs/src/utils/deprecation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/utils/filterUtils.d.ts +3 -0
- package/lib/typescript/commonjs/src/utils/filterUtils.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/utils/index.d.ts +21 -0
- package/lib/typescript/commonjs/src/utils/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/utils/makeNativeBounds.d.ts +2 -0
- package/lib/typescript/commonjs/src/utils/makeNativeBounds.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/utils/styleMap.d.ts +231 -0
- package/lib/typescript/commonjs/src/utils/styleMap.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/src/MLNModule.d.ts +21 -0
- package/lib/typescript/module/src/MLNModule.d.ts.map +1 -0
- package/lib/typescript/module/src/MapLibreRN.d.ts +42 -0
- package/lib/typescript/module/src/MapLibreRN.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Annotation.d.ts +21 -0
- package/lib/typescript/module/src/components/Annotation.d.ts.map +1 -0
- package/lib/typescript/module/src/components/BackgroundLayer.d.ts +14 -0
- package/lib/typescript/module/src/components/BackgroundLayer.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Callout.d.ts +35 -0
- package/lib/typescript/module/src/components/Callout.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Camera.d.ts +134 -0
- package/lib/typescript/module/src/components/Camera.d.ts.map +1 -0
- package/lib/typescript/module/src/components/CircleLayer.d.ts +17 -0
- package/lib/typescript/module/src/components/CircleLayer.d.ts.map +1 -0
- package/lib/typescript/module/src/components/FillExtrusionLayer.d.ts +17 -0
- package/lib/typescript/module/src/components/FillExtrusionLayer.d.ts.map +1 -0
- package/lib/typescript/module/src/components/FillLayer.d.ts +17 -0
- package/lib/typescript/module/src/components/FillLayer.d.ts.map +1 -0
- package/lib/typescript/module/src/components/HeadingIndicator.d.ts +8 -0
- package/lib/typescript/module/src/components/HeadingIndicator.d.ts.map +1 -0
- package/lib/typescript/module/src/components/HeatmapLayer.d.ts +17 -0
- package/lib/typescript/module/src/components/HeatmapLayer.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ImageSource.d.ts +31 -0
- package/lib/typescript/module/src/components/ImageSource.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Images.d.ts +33 -0
- package/lib/typescript/module/src/components/Images.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Light.d.ts +17 -0
- package/lib/typescript/module/src/components/Light.d.ts.map +1 -0
- package/lib/typescript/module/src/components/LineLayer.d.ts +17 -0
- package/lib/typescript/module/src/components/LineLayer.d.ts.map +1 -0
- package/lib/typescript/module/src/components/MapView.d.ts +235 -0
- package/lib/typescript/module/src/components/MapView.d.ts.map +1 -0
- package/lib/typescript/module/src/components/MarkerView.d.ts +44 -0
- package/lib/typescript/module/src/components/MarkerView.d.ts.map +1 -0
- package/lib/typescript/module/src/components/NativeUserLocation.d.ts +26 -0
- package/lib/typescript/module/src/components/NativeUserLocation.d.ts.map +1 -0
- package/lib/typescript/module/src/components/PointAnnotation.d.ts +91 -0
- package/lib/typescript/module/src/components/PointAnnotation.d.ts.map +1 -0
- package/lib/typescript/module/src/components/RasterLayer.d.ts +14 -0
- package/lib/typescript/module/src/components/RasterLayer.d.ts.map +1 -0
- package/lib/typescript/module/src/components/RasterSource.d.ts +53 -0
- package/lib/typescript/module/src/components/RasterSource.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ShapeSource.d.ts +124 -0
- package/lib/typescript/module/src/components/ShapeSource.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Style.d.ts +81 -0
- package/lib/typescript/module/src/components/Style.d.ts.map +1 -0
- package/lib/typescript/module/src/components/SymbolLayer.d.ts +22 -0
- package/lib/typescript/module/src/components/SymbolLayer.d.ts.map +1 -0
- package/lib/typescript/module/src/components/UserLocation.d.ts +70 -0
- package/lib/typescript/module/src/components/UserLocation.d.ts.map +1 -0
- package/lib/typescript/module/src/components/VectorSource.d.ts +70 -0
- package/lib/typescript/module/src/components/VectorSource.d.ts.map +1 -0
- package/lib/typescript/module/src/hooks/useAbstractLayer.d.ts +62 -0
- package/lib/typescript/module/src/hooks/useAbstractLayer.d.ts.map +1 -0
- package/lib/typescript/module/src/hooks/useAbstractSource.d.ts +7 -0
- package/lib/typescript/module/src/hooks/useAbstractSource.d.ts.map +1 -0
- package/lib/typescript/module/src/hooks/useNativeBridge.d.ts +21 -0
- package/lib/typescript/module/src/hooks/useNativeBridge.d.ts.map +1 -0
- package/lib/typescript/module/src/hooks/useNativeRef.d.ts +8 -0
- package/lib/typescript/module/src/hooks/useNativeRef.d.ts.map +1 -0
- package/lib/typescript/module/src/hooks/useOnce.d.ts +3 -0
- package/lib/typescript/module/src/hooks/useOnce.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +4 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/location/locationManager.d.ts +64 -0
- package/lib/typescript/module/src/modules/location/locationManager.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/offline/OfflineCreatePackOptions.d.ts +21 -0
- package/lib/typescript/module/src/modules/offline/OfflineCreatePackOptions.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/offline/OfflinePack.d.ts +24 -0
- package/lib/typescript/module/src/modules/offline/OfflinePack.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/offline/offlineManager.d.ts +210 -0
- package/lib/typescript/module/src/modules/offline/offlineManager.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/snapshot/SnapshotOptions.d.ts +42 -0
- package/lib/typescript/module/src/modules/snapshot/SnapshotOptions.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/snapshot/snapshotManager.d.ts +52 -0
- package/lib/typescript/module/src/modules/snapshot/snapshotManager.d.ts.map +1 -0
- package/lib/typescript/module/src/requestAndroidLocationPermissions.d.ts +2 -0
- package/lib/typescript/module/src/requestAndroidLocationPermissions.d.ts.map +1 -0
- package/lib/typescript/module/src/types/BaseProps.d.ts +4 -0
- package/lib/typescript/module/src/types/BaseProps.d.ts.map +1 -0
- package/lib/typescript/module/src/types/CameraMode.d.ts +7 -0
- package/lib/typescript/module/src/types/CameraMode.d.ts.map +1 -0
- package/lib/typescript/module/src/types/MapLibreRNEvent.d.ts +6 -0
- package/lib/typescript/module/src/types/MapLibreRNEvent.d.ts.map +1 -0
- package/lib/typescript/module/src/types/OnPressEvent.d.ts +12 -0
- package/lib/typescript/module/src/types/OnPressEvent.d.ts.map +1 -0
- package/lib/typescript/module/src/types/StyleURL.d.ts +4 -0
- package/lib/typescript/module/src/types/StyleURL.d.ts.map +1 -0
- package/lib/typescript/module/src/utils/BridgeValue.d.ts +29 -0
- package/lib/typescript/module/src/utils/BridgeValue.d.ts.map +1 -0
- package/lib/typescript/module/src/utils/Logger.d.ts +52 -0
- package/lib/typescript/module/src/utils/Logger.d.ts.map +1 -0
- package/lib/typescript/module/src/utils/StyleValue.d.ts +10 -0
- package/lib/typescript/module/src/utils/StyleValue.d.ts.map +1 -0
- package/lib/typescript/module/src/utils/animated/AbstractAnimatedCoordinates.d.ts +36 -0
- package/lib/typescript/module/src/utils/animated/AbstractAnimatedCoordinates.d.ts.map +1 -0
- package/lib/typescript/module/src/utils/animated/Animated.d.ts +33 -0
- package/lib/typescript/module/src/utils/animated/Animated.d.ts.map +1 -0
- package/lib/typescript/module/src/utils/animated/AnimatedCoordinatesArray.d.ts +40 -0
- package/lib/typescript/module/src/utils/animated/AnimatedCoordinatesArray.d.ts.map +1 -0
- package/lib/typescript/module/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts +11 -0
- package/lib/typescript/module/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts.map +1 -0
- package/lib/typescript/module/src/utils/animated/AnimatedPoint.d.ts +31 -0
- package/lib/typescript/module/src/utils/animated/AnimatedPoint.d.ts.map +1 -0
- package/lib/typescript/module/src/utils/animated/AnimatedRouteCoordinatesArray.d.ts +54 -0
- package/lib/typescript/module/src/utils/animated/AnimatedRouteCoordinatesArray.d.ts.map +1 -0
- package/lib/typescript/module/src/utils/animated/AnimatedShape.d.ts +27 -0
- package/lib/typescript/module/src/utils/animated/AnimatedShape.d.ts.map +1 -0
- package/lib/typescript/module/src/utils/deprecation.d.ts +6 -0
- package/lib/typescript/module/src/utils/deprecation.d.ts.map +1 -0
- package/lib/typescript/module/src/utils/filterUtils.d.ts +3 -0
- package/lib/typescript/module/src/utils/filterUtils.d.ts.map +1 -0
- package/lib/typescript/module/src/utils/index.d.ts +21 -0
- package/lib/typescript/module/src/utils/index.d.ts.map +1 -0
- package/lib/typescript/module/src/utils/makeNativeBounds.d.ts +2 -0
- package/lib/typescript/module/src/utils/makeNativeBounds.d.ts.map +1 -0
- package/lib/typescript/module/src/utils/styleMap.d.ts +231 -0
- package/lib/typescript/module/src/utils/styleMap.d.ts.map +1 -0
- package/package.json +83 -6
- package/plugin/build/withMapLibre.d.ts +1 -1
- package/{javascript/Maplibre.ts → src/MapLibreRN.ts} +1 -1
- package/src/assets/heading.png +0 -0
- package/src/assets/heading@2x.png +0 -0
- package/src/assets/heading@3x.png +0 -0
- package/src/assets/png.d.ts +4 -0
- package/{javascript → src}/components/Annotation.tsx +8 -8
- package/{javascript → src}/components/BackgroundLayer.tsx +4 -4
- package/{javascript → src}/components/Callout.tsx +5 -5
- package/{javascript → src}/components/Camera.tsx +5 -5
- package/{javascript → src}/components/CircleLayer.tsx +4 -4
- package/{javascript → src}/components/FillExtrusionLayer.tsx +4 -4
- package/{javascript → src}/components/FillLayer.tsx +4 -4
- package/{javascript → src}/components/HeadingIndicator.tsx +3 -4
- package/{javascript → src}/components/HeatmapLayer.tsx +4 -4
- package/{javascript → src}/components/ImageSource.tsx +2 -2
- package/{javascript → src}/components/Images.tsx +7 -7
- package/{javascript → src}/components/Light.tsx +6 -4
- package/{javascript → src}/components/LineLayer.tsx +4 -4
- package/{javascript → src}/components/MapView.tsx +12 -11
- package/{javascript → src}/components/MarkerView.tsx +2 -2
- package/{javascript → src}/components/NativeUserLocation.tsx +1 -1
- package/{javascript → src}/components/PointAnnotation.tsx +5 -5
- package/{javascript → src}/components/RasterLayer.tsx +4 -4
- package/{javascript → src}/components/RasterSource.tsx +1 -1
- package/{javascript → src}/components/ShapeSource.tsx +13 -9
- package/{javascript → src}/components/Style.tsx +32 -29
- package/{javascript → src}/components/SymbolLayer.tsx +7 -7
- package/{javascript → src}/components/UserLocation.tsx +18 -8
- package/{javascript → src}/components/VectorSource.tsx +6 -6
- package/{javascript → src}/hooks/useAbstractLayer.ts +9 -9
- package/{javascript → src}/hooks/useAbstractSource.ts +2 -2
- package/{javascript → src}/hooks/useNativeBridge.ts +2 -2
- package/{javascript → src}/hooks/useNativeRef.ts +2 -2
- package/src/index.ts +4 -0
- package/{javascript → src}/modules/location/locationManager.ts +1 -1
- package/{javascript → src}/modules/offline/offlineManager.ts +18 -13
- package/{javascript → src}/modules/snapshot/snapshotManager.ts +1 -1
- package/{javascript → src}/requestAndroidLocationPermissions.ts +3 -3
- package/src/types/BaseProps.ts +3 -0
- package/src/types/MapLibreRNEvent.ts +7 -0
- package/{javascript → src}/types/OnPressEvent.ts +1 -3
- package/src/types/StyleURL.ts +3 -0
- package/{javascript → src}/utils/BridgeValue.ts +8 -8
- package/{javascript → src}/utils/Logger.ts +1 -1
- package/{javascript/utils/MaplibreStyles.d.ts → src/utils/MapLibreRNStyles.d.ts} +3 -1
- package/{javascript → src}/utils/StyleValue.ts +2 -2
- package/{javascript → src}/utils/animated/Animated.ts +2 -2
- package/{javascript → src}/utils/animated/AnimatedCoordinatesArray.ts +24 -19
- package/{javascript → src}/utils/animated/AnimatedPoint.ts +4 -4
- package/{javascript → src}/utils/animated/AnimatedRouteCoordinatesArray.ts +14 -9
- package/{javascript → src}/utils/filterUtils.ts +1 -1
- package/{javascript → src}/utils/index.ts +13 -12
- package/{javascript → src}/utils/styleMap.ts +1 -1
- package/.eslintrc.js +0 -5
- package/.git-blame-ignore-revs +0 -3
- package/.gitattributes +0 -1
- package/.nvmrc +0 -1
- package/.sonarcloud.properties +0 -15
- package/CODE_OF_CONDUCT.md +0 -2
- package/CONTRIBUTING.md +0 -61
- package/RELEASE.md +0 -30
- package/assets/indoor_building_map_android.png +0 -0
- package/assets/indoor_building_map_ios.png +0 -0
- package/babel.config.js +0 -12
- package/docs/Annotation.md +0 -29
- package/docs/Annotations.md +0 -12
- package/docs/BackgroundLayer.md +0 -166
- package/docs/Callout.md +0 -16
- package/docs/Camera.md +0 -132
- package/docs/CircleLayer.md +0 -487
- package/docs/CustomHttpHeaders.md +0 -87
- package/docs/FillExtrusionLayer.md +0 -349
- package/docs/FillLayer.md +0 -317
- package/docs/GettingStarted.md +0 -113
- package/docs/HeadingIndicator.md +0 -11
- package/docs/HeatmapLayer.md +0 -214
- package/docs/ImageSource.md +0 -14
- package/docs/Images.md +0 -15
- package/docs/Light.md +0 -167
- package/docs/LineLayer.md +0 -603
- package/docs/Logger.md +0 -23
- package/docs/MapLibreGL.md +0 -65
- package/docs/MapView.md +0 -178
- package/docs/MarkerView.md +0 -17
- package/docs/NativeUserLocation.md +0 -13
- package/docs/PointAnnotation.md +0 -28
- package/docs/RasterLayer.md +0 -357
- package/docs/RasterSource.md +0 -19
- package/docs/ShapeSource.md +0 -104
- package/docs/Style.md +0 -11
- package/docs/StyleSheet.md +0 -451
- package/docs/SymbolLayer.md +0 -1752
- package/docs/UserLocation.md +0 -43
- package/docs/VectorSource.md +0 -50
- package/docs/coordinates.md +0 -7
- package/docs/docs.json +0 -5390
- package/docs/location.md +0 -7
- package/docs/offlineManager.md +0 -231
- package/docs/snapshotManager.md +0 -54
- package/ios/RCTMLN/index.d.ts +0 -1183
- package/javascript/index.ts +0 -4
- package/javascript/types/BaseProps.ts +0 -5
- package/javascript/types/index.ts +0 -11
- package/jest-setup.ts +0 -113
- package/jest.config.js +0 -8
- package/plugin/install.md +0 -25
- package/scripts/.eslintrc.js +0 -3
- package/scripts/codegen.ts +0 -340
- package/scripts/templates/MaplibreStyles.ts.ejs +0 -100
- package/scripts/templates/RCTMLNStyle.h.ejs +0 -34
- package/scripts/templates/RCTMLNStyle.m.ejs +0 -98
- package/scripts/templates/RCTMLNStyleFactory.java.ejs +0 -108
- package/scripts/templates/component.md.ejs +0 -125
- package/scripts/templates/index.d.ts.ejs +0 -86
- package/scripts/templates/styleMap.ts.ejs +0 -86
- package/scripts/utils/DocJSONBuilder.ts +0 -463
- package/scripts/utils/JSDocNodeTree.ts +0 -135
- package/scripts/utils/MarkdownBuilder.ts +0 -44
- package/scripts/utils/TemplateHelpers.ts +0 -499
- package/scripts/utils/getNativeVersion.ts +0 -53
- package/tsconfig.json +0 -22
- /package/{assets → lib/commonjs/assets}/heading.png +0 -0
- /package/{assets → lib/commonjs/assets}/heading@2x.png +0 -0
- /package/{assets → lib/commonjs/assets}/heading@3x.png +0 -0
- /package/{javascript → src}/MLNModule.ts +0 -0
- /package/{javascript → src}/hooks/useOnce.ts +0 -0
- /package/{javascript → src}/modules/offline/OfflineCreatePackOptions.ts +0 -0
- /package/{javascript → src}/modules/offline/OfflinePack.ts +0 -0
- /package/{javascript → src}/modules/snapshot/SnapshotOptions.ts +0 -0
- /package/{javascript → src}/types/CameraMode.ts +0 -0
- /package/{javascript → src}/utils/animated/AbstractAnimatedCoordinates.ts +0 -0
- /package/{javascript → src}/utils/animated/AnimatedExtractCoordinateFromArray.ts +0 -0
- /package/{javascript → src}/utils/animated/AnimatedShape.ts +0 -0
- /package/{javascript → src}/utils/deprecation.ts +0 -0
- /package/{javascript → src}/utils/makeNativeBounds.ts +0 -0
package/javascript/index.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { SyntheticEvent } from "react";
|
|
2
|
-
|
|
3
|
-
export type MaplibreGLEvent<
|
|
4
|
-
T extends string,
|
|
5
|
-
P = GeoJSON.Feature,
|
|
6
|
-
V = Element,
|
|
7
|
-
> = SyntheticEvent<V, { type: T; payload: P }>;
|
|
8
|
-
|
|
9
|
-
export enum StyleURL {
|
|
10
|
-
Default = "https://demotiles.maplibre.org/style.json",
|
|
11
|
-
}
|
package/jest-setup.ts
DELETED
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-undef, import/no-extraneous-dependencies */
|
|
2
|
-
import "@testing-library/react-native/extend-expect";
|
|
3
|
-
import { NativeModules } from "react-native";
|
|
4
|
-
|
|
5
|
-
// Silence the warning: Animated: `useNativeDriver` is not supported because the native animated module is missing
|
|
6
|
-
jest.mock("react-native/Libraries/Animated/NativeAnimatedHelper");
|
|
7
|
-
|
|
8
|
-
function keyMirror(keys: string[]) {
|
|
9
|
-
const obj: Record<string, string> = {};
|
|
10
|
-
keys.forEach((key) => (obj[key] = key));
|
|
11
|
-
return obj;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
// Mock of what the native code puts on the JS object
|
|
15
|
-
NativeModules.MLNModule = {
|
|
16
|
-
// constants
|
|
17
|
-
UserTrackingModes: keyMirror([
|
|
18
|
-
"None",
|
|
19
|
-
"Follow",
|
|
20
|
-
"FollowWithCourse",
|
|
21
|
-
"FollowWithHeading",
|
|
22
|
-
]),
|
|
23
|
-
StyleURL: keyMirror(["Default"]),
|
|
24
|
-
EventTypes: keyMirror([
|
|
25
|
-
"MapClick",
|
|
26
|
-
"MapLongClick",
|
|
27
|
-
"RegionWillChange",
|
|
28
|
-
"RegionIsChanging",
|
|
29
|
-
"RegionDidChange",
|
|
30
|
-
"WillStartLoadingMap",
|
|
31
|
-
"DidFinishLoadingMap",
|
|
32
|
-
"DidFailLoadingMap",
|
|
33
|
-
"WillStartRenderingFrame",
|
|
34
|
-
"DidFinishRenderingFrame",
|
|
35
|
-
"DidFinishRenderingFrameFully",
|
|
36
|
-
"DidFinishLoadingStyle",
|
|
37
|
-
"SetCameraComplete",
|
|
38
|
-
]),
|
|
39
|
-
CameraModes: keyMirror(["Flight", "Ease", "None"]),
|
|
40
|
-
StyleSource: keyMirror(["DefaultSourceID"]),
|
|
41
|
-
InterpolationMode: keyMirror([
|
|
42
|
-
"Exponential",
|
|
43
|
-
"Categorical",
|
|
44
|
-
"Interval",
|
|
45
|
-
"Identity",
|
|
46
|
-
]),
|
|
47
|
-
LineJoin: keyMirror(["Bevel", "Round", "Miter"]),
|
|
48
|
-
LineCap: keyMirror(["Butt", "Round", "Square"]),
|
|
49
|
-
LineTranslateAnchor: keyMirror(["Map", "Viewport"]),
|
|
50
|
-
CirclePitchScale: keyMirror(["Map", "Viewport"]),
|
|
51
|
-
CircleTranslateAnchor: keyMirror(["Map", "Viewport"]),
|
|
52
|
-
FillExtrusionTranslateAnchor: keyMirror(["Map", "Viewport"]),
|
|
53
|
-
FillTranslateAnchor: keyMirror(["Map", "Viewport"]),
|
|
54
|
-
IconRotationAlignment: keyMirror(["Auto", "Map", "Viewport"]),
|
|
55
|
-
IconTextFit: keyMirror(["None", "Width", "Height", "Both"]),
|
|
56
|
-
IconTranslateAnchor: keyMirror(["Map", "Viewport"]),
|
|
57
|
-
SymbolPlacement: keyMirror(["Line", "Point"]),
|
|
58
|
-
TextAnchor: keyMirror([
|
|
59
|
-
"Center",
|
|
60
|
-
"Left",
|
|
61
|
-
"Right",
|
|
62
|
-
"Top",
|
|
63
|
-
"Bottom",
|
|
64
|
-
"TopLeft",
|
|
65
|
-
"TopRight",
|
|
66
|
-
"BottomLeft",
|
|
67
|
-
"BottomRight",
|
|
68
|
-
]),
|
|
69
|
-
TextJustify: keyMirror(["Center", "Left", "Right"]),
|
|
70
|
-
TextPitchAlignment: keyMirror(["Auto", "Map", "Viewport"]),
|
|
71
|
-
TextRotationAlignment: keyMirror(["Auto", "Map", "Viewport"]),
|
|
72
|
-
TextTransform: keyMirror(["None", "Lowercase", "Uppercase"]),
|
|
73
|
-
TextTranslateAnchor: keyMirror(["Map", "Viewport"]),
|
|
74
|
-
LightAnchor: keyMirror(["Map", "Viewport"]),
|
|
75
|
-
OfflinePackDownloadState: keyMirror(["Inactive", "Active", "Complete"]),
|
|
76
|
-
OfflineCallbackName: keyMirror(["Progress", "Error"]),
|
|
77
|
-
|
|
78
|
-
// methods
|
|
79
|
-
setAccessToken: jest.fn(),
|
|
80
|
-
getAccessToken: () => Promise.resolve("test-token"),
|
|
81
|
-
setConnected: jest.fn(),
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
NativeModules.MLNOfflineModule = {
|
|
85
|
-
createPack: (packOptions: any) => {
|
|
86
|
-
return Promise.resolve({
|
|
87
|
-
bounds: packOptions.bounds,
|
|
88
|
-
metadata: JSON.stringify({ name: packOptions.name }),
|
|
89
|
-
});
|
|
90
|
-
},
|
|
91
|
-
getPacks: () => Promise.resolve([]),
|
|
92
|
-
deletePack: () => Promise.resolve(),
|
|
93
|
-
getPackStatus: () => Promise.resolve({}),
|
|
94
|
-
pausePackDownload: () => Promise.resolve(),
|
|
95
|
-
resumePackDownload: () => Promise.resolve(),
|
|
96
|
-
setPackObserver: () => Promise.resolve(),
|
|
97
|
-
setTileCountLimit: jest.fn(),
|
|
98
|
-
setProgressEventThrottle: jest.fn(),
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
NativeModules.MLNSnapshotModule = {
|
|
102
|
-
takeSnap: () => {
|
|
103
|
-
return Promise.resolve("file://test.png");
|
|
104
|
-
},
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
NativeModules.MLNLocationModule = {
|
|
108
|
-
getLastKnownLocation: jest.fn(),
|
|
109
|
-
setMinDisplacement: jest.fn(),
|
|
110
|
-
start: jest.fn(),
|
|
111
|
-
stop: jest.fn(),
|
|
112
|
-
pause: jest.fn(),
|
|
113
|
-
};
|
package/jest.config.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
preset: "@testing-library/react-native",
|
|
3
|
-
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json"],
|
|
4
|
-
setupFilesAfterEnv: ["./jest-setup.ts"],
|
|
5
|
-
setupFiles: ["./__tests__/__mocks__/react-native.mock.js"],
|
|
6
|
-
modulePathIgnorePatterns: ["__tests__/__mocks__", "fixtures"],
|
|
7
|
-
collectCoverageFrom: ["javascript/**/*.{ts,tsx,js,jsx}"],
|
|
8
|
-
};
|
package/plugin/install.md
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# Expo Installation
|
|
2
|
-
|
|
3
|
-
NOTE: This package cannot be used in the "Expo Go" app because [it requires custom native code](https://docs.expo.io/workflow/customizing/).
|
|
4
|
-
|
|
5
|
-
First install the package with `yarn`, `npm`, or [`expo install`](https://docs.expo.io/workflow/expo-cli/#expo-install).
|
|
6
|
-
|
|
7
|
-
```sh
|
|
8
|
-
expo install @maplibre/maplibre-react-native
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
After installing this npm package, add the [config plugin](https://docs.expo.io/guides/config-plugins/) to the [`plugins`](https://docs.expo.io/versions/latest/config/app/#plugins) array of your `app.json` or `app.config.js`:
|
|
12
|
-
|
|
13
|
-
```json
|
|
14
|
-
{
|
|
15
|
-
"expo": {
|
|
16
|
-
"plugins": ["@maplibre/maplibre-react-native"]
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
Next, rebuild your app as described in the ["Adding custom native code"](https://docs.expo.io/workflow/customizing/) guide.
|
|
22
|
-
|
|
23
|
-
## API
|
|
24
|
-
|
|
25
|
-
This plugin doesn't currently provide any additional properties for customization. The plugin simply generates the pre-install block in the `ios/Podfile` (the post-install block is not required for Expo support). No additional changes are done on Android.
|
package/scripts/.eslintrc.js
DELETED
package/scripts/codegen.ts
DELETED
|
@@ -1,340 +0,0 @@
|
|
|
1
|
-
import maplibreGlStyleSpec from "@maplibre/maplibre-gl-style-spec/src/reference/latest";
|
|
2
|
-
import ejs from "ejs";
|
|
3
|
-
import { exec } from "node:child_process";
|
|
4
|
-
import { promises as fs } from "node:fs";
|
|
5
|
-
import path from "node:path";
|
|
6
|
-
import prettier from "prettier";
|
|
7
|
-
|
|
8
|
-
import { DocJSONBuilder } from "./utils/DocJSONBuilder";
|
|
9
|
-
import { MarkdownBuilder } from "./utils/MarkdownBuilder";
|
|
10
|
-
import { camelCase } from "./utils/TemplateHelpers";
|
|
11
|
-
import * as TemplateHelpers from "./utils/TemplateHelpers";
|
|
12
|
-
import {
|
|
13
|
-
getAndroidVersion,
|
|
14
|
-
getIosVersion,
|
|
15
|
-
isVersionGTE,
|
|
16
|
-
} from "./utils/getNativeVersion";
|
|
17
|
-
|
|
18
|
-
const TMPL_PATH = path.join(__dirname, "templates");
|
|
19
|
-
|
|
20
|
-
const IOS_OUTPUT_PATH = path.join(__dirname, "..", "ios", "RCTMLN");
|
|
21
|
-
const ANDROID_OUTPUT_PATH = path.join(
|
|
22
|
-
__dirname,
|
|
23
|
-
"..",
|
|
24
|
-
"android",
|
|
25
|
-
"src",
|
|
26
|
-
"main",
|
|
27
|
-
"java",
|
|
28
|
-
"com",
|
|
29
|
-
"maplibre",
|
|
30
|
-
"rctmln",
|
|
31
|
-
"components",
|
|
32
|
-
"styles",
|
|
33
|
-
);
|
|
34
|
-
|
|
35
|
-
const JS_OUTPUT_PATH = path.join(__dirname, "..", "javascript", "utils");
|
|
36
|
-
|
|
37
|
-
const TEMPLATE_MAPPINGS = [
|
|
38
|
-
{
|
|
39
|
-
input: path.join(TMPL_PATH, "RCTMLNStyle.h.ejs"),
|
|
40
|
-
output: path.join(IOS_OUTPUT_PATH, "RCTMLNStyle.h"),
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
input: path.join(TMPL_PATH, "MaplibreStyles.ts.ejs"),
|
|
44
|
-
output: path.join(JS_OUTPUT_PATH, "MaplibreStyles.d.ts"),
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
input: path.join(TMPL_PATH, "RCTMLNStyle.m.ejs"),
|
|
48
|
-
output: path.join(IOS_OUTPUT_PATH, "RCTMLNStyle.m"),
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
input: path.join(TMPL_PATH, "RCTMLNStyleFactory.java.ejs"),
|
|
52
|
-
output: path.join(ANDROID_OUTPUT_PATH, "RCTMLNStyleFactory.java"),
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
input: path.join(TMPL_PATH, "styleMap.ts.ejs"),
|
|
56
|
-
output: path.join(JS_OUTPUT_PATH, "styleMap.ts"),
|
|
57
|
-
},
|
|
58
|
-
];
|
|
59
|
-
|
|
60
|
-
async function generate() {
|
|
61
|
-
const androidVersion = await getAndroidVersion();
|
|
62
|
-
const iosVersion = await getIosVersion();
|
|
63
|
-
|
|
64
|
-
function getPropertiesForLight() {
|
|
65
|
-
const lightAttributes = maplibreGlStyleSpec.light;
|
|
66
|
-
|
|
67
|
-
return getSupportedProperties(lightAttributes).map((attrName) => {
|
|
68
|
-
return Object.assign({}, buildProperties(lightAttributes, attrName), {
|
|
69
|
-
allowedFunctionTypes: [],
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function getPropertiesForLayer(layerName: string) {
|
|
75
|
-
const paintAttributes = maplibreGlStyleSpec[`paint_${layerName}`];
|
|
76
|
-
const layoutAttributes = maplibreGlStyleSpec[`layout_${layerName}`];
|
|
77
|
-
|
|
78
|
-
const paintProps = getSupportedProperties(paintAttributes).map(
|
|
79
|
-
(attrName) => {
|
|
80
|
-
const prop = buildProperties(paintAttributes, attrName);
|
|
81
|
-
|
|
82
|
-
// overrides
|
|
83
|
-
if (["line-width"].includes(attrName)) {
|
|
84
|
-
prop.allowedFunctionTypes = ["camera"];
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
return prop;
|
|
88
|
-
},
|
|
89
|
-
);
|
|
90
|
-
|
|
91
|
-
const layoutProps = getSupportedProperties(layoutAttributes).map(
|
|
92
|
-
(attrName) => {
|
|
93
|
-
const prop = buildProperties(layoutAttributes, attrName);
|
|
94
|
-
|
|
95
|
-
// overrides
|
|
96
|
-
if (
|
|
97
|
-
[
|
|
98
|
-
"line-join",
|
|
99
|
-
"text-max-width",
|
|
100
|
-
"text-letter-spacing",
|
|
101
|
-
"text-anchor",
|
|
102
|
-
"text-justify",
|
|
103
|
-
"text-font",
|
|
104
|
-
].includes(attrName)
|
|
105
|
-
) {
|
|
106
|
-
prop.allowedFunctionTypes = ["camera"];
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// TODO
|
|
110
|
-
// Overide type padding
|
|
111
|
-
if (prop.type === "padding") {
|
|
112
|
-
prop.type = "array";
|
|
113
|
-
prop.value = "number";
|
|
114
|
-
prop.length = 4;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
return prop;
|
|
118
|
-
},
|
|
119
|
-
);
|
|
120
|
-
|
|
121
|
-
return layoutProps.concat(paintProps);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
function getSupportedLayers() {
|
|
125
|
-
return Object.entries(maplibreGlStyleSpec.layer.type.values)
|
|
126
|
-
.map(([layerName, layerProperties]) => {
|
|
127
|
-
if (
|
|
128
|
-
layerProperties &&
|
|
129
|
-
typeof layerProperties === "object" &&
|
|
130
|
-
"sdk-support" in layerProperties
|
|
131
|
-
) {
|
|
132
|
-
const support = getAttributeSupport(layerProperties["sdk-support"]);
|
|
133
|
-
|
|
134
|
-
if (support.basic.android && support.basic.ios) {
|
|
135
|
-
return layerName;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
return undefined;
|
|
140
|
-
})
|
|
141
|
-
.filter((layerName) => typeof layerName === "string");
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
function getSupportedProperties(attributes: any) {
|
|
145
|
-
return Object.keys(attributes).filter((attrName) =>
|
|
146
|
-
isAttrSupported(attributes[attrName]),
|
|
147
|
-
);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
function buildProperties(attributes: any, attrName: string) {
|
|
151
|
-
return {
|
|
152
|
-
name: camelCase(attrName),
|
|
153
|
-
doc: {
|
|
154
|
-
default: attributes[attrName].default,
|
|
155
|
-
minimum: attributes[attrName].minimum,
|
|
156
|
-
maximum: attributes[attrName].maximum,
|
|
157
|
-
units: attributes[attrName].units,
|
|
158
|
-
description: formatDescription(attributes[attrName].doc),
|
|
159
|
-
requires: getRequires(attributes[attrName].requires),
|
|
160
|
-
disabledBy: getDisables(attributes[attrName].requires),
|
|
161
|
-
values: attributes[attrName].values,
|
|
162
|
-
},
|
|
163
|
-
type: attributes[attrName].type,
|
|
164
|
-
value: attributes[attrName].value,
|
|
165
|
-
length: undefined as undefined | number,
|
|
166
|
-
image: isImage(attrName),
|
|
167
|
-
translate: isTranslate(attrName),
|
|
168
|
-
transition: attributes[attrName].transition,
|
|
169
|
-
expression: attributes[attrName].expression,
|
|
170
|
-
expressionSupported:
|
|
171
|
-
Object.keys(attributes[attrName].expression || {}).length > 0,
|
|
172
|
-
support: getAttributeSupport(attributes[attrName]["sdk-support"]),
|
|
173
|
-
allowedFunctionTypes: getAllowedFunctionTypes(attributes[attrName]),
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
function formatDescription(description: string) {
|
|
178
|
-
const words = description.split(" ");
|
|
179
|
-
|
|
180
|
-
for (let i = 0; i < words.length; i++) {
|
|
181
|
-
const word = words[i];
|
|
182
|
-
|
|
183
|
-
if (word.includes("-")) {
|
|
184
|
-
words[i] = camelCase(word);
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
return words.join(" ");
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
function getRequires(requiredItems: any) {
|
|
192
|
-
const items: any[] = [];
|
|
193
|
-
|
|
194
|
-
if (!requiredItems) {
|
|
195
|
-
return items;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
for (const item of requiredItems) {
|
|
199
|
-
if (typeof item === "string") {
|
|
200
|
-
items.push(camelCase(item, "-"));
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
return items;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
function getDisables(disabledItems: any[]) {
|
|
208
|
-
const items: any[] = [];
|
|
209
|
-
|
|
210
|
-
if (!disabledItems) {
|
|
211
|
-
return items;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
for (const item of disabledItems) {
|
|
215
|
-
if (item["!"]) {
|
|
216
|
-
items.push(camelCase(item["!"], "-"));
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
return items;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
function isImage(attrName: string) {
|
|
224
|
-
return (
|
|
225
|
-
attrName.toLowerCase().indexOf("pattern") !== -1 ||
|
|
226
|
-
attrName.toLowerCase().indexOf("image") !== -1
|
|
227
|
-
);
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
function isTranslate(attrName: string) {
|
|
231
|
-
return attrName.toLowerCase().indexOf("translate") !== -1;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
function isAttrSupported(attr: any) {
|
|
235
|
-
const support = getAttributeSupport(attr["sdk-support"]);
|
|
236
|
-
if (attr.private) {
|
|
237
|
-
return false;
|
|
238
|
-
}
|
|
239
|
-
return support.basic.android && support.basic.ios;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
function getAttributeSupport(sdkSupport: any) {
|
|
243
|
-
const support = {
|
|
244
|
-
basic: { android: false, ios: false },
|
|
245
|
-
data: { android: false, ios: false },
|
|
246
|
-
};
|
|
247
|
-
|
|
248
|
-
const basicSupport = sdkSupport && sdkSupport["basic functionality"];
|
|
249
|
-
support.basic.android = isVersionGTE(androidVersion, basicSupport?.android);
|
|
250
|
-
support.basic.ios = isVersionGTE(iosVersion, basicSupport?.ios);
|
|
251
|
-
|
|
252
|
-
const dataDrivenSupport = sdkSupport && sdkSupport["data-driven styling"];
|
|
253
|
-
support.data.android = isVersionGTE(
|
|
254
|
-
androidVersion,
|
|
255
|
-
dataDrivenSupport?.android,
|
|
256
|
-
);
|
|
257
|
-
support.data.ios = isVersionGTE(iosVersion, dataDrivenSupport?.ios);
|
|
258
|
-
|
|
259
|
-
if (!support.data.ios || !support.data.android) {
|
|
260
|
-
support.data.ios = false;
|
|
261
|
-
support.data.android = false;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
return support;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
function getAllowedFunctionTypes(paintAttr: any) {
|
|
268
|
-
const allowedFunctionTypes = [];
|
|
269
|
-
|
|
270
|
-
if (paintAttr["zoom-function"]) {
|
|
271
|
-
allowedFunctionTypes.push("camera");
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
if (paintAttr["property-function"]) {
|
|
275
|
-
allowedFunctionTypes.push("source");
|
|
276
|
-
allowedFunctionTypes.push("composite");
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
return allowedFunctionTypes;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
const layers = getSupportedLayers().map((layerName) => {
|
|
283
|
-
return {
|
|
284
|
-
name: layerName,
|
|
285
|
-
properties: getPropertiesForLayer(layerName),
|
|
286
|
-
};
|
|
287
|
-
});
|
|
288
|
-
|
|
289
|
-
// add light as a layer
|
|
290
|
-
layers.push({ name: "light", properties: getPropertiesForLight() });
|
|
291
|
-
|
|
292
|
-
// autogenerate code
|
|
293
|
-
await Promise.all(
|
|
294
|
-
TEMPLATE_MAPPINGS.map(async ({ input, output }) => {
|
|
295
|
-
const filename = path.parse(output).base;
|
|
296
|
-
|
|
297
|
-
console.log(`Generating ${filename}`);
|
|
298
|
-
const tmpl = ejs.compile(await fs.readFile(input, "utf8"), {
|
|
299
|
-
strict: true,
|
|
300
|
-
async: true,
|
|
301
|
-
});
|
|
302
|
-
let results = await tmpl({ layers, helpers: TemplateHelpers });
|
|
303
|
-
if (filename.endsWith("ts")) {
|
|
304
|
-
results = await prettier.format(results, {
|
|
305
|
-
filepath: filename,
|
|
306
|
-
});
|
|
307
|
-
// Ensure all enums are exported
|
|
308
|
-
results = results.replace(/enum (\w+Enum) \{[^}]+}\n/g, "export $&");
|
|
309
|
-
// Replace Array<any> with any[]
|
|
310
|
-
results = results.replace(/Array<any>/g, "any[]");
|
|
311
|
-
// Replace padding type with float array
|
|
312
|
-
results = results.replace(/padding: string;/g, "padding: number[];");
|
|
313
|
-
}
|
|
314
|
-
await fs.writeFile(output, results);
|
|
315
|
-
}),
|
|
316
|
-
);
|
|
317
|
-
|
|
318
|
-
// autogenerate docs
|
|
319
|
-
const docBuilder = new DocJSONBuilder(layers);
|
|
320
|
-
const markdownBuilder = new MarkdownBuilder();
|
|
321
|
-
await docBuilder.generate();
|
|
322
|
-
await markdownBuilder.generate();
|
|
323
|
-
|
|
324
|
-
// Check if any generated files changed
|
|
325
|
-
try {
|
|
326
|
-
exec(
|
|
327
|
-
`git diff --exit-code docs/ ${TEMPLATE_MAPPINGS.map((m) => m.output).join(" ")}`,
|
|
328
|
-
);
|
|
329
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
330
|
-
} catch (_error) {
|
|
331
|
-
console.error(
|
|
332
|
-
"\n\nThere are unstaged changes in the generated code. " +
|
|
333
|
-
"Please add them to your commit.\n" +
|
|
334
|
-
'If you would really like to exclude them, run "git commit -n" to skip.\n\n',
|
|
335
|
-
);
|
|
336
|
-
process.exit(1);
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
generate();
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
<%
|
|
2
|
-
const layers = locals.layers;
|
|
3
|
-
const helpers = locals.helpers;
|
|
4
|
-
-%>
|
|
5
|
-
/* This file was generated from MapboxStyle.ts.ejs do not modify */
|
|
6
|
-
import { type ImageSourcePropType } from 'react-native';
|
|
7
|
-
|
|
8
|
-
export type Translation = { x: number; y: number } | [number, number];
|
|
9
|
-
|
|
10
|
-
export interface Transition {
|
|
11
|
-
duration: number;
|
|
12
|
-
delay: number;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export type FormattedString = string; /* TODO */
|
|
16
|
-
|
|
17
|
-
type ExpressionName =
|
|
18
|
-
// Types
|
|
19
|
-
| 'array' | 'boolean' | 'collator' | 'format' | 'image' | 'literal' | 'number' | 'number-format' | 'object' | 'string'
|
|
20
|
-
| 'to-boolean' | 'to-color' | 'to-number' | 'to-string' | 'typeof'
|
|
21
|
-
// Feature data
|
|
22
|
-
| 'accumulated' | 'feature-state' | 'geometry-type' | 'id' | 'line-progress' | 'properties'
|
|
23
|
-
// Lookup
|
|
24
|
-
| 'at' | 'get' | 'has' | 'in' | 'index-of' | 'length' | 'slice'
|
|
25
|
-
// Decision
|
|
26
|
-
| '!' | '!=' | '<' | '<=' | '==' | '>' | '>=' | 'all' | 'any' | 'case' | 'match' | 'coalesce' | 'within'
|
|
27
|
-
// Ramps, scales, curves
|
|
28
|
-
| 'interpolate' | 'interpolate-hcl' | 'interpolate-lab' | 'step'
|
|
29
|
-
// Variable binding
|
|
30
|
-
| 'let' | 'var'
|
|
31
|
-
// String
|
|
32
|
-
| 'concat' | 'downcase' | 'is-supported-script' | 'resolved-locale' | 'upcase'
|
|
33
|
-
// Color
|
|
34
|
-
| 'rgb' | 'rgba' | 'to-rgba'
|
|
35
|
-
// Math
|
|
36
|
-
| '-' | '*' | '/' | '%' | '^' | '+' | 'abs' | 'acos' | 'asin' | 'atan' | 'ceil' | 'cos' | 'distance' | 'e'
|
|
37
|
-
| 'floor' | 'ln' | 'ln2' | 'log10' | 'log2' | 'max' | 'min' | 'pi' | 'round' | 'sin' | 'sqrt' | 'tan'
|
|
38
|
-
// Zoom, Heatmap
|
|
39
|
-
| 'zoom' | 'heatmap-density';
|
|
40
|
-
|
|
41
|
-
type ExpressionField =
|
|
42
|
-
| string
|
|
43
|
-
| number
|
|
44
|
-
| boolean
|
|
45
|
-
| Expression
|
|
46
|
-
| ExpressionField[]
|
|
47
|
-
| { [key: string]: ExpressionField };
|
|
48
|
-
|
|
49
|
-
export type Expression = readonly [ExpressionName, ...ExpressionField[]];
|
|
50
|
-
|
|
51
|
-
export type FilterExpression = Expression;
|
|
52
|
-
|
|
53
|
-
type ExpressionParameters = 'zoom' | 'feature' | 'feature-state' | 'sky-radial-progress' | 'line-progress' | 'heatmap-density';
|
|
54
|
-
|
|
55
|
-
type ResolvedImageType = ImageSourcePropType | string;
|
|
56
|
-
|
|
57
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
58
|
-
export type Value<T, AllowedParameters extends ExpressionParameters[] = []> =
|
|
59
|
-
| T
|
|
60
|
-
| Expression;
|
|
61
|
-
|
|
62
|
-
<%_ for (let enumInfo of helpers.getEnums(layers)) { _%>
|
|
63
|
-
enum <%- helpers.pascalCase(enumInfo.name) %>Enum {
|
|
64
|
-
<%_ for (let k of Object.keys(enumInfo.values)) { _%>
|
|
65
|
-
/** <%- enumInfo.values[k].doc %> */
|
|
66
|
-
<%- helpers.pascalCase(k) %> = '<%- k %>',
|
|
67
|
-
<%_ } _%>
|
|
68
|
-
}
|
|
69
|
-
type <%- helpers.pascalCase(enumInfo.name) %>EnumValues = <%- Object.keys(enumInfo.values).map(k => `'${k}'`).join(' | ') %>;
|
|
70
|
-
<%_ } _%>
|
|
71
|
-
|
|
72
|
-
type Enum<EnumType, EnumValues> = EnumType | EnumValues;
|
|
73
|
-
|
|
74
|
-
<%_ for (let layer of layers) { _%>
|
|
75
|
-
export interface <%- helpers.pascalCase(layer.name) %>LayerStyleProps {
|
|
76
|
-
<%_ for (let prop of layer.properties) { _%>
|
|
77
|
-
/**
|
|
78
|
-
* <%- prop.doc.description %>
|
|
79
|
-
<%_ if (prop.doc.requires.length) { _%>
|
|
80
|
-
*
|
|
81
|
-
* @requires <%- prop.doc.requires.join(', ') %>
|
|
82
|
-
<%_ } _%>
|
|
83
|
-
<%_ if (prop.doc.disabledBy.length) { _%>
|
|
84
|
-
*
|
|
85
|
-
* @disabledBy <%- prop.doc.disabledBy.join(', ') %>
|
|
86
|
-
<%_ } _%>
|
|
87
|
-
*/
|
|
88
|
-
<%= prop.name %>?: <%- helpers.dtsInterfaceType(prop) %>
|
|
89
|
-
<%_ if (true && prop.transition) { %>
|
|
90
|
-
/**
|
|
91
|
-
* The transition affecting any changes to this layer’s <%= prop.name %> property.
|
|
92
|
-
*/
|
|
93
|
-
<%= prop.name %>Transition?: Transition,
|
|
94
|
-
<%_ } _%>
|
|
95
|
-
<%_ } _%>
|
|
96
|
-
|
|
97
|
-
};
|
|
98
|
-
<%_ } _%>
|
|
99
|
-
|
|
100
|
-
export type AllLayerStyleProps = <%- layers.map(l => `${helpers.pascalCase(l.name)}LayerStyleProps`).join("|") -%>;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
<%
|
|
2
|
-
const layers = locals.layers;
|
|
3
|
-
const helpers = locals.helpers;
|
|
4
|
-
-%>
|
|
5
|
-
// DO NOT MODIFY
|
|
6
|
-
// THIS FILE IS AUTOGENERATED
|
|
7
|
-
|
|
8
|
-
#import "RCTMLNStyle.h"
|
|
9
|
-
#import "RCTMLNStyleValue.h"
|
|
10
|
-
#import <React/RCTBridge.h>
|
|
11
|
-
|
|
12
|
-
@import MapLibre;
|
|
13
|
-
|
|
14
|
-
@interface RCTMLNStyle : NSObject
|
|
15
|
-
|
|
16
|
-
@property (nonatomic, weak) RCTBridge *bridge;
|
|
17
|
-
@property (nonatomic, strong) MLNStyle *style;
|
|
18
|
-
|
|
19
|
-
- (id)initWithMLNStyle:(MLNStyle*)mlnStyle;
|
|
20
|
-
|
|
21
|
-
<%_ for (const layer of layers) { _%>
|
|
22
|
-
- (void)<%- helpers.setLayerMethodName(layer, 'ios') -%>:(<%- helpers.getLayerType(layer, 'ios') -%> *)layer withReactStyle:(NSDictionary *)reactStyle isValid:(BOOL (^)(void)) isValid;
|
|
23
|
-
<%_ } _%>
|
|
24
|
-
|
|
25
|
-
<%_ for (const layer of layers) { _%>
|
|
26
|
-
<%_ for (const prop of layer.properties) { _%>
|
|
27
|
-
- (void)set<%- helpers.iosPropMethodName(layer, helpers.pascalCase(prop.name)) -%>:(<%- helpers.getLayerType(layer, 'ios') -%> *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue;
|
|
28
|
-
<%_ if (prop.transition) { _%>
|
|
29
|
-
- (void)set<%- helpers.iosPropMethodName(layer, helpers.pascalCase(prop.name)) -%>Transition:(<%- helpers.getLayerType(layer, 'ios') -%> *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue;
|
|
30
|
-
<%_ } _%>
|
|
31
|
-
<%_ } _%>
|
|
32
|
-
<% } %>
|
|
33
|
-
|
|
34
|
-
@end
|