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

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 (118) hide show
  1. package/README.md +60 -2
  2. package/android/src/automotive/AndroidManifest.xml +1 -0
  3. package/android/src/main/AndroidManifest.xml +1 -0
  4. package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridAutoPlay.kt +91 -0
  5. package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/VoiceInputManager.kt +214 -0
  6. package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/template/MapTemplate.kt +2 -1
  7. package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/template/Parser.kt +108 -38
  8. package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/utils/BitmapCache.kt +14 -0
  9. package/ios/extensions/NitroImageExtensions.swift +10 -1
  10. package/ios/hybrid/HybridAutoPlay.swift +51 -4
  11. package/ios/templates/GridTemplate.swift +7 -0
  12. package/ios/templates/MapTemplate.swift +14 -0
  13. package/ios/templates/Parser.swift +91 -4
  14. package/ios/utils/VoiceInputManager.swift +233 -0
  15. package/lib/specs/AutoPlay.nitro.d.ts +31 -1
  16. package/lib/types/Image.d.ts +13 -0
  17. package/lib/utils/NitroImage.d.ts +6 -1
  18. package/lib/utils/NitroImage.js +7 -0
  19. package/nitrogen/generated/android/ReactNativeAutoPlay+autolinking.cmake +1 -1
  20. package/nitrogen/generated/android/c++/JGridTemplateConfig.hpp +3 -1
  21. package/nitrogen/generated/android/c++/JHybridAutoPlaySpec.cpp +48 -1
  22. package/nitrogen/generated/android/c++/JHybridAutoPlaySpec.hpp +4 -0
  23. package/nitrogen/generated/android/c++/JHybridClusterSpec.cpp +4 -0
  24. package/nitrogen/generated/android/c++/JHybridGridTemplateSpec.cpp +5 -1
  25. package/nitrogen/generated/android/c++/JHybridInformationTemplateSpec.cpp +5 -1
  26. package/nitrogen/generated/android/c++/JHybridListTemplateSpec.cpp +5 -1
  27. package/nitrogen/generated/android/c++/JHybridMapTemplateSpec.cpp +5 -1
  28. package/nitrogen/generated/android/c++/JHybridMessageTemplateSpec.cpp +5 -1
  29. package/nitrogen/generated/android/c++/JHybridSearchTemplateSpec.cpp +5 -1
  30. package/nitrogen/generated/android/c++/JHybridSignInTemplateSpec.cpp +5 -1
  31. package/nitrogen/generated/android/c++/JImageLane.hpp +2 -0
  32. package/nitrogen/generated/android/c++/JInformationTemplateConfig.hpp +3 -1
  33. package/nitrogen/generated/android/c++/JLaneGuidance.hpp +2 -0
  34. package/nitrogen/generated/android/c++/JListTemplateConfig.hpp +3 -1
  35. package/nitrogen/generated/android/c++/JMapTemplateConfig.hpp +3 -1
  36. package/nitrogen/generated/android/c++/JMessageTemplateConfig.hpp +7 -5
  37. package/nitrogen/generated/android/c++/JNitroAction.hpp +7 -5
  38. package/nitrogen/generated/android/c++/JNitroAttributedString.hpp +2 -0
  39. package/nitrogen/generated/android/c++/JNitroAttributedStringImage.hpp +2 -0
  40. package/nitrogen/generated/android/c++/JNitroBaseMapTemplateConfig.hpp +3 -1
  41. package/nitrogen/generated/android/c++/JNitroGridButton.hpp +2 -0
  42. package/nitrogen/generated/android/c++/JNitroImage.cpp +6 -2
  43. package/nitrogen/generated/android/c++/JNitroImage.hpp +19 -2
  44. package/nitrogen/generated/android/c++/JNitroManeuver.hpp +3 -1
  45. package/nitrogen/generated/android/c++/JNitroMapButton.hpp +2 -0
  46. package/nitrogen/generated/android/c++/JNitroMessageManeuver.hpp +7 -5
  47. package/nitrogen/generated/android/c++/JNitroNavigationAlert.hpp +7 -5
  48. package/nitrogen/generated/android/c++/JNitroRoutingManeuver.hpp +7 -5
  49. package/nitrogen/generated/android/c++/JNitroRow.hpp +7 -5
  50. package/nitrogen/generated/android/c++/JNitroSection.hpp +3 -1
  51. package/nitrogen/generated/android/c++/JPreferredImageLane.hpp +2 -0
  52. package/nitrogen/generated/android/c++/JRemoteImage.hpp +68 -0
  53. package/nitrogen/generated/android/c++/JSearchTemplateConfig.hpp +3 -1
  54. package/nitrogen/generated/android/c++/JSignInTemplateConfig.hpp +3 -1
  55. package/nitrogen/generated/android/c++/JVariant_GlyphImage_AssetImage_RemoteImage.cpp +30 -0
  56. package/nitrogen/generated/android/c++/JVariant_GlyphImage_AssetImage_RemoteImage.hpp +92 -0
  57. package/nitrogen/generated/android/c++/JVariant_PreferredImageLane_ImageLane.hpp +2 -0
  58. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridAutoPlaySpec.kt +17 -0
  59. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/MessageTemplateConfig.kt +3 -3
  60. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroAction.kt +3 -3
  61. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroImage.kt +14 -2
  62. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroMessageManeuver.kt +2 -2
  63. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroNavigationAlert.kt +3 -3
  64. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroRoutingManeuver.kt +2 -2
  65. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroRow.kt +3 -3
  66. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/RemoteImage.kt +44 -0
  67. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/{Variant_GlyphImage_AssetImage.kt → Variant_GlyphImage_AssetImage_RemoteImage.kt} +20 -8
  68. package/nitrogen/generated/ios/ReactNativeAutoPlay-Swift-Cxx-Bridge.cpp +16 -8
  69. package/nitrogen/generated/ios/ReactNativeAutoPlay-Swift-Cxx-Bridge.hpp +156 -79
  70. package/nitrogen/generated/ios/ReactNativeAutoPlay-Swift-Cxx-Umbrella.hpp +4 -0
  71. package/nitrogen/generated/ios/c++/HybridAutoPlaySpecSwift.hpp +37 -0
  72. package/nitrogen/generated/ios/c++/HybridCarPlayDashboardSpecSwift.hpp +3 -0
  73. package/nitrogen/generated/ios/c++/HybridClusterSpecSwift.hpp +3 -0
  74. package/nitrogen/generated/ios/c++/HybridGridTemplateSpecSwift.hpp +3 -0
  75. package/nitrogen/generated/ios/c++/HybridInformationTemplateSpecSwift.hpp +3 -0
  76. package/nitrogen/generated/ios/c++/HybridListTemplateSpecSwift.hpp +3 -0
  77. package/nitrogen/generated/ios/c++/HybridMapTemplateSpecSwift.hpp +3 -0
  78. package/nitrogen/generated/ios/c++/HybridMessageTemplateSpecSwift.hpp +3 -0
  79. package/nitrogen/generated/ios/c++/HybridSearchTemplateSpecSwift.hpp +3 -0
  80. package/nitrogen/generated/ios/swift/Func_void_std__shared_ptr_ArrayBuffer_.swift +46 -0
  81. package/nitrogen/generated/ios/swift/HybridAutoPlaySpec.swift +4 -0
  82. package/nitrogen/generated/ios/swift/HybridAutoPlaySpec_cxx.swift +82 -0
  83. package/nitrogen/generated/ios/swift/ImageLane.swift +9 -4
  84. package/nitrogen/generated/ios/swift/MessageTemplateConfig.swift +16 -11
  85. package/nitrogen/generated/ios/swift/NitroAction.swift +16 -11
  86. package/nitrogen/generated/ios/swift/NitroAttributedStringImage.swift +9 -4
  87. package/nitrogen/generated/ios/swift/NitroCarPlayDashboardButton.swift +9 -4
  88. package/nitrogen/generated/ios/swift/NitroGridButton.swift +9 -4
  89. package/nitrogen/generated/ios/swift/NitroImage.swift +2 -1
  90. package/nitrogen/generated/ios/swift/NitroMapButton.swift +9 -4
  91. package/nitrogen/generated/ios/swift/NitroMessageManeuver.swift +16 -11
  92. package/nitrogen/generated/ios/swift/NitroNavigationAlert.swift +16 -11
  93. package/nitrogen/generated/ios/swift/NitroRoutingManeuver.swift +25 -15
  94. package/nitrogen/generated/ios/swift/NitroRow.swift +16 -11
  95. package/nitrogen/generated/ios/swift/PreferredImageLane.swift +9 -4
  96. package/nitrogen/generated/ios/swift/RemoteImage.swift +58 -0
  97. package/nitrogen/generated/ios/swift/{Variant_GlyphImage_AssetImage.swift → Variant_GlyphImage_AssetImage_RemoteImage.swift} +4 -3
  98. package/nitrogen/generated/shared/c++/HybridAutoPlaySpec.cpp +4 -0
  99. package/nitrogen/generated/shared/c++/HybridAutoPlaySpec.hpp +5 -0
  100. package/nitrogen/generated/shared/c++/ImageLane.hpp +8 -5
  101. package/nitrogen/generated/shared/c++/MessageTemplateConfig.hpp +8 -5
  102. package/nitrogen/generated/shared/c++/NitroAction.hpp +8 -5
  103. package/nitrogen/generated/shared/c++/NitroAttributedStringImage.hpp +8 -5
  104. package/nitrogen/generated/shared/c++/NitroCarPlayDashboardButton.hpp +8 -5
  105. package/nitrogen/generated/shared/c++/NitroGridButton.hpp +8 -5
  106. package/nitrogen/generated/shared/c++/NitroMapButton.hpp +8 -5
  107. package/nitrogen/generated/shared/c++/NitroMessageManeuver.hpp +8 -5
  108. package/nitrogen/generated/shared/c++/NitroNavigationAlert.hpp +8 -5
  109. package/nitrogen/generated/shared/c++/NitroRoutingManeuver.hpp +12 -9
  110. package/nitrogen/generated/shared/c++/NitroRow.hpp +8 -5
  111. package/nitrogen/generated/shared/c++/PreferredImageLane.hpp +8 -5
  112. package/nitrogen/generated/shared/c++/RemoteImage.hpp +94 -0
  113. package/package.json +1 -1
  114. package/src/specs/AutoPlay.nitro.ts +39 -1
  115. package/src/types/Image.ts +14 -0
  116. package/src/utils/NitroImage.ts +15 -1
  117. package/nitrogen/generated/android/c++/JVariant_GlyphImage_AssetImage.cpp +0 -26
  118. package/nitrogen/generated/android/c++/JVariant_GlyphImage_AssetImage.hpp +0 -75
@@ -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
  }
@@ -34,10 +34,13 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class NitroMa
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 "NitroMapButtonType.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
  #include <optional>
@@ -50,12 +53,12 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
50
53
  struct NitroMapButton final {
51
54
  public:
52
55
  NitroMapButtonType type SWIFT_PRIVATE;
53
- std::variant<GlyphImage, AssetImage> image SWIFT_PRIVATE;
56
+ std::variant<GlyphImage, AssetImage, RemoteImage> image SWIFT_PRIVATE;
54
57
  std::optional<std::function<void()>> onPress SWIFT_PRIVATE;
55
58
 
56
59
  public:
57
60
  NitroMapButton() = default;
58
- explicit NitroMapButton(NitroMapButtonType type, std::variant<GlyphImage, AssetImage> image, std::optional<std::function<void()>> onPress): type(type), image(image), onPress(onPress) {}
61
+ explicit NitroMapButton(NitroMapButtonType type, std::variant<GlyphImage, AssetImage, RemoteImage> image, std::optional<std::function<void()>> onPress): type(type), image(image), onPress(onPress) {}
59
62
 
60
63
  public:
61
64
  // NitroMapButton is not equatable because these properties are not equatable: onPress
@@ -72,14 +75,14 @@ namespace margelo::nitro {
72
75
  jsi::Object obj = arg.asObject(runtime);
73
76
  return margelo::nitro::swe::iternio::reactnativeautoplay::NitroMapButton(
74
77
  JSIConverter<margelo::nitro::swe::iternio::reactnativeautoplay::NitroMapButtonType>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "type"))),
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::optional<std::function<void()>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "onPress")))
77
80
  );
78
81
  }
79
82
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::swe::iternio::reactnativeautoplay::NitroMapButton& arg) {
80
83
  jsi::Object obj(runtime);
81
84
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "type"), JSIConverter<margelo::nitro::swe::iternio::reactnativeautoplay::NitroMapButtonType>::toJSI(runtime, arg.type));
82
- 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));
85
+ 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));
83
86
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "onPress"), JSIConverter<std::optional<std::function<void()>>>::toJSI(runtime, arg.onPress));
84
87
  return obj;
85
88
  }
@@ -92,7 +95,7 @@ namespace margelo::nitro {
92
95
  return false;
93
96
  }
94
97
  if (!JSIConverter<margelo::nitro::swe::iternio::reactnativeautoplay::NitroMapButtonType>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "type")))) return false;
95
- 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;
98
+ 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;
96
99
  if (!JSIConverter<std::optional<std::function<void()>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "onPress")))) return false;
97
100
  return true;
98
101
  }
@@ -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 `NitroColor` to properly resolve imports.
36
38
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroColor; }
37
39
 
@@ -39,6 +41,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroColor;
39
41
  #include <optional>
40
42
  #include "GlyphImage.hpp"
41
43
  #include "AssetImage.hpp"
44
+ #include "RemoteImage.hpp"
42
45
  #include <variant>
43
46
  #include "NitroColor.hpp"
44
47
 
@@ -51,12 +54,12 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
51
54
  public:
52
55
  std::string title SWIFT_PRIVATE;
53
56
  std::optional<std::string> text SWIFT_PRIVATE;
54
- std::optional<std::variant<GlyphImage, AssetImage>> image SWIFT_PRIVATE;
57
+ std::optional<std::variant<GlyphImage, AssetImage, RemoteImage>> image SWIFT_PRIVATE;
55
58
  NitroColor cardBackgroundColor SWIFT_PRIVATE;
56
59
 
57
60
  public:
58
61
  NitroMessageManeuver() = default;
59
- explicit NitroMessageManeuver(std::string title, std::optional<std::string> text, std::optional<std::variant<GlyphImage, AssetImage>> image, NitroColor cardBackgroundColor): title(title), text(text), image(image), cardBackgroundColor(cardBackgroundColor) {}
62
+ explicit NitroMessageManeuver(std::string title, std::optional<std::string> text, std::optional<std::variant<GlyphImage, AssetImage, RemoteImage>> image, NitroColor cardBackgroundColor): title(title), text(text), image(image), cardBackgroundColor(cardBackgroundColor) {}
60
63
 
61
64
  public:
62
65
  friend bool operator==(const NitroMessageManeuver& lhs, const NitroMessageManeuver& rhs) = default;
@@ -74,7 +77,7 @@ namespace margelo::nitro {
74
77
  return margelo::nitro::swe::iternio::reactnativeautoplay::NitroMessageManeuver(
75
78
  JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "title"))),
76
79
  JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "text"))),
77
- 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"))),
80
+ 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"))),
78
81
  JSIConverter<margelo::nitro::swe::iternio::reactnativeautoplay::NitroColor>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "cardBackgroundColor")))
79
82
  );
80
83
  }
@@ -82,7 +85,7 @@ namespace margelo::nitro {
82
85
  jsi::Object obj(runtime);
83
86
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "title"), JSIConverter<std::string>::toJSI(runtime, arg.title));
84
87
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "text"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.text));
85
- 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));
88
+ 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));
86
89
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "cardBackgroundColor"), JSIConverter<margelo::nitro::swe::iternio::reactnativeautoplay::NitroColor>::toJSI(runtime, arg.cardBackgroundColor));
87
90
  return obj;
88
91
  }
@@ -96,7 +99,7 @@ namespace margelo::nitro {
96
99
  }
97
100
  if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "title")))) return false;
98
101
  if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "text")))) return false;
99
- 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;
102
+ 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;
100
103
  if (!JSIConverter<margelo::nitro::swe::iternio::reactnativeautoplay::NitroColor>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "cardBackgroundColor")))) return false;
101
104
  return true;
102
105
  }
@@ -34,6 +34,8 @@ 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
  // Forward declaration of `NavigationAlertAction` to properly resolve imports.
38
40
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NavigationAlertAction; }
39
41
  // Forward declaration of `AlertDismissalReason` to properly resolve imports.
@@ -43,6 +45,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class AlertDi
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 "NavigationAlertAction.hpp"
48
51
  #include <functional>
@@ -58,7 +61,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
58
61
  double id SWIFT_PRIVATE;
59
62
  AutoText title SWIFT_PRIVATE;
60
63
  std::optional<AutoText> subtitle SWIFT_PRIVATE;
61
- std::optional<std::variant<GlyphImage, AssetImage>> image SWIFT_PRIVATE;
64
+ std::optional<std::variant<GlyphImage, AssetImage, RemoteImage>> image SWIFT_PRIVATE;
62
65
  NavigationAlertAction primaryAction SWIFT_PRIVATE;
63
66
  std::optional<NavigationAlertAction> secondaryAction SWIFT_PRIVATE;
64
67
  double durationMs SWIFT_PRIVATE;
@@ -68,7 +71,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
68
71
 
69
72
  public:
70
73
  NitroNavigationAlert() = default;
71
- explicit NitroNavigationAlert(double id, AutoText title, std::optional<AutoText> subtitle, std::optional<std::variant<GlyphImage, AssetImage>> image, NavigationAlertAction primaryAction, std::optional<NavigationAlertAction> secondaryAction, double durationMs, std::optional<std::function<void()>> onWillShow, std::optional<std::function<void(AlertDismissalReason /* reason */)>> onDidDismiss, double priority): id(id), title(title), subtitle(subtitle), image(image), primaryAction(primaryAction), secondaryAction(secondaryAction), durationMs(durationMs), onWillShow(onWillShow), onDidDismiss(onDidDismiss), priority(priority) {}
74
+ explicit NitroNavigationAlert(double id, AutoText title, std::optional<AutoText> subtitle, std::optional<std::variant<GlyphImage, AssetImage, RemoteImage>> image, NavigationAlertAction primaryAction, std::optional<NavigationAlertAction> secondaryAction, double durationMs, std::optional<std::function<void()>> onWillShow, std::optional<std::function<void(AlertDismissalReason /* reason */)>> onDidDismiss, double priority): id(id), title(title), subtitle(subtitle), image(image), primaryAction(primaryAction), secondaryAction(secondaryAction), durationMs(durationMs), onWillShow(onWillShow), onDidDismiss(onDidDismiss), priority(priority) {}
72
75
 
73
76
  public:
74
77
  // NitroNavigationAlert is not equatable because these properties are not equatable: primaryAction, secondaryAction, onWillShow, onDidDismiss
@@ -87,7 +90,7 @@ namespace margelo::nitro {
87
90
  JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "id"))),
88
91
  JSIConverter<margelo::nitro::swe::iternio::reactnativeautoplay::AutoText>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "title"))),
89
92
  JSIConverter<std::optional<margelo::nitro::swe::iternio::reactnativeautoplay::AutoText>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "subtitle"))),
90
- 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"))),
93
+ 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"))),
91
94
  JSIConverter<margelo::nitro::swe::iternio::reactnativeautoplay::NavigationAlertAction>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "primaryAction"))),
92
95
  JSIConverter<std::optional<margelo::nitro::swe::iternio::reactnativeautoplay::NavigationAlertAction>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "secondaryAction"))),
93
96
  JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "durationMs"))),
@@ -101,7 +104,7 @@ namespace margelo::nitro {
101
104
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "id"), JSIConverter<double>::toJSI(runtime, arg.id));
102
105
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "title"), JSIConverter<margelo::nitro::swe::iternio::reactnativeautoplay::AutoText>::toJSI(runtime, arg.title));
103
106
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "subtitle"), JSIConverter<std::optional<margelo::nitro::swe::iternio::reactnativeautoplay::AutoText>>::toJSI(runtime, arg.subtitle));
104
- 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));
107
+ 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));
105
108
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "primaryAction"), JSIConverter<margelo::nitro::swe::iternio::reactnativeautoplay::NavigationAlertAction>::toJSI(runtime, arg.primaryAction));
106
109
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "secondaryAction"), JSIConverter<std::optional<margelo::nitro::swe::iternio::reactnativeautoplay::NavigationAlertAction>>::toJSI(runtime, arg.secondaryAction));
107
110
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "durationMs"), JSIConverter<double>::toJSI(runtime, arg.durationMs));
@@ -121,7 +124,7 @@ namespace margelo::nitro {
121
124
  if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "id")))) return false;
122
125
  if (!JSIConverter<margelo::nitro::swe::iternio::reactnativeautoplay::AutoText>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "title")))) return false;
123
126
  if (!JSIConverter<std::optional<margelo::nitro::swe::iternio::reactnativeautoplay::AutoText>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "subtitle")))) return false;
124
- 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;
127
+ 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;
125
128
  if (!JSIConverter<margelo::nitro::swe::iternio::reactnativeautoplay::NavigationAlertAction>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "primaryAction")))) return false;
126
129
  if (!JSIConverter<std::optional<margelo::nitro::swe::iternio::reactnativeautoplay::NavigationAlertAction>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "secondaryAction")))) return false;
127
130
  if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "durationMs")))) return false;
@@ -34,6 +34,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroAttrib
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
  // Forward declaration of `TurnType` to properly resolve imports.
38
40
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class TurnType; }
39
41
  // Forward declaration of `OffRampType` to properly resolve imports.
@@ -59,6 +61,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class Maneuve
59
61
  #include <vector>
60
62
  #include "GlyphImage.hpp"
61
63
  #include "AssetImage.hpp"
64
+ #include "RemoteImage.hpp"
62
65
  #include <variant>
63
66
  #include <optional>
64
67
  #include "TurnType.hpp"
@@ -81,8 +84,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
81
84
  struct NitroRoutingManeuver final {
82
85
  public:
83
86
  std::vector<NitroAttributedString> attributedInstructionVariants SWIFT_PRIVATE;
84
- std::variant<GlyphImage, AssetImage> symbolImage SWIFT_PRIVATE;
85
- std::optional<std::variant<GlyphImage, AssetImage>> junctionImage SWIFT_PRIVATE;
87
+ std::variant<GlyphImage, AssetImage, RemoteImage> symbolImage SWIFT_PRIVATE;
88
+ std::optional<std::variant<GlyphImage, AssetImage, RemoteImage>> junctionImage SWIFT_PRIVATE;
86
89
  std::optional<TurnType> turnType SWIFT_PRIVATE;
87
90
  std::optional<double> angle SWIFT_PRIVATE;
88
91
  std::optional<std::vector<double>> elementAngles SWIFT_PRIVATE;
@@ -102,7 +105,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
102
105
 
103
106
  public:
104
107
  NitroRoutingManeuver() = default;
105
- explicit NitroRoutingManeuver(std::vector<NitroAttributedString> attributedInstructionVariants, std::variant<GlyphImage, AssetImage> symbolImage, std::optional<std::variant<GlyphImage, AssetImage>> junctionImage, std::optional<TurnType> turnType, std::optional<double> angle, std::optional<std::vector<double>> elementAngles, std::optional<double> exitNumber, std::optional<OffRampType> offRampType, std::optional<OnRampType> onRampType, std::optional<ForkType> forkType, std::optional<KeepType> keepType, std::optional<LaneGuidance> linkedLaneGuidance, NitroColor cardBackgroundColor, std::string id, TravelEstimates travelEstimates, TrafficSide trafficSide, ManeuverType maneuverType, std::optional<std::vector<std::string>> roadName, std::optional<std::string> highwayExitLabel): attributedInstructionVariants(attributedInstructionVariants), symbolImage(symbolImage), junctionImage(junctionImage), turnType(turnType), angle(angle), elementAngles(elementAngles), exitNumber(exitNumber), offRampType(offRampType), onRampType(onRampType), forkType(forkType), keepType(keepType), linkedLaneGuidance(linkedLaneGuidance), cardBackgroundColor(cardBackgroundColor), id(id), travelEstimates(travelEstimates), trafficSide(trafficSide), maneuverType(maneuverType), roadName(roadName), highwayExitLabel(highwayExitLabel) {}
108
+ explicit NitroRoutingManeuver(std::vector<NitroAttributedString> attributedInstructionVariants, std::variant<GlyphImage, AssetImage, RemoteImage> symbolImage, std::optional<std::variant<GlyphImage, AssetImage, RemoteImage>> junctionImage, std::optional<TurnType> turnType, std::optional<double> angle, std::optional<std::vector<double>> elementAngles, std::optional<double> exitNumber, std::optional<OffRampType> offRampType, std::optional<OnRampType> onRampType, std::optional<ForkType> forkType, std::optional<KeepType> keepType, std::optional<LaneGuidance> linkedLaneGuidance, NitroColor cardBackgroundColor, std::string id, TravelEstimates travelEstimates, TrafficSide trafficSide, ManeuverType maneuverType, std::optional<std::vector<std::string>> roadName, std::optional<std::string> highwayExitLabel): attributedInstructionVariants(attributedInstructionVariants), symbolImage(symbolImage), junctionImage(junctionImage), turnType(turnType), angle(angle), elementAngles(elementAngles), exitNumber(exitNumber), offRampType(offRampType), onRampType(onRampType), forkType(forkType), keepType(keepType), linkedLaneGuidance(linkedLaneGuidance), cardBackgroundColor(cardBackgroundColor), id(id), travelEstimates(travelEstimates), trafficSide(trafficSide), maneuverType(maneuverType), roadName(roadName), highwayExitLabel(highwayExitLabel) {}
106
109
 
107
110
  public:
108
111
  // NitroRoutingManeuver is not equatable because these properties are not equatable: travelEstimates
@@ -119,8 +122,8 @@ namespace margelo::nitro {
119
122
  jsi::Object obj = arg.asObject(runtime);
120
123
  return margelo::nitro::swe::iternio::reactnativeautoplay::NitroRoutingManeuver(
121
124
  JSIConverter<std::vector<margelo::nitro::swe::iternio::reactnativeautoplay::NitroAttributedString>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "attributedInstructionVariants"))),
122
- JSIConverter<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "symbolImage"))),
123
- 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, "junctionImage"))),
125
+ 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, "symbolImage"))),
126
+ 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, "junctionImage"))),
124
127
  JSIConverter<std::optional<margelo::nitro::swe::iternio::reactnativeautoplay::TurnType>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "turnType"))),
125
128
  JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "angle"))),
126
129
  JSIConverter<std::optional<std::vector<double>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "elementAngles"))),
@@ -142,8 +145,8 @@ namespace margelo::nitro {
142
145
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::swe::iternio::reactnativeautoplay::NitroRoutingManeuver& arg) {
143
146
  jsi::Object obj(runtime);
144
147
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "attributedInstructionVariants"), JSIConverter<std::vector<margelo::nitro::swe::iternio::reactnativeautoplay::NitroAttributedString>>::toJSI(runtime, arg.attributedInstructionVariants));
145
- obj.setProperty(runtime, PropNameIDCache::get(runtime, "symbolImage"), JSIConverter<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage>>::toJSI(runtime, arg.symbolImage));
146
- obj.setProperty(runtime, PropNameIDCache::get(runtime, "junctionImage"), JSIConverter<std::optional<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage>>>::toJSI(runtime, arg.junctionImage));
148
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "symbolImage"), JSIConverter<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage, margelo::nitro::swe::iternio::reactnativeautoplay::RemoteImage>>::toJSI(runtime, arg.symbolImage));
149
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "junctionImage"), 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.junctionImage));
147
150
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "turnType"), JSIConverter<std::optional<margelo::nitro::swe::iternio::reactnativeautoplay::TurnType>>::toJSI(runtime, arg.turnType));
148
151
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "angle"), JSIConverter<std::optional<double>>::toJSI(runtime, arg.angle));
149
152
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "elementAngles"), JSIConverter<std::optional<std::vector<double>>>::toJSI(runtime, arg.elementAngles));
@@ -171,8 +174,8 @@ namespace margelo::nitro {
171
174
  return false;
172
175
  }
173
176
  if (!JSIConverter<std::vector<margelo::nitro::swe::iternio::reactnativeautoplay::NitroAttributedString>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "attributedInstructionVariants")))) return false;
174
- if (!JSIConverter<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "symbolImage")))) return false;
175
- 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, "junctionImage")))) return false;
177
+ 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, "symbolImage")))) return false;
178
+ 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, "junctionImage")))) return false;
176
179
  if (!JSIConverter<std::optional<margelo::nitro::swe::iternio::reactnativeautoplay::TurnType>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "turnType")))) return false;
177
180
  if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "angle")))) return false;
178
181
  if (!JSIConverter<std::optional<std::vector<double>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "elementAngles")))) return false;
@@ -34,11 +34,14 @@ 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 <optional>
40
42
  #include "GlyphImage.hpp"
41
43
  #include "AssetImage.hpp"
44
+ #include "RemoteImage.hpp"
42
45
  #include <variant>
43
46
  #include <functional>
44
47
 
@@ -53,14 +56,14 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
53
56
  std::optional<AutoText> detailedText SWIFT_PRIVATE;
54
57
  std::optional<bool> browsable SWIFT_PRIVATE;
55
58
  bool enabled SWIFT_PRIVATE;
56
- std::optional<std::variant<GlyphImage, AssetImage>> image SWIFT_PRIVATE;
59
+ std::optional<std::variant<GlyphImage, AssetImage, RemoteImage>> image SWIFT_PRIVATE;
57
60
  std::optional<bool> checked SWIFT_PRIVATE;
58
61
  std::optional<std::function<void(std::optional<bool> /* checked */)>> onPress SWIFT_PRIVATE;
59
62
  std::optional<bool> selected SWIFT_PRIVATE;
60
63
 
61
64
  public:
62
65
  NitroRow() = default;
63
- explicit NitroRow(AutoText title, std::optional<AutoText> detailedText, std::optional<bool> browsable, bool enabled, std::optional<std::variant<GlyphImage, AssetImage>> image, std::optional<bool> checked, std::optional<std::function<void(std::optional<bool> /* checked */)>> onPress, std::optional<bool> selected): title(title), detailedText(detailedText), browsable(browsable), enabled(enabled), image(image), checked(checked), onPress(onPress), selected(selected) {}
66
+ explicit NitroRow(AutoText title, std::optional<AutoText> detailedText, std::optional<bool> browsable, bool enabled, std::optional<std::variant<GlyphImage, AssetImage, RemoteImage>> image, std::optional<bool> checked, std::optional<std::function<void(std::optional<bool> /* checked */)>> onPress, std::optional<bool> selected): title(title), detailedText(detailedText), browsable(browsable), enabled(enabled), image(image), checked(checked), onPress(onPress), selected(selected) {}
64
67
 
65
68
  public:
66
69
  // NitroRow is not equatable because these properties are not equatable: onPress
@@ -80,7 +83,7 @@ namespace margelo::nitro {
80
83
  JSIConverter<std::optional<margelo::nitro::swe::iternio::reactnativeautoplay::AutoText>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "detailedText"))),
81
84
  JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "browsable"))),
82
85
  JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "enabled"))),
83
- 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"))),
86
+ 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"))),
84
87
  JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "checked"))),
85
88
  JSIConverter<std::optional<std::function<void(std::optional<bool>)>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "onPress"))),
86
89
  JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "selected")))
@@ -92,7 +95,7 @@ namespace margelo::nitro {
92
95
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "detailedText"), JSIConverter<std::optional<margelo::nitro::swe::iternio::reactnativeautoplay::AutoText>>::toJSI(runtime, arg.detailedText));
93
96
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "browsable"), JSIConverter<std::optional<bool>>::toJSI(runtime, arg.browsable));
94
97
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "enabled"), JSIConverter<bool>::toJSI(runtime, arg.enabled));
95
- 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));
98
+ 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));
96
99
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "checked"), JSIConverter<std::optional<bool>>::toJSI(runtime, arg.checked));
97
100
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "onPress"), JSIConverter<std::optional<std::function<void(std::optional<bool>)>>>::toJSI(runtime, arg.onPress));
98
101
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "selected"), JSIConverter<std::optional<bool>>::toJSI(runtime, arg.selected));
@@ -110,7 +113,7 @@ namespace margelo::nitro {
110
113
  if (!JSIConverter<std::optional<margelo::nitro::swe::iternio::reactnativeautoplay::AutoText>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "detailedText")))) return false;
111
114
  if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "browsable")))) return false;
112
115
  if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "enabled")))) return false;
113
- 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;
116
+ 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;
114
117
  if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "checked")))) return false;
115
118
  if (!JSIConverter<std::optional<std::function<void(std::optional<bool>)>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "onPress")))) return false;
116
119
  if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "selected")))) 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
  #include <vector>
40
43
 
@@ -45,14 +48,14 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
45
48
  */
46
49
  struct PreferredImageLane final {
47
50
  public:
48
- std::variant<GlyphImage, AssetImage> image SWIFT_PRIVATE;
51
+ std::variant<GlyphImage, AssetImage, RemoteImage> image SWIFT_PRIVATE;
49
52
  double highlightedAngle SWIFT_PRIVATE;
50
53
  bool isPreferred SWIFT_PRIVATE;
51
54
  std::vector<double> angles SWIFT_PRIVATE;
52
55
 
53
56
  public:
54
57
  PreferredImageLane() = default;
55
- explicit PreferredImageLane(std::variant<GlyphImage, AssetImage> image, double highlightedAngle, bool isPreferred, std::vector<double> angles): image(image), highlightedAngle(highlightedAngle), isPreferred(isPreferred), angles(angles) {}
58
+ explicit PreferredImageLane(std::variant<GlyphImage, AssetImage, RemoteImage> image, double highlightedAngle, bool isPreferred, std::vector<double> angles): image(image), highlightedAngle(highlightedAngle), isPreferred(isPreferred), angles(angles) {}
56
59
 
57
60
  public:
58
61
  friend bool operator==(const PreferredImageLane& lhs, const PreferredImageLane& rhs) = default;
@@ -68,7 +71,7 @@ namespace margelo::nitro {
68
71
  static inline margelo::nitro::swe::iternio::reactnativeautoplay::PreferredImageLane fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
69
72
  jsi::Object obj = arg.asObject(runtime);
70
73
  return margelo::nitro::swe::iternio::reactnativeautoplay::PreferredImageLane(
71
- JSIConverter<std::variant<margelo::nitro::swe::iternio::reactnativeautoplay::GlyphImage, margelo::nitro::swe::iternio::reactnativeautoplay::AssetImage>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "image"))),
74
+ 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"))),
72
75
  JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "highlightedAngle"))),
73
76
  JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "isPreferred"))),
74
77
  JSIConverter<std::vector<double>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "angles")))
@@ -76,7 +79,7 @@ namespace margelo::nitro {
76
79
  }
77
80
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::swe::iternio::reactnativeautoplay::PreferredImageLane& arg) {
78
81
  jsi::Object obj(runtime);
79
- 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));
82
+ 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));
80
83
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "highlightedAngle"), JSIConverter<double>::toJSI(runtime, arg.highlightedAngle));
81
84
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "isPreferred"), JSIConverter<bool>::toJSI(runtime, arg.isPreferred));
82
85
  obj.setProperty(runtime, PropNameIDCache::get(runtime, "angles"), JSIConverter<std::vector<double>>::toJSI(runtime, arg.angles));
@@ -90,7 +93,7 @@ namespace margelo::nitro {
90
93
  if (!nitro::isPlainObject(runtime, obj)) {
91
94
  return false;
92
95
  }
93
- 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;
96
+ 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;
94
97
  if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "highlightedAngle")))) return false;
95
98
  if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "isPreferred")))) return false;
96
99
  if (!JSIConverter<std::vector<double>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "angles")))) return false;
@@ -0,0 +1,94 @@
1
+ ///
2
+ /// RemoteImage.hpp
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
+ #pragma once
9
+
10
+ #if __has_include(<NitroModules/JSIConverter.hpp>)
11
+ #include <NitroModules/JSIConverter.hpp>
12
+ #else
13
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
+ #endif
15
+ #if __has_include(<NitroModules/NitroDefines.hpp>)
16
+ #include <NitroModules/NitroDefines.hpp>
17
+ #else
18
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
+ #endif
20
+ #if __has_include(<NitroModules/JSIHelpers.hpp>)
21
+ #include <NitroModules/JSIHelpers.hpp>
22
+ #else
23
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
+ #endif
25
+ #if __has_include(<NitroModules/PropNameIDCache.hpp>)
26
+ #include <NitroModules/PropNameIDCache.hpp>
27
+ #else
28
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
29
+ #endif
30
+
31
+ // Forward declaration of `NitroColor` to properly resolve imports.
32
+ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroColor; }
33
+
34
+ #include <string>
35
+ #include "NitroColor.hpp"
36
+ #include <optional>
37
+
38
+ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
39
+
40
+ /**
41
+ * A struct which can be represented as a JavaScript object (RemoteImage).
42
+ */
43
+ struct RemoteImage final {
44
+ public:
45
+ std::string uri SWIFT_PRIVATE;
46
+ std::optional<NitroColor> color SWIFT_PRIVATE;
47
+ std::optional<double> timeoutMs SWIFT_PRIVATE;
48
+
49
+ public:
50
+ RemoteImage() = default;
51
+ explicit RemoteImage(std::string uri, std::optional<NitroColor> color, std::optional<double> timeoutMs): uri(uri), color(color), timeoutMs(timeoutMs) {}
52
+
53
+ public:
54
+ friend bool operator==(const RemoteImage& lhs, const RemoteImage& rhs) = default;
55
+ };
56
+
57
+ } // namespace margelo::nitro::swe::iternio::reactnativeautoplay
58
+
59
+ namespace margelo::nitro {
60
+
61
+ // C++ RemoteImage <> JS RemoteImage (object)
62
+ template <>
63
+ struct JSIConverter<margelo::nitro::swe::iternio::reactnativeautoplay::RemoteImage> final {
64
+ static inline margelo::nitro::swe::iternio::reactnativeautoplay::RemoteImage fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
65
+ jsi::Object obj = arg.asObject(runtime);
66
+ return margelo::nitro::swe::iternio::reactnativeautoplay::RemoteImage(
67
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "uri"))),
68
+ JSIConverter<std::optional<margelo::nitro::swe::iternio::reactnativeautoplay::NitroColor>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "color"))),
69
+ JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "timeoutMs")))
70
+ );
71
+ }
72
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::swe::iternio::reactnativeautoplay::RemoteImage& arg) {
73
+ jsi::Object obj(runtime);
74
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "uri"), JSIConverter<std::string>::toJSI(runtime, arg.uri));
75
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "color"), JSIConverter<std::optional<margelo::nitro::swe::iternio::reactnativeautoplay::NitroColor>>::toJSI(runtime, arg.color));
76
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "timeoutMs"), JSIConverter<std::optional<double>>::toJSI(runtime, arg.timeoutMs));
77
+ return obj;
78
+ }
79
+ static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
80
+ if (!value.isObject()) {
81
+ return false;
82
+ }
83
+ jsi::Object obj = value.getObject(runtime);
84
+ if (!nitro::isPlainObject(runtime, obj)) {
85
+ return false;
86
+ }
87
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "uri")))) return false;
88
+ if (!JSIConverter<std::optional<margelo::nitro::swe::iternio::reactnativeautoplay::NitroColor>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "color")))) return false;
89
+ if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "timeoutMs")))) return false;
90
+ return true;
91
+ }
92
+ };
93
+
94
+ } // namespace margelo::nitro
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iternio/react-native-auto-play",
3
- "version": "0.3.11",
3
+ "version": "0.3.12",
4
4
  "description": "Android Auto and Apple CarPlay for react-native",
5
5
  "main": "lib/index",
6
6
  "module": "lib/index",