react-native-maps 1.26.0 → 1.26.2

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 (48) hide show
  1. package/README.md +13 -11
  2. package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  3. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsCalloutManagerInterface.java +2 -1
  4. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsCircleManagerInterface.java +2 -1
  5. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsGooglePolygonManagerInterface.java +2 -1
  6. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMapViewManagerDelegate.java +1 -1
  7. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMapViewManagerInterface.java +2 -1
  8. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMarkerManagerDelegate.java +1 -1
  9. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMarkerManagerInterface.java +2 -1
  10. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsOverlayManagerInterface.java +2 -1
  11. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsPolylineManagerInterface.java +2 -1
  12. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsUrlTileManagerInterface.java +2 -1
  13. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsWMSTileManagerInterface.java +2 -1
  14. package/android/src/main/java/com/rnmaps/maps/MapView.java +16 -8
  15. package/android/src/main/jni/CMakeLists.txt +1 -9
  16. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/EventEmitters.cpp +517 -517
  17. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/Props.cpp +808 -20
  18. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/Props.h +664 -0
  19. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/States.h +12 -111
  20. package/ios/generated/RCTAppDependencyProvider.mm +13 -28
  21. package/ios/generated/RCTModuleProviders.h +16 -0
  22. package/ios/generated/RCTModuleProviders.mm +51 -0
  23. package/ios/generated/RCTModulesConformingToProtocolsProvider.mm +30 -9
  24. package/ios/generated/RCTThirdPartyComponentsProvider.mm +9 -2
  25. package/ios/generated/RCTUnstableModulesRequiringMainQueueSetupProvider.h +14 -0
  26. package/ios/generated/RCTUnstableModulesRequiringMainQueueSetupProvider.mm +19 -0
  27. package/ios/generated/RNMapsSpecs/EventEmitters.cpp +517 -517
  28. package/ios/generated/RNMapsSpecs/Props.cpp +808 -20
  29. package/ios/generated/RNMapsSpecs/Props.h +664 -0
  30. package/ios/generated/RNMapsSpecs/States.h +12 -111
  31. package/ios/generated/ReactAppDependencyProvider.podspec +1 -1
  32. package/ios/generated/ReactCodegen.podspec +120 -0
  33. package/package.json +14 -14
  34. package/plugin/build/android.js +2 -2
  35. package/plugin/build/ios.js +8 -8
  36. package/react-native-maps.podspec +4 -0
  37. package/src/MapMarkerNativeComponent.ts +1 -1
  38. package/src/MapViewNativeComponent.ts +1 -1
  39. package/src/specs/NativeComponentCallout.ts +1 -1
  40. package/src/specs/NativeComponentCircle.ts +1 -1
  41. package/src/specs/NativeComponentGoogleMapView.ts +1 -2
  42. package/src/specs/NativeComponentGooglePolygon.ts +1 -1
  43. package/src/specs/NativeComponentMapView.ts +1 -2
  44. package/src/specs/NativeComponentMarker.ts +1 -2
  45. package/src/specs/NativeComponentOverlay.ts +1 -1
  46. package/src/specs/NativeComponentPolyline.ts +1 -1
  47. package/src/specs/NativeComponentUrlTile.ts +1 -1
  48. package/src/specs/NativeComponentWMSTile.ts +1 -1
@@ -8,130 +8,31 @@
8
8
  */
9
9
  #pragma once
10
10
 
11
- #ifdef ANDROID
11
+ #include <react/renderer/core/StateData.h>
12
+ #ifdef RN_SERIALIZABLE_STATE
12
13
  #include <folly/dynamic.h>
13
14
  #endif
14
15
 
15
16
  namespace facebook::react {
16
17
 
17
- class RNMapsCalloutState {
18
- public:
19
- RNMapsCalloutState() = default;
18
+ using RNMapsCalloutState = StateData;
20
19
 
21
- #ifdef ANDROID
22
- RNMapsCalloutState(RNMapsCalloutState const &previousState, folly::dynamic data){};
23
- folly::dynamic getDynamic() const {
24
- return {};
25
- };
26
- #endif
27
- };
28
-
29
- class RNMapsCircleState {
30
- public:
31
- RNMapsCircleState() = default;
32
-
33
- #ifdef ANDROID
34
- RNMapsCircleState(RNMapsCircleState const &previousState, folly::dynamic data){};
35
- folly::dynamic getDynamic() const {
36
- return {};
37
- };
38
- #endif
39
- };
40
-
41
- class RNMapsGoogleMapViewState {
42
- public:
43
- RNMapsGoogleMapViewState() = default;
44
-
45
- #ifdef ANDROID
46
- RNMapsGoogleMapViewState(RNMapsGoogleMapViewState const &previousState, folly::dynamic data){};
47
- folly::dynamic getDynamic() const {
48
- return {};
49
- };
50
- #endif
51
- };
52
-
53
- class RNMapsGooglePolygonState {
54
- public:
55
- RNMapsGooglePolygonState() = default;
56
-
57
- #ifdef ANDROID
58
- RNMapsGooglePolygonState(RNMapsGooglePolygonState const &previousState, folly::dynamic data){};
59
- folly::dynamic getDynamic() const {
60
- return {};
61
- };
62
- #endif
63
- };
20
+ using RNMapsCircleState = StateData;
64
21
 
65
- class RNMapsMapViewState {
66
- public:
67
- RNMapsMapViewState() = default;
22
+ using RNMapsGoogleMapViewState = StateData;
68
23
 
69
- #ifdef ANDROID
70
- RNMapsMapViewState(RNMapsMapViewState const &previousState, folly::dynamic data){};
71
- folly::dynamic getDynamic() const {
72
- return {};
73
- };
74
- #endif
75
- };
76
-
77
- class RNMapsMarkerState {
78
- public:
79
- RNMapsMarkerState() = default;
80
-
81
- #ifdef ANDROID
82
- RNMapsMarkerState(RNMapsMarkerState const &previousState, folly::dynamic data){};
83
- folly::dynamic getDynamic() const {
84
- return {};
85
- };
86
- #endif
87
- };
88
-
89
- class RNMapsOverlayState {
90
- public:
91
- RNMapsOverlayState() = default;
24
+ using RNMapsGooglePolygonState = StateData;
92
25
 
93
- #ifdef ANDROID
94
- RNMapsOverlayState(RNMapsOverlayState const &previousState, folly::dynamic data){};
95
- folly::dynamic getDynamic() const {
96
- return {};
97
- };
98
- #endif
99
- };
26
+ using RNMapsMapViewState = StateData;
100
27
 
101
- class RNMapsPolylineState {
102
- public:
103
- RNMapsPolylineState() = default;
28
+ using RNMapsMarkerState = StateData;
104
29
 
105
- #ifdef ANDROID
106
- RNMapsPolylineState(RNMapsPolylineState const &previousState, folly::dynamic data){};
107
- folly::dynamic getDynamic() const {
108
- return {};
109
- };
110
- #endif
111
- };
30
+ using RNMapsOverlayState = StateData;
112
31
 
113
- class RNMapsUrlTileState {
114
- public:
115
- RNMapsUrlTileState() = default;
32
+ using RNMapsPolylineState = StateData;
116
33
 
117
- #ifdef ANDROID
118
- RNMapsUrlTileState(RNMapsUrlTileState const &previousState, folly::dynamic data){};
119
- folly::dynamic getDynamic() const {
120
- return {};
121
- };
122
- #endif
123
- };
34
+ using RNMapsUrlTileState = StateData;
124
35
 
125
- class RNMapsWMSTileState {
126
- public:
127
- RNMapsWMSTileState() = default;
128
-
129
- #ifdef ANDROID
130
- RNMapsWMSTileState(RNMapsWMSTileState const &previousState, folly::dynamic data){};
131
- folly::dynamic getDynamic() const {
132
- return {};
133
- };
134
- #endif
135
- };
36
+ using RNMapsWMSTileState = StateData;
136
37
 
137
38
  } // namespace facebook::react
@@ -8,48 +8,33 @@
8
8
  #import "RCTAppDependencyProvider.h"
9
9
  #import <ReactCodegen/RCTModulesConformingToProtocolsProvider.h>
10
10
  #import <ReactCodegen/RCTThirdPartyComponentsProvider.h>
11
+ #import <ReactCodegen/RCTUnstableModulesRequiringMainQueueSetupProvider.h>
12
+ #import <ReactCodegen/RCTModuleProviders.h>
11
13
 
12
- @implementation RCTAppDependencyProvider {
13
- NSArray<NSString *> * _URLRequestHandlerClassNames;
14
- NSArray<NSString *> * _imageDataDecoderClassNames;
15
- NSArray<NSString *> * _imageURLLoaderClassNames;
16
- NSDictionary<NSString *,Class<RCTComponentViewProtocol>> * _thirdPartyFabricComponents;
17
- }
14
+ @implementation RCTAppDependencyProvider
18
15
 
19
16
  - (nonnull NSArray<NSString *> *)URLRequestHandlerClassNames {
20
- static dispatch_once_t requestUrlToken;
21
- dispatch_once(&requestUrlToken, ^{
22
- self->_URLRequestHandlerClassNames = RCTModulesConformingToProtocolsProvider.URLRequestHandlerClassNames;
23
- });
24
-
25
- return _URLRequestHandlerClassNames;
17
+ return RCTModulesConformingToProtocolsProvider.URLRequestHandlerClassNames;
26
18
  }
27
19
 
28
20
  - (nonnull NSArray<NSString *> *)imageDataDecoderClassNames {
29
- static dispatch_once_t dataDecoderToken;
30
- dispatch_once(&dataDecoderToken, ^{
31
- _imageDataDecoderClassNames = RCTModulesConformingToProtocolsProvider.imageDataDecoderClassNames;
32
- });
33
-
34
- return _imageDataDecoderClassNames;
21
+ return RCTModulesConformingToProtocolsProvider.imageDataDecoderClassNames;
35
22
  }
36
23
 
37
24
  - (nonnull NSArray<NSString *> *)imageURLLoaderClassNames {
38
- static dispatch_once_t urlLoaderToken;
39
- dispatch_once(&urlLoaderToken, ^{
40
- _imageURLLoaderClassNames = RCTModulesConformingToProtocolsProvider.imageURLLoaderClassNames;
41
- });
25
+ return RCTModulesConformingToProtocolsProvider.imageURLLoaderClassNames;
26
+ }
42
27
 
43
- return _imageURLLoaderClassNames;
28
+ - (nonnull NSArray<NSString *> *)unstableModulesRequiringMainQueueSetup {
29
+ return RCTUnstableModulesRequiringMainQueueSetupProvider.modules;
44
30
  }
45
31
 
46
32
  - (nonnull NSDictionary<NSString *,Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents {
47
- static dispatch_once_t nativeComponentsToken;
48
- dispatch_once(&nativeComponentsToken, ^{
49
- _thirdPartyFabricComponents = RCTThirdPartyComponentsProvider.thirdPartyFabricComponents;
50
- });
33
+ return RCTThirdPartyComponentsProvider.thirdPartyFabricComponents;
34
+ }
51
35
 
52
- return _thirdPartyFabricComponents;
36
+ - (nonnull NSDictionary<NSString *, id<RCTModuleProvider>> *)moduleProviders {
37
+ return RCTModuleProviders.moduleProviders;
53
38
  }
54
39
 
55
40
  @end
@@ -0,0 +1,16 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #import <Foundation/Foundation.h>
9
+
10
+ @protocol RCTModuleProvider;
11
+
12
+ @interface RCTModuleProviders: NSObject
13
+
14
+ + (NSDictionary<NSString *, id<RCTModuleProvider>> *)moduleProviders;
15
+
16
+ @end
@@ -0,0 +1,51 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #import <Foundation/Foundation.h>
9
+
10
+ #import "RCTModuleProviders.h"
11
+ #import <ReactCommon/RCTTurboModule.h>
12
+ #import <React/RCTLog.h>
13
+
14
+ @implementation RCTModuleProviders
15
+
16
+ + (NSDictionary<NSString *, id<RCTModuleProvider>> *)moduleProviders
17
+ {
18
+ static NSDictionary<NSString *, id<RCTModuleProvider>> *providers = nil;
19
+ static dispatch_once_t onceToken;
20
+
21
+ dispatch_once(&onceToken, ^{
22
+ NSDictionary<NSString *, NSString *> * moduleMapping = @{
23
+
24
+ };
25
+
26
+ NSMutableDictionary *dict = [[NSMutableDictionary alloc] initWithCapacity:moduleMapping.count];
27
+
28
+ for (NSString *key in moduleMapping) {
29
+ NSString * moduleProviderName = moduleMapping[key];
30
+ Class klass = NSClassFromString(moduleProviderName);
31
+ if (!klass) {
32
+ RCTLogError(@"Module provider %@ cannot be found in the runtime", moduleProviderName);
33
+ continue;
34
+ }
35
+
36
+ id instance = [klass new];
37
+ if (![instance respondsToSelector:@selector(getTurboModule:)]) {
38
+ RCTLogError(@"Module provider %@ does not conform to RCTModuleProvider", moduleProviderName);
39
+ continue;
40
+ }
41
+
42
+ [dict setObject:instance forKey:key];
43
+ }
44
+
45
+ providers = dict;
46
+ });
47
+
48
+ return providers;
49
+ }
50
+
51
+ @end
@@ -11,23 +11,44 @@
11
11
 
12
12
  +(NSArray<NSString *> *)imageURLLoaderClassNames
13
13
  {
14
- return @[
15
-
16
- ];
14
+ static NSArray<NSString *> *classNames = nil;
15
+ static dispatch_once_t onceToken;
16
+
17
+ dispatch_once(&onceToken, ^{
18
+ classNames = @[
19
+
20
+ ];
21
+ });
22
+
23
+ return classNames;
17
24
  }
18
25
 
19
26
  +(NSArray<NSString *> *)imageDataDecoderClassNames
20
27
  {
21
- return @[
22
-
23
- ];
28
+ static NSArray<NSString *> *classNames = nil;
29
+ static dispatch_once_t onceToken;
30
+
31
+ dispatch_once(&onceToken, ^{
32
+ classNames = @[
33
+
34
+ ];
35
+ });
36
+
37
+ return classNames;
24
38
  }
25
39
 
26
40
  +(NSArray<NSString *> *)URLRequestHandlerClassNames
27
41
  {
28
- return @[
29
-
30
- ];
42
+ static NSArray<NSString *> *classNames = nil;
43
+ static dispatch_once_t onceToken;
44
+
45
+ dispatch_once(&onceToken, ^{
46
+ classNames = @[
47
+
48
+ ];
49
+ });
50
+
51
+ return classNames;
31
52
  }
32
53
 
33
54
  @end
@@ -15,12 +15,19 @@
15
15
 
16
16
  + (NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents
17
17
  {
18
- return @{
18
+ static NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *thirdPartyComponents = nil;
19
+ static dispatch_once_t nativeComponentsToken;
20
+
21
+ dispatch_once(&nativeComponentsToken, ^{
22
+ thirdPartyComponents = @{
19
23
  @"RNMapsGoogleMapView": NSClassFromString(@"RNMapsGoogleMapView"), // react-native-maps
20
24
  @"RNMapsGooglePolygon": NSClassFromString(@"RNMapsGooglePolygonView"), // react-native-maps
21
25
  @"RNMapsMapView": NSClassFromString(@"RNMapsMapView"), // react-native-maps
22
26
  @"RNMapsMarker": NSClassFromString(@"RNMapsMarkerView"), // react-native-maps
23
- };
27
+ };
28
+ });
29
+
30
+ return thirdPartyComponents;
24
31
  }
25
32
 
26
33
  @end
@@ -0,0 +1,14 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #import <Foundation/Foundation.h>
9
+
10
+ @interface RCTUnstableModulesRequiringMainQueueSetupProvider: NSObject
11
+
12
+ +(NSArray<NSString *> *)modules;
13
+
14
+ @end
@@ -0,0 +1,19 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #import "RCTUnstableModulesRequiringMainQueueSetupProvider.h"
9
+
10
+ @implementation RCTUnstableModulesRequiringMainQueueSetupProvider
11
+
12
+ +(NSArray<NSString *> *)modules
13
+ {
14
+ return @[
15
+
16
+ ];
17
+ }
18
+
19
+ @end