@react-native-ohos/react-native-keyboard-controller 1.16.6-rc.1
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/LICENSE +21 -0
- package/README.OpenSource +11 -0
- package/README.md +19 -0
- package/harmony/keyboard_controller/BuildProfile.ets +17 -0
- package/harmony/keyboard_controller/Index.ets +7 -0
- package/harmony/keyboard_controller/ResourceTable.txt +1 -0
- package/harmony/keyboard_controller/build-profile.json5 +31 -0
- package/harmony/keyboard_controller/consumer-rules.txt +0 -0
- package/harmony/keyboard_controller/hvigorfile.ts +6 -0
- package/harmony/keyboard_controller/obfuscation-rules.txt +18 -0
- package/harmony/keyboard_controller/oh-package.json5 +11 -0
- package/harmony/keyboard_controller/src/main/cpp/CMakeLists.txt +7 -0
- package/harmony/keyboard_controller/src/main/cpp/EventEmitters.cpp +96 -0
- package/harmony/keyboard_controller/src/main/cpp/EventEmitters.h +90 -0
- package/harmony/keyboard_controller/src/main/cpp/KeyboardControllerViewComponentDescriptor.h +73 -0
- package/harmony/keyboard_controller/src/main/cpp/KeyboardControllerViewComponentInstance.cpp +172 -0
- package/harmony/keyboard_controller/src/main/cpp/KeyboardControllerViewComponentInstance.h +76 -0
- package/harmony/keyboard_controller/src/main/cpp/KeyboardControllerViewJSIBinder.h +44 -0
- package/harmony/keyboard_controller/src/main/cpp/KeyboardGestureAreaComponentDescriptor.h +58 -0
- package/harmony/keyboard_controller/src/main/cpp/KeyboardGestureAreaComponentInstance.cpp +87 -0
- package/harmony/keyboard_controller/src/main/cpp/KeyboardGestureAreaComponentInstance.h +62 -0
- package/harmony/keyboard_controller/src/main/cpp/KeyboardGestureAreaJSIBinder.h +39 -0
- package/harmony/keyboard_controller/src/main/cpp/RNKeyboardController.cpp +25 -0
- package/harmony/keyboard_controller/src/main/cpp/RNKeyboardController.h +27 -0
- package/harmony/keyboard_controller/src/main/cpp/RNStatusBarManagerCompat.cpp +24 -0
- package/harmony/keyboard_controller/src/main/cpp/RNStatusBarManagerCompat.h +28 -0
- package/harmony/keyboard_controller/src/main/cpp/keyboardControllerPackage.cpp +43 -0
- package/harmony/keyboard_controller/src/main/cpp/keyboardControllerPackage.h +56 -0
- package/harmony/keyboard_controller/src/main/ets/Logger.ts +46 -0
- package/harmony/keyboard_controller/src/main/ets/RNKeyboardControllerPackage.ts +45 -0
- package/harmony/keyboard_controller/src/main/ets/RNKeyboardControllerTurboModule.ts +238 -0
- package/harmony/keyboard_controller/src/main/ets/RNStatusBarManagerCompatTurboModule.ts +98 -0
- package/harmony/keyboard_controller/src/main/ets/Type.ts +41 -0
- package/harmony/keyboard_controller/src/main/module.json5 +11 -0
- package/harmony/keyboard_controller/src/main/resources/base/element/string.json +8 -0
- package/harmony/keyboard_controller/src/main/resources/en_US/element/string.json +8 -0
- package/harmony/keyboard_controller/src/main/resources/zh_CN/element/string.json +8 -0
- package/harmony/keyboard_controller/ts.ts +9 -0
- package/harmony/keyboard_controller.har +0 -0
- package/lib/commonjs/animated.js +176 -0
- package/lib/commonjs/animated.js.map +1 -0
- package/lib/commonjs/bindings.js +39 -0
- package/lib/commonjs/bindings.js.map +1 -0
- package/lib/commonjs/bindings.native.js +39 -0
- package/lib/commonjs/bindings.native.js.map +1 -0
- package/lib/commonjs/components/KeyboardAvoidingView/hooks.js +126 -0
- package/lib/commonjs/components/KeyboardAvoidingView/hooks.js.map +1 -0
- package/lib/commonjs/components/KeyboardAvoidingView/index.js +120 -0
- package/lib/commonjs/components/KeyboardAvoidingView/index.js.map +1 -0
- package/lib/commonjs/components/KeyboardAwareScrollView/index.js +262 -0
- package/lib/commonjs/components/KeyboardAwareScrollView/index.js.map +1 -0
- package/lib/commonjs/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.js +110 -0
- package/lib/commonjs/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.js.map +1 -0
- package/lib/commonjs/components/KeyboardAwareScrollView/utils.js +37 -0
- package/lib/commonjs/components/KeyboardAwareScrollView/utils.js.map +1 -0
- package/lib/commonjs/components/KeyboardStickyView/index.js +41 -0
- package/lib/commonjs/components/KeyboardStickyView/index.js.map +1 -0
- package/lib/commonjs/components/KeyboardToolbar/Arrow.js +76 -0
- package/lib/commonjs/components/KeyboardToolbar/Arrow.js.map +1 -0
- package/lib/commonjs/components/KeyboardToolbar/Button.js +70 -0
- package/lib/commonjs/components/KeyboardToolbar/Button.js.map +1 -0
- package/lib/commonjs/components/KeyboardToolbar/colors.js +21 -0
- package/lib/commonjs/components/KeyboardToolbar/colors.js.map +1 -0
- package/lib/commonjs/components/KeyboardToolbar/colors.native.js +40 -0
- package/lib/commonjs/components/KeyboardToolbar/colors.native.js.map +1 -0
- package/lib/commonjs/components/KeyboardToolbar/index.js +161 -0
- package/lib/commonjs/components/KeyboardToolbar/index.js.map +1 -0
- package/lib/commonjs/components/KeyboardToolbar/types.js +6 -0
- package/lib/commonjs/components/KeyboardToolbar/types.js.map +1 -0
- package/lib/commonjs/components/hooks/useColorScheme.js +10 -0
- package/lib/commonjs/components/hooks/useColorScheme.js.map +1 -0
- package/lib/commonjs/components/index.js +42 -0
- package/lib/commonjs/components/index.js.map +1 -0
- package/lib/commonjs/constants.js +27 -0
- package/lib/commonjs/constants.js.map +1 -0
- package/lib/commonjs/context.js +45 -0
- package/lib/commonjs/context.js.map +1 -0
- package/lib/commonjs/hooks/index.js +104 -0
- package/lib/commonjs/hooks/index.js.map +1 -0
- package/lib/commonjs/hooks/useWindowDimensions/index.android.js +34 -0
- package/lib/commonjs/hooks/useWindowDimensions/index.android.js.map +1 -0
- package/lib/commonjs/hooks/useWindowDimensions/index.js +13 -0
- package/lib/commonjs/hooks/useWindowDimensions/index.js.map +1 -0
- package/lib/commonjs/index.js +136 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/internal.js +73 -0
- package/lib/commonjs/internal.js.map +1 -0
- package/lib/commonjs/module.js +47 -0
- package/lib/commonjs/module.js.map +1 -0
- package/lib/commonjs/monkey-patch.android.js +57 -0
- package/lib/commonjs/monkey-patch.android.js.map +1 -0
- package/lib/commonjs/monkey-patch.js +11 -0
- package/lib/commonjs/monkey-patch.js.map +1 -0
- package/lib/commonjs/reanimated.js +12 -0
- package/lib/commonjs/reanimated.js.map +1 -0
- package/lib/commonjs/reanimated.native.js +88 -0
- package/lib/commonjs/reanimated.native.js.map +1 -0
- package/lib/commonjs/specs/KeyboardControllerViewNativeComponent.js +10 -0
- package/lib/commonjs/specs/KeyboardControllerViewNativeComponent.js.map +1 -0
- package/lib/commonjs/specs/KeyboardGestureAreaNativeComponent.js +12 -0
- package/lib/commonjs/specs/KeyboardGestureAreaNativeComponent.js.map +1 -0
- package/lib/commonjs/specs/NativeKeyboardController.js +9 -0
- package/lib/commonjs/specs/NativeKeyboardController.js.map +1 -0
- package/lib/commonjs/specs/NativeStatusBarManagerCompat.js +9 -0
- package/lib/commonjs/specs/NativeStatusBarManagerCompat.js.map +1 -0
- package/lib/commonjs/specs/OverKeyboardViewNativeComponent.js +10 -0
- package/lib/commonjs/specs/OverKeyboardViewNativeComponent.js.map +1 -0
- package/lib/commonjs/types.js +6 -0
- package/lib/commonjs/types.js.map +1 -0
- package/lib/commonjs/utils.js +9 -0
- package/lib/commonjs/utils.js.map +1 -0
- package/lib/commonjs/views/OverKeyboardView/index.js +42 -0
- package/lib/commonjs/views/OverKeyboardView/index.js.map +1 -0
- package/lib/commonjs/views/index.js +14 -0
- package/lib/commonjs/views/index.js.map +1 -0
- package/lib/module/animated.js +168 -0
- package/lib/module/animated.js.map +1 -0
- package/lib/module/bindings.js +33 -0
- package/lib/module/bindings.js.map +1 -0
- package/lib/module/bindings.native.js +33 -0
- package/lib/module/bindings.native.js.map +1 -0
- package/lib/module/components/KeyboardAvoidingView/hooks.js +118 -0
- package/lib/module/components/KeyboardAvoidingView/hooks.js.map +1 -0
- package/lib/module/components/KeyboardAvoidingView/index.js +113 -0
- package/lib/module/components/KeyboardAvoidingView/index.js.map +1 -0
- package/lib/module/components/KeyboardAwareScrollView/index.js +255 -0
- package/lib/module/components/KeyboardAwareScrollView/index.js.map +1 -0
- package/lib/module/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.js +103 -0
- package/lib/module/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.js.map +1 -0
- package/lib/module/components/KeyboardAwareScrollView/utils.js +29 -0
- package/lib/module/components/KeyboardAwareScrollView/utils.js.map +1 -0
- package/lib/module/components/KeyboardStickyView/index.js +34 -0
- package/lib/module/components/KeyboardStickyView/index.js.map +1 -0
- package/lib/module/components/KeyboardToolbar/Arrow.js +68 -0
- package/lib/module/components/KeyboardToolbar/Arrow.js.map +1 -0
- package/lib/module/components/KeyboardToolbar/Button.js +62 -0
- package/lib/module/components/KeyboardToolbar/Button.js.map +1 -0
- package/lib/module/components/KeyboardToolbar/colors.js +15 -0
- package/lib/module/components/KeyboardToolbar/colors.js.map +1 -0
- package/lib/module/components/KeyboardToolbar/colors.native.js +34 -0
- package/lib/module/components/KeyboardToolbar/colors.native.js.map +1 -0
- package/lib/module/components/KeyboardToolbar/index.js +149 -0
- package/lib/module/components/KeyboardToolbar/index.js.map +1 -0
- package/lib/module/components/KeyboardToolbar/types.js +2 -0
- package/lib/module/components/KeyboardToolbar/types.js.map +1 -0
- package/lib/module/components/hooks/useColorScheme.js +4 -0
- package/lib/module/components/hooks/useColorScheme.js.map +1 -0
- package/lib/module/components/index.js +5 -0
- package/lib/module/components/index.js.map +1 -0
- package/lib/module/constants.js +21 -0
- package/lib/module/constants.js.map +1 -0
- package/lib/module/context.js +38 -0
- package/lib/module/context.js.map +1 -0
- package/lib/module/hooks/index.js +68 -0
- package/lib/module/hooks/index.js.map +1 -0
- package/lib/module/hooks/useWindowDimensions/index.android.js +27 -0
- package/lib/module/hooks/useWindowDimensions/index.android.js.map +1 -0
- package/lib/module/hooks/useWindowDimensions/index.js +2 -0
- package/lib/module/hooks/useWindowDimensions/index.js.map +1 -0
- package/lib/module/index.js +12 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/internal.js +66 -0
- package/lib/module/internal.js.map +1 -0
- package/lib/module/module.js +41 -0
- package/lib/module/module.js.map +1 -0
- package/lib/module/monkey-patch.android.js +47 -0
- package/lib/module/monkey-patch.android.js.map +1 -0
- package/lib/module/monkey-patch.js +5 -0
- package/lib/module/monkey-patch.js.map +1 -0
- package/lib/module/reanimated.js +6 -0
- package/lib/module/reanimated.js.map +1 -0
- package/lib/module/reanimated.native.js +78 -0
- package/lib/module/reanimated.native.js.map +1 -0
- package/lib/module/specs/KeyboardControllerViewNativeComponent.js +3 -0
- package/lib/module/specs/KeyboardControllerViewNativeComponent.js.map +1 -0
- package/lib/module/specs/KeyboardGestureAreaNativeComponent.js +5 -0
- package/lib/module/specs/KeyboardGestureAreaNativeComponent.js.map +1 -0
- package/lib/module/specs/NativeKeyboardController.js +3 -0
- package/lib/module/specs/NativeKeyboardController.js.map +1 -0
- package/lib/module/specs/NativeStatusBarManagerCompat.js +3 -0
- package/lib/module/specs/NativeStatusBarManagerCompat.js.map +1 -0
- package/lib/module/specs/OverKeyboardViewNativeComponent.js +3 -0
- package/lib/module/specs/OverKeyboardViewNativeComponent.js.map +1 -0
- package/lib/module/types.js +2 -0
- package/lib/module/types.js.map +1 -0
- package/lib/module/utils.js +2 -0
- package/lib/module/utils.js.map +1 -0
- package/lib/module/views/OverKeyboardView/index.js +35 -0
- package/lib/module/views/OverKeyboardView/index.js.map +1 -0
- package/lib/module/views/index.js +2 -0
- package/lib/module/views/index.js.map +1 -0
- package/lib/typescript/animated.d.ts +39 -0
- package/lib/typescript/bindings.d.ts +12 -0
- package/lib/typescript/bindings.native.d.ts +12 -0
- package/lib/typescript/components/KeyboardAvoidingView/hooks.d.ts +10 -0
- package/lib/typescript/components/KeyboardAvoidingView/index.d.ts +40 -0
- package/lib/typescript/components/KeyboardAwareScrollView/index.d.ts +29 -0
- package/lib/typescript/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.d.ts +6 -0
- package/lib/typescript/components/KeyboardAwareScrollView/utils.d.ts +2 -0
- package/lib/typescript/components/KeyboardStickyView/index.d.ts +39 -0
- package/lib/typescript/components/KeyboardToolbar/Arrow.d.ts +9 -0
- package/lib/typescript/components/KeyboardToolbar/Button.d.ts +16 -0
- package/lib/typescript/components/KeyboardToolbar/colors.d.ts +2 -0
- package/lib/typescript/components/KeyboardToolbar/colors.native.d.ts +2 -0
- package/lib/typescript/components/KeyboardToolbar/index.d.ts +52 -0
- package/lib/typescript/components/KeyboardToolbar/types.d.ts +18 -0
- package/lib/typescript/components/hooks/useColorScheme.d.ts +2 -0
- package/lib/typescript/components/index.d.ts +8 -0
- package/lib/typescript/constants.d.ts +16 -0
- package/lib/typescript/context.d.ts +23 -0
- package/lib/typescript/hooks/index.d.ts +17 -0
- package/lib/typescript/hooks/useWindowDimensions/index.android.d.ts +2 -0
- package/lib/typescript/hooks/useWindowDimensions/index.d.ts +1 -0
- package/lib/typescript/index.d.ts +10 -0
- package/lib/typescript/internal.d.ts +30 -0
- package/lib/typescript/module.d.ts +2 -0
- package/lib/typescript/monkey-patch.android.d.ts +2 -0
- package/lib/typescript/monkey-patch.d.ts +2 -0
- package/lib/typescript/reanimated.d.ts +5 -0
- package/lib/typescript/reanimated.native.d.ts +7 -0
- package/lib/typescript/specs/KeyboardControllerViewNativeComponent.d.ts +54 -0
- package/lib/typescript/specs/KeyboardGestureAreaNativeComponent.d.ts +12 -0
- package/lib/typescript/specs/NativeKeyboardController.d.ts +12 -0
- package/lib/typescript/specs/NativeStatusBarManagerCompat.d.ts +10 -0
- package/lib/typescript/specs/OverKeyboardViewNativeComponent.d.ts +7 -0
- package/lib/typescript/types.d.ts +161 -0
- package/lib/typescript/utils.d.ts +1 -0
- package/lib/typescript/views/OverKeyboardView/index.d.ts +5 -0
- package/lib/typescript/views/index.d.ts +1 -0
- package/package.json +173 -0
- package/react-native-keyboard-controller.podspec +61 -0
- package/src/animated.tsx +256 -0
- package/src/bindings.native.ts +62 -0
- package/src/bindings.ts +42 -0
- package/src/components/KeyboardAvoidingView/hooks.ts +123 -0
- package/src/components/KeyboardAvoidingView/index.tsx +188 -0
- package/src/components/KeyboardAwareScrollView/index.tsx +389 -0
- package/src/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.ts +133 -0
- package/src/components/KeyboardAwareScrollView/utils.ts +41 -0
- package/src/components/KeyboardStickyView/index.tsx +66 -0
- package/src/components/KeyboardToolbar/Arrow.tsx +80 -0
- package/src/components/KeyboardToolbar/Button.tsx +98 -0
- package/src/components/KeyboardToolbar/colors.native.ts +37 -0
- package/src/components/KeyboardToolbar/colors.ts +16 -0
- package/src/components/KeyboardToolbar/index.tsx +223 -0
- package/src/components/KeyboardToolbar/types.ts +40 -0
- package/src/components/hooks/useColorScheme.ts +5 -0
- package/src/components/index.ts +11 -0
- package/src/constants.ts +19 -0
- package/src/context.ts +68 -0
- package/src/hooks/index.ts +90 -0
- package/src/hooks/useWindowDimensions/index.android.ts +38 -0
- package/src/hooks/useWindowDimensions/index.ts +1 -0
- package/src/index.ts +23 -0
- package/src/internal.ts +84 -0
- package/src/module.ts +52 -0
- package/src/monkey-patch.android.ts +44 -0
- package/src/monkey-patch.ts +4 -0
- package/src/reanimated.native.ts +132 -0
- package/src/reanimated.ts +29 -0
- package/src/specs/KeyboardControllerViewNativeComponent.ts +71 -0
- package/src/specs/KeyboardGestureAreaNativeComponent.ts +20 -0
- package/src/specs/NativeKeyboardController.ts +19 -0
- package/src/specs/NativeStatusBarManagerCompat.ts +14 -0
- package/src/specs/OverKeyboardViewNativeComponent.ts +12 -0
- package/src/types.ts +243 -0
- package/src/utils.ts +1 -0
- package/src/views/OverKeyboardView/index.tsx +43 -0
- package/src/views/index.ts +1 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Arrow from "./Arrow";
|
|
3
|
+
import Button from "./Button";
|
|
4
|
+
import { colors } from "./colors";
|
|
5
|
+
import type { HEX, KeyboardToolbarTheme } from "./types";
|
|
6
|
+
import type { KeyboardStickyViewProps } from "../KeyboardStickyView";
|
|
7
|
+
import type { ReactNode } from "react";
|
|
8
|
+
import type { ViewProps } from "react-native";
|
|
9
|
+
export type KeyboardToolbarProps = Omit<ViewProps, "style" | "testID" | "children"> & {
|
|
10
|
+
/** An element that is shown in the middle of the toolbar. */
|
|
11
|
+
content?: JSX.Element | null;
|
|
12
|
+
/** A set of dark/light colors consumed by toolbar component. */
|
|
13
|
+
theme?: KeyboardToolbarTheme;
|
|
14
|
+
/** Custom text for done button. */
|
|
15
|
+
doneText?: ReactNode;
|
|
16
|
+
/** Custom touchable component for toolbar (used for prev/next/done buttons). */
|
|
17
|
+
button?: typeof Button;
|
|
18
|
+
/** Custom icon component used to display next/prev buttons. */
|
|
19
|
+
icon?: typeof Arrow;
|
|
20
|
+
/**
|
|
21
|
+
* Whether to show next and previous buttons. Can be useful to set it to `false` if you have only one input
|
|
22
|
+
* and want to show only `Done` button. Default to `true`.
|
|
23
|
+
*/
|
|
24
|
+
showArrows?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* A callback that is called when the user presses the next button along with the default action.
|
|
27
|
+
*/
|
|
28
|
+
onNextCallback?: () => void;
|
|
29
|
+
/**
|
|
30
|
+
* A callback that is called when the user presses the previous button along with the default action.
|
|
31
|
+
*/
|
|
32
|
+
onPrevCallback?: () => void;
|
|
33
|
+
/**
|
|
34
|
+
* A callback that is called when the user presses the done button along with the default action.
|
|
35
|
+
*/
|
|
36
|
+
onDoneCallback?: () => void;
|
|
37
|
+
/**
|
|
38
|
+
* A component that applies blur effect to the toolbar.
|
|
39
|
+
*/
|
|
40
|
+
blur?: JSX.Element | null;
|
|
41
|
+
/**
|
|
42
|
+
* A value for container opacity in hexadecimal format (e.g. `ff`). Default value is `ff`.
|
|
43
|
+
*/
|
|
44
|
+
opacity?: HEX;
|
|
45
|
+
} & Pick<KeyboardStickyViewProps, "offset" | "enabled">;
|
|
46
|
+
/**
|
|
47
|
+
* `KeyboardToolbar` is a component that is shown above the keyboard with `Prev`/`Next` and
|
|
48
|
+
* `Done` buttons.
|
|
49
|
+
*/
|
|
50
|
+
declare const KeyboardToolbar: React.FC<KeyboardToolbarProps>;
|
|
51
|
+
export { colors as DefaultKeyboardToolbarTheme };
|
|
52
|
+
export default KeyboardToolbar;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ColorValue } from "react-native";
|
|
2
|
+
type Theme = {
|
|
3
|
+
/** Color for arrow when it's enabled */
|
|
4
|
+
primary: ColorValue;
|
|
5
|
+
/** Color for arrow when it's disabled */
|
|
6
|
+
disabled: ColorValue;
|
|
7
|
+
/** Keyboard toolbar background color */
|
|
8
|
+
background: string;
|
|
9
|
+
/** Color for ripple effect (on button touch) on Android */
|
|
10
|
+
ripple: ColorValue;
|
|
11
|
+
};
|
|
12
|
+
export type KeyboardToolbarTheme = {
|
|
13
|
+
light: Theme;
|
|
14
|
+
dark: Theme;
|
|
15
|
+
};
|
|
16
|
+
type HexSymbol = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "A" | "B" | "C" | "D" | "E" | "F" | "a" | "b" | "c" | "d" | "e" | "f";
|
|
17
|
+
export type HEX = `${HexSymbol}${HexSymbol}`;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { default as KeyboardAvoidingView } from "./KeyboardAvoidingView";
|
|
2
|
+
export { default as KeyboardStickyView } from "./KeyboardStickyView";
|
|
3
|
+
export { default as KeyboardAwareScrollView } from "./KeyboardAwareScrollView";
|
|
4
|
+
export { default as KeyboardToolbar, DefaultKeyboardToolbarTheme, } from "./KeyboardToolbar";
|
|
5
|
+
export type { KeyboardAvoidingViewProps } from "./KeyboardAvoidingView";
|
|
6
|
+
export type { KeyboardStickyViewProps } from "./KeyboardStickyView";
|
|
7
|
+
export type { KeyboardAwareScrollViewProps } from "./KeyboardAwareScrollView";
|
|
8
|
+
export type { KeyboardToolbarProps } from "./KeyboardToolbar";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare enum AndroidSoftInputModes {
|
|
2
|
+
SOFT_INPUT_ADJUST_NOTHING = 48,
|
|
3
|
+
SOFT_INPUT_ADJUST_PAN = 32,
|
|
4
|
+
SOFT_INPUT_ADJUST_RESIZE = 16,
|
|
5
|
+
SOFT_INPUT_ADJUST_UNSPECIFIED = 0,
|
|
6
|
+
SOFT_INPUT_IS_FORWARD_NAVIGATION = 256,
|
|
7
|
+
SOFT_INPUT_MASK_ADJUST = 240,
|
|
8
|
+
SOFT_INPUT_MASK_STATE = 15,
|
|
9
|
+
SOFT_INPUT_MODE_CHANGED = 512,
|
|
10
|
+
SOFT_INPUT_STATE_ALWAYS_HIDDEN = 3,
|
|
11
|
+
SOFT_INPUT_STATE_ALWAYS_VISIBLE = 5,
|
|
12
|
+
SOFT_INPUT_STATE_HIDDEN = 2,
|
|
13
|
+
SOFT_INPUT_STATE_UNCHANGED = 1,
|
|
14
|
+
SOFT_INPUT_STATE_UNSPECIFIED = 0,
|
|
15
|
+
SOFT_INPUT_STATE_VISIBLE = 4
|
|
16
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Animated } from "react-native";
|
|
2
|
+
import type { FocusedInputHandlers, FocusedInputLayoutChangedEvent, KeyboardHandlers } from "./types";
|
|
3
|
+
import type React from "react";
|
|
4
|
+
import type { SharedValue } from "react-native-reanimated";
|
|
5
|
+
export type AnimatedContext = {
|
|
6
|
+
progress: Animated.Value;
|
|
7
|
+
height: Animated.AnimatedMultiplication<number>;
|
|
8
|
+
};
|
|
9
|
+
export type ReanimatedContext = {
|
|
10
|
+
progress: SharedValue<number>;
|
|
11
|
+
height: SharedValue<number>;
|
|
12
|
+
};
|
|
13
|
+
export type KeyboardAnimationContext = {
|
|
14
|
+
enabled: boolean;
|
|
15
|
+
animated: AnimatedContext;
|
|
16
|
+
reanimated: ReanimatedContext;
|
|
17
|
+
layout: SharedValue<FocusedInputLayoutChangedEvent | null>;
|
|
18
|
+
setKeyboardHandlers: (handlers: KeyboardHandlers) => void;
|
|
19
|
+
setInputHandlers: (handlers: FocusedInputHandlers) => void;
|
|
20
|
+
setEnabled: React.Dispatch<React.SetStateAction<boolean>>;
|
|
21
|
+
};
|
|
22
|
+
export declare const KeyboardContext: React.Context<KeyboardAnimationContext>;
|
|
23
|
+
export declare const useKeyboardContext: () => KeyboardAnimationContext;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { AnimatedContext, ReanimatedContext } from "../context";
|
|
2
|
+
import type { FocusedInputHandler, KeyboardHandler } from "../types";
|
|
3
|
+
import type { DependencyList } from "react";
|
|
4
|
+
export declare const useResizeMode: () => void;
|
|
5
|
+
export declare const useKeyboardAnimation: () => AnimatedContext;
|
|
6
|
+
export declare const useReanimatedKeyboardAnimation: () => ReanimatedContext;
|
|
7
|
+
export declare function useGenericKeyboardHandler(handler: KeyboardHandler, deps?: DependencyList): void;
|
|
8
|
+
export declare function useKeyboardHandler(handler: KeyboardHandler, deps?: DependencyList): void;
|
|
9
|
+
export declare function useKeyboardController(): {
|
|
10
|
+
setEnabled: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
11
|
+
enabled: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare function useReanimatedFocusedInput(): {
|
|
14
|
+
input: import("react-native-reanimated").SharedValue<import("../types").FocusedInputLayoutChangedEvent | null>;
|
|
15
|
+
};
|
|
16
|
+
export declare function useFocusedInputHandler(handler?: FocusedInputHandler, deps?: DependencyList): void;
|
|
17
|
+
export * from "./useWindowDimensions";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useWindowDimensions } from "react-native";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from "./bindings";
|
|
2
|
+
export * from "./animated";
|
|
3
|
+
export * from "./context";
|
|
4
|
+
export * from "./hooks";
|
|
5
|
+
export * from "./constants";
|
|
6
|
+
export * from "./module";
|
|
7
|
+
export * from "./types";
|
|
8
|
+
export { KeyboardAvoidingView, KeyboardStickyView, KeyboardAwareScrollView, KeyboardToolbar, DefaultKeyboardToolbarTheme, } from "./components";
|
|
9
|
+
export type { KeyboardAvoidingViewProps, KeyboardStickyViewProps, KeyboardAwareScrollViewProps, KeyboardToolbarProps, } from "./components";
|
|
10
|
+
export { OverKeyboardView } from "./views";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Animated } from "react-native";
|
|
2
|
+
import type { Handlers } from "./types";
|
|
3
|
+
type UntypedHandler = Record<string, (event: never) => void>;
|
|
4
|
+
type SharedHandlersReturnType<T extends UntypedHandler> = [
|
|
5
|
+
(handler: Handlers<T>) => void,
|
|
6
|
+
<K extends keyof T>(type: K, event: Parameters<T[K]>[0]) => void
|
|
7
|
+
];
|
|
8
|
+
/**
|
|
9
|
+
* Hook for storing worklet handlers (objects with keys, where values are worklets).
|
|
10
|
+
* Returns methods for setting handlers and broadcasting events in them.
|
|
11
|
+
*
|
|
12
|
+
* T is a generic that looks like:
|
|
13
|
+
* @example
|
|
14
|
+
* {
|
|
15
|
+
* onEvent: () => {},
|
|
16
|
+
* onEvent2: () => {},
|
|
17
|
+
* }
|
|
18
|
+
*/
|
|
19
|
+
export declare function useSharedHandlers<T extends UntypedHandler>(): SharedHandlersReturnType<T>;
|
|
20
|
+
/**
|
|
21
|
+
* TS variant of `useAnimatedValue` hook which is added in RN 0.71
|
|
22
|
+
* A better alternative of storing animated values in refs, since
|
|
23
|
+
* it doesn't recreate a new `Animated.Value` object on every re-render
|
|
24
|
+
* and therefore consumes less memory. We can not use a variant from
|
|
25
|
+
* RN, since this library supports earlier versions of RN.
|
|
26
|
+
*
|
|
27
|
+
* @see https://github.com/facebook/react-native/commit/e22217fe8b9455e32695f88ca835e11442b0a937
|
|
28
|
+
*/
|
|
29
|
+
export declare function useAnimatedValue(initialValue: number, config?: Animated.AnimatedConfig): Animated.Value;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { EventWithName, FocusedInputLayoutChangedEvent, FocusedInputLayoutHandlerHook, FocusedInputSelectionChangedEvent, FocusedInputSelectionHandlerHook, FocusedInputTextChangedEvent, FocusedInputTextHandlerHook, KeyboardHandlerHook, NativeEvent } from "./types";
|
|
2
|
+
export declare const useAnimatedKeyboardHandler: KeyboardHandlerHook<Record<string, unknown>, EventWithName<NativeEvent>>;
|
|
3
|
+
export declare const useFocusedInputLayoutHandler: FocusedInputLayoutHandlerHook<Record<string, unknown>, EventWithName<FocusedInputLayoutChangedEvent>>;
|
|
4
|
+
export declare const useFocusedInputTextHandler: FocusedInputTextHandlerHook<Record<string, unknown>, EventWithName<FocusedInputTextChangedEvent>>;
|
|
5
|
+
export declare const useFocusedInputSelectionHandler: FocusedInputSelectionHandlerHook<Record<string, unknown>, EventWithName<FocusedInputSelectionChangedEvent>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { EventWithName, FocusedInputLayoutChangedEvent, FocusedInputLayoutHandlerHook, FocusedInputSelectionChangedEvent, FocusedInputSelectionHandlerHook, FocusedInputTextChangedEvent, FocusedInputTextHandlerHook, KeyboardHandlerHook, NativeEvent } from "./types";
|
|
2
|
+
type EventContext = Record<string, unknown>;
|
|
3
|
+
export declare const useAnimatedKeyboardHandler: KeyboardHandlerHook<EventContext, EventWithName<NativeEvent>>;
|
|
4
|
+
export declare const useFocusedInputLayoutHandler: FocusedInputLayoutHandlerHook<EventContext, EventWithName<FocusedInputLayoutChangedEvent>>;
|
|
5
|
+
export declare const useFocusedInputTextHandler: FocusedInputTextHandlerHook<EventContext, EventWithName<FocusedInputTextChangedEvent>>;
|
|
6
|
+
export declare const useFocusedInputSelectionHandler: FocusedInputSelectionHandlerHook<EventContext, EventWithName<FocusedInputSelectionChangedEvent>>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { HostComponent } from "react-native";
|
|
2
|
+
import type { ViewProps } from "react-native/Libraries/Components/View/ViewPropTypes";
|
|
3
|
+
import type { DirectEventHandler, Double, Int32 } from "react-native/Libraries/Types/CodegenTypes";
|
|
4
|
+
type KeyboardMoveEvent = Readonly<{
|
|
5
|
+
height: Double;
|
|
6
|
+
progress: Double;
|
|
7
|
+
duration: Int32;
|
|
8
|
+
target: Int32;
|
|
9
|
+
}>;
|
|
10
|
+
type FocusedInputLayoutChangedEvent = Readonly<{
|
|
11
|
+
target: Int32;
|
|
12
|
+
parentScrollViewTarget: Int32;
|
|
13
|
+
layout: {
|
|
14
|
+
x: Double;
|
|
15
|
+
y: Double;
|
|
16
|
+
width: Double;
|
|
17
|
+
height: Double;
|
|
18
|
+
absoluteX: Double;
|
|
19
|
+
absoluteY: Double;
|
|
20
|
+
};
|
|
21
|
+
}>;
|
|
22
|
+
type FocusedInputTextChangedEvent = Readonly<{
|
|
23
|
+
text: string;
|
|
24
|
+
}>;
|
|
25
|
+
type FocusedInputSelectionChangedEvent = Readonly<{
|
|
26
|
+
target: Int32;
|
|
27
|
+
selection: {
|
|
28
|
+
start: {
|
|
29
|
+
x: Double;
|
|
30
|
+
y: Double;
|
|
31
|
+
position: Int32;
|
|
32
|
+
};
|
|
33
|
+
end: {
|
|
34
|
+
x: Double;
|
|
35
|
+
y: Double;
|
|
36
|
+
position: Int32;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
}>;
|
|
40
|
+
export interface NativeProps extends ViewProps {
|
|
41
|
+
enabled?: boolean;
|
|
42
|
+
statusBarTranslucent?: boolean;
|
|
43
|
+
navigationBarTranslucent?: boolean;
|
|
44
|
+
preserveEdgeToEdge?: boolean;
|
|
45
|
+
onKeyboardMoveStart?: DirectEventHandler<KeyboardMoveEvent>;
|
|
46
|
+
onKeyboardMove?: DirectEventHandler<KeyboardMoveEvent>;
|
|
47
|
+
onKeyboardMoveEnd?: DirectEventHandler<KeyboardMoveEvent>;
|
|
48
|
+
onKeyboardMoveInteractive?: DirectEventHandler<KeyboardMoveEvent>;
|
|
49
|
+
onFocusedInputLayoutChanged?: DirectEventHandler<FocusedInputLayoutChangedEvent>;
|
|
50
|
+
onFocusedInputTextChanged?: DirectEventHandler<FocusedInputTextChangedEvent>;
|
|
51
|
+
onFocusedInputSelectionChanged?: DirectEventHandler<FocusedInputSelectionChangedEvent>;
|
|
52
|
+
}
|
|
53
|
+
declare const _default: HostComponent<NativeProps>;
|
|
54
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { HostComponent } from "react-native";
|
|
2
|
+
import type { ViewProps } from "react-native/Libraries/Components/View/ViewPropTypes";
|
|
3
|
+
import type { Double, WithDefault } from "react-native/Libraries/Types/CodegenTypes";
|
|
4
|
+
export interface NativeProps extends ViewProps {
|
|
5
|
+
interpolator?: WithDefault<"linear" | "ios", "linear">;
|
|
6
|
+
showOnSwipeUp?: boolean;
|
|
7
|
+
enableSwipeToDismiss?: boolean;
|
|
8
|
+
offset?: Double;
|
|
9
|
+
textInputNativeID?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const _default: HostComponent<NativeProps>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { TurboModule } from "react-native";
|
|
2
|
+
export interface Spec extends TurboModule {
|
|
3
|
+
readonly getConstants: () => {};
|
|
4
|
+
setInputMode(mode: number): void;
|
|
5
|
+
setDefaultMode(): void;
|
|
6
|
+
dismiss(keepFocus: boolean): void;
|
|
7
|
+
setFocusTo(direction: string): void;
|
|
8
|
+
addListener: (eventName: string) => void;
|
|
9
|
+
removeListeners: (count: number) => void;
|
|
10
|
+
}
|
|
11
|
+
declare const _default: Spec | null;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { TurboModule } from "react-native";
|
|
2
|
+
export interface Spec extends TurboModule {
|
|
3
|
+
readonly getConstants: () => {};
|
|
4
|
+
setHidden(hidden: boolean): void;
|
|
5
|
+
setColor(color: number, animated: boolean): void;
|
|
6
|
+
setTranslucent(translucent: boolean): void;
|
|
7
|
+
setStyle(style: string): void;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: Spec | null;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { HostComponent } from "react-native";
|
|
2
|
+
import type { ViewProps } from "react-native/Libraries/Components/View/ViewPropTypes";
|
|
3
|
+
export interface NativeProps extends ViewProps {
|
|
4
|
+
visible?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare const _default: HostComponent<NativeProps>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import type { PropsWithChildren } from "react";
|
|
2
|
+
import type { EmitterSubscription, NativeSyntheticEvent, TextInputProps, ViewProps } from "react-native";
|
|
3
|
+
export type NativeEvent = {
|
|
4
|
+
progress: number;
|
|
5
|
+
height: number;
|
|
6
|
+
duration: number;
|
|
7
|
+
target: number;
|
|
8
|
+
};
|
|
9
|
+
export type FocusedInputLayoutChangedEvent = {
|
|
10
|
+
target: number;
|
|
11
|
+
parentScrollViewTarget: number;
|
|
12
|
+
layout: {
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
absoluteX: number;
|
|
18
|
+
absoluteY: number;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export type FocusedInputTextChangedEvent = {
|
|
22
|
+
text: string;
|
|
23
|
+
};
|
|
24
|
+
export type FocusedInputSelectionChangedEvent = {
|
|
25
|
+
target: number;
|
|
26
|
+
selection: {
|
|
27
|
+
start: {
|
|
28
|
+
x: number;
|
|
29
|
+
y: number;
|
|
30
|
+
position: number;
|
|
31
|
+
};
|
|
32
|
+
end: {
|
|
33
|
+
x: number;
|
|
34
|
+
y: number;
|
|
35
|
+
position: number;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export type EventWithName<T> = {
|
|
40
|
+
eventName: string;
|
|
41
|
+
} & T;
|
|
42
|
+
export type KeyboardControllerProps = {
|
|
43
|
+
onKeyboardMoveStart?: (e: NativeSyntheticEvent<EventWithName<NativeEvent>>) => void;
|
|
44
|
+
onKeyboardMove?: (e: NativeSyntheticEvent<EventWithName<NativeEvent>>) => void;
|
|
45
|
+
onKeyboardMoveEnd?: (e: NativeSyntheticEvent<EventWithName<NativeEvent>>) => void;
|
|
46
|
+
onKeyboardMoveInteractive?: (e: NativeSyntheticEvent<EventWithName<NativeEvent>>) => void;
|
|
47
|
+
onFocusedInputLayoutChanged?: (e: NativeSyntheticEvent<EventWithName<FocusedInputLayoutChangedEvent>>) => void;
|
|
48
|
+
onFocusedInputTextChanged?: (e: NativeSyntheticEvent<EventWithName<FocusedInputTextChangedEvent>>) => void;
|
|
49
|
+
onFocusedInputSelectionChanged?: (e: NativeSyntheticEvent<EventWithName<FocusedInputSelectionChangedEvent>>) => void;
|
|
50
|
+
onKeyboardMoveReanimated?: (e: NativeSyntheticEvent<EventWithName<NativeEvent>>) => void;
|
|
51
|
+
onFocusedInputLayoutChangedReanimated?: (e: NativeSyntheticEvent<EventWithName<FocusedInputLayoutChangedEvent>>) => void;
|
|
52
|
+
onFocusedInputTextChangedReanimated?: (e: NativeSyntheticEvent<EventWithName<FocusedInputTextChangedEvent>>) => void;
|
|
53
|
+
onFocusedInputSelectionChangedReanimated?: (e: NativeSyntheticEvent<EventWithName<FocusedInputSelectionChangedEvent>>) => void;
|
|
54
|
+
statusBarTranslucent?: boolean;
|
|
55
|
+
navigationBarTranslucent?: boolean;
|
|
56
|
+
preserveEdgeToEdge?: boolean;
|
|
57
|
+
enabled?: boolean;
|
|
58
|
+
} & ViewProps;
|
|
59
|
+
export type KeyboardGestureAreaProps = {
|
|
60
|
+
interpolator?: "ios" | "linear";
|
|
61
|
+
/**
|
|
62
|
+
* Whether to allow to show a keyboard from dismissed state by swipe up.
|
|
63
|
+
* Default to `false`.
|
|
64
|
+
*/
|
|
65
|
+
showOnSwipeUp?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Whether to allow to control a keyboard by gestures. The strategy how
|
|
68
|
+
* it should be controlled is determined by `interpolator` property.
|
|
69
|
+
* Defaults to `true`.
|
|
70
|
+
*/
|
|
71
|
+
enableSwipeToDismiss?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Extra distance to the keyboard.
|
|
74
|
+
*/
|
|
75
|
+
offset?: number;
|
|
76
|
+
/**
|
|
77
|
+
* A corresponding `nativeID` value from the corresponding `TextInput`.
|
|
78
|
+
*/
|
|
79
|
+
textInputNativeID?: string;
|
|
80
|
+
} & ViewProps;
|
|
81
|
+
export type OverKeyboardViewProps = PropsWithChildren<{
|
|
82
|
+
visible: boolean;
|
|
83
|
+
}>;
|
|
84
|
+
export type Direction = "next" | "prev" | "current";
|
|
85
|
+
export type DismissOptions = {
|
|
86
|
+
keepFocus: boolean;
|
|
87
|
+
};
|
|
88
|
+
export type KeyboardControllerModule = {
|
|
89
|
+
setDefaultMode: () => void;
|
|
90
|
+
setInputMode: (mode: number) => void;
|
|
91
|
+
dismiss: (options?: DismissOptions) => Promise<void>;
|
|
92
|
+
setFocusTo: (direction: Direction) => void;
|
|
93
|
+
isVisible: () => boolean;
|
|
94
|
+
state: () => KeyboardEventData | null;
|
|
95
|
+
addListener: (eventName: string) => void;
|
|
96
|
+
removeListeners: (count: number) => void;
|
|
97
|
+
};
|
|
98
|
+
export type KeyboardControllerNativeModule = {
|
|
99
|
+
setDefaultMode: () => void;
|
|
100
|
+
setInputMode: (mode: number) => void;
|
|
101
|
+
dismiss: (keepFocus: boolean) => void;
|
|
102
|
+
setFocusTo: (direction: Direction) => void;
|
|
103
|
+
addListener: (eventName: string) => void;
|
|
104
|
+
removeListeners: (count: number) => void;
|
|
105
|
+
};
|
|
106
|
+
export type KeyboardControllerEvents = "keyboardWillShow" | "keyboardDidShow" | "keyboardWillHide" | "keyboardDidHide";
|
|
107
|
+
export type KeyboardEventData = {
|
|
108
|
+
height: number;
|
|
109
|
+
duration: number;
|
|
110
|
+
timestamp: number;
|
|
111
|
+
target: number;
|
|
112
|
+
type: NonNullable<TextInputProps["keyboardType"]>;
|
|
113
|
+
appearance: NonNullable<TextInputProps["keyboardAppearance"]>;
|
|
114
|
+
};
|
|
115
|
+
export type KeyboardEventsModule = {
|
|
116
|
+
addListener: (name: KeyboardControllerEvents, cb: (e: KeyboardEventData) => void) => EmitterSubscription;
|
|
117
|
+
};
|
|
118
|
+
export type FocusedInputAvailableEvents = "focusDidSet";
|
|
119
|
+
export type FocusedInputEventData = {
|
|
120
|
+
current: number;
|
|
121
|
+
count: number;
|
|
122
|
+
};
|
|
123
|
+
export type FocusedInputEventsModule = {
|
|
124
|
+
addListener: (name: FocusedInputAvailableEvents, cb: (e: FocusedInputEventData) => void) => EmitterSubscription;
|
|
125
|
+
};
|
|
126
|
+
export type WindowDimensionsAvailableEvents = "windowDidResize";
|
|
127
|
+
export type WindowDimensionsEventData = {
|
|
128
|
+
width: number;
|
|
129
|
+
height: number;
|
|
130
|
+
};
|
|
131
|
+
export type WindowDimensionsEventsModule = {
|
|
132
|
+
addListener: (name: WindowDimensionsAvailableEvents, cb: (e: WindowDimensionsEventData) => void) => EmitterSubscription;
|
|
133
|
+
};
|
|
134
|
+
export type KeyboardHandlerHook<TContext, Event> = (handlers: {
|
|
135
|
+
onKeyboardMoveStart?: (e: NativeEvent, context: TContext) => void;
|
|
136
|
+
onKeyboardMove?: (e: NativeEvent, context: TContext) => void;
|
|
137
|
+
onKeyboardMoveEnd?: (e: NativeEvent, context: TContext) => void;
|
|
138
|
+
onKeyboardMoveInteractive?: (e: NativeEvent, context: TContext) => void;
|
|
139
|
+
}, dependencies?: unknown[]) => (e: NativeSyntheticEvent<Event>) => void;
|
|
140
|
+
export type FocusedInputLayoutHandlerHook<TContext, Event> = (handlers: {
|
|
141
|
+
onFocusedInputLayoutChanged?: (e: FocusedInputLayoutChangedEvent, context: TContext) => void;
|
|
142
|
+
}, dependencies?: unknown[]) => (e: NativeSyntheticEvent<Event>) => void;
|
|
143
|
+
export type FocusedInputTextHandlerHook<TContext, Event> = (handlers: {
|
|
144
|
+
onFocusedInputTextChanged?: (e: FocusedInputTextChangedEvent, context: TContext) => void;
|
|
145
|
+
}, dependencies?: unknown[]) => (e: NativeSyntheticEvent<Event>) => void;
|
|
146
|
+
export type FocusedInputSelectionHandlerHook<TContext, Event> = (handlers: {
|
|
147
|
+
onFocusedInputSelectionChanged?: (e: FocusedInputSelectionChangedEvent, context: TContext) => void;
|
|
148
|
+
}, dependencies?: unknown[]) => (e: NativeSyntheticEvent<Event>) => void;
|
|
149
|
+
export type Handlers<T> = Record<string, T | undefined>;
|
|
150
|
+
export type KeyboardHandler = Partial<{
|
|
151
|
+
onStart: (e: NativeEvent) => void;
|
|
152
|
+
onMove: (e: NativeEvent) => void;
|
|
153
|
+
onEnd: (e: NativeEvent) => void;
|
|
154
|
+
onInteractive: (e: NativeEvent) => void;
|
|
155
|
+
}>;
|
|
156
|
+
export type KeyboardHandlers = Handlers<KeyboardHandler>;
|
|
157
|
+
export type FocusedInputHandler = Partial<{
|
|
158
|
+
onChangeText: (e: FocusedInputTextChangedEvent) => void;
|
|
159
|
+
onSelectionChange: (e: FocusedInputSelectionChangedEvent) => void;
|
|
160
|
+
}>;
|
|
161
|
+
export type FocusedInputHandlers = Handlers<FocusedInputHandler>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const uuid: () => string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { OverKeyboardViewProps } from "../../types";
|
|
3
|
+
import type { PropsWithChildren } from "react";
|
|
4
|
+
declare const OverKeyboardView: ({ children, visible, }: PropsWithChildren<OverKeyboardViewProps>) => React.JSX.Element;
|
|
5
|
+
export default OverKeyboardView;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as OverKeyboardView } from "./OverKeyboardView";
|