one 2.19.0 → 2.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/One.podspec +2 -2
- package/android/build.gradle +2 -0
- package/android/portal/CMakeLists.txt +4 -1
- package/android/portal/react/renderer/components/OneNativeSpec/ComponentDescriptors.h +1 -0
- package/android/src/main/java/com/margelo/nitro/one/HybridOneKeyboard.kt +110 -0
- package/android/src/main/java/dev/onejs/keyboard/ClippingScrollViewDecoratorViewManager.kt +44 -0
- package/android/src/main/java/dev/onejs/keyboard/KeyboardBackgroundViewManager.kt +19 -0
- package/android/src/main/java/dev/onejs/keyboard/KeyboardControllerViewManager.kt +85 -0
- package/android/src/main/java/dev/onejs/keyboard/KeyboardGestureAreaViewManager.kt +65 -0
- package/android/src/main/java/dev/onejs/keyboard/KeyboardToolbarGroupViewManager.kt +19 -0
- package/android/src/main/java/dev/onejs/keyboard/LICENSE +21 -0
- package/android/src/main/java/dev/onejs/keyboard/OneKeyboardBridge.kt +9 -0
- package/android/src/main/java/dev/onejs/keyboard/OverKeyboardViewManager.kt +49 -0
- package/android/src/main/java/dev/onejs/keyboard/constants/Keyboard.kt +7 -0
- package/android/src/main/java/dev/onejs/keyboard/constants/UIThread.kt +9 -0
- package/android/src/main/java/dev/onejs/keyboard/events/FocusedInputLayoutChangedEvent.kt +52 -0
- package/android/src/main/java/dev/onejs/keyboard/events/FocusedInputSelectionChangedEvent.kt +56 -0
- package/android/src/main/java/dev/onejs/keyboard/events/FocusedInputTextChangedEvent.kt +25 -0
- package/android/src/main/java/dev/onejs/keyboard/events/KeyboardTransitionEvent.kt +44 -0
- package/android/src/main/java/dev/onejs/keyboard/extensions/Context.kt +58 -0
- package/android/src/main/java/dev/onejs/keyboard/extensions/EditText.kt +262 -0
- package/android/src/main/java/dev/onejs/keyboard/extensions/Float.kt +8 -0
- package/android/src/main/java/dev/onejs/keyboard/extensions/ReactContext.kt +37 -0
- package/android/src/main/java/dev/onejs/keyboard/extensions/ScrollView.kt +65 -0
- package/android/src/main/java/dev/onejs/keyboard/extensions/SoftInputMode.kt +13 -0
- package/android/src/main/java/dev/onejs/keyboard/extensions/ThemedReactContext.kt +56 -0
- package/android/src/main/java/dev/onejs/keyboard/extensions/View.kt +91 -0
- package/android/src/main/java/dev/onejs/keyboard/extensions/ViewGroup.kt +10 -0
- package/android/src/main/java/dev/onejs/keyboard/extensions/WindowInsetsAnimationCompat.kt +7 -0
- package/android/src/main/java/dev/onejs/keyboard/interactive/InteractiveKeyboardProvider.kt +5 -0
- package/android/src/main/java/dev/onejs/keyboard/interactive/KeyboardAnimationController.kt +407 -0
- package/android/src/main/java/dev/onejs/keyboard/interactive/interpolators/Interpolator.kt +20 -0
- package/android/src/main/java/dev/onejs/keyboard/interactive/interpolators/IosInterpolator.kt +21 -0
- package/android/src/main/java/dev/onejs/keyboard/interactive/interpolators/LinearInterpolator.kt +10 -0
- package/android/src/main/java/dev/onejs/keyboard/listeners/FocusedInputObserver.kt +200 -0
- package/android/src/main/java/dev/onejs/keyboard/listeners/KeyboardAnimationCallback.kt +505 -0
- package/android/src/main/java/dev/onejs/keyboard/listeners/WindowDimensionListener.kt +76 -0
- package/android/src/main/java/dev/onejs/keyboard/log/Logger.kt +28 -0
- package/android/src/main/java/dev/onejs/keyboard/managers/ClippingScrollViewDecoratorViewManagerImpl.kt +13 -0
- package/android/src/main/java/dev/onejs/keyboard/managers/KeyboardBackgroundViewManagerImpl.kt +13 -0
- package/android/src/main/java/dev/onejs/keyboard/managers/KeyboardControllerViewManagerImpl.kt +96 -0
- package/android/src/main/java/dev/onejs/keyboard/managers/KeyboardGestureAreaViewManagerImpl.kt +41 -0
- package/android/src/main/java/dev/onejs/keyboard/managers/KeyboardToolbarGroupViewManagerImpl.kt +13 -0
- package/android/src/main/java/dev/onejs/keyboard/managers/OverKeyboardViewManagerImpl.kt +23 -0
- package/android/src/main/java/dev/onejs/keyboard/modal/ModalAttachedWatcher.kt +116 -0
- package/android/src/main/java/dev/onejs/keyboard/modules/KeyboardControllerModuleImpl.kt +139 -0
- package/android/src/main/java/dev/onejs/keyboard/traversal/FocusedInputHolder.kt +19 -0
- package/android/src/main/java/dev/onejs/keyboard/traversal/ViewHierarchyNavigator.kt +130 -0
- package/android/src/main/java/dev/onejs/keyboard/views/ClippingScrollViewDecoratorView.kt +241 -0
- package/android/src/main/java/dev/onejs/keyboard/views/EdgeToEdgeReactViewGroup.kt +225 -0
- package/android/src/main/java/dev/onejs/keyboard/views/KeyboardGestureAreaReactViewGroup.kt +247 -0
- package/android/src/main/java/dev/onejs/keyboard/views/KeyboardToolbarGroupReactViewGroup.kt +13 -0
- package/android/src/main/java/dev/onejs/keyboard/views/background/KeyboardBackgroundViewGroup.kt +34 -0
- package/android/src/main/java/dev/onejs/keyboard/views/background/Skins.kt +91 -0
- package/android/src/main/java/dev/onejs/keyboard/views/overlay/JSPointerDispatcherCompat.kt +74 -0
- package/android/src/main/java/dev/onejs/keyboard/views/overlay/OverKeyboardHostShadowNode.kt +33 -0
- package/android/src/main/java/dev/onejs/keyboard/views/overlay/OverKeyboardViewGroup.kt +249 -0
- package/android/src/main/java/dev/onejs/keyboard/views/overlay/RootViewCompat.kt +18 -0
- package/android/src/main/java/dev/onejs/one/OnePackage.kt +12 -0
- package/android/src/main/res/values/one_keyboard_attrs.xml +7 -0
- package/android/src/main/res/values/one_keyboard_skins.xml +35 -0
- package/android/src/main/res/values-v29/one_keyboard_skins.xml +5 -0
- package/android/src/main/res/values-v30/one_keyboard_skins.xml +17 -0
- package/android/src/main/res/values-v33/one_keyboard_skins.xml +14 -0
- package/android/src/main/res/values-v34/one_keyboard_skins.xml +18 -0
- package/android/src/main/res/values-v35/one_keyboard_skins.xml +10 -0
- package/cpp/OneOverKeyboardViewComponentDescriptor.h +31 -0
- package/cpp/OneOverKeyboardViewShadowNode.cpp +7 -0
- package/cpp/OneOverKeyboardViewShadowNode.h +23 -0
- package/cpp/OneOverKeyboardViewState.cpp +12 -0
- package/cpp/OneOverKeyboardViewState.h +43 -0
- package/dist/cjs/keyboard/animated.cjs +154 -0
- package/dist/cjs/keyboard/animated.native.cjs +168 -0
- package/dist/cjs/keyboard/animated.native.js +170 -0
- package/dist/cjs/keyboard/animated.native.js.map +1 -0
- package/dist/cjs/keyboard/architecture.cjs +25 -0
- package/dist/cjs/keyboard/architecture.native.cjs +27 -0
- package/dist/cjs/keyboard/architecture.native.js +29 -0
- package/dist/cjs/keyboard/architecture.native.js.map +1 -0
- package/dist/cjs/keyboard/bindings.cjs +65 -0
- package/dist/cjs/keyboard/bindings.native.cjs +147 -0
- package/dist/cjs/keyboard/bindings.native.js +149 -0
- package/dist/cjs/keyboard/bindings.native.js.map +1 -0
- package/dist/cjs/keyboard/compat.cjs +63 -0
- package/dist/cjs/keyboard/compat.native.cjs +65 -0
- package/dist/cjs/keyboard/compat.native.js +67 -0
- package/dist/cjs/keyboard/compat.native.js.map +1 -0
- package/dist/cjs/keyboard/components/KeyboardAvoidingView/hooks.cjs +144 -0
- package/dist/cjs/keyboard/components/KeyboardAvoidingView/hooks.native.cjs +146 -0
- package/dist/cjs/keyboard/components/KeyboardAvoidingView/hooks.native.js +148 -0
- package/dist/cjs/keyboard/components/KeyboardAvoidingView/hooks.native.js.map +1 -0
- package/dist/cjs/keyboard/components/KeyboardAvoidingView/index.cjs +156 -0
- package/dist/cjs/keyboard/components/KeyboardAvoidingView/index.native.cjs +173 -0
- package/dist/cjs/keyboard/components/KeyboardAvoidingView/index.native.js +175 -0
- package/dist/cjs/keyboard/components/KeyboardAvoidingView/index.native.js.map +1 -0
- package/dist/cjs/keyboard/components/KeyboardAwareScrollView/index.cjs +326 -0
- package/dist/cjs/keyboard/components/KeyboardAwareScrollView/index.native.cjs +344 -0
- package/dist/cjs/keyboard/components/KeyboardAwareScrollView/index.native.js +346 -0
- package/dist/cjs/keyboard/components/KeyboardAwareScrollView/index.native.js.map +1 -0
- package/dist/cjs/keyboard/components/KeyboardAwareScrollView/types.cjs +17 -0
- package/dist/cjs/keyboard/components/KeyboardAwareScrollView/types.native.cjs +19 -0
- package/dist/cjs/keyboard/components/KeyboardAwareScrollView/types.native.js +21 -0
- package/dist/cjs/keyboard/components/KeyboardAwareScrollView/types.native.js.map +1 -0
- package/dist/cjs/keyboard/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.cjs +100 -0
- package/dist/cjs/keyboard/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.native.cjs +110 -0
- package/dist/cjs/keyboard/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.native.js +112 -0
- package/dist/cjs/keyboard/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.native.js.map +1 -0
- package/dist/cjs/keyboard/components/KeyboardAwareScrollView/utils.cjs +50 -0
- package/dist/cjs/keyboard/components/KeyboardAwareScrollView/utils.native.cjs +58 -0
- package/dist/cjs/keyboard/components/KeyboardAwareScrollView/utils.native.js +60 -0
- package/dist/cjs/keyboard/components/KeyboardAwareScrollView/utils.native.js.map +1 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/hooks.cjs +25 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/hooks.native.cjs +27 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/hooks.native.js +29 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/hooks.native.js.map +1 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/index.cjs +118 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/index.native.cjs +133 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/index.native.js +135 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/index.native.js.map +1 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/types.cjs +17 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/types.native.cjs +19 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/types.native.js +21 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/types.native.js.map +1 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/useChatKeyboard/helpers.cjs +93 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/useChatKeyboard/helpers.native.cjs +97 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/useChatKeyboard/helpers.native.js +99 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/useChatKeyboard/helpers.native.js.map +1 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/useChatKeyboard/index.cjs +210 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/useChatKeyboard/index.ios.cjs +145 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/useChatKeyboard/index.ios.js +147 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/useChatKeyboard/index.ios.js.map +1 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/useChatKeyboard/index.native.cjs +212 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/useChatKeyboard/index.native.js +214 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/useChatKeyboard/index.native.js.map +1 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/useChatKeyboard/types.cjs +17 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/useChatKeyboard/types.native.cjs +19 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/useChatKeyboard/types.native.js +21 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/useChatKeyboard/types.native.js.map +1 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/useEndVisible.cjs +52 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/useEndVisible.native.cjs +61 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/useEndVisible.native.js +63 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/useEndVisible.native.js.map +1 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/useExtraContentPadding/index.cjs +92 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/useExtraContentPadding/index.native.cjs +96 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/useExtraContentPadding/index.native.js +98 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/useExtraContentPadding/index.native.js.map +1 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/useFrozenPadding/index.cjs +53 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/useFrozenPadding/index.native.cjs +58 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/useFrozenPadding/index.native.js +60 -0
- package/dist/cjs/keyboard/components/KeyboardChatScrollView/useFrozenPadding/index.native.js.map +1 -0
- package/dist/cjs/keyboard/components/KeyboardEffects/index.cjs +94 -0
- package/dist/cjs/keyboard/components/KeyboardEffects/index.native.cjs +99 -0
- package/dist/cjs/keyboard/components/KeyboardEffects/index.native.js +101 -0
- package/dist/cjs/keyboard/components/KeyboardEffects/index.native.js.map +1 -0
- package/dist/cjs/keyboard/components/KeyboardStickyView/index.cjs +54 -0
- package/dist/cjs/keyboard/components/KeyboardStickyView/index.native.cjs +59 -0
- package/dist/cjs/keyboard/components/KeyboardStickyView/index.native.js +61 -0
- package/dist/cjs/keyboard/components/KeyboardStickyView/index.native.js.map +1 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/Arrow.cjs +82 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/Arrow.native.cjs +99 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/Arrow.native.js +101 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/Arrow.native.js.map +1 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/Button.cjs +71 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/Button.native.cjs +89 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/Button.native.js +91 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/Button.native.js.map +1 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/colors.cjs +38 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/colors.native.cjs +59 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/colors.native.js +61 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/colors.native.js.map +1 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Background.cjs +27 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Background.native.cjs +39 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Background.native.js +41 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Background.native.js.map +1 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Content.cjs +36 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Content.native.cjs +46 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Content.native.js +48 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Content.native.js.map +1 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Done.cjs +75 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Done.native.cjs +84 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Done.native.js +86 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Done.native.js.map +1 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Next.cjs +64 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Next.native.cjs +67 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Next.native.js +69 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Next.native.js.map +1 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Prev.cjs +64 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Prev.native.cjs +68 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Prev.native.js +70 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/Prev.native.js.map +1 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/index.cjs +41 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/index.native.cjs +43 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/index.native.js +45 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/index.native.js.map +1 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/types.cjs +17 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/types.native.cjs +19 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/types.native.js +21 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/compound/components/types.native.js.map +1 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/compound/context.cjs +36 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/compound/context.native.cjs +38 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/compound/context.native.js +40 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/compound/context.native.js.map +1 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/constants.cjs +42 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/constants.native.cjs +44 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/constants.native.js +46 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/constants.native.js.map +1 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/index.cjs +202 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/index.native.cjs +215 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/index.native.js +217 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/index.native.js.map +1 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/types.cjs +17 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/types.native.cjs +19 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/types.native.js +21 -0
- package/dist/cjs/keyboard/components/KeyboardToolbar/types.native.js.map +1 -0
- package/dist/cjs/keyboard/components/ScrollViewWithBottomPadding/index.cjs +127 -0
- package/dist/cjs/keyboard/components/ScrollViewWithBottomPadding/index.native.cjs +134 -0
- package/dist/cjs/keyboard/components/ScrollViewWithBottomPadding/index.native.js +136 -0
- package/dist/cjs/keyboard/components/ScrollViewWithBottomPadding/index.native.js.map +1 -0
- package/dist/cjs/keyboard/components/ScrollViewWithBottomPadding/styles.cjs +30 -0
- package/dist/cjs/keyboard/components/ScrollViewWithBottomPadding/styles.native.cjs +32 -0
- package/dist/cjs/keyboard/components/ScrollViewWithBottomPadding/styles.native.js +34 -0
- package/dist/cjs/keyboard/components/ScrollViewWithBottomPadding/styles.native.js.map +1 -0
- package/dist/cjs/keyboard/components/hooks/useCombinedRef.cjs +40 -0
- package/dist/cjs/keyboard/components/hooks/useCombinedRef.native.cjs +62 -0
- package/dist/cjs/keyboard/components/hooks/useCombinedRef.native.js +64 -0
- package/dist/cjs/keyboard/components/hooks/useCombinedRef.native.js.map +1 -0
- package/dist/cjs/keyboard/components/hooks/useScrollState.cjs +78 -0
- package/dist/cjs/keyboard/components/hooks/useScrollState.native.cjs +81 -0
- package/dist/cjs/keyboard/components/hooks/useScrollState.native.js +83 -0
- package/dist/cjs/keyboard/components/hooks/useScrollState.native.js.map +1 -0
- package/dist/cjs/keyboard/components/index.cjs +44 -0
- package/dist/cjs/keyboard/components/index.native.cjs +46 -0
- package/dist/cjs/keyboard/components/index.native.js +48 -0
- package/dist/cjs/keyboard/components/index.native.js.map +1 -0
- package/dist/cjs/keyboard/components/utils/safeScrollTo.cjs +33 -0
- package/dist/cjs/keyboard/components/utils/safeScrollTo.native.cjs +35 -0
- package/dist/cjs/keyboard/components/utils/safeScrollTo.native.js +37 -0
- package/dist/cjs/keyboard/components/utils/safeScrollTo.native.js.map +1 -0
- package/dist/cjs/keyboard/constants.cjs +48 -0
- package/dist/cjs/keyboard/constants.native.cjs +50 -0
- package/dist/cjs/keyboard/constants.native.js +52 -0
- package/dist/cjs/keyboard/constants.native.js.map +1 -0
- package/dist/cjs/keyboard/context.cjs +65 -0
- package/dist/cjs/keyboard/context.native.cjs +73 -0
- package/dist/cjs/keyboard/context.native.js +75 -0
- package/dist/cjs/keyboard/context.native.js.map +1 -0
- package/dist/cjs/keyboard/hooks/index.cjs +121 -0
- package/dist/cjs/keyboard/hooks/index.native.cjs +135 -0
- package/dist/cjs/keyboard/hooks/index.native.js +137 -0
- package/dist/cjs/keyboard/hooks/index.native.js.map +1 -0
- package/dist/cjs/keyboard/hooks/useKeyboardState/index.cjs +44 -0
- package/dist/cjs/keyboard/hooks/useKeyboardState/index.native.cjs +59 -0
- package/dist/cjs/keyboard/hooks/useKeyboardState/index.native.js +61 -0
- package/dist/cjs/keyboard/hooks/useKeyboardState/index.native.js.map +1 -0
- package/dist/cjs/keyboard/hooks/useWindowDimensions/index.cjs +48 -0
- package/dist/cjs/keyboard/hooks/useWindowDimensions/index.native.cjs +50 -0
- package/dist/cjs/keyboard/hooks/useWindowDimensions/index.native.js +52 -0
- package/dist/cjs/keyboard/hooks/useWindowDimensions/index.native.js.map +1 -0
- package/dist/cjs/keyboard/index.cjs +45 -0
- package/dist/cjs/keyboard/index.native.cjs +47 -0
- package/dist/cjs/keyboard/index.native.js +49 -0
- package/dist/cjs/keyboard/index.native.js.map +1 -0
- package/dist/cjs/keyboard/internal.cjs +77 -0
- package/dist/cjs/keyboard/internal.native.cjs +79 -0
- package/dist/cjs/keyboard/internal.native.js +81 -0
- package/dist/cjs/keyboard/internal.native.js.map +1 -0
- package/dist/cjs/keyboard/module.cjs +72 -0
- package/dist/cjs/keyboard/module.native.cjs +79 -0
- package/dist/cjs/keyboard/module.native.js +81 -0
- package/dist/cjs/keyboard/module.native.js.map +1 -0
- package/dist/cjs/keyboard/reanimated.cjs +36 -0
- package/dist/cjs/keyboard/reanimated.native.cjs +84 -0
- package/dist/cjs/keyboard/reanimated.native.js +86 -0
- package/dist/cjs/keyboard/reanimated.native.js.map +1 -0
- package/dist/cjs/keyboard/typings/hooks.cjs +17 -0
- package/dist/cjs/keyboard/typings/hooks.native.cjs +19 -0
- package/dist/cjs/keyboard/typings/hooks.native.js +21 -0
- package/dist/cjs/keyboard/typings/hooks.native.js.map +1 -0
- package/dist/cjs/keyboard/typings/index.cjs +23 -0
- package/dist/cjs/keyboard/typings/index.native.cjs +25 -0
- package/dist/cjs/keyboard/typings/index.native.js +27 -0
- package/dist/cjs/keyboard/typings/index.native.js.map +1 -0
- package/dist/cjs/keyboard/typings/internal.cjs +17 -0
- package/dist/cjs/keyboard/typings/internal.native.cjs +19 -0
- package/dist/cjs/keyboard/typings/internal.native.js +21 -0
- package/dist/cjs/keyboard/typings/internal.native.js.map +1 -0
- package/dist/cjs/keyboard/typings/module.cjs +17 -0
- package/dist/cjs/keyboard/typings/module.native.cjs +19 -0
- package/dist/cjs/keyboard/typings/module.native.js +21 -0
- package/dist/cjs/keyboard/typings/module.native.js.map +1 -0
- package/dist/cjs/keyboard/typings/provider.cjs +17 -0
- package/dist/cjs/keyboard/typings/provider.native.cjs +19 -0
- package/dist/cjs/keyboard/typings/provider.native.js +21 -0
- package/dist/cjs/keyboard/typings/provider.native.js.map +1 -0
- package/dist/cjs/keyboard/typings/views.cjs +17 -0
- package/dist/cjs/keyboard/typings/views.native.cjs +19 -0
- package/dist/cjs/keyboard/typings/views.native.js +21 -0
- package/dist/cjs/keyboard/typings/views.native.js.map +1 -0
- package/dist/cjs/keyboard/utils/findNodeHandle/index.cjs +25 -0
- package/dist/cjs/keyboard/utils/findNodeHandle/index.native.cjs +27 -0
- package/dist/cjs/keyboard/utils/findNodeHandle/index.native.js +29 -0
- package/dist/cjs/keyboard/utils/findNodeHandle/index.native.js.map +1 -0
- package/dist/cjs/keyboard/views/KeyboardExtender/index.cjs +48 -0
- package/dist/cjs/keyboard/views/KeyboardExtender/index.ios.cjs +50 -0
- package/dist/cjs/keyboard/views/KeyboardExtender/index.ios.js +52 -0
- package/dist/cjs/keyboard/views/KeyboardExtender/index.ios.js.map +1 -0
- package/dist/cjs/keyboard/views/KeyboardExtender/index.native.cjs +57 -0
- package/dist/cjs/keyboard/views/KeyboardExtender/index.native.js +59 -0
- package/dist/cjs/keyboard/views/KeyboardExtender/index.native.js.map +1 -0
- package/dist/cjs/keyboard/views/OverKeyboardView/index.cjs +60 -0
- package/dist/cjs/keyboard/views/OverKeyboardView/index.native.cjs +72 -0
- package/dist/cjs/keyboard/views/OverKeyboardView/index.native.js +74 -0
- package/dist/cjs/keyboard/views/OverKeyboardView/index.native.js.map +1 -0
- package/dist/cjs/keyboard/views/index.cjs +35 -0
- package/dist/cjs/keyboard/views/index.native.cjs +37 -0
- package/dist/cjs/keyboard/views/index.native.js +39 -0
- package/dist/cjs/keyboard/views/index.native.js.map +1 -0
- package/dist/cjs/keyboard.cjs +19 -0
- package/dist/cjs/keyboard.native.cjs +21 -0
- package/dist/cjs/keyboard.native.js +23 -0
- package/dist/cjs/keyboard.native.js.map +1 -0
- package/dist/cjs/platform/specs/OneClippingScrollViewDecoratorViewNativeComponent.cjs +34 -0
- package/dist/cjs/platform/specs/OneClippingScrollViewDecoratorViewNativeComponent.native.cjs +34 -0
- package/dist/cjs/platform/specs/OneClippingScrollViewDecoratorViewNativeComponent.native.js +35 -0
- package/dist/cjs/platform/specs/OneClippingScrollViewDecoratorViewNativeComponent.native.js.map +7 -0
- package/dist/cjs/platform/specs/OneKeyboard.nitro.cjs +17 -0
- package/dist/cjs/platform/specs/OneKeyboard.nitro.native.cjs +19 -0
- package/dist/cjs/platform/specs/OneKeyboard.nitro.native.js +21 -0
- package/dist/cjs/platform/specs/OneKeyboard.nitro.native.js.map +1 -0
- package/dist/cjs/platform/specs/OneKeyboardBackgroundViewNativeComponent.cjs +30 -0
- package/dist/cjs/platform/specs/OneKeyboardBackgroundViewNativeComponent.native.cjs +30 -0
- package/dist/cjs/platform/specs/OneKeyboardBackgroundViewNativeComponent.native.js +31 -0
- package/dist/cjs/platform/specs/OneKeyboardBackgroundViewNativeComponent.native.js.map +7 -0
- package/dist/cjs/platform/specs/OneKeyboardControllerViewNativeComponent.cjs +79 -0
- package/dist/cjs/platform/specs/OneKeyboardControllerViewNativeComponent.native.cjs +79 -0
- package/dist/cjs/platform/specs/OneKeyboardControllerViewNativeComponent.native.js +80 -0
- package/dist/cjs/platform/specs/OneKeyboardControllerViewNativeComponent.native.js.map +7 -0
- package/dist/cjs/platform/specs/OneKeyboardExtenderNativeComponent.cjs +33 -0
- package/dist/cjs/platform/specs/OneKeyboardExtenderNativeComponent.native.cjs +33 -0
- package/dist/cjs/platform/specs/OneKeyboardExtenderNativeComponent.native.js +34 -0
- package/dist/cjs/platform/specs/OneKeyboardExtenderNativeComponent.native.js.map +7 -0
- package/dist/cjs/platform/specs/OneKeyboardGestureAreaNativeComponent.cjs +36 -0
- package/dist/cjs/platform/specs/OneKeyboardGestureAreaNativeComponent.native.cjs +36 -0
- package/dist/cjs/platform/specs/OneKeyboardGestureAreaNativeComponent.native.js +37 -0
- package/dist/cjs/platform/specs/OneKeyboardGestureAreaNativeComponent.native.js.map +7 -0
- package/dist/cjs/platform/specs/OneKeyboardToolbarGroupViewNativeComponent.cjs +30 -0
- package/dist/cjs/platform/specs/OneKeyboardToolbarGroupViewNativeComponent.native.cjs +30 -0
- package/dist/cjs/platform/specs/OneKeyboardToolbarGroupViewNativeComponent.native.js +31 -0
- package/dist/cjs/platform/specs/OneKeyboardToolbarGroupViewNativeComponent.native.js.map +7 -0
- package/dist/cjs/platform/specs/OneOverKeyboardViewNativeComponent.cjs +32 -0
- package/dist/cjs/platform/specs/OneOverKeyboardViewNativeComponent.native.cjs +32 -0
- package/dist/cjs/platform/specs/OneOverKeyboardViewNativeComponent.native.js +33 -0
- package/dist/cjs/platform/specs/OneOverKeyboardViewNativeComponent.native.js.map +7 -0
- package/dist/esm/keyboard/animated.mjs +135 -0
- package/dist/esm/keyboard/animated.mjs.map +1 -0
- package/dist/esm/keyboard/animated.native.js +141 -0
- package/dist/esm/keyboard/animated.native.js.map +1 -0
- package/dist/esm/keyboard/architecture.mjs +5 -0
- package/dist/esm/keyboard/architecture.mjs.map +1 -0
- package/dist/esm/keyboard/architecture.native.js +5 -0
- package/dist/esm/keyboard/architecture.native.js.map +1 -0
- package/dist/esm/keyboard/bindings.mjs +33 -0
- package/dist/esm/keyboard/bindings.mjs.map +1 -0
- package/dist/esm/keyboard/bindings.native.js +107 -0
- package/dist/esm/keyboard/bindings.native.js.map +1 -0
- package/dist/esm/keyboard/compat.mjs +41 -0
- package/dist/esm/keyboard/compat.mjs.map +1 -0
- package/dist/esm/keyboard/compat.native.js +41 -0
- package/dist/esm/keyboard/compat.native.js.map +1 -0
- package/dist/esm/keyboard/components/KeyboardAvoidingView/hooks.mjs +122 -0
- package/dist/esm/keyboard/components/KeyboardAvoidingView/hooks.mjs.map +1 -0
- package/dist/esm/keyboard/components/KeyboardAvoidingView/hooks.native.js +122 -0
- package/dist/esm/keyboard/components/KeyboardAvoidingView/hooks.native.js.map +1 -0
- package/dist/esm/keyboard/components/KeyboardAvoidingView/index.mjs +131 -0
- package/dist/esm/keyboard/components/KeyboardAvoidingView/index.mjs.map +1 -0
- package/dist/esm/keyboard/components/KeyboardAvoidingView/index.native.js +146 -0
- package/dist/esm/keyboard/components/KeyboardAvoidingView/index.native.js.map +1 -0
- package/dist/esm/keyboard/components/KeyboardAwareScrollView/index.mjs +301 -0
- package/dist/esm/keyboard/components/KeyboardAwareScrollView/index.mjs.map +1 -0
- package/dist/esm/keyboard/components/KeyboardAwareScrollView/index.native.js +317 -0
- package/dist/esm/keyboard/components/KeyboardAwareScrollView/index.native.js.map +1 -0
- package/dist/esm/keyboard/components/KeyboardAwareScrollView/types.mjs +0 -0
- package/dist/esm/keyboard/components/KeyboardAwareScrollView/types.native.js +0 -0
- package/dist/esm/keyboard/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.mjs +81 -0
- package/dist/esm/keyboard/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.mjs.map +1 -0
- package/dist/esm/keyboard/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.native.js +89 -0
- package/dist/esm/keyboard/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.native.js.map +1 -0
- package/dist/esm/keyboard/components/KeyboardAwareScrollView/utils.mjs +27 -0
- package/dist/esm/keyboard/components/KeyboardAwareScrollView/utils.mjs.map +1 -0
- package/dist/esm/keyboard/components/KeyboardAwareScrollView/utils.native.js +33 -0
- package/dist/esm/keyboard/components/KeyboardAwareScrollView/utils.native.js.map +1 -0
- package/dist/esm/keyboard/components/KeyboardChatScrollView/hooks.mjs +3 -0
- package/dist/esm/keyboard/components/KeyboardChatScrollView/hooks.native.js +3 -0
- package/dist/esm/keyboard/components/KeyboardChatScrollView/index.mjs +92 -0
- package/dist/esm/keyboard/components/KeyboardChatScrollView/index.mjs.map +1 -0
- package/dist/esm/keyboard/components/KeyboardChatScrollView/index.native.js +105 -0
- package/dist/esm/keyboard/components/KeyboardChatScrollView/index.native.js.map +1 -0
- package/dist/esm/keyboard/components/KeyboardChatScrollView/types.mjs +0 -0
- package/dist/esm/keyboard/components/KeyboardChatScrollView/types.native.js +0 -0
- package/dist/esm/keyboard/components/KeyboardChatScrollView/useChatKeyboard/helpers.mjs +65 -0
- package/dist/esm/keyboard/components/KeyboardChatScrollView/useChatKeyboard/helpers.mjs.map +1 -0
- package/dist/esm/keyboard/components/KeyboardChatScrollView/useChatKeyboard/helpers.native.js +67 -0
- package/dist/esm/keyboard/components/KeyboardChatScrollView/useChatKeyboard/helpers.native.js.map +1 -0
- package/dist/esm/keyboard/components/KeyboardChatScrollView/useChatKeyboard/index.ios.js +118 -0
- package/dist/esm/keyboard/components/KeyboardChatScrollView/useChatKeyboard/index.ios.js.map +1 -0
- package/dist/esm/keyboard/components/KeyboardChatScrollView/useChatKeyboard/index.mjs +185 -0
- package/dist/esm/keyboard/components/KeyboardChatScrollView/useChatKeyboard/index.mjs.map +1 -0
- package/dist/esm/keyboard/components/KeyboardChatScrollView/useChatKeyboard/index.native.js +185 -0
- package/dist/esm/keyboard/components/KeyboardChatScrollView/useChatKeyboard/index.native.js.map +1 -0
- package/dist/esm/keyboard/components/KeyboardChatScrollView/useChatKeyboard/types.mjs +0 -0
- package/dist/esm/keyboard/components/KeyboardChatScrollView/useChatKeyboard/types.native.js +0 -0
- package/dist/esm/keyboard/components/KeyboardChatScrollView/useEndVisible.mjs +33 -0
- package/dist/esm/keyboard/components/KeyboardChatScrollView/useEndVisible.mjs.map +1 -0
- package/dist/esm/keyboard/components/KeyboardChatScrollView/useEndVisible.native.js +40 -0
- package/dist/esm/keyboard/components/KeyboardChatScrollView/useEndVisible.native.js.map +1 -0
- package/dist/esm/keyboard/components/KeyboardChatScrollView/useExtraContentPadding/index.mjs +73 -0
- package/dist/esm/keyboard/components/KeyboardChatScrollView/useExtraContentPadding/index.mjs.map +1 -0
- package/dist/esm/keyboard/components/KeyboardChatScrollView/useExtraContentPadding/index.native.js +75 -0
- package/dist/esm/keyboard/components/KeyboardChatScrollView/useExtraContentPadding/index.native.js.map +1 -0
- package/dist/esm/keyboard/components/KeyboardChatScrollView/useFrozenPadding/index.mjs +34 -0
- package/dist/esm/keyboard/components/KeyboardChatScrollView/useFrozenPadding/index.mjs.map +1 -0
- package/dist/esm/keyboard/components/KeyboardChatScrollView/useFrozenPadding/index.native.js +37 -0
- package/dist/esm/keyboard/components/KeyboardChatScrollView/useFrozenPadding/index.native.js.map +1 -0
- package/dist/esm/keyboard/components/KeyboardEffects/index.mjs +69 -0
- package/dist/esm/keyboard/components/KeyboardEffects/index.mjs.map +1 -0
- package/dist/esm/keyboard/components/KeyboardEffects/index.native.js +72 -0
- package/dist/esm/keyboard/components/KeyboardEffects/index.native.js.map +1 -0
- package/dist/esm/keyboard/components/KeyboardStickyView/index.mjs +29 -0
- package/dist/esm/keyboard/components/KeyboardStickyView/index.mjs.map +1 -0
- package/dist/esm/keyboard/components/KeyboardStickyView/index.native.js +32 -0
- package/dist/esm/keyboard/components/KeyboardStickyView/index.native.js.map +1 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/Arrow.mjs +63 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/Arrow.mjs.map +1 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/Arrow.native.js +72 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/Arrow.native.js.map +1 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/Button.mjs +52 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/Button.mjs.map +1 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/Button.native.js +62 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/Button.native.js.map +1 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/colors.mjs +18 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/colors.mjs.map +1 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/colors.native.js +38 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/colors.native.js.map +1 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Background.mjs +8 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Background.mjs.map +1 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Background.native.js +12 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Background.native.js.map +1 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Content.mjs +17 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Content.mjs.map +1 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Content.native.js +19 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Content.native.js.map +1 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Done.mjs +50 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Done.mjs.map +1 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Done.native.js +56 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Done.native.js.map +1 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Next.mjs +39 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Next.mjs.map +1 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Next.native.js +40 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Next.native.js.map +1 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Prev.mjs +39 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Prev.mjs.map +1 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Prev.native.js +40 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/Prev.native.js.map +1 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/index.mjs +7 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/index.native.js +7 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/types.mjs +0 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/compound/components/types.native.js +0 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/compound/context.mjs +14 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/compound/context.mjs.map +1 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/compound/context.native.js +14 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/compound/context.native.js.map +1 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/constants.mjs +14 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/constants.mjs.map +1 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/constants.native.js +14 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/constants.native.js.map +1 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/index.mjs +174 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/index.mjs.map +1 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/index.native.js +185 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/index.native.js.map +1 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/types.mjs +0 -0
- package/dist/esm/keyboard/components/KeyboardToolbar/types.native.js +0 -0
- package/dist/esm/keyboard/components/ScrollViewWithBottomPadding/index.mjs +102 -0
- package/dist/esm/keyboard/components/ScrollViewWithBottomPadding/index.mjs.map +1 -0
- package/dist/esm/keyboard/components/ScrollViewWithBottomPadding/index.native.js +107 -0
- package/dist/esm/keyboard/components/ScrollViewWithBottomPadding/index.native.js.map +1 -0
- package/dist/esm/keyboard/components/ScrollViewWithBottomPadding/styles.mjs +11 -0
- package/dist/esm/keyboard/components/ScrollViewWithBottomPadding/styles.mjs.map +1 -0
- package/dist/esm/keyboard/components/ScrollViewWithBottomPadding/styles.native.js +11 -0
- package/dist/esm/keyboard/components/ScrollViewWithBottomPadding/styles.native.js.map +1 -0
- package/dist/esm/keyboard/components/hooks/useCombinedRef.mjs +21 -0
- package/dist/esm/keyboard/components/hooks/useCombinedRef.mjs.map +1 -0
- package/dist/esm/keyboard/components/hooks/useCombinedRef.native.js +41 -0
- package/dist/esm/keyboard/components/hooks/useCombinedRef.native.js.map +1 -0
- package/dist/esm/keyboard/components/hooks/useScrollState.mjs +59 -0
- package/dist/esm/keyboard/components/hooks/useScrollState.mjs.map +1 -0
- package/dist/esm/keyboard/components/hooks/useScrollState.native.js +60 -0
- package/dist/esm/keyboard/components/hooks/useScrollState.native.js.map +1 -0
- package/dist/esm/keyboard/components/index.mjs +8 -0
- package/dist/esm/keyboard/components/index.native.js +8 -0
- package/dist/esm/keyboard/components/utils/safeScrollTo.mjs +14 -0
- package/dist/esm/keyboard/components/utils/safeScrollTo.mjs.map +1 -0
- package/dist/esm/keyboard/components/utils/safeScrollTo.native.js +14 -0
- package/dist/esm/keyboard/components/utils/safeScrollTo.native.js.map +1 -0
- package/dist/esm/keyboard/constants.mjs +25 -0
- package/dist/esm/keyboard/constants.mjs.map +1 -0
- package/dist/esm/keyboard/constants.native.js +25 -0
- package/dist/esm/keyboard/constants.native.js.map +1 -0
- package/dist/esm/keyboard/context.mjs +43 -0
- package/dist/esm/keyboard/context.mjs.map +1 -0
- package/dist/esm/keyboard/context.native.js +49 -0
- package/dist/esm/keyboard/context.native.js.map +1 -0
- package/dist/esm/keyboard/hooks/index.mjs +94 -0
- package/dist/esm/keyboard/hooks/index.mjs.map +1 -0
- package/dist/esm/keyboard/hooks/index.native.js +106 -0
- package/dist/esm/keyboard/hooks/index.native.js.map +1 -0
- package/dist/esm/keyboard/hooks/useKeyboardState/index.mjs +25 -0
- package/dist/esm/keyboard/hooks/useKeyboardState/index.mjs.map +1 -0
- package/dist/esm/keyboard/hooks/useKeyboardState/index.native.js +38 -0
- package/dist/esm/keyboard/hooks/useKeyboardState/index.native.js.map +1 -0
- package/dist/esm/keyboard/hooks/useWindowDimensions/index.mjs +29 -0
- package/dist/esm/keyboard/hooks/useWindowDimensions/index.mjs.map +1 -0
- package/dist/esm/keyboard/hooks/useWindowDimensions/index.native.js +29 -0
- package/dist/esm/keyboard/hooks/useWindowDimensions/index.native.js.map +1 -0
- package/dist/esm/keyboard/index.mjs +20 -0
- package/dist/esm/keyboard/index.native.js +20 -0
- package/dist/esm/keyboard/internal.mjs +55 -0
- package/dist/esm/keyboard/internal.mjs.map +1 -0
- package/dist/esm/keyboard/internal.native.js +55 -0
- package/dist/esm/keyboard/internal.native.js.map +1 -0
- package/dist/esm/keyboard/module.mjs +53 -0
- package/dist/esm/keyboard/module.mjs.map +1 -0
- package/dist/esm/keyboard/module.native.js +58 -0
- package/dist/esm/keyboard/module.native.js.map +1 -0
- package/dist/esm/keyboard/reanimated.mjs +9 -0
- package/dist/esm/keyboard/reanimated.mjs.map +1 -0
- package/dist/esm/keyboard/reanimated.native.js +55 -0
- package/dist/esm/keyboard/reanimated.native.js.map +1 -0
- package/dist/esm/keyboard/typings/hooks.mjs +0 -0
- package/dist/esm/keyboard/typings/hooks.native.js +0 -0
- package/dist/esm/keyboard/typings/index.mjs +9 -0
- package/dist/esm/keyboard/typings/index.native.js +9 -0
- package/dist/esm/keyboard/typings/internal.mjs +0 -0
- package/dist/esm/keyboard/typings/internal.native.js +0 -0
- package/dist/esm/keyboard/typings/module.mjs +0 -0
- package/dist/esm/keyboard/typings/module.native.js +0 -0
- package/dist/esm/keyboard/typings/provider.mjs +0 -0
- package/dist/esm/keyboard/typings/provider.native.js +0 -0
- package/dist/esm/keyboard/typings/views.mjs +0 -0
- package/dist/esm/keyboard/typings/views.native.js +0 -0
- package/dist/esm/keyboard/utils/findNodeHandle/index.mjs +5 -0
- package/dist/esm/keyboard/utils/findNodeHandle/index.mjs.map +1 -0
- package/dist/esm/keyboard/utils/findNodeHandle/index.native.js +3 -0
- package/dist/esm/keyboard/views/KeyboardExtender/index.ios.js +23 -0
- package/dist/esm/keyboard/views/KeyboardExtender/index.ios.js.map +1 -0
- package/dist/esm/keyboard/views/KeyboardExtender/index.mjs +29 -0
- package/dist/esm/keyboard/views/KeyboardExtender/index.mjs.map +1 -0
- package/dist/esm/keyboard/views/KeyboardExtender/index.native.js +30 -0
- package/dist/esm/keyboard/views/KeyboardExtender/index.native.js.map +1 -0
- package/dist/esm/keyboard/views/OverKeyboardView/index.mjs +41 -0
- package/dist/esm/keyboard/views/OverKeyboardView/index.mjs.map +1 -0
- package/dist/esm/keyboard/views/OverKeyboardView/index.native.js +45 -0
- package/dist/esm/keyboard/views/OverKeyboardView/index.native.js.map +1 -0
- package/dist/esm/keyboard/views/index.mjs +4 -0
- package/dist/esm/keyboard/views/index.native.js +4 -0
- package/dist/esm/keyboard.mjs +1 -0
- package/dist/esm/keyboard.native.js +1 -0
- package/dist/esm/platform/specs/OneClippingScrollViewDecoratorViewNativeComponent.mjs +16 -0
- package/dist/esm/platform/specs/OneClippingScrollViewDecoratorViewNativeComponent.mjs.map +7 -0
- package/dist/esm/platform/specs/OneClippingScrollViewDecoratorViewNativeComponent.native.js +16 -0
- package/dist/esm/platform/specs/OneClippingScrollViewDecoratorViewNativeComponent.native.js.map +7 -0
- package/dist/esm/platform/specs/OneKeyboard.nitro.mjs +0 -0
- package/dist/esm/platform/specs/OneKeyboard.nitro.native.js +0 -0
- package/dist/esm/platform/specs/OneKeyboardBackgroundViewNativeComponent.mjs +12 -0
- package/dist/esm/platform/specs/OneKeyboardBackgroundViewNativeComponent.mjs.map +7 -0
- package/dist/esm/platform/specs/OneKeyboardBackgroundViewNativeComponent.native.js +12 -0
- package/dist/esm/platform/specs/OneKeyboardBackgroundViewNativeComponent.native.js.map +7 -0
- package/dist/esm/platform/specs/OneKeyboardControllerViewNativeComponent.mjs +61 -0
- package/dist/esm/platform/specs/OneKeyboardControllerViewNativeComponent.mjs.map +7 -0
- package/dist/esm/platform/specs/OneKeyboardControllerViewNativeComponent.native.js +61 -0
- package/dist/esm/platform/specs/OneKeyboardControllerViewNativeComponent.native.js.map +7 -0
- package/dist/esm/platform/specs/OneKeyboardExtenderNativeComponent.mjs +15 -0
- package/dist/esm/platform/specs/OneKeyboardExtenderNativeComponent.mjs.map +7 -0
- package/dist/esm/platform/specs/OneKeyboardExtenderNativeComponent.native.js +15 -0
- package/dist/esm/platform/specs/OneKeyboardExtenderNativeComponent.native.js.map +7 -0
- package/dist/esm/platform/specs/OneKeyboardGestureAreaNativeComponent.mjs +18 -0
- package/dist/esm/platform/specs/OneKeyboardGestureAreaNativeComponent.mjs.map +7 -0
- package/dist/esm/platform/specs/OneKeyboardGestureAreaNativeComponent.native.js +18 -0
- package/dist/esm/platform/specs/OneKeyboardGestureAreaNativeComponent.native.js.map +7 -0
- package/dist/esm/platform/specs/OneKeyboardToolbarGroupViewNativeComponent.mjs +12 -0
- package/dist/esm/platform/specs/OneKeyboardToolbarGroupViewNativeComponent.mjs.map +7 -0
- package/dist/esm/platform/specs/OneKeyboardToolbarGroupViewNativeComponent.native.js +12 -0
- package/dist/esm/platform/specs/OneKeyboardToolbarGroupViewNativeComponent.native.js.map +7 -0
- package/dist/esm/platform/specs/OneOverKeyboardViewNativeComponent.mjs +14 -0
- package/dist/esm/platform/specs/OneOverKeyboardViewNativeComponent.mjs.map +7 -0
- package/dist/esm/platform/specs/OneOverKeyboardViewNativeComponent.native.js +14 -0
- package/dist/esm/platform/specs/OneOverKeyboardViewNativeComponent.native.js.map +7 -0
- package/ios/Keyboard/KeyboardBackdropController.swift +57 -0
- package/ios/Keyboard/KeyboardControllerModuleImpl.swift +75 -0
- package/ios/Keyboard/LICENSE +21 -0
- package/ios/Keyboard/OneKeyboardBridge.swift +51 -0
- package/ios/Keyboard/animations/KeyboardAnimation.swift +80 -0
- package/ios/Keyboard/animations/SpringAnimation.swift +75 -0
- package/ios/Keyboard/animations/TimingAnimation.swift +145 -0
- package/ios/Keyboard/core/KeyboardControllerConfiguration.swift +9 -0
- package/ios/Keyboard/core/UIUtils.swift +6 -0
- package/ios/Keyboard/delegates/KCTextInputCompositeDelegate.swift +263 -0
- package/ios/Keyboard/events/KeyboardEventEmitterPayload.swift +16 -0
- package/ios/Keyboard/events/OneKCFocusedInputLayoutChangedEvent.h +8 -0
- package/ios/Keyboard/events/OneKCFocusedInputLayoutChangedEvent.m +70 -0
- package/ios/Keyboard/events/OneKCFocusedInputSelectionChangedEvent.h +8 -0
- package/ios/Keyboard/events/OneKCFocusedInputSelectionChangedEvent.m +69 -0
- package/ios/Keyboard/events/OneKCFocusedInputTextChangedEvent.h +8 -0
- package/ios/Keyboard/events/OneKCFocusedInputTextChangedEvent.m +64 -0
- package/ios/Keyboard/events/OneKCKeyboardMoveEvent.h +13 -0
- package/ios/Keyboard/events/OneKCKeyboardMoveEvent.m +75 -0
- package/ios/Keyboard/extensions/CGFloat.swift +13 -0
- package/ios/Keyboard/extensions/Date.swift +7 -0
- package/ios/Keyboard/extensions/NSObject.swift +5 -0
- package/ios/Keyboard/extensions/Notification.swift +15 -0
- package/ios/Keyboard/extensions/String.swift +5 -0
- package/ios/Keyboard/extensions/UIApplication.swift +38 -0
- package/ios/Keyboard/extensions/UIKeyboardType.swift +23 -0
- package/ios/Keyboard/extensions/UIResponder.swift +94 -0
- package/ios/Keyboard/extensions/UIScrollView.swift +8 -0
- package/ios/Keyboard/extensions/UIView.swift +83 -0
- package/ios/Keyboard/extensions/UIWindow.swift +56 -0
- package/ios/Keyboard/interactive/InvisibleInputAccessoryView.swift +52 -0
- package/ios/Keyboard/interactive/KeyboardAreaExtender.swift +68 -0
- package/ios/Keyboard/interactive/KeyboardOffsetProvider.swift +32 -0
- package/ios/Keyboard/objc/NSObject+SafeKVC.h +5 -0
- package/ios/Keyboard/objc/NSObject+SafeKVC.m +12 -0
- package/ios/Keyboard/objc/TextInput+DelegateManager.h +13 -0
- package/ios/Keyboard/objc/TextInput+DelegateManager.m +48 -0
- package/ios/Keyboard/observers/FocusedInputObserver.swift +334 -0
- package/ios/Keyboard/observers/movement/KeyboardEventsIgnorer.swift +32 -0
- package/ios/Keyboard/observers/movement/KeyboardTrackingView.swift +163 -0
- package/ios/Keyboard/observers/movement/KeyboardViewLocator.swift +16 -0
- package/ios/Keyboard/observers/movement/observer/KeyboardMovementObserver+Animation.swift +14 -0
- package/ios/Keyboard/observers/movement/observer/KeyboardMovementObserver+Interactive.swift +55 -0
- package/ios/Keyboard/observers/movement/observer/KeyboardMovementObserver+Lifecycle.swift +28 -0
- package/ios/Keyboard/observers/movement/observer/KeyboardMovementObserver+Listeners.swift +116 -0
- package/ios/Keyboard/observers/movement/observer/KeyboardMovementObserver+Watcher.swift +69 -0
- package/ios/Keyboard/observers/movement/observer/KeyboardMovementObserver.swift +57 -0
- package/ios/Keyboard/protocols/TextInput.swift +50 -0
- package/ios/Keyboard/swizzling/UIResponderSwizzle.swift +144 -0
- package/ios/Keyboard/traversal/FocusedInputHolder.swift +24 -0
- package/ios/Keyboard/traversal/KeyboardView.swift +28 -0
- package/ios/Keyboard/traversal/ViewHierarchyNavigator.swift +157 -0
- package/ios/Keyboard/views/KeyboardExtenderContainerView.swift +207 -0
- package/ios/Keyboard/views/OneClippingScrollViewDecoratorViewComponentView.h +8 -0
- package/ios/Keyboard/views/OneClippingScrollViewDecoratorViewComponentView.mm +230 -0
- package/ios/Keyboard/views/OneKeyboardBackgroundViewComponentView.h +8 -0
- package/ios/Keyboard/views/OneKeyboardBackgroundViewComponentView.mm +123 -0
- package/ios/Keyboard/views/OneKeyboardControllerViewComponentView.h +13 -0
- package/ios/Keyboard/views/OneKeyboardControllerViewComponentView.mm +299 -0
- package/ios/Keyboard/views/OneKeyboardExtenderComponentView.h +16 -0
- package/ios/Keyboard/views/OneKeyboardExtenderComponentView.mm +275 -0
- package/ios/Keyboard/views/OneKeyboardGestureAreaComponentView.h +10 -0
- package/ios/Keyboard/views/OneKeyboardGestureAreaComponentView.mm +111 -0
- package/ios/Keyboard/views/OneKeyboardToolbarGroupViewComponentView.h +7 -0
- package/ios/Keyboard/views/OneKeyboardToolbarGroupViewComponentView.mm +47 -0
- package/ios/Keyboard/views/OneOverKeyboardViewComponentView.h +15 -0
- package/ios/Keyboard/views/OneOverKeyboardViewComponentView.mm +155 -0
- package/ios/Nitro/HybridOneKeyboard.swift +140 -0
- package/ios/Nitro/OneLaunchScreen.h +2 -0
- package/ios/Nitro/OneLaunchScreen.m +16 -0
- package/nitrogen/generated/android/One+autolinking.cmake +2 -0
- package/nitrogen/generated/android/OneOnLoad.cpp +24 -2
- package/nitrogen/generated/android/c++/JFunc_void_OneKeyboardEventName_OneKeyboardEvent.hpp +80 -0
- package/nitrogen/generated/android/c++/JFunc_void_OneKeyboardFocus.hpp +77 -0
- package/nitrogen/generated/android/c++/JFunc_void_double_double.hpp +75 -0
- package/nitrogen/generated/android/c++/JHybridOneKeyboardSpec.cpp +181 -0
- package/nitrogen/generated/android/c++/JHybridOneKeyboardSpec.hpp +74 -0
- package/nitrogen/generated/android/c++/JOneKeyboardEvent.hpp +77 -0
- package/nitrogen/generated/android/c++/JOneKeyboardEventName.hpp +64 -0
- package/nitrogen/generated/android/c++/JOneKeyboardFocus.hpp +61 -0
- package/nitrogen/generated/android/c++/JOneKeyboardFrame.hpp +69 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/Func_void_OneKeyboardEventName_OneKeyboardEvent.kt +78 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/Func_void_OneKeyboardFocus.kt +78 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/Func_void_double_double.kt +78 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/HybridOneKeyboardSpec.kt +128 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/OneKeyboardEvent.kt +76 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/OneKeyboardEventName.kt +25 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/OneKeyboardFocus.kt +56 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/OneKeyboardFrame.kt +66 -0
- package/nitrogen/generated/ios/One-Swift-Cxx-Bridge.cpp +197 -148
- package/nitrogen/generated/ios/One-Swift-Cxx-Bridge.hpp +590 -452
- package/nitrogen/generated/ios/One-Swift-Cxx-Umbrella.hpp +17 -0
- package/nitrogen/generated/ios/OneAutolinking.mm +8 -0
- package/nitrogen/generated/ios/OneAutolinking.swift +12 -0
- package/nitrogen/generated/ios/c++/HybridOneKeyboardSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridOneKeyboardSpecSwift.hpp +173 -0
- package/nitrogen/generated/ios/swift/Func_void_OneKeyboardEventName_OneKeyboardEvent.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_OneKeyboardFocus.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_OneKeyboardFrame.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_double_double.swift +46 -0
- package/nitrogen/generated/ios/swift/HybridOneKeyboardSpec.swift +66 -0
- package/nitrogen/generated/ios/swift/HybridOneKeyboardSpec_cxx.swift +316 -0
- package/nitrogen/generated/ios/swift/OneKeyboardEvent.swift +54 -0
- package/nitrogen/generated/ios/swift/OneKeyboardEventName.swift +48 -0
- package/nitrogen/generated/ios/swift/OneKeyboardFocus.swift +34 -0
- package/nitrogen/generated/ios/swift/OneKeyboardFrame.swift +44 -0
- package/nitrogen/generated/shared/c++/HybridOneKeyboardSpec.cpp +33 -0
- package/nitrogen/generated/shared/c++/HybridOneKeyboardSpec.hpp +86 -0
- package/nitrogen/generated/shared/c++/OneKeyboardEvent.hpp +103 -0
- package/nitrogen/generated/shared/c++/OneKeyboardEventName.hpp +84 -0
- package/nitrogen/generated/shared/c++/OneKeyboardFocus.hpp +87 -0
- package/nitrogen/generated/shared/c++/OneKeyboardFrame.hpp +95 -0
- package/package.json +27 -13
- package/react-native.config.cjs +6 -0
- package/src/keyboard/LICENSE +21 -0
- package/src/keyboard/animated.tsx +235 -0
- package/src/keyboard/architecture.ts +1 -0
- package/src/keyboard/bindings.native.ts +113 -0
- package/src/keyboard/bindings.ts +100 -0
- package/src/keyboard/compat.ts +61 -0
- package/src/keyboard/components/KeyboardAvoidingView/hooks.ts +152 -0
- package/src/keyboard/components/KeyboardAvoidingView/index.tsx +260 -0
- package/src/keyboard/components/KeyboardAwareScrollView/index.tsx +607 -0
- package/src/keyboard/components/KeyboardAwareScrollView/types.ts +30 -0
- package/src/keyboard/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.ts +151 -0
- package/src/keyboard/components/KeyboardAwareScrollView/utils.ts +42 -0
- package/src/keyboard/components/KeyboardChatScrollView/hooks.ts +2 -0
- package/src/keyboard/components/KeyboardChatScrollView/index.tsx +182 -0
- package/src/keyboard/components/KeyboardChatScrollView/types.ts +120 -0
- package/src/keyboard/components/KeyboardChatScrollView/useChatKeyboard/helpers.ts +263 -0
- package/src/keyboard/components/KeyboardChatScrollView/useChatKeyboard/index.ios.ts +255 -0
- package/src/keyboard/components/KeyboardChatScrollView/useChatKeyboard/index.ts +356 -0
- package/src/keyboard/components/KeyboardChatScrollView/useChatKeyboard/types.ts +39 -0
- package/src/keyboard/components/KeyboardChatScrollView/useEndVisible.ts +59 -0
- package/src/keyboard/components/KeyboardChatScrollView/useExtraContentPadding/index.ts +188 -0
- package/src/keyboard/components/KeyboardChatScrollView/useFrozenPadding/index.ts +80 -0
- package/src/keyboard/components/KeyboardEffects/index.tsx +122 -0
- package/src/keyboard/components/KeyboardStickyView/index.tsx +75 -0
- package/src/keyboard/components/KeyboardToolbar/Arrow.tsx +76 -0
- package/src/keyboard/components/KeyboardToolbar/Button.tsx +89 -0
- package/src/keyboard/components/KeyboardToolbar/colors.native.ts +37 -0
- package/src/keyboard/components/KeyboardToolbar/colors.ts +16 -0
- package/src/keyboard/components/KeyboardToolbar/compound/components/Background.tsx +7 -0
- package/src/keyboard/components/KeyboardToolbar/compound/components/Content.tsx +23 -0
- package/src/keyboard/components/KeyboardToolbar/compound/components/Done.tsx +70 -0
- package/src/keyboard/components/KeyboardToolbar/compound/components/Next.tsx +53 -0
- package/src/keyboard/components/KeyboardToolbar/compound/components/Prev.tsx +54 -0
- package/src/keyboard/components/KeyboardToolbar/compound/components/index.ts +5 -0
- package/src/keyboard/components/KeyboardToolbar/compound/components/types.ts +15 -0
- package/src/keyboard/components/KeyboardToolbar/compound/context.ts +21 -0
- package/src/keyboard/components/KeyboardToolbar/constants.ts +13 -0
- package/src/keyboard/components/KeyboardToolbar/index.tsx +231 -0
- package/src/keyboard/components/KeyboardToolbar/types.ts +129 -0
- package/src/keyboard/components/ScrollViewWithBottomPadding/index.tsx +185 -0
- package/src/keyboard/components/ScrollViewWithBottomPadding/styles.ts +10 -0
- package/src/keyboard/components/hooks/useCombinedRef.ts +22 -0
- package/src/keyboard/components/hooks/useScrollState.ts +81 -0
- package/src/keyboard/components/index.ts +22 -0
- package/src/keyboard/components/utils/safeScrollTo.ts +26 -0
- package/src/keyboard/constants.ts +23 -0
- package/src/keyboard/context.ts +100 -0
- package/src/keyboard/hooks/index.ts +289 -0
- package/src/keyboard/hooks/useKeyboardState/index.ts +70 -0
- package/src/keyboard/hooks/useWindowDimensions/index.ts +38 -0
- package/src/keyboard/index.ts +31 -0
- package/src/keyboard/internal.ts +117 -0
- package/src/keyboard/module.ts +62 -0
- package/src/keyboard/reanimated.native.ts +104 -0
- package/src/keyboard/reanimated.ts +26 -0
- package/src/keyboard/typings/hooks.ts +214 -0
- package/src/keyboard/typings/index.ts +5 -0
- package/src/keyboard/typings/internal.ts +24 -0
- package/src/keyboard/typings/module.ts +136 -0
- package/src/keyboard/typings/provider.ts +43 -0
- package/src/keyboard/typings/views.ts +63 -0
- package/src/keyboard/utils/findNodeHandle/index.native.ts +3 -0
- package/src/keyboard/utils/findNodeHandle/index.ts +6 -0
- package/src/keyboard/views/KeyboardExtender/index.ios.tsx +35 -0
- package/src/keyboard/views/KeyboardExtender/index.tsx +47 -0
- package/src/keyboard/views/OverKeyboardView/index.tsx +61 -0
- package/src/keyboard/views/index.ts +2 -0
- package/src/keyboard.ts +1 -0
- package/src/platform/specs/OneClippingScrollViewDecoratorViewNativeComponent.ts +15 -0
- package/src/platform/specs/OneKeyboard.nitro.ts +49 -0
- package/src/platform/specs/OneKeyboardBackgroundViewNativeComponent.ts +10 -0
- package/src/platform/specs/OneKeyboardControllerViewNativeComponent.ts +84 -0
- package/src/platform/specs/OneKeyboardExtenderNativeComponent.ts +13 -0
- package/src/platform/specs/OneKeyboardGestureAreaNativeComponent.ts +17 -0
- package/src/platform/specs/OneKeyboardToolbarGroupViewNativeComponent.ts +10 -0
- package/src/platform/specs/OneOverKeyboardViewNativeComponent.ts +12 -0
- package/types/keyboard/animated.d.ts +18 -0
- package/types/keyboard/animated.d.ts.map +1 -0
- package/types/keyboard/architecture.d.ts +2 -0
- package/types/keyboard/architecture.d.ts.map +1 -0
- package/types/keyboard/bindings.d.ts +64 -0
- package/types/keyboard/bindings.d.ts.map +1 -0
- package/types/keyboard/bindings.native.d.ts +19 -0
- package/types/keyboard/bindings.native.d.ts.map +1 -0
- package/types/keyboard/compat.d.ts +28 -0
- package/types/keyboard/compat.d.ts.map +1 -0
- package/types/keyboard/components/KeyboardAvoidingView/hooks.d.ts +11 -0
- package/types/keyboard/components/KeyboardAvoidingView/hooks.d.ts.map +1 -0
- package/types/keyboard/components/KeyboardAvoidingView/index.d.ts +81 -0
- package/types/keyboard/components/KeyboardAvoidingView/index.d.ts.map +1 -0
- package/types/keyboard/components/KeyboardAwareScrollView/index.d.ts +31 -0
- package/types/keyboard/components/KeyboardAwareScrollView/index.d.ts.map +1 -0
- package/types/keyboard/components/KeyboardAwareScrollView/types.d.ts +29 -0
- package/types/keyboard/components/KeyboardAwareScrollView/types.d.ts.map +1 -0
- package/types/keyboard/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.d.ts +23 -0
- package/types/keyboard/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.d.ts.map +1 -0
- package/types/keyboard/components/KeyboardAwareScrollView/utils.d.ts +3 -0
- package/types/keyboard/components/KeyboardAwareScrollView/utils.d.ts.map +1 -0
- package/types/keyboard/components/KeyboardChatScrollView/hooks.d.ts +3 -0
- package/types/keyboard/components/KeyboardChatScrollView/hooks.d.ts.map +1 -0
- package/types/keyboard/components/KeyboardChatScrollView/index.d.ts +5 -0
- package/types/keyboard/components/KeyboardChatScrollView/index.d.ts.map +1 -0
- package/types/keyboard/components/KeyboardChatScrollView/types.d.ts +116 -0
- package/types/keyboard/components/KeyboardChatScrollView/types.d.ts.map +1 -0
- package/types/keyboard/components/KeyboardChatScrollView/useChatKeyboard/helpers.d.ts +134 -0
- package/types/keyboard/components/KeyboardChatScrollView/useChatKeyboard/helpers.d.ts.map +1 -0
- package/types/keyboard/components/KeyboardChatScrollView/useChatKeyboard/index.d.ts +19 -0
- package/types/keyboard/components/KeyboardChatScrollView/useChatKeyboard/index.d.ts.map +1 -0
- package/types/keyboard/components/KeyboardChatScrollView/useChatKeyboard/index.ios.d.ts +22 -0
- package/types/keyboard/components/KeyboardChatScrollView/useChatKeyboard/index.ios.d.ts.map +1 -0
- package/types/keyboard/components/KeyboardChatScrollView/useChatKeyboard/types.d.ts +42 -0
- package/types/keyboard/components/KeyboardChatScrollView/useChatKeyboard/types.d.ts.map +1 -0
- package/types/keyboard/components/KeyboardChatScrollView/useEndVisible.d.ts +18 -0
- package/types/keyboard/components/KeyboardChatScrollView/useEndVisible.d.ts.map +1 -0
- package/types/keyboard/components/KeyboardChatScrollView/useExtraContentPadding/index.d.ts +48 -0
- package/types/keyboard/components/KeyboardChatScrollView/useExtraContentPadding/index.d.ts.map +1 -0
- package/types/keyboard/components/KeyboardChatScrollView/useFrozenPadding/index.d.ts +31 -0
- package/types/keyboard/components/KeyboardChatScrollView/useFrozenPadding/index.d.ts.map +1 -0
- package/types/keyboard/components/KeyboardEffects/index.d.ts +61 -0
- package/types/keyboard/components/KeyboardEffects/index.d.ts.map +1 -0
- package/types/keyboard/components/KeyboardStickyView/index.d.ts +53 -0
- package/types/keyboard/components/KeyboardStickyView/index.d.ts.map +1 -0
- package/types/keyboard/components/KeyboardToolbar/Arrow.d.ts +10 -0
- package/types/keyboard/components/KeyboardToolbar/Arrow.d.ts.map +1 -0
- package/types/keyboard/components/KeyboardToolbar/Button.d.ts +18 -0
- package/types/keyboard/components/KeyboardToolbar/Button.d.ts.map +1 -0
- package/types/keyboard/components/KeyboardToolbar/colors.d.ts +3 -0
- package/types/keyboard/components/KeyboardToolbar/colors.d.ts.map +1 -0
- package/types/keyboard/components/KeyboardToolbar/colors.native.d.ts +3 -0
- package/types/keyboard/components/KeyboardToolbar/colors.native.d.ts.map +1 -0
- package/types/keyboard/components/KeyboardToolbar/compound/components/Background.d.ts +7 -0
- package/types/keyboard/components/KeyboardToolbar/compound/components/Background.d.ts.map +1 -0
- package/types/keyboard/components/KeyboardToolbar/compound/components/Content.d.ts +8 -0
- package/types/keyboard/components/KeyboardToolbar/compound/components/Content.d.ts.map +1 -0
- package/types/keyboard/components/KeyboardToolbar/compound/components/Done.d.ts +8 -0
- package/types/keyboard/components/KeyboardToolbar/compound/components/Done.d.ts.map +1 -0
- package/types/keyboard/components/KeyboardToolbar/compound/components/Next.d.ts +5 -0
- package/types/keyboard/components/KeyboardToolbar/compound/components/Next.d.ts.map +1 -0
- package/types/keyboard/components/KeyboardToolbar/compound/components/Prev.d.ts +5 -0
- package/types/keyboard/components/KeyboardToolbar/compound/components/Prev.d.ts.map +1 -0
- package/types/keyboard/components/KeyboardToolbar/compound/components/index.d.ts +6 -0
- package/types/keyboard/components/KeyboardToolbar/compound/components/index.d.ts.map +1 -0
- package/types/keyboard/components/KeyboardToolbar/compound/components/types.d.ts +15 -0
- package/types/keyboard/components/KeyboardToolbar/compound/components/types.d.ts.map +1 -0
- package/types/keyboard/components/KeyboardToolbar/compound/context.d.ts +10 -0
- package/types/keyboard/components/KeyboardToolbar/compound/context.d.ts.map +1 -0
- package/types/keyboard/components/KeyboardToolbar/constants.d.ts +10 -0
- package/types/keyboard/components/KeyboardToolbar/constants.d.ts.map +1 -0
- package/types/keyboard/components/KeyboardToolbar/index.d.ts +30 -0
- package/types/keyboard/components/KeyboardToolbar/index.d.ts.map +1 -0
- package/types/keyboard/components/KeyboardToolbar/types.d.ts +106 -0
- package/types/keyboard/components/KeyboardToolbar/types.d.ts.map +1 -0
- package/types/keyboard/components/ScrollViewWithBottomPadding/index.d.ts +31 -0
- package/types/keyboard/components/ScrollViewWithBottomPadding/index.d.ts.map +1 -0
- package/types/keyboard/components/ScrollViewWithBottomPadding/styles.d.ts +8 -0
- package/types/keyboard/components/ScrollViewWithBottomPadding/styles.d.ts.map +1 -0
- package/types/keyboard/components/hooks/useCombinedRef.d.ts +4 -0
- package/types/keyboard/components/hooks/useCombinedRef.d.ts.map +1 -0
- package/types/keyboard/components/hooks/useScrollState.d.ts +18 -0
- package/types/keyboard/components/hooks/useScrollState.d.ts.map +1 -0
- package/types/keyboard/components/index.d.ts +13 -0
- package/types/keyboard/components/index.d.ts.map +1 -0
- package/types/keyboard/components/utils/safeScrollTo.d.ts +13 -0
- package/types/keyboard/components/utils/safeScrollTo.d.ts.map +1 -0
- package/types/keyboard/constants.d.ts +19 -0
- package/types/keyboard/constants.d.ts.map +1 -0
- package/types/keyboard/context.d.ts +58 -0
- package/types/keyboard/context.d.ts.map +1 -0
- package/types/keyboard/hooks/index.d.ts +176 -0
- package/types/keyboard/hooks/index.d.ts.map +1 -0
- package/types/keyboard/hooks/useKeyboardState/index.d.ts +29 -0
- package/types/keyboard/hooks/useKeyboardState/index.d.ts.map +1 -0
- package/types/keyboard/hooks/useWindowDimensions/index.d.ts +3 -0
- package/types/keyboard/hooks/useWindowDimensions/index.d.ts.map +1 -0
- package/types/keyboard/index.d.ts +12 -0
- package/types/keyboard/index.d.ts.map +1 -0
- package/types/keyboard/internal.d.ts +37 -0
- package/types/keyboard/internal.d.ts.map +1 -0
- package/types/keyboard/module.d.ts +6 -0
- package/types/keyboard/module.d.ts.map +1 -0
- package/types/keyboard/reanimated.d.ts +5 -0
- package/types/keyboard/reanimated.d.ts.map +1 -0
- package/types/keyboard/reanimated.native.d.ts +12 -0
- package/types/keyboard/reanimated.native.d.ts.map +1 -0
- package/types/keyboard/typings/hooks.d.ts +168 -0
- package/types/keyboard/typings/hooks.d.ts.map +1 -0
- package/types/keyboard/typings/index.d.ts +6 -0
- package/types/keyboard/typings/index.d.ts.map +1 -0
- package/types/keyboard/typings/internal.d.ts +18 -0
- package/types/keyboard/typings/internal.d.ts.map +1 -0
- package/types/keyboard/typings/module.d.ts +122 -0
- package/types/keyboard/typings/module.d.ts.map +1 -0
- package/types/keyboard/typings/provider.d.ts +44 -0
- package/types/keyboard/typings/provider.d.ts.map +1 -0
- package/types/keyboard/typings/views.d.ts +61 -0
- package/types/keyboard/typings/views.d.ts.map +1 -0
- package/types/keyboard/utils/findNodeHandle/index.d.ts +5 -0
- package/types/keyboard/utils/findNodeHandle/index.d.ts.map +1 -0
- package/types/keyboard/utils/findNodeHandle/index.native.d.ts +3 -0
- package/types/keyboard/utils/findNodeHandle/index.native.d.ts.map +1 -0
- package/types/keyboard/views/KeyboardExtender/index.d.ts +20 -0
- package/types/keyboard/views/KeyboardExtender/index.d.ts.map +1 -0
- package/types/keyboard/views/KeyboardExtender/index.ios.d.ts +20 -0
- package/types/keyboard/views/KeyboardExtender/index.ios.d.ts.map +1 -0
- package/types/keyboard/views/OverKeyboardView/index.d.ts +19 -0
- package/types/keyboard/views/OverKeyboardView/index.d.ts.map +1 -0
- package/types/keyboard/views/index.d.ts +3 -0
- package/types/keyboard/views/index.d.ts.map +1 -0
- package/types/keyboard.d.ts +2 -0
- package/types/keyboard.d.ts.map +1 -0
- package/types/platform/specs/OneClippingScrollViewDecoratorViewNativeComponent.d.ts +11 -0
- package/types/platform/specs/OneClippingScrollViewDecoratorViewNativeComponent.d.ts.map +1 -0
- package/types/platform/specs/OneKeyboard.nitro.d.ts +39 -0
- package/types/platform/specs/OneKeyboard.nitro.d.ts.map +1 -0
- package/types/platform/specs/OneKeyboardBackgroundViewNativeComponent.d.ts +7 -0
- package/types/platform/specs/OneKeyboardBackgroundViewNativeComponent.d.ts.map +1 -0
- package/types/platform/specs/OneKeyboardControllerViewNativeComponent.d.ts +61 -0
- package/types/platform/specs/OneKeyboardControllerViewNativeComponent.d.ts.map +1 -0
- package/types/platform/specs/OneKeyboardExtenderNativeComponent.d.ts +9 -0
- package/types/platform/specs/OneKeyboardExtenderNativeComponent.d.ts.map +1 -0
- package/types/platform/specs/OneKeyboardGestureAreaNativeComponent.d.ts +13 -0
- package/types/platform/specs/OneKeyboardGestureAreaNativeComponent.d.ts.map +1 -0
- package/types/platform/specs/OneKeyboardToolbarGroupViewNativeComponent.d.ts +7 -0
- package/types/platform/specs/OneKeyboardToolbarGroupViewNativeComponent.d.ts.map +1 -0
- package/types/platform/specs/OneOverKeyboardViewNativeComponent.d.ts +8 -0
- package/types/platform/specs/OneOverKeyboardViewNativeComponent.d.ts.map +1 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { useLayoutEffect } from "react";
|
|
2
|
+
import { Platform } from "react-native-web";
|
|
3
|
+
import { runOnUI, useSharedValue } from "react-native-reanimated";
|
|
4
|
+
import { useKeyboardContext } from "../../context.mjs";
|
|
5
|
+
import { useKeyboardHandler } from "../../hooks/index.mjs";
|
|
6
|
+
|
|
7
|
+
// dist/esm/keyboard/components/KeyboardAvoidingView/hooks.js
|
|
8
|
+
const OS = Platform.OS;
|
|
9
|
+
const useKeyboardAnimation = () => {
|
|
10
|
+
const { reanimated } = useKeyboardContext();
|
|
11
|
+
const heightWhenOpened = useSharedValue(0);
|
|
12
|
+
const height = useSharedValue(0);
|
|
13
|
+
const progress = useSharedValue(0);
|
|
14
|
+
const isClosed = useSharedValue(true);
|
|
15
|
+
const hasReceivedEvent = useSharedValue(false);
|
|
16
|
+
useLayoutEffect(() => {
|
|
17
|
+
runOnUI(() => {
|
|
18
|
+
"worklet";
|
|
19
|
+
if (hasReceivedEvent.value) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
const initialHeight = -reanimated.height.value;
|
|
23
|
+
const initialProgress = reanimated.progress.value;
|
|
24
|
+
heightWhenOpened.value = initialHeight;
|
|
25
|
+
height.value = initialHeight;
|
|
26
|
+
progress.value = initialProgress;
|
|
27
|
+
isClosed.value = initialProgress === 0;
|
|
28
|
+
})();
|
|
29
|
+
}, []);
|
|
30
|
+
useKeyboardHandler({
|
|
31
|
+
onStart: (e) => {
|
|
32
|
+
"worklet";
|
|
33
|
+
hasReceivedEvent.value = true;
|
|
34
|
+
if (e.height > 0) {
|
|
35
|
+
isClosed.value = false;
|
|
36
|
+
heightWhenOpened.value = e.height;
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
onMove: (e) => {
|
|
40
|
+
"worklet";
|
|
41
|
+
hasReceivedEvent.value = true;
|
|
42
|
+
progress.value = e.progress;
|
|
43
|
+
height.value = e.height;
|
|
44
|
+
},
|
|
45
|
+
onInteractive: (e) => {
|
|
46
|
+
"worklet";
|
|
47
|
+
hasReceivedEvent.value = true;
|
|
48
|
+
progress.value = e.progress;
|
|
49
|
+
height.value = e.height;
|
|
50
|
+
},
|
|
51
|
+
onEnd: (e) => {
|
|
52
|
+
"worklet";
|
|
53
|
+
hasReceivedEvent.value = true;
|
|
54
|
+
isClosed.value = e.height === 0;
|
|
55
|
+
if (e.height > 0 && e.progress === 1) {
|
|
56
|
+
heightWhenOpened.value = e.height;
|
|
57
|
+
}
|
|
58
|
+
height.value = e.height;
|
|
59
|
+
progress.value = e.progress;
|
|
60
|
+
}
|
|
61
|
+
}, []);
|
|
62
|
+
return {
|
|
63
|
+
height,
|
|
64
|
+
progress,
|
|
65
|
+
heightWhenOpened,
|
|
66
|
+
isClosed
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
const useTranslateAnimation = () => {
|
|
70
|
+
const { reanimated } = useKeyboardContext();
|
|
71
|
+
const padding = useSharedValue(0);
|
|
72
|
+
const translate = useSharedValue(0);
|
|
73
|
+
const hasReceivedEvent = useSharedValue(false);
|
|
74
|
+
useLayoutEffect(() => {
|
|
75
|
+
runOnUI(() => {
|
|
76
|
+
"worklet";
|
|
77
|
+
if (!hasReceivedEvent.value) {
|
|
78
|
+
padding.value = reanimated.progress.value;
|
|
79
|
+
}
|
|
80
|
+
})();
|
|
81
|
+
}, []);
|
|
82
|
+
useKeyboardHandler({
|
|
83
|
+
onStart: (e) => {
|
|
84
|
+
"worklet";
|
|
85
|
+
hasReceivedEvent.value = true;
|
|
86
|
+
if (e.height === 0) {
|
|
87
|
+
padding.value = 0;
|
|
88
|
+
}
|
|
89
|
+
if (OS === "ios") {
|
|
90
|
+
translate.value = e.progress;
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
onMove: (e) => {
|
|
94
|
+
"worklet";
|
|
95
|
+
hasReceivedEvent.value = true;
|
|
96
|
+
if (OS !== "ios") {
|
|
97
|
+
translate.value = e.progress;
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
onInteractive: (e) => {
|
|
101
|
+
"worklet";
|
|
102
|
+
hasReceivedEvent.value = true;
|
|
103
|
+
padding.value = 0;
|
|
104
|
+
translate.value = e.progress;
|
|
105
|
+
},
|
|
106
|
+
onEnd: (e) => {
|
|
107
|
+
"worklet";
|
|
108
|
+
hasReceivedEvent.value = true;
|
|
109
|
+
padding.value = e.progress;
|
|
110
|
+
if (OS !== "ios") {
|
|
111
|
+
translate.value = e.progress;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}, []);
|
|
115
|
+
return {
|
|
116
|
+
translate,
|
|
117
|
+
padding
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
export { useKeyboardAnimation, useTranslateAnimation };
|
|
122
|
+
//# sourceMappingURL=hooks.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.js","names":[],"sources":["esm/keyboard/components/KeyboardAvoidingView/hooks.js"],"sourcesContent":["import { useLayoutEffect } from \"react\";\nimport { Platform } from \"react-native-web\";\nimport { runOnUI, useSharedValue } from \"react-native-reanimated\";\nimport { useKeyboardContext } from \"../../context\";\nimport { useKeyboardHandler } from \"../../hooks\";\nconst OS = Platform.OS;\nconst useKeyboardAnimation = () => {\n const { reanimated } = useKeyboardContext();\n const heightWhenOpened = useSharedValue(0);\n const height = useSharedValue(0);\n const progress = useSharedValue(0);\n const isClosed = useSharedValue(true);\n const hasReceivedEvent = useSharedValue(false);\n useLayoutEffect(() => {\n runOnUI(() => {\n \"worklet\";\n if (hasReceivedEvent.value) {\n return;\n }\n const initialHeight = -reanimated.height.value;\n const initialProgress = reanimated.progress.value;\n heightWhenOpened.value = initialHeight;\n height.value = initialHeight;\n progress.value = initialProgress;\n isClosed.value = initialProgress === 0;\n })();\n }, []);\n useKeyboardHandler(\n {\n onStart: (e) => {\n \"worklet\";\n hasReceivedEvent.value = true;\n if (e.height > 0) {\n isClosed.value = false;\n heightWhenOpened.value = e.height;\n }\n },\n onMove: (e) => {\n \"worklet\";\n hasReceivedEvent.value = true;\n progress.value = e.progress;\n height.value = e.height;\n },\n onInteractive: (e) => {\n \"worklet\";\n hasReceivedEvent.value = true;\n progress.value = e.progress;\n height.value = e.height;\n },\n onEnd: (e) => {\n \"worklet\";\n hasReceivedEvent.value = true;\n isClosed.value = e.height === 0;\n if (e.height > 0 && e.progress === 1) {\n heightWhenOpened.value = e.height;\n }\n height.value = e.height;\n progress.value = e.progress;\n }\n },\n []\n );\n return { height, progress, heightWhenOpened, isClosed };\n};\nconst useTranslateAnimation = () => {\n const { reanimated } = useKeyboardContext();\n const padding = useSharedValue(0);\n const translate = useSharedValue(0);\n const hasReceivedEvent = useSharedValue(false);\n useLayoutEffect(() => {\n runOnUI(() => {\n \"worklet\";\n if (!hasReceivedEvent.value) {\n padding.value = reanimated.progress.value;\n }\n })();\n }, []);\n useKeyboardHandler(\n {\n onStart: (e) => {\n \"worklet\";\n hasReceivedEvent.value = true;\n if (e.height === 0) {\n padding.value = 0;\n }\n if (OS === \"ios\") {\n translate.value = e.progress;\n }\n },\n onMove: (e) => {\n \"worklet\";\n hasReceivedEvent.value = true;\n if (OS !== \"ios\") {\n translate.value = e.progress;\n }\n },\n onInteractive: (e) => {\n \"worklet\";\n hasReceivedEvent.value = true;\n padding.value = 0;\n translate.value = e.progress;\n },\n onEnd: (e) => {\n \"worklet\";\n hasReceivedEvent.value = true;\n padding.value = e.progress;\n if (OS !== \"ios\") {\n translate.value = e.progress;\n }\n }\n },\n []\n );\n return { translate, padding };\n};\nexport {\n useKeyboardAnimation,\n useTranslateAnimation\n};\n//# sourceMappingURL=hooks.js.map\n"],"mappings":";;;;;;;AAKA,MAAM,KAAK,SAAS;AACpB,MAAM,6BAA6B;CACjC,MAAM,EAAE,eAAe,mBAAmB;CAC1C,MAAM,mBAAmB,eAAe,CAAC;CACzC,MAAM,SAAS,eAAe,CAAC;CAC/B,MAAM,WAAW,eAAe,CAAC;CACjC,MAAM,WAAW,eAAe,IAAI;CACpC,MAAM,mBAAmB,eAAe,KAAK;CAC7C,sBAAsB;EACpB,cAAc;GACZ;GACA,IAAI,iBAAiB,OAAO;IAC1B;GACF;GACA,MAAM,gBAAgB,CAAC,WAAW,OAAO;GACzC,MAAM,kBAAkB,WAAW,SAAS;GAC5C,iBAAiB,QAAQ;GACzB,OAAO,QAAQ;GACf,SAAS,QAAQ;GACjB,SAAS,QAAQ,oBAAoB;EACvC,CAAC,CAAC,CAAC;CACL,GAAG,CAAC,CAAC;CACL,mBACE;EACE,UAAU,MAAM;GACd;GACA,iBAAiB,QAAQ;GACzB,IAAI,EAAE,SAAS,GAAG;IAChB,SAAS,QAAQ;IACjB,iBAAiB,QAAQ,EAAE;GAC7B;EACF;EACA,SAAS,MAAM;GACb;GACA,iBAAiB,QAAQ;GACzB,SAAS,QAAQ,EAAE;GACnB,OAAO,QAAQ,EAAE;EACnB;EACA,gBAAgB,MAAM;GACpB;GACA,iBAAiB,QAAQ;GACzB,SAAS,QAAQ,EAAE;GACnB,OAAO,QAAQ,EAAE;EACnB;EACA,QAAQ,MAAM;GACZ;GACA,iBAAiB,QAAQ;GACzB,SAAS,QAAQ,EAAE,WAAW;GAC9B,IAAI,EAAE,SAAS,KAAK,EAAE,aAAa,GAAG;IACpC,iBAAiB,QAAQ,EAAE;GAC7B;GACA,OAAO,QAAQ,EAAE;GACjB,SAAS,QAAQ,EAAE;EACrB;CACF,GACA,CAAC,CACH;CACA,OAAO;EAAE;EAAQ;EAAU;EAAkB;CAAS;AACxD;AACA,MAAM,8BAA8B;CAClC,MAAM,EAAE,eAAe,mBAAmB;CAC1C,MAAM,UAAU,eAAe,CAAC;CAChC,MAAM,YAAY,eAAe,CAAC;CAClC,MAAM,mBAAmB,eAAe,KAAK;CAC7C,sBAAsB;EACpB,cAAc;GACZ;GACA,IAAI,CAAC,iBAAiB,OAAO;IAC3B,QAAQ,QAAQ,WAAW,SAAS;GACtC;EACF,CAAC,CAAC,CAAC;CACL,GAAG,CAAC,CAAC;CACL,mBACE;EACE,UAAU,MAAM;GACd;GACA,iBAAiB,QAAQ;GACzB,IAAI,EAAE,WAAW,GAAG;IAClB,QAAQ,QAAQ;GAClB;GACA,IAAI,OAAO,OAAO;IAChB,UAAU,QAAQ,EAAE;GACtB;EACF;EACA,SAAS,MAAM;GACb;GACA,iBAAiB,QAAQ;GACzB,IAAI,OAAO,OAAO;IAChB,UAAU,QAAQ,EAAE;GACtB;EACF;EACA,gBAAgB,MAAM;GACpB;GACA,iBAAiB,QAAQ;GACzB,QAAQ,QAAQ;GAChB,UAAU,QAAQ,EAAE;EACtB;EACA,QAAQ,MAAM;GACZ;GACA,iBAAiB,QAAQ;GACzB,QAAQ,QAAQ,EAAE;GAClB,IAAI,OAAO,OAAO;IAChB,UAAU,QAAQ,EAAE;GACtB;EACF;CACF,GACA,CAAC,CACH;CACA,OAAO;EAAE;EAAW;CAAQ;AAC9B"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { useLayoutEffect } from "react";
|
|
2
|
+
import { Platform } from "react-native";
|
|
3
|
+
import { runOnUI, useSharedValue } from "react-native-reanimated";
|
|
4
|
+
import { useKeyboardContext } from "../../context.native.js";
|
|
5
|
+
import { useKeyboardHandler } from "../../hooks/index.native.js";
|
|
6
|
+
|
|
7
|
+
// dist/esm/keyboard/components/KeyboardAvoidingView/hooks.native.js
|
|
8
|
+
var OS = Platform.OS;
|
|
9
|
+
var useKeyboardAnimation = function useKeyboardAnimation2() {
|
|
10
|
+
var { reanimated } = useKeyboardContext();
|
|
11
|
+
var heightWhenOpened = useSharedValue(0);
|
|
12
|
+
var height = useSharedValue(0);
|
|
13
|
+
var progress = useSharedValue(0);
|
|
14
|
+
var isClosed = useSharedValue(true);
|
|
15
|
+
var hasReceivedEvent = useSharedValue(false);
|
|
16
|
+
useLayoutEffect(function() {
|
|
17
|
+
runOnUI(function() {
|
|
18
|
+
"worklet";
|
|
19
|
+
if (hasReceivedEvent.value) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
var initialHeight = -reanimated.height.value;
|
|
23
|
+
var initialProgress = reanimated.progress.value;
|
|
24
|
+
heightWhenOpened.value = initialHeight;
|
|
25
|
+
height.value = initialHeight;
|
|
26
|
+
progress.value = initialProgress;
|
|
27
|
+
isClosed.value = initialProgress === 0;
|
|
28
|
+
})();
|
|
29
|
+
}, []);
|
|
30
|
+
useKeyboardHandler({
|
|
31
|
+
onStart: function onStart(e) {
|
|
32
|
+
"worklet";
|
|
33
|
+
hasReceivedEvent.value = true;
|
|
34
|
+
if (e.height > 0) {
|
|
35
|
+
isClosed.value = false;
|
|
36
|
+
heightWhenOpened.value = e.height;
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
onMove: function onMove(e) {
|
|
40
|
+
"worklet";
|
|
41
|
+
hasReceivedEvent.value = true;
|
|
42
|
+
progress.value = e.progress;
|
|
43
|
+
height.value = e.height;
|
|
44
|
+
},
|
|
45
|
+
onInteractive: function onInteractive(e) {
|
|
46
|
+
"worklet";
|
|
47
|
+
hasReceivedEvent.value = true;
|
|
48
|
+
progress.value = e.progress;
|
|
49
|
+
height.value = e.height;
|
|
50
|
+
},
|
|
51
|
+
onEnd: function onEnd(e) {
|
|
52
|
+
"worklet";
|
|
53
|
+
hasReceivedEvent.value = true;
|
|
54
|
+
isClosed.value = e.height === 0;
|
|
55
|
+
if (e.height > 0 && e.progress === 1) {
|
|
56
|
+
heightWhenOpened.value = e.height;
|
|
57
|
+
}
|
|
58
|
+
height.value = e.height;
|
|
59
|
+
progress.value = e.progress;
|
|
60
|
+
}
|
|
61
|
+
}, []);
|
|
62
|
+
return {
|
|
63
|
+
height,
|
|
64
|
+
progress,
|
|
65
|
+
heightWhenOpened,
|
|
66
|
+
isClosed
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
var useTranslateAnimation = function useTranslateAnimation2() {
|
|
70
|
+
var { reanimated } = useKeyboardContext();
|
|
71
|
+
var padding = useSharedValue(0);
|
|
72
|
+
var translate = useSharedValue(0);
|
|
73
|
+
var hasReceivedEvent = useSharedValue(false);
|
|
74
|
+
useLayoutEffect(function() {
|
|
75
|
+
runOnUI(function() {
|
|
76
|
+
"worklet";
|
|
77
|
+
if (!hasReceivedEvent.value) {
|
|
78
|
+
padding.value = reanimated.progress.value;
|
|
79
|
+
}
|
|
80
|
+
})();
|
|
81
|
+
}, []);
|
|
82
|
+
useKeyboardHandler({
|
|
83
|
+
onStart: function onStart(e) {
|
|
84
|
+
"worklet";
|
|
85
|
+
hasReceivedEvent.value = true;
|
|
86
|
+
if (e.height === 0) {
|
|
87
|
+
padding.value = 0;
|
|
88
|
+
}
|
|
89
|
+
if (OS === "ios") {
|
|
90
|
+
translate.value = e.progress;
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
onMove: function onMove(e) {
|
|
94
|
+
"worklet";
|
|
95
|
+
hasReceivedEvent.value = true;
|
|
96
|
+
if (OS !== "ios") {
|
|
97
|
+
translate.value = e.progress;
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
onInteractive: function onInteractive(e) {
|
|
101
|
+
"worklet";
|
|
102
|
+
hasReceivedEvent.value = true;
|
|
103
|
+
padding.value = 0;
|
|
104
|
+
translate.value = e.progress;
|
|
105
|
+
},
|
|
106
|
+
onEnd: function onEnd(e) {
|
|
107
|
+
"worklet";
|
|
108
|
+
hasReceivedEvent.value = true;
|
|
109
|
+
padding.value = e.progress;
|
|
110
|
+
if (OS !== "ios") {
|
|
111
|
+
translate.value = e.progress;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}, []);
|
|
115
|
+
return {
|
|
116
|
+
translate,
|
|
117
|
+
padding
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
export { useKeyboardAnimation, useTranslateAnimation };
|
|
122
|
+
//# sourceMappingURL=hooks.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.native.js","names":[],"sources":["esm/keyboard/components/KeyboardAvoidingView/hooks.native.js"],"sourcesContent":["import { useLayoutEffect } from \"react\";\nimport { Platform } from \"react-native\";\nimport { runOnUI, useSharedValue } from \"react-native-reanimated\";\nimport { useKeyboardContext } from \"../../context\";\nimport { useKeyboardHandler } from \"../../hooks\";\nvar OS = Platform.OS;\nvar useKeyboardAnimation = function useKeyboardAnimation2() {\n var { reanimated } = useKeyboardContext();\n var heightWhenOpened = useSharedValue(0);\n var height = useSharedValue(0);\n var progress = useSharedValue(0);\n var isClosed = useSharedValue(true);\n var hasReceivedEvent = useSharedValue(false);\n useLayoutEffect(function() {\n runOnUI(function() {\n \"worklet\";\n if (hasReceivedEvent.value) {\n return;\n }\n var initialHeight = -reanimated.height.value;\n var initialProgress = reanimated.progress.value;\n heightWhenOpened.value = initialHeight;\n height.value = initialHeight;\n progress.value = initialProgress;\n isClosed.value = initialProgress === 0;\n })();\n }, []);\n useKeyboardHandler({\n onStart: function onStart(e) {\n \"worklet\";\n hasReceivedEvent.value = true;\n if (e.height > 0) {\n isClosed.value = false;\n heightWhenOpened.value = e.height;\n }\n },\n onMove: function onMove(e) {\n \"worklet\";\n hasReceivedEvent.value = true;\n progress.value = e.progress;\n height.value = e.height;\n },\n onInteractive: function onInteractive(e) {\n \"worklet\";\n hasReceivedEvent.value = true;\n progress.value = e.progress;\n height.value = e.height;\n },\n onEnd: function onEnd(e) {\n \"worklet\";\n hasReceivedEvent.value = true;\n isClosed.value = e.height === 0;\n if (e.height > 0 && e.progress === 1) {\n heightWhenOpened.value = e.height;\n }\n height.value = e.height;\n progress.value = e.progress;\n }\n }, []);\n return {\n height,\n progress,\n heightWhenOpened,\n isClosed\n };\n};\nvar useTranslateAnimation = function useTranslateAnimation2() {\n var { reanimated } = useKeyboardContext();\n var padding = useSharedValue(0);\n var translate = useSharedValue(0);\n var hasReceivedEvent = useSharedValue(false);\n useLayoutEffect(function() {\n runOnUI(function() {\n \"worklet\";\n if (!hasReceivedEvent.value) {\n padding.value = reanimated.progress.value;\n }\n })();\n }, []);\n useKeyboardHandler({\n onStart: function onStart(e) {\n \"worklet\";\n hasReceivedEvent.value = true;\n if (e.height === 0) {\n padding.value = 0;\n }\n if (OS === \"ios\") {\n translate.value = e.progress;\n }\n },\n onMove: function onMove(e) {\n \"worklet\";\n hasReceivedEvent.value = true;\n if (OS !== \"ios\") {\n translate.value = e.progress;\n }\n },\n onInteractive: function onInteractive(e) {\n \"worklet\";\n hasReceivedEvent.value = true;\n padding.value = 0;\n translate.value = e.progress;\n },\n onEnd: function onEnd(e) {\n \"worklet\";\n hasReceivedEvent.value = true;\n padding.value = e.progress;\n if (OS !== \"ios\") {\n translate.value = e.progress;\n }\n }\n }, []);\n return {\n translate,\n padding\n };\n};\nexport {\n useKeyboardAnimation,\n useTranslateAnimation\n};\n//# sourceMappingURL=hooks.js.map\n"],"mappings":";;;;;;;AAKA,IAAI,KAAK,SAAS;AAClB,IAAI,uBAAuB,SAAS,wBAAwB;CAC1D,IAAI,EAAE,eAAe,mBAAmB;CACxC,IAAI,mBAAmB,eAAe,CAAC;CACvC,IAAI,SAAS,eAAe,CAAC;CAC7B,IAAI,WAAW,eAAe,CAAC;CAC/B,IAAI,WAAW,eAAe,IAAI;CAClC,IAAI,mBAAmB,eAAe,KAAK;CAC3C,gBAAgB,WAAW;EACzB,QAAQ,WAAW;GACjB;GACA,IAAI,iBAAiB,OAAO;IAC1B;GACF;GACA,IAAI,gBAAgB,CAAC,WAAW,OAAO;GACvC,IAAI,kBAAkB,WAAW,SAAS;GAC1C,iBAAiB,QAAQ;GACzB,OAAO,QAAQ;GACf,SAAS,QAAQ;GACjB,SAAS,QAAQ,oBAAoB;EACvC,CAAC,CAAC,CAAC;CACL,GAAG,CAAC,CAAC;CACL,mBAAmB;EACjB,SAAS,SAAS,QAAQ,GAAG;GAC3B;GACA,iBAAiB,QAAQ;GACzB,IAAI,EAAE,SAAS,GAAG;IAChB,SAAS,QAAQ;IACjB,iBAAiB,QAAQ,EAAE;GAC7B;EACF;EACA,QAAQ,SAAS,OAAO,GAAG;GACzB;GACA,iBAAiB,QAAQ;GACzB,SAAS,QAAQ,EAAE;GACnB,OAAO,QAAQ,EAAE;EACnB;EACA,eAAe,SAAS,cAAc,GAAG;GACvC;GACA,iBAAiB,QAAQ;GACzB,SAAS,QAAQ,EAAE;GACnB,OAAO,QAAQ,EAAE;EACnB;EACA,OAAO,SAAS,MAAM,GAAG;GACvB;GACA,iBAAiB,QAAQ;GACzB,SAAS,QAAQ,EAAE,WAAW;GAC9B,IAAI,EAAE,SAAS,KAAK,EAAE,aAAa,GAAG;IACpC,iBAAiB,QAAQ,EAAE;GAC7B;GACA,OAAO,QAAQ,EAAE;GACjB,SAAS,QAAQ,EAAE;EACrB;CACF,GAAG,CAAC,CAAC;CACL,OAAO;EACL;EACA;EACA;EACA;CACF;AACF;AACA,IAAI,wBAAwB,SAAS,yBAAyB;CAC5D,IAAI,EAAE,eAAe,mBAAmB;CACxC,IAAI,UAAU,eAAe,CAAC;CAC9B,IAAI,YAAY,eAAe,CAAC;CAChC,IAAI,mBAAmB,eAAe,KAAK;CAC3C,gBAAgB,WAAW;EACzB,QAAQ,WAAW;GACjB;GACA,IAAI,CAAC,iBAAiB,OAAO;IAC3B,QAAQ,QAAQ,WAAW,SAAS;GACtC;EACF,CAAC,CAAC,CAAC;CACL,GAAG,CAAC,CAAC;CACL,mBAAmB;EACjB,SAAS,SAAS,QAAQ,GAAG;GAC3B;GACA,iBAAiB,QAAQ;GACzB,IAAI,EAAE,WAAW,GAAG;IAClB,QAAQ,QAAQ;GAClB;GACA,IAAI,OAAO,OAAO;IAChB,UAAU,QAAQ,EAAE;GACtB;EACF;EACA,QAAQ,SAAS,OAAO,GAAG;GACzB;GACA,iBAAiB,QAAQ;GACzB,IAAI,OAAO,OAAO;IAChB,UAAU,QAAQ,EAAE;GACtB;EACF;EACA,eAAe,SAAS,cAAc,GAAG;GACvC;GACA,iBAAiB,QAAQ;GACzB,QAAQ,QAAQ;GAChB,UAAU,QAAQ,EAAE;EACtB;EACA,OAAO,SAAS,MAAM,GAAG;GACvB;GACA,iBAAiB,QAAQ;GACzB,QAAQ,QAAQ,EAAE;GAClB,IAAI,OAAO,OAAO;IAChB,UAAU,QAAQ,EAAE;GACtB;EACF;CACF,GAAG,CAAC,CAAC;CACL,OAAO;EACL;EACA;CACF;AACF"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import React, { forwardRef, useCallback, useMemo } from "react";
|
|
2
|
+
import { StyleSheet, View } from "react-native-web";
|
|
3
|
+
import Reanimated, { interpolate, runOnUI, useSharedValue } from "react-native-reanimated";
|
|
4
|
+
import { KeyboardControllerNative } from "../../bindings.mjs";
|
|
5
|
+
import { useWindowDimensions } from "../../hooks/index.mjs";
|
|
6
|
+
import { useAnimatedStyle, useDerivedValue } from "../../reanimated.mjs";
|
|
7
|
+
import { findNodeHandle } from "../../utils/findNodeHandle/index.mjs";
|
|
8
|
+
import useCombinedRef from "../hooks/useCombinedRef.mjs";
|
|
9
|
+
import { useKeyboardAnimation, useTranslateAnimation } from "./hooks.mjs";
|
|
10
|
+
import { jsx } from "react/jsx-runtime";
|
|
11
|
+
|
|
12
|
+
// dist/esm/keyboard/components/KeyboardAvoidingView/index.js
|
|
13
|
+
const defaultLayout = {
|
|
14
|
+
x: 0,
|
|
15
|
+
y: 0,
|
|
16
|
+
width: 0,
|
|
17
|
+
height: 0
|
|
18
|
+
};
|
|
19
|
+
const KeyboardAvoidingView = forwardRef(({ behavior, children, contentContainerStyle, enabled = true, keyboardVerticalOffset = 0, automaticOffset = false, style, onLayout: onLayoutProps, ...props }, ref) => {
|
|
20
|
+
const initialFrame = useSharedValue(null);
|
|
21
|
+
const internalRef = React.useRef(null);
|
|
22
|
+
const frame = useDerivedValue(() => initialFrame.value || defaultLayout);
|
|
23
|
+
const { translate, padding } = useTranslateAnimation();
|
|
24
|
+
const keyboard = useKeyboardAnimation();
|
|
25
|
+
const { height: screenHeight } = useWindowDimensions();
|
|
26
|
+
const relativeKeyboardHeight = useCallback(() => {
|
|
27
|
+
"worklet";
|
|
28
|
+
const keyboardY = screenHeight - keyboard.heightWhenOpened.value - keyboardVerticalOffset;
|
|
29
|
+
return Math.max(frame.value.y + frame.value.height - keyboardY, 0);
|
|
30
|
+
}, [screenHeight, keyboardVerticalOffset]);
|
|
31
|
+
const interpolateToRelativeKeyboardHeight = useCallback((value) => {
|
|
32
|
+
"worklet";
|
|
33
|
+
return interpolate(value, [0, 1], [0, relativeKeyboardHeight()]);
|
|
34
|
+
}, [relativeKeyboardHeight]);
|
|
35
|
+
const onLayoutWorklet = useCallback((layout) => {
|
|
36
|
+
"worklet";
|
|
37
|
+
if (keyboard.isClosed.value || initialFrame.value === null || behavior !== "height") {
|
|
38
|
+
initialFrame.value = layout;
|
|
39
|
+
}
|
|
40
|
+
}, [behavior]);
|
|
41
|
+
const onLayout = useCallback((e) => {
|
|
42
|
+
onLayoutProps?.(e);
|
|
43
|
+
const layout = e.nativeEvent.layout;
|
|
44
|
+
if (automaticOffset) {
|
|
45
|
+
const tag = findNodeHandle(internalRef.current);
|
|
46
|
+
if (tag !== null) {
|
|
47
|
+
return KeyboardControllerNative.viewPositionInWindow(tag).then((position) => {
|
|
48
|
+
runOnUI(onLayoutWorklet)({
|
|
49
|
+
...layout,
|
|
50
|
+
x: position.x,
|
|
51
|
+
y: position.y
|
|
52
|
+
});
|
|
53
|
+
}).catch(() => {
|
|
54
|
+
runOnUI(onLayoutWorklet)(layout);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return runOnUI(onLayoutWorklet)(layout);
|
|
59
|
+
}, [onLayoutProps, automaticOffset]);
|
|
60
|
+
const isPositionBehavior = behavior === "position";
|
|
61
|
+
const containerStyle = isPositionBehavior ? contentContainerStyle : style;
|
|
62
|
+
const originalStyle = useMemo(() => StyleSheet.flatten(containerStyle), [containerStyle]);
|
|
63
|
+
const animatedStyle = useAnimatedStyle(() => {
|
|
64
|
+
if (!enabled) {
|
|
65
|
+
switch (behavior) {
|
|
66
|
+
case "height": return {
|
|
67
|
+
height: originalStyle?.height ?? "auto",
|
|
68
|
+
flex: originalStyle?.flex
|
|
69
|
+
};
|
|
70
|
+
case "position": return { bottom: originalStyle?.bottom ?? "auto" };
|
|
71
|
+
case "padding": return { paddingBottom: originalStyle?.paddingBottom ?? originalStyle?.paddingVertical ?? originalStyle?.padding ?? 0 };
|
|
72
|
+
case "translate-with-padding": return {
|
|
73
|
+
paddingTop: originalStyle?.paddingTop ?? originalStyle?.paddingVertical ?? originalStyle?.padding ?? 0,
|
|
74
|
+
transform: originalStyle?.transform ?? []
|
|
75
|
+
};
|
|
76
|
+
default: return {};
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
const bottom = interpolateToRelativeKeyboardHeight(keyboard.progress.value);
|
|
80
|
+
const translateY = interpolateToRelativeKeyboardHeight(translate.value);
|
|
81
|
+
const paddingBottom = interpolateToRelativeKeyboardHeight(padding.value);
|
|
82
|
+
const height = frame.value.height - bottom;
|
|
83
|
+
switch (behavior) {
|
|
84
|
+
case "height":
|
|
85
|
+
if (!keyboard.isClosed.value && height > 0) {
|
|
86
|
+
return {
|
|
87
|
+
height,
|
|
88
|
+
flex: 0
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
return {};
|
|
92
|
+
case "position": return { bottom };
|
|
93
|
+
case "padding": return { paddingBottom: bottom };
|
|
94
|
+
case "translate-with-padding": return {
|
|
95
|
+
paddingTop: paddingBottom,
|
|
96
|
+
transform: [{ translateY: -translateY }]
|
|
97
|
+
};
|
|
98
|
+
default: return {};
|
|
99
|
+
}
|
|
100
|
+
}, [
|
|
101
|
+
behavior,
|
|
102
|
+
enabled,
|
|
103
|
+
interpolateToRelativeKeyboardHeight,
|
|
104
|
+
originalStyle
|
|
105
|
+
]);
|
|
106
|
+
const combinedRef = useCombinedRef(internalRef, ref);
|
|
107
|
+
const combinedStyles = useMemo(() => [containerStyle, animatedStyle], [containerStyle, animatedStyle]);
|
|
108
|
+
if (isPositionBehavior) {
|
|
109
|
+
return /* @__PURE__ */ jsx(View, {
|
|
110
|
+
ref: combinedRef,
|
|
111
|
+
style,
|
|
112
|
+
onLayout,
|
|
113
|
+
...props,
|
|
114
|
+
children: /* @__PURE__ */ jsx(Reanimated.View, {
|
|
115
|
+
style: combinedStyles,
|
|
116
|
+
children
|
|
117
|
+
})
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
return /* @__PURE__ */ jsx(Reanimated.View, {
|
|
121
|
+
ref: combinedRef,
|
|
122
|
+
style: combinedStyles,
|
|
123
|
+
onLayout,
|
|
124
|
+
...props,
|
|
125
|
+
children
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
var KeyboardAvoidingView_default = KeyboardAvoidingView;
|
|
129
|
+
|
|
130
|
+
export { KeyboardAvoidingView_default as default };
|
|
131
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["esm/keyboard/components/KeyboardAvoidingView/index.js"],"sourcesContent":["import React, { forwardRef, useCallback, useMemo } from \"react\";\nimport { StyleSheet, View } from \"react-native-web\";\nimport Reanimated, { interpolate, runOnUI, useSharedValue } from \"react-native-reanimated\";\nimport { KeyboardControllerNative } from \"../../bindings\";\nimport { useWindowDimensions } from \"../../hooks\";\nimport { useAnimatedStyle, useDerivedValue } from \"../../reanimated\";\nimport { findNodeHandle } from \"../../utils/findNodeHandle\";\nimport useCombinedRef from \"../hooks/useCombinedRef\";\nimport { useKeyboardAnimation, useTranslateAnimation } from \"./hooks\";\nimport { jsx } from \"react/jsx-runtime\";\nconst defaultLayout = {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n};\nconst KeyboardAvoidingView = forwardRef(\n ({\n behavior,\n children,\n contentContainerStyle,\n enabled = true,\n keyboardVerticalOffset = 0,\n automaticOffset = false,\n style,\n onLayout: onLayoutProps,\n ...props\n }, ref) => {\n const initialFrame = useSharedValue(null);\n const internalRef = React.useRef(null);\n const frame = useDerivedValue(() => initialFrame.value || defaultLayout);\n const { translate, padding } = useTranslateAnimation();\n const keyboard = useKeyboardAnimation();\n const { height: screenHeight } = useWindowDimensions();\n const relativeKeyboardHeight = useCallback(() => {\n \"worklet\";\n const keyboardY = screenHeight - keyboard.heightWhenOpened.value - keyboardVerticalOffset;\n return Math.max(frame.value.y + frame.value.height - keyboardY, 0);\n }, [screenHeight, keyboardVerticalOffset]);\n const interpolateToRelativeKeyboardHeight = useCallback(\n (value) => {\n \"worklet\";\n return interpolate(value, [0, 1], [0, relativeKeyboardHeight()]);\n },\n [relativeKeyboardHeight]\n );\n const onLayoutWorklet = useCallback(\n (layout) => {\n \"worklet\";\n if (keyboard.isClosed.value || initialFrame.value === null || behavior !== \"height\") {\n initialFrame.value = layout;\n }\n },\n [behavior]\n );\n const onLayout = useCallback(\n (e) => {\n onLayoutProps?.(e);\n const layout = e.nativeEvent.layout;\n if (automaticOffset) {\n const tag = findNodeHandle(internalRef.current);\n if (tag !== null) {\n return KeyboardControllerNative.viewPositionInWindow(tag).then((position) => {\n runOnUI(onLayoutWorklet)({\n ...layout,\n x: position.x,\n y: position.y\n });\n }).catch(() => {\n runOnUI(onLayoutWorklet)(layout);\n });\n }\n }\n return runOnUI(onLayoutWorklet)(layout);\n },\n [onLayoutProps, automaticOffset]\n );\n const isPositionBehavior = behavior === \"position\";\n const containerStyle = isPositionBehavior ? contentContainerStyle : style;\n const originalStyle = useMemo(\n () => StyleSheet.flatten(containerStyle),\n [containerStyle]\n );\n const animatedStyle = useAnimatedStyle(() => {\n if (!enabled) {\n switch (behavior) {\n case \"height\":\n return {\n height: originalStyle?.height ?? \"auto\",\n flex: originalStyle?.flex\n };\n case \"position\":\n return { bottom: originalStyle?.bottom ?? \"auto\" };\n case \"padding\":\n return {\n paddingBottom: originalStyle?.paddingBottom ?? originalStyle?.paddingVertical ?? originalStyle?.padding ?? 0\n };\n case \"translate-with-padding\":\n return {\n paddingTop: originalStyle?.paddingTop ?? originalStyle?.paddingVertical ?? originalStyle?.padding ?? 0,\n transform: originalStyle?.transform ?? []\n };\n default:\n return {};\n }\n }\n const bottom = interpolateToRelativeKeyboardHeight(keyboard.progress.value);\n const translateY = interpolateToRelativeKeyboardHeight(translate.value);\n const paddingBottom = interpolateToRelativeKeyboardHeight(padding.value);\n const height = frame.value.height - bottom;\n switch (behavior) {\n case \"height\":\n if (!keyboard.isClosed.value && height > 0) {\n return {\n height,\n flex: 0\n };\n }\n return {};\n case \"position\":\n return { bottom };\n case \"padding\":\n return { paddingBottom: bottom };\n case \"translate-with-padding\":\n return {\n paddingTop: paddingBottom,\n transform: [{ translateY: -translateY }]\n };\n default:\n return {};\n }\n }, [behavior, enabled, interpolateToRelativeKeyboardHeight, originalStyle]);\n const combinedRef = useCombinedRef(internalRef, ref);\n const combinedStyles = useMemo(\n () => [containerStyle, animatedStyle],\n [containerStyle, animatedStyle]\n );\n if (isPositionBehavior) {\n return /* @__PURE__ */ jsx(View, { ref: combinedRef, style, onLayout, ...props, children: /* @__PURE__ */ jsx(Reanimated.View, { style: combinedStyles, children }) });\n }\n return /* @__PURE__ */ jsx(\n Reanimated.View,\n {\n ref: combinedRef,\n style: combinedStyles,\n onLayout,\n ...props,\n children\n }\n );\n }\n);\nvar KeyboardAvoidingView_default = KeyboardAvoidingView;\nexport {\n KeyboardAvoidingView_default as default\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":"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"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import React, { forwardRef, useCallback, useMemo } from "react";
|
|
3
|
+
import { StyleSheet, View } from "react-native";
|
|
4
|
+
import Reanimated, { interpolate, runOnUI, useSharedValue } from "react-native-reanimated";
|
|
5
|
+
import { KeyboardControllerNative } from "../../bindings.native.js";
|
|
6
|
+
import { useWindowDimensions } from "../../hooks/index.native.js";
|
|
7
|
+
import { useAnimatedStyle, useDerivedValue } from "../../reanimated.native.js";
|
|
8
|
+
import { findNodeHandle } from "../../utils/findNodeHandle/index.native.js";
|
|
9
|
+
import useCombinedRef from "../hooks/useCombinedRef.native.js";
|
|
10
|
+
import { useKeyboardAnimation, useTranslateAnimation } from "./hooks.native.js";
|
|
11
|
+
|
|
12
|
+
// dist/esm/keyboard/components/KeyboardAvoidingView/index.native.js
|
|
13
|
+
var defaultLayout = {
|
|
14
|
+
x: 0,
|
|
15
|
+
y: 0,
|
|
16
|
+
width: 0,
|
|
17
|
+
height: 0
|
|
18
|
+
};
|
|
19
|
+
var KeyboardAvoidingView = /* @__PURE__ */ forwardRef(function(param, ref) {
|
|
20
|
+
var { behavior, children, contentContainerStyle, enabled = true, keyboardVerticalOffset = 0, automaticOffset = false, style, onLayout: onLayoutProps, ...props } = param;
|
|
21
|
+
var initialFrame = useSharedValue(null);
|
|
22
|
+
var internalRef = React.useRef(null);
|
|
23
|
+
var frame = useDerivedValue(function() {
|
|
24
|
+
return initialFrame.value || defaultLayout;
|
|
25
|
+
});
|
|
26
|
+
var { translate, padding } = useTranslateAnimation();
|
|
27
|
+
var keyboard = useKeyboardAnimation();
|
|
28
|
+
var { height: screenHeight } = useWindowDimensions();
|
|
29
|
+
var relativeKeyboardHeight = useCallback(function() {
|
|
30
|
+
"worklet";
|
|
31
|
+
var keyboardY = screenHeight - keyboard.heightWhenOpened.value - keyboardVerticalOffset;
|
|
32
|
+
return Math.max(frame.value.y + frame.value.height - keyboardY, 0);
|
|
33
|
+
}, [screenHeight, keyboardVerticalOffset]);
|
|
34
|
+
var interpolateToRelativeKeyboardHeight = useCallback(function(value) {
|
|
35
|
+
"worklet";
|
|
36
|
+
return interpolate(value, [0, 1], [0, relativeKeyboardHeight()]);
|
|
37
|
+
}, [relativeKeyboardHeight]);
|
|
38
|
+
var onLayoutWorklet = useCallback(function(layout) {
|
|
39
|
+
"worklet";
|
|
40
|
+
if (keyboard.isClosed.value || initialFrame.value === null || behavior !== "height") {
|
|
41
|
+
initialFrame.value = layout;
|
|
42
|
+
}
|
|
43
|
+
}, [behavior]);
|
|
44
|
+
var onLayout = useCallback(function(e) {
|
|
45
|
+
onLayoutProps === null || onLayoutProps === void 0 ? void 0 : onLayoutProps(e);
|
|
46
|
+
var layout = e.nativeEvent.layout;
|
|
47
|
+
if (automaticOffset) {
|
|
48
|
+
var tag = findNodeHandle(internalRef.current);
|
|
49
|
+
if (tag !== null) {
|
|
50
|
+
return KeyboardControllerNative.viewPositionInWindow(tag).then(function(position) {
|
|
51
|
+
runOnUI(onLayoutWorklet)({
|
|
52
|
+
...layout,
|
|
53
|
+
x: position.x,
|
|
54
|
+
y: position.y
|
|
55
|
+
});
|
|
56
|
+
}).catch(function() {
|
|
57
|
+
runOnUI(onLayoutWorklet)(layout);
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return runOnUI(onLayoutWorklet)(layout);
|
|
62
|
+
}, [onLayoutProps, automaticOffset]);
|
|
63
|
+
var isPositionBehavior = behavior === "position";
|
|
64
|
+
var containerStyle = isPositionBehavior ? contentContainerStyle : style;
|
|
65
|
+
var originalStyle = useMemo(function() {
|
|
66
|
+
return StyleSheet.flatten(containerStyle);
|
|
67
|
+
}, [containerStyle]);
|
|
68
|
+
var animatedStyle = useAnimatedStyle(function() {
|
|
69
|
+
if (!enabled) {
|
|
70
|
+
switch (behavior) {
|
|
71
|
+
case "height":
|
|
72
|
+
var _ref;
|
|
73
|
+
return {
|
|
74
|
+
height: (_ref = originalStyle === null || originalStyle === void 0 ? void 0 : originalStyle.height) !== null && _ref !== void 0 ? _ref : "auto",
|
|
75
|
+
flex: originalStyle === null || originalStyle === void 0 ? void 0 : originalStyle.flex
|
|
76
|
+
};
|
|
77
|
+
case "position":
|
|
78
|
+
var _ref1;
|
|
79
|
+
return { bottom: (_ref1 = originalStyle === null || originalStyle === void 0 ? void 0 : originalStyle.bottom) !== null && _ref1 !== void 0 ? _ref1 : "auto" };
|
|
80
|
+
case "padding":
|
|
81
|
+
var _ref2, _ref3, _ref4;
|
|
82
|
+
return { paddingBottom: (_ref2 = (_ref3 = (_ref4 = originalStyle === null || originalStyle === void 0 ? void 0 : originalStyle.paddingBottom) !== null && _ref4 !== void 0 ? _ref4 : originalStyle === null || originalStyle === void 0 ? void 0 : originalStyle.paddingVertical) !== null && _ref3 !== void 0 ? _ref3 : originalStyle === null || originalStyle === void 0 ? void 0 : originalStyle.padding) !== null && _ref2 !== void 0 ? _ref2 : 0 };
|
|
83
|
+
case "translate-with-padding":
|
|
84
|
+
var _ref5, _ref6, _ref7, _ref8;
|
|
85
|
+
return {
|
|
86
|
+
paddingTop: (_ref5 = (_ref6 = (_ref7 = originalStyle === null || originalStyle === void 0 ? void 0 : originalStyle.paddingTop) !== null && _ref7 !== void 0 ? _ref7 : originalStyle === null || originalStyle === void 0 ? void 0 : originalStyle.paddingVertical) !== null && _ref6 !== void 0 ? _ref6 : originalStyle === null || originalStyle === void 0 ? void 0 : originalStyle.padding) !== null && _ref5 !== void 0 ? _ref5 : 0,
|
|
87
|
+
transform: (_ref8 = originalStyle === null || originalStyle === void 0 ? void 0 : originalStyle.transform) !== null && _ref8 !== void 0 ? _ref8 : []
|
|
88
|
+
};
|
|
89
|
+
default: return {};
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
var bottom = interpolateToRelativeKeyboardHeight(keyboard.progress.value);
|
|
93
|
+
var translateY = interpolateToRelativeKeyboardHeight(translate.value);
|
|
94
|
+
var paddingBottom = interpolateToRelativeKeyboardHeight(padding.value);
|
|
95
|
+
var height = frame.value.height - bottom;
|
|
96
|
+
switch (behavior) {
|
|
97
|
+
case "height":
|
|
98
|
+
if (!keyboard.isClosed.value && height > 0) {
|
|
99
|
+
return {
|
|
100
|
+
height,
|
|
101
|
+
flex: 0
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
return {};
|
|
105
|
+
case "position": return { bottom };
|
|
106
|
+
case "padding": return { paddingBottom: bottom };
|
|
107
|
+
case "translate-with-padding": return {
|
|
108
|
+
paddingTop: paddingBottom,
|
|
109
|
+
transform: [{ translateY: -translateY }]
|
|
110
|
+
};
|
|
111
|
+
default: return {};
|
|
112
|
+
}
|
|
113
|
+
}, [
|
|
114
|
+
behavior,
|
|
115
|
+
enabled,
|
|
116
|
+
interpolateToRelativeKeyboardHeight,
|
|
117
|
+
originalStyle
|
|
118
|
+
]);
|
|
119
|
+
var combinedRef = useCombinedRef(internalRef, ref);
|
|
120
|
+
var combinedStyles = useMemo(function() {
|
|
121
|
+
return [containerStyle, animatedStyle];
|
|
122
|
+
}, [containerStyle, animatedStyle]);
|
|
123
|
+
if (isPositionBehavior) {
|
|
124
|
+
return /* @__PURE__ */ jsx(View, {
|
|
125
|
+
ref: combinedRef,
|
|
126
|
+
style,
|
|
127
|
+
onLayout,
|
|
128
|
+
...props,
|
|
129
|
+
children: /* @__PURE__ */ jsx(Reanimated.View, {
|
|
130
|
+
style: combinedStyles,
|
|
131
|
+
children
|
|
132
|
+
})
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
return /* @__PURE__ */ jsx(Reanimated.View, {
|
|
136
|
+
ref: combinedRef,
|
|
137
|
+
style: combinedStyles,
|
|
138
|
+
onLayout,
|
|
139
|
+
...props,
|
|
140
|
+
children
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
var KeyboardAvoidingView_default = KeyboardAvoidingView;
|
|
144
|
+
|
|
145
|
+
export { KeyboardAvoidingView_default as default };
|
|
146
|
+
//# sourceMappingURL=index.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.native.js","names":[],"sources":["esm/keyboard/components/KeyboardAvoidingView/index.native.js"],"sourcesContent":["import { jsx as _jsx } from \"react/jsx-runtime\";\nimport React, { forwardRef, useCallback, useMemo } from \"react\";\nimport { StyleSheet, View } from \"react-native\";\nimport Reanimated, { interpolate, runOnUI, useSharedValue } from \"react-native-reanimated\";\nimport { KeyboardControllerNative } from \"../../bindings\";\nimport { useWindowDimensions } from \"../../hooks\";\nimport { useAnimatedStyle, useDerivedValue } from \"../../reanimated\";\nimport { findNodeHandle } from \"../../utils/findNodeHandle\";\nimport useCombinedRef from \"../hooks/useCombinedRef\";\nimport { useKeyboardAnimation, useTranslateAnimation } from \"./hooks\";\nvar defaultLayout = {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n};\nvar KeyboardAvoidingView = /* @__PURE__ */ forwardRef(function(param, ref) {\n var { behavior, children, contentContainerStyle, enabled = true, keyboardVerticalOffset = 0, automaticOffset = false, style, onLayout: onLayoutProps, ...props } = param;\n var initialFrame = useSharedValue(null);\n var internalRef = React.useRef(null);\n var frame = useDerivedValue(function() {\n return initialFrame.value || defaultLayout;\n });\n var { translate, padding } = useTranslateAnimation();\n var keyboard = useKeyboardAnimation();\n var { height: screenHeight } = useWindowDimensions();\n var relativeKeyboardHeight = useCallback(function() {\n \"worklet\";\n var keyboardY = screenHeight - keyboard.heightWhenOpened.value - keyboardVerticalOffset;\n return Math.max(frame.value.y + frame.value.height - keyboardY, 0);\n }, [\n screenHeight,\n keyboardVerticalOffset\n ]);\n var interpolateToRelativeKeyboardHeight = useCallback(function(value) {\n \"worklet\";\n return interpolate(value, [\n 0,\n 1\n ], [\n 0,\n relativeKeyboardHeight()\n ]);\n }, [\n relativeKeyboardHeight\n ]);\n var onLayoutWorklet = useCallback(function(layout) {\n \"worklet\";\n if (keyboard.isClosed.value || initialFrame.value === null || behavior !== \"height\") {\n initialFrame.value = layout;\n }\n }, [\n behavior\n ]);\n var onLayout = useCallback(function(e) {\n onLayoutProps === null || onLayoutProps === void 0 ? void 0 : onLayoutProps(e);\n var layout = e.nativeEvent.layout;\n if (automaticOffset) {\n var tag = findNodeHandle(internalRef.current);\n if (tag !== null) {\n return KeyboardControllerNative.viewPositionInWindow(tag).then(function(position) {\n runOnUI(onLayoutWorklet)({\n ...layout,\n x: position.x,\n y: position.y\n });\n }).catch(function() {\n runOnUI(onLayoutWorklet)(layout);\n });\n }\n }\n return runOnUI(onLayoutWorklet)(layout);\n }, [\n onLayoutProps,\n automaticOffset\n ]);\n var isPositionBehavior = behavior === \"position\";\n var containerStyle = isPositionBehavior ? contentContainerStyle : style;\n var originalStyle = useMemo(function() {\n return StyleSheet.flatten(containerStyle);\n }, [\n containerStyle\n ]);\n var animatedStyle = useAnimatedStyle(function() {\n if (!enabled) {\n switch (behavior) {\n case \"height\":\n var _ref;\n return {\n height: (_ref = originalStyle === null || originalStyle === void 0 ? void 0 : originalStyle.height) !== null && _ref !== void 0 ? _ref : \"auto\",\n flex: originalStyle === null || originalStyle === void 0 ? void 0 : originalStyle.flex\n };\n case \"position\":\n var _ref1;\n return {\n bottom: (_ref1 = originalStyle === null || originalStyle === void 0 ? void 0 : originalStyle.bottom) !== null && _ref1 !== void 0 ? _ref1 : \"auto\"\n };\n case \"padding\":\n var _ref2, _ref3, _ref4;\n return {\n paddingBottom: (_ref2 = (_ref3 = (_ref4 = originalStyle === null || originalStyle === void 0 ? void 0 : originalStyle.paddingBottom) !== null && _ref4 !== void 0 ? _ref4 : originalStyle === null || originalStyle === void 0 ? void 0 : originalStyle.paddingVertical) !== null && _ref3 !== void 0 ? _ref3 : originalStyle === null || originalStyle === void 0 ? void 0 : originalStyle.padding) !== null && _ref2 !== void 0 ? _ref2 : 0\n };\n case \"translate-with-padding\":\n var _ref5, _ref6, _ref7, _ref8;\n return {\n paddingTop: (_ref5 = (_ref6 = (_ref7 = originalStyle === null || originalStyle === void 0 ? void 0 : originalStyle.paddingTop) !== null && _ref7 !== void 0 ? _ref7 : originalStyle === null || originalStyle === void 0 ? void 0 : originalStyle.paddingVertical) !== null && _ref6 !== void 0 ? _ref6 : originalStyle === null || originalStyle === void 0 ? void 0 : originalStyle.padding) !== null && _ref5 !== void 0 ? _ref5 : 0,\n transform: (_ref8 = originalStyle === null || originalStyle === void 0 ? void 0 : originalStyle.transform) !== null && _ref8 !== void 0 ? _ref8 : []\n };\n default:\n return {};\n }\n }\n var bottom = interpolateToRelativeKeyboardHeight(keyboard.progress.value);\n var translateY = interpolateToRelativeKeyboardHeight(translate.value);\n var paddingBottom = interpolateToRelativeKeyboardHeight(padding.value);\n var height = frame.value.height - bottom;\n switch (behavior) {\n case \"height\":\n if (!keyboard.isClosed.value && height > 0) {\n return {\n height,\n flex: 0\n };\n }\n return {};\n case \"position\":\n return {\n bottom\n };\n case \"padding\":\n return {\n paddingBottom: bottom\n };\n case \"translate-with-padding\":\n return {\n paddingTop: paddingBottom,\n transform: [\n {\n translateY: -translateY\n }\n ]\n };\n default:\n return {};\n }\n }, [\n behavior,\n enabled,\n interpolateToRelativeKeyboardHeight,\n originalStyle\n ]);\n var combinedRef = useCombinedRef(internalRef, ref);\n var combinedStyles = useMemo(function() {\n return [\n containerStyle,\n animatedStyle\n ];\n }, [\n containerStyle,\n animatedStyle\n ]);\n if (isPositionBehavior) {\n return /* @__PURE__ */ _jsx(View, {\n ref: combinedRef,\n style,\n onLayout,\n ...props,\n children: /* @__PURE__ */ _jsx(Reanimated.View, {\n style: combinedStyles,\n children\n })\n });\n }\n return /* @__PURE__ */ _jsx(Reanimated.View, {\n ref: combinedRef,\n style: combinedStyles,\n onLayout,\n ...props,\n children\n });\n});\nvar KeyboardAvoidingView_default = KeyboardAvoidingView;\nexport {\n KeyboardAvoidingView_default as default\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":"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"}
|