@jadamsbit/react-native-mapbox-navigation 1.0.12 → 1.0.13

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.
@@ -0,0 +1,3 @@
1
+ import { IMapboxNavigationProps } from './typings';
2
+ declare const MapboxNavigation: (props: IMapboxNavigationProps) => any;
3
+ export default MapboxNavigation;
package/dist/index.js ADDED
@@ -0,0 +1,15 @@
1
+ import * as React from "react";
2
+ import { requireNativeComponent, StyleSheet } from "react-native";
3
+ const MapboxNavigation = (props) => {
4
+ return <RNMapboxNavigation style={styles.container} {...props} />;
5
+ };
6
+ const RNMapboxNavigation = requireNativeComponent(
7
+ "MapboxNavigation",
8
+ MapboxNavigation
9
+ );
10
+ const styles = StyleSheet.create({
11
+ container: {
12
+ flex: 1,
13
+ },
14
+ });
15
+ export default MapboxNavigation;
@@ -0,0 +1,38 @@
1
+ /** @type {[number, number]}
2
+ * Provide an array with longitude and latitude [$longitude, $latitude]
3
+ */
4
+ declare type Coordinate = [number, number];
5
+ declare type OnLocationChangeEvent = {
6
+ nativeEvent?: {
7
+ latitude: number;
8
+ longitude: number;
9
+ };
10
+ };
11
+ declare type OnRouteProgressChangeEvent = {
12
+ nativeEvent?: {
13
+ distanceTraveled: number;
14
+ durationRemaining: number;
15
+ fractionTraveled: number;
16
+ distanceRemaining: number;
17
+ };
18
+ };
19
+ declare type OnErrorEvent = {
20
+ nativeEvent?: {
21
+ message?: string;
22
+ };
23
+ };
24
+ export interface IMapboxNavigationProps {
25
+ origin: Coordinate;
26
+ destination: Coordinate;
27
+ shouldSimulateRoute?: boolean;
28
+ onLocationChange?: (event: OnLocationChangeEvent) => void;
29
+ onRouteProgressChange?: (event: OnRouteProgressChangeEvent) => void;
30
+ onError?: (event: OnErrorEvent) => void;
31
+ onCancelNavigation?: () => void;
32
+ onArrive?: () => void;
33
+ showsEndOfRouteFeedback?: boolean;
34
+ hideStatusView?: boolean;
35
+ mute?: boolean;
36
+ waypoints?: Coordinate[];
37
+ }
38
+ export {};
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jadamsbit/react-native-mapbox-navigation",
3
3
  "title": "React Native Mapbox Navigation",
4
- "version": "1.0.12",
4
+ "version": "1.0.13",
5
5
  "description": "Smart Mapbox turn-by-turn routing based on real-time traffic for React Native.",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",