diff --git a/FabricExample/ios/Podfile.lock b/FabricExample/ios/Podfile.lock index d9b523d4a0..423d50c2a8 100644 --- a/FabricExample/ios/Podfile.lock +++ b/FabricExample/ios/Podfile.lock @@ -3117,7 +3117,7 @@ SPEC CHECKSUMS: React-microtasksnativemodule: 44b44a4d3cd6ffb85d928abf741acdc26722de2e react-native-advanced-input-mask: 7e8cb58287774c4447485387661abe946d0e0bb2 react-native-blur: ba0e9ad6274783c8d45f42da82acae02e25784ad - react-native-keyboard-controller: 81aa9e5784da51c8855759b6d17d5d897ccaa0e4 + react-native-keyboard-controller: 59e99eb52537287dfc11621263d75b0645120264 react-native-safe-area-context: 6d8a7b750e496e37bda47c938320bf2c734d441f React-NativeModulesApple: b5d18bc109c45c9a1c6b71664991b5cc3adc4e48 React-oscompat: 93b5535ea7f7dff46aaee4f78309a70979bdde9d diff --git a/android/src/main/jni/CMakeLists.txt b/android/src/main/jni/CMakeLists.txt index 9cf1a7ddfd..e1a19eeb15 100644 --- a/android/src/main/jni/CMakeLists.txt +++ b/android/src/main/jni/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE ON) -set(LIB_LITERAL reactnativekeyboardcontroller) +set(LIB_LITERAL keyboardcontroller) set(LIB_TARGET_NAME react_codegen_${LIB_LITERAL}) set(LIB_ANDROID_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../..) diff --git a/android/src/main/jni/keyboardcontroller.h b/android/src/main/jni/keyboardcontroller.h new file mode 100644 index 0000000000..499f624b52 --- /dev/null +++ b/android/src/main/jni/keyboardcontroller.h @@ -0,0 +1,24 @@ +#pragma once + +#include +#include +#include + +/** + * Note this import and that it is not present in autogenerated header file + * under android/build/generated/source/codegen/jni/keyboardcontroller.h + * + * Here we are overriding autogenerated component descriptors by prioritizing our custom headers via include path setup. + */ +#include +#include +#include +#include + +#include +#include + +namespace facebook::react { + JSI_EXPORT + std::shared_ptr keyboardcontroller_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms); +} // namespace facebook::react diff --git a/android/src/main/jni/reactnativekeyboardcontroller.h b/android/src/main/jni/reactnativekeyboardcontroller.h deleted file mode 100644 index 1b317bf07d..0000000000 --- a/android/src/main/jni/reactnativekeyboardcontroller.h +++ /dev/null @@ -1,24 +0,0 @@ -#pragma once - -#include -#include -#include - -/** - * Note this import and that it is not present in autogenerated header file - * under android/build/generated/source/codegen/jni/reactnativekeyboardcontroller.h - * - * Here we are overriding autogenerated component descriptors by prioritizing our custom headers via include path setup. - */ -#include -#include -#include -#include - -#include -#include - -namespace facebook::react { -JSI_EXPORT -std::shared_ptr reactnativekeyboardcontroller_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms); -} // namespace facebook::react diff --git a/common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardBackgroundViewComponentDescriptor.h b/common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardBackgroundViewComponentDescriptor.h similarity index 90% rename from common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardBackgroundViewComponentDescriptor.h rename to common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardBackgroundViewComponentDescriptor.h index ff9703abfc..f30b2cf7a9 100644 --- a/common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardBackgroundViewComponentDescriptor.h +++ b/common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardBackgroundViewComponentDescriptor.h @@ -10,7 +10,7 @@ #include "RNKCKeyboardBackgroundViewShadowNode.h" #include -#include +#include #include namespace facebook::react { diff --git a/common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardBackgroundViewShadowNode.cpp b/common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardBackgroundViewShadowNode.cpp similarity index 100% rename from common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardBackgroundViewShadowNode.cpp rename to common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardBackgroundViewShadowNode.cpp diff --git a/common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardBackgroundViewShadowNode.h b/common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardBackgroundViewShadowNode.h similarity index 80% rename from common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardBackgroundViewShadowNode.h rename to common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardBackgroundViewShadowNode.h index 207d6a1123..7f8cb7e0e3 100644 --- a/common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardBackgroundViewShadowNode.h +++ b/common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardBackgroundViewShadowNode.h @@ -9,8 +9,8 @@ #include "RNKCKeyboardBackgroundViewState.h" -#include -#include +#include +#include #include #include diff --git a/common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardBackgroundViewState.h b/common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardBackgroundViewState.h similarity index 100% rename from common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardBackgroundViewState.h rename to common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardBackgroundViewState.h diff --git a/common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardControllerViewComponentDescriptor.h b/common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardControllerViewComponentDescriptor.h similarity index 89% rename from common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardControllerViewComponentDescriptor.h rename to common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardControllerViewComponentDescriptor.h index 9b295ed770..130298f4c3 100644 --- a/common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardControllerViewComponentDescriptor.h +++ b/common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardControllerViewComponentDescriptor.h @@ -3,7 +3,7 @@ #include "RNKCKeyboardControllerViewShadowNode.h" #include -#include +#include #include namespace facebook::react { diff --git a/common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardControllerViewShadowNode.cpp b/common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardControllerViewShadowNode.cpp similarity index 100% rename from common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardControllerViewShadowNode.cpp rename to common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardControllerViewShadowNode.cpp diff --git a/common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardControllerViewShadowNode.h b/common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardControllerViewShadowNode.h similarity index 77% rename from common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardControllerViewShadowNode.h rename to common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardControllerViewShadowNode.h index c402433a5c..2723a66059 100644 --- a/common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardControllerViewShadowNode.h +++ b/common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardControllerViewShadowNode.h @@ -2,8 +2,8 @@ #include "RNKCKeyboardControllerViewState.h" -#include -#include +#include +#include #include #include diff --git a/common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardControllerViewState.h b/common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardControllerViewState.h similarity index 100% rename from common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardControllerViewState.h rename to common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardControllerViewState.h diff --git a/common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardExtenderComponentDescriptor.h b/common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardExtenderComponentDescriptor.h similarity index 90% rename from common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardExtenderComponentDescriptor.h rename to common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardExtenderComponentDescriptor.h index d4a91cdb8d..0f0a9214f3 100644 --- a/common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardExtenderComponentDescriptor.h +++ b/common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardExtenderComponentDescriptor.h @@ -10,7 +10,7 @@ #include "RNKCKeyboardExtenderShadowNode.h" #include -#include +#include #include namespace facebook::react { diff --git a/common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardExtenderShadowNode.cpp b/common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardExtenderShadowNode.cpp similarity index 100% rename from common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardExtenderShadowNode.cpp rename to common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardExtenderShadowNode.cpp diff --git a/common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardExtenderShadowNode.h b/common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardExtenderShadowNode.h similarity index 79% rename from common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardExtenderShadowNode.h rename to common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardExtenderShadowNode.h index 7f93116b5b..394296ab7c 100644 --- a/common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardExtenderShadowNode.h +++ b/common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardExtenderShadowNode.h @@ -9,8 +9,8 @@ #include "RNKCKeyboardExtenderState.h" -#include -#include +#include +#include #include #include diff --git a/common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardExtenderState.h b/common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardExtenderState.h similarity index 100% rename from common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardExtenderState.h rename to common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardExtenderState.h diff --git a/common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardGestureAreaComponentDescriptor.h b/common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardGestureAreaComponentDescriptor.h similarity index 89% rename from common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardGestureAreaComponentDescriptor.h rename to common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardGestureAreaComponentDescriptor.h index 9900476c3d..53e139246f 100644 --- a/common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardGestureAreaComponentDescriptor.h +++ b/common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardGestureAreaComponentDescriptor.h @@ -3,7 +3,7 @@ #include "RNKCKeyboardGestureAreaShadowNode.h" #include -#include +#include #include namespace facebook::react { diff --git a/common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardGestureAreaShadowNode.cpp b/common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardGestureAreaShadowNode.cpp similarity index 100% rename from common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardGestureAreaShadowNode.cpp rename to common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardGestureAreaShadowNode.cpp diff --git a/common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardGestureAreaShadowNode.h b/common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardGestureAreaShadowNode.h similarity index 77% rename from common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardGestureAreaShadowNode.h rename to common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardGestureAreaShadowNode.h index 0512148766..c59f5a2846 100644 --- a/common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardGestureAreaShadowNode.h +++ b/common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardGestureAreaShadowNode.h @@ -2,8 +2,8 @@ #include "RNKCKeyboardGestureAreaState.h" -#include -#include +#include +#include #include #include diff --git a/common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardGestureAreaState.h b/common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardGestureAreaState.h similarity index 100% rename from common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardGestureAreaState.h rename to common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardGestureAreaState.h diff --git a/common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCOverKeyboardViewComponentDescriptor.h b/common/cpp/react/renderer/components/keyboardcontroller/RNKCOverKeyboardViewComponentDescriptor.h similarity index 92% rename from common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCOverKeyboardViewComponentDescriptor.h rename to common/cpp/react/renderer/components/keyboardcontroller/RNKCOverKeyboardViewComponentDescriptor.h index b3e865bdfd..bac6e07fbd 100644 --- a/common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCOverKeyboardViewComponentDescriptor.h +++ b/common/cpp/react/renderer/components/keyboardcontroller/RNKCOverKeyboardViewComponentDescriptor.h @@ -3,7 +3,7 @@ #include "RNKCOverKeyboardViewShadowNode.h" #include -#include +#include #include namespace facebook::react { diff --git a/common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCOverKeyboardViewShadowNode.cpp b/common/cpp/react/renderer/components/keyboardcontroller/RNKCOverKeyboardViewShadowNode.cpp similarity index 100% rename from common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCOverKeyboardViewShadowNode.cpp rename to common/cpp/react/renderer/components/keyboardcontroller/RNKCOverKeyboardViewShadowNode.cpp diff --git a/common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCOverKeyboardViewShadowNode.h b/common/cpp/react/renderer/components/keyboardcontroller/RNKCOverKeyboardViewShadowNode.h similarity index 76% rename from common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCOverKeyboardViewShadowNode.h rename to common/cpp/react/renderer/components/keyboardcontroller/RNKCOverKeyboardViewShadowNode.h index 1b8cf9d15e..7fdcc9d86a 100644 --- a/common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCOverKeyboardViewShadowNode.h +++ b/common/cpp/react/renderer/components/keyboardcontroller/RNKCOverKeyboardViewShadowNode.h @@ -2,8 +2,8 @@ #include "RNKCOverKeyboardViewState.h" -#include -#include +#include +#include #include #include diff --git a/common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCOverKeyboardViewState.cpp b/common/cpp/react/renderer/components/keyboardcontroller/RNKCOverKeyboardViewState.cpp similarity index 100% rename from common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCOverKeyboardViewState.cpp rename to common/cpp/react/renderer/components/keyboardcontroller/RNKCOverKeyboardViewState.cpp diff --git a/common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCOverKeyboardViewState.h b/common/cpp/react/renderer/components/keyboardcontroller/RNKCOverKeyboardViewState.h similarity index 100% rename from common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCOverKeyboardViewState.h rename to common/cpp/react/renderer/components/keyboardcontroller/RNKCOverKeyboardViewState.h diff --git a/ios/KeyboardControllerModule.mm b/ios/KeyboardControllerModule.mm index b760887d3a..43033a2a56 100644 --- a/ios/KeyboardControllerModule.mm +++ b/ios/KeyboardControllerModule.mm @@ -11,7 +11,7 @@ // Thanks to this guard, we won't import this header when we build for the old architecture. #ifdef RCT_NEW_ARCH_ENABLED -#import +#import #endif #import "KeyboardControllerModule-Header.h" diff --git a/ios/views/KeyboardBackgroundViewManager.mm b/ios/views/KeyboardBackgroundViewManager.mm index 1c7d636594..0b83b4c4a6 100644 --- a/ios/views/KeyboardBackgroundViewManager.mm +++ b/ios/views/KeyboardBackgroundViewManager.mm @@ -14,10 +14,10 @@ #endif #ifdef RCT_NEW_ARCH_ENABLED -#import -#import -#import -#import +#import +#import +#import +#import #import "RCTFabricComponentsPlugins.h" #endif diff --git a/ios/views/KeyboardControllerView.mm b/ios/views/KeyboardControllerView.mm index 334c9f5309..110dee8b7e 100644 --- a/ios/views/KeyboardControllerView.mm +++ b/ios/views/KeyboardControllerView.mm @@ -20,10 +20,10 @@ #import #endif -#import -#import -#import -#import +#import +#import +#import +#import #import "KeyboardControllerModule-Header.h" #import "RCTFabricComponentsPlugins.h" diff --git a/ios/views/KeyboardExtenderManager.mm b/ios/views/KeyboardExtenderManager.mm index e04d0e170d..69e61e05e9 100644 --- a/ios/views/KeyboardExtenderManager.mm +++ b/ios/views/KeyboardExtenderManager.mm @@ -16,10 +16,10 @@ #ifdef RCT_NEW_ARCH_ENABLED #import -#import -#import -#import -#import +#import +#import +#import +#import #import "RCTFabricComponentsPlugins.h" #endif diff --git a/ios/views/KeyboardGestureAreaManager.mm b/ios/views/KeyboardGestureAreaManager.mm index 44cc1987c1..e095eb0bf9 100644 --- a/ios/views/KeyboardGestureAreaManager.mm +++ b/ios/views/KeyboardGestureAreaManager.mm @@ -14,10 +14,10 @@ #endif #ifdef RCT_NEW_ARCH_ENABLED -#import -#import -#import -#import +#import +#import +#import +#import #import "RCTFabricComponentsPlugins.h" #endif diff --git a/ios/views/OverKeyboardViewManager.mm b/ios/views/OverKeyboardViewManager.mm index f7266a3b37..4d29b34ad7 100644 --- a/ios/views/OverKeyboardViewManager.mm +++ b/ios/views/OverKeyboardViewManager.mm @@ -16,10 +16,10 @@ #ifdef RCT_NEW_ARCH_ENABLED #import -#import -#import -#import -#import +#import +#import +#import +#import #import "RCTFabricComponentsPlugins.h" #endif diff --git a/package.json b/package.json index 9d48c6538a..d66d2a3b43 100644 --- a/package.json +++ b/package.json @@ -172,7 +172,7 @@ ] }, "codegenConfig": { - "name": "reactnativekeyboardcontroller", + "name": "keyboardcontroller", "type": "all", "jsSrcsDir": "./src/specs", "android": { diff --git a/react-native-keyboard-controller.podspec b/react-native-keyboard-controller.podspec index 73417f3729..d45023fc36 100644 --- a/react-native-keyboard-controller.podspec +++ b/react-native-keyboard-controller.podspec @@ -61,7 +61,7 @@ Pod::Spec.new do |s| if new_arch_enabled s.subspec "common" do |ss| ss.source_files = ["common/cpp/**/*.{cpp,h}"] - ss.header_dir = "react/renderer/components/reactnativekeyboardcontroller" + ss.header_dir = "react/renderer/components/keyboardcontroller" ss.private_header_files = "common/cpp/**/*.{h}" ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/common/cpp\"" } end