react-native-keyboard-controller 1.20.3 → 1.20.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/src/main/jni/CMakeLists.txt +1 -1
- package/android/src/main/jni/RNKC.h +24 -0
- package/common/cpp/react/renderer/components/{keyboardcontroller → RNKC}/RNKCKeyboardBackgroundViewComponentDescriptor.h +1 -1
- package/common/cpp/react/renderer/components/{keyboardcontroller → RNKC}/RNKCKeyboardBackgroundViewShadowNode.h +2 -2
- package/common/cpp/react/renderer/components/{keyboardcontroller → RNKC}/RNKCKeyboardControllerViewComponentDescriptor.h +1 -1
- package/common/cpp/react/renderer/components/{keyboardcontroller → RNKC}/RNKCKeyboardControllerViewShadowNode.h +2 -2
- package/common/cpp/react/renderer/components/{keyboardcontroller → RNKC}/RNKCKeyboardExtenderComponentDescriptor.h +1 -1
- package/common/cpp/react/renderer/components/{keyboardcontroller → RNKC}/RNKCKeyboardExtenderShadowNode.h +2 -2
- package/common/cpp/react/renderer/components/{keyboardcontroller → RNKC}/RNKCKeyboardGestureAreaComponentDescriptor.h +1 -1
- package/common/cpp/react/renderer/components/{keyboardcontroller → RNKC}/RNKCKeyboardGestureAreaShadowNode.h +2 -2
- package/common/cpp/react/renderer/components/{keyboardcontroller → RNKC}/RNKCOverKeyboardViewComponentDescriptor.h +1 -1
- package/common/cpp/react/renderer/components/{keyboardcontroller → RNKC}/RNKCOverKeyboardViewShadowNode.h +2 -2
- package/ios/KeyboardControllerModule.mm +1 -1
- package/ios/observers/movement/KeyboardTrackingView.swift +8 -1
- package/ios/views/KeyboardBackgroundViewManager.mm +4 -4
- package/ios/views/KeyboardControllerView.mm +4 -4
- package/ios/views/KeyboardExtenderManager.mm +4 -4
- package/ios/views/KeyboardGestureAreaManager.mm +4 -4
- package/ios/views/OverKeyboardViewManager.mm +4 -4
- package/package.json +2 -2
- package/react-native-keyboard-controller.podspec +1 -1
- package/android/src/main/jni/keyboardcontroller.h +0 -24
- /package/common/cpp/react/renderer/components/{keyboardcontroller → RNKC}/RNKCKeyboardBackgroundViewShadowNode.cpp +0 -0
- /package/common/cpp/react/renderer/components/{keyboardcontroller → RNKC}/RNKCKeyboardBackgroundViewState.h +0 -0
- /package/common/cpp/react/renderer/components/{keyboardcontroller → RNKC}/RNKCKeyboardControllerViewShadowNode.cpp +0 -0
- /package/common/cpp/react/renderer/components/{keyboardcontroller → RNKC}/RNKCKeyboardControllerViewState.h +0 -0
- /package/common/cpp/react/renderer/components/{keyboardcontroller → RNKC}/RNKCKeyboardExtenderShadowNode.cpp +0 -0
- /package/common/cpp/react/renderer/components/{keyboardcontroller → RNKC}/RNKCKeyboardExtenderState.h +0 -0
- /package/common/cpp/react/renderer/components/{keyboardcontroller → RNKC}/RNKCKeyboardGestureAreaShadowNode.cpp +0 -0
- /package/common/cpp/react/renderer/components/{keyboardcontroller → RNKC}/RNKCKeyboardGestureAreaState.h +0 -0
- /package/common/cpp/react/renderer/components/{keyboardcontroller → RNKC}/RNKCOverKeyboardViewShadowNode.cpp +0 -0
- /package/common/cpp/react/renderer/components/{keyboardcontroller → RNKC}/RNKCOverKeyboardViewState.cpp +0 -0
- /package/common/cpp/react/renderer/components/{keyboardcontroller → RNKC}/RNKCOverKeyboardViewState.h +0 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include <ReactCommon/JavaTurboModule.h>
|
|
4
|
+
#include <ReactCommon/TurboModule.h>
|
|
5
|
+
#include <jsi/jsi.h>
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Note this import and that it is not present in autogenerated header file
|
|
9
|
+
* under android/build/generated/source/codegen/jni/RNKC.h
|
|
10
|
+
*
|
|
11
|
+
* Here we are overriding autogenerated component descriptors by prioritizing our custom headers via include path setup.
|
|
12
|
+
*/
|
|
13
|
+
#include <react/renderer/components/RNKC/RNKCKeyboardControllerViewComponentDescriptor.h>
|
|
14
|
+
#include <react/renderer/components/RNKC/RNKCKeyboardGestureAreaComponentDescriptor.h>
|
|
15
|
+
#include <react/renderer/components/RNKC/RNKCOverKeyboardViewComponentDescriptor.h>
|
|
16
|
+
#include <react/renderer/components/RNKC/RNKCKeyboardBackgroundViewComponentDescriptor.h>
|
|
17
|
+
|
|
18
|
+
#include <memory>
|
|
19
|
+
#include <string>
|
|
20
|
+
|
|
21
|
+
namespace facebook::react {
|
|
22
|
+
JSI_EXPORT
|
|
23
|
+
std::shared_ptr<TurboModule> RNKC_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms);
|
|
24
|
+
} // namespace facebook::react
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
#include "RNKCKeyboardBackgroundViewShadowNode.h"
|
|
11
11
|
|
|
12
12
|
#include <react/debug/react_native_assert.h>
|
|
13
|
-
#include <react/renderer/components/
|
|
13
|
+
#include <react/renderer/components/RNKC/Props.h>
|
|
14
14
|
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
|
15
15
|
|
|
16
16
|
namespace facebook::react {
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
|
|
10
10
|
#include "RNKCKeyboardBackgroundViewState.h"
|
|
11
11
|
|
|
12
|
-
#include <react/renderer/components/
|
|
13
|
-
#include <react/renderer/components/
|
|
12
|
+
#include <react/renderer/components/RNKC/EventEmitters.h>
|
|
13
|
+
#include <react/renderer/components/RNKC/Props.h>
|
|
14
14
|
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
|
15
15
|
#include <jsi/jsi.h>
|
|
16
16
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
#include "RNKCKeyboardControllerViewShadowNode.h"
|
|
4
4
|
|
|
5
5
|
#include <react/debug/react_native_assert.h>
|
|
6
|
-
#include <react/renderer/components/
|
|
6
|
+
#include <react/renderer/components/RNKC/Props.h>
|
|
7
7
|
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
|
8
8
|
|
|
9
9
|
namespace facebook::react {
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
#include "RNKCKeyboardControllerViewState.h"
|
|
4
4
|
|
|
5
|
-
#include <react/renderer/components/
|
|
6
|
-
#include <react/renderer/components/
|
|
5
|
+
#include <react/renderer/components/RNKC/EventEmitters.h>
|
|
6
|
+
#include <react/renderer/components/RNKC/Props.h>
|
|
7
7
|
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
|
8
8
|
#include <jsi/jsi.h>
|
|
9
9
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
#include "RNKCKeyboardExtenderShadowNode.h"
|
|
11
11
|
|
|
12
12
|
#include <react/debug/react_native_assert.h>
|
|
13
|
-
#include <react/renderer/components/
|
|
13
|
+
#include <react/renderer/components/RNKC/Props.h>
|
|
14
14
|
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
|
15
15
|
|
|
16
16
|
namespace facebook::react {
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
|
|
10
10
|
#include "RNKCKeyboardExtenderState.h"
|
|
11
11
|
|
|
12
|
-
#include <react/renderer/components/
|
|
13
|
-
#include <react/renderer/components/
|
|
12
|
+
#include <react/renderer/components/RNKC/EventEmitters.h>
|
|
13
|
+
#include <react/renderer/components/RNKC/Props.h>
|
|
14
14
|
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
|
15
15
|
#include <jsi/jsi.h>
|
|
16
16
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
#include "RNKCKeyboardGestureAreaShadowNode.h"
|
|
4
4
|
|
|
5
5
|
#include <react/debug/react_native_assert.h>
|
|
6
|
-
#include <react/renderer/components/
|
|
6
|
+
#include <react/renderer/components/RNKC/Props.h>
|
|
7
7
|
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
|
8
8
|
|
|
9
9
|
namespace facebook::react {
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
#include "RNKCKeyboardGestureAreaState.h"
|
|
4
4
|
|
|
5
|
-
#include <react/renderer/components/
|
|
6
|
-
#include <react/renderer/components/
|
|
5
|
+
#include <react/renderer/components/RNKC/EventEmitters.h>
|
|
6
|
+
#include <react/renderer/components/RNKC/Props.h>
|
|
7
7
|
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
|
8
8
|
#include <jsi/jsi.h>
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
#include "RNKCOverKeyboardViewShadowNode.h"
|
|
4
4
|
|
|
5
5
|
#include <react/debug/react_native_assert.h>
|
|
6
|
-
#include <react/renderer/components/
|
|
6
|
+
#include <react/renderer/components/RNKC/Props.h>
|
|
7
7
|
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
|
8
8
|
|
|
9
9
|
namespace facebook::react {
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
#include "RNKCOverKeyboardViewState.h"
|
|
4
4
|
|
|
5
|
-
#include <react/renderer/components/
|
|
6
|
-
#include <react/renderer/components/
|
|
5
|
+
#include <react/renderer/components/RNKC/EventEmitters.h>
|
|
6
|
+
#include <react/renderer/components/RNKC/Props.h>
|
|
7
7
|
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
|
8
8
|
#include <jsi/jsi.h>
|
|
9
9
|
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
// Thanks to this guard, we won't import this header when we build for the old architecture.
|
|
13
13
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
14
|
-
#import <
|
|
14
|
+
#import <RNKC/RNKC.h>
|
|
15
15
|
#endif
|
|
16
16
|
|
|
17
17
|
#import "KeyboardControllerModule-Header.h"
|
|
@@ -66,7 +66,14 @@ public final class KeyboardTrackingView: UIView {
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
@objc public func attachToTopmostView(toWindow window: UIWindow? = nil) {
|
|
69
|
-
|
|
69
|
+
var topViewController = window?.rootViewController
|
|
70
|
+
if let rootVC = topViewController, let topView = rootVC.view, topView.window != nil {
|
|
71
|
+
// ok, attach
|
|
72
|
+
} else {
|
|
73
|
+
topViewController = UIApplication.topViewController()
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
guard let topView = topViewController?.view else { return }
|
|
70
77
|
|
|
71
78
|
if currentAttachedView === topView { return }
|
|
72
79
|
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
#endif
|
|
15
15
|
|
|
16
16
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
17
|
-
#import <react/renderer/components/
|
|
18
|
-
#import <react/renderer/components/
|
|
19
|
-
#import <react/renderer/components/
|
|
20
|
-
#import <react/renderer/components/
|
|
17
|
+
#import <react/renderer/components/RNKC/EventEmitters.h>
|
|
18
|
+
#import <react/renderer/components/RNKC/Props.h>
|
|
19
|
+
#import <react/renderer/components/RNKC/RCTComponentViewHelpers.h>
|
|
20
|
+
#import <react/renderer/components/RNKC/RNKCKeyboardBackgroundViewComponentDescriptor.h>
|
|
21
21
|
|
|
22
22
|
#import "RCTFabricComponentsPlugins.h"
|
|
23
23
|
#endif
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
#import <react_native_keyboard_controller/react_native_keyboard_controller-Swift.h>
|
|
21
21
|
#endif
|
|
22
22
|
|
|
23
|
-
#import <react/renderer/components/
|
|
24
|
-
#import <react/renderer/components/
|
|
25
|
-
#import <react/renderer/components/
|
|
26
|
-
#import <react/renderer/components/
|
|
23
|
+
#import <react/renderer/components/RNKC/EventEmitters.h>
|
|
24
|
+
#import <react/renderer/components/RNKC/Props.h>
|
|
25
|
+
#import <react/renderer/components/RNKC/RCTComponentViewHelpers.h>
|
|
26
|
+
#import <react/renderer/components/RNKC/RNKCKeyboardControllerViewComponentDescriptor.h>
|
|
27
27
|
|
|
28
28
|
#import "KeyboardControllerModule-Header.h"
|
|
29
29
|
#import "RCTFabricComponentsPlugins.h"
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
17
17
|
#import <React/RCTSurfaceTouchHandler.h>
|
|
18
18
|
|
|
19
|
-
#import <react/renderer/components/
|
|
20
|
-
#import <react/renderer/components/
|
|
21
|
-
#import <react/renderer/components/
|
|
22
|
-
#import <react/renderer/components/
|
|
19
|
+
#import <react/renderer/components/RNKC/EventEmitters.h>
|
|
20
|
+
#import <react/renderer/components/RNKC/Props.h>
|
|
21
|
+
#import <react/renderer/components/RNKC/RCTComponentViewHelpers.h>
|
|
22
|
+
#import <react/renderer/components/RNKC/RNKCKeyboardExtenderComponentDescriptor.h>
|
|
23
23
|
|
|
24
24
|
#import "RCTFabricComponentsPlugins.h"
|
|
25
25
|
#endif
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
#endif
|
|
15
15
|
|
|
16
16
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
17
|
-
#import <react/renderer/components/
|
|
18
|
-
#import <react/renderer/components/
|
|
19
|
-
#import <react/renderer/components/
|
|
20
|
-
#import <react/renderer/components/
|
|
17
|
+
#import <react/renderer/components/RNKC/EventEmitters.h>
|
|
18
|
+
#import <react/renderer/components/RNKC/Props.h>
|
|
19
|
+
#import <react/renderer/components/RNKC/RCTComponentViewHelpers.h>
|
|
20
|
+
#import <react/renderer/components/RNKC/RNKCKeyboardGestureAreaComponentDescriptor.h>
|
|
21
21
|
|
|
22
22
|
#import "RCTFabricComponentsPlugins.h"
|
|
23
23
|
#endif
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
17
17
|
#import <React/RCTSurfaceTouchHandler.h>
|
|
18
18
|
|
|
19
|
-
#import <react/renderer/components/
|
|
20
|
-
#import <react/renderer/components/
|
|
21
|
-
#import <react/renderer/components/
|
|
22
|
-
#import <react/renderer/components/
|
|
19
|
+
#import <react/renderer/components/RNKC/EventEmitters.h>
|
|
20
|
+
#import <react/renderer/components/RNKC/Props.h>
|
|
21
|
+
#import <react/renderer/components/RNKC/RCTComponentViewHelpers.h>
|
|
22
|
+
#import <react/renderer/components/RNKC/RNKCOverKeyboardViewComponentDescriptor.h>
|
|
23
23
|
|
|
24
24
|
#import "RCTFabricComponentsPlugins.h"
|
|
25
25
|
#endif
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-keyboard-controller",
|
|
3
|
-
"version": "1.20.
|
|
3
|
+
"version": "1.20.5",
|
|
4
4
|
"description": "Keyboard manager which works in identical way on both iOS and Android",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
]
|
|
173
173
|
},
|
|
174
174
|
"codegenConfig": {
|
|
175
|
-
"name": "
|
|
175
|
+
"name": "RNKC",
|
|
176
176
|
"type": "all",
|
|
177
177
|
"jsSrcsDir": "./src/specs",
|
|
178
178
|
"android": {
|
|
@@ -61,7 +61,7 @@ Pod::Spec.new do |s|
|
|
|
61
61
|
if new_arch_enabled
|
|
62
62
|
s.subspec "common" do |ss|
|
|
63
63
|
ss.source_files = ["common/cpp/**/*.{cpp,h}"]
|
|
64
|
-
ss.header_dir = "react/renderer/components/
|
|
64
|
+
ss.header_dir = "react/renderer/components/RNKC"
|
|
65
65
|
ss.private_header_files = "common/cpp/**/*.{h}"
|
|
66
66
|
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/common/cpp\"" }
|
|
67
67
|
end
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
#pragma once
|
|
2
|
-
|
|
3
|
-
#include <ReactCommon/JavaTurboModule.h>
|
|
4
|
-
#include <ReactCommon/TurboModule.h>
|
|
5
|
-
#include <jsi/jsi.h>
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Note this import and that it is not present in autogenerated header file
|
|
9
|
-
* under android/build/generated/source/codegen/jni/keyboardcontroller.h
|
|
10
|
-
*
|
|
11
|
-
* Here we are overriding autogenerated component descriptors by prioritizing our custom headers via include path setup.
|
|
12
|
-
*/
|
|
13
|
-
#include <react/renderer/components/keyboardcontroller/RNKCKeyboardControllerViewComponentDescriptor.h>
|
|
14
|
-
#include <react/renderer/components/keyboardcontroller/RNKCKeyboardGestureAreaComponentDescriptor.h>
|
|
15
|
-
#include <react/renderer/components/keyboardcontroller/RNKCOverKeyboardViewComponentDescriptor.h>
|
|
16
|
-
#include <react/renderer/components/keyboardcontroller/RNKCKeyboardBackgroundViewComponentDescriptor.h>
|
|
17
|
-
|
|
18
|
-
#include <memory>
|
|
19
|
-
#include <string>
|
|
20
|
-
|
|
21
|
-
namespace facebook::react {
|
|
22
|
-
JSI_EXPORT
|
|
23
|
-
std::shared_ptr<TurboModule> keyboardcontroller_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms);
|
|
24
|
-
} // namespace facebook::react
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|