@complexify/expo-mapbox-navigation 1.1.3 → 1.1.4

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.
@@ -48,11 +48,14 @@ export type ExpoMapboxNavigationViewProps = {
48
48
  bottomBannerArrivalTimeTextColor?: string;
49
49
  resumeButtonBackgroundColor?: string;
50
50
  resumeButtonTextColor?: string;
51
+ resumeButtonBorderColor?: string;
51
52
  speedLimitBackgroundColor?: string;
52
53
  speedLimitTextColor?: string;
53
54
  speedLimitBorderColor?: string;
54
55
  floatingStackBackgroundColor?: string;
55
56
  floatingButtonsBackgroundColor?: string;
57
+ floatingButtonsTextColor?: string;
58
+ floatingButtonsBorderColor?: string;
56
59
  wayNameViewBackgroundColor?: string;
57
60
  };
58
61
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"ExpoMapboxNavigation.types.d.ts","sourceRoot":"","sources":["../src/ExpoMapboxNavigation.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,KAAK,aAAa,GAAG;IACnB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,WAAW,EAAE,KAAK,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC5D,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI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AC;IACxC,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,0BAA0B,CAAC,EAAE,MAAM,CAAC;IAGpC,0BAA0B,CAAC,EAAE,MAAM,CAAC;CACrC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ExpoMapboxNavigation.types.js","sourceRoot":"","sources":["../src/ExpoMapboxNavigation.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ViewStyle, StyleProp } from \"react-native\";\n\ntype ProgressEvent = {\n distanceRemaining: number;\n distanceTraveled: number;\n durationRemaining: number;\n fractionTraveled: number;\n};\n\nexport type ExpoMapboxNavigationViewProps = {\n coordinates: Array<{ latitude: number; longitude: number }>;\n waypointIndices?: number[];\n useRouteMatchingApi?: boolean;\n locale?: string;\n routeProfile?: string;\n routeExcludeList?: string[];\n mapStyle?: string;\n mute?: boolean;\n routeColor?: string;\n routeAlternateColor?: string;\n routeCasingColor?: string;\n routeAlternateCasingColor?: string;\n traversedRouteColor?: string;\n maneuverArrowColor?: string;\n onRouteProgressChanged?: (event: { nativeEvent: ProgressEvent }) => void;\n onCancelNavigation?: () => void;\n onWaypointArrival?: (event: {\n nativeEvent: ProgressEvent | undefined;\n }) => void;\n onFinalDestinationArrival?: () => void;\n onRouteChanged?: () => void;\n onUserOffRoute?: () => void;\n onRoutesLoaded?: () => void;\n style?: StyleProp<ViewStyle>;\n\n // Top Banner (1)\n topBannerBackgroundColor?: string;\n topBannerPrimaryTextColor?: string;\n topBannerSecondaryTextColor?: string;\n topBannerDistanceTextColor?: string;\n topBannerSeparatorColor?: string;\n\n // Information Stack (2)\n informationStackBackgroundColor?: string;\n informationStackTextColor?: string;\n\n // Bottom Banner (3)\n bottomBannerBackgroundColor?: string;\n bottomBannerTimeRemainingTextColor?: string;\n bottomBannerDistanceRemainingTextColor?: string;\n bottomBannerArrivalTimeTextColor?: string;\n\n // Resume Button (4)\n resumeButtonBackgroundColor?: string;\n resumeButtonTextColor?: string;\n\n // Speed Limit View (5)\n speedLimitBackgroundColor?: string;\n speedLimitTextColor?: string;\n speedLimitBorderColor?: string;\n\n // Floating Stack (6)\n floatingStackBackgroundColor?: string;\n floatingButtonsBackgroundColor?: string;\n\n // Way Name Label (8)\n wayNameViewBackgroundColor?: string;\n};\n"]}
1
+ {"version":3,"file":"ExpoMapboxNavigation.types.js","sourceRoot":"","sources":["../src/ExpoMapboxNavigation.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ViewStyle, StyleProp } from \"react-native\";\n\ntype ProgressEvent = {\n distanceRemaining: number;\n distanceTraveled: number;\n durationRemaining: number;\n fractionTraveled: number;\n};\n\nexport type ExpoMapboxNavigationViewProps = {\n coordinates: Array<{ latitude: number; longitude: number }>;\n waypointIndices?: number[];\n useRouteMatchingApi?: boolean;\n locale?: string;\n routeProfile?: string;\n routeExcludeList?: string[];\n mapStyle?: string;\n mute?: boolean;\n routeColor?: string;\n routeAlternateColor?: string;\n routeCasingColor?: string;\n routeAlternateCasingColor?: string;\n traversedRouteColor?: string;\n maneuverArrowColor?: string;\n onRouteProgressChanged?: (event: { nativeEvent: ProgressEvent }) => void;\n onCancelNavigation?: () => void;\n onWaypointArrival?: (event: {\n nativeEvent: ProgressEvent | undefined;\n }) => void;\n onFinalDestinationArrival?: () => void;\n onRouteChanged?: () => void;\n onUserOffRoute?: () => void;\n onRoutesLoaded?: () => void;\n style?: StyleProp<ViewStyle>;\n\n // Top Banner (1)\n topBannerBackgroundColor?: string;\n topBannerPrimaryTextColor?: string;\n topBannerSecondaryTextColor?: string;\n topBannerDistanceTextColor?: string;\n topBannerSeparatorColor?: string;\n\n // Information Stack (2)\n informationStackBackgroundColor?: string;\n informationStackTextColor?: string;\n\n // Bottom Banner (3)\n bottomBannerBackgroundColor?: string;\n bottomBannerTimeRemainingTextColor?: string;\n bottomBannerDistanceRemainingTextColor?: string;\n bottomBannerArrivalTimeTextColor?: string;\n\n // Resume Button (4)\n resumeButtonBackgroundColor?: string;\n resumeButtonTextColor?: string;\n resumeButtonBorderColor?: string;\n\n // Speed Limit View (5)\n speedLimitBackgroundColor?: string;\n speedLimitTextColor?: string;\n speedLimitBorderColor?: string;\n\n // Floating Stack (6)\n floatingStackBackgroundColor?: string;\n floatingButtonsBackgroundColor?: string;\n floatingButtonsTextColor?: string;\n floatingButtonsBorderColor?: string;\n\n // Way Name Label (8)\n wayNameViewBackgroundColor?: string;\n};\n"]}
@@ -8,7 +8,20 @@ class CustomDayStyle: StandardDayStyle {
8
8
  var customSpeedLimitBackgroundColor: UIColor?
9
9
  var customSpeedLimitBorderColor: UIColor?
10
10
  var customBottomBannerBackgroundColor: UIColor?
11
+ var customBottomBannerTimeRemainingTextColor: UIColor?
12
+ var customBottomBannerDistanceRemainingTextColor: UIColor?
13
+ var customBottomBannerArrivalTimeTextColor: UIColor?
11
14
  var customWayNameBackgroundColor: UIColor?
15
+ var customTopBannerBackgroundColor: UIColor?
16
+ var customTopBannerPrimaryTextColor: UIColor?
17
+ var customTopBannerSecondaryTextColor: UIColor?
18
+ var customTopBannerDistanceTextColor: UIColor?
19
+ var customResumeButtonBackgroundColor: UIColor?
20
+ var customResumeButtonTextColor: UIColor?
21
+ var customResumeButtonBorderColor: UIColor?
22
+ var customFloatingButtonsBackgroundColor: UIColor?
23
+ var customFloatingButtonsBorderColor: UIColor?
24
+ var customFloatingButtonsTextColor: UIColor?
12
25
 
13
26
  required init() {
14
27
  super.init()
@@ -36,8 +49,79 @@ class CustomDayStyle: StandardDayStyle {
36
49
  BottomBannerView.appearance(for: traitCollection).backgroundColor = bottomBannerBg
37
50
  }
38
51
 
52
+ // Bottom banner text colors
53
+ if let timeRemainingColor = customBottomBannerTimeRemainingTextColor {
54
+ TimeRemainingLabel.appearance(for: traitCollection).textColor = timeRemainingColor
55
+ }
56
+ if let distanceRemainingColor = customBottomBannerDistanceRemainingTextColor {
57
+ DistanceRemainingLabel.appearance(for: traitCollection).textColor = distanceRemainingColor
58
+ }
59
+ if let arrivalTimeColor = customBottomBannerArrivalTimeTextColor {
60
+ ArrivalTimeLabel.appearance(for: traitCollection).textColor = arrivalTimeColor
61
+ }
62
+
63
+ // Way name customization
39
64
  if let bgColor = customWayNameBackgroundColor {
40
65
  WayNameView.appearance(for: traitCollection).backgroundColor = bgColor.withAlphaComponent(0.8)
41
66
  }
67
+
68
+ // Top banner customization
69
+ if let topBannerBg = customTopBannerBackgroundColor {
70
+ InstructionsBannerView.appearance(for: traitCollection).backgroundColor = topBannerBg
71
+ }
72
+ if let primaryTextColor = customTopBannerPrimaryTextColor {
73
+ PrimaryLabel.appearance(for: traitCollection).textColor = primaryTextColor
74
+ }
75
+ if let secondaryTextColor = customTopBannerSecondaryTextColor {
76
+ SecondaryLabel.appearance(for: traitCollection).textColor = secondaryTextColor
77
+ }
78
+ if let distanceTextColor = customTopBannerDistanceTextColor {
79
+ DistanceLabel.appearance(for: traitCollection).textColor = distanceTextColor
80
+ }
81
+
82
+ // Resume button customization
83
+ if let resumeBgColor = customResumeButtonBackgroundColor {
84
+ ResumeButton.appearance(for: traitCollection).backgroundColor = resumeBgColor
85
+ }
86
+ if let resumeTextColor = customResumeButtonTextColor {
87
+ ResumeButton.appearance(for: traitCollection).tintColor = resumeTextColor
88
+ }
89
+ if let resumeBorderColor = customResumeButtonBorderColor {
90
+ ResumeButton.appearance(for: traitCollection).borderColor = resumeBorderColor
91
+ }
92
+
93
+ // Set default values for border width and corner radius
94
+ ResumeButton.appearance(for: traitCollection).borderWidth = 1.0
95
+ ResumeButton.appearance(for: traitCollection).cornerRadius = 4.0
96
+
97
+ // Floating buttons customization
98
+ if let floatingBgColor = customFloatingButtonsBackgroundColor {
99
+ FloatingButton.appearance(for: traitCollection).backgroundColor = floatingBgColor
100
+ OverviewButton.appearance(for: traitCollection).backgroundColor = floatingBgColor
101
+ MuteButton.appearance(for: traitCollection).backgroundColor = floatingBgColor
102
+ FeedbackButton.appearance(for: traitCollection).backgroundColor = floatingBgColor
103
+ }
104
+ if let floatingTextColor = customFloatingButtonsTextColor {
105
+ FloatingButton.appearance(for: traitCollection).tintColor = floatingTextColor
106
+ OverviewButton.appearance(for: traitCollection).tintColor = floatingTextColor
107
+ MuteButton.appearance(for: traitCollection).tintColor = floatingTextColor
108
+ FeedbackButton.appearance(for: traitCollection).tintColor = floatingTextColor
109
+ }
110
+ if let floatingBorderColor = customFloatingButtonsBorderColor {
111
+ FloatingButton.appearance(for: traitCollection).borderColor = floatingBorderColor
112
+ OverviewButton.appearance(for: traitCollection).borderColor = floatingBorderColor
113
+ MuteButton.appearance(for: traitCollection).borderColor = floatingBorderColor
114
+ FeedbackButton.appearance(for: traitCollection).borderColor = floatingBorderColor
115
+ }
116
+
117
+ // Set default values for floating buttons
118
+ FloatingButton.appearance(for: traitCollection).borderWidth = 1.0
119
+ FloatingButton.appearance(for: traitCollection).cornerRadius = 4.0
120
+ OverviewButton.appearance(for: traitCollection).borderWidth = 1.0
121
+ OverviewButton.appearance(for: traitCollection).cornerRadius = 4.0
122
+ MuteButton.appearance(for: traitCollection).borderWidth = 1.0
123
+ MuteButton.appearance(for: traitCollection).cornerRadius = 4.0
124
+ FeedbackButton.appearance(for: traitCollection).borderWidth = 1.0
125
+ FeedbackButton.appearance(for: traitCollection).cornerRadius = 4.0
42
126
  }
43
127
  }
@@ -162,6 +162,18 @@ public class ExpoMapboxNavigationModule: Module {
162
162
  }
163
163
  }
164
164
 
165
+ Prop("floatingButtonsTextColor") { (view: ExpoMapboxNavigationView, color: String?) in
166
+ if let hexColor = color {
167
+ view.controller.setFloatingButtonsTextColor(hexColor: hexColor)
168
+ }
169
+ }
170
+
171
+ Prop("floatingButtonsBorderColor") { (view: ExpoMapboxNavigationView, color: String?) in
172
+ if let hexColor = color {
173
+ view.controller.setFloatingButtonsBorderColor(hexColor: hexColor)
174
+ }
175
+ }
176
+
165
177
  Prop("speedLimitBackgroundColor") { (view: ExpoMapboxNavigationView, color: String?) in
166
178
  if let hexColor = color {
167
179
  view.controller.setSpeedLimitBackgroundColor(hexColor: hexColor)
@@ -236,19 +236,23 @@ class ExpoMapboxNavigationViewController: UIViewController {
236
236
  }
237
237
 
238
238
  func setTopBannerBackgroundColor(hexColor: String) {
239
- currentTopBannerBackgroundColor = UIColor(hex: hexColor)
239
+ customDayStyle.customTopBannerBackgroundColor = UIColor(hex: hexColor)
240
+ update()
240
241
  }
241
242
 
242
243
  func setTopBannerPrimaryTextColor(hexColor: String) {
243
- currentTopBannerPrimaryTextColor = UIColor(hex: hexColor)
244
+ customDayStyle.customTopBannerPrimaryTextColor = UIColor(hex: hexColor)
245
+ update()
244
246
  }
245
247
 
246
248
  func setTopBannerSecondaryTextColor(hexColor: String) {
247
- currentTopBannerSecondaryTextColor = UIColor(hex: hexColor)
249
+ customDayStyle.customTopBannerSecondaryTextColor = UIColor(hex: hexColor)
250
+ update()
248
251
  }
249
252
 
250
253
  func setTopBannerDistanceTextColor(hexColor: String) {
251
- currentTopBannerDistanceTextColor = UIColor(hex: hexColor)
254
+ customDayStyle.customTopBannerDistanceTextColor = UIColor(hex: hexColor)
255
+ update()
252
256
  }
253
257
 
254
258
  func setTopBannerSeparatorColor(hexColor: String) {
@@ -261,17 +265,17 @@ class ExpoMapboxNavigationViewController: UIViewController {
261
265
  }
262
266
 
263
267
  func setBottomBannerTimeRemainingTextColor(hexColor: String) {
264
- currentBottomBannerTimeRemainingTextColor = UIColor(hex: hexColor)
268
+ customDayStyle.customBottomBannerTimeRemainingTextColor = UIColor(hex: hexColor)
265
269
  update()
266
270
  }
267
271
 
268
272
  func setBottomBannerDistanceRemainingTextColor(hexColor: String) {
269
- currentBottomBannerDistanceRemainingTextColor = UIColor(hex: hexColor)
273
+ customDayStyle.customBottomBannerDistanceRemainingTextColor = UIColor(hex: hexColor)
270
274
  update()
271
275
  }
272
276
 
273
277
  func setBottomBannerArrivalTimeTextColor(hexColor: String) {
274
- currentBottomBannerArrivalTimeTextColor = UIColor(hex: hexColor)
278
+ customDayStyle.customBottomBannerArrivalTimeTextColor = UIColor(hex: hexColor)
275
279
  update()
276
280
  }
277
281
 
@@ -291,7 +295,17 @@ class ExpoMapboxNavigationViewController: UIViewController {
291
295
  }
292
296
 
293
297
  func setFloatingButtonsBackgroundColor(hexColor: String) {
294
- currentFloatingButtonsBackgroundColor = UIColor(hex: hexColor)
298
+ customDayStyle.customFloatingButtonsBackgroundColor = UIColor(hex: hexColor)
299
+ update()
300
+ }
301
+
302
+ func setFloatingButtonsTextColor(hexColor: String) {
303
+ customDayStyle.customFloatingButtonsTextColor = UIColor(hex: hexColor)
304
+ update()
305
+ }
306
+
307
+ func setFloatingButtonsBorderColor(hexColor: String) {
308
+ customDayStyle.customFloatingButtonsBorderColor = UIColor(hex: hexColor)
295
309
  update()
296
310
  }
297
311
 
@@ -311,12 +325,17 @@ class ExpoMapboxNavigationViewController: UIViewController {
311
325
  }
312
326
 
313
327
  func setResumeButtonBackgroundColor(hexColor: String) {
314
- currentResumeButtonBackgroundColor = UIColor(hex: hexColor)
328
+ customDayStyle.customResumeButtonBackgroundColor = UIColor(hex: hexColor)
315
329
  update()
316
330
  }
317
331
 
318
332
  func setResumeButtonTextColor(hexColor: String) {
319
- currentResumeButtonTextColor = UIColor(hex: hexColor)
333
+ customDayStyle.customResumeButtonTextColor = UIColor(hex: hexColor)
334
+ update()
335
+ }
336
+
337
+ func setResumeButtonBorderColor(hexColor: String) {
338
+ customDayStyle.customResumeButtonBorderColor = UIColor(hex: hexColor)
320
339
  update()
321
340
  }
322
341
 
@@ -394,41 +413,10 @@ class ExpoMapboxNavigationViewController: UIViewController {
394
413
  let topBanner = TopBannerViewController()
395
414
  topBanner.instructionsBannerView.distanceFormatter.locale = currentLocale
396
415
 
397
- // Apply top banner colors
398
- if let backgroundColor = currentTopBannerBackgroundColor {
399
- topBanner.view.backgroundColor = backgroundColor
400
- }
401
- if let primaryTextColor = currentTopBannerPrimaryTextColor {
402
- topBanner.instructionsBannerView.primaryLabel.textColor = primaryTextColor
403
- }
404
- if let secondaryTextColor = currentTopBannerSecondaryTextColor {
405
- topBanner.instructionsBannerView.secondaryLabel.textColor = secondaryTextColor
406
- }
407
- if let distanceTextColor = currentTopBannerDistanceTextColor {
408
- topBanner.instructionsBannerView.distanceLabel.textColor = distanceTextColor
409
- }
410
- if let separatorColor = currentTopBannerSeparatorColor {
411
- topBanner.instructionsBannerView.separatorView.backgroundColor = separatorColor
412
- }
413
-
414
416
  let bottomBanner = BottomBannerViewController()
415
417
  bottomBanner.distanceFormatter.locale = currentLocale
416
418
  bottomBanner.dateFormatter.locale = currentLocale
417
419
 
418
- // Apply bottom banner colors
419
- if let backgroundColor = currentBottomBannerBackgroundColor {
420
- bottomBanner.view.backgroundColor = backgroundColor
421
- }
422
- if let timeRemainingColor = currentBottomBannerTimeRemainingTextColor {
423
- bottomBanner.timeRemainingLabel.textColor = timeRemainingColor
424
- }
425
- if let distanceRemainingColor = currentBottomBannerDistanceRemainingTextColor {
426
- bottomBanner.distanceRemainingLabel.textColor = distanceRemainingColor
427
- }
428
- if let arrivalTimeColor = currentBottomBannerArrivalTimeTextColor {
429
- bottomBanner.arrivalTimeLabel.textColor = arrivalTimeColor
430
- }
431
-
432
420
  let navigationOptions = NavigationOptions(
433
421
  mapboxNavigation: self.mapboxNavigation!,
434
422
  voiceController: ExpoMapboxNavigationViewController.navigationProvider.routeVoiceController,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@complexify/expo-mapbox-navigation",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "Expo module for Mapbox's Navigation SDK",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -53,6 +53,7 @@ export type ExpoMapboxNavigationViewProps = {
53
53
  // Resume Button (4)
54
54
  resumeButtonBackgroundColor?: string;
55
55
  resumeButtonTextColor?: string;
56
+ resumeButtonBorderColor?: string;
56
57
 
57
58
  // Speed Limit View (5)
58
59
  speedLimitBackgroundColor?: string;
@@ -62,6 +63,8 @@ export type ExpoMapboxNavigationViewProps = {
62
63
  // Floating Stack (6)
63
64
  floatingStackBackgroundColor?: string;
64
65
  floatingButtonsBackgroundColor?: string;
66
+ floatingButtonsTextColor?: string;
67
+ floatingButtonsBorderColor?: string;
65
68
 
66
69
  // Way Name Label (8)
67
70
  wayNameViewBackgroundColor?: string;