@react-native-ohos/react-native-keyboard-controller 1.16.8 → 1.17.0

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 (352) hide show
  1. package/README.OpenSource +2 -2
  2. package/README.md +105 -29
  3. package/harmony/keyboard_controller/BuildProfile.ets +1 -1
  4. package/harmony/keyboard_controller/Index.ets +1 -0
  5. package/harmony/keyboard_controller/oh-package-lock.json5 +7 -7
  6. package/harmony/keyboard_controller/oh-package.json5 +1 -1
  7. package/harmony/keyboard_controller/src/main/cpp/ClippingScrollViewComponentDescriptor.h +86 -0
  8. package/harmony/keyboard_controller/src/main/cpp/ClippingScrollViewComponentInstance.cpp +104 -0
  9. package/harmony/keyboard_controller/src/main/cpp/ClippingScrollViewComponentInstance.h +64 -0
  10. package/harmony/keyboard_controller/src/main/cpp/ClippingScrollViewJSIBinder.h +60 -0
  11. package/harmony/keyboard_controller/src/main/cpp/KeyboardControllerViewComponentInstance.cpp +8 -1
  12. package/harmony/keyboard_controller/src/main/cpp/KeyboardGestureAreaComponentInstance.cpp +2 -2
  13. package/harmony/keyboard_controller/src/main/cpp/KeyboardToolbarGroupViewComponentDescriptor.h +46 -0
  14. package/harmony/keyboard_controller/src/main/cpp/KeyboardToolbarGroupViewComponentInstance.cpp +37 -0
  15. package/harmony/keyboard_controller/src/main/cpp/KeyboardToolbarGroupViewComponentInstance.h +32 -0
  16. package/harmony/keyboard_controller/src/main/cpp/KeyboardToolbarGroupViewJSIBinder.h +23 -0
  17. package/harmony/keyboard_controller/src/main/cpp/RNKeyboardController.cpp +58 -1
  18. package/harmony/keyboard_controller/src/main/cpp/RNKeyboardControllerPackage.h +20 -0
  19. package/harmony/keyboard_controller/src/main/cpp/ViewHierarchyNavigator.cpp +65 -44
  20. package/harmony/keyboard_controller/src/main/cpp/ViewHierarchyNavigator.h +22 -3
  21. package/harmony/keyboard_controller/src/main/cpp/keyboardControllerPackage.cpp +17 -4
  22. package/harmony/keyboard_controller/src/main/cpp/keyboardControllerPackage.h +9 -1
  23. package/harmony/keyboard_controller/src/main/ets/{RNKeyboardControllerPackage.ts → RNKeyboardControllerPackage.ets} +9 -5
  24. package/harmony/keyboard_controller/src/main/ets/RNKeyboardControllerTurboModule.ts +29 -5
  25. package/harmony/keyboard_controller/src/main/ets/Type.ts +2 -1
  26. package/harmony/keyboard_controller.har +0 -0
  27. package/lib/commonjs/animated.js +20 -9
  28. package/lib/commonjs/animated.js.map +1 -1
  29. package/lib/commonjs/architecture.js +8 -0
  30. package/lib/commonjs/architecture.js.map +1 -0
  31. package/lib/commonjs/bindings.js +37 -2
  32. package/lib/commonjs/bindings.js.map +1 -1
  33. package/lib/commonjs/bindings.native.js +25 -2
  34. package/lib/commonjs/bindings.native.js.map +1 -1
  35. package/lib/commonjs/compat.js +50 -0
  36. package/lib/commonjs/compat.js.map +1 -0
  37. package/lib/commonjs/components/KeyboardAvoidingView/hooks.js +21 -15
  38. package/lib/commonjs/components/KeyboardAvoidingView/hooks.js.map +1 -1
  39. package/lib/commonjs/components/KeyboardAvoidingView/index.js +36 -11
  40. package/lib/commonjs/components/KeyboardAvoidingView/index.js.map +1 -1
  41. package/lib/commonjs/components/KeyboardAwareScrollView/index.js +51 -16
  42. package/lib/commonjs/components/KeyboardAwareScrollView/index.js.map +1 -1
  43. package/lib/commonjs/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.js +2 -2
  44. package/lib/commonjs/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.js.map +1 -1
  45. package/lib/commonjs/components/KeyboardChatScrollView/hooks.js +13 -0
  46. package/lib/commonjs/components/KeyboardChatScrollView/hooks.js.map +1 -0
  47. package/lib/commonjs/components/KeyboardChatScrollView/index.js +122 -0
  48. package/lib/commonjs/components/KeyboardChatScrollView/index.js.map +1 -0
  49. package/lib/commonjs/components/KeyboardChatScrollView/types.js +6 -0
  50. package/lib/commonjs/components/KeyboardChatScrollView/types.js.map +1 -0
  51. package/lib/commonjs/components/KeyboardChatScrollView/useChatKeyboard/helpers.js +221 -0
  52. package/lib/commonjs/components/KeyboardChatScrollView/useChatKeyboard/helpers.js.map +1 -0
  53. package/lib/commonjs/components/KeyboardChatScrollView/useChatKeyboard/index.ios.js +149 -0
  54. package/lib/commonjs/components/KeyboardChatScrollView/useChatKeyboard/index.ios.js.map +1 -0
  55. package/lib/commonjs/components/KeyboardChatScrollView/useChatKeyboard/index.js +240 -0
  56. package/lib/commonjs/components/KeyboardChatScrollView/useChatKeyboard/index.js.map +1 -0
  57. package/lib/commonjs/components/KeyboardChatScrollView/useChatKeyboard/types.js +6 -0
  58. package/lib/commonjs/components/KeyboardChatScrollView/useChatKeyboard/types.js.map +1 -0
  59. package/lib/commonjs/components/KeyboardChatScrollView/useEndVisible.js +40 -0
  60. package/lib/commonjs/components/KeyboardChatScrollView/useEndVisible.js.map +1 -0
  61. package/lib/commonjs/components/KeyboardChatScrollView/useExtraContentPadding/index.js +92 -0
  62. package/lib/commonjs/components/KeyboardChatScrollView/useExtraContentPadding/index.js.map +1 -0
  63. package/lib/commonjs/components/KeyboardToolbar/Arrow.js +2 -3
  64. package/lib/commonjs/components/KeyboardToolbar/Arrow.js.map +1 -1
  65. package/lib/commonjs/components/KeyboardToolbar/Button.js +2 -3
  66. package/lib/commonjs/components/KeyboardToolbar/Button.js.map +1 -1
  67. package/lib/commonjs/components/KeyboardToolbar/compound/components/Background.js +13 -0
  68. package/lib/commonjs/components/KeyboardToolbar/compound/components/Background.js.map +1 -0
  69. package/lib/commonjs/components/KeyboardToolbar/compound/components/Content.js +25 -0
  70. package/lib/commonjs/components/KeyboardToolbar/compound/components/Content.js.map +1 -0
  71. package/lib/commonjs/components/KeyboardToolbar/compound/components/Done.js +58 -0
  72. package/lib/commonjs/components/KeyboardToolbar/compound/components/Done.js.map +1 -0
  73. package/lib/commonjs/components/KeyboardToolbar/compound/components/Next.js +49 -0
  74. package/lib/commonjs/components/KeyboardToolbar/compound/components/Next.js.map +1 -0
  75. package/lib/commonjs/components/KeyboardToolbar/compound/components/Prev.js +49 -0
  76. package/lib/commonjs/components/KeyboardToolbar/compound/components/Prev.js.map +1 -0
  77. package/lib/commonjs/components/KeyboardToolbar/compound/components/index.js +42 -0
  78. package/lib/commonjs/components/KeyboardToolbar/compound/components/index.js.map +1 -0
  79. package/lib/commonjs/components/KeyboardToolbar/compound/components/types.js +6 -0
  80. package/lib/commonjs/components/KeyboardToolbar/compound/components/types.js.map +1 -0
  81. package/lib/commonjs/components/KeyboardToolbar/compound/context.js +17 -0
  82. package/lib/commonjs/components/KeyboardToolbar/compound/context.js.map +1 -0
  83. package/lib/commonjs/components/KeyboardToolbar/constants.js +17 -0
  84. package/lib/commonjs/components/KeyboardToolbar/constants.js.map +1 -0
  85. package/lib/commonjs/components/KeyboardToolbar/index.js +95 -84
  86. package/lib/commonjs/components/KeyboardToolbar/index.js.map +1 -1
  87. package/lib/commonjs/components/KeyboardToolbar/types.js.map +1 -1
  88. package/lib/commonjs/components/ScrollViewWithBottomPadding/index.js +120 -0
  89. package/lib/commonjs/components/ScrollViewWithBottomPadding/index.js.map +1 -0
  90. package/lib/commonjs/components/ScrollViewWithBottomPadding/styles.js +15 -0
  91. package/lib/commonjs/components/ScrollViewWithBottomPadding/styles.js.map +1 -0
  92. package/lib/commonjs/components/hooks/useColorScheme.js +1 -1
  93. package/lib/commonjs/components/hooks/useColorScheme.js.map +1 -1
  94. package/lib/commonjs/components/hooks/useCombinedRef.js +24 -0
  95. package/lib/commonjs/components/hooks/useCombinedRef.js.map +1 -0
  96. package/lib/commonjs/components/hooks/useScrollState.js +62 -0
  97. package/lib/commonjs/components/hooks/useScrollState.js.map +1 -0
  98. package/lib/commonjs/components/index.js +7 -0
  99. package/lib/commonjs/components/index.js.map +1 -1
  100. package/lib/commonjs/constants.js +3 -1
  101. package/lib/commonjs/constants.js.map +1 -1
  102. package/lib/commonjs/context.js +1 -0
  103. package/lib/commonjs/context.js.map +1 -1
  104. package/lib/commonjs/hooks/index.js +14 -1
  105. package/lib/commonjs/hooks/index.js.map +1 -1
  106. package/lib/commonjs/hooks/useKeyboardState/index.js +39 -0
  107. package/lib/commonjs/hooks/useKeyboardState/index.js.map +1 -0
  108. package/lib/commonjs/index.js +27 -1
  109. package/lib/commonjs/index.js.map +1 -1
  110. package/lib/commonjs/internal.js +36 -0
  111. package/lib/commonjs/internal.js.map +1 -1
  112. package/lib/commonjs/module.js +21 -12
  113. package/lib/commonjs/module.js.map +1 -1
  114. package/lib/commonjs/specs/ClippingScrollViewDecoratorViewNativeComponent.js +12 -0
  115. package/lib/commonjs/specs/ClippingScrollViewDecoratorViewNativeComponent.js.map +1 -0
  116. package/lib/commonjs/specs/KeyboardControllerViewNativeComponent.js +8 -2
  117. package/lib/commonjs/specs/KeyboardControllerViewNativeComponent.js.map +1 -1
  118. package/lib/commonjs/specs/KeyboardGestureAreaNativeComponent.js +2 -1
  119. package/lib/commonjs/specs/KeyboardGestureAreaNativeComponent.js.map +1 -1
  120. package/lib/commonjs/specs/KeyboardToolbarGroupViewNativeComponent.js +12 -0
  121. package/lib/commonjs/specs/KeyboardToolbarGroupViewNativeComponent.js.map +1 -0
  122. package/lib/commonjs/specs/NativeKeyboardController.js.map +1 -1
  123. package/lib/commonjs/types.js.map +1 -1
  124. package/lib/commonjs/utils/findNodeHandle/index.js +9 -0
  125. package/lib/commonjs/utils/findNodeHandle/index.js.map +1 -0
  126. package/lib/commonjs/utils/findNodeHandle/index.native.js +13 -0
  127. package/lib/commonjs/utils/findNodeHandle/index.native.js.map +1 -0
  128. package/lib/commonjs/views/KeyboardExtender/index.js +30 -0
  129. package/lib/commonjs/views/KeyboardExtender/index.js.map +1 -0
  130. package/lib/commonjs/views/index.js +7 -0
  131. package/lib/commonjs/views/index.js.map +1 -1
  132. package/lib/module/animated.js +22 -11
  133. package/lib/module/animated.js.map +1 -1
  134. package/lib/module/architecture.js +2 -0
  135. package/lib/module/architecture.js.map +1 -0
  136. package/lib/module/bindings.js +36 -2
  137. package/lib/module/bindings.js.map +1 -1
  138. package/lib/module/bindings.native.js +24 -2
  139. package/lib/module/bindings.native.js.map +1 -1
  140. package/lib/module/compat.js +43 -0
  141. package/lib/module/compat.js.map +1 -0
  142. package/lib/module/components/KeyboardAvoidingView/hooks.js +22 -16
  143. package/lib/module/components/KeyboardAvoidingView/hooks.js.map +1 -1
  144. package/lib/module/components/KeyboardAvoidingView/index.js +35 -11
  145. package/lib/module/components/KeyboardAvoidingView/index.js.map +1 -1
  146. package/lib/module/components/KeyboardAwareScrollView/index.js +54 -19
  147. package/lib/module/components/KeyboardAwareScrollView/index.js.map +1 -1
  148. package/lib/module/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.js +2 -2
  149. package/lib/module/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.js.map +1 -1
  150. package/lib/module/components/KeyboardChatScrollView/hooks.js +2 -0
  151. package/lib/module/components/KeyboardChatScrollView/hooks.js.map +1 -0
  152. package/lib/module/components/KeyboardChatScrollView/index.js +115 -0
  153. package/lib/module/components/KeyboardChatScrollView/index.js.map +1 -0
  154. package/lib/module/components/KeyboardChatScrollView/types.js +2 -0
  155. package/lib/module/components/KeyboardChatScrollView/types.js.map +1 -0
  156. package/lib/module/components/KeyboardChatScrollView/useChatKeyboard/helpers.js +207 -0
  157. package/lib/module/components/KeyboardChatScrollView/useChatKeyboard/helpers.js.map +1 -0
  158. package/lib/module/components/KeyboardChatScrollView/useChatKeyboard/index.ios.js +143 -0
  159. package/lib/module/components/KeyboardChatScrollView/useChatKeyboard/index.ios.js.map +1 -0
  160. package/lib/module/components/KeyboardChatScrollView/useChatKeyboard/index.js +234 -0
  161. package/lib/module/components/KeyboardChatScrollView/useChatKeyboard/index.js.map +1 -0
  162. package/lib/module/components/KeyboardChatScrollView/useChatKeyboard/types.js +2 -0
  163. package/lib/module/components/KeyboardChatScrollView/useChatKeyboard/types.js.map +1 -0
  164. package/lib/module/components/KeyboardChatScrollView/useEndVisible.js +33 -0
  165. package/lib/module/components/KeyboardChatScrollView/useEndVisible.js.map +1 -0
  166. package/lib/module/components/KeyboardChatScrollView/useExtraContentPadding/index.js +87 -0
  167. package/lib/module/components/KeyboardChatScrollView/useExtraContentPadding/index.js.map +1 -0
  168. package/lib/module/components/KeyboardToolbar/Arrow.js +2 -2
  169. package/lib/module/components/KeyboardToolbar/Arrow.js.map +1 -1
  170. package/lib/module/components/KeyboardToolbar/Button.js +2 -2
  171. package/lib/module/components/KeyboardToolbar/Button.js.map +1 -1
  172. package/lib/module/components/KeyboardToolbar/compound/components/Background.js +6 -0
  173. package/lib/module/components/KeyboardToolbar/compound/components/Background.js.map +1 -0
  174. package/lib/module/components/KeyboardToolbar/compound/components/Content.js +18 -0
  175. package/lib/module/components/KeyboardToolbar/compound/components/Content.js.map +1 -0
  176. package/lib/module/components/KeyboardToolbar/compound/components/Done.js +50 -0
  177. package/lib/module/components/KeyboardToolbar/compound/components/Done.js.map +1 -0
  178. package/lib/module/components/KeyboardToolbar/compound/components/Next.js +41 -0
  179. package/lib/module/components/KeyboardToolbar/compound/components/Next.js.map +1 -0
  180. package/lib/module/components/KeyboardToolbar/compound/components/Prev.js +41 -0
  181. package/lib/module/components/KeyboardToolbar/compound/components/Prev.js.map +1 -0
  182. package/lib/module/components/KeyboardToolbar/compound/components/index.js +6 -0
  183. package/lib/module/components/KeyboardToolbar/compound/components/index.js.map +1 -0
  184. package/lib/module/components/KeyboardToolbar/compound/components/types.js +2 -0
  185. package/lib/module/components/KeyboardToolbar/compound/components/types.js.map +1 -0
  186. package/lib/module/components/KeyboardToolbar/compound/context.js +10 -0
  187. package/lib/module/components/KeyboardToolbar/compound/context.js.map +1 -0
  188. package/lib/module/components/KeyboardToolbar/constants.js +11 -0
  189. package/lib/module/components/KeyboardToolbar/constants.js.map +1 -0
  190. package/lib/module/components/KeyboardToolbar/index.js +95 -85
  191. package/lib/module/components/KeyboardToolbar/index.js.map +1 -1
  192. package/lib/module/components/KeyboardToolbar/types.js.map +1 -1
  193. package/lib/module/components/ScrollViewWithBottomPadding/index.js +112 -0
  194. package/lib/module/components/ScrollViewWithBottomPadding/index.js.map +1 -0
  195. package/lib/module/components/ScrollViewWithBottomPadding/styles.js +9 -0
  196. package/lib/module/components/ScrollViewWithBottomPadding/styles.js.map +1 -0
  197. package/lib/module/components/hooks/useColorScheme.js +1 -1
  198. package/lib/module/components/hooks/useColorScheme.js.map +1 -1
  199. package/lib/module/components/hooks/useCombinedRef.js +18 -0
  200. package/lib/module/components/hooks/useCombinedRef.js.map +1 -0
  201. package/lib/module/components/hooks/useScrollState.js +56 -0
  202. package/lib/module/components/hooks/useScrollState.js.map +1 -0
  203. package/lib/module/components/index.js +1 -0
  204. package/lib/module/components/index.js.map +1 -1
  205. package/lib/module/constants.js +3 -0
  206. package/lib/module/constants.js.map +1 -1
  207. package/lib/module/context.js +1 -0
  208. package/lib/module/context.js.map +1 -1
  209. package/lib/module/hooks/index.js +3 -1
  210. package/lib/module/hooks/index.js.map +1 -1
  211. package/lib/module/hooks/useKeyboardState/index.js +33 -0
  212. package/lib/module/hooks/useKeyboardState/index.js.map +1 -0
  213. package/lib/module/index.js +3 -2
  214. package/lib/module/index.js.map +1 -1
  215. package/lib/module/internal.js +35 -0
  216. package/lib/module/internal.js.map +1 -1
  217. package/lib/module/module.js +21 -12
  218. package/lib/module/module.js.map +1 -1
  219. package/lib/module/specs/ClippingScrollViewDecoratorViewNativeComponent.js +6 -0
  220. package/lib/module/specs/ClippingScrollViewDecoratorViewNativeComponent.js.map +1 -0
  221. package/lib/module/specs/KeyboardControllerViewNativeComponent.js +7 -1
  222. package/lib/module/specs/KeyboardControllerViewNativeComponent.js.map +1 -1
  223. package/lib/module/specs/KeyboardGestureAreaNativeComponent.js +2 -1
  224. package/lib/module/specs/KeyboardGestureAreaNativeComponent.js.map +1 -1
  225. package/lib/module/specs/KeyboardToolbarGroupViewNativeComponent.js +5 -0
  226. package/lib/module/specs/KeyboardToolbarGroupViewNativeComponent.js.map +1 -0
  227. package/lib/module/specs/NativeKeyboardController.js.map +1 -1
  228. package/lib/module/types.js.map +1 -1
  229. package/lib/module/utils/findNodeHandle/index.js +2 -0
  230. package/lib/module/utils/findNodeHandle/index.js.map +1 -0
  231. package/lib/module/utils/findNodeHandle/index.native.js +3 -0
  232. package/lib/module/utils/findNodeHandle/index.native.js.map +1 -0
  233. package/lib/module/views/KeyboardExtender/index.js +23 -0
  234. package/lib/module/views/KeyboardExtender/index.js.map +1 -0
  235. package/lib/module/views/index.js +1 -0
  236. package/lib/module/views/index.js.map +1 -1
  237. package/lib/typescript/animated.d.ts +2 -38
  238. package/lib/typescript/architecture.d.ts +1 -0
  239. package/lib/typescript/bindings.d.ts +15 -1
  240. package/lib/typescript/bindings.native.d.ts +10 -1
  241. package/lib/typescript/compat.d.ts +12 -0
  242. package/lib/typescript/components/KeyboardAvoidingView/index.d.ts +5 -0
  243. package/lib/typescript/components/KeyboardAwareScrollView/index.d.ts +4 -1
  244. package/lib/typescript/components/KeyboardChatScrollView/hooks.d.ts +2 -0
  245. package/lib/typescript/components/KeyboardChatScrollView/index.d.ts +17 -0
  246. package/lib/typescript/components/KeyboardChatScrollView/types.d.ts +113 -0
  247. package/lib/typescript/components/KeyboardChatScrollView/useChatKeyboard/helpers.d.ts +132 -0
  248. package/lib/typescript/components/KeyboardChatScrollView/useChatKeyboard/index.d.ts +18 -0
  249. package/lib/typescript/components/KeyboardChatScrollView/useChatKeyboard/index.ios.d.ts +21 -0
  250. package/lib/typescript/components/KeyboardChatScrollView/useChatKeyboard/types.d.ts +37 -0
  251. package/lib/typescript/components/KeyboardChatScrollView/useEndVisible.d.ts +17 -0
  252. package/lib/typescript/components/KeyboardChatScrollView/useExtraContentPadding/index.d.ts +45 -0
  253. package/lib/typescript/components/KeyboardToolbar/Button.d.ts +2 -2
  254. package/lib/typescript/components/KeyboardToolbar/compound/components/Background.d.ts +6 -0
  255. package/lib/typescript/components/KeyboardToolbar/compound/components/Content.d.ts +7 -0
  256. package/lib/typescript/components/KeyboardToolbar/compound/components/Done.d.ts +7 -0
  257. package/lib/typescript/components/KeyboardToolbar/compound/components/Next.d.ts +4 -0
  258. package/lib/typescript/components/KeyboardToolbar/compound/components/Prev.d.ts +4 -0
  259. package/lib/typescript/components/KeyboardToolbar/compound/components/index.d.ts +5 -0
  260. package/lib/typescript/components/KeyboardToolbar/compound/components/types.d.ts +14 -0
  261. package/lib/typescript/components/KeyboardToolbar/compound/context.d.ts +9 -0
  262. package/lib/typescript/components/KeyboardToolbar/constants.d.ts +10 -0
  263. package/lib/typescript/components/KeyboardToolbar/index.d.ts +12 -45
  264. package/lib/typescript/components/KeyboardToolbar/types.d.ts +24 -1
  265. package/lib/typescript/components/ScrollViewWithBottomPadding/index.d.ts +30 -0
  266. package/lib/typescript/components/ScrollViewWithBottomPadding/styles.d.ts +7 -0
  267. package/lib/typescript/components/hooks/useCombinedRef.d.ts +3 -0
  268. package/lib/typescript/components/hooks/useScrollState.d.ts +17 -0
  269. package/lib/typescript/components/index.d.ts +3 -0
  270. package/lib/typescript/constants.d.ts +1 -0
  271. package/lib/typescript/context.d.ts +1 -0
  272. package/lib/typescript/hooks/index.d.ts +2 -0
  273. package/lib/typescript/hooks/useKeyboardState/index.d.ts +4 -0
  274. package/lib/typescript/index.d.ts +4 -3
  275. package/lib/typescript/internal.d.ts +4 -0
  276. package/lib/typescript/specs/ClippingScrollViewDecoratorViewNativeComponent.d.ts +10 -0
  277. package/lib/typescript/specs/KeyboardControllerViewNativeComponent.d.ts +4 -0
  278. package/lib/typescript/specs/KeyboardToolbarGroupViewNativeComponent.d.ts +6 -0
  279. package/lib/typescript/specs/NativeKeyboardController.d.ts +6 -2
  280. package/lib/typescript/types.d.ts +80 -5
  281. package/lib/typescript/utils/findNodeHandle/index.d.ts +4 -0
  282. package/lib/typescript/utils/findNodeHandle/index.native.d.ts +2 -0
  283. package/lib/typescript/views/KeyboardExtender/index.d.ts +5 -0
  284. package/lib/typescript/views/index.d.ts +1 -0
  285. package/package.json +15 -9
  286. package/src/animated.tsx +41 -48
  287. package/src/architecture.ts +1 -0
  288. package/src/bindings.native.ts +37 -2
  289. package/src/bindings.ts +40 -1
  290. package/src/compat.ts +44 -0
  291. package/src/components/KeyboardAvoidingView/hooks.ts +24 -17
  292. package/src/components/KeyboardAvoidingView/index.tsx +62 -18
  293. package/src/components/KeyboardAwareScrollView/index.tsx +75 -20
  294. package/src/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.ts +2 -2
  295. package/src/components/KeyboardChatScrollView/hooks.ts +2 -0
  296. package/src/components/KeyboardChatScrollView/index.tsx +164 -0
  297. package/src/components/KeyboardChatScrollView/types.ts +117 -0
  298. package/src/components/KeyboardChatScrollView/useChatKeyboard/helpers.ts +268 -0
  299. package/src/components/KeyboardChatScrollView/useChatKeyboard/index.ios.ts +260 -0
  300. package/src/components/KeyboardChatScrollView/useChatKeyboard/index.ts +374 -0
  301. package/src/components/KeyboardChatScrollView/useChatKeyboard/types.ts +39 -0
  302. package/src/components/KeyboardChatScrollView/useEndVisible.ts +66 -0
  303. package/src/components/KeyboardChatScrollView/useExtraContentPadding/index.ts +149 -0
  304. package/src/components/KeyboardToolbar/Arrow.tsx +2 -2
  305. package/src/components/KeyboardToolbar/Button.tsx +4 -4
  306. package/src/components/KeyboardToolbar/compound/components/Background.tsx +9 -0
  307. package/src/components/KeyboardToolbar/compound/components/Content.tsx +25 -0
  308. package/src/components/KeyboardToolbar/compound/components/Done.tsx +57 -0
  309. package/src/components/KeyboardToolbar/compound/components/Next.tsx +49 -0
  310. package/src/components/KeyboardToolbar/compound/components/Prev.tsx +49 -0
  311. package/src/components/KeyboardToolbar/compound/components/index.ts +5 -0
  312. package/src/components/KeyboardToolbar/compound/components/types.ts +15 -0
  313. package/src/components/KeyboardToolbar/compound/context.ts +25 -0
  314. package/src/components/KeyboardToolbar/constants.ts +14 -0
  315. package/src/components/KeyboardToolbar/index.tsx +143 -146
  316. package/src/components/KeyboardToolbar/types.ts +33 -1
  317. package/src/components/ScrollViewWithBottomPadding/index.tsx +216 -0
  318. package/src/components/ScrollViewWithBottomPadding/styles.ts +10 -0
  319. package/src/components/hooks/useColorScheme.ts +2 -1
  320. package/src/components/hooks/useCombinedRef.ts +22 -0
  321. package/src/components/hooks/useScrollState.ts +81 -0
  322. package/src/components/index.ts +3 -0
  323. package/src/constants.ts +4 -0
  324. package/src/context.ts +2 -0
  325. package/src/hooks/index.ts +2 -1
  326. package/src/hooks/useKeyboardState/index.ts +52 -0
  327. package/src/index.ts +5 -1
  328. package/src/internal.ts +62 -0
  329. package/src/module.ts +21 -9
  330. package/src/specs/ClippingScrollViewDecoratorViewNativeComponent.ts +19 -0
  331. package/src/specs/KeyboardControllerViewNativeComponent.ts +14 -3
  332. package/src/specs/KeyboardGestureAreaNativeComponent.ts +1 -0
  333. package/src/specs/KeyboardToolbarGroupViewNativeComponent.ts +10 -0
  334. package/src/specs/NativeKeyboardController.ts +6 -2
  335. package/src/types.ts +91 -5
  336. package/src/utils/findNodeHandle/index.native.ts +3 -0
  337. package/src/utils/findNodeHandle/index.ts +6 -0
  338. package/src/views/KeyboardExtender/index.tsx +30 -0
  339. package/src/views/index.ts +1 -0
  340. package/lib/commonjs/monkey-patch.android.js +0 -57
  341. package/lib/commonjs/monkey-patch.android.js.map +0 -1
  342. package/lib/commonjs/monkey-patch.js +0 -11
  343. package/lib/commonjs/monkey-patch.js.map +0 -1
  344. package/lib/module/monkey-patch.android.js +0 -47
  345. package/lib/module/monkey-patch.android.js.map +0 -1
  346. package/lib/module/monkey-patch.js +0 -5
  347. package/lib/module/monkey-patch.js.map +0 -1
  348. package/lib/typescript/monkey-patch.android.d.ts +0 -2
  349. package/lib/typescript/monkey-patch.d.ts +0 -2
  350. package/src/monkey-patch.android.ts +0 -44
  351. package/src/monkey-patch.ts +0 -4
  352. /package/harmony/keyboard_controller/{ts.ts → ts.ets} +0 -0
@@ -4,10 +4,46 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useAnimatedValue = useAnimatedValue;
7
+ exports.useEventHandlerRegistration = useEventHandlerRegistration;
7
8
  exports.useSharedHandlers = useSharedHandlers;
8
9
  var _react = require("react");
9
10
  var _reactNative = require("react-native");
10
11
  var _reactNativeReanimated = require("react-native-reanimated");
12
+ var _findNodeHandle = require("./utils/findNodeHandle");
13
+ function useEventHandlerRegistration(viewTagRef) {
14
+ const onRegisterHandler = handler => {
15
+ const currentHandler = handler;
16
+ const attachWorkletHandlers = () => {
17
+ const viewTag = (0, _findNodeHandle.findNodeHandle)(viewTagRef.current);
18
+ if (__DEV__ && !viewTag) {
19
+ console.warn("Can not attach worklet handlers for `react-native-keyboard-controller` because view tag can not be resolved. Be sure that `KeyboardProvider` is fully mounted before registering handlers. If you think it is a bug in library, please open an issue.");
20
+ }
21
+ if (viewTag) {
22
+ if ("workletEventHandler" in currentHandler) {
23
+ currentHandler.workletEventHandler.registerForEvents(viewTag);
24
+ } else {
25
+ currentHandler.registerForEvents(viewTag);
26
+ }
27
+ }
28
+ };
29
+ if (viewTagRef.current) {
30
+ attachWorkletHandlers();
31
+ } else {
32
+ queueMicrotask(attachWorkletHandlers);
33
+ }
34
+ return () => {
35
+ const viewTag = (0, _findNodeHandle.findNodeHandle)(viewTagRef.current);
36
+ if (viewTag) {
37
+ if ("workletEventHandler" in currentHandler) {
38
+ currentHandler.workletEventHandler.unregisterFromEvents(viewTag);
39
+ } else {
40
+ currentHandler.unregisterFromEvents(viewTag);
41
+ }
42
+ }
43
+ };
44
+ };
45
+ return onRegisterHandler;
46
+ }
11
47
  /**
12
48
  * Hook for storing worklet handlers (objects with keys, where values are worklets).
13
49
  * Returns methods for setting handlers and broadcasting events in them.
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","useSharedHandlers","handlers","useSharedValue","jsHandlers","useRef","updateSharedHandlers","value","current","setHandlers","useCallback","handler","broadcast","type","event","Object","keys","forEach","key","_handlers$value$key","_handlers$value$key$t","call","useAnimatedValue","initialValue","config","ref","Animated","Value"],"sources":["internal.ts"],"sourcesContent":["import { useCallback, useRef } from \"react\";\nimport { Animated } from \"react-native\";\nimport { useSharedValue } from \"react-native-reanimated\";\n\nimport type { Handlers } from \"./types\";\n\ntype UntypedHandler = Record<string, (event: never) => void>;\ntype SharedHandlersReturnType<T extends UntypedHandler> = [\n (handler: Handlers<T>) => void,\n <K extends keyof T>(type: K, event: Parameters<T[K]>[0]) => void,\n];\n\n/**\n * Hook for storing worklet handlers (objects with keys, where values are worklets).\n * Returns methods for setting handlers and broadcasting events in them.\n *\n * T is a generic that looks like:\n * @example\n * {\n * onEvent: () => {},\n * onEvent2: () => {},\n * }\n */\nexport function useSharedHandlers<\n T extends UntypedHandler,\n>(): SharedHandlersReturnType<T> {\n const handlers = useSharedValue<Handlers<T>>({});\n const jsHandlers = useRef<Handlers<T>>({});\n\n // since js -> worklet -> js call is asynchronous, we can not write handlers\n // straight into shared variable (using current shared value as a previous result),\n // since there may be a race condition in a call, and closure may have out-of-dated\n // values. As a result, some of handlers may be not written to \"all handlers\" object.\n // Below we are writing all handlers to `ref` and afterwards synchronize them with\n // shared value (since `refs` are not referring to actual value in worklets).\n // This approach allow us to update synchronously handlers in js thread (and it assures,\n // that it will have all of them) and then update them in worklet thread (calls are\n // happening in FIFO order, so we will always have actual value).\n const updateSharedHandlers = () => {\n // eslint-disable-next-line react-compiler/react-compiler\n handlers.value = jsHandlers.current;\n };\n const setHandlers = useCallback((handler: Handlers<T>) => {\n jsHandlers.current = {\n ...jsHandlers.current,\n ...handler,\n };\n updateSharedHandlers();\n }, []);\n const broadcast = <K extends keyof T>(\n type: K,\n event: Parameters<T[K]>[0],\n ) => {\n \"worklet\";\n\n Object.keys(handlers.value).forEach((key) => {\n handlers.value[key]?.[type]?.(event);\n });\n };\n\n return [setHandlers, broadcast];\n}\n\n/**\n * TS variant of `useAnimatedValue` hook which is added in RN 0.71\n * A better alternative of storing animated values in refs, since\n * it doesn't recreate a new `Animated.Value` object on every re-render\n * and therefore consumes less memory. We can not use a variant from\n * RN, since this library supports earlier versions of RN.\n *\n * @see https://github.com/facebook/react-native/commit/e22217fe8b9455e32695f88ca835e11442b0a937\n */\nexport function useAnimatedValue(\n initialValue: number,\n config?: Animated.AnimatedConfig,\n): Animated.Value {\n const ref = useRef<Animated.Value | null>(null);\n\n if (ref.current == null) {\n ref.current = new Animated.Value(initialValue, config);\n }\n\n return ref.current;\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAF,OAAA;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASG,iBAAiBA,CAAA,EAEA;EAC/B,MAAMC,QAAQ,GAAG,IAAAC,qCAAc,EAAc,CAAC,CAAC,CAAC;EAChD,MAAMC,UAAU,GAAG,IAAAC,aAAM,EAAc,CAAC,CAAC,CAAC;;EAE1C;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,MAAMC,oBAAoB,GAAGA,CAAA,KAAM;IACjC;IACAJ,QAAQ,CAACK,KAAK,GAAGH,UAAU,CAACI,OAAO;EACrC,CAAC;EACD,MAAMC,WAAW,GAAG,IAAAC,kBAAW,EAAEC,OAAoB,IAAK;IACxDP,UAAU,CAACI,OAAO,GAAG;MACnB,GAAGJ,UAAU,CAACI,OAAO;MACrB,GAAGG;IACL,CAAC;IACDL,oBAAoB,CAAC,CAAC;EACxB,CAAC,EAAE,EAAE,CAAC;EACN,MAAMM,SAAS,GAAGA,CAChBC,IAAO,EACPC,KAA0B,KACvB;IACH,SAAS;;IAETC,MAAM,CAACC,IAAI,CAACd,QAAQ,CAACK,KAAK,CAAC,CAACU,OAAO,CAAEC,GAAG,IAAK;MAAA,IAAAC,mBAAA,EAAAC,qBAAA;MAC3C,CAAAD,mBAAA,GAAAjB,QAAQ,CAACK,KAAK,CAACW,GAAG,CAAC,cAAAC,mBAAA,gBAAAC,qBAAA,GAAnBD,mBAAA,CAAsBN,IAAI,CAAC,cAAAO,qBAAA,eAA3BA,qBAAA,CAAAC,IAAA,CAAAF,mBAAA,EAA8BL,KAAK,CAAC;IACtC,CAAC,CAAC;EACJ,CAAC;EAED,OAAO,CAACL,WAAW,EAAEG,SAAS,CAAC;AACjC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASU,gBAAgBA,CAC9BC,YAAoB,EACpBC,MAAgC,EAChB;EAChB,MAAMC,GAAG,GAAG,IAAApB,aAAM,EAAwB,IAAI,CAAC;EAE/C,IAAIoB,GAAG,CAACjB,OAAO,IAAI,IAAI,EAAE;IACvBiB,GAAG,CAACjB,OAAO,GAAG,IAAIkB,qBAAQ,CAACC,KAAK,CAACJ,YAAY,EAAEC,MAAM,CAAC;EACxD;EAEA,OAAOC,GAAG,CAACjB,OAAO;AACpB","ignoreList":[]}
1
+ {"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_findNodeHandle","useEventHandlerRegistration","viewTagRef","onRegisterHandler","handler","currentHandler","attachWorkletHandlers","viewTag","findNodeHandle","current","__DEV__","console","warn","workletEventHandler","registerForEvents","queueMicrotask","unregisterFromEvents","useSharedHandlers","handlers","useSharedValue","jsHandlers","useRef","updateSharedHandlers","value","setHandlers","useCallback","broadcast","type","event","Object","keys","forEach","key","_handlers$value$key","_handlers$value$key$t","call","useAnimatedValue","initialValue","config","ref","Animated","Value"],"sources":["internal.ts"],"sourcesContent":["import { useCallback, useRef } from \"react\";\nimport { Animated } from \"react-native\";\nimport { useSharedValue } from \"react-native-reanimated\";\n\nimport { findNodeHandle } from \"./utils/findNodeHandle\";\n\nimport type { EventHandlerProcessed } from \"react-native-reanimated\";\nimport type { Handlers } from \"./types\";\n\ntype ComponentOrHandle = Parameters<typeof findNodeHandle>[0];\n\ntype WorkletHandler = {\n registerForEvents: (viewTag: number) => void;\n unregisterFromEvents: (viewTag: number) => void;\n};\n\ntype WorkletHandlerOrWorkletHandlerObject =\n | WorkletHandler\n | {\n workletEventHandler: WorkletHandler;\n };\n\nexport function useEventHandlerRegistration(\n viewTagRef: React.MutableRefObject<ComponentOrHandle>,\n) {\n const onRegisterHandler = (handler: EventHandlerProcessed<never, never>) => {\n const currentHandler =\n handler as unknown as WorkletHandlerOrWorkletHandlerObject;\n const attachWorkletHandlers = () => {\n const viewTag = findNodeHandle(viewTagRef.current);\n\n if (__DEV__ && !viewTag) {\n console.warn(\n \"Can not attach worklet handlers for `react-native-keyboard-controller` because view tag can not be resolved. Be sure that `KeyboardProvider` is fully mounted before registering handlers. If you think it is a bug in library, please open an issue.\",\n );\n }\n\n if (viewTag) {\n if (\"workletEventHandler\" in currentHandler) {\n currentHandler.workletEventHandler.registerForEvents(viewTag);\n } else {\n currentHandler.registerForEvents(viewTag);\n }\n }\n };\n\n if (viewTagRef.current) {\n attachWorkletHandlers();\n } else {\n queueMicrotask(attachWorkletHandlers);\n }\n\n return () => {\n const viewTag = findNodeHandle(viewTagRef.current);\n\n if (viewTag) {\n if (\"workletEventHandler\" in currentHandler) {\n currentHandler.workletEventHandler.unregisterFromEvents(viewTag);\n } else {\n currentHandler.unregisterFromEvents(viewTag);\n }\n }\n };\n };\n\n return onRegisterHandler;\n}\n\ntype UntypedHandler = Record<string, (event: never) => void>;\ntype SharedHandlersReturnType<T extends UntypedHandler> = [\n (handler: Handlers<T>) => void,\n <K extends keyof T>(type: K, event: Parameters<T[K]>[0]) => void,\n];\n\n/**\n * Hook for storing worklet handlers (objects with keys, where values are worklets).\n * Returns methods for setting handlers and broadcasting events in them.\n *\n * T is a generic that looks like:\n * @example\n * {\n * onEvent: () => {},\n * onEvent2: () => {},\n * }\n */\nexport function useSharedHandlers<\n T extends UntypedHandler,\n>(): SharedHandlersReturnType<T> {\n const handlers = useSharedValue<Handlers<T>>({});\n const jsHandlers = useRef<Handlers<T>>({});\n\n // since js -> worklet -> js call is asynchronous, we can not write handlers\n // straight into shared variable (using current shared value as a previous result),\n // since there may be a race condition in a call, and closure may have out-of-dated\n // values. As a result, some of handlers may be not written to \"all handlers\" object.\n // Below we are writing all handlers to `ref` and afterwards synchronize them with\n // shared value (since `refs` are not referring to actual value in worklets).\n // This approach allow us to update synchronously handlers in js thread (and it assures,\n // that it will have all of them) and then update them in worklet thread (calls are\n // happening in FIFO order, so we will always have actual value).\n const updateSharedHandlers = () => {\n // eslint-disable-next-line react-compiler/react-compiler\n handlers.value = jsHandlers.current;\n };\n const setHandlers = useCallback((handler: Handlers<T>) => {\n jsHandlers.current = {\n ...jsHandlers.current,\n ...handler,\n };\n updateSharedHandlers();\n }, []);\n const broadcast = <K extends keyof T>(\n type: K,\n event: Parameters<T[K]>[0],\n ) => {\n \"worklet\";\n\n Object.keys(handlers.value).forEach((key) => {\n handlers.value[key]?.[type]?.(event);\n });\n };\n\n return [setHandlers, broadcast];\n}\n\n/**\n * TS variant of `useAnimatedValue` hook which is added in RN 0.71\n * A better alternative of storing animated values in refs, since\n * it doesn't recreate a new `Animated.Value` object on every re-render\n * and therefore consumes less memory. We can not use a variant from\n * RN, since this library supports earlier versions of RN.\n *\n * @see https://github.com/facebook/react-native/commit/e22217fe8b9455e32695f88ca835e11442b0a937\n */\nexport function useAnimatedValue(\n initialValue: number,\n config?: Animated.AnimatedConfig,\n): Animated.Value {\n const ref = useRef<Animated.Value | null>(null);\n\n if (ref.current == null) {\n ref.current = new Animated.Value(initialValue, config);\n }\n\n return ref.current;\n}\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAF,OAAA;AAEA,IAAAG,eAAA,GAAAH,OAAA;AAkBO,SAASI,2BAA2BA,CACzCC,UAAqD,EACrD;EACA,MAAMC,iBAAiB,GAAIC,OAA4C,IAAK;IAC1E,MAAMC,cAAc,GAClBD,OAA0D;IAC5D,MAAME,qBAAqB,GAAGA,CAAA,KAAM;MAClC,MAAMC,OAAO,GAAG,IAAAC,8BAAc,EAAC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,CAACX,OAAO,GAAG;MACnB,GAAGW,UAAU,CAACX,OAAO;MACrB,GAAGL;IACL,CAAC;IACDkB,oBAAoB,CAAC,CAAC;EACxB,CAAC,EAAE,EAAE,CAAC;EACN,MAAMI,SAAS,GAAGA,CAChBC,IAAO,EACPC,KAA0B,KACvB;IACH,SAAS;;IAETC,MAAM,CAACC,IAAI,CAACZ,QAAQ,CAACK,KAAK,CAAC,CAACQ,OAAO,CAAEC,GAAG,IAAK;MAAA,IAAAC,mBAAA,EAAAC,qBAAA;MAC3C,CAAAD,mBAAA,GAAAf,QAAQ,CAACK,KAAK,CAACS,GAAG,CAAC,cAAAC,mBAAA,gBAAAC,qBAAA,GAAnBD,mBAAA,CAAsBN,IAAI,CAAC,cAAAO,qBAAA,eAA3BA,qBAAA,CAAAC,IAAA,CAAAF,mBAAA,EAA8BL,KAAK,CAAC;IACtC,CAAC,CAAC;EACJ,CAAC;EAED,OAAO,CAACJ,WAAW,EAAEE,SAAS,CAAC;AACjC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASU,gBAAgBA,CAC9BC,YAAoB,EACpBC,MAAgC,EAChB;EAChB,MAAMC,GAAG,GAAG,IAAAlB,aAAM,EAAwB,IAAI,CAAC;EAE/C,IAAIkB,GAAG,CAAC9B,OAAO,IAAI,IAAI,EAAE;IACvB8B,GAAG,CAAC9B,OAAO,GAAG,IAAI+B,qBAAQ,CAACC,KAAK,CAACJ,YAAY,EAAEC,MAAM,CAAC;EACxD;EAEA,OAAOC,GAAG,CAAC9B,OAAO;AACpB","ignoreList":[]}
@@ -5,21 +5,27 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.KeyboardController = void 0;
7
7
  var _bindings = require("./bindings");
8
- let isClosed = false;
9
- let lastEvent = null;
8
+ let isClosed = true;
9
+ let lastState = {
10
+ height: 0,
11
+ tag: -1,
12
+ duration: 0,
13
+ timestamp: new Date().getTime(),
14
+ target: -1,
15
+ type: "default",
16
+ appearance: "light"
17
+ };
10
18
  _bindings.KeyboardEvents.addListener("keyboardDidHide", e => {
11
19
  isClosed = true;
12
- lastEvent = e;
20
+ lastState = e;
13
21
  });
14
22
  _bindings.KeyboardEvents.addListener("keyboardDidShow", e => {
15
23
  isClosed = false;
16
- lastEvent = e;
24
+ lastState = e;
17
25
  });
18
- const dismiss = async ({
19
- keepFocus
20
- } = {
21
- keepFocus: false
22
- }) => {
26
+ const dismiss = async options => {
27
+ const keepFocus = (options === null || options === void 0 ? void 0 : options.keepFocus) ?? false;
28
+ const animated = (options === null || options === void 0 ? void 0 : options.animated) ?? true;
23
29
  return new Promise(resolve => {
24
30
  if (isClosed) {
25
31
  resolve();
@@ -29,19 +35,22 @@ const dismiss = async ({
29
35
  resolve(undefined);
30
36
  subscription.remove();
31
37
  });
32
- _bindings.KeyboardControllerNative.dismiss(keepFocus);
38
+ _bindings.KeyboardControllerNative.dismiss(keepFocus, animated);
33
39
  });
34
40
  };
35
41
  const isVisible = () => !isClosed;
36
- const state = () => lastEvent;
42
+ const state = () => lastState;
43
+ const preload = _bindings.KeyboardControllerNative.preload ?? (() => {});
37
44
  const KeyboardController = exports.KeyboardController = {
38
45
  setDefaultMode: _bindings.KeyboardControllerNative.setDefaultMode,
39
46
  setInputMode: _bindings.KeyboardControllerNative.setInputMode,
40
47
  setFocusTo: _bindings.KeyboardControllerNative.setFocusTo,
48
+ preload,
41
49
  dismiss,
42
50
  isVisible,
43
51
  state,
44
52
  addListener: _bindings.KeyboardControllerNative.addListener,
45
- removeListeners: _bindings.KeyboardControllerNative.removeListeners
53
+ removeListeners: _bindings.KeyboardControllerNative.removeListeners,
54
+ getConstants: _bindings.KeyboardControllerNative.getConstants
46
55
  };
47
56
  //# sourceMappingURL=module.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_bindings","require","isClosed","lastEvent","KeyboardEvents","addListener","e","dismiss","keepFocus","Promise","resolve","subscription","undefined","remove","KeyboardControllerNative","isVisible","state","KeyboardController","exports","setDefaultMode","setInputMode","setFocusTo","removeListeners"],"sources":["module.ts"],"sourcesContent":["import { KeyboardControllerNative, KeyboardEvents } from \"./bindings\";\n\nimport type {\n DismissOptions,\n KeyboardControllerModule,\n KeyboardEventData,\n} from \"./types\";\n\nlet isClosed = false;\nlet lastEvent: KeyboardEventData | null = null;\n\nKeyboardEvents.addListener(\"keyboardDidHide\", (e) => {\n isClosed = true;\n lastEvent = e;\n});\n\nKeyboardEvents.addListener(\"keyboardDidShow\", (e) => {\n isClosed = false;\n lastEvent = e;\n});\n\nconst dismiss = async (\n { keepFocus }: DismissOptions = { keepFocus: false },\n): Promise<void> => {\n return new Promise((resolve) => {\n if (isClosed) {\n resolve();\n\n return;\n }\n\n const subscription = KeyboardEvents.addListener(\"keyboardDidHide\", () => {\n resolve(undefined);\n subscription.remove();\n });\n\n KeyboardControllerNative.dismiss(keepFocus);\n });\n};\nconst isVisible = () => !isClosed;\nconst state = () => lastEvent;\n\nexport const KeyboardController: KeyboardControllerModule = {\n setDefaultMode: KeyboardControllerNative.setDefaultMode,\n setInputMode: KeyboardControllerNative.setInputMode,\n setFocusTo: KeyboardControllerNative.setFocusTo,\n dismiss,\n isVisible,\n state,\n addListener: KeyboardControllerNative.addListener,\n removeListeners: KeyboardControllerNative.removeListeners,\n};\n"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAQA,IAAIC,QAAQ,GAAG,KAAK;AACpB,IAAIC,SAAmC,GAAG,IAAI;AAE9CC,wBAAc,CAACC,WAAW,CAAC,iBAAiB,EAAGC,CAAC,IAAK;EACnDJ,QAAQ,GAAG,IAAI;EACfC,SAAS,GAAGG,CAAC;AACf,CAAC,CAAC;AAEFF,wBAAc,CAACC,WAAW,CAAC,iBAAiB,EAAGC,CAAC,IAAK;EACnDJ,QAAQ,GAAG,KAAK;EAChBC,SAAS,GAAGG,CAAC;AACf,CAAC,CAAC;AAEF,MAAMC,OAAO,GAAG,MAAAA,CACd;EAAEC;AAA0B,CAAC,GAAG;EAAEA,SAAS,EAAE;AAAM,CAAC,KAClC;EAClB,OAAO,IAAIC,OAAO,CAAEC,OAAO,IAAK;IAC9B,IAAIR,QAAQ,EAAE;MACZQ,OAAO,CAAC,CAAC;MAET;IACF;IAEA,MAAMC,YAAY,GAAGP,wBAAc,CAACC,WAAW,CAAC,iBAAiB,EAAE,MAAM;MACvEK,OAAO,CAACE,SAAS,CAAC;MAClBD,YAAY,CAACE,MAAM,CAAC,CAAC;IACvB,CAAC,CAAC;IAEFC,kCAAwB,CAACP,OAAO,CAACC,SAAS,CAAC;EAC7C,CAAC,CAAC;AACJ,CAAC;AACD,MAAMO,SAAS,GAAGA,CAAA,KAAM,CAACb,QAAQ;AACjC,MAAMc,KAAK,GAAGA,CAAA,KAAMb,SAAS;AAEtB,MAAMc,kBAA4C,GAAAC,OAAA,CAAAD,kBAAA,GAAG;EAC1DE,cAAc,EAAEL,kCAAwB,CAACK,cAAc;EACvDC,YAAY,EAAEN,kCAAwB,CAACM,YAAY;EACnDC,UAAU,EAAEP,kCAAwB,CAACO,UAAU;EAC/Cd,OAAO;EACPQ,SAAS;EACTC,KAAK;EACLX,WAAW,EAAES,kCAAwB,CAACT,WAAW;EACjDiB,eAAe,EAAER,kCAAwB,CAACQ;AAC5C,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_bindings","require","isClosed","lastState","height","tag","duration","timestamp","Date","getTime","target","type","appearance","KeyboardEvents","addListener","e","dismiss","options","keepFocus","animated","Promise","resolve","subscription","undefined","remove","KeyboardControllerNative","isVisible","state","preload","KeyboardController","exports","setDefaultMode","setInputMode","setFocusTo","removeListeners","getConstants"],"sources":["module.ts"],"sourcesContent":["import { KeyboardControllerNative, KeyboardEvents } from \"./bindings\";\n\nimport type {\n DismissOptions,\n KeyboardControllerModule,\n KeyboardEventData,\n} from \"./types\";\n\nlet isClosed = true;\nlet lastState: KeyboardEventData = {\n height: 0,\n tag: -1,\n duration: 0,\n timestamp: new Date().getTime(),\n target: -1,\n type: \"default\",\n appearance: \"light\",\n};\n\nKeyboardEvents.addListener(\"keyboardDidHide\", (e) => {\n isClosed = true;\n lastState = e;\n});\n\nKeyboardEvents.addListener(\"keyboardDidShow\", (e) => {\n isClosed = false;\n lastState = e;\n});\n\nconst dismiss = async (options?: Partial<DismissOptions>): Promise<void> => {\n const keepFocus = options?.keepFocus ?? false;\n const animated = options?.animated ?? true;\n\n return new Promise((resolve) => {\n if (isClosed) {\n resolve();\n\n return;\n }\n\n const subscription = KeyboardEvents.addListener(\"keyboardDidHide\", () => {\n resolve(undefined);\n subscription.remove();\n });\n\n KeyboardControllerNative.dismiss(keepFocus, animated);\n });\n};\nconst isVisible = () => !isClosed;\nconst state = () => lastState;\nconst preload = KeyboardControllerNative.preload ?? (() => {});\n\nexport const KeyboardController: KeyboardControllerModule = {\n setDefaultMode: KeyboardControllerNative.setDefaultMode,\n setInputMode: KeyboardControllerNative.setInputMode,\n setFocusTo: KeyboardControllerNative.setFocusTo,\n preload,\n dismiss,\n isVisible,\n state,\n addListener: KeyboardControllerNative.addListener,\n removeListeners: KeyboardControllerNative.removeListeners,\n getConstants: KeyboardControllerNative.getConstants,\n};\n"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAQA,IAAIC,QAAQ,GAAG,IAAI;AACnB,IAAIC,SAA4B,GAAG;EACjCC,MAAM,EAAE,CAAC;EACTC,GAAG,EAAE,CAAC,CAAC;EACPC,QAAQ,EAAE,CAAC;EACXC,SAAS,EAAE,IAAIC,IAAI,CAAC,CAAC,CAACC,OAAO,CAAC,CAAC;EAC/BC,MAAM,EAAE,CAAC,CAAC;EACVC,IAAI,EAAE,SAAS;EACfC,UAAU,EAAE;AACd,CAAC;AAEDC,wBAAc,CAACC,WAAW,CAAC,iBAAiB,EAAGC,CAAC,IAAK;EACnDb,QAAQ,GAAG,IAAI;EACfC,SAAS,GAAGY,CAAC;AACf,CAAC,CAAC;AAEFF,wBAAc,CAACC,WAAW,CAAC,iBAAiB,EAAGC,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0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _reactNative = require("react-native");
8
+ var _default = exports.default = (0, _reactNative.codegenNativeComponent)("ClippingScrollViewDecoratorView", {
9
+ interfaceOnly: true,
10
+ excludedPlatforms: ["iOS"]
11
+ });
12
+ //# sourceMappingURL=ClippingScrollViewDecoratorViewNativeComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","_default","exports","default","codegenNativeComponent","interfaceOnly","excludedPlatforms"],"sources":["ClippingScrollViewDecoratorViewNativeComponent.ts"],"sourcesContent":["import { codegenNativeComponent } from \"react-native\";\n\nimport type { HostComponent } from \"react-native\";\nimport type { ViewProps } from \"react-native\";\nimport type { Double } from \"react-native/Libraries/Types/CodegenTypes\";\n\nexport interface NativeProps extends ViewProps {\n contentInsetBottom: Double;\n contentInsetTop: Double;\n applyWorkaroundForContentInsetHitTestBug?: boolean;\n}\n\nexport default codegenNativeComponent<NativeProps>(\n \"ClippingScrollViewDecoratorView\",\n {\n interfaceOnly: true,\n excludedPlatforms: [\"iOS\"],\n },\n) as HostComponent<NativeProps>;\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAAsD,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAYvC,IAAAC,mCAAsB,EACnC,iCAAiC,EACjC;EACEC,aAAa,EAAE,IAAI;EACnBC,iBAAiB,EAAE,CAAC,KAAK;AAC3B,CACF,CAAC","ignoreList":[]}
@@ -3,8 +3,14 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.default = void 0;
6
+ exports.default = exports.Commands = void 0;
7
+ var _codegenNativeCommands = _interopRequireDefault(require("react-native/Libraries/Utilities/codegenNativeCommands"));
7
8
  var _codegenNativeComponent = _interopRequireDefault(require("react-native/Libraries/Utilities/codegenNativeComponent"));
8
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
- var _default = exports.default = (0, _codegenNativeComponent.default)("RNKeyboardControllerView");
10
+ const Commands = exports.Commands = (0, _codegenNativeCommands.default)({
11
+ supportedCommands: ["synchronizeFocusedInputLayout"]
12
+ });
13
+ var _default = exports.default = (0, _codegenNativeComponent.default)("RNKeyboardControllerView", {
14
+ interfaceOnly: true
15
+ });
10
16
  //# sourceMappingURL=KeyboardControllerViewNativeComponent.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_codegenNativeComponent","_interopRequireDefault","require","e","__esModule","default","_default","exports","codegenNativeComponent"],"sources":["KeyboardControllerViewNativeComponent.ts"],"sourcesContent":["import codegenNativeComponent from \"react-native/Libraries/Utilities/codegenNativeComponent\";\n\nimport type { HostComponent } from \"react-native\";\nimport type { ViewProps } from \"react-native/Libraries/Components/View/ViewPropTypes\";\nimport type {\n DirectEventHandler,\n Double,\n Int32,\n} from \"react-native/Libraries/Types/CodegenTypes\";\n\ntype KeyboardMoveEvent = Readonly<{\n height: Double;\n progress: Double;\n duration: Int32;\n target: Int32;\n}>;\n\ntype FocusedInputLayoutChangedEvent = Readonly<{\n target: Int32;\n parentScrollViewTarget: Int32;\n layout: {\n x: Double;\n y: Double;\n width: Double;\n height: Double;\n absoluteX: Double;\n absoluteY: Double;\n };\n}>;\n\ntype FocusedInputTextChangedEvent = Readonly<{\n text: string;\n}>;\n\ntype FocusedInputSelectionChangedEvent = Readonly<{\n target: Int32;\n selection: {\n start: {\n x: Double;\n y: Double;\n position: Int32;\n };\n end: {\n x: Double;\n y: Double;\n position: Int32;\n };\n };\n}>;\n\nexport interface NativeProps extends ViewProps {\n // props\n enabled?: boolean;\n statusBarTranslucent?: boolean;\n navigationBarTranslucent?: boolean;\n preserveEdgeToEdge?: boolean;\n // callbacks\n /// keyboard\n onKeyboardMoveStart?: DirectEventHandler<KeyboardMoveEvent>;\n onKeyboardMove?: DirectEventHandler<KeyboardMoveEvent>;\n onKeyboardMoveEnd?: DirectEventHandler<KeyboardMoveEvent>;\n onKeyboardMoveInteractive?: DirectEventHandler<KeyboardMoveEvent>;\n /// focused input\n onFocusedInputLayoutChanged?: DirectEventHandler<FocusedInputLayoutChangedEvent>;\n onFocusedInputTextChanged?: DirectEventHandler<FocusedInputTextChangedEvent>;\n onFocusedInputSelectionChanged?: DirectEventHandler<FocusedInputSelectionChangedEvent>;\n}\n\nexport default codegenNativeComponent<NativeProps>(\n \"RNKeyboardControllerView\",\n) as HostComponent<NativeProps>;\n"],"mappings":";;;;;;AAAA,IAAAA,uBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA6F,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAF,OAAA,GAoE9E,IAAAG,+BAAsB,EACnC,0BACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_codegenNativeCommands","_interopRequireDefault","require","_codegenNativeComponent","e","__esModule","default","Commands","exports","codegenNativeCommands","supportedCommands","_default","codegenNativeComponent","interfaceOnly"],"sources":["KeyboardControllerViewNativeComponent.ts"],"sourcesContent":["import codegenNativeCommands from \"react-native/Libraries/Utilities/codegenNativeCommands\";\nimport codegenNativeComponent from \"react-native/Libraries/Utilities/codegenNativeComponent\";\n\nimport type { HostComponent } from \"react-native\";\nimport type { ViewProps } from \"react-native/Libraries/Components/View/ViewPropTypes\";\nimport type {\n DirectEventHandler,\n Double,\n Int32,\n} from \"react-native/Libraries/Types/CodegenTypes\";\n\ntype KeyboardMoveEvent = Readonly<{\n height: Double;\n progress: Double;\n duration: Int32;\n target: Int32;\n}>;\n\ntype FocusedInputLayoutChangedEvent = Readonly<{\n target: Int32;\n parentScrollViewTarget: Int32;\n layout: {\n x: Double;\n y: Double;\n width: Double;\n height: Double;\n absoluteX: Double;\n absoluteY: Double;\n };\n}>;\n\ntype FocusedInputTextChangedEvent = Readonly<{\n text: string;\n}>;\n\ntype FocusedInputSelectionChangedEvent = Readonly<{\n target: Int32;\n selection: {\n start: {\n x: Double;\n y: Double;\n position: Int32;\n };\n end: {\n x: Double;\n y: Double;\n position: Int32;\n };\n };\n}>;\n\nexport interface NativeProps extends ViewProps {\n // props\n enabled?: boolean;\n statusBarTranslucent?: boolean;\n navigationBarTranslucent?: boolean;\n preserveEdgeToEdge?: boolean;\n // callbacks\n /// keyboard\n onKeyboardMoveStart?: DirectEventHandler<KeyboardMoveEvent>;\n onKeyboardMove?: DirectEventHandler<KeyboardMoveEvent>;\n onKeyboardMoveEnd?: DirectEventHandler<KeyboardMoveEvent>;\n onKeyboardMoveInteractive?: DirectEventHandler<KeyboardMoveEvent>;\n /// focused input\n onFocusedInputLayoutChanged?: DirectEventHandler<FocusedInputLayoutChangedEvent>;\n onFocusedInputTextChanged?: DirectEventHandler<FocusedInputTextChangedEvent>;\n onFocusedInputSelectionChanged?: DirectEventHandler<FocusedInputSelectionChangedEvent>;\n}\n\ninterface NativeCommands {\n synchronizeFocusedInputLayout: (\n viewRef: React.ElementRef<HostComponent<NativeProps>>,\n ) => void;\n}\n\nexport const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({\n supportedCommands: [\"synchronizeFocusedInputLayout\"],\n});\n\nexport default codegenNativeComponent<NativeProps>(\"RNKeyboardControllerView\", {\n interfaceOnly: true,\n}) as HostComponent<NativeProps>;\n"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,uBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAA6F,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AA0EtF,MAAMG,QAAwB,GAAAC,OAAA,CAAAD,QAAA,GAAG,IAAAE,8BAAqB,EAAiB;EAC5EC,iBAAiB,EAAE,CAAC,+BAA+B;AACrD,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAH,OAAA,CAAAF,OAAA,GAEY,IAAAM,+BAAsB,EAAc,0BAA0B,EAAE;EAC7EC,aAAa,EAAE;AACjB,CAAC,CAAC","ignoreList":[]}
@@ -7,6 +7,7 @@ exports.default = void 0;
7
7
  var _codegenNativeComponent = _interopRequireDefault(require("react-native/Libraries/Utilities/codegenNativeComponent"));
8
8
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
9
  var _default = exports.default = (0, _codegenNativeComponent.default)("RNKeyboardGestureArea", {
10
- excludedPlatforms: ["iOS"]
10
+ excludedPlatforms: ["iOS"],
11
+ interfaceOnly: true
11
12
  });
12
13
  //# sourceMappingURL=KeyboardGestureAreaNativeComponent.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_codegenNativeComponent","_interopRequireDefault","require","e","__esModule","default","_default","exports","codegenNativeComponent","excludedPlatforms"],"sources":["KeyboardGestureAreaNativeComponent.ts"],"sourcesContent":["import codegenNativeComponent from \"react-native/Libraries/Utilities/codegenNativeComponent\";\n\nimport type { HostComponent } from \"react-native\";\nimport type { ViewProps } from \"react-native/Libraries/Components/View/ViewPropTypes\";\nimport type {\n Double,\n WithDefault,\n} from \"react-native/Libraries/Types/CodegenTypes\";\n\nexport interface NativeProps extends ViewProps {\n interpolator?: WithDefault<\"linear\" | \"ios\", \"linear\">;\n showOnSwipeUp?: boolean;\n enableSwipeToDismiss?: boolean;\n offset?: Double;\n textInputNativeID?: string;\n}\n\nexport default codegenNativeComponent<NativeProps>(\"RNKeyboardGestureArea\", {\n excludedPlatforms: [\"iOS\"],\n}) as HostComponent<NativeProps>;\n"],"mappings":";;;;;;AAAA,IAAAA,uBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA6F,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAF,OAAA,GAiB9E,IAAAG,+BAAsB,EAAc,uBAAuB,EAAE;EAC1EC,iBAAiB,EAAE,CAAC,KAAK;AAC3B,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_codegenNativeComponent","_interopRequireDefault","require","e","__esModule","default","_default","exports","codegenNativeComponent","excludedPlatforms","interfaceOnly"],"sources":["KeyboardGestureAreaNativeComponent.ts"],"sourcesContent":["import codegenNativeComponent from \"react-native/Libraries/Utilities/codegenNativeComponent\";\n\nimport type { HostComponent } from \"react-native\";\nimport type { ViewProps } from \"react-native/Libraries/Components/View/ViewPropTypes\";\nimport type {\n Double,\n WithDefault,\n} from \"react-native/Libraries/Types/CodegenTypes\";\n\nexport interface NativeProps extends ViewProps {\n interpolator?: WithDefault<\"linear\" | \"ios\", \"linear\">;\n showOnSwipeUp?: boolean;\n enableSwipeToDismiss?: boolean;\n offset?: Double;\n textInputNativeID?: string;\n}\n\nexport default codegenNativeComponent<NativeProps>(\"RNKeyboardGestureArea\", {\n excludedPlatforms: [\"iOS\"],\n interfaceOnly: true,\n}) as HostComponent<NativeProps>;\n"],"mappings":";;;;;;AAAA,IAAAA,uBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA6F,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAF,OAAA,GAiB9E,IAAAG,+BAAsB,EAAc,uBAAuB,EAAE;EAC1EC,iBAAiB,EAAE,CAAC,KAAK,CAAC;EAC1BC,aAAa,EAAE;AACjB,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _codegenNativeComponent = _interopRequireDefault(require("react-native/Libraries/Utilities/codegenNativeComponent"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
+ var _default = exports.default = (0, _codegenNativeComponent.default)("KeyboardToolbarGroupView", {
10
+ interfaceOnly: true
11
+ });
12
+ //# sourceMappingURL=KeyboardToolbarGroupViewNativeComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_codegenNativeComponent","_interopRequireDefault","require","e","__esModule","default","_default","exports","codegenNativeComponent","interfaceOnly"],"sources":["KeyboardToolbarGroupViewNativeComponent.ts"],"sourcesContent":["import codegenNativeComponent from \"react-native/Libraries/Utilities/codegenNativeComponent\";\n\nimport type { HostComponent } from \"react-native\";\nimport type { ViewProps } from \"react-native/Libraries/Components/View/ViewPropTypes\";\n\nexport interface NativeProps extends ViewProps {}\n\nexport default codegenNativeComponent<NativeProps>(\"KeyboardToolbarGroupView\", {\n interfaceOnly: true,\n}) as HostComponent<NativeProps>;\n"],"mappings":";;;;;;AAAA,IAAAA,uBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA6F,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAF,OAAA,GAO9E,IAAAG,+BAAsB,EAAc,0BAA0B,EAAE;EAC7EC,aAAa,EAAE;AACjB,CAAC,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","get"],"sources":["NativeKeyboardController.ts"],"sourcesContent":["import { TurboModuleRegistry } from \"react-native\";\n\nimport type { TurboModule } from \"react-native\";\n\nexport interface Spec extends TurboModule {\n readonly getConstants: () => {};\n\n // methods\n setInputMode(mode: number): void;\n setDefaultMode(): void;\n dismiss(keepFocus: boolean): void;\n setFocusTo(direction: string): void;\n\n // event emitter\n addListener: (eventName: string) => void;\n removeListeners: (count: number) => void;\n}\n\nexport default TurboModuleRegistry.get<Spec>(\"KeyboardController\");\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAAmD,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAkBpCC,gCAAmB,CAACC,GAAG,CAAO,oBAAoB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","get"],"sources":["NativeKeyboardController.ts"],"sourcesContent":["import { TurboModuleRegistry } from \"react-native\";\n\nimport type { TurboModule } from \"react-native\";\n\nexport interface Spec extends TurboModule {\n readonly getConstants: () => {\n keyboardBorderRadius: number;\n };\n\n // methods\n setInputMode(mode: number): void;\n setDefaultMode(): void;\n preload(): void;\n dismiss(keepFocus: boolean, animated: boolean): void;\n setFocusTo(direction: string): void;\n viewPositionInWindow(viewTag: number): Promise<object>;\n\n // event emitter\n addListener: (eventName: string) => void;\n removeListeners: (count: number) => void;\n}\n\nexport default TurboModuleRegistry.get<Spec>(\"KeyboardController\");\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAAmD,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAsBpCC,gCAAmB,CAACC,GAAG,CAAO,oBAAoB,CAAC","ignoreList":[]}
@@ -1 +1 @@
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 // 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;\n\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 | null;\n addListener: (eventName: string) => void;\n removeListeners: (count: number) => void;\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 tag: number;\n duration: number;\n timestamp: number;\n target: number;\n type: NonNullable<TextInputProps[\"keyboardType\"]>;\n appearance: NonNullable<TextInputProps[\"keyboardAppearance\"]>;\n};\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
+ {"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\nexport type 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 * @platform android\n * @see https://github.com/kirillzyusko/react-native-keyboard-controller/issues/14\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 * @platform android\n * @see https://github.com/kirillzyusko/react-native-keyboard-controller/issues/119\n */\n navigationBarTranslucent?: boolean;\n /**\n * A boolean property indicating whether to keep edge-to-edge mode always enabled (even when you disable the module).\n * Defaults to `false`.\n *\n * @platform android\n * @see https://github.com/kirillzyusko/react-native-keyboard-controller/issues/592\n */\n preserveEdgeToEdge?: boolean;\n /**\n * A boolean prop indicating whether the module is enabled. It indicate only initial state\n * (if you try to change this prop after component mount it will not have any effect).\n * To change the property in runtime use `useKeyboardController` hook and `setEnabled` method.\n * Defaults to `true`.\n */\n enabled?: boolean;\n /**\n * A boolean prop indicating whether to preload the keyboard to reduce time-to-interaction (TTI) on first input focus.\n * Defaults to `true`.\n *\n * @platform ios\n */\n preload?: boolean;\n};\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 // 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;\n\nexport type OverKeyboardViewProps = PropsWithChildren<{\n visible: boolean;\n}>;\nexport type ClippingScrollViewProps = PropsWithChildren<\n ViewProps & {\n /** An additional space that gets applied to the bottom of the ScrollView content. Default is 0. */\n contentInsetBottom?: number;\n /** An additional space that gets applied to the top of the ScrollView content. Default is 0. */\n contentInsetTop?: number;\n applyWorkaroundForContentInsetHitTestBug?: boolean;\n }\n>;\nexport type KeyboardBackgroundViewProps = PropsWithChildren<ViewProps>;\nexport type KeyboardToolbarGroupViewProps = PropsWithChildren<ViewProps>;\nexport type KeyboardExtenderProps = PropsWithChildren<{\n /** Controls whether this `KeyboardExtender` instance should take effect. Default is `true`. */\n enabled?: boolean;\n}>;\n\nexport type Direction = \"next\" | \"prev\" | \"current\";\nexport type DismissOptions = {\n keepFocus: boolean;\n animated: boolean;\n};\nexport type KeyboardControllerModule = {\n // android only\n setDefaultMode: () => void;\n setInputMode: (mode: number) => void;\n // ios only\n preload: () => void;\n // all platforms\n dismiss: (options?: Partial<DismissOptions>) => Promise<void>;\n setFocusTo: (direction: Direction) => void;\n isVisible: () => boolean;\n state: () => KeyboardEventData;\n addListener: (eventName: string) => void;\n removeListeners: (count: number) => void;\n // constants\n getConstants: () => {\n keyboardBorderRadius: number;\n };\n};\nexport type ViewPositionInWindowResult = {\n x: number;\n y: number;\n width: number;\n height: number;\n};\nexport type KeyboardControllerNativeModule = {\n // android only\n setDefaultMode: () => void;\n setInputMode: (mode: number) => void;\n // ios only\n preload: () => void;\n // all platforms\n dismiss: (keepFocus: boolean, animated: boolean) => void;\n setFocusTo: (direction: Direction) => void;\n viewPositionInWindow: (\n viewTag: number,\n ) => Promise<ViewPositionInWindowResult>;\n // constants\n getConstants: () => {\n keyboardBorderRadius: number;\n };\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 tag: number;\n duration: number;\n timestamp: number;\n target: number;\n type: NonNullable<TextInputProps[\"keyboardType\"]>;\n appearance: \"dark\" | \"light\";\n};\nexport type IKeyboardState = {\n isVisible: boolean;\n} & KeyboardEventData;\nexport type KeyboardEventsModule = {\n addListener: (\n name: KeyboardControllerEvents,\n cb: (e: KeyboardEventData) => void,\n ) => EmitterSubscription;\n};\nexport type FocusedInputAvailableEvents =\n | \"focusDidSet\"\n | \"layoutDidSynchronize\";\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":[]}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.findNodeHandle = void 0;
7
+ const findNodeHandle = componentOrHandle => componentOrHandle;
8
+ exports.findNodeHandle = findNodeHandle;
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["findNodeHandle","componentOrHandle","exports"],"sources":["index.ts"],"sourcesContent":["import type { findNodeHandle as findNodeHandleRN } from \"react-native\";\n\ntype FindNodeHandleRN = typeof findNodeHandleRN;\n\nexport const findNodeHandle: FindNodeHandleRN = (componentOrHandle) =>\n componentOrHandle as number | null;\n"],"mappings":";;;;;;AAIO,MAAMA,cAAgC,GAAIC,iBAAiB,IAChEA,iBAAkC;AAACC,OAAA,CAAAF,cAAA,GAAAA,cAAA","ignoreList":[]}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "findNodeHandle", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _reactNative.findNodeHandle;
10
+ }
11
+ });
12
+ var _reactNative = require("react-native");
13
+ //# sourceMappingURL=index.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require"],"sources":["index.native.ts"],"sourcesContent":["import { findNodeHandle } from \"react-native\";\n\nexport { findNodeHandle };\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA","ignoreList":[]}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _bindings = require("../../bindings");
10
+ var _components = require("../../components");
11
+ var _hooks = require("../../hooks");
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
+ const AnimatedKeyboardBackgroundView = _reactNative.Animated.createAnimatedComponent(_bindings.KeyboardBackgroundView);
14
+ const KeyboardExtender = ({
15
+ children,
16
+ enabled = true
17
+ }) => {
18
+ const {
19
+ progress
20
+ } = (0, _hooks.useKeyboardAnimation)();
21
+ return /*#__PURE__*/_react.default.createElement(_components.KeyboardStickyView, {
22
+ enabled: enabled
23
+ }, /*#__PURE__*/_react.default.createElement(AnimatedKeyboardBackgroundView, {
24
+ style: {
25
+ opacity: progress
26
+ }
27
+ }, children));
28
+ };
29
+ var _default = exports.default = KeyboardExtender;
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_bindings","_components","_hooks","e","__esModule","default","AnimatedKeyboardBackgroundView","Animated","createAnimatedComponent","KeyboardBackgroundView","KeyboardExtender","children","enabled","progress","useKeyboardAnimation","createElement","KeyboardStickyView","style","opacity","_default","exports"],"sources":["index.tsx"],"sourcesContent":["import React from \"react\";\nimport { Animated } from \"react-native\";\n\nimport { KeyboardBackgroundView } from \"../../bindings\";\nimport { KeyboardStickyView } from \"../../components\";\nimport { useKeyboardAnimation } from \"../../hooks\";\n\nimport type { KeyboardExtenderProps } from \"../../types\";\nimport type { PropsWithChildren } from \"react\";\n\nconst AnimatedKeyboardBackgroundView = Animated.createAnimatedComponent(\n KeyboardBackgroundView,\n);\n\nconst KeyboardExtender = ({\n children,\n enabled = true,\n}: PropsWithChildren<KeyboardExtenderProps>) => {\n const { progress } = useKeyboardAnimation();\n\n return (\n <KeyboardStickyView enabled={enabled}>\n <AnimatedKeyboardBackgroundView style={{ opacity: progress }}>\n {children}\n </AnimatedKeyboardBackgroundView>\n </KeyboardStickyView>\n );\n};\n\nexport default KeyboardExtender;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAAmD,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAKnD,MAAMG,8BAA8B,GAAGC,qBAAQ,CAACC,uBAAuB,CACrEC,gCACF,CAAC;AAED,MAAMC,gBAAgB,GAAGA,CAAC;EACxBC,QAAQ;EACRC,OAAO,GAAG;AAC8B,CAAC,KAAK;EAC9C,MAAM;IAAEC;EAAS,CAAC,GAAG,IAAAC,2BAAoB,EAAC,CAAC;EAE3C,oBACElB,MAAA,CAAAS,OAAA,CAAAU,aAAA,CAACd,WAAA,CAAAe,kBAAkB;IAACJ,OAAO,EAAEA;EAAQ,gBACnChB,MAAA,CAAAS,OAAA,CAAAU,aAAA,CAACT,8BAA8B;IAACW,KAAK,EAAE;MAAEC,OAAO,EAAEL;IAAS;EAAE,GAC1DF,QAC6B,CACd,CAAC;AAEzB,CAAC;AAAC,IAAAQ,QAAA,GAAAC,OAAA,CAAAf,OAAA,GAEaK,gBAAgB","ignoreList":[]}
@@ -3,6 +3,12 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ Object.defineProperty(exports, "KeyboardExtender", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _KeyboardExtender.default;
10
+ }
11
+ });
6
12
  Object.defineProperty(exports, "OverKeyboardView", {
7
13
  enumerable: true,
8
14
  get: function () {
@@ -10,5 +16,6 @@ Object.defineProperty(exports, "OverKeyboardView", {
10
16
  }
11
17
  });
12
18
  var _OverKeyboardView = _interopRequireDefault(require("./OverKeyboardView"));
19
+ var _KeyboardExtender = _interopRequireDefault(require("./KeyboardExtender"));
13
20
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_OverKeyboardView","_interopRequireDefault","require","e","__esModule","default"],"sources":["index.ts"],"sourcesContent":["export { default as OverKeyboardView } from \"./OverKeyboardView\";\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAiE,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]}
1
+ {"version":3,"names":["_OverKeyboardView","_interopRequireDefault","require","_KeyboardExtender","e","__esModule","default"],"sources":["index.ts"],"sourcesContent":["export { default as OverKeyboardView } from \"./OverKeyboardView\";\nexport { default as KeyboardExtender } from \"./KeyboardExtender\";\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAAiE,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]}
@@ -1,10 +1,10 @@
1
- import React, { useEffect, useMemo, useState } from "react";
1
+ import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
2
2
  import { Animated, Platform, StyleSheet } from "react-native";
3
3
  import Reanimated, { useSharedValue } from "react-native-reanimated";
4
- import { KeyboardControllerView } from "./bindings";
4
+ import { FocusedInputEvents, KeyboardControllerView, KeyboardControllerViewCommands } from "./bindings";
5
5
  import { KeyboardContext } from "./context";
6
6
  import { useAnimatedValue, useSharedHandlers } from "./internal";
7
- import { applyMonkeyPatch, revertMonkeyPatch } from "./monkey-patch";
7
+ import { KeyboardController } from "./module";
8
8
  import { useAnimatedKeyboardHandler, useFocusedInputLayoutHandler, useFocusedInputSelectionHandler, useFocusedInputTextHandler } from "./reanimated";
9
9
  const KeyboardControllerViewAnimated = Reanimated.createAnimatedComponent(Animated.createAnimatedComponent(KeyboardControllerView));
10
10
  const styles = StyleSheet.create({
@@ -16,6 +16,7 @@ const styles = StyleSheet.create({
16
16
  position: "absolute"
17
17
  }
18
18
  });
19
+
19
20
  // capture `Platform.OS` in separate variable to avoid deep workletization of entire RN package
20
21
  // see https://github.com/kirillzyusko/react-native-keyboard-controller/issues/393 and https://github.com/kirillzyusko/react-native-keyboard-controller/issues/294 for more details
21
22
  const OS = Platform.OS;
@@ -24,8 +25,10 @@ export const KeyboardProvider = ({
24
25
  statusBarTranslucent,
25
26
  navigationBarTranslucent,
26
27
  preserveEdgeToEdge,
27
- enabled: initiallyEnabled = true
28
+ enabled: initiallyEnabled = true,
29
+ preload = true
28
30
  }) => {
31
+ const viewRef = useRef(null);
29
32
  // state
30
33
  const [enabled, setEnabled] = useState(initiallyEnabled);
31
34
  // animated values
@@ -37,6 +40,15 @@ export const KeyboardProvider = ({
37
40
  const layout = useSharedValue(null);
38
41
  const [setKeyboardHandlers, broadcastKeyboardEvents] = useSharedHandlers();
39
42
  const [setInputHandlers, broadcastInputEvents] = useSharedHandlers();
43
+ const update = useCallback(async () => {
44
+ KeyboardControllerViewCommands.synchronizeFocusedInputLayout(viewRef.current);
45
+ await new Promise(resolve => {
46
+ const subscription = FocusedInputEvents.addListener("layoutDidSynchronize", () => {
47
+ subscription.remove();
48
+ resolve(null);
49
+ });
50
+ });
51
+ }, []);
40
52
  // memo
41
53
  const context = useMemo(() => ({
42
54
  enabled,
@@ -49,10 +61,11 @@ export const KeyboardProvider = ({
49
61
  height: heightSV
50
62
  },
51
63
  layout,
64
+ update,
52
65
  setKeyboardHandlers,
53
66
  setInputHandlers,
54
67
  setEnabled
55
- }), [enabled]);
68
+ }), [enabled, update]);
56
69
  const style = useMemo(() => [styles.hidden, {
57
70
  transform: [{
58
71
  translateX: height
@@ -129,17 +142,15 @@ export const KeyboardProvider = ({
129
142
  broadcastInputEvents("onSelectionChange", e);
130
143
  }
131
144
  }, []);
132
- // effects
133
145
  useEffect(() => {
134
- if (enabled) {
135
- applyMonkeyPatch();
136
- } else {
137
- revertMonkeyPatch();
146
+ if (preload) {
147
+ KeyboardController.preload();
138
148
  }
139
- }, [enabled]);
149
+ }, [preload]);
140
150
  return /*#__PURE__*/React.createElement(KeyboardContext.Provider, {
141
151
  value: context
142
152
  }, /*#__PURE__*/React.createElement(KeyboardControllerViewAnimated, {
153
+ ref: viewRef,
143
154
  enabled: enabled,
144
155
  onKeyboardMoveReanimated: keyboardHandler,
145
156
  onKeyboardMoveStart: OS === "ios" ? onKeyboardMove : undefined,
@@ -1 +1 @@
1
- {"version":3,"names":["React","useEffect","useMemo","useState","Animated","Platform","StyleSheet","Reanimated","useSharedValue","KeyboardControllerView","KeyboardContext","useAnimatedValue","useSharedHandlers","applyMonkeyPatch","revertMonkeyPatch","useAnimatedKeyboardHandler","useFocusedInputLayoutHandler","useFocusedInputSelectionHandler","useFocusedInputTextHandler","KeyboardControllerViewAnimated","createAnimatedComponent","styles","create","container","flex","hidden","display","position","OS","KeyboardProvider","children","statusBarTranslucent","navigationBarTranslucent","preserveEdgeToEdge","enabled","initiallyEnabled","setEnabled","progress","height","progressSV","heightSV","layout","setKeyboardHandlers","broadcastKeyboardEvents","setInputHandlers","broadcastInputEvents","context","animated","multiply","reanimated","style","transform","translateX","translateY","onKeyboardMove","event","nativeEvent","useNativeDriver","updateSharedValues","platforms","includes","value","keyboardHandler","onKeyboardMoveStart","onKeyboardMoveEnd","onKeyboardMoveInteractive","inputLayoutHandler","onFocusedInputLayoutChanged","e","target","inputTextHandler","onFocusedInputTextChanged","inputSelectionHandler","onFocusedInputSelectionChanged","createElement","Provider","onKeyboardMoveReanimated","undefined","onFocusedInputLayoutChangedReanimated","onFocusedInputTextChangedReanimated","onFocusedInputSelectionChangedReanimated","View"],"sources":["animated.tsx"],"sourcesContent":["import React, { useEffect, useMemo, useState } from \"react\";\nimport { Animated, Platform, StyleSheet } from \"react-native\";\nimport Reanimated, { useSharedValue } from \"react-native-reanimated\";\n\nimport { KeyboardControllerView } from \"./bindings\";\nimport { KeyboardContext } from \"./context\";\nimport { useAnimatedValue, useSharedHandlers } from \"./internal\";\nimport { applyMonkeyPatch, revertMonkeyPatch } from \"./monkey-patch\";\nimport {\n useAnimatedKeyboardHandler,\n useFocusedInputLayoutHandler,\n useFocusedInputSelectionHandler,\n useFocusedInputTextHandler,\n} from \"./reanimated\";\n\nimport type { KeyboardAnimationContext } from \"./context\";\nimport type {\n FocusedInputHandler,\n FocusedInputLayoutChangedEvent,\n KeyboardControllerProps,\n KeyboardHandler,\n NativeEvent,\n} from \"./types\";\nimport type { ViewStyle } from \"react-native\";\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 * A boolean property indicating whether to keep edge-to-edge mode always enabled (even when you disable the module).\n * Defaults to `false`.\n *\n * @see https://github.com/kirillzyusko/react-native-keyboard-controller/issues/592\n * @platform android\n */\n preserveEdgeToEdge?: boolean;\n /**\n * A boolean prop indicating whether the module is enabled. It indicate only initial state,\n * i. e. if you try to change this prop after component mount it will not have any effect.\n * To change the property in runtime use `useKeyboardController` hook and `setEnabled` method.\n * Defaults to `true`.\n */\n enabled?: boolean;\n};\n\n// capture `Platform.OS` in separate variable to avoid deep workletization of entire RN package\n// see https://github.com/kirillzyusko/react-native-keyboard-controller/issues/393 and https://github.com/kirillzyusko/react-native-keyboard-controller/issues/294 for more details\nconst OS = Platform.OS;\n\nexport const KeyboardProvider = ({\n children,\n statusBarTranslucent,\n navigationBarTranslucent,\n preserveEdgeToEdge,\n enabled: initiallyEnabled = true,\n}: KeyboardProviderProps) => {\n // state\n const [enabled, setEnabled] = useState(initiallyEnabled);\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 layout = useSharedValue<FocusedInputLayoutChangedEvent | null>(null);\n const [setKeyboardHandlers, broadcastKeyboardEvents] =\n useSharedHandlers<KeyboardHandler>();\n const [setInputHandlers, broadcastInputEvents] =\n useSharedHandlers<FocusedInputHandler>();\n // memo\n const context = useMemo<KeyboardAnimationContext>(\n () => ({\n enabled,\n animated: { progress: progress, height: Animated.multiply(height,-1) },\n reanimated: { progress: progressSV, height: heightSV },\n layout,\n setKeyboardHandlers,\n setInputHandlers,\n setEnabled,\n }),\n [enabled],\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:Platform.OS as string=='harmony'?false:true },\n ),\n [],\n );\n // handlers\n const updateSharedValues = (event: NativeEvent, platforms: string[]) => {\n \"worklet\";\n\n if (platforms.includes(OS)) {\n // eslint-disable-next-line react-compiler/react-compiler\n progressSV.value = event.progress;\n heightSV.value = -event.height;\n }\n };\n const keyboardHandler = useAnimatedKeyboardHandler(\n {\n onKeyboardMoveStart: (event: NativeEvent) => {\n \"worklet\";\n\n broadcastKeyboardEvents(\"onStart\", event);\n updateSharedValues(event, [\"ios\"]);\n },\n onKeyboardMove: (event: NativeEvent) => {\n \"worklet\";\n\n broadcastKeyboardEvents(\"onMove\", event);\n updateSharedValues(event, [\"android\", \"harmony\"]);\n },\n onKeyboardMoveEnd: (event: NativeEvent) => {\n \"worklet\";\n broadcastKeyboardEvents(\"onEnd\", event);\n updateSharedValues(event, [\"android\", \"harmony\"]);\n },\n onKeyboardMoveInteractive: (event: NativeEvent) => {\n \"worklet\";\n\n updateSharedValues(event, [\"android\", \"ios\"]);\n broadcastKeyboardEvents(\"onInteractive\", event);\n },\n },\n [],\n );\n const inputLayoutHandler = useFocusedInputLayoutHandler(\n {\n onFocusedInputLayoutChanged: (e) => {\n \"worklet\";\n\n if (e.target !== -1) {\n layout.value = e;\n } else {\n layout.value = null;\n }\n },\n },\n [],\n );\n const inputTextHandler = useFocusedInputTextHandler(\n {\n onFocusedInputTextChanged: (e) => {\n \"worklet\";\n\n broadcastInputEvents(\"onChangeText\", e);\n },\n },\n [],\n );\n const inputSelectionHandler = useFocusedInputSelectionHandler(\n {\n onFocusedInputSelectionChanged: (e) => {\n \"worklet\";\n broadcastInputEvents(\"onSelectionChange\", e);\n },\n },\n [],\n );\n // effects\n useEffect(() => {\n if (enabled) {\n applyMonkeyPatch();\n } else {\n revertMonkeyPatch();\n }\n }, [enabled]);\n\n return (\n <KeyboardContext.Provider value={context}>\n <KeyboardControllerViewAnimated\n enabled={enabled}\n onKeyboardMoveReanimated={keyboardHandler}\n onKeyboardMoveStart={OS === \"ios\" ? onKeyboardMove : undefined}\n onKeyboardMove={OS === \"android\" ? onKeyboardMove : undefined}\n onKeyboardMoveInteractive={onKeyboardMove}\n onKeyboardMoveEnd={ OS as string === \"harmony\"?onKeyboardMove:undefined}\n onFocusedInputLayoutChangedReanimated={inputLayoutHandler}\n onFocusedInputTextChangedReanimated={inputTextHandler}\n onFocusedInputSelectionChangedReanimated={inputSelectionHandler}\n navigationBarTranslucent={navigationBarTranslucent}\n statusBarTranslucent={statusBarTranslucent}\n preserveEdgeToEdge={preserveEdgeToEdge}\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,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAC3D,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,UAAU,QAAQ,cAAc;AAC7D,OAAOC,UAAU,IAAIC,cAAc,QAAQ,yBAAyB;AAEpE,SAASC,sBAAsB,QAAQ,YAAY;AACnD,SAASC,eAAe,QAAQ,WAAW;AAC3C,SAASC,gBAAgB,EAAEC,iBAAiB,QAAQ,YAAY;AAChE,SAASC,gBAAgB,EAAEC,iBAAiB,QAAQ,gBAAgB;AACpE,SACEC,0BAA0B,EAC1BC,4BAA4B,EAC5BC,+BAA+B,EAC/BC,0BAA0B,QACrB,cAAc;AAYrB,MAAM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,oBACElC,KAAA,CAAA0E,aAAA,CAAChE,eAAe,CAACiE,QAAQ;IAACd,KAAK,EAAEf;EAAQ,gBACvC9C,KAAA,CAAA0E,aAAA,CAACvD,8BAA8B;IAC7Be,OAAO,EAAEA,OAAQ;IACjB0C,wBAAwB,EAAEd,eAAgB;IAC1CC,mBAAmB,EAAEnC,EAAE,KAAK,KAAK,GAAG0B,cAAc,GAAGuB,SAAU;IAC/DvB,cAAc,EAAE1B,EAAE,KAAK,SAAS,GAAG0B,cAAc,GAAGuB,SAAU;IAC9DZ,yBAAyB,EAAEX,cAAe;IAC1CU,iBAAiB,EAAGpC,EAAE,KAAe,SAAS,GAAC0B,cAAc,GAACuB,SAAU;IACxEC,qCAAqC,EAAEZ,kBAAmB;IAC1Da,mCAAmC,EAAET,gBAAiB;IACtDU,wCAAwC,EAAER,qBAAsB;IAChExC,wBAAwB,EAAEA,wBAAyB;IACnDD,oBAAoB,EAAEA,oBAAqB;IAC3CE,kBAAkB,EAAEA,kBAAmB;IACvCiB,KAAK,EAAE7B,MAAM,CAACE;EAAU,GAEvBO,QAC6B,CAAC,eACjC9B,KAAA,CAAA0E,aAAA,CAACtE,QAAQ,CAAC6E,IAAI;IACZ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA/B,KAAK,EAAEA;EAAM,CACd,CACuB,CAAC;AAE/B,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","useCallback","useEffect","useMemo","useRef","useState","Animated","Platform","StyleSheet","Reanimated","useSharedValue","FocusedInputEvents","KeyboardControllerView","KeyboardControllerViewCommands","KeyboardContext","useAnimatedValue","useSharedHandlers","KeyboardController","useAnimatedKeyboardHandler","useFocusedInputLayoutHandler","useFocusedInputSelectionHandler","useFocusedInputTextHandler","KeyboardControllerViewAnimated","createAnimatedComponent","styles","create","container","flex","hidden","display","position","OS","KeyboardProvider","children","statusBarTranslucent","navigationBarTranslucent","preserveEdgeToEdge","enabled","initiallyEnabled","preload","viewRef","setEnabled","progress","height","progressSV","heightSV","layout","setKeyboardHandlers","broadcastKeyboardEvents","setInputHandlers","broadcastInputEvents","update","synchronizeFocusedInputLayout","current","Promise","resolve","subscription","addListener","remove","context","animated","multiply","reanimated","style","transform","translateX","translateY","onKeyboardMove","event","nativeEvent","useNativeDriver","updateSharedValues","platforms","includes","value","keyboardHandler","onKeyboardMoveStart","onKeyboardMoveEnd","onKeyboardMoveInteractive","inputLayoutHandler","onFocusedInputLayoutChanged","e","target","inputTextHandler","onFocusedInputTextChanged","inputSelectionHandler","onFocusedInputSelectionChanged","createElement","Provider","ref","onKeyboardMoveReanimated","undefined","onFocusedInputLayoutChangedReanimated","onFocusedInputTextChangedReanimated","onFocusedInputSelectionChangedReanimated","View"],"sources":["animated.tsx"],"sourcesContent":["import React, {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { Animated, Platform, StyleSheet } from \"react-native\";\nimport Reanimated, { useSharedValue } from \"react-native-reanimated\";\n\nimport {\n FocusedInputEvents,\n KeyboardControllerView,\n KeyboardControllerViewCommands,\n} from \"./bindings\";\nimport { KeyboardContext } from \"./context\";\nimport { useAnimatedValue, useSharedHandlers } from \"./internal\";\nimport { KeyboardController } from \"./module\";\nimport {\n useAnimatedKeyboardHandler,\n useFocusedInputLayoutHandler,\n useFocusedInputSelectionHandler,\n useFocusedInputTextHandler,\n} from \"./reanimated\";\n\nimport type { KeyboardAnimationContext } from \"./context\";\nimport type {\n FocusedInputHandler,\n FocusedInputLayoutChangedEvent,\n KeyboardControllerProps,\n KeyboardHandler,\n KeyboardProviderProps,\n NativeEvent,\n} from \"./types\";\nimport type { ViewStyle } from \"react-native\";\n\nconst KeyboardControllerViewAnimated = Reanimated.createAnimatedComponent(\n Animated.createAnimatedComponent(\n KeyboardControllerView,\n ) as React.FC<KeyboardControllerProps>,\n) as React.ComponentType<\n KeyboardControllerProps &\n React.RefAttributes<React.Component<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\n// capture `Platform.OS` in separate variable to avoid deep workletization of entire RN package\n// see https://github.com/kirillzyusko/react-native-keyboard-controller/issues/393 and https://github.com/kirillzyusko/react-native-keyboard-controller/issues/294 for more details\nconst OS = Platform.OS;\n\nexport const KeyboardProvider = ({\n children,\n statusBarTranslucent,\n navigationBarTranslucent,\n preserveEdgeToEdge,\n enabled: initiallyEnabled = true,\n preload = true,\n}: KeyboardProviderProps) => {\n const viewRef = useRef<React.Component<KeyboardControllerProps>>(null);\n // state\n const [enabled, setEnabled] = useState(initiallyEnabled);\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 layout = useSharedValue<FocusedInputLayoutChangedEvent | null>(null);\n const [setKeyboardHandlers, broadcastKeyboardEvents] =\n useSharedHandlers<KeyboardHandler>();\n const [setInputHandlers, broadcastInputEvents] =\n useSharedHandlers<FocusedInputHandler>();\n const update = useCallback(async () => {\n KeyboardControllerViewCommands.synchronizeFocusedInputLayout(\n viewRef.current,\n );\n\n await new Promise((resolve) => {\n const subscription = FocusedInputEvents.addListener(\n \"layoutDidSynchronize\",\n () => {\n subscription.remove();\n resolve(null);\n },\n );\n });\n }, []);\n // memo\n const context = useMemo<KeyboardAnimationContext>(\n () => ({\n enabled,\n animated: { progress: progress, height: Animated.multiply(height,-1) },\n reanimated: { progress: progressSV, height: heightSV },\n layout,\n update,\n setKeyboardHandlers,\n setInputHandlers,\n setEnabled,\n }),\n [enabled, update],\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:Platform.OS as string=='harmony'?false:true },\n ),\n [],\n );\n // handlers\n const updateSharedValues = (event: NativeEvent, platforms: string[]) => {\n \"worklet\";\n\n if (platforms.includes(OS)) {\n // eslint-disable-next-line react-compiler/react-compiler\n progressSV.value = event.progress;\n heightSV.value = -event.height;\n }\n };\n const keyboardHandler = useAnimatedKeyboardHandler(\n {\n onKeyboardMoveStart: (event: NativeEvent) => {\n \"worklet\";\n\n broadcastKeyboardEvents(\"onStart\", event);\n updateSharedValues(event, [\"ios\"]);\n },\n onKeyboardMove: (event: NativeEvent) => {\n \"worklet\";\n\n broadcastKeyboardEvents(\"onMove\", event);\n updateSharedValues(event, [\"android\", \"harmony\"]);\n },\n onKeyboardMoveEnd: (event: NativeEvent) => {\n \"worklet\";\n broadcastKeyboardEvents(\"onEnd\", event);\n updateSharedValues(event, [\"android\", \"harmony\"]);\n },\n onKeyboardMoveInteractive: (event: NativeEvent) => {\n \"worklet\";\n\n updateSharedValues(event, [\"android\", \"ios\"]);\n broadcastKeyboardEvents(\"onInteractive\", event);\n },\n },\n [],\n );\n const inputLayoutHandler = useFocusedInputLayoutHandler(\n {\n onFocusedInputLayoutChanged: (e) => {\n \"worklet\";\n\n if (e.target !== -1) {\n layout.value = e;\n } else {\n layout.value = null;\n }\n },\n },\n [],\n );\n const inputTextHandler = useFocusedInputTextHandler(\n {\n onFocusedInputTextChanged: (e) => {\n \"worklet\";\n\n broadcastInputEvents(\"onChangeText\", e);\n },\n },\n [],\n );\n const inputSelectionHandler = useFocusedInputSelectionHandler(\n {\n onFocusedInputSelectionChanged: (e) => {\n \"worklet\";\n broadcastInputEvents(\"onSelectionChange\", e);\n },\n },\n [],\n );\n useEffect(() => {\n if (preload) {\n KeyboardController.preload();\n }\n }, [preload]);\n\n return (\n <KeyboardContext.Provider value={context}>\n <KeyboardControllerViewAnimated\n ref={viewRef}\n enabled={enabled}\n onKeyboardMoveReanimated={keyboardHandler}\n onKeyboardMoveStart={OS === \"ios\" ? onKeyboardMove : undefined}\n onKeyboardMove={OS === \"android\" ? onKeyboardMove : undefined}\n onKeyboardMoveInteractive={onKeyboardMove}\n onKeyboardMoveEnd={ OS as string === \"harmony\"?onKeyboardMove:undefined}\n onFocusedInputLayoutChangedReanimated={inputLayoutHandler}\n onFocusedInputTextChangedReanimated={inputTextHandler}\n onFocusedInputSelectionChangedReanimated={inputSelectionHandler}\n navigationBarTranslucent={navigationBarTranslucent}\n statusBarTranslucent={statusBarTranslucent}\n preserveEdgeToEdge={preserveEdgeToEdge}\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,IACVC,WAAW,EACXC,SAAS,EACTC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACH,OAAO;AACd,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,UAAU,QAAQ,cAAc;AAC7D,OAAOC,UAAU,IAAIC,cAAc,QAAQ,yBAAyB;AAEpE,SACEC,kBAAkB,EAClBC,sBAAsB,EACtBC,8BAA8B,QACzB,YAAY;AACnB,SAASC,eAAe,QAAQ,WAAW;AAC3C,SAASC,gBAAgB,EAAEC,iBAAiB,QAAQ,YAAY;AAChE,SAASC,kBAAkB,QAAQ,UAAU;AAC7C,SACEC,0BAA0B,EAC1BC,4BAA4B,EAC5BC,+BAA+B,EAC/BC,0BAA0B,QACrB,cAAc;AAarB,MAAMC,8BAA8B,GAAGb,UAAU,CAACc,uBAAuB,CACvEjB,QAAQ,CAACiB,uBAAuB,CAC9BX,sBACF,CACF,CAGC;AAOD,MAAMY,MAAM,GAAGhB,UAAU,CAACiB,MAAM,CAAS;EACvCC,SAAS,EAAE;IACTC,IAAI,EAAE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@ -0,0 +1 @@
1
+ {"version":3,"names":["IS_FABRIC","global"],"sources":["architecture.ts"],"sourcesContent":["export const IS_FABRIC = \"nativeFabricUIManager\" in global;\n"],"mappings":"AAAA,OAAO,MAAMA,SAAS,GAAG,uBAAuB,IAAIC,MAAM","ignoreList":[]}