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/android/build.gradle b/NavigationReactNative/src/android/build.gradle index 3dcd4d1ffd..ff1fbdd228 100644 --- a/NavigationReactNative/src/android/build.gradle +++ b/NavigationReactNative/src/android/build.gradle @@ -65,10 +65,3 @@ dependencies { implementation 'androidx.viewpager2:viewpager2:1.0.0' } -if (isNewArchitectureEnabled()) { - react { - jsRootDir = file("../") - libraryName = "navigation-react-native" - codegenJavaPackageName = "com.navigation.reactnative" - } -} \ No newline at end of file diff --git a/NavigationReactNative/src/cpp/CMakeLists.txt b/NavigationReactNative/src/cpp/CMakeLists.txt new file mode 100644 index 0000000000..67dbaa8911 --- /dev/null +++ b/NavigationReactNative/src/cpp/CMakeLists.txt @@ -0,0 +1,58 @@ +# 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 + *.cpp + react/renderer/components/navigationreactnative/*.cpp + ../android/build/generated/source/codegen/jni/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 + ../android/build/generated/source/codegen/jni + ../android/build/generated/source/codegen/jni/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 + react_render_mapbuffer + react_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 +) 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/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 71% rename from NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVActionBarShadowNode.h rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarShadowNode.h index 53e322a763..9bc126eee7 100644 --- a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVActionBarShadowNode.h +++ b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarShadowNode.h @@ -1,16 +1,16 @@ #pragma once #include "NVActionBarState.h" -#include -#include +#include +#include #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/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 95% rename from NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVActionBarState.h rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVActionBarState.h index 064b03e7a7..990b85742d 100644 --- a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/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/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 82% rename from NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVBarButtonShadowNode.h rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonShadowNode.h index 531eb76503..bc589f9069 100644 --- a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVBarButtonShadowNode.h +++ b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVBarButtonShadowNode.h @@ -2,16 +2,16 @@ #include "NVBarButtonState.h" #include -#include -#include +#include +#include #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/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 71% rename from NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVSearchBarShadowNode.h rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarShadowNode.h index e6bf5aac52..e5a30316b2 100644 --- a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVSearchBarShadowNode.h +++ b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarShadowNode.h @@ -1,16 +1,16 @@ #pragma once #include "NVSearchBarState.h" -#include -#include +#include +#include #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/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 95% rename from NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVSearchBarState.h rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVSearchBarState.h index 5e3cc2423c..ae746281f9 100644 --- a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/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/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 82% rename from NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVTabBarItemShadowNode.h rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemShadowNode.h index 06af70ed9f..e8153bdee4 100644 --- a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVTabBarItemShadowNode.h +++ b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTabBarItemShadowNode.h @@ -2,16 +2,16 @@ #include "NVTabBarItemState.h" #include -#include -#include +#include +#include #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/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 71% rename from NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVTitleBarShadowNode.h rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarShadowNode.h index b54351d758..3b4e1c3eac 100644 --- a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVTitleBarShadowNode.h +++ b/NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarShadowNode.h @@ -1,16 +1,16 @@ #pragma once #include "NVTitleBarState.h" -#include -#include +#include +#include #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/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 95% rename from NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/NVTitleBarState.h rename to NavigationReactNative/src/cpp/react/renderer/components/navigationreactnative/NVTitleBarState.h index 5a041b7125..269cfd8df7 100644 --- a/NavigationReactNative/src/cpp/react/renderer/components/navigation-react-native/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/ios/NVActionBarComponentView.mm b/NavigationReactNative/src/ios/NVActionBarComponentView.mm index ca823faca4..c2b58d5652 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..9d75bc96cd 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..b84617e7ea 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..ab527d8012 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..dbeb485d36 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/NavigationReactNative/src/react-native.config.js b/NavigationReactNative/src/react-native.config.js new file mode 100644 index 0000000000..cf1f24147e --- /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', + ], + cmakeListsPath: "../cpp/CMakeLists.txt" + }, + }, + }, +}; \ No newline at end of file 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\"", diff --git a/build/npm/navigation-react-native/package.json b/build/npm/navigation-react-native/package.json index 2385541f81..0bef58c5f3 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": "navigation-react-native", - "type": "all", - "jsSrcsDir": "." + "name": "navigationreactnative", + "type": "all", + "jsSrcsDir": ".", + "android": { + "javaPackageName": "com.navigation.reactnative" } - ] }, "author": "Graham Mendick", "license": "Apache-2.0", 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')); };