@iternio/react-native-auto-play 0.5.14-beta.1 → 0.6.1

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 (201) hide show
  1. package/README.md +270 -36
  2. package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/AndroidAutoSession.kt +5 -0
  3. package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridMapTemplate.kt +9 -2
  4. package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/NativeBackdrop.kt +40 -0
  5. package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/VirtualRenderer.kt +52 -0
  6. package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/template/GridTemplate.kt +47 -13
  7. package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/template/Parser.kt +69 -15
  8. package/ios/Types.swift +3 -0
  9. package/ios/extensions/UIImage+Toggle.swift +5 -2
  10. package/ios/hybrid/HybridAutoPlay.swift +28 -16
  11. package/ios/hybrid/HybridMapTemplate.swift +22 -5
  12. package/ios/scenes/AutoPlayInterfaceController.swift +261 -72
  13. package/ios/templates/AutoPlayMapPanelDelegate.swift +190 -0
  14. package/ios/templates/AutoPlayTemplate.swift +24 -2
  15. package/ios/templates/GridTemplate.swift +57 -57
  16. package/ios/templates/InformationTemplate.swift +84 -9
  17. package/ios/templates/ListTemplate.swift +66 -11
  18. package/ios/templates/MapTemplate.swift +83 -68
  19. package/ios/templates/MessageTemplate.swift +72 -6
  20. package/ios/templates/Parser.swift +564 -69
  21. package/ios/templates/SearchTemplate.swift +1 -1
  22. package/ios/templates/TemplateStore.swift +5 -15
  23. package/ios/utils/SymbolFont.swift +13 -28
  24. package/jest.js +2 -0
  25. package/lib/Constants.d.ts +4 -0
  26. package/lib/Constants.js +6 -0
  27. package/lib/index.d.ts +1 -0
  28. package/lib/index.js +1 -0
  29. package/lib/index.web.d.ts +73 -0
  30. package/lib/index.web.js +72 -1
  31. package/lib/specs/MapTemplate.nitro.d.ts +3 -1
  32. package/lib/templates/GridTemplate.d.ts +23 -3
  33. package/lib/templates/GridTemplate.js +8 -0
  34. package/lib/templates/InformationTemplate.d.ts +38 -12
  35. package/lib/templates/ListTemplate.d.ts +16 -47
  36. package/lib/templates/MapTemplate.d.ts +26 -2
  37. package/lib/templates/MapTemplate.js +16 -2
  38. package/lib/templates/MessageTemplate.d.ts +52 -11
  39. package/lib/templates/MessageTemplate.js +1 -1
  40. package/lib/types/Image.d.ts +6 -1
  41. package/lib/utils/NitroColor.d.ts +1 -0
  42. package/lib/utils/NitroColor.js +8 -0
  43. package/lib/utils/NitroImage.js +1 -1
  44. package/lib/utils/NitroManeuver.js +1 -3
  45. package/lib/utils/NitroOptionsPanel.d.ts +103 -0
  46. package/lib/utils/NitroOptionsPanel.js +63 -0
  47. package/lib/utils/NitroSection.d.ts +89 -2
  48. package/lib/utils/NitroSection.js +49 -2
  49. package/lib-cjs/AutoPlayHeadlessJsTask.js +16 -0
  50. package/lib-cjs/Constants.js +9 -0
  51. package/lib-cjs/components/MapTemplateContext.js +10 -0
  52. package/lib-cjs/components/SafeAreaInsetsContext.js +21 -0
  53. package/lib-cjs/components/SafeAreaView.js +22 -0
  54. package/lib-cjs/components/WindowInformationWrapper.js +20 -0
  55. package/lib-cjs/hooks/useAndroidAutoTelemetry.js +115 -0
  56. package/lib-cjs/hooks/useFocusedEffect.js +35 -0
  57. package/lib-cjs/hooks/useMapTemplate.js +13 -0
  58. package/lib-cjs/hooks/useSafeAreaInsets.js +9 -0
  59. package/lib-cjs/hooks/useVoiceInput.js +42 -0
  60. package/lib-cjs/hybrid/HybridAndroidAutoTelemetry.js +4 -0
  61. package/lib-cjs/hybrid/HybridAndroidWindowInformation.js +4 -0
  62. package/lib-cjs/hybrid/HybridAutoPlay.js +5 -0
  63. package/lib-cjs/hybrid/HybridVoice.js +61 -0
  64. package/lib-cjs/index.js +76 -0
  65. package/lib-cjs/index.web.js +98 -0
  66. package/lib-cjs/scenes/AutoPlayCluster.js +140 -0
  67. package/lib-cjs/scenes/CarPlayDashboardScene.js +100 -0
  68. package/lib-cjs/specs/AndroidAutoTelemetry.nitro.js +2 -0
  69. package/lib-cjs/specs/AndroidAutomotive.nitro.js +16 -0
  70. package/lib-cjs/specs/AndroidWindowInformation.nitro.js +2 -0
  71. package/lib-cjs/specs/AutoPlay.nitro.js +2 -0
  72. package/lib-cjs/specs/CarPlayDashboard.nitro.js +2 -0
  73. package/lib-cjs/specs/Cluster.nitro.js +2 -0
  74. package/lib-cjs/specs/GridTemplate.nitro.js +2 -0
  75. package/lib-cjs/specs/InformationTemplate.nitro.js +2 -0
  76. package/lib-cjs/specs/ListTemplate.nitro.js +2 -0
  77. package/lib-cjs/specs/MapTemplate.nitro.js +2 -0
  78. package/lib-cjs/specs/MessageTemplate.nitro.js +2 -0
  79. package/lib-cjs/specs/SearchTemplate.nitro.js +2 -0
  80. package/lib-cjs/specs/SignInTemplate.nitro.js +2 -0
  81. package/lib-cjs/specs/Voice.nitro.js +2 -0
  82. package/lib-cjs/templates/GridTemplate.js +41 -0
  83. package/lib-cjs/templates/InformationTemplate.js +49 -0
  84. package/lib-cjs/templates/ListTemplate.js +33 -0
  85. package/lib-cjs/templates/MapTemplate.js +168 -0
  86. package/lib-cjs/templates/MessageTemplate.js +50 -0
  87. package/lib-cjs/templates/SearchTemplate.js +32 -0
  88. package/lib-cjs/templates/SignInTemplate.js +55 -0
  89. package/lib-cjs/templates/Template.js +40 -0
  90. package/lib-cjs/types/Button.js +12 -0
  91. package/lib-cjs/types/Event.js +2 -0
  92. package/lib-cjs/types/Image.js +2 -0
  93. package/lib-cjs/types/Maneuver.js +77 -0
  94. package/lib-cjs/types/RootComponent.js +2 -0
  95. package/lib-cjs/types/SignInMethod.js +22 -0
  96. package/lib-cjs/types/Telemetry.js +24 -0
  97. package/lib-cjs/types/Text.js +8 -0
  98. package/lib-cjs/types/Trip.js +2 -0
  99. package/lib-cjs/types/Voice.js +2 -0
  100. package/lib-cjs/utils/ErrorUtil.js +34 -0
  101. package/lib-cjs/utils/NitroAction.js +129 -0
  102. package/lib-cjs/utils/NitroAlert.js +19 -0
  103. package/lib-cjs/utils/NitroAttributedString.js +14 -0
  104. package/lib-cjs/utils/NitroColor.js +32 -0
  105. package/lib-cjs/utils/NitroGrid.js +12 -0
  106. package/lib-cjs/utils/NitroImage.js +97 -0
  107. package/lib-cjs/utils/NitroManeuver.js +79 -0
  108. package/lib-cjs/utils/NitroMapButton.js +33 -0
  109. package/lib-cjs/utils/NitroOptionsPanel.js +66 -0
  110. package/lib-cjs/utils/NitroSection.js +112 -0
  111. package/nitrogen/generated/android/ReactNativeAutoPlay+autolinking.cmake +1 -0
  112. package/nitrogen/generated/android/c++/JChargingConnector.hpp +79 -0
  113. package/nitrogen/generated/android/c++/JGridImageSize.hpp +64 -0
  114. package/nitrogen/generated/android/c++/JGridTemplateConfig.hpp +7 -1
  115. package/nitrogen/generated/android/c++/JHybridGridTemplateSpec.cpp +4 -0
  116. package/nitrogen/generated/android/c++/JHybridInformationTemplateSpec.cpp +12 -0
  117. package/nitrogen/generated/android/c++/JHybridListTemplateSpec.cpp +12 -0
  118. package/nitrogen/generated/android/c++/JHybridMapTemplateSpec.cpp +78 -3
  119. package/nitrogen/generated/android/c++/JHybridMapTemplateSpec.hpp +2 -1
  120. package/nitrogen/generated/android/c++/JHybridSearchTemplateSpec.cpp +12 -0
  121. package/nitrogen/generated/android/c++/JInformationTemplateConfig.hpp +6 -0
  122. package/nitrogen/generated/android/c++/JListImageType.hpp +67 -0
  123. package/nitrogen/generated/android/c++/JListTemplateConfig.hpp +6 -0
  124. package/nitrogen/generated/android/c++/JNitroChargerLocation.hpp +115 -0
  125. package/nitrogen/generated/android/c++/JNitroChargerOutlet.hpp +82 -0
  126. package/nitrogen/generated/android/c++/JNitroColor.hpp +8 -4
  127. package/nitrogen/generated/android/c++/JNitroOptionsPanelChargerSection.hpp +112 -0
  128. package/nitrogen/generated/android/c++/JNitroOptionsPanelConfig.hpp +157 -0
  129. package/nitrogen/generated/android/c++/JNitroOptionsPanelGridSection.hpp +102 -0
  130. package/nitrogen/generated/android/c++/JNitroOptionsPanelSection.cpp +30 -0
  131. package/nitrogen/generated/android/c++/JNitroOptionsPanelSection.hpp +129 -0
  132. package/nitrogen/generated/android/c++/JNitroRow.hpp +33 -3
  133. package/nitrogen/generated/android/c++/JNitroSection.hpp +6 -0
  134. package/nitrogen/generated/android/c++/JSearchTemplateConfig.hpp +6 -0
  135. package/nitrogen/generated/android/c++/JWaypointCoordinate.hpp +65 -0
  136. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/ChargingConnector.kt +30 -0
  137. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/GridImageSize.kt +25 -0
  138. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/GridTemplateConfig.kt +9 -4
  139. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridMapTemplateSpec.kt +5 -1
  140. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/ListImageType.kt +26 -0
  141. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroChargerLocation.kt +90 -0
  142. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroChargerOutlet.kt +70 -0
  143. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroColor.kt +9 -4
  144. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroOptionsPanelChargerSection.kt +61 -0
  145. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroOptionsPanelConfig.kt +61 -0
  146. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroOptionsPanelGridSection.kt +56 -0
  147. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroOptionsPanelSection.kt +75 -0
  148. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroRow.kt +36 -6
  149. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/WaypointCoordinate.kt +61 -0
  150. package/nitrogen/generated/ios/ReactNativeAutoPlay-Swift-Cxx-Bridge.hpp +174 -0
  151. package/nitrogen/generated/ios/ReactNativeAutoPlay-Swift-Cxx-Umbrella.hpp +27 -0
  152. package/nitrogen/generated/ios/c++/HybridGridTemplateSpecSwift.hpp +3 -0
  153. package/nitrogen/generated/ios/c++/HybridInformationTemplateSpecSwift.hpp +9 -0
  154. package/nitrogen/generated/ios/c++/HybridListTemplateSpecSwift.hpp +9 -0
  155. package/nitrogen/generated/ios/c++/HybridMapTemplateSpecSwift.hpp +47 -1
  156. package/nitrogen/generated/ios/c++/HybridSearchTemplateSpecSwift.hpp +9 -0
  157. package/nitrogen/generated/ios/swift/ChargingConnector.swift +68 -0
  158. package/nitrogen/generated/ios/swift/GridImageSize.swift +48 -0
  159. package/nitrogen/generated/ios/swift/GridTemplateConfig.swift +12 -1
  160. package/nitrogen/generated/ios/swift/HybridMapTemplateSpec.swift +2 -1
  161. package/nitrogen/generated/ios/swift/HybridMapTemplateSpec_cxx.swift +31 -4
  162. package/nitrogen/generated/ios/swift/ListImageType.swift +52 -0
  163. package/nitrogen/generated/ios/swift/NitroChargerLocation.swift +161 -0
  164. package/nitrogen/generated/ios/swift/NitroChargerOutlet.swift +65 -0
  165. package/nitrogen/generated/ios/swift/NitroColor.swift +20 -2
  166. package/nitrogen/generated/ios/swift/NitroOptionsPanelChargerSection.swift +64 -0
  167. package/nitrogen/generated/ios/swift/NitroOptionsPanelConfig.swift +94 -0
  168. package/nitrogen/generated/ios/swift/NitroOptionsPanelGridSection.swift +53 -0
  169. package/nitrogen/generated/ios/swift/NitroOptionsPanelSection.swift +32 -0
  170. package/nitrogen/generated/ios/swift/NitroRow.swift +81 -1
  171. package/nitrogen/generated/ios/swift/WaypointCoordinate.swift +52 -0
  172. package/nitrogen/generated/shared/c++/ChargingConnector.hpp +104 -0
  173. package/nitrogen/generated/shared/c++/GridImageSize.hpp +84 -0
  174. package/nitrogen/generated/shared/c++/GridTemplateConfig.hpp +8 -1
  175. package/nitrogen/generated/shared/c++/HybridMapTemplateSpec.cpp +1 -0
  176. package/nitrogen/generated/shared/c++/HybridMapTemplateSpec.hpp +5 -1
  177. package/nitrogen/generated/shared/c++/ListImageType.hpp +88 -0
  178. package/nitrogen/generated/shared/c++/NitroChargerLocation.hpp +131 -0
  179. package/nitrogen/generated/shared/c++/NitroChargerOutlet.hpp +98 -0
  180. package/nitrogen/generated/shared/c++/NitroColor.hpp +7 -3
  181. package/nitrogen/generated/shared/c++/NitroOptionsPanelChargerSection.hpp +98 -0
  182. package/nitrogen/generated/shared/c++/NitroOptionsPanelConfig.hpp +107 -0
  183. package/nitrogen/generated/shared/c++/NitroOptionsPanelGridSection.hpp +91 -0
  184. package/nitrogen/generated/shared/c++/NitroRow.hpp +39 -2
  185. package/nitrogen/generated/shared/c++/WaypointCoordinate.hpp +91 -0
  186. package/package.json +7 -3
  187. package/src/Constants.ts +9 -0
  188. package/src/index.ts +1 -0
  189. package/src/index.web.ts +166 -0
  190. package/src/specs/MapTemplate.nitro.ts +3 -1
  191. package/src/templates/GridTemplate.ts +38 -3
  192. package/src/templates/InformationTemplate.ts +60 -29
  193. package/src/templates/ListTemplate.ts +27 -55
  194. package/src/templates/MapTemplate.ts +60 -2
  195. package/src/templates/MessageTemplate.ts +71 -24
  196. package/src/types/Image.ts +6 -1
  197. package/src/utils/NitroColor.ts +10 -1
  198. package/src/utils/NitroImage.ts +1 -5
  199. package/src/utils/NitroManeuver.ts +1 -4
  200. package/src/utils/NitroOptionsPanel.ts +218 -0
  201. package/src/utils/NitroSection.ts +160 -5
@@ -1,7 +1,95 @@
1
- import type { DefaultRow, RadioRow, Section, TextRow, ToggleRow } from '../templates/ListTemplate';
2
- import type { AutoText } from '../types/Text';
1
+ import type { ListImageType } from '../templates/ListTemplate';
2
+ import type { AutoImage } from '../types/Image';
3
+ import { type AutoText, type Distance, TextPlaceholders } from '../types/Text';
4
+ import type { DurationWithTimeZone } from '../types/Trip';
3
5
  import { type NitroImage, NitroImageUtil } from './NitroImage';
4
6
 
7
+ type BaseRow = {
8
+ title: AutoText;
9
+ enabled?: boolean;
10
+ image?: AutoImage;
11
+ /** @namespace Android */
12
+ imageType?: ListImageType;
13
+ };
14
+
15
+ export type DefaultRow<T> = BaseRow & {
16
+ type: 'default';
17
+ /**
18
+ * adds a chevron at the end of the row
19
+ */
20
+ browsable?: boolean;
21
+ onPress: (template: T) => void;
22
+ detailedText?: AutoText;
23
+ };
24
+
25
+ export type ToggleRow<T> = BaseRow & {
26
+ type: 'toggle';
27
+ checked: boolean;
28
+ onPress: (template: T, checked: boolean) => void;
29
+ };
30
+
31
+ export type RadioRow<T> = BaseRow & {
32
+ type: 'radio';
33
+ onPress: (template: T) => void;
34
+ selected?: boolean;
35
+ };
36
+
37
+ export type TextRow = BaseRow & {
38
+ type: 'text';
39
+ detailedText?: AutoText;
40
+ };
41
+
42
+ export type WaypointCoordinate = {
43
+ latitude: number;
44
+ longitude: number;
45
+ altitude?: number;
46
+ };
47
+
48
+ /**
49
+ * a point of interest, e.g. a charger's location. Renders as a `CPMapTemplateWaypoint` item
50
+ * (showing `title` as the name, `address` as the address, and the travel estimate for reaching
51
+ * it) when part of a `CPMapPanel` (iOS 27+); falls back to a plain row using `title`/`address`
52
+ * as the detail line everywhere else (including Android, which has no equivalent concept).
53
+ */
54
+ export type WaypointRow<T> = BaseRow & {
55
+ type: 'waypoint';
56
+ /**
57
+ * add one of {@link TextPlaceholders} to add travelEstimates
58
+ * prefer travelEstimates.visible over that on iOS 27+
59
+ */
60
+ address?: string;
61
+ coordinate: WaypointCoordinate;
62
+ travelEstimates: {
63
+ distance: Distance;
64
+ duration: DurationWithTimeZone;
65
+ /**
66
+ * by default travel estimates are not shown
67
+ * setting this to true adds another row showing CPTravelEstimates
68
+ * @namespace iOS 27+
69
+ */
70
+ visible?: boolean;
71
+ };
72
+ onPress?: (template: T) => void;
73
+ };
74
+
75
+ export type MultiSection<T> =
76
+ | {
77
+ type: 'default';
78
+ title: string;
79
+ items: Array<DefaultRow<T> | ToggleRow<T> | TextRow | WaypointRow<T>>;
80
+ }
81
+ | {
82
+ type: 'radio';
83
+ title: string;
84
+ items: Array<RadioRow<T>>;
85
+ };
86
+
87
+ export type SingleSection<T> = {
88
+ [K in MultiSection<T> as K['type']]: Omit<K, 'title' | 'detailedText'>;
89
+ }[MultiSection<T>['type']];
90
+
91
+ export type Section<T> = Array<MultiSection<T>> | SingleSection<T>;
92
+
5
93
  type NitroSectionType = 'default' | 'radio';
6
94
 
7
95
  export type NitroRow = {
@@ -10,9 +98,20 @@ export type NitroRow = {
10
98
  browsable?: boolean;
11
99
  enabled: boolean;
12
100
  image?: NitroImage;
101
+ imageType?: ListImageType;
13
102
  checked?: boolean;
14
103
  onPress?: (checked?: boolean) => void;
15
104
  selected?: boolean;
105
+ coordinate?: WaypointCoordinate;
106
+ distance?: Distance;
107
+ duration?: DurationWithTimeZone;
108
+ /**
109
+ * only meaningful in panel context (iOS 27+, `mapConfig` set) — adds a sibling `CPMapPanelItem`
110
+ * showing `distance`/`duration` as a native `CPTravelEstimates` row. Non-panel/Android rendering
111
+ * relies purely on `title`/`detailedText` opting in via `TextPlaceholders` instead.
112
+ */
113
+ travelEstimatesVisible?: boolean;
114
+ address?: string;
16
115
  };
17
116
 
18
117
  export type NitroSection = {
@@ -63,13 +162,63 @@ const convert = <T>(template: T, sections?: Section<T>): Array<NitroSection> | u
63
162
  ];
64
163
  };
65
164
 
165
+ /**
166
+ * `AutoText.distance`/`.duration` only take effect if `text` actually uses the matching
167
+ * `TextPlaceholders` marker — populate whichever of those the text references, leaving the rest
168
+ * of `text` untouched, so a title/address that doesn't opt in via a placeholder is unaffected.
169
+ */
170
+ const withTravelEstimates = (
171
+ text: AutoText,
172
+ distance: Distance,
173
+ durationSeconds: number
174
+ ): AutoText => {
175
+ const hasDistance = text.text.includes(TextPlaceholders.Distance);
176
+ const hasDuration = text.text.includes(TextPlaceholders.Duration);
177
+
178
+ if (!hasDistance && !hasDuration) {
179
+ return text;
180
+ }
181
+
182
+ return {
183
+ ...text,
184
+ distance: hasDistance ? distance : text.distance,
185
+ duration: hasDuration ? durationSeconds : text.duration,
186
+ };
187
+ };
188
+
66
189
  const convertRow = <T>(
67
190
  template: T,
68
- item: DefaultRow<T> | RadioRow<T> | ToggleRow<T> | TextRow
191
+ item: DefaultRow<T> | RadioRow<T> | ToggleRow<T> | TextRow | WaypointRow<T>
69
192
  ): NitroRow => {
70
- const { title, type, enabled = true, image } = item;
193
+ const { type, enabled = true, image, imageType } = item;
194
+
195
+ // `WaypointRow` has no `detailedText` of its own — `address` doubles as the detail line
196
+ // whenever this falls back to a plain row (non-panel context, Android).
197
+ let title = item.title;
198
+ let detailedText =
199
+ item.type === 'waypoint'
200
+ ? item.address != null
201
+ ? { text: item.address }
202
+ : undefined
203
+ : 'detailedText' in item
204
+ ? item.detailedText
205
+ : undefined;
206
+
207
+ // Opt-in only: a title/address using `{distance}`/`{duration}` gets those values filled in,
208
+ // via the same substitution `AutoText` already does everywhere else — no separate "estimate"
209
+ // UI element needed for a row embedded in a list alongside other rows. Deliberately NOT gated
210
+ // on `travelEstimates.visible` — that flag only controls the panel-only sibling
211
+ // `CPTravelEstimates` item (see `Parser.swift`'s `travelEstimatesVisible` check), which has no
212
+ // bearing on the non-panel/Android fallback text this feeds; a placeholder in the text is
213
+ // already its own explicit opt-in regardless of `visible`.
214
+ if (item.type === 'waypoint') {
215
+ const { distance, duration } = item.travelEstimates;
216
+ title = withTravelEstimates(title, distance, duration.seconds);
217
+ if (detailedText != null) {
218
+ detailedText = withTravelEstimates(detailedText, distance, duration.seconds);
219
+ }
220
+ }
71
221
 
72
- const detailedText = 'detailedText' in item ? item.detailedText : undefined;
73
222
  const selected = type === 'radio' ? (item.selected ?? false) : undefined;
74
223
 
75
224
  const onTogglePress = item.type === 'toggle' ? item.onPress : undefined;
@@ -93,10 +242,16 @@ const convertRow = <T>(
93
242
  detailedText,
94
243
  enabled,
95
244
  image: NitroImageUtil.convert(image),
245
+ imageType,
96
246
  title,
97
247
  checked: type === 'toggle' ? item.checked : undefined,
98
248
  onPress,
99
249
  selected,
250
+ coordinate: item.type === 'waypoint' ? item.coordinate : undefined,
251
+ distance: item.type === 'waypoint' ? item.travelEstimates.distance : undefined,
252
+ duration: item.type === 'waypoint' ? item.travelEstimates.duration : undefined,
253
+ travelEstimatesVisible: item.type === 'waypoint' ? item.travelEstimates.visible : undefined,
254
+ address: item.type === 'waypoint' ? item.address : undefined,
100
255
  };
101
256
  };
102
257