@complexify/expo-mapbox-navigation 1.1.2 → 1.1.3
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.
- package/build/ExpoMapboxNavigation.types.d.ts +0 -1
- package/build/ExpoMapboxNavigation.types.d.ts.map +1 -1
- package/build/ExpoMapboxNavigation.types.js.map +1 -1
- package/ios/CustomNavigationStyle.swift +0 -5
- package/ios/ExpoMapboxNavigationModule.swift +0 -6
- package/ios/ExpoMapboxNavigationView.swift +3 -9
- package/package.json +1 -1
- package/src/ExpoMapboxNavigation.types.ts +0 -1
@@ -54,7 +54,6 @@ export type ExpoMapboxNavigationViewProps = {
|
|
54
54
|
floatingStackBackgroundColor?: string;
|
55
55
|
floatingButtonsBackgroundColor?: string;
|
56
56
|
wayNameViewBackgroundColor?: string;
|
57
|
-
wayNameViewTextColor?: string;
|
58
57
|
};
|
59
58
|
export {};
|
60
59
|
//# sourceMappingURL=ExpoMapboxNavigation.types.d.ts.map
|
@@ -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,CA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AAM,CAAC;IAG/B,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,8BAA8B,CAAC,EAAE,MAAM,CAAC;IAGxC,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
|
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"]}
|
@@ -8,7 +8,6 @@ class CustomDayStyle: StandardDayStyle {
|
|
8
8
|
var customSpeedLimitBackgroundColor: UIColor?
|
9
9
|
var customSpeedLimitBorderColor: UIColor?
|
10
10
|
var customBottomBannerBackgroundColor: UIColor?
|
11
|
-
var customWayNameTextColor: UIColor?
|
12
11
|
var customWayNameBackgroundColor: UIColor?
|
13
12
|
|
14
13
|
required init() {
|
@@ -37,10 +36,6 @@ class CustomDayStyle: StandardDayStyle {
|
|
37
36
|
BottomBannerView.appearance(for: traitCollection).backgroundColor = bottomBannerBg
|
38
37
|
}
|
39
38
|
|
40
|
-
// Way name customization
|
41
|
-
if let textColor = customWayNameTextColor {
|
42
|
-
WayNameView.appearance(for: traitCollection).textColor = textColor
|
43
|
-
}
|
44
39
|
if let bgColor = customWayNameBackgroundColor {
|
45
40
|
WayNameView.appearance(for: traitCollection).backgroundColor = bgColor.withAlphaComponent(0.8)
|
46
41
|
}
|
@@ -180,12 +180,6 @@ public class ExpoMapboxNavigationModule: Module {
|
|
180
180
|
}
|
181
181
|
}
|
182
182
|
|
183
|
-
Prop("wayNameViewTextColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
184
|
-
if let hexColor = color {
|
185
|
-
view.controller.setWayNameViewTextColor(hexColor: hexColor)
|
186
|
-
}
|
187
|
-
}
|
188
|
-
|
189
183
|
Prop("resumeButtonBackgroundColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
190
184
|
if let hexColor = color {
|
191
185
|
view.controller.setResumeButtonBackgroundColor(hexColor: hexColor)
|
@@ -17,8 +17,6 @@ class ExpoMapboxNavigationView: ExpoView {
|
|
17
17
|
|
18
18
|
let controller = ExpoMapboxNavigationViewController()
|
19
19
|
|
20
|
-
let customDayStyle = CustomDayStyle()
|
21
|
-
|
22
20
|
required init(appContext: AppContext? = nil) {
|
23
21
|
super.init(appContext: appContext)
|
24
22
|
clipsToBounds = true
|
@@ -93,10 +91,11 @@ class ExpoMapboxNavigationViewController: UIViewController {
|
|
93
91
|
var currentSpeedLimitBackgroundColor: UIColor?
|
94
92
|
var currentSpeedLimitTextColor: UIColor?
|
95
93
|
var currentWayNameViewBackgroundColor: UIColor?
|
96
|
-
var currentWayNameViewTextColor: UIColor?
|
97
94
|
var currentResumeButtonBackgroundColor: UIColor?
|
98
95
|
var currentResumeButtonTextColor: UIColor?
|
99
96
|
|
97
|
+
let customDayStyle = CustomDayStyle()
|
98
|
+
|
100
99
|
init() {
|
101
100
|
super.init(nibName: nil, bundle: nil)
|
102
101
|
mapboxNavigation = ExpoMapboxNavigationViewController.navigationProvider.mapboxNavigation
|
@@ -311,11 +310,6 @@ class ExpoMapboxNavigationViewController: UIViewController {
|
|
311
310
|
update()
|
312
311
|
}
|
313
312
|
|
314
|
-
func setWayNameViewTextColor(hexColor: String) {
|
315
|
-
customDayStyle.customWayNameTextColor = UIColor(hex: hexColor)
|
316
|
-
update()
|
317
|
-
}
|
318
|
-
|
319
313
|
func setResumeButtonBackgroundColor(hexColor: String) {
|
320
314
|
currentResumeButtonBackgroundColor = UIColor(hex: hexColor)
|
321
315
|
update()
|
@@ -436,10 +430,10 @@ class ExpoMapboxNavigationViewController: UIViewController {
|
|
436
430
|
}
|
437
431
|
|
438
432
|
let navigationOptions = NavigationOptions(
|
439
|
-
styles: [customDayStyle],
|
440
433
|
mapboxNavigation: self.mapboxNavigation!,
|
441
434
|
voiceController: ExpoMapboxNavigationViewController.navigationProvider.routeVoiceController,
|
442
435
|
eventsManager: ExpoMapboxNavigationViewController.navigationProvider.eventsManager(),
|
436
|
+
styles: [customDayStyle],
|
443
437
|
topBanner: topBanner,
|
444
438
|
bottomBanner: bottomBanner
|
445
439
|
)
|
package/package.json
CHANGED