react-native-google-maps-plus 0.1.0 → 1.0.0-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (197) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +156 -0
  3. package/RNGoogleMapsPlus.podspec +34 -0
  4. package/android/CMakeLists.txt +32 -0
  5. package/android/build.gradle +135 -0
  6. package/android/fix-prefab.gradle +51 -0
  7. package/android/gradle.properties +8 -0
  8. package/android/src/main/AndroidManifest.xml +2 -0
  9. package/android/src/main/cpp/cpp-adapter.cpp +6 -0
  10. package/android/src/main/java/com/rngooglemapsplus/Color.kt +65 -0
  11. package/android/src/main/java/com/rngooglemapsplus/GoogleMapsViewImpl.kt +847 -0
  12. package/android/src/main/java/com/rngooglemapsplus/LocationHandler.kt +205 -0
  13. package/android/src/main/java/com/rngooglemapsplus/MapCircle.kt +29 -0
  14. package/android/src/main/java/com/rngooglemapsplus/MapMarker.kt +146 -0
  15. package/android/src/main/java/com/rngooglemapsplus/MapPolygon.kt +38 -0
  16. package/android/src/main/java/com/rngooglemapsplus/MapPolyline.kt +61 -0
  17. package/android/src/main/java/com/rngooglemapsplus/PermissionHandler.kt +116 -0
  18. package/android/src/main/java/com/rngooglemapsplus/PlayServicesHandler.kt +25 -0
  19. package/android/src/main/java/com/rngooglemapsplus/RNGoogleMapsPlusModule.kt +22 -0
  20. package/android/src/main/java/com/rngooglemapsplus/RNGoogleMapsPlusPackage.kt +35 -0
  21. package/android/src/main/java/com/rngooglemapsplus/RNGoogleMapsPlusView.kt +364 -0
  22. package/ios/Color.swift +109 -0
  23. package/ios/GoogleMapViewImpl.swift +645 -0
  24. package/ios/LocationHandler.swift +205 -0
  25. package/ios/MapCircle.swift +43 -0
  26. package/ios/MapHelper.swift +18 -0
  27. package/ios/MapMarker.swift +200 -0
  28. package/ios/MapPolygon.swift +58 -0
  29. package/ios/MapPolyline.swift +85 -0
  30. package/ios/PermissionHandler.swift +73 -0
  31. package/ios/RNGoogleMapsPlusModule.swift +27 -0
  32. package/ios/RNGoogleMapsPlusView.swift +391 -0
  33. package/lib/module/RNGoogleMapsPlusModule.nitro.js +4 -0
  34. package/lib/module/RNGoogleMapsPlusModule.nitro.js.map +1 -0
  35. package/lib/module/RNGoogleMapsPlusView.nitro.js +4 -0
  36. package/lib/module/RNGoogleMapsPlusView.nitro.js.map +1 -0
  37. package/lib/module/index.js +8 -0
  38. package/lib/module/index.js.map +1 -0
  39. package/lib/module/package.json +1 -0
  40. package/lib/module/types.js +78 -0
  41. package/lib/module/types.js.map +1 -0
  42. package/lib/typescript/package.json +1 -0
  43. package/lib/typescript/src/RNGoogleMapsPlusModule.nitro.d.ts +12 -0
  44. package/lib/typescript/src/RNGoogleMapsPlusModule.nitro.d.ts.map +1 -0
  45. package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts +39 -0
  46. package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts.map +1 -0
  47. package/lib/typescript/src/index.d.ts +7 -0
  48. package/lib/typescript/src/index.d.ts.map +1 -0
  49. package/lib/typescript/src/types.d.ts +131 -0
  50. package/lib/typescript/src/types.d.ts.map +1 -0
  51. package/nitro.json +28 -0
  52. package/nitrogen/generated/.gitattributes +1 -0
  53. package/nitrogen/generated/android/RNGoogleMapsPlus+autolinking.cmake +85 -0
  54. package/nitrogen/generated/android/RNGoogleMapsPlus+autolinking.gradle +27 -0
  55. package/nitrogen/generated/android/RNGoogleMapsPlusOnLoad.cpp +70 -0
  56. package/nitrogen/generated/android/RNGoogleMapsPlusOnLoad.hpp +25 -0
  57. package/nitrogen/generated/android/c++/JFunc_void_RNLatLng.hpp +76 -0
  58. package/nitrogen/generated/android/c++/JFunc_void_RNLocation.hpp +78 -0
  59. package/nitrogen/generated/android/c++/JFunc_void_RNLocationErrorCode.hpp +76 -0
  60. package/nitrogen/generated/android/c++/JFunc_void_RNMapErrorCode.hpp +76 -0
  61. package/nitrogen/generated/android/c++/JFunc_void_RNRegion_RNCamera_bool.hpp +81 -0
  62. package/nitrogen/generated/android/c++/JFunc_void_bool.hpp +74 -0
  63. package/nitrogen/generated/android/c++/JFunc_void_std__string.hpp +75 -0
  64. package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusModuleSpec.cpp +83 -0
  65. package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusModuleSpec.hpp +67 -0
  66. package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.cpp +589 -0
  67. package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.hpp +118 -0
  68. package/nitrogen/generated/android/c++/JRNAndroidLocationPermissionResult.hpp +62 -0
  69. package/nitrogen/generated/android/c++/JRNCamera.hpp +67 -0
  70. package/nitrogen/generated/android/c++/JRNCircle.hpp +84 -0
  71. package/nitrogen/generated/android/c++/JRNIOSPermissionResult.hpp +59 -0
  72. package/nitrogen/generated/android/c++/JRNInitialProps.hpp +66 -0
  73. package/nitrogen/generated/android/c++/JRNLatLng.hpp +57 -0
  74. package/nitrogen/generated/android/c++/JRNLineCapType.hpp +62 -0
  75. package/nitrogen/generated/android/c++/JRNLineJoinType.hpp +62 -0
  76. package/nitrogen/generated/android/c++/JRNLocation.hpp +58 -0
  77. package/nitrogen/generated/android/c++/JRNLocationErrorCode.hpp +71 -0
  78. package/nitrogen/generated/android/c++/JRNLocationPermissionResult.hpp +61 -0
  79. package/nitrogen/generated/android/c++/JRNMapErrorCode.hpp +74 -0
  80. package/nitrogen/generated/android/c++/JRNMapPadding.hpp +65 -0
  81. package/nitrogen/generated/android/c++/JRNMapType.hpp +68 -0
  82. package/nitrogen/generated/android/c++/JRNMarker.hpp +82 -0
  83. package/nitrogen/generated/android/c++/JRNPolygon.hpp +98 -0
  84. package/nitrogen/generated/android/c++/JRNPolyline.hpp +106 -0
  85. package/nitrogen/generated/android/c++/JRNPosition.hpp +57 -0
  86. package/nitrogen/generated/android/c++/JRNRegion.hpp +62 -0
  87. package/nitrogen/generated/android/c++/JRNUserInterfaceStyle.hpp +62 -0
  88. package/nitrogen/generated/android/c++/views/JHybridRNGoogleMapsPlusViewStateUpdater.cpp +152 -0
  89. package/nitrogen/generated/android/c++/views/JHybridRNGoogleMapsPlusViewStateUpdater.hpp +49 -0
  90. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_RNLatLng.kt +81 -0
  91. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_RNLocation.kt +81 -0
  92. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_RNLocationErrorCode.kt +81 -0
  93. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_RNMapErrorCode.kt +81 -0
  94. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_RNRegion_RNCamera_bool.kt +81 -0
  95. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_bool.kt +81 -0
  96. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_std__string.kt +81 -0
  97. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/HybridRNGoogleMapsPlusModuleSpec.kt +64 -0
  98. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/HybridRNGoogleMapsPlusViewSpec.kt +317 -0
  99. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNAndroidLocationPermissionResult.kt +22 -0
  100. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNCamera.kt +38 -0
  101. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNCircle.kt +50 -0
  102. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNGoogleMapsPlusOnLoad.kt +35 -0
  103. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNIOSPermissionResult.kt +21 -0
  104. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNInitialProps.kt +35 -0
  105. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLatLng.kt +32 -0
  106. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLineCapType.kt +22 -0
  107. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLineJoinType.kt +22 -0
  108. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLocation.kt +32 -0
  109. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLocationErrorCode.kt +25 -0
  110. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLocationPermissionResult.kt +32 -0
  111. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMapErrorCode.kt +26 -0
  112. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMapPadding.kt +38 -0
  113. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMapType.kt +24 -0
  114. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMarker.kt +47 -0
  115. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNPolygon.kt +47 -0
  116. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNPolyline.kt +50 -0
  117. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNPosition.kt +32 -0
  118. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNRegion.kt +35 -0
  119. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNUserInterfaceStyle.kt +22 -0
  120. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/views/HybridRNGoogleMapsPlusViewManager.kt +56 -0
  121. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/views/HybridRNGoogleMapsPlusViewStateUpdater.kt +23 -0
  122. package/nitrogen/generated/ios/RNGoogleMapsPlus+autolinking.rb +60 -0
  123. package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.cpp +121 -0
  124. package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.hpp +792 -0
  125. package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Umbrella.hpp +113 -0
  126. package/nitrogen/generated/ios/RNGoogleMapsPlusAutolinking.mm +41 -0
  127. package/nitrogen/generated/ios/RNGoogleMapsPlusAutolinking.swift +40 -0
  128. package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusModuleSpecSwift.cpp +11 -0
  129. package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusModuleSpecSwift.hpp +102 -0
  130. package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.cpp +11 -0
  131. package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.hpp +342 -0
  132. package/nitrogen/generated/ios/c++/views/HybridRNGoogleMapsPlusViewComponent.mm +216 -0
  133. package/nitrogen/generated/ios/swift/Func_void_RNLatLng.swift +47 -0
  134. package/nitrogen/generated/ios/swift/Func_void_RNLocation.swift +47 -0
  135. package/nitrogen/generated/ios/swift/Func_void_RNLocationErrorCode.swift +47 -0
  136. package/nitrogen/generated/ios/swift/Func_void_RNLocationPermissionResult.swift +47 -0
  137. package/nitrogen/generated/ios/swift/Func_void_RNMapErrorCode.swift +47 -0
  138. package/nitrogen/generated/ios/swift/Func_void_RNRegion_RNCamera_bool.swift +47 -0
  139. package/nitrogen/generated/ios/swift/Func_void_bool.swift +47 -0
  140. package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +47 -0
  141. package/nitrogen/generated/ios/swift/Func_void_std__string.swift +47 -0
  142. package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusModuleSpec.swift +52 -0
  143. package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusModuleSpec_cxx.swift +164 -0
  144. package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec.swift +78 -0
  145. package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec_cxx.swift +881 -0
  146. package/nitrogen/generated/ios/swift/RNAndroidLocationPermissionResult.swift +44 -0
  147. package/nitrogen/generated/ios/swift/RNCamera.swift +123 -0
  148. package/nitrogen/generated/ios/swift/RNCircle.swift +198 -0
  149. package/nitrogen/generated/ios/swift/RNIOSPermissionResult.swift +40 -0
  150. package/nitrogen/generated/ios/swift/RNInitialProps.swift +107 -0
  151. package/nitrogen/generated/ios/swift/RNLatLng.swift +46 -0
  152. package/nitrogen/generated/ios/swift/RNLineCapType.swift +44 -0
  153. package/nitrogen/generated/ios/swift/RNLineJoinType.swift +44 -0
  154. package/nitrogen/generated/ios/swift/RNLocation.swift +46 -0
  155. package/nitrogen/generated/ios/swift/RNLocationErrorCode.swift +56 -0
  156. package/nitrogen/generated/ios/swift/RNLocationPermissionResult.swift +70 -0
  157. package/nitrogen/generated/ios/swift/RNMapErrorCode.swift +60 -0
  158. package/nitrogen/generated/ios/swift/RNMapPadding.swift +68 -0
  159. package/nitrogen/generated/ios/swift/RNMapType.swift +52 -0
  160. package/nitrogen/generated/ios/swift/RNMarker.swift +132 -0
  161. package/nitrogen/generated/ios/swift/RNPolygon.swift +187 -0
  162. package/nitrogen/generated/ios/swift/RNPolyline.swift +203 -0
  163. package/nitrogen/generated/ios/swift/RNPosition.swift +46 -0
  164. package/nitrogen/generated/ios/swift/RNRegion.swift +57 -0
  165. package/nitrogen/generated/ios/swift/RNUserInterfaceStyle.swift +44 -0
  166. package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusModuleSpec.cpp +24 -0
  167. package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusModuleSpec.hpp +67 -0
  168. package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.cpp +76 -0
  169. package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.hpp +164 -0
  170. package/nitrogen/generated/shared/c++/RNAndroidLocationPermissionResult.hpp +67 -0
  171. package/nitrogen/generated/shared/c++/RNCamera.hpp +81 -0
  172. package/nitrogen/generated/shared/c++/RNCircle.hpp +98 -0
  173. package/nitrogen/generated/shared/c++/RNIOSPermissionResult.hpp +65 -0
  174. package/nitrogen/generated/shared/c++/RNInitialProps.hpp +78 -0
  175. package/nitrogen/generated/shared/c++/RNLatLng.hpp +71 -0
  176. package/nitrogen/generated/shared/c++/RNLineCapType.hpp +80 -0
  177. package/nitrogen/generated/shared/c++/RNLineJoinType.hpp +80 -0
  178. package/nitrogen/generated/shared/c++/RNLocation.hpp +72 -0
  179. package/nitrogen/generated/shared/c++/RNLocationErrorCode.hpp +73 -0
  180. package/nitrogen/generated/shared/c++/RNLocationPermissionResult.hpp +76 -0
  181. package/nitrogen/generated/shared/c++/RNMapErrorCode.hpp +67 -0
  182. package/nitrogen/generated/shared/c++/RNMapPadding.hpp +79 -0
  183. package/nitrogen/generated/shared/c++/RNMapType.hpp +88 -0
  184. package/nitrogen/generated/shared/c++/RNMarker.hpp +97 -0
  185. package/nitrogen/generated/shared/c++/RNPolygon.hpp +95 -0
  186. package/nitrogen/generated/shared/c++/RNPolyline.hpp +105 -0
  187. package/nitrogen/generated/shared/c++/RNPosition.hpp +71 -0
  188. package/nitrogen/generated/shared/c++/RNRegion.hpp +76 -0
  189. package/nitrogen/generated/shared/c++/RNUserInterfaceStyle.hpp +80 -0
  190. package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.cpp +375 -0
  191. package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.hpp +147 -0
  192. package/nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json +34 -0
  193. package/package.json +24 -8
  194. package/src/RNGoogleMapsPlusModule.nitro.ts +13 -0
  195. package/src/RNGoogleMapsPlusView.nitro.ts +86 -0
  196. package/src/index.tsx +24 -0
  197. package/src/types.ts +195 -0
@@ -0,0 +1,97 @@
1
+ ///
2
+ /// RNMarker.hpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 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
+
21
+ // Forward declaration of `RNLatLng` to properly resolve imports.
22
+ namespace margelo::nitro::rngooglemapsplus { struct RNLatLng; }
23
+ // Forward declaration of `RNPosition` to properly resolve imports.
24
+ namespace margelo::nitro::rngooglemapsplus { struct RNPosition; }
25
+
26
+ #include <string>
27
+ #include <optional>
28
+ #include "RNLatLng.hpp"
29
+ #include "RNPosition.hpp"
30
+
31
+ namespace margelo::nitro::rngooglemapsplus {
32
+
33
+ /**
34
+ * A struct which can be represented as a JavaScript object (RNMarker).
35
+ */
36
+ struct RNMarker {
37
+ public:
38
+ std::string id SWIFT_PRIVATE;
39
+ std::optional<double> zIndex SWIFT_PRIVATE;
40
+ RNLatLng coordinate SWIFT_PRIVATE;
41
+ std::optional<RNPosition> anchor SWIFT_PRIVATE;
42
+ double width SWIFT_PRIVATE;
43
+ double height SWIFT_PRIVATE;
44
+ std::string iconSvg SWIFT_PRIVATE;
45
+
46
+ public:
47
+ RNMarker() = default;
48
+ explicit RNMarker(std::string id, std::optional<double> zIndex, RNLatLng coordinate, std::optional<RNPosition> anchor, double width, double height, std::string iconSvg): id(id), zIndex(zIndex), coordinate(coordinate), anchor(anchor), width(width), height(height), iconSvg(iconSvg) {}
49
+ };
50
+
51
+ } // namespace margelo::nitro::rngooglemapsplus
52
+
53
+ namespace margelo::nitro {
54
+
55
+ // C++ RNMarker <> JS RNMarker (object)
56
+ template <>
57
+ struct JSIConverter<margelo::nitro::rngooglemapsplus::RNMarker> final {
58
+ static inline margelo::nitro::rngooglemapsplus::RNMarker fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
59
+ jsi::Object obj = arg.asObject(runtime);
60
+ return margelo::nitro::rngooglemapsplus::RNMarker(
61
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "id")),
62
+ JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "zIndex")),
63
+ JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::fromJSI(runtime, obj.getProperty(runtime, "coordinate")),
64
+ JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNPosition>>::fromJSI(runtime, obj.getProperty(runtime, "anchor")),
65
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "width")),
66
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "height")),
67
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "iconSvg"))
68
+ );
69
+ }
70
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNMarker& arg) {
71
+ jsi::Object obj(runtime);
72
+ obj.setProperty(runtime, "id", JSIConverter<std::string>::toJSI(runtime, arg.id));
73
+ obj.setProperty(runtime, "zIndex", JSIConverter<std::optional<double>>::toJSI(runtime, arg.zIndex));
74
+ obj.setProperty(runtime, "coordinate", JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::toJSI(runtime, arg.coordinate));
75
+ obj.setProperty(runtime, "anchor", JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNPosition>>::toJSI(runtime, arg.anchor));
76
+ obj.setProperty(runtime, "width", JSIConverter<double>::toJSI(runtime, arg.width));
77
+ obj.setProperty(runtime, "height", JSIConverter<double>::toJSI(runtime, arg.height));
78
+ obj.setProperty(runtime, "iconSvg", JSIConverter<std::string>::toJSI(runtime, arg.iconSvg));
79
+ return obj;
80
+ }
81
+ static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
82
+ if (!value.isObject()) {
83
+ return false;
84
+ }
85
+ jsi::Object obj = value.getObject(runtime);
86
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "id"))) return false;
87
+ if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "zIndex"))) return false;
88
+ if (!JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::canConvert(runtime, obj.getProperty(runtime, "coordinate"))) return false;
89
+ if (!JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNPosition>>::canConvert(runtime, obj.getProperty(runtime, "anchor"))) return false;
90
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "width"))) return false;
91
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "height"))) return false;
92
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "iconSvg"))) return false;
93
+ return true;
94
+ }
95
+ };
96
+
97
+ } // namespace margelo::nitro
@@ -0,0 +1,95 @@
1
+ ///
2
+ /// RNPolygon.hpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 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
+
21
+ // Forward declaration of `RNLatLng` to properly resolve imports.
22
+ namespace margelo::nitro::rngooglemapsplus { struct RNLatLng; }
23
+
24
+ #include <string>
25
+ #include <optional>
26
+ #include "RNLatLng.hpp"
27
+ #include <vector>
28
+
29
+ namespace margelo::nitro::rngooglemapsplus {
30
+
31
+ /**
32
+ * A struct which can be represented as a JavaScript object (RNPolygon).
33
+ */
34
+ struct RNPolygon {
35
+ public:
36
+ std::string id SWIFT_PRIVATE;
37
+ std::optional<double> zIndex SWIFT_PRIVATE;
38
+ std::optional<bool> pressable SWIFT_PRIVATE;
39
+ std::vector<RNLatLng> coordinates SWIFT_PRIVATE;
40
+ std::optional<std::string> fillColor SWIFT_PRIVATE;
41
+ std::optional<std::string> strokeColor SWIFT_PRIVATE;
42
+ std::optional<double> strokeWidth SWIFT_PRIVATE;
43
+
44
+ public:
45
+ RNPolygon() = default;
46
+ explicit RNPolygon(std::string id, std::optional<double> zIndex, std::optional<bool> pressable, std::vector<RNLatLng> coordinates, std::optional<std::string> fillColor, std::optional<std::string> strokeColor, std::optional<double> strokeWidth): id(id), zIndex(zIndex), pressable(pressable), coordinates(coordinates), fillColor(fillColor), strokeColor(strokeColor), strokeWidth(strokeWidth) {}
47
+ };
48
+
49
+ } // namespace margelo::nitro::rngooglemapsplus
50
+
51
+ namespace margelo::nitro {
52
+
53
+ // C++ RNPolygon <> JS RNPolygon (object)
54
+ template <>
55
+ struct JSIConverter<margelo::nitro::rngooglemapsplus::RNPolygon> final {
56
+ static inline margelo::nitro::rngooglemapsplus::RNPolygon fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
57
+ jsi::Object obj = arg.asObject(runtime);
58
+ return margelo::nitro::rngooglemapsplus::RNPolygon(
59
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "id")),
60
+ JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "zIndex")),
61
+ JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "pressable")),
62
+ JSIConverter<std::vector<margelo::nitro::rngooglemapsplus::RNLatLng>>::fromJSI(runtime, obj.getProperty(runtime, "coordinates")),
63
+ JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "fillColor")),
64
+ JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "strokeColor")),
65
+ JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "strokeWidth"))
66
+ );
67
+ }
68
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNPolygon& arg) {
69
+ jsi::Object obj(runtime);
70
+ obj.setProperty(runtime, "id", JSIConverter<std::string>::toJSI(runtime, arg.id));
71
+ obj.setProperty(runtime, "zIndex", JSIConverter<std::optional<double>>::toJSI(runtime, arg.zIndex));
72
+ obj.setProperty(runtime, "pressable", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.pressable));
73
+ obj.setProperty(runtime, "coordinates", JSIConverter<std::vector<margelo::nitro::rngooglemapsplus::RNLatLng>>::toJSI(runtime, arg.coordinates));
74
+ obj.setProperty(runtime, "fillColor", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.fillColor));
75
+ obj.setProperty(runtime, "strokeColor", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.strokeColor));
76
+ obj.setProperty(runtime, "strokeWidth", JSIConverter<std::optional<double>>::toJSI(runtime, arg.strokeWidth));
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 (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "id"))) return false;
85
+ if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "zIndex"))) return false;
86
+ if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "pressable"))) return false;
87
+ if (!JSIConverter<std::vector<margelo::nitro::rngooglemapsplus::RNLatLng>>::canConvert(runtime, obj.getProperty(runtime, "coordinates"))) return false;
88
+ if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "fillColor"))) return false;
89
+ if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "strokeColor"))) return false;
90
+ if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "strokeWidth"))) return false;
91
+ return true;
92
+ }
93
+ };
94
+
95
+ } // namespace margelo::nitro
@@ -0,0 +1,105 @@
1
+ ///
2
+ /// RNPolyline.hpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 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
+
21
+ // Forward declaration of `RNLatLng` to properly resolve imports.
22
+ namespace margelo::nitro::rngooglemapsplus { struct RNLatLng; }
23
+ // Forward declaration of `RNLineCapType` to properly resolve imports.
24
+ namespace margelo::nitro::rngooglemapsplus { enum class RNLineCapType; }
25
+ // Forward declaration of `RNLineJoinType` to properly resolve imports.
26
+ namespace margelo::nitro::rngooglemapsplus { enum class RNLineJoinType; }
27
+
28
+ #include <string>
29
+ #include <optional>
30
+ #include "RNLatLng.hpp"
31
+ #include <vector>
32
+ #include "RNLineCapType.hpp"
33
+ #include "RNLineJoinType.hpp"
34
+
35
+ namespace margelo::nitro::rngooglemapsplus {
36
+
37
+ /**
38
+ * A struct which can be represented as a JavaScript object (RNPolyline).
39
+ */
40
+ struct RNPolyline {
41
+ public:
42
+ std::string id SWIFT_PRIVATE;
43
+ std::optional<double> zIndex SWIFT_PRIVATE;
44
+ std::optional<bool> pressable SWIFT_PRIVATE;
45
+ std::vector<RNLatLng> coordinates SWIFT_PRIVATE;
46
+ std::optional<RNLineCapType> lineCap SWIFT_PRIVATE;
47
+ std::optional<RNLineJoinType> lineJoin SWIFT_PRIVATE;
48
+ std::optional<std::string> color SWIFT_PRIVATE;
49
+ std::optional<double> width SWIFT_PRIVATE;
50
+
51
+ public:
52
+ RNPolyline() = default;
53
+ explicit RNPolyline(std::string id, std::optional<double> zIndex, std::optional<bool> pressable, std::vector<RNLatLng> coordinates, std::optional<RNLineCapType> lineCap, std::optional<RNLineJoinType> lineJoin, std::optional<std::string> color, std::optional<double> width): id(id), zIndex(zIndex), pressable(pressable), coordinates(coordinates), lineCap(lineCap), lineJoin(lineJoin), color(color), width(width) {}
54
+ };
55
+
56
+ } // namespace margelo::nitro::rngooglemapsplus
57
+
58
+ namespace margelo::nitro {
59
+
60
+ // C++ RNPolyline <> JS RNPolyline (object)
61
+ template <>
62
+ struct JSIConverter<margelo::nitro::rngooglemapsplus::RNPolyline> final {
63
+ static inline margelo::nitro::rngooglemapsplus::RNPolyline fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
64
+ jsi::Object obj = arg.asObject(runtime);
65
+ return margelo::nitro::rngooglemapsplus::RNPolyline(
66
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "id")),
67
+ JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "zIndex")),
68
+ JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "pressable")),
69
+ JSIConverter<std::vector<margelo::nitro::rngooglemapsplus::RNLatLng>>::fromJSI(runtime, obj.getProperty(runtime, "coordinates")),
70
+ JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNLineCapType>>::fromJSI(runtime, obj.getProperty(runtime, "lineCap")),
71
+ JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNLineJoinType>>::fromJSI(runtime, obj.getProperty(runtime, "lineJoin")),
72
+ JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "color")),
73
+ JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "width"))
74
+ );
75
+ }
76
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNPolyline& arg) {
77
+ jsi::Object obj(runtime);
78
+ obj.setProperty(runtime, "id", JSIConverter<std::string>::toJSI(runtime, arg.id));
79
+ obj.setProperty(runtime, "zIndex", JSIConverter<std::optional<double>>::toJSI(runtime, arg.zIndex));
80
+ obj.setProperty(runtime, "pressable", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.pressable));
81
+ obj.setProperty(runtime, "coordinates", JSIConverter<std::vector<margelo::nitro::rngooglemapsplus::RNLatLng>>::toJSI(runtime, arg.coordinates));
82
+ obj.setProperty(runtime, "lineCap", JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNLineCapType>>::toJSI(runtime, arg.lineCap));
83
+ obj.setProperty(runtime, "lineJoin", JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNLineJoinType>>::toJSI(runtime, arg.lineJoin));
84
+ obj.setProperty(runtime, "color", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.color));
85
+ obj.setProperty(runtime, "width", JSIConverter<std::optional<double>>::toJSI(runtime, arg.width));
86
+ return obj;
87
+ }
88
+ static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
89
+ if (!value.isObject()) {
90
+ return false;
91
+ }
92
+ jsi::Object obj = value.getObject(runtime);
93
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "id"))) return false;
94
+ if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "zIndex"))) return false;
95
+ if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "pressable"))) return false;
96
+ if (!JSIConverter<std::vector<margelo::nitro::rngooglemapsplus::RNLatLng>>::canConvert(runtime, obj.getProperty(runtime, "coordinates"))) return false;
97
+ if (!JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNLineCapType>>::canConvert(runtime, obj.getProperty(runtime, "lineCap"))) return false;
98
+ if (!JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNLineJoinType>>::canConvert(runtime, obj.getProperty(runtime, "lineJoin"))) return false;
99
+ if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "color"))) return false;
100
+ if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "width"))) return false;
101
+ return true;
102
+ }
103
+ };
104
+
105
+ } // namespace margelo::nitro
@@ -0,0 +1,71 @@
1
+ ///
2
+ /// RNPosition.hpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 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
+
21
+
22
+
23
+
24
+
25
+ namespace margelo::nitro::rngooglemapsplus {
26
+
27
+ /**
28
+ * A struct which can be represented as a JavaScript object (RNPosition).
29
+ */
30
+ struct RNPosition {
31
+ public:
32
+ double x SWIFT_PRIVATE;
33
+ double y SWIFT_PRIVATE;
34
+
35
+ public:
36
+ RNPosition() = default;
37
+ explicit RNPosition(double x, double y): x(x), y(y) {}
38
+ };
39
+
40
+ } // namespace margelo::nitro::rngooglemapsplus
41
+
42
+ namespace margelo::nitro {
43
+
44
+ // C++ RNPosition <> JS RNPosition (object)
45
+ template <>
46
+ struct JSIConverter<margelo::nitro::rngooglemapsplus::RNPosition> final {
47
+ static inline margelo::nitro::rngooglemapsplus::RNPosition fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
48
+ jsi::Object obj = arg.asObject(runtime);
49
+ return margelo::nitro::rngooglemapsplus::RNPosition(
50
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "x")),
51
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "y"))
52
+ );
53
+ }
54
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNPosition& arg) {
55
+ jsi::Object obj(runtime);
56
+ obj.setProperty(runtime, "x", JSIConverter<double>::toJSI(runtime, arg.x));
57
+ obj.setProperty(runtime, "y", JSIConverter<double>::toJSI(runtime, arg.y));
58
+ return obj;
59
+ }
60
+ static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
61
+ if (!value.isObject()) {
62
+ return false;
63
+ }
64
+ jsi::Object obj = value.getObject(runtime);
65
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "x"))) return false;
66
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "y"))) return false;
67
+ return true;
68
+ }
69
+ };
70
+
71
+ } // namespace margelo::nitro
@@ -0,0 +1,76 @@
1
+ ///
2
+ /// RNRegion.hpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 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
+
21
+ // Forward declaration of `RNLatLng` to properly resolve imports.
22
+ namespace margelo::nitro::rngooglemapsplus { struct RNLatLng; }
23
+
24
+ #include "RNLatLng.hpp"
25
+
26
+ namespace margelo::nitro::rngooglemapsplus {
27
+
28
+ /**
29
+ * A struct which can be represented as a JavaScript object (RNRegion).
30
+ */
31
+ struct RNRegion {
32
+ public:
33
+ RNLatLng center SWIFT_PRIVATE;
34
+ double latitudeDelta SWIFT_PRIVATE;
35
+ double longitudeDelta SWIFT_PRIVATE;
36
+
37
+ public:
38
+ RNRegion() = default;
39
+ explicit RNRegion(RNLatLng center, double latitudeDelta, double longitudeDelta): center(center), latitudeDelta(latitudeDelta), longitudeDelta(longitudeDelta) {}
40
+ };
41
+
42
+ } // namespace margelo::nitro::rngooglemapsplus
43
+
44
+ namespace margelo::nitro {
45
+
46
+ // C++ RNRegion <> JS RNRegion (object)
47
+ template <>
48
+ struct JSIConverter<margelo::nitro::rngooglemapsplus::RNRegion> final {
49
+ static inline margelo::nitro::rngooglemapsplus::RNRegion fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
50
+ jsi::Object obj = arg.asObject(runtime);
51
+ return margelo::nitro::rngooglemapsplus::RNRegion(
52
+ JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::fromJSI(runtime, obj.getProperty(runtime, "center")),
53
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "latitudeDelta")),
54
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "longitudeDelta"))
55
+ );
56
+ }
57
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNRegion& arg) {
58
+ jsi::Object obj(runtime);
59
+ obj.setProperty(runtime, "center", JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::toJSI(runtime, arg.center));
60
+ obj.setProperty(runtime, "latitudeDelta", JSIConverter<double>::toJSI(runtime, arg.latitudeDelta));
61
+ obj.setProperty(runtime, "longitudeDelta", JSIConverter<double>::toJSI(runtime, arg.longitudeDelta));
62
+ return obj;
63
+ }
64
+ static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
65
+ if (!value.isObject()) {
66
+ return false;
67
+ }
68
+ jsi::Object obj = value.getObject(runtime);
69
+ if (!JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::canConvert(runtime, obj.getProperty(runtime, "center"))) return false;
70
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "latitudeDelta"))) return false;
71
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "longitudeDelta"))) return false;
72
+ return true;
73
+ }
74
+ };
75
+
76
+ } // namespace margelo::nitro
@@ -0,0 +1,80 @@
1
+ ///
2
+ /// RNUserInterfaceStyle.hpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #pragma once
9
+
10
+ #if __has_include(<NitroModules/NitroHash.hpp>)
11
+ #include <NitroModules/NitroHash.hpp>
12
+ #else
13
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
+ #endif
15
+ #if __has_include(<NitroModules/JSIConverter.hpp>)
16
+ #include <NitroModules/JSIConverter.hpp>
17
+ #else
18
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
+ #endif
20
+ #if __has_include(<NitroModules/NitroDefines.hpp>)
21
+ #include <NitroModules/NitroDefines.hpp>
22
+ #else
23
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
+ #endif
25
+
26
+ namespace margelo::nitro::rngooglemapsplus {
27
+
28
+ /**
29
+ * An enum which can be represented as a JavaScript union (RNUserInterfaceStyle).
30
+ */
31
+ enum class RNUserInterfaceStyle {
32
+ LIGHT SWIFT_NAME(light) = 0,
33
+ DARK SWIFT_NAME(dark) = 1,
34
+ DEFAULT SWIFT_NAME(default) = 2,
35
+ } CLOSED_ENUM;
36
+
37
+ } // namespace margelo::nitro::rngooglemapsplus
38
+
39
+ namespace margelo::nitro {
40
+
41
+ // C++ RNUserInterfaceStyle <> JS RNUserInterfaceStyle (union)
42
+ template <>
43
+ struct JSIConverter<margelo::nitro::rngooglemapsplus::RNUserInterfaceStyle> final {
44
+ static inline margelo::nitro::rngooglemapsplus::RNUserInterfaceStyle fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
45
+ std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, arg);
46
+ switch (hashString(unionValue.c_str(), unionValue.size())) {
47
+ case hashString("light"): return margelo::nitro::rngooglemapsplus::RNUserInterfaceStyle::LIGHT;
48
+ case hashString("dark"): return margelo::nitro::rngooglemapsplus::RNUserInterfaceStyle::DARK;
49
+ case hashString("default"): return margelo::nitro::rngooglemapsplus::RNUserInterfaceStyle::DEFAULT;
50
+ default: [[unlikely]]
51
+ throw std::invalid_argument("Cannot convert \"" + unionValue + "\" to enum RNUserInterfaceStyle - invalid value!");
52
+ }
53
+ }
54
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::rngooglemapsplus::RNUserInterfaceStyle arg) {
55
+ switch (arg) {
56
+ case margelo::nitro::rngooglemapsplus::RNUserInterfaceStyle::LIGHT: return JSIConverter<std::string>::toJSI(runtime, "light");
57
+ case margelo::nitro::rngooglemapsplus::RNUserInterfaceStyle::DARK: return JSIConverter<std::string>::toJSI(runtime, "dark");
58
+ case margelo::nitro::rngooglemapsplus::RNUserInterfaceStyle::DEFAULT: return JSIConverter<std::string>::toJSI(runtime, "default");
59
+ default: [[unlikely]]
60
+ throw std::invalid_argument("Cannot convert RNUserInterfaceStyle to JS - invalid value: "
61
+ + std::to_string(static_cast<int>(arg)) + "!");
62
+ }
63
+ }
64
+ static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
65
+ if (!value.isString()) {
66
+ return false;
67
+ }
68
+ std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, value);
69
+ switch (hashString(unionValue.c_str(), unionValue.size())) {
70
+ case hashString("light"):
71
+ case hashString("dark"):
72
+ case hashString("default"):
73
+ return true;
74
+ default:
75
+ return false;
76
+ }
77
+ }
78
+ };
79
+
80
+ } // namespace margelo::nitro