react-native-keyboard-controller 1.5.6 → 1.5.7
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/build.gradle +5 -0
- package/android/src/main/java/com/reactnativekeyboardcontroller/views/EdgeToEdgeReactViewGroup.kt +1 -1
- package/ios/KeyboardMovementObserver.swift +4 -24
- package/lib/commonjs/animated.js +3 -1
- package/lib/commonjs/animated.js.map +1 -1
- package/lib/module/animated.js +3 -1
- package/lib/module/animated.js.map +1 -1
- package/package.json +2 -2
- package/src/animated.tsx +1 -0
package/android/build.gradle
CHANGED
|
@@ -40,6 +40,11 @@ if (isNewArchitectureEnabled()) {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
android {
|
|
43
|
+
def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION
|
|
44
|
+
if (agpVersion.tokenize('.')[0].toInteger() >= 7) {
|
|
45
|
+
namespace "com.reactnativekeyboardcontroller"
|
|
46
|
+
}
|
|
47
|
+
|
|
43
48
|
compileSdkVersion getExtOrIntegerDefault('compileSdkVersion')
|
|
44
49
|
defaultConfig {
|
|
45
50
|
minSdkVersion getExtOrIntegerDefault('minSdkVersion')
|
package/android/src/main/java/com/reactnativekeyboardcontroller/views/EdgeToEdgeReactViewGroup.kt
CHANGED
|
@@ -35,7 +35,7 @@ class EdgeToEdgeReactViewGroup(private val reactContext: ThemedReactContext) : R
|
|
|
35
35
|
onApplyWindowInsetsListener = { v, insets ->
|
|
36
36
|
val content =
|
|
37
37
|
reactContext.currentActivity?.window?.decorView?.rootView?.findViewById<FitWindowsLinearLayout>(
|
|
38
|
-
R.id.action_bar_root,
|
|
38
|
+
androidx.appcompat.R.id.action_bar_root,
|
|
39
39
|
)
|
|
40
40
|
content?.setPadding(
|
|
41
41
|
0,
|
|
@@ -65,26 +65,6 @@ public class KeyboardMovementObserver: NSObject {
|
|
|
65
65
|
name: UIResponder.keyboardDidHideNotification,
|
|
66
66
|
object: nil
|
|
67
67
|
)
|
|
68
|
-
NotificationCenter.default.addObserver(
|
|
69
|
-
self,
|
|
70
|
-
selector: #selector(windowDidBecomeVisible),
|
|
71
|
-
name: UIWindow.didBecomeVisibleNotification,
|
|
72
|
-
object: nil
|
|
73
|
-
)
|
|
74
|
-
NotificationCenter.default.addObserver(
|
|
75
|
-
self,
|
|
76
|
-
selector: #selector(windowDidBecomeHidden),
|
|
77
|
-
name: UIWindow.didBecomeHiddenNotification,
|
|
78
|
-
object: nil
|
|
79
|
-
)
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
@objc func windowDidBecomeHidden(_: Notification) {
|
|
83
|
-
removeKVObserver()
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
@objc func windowDidBecomeVisible(_: Notification) {
|
|
87
|
-
setupKVObserver()
|
|
88
68
|
}
|
|
89
69
|
|
|
90
70
|
private func setupKVObserver() {
|
|
@@ -116,8 +96,8 @@ public class KeyboardMovementObserver: NSObject {
|
|
|
116
96
|
) {
|
|
117
97
|
// swiftlint:disable:next force_cast
|
|
118
98
|
if keyPath == "center", object as! NSObject == _keyboardView! {
|
|
119
|
-
// if we are currently animating keyboard
|
|
120
|
-
if displayLink != nil
|
|
99
|
+
// if we are currently animating keyboard -> we need to ignore values from KVO
|
|
100
|
+
if displayLink != nil {
|
|
121
101
|
return
|
|
122
102
|
}
|
|
123
103
|
|
|
@@ -170,6 +150,7 @@ public class KeyboardMovementObserver: NSObject {
|
|
|
170
150
|
onNotify("KeyboardController::keyboardWillHide", data)
|
|
171
151
|
|
|
172
152
|
setupKeyboardWatcher()
|
|
153
|
+
removeKVObserver()
|
|
173
154
|
}
|
|
174
155
|
|
|
175
156
|
@objc func keyboardDidAppear(_ notification: Notification) {
|
|
@@ -184,6 +165,7 @@ public class KeyboardMovementObserver: NSObject {
|
|
|
184
165
|
onNotify("KeyboardController::keyboardDidShow", data)
|
|
185
166
|
|
|
186
167
|
removeKeyboardWatcher()
|
|
168
|
+
setupKVObserver()
|
|
187
169
|
}
|
|
188
170
|
}
|
|
189
171
|
|
|
@@ -191,8 +173,6 @@ public class KeyboardMovementObserver: NSObject {
|
|
|
191
173
|
var data = [AnyHashable: Any]()
|
|
192
174
|
data["height"] = 0
|
|
193
175
|
|
|
194
|
-
keyboardHeight = 0.0
|
|
195
|
-
|
|
196
176
|
onEvent("onKeyboardMoveEnd", 0 as NSNumber, 0)
|
|
197
177
|
onNotify("KeyboardController::keyboardDidHide", data)
|
|
198
178
|
|
package/lib/commonjs/animated.js
CHANGED
|
@@ -107,7 +107,9 @@ const KeyboardProvider = _ref => {
|
|
|
107
107
|
onKeyboardMove: _reactNative.Platform.OS === 'android' ? onKeyboardMove : undefined,
|
|
108
108
|
onKeyboardMoveInteractive: onKeyboardMove,
|
|
109
109
|
navigationBarTranslucent: navigationBarTranslucent,
|
|
110
|
-
statusBarTranslucent: statusBarTranslucent
|
|
110
|
+
statusBarTranslucent: statusBarTranslucent
|
|
111
|
+
// @ts-expect-error will be fixed when migrate to REA 3.3.0
|
|
112
|
+
,
|
|
111
113
|
style: styles.container
|
|
112
114
|
}, children), /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
|
|
113
115
|
// we are using this small hack, because if the component (where
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["KeyboardControllerViewAnimated","Reanimated","createAnimatedComponent","Animated","KeyboardControllerView","styles","StyleSheet","create","container","flex","hidden","display","position","KeyboardProvider","children","statusBarTranslucent","navigationBarTranslucent","progress","useAnimatedValue","height","progressSV","useSharedValue","heightSV","setHandlers","broadcast","useSharedHandlers","context","useMemo","animated","multiply","reanimated","style","transform","translateX","translateY","onKeyboardMove","event","nativeEvent","useNativeDriver","updateSharedValues","platforms","includes","Platform","OS","value","handler","useAnimatedKeyboardHandler","onKeyboardMoveStart","onKeyboardMoveEnd","onKeyboardMoveInteractive","undefined"],"sources":["animated.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport { Animated, Platform, StyleSheet, ViewStyle } from 'react-native';\nimport Reanimated, { useSharedValue } from 'react-native-reanimated';\n\nimport { KeyboardContext } from './context';\nimport {\n useAnimatedKeyboardHandler,\n useSharedHandlers,\n useAnimatedValue,\n} from './internal';\nimport { KeyboardControllerView } from './native';\n\nimport type {\n KeyboardControllerProps,\n KeyboardHandler,\n NativeEvent,\n} from './types';\n\nconst KeyboardControllerViewAnimated = Reanimated.createAnimatedComponent(\n Animated.createAnimatedComponent(\n KeyboardControllerView\n ) as React.FC<KeyboardControllerProps>\n);\n\ntype Styles = {\n container: ViewStyle;\n hidden: ViewStyle;\n};\n\nconst styles = StyleSheet.create<Styles>({\n container: {\n flex: 1,\n },\n hidden: {\n display: 'none',\n position: 'absolute',\n },\n});\n\ntype KeyboardProviderProps = {\n children: React.ReactNode;\n /**\n * Set the value to `true`, if you use translucent status bar on Android.\n * If you already control status bar translucency via `react-native-screens`\n * or `StatusBar` component from `react-native`, you can ignore it.\n * Defaults to `false`.\n *\n * @see https://github.com/kirillzyusko/react-native-keyboard-controller/issues/14\n * @platform android\n */\n statusBarTranslucent?: boolean;\n /**\n * Set the value to `true`, if you use translucent navigation bar on Android.\n * Defaults to `false`.\n *\n * @see https://github.com/kirillzyusko/react-native-keyboard-controller/issues/119\n * @platform android\n */\n navigationBarTranslucent?: boolean;\n};\n\nexport const KeyboardProvider = ({\n children,\n statusBarTranslucent,\n navigationBarTranslucent,\n}: KeyboardProviderProps) => {\n // animated values\n const progress = useAnimatedValue(0);\n const height = useAnimatedValue(0);\n // shared values\n const progressSV = useSharedValue(0);\n const heightSV = useSharedValue(0);\n const { setHandlers, broadcast } = useSharedHandlers<KeyboardHandler>();\n // memo\n const context = useMemo(\n () => ({\n animated: { progress: progress, height: Animated.multiply(height, -1) },\n reanimated: { progress: progressSV, height: heightSV },\n setHandlers,\n }),\n []\n );\n const style = useMemo(\n () => [\n styles.hidden,\n { transform: [{ translateX: height }, { translateY: progress }] },\n ],\n []\n );\n const onKeyboardMove = useMemo(\n () =>\n Animated.event(\n [\n {\n nativeEvent: {\n progress,\n height,\n },\n },\n ],\n { useNativeDriver: true }\n ),\n []\n );\n // handlers\n const updateSharedValues = (event: NativeEvent, platforms: string[]) => {\n 'worklet';\n\n if (platforms.includes(Platform.OS)) {\n progressSV.value = event.progress;\n heightSV.value = -event.height;\n }\n };\n const handler = useAnimatedKeyboardHandler(\n {\n onKeyboardMoveStart: (event: NativeEvent) => {\n 'worklet';\n\n broadcast('onStart', event);\n updateSharedValues(event, ['ios']);\n },\n onKeyboardMove: (event: NativeEvent) => {\n 'worklet';\n\n broadcast('onMove', event);\n updateSharedValues(event, ['android']);\n },\n onKeyboardMoveEnd: (event: NativeEvent) => {\n 'worklet';\n\n broadcast('onEnd', event);\n },\n onKeyboardMoveInteractive: (event: NativeEvent) => {\n 'worklet';\n\n updateSharedValues(event, ['android', 'ios']);\n broadcast('onInteractive', event);\n },\n },\n []\n );\n\n return (\n <KeyboardContext.Provider value={context}>\n <KeyboardControllerViewAnimated\n onKeyboardMoveReanimated={handler}\n onKeyboardMoveStart={Platform.OS === 'ios' ? onKeyboardMove : undefined}\n onKeyboardMove={Platform.OS === 'android' ? onKeyboardMove : undefined}\n onKeyboardMoveInteractive={onKeyboardMove}\n navigationBarTranslucent={navigationBarTranslucent}\n statusBarTranslucent={statusBarTranslucent}\n style={styles.container}\n >\n {children}\n </KeyboardControllerViewAnimated>\n <Animated.View\n // we are using this small hack, because if the component (where\n // animated value has been used) is unmounted, then animation will\n // stop receiving events (seems like it's react-native optimization).\n // So we need to keep a reference to the animated value, to keep it's\n // always mounted (keep a reference to an animated value).\n //\n // To test why it's needed, try to open screen which consumes Animated.Value\n // then close it and open it again (for example 'Animated transition').\n style={style}\n />\n </KeyboardContext.Provider>\n );\n};\n"],"mappings":";;;;;;AAAA;AACA;AACA;AAEA;AACA;AAKA;AAAkD;AAAA;AAQlD,MAAMA,8BAA8B,GAAGC,8BAAU,CAACC,uBAAuB,CACvEC,qBAAQ,CAACD,uBAAuB,C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AAE,KAAK,KAAK,GAAGR,cAAc,GAAGe,SAAU;IACxE,cAAc,EAAER,qBAAQ,CAACC,EAAE,KAAK,SAAS,GAAGR,cAAc,GAAGe,SAAU;IACvE,yBAAyB,EAAEf,cAAe;IAC1C,wBAAwB,EAAEnB,wBAAyB;IACnD,oBAAoB,EAAED
|
|
1
|
+
{"version":3,"names":["KeyboardControllerViewAnimated","Reanimated","createAnimatedComponent","Animated","KeyboardControllerView","styles","StyleSheet","create","container","flex","hidden","display","position","KeyboardProvider","children","statusBarTranslucent","navigationBarTranslucent","progress","useAnimatedValue","height","progressSV","useSharedValue","heightSV","setHandlers","broadcast","useSharedHandlers","context","useMemo","animated","multiply","reanimated","style","transform","translateX","translateY","onKeyboardMove","event","nativeEvent","useNativeDriver","updateSharedValues","platforms","includes","Platform","OS","value","handler","useAnimatedKeyboardHandler","onKeyboardMoveStart","onKeyboardMoveEnd","onKeyboardMoveInteractive","undefined"],"sources":["animated.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport { Animated, Platform, StyleSheet, ViewStyle } from 'react-native';\nimport Reanimated, { useSharedValue } from 'react-native-reanimated';\n\nimport { KeyboardContext } from './context';\nimport {\n useAnimatedKeyboardHandler,\n useSharedHandlers,\n useAnimatedValue,\n} from './internal';\nimport { KeyboardControllerView } from './native';\n\nimport type {\n KeyboardControllerProps,\n KeyboardHandler,\n NativeEvent,\n} from './types';\n\nconst KeyboardControllerViewAnimated = Reanimated.createAnimatedComponent(\n Animated.createAnimatedComponent(\n KeyboardControllerView\n ) as React.FC<KeyboardControllerProps>\n);\n\ntype Styles = {\n container: ViewStyle;\n hidden: ViewStyle;\n};\n\nconst styles = StyleSheet.create<Styles>({\n container: {\n flex: 1,\n },\n hidden: {\n display: 'none',\n position: 'absolute',\n },\n});\n\ntype KeyboardProviderProps = {\n children: React.ReactNode;\n /**\n * Set the value to `true`, if you use translucent status bar on Android.\n * If you already control status bar translucency via `react-native-screens`\n * or `StatusBar` component from `react-native`, you can ignore it.\n * Defaults to `false`.\n *\n * @see https://github.com/kirillzyusko/react-native-keyboard-controller/issues/14\n * @platform android\n */\n statusBarTranslucent?: boolean;\n /**\n * Set the value to `true`, if you use translucent navigation bar on Android.\n * Defaults to `false`.\n *\n * @see https://github.com/kirillzyusko/react-native-keyboard-controller/issues/119\n * @platform android\n */\n navigationBarTranslucent?: boolean;\n};\n\nexport const KeyboardProvider = ({\n children,\n statusBarTranslucent,\n navigationBarTranslucent,\n}: KeyboardProviderProps) => {\n // animated values\n const progress = useAnimatedValue(0);\n const height = useAnimatedValue(0);\n // shared values\n const progressSV = useSharedValue(0);\n const heightSV = useSharedValue(0);\n const { setHandlers, broadcast } = useSharedHandlers<KeyboardHandler>();\n // memo\n const context = useMemo(\n () => ({\n animated: { progress: progress, height: Animated.multiply(height, -1) },\n reanimated: { progress: progressSV, height: heightSV },\n setHandlers,\n }),\n []\n );\n const style = useMemo(\n () => [\n styles.hidden,\n { transform: [{ translateX: height }, { translateY: progress }] },\n ],\n []\n );\n const onKeyboardMove = useMemo(\n () =>\n Animated.event(\n [\n {\n nativeEvent: {\n progress,\n height,\n },\n },\n ],\n { useNativeDriver: true }\n ),\n []\n );\n // handlers\n const updateSharedValues = (event: NativeEvent, platforms: string[]) => {\n 'worklet';\n\n if (platforms.includes(Platform.OS)) {\n progressSV.value = event.progress;\n heightSV.value = -event.height;\n }\n };\n const handler = useAnimatedKeyboardHandler(\n {\n onKeyboardMoveStart: (event: NativeEvent) => {\n 'worklet';\n\n broadcast('onStart', event);\n updateSharedValues(event, ['ios']);\n },\n onKeyboardMove: (event: NativeEvent) => {\n 'worklet';\n\n broadcast('onMove', event);\n updateSharedValues(event, ['android']);\n },\n onKeyboardMoveEnd: (event: NativeEvent) => {\n 'worklet';\n\n broadcast('onEnd', event);\n },\n onKeyboardMoveInteractive: (event: NativeEvent) => {\n 'worklet';\n\n updateSharedValues(event, ['android', 'ios']);\n broadcast('onInteractive', event);\n },\n },\n []\n );\n\n return (\n <KeyboardContext.Provider value={context}>\n <KeyboardControllerViewAnimated\n onKeyboardMoveReanimated={handler}\n onKeyboardMoveStart={Platform.OS === 'ios' ? onKeyboardMove : undefined}\n onKeyboardMove={Platform.OS === 'android' ? onKeyboardMove : undefined}\n onKeyboardMoveInteractive={onKeyboardMove}\n navigationBarTranslucent={navigationBarTranslucent}\n statusBarTranslucent={statusBarTranslucent}\n // @ts-expect-error will be fixed when migrate to REA 3.3.0\n style={styles.container}\n >\n {children}\n </KeyboardControllerViewAnimated>\n <Animated.View\n // we are using this small hack, because if the component (where\n // animated value has been used) is unmounted, then animation will\n // stop receiving events (seems like it's react-native optimization).\n // So we need to keep a reference to the animated value, to keep it's\n // always mounted (keep a reference to an animated value).\n //\n // To test why it's needed, try to open screen which consumes Animated.Value\n // then close it and open it again (for example 'Animated transition').\n style={style}\n />\n </KeyboardContext.Provider>\n );\n};\n"],"mappings":";;;;;;AAAA;AACA;AACA;AAEA;AACA;AAKA;AAAkD;AAAA;AAQlD,MAAMA,8BAA8B,GAAGC,8BAAU,CAACC,uBAAuB,CACvEC,qBAAQ,CAACD,uBAAuB,CAC9BE,8BAAsB,CACvB,CACF;AAOD,MAAMC,MAAM,GAAGC,uBAAU,CAACC,MAAM,CAAS;EACvCC,SAAS,EAAE;IACTC,IAAI,EAAE;EACR,CAAC;EACDC,MAAM,EAAE;IACNC,OAAO,EAAE,MAAM;IACfC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC;AAwBK,MAAMC,gBAAgB,GAAG,QAIH;EAAA,IAJI;IAC/BC,QAAQ;IACRC,oBAAoB;IACpBC;EACqB,CAAC;EACtB;EACA,MAAMC,QAAQ,GAAG,IAAAC,0BAAgB,EAAC,CAAC,CAAC;EACpC,MAAMC,MAAM,GAAG,IAAAD,0BAAgB,EAAC,CAAC,CAAC;EAClC;EACA,MAAME,UAAU,GAAG,IAAAC,qCAAc,EAAC,CAAC,CAAC;EACpC,MAAMC,QAAQ,GAAG,IAAAD,qCAAc,EAAC,CAAC,CA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kBAAkB,CAACH,KAAK,EAAE,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IACDD,cAAc,EAAGC,KAAkB,IAAK;MACtC,SAAS;;MAETZ,SAAS,CAAC,QAAQ,EAAEY,KAAK,CAAC;MAC1BG,kBAAkB,CAACH,KAAK,EAAE,CAAC,SAAS,CAAC,CAAC;IACxC,CAAC;IACDY,iBAAiB,EAAGZ,KAAkB,IAAK;MACzC,SAAS;;MAETZ,SAAS,CAAC,OAAO,EAAEY,KAAK,CAAC;IAC3B,CAAC;IACDa,yBAAyB,EAAGb,KAAkB,IAAK;MACjD,SAAS;;MAETG,kBAAkB,CAACH,KAAK,EAAE,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;MAC7CZ,SAAS,CAAC,eAAe,EAAEY,KAAK,CAAC;IACnC;EACF,CAAC,EACD,EAAE,CACH;EAED,oBACE,6BAAC,wBAAe,CAAC,QAAQ;IAAC,KAAK,EAAEV;EAAQ,gBACvC,6BAAC,8BAA8B;IAC7B,wBAAwB,EAAEmB,OAAQ;IAClC,mBAAmB,EAAEH,qBAAQ,CAACC,EAAE,KAAK,KAAK,GAAGR,cAAc,GAAGe,SAAU;IACxE,cAAc,EAAER,qBAAQ,CAACC,EAAE,KAAK,SAAS,GAAGR,cAAc,GAAGe,SAAU;IACvE,yBAAyB,EAAEf,cAAe;IAC1C,wBAAwB,EAAEnB,wBAAyB;IACnD,oBAAoB,EAAED;IACtB;IAAA;IACA,KAAK,EAAEV,MAAM,CAACG;EAAU,GAEvBM,QAAQ,CACsB,eACjC,6BAAC,qBAAQ,CAAC,IAAI;IACZ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,KAAK,EAAEiB;EAAM,EACb,CACuB;AAE/B,CAAC;AAAC"}
|
package/lib/module/animated.js
CHANGED
|
@@ -99,7 +99,9 @@ export const KeyboardProvider = _ref => {
|
|
|
99
99
|
onKeyboardMove: Platform.OS === 'android' ? onKeyboardMove : undefined,
|
|
100
100
|
onKeyboardMoveInteractive: onKeyboardMove,
|
|
101
101
|
navigationBarTranslucent: navigationBarTranslucent,
|
|
102
|
-
statusBarTranslucent: statusBarTranslucent
|
|
102
|
+
statusBarTranslucent: statusBarTranslucent
|
|
103
|
+
// @ts-expect-error will be fixed when migrate to REA 3.3.0
|
|
104
|
+
,
|
|
103
105
|
style: styles.container
|
|
104
106
|
}, children), /*#__PURE__*/React.createElement(Animated.View, {
|
|
105
107
|
// we are using this small hack, because if the component (where
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useMemo","Animated","Platform","StyleSheet","Reanimated","useSharedValue","KeyboardContext","useAnimatedKeyboardHandler","useSharedHandlers","useAnimatedValue","KeyboardControllerView","KeyboardControllerViewAnimated","createAnimatedComponent","styles","create","container","flex","hidden","display","position","KeyboardProvider","children","statusBarTranslucent","navigationBarTranslucent","progress","height","progressSV","heightSV","setHandlers","broadcast","context","animated","multiply","reanimated","style","transform","translateX","translateY","onKeyboardMove","event","nativeEvent","useNativeDriver","updateSharedValues","platforms","includes","OS","value","handler","onKeyboardMoveStart","onKeyboardMoveEnd","onKeyboardMoveInteractive","undefined"],"sources":["animated.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport { Animated, Platform, StyleSheet, ViewStyle } from 'react-native';\nimport Reanimated, { useSharedValue } from 'react-native-reanimated';\n\nimport { KeyboardContext } from './context';\nimport {\n useAnimatedKeyboardHandler,\n useSharedHandlers,\n useAnimatedValue,\n} from './internal';\nimport { KeyboardControllerView } from './native';\n\nimport type {\n KeyboardControllerProps,\n KeyboardHandler,\n NativeEvent,\n} from './types';\n\nconst KeyboardControllerViewAnimated = Reanimated.createAnimatedComponent(\n Animated.createAnimatedComponent(\n KeyboardControllerView\n ) as React.FC<KeyboardControllerProps>\n);\n\ntype Styles = {\n container: ViewStyle;\n hidden: ViewStyle;\n};\n\nconst styles = StyleSheet.create<Styles>({\n container: {\n flex: 1,\n },\n hidden: {\n display: 'none',\n position: 'absolute',\n },\n});\n\ntype KeyboardProviderProps = {\n children: React.ReactNode;\n /**\n * Set the value to `true`, if you use translucent status bar on Android.\n * If you already control status bar translucency via `react-native-screens`\n * or `StatusBar` component from `react-native`, you can ignore it.\n * Defaults to `false`.\n *\n * @see https://github.com/kirillzyusko/react-native-keyboard-controller/issues/14\n * @platform android\n */\n statusBarTranslucent?: boolean;\n /**\n * Set the value to `true`, if you use translucent navigation bar on Android.\n * Defaults to `false`.\n *\n * @see https://github.com/kirillzyusko/react-native-keyboard-controller/issues/119\n * @platform android\n */\n navigationBarTranslucent?: boolean;\n};\n\nexport const KeyboardProvider = ({\n children,\n statusBarTranslucent,\n navigationBarTranslucent,\n}: KeyboardProviderProps) => {\n // animated values\n const progress = useAnimatedValue(0);\n const height = useAnimatedValue(0);\n // shared values\n const progressSV = useSharedValue(0);\n const heightSV = useSharedValue(0);\n const { setHandlers, broadcast } = useSharedHandlers<KeyboardHandler>();\n // memo\n const context = useMemo(\n () => ({\n animated: { progress: progress, height: Animated.multiply(height, -1) },\n reanimated: { progress: progressSV, height: heightSV },\n setHandlers,\n }),\n []\n );\n const style = useMemo(\n () => [\n styles.hidden,\n { transform: [{ translateX: height }, { translateY: progress }] },\n ],\n []\n );\n const onKeyboardMove = useMemo(\n () =>\n Animated.event(\n [\n {\n nativeEvent: {\n progress,\n height,\n },\n },\n ],\n { useNativeDriver: true }\n ),\n []\n );\n // handlers\n const updateSharedValues = (event: NativeEvent, platforms: string[]) => {\n 'worklet';\n\n if (platforms.includes(Platform.OS)) {\n progressSV.value = event.progress;\n heightSV.value = -event.height;\n }\n };\n const handler = useAnimatedKeyboardHandler(\n {\n onKeyboardMoveStart: (event: NativeEvent) => {\n 'worklet';\n\n broadcast('onStart', event);\n updateSharedValues(event, ['ios']);\n },\n onKeyboardMove: (event: NativeEvent) => {\n 'worklet';\n\n broadcast('onMove', event);\n updateSharedValues(event, ['android']);\n },\n onKeyboardMoveEnd: (event: NativeEvent) => {\n 'worklet';\n\n broadcast('onEnd', event);\n },\n onKeyboardMoveInteractive: (event: NativeEvent) => {\n 'worklet';\n\n updateSharedValues(event, ['android', 'ios']);\n broadcast('onInteractive', event);\n },\n },\n []\n );\n\n return (\n <KeyboardContext.Provider value={context}>\n <KeyboardControllerViewAnimated\n onKeyboardMoveReanimated={handler}\n onKeyboardMoveStart={Platform.OS === 'ios' ? onKeyboardMove : undefined}\n onKeyboardMove={Platform.OS === 'android' ? onKeyboardMove : undefined}\n onKeyboardMoveInteractive={onKeyboardMove}\n navigationBarTranslucent={navigationBarTranslucent}\n statusBarTranslucent={statusBarTranslucent}\n style={styles.container}\n >\n {children}\n </KeyboardControllerViewAnimated>\n <Animated.View\n // we are using this small hack, because if the component (where\n // animated value has been used) is unmounted, then animation will\n // stop receiving events (seems like it's react-native optimization).\n // So we need to keep a reference to the animated value, to keep it's\n // always mounted (keep a reference to an animated value).\n //\n // To test why it's needed, try to open screen which consumes Animated.Value\n // then close it and open it again (for example 'Animated transition').\n style={style}\n />\n </KeyboardContext.Provider>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,UAAU,QAAmB,cAAc;AACxE,OAAOC,UAAU,IAAIC,cAAc,QAAQ,yBAAyB;AAEpE,SAASC,eAAe,QAAQ,WAAW;AAC3C,SACEC,0BAA0B,EAC1BC,iBAAiB,EACjBC,gBAAgB,QACX,YAAY;AACnB,SAASC,sBAAsB,QAAQ,UAAU;AAQjD,MAAMC,8BAA8B,GAAGP,UAAU,CAACQ,uBAAuB,CACvEX,QAAQ,CAACW,uBAAuB,CAC9BF,sBAAsB,CACvB,CACF;AAOD,MAAMG,MAAM,GAAGV,UAAU,CAACW,MAAM,CAAS;EACvCC,SAAS,EAAE;IACTC,IAAI,EAAE;EACR,CAAC;EACDC,MAAM,EAAE;IACNC,OAAO,EAAE,MAAM;IACfC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC;AAwBF,OAAO,MAAMC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Context","useAnimatedKeyboardHandler","useSharedHandlers","useAnimatedValue","KeyboardControllerView","KeyboardControllerViewAnimated","createAnimatedComponent","styles","create","container","flex","hidden","display","position","KeyboardProvider","children","statusBarTranslucent","navigationBarTranslucent","progress","height","progressSV","heightSV","setHandlers","broadcast","context","animated","multiply","reanimated","style","transform","translateX","translateY","onKeyboardMove","event","nativeEvent","useNativeDriver","updateSharedValues","platforms","includes","OS","value","handler","onKeyboardMoveStart","onKeyboardMoveEnd","onKeyboardMoveInteractive","undefined"],"sources":["animated.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport { Animated, Platform, StyleSheet, ViewStyle } from 'react-native';\nimport Reanimated, { useSharedValue } from 'react-native-reanimated';\n\nimport { KeyboardContext } from './context';\nimport {\n useAnimatedKeyboardHandler,\n useSharedHandlers,\n useAnimatedValue,\n} from './internal';\nimport { KeyboardControllerView } from './native';\n\nimport type {\n KeyboardControllerProps,\n KeyboardHandler,\n NativeEvent,\n} from './types';\n\nconst KeyboardControllerViewAnimated = Reanimated.createAnimatedComponent(\n Animated.createAnimatedComponent(\n KeyboardControllerView\n ) as React.FC<KeyboardControllerProps>\n);\n\ntype Styles = {\n container: ViewStyle;\n hidden: ViewStyle;\n};\n\nconst styles = StyleSheet.create<Styles>({\n container: {\n flex: 1,\n },\n hidden: {\n display: 'none',\n position: 'absolute',\n },\n});\n\ntype KeyboardProviderProps = {\n children: React.ReactNode;\n /**\n * Set the value to `true`, if you use translucent status bar on Android.\n * If you already control status bar translucency via `react-native-screens`\n * or `StatusBar` component from `react-native`, you can ignore it.\n * Defaults to `false`.\n *\n * @see https://github.com/kirillzyusko/react-native-keyboard-controller/issues/14\n * @platform android\n */\n statusBarTranslucent?: boolean;\n /**\n * Set the value to `true`, if you use translucent navigation bar on Android.\n * Defaults to `false`.\n *\n * @see https://github.com/kirillzyusko/react-native-keyboard-controller/issues/119\n * @platform android\n */\n navigationBarTranslucent?: boolean;\n};\n\nexport const KeyboardProvider = ({\n children,\n statusBarTranslucent,\n navigationBarTranslucent,\n}: KeyboardProviderProps) => {\n // animated values\n const progress = useAnimatedValue(0);\n const height = useAnimatedValue(0);\n // shared values\n const progressSV = useSharedValue(0);\n const heightSV = useSharedValue(0);\n const { setHandlers, broadcast } = useSharedHandlers<KeyboardHandler>();\n // memo\n const context = useMemo(\n () => ({\n animated: { progress: progress, height: Animated.multiply(height, -1) },\n reanimated: { progress: progressSV, height: heightSV },\n setHandlers,\n }),\n []\n );\n const style = useMemo(\n () => [\n styles.hidden,\n { transform: [{ translateX: height }, { translateY: progress }] },\n ],\n []\n );\n const onKeyboardMove = useMemo(\n () =>\n Animated.event(\n [\n {\n nativeEvent: {\n progress,\n height,\n },\n },\n ],\n { useNativeDriver: true }\n ),\n []\n );\n // handlers\n const updateSharedValues = (event: NativeEvent, platforms: string[]) => {\n 'worklet';\n\n if (platforms.includes(Platform.OS)) {\n progressSV.value = event.progress;\n heightSV.value = -event.height;\n }\n };\n const handler = useAnimatedKeyboardHandler(\n {\n onKeyboardMoveStart: (event: NativeEvent) => {\n 'worklet';\n\n broadcast('onStart', event);\n updateSharedValues(event, ['ios']);\n },\n onKeyboardMove: (event: NativeEvent) => {\n 'worklet';\n\n broadcast('onMove', event);\n updateSharedValues(event, ['android']);\n },\n onKeyboardMoveEnd: (event: NativeEvent) => {\n 'worklet';\n\n broadcast('onEnd', event);\n },\n onKeyboardMoveInteractive: (event: NativeEvent) => {\n 'worklet';\n\n updateSharedValues(event, ['android', 'ios']);\n broadcast('onInteractive', event);\n },\n },\n []\n );\n\n return (\n <KeyboardContext.Provider value={context}>\n <KeyboardControllerViewAnimated\n onKeyboardMoveReanimated={handler}\n onKeyboardMoveStart={Platform.OS === 'ios' ? onKeyboardMove : undefined}\n onKeyboardMove={Platform.OS === 'android' ? onKeyboardMove : undefined}\n onKeyboardMoveInteractive={onKeyboardMove}\n navigationBarTranslucent={navigationBarTranslucent}\n statusBarTranslucent={statusBarTranslucent}\n // @ts-expect-error will be fixed when migrate to REA 3.3.0\n style={styles.container}\n >\n {children}\n </KeyboardControllerViewAnimated>\n <Animated.View\n // we are using this small hack, because if the component (where\n // animated value has been used) is unmounted, then animation will\n // stop receiving events (seems like it's react-native optimization).\n // So we need to keep a reference to the animated value, to keep it's\n // always mounted (keep a reference to an animated value).\n //\n // To test why it's needed, try to open screen which consumes Animated.Value\n // then close it and open it again (for example 'Animated transition').\n style={style}\n />\n </KeyboardContext.Provider>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,UAAU,QAAmB,cAAc;AACxE,OAAOC,UAAU,IAAIC,cAAc,QAAQ,yBAAyB;AAEpE,SAASC,eAAe,QAAQ,WAAW;AAC3C,SACEC,0BAA0B,EAC1BC,iBAAiB,EACjBC,gBAAgB,QACX,YAAY;AACnB,SAASC,sBAAsB,QAAQ,UAAU;AAQjD,MAAMC,8BAA8B,GAAGP,UAAU,CAACQ,uBAAuB,CACvEX,QAAQ,CAACW,uBAAuB,CAC9BF,sBAAsB,CACvB,CACF;AAOD,MAAMG,MAAM,GAAGV,UAAU,CAACW,MAAM,CAAS;EACvCC,SAAS,EAAE;IACTC,IAAI,EAAE;EACR,CAAC;EACDC,MAAM,EAAE;IACNC,OAAO,EAAE,MAAM;IACfC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC;AAwBF,OAAO,MAAMC,gBAAgB,GAAG,QAIH;EAAA,IAJI;IAC/BC,QAAQ;IACRC,oBAAoB;IACpBC;EACqB,CAAC;EACtB;EACA,MAAMC,QAAQ,GAAGf,gBAAgB,CAAC,CAAC,CAAC;EACpC,MAAMgB,MAAM,GAAGhB,gBAAgB,CAAC,CAAC,CAAC;EAClC;EACA,MAAMiB,UAAU,GAAGrB,cAAc,CAAC,CAAC,CAAC;EACpC,MAAMsB,QAAQ,GAAGtB,cAAc,CAAC,CAAC,CAAC;EAClC,MAAM;IAAEuB,WAAW;IAAEC;EAAU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Ac,EAAGC,KAAkB,IAAK;MACtC,SAAS;;MAETV,SAAS,CAAC,QAAQ,EAAEU,KAAK,CAAC;MAC1BG,kBAAkB,CAACH,KAAK,EAAE,CAAC,SAAS,CAAC,CAAC;IACxC,CAAC;IACDU,iBAAiB,EAAGV,KAAkB,IAAK;MACzC,SAAS;;MAETV,SAAS,CAAC,OAAO,EAAEU,KAAK,CAAC;IAC3B,CAAC;IACDW,yBAAyB,EAAGX,KAAkB,IAAK;MACjD,SAAS;;MAETG,kBAAkB,CAACH,KAAK,EAAE,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;MAC7CV,SAAS,CAAC,eAAe,EAAEU,KAAK,CAAC;IACnC;EACF,CAAC,EACD,EAAE,CACH;EAED,oBACE,oBAAC,eAAe,CAAC,QAAQ;IAAC,KAAK,EAAET;EAAQ,gBACvC,oBAAC,8BAA8B;IAC7B,wBAAwB,EAAEiB,OAAQ;IAClC,mBAAmB,EAAE7C,QAAQ,CAAC2C,EAAE,KAAK,KAAK,GAAGP,cAAc,GAAGa,SAAU;IACxE,cAAc,EAAEjD,QAAQ,CAAC2C,EAAE,KAAK,SAAS,GAAGP,cAAc,GAAGa,SAAU;IACvE,yBAAyB,EAAEb,cAAe;IAC1C,wBAAwB,EAAEf,wBAAyB;IACnD,oBAAoB,EAAED;IACtB;IAAA;IACA,KAAK,EAAET,MAAM,CAACE;EAAU,GAEvBM,QAAQ,CACsB,eACjC,oBAAC,QAAQ,CAAC,IAAI;IACZ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,KAAK,EAAEa;EAAM,EACb,CACuB;AAE/B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-keyboard-controller",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.7",
|
|
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",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"pod-install": "^0.1.0",
|
|
71
71
|
"prettier": "^2.4.1",
|
|
72
72
|
"react": "18.2.0",
|
|
73
|
-
"react-native": "0.71.
|
|
73
|
+
"react-native": "0.71.11",
|
|
74
74
|
"react-native-builder-bob": "^0.18.0",
|
|
75
75
|
"react-native-reanimated": "2.14.4",
|
|
76
76
|
"release-it": "^14.2.2",
|
package/src/animated.tsx
CHANGED
|
@@ -149,6 +149,7 @@ export const KeyboardProvider = ({
|
|
|
149
149
|
onKeyboardMoveInteractive={onKeyboardMove}
|
|
150
150
|
navigationBarTranslucent={navigationBarTranslucent}
|
|
151
151
|
statusBarTranslucent={statusBarTranslucent}
|
|
152
|
+
// @ts-expect-error will be fixed when migrate to REA 3.3.0
|
|
152
153
|
style={styles.container}
|
|
153
154
|
>
|
|
154
155
|
{children}
|