@complexify/expo-mapbox-navigation 1.1.8 → 1.1.9

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.
@@ -34,6 +34,336 @@ class ExpoMapboxNavigationView: ExpoView {
34
34
  override func layoutSubviews() {
35
35
  controller.view.frame = bounds
36
36
  }
37
+
38
+ // Way Name View
39
+ func setWayNameViewTextColor(hexColor: String) {
40
+ controller.customDayStyle.customWayNameTextColor = UIColor(hex: hexColor)
41
+ controller.update()
42
+ }
43
+
44
+ // Steps List
45
+ func setStepsBackgroundColor(hexColor: String) {
46
+ controller.customDayStyle.customStepsBackgroundColor = UIColor(hex: hexColor)
47
+ controller.update()
48
+ }
49
+
50
+ func setStepsPrimaryTextColor(hexColor: String) {
51
+ controller.customDayStyle.customStepsPrimaryTextColor = UIColor(hex: hexColor)
52
+ controller.update()
53
+ }
54
+
55
+ func setStepsSecondaryTextColor(hexColor: String) {
56
+ controller.customDayStyle.customStepsSecondaryTextColor = UIColor(hex: hexColor)
57
+ controller.update()
58
+ }
59
+
60
+ func setStepsManeuverViewPrimaryColor(hexColor: String) {
61
+ controller.customDayStyle.customStepsManeuverViewPrimaryColor = UIColor(hex: hexColor)
62
+ controller.update()
63
+ }
64
+
65
+ func setStepsManeuverViewSecondaryColor(hexColor: String) {
66
+ controller.customDayStyle.customStepsManeuverViewSecondaryColor = UIColor(hex: hexColor)
67
+ controller.update()
68
+ }
69
+
70
+ func setStepsSeparatorColor(hexColor: String) {
71
+ controller.customDayStyle.customStepsSeparatorColor = UIColor(hex: hexColor)
72
+ controller.update()
73
+ }
74
+
75
+ // Lane View
76
+ func setLaneViewBackgroundColor(hexColor: String) {
77
+ controller.customDayStyle.customLaneViewBackgroundColor = UIColor(hex: hexColor)
78
+ controller.update()
79
+ }
80
+
81
+ func setLaneViewForegroundColor(hexColor: String) {
82
+ controller.customDayStyle.customLaneViewForegroundColor = UIColor(hex: hexColor)
83
+ controller.update()
84
+ }
85
+
86
+ func setLaneViewSeparatorColor(hexColor: String) {
87
+ controller.customDayStyle.customLaneViewSeparatorColor = UIColor(hex: hexColor)
88
+ controller.update()
89
+ }
90
+
91
+ // Next Banner View
92
+ func setNextBannerBackgroundColor(hexColor: String) {
93
+ controller.customDayStyle.customNextBannerBackgroundColor = UIColor(hex: hexColor)
94
+ controller.update()
95
+ }
96
+
97
+ func setNextBannerPrimaryTextColor(hexColor: String) {
98
+ controller.customDayStyle.customNextBannerPrimaryTextColor = UIColor(hex: hexColor)
99
+ controller.update()
100
+ }
101
+
102
+ func setNextBannerSecondaryTextColor(hexColor: String) {
103
+ controller.customDayStyle.customNextBannerSecondaryTextColor = UIColor(hex: hexColor)
104
+ controller.update()
105
+ }
106
+
107
+ func setNextBannerDistanceTextColor(hexColor: String) {
108
+ controller.customDayStyle.customNextBannerDistanceTextColor = UIColor(hex: hexColor)
109
+ controller.update()
110
+ }
111
+
112
+ // Progress Bar
113
+ func setProgressBarProgressColor(hexColor: String) {
114
+ controller.customDayStyle.customProgressBarProgressColor = UIColor(hex: hexColor)
115
+ controller.update()
116
+ }
117
+
118
+ func setProgressBarBackgroundColor(hexColor: String) {
119
+ controller.customDayStyle.customProgressBarBackgroundColor = UIColor(hex: hexColor)
120
+ controller.update()
121
+ }
122
+
123
+ // Instructions Card
124
+ func setInstructionsCardBackgroundColor(hexColor: String) {
125
+ controller.customDayStyle.customInstructionsCardBackgroundColor = UIColor(hex: hexColor)
126
+ controller.update()
127
+ }
128
+
129
+ func setInstructionsCardSeparatorColor(hexColor: String) {
130
+ controller.customDayStyle.customInstructionsCardSeparatorColor = UIColor(hex: hexColor)
131
+ controller.update()
132
+ }
133
+
134
+ func setInstructionsCardHighlightedSeparatorColor(hexColor: String) {
135
+ controller.customDayStyle.customInstructionsCardHighlightedSeparatorColor = UIColor(hex: hexColor)
136
+ controller.update()
137
+ }
138
+
139
+ // Exit View
140
+ func setExitViewForegroundColor(hexColor: String) {
141
+ controller.customDayStyle.customExitViewForegroundColor = UIColor(hex: hexColor)
142
+ controller.update()
143
+ }
144
+
145
+ func setExitViewBorderColor(hexColor: String) {
146
+ controller.customDayStyle.customExitViewBorderColor = UIColor(hex: hexColor)
147
+ controller.update()
148
+ }
149
+
150
+ func setExitViewHighlightColor(hexColor: String) {
151
+ controller.customDayStyle.customExitViewHighlightColor = UIColor(hex: hexColor)
152
+ controller.update()
153
+ }
154
+
155
+ // Route Shield
156
+ func setRouteShieldForegroundColor(hexColor: String) {
157
+ controller.customDayStyle.customRouteShieldForegroundColor = UIColor(hex: hexColor)
158
+ controller.update()
159
+ }
160
+
161
+ func setRouteShieldBorderColor(hexColor: String) {
162
+ controller.customDayStyle.customRouteShieldBorderColor = UIColor(hex: hexColor)
163
+ controller.update()
164
+ }
165
+
166
+ func setRouteShieldHighlightColor(hexColor: String) {
167
+ controller.customDayStyle.customRouteShieldHighlightColor = UIColor(hex: hexColor)
168
+ controller.update()
169
+ }
170
+
171
+ // Distance Labels
172
+ func setDistanceRemainingColor(hexColor: String) {
173
+ controller.customDayStyle.customDistanceRemainingColor = UIColor(hex: hexColor)
174
+ controller.update()
175
+ }
176
+
177
+ func setDistanceUnitColor(hexColor: String) {
178
+ controller.customDayStyle.customDistanceUnitColor = UIColor(hex: hexColor)
179
+ controller.update()
180
+ }
181
+
182
+ func setDistanceValueColor(hexColor: String) {
183
+ controller.customDayStyle.customDistanceValueColor = UIColor(hex: hexColor)
184
+ controller.update()
185
+ }
186
+
187
+ // Navigation Map
188
+ func setRouteAnnotationSelectedColor(hexColor: String) {
189
+ controller.customDayStyle.customRouteAnnotationSelectedColor = UIColor(hex: hexColor)
190
+ controller.update()
191
+ }
192
+
193
+ func setRouteAnnotationColor(hexColor: String) {
194
+ controller.customDayStyle.customRouteAnnotationColor = UIColor(hex: hexColor)
195
+ controller.update()
196
+ }
197
+
198
+ // Route Shield Colors
199
+ func setRoadShieldBlackColor(hexColor: String) {
200
+ controller.customDayStyle.customRoadShieldBlackColor = UIColor(hex: hexColor)
201
+ controller.update()
202
+ }
203
+
204
+ func setRoadShieldBlueColor(hexColor: String) {
205
+ controller.customDayStyle.customRoadShieldBlueColor = UIColor(hex: hexColor)
206
+ controller.update()
207
+ }
208
+
209
+ func setRoadShieldGreenColor(hexColor: String) {
210
+ controller.customDayStyle.customRoadShieldGreenColor = UIColor(hex: hexColor)
211
+ controller.update()
212
+ }
213
+
214
+ func setRoadShieldRedColor(hexColor: String) {
215
+ controller.customDayStyle.customRoadShieldRedColor = UIColor(hex: hexColor)
216
+ controller.update()
217
+ }
218
+
219
+ func setRoadShieldWhiteColor(hexColor: String) {
220
+ controller.customDayStyle.customRoadShieldWhiteColor = UIColor(hex: hexColor)
221
+ controller.update()
222
+ }
223
+
224
+ func setRoadShieldYellowColor(hexColor: String) {
225
+ controller.customDayStyle.customRoadShieldYellowColor = UIColor(hex: hexColor)
226
+ controller.update()
227
+ }
228
+
229
+ func setRoadShieldDefaultColor(hexColor: String) {
230
+ controller.customDayStyle.customRoadShieldDefaultColor = UIColor(hex: hexColor)
231
+ controller.update()
232
+ }
233
+
234
+ // Button Properties
235
+ func setButtonTextColor(hexColor: String) {
236
+ controller.customDayStyle.customButtonTextColor = UIColor(hex: hexColor)
237
+ controller.update()
238
+ }
239
+
240
+ func setCancelButtonTintColor(hexColor: String) {
241
+ controller.customDayStyle.customCancelButtonTintColor = UIColor(hex: hexColor)
242
+ controller.update()
243
+ }
244
+
245
+ func setPreviewButtonTintColor(hexColor: String) {
246
+ controller.customDayStyle.customPreviewButtonTintColor = UIColor(hex: hexColor)
247
+ controller.update()
248
+ }
249
+
250
+ func setStartButtonTintColor(hexColor: String) {
251
+ controller.customDayStyle.customStartButtonTintColor = UIColor(hex: hexColor)
252
+ controller.update()
253
+ }
254
+
255
+ func setDismissButtonBackgroundColor(hexColor: String) {
256
+ controller.customDayStyle.customDismissButtonBackgroundColor = UIColor(hex: hexColor)
257
+ controller.update()
258
+ }
259
+
260
+ func setDismissButtonTextColor(hexColor: String) {
261
+ controller.customDayStyle.customDismissButtonTextColor = UIColor(hex: hexColor)
262
+ controller.update()
263
+ }
264
+
265
+ func setBackButtonBackgroundColor(hexColor: String) {
266
+ controller.customDayStyle.customBackButtonBackgroundColor = UIColor(hex: hexColor)
267
+ controller.update()
268
+ }
269
+
270
+ func setBackButtonTintColor(hexColor: String) {
271
+ controller.customDayStyle.customBackButtonTintColor = UIColor(hex: hexColor)
272
+ controller.update()
273
+ }
274
+
275
+ func setBackButtonTextColor(hexColor: String) {
276
+ controller.customDayStyle.customBackButtonTextColor = UIColor(hex: hexColor)
277
+ controller.update()
278
+ }
279
+
280
+ func setBackButtonBorderColor(hexColor: String) {
281
+ controller.customDayStyle.customBackButtonBorderColor = UIColor(hex: hexColor)
282
+ controller.update()
283
+ }
284
+
285
+ // Navigation View
286
+ func setNavigationViewBackgroundColor(hexColor: String) {
287
+ controller.customDayStyle.customNavigationViewBackgroundColor = UIColor(hex: hexColor)
288
+ controller.update()
289
+ }
290
+
291
+ // Distance Label Properties
292
+ func setDistanceLabelUnitTextColor(hexColor: String) {
293
+ controller.customDayStyle.customDistanceLabelUnitTextColor = UIColor(hex: hexColor)
294
+ controller.update()
295
+ }
296
+
297
+ func setDistanceLabelValueTextColor(hexColor: String) {
298
+ controller.customDayStyle.customDistanceLabelValueTextColor = UIColor(hex: hexColor)
299
+ controller.update()
300
+ }
301
+
302
+ // Rating Control
303
+ func setRatingControlNormalColor(hexColor: String) {
304
+ controller.customDayStyle.customRatingControlNormalColor = UIColor(hex: hexColor)
305
+ controller.update()
306
+ }
307
+
308
+ func setRatingControlSelectedColor(hexColor: String) {
309
+ controller.customDayStyle.customRatingControlSelectedColor = UIColor(hex: hexColor)
310
+ controller.update()
311
+ }
312
+
313
+ // Steps Properties
314
+ func setStepsBackgroundViewColor(hexColor: String) {
315
+ controller.customDayStyle.customStepsBackgroundViewColor = UIColor(hex: hexColor)
316
+ controller.update()
317
+ }
318
+
319
+ func setStepsTableHeaderTintColor(hexColor: String) {
320
+ controller.customDayStyle.customStepsTableHeaderTintColor = UIColor(hex: hexColor)
321
+ controller.update()
322
+ }
323
+
324
+ func setStepsTableHeaderTextColor(hexColor: String) {
325
+ controller.customDayStyle.customStepsTableHeaderTextColor = UIColor(hex: hexColor)
326
+ controller.update()
327
+ }
328
+
329
+ func setStepInstructionsBackgroundColor(hexColor: String) {
330
+ controller.customDayStyle.customStepInstructionsBackgroundColor = UIColor(hex: hexColor)
331
+ controller.update()
332
+ }
333
+
334
+ func setStepTableViewCellBackgroundColor(hexColor: String) {
335
+ controller.customDayStyle.customStepTableViewCellBackgroundColor = UIColor(hex: hexColor)
336
+ controller.update()
337
+ }
338
+
339
+ // Next Instruction
340
+ func setNextInstructionNormalTextColor(hexColor: String) {
341
+ controller.customDayStyle.customNextInstructionNormalTextColor = UIColor(hex: hexColor)
342
+ controller.update()
343
+ }
344
+
345
+ func setNextInstructionContainedTextColor(hexColor: String) {
346
+ controller.customDayStyle.customNextInstructionContainedTextColor = UIColor(hex: hexColor)
347
+ controller.update()
348
+ }
349
+
350
+ // Secondary Label Properties
351
+ func setSecondaryLabelNormalTextColor(hexColor: String) {
352
+ controller.customDayStyle.customSecondaryLabelNormalTextColor = UIColor(hex: hexColor)
353
+ controller.update()
354
+ }
355
+
356
+ // Stylable Label
357
+ func setStylableLabelNormalTextColor(hexColor: String) {
358
+ controller.customDayStyle.customStylableLabelNormalTextColor = UIColor(hex: hexColor)
359
+ controller.update()
360
+ }
361
+
362
+ // CarPlay Properties
363
+ func setCarPlayCompassBackgroundColor(hexColor: String) {
364
+ controller.customDayStyle.customCarPlayCompassBackgroundColor = UIColor(hex: hexColor)
365
+ controller.update()
366
+ }
37
367
  }
38
368
 
39
369
 
@@ -364,6 +694,16 @@ class ExpoMapboxNavigationViewController: UIViewController {
364
694
  update()
365
695
  }
366
696
 
697
+ func setManeuverViewPrimaryColorHighlighted(hexColor: String) {
698
+ customDayStyle.customManeuverViewPrimaryColorHighlighted = UIColor(hex: hexColor)
699
+ update()
700
+ }
701
+
702
+ func setManeuverViewSecondaryColorHighlighted(hexColor: String) {
703
+ customDayStyle.customManeuverViewSecondaryColorHighlighted = UIColor(hex: hexColor)
704
+ update()
705
+ }
706
+
367
707
  func update(){
368
708
  calculateRoutesTask?.cancel()
369
709
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@complexify/expo-mapbox-navigation",
3
- "version": "1.1.8",
3
+ "version": "1.1.9",
4
4
  "description": "Expo module for Mapbox's Navigation SDK",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -1,4 +1,4 @@
1
- import { ViewStyle, StyleProp } from "react-native";
1
+ import { ViewStyle, StyleProp } from "react-native/types";
2
2
 
3
3
  type ProgressEvent = {
4
4
  distanceRemaining: number;
@@ -68,14 +68,134 @@ export type ExpoMapboxNavigationViewProps = {
68
68
 
69
69
  // Way Name Label (8)
70
70
  wayNameViewBackgroundColor?: string;
71
+ wayNameViewTextColor?: string;
71
72
 
72
- // Maneuver View (Direction Arrow and Text)
73
- maneuverViewPrimaryColor?: string; // Main arrow color
74
- maneuverViewSecondaryColor?: string; // Secondary arrow color
75
- maneuverViewTextColor?: string; // Direction text color
76
- maneuverViewBackgroundColor?: string; // Background of the direction bar
73
+ // Steps List
74
+ stepsBackgroundColor?: string;
75
+ stepsPrimaryTextColor?: string;
76
+ stepsSecondaryTextColor?: string;
77
+ stepsManeuverViewPrimaryColor?: string;
78
+ stepsManeuverViewSecondaryColor?: string;
79
+ stepsSeparatorColor?: string;
80
+
81
+ // Lane View
82
+ laneViewBackgroundColor?: string;
83
+ laneViewForegroundColor?: string;
84
+ laneViewSeparatorColor?: string;
85
+
86
+ // Next Banner View
87
+ nextBannerBackgroundColor?: string;
88
+ nextBannerPrimaryTextColor?: string;
89
+ nextBannerSecondaryTextColor?: string;
90
+ nextBannerDistanceTextColor?: string;
91
+
92
+ // Progress Bar
93
+ progressBarProgressColor?: string;
94
+ progressBarBackgroundColor?: string;
95
+
96
+ // Maneuver View (Direction Arrow)
97
+ maneuverViewPrimaryColor?: string;
98
+ maneuverViewSecondaryColor?: string;
99
+ maneuverViewPrimaryColorHighlighted?: string;
100
+ maneuverViewSecondaryColorHighlighted?: string;
77
101
 
78
102
  // Instructions View
79
103
  instructionsTextColor?: string; // Color for all instruction text
80
104
  instructionsBackgroundColor?: string; // Background color for instruction panels
105
+
106
+ // Instructions Card
107
+ instructionsCardBackgroundColor?: string;
108
+ instructionsCardSeparatorColor?: string;
109
+ instructionsCardHighlightedSeparatorColor?: string;
110
+
111
+ // Exit View
112
+ exitViewForegroundColor?: string;
113
+ exitViewBorderColor?: string;
114
+ exitViewHighlightColor?: string;
115
+
116
+ // Route Shield
117
+ routeShieldForegroundColor?: string;
118
+ routeShieldBorderColor?: string;
119
+ routeShieldHighlightColor?: string;
120
+
121
+ // Distance Labels
122
+ distanceRemainingColor?: string;
123
+ distanceUnitColor?: string;
124
+ distanceValueColor?: string;
125
+
126
+ // Navigation Map
127
+ routeAnnotationSelectedColor?: string;
128
+ routeAnnotationColor?: string;
129
+ routeAnnotationTextColor?: string;
130
+ routeAnnotationSelectedTextColor?: string;
131
+ routeAnnotationMoreTimeTextColor?: string;
132
+ routeAnnotationLessTimeTextColor?: string;
133
+ waypointColor?: string;
134
+ waypointStrokeColor?: string;
135
+
136
+ // Feedback
137
+ feedbackBackgroundColor?: string;
138
+ feedbackTextColor?: string;
139
+ feedbackCellColor?: string;
140
+ feedbackSubtypeCircleColor?: string;
141
+ feedbackSubtypeCircleOutlineColor?: string;
142
+
143
+ // End of Route
144
+ endOfRouteButtonTextColor?: string;
145
+ endOfRouteCommentBackgroundColor?: string;
146
+ endOfRouteCommentTextColor?: string;
147
+ endOfRouteContentBackgroundColor?: string;
148
+ endOfRouteTitleTextColor?: string;
149
+
150
+ // Road Shield Colors
151
+ roadShieldBlackColor?: string;
152
+ roadShieldBlueColor?: string;
153
+ roadShieldGreenColor?: string;
154
+ roadShieldRedColor?: string;
155
+ roadShieldWhiteColor?: string;
156
+ roadShieldYellowColor?: string;
157
+ roadShieldDefaultColor?: string;
158
+
159
+ // Button Properties
160
+ buttonTextColor?: string;
161
+ cancelButtonTintColor?: string;
162
+ previewButtonTintColor?: string;
163
+ startButtonTintColor?: string;
164
+ dismissButtonBackgroundColor?: string;
165
+ dismissButtonTextColor?: string;
166
+ backButtonBackgroundColor?: string;
167
+ backButtonTintColor?: string;
168
+ backButtonTextColor?: string;
169
+ backButtonBorderColor?: string;
170
+
171
+ // Navigation View
172
+ navigationViewBackgroundColor?: string;
173
+
174
+ // Distance Label Properties
175
+ distanceLabelUnitTextColor?: string;
176
+ distanceLabelValueTextColor?: string;
177
+
178
+ // Rating Control
179
+ ratingControlNormalColor?: string;
180
+ ratingControlSelectedColor?: string;
181
+
182
+ // Steps Properties
183
+ stepsBackgroundViewColor?: string;
184
+ stepsTableHeaderTintColor?: string;
185
+ stepsTableHeaderTextColor?: string;
186
+ stepInstructionsBackgroundColor?: string;
187
+ stepTableViewCellBackgroundColor?: string;
188
+
189
+ // Next Instruction
190
+ nextInstructionNormalTextColor?: string;
191
+ nextInstructionContainedTextColor?: string;
192
+
193
+ // Secondary Label Properties
194
+ secondaryLabelNormalTextColor?: string;
195
+
196
+ // Stylable Label
197
+ stylableLabelNormalTextColor?: string;
198
+
199
+ // CarPlay Properties
200
+ carPlayCompassBackgroundColor?: string;
81
201
  };