one 2.19.0 → 2.20.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (936) hide show
  1. package/One.podspec +2 -2
  2. package/android/build.gradle +2 -0
  3. package/android/portal/CMakeLists.txt +4 -1
  4. package/android/portal/react/renderer/components/OneNativeSpec/ComponentDescriptors.h +1 -0
  5. package/android/src/main/java/com/margelo/nitro/one/HybridOneKeyboard.kt +110 -0
  6. package/android/src/main/java/dev/onejs/keyboard/ClippingScrollViewDecoratorViewManager.kt +44 -0
  7. package/android/src/main/java/dev/onejs/keyboard/KeyboardBackgroundViewManager.kt +19 -0
  8. package/android/src/main/java/dev/onejs/keyboard/KeyboardControllerViewManager.kt +85 -0
  9. package/android/src/main/java/dev/onejs/keyboard/KeyboardGestureAreaViewManager.kt +65 -0
  10. package/android/src/main/java/dev/onejs/keyboard/KeyboardToolbarGroupViewManager.kt +19 -0
  11. package/android/src/main/java/dev/onejs/keyboard/LICENSE +21 -0
  12. package/android/src/main/java/dev/onejs/keyboard/OneKeyboardBridge.kt +9 -0
  13. package/android/src/main/java/dev/onejs/keyboard/OverKeyboardViewManager.kt +49 -0
  14. package/android/src/main/java/dev/onejs/keyboard/constants/Keyboard.kt +7 -0
  15. package/android/src/main/java/dev/onejs/keyboard/constants/UIThread.kt +9 -0
  16. package/android/src/main/java/dev/onejs/keyboard/events/FocusedInputLayoutChangedEvent.kt +52 -0
  17. package/android/src/main/java/dev/onejs/keyboard/events/FocusedInputSelectionChangedEvent.kt +56 -0
  18. package/android/src/main/java/dev/onejs/keyboard/events/FocusedInputTextChangedEvent.kt +25 -0
  19. package/android/src/main/java/dev/onejs/keyboard/events/KeyboardTransitionEvent.kt +44 -0
  20. package/android/src/main/java/dev/onejs/keyboard/extensions/Context.kt +58 -0
  21. package/android/src/main/java/dev/onejs/keyboard/extensions/EditText.kt +262 -0
  22. package/android/src/main/java/dev/onejs/keyboard/extensions/Float.kt +8 -0
  23. package/android/src/main/java/dev/onejs/keyboard/extensions/ReactContext.kt +37 -0
  24. package/android/src/main/java/dev/onejs/keyboard/extensions/ScrollView.kt +65 -0
  25. package/android/src/main/java/dev/onejs/keyboard/extensions/SoftInputMode.kt +13 -0
  26. package/android/src/main/java/dev/onejs/keyboard/extensions/ThemedReactContext.kt +56 -0
  27. package/android/src/main/java/dev/onejs/keyboard/extensions/View.kt +91 -0
  28. package/android/src/main/java/dev/onejs/keyboard/extensions/ViewGroup.kt +10 -0
  29. package/android/src/main/java/dev/onejs/keyboard/extensions/WindowInsetsAnimationCompat.kt +7 -0
  30. package/android/src/main/java/dev/onejs/keyboard/interactive/InteractiveKeyboardProvider.kt +5 -0
  31. package/android/src/main/java/dev/onejs/keyboard/interactive/KeyboardAnimationController.kt +407 -0
  32. package/android/src/main/java/dev/onejs/keyboard/interactive/interpolators/Interpolator.kt +20 -0
  33. package/android/src/main/java/dev/onejs/keyboard/interactive/interpolators/IosInterpolator.kt +21 -0
  34. package/android/src/main/java/dev/onejs/keyboard/interactive/interpolators/LinearInterpolator.kt +10 -0
  35. package/android/src/main/java/dev/onejs/keyboard/listeners/FocusedInputObserver.kt +200 -0
  36. package/android/src/main/java/dev/onejs/keyboard/listeners/KeyboardAnimationCallback.kt +505 -0
  37. package/android/src/main/java/dev/onejs/keyboard/listeners/WindowDimensionListener.kt +76 -0
  38. package/android/src/main/java/dev/onejs/keyboard/log/Logger.kt +28 -0
  39. package/android/src/main/java/dev/onejs/keyboard/managers/ClippingScrollViewDecoratorViewManagerImpl.kt +13 -0
  40. package/android/src/main/java/dev/onejs/keyboard/managers/KeyboardBackgroundViewManagerImpl.kt +13 -0
  41. package/android/src/main/java/dev/onejs/keyboard/managers/KeyboardControllerViewManagerImpl.kt +96 -0
  42. package/android/src/main/java/dev/onejs/keyboard/managers/KeyboardGestureAreaViewManagerImpl.kt +41 -0
  43. package/android/src/main/java/dev/onejs/keyboard/managers/KeyboardToolbarGroupViewManagerImpl.kt +13 -0
  44. package/android/src/main/java/dev/onejs/keyboard/managers/OverKeyboardViewManagerImpl.kt +23 -0
  45. package/android/src/main/java/dev/onejs/keyboard/modal/ModalAttachedWatcher.kt +116 -0
  46. package/android/src/main/java/dev/onejs/keyboard/modules/KeyboardControllerModuleImpl.kt +139 -0
  47. package/android/src/main/java/dev/onejs/keyboard/traversal/FocusedInputHolder.kt +19 -0
  48. package/android/src/main/java/dev/onejs/keyboard/traversal/ViewHierarchyNavigator.kt +130 -0
  49. package/android/src/main/java/dev/onejs/keyboard/views/ClippingScrollViewDecoratorView.kt +241 -0
  50. package/android/src/main/java/dev/onejs/keyboard/views/EdgeToEdgeReactViewGroup.kt +225 -0
  51. package/android/src/main/java/dev/onejs/keyboard/views/KeyboardGestureAreaReactViewGroup.kt +247 -0
  52. package/android/src/main/java/dev/onejs/keyboard/views/KeyboardToolbarGroupReactViewGroup.kt +13 -0
  53. package/android/src/main/java/dev/onejs/keyboard/views/background/KeyboardBackgroundViewGroup.kt +34 -0
  54. package/android/src/main/java/dev/onejs/keyboard/views/background/Skins.kt +91 -0
  55. package/android/src/main/java/dev/onejs/keyboard/views/overlay/JSPointerDispatcherCompat.kt +74 -0
  56. package/android/src/main/java/dev/onejs/keyboard/views/overlay/OverKeyboardHostShadowNode.kt +33 -0
  57. package/android/src/main/java/dev/onejs/keyboard/views/overlay/OverKeyboardViewGroup.kt +249 -0
  58. package/android/src/main/java/dev/onejs/keyboard/views/overlay/RootViewCompat.kt +18 -0
  59. package/android/src/main/java/dev/onejs/one/OnePackage.kt +12 -0
  60. package/android/src/main/res/values/one_keyboard_attrs.xml +7 -0
  61. package/android/src/main/res/values/one_keyboard_skins.xml +35 -0
  62. package/android/src/main/res/values-v29/one_keyboard_skins.xml +5 -0
  63. package/android/src/main/res/values-v30/one_keyboard_skins.xml +17 -0
  64. package/android/src/main/res/values-v33/one_keyboard_skins.xml +14 -0
  65. package/android/src/main/res/values-v34/one_keyboard_skins.xml +18 -0
  66. package/android/src/main/res/values-v35/one_keyboard_skins.xml +10 -0
  67. package/cpp/OneOverKeyboardViewComponentDescriptor.h +31 -0
  68. package/cpp/OneOverKeyboardViewShadowNode.cpp +7 -0
  69. package/cpp/OneOverKeyboardViewShadowNode.h +23 -0
  70. package/cpp/OneOverKeyboardViewState.cpp +12 -0
  71. package/cpp/OneOverKeyboardViewState.h +43 -0
  72. package/dist/cjs/keyboard/animated.cjs +154 -0
  73. package/dist/cjs/keyboard/animated.native.cjs +168 -0
  74. package/dist/cjs/keyboard/animated.native.js +170 -0
  75. package/dist/cjs/keyboard/animated.native.js.map +1 -0
  76. package/dist/cjs/keyboard/architecture.cjs +25 -0
  77. package/dist/cjs/keyboard/architecture.native.cjs +27 -0
  78. package/dist/cjs/keyboard/architecture.native.js +29 -0
  79. package/dist/cjs/keyboard/architecture.native.js.map +1 -0
  80. package/dist/cjs/keyboard/bindings.cjs +65 -0
  81. package/dist/cjs/keyboard/bindings.native.cjs +147 -0
  82. package/dist/cjs/keyboard/bindings.native.js +149 -0
  83. package/dist/cjs/keyboard/bindings.native.js.map +1 -0
  84. package/dist/cjs/keyboard/compat.cjs +63 -0
  85. package/dist/cjs/keyboard/compat.native.cjs +65 -0
  86. package/dist/cjs/keyboard/compat.native.js +67 -0
  87. package/dist/cjs/keyboard/compat.native.js.map +1 -0
  88. package/dist/cjs/keyboard/components/KeyboardAvoidingView/hooks.cjs +144 -0
  89. package/dist/cjs/keyboard/components/KeyboardAvoidingView/hooks.native.cjs +146 -0
  90. package/dist/cjs/keyboard/components/KeyboardAvoidingView/hooks.native.js +148 -0
  91. package/dist/cjs/keyboard/components/KeyboardAvoidingView/hooks.native.js.map +1 -0
  92. package/dist/cjs/keyboard/components/KeyboardAvoidingView/index.cjs +156 -0
  93. package/dist/cjs/keyboard/components/KeyboardAvoidingView/index.native.cjs +173 -0
  94. package/dist/cjs/keyboard/components/KeyboardAvoidingView/index.native.js +175 -0
  95. package/dist/cjs/keyboard/components/KeyboardAvoidingView/index.native.js.map +1 -0
  96. package/dist/cjs/keyboard/components/KeyboardAwareScrollView/index.cjs +326 -0
  97. package/dist/cjs/keyboard/components/KeyboardAwareScrollView/index.native.cjs +344 -0
  98. package/dist/cjs/keyboard/components/KeyboardAwareScrollView/index.native.js +346 -0
  99. package/dist/cjs/keyboard/components/KeyboardAwareScrollView/index.native.js.map +1 -0
  100. package/dist/cjs/keyboard/components/KeyboardAwareScrollView/types.cjs +17 -0
  101. package/dist/cjs/keyboard/components/KeyboardAwareScrollView/types.native.cjs +19 -0
  102. package/dist/cjs/keyboard/components/KeyboardAwareScrollView/types.native.js +21 -0
  103. package/dist/cjs/keyboard/components/KeyboardAwareScrollView/types.native.js.map +1 -0
  104. package/dist/cjs/keyboard/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.cjs +100 -0
  105. package/dist/cjs/keyboard/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.native.cjs +110 -0
  106. package/dist/cjs/keyboard/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.native.js +112 -0
  107. package/dist/cjs/keyboard/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.native.js.map +1 -0
  108. package/dist/cjs/keyboard/components/KeyboardAwareScrollView/utils.cjs +50 -0
  109. package/dist/cjs/keyboard/components/KeyboardAwareScrollView/utils.native.cjs +58 -0
  110. package/dist/cjs/keyboard/components/KeyboardAwareScrollView/utils.native.js +60 -0
  111. package/dist/cjs/keyboard/components/KeyboardAwareScrollView/utils.native.js.map +1 -0
  112. package/dist/cjs/keyboard/components/KeyboardChatScrollView/hooks.cjs +25 -0
  113. package/dist/cjs/keyboard/components/KeyboardChatScrollView/hooks.native.cjs +27 -0
  114. package/dist/cjs/keyboard/components/KeyboardChatScrollView/hooks.native.js +29 -0
  115. package/dist/cjs/keyboard/components/KeyboardChatScrollView/hooks.native.js.map +1 -0
  116. package/dist/cjs/keyboard/components/KeyboardChatScrollView/index.cjs +118 -0
  117. package/dist/cjs/keyboard/components/KeyboardChatScrollView/index.native.cjs +133 -0
  118. package/dist/cjs/keyboard/components/KeyboardChatScrollView/index.native.js +135 -0
  119. package/dist/cjs/keyboard/components/KeyboardChatScrollView/index.native.js.map +1 -0
  120. package/dist/cjs/keyboard/components/KeyboardChatScrollView/types.cjs +17 -0
  121. package/dist/cjs/keyboard/components/KeyboardChatScrollView/types.native.cjs +19 -0
  122. package/dist/cjs/keyboard/components/KeyboardChatScrollView/types.native.js +21 -0
  123. package/dist/cjs/keyboard/components/KeyboardChatScrollView/types.native.js.map +1 -0
  124. package/dist/cjs/keyboard/components/KeyboardChatScrollView/useChatKeyboard/helpers.cjs +93 -0
  125. package/dist/cjs/keyboard/components/KeyboardChatScrollView/useChatKeyboard/helpers.native.cjs +97 -0
  126. package/dist/cjs/keyboard/components/KeyboardChatScrollView/useChatKeyboard/helpers.native.js +99 -0
  127. package/dist/cjs/keyboard/components/KeyboardChatScrollView/useChatKeyboard/helpers.native.js.map +1 -0
  128. package/dist/cjs/keyboard/components/KeyboardChatScrollView/useChatKeyboard/index.cjs +210 -0
  129. package/dist/cjs/keyboard/components/KeyboardChatScrollView/useChatKeyboard/index.ios.cjs +145 -0
  130. package/dist/cjs/keyboard/components/KeyboardChatScrollView/useChatKeyboard/index.ios.js +147 -0
  131. package/dist/cjs/keyboard/components/KeyboardChatScrollView/useChatKeyboard/index.ios.js.map +1 -0
  132. package/dist/cjs/keyboard/components/KeyboardChatScrollView/useChatKeyboard/index.native.cjs +212 -0
  133. package/dist/cjs/keyboard/components/KeyboardChatScrollView/useChatKeyboard/index.native.js +214 -0
  134. package/dist/cjs/keyboard/components/KeyboardChatScrollView/useChatKeyboard/index.native.js.map +1 -0
  135. package/dist/cjs/keyboard/components/KeyboardChatScrollView/useChatKeyboard/types.cjs +17 -0
  136. package/dist/cjs/keyboard/components/KeyboardChatScrollView/useChatKeyboard/types.native.cjs +19 -0
  137. package/dist/cjs/keyboard/components/KeyboardChatScrollView/useChatKeyboard/types.native.js +21 -0
  138. package/dist/cjs/keyboard/components/KeyboardChatScrollView/useChatKeyboard/types.native.js.map +1 -0
  139. package/dist/cjs/keyboard/components/KeyboardChatScrollView/useEndVisible.cjs +52 -0
  140. package/dist/cjs/keyboard/components/KeyboardChatScrollView/useEndVisible.native.cjs +61 -0
  141. package/dist/cjs/keyboard/components/KeyboardChatScrollView/useEndVisible.native.js +63 -0
  142. package/dist/cjs/keyboard/components/KeyboardChatScrollView/useEndVisible.native.js.map +1 -0
  143. package/dist/cjs/keyboard/components/KeyboardChatScrollView/useExtraContentPadding/index.cjs +92 -0
  144. package/dist/cjs/keyboard/components/KeyboardChatScrollView/useExtraContentPadding/index.native.cjs +96 -0
  145. package/dist/cjs/keyboard/components/KeyboardChatScrollView/useExtraContentPadding/index.native.js +98 -0
  146. package/dist/cjs/keyboard/components/KeyboardChatScrollView/useExtraContentPadding/index.native.js.map +1 -0
  147. package/dist/cjs/keyboard/components/KeyboardChatScrollView/useFrozenPadding/index.cjs +53 -0
  148. package/dist/cjs/keyboard/components/KeyboardChatScrollView/useFrozenPadding/index.native.cjs +58 -0
  149. package/dist/cjs/keyboard/components/KeyboardChatScrollView/useFrozenPadding/index.native.js +60 -0
  150. package/dist/cjs/keyboard/components/KeyboardChatScrollView/useFrozenPadding/index.native.js.map +1 -0
  151. package/dist/cjs/keyboard/components/KeyboardEffects/index.cjs +94 -0
  152. package/dist/cjs/keyboard/components/KeyboardEffects/index.native.cjs +99 -0
  153. package/dist/cjs/keyboard/components/KeyboardEffects/index.native.js +101 -0
  154. package/dist/cjs/keyboard/components/KeyboardEffects/index.native.js.map +1 -0
  155. package/dist/cjs/keyboard/components/KeyboardStickyView/index.cjs +54 -0
  156. package/dist/cjs/keyboard/components/KeyboardStickyView/index.native.cjs +59 -0
  157. package/dist/cjs/keyboard/components/KeyboardStickyView/index.native.js +61 -0
  158. package/dist/cjs/keyboard/components/KeyboardStickyView/index.native.js.map +1 -0
  159. package/dist/cjs/keyboard/components/KeyboardToolbar/Arrow.cjs +82 -0
  160. package/dist/cjs/keyboard/components/KeyboardToolbar/Arrow.native.cjs +99 -0
  161. package/dist/cjs/keyboard/components/KeyboardToolbar/Arrow.native.js +101 -0
  162. package/dist/cjs/keyboard/components/KeyboardToolbar/Arrow.native.js.map +1 -0
  163. package/dist/cjs/keyboard/components/KeyboardToolbar/Button.cjs +71 -0
  164. package/dist/cjs/keyboard/components/KeyboardToolbar/Button.native.cjs +89 -0
  165. package/dist/cjs/keyboard/components/KeyboardToolbar/Button.native.js +91 -0
  166. package/dist/cjs/keyboard/components/KeyboardToolbar/Button.native.js.map +1 -0
  167. package/dist/cjs/keyboard/components/KeyboardToolbar/colors.cjs +38 -0
  168. package/dist/cjs/keyboard/components/KeyboardToolbar/colors.native.cjs +59 -0
  169. package/dist/cjs/keyboard/components/KeyboardToolbar/colors.native.js +61 -0
  170. package/dist/cjs/keyboard/components/KeyboardToolbar/colors.native.js.map +1 -0
  171. package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Background.cjs +27 -0
  172. package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Background.native.cjs +39 -0
  173. package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Background.native.js +41 -0
  174. package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Background.native.js.map +1 -0
  175. package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Content.cjs +36 -0
  176. package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Content.native.cjs +46 -0
  177. package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Content.native.js +48 -0
  178. package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Content.native.js.map +1 -0
  179. package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Done.cjs +75 -0
  180. package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Done.native.cjs +84 -0
  181. package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Done.native.js +86 -0
  182. package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Done.native.js.map +1 -0
  183. package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Next.cjs +64 -0
  184. package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Next.native.cjs +67 -0
  185. package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Next.native.js +69 -0
  186. package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Next.native.js.map +1 -0
  187. package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Prev.cjs +64 -0
  188. package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Prev.native.cjs +68 -0
  189. package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Prev.native.js +70 -0
  190. package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Prev.native.js.map +1 -0
  191. package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/index.cjs +41 -0
  192. package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/index.native.cjs +43 -0
  193. package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/index.native.js +45 -0
  194. package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/index.native.js.map +1 -0
  195. package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/types.cjs +17 -0
  196. package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/types.native.cjs +19 -0
  197. package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/types.native.js +21 -0
  198. package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/types.native.js.map +1 -0
  199. package/dist/cjs/keyboard/components/KeyboardToolbar/compound/context.cjs +36 -0
  200. package/dist/cjs/keyboard/components/KeyboardToolbar/compound/context.native.cjs +38 -0
  201. package/dist/cjs/keyboard/components/KeyboardToolbar/compound/context.native.js +40 -0
  202. package/dist/cjs/keyboard/components/KeyboardToolbar/compound/context.native.js.map +1 -0
  203. package/dist/cjs/keyboard/components/KeyboardToolbar/constants.cjs +42 -0
  204. package/dist/cjs/keyboard/components/KeyboardToolbar/constants.native.cjs +44 -0
  205. package/dist/cjs/keyboard/components/KeyboardToolbar/constants.native.js +46 -0
  206. package/dist/cjs/keyboard/components/KeyboardToolbar/constants.native.js.map +1 -0
  207. package/dist/cjs/keyboard/components/KeyboardToolbar/index.cjs +202 -0
  208. package/dist/cjs/keyboard/components/KeyboardToolbar/index.native.cjs +215 -0
  209. package/dist/cjs/keyboard/components/KeyboardToolbar/index.native.js +217 -0
  210. package/dist/cjs/keyboard/components/KeyboardToolbar/index.native.js.map +1 -0
  211. package/dist/cjs/keyboard/components/KeyboardToolbar/types.cjs +17 -0
  212. package/dist/cjs/keyboard/components/KeyboardToolbar/types.native.cjs +19 -0
  213. package/dist/cjs/keyboard/components/KeyboardToolbar/types.native.js +21 -0
  214. package/dist/cjs/keyboard/components/KeyboardToolbar/types.native.js.map +1 -0
  215. package/dist/cjs/keyboard/components/ScrollViewWithBottomPadding/index.cjs +127 -0
  216. package/dist/cjs/keyboard/components/ScrollViewWithBottomPadding/index.native.cjs +134 -0
  217. package/dist/cjs/keyboard/components/ScrollViewWithBottomPadding/index.native.js +136 -0
  218. package/dist/cjs/keyboard/components/ScrollViewWithBottomPadding/index.native.js.map +1 -0
  219. package/dist/cjs/keyboard/components/ScrollViewWithBottomPadding/styles.cjs +30 -0
  220. package/dist/cjs/keyboard/components/ScrollViewWithBottomPadding/styles.native.cjs +32 -0
  221. package/dist/cjs/keyboard/components/ScrollViewWithBottomPadding/styles.native.js +34 -0
  222. package/dist/cjs/keyboard/components/ScrollViewWithBottomPadding/styles.native.js.map +1 -0
  223. package/dist/cjs/keyboard/components/hooks/useCombinedRef.cjs +40 -0
  224. package/dist/cjs/keyboard/components/hooks/useCombinedRef.native.cjs +62 -0
  225. package/dist/cjs/keyboard/components/hooks/useCombinedRef.native.js +64 -0
  226. package/dist/cjs/keyboard/components/hooks/useCombinedRef.native.js.map +1 -0
  227. package/dist/cjs/keyboard/components/hooks/useScrollState.cjs +78 -0
  228. package/dist/cjs/keyboard/components/hooks/useScrollState.native.cjs +81 -0
  229. package/dist/cjs/keyboard/components/hooks/useScrollState.native.js +83 -0
  230. package/dist/cjs/keyboard/components/hooks/useScrollState.native.js.map +1 -0
  231. package/dist/cjs/keyboard/components/index.cjs +44 -0
  232. package/dist/cjs/keyboard/components/index.native.cjs +46 -0
  233. package/dist/cjs/keyboard/components/index.native.js +48 -0
  234. package/dist/cjs/keyboard/components/index.native.js.map +1 -0
  235. package/dist/cjs/keyboard/components/utils/safeScrollTo.cjs +33 -0
  236. package/dist/cjs/keyboard/components/utils/safeScrollTo.native.cjs +35 -0
  237. package/dist/cjs/keyboard/components/utils/safeScrollTo.native.js +37 -0
  238. package/dist/cjs/keyboard/components/utils/safeScrollTo.native.js.map +1 -0
  239. package/dist/cjs/keyboard/constants.cjs +48 -0
  240. package/dist/cjs/keyboard/constants.native.cjs +50 -0
  241. package/dist/cjs/keyboard/constants.native.js +52 -0
  242. package/dist/cjs/keyboard/constants.native.js.map +1 -0
  243. package/dist/cjs/keyboard/context.cjs +65 -0
  244. package/dist/cjs/keyboard/context.native.cjs +73 -0
  245. package/dist/cjs/keyboard/context.native.js +75 -0
  246. package/dist/cjs/keyboard/context.native.js.map +1 -0
  247. package/dist/cjs/keyboard/hooks/index.cjs +121 -0
  248. package/dist/cjs/keyboard/hooks/index.native.cjs +135 -0
  249. package/dist/cjs/keyboard/hooks/index.native.js +137 -0
  250. package/dist/cjs/keyboard/hooks/index.native.js.map +1 -0
  251. package/dist/cjs/keyboard/hooks/useKeyboardState/index.cjs +44 -0
  252. package/dist/cjs/keyboard/hooks/useKeyboardState/index.native.cjs +59 -0
  253. package/dist/cjs/keyboard/hooks/useKeyboardState/index.native.js +61 -0
  254. package/dist/cjs/keyboard/hooks/useKeyboardState/index.native.js.map +1 -0
  255. package/dist/cjs/keyboard/hooks/useWindowDimensions/index.cjs +48 -0
  256. package/dist/cjs/keyboard/hooks/useWindowDimensions/index.native.cjs +50 -0
  257. package/dist/cjs/keyboard/hooks/useWindowDimensions/index.native.js +52 -0
  258. package/dist/cjs/keyboard/hooks/useWindowDimensions/index.native.js.map +1 -0
  259. package/dist/cjs/keyboard/index.cjs +45 -0
  260. package/dist/cjs/keyboard/index.native.cjs +47 -0
  261. package/dist/cjs/keyboard/index.native.js +49 -0
  262. package/dist/cjs/keyboard/index.native.js.map +1 -0
  263. package/dist/cjs/keyboard/internal.cjs +77 -0
  264. package/dist/cjs/keyboard/internal.native.cjs +79 -0
  265. package/dist/cjs/keyboard/internal.native.js +81 -0
  266. package/dist/cjs/keyboard/internal.native.js.map +1 -0
  267. package/dist/cjs/keyboard/module.cjs +72 -0
  268. package/dist/cjs/keyboard/module.native.cjs +79 -0
  269. package/dist/cjs/keyboard/module.native.js +81 -0
  270. package/dist/cjs/keyboard/module.native.js.map +1 -0
  271. package/dist/cjs/keyboard/reanimated.cjs +36 -0
  272. package/dist/cjs/keyboard/reanimated.native.cjs +84 -0
  273. package/dist/cjs/keyboard/reanimated.native.js +86 -0
  274. package/dist/cjs/keyboard/reanimated.native.js.map +1 -0
  275. package/dist/cjs/keyboard/typings/hooks.cjs +17 -0
  276. package/dist/cjs/keyboard/typings/hooks.native.cjs +19 -0
  277. package/dist/cjs/keyboard/typings/hooks.native.js +21 -0
  278. package/dist/cjs/keyboard/typings/hooks.native.js.map +1 -0
  279. package/dist/cjs/keyboard/typings/index.cjs +23 -0
  280. package/dist/cjs/keyboard/typings/index.native.cjs +25 -0
  281. package/dist/cjs/keyboard/typings/index.native.js +27 -0
  282. package/dist/cjs/keyboard/typings/index.native.js.map +1 -0
  283. package/dist/cjs/keyboard/typings/internal.cjs +17 -0
  284. package/dist/cjs/keyboard/typings/internal.native.cjs +19 -0
  285. package/dist/cjs/keyboard/typings/internal.native.js +21 -0
  286. package/dist/cjs/keyboard/typings/internal.native.js.map +1 -0
  287. package/dist/cjs/keyboard/typings/module.cjs +17 -0
  288. package/dist/cjs/keyboard/typings/module.native.cjs +19 -0
  289. package/dist/cjs/keyboard/typings/module.native.js +21 -0
  290. package/dist/cjs/keyboard/typings/module.native.js.map +1 -0
  291. package/dist/cjs/keyboard/typings/provider.cjs +17 -0
  292. package/dist/cjs/keyboard/typings/provider.native.cjs +19 -0
  293. package/dist/cjs/keyboard/typings/provider.native.js +21 -0
  294. package/dist/cjs/keyboard/typings/provider.native.js.map +1 -0
  295. package/dist/cjs/keyboard/typings/views.cjs +17 -0
  296. package/dist/cjs/keyboard/typings/views.native.cjs +19 -0
  297. package/dist/cjs/keyboard/typings/views.native.js +21 -0
  298. package/dist/cjs/keyboard/typings/views.native.js.map +1 -0
  299. package/dist/cjs/keyboard/utils/findNodeHandle/index.cjs +25 -0
  300. package/dist/cjs/keyboard/utils/findNodeHandle/index.native.cjs +27 -0
  301. package/dist/cjs/keyboard/utils/findNodeHandle/index.native.js +29 -0
  302. package/dist/cjs/keyboard/utils/findNodeHandle/index.native.js.map +1 -0
  303. package/dist/cjs/keyboard/views/KeyboardExtender/index.cjs +48 -0
  304. package/dist/cjs/keyboard/views/KeyboardExtender/index.ios.cjs +50 -0
  305. package/dist/cjs/keyboard/views/KeyboardExtender/index.ios.js +52 -0
  306. package/dist/cjs/keyboard/views/KeyboardExtender/index.ios.js.map +1 -0
  307. package/dist/cjs/keyboard/views/KeyboardExtender/index.native.cjs +57 -0
  308. package/dist/cjs/keyboard/views/KeyboardExtender/index.native.js +59 -0
  309. package/dist/cjs/keyboard/views/KeyboardExtender/index.native.js.map +1 -0
  310. package/dist/cjs/keyboard/views/OverKeyboardView/index.cjs +60 -0
  311. package/dist/cjs/keyboard/views/OverKeyboardView/index.native.cjs +72 -0
  312. package/dist/cjs/keyboard/views/OverKeyboardView/index.native.js +74 -0
  313. package/dist/cjs/keyboard/views/OverKeyboardView/index.native.js.map +1 -0
  314. package/dist/cjs/keyboard/views/index.cjs +35 -0
  315. package/dist/cjs/keyboard/views/index.native.cjs +37 -0
  316. package/dist/cjs/keyboard/views/index.native.js +39 -0
  317. package/dist/cjs/keyboard/views/index.native.js.map +1 -0
  318. package/dist/cjs/keyboard.cjs +19 -0
  319. package/dist/cjs/keyboard.native.cjs +21 -0
  320. package/dist/cjs/keyboard.native.js +23 -0
  321. package/dist/cjs/keyboard.native.js.map +1 -0
  322. package/dist/cjs/platform/specs/OneClippingScrollViewDecoratorViewNativeComponent.cjs +34 -0
  323. package/dist/cjs/platform/specs/OneClippingScrollViewDecoratorViewNativeComponent.native.cjs +34 -0
  324. package/dist/cjs/platform/specs/OneClippingScrollViewDecoratorViewNativeComponent.native.js +35 -0
  325. package/dist/cjs/platform/specs/OneClippingScrollViewDecoratorViewNativeComponent.native.js.map +7 -0
  326. package/dist/cjs/platform/specs/OneKeyboard.nitro.cjs +17 -0
  327. package/dist/cjs/platform/specs/OneKeyboard.nitro.native.cjs +19 -0
  328. package/dist/cjs/platform/specs/OneKeyboard.nitro.native.js +21 -0
  329. package/dist/cjs/platform/specs/OneKeyboard.nitro.native.js.map +1 -0
  330. package/dist/cjs/platform/specs/OneKeyboardBackgroundViewNativeComponent.cjs +30 -0
  331. package/dist/cjs/platform/specs/OneKeyboardBackgroundViewNativeComponent.native.cjs +30 -0
  332. package/dist/cjs/platform/specs/OneKeyboardBackgroundViewNativeComponent.native.js +31 -0
  333. package/dist/cjs/platform/specs/OneKeyboardBackgroundViewNativeComponent.native.js.map +7 -0
  334. package/dist/cjs/platform/specs/OneKeyboardControllerViewNativeComponent.cjs +79 -0
  335. package/dist/cjs/platform/specs/OneKeyboardControllerViewNativeComponent.native.cjs +79 -0
  336. package/dist/cjs/platform/specs/OneKeyboardControllerViewNativeComponent.native.js +80 -0
  337. package/dist/cjs/platform/specs/OneKeyboardControllerViewNativeComponent.native.js.map +7 -0
  338. package/dist/cjs/platform/specs/OneKeyboardExtenderNativeComponent.cjs +33 -0
  339. package/dist/cjs/platform/specs/OneKeyboardExtenderNativeComponent.native.cjs +33 -0
  340. package/dist/cjs/platform/specs/OneKeyboardExtenderNativeComponent.native.js +34 -0
  341. package/dist/cjs/platform/specs/OneKeyboardExtenderNativeComponent.native.js.map +7 -0
  342. package/dist/cjs/platform/specs/OneKeyboardGestureAreaNativeComponent.cjs +36 -0
  343. package/dist/cjs/platform/specs/OneKeyboardGestureAreaNativeComponent.native.cjs +36 -0
  344. package/dist/cjs/platform/specs/OneKeyboardGestureAreaNativeComponent.native.js +37 -0
  345. package/dist/cjs/platform/specs/OneKeyboardGestureAreaNativeComponent.native.js.map +7 -0
  346. package/dist/cjs/platform/specs/OneKeyboardToolbarGroupViewNativeComponent.cjs +30 -0
  347. package/dist/cjs/platform/specs/OneKeyboardToolbarGroupViewNativeComponent.native.cjs +30 -0
  348. package/dist/cjs/platform/specs/OneKeyboardToolbarGroupViewNativeComponent.native.js +31 -0
  349. package/dist/cjs/platform/specs/OneKeyboardToolbarGroupViewNativeComponent.native.js.map +7 -0
  350. package/dist/cjs/platform/specs/OneOverKeyboardViewNativeComponent.cjs +32 -0
  351. package/dist/cjs/platform/specs/OneOverKeyboardViewNativeComponent.native.cjs +32 -0
  352. package/dist/cjs/platform/specs/OneOverKeyboardViewNativeComponent.native.js +33 -0
  353. package/dist/cjs/platform/specs/OneOverKeyboardViewNativeComponent.native.js.map +7 -0
  354. package/dist/esm/keyboard/animated.mjs +135 -0
  355. package/dist/esm/keyboard/animated.mjs.map +1 -0
  356. package/dist/esm/keyboard/animated.native.js +141 -0
  357. package/dist/esm/keyboard/animated.native.js.map +1 -0
  358. package/dist/esm/keyboard/architecture.mjs +5 -0
  359. package/dist/esm/keyboard/architecture.mjs.map +1 -0
  360. package/dist/esm/keyboard/architecture.native.js +5 -0
  361. package/dist/esm/keyboard/architecture.native.js.map +1 -0
  362. package/dist/esm/keyboard/bindings.mjs +33 -0
  363. package/dist/esm/keyboard/bindings.mjs.map +1 -0
  364. package/dist/esm/keyboard/bindings.native.js +107 -0
  365. package/dist/esm/keyboard/bindings.native.js.map +1 -0
  366. package/dist/esm/keyboard/compat.mjs +41 -0
  367. package/dist/esm/keyboard/compat.mjs.map +1 -0
  368. package/dist/esm/keyboard/compat.native.js +41 -0
  369. package/dist/esm/keyboard/compat.native.js.map +1 -0
  370. package/dist/esm/keyboard/components/KeyboardAvoidingView/hooks.mjs +122 -0
  371. package/dist/esm/keyboard/components/KeyboardAvoidingView/hooks.mjs.map +1 -0
  372. package/dist/esm/keyboard/components/KeyboardAvoidingView/hooks.native.js +122 -0
  373. package/dist/esm/keyboard/components/KeyboardAvoidingView/hooks.native.js.map +1 -0
  374. package/dist/esm/keyboard/components/KeyboardAvoidingView/index.mjs +131 -0
  375. package/dist/esm/keyboard/components/KeyboardAvoidingView/index.mjs.map +1 -0
  376. package/dist/esm/keyboard/components/KeyboardAvoidingView/index.native.js +146 -0
  377. package/dist/esm/keyboard/components/KeyboardAvoidingView/index.native.js.map +1 -0
  378. package/dist/esm/keyboard/components/KeyboardAwareScrollView/index.mjs +301 -0
  379. package/dist/esm/keyboard/components/KeyboardAwareScrollView/index.mjs.map +1 -0
  380. package/dist/esm/keyboard/components/KeyboardAwareScrollView/index.native.js +317 -0
  381. package/dist/esm/keyboard/components/KeyboardAwareScrollView/index.native.js.map +1 -0
  382. package/dist/esm/keyboard/components/KeyboardAwareScrollView/types.mjs +0 -0
  383. package/dist/esm/keyboard/components/KeyboardAwareScrollView/types.native.js +0 -0
  384. package/dist/esm/keyboard/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.mjs +81 -0
  385. package/dist/esm/keyboard/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.mjs.map +1 -0
  386. package/dist/esm/keyboard/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.native.js +89 -0
  387. package/dist/esm/keyboard/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.native.js.map +1 -0
  388. package/dist/esm/keyboard/components/KeyboardAwareScrollView/utils.mjs +27 -0
  389. package/dist/esm/keyboard/components/KeyboardAwareScrollView/utils.mjs.map +1 -0
  390. package/dist/esm/keyboard/components/KeyboardAwareScrollView/utils.native.js +33 -0
  391. package/dist/esm/keyboard/components/KeyboardAwareScrollView/utils.native.js.map +1 -0
  392. package/dist/esm/keyboard/components/KeyboardChatScrollView/hooks.mjs +3 -0
  393. package/dist/esm/keyboard/components/KeyboardChatScrollView/hooks.native.js +3 -0
  394. package/dist/esm/keyboard/components/KeyboardChatScrollView/index.mjs +92 -0
  395. package/dist/esm/keyboard/components/KeyboardChatScrollView/index.mjs.map +1 -0
  396. package/dist/esm/keyboard/components/KeyboardChatScrollView/index.native.js +105 -0
  397. package/dist/esm/keyboard/components/KeyboardChatScrollView/index.native.js.map +1 -0
  398. package/dist/esm/keyboard/components/KeyboardChatScrollView/types.mjs +0 -0
  399. package/dist/esm/keyboard/components/KeyboardChatScrollView/types.native.js +0 -0
  400. package/dist/esm/keyboard/components/KeyboardChatScrollView/useChatKeyboard/helpers.mjs +65 -0
  401. package/dist/esm/keyboard/components/KeyboardChatScrollView/useChatKeyboard/helpers.mjs.map +1 -0
  402. package/dist/esm/keyboard/components/KeyboardChatScrollView/useChatKeyboard/helpers.native.js +67 -0
  403. package/dist/esm/keyboard/components/KeyboardChatScrollView/useChatKeyboard/helpers.native.js.map +1 -0
  404. package/dist/esm/keyboard/components/KeyboardChatScrollView/useChatKeyboard/index.ios.js +118 -0
  405. package/dist/esm/keyboard/components/KeyboardChatScrollView/useChatKeyboard/index.ios.js.map +1 -0
  406. package/dist/esm/keyboard/components/KeyboardChatScrollView/useChatKeyboard/index.mjs +185 -0
  407. package/dist/esm/keyboard/components/KeyboardChatScrollView/useChatKeyboard/index.mjs.map +1 -0
  408. package/dist/esm/keyboard/components/KeyboardChatScrollView/useChatKeyboard/index.native.js +185 -0
  409. package/dist/esm/keyboard/components/KeyboardChatScrollView/useChatKeyboard/index.native.js.map +1 -0
  410. package/dist/esm/keyboard/components/KeyboardChatScrollView/useChatKeyboard/types.mjs +0 -0
  411. package/dist/esm/keyboard/components/KeyboardChatScrollView/useChatKeyboard/types.native.js +0 -0
  412. package/dist/esm/keyboard/components/KeyboardChatScrollView/useEndVisible.mjs +33 -0
  413. package/dist/esm/keyboard/components/KeyboardChatScrollView/useEndVisible.mjs.map +1 -0
  414. package/dist/esm/keyboard/components/KeyboardChatScrollView/useEndVisible.native.js +40 -0
  415. package/dist/esm/keyboard/components/KeyboardChatScrollView/useEndVisible.native.js.map +1 -0
  416. package/dist/esm/keyboard/components/KeyboardChatScrollView/useExtraContentPadding/index.mjs +73 -0
  417. package/dist/esm/keyboard/components/KeyboardChatScrollView/useExtraContentPadding/index.mjs.map +1 -0
  418. package/dist/esm/keyboard/components/KeyboardChatScrollView/useExtraContentPadding/index.native.js +75 -0
  419. package/dist/esm/keyboard/components/KeyboardChatScrollView/useExtraContentPadding/index.native.js.map +1 -0
  420. package/dist/esm/keyboard/components/KeyboardChatScrollView/useFrozenPadding/index.mjs +34 -0
  421. package/dist/esm/keyboard/components/KeyboardChatScrollView/useFrozenPadding/index.mjs.map +1 -0
  422. package/dist/esm/keyboard/components/KeyboardChatScrollView/useFrozenPadding/index.native.js +37 -0
  423. package/dist/esm/keyboard/components/KeyboardChatScrollView/useFrozenPadding/index.native.js.map +1 -0
  424. package/dist/esm/keyboard/components/KeyboardEffects/index.mjs +69 -0
  425. package/dist/esm/keyboard/components/KeyboardEffects/index.mjs.map +1 -0
  426. package/dist/esm/keyboard/components/KeyboardEffects/index.native.js +72 -0
  427. package/dist/esm/keyboard/components/KeyboardEffects/index.native.js.map +1 -0
  428. package/dist/esm/keyboard/components/KeyboardStickyView/index.mjs +29 -0
  429. package/dist/esm/keyboard/components/KeyboardStickyView/index.mjs.map +1 -0
  430. package/dist/esm/keyboard/components/KeyboardStickyView/index.native.js +32 -0
  431. package/dist/esm/keyboard/components/KeyboardStickyView/index.native.js.map +1 -0
  432. package/dist/esm/keyboard/components/KeyboardToolbar/Arrow.mjs +63 -0
  433. package/dist/esm/keyboard/components/KeyboardToolbar/Arrow.mjs.map +1 -0
  434. package/dist/esm/keyboard/components/KeyboardToolbar/Arrow.native.js +72 -0
  435. package/dist/esm/keyboard/components/KeyboardToolbar/Arrow.native.js.map +1 -0
  436. package/dist/esm/keyboard/components/KeyboardToolbar/Button.mjs +52 -0
  437. package/dist/esm/keyboard/components/KeyboardToolbar/Button.mjs.map +1 -0
  438. package/dist/esm/keyboard/components/KeyboardToolbar/Button.native.js +62 -0
  439. package/dist/esm/keyboard/components/KeyboardToolbar/Button.native.js.map +1 -0
  440. package/dist/esm/keyboard/components/KeyboardToolbar/colors.mjs +18 -0
  441. package/dist/esm/keyboard/components/KeyboardToolbar/colors.mjs.map +1 -0
  442. package/dist/esm/keyboard/components/KeyboardToolbar/colors.native.js +38 -0
  443. package/dist/esm/keyboard/components/KeyboardToolbar/colors.native.js.map +1 -0
  444. package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Background.mjs +8 -0
  445. package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Background.mjs.map +1 -0
  446. package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Background.native.js +12 -0
  447. package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Background.native.js.map +1 -0
  448. package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Content.mjs +17 -0
  449. package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Content.mjs.map +1 -0
  450. package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Content.native.js +19 -0
  451. package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Content.native.js.map +1 -0
  452. package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Done.mjs +50 -0
  453. package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Done.mjs.map +1 -0
  454. package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Done.native.js +56 -0
  455. package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Done.native.js.map +1 -0
  456. package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Next.mjs +39 -0
  457. package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Next.mjs.map +1 -0
  458. package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Next.native.js +40 -0
  459. package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Next.native.js.map +1 -0
  460. package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Prev.mjs +39 -0
  461. package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Prev.mjs.map +1 -0
  462. package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Prev.native.js +40 -0
  463. package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Prev.native.js.map +1 -0
  464. package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/index.mjs +7 -0
  465. package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/index.native.js +7 -0
  466. package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/types.mjs +0 -0
  467. package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/types.native.js +0 -0
  468. package/dist/esm/keyboard/components/KeyboardToolbar/compound/context.mjs +14 -0
  469. package/dist/esm/keyboard/components/KeyboardToolbar/compound/context.mjs.map +1 -0
  470. package/dist/esm/keyboard/components/KeyboardToolbar/compound/context.native.js +14 -0
  471. package/dist/esm/keyboard/components/KeyboardToolbar/compound/context.native.js.map +1 -0
  472. package/dist/esm/keyboard/components/KeyboardToolbar/constants.mjs +14 -0
  473. package/dist/esm/keyboard/components/KeyboardToolbar/constants.mjs.map +1 -0
  474. package/dist/esm/keyboard/components/KeyboardToolbar/constants.native.js +14 -0
  475. package/dist/esm/keyboard/components/KeyboardToolbar/constants.native.js.map +1 -0
  476. package/dist/esm/keyboard/components/KeyboardToolbar/index.mjs +174 -0
  477. package/dist/esm/keyboard/components/KeyboardToolbar/index.mjs.map +1 -0
  478. package/dist/esm/keyboard/components/KeyboardToolbar/index.native.js +185 -0
  479. package/dist/esm/keyboard/components/KeyboardToolbar/index.native.js.map +1 -0
  480. package/dist/esm/keyboard/components/KeyboardToolbar/types.mjs +0 -0
  481. package/dist/esm/keyboard/components/KeyboardToolbar/types.native.js +0 -0
  482. package/dist/esm/keyboard/components/ScrollViewWithBottomPadding/index.mjs +102 -0
  483. package/dist/esm/keyboard/components/ScrollViewWithBottomPadding/index.mjs.map +1 -0
  484. package/dist/esm/keyboard/components/ScrollViewWithBottomPadding/index.native.js +107 -0
  485. package/dist/esm/keyboard/components/ScrollViewWithBottomPadding/index.native.js.map +1 -0
  486. package/dist/esm/keyboard/components/ScrollViewWithBottomPadding/styles.mjs +11 -0
  487. package/dist/esm/keyboard/components/ScrollViewWithBottomPadding/styles.mjs.map +1 -0
  488. package/dist/esm/keyboard/components/ScrollViewWithBottomPadding/styles.native.js +11 -0
  489. package/dist/esm/keyboard/components/ScrollViewWithBottomPadding/styles.native.js.map +1 -0
  490. package/dist/esm/keyboard/components/hooks/useCombinedRef.mjs +21 -0
  491. package/dist/esm/keyboard/components/hooks/useCombinedRef.mjs.map +1 -0
  492. package/dist/esm/keyboard/components/hooks/useCombinedRef.native.js +41 -0
  493. package/dist/esm/keyboard/components/hooks/useCombinedRef.native.js.map +1 -0
  494. package/dist/esm/keyboard/components/hooks/useScrollState.mjs +59 -0
  495. package/dist/esm/keyboard/components/hooks/useScrollState.mjs.map +1 -0
  496. package/dist/esm/keyboard/components/hooks/useScrollState.native.js +60 -0
  497. package/dist/esm/keyboard/components/hooks/useScrollState.native.js.map +1 -0
  498. package/dist/esm/keyboard/components/index.mjs +8 -0
  499. package/dist/esm/keyboard/components/index.native.js +8 -0
  500. package/dist/esm/keyboard/components/utils/safeScrollTo.mjs +14 -0
  501. package/dist/esm/keyboard/components/utils/safeScrollTo.mjs.map +1 -0
  502. package/dist/esm/keyboard/components/utils/safeScrollTo.native.js +14 -0
  503. package/dist/esm/keyboard/components/utils/safeScrollTo.native.js.map +1 -0
  504. package/dist/esm/keyboard/constants.mjs +25 -0
  505. package/dist/esm/keyboard/constants.mjs.map +1 -0
  506. package/dist/esm/keyboard/constants.native.js +25 -0
  507. package/dist/esm/keyboard/constants.native.js.map +1 -0
  508. package/dist/esm/keyboard/context.mjs +43 -0
  509. package/dist/esm/keyboard/context.mjs.map +1 -0
  510. package/dist/esm/keyboard/context.native.js +49 -0
  511. package/dist/esm/keyboard/context.native.js.map +1 -0
  512. package/dist/esm/keyboard/hooks/index.mjs +94 -0
  513. package/dist/esm/keyboard/hooks/index.mjs.map +1 -0
  514. package/dist/esm/keyboard/hooks/index.native.js +106 -0
  515. package/dist/esm/keyboard/hooks/index.native.js.map +1 -0
  516. package/dist/esm/keyboard/hooks/useKeyboardState/index.mjs +25 -0
  517. package/dist/esm/keyboard/hooks/useKeyboardState/index.mjs.map +1 -0
  518. package/dist/esm/keyboard/hooks/useKeyboardState/index.native.js +38 -0
  519. package/dist/esm/keyboard/hooks/useKeyboardState/index.native.js.map +1 -0
  520. package/dist/esm/keyboard/hooks/useWindowDimensions/index.mjs +29 -0
  521. package/dist/esm/keyboard/hooks/useWindowDimensions/index.mjs.map +1 -0
  522. package/dist/esm/keyboard/hooks/useWindowDimensions/index.native.js +29 -0
  523. package/dist/esm/keyboard/hooks/useWindowDimensions/index.native.js.map +1 -0
  524. package/dist/esm/keyboard/index.mjs +20 -0
  525. package/dist/esm/keyboard/index.native.js +20 -0
  526. package/dist/esm/keyboard/internal.mjs +55 -0
  527. package/dist/esm/keyboard/internal.mjs.map +1 -0
  528. package/dist/esm/keyboard/internal.native.js +55 -0
  529. package/dist/esm/keyboard/internal.native.js.map +1 -0
  530. package/dist/esm/keyboard/module.mjs +53 -0
  531. package/dist/esm/keyboard/module.mjs.map +1 -0
  532. package/dist/esm/keyboard/module.native.js +58 -0
  533. package/dist/esm/keyboard/module.native.js.map +1 -0
  534. package/dist/esm/keyboard/reanimated.mjs +9 -0
  535. package/dist/esm/keyboard/reanimated.mjs.map +1 -0
  536. package/dist/esm/keyboard/reanimated.native.js +55 -0
  537. package/dist/esm/keyboard/reanimated.native.js.map +1 -0
  538. package/dist/esm/keyboard/typings/hooks.mjs +0 -0
  539. package/dist/esm/keyboard/typings/hooks.native.js +0 -0
  540. package/dist/esm/keyboard/typings/index.mjs +9 -0
  541. package/dist/esm/keyboard/typings/index.native.js +9 -0
  542. package/dist/esm/keyboard/typings/internal.mjs +0 -0
  543. package/dist/esm/keyboard/typings/internal.native.js +0 -0
  544. package/dist/esm/keyboard/typings/module.mjs +0 -0
  545. package/dist/esm/keyboard/typings/module.native.js +0 -0
  546. package/dist/esm/keyboard/typings/provider.mjs +0 -0
  547. package/dist/esm/keyboard/typings/provider.native.js +0 -0
  548. package/dist/esm/keyboard/typings/views.mjs +0 -0
  549. package/dist/esm/keyboard/typings/views.native.js +0 -0
  550. package/dist/esm/keyboard/utils/findNodeHandle/index.mjs +5 -0
  551. package/dist/esm/keyboard/utils/findNodeHandle/index.mjs.map +1 -0
  552. package/dist/esm/keyboard/utils/findNodeHandle/index.native.js +3 -0
  553. package/dist/esm/keyboard/views/KeyboardExtender/index.ios.js +23 -0
  554. package/dist/esm/keyboard/views/KeyboardExtender/index.ios.js.map +1 -0
  555. package/dist/esm/keyboard/views/KeyboardExtender/index.mjs +29 -0
  556. package/dist/esm/keyboard/views/KeyboardExtender/index.mjs.map +1 -0
  557. package/dist/esm/keyboard/views/KeyboardExtender/index.native.js +30 -0
  558. package/dist/esm/keyboard/views/KeyboardExtender/index.native.js.map +1 -0
  559. package/dist/esm/keyboard/views/OverKeyboardView/index.mjs +41 -0
  560. package/dist/esm/keyboard/views/OverKeyboardView/index.mjs.map +1 -0
  561. package/dist/esm/keyboard/views/OverKeyboardView/index.native.js +45 -0
  562. package/dist/esm/keyboard/views/OverKeyboardView/index.native.js.map +1 -0
  563. package/dist/esm/keyboard/views/index.mjs +4 -0
  564. package/dist/esm/keyboard/views/index.native.js +4 -0
  565. package/dist/esm/keyboard.mjs +1 -0
  566. package/dist/esm/keyboard.native.js +1 -0
  567. package/dist/esm/platform/specs/OneClippingScrollViewDecoratorViewNativeComponent.mjs +16 -0
  568. package/dist/esm/platform/specs/OneClippingScrollViewDecoratorViewNativeComponent.mjs.map +7 -0
  569. package/dist/esm/platform/specs/OneClippingScrollViewDecoratorViewNativeComponent.native.js +16 -0
  570. package/dist/esm/platform/specs/OneClippingScrollViewDecoratorViewNativeComponent.native.js.map +7 -0
  571. package/dist/esm/platform/specs/OneKeyboard.nitro.mjs +0 -0
  572. package/dist/esm/platform/specs/OneKeyboard.nitro.native.js +0 -0
  573. package/dist/esm/platform/specs/OneKeyboardBackgroundViewNativeComponent.mjs +12 -0
  574. package/dist/esm/platform/specs/OneKeyboardBackgroundViewNativeComponent.mjs.map +7 -0
  575. package/dist/esm/platform/specs/OneKeyboardBackgroundViewNativeComponent.native.js +12 -0
  576. package/dist/esm/platform/specs/OneKeyboardBackgroundViewNativeComponent.native.js.map +7 -0
  577. package/dist/esm/platform/specs/OneKeyboardControllerViewNativeComponent.mjs +61 -0
  578. package/dist/esm/platform/specs/OneKeyboardControllerViewNativeComponent.mjs.map +7 -0
  579. package/dist/esm/platform/specs/OneKeyboardControllerViewNativeComponent.native.js +61 -0
  580. package/dist/esm/platform/specs/OneKeyboardControllerViewNativeComponent.native.js.map +7 -0
  581. package/dist/esm/platform/specs/OneKeyboardExtenderNativeComponent.mjs +15 -0
  582. package/dist/esm/platform/specs/OneKeyboardExtenderNativeComponent.mjs.map +7 -0
  583. package/dist/esm/platform/specs/OneKeyboardExtenderNativeComponent.native.js +15 -0
  584. package/dist/esm/platform/specs/OneKeyboardExtenderNativeComponent.native.js.map +7 -0
  585. package/dist/esm/platform/specs/OneKeyboardGestureAreaNativeComponent.mjs +18 -0
  586. package/dist/esm/platform/specs/OneKeyboardGestureAreaNativeComponent.mjs.map +7 -0
  587. package/dist/esm/platform/specs/OneKeyboardGestureAreaNativeComponent.native.js +18 -0
  588. package/dist/esm/platform/specs/OneKeyboardGestureAreaNativeComponent.native.js.map +7 -0
  589. package/dist/esm/platform/specs/OneKeyboardToolbarGroupViewNativeComponent.mjs +12 -0
  590. package/dist/esm/platform/specs/OneKeyboardToolbarGroupViewNativeComponent.mjs.map +7 -0
  591. package/dist/esm/platform/specs/OneKeyboardToolbarGroupViewNativeComponent.native.js +12 -0
  592. package/dist/esm/platform/specs/OneKeyboardToolbarGroupViewNativeComponent.native.js.map +7 -0
  593. package/dist/esm/platform/specs/OneOverKeyboardViewNativeComponent.mjs +14 -0
  594. package/dist/esm/platform/specs/OneOverKeyboardViewNativeComponent.mjs.map +7 -0
  595. package/dist/esm/platform/specs/OneOverKeyboardViewNativeComponent.native.js +14 -0
  596. package/dist/esm/platform/specs/OneOverKeyboardViewNativeComponent.native.js.map +7 -0
  597. package/ios/Keyboard/KeyboardBackdropController.swift +57 -0
  598. package/ios/Keyboard/KeyboardControllerModuleImpl.swift +75 -0
  599. package/ios/Keyboard/LICENSE +21 -0
  600. package/ios/Keyboard/OneKeyboardBridge.swift +51 -0
  601. package/ios/Keyboard/animations/KeyboardAnimation.swift +80 -0
  602. package/ios/Keyboard/animations/SpringAnimation.swift +75 -0
  603. package/ios/Keyboard/animations/TimingAnimation.swift +145 -0
  604. package/ios/Keyboard/core/KeyboardControllerConfiguration.swift +9 -0
  605. package/ios/Keyboard/core/UIUtils.swift +6 -0
  606. package/ios/Keyboard/delegates/KCTextInputCompositeDelegate.swift +263 -0
  607. package/ios/Keyboard/events/KeyboardEventEmitterPayload.swift +16 -0
  608. package/ios/Keyboard/events/OneKCFocusedInputLayoutChangedEvent.h +8 -0
  609. package/ios/Keyboard/events/OneKCFocusedInputLayoutChangedEvent.m +70 -0
  610. package/ios/Keyboard/events/OneKCFocusedInputSelectionChangedEvent.h +8 -0
  611. package/ios/Keyboard/events/OneKCFocusedInputSelectionChangedEvent.m +69 -0
  612. package/ios/Keyboard/events/OneKCFocusedInputTextChangedEvent.h +8 -0
  613. package/ios/Keyboard/events/OneKCFocusedInputTextChangedEvent.m +64 -0
  614. package/ios/Keyboard/events/OneKCKeyboardMoveEvent.h +13 -0
  615. package/ios/Keyboard/events/OneKCKeyboardMoveEvent.m +75 -0
  616. package/ios/Keyboard/extensions/CGFloat.swift +13 -0
  617. package/ios/Keyboard/extensions/Date.swift +7 -0
  618. package/ios/Keyboard/extensions/NSObject.swift +5 -0
  619. package/ios/Keyboard/extensions/Notification.swift +15 -0
  620. package/ios/Keyboard/extensions/String.swift +5 -0
  621. package/ios/Keyboard/extensions/UIApplication.swift +38 -0
  622. package/ios/Keyboard/extensions/UIKeyboardType.swift +23 -0
  623. package/ios/Keyboard/extensions/UIResponder.swift +94 -0
  624. package/ios/Keyboard/extensions/UIScrollView.swift +8 -0
  625. package/ios/Keyboard/extensions/UIView.swift +83 -0
  626. package/ios/Keyboard/extensions/UIWindow.swift +56 -0
  627. package/ios/Keyboard/interactive/InvisibleInputAccessoryView.swift +52 -0
  628. package/ios/Keyboard/interactive/KeyboardAreaExtender.swift +68 -0
  629. package/ios/Keyboard/interactive/KeyboardOffsetProvider.swift +32 -0
  630. package/ios/Keyboard/objc/NSObject+SafeKVC.h +5 -0
  631. package/ios/Keyboard/objc/NSObject+SafeKVC.m +12 -0
  632. package/ios/Keyboard/objc/TextInput+DelegateManager.h +13 -0
  633. package/ios/Keyboard/objc/TextInput+DelegateManager.m +48 -0
  634. package/ios/Keyboard/observers/FocusedInputObserver.swift +334 -0
  635. package/ios/Keyboard/observers/movement/KeyboardEventsIgnorer.swift +32 -0
  636. package/ios/Keyboard/observers/movement/KeyboardTrackingView.swift +163 -0
  637. package/ios/Keyboard/observers/movement/KeyboardViewLocator.swift +16 -0
  638. package/ios/Keyboard/observers/movement/observer/KeyboardMovementObserver+Animation.swift +14 -0
  639. package/ios/Keyboard/observers/movement/observer/KeyboardMovementObserver+Interactive.swift +55 -0
  640. package/ios/Keyboard/observers/movement/observer/KeyboardMovementObserver+Lifecycle.swift +28 -0
  641. package/ios/Keyboard/observers/movement/observer/KeyboardMovementObserver+Listeners.swift +116 -0
  642. package/ios/Keyboard/observers/movement/observer/KeyboardMovementObserver+Watcher.swift +69 -0
  643. package/ios/Keyboard/observers/movement/observer/KeyboardMovementObserver.swift +57 -0
  644. package/ios/Keyboard/protocols/TextInput.swift +50 -0
  645. package/ios/Keyboard/swizzling/UIResponderSwizzle.swift +144 -0
  646. package/ios/Keyboard/traversal/FocusedInputHolder.swift +24 -0
  647. package/ios/Keyboard/traversal/KeyboardView.swift +28 -0
  648. package/ios/Keyboard/traversal/ViewHierarchyNavigator.swift +157 -0
  649. package/ios/Keyboard/views/KeyboardExtenderContainerView.swift +207 -0
  650. package/ios/Keyboard/views/OneClippingScrollViewDecoratorViewComponentView.h +8 -0
  651. package/ios/Keyboard/views/OneClippingScrollViewDecoratorViewComponentView.mm +230 -0
  652. package/ios/Keyboard/views/OneKeyboardBackgroundViewComponentView.h +8 -0
  653. package/ios/Keyboard/views/OneKeyboardBackgroundViewComponentView.mm +123 -0
  654. package/ios/Keyboard/views/OneKeyboardControllerViewComponentView.h +13 -0
  655. package/ios/Keyboard/views/OneKeyboardControllerViewComponentView.mm +299 -0
  656. package/ios/Keyboard/views/OneKeyboardExtenderComponentView.h +16 -0
  657. package/ios/Keyboard/views/OneKeyboardExtenderComponentView.mm +275 -0
  658. package/ios/Keyboard/views/OneKeyboardGestureAreaComponentView.h +10 -0
  659. package/ios/Keyboard/views/OneKeyboardGestureAreaComponentView.mm +111 -0
  660. package/ios/Keyboard/views/OneKeyboardToolbarGroupViewComponentView.h +7 -0
  661. package/ios/Keyboard/views/OneKeyboardToolbarGroupViewComponentView.mm +47 -0
  662. package/ios/Keyboard/views/OneOverKeyboardViewComponentView.h +15 -0
  663. package/ios/Keyboard/views/OneOverKeyboardViewComponentView.mm +155 -0
  664. package/ios/Nitro/HybridOneKeyboard.swift +140 -0
  665. package/ios/Nitro/OneLaunchScreen.h +2 -0
  666. package/ios/Nitro/OneLaunchScreen.m +16 -0
  667. package/nitrogen/generated/android/One+autolinking.cmake +2 -0
  668. package/nitrogen/generated/android/OneOnLoad.cpp +24 -2
  669. package/nitrogen/generated/android/c++/JFunc_void_OneKeyboardEventName_OneKeyboardEvent.hpp +80 -0
  670. package/nitrogen/generated/android/c++/JFunc_void_OneKeyboardFocus.hpp +77 -0
  671. package/nitrogen/generated/android/c++/JFunc_void_double_double.hpp +75 -0
  672. package/nitrogen/generated/android/c++/JHybridOneKeyboardSpec.cpp +181 -0
  673. package/nitrogen/generated/android/c++/JHybridOneKeyboardSpec.hpp +74 -0
  674. package/nitrogen/generated/android/c++/JOneKeyboardEvent.hpp +77 -0
  675. package/nitrogen/generated/android/c++/JOneKeyboardEventName.hpp +64 -0
  676. package/nitrogen/generated/android/c++/JOneKeyboardFocus.hpp +61 -0
  677. package/nitrogen/generated/android/c++/JOneKeyboardFrame.hpp +69 -0
  678. package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/Func_void_OneKeyboardEventName_OneKeyboardEvent.kt +78 -0
  679. package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/Func_void_OneKeyboardFocus.kt +78 -0
  680. package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/Func_void_double_double.kt +78 -0
  681. package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/HybridOneKeyboardSpec.kt +128 -0
  682. package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/OneKeyboardEvent.kt +76 -0
  683. package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/OneKeyboardEventName.kt +25 -0
  684. package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/OneKeyboardFocus.kt +56 -0
  685. package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/OneKeyboardFrame.kt +66 -0
  686. package/nitrogen/generated/ios/One-Swift-Cxx-Bridge.cpp +197 -148
  687. package/nitrogen/generated/ios/One-Swift-Cxx-Bridge.hpp +590 -452
  688. package/nitrogen/generated/ios/One-Swift-Cxx-Umbrella.hpp +17 -0
  689. package/nitrogen/generated/ios/OneAutolinking.mm +8 -0
  690. package/nitrogen/generated/ios/OneAutolinking.swift +12 -0
  691. package/nitrogen/generated/ios/c++/HybridOneKeyboardSpecSwift.cpp +11 -0
  692. package/nitrogen/generated/ios/c++/HybridOneKeyboardSpecSwift.hpp +173 -0
  693. package/nitrogen/generated/ios/swift/Func_void_OneKeyboardEventName_OneKeyboardEvent.swift +46 -0
  694. package/nitrogen/generated/ios/swift/Func_void_OneKeyboardFocus.swift +46 -0
  695. package/nitrogen/generated/ios/swift/Func_void_OneKeyboardFrame.swift +46 -0
  696. package/nitrogen/generated/ios/swift/Func_void_double_double.swift +46 -0
  697. package/nitrogen/generated/ios/swift/HybridOneKeyboardSpec.swift +66 -0
  698. package/nitrogen/generated/ios/swift/HybridOneKeyboardSpec_cxx.swift +316 -0
  699. package/nitrogen/generated/ios/swift/OneKeyboardEvent.swift +54 -0
  700. package/nitrogen/generated/ios/swift/OneKeyboardEventName.swift +48 -0
  701. package/nitrogen/generated/ios/swift/OneKeyboardFocus.swift +34 -0
  702. package/nitrogen/generated/ios/swift/OneKeyboardFrame.swift +44 -0
  703. package/nitrogen/generated/shared/c++/HybridOneKeyboardSpec.cpp +33 -0
  704. package/nitrogen/generated/shared/c++/HybridOneKeyboardSpec.hpp +86 -0
  705. package/nitrogen/generated/shared/c++/OneKeyboardEvent.hpp +103 -0
  706. package/nitrogen/generated/shared/c++/OneKeyboardEventName.hpp +84 -0
  707. package/nitrogen/generated/shared/c++/OneKeyboardFocus.hpp +87 -0
  708. package/nitrogen/generated/shared/c++/OneKeyboardFrame.hpp +95 -0
  709. package/package.json +27 -13
  710. package/react-native.config.cjs +6 -0
  711. package/src/keyboard/LICENSE +21 -0
  712. package/src/keyboard/animated.tsx +235 -0
  713. package/src/keyboard/architecture.ts +1 -0
  714. package/src/keyboard/bindings.native.ts +113 -0
  715. package/src/keyboard/bindings.ts +100 -0
  716. package/src/keyboard/compat.ts +61 -0
  717. package/src/keyboard/components/KeyboardAvoidingView/hooks.ts +152 -0
  718. package/src/keyboard/components/KeyboardAvoidingView/index.tsx +260 -0
  719. package/src/keyboard/components/KeyboardAwareScrollView/index.tsx +607 -0
  720. package/src/keyboard/components/KeyboardAwareScrollView/types.ts +30 -0
  721. package/src/keyboard/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.ts +151 -0
  722. package/src/keyboard/components/KeyboardAwareScrollView/utils.ts +42 -0
  723. package/src/keyboard/components/KeyboardChatScrollView/hooks.ts +2 -0
  724. package/src/keyboard/components/KeyboardChatScrollView/index.tsx +182 -0
  725. package/src/keyboard/components/KeyboardChatScrollView/types.ts +120 -0
  726. package/src/keyboard/components/KeyboardChatScrollView/useChatKeyboard/helpers.ts +263 -0
  727. package/src/keyboard/components/KeyboardChatScrollView/useChatKeyboard/index.ios.ts +255 -0
  728. package/src/keyboard/components/KeyboardChatScrollView/useChatKeyboard/index.ts +356 -0
  729. package/src/keyboard/components/KeyboardChatScrollView/useChatKeyboard/types.ts +39 -0
  730. package/src/keyboard/components/KeyboardChatScrollView/useEndVisible.ts +59 -0
  731. package/src/keyboard/components/KeyboardChatScrollView/useExtraContentPadding/index.ts +188 -0
  732. package/src/keyboard/components/KeyboardChatScrollView/useFrozenPadding/index.ts +80 -0
  733. package/src/keyboard/components/KeyboardEffects/index.tsx +122 -0
  734. package/src/keyboard/components/KeyboardStickyView/index.tsx +75 -0
  735. package/src/keyboard/components/KeyboardToolbar/Arrow.tsx +76 -0
  736. package/src/keyboard/components/KeyboardToolbar/Button.tsx +89 -0
  737. package/src/keyboard/components/KeyboardToolbar/colors.native.ts +37 -0
  738. package/src/keyboard/components/KeyboardToolbar/colors.ts +16 -0
  739. package/src/keyboard/components/KeyboardToolbar/compound/components/Background.tsx +7 -0
  740. package/src/keyboard/components/KeyboardToolbar/compound/components/Content.tsx +23 -0
  741. package/src/keyboard/components/KeyboardToolbar/compound/components/Done.tsx +70 -0
  742. package/src/keyboard/components/KeyboardToolbar/compound/components/Next.tsx +53 -0
  743. package/src/keyboard/components/KeyboardToolbar/compound/components/Prev.tsx +54 -0
  744. package/src/keyboard/components/KeyboardToolbar/compound/components/index.ts +5 -0
  745. package/src/keyboard/components/KeyboardToolbar/compound/components/types.ts +15 -0
  746. package/src/keyboard/components/KeyboardToolbar/compound/context.ts +21 -0
  747. package/src/keyboard/components/KeyboardToolbar/constants.ts +13 -0
  748. package/src/keyboard/components/KeyboardToolbar/index.tsx +231 -0
  749. package/src/keyboard/components/KeyboardToolbar/types.ts +129 -0
  750. package/src/keyboard/components/ScrollViewWithBottomPadding/index.tsx +185 -0
  751. package/src/keyboard/components/ScrollViewWithBottomPadding/styles.ts +10 -0
  752. package/src/keyboard/components/hooks/useCombinedRef.ts +22 -0
  753. package/src/keyboard/components/hooks/useScrollState.ts +81 -0
  754. package/src/keyboard/components/index.ts +22 -0
  755. package/src/keyboard/components/utils/safeScrollTo.ts +26 -0
  756. package/src/keyboard/constants.ts +23 -0
  757. package/src/keyboard/context.ts +100 -0
  758. package/src/keyboard/hooks/index.ts +289 -0
  759. package/src/keyboard/hooks/useKeyboardState/index.ts +70 -0
  760. package/src/keyboard/hooks/useWindowDimensions/index.ts +38 -0
  761. package/src/keyboard/index.ts +31 -0
  762. package/src/keyboard/internal.ts +117 -0
  763. package/src/keyboard/module.ts +62 -0
  764. package/src/keyboard/reanimated.native.ts +104 -0
  765. package/src/keyboard/reanimated.ts +26 -0
  766. package/src/keyboard/typings/hooks.ts +214 -0
  767. package/src/keyboard/typings/index.ts +5 -0
  768. package/src/keyboard/typings/internal.ts +24 -0
  769. package/src/keyboard/typings/module.ts +136 -0
  770. package/src/keyboard/typings/provider.ts +43 -0
  771. package/src/keyboard/typings/views.ts +63 -0
  772. package/src/keyboard/utils/findNodeHandle/index.native.ts +3 -0
  773. package/src/keyboard/utils/findNodeHandle/index.ts +6 -0
  774. package/src/keyboard/views/KeyboardExtender/index.ios.tsx +35 -0
  775. package/src/keyboard/views/KeyboardExtender/index.tsx +47 -0
  776. package/src/keyboard/views/OverKeyboardView/index.tsx +61 -0
  777. package/src/keyboard/views/index.ts +2 -0
  778. package/src/keyboard.ts +1 -0
  779. package/src/platform/specs/OneClippingScrollViewDecoratorViewNativeComponent.ts +15 -0
  780. package/src/platform/specs/OneKeyboard.nitro.ts +49 -0
  781. package/src/platform/specs/OneKeyboardBackgroundViewNativeComponent.ts +10 -0
  782. package/src/platform/specs/OneKeyboardControllerViewNativeComponent.ts +84 -0
  783. package/src/platform/specs/OneKeyboardExtenderNativeComponent.ts +13 -0
  784. package/src/platform/specs/OneKeyboardGestureAreaNativeComponent.ts +17 -0
  785. package/src/platform/specs/OneKeyboardToolbarGroupViewNativeComponent.ts +10 -0
  786. package/src/platform/specs/OneOverKeyboardViewNativeComponent.ts +12 -0
  787. package/types/keyboard/animated.d.ts +18 -0
  788. package/types/keyboard/animated.d.ts.map +1 -0
  789. package/types/keyboard/architecture.d.ts +2 -0
  790. package/types/keyboard/architecture.d.ts.map +1 -0
  791. package/types/keyboard/bindings.d.ts +64 -0
  792. package/types/keyboard/bindings.d.ts.map +1 -0
  793. package/types/keyboard/bindings.native.d.ts +19 -0
  794. package/types/keyboard/bindings.native.d.ts.map +1 -0
  795. package/types/keyboard/compat.d.ts +28 -0
  796. package/types/keyboard/compat.d.ts.map +1 -0
  797. package/types/keyboard/components/KeyboardAvoidingView/hooks.d.ts +11 -0
  798. package/types/keyboard/components/KeyboardAvoidingView/hooks.d.ts.map +1 -0
  799. package/types/keyboard/components/KeyboardAvoidingView/index.d.ts +81 -0
  800. package/types/keyboard/components/KeyboardAvoidingView/index.d.ts.map +1 -0
  801. package/types/keyboard/components/KeyboardAwareScrollView/index.d.ts +31 -0
  802. package/types/keyboard/components/KeyboardAwareScrollView/index.d.ts.map +1 -0
  803. package/types/keyboard/components/KeyboardAwareScrollView/types.d.ts +29 -0
  804. package/types/keyboard/components/KeyboardAwareScrollView/types.d.ts.map +1 -0
  805. package/types/keyboard/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.d.ts +23 -0
  806. package/types/keyboard/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.d.ts.map +1 -0
  807. package/types/keyboard/components/KeyboardAwareScrollView/utils.d.ts +3 -0
  808. package/types/keyboard/components/KeyboardAwareScrollView/utils.d.ts.map +1 -0
  809. package/types/keyboard/components/KeyboardChatScrollView/hooks.d.ts +3 -0
  810. package/types/keyboard/components/KeyboardChatScrollView/hooks.d.ts.map +1 -0
  811. package/types/keyboard/components/KeyboardChatScrollView/index.d.ts +5 -0
  812. package/types/keyboard/components/KeyboardChatScrollView/index.d.ts.map +1 -0
  813. package/types/keyboard/components/KeyboardChatScrollView/types.d.ts +116 -0
  814. package/types/keyboard/components/KeyboardChatScrollView/types.d.ts.map +1 -0
  815. package/types/keyboard/components/KeyboardChatScrollView/useChatKeyboard/helpers.d.ts +134 -0
  816. package/types/keyboard/components/KeyboardChatScrollView/useChatKeyboard/helpers.d.ts.map +1 -0
  817. package/types/keyboard/components/KeyboardChatScrollView/useChatKeyboard/index.d.ts +19 -0
  818. package/types/keyboard/components/KeyboardChatScrollView/useChatKeyboard/index.d.ts.map +1 -0
  819. package/types/keyboard/components/KeyboardChatScrollView/useChatKeyboard/index.ios.d.ts +22 -0
  820. package/types/keyboard/components/KeyboardChatScrollView/useChatKeyboard/index.ios.d.ts.map +1 -0
  821. package/types/keyboard/components/KeyboardChatScrollView/useChatKeyboard/types.d.ts +42 -0
  822. package/types/keyboard/components/KeyboardChatScrollView/useChatKeyboard/types.d.ts.map +1 -0
  823. package/types/keyboard/components/KeyboardChatScrollView/useEndVisible.d.ts +18 -0
  824. package/types/keyboard/components/KeyboardChatScrollView/useEndVisible.d.ts.map +1 -0
  825. package/types/keyboard/components/KeyboardChatScrollView/useExtraContentPadding/index.d.ts +48 -0
  826. package/types/keyboard/components/KeyboardChatScrollView/useExtraContentPadding/index.d.ts.map +1 -0
  827. package/types/keyboard/components/KeyboardChatScrollView/useFrozenPadding/index.d.ts +31 -0
  828. package/types/keyboard/components/KeyboardChatScrollView/useFrozenPadding/index.d.ts.map +1 -0
  829. package/types/keyboard/components/KeyboardEffects/index.d.ts +61 -0
  830. package/types/keyboard/components/KeyboardEffects/index.d.ts.map +1 -0
  831. package/types/keyboard/components/KeyboardStickyView/index.d.ts +53 -0
  832. package/types/keyboard/components/KeyboardStickyView/index.d.ts.map +1 -0
  833. package/types/keyboard/components/KeyboardToolbar/Arrow.d.ts +10 -0
  834. package/types/keyboard/components/KeyboardToolbar/Arrow.d.ts.map +1 -0
  835. package/types/keyboard/components/KeyboardToolbar/Button.d.ts +18 -0
  836. package/types/keyboard/components/KeyboardToolbar/Button.d.ts.map +1 -0
  837. package/types/keyboard/components/KeyboardToolbar/colors.d.ts +3 -0
  838. package/types/keyboard/components/KeyboardToolbar/colors.d.ts.map +1 -0
  839. package/types/keyboard/components/KeyboardToolbar/colors.native.d.ts +3 -0
  840. package/types/keyboard/components/KeyboardToolbar/colors.native.d.ts.map +1 -0
  841. package/types/keyboard/components/KeyboardToolbar/compound/components/Background.d.ts +7 -0
  842. package/types/keyboard/components/KeyboardToolbar/compound/components/Background.d.ts.map +1 -0
  843. package/types/keyboard/components/KeyboardToolbar/compound/components/Content.d.ts +8 -0
  844. package/types/keyboard/components/KeyboardToolbar/compound/components/Content.d.ts.map +1 -0
  845. package/types/keyboard/components/KeyboardToolbar/compound/components/Done.d.ts +8 -0
  846. package/types/keyboard/components/KeyboardToolbar/compound/components/Done.d.ts.map +1 -0
  847. package/types/keyboard/components/KeyboardToolbar/compound/components/Next.d.ts +5 -0
  848. package/types/keyboard/components/KeyboardToolbar/compound/components/Next.d.ts.map +1 -0
  849. package/types/keyboard/components/KeyboardToolbar/compound/components/Prev.d.ts +5 -0
  850. package/types/keyboard/components/KeyboardToolbar/compound/components/Prev.d.ts.map +1 -0
  851. package/types/keyboard/components/KeyboardToolbar/compound/components/index.d.ts +6 -0
  852. package/types/keyboard/components/KeyboardToolbar/compound/components/index.d.ts.map +1 -0
  853. package/types/keyboard/components/KeyboardToolbar/compound/components/types.d.ts +15 -0
  854. package/types/keyboard/components/KeyboardToolbar/compound/components/types.d.ts.map +1 -0
  855. package/types/keyboard/components/KeyboardToolbar/compound/context.d.ts +10 -0
  856. package/types/keyboard/components/KeyboardToolbar/compound/context.d.ts.map +1 -0
  857. package/types/keyboard/components/KeyboardToolbar/constants.d.ts +10 -0
  858. package/types/keyboard/components/KeyboardToolbar/constants.d.ts.map +1 -0
  859. package/types/keyboard/components/KeyboardToolbar/index.d.ts +30 -0
  860. package/types/keyboard/components/KeyboardToolbar/index.d.ts.map +1 -0
  861. package/types/keyboard/components/KeyboardToolbar/types.d.ts +106 -0
  862. package/types/keyboard/components/KeyboardToolbar/types.d.ts.map +1 -0
  863. package/types/keyboard/components/ScrollViewWithBottomPadding/index.d.ts +31 -0
  864. package/types/keyboard/components/ScrollViewWithBottomPadding/index.d.ts.map +1 -0
  865. package/types/keyboard/components/ScrollViewWithBottomPadding/styles.d.ts +8 -0
  866. package/types/keyboard/components/ScrollViewWithBottomPadding/styles.d.ts.map +1 -0
  867. package/types/keyboard/components/hooks/useCombinedRef.d.ts +4 -0
  868. package/types/keyboard/components/hooks/useCombinedRef.d.ts.map +1 -0
  869. package/types/keyboard/components/hooks/useScrollState.d.ts +18 -0
  870. package/types/keyboard/components/hooks/useScrollState.d.ts.map +1 -0
  871. package/types/keyboard/components/index.d.ts +13 -0
  872. package/types/keyboard/components/index.d.ts.map +1 -0
  873. package/types/keyboard/components/utils/safeScrollTo.d.ts +13 -0
  874. package/types/keyboard/components/utils/safeScrollTo.d.ts.map +1 -0
  875. package/types/keyboard/constants.d.ts +19 -0
  876. package/types/keyboard/constants.d.ts.map +1 -0
  877. package/types/keyboard/context.d.ts +58 -0
  878. package/types/keyboard/context.d.ts.map +1 -0
  879. package/types/keyboard/hooks/index.d.ts +176 -0
  880. package/types/keyboard/hooks/index.d.ts.map +1 -0
  881. package/types/keyboard/hooks/useKeyboardState/index.d.ts +29 -0
  882. package/types/keyboard/hooks/useKeyboardState/index.d.ts.map +1 -0
  883. package/types/keyboard/hooks/useWindowDimensions/index.d.ts +3 -0
  884. package/types/keyboard/hooks/useWindowDimensions/index.d.ts.map +1 -0
  885. package/types/keyboard/index.d.ts +12 -0
  886. package/types/keyboard/index.d.ts.map +1 -0
  887. package/types/keyboard/internal.d.ts +37 -0
  888. package/types/keyboard/internal.d.ts.map +1 -0
  889. package/types/keyboard/module.d.ts +6 -0
  890. package/types/keyboard/module.d.ts.map +1 -0
  891. package/types/keyboard/reanimated.d.ts +5 -0
  892. package/types/keyboard/reanimated.d.ts.map +1 -0
  893. package/types/keyboard/reanimated.native.d.ts +12 -0
  894. package/types/keyboard/reanimated.native.d.ts.map +1 -0
  895. package/types/keyboard/typings/hooks.d.ts +168 -0
  896. package/types/keyboard/typings/hooks.d.ts.map +1 -0
  897. package/types/keyboard/typings/index.d.ts +6 -0
  898. package/types/keyboard/typings/index.d.ts.map +1 -0
  899. package/types/keyboard/typings/internal.d.ts +18 -0
  900. package/types/keyboard/typings/internal.d.ts.map +1 -0
  901. package/types/keyboard/typings/module.d.ts +122 -0
  902. package/types/keyboard/typings/module.d.ts.map +1 -0
  903. package/types/keyboard/typings/provider.d.ts +44 -0
  904. package/types/keyboard/typings/provider.d.ts.map +1 -0
  905. package/types/keyboard/typings/views.d.ts +61 -0
  906. package/types/keyboard/typings/views.d.ts.map +1 -0
  907. package/types/keyboard/utils/findNodeHandle/index.d.ts +5 -0
  908. package/types/keyboard/utils/findNodeHandle/index.d.ts.map +1 -0
  909. package/types/keyboard/utils/findNodeHandle/index.native.d.ts +3 -0
  910. package/types/keyboard/utils/findNodeHandle/index.native.d.ts.map +1 -0
  911. package/types/keyboard/views/KeyboardExtender/index.d.ts +20 -0
  912. package/types/keyboard/views/KeyboardExtender/index.d.ts.map +1 -0
  913. package/types/keyboard/views/KeyboardExtender/index.ios.d.ts +20 -0
  914. package/types/keyboard/views/KeyboardExtender/index.ios.d.ts.map +1 -0
  915. package/types/keyboard/views/OverKeyboardView/index.d.ts +19 -0
  916. package/types/keyboard/views/OverKeyboardView/index.d.ts.map +1 -0
  917. package/types/keyboard/views/index.d.ts +3 -0
  918. package/types/keyboard/views/index.d.ts.map +1 -0
  919. package/types/keyboard.d.ts +2 -0
  920. package/types/keyboard.d.ts.map +1 -0
  921. package/types/platform/specs/OneClippingScrollViewDecoratorViewNativeComponent.d.ts +11 -0
  922. package/types/platform/specs/OneClippingScrollViewDecoratorViewNativeComponent.d.ts.map +1 -0
  923. package/types/platform/specs/OneKeyboard.nitro.d.ts +39 -0
  924. package/types/platform/specs/OneKeyboard.nitro.d.ts.map +1 -0
  925. package/types/platform/specs/OneKeyboardBackgroundViewNativeComponent.d.ts +7 -0
  926. package/types/platform/specs/OneKeyboardBackgroundViewNativeComponent.d.ts.map +1 -0
  927. package/types/platform/specs/OneKeyboardControllerViewNativeComponent.d.ts +61 -0
  928. package/types/platform/specs/OneKeyboardControllerViewNativeComponent.d.ts.map +1 -0
  929. package/types/platform/specs/OneKeyboardExtenderNativeComponent.d.ts +9 -0
  930. package/types/platform/specs/OneKeyboardExtenderNativeComponent.d.ts.map +1 -0
  931. package/types/platform/specs/OneKeyboardGestureAreaNativeComponent.d.ts +13 -0
  932. package/types/platform/specs/OneKeyboardGestureAreaNativeComponent.d.ts.map +1 -0
  933. package/types/platform/specs/OneKeyboardToolbarGroupViewNativeComponent.d.ts +7 -0
  934. package/types/platform/specs/OneKeyboardToolbarGroupViewNativeComponent.d.ts.map +1 -0
  935. package/types/platform/specs/OneOverKeyboardViewNativeComponent.d.ts +8 -0
  936. package/types/platform/specs/OneOverKeyboardViewNativeComponent.d.ts.map +1 -0
@@ -0,0 +1,346 @@
1
+ "use strict";
2
+
3
+ // dist/cjs/keyboard/components/KeyboardAwareScrollView/index.native.js
4
+ var __create = Object.create;
5
+ var __defProp = Object.defineProperty;
6
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getProtoOf = Object.getPrototypeOf;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __export = (target, all) => {
11
+ for (var name in all) __defProp(target, name, {
12
+ get: all[name],
13
+ enumerable: true
14
+ });
15
+ };
16
+ var __copyProps = (to, from, except, desc) => {
17
+ if (from && typeof from === "object" || typeof from === "function") {
18
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
19
+ get: () => from[key],
20
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
21
+ });
22
+ }
23
+ return to;
24
+ };
25
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
26
+ value: mod,
27
+ enumerable: true
28
+ }) : target, mod));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+ var KeyboardAwareScrollView_exports = {};
31
+ __export(KeyboardAwareScrollView_exports, { default: () => KeyboardAwareScrollView_default });
32
+ module.exports = __toCommonJS(KeyboardAwareScrollView_exports);
33
+ var import_jsx_runtime = require("react/jsx-runtime");
34
+ var import_react = __toESM(require("react"), 1);
35
+ var import_react_native_reanimated = __toESM(require("react-native-reanimated"), 1);
36
+ var import_hooks = require("../../hooks/index.native.js");
37
+ var import_reanimated = require("../../reanimated.native.js");
38
+ var import_findNodeHandle = require("../../utils/findNodeHandle/index.native.js");
39
+ var import_useCombinedRef = __toESM(require("../hooks/useCombinedRef.native.js"), 1);
40
+ var import_useScrollState = __toESM(require("../hooks/useScrollState.native.js"), 1);
41
+ var import_ScrollViewWithBottomPadding = __toESM(require("../ScrollViewWithBottomPadding/index.native.js"), 1);
42
+ var import_useSmoothKeyboardHandler = require("./useSmoothKeyboardHandler.native.js");
43
+ var import_utils = require("./utils.native.js");
44
+ var KeyboardAwareScrollView = /* @__PURE__ */ (0, import_react.forwardRef)(function(param, ref) {
45
+ var { children, onLayout, bottomOffset = 0, disableScrollOnKeyboardHide = false, enabled = true, extraKeyboardSpace = 0, mode = "insets", ScrollViewComponent = import_react_native_reanimated.default.ScrollView, snapToOffsets, ...rest } = param;
46
+ var scrollViewAnimatedRef = (0, import_react_native_reanimated.useAnimatedRef)();
47
+ var scrollViewRef = import_react.default.useRef(null);
48
+ var onRef = (0, import_useCombinedRef.default)(scrollViewAnimatedRef, scrollViewRef);
49
+ var scrollViewTarget = (0, import_react_native_reanimated.useSharedValue)(null);
50
+ var scrollPosition = (0, import_react_native_reanimated.useSharedValue)(0);
51
+ var { offset: position, layout: scrollViewLayout, size: scrollViewContentSize } = (0, import_useScrollState.default)(scrollViewAnimatedRef);
52
+ var currentKeyboardFrameHeight = (0, import_react_native_reanimated.useSharedValue)(0);
53
+ var keyboardHeight = (0, import_react_native_reanimated.useSharedValue)(0);
54
+ var keyboardWillAppear = (0, import_react_native_reanimated.useSharedValue)(false);
55
+ var keyboardWillHide = (0, import_react_native_reanimated.useSharedValue)(false);
56
+ var tag = (0, import_react_native_reanimated.useSharedValue)(-1);
57
+ var initialKeyboardSize = (0, import_react_native_reanimated.useSharedValue)(0);
58
+ var scrollBeforeKeyboardMovement = (0, import_react_native_reanimated.useSharedValue)(0);
59
+ var { input, update } = (0, import_hooks.useReanimatedFocusedInput)();
60
+ var layout = (0, import_react_native_reanimated.useSharedValue)(null);
61
+ var lastSelection = (0, import_react_native_reanimated.useSharedValue)(null);
62
+ var ghostViewSpace = (0, import_react_native_reanimated.useSharedValue)(-1);
63
+ var pendingSelectionForFocus = (0, import_react_native_reanimated.useSharedValue)(false);
64
+ var selectionUpdatedSinceHide = (0, import_react_native_reanimated.useSharedValue)(false);
65
+ var { height } = (0, import_hooks.useWindowDimensions)();
66
+ var syncScrollViewTarget = (0, import_react.useCallback)(function() {
67
+ scrollViewTarget.value = (0, import_findNodeHandle.findNodeHandle)(scrollViewAnimatedRef.current);
68
+ }, []);
69
+ var onScrollViewLayout = (0, import_react.useCallback)(function(e) {
70
+ syncScrollViewTarget();
71
+ onLayout === null || onLayout === void 0 ? void 0 : onLayout(e);
72
+ }, [onLayout, syncScrollViewTarget]);
73
+ (0, import_react.useEffect)(function() {
74
+ syncScrollViewTarget();
75
+ }, [syncScrollViewTarget]);
76
+ var maybeScroll = (0, import_react.useCallback)(function(e) {
77
+ "worklet";
78
+ var animated = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
79
+ var _layout_value, _layout_value1, _layout_value2, _layout_value3;
80
+ if (!enabled) {
81
+ return 0;
82
+ }
83
+ if (((_layout_value = layout.value) === null || _layout_value === void 0 ? void 0 : _layout_value.parentScrollViewTarget) !== scrollViewTarget.value) {
84
+ return 0;
85
+ }
86
+ var visibleRect = height - keyboardHeight.value;
87
+ var absoluteY = ((_layout_value1 = layout.value) === null || _layout_value1 === void 0 ? void 0 : _layout_value1.layout.absoluteY) || 0;
88
+ var inputHeight = ((_layout_value2 = layout.value) === null || _layout_value2 === void 0 ? void 0 : _layout_value2.layout.height) || 0;
89
+ var point = absoluteY + inputHeight;
90
+ if (visibleRect - point <= bottomOffset) {
91
+ var relativeScrollTo = keyboardHeight.value - (height - point) + bottomOffset;
92
+ var interpolatedScrollTo = (0, import_react_native_reanimated.interpolate)(e, [initialKeyboardSize.value, keyboardHeight.value], [0, (0, import_utils.scrollDistanceWithRespectToSnapPoints)(relativeScrollTo + scrollPosition.value, snapToOffsets) - scrollPosition.value]);
93
+ var targetScrollY = Math.max(interpolatedScrollTo, 0) + scrollPosition.value;
94
+ (0, import_react_native_reanimated.scrollTo)(scrollViewAnimatedRef, 0, targetScrollY, animated);
95
+ return interpolatedScrollTo;
96
+ }
97
+ var contentY = ((_layout_value3 = layout.value) === null || _layout_value3 === void 0 ? void 0 : _layout_value3.layout.contentY) || 0;
98
+ if (contentY + inputHeight < scrollPosition.value) {
99
+ var positionOnScreen = visibleRect - bottomOffset;
100
+ var topOfScreen = scrollPosition.value + point;
101
+ (0, import_react_native_reanimated.scrollTo)(scrollViewAnimatedRef, 0, topOfScreen - positionOnScreen, animated);
102
+ }
103
+ return 0;
104
+ }, [
105
+ bottomOffset,
106
+ enabled,
107
+ height,
108
+ snapToOffsets
109
+ ]);
110
+ var removeGhostPadding = (0, import_react.useCallback)(function(e) {
111
+ "worklet";
112
+ if (mode === "layout") {
113
+ return false;
114
+ }
115
+ if (enabled && keyboardWillHide.value && keyboardHeight.value > 0 && ghostViewSpace.value > 0) {
116
+ (0, import_react_native_reanimated.scrollTo)(scrollViewAnimatedRef, 0, scrollPosition.value - (0, import_react_native_reanimated.interpolate)(e, [initialKeyboardSize.value, keyboardHeight.value], [ghostViewSpace.value, 0]), false);
117
+ return true;
118
+ }
119
+ return false;
120
+ }, [enabled, mode]);
121
+ var performScrollWithPositionRestoration = (0, import_react.useCallback)(function(newPosition) {
122
+ "worklet";
123
+ var prevScroll = scrollPosition.value;
124
+ scrollPosition.value = newPosition;
125
+ maybeScroll(keyboardHeight.value, true);
126
+ scrollPosition.value = prevScroll;
127
+ }, [
128
+ scrollPosition,
129
+ keyboardHeight,
130
+ maybeScroll
131
+ ]);
132
+ var syncKeyboardFrame = (0, import_react.useCallback)(function(e) {
133
+ "worklet";
134
+ var keyboardFrame = (0, import_react_native_reanimated.interpolate)(e.height, [0, keyboardHeight.value], [0, keyboardHeight.value + extraKeyboardSpace]);
135
+ currentKeyboardFrameHeight.value = keyboardFrame;
136
+ }, [extraKeyboardSpace]);
137
+ var updateLayoutFromSelection = (0, import_react.useCallback)(function() {
138
+ "worklet";
139
+ var _lastSelection_value, _input_value;
140
+ var customHeight = (_lastSelection_value = lastSelection.value) === null || _lastSelection_value === void 0 ? void 0 : _lastSelection_value.selection.end.y;
141
+ if (!((_input_value = input.value) === null || _input_value === void 0 ? void 0 : _input_value.layout) || customHeight === void 0) {
142
+ return false;
143
+ }
144
+ layout.value = {
145
+ ...input.value,
146
+ layout: {
147
+ ...input.value.layout,
148
+ height: (0, import_react_native_reanimated.clamp)(customHeight, 0, input.value.layout.height)
149
+ }
150
+ };
151
+ return true;
152
+ }, [
153
+ input,
154
+ lastSelection,
155
+ layout
156
+ ]);
157
+ var scrollFromCurrentPosition = (0, import_react.useCallback)(function() {
158
+ "worklet";
159
+ var prevLayout = layout.value;
160
+ if (!updateLayoutFromSelection()) {
161
+ return;
162
+ }
163
+ performScrollWithPositionRestoration(position.value);
164
+ layout.value = prevLayout;
165
+ }, [performScrollWithPositionRestoration]);
166
+ var onChangeText = (0, import_react.useCallback)(function() {
167
+ "worklet";
168
+ scrollFromCurrentPosition();
169
+ }, [scrollFromCurrentPosition]);
170
+ var onChangeTextHandler = (0, import_react.useMemo)(function() {
171
+ return (0, import_utils.debounce)(onChangeText, 200);
172
+ }, [onChangeText]);
173
+ var onSelectionChange = (0, import_react.useCallback)(function(e) {
174
+ "worklet";
175
+ var _lastSelection_value, _lastSelection_value1;
176
+ var lastTarget = (_lastSelection_value = lastSelection.value) === null || _lastSelection_value === void 0 ? void 0 : _lastSelection_value.target;
177
+ var latestSelection = (_lastSelection_value1 = lastSelection.value) === null || _lastSelection_value1 === void 0 ? void 0 : _lastSelection_value1.selection;
178
+ lastSelection.value = e;
179
+ selectionUpdatedSinceHide.value = true;
180
+ if (e.target !== lastTarget || pendingSelectionForFocus.value) {
181
+ if (pendingSelectionForFocus.value) {
182
+ pendingSelectionForFocus.value = false;
183
+ updateLayoutFromSelection();
184
+ if (!keyboardWillAppear.value && keyboardHeight.value > 0) {
185
+ position.value += maybeScroll(keyboardHeight.value, true);
186
+ }
187
+ }
188
+ return;
189
+ }
190
+ if (e.selection.end.position === e.selection.start.position && (latestSelection === null || latestSelection === void 0 ? void 0 : latestSelection.end.y) !== e.selection.end.y) {
191
+ return scrollFromCurrentPosition();
192
+ }
193
+ if (e.selection.start.position !== e.selection.end.position) {
194
+ return scrollFromCurrentPosition();
195
+ }
196
+ onChangeTextHandler();
197
+ }, [
198
+ scrollFromCurrentPosition,
199
+ onChangeTextHandler,
200
+ updateLayoutFromSelection,
201
+ maybeScroll
202
+ ]);
203
+ (0, import_hooks.useFocusedInputHandler)({ onSelectionChange }, [onSelectionChange]);
204
+ (0, import_useSmoothKeyboardHandler.useSmoothKeyboardHandler)({
205
+ onStart: function onStart(e) {
206
+ "worklet";
207
+ var keyboardWillChangeSize = keyboardHeight.value !== e.height && e.height > 0;
208
+ var hideWasInterrupted = keyboardWillHide.value && e.height > 0;
209
+ keyboardWillAppear.value = e.height > 0 && keyboardHeight.value === 0;
210
+ keyboardWillHide.value = e.height === 0;
211
+ var focusWasChanged = tag.value !== e.target && e.target !== -1 || keyboardWillChangeSize;
212
+ if (keyboardWillChangeSize) {
213
+ initialKeyboardSize.value = keyboardHeight.value;
214
+ }
215
+ if (keyboardWillHide.value) {
216
+ initialKeyboardSize.value = 0;
217
+ scrollPosition.value = scrollBeforeKeyboardMovement.value;
218
+ pendingSelectionForFocus.value = false;
219
+ }
220
+ if (keyboardWillAppear.value || keyboardWillChangeSize || focusWasChanged) {
221
+ scrollPosition.value = position.value;
222
+ keyboardHeight.value = e.height;
223
+ if (mode === "insets") {
224
+ syncKeyboardFrame(e);
225
+ }
226
+ }
227
+ if (focusWasChanged) {
228
+ var _lastSelection_value;
229
+ tag.value = e.target;
230
+ if (((_lastSelection_value = lastSelection.value) === null || _lastSelection_value === void 0 ? void 0 : _lastSelection_value.target) === e.target && selectionUpdatedSinceHide.value) {
231
+ updateLayoutFromSelection();
232
+ pendingSelectionForFocus.value = false;
233
+ } else {
234
+ var _lastSelection_value1;
235
+ if (((_lastSelection_value1 = lastSelection.value) === null || _lastSelection_value1 === void 0 ? void 0 : _lastSelection_value1.target) === e.target) {
236
+ updateLayoutFromSelection();
237
+ } else if (input.value) {
238
+ layout.value = input.value;
239
+ }
240
+ pendingSelectionForFocus.value = true;
241
+ }
242
+ scrollBeforeKeyboardMovement.value = position.value;
243
+ }
244
+ if (focusWasChanged && !keyboardWillAppear.value) {
245
+ if (!pendingSelectionForFocus.value) {
246
+ position.value += maybeScroll(e.height, true);
247
+ }
248
+ }
249
+ if (mode === "insets") {
250
+ ghostViewSpace.value = position.value - Math.max(scrollViewContentSize.value.height - scrollViewLayout.value.height, 0);
251
+ if (ghostViewSpace.value > 0) {
252
+ scrollPosition.value = position.value;
253
+ }
254
+ }
255
+ if (hideWasInterrupted && !focusWasChanged) {
256
+ scrollPosition.value = scrollBeforeKeyboardMovement.value;
257
+ }
258
+ },
259
+ onMove: function onMove(e) {
260
+ "worklet";
261
+ var _lastSelection_value;
262
+ if (pendingSelectionForFocus.value && ((_lastSelection_value = lastSelection.value) === null || _lastSelection_value === void 0 ? void 0 : _lastSelection_value.target) !== tag.value) {
263
+ return;
264
+ }
265
+ if (removeGhostPadding(e.height)) {
266
+ return;
267
+ }
268
+ if (mode === "layout") {
269
+ syncKeyboardFrame(e);
270
+ }
271
+ if (!disableScrollOnKeyboardHide || keyboardWillAppear.value) {
272
+ maybeScroll(e.height);
273
+ }
274
+ },
275
+ onEnd: function onEnd(e) {
276
+ "worklet";
277
+ if (e.height === 0) {
278
+ removeGhostPadding(e.height);
279
+ }
280
+ keyboardHeight.value = e.height;
281
+ scrollPosition.value = position.value;
282
+ if (e.height === 0) {
283
+ selectionUpdatedSinceHide.value = false;
284
+ } else if (keyboardWillAppear.value) {
285
+ pendingSelectionForFocus.value = false;
286
+ }
287
+ syncKeyboardFrame(e);
288
+ }
289
+ }, [
290
+ mode,
291
+ maybeScroll,
292
+ removeGhostPadding,
293
+ disableScrollOnKeyboardHide,
294
+ syncKeyboardFrame
295
+ ]);
296
+ var synchronize = (0, import_react.useCallback)(async function() {
297
+ await update();
298
+ requestAnimationFrame(function() {
299
+ (0, import_react_native_reanimated.runOnUI)(function() {
300
+ "worklet";
301
+ scrollFromCurrentPosition();
302
+ })();
303
+ });
304
+ }, [update, scrollFromCurrentPosition]);
305
+ (0, import_react.useImperativeHandle)(ref, function() {
306
+ var scrollView = scrollViewRef.current;
307
+ if (scrollView) {
308
+ var scrollViewWithMethods = scrollView;
309
+ scrollViewWithMethods.assureFocusedInputVisible = function() {
310
+ synchronize();
311
+ };
312
+ return scrollViewWithMethods;
313
+ }
314
+ return { assureFocusedInputVisible: function assureFocusedInputVisible() {
315
+ synchronize();
316
+ } };
317
+ }, [synchronize]);
318
+ (0, import_react.useEffect)(function() {
319
+ synchronize();
320
+ }, [bottomOffset]);
321
+ (0, import_reanimated.useAnimatedReaction)(function() {
322
+ return input.value;
323
+ }, function(current, previous) {
324
+ if ((current === null || current === void 0 ? void 0 : current.target) === (previous === null || previous === void 0 ? void 0 : previous.target) && (current === null || current === void 0 ? void 0 : current.layout.height) !== (previous === null || previous === void 0 ? void 0 : previous.layout.height)) {
325
+ scrollFromCurrentPosition();
326
+ }
327
+ }, []);
328
+ var padding = (0, import_reanimated.useDerivedValue)(function() {
329
+ return enabled && mode === "insets" ? currentKeyboardFrameHeight.value : 0;
330
+ }, [enabled, mode]);
331
+ var layoutSpacerStyle = (0, import_reanimated.useAnimatedStyle)(function() {
332
+ return enabled && mode === "layout" ? { paddingBottom: currentKeyboardFrameHeight.value + 1 } : {};
333
+ }, [enabled, mode]);
334
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ScrollViewWithBottomPadding.default, {
335
+ ref: onRef,
336
+ ...rest,
337
+ bottomPadding: padding,
338
+ scrollEventThrottle: 16,
339
+ ScrollViewComponent,
340
+ onLayout: onScrollViewLayout,
341
+ children: [children, enabled && mode === "layout" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native_reanimated.default.View, { style: layoutSpacerStyle })]
342
+ });
343
+ });
344
+ var KeyboardAwareScrollView_default = KeyboardAwareScrollView;
345
+
346
+ //# sourceMappingURL=index.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.native.js","names":[],"sources":["cjs/keyboard/components/KeyboardAwareScrollView/index.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar KeyboardAwareScrollView_exports = {};\n__export(KeyboardAwareScrollView_exports, {\n default: () => KeyboardAwareScrollView_default\n});\nmodule.exports = __toCommonJS(KeyboardAwareScrollView_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_react = __toESM(require(\"react\"), 1);\nvar import_react_native_reanimated = __toESM(require(\"react-native-reanimated\"), 1);\nvar import_hooks = require(\"../../hooks\");\nvar import_reanimated = require(\"../../reanimated\");\nvar import_findNodeHandle = require(\"../../utils/findNodeHandle\");\nvar import_useCombinedRef = __toESM(require(\"../hooks/useCombinedRef\"), 1);\nvar import_useScrollState = __toESM(require(\"../hooks/useScrollState\"), 1);\nvar import_ScrollViewWithBottomPadding = __toESM(require(\"../ScrollViewWithBottomPadding\"), 1);\nvar import_useSmoothKeyboardHandler = require(\"./useSmoothKeyboardHandler\");\nvar import_utils = require(\"./utils\");\nvar KeyboardAwareScrollView = /* @__PURE__ */ (0, import_react.forwardRef)(function(param, ref) {\n var { children, onLayout, bottomOffset = 0, disableScrollOnKeyboardHide = false, enabled = true, extraKeyboardSpace = 0, mode = \"insets\", ScrollViewComponent = import_react_native_reanimated.default.ScrollView, snapToOffsets, ...rest } = param;\n var scrollViewAnimatedRef = (0, import_react_native_reanimated.useAnimatedRef)();\n var scrollViewRef = import_react.default.useRef(null);\n var onRef = (0, import_useCombinedRef.default)(scrollViewAnimatedRef, scrollViewRef);\n var scrollViewTarget = (0, import_react_native_reanimated.useSharedValue)(null);\n var scrollPosition = (0, import_react_native_reanimated.useSharedValue)(0);\n var { offset: position, layout: scrollViewLayout, size: scrollViewContentSize } = (0, import_useScrollState.default)(scrollViewAnimatedRef);\n var currentKeyboardFrameHeight = (0, import_react_native_reanimated.useSharedValue)(0);\n var keyboardHeight = (0, import_react_native_reanimated.useSharedValue)(0);\n var keyboardWillAppear = (0, import_react_native_reanimated.useSharedValue)(false);\n var keyboardWillHide = (0, import_react_native_reanimated.useSharedValue)(false);\n var tag = (0, import_react_native_reanimated.useSharedValue)(-1);\n var initialKeyboardSize = (0, import_react_native_reanimated.useSharedValue)(0);\n var scrollBeforeKeyboardMovement = (0, import_react_native_reanimated.useSharedValue)(0);\n var { input, update } = (0, import_hooks.useReanimatedFocusedInput)();\n var layout = (0, import_react_native_reanimated.useSharedValue)(null);\n var lastSelection = (0, import_react_native_reanimated.useSharedValue)(null);\n var ghostViewSpace = (0, import_react_native_reanimated.useSharedValue)(-1);\n var pendingSelectionForFocus = (0, import_react_native_reanimated.useSharedValue)(false);\n var selectionUpdatedSinceHide = (0, import_react_native_reanimated.useSharedValue)(false);\n var { height } = (0, import_hooks.useWindowDimensions)();\n var syncScrollViewTarget = (0, import_react.useCallback)(function() {\n scrollViewTarget.value = (0, import_findNodeHandle.findNodeHandle)(scrollViewAnimatedRef.current);\n }, []);\n var onScrollViewLayout = (0, import_react.useCallback)(function(e) {\n syncScrollViewTarget();\n onLayout === null || onLayout === void 0 ? void 0 : onLayout(e);\n }, [\n onLayout,\n syncScrollViewTarget\n ]);\n (0, import_react.useEffect)(function() {\n syncScrollViewTarget();\n }, [\n syncScrollViewTarget\n ]);\n var maybeScroll = (0, import_react.useCallback)(function(e) {\n \"worklet\";\n var animated = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;\n var _layout_value, _layout_value1, _layout_value2, _layout_value3;\n if (!enabled) {\n return 0;\n }\n if (((_layout_value = layout.value) === null || _layout_value === void 0 ? void 0 : _layout_value.parentScrollViewTarget) !== scrollViewTarget.value) {\n return 0;\n }\n var visibleRect = height - keyboardHeight.value;\n var absoluteY = ((_layout_value1 = layout.value) === null || _layout_value1 === void 0 ? void 0 : _layout_value1.layout.absoluteY) || 0;\n var inputHeight = ((_layout_value2 = layout.value) === null || _layout_value2 === void 0 ? void 0 : _layout_value2.layout.height) || 0;\n var point = absoluteY + inputHeight;\n if (visibleRect - point <= bottomOffset) {\n var relativeScrollTo = keyboardHeight.value - (height - point) + bottomOffset;\n var interpolatedScrollTo = (0, import_react_native_reanimated.interpolate)(e, [\n initialKeyboardSize.value,\n keyboardHeight.value\n ], [\n 0,\n (0, import_utils.scrollDistanceWithRespectToSnapPoints)(relativeScrollTo + scrollPosition.value, snapToOffsets) - scrollPosition.value\n ]);\n var targetScrollY = Math.max(interpolatedScrollTo, 0) + scrollPosition.value;\n (0, import_react_native_reanimated.scrollTo)(scrollViewAnimatedRef, 0, targetScrollY, animated);\n return interpolatedScrollTo;\n }\n var contentY = ((_layout_value3 = layout.value) === null || _layout_value3 === void 0 ? void 0 : _layout_value3.layout.contentY) || 0;\n if (contentY + inputHeight < scrollPosition.value) {\n var positionOnScreen = visibleRect - bottomOffset;\n var topOfScreen = scrollPosition.value + point;\n (0, import_react_native_reanimated.scrollTo)(scrollViewAnimatedRef, 0, topOfScreen - positionOnScreen, animated);\n }\n return 0;\n }, [\n bottomOffset,\n enabled,\n height,\n snapToOffsets\n ]);\n var removeGhostPadding = (0, import_react.useCallback)(function(e) {\n \"worklet\";\n if (mode === \"layout\") {\n return false;\n }\n if (enabled && keyboardWillHide.value && keyboardHeight.value > 0 && ghostViewSpace.value > 0) {\n (0, import_react_native_reanimated.scrollTo)(scrollViewAnimatedRef, 0, scrollPosition.value - (0, import_react_native_reanimated.interpolate)(e, [\n initialKeyboardSize.value,\n keyboardHeight.value\n ], [\n ghostViewSpace.value,\n 0\n ]), false);\n return true;\n }\n return false;\n }, [\n enabled,\n mode\n ]);\n var performScrollWithPositionRestoration = (0, import_react.useCallback)(function(newPosition) {\n \"worklet\";\n var prevScroll = scrollPosition.value;\n scrollPosition.value = newPosition;\n maybeScroll(keyboardHeight.value, true);\n scrollPosition.value = prevScroll;\n }, [\n scrollPosition,\n keyboardHeight,\n maybeScroll\n ]);\n var syncKeyboardFrame = (0, import_react.useCallback)(function(e) {\n \"worklet\";\n var keyboardFrame = (0, import_react_native_reanimated.interpolate)(e.height, [\n 0,\n keyboardHeight.value\n ], [\n 0,\n keyboardHeight.value + extraKeyboardSpace\n ]);\n currentKeyboardFrameHeight.value = keyboardFrame;\n }, [\n extraKeyboardSpace\n ]);\n var updateLayoutFromSelection = (0, import_react.useCallback)(function() {\n \"worklet\";\n var _lastSelection_value, _input_value;\n var customHeight = (_lastSelection_value = lastSelection.value) === null || _lastSelection_value === void 0 ? void 0 : _lastSelection_value.selection.end.y;\n if (!((_input_value = input.value) === null || _input_value === void 0 ? void 0 : _input_value.layout) || customHeight === void 0) {\n return false;\n }\n layout.value = {\n ...input.value,\n layout: {\n ...input.value.layout,\n // when we have multiline input with limited amount of lines, then custom height can be very big\n // so we clamp it to max input height\n height: (0, import_react_native_reanimated.clamp)(customHeight, 0, input.value.layout.height)\n }\n };\n return true;\n }, [\n input,\n lastSelection,\n layout\n ]);\n var scrollFromCurrentPosition = (0, import_react.useCallback)(function() {\n \"worklet\";\n var prevLayout = layout.value;\n if (!updateLayoutFromSelection()) {\n return;\n }\n performScrollWithPositionRestoration(position.value);\n layout.value = prevLayout;\n }, [\n performScrollWithPositionRestoration\n ]);\n var onChangeText = (0, import_react.useCallback)(function() {\n \"worklet\";\n scrollFromCurrentPosition();\n }, [\n scrollFromCurrentPosition\n ]);\n var onChangeTextHandler = (0, import_react.useMemo)(function() {\n return (0, import_utils.debounce)(onChangeText, 200);\n }, [\n onChangeText\n ]);\n var onSelectionChange = (0, import_react.useCallback)(function(e) {\n \"worklet\";\n var _lastSelection_value, _lastSelection_value1;\n var lastTarget = (_lastSelection_value = lastSelection.value) === null || _lastSelection_value === void 0 ? void 0 : _lastSelection_value.target;\n var latestSelection = (_lastSelection_value1 = lastSelection.value) === null || _lastSelection_value1 === void 0 ? void 0 : _lastSelection_value1.selection;\n lastSelection.value = e;\n selectionUpdatedSinceHide.value = true;\n if (e.target !== lastTarget || pendingSelectionForFocus.value) {\n if (pendingSelectionForFocus.value) {\n pendingSelectionForFocus.value = false;\n updateLayoutFromSelection();\n if (!keyboardWillAppear.value && keyboardHeight.value > 0) {\n position.value += maybeScroll(keyboardHeight.value, true);\n }\n }\n return;\n }\n if (e.selection.end.position === e.selection.start.position && (latestSelection === null || latestSelection === void 0 ? void 0 : latestSelection.end.y) !== e.selection.end.y) {\n return scrollFromCurrentPosition();\n }\n if (e.selection.start.position !== e.selection.end.position) {\n return scrollFromCurrentPosition();\n }\n onChangeTextHandler();\n }, [\n scrollFromCurrentPosition,\n onChangeTextHandler,\n updateLayoutFromSelection,\n maybeScroll\n ]);\n (0, import_hooks.useFocusedInputHandler)({\n onSelectionChange\n }, [\n onSelectionChange\n ]);\n (0, import_useSmoothKeyboardHandler.useSmoothKeyboardHandler)({\n onStart: function onStart(e) {\n \"worklet\";\n var keyboardWillChangeSize = keyboardHeight.value !== e.height && e.height > 0;\n var hideWasInterrupted = keyboardWillHide.value && e.height > 0;\n keyboardWillAppear.value = e.height > 0 && keyboardHeight.value === 0;\n keyboardWillHide.value = e.height === 0;\n var focusWasChanged = tag.value !== e.target && e.target !== -1 || keyboardWillChangeSize;\n if (keyboardWillChangeSize) {\n initialKeyboardSize.value = keyboardHeight.value;\n }\n if (keyboardWillHide.value) {\n initialKeyboardSize.value = 0;\n scrollPosition.value = scrollBeforeKeyboardMovement.value;\n pendingSelectionForFocus.value = false;\n }\n if (keyboardWillAppear.value || keyboardWillChangeSize || focusWasChanged) {\n scrollPosition.value = position.value;\n keyboardHeight.value = e.height;\n if (mode === \"insets\") {\n syncKeyboardFrame(e);\n }\n }\n if (focusWasChanged) {\n var _lastSelection_value;\n tag.value = e.target;\n if (((_lastSelection_value = lastSelection.value) === null || _lastSelection_value === void 0 ? void 0 : _lastSelection_value.target) === e.target && selectionUpdatedSinceHide.value) {\n updateLayoutFromSelection();\n pendingSelectionForFocus.value = false;\n } else {\n var _lastSelection_value1;\n if (((_lastSelection_value1 = lastSelection.value) === null || _lastSelection_value1 === void 0 ? void 0 : _lastSelection_value1.target) === e.target) {\n updateLayoutFromSelection();\n } else if (input.value) {\n layout.value = input.value;\n }\n pendingSelectionForFocus.value = true;\n }\n scrollBeforeKeyboardMovement.value = position.value;\n }\n if (focusWasChanged && !keyboardWillAppear.value) {\n if (!pendingSelectionForFocus.value) {\n position.value += maybeScroll(e.height, true);\n }\n }\n if (mode === \"insets\") {\n ghostViewSpace.value = position.value - Math.max(scrollViewContentSize.value.height - scrollViewLayout.value.height, 0);\n if (ghostViewSpace.value > 0) {\n scrollPosition.value = position.value;\n }\n }\n if (hideWasInterrupted && !focusWasChanged) {\n scrollPosition.value = scrollBeforeKeyboardMovement.value;\n }\n },\n onMove: function onMove(e) {\n \"worklet\";\n var _lastSelection_value;\n if (pendingSelectionForFocus.value && ((_lastSelection_value = lastSelection.value) === null || _lastSelection_value === void 0 ? void 0 : _lastSelection_value.target) !== tag.value) {\n return;\n }\n if (removeGhostPadding(e.height)) {\n return;\n }\n if (mode === \"layout\") {\n syncKeyboardFrame(e);\n }\n if (!disableScrollOnKeyboardHide || keyboardWillAppear.value) {\n maybeScroll(e.height);\n }\n },\n onEnd: function onEnd(e) {\n \"worklet\";\n if (e.height === 0) {\n removeGhostPadding(e.height);\n }\n keyboardHeight.value = e.height;\n scrollPosition.value = position.value;\n if (e.height === 0) {\n selectionUpdatedSinceHide.value = false;\n } else if (keyboardWillAppear.value) {\n pendingSelectionForFocus.value = false;\n }\n syncKeyboardFrame(e);\n }\n }, [\n mode,\n maybeScroll,\n removeGhostPadding,\n disableScrollOnKeyboardHide,\n syncKeyboardFrame\n ]);\n var synchronize = (0, import_react.useCallback)(async function() {\n await update();\n requestAnimationFrame(function() {\n (0, import_react_native_reanimated.runOnUI)(function() {\n \"worklet\";\n scrollFromCurrentPosition();\n })();\n });\n }, [\n update,\n scrollFromCurrentPosition\n ]);\n (0, import_react.useImperativeHandle)(ref, function() {\n var scrollView = scrollViewRef.current;\n if (scrollView) {\n var scrollViewWithMethods = scrollView;\n scrollViewWithMethods.assureFocusedInputVisible = function() {\n synchronize();\n };\n return scrollViewWithMethods;\n }\n return {\n assureFocusedInputVisible: function assureFocusedInputVisible() {\n synchronize();\n }\n };\n }, [\n synchronize\n ]);\n (0, import_react.useEffect)(function() {\n synchronize();\n }, [\n bottomOffset\n ]);\n (0, import_reanimated.useAnimatedReaction)(function() {\n return input.value;\n }, function(current, previous) {\n if ((current === null || current === void 0 ? void 0 : current.target) === (previous === null || previous === void 0 ? void 0 : previous.target) && (current === null || current === void 0 ? void 0 : current.layout.height) !== (previous === null || previous === void 0 ? void 0 : previous.layout.height)) {\n scrollFromCurrentPosition();\n }\n }, []);\n var padding = (0, import_reanimated.useDerivedValue)(function() {\n return enabled && mode === \"insets\" ? currentKeyboardFrameHeight.value : 0;\n }, [\n enabled,\n mode\n ]);\n var layoutSpacerStyle = (0, import_reanimated.useAnimatedStyle)(function() {\n return enabled && mode === \"layout\" ? {\n paddingBottom: currentKeyboardFrameHeight.value + 1\n } : {};\n }, [\n enabled,\n mode\n ]);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ScrollViewWithBottomPadding.default, {\n ref: onRef,\n ...rest,\n bottomPadding: padding,\n scrollEventThrottle: 16,\n ScrollViewComponent,\n onLayout: onScrollViewLayout,\n children: [\n children,\n enabled && mode === \"layout\" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native_reanimated.default.View, {\n style: layoutSpacerStyle\n })\n ]\n });\n});\nvar KeyboardAwareScrollView_default = KeyboardAwareScrollView;\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,O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a,UAAS,CAAE,WAAW;EACrC,YAAY;CACd,GAAG,CACD,YACF,CAAC;CACD,CAAC,GAAG,kBAAkB,oBAAmB,CAAE,WAAW;EACpD,OAAO,MAAM;CACf,GAAG,SAAS,SAAS,UAAU;EAC7B,KAAK,YAAY,QAAQ,YAAY,KAAK,IAAI,KAAK,IAAI,QAAQ,aAAa,aAAa,QAAQ,aAAa,KAAK,IAAI,KAAK,IAAI,SAAS,YAAY,YAAY,QAAQ,YAAY,KAAK,IAAI,KAAK,IAAI,QAAQ,OAAO,aAAa,aAAa,QAAQ,aAAa,KAAK,IAAI,KAAK,IAAI,SAAS,OAAO,SAAS;GAC9S,0BAA0B;EAC5B;CACF,GAAG,CAAC,CAAC;CACL,IAAI,WAAW,GAAG,kBAAkB,gBAAe,CAAE,WAAW;EAC9D,OAAO,WAAW,SAAS,WAAW,2BAA2B,QAAQ;CAC3E,GAAG,CACD,SACA,IACF,CAAC;CACD,IAAI,qBAAqB,GAAG,kBAAkB,iBAAgB,CAAE,WAAW;EACzE,OAAO,WAAW,SAAS,WAAW,EACpC,eAAe,2BAA2B,QAAQ,EACpD,IAAI,CAAC;CACP,GAAG,CACD,SACA,IACF,CAAC;CACD,OAAuB,iBAAC,GAAG,mBAAmB,KAAI,CAAE,mCAAmC,SAAS;EAC9F,KAAK;EACL,GAAG;EACH,eAAe;EACf,qBAAqB;EACrB;EACA,UAAU;EACV,UAAU,CACR,UACA,WAAW,SAAS,YAA4B,iBAAC,GAAG,mBAAmB,IAAG,CAAE,+BAA+B,QAAQ,MAAM,EACvH,OAAO,kBACT,CAAC,CACH;CACF,CAAC;AACH,CAAC;AACD,IAAI,kCAAkC"}
@@ -0,0 +1,17 @@
1
+ // dist/cjs/keyboard/components/KeyboardAwareScrollView/types.js
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
9
+ get: () => from[key],
10
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
11
+ });
12
+ }
13
+ return to;
14
+ };
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
+ var types_exports = {};
17
+ module.exports = __toCommonJS(types_exports);
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ // dist/cjs/keyboard/components/KeyboardAwareScrollView/types.native.js
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
11
+ get: () => from[key],
12
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
13
+ });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var types_exports = {};
19
+ module.exports = __toCommonJS(types_exports);
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ // dist/cjs/keyboard/components/KeyboardAwareScrollView/types.native.js
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
11
+ get: () => from[key],
12
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
13
+ });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var types_exports = {};
19
+ module.exports = __toCommonJS(types_exports);
20
+
21
+ //# sourceMappingURL=types.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.native.js","names":[],"sources":["cjs/keyboard/components/KeyboardAwareScrollView/types.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar types_exports = {};\nmodule.exports = __toCommonJS(types_exports);\n//# sourceMappingURL=types.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,OAAO,UAAU,aAAa,aAAa"}
@@ -0,0 +1,100 @@
1
+ // dist/cjs/keyboard/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.js
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all) __defProp(target, name, {
8
+ get: all[name],
9
+ enumerable: true
10
+ });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
15
+ get: () => from[key],
16
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
+ });
18
+ }
19
+ return to;
20
+ };
21
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
22
+ var useSmoothKeyboardHandler_exports = {};
23
+ __export(useSmoothKeyboardHandler_exports, { useSmoothKeyboardHandler: () => useSmoothKeyboardHandler });
24
+ module.exports = __toCommonJS(useSmoothKeyboardHandler_exports);
25
+ var import_react = require("react");
26
+ var import_react_native = require("react-native-web");
27
+ var import_react_native_reanimated = require("react-native-reanimated");
28
+ var import_hooks = require("../../hooks/index.cjs");
29
+ var import_reanimated = require("../../reanimated.cjs");
30
+ const IS_ANDROID_ELEVEN_OR_HIGHER = import_react_native.Platform.OS === "android" && import_react_native.Platform.Version >= 30;
31
+ const IS_ANDROID_ELEVEN_OR_HIGHER_OR_IOS = IS_ANDROID_ELEVEN_OR_HIGHER || import_react_native.Platform.OS === "ios";
32
+ const TELEGRAM_ANDROID_TIMING_CONFIG = {
33
+ duration: 250,
34
+ easing: import_react_native_reanimated.Easing.bezier(.19919472913616398, .010644531250000006, .27920937042459737, .91025390625)
35
+ };
36
+ const useSmoothKeyboardHandler = (unstableHandler, deps) => {
37
+ const handler = (0, import_react.useMemo)(() => unstableHandler, deps ?? []);
38
+ const target = (0, import_react_native_reanimated.useSharedValue)(-1);
39
+ const height = (0, import_react_native_reanimated.useSharedValue)(0);
40
+ const persistedHeight = (0, import_react_native_reanimated.useSharedValue)(0);
41
+ const animatedKeyboardHeight = (0, import_react_native_reanimated.useSharedValue)(0);
42
+ (0, import_reanimated.useAnimatedReaction)(() => {
43
+ if (IS_ANDROID_ELEVEN_OR_HIGHER_OR_IOS) {
44
+ return;
45
+ }
46
+ if (persistedHeight.value === 0) {
47
+ return;
48
+ }
49
+ const event = {
50
+ duration: TELEGRAM_ANDROID_TIMING_CONFIG.duration,
51
+ target: target.value,
52
+ height: animatedKeyboardHeight.value,
53
+ progress: animatedKeyboardHeight.value / persistedHeight.value
54
+ };
55
+ return event;
56
+ }, (evt, previous) => {
57
+ if (!evt || evt.height === previous?.height && evt.target === previous?.target && evt.progress === previous?.progress) {
58
+ return;
59
+ }
60
+ handler.onMove?.(evt);
61
+ if (evt.height === height.value) {
62
+ handler.onEnd?.(evt);
63
+ persistedHeight.value = height.value;
64
+ }
65
+ }, deps ? [...deps] : deps);
66
+ (0, import_hooks.useKeyboardHandler)({
67
+ onStart: (e) => {
68
+ "worklet";
69
+ if (!IS_ANDROID_ELEVEN_OR_HIGHER_OR_IOS && e.height === persistedHeight.value) {
70
+ handler.onStart?.(e);
71
+ handler.onEnd?.(e);
72
+ return;
73
+ }
74
+ target.value = e.target;
75
+ height.value = e.height;
76
+ if (e.height > 0) {
77
+ persistedHeight.value = e.height;
78
+ }
79
+ if (!IS_ANDROID_ELEVEN_OR_HIGHER_OR_IOS) {
80
+ animatedKeyboardHeight.value = (0, import_react_native_reanimated.withTiming)(e.height, TELEGRAM_ANDROID_TIMING_CONFIG);
81
+ }
82
+ handler.onStart?.({
83
+ ...e,
84
+ duration: IS_ANDROID_ELEVEN_OR_HIGHER_OR_IOS ? e.duration : TELEGRAM_ANDROID_TIMING_CONFIG.duration
85
+ });
86
+ },
87
+ onMove: (e) => {
88
+ "worklet";
89
+ if (IS_ANDROID_ELEVEN_OR_HIGHER_OR_IOS) {
90
+ handler.onMove?.(e);
91
+ }
92
+ },
93
+ onEnd: (e) => {
94
+ "worklet";
95
+ if (IS_ANDROID_ELEVEN_OR_HIGHER_OR_IOS) {
96
+ handler.onEnd?.(e);
97
+ }
98
+ }
99
+ }, deps);
100
+ };