react-native-google-maps-plus 1.12.0-dev.4 → 1.12.0-dev.5

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 (77) hide show
  1. package/README.md +1 -1
  2. package/RNGoogleMapsPlus.podspec +1 -1
  3. package/android/src/main/cpp/cpp-adapter.cpp +4 -1
  4. package/android/src/main/java/com/rngooglemapsplus/RNGoogleMapsPlusView.kt +1 -2
  5. package/ios/RNGoogleMapsPlusView.swift +1 -1
  6. package/nitro.json +16 -4
  7. package/nitrogen/generated/android/RNGoogleMapsPlusOnLoad.cpp +52 -36
  8. package/nitrogen/generated/android/RNGoogleMapsPlusOnLoad.hpp +13 -4
  9. package/nitrogen/generated/android/c++/JFunc_void_RNIndoorBuilding.hpp +2 -2
  10. package/nitrogen/generated/android/c++/JFunc_void_RNIndoorLevel.hpp +2 -2
  11. package/nitrogen/generated/android/c++/JFunc_void_RNLatLng.hpp +2 -2
  12. package/nitrogen/generated/android/c++/JFunc_void_RNLocation.hpp +2 -2
  13. package/nitrogen/generated/android/c++/JFunc_void_RNLocationErrorCode.hpp +2 -2
  14. package/nitrogen/generated/android/c++/JFunc_void_RNMapErrorCode_std__string.hpp +2 -2
  15. package/nitrogen/generated/android/c++/JFunc_void_RNRegion_RNCamera.hpp +2 -2
  16. package/nitrogen/generated/android/c++/JFunc_void_RNRegion_RNCamera_bool.hpp +2 -2
  17. package/nitrogen/generated/android/c++/JFunc_void_bool.hpp +2 -2
  18. package/nitrogen/generated/android/c++/JFunc_void_std__string.hpp +2 -2
  19. package/nitrogen/generated/android/c++/JFunc_void_std__string_RNLatLng.hpp +2 -2
  20. package/nitrogen/generated/android/c++/JFunc_void_std__string_std__string_RNLatLng.hpp +2 -2
  21. package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusModuleSpec.cpp +22 -28
  22. package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusModuleSpec.hpp +19 -22
  23. package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.cpp +119 -125
  24. package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.hpp +19 -22
  25. package/nitrogen/generated/android/c++/JRNAndroidLocationConfig.hpp +1 -1
  26. package/nitrogen/generated/android/c++/JRNAndroidLocationPermissionResult.hpp +1 -1
  27. package/nitrogen/generated/android/c++/JRNAndroidLocationPriority.hpp +1 -1
  28. package/nitrogen/generated/android/c++/JRNCamera.hpp +1 -1
  29. package/nitrogen/generated/android/c++/JRNCameraUpdate.hpp +1 -1
  30. package/nitrogen/generated/android/c++/JRNCircle.hpp +1 -1
  31. package/nitrogen/generated/android/c++/JRNHeatmap.hpp +1 -1
  32. package/nitrogen/generated/android/c++/JRNHeatmapGradient.hpp +1 -1
  33. package/nitrogen/generated/android/c++/JRNHeatmapPoint.hpp +1 -1
  34. package/nitrogen/generated/android/c++/JRNIOSLocationAccuracy.hpp +1 -1
  35. package/nitrogen/generated/android/c++/JRNIOSLocationActivityType.hpp +1 -1
  36. package/nitrogen/generated/android/c++/JRNIOSLocationConfig.hpp +1 -1
  37. package/nitrogen/generated/android/c++/JRNIOSPermissionResult.hpp +1 -1
  38. package/nitrogen/generated/android/c++/JRNIndoorBuilding.hpp +1 -1
  39. package/nitrogen/generated/android/c++/JRNIndoorLevel.hpp +1 -1
  40. package/nitrogen/generated/android/c++/JRNInitialProps.hpp +1 -1
  41. package/nitrogen/generated/android/c++/JRNKMLayer.hpp +1 -1
  42. package/nitrogen/generated/android/c++/JRNLatLng.hpp +1 -1
  43. package/nitrogen/generated/android/c++/JRNLatLngBounds.hpp +1 -1
  44. package/nitrogen/generated/android/c++/JRNLineCapType.hpp +1 -1
  45. package/nitrogen/generated/android/c++/JRNLineJoinType.hpp +1 -1
  46. package/nitrogen/generated/android/c++/JRNLocation.hpp +1 -1
  47. package/nitrogen/generated/android/c++/JRNLocationAndroid.hpp +1 -1
  48. package/nitrogen/generated/android/c++/JRNLocationConfig.hpp +1 -1
  49. package/nitrogen/generated/android/c++/JRNLocationErrorCode.hpp +1 -1
  50. package/nitrogen/generated/android/c++/JRNLocationIOS.hpp +1 -1
  51. package/nitrogen/generated/android/c++/JRNLocationPermissionResult.hpp +1 -1
  52. package/nitrogen/generated/android/c++/JRNMapErrorCode.hpp +1 -1
  53. package/nitrogen/generated/android/c++/JRNMapPadding.hpp +1 -1
  54. package/nitrogen/generated/android/c++/JRNMapType.hpp +1 -1
  55. package/nitrogen/generated/android/c++/JRNMapUiSettings.hpp +1 -1
  56. package/nitrogen/generated/android/c++/JRNMapZoomConfig.hpp +1 -1
  57. package/nitrogen/generated/android/c++/JRNMarker.hpp +1 -1
  58. package/nitrogen/generated/android/c++/JRNMarkerSvg.hpp +1 -1
  59. package/nitrogen/generated/android/c++/JRNPolygon.hpp +1 -1
  60. package/nitrogen/generated/android/c++/JRNPolygonHole.hpp +1 -1
  61. package/nitrogen/generated/android/c++/JRNPolyline.hpp +1 -1
  62. package/nitrogen/generated/android/c++/JRNPosition.hpp +1 -1
  63. package/nitrogen/generated/android/c++/JRNRegion.hpp +1 -1
  64. package/nitrogen/generated/android/c++/JRNSize.hpp +1 -1
  65. package/nitrogen/generated/android/c++/JRNSnapshotFormat.hpp +1 -1
  66. package/nitrogen/generated/android/c++/JRNSnapshotOptions.hpp +1 -1
  67. package/nitrogen/generated/android/c++/JRNSnapshotResultType.hpp +1 -1
  68. package/nitrogen/generated/android/c++/JRNUrlTileOverlay.hpp +1 -1
  69. package/nitrogen/generated/android/c++/JRNUserInterfaceStyle.hpp +1 -1
  70. package/nitrogen/generated/android/c++/views/JHybridRNGoogleMapsPlusViewStateUpdater.cpp +48 -49
  71. package/nitrogen/generated/android/c++/views/JHybridRNGoogleMapsPlusViewStateUpdater.hpp +1 -1
  72. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/HybridRNGoogleMapsPlusModuleSpec.kt +15 -18
  73. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/HybridRNGoogleMapsPlusViewSpec.kt +16 -18
  74. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/views/HybridRNGoogleMapsPlusViewManager.kt +12 -10
  75. package/nitrogen/generated/ios/c++/views/HybridRNGoogleMapsPlusViewComponent.mm +6 -9
  76. package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec_cxx.swift +4 -0
  77. package/package.json +20 -20
@@ -16,9 +16,9 @@ using namespace facebook;
16
16
  using ConcreteStateData = react::ConcreteState<HybridRNGoogleMapsPlusViewState>;
17
17
 
18
18
  void JHybridRNGoogleMapsPlusViewStateUpdater::updateViewProps(jni::alias_ref<jni::JClass> /* class */,
19
- jni::alias_ref<JHybridRNGoogleMapsPlusViewSpec::javaobject> javaView,
19
+ jni::alias_ref<JHybridRNGoogleMapsPlusViewSpec::JavaPart> javaView,
20
20
  jni::alias_ref<JStateWrapper::javaobject> stateWrapperInterface) {
21
- JHybridRNGoogleMapsPlusViewSpec* view = javaView->cthis();
21
+ std::shared_ptr<JHybridRNGoogleMapsPlusViewSpec> hybridView = javaView->getJHybridRNGoogleMapsPlusViewSpec();
22
22
 
23
23
  // Get concrete StateWrapperImpl from passed StateWrapper interface object
24
24
  jobject rawStateWrapper = stateWrapperInterface.get();
@@ -38,183 +38,183 @@ void JHybridRNGoogleMapsPlusViewStateUpdater::updateViewProps(jni::alias_ref<jni
38
38
 
39
39
  // Update all props if they are dirty
40
40
  if (props->initialProps.isDirty) {
41
- view->setInitialProps(props->initialProps.value);
41
+ hybridView->setInitialProps(props->initialProps.value);
42
42
  props->initialProps.isDirty = false;
43
43
  }
44
44
  if (props->uiSettings.isDirty) {
45
- view->setUiSettings(props->uiSettings.value);
45
+ hybridView->setUiSettings(props->uiSettings.value);
46
46
  props->uiSettings.isDirty = false;
47
47
  }
48
48
  if (props->myLocationEnabled.isDirty) {
49
- view->setMyLocationEnabled(props->myLocationEnabled.value);
49
+ hybridView->setMyLocationEnabled(props->myLocationEnabled.value);
50
50
  props->myLocationEnabled.isDirty = false;
51
51
  }
52
52
  if (props->buildingEnabled.isDirty) {
53
- view->setBuildingEnabled(props->buildingEnabled.value);
53
+ hybridView->setBuildingEnabled(props->buildingEnabled.value);
54
54
  props->buildingEnabled.isDirty = false;
55
55
  }
56
56
  if (props->trafficEnabled.isDirty) {
57
- view->setTrafficEnabled(props->trafficEnabled.value);
57
+ hybridView->setTrafficEnabled(props->trafficEnabled.value);
58
58
  props->trafficEnabled.isDirty = false;
59
59
  }
60
60
  if (props->indoorEnabled.isDirty) {
61
- view->setIndoorEnabled(props->indoorEnabled.value);
61
+ hybridView->setIndoorEnabled(props->indoorEnabled.value);
62
62
  props->indoorEnabled.isDirty = false;
63
63
  }
64
64
  if (props->transitEnabled.isDirty) {
65
- view->setTransitEnabled(props->transitEnabled.value);
65
+ hybridView->setTransitEnabled(props->transitEnabled.value);
66
66
  props->transitEnabled.isDirty = false;
67
67
  }
68
68
  if (props->customMapStyle.isDirty) {
69
- view->setCustomMapStyle(props->customMapStyle.value);
69
+ hybridView->setCustomMapStyle(props->customMapStyle.value);
70
70
  props->customMapStyle.isDirty = false;
71
71
  }
72
72
  if (props->userInterfaceStyle.isDirty) {
73
- view->setUserInterfaceStyle(props->userInterfaceStyle.value);
73
+ hybridView->setUserInterfaceStyle(props->userInterfaceStyle.value);
74
74
  props->userInterfaceStyle.isDirty = false;
75
75
  }
76
76
  if (props->mapZoomConfig.isDirty) {
77
- view->setMapZoomConfig(props->mapZoomConfig.value);
77
+ hybridView->setMapZoomConfig(props->mapZoomConfig.value);
78
78
  props->mapZoomConfig.isDirty = false;
79
79
  }
80
80
  if (props->mapPadding.isDirty) {
81
- view->setMapPadding(props->mapPadding.value);
81
+ hybridView->setMapPadding(props->mapPadding.value);
82
82
  props->mapPadding.isDirty = false;
83
83
  }
84
84
  if (props->mapType.isDirty) {
85
- view->setMapType(props->mapType.value);
85
+ hybridView->setMapType(props->mapType.value);
86
86
  props->mapType.isDirty = false;
87
87
  }
88
88
  if (props->markers.isDirty) {
89
- view->setMarkers(props->markers.value);
89
+ hybridView->setMarkers(props->markers.value);
90
90
  props->markers.isDirty = false;
91
91
  }
92
92
  if (props->polygons.isDirty) {
93
- view->setPolygons(props->polygons.value);
93
+ hybridView->setPolygons(props->polygons.value);
94
94
  props->polygons.isDirty = false;
95
95
  }
96
96
  if (props->polylines.isDirty) {
97
- view->setPolylines(props->polylines.value);
97
+ hybridView->setPolylines(props->polylines.value);
98
98
  props->polylines.isDirty = false;
99
99
  }
100
100
  if (props->circles.isDirty) {
101
- view->setCircles(props->circles.value);
101
+ hybridView->setCircles(props->circles.value);
102
102
  props->circles.isDirty = false;
103
103
  }
104
104
  if (props->heatmaps.isDirty) {
105
- view->setHeatmaps(props->heatmaps.value);
105
+ hybridView->setHeatmaps(props->heatmaps.value);
106
106
  props->heatmaps.isDirty = false;
107
107
  }
108
108
  if (props->kmlLayers.isDirty) {
109
- view->setKmlLayers(props->kmlLayers.value);
109
+ hybridView->setKmlLayers(props->kmlLayers.value);
110
110
  props->kmlLayers.isDirty = false;
111
111
  }
112
112
  if (props->urlTileOverlays.isDirty) {
113
- view->setUrlTileOverlays(props->urlTileOverlays.value);
113
+ hybridView->setUrlTileOverlays(props->urlTileOverlays.value);
114
114
  props->urlTileOverlays.isDirty = false;
115
115
  }
116
116
  if (props->locationConfig.isDirty) {
117
- view->setLocationConfig(props->locationConfig.value);
117
+ hybridView->setLocationConfig(props->locationConfig.value);
118
118
  props->locationConfig.isDirty = false;
119
119
  }
120
120
  if (props->onMapError.isDirty) {
121
- view->setOnMapError(props->onMapError.value);
121
+ hybridView->setOnMapError(props->onMapError.value);
122
122
  props->onMapError.isDirty = false;
123
123
  }
124
124
  if (props->onMapReady.isDirty) {
125
- view->setOnMapReady(props->onMapReady.value);
125
+ hybridView->setOnMapReady(props->onMapReady.value);
126
126
  props->onMapReady.isDirty = false;
127
127
  }
128
128
  if (props->onMapLoaded.isDirty) {
129
- view->setOnMapLoaded(props->onMapLoaded.value);
129
+ hybridView->setOnMapLoaded(props->onMapLoaded.value);
130
130
  props->onMapLoaded.isDirty = false;
131
131
  }
132
132
  if (props->onLocationUpdate.isDirty) {
133
- view->setOnLocationUpdate(props->onLocationUpdate.value);
133
+ hybridView->setOnLocationUpdate(props->onLocationUpdate.value);
134
134
  props->onLocationUpdate.isDirty = false;
135
135
  }
136
136
  if (props->onLocationError.isDirty) {
137
- view->setOnLocationError(props->onLocationError.value);
137
+ hybridView->setOnLocationError(props->onLocationError.value);
138
138
  props->onLocationError.isDirty = false;
139
139
  }
140
140
  if (props->onMapPress.isDirty) {
141
- view->setOnMapPress(props->onMapPress.value);
141
+ hybridView->setOnMapPress(props->onMapPress.value);
142
142
  props->onMapPress.isDirty = false;
143
143
  }
144
144
  if (props->onMapLongPress.isDirty) {
145
- view->setOnMapLongPress(props->onMapLongPress.value);
145
+ hybridView->setOnMapLongPress(props->onMapLongPress.value);
146
146
  props->onMapLongPress.isDirty = false;
147
147
  }
148
148
  if (props->onPoiPress.isDirty) {
149
- view->setOnPoiPress(props->onPoiPress.value);
149
+ hybridView->setOnPoiPress(props->onPoiPress.value);
150
150
  props->onPoiPress.isDirty = false;
151
151
  }
152
152
  if (props->onMarkerPress.isDirty) {
153
- view->setOnMarkerPress(props->onMarkerPress.value);
153
+ hybridView->setOnMarkerPress(props->onMarkerPress.value);
154
154
  props->onMarkerPress.isDirty = false;
155
155
  }
156
156
  if (props->onPolylinePress.isDirty) {
157
- view->setOnPolylinePress(props->onPolylinePress.value);
157
+ hybridView->setOnPolylinePress(props->onPolylinePress.value);
158
158
  props->onPolylinePress.isDirty = false;
159
159
  }
160
160
  if (props->onPolygonPress.isDirty) {
161
- view->setOnPolygonPress(props->onPolygonPress.value);
161
+ hybridView->setOnPolygonPress(props->onPolygonPress.value);
162
162
  props->onPolygonPress.isDirty = false;
163
163
  }
164
164
  if (props->onCirclePress.isDirty) {
165
- view->setOnCirclePress(props->onCirclePress.value);
165
+ hybridView->setOnCirclePress(props->onCirclePress.value);
166
166
  props->onCirclePress.isDirty = false;
167
167
  }
168
168
  if (props->onMarkerDragStart.isDirty) {
169
- view->setOnMarkerDragStart(props->onMarkerDragStart.value);
169
+ hybridView->setOnMarkerDragStart(props->onMarkerDragStart.value);
170
170
  props->onMarkerDragStart.isDirty = false;
171
171
  }
172
172
  if (props->onMarkerDrag.isDirty) {
173
- view->setOnMarkerDrag(props->onMarkerDrag.value);
173
+ hybridView->setOnMarkerDrag(props->onMarkerDrag.value);
174
174
  props->onMarkerDrag.isDirty = false;
175
175
  }
176
176
  if (props->onMarkerDragEnd.isDirty) {
177
- view->setOnMarkerDragEnd(props->onMarkerDragEnd.value);
177
+ hybridView->setOnMarkerDragEnd(props->onMarkerDragEnd.value);
178
178
  props->onMarkerDragEnd.isDirty = false;
179
179
  }
180
180
  if (props->onIndoorBuildingFocused.isDirty) {
181
- view->setOnIndoorBuildingFocused(props->onIndoorBuildingFocused.value);
181
+ hybridView->setOnIndoorBuildingFocused(props->onIndoorBuildingFocused.value);
182
182
  props->onIndoorBuildingFocused.isDirty = false;
183
183
  }
184
184
  if (props->onIndoorLevelActivated.isDirty) {
185
- view->setOnIndoorLevelActivated(props->onIndoorLevelActivated.value);
185
+ hybridView->setOnIndoorLevelActivated(props->onIndoorLevelActivated.value);
186
186
  props->onIndoorLevelActivated.isDirty = false;
187
187
  }
188
188
  if (props->onInfoWindowPress.isDirty) {
189
- view->setOnInfoWindowPress(props->onInfoWindowPress.value);
189
+ hybridView->setOnInfoWindowPress(props->onInfoWindowPress.value);
190
190
  props->onInfoWindowPress.isDirty = false;
191
191
  }
192
192
  if (props->onInfoWindowClose.isDirty) {
193
- view->setOnInfoWindowClose(props->onInfoWindowClose.value);
193
+ hybridView->setOnInfoWindowClose(props->onInfoWindowClose.value);
194
194
  props->onInfoWindowClose.isDirty = false;
195
195
  }
196
196
  if (props->onInfoWindowLongPress.isDirty) {
197
- view->setOnInfoWindowLongPress(props->onInfoWindowLongPress.value);
197
+ hybridView->setOnInfoWindowLongPress(props->onInfoWindowLongPress.value);
198
198
  props->onInfoWindowLongPress.isDirty = false;
199
199
  }
200
200
  if (props->onMyLocationPress.isDirty) {
201
- view->setOnMyLocationPress(props->onMyLocationPress.value);
201
+ hybridView->setOnMyLocationPress(props->onMyLocationPress.value);
202
202
  props->onMyLocationPress.isDirty = false;
203
203
  }
204
204
  if (props->onMyLocationButtonPress.isDirty) {
205
- view->setOnMyLocationButtonPress(props->onMyLocationButtonPress.value);
205
+ hybridView->setOnMyLocationButtonPress(props->onMyLocationButtonPress.value);
206
206
  props->onMyLocationButtonPress.isDirty = false;
207
207
  }
208
208
  if (props->onCameraChangeStart.isDirty) {
209
- view->setOnCameraChangeStart(props->onCameraChangeStart.value);
209
+ hybridView->setOnCameraChangeStart(props->onCameraChangeStart.value);
210
210
  props->onCameraChangeStart.isDirty = false;
211
211
  }
212
212
  if (props->onCameraChange.isDirty) {
213
- view->setOnCameraChange(props->onCameraChange.value);
213
+ hybridView->setOnCameraChange(props->onCameraChange.value);
214
214
  props->onCameraChange.isDirty = false;
215
215
  }
216
216
  if (props->onCameraChangeComplete.isDirty) {
217
- view->setOnCameraChangeComplete(props->onCameraChangeComplete.value);
217
+ hybridView->setOnCameraChangeComplete(props->onCameraChangeComplete.value);
218
218
  props->onCameraChangeComplete.isDirty = false;
219
219
  }
220
220
 
@@ -223,8 +223,7 @@ void JHybridRNGoogleMapsPlusViewStateUpdater::updateViewProps(jni::alias_ref<jni
223
223
  // hybridRef changed - call it with new this
224
224
  const auto& maybeFunc = props->hybridRef.value;
225
225
  if (maybeFunc.has_value()) {
226
- std::shared_ptr<JHybridRNGoogleMapsPlusViewSpec> shared = javaView->cthis()->shared_cast<JHybridRNGoogleMapsPlusViewSpec>();
227
- maybeFunc.value()(shared);
226
+ maybeFunc.value()(hybridView);
228
227
  }
229
228
  props->hybridRef.isDirty = false;
230
229
  }
@@ -30,7 +30,7 @@ public:
30
30
 
31
31
  public:
32
32
  static void updateViewProps(jni::alias_ref<jni::JClass> /* class */,
33
- jni::alias_ref<JHybridRNGoogleMapsPlusViewSpec::javaobject> view,
33
+ jni::alias_ref<JHybridRNGoogleMapsPlusViewSpec::JavaPart> view,
34
34
  jni::alias_ref<JStateWrapper::javaobject> stateWrapperInterface);
35
35
 
36
36
  public:
@@ -25,23 +25,6 @@ import com.margelo.nitro.core.HybridObject
25
25
  "LocalVariableName", "PropertyName", "PrivatePropertyName", "FunctionName"
26
26
  )
27
27
  abstract class HybridRNGoogleMapsPlusModuleSpec: HybridObject() {
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 RNGoogleMapsPlusModule]"
43
- }
44
-
45
28
  // Properties
46
29
 
47
30
 
@@ -62,7 +45,21 @@ abstract class HybridRNGoogleMapsPlusModuleSpec: HybridObject() {
62
45
  @Keep
63
46
  abstract fun isGooglePlayServicesAvailable(): Boolean
64
47
 
65
- private external fun initHybrid(): HybridData
48
+ // Default implementation of `HybridObject.toString()`
49
+ override fun toString(): String {
50
+ return "[HybridObject RNGoogleMapsPlusModule]"
51
+ }
52
+
53
+ // C++ backing class
54
+ @DoNotStrip
55
+ @Keep
56
+ protected open class CxxPart(javaPart: HybridRNGoogleMapsPlusModuleSpec): HybridObject.CxxPart(javaPart) {
57
+ // C++ JHybridRNGoogleMapsPlusModuleSpec::CxxPart::initHybrid(...)
58
+ external override fun initHybrid(): HybridData
59
+ }
60
+ override fun createCxxPart(): CxxPart {
61
+ return CxxPart(this)
62
+ }
66
63
 
67
64
  companion object {
68
65
  protected const val TAG = "HybridRNGoogleMapsPlusModuleSpec"
@@ -11,6 +11,7 @@ import androidx.annotation.Keep
11
11
  import com.facebook.jni.HybridData
12
12
  import com.facebook.proguard.annotations.DoNotStrip
13
13
  import com.margelo.nitro.core.Promise
14
+ import com.margelo.nitro.core.HybridObject
14
15
  import com.margelo.nitro.views.HybridView
15
16
 
16
17
  /**
@@ -25,23 +26,6 @@ import com.margelo.nitro.views.HybridView
25
26
  "LocalVariableName", "PropertyName", "PrivatePropertyName", "FunctionName"
26
27
  )
27
28
  abstract class HybridRNGoogleMapsPlusViewSpec: 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 RNGoogleMapsPlusView]"
43
- }
44
-
45
29
  // Properties
46
30
  @get:DoNotStrip
47
31
  @get:Keep
@@ -558,7 +542,21 @@ abstract class HybridRNGoogleMapsPlusViewSpec: HybridView() {
558
542
  @Keep
559
543
  abstract fun isGooglePlayServicesAvailable(): Boolean
560
544
 
561
- private external fun initHybrid(): HybridData
545
+ // Default implementation of `HybridObject.toString()`
546
+ override fun toString(): String {
547
+ return "[HybridObject RNGoogleMapsPlusView]"
548
+ }
549
+
550
+ // C++ backing class
551
+ @DoNotStrip
552
+ @Keep
553
+ protected open class CxxPart(javaPart: HybridRNGoogleMapsPlusViewSpec): HybridObject.CxxPart(javaPart) {
554
+ // C++ JHybridRNGoogleMapsPlusViewSpec::CxxPart::initHybrid(...)
555
+ external override fun initHybrid(): HybridData
556
+ }
557
+ override fun createCxxPart(): CxxPart {
558
+ return CxxPart(this)
559
+ }
562
560
 
563
561
  companion object {
564
562
  protected const val TAG = "HybridRNGoogleMapsPlusViewSpec"
@@ -38,16 +38,8 @@ public class HybridRNGoogleMapsPlusViewManager: SimpleViewManager<View>() {
38
38
  return view
39
39
  }
40
40
 
41
- // added by nitrogen-patch.js
42
- override fun onDropViewInstance(view: View) {
43
- val hybridView = view.getTag(associated_hybrid_view_tag) as? RNGoogleMapsPlusView
44
- hybridView?.dispose()
45
- view.setTag(associated_hybrid_view_tag, null)
46
- super.onDropViewInstance(view)
47
- }
48
-
49
41
  override fun updateState(view: View, props: ReactStylesDiffMap, stateWrapper: StateWrapper): Any? {
50
- val hybridView = view.getTag(associated_hybrid_view_tag) as? RNGoogleMapsPlusView
42
+ val hybridView = getHybridView(view)
51
43
  ?: throw Error("Couldn't find view $view in local views table!")
52
44
 
53
45
  // 1. Update each prop individually
@@ -59,9 +51,15 @@ public class HybridRNGoogleMapsPlusViewManager: SimpleViewManager<View>() {
59
51
  return super.updateState(view, props, stateWrapper)
60
52
  }
61
53
 
54
+ override fun onDropViewInstance(view: View) {
55
+ val hybridView = getHybridView(view)
56
+ hybridView?.onDropView()
57
+ return super.onDropViewInstance(view)
58
+ }
59
+
62
60
  protected override fun prepareToRecycleView(reactContext: ThemedReactContext, view: View): View? {
63
61
  super.prepareToRecycleView(reactContext, view)
64
- val hybridView = view.getTag(associated_hybrid_view_tag) as? RNGoogleMapsPlusView
62
+ val hybridView = getHybridView(view)
65
63
  ?: return null
66
64
 
67
65
  @Suppress("USELESS_IS_CHECK")
@@ -75,4 +73,8 @@ public class HybridRNGoogleMapsPlusViewManager: SimpleViewManager<View>() {
75
73
  return null
76
74
  }
77
75
  }
76
+
77
+ private fun getHybridView(view: View): RNGoogleMapsPlusView? {
78
+ return view.getTag(associated_hybrid_view_tag) as? RNGoogleMapsPlusView
79
+ }
78
80
  }
@@ -50,15 +50,6 @@ using namespace margelo::nitro::rngooglemapsplus::views;
50
50
  return self;
51
51
  }
52
52
 
53
- // added by nitrogen-patch.js
54
- - (void)dealloc {
55
- if (_hybridView) {
56
- RNGoogleMapsPlus::HybridRNGoogleMapsPlusViewSpec_cxx& swiftPart = _hybridView->getSwiftPart();
57
- swiftPart.dispose();
58
- _hybridView.reset();
59
- }
60
- }
61
-
62
53
  - (void) updateView {
63
54
  // 1. Get Swift part
64
55
  RNGoogleMapsPlus::HybridRNGoogleMapsPlusViewSpec_cxx& swiftPart = _hybridView->getSwiftPart();
@@ -333,4 +324,10 @@ using namespace margelo::nitro::rngooglemapsplus::views;
333
324
  swiftPart.maybePrepareForRecycle();
334
325
  }
335
326
 
327
+ - (void)invalidate {
328
+ RNGoogleMapsPlus::HybridRNGoogleMapsPlusViewSpec_cxx& swiftPart = _hybridView->getSwiftPart();
329
+ swiftPart.onDropView();
330
+ [super invalidate];
331
+ }
332
+
336
333
  @end
@@ -1604,4 +1604,8 @@ open class HybridRNGoogleMapsPlusViewSpec_cxx {
1604
1604
  guard let recyclable = __implementation as? any RecyclableView else { return }
1605
1605
  recyclable.prepareForRecycle()
1606
1606
  }
1607
+
1608
+ public final func onDropView() {
1609
+ __implementation.onDropView()
1610
+ }
1607
1611
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-google-maps-plus",
3
- "version": "1.12.0-dev.4",
3
+ "version": "1.12.0-dev.5",
4
4
  "description": "React Native wrapper for Android & iOS Google Maps SDK",
5
5
  "main": "./lib/module/index.js",
6
6
  "module": "./lib/module/index.js",
@@ -77,38 +77,38 @@
77
77
  "provenance": true
78
78
  },
79
79
  "devDependencies": {
80
- "@commitlint/cli": "20.4.2",
81
- "@commitlint/config-conventional": "20.4.2",
82
- "@eslint/compat": "2.0.2",
83
- "@eslint/eslintrc": "3.3.4",
84
- "@eslint/js": "9.39.3",
80
+ "@commitlint/cli": "20.4.4",
81
+ "@commitlint/config-conventional": "20.4.4",
82
+ "@eslint/compat": "2.0.3",
83
+ "@eslint/eslintrc": "3.3.5",
84
+ "@eslint/js": "9.39.4",
85
85
  "@expo/config-plugins": "55.0.6",
86
- "@react-native/babel-preset": "0.83.1",
87
- "@react-native/eslint-config": "0.83.1",
86
+ "@react-native/babel-preset": "0.84.1",
87
+ "@react-native/eslint-config": "0.84.1",
88
88
  "@semantic-release/changelog": "6.0.3",
89
89
  "@semantic-release/exec": "7.1.0",
90
90
  "@semantic-release/git": "10.0.1",
91
- "@semantic-release/npm": "13.1.4",
91
+ "@semantic-release/npm": "13.1.5",
92
92
  "@types/jest": "30.0.0",
93
- "@types/react": "19.2.8",
94
- "conventional-changelog-conventionalcommits": "9.1.0",
93
+ "@types/react": "19.2.14",
94
+ "conventional-changelog-conventionalcommits": "9.3.0",
95
95
  "del-cli": "7.0.0",
96
- "eslint": "9.39.3",
96
+ "eslint": "9.39.4",
97
97
  "eslint-config-prettier": "10.1.8",
98
98
  "eslint-import-resolver-typescript": "4.4.4",
99
99
  "eslint-plugin-import": "2.32.0",
100
- "eslint-plugin-jsdoc": "62.7.1",
100
+ "eslint-plugin-jsdoc": "62.8.0",
101
101
  "eslint-plugin-prettier": "5.5.5",
102
102
  "eslint-plugin-tsdoc": "0.5.2",
103
103
  "eslint-plugin-unused-imports": "4.4.1",
104
- "jest": "30.2.0",
105
- "lefthook": "2.1.1",
106
- "nitrogen": "0.33.9",
104
+ "jest": "30.3.0",
105
+ "lefthook": "2.1.4",
106
+ "nitrogen": "0.35.1",
107
107
  "prettier": "3.8.1",
108
108
  "react": "19.2.3",
109
- "react-native": "0.83.1",
109
+ "react-native": "0.84.1",
110
110
  "react-native-builder-bob": "0.40.18",
111
- "react-native-nitro-modules": "0.33.9",
111
+ "react-native-nitro-modules": "0.35.1",
112
112
  "semantic-release": "25.0.3",
113
113
  "typedoc": "0.28.17",
114
114
  "typescript": "5.9.3"
@@ -116,8 +116,8 @@
116
116
  "peerDependencies": {
117
117
  "expo": "*",
118
118
  "react": "*",
119
- "react-native": "*",
120
- "react-native-nitro-modules": "*"
119
+ "react-native": ">=0.82.0",
120
+ "react-native-nitro-modules": ">=0.35.1"
121
121
  },
122
122
  "peerDependenciesMeta": {
123
123
  "expo": {