@baeckerherz/expo-mapbox-navigation 0.1.0 → 0.1.2

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 (2) hide show
  1. package/README.md +82 -38
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -51,13 +51,31 @@ import { MapboxNavigation } from '@baeckerherz/expo-mapbox-navigation';
51
51
 
52
52
  ### Props
53
53
 
54
+ #### Route
55
+
54
56
  | Prop | Type | Description |
55
57
  |------|------|-------------|
56
58
  | `coordinates` | `Array<{ latitude, longitude }>` | Route waypoints (min 2). First = origin, last = destination. |
57
- | `waypointIndices` | `number[]` | Which coordinates are full waypoints vs. via-points. |
58
- | `locale` | `string` | Language for voice guidance and UI. Default: device locale. |
59
- | `routeProfile` | `string` | Routing profile. Default: `"mapbox/driving-traffic"`. |
60
- | `mute` | `boolean` | Mute voice guidance. |
59
+ | `waypointIndices` | `number[]` | Indices into `coordinates` treated as full waypoints (with arrival notification). Others are silent via-points. Must include first and last index. |
60
+ | `routeProfile` | `string` | Mapbox routing profile. iOS: `"mapbox/driving-traffic"` (default), `"mapbox/driving"`, `"mapbox/walking"`, `"mapbox/cycling"`. Android: omit the `"mapbox/"` prefix. |
61
+
62
+ #### Localization
63
+
64
+ | Prop | Type | Description |
65
+ |------|------|-------------|
66
+ | `locale` | `string` | BCP 47 language tag for voice guidance, maneuver instructions, and UI labels (e.g. `"de"`, `"en-US"`). Default: device locale. |
67
+ | `mute` | `boolean` | Mute voice guidance. Default: `false`. |
68
+
69
+ #### Appearance
70
+
71
+ | Prop | Type | Description |
72
+ |------|------|-------------|
73
+ | `mapStyle` | `string` | Custom Mapbox map style URL. Overrides the default navigation style. Example: `"mapbox://styles/mapbox/navigation-night-v1"`. |
74
+ | `themeMode` | `"day" \| "night" \| "auto"` | Controls day/night map appearance. `"day"` (default): light map. `"night"`: dark 3D map. `"auto"`: switches based on time of day. |
75
+ | `accentColor` | `string` | Primary accent color (hex). Applied to route line, floating buttons, and interactive elements. Example: `"#007AFF"`. |
76
+ | `routeColor` | `string` | Route line color (hex). Overrides `accentColor` for the route line only. Example: `"#4264fb"`. |
77
+ | `bannerBackgroundColor` | `string` | Instruction banner background color (hex). Example: `"#FFFFFF"` for light, `"#1A1A2E"` for dark. |
78
+ | `bannerTextColor` | `string` | Instruction banner text color (hex). Example: `"#000000"`. |
61
79
 
62
80
  ### Events
63
81
 
@@ -71,7 +89,19 @@ import { MapboxNavigation } from '@baeckerherz/expo-mapbox-navigation';
71
89
  | `onUserOffRoute` | — | User went off the planned route. |
72
90
  | `onError` | `{ message }` | Navigation error occurred. |
73
91
 
74
- ## Installation (for consumers)
92
+ ## Prerequisites
93
+
94
+ 1. A [Mapbox account](https://account.mapbox.com/) with Navigation SDK access
95
+ 2. A public access token (`pk.xxx`) and a secret/download token (`sk.xxx`)
96
+ 3. For iOS: `~/.netrc` must contain Mapbox credentials for SPM package resolution:
97
+
98
+ ```
99
+ machine api.mapbox.com
100
+ login mapbox
101
+ password sk.eyJ1...YOUR_SECRET_TOKEN
102
+ ```
103
+
104
+ ## Installation
75
105
 
76
106
  ```bash
77
107
  npx expo install @baeckerherz/expo-mapbox-navigation
@@ -96,15 +126,9 @@ npx expo prebuild --clean
96
126
  npx expo run:ios
97
127
  ```
98
128
 
99
- ## Development
100
-
101
- ```bash
102
- cd @baeckerherz/expo-mapbox-navigation
103
- yarn install
104
- cd example && npx expo run:ios
105
- ```
129
+ ## Contributing
106
130
 
107
- ## Project Structure
131
+ ### Project Structure
108
132
 
109
133
  ```
110
134
  src/ TypeScript API (component, types, exports)
@@ -114,22 +138,18 @@ plugin/ Expo config plugins (SPM injection, Gradle setup)
114
138
  example/ Test app
115
139
  ```
116
140
 
117
- ## Prerequisites
118
-
119
- 1. A [Mapbox account](https://account.mapbox.com/) with Navigation SDK access
120
- 2. A public access token (`pk.xxx`) and a secret/download token (`sk.xxx`)
121
- 3. For iOS: `~/.netrc` must contain Mapbox credentials for SPM package resolution:
141
+ ### Local Development
122
142
 
123
- ```
124
- machine api.mapbox.com
125
- login mapbox
126
- password sk.eyJ1...YOUR_SECRET_TOKEN
143
+ ```bash
144
+ git clone https://github.com/baeckerherz/expo-mapbox-navigation.git
145
+ cd expo-mapbox-navigation
146
+ yarn install
127
147
  ```
128
148
 
129
- ## How to test the example app
149
+ ### Running the Example App
130
150
 
131
151
  ```bash
132
- cd @baeckerherz/expo-mapbox-navigation/example
152
+ cd example
133
153
  yarn install
134
154
  npx expo prebuild --clean
135
155
  npx expo run:ios --device
@@ -137,19 +157,6 @@ npx expo run:ios --device
137
157
 
138
158
  The example app navigates from your current location to Innsbruck Hauptbahnhof with German voice guidance.
139
159
 
140
- ## Publishing to npm
141
-
142
- ```bash
143
- npm login
144
- npm publish --access public
145
- ```
146
-
147
- Consumers install with:
148
-
149
- ```bash
150
- npx expo install @baeckerherz/expo-mapbox-navigation
151
- ```
152
-
153
160
  ## Key differences from existing wrappers
154
161
 
155
162
  | | This module | @badatgil/expo-mapbox-navigation | @homee/react-native-mapbox-navigation |
@@ -171,6 +178,43 @@ npx expo install @baeckerherz/expo-mapbox-navigation
171
178
 
172
179
  ### Known risks
173
180
 
174
- - **SPM + CocoaPods coexistence**: Xcode may have trouble resolving both dependency managers. If this fails, fallback is to vendor `.xcframework` files (Approach A from the plan).
175
181
  - **Android NavigationView completeness**: The drop-in `NavigationView` in Android Nav SDK v3 may require additional configuration for full feature parity with iOS.
176
182
  - **Mapbox licensing**: The Navigation SDK requires a commercial Mapbox license for production use. This wrapper does not change that requirement.
183
+
184
+ ---
185
+
186
+ ## Contributors
187
+
188
+ We're looking for **contributors and maintainers** to help shape this project. If you're interested in working on Expo native modules, Mapbox SDKs, or React Native tooling — we'd love to have you on board.
189
+
190
+ Check out the [issues](https://github.com/baeckerherz/expo-mapbox-navigation/issues) or open a PR to get started.
191
+
192
+ ---
193
+
194
+ ## Sponsors
195
+
196
+ This project is sponsored and maintained by the teams that use it in production.
197
+
198
+ <table>
199
+ <tr>
200
+ <td align="center">
201
+ <a href="https://github.com/baeckerherz">
202
+ <img src="https://avatars.githubusercontent.com/u/261656164?s=200&v=4" width="100" alt="Bäckerherz" />
203
+ <br />
204
+ <strong>Bäckerherz</strong>
205
+ </a>
206
+ <br />
207
+ <em>Founding Sponsor</em>
208
+ </td>
209
+ </tr>
210
+ </table>
211
+
212
+ Bäckerherz builds and uses this module in their own apps. This project exists because of their investment in open-source tooling for the Expo ecosystem.
213
+
214
+ **Become a sponsor** — help us keep this project maintained and growing. Reach out at [partner@baeckerherz.at](mailto:partner@baeckerherz.at).
215
+
216
+ ---
217
+
218
+ ## Need help building something?
219
+
220
+ We build mobile apps, backend systems, and custom integrations using Expo, React Native, and more. If you need a team that ships — get in touch at [partner@baeckerherz.at](mailto:partner@baeckerherz.at).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baeckerherz/expo-mapbox-navigation",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Expo module wrapping Mapbox Navigation SDK v3 for iOS and Android",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",