@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
@@ -1,19 +1,80 @@
1
1
  import { Image } from 'react-native';
2
- import { glyphMap } from '../types/Glyphmap';
3
2
  import { NitroColorUtil } from './NitroColor';
3
+ let _iconFont;
4
+ let _glyphMap;
5
+ /**
6
+ * Register the icon font and (optionally) a glyph map for name-based lookups.
7
+ * Must be called **once** before creating any templates. Subsequent calls are ignored.
8
+ *
9
+ * The font name maps directly to a native font asset:
10
+ * - **Android** — `res/font/<name>.ttf` (must be lowercase)
11
+ * - **iOS** — `<name>.ttf` in the app bundle (registered via CoreText automatically)
12
+ *
13
+ * For cross-platform compatibility use lowercase with underscores only.
14
+ *
15
+ * @param name Native font asset name (without extension).
16
+ * @param glyphMap Optional map of glyph names to Unicode code points.
17
+ * When provided, glyphs can use `{ type: 'glyph', name: 'icon_name' }`.
18
+ *
19
+ * @example
20
+ * ```ts
21
+ * import { glyphMap } from './assets/Glyphmap';
22
+ * setIconFont('material_symbols', glyphMap);
23
+ * ```
24
+ */
25
+ export function setIconFont(name, glyphMap) {
26
+ if (_iconFont != null) {
27
+ return;
28
+ }
29
+ _iconFont = name;
30
+ _glyphMap = glyphMap;
31
+ }
32
+ function getIconFont() {
33
+ if (_iconFont == null) {
34
+ throw new Error('No icon font configured. Call setIconFont("your_font_name") before using glyph images.');
35
+ }
36
+ return _iconFont;
37
+ }
38
+ function resolveGlyph(image) {
39
+ if ('name' in image && image.name !== undefined) {
40
+ if (image.codepoint !== undefined) {
41
+ return image.codepoint;
42
+ }
43
+ if (_glyphMap == null) {
44
+ throw new Error(`Glyph name "${image.name}" used but no glyph map was provided to setIconFont().`);
45
+ }
46
+ const cp = _glyphMap[image.name];
47
+ if (cp === undefined) {
48
+ throw new Error(`Glyph name "${image.name}" not found in the glyph map.`);
49
+ }
50
+ return cp;
51
+ }
52
+ if (image.codepoint !== undefined) {
53
+ return image.codepoint;
54
+ }
55
+ throw new Error('Glyph image must provide either `name` or `codepoint`.');
56
+ }
4
57
  function convert(image) {
5
58
  if (image == null) {
6
59
  return undefined;
7
60
  }
8
61
  if (image.type === 'glyph') {
9
- const { color = { darkColor: 'white', lightColor: 'black' }, fontScale, name, backgroundColor = 'transparent', } = image;
62
+ const { color = { darkColor: 'white', lightColor: 'black' }, fontScale, backgroundColor = 'transparent', } = image;
10
63
  return {
11
- glyph: glyphMap[name],
64
+ glyph: resolveGlyph(image),
65
+ fontName: getIconFont(),
12
66
  color: NitroColorUtil.convert(color),
13
67
  backgroundColor: NitroColorUtil.convert(backgroundColor),
14
68
  fontScale,
15
69
  };
16
70
  }
71
+ if (image.type === 'remote') {
72
+ return {
73
+ uri: image.uri,
74
+ color: NitroColorUtil.convert(image.color),
75
+ timeoutMs: image.timeoutMs,
76
+ };
77
+ }
17
78
  // Image.resolveAssetSource is pretty terrible, it will simply return whatever object you pass it is not a number [require(...)]
18
79
  // so the input allows all optional parameters which are returned as is even though
19
80
  // the return type claims to not have any optional parameters...
@@ -49,7 +49,7 @@ target_sources(
49
49
  ../nitrogen/generated/android/c++/JHybridAndroidAutomotiveSpec.cpp
50
50
  ../nitrogen/generated/android/c++/JHybridAndroidAutoTelemetrySpec.cpp
51
51
  ../nitrogen/generated/android/c++/JHybridAutoPlaySpec.cpp
52
- ../nitrogen/generated/android/c++/JVariant_GlyphImage_AssetImage.cpp
52
+ ../nitrogen/generated/android/c++/JVariant_GlyphImage_AssetImage_RemoteImage.cpp
53
53
  ../nitrogen/generated/android/c++/JHybridClusterSpec.cpp
54
54
  ../nitrogen/generated/android/c++/JNitroImage.cpp
55
55
  ../nitrogen/generated/android/c++/JHybridGridTemplateSpec.cpp
@@ -13,6 +13,7 @@
13
13
  #include "JNitroColor.hpp"
14
14
  #include "NitroColor.hpp"
15
15
  #include <optional>
16
+ #include <string>
16
17
 
17
18
  namespace margelo::nitro::swe::iternio::reactnativeautoplay {
18
19
 
@@ -35,6 +36,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
35
36
  static const auto clazz = javaClassStatic();
36
37
  static const auto fieldGlyph = clazz->getField<double>("glyph");
37
38
  double glyph = this->getFieldValue(fieldGlyph);
39
+ static const auto fieldFontName = clazz->getField<jni::JString>("fontName");
40
+ jni::local_ref<jni::JString> fontName = this->getFieldValue(fieldFontName);
38
41
  static const auto fieldColor = clazz->getField<JNitroColor>("color");
39
42
  jni::local_ref<JNitroColor> color = this->getFieldValue(fieldColor);
40
43
  static const auto fieldBackgroundColor = clazz->getField<JNitroColor>("backgroundColor");
@@ -43,6 +46,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
43
46
  jni::local_ref<jni::JDouble> fontScale = this->getFieldValue(fieldFontScale);
44
47
  return GlyphImage(
45
48
  glyph,
49
+ fontName->toStdString(),
46
50
  color->toCpp(),
47
51
  backgroundColor->toCpp(),
48
52
  fontScale != nullptr ? std::make_optional(fontScale->value()) : std::nullopt
@@ -55,12 +59,13 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
55
59
  */
56
60
  [[maybe_unused]]
57
61
  static jni::local_ref<JGlyphImage::javaobject> fromCpp(const GlyphImage& value) {
58
- using JSignature = JGlyphImage(double, jni::alias_ref<JNitroColor>, jni::alias_ref<JNitroColor>, jni::alias_ref<jni::JDouble>);
62
+ using JSignature = JGlyphImage(double, jni::alias_ref<jni::JString>, jni::alias_ref<JNitroColor>, jni::alias_ref<JNitroColor>, jni::alias_ref<jni::JDouble>);
59
63
  static const auto clazz = javaClassStatic();
60
64
  static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
61
65
  return create(
62
66
  clazz,
63
67
  value.glyph,
68
+ jni::make_jstring(value.fontName),
64
69
  JNitroColor::fromCpp(value.color),
65
70
  JNitroColor::fromCpp(value.backgroundColor),
66
71
  value.fontScale.has_value() ? jni::JDouble::valueOf(value.fontScale.value()) : nullptr
@@ -33,7 +33,8 @@
33
33
  #include "JNitroImage.hpp"
34
34
  #include "JNitroMapButton.hpp"
35
35
  #include "JNitroMapButtonType.hpp"
36
- #include "JVariant_GlyphImage_AssetImage.hpp"
36
+ #include "JRemoteImage.hpp"
37
+ #include "JVariant_GlyphImage_AssetImage_RemoteImage.hpp"
37
38
  #include "NitroAction.hpp"
38
39
  #include "NitroActionType.hpp"
39
40
  #include "NitroAlignment.hpp"
@@ -43,6 +44,7 @@
43
44
  #include "NitroGridButton.hpp"
44
45
  #include "NitroMapButton.hpp"
45
46
  #include "NitroMapButtonType.hpp"
47
+ #include "RemoteImage.hpp"
46
48
  #include <NitroModules/JNICallable.hpp>
47
49
  #include <functional>
48
50
  #include <optional>
@@ -21,6 +21,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroAction
21
21
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct GlyphImage; }
22
22
  // Forward declaration of `AssetImage` to properly resolve imports.
23
23
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct AssetImage; }
24
+ // Forward declaration of `RemoteImage` to properly resolve imports.
25
+ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct RemoteImage; }
24
26
  // Forward declaration of `NitroColor` to properly resolve imports.
25
27
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroColor; }
26
28
  // Forward declaration of `NitroActionType` to properly resolve imports.
@@ -35,6 +37,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class NitroBu
35
37
  #include <NitroModules/JNICallable.hpp>
36
38
  #include <NitroModules/Promise.hpp>
37
39
  #include <NitroModules/JPromise.hpp>
40
+ #include <NitroModules/ArrayBuffer.hpp>
41
+ #include <NitroModules/JArrayBuffer.hpp>
38
42
  #include <NitroModules/JUnit.hpp>
39
43
  #include "EventName.hpp"
40
44
  #include "JEventName.hpp"
@@ -54,12 +58,14 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class NitroBu
54
58
  #include "JNitroAction.hpp"
55
59
  #include "GlyphImage.hpp"
56
60
  #include "AssetImage.hpp"
61
+ #include "RemoteImage.hpp"
57
62
  #include <variant>
58
- #include "JVariant_GlyphImage_AssetImage.hpp"
63
+ #include "JVariant_GlyphImage_AssetImage_RemoteImage.hpp"
59
64
  #include "JGlyphImage.hpp"
60
65
  #include "NitroColor.hpp"
61
66
  #include "JNitroColor.hpp"
62
67
  #include "JAssetImage.hpp"
68
+ #include "JRemoteImage.hpp"
63
69
  #include "NitroActionType.hpp"
64
70
  #include "JNitroActionType.hpp"
65
71
  #include "NitroAlignment.hpp"
@@ -139,6 +145,47 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
139
145
  }
140
146
  }();
141
147
  }
148
+ bool JHybridAutoPlaySpec::hasVoiceInputPermission() {
149
+ static const auto method = _javaPart->javaClassStatic()->getMethod<jboolean()>("hasVoiceInputPermission");
150
+ auto __result = method(_javaPart);
151
+ return static_cast<bool>(__result);
152
+ }
153
+ std::shared_ptr<Promise<bool>> JHybridAutoPlaySpec::requestVoiceInputPermission() {
154
+ static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JPromise::javaobject>()>("requestVoiceInputPermission");
155
+ auto __result = method(_javaPart);
156
+ return [&]() {
157
+ auto __promise = Promise<bool>::create();
158
+ __result->cthis()->addOnResolvedListener([=](const jni::alias_ref<jni::JObject>& __boxedResult) {
159
+ auto __result = jni::static_ref_cast<jni::JBoolean>(__boxedResult);
160
+ __promise->resolve(static_cast<bool>(__result->value()));
161
+ });
162
+ __result->cthis()->addOnRejectedListener([=](const jni::alias_ref<jni::JThrowable>& __throwable) {
163
+ jni::JniException __jniError(__throwable);
164
+ __promise->reject(std::make_exception_ptr(__jniError));
165
+ });
166
+ return __promise;
167
+ }();
168
+ }
169
+ std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>> JHybridAutoPlaySpec::startVoiceInput(std::optional<double> silenceThresholdMs, std::optional<double> maxDurationMs, const std::optional<std::string>& listeningText) {
170
+ static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JPromise::javaobject>(jni::alias_ref<jni::JDouble> /* silenceThresholdMs */, jni::alias_ref<jni::JDouble> /* maxDurationMs */, jni::alias_ref<jni::JString> /* listeningText */)>("startVoiceInput");
171
+ auto __result = method(_javaPart, silenceThresholdMs.has_value() ? jni::JDouble::valueOf(silenceThresholdMs.value()) : nullptr, maxDurationMs.has_value() ? jni::JDouble::valueOf(maxDurationMs.value()) : nullptr, listeningText.has_value() ? jni::make_jstring(listeningText.value()) : nullptr);
172
+ return [&]() {
173
+ auto __promise = Promise<std::shared_ptr<ArrayBuffer>>::create();
174
+ __result->cthis()->addOnResolvedListener([=](const jni::alias_ref<jni::JObject>& __boxedResult) {
175
+ auto __result = jni::static_ref_cast<JArrayBuffer::javaobject>(__boxedResult);
176
+ __promise->resolve(__result->cthis()->getArrayBuffer());
177
+ });
178
+ __result->cthis()->addOnRejectedListener([=](const jni::alias_ref<jni::JThrowable>& __throwable) {
179
+ jni::JniException __jniError(__throwable);
180
+ __promise->reject(std::make_exception_ptr(__jniError));
181
+ });
182
+ return __promise;
183
+ }();
184
+ }
185
+ void JHybridAutoPlaySpec::stopVoiceInput() {
186
+ static const auto method = _javaPart->javaClassStatic()->getMethod<void()>("stopVoiceInput");
187
+ method(_javaPart);
188
+ }
142
189
  std::shared_ptr<Promise<void>> JHybridAutoPlaySpec::setRootTemplate(const std::string& templateId) {
143
190
  static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JPromise::javaobject>(jni::alias_ref<jni::JString> /* templateId */)>("setRootTemplate");
144
191
  auto __result = method(_javaPart, jni::make_jstring(templateId));
@@ -57,6 +57,10 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
57
57
  std::function<void()> addListener(EventName eventType, const std::function<void()>& callback) override;
58
58
  std::function<void()> addListenerRenderState(const std::string& moduleName, const std::function<void(VisibilityState /* payload */)>& callback) override;
59
59
  std::function<void()> addListenerVoiceInput(const std::function<void(const std::optional<Location>& /* coordinates */, const std::optional<std::string>& /* query */)>& callback) override;
60
+ bool hasVoiceInputPermission() override;
61
+ std::shared_ptr<Promise<bool>> requestVoiceInputPermission() override;
62
+ std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>> startVoiceInput(std::optional<double> silenceThresholdMs, std::optional<double> maxDurationMs, const std::optional<std::string>& listeningText) override;
63
+ void stopVoiceInput() override;
60
64
  std::shared_ptr<Promise<void>> setRootTemplate(const std::string& templateId) override;
61
65
  std::shared_ptr<Promise<void>> pushTemplate(const std::string& templateId) override;
62
66
  std::shared_ptr<Promise<void>> popTemplate(std::optional<bool> animate) override;
@@ -17,6 +17,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroAttrib
17
17
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct GlyphImage; }
18
18
  // Forward declaration of `AssetImage` to properly resolve imports.
19
19
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct AssetImage; }
20
+ // Forward declaration of `RemoteImage` to properly resolve imports.
21
+ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct RemoteImage; }
20
22
  // Forward declaration of `NitroColor` to properly resolve imports.
21
23
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroColor; }
22
24
  // Forward declaration of `ColorScheme` to properly resolve imports.
@@ -42,12 +44,14 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class ZoomEve
42
44
  #include "JNitroAttributedStringImage.hpp"
43
45
  #include "GlyphImage.hpp"
44
46
  #include "AssetImage.hpp"
47
+ #include "RemoteImage.hpp"
45
48
  #include <variant>
46
49
  #include "JNitroImage.hpp"
47
50
  #include "JGlyphImage.hpp"
48
51
  #include "NitroColor.hpp"
49
52
  #include "JNitroColor.hpp"
50
53
  #include "JAssetImage.hpp"
54
+ #include "JRemoteImage.hpp"
51
55
  #include "ColorScheme.hpp"
52
56
  #include "JFunc_void_std__string_ColorScheme.hpp"
53
57
  #include "JColorScheme.hpp"
@@ -15,6 +15,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroAction
15
15
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct GlyphImage; }
16
16
  // Forward declaration of `AssetImage` to properly resolve imports.
17
17
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct AssetImage; }
18
+ // Forward declaration of `RemoteImage` to properly resolve imports.
19
+ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct RemoteImage; }
18
20
  // Forward declaration of `NitroColor` to properly resolve imports.
19
21
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroColor; }
20
22
  // Forward declaration of `NitroActionType` to properly resolve imports.
@@ -54,12 +56,14 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class NitroMa
54
56
  #include "JNitroAction.hpp"
55
57
  #include "GlyphImage.hpp"
56
58
  #include "AssetImage.hpp"
59
+ #include "RemoteImage.hpp"
57
60
  #include <variant>
58
- #include "JVariant_GlyphImage_AssetImage.hpp"
61
+ #include "JVariant_GlyphImage_AssetImage_RemoteImage.hpp"
59
62
  #include "JGlyphImage.hpp"
60
63
  #include "NitroColor.hpp"
61
64
  #include "JNitroColor.hpp"
62
65
  #include "JAssetImage.hpp"
66
+ #include "JRemoteImage.hpp"
63
67
  #include "NitroActionType.hpp"
64
68
  #include "JNitroActionType.hpp"
65
69
  #include "NitroAlignment.hpp"
@@ -15,6 +15,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroAction
15
15
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct GlyphImage; }
16
16
  // Forward declaration of `AssetImage` to properly resolve imports.
17
17
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct AssetImage; }
18
+ // Forward declaration of `RemoteImage` to properly resolve imports.
19
+ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct RemoteImage; }
18
20
  // Forward declaration of `NitroColor` to properly resolve imports.
19
21
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroColor; }
20
22
  // Forward declaration of `NitroActionType` to properly resolve imports.
@@ -58,12 +60,14 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class NitroMa
58
60
  #include "JNitroAction.hpp"
59
61
  #include "GlyphImage.hpp"
60
62
  #include "AssetImage.hpp"
63
+ #include "RemoteImage.hpp"
61
64
  #include <variant>
62
- #include "JVariant_GlyphImage_AssetImage.hpp"
65
+ #include "JVariant_GlyphImage_AssetImage_RemoteImage.hpp"
63
66
  #include "JGlyphImage.hpp"
64
67
  #include "NitroColor.hpp"
65
68
  #include "JNitroColor.hpp"
66
69
  #include "JAssetImage.hpp"
70
+ #include "JRemoteImage.hpp"
67
71
  #include "NitroActionType.hpp"
68
72
  #include "JNitroActionType.hpp"
69
73
  #include "NitroAlignment.hpp"
@@ -15,6 +15,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroAction
15
15
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct GlyphImage; }
16
16
  // Forward declaration of `AssetImage` to properly resolve imports.
17
17
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct AssetImage; }
18
+ // Forward declaration of `RemoteImage` to properly resolve imports.
19
+ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct RemoteImage; }
18
20
  // Forward declaration of `NitroColor` to properly resolve imports.
19
21
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroColor; }
20
22
  // Forward declaration of `NitroActionType` to properly resolve imports.
@@ -58,12 +60,14 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class NitroMa
58
60
  #include "JNitroAction.hpp"
59
61
  #include "GlyphImage.hpp"
60
62
  #include "AssetImage.hpp"
63
+ #include "RemoteImage.hpp"
61
64
  #include <variant>
62
- #include "JVariant_GlyphImage_AssetImage.hpp"
65
+ #include "JVariant_GlyphImage_AssetImage_RemoteImage.hpp"
63
66
  #include "JGlyphImage.hpp"
64
67
  #include "NitroColor.hpp"
65
68
  #include "JNitroColor.hpp"
66
69
  #include "JAssetImage.hpp"
70
+ #include "JRemoteImage.hpp"
67
71
  #include "NitroActionType.hpp"
68
72
  #include "JNitroActionType.hpp"
69
73
  #include "NitroAlignment.hpp"
@@ -25,6 +25,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class NitroMa
25
25
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct GlyphImage; }
26
26
  // Forward declaration of `AssetImage` to properly resolve imports.
27
27
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct AssetImage; }
28
+ // Forward declaration of `RemoteImage` to properly resolve imports.
29
+ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct RemoteImage; }
28
30
  // Forward declaration of `NitroColor` to properly resolve imports.
29
31
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroColor; }
30
32
  // Forward declaration of `NitroAction` to properly resolve imports.
@@ -127,15 +129,17 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class Maneuve
127
129
  #include "JNitroMapButtonType.hpp"
128
130
  #include "GlyphImage.hpp"
129
131
  #include "AssetImage.hpp"
132
+ #include "RemoteImage.hpp"
130
133
  #include <variant>
131
134
  #include "JNitroImage.hpp"
132
135
  #include "JGlyphImage.hpp"
133
136
  #include "NitroColor.hpp"
134
137
  #include "JNitroColor.hpp"
135
138
  #include "JAssetImage.hpp"
139
+ #include "JRemoteImage.hpp"
136
140
  #include "NitroAction.hpp"
137
141
  #include "JNitroAction.hpp"
138
- #include "JVariant_GlyphImage_AssetImage.hpp"
142
+ #include "JVariant_GlyphImage_AssetImage_RemoteImage.hpp"
139
143
  #include "NitroActionType.hpp"
140
144
  #include "JNitroActionType.hpp"
141
145
  #include "NitroAlignment.hpp"
@@ -15,6 +15,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroAction
15
15
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct GlyphImage; }
16
16
  // Forward declaration of `AssetImage` to properly resolve imports.
17
17
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct AssetImage; }
18
+ // Forward declaration of `RemoteImage` to properly resolve imports.
19
+ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct RemoteImage; }
18
20
  // Forward declaration of `NitroColor` to properly resolve imports.
19
21
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroColor; }
20
22
  // Forward declaration of `NitroActionType` to properly resolve imports.
@@ -49,12 +51,14 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class NitroMa
49
51
  #include "JNitroAction.hpp"
50
52
  #include "GlyphImage.hpp"
51
53
  #include "AssetImage.hpp"
54
+ #include "RemoteImage.hpp"
52
55
  #include <variant>
53
- #include "JVariant_GlyphImage_AssetImage.hpp"
56
+ #include "JVariant_GlyphImage_AssetImage_RemoteImage.hpp"
54
57
  #include "JGlyphImage.hpp"
55
58
  #include "NitroColor.hpp"
56
59
  #include "JNitroColor.hpp"
57
60
  #include "JAssetImage.hpp"
61
+ #include "JRemoteImage.hpp"
58
62
  #include "NitroActionType.hpp"
59
63
  #include "JNitroActionType.hpp"
60
64
  #include "NitroAlignment.hpp"
@@ -15,6 +15,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroAction
15
15
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct GlyphImage; }
16
16
  // Forward declaration of `AssetImage` to properly resolve imports.
17
17
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct AssetImage; }
18
+ // Forward declaration of `RemoteImage` to properly resolve imports.
19
+ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct RemoteImage; }
18
20
  // Forward declaration of `NitroColor` to properly resolve imports.
19
21
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroColor; }
20
22
  // Forward declaration of `NitroActionType` to properly resolve imports.
@@ -52,12 +54,14 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class NitroSe
52
54
  #include "JNitroAction.hpp"
53
55
  #include "GlyphImage.hpp"
54
56
  #include "AssetImage.hpp"
57
+ #include "RemoteImage.hpp"
55
58
  #include <variant>
56
- #include "JVariant_GlyphImage_AssetImage.hpp"
59
+ #include "JVariant_GlyphImage_AssetImage_RemoteImage.hpp"
57
60
  #include "JGlyphImage.hpp"
58
61
  #include "NitroColor.hpp"
59
62
  #include "JNitroColor.hpp"
60
63
  #include "JAssetImage.hpp"
64
+ #include "JRemoteImage.hpp"
61
65
  #include "NitroActionType.hpp"
62
66
  #include "JNitroActionType.hpp"
63
67
  #include "NitroAlignment.hpp"
@@ -31,6 +31,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroAction
31
31
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct GlyphImage; }
32
32
  // Forward declaration of `AssetImage` to properly resolve imports.
33
33
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct AssetImage; }
34
+ // Forward declaration of `RemoteImage` to properly resolve imports.
35
+ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct RemoteImage; }
34
36
  // Forward declaration of `NitroColor` to properly resolve imports.
35
37
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroColor; }
36
38
  // Forward declaration of `NitroActionType` to properly resolve imports.
@@ -76,11 +78,13 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class NitroBu
76
78
  #include "JNitroAction.hpp"
77
79
  #include "GlyphImage.hpp"
78
80
  #include "AssetImage.hpp"
79
- #include "JVariant_GlyphImage_AssetImage.hpp"
81
+ #include "RemoteImage.hpp"
82
+ #include "JVariant_GlyphImage_AssetImage_RemoteImage.hpp"
80
83
  #include "JGlyphImage.hpp"
81
84
  #include "NitroColor.hpp"
82
85
  #include "JNitroColor.hpp"
83
86
  #include "JAssetImage.hpp"
87
+ #include "JRemoteImage.hpp"
84
88
  #include "NitroActionType.hpp"
85
89
  #include "JNitroActionType.hpp"
86
90
  #include "NitroAlignment.hpp"
@@ -16,7 +16,9 @@
16
16
  #include "JGlyphImage.hpp"
17
17
  #include "JNitroColor.hpp"
18
18
  #include "JNitroImage.hpp"
19
+ #include "JRemoteImage.hpp"
19
20
  #include "NitroColor.hpp"
21
+ #include "RemoteImage.hpp"
20
22
  #include <optional>
21
23
  #include <string>
22
24
  #include <variant>
@@ -35,7 +35,8 @@
35
35
  #include "JNitroRow.hpp"
36
36
  #include "JNitroSection.hpp"
37
37
  #include "JNitroSectionType.hpp"
38
- #include "JVariant_GlyphImage_AssetImage.hpp"
38
+ #include "JRemoteImage.hpp"
39
+ #include "JVariant_GlyphImage_AssetImage_RemoteImage.hpp"
39
40
  #include "NitroAction.hpp"
40
41
  #include "NitroActionType.hpp"
41
42
  #include "NitroAlignment.hpp"
@@ -47,6 +48,7 @@
47
48
  #include "NitroRow.hpp"
48
49
  #include "NitroSection.hpp"
49
50
  #include "NitroSectionType.hpp"
51
+ #include "RemoteImage.hpp"
50
52
  #include <NitroModules/JNICallable.hpp>
51
53
  #include <functional>
52
54
  #include <optional>
@@ -19,9 +19,11 @@
19
19
  #include "JNitroColor.hpp"
20
20
  #include "JNitroImage.hpp"
21
21
  #include "JPreferredImageLane.hpp"
22
+ #include "JRemoteImage.hpp"
22
23
  #include "JVariant_PreferredImageLane_ImageLane.hpp"
23
24
  #include "NitroColor.hpp"
24
25
  #include "PreferredImageLane.hpp"
26
+ #include "RemoteImage.hpp"
25
27
  #include <optional>
26
28
  #include <string>
27
29
  #include <variant>
@@ -35,7 +35,8 @@
35
35
  #include "JNitroRow.hpp"
36
36
  #include "JNitroSection.hpp"
37
37
  #include "JNitroSectionType.hpp"
38
- #include "JVariant_GlyphImage_AssetImage.hpp"
38
+ #include "JRemoteImage.hpp"
39
+ #include "JVariant_GlyphImage_AssetImage_RemoteImage.hpp"
39
40
  #include "NitroAction.hpp"
40
41
  #include "NitroActionType.hpp"
41
42
  #include "NitroAlignment.hpp"
@@ -47,6 +48,7 @@
47
48
  #include "NitroRow.hpp"
48
49
  #include "NitroSection.hpp"
49
50
  #include "NitroSectionType.hpp"
51
+ #include "RemoteImage.hpp"
50
52
  #include <NitroModules/JNICallable.hpp>
51
53
  #include <functional>
52
54
  #include <optional>
@@ -32,7 +32,8 @@
32
32
  #include "JNitroMapButton.hpp"
33
33
  #include "JNitroMapButtonType.hpp"
34
34
  #include "JPoint.hpp"
35
- #include "JVariant_GlyphImage_AssetImage.hpp"
35
+ #include "JRemoteImage.hpp"
36
+ #include "JVariant_GlyphImage_AssetImage_RemoteImage.hpp"
36
37
  #include "JVisibleTravelEstimate.hpp"
37
38
  #include "NitroAction.hpp"
38
39
  #include "NitroActionType.hpp"
@@ -42,6 +43,7 @@
42
43
  #include "NitroMapButton.hpp"
43
44
  #include "NitroMapButtonType.hpp"
44
45
  #include "Point.hpp"
46
+ #include "RemoteImage.hpp"
45
47
  #include "VisibleTravelEstimate.hpp"
46
48
  #include <NitroModules/JNICallable.hpp>
47
49
  #include <functional>
@@ -32,7 +32,8 @@
32
32
  #include "JNitroImage.hpp"
33
33
  #include "JNitroMapButton.hpp"
34
34
  #include "JNitroMapButtonType.hpp"
35
- #include "JVariant_GlyphImage_AssetImage.hpp"
35
+ #include "JRemoteImage.hpp"
36
+ #include "JVariant_GlyphImage_AssetImage_RemoteImage.hpp"
36
37
  #include "NitroAction.hpp"
37
38
  #include "NitroActionType.hpp"
38
39
  #include "NitroAlignment.hpp"
@@ -41,6 +42,7 @@
41
42
  #include "NitroColor.hpp"
42
43
  #include "NitroMapButton.hpp"
43
44
  #include "NitroMapButtonType.hpp"
45
+ #include "RemoteImage.hpp"
44
46
  #include <NitroModules/JNICallable.hpp>
45
47
  #include <functional>
46
48
  #include <optional>
@@ -89,8 +91,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
89
91
  jni::local_ref<JAutoText> message = this->getFieldValue(fieldMessage);
90
92
  static const auto fieldActions = clazz->getField<jni::JArrayClass<JNitroAction>>("actions");
91
93
  jni::local_ref<jni::JArrayClass<JNitroAction>> actions = this->getFieldValue(fieldActions);
92
- static const auto fieldImage = clazz->getField<JVariant_GlyphImage_AssetImage>("image");
93
- jni::local_ref<JVariant_GlyphImage_AssetImage> image = this->getFieldValue(fieldImage);
94
+ static const auto fieldImage = clazz->getField<JVariant_GlyphImage_AssetImage_RemoteImage>("image");
95
+ jni::local_ref<JVariant_GlyphImage_AssetImage_RemoteImage> image = this->getFieldValue(fieldImage);
94
96
  static const auto fieldMapConfig = clazz->getField<JNitroBaseMapTemplateConfig>("mapConfig");
95
97
  jni::local_ref<JNitroBaseMapTemplateConfig> mapConfig = this->getFieldValue(fieldMapConfig);
96
98
  return MessageTemplateConfig(
@@ -174,7 +176,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
174
176
  */
175
177
  [[maybe_unused]]
176
178
  static jni::local_ref<JMessageTemplateConfig::javaobject> fromCpp(const MessageTemplateConfig& value) {
177
- using JSignature = JMessageTemplateConfig(jni::alias_ref<jni::JString>, jni::alias_ref<JFunc_void_std__optional_bool_::javaobject>, jni::alias_ref<JFunc_void_std__optional_bool_::javaobject>, jni::alias_ref<JFunc_void_std__optional_bool_::javaobject>, jni::alias_ref<JFunc_void_std__optional_bool_::javaobject>, jni::alias_ref<JFunc_void::javaobject>, jni::alias_ref<jni::JDouble>, jni::alias_ref<jni::JArrayClass<JNitroAction>>, jni::alias_ref<JAutoText>, jni::alias_ref<JAutoText>, jni::alias_ref<jni::JArrayClass<JNitroAction>>, jni::alias_ref<JVariant_GlyphImage_AssetImage>, jni::alias_ref<JNitroBaseMapTemplateConfig>);
179
+ using JSignature = JMessageTemplateConfig(jni::alias_ref<jni::JString>, jni::alias_ref<JFunc_void_std__optional_bool_::javaobject>, jni::alias_ref<JFunc_void_std__optional_bool_::javaobject>, jni::alias_ref<JFunc_void_std__optional_bool_::javaobject>, jni::alias_ref<JFunc_void_std__optional_bool_::javaobject>, jni::alias_ref<JFunc_void::javaobject>, jni::alias_ref<jni::JDouble>, jni::alias_ref<jni::JArrayClass<JNitroAction>>, jni::alias_ref<JAutoText>, jni::alias_ref<JAutoText>, jni::alias_ref<jni::JArrayClass<JNitroAction>>, jni::alias_ref<JVariant_GlyphImage_AssetImage_RemoteImage>, jni::alias_ref<JNitroBaseMapTemplateConfig>);
178
180
  static const auto clazz = javaClassStatic();
179
181
  static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
180
182
  return create(
@@ -208,7 +210,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
208
210
  }
209
211
  return __array;
210
212
  }() : nullptr,
211
- value.image.has_value() ? JVariant_GlyphImage_AssetImage::fromCpp(value.image.value()) : nullptr,
213
+ value.image.has_value() ? JVariant_GlyphImage_AssetImage_RemoteImage::fromCpp(value.image.value()) : nullptr,
212
214
  value.mapConfig.has_value() ? JNitroBaseMapTemplateConfig::fromCpp(value.mapConfig.value()) : nullptr
213
215
  );
214
216
  }
@@ -19,11 +19,13 @@
19
19
  #include "JNitroAlignment.hpp"
20
20
  #include "JNitroButtonStyle.hpp"
21
21
  #include "JNitroColor.hpp"
22
- #include "JVariant_GlyphImage_AssetImage.hpp"
22
+ #include "JRemoteImage.hpp"
23
+ #include "JVariant_GlyphImage_AssetImage_RemoteImage.hpp"
23
24
  #include "NitroActionType.hpp"
24
25
  #include "NitroAlignment.hpp"
25
26
  #include "NitroButtonStyle.hpp"
26
27
  #include "NitroColor.hpp"
28
+ #include "RemoteImage.hpp"
27
29
  #include <NitroModules/JNICallable.hpp>
28
30
  #include <functional>
29
31
  #include <optional>
@@ -51,8 +53,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
51
53
  static const auto clazz = javaClassStatic();
52
54
  static const auto fieldTitle = clazz->getField<jni::JString>("title");
53
55
  jni::local_ref<jni::JString> title = this->getFieldValue(fieldTitle);
54
- static const auto fieldImage = clazz->getField<JVariant_GlyphImage_AssetImage>("image");
55
- jni::local_ref<JVariant_GlyphImage_AssetImage> image = this->getFieldValue(fieldImage);
56
+ static const auto fieldImage = clazz->getField<JVariant_GlyphImage_AssetImage_RemoteImage>("image");
57
+ jni::local_ref<JVariant_GlyphImage_AssetImage_RemoteImage> image = this->getFieldValue(fieldImage);
56
58
  static const auto fieldEnabled = clazz->getField<jni::JBoolean>("enabled");
57
59
  jni::local_ref<jni::JBoolean> enabled = this->getFieldValue(fieldEnabled);
58
60
  static const auto fieldOnPress = clazz->getField<JFunc_void::javaobject>("onPress");
@@ -91,13 +93,13 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
91
93
  */
92
94
  [[maybe_unused]]
93
95
  static jni::local_ref<JNitroAction::javaobject> fromCpp(const NitroAction& value) {
94
- using JSignature = JNitroAction(jni::alias_ref<jni::JString>, jni::alias_ref<JVariant_GlyphImage_AssetImage>, jni::alias_ref<jni::JBoolean>, jni::alias_ref<JFunc_void::javaobject>, jni::alias_ref<JNitroActionType>, jni::alias_ref<JNitroAlignment>, jni::alias_ref<jni::JDouble>, jni::alias_ref<JNitroButtonStyle>);
96
+ using JSignature = JNitroAction(jni::alias_ref<jni::JString>, jni::alias_ref<JVariant_GlyphImage_AssetImage_RemoteImage>, jni::alias_ref<jni::JBoolean>, jni::alias_ref<JFunc_void::javaobject>, jni::alias_ref<JNitroActionType>, jni::alias_ref<JNitroAlignment>, jni::alias_ref<jni::JDouble>, jni::alias_ref<JNitroButtonStyle>);
95
97
  static const auto clazz = javaClassStatic();
96
98
  static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
97
99
  return create(
98
100
  clazz,
99
101
  value.title.has_value() ? jni::make_jstring(value.title.value()) : nullptr,
100
- value.image.has_value() ? JVariant_GlyphImage_AssetImage::fromCpp(value.image.value()) : nullptr,
102
+ value.image.has_value() ? JVariant_GlyphImage_AssetImage_RemoteImage::fromCpp(value.image.value()) : nullptr,
101
103
  value.enabled.has_value() ? jni::JBoolean::valueOf(value.enabled.value()) : nullptr,
102
104
  JFunc_void_cxx::fromCpp(value.onPress),
103
105
  JNitroActionType::fromCpp(value.type),
@@ -17,8 +17,10 @@
17
17
  #include "JNitroAttributedStringImage.hpp"
18
18
  #include "JNitroColor.hpp"
19
19
  #include "JNitroImage.hpp"
20
+ #include "JRemoteImage.hpp"
20
21
  #include "NitroAttributedStringImage.hpp"
21
22
  #include "NitroColor.hpp"
23
+ #include "RemoteImage.hpp"
22
24
  #include <optional>
23
25
  #include <string>
24
26
  #include <variant>