@jadamsbit/react-native-mapbox-navigation 1.0.18 → 1.0.20

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.
Files changed (79) hide show
  1. package/.vscode/settings.json +3 -0
  2. package/.yarn/releases/yarn-3.6.1.cjs +0 -0
  3. package/android/.classpath +6 -0
  4. package/android/.project +34 -0
  5. package/android/.settings/org.eclipse.buildship.core.prefs +13 -0
  6. package/android/.settings/org.eclipse.jdt.core.prefs +4 -0
  7. package/android/build.gradle +1 -1
  8. package/android/gradlew +0 -0
  9. package/android/src/main/java/com/jadamsbit/mapboxnavigation/MapboxNavigationModule.kt +47 -22
  10. package/android/src/main/java/com/jadamsbit/mapboxnavigation/MapboxNavigationView.kt +268 -406
  11. package/android/src/main/res/layout/navigation_view.xml +16 -6
  12. package/package.json +2 -2
  13. package/react-native-mapbox-navigation.podspec +1 -1
  14. package/.github/actions/setup/action.yml +0 -27
  15. package/.github/workflows/ci.yml +0 -154
  16. package/example/.buckconfig +0 -6
  17. package/example/.bundle/config +0 -2
  18. package/example/.eslintrc.js +0 -4
  19. package/example/.flowconfig +0 -65
  20. package/example/.prettierrc.js +0 -7
  21. package/example/.watchmanconfig +0 -1
  22. package/example/Gemfile +0 -9
  23. package/example/NavigationComponent.js +0 -55
  24. package/example/README.md +0 -79
  25. package/example/android/app/build.gradle +0 -119
  26. package/example/android/app/debug.keystore +0 -0
  27. package/example/android/app/proguard-rules.pro +0 -10
  28. package/example/android/app/src/debug/AndroidManifest.xml +0 -9
  29. package/example/android/app/src/main/AndroidManifest.xml +0 -26
  30. package/example/android/app/src/main/java/com/mapboxnavigationexample/MainActivity.kt +0 -22
  31. package/example/android/app/src/main/java/com/mapboxnavigationexample/MainApplication.kt +0 -45
  32. package/example/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -36
  33. package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  34. package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  35. package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  36. package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  37. package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  38. package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  39. package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  40. package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  41. package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  42. package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  43. package/example/android/app/src/main/res/values/strings.xml +0 -3
  44. package/example/android/app/src/main/res/values/styles.xml +0 -9
  45. package/example/android/build.gradle +0 -39
  46. package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  47. package/example/android/gradle/wrapper/gradle-wrapper.properties +0 -7
  48. package/example/android/gradle.properties +0 -46
  49. package/example/android/gradlew +0 -249
  50. package/example/android/gradlew.bat +0 -92
  51. package/example/android/settings.gradle +0 -6
  52. package/example/app.json +0 -4
  53. package/example/babel.config.js +0 -17
  54. package/example/index.js +0 -5
  55. package/example/ios/.xcode.env +0 -1
  56. package/example/ios/.xcode.env.local +0 -2
  57. package/example/ios/BasicApp/AppDelegate.h +0 -8
  58. package/example/ios/BasicApp/AppDelegate.m +0 -62
  59. package/example/ios/BasicApp/Images.xcassets/AppIcon.appiconset/Contents.json +0 -38
  60. package/example/ios/BasicApp/Images.xcassets/Contents.json +0 -6
  61. package/example/ios/BasicApp/Info.plist +0 -62
  62. package/example/ios/BasicApp/LaunchScreen.storyboard +0 -47
  63. package/example/ios/BasicApp/main.m +0 -9
  64. package/example/ios/BasicApp-Bridging-Header.h +0 -4
  65. package/example/ios/BasicApp.xcodeproj/project.pbxproj +0 -716
  66. package/example/ios/BasicApp.xcodeproj/xcshareddata/xcschemes/BasicApp.xcscheme +0 -88
  67. package/example/ios/BasicApp.xcworkspace/contents.xcworkspacedata +0 -10
  68. package/example/ios/BasicApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  69. package/example/ios/BasicAppTests/BasicAppTests.m +0 -65
  70. package/example/ios/BasicAppTests/Info.plist +0 -24
  71. package/example/ios/BridgeHeader.swift +0 -8
  72. package/example/ios/Podfile +0 -67
  73. package/example/ios/Podfile.lock +0 -1431
  74. package/example/jest.config.js +0 -3
  75. package/example/metro.config.js +0 -45
  76. package/example/package.json +0 -28
  77. package/example/react-native.config.js +0 -10
  78. package/example/src/App.js +0 -51
  79. package/lefthook.yml +0 -35
@@ -1,3 +0,0 @@
1
- module.exports = {
2
- preset: 'react-native',
3
- };
@@ -1,45 +0,0 @@
1
- const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');
2
- const path = require('path');
3
- const escape = require('escape-string-regexp');
4
- const exclusionList = require('metro-config/src/defaults/exclusionList');
5
- const pak = require('../package.json');
6
-
7
- const root = path.resolve(__dirname, '..');
8
- const modules = Object.keys({ ...pak.peerDependencies });
9
-
10
- /**
11
- * Metro configuration
12
- * https://facebook.github.io/metro/docs/configuration
13
- *
14
- * @type {import('metro-config').MetroConfig}
15
- */
16
- const config = {
17
- watchFolders: [root],
18
-
19
- // We need to make sure that only one version is loaded for peerDependencies
20
- // So we block them at the root, and alias them to the versions in example's node_modules
21
- resolver: {
22
- blacklistRE: exclusionList(
23
- modules.map(
24
- (m) =>
25
- new RegExp(`^${escape(path.join(root, 'node_modules', m))}\\/.*$`)
26
- )
27
- ),
28
-
29
- extraNodeModules: modules.reduce((acc, name) => {
30
- acc[name] = path.join(__dirname, 'node_modules', name);
31
- return acc;
32
- }, {}),
33
- },
34
-
35
- transformer: {
36
- getTransformOptions: async () => ({
37
- transform: {
38
- experimentalImportSupport: false,
39
- inlineRequires: true,
40
- },
41
- }),
42
- },
43
- };
44
-
45
- module.exports = mergeConfig(getDefaultConfig(__dirname), config);
@@ -1,28 +0,0 @@
1
- {
2
- "name": "mapbox-navigation-example",
3
- "version": "0.0.1",
4
- "private": true,
5
- "scripts": {
6
- "android": "react-native run-android",
7
- "ios": "react-native run-ios",
8
- "start": "react-native start",
9
- "build:android": "cd android && ./gradlew assembleDebug --no-daemon --console=plain -PreactNativeArchitectures=arm64-v8a",
10
- "build:ios": "cd ios && xcodebuild -workspace MapboxNavigationExample.xcworkspace -scheme MapboxNavigationExample -configuration Debug -sdk iphonesimulator CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ GCC_OPTIMIZATION_LEVEL=0 GCC_PRECOMPILE_PREFIX_HEADER=YES ASSETCATALOG_COMPILER_OPTIMIZATION=time DEBUG_INFORMATION_FORMAT=dwarf COMPILER_INDEX_STORE_ENABLE=NO"
11
- },
12
- "dependencies": {
13
- "react": "18.2.0",
14
- "react-native": "0.73.6"
15
- },
16
- "devDependencies": {
17
- "@babel/core": "^7.20.0",
18
- "@babel/preset-env": "^7.20.0",
19
- "@babel/runtime": "^7.20.0",
20
- "@react-native/babel-preset": "0.73.21",
21
- "@react-native/metro-config": "0.73.5",
22
- "@react-native/typescript-config": "0.73.1",
23
- "babel-plugin-module-resolver": "^5.0.0"
24
- },
25
- "engines": {
26
- "node": ">=18"
27
- }
28
- }
@@ -1,10 +0,0 @@
1
- const path = require('path');
2
- const pak = require('../package.json');
3
-
4
- module.exports = {
5
- dependencies: {
6
- [pak.name]: {
7
- root: path.join(__dirname, '..'),
8
- },
9
- },
10
- };
@@ -1,51 +0,0 @@
1
- /**
2
- * Sample React Native App
3
- * https://github.com/facebook/react-native
4
- *
5
- * @format
6
- * @flow strict-local
7
- */
8
-
9
- import React, {useEffect} from 'react';
10
- import {SafeAreaView, useColorScheme} from 'react-native';
11
- import {Colors} from 'react-native/Libraries/NewAppScreen';
12
- import {PermissionsAndroid} from 'react-native';
13
- import NavigationComponent from '../NavigationComponent';
14
-
15
- const App = () => {
16
- const isDarkMode = useColorScheme() === 'dark';
17
-
18
- const backgroundStyle = {
19
- backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
20
- flex: 1,
21
- };
22
-
23
- useEffect(() => {
24
- const requestLocationPermission = async () => {
25
- try {
26
- await PermissionsAndroid.request(
27
- PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION,
28
- {
29
- title: 'Example App',
30
- message: 'Example App access to your location ',
31
- },
32
- );
33
- } catch (err) {
34
- console.warn(err);
35
- }
36
- };
37
-
38
- requestLocationPermission();
39
- }, []);
40
-
41
- return (
42
- <SafeAreaView style={backgroundStyle}>
43
- <NavigationComponent
44
- origin={[-82.5320747067464, 37.4906492874019]}
45
- destination={[-82.5311503322108, 37.483129190962124]}
46
- />
47
- </SafeAreaView>
48
- );
49
- };
50
-
51
- export default App;
package/lefthook.yml DELETED
@@ -1,35 +0,0 @@
1
- # EXAMPLE USAGE:
2
- #
3
- # Refer for explanation to following link:
4
- # https://github.com/evilmartians/lefthook/blob/master/docs/configuration.md
5
- #
6
- # pre-push:
7
- # commands:
8
- # packages-audit:
9
- # tags: frontend security
10
- # run: yarn audit
11
- # gems-audit:
12
- # tags: backend security
13
- # run: bundle audit
14
- #
15
- # pre-commit:
16
- # parallel: true
17
- # commands:
18
- # eslint:
19
- # glob: "*.{js,ts,jsx,tsx}"
20
- # run: yarn eslint {staged_files}
21
- # rubocop:
22
- # tags: backend style
23
- # glob: "*.rb"
24
- # exclude: '(^|/)(application|routes)\.rb$'
25
- # run: bundle exec rubocop --force-exclusion {all_files}
26
- # govet:
27
- # tags: backend style
28
- # files: git ls-files -m
29
- # glob: "*.go"
30
- # run: go vet {files}
31
- # scripts:
32
- # "hello.js":
33
- # runner: node
34
- # "any.go":
35
- # runner: go run