@iternio/react-native-auto-play 0.3.11 → 0.4.0

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 (135) hide show
  1. package/README.md +103 -3
  2. package/ReactNativeAutoPlay.podspec +0 -4
  3. package/android/src/automotive/AndroidManifest.xml +1 -0
  4. package/android/src/main/AndroidManifest.xml +1 -0
  5. package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridAutoPlay.kt +91 -0
  6. package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/VoiceInputManager.kt +214 -0
  7. package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/template/MapTemplate.kt +2 -1
  8. package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/template/Parser.kt +117 -38
  9. package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/utils/BitmapCache.kt +14 -0
  10. package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/utils/SymbolFont.kt +29 -30
  11. package/ios/extensions/NitroImageExtensions.swift +10 -1
  12. package/ios/hybrid/HybridAutoPlay.swift +51 -4
  13. package/ios/templates/GridTemplate.swift +7 -0
  14. package/ios/templates/MapTemplate.swift +14 -0
  15. package/ios/templates/Parser.swift +91 -4
  16. package/ios/utils/SymbolFont.swift +44 -44
  17. package/ios/utils/VoiceInputManager.swift +233 -0
  18. package/lib/index.d.ts +1 -0
  19. package/lib/index.js +1 -0
  20. package/lib/specs/AutoPlay.nitro.d.ts +31 -1
  21. package/lib/types/Image.d.ts +46 -4
  22. package/lib/types/Maneuver.d.ts +2 -10
  23. package/lib/utils/NitroImage.d.ts +29 -3
  24. package/lib/utils/NitroImage.js +64 -3
  25. package/nitrogen/generated/android/ReactNativeAutoPlay+autolinking.cmake +1 -1
  26. package/nitrogen/generated/android/c++/JGlyphImage.hpp +6 -1
  27. package/nitrogen/generated/android/c++/JGridTemplateConfig.hpp +3 -1
  28. package/nitrogen/generated/android/c++/JHybridAutoPlaySpec.cpp +48 -1
  29. package/nitrogen/generated/android/c++/JHybridAutoPlaySpec.hpp +4 -0
  30. package/nitrogen/generated/android/c++/JHybridClusterSpec.cpp +4 -0
  31. package/nitrogen/generated/android/c++/JHybridGridTemplateSpec.cpp +5 -1
  32. package/nitrogen/generated/android/c++/JHybridInformationTemplateSpec.cpp +5 -1
  33. package/nitrogen/generated/android/c++/JHybridListTemplateSpec.cpp +5 -1
  34. package/nitrogen/generated/android/c++/JHybridMapTemplateSpec.cpp +5 -1
  35. package/nitrogen/generated/android/c++/JHybridMessageTemplateSpec.cpp +5 -1
  36. package/nitrogen/generated/android/c++/JHybridSearchTemplateSpec.cpp +5 -1
  37. package/nitrogen/generated/android/c++/JHybridSignInTemplateSpec.cpp +5 -1
  38. package/nitrogen/generated/android/c++/JImageLane.hpp +2 -0
  39. package/nitrogen/generated/android/c++/JInformationTemplateConfig.hpp +3 -1
  40. package/nitrogen/generated/android/c++/JLaneGuidance.hpp +2 -0
  41. package/nitrogen/generated/android/c++/JListTemplateConfig.hpp +3 -1
  42. package/nitrogen/generated/android/c++/JMapTemplateConfig.hpp +3 -1
  43. package/nitrogen/generated/android/c++/JMessageTemplateConfig.hpp +7 -5
  44. package/nitrogen/generated/android/c++/JNitroAction.hpp +7 -5
  45. package/nitrogen/generated/android/c++/JNitroAttributedString.hpp +2 -0
  46. package/nitrogen/generated/android/c++/JNitroAttributedStringImage.hpp +2 -0
  47. package/nitrogen/generated/android/c++/JNitroBaseMapTemplateConfig.hpp +3 -1
  48. package/nitrogen/generated/android/c++/JNitroGridButton.hpp +2 -0
  49. package/nitrogen/generated/android/c++/JNitroImage.cpp +6 -2
  50. package/nitrogen/generated/android/c++/JNitroImage.hpp +20 -3
  51. package/nitrogen/generated/android/c++/JNitroManeuver.hpp +3 -1
  52. package/nitrogen/generated/android/c++/JNitroMapButton.hpp +2 -0
  53. package/nitrogen/generated/android/c++/JNitroMessageManeuver.hpp +7 -5
  54. package/nitrogen/generated/android/c++/JNitroNavigationAlert.hpp +7 -5
  55. package/nitrogen/generated/android/c++/JNitroRoutingManeuver.hpp +7 -5
  56. package/nitrogen/generated/android/c++/JNitroRow.hpp +7 -5
  57. package/nitrogen/generated/android/c++/JNitroSection.hpp +3 -1
  58. package/nitrogen/generated/android/c++/JPreferredImageLane.hpp +2 -0
  59. package/nitrogen/generated/android/c++/JRemoteImage.hpp +68 -0
  60. package/nitrogen/generated/android/c++/JSearchTemplateConfig.hpp +3 -1
  61. package/nitrogen/generated/android/c++/JSignInTemplateConfig.hpp +3 -1
  62. package/nitrogen/generated/android/c++/JVariant_GlyphImage_AssetImage_RemoteImage.cpp +30 -0
  63. package/nitrogen/generated/android/c++/JVariant_GlyphImage_AssetImage_RemoteImage.hpp +92 -0
  64. package/nitrogen/generated/android/c++/JVariant_PreferredImageLane_ImageLane.hpp +3 -1
  65. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/GlyphImage.kt +5 -2
  66. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridAutoPlaySpec.kt +17 -0
  67. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/MessageTemplateConfig.kt +3 -3
  68. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroAction.kt +3 -3
  69. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroImage.kt +14 -2
  70. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroMessageManeuver.kt +2 -2
  71. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroNavigationAlert.kt +3 -3
  72. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroRoutingManeuver.kt +2 -2
  73. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroRow.kt +3 -3
  74. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/RemoteImage.kt +44 -0
  75. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/{Variant_GlyphImage_AssetImage.kt → Variant_GlyphImage_AssetImage_RemoteImage.kt} +20 -8
  76. package/nitrogen/generated/ios/ReactNativeAutoPlay-Swift-Cxx-Bridge.cpp +16 -8
  77. package/nitrogen/generated/ios/ReactNativeAutoPlay-Swift-Cxx-Bridge.hpp +156 -79
  78. package/nitrogen/generated/ios/ReactNativeAutoPlay-Swift-Cxx-Umbrella.hpp +4 -0
  79. package/nitrogen/generated/ios/c++/HybridAutoPlaySpecSwift.hpp +37 -0
  80. package/nitrogen/generated/ios/c++/HybridCarPlayDashboardSpecSwift.hpp +4 -1
  81. package/nitrogen/generated/ios/c++/HybridClusterSpecSwift.hpp +3 -0
  82. package/nitrogen/generated/ios/c++/HybridGridTemplateSpecSwift.hpp +3 -0
  83. package/nitrogen/generated/ios/c++/HybridInformationTemplateSpecSwift.hpp +3 -0
  84. package/nitrogen/generated/ios/c++/HybridListTemplateSpecSwift.hpp +3 -0
  85. package/nitrogen/generated/ios/c++/HybridMapTemplateSpecSwift.hpp +3 -0
  86. package/nitrogen/generated/ios/c++/HybridMessageTemplateSpecSwift.hpp +3 -0
  87. package/nitrogen/generated/ios/c++/HybridSearchTemplateSpecSwift.hpp +3 -0
  88. package/nitrogen/generated/ios/swift/Func_void_std__shared_ptr_ArrayBuffer_.swift +46 -0
  89. package/nitrogen/generated/ios/swift/GlyphImage.swift +7 -2
  90. package/nitrogen/generated/ios/swift/HybridAutoPlaySpec.swift +4 -0
  91. package/nitrogen/generated/ios/swift/HybridAutoPlaySpec_cxx.swift +82 -0
  92. package/nitrogen/generated/ios/swift/ImageLane.swift +9 -4
  93. package/nitrogen/generated/ios/swift/MessageTemplateConfig.swift +16 -11
  94. package/nitrogen/generated/ios/swift/NitroAction.swift +16 -11
  95. package/nitrogen/generated/ios/swift/NitroAttributedStringImage.swift +9 -4
  96. package/nitrogen/generated/ios/swift/NitroCarPlayDashboardButton.swift +9 -4
  97. package/nitrogen/generated/ios/swift/NitroGridButton.swift +9 -4
  98. package/nitrogen/generated/ios/swift/NitroImage.swift +2 -1
  99. package/nitrogen/generated/ios/swift/NitroMapButton.swift +9 -4
  100. package/nitrogen/generated/ios/swift/NitroMessageManeuver.swift +16 -11
  101. package/nitrogen/generated/ios/swift/NitroNavigationAlert.swift +16 -11
  102. package/nitrogen/generated/ios/swift/NitroRoutingManeuver.swift +25 -15
  103. package/nitrogen/generated/ios/swift/NitroRow.swift +16 -11
  104. package/nitrogen/generated/ios/swift/PreferredImageLane.swift +9 -4
  105. package/nitrogen/generated/ios/swift/RemoteImage.swift +58 -0
  106. package/nitrogen/generated/ios/swift/{Variant_GlyphImage_AssetImage.swift → Variant_GlyphImage_AssetImage_RemoteImage.swift} +4 -3
  107. package/nitrogen/generated/shared/c++/GlyphImage.hpp +6 -1
  108. package/nitrogen/generated/shared/c++/HybridAutoPlaySpec.cpp +4 -0
  109. package/nitrogen/generated/shared/c++/HybridAutoPlaySpec.hpp +5 -0
  110. package/nitrogen/generated/shared/c++/ImageLane.hpp +8 -5
  111. package/nitrogen/generated/shared/c++/MessageTemplateConfig.hpp +8 -5
  112. package/nitrogen/generated/shared/c++/NitroAction.hpp +8 -5
  113. package/nitrogen/generated/shared/c++/NitroAttributedStringImage.hpp +8 -5
  114. package/nitrogen/generated/shared/c++/NitroCarPlayDashboardButton.hpp +8 -5
  115. package/nitrogen/generated/shared/c++/NitroGridButton.hpp +8 -5
  116. package/nitrogen/generated/shared/c++/NitroMapButton.hpp +8 -5
  117. package/nitrogen/generated/shared/c++/NitroMessageManeuver.hpp +8 -5
  118. package/nitrogen/generated/shared/c++/NitroNavigationAlert.hpp +8 -5
  119. package/nitrogen/generated/shared/c++/NitroRoutingManeuver.hpp +12 -9
  120. package/nitrogen/generated/shared/c++/NitroRow.hpp +8 -5
  121. package/nitrogen/generated/shared/c++/PreferredImageLane.hpp +8 -5
  122. package/nitrogen/generated/shared/c++/RemoteImage.hpp +94 -0
  123. package/package.json +2 -3
  124. package/src/index.ts +1 -0
  125. package/src/specs/AutoPlay.nitro.ts +39 -1
  126. package/src/types/Image.ts +65 -16
  127. package/src/types/Maneuver.ts +3 -10
  128. package/src/utils/NitroImage.ts +81 -6
  129. package/android/src/main/res/font/materialsymbolsoutlined_regular.ttf +0 -0
  130. package/ios/Assets/MaterialSymbolsOutlined-Regular.ttf +0 -0
  131. package/lib/types/Glyphmap.d.ts +0 -4105
  132. package/lib/types/Glyphmap.js +0 -4105
  133. package/nitrogen/generated/android/c++/JVariant_GlyphImage_AssetImage.cpp +0 -26
  134. package/nitrogen/generated/android/c++/JVariant_GlyphImage_AssetImage.hpp +0 -75
  135. package/src/types/Glyphmap.ts +0 -4107
@@ -18,7 +18,7 @@ public extension NitroRow {
18
18
  /**
19
19
  * Create a new instance of `NitroRow`.
20
20
  */
21
- init(title: AutoText, detailedText: AutoText?, browsable: Bool?, enabled: Bool, image: Variant_GlyphImage_AssetImage?, checked: Bool?, onPress: ((_ checked: Bool?) -> Void)?, selected: Bool?) {
21
+ init(title: AutoText, detailedText: AutoText?, browsable: Bool?, enabled: Bool, image: Variant_GlyphImage_AssetImage_RemoteImage?, checked: Bool?, onPress: ((_ checked: Bool?) -> Void)?, selected: Bool?) {
22
22
  self.init(title, { () -> bridge.std__optional_AutoText_ in
23
23
  if let __unwrappedValue = detailedText {
24
24
  return bridge.create_std__optional_AutoText_(__unwrappedValue)
@@ -31,14 +31,16 @@ public extension NitroRow {
31
31
  } else {
32
32
  return .init()
33
33
  }
34
- }(), enabled, { () -> bridge.std__optional_std__variant_GlyphImage__AssetImage__ in
34
+ }(), enabled, { () -> bridge.std__optional_std__variant_GlyphImage__AssetImage__RemoteImage__ in
35
35
  if let __unwrappedValue = image {
36
- return bridge.create_std__optional_std__variant_GlyphImage__AssetImage__({ () -> bridge.std__variant_GlyphImage__AssetImage_ in
36
+ return bridge.create_std__optional_std__variant_GlyphImage__AssetImage__RemoteImage__({ () -> bridge.std__variant_GlyphImage__AssetImage__RemoteImage_ in
37
37
  switch __unwrappedValue {
38
38
  case .first(let __value):
39
- return bridge.create_std__variant_GlyphImage__AssetImage_(__value)
39
+ return bridge.create_std__variant_GlyphImage__AssetImage__RemoteImage_(__value)
40
40
  case .second(let __value):
41
- return bridge.create_std__variant_GlyphImage__AssetImage_(__value)
41
+ return bridge.create_std__variant_GlyphImage__AssetImage__RemoteImage_(__value)
42
+ case .third(let __value):
43
+ return bridge.create_std__variant_GlyphImage__AssetImage__RemoteImage_(__value)
42
44
  }
43
45
  }().variant)
44
46
  } else {
@@ -96,12 +98,12 @@ public extension NitroRow {
96
98
  }
97
99
 
98
100
  @inline(__always)
99
- var image: Variant_GlyphImage_AssetImage? {
100
- return { () -> Variant_GlyphImage_AssetImage? in
101
- if bridge.has_value_std__optional_std__variant_GlyphImage__AssetImage__(self.__image) {
102
- let __unwrapped = bridge.get_std__optional_std__variant_GlyphImage__AssetImage__(self.__image)
103
- return { () -> Variant_GlyphImage_AssetImage in
104
- let __variant = bridge.std__variant_GlyphImage__AssetImage_(__unwrapped)
101
+ var image: Variant_GlyphImage_AssetImage_RemoteImage? {
102
+ return { () -> Variant_GlyphImage_AssetImage_RemoteImage? in
103
+ if bridge.has_value_std__optional_std__variant_GlyphImage__AssetImage__RemoteImage__(self.__image) {
104
+ let __unwrapped = bridge.get_std__optional_std__variant_GlyphImage__AssetImage__RemoteImage__(self.__image)
105
+ return { () -> Variant_GlyphImage_AssetImage_RemoteImage in
106
+ let __variant = bridge.std__variant_GlyphImage__AssetImage__RemoteImage_(__unwrapped)
105
107
  switch __variant.index() {
106
108
  case 0:
107
109
  let __actual = __variant.get_0()
@@ -109,6 +111,9 @@ public extension NitroRow {
109
111
  case 1:
110
112
  let __actual = __variant.get_1()
111
113
  return .second(__actual)
114
+ case 2:
115
+ let __actual = __variant.get_2()
116
+ return .third(__actual)
112
117
  default:
113
118
  fatalError("Variant can never have index \(__variant.index())!")
114
119
  }
@@ -19,12 +19,14 @@ public extension PreferredImageLane {
19
19
  * Create a new instance of `PreferredImageLane`.
20
20
  */
21
21
  init(image: NitroImage, highlightedAngle: Double, isPreferred: Bool, angles: [Double]) {
22
- self.init({ () -> bridge.std__variant_GlyphImage__AssetImage_ in
22
+ self.init({ () -> bridge.std__variant_GlyphImage__AssetImage__RemoteImage_ in
23
23
  switch image {
24
24
  case .first(let __value):
25
- return bridge.create_std__variant_GlyphImage__AssetImage_(__value)
25
+ return bridge.create_std__variant_GlyphImage__AssetImage__RemoteImage_(__value)
26
26
  case .second(let __value):
27
- return bridge.create_std__variant_GlyphImage__AssetImage_(__value)
27
+ return bridge.create_std__variant_GlyphImage__AssetImage__RemoteImage_(__value)
28
+ case .third(let __value):
29
+ return bridge.create_std__variant_GlyphImage__AssetImage__RemoteImage_(__value)
28
30
  }
29
31
  }().variant, highlightedAngle, isPreferred, { () -> bridge.std__vector_double_ in
30
32
  var __vector = bridge.create_std__vector_double_(angles.count)
@@ -38,7 +40,7 @@ public extension PreferredImageLane {
38
40
  @inline(__always)
39
41
  var image: NitroImage {
40
42
  return { () -> NitroImage in
41
- let __variant = bridge.std__variant_GlyphImage__AssetImage_(self.__image)
43
+ let __variant = bridge.std__variant_GlyphImage__AssetImage__RemoteImage_(self.__image)
42
44
  switch __variant.index() {
43
45
  case 0:
44
46
  let __actual = __variant.get_0()
@@ -46,6 +48,9 @@ public extension PreferredImageLane {
46
48
  case 1:
47
49
  let __actual = __variant.get_1()
48
50
  return .second(__actual)
51
+ case 2:
52
+ let __actual = __variant.get_2()
53
+ return .third(__actual)
49
54
  default:
50
55
  fatalError("Variant can never have index \(__variant.index())!")
51
56
  }
@@ -0,0 +1,58 @@
1
+ ///
2
+ /// RemoteImage.swift
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ import NitroModules
9
+
10
+ /**
11
+ * Represents an instance of `RemoteImage`, backed by a C++ struct.
12
+ */
13
+ public typealias RemoteImage = margelo.nitro.swe.iternio.reactnativeautoplay.RemoteImage
14
+
15
+ public extension RemoteImage {
16
+ private typealias bridge = margelo.nitro.swe.iternio.reactnativeautoplay.bridge.swift
17
+
18
+ /**
19
+ * Create a new instance of `RemoteImage`.
20
+ */
21
+ init(uri: String, color: NitroColor?, timeoutMs: Double?) {
22
+ self.init(std.string(uri), { () -> bridge.std__optional_NitroColor_ in
23
+ if let __unwrappedValue = color {
24
+ return bridge.create_std__optional_NitroColor_(__unwrappedValue)
25
+ } else {
26
+ return .init()
27
+ }
28
+ }(), { () -> bridge.std__optional_double_ in
29
+ if let __unwrappedValue = timeoutMs {
30
+ return bridge.create_std__optional_double_(__unwrappedValue)
31
+ } else {
32
+ return .init()
33
+ }
34
+ }())
35
+ }
36
+
37
+ @inline(__always)
38
+ var uri: String {
39
+ return String(self.__uri)
40
+ }
41
+
42
+ @inline(__always)
43
+ var color: NitroColor? {
44
+ return self.__color.value
45
+ }
46
+
47
+ @inline(__always)
48
+ var timeoutMs: Double? {
49
+ return { () -> Double? in
50
+ if bridge.has_value_std__optional_double_(self.__timeoutMs) {
51
+ let __unwrapped = bridge.get_std__optional_double_(self.__timeoutMs)
52
+ return __unwrapped
53
+ } else {
54
+ return nil
55
+ }
56
+ }()
57
+ }
58
+ }
@@ -1,5 +1,5 @@
1
1
  ///
2
- /// Variant_GlyphImage_AssetImage.swift
2
+ /// Variant_GlyphImage_AssetImage_RemoteImage.swift
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
5
  /// Copyright © Marc Rousavy @ Margelo
@@ -9,10 +9,11 @@
9
9
 
10
10
  /**
11
11
  * An Swift enum with associated values representing a Variant/Union type.
12
- * JS type: `struct | struct`
12
+ * JS type: `struct | struct | struct`
13
13
  */
14
14
  @frozen
15
- public indirect enum Variant_GlyphImage_AssetImage {
15
+ public indirect enum Variant_GlyphImage_AssetImage_RemoteImage {
16
16
  case first(GlyphImage)
17
17
  case second(AssetImage)
18
+ case third(RemoteImage)
18
19
  }
@@ -31,6 +31,7 @@
31
31
  // Forward declaration of `NitroColor` to properly resolve imports.
32
32
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroColor; }
33
33
 
34
+ #include <string>
34
35
  #include "NitroColor.hpp"
35
36
  #include <optional>
36
37
 
@@ -42,13 +43,14 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
42
43
  struct GlyphImage final {
43
44
  public:
44
45
  double glyph SWIFT_PRIVATE;
46
+ std::string fontName SWIFT_PRIVATE;
45
47
  NitroColor color SWIFT_PRIVATE;
46
48
  NitroColor backgroundColor SWIFT_PRIVATE;
47
49
  std::optional<double> fontScale SWIFT_PRIVATE;
48
50
 
49
51
  public:
50
52
  GlyphImage() = default;
51
- explicit GlyphImage(double glyph, NitroColor color, NitroColor backgroundColor, std::optional<double> fontScale): glyph(glyph), color(color), backgroundColor(backgroundColor), fontScale(fontScale) {}
53
+ explicit GlyphImage(double glyph, std::string fontName, NitroColor color, NitroColor backgroundColor, std::optional<double> fontScale): glyph(glyph), fontName(fontName), color(color), backgroundColor(backgroundColor), fontScale(fontScale) {}
52
54
 
53
55
  public:
54
56
  friend bool operator==(const GlyphImage& lhs, const GlyphImage& rhs) = default;
@@ -65,6 +67,7 @@ namespace margelo::nitro {
65
67
  jsi::Object obj = arg.asObject(runtime);
66
68
  return margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage(
67
69
  JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "glyph"))),
70
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "fontName"))),
68
71
  JSIConverter<margelo::nitro::swe::iternio::reactnativeautoplay::NitroColor>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "color"))),
69
72
  JSIConverter<margelo::nitro::swe::iternio::reactnativeautoplay::NitroColor>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "backgroundColor"))),
70
73
  JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "fontScale")))
@@ -73,6 +76,7 @@ namespace margelo::nitro {
73
76
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage& arg) {
74
77
  jsi::Object obj(runtime);
75
78
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "glyph"), JSIConverter<double>::toJSI(runtime, arg.glyph));
79
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "fontName"), JSIConverter<std::string>::toJSI(runtime, arg.fontName));
76
80
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "color"), JSIConverter<margelo::nitro::swe::iternio::reactnativeautoplay::NitroColor>::toJSI(runtime, arg.color));
77
81
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "backgroundColor"), JSIConverter<margelo::nitro::swe::iternio::reactnativeautoplay::NitroColor>::toJSI(runtime, arg.backgroundColor));
78
82
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "fontScale"), JSIConverter<std::optional<double>>::toJSI(runtime, arg.fontScale));
@@ -87,6 +91,7 @@ namespace margelo::nitro {
87
91
  return false;
88
92
  }
89
93
  if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "glyph")))) return false;
94
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "fontName")))) return false;
90
95
  if (!JSIConverter<margelo::nitro::swe::iternio::reactnativeautoplay::NitroColor>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "color")))) return false;
91
96
  if (!JSIConverter<margelo::nitro::swe::iternio::reactnativeautoplay::NitroColor>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "backgroundColor")))) return false;
92
97
  if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "fontScale")))) return false;
@@ -17,6 +17,10 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
17
17
  prototype.registerHybridMethod("addListener", &HybridAutoPlaySpec::addListener);
18
18
  prototype.registerHybridMethod("addListenerRenderState", &HybridAutoPlaySpec::addListenerRenderState);
19
19
  prototype.registerHybridMethod("addListenerVoiceInput", &HybridAutoPlaySpec::addListenerVoiceInput);
20
+ prototype.registerHybridMethod("hasVoiceInputPermission", &HybridAutoPlaySpec::hasVoiceInputPermission);
21
+ prototype.registerHybridMethod("requestVoiceInputPermission", &HybridAutoPlaySpec::requestVoiceInputPermission);
22
+ prototype.registerHybridMethod("startVoiceInput", &HybridAutoPlaySpec::startVoiceInput);
23
+ prototype.registerHybridMethod("stopVoiceInput", &HybridAutoPlaySpec::stopVoiceInput);
20
24
  prototype.registerHybridMethod("setRootTemplate", &HybridAutoPlaySpec::setRootTemplate);
21
25
  prototype.registerHybridMethod("pushTemplate", &HybridAutoPlaySpec::pushTemplate);
22
26
  prototype.registerHybridMethod("popTemplate", &HybridAutoPlaySpec::popTemplate);
@@ -31,6 +31,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroAction
31
31
  #include "Location.hpp"
32
32
  #include <optional>
33
33
  #include <NitroModules/Promise.hpp>
34
+ #include <NitroModules/ArrayBuffer.hpp>
34
35
  #include "SafeAreaInsets.hpp"
35
36
  #include "NitroAction.hpp"
36
37
  #include <vector>
@@ -69,6 +70,10 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
69
70
  virtual std::function<void()> addListener(EventName eventType, const std::function<void()>& callback) = 0;
70
71
  virtual std::function<void()> addListenerRenderState(const std::string& moduleName, const std::function<void(VisibilityState /* payload */)>& callback) = 0;
71
72
  virtual std::function<void()> addListenerVoiceInput(const std::function<void(const std::optional<Location>& /* coordinates */, const std::optional<std::string>& /* query */)>& callback) = 0;
73
+ virtual bool hasVoiceInputPermission() = 0;
74
+ virtual std::shared_ptr<Promise<bool>> requestVoiceInputPermission() = 0;
75
+ virtual std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>> startVoiceInput(std::optional<double> silenceThresholdMs, std::optional<double> maxDurationMs, const std::optional<std::string>& listeningText) = 0;
76
+ virtual void stopVoiceInput() = 0;
72
77
  virtual std::shared_ptr<Promise<void>> setRootTemplate(const std::string& templateId) = 0;
73
78
  virtual std::shared_ptr<Promise<void>> pushTemplate(const std::string& templateId) = 0;
74
79
  virtual std::shared_ptr<Promise<void>> popTemplate(std::optional<bool> animate) = 0;
@@ -32,9 +32,12 @@
32
32
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct GlyphImage; }
33
33
  // Forward declaration of `AssetImage` to properly resolve imports.
34
34
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct AssetImage; }
35
+ // Forward declaration of `RemoteImage` to properly resolve imports.
36
+ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct RemoteImage; }
35
37
 
36
38
  #include "GlyphImage.hpp"
37
39
  #include "AssetImage.hpp"
40
+ #include "RemoteImage.hpp"
38
41
  #include <variant>
39
42
  #include <vector>
40
43
 
@@ -45,12 +48,12 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
45
48
  */
46
49
  struct ImageLane final {
47
50
  public:
48
- std::variant<GlyphImage, AssetImage> image SWIFT_PRIVATE;
51
+ std::variant<GlyphImage, AssetImage, RemoteImage> image SWIFT_PRIVATE;
49
52
  std::vector<double> angles SWIFT_PRIVATE;
50
53
 
51
54
  public:
52
55
  ImageLane() = default;
53
- explicit ImageLane(std::variant<GlyphImage, AssetImage> image, std::vector<double> angles): image(image), angles(angles) {}
56
+ explicit ImageLane(std::variant<GlyphImage, AssetImage, RemoteImage> image, std::vector<double> angles): image(image), angles(angles) {}
54
57
 
55
58
  public:
56
59
  friend bool operator==(const ImageLane& lhs, const ImageLane& rhs) = default;
@@ -66,13 +69,13 @@ namespace margelo::nitro {
66
69
  static inline margelo::nitro::swe::iternio::reactnativeautoplay::ImageLane fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
67
70
  jsi::Object obj = arg.asObject(runtime);
68
71
  return margelo::nitro::swe::iternio::reactnativeautoplay::ImageLane(
69
- JSIConverter<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "image"))),
72
+ JSIConverter<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage, margelo::nitro::swe::iternio::reactnativeautoplay::RemoteImage>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "image"))),
70
73
  JSIConverter<std::vector<double>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "angles")))
71
74
  );
72
75
  }
73
76
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::swe::iternio::reactnativeautoplay::ImageLane& arg) {
74
77
  jsi::Object obj(runtime);
75
- obj.setProperty(runtime, PropNameIDCache::get(runtime, "image"), JSIConverter<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage>>::toJSI(runtime, arg.image));
78
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "image"), JSIConverter<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage, margelo::nitro::swe::iternio::reactnativeautoplay::RemoteImage>>::toJSI(runtime, arg.image));
76
79
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "angles"), JSIConverter<std::vector<double>>::toJSI(runtime, arg.angles));
77
80
  return obj;
78
81
  }
@@ -84,7 +87,7 @@ namespace margelo::nitro {
84
87
  if (!nitro::isPlainObject(runtime, obj)) {
85
88
  return false;
86
89
  }
87
- if (!JSIConverter<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "image")))) return false;
90
+ if (!JSIConverter<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage, margelo::nitro::swe::iternio::reactnativeautoplay::RemoteImage>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "image")))) return false;
88
91
  if (!JSIConverter<std::vector<double>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "angles")))) return false;
89
92
  return true;
90
93
  }
@@ -36,6 +36,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct AutoText; }
36
36
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct GlyphImage; }
37
37
  // Forward declaration of `AssetImage` to properly resolve imports.
38
38
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct AssetImage; }
39
+ // Forward declaration of `RemoteImage` to properly resolve imports.
40
+ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct RemoteImage; }
39
41
  // Forward declaration of `NitroBaseMapTemplateConfig` to properly resolve imports.
40
42
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroBaseMapTemplateConfig; }
41
43
 
@@ -47,6 +49,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroBaseMa
47
49
  #include "AutoText.hpp"
48
50
  #include "GlyphImage.hpp"
49
51
  #include "AssetImage.hpp"
52
+ #include "RemoteImage.hpp"
50
53
  #include <variant>
51
54
  #include "NitroBaseMapTemplateConfig.hpp"
52
55
 
@@ -68,12 +71,12 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
68
71
  std::optional<AutoText> title SWIFT_PRIVATE;
69
72
  AutoText message SWIFT_PRIVATE;
70
73
  std::optional<std::vector<NitroAction>> actions SWIFT_PRIVATE;
71
- std::optional<std::variant<GlyphImage, AssetImage>> image SWIFT_PRIVATE;
74
+ std::optional<std::variant<GlyphImage, AssetImage, RemoteImage>> image SWIFT_PRIVATE;
72
75
  std::optional<NitroBaseMapTemplateConfig> mapConfig SWIFT_PRIVATE;
73
76
 
74
77
  public:
75
78
  MessageTemplateConfig() = default;
76
- explicit MessageTemplateConfig(std::string id, std::optional<std::function<void(std::optional<bool> /* animated */)>> onWillAppear, std::optional<std::function<void(std::optional<bool> /* animated */)>> onWillDisappear, std::optional<std::function<void(std::optional<bool> /* animated */)>> onDidAppear, std::optional<std::function<void(std::optional<bool> /* animated */)>> onDidDisappear, std::optional<std::function<void()>> onPopped, std::optional<double> autoDismissMs, std::optional<std::vector<NitroAction>> headerActions, std::optional<AutoText> title, AutoText message, std::optional<std::vector<NitroAction>> actions, std::optional<std::variant<GlyphImage, AssetImage>> image, std::optional<NitroBaseMapTemplateConfig> mapConfig): id(id), onWillAppear(onWillAppear), onWillDisappear(onWillDisappear), onDidAppear(onDidAppear), onDidDisappear(onDidDisappear), onPopped(onPopped), autoDismissMs(autoDismissMs), headerActions(headerActions), title(title), message(message), actions(actions), image(image), mapConfig(mapConfig) {}
79
+ explicit MessageTemplateConfig(std::string id, std::optional<std::function<void(std::optional<bool> /* animated */)>> onWillAppear, std::optional<std::function<void(std::optional<bool> /* animated */)>> onWillDisappear, std::optional<std::function<void(std::optional<bool> /* animated */)>> onDidAppear, std::optional<std::function<void(std::optional<bool> /* animated */)>> onDidDisappear, std::optional<std::function<void()>> onPopped, std::optional<double> autoDismissMs, std::optional<std::vector<NitroAction>> headerActions, std::optional<AutoText> title, AutoText message, std::optional<std::vector<NitroAction>> actions, std::optional<std::variant<GlyphImage, AssetImage, RemoteImage>> image, std::optional<NitroBaseMapTemplateConfig> mapConfig): id(id), onWillAppear(onWillAppear), onWillDisappear(onWillDisappear), onDidAppear(onDidAppear), onDidDisappear(onDidDisappear), onPopped(onPopped), autoDismissMs(autoDismissMs), headerActions(headerActions), title(title), message(message), actions(actions), image(image), mapConfig(mapConfig) {}
77
80
 
78
81
  public:
79
82
  // MessageTemplateConfig is not equatable because these properties are not equatable: onWillAppear, onWillDisappear, onDidAppear, onDidDisappear, onPopped, headerActions, actions, mapConfig
@@ -100,7 +103,7 @@ namespace margelo::nitro {
100
103
  JSIConverter<std::optional<margelo::nitro::swe::iternio::reactnativeautoplay::AutoText>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "title"))),
101
104
  JSIConverter<margelo::nitro::swe::iternio::reactnativeautoplay::AutoText>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "message"))),
102
105
  JSIConverter<std::optional<std::vector<margelo::nitro::swe::iternio::reactnativeautoplay::NitroAction>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "actions"))),
103
- JSIConverter<std::optional<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "image"))),
106
+ JSIConverter<std::optional<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage, margelo::nitro::swe::iternio::reactnativeautoplay::RemoteImage>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "image"))),
104
107
  JSIConverter<std::optional<margelo::nitro::swe::iternio::reactnativeautoplay::NitroBaseMapTemplateConfig>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "mapConfig")))
105
108
  );
106
109
  }
@@ -117,7 +120,7 @@ namespace margelo::nitro {
117
120
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "title"), JSIConverter<std::optional<margelo::nitro::swe::iternio::reactnativeautoplay::AutoText>>::toJSI(runtime, arg.title));
118
121
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "message"), JSIConverter<margelo::nitro::swe::iternio::reactnativeautoplay::AutoText>::toJSI(runtime, arg.message));
119
122
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "actions"), JSIConverter<std::optional<std::vector<margelo::nitro::swe::iternio::reactnativeautoplay::NitroAction>>>::toJSI(runtime, arg.actions));
120
- obj.setProperty(runtime, PropNameIDCache::get(runtime, "image"), JSIConverter<std::optional<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage>>>::toJSI(runtime, arg.image));
123
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "image"), JSIConverter<std::optional<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage, margelo::nitro::swe::iternio::reactnativeautoplay::RemoteImage>>>::toJSI(runtime, arg.image));
121
124
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "mapConfig"), JSIConverter<std::optional<margelo::nitro::swe::iternio::reactnativeautoplay::NitroBaseMapTemplateConfig>>::toJSI(runtime, arg.mapConfig));
122
125
  return obj;
123
126
  }
@@ -140,7 +143,7 @@ namespace margelo::nitro {
140
143
  if (!JSIConverter<std::optional<margelo::nitro::swe::iternio::reactnativeautoplay::AutoText>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "title")))) return false;
141
144
  if (!JSIConverter<margelo::nitro::swe::iternio::reactnativeautoplay::AutoText>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "message")))) return false;
142
145
  if (!JSIConverter<std::optional<std::vector<margelo::nitro::swe::iternio::reactnativeautoplay::NitroAction>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "actions")))) return false;
143
- if (!JSIConverter<std::optional<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "image")))) return false;
146
+ if (!JSIConverter<std::optional<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage, margelo::nitro::swe::iternio::reactnativeautoplay::RemoteImage>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "image")))) return false;
144
147
  if (!JSIConverter<std::optional<margelo::nitro::swe::iternio::reactnativeautoplay::NitroBaseMapTemplateConfig>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "mapConfig")))) return false;
145
148
  return true;
146
149
  }
@@ -32,6 +32,8 @@
32
32
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct GlyphImage; }
33
33
  // Forward declaration of `AssetImage` to properly resolve imports.
34
34
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct AssetImage; }
35
+ // Forward declaration of `RemoteImage` to properly resolve imports.
36
+ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct RemoteImage; }
35
37
  // Forward declaration of `NitroActionType` to properly resolve imports.
36
38
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class NitroActionType; }
37
39
  // Forward declaration of `NitroAlignment` to properly resolve imports.
@@ -43,6 +45,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class NitroBu
43
45
  #include <optional>
44
46
  #include "GlyphImage.hpp"
45
47
  #include "AssetImage.hpp"
48
+ #include "RemoteImage.hpp"
46
49
  #include <variant>
47
50
  #include <functional>
48
51
  #include "NitroActionType.hpp"
@@ -57,7 +60,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
57
60
  struct NitroAction final {
58
61
  public:
59
62
  std::optional<std::string> title SWIFT_PRIVATE;
60
- std::optional<std::variant<GlyphImage, AssetImage>> image SWIFT_PRIVATE;
63
+ std::optional<std::variant<GlyphImage, AssetImage, RemoteImage>> image SWIFT_PRIVATE;
61
64
  std::optional<bool> enabled SWIFT_PRIVATE;
62
65
  std::function<void()> onPress SWIFT_PRIVATE;
63
66
  NitroActionType type SWIFT_PRIVATE;
@@ -67,7 +70,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
67
70
 
68
71
  public:
69
72
  NitroAction() = default;
70
- explicit NitroAction(std::optional<std::string> title, std::optional<std::variant<GlyphImage, AssetImage>> image, std::optional<bool> enabled, std::function<void()> onPress, NitroActionType type, std::optional<NitroAlignment> alignment, std::optional<double> flags, std::optional<NitroButtonStyle> style): title(title), image(image), enabled(enabled), onPress(onPress), type(type), alignment(alignment), flags(flags), style(style) {}
73
+ explicit NitroAction(std::optional<std::string> title, std::optional<std::variant<GlyphImage, AssetImage, RemoteImage>> image, std::optional<bool> enabled, std::function<void()> onPress, NitroActionType type, std::optional<NitroAlignment> alignment, std::optional<double> flags, std::optional<NitroButtonStyle> style): title(title), image(image), enabled(enabled), onPress(onPress), type(type), alignment(alignment), flags(flags), style(style) {}
71
74
 
72
75
  public:
73
76
  // NitroAction is not equatable because these properties are not equatable: onPress
@@ -84,7 +87,7 @@ namespace margelo::nitro {
84
87
  jsi::Object obj = arg.asObject(runtime);
85
88
  return margelo::nitro::swe::iternio::reactnativeautoplay::NitroAction(
86
89
  JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "title"))),
87
- JSIConverter<std::optional<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "image"))),
90
+ JSIConverter<std::optional<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage, margelo::nitro::swe::iternio::reactnativeautoplay::RemoteImage>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "image"))),
88
91
  JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "enabled"))),
89
92
  JSIConverter<std::function<void()>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "onPress"))),
90
93
  JSIConverter<margelo::nitro::swe::iternio::reactnativeautoplay::NitroActionType>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "type"))),
@@ -96,7 +99,7 @@ namespace margelo::nitro {
96
99
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::swe::iternio::reactnativeautoplay::NitroAction& arg) {
97
100
  jsi::Object obj(runtime);
98
101
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "title"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.title));
99
- obj.setProperty(runtime, PropNameIDCache::get(runtime, "image"), JSIConverter<std::optional<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage>>>::toJSI(runtime, arg.image));
102
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "image"), JSIConverter<std::optional<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage, margelo::nitro::swe::iternio::reactnativeautoplay::RemoteImage>>>::toJSI(runtime, arg.image));
100
103
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "enabled"), JSIConverter<std::optional<bool>>::toJSI(runtime, arg.enabled));
101
104
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "onPress"), JSIConverter<std::function<void()>>::toJSI(runtime, arg.onPress));
102
105
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "type"), JSIConverter<margelo::nitro::swe::iternio::reactnativeautoplay::NitroActionType>::toJSI(runtime, arg.type));
@@ -114,7 +117,7 @@ namespace margelo::nitro {
114
117
  return false;
115
118
  }
116
119
  if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "title")))) return false;
117
- if (!JSIConverter<std::optional<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "image")))) return false;
120
+ if (!JSIConverter<std::optional<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage, margelo::nitro::swe::iternio::reactnativeautoplay::RemoteImage>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "image")))) return false;
118
121
  if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "enabled")))) return false;
119
122
  if (!JSIConverter<std::function<void()>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "onPress")))) return false;
120
123
  if (!JSIConverter<margelo::nitro::swe::iternio::reactnativeautoplay::NitroActionType>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "type")))) return false;
@@ -32,9 +32,12 @@
32
32
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct GlyphImage; }
33
33
  // Forward declaration of `AssetImage` to properly resolve imports.
34
34
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct AssetImage; }
35
+ // Forward declaration of `RemoteImage` to properly resolve imports.
36
+ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct RemoteImage; }
35
37
 
36
38
  #include "GlyphImage.hpp"
37
39
  #include "AssetImage.hpp"
40
+ #include "RemoteImage.hpp"
38
41
  #include <variant>
39
42
 
40
43
  namespace margelo::nitro::swe::iternio::reactnativeautoplay {
@@ -44,12 +47,12 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
44
47
  */
45
48
  struct NitroAttributedStringImage final {
46
49
  public:
47
- std::variant<GlyphImage, AssetImage> image SWIFT_PRIVATE;
50
+ std::variant<GlyphImage, AssetImage, RemoteImage> image SWIFT_PRIVATE;
48
51
  double position SWIFT_PRIVATE;
49
52
 
50
53
  public:
51
54
  NitroAttributedStringImage() = default;
52
- explicit NitroAttributedStringImage(std::variant<GlyphImage, AssetImage> image, double position): image(image), position(position) {}
55
+ explicit NitroAttributedStringImage(std::variant<GlyphImage, AssetImage, RemoteImage> image, double position): image(image), position(position) {}
53
56
 
54
57
  public:
55
58
  friend bool operator==(const NitroAttributedStringImage& lhs, const NitroAttributedStringImage& rhs) = default;
@@ -65,13 +68,13 @@ namespace margelo::nitro {
65
68
  static inline margelo::nitro::swe::iternio::reactnativeautoplay::NitroAttributedStringImage fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
66
69
  jsi::Object obj = arg.asObject(runtime);
67
70
  return margelo::nitro::swe::iternio::reactnativeautoplay::NitroAttributedStringImage(
68
- JSIConverter<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "image"))),
71
+ JSIConverter<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage, margelo::nitro::swe::iternio::reactnativeautoplay::RemoteImage>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "image"))),
69
72
  JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "position")))
70
73
  );
71
74
  }
72
75
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::swe::iternio::reactnativeautoplay::NitroAttributedStringImage& arg) {
73
76
  jsi::Object obj(runtime);
74
- obj.setProperty(runtime, PropNameIDCache::get(runtime, "image"), JSIConverter<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage>>::toJSI(runtime, arg.image));
77
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "image"), JSIConverter<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage, margelo::nitro::swe::iternio::reactnativeautoplay::RemoteImage>>::toJSI(runtime, arg.image));
75
78
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "position"), JSIConverter<double>::toJSI(runtime, arg.position));
76
79
  return obj;
77
80
  }
@@ -83,7 +86,7 @@ namespace margelo::nitro {
83
86
  if (!nitro::isPlainObject(runtime, obj)) {
84
87
  return false;
85
88
  }
86
- if (!JSIConverter<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "image")))) return false;
89
+ if (!JSIConverter<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage, margelo::nitro::swe::iternio::reactnativeautoplay::RemoteImage>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "image")))) return false;
87
90
  if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "position")))) return false;
88
91
  return true;
89
92
  }
@@ -32,9 +32,12 @@
32
32
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct GlyphImage; }
33
33
  // Forward declaration of `AssetImage` to properly resolve imports.
34
34
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct AssetImage; }
35
+ // Forward declaration of `RemoteImage` to properly resolve imports.
36
+ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct RemoteImage; }
35
37
 
36
38
  #include "GlyphImage.hpp"
37
39
  #include "AssetImage.hpp"
40
+ #include "RemoteImage.hpp"
38
41
  #include <variant>
39
42
  #include <string>
40
43
  #include <vector>
@@ -48,7 +51,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
48
51
  */
49
52
  struct NitroCarPlayDashboardButton final {
50
53
  public:
51
- std::variant<GlyphImage, AssetImage> image SWIFT_PRIVATE;
54
+ std::variant<GlyphImage, AssetImage, RemoteImage> image SWIFT_PRIVATE;
52
55
  std::vector<std::string> titleVariants SWIFT_PRIVATE;
53
56
  std::vector<std::string> subtitleVariants SWIFT_PRIVATE;
54
57
  std::function<void()> onPress SWIFT_PRIVATE;
@@ -56,7 +59,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
56
59
 
57
60
  public:
58
61
  NitroCarPlayDashboardButton() = default;
59
- explicit NitroCarPlayDashboardButton(std::variant<GlyphImage, AssetImage> image, std::vector<std::string> titleVariants, std::vector<std::string> subtitleVariants, std::function<void()> onPress, std::optional<bool> launchHeadUnitScene): image(image), titleVariants(titleVariants), subtitleVariants(subtitleVariants), onPress(onPress), launchHeadUnitScene(launchHeadUnitScene) {}
62
+ explicit NitroCarPlayDashboardButton(std::variant<GlyphImage, AssetImage, RemoteImage> image, std::vector<std::string> titleVariants, std::vector<std::string> subtitleVariants, std::function<void()> onPress, std::optional<bool> launchHeadUnitScene): image(image), titleVariants(titleVariants), subtitleVariants(subtitleVariants), onPress(onPress), launchHeadUnitScene(launchHeadUnitScene) {}
60
63
 
61
64
  public:
62
65
  // NitroCarPlayDashboardButton is not equatable because these properties are not equatable: onPress
@@ -72,7 +75,7 @@ namespace margelo::nitro {
72
75
  static inline margelo::nitro::swe::iternio::reactnativeautoplay::NitroCarPlayDashboardButton fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
73
76
  jsi::Object obj = arg.asObject(runtime);
74
77
  return margelo::nitro::swe::iternio::reactnativeautoplay::NitroCarPlayDashboardButton(
75
- JSIConverter<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "image"))),
78
+ JSIConverter<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage, margelo::nitro::swe::iternio::reactnativeautoplay::RemoteImage>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "image"))),
76
79
  JSIConverter<std::vector<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "titleVariants"))),
77
80
  JSIConverter<std::vector<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "subtitleVariants"))),
78
81
  JSIConverter<std::function<void()>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "onPress"))),
@@ -81,7 +84,7 @@ namespace margelo::nitro {
81
84
  }
82
85
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::swe::iternio::reactnativeautoplay::NitroCarPlayDashboardButton& arg) {
83
86
  jsi::Object obj(runtime);
84
- obj.setProperty(runtime, PropNameIDCache::get(runtime, "image"), JSIConverter<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage>>::toJSI(runtime, arg.image));
87
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "image"), JSIConverter<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage, margelo::nitro::swe::iternio::reactnativeautoplay::RemoteImage>>::toJSI(runtime, arg.image));
85
88
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "titleVariants"), JSIConverter<std::vector<std::string>>::toJSI(runtime, arg.titleVariants));
86
89
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "subtitleVariants"), JSIConverter<std::vector<std::string>>::toJSI(runtime, arg.subtitleVariants));
87
90
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "onPress"), JSIConverter<std::function<void()>>::toJSI(runtime, arg.onPress));
@@ -96,7 +99,7 @@ namespace margelo::nitro {
96
99
  if (!nitro::isPlainObject(runtime, obj)) {
97
100
  return false;
98
101
  }
99
- if (!JSIConverter<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "image")))) return false;
102
+ if (!JSIConverter<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage, margelo::nitro::swe::iternio::reactnativeautoplay::RemoteImage>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "image")))) return false;
100
103
  if (!JSIConverter<std::vector<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "titleVariants")))) return false;
101
104
  if (!JSIConverter<std::vector<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "subtitleVariants")))) return false;
102
105
  if (!JSIConverter<std::function<void()>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "onPress")))) return false;
@@ -34,10 +34,13 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct AutoText; }
34
34
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct GlyphImage; }
35
35
  // Forward declaration of `AssetImage` to properly resolve imports.
36
36
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct AssetImage; }
37
+ // Forward declaration of `RemoteImage` to properly resolve imports.
38
+ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct RemoteImage; }
37
39
 
38
40
  #include "AutoText.hpp"
39
41
  #include "GlyphImage.hpp"
40
42
  #include "AssetImage.hpp"
43
+ #include "RemoteImage.hpp"
41
44
  #include <variant>
42
45
  #include <functional>
43
46
 
@@ -49,12 +52,12 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
49
52
  struct NitroGridButton final {
50
53
  public:
51
54
  AutoText title SWIFT_PRIVATE;
52
- std::variant<GlyphImage, AssetImage> image SWIFT_PRIVATE;
55
+ std::variant<GlyphImage, AssetImage, RemoteImage> image SWIFT_PRIVATE;
53
56
  std::function<void()> onPress SWIFT_PRIVATE;
54
57
 
55
58
  public:
56
59
  NitroGridButton() = default;
57
- explicit NitroGridButton(AutoText title, std::variant<GlyphImage, AssetImage> image, std::function<void()> onPress): title(title), image(image), onPress(onPress) {}
60
+ explicit NitroGridButton(AutoText title, std::variant<GlyphImage, AssetImage, RemoteImage> image, std::function<void()> onPress): title(title), image(image), onPress(onPress) {}
58
61
 
59
62
  public:
60
63
  // NitroGridButton is not equatable because these properties are not equatable: onPress
@@ -71,14 +74,14 @@ namespace margelo::nitro {
71
74
  jsi::Object obj = arg.asObject(runtime);
72
75
  return margelo::nitro::swe::iternio::reactnativeautoplay::NitroGridButton(
73
76
  JSIConverter<margelo::nitro::swe::iternio::reactnativeautoplay::AutoText>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "title"))),
74
- JSIConverter<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "image"))),
77
+ JSIConverter<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage, margelo::nitro::swe::iternio::reactnativeautoplay::RemoteImage>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "image"))),
75
78
  JSIConverter<std::function<void()>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "onPress")))
76
79
  );
77
80
  }
78
81
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::swe::iternio::reactnativeautoplay::NitroGridButton& arg) {
79
82
  jsi::Object obj(runtime);
80
83
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "title"), JSIConverter<margelo::nitro::swe::iternio::reactnativeautoplay::AutoText>::toJSI(runtime, arg.title));
81
- obj.setProperty(runtime, PropNameIDCache::get(runtime, "image"), JSIConverter<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage>>::toJSI(runtime, arg.image));
84
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "image"), JSIConverter<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage, margelo::nitro::swe::iternio::reactnativeautoplay::RemoteImage>>::toJSI(runtime, arg.image));
82
85
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "onPress"), JSIConverter<std::function<void()>>::toJSI(runtime, arg.onPress));
83
86
  return obj;
84
87
  }
@@ -91,7 +94,7 @@ namespace margelo::nitro {
91
94
  return false;
92
95
  }
93
96
  if (!JSIConverter<margelo::nitro::swe::iternio::reactnativeautoplay::AutoText>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "title")))) return false;
94
- if (!JSIConverter<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "image")))) return false;
97
+ if (!JSIConverter<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage, margelo::nitro::swe::iternio::reactnativeautoplay::RemoteImage>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "image")))) return false;
95
98
  if (!JSIConverter<std::function<void()>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "onPress")))) return false;
96
99
  return true;
97
100
  }