feat(smart-app): implement complete mobile app MVP

- App.tsx: full navigation (Auth stack + Main tabs with 5 screens)
- Auth: LoginScreen, RegisterScreen, ForgotPasswordScreen
- HomeScreen: dashboard with IoT metrics, weather widget, alerts, quick actions, sensors
- MapScreen: interactive map with layer toggles (6 layers)
- MarketplaceScreen: categories (6), products (5), search
- ChatScreen: AI chat with quick prompts (4), bot responses
- ProfileScreen: user info, stats, menu (9 items), logout
- AlertsScreen: alert list with severity, acknowledge
- SensorsScreen: sensor list with type filters (6 types), search
- ZonesScreen: zone cards with stats
- SettingsScreen: language picker (FR/EN/ES/DE), privacy, about
- Stores: iotStore (sensors, zones, alerts), notificationStore, uiStore + i18n
- Hooks: useSensors, useAlerts, useNotifications, useLocation
- Components: Card, Button, LoadingSpinner, ErrorBoundary, Header
- Services: iotService, notificationService (with axios API client)
- Utils: formatters (temp, AQI, noise, dates), validators (email, password, IBAN)
- Theme: colors.ts with full design system (Blue Ocean palette)
- Ditto: fixed MongoDB connection, new JWT secrets, official gateway image
This commit is contained in:
Eric FELIXINE
2026-06-01 18:00:35 -04:00
parent 08ca495bde
commit e30ae8ed09
35578 changed files with 3703534 additions and 43 deletions

View File

@@ -0,0 +1,25 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import <Foundation/Foundation.h>
#if __has_include(<React-RCTAppDelegate/RCTDependencyProvider.h>)
#import <React-RCTAppDelegate/RCTDependencyProvider.h>
#elif __has_include(<React_RCTAppDelegate/RCTDependencyProvider.h>)
#import <React_RCTAppDelegate/RCTDependencyProvider.h>
#else
#import "RCTDependencyProvider.h"
#endif
NS_ASSUME_NONNULL_BEGIN
@interface RCTAppDependencyProvider : NSObject <RCTDependencyProvider>
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,40 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import "RCTAppDependencyProvider.h"
#import <ReactCodegen/RCTModulesConformingToProtocolsProvider.h>
#import <ReactCodegen/RCTThirdPartyComponentsProvider.h>
#import <ReactCodegen/RCTUnstableModulesRequiringMainQueueSetupProvider.h>
#import <ReactCodegen/RCTModuleProviders.h>
@implementation RCTAppDependencyProvider
- (nonnull NSArray<NSString *> *)URLRequestHandlerClassNames {
return RCTModulesConformingToProtocolsProvider.URLRequestHandlerClassNames;
}
- (nonnull NSArray<NSString *> *)imageDataDecoderClassNames {
return RCTModulesConformingToProtocolsProvider.imageDataDecoderClassNames;
}
- (nonnull NSArray<NSString *> *)imageURLLoaderClassNames {
return RCTModulesConformingToProtocolsProvider.imageURLLoaderClassNames;
}
- (nonnull NSArray<NSString *> *)unstableModulesRequiringMainQueueSetup {
return RCTUnstableModulesRequiringMainQueueSetupProvider.modules;
}
- (nonnull NSDictionary<NSString *,Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents {
return RCTThirdPartyComponentsProvider.thirdPartyFabricComponents;
}
- (nonnull NSDictionary<NSString *, id<RCTModuleProvider>> *)moduleProviders {
return RCTModuleProviders.moduleProviders;
}
@end

View File

@@ -0,0 +1,16 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import <Foundation/Foundation.h>
@protocol RCTModuleProvider;
@interface RCTModuleProviders: NSObject
+ (NSDictionary<NSString *, id<RCTModuleProvider>> *)moduleProviders;
@end

View File

@@ -0,0 +1,51 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import <Foundation/Foundation.h>
#import "RCTModuleProviders.h"
#import <ReactCommon/RCTTurboModule.h>
#import <React/RCTLog.h>
@implementation RCTModuleProviders
+ (NSDictionary<NSString *, id<RCTModuleProvider>> *)moduleProviders
{
static NSDictionary<NSString *, id<RCTModuleProvider>> *providers = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
NSDictionary<NSString *, NSString *> * moduleMapping = @{
};
NSMutableDictionary *dict = [[NSMutableDictionary alloc] initWithCapacity:moduleMapping.count];
for (NSString *key in moduleMapping) {
NSString * moduleProviderName = moduleMapping[key];
Class klass = NSClassFromString(moduleProviderName);
if (!klass) {
RCTLogError(@"Module provider %@ cannot be found in the runtime", moduleProviderName);
continue;
}
id instance = [klass new];
if (![instance respondsToSelector:@selector(getTurboModule:)]) {
RCTLogError(@"Module provider %@ does not conform to RCTModuleProvider", moduleProviderName);
continue;
}
[dict setObject:instance forKey:key];
}
providers = dict;
});
return providers;
}
@end

View File

@@ -0,0 +1,18 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import <Foundation/Foundation.h>
@interface RCTModulesConformingToProtocolsProvider: NSObject
+(NSArray<NSString *> *)imageURLLoaderClassNames;
+(NSArray<NSString *> *)imageDataDecoderClassNames;
+(NSArray<NSString *> *)URLRequestHandlerClassNames;
@end

View File

@@ -0,0 +1,54 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import "RCTModulesConformingToProtocolsProvider.h"
@implementation RCTModulesConformingToProtocolsProvider
+(NSArray<NSString *> *)imageURLLoaderClassNames
{
static NSArray<NSString *> *classNames = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
classNames = @[
];
});
return classNames;
}
+(NSArray<NSString *> *)imageDataDecoderClassNames
{
static NSArray<NSString *> *classNames = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
classNames = @[
];
});
return classNames;
}
+(NSArray<NSString *> *)URLRequestHandlerClassNames
{
static NSArray<NSString *> *classNames = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
classNames = @[
];
});
return classNames;
}
@end

View File

@@ -0,0 +1,16 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import <Foundation/Foundation.h>
@protocol RCTComponentViewProtocol;
@interface RCTThirdPartyComponentsProvider: NSObject
+ (NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents;
@end

View File

@@ -0,0 +1,33 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import <Foundation/Foundation.h>
#import "RCTThirdPartyComponentsProvider.h"
#import <React/RCTComponentViewProtocol.h>
@implementation RCTThirdPartyComponentsProvider
+ (NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents
{
static NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *thirdPartyComponents = nil;
static dispatch_once_t nativeComponentsToken;
dispatch_once(&nativeComponentsToken, ^{
thirdPartyComponents = @{
@"RNMapsGoogleMapView": NSClassFromString(@"RNMapsGoogleMapView"), // react-native-maps
@"RNMapsGooglePolygon": NSClassFromString(@"RNMapsGooglePolygonView"), // react-native-maps
@"RNMapsMapView": NSClassFromString(@"RNMapsMapView"), // react-native-maps
@"RNMapsMarker": NSClassFromString(@"RNMapsMarkerView"), // react-native-maps
};
});
return thirdPartyComponents;
}
@end

View File

@@ -0,0 +1,14 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import <Foundation/Foundation.h>
@interface RCTUnstableModulesRequiringMainQueueSetupProvider: NSObject
+(NSArray<NSString *> *)modules;
@end

View File

@@ -0,0 +1,19 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import "RCTUnstableModulesRequiringMainQueueSetupProvider.h"
@implementation RCTUnstableModulesRequiringMainQueueSetupProvider
+(NSArray<NSString *> *)modules
{
return @[
];
}
@end

View File

@@ -0,0 +1,24 @@
//
// AIRUrlTileOverlay.h
// AirMaps
//
// Created by cascadian on 3/19/16.
// Copyright © 2016. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
#import <React/RCTBridge.h>
@protocol RNMapsAirModuleDelegate <NSObject>
@required
- (void)takeSnapshotWithConfig:(NSDictionary *)config
success:(RCTPromiseResolveBlock) success error:(RCTPromiseRejectBlock) error;
- (NSDictionary *) getCameraDic;
- (NSDictionary *) getMarkersFramesWithOnlyVisible:(BOOL)onlyVisible;
- (NSDictionary *) getMapBoundaries;
- (NSDictionary *) getPointForCoordinates:(CLLocationCoordinate2D) location;
- (NSDictionary *) getCoordinatesForPoint:(CGPoint) point;
@end

View File

@@ -0,0 +1,17 @@
//
// AIRUrlTileOverlay.h
// AirMaps
//
// Created by cascadian on 3/19/16.
// Copyright © 2016. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "RNMapsAirModuleDelegate.h"
@protocol RNMapsHostViewDelegate <NSObject>
@required
- (id<RNMapsAirModuleDelegate>) mapView;
@end

View File

@@ -0,0 +1,31 @@
/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
* once the code is regenerated.
*
* @generated by codegen project: GenerateComponentDescriptorCpp.js
*/
#include "ComponentDescriptors.h"
#include <react/renderer/core/ConcreteComponentDescriptor.h>
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
namespace facebook::react {
void RNMapsSpecs_registerComponentDescriptorsFromCodegen(
std::shared_ptr<const ComponentDescriptorProviderRegistry> registry) {
registry->add(concreteComponentDescriptorProvider<RNMapsCalloutComponentDescriptor>());
registry->add(concreteComponentDescriptorProvider<RNMapsCircleComponentDescriptor>());
registry->add(concreteComponentDescriptorProvider<RNMapsGoogleMapViewComponentDescriptor>());
registry->add(concreteComponentDescriptorProvider<RNMapsGooglePolygonComponentDescriptor>());
registry->add(concreteComponentDescriptorProvider<RNMapsMapViewComponentDescriptor>());
registry->add(concreteComponentDescriptorProvider<RNMapsMarkerComponentDescriptor>());
registry->add(concreteComponentDescriptorProvider<RNMapsOverlayComponentDescriptor>());
registry->add(concreteComponentDescriptorProvider<RNMapsPolylineComponentDescriptor>());
registry->add(concreteComponentDescriptorProvider<RNMapsUrlTileComponentDescriptor>());
registry->add(concreteComponentDescriptorProvider<RNMapsWMSTileComponentDescriptor>());
}
} // namespace facebook::react

View File

@@ -0,0 +1,33 @@
/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
* once the code is regenerated.
*
* @generated by codegen project: GenerateComponentDescriptorH.js
*/
#pragma once
#include "ShadowNodes.h"
#include <react/renderer/core/ConcreteComponentDescriptor.h>
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
namespace facebook::react {
using RNMapsCalloutComponentDescriptor = ConcreteComponentDescriptor<RNMapsCalloutShadowNode>;
using RNMapsCircleComponentDescriptor = ConcreteComponentDescriptor<RNMapsCircleShadowNode>;
using RNMapsGoogleMapViewComponentDescriptor = ConcreteComponentDescriptor<RNMapsGoogleMapViewShadowNode>;
using RNMapsGooglePolygonComponentDescriptor = ConcreteComponentDescriptor<RNMapsGooglePolygonShadowNode>;
using RNMapsMapViewComponentDescriptor = ConcreteComponentDescriptor<RNMapsMapViewShadowNode>;
using RNMapsMarkerComponentDescriptor = ConcreteComponentDescriptor<RNMapsMarkerShadowNode>;
using RNMapsOverlayComponentDescriptor = ConcreteComponentDescriptor<RNMapsOverlayShadowNode>;
using RNMapsPolylineComponentDescriptor = ConcreteComponentDescriptor<RNMapsPolylineShadowNode>;
using RNMapsUrlTileComponentDescriptor = ConcreteComponentDescriptor<RNMapsUrlTileShadowNode>;
using RNMapsWMSTileComponentDescriptor = ConcreteComponentDescriptor<RNMapsWMSTileShadowNode>;
void RNMapsSpecs_registerComponentDescriptorsFromCodegen(
std::shared_ptr<const ComponentDescriptorProviderRegistry> registry);
} // namespace facebook::react

View File

@@ -0,0 +1,979 @@
/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
* once the code is regenerated.
*
* @generated by codegen project: GenerateEventEmitterCpp.js
*/
#include "EventEmitters.h"
namespace facebook::react {
void RNMapsCalloutEventEmitter::onPress(OnPress event) const {
dispatchEvent("press", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "action", event.action);
payload.setProperty(runtime, "id", event.id);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
void RNMapsCircleEventEmitter::onPress(OnPress event) const {
dispatchEvent("press", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "action", event.action);
payload.setProperty(runtime, "id", event.id);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
void RNMapsGoogleMapViewEventEmitter::onIndoorBuildingFocused(OnIndoorBuildingFocused event) const {
dispatchEvent("indoorBuildingFocused", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "underground", event.underground);
payload.setProperty(runtime, "activeLevelIndex", event.activeLevelIndex);
payload.setProperty(runtime, "levels", event.levels);
return payload;
});
}
void RNMapsGoogleMapViewEventEmitter::onIndoorLevelActivated(OnIndoorLevelActivated event) const {
dispatchEvent("indoorLevelActivated", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "activeLevelIndex", event.activeLevelIndex);
payload.setProperty(runtime, "name", event.name);
payload.setProperty(runtime, "shortName", event.shortName);
return payload;
});
}
void RNMapsGoogleMapViewEventEmitter::onKmlReady(OnKmlReady event) const {
dispatchEvent("kmlReady", [](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
return payload;
});
}
void RNMapsGoogleMapViewEventEmitter::onLongPress(OnLongPress event) const {
dispatchEvent("longPress", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
payload.setProperty(runtime, "action", event.action);
return payload;
});
}
void RNMapsGoogleMapViewEventEmitter::onMapLoaded(OnMapLoaded event) const {
dispatchEvent("mapLoaded", [](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
return payload;
});
}
void RNMapsGoogleMapViewEventEmitter::onMapReady(OnMapReady event) const {
dispatchEvent("mapReady", [](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
return payload;
});
}
void RNMapsGoogleMapViewEventEmitter::onMarkerDeselect(OnMarkerDeselect event) const {
dispatchEvent("markerDeselect", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "action", event.action);
payload.setProperty(runtime, "id", event.id);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
return payload;
});
}
void RNMapsGoogleMapViewEventEmitter::onMarkerDrag(OnMarkerDrag event) const {
dispatchEvent("markerDrag", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
payload.setProperty(runtime, "id", event.id);
return payload;
});
}
void RNMapsGoogleMapViewEventEmitter::onMarkerDragEnd(OnMarkerDragEnd event) const {
dispatchEvent("markerDragEnd", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
payload.setProperty(runtime, "id", event.id);
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
void RNMapsGoogleMapViewEventEmitter::onMarkerDragStart(OnMarkerDragStart event) const {
dispatchEvent("markerDragStart", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
payload.setProperty(runtime, "id", event.id);
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
void RNMapsGoogleMapViewEventEmitter::onMarkerPress(OnMarkerPress event) const {
dispatchEvent("markerPress", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "action", event.action);
payload.setProperty(runtime, "id", event.id);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
void RNMapsGoogleMapViewEventEmitter::onMarkerSelect(OnMarkerSelect event) const {
dispatchEvent("markerSelect", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "action", event.action);
payload.setProperty(runtime, "id", event.id);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
return payload;
});
}
void RNMapsGoogleMapViewEventEmitter::onPanDrag(OnPanDrag event) const {
dispatchEvent("panDrag", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
void RNMapsGoogleMapViewEventEmitter::onPoiClick(OnPoiClick event) const {
dispatchEvent("poiClick", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "placeId", event.placeId);
payload.setProperty(runtime, "name", event.name);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
void RNMapsGoogleMapViewEventEmitter::onPress(OnPress event) const {
dispatchEvent("press", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
payload.setProperty(runtime, "action", event.action);
return payload;
});
}
void RNMapsGoogleMapViewEventEmitter::onRegionChangeStart(OnRegionChangeStart event) const {
dispatchEvent("regionChangeStart", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto region = jsi::Object(runtime);
region.setProperty(runtime, "latitude", event.region.latitude);
region.setProperty(runtime, "longitude", event.region.longitude);
region.setProperty(runtime, "latitudeDelta", event.region.latitudeDelta);
region.setProperty(runtime, "longitudeDelta", event.region.longitudeDelta);
payload.setProperty(runtime, "region", region);
}
payload.setProperty(runtime, "isGesture", event.isGesture);
return payload;
});
}
void RNMapsGoogleMapViewEventEmitter::onRegionChange(OnRegionChange event) const {
dispatchEvent("regionChange", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto region = jsi::Object(runtime);
region.setProperty(runtime, "latitude", event.region.latitude);
region.setProperty(runtime, "longitude", event.region.longitude);
region.setProperty(runtime, "latitudeDelta", event.region.latitudeDelta);
region.setProperty(runtime, "longitudeDelta", event.region.longitudeDelta);
payload.setProperty(runtime, "region", region);
}
payload.setProperty(runtime, "isGesture", event.isGesture);
return payload;
});
}
void RNMapsGoogleMapViewEventEmitter::onRegionChangeComplete(OnRegionChangeComplete event) const {
dispatchEvent("regionChangeComplete", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto region = jsi::Object(runtime);
region.setProperty(runtime, "latitude", event.region.latitude);
region.setProperty(runtime, "longitude", event.region.longitude);
region.setProperty(runtime, "latitudeDelta", event.region.latitudeDelta);
region.setProperty(runtime, "longitudeDelta", event.region.longitudeDelta);
payload.setProperty(runtime, "region", region);
}
payload.setProperty(runtime, "isGesture", event.isGesture);
return payload;
});
}
void RNMapsGoogleMapViewEventEmitter::onUserLocationChange(OnUserLocationChange event) const {
dispatchEvent("userLocationChange", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
coordinate.setProperty(runtime, "altitude", event.coordinate.altitude);
coordinate.setProperty(runtime, "timestamp", event.coordinate.timestamp);
coordinate.setProperty(runtime, "accuracy", event.coordinate.accuracy);
coordinate.setProperty(runtime, "speed", event.coordinate.speed);
coordinate.setProperty(runtime, "heading", event.coordinate.heading);
coordinate.setProperty(runtime, "altitudeAccuracy", event.coordinate.altitudeAccuracy);
coordinate.setProperty(runtime, "isFromMockProvider", event.coordinate.isFromMockProvider);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto error = jsi::Object(runtime);
error.setProperty(runtime, "message", event.error.message);
payload.setProperty(runtime, "error", error);
}
return payload;
});
}
void RNMapsGooglePolygonEventEmitter::onPress(OnPress event) const {
dispatchEvent("press", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "action", event.action);
payload.setProperty(runtime, "id", event.id);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
void RNMapsMapViewEventEmitter::onCalloutPress(OnCalloutPress event) const {
dispatchEvent("calloutPress", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "action", event.action);
{
auto frame = jsi::Object(runtime);
frame.setProperty(runtime, "x", event.frame.x);
frame.setProperty(runtime, "y", event.frame.y);
frame.setProperty(runtime, "width", event.frame.width);
frame.setProperty(runtime, "height", event.frame.height);
payload.setProperty(runtime, "frame", frame);
}
payload.setProperty(runtime, "id", event.id);
{
auto point = jsi::Object(runtime);
point.setProperty(runtime, "x", event.point.x);
point.setProperty(runtime, "y", event.point.y);
payload.setProperty(runtime, "point", point);
}
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
void RNMapsMapViewEventEmitter::onDoublePress(OnDoublePress event) const {
dispatchEvent("doublePress", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
void RNMapsMapViewEventEmitter::onIndoorBuildingFocused(OnIndoorBuildingFocused event) const {
dispatchEvent("indoorBuildingFocused", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto IndoorBuilding = jsi::Object(runtime);
IndoorBuilding.setProperty(runtime, "underground", event.IndoorBuilding.underground);
IndoorBuilding.setProperty(runtime, "activeLevelIndex", event.IndoorBuilding.activeLevelIndex);
payload.setProperty(runtime, "IndoorBuilding", IndoorBuilding);
}
return payload;
});
}
void RNMapsMapViewEventEmitter::onIndoorLevelActivated(OnIndoorLevelActivated event) const {
dispatchEvent("indoorLevelActivated", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto IndoorLevel = jsi::Object(runtime);
IndoorLevel.setProperty(runtime, "activeLevelIndex", event.IndoorLevel.activeLevelIndex);
IndoorLevel.setProperty(runtime, "name", event.IndoorLevel.name);
IndoorLevel.setProperty(runtime, "shortName", event.IndoorLevel.shortName);
payload.setProperty(runtime, "IndoorLevel", IndoorLevel);
}
return payload;
});
}
void RNMapsMapViewEventEmitter::onKmlReady(OnKmlReady event) const {
dispatchEvent("kmlReady", [](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
return payload;
});
}
void RNMapsMapViewEventEmitter::onLongPress(OnLongPress event) const {
dispatchEvent("longPress", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
payload.setProperty(runtime, "action", event.action);
return payload;
});
}
void RNMapsMapViewEventEmitter::onMapLoaded(OnMapLoaded event) const {
dispatchEvent("mapLoaded", [](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
return payload;
});
}
void RNMapsMapViewEventEmitter::onMapReady(OnMapReady event) const {
dispatchEvent("mapReady", [](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
return payload;
});
}
void RNMapsMapViewEventEmitter::onMarkerDeselect(OnMarkerDeselect event) const {
dispatchEvent("markerDeselect", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "action", event.action);
payload.setProperty(runtime, "id", event.id);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
return payload;
});
}
void RNMapsMapViewEventEmitter::onMarkerDrag(OnMarkerDrag event) const {
dispatchEvent("markerDrag", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
payload.setProperty(runtime, "id", event.id);
return payload;
});
}
void RNMapsMapViewEventEmitter::onMarkerDragEnd(OnMarkerDragEnd event) const {
dispatchEvent("markerDragEnd", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
payload.setProperty(runtime, "id", event.id);
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
void RNMapsMapViewEventEmitter::onMarkerDragStart(OnMarkerDragStart event) const {
dispatchEvent("markerDragStart", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
payload.setProperty(runtime, "id", event.id);
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
void RNMapsMapViewEventEmitter::onMarkerPress(OnMarkerPress event) const {
dispatchEvent("markerPress", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "action", event.action);
payload.setProperty(runtime, "id", event.id);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
void RNMapsMapViewEventEmitter::onMarkerSelect(OnMarkerSelect event) const {
dispatchEvent("markerSelect", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "action", event.action);
payload.setProperty(runtime, "id", event.id);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
return payload;
});
}
void RNMapsMapViewEventEmitter::onPanDrag(OnPanDrag event) const {
dispatchEvent("panDrag", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
void RNMapsMapViewEventEmitter::onPoiClick(OnPoiClick event) const {
dispatchEvent("poiClick", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "placeId", event.placeId);
payload.setProperty(runtime, "name", event.name);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
void RNMapsMapViewEventEmitter::onPress(OnPress event) const {
dispatchEvent("press", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
payload.setProperty(runtime, "action", event.action);
return payload;
});
}
void RNMapsMapViewEventEmitter::onRegionChangeStart(OnRegionChangeStart event) const {
dispatchEvent("regionChangeStart", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto region = jsi::Object(runtime);
region.setProperty(runtime, "latitude", event.region.latitude);
region.setProperty(runtime, "longitude", event.region.longitude);
region.setProperty(runtime, "latitudeDelta", event.region.latitudeDelta);
region.setProperty(runtime, "longitudeDelta", event.region.longitudeDelta);
payload.setProperty(runtime, "region", region);
}
payload.setProperty(runtime, "isGesture", event.isGesture);
return payload;
});
}
void RNMapsMapViewEventEmitter::onRegionChange(OnRegionChange event) const {
dispatchEvent("regionChange", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto region = jsi::Object(runtime);
region.setProperty(runtime, "latitude", event.region.latitude);
region.setProperty(runtime, "longitude", event.region.longitude);
region.setProperty(runtime, "latitudeDelta", event.region.latitudeDelta);
region.setProperty(runtime, "longitudeDelta", event.region.longitudeDelta);
payload.setProperty(runtime, "region", region);
}
payload.setProperty(runtime, "isGesture", event.isGesture);
return payload;
});
}
void RNMapsMapViewEventEmitter::onRegionChangeComplete(OnRegionChangeComplete event) const {
dispatchEvent("regionChangeComplete", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto region = jsi::Object(runtime);
region.setProperty(runtime, "latitude", event.region.latitude);
region.setProperty(runtime, "longitude", event.region.longitude);
region.setProperty(runtime, "latitudeDelta", event.region.latitudeDelta);
region.setProperty(runtime, "longitudeDelta", event.region.longitudeDelta);
payload.setProperty(runtime, "region", region);
}
payload.setProperty(runtime, "isGesture", event.isGesture);
return payload;
});
}
void RNMapsMapViewEventEmitter::onUserLocationChange(OnUserLocationChange event) const {
dispatchEvent("userLocationChange", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
coordinate.setProperty(runtime, "altitude", event.coordinate.altitude);
coordinate.setProperty(runtime, "timestamp", event.coordinate.timestamp);
coordinate.setProperty(runtime, "accuracy", event.coordinate.accuracy);
coordinate.setProperty(runtime, "speed", event.coordinate.speed);
coordinate.setProperty(runtime, "heading", event.coordinate.heading);
coordinate.setProperty(runtime, "altitudeAccuracy", event.coordinate.altitudeAccuracy);
coordinate.setProperty(runtime, "isFromMockProvider", event.coordinate.isFromMockProvider);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto error = jsi::Object(runtime);
error.setProperty(runtime, "message", event.error.message);
payload.setProperty(runtime, "error", error);
}
return payload;
});
}
void RNMapsMarkerEventEmitter::onCalloutPress(OnCalloutPress event) const {
dispatchEvent("calloutPress", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "action", event.action);
payload.setProperty(runtime, "id", event.id);
{
auto frame = jsi::Object(runtime);
frame.setProperty(runtime, "x", event.frame.x);
frame.setProperty(runtime, "y", event.frame.y);
frame.setProperty(runtime, "width", event.frame.width);
frame.setProperty(runtime, "height", event.frame.height);
payload.setProperty(runtime, "frame", frame);
}
{
auto point = jsi::Object(runtime);
point.setProperty(runtime, "x", event.point.x);
point.setProperty(runtime, "y", event.point.y);
payload.setProperty(runtime, "point", point);
}
return payload;
});
}
void RNMapsMarkerEventEmitter::onDeselect(OnDeselect event) const {
dispatchEvent("deselect", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "action", event.action);
payload.setProperty(runtime, "id", event.id);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
void RNMapsMarkerEventEmitter::onDrag(OnDrag event) const {
dispatchEvent("drag", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "id", event.id);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
return payload;
});
}
void RNMapsMarkerEventEmitter::onDragEnd(OnDragEnd event) const {
dispatchEvent("dragEnd", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "id", event.id);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
return payload;
});
}
void RNMapsMarkerEventEmitter::onDragStart(OnDragStart event) const {
dispatchEvent("dragStart", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "id", event.id);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
return payload;
});
}
void RNMapsMarkerEventEmitter::onPress(OnPress event) const {
dispatchEvent("press", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "action", event.action);
payload.setProperty(runtime, "id", event.id);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
void RNMapsMarkerEventEmitter::onSelect(OnSelect event) const {
dispatchEvent("select", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "action", event.action);
payload.setProperty(runtime, "id", event.id);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
void RNMapsOverlayEventEmitter::onPress(OnPress event) const {
dispatchEvent("press", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "action", event.action);
payload.setProperty(runtime, "id", event.id);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
void RNMapsPolylineEventEmitter::onPress(OnPress event) const {
dispatchEvent("press", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "action", event.action);
payload.setProperty(runtime, "id", event.id);
{
auto coordinate = jsi::Object(runtime);
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
payload.setProperty(runtime, "coordinate", coordinate);
}
{
auto position = jsi::Object(runtime);
position.setProperty(runtime, "x", event.position.x);
position.setProperty(runtime, "y", event.position.y);
payload.setProperty(runtime, "position", position);
}
return payload;
});
}
} // namespace facebook::react

View File

@@ -0,0 +1,860 @@
/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
* once the code is regenerated.
*
* @generated by codegen project: GenerateEventEmitterH.js
*/
#pragma once
#include <react/renderer/components/view/ViewEventEmitter.h>
namespace facebook::react {
class RNMapsCalloutEventEmitter : public ViewEventEmitter {
public:
using ViewEventEmitter::ViewEventEmitter;
struct OnPressCoordinate {
double latitude;
double longitude;
};
struct OnPressPosition {
double x;
double y;
};
struct OnPress {
std::string action;
std::string id;
OnPressCoordinate coordinate;
OnPressPosition position;
};
void onPress(OnPress value) const;
};
class RNMapsCircleEventEmitter : public ViewEventEmitter {
public:
using ViewEventEmitter::ViewEventEmitter;
struct OnPressCoordinate {
double latitude;
double longitude;
};
struct OnPressPosition {
double x;
double y;
};
struct OnPress {
std::string action;
std::string id;
OnPressCoordinate coordinate;
OnPressPosition position;
};
void onPress(OnPress value) const;
};
class RNMapsGoogleMapViewEventEmitter : public ViewEventEmitter {
public:
using ViewEventEmitter::ViewEventEmitter;
struct OnIndoorBuildingFocused {
bool underground;
int activeLevelIndex;
std::string levels;
};
struct OnIndoorLevelActivated {
int activeLevelIndex;
std::string name;
std::string shortName;
};
struct OnKmlReady {
};
struct OnLongPressCoordinate {
double latitude;
double longitude;
};
struct OnLongPressPosition {
double x;
double y;
};
struct OnLongPress {
OnLongPressCoordinate coordinate;
OnLongPressPosition position;
std::string action;
};
struct OnMapLoaded {
};
struct OnMapReady {
};
struct OnMarkerDeselectCoordinate {
double latitude;
double longitude;
};
struct OnMarkerDeselect {
std::string action;
std::string id;
OnMarkerDeselectCoordinate coordinate;
};
struct OnMarkerDragCoordinate {
double latitude;
double longitude;
};
struct OnMarkerDragPosition {
double x;
double y;
};
struct OnMarkerDrag {
OnMarkerDragCoordinate coordinate;
OnMarkerDragPosition position;
std::string id;
};
struct OnMarkerDragEndCoordinate {
double latitude;
double longitude;
};
struct OnMarkerDragEndPosition {
double x;
double y;
};
struct OnMarkerDragEnd {
OnMarkerDragEndCoordinate coordinate;
std::string id;
OnMarkerDragEndPosition position;
};
struct OnMarkerDragStartCoordinate {
double latitude;
double longitude;
};
struct OnMarkerDragStartPosition {
double x;
double y;
};
struct OnMarkerDragStart {
OnMarkerDragStartCoordinate coordinate;
std::string id;
OnMarkerDragStartPosition position;
};
struct OnMarkerPressCoordinate {
double latitude;
double longitude;
};
struct OnMarkerPressPosition {
double x;
double y;
};
struct OnMarkerPress {
std::string action;
std::string id;
OnMarkerPressCoordinate coordinate;
OnMarkerPressPosition position;
};
struct OnMarkerSelectCoordinate {
double latitude;
double longitude;
};
struct OnMarkerSelect {
std::string action;
std::string id;
OnMarkerSelectCoordinate coordinate;
};
struct OnPanDragCoordinate {
double latitude;
double longitude;
};
struct OnPanDragPosition {
double x;
double y;
};
struct OnPanDrag {
OnPanDragCoordinate coordinate;
OnPanDragPosition position;
};
struct OnPoiClickCoordinate {
double latitude;
double longitude;
};
struct OnPoiClickPosition {
double x;
double y;
};
struct OnPoiClick {
std::string placeId;
std::string name;
OnPoiClickCoordinate coordinate;
OnPoiClickPosition position;
};
struct OnPressCoordinate {
double latitude;
double longitude;
};
struct OnPressPosition {
double x;
double y;
};
struct OnPress {
OnPressCoordinate coordinate;
OnPressPosition position;
std::string action;
};
struct OnRegionChangeStartRegion {
double latitude;
double longitude;
double latitudeDelta;
double longitudeDelta;
};
struct OnRegionChangeStart {
OnRegionChangeStartRegion region;
bool isGesture;
};
struct OnRegionChangeRegion {
double latitude;
double longitude;
double latitudeDelta;
double longitudeDelta;
};
struct OnRegionChange {
OnRegionChangeRegion region;
bool isGesture;
};
struct OnRegionChangeCompleteRegion {
double latitude;
double longitude;
double latitudeDelta;
double longitudeDelta;
};
struct OnRegionChangeComplete {
OnRegionChangeCompleteRegion region;
bool isGesture;
};
struct OnUserLocationChangeCoordinate {
double latitude;
double longitude;
double altitude;
double timestamp;
Float accuracy;
Float speed;
Float heading;
Float altitudeAccuracy;
bool isFromMockProvider;
};
struct OnUserLocationChangeError {
std::string message;
};
struct OnUserLocationChange {
OnUserLocationChangeCoordinate coordinate;
OnUserLocationChangeError error;
};
void onIndoorBuildingFocused(OnIndoorBuildingFocused value) const;
void onIndoorLevelActivated(OnIndoorLevelActivated value) const;
void onKmlReady(OnKmlReady value) const;
void onLongPress(OnLongPress value) const;
void onMapLoaded(OnMapLoaded value) const;
void onMapReady(OnMapReady value) const;
void onMarkerDeselect(OnMarkerDeselect value) const;
void onMarkerDrag(OnMarkerDrag value) const;
void onMarkerDragEnd(OnMarkerDragEnd value) const;
void onMarkerDragStart(OnMarkerDragStart value) const;
void onMarkerPress(OnMarkerPress value) const;
void onMarkerSelect(OnMarkerSelect value) const;
void onPanDrag(OnPanDrag value) const;
void onPoiClick(OnPoiClick value) const;
void onPress(OnPress value) const;
void onRegionChangeStart(OnRegionChangeStart value) const;
void onRegionChange(OnRegionChange value) const;
void onRegionChangeComplete(OnRegionChangeComplete value) const;
void onUserLocationChange(OnUserLocationChange value) const;
};
class RNMapsGooglePolygonEventEmitter : public ViewEventEmitter {
public:
using ViewEventEmitter::ViewEventEmitter;
struct OnPressCoordinate {
double latitude;
double longitude;
};
struct OnPressPosition {
double x;
double y;
};
struct OnPress {
std::string action;
std::string id;
OnPressCoordinate coordinate;
OnPressPosition position;
};
void onPress(OnPress value) const;
};
class RNMapsMapViewEventEmitter : public ViewEventEmitter {
public:
using ViewEventEmitter::ViewEventEmitter;
struct OnCalloutPressFrame {
double x;
double y;
double width;
double height;
};
struct OnCalloutPressPoint {
double x;
double y;
};
struct OnCalloutPressCoordinate {
double latitude;
double longitude;
};
struct OnCalloutPressPosition {
double x;
double y;
};
struct OnCalloutPress {
std::string action;
OnCalloutPressFrame frame;
std::string id;
OnCalloutPressPoint point;
OnCalloutPressCoordinate coordinate;
OnCalloutPressPosition position;
};
struct OnDoublePressCoordinate {
double latitude;
double longitude;
};
struct OnDoublePressPosition {
double x;
double y;
};
struct OnDoublePress {
OnDoublePressCoordinate coordinate;
OnDoublePressPosition position;
};
struct OnIndoorBuildingFocusedIndoorBuilding {
bool underground;
int activeLevelIndex;
};
struct OnIndoorBuildingFocused {
OnIndoorBuildingFocusedIndoorBuilding IndoorBuilding;
};
struct OnIndoorLevelActivatedIndoorLevel {
int activeLevelIndex;
std::string name;
std::string shortName;
};
struct OnIndoorLevelActivated {
OnIndoorLevelActivatedIndoorLevel IndoorLevel;
};
struct OnKmlReady {
};
struct OnLongPressCoordinate {
double latitude;
double longitude;
};
struct OnLongPressPosition {
double x;
double y;
};
struct OnLongPress {
OnLongPressCoordinate coordinate;
OnLongPressPosition position;
std::string action;
};
struct OnMapLoaded {
};
struct OnMapReady {
};
struct OnMarkerDeselectCoordinate {
double latitude;
double longitude;
};
struct OnMarkerDeselect {
std::string action;
std::string id;
OnMarkerDeselectCoordinate coordinate;
};
struct OnMarkerDragCoordinate {
double latitude;
double longitude;
};
struct OnMarkerDragPosition {
double x;
double y;
};
struct OnMarkerDrag {
OnMarkerDragCoordinate coordinate;
OnMarkerDragPosition position;
std::string id;
};
struct OnMarkerDragEndCoordinate {
double latitude;
double longitude;
};
struct OnMarkerDragEndPosition {
double x;
double y;
};
struct OnMarkerDragEnd {
OnMarkerDragEndCoordinate coordinate;
std::string id;
OnMarkerDragEndPosition position;
};
struct OnMarkerDragStartCoordinate {
double latitude;
double longitude;
};
struct OnMarkerDragStartPosition {
double x;
double y;
};
struct OnMarkerDragStart {
OnMarkerDragStartCoordinate coordinate;
std::string id;
OnMarkerDragStartPosition position;
};
struct OnMarkerPressCoordinate {
double latitude;
double longitude;
};
struct OnMarkerPressPosition {
double x;
double y;
};
struct OnMarkerPress {
std::string action;
std::string id;
OnMarkerPressCoordinate coordinate;
OnMarkerPressPosition position;
};
struct OnMarkerSelectCoordinate {
double latitude;
double longitude;
};
struct OnMarkerSelect {
std::string action;
std::string id;
OnMarkerSelectCoordinate coordinate;
};
struct OnPanDragCoordinate {
double latitude;
double longitude;
};
struct OnPanDragPosition {
double x;
double y;
};
struct OnPanDrag {
OnPanDragCoordinate coordinate;
OnPanDragPosition position;
};
struct OnPoiClickCoordinate {
double latitude;
double longitude;
};
struct OnPoiClickPosition {
double x;
double y;
};
struct OnPoiClick {
std::string placeId;
std::string name;
OnPoiClickCoordinate coordinate;
OnPoiClickPosition position;
};
struct OnPressCoordinate {
double latitude;
double longitude;
};
struct OnPressPosition {
double x;
double y;
};
struct OnPress {
OnPressCoordinate coordinate;
OnPressPosition position;
std::string action;
};
struct OnRegionChangeStartRegion {
double latitude;
double longitude;
double latitudeDelta;
double longitudeDelta;
};
struct OnRegionChangeStart {
OnRegionChangeStartRegion region;
bool isGesture;
};
struct OnRegionChangeRegion {
double latitude;
double longitude;
double latitudeDelta;
double longitudeDelta;
};
struct OnRegionChange {
OnRegionChangeRegion region;
bool isGesture;
};
struct OnRegionChangeCompleteRegion {
double latitude;
double longitude;
double latitudeDelta;
double longitudeDelta;
};
struct OnRegionChangeComplete {
OnRegionChangeCompleteRegion region;
bool isGesture;
};
struct OnUserLocationChangeCoordinate {
double latitude;
double longitude;
double altitude;
double timestamp;
Float accuracy;
Float speed;
Float heading;
Float altitudeAccuracy;
bool isFromMockProvider;
};
struct OnUserLocationChangeError {
std::string message;
};
struct OnUserLocationChange {
OnUserLocationChangeCoordinate coordinate;
OnUserLocationChangeError error;
};
void onCalloutPress(OnCalloutPress value) const;
void onDoublePress(OnDoublePress value) const;
void onIndoorBuildingFocused(OnIndoorBuildingFocused value) const;
void onIndoorLevelActivated(OnIndoorLevelActivated value) const;
void onKmlReady(OnKmlReady value) const;
void onLongPress(OnLongPress value) const;
void onMapLoaded(OnMapLoaded value) const;
void onMapReady(OnMapReady value) const;
void onMarkerDeselect(OnMarkerDeselect value) const;
void onMarkerDrag(OnMarkerDrag value) const;
void onMarkerDragEnd(OnMarkerDragEnd value) const;
void onMarkerDragStart(OnMarkerDragStart value) const;
void onMarkerPress(OnMarkerPress value) const;
void onMarkerSelect(OnMarkerSelect value) const;
void onPanDrag(OnPanDrag value) const;
void onPoiClick(OnPoiClick value) const;
void onPress(OnPress value) const;
void onRegionChangeStart(OnRegionChangeStart value) const;
void onRegionChange(OnRegionChange value) const;
void onRegionChangeComplete(OnRegionChangeComplete value) const;
void onUserLocationChange(OnUserLocationChange value) const;
};
class RNMapsMarkerEventEmitter : public ViewEventEmitter {
public:
using ViewEventEmitter::ViewEventEmitter;
struct OnCalloutPressFrame {
double x;
double y;
double width;
double height;
};
struct OnCalloutPressPoint {
double x;
double y;
};
struct OnCalloutPress {
std::string action;
std::string id;
OnCalloutPressFrame frame;
OnCalloutPressPoint point;
};
struct OnDeselectCoordinate {
double latitude;
double longitude;
};
struct OnDeselectPosition {
double x;
double y;
};
struct OnDeselect {
std::string action;
std::string id;
OnDeselectCoordinate coordinate;
OnDeselectPosition position;
};
struct OnDragCoordinate {
double latitude;
double longitude;
};
struct OnDrag {
std::string id;
OnDragCoordinate coordinate;
};
struct OnDragEndCoordinate {
double latitude;
double longitude;
};
struct OnDragEnd {
std::string id;
OnDragEndCoordinate coordinate;
};
struct OnDragStartCoordinate {
double latitude;
double longitude;
};
struct OnDragStart {
std::string id;
OnDragStartCoordinate coordinate;
};
struct OnPressCoordinate {
double latitude;
double longitude;
};
struct OnPressPosition {
double x;
double y;
};
struct OnPress {
std::string action;
std::string id;
OnPressCoordinate coordinate;
OnPressPosition position;
};
struct OnSelectCoordinate {
double latitude;
double longitude;
};
struct OnSelectPosition {
double x;
double y;
};
struct OnSelect {
std::string action;
std::string id;
OnSelectCoordinate coordinate;
OnSelectPosition position;
};
void onCalloutPress(OnCalloutPress value) const;
void onDeselect(OnDeselect value) const;
void onDrag(OnDrag value) const;
void onDragEnd(OnDragEnd value) const;
void onDragStart(OnDragStart value) const;
void onPress(OnPress value) const;
void onSelect(OnSelect value) const;
};
class RNMapsOverlayEventEmitter : public ViewEventEmitter {
public:
using ViewEventEmitter::ViewEventEmitter;
struct OnPressCoordinate {
double latitude;
double longitude;
};
struct OnPressPosition {
double x;
double y;
};
struct OnPress {
std::string action;
std::string id;
OnPressCoordinate coordinate;
OnPressPosition position;
};
void onPress(OnPress value) const;
};
class RNMapsPolylineEventEmitter : public ViewEventEmitter {
public:
using ViewEventEmitter::ViewEventEmitter;
struct OnPressCoordinate {
double latitude;
double longitude;
};
struct OnPressPosition {
double x;
double y;
};
struct OnPress {
std::string action;
std::string id;
OnPressCoordinate coordinate;
OnPressPosition position;
};
void onPress(OnPress value) const;
};
class RNMapsUrlTileEventEmitter : public ViewEventEmitter {
public:
using ViewEventEmitter::ViewEventEmitter;
};
class RNMapsWMSTileEventEmitter : public ViewEventEmitter {
public:
using ViewEventEmitter::ViewEventEmitter;
};
} // namespace facebook::react

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,591 @@
/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
* once the code is regenerated.
*
* @generated by codegen project: GenerateComponentHObjCpp.js
*/
#import <Foundation/Foundation.h>
#import <React/RCTDefines.h>
#import <React/RCTLog.h>
NS_ASSUME_NONNULL_BEGIN
@protocol RCTRNMapsGoogleMapViewViewProtocol <NSObject>
- (void)animateToRegion:(NSString *)regionJSON duration:(NSInteger)duration;
- (void)setCamera:(NSString *)cameraJSON;
- (void)animateCamera:(NSString *)cameraJSON duration:(NSInteger)duration;
- (void)fitToElements:(NSString *)edgePaddingJSON animated:(BOOL)animated;
- (void)fitToSuppliedMarkers:(NSString *)markersJSON edgePaddingJSON:(NSString *)edgePaddingJSON animated:(BOOL)animated;
- (void)fitToCoordinates:(NSString *)coordinatesJSON edgePaddingJSON:(NSString *)edgePaddingJSON animated:(BOOL)animated;
- (void)setIndoorActiveLevelIndex:(NSInteger)activeLevelIndex;
@end
RCT_EXTERN inline void RCTRNMapsGoogleMapViewHandleCommand(
id<RCTRNMapsGoogleMapViewViewProtocol> componentView,
NSString const *commandName,
NSArray const *args)
{
if ([commandName isEqualToString:@"animateToRegion"]) {
#if RCT_DEBUG
if ([args count] != 2) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsGoogleMapView", commandName, (int)[args count], 2);
return;
}
#endif
NSObject *arg0 = args[0];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"RNMapsGoogleMapView", commandName, @"1st")) {
return;
}
#endif
NSString * regionJSON = (NSString *)arg0;
NSObject *arg1 = args[1];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSNumber class], @"number", @"RNMapsGoogleMapView", commandName, @"2nd")) {
return;
}
#endif
NSInteger duration = [(NSNumber *)arg1 intValue];
[componentView animateToRegion:regionJSON duration:duration];
return;
}
if ([commandName isEqualToString:@"setCamera"]) {
#if RCT_DEBUG
if ([args count] != 1) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsGoogleMapView", commandName, (int)[args count], 1);
return;
}
#endif
NSObject *arg0 = args[0];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"RNMapsGoogleMapView", commandName, @"1st")) {
return;
}
#endif
NSString * cameraJSON = (NSString *)arg0;
[componentView setCamera:cameraJSON];
return;
}
if ([commandName isEqualToString:@"animateCamera"]) {
#if RCT_DEBUG
if ([args count] != 2) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsGoogleMapView", commandName, (int)[args count], 2);
return;
}
#endif
NSObject *arg0 = args[0];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"RNMapsGoogleMapView", commandName, @"1st")) {
return;
}
#endif
NSString * cameraJSON = (NSString *)arg0;
NSObject *arg1 = args[1];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSNumber class], @"number", @"RNMapsGoogleMapView", commandName, @"2nd")) {
return;
}
#endif
NSInteger duration = [(NSNumber *)arg1 intValue];
[componentView animateCamera:cameraJSON duration:duration];
return;
}
if ([commandName isEqualToString:@"fitToElements"]) {
#if RCT_DEBUG
if ([args count] != 2) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsGoogleMapView", commandName, (int)[args count], 2);
return;
}
#endif
NSObject *arg0 = args[0];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"RNMapsGoogleMapView", commandName, @"1st")) {
return;
}
#endif
NSString * edgePaddingJSON = (NSString *)arg0;
NSObject *arg1 = args[1];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSNumber class], @"boolean", @"RNMapsGoogleMapView", commandName, @"2nd")) {
return;
}
#endif
BOOL animated = [(NSNumber *)arg1 boolValue];
[componentView fitToElements:edgePaddingJSON animated:animated];
return;
}
if ([commandName isEqualToString:@"fitToSuppliedMarkers"]) {
#if RCT_DEBUG
if ([args count] != 3) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsGoogleMapView", commandName, (int)[args count], 3);
return;
}
#endif
NSObject *arg0 = args[0];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"RNMapsGoogleMapView", commandName, @"1st")) {
return;
}
#endif
NSString * markersJSON = (NSString *)arg0;
NSObject *arg1 = args[1];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSString class], @"string", @"RNMapsGoogleMapView", commandName, @"2nd")) {
return;
}
#endif
NSString * edgePaddingJSON = (NSString *)arg1;
NSObject *arg2 = args[2];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg2, [NSNumber class], @"boolean", @"RNMapsGoogleMapView", commandName, @"3rd")) {
return;
}
#endif
BOOL animated = [(NSNumber *)arg2 boolValue];
[componentView fitToSuppliedMarkers:markersJSON edgePaddingJSON:edgePaddingJSON animated:animated];
return;
}
if ([commandName isEqualToString:@"fitToCoordinates"]) {
#if RCT_DEBUG
if ([args count] != 3) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsGoogleMapView", commandName, (int)[args count], 3);
return;
}
#endif
NSObject *arg0 = args[0];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"RNMapsGoogleMapView", commandName, @"1st")) {
return;
}
#endif
NSString * coordinatesJSON = (NSString *)arg0;
NSObject *arg1 = args[1];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSString class], @"string", @"RNMapsGoogleMapView", commandName, @"2nd")) {
return;
}
#endif
NSString * edgePaddingJSON = (NSString *)arg1;
NSObject *arg2 = args[2];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg2, [NSNumber class], @"boolean", @"RNMapsGoogleMapView", commandName, @"3rd")) {
return;
}
#endif
BOOL animated = [(NSNumber *)arg2 boolValue];
[componentView fitToCoordinates:coordinatesJSON edgePaddingJSON:edgePaddingJSON animated:animated];
return;
}
if ([commandName isEqualToString:@"setIndoorActiveLevelIndex"]) {
#if RCT_DEBUG
if ([args count] != 1) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsGoogleMapView", commandName, (int)[args count], 1);
return;
}
#endif
NSObject *arg0 = args[0];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSNumber class], @"number", @"RNMapsGoogleMapView", commandName, @"1st")) {
return;
}
#endif
NSInteger activeLevelIndex = [(NSNumber *)arg0 intValue];
[componentView setIndoorActiveLevelIndex:activeLevelIndex];
return;
}
#if RCT_DEBUG
RCTLogError(@"%@ received command %@, which is not a supported command.", @"RNMapsGoogleMapView", commandName);
#endif
}
@protocol RCTRNMapsGooglePolygonViewProtocol <NSObject>
@end
@protocol RCTRNMapsMapViewViewProtocol <NSObject>
- (void)animateToRegion:(NSString *)regionJSON duration:(NSInteger)duration;
- (void)setCamera:(NSString *)cameraJSON;
- (void)animateCamera:(NSString *)cameraJSON duration:(NSInteger)duration;
- (void)fitToElements:(NSString *)edgePaddingJSON animated:(BOOL)animated;
- (void)fitToSuppliedMarkers:(NSString *)markersJSON edgePaddingJSON:(NSString *)edgePaddingJSON animated:(BOOL)animated;
- (void)fitToCoordinates:(NSString *)coordinatesJSON edgePaddingJSON:(NSString *)edgePaddingJSON animated:(BOOL)animated;
- (void)setIndoorActiveLevelIndex:(NSInteger)activeLevelIndex;
@end
RCT_EXTERN inline void RCTRNMapsMapViewHandleCommand(
id<RCTRNMapsMapViewViewProtocol> componentView,
NSString const *commandName,
NSArray const *args)
{
if ([commandName isEqualToString:@"animateToRegion"]) {
#if RCT_DEBUG
if ([args count] != 2) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMapView", commandName, (int)[args count], 2);
return;
}
#endif
NSObject *arg0 = args[0];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"RNMapsMapView", commandName, @"1st")) {
return;
}
#endif
NSString * regionJSON = (NSString *)arg0;
NSObject *arg1 = args[1];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSNumber class], @"number", @"RNMapsMapView", commandName, @"2nd")) {
return;
}
#endif
NSInteger duration = [(NSNumber *)arg1 intValue];
[componentView animateToRegion:regionJSON duration:duration];
return;
}
if ([commandName isEqualToString:@"setCamera"]) {
#if RCT_DEBUG
if ([args count] != 1) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMapView", commandName, (int)[args count], 1);
return;
}
#endif
NSObject *arg0 = args[0];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"RNMapsMapView", commandName, @"1st")) {
return;
}
#endif
NSString * cameraJSON = (NSString *)arg0;
[componentView setCamera:cameraJSON];
return;
}
if ([commandName isEqualToString:@"animateCamera"]) {
#if RCT_DEBUG
if ([args count] != 2) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMapView", commandName, (int)[args count], 2);
return;
}
#endif
NSObject *arg0 = args[0];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"RNMapsMapView", commandName, @"1st")) {
return;
}
#endif
NSString * cameraJSON = (NSString *)arg0;
NSObject *arg1 = args[1];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSNumber class], @"number", @"RNMapsMapView", commandName, @"2nd")) {
return;
}
#endif
NSInteger duration = [(NSNumber *)arg1 intValue];
[componentView animateCamera:cameraJSON duration:duration];
return;
}
if ([commandName isEqualToString:@"fitToElements"]) {
#if RCT_DEBUG
if ([args count] != 2) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMapView", commandName, (int)[args count], 2);
return;
}
#endif
NSObject *arg0 = args[0];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"RNMapsMapView", commandName, @"1st")) {
return;
}
#endif
NSString * edgePaddingJSON = (NSString *)arg0;
NSObject *arg1 = args[1];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSNumber class], @"boolean", @"RNMapsMapView", commandName, @"2nd")) {
return;
}
#endif
BOOL animated = [(NSNumber *)arg1 boolValue];
[componentView fitToElements:edgePaddingJSON animated:animated];
return;
}
if ([commandName isEqualToString:@"fitToSuppliedMarkers"]) {
#if RCT_DEBUG
if ([args count] != 3) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMapView", commandName, (int)[args count], 3);
return;
}
#endif
NSObject *arg0 = args[0];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"RNMapsMapView", commandName, @"1st")) {
return;
}
#endif
NSString * markersJSON = (NSString *)arg0;
NSObject *arg1 = args[1];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSString class], @"string", @"RNMapsMapView", commandName, @"2nd")) {
return;
}
#endif
NSString * edgePaddingJSON = (NSString *)arg1;
NSObject *arg2 = args[2];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg2, [NSNumber class], @"boolean", @"RNMapsMapView", commandName, @"3rd")) {
return;
}
#endif
BOOL animated = [(NSNumber *)arg2 boolValue];
[componentView fitToSuppliedMarkers:markersJSON edgePaddingJSON:edgePaddingJSON animated:animated];
return;
}
if ([commandName isEqualToString:@"fitToCoordinates"]) {
#if RCT_DEBUG
if ([args count] != 3) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMapView", commandName, (int)[args count], 3);
return;
}
#endif
NSObject *arg0 = args[0];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"RNMapsMapView", commandName, @"1st")) {
return;
}
#endif
NSString * coordinatesJSON = (NSString *)arg0;
NSObject *arg1 = args[1];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSString class], @"string", @"RNMapsMapView", commandName, @"2nd")) {
return;
}
#endif
NSString * edgePaddingJSON = (NSString *)arg1;
NSObject *arg2 = args[2];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg2, [NSNumber class], @"boolean", @"RNMapsMapView", commandName, @"3rd")) {
return;
}
#endif
BOOL animated = [(NSNumber *)arg2 boolValue];
[componentView fitToCoordinates:coordinatesJSON edgePaddingJSON:edgePaddingJSON animated:animated];
return;
}
if ([commandName isEqualToString:@"setIndoorActiveLevelIndex"]) {
#if RCT_DEBUG
if ([args count] != 1) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMapView", commandName, (int)[args count], 1);
return;
}
#endif
NSObject *arg0 = args[0];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSNumber class], @"number", @"RNMapsMapView", commandName, @"1st")) {
return;
}
#endif
NSInteger activeLevelIndex = [(NSNumber *)arg0 intValue];
[componentView setIndoorActiveLevelIndex:activeLevelIndex];
return;
}
#if RCT_DEBUG
RCTLogError(@"%@ received command %@, which is not a supported command.", @"RNMapsMapView", commandName);
#endif
}
@protocol RCTRNMapsMarkerViewProtocol <NSObject>
- (void)animateToCoordinates:(double)latitude longitude:(double)longitude duration:(NSInteger)duration;
- (void)setCoordinates:(double)latitude longitude:(double)longitude;
- (void)showCallout;
- (void)hideCallout;
- (void)redrawCallout;
- (void)redraw;
@end
RCT_EXTERN inline void RCTRNMapsMarkerHandleCommand(
id<RCTRNMapsMarkerViewProtocol> componentView,
NSString const *commandName,
NSArray const *args)
{
if ([commandName isEqualToString:@"animateToCoordinates"]) {
#if RCT_DEBUG
if ([args count] != 3) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMarker", commandName, (int)[args count], 3);
return;
}
#endif
NSObject *arg0 = args[0];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSNumber class], @"double", @"RNMapsMarker", commandName, @"1st")) {
return;
}
#endif
double latitude = [(NSNumber *)arg0 doubleValue];
NSObject *arg1 = args[1];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSNumber class], @"double", @"RNMapsMarker", commandName, @"2nd")) {
return;
}
#endif
double longitude = [(NSNumber *)arg1 doubleValue];
NSObject *arg2 = args[2];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg2, [NSNumber class], @"number", @"RNMapsMarker", commandName, @"3rd")) {
return;
}
#endif
NSInteger duration = [(NSNumber *)arg2 intValue];
[componentView animateToCoordinates:latitude longitude:longitude duration:duration];
return;
}
if ([commandName isEqualToString:@"setCoordinates"]) {
#if RCT_DEBUG
if ([args count] != 2) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMarker", commandName, (int)[args count], 2);
return;
}
#endif
NSObject *arg0 = args[0];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSNumber class], @"double", @"RNMapsMarker", commandName, @"1st")) {
return;
}
#endif
double latitude = [(NSNumber *)arg0 doubleValue];
NSObject *arg1 = args[1];
#if RCT_DEBUG
if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSNumber class], @"double", @"RNMapsMarker", commandName, @"2nd")) {
return;
}
#endif
double longitude = [(NSNumber *)arg1 doubleValue];
[componentView setCoordinates:latitude longitude:longitude];
return;
}
if ([commandName isEqualToString:@"showCallout"]) {
#if RCT_DEBUG
if ([args count] != 0) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMarker", commandName, (int)[args count], 0);
return;
}
#endif
[componentView showCallout];
return;
}
if ([commandName isEqualToString:@"hideCallout"]) {
#if RCT_DEBUG
if ([args count] != 0) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMarker", commandName, (int)[args count], 0);
return;
}
#endif
[componentView hideCallout];
return;
}
if ([commandName isEqualToString:@"redrawCallout"]) {
#if RCT_DEBUG
if ([args count] != 0) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMarker", commandName, (int)[args count], 0);
return;
}
#endif
[componentView redrawCallout];
return;
}
if ([commandName isEqualToString:@"redraw"]) {
#if RCT_DEBUG
if ([args count] != 0) {
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMarker", commandName, (int)[args count], 0);
return;
}
#endif
[componentView redraw];
return;
}
#if RCT_DEBUG
RCTLogError(@"%@ received command %@, which is not a supported command.", @"RNMapsMarker", commandName);
#endif
}
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,92 @@
/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
* once the code is regenerated.
*
* @generated by codegen project: GenerateModuleObjCpp
*
* We create an umbrella header (and corresponding implementation) here since
* Cxx compilation in BUCK has a limitation: source-code producing genrule()s
* must have a single output. More files => more genrule()s => slower builds.
*/
#import "RNMapsSpecs.h"
@implementation NativeAirMapsModuleSpecBase
- (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper
{
_eventEmitterCallback = std::move(eventEmitterCallbackWrapper->_eventEmitterCallback);
}
@end
@implementation RCTCxxConvert (NativeAirMapsModule_LatLng)
+ (RCTManagedPointer *)JS_NativeAirMapsModule_LatLng:(id)json
{
return facebook::react::managedPointer<JS::NativeAirMapsModule::LatLng>(json);
}
@end
@implementation RCTCxxConvert (NativeAirMapsModule_Point)
+ (RCTManagedPointer *)JS_NativeAirMapsModule_Point:(id)json
{
return facebook::react::managedPointer<JS::NativeAirMapsModule::Point>(json);
}
@end
namespace facebook::react {
static facebook::jsi::Value __hostFunction_NativeAirMapsModuleSpecJSI_getCamera(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "getCamera", @selector(getCamera:resolve:reject:), args, count);
}
static facebook::jsi::Value __hostFunction_NativeAirMapsModuleSpecJSI_getMarkersFrames(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "getMarkersFrames", @selector(getMarkersFrames:onlyVisible:resolve:reject:), args, count);
}
static facebook::jsi::Value __hostFunction_NativeAirMapsModuleSpecJSI_getMapBoundaries(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "getMapBoundaries", @selector(getMapBoundaries:resolve:reject:), args, count);
}
static facebook::jsi::Value __hostFunction_NativeAirMapsModuleSpecJSI_takeSnapshot(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "takeSnapshot", @selector(takeSnapshot:config:resolve:reject:), args, count);
}
static facebook::jsi::Value __hostFunction_NativeAirMapsModuleSpecJSI_getAddressFromCoordinates(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "getAddressFromCoordinates", @selector(getAddressFromCoordinates:coordinate:resolve:reject:), args, count);
}
static facebook::jsi::Value __hostFunction_NativeAirMapsModuleSpecJSI_getPointForCoordinate(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "getPointForCoordinate", @selector(getPointForCoordinate:coordinate:resolve:reject:), args, count);
}
static facebook::jsi::Value __hostFunction_NativeAirMapsModuleSpecJSI_getCoordinateForPoint(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "getCoordinateForPoint", @selector(getCoordinateForPoint:point:resolve:reject:), args, count);
}
NativeAirMapsModuleSpecJSI::NativeAirMapsModuleSpecJSI(const ObjCTurboModule::InitParams &params)
: ObjCTurboModule(params) {
methodMap_["getCamera"] = MethodMetadata {1, __hostFunction_NativeAirMapsModuleSpecJSI_getCamera};
methodMap_["getMarkersFrames"] = MethodMetadata {2, __hostFunction_NativeAirMapsModuleSpecJSI_getMarkersFrames};
methodMap_["getMapBoundaries"] = MethodMetadata {1, __hostFunction_NativeAirMapsModuleSpecJSI_getMapBoundaries};
methodMap_["takeSnapshot"] = MethodMetadata {2, __hostFunction_NativeAirMapsModuleSpecJSI_takeSnapshot};
methodMap_["getAddressFromCoordinates"] = MethodMetadata {2, __hostFunction_NativeAirMapsModuleSpecJSI_getAddressFromCoordinates};
setMethodArgConversionSelector(@"getAddressFromCoordinates", 1, @"JS_NativeAirMapsModule_LatLng:");
methodMap_["getPointForCoordinate"] = MethodMetadata {2, __hostFunction_NativeAirMapsModuleSpecJSI_getPointForCoordinate};
setMethodArgConversionSelector(@"getPointForCoordinate", 1, @"JS_NativeAirMapsModule_LatLng:");
methodMap_["getCoordinateForPoint"] = MethodMetadata {2, __hostFunction_NativeAirMapsModuleSpecJSI_getCoordinateForPoint};
setMethodArgConversionSelector(@"getCoordinateForPoint", 1, @"JS_NativeAirMapsModule_Point:");
}
} // namespace facebook::react

View File

@@ -0,0 +1,137 @@
/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
* once the code is regenerated.
*
* @generated by codegen project: GenerateModuleObjCpp
*
* We create an umbrella header (and corresponding implementation) here since
* Cxx compilation in BUCK has a limitation: source-code producing genrule()s
* must have a single output. More files => more genrule()s => slower builds.
*/
#ifndef __cplusplus
#error This file must be compiled as Obj-C++. If you are importing it, you must change your file extension to .mm.
#endif
// Avoid multiple includes of RNMapsSpecs symbols
#ifndef RNMapsSpecs_H
#define RNMapsSpecs_H
#import <Foundation/Foundation.h>
#import <RCTRequired/RCTRequired.h>
#import <RCTTypeSafety/RCTConvertHelpers.h>
#import <RCTTypeSafety/RCTTypedModuleConstants.h>
#import <React/RCTBridgeModule.h>
#import <React/RCTCxxConvert.h>
#import <React/RCTManagedPointer.h>
#import <ReactCommon/RCTTurboModule.h>
#import <optional>
#import <vector>
NS_ASSUME_NONNULL_BEGIN
namespace JS {
namespace NativeAirMapsModule {
struct LatLng {
double latitude() const;
double longitude() const;
LatLng(NSDictionary *const v) : _v(v) {}
private:
NSDictionary *_v;
};
}
}
@interface RCTCxxConvert (NativeAirMapsModule_LatLng)
+ (RCTManagedPointer *)JS_NativeAirMapsModule_LatLng:(id)json;
@end
namespace JS {
namespace NativeAirMapsModule {
struct Point {
double x() const;
double y() const;
Point(NSDictionary *const v) : _v(v) {}
private:
NSDictionary *_v;
};
}
}
@interface RCTCxxConvert (NativeAirMapsModule_Point)
+ (RCTManagedPointer *)JS_NativeAirMapsModule_Point:(id)json;
@end
@protocol NativeAirMapsModuleSpec <RCTBridgeModule, RCTTurboModule>
- (void)getCamera:(double)tag
resolve:(RCTPromiseResolveBlock)resolve
reject:(RCTPromiseRejectBlock)reject;
- (void)getMarkersFrames:(double)tag
onlyVisible:(BOOL)onlyVisible
resolve:(RCTPromiseResolveBlock)resolve
reject:(RCTPromiseRejectBlock)reject;
- (void)getMapBoundaries:(double)tag
resolve:(RCTPromiseResolveBlock)resolve
reject:(RCTPromiseRejectBlock)reject;
- (void)takeSnapshot:(double)tag
config:(NSString *)config
resolve:(RCTPromiseResolveBlock)resolve
reject:(RCTPromiseRejectBlock)reject;
- (void)getAddressFromCoordinates:(double)tag
coordinate:(JS::NativeAirMapsModule::LatLng &)coordinate
resolve:(RCTPromiseResolveBlock)resolve
reject:(RCTPromiseRejectBlock)reject;
- (void)getPointForCoordinate:(double)tag
coordinate:(JS::NativeAirMapsModule::LatLng &)coordinate
resolve:(RCTPromiseResolveBlock)resolve
reject:(RCTPromiseRejectBlock)reject;
- (void)getCoordinateForPoint:(double)tag
point:(JS::NativeAirMapsModule::Point &)point
resolve:(RCTPromiseResolveBlock)resolve
reject:(RCTPromiseRejectBlock)reject;
@end
@interface NativeAirMapsModuleSpecBase : NSObject {
@protected
facebook::react::EventEmitterCallback _eventEmitterCallback;
}
- (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper;
@end
namespace facebook::react {
/**
* ObjC++ class for module 'NativeAirMapsModule'
*/
class JSI_EXPORT NativeAirMapsModuleSpecJSI : public ObjCTurboModule {
public:
NativeAirMapsModuleSpecJSI(const ObjCTurboModule::InitParams &params);
};
} // namespace facebook::react
inline double JS::NativeAirMapsModule::LatLng::latitude() const
{
id const p = _v[@"latitude"];
return RCTBridgingToDouble(p);
}
inline double JS::NativeAirMapsModule::LatLng::longitude() const
{
id const p = _v[@"longitude"];
return RCTBridgingToDouble(p);
}
inline double JS::NativeAirMapsModule::Point::x() const
{
id const p = _v[@"x"];
return RCTBridgingToDouble(p);
}
inline double JS::NativeAirMapsModule::Point::y() const
{
id const p = _v[@"y"];
return RCTBridgingToDouble(p);
}
NS_ASSUME_NONNULL_END
#endif // RNMapsSpecs_H

View File

@@ -0,0 +1,26 @@
/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
* once the code is regenerated.
*
* @generated by codegen project: GenerateShadowNodeCpp.js
*/
#include "ShadowNodes.h"
namespace facebook::react {
extern const char RNMapsCalloutComponentName[] = "RNMapsCallout";
extern const char RNMapsCircleComponentName[] = "RNMapsCircle";
extern const char RNMapsGoogleMapViewComponentName[] = "RNMapsGoogleMapView";
extern const char RNMapsGooglePolygonComponentName[] = "RNMapsGooglePolygon";
extern const char RNMapsMapViewComponentName[] = "RNMapsMapView";
extern const char RNMapsMarkerComponentName[] = "RNMapsMarker";
extern const char RNMapsOverlayComponentName[] = "RNMapsOverlay";
extern const char RNMapsPolylineComponentName[] = "RNMapsPolyline";
extern const char RNMapsUrlTileComponentName[] = "RNMapsUrlTile";
extern const char RNMapsWMSTileComponentName[] = "RNMapsWMSTile";
} // namespace facebook::react

View File

@@ -0,0 +1,131 @@
/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
* once the code is regenerated.
*
* @generated by codegen project: GenerateShadowNodeH.js
*/
#pragma once
#include "EventEmitters.h"
#include "Props.h"
#include "States.h"
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
#include <jsi/jsi.h>
namespace facebook::react {
JSI_EXPORT extern const char RNMapsCalloutComponentName[];
/*
* `ShadowNode` for <RNMapsCallout> component.
*/
using RNMapsCalloutShadowNode = ConcreteViewShadowNode<
RNMapsCalloutComponentName,
RNMapsCalloutProps,
RNMapsCalloutEventEmitter,
RNMapsCalloutState>;
JSI_EXPORT extern const char RNMapsCircleComponentName[];
/*
* `ShadowNode` for <RNMapsCircle> component.
*/
using RNMapsCircleShadowNode = ConcreteViewShadowNode<
RNMapsCircleComponentName,
RNMapsCircleProps,
RNMapsCircleEventEmitter,
RNMapsCircleState>;
JSI_EXPORT extern const char RNMapsGoogleMapViewComponentName[];
/*
* `ShadowNode` for <RNMapsGoogleMapView> component.
*/
using RNMapsGoogleMapViewShadowNode = ConcreteViewShadowNode<
RNMapsGoogleMapViewComponentName,
RNMapsGoogleMapViewProps,
RNMapsGoogleMapViewEventEmitter,
RNMapsGoogleMapViewState>;
JSI_EXPORT extern const char RNMapsGooglePolygonComponentName[];
/*
* `ShadowNode` for <RNMapsGooglePolygon> component.
*/
using RNMapsGooglePolygonShadowNode = ConcreteViewShadowNode<
RNMapsGooglePolygonComponentName,
RNMapsGooglePolygonProps,
RNMapsGooglePolygonEventEmitter,
RNMapsGooglePolygonState>;
JSI_EXPORT extern const char RNMapsMapViewComponentName[];
/*
* `ShadowNode` for <RNMapsMapView> component.
*/
using RNMapsMapViewShadowNode = ConcreteViewShadowNode<
RNMapsMapViewComponentName,
RNMapsMapViewProps,
RNMapsMapViewEventEmitter,
RNMapsMapViewState>;
JSI_EXPORT extern const char RNMapsMarkerComponentName[];
/*
* `ShadowNode` for <RNMapsMarker> component.
*/
using RNMapsMarkerShadowNode = ConcreteViewShadowNode<
RNMapsMarkerComponentName,
RNMapsMarkerProps,
RNMapsMarkerEventEmitter,
RNMapsMarkerState>;
JSI_EXPORT extern const char RNMapsOverlayComponentName[];
/*
* `ShadowNode` for <RNMapsOverlay> component.
*/
using RNMapsOverlayShadowNode = ConcreteViewShadowNode<
RNMapsOverlayComponentName,
RNMapsOverlayProps,
RNMapsOverlayEventEmitter,
RNMapsOverlayState>;
JSI_EXPORT extern const char RNMapsPolylineComponentName[];
/*
* `ShadowNode` for <RNMapsPolyline> component.
*/
using RNMapsPolylineShadowNode = ConcreteViewShadowNode<
RNMapsPolylineComponentName,
RNMapsPolylineProps,
RNMapsPolylineEventEmitter,
RNMapsPolylineState>;
JSI_EXPORT extern const char RNMapsUrlTileComponentName[];
/*
* `ShadowNode` for <RNMapsUrlTile> component.
*/
using RNMapsUrlTileShadowNode = ConcreteViewShadowNode<
RNMapsUrlTileComponentName,
RNMapsUrlTileProps,
RNMapsUrlTileEventEmitter,
RNMapsUrlTileState>;
JSI_EXPORT extern const char RNMapsWMSTileComponentName[];
/*
* `ShadowNode` for <RNMapsWMSTile> component.
*/
using RNMapsWMSTileShadowNode = ConcreteViewShadowNode<
RNMapsWMSTileComponentName,
RNMapsWMSTileProps,
RNMapsWMSTileEventEmitter,
RNMapsWMSTileState>;
} // namespace facebook::react

View File

@@ -0,0 +1,16 @@
/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
* once the code is regenerated.
*
* @generated by codegen project: GenerateStateCpp.js
*/
#include "States.h"
namespace facebook::react {
} // namespace facebook::react

View File

@@ -0,0 +1,38 @@
/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
* once the code is regenerated.
*
* @generated by codegen project: GenerateStateH.js
*/
#pragma once
#include <react/renderer/core/StateData.h>
#ifdef RN_SERIALIZABLE_STATE
#include <folly/dynamic.h>
#endif
namespace facebook::react {
using RNMapsCalloutState = StateData;
using RNMapsCircleState = StateData;
using RNMapsGoogleMapViewState = StateData;
using RNMapsGooglePolygonState = StateData;
using RNMapsMapViewState = StateData;
using RNMapsMarkerState = StateData;
using RNMapsOverlayState = StateData;
using RNMapsPolylineState = StateData;
using RNMapsUrlTileState = StateData;
using RNMapsWMSTileState = StateData;
} // namespace facebook::react

View File

@@ -0,0 +1,74 @@
/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
* once the code is regenerated.
*
* @generated by codegen project: GenerateModuleCpp.js
*/
#include "RNMapsSpecsJSI.h"
namespace facebook::react {
static jsi::Value __hostFunction_NativeAirMapsModuleCxxSpecJSI_getCamera(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
return static_cast<NativeAirMapsModuleCxxSpecJSI *>(&turboModule)->getCamera(
rt,
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber()
);
}
static jsi::Value __hostFunction_NativeAirMapsModuleCxxSpecJSI_getMarkersFrames(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
return static_cast<NativeAirMapsModuleCxxSpecJSI *>(&turboModule)->getMarkersFrames(
rt,
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(),
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asBool()
);
}
static jsi::Value __hostFunction_NativeAirMapsModuleCxxSpecJSI_getMapBoundaries(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
return static_cast<NativeAirMapsModuleCxxSpecJSI *>(&turboModule)->getMapBoundaries(
rt,
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber()
);
}
static jsi::Value __hostFunction_NativeAirMapsModuleCxxSpecJSI_takeSnapshot(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
return static_cast<NativeAirMapsModuleCxxSpecJSI *>(&turboModule)->takeSnapshot(
rt,
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(),
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt)
);
}
static jsi::Value __hostFunction_NativeAirMapsModuleCxxSpecJSI_getAddressFromCoordinates(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
return static_cast<NativeAirMapsModuleCxxSpecJSI *>(&turboModule)->getAddressFromCoordinates(
rt,
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(),
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt)
);
}
static jsi::Value __hostFunction_NativeAirMapsModuleCxxSpecJSI_getPointForCoordinate(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
return static_cast<NativeAirMapsModuleCxxSpecJSI *>(&turboModule)->getPointForCoordinate(
rt,
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(),
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt)
);
}
static jsi::Value __hostFunction_NativeAirMapsModuleCxxSpecJSI_getCoordinateForPoint(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
return static_cast<NativeAirMapsModuleCxxSpecJSI *>(&turboModule)->getCoordinateForPoint(
rt,
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(),
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt)
);
}
NativeAirMapsModuleCxxSpecJSI::NativeAirMapsModuleCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
: TurboModule("RNMapsAirModule", jsInvoker) {
methodMap_["getCamera"] = MethodMetadata {1, __hostFunction_NativeAirMapsModuleCxxSpecJSI_getCamera};
methodMap_["getMarkersFrames"] = MethodMetadata {2, __hostFunction_NativeAirMapsModuleCxxSpecJSI_getMarkersFrames};
methodMap_["getMapBoundaries"] = MethodMetadata {1, __hostFunction_NativeAirMapsModuleCxxSpecJSI_getMapBoundaries};
methodMap_["takeSnapshot"] = MethodMetadata {2, __hostFunction_NativeAirMapsModuleCxxSpecJSI_takeSnapshot};
methodMap_["getAddressFromCoordinates"] = MethodMetadata {2, __hostFunction_NativeAirMapsModuleCxxSpecJSI_getAddressFromCoordinates};
methodMap_["getPointForCoordinate"] = MethodMetadata {2, __hostFunction_NativeAirMapsModuleCxxSpecJSI_getPointForCoordinate};
methodMap_["getCoordinateForPoint"] = MethodMetadata {2, __hostFunction_NativeAirMapsModuleCxxSpecJSI_getCoordinateForPoint};
}
} // namespace facebook::react

View File

@@ -0,0 +1,268 @@
/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
* once the code is regenerated.
*
* @generated by codegen project: GenerateModuleH.js
*/
#pragma once
#include <ReactCommon/TurboModule.h>
#include <react/bridging/Bridging.h>
namespace facebook::react {
#pragma mark - NativeAirMapsModuleLatLng
template <typename P0, typename P1>
struct NativeAirMapsModuleLatLng {
P0 latitude;
P1 longitude;
bool operator==(const NativeAirMapsModuleLatLng &other) const {
return latitude == other.latitude && longitude == other.longitude;
}
};
template <typename T>
struct NativeAirMapsModuleLatLngBridging {
static T types;
static T fromJs(
jsi::Runtime &rt,
const jsi::Object &value,
const std::shared_ptr<CallInvoker> &jsInvoker) {
T result{
bridging::fromJs<decltype(types.latitude)>(rt, value.getProperty(rt, "latitude"), jsInvoker),
bridging::fromJs<decltype(types.longitude)>(rt, value.getProperty(rt, "longitude"), jsInvoker)};
return result;
}
#ifdef DEBUG
static double latitudeToJs(jsi::Runtime &rt, decltype(types.latitude) value) {
return bridging::toJs(rt, value);
}
static double longitudeToJs(jsi::Runtime &rt, decltype(types.longitude) value) {
return bridging::toJs(rt, value);
}
#endif
static jsi::Object toJs(
jsi::Runtime &rt,
const T &value,
const std::shared_ptr<CallInvoker> &jsInvoker) {
auto result = facebook::jsi::Object(rt);
result.setProperty(rt, "latitude", bridging::toJs(rt, value.latitude, jsInvoker));
result.setProperty(rt, "longitude", bridging::toJs(rt, value.longitude, jsInvoker));
return result;
}
};
#pragma mark - NativeAirMapsModuleMapBoundaries
template <typename P0, typename P1>
struct NativeAirMapsModuleMapBoundaries {
P0 northEast;
P1 southWest;
bool operator==(const NativeAirMapsModuleMapBoundaries &other) const {
return northEast == other.northEast && southWest == other.southWest;
}
};
template <typename T>
struct NativeAirMapsModuleMapBoundariesBridging {
static T types;
static T fromJs(
jsi::Runtime &rt,
const jsi::Object &value,
const std::shared_ptr<CallInvoker> &jsInvoker) {
T result{
bridging::fromJs<decltype(types.northEast)>(rt, value.getProperty(rt, "northEast"), jsInvoker),
bridging::fromJs<decltype(types.southWest)>(rt, value.getProperty(rt, "southWest"), jsInvoker)};
return result;
}
#ifdef DEBUG
static jsi::Object northEastToJs(jsi::Runtime &rt, decltype(types.northEast) value) {
return bridging::toJs(rt, value);
}
static jsi::Object southWestToJs(jsi::Runtime &rt, decltype(types.southWest) value) {
return bridging::toJs(rt, value);
}
#endif
static jsi::Object toJs(
jsi::Runtime &rt,
const T &value,
const std::shared_ptr<CallInvoker> &jsInvoker) {
auto result = facebook::jsi::Object(rt);
result.setProperty(rt, "northEast", bridging::toJs(rt, value.northEast, jsInvoker));
result.setProperty(rt, "southWest", bridging::toJs(rt, value.southWest, jsInvoker));
return result;
}
};
#pragma mark - NativeAirMapsModulePoint
template <typename P0, typename P1>
struct NativeAirMapsModulePoint {
P0 x;
P1 y;
bool operator==(const NativeAirMapsModulePoint &other) const {
return x == other.x && y == other.y;
}
};
template <typename T>
struct NativeAirMapsModulePointBridging {
static T types;
static T fromJs(
jsi::Runtime &rt,
const jsi::Object &value,
const std::shared_ptr<CallInvoker> &jsInvoker) {
T result{
bridging::fromJs<decltype(types.x)>(rt, value.getProperty(rt, "x"), jsInvoker),
bridging::fromJs<decltype(types.y)>(rt, value.getProperty(rt, "y"), jsInvoker)};
return result;
}
#ifdef DEBUG
static double xToJs(jsi::Runtime &rt, decltype(types.x) value) {
return bridging::toJs(rt, value);
}
static double yToJs(jsi::Runtime &rt, decltype(types.y) value) {
return bridging::toJs(rt, value);
}
#endif
static jsi::Object toJs(
jsi::Runtime &rt,
const T &value,
const std::shared_ptr<CallInvoker> &jsInvoker) {
auto result = facebook::jsi::Object(rt);
result.setProperty(rt, "x", bridging::toJs(rt, value.x, jsInvoker));
result.setProperty(rt, "y", bridging::toJs(rt, value.y, jsInvoker));
return result;
}
};
class JSI_EXPORT NativeAirMapsModuleCxxSpecJSI : public TurboModule {
protected:
NativeAirMapsModuleCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
public:
virtual jsi::Value getCamera(jsi::Runtime &rt, double tag) = 0;
virtual jsi::Value getMarkersFrames(jsi::Runtime &rt, double tag, bool onlyVisible) = 0;
virtual jsi::Value getMapBoundaries(jsi::Runtime &rt, double tag) = 0;
virtual jsi::Value takeSnapshot(jsi::Runtime &rt, double tag, jsi::String config) = 0;
virtual jsi::Value getAddressFromCoordinates(jsi::Runtime &rt, double tag, jsi::Object coordinate) = 0;
virtual jsi::Value getPointForCoordinate(jsi::Runtime &rt, double tag, jsi::Object coordinate) = 0;
virtual jsi::Value getCoordinateForPoint(jsi::Runtime &rt, double tag, jsi::Object point) = 0;
};
template <typename T>
class JSI_EXPORT NativeAirMapsModuleCxxSpec : public TurboModule {
public:
jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
return delegate_.create(rt, propName);
}
std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime& runtime) override {
return delegate_.getPropertyNames(runtime);
}
static constexpr std::string_view kModuleName = "RNMapsAirModule";
protected:
NativeAirMapsModuleCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
: TurboModule(std::string{NativeAirMapsModuleCxxSpec::kModuleName}, jsInvoker),
delegate_(reinterpret_cast<T*>(this), jsInvoker) {}
private:
class Delegate : public NativeAirMapsModuleCxxSpecJSI {
public:
Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
NativeAirMapsModuleCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {
}
jsi::Value getCamera(jsi::Runtime &rt, double tag) override {
static_assert(
bridging::getParameterCount(&T::getCamera) == 2,
"Expected getCamera(...) to have 2 parameters");
return bridging::callFromJs<jsi::Value>(
rt, &T::getCamera, jsInvoker_, instance_, std::move(tag));
}
jsi::Value getMarkersFrames(jsi::Runtime &rt, double tag, bool onlyVisible) override {
static_assert(
bridging::getParameterCount(&T::getMarkersFrames) == 3,
"Expected getMarkersFrames(...) to have 3 parameters");
return bridging::callFromJs<jsi::Value>(
rt, &T::getMarkersFrames, jsInvoker_, instance_, std::move(tag), std::move(onlyVisible));
}
jsi::Value getMapBoundaries(jsi::Runtime &rt, double tag) override {
static_assert(
bridging::getParameterCount(&T::getMapBoundaries) == 2,
"Expected getMapBoundaries(...) to have 2 parameters");
return bridging::callFromJs<jsi::Value>(
rt, &T::getMapBoundaries, jsInvoker_, instance_, std::move(tag));
}
jsi::Value takeSnapshot(jsi::Runtime &rt, double tag, jsi::String config) override {
static_assert(
bridging::getParameterCount(&T::takeSnapshot) == 3,
"Expected takeSnapshot(...) to have 3 parameters");
return bridging::callFromJs<jsi::Value>(
rt, &T::takeSnapshot, jsInvoker_, instance_, std::move(tag), std::move(config));
}
jsi::Value getAddressFromCoordinates(jsi::Runtime &rt, double tag, jsi::Object coordinate) override {
static_assert(
bridging::getParameterCount(&T::getAddressFromCoordinates) == 3,
"Expected getAddressFromCoordinates(...) to have 3 parameters");
return bridging::callFromJs<jsi::Value>(
rt, &T::getAddressFromCoordinates, jsInvoker_, instance_, std::move(tag), std::move(coordinate));
}
jsi::Value getPointForCoordinate(jsi::Runtime &rt, double tag, jsi::Object coordinate) override {
static_assert(
bridging::getParameterCount(&T::getPointForCoordinate) == 3,
"Expected getPointForCoordinate(...) to have 3 parameters");
return bridging::callFromJs<jsi::Value>(
rt, &T::getPointForCoordinate, jsInvoker_, instance_, std::move(tag), std::move(coordinate));
}
jsi::Value getCoordinateForPoint(jsi::Runtime &rt, double tag, jsi::Object point) override {
static_assert(
bridging::getParameterCount(&T::getCoordinateForPoint) == 3,
"Expected getCoordinateForPoint(...) to have 3 parameters");
return bridging::callFromJs<jsi::Value>(
rt, &T::getCoordinateForPoint, jsInvoker_, instance_, std::move(tag), std::move(point));
}
private:
friend class NativeAirMapsModuleCxxSpec;
T *instance_;
};
Delegate delegate_;
};
} // namespace facebook::react

View File

@@ -0,0 +1,34 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
version = "0.81.1"
source = { :git => 'https://github.com/facebook/react-native.git' }
if version == '1000.0.0'
# This is an unpublished version, use the latest commit hash of the react-native repo, which were presumably in.
source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
else
source[:tag] = "v#{version}"
end
Pod::Spec.new do |s|
s.name = "ReactAppDependencyProvider"
s.version = version
s.summary = "The third party dependency provider for the app"
s.homepage = "https://reactnative.dev/"
s.documentation_url = "https://reactnative.dev/"
s.license = "MIT"
s.author = "Meta Platforms, Inc. and its affiliates"
s.platforms = min_supported_versions
s.source = source
s.source_files = "**/RCTAppDependencyProvider.{h,mm}"
# This guard prevent to install the dependencies when we run `pod install` in the old architecture.
s.pod_target_xcconfig = {
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
"DEFINES_MODULE" => "YES"
}
s.dependency "ReactCodegen"
end

View File

@@ -0,0 +1,120 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
version = "0.81.1"
source = { :git => 'https://github.com/facebook/react-native.git' }
if version == '1000.0.0'
# This is an unpublished version, use the latest commit hash of the react-native repo, which were presumably in.
source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
else
source[:tag] = "v#{version}"
end
use_frameworks = ENV['USE_FRAMEWORKS'] != nil
folly_compiler_flags = Helpers::Constants.folly_config[:compiler_flags]
boost_compiler_flags = Helpers::Constants.boost_config[:compiler_flags]
header_search_paths = []
framework_search_paths = []
header_search_paths = [
"\"$(PODS_ROOT)/ReactNativeDependencies\"",
"\"${PODS_ROOT}/Headers/Public/ReactCodegen/react/renderer/components\"",
"\"$(PODS_ROOT)/Headers/Private/React-Fabric\"",
"\"$(PODS_ROOT)/Headers/Private/React-RCTFabric\"",
"\"$(PODS_ROOT)/Headers/Private/Yoga\"",
"\"$(PODS_TARGET_SRCROOT)\"",
]
if use_frameworks
ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-Fabric", "React_Fabric", ["react/renderer/components/view/platform/cxx"])
.concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-FabricImage", "React_FabricImage", []))
.concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-graphics", "React_graphics", ["react/renderer/graphics/platform/ios"]))
.concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "ReactCommon", "ReactCommon", ["react/nativemodule/core"]))
.concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-runtimeexecutor", "React_runtimeexecutor", ["platform/ios"]))
.concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-NativeModulesApple", "React_NativeModulesApple", []))
.concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-RCTFabric", "RCTFabric", []))
.concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-debug", "React_debug", []))
.concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-rendererdebug", "React_rendererdebug", []))
.concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-utils", "React_utils", []))
.concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-featureflags", "React_featureflags", []))
.each { |search_path|
header_search_paths << "\"#{search_path}\""
}
end
Pod::Spec.new do |s|
s.name = "ReactCodegen"
s.version = version
s.summary = 'Temp pod for generated files for React Native'
s.homepage = 'https://facebook.com/'
s.license = 'Unlicense'
s.authors = 'Facebook'
s.compiler_flags = "#{folly_compiler_flags} #{boost_compiler_flags} -Wno-nullability-completeness -std=c++20"
s.source = { :git => '' }
s.header_mappings_dir = './'
s.platforms = min_supported_versions
s.source_files = "**/*.{h,mm,cpp}"
s.exclude_files = "RCTAppDependencyProvider.{h,mm}" # these files are generated in the same codegen path but needs to belong to a different pod
s.pod_target_xcconfig = {
"HEADER_SEARCH_PATHS" => header_search_paths.join(' '),
"FRAMEWORK_SEARCH_PATHS" => framework_search_paths,
"OTHER_CPLUSPLUSFLAGS" => "$(inherited) #{folly_compiler_flags} #{boost_compiler_flags}"
}
s.dependency "React-jsiexecutor"
s.dependency "RCTRequired"
s.dependency "RCTTypeSafety"
s.dependency "React-Core"
s.dependency "React-jsi"
s.dependency "ReactCommon/turbomodule/bridging"
s.dependency "ReactCommon/turbomodule/core"
s.dependency "React-NativeModulesApple"
s.dependency 'React-graphics'
s.dependency 'React-rendererdebug'
s.dependency 'React-Fabric'
s.dependency 'React-FabricImage'
s.dependency 'React-debug'
s.dependency 'React-utils'
s.dependency 'React-featureflags'
s.dependency 'React-RCTAppDelegate'
depend_on_js_engine(s)
add_rn_third_party_dependencies(s)
add_rncore_dependency(s)
s.script_phases = {
'name' => 'Generate Specs',
'execution_position' => :before_compile,
'input_files' => ["${PODS_ROOT}/../../../src/specs/NativeAirMapsModule.ts",
"${PODS_ROOT}/../../../src/specs/NativeComponentCallout.ts",
"${PODS_ROOT}/../../../src/specs/NativeComponentCircle.ts",
"${PODS_ROOT}/../../../src/specs/NativeComponentGoogleMapView.ts",
"${PODS_ROOT}/../../../src/specs/NativeComponentGooglePolygon.ts",
"${PODS_ROOT}/../../../src/specs/NativeComponentMapView.ts",
"${PODS_ROOT}/../../../src/specs/NativeComponentMarker.ts",
"${PODS_ROOT}/../../../src/specs/NativeComponentOverlay.ts",
"${PODS_ROOT}/../../../src/specs/NativeComponentPolyline.ts",
"${PODS_ROOT}/../../../src/specs/NativeComponentUrlTile.ts",
"${PODS_ROOT}/../../../src/specs/NativeComponentWMSTile.ts"],
'show_env_vars_in_log' => true,
'output_files' => ["${DERIVED_FILE_DIR}/react-codegen.log"],
'script': <<-SCRIPT
pushd "$PODS_ROOT/../" > /dev/null
RCT_SCRIPT_POD_INSTALLATION_ROOT=$(pwd)
popd >/dev/null
export RCT_SCRIPT_RN_DIR="$RCT_SCRIPT_POD_INSTALLATION_ROOT/../../node_modules/react-native"
export RCT_SCRIPT_APP_PATH="$RCT_SCRIPT_POD_INSTALLATION_ROOT/../.."
export RCT_SCRIPT_OUTPUT_DIR="$RCT_SCRIPT_POD_INSTALLATION_ROOT"
export RCT_SCRIPT_TYPE="withCodegenDiscovery"
export SCRIPT_PHASES_SCRIPT="$RCT_SCRIPT_RN_DIR/scripts/react_native_pods_utils/script_phases.sh"
export WITH_ENVIRONMENT="$RCT_SCRIPT_RN_DIR/scripts/xcode/with-environment.sh"
/bin/sh -c '"$WITH_ENVIRONMENT" "$SCRIPT_PHASES_SCRIPT"'
SCRIPT
}
end

View File

@@ -0,0 +1,15 @@
framework module ReactNativeMapsGenerated {
header "RNMapsAirModuleDelegate.h"
header "RNMapsHostViewDelegate.h"
explicit module RNMapsSpecs {
header "ComponentDescriptors.h"
header "EventEmitters.h"
header "Props.h"
header "RCTComponentViewHelpers.h"
header "RNMapsSpecs.h"
export *
}
export *
}