react-native-keyboard-controller 1.17.1 → 1.17.2

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.
Files changed (118) hide show
  1. package/README.md +24 -23
  2. package/lib/commonjs/animated.js +23 -7
  3. package/lib/commonjs/animated.js.map +1 -1
  4. package/lib/commonjs/bindings.js +19 -0
  5. package/lib/commonjs/bindings.js.map +1 -1
  6. package/lib/commonjs/components/KeyboardAvoidingView/index.js +11 -2
  7. package/lib/commonjs/components/KeyboardAvoidingView/index.js.map +1 -1
  8. package/lib/commonjs/components/KeyboardAwareScrollView/index.js +51 -36
  9. package/lib/commonjs/components/KeyboardAwareScrollView/index.js.map +1 -1
  10. package/lib/commonjs/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.js +17 -1
  11. package/lib/commonjs/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.js.map +1 -1
  12. package/lib/commonjs/components/KeyboardStickyView/index.js +13 -0
  13. package/lib/commonjs/components/KeyboardStickyView/index.js.map +1 -1
  14. package/lib/commonjs/components/KeyboardToolbar/index.js +31 -22
  15. package/lib/commonjs/components/KeyboardToolbar/index.js.map +1 -1
  16. package/lib/commonjs/context.js +16 -0
  17. package/lib/commonjs/context.js.map +1 -1
  18. package/lib/commonjs/hooks/index.js +164 -0
  19. package/lib/commonjs/hooks/index.js.map +1 -1
  20. package/lib/commonjs/hooks/useKeyboardState/index.js +21 -0
  21. package/lib/commonjs/hooks/useKeyboardState/index.js.map +1 -1
  22. package/lib/commonjs/internal.js +21 -0
  23. package/lib/commonjs/internal.js.map +1 -1
  24. package/lib/commonjs/module.js +4 -0
  25. package/lib/commonjs/module.js.map +1 -1
  26. package/lib/commonjs/monkey-patch.android.js +0 -5
  27. package/lib/commonjs/monkey-patch.android.js.map +1 -1
  28. package/lib/commonjs/{types.js → types/hooks.js} +1 -1
  29. package/lib/commonjs/types/hooks.js.map +1 -0
  30. package/lib/commonjs/types/index.js +50 -0
  31. package/lib/commonjs/types/index.js.map +1 -0
  32. package/lib/commonjs/types/internal.js +6 -0
  33. package/lib/commonjs/types/internal.js.map +1 -0
  34. package/lib/commonjs/types/module.js +6 -0
  35. package/lib/commonjs/types/module.js.map +1 -0
  36. package/lib/commonjs/types/views.js +6 -0
  37. package/lib/commonjs/types/views.js.map +1 -0
  38. package/lib/commonjs/views/OverKeyboardView/index.js +18 -4
  39. package/lib/commonjs/views/OverKeyboardView/index.js.map +1 -1
  40. package/lib/module/animated.js +23 -7
  41. package/lib/module/animated.js.map +1 -1
  42. package/lib/module/bindings.js +19 -0
  43. package/lib/module/bindings.js.map +1 -1
  44. package/lib/module/components/KeyboardAvoidingView/index.js +11 -2
  45. package/lib/module/components/KeyboardAvoidingView/index.js.map +1 -1
  46. package/lib/module/components/KeyboardAwareScrollView/index.js +51 -36
  47. package/lib/module/components/KeyboardAwareScrollView/index.js.map +1 -1
  48. package/lib/module/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.js +17 -1
  49. package/lib/module/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.js.map +1 -1
  50. package/lib/module/components/KeyboardStickyView/index.js +13 -0
  51. package/lib/module/components/KeyboardStickyView/index.js.map +1 -1
  52. package/lib/module/components/KeyboardToolbar/index.js +31 -22
  53. package/lib/module/components/KeyboardToolbar/index.js.map +1 -1
  54. package/lib/module/context.js +16 -0
  55. package/lib/module/context.js.map +1 -1
  56. package/lib/module/hooks/index.js +164 -0
  57. package/lib/module/hooks/index.js.map +1 -1
  58. package/lib/module/hooks/useKeyboardState/index.js +21 -0
  59. package/lib/module/hooks/useKeyboardState/index.js.map +1 -1
  60. package/lib/module/internal.js +21 -0
  61. package/lib/module/internal.js.map +1 -1
  62. package/lib/module/module.js +4 -0
  63. package/lib/module/module.js.map +1 -1
  64. package/lib/module/monkey-patch.android.js +0 -5
  65. package/lib/module/monkey-patch.android.js.map +1 -1
  66. package/lib/module/types/hooks.js +2 -0
  67. package/lib/module/types/hooks.js.map +1 -0
  68. package/lib/module/types/index.js +5 -0
  69. package/lib/module/types/index.js.map +1 -0
  70. package/lib/module/types/internal.js +2 -0
  71. package/lib/module/types/internal.js.map +1 -0
  72. package/lib/module/types/module.js +2 -0
  73. package/lib/module/types/module.js.map +1 -0
  74. package/lib/module/types/views.js +2 -0
  75. package/lib/module/types/views.js.map +1 -0
  76. package/lib/module/views/OverKeyboardView/index.js +18 -4
  77. package/lib/module/views/OverKeyboardView/index.js.map +1 -1
  78. package/lib/typescript/animated.d.ts +20 -6
  79. package/lib/typescript/bindings.d.ts +19 -0
  80. package/lib/typescript/components/KeyboardAvoidingView/index.d.ts +11 -2
  81. package/lib/typescript/components/KeyboardAwareScrollView/index.d.ts +23 -6
  82. package/lib/typescript/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.d.ts +17 -1
  83. package/lib/typescript/components/KeyboardStickyView/index.d.ts +15 -2
  84. package/lib/typescript/components/KeyboardToolbar/index.d.ts +13 -2
  85. package/lib/typescript/context.d.ts +32 -0
  86. package/lib/typescript/hooks/index.d.ts +157 -0
  87. package/lib/typescript/hooks/useKeyboardState/index.d.ts +20 -0
  88. package/lib/typescript/internal.d.ts +21 -0
  89. package/lib/typescript/module.d.ts +3 -0
  90. package/lib/typescript/{types.d.ts → types/hooks.d.ts} +72 -78
  91. package/lib/typescript/types/index.d.ts +4 -0
  92. package/lib/typescript/types/internal.d.ts +17 -0
  93. package/lib/typescript/types/module.d.ts +91 -0
  94. package/lib/typescript/types/views.d.ts +45 -0
  95. package/lib/typescript/views/OverKeyboardView/index.d.ts +14 -1
  96. package/package.json +2 -1
  97. package/src/animated.tsx +27 -12
  98. package/src/bindings.ts +19 -0
  99. package/src/components/KeyboardAvoidingView/index.tsx +11 -2
  100. package/src/components/KeyboardAwareScrollView/index.tsx +54 -39
  101. package/src/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.ts +17 -1
  102. package/src/components/KeyboardStickyView/index.tsx +14 -1
  103. package/src/components/KeyboardToolbar/index.tsx +31 -19
  104. package/src/context.ts +33 -0
  105. package/src/hooks/index.ts +157 -0
  106. package/src/hooks/useKeyboardState/index.ts +20 -0
  107. package/src/internal.ts +21 -0
  108. package/src/module.ts +3 -0
  109. package/src/monkey-patch.android.ts +3 -6
  110. package/src/{types.ts → types/hooks.ts} +72 -105
  111. package/src/types/index.ts +4 -0
  112. package/src/types/internal.ts +24 -0
  113. package/src/types/module.ts +105 -0
  114. package/src/types/views.ts +46 -0
  115. package/src/views/OverKeyboardView/index.tsx +15 -4
  116. package/lib/commonjs/types.js.map +0 -1
  117. package/lib/module/types.js +0 -2
  118. package/lib/module/types.js.map +0 -1
@@ -0,0 +1,46 @@
1
+ import type { PropsWithChildren } from "react";
2
+ import type { ViewProps } from "react-native";
3
+
4
+ export type KeyboardGestureAreaProps = {
5
+ /**
6
+ * Determines how the keyboard position will be controlled:
7
+ * - `ios` - keyboard will be following finger only when finger touches keyboard
8
+ * - `linear` - keyboard will be following finger position linearly.
9
+ *
10
+ * @platform android
11
+ */
12
+ interpolator?: "ios" | "linear";
13
+ /**
14
+ * Whether to allow to show a keyboard from dismissed state by swipe up.
15
+ * Default to `false`.
16
+ *
17
+ * @platform android
18
+ */
19
+ showOnSwipeUp?: boolean;
20
+ /**
21
+ * Whether to allow to control a keyboard by gestures. The strategy how
22
+ * it should be controlled is determined by `interpolator` property.
23
+ * Defaults to `true`.
24
+ *
25
+ * @platform android
26
+ */
27
+ enableSwipeToDismiss?: boolean;
28
+ /**
29
+ * Extra distance to the keyboard.
30
+ */
31
+ offset?: number;
32
+ /**
33
+ * A corresponding `nativeID` value from the associated `TextInput` (a string that links the `KeyboardGestureArea` to one or more `TextInput` components).
34
+ * This is **required on iOS** in order to apply the `offset` when the keyboard is shown. Only the currently focused `TextInput` with a matching `nativeID`
35
+ * will receive offset behavior.
36
+ *
37
+ * @platform ios
38
+ */
39
+ textInputNativeID?: string;
40
+ } & ViewProps;
41
+ export type OverKeyboardViewProps = PropsWithChildren<{
42
+ /**
43
+ * A boolean prop indicating whether the view is visible or not. If it's true then view is shown on the screen. If it's false then view is hidden.
44
+ */
45
+ visible: boolean;
46
+ }>;
@@ -7,10 +7,21 @@ import { useWindowDimensions } from "../../hooks";
7
7
  import type { OverKeyboardViewProps } from "../../types";
8
8
  import type { PropsWithChildren } from "react";
9
9
 
10
- const OverKeyboardView = ({
11
- children,
12
- visible,
13
- }: PropsWithChildren<OverKeyboardViewProps>) => {
10
+ /**
11
+ * A view component that renders its children over the keyboard without closing the keyboard.
12
+ * Acts similar to modal, but doesn't close the keyboard when it's visible.
13
+ *
14
+ * @param props - Component props.
15
+ * @returns A view component that renders over the keyboard.
16
+ * @example
17
+ * ```tsx
18
+ * <OverKeyboardView visible={true}>
19
+ * <Text>This will appear over the keyboard</Text>
20
+ * </OverKeyboardView>
21
+ * ```
22
+ */
23
+ const OverKeyboardView = (props: PropsWithChildren<OverKeyboardViewProps>) => {
24
+ const { children, visible } = props;
14
25
  const { height, width } = useWindowDimensions();
15
26
  const inner = useMemo(() => ({ height, width }), [height, width]);
16
27
  const style = useMemo(
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport type {\n EmitterSubscription,\n NativeSyntheticEvent,\n TextInputProps,\n ViewProps,\n} from \"react-native\";\n\n// DirectEventHandler events declaration\nexport type NativeEvent = {\n progress: number;\n height: number;\n duration: number;\n target: number;\n};\nexport type FocusedInputLayoutChangedEvent = {\n target: number;\n parentScrollViewTarget: number;\n layout: {\n x: number;\n y: number;\n width: number;\n height: number;\n absoluteX: number;\n absoluteY: number;\n };\n};\nexport type FocusedInputTextChangedEvent = {\n text: string;\n};\nexport type FocusedInputSelectionChangedEvent = {\n target: number;\n selection: {\n start: {\n x: number;\n y: number;\n position: number;\n };\n end: {\n x: number;\n y: number;\n position: number;\n };\n };\n};\nexport type EventWithName<T> = {\n eventName: string;\n} & T;\n\n// native View/Module declarations\nexport type KeyboardControllerProps = {\n //ref prop\n ref?: React.Ref<React.Component<KeyboardControllerProps>>;\n // callback props\n onKeyboardMoveStart?: (\n e: NativeSyntheticEvent<EventWithName<NativeEvent>>,\n ) => void;\n onKeyboardMove?: (\n e: NativeSyntheticEvent<EventWithName<NativeEvent>>,\n ) => void;\n onKeyboardMoveEnd?: (\n e: NativeSyntheticEvent<EventWithName<NativeEvent>>,\n ) => void;\n onKeyboardMoveInteractive?: (\n e: NativeSyntheticEvent<EventWithName<NativeEvent>>,\n ) => void;\n onFocusedInputLayoutChanged?: (\n e: NativeSyntheticEvent<EventWithName<FocusedInputLayoutChangedEvent>>,\n ) => void;\n onFocusedInputTextChanged?: (\n e: NativeSyntheticEvent<EventWithName<FocusedInputTextChangedEvent>>,\n ) => void;\n onFocusedInputSelectionChanged?: (\n e: NativeSyntheticEvent<EventWithName<FocusedInputSelectionChangedEvent>>,\n ) => void;\n // fake props used to activate reanimated bindings\n onKeyboardMoveReanimated?: (\n e: NativeSyntheticEvent<EventWithName<NativeEvent>>,\n ) => void;\n onFocusedInputLayoutChangedReanimated?: (\n e: NativeSyntheticEvent<EventWithName<FocusedInputLayoutChangedEvent>>,\n ) => void;\n onFocusedInputTextChangedReanimated?: (\n e: NativeSyntheticEvent<EventWithName<FocusedInputTextChangedEvent>>,\n ) => void;\n onFocusedInputSelectionChangedReanimated?: (\n e: NativeSyntheticEvent<EventWithName<FocusedInputSelectionChangedEvent>>,\n ) => void;\n // props\n statusBarTranslucent?: boolean;\n navigationBarTranslucent?: boolean;\n preserveEdgeToEdge?: boolean;\n enabled?: boolean;\n} & ViewProps;\n\nexport type KeyboardGestureAreaProps = {\n interpolator?: \"ios\" | \"linear\";\n /**\n * Whether to allow to show a keyboard from dismissed state by swipe up.\n * Default to `false`.\n */\n showOnSwipeUp?: boolean;\n /**\n * Whether to allow to control a keyboard by gestures. The strategy how\n * it should be controlled is determined by `interpolator` property.\n * Defaults to `true`.\n */\n enableSwipeToDismiss?: boolean;\n /**\n * Extra distance to the keyboard.\n */\n offset?: number;\n /**\n * A corresponding `nativeID` value from the corresponding `TextInput`.\n */\n textInputNativeID?: string;\n} & ViewProps;\nexport type OverKeyboardViewProps = PropsWithChildren<{\n visible: boolean;\n}>;\n\nexport type Direction = \"next\" | \"prev\" | \"current\";\nexport type DismissOptions = {\n keepFocus: boolean;\n};\nexport type KeyboardControllerModule = {\n // android only\n setDefaultMode: () => void;\n setInputMode: (mode: number) => void;\n // all platforms\n dismiss: (options?: DismissOptions) => Promise<void>;\n setFocusTo: (direction: Direction) => void;\n isVisible: () => boolean;\n state: () => KeyboardEventData;\n};\nexport type KeyboardControllerNativeModule = {\n // android only\n setDefaultMode: () => void;\n setInputMode: (mode: number) => void;\n // all platforms\n dismiss: (keepFocus: boolean) => void;\n setFocusTo: (direction: Direction) => void;\n // native event module stuff\n addListener: (eventName: string) => void;\n removeListeners: (count: number) => void;\n};\n\n// Event module declarations\nexport type KeyboardControllerEvents =\n | \"keyboardWillShow\"\n | \"keyboardDidShow\"\n | \"keyboardWillHide\"\n | \"keyboardDidHide\";\nexport type KeyboardEventData = {\n height: number;\n duration: number;\n timestamp: number;\n target: number;\n type: NonNullable<TextInputProps[\"keyboardType\"]>;\n appearance: NonNullable<TextInputProps[\"keyboardAppearance\"]>;\n};\nexport type KeyboardState = {\n isVisible: boolean;\n} & KeyboardEventData;\nexport type KeyboardEventsModule = {\n addListener: (\n name: KeyboardControllerEvents,\n cb: (e: KeyboardEventData) => void,\n ) => EmitterSubscription;\n};\nexport type FocusedInputAvailableEvents = \"focusDidSet\";\nexport type FocusedInputEventData = {\n current: number;\n count: number;\n};\nexport type FocusedInputEventsModule = {\n addListener: (\n name: FocusedInputAvailableEvents,\n cb: (e: FocusedInputEventData) => void,\n ) => EmitterSubscription;\n};\nexport type WindowDimensionsAvailableEvents = \"windowDidResize\";\nexport type WindowDimensionsEventData = {\n width: number;\n height: number;\n};\nexport type WindowDimensionsEventsModule = {\n addListener: (\n name: WindowDimensionsAvailableEvents,\n cb: (e: WindowDimensionsEventData) => void,\n ) => EmitterSubscription;\n};\n\n// reanimated hook declaration\nexport type KeyboardHandlerHook<TContext, Event> = (\n handlers: {\n onKeyboardMoveStart?: (e: NativeEvent, context: TContext) => void;\n onKeyboardMove?: (e: NativeEvent, context: TContext) => void;\n onKeyboardMoveEnd?: (e: NativeEvent, context: TContext) => void;\n onKeyboardMoveInteractive?: (e: NativeEvent, context: TContext) => void;\n },\n dependencies?: unknown[],\n) => (e: NativeSyntheticEvent<Event>) => void;\nexport type FocusedInputLayoutHandlerHook<TContext, Event> = (\n handlers: {\n onFocusedInputLayoutChanged?: (\n e: FocusedInputLayoutChangedEvent,\n context: TContext,\n ) => void;\n },\n dependencies?: unknown[],\n) => (e: NativeSyntheticEvent<Event>) => void;\nexport type FocusedInputTextHandlerHook<TContext, Event> = (\n handlers: {\n onFocusedInputTextChanged?: (\n e: FocusedInputTextChangedEvent,\n context: TContext,\n ) => void;\n },\n dependencies?: unknown[],\n) => (e: NativeSyntheticEvent<Event>) => void;\nexport type FocusedInputSelectionHandlerHook<TContext, Event> = (\n handlers: {\n onFocusedInputSelectionChanged?: (\n e: FocusedInputSelectionChangedEvent,\n context: TContext,\n ) => void;\n },\n dependencies?: unknown[],\n) => (e: NativeSyntheticEvent<Event>) => void;\n\n// package types\nexport type Handlers<T> = Record<string, T | undefined>;\nexport type KeyboardHandler = Partial<{\n onStart: (e: NativeEvent) => void;\n onMove: (e: NativeEvent) => void;\n onEnd: (e: NativeEvent) => void;\n onInteractive: (e: NativeEvent) => void;\n}>;\nexport type KeyboardHandlers = Handlers<KeyboardHandler>;\nexport type FocusedInputHandler = Partial<{\n onChangeText: (e: FocusedInputTextChangedEvent) => void;\n onSelectionChange: (e: FocusedInputSelectionChangedEvent) => void;\n}>;\nexport type FocusedInputHandlers = Handlers<FocusedInputHandler>;\n"],"mappings":"","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport type {\n EmitterSubscription,\n NativeSyntheticEvent,\n TextInputProps,\n ViewProps,\n} from \"react-native\";\n\n// DirectEventHandler events declaration\nexport type NativeEvent = {\n progress: number;\n height: number;\n duration: number;\n target: number;\n};\nexport type FocusedInputLayoutChangedEvent = {\n target: number;\n parentScrollViewTarget: number;\n layout: {\n x: number;\n y: number;\n width: number;\n height: number;\n absoluteX: number;\n absoluteY: number;\n };\n};\nexport type FocusedInputTextChangedEvent = {\n text: string;\n};\nexport type FocusedInputSelectionChangedEvent = {\n target: number;\n selection: {\n start: {\n x: number;\n y: number;\n position: number;\n };\n end: {\n x: number;\n y: number;\n position: number;\n };\n };\n};\nexport type EventWithName<T> = {\n eventName: string;\n} & T;\n\n// native View/Module declarations\nexport type KeyboardControllerProps = {\n //ref prop\n ref?: React.Ref<React.Component<KeyboardControllerProps>>;\n // callback props\n onKeyboardMoveStart?: (\n e: NativeSyntheticEvent<EventWithName<NativeEvent>>,\n ) => void;\n onKeyboardMove?: (\n e: NativeSyntheticEvent<EventWithName<NativeEvent>>,\n ) => void;\n onKeyboardMoveEnd?: (\n e: NativeSyntheticEvent<EventWithName<NativeEvent>>,\n ) => void;\n onKeyboardMoveInteractive?: (\n e: NativeSyntheticEvent<EventWithName<NativeEvent>>,\n ) => void;\n onFocusedInputLayoutChanged?: (\n e: NativeSyntheticEvent<EventWithName<FocusedInputLayoutChangedEvent>>,\n ) => void;\n onFocusedInputTextChanged?: (\n e: NativeSyntheticEvent<EventWithName<FocusedInputTextChangedEvent>>,\n ) => void;\n onFocusedInputSelectionChanged?: (\n e: NativeSyntheticEvent<EventWithName<FocusedInputSelectionChangedEvent>>,\n ) => void;\n // fake props used to activate reanimated bindings\n onKeyboardMoveReanimated?: (\n e: NativeSyntheticEvent<EventWithName<NativeEvent>>,\n ) => void;\n onFocusedInputLayoutChangedReanimated?: (\n e: NativeSyntheticEvent<EventWithName<FocusedInputLayoutChangedEvent>>,\n ) => void;\n onFocusedInputTextChangedReanimated?: (\n e: NativeSyntheticEvent<EventWithName<FocusedInputTextChangedEvent>>,\n ) => void;\n onFocusedInputSelectionChangedReanimated?: (\n e: NativeSyntheticEvent<EventWithName<FocusedInputSelectionChangedEvent>>,\n ) => void;\n // props\n statusBarTranslucent?: boolean;\n navigationBarTranslucent?: boolean;\n preserveEdgeToEdge?: boolean;\n enabled?: boolean;\n} & ViewProps;\n\nexport type KeyboardGestureAreaProps = {\n interpolator?: \"ios\" | \"linear\";\n /**\n * Whether to allow to show a keyboard from dismissed state by swipe up.\n * Default to `false`.\n */\n showOnSwipeUp?: boolean;\n /**\n * Whether to allow to control a keyboard by gestures. The strategy how\n * it should be controlled is determined by `interpolator` property.\n * Defaults to `true`.\n */\n enableSwipeToDismiss?: boolean;\n /**\n * Extra distance to the keyboard.\n */\n offset?: number;\n /**\n * A corresponding `nativeID` value from the corresponding `TextInput`.\n */\n textInputNativeID?: string;\n} & ViewProps;\nexport type OverKeyboardViewProps = PropsWithChildren<{\n visible: boolean;\n}>;\n\nexport type Direction = \"next\" | \"prev\" | \"current\";\nexport type DismissOptions = {\n keepFocus: boolean;\n};\nexport type KeyboardControllerModule = {\n // android only\n setDefaultMode: () => void;\n setInputMode: (mode: number) => void;\n // all platforms\n dismiss: (options?: DismissOptions) => Promise<void>;\n setFocusTo: (direction: Direction) => void;\n isVisible: () => boolean;\n state: () => KeyboardEventData;\n};\nexport type KeyboardControllerNativeModule = {\n // android only\n setDefaultMode: () => void;\n setInputMode: (mode: number) => void;\n // all platforms\n dismiss: (keepFocus: boolean) => void;\n setFocusTo: (direction: Direction) => void;\n // native event module stuff\n addListener: (eventName: string) => void;\n removeListeners: (count: number) => void;\n};\n\n// Event module declarations\nexport type KeyboardControllerEvents =\n | \"keyboardWillShow\"\n | \"keyboardDidShow\"\n | \"keyboardWillHide\"\n | \"keyboardDidHide\";\nexport type KeyboardEventData = {\n height: number;\n duration: number;\n timestamp: number;\n target: number;\n type: NonNullable<TextInputProps[\"keyboardType\"]>;\n appearance: NonNullable<TextInputProps[\"keyboardAppearance\"]>;\n};\nexport type KeyboardState = {\n isVisible: boolean;\n} & KeyboardEventData;\nexport type KeyboardEventsModule = {\n addListener: (\n name: KeyboardControllerEvents,\n cb: (e: KeyboardEventData) => void,\n ) => EmitterSubscription;\n};\nexport type FocusedInputAvailableEvents = \"focusDidSet\";\nexport type FocusedInputEventData = {\n current: number;\n count: number;\n};\nexport type FocusedInputEventsModule = {\n addListener: (\n name: FocusedInputAvailableEvents,\n cb: (e: FocusedInputEventData) => void,\n ) => EmitterSubscription;\n};\nexport type WindowDimensionsAvailableEvents = \"windowDidResize\";\nexport type WindowDimensionsEventData = {\n width: number;\n height: number;\n};\nexport type WindowDimensionsEventsModule = {\n addListener: (\n name: WindowDimensionsAvailableEvents,\n cb: (e: WindowDimensionsEventData) => void,\n ) => EmitterSubscription;\n};\n\n// reanimated hook declaration\nexport type KeyboardHandlerHook<TContext, Event> = (\n handlers: {\n onKeyboardMoveStart?: (e: NativeEvent, context: TContext) => void;\n onKeyboardMove?: (e: NativeEvent, context: TContext) => void;\n onKeyboardMoveEnd?: (e: NativeEvent, context: TContext) => void;\n onKeyboardMoveInteractive?: (e: NativeEvent, context: TContext) => void;\n },\n dependencies?: unknown[],\n) => (e: NativeSyntheticEvent<Event>) => void;\nexport type FocusedInputLayoutHandlerHook<TContext, Event> = (\n handlers: {\n onFocusedInputLayoutChanged?: (\n e: FocusedInputLayoutChangedEvent,\n context: TContext,\n ) => void;\n },\n dependencies?: unknown[],\n) => (e: NativeSyntheticEvent<Event>) => void;\nexport type FocusedInputTextHandlerHook<TContext, Event> = (\n handlers: {\n onFocusedInputTextChanged?: (\n e: FocusedInputTextChangedEvent,\n context: TContext,\n ) => void;\n },\n dependencies?: unknown[],\n) => (e: NativeSyntheticEvent<Event>) => void;\nexport type FocusedInputSelectionHandlerHook<TContext, Event> = (\n handlers: {\n onFocusedInputSelectionChanged?: (\n e: FocusedInputSelectionChangedEvent,\n context: TContext,\n ) => void;\n },\n dependencies?: unknown[],\n) => (e: NativeSyntheticEvent<Event>) => void;\n\n// package types\nexport type Handlers<T> = Record<string, T | undefined>;\nexport type KeyboardHandler = Partial<{\n onStart: (e: NativeEvent) => void;\n onMove: (e: NativeEvent) => void;\n onEnd: (e: NativeEvent) => void;\n onInteractive: (e: NativeEvent) => void;\n}>;\nexport type KeyboardHandlers = Handlers<KeyboardHandler>;\nexport type FocusedInputHandler = Partial<{\n onChangeText: (e: FocusedInputTextChangedEvent) => void;\n onSelectionChange: (e: FocusedInputSelectionChangedEvent) => void;\n}>;\nexport type FocusedInputHandlers = Handlers<FocusedInputHandler>;\n"],"mappings":"","ignoreList":[]}