@maydon_tech/react-native-nitro-maps 0.1.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 (283) hide show
  1. package/LICENSE +20 -0
  2. package/NitroMap.podspec +42 -0
  3. package/README.md +172 -0
  4. package/android/CMakeLists.txt +27 -0
  5. package/android/build.gradle +141 -0
  6. package/android/gradle.properties +5 -0
  7. package/android/src/main/AndroidManifest.xml +3 -0
  8. package/android/src/main/cpp/cpp-adapter.cpp +6 -0
  9. package/android/src/main/java/com/margelo/nitro/nitromap/ClusterIconGenerator.kt +108 -0
  10. package/android/src/main/java/com/margelo/nitro/nitromap/ColorUtils.kt +63 -0
  11. package/android/src/main/java/com/margelo/nitro/nitromap/HybridNitroMap.kt +408 -0
  12. package/android/src/main/java/com/margelo/nitro/nitromap/HybridNitroMapConfig.kt +68 -0
  13. package/android/src/main/java/com/margelo/nitro/nitromap/MarkerIconCache.kt +176 -0
  14. package/android/src/main/java/com/margelo/nitro/nitromap/MarkerIconFactory.kt +252 -0
  15. package/android/src/main/java/com/margelo/nitro/nitromap/NitroMapPackage.kt +33 -0
  16. package/android/src/main/java/com/margelo/nitro/nitromap/clustering/NitroClusterEngine.kt +252 -0
  17. package/android/src/main/java/com/margelo/nitro/nitromap/clustering/QuadTree.kt +195 -0
  18. package/android/src/main/java/com/margelo/nitro/nitromap/providers/GoogleMapProvider.kt +912 -0
  19. package/android/src/main/java/com/margelo/nitro/nitromap/providers/MapProviderInterface.kt +70 -0
  20. package/cpp/ClusterEngine.hpp +411 -0
  21. package/cpp/KDBush.hpp +238 -0
  22. package/cpp/QuadTree.hpp +246 -0
  23. package/ios/Clustering/ClusterEngineWrapper.h +58 -0
  24. package/ios/Clustering/ClusterEngineWrapper.mm +142 -0
  25. package/ios/Clustering/ClusterIconRenderer.swift +80 -0
  26. package/ios/Clustering/NitroClusterEngine.swift +117 -0
  27. package/ios/Clustering/NitroClusterIconGenerator.swift +35 -0
  28. package/ios/MarkerRenderer/MarkerIconFactory.swift +322 -0
  29. package/ios/MarkerRenderer/PriceMarkerRenderer.swift +140 -0
  30. package/ios/NitroMap.swift +332 -0
  31. package/ios/NitroMapConfig/HybridNitroMapConfig.swift +33 -0
  32. package/ios/Providers/GoogleMapDelegate.swift +310 -0
  33. package/ios/Providers/GoogleMapProvider+Camera.swift +164 -0
  34. package/ios/Providers/GoogleMapProvider.swift +924 -0
  35. package/ios/Providers/MapProviderProtocol.swift +78 -0
  36. package/ios/Shared/ClusterConfig+Factory.swift +58 -0
  37. package/ios/Shared/ClusteringManager.swift +211 -0
  38. package/ios/Shared/MapStyleProvider.swift +135 -0
  39. package/ios/Shared/MarkerSelectionHandler.swift +116 -0
  40. package/ios/Utils/ColorValueExtension.swift +54 -0
  41. package/lib/module/components/ImageMarker.js +146 -0
  42. package/lib/module/components/ImageMarker.js.map +1 -0
  43. package/lib/module/components/NitroMap.js +320 -0
  44. package/lib/module/components/NitroMap.js.map +1 -0
  45. package/lib/module/components/PriceMarker.js +165 -0
  46. package/lib/module/components/PriceMarker.js.map +1 -0
  47. package/lib/module/context/NitroMapContext.js +15 -0
  48. package/lib/module/context/NitroMapContext.js.map +1 -0
  49. package/lib/module/hooks/useNitroMarker.js +104 -0
  50. package/lib/module/hooks/useNitroMarker.js.map +1 -0
  51. package/lib/module/index.js +21 -0
  52. package/lib/module/index.js.map +1 -0
  53. package/lib/module/modules/index.js +4 -0
  54. package/lib/module/modules/index.js.map +1 -0
  55. package/lib/module/modules/module.js +30 -0
  56. package/lib/module/modules/module.js.map +1 -0
  57. package/lib/module/package.json +1 -0
  58. package/lib/module/specs/NitroMap.nitro.js +4 -0
  59. package/lib/module/specs/NitroMap.nitro.js.map +1 -0
  60. package/lib/module/specs/NitroMapConfig.nitro.js +4 -0
  61. package/lib/module/specs/NitroMapConfig.nitro.js.map +1 -0
  62. package/lib/module/types/map.js +2 -0
  63. package/lib/module/types/map.js.map +1 -0
  64. package/lib/module/types/marker.js +4 -0
  65. package/lib/module/types/marker.js.map +1 -0
  66. package/lib/module/utils/colors.js +147 -0
  67. package/lib/module/utils/colors.js.map +1 -0
  68. package/lib/typescript/package.json +1 -0
  69. package/lib/typescript/src/components/ImageMarker.d.ts +70 -0
  70. package/lib/typescript/src/components/ImageMarker.d.ts.map +1 -0
  71. package/lib/typescript/src/components/NitroMap.d.ts +14 -0
  72. package/lib/typescript/src/components/NitroMap.d.ts.map +1 -0
  73. package/lib/typescript/src/components/PriceMarker.d.ts +88 -0
  74. package/lib/typescript/src/components/PriceMarker.d.ts.map +1 -0
  75. package/lib/typescript/src/context/NitroMapContext.d.ts +16 -0
  76. package/lib/typescript/src/context/NitroMapContext.d.ts.map +1 -0
  77. package/lib/typescript/src/hooks/useNitroMarker.d.ts +78 -0
  78. package/lib/typescript/src/hooks/useNitroMarker.d.ts.map +1 -0
  79. package/lib/typescript/src/index.d.ts +12 -0
  80. package/lib/typescript/src/index.d.ts.map +1 -0
  81. package/lib/typescript/src/modules/index.d.ts +2 -0
  82. package/lib/typescript/src/modules/index.d.ts.map +1 -0
  83. package/lib/typescript/src/modules/module.d.ts +22 -0
  84. package/lib/typescript/src/modules/module.d.ts.map +1 -0
  85. package/lib/typescript/src/specs/NitroMap.nitro.d.ts +227 -0
  86. package/lib/typescript/src/specs/NitroMap.nitro.d.ts.map +1 -0
  87. package/lib/typescript/src/specs/NitroMapConfig.nitro.d.ts +10 -0
  88. package/lib/typescript/src/specs/NitroMapConfig.nitro.d.ts.map +1 -0
  89. package/lib/typescript/src/types/map.d.ts +154 -0
  90. package/lib/typescript/src/types/map.d.ts.map +1 -0
  91. package/lib/typescript/src/types/marker.d.ts +248 -0
  92. package/lib/typescript/src/types/marker.d.ts.map +1 -0
  93. package/lib/typescript/src/utils/colors.d.ts +82 -0
  94. package/lib/typescript/src/utils/colors.d.ts.map +1 -0
  95. package/nitro.json +21 -0
  96. package/nitrogen/generated/android/c++/JCamera.hpp +74 -0
  97. package/nitrogen/generated/android/c++/JClusterAnimationStyle.hpp +68 -0
  98. package/nitrogen/generated/android/c++/JClusterConfig.hpp +121 -0
  99. package/nitrogen/generated/android/c++/JClusterPressEvent.hpp +86 -0
  100. package/nitrogen/generated/android/c++/JClusterStrategy.hpp +59 -0
  101. package/nitrogen/generated/android/c++/JColorValue.cpp +26 -0
  102. package/nitrogen/generated/android/c++/JColorValue.hpp +70 -0
  103. package/nitrogen/generated/android/c++/JCoordinate.hpp +61 -0
  104. package/nitrogen/generated/android/c++/JEdgePadding.hpp +69 -0
  105. package/nitrogen/generated/android/c++/JFunc_void.hpp +75 -0
  106. package/nitrogen/generated/android/c++/JFunc_void_ClusterPressEvent.hpp +81 -0
  107. package/nitrogen/generated/android/c++/JFunc_void_MapError.hpp +78 -0
  108. package/nitrogen/generated/android/c++/JFunc_void_MapPressEvent.hpp +81 -0
  109. package/nitrogen/generated/android/c++/JFunc_void_MarkerDragEvent.hpp +80 -0
  110. package/nitrogen/generated/android/c++/JFunc_void_MarkerPressEvent.hpp +80 -0
  111. package/nitrogen/generated/android/c++/JFunc_void_RegionChangeEvent.hpp +79 -0
  112. package/nitrogen/generated/android/c++/JHybridNitroMapConfigSpec.cpp +59 -0
  113. package/nitrogen/generated/android/c++/JHybridNitroMapConfigSpec.hpp +66 -0
  114. package/nitrogen/generated/android/c++/JHybridNitroMapSpec.cpp +593 -0
  115. package/nitrogen/generated/android/c++/JHybridNitroMapSpec.hpp +125 -0
  116. package/nitrogen/generated/android/c++/JImageMarkerConfig.hpp +86 -0
  117. package/nitrogen/generated/android/c++/JMapBoundaries.hpp +62 -0
  118. package/nitrogen/generated/android/c++/JMapError.hpp +61 -0
  119. package/nitrogen/generated/android/c++/JMapPressEvent.hpp +64 -0
  120. package/nitrogen/generated/android/c++/JMapProvider.hpp +62 -0
  121. package/nitrogen/generated/android/c++/JMapStyleElement.hpp +87 -0
  122. package/nitrogen/generated/android/c++/JMapStyler.hpp +78 -0
  123. package/nitrogen/generated/android/c++/JMapType.hpp +62 -0
  124. package/nitrogen/generated/android/c++/JMarkerAnimation.hpp +62 -0
  125. package/nitrogen/generated/android/c++/JMarkerColor.hpp +69 -0
  126. package/nitrogen/generated/android/c++/JMarkerConfig.hpp +77 -0
  127. package/nitrogen/generated/android/c++/JMarkerData.hpp +121 -0
  128. package/nitrogen/generated/android/c++/JMarkerDragEvent.hpp +63 -0
  129. package/nitrogen/generated/android/c++/JMarkerPressEvent.hpp +63 -0
  130. package/nitrogen/generated/android/c++/JMarkerStyle.hpp +62 -0
  131. package/nitrogen/generated/android/c++/JPoint.hpp +61 -0
  132. package/nitrogen/generated/android/c++/JPriceMarkerStyle.hpp +102 -0
  133. package/nitrogen/generated/android/c++/JRegion.hpp +69 -0
  134. package/nitrogen/generated/android/c++/JRegionChangeEvent.hpp +62 -0
  135. package/nitrogen/generated/android/c++/JVariant_String_MarkerColor.cpp +26 -0
  136. package/nitrogen/generated/android/c++/JVariant_String_MarkerColor.hpp +70 -0
  137. package/nitrogen/generated/android/c++/views/JHybridNitroMapStateUpdater.cpp +144 -0
  138. package/nitrogen/generated/android/c++/views/JHybridNitroMapStateUpdater.hpp +49 -0
  139. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Camera.kt +50 -0
  140. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/ClusterAnimationStyle.kt +24 -0
  141. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/ClusterConfig.kt +80 -0
  142. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/ClusterPressEvent.kt +44 -0
  143. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/ClusterStrategy.kt +21 -0
  144. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/ColorValue.kt +59 -0
  145. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Coordinate.kt +41 -0
  146. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/EdgePadding.kt +47 -0
  147. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Func_void.kt +80 -0
  148. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Func_void_ClusterPressEvent.kt +80 -0
  149. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Func_void_MapError.kt +80 -0
  150. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Func_void_MapPressEvent.kt +80 -0
  151. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Func_void_MarkerDragEvent.kt +80 -0
  152. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Func_void_MarkerPressEvent.kt +80 -0
  153. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Func_void_RegionChangeEvent.kt +80 -0
  154. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/HybridNitroMapConfigSpec.kt +61 -0
  155. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/HybridNitroMapSpec.kt +342 -0
  156. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/ImageMarkerConfig.kt +56 -0
  157. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MapBoundaries.kt +41 -0
  158. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MapError.kt +41 -0
  159. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MapPressEvent.kt +41 -0
  160. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MapProvider.kt +22 -0
  161. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MapStyleElement.kt +44 -0
  162. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MapStyler.kt +53 -0
  163. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MapType.kt +22 -0
  164. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MarkerAnimation.kt +22 -0
  165. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MarkerColor.kt +47 -0
  166. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MarkerConfig.kt +44 -0
  167. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MarkerData.kt +71 -0
  168. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MarkerDragEvent.kt +41 -0
  169. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MarkerPressEvent.kt +41 -0
  170. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MarkerStyle.kt +22 -0
  171. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Point.kt +41 -0
  172. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/PriceMarkerStyle.kt +68 -0
  173. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Region.kt +47 -0
  174. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/RegionChangeEvent.kt +41 -0
  175. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Variant_String_MarkerColor.kt +59 -0
  176. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/nitromapOnLoad.kt +35 -0
  177. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/views/HybridNitroMapManager.kt +50 -0
  178. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/views/HybridNitroMapStateUpdater.kt +23 -0
  179. package/nitrogen/generated/android/nitromap+autolinking.cmake +87 -0
  180. package/nitrogen/generated/android/nitromap+autolinking.gradle +27 -0
  181. package/nitrogen/generated/android/nitromapOnLoad.cpp +70 -0
  182. package/nitrogen/generated/android/nitromapOnLoad.hpp +25 -0
  183. package/nitrogen/generated/ios/NitroMap+autolinking.rb +60 -0
  184. package/nitrogen/generated/ios/NitroMap-Swift-Cxx-Bridge.cpp +130 -0
  185. package/nitrogen/generated/ios/NitroMap-Swift-Cxx-Bridge.hpp +793 -0
  186. package/nitrogen/generated/ios/NitroMap-Swift-Cxx-Umbrella.hpp +132 -0
  187. package/nitrogen/generated/ios/NitroMapAutolinking.mm +41 -0
  188. package/nitrogen/generated/ios/NitroMapAutolinking.swift +40 -0
  189. package/nitrogen/generated/ios/c++/HybridNitroMapConfigSpecSwift.cpp +11 -0
  190. package/nitrogen/generated/ios/c++/HybridNitroMapConfigSpecSwift.hpp +84 -0
  191. package/nitrogen/generated/ios/c++/HybridNitroMapSpecSwift.cpp +11 -0
  192. package/nitrogen/generated/ios/c++/HybridNitroMapSpecSwift.hpp +410 -0
  193. package/nitrogen/generated/ios/c++/views/HybridNitroMapComponent.mm +206 -0
  194. package/nitrogen/generated/ios/swift/Camera.swift +80 -0
  195. package/nitrogen/generated/ios/swift/ClusterAnimationStyle.swift +52 -0
  196. package/nitrogen/generated/ios/swift/ClusterConfig.swift +268 -0
  197. package/nitrogen/generated/ios/swift/ClusterPressEvent.swift +70 -0
  198. package/nitrogen/generated/ios/swift/ClusterStrategy.swift +40 -0
  199. package/nitrogen/generated/ios/swift/ColorValue.swift +18 -0
  200. package/nitrogen/generated/ios/swift/Coordinate.swift +47 -0
  201. package/nitrogen/generated/ios/swift/EdgePadding.swift +69 -0
  202. package/nitrogen/generated/ios/swift/Func_void.swift +47 -0
  203. package/nitrogen/generated/ios/swift/Func_void_Camera.swift +47 -0
  204. package/nitrogen/generated/ios/swift/Func_void_ClusterPressEvent.swift +47 -0
  205. package/nitrogen/generated/ios/swift/Func_void_MapBoundaries.swift +47 -0
  206. package/nitrogen/generated/ios/swift/Func_void_MapError.swift +47 -0
  207. package/nitrogen/generated/ios/swift/Func_void_MapPressEvent.swift +47 -0
  208. package/nitrogen/generated/ios/swift/Func_void_MarkerDragEvent.swift +47 -0
  209. package/nitrogen/generated/ios/swift/Func_void_MarkerPressEvent.swift +47 -0
  210. package/nitrogen/generated/ios/swift/Func_void_RegionChangeEvent.swift +47 -0
  211. package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +47 -0
  212. package/nitrogen/generated/ios/swift/HybridNitroMapConfigSpec.swift +57 -0
  213. package/nitrogen/generated/ios/swift/HybridNitroMapConfigSpec_cxx.swift +142 -0
  214. package/nitrogen/generated/ios/swift/HybridNitroMapSpec.swift +93 -0
  215. package/nitrogen/generated/ios/swift/HybridNitroMapSpec_cxx.swift +953 -0
  216. package/nitrogen/generated/ios/swift/ImageMarkerConfig.swift +166 -0
  217. package/nitrogen/generated/ios/swift/MapBoundaries.swift +47 -0
  218. package/nitrogen/generated/ios/swift/MapError.swift +47 -0
  219. package/nitrogen/generated/ios/swift/MapPressEvent.swift +47 -0
  220. package/nitrogen/generated/ios/swift/MapProvider.swift +44 -0
  221. package/nitrogen/generated/ios/swift/MapStyleElement.swift +108 -0
  222. package/nitrogen/generated/ios/swift/MapStyler.swift +177 -0
  223. package/nitrogen/generated/ios/swift/MapType.swift +44 -0
  224. package/nitrogen/generated/ios/swift/MarkerAnimation.swift +44 -0
  225. package/nitrogen/generated/ios/swift/MarkerColor.swift +69 -0
  226. package/nitrogen/generated/ios/swift/MarkerConfig.swift +82 -0
  227. package/nitrogen/generated/ios/swift/MarkerData.swift +195 -0
  228. package/nitrogen/generated/ios/swift/MarkerDragEvent.swift +47 -0
  229. package/nitrogen/generated/ios/swift/MarkerPressEvent.swift +47 -0
  230. package/nitrogen/generated/ios/swift/MarkerStyle.swift +44 -0
  231. package/nitrogen/generated/ios/swift/Point.swift +47 -0
  232. package/nitrogen/generated/ios/swift/PriceMarkerStyle.swift +374 -0
  233. package/nitrogen/generated/ios/swift/Region.swift +69 -0
  234. package/nitrogen/generated/ios/swift/RegionChangeEvent.swift +47 -0
  235. package/nitrogen/generated/ios/swift/Variant_String_MarkerColor.swift +18 -0
  236. package/nitrogen/generated/shared/c++/Camera.hpp +92 -0
  237. package/nitrogen/generated/shared/c++/ClusterAnimationStyle.hpp +88 -0
  238. package/nitrogen/generated/shared/c++/ClusterConfig.hpp +140 -0
  239. package/nitrogen/generated/shared/c++/ClusterPressEvent.hpp +86 -0
  240. package/nitrogen/generated/shared/c++/ClusterStrategy.hpp +76 -0
  241. package/nitrogen/generated/shared/c++/Coordinate.hpp +79 -0
  242. package/nitrogen/generated/shared/c++/EdgePadding.hpp +87 -0
  243. package/nitrogen/generated/shared/c++/HybridNitroMapConfigSpec.cpp +22 -0
  244. package/nitrogen/generated/shared/c++/HybridNitroMapConfigSpec.hpp +65 -0
  245. package/nitrogen/generated/shared/c++/HybridNitroMapSpec.cpp +82 -0
  246. package/nitrogen/generated/shared/c++/HybridNitroMapSpec.hpp +173 -0
  247. package/nitrogen/generated/shared/c++/ImageMarkerConfig.hpp +103 -0
  248. package/nitrogen/generated/shared/c++/MapBoundaries.hpp +80 -0
  249. package/nitrogen/generated/shared/c++/MapError.hpp +79 -0
  250. package/nitrogen/generated/shared/c++/MapPressEvent.hpp +83 -0
  251. package/nitrogen/generated/shared/c++/MapProvider.hpp +80 -0
  252. package/nitrogen/generated/shared/c++/MapStyleElement.hpp +87 -0
  253. package/nitrogen/generated/shared/c++/MapStyler.hpp +96 -0
  254. package/nitrogen/generated/shared/c++/MapType.hpp +80 -0
  255. package/nitrogen/generated/shared/c++/MarkerAnimation.hpp +80 -0
  256. package/nitrogen/generated/shared/c++/MarkerColor.hpp +87 -0
  257. package/nitrogen/generated/shared/c++/MarkerConfig.hpp +91 -0
  258. package/nitrogen/generated/shared/c++/MarkerData.hpp +131 -0
  259. package/nitrogen/generated/shared/c++/MarkerDragEvent.hpp +81 -0
  260. package/nitrogen/generated/shared/c++/MarkerPressEvent.hpp +81 -0
  261. package/nitrogen/generated/shared/c++/MarkerStyle.hpp +80 -0
  262. package/nitrogen/generated/shared/c++/Point.hpp +79 -0
  263. package/nitrogen/generated/shared/c++/PriceMarkerStyle.hpp +119 -0
  264. package/nitrogen/generated/shared/c++/Region.hpp +87 -0
  265. package/nitrogen/generated/shared/c++/RegionChangeEvent.hpp +80 -0
  266. package/nitrogen/generated/shared/c++/views/HybridNitroMapComponent.cpp +351 -0
  267. package/nitrogen/generated/shared/c++/views/HybridNitroMapComponent.hpp +141 -0
  268. package/nitrogen/generated/shared/json/NitroMapConfig.json +32 -0
  269. package/package.json +176 -0
  270. package/react-native.config.js +16 -0
  271. package/src/components/ImageMarker.tsx +254 -0
  272. package/src/components/NitroMap.tsx +433 -0
  273. package/src/components/PriceMarker.tsx +311 -0
  274. package/src/context/NitroMapContext.tsx +33 -0
  275. package/src/hooks/useNitroMarker.ts +198 -0
  276. package/src/index.tsx +62 -0
  277. package/src/modules/index.ts +6 -0
  278. package/src/modules/module.ts +45 -0
  279. package/src/specs/NitroMap.nitro.ts +292 -0
  280. package/src/specs/NitroMapConfig.nitro.ts +8 -0
  281. package/src/types/map.ts +166 -0
  282. package/src/types/marker.ts +267 -0
  283. package/src/utils/colors.ts +159 -0
@@ -0,0 +1,80 @@
1
+ ///
2
+ /// Func_void_RegionChangeEvent.kt
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2026 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ package com.margelo.nitro.nitromap
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.jni.HybridData
12
+ import com.facebook.proguard.annotations.DoNotStrip
13
+ import dalvik.annotation.optimization.FastNative
14
+
15
+
16
+ /**
17
+ * Represents the JavaScript callback `(region: struct) => void`.
18
+ * This can be either implemented in C++ (in which case it might be a callback coming from JS),
19
+ * or in Kotlin/Java (in which case it is a native callback).
20
+ */
21
+ @DoNotStrip
22
+ @Keep
23
+ @Suppress("ClassName", "RedundantUnitReturnType")
24
+ fun interface Func_void_RegionChangeEvent: (RegionChangeEvent) -> Unit {
25
+ /**
26
+ * Call the given JS callback.
27
+ * @throws Throwable if the JS function itself throws an error, or if the JS function/runtime has already been deleted.
28
+ */
29
+ @DoNotStrip
30
+ @Keep
31
+ override fun invoke(region: RegionChangeEvent): Unit
32
+ }
33
+
34
+ /**
35
+ * Represents the JavaScript callback `(region: struct) => void`.
36
+ * This is implemented in C++, via a `std::function<...>`.
37
+ * The callback might be coming from JS.
38
+ */
39
+ @DoNotStrip
40
+ @Keep
41
+ @Suppress(
42
+ "KotlinJniMissingFunction", "unused",
43
+ "RedundantSuppression", "RedundantUnitReturnType", "FunctionName",
44
+ "ConvertSecondaryConstructorToPrimary", "ClassName", "LocalVariableName",
45
+ )
46
+ class Func_void_RegionChangeEvent_cxx: Func_void_RegionChangeEvent {
47
+ @DoNotStrip
48
+ @Keep
49
+ private val mHybridData: HybridData
50
+
51
+ @DoNotStrip
52
+ @Keep
53
+ private constructor(hybridData: HybridData) {
54
+ mHybridData = hybridData
55
+ }
56
+
57
+ @DoNotStrip
58
+ @Keep
59
+ override fun invoke(region: RegionChangeEvent): Unit
60
+ = invoke_cxx(region)
61
+
62
+ @FastNative
63
+ private external fun invoke_cxx(region: RegionChangeEvent): Unit
64
+ }
65
+
66
+ /**
67
+ * Represents the JavaScript callback `(region: struct) => void`.
68
+ * This is implemented in Java/Kotlin, via a `(RegionChangeEvent) -> Unit`.
69
+ * The callback is always coming from native.
70
+ */
71
+ @DoNotStrip
72
+ @Keep
73
+ @Suppress("ClassName", "RedundantUnitReturnType", "unused")
74
+ class Func_void_RegionChangeEvent_java(private val function: (RegionChangeEvent) -> Unit): Func_void_RegionChangeEvent {
75
+ @DoNotStrip
76
+ @Keep
77
+ override fun invoke(region: RegionChangeEvent): Unit {
78
+ return this.function(region)
79
+ }
80
+ }
@@ -0,0 +1,61 @@
1
+ ///
2
+ /// HybridNitroMapConfigSpec.kt
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2026 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ package com.margelo.nitro.nitromap
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.jni.HybridData
12
+ import com.facebook.proguard.annotations.DoNotStrip
13
+ import com.margelo.nitro.core.HybridObject
14
+
15
+ /**
16
+ * A Kotlin class representing the NitroMapConfig HybridObject.
17
+ * Implement this abstract class to create Kotlin-based instances of NitroMapConfig.
18
+ */
19
+ @DoNotStrip
20
+ @Keep
21
+ @Suppress(
22
+ "KotlinJniMissingFunction", "unused",
23
+ "RedundantSuppression", "RedundantUnitReturnType", "SimpleRedundantLet",
24
+ "LocalVariableName", "PropertyName", "PrivatePropertyName", "FunctionName"
25
+ )
26
+ abstract class HybridNitroMapConfigSpec: HybridObject() {
27
+ @DoNotStrip
28
+ private var mHybridData: HybridData = initHybrid()
29
+
30
+ init {
31
+ super.updateNative(mHybridData)
32
+ }
33
+
34
+ override fun updateNative(hybridData: HybridData) {
35
+ mHybridData = hybridData
36
+ super.updateNative(hybridData)
37
+ }
38
+
39
+ // Default implementation of `HybridObject.toString()`
40
+ override fun toString(): String {
41
+ return "[HybridObject NitroMapConfig]"
42
+ }
43
+
44
+ // Properties
45
+
46
+
47
+ // Methods
48
+ @DoNotStrip
49
+ @Keep
50
+ abstract fun NitroMapInitialize(apiKey: String, provider: MapProvider): Unit
51
+
52
+ @DoNotStrip
53
+ @Keep
54
+ abstract fun IsNitroMapInitialized(): Boolean
55
+
56
+ private external fun initHybrid(): HybridData
57
+
58
+ companion object {
59
+ protected const val TAG = "HybridNitroMapConfigSpec"
60
+ }
61
+ }
@@ -0,0 +1,342 @@
1
+ ///
2
+ /// HybridNitroMapSpec.kt
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2026 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ package com.margelo.nitro.nitromap
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.jni.HybridData
12
+ import com.facebook.proguard.annotations.DoNotStrip
13
+ import com.margelo.nitro.core.Promise
14
+ import com.margelo.nitro.views.HybridView
15
+
16
+ /**
17
+ * A Kotlin class representing the NitroMap HybridObject.
18
+ * Implement this abstract class to create Kotlin-based instances of NitroMap.
19
+ */
20
+ @DoNotStrip
21
+ @Keep
22
+ @Suppress(
23
+ "KotlinJniMissingFunction", "unused",
24
+ "RedundantSuppression", "RedundantUnitReturnType", "SimpleRedundantLet",
25
+ "LocalVariableName", "PropertyName", "PrivatePropertyName", "FunctionName"
26
+ )
27
+ abstract class HybridNitroMapSpec: HybridView() {
28
+ @DoNotStrip
29
+ private var mHybridData: HybridData = initHybrid()
30
+
31
+ init {
32
+ super.updateNative(mHybridData)
33
+ }
34
+
35
+ override fun updateNative(hybridData: HybridData) {
36
+ mHybridData = hybridData
37
+ super.updateNative(hybridData)
38
+ }
39
+
40
+ // Default implementation of `HybridObject.toString()`
41
+ override fun toString(): String {
42
+ return "[HybridObject NitroMap]"
43
+ }
44
+
45
+ // Properties
46
+ @get:DoNotStrip
47
+ @get:Keep
48
+ @set:DoNotStrip
49
+ @set:Keep
50
+ abstract var provider: MapProvider?
51
+
52
+ @get:DoNotStrip
53
+ @get:Keep
54
+ @set:DoNotStrip
55
+ @set:Keep
56
+ abstract var initialRegion: Region?
57
+
58
+ @get:DoNotStrip
59
+ @get:Keep
60
+ @set:DoNotStrip
61
+ @set:Keep
62
+ abstract var showsUserLocation: Boolean?
63
+
64
+ @get:DoNotStrip
65
+ @get:Keep
66
+ @set:DoNotStrip
67
+ @set:Keep
68
+ abstract var zoomEnabled: Boolean?
69
+
70
+ @get:DoNotStrip
71
+ @get:Keep
72
+ @set:DoNotStrip
73
+ @set:Keep
74
+ abstract var scrollEnabled: Boolean?
75
+
76
+ @get:DoNotStrip
77
+ @get:Keep
78
+ @set:DoNotStrip
79
+ @set:Keep
80
+ abstract var rotateEnabled: Boolean?
81
+
82
+ @get:DoNotStrip
83
+ @get:Keep
84
+ @set:DoNotStrip
85
+ @set:Keep
86
+ abstract var pitchEnabled: Boolean?
87
+
88
+ @get:DoNotStrip
89
+ @get:Keep
90
+ @set:DoNotStrip
91
+ @set:Keep
92
+ abstract var mapType: MapType?
93
+
94
+ @get:DoNotStrip
95
+ @get:Keep
96
+ @set:DoNotStrip
97
+ @set:Keep
98
+ abstract var customMapStyle: Array<MapStyleElement>?
99
+
100
+ @get:DoNotStrip
101
+ @get:Keep
102
+ @set:DoNotStrip
103
+ @set:Keep
104
+ abstract var showsMyLocationButton: Boolean?
105
+
106
+ @get:DoNotStrip
107
+ @get:Keep
108
+ @set:DoNotStrip
109
+ @set:Keep
110
+ abstract var clusterConfig: ClusterConfig?
111
+
112
+ @get:DoNotStrip
113
+ @get:Keep
114
+ @set:DoNotStrip
115
+ @set:Keep
116
+ abstract var darkMode: Boolean?
117
+
118
+ abstract var onPress: ((event: MapPressEvent) -> Unit)?
119
+
120
+ private var onPress_cxx: Func_void_MapPressEvent?
121
+ @Keep
122
+ @DoNotStrip
123
+ get() {
124
+ return onPress?.let { Func_void_MapPressEvent_java(it) }
125
+ }
126
+ @Keep
127
+ @DoNotStrip
128
+ set(value) {
129
+ onPress = value?.let { it }
130
+ }
131
+
132
+ abstract var onLongPress: ((event: MapPressEvent) -> Unit)?
133
+
134
+ private var onLongPress_cxx: Func_void_MapPressEvent?
135
+ @Keep
136
+ @DoNotStrip
137
+ get() {
138
+ return onLongPress?.let { Func_void_MapPressEvent_java(it) }
139
+ }
140
+ @Keep
141
+ @DoNotStrip
142
+ set(value) {
143
+ onLongPress = value?.let { it }
144
+ }
145
+
146
+ abstract var onMapReady: (() -> Unit)?
147
+
148
+ private var onMapReady_cxx: Func_void?
149
+ @Keep
150
+ @DoNotStrip
151
+ get() {
152
+ return onMapReady?.let { Func_void_java(it) }
153
+ }
154
+ @Keep
155
+ @DoNotStrip
156
+ set(value) {
157
+ onMapReady = value?.let { it }
158
+ }
159
+
160
+ abstract var onRegionChange: ((region: RegionChangeEvent) -> Unit)?
161
+
162
+ private var onRegionChange_cxx: Func_void_RegionChangeEvent?
163
+ @Keep
164
+ @DoNotStrip
165
+ get() {
166
+ return onRegionChange?.let { Func_void_RegionChangeEvent_java(it) }
167
+ }
168
+ @Keep
169
+ @DoNotStrip
170
+ set(value) {
171
+ onRegionChange = value?.let { it }
172
+ }
173
+
174
+ abstract var onRegionChangeComplete: ((region: RegionChangeEvent) -> Unit)?
175
+
176
+ private var onRegionChangeComplete_cxx: Func_void_RegionChangeEvent?
177
+ @Keep
178
+ @DoNotStrip
179
+ get() {
180
+ return onRegionChangeComplete?.let { Func_void_RegionChangeEvent_java(it) }
181
+ }
182
+ @Keep
183
+ @DoNotStrip
184
+ set(value) {
185
+ onRegionChangeComplete = value?.let { it }
186
+ }
187
+
188
+ abstract var onMarkerPress: ((event: MarkerPressEvent) -> Unit)?
189
+
190
+ private var onMarkerPress_cxx: Func_void_MarkerPressEvent?
191
+ @Keep
192
+ @DoNotStrip
193
+ get() {
194
+ return onMarkerPress?.let { Func_void_MarkerPressEvent_java(it) }
195
+ }
196
+ @Keep
197
+ @DoNotStrip
198
+ set(value) {
199
+ onMarkerPress = value?.let { it }
200
+ }
201
+
202
+ abstract var onMarkerDragStart: ((event: MarkerDragEvent) -> Unit)?
203
+
204
+ private var onMarkerDragStart_cxx: Func_void_MarkerDragEvent?
205
+ @Keep
206
+ @DoNotStrip
207
+ get() {
208
+ return onMarkerDragStart?.let { Func_void_MarkerDragEvent_java(it) }
209
+ }
210
+ @Keep
211
+ @DoNotStrip
212
+ set(value) {
213
+ onMarkerDragStart = value?.let { it }
214
+ }
215
+
216
+ abstract var onMarkerDrag: ((event: MarkerDragEvent) -> Unit)?
217
+
218
+ private var onMarkerDrag_cxx: Func_void_MarkerDragEvent?
219
+ @Keep
220
+ @DoNotStrip
221
+ get() {
222
+ return onMarkerDrag?.let { Func_void_MarkerDragEvent_java(it) }
223
+ }
224
+ @Keep
225
+ @DoNotStrip
226
+ set(value) {
227
+ onMarkerDrag = value?.let { it }
228
+ }
229
+
230
+ abstract var onMarkerDragEnd: ((event: MarkerDragEvent) -> Unit)?
231
+
232
+ private var onMarkerDragEnd_cxx: Func_void_MarkerDragEvent?
233
+ @Keep
234
+ @DoNotStrip
235
+ get() {
236
+ return onMarkerDragEnd?.let { Func_void_MarkerDragEvent_java(it) }
237
+ }
238
+ @Keep
239
+ @DoNotStrip
240
+ set(value) {
241
+ onMarkerDragEnd = value?.let { it }
242
+ }
243
+
244
+ abstract var onClusterPress: ((event: ClusterPressEvent) -> Unit)?
245
+
246
+ private var onClusterPress_cxx: Func_void_ClusterPressEvent?
247
+ @Keep
248
+ @DoNotStrip
249
+ get() {
250
+ return onClusterPress?.let { Func_void_ClusterPressEvent_java(it) }
251
+ }
252
+ @Keep
253
+ @DoNotStrip
254
+ set(value) {
255
+ onClusterPress = value?.let { it }
256
+ }
257
+
258
+ abstract var onError: ((error: MapError) -> Unit)?
259
+
260
+ private var onError_cxx: Func_void_MapError?
261
+ @Keep
262
+ @DoNotStrip
263
+ get() {
264
+ return onError?.let { Func_void_MapError_java(it) }
265
+ }
266
+ @Keep
267
+ @DoNotStrip
268
+ set(value) {
269
+ onError = value?.let { it }
270
+ }
271
+
272
+ // Methods
273
+ @DoNotStrip
274
+ @Keep
275
+ abstract fun animateToRegion(region: Region, duration: Double?): Unit
276
+
277
+ @DoNotStrip
278
+ @Keep
279
+ abstract fun fitToCoordinates(coordinates: Array<Coordinate>, edgePadding: EdgePadding?, animated: Boolean?): Unit
280
+
281
+ @DoNotStrip
282
+ @Keep
283
+ abstract fun animateCamera(camera: Camera, duration: Double?): Unit
284
+
285
+ @DoNotStrip
286
+ @Keep
287
+ abstract fun getCamera(): Promise<Camera>
288
+
289
+ @DoNotStrip
290
+ @Keep
291
+ abstract fun setCamera(camera: Camera): Unit
292
+
293
+ @DoNotStrip
294
+ @Keep
295
+ abstract fun setMapStyle(style: Array<MapStyleElement>?): Unit
296
+
297
+ @DoNotStrip
298
+ @Keep
299
+ abstract fun getMapBoundaries(): Promise<MapBoundaries>
300
+
301
+ @DoNotStrip
302
+ @Keep
303
+ abstract fun setIsDarkMode(enabled: Boolean): Unit
304
+
305
+ @DoNotStrip
306
+ @Keep
307
+ abstract fun addMarker(marker: MarkerData): Unit
308
+
309
+ @DoNotStrip
310
+ @Keep
311
+ abstract fun addMarkers(markers: Array<MarkerData>): Unit
312
+
313
+ @DoNotStrip
314
+ @Keep
315
+ abstract fun updateMarker(marker: MarkerData): Unit
316
+
317
+ @DoNotStrip
318
+ @Keep
319
+ abstract fun removeMarker(id: String): Unit
320
+
321
+ @DoNotStrip
322
+ @Keep
323
+ abstract fun selectMarker(id: String): Unit
324
+
325
+ @DoNotStrip
326
+ @Keep
327
+ abstract fun clearMarkers(): Unit
328
+
329
+ @DoNotStrip
330
+ @Keep
331
+ abstract fun setClusteringEnabled(enabled: Boolean): Unit
332
+
333
+ @DoNotStrip
334
+ @Keep
335
+ abstract fun refreshClusters(): Unit
336
+
337
+ private external fun initHybrid(): HybridData
338
+
339
+ companion object {
340
+ protected const val TAG = "HybridNitroMapSpec"
341
+ }
342
+ }
@@ -0,0 +1,56 @@
1
+ ///
2
+ /// ImageMarkerConfig.kt
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2026 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ package com.margelo.nitro.nitromap
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.proguard.annotations.DoNotStrip
12
+
13
+
14
+ /**
15
+ * Represents the JavaScript object/struct "ImageMarkerConfig".
16
+ */
17
+ @DoNotStrip
18
+ @Keep
19
+ data class ImageMarkerConfig(
20
+ @DoNotStrip
21
+ @Keep
22
+ val imageUrl: String?,
23
+ @DoNotStrip
24
+ @Keep
25
+ val imageBase64: String?,
26
+ @DoNotStrip
27
+ @Keep
28
+ val width: Double,
29
+ @DoNotStrip
30
+ @Keep
31
+ val height: Double,
32
+ @DoNotStrip
33
+ @Keep
34
+ val cornerRadius: Double,
35
+ @DoNotStrip
36
+ @Keep
37
+ val borderWidth: Double,
38
+ @DoNotStrip
39
+ @Keep
40
+ val borderColor: ColorValue
41
+ ) {
42
+ /* primary constructor */
43
+
44
+ private companion object {
45
+ /**
46
+ * Constructor called from C++
47
+ */
48
+ @DoNotStrip
49
+ @Keep
50
+ @Suppress("unused")
51
+ @JvmStatic
52
+ private fun fromCpp(imageUrl: String?, imageBase64: String?, width: Double, height: Double, cornerRadius: Double, borderWidth: Double, borderColor: ColorValue): ImageMarkerConfig {
53
+ return ImageMarkerConfig(imageUrl, imageBase64, width, height, cornerRadius, borderWidth, borderColor)
54
+ }
55
+ }
56
+ }
@@ -0,0 +1,41 @@
1
+ ///
2
+ /// MapBoundaries.kt
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2026 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ package com.margelo.nitro.nitromap
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.proguard.annotations.DoNotStrip
12
+
13
+
14
+ /**
15
+ * Represents the JavaScript object/struct "MapBoundaries".
16
+ */
17
+ @DoNotStrip
18
+ @Keep
19
+ data class MapBoundaries(
20
+ @DoNotStrip
21
+ @Keep
22
+ val northEast: Coordinate,
23
+ @DoNotStrip
24
+ @Keep
25
+ val southWest: Coordinate
26
+ ) {
27
+ /* primary constructor */
28
+
29
+ private companion object {
30
+ /**
31
+ * Constructor called from C++
32
+ */
33
+ @DoNotStrip
34
+ @Keep
35
+ @Suppress("unused")
36
+ @JvmStatic
37
+ private fun fromCpp(northEast: Coordinate, southWest: Coordinate): MapBoundaries {
38
+ return MapBoundaries(northEast, southWest)
39
+ }
40
+ }
41
+ }
@@ -0,0 +1,41 @@
1
+ ///
2
+ /// MapError.kt
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2026 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ package com.margelo.nitro.nitromap
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.proguard.annotations.DoNotStrip
12
+
13
+
14
+ /**
15
+ * Represents the JavaScript object/struct "MapError".
16
+ */
17
+ @DoNotStrip
18
+ @Keep
19
+ data class MapError(
20
+ @DoNotStrip
21
+ @Keep
22
+ val code: String,
23
+ @DoNotStrip
24
+ @Keep
25
+ val message: String
26
+ ) {
27
+ /* primary constructor */
28
+
29
+ private companion object {
30
+ /**
31
+ * Constructor called from C++
32
+ */
33
+ @DoNotStrip
34
+ @Keep
35
+ @Suppress("unused")
36
+ @JvmStatic
37
+ private fun fromCpp(code: String, message: String): MapError {
38
+ return MapError(code, message)
39
+ }
40
+ }
41
+ }
@@ -0,0 +1,41 @@
1
+ ///
2
+ /// MapPressEvent.kt
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2026 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ package com.margelo.nitro.nitromap
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.proguard.annotations.DoNotStrip
12
+
13
+
14
+ /**
15
+ * Represents the JavaScript object/struct "MapPressEvent".
16
+ */
17
+ @DoNotStrip
18
+ @Keep
19
+ data class MapPressEvent(
20
+ @DoNotStrip
21
+ @Keep
22
+ val coordinate: Coordinate,
23
+ @DoNotStrip
24
+ @Keep
25
+ val position: Point
26
+ ) {
27
+ /* primary constructor */
28
+
29
+ private companion object {
30
+ /**
31
+ * Constructor called from C++
32
+ */
33
+ @DoNotStrip
34
+ @Keep
35
+ @Suppress("unused")
36
+ @JvmStatic
37
+ private fun fromCpp(coordinate: Coordinate, position: Point): MapPressEvent {
38
+ return MapPressEvent(coordinate, position)
39
+ }
40
+ }
41
+ }
@@ -0,0 +1,22 @@
1
+ ///
2
+ /// MapProvider.kt
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2026 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ package com.margelo.nitro.nitromap
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.proguard.annotations.DoNotStrip
12
+
13
+ /**
14
+ * Represents the JavaScript enum/union "MapProvider".
15
+ */
16
+ @DoNotStrip
17
+ @Keep
18
+ enum class MapProvider(@DoNotStrip @Keep val value: Int) {
19
+ GOOGLE(0),
20
+ APPLE(1),
21
+ YANDEX(2);
22
+ }