From 95956356e43e49169b54cbd9058c2d167b8b8a4b Mon Sep 17 00:00:00 2001 From: Graham Mendick Date: Sat, 27 Aug 2022 12:04:10 +0100 Subject: [PATCH 01/21] Renamed codegen library to navigationreactnative Autolinking on Android doesn't like hyphens in library name --- NavigationReactNative/src/android/build.gradle | 2 +- .../navigation-react-native/NVActionBarShadowNode.h | 4 ++-- .../navigation-react-native/NVBarButtonShadowNode.h | 4 ++-- .../navigation-react-native/NVSearchBarShadowNode.h | 4 ++-- .../navigation-react-native/NVTabBarItemShadowNode.h | 4 ++-- .../navigation-react-native/NVTitleBarShadowNode.h | 4 ++-- .../src/ios/NVActionBarComponentView.mm | 10 +++++----- .../src/ios/NVBarButtonComponentView.mm | 10 +++++----- .../src/ios/NVBottomAppBarComponentView.mm | 8 ++++---- .../src/ios/NVBottomSheetComponentView.mm | 8 ++++---- .../src/ios/NVCollapsingBarComponentView.mm | 8 ++++---- .../src/ios/NVCoordinatorLayoutComponentView.mm | 8 ++++---- .../ios/NVExtendedFloatingActionButtonComponentView.mm | 8 ++++---- .../src/ios/NVFloatingActionButtonComponentView.mm | 8 ++++---- .../src/ios/NVLeftBarComponentView.mm | 8 ++++---- NavigationReactNative/src/ios/NVMaterial3Module.mm | 2 +- .../src/ios/NVNavigationBarComponentView.mm | 8 ++++---- .../src/ios/NVNavigationStackComponentView.mm | 8 ++++---- .../src/ios/NVRightBarComponentView.mm | 8 ++++---- NavigationReactNative/src/ios/NVSceneComponentView.mm | 8 ++++---- .../src/ios/NVSearchBarComponentView.mm | 10 +++++----- .../src/ios/NVSegmentedTabComponentView.mm | 8 ++++---- .../src/ios/NVSharedElementComponentView.mm | 8 ++++---- .../src/ios/NVStatusBarComponentView.mm | 8 ++++---- NavigationReactNative/src/ios/NVTabBarComponentView.mm | 8 ++++---- .../src/ios/NVTabBarItemComponentView.mm | 10 +++++----- .../src/ios/NVTabBarPagerComponentView.mm | 8 ++++---- .../src/ios/NVTabBarPagerRTLComponentView.mm | 8 ++++---- .../src/ios/NVTabLayoutComponentView.mm | 8 ++++---- .../src/ios/NVTabLayoutRTLComponentView.mm | 8 ++++---- .../src/ios/NVTabNavigationComponentView.mm | 8 ++++---- .../src/ios/NVTitleBarComponentView.mm | 10 +++++----- .../src/ios/NVToolbarComponentView.mm | 8 ++++---- build/npm/navigation-react-native/package.json | 2 +- 34 files changed, 122 insertions(+), 122 deletions(-) diff --git a/NavigationReactNative/src/android/build.gradle b/NavigationReactNative/src/android/build.gradle index 3dcd4d1ffd..bcf8bacdb6 100644 --- a/NavigationReactNative/src/android/build.gradle +++ b/NavigationReactNative/src/android/build.gradle @@ -68,7 +68,7 @@ dependencies { if (isNewArchitectureEnabled()) { react { jsRootDir = file("../") - libraryName = "navigation-react-native" + libraryName = "navigationreactnative" codegenJavaPackageName = "com.navigation.reactnative" } } \ No newline at end of file diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVActionBarShadowNode.h b/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVActionBarShadowNode.h index 53e322a763..25685a4a69 100644 --- a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVActionBarShadowNode.h +++ b/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVActionBarShadowNode.h @@ -1,8 +1,8 @@ #pragma once #include "NVActionBarState.h" -#include -#include +#include +#include #include namespace facebook { diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVBarButtonShadowNode.h b/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVBarButtonShadowNode.h index 531eb76503..af91fabcb7 100644 --- a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVBarButtonShadowNode.h +++ b/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVBarButtonShadowNode.h @@ -2,8 +2,8 @@ #include "NVBarButtonState.h" #include -#include -#include +#include +#include #include namespace facebook { diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVSearchBarShadowNode.h b/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVSearchBarShadowNode.h index e6bf5aac52..0ec6cb33d2 100644 --- a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVSearchBarShadowNode.h +++ b/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVSearchBarShadowNode.h @@ -1,8 +1,8 @@ #pragma once #include "NVSearchBarState.h" -#include -#include +#include +#include #include namespace facebook { diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVTabBarItemShadowNode.h b/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVTabBarItemShadowNode.h index 06af70ed9f..857bbbd623 100644 --- a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVTabBarItemShadowNode.h +++ b/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVTabBarItemShadowNode.h @@ -2,8 +2,8 @@ #include "NVTabBarItemState.h" #include -#include -#include +#include +#include #include namespace facebook { diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVTitleBarShadowNode.h b/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVTitleBarShadowNode.h index b54351d758..0222bda5c6 100644 --- a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVTitleBarShadowNode.h +++ b/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVTitleBarShadowNode.h @@ -1,8 +1,8 @@ #pragma once #include "NVTitleBarState.h" -#include -#include +#include +#include #include namespace facebook { diff --git a/NavigationReactNative/src/ios/NVActionBarComponentView.mm b/NavigationReactNative/src/ios/NVActionBarComponentView.mm index ca823faca4..c4ce793df2 100644 --- a/NavigationReactNative/src/ios/NVActionBarComponentView.mm +++ b/NavigationReactNative/src/ios/NVActionBarComponentView.mm @@ -1,11 +1,11 @@ #ifdef RCT_NEW_ARCH_ENABLED #import "NVActionBarComponentView.h" -#import -#import -#import -#import -#import +#import +#import +#import +#import +#import #import "RCTFabricComponentsPlugins.h" diff --git a/NavigationReactNative/src/ios/NVBarButtonComponentView.mm b/NavigationReactNative/src/ios/NVBarButtonComponentView.mm index 8e1fd101e4..20c9a4d051 100644 --- a/NavigationReactNative/src/ios/NVBarButtonComponentView.mm +++ b/NavigationReactNative/src/ios/NVBarButtonComponentView.mm @@ -1,12 +1,12 @@ #ifdef RCT_NEW_ARCH_ENABLED #import "NVBarButtonComponentView.h" -#import -#import -#import -#import +#import +#import +#import +#import #import -#import +#import #import "RCTFabricComponentsPlugins.h" #import diff --git a/NavigationReactNative/src/ios/NVBottomAppBarComponentView.mm b/NavigationReactNative/src/ios/NVBottomAppBarComponentView.mm index 6afa6ba7ca..8394c03b45 100644 --- a/NavigationReactNative/src/ios/NVBottomAppBarComponentView.mm +++ b/NavigationReactNative/src/ios/NVBottomAppBarComponentView.mm @@ -1,10 +1,10 @@ #ifdef RCT_NEW_ARCH_ENABLED #import "NVBottomAppBarComponentView.h" -#import -#import -#import -#import +#import +#import +#import +#import #import "RCTFabricComponentsPlugins.h" diff --git a/NavigationReactNative/src/ios/NVBottomSheetComponentView.mm b/NavigationReactNative/src/ios/NVBottomSheetComponentView.mm index a05dfdb828..be07b62513 100644 --- a/NavigationReactNative/src/ios/NVBottomSheetComponentView.mm +++ b/NavigationReactNative/src/ios/NVBottomSheetComponentView.mm @@ -1,10 +1,10 @@ #ifdef RCT_NEW_ARCH_ENABLED #import "NVBottomSheetComponentView.h" -#import -#import -#import -#import +#import +#import +#import +#import #import "RCTFabricComponentsPlugins.h" diff --git a/NavigationReactNative/src/ios/NVCollapsingBarComponentView.mm b/NavigationReactNative/src/ios/NVCollapsingBarComponentView.mm index 5dadd70274..787f5aa588 100644 --- a/NavigationReactNative/src/ios/NVCollapsingBarComponentView.mm +++ b/NavigationReactNative/src/ios/NVCollapsingBarComponentView.mm @@ -1,10 +1,10 @@ #ifdef RCT_NEW_ARCH_ENABLED #import "NVCollapsingBarComponentView.h" -#import -#import -#import -#import +#import +#import +#import +#import #import "RCTFabricComponentsPlugins.h" diff --git a/NavigationReactNative/src/ios/NVCoordinatorLayoutComponentView.mm b/NavigationReactNative/src/ios/NVCoordinatorLayoutComponentView.mm index a1900816d4..952b61a077 100644 --- a/NavigationReactNative/src/ios/NVCoordinatorLayoutComponentView.mm +++ b/NavigationReactNative/src/ios/NVCoordinatorLayoutComponentView.mm @@ -1,10 +1,10 @@ #ifdef RCT_NEW_ARCH_ENABLED #import "NVCoordinatorLayoutComponentView.h" -#import -#import -#import -#import +#import +#import +#import +#import #import "RCTFabricComponentsPlugins.h" diff --git a/NavigationReactNative/src/ios/NVExtendedFloatingActionButtonComponentView.mm b/NavigationReactNative/src/ios/NVExtendedFloatingActionButtonComponentView.mm index 813ddae7bf..502031508a 100644 --- a/NavigationReactNative/src/ios/NVExtendedFloatingActionButtonComponentView.mm +++ b/NavigationReactNative/src/ios/NVExtendedFloatingActionButtonComponentView.mm @@ -1,10 +1,10 @@ #ifdef RCT_NEW_ARCH_ENABLED #import "NVExtendedFloatingActionButtonComponentView.h" -#import -#import -#import -#import +#import +#import +#import +#import #import "RCTFabricComponentsPlugins.h" diff --git a/NavigationReactNative/src/ios/NVFloatingActionButtonComponentView.mm b/NavigationReactNative/src/ios/NVFloatingActionButtonComponentView.mm index 0e92dabde3..61e78e9031 100644 --- a/NavigationReactNative/src/ios/NVFloatingActionButtonComponentView.mm +++ b/NavigationReactNative/src/ios/NVFloatingActionButtonComponentView.mm @@ -1,10 +1,10 @@ #ifdef RCT_NEW_ARCH_ENABLED #import "NVFloatingActionButtonComponentView.h" -#import -#import -#import -#import +#import +#import +#import +#import #import "RCTFabricComponentsPlugins.h" diff --git a/NavigationReactNative/src/ios/NVLeftBarComponentView.mm b/NavigationReactNative/src/ios/NVLeftBarComponentView.mm index e97510574f..24872272ca 100644 --- a/NavigationReactNative/src/ios/NVLeftBarComponentView.mm +++ b/NavigationReactNative/src/ios/NVLeftBarComponentView.mm @@ -1,10 +1,10 @@ #ifdef RCT_NEW_ARCH_ENABLED #import "NVLeftBarComponentView.h" -#import -#import -#import -#import +#import +#import +#import +#import #import "RCTFabricComponentsPlugins.h" #import diff --git a/NavigationReactNative/src/ios/NVMaterial3Module.mm b/NavigationReactNative/src/ios/NVMaterial3Module.mm index 078ba7d48a..4cc8dc3f61 100644 --- a/NavigationReactNative/src/ios/NVMaterial3Module.mm +++ b/NavigationReactNative/src/ios/NVMaterial3Module.mm @@ -1,6 +1,6 @@ #ifdef RCT_NEW_ARCH_ENABLED #import "NVMaterial3Module.h" -#import "navigation-react-native.h" +#import "navigationreactnative.h" @implementation NVMaterial3Module diff --git a/NavigationReactNative/src/ios/NVNavigationBarComponentView.mm b/NavigationReactNative/src/ios/NVNavigationBarComponentView.mm index 271316b63d..51030cd345 100644 --- a/NavigationReactNative/src/ios/NVNavigationBarComponentView.mm +++ b/NavigationReactNative/src/ios/NVNavigationBarComponentView.mm @@ -1,10 +1,10 @@ #ifdef RCT_NEW_ARCH_ENABLED #import "NVNavigationBarComponentView.h" -#import -#import -#import -#import +#import +#import +#import +#import #import "RCTFabricComponentsPlugins.h" #import diff --git a/NavigationReactNative/src/ios/NVNavigationStackComponentView.mm b/NavigationReactNative/src/ios/NVNavigationStackComponentView.mm index 9876572a66..4da55f59c2 100644 --- a/NavigationReactNative/src/ios/NVNavigationStackComponentView.mm +++ b/NavigationReactNative/src/ios/NVNavigationStackComponentView.mm @@ -6,10 +6,10 @@ #import "NVSceneController.h" #import "NVSceneComponentView.h" -#import -#import -#import -#import +#import +#import +#import +#import #import "RCTFabricComponentsPlugins.h" #import diff --git a/NavigationReactNative/src/ios/NVRightBarComponentView.mm b/NavigationReactNative/src/ios/NVRightBarComponentView.mm index 450d434870..20facb7052 100644 --- a/NavigationReactNative/src/ios/NVRightBarComponentView.mm +++ b/NavigationReactNative/src/ios/NVRightBarComponentView.mm @@ -1,10 +1,10 @@ #ifdef RCT_NEW_ARCH_ENABLED #import "NVRightBarComponentView.h" -#import -#import -#import -#import +#import +#import +#import +#import #import "RCTFabricComponentsPlugins.h" #import diff --git a/NavigationReactNative/src/ios/NVSceneComponentView.mm b/NavigationReactNative/src/ios/NVSceneComponentView.mm index ded98c4787..93610577c3 100644 --- a/NavigationReactNative/src/ios/NVSceneComponentView.mm +++ b/NavigationReactNative/src/ios/NVSceneComponentView.mm @@ -1,10 +1,10 @@ #ifdef RCT_NEW_ARCH_ENABLED #import "NVSceneComponentView.h" -#import -#import -#import -#import +#import +#import +#import +#import #import "RCTFabricComponentsPlugins.h" #import diff --git a/NavigationReactNative/src/ios/NVSearchBarComponentView.mm b/NavigationReactNative/src/ios/NVSearchBarComponentView.mm index 98b116617c..ddcc440728 100644 --- a/NavigationReactNative/src/ios/NVSearchBarComponentView.mm +++ b/NavigationReactNative/src/ios/NVSearchBarComponentView.mm @@ -2,11 +2,11 @@ #import "NVSearchBarComponentView.h" #import "NVSearchResultsController.h" -#import -#import -#import -#import -#import +#import +#import +#import +#import +#import #import "RCTFabricComponentsPlugins.h" #import diff --git a/NavigationReactNative/src/ios/NVSegmentedTabComponentView.mm b/NavigationReactNative/src/ios/NVSegmentedTabComponentView.mm index 4ba89b621c..5f29162d1e 100644 --- a/NavigationReactNative/src/ios/NVSegmentedTabComponentView.mm +++ b/NavigationReactNative/src/ios/NVSegmentedTabComponentView.mm @@ -2,10 +2,10 @@ #import "NVSegmentedTabComponentView.h" #import "NVTabBarPagerComponentView.h" -#import -#import -#import -#import +#import +#import +#import +#import #import "RCTFabricComponentsPlugins.h" #import diff --git a/NavigationReactNative/src/ios/NVSharedElementComponentView.mm b/NavigationReactNative/src/ios/NVSharedElementComponentView.mm index b018927dc2..4a76bd56ff 100644 --- a/NavigationReactNative/src/ios/NVSharedElementComponentView.mm +++ b/NavigationReactNative/src/ios/NVSharedElementComponentView.mm @@ -1,10 +1,10 @@ #ifdef RCT_NEW_ARCH_ENABLED #import "NVSharedElementComponentView.h" -#import -#import -#import -#import +#import +#import +#import +#import #import "RCTFabricComponentsPlugins.h" diff --git a/NavigationReactNative/src/ios/NVStatusBarComponentView.mm b/NavigationReactNative/src/ios/NVStatusBarComponentView.mm index e47068763f..7b6b65c315 100644 --- a/NavigationReactNative/src/ios/NVStatusBarComponentView.mm +++ b/NavigationReactNative/src/ios/NVStatusBarComponentView.mm @@ -2,10 +2,10 @@ #import "NVStatusBarComponentView.h" #import "NVSceneController.h" -#import -#import -#import -#import +#import +#import +#import +#import #import "RCTFabricComponentsPlugins.h" #import diff --git a/NavigationReactNative/src/ios/NVTabBarComponentView.mm b/NavigationReactNative/src/ios/NVTabBarComponentView.mm index d63b48702c..4039425c8a 100644 --- a/NavigationReactNative/src/ios/NVTabBarComponentView.mm +++ b/NavigationReactNative/src/ios/NVTabBarComponentView.mm @@ -3,10 +3,10 @@ #import "NVTabBarItemComponentView.h" #import "NVTabBarPagerComponentView.h" -#import -#import -#import -#import +#import +#import +#import +#import #import "RCTFabricComponentsPlugins.h" #import diff --git a/NavigationReactNative/src/ios/NVTabBarItemComponentView.mm b/NavigationReactNative/src/ios/NVTabBarItemComponentView.mm index e824d52a8f..c510191a38 100644 --- a/NavigationReactNative/src/ios/NVTabBarItemComponentView.mm +++ b/NavigationReactNative/src/ios/NVTabBarItemComponentView.mm @@ -2,12 +2,12 @@ #import "NVTabBarItemComponentView.h" #import "NVNavigationStackComponentView.h" -#import -#import -#import -#import +#import +#import +#import +#import #import -#import +#import #import "RCTFabricComponentsPlugins.h" #import diff --git a/NavigationReactNative/src/ios/NVTabBarPagerComponentView.mm b/NavigationReactNative/src/ios/NVTabBarPagerComponentView.mm index 50014948b0..7e4aaa2582 100644 --- a/NavigationReactNative/src/ios/NVTabBarPagerComponentView.mm +++ b/NavigationReactNative/src/ios/NVTabBarPagerComponentView.mm @@ -3,10 +3,10 @@ #import "NVSegmentedTabComponentView.h" #import "NVTabBarItemComponentView.h" -#import -#import -#import -#import +#import +#import +#import +#import #import "RCTFabricComponentsPlugins.h" #import diff --git a/NavigationReactNative/src/ios/NVTabBarPagerRTLComponentView.mm b/NavigationReactNative/src/ios/NVTabBarPagerRTLComponentView.mm index 065338fe76..2a2bff8c74 100644 --- a/NavigationReactNative/src/ios/NVTabBarPagerRTLComponentView.mm +++ b/NavigationReactNative/src/ios/NVTabBarPagerRTLComponentView.mm @@ -1,10 +1,10 @@ #ifdef RCT_NEW_ARCH_ENABLED #import "NVTabBarPagerRTLComponentView.h" -#import -#import -#import -#import +#import +#import +#import +#import #import "RCTFabricComponentsPlugins.h" diff --git a/NavigationReactNative/src/ios/NVTabLayoutComponentView.mm b/NavigationReactNative/src/ios/NVTabLayoutComponentView.mm index 352f958ffb..3154009ad6 100644 --- a/NavigationReactNative/src/ios/NVTabLayoutComponentView.mm +++ b/NavigationReactNative/src/ios/NVTabLayoutComponentView.mm @@ -1,10 +1,10 @@ #ifdef RCT_NEW_ARCH_ENABLED #import "NVTabLayoutComponentView.h" -#import -#import -#import -#import +#import +#import +#import +#import #import "RCTFabricComponentsPlugins.h" diff --git a/NavigationReactNative/src/ios/NVTabLayoutRTLComponentView.mm b/NavigationReactNative/src/ios/NVTabLayoutRTLComponentView.mm index 85bad02a64..e50e3ae698 100644 --- a/NavigationReactNative/src/ios/NVTabLayoutRTLComponentView.mm +++ b/NavigationReactNative/src/ios/NVTabLayoutRTLComponentView.mm @@ -1,10 +1,10 @@ #ifdef RCT_NEW_ARCH_ENABLED #import "NVTabLayoutRTLComponentView.h" -#import -#import -#import -#import +#import +#import +#import +#import #import "RCTFabricComponentsPlugins.h" diff --git a/NavigationReactNative/src/ios/NVTabNavigationComponentView.mm b/NavigationReactNative/src/ios/NVTabNavigationComponentView.mm index 9708ad5415..24484fb34f 100644 --- a/NavigationReactNative/src/ios/NVTabNavigationComponentView.mm +++ b/NavigationReactNative/src/ios/NVTabNavigationComponentView.mm @@ -1,10 +1,10 @@ #ifdef RCT_NEW_ARCH_ENABLED #import "NVTabNavigationComponentView.h" -#import -#import -#import -#import +#import +#import +#import +#import #import "RCTFabricComponentsPlugins.h" diff --git a/NavigationReactNative/src/ios/NVTitleBarComponentView.mm b/NavigationReactNative/src/ios/NVTitleBarComponentView.mm index 6f15543ef3..0934580ecf 100644 --- a/NavigationReactNative/src/ios/NVTitleBarComponentView.mm +++ b/NavigationReactNative/src/ios/NVTitleBarComponentView.mm @@ -1,11 +1,11 @@ #ifdef RCT_NEW_ARCH_ENABLED #import "NVTitleBarComponentView.h" -#import -#import -#import -#import -#import +#import +#import +#import +#import +#import #import "RCTFabricComponentsPlugins.h" #import diff --git a/NavigationReactNative/src/ios/NVToolbarComponentView.mm b/NavigationReactNative/src/ios/NVToolbarComponentView.mm index 7975589215..4921d0aeb1 100644 --- a/NavigationReactNative/src/ios/NVToolbarComponentView.mm +++ b/NavigationReactNative/src/ios/NVToolbarComponentView.mm @@ -1,10 +1,10 @@ #ifdef RCT_NEW_ARCH_ENABLED #import "NVToolbarComponentView.h" -#import -#import -#import -#import +#import +#import +#import +#import #import "RCTFabricComponentsPlugins.h" diff --git a/build/npm/navigation-react-native/package.json b/build/npm/navigation-react-native/package.json index 379337bc33..8a930053dc 100644 --- a/build/npm/navigation-react-native/package.json +++ b/build/npm/navigation-react-native/package.json @@ -23,7 +23,7 @@ "codegenConfig": { "libraries": [ { - "name": "navigation-react-native", + "name": "navigationreactnative", "type": "all", "jsSrcsDir": "." } From a744d44719c1c5a986178e93bf2ed9087f64b274 Mon Sep 17 00:00:00 2001 From: Graham Mendick Date: Sat, 27 Aug 2022 13:20:47 +0100 Subject: [PATCH 02/21] Renamed folder to codegen lib name and run on ios And renamed import to match as well, though don't know why needed the folder name before. Plan to drop the subfolders from cpp folder --- .../NVActionBarComponentDescriptor.h | 0 .../NVActionBarShadowNode.cpp | 0 .../NVActionBarShadowNode.h | 0 .../NVActionBarState.cpp | 0 .../NVActionBarState.h | 0 .../NVBarButtonComponentDescriptor.h | 0 .../NVBarButtonShadowNode.cpp | 0 .../NVBarButtonShadowNode.h | 0 .../NVBarButtonState.cpp | 0 .../NVBarButtonState.h | 0 .../NVSearchBarComponentDescriptor.h | 0 .../NVSearchBarShadowNode.cpp | 0 .../NVSearchBarShadowNode.h | 0 .../NVSearchBarState.cpp | 0 .../NVSearchBarState.h | 0 .../NVTabBarItemComponentDescriptor.h | 0 .../NVTabBarItemShadowNode.cpp | 0 .../NVTabBarItemShadowNode.h | 0 .../NVTabBarItemState.cpp | 0 .../NVTabBarItemState.h | 0 .../NVTitleBarComponentDescriptor.h | 0 .../NVTitleBarShadowNode.cpp | 0 .../NVTitleBarShadowNode.h | 0 .../NVTitleBarState.cpp | 0 .../NVTitleBarState.h | 0 NavigationReactNative/src/ios/NVActionBarComponentView.mm | 2 +- NavigationReactNative/src/ios/NVBarButtonComponentView.mm | 2 +- NavigationReactNative/src/ios/NVSearchBarComponentView.mm | 2 +- NavigationReactNative/src/ios/NVTabBarItemComponentView.mm | 2 +- NavigationReactNative/src/ios/NVTitleBarComponentView.mm | 2 +- 30 files changed, 5 insertions(+), 5 deletions(-) rename NavigationReactNative/src/cpp/react/renderer/components/{navigation-react-native => navigationreactnative}/NVActionBarComponentDescriptor.h (100%) rename NavigationReactNative/src/cpp/react/renderer/components/{navigation-react-native => navigationreactnative}/NVActionBarShadowNode.cpp (100%) rename NavigationReactNative/src/cpp/react/renderer/components/{navigation-react-native => navigationreactnative}/NVActionBarShadowNode.h (100%) rename NavigationReactNative/src/cpp/react/renderer/components/{navigation-react-native => navigationreactnative}/NVActionBarState.cpp (100%) rename NavigationReactNative/src/cpp/react/renderer/components/{navigation-react-native => navigationreactnative}/NVActionBarState.h (100%) rename NavigationReactNative/src/cpp/react/renderer/components/{navigation-react-native => navigationreactnative}/NVBarButtonComponentDescriptor.h (100%) rename NavigationReactNative/src/cpp/react/renderer/components/{navigation-react-native => navigationreactnative}/NVBarButtonShadowNode.cpp (100%) rename NavigationReactNative/src/cpp/react/renderer/components/{navigation-react-native => navigationreactnative}/NVBarButtonShadowNode.h (100%) rename NavigationReactNative/src/cpp/react/renderer/components/{navigation-react-native => navigationreactnative}/NVBarButtonState.cpp (100%) rename NavigationReactNative/src/cpp/react/renderer/components/{navigation-react-native => navigationreactnative}/NVBarButtonState.h (100%) rename NavigationReactNative/src/cpp/react/renderer/components/{navigation-react-native => navigationreactnative}/NVSearchBarComponentDescriptor.h (100%) rename NavigationReactNative/src/cpp/react/renderer/components/{navigation-react-native => navigationreactnative}/NVSearchBarShadowNode.cpp (100%) rename NavigationReactNative/src/cpp/react/renderer/components/{navigation-react-native => navigationreactnative}/NVSearchBarShadowNode.h (100%) rename NavigationReactNative/src/cpp/react/renderer/components/{navigation-react-native => navigationreactnative}/NVSearchBarState.cpp (100%) rename NavigationReactNative/src/cpp/react/renderer/components/{navigation-react-native => navigationreactnative}/NVSearchBarState.h (100%) rename NavigationReactNative/src/cpp/react/renderer/components/{navigation-react-native => navigationreactnative}/NVTabBarItemComponentDescriptor.h (100%) rename NavigationReactNative/src/cpp/react/renderer/components/{navigation-react-native => navigationreactnative}/NVTabBarItemShadowNode.cpp (100%) rename NavigationReactNative/src/cpp/react/renderer/components/{navigation-react-native => navigationreactnative}/NVTabBarItemShadowNode.h (100%) rename NavigationReactNative/src/cpp/react/renderer/components/{navigation-react-native => navigationreactnative}/NVTabBarItemState.cpp (100%) rename NavigationReactNative/src/cpp/react/renderer/components/{navigation-react-native => navigationreactnative}/NVTabBarItemState.h (100%) rename NavigationReactNative/src/cpp/react/renderer/components/{navigation-react-native => navigationreactnative}/NVTitleBarComponentDescriptor.h (100%) rename NavigationReactNative/src/cpp/react/renderer/components/{navigation-react-native => navigationreactnative}/NVTitleBarShadowNode.cpp (100%) rename NavigationReactNative/src/cpp/react/renderer/components/{navigation-react-native => navigationreactnative}/NVTitleBarShadowNode.h (100%) rename NavigationReactNative/src/cpp/react/renderer/components/{navigation-react-native => navigationreactnative}/NVTitleBarState.cpp (100%) rename NavigationReactNative/src/cpp/react/renderer/components/{navigation-react-native => navigationreactnative}/NVTitleBarState.h (100%) diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVActionBarComponentDescriptor.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarComponentDescriptor.h similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVActionBarComponentDescriptor.h rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarComponentDescriptor.h diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVActionBarShadowNode.cpp b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarShadowNode.cpp similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVActionBarShadowNode.cpp rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarShadowNode.cpp diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVActionBarShadowNode.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarShadowNode.h similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVActionBarShadowNode.h rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarShadowNode.h diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVActionBarState.cpp b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarState.cpp similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVActionBarState.cpp rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarState.cpp diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVActionBarState.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarState.h similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVActionBarState.h rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarState.h diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVBarButtonComponentDescriptor.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonComponentDescriptor.h similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVBarButtonComponentDescriptor.h rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonComponentDescriptor.h diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVBarButtonShadowNode.cpp b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonShadowNode.cpp similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVBarButtonShadowNode.cpp rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonShadowNode.cpp diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVBarButtonShadowNode.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonShadowNode.h similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVBarButtonShadowNode.h rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonShadowNode.h diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVBarButtonState.cpp b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonState.cpp similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVBarButtonState.cpp rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonState.cpp diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVBarButtonState.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonState.h similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVBarButtonState.h rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonState.h diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVSearchBarComponentDescriptor.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarComponentDescriptor.h similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVSearchBarComponentDescriptor.h rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarComponentDescriptor.h diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVSearchBarShadowNode.cpp b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarShadowNode.cpp similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVSearchBarShadowNode.cpp rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarShadowNode.cpp diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVSearchBarShadowNode.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarShadowNode.h similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVSearchBarShadowNode.h rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarShadowNode.h diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVSearchBarState.cpp b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarState.cpp similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVSearchBarState.cpp rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarState.cpp diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVSearchBarState.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarState.h similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVSearchBarState.h rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarState.h diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVTabBarItemComponentDescriptor.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemComponentDescriptor.h similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVTabBarItemComponentDescriptor.h rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemComponentDescriptor.h diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVTabBarItemShadowNode.cpp b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemShadowNode.cpp similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVTabBarItemShadowNode.cpp rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemShadowNode.cpp diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVTabBarItemShadowNode.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemShadowNode.h similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVTabBarItemShadowNode.h rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemShadowNode.h diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVTabBarItemState.cpp b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemState.cpp similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVTabBarItemState.cpp rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemState.cpp diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVTabBarItemState.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemState.h similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVTabBarItemState.h rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemState.h diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVTitleBarComponentDescriptor.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarComponentDescriptor.h similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVTitleBarComponentDescriptor.h rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarComponentDescriptor.h diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVTitleBarShadowNode.cpp b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarShadowNode.cpp similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVTitleBarShadowNode.cpp rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarShadowNode.cpp diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVTitleBarShadowNode.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarShadowNode.h similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVTitleBarShadowNode.h rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarShadowNode.h diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVTitleBarState.cpp b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarState.cpp similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVTitleBarState.cpp rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarState.cpp diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVTitleBarState.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarState.h similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVTitleBarState.h rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarState.h diff --git a/NavigationReactNative/src/ios/NVActionBarComponentView.mm b/NavigationReactNative/src/ios/NVActionBarComponentView.mm index c4ce793df2..c2b58d5652 100644 --- a/NavigationReactNative/src/ios/NVActionBarComponentView.mm +++ b/NavigationReactNative/src/ios/NVActionBarComponentView.mm @@ -5,7 +5,7 @@ #import #import #import -#import +#import #import "RCTFabricComponentsPlugins.h" diff --git a/NavigationReactNative/src/ios/NVBarButtonComponentView.mm b/NavigationReactNative/src/ios/NVBarButtonComponentView.mm index 20c9a4d051..9d75bc96cd 100644 --- a/NavigationReactNative/src/ios/NVBarButtonComponentView.mm +++ b/NavigationReactNative/src/ios/NVBarButtonComponentView.mm @@ -6,7 +6,7 @@ #import #import #import -#import +#import #import "RCTFabricComponentsPlugins.h" #import diff --git a/NavigationReactNative/src/ios/NVSearchBarComponentView.mm b/NavigationReactNative/src/ios/NVSearchBarComponentView.mm index ddcc440728..b84617e7ea 100644 --- a/NavigationReactNative/src/ios/NVSearchBarComponentView.mm +++ b/NavigationReactNative/src/ios/NVSearchBarComponentView.mm @@ -6,7 +6,7 @@ #import #import #import -#import +#import #import "RCTFabricComponentsPlugins.h" #import diff --git a/NavigationReactNative/src/ios/NVTabBarItemComponentView.mm b/NavigationReactNative/src/ios/NVTabBarItemComponentView.mm index c510191a38..ab527d8012 100644 --- a/NavigationReactNative/src/ios/NVTabBarItemComponentView.mm +++ b/NavigationReactNative/src/ios/NVTabBarItemComponentView.mm @@ -7,7 +7,7 @@ #import #import #import -#import +#import #import "RCTFabricComponentsPlugins.h" #import diff --git a/NavigationReactNative/src/ios/NVTitleBarComponentView.mm b/NavigationReactNative/src/ios/NVTitleBarComponentView.mm index 0934580ecf..dbeb485d36 100644 --- a/NavigationReactNative/src/ios/NVTitleBarComponentView.mm +++ b/NavigationReactNative/src/ios/NVTitleBarComponentView.mm @@ -5,7 +5,7 @@ #import #import #import -#import +#import #import "RCTFabricComponentsPlugins.h" #import From ca6288f965dc04ea247a1f2a30187a449900d587 Mon Sep 17 00:00:00 2001 From: Graham Mendick Date: Sat, 27 Aug 2022 17:37:33 +0100 Subject: [PATCH 03/21] Moved c++ state into root cpp folder There's no need for the subfolders now that React Native autolinks on android. The subfolders were to make the handwritten setup on android more consistent --- .../navigationreactnative => }/NVActionBarComponentDescriptor.h | 0 .../navigationreactnative => }/NVActionBarShadowNode.cpp | 0 .../components/navigationreactnative => }/NVActionBarShadowNode.h | 0 .../components/navigationreactnative => }/NVActionBarState.cpp | 0 .../components/navigationreactnative => }/NVActionBarState.h | 0 .../navigationreactnative => }/NVBarButtonComponentDescriptor.h | 0 .../navigationreactnative => }/NVBarButtonShadowNode.cpp | 0 .../components/navigationreactnative => }/NVBarButtonShadowNode.h | 0 .../components/navigationreactnative => }/NVBarButtonState.cpp | 0 .../components/navigationreactnative => }/NVBarButtonState.h | 0 .../navigationreactnative => }/NVSearchBarComponentDescriptor.h | 0 .../navigationreactnative => }/NVSearchBarShadowNode.cpp | 0 .../components/navigationreactnative => }/NVSearchBarShadowNode.h | 0 .../components/navigationreactnative => }/NVSearchBarState.cpp | 0 .../components/navigationreactnative => }/NVSearchBarState.h | 0 .../navigationreactnative => }/NVTabBarItemComponentDescriptor.h | 0 .../navigationreactnative => }/NVTabBarItemShadowNode.cpp | 0 .../navigationreactnative => }/NVTabBarItemShadowNode.h | 0 .../components/navigationreactnative => }/NVTabBarItemState.cpp | 0 .../components/navigationreactnative => }/NVTabBarItemState.h | 0 .../navigationreactnative => }/NVTitleBarComponentDescriptor.h | 0 .../navigationreactnative => }/NVTitleBarShadowNode.cpp | 0 .../components/navigationreactnative => }/NVTitleBarShadowNode.h | 0 .../components/navigationreactnative => }/NVTitleBarState.cpp | 0 .../components/navigationreactnative => }/NVTitleBarState.h | 0 25 files changed, 0 insertions(+), 0 deletions(-) rename NavigationReactNative/src/cpp/{react/renderer/components/navigationreactnative => }/NVActionBarComponentDescriptor.h (100%) rename NavigationReactNative/src/cpp/{react/renderer/components/navigationreactnative => }/NVActionBarShadowNode.cpp (100%) rename NavigationReactNative/src/cpp/{react/renderer/components/navigationreactnative => }/NVActionBarShadowNode.h (100%) rename NavigationReactNative/src/cpp/{react/renderer/components/navigationreactnative => }/NVActionBarState.cpp (100%) rename NavigationReactNative/src/cpp/{react/renderer/components/navigationreactnative => }/NVActionBarState.h (100%) rename NavigationReactNative/src/cpp/{react/renderer/components/navigationreactnative => }/NVBarButtonComponentDescriptor.h (100%) rename NavigationReactNative/src/cpp/{react/renderer/components/navigationreactnative => }/NVBarButtonShadowNode.cpp (100%) rename NavigationReactNative/src/cpp/{react/renderer/components/navigationreactnative => }/NVBarButtonShadowNode.h (100%) rename NavigationReactNative/src/cpp/{react/renderer/components/navigationreactnative => }/NVBarButtonState.cpp (100%) rename NavigationReactNative/src/cpp/{react/renderer/components/navigationreactnative => }/NVBarButtonState.h (100%) rename NavigationReactNative/src/cpp/{react/renderer/components/navigationreactnative => }/NVSearchBarComponentDescriptor.h (100%) rename NavigationReactNative/src/cpp/{react/renderer/components/navigationreactnative => }/NVSearchBarShadowNode.cpp (100%) rename NavigationReactNative/src/cpp/{react/renderer/components/navigationreactnative => }/NVSearchBarShadowNode.h (100%) rename NavigationReactNative/src/cpp/{react/renderer/components/navigationreactnative => }/NVSearchBarState.cpp (100%) rename NavigationReactNative/src/cpp/{react/renderer/components/navigationreactnative => }/NVSearchBarState.h (100%) rename NavigationReactNative/src/cpp/{react/renderer/components/navigationreactnative => }/NVTabBarItemComponentDescriptor.h (100%) rename NavigationReactNative/src/cpp/{react/renderer/components/navigationreactnative => }/NVTabBarItemShadowNode.cpp (100%) rename NavigationReactNative/src/cpp/{react/renderer/components/navigationreactnative => }/NVTabBarItemShadowNode.h (100%) rename NavigationReactNative/src/cpp/{react/renderer/components/navigationreactnative => }/NVTabBarItemState.cpp (100%) rename NavigationReactNative/src/cpp/{react/renderer/components/navigationreactnative => }/NVTabBarItemState.h (100%) rename NavigationReactNative/src/cpp/{react/renderer/components/navigationreactnative => }/NVTitleBarComponentDescriptor.h (100%) rename NavigationReactNative/src/cpp/{react/renderer/components/navigationreactnative => }/NVTitleBarShadowNode.cpp (100%) rename NavigationReactNative/src/cpp/{react/renderer/components/navigationreactnative => }/NVTitleBarShadowNode.h (100%) rename NavigationReactNative/src/cpp/{react/renderer/components/navigationreactnative => }/NVTitleBarState.cpp (100%) rename NavigationReactNative/src/cpp/{react/renderer/components/navigationreactnative => }/NVTitleBarState.h (100%) diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarComponentDescriptor.h b/NavigationReactNative/src/cpp/NVActionBarComponentDescriptor.h similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarComponentDescriptor.h rename to NavigationReactNative/src/cpp/NVActionBarComponentDescriptor.h diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarShadowNode.cpp b/NavigationReactNative/src/cpp/NVActionBarShadowNode.cpp similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarShadowNode.cpp rename to NavigationReactNative/src/cpp/NVActionBarShadowNode.cpp diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarShadowNode.h b/NavigationReactNative/src/cpp/NVActionBarShadowNode.h similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarShadowNode.h rename to NavigationReactNative/src/cpp/NVActionBarShadowNode.h diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarState.cpp b/NavigationReactNative/src/cpp/NVActionBarState.cpp similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarState.cpp rename to NavigationReactNative/src/cpp/NVActionBarState.cpp diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarState.h b/NavigationReactNative/src/cpp/NVActionBarState.h similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarState.h rename to NavigationReactNative/src/cpp/NVActionBarState.h diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonComponentDescriptor.h b/NavigationReactNative/src/cpp/NVBarButtonComponentDescriptor.h similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonComponentDescriptor.h rename to NavigationReactNative/src/cpp/NVBarButtonComponentDescriptor.h diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonShadowNode.cpp b/NavigationReactNative/src/cpp/NVBarButtonShadowNode.cpp similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonShadowNode.cpp rename to NavigationReactNative/src/cpp/NVBarButtonShadowNode.cpp diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonShadowNode.h b/NavigationReactNative/src/cpp/NVBarButtonShadowNode.h similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonShadowNode.h rename to NavigationReactNative/src/cpp/NVBarButtonShadowNode.h diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonState.cpp b/NavigationReactNative/src/cpp/NVBarButtonState.cpp similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonState.cpp rename to NavigationReactNative/src/cpp/NVBarButtonState.cpp diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonState.h b/NavigationReactNative/src/cpp/NVBarButtonState.h similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonState.h rename to NavigationReactNative/src/cpp/NVBarButtonState.h diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarComponentDescriptor.h b/NavigationReactNative/src/cpp/NVSearchBarComponentDescriptor.h similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarComponentDescriptor.h rename to NavigationReactNative/src/cpp/NVSearchBarComponentDescriptor.h diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarShadowNode.cpp b/NavigationReactNative/src/cpp/NVSearchBarShadowNode.cpp similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarShadowNode.cpp rename to NavigationReactNative/src/cpp/NVSearchBarShadowNode.cpp diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarShadowNode.h b/NavigationReactNative/src/cpp/NVSearchBarShadowNode.h similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarShadowNode.h rename to NavigationReactNative/src/cpp/NVSearchBarShadowNode.h diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarState.cpp b/NavigationReactNative/src/cpp/NVSearchBarState.cpp similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarState.cpp rename to NavigationReactNative/src/cpp/NVSearchBarState.cpp diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarState.h b/NavigationReactNative/src/cpp/NVSearchBarState.h similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarState.h rename to NavigationReactNative/src/cpp/NVSearchBarState.h diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemComponentDescriptor.h b/NavigationReactNative/src/cpp/NVTabBarItemComponentDescriptor.h similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemComponentDescriptor.h rename to NavigationReactNative/src/cpp/NVTabBarItemComponentDescriptor.h diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemShadowNode.cpp b/NavigationReactNative/src/cpp/NVTabBarItemShadowNode.cpp similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemShadowNode.cpp rename to NavigationReactNative/src/cpp/NVTabBarItemShadowNode.cpp diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemShadowNode.h b/NavigationReactNative/src/cpp/NVTabBarItemShadowNode.h similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemShadowNode.h rename to NavigationReactNative/src/cpp/NVTabBarItemShadowNode.h diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemState.cpp b/NavigationReactNative/src/cpp/NVTabBarItemState.cpp similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemState.cpp rename to NavigationReactNative/src/cpp/NVTabBarItemState.cpp diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemState.h b/NavigationReactNative/src/cpp/NVTabBarItemState.h similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemState.h rename to NavigationReactNative/src/cpp/NVTabBarItemState.h diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarComponentDescriptor.h b/NavigationReactNative/src/cpp/NVTitleBarComponentDescriptor.h similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarComponentDescriptor.h rename to NavigationReactNative/src/cpp/NVTitleBarComponentDescriptor.h diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarShadowNode.cpp b/NavigationReactNative/src/cpp/NVTitleBarShadowNode.cpp similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarShadowNode.cpp rename to NavigationReactNative/src/cpp/NVTitleBarShadowNode.cpp diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarShadowNode.h b/NavigationReactNative/src/cpp/NVTitleBarShadowNode.h similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarShadowNode.h rename to NavigationReactNative/src/cpp/NVTitleBarShadowNode.h diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarState.cpp b/NavigationReactNative/src/cpp/NVTitleBarState.cpp similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarState.cpp rename to NavigationReactNative/src/cpp/NVTitleBarState.cpp diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarState.h b/NavigationReactNative/src/cpp/NVTitleBarState.h similarity index 100% rename from NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarState.h rename to NavigationReactNative/src/cpp/NVTitleBarState.h From 8227a352ab3af820a642bdd60e04f742ed111d52 Mon Sep 17 00:00:00 2001 From: Graham Mendick Date: Wed, 14 Sep 2022 21:32:58 +0100 Subject: [PATCH 04/21] Revert "Moved c++ state into root cpp folder" This reverts commit ca6288f965dc04ea247a1f2a30187a449900d587. --- .../navigationreactnative}/NVActionBarComponentDescriptor.h | 0 .../components/navigationreactnative}/NVActionBarShadowNode.cpp | 0 .../components/navigationreactnative}/NVActionBarShadowNode.h | 0 .../components/navigationreactnative}/NVActionBarState.cpp | 0 .../renderer/components/navigationreactnative}/NVActionBarState.h | 0 .../navigationreactnative}/NVBarButtonComponentDescriptor.h | 0 .../components/navigationreactnative}/NVBarButtonShadowNode.cpp | 0 .../components/navigationreactnative}/NVBarButtonShadowNode.h | 0 .../components/navigationreactnative}/NVBarButtonState.cpp | 0 .../renderer/components/navigationreactnative}/NVBarButtonState.h | 0 .../navigationreactnative}/NVSearchBarComponentDescriptor.h | 0 .../components/navigationreactnative}/NVSearchBarShadowNode.cpp | 0 .../components/navigationreactnative}/NVSearchBarShadowNode.h | 0 .../components/navigationreactnative}/NVSearchBarState.cpp | 0 .../renderer/components/navigationreactnative}/NVSearchBarState.h | 0 .../navigationreactnative}/NVTabBarItemComponentDescriptor.h | 0 .../components/navigationreactnative}/NVTabBarItemShadowNode.cpp | 0 .../components/navigationreactnative}/NVTabBarItemShadowNode.h | 0 .../components/navigationreactnative}/NVTabBarItemState.cpp | 0 .../components/navigationreactnative}/NVTabBarItemState.h | 0 .../navigationreactnative}/NVTitleBarComponentDescriptor.h | 0 .../components/navigationreactnative}/NVTitleBarShadowNode.cpp | 0 .../components/navigationreactnative}/NVTitleBarShadowNode.h | 0 .../components/navigationreactnative}/NVTitleBarState.cpp | 0 .../renderer/components/navigationreactnative}/NVTitleBarState.h | 0 25 files changed, 0 insertions(+), 0 deletions(-) rename NavigationReactNative/src/cpp/{ => react/renderer/components/navigationreactnative}/NVActionBarComponentDescriptor.h (100%) rename NavigationReactNative/src/cpp/{ => react/renderer/components/navigationreactnative}/NVActionBarShadowNode.cpp (100%) rename NavigationReactNative/src/cpp/{ => react/renderer/components/navigationreactnative}/NVActionBarShadowNode.h (100%) rename NavigationReactNative/src/cpp/{ => react/renderer/components/navigationreactnative}/NVActionBarState.cpp (100%) rename NavigationReactNative/src/cpp/{ => react/renderer/components/navigationreactnative}/NVActionBarState.h (100%) rename NavigationReactNative/src/cpp/{ => react/renderer/components/navigationreactnative}/NVBarButtonComponentDescriptor.h (100%) rename NavigationReactNative/src/cpp/{ => react/renderer/components/navigationreactnative}/NVBarButtonShadowNode.cpp (100%) rename NavigationReactNative/src/cpp/{ => react/renderer/components/navigationreactnative}/NVBarButtonShadowNode.h (100%) rename NavigationReactNative/src/cpp/{ => react/renderer/components/navigationreactnative}/NVBarButtonState.cpp (100%) rename NavigationReactNative/src/cpp/{ => react/renderer/components/navigationreactnative}/NVBarButtonState.h (100%) rename NavigationReactNative/src/cpp/{ => react/renderer/components/navigationreactnative}/NVSearchBarComponentDescriptor.h (100%) rename NavigationReactNative/src/cpp/{ => react/renderer/components/navigationreactnative}/NVSearchBarShadowNode.cpp (100%) rename NavigationReactNative/src/cpp/{ => react/renderer/components/navigationreactnative}/NVSearchBarShadowNode.h (100%) rename NavigationReactNative/src/cpp/{ => react/renderer/components/navigationreactnative}/NVSearchBarState.cpp (100%) rename NavigationReactNative/src/cpp/{ => react/renderer/components/navigationreactnative}/NVSearchBarState.h (100%) rename NavigationReactNative/src/cpp/{ => react/renderer/components/navigationreactnative}/NVTabBarItemComponentDescriptor.h (100%) rename NavigationReactNative/src/cpp/{ => react/renderer/components/navigationreactnative}/NVTabBarItemShadowNode.cpp (100%) rename NavigationReactNative/src/cpp/{ => react/renderer/components/navigationreactnative}/NVTabBarItemShadowNode.h (100%) rename NavigationReactNative/src/cpp/{ => react/renderer/components/navigationreactnative}/NVTabBarItemState.cpp (100%) rename NavigationReactNative/src/cpp/{ => react/renderer/components/navigationreactnative}/NVTabBarItemState.h (100%) rename NavigationReactNative/src/cpp/{ => react/renderer/components/navigationreactnative}/NVTitleBarComponentDescriptor.h (100%) rename NavigationReactNative/src/cpp/{ => react/renderer/components/navigationreactnative}/NVTitleBarShadowNode.cpp (100%) rename NavigationReactNative/src/cpp/{ => react/renderer/components/navigationreactnative}/NVTitleBarShadowNode.h (100%) rename NavigationReactNative/src/cpp/{ => react/renderer/components/navigationreactnative}/NVTitleBarState.cpp (100%) rename NavigationReactNative/src/cpp/{ => react/renderer/components/navigationreactnative}/NVTitleBarState.h (100%) diff --git a/NavigationReactNative/src/cpp/NVActionBarComponentDescriptor.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarComponentDescriptor.h similarity index 100% rename from NavigationReactNative/src/cpp/NVActionBarComponentDescriptor.h rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarComponentDescriptor.h diff --git a/NavigationReactNative/src/cpp/NVActionBarShadowNode.cpp b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarShadowNode.cpp similarity index 100% rename from NavigationReactNative/src/cpp/NVActionBarShadowNode.cpp rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarShadowNode.cpp diff --git a/NavigationReactNative/src/cpp/NVActionBarShadowNode.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarShadowNode.h similarity index 100% rename from NavigationReactNative/src/cpp/NVActionBarShadowNode.h rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarShadowNode.h diff --git a/NavigationReactNative/src/cpp/NVActionBarState.cpp b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarState.cpp similarity index 100% rename from NavigationReactNative/src/cpp/NVActionBarState.cpp rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarState.cpp diff --git a/NavigationReactNative/src/cpp/NVActionBarState.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarState.h similarity index 100% rename from NavigationReactNative/src/cpp/NVActionBarState.h rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarState.h diff --git a/NavigationReactNative/src/cpp/NVBarButtonComponentDescriptor.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonComponentDescriptor.h similarity index 100% rename from NavigationReactNative/src/cpp/NVBarButtonComponentDescriptor.h rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonComponentDescriptor.h diff --git a/NavigationReactNative/src/cpp/NVBarButtonShadowNode.cpp b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonShadowNode.cpp similarity index 100% rename from NavigationReactNative/src/cpp/NVBarButtonShadowNode.cpp rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonShadowNode.cpp diff --git a/NavigationReactNative/src/cpp/NVBarButtonShadowNode.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonShadowNode.h similarity index 100% rename from NavigationReactNative/src/cpp/NVBarButtonShadowNode.h rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonShadowNode.h diff --git a/NavigationReactNative/src/cpp/NVBarButtonState.cpp b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonState.cpp similarity index 100% rename from NavigationReactNative/src/cpp/NVBarButtonState.cpp rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonState.cpp diff --git a/NavigationReactNative/src/cpp/NVBarButtonState.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonState.h similarity index 100% rename from NavigationReactNative/src/cpp/NVBarButtonState.h rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonState.h diff --git a/NavigationReactNative/src/cpp/NVSearchBarComponentDescriptor.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarComponentDescriptor.h similarity index 100% rename from NavigationReactNative/src/cpp/NVSearchBarComponentDescriptor.h rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarComponentDescriptor.h diff --git a/NavigationReactNative/src/cpp/NVSearchBarShadowNode.cpp b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarShadowNode.cpp similarity index 100% rename from NavigationReactNative/src/cpp/NVSearchBarShadowNode.cpp rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarShadowNode.cpp diff --git a/NavigationReactNative/src/cpp/NVSearchBarShadowNode.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarShadowNode.h similarity index 100% rename from NavigationReactNative/src/cpp/NVSearchBarShadowNode.h rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarShadowNode.h diff --git a/NavigationReactNative/src/cpp/NVSearchBarState.cpp b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarState.cpp similarity index 100% rename from NavigationReactNative/src/cpp/NVSearchBarState.cpp rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarState.cpp diff --git a/NavigationReactNative/src/cpp/NVSearchBarState.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarState.h similarity index 100% rename from NavigationReactNative/src/cpp/NVSearchBarState.h rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarState.h diff --git a/NavigationReactNative/src/cpp/NVTabBarItemComponentDescriptor.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemComponentDescriptor.h similarity index 100% rename from NavigationReactNative/src/cpp/NVTabBarItemComponentDescriptor.h rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemComponentDescriptor.h diff --git a/NavigationReactNative/src/cpp/NVTabBarItemShadowNode.cpp b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemShadowNode.cpp similarity index 100% rename from NavigationReactNative/src/cpp/NVTabBarItemShadowNode.cpp rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemShadowNode.cpp diff --git a/NavigationReactNative/src/cpp/NVTabBarItemShadowNode.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemShadowNode.h similarity index 100% rename from NavigationReactNative/src/cpp/NVTabBarItemShadowNode.h rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemShadowNode.h diff --git a/NavigationReactNative/src/cpp/NVTabBarItemState.cpp b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemState.cpp similarity index 100% rename from NavigationReactNative/src/cpp/NVTabBarItemState.cpp rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemState.cpp diff --git a/NavigationReactNative/src/cpp/NVTabBarItemState.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemState.h similarity index 100% rename from NavigationReactNative/src/cpp/NVTabBarItemState.h rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemState.h diff --git a/NavigationReactNative/src/cpp/NVTitleBarComponentDescriptor.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarComponentDescriptor.h similarity index 100% rename from NavigationReactNative/src/cpp/NVTitleBarComponentDescriptor.h rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarComponentDescriptor.h diff --git a/NavigationReactNative/src/cpp/NVTitleBarShadowNode.cpp b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarShadowNode.cpp similarity index 100% rename from NavigationReactNative/src/cpp/NVTitleBarShadowNode.cpp rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarShadowNode.cpp diff --git a/NavigationReactNative/src/cpp/NVTitleBarShadowNode.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarShadowNode.h similarity index 100% rename from NavigationReactNative/src/cpp/NVTitleBarShadowNode.h rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarShadowNode.h diff --git a/NavigationReactNative/src/cpp/NVTitleBarState.cpp b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarState.cpp similarity index 100% rename from NavigationReactNative/src/cpp/NVTitleBarState.cpp rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarState.cpp diff --git a/NavigationReactNative/src/cpp/NVTitleBarState.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarState.h similarity index 100% rename from NavigationReactNative/src/cpp/NVTitleBarState.h rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarState.h From e597051614dc42c58c61ad4d4cbf70629e4297d4 Mon Sep 17 00:00:00 2001 From: Graham Mendick Date: Wed, 14 Sep 2022 21:41:01 +0100 Subject: [PATCH 05/21] Added react-native.config.js for android build Copying code from react native's autolinking example https://github.com/troZee/react-native-cpp-autolinking/commit/5e1b0f2171490a435b540271588b34ca98287801 --- .gitignore | 1 + .../src/react-native.config.js | 34 +++++++++++++++++++ gulpfile.js | 6 ++-- 3 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 NavigationReactNative/src/react-native.config.js diff --git a/.gitignore b/.gitignore index 9d83dfaef2..bc58b7a961 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ build/npm/**/ios build/npm/**/cpp build/npm/**/Native*Module.js build/npm/**/*NativeComponent.js +build/npm/**/react-native.config.js npm-debug.log node_modules !Navigation*/src/node_modules diff --git a/NavigationReactNative/src/react-native.config.js b/NavigationReactNative/src/react-native.config.js new file mode 100644 index 0000000000..1ce6aed4f4 --- /dev/null +++ b/NavigationReactNative/src/react-native.config.js @@ -0,0 +1,34 @@ +module.exports = { + dependency: { + platforms: { + android: { + componentDescriptors: [ + 'NVActionBarComponentDescriptor', + 'NVBarButtonComponentDescriptor', + 'NVBottomAppBarComponentDescriptor', + 'NVBottomSheetComponentDescriptor', + 'NVCollapsingBarComponentDescriptor', + 'NVCoordinatorLayoutComponentDescriptor', + 'NVExtendedFloatingActionButtonComponentDescriptor', + 'NVFloatingActionButtonComponentDescriptor', + 'NVNavigationBarComponentDescriptor', + 'NVNavigationStackComponentDescriptor', + 'NVSceneComponentDescriptor', + 'NVSearchBarComponentDescriptor', + 'NVSharedElementComponentDescriptor', + 'NVStatusBarComponentDescriptor', + 'NVTabBarItemComponentDescriptor', + 'NVTabBarComponentDescriptor', + 'NVTabBarPagerComponentDescriptor', + 'NVTabBarPagerRTLComponentDescriptor', + 'NVTabLayoutComponentDescriptor', + 'NVTabLayoutRTLComponentDescriptor', + 'NVTabNavigationComponentDescriptor', + 'NVTitleBarComponentDescriptor', + 'NVToolbarComponentDescriptor', + ], + androidMkPath: "../cpp/Android.mk" + }, + }, + }, +}; \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js index 431c9221d1..e33e142763 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -65,7 +65,8 @@ var cleanNative = () => { './build/npm/navigation-react-native/ios', './build/npm/navigation-react-native/cpp', './build/npm/navigation-react-native/**/Native*Module.js', - './build/npm/navigation-react-native/**/*NativeComponent.js' + './build/npm/navigation-react-native/**/*NativeComponent.js', + './build/npm/navigation-react-native/react-native.config.js' ]); }; var packageNative = () => { @@ -74,7 +75,8 @@ var packageNative = () => { './NavigationReactNative/src/ios/**/*', './NavigationReactNative/src/cpp/**/*', './NavigationReactNative/src/**/Native*Module.js', - './NavigationReactNative/src/**/*NativeComponent.js' + './NavigationReactNative/src/**/*NativeComponent.js', + './NavigationReactNative/src/react-native.config.js' ], {base: './NavigationReactNative/src'}) .pipe(dest('./build/npm/navigation-react-native')); }; From dfc5c561b6ef433b7543331b7d6e319201022c66 Mon Sep 17 00:00:00 2001 From: Graham Mendick Date: Wed, 14 Sep 2022 21:56:09 +0100 Subject: [PATCH 06/21] Added custom android make file Copied it from the codegen'ed one and pointed LOCAL_SRC_FILES at both the codegen and the hand-written c++ state files in cpp folder. Just a first go, not tried it yet --- NavigationReactNative/src/cpp/Android.mk | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 NavigationReactNative/src/cpp/Android.mk diff --git a/NavigationReactNative/src/cpp/Android.mk b/NavigationReactNative/src/cpp/Android.mk new file mode 100644 index 0000000000..35aeaf67c3 --- /dev/null +++ b/NavigationReactNative/src/cpp/Android.mk @@ -0,0 +1,26 @@ +# 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. + +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_MODULE := react_codegen_navigationreactnative + +LOCAL_C_INCLUDES := $(LOCAL_PATH) + +LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/../android/build/generated/source/codegen/*.cpp) $(wildcard $(LOCAL_PATH)/../android/build/generated/source/codegen/react/renderer/components/navigationreactnative/*.cpp) $(wildcard $(LOCAL_PATH)/react/renderer/components/navigationreactnative/*.cpp) +LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES)) + +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/react/renderer/components/navigationreactnative + +LOCAL_SHARED_LIBRARIES := libfbjni libfolly_runtime libglog libjsi libreact_codegen_rncore libreact_render_mapbuffer libreact_render_imagemanager libreact_debug libreact_nativemodule_core libreact_render_core libreact_render_debug libreact_render_graphics librrc_view libturbomodulejsijni libyoga + +LOCAL_CFLAGS := \ + -DLOG_TAG=\"ReactNative\" + +LOCAL_CFLAGS += -fexceptions -frtti -std=c++17 -Wall + +include $(BUILD_SHARED_LIBRARY) From 93480139a6dd2c51eab247679091b586f0d3eb53 Mon Sep 17 00:00:00 2001 From: Graham Mendick Date: Wed, 14 Sep 2022 22:06:33 +0100 Subject: [PATCH 07/21] Added CMakeLists because run-android asked for one Don't know why it's needed as well as Android.mk?! Copied the codegen'ed one and added codegen files and c++ state cpp files --- NavigationReactNative/src/cpp/CMakeLists.txt | 46 ++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 NavigationReactNative/src/cpp/CMakeLists.txt diff --git a/NavigationReactNative/src/cpp/CMakeLists.txt b/NavigationReactNative/src/cpp/CMakeLists.txt new file mode 100644 index 0000000000..7414231ce8 --- /dev/null +++ b/NavigationReactNative/src/cpp/CMakeLists.txt @@ -0,0 +1,46 @@ +# 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. + +cmake_minimum_required(VERSION 3.13) +set(CMAKE_VERBOSE_MAKEFILE on) + +file(GLOB react_codegen_SRCS CONFIGURE_DEPENDS ../android/build/generated/source/codegen/*.cpp ../android/build/generated/source/codegen/react/renderer/components/navigationreactnative/*.cpp react/renderer/components/navigationreactnative/*.cpp) + +add_library( + react_codegen_navigationreactnative + SHARED + ${react_codegen_SRCS} +) + +target_include_directories(react_codegen_navigationreactnative PUBLIC . react/renderer/components/navigationreactnative) + +target_link_libraries( + react_codegen_navigationreactnative + fbjni + folly_runtime + glog + jsi + react_codegen_rncore + react_debug + react_nativemodule_core + react_render_core + libreact_render_mapbuffer + libreact_render_imagemanager + react_render_debug + react_render_graphics + rrc_view + turbomodulejsijni + yoga +) + +target_compile_options( + react_codegen_navigationreactnative + PRIVATE + -DLOG_TAG=\"ReactNative\" + -fexceptions + -frtti + -std=c++17 + -Wall +) From 62586136517a2f22054149d079be3006614599ea Mon Sep 17 00:00:00 2001 From: Graham Mendick Date: Wed, 14 Sep 2022 23:54:46 +0100 Subject: [PATCH 08/21] Copied all codegen-ed into hand-written cpp folder Couldn't get it to work using codegen and cpp folder - so followed advice from https://github.com/reactwg/react-native-new-architecture/discussions/71#discussioncomment-3606598 that said needed own c++ implementation for everything. Gets further but falling over at the NativeMaterial3ModuleSpec - it's not generated now. Wondering if this approach works with ModuleSpecs as well?! --- .../src/android/build.gradle | 8 - NavigationReactNative/src/cpp/Android.mk | 2 +- NavigationReactNative/src/cpp/CMakeLists.txt | 2 +- .../cpp/navigationreactnative-generated.cpp | 34 ++ .../src/cpp/navigationreactnative.h | 33 ++ .../ComponentDescriptors.h | 52 ++ .../navigationreactnative/EventEmitters.cpp | 172 +++++++ .../navigationreactnative/EventEmitters.h | 301 +++++++++++ .../navigationreactnative/Props.cpp | 398 +++++++++++++++ .../components/navigationreactnative/Props.h | 478 ++++++++++++++++++ .../navigationreactnative/ShadowNodes.cpp | 39 ++ .../navigationreactnative/ShadowNodes.h | 219 ++++++++ 12 files changed, 1728 insertions(+), 10 deletions(-) create mode 100644 NavigationReactNative/src/cpp/navigationreactnative-generated.cpp create mode 100644 NavigationReactNative/src/cpp/navigationreactnative.h create mode 100644 NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/ComponentDescriptors.h create mode 100644 NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/EventEmitters.cpp create mode 100644 NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/EventEmitters.h create mode 100644 NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/Props.cpp create mode 100644 NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/Props.h create mode 100644 NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/ShadowNodes.cpp create mode 100644 NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/ShadowNodes.h diff --git a/NavigationReactNative/src/android/build.gradle b/NavigationReactNative/src/android/build.gradle index bcf8bacdb6..e7df8a16df 100644 --- a/NavigationReactNative/src/android/build.gradle +++ b/NavigationReactNative/src/android/build.gradle @@ -64,11 +64,3 @@ dependencies { implementation 'com.google.android.material:material:1.6.1' implementation 'androidx.viewpager2:viewpager2:1.0.0' } - -if (isNewArchitectureEnabled()) { - react { - jsRootDir = file("../") - libraryName = "navigationreactnative" - codegenJavaPackageName = "com.navigation.reactnative" - } -} \ No newline at end of file diff --git a/NavigationReactNative/src/cpp/Android.mk b/NavigationReactNative/src/cpp/Android.mk index 35aeaf67c3..e9f470f51e 100644 --- a/NavigationReactNative/src/cpp/Android.mk +++ b/NavigationReactNative/src/cpp/Android.mk @@ -11,7 +11,7 @@ LOCAL_MODULE := react_codegen_navigationreactnative LOCAL_C_INCLUDES := $(LOCAL_PATH) -LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/../android/build/generated/source/codegen/*.cpp) $(wildcard $(LOCAL_PATH)/../android/build/generated/source/codegen/react/renderer/components/navigationreactnative/*.cpp) $(wildcard $(LOCAL_PATH)/react/renderer/components/navigationreactnative/*.cpp) +LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp) $(wildcard $(LOCAL_PATH)/react/renderer/components/navigationreactnative/*.cpp) LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES)) LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/react/renderer/components/navigationreactnative diff --git a/NavigationReactNative/src/cpp/CMakeLists.txt b/NavigationReactNative/src/cpp/CMakeLists.txt index 7414231ce8..cc47396538 100644 --- a/NavigationReactNative/src/cpp/CMakeLists.txt +++ b/NavigationReactNative/src/cpp/CMakeLists.txt @@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) -file(GLOB react_codegen_SRCS CONFIGURE_DEPENDS ../android/build/generated/source/codegen/*.cpp ../android/build/generated/source/codegen/react/renderer/components/navigationreactnative/*.cpp react/renderer/components/navigationreactnative/*.cpp) +file(GLOB react_codegen_SRCS CONFIGURE_DEPENDS *.cpp react/renderer/components/navigationreactnative/*.cpp) add_library( react_codegen_navigationreactnative diff --git a/NavigationReactNative/src/cpp/navigationreactnative-generated.cpp b/NavigationReactNative/src/cpp/navigationreactnative-generated.cpp new file mode 100644 index 0000000000..b926a07793 --- /dev/null +++ b/NavigationReactNative/src/cpp/navigationreactnative-generated.cpp @@ -0,0 +1,34 @@ + +/** + * 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: GenerateModuleJniCpp.js + */ + +#include "navigationreactnative.h" + +namespace facebook { +namespace react { + +static facebook::jsi::Value __hostFunction_NativeMaterial3ModuleSpecJSI_getConstants(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) { + static jmethodID cachedMethodId = nullptr; + return static_cast(turboModule).invokeJavaMethod(rt, ObjectKind, "getConstants", "()Ljava/util/Map;", args, count, cachedMethodId); +} + +NativeMaterial3ModuleSpecJSI::NativeMaterial3ModuleSpecJSI(const JavaTurboModule::InitParams ¶ms) + : JavaTurboModule(params) { + methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeMaterial3ModuleSpecJSI_getConstants}; +} + +std::shared_ptr navigationreactnative_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms) { + if (moduleName == "Material3") { + return std::make_shared(params); + } + return nullptr; +} + +} // namespace react +} // namespace facebook diff --git a/NavigationReactNative/src/cpp/navigationreactnative.h b/NavigationReactNative/src/cpp/navigationreactnative.h new file mode 100644 index 0000000000..929fb9150d --- /dev/null +++ b/NavigationReactNative/src/cpp/navigationreactnative.h @@ -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: GenerateModuleJniH.js + */ + +#pragma once + +#include +#include +#include + +namespace facebook { +namespace react { + +/** + * JNI C++ class for module 'NativeMaterial3Module' + */ +class JSI_EXPORT NativeMaterial3ModuleSpecJSI : public JavaTurboModule { +public: + NativeMaterial3ModuleSpecJSI(const JavaTurboModule::InitParams ¶ms); +}; + + +JSI_EXPORT +std::shared_ptr navigationreactnative_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms); + +} // namespace react +} // namespace facebook diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/ComponentDescriptors.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/ComponentDescriptors.h new file mode 100644 index 0000000000..034ef02afc --- /dev/null +++ b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/ComponentDescriptors.h @@ -0,0 +1,52 @@ + +/** + * 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 +#include +#include +#include +#include +#include +#include + +namespace facebook { +namespace react { + +using NVActionBarComponentDescriptor = ConcreteComponentDescriptor; +using NVBarButtonComponentDescriptor = ConcreteComponentDescriptor; +using NVBottomAppBarComponentDescriptor = ConcreteComponentDescriptor; +using NVBottomSheetComponentDescriptor = ConcreteComponentDescriptor; +using NVCollapsingBarComponentDescriptor = ConcreteComponentDescriptor; +using NVCoordinatorLayoutComponentDescriptor = ConcreteComponentDescriptor; +using NVExtendedFloatingActionButtonComponentDescriptor = ConcreteComponentDescriptor; +using NVFloatingActionButtonComponentDescriptor = ConcreteComponentDescriptor; +using NVLeftBarComponentDescriptor = ConcreteComponentDescriptor; +using NVNavigationBarComponentDescriptor = ConcreteComponentDescriptor; +using NVNavigationStackComponentDescriptor = ConcreteComponentDescriptor; +using NVRightBarComponentDescriptor = ConcreteComponentDescriptor; +using NVSceneComponentDescriptor = ConcreteComponentDescriptor; +using NVSearchBarComponentDescriptor = ConcreteComponentDescriptor; +using NVSegmentedTabComponentDescriptor = ConcreteComponentDescriptor; +using NVSharedElementComponentDescriptor = ConcreteComponentDescriptor; +using NVStatusBarComponentDescriptor = ConcreteComponentDescriptor; +using NVTabBarItemComponentDescriptor = ConcreteComponentDescriptor; +using NVTabBarComponentDescriptor = ConcreteComponentDescriptor; +using NVTabBarPagerComponentDescriptor = ConcreteComponentDescriptor; +using NVTabBarPagerRTLComponentDescriptor = ConcreteComponentDescriptor; +using NVTabLayoutComponentDescriptor = ConcreteComponentDescriptor; +using NVTabLayoutRTLComponentDescriptor = ConcreteComponentDescriptor; +using NVTabNavigationComponentDescriptor = ConcreteComponentDescriptor; +using NVTitleBarComponentDescriptor = ConcreteComponentDescriptor; +using NVToolbarComponentDescriptor = ConcreteComponentDescriptor; + +} // namespace react +} // namespace facebook diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/EventEmitters.cpp b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/EventEmitters.cpp new file mode 100644 index 0000000000..bace8766c6 --- /dev/null +++ b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/EventEmitters.cpp @@ -0,0 +1,172 @@ + +/** + * 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 + +namespace facebook { +namespace react { + +void NVActionBarEventEmitter::onExpanded(OnExpanded event) const { + dispatchEvent("expanded", [event=std::move(event)](jsi::Runtime &runtime) { + auto payload = jsi::Object(runtime); + + return payload; + }); +} +void NVActionBarEventEmitter::onCollapsed(OnCollapsed event) const { + dispatchEvent("collapsed", [event=std::move(event)](jsi::Runtime &runtime) { + auto payload = jsi::Object(runtime); + + return payload; + }); +} +void NVBarButtonEventEmitter::onPress(OnPress event) const { + dispatchEvent("press", [event=std::move(event)](jsi::Runtime &runtime) { + auto payload = jsi::Object(runtime); + + return payload; + }); +} +void NVBottomAppBarEventEmitter::onNavigationPress(OnNavigationPress event) const { + dispatchEvent("navigationPress", [event=std::move(event)](jsi::Runtime &runtime) { + auto payload = jsi::Object(runtime); + + return payload; + }); +} +void NVBottomSheetEventEmitter::onDetentChanged(OnDetentChanged event) const { + dispatchEvent("detentChanged", [event=std::move(event)](jsi::Runtime &runtime) { + auto payload = jsi::Object(runtime); + payload.setProperty(runtime, "detent", event.detent); +payload.setProperty(runtime, "eventCount", event.eventCount); + return payload; + }); +} + + + + + + +void NVNavigationStackEventEmitter::onWillNavigateBack(OnWillNavigateBack event) const { + dispatchEvent("willNavigateBack", [event=std::move(event)](jsi::Runtime &runtime) { + auto payload = jsi::Object(runtime); + payload.setProperty(runtime, "crumb", event.crumb); + return payload; + }); +} +void NVNavigationStackEventEmitter::onRest(OnRest event) const { + dispatchEvent("rest", [event=std::move(event)](jsi::Runtime &runtime) { + auto payload = jsi::Object(runtime); + payload.setProperty(runtime, "crumb", event.crumb); +payload.setProperty(runtime, "eventCount", event.eventCount); + return payload; + }); +} + +void NVSceneEventEmitter::onPopped(OnPopped event) const { + dispatchEvent("popped", [event=std::move(event)](jsi::Runtime &runtime) { + auto payload = jsi::Object(runtime); + + return payload; + }); +} +void NVSearchBarEventEmitter::onChangeText(OnChangeText event) const { + dispatchEvent("changeText", [event=std::move(event)](jsi::Runtime &runtime) { + auto payload = jsi::Object(runtime); + payload.setProperty(runtime, "text", event.text); +payload.setProperty(runtime, "eventCount", event.eventCount); + return payload; + }); +} +void NVSearchBarEventEmitter::onChangeScopeButton(OnChangeScopeButton event) const { + dispatchEvent("changeScopeButton", [event=std::move(event)](jsi::Runtime &runtime) { + auto payload = jsi::Object(runtime); + payload.setProperty(runtime, "scopeButton", event.scopeButton); +payload.setProperty(runtime, "eventCount", event.eventCount); + return payload; + }); +} +void NVSearchBarEventEmitter::onExpand(OnExpand event) const { + dispatchEvent("expand", [event=std::move(event)](jsi::Runtime &runtime) { + auto payload = jsi::Object(runtime); + + return payload; + }); +} +void NVSearchBarEventEmitter::onCollapse(OnCollapse event) const { + dispatchEvent("collapse", [event=std::move(event)](jsi::Runtime &runtime) { + auto payload = jsi::Object(runtime); + + return payload; + }); +} + + + +void NVTabBarItemEventEmitter::onPress(OnPress event) const { + dispatchEvent("press", [event=std::move(event)](jsi::Runtime &runtime) { + auto payload = jsi::Object(runtime); + + return payload; + }); +} +void NVTabBarEventEmitter::onTabSelected(OnTabSelected event) const { + dispatchEvent("tabSelected", [event=std::move(event)](jsi::Runtime &runtime) { + auto payload = jsi::Object(runtime); + payload.setProperty(runtime, "tab", event.tab); +payload.setProperty(runtime, "eventCount", event.eventCount); + return payload; + }); +} +void NVTabBarPagerEventEmitter::onTabSelected(OnTabSelected event) const { + dispatchEvent("tabSelected", [event=std::move(event)](jsi::Runtime &runtime) { + auto payload = jsi::Object(runtime); + payload.setProperty(runtime, "tab", event.tab); +payload.setProperty(runtime, "eventCount", event.eventCount); + return payload; + }); +} +void NVTabBarPagerEventEmitter::onTabSwipeStateChanged(OnTabSwipeStateChanged event) const { + dispatchEvent("tabSwipeStateChanged", [event=std::move(event)](jsi::Runtime &runtime) { + auto payload = jsi::Object(runtime); + payload.setProperty(runtime, "swiping", event.swiping); + return payload; + }); +} +void NVTabBarPagerRTLEventEmitter::onTabSelected(OnTabSelected event) const { + dispatchEvent("tabSelected", [event=std::move(event)](jsi::Runtime &runtime) { + auto payload = jsi::Object(runtime); + payload.setProperty(runtime, "tab", event.tab); +payload.setProperty(runtime, "eventCount", event.eventCount); + return payload; + }); +} +void NVTabBarPagerRTLEventEmitter::onTabSwipeStateChanged(OnTabSwipeStateChanged event) const { + dispatchEvent("tabSwipeStateChanged", [event=std::move(event)](jsi::Runtime &runtime) { + auto payload = jsi::Object(runtime); + payload.setProperty(runtime, "swiping", event.swiping); + return payload; + }); +} + + + + +void NVToolbarEventEmitter::onNavigationPress(OnNavigationPress event) const { + dispatchEvent("navigationPress", [event=std::move(event)](jsi::Runtime &runtime) { + auto payload = jsi::Object(runtime); + + return payload; + }); +} + +} // namespace react +} // namespace facebook diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/EventEmitters.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/EventEmitters.h new file mode 100644 index 0000000000..befe0ccd0f --- /dev/null +++ b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/EventEmitters.h @@ -0,0 +1,301 @@ + +/** + * 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 +#include + +namespace facebook { +namespace react { + +class JSI_EXPORT NVActionBarEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + struct OnExpanded { + + }; + + struct OnCollapsed { + + }; + + void onExpanded(OnExpanded value) const; + + void onCollapsed(OnCollapsed value) const; +}; +class JSI_EXPORT NVBarButtonEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + struct OnPress { + + }; + + void onPress(OnPress value) const; +}; +class JSI_EXPORT NVBottomAppBarEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + struct OnNavigationPress { + + }; + + void onNavigationPress(OnNavigationPress value) const; +}; +class JSI_EXPORT NVBottomSheetEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + struct OnDetentChanged { + int detent; + int eventCount; + }; + + void onDetentChanged(OnDetentChanged value) const; +}; +class JSI_EXPORT NVCollapsingBarEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + + +}; +class JSI_EXPORT NVCoordinatorLayoutEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + + +}; +class JSI_EXPORT NVExtendedFloatingActionButtonEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + + +}; +class JSI_EXPORT NVFloatingActionButtonEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + + +}; +class JSI_EXPORT NVLeftBarEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + + +}; +class JSI_EXPORT NVNavigationBarEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + + +}; +class JSI_EXPORT NVNavigationStackEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + struct OnWillNavigateBack { + int crumb; + }; + + struct OnRest { + int crumb; + int eventCount; + }; + + void onWillNavigateBack(OnWillNavigateBack value) const; + + void onRest(OnRest value) const; +}; +class JSI_EXPORT NVRightBarEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + + +}; +class JSI_EXPORT NVSceneEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + struct OnPopped { + + }; + + void onPopped(OnPopped value) const; +}; +class JSI_EXPORT NVSearchBarEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + struct OnChangeText { + std::string text; + int eventCount; + }; + + struct OnChangeScopeButton { + int scopeButton; + int eventCount; + }; + + struct OnExpand { + + }; + + struct OnCollapse { + + }; + + void onChangeText(OnChangeText value) const; + + void onChangeScopeButton(OnChangeScopeButton value) const; + + void onExpand(OnExpand value) const; + + void onCollapse(OnCollapse value) const; +}; +class JSI_EXPORT NVSegmentedTabEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + + +}; +class JSI_EXPORT NVSharedElementEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + + +}; +class JSI_EXPORT NVStatusBarEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + + +}; +class JSI_EXPORT NVTabBarItemEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + struct OnPress { + + }; + + void onPress(OnPress value) const; +}; +class JSI_EXPORT NVTabBarEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + struct OnTabSelected { + int tab; + int eventCount; + }; + + void onTabSelected(OnTabSelected value) const; +}; +class JSI_EXPORT NVTabBarPagerEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + struct OnTabSelected { + int tab; + int eventCount; + }; + + struct OnTabSwipeStateChanged { + bool swiping; + }; + + void onTabSelected(OnTabSelected value) const; + + void onTabSwipeStateChanged(OnTabSwipeStateChanged value) const; +}; +class JSI_EXPORT NVTabBarPagerRTLEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + struct OnTabSelected { + int tab; + int eventCount; + }; + + struct OnTabSwipeStateChanged { + bool swiping; + }; + + void onTabSelected(OnTabSelected value) const; + + void onTabSwipeStateChanged(OnTabSwipeStateChanged value) const; +}; +class JSI_EXPORT NVTabLayoutEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + + +}; +class JSI_EXPORT NVTabLayoutRTLEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + + +}; +class JSI_EXPORT NVTabNavigationEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + + +}; +class JSI_EXPORT NVTitleBarEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + + + +}; +class JSI_EXPORT NVToolbarEventEmitter : public ViewEventEmitter { + public: + using ViewEventEmitter::ViewEventEmitter; + + struct OnNavigationPress { + + }; + + void onNavigationPress(OnNavigationPress value) const; +}; + +} // namespace react +} // namespace facebook diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/Props.cpp b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/Props.cpp new file mode 100644 index 0000000000..e9666ff0db --- /dev/null +++ b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/Props.cpp @@ -0,0 +1,398 @@ + +/** + * 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: GeneratePropsCpp.js + */ + +#include +#include +#include +#include + +namespace facebook { +namespace react { + +NVActionBarProps::NVActionBarProps( + const PropsParserContext &context, + const NVActionBarProps &sourceProps, + const RawProps &rawProps): ViewProps(context, sourceProps, rawProps) + + + {} +NVBarButtonProps::NVBarButtonProps( + const PropsParserContext &context, + const NVBarButtonProps &sourceProps, + const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), + + title(convertRawProp(context, rawProps, "title", sourceProps.title, {})), + fontFamily(convertRawProp(context, rawProps, "fontFamily", sourceProps.fontFamily, {})), + fontWeight(convertRawProp(context, rawProps, "fontWeight", sourceProps.fontWeight, {})), + fontStyle(convertRawProp(context, rawProps, "fontStyle", sourceProps.fontStyle, {})), + fontSize(convertRawProp(context, rawProps, "fontSize", sourceProps.fontSize, {-1.0})), + testID(convertRawProp(context, rawProps, "testID", sourceProps.testID, {})), + image(convertRawProp(context, rawProps, "image", sourceProps.image, {})), + systemItem(convertRawProp(context, rawProps, "systemItem", sourceProps.systemItem, {})), + search(convertRawProp(context, rawProps, "search", sourceProps.search, {false})), + showActionView(convertRawProp(context, rawProps, "showActionView", sourceProps.showActionView, {false})), + showAsAction(convertRawProp(context, rawProps, "showAsAction", sourceProps.showAsAction, {0})), + buttonWidth(convertRawProp(context, rawProps, "buttonWidth", sourceProps.buttonWidth, {0.0})), + actionBar(convertRawProp(context, rawProps, "actionBar", sourceProps.actionBar, {false})) + {} +NVBottomAppBarProps::NVBottomAppBarProps( + const PropsParserContext &context, + const NVBottomAppBarProps &sourceProps, + const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), + + barTintColor(convertRawProp(context, rawProps, "barTintColor", sourceProps.barTintColor, {})), + tintColor(convertRawProp(context, rawProps, "tintColor", sourceProps.tintColor, {})), + fabAlignmentMode(convertRawProp(context, rawProps, "fabAlignmentMode", sourceProps.fabAlignmentMode, {})), + fabAnimationMode(convertRawProp(context, rawProps, "fabAnimationMode", sourceProps.fabAnimationMode, {})), + fabCradleMargin(convertRawProp(context, rawProps, "fabCradleMargin", sourceProps.fabCradleMargin, {-1.0})), + fabCradleRoundedCornerRadius(convertRawProp(context, rawProps, "fabCradleRoundedCornerRadius", sourceProps.fabCradleRoundedCornerRadius, {-1.0})), + fabCradleVerticalOffset(convertRawProp(context, rawProps, "fabCradleVerticalOffset", sourceProps.fabCradleVerticalOffset, {-1.0})), + hideOnScroll(convertRawProp(context, rawProps, "hideOnScroll", sourceProps.hideOnScroll, {false})), + navigationImage(convertRawProp(context, rawProps, "navigationImage", sourceProps.navigationImage, {})), + navigationTestID(convertRawProp(context, rawProps, "navigationTestID", sourceProps.navigationTestID, {})), + overflowImage(convertRawProp(context, rawProps, "overflowImage", sourceProps.overflowImage, {})), + overflowTestID(convertRawProp(context, rawProps, "overflowTestID", sourceProps.overflowTestID, {})), + barHeight(convertRawProp(context, rawProps, "barHeight", sourceProps.barHeight, {0.0})) + {} +NVBottomSheetProps::NVBottomSheetProps( + const PropsParserContext &context, + const NVBottomSheetProps &sourceProps, + const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), + + detent(convertRawProp(context, rawProps, "detent", sourceProps.detent, {0})), + mostRecentEventCount(convertRawProp(context, rawProps, "mostRecentEventCount", sourceProps.mostRecentEventCount, {0})), + peekHeight(convertRawProp(context, rawProps, "peekHeight", sourceProps.peekHeight, {0})), + expandedOffset(convertRawProp(context, rawProps, "expandedOffset", sourceProps.expandedOffset, {0})), + fitToContents(convertRawProp(context, rawProps, "fitToContents", sourceProps.fitToContents, {false})), + halfExpandedRatio(convertRawProp(context, rawProps, "halfExpandedRatio", sourceProps.halfExpandedRatio, {-1.0})), + hideable(convertRawProp(context, rawProps, "hideable", sourceProps.hideable, {false})), + skipCollapsed(convertRawProp(context, rawProps, "skipCollapsed", sourceProps.skipCollapsed, {false})), + draggable(convertRawProp(context, rawProps, "draggable", sourceProps.draggable, {false})), + sheetHeight(convertRawProp(context, rawProps, "sheetHeight", sourceProps.sheetHeight, {0.0})) + {} +NVCollapsingBarProps::NVCollapsingBarProps( + const PropsParserContext &context, + const NVCollapsingBarProps &sourceProps, + const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), + + title(convertRawProp(context, rawProps, "title", sourceProps.title, {})), + titleFontFamily(convertRawProp(context, rawProps, "titleFontFamily", sourceProps.titleFontFamily, {})), + titleFontWeight(convertRawProp(context, rawProps, "titleFontWeight", sourceProps.titleFontWeight, {})), + titleFontStyle(convertRawProp(context, rawProps, "titleFontStyle", sourceProps.titleFontStyle, {})), + largeTitleFontFamily(convertRawProp(context, rawProps, "largeTitleFontFamily", sourceProps.largeTitleFontFamily, {})), + largeTitleFontWeight(convertRawProp(context, rawProps, "largeTitleFontWeight", sourceProps.largeTitleFontWeight, {})), + largeTitleFontStyle(convertRawProp(context, rawProps, "largeTitleFontStyle", sourceProps.largeTitleFontStyle, {})), + titleEnabled(convertRawProp(context, rawProps, "titleEnabled", sourceProps.titleEnabled, {false})), + titleCollapseMode(convertRawProp(context, rawProps, "titleCollapseMode", sourceProps.titleCollapseMode, {})), + contentScrimColor(convertRawProp(context, rawProps, "contentScrimColor", sourceProps.contentScrimColor, {})), + collapsedTitleColor(convertRawProp(context, rawProps, "collapsedTitleColor", sourceProps.collapsedTitleColor, {})), + expandedTitleColor(convertRawProp(context, rawProps, "expandedTitleColor", sourceProps.expandedTitleColor, {})) + {} +NVCoordinatorLayoutProps::NVCoordinatorLayoutProps( + const PropsParserContext &context, + const NVCoordinatorLayoutProps &sourceProps, + const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), + + overlap(convertRawProp(context, rawProps, "overlap", sourceProps.overlap, {0})) + {} +NVExtendedFloatingActionButtonProps::NVExtendedFloatingActionButtonProps( + const PropsParserContext &context, + const NVExtendedFloatingActionButtonProps &sourceProps, + const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), + + image(convertRawProp(context, rawProps, "image", sourceProps.image, {})), + text(convertRawProp(context, rawProps, "text", sourceProps.text, {})), + gravity(convertRawProp(context, rawProps, "gravity", sourceProps.gravity, {})), + anchor(convertRawProp(context, rawProps, "anchor", sourceProps.anchor, {})), + anchorGravity(convertRawProp(context, rawProps, "anchorGravity", sourceProps.anchorGravity, {})), + contentDescription(convertRawProp(context, rawProps, "contentDescription", sourceProps.contentDescription, {})), + testID(convertRawProp(context, rawProps, "testID", sourceProps.testID, {})), + fabColor(convertRawProp(context, rawProps, "fabColor", sourceProps.fabColor, {})), + fabBackgroundColor(convertRawProp(context, rawProps, "fabBackgroundColor", sourceProps.fabBackgroundColor, {})), + rippleColor(convertRawProp(context, rawProps, "rippleColor", sourceProps.rippleColor, {})), + fabMarginTop(convertRawProp(context, rawProps, "fabMarginTop", sourceProps.fabMarginTop, {0})), + fabMarginRight(convertRawProp(context, rawProps, "fabMarginRight", sourceProps.fabMarginRight, {0})), + fabMarginBottom(convertRawProp(context, rawProps, "fabMarginBottom", sourceProps.fabMarginBottom, {0})), + fabMarginLeft(convertRawProp(context, rawProps, "fabMarginLeft", sourceProps.fabMarginLeft, {0})), + fabMarginStart(convertRawProp(context, rawProps, "fabMarginStart", sourceProps.fabMarginStart, {0})), + fabMarginEnd(convertRawProp(context, rawProps, "fabMarginEnd", sourceProps.fabMarginEnd, {0})), + fabMargin(convertRawProp(context, rawProps, "fabMargin", sourceProps.fabMargin, {0})), + fabFontFamily(convertRawProp(context, rawProps, "fabFontFamily", sourceProps.fabFontFamily, {})), + fabFontWeight(convertRawProp(context, rawProps, "fabFontWeight", sourceProps.fabFontWeight, {})), + fabFontStyle(convertRawProp(context, rawProps, "fabFontStyle", sourceProps.fabFontStyle, {})), + fabFontSize(convertRawProp(context, rawProps, "fabFontSize", sourceProps.fabFontSize, {-1.0})) + {} +NVFloatingActionButtonProps::NVFloatingActionButtonProps( + const PropsParserContext &context, + const NVFloatingActionButtonProps &sourceProps, + const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), + + image(convertRawProp(context, rawProps, "image", sourceProps.image, {})), + gravity(convertRawProp(context, rawProps, "gravity", sourceProps.gravity, {})), + anchor(convertRawProp(context, rawProps, "anchor", sourceProps.anchor, {})), + anchorGravity(convertRawProp(context, rawProps, "anchorGravity", sourceProps.anchorGravity, {})), + size(convertRawProp(context, rawProps, "size", sourceProps.size, {0})), + contentDescription(convertRawProp(context, rawProps, "contentDescription", sourceProps.contentDescription, {})), + testID(convertRawProp(context, rawProps, "testID", sourceProps.testID, {})), + fabColor(convertRawProp(context, rawProps, "fabColor", sourceProps.fabColor, {})), + fabBackgroundColor(convertRawProp(context, rawProps, "fabBackgroundColor", sourceProps.fabBackgroundColor, {})), + rippleColor(convertRawProp(context, rawProps, "rippleColor", sourceProps.rippleColor, {})), + fabMarginTop(convertRawProp(context, rawProps, "fabMarginTop", sourceProps.fabMarginTop, {0})), + fabMarginRight(convertRawProp(context, rawProps, "fabMarginRight", sourceProps.fabMarginRight, {0})), + fabMarginBottom(convertRawProp(context, rawProps, "fabMarginBottom", sourceProps.fabMarginBottom, {0})), + fabMarginLeft(convertRawProp(context, rawProps, "fabMarginLeft", sourceProps.fabMarginLeft, {0})), + fabMarginStart(convertRawProp(context, rawProps, "fabMarginStart", sourceProps.fabMarginStart, {0})), + fabMarginEnd(convertRawProp(context, rawProps, "fabMarginEnd", sourceProps.fabMarginEnd, {0})), + fabMargin(convertRawProp(context, rawProps, "fabMargin", sourceProps.fabMargin, {0})), + fabElevation(convertRawProp(context, rawProps, "fabElevation", sourceProps.fabElevation, {0})) + {} +NVLeftBarProps::NVLeftBarProps( + const PropsParserContext &context, + const NVLeftBarProps &sourceProps, + const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), + + supplementBack(convertRawProp(context, rawProps, "supplementBack", sourceProps.supplementBack, {false})) + {} +NVNavigationBarProps::NVNavigationBarProps( + const PropsParserContext &context, + const NVNavigationBarProps &sourceProps, + const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), + + hidden(convertRawProp(context, rawProps, "hidden", sourceProps.hidden, {false})), + largeTitle(convertRawProp(context, rawProps, "largeTitle", sourceProps.largeTitle, {false})), + title(convertRawProp(context, rawProps, "title", sourceProps.title, {})), + titleFontFamily(convertRawProp(context, rawProps, "titleFontFamily", sourceProps.titleFontFamily, {})), + titleFontWeight(convertRawProp(context, rawProps, "titleFontWeight", sourceProps.titleFontWeight, {})), + titleFontStyle(convertRawProp(context, rawProps, "titleFontStyle", sourceProps.titleFontStyle, {})), + titleFontSize(convertRawProp(context, rawProps, "titleFontSize", sourceProps.titleFontSize, {-1.0})), + largeTitleFontFamily(convertRawProp(context, rawProps, "largeTitleFontFamily", sourceProps.largeTitleFontFamily, {})), + largeTitleFontWeight(convertRawProp(context, rawProps, "largeTitleFontWeight", sourceProps.largeTitleFontWeight, {})), + largeTitleFontStyle(convertRawProp(context, rawProps, "largeTitleFontStyle", sourceProps.largeTitleFontStyle, {})), + largeTitleFontSize(convertRawProp(context, rawProps, "largeTitleFontSize", sourceProps.largeTitleFontSize, {-1.0})), + backFontFamily(convertRawProp(context, rawProps, "backFontFamily", sourceProps.backFontFamily, {})), + backFontWeight(convertRawProp(context, rawProps, "backFontWeight", sourceProps.backFontWeight, {})), + backFontStyle(convertRawProp(context, rawProps, "backFontStyle", sourceProps.backFontStyle, {})), + backFontSize(convertRawProp(context, rawProps, "backFontSize", sourceProps.backFontSize, {-1.0})), + barTintColor(convertRawProp(context, rawProps, "barTintColor", sourceProps.barTintColor, {})), + largeBarTintColor(convertRawProp(context, rawProps, "largeBarTintColor", sourceProps.largeBarTintColor, {})), + tintColor(convertRawProp(context, rawProps, "tintColor", sourceProps.tintColor, {})), + titleColor(convertRawProp(context, rawProps, "titleColor", sourceProps.titleColor, {})), + largeTitleColor(convertRawProp(context, rawProps, "largeTitleColor", sourceProps.largeTitleColor, {})), + backTitle(convertRawProp(context, rawProps, "backTitle", sourceProps.backTitle, {})), + backTitleOn(convertRawProp(context, rawProps, "backTitleOn", sourceProps.backTitleOn, {false})), + backTestID(convertRawProp(context, rawProps, "backTestID", sourceProps.backTestID, {})), + barHeight(convertRawProp(context, rawProps, "barHeight", sourceProps.barHeight, {0.0})) + {} +NVNavigationStackProps::NVNavigationStackProps( + const PropsParserContext &context, + const NVNavigationStackProps &sourceProps, + const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), + + keys(convertRawProp(context, rawProps, "keys", sourceProps.keys, {})), + enterAnim(convertRawProp(context, rawProps, "enterAnim", sourceProps.enterAnim, {})), + exitAnim(convertRawProp(context, rawProps, "exitAnim", sourceProps.exitAnim, {})), + enterAnimOff(convertRawProp(context, rawProps, "enterAnimOff", sourceProps.enterAnimOff, {false})), + sharedElement(convertRawProp(context, rawProps, "sharedElement", sourceProps.sharedElement, {})), + oldSharedElement(convertRawProp(context, rawProps, "oldSharedElement", sourceProps.oldSharedElement, {})), + mostRecentEventCount(convertRawProp(context, rawProps, "mostRecentEventCount", sourceProps.mostRecentEventCount, {0})) + {} +NVRightBarProps::NVRightBarProps( + const PropsParserContext &context, + const NVRightBarProps &sourceProps, + const RawProps &rawProps): ViewProps(context, sourceProps, rawProps) + + + {} +NVSceneProps::NVSceneProps( + const PropsParserContext &context, + const NVSceneProps &sourceProps, + const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), + + sceneKey(convertRawProp(context, rawProps, "sceneKey", sourceProps.sceneKey, {})), + crumb(convertRawProp(context, rawProps, "crumb", sourceProps.crumb, {0})), + title(convertRawProp(context, rawProps, "title", sourceProps.title, {})), + enterAnim(convertRawProp(context, rawProps, "enterAnim", sourceProps.enterAnim, {})), + exitAnim(convertRawProp(context, rawProps, "exitAnim", sourceProps.exitAnim, {})), + hidesTabBar(convertRawProp(context, rawProps, "hidesTabBar", sourceProps.hidesTabBar, {false})) + {} +NVSearchBarProps::NVSearchBarProps( + const PropsParserContext &context, + const NVSearchBarProps &sourceProps, + const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), + + obscureBackground(convertRawProp(context, rawProps, "obscureBackground", sourceProps.obscureBackground, {false})), + hideNavigationBar(convertRawProp(context, rawProps, "hideNavigationBar", sourceProps.hideNavigationBar, {false})), + hideWhenScrolling(convertRawProp(context, rawProps, "hideWhenScrolling", sourceProps.hideWhenScrolling, {false})), + autoCapitalize(convertRawProp(context, rawProps, "autoCapitalize", sourceProps.autoCapitalize, {})), + placeholder(convertRawProp(context, rawProps, "placeholder", sourceProps.placeholder, {})), + text(convertRawProp(context, rawProps, "text", sourceProps.text, {})), + mostRecentEventCount(convertRawProp(context, rawProps, "mostRecentEventCount", sourceProps.mostRecentEventCount, {0})), + mostRecentButtonEventCount(convertRawProp(context, rawProps, "mostRecentButtonEventCount", sourceProps.mostRecentButtonEventCount, {0})), + barTintColor(convertRawProp(context, rawProps, "barTintColor", sourceProps.barTintColor, {})), + bottomBar(convertRawProp(context, rawProps, "bottomBar", sourceProps.bottomBar, {false})), + scopeButton(convertRawProp(context, rawProps, "scopeButton", sourceProps.scopeButton, {0})), + scopeButtons(convertRawProp(context, rawProps, "scopeButtons", sourceProps.scopeButtons, {})) + {} +NVSegmentedTabProps::NVSegmentedTabProps( + const PropsParserContext &context, + const NVSegmentedTabProps &sourceProps, + const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), + + backgroundColor(convertRawProp(context, rawProps, "backgroundColor", sourceProps.backgroundColor, {})), + selectedTintColor(convertRawProp(context, rawProps, "selectedTintColor", sourceProps.selectedTintColor, {})), + unselectedTintColor(convertRawProp(context, rawProps, "unselectedTintColor", sourceProps.unselectedTintColor, {})), + titles(convertRawProp(context, rawProps, "titles", sourceProps.titles, {})), + testIDs(convertRawProp(context, rawProps, "testIDs", sourceProps.testIDs, {})), + fontFamily(convertRawProp(context, rawProps, "fontFamily", sourceProps.fontFamily, {})), + fontWeight(convertRawProp(context, rawProps, "fontWeight", sourceProps.fontWeight, {})), + fontStyle(convertRawProp(context, rawProps, "fontStyle", sourceProps.fontStyle, {})), + fontSize(convertRawProp(context, rawProps, "fontSize", sourceProps.fontSize, {-1.0})) + {} +NVSharedElementProps::NVSharedElementProps( + const PropsParserContext &context, + const NVSharedElementProps &sourceProps, + const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), + + name(convertRawProp(context, rawProps, "name", sourceProps.name, {})), + duration(convertRawProp(context, rawProps, "duration", sourceProps.duration, {-1})), + fadeMode(convertRawProp(context, rawProps, "fadeMode", sourceProps.fadeMode, {})) + {} +NVStatusBarProps::NVStatusBarProps( + const PropsParserContext &context, + const NVStatusBarProps &sourceProps, + const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), + + hidden(convertRawProp(context, rawProps, "hidden", sourceProps.hidden, {false})), + tintStyle(convertRawProp(context, rawProps, "tintStyle", sourceProps.tintStyle, {})), + barTintColor(convertRawProp(context, rawProps, "barTintColor", sourceProps.barTintColor, {})) + {} +NVTabBarItemProps::NVTabBarItemProps( + const PropsParserContext &context, + const NVTabBarItemProps &sourceProps, + const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), + + title(convertRawProp(context, rawProps, "title", sourceProps.title, {})), + fontFamily(convertRawProp(context, rawProps, "fontFamily", sourceProps.fontFamily, {})), + fontWeight(convertRawProp(context, rawProps, "fontWeight", sourceProps.fontWeight, {})), + fontStyle(convertRawProp(context, rawProps, "fontStyle", sourceProps.fontStyle, {})), + fontSize(convertRawProp(context, rawProps, "fontSize", sourceProps.fontSize, {-1.0})), + testID(convertRawProp(context, rawProps, "testID", sourceProps.testID, {})), + badge(convertRawProp(context, rawProps, "badge", sourceProps.badge, {})), + badgeColor(convertRawProp(context, rawProps, "badgeColor", sourceProps.badgeColor, {})), + image(convertRawProp(context, rawProps, "image", sourceProps.image, {})), + systemItem(convertRawProp(context, rawProps, "systemItem", sourceProps.systemItem, {})) + {} +NVTabBarProps::NVTabBarProps( + const PropsParserContext &context, + const NVTabBarProps &sourceProps, + const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), + + tabCount(convertRawProp(context, rawProps, "tabCount", sourceProps.tabCount, {0})), + selectedTab(convertRawProp(context, rawProps, "selectedTab", sourceProps.selectedTab, {0})), + barTintColor(convertRawProp(context, rawProps, "barTintColor", sourceProps.barTintColor, {})), + selectedTintColor(convertRawProp(context, rawProps, "selectedTintColor", sourceProps.selectedTintColor, {})), + unselectedTintColor(convertRawProp(context, rawProps, "unselectedTintColor", sourceProps.unselectedTintColor, {})), + badgeColor(convertRawProp(context, rawProps, "badgeColor", sourceProps.badgeColor, {})), + scrollsToTop(convertRawProp(context, rawProps, "scrollsToTop", sourceProps.scrollsToTop, {false})), + fontFamily(convertRawProp(context, rawProps, "fontFamily", sourceProps.fontFamily, {})), + fontWeight(convertRawProp(context, rawProps, "fontWeight", sourceProps.fontWeight, {})), + fontStyle(convertRawProp(context, rawProps, "fontStyle", sourceProps.fontStyle, {})), + fontSize(convertRawProp(context, rawProps, "fontSize", sourceProps.fontSize, {-1.0})), + mostRecentEventCount(convertRawProp(context, rawProps, "mostRecentEventCount", sourceProps.mostRecentEventCount, {0})) + {} +NVTabBarPagerProps::NVTabBarPagerProps( + const PropsParserContext &context, + const NVTabBarPagerProps &sourceProps, + const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), + + tabCount(convertRawProp(context, rawProps, "tabCount", sourceProps.tabCount, {0})), + selectedTab(convertRawProp(context, rawProps, "selectedTab", sourceProps.selectedTab, {0})), + scrollsToTop(convertRawProp(context, rawProps, "scrollsToTop", sourceProps.scrollsToTop, {false})), + mostRecentEventCount(convertRawProp(context, rawProps, "mostRecentEventCount", sourceProps.mostRecentEventCount, {0})) + {} +NVTabBarPagerRTLProps::NVTabBarPagerRTLProps( + const PropsParserContext &context, + const NVTabBarPagerRTLProps &sourceProps, + const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), + + tabCount(convertRawProp(context, rawProps, "tabCount", sourceProps.tabCount, {0})), + selectedTab(convertRawProp(context, rawProps, "selectedTab", sourceProps.selectedTab, {0})), + scrollsToTop(convertRawProp(context, rawProps, "scrollsToTop", sourceProps.scrollsToTop, {false})), + mostRecentEventCount(convertRawProp(context, rawProps, "mostRecentEventCount", sourceProps.mostRecentEventCount, {0})) + {} +NVTabLayoutProps::NVTabLayoutProps( + const PropsParserContext &context, + const NVTabLayoutProps &sourceProps, + const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), + + selectedTintColor(convertRawProp(context, rawProps, "selectedTintColor", sourceProps.selectedTintColor, {})), + unselectedTintColor(convertRawProp(context, rawProps, "unselectedTintColor", sourceProps.unselectedTintColor, {})), + rippleColor(convertRawProp(context, rawProps, "rippleColor", sourceProps.rippleColor, {})), + bottomTabs(convertRawProp(context, rawProps, "bottomTabs", sourceProps.bottomTabs, {false})), + selectedIndicatorAtTop(convertRawProp(context, rawProps, "selectedIndicatorAtTop", sourceProps.selectedIndicatorAtTop, {false})), + scrollable(convertRawProp(context, rawProps, "scrollable", sourceProps.scrollable, {false})) + {} +NVTabLayoutRTLProps::NVTabLayoutRTLProps( + const PropsParserContext &context, + const NVTabLayoutRTLProps &sourceProps, + const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), + + selectedTintColor(convertRawProp(context, rawProps, "selectedTintColor", sourceProps.selectedTintColor, {})), + unselectedTintColor(convertRawProp(context, rawProps, "unselectedTintColor", sourceProps.unselectedTintColor, {})), + rippleColor(convertRawProp(context, rawProps, "rippleColor", sourceProps.rippleColor, {})), + selectedIndicatorAtTop(convertRawProp(context, rawProps, "selectedIndicatorAtTop", sourceProps.selectedIndicatorAtTop, {false})), + scrollable(convertRawProp(context, rawProps, "scrollable", sourceProps.scrollable, {false})) + {} +NVTabNavigationProps::NVTabNavigationProps( + const PropsParserContext &context, + const NVTabNavigationProps &sourceProps, + const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), + + selectedTintColor(convertRawProp(context, rawProps, "selectedTintColor", sourceProps.selectedTintColor, {})), + unselectedTintColor(convertRawProp(context, rawProps, "unselectedTintColor", sourceProps.unselectedTintColor, {})), + bottomTabs(convertRawProp(context, rawProps, "bottomTabs", sourceProps.bottomTabs, {false})), + itemHorizontalTranslation(convertRawProp(context, rawProps, "itemHorizontalTranslation", sourceProps.itemHorizontalTranslation, {false})), + labelVisibilityMode(convertRawProp(context, rawProps, "labelVisibilityMode", sourceProps.labelVisibilityMode, {0})), + activeIndicatorColor(convertRawProp(context, rawProps, "activeIndicatorColor", sourceProps.activeIndicatorColor, {})), + rippleColor(convertRawProp(context, rawProps, "rippleColor", sourceProps.rippleColor, {})) + {} +NVTitleBarProps::NVTitleBarProps( + const PropsParserContext &context, + const NVTitleBarProps &sourceProps, + const RawProps &rawProps): ViewProps(context, sourceProps, rawProps) + + + {} +NVToolbarProps::NVToolbarProps( + const PropsParserContext &context, + const NVToolbarProps &sourceProps, + const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), + + title(convertRawProp(context, rawProps, "title", sourceProps.title, {})), + titleFontFamily(convertRawProp(context, rawProps, "titleFontFamily", sourceProps.titleFontFamily, {})), + titleFontWeight(convertRawProp(context, rawProps, "titleFontWeight", sourceProps.titleFontWeight, {})), + titleFontStyle(convertRawProp(context, rawProps, "titleFontStyle", sourceProps.titleFontStyle, {})), + titleFontSize(convertRawProp(context, rawProps, "titleFontSize", sourceProps.titleFontSize, {-1.0})), + titleCentered(convertRawProp(context, rawProps, "titleCentered", sourceProps.titleCentered, {false})), + barTintColor(convertRawProp(context, rawProps, "barTintColor", sourceProps.barTintColor, {})), + tintColor(convertRawProp(context, rawProps, "tintColor", sourceProps.tintColor, {})), + titleColor(convertRawProp(context, rawProps, "titleColor", sourceProps.titleColor, {})), + navigationImage(convertRawProp(context, rawProps, "navigationImage", sourceProps.navigationImage, {})), + navigationTestID(convertRawProp(context, rawProps, "navigationTestID", sourceProps.navigationTestID, {})), + navigationAccessibilityLabel(convertRawProp(context, rawProps, "navigationAccessibilityLabel", sourceProps.navigationAccessibilityLabel, {})), + logo(convertRawProp(context, rawProps, "logo", sourceProps.logo, {})), + overflowImage(convertRawProp(context, rawProps, "overflowImage", sourceProps.overflowImage, {})), + overflowTestID(convertRawProp(context, rawProps, "overflowTestID", sourceProps.overflowTestID, {})), + pin(convertRawProp(context, rawProps, "pin", sourceProps.pin, {false})), + barHeight(convertRawProp(context, rawProps, "barHeight", sourceProps.barHeight, {0.0})) + {} + +} // namespace react +} // namespace facebook diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/Props.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/Props.h new file mode 100644 index 0000000000..18f34cd75a --- /dev/null +++ b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/Props.h @@ -0,0 +1,478 @@ + +/** + * 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: GeneratePropsH.js + */ +#pragma once + +#include +#include +#include +#include +#include +#include + +namespace facebook { +namespace react { + +class JSI_EXPORT NVActionBarProps final : public ViewProps { + public: + NVActionBarProps() = default; + NVActionBarProps(const PropsParserContext& context, const NVActionBarProps &sourceProps, const RawProps &rawProps); + +#pragma mark - Props + + +}; + +class JSI_EXPORT NVBarButtonProps final : public ViewProps { + public: + NVBarButtonProps() = default; + NVBarButtonProps(const PropsParserContext& context, const NVBarButtonProps &sourceProps, const RawProps &rawProps); + +#pragma mark - Props + + std::string title{}; + std::string fontFamily{}; + std::string fontWeight{}; + std::string fontStyle{}; + Float fontSize{-1.0}; + std::string testID{}; + ImageSource image{}; + std::string systemItem{}; + bool search{false}; + bool showActionView{false}; + int showAsAction{0}; + double buttonWidth{0.0}; + bool actionBar{false}; +}; + +class JSI_EXPORT NVBottomAppBarProps final : public ViewProps { + public: + NVBottomAppBarProps() = default; + NVBottomAppBarProps(const PropsParserContext& context, const NVBottomAppBarProps &sourceProps, const RawProps &rawProps); + +#pragma mark - Props + + SharedColor barTintColor{}; + SharedColor tintColor{}; + std::string fabAlignmentMode{}; + std::string fabAnimationMode{}; + Float fabCradleMargin{-1.0}; + Float fabCradleRoundedCornerRadius{-1.0}; + Float fabCradleVerticalOffset{-1.0}; + bool hideOnScroll{false}; + ImageSource navigationImage{}; + std::string navigationTestID{}; + ImageSource overflowImage{}; + std::string overflowTestID{}; + double barHeight{0.0}; +}; + +class JSI_EXPORT NVBottomSheetProps final : public ViewProps { + public: + NVBottomSheetProps() = default; + NVBottomSheetProps(const PropsParserContext& context, const NVBottomSheetProps &sourceProps, const RawProps &rawProps); + +#pragma mark - Props + + int detent{0}; + int mostRecentEventCount{0}; + int peekHeight{0}; + int expandedOffset{0}; + bool fitToContents{false}; + Float halfExpandedRatio{-1.0}; + bool hideable{false}; + bool skipCollapsed{false}; + bool draggable{false}; + double sheetHeight{0.0}; +}; + +class JSI_EXPORT NVCollapsingBarProps final : public ViewProps { + public: + NVCollapsingBarProps() = default; + NVCollapsingBarProps(const PropsParserContext& context, const NVCollapsingBarProps &sourceProps, const RawProps &rawProps); + +#pragma mark - Props + + std::string title{}; + std::string titleFontFamily{}; + std::string titleFontWeight{}; + std::string titleFontStyle{}; + std::string largeTitleFontFamily{}; + std::string largeTitleFontWeight{}; + std::string largeTitleFontStyle{}; + bool titleEnabled{false}; + std::string titleCollapseMode{}; + SharedColor contentScrimColor{}; + SharedColor collapsedTitleColor{}; + SharedColor expandedTitleColor{}; +}; + +class JSI_EXPORT NVCoordinatorLayoutProps final : public ViewProps { + public: + NVCoordinatorLayoutProps() = default; + NVCoordinatorLayoutProps(const PropsParserContext& context, const NVCoordinatorLayoutProps &sourceProps, const RawProps &rawProps); + +#pragma mark - Props + + int overlap{0}; +}; + +class JSI_EXPORT NVExtendedFloatingActionButtonProps final : public ViewProps { + public: + NVExtendedFloatingActionButtonProps() = default; + NVExtendedFloatingActionButtonProps(const PropsParserContext& context, const NVExtendedFloatingActionButtonProps &sourceProps, const RawProps &rawProps); + +#pragma mark - Props + + ImageSource image{}; + std::string text{}; + std::string gravity{}; + std::string anchor{}; + std::string anchorGravity{}; + std::string contentDescription{}; + std::string testID{}; + SharedColor fabColor{}; + SharedColor fabBackgroundColor{}; + SharedColor rippleColor{}; + int fabMarginTop{0}; + int fabMarginRight{0}; + int fabMarginBottom{0}; + int fabMarginLeft{0}; + int fabMarginStart{0}; + int fabMarginEnd{0}; + int fabMargin{0}; + std::string fabFontFamily{}; + std::string fabFontWeight{}; + std::string fabFontStyle{}; + Float fabFontSize{-1.0}; +}; + +class JSI_EXPORT NVFloatingActionButtonProps final : public ViewProps { + public: + NVFloatingActionButtonProps() = default; + NVFloatingActionButtonProps(const PropsParserContext& context, const NVFloatingActionButtonProps &sourceProps, const RawProps &rawProps); + +#pragma mark - Props + + ImageSource image{}; + std::string gravity{}; + std::string anchor{}; + std::string anchorGravity{}; + int size{0}; + std::string contentDescription{}; + std::string testID{}; + SharedColor fabColor{}; + SharedColor fabBackgroundColor{}; + SharedColor rippleColor{}; + int fabMarginTop{0}; + int fabMarginRight{0}; + int fabMarginBottom{0}; + int fabMarginLeft{0}; + int fabMarginStart{0}; + int fabMarginEnd{0}; + int fabMargin{0}; + int fabElevation{0}; +}; + +class JSI_EXPORT NVLeftBarProps final : public ViewProps { + public: + NVLeftBarProps() = default; + NVLeftBarProps(const PropsParserContext& context, const NVLeftBarProps &sourceProps, const RawProps &rawProps); + +#pragma mark - Props + + bool supplementBack{false}; +}; + +class JSI_EXPORT NVNavigationBarProps final : public ViewProps { + public: + NVNavigationBarProps() = default; + NVNavigationBarProps(const PropsParserContext& context, const NVNavigationBarProps &sourceProps, const RawProps &rawProps); + +#pragma mark - Props + + bool hidden{false}; + bool largeTitle{false}; + std::string title{}; + std::string titleFontFamily{}; + std::string titleFontWeight{}; + std::string titleFontStyle{}; + Float titleFontSize{-1.0}; + std::string largeTitleFontFamily{}; + std::string largeTitleFontWeight{}; + std::string largeTitleFontStyle{}; + Float largeTitleFontSize{-1.0}; + std::string backFontFamily{}; + std::string backFontWeight{}; + std::string backFontStyle{}; + Float backFontSize{-1.0}; + SharedColor barTintColor{}; + SharedColor largeBarTintColor{}; + SharedColor tintColor{}; + SharedColor titleColor{}; + SharedColor largeTitleColor{}; + std::string backTitle{}; + bool backTitleOn{false}; + std::string backTestID{}; + double barHeight{0.0}; +}; + +class JSI_EXPORT NVNavigationStackProps final : public ViewProps { + public: + NVNavigationStackProps() = default; + NVNavigationStackProps(const PropsParserContext& context, const NVNavigationStackProps &sourceProps, const RawProps &rawProps); + +#pragma mark - Props + + std::vector keys{}; + std::string enterAnim{}; + std::string exitAnim{}; + bool enterAnimOff{false}; + std::string sharedElement{}; + std::string oldSharedElement{}; + int mostRecentEventCount{0}; +}; + +class JSI_EXPORT NVRightBarProps final : public ViewProps { + public: + NVRightBarProps() = default; + NVRightBarProps(const PropsParserContext& context, const NVRightBarProps &sourceProps, const RawProps &rawProps); + +#pragma mark - Props + + +}; + +class JSI_EXPORT NVSceneProps final : public ViewProps { + public: + NVSceneProps() = default; + NVSceneProps(const PropsParserContext& context, const NVSceneProps &sourceProps, const RawProps &rawProps); + +#pragma mark - Props + + std::string sceneKey{}; + int crumb{0}; + std::string title{}; + std::string enterAnim{}; + std::string exitAnim{}; + bool hidesTabBar{false}; +}; + +class JSI_EXPORT NVSearchBarProps final : public ViewProps { + public: + NVSearchBarProps() = default; + NVSearchBarProps(const PropsParserContext& context, const NVSearchBarProps &sourceProps, const RawProps &rawProps); + +#pragma mark - Props + + bool obscureBackground{false}; + bool hideNavigationBar{false}; + bool hideWhenScrolling{false}; + std::string autoCapitalize{}; + std::string placeholder{}; + std::string text{}; + int mostRecentEventCount{0}; + int mostRecentButtonEventCount{0}; + SharedColor barTintColor{}; + bool bottomBar{false}; + int scopeButton{0}; + std::vector scopeButtons{}; +}; + +class JSI_EXPORT NVSegmentedTabProps final : public ViewProps { + public: + NVSegmentedTabProps() = default; + NVSegmentedTabProps(const PropsParserContext& context, const NVSegmentedTabProps &sourceProps, const RawProps &rawProps); + +#pragma mark - Props + + SharedColor backgroundColor{}; + SharedColor selectedTintColor{}; + SharedColor unselectedTintColor{}; + std::vector titles{}; + std::vector testIDs{}; + std::string fontFamily{}; + std::string fontWeight{}; + std::string fontStyle{}; + Float fontSize{-1.0}; +}; + +class JSI_EXPORT NVSharedElementProps final : public ViewProps { + public: + NVSharedElementProps() = default; + NVSharedElementProps(const PropsParserContext& context, const NVSharedElementProps &sourceProps, const RawProps &rawProps); + +#pragma mark - Props + + std::string name{}; + int duration{-1}; + std::string fadeMode{}; +}; + +class JSI_EXPORT NVStatusBarProps final : public ViewProps { + public: + NVStatusBarProps() = default; + NVStatusBarProps(const PropsParserContext& context, const NVStatusBarProps &sourceProps, const RawProps &rawProps); + +#pragma mark - Props + + bool hidden{false}; + std::string tintStyle{}; + SharedColor barTintColor{}; +}; + +class JSI_EXPORT NVTabBarItemProps final : public ViewProps { + public: + NVTabBarItemProps() = default; + NVTabBarItemProps(const PropsParserContext& context, const NVTabBarItemProps &sourceProps, const RawProps &rawProps); + +#pragma mark - Props + + std::string title{}; + std::string fontFamily{}; + std::string fontWeight{}; + std::string fontStyle{}; + Float fontSize{-1.0}; + std::string testID{}; + std::string badge{}; + SharedColor badgeColor{}; + ImageSource image{}; + std::string systemItem{}; +}; + +class JSI_EXPORT NVTabBarProps final : public ViewProps { + public: + NVTabBarProps() = default; + NVTabBarProps(const PropsParserContext& context, const NVTabBarProps &sourceProps, const RawProps &rawProps); + +#pragma mark - Props + + int tabCount{0}; + int selectedTab{0}; + SharedColor barTintColor{}; + SharedColor selectedTintColor{}; + SharedColor unselectedTintColor{}; + SharedColor badgeColor{}; + bool scrollsToTop{false}; + std::string fontFamily{}; + std::string fontWeight{}; + std::string fontStyle{}; + Float fontSize{-1.0}; + int mostRecentEventCount{0}; +}; + +class JSI_EXPORT NVTabBarPagerProps final : public ViewProps { + public: + NVTabBarPagerProps() = default; + NVTabBarPagerProps(const PropsParserContext& context, const NVTabBarPagerProps &sourceProps, const RawProps &rawProps); + +#pragma mark - Props + + int tabCount{0}; + int selectedTab{0}; + bool scrollsToTop{false}; + int mostRecentEventCount{0}; +}; + +class JSI_EXPORT NVTabBarPagerRTLProps final : public ViewProps { + public: + NVTabBarPagerRTLProps() = default; + NVTabBarPagerRTLProps(const PropsParserContext& context, const NVTabBarPagerRTLProps &sourceProps, const RawProps &rawProps); + +#pragma mark - Props + + int tabCount{0}; + int selectedTab{0}; + bool scrollsToTop{false}; + int mostRecentEventCount{0}; +}; + +class JSI_EXPORT NVTabLayoutProps final : public ViewProps { + public: + NVTabLayoutProps() = default; + NVTabLayoutProps(const PropsParserContext& context, const NVTabLayoutProps &sourceProps, const RawProps &rawProps); + +#pragma mark - Props + + SharedColor selectedTintColor{}; + SharedColor unselectedTintColor{}; + SharedColor rippleColor{}; + bool bottomTabs{false}; + bool selectedIndicatorAtTop{false}; + bool scrollable{false}; +}; + +class JSI_EXPORT NVTabLayoutRTLProps final : public ViewProps { + public: + NVTabLayoutRTLProps() = default; + NVTabLayoutRTLProps(const PropsParserContext& context, const NVTabLayoutRTLProps &sourceProps, const RawProps &rawProps); + +#pragma mark - Props + + SharedColor selectedTintColor{}; + SharedColor unselectedTintColor{}; + SharedColor rippleColor{}; + bool selectedIndicatorAtTop{false}; + bool scrollable{false}; +}; + +class JSI_EXPORT NVTabNavigationProps final : public ViewProps { + public: + NVTabNavigationProps() = default; + NVTabNavigationProps(const PropsParserContext& context, const NVTabNavigationProps &sourceProps, const RawProps &rawProps); + +#pragma mark - Props + + SharedColor selectedTintColor{}; + SharedColor unselectedTintColor{}; + bool bottomTabs{false}; + bool itemHorizontalTranslation{false}; + int labelVisibilityMode{0}; + SharedColor activeIndicatorColor{}; + SharedColor rippleColor{}; +}; + +class JSI_EXPORT NVTitleBarProps final : public ViewProps { + public: + NVTitleBarProps() = default; + NVTitleBarProps(const PropsParserContext& context, const NVTitleBarProps &sourceProps, const RawProps &rawProps); + +#pragma mark - Props + + +}; + +class JSI_EXPORT NVToolbarProps final : public ViewProps { + public: + NVToolbarProps() = default; + NVToolbarProps(const PropsParserContext& context, const NVToolbarProps &sourceProps, const RawProps &rawProps); + +#pragma mark - Props + + std::string title{}; + std::string titleFontFamily{}; + std::string titleFontWeight{}; + std::string titleFontStyle{}; + Float titleFontSize{-1.0}; + bool titleCentered{false}; + SharedColor barTintColor{}; + SharedColor tintColor{}; + SharedColor titleColor{}; + ImageSource navigationImage{}; + std::string navigationTestID{}; + std::string navigationAccessibilityLabel{}; + ImageSource logo{}; + ImageSource overflowImage{}; + std::string overflowTestID{}; + bool pin{false}; + double barHeight{0.0}; +}; + +} // namespace react +} // namespace facebook diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/ShadowNodes.cpp b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/ShadowNodes.cpp new file mode 100644 index 0000000000..26d6d5c9b4 --- /dev/null +++ b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/ShadowNodes.cpp @@ -0,0 +1,39 @@ + +/** + * 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 + +namespace facebook { +namespace react { + +extern const char NVBottomAppBarComponentName[] = "NVBottomAppBar"; +extern const char NVBottomSheetComponentName[] = "NVBottomSheet"; +extern const char NVCollapsingBarComponentName[] = "NVCollapsingBar"; +extern const char NVCoordinatorLayoutComponentName[] = "NVCoordinatorLayout"; +extern const char NVExtendedFloatingActionButtonComponentName[] = "NVExtendedFloatingActionButton"; +extern const char NVFloatingActionButtonComponentName[] = "NVFloatingActionButton"; +extern const char NVLeftBarComponentName[] = "NVLeftBar"; +extern const char NVNavigationBarComponentName[] = "NVNavigationBar"; +extern const char NVNavigationStackComponentName[] = "NVNavigationStack"; +extern const char NVRightBarComponentName[] = "NVRightBar"; +extern const char NVSceneComponentName[] = "NVScene"; +extern const char NVSegmentedTabComponentName[] = "NVSegmentedTab"; +extern const char NVSharedElementComponentName[] = "NVSharedElement"; +extern const char NVStatusBarComponentName[] = "NVStatusBar"; +extern const char NVTabBarComponentName[] = "NVTabBar"; +extern const char NVTabBarPagerComponentName[] = "NVTabBarPager"; +extern const char NVTabBarPagerRTLComponentName[] = "NVTabBarPagerRTL"; +extern const char NVTabLayoutComponentName[] = "NVTabLayout"; +extern const char NVTabLayoutRTLComponentName[] = "NVTabLayoutRTL"; +extern const char NVTabNavigationComponentName[] = "NVTabNavigation"; +extern const char NVToolbarComponentName[] = "NVToolbar"; + +} // namespace react +} // namespace facebook diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/ShadowNodes.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/ShadowNodes.h new file mode 100644 index 0000000000..a3bb2ba0ff --- /dev/null +++ b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/ShadowNodes.h @@ -0,0 +1,219 @@ + +/** + * 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 +#include +#include +#include + +namespace facebook { +namespace react { + +JSI_EXPORT extern const char NVBottomAppBarComponentName[]; + +/* + * `ShadowNode` for component. + */ +using NVBottomAppBarShadowNode = ConcreteViewShadowNode< + NVBottomAppBarComponentName, + NVBottomAppBarProps, +NVBottomAppBarEventEmitter>; + +JSI_EXPORT extern const char NVBottomSheetComponentName[]; + +/* + * `ShadowNode` for component. + */ +using NVBottomSheetShadowNode = ConcreteViewShadowNode< + NVBottomSheetComponentName, + NVBottomSheetProps, +NVBottomSheetEventEmitter>; + +JSI_EXPORT extern const char NVCollapsingBarComponentName[]; + +/* + * `ShadowNode` for component. + */ +using NVCollapsingBarShadowNode = ConcreteViewShadowNode< + NVCollapsingBarComponentName, + NVCollapsingBarProps>; + +JSI_EXPORT extern const char NVCoordinatorLayoutComponentName[]; + +/* + * `ShadowNode` for component. + */ +using NVCoordinatorLayoutShadowNode = ConcreteViewShadowNode< + NVCoordinatorLayoutComponentName, + NVCoordinatorLayoutProps>; + +JSI_EXPORT extern const char NVExtendedFloatingActionButtonComponentName[]; + +/* + * `ShadowNode` for component. + */ +using NVExtendedFloatingActionButtonShadowNode = ConcreteViewShadowNode< + NVExtendedFloatingActionButtonComponentName, + NVExtendedFloatingActionButtonProps>; + +JSI_EXPORT extern const char NVFloatingActionButtonComponentName[]; + +/* + * `ShadowNode` for component. + */ +using NVFloatingActionButtonShadowNode = ConcreteViewShadowNode< + NVFloatingActionButtonComponentName, + NVFloatingActionButtonProps>; + +JSI_EXPORT extern const char NVLeftBarComponentName[]; + +/* + * `ShadowNode` for component. + */ +using NVLeftBarShadowNode = ConcreteViewShadowNode< + NVLeftBarComponentName, + NVLeftBarProps>; + +JSI_EXPORT extern const char NVNavigationBarComponentName[]; + +/* + * `ShadowNode` for component. + */ +using NVNavigationBarShadowNode = ConcreteViewShadowNode< + NVNavigationBarComponentName, + NVNavigationBarProps>; + +JSI_EXPORT extern const char NVNavigationStackComponentName[]; + +/* + * `ShadowNode` for component. + */ +using NVNavigationStackShadowNode = ConcreteViewShadowNode< + NVNavigationStackComponentName, + NVNavigationStackProps, +NVNavigationStackEventEmitter>; + +JSI_EXPORT extern const char NVRightBarComponentName[]; + +/* + * `ShadowNode` for component. + */ +using NVRightBarShadowNode = ConcreteViewShadowNode< + NVRightBarComponentName, + NVRightBarProps>; + +JSI_EXPORT extern const char NVSceneComponentName[]; + +/* + * `ShadowNode` for component. + */ +using NVSceneShadowNode = ConcreteViewShadowNode< + NVSceneComponentName, + NVSceneProps, +NVSceneEventEmitter>; + +JSI_EXPORT extern const char NVSegmentedTabComponentName[]; + +/* + * `ShadowNode` for component. + */ +using NVSegmentedTabShadowNode = ConcreteViewShadowNode< + NVSegmentedTabComponentName, + NVSegmentedTabProps>; + +JSI_EXPORT extern const char NVSharedElementComponentName[]; + +/* + * `ShadowNode` for component. + */ +using NVSharedElementShadowNode = ConcreteViewShadowNode< + NVSharedElementComponentName, + NVSharedElementProps>; + +JSI_EXPORT extern const char NVStatusBarComponentName[]; + +/* + * `ShadowNode` for component. + */ +using NVStatusBarShadowNode = ConcreteViewShadowNode< + NVStatusBarComponentName, + NVStatusBarProps>; + +JSI_EXPORT extern const char NVTabBarComponentName[]; + +/* + * `ShadowNode` for component. + */ +using NVTabBarShadowNode = ConcreteViewShadowNode< + NVTabBarComponentName, + NVTabBarProps, +NVTabBarEventEmitter>; + +JSI_EXPORT extern const char NVTabBarPagerComponentName[]; + +/* + * `ShadowNode` for component. + */ +using NVTabBarPagerShadowNode = ConcreteViewShadowNode< + NVTabBarPagerComponentName, + NVTabBarPagerProps, +NVTabBarPagerEventEmitter>; + +JSI_EXPORT extern const char NVTabBarPagerRTLComponentName[]; + +/* + * `ShadowNode` for component. + */ +using NVTabBarPagerRTLShadowNode = ConcreteViewShadowNode< + NVTabBarPagerRTLComponentName, + NVTabBarPagerRTLProps, +NVTabBarPagerRTLEventEmitter>; + +JSI_EXPORT extern const char NVTabLayoutComponentName[]; + +/* + * `ShadowNode` for component. + */ +using NVTabLayoutShadowNode = ConcreteViewShadowNode< + NVTabLayoutComponentName, + NVTabLayoutProps>; + +JSI_EXPORT extern const char NVTabLayoutRTLComponentName[]; + +/* + * `ShadowNode` for component. + */ +using NVTabLayoutRTLShadowNode = ConcreteViewShadowNode< + NVTabLayoutRTLComponentName, + NVTabLayoutRTLProps>; + +JSI_EXPORT extern const char NVTabNavigationComponentName[]; + +/* + * `ShadowNode` for component. + */ +using NVTabNavigationShadowNode = ConcreteViewShadowNode< + NVTabNavigationComponentName, + NVTabNavigationProps>; + +JSI_EXPORT extern const char NVToolbarComponentName[]; + +/* + * `ShadowNode` for component. + */ +using NVToolbarShadowNode = ConcreteViewShadowNode< + NVToolbarComponentName, + NVToolbarProps, +NVToolbarEventEmitter>; + +} // namespace react +} // namespace facebook From 374b53745a1b7d5f6e6346c0ea5e971a564c06a3 Mon Sep 17 00:00:00 2001 From: Graham Mendick Date: Sat, 17 Sep 2022 09:38:34 +0100 Subject: [PATCH 09/21] Fixed typo - was using names from Android.mk --- NavigationReactNative/src/cpp/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NavigationReactNative/src/cpp/CMakeLists.txt b/NavigationReactNative/src/cpp/CMakeLists.txt index cc47396538..678a4e2d16 100644 --- a/NavigationReactNative/src/cpp/CMakeLists.txt +++ b/NavigationReactNative/src/cpp/CMakeLists.txt @@ -26,8 +26,8 @@ target_link_libraries( react_debug react_nativemodule_core react_render_core - libreact_render_mapbuffer - libreact_render_imagemanager + react_render_mapbuffer + react_render_imagemanager react_render_debug react_render_graphics rrc_view From 3999f2500e493ea25653b1e02181221f35490d58 Mon Sep 17 00:00:00 2001 From: Graham Mendick Date: Sat, 17 Sep 2022 09:39:59 +0100 Subject: [PATCH 10/21] Renamed to match the .h file This file was codegen'ed but clearer to drop the 'generated' from the name --- ...igationreactnative-generated.cpp => navigationreactnative.cpp} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename NavigationReactNative/src/cpp/{navigationreactnative-generated.cpp => navigationreactnative.cpp} (100%) diff --git a/NavigationReactNative/src/cpp/navigationreactnative-generated.cpp b/NavigationReactNative/src/cpp/navigationreactnative.cpp similarity index 100% rename from NavigationReactNative/src/cpp/navigationreactnative-generated.cpp rename to NavigationReactNative/src/cpp/navigationreactnative.cpp From 4d15c4688919c1204bccf55c5e833885bd491bb3 Mon Sep 17 00:00:00 2001 From: Graham Mendick Date: Sat, 17 Sep 2022 09:47:22 +0100 Subject: [PATCH 11/21] Deleted redundant Android.mk Copying from react native autolinking repo and they only have the CMakeLists.txt https://github.com/troZee/react-native-cpp-autolinking/commit/5e1b0f2171490a435b540271588b34ca98287801 --- NavigationReactNative/src/cpp/Android.mk | 26 ------------------------ 1 file changed, 26 deletions(-) delete mode 100644 NavigationReactNative/src/cpp/Android.mk diff --git a/NavigationReactNative/src/cpp/Android.mk b/NavigationReactNative/src/cpp/Android.mk deleted file mode 100644 index e9f470f51e..0000000000 --- a/NavigationReactNative/src/cpp/Android.mk +++ /dev/null @@ -1,26 +0,0 @@ -# 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. - -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) - -LOCAL_MODULE := react_codegen_navigationreactnative - -LOCAL_C_INCLUDES := $(LOCAL_PATH) - -LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp) $(wildcard $(LOCAL_PATH)/react/renderer/components/navigationreactnative/*.cpp) -LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES)) - -LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/react/renderer/components/navigationreactnative - -LOCAL_SHARED_LIBRARIES := libfbjni libfolly_runtime libglog libjsi libreact_codegen_rncore libreact_render_mapbuffer libreact_render_imagemanager libreact_debug libreact_nativemodule_core libreact_render_core libreact_render_debug libreact_render_graphics librrc_view libturbomodulejsijni libyoga - -LOCAL_CFLAGS := \ - -DLOG_TAG=\"ReactNative\" - -LOCAL_CFLAGS += -fexceptions -frtti -std=c++17 -Wall - -include $(BUILD_SHARED_LIBRARY) From 41573b01ff23158b3890b50c0d9e68ea0725a7ea Mon Sep 17 00:00:00 2001 From: Graham Mendick Date: Sat, 17 Sep 2022 09:50:02 +0100 Subject: [PATCH 12/21] Updated version to wip Need to put together example repo with android build failing so react native can investigate --- .../navigation-react-native/navigation-react-native.podspec | 4 ++-- build/npm/navigation-react-native/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/npm/navigation-react-native/navigation-react-native.podspec b/build/npm/navigation-react-native/navigation-react-native.podspec index bc380dcce0..5540c1b7d7 100644 --- a/build/npm/navigation-react-native/navigation-react-native.podspec +++ b/build/npm/navigation-react-native/navigation-react-native.podspec @@ -2,13 +2,13 @@ folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 Pod::Spec.new do |spec| spec.name = "navigation-react-native" - spec.version = "8.10.0" + spec.version = "8.10.0-wip.0" spec.license = "Apache-2.0" spec.summary = "React Native plugin for the Navigation router" spec.homepage = "http://grahammendick.github.io/navigation/" spec.platform = :ios, "9.0" spec.author = "Graham Mendick" - spec.source = { :git => "git://github.com/grahammendick/navigation.git", :tag => "v8.10.0-NavigationReactNative" } + spec.source = { :git => "git://github.com/grahammendick/navigation.git", :tag => "v8.10.0-wip.0-NavigationReactNative" } spec.source_files = "ios/**/*.{h,m,mm}" spec.dependency "React-Core" if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then diff --git a/build/npm/navigation-react-native/package.json b/build/npm/navigation-react-native/package.json index 8a930053dc..4f75af4106 100644 --- a/build/npm/navigation-react-native/package.json +++ b/build/npm/navigation-react-native/package.json @@ -1,6 +1,6 @@ { "name": "navigation-react-native", - "version": "8.10.0", + "version": "8.10.0-wip.0", "description": "React Native plugin for the Navigation router", "main": "navigation.react.native.js", "types": "navigation.react.native.d.ts", From 6f67a6909e3cdf60fcf2859e59eb7eeebb2f31c4 Mon Sep 17 00:00:00 2001 From: Graham Mendick Date: Sat, 17 Sep 2022 15:35:21 +0100 Subject: [PATCH 13/21] Got a successful build on android Had to go through all the files on the example repo 1 by 1 to see what was wrong, JSI_EXPORT. There were 3 key errors 1. Added JSI_EXPORT to hand-written cpp interfaces 2. Include "Props.h" instead of 3. Removed libraries from codegenConfig in package.json These each took me ages to spot --- .../navigationreactnative/ComponentDescriptors.h | 12 ++++++------ .../navigationreactnative/EventEmitters.cpp | 2 +- .../navigationreactnative/NVActionBarShadowNode.h | 8 ++++---- .../navigationreactnative/NVActionBarState.h | 2 +- .../navigationreactnative/NVBarButtonShadowNode.h | 8 ++++---- .../navigationreactnative/NVSearchBarShadowNode.h | 8 ++++---- .../navigationreactnative/NVSearchBarState.h | 2 +- .../navigationreactnative/NVTabBarItemShadowNode.h | 8 ++++---- .../navigationreactnative/NVTitleBarShadowNode.h | 8 ++++---- .../navigationreactnative/NVTitleBarState.h | 2 +- .../components/navigationreactnative/Props.cpp | 2 +- .../components/navigationreactnative/ShadowNodes.h | 4 ++-- NavigationReactNative/src/react-native.config.js | 3 ++- build/npm/navigation-react-native/package.json | 11 +++++------ 14 files changed, 40 insertions(+), 40 deletions(-) diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/ComponentDescriptors.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/ComponentDescriptors.h index 034ef02afc..8b17103bc9 100644 --- a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/ComponentDescriptors.h +++ b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/ComponentDescriptors.h @@ -10,13 +10,13 @@ #pragma once -#include +#include "ShadowNodes.h" #include -#include -#include -#include -#include -#include +#include "NVActionBarShadowNode.h" +#include "NVBarButtonShadowNode.h" +#include "NVSearchBarShadowNode.h" +#include "NVTabBarItemShadowNode.h" +#include "NVTitleBarShadowNode.h" namespace facebook { namespace react { diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/EventEmitters.cpp b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/EventEmitters.cpp index bace8766c6..5750d87f22 100644 --- a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/EventEmitters.cpp +++ b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/EventEmitters.cpp @@ -8,7 +8,7 @@ * @generated by codegen project: GenerateEventEmitterCpp.js */ -#include +#include "EventEmitters.h" namespace facebook { namespace react { diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarShadowNode.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarShadowNode.h index 25685a4a69..6152c173d4 100644 --- a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarShadowNode.h +++ b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarShadowNode.h @@ -1,16 +1,16 @@ #pragma once #include "NVActionBarState.h" -#include -#include +#include "EventEmitters.h" +#include "Props.h" #include namespace facebook { namespace react { -extern const char NVActionBarComponentName[]; +JSI_EXPORT extern const char NVActionBarComponentName[]; -class NVActionBarShadowNode final : public ConcreteViewShadowNode< +class JSI_EXPORT NVActionBarShadowNode final : public ConcreteViewShadowNode< NVActionBarComponentName, NVActionBarProps, NVActionBarEventEmitter, diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarState.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarState.h index 064b03e7a7..990b85742d 100644 --- a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarState.h +++ b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarState.h @@ -13,7 +13,7 @@ namespace facebook { namespace react { -class NVActionBarState final { +class JSI_EXPORT NVActionBarState final { public: using Shared = std::shared_ptr; diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonShadowNode.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonShadowNode.h index af91fabcb7..3109300644 100644 --- a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonShadowNode.h +++ b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonShadowNode.h @@ -2,16 +2,16 @@ #include "NVBarButtonState.h" #include -#include -#include +#include "EventEmitters.h" +#include "Props.h" #include namespace facebook { namespace react { -extern const char NVBarButtonComponentName[]; +JSI_EXPORT extern const char NVBarButtonComponentName[]; -class NVBarButtonShadowNode final: public ConcreteViewShadowNode< +class JSI_EXPORT NVBarButtonShadowNode final: public ConcreteViewShadowNode< NVBarButtonComponentName, NVBarButtonProps, NVBarButtonEventEmitter, diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarShadowNode.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarShadowNode.h index 0ec6cb33d2..dbd3be3323 100644 --- a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarShadowNode.h +++ b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarShadowNode.h @@ -1,16 +1,16 @@ #pragma once #include "NVSearchBarState.h" -#include -#include +#include "EventEmitters.h" +#include "Props.h" #include namespace facebook { namespace react { -extern const char NVSearchBarComponentName[]; +JSI_EXPORT extern const char NVSearchBarComponentName[]; -class NVSearchBarShadowNode final : public ConcreteViewShadowNode< +class JSI_EXPORT NVSearchBarShadowNode final : public ConcreteViewShadowNode< NVSearchBarComponentName, NVSearchBarProps, NVSearchBarEventEmitter, diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarState.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarState.h index 5e3cc2423c..ae746281f9 100644 --- a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarState.h +++ b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarState.h @@ -13,7 +13,7 @@ namespace facebook { namespace react { -class NVSearchBarState final { +class JSI_EXPORT NVSearchBarState final { public: using Shared = std::shared_ptr; diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemShadowNode.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemShadowNode.h index 857bbbd623..b5b13a259e 100644 --- a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemShadowNode.h +++ b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemShadowNode.h @@ -2,16 +2,16 @@ #include "NVTabBarItemState.h" #include -#include -#include +#include "EventEmitters.h" +#include "Props.h" #include namespace facebook { namespace react { -extern const char NVTabBarItemComponentName[]; +JSI_EXPORT extern const char NVTabBarItemComponentName[]; -class NVTabBarItemShadowNode final: public ConcreteViewShadowNode< +class JSI_EXPORT NVTabBarItemShadowNode final: public ConcreteViewShadowNode< NVTabBarItemComponentName, NVTabBarItemProps, NVTabBarItemEventEmitter, diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarShadowNode.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarShadowNode.h index 0222bda5c6..65eb69d43c 100644 --- a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarShadowNode.h +++ b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarShadowNode.h @@ -1,16 +1,16 @@ #pragma once #include "NVTitleBarState.h" -#include -#include +#include "EventEmitters.h" +#include "Props.h" #include namespace facebook { namespace react { -extern const char NVTitleBarComponentName[]; +JSI_EXPORT extern const char NVTitleBarComponentName[]; -class NVTitleBarShadowNode final : public ConcreteViewShadowNode< +class JSI_EXPORT NVTitleBarShadowNode final : public ConcreteViewShadowNode< NVTitleBarComponentName, NVTitleBarProps, NVTitleBarEventEmitter, diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarState.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarState.h index 5a041b7125..269cfd8df7 100644 --- a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarState.h +++ b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarState.h @@ -13,7 +13,7 @@ namespace facebook { namespace react { -class NVTitleBarState final { +class JSI_EXPORT NVTitleBarState final { public: using Shared = std::shared_ptr; diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/Props.cpp b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/Props.cpp index e9666ff0db..a1b98aa806 100644 --- a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/Props.cpp +++ b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/Props.cpp @@ -8,7 +8,7 @@ * @generated by codegen project: GeneratePropsCpp.js */ -#include +#include "Props.h" #include #include #include diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/ShadowNodes.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/ShadowNodes.h index a3bb2ba0ff..77b4b3ed9e 100644 --- a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/ShadowNodes.h +++ b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/ShadowNodes.h @@ -10,8 +10,8 @@ #pragma once -#include -#include +#include "EventEmitters.h" +#include "Props.h" #include #include diff --git a/NavigationReactNative/src/react-native.config.js b/NavigationReactNative/src/react-native.config.js index 1ce6aed4f4..f7b4133fc6 100644 --- a/NavigationReactNative/src/react-native.config.js +++ b/NavigationReactNative/src/react-native.config.js @@ -27,7 +27,8 @@ module.exports = { 'NVTitleBarComponentDescriptor', 'NVToolbarComponentDescriptor', ], - androidMkPath: "../cpp/Android.mk" + cmakeListsPath: "../cpp/CMakeLists.txt", + libraryName: "navigationreactnative" }, }, }, diff --git a/build/npm/navigation-react-native/package.json b/build/npm/navigation-react-native/package.json index 4f75af4106..4d15b93aef 100644 --- a/build/npm/navigation-react-native/package.json +++ b/build/npm/navigation-react-native/package.json @@ -21,13 +21,12 @@ "react-native": "*" }, "codegenConfig": { - "libraries": [ - { - "name": "navigationreactnative", - "type": "all", - "jsSrcsDir": "." + "name": "navigationreactnative", + "type": "all", + "jsSrcsDir": ".", + "android": { + "javaPackageName": "com.navigation.reactnative" } - ] }, "author": "Graham Mendick", "license": "Apache-2.0", From 2cb889ed8ddef5a5261a0617bc4146d3ecdc8885 Mon Sep 17 00:00:00 2001 From: Graham Mendick Date: Sat, 17 Sep 2022 15:39:25 +0100 Subject: [PATCH 14/21] Removed library name now reading from package.json Also went back to androidMkPath because cmakeListsPath is a later change. Copies the config from React Native's autlink example --- NavigationReactNative/src/react-native.config.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/NavigationReactNative/src/react-native.config.js b/NavigationReactNative/src/react-native.config.js index f7b4133fc6..1ce6aed4f4 100644 --- a/NavigationReactNative/src/react-native.config.js +++ b/NavigationReactNative/src/react-native.config.js @@ -27,8 +27,7 @@ module.exports = { 'NVTitleBarComponentDescriptor', 'NVToolbarComponentDescriptor', ], - cmakeListsPath: "../cpp/CMakeLists.txt", - libraryName: "navigationreactnative" + androidMkPath: "../cpp/Android.mk" }, }, }, From af514f7dbfdf9f001da2b9c0d195aae0db9aeb9b Mon Sep 17 00:00:00 2001 From: Graham Mendick Date: Sun, 18 Sep 2022 09:46:49 +0100 Subject: [PATCH 15/21] Pointed at codegen because didn't work in ios Copying over the codegen didn't work for ios. Ended up with redefinition of EventEmitters errors https://github.com/reactwg/react-native-new-architecture/discussions/71#discussioncomment-3672029. There's no custom build on ios so it includes the copied over codegen as well as the actual codegen so it gets included twice. Can't just exclude it on ios because the includes on shadownodes point to local "EventEmitters.h'. So went with the react native screens approach of pointing at the codegen instead of copying it over https://github.com/reactwg/react-native-new-architecture/discussions/71#discussioncomment-3656196. It works on android and should work on ios (haven't tested yet) because it's just the hand-written files now --- NavigationReactNative/src/cpp/CMakeLists.txt | 17 +- .../ComponentDescriptors.h | 52 -- .../navigationreactnative/EventEmitters.cpp | 172 ------- .../navigationreactnative/EventEmitters.h | 301 ----------- .../NVActionBarShadowNode.h | 4 +- .../NVBarButtonShadowNode.h | 4 +- .../NVSearchBarShadowNode.h | 4 +- .../NVTabBarItemShadowNode.h | 4 +- .../NVTitleBarShadowNode.h | 4 +- .../navigationreactnative/Props.cpp | 398 --------------- .../components/navigationreactnative/Props.h | 478 ------------------ .../navigationreactnative/ShadowNodes.cpp | 39 -- .../navigationreactnative/ShadowNodes.h | 219 -------- 13 files changed, 25 insertions(+), 1671 deletions(-) delete mode 100644 NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/ComponentDescriptors.h delete mode 100644 NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/EventEmitters.cpp delete mode 100644 NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/EventEmitters.h delete mode 100644 NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/Props.cpp delete mode 100644 NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/Props.h delete mode 100644 NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/ShadowNodes.cpp delete mode 100644 NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/ShadowNodes.h diff --git a/NavigationReactNative/src/cpp/CMakeLists.txt b/NavigationReactNative/src/cpp/CMakeLists.txt index 678a4e2d16..6100de65cb 100644 --- a/NavigationReactNative/src/cpp/CMakeLists.txt +++ b/NavigationReactNative/src/cpp/CMakeLists.txt @@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) -file(GLOB react_codegen_SRCS CONFIGURE_DEPENDS *.cpp react/renderer/components/navigationreactnative/*.cpp) +file(GLOB react_codegen_SRCS CONFIGURE_DEPENDS *.cpp react/renderer/components/navigationreactnative/*.cpp ../android/build/generated/source/codegen/jni/react/renderer/components/navigationreactnative/*.cpp) add_library( react_codegen_navigationreactnative @@ -14,7 +14,14 @@ add_library( ${react_codegen_SRCS} ) -target_include_directories(react_codegen_navigationreactnative PUBLIC . react/renderer/components/navigationreactnative) +target_include_directories( + react_codegen_navigationreactnative + PUBLIC + . + react/renderer/components/navigationreactnative + ../android/build/generated/source/codegen/jni + ../android/build/generated/source/codegen/jni/react/renderer/components/navigationreactnative +) target_link_libraries( react_codegen_navigationreactnative @@ -44,3 +51,9 @@ target_compile_options( -std=c++17 -Wall ) + +target_include_directories( + ${CMAKE_PROJECT_NAME} + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} +) diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/ComponentDescriptors.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/ComponentDescriptors.h deleted file mode 100644 index 8b17103bc9..0000000000 --- a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/ComponentDescriptors.h +++ /dev/null @@ -1,52 +0,0 @@ - -/** - * 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 -#include "NVActionBarShadowNode.h" -#include "NVBarButtonShadowNode.h" -#include "NVSearchBarShadowNode.h" -#include "NVTabBarItemShadowNode.h" -#include "NVTitleBarShadowNode.h" - -namespace facebook { -namespace react { - -using NVActionBarComponentDescriptor = ConcreteComponentDescriptor; -using NVBarButtonComponentDescriptor = ConcreteComponentDescriptor; -using NVBottomAppBarComponentDescriptor = ConcreteComponentDescriptor; -using NVBottomSheetComponentDescriptor = ConcreteComponentDescriptor; -using NVCollapsingBarComponentDescriptor = ConcreteComponentDescriptor; -using NVCoordinatorLayoutComponentDescriptor = ConcreteComponentDescriptor; -using NVExtendedFloatingActionButtonComponentDescriptor = ConcreteComponentDescriptor; -using NVFloatingActionButtonComponentDescriptor = ConcreteComponentDescriptor; -using NVLeftBarComponentDescriptor = ConcreteComponentDescriptor; -using NVNavigationBarComponentDescriptor = ConcreteComponentDescriptor; -using NVNavigationStackComponentDescriptor = ConcreteComponentDescriptor; -using NVRightBarComponentDescriptor = ConcreteComponentDescriptor; -using NVSceneComponentDescriptor = ConcreteComponentDescriptor; -using NVSearchBarComponentDescriptor = ConcreteComponentDescriptor; -using NVSegmentedTabComponentDescriptor = ConcreteComponentDescriptor; -using NVSharedElementComponentDescriptor = ConcreteComponentDescriptor; -using NVStatusBarComponentDescriptor = ConcreteComponentDescriptor; -using NVTabBarItemComponentDescriptor = ConcreteComponentDescriptor; -using NVTabBarComponentDescriptor = ConcreteComponentDescriptor; -using NVTabBarPagerComponentDescriptor = ConcreteComponentDescriptor; -using NVTabBarPagerRTLComponentDescriptor = ConcreteComponentDescriptor; -using NVTabLayoutComponentDescriptor = ConcreteComponentDescriptor; -using NVTabLayoutRTLComponentDescriptor = ConcreteComponentDescriptor; -using NVTabNavigationComponentDescriptor = ConcreteComponentDescriptor; -using NVTitleBarComponentDescriptor = ConcreteComponentDescriptor; -using NVToolbarComponentDescriptor = ConcreteComponentDescriptor; - -} // namespace react -} // namespace facebook diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/EventEmitters.cpp b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/EventEmitters.cpp deleted file mode 100644 index 5750d87f22..0000000000 --- a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/EventEmitters.cpp +++ /dev/null @@ -1,172 +0,0 @@ - -/** - * 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 { -namespace react { - -void NVActionBarEventEmitter::onExpanded(OnExpanded event) const { - dispatchEvent("expanded", [event=std::move(event)](jsi::Runtime &runtime) { - auto payload = jsi::Object(runtime); - - return payload; - }); -} -void NVActionBarEventEmitter::onCollapsed(OnCollapsed event) const { - dispatchEvent("collapsed", [event=std::move(event)](jsi::Runtime &runtime) { - auto payload = jsi::Object(runtime); - - return payload; - }); -} -void NVBarButtonEventEmitter::onPress(OnPress event) const { - dispatchEvent("press", [event=std::move(event)](jsi::Runtime &runtime) { - auto payload = jsi::Object(runtime); - - return payload; - }); -} -void NVBottomAppBarEventEmitter::onNavigationPress(OnNavigationPress event) const { - dispatchEvent("navigationPress", [event=std::move(event)](jsi::Runtime &runtime) { - auto payload = jsi::Object(runtime); - - return payload; - }); -} -void NVBottomSheetEventEmitter::onDetentChanged(OnDetentChanged event) const { - dispatchEvent("detentChanged", [event=std::move(event)](jsi::Runtime &runtime) { - auto payload = jsi::Object(runtime); - payload.setProperty(runtime, "detent", event.detent); -payload.setProperty(runtime, "eventCount", event.eventCount); - return payload; - }); -} - - - - - - -void NVNavigationStackEventEmitter::onWillNavigateBack(OnWillNavigateBack event) const { - dispatchEvent("willNavigateBack", [event=std::move(event)](jsi::Runtime &runtime) { - auto payload = jsi::Object(runtime); - payload.setProperty(runtime, "crumb", event.crumb); - return payload; - }); -} -void NVNavigationStackEventEmitter::onRest(OnRest event) const { - dispatchEvent("rest", [event=std::move(event)](jsi::Runtime &runtime) { - auto payload = jsi::Object(runtime); - payload.setProperty(runtime, "crumb", event.crumb); -payload.setProperty(runtime, "eventCount", event.eventCount); - return payload; - }); -} - -void NVSceneEventEmitter::onPopped(OnPopped event) const { - dispatchEvent("popped", [event=std::move(event)](jsi::Runtime &runtime) { - auto payload = jsi::Object(runtime); - - return payload; - }); -} -void NVSearchBarEventEmitter::onChangeText(OnChangeText event) const { - dispatchEvent("changeText", [event=std::move(event)](jsi::Runtime &runtime) { - auto payload = jsi::Object(runtime); - payload.setProperty(runtime, "text", event.text); -payload.setProperty(runtime, "eventCount", event.eventCount); - return payload; - }); -} -void NVSearchBarEventEmitter::onChangeScopeButton(OnChangeScopeButton event) const { - dispatchEvent("changeScopeButton", [event=std::move(event)](jsi::Runtime &runtime) { - auto payload = jsi::Object(runtime); - payload.setProperty(runtime, "scopeButton", event.scopeButton); -payload.setProperty(runtime, "eventCount", event.eventCount); - return payload; - }); -} -void NVSearchBarEventEmitter::onExpand(OnExpand event) const { - dispatchEvent("expand", [event=std::move(event)](jsi::Runtime &runtime) { - auto payload = jsi::Object(runtime); - - return payload; - }); -} -void NVSearchBarEventEmitter::onCollapse(OnCollapse event) const { - dispatchEvent("collapse", [event=std::move(event)](jsi::Runtime &runtime) { - auto payload = jsi::Object(runtime); - - return payload; - }); -} - - - -void NVTabBarItemEventEmitter::onPress(OnPress event) const { - dispatchEvent("press", [event=std::move(event)](jsi::Runtime &runtime) { - auto payload = jsi::Object(runtime); - - return payload; - }); -} -void NVTabBarEventEmitter::onTabSelected(OnTabSelected event) const { - dispatchEvent("tabSelected", [event=std::move(event)](jsi::Runtime &runtime) { - auto payload = jsi::Object(runtime); - payload.setProperty(runtime, "tab", event.tab); -payload.setProperty(runtime, "eventCount", event.eventCount); - return payload; - }); -} -void NVTabBarPagerEventEmitter::onTabSelected(OnTabSelected event) const { - dispatchEvent("tabSelected", [event=std::move(event)](jsi::Runtime &runtime) { - auto payload = jsi::Object(runtime); - payload.setProperty(runtime, "tab", event.tab); -payload.setProperty(runtime, "eventCount", event.eventCount); - return payload; - }); -} -void NVTabBarPagerEventEmitter::onTabSwipeStateChanged(OnTabSwipeStateChanged event) const { - dispatchEvent("tabSwipeStateChanged", [event=std::move(event)](jsi::Runtime &runtime) { - auto payload = jsi::Object(runtime); - payload.setProperty(runtime, "swiping", event.swiping); - return payload; - }); -} -void NVTabBarPagerRTLEventEmitter::onTabSelected(OnTabSelected event) const { - dispatchEvent("tabSelected", [event=std::move(event)](jsi::Runtime &runtime) { - auto payload = jsi::Object(runtime); - payload.setProperty(runtime, "tab", event.tab); -payload.setProperty(runtime, "eventCount", event.eventCount); - return payload; - }); -} -void NVTabBarPagerRTLEventEmitter::onTabSwipeStateChanged(OnTabSwipeStateChanged event) const { - dispatchEvent("tabSwipeStateChanged", [event=std::move(event)](jsi::Runtime &runtime) { - auto payload = jsi::Object(runtime); - payload.setProperty(runtime, "swiping", event.swiping); - return payload; - }); -} - - - - -void NVToolbarEventEmitter::onNavigationPress(OnNavigationPress event) const { - dispatchEvent("navigationPress", [event=std::move(event)](jsi::Runtime &runtime) { - auto payload = jsi::Object(runtime); - - return payload; - }); -} - -} // namespace react -} // namespace facebook diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/EventEmitters.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/EventEmitters.h deleted file mode 100644 index befe0ccd0f..0000000000 --- a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/EventEmitters.h +++ /dev/null @@ -1,301 +0,0 @@ - -/** - * 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 -#include - -namespace facebook { -namespace react { - -class JSI_EXPORT NVActionBarEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - struct OnExpanded { - - }; - - struct OnCollapsed { - - }; - - void onExpanded(OnExpanded value) const; - - void onCollapsed(OnCollapsed value) const; -}; -class JSI_EXPORT NVBarButtonEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - struct OnPress { - - }; - - void onPress(OnPress value) const; -}; -class JSI_EXPORT NVBottomAppBarEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - struct OnNavigationPress { - - }; - - void onNavigationPress(OnNavigationPress value) const; -}; -class JSI_EXPORT NVBottomSheetEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - struct OnDetentChanged { - int detent; - int eventCount; - }; - - void onDetentChanged(OnDetentChanged value) const; -}; -class JSI_EXPORT NVCollapsingBarEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - - - -}; -class JSI_EXPORT NVCoordinatorLayoutEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - - - -}; -class JSI_EXPORT NVExtendedFloatingActionButtonEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - - - -}; -class JSI_EXPORT NVFloatingActionButtonEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - - - -}; -class JSI_EXPORT NVLeftBarEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - - - -}; -class JSI_EXPORT NVNavigationBarEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - - - -}; -class JSI_EXPORT NVNavigationStackEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - struct OnWillNavigateBack { - int crumb; - }; - - struct OnRest { - int crumb; - int eventCount; - }; - - void onWillNavigateBack(OnWillNavigateBack value) const; - - void onRest(OnRest value) const; -}; -class JSI_EXPORT NVRightBarEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - - - -}; -class JSI_EXPORT NVSceneEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - struct OnPopped { - - }; - - void onPopped(OnPopped value) const; -}; -class JSI_EXPORT NVSearchBarEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - struct OnChangeText { - std::string text; - int eventCount; - }; - - struct OnChangeScopeButton { - int scopeButton; - int eventCount; - }; - - struct OnExpand { - - }; - - struct OnCollapse { - - }; - - void onChangeText(OnChangeText value) const; - - void onChangeScopeButton(OnChangeScopeButton value) const; - - void onExpand(OnExpand value) const; - - void onCollapse(OnCollapse value) const; -}; -class JSI_EXPORT NVSegmentedTabEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - - - -}; -class JSI_EXPORT NVSharedElementEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - - - -}; -class JSI_EXPORT NVStatusBarEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - - - -}; -class JSI_EXPORT NVTabBarItemEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - struct OnPress { - - }; - - void onPress(OnPress value) const; -}; -class JSI_EXPORT NVTabBarEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - struct OnTabSelected { - int tab; - int eventCount; - }; - - void onTabSelected(OnTabSelected value) const; -}; -class JSI_EXPORT NVTabBarPagerEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - struct OnTabSelected { - int tab; - int eventCount; - }; - - struct OnTabSwipeStateChanged { - bool swiping; - }; - - void onTabSelected(OnTabSelected value) const; - - void onTabSwipeStateChanged(OnTabSwipeStateChanged value) const; -}; -class JSI_EXPORT NVTabBarPagerRTLEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - struct OnTabSelected { - int tab; - int eventCount; - }; - - struct OnTabSwipeStateChanged { - bool swiping; - }; - - void onTabSelected(OnTabSelected value) const; - - void onTabSwipeStateChanged(OnTabSwipeStateChanged value) const; -}; -class JSI_EXPORT NVTabLayoutEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - - - -}; -class JSI_EXPORT NVTabLayoutRTLEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - - - -}; -class JSI_EXPORT NVTabNavigationEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - - - -}; -class JSI_EXPORT NVTitleBarEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - - - -}; -class JSI_EXPORT NVToolbarEventEmitter : public ViewEventEmitter { - public: - using ViewEventEmitter::ViewEventEmitter; - - struct OnNavigationPress { - - }; - - void onNavigationPress(OnNavigationPress value) const; -}; - -} // namespace react -} // namespace facebook diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarShadowNode.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarShadowNode.h index 6152c173d4..9bc126eee7 100644 --- a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarShadowNode.h +++ b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarShadowNode.h @@ -1,8 +1,8 @@ #pragma once #include "NVActionBarState.h" -#include "EventEmitters.h" -#include "Props.h" +#include +#include #include namespace facebook { diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonShadowNode.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonShadowNode.h index 3109300644..bc589f9069 100644 --- a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonShadowNode.h +++ b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonShadowNode.h @@ -2,8 +2,8 @@ #include "NVBarButtonState.h" #include -#include "EventEmitters.h" -#include "Props.h" +#include +#include #include namespace facebook { diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarShadowNode.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarShadowNode.h index dbd3be3323..e5a30316b2 100644 --- a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarShadowNode.h +++ b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarShadowNode.h @@ -1,8 +1,8 @@ #pragma once #include "NVSearchBarState.h" -#include "EventEmitters.h" -#include "Props.h" +#include +#include #include namespace facebook { diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemShadowNode.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemShadowNode.h index b5b13a259e..e8153bdee4 100644 --- a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemShadowNode.h +++ b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemShadowNode.h @@ -2,8 +2,8 @@ #include "NVTabBarItemState.h" #include -#include "EventEmitters.h" -#include "Props.h" +#include +#include #include namespace facebook { diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarShadowNode.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarShadowNode.h index 65eb69d43c..3b4e1c3eac 100644 --- a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarShadowNode.h +++ b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarShadowNode.h @@ -1,8 +1,8 @@ #pragma once #include "NVTitleBarState.h" -#include "EventEmitters.h" -#include "Props.h" +#include +#include #include namespace facebook { diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/Props.cpp b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/Props.cpp deleted file mode 100644 index a1b98aa806..0000000000 --- a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/Props.cpp +++ /dev/null @@ -1,398 +0,0 @@ - -/** - * 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: GeneratePropsCpp.js - */ - -#include "Props.h" -#include -#include -#include - -namespace facebook { -namespace react { - -NVActionBarProps::NVActionBarProps( - const PropsParserContext &context, - const NVActionBarProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps) - - - {} -NVBarButtonProps::NVBarButtonProps( - const PropsParserContext &context, - const NVBarButtonProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), - - title(convertRawProp(context, rawProps, "title", sourceProps.title, {})), - fontFamily(convertRawProp(context, rawProps, "fontFamily", sourceProps.fontFamily, {})), - fontWeight(convertRawProp(context, rawProps, "fontWeight", sourceProps.fontWeight, {})), - fontStyle(convertRawProp(context, rawProps, "fontStyle", sourceProps.fontStyle, {})), - fontSize(convertRawProp(context, rawProps, "fontSize", sourceProps.fontSize, {-1.0})), - testID(convertRawProp(context, rawProps, "testID", sourceProps.testID, {})), - image(convertRawProp(context, rawProps, "image", sourceProps.image, {})), - systemItem(convertRawProp(context, rawProps, "systemItem", sourceProps.systemItem, {})), - search(convertRawProp(context, rawProps, "search", sourceProps.search, {false})), - showActionView(convertRawProp(context, rawProps, "showActionView", sourceProps.showActionView, {false})), - showAsAction(convertRawProp(context, rawProps, "showAsAction", sourceProps.showAsAction, {0})), - buttonWidth(convertRawProp(context, rawProps, "buttonWidth", sourceProps.buttonWidth, {0.0})), - actionBar(convertRawProp(context, rawProps, "actionBar", sourceProps.actionBar, {false})) - {} -NVBottomAppBarProps::NVBottomAppBarProps( - const PropsParserContext &context, - const NVBottomAppBarProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), - - barTintColor(convertRawProp(context, rawProps, "barTintColor", sourceProps.barTintColor, {})), - tintColor(convertRawProp(context, rawProps, "tintColor", sourceProps.tintColor, {})), - fabAlignmentMode(convertRawProp(context, rawProps, "fabAlignmentMode", sourceProps.fabAlignmentMode, {})), - fabAnimationMode(convertRawProp(context, rawProps, "fabAnimationMode", sourceProps.fabAnimationMode, {})), - fabCradleMargin(convertRawProp(context, rawProps, "fabCradleMargin", sourceProps.fabCradleMargin, {-1.0})), - fabCradleRoundedCornerRadius(convertRawProp(context, rawProps, "fabCradleRoundedCornerRadius", sourceProps.fabCradleRoundedCornerRadius, {-1.0})), - fabCradleVerticalOffset(convertRawProp(context, rawProps, "fabCradleVerticalOffset", sourceProps.fabCradleVerticalOffset, {-1.0})), - hideOnScroll(convertRawProp(context, rawProps, "hideOnScroll", sourceProps.hideOnScroll, {false})), - navigationImage(convertRawProp(context, rawProps, "navigationImage", sourceProps.navigationImage, {})), - navigationTestID(convertRawProp(context, rawProps, "navigationTestID", sourceProps.navigationTestID, {})), - overflowImage(convertRawProp(context, rawProps, "overflowImage", sourceProps.overflowImage, {})), - overflowTestID(convertRawProp(context, rawProps, "overflowTestID", sourceProps.overflowTestID, {})), - barHeight(convertRawProp(context, rawProps, "barHeight", sourceProps.barHeight, {0.0})) - {} -NVBottomSheetProps::NVBottomSheetProps( - const PropsParserContext &context, - const NVBottomSheetProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), - - detent(convertRawProp(context, rawProps, "detent", sourceProps.detent, {0})), - mostRecentEventCount(convertRawProp(context, rawProps, "mostRecentEventCount", sourceProps.mostRecentEventCount, {0})), - peekHeight(convertRawProp(context, rawProps, "peekHeight", sourceProps.peekHeight, {0})), - expandedOffset(convertRawProp(context, rawProps, "expandedOffset", sourceProps.expandedOffset, {0})), - fitToContents(convertRawProp(context, rawProps, "fitToContents", sourceProps.fitToContents, {false})), - halfExpandedRatio(convertRawProp(context, rawProps, "halfExpandedRatio", sourceProps.halfExpandedRatio, {-1.0})), - hideable(convertRawProp(context, rawProps, "hideable", sourceProps.hideable, {false})), - skipCollapsed(convertRawProp(context, rawProps, "skipCollapsed", sourceProps.skipCollapsed, {false})), - draggable(convertRawProp(context, rawProps, "draggable", sourceProps.draggable, {false})), - sheetHeight(convertRawProp(context, rawProps, "sheetHeight", sourceProps.sheetHeight, {0.0})) - {} -NVCollapsingBarProps::NVCollapsingBarProps( - const PropsParserContext &context, - const NVCollapsingBarProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), - - title(convertRawProp(context, rawProps, "title", sourceProps.title, {})), - titleFontFamily(convertRawProp(context, rawProps, "titleFontFamily", sourceProps.titleFontFamily, {})), - titleFontWeight(convertRawProp(context, rawProps, "titleFontWeight", sourceProps.titleFontWeight, {})), - titleFontStyle(convertRawProp(context, rawProps, "titleFontStyle", sourceProps.titleFontStyle, {})), - largeTitleFontFamily(convertRawProp(context, rawProps, "largeTitleFontFamily", sourceProps.largeTitleFontFamily, {})), - largeTitleFontWeight(convertRawProp(context, rawProps, "largeTitleFontWeight", sourceProps.largeTitleFontWeight, {})), - largeTitleFontStyle(convertRawProp(context, rawProps, "largeTitleFontStyle", sourceProps.largeTitleFontStyle, {})), - titleEnabled(convertRawProp(context, rawProps, "titleEnabled", sourceProps.titleEnabled, {false})), - titleCollapseMode(convertRawProp(context, rawProps, "titleCollapseMode", sourceProps.titleCollapseMode, {})), - contentScrimColor(convertRawProp(context, rawProps, "contentScrimColor", sourceProps.contentScrimColor, {})), - collapsedTitleColor(convertRawProp(context, rawProps, "collapsedTitleColor", sourceProps.collapsedTitleColor, {})), - expandedTitleColor(convertRawProp(context, rawProps, "expandedTitleColor", sourceProps.expandedTitleColor, {})) - {} -NVCoordinatorLayoutProps::NVCoordinatorLayoutProps( - const PropsParserContext &context, - const NVCoordinatorLayoutProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), - - overlap(convertRawProp(context, rawProps, "overlap", sourceProps.overlap, {0})) - {} -NVExtendedFloatingActionButtonProps::NVExtendedFloatingActionButtonProps( - const PropsParserContext &context, - const NVExtendedFloatingActionButtonProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), - - image(convertRawProp(context, rawProps, "image", sourceProps.image, {})), - text(convertRawProp(context, rawProps, "text", sourceProps.text, {})), - gravity(convertRawProp(context, rawProps, "gravity", sourceProps.gravity, {})), - anchor(convertRawProp(context, rawProps, "anchor", sourceProps.anchor, {})), - anchorGravity(convertRawProp(context, rawProps, "anchorGravity", sourceProps.anchorGravity, {})), - contentDescription(convertRawProp(context, rawProps, "contentDescription", sourceProps.contentDescription, {})), - testID(convertRawProp(context, rawProps, "testID", sourceProps.testID, {})), - fabColor(convertRawProp(context, rawProps, "fabColor", sourceProps.fabColor, {})), - fabBackgroundColor(convertRawProp(context, rawProps, "fabBackgroundColor", sourceProps.fabBackgroundColor, {})), - rippleColor(convertRawProp(context, rawProps, "rippleColor", sourceProps.rippleColor, {})), - fabMarginTop(convertRawProp(context, rawProps, "fabMarginTop", sourceProps.fabMarginTop, {0})), - fabMarginRight(convertRawProp(context, rawProps, "fabMarginRight", sourceProps.fabMarginRight, {0})), - fabMarginBottom(convertRawProp(context, rawProps, "fabMarginBottom", sourceProps.fabMarginBottom, {0})), - fabMarginLeft(convertRawProp(context, rawProps, "fabMarginLeft", sourceProps.fabMarginLeft, {0})), - fabMarginStart(convertRawProp(context, rawProps, "fabMarginStart", sourceProps.fabMarginStart, {0})), - fabMarginEnd(convertRawProp(context, rawProps, "fabMarginEnd", sourceProps.fabMarginEnd, {0})), - fabMargin(convertRawProp(context, rawProps, "fabMargin", sourceProps.fabMargin, {0})), - fabFontFamily(convertRawProp(context, rawProps, "fabFontFamily", sourceProps.fabFontFamily, {})), - fabFontWeight(convertRawProp(context, rawProps, "fabFontWeight", sourceProps.fabFontWeight, {})), - fabFontStyle(convertRawProp(context, rawProps, "fabFontStyle", sourceProps.fabFontStyle, {})), - fabFontSize(convertRawProp(context, rawProps, "fabFontSize", sourceProps.fabFontSize, {-1.0})) - {} -NVFloatingActionButtonProps::NVFloatingActionButtonProps( - const PropsParserContext &context, - const NVFloatingActionButtonProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), - - image(convertRawProp(context, rawProps, "image", sourceProps.image, {})), - gravity(convertRawProp(context, rawProps, "gravity", sourceProps.gravity, {})), - anchor(convertRawProp(context, rawProps, "anchor", sourceProps.anchor, {})), - anchorGravity(convertRawProp(context, rawProps, "anchorGravity", sourceProps.anchorGravity, {})), - size(convertRawProp(context, rawProps, "size", sourceProps.size, {0})), - contentDescription(convertRawProp(context, rawProps, "contentDescription", sourceProps.contentDescription, {})), - testID(convertRawProp(context, rawProps, "testID", sourceProps.testID, {})), - fabColor(convertRawProp(context, rawProps, "fabColor", sourceProps.fabColor, {})), - fabBackgroundColor(convertRawProp(context, rawProps, "fabBackgroundColor", sourceProps.fabBackgroundColor, {})), - rippleColor(convertRawProp(context, rawProps, "rippleColor", sourceProps.rippleColor, {})), - fabMarginTop(convertRawProp(context, rawProps, "fabMarginTop", sourceProps.fabMarginTop, {0})), - fabMarginRight(convertRawProp(context, rawProps, "fabMarginRight", sourceProps.fabMarginRight, {0})), - fabMarginBottom(convertRawProp(context, rawProps, "fabMarginBottom", sourceProps.fabMarginBottom, {0})), - fabMarginLeft(convertRawProp(context, rawProps, "fabMarginLeft", sourceProps.fabMarginLeft, {0})), - fabMarginStart(convertRawProp(context, rawProps, "fabMarginStart", sourceProps.fabMarginStart, {0})), - fabMarginEnd(convertRawProp(context, rawProps, "fabMarginEnd", sourceProps.fabMarginEnd, {0})), - fabMargin(convertRawProp(context, rawProps, "fabMargin", sourceProps.fabMargin, {0})), - fabElevation(convertRawProp(context, rawProps, "fabElevation", sourceProps.fabElevation, {0})) - {} -NVLeftBarProps::NVLeftBarProps( - const PropsParserContext &context, - const NVLeftBarProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), - - supplementBack(convertRawProp(context, rawProps, "supplementBack", sourceProps.supplementBack, {false})) - {} -NVNavigationBarProps::NVNavigationBarProps( - const PropsParserContext &context, - const NVNavigationBarProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), - - hidden(convertRawProp(context, rawProps, "hidden", sourceProps.hidden, {false})), - largeTitle(convertRawProp(context, rawProps, "largeTitle", sourceProps.largeTitle, {false})), - title(convertRawProp(context, rawProps, "title", sourceProps.title, {})), - titleFontFamily(convertRawProp(context, rawProps, "titleFontFamily", sourceProps.titleFontFamily, {})), - titleFontWeight(convertRawProp(context, rawProps, "titleFontWeight", sourceProps.titleFontWeight, {})), - titleFontStyle(convertRawProp(context, rawProps, "titleFontStyle", sourceProps.titleFontStyle, {})), - titleFontSize(convertRawProp(context, rawProps, "titleFontSize", sourceProps.titleFontSize, {-1.0})), - largeTitleFontFamily(convertRawProp(context, rawProps, "largeTitleFontFamily", sourceProps.largeTitleFontFamily, {})), - largeTitleFontWeight(convertRawProp(context, rawProps, "largeTitleFontWeight", sourceProps.largeTitleFontWeight, {})), - largeTitleFontStyle(convertRawProp(context, rawProps, "largeTitleFontStyle", sourceProps.largeTitleFontStyle, {})), - largeTitleFontSize(convertRawProp(context, rawProps, "largeTitleFontSize", sourceProps.largeTitleFontSize, {-1.0})), - backFontFamily(convertRawProp(context, rawProps, "backFontFamily", sourceProps.backFontFamily, {})), - backFontWeight(convertRawProp(context, rawProps, "backFontWeight", sourceProps.backFontWeight, {})), - backFontStyle(convertRawProp(context, rawProps, "backFontStyle", sourceProps.backFontStyle, {})), - backFontSize(convertRawProp(context, rawProps, "backFontSize", sourceProps.backFontSize, {-1.0})), - barTintColor(convertRawProp(context, rawProps, "barTintColor", sourceProps.barTintColor, {})), - largeBarTintColor(convertRawProp(context, rawProps, "largeBarTintColor", sourceProps.largeBarTintColor, {})), - tintColor(convertRawProp(context, rawProps, "tintColor", sourceProps.tintColor, {})), - titleColor(convertRawProp(context, rawProps, "titleColor", sourceProps.titleColor, {})), - largeTitleColor(convertRawProp(context, rawProps, "largeTitleColor", sourceProps.largeTitleColor, {})), - backTitle(convertRawProp(context, rawProps, "backTitle", sourceProps.backTitle, {})), - backTitleOn(convertRawProp(context, rawProps, "backTitleOn", sourceProps.backTitleOn, {false})), - backTestID(convertRawProp(context, rawProps, "backTestID", sourceProps.backTestID, {})), - barHeight(convertRawProp(context, rawProps, "barHeight", sourceProps.barHeight, {0.0})) - {} -NVNavigationStackProps::NVNavigationStackProps( - const PropsParserContext &context, - const NVNavigationStackProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), - - keys(convertRawProp(context, rawProps, "keys", sourceProps.keys, {})), - enterAnim(convertRawProp(context, rawProps, "enterAnim", sourceProps.enterAnim, {})), - exitAnim(convertRawProp(context, rawProps, "exitAnim", sourceProps.exitAnim, {})), - enterAnimOff(convertRawProp(context, rawProps, "enterAnimOff", sourceProps.enterAnimOff, {false})), - sharedElement(convertRawProp(context, rawProps, "sharedElement", sourceProps.sharedElement, {})), - oldSharedElement(convertRawProp(context, rawProps, "oldSharedElement", sourceProps.oldSharedElement, {})), - mostRecentEventCount(convertRawProp(context, rawProps, "mostRecentEventCount", sourceProps.mostRecentEventCount, {0})) - {} -NVRightBarProps::NVRightBarProps( - const PropsParserContext &context, - const NVRightBarProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps) - - - {} -NVSceneProps::NVSceneProps( - const PropsParserContext &context, - const NVSceneProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), - - sceneKey(convertRawProp(context, rawProps, "sceneKey", sourceProps.sceneKey, {})), - crumb(convertRawProp(context, rawProps, "crumb", sourceProps.crumb, {0})), - title(convertRawProp(context, rawProps, "title", sourceProps.title, {})), - enterAnim(convertRawProp(context, rawProps, "enterAnim", sourceProps.enterAnim, {})), - exitAnim(convertRawProp(context, rawProps, "exitAnim", sourceProps.exitAnim, {})), - hidesTabBar(convertRawProp(context, rawProps, "hidesTabBar", sourceProps.hidesTabBar, {false})) - {} -NVSearchBarProps::NVSearchBarProps( - const PropsParserContext &context, - const NVSearchBarProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), - - obscureBackground(convertRawProp(context, rawProps, "obscureBackground", sourceProps.obscureBackground, {false})), - hideNavigationBar(convertRawProp(context, rawProps, "hideNavigationBar", sourceProps.hideNavigationBar, {false})), - hideWhenScrolling(convertRawProp(context, rawProps, "hideWhenScrolling", sourceProps.hideWhenScrolling, {false})), - autoCapitalize(convertRawProp(context, rawProps, "autoCapitalize", sourceProps.autoCapitalize, {})), - placeholder(convertRawProp(context, rawProps, "placeholder", sourceProps.placeholder, {})), - text(convertRawProp(context, rawProps, "text", sourceProps.text, {})), - mostRecentEventCount(convertRawProp(context, rawProps, "mostRecentEventCount", sourceProps.mostRecentEventCount, {0})), - mostRecentButtonEventCount(convertRawProp(context, rawProps, "mostRecentButtonEventCount", sourceProps.mostRecentButtonEventCount, {0})), - barTintColor(convertRawProp(context, rawProps, "barTintColor", sourceProps.barTintColor, {})), - bottomBar(convertRawProp(context, rawProps, "bottomBar", sourceProps.bottomBar, {false})), - scopeButton(convertRawProp(context, rawProps, "scopeButton", sourceProps.scopeButton, {0})), - scopeButtons(convertRawProp(context, rawProps, "scopeButtons", sourceProps.scopeButtons, {})) - {} -NVSegmentedTabProps::NVSegmentedTabProps( - const PropsParserContext &context, - const NVSegmentedTabProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), - - backgroundColor(convertRawProp(context, rawProps, "backgroundColor", sourceProps.backgroundColor, {})), - selectedTintColor(convertRawProp(context, rawProps, "selectedTintColor", sourceProps.selectedTintColor, {})), - unselectedTintColor(convertRawProp(context, rawProps, "unselectedTintColor", sourceProps.unselectedTintColor, {})), - titles(convertRawProp(context, rawProps, "titles", sourceProps.titles, {})), - testIDs(convertRawProp(context, rawProps, "testIDs", sourceProps.testIDs, {})), - fontFamily(convertRawProp(context, rawProps, "fontFamily", sourceProps.fontFamily, {})), - fontWeight(convertRawProp(context, rawProps, "fontWeight", sourceProps.fontWeight, {})), - fontStyle(convertRawProp(context, rawProps, "fontStyle", sourceProps.fontStyle, {})), - fontSize(convertRawProp(context, rawProps, "fontSize", sourceProps.fontSize, {-1.0})) - {} -NVSharedElementProps::NVSharedElementProps( - const PropsParserContext &context, - const NVSharedElementProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), - - name(convertRawProp(context, rawProps, "name", sourceProps.name, {})), - duration(convertRawProp(context, rawProps, "duration", sourceProps.duration, {-1})), - fadeMode(convertRawProp(context, rawProps, "fadeMode", sourceProps.fadeMode, {})) - {} -NVStatusBarProps::NVStatusBarProps( - const PropsParserContext &context, - const NVStatusBarProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), - - hidden(convertRawProp(context, rawProps, "hidden", sourceProps.hidden, {false})), - tintStyle(convertRawProp(context, rawProps, "tintStyle", sourceProps.tintStyle, {})), - barTintColor(convertRawProp(context, rawProps, "barTintColor", sourceProps.barTintColor, {})) - {} -NVTabBarItemProps::NVTabBarItemProps( - const PropsParserContext &context, - const NVTabBarItemProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), - - title(convertRawProp(context, rawProps, "title", sourceProps.title, {})), - fontFamily(convertRawProp(context, rawProps, "fontFamily", sourceProps.fontFamily, {})), - fontWeight(convertRawProp(context, rawProps, "fontWeight", sourceProps.fontWeight, {})), - fontStyle(convertRawProp(context, rawProps, "fontStyle", sourceProps.fontStyle, {})), - fontSize(convertRawProp(context, rawProps, "fontSize", sourceProps.fontSize, {-1.0})), - testID(convertRawProp(context, rawProps, "testID", sourceProps.testID, {})), - badge(convertRawProp(context, rawProps, "badge", sourceProps.badge, {})), - badgeColor(convertRawProp(context, rawProps, "badgeColor", sourceProps.badgeColor, {})), - image(convertRawProp(context, rawProps, "image", sourceProps.image, {})), - systemItem(convertRawProp(context, rawProps, "systemItem", sourceProps.systemItem, {})) - {} -NVTabBarProps::NVTabBarProps( - const PropsParserContext &context, - const NVTabBarProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), - - tabCount(convertRawProp(context, rawProps, "tabCount", sourceProps.tabCount, {0})), - selectedTab(convertRawProp(context, rawProps, "selectedTab", sourceProps.selectedTab, {0})), - barTintColor(convertRawProp(context, rawProps, "barTintColor", sourceProps.barTintColor, {})), - selectedTintColor(convertRawProp(context, rawProps, "selectedTintColor", sourceProps.selectedTintColor, {})), - unselectedTintColor(convertRawProp(context, rawProps, "unselectedTintColor", sourceProps.unselectedTintColor, {})), - badgeColor(convertRawProp(context, rawProps, "badgeColor", sourceProps.badgeColor, {})), - scrollsToTop(convertRawProp(context, rawProps, "scrollsToTop", sourceProps.scrollsToTop, {false})), - fontFamily(convertRawProp(context, rawProps, "fontFamily", sourceProps.fontFamily, {})), - fontWeight(convertRawProp(context, rawProps, "fontWeight", sourceProps.fontWeight, {})), - fontStyle(convertRawProp(context, rawProps, "fontStyle", sourceProps.fontStyle, {})), - fontSize(convertRawProp(context, rawProps, "fontSize", sourceProps.fontSize, {-1.0})), - mostRecentEventCount(convertRawProp(context, rawProps, "mostRecentEventCount", sourceProps.mostRecentEventCount, {0})) - {} -NVTabBarPagerProps::NVTabBarPagerProps( - const PropsParserContext &context, - const NVTabBarPagerProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), - - tabCount(convertRawProp(context, rawProps, "tabCount", sourceProps.tabCount, {0})), - selectedTab(convertRawProp(context, rawProps, "selectedTab", sourceProps.selectedTab, {0})), - scrollsToTop(convertRawProp(context, rawProps, "scrollsToTop", sourceProps.scrollsToTop, {false})), - mostRecentEventCount(convertRawProp(context, rawProps, "mostRecentEventCount", sourceProps.mostRecentEventCount, {0})) - {} -NVTabBarPagerRTLProps::NVTabBarPagerRTLProps( - const PropsParserContext &context, - const NVTabBarPagerRTLProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), - - tabCount(convertRawProp(context, rawProps, "tabCount", sourceProps.tabCount, {0})), - selectedTab(convertRawProp(context, rawProps, "selectedTab", sourceProps.selectedTab, {0})), - scrollsToTop(convertRawProp(context, rawProps, "scrollsToTop", sourceProps.scrollsToTop, {false})), - mostRecentEventCount(convertRawProp(context, rawProps, "mostRecentEventCount", sourceProps.mostRecentEventCount, {0})) - {} -NVTabLayoutProps::NVTabLayoutProps( - const PropsParserContext &context, - const NVTabLayoutProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), - - selectedTintColor(convertRawProp(context, rawProps, "selectedTintColor", sourceProps.selectedTintColor, {})), - unselectedTintColor(convertRawProp(context, rawProps, "unselectedTintColor", sourceProps.unselectedTintColor, {})), - rippleColor(convertRawProp(context, rawProps, "rippleColor", sourceProps.rippleColor, {})), - bottomTabs(convertRawProp(context, rawProps, "bottomTabs", sourceProps.bottomTabs, {false})), - selectedIndicatorAtTop(convertRawProp(context, rawProps, "selectedIndicatorAtTop", sourceProps.selectedIndicatorAtTop, {false})), - scrollable(convertRawProp(context, rawProps, "scrollable", sourceProps.scrollable, {false})) - {} -NVTabLayoutRTLProps::NVTabLayoutRTLProps( - const PropsParserContext &context, - const NVTabLayoutRTLProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), - - selectedTintColor(convertRawProp(context, rawProps, "selectedTintColor", sourceProps.selectedTintColor, {})), - unselectedTintColor(convertRawProp(context, rawProps, "unselectedTintColor", sourceProps.unselectedTintColor, {})), - rippleColor(convertRawProp(context, rawProps, "rippleColor", sourceProps.rippleColor, {})), - selectedIndicatorAtTop(convertRawProp(context, rawProps, "selectedIndicatorAtTop", sourceProps.selectedIndicatorAtTop, {false})), - scrollable(convertRawProp(context, rawProps, "scrollable", sourceProps.scrollable, {false})) - {} -NVTabNavigationProps::NVTabNavigationProps( - const PropsParserContext &context, - const NVTabNavigationProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), - - selectedTintColor(convertRawProp(context, rawProps, "selectedTintColor", sourceProps.selectedTintColor, {})), - unselectedTintColor(convertRawProp(context, rawProps, "unselectedTintColor", sourceProps.unselectedTintColor, {})), - bottomTabs(convertRawProp(context, rawProps, "bottomTabs", sourceProps.bottomTabs, {false})), - itemHorizontalTranslation(convertRawProp(context, rawProps, "itemHorizontalTranslation", sourceProps.itemHorizontalTranslation, {false})), - labelVisibilityMode(convertRawProp(context, rawProps, "labelVisibilityMode", sourceProps.labelVisibilityMode, {0})), - activeIndicatorColor(convertRawProp(context, rawProps, "activeIndicatorColor", sourceProps.activeIndicatorColor, {})), - rippleColor(convertRawProp(context, rawProps, "rippleColor", sourceProps.rippleColor, {})) - {} -NVTitleBarProps::NVTitleBarProps( - const PropsParserContext &context, - const NVTitleBarProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps) - - - {} -NVToolbarProps::NVToolbarProps( - const PropsParserContext &context, - const NVToolbarProps &sourceProps, - const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), - - title(convertRawProp(context, rawProps, "title", sourceProps.title, {})), - titleFontFamily(convertRawProp(context, rawProps, "titleFontFamily", sourceProps.titleFontFamily, {})), - titleFontWeight(convertRawProp(context, rawProps, "titleFontWeight", sourceProps.titleFontWeight, {})), - titleFontStyle(convertRawProp(context, rawProps, "titleFontStyle", sourceProps.titleFontStyle, {})), - titleFontSize(convertRawProp(context, rawProps, "titleFontSize", sourceProps.titleFontSize, {-1.0})), - titleCentered(convertRawProp(context, rawProps, "titleCentered", sourceProps.titleCentered, {false})), - barTintColor(convertRawProp(context, rawProps, "barTintColor", sourceProps.barTintColor, {})), - tintColor(convertRawProp(context, rawProps, "tintColor", sourceProps.tintColor, {})), - titleColor(convertRawProp(context, rawProps, "titleColor", sourceProps.titleColor, {})), - navigationImage(convertRawProp(context, rawProps, "navigationImage", sourceProps.navigationImage, {})), - navigationTestID(convertRawProp(context, rawProps, "navigationTestID", sourceProps.navigationTestID, {})), - navigationAccessibilityLabel(convertRawProp(context, rawProps, "navigationAccessibilityLabel", sourceProps.navigationAccessibilityLabel, {})), - logo(convertRawProp(context, rawProps, "logo", sourceProps.logo, {})), - overflowImage(convertRawProp(context, rawProps, "overflowImage", sourceProps.overflowImage, {})), - overflowTestID(convertRawProp(context, rawProps, "overflowTestID", sourceProps.overflowTestID, {})), - pin(convertRawProp(context, rawProps, "pin", sourceProps.pin, {false})), - barHeight(convertRawProp(context, rawProps, "barHeight", sourceProps.barHeight, {0.0})) - {} - -} // namespace react -} // namespace facebook diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/Props.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/Props.h deleted file mode 100644 index 18f34cd75a..0000000000 --- a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/Props.h +++ /dev/null @@ -1,478 +0,0 @@ - -/** - * 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: GeneratePropsH.js - */ -#pragma once - -#include -#include -#include -#include -#include -#include - -namespace facebook { -namespace react { - -class JSI_EXPORT NVActionBarProps final : public ViewProps { - public: - NVActionBarProps() = default; - NVActionBarProps(const PropsParserContext& context, const NVActionBarProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - -}; - -class JSI_EXPORT NVBarButtonProps final : public ViewProps { - public: - NVBarButtonProps() = default; - NVBarButtonProps(const PropsParserContext& context, const NVBarButtonProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - std::string title{}; - std::string fontFamily{}; - std::string fontWeight{}; - std::string fontStyle{}; - Float fontSize{-1.0}; - std::string testID{}; - ImageSource image{}; - std::string systemItem{}; - bool search{false}; - bool showActionView{false}; - int showAsAction{0}; - double buttonWidth{0.0}; - bool actionBar{false}; -}; - -class JSI_EXPORT NVBottomAppBarProps final : public ViewProps { - public: - NVBottomAppBarProps() = default; - NVBottomAppBarProps(const PropsParserContext& context, const NVBottomAppBarProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - SharedColor barTintColor{}; - SharedColor tintColor{}; - std::string fabAlignmentMode{}; - std::string fabAnimationMode{}; - Float fabCradleMargin{-1.0}; - Float fabCradleRoundedCornerRadius{-1.0}; - Float fabCradleVerticalOffset{-1.0}; - bool hideOnScroll{false}; - ImageSource navigationImage{}; - std::string navigationTestID{}; - ImageSource overflowImage{}; - std::string overflowTestID{}; - double barHeight{0.0}; -}; - -class JSI_EXPORT NVBottomSheetProps final : public ViewProps { - public: - NVBottomSheetProps() = default; - NVBottomSheetProps(const PropsParserContext& context, const NVBottomSheetProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - int detent{0}; - int mostRecentEventCount{0}; - int peekHeight{0}; - int expandedOffset{0}; - bool fitToContents{false}; - Float halfExpandedRatio{-1.0}; - bool hideable{false}; - bool skipCollapsed{false}; - bool draggable{false}; - double sheetHeight{0.0}; -}; - -class JSI_EXPORT NVCollapsingBarProps final : public ViewProps { - public: - NVCollapsingBarProps() = default; - NVCollapsingBarProps(const PropsParserContext& context, const NVCollapsingBarProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - std::string title{}; - std::string titleFontFamily{}; - std::string titleFontWeight{}; - std::string titleFontStyle{}; - std::string largeTitleFontFamily{}; - std::string largeTitleFontWeight{}; - std::string largeTitleFontStyle{}; - bool titleEnabled{false}; - std::string titleCollapseMode{}; - SharedColor contentScrimColor{}; - SharedColor collapsedTitleColor{}; - SharedColor expandedTitleColor{}; -}; - -class JSI_EXPORT NVCoordinatorLayoutProps final : public ViewProps { - public: - NVCoordinatorLayoutProps() = default; - NVCoordinatorLayoutProps(const PropsParserContext& context, const NVCoordinatorLayoutProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - int overlap{0}; -}; - -class JSI_EXPORT NVExtendedFloatingActionButtonProps final : public ViewProps { - public: - NVExtendedFloatingActionButtonProps() = default; - NVExtendedFloatingActionButtonProps(const PropsParserContext& context, const NVExtendedFloatingActionButtonProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - ImageSource image{}; - std::string text{}; - std::string gravity{}; - std::string anchor{}; - std::string anchorGravity{}; - std::string contentDescription{}; - std::string testID{}; - SharedColor fabColor{}; - SharedColor fabBackgroundColor{}; - SharedColor rippleColor{}; - int fabMarginTop{0}; - int fabMarginRight{0}; - int fabMarginBottom{0}; - int fabMarginLeft{0}; - int fabMarginStart{0}; - int fabMarginEnd{0}; - int fabMargin{0}; - std::string fabFontFamily{}; - std::string fabFontWeight{}; - std::string fabFontStyle{}; - Float fabFontSize{-1.0}; -}; - -class JSI_EXPORT NVFloatingActionButtonProps final : public ViewProps { - public: - NVFloatingActionButtonProps() = default; - NVFloatingActionButtonProps(const PropsParserContext& context, const NVFloatingActionButtonProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - ImageSource image{}; - std::string gravity{}; - std::string anchor{}; - std::string anchorGravity{}; - int size{0}; - std::string contentDescription{}; - std::string testID{}; - SharedColor fabColor{}; - SharedColor fabBackgroundColor{}; - SharedColor rippleColor{}; - int fabMarginTop{0}; - int fabMarginRight{0}; - int fabMarginBottom{0}; - int fabMarginLeft{0}; - int fabMarginStart{0}; - int fabMarginEnd{0}; - int fabMargin{0}; - int fabElevation{0}; -}; - -class JSI_EXPORT NVLeftBarProps final : public ViewProps { - public: - NVLeftBarProps() = default; - NVLeftBarProps(const PropsParserContext& context, const NVLeftBarProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - bool supplementBack{false}; -}; - -class JSI_EXPORT NVNavigationBarProps final : public ViewProps { - public: - NVNavigationBarProps() = default; - NVNavigationBarProps(const PropsParserContext& context, const NVNavigationBarProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - bool hidden{false}; - bool largeTitle{false}; - std::string title{}; - std::string titleFontFamily{}; - std::string titleFontWeight{}; - std::string titleFontStyle{}; - Float titleFontSize{-1.0}; - std::string largeTitleFontFamily{}; - std::string largeTitleFontWeight{}; - std::string largeTitleFontStyle{}; - Float largeTitleFontSize{-1.0}; - std::string backFontFamily{}; - std::string backFontWeight{}; - std::string backFontStyle{}; - Float backFontSize{-1.0}; - SharedColor barTintColor{}; - SharedColor largeBarTintColor{}; - SharedColor tintColor{}; - SharedColor titleColor{}; - SharedColor largeTitleColor{}; - std::string backTitle{}; - bool backTitleOn{false}; - std::string backTestID{}; - double barHeight{0.0}; -}; - -class JSI_EXPORT NVNavigationStackProps final : public ViewProps { - public: - NVNavigationStackProps() = default; - NVNavigationStackProps(const PropsParserContext& context, const NVNavigationStackProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - std::vector keys{}; - std::string enterAnim{}; - std::string exitAnim{}; - bool enterAnimOff{false}; - std::string sharedElement{}; - std::string oldSharedElement{}; - int mostRecentEventCount{0}; -}; - -class JSI_EXPORT NVRightBarProps final : public ViewProps { - public: - NVRightBarProps() = default; - NVRightBarProps(const PropsParserContext& context, const NVRightBarProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - -}; - -class JSI_EXPORT NVSceneProps final : public ViewProps { - public: - NVSceneProps() = default; - NVSceneProps(const PropsParserContext& context, const NVSceneProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - std::string sceneKey{}; - int crumb{0}; - std::string title{}; - std::string enterAnim{}; - std::string exitAnim{}; - bool hidesTabBar{false}; -}; - -class JSI_EXPORT NVSearchBarProps final : public ViewProps { - public: - NVSearchBarProps() = default; - NVSearchBarProps(const PropsParserContext& context, const NVSearchBarProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - bool obscureBackground{false}; - bool hideNavigationBar{false}; - bool hideWhenScrolling{false}; - std::string autoCapitalize{}; - std::string placeholder{}; - std::string text{}; - int mostRecentEventCount{0}; - int mostRecentButtonEventCount{0}; - SharedColor barTintColor{}; - bool bottomBar{false}; - int scopeButton{0}; - std::vector scopeButtons{}; -}; - -class JSI_EXPORT NVSegmentedTabProps final : public ViewProps { - public: - NVSegmentedTabProps() = default; - NVSegmentedTabProps(const PropsParserContext& context, const NVSegmentedTabProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - SharedColor backgroundColor{}; - SharedColor selectedTintColor{}; - SharedColor unselectedTintColor{}; - std::vector titles{}; - std::vector testIDs{}; - std::string fontFamily{}; - std::string fontWeight{}; - std::string fontStyle{}; - Float fontSize{-1.0}; -}; - -class JSI_EXPORT NVSharedElementProps final : public ViewProps { - public: - NVSharedElementProps() = default; - NVSharedElementProps(const PropsParserContext& context, const NVSharedElementProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - std::string name{}; - int duration{-1}; - std::string fadeMode{}; -}; - -class JSI_EXPORT NVStatusBarProps final : public ViewProps { - public: - NVStatusBarProps() = default; - NVStatusBarProps(const PropsParserContext& context, const NVStatusBarProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - bool hidden{false}; - std::string tintStyle{}; - SharedColor barTintColor{}; -}; - -class JSI_EXPORT NVTabBarItemProps final : public ViewProps { - public: - NVTabBarItemProps() = default; - NVTabBarItemProps(const PropsParserContext& context, const NVTabBarItemProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - std::string title{}; - std::string fontFamily{}; - std::string fontWeight{}; - std::string fontStyle{}; - Float fontSize{-1.0}; - std::string testID{}; - std::string badge{}; - SharedColor badgeColor{}; - ImageSource image{}; - std::string systemItem{}; -}; - -class JSI_EXPORT NVTabBarProps final : public ViewProps { - public: - NVTabBarProps() = default; - NVTabBarProps(const PropsParserContext& context, const NVTabBarProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - int tabCount{0}; - int selectedTab{0}; - SharedColor barTintColor{}; - SharedColor selectedTintColor{}; - SharedColor unselectedTintColor{}; - SharedColor badgeColor{}; - bool scrollsToTop{false}; - std::string fontFamily{}; - std::string fontWeight{}; - std::string fontStyle{}; - Float fontSize{-1.0}; - int mostRecentEventCount{0}; -}; - -class JSI_EXPORT NVTabBarPagerProps final : public ViewProps { - public: - NVTabBarPagerProps() = default; - NVTabBarPagerProps(const PropsParserContext& context, const NVTabBarPagerProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - int tabCount{0}; - int selectedTab{0}; - bool scrollsToTop{false}; - int mostRecentEventCount{0}; -}; - -class JSI_EXPORT NVTabBarPagerRTLProps final : public ViewProps { - public: - NVTabBarPagerRTLProps() = default; - NVTabBarPagerRTLProps(const PropsParserContext& context, const NVTabBarPagerRTLProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - int tabCount{0}; - int selectedTab{0}; - bool scrollsToTop{false}; - int mostRecentEventCount{0}; -}; - -class JSI_EXPORT NVTabLayoutProps final : public ViewProps { - public: - NVTabLayoutProps() = default; - NVTabLayoutProps(const PropsParserContext& context, const NVTabLayoutProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - SharedColor selectedTintColor{}; - SharedColor unselectedTintColor{}; - SharedColor rippleColor{}; - bool bottomTabs{false}; - bool selectedIndicatorAtTop{false}; - bool scrollable{false}; -}; - -class JSI_EXPORT NVTabLayoutRTLProps final : public ViewProps { - public: - NVTabLayoutRTLProps() = default; - NVTabLayoutRTLProps(const PropsParserContext& context, const NVTabLayoutRTLProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - SharedColor selectedTintColor{}; - SharedColor unselectedTintColor{}; - SharedColor rippleColor{}; - bool selectedIndicatorAtTop{false}; - bool scrollable{false}; -}; - -class JSI_EXPORT NVTabNavigationProps final : public ViewProps { - public: - NVTabNavigationProps() = default; - NVTabNavigationProps(const PropsParserContext& context, const NVTabNavigationProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - SharedColor selectedTintColor{}; - SharedColor unselectedTintColor{}; - bool bottomTabs{false}; - bool itemHorizontalTranslation{false}; - int labelVisibilityMode{0}; - SharedColor activeIndicatorColor{}; - SharedColor rippleColor{}; -}; - -class JSI_EXPORT NVTitleBarProps final : public ViewProps { - public: - NVTitleBarProps() = default; - NVTitleBarProps(const PropsParserContext& context, const NVTitleBarProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - -}; - -class JSI_EXPORT NVToolbarProps final : public ViewProps { - public: - NVToolbarProps() = default; - NVToolbarProps(const PropsParserContext& context, const NVToolbarProps &sourceProps, const RawProps &rawProps); - -#pragma mark - Props - - std::string title{}; - std::string titleFontFamily{}; - std::string titleFontWeight{}; - std::string titleFontStyle{}; - Float titleFontSize{-1.0}; - bool titleCentered{false}; - SharedColor barTintColor{}; - SharedColor tintColor{}; - SharedColor titleColor{}; - ImageSource navigationImage{}; - std::string navigationTestID{}; - std::string navigationAccessibilityLabel{}; - ImageSource logo{}; - ImageSource overflowImage{}; - std::string overflowTestID{}; - bool pin{false}; - double barHeight{0.0}; -}; - -} // namespace react -} // namespace facebook diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/ShadowNodes.cpp b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/ShadowNodes.cpp deleted file mode 100644 index 26d6d5c9b4..0000000000 --- a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/ShadowNodes.cpp +++ /dev/null @@ -1,39 +0,0 @@ - -/** - * 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 - -namespace facebook { -namespace react { - -extern const char NVBottomAppBarComponentName[] = "NVBottomAppBar"; -extern const char NVBottomSheetComponentName[] = "NVBottomSheet"; -extern const char NVCollapsingBarComponentName[] = "NVCollapsingBar"; -extern const char NVCoordinatorLayoutComponentName[] = "NVCoordinatorLayout"; -extern const char NVExtendedFloatingActionButtonComponentName[] = "NVExtendedFloatingActionButton"; -extern const char NVFloatingActionButtonComponentName[] = "NVFloatingActionButton"; -extern const char NVLeftBarComponentName[] = "NVLeftBar"; -extern const char NVNavigationBarComponentName[] = "NVNavigationBar"; -extern const char NVNavigationStackComponentName[] = "NVNavigationStack"; -extern const char NVRightBarComponentName[] = "NVRightBar"; -extern const char NVSceneComponentName[] = "NVScene"; -extern const char NVSegmentedTabComponentName[] = "NVSegmentedTab"; -extern const char NVSharedElementComponentName[] = "NVSharedElement"; -extern const char NVStatusBarComponentName[] = "NVStatusBar"; -extern const char NVTabBarComponentName[] = "NVTabBar"; -extern const char NVTabBarPagerComponentName[] = "NVTabBarPager"; -extern const char NVTabBarPagerRTLComponentName[] = "NVTabBarPagerRTL"; -extern const char NVTabLayoutComponentName[] = "NVTabLayout"; -extern const char NVTabLayoutRTLComponentName[] = "NVTabLayoutRTL"; -extern const char NVTabNavigationComponentName[] = "NVTabNavigation"; -extern const char NVToolbarComponentName[] = "NVToolbar"; - -} // namespace react -} // namespace facebook diff --git a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/ShadowNodes.h b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/ShadowNodes.h deleted file mode 100644 index 77b4b3ed9e..0000000000 --- a/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/ShadowNodes.h +++ /dev/null @@ -1,219 +0,0 @@ - -/** - * 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 -#include - -namespace facebook { -namespace react { - -JSI_EXPORT extern const char NVBottomAppBarComponentName[]; - -/* - * `ShadowNode` for component. - */ -using NVBottomAppBarShadowNode = ConcreteViewShadowNode< - NVBottomAppBarComponentName, - NVBottomAppBarProps, -NVBottomAppBarEventEmitter>; - -JSI_EXPORT extern const char NVBottomSheetComponentName[]; - -/* - * `ShadowNode` for component. - */ -using NVBottomSheetShadowNode = ConcreteViewShadowNode< - NVBottomSheetComponentName, - NVBottomSheetProps, -NVBottomSheetEventEmitter>; - -JSI_EXPORT extern const char NVCollapsingBarComponentName[]; - -/* - * `ShadowNode` for component. - */ -using NVCollapsingBarShadowNode = ConcreteViewShadowNode< - NVCollapsingBarComponentName, - NVCollapsingBarProps>; - -JSI_EXPORT extern const char NVCoordinatorLayoutComponentName[]; - -/* - * `ShadowNode` for component. - */ -using NVCoordinatorLayoutShadowNode = ConcreteViewShadowNode< - NVCoordinatorLayoutComponentName, - NVCoordinatorLayoutProps>; - -JSI_EXPORT extern const char NVExtendedFloatingActionButtonComponentName[]; - -/* - * `ShadowNode` for component. - */ -using NVExtendedFloatingActionButtonShadowNode = ConcreteViewShadowNode< - NVExtendedFloatingActionButtonComponentName, - NVExtendedFloatingActionButtonProps>; - -JSI_EXPORT extern const char NVFloatingActionButtonComponentName[]; - -/* - * `ShadowNode` for component. - */ -using NVFloatingActionButtonShadowNode = ConcreteViewShadowNode< - NVFloatingActionButtonComponentName, - NVFloatingActionButtonProps>; - -JSI_EXPORT extern const char NVLeftBarComponentName[]; - -/* - * `ShadowNode` for component. - */ -using NVLeftBarShadowNode = ConcreteViewShadowNode< - NVLeftBarComponentName, - NVLeftBarProps>; - -JSI_EXPORT extern const char NVNavigationBarComponentName[]; - -/* - * `ShadowNode` for component. - */ -using NVNavigationBarShadowNode = ConcreteViewShadowNode< - NVNavigationBarComponentName, - NVNavigationBarProps>; - -JSI_EXPORT extern const char NVNavigationStackComponentName[]; - -/* - * `ShadowNode` for component. - */ -using NVNavigationStackShadowNode = ConcreteViewShadowNode< - NVNavigationStackComponentName, - NVNavigationStackProps, -NVNavigationStackEventEmitter>; - -JSI_EXPORT extern const char NVRightBarComponentName[]; - -/* - * `ShadowNode` for component. - */ -using NVRightBarShadowNode = ConcreteViewShadowNode< - NVRightBarComponentName, - NVRightBarProps>; - -JSI_EXPORT extern const char NVSceneComponentName[]; - -/* - * `ShadowNode` for component. - */ -using NVSceneShadowNode = ConcreteViewShadowNode< - NVSceneComponentName, - NVSceneProps, -NVSceneEventEmitter>; - -JSI_EXPORT extern const char NVSegmentedTabComponentName[]; - -/* - * `ShadowNode` for component. - */ -using NVSegmentedTabShadowNode = ConcreteViewShadowNode< - NVSegmentedTabComponentName, - NVSegmentedTabProps>; - -JSI_EXPORT extern const char NVSharedElementComponentName[]; - -/* - * `ShadowNode` for component. - */ -using NVSharedElementShadowNode = ConcreteViewShadowNode< - NVSharedElementComponentName, - NVSharedElementProps>; - -JSI_EXPORT extern const char NVStatusBarComponentName[]; - -/* - * `ShadowNode` for component. - */ -using NVStatusBarShadowNode = ConcreteViewShadowNode< - NVStatusBarComponentName, - NVStatusBarProps>; - -JSI_EXPORT extern const char NVTabBarComponentName[]; - -/* - * `ShadowNode` for component. - */ -using NVTabBarShadowNode = ConcreteViewShadowNode< - NVTabBarComponentName, - NVTabBarProps, -NVTabBarEventEmitter>; - -JSI_EXPORT extern const char NVTabBarPagerComponentName[]; - -/* - * `ShadowNode` for component. - */ -using NVTabBarPagerShadowNode = ConcreteViewShadowNode< - NVTabBarPagerComponentName, - NVTabBarPagerProps, -NVTabBarPagerEventEmitter>; - -JSI_EXPORT extern const char NVTabBarPagerRTLComponentName[]; - -/* - * `ShadowNode` for component. - */ -using NVTabBarPagerRTLShadowNode = ConcreteViewShadowNode< - NVTabBarPagerRTLComponentName, - NVTabBarPagerRTLProps, -NVTabBarPagerRTLEventEmitter>; - -JSI_EXPORT extern const char NVTabLayoutComponentName[]; - -/* - * `ShadowNode` for component. - */ -using NVTabLayoutShadowNode = ConcreteViewShadowNode< - NVTabLayoutComponentName, - NVTabLayoutProps>; - -JSI_EXPORT extern const char NVTabLayoutRTLComponentName[]; - -/* - * `ShadowNode` for component. - */ -using NVTabLayoutRTLShadowNode = ConcreteViewShadowNode< - NVTabLayoutRTLComponentName, - NVTabLayoutRTLProps>; - -JSI_EXPORT extern const char NVTabNavigationComponentName[]; - -/* - * `ShadowNode` for component. - */ -using NVTabNavigationShadowNode = ConcreteViewShadowNode< - NVTabNavigationComponentName, - NVTabNavigationProps>; - -JSI_EXPORT extern const char NVToolbarComponentName[]; - -/* - * `ShadowNode` for component. - */ -using NVToolbarShadowNode = ConcreteViewShadowNode< - NVToolbarComponentName, - NVToolbarProps, -NVToolbarEventEmitter>; - -} // namespace react -} // namespace facebook From a8261fe6c7f63a0f14e4569d23d08da5e68d073a Mon Sep 17 00:00:00 2001 From: Graham Mendick Date: Sun, 18 Sep 2022 09:48:52 +0100 Subject: [PATCH 16/21] Removed redundant section Copied this over from react native screens example but isn't necessary --- NavigationReactNative/src/cpp/CMakeLists.txt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/NavigationReactNative/src/cpp/CMakeLists.txt b/NavigationReactNative/src/cpp/CMakeLists.txt index 6100de65cb..ad80bb5cd6 100644 --- a/NavigationReactNative/src/cpp/CMakeLists.txt +++ b/NavigationReactNative/src/cpp/CMakeLists.txt @@ -51,9 +51,3 @@ target_compile_options( -std=c++17 -Wall ) - -target_include_directories( - ${CMAKE_PROJECT_NAME} - PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR} -) From 777d18019a22e92ec5c03022dddd2ce74ab2f68a Mon Sep 17 00:00:00 2001 From: Graham Mendick Date: Sun, 18 Sep 2022 09:52:09 +0100 Subject: [PATCH 17/21] Pointed at generated modules instead of copying This matches approach for generated components --- NavigationReactNative/src/cpp/CMakeLists.txt | 2 +- .../src/cpp/navigationreactnative.cpp | 34 ------------------- .../src/cpp/navigationreactnative.h | 33 ------------------ 3 files changed, 1 insertion(+), 68 deletions(-) delete mode 100644 NavigationReactNative/src/cpp/navigationreactnative.cpp delete mode 100644 NavigationReactNative/src/cpp/navigationreactnative.h diff --git a/NavigationReactNative/src/cpp/CMakeLists.txt b/NavigationReactNative/src/cpp/CMakeLists.txt index ad80bb5cd6..6d8a0c5f37 100644 --- a/NavigationReactNative/src/cpp/CMakeLists.txt +++ b/NavigationReactNative/src/cpp/CMakeLists.txt @@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) -file(GLOB react_codegen_SRCS CONFIGURE_DEPENDS *.cpp react/renderer/components/navigationreactnative/*.cpp ../android/build/generated/source/codegen/jni/react/renderer/components/navigationreactnative/*.cpp) +file(GLOB react_codegen_SRCS CONFIGURE_DEPENDS react/renderer/components/navigationreactnative/*.cpp ../android/build/generated/source/codegen/jni/*.cpp ../android/build/generated/source/codegen/jni/react/renderer/components/navigationreactnative/*.cpp) add_library( react_codegen_navigationreactnative diff --git a/NavigationReactNative/src/cpp/navigationreactnative.cpp b/NavigationReactNative/src/cpp/navigationreactnative.cpp deleted file mode 100644 index b926a07793..0000000000 --- a/NavigationReactNative/src/cpp/navigationreactnative.cpp +++ /dev/null @@ -1,34 +0,0 @@ - -/** - * 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: GenerateModuleJniCpp.js - */ - -#include "navigationreactnative.h" - -namespace facebook { -namespace react { - -static facebook::jsi::Value __hostFunction_NativeMaterial3ModuleSpecJSI_getConstants(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) { - static jmethodID cachedMethodId = nullptr; - return static_cast(turboModule).invokeJavaMethod(rt, ObjectKind, "getConstants", "()Ljava/util/Map;", args, count, cachedMethodId); -} - -NativeMaterial3ModuleSpecJSI::NativeMaterial3ModuleSpecJSI(const JavaTurboModule::InitParams ¶ms) - : JavaTurboModule(params) { - methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeMaterial3ModuleSpecJSI_getConstants}; -} - -std::shared_ptr navigationreactnative_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms) { - if (moduleName == "Material3") { - return std::make_shared(params); - } - return nullptr; -} - -} // namespace react -} // namespace facebook diff --git a/NavigationReactNative/src/cpp/navigationreactnative.h b/NavigationReactNative/src/cpp/navigationreactnative.h deleted file mode 100644 index 929fb9150d..0000000000 --- a/NavigationReactNative/src/cpp/navigationreactnative.h +++ /dev/null @@ -1,33 +0,0 @@ - -/** - * 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: GenerateModuleJniH.js - */ - -#pragma once - -#include -#include -#include - -namespace facebook { -namespace react { - -/** - * JNI C++ class for module 'NativeMaterial3Module' - */ -class JSI_EXPORT NativeMaterial3ModuleSpecJSI : public JavaTurboModule { -public: - NativeMaterial3ModuleSpecJSI(const JavaTurboModule::InitParams ¶ms); -}; - - -JSI_EXPORT -std::shared_ptr navigationreactnative_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms); - -} // namespace react -} // namespace facebook From 20addabf5b5fa883c497492aea5e1aa381d12dc5 Mon Sep 17 00:00:00 2001 From: Graham Mendick Date: Sun, 18 Sep 2022 09:54:35 +0100 Subject: [PATCH 18/21] Removed redundant directory The current directory has no relevant cpp files - they're now all in react/renderer/components/navigationreactnative --- NavigationReactNative/src/cpp/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/NavigationReactNative/src/cpp/CMakeLists.txt b/NavigationReactNative/src/cpp/CMakeLists.txt index 6d8a0c5f37..7983f78f3c 100644 --- a/NavigationReactNative/src/cpp/CMakeLists.txt +++ b/NavigationReactNative/src/cpp/CMakeLists.txt @@ -17,7 +17,6 @@ add_library( target_include_directories( react_codegen_navigationreactnative PUBLIC - . react/renderer/components/navigationreactnative ../android/build/generated/source/codegen/jni ../android/build/generated/source/codegen/jni/react/renderer/components/navigationreactnative From 18382362ac7c9d9e4a74fb4a43b6abead2ca2252 Mon Sep 17 00:00:00 2001 From: Graham Mendick Date: Sun, 18 Sep 2022 09:57:14 +0100 Subject: [PATCH 19/21] Tweaked format --- NavigationReactNative/src/cpp/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/NavigationReactNative/src/cpp/CMakeLists.txt b/NavigationReactNative/src/cpp/CMakeLists.txt index 7983f78f3c..f33796f46d 100644 --- a/NavigationReactNative/src/cpp/CMakeLists.txt +++ b/NavigationReactNative/src/cpp/CMakeLists.txt @@ -6,7 +6,12 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) -file(GLOB react_codegen_SRCS CONFIGURE_DEPENDS react/renderer/components/navigationreactnative/*.cpp ../android/build/generated/source/codegen/jni/*.cpp ../android/build/generated/source/codegen/jni/react/renderer/components/navigationreactnative/*.cpp) +file( + GLOB react_codegen_SRCS CONFIGURE_DEPENDS + react/renderer/components/navigationreactnative/*.cpp + ../android/build/generated/source/codegen/jni/*.cpp + ../android/build/generated/source/codegen/jni/react/renderer/components/navigationreactnative/*.cpp +) add_library( react_codegen_navigationreactnative From 2adf3eb2a9258a16bede4cb5f38370bf0e99578c Mon Sep 17 00:00:00 2001 From: Graham Mendick Date: Sun, 18 Sep 2022 10:27:19 +0100 Subject: [PATCH 20/21] Tweaked format --- NavigationReactNative/src/android/build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/NavigationReactNative/src/android/build.gradle b/NavigationReactNative/src/android/build.gradle index e7df8a16df..ff1fbdd228 100644 --- a/NavigationReactNative/src/android/build.gradle +++ b/NavigationReactNative/src/android/build.gradle @@ -64,3 +64,4 @@ dependencies { implementation 'com.google.android.material:material:1.6.1' implementation 'androidx.viewpager2:viewpager2:1.0.0' } + From 159a56ecf6ee493dd697a378e1fc6be7443ab62f Mon Sep 17 00:00:00 2001 From: Graham Mendick Date: Sun, 18 Sep 2022 12:16:18 +0100 Subject: [PATCH 21/21] Got it working on android and ios!! Still copying code from react native screens example https://github.com/reactwg/react-native-new-architecture/discussions/71#discussioncomment-3656196 Couldn't work out how to get the ComponentDescriptor in the generated rncli.cpp because it only includes ComponentDescriptors.h. Noticed it also includes navigationreactnative.h - so the trick is to include the hand-written descriptors in that file!! React native screens did this just didn't notice or realise what it was for. It's very sneaky! This allows it to work on android and ios!! And with lower maintenance because not copying over hand-generated - apart from navigationreactnative.h and .cpp. Had to exclude these files from the podspec otherwise doesn't build on ios --- NavigationReactNative/src/cpp/CMakeLists.txt | 3 +- .../src/cpp/navigationreactnative.cpp | 34 +++++++++++++++++ .../src/cpp/navigationreactnative.h | 38 +++++++++++++++++++ .../src/react-native.config.js | 2 +- .../navigation-react-native.podspec | 2 +- 5 files changed, 76 insertions(+), 3 deletions(-) create mode 100644 NavigationReactNative/src/cpp/navigationreactnative.cpp create mode 100644 NavigationReactNative/src/cpp/navigationreactnative.h diff --git a/NavigationReactNative/src/cpp/CMakeLists.txt b/NavigationReactNative/src/cpp/CMakeLists.txt index f33796f46d..67dbaa8911 100644 --- a/NavigationReactNative/src/cpp/CMakeLists.txt +++ b/NavigationReactNative/src/cpp/CMakeLists.txt @@ -8,8 +8,8 @@ set(CMAKE_VERBOSE_MAKEFILE on) file( GLOB react_codegen_SRCS CONFIGURE_DEPENDS + *.cpp react/renderer/components/navigationreactnative/*.cpp - ../android/build/generated/source/codegen/jni/*.cpp ../android/build/generated/source/codegen/jni/react/renderer/components/navigationreactnative/*.cpp ) @@ -22,6 +22,7 @@ add_library( target_include_directories( react_codegen_navigationreactnative PUBLIC + . react/renderer/components/navigationreactnative ../android/build/generated/source/codegen/jni ../android/build/generated/source/codegen/jni/react/renderer/components/navigationreactnative diff --git a/NavigationReactNative/src/cpp/navigationreactnative.cpp b/NavigationReactNative/src/cpp/navigationreactnative.cpp new file mode 100644 index 0000000000..b926a07793 --- /dev/null +++ b/NavigationReactNative/src/cpp/navigationreactnative.cpp @@ -0,0 +1,34 @@ + +/** + * 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: GenerateModuleJniCpp.js + */ + +#include "navigationreactnative.h" + +namespace facebook { +namespace react { + +static facebook::jsi::Value __hostFunction_NativeMaterial3ModuleSpecJSI_getConstants(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) { + static jmethodID cachedMethodId = nullptr; + return static_cast(turboModule).invokeJavaMethod(rt, ObjectKind, "getConstants", "()Ljava/util/Map;", args, count, cachedMethodId); +} + +NativeMaterial3ModuleSpecJSI::NativeMaterial3ModuleSpecJSI(const JavaTurboModule::InitParams ¶ms) + : JavaTurboModule(params) { + methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeMaterial3ModuleSpecJSI_getConstants}; +} + +std::shared_ptr navigationreactnative_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms) { + if (moduleName == "Material3") { + return std::make_shared(params); + } + return nullptr; +} + +} // namespace react +} // namespace facebook diff --git a/NavigationReactNative/src/cpp/navigationreactnative.h b/NavigationReactNative/src/cpp/navigationreactnative.h new file mode 100644 index 0000000000..c0397c6b58 --- /dev/null +++ b/NavigationReactNative/src/cpp/navigationreactnative.h @@ -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: GenerateModuleJniH.js + */ + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace facebook { +namespace react { + +/** + * JNI C++ class for module 'NativeMaterial3Module' + */ +class JSI_EXPORT NativeMaterial3ModuleSpecJSI : public JavaTurboModule { +public: + NativeMaterial3ModuleSpecJSI(const JavaTurboModule::InitParams ¶ms); +}; + + +JSI_EXPORT +std::shared_ptr navigationreactnative_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms); + +} // namespace react +} // namespace facebook diff --git a/NavigationReactNative/src/react-native.config.js b/NavigationReactNative/src/react-native.config.js index 1ce6aed4f4..cf1f24147e 100644 --- a/NavigationReactNative/src/react-native.config.js +++ b/NavigationReactNative/src/react-native.config.js @@ -27,7 +27,7 @@ module.exports = { 'NVTitleBarComponentDescriptor', 'NVToolbarComponentDescriptor', ], - androidMkPath: "../cpp/Android.mk" + cmakeListsPath: "../cpp/CMakeLists.txt" }, }, }, diff --git a/build/npm/navigation-react-native/navigation-react-native.podspec b/build/npm/navigation-react-native/navigation-react-native.podspec index 8ccdea1c2d..1cea8fbbae 100644 --- a/build/npm/navigation-react-native/navigation-react-native.podspec +++ b/build/npm/navigation-react-native/navigation-react-native.podspec @@ -12,7 +12,7 @@ Pod::Spec.new do |spec| spec.source_files = "ios/**/*.{h,m,mm}" spec.dependency "React-Core" if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then - spec.source_files = "ios/**/*.{h,m,mm}", "cpp/**/*.{h,cpp}" + spec.source_files = "ios/**/*.{h,m,mm}", "cpp/react/**/*.{h,cpp}" spec.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1" spec.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",