one 2.19.0 → 2.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { useMemo } from "react";
|
|
2
|
+
import { runOnJS } from "react-native-reanimated";
|
|
3
|
+
import { useAnimatedReaction, useDerivedValue } from "../../reanimated.mjs";
|
|
4
|
+
import { isScrollAtEnd } from "./useChatKeyboard/helpers.mjs";
|
|
5
|
+
|
|
6
|
+
// dist/esm/keyboard/components/KeyboardChatScrollView/useEndVisible.js
|
|
7
|
+
const hasWorkletHash = (value) => typeof value === "function" && !!value.__workletHash;
|
|
8
|
+
const useEndVisible = ({ scroll, layout, size, inverted, onEndVisible }) => {
|
|
9
|
+
const isWorklet = useMemo(() => hasWorkletHash(onEndVisible), [onEndVisible]);
|
|
10
|
+
const isAtEnd = useDerivedValue(() => {
|
|
11
|
+
if (layout.value.height === 0 || size.value.height === 0) {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
return isScrollAtEnd(scroll.value, layout.value.height, size.value.height, inverted);
|
|
15
|
+
});
|
|
16
|
+
useAnimatedReaction(() => isAtEnd.value, (current, previous) => {
|
|
17
|
+
if (current === null || current === previous || !onEndVisible) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
if (isWorklet) {
|
|
21
|
+
onEndVisible(current);
|
|
22
|
+
} else {
|
|
23
|
+
runOnJS(onEndVisible)(current);
|
|
24
|
+
}
|
|
25
|
+
}, [
|
|
26
|
+
onEndVisible,
|
|
27
|
+
isWorklet,
|
|
28
|
+
inverted
|
|
29
|
+
]);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export { useEndVisible };
|
|
33
|
+
//# sourceMappingURL=useEndVisible.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEndVisible.js","names":[],"sources":["esm/keyboard/components/KeyboardChatScrollView/useEndVisible.js"],"sourcesContent":["import { useMemo } from \"react\";\nimport { runOnJS } from \"react-native-reanimated\";\nimport { useAnimatedReaction, useDerivedValue } from \"../../reanimated\";\nimport { isScrollAtEnd } from \"./useChatKeyboard/helpers\";\nconst hasWorkletHash = (value) => typeof value === \"function\" && !!value.__workletHash;\nconst useEndVisible = ({\n scroll,\n layout,\n size,\n inverted,\n onEndVisible\n}) => {\n const isWorklet = useMemo(() => hasWorkletHash(onEndVisible), [onEndVisible]);\n const isAtEnd = useDerivedValue(() => {\n if (layout.value.height === 0 || size.value.height === 0) {\n return null;\n }\n return isScrollAtEnd(scroll.value, layout.value.height, size.value.height, inverted);\n });\n useAnimatedReaction(\n () => isAtEnd.value,\n (current, previous) => {\n if (current === null || current === previous || !onEndVisible) {\n return;\n }\n if (isWorklet) {\n onEndVisible(current);\n } else {\n runOnJS(onEndVisible)(current);\n }\n },\n [onEndVisible, isWorklet, inverted]\n );\n};\nexport {\n useEndVisible\n};\n//# sourceMappingURL=useEndVisible.js.map\n"],"mappings":";;;;;;AAIA,MAAM,kBAAkB,UAAU,OAAO,UAAU,cAAc,CAAC,CAAC,MAAM;AACzE,MAAM,iBAAiB,EACrB,QACA,QACA,MACA,UACA,mBACI;CACJ,MAAM,YAAY,cAAc,eAAe,YAAY,GAAG,CAAC,YAAY,CAAC;CAC5E,MAAM,UAAU,sBAAsB;EACpC,IAAI,OAAO,MAAM,WAAW,KAAK,KAAK,MAAM,WAAW,GAAG;GACxD,OAAO;EACT;EACA,OAAO,cAAc,OAAO,OAAO,OAAO,MAAM,QAAQ,KAAK,MAAM,QAAQ,QAAQ;CACrF,CAAC;CACD,0BACQ,QAAQ,QACb,SAAS,aAAa;EACrB,IAAI,YAAY,QAAQ,YAAY,YAAY,CAAC,cAAc;GAC7D;EACF;EACA,IAAI,WAAW;GACb,aAAa,OAAO;EACtB,OAAO;GACL,QAAQ,YAAY,CAAC,CAAC,OAAO;EAC/B;CACF,GACA;EAAC;EAAc;EAAW;CAAQ,CACpC;AACF"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { useMemo } from "react";
|
|
2
|
+
import { runOnJS } from "react-native-reanimated";
|
|
3
|
+
import { useAnimatedReaction, useDerivedValue } from "../../reanimated.native.js";
|
|
4
|
+
import { isScrollAtEnd } from "./useChatKeyboard/helpers.native.js";
|
|
5
|
+
|
|
6
|
+
// dist/esm/keyboard/components/KeyboardChatScrollView/useEndVisible.native.js
|
|
7
|
+
var hasWorkletHash = function hasWorkletHash2(value) {
|
|
8
|
+
return typeof value === "function" && !!value.__workletHash;
|
|
9
|
+
};
|
|
10
|
+
var useEndVisible = function useEndVisible2(param) {
|
|
11
|
+
var { scroll, layout, size, inverted, onEndVisible } = param;
|
|
12
|
+
var isWorklet = useMemo(function() {
|
|
13
|
+
return hasWorkletHash(onEndVisible);
|
|
14
|
+
}, [onEndVisible]);
|
|
15
|
+
var isAtEnd = useDerivedValue(function() {
|
|
16
|
+
if (layout.value.height === 0 || size.value.height === 0) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
return isScrollAtEnd(scroll.value, layout.value.height, size.value.height, inverted);
|
|
20
|
+
});
|
|
21
|
+
useAnimatedReaction(function() {
|
|
22
|
+
return isAtEnd.value;
|
|
23
|
+
}, function(current, previous) {
|
|
24
|
+
if (current === null || current === previous || !onEndVisible) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
if (isWorklet) {
|
|
28
|
+
onEndVisible(current);
|
|
29
|
+
} else {
|
|
30
|
+
runOnJS(onEndVisible)(current);
|
|
31
|
+
}
|
|
32
|
+
}, [
|
|
33
|
+
onEndVisible,
|
|
34
|
+
isWorklet,
|
|
35
|
+
inverted
|
|
36
|
+
]);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export { useEndVisible };
|
|
40
|
+
//# sourceMappingURL=useEndVisible.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEndVisible.native.js","names":[],"sources":["esm/keyboard/components/KeyboardChatScrollView/useEndVisible.native.js"],"sourcesContent":["import { useMemo } from \"react\";\nimport { runOnJS } from \"react-native-reanimated\";\nimport { useAnimatedReaction, useDerivedValue } from \"../../reanimated\";\nimport { isScrollAtEnd } from \"./useChatKeyboard/helpers\";\nvar hasWorkletHash = function hasWorkletHash2(value) {\n return typeof value === \"function\" && !!value.__workletHash;\n};\nvar useEndVisible = function useEndVisible2(param) {\n var { scroll, layout, size, inverted, onEndVisible } = param;\n var isWorklet = useMemo(function() {\n return hasWorkletHash(onEndVisible);\n }, [\n onEndVisible\n ]);\n var isAtEnd = useDerivedValue(function() {\n if (layout.value.height === 0 || size.value.height === 0) {\n return null;\n }\n return isScrollAtEnd(scroll.value, layout.value.height, size.value.height, inverted);\n });\n useAnimatedReaction(function() {\n return isAtEnd.value;\n }, function(current, previous) {\n if (current === null || current === previous || !onEndVisible) {\n return;\n }\n if (isWorklet) {\n onEndVisible(current);\n } else {\n runOnJS(onEndVisible)(current);\n }\n }, [\n onEndVisible,\n isWorklet,\n inverted\n ]);\n};\nexport {\n useEndVisible\n};\n//# sourceMappingURL=useEndVisible.js.map\n"],"mappings":";;;;;;AAIA,IAAI,iBAAiB,SAAS,gBAAgB,OAAO;CACnD,OAAO,OAAO,UAAU,cAAc,CAAC,CAAC,MAAM;AAChD;AACA,IAAI,gBAAgB,SAAS,eAAe,OAAO;CACjD,IAAI,EAAE,QAAQ,QAAQ,MAAM,UAAU,iBAAiB;CACvD,IAAI,YAAY,QAAQ,WAAW;EACjC,OAAO,eAAe,YAAY;CACpC,GAAG,CACD,YACF,CAAC;CACD,IAAI,UAAU,gBAAgB,WAAW;EACvC,IAAI,OAAO,MAAM,WAAW,KAAK,KAAK,MAAM,WAAW,GAAG;GACxD,OAAO;EACT;EACA,OAAO,cAAc,OAAO,OAAO,OAAO,MAAM,QAAQ,KAAK,MAAM,QAAQ,QAAQ;CACrF,CAAC;CACD,oBAAoB,WAAW;EAC7B,OAAO,QAAQ;CACjB,GAAG,SAAS,SAAS,UAAU;EAC7B,IAAI,YAAY,QAAQ,YAAY,YAAY,CAAC,cAAc;GAC7D;EACF;EACA,IAAI,WAAW;GACb,aAAa,OAAO;EACtB,OAAO;GACL,QAAQ,YAAY,CAAC,CAAC,OAAO;EAC/B;CACF,GAAG;EACD;EACA;EACA;CACF,CAAC;AACH"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { useCallback } from "react";
|
|
2
|
+
import { Platform } from "react-native-web";
|
|
3
|
+
import { useSharedValue } from "react-native-reanimated";
|
|
4
|
+
import { IS_FABRIC } from "../../../architecture.mjs";
|
|
5
|
+
import { useAnimatedReaction } from "../../../reanimated.mjs";
|
|
6
|
+
import { safeScrollTo } from "../../utils/safeScrollTo.mjs";
|
|
7
|
+
import { isScrollAtEnd, shouldShiftContent } from "../useChatKeyboard/helpers.mjs";
|
|
8
|
+
|
|
9
|
+
// dist/esm/keyboard/components/KeyboardChatScrollView/useExtraContentPadding/index.js
|
|
10
|
+
const OS = Platform.OS;
|
|
11
|
+
function useExtraContentPadding(options) {
|
|
12
|
+
const { scrollViewRef, extraContentPadding, keyboardPadding, blankSpace, scroll, layout, size, contentOffsetY, minScroll = 0, inverted, keyboardLiftBehavior, freeze } = options;
|
|
13
|
+
const lastCommanded = useSharedValue(null);
|
|
14
|
+
const lastObservedScroll = useSharedValue(0);
|
|
15
|
+
const scrollToTarget = useCallback((target) => {
|
|
16
|
+
"worklet";
|
|
17
|
+
lastCommanded.value = target;
|
|
18
|
+
lastObservedScroll.value = scroll.value;
|
|
19
|
+
if (contentOffsetY && IS_FABRIC) {
|
|
20
|
+
contentOffsetY.value = target;
|
|
21
|
+
} else if (OS === "android") {
|
|
22
|
+
requestAnimationFrame(() => {
|
|
23
|
+
safeScrollTo(scrollViewRef, 0, target, false);
|
|
24
|
+
});
|
|
25
|
+
} else {
|
|
26
|
+
safeScrollTo(scrollViewRef, 0, target, false);
|
|
27
|
+
}
|
|
28
|
+
}, [
|
|
29
|
+
scrollViewRef,
|
|
30
|
+
contentOffsetY,
|
|
31
|
+
scroll,
|
|
32
|
+
lastCommanded,
|
|
33
|
+
lastObservedScroll
|
|
34
|
+
]);
|
|
35
|
+
useAnimatedReaction(() => extraContentPadding.value, (current, previous) => {
|
|
36
|
+
if (freeze.value || previous === null) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
const rawDelta = current - previous;
|
|
40
|
+
if (rawDelta === 0) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
const previousTotal = Math.max(blankSpace.value, keyboardPadding.value + previous);
|
|
44
|
+
const currentTotal = Math.max(blankSpace.value, keyboardPadding.value + current);
|
|
45
|
+
const effectiveDelta = Math.round(currentTotal) - Math.round(previousTotal);
|
|
46
|
+
if (effectiveDelta === 0) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
const atEnd = isScrollAtEnd(scroll.value, layout.value.height, size.value.height, inverted);
|
|
50
|
+
if (keyboardLiftBehavior === "persistent" && effectiveDelta < 0 && !atEnd) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
if (!shouldShiftContent(keyboardLiftBehavior, atEnd)) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
const base = lastCommanded.value !== null && scroll.value === lastObservedScroll.value ? lastCommanded.value : scroll.value;
|
|
57
|
+
let target;
|
|
58
|
+
if (inverted) {
|
|
59
|
+
target = Math.max(base - effectiveDelta, -currentTotal);
|
|
60
|
+
} else {
|
|
61
|
+
const maxScroll = Math.max(size.value.height - layout.value.height + currentTotal, minScroll);
|
|
62
|
+
target = Math.max(Math.min(base + effectiveDelta, maxScroll), minScroll);
|
|
63
|
+
}
|
|
64
|
+
scrollToTarget(target);
|
|
65
|
+
}, [
|
|
66
|
+
inverted,
|
|
67
|
+
keyboardLiftBehavior,
|
|
68
|
+
minScroll
|
|
69
|
+
]);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export { useExtraContentPadding };
|
|
73
|
+
//# sourceMappingURL=index.mjs.map
|
package/dist/esm/keyboard/components/KeyboardChatScrollView/useExtraContentPadding/index.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["esm/keyboard/components/KeyboardChatScrollView/useExtraContentPadding/index.js"],"sourcesContent":["import { useCallback } from \"react\";\nimport { Platform } from \"react-native-web\";\nimport { useSharedValue } from \"react-native-reanimated\";\nimport { IS_FABRIC } from \"../../../architecture\";\nimport { useAnimatedReaction } from \"../../../reanimated\";\nimport { safeScrollTo } from \"../../utils/safeScrollTo\";\nimport { isScrollAtEnd, shouldShiftContent } from \"../useChatKeyboard/helpers\";\nconst OS = Platform.OS;\nfunction useExtraContentPadding(options) {\n const {\n scrollViewRef,\n extraContentPadding,\n keyboardPadding,\n blankSpace,\n scroll,\n layout,\n size,\n contentOffsetY,\n minScroll = 0,\n inverted,\n keyboardLiftBehavior,\n freeze\n } = options;\n const lastCommanded = useSharedValue(null);\n const lastObservedScroll = useSharedValue(0);\n const scrollToTarget = useCallback(\n (target) => {\n \"worklet\";\n lastCommanded.value = target;\n lastObservedScroll.value = scroll.value;\n if (contentOffsetY && IS_FABRIC) {\n contentOffsetY.value = target;\n } else if (OS === \"android\") {\n requestAnimationFrame(() => {\n safeScrollTo(scrollViewRef, 0, target, false);\n });\n } else {\n safeScrollTo(scrollViewRef, 0, target, false);\n }\n },\n [scrollViewRef, contentOffsetY, scroll, lastCommanded, lastObservedScroll]\n );\n useAnimatedReaction(\n () => extraContentPadding.value,\n (current, previous) => {\n if (freeze.value || previous === null) {\n return;\n }\n const rawDelta = current - previous;\n if (rawDelta === 0) {\n return;\n }\n const previousTotal = Math.max(blankSpace.value, keyboardPadding.value + previous);\n const currentTotal = Math.max(blankSpace.value, keyboardPadding.value + current);\n const effectiveDelta = Math.round(currentTotal) - Math.round(previousTotal);\n if (effectiveDelta === 0) {\n return;\n }\n const atEnd = isScrollAtEnd(\n scroll.value,\n layout.value.height,\n size.value.height,\n inverted\n );\n if (keyboardLiftBehavior === \"persistent\" && effectiveDelta < 0 && !atEnd) {\n return;\n }\n if (!shouldShiftContent(keyboardLiftBehavior, atEnd)) {\n return;\n }\n const base = lastCommanded.value !== null && scroll.value === lastObservedScroll.value ? lastCommanded.value : scroll.value;\n let target;\n if (inverted) {\n target = Math.max(base - effectiveDelta, -currentTotal);\n } else {\n const maxScroll = Math.max(\n size.value.height - layout.value.height + currentTotal,\n minScroll\n );\n target = Math.max(Math.min(base + effectiveDelta, maxScroll), minScroll);\n }\n scrollToTarget(target);\n },\n [inverted, keyboardLiftBehavior, minScroll]\n );\n}\nexport {\n useExtraContentPadding\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;;;;;;AAOA,MAAM,KAAK,SAAS;AACpB,SAAS,uBAAuB,SAAS;CACvC,MAAM,EACJ,eACA,qBACA,iBACA,YACA,QACA,QACA,MACA,gBACA,YAAY,GACZ,UACA,sBACA,WACE;CACJ,MAAM,gBAAgB,eAAe,IAAI;CACzC,MAAM,qBAAqB,eAAe,CAAC;CAC3C,MAAM,iBAAiB,aACpB,WAAW;EACV;EACA,cAAc,QAAQ;EACtB,mBAAmB,QAAQ,OAAO;EAClC,IAAI,kBAAkB,WAAW;GAC/B,eAAe,QAAQ;EACzB,OAAO,IAAI,OAAO,WAAW;GAC3B,4BAA4B;IAC1B,aAAa,eAAe,GAAG,QAAQ,KAAK;GAC9C,CAAC;EACH,OAAO;GACL,aAAa,eAAe,GAAG,QAAQ,KAAK;EAC9C;CACF,GACA;EAAC;EAAe;EAAgB;EAAQ;EAAe;CAAkB,CAC3E;CACA,0BACQ,oBAAoB,QACzB,SAAS,aAAa;EACrB,IAAI,OAAO,SAAS,aAAa,MAAM;GACrC;EACF;EACA,MAAM,WAAW,UAAU;EAC3B,IAAI,aAAa,GAAG;GAClB;EACF;EACA,MAAM,gBAAgB,KAAK,IAAI,WAAW,OAAO,gBAAgB,QAAQ,QAAQ;EACjF,MAAM,eAAe,KAAK,IAAI,WAAW,OAAO,gBAAgB,QAAQ,OAAO;EAC/E,MAAM,iBAAiB,KAAK,MAAM,YAAY,IAAI,KAAK,MAAM,aAAa;EAC1E,IAAI,mBAAmB,GAAG;GACxB;EACF;EACA,MAAM,QAAQ,cACZ,OAAO,OACP,OAAO,MAAM,QACb,KAAK,MAAM,QACX,QACF;EACA,IAAI,yBAAyB,gBAAgB,iBAAiB,KAAK,CAAC,OAAO;GACzE;EACF;EACA,IAAI,CAAC,mBAAmB,sBAAsB,KAAK,GAAG;GACpD;EACF;EACA,MAAM,OAAO,cAAc,UAAU,QAAQ,OAAO,UAAU,mBAAmB,QAAQ,cAAc,QAAQ,OAAO;EACtH,IAAI;EACJ,IAAI,UAAU;GACZ,SAAS,KAAK,IAAI,OAAO,gBAAgB,CAAC,YAAY;EACxD,OAAO;GACL,MAAM,YAAY,KAAK,IACrB,KAAK,MAAM,SAAS,OAAO,MAAM,SAAS,cAC1C,SACF;GACA,SAAS,KAAK,IAAI,KAAK,IAAI,OAAO,gBAAgB,SAAS,GAAG,SAAS;EACzE;EACA,eAAe,MAAM;CACvB,GACA;EAAC;EAAU;EAAsB;CAAS,CAC5C;AACF"}
|
package/dist/esm/keyboard/components/KeyboardChatScrollView/useExtraContentPadding/index.native.js
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { useCallback } from "react";
|
|
2
|
+
import { Platform } from "react-native";
|
|
3
|
+
import { useSharedValue } from "react-native-reanimated";
|
|
4
|
+
import { IS_FABRIC } from "../../../architecture.native.js";
|
|
5
|
+
import { useAnimatedReaction } from "../../../reanimated.native.js";
|
|
6
|
+
import { safeScrollTo } from "../../utils/safeScrollTo.native.js";
|
|
7
|
+
import { isScrollAtEnd, shouldShiftContent } from "../useChatKeyboard/helpers.native.js";
|
|
8
|
+
|
|
9
|
+
// dist/esm/keyboard/components/KeyboardChatScrollView/useExtraContentPadding/index.native.js
|
|
10
|
+
var OS = Platform.OS;
|
|
11
|
+
function useExtraContentPadding(options) {
|
|
12
|
+
var { scrollViewRef, extraContentPadding, keyboardPadding, blankSpace, scroll, layout, size, contentOffsetY, minScroll = 0, inverted, keyboardLiftBehavior, freeze } = options;
|
|
13
|
+
var lastCommanded = useSharedValue(null);
|
|
14
|
+
var lastObservedScroll = useSharedValue(0);
|
|
15
|
+
var scrollToTarget = useCallback(function(target) {
|
|
16
|
+
"worklet";
|
|
17
|
+
lastCommanded.value = target;
|
|
18
|
+
lastObservedScroll.value = scroll.value;
|
|
19
|
+
if (contentOffsetY && IS_FABRIC) {
|
|
20
|
+
contentOffsetY.value = target;
|
|
21
|
+
} else if (OS === "android") {
|
|
22
|
+
requestAnimationFrame(function() {
|
|
23
|
+
safeScrollTo(scrollViewRef, 0, target, false);
|
|
24
|
+
});
|
|
25
|
+
} else {
|
|
26
|
+
safeScrollTo(scrollViewRef, 0, target, false);
|
|
27
|
+
}
|
|
28
|
+
}, [
|
|
29
|
+
scrollViewRef,
|
|
30
|
+
contentOffsetY,
|
|
31
|
+
scroll,
|
|
32
|
+
lastCommanded,
|
|
33
|
+
lastObservedScroll
|
|
34
|
+
]);
|
|
35
|
+
useAnimatedReaction(function() {
|
|
36
|
+
return extraContentPadding.value;
|
|
37
|
+
}, function(current, previous) {
|
|
38
|
+
if (freeze.value || previous === null) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
var rawDelta = current - previous;
|
|
42
|
+
if (rawDelta === 0) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
var previousTotal = Math.max(blankSpace.value, keyboardPadding.value + previous);
|
|
46
|
+
var currentTotal = Math.max(blankSpace.value, keyboardPadding.value + current);
|
|
47
|
+
var effectiveDelta = Math.round(currentTotal) - Math.round(previousTotal);
|
|
48
|
+
if (effectiveDelta === 0) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
var atEnd = isScrollAtEnd(scroll.value, layout.value.height, size.value.height, inverted);
|
|
52
|
+
if (keyboardLiftBehavior === "persistent" && effectiveDelta < 0 && !atEnd) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
if (!shouldShiftContent(keyboardLiftBehavior, atEnd)) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
var base = lastCommanded.value !== null && scroll.value === lastObservedScroll.value ? lastCommanded.value : scroll.value;
|
|
59
|
+
var target;
|
|
60
|
+
if (inverted) {
|
|
61
|
+
target = Math.max(base - effectiveDelta, -currentTotal);
|
|
62
|
+
} else {
|
|
63
|
+
var maxScroll = Math.max(size.value.height - layout.value.height + currentTotal, minScroll);
|
|
64
|
+
target = Math.max(Math.min(base + effectiveDelta, maxScroll), minScroll);
|
|
65
|
+
}
|
|
66
|
+
scrollToTarget(target);
|
|
67
|
+
}, [
|
|
68
|
+
inverted,
|
|
69
|
+
keyboardLiftBehavior,
|
|
70
|
+
minScroll
|
|
71
|
+
]);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export { useExtraContentPadding };
|
|
75
|
+
//# sourceMappingURL=index.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.native.js","names":[],"sources":["esm/keyboard/components/KeyboardChatScrollView/useExtraContentPadding/index.native.js"],"sourcesContent":["import { useCallback } from \"react\";\nimport { Platform } from \"react-native\";\nimport { useSharedValue } from \"react-native-reanimated\";\nimport { IS_FABRIC } from \"../../../architecture\";\nimport { useAnimatedReaction } from \"../../../reanimated\";\nimport { safeScrollTo } from \"../../utils/safeScrollTo\";\nimport { isScrollAtEnd, shouldShiftContent } from \"../useChatKeyboard/helpers\";\nvar OS = Platform.OS;\nfunction useExtraContentPadding(options) {\n var { scrollViewRef, extraContentPadding, keyboardPadding, blankSpace, scroll, layout, size, contentOffsetY, minScroll = 0, inverted, keyboardLiftBehavior, freeze } = options;\n var lastCommanded = useSharedValue(null);\n var lastObservedScroll = useSharedValue(0);\n var scrollToTarget = useCallback(function(target) {\n \"worklet\";\n lastCommanded.value = target;\n lastObservedScroll.value = scroll.value;\n if (contentOffsetY && IS_FABRIC) {\n contentOffsetY.value = target;\n } else if (OS === \"android\") {\n requestAnimationFrame(function() {\n safeScrollTo(scrollViewRef, 0, target, false);\n });\n } else {\n safeScrollTo(scrollViewRef, 0, target, false);\n }\n }, [\n scrollViewRef,\n contentOffsetY,\n scroll,\n lastCommanded,\n lastObservedScroll\n ]);\n useAnimatedReaction(function() {\n return extraContentPadding.value;\n }, function(current, previous) {\n if (freeze.value || previous === null) {\n return;\n }\n var rawDelta = current - previous;\n if (rawDelta === 0) {\n return;\n }\n var previousTotal = Math.max(blankSpace.value, keyboardPadding.value + previous);\n var currentTotal = Math.max(blankSpace.value, keyboardPadding.value + current);\n var effectiveDelta = Math.round(currentTotal) - Math.round(previousTotal);\n if (effectiveDelta === 0) {\n return;\n }\n var atEnd = isScrollAtEnd(scroll.value, layout.value.height, size.value.height, inverted);\n if (keyboardLiftBehavior === \"persistent\" && effectiveDelta < 0 && !atEnd) {\n return;\n }\n if (!shouldShiftContent(keyboardLiftBehavior, atEnd)) {\n return;\n }\n var base = lastCommanded.value !== null && scroll.value === lastObservedScroll.value ? lastCommanded.value : scroll.value;\n var target;\n if (inverted) {\n target = Math.max(base - effectiveDelta, -currentTotal);\n } else {\n var maxScroll = Math.max(size.value.height - layout.value.height + currentTotal, minScroll);\n target = Math.max(Math.min(base + effectiveDelta, maxScroll), minScroll);\n }\n scrollToTarget(target);\n }, [\n inverted,\n keyboardLiftBehavior,\n minScroll\n ]);\n}\nexport {\n useExtraContentPadding\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;;;;;;AAOA,IAAI,KAAK,SAAS;AAClB,SAAS,uBAAuB,SAAS;CACvC,IAAI,EAAE,eAAe,qBAAqB,iBAAiB,YAAY,QAAQ,QAAQ,MAAM,gBAAgB,YAAY,GAAG,UAAU,sBAAsB,WAAW;CACvK,IAAI,gBAAgB,eAAe,IAAI;CACvC,IAAI,qBAAqB,eAAe,CAAC;CACzC,IAAI,iBAAiB,YAAY,SAAS,QAAQ;EAChD;EACA,cAAc,QAAQ;EACtB,mBAAmB,QAAQ,OAAO;EAClC,IAAI,kBAAkB,WAAW;GAC/B,eAAe,QAAQ;EACzB,OAAO,IAAI,OAAO,WAAW;GAC3B,sBAAsB,WAAW;IAC/B,aAAa,eAAe,GAAG,QAAQ,KAAK;GAC9C,CAAC;EACH,OAAO;GACL,aAAa,eAAe,GAAG,QAAQ,KAAK;EAC9C;CACF,GAAG;EACD;EACA;EACA;EACA;EACA;CACF,CAAC;CACD,oBAAoB,WAAW;EAC7B,OAAO,oBAAoB;CAC7B,GAAG,SAAS,SAAS,UAAU;EAC7B,IAAI,OAAO,SAAS,aAAa,MAAM;GACrC;EACF;EACA,IAAI,WAAW,UAAU;EACzB,IAAI,aAAa,GAAG;GAClB;EACF;EACA,IAAI,gBAAgB,KAAK,IAAI,WAAW,OAAO,gBAAgB,QAAQ,QAAQ;EAC/E,IAAI,eAAe,KAAK,IAAI,WAAW,OAAO,gBAAgB,QAAQ,OAAO;EAC7E,IAAI,iBAAiB,KAAK,MAAM,YAAY,IAAI,KAAK,MAAM,aAAa;EACxE,IAAI,mBAAmB,GAAG;GACxB;EACF;EACA,IAAI,QAAQ,cAAc,OAAO,OAAO,OAAO,MAAM,QAAQ,KAAK,MAAM,QAAQ,QAAQ;EACxF,IAAI,yBAAyB,gBAAgB,iBAAiB,KAAK,CAAC,OAAO;GACzE;EACF;EACA,IAAI,CAAC,mBAAmB,sBAAsB,KAAK,GAAG;GACpD;EACF;EACA,IAAI,OAAO,cAAc,UAAU,QAAQ,OAAO,UAAU,mBAAmB,QAAQ,cAAc,QAAQ,OAAO;EACpH,IAAI;EACJ,IAAI,UAAU;GACZ,SAAS,KAAK,IAAI,OAAO,gBAAgB,CAAC,YAAY;EACxD,OAAO;GACL,IAAI,YAAY,KAAK,IAAI,KAAK,MAAM,SAAS,OAAO,MAAM,SAAS,cAAc,SAAS;GAC1F,SAAS,KAAK,IAAI,KAAK,IAAI,OAAO,gBAAgB,SAAS,GAAG,SAAS;EACzE;EACA,eAAe,MAAM;CACvB,GAAG;EACD;EACA;EACA;CACF,CAAC;AACH"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { useSharedValue } from "react-native-reanimated";
|
|
2
|
+
import { useKeyboardHandler } from "../../../hooks/index.mjs";
|
|
3
|
+
import { useAnimatedReaction } from "../../../reanimated.mjs";
|
|
4
|
+
import { getEffectiveHeight } from "../useChatKeyboard/helpers.mjs";
|
|
5
|
+
|
|
6
|
+
// dist/esm/keyboard/components/KeyboardChatScrollView/useFrozenPadding/index.js
|
|
7
|
+
function useFrozenPadding({ freeze, offset, padding }) {
|
|
8
|
+
const lastHeight = useSharedValue(0);
|
|
9
|
+
const targetKeyboardHeight = useSharedValue(0);
|
|
10
|
+
useKeyboardHandler({
|
|
11
|
+
onStart: (e) => {
|
|
12
|
+
"worklet";
|
|
13
|
+
if (e.height > 0) {
|
|
14
|
+
targetKeyboardHeight.value = e.height;
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
onMove: (e) => {
|
|
18
|
+
"worklet";
|
|
19
|
+
lastHeight.value = e.height;
|
|
20
|
+
},
|
|
21
|
+
onEnd: (e) => {
|
|
22
|
+
"worklet";
|
|
23
|
+
lastHeight.value = e.height;
|
|
24
|
+
}
|
|
25
|
+
}, []);
|
|
26
|
+
useAnimatedReaction(() => freeze.value, (isFrozen, wasFrozen) => {
|
|
27
|
+
if (!isFrozen && wasFrozen === true) {
|
|
28
|
+
padding.value = getEffectiveHeight(lastHeight.value, targetKeyboardHeight.value, offset);
|
|
29
|
+
}
|
|
30
|
+
}, [offset]);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export { useFrozenPadding };
|
|
34
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["esm/keyboard/components/KeyboardChatScrollView/useFrozenPadding/index.js"],"sourcesContent":["import { useSharedValue } from \"react-native-reanimated\";\nimport { useKeyboardHandler } from \"../../../hooks\";\nimport { useAnimatedReaction } from \"../../../reanimated\";\nimport { getEffectiveHeight } from \"../useChatKeyboard/helpers\";\nfunction useFrozenPadding({ freeze, offset, padding }) {\n const lastHeight = useSharedValue(0);\n const targetKeyboardHeight = useSharedValue(0);\n useKeyboardHandler(\n {\n onStart: (e) => {\n \"worklet\";\n if (e.height > 0) {\n targetKeyboardHeight.value = e.height;\n }\n },\n onMove: (e) => {\n \"worklet\";\n lastHeight.value = e.height;\n },\n onEnd: (e) => {\n \"worklet\";\n lastHeight.value = e.height;\n }\n },\n []\n );\n useAnimatedReaction(\n () => freeze.value,\n (isFrozen, wasFrozen) => {\n if (!isFrozen && wasFrozen === true) {\n padding.value = getEffectiveHeight(\n lastHeight.value,\n targetKeyboardHeight.value,\n offset\n );\n }\n },\n [offset]\n );\n}\nexport {\n useFrozenPadding\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;;;AAIA,SAAS,iBAAiB,EAAE,QAAQ,QAAQ,WAAW;CACrD,MAAM,aAAa,eAAe,CAAC;CACnC,MAAM,uBAAuB,eAAe,CAAC;CAC7C,mBACE;EACE,UAAU,MAAM;GACd;GACA,IAAI,EAAE,SAAS,GAAG;IAChB,qBAAqB,QAAQ,EAAE;GACjC;EACF;EACA,SAAS,MAAM;GACb;GACA,WAAW,QAAQ,EAAE;EACvB;EACA,QAAQ,MAAM;GACZ;GACA,WAAW,QAAQ,EAAE;EACvB;CACF,GACA,CAAC,CACH;CACA,0BACQ,OAAO,QACZ,UAAU,cAAc;EACvB,IAAI,CAAC,YAAY,cAAc,MAAM;GACnC,QAAQ,QAAQ,mBACd,WAAW,OACX,qBAAqB,OACrB,MACF;EACF;CACF,GACA,CAAC,MAAM,CACT;AACF"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { useSharedValue } from "react-native-reanimated";
|
|
2
|
+
import { useKeyboardHandler } from "../../../hooks/index.native.js";
|
|
3
|
+
import { useAnimatedReaction } from "../../../reanimated.native.js";
|
|
4
|
+
import { getEffectiveHeight } from "../useChatKeyboard/helpers.native.js";
|
|
5
|
+
|
|
6
|
+
// dist/esm/keyboard/components/KeyboardChatScrollView/useFrozenPadding/index.native.js
|
|
7
|
+
function useFrozenPadding(param) {
|
|
8
|
+
var { freeze, offset, padding } = param;
|
|
9
|
+
var lastHeight = useSharedValue(0);
|
|
10
|
+
var targetKeyboardHeight = useSharedValue(0);
|
|
11
|
+
useKeyboardHandler({
|
|
12
|
+
onStart: function onStart(e) {
|
|
13
|
+
"worklet";
|
|
14
|
+
if (e.height > 0) {
|
|
15
|
+
targetKeyboardHeight.value = e.height;
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
onMove: function onMove(e) {
|
|
19
|
+
"worklet";
|
|
20
|
+
lastHeight.value = e.height;
|
|
21
|
+
},
|
|
22
|
+
onEnd: function onEnd(e) {
|
|
23
|
+
"worklet";
|
|
24
|
+
lastHeight.value = e.height;
|
|
25
|
+
}
|
|
26
|
+
}, []);
|
|
27
|
+
useAnimatedReaction(function() {
|
|
28
|
+
return freeze.value;
|
|
29
|
+
}, function(isFrozen, wasFrozen) {
|
|
30
|
+
if (!isFrozen && wasFrozen === true) {
|
|
31
|
+
padding.value = getEffectiveHeight(lastHeight.value, targetKeyboardHeight.value, offset);
|
|
32
|
+
}
|
|
33
|
+
}, [offset]);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { useFrozenPadding };
|
|
37
|
+
//# sourceMappingURL=index.native.js.map
|
package/dist/esm/keyboard/components/KeyboardChatScrollView/useFrozenPadding/index.native.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.native.js","names":[],"sources":["esm/keyboard/components/KeyboardChatScrollView/useFrozenPadding/index.native.js"],"sourcesContent":["import { useSharedValue } from \"react-native-reanimated\";\nimport { useKeyboardHandler } from \"../../../hooks\";\nimport { useAnimatedReaction } from \"../../../reanimated\";\nimport { getEffectiveHeight } from \"../useChatKeyboard/helpers\";\nfunction useFrozenPadding(param) {\n var { freeze, offset, padding } = param;\n var lastHeight = useSharedValue(0);\n var targetKeyboardHeight = useSharedValue(0);\n useKeyboardHandler({\n onStart: function onStart(e) {\n \"worklet\";\n if (e.height > 0) {\n targetKeyboardHeight.value = e.height;\n }\n },\n onMove: function onMove(e) {\n \"worklet\";\n lastHeight.value = e.height;\n },\n onEnd: function onEnd(e) {\n \"worklet\";\n lastHeight.value = e.height;\n }\n }, []);\n useAnimatedReaction(function() {\n return freeze.value;\n }, function(isFrozen, wasFrozen) {\n if (!isFrozen && wasFrozen === true) {\n padding.value = getEffectiveHeight(lastHeight.value, targetKeyboardHeight.value, offset);\n }\n }, [\n offset\n ]);\n}\nexport {\n useFrozenPadding\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;;;AAIA,SAAS,iBAAiB,OAAO;CAC/B,IAAI,EAAE,QAAQ,QAAQ,YAAY;CAClC,IAAI,aAAa,eAAe,CAAC;CACjC,IAAI,uBAAuB,eAAe,CAAC;CAC3C,mBAAmB;EACjB,SAAS,SAAS,QAAQ,GAAG;GAC3B;GACA,IAAI,EAAE,SAAS,GAAG;IAChB,qBAAqB,QAAQ,EAAE;GACjC;EACF;EACA,QAAQ,SAAS,OAAO,GAAG;GACzB;GACA,WAAW,QAAQ,EAAE;EACvB;EACA,OAAO,SAAS,MAAM,GAAG;GACvB;GACA,WAAW,QAAQ,EAAE;EACvB;CACF,GAAG,CAAC,CAAC;CACL,oBAAoB,WAAW;EAC7B,OAAO,OAAO;CAChB,GAAG,SAAS,UAAU,WAAW;EAC/B,IAAI,CAAC,YAAY,cAAc,MAAM;GACnC,QAAQ,QAAQ,mBAAmB,WAAW,OAAO,qBAAqB,OAAO,MAAM;EACzF;CACF,GAAG,CACD,MACF,CAAC;AACH"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { forwardRef, useEffect, useMemo, useRef } from "react";
|
|
2
|
+
import { StyleSheet, View } from "react-native-web";
|
|
3
|
+
import { KEYBOARD_BORDER_RADIUS, KEYBOARD_HAS_ROUNDED_CORNERS } from "../../constants.mjs";
|
|
4
|
+
import { KeyboardController } from "../../module.mjs";
|
|
5
|
+
import KeyboardStickyView from "../KeyboardStickyView/index.mjs";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
// dist/esm/keyboard/components/KeyboardEffects/index.js
|
|
9
|
+
const translucentStack = [];
|
|
10
|
+
let currentTranslucent = false;
|
|
11
|
+
const applyTranslucent = () => {
|
|
12
|
+
const next = translucentStack.length > 0 ? translucentStack[translucentStack.length - 1].translucent : false;
|
|
13
|
+
if (next !== currentTranslucent) {
|
|
14
|
+
currentTranslucent = next;
|
|
15
|
+
KeyboardController.setTranslucent(next);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
const pushTranslucentEntry = (entry) => {
|
|
19
|
+
translucentStack.push(entry);
|
|
20
|
+
applyTranslucent();
|
|
21
|
+
};
|
|
22
|
+
const removeTranslucentEntry = (entry) => {
|
|
23
|
+
const index = translucentStack.indexOf(entry);
|
|
24
|
+
if (index !== -1) {
|
|
25
|
+
translucentStack.splice(index, 1);
|
|
26
|
+
}
|
|
27
|
+
applyTranslucent();
|
|
28
|
+
};
|
|
29
|
+
const KeyboardEffects = forwardRef(({ translucent, rounded = true, children, ...props }, ref) => {
|
|
30
|
+
const stackEntry = useRef({ translucent: Boolean(translucent) }).current;
|
|
31
|
+
const containerStyle = useMemo(() => [styles.container, KEYBOARD_HAS_ROUNDED_CORNERS && rounded && styles.rounded], [rounded]);
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
pushTranslucentEntry(stackEntry);
|
|
34
|
+
return () => {
|
|
35
|
+
removeTranslucentEntry(stackEntry);
|
|
36
|
+
};
|
|
37
|
+
}, [stackEntry]);
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
stackEntry.translucent = Boolean(translucent);
|
|
40
|
+
applyTranslucent();
|
|
41
|
+
}, [stackEntry, translucent]);
|
|
42
|
+
return /* @__PURE__ */ jsx(KeyboardStickyView, {
|
|
43
|
+
ref,
|
|
44
|
+
...props,
|
|
45
|
+
children: /* @__PURE__ */ jsx(View, {
|
|
46
|
+
style: containerStyle,
|
|
47
|
+
children
|
|
48
|
+
})
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
const styles = StyleSheet.create({
|
|
52
|
+
container: {
|
|
53
|
+
position: "absolute",
|
|
54
|
+
bottom: 0,
|
|
55
|
+
top: 0,
|
|
56
|
+
left: 0,
|
|
57
|
+
right: 0,
|
|
58
|
+
height: 999
|
|
59
|
+
},
|
|
60
|
+
rounded: {
|
|
61
|
+
borderTopLeftRadius: KEYBOARD_BORDER_RADIUS,
|
|
62
|
+
borderTopRightRadius: KEYBOARD_BORDER_RADIUS,
|
|
63
|
+
overflow: "hidden"
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
var KeyboardEffects_default = KeyboardEffects;
|
|
67
|
+
|
|
68
|
+
export { KeyboardEffects_default as default };
|
|
69
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["esm/keyboard/components/KeyboardEffects/index.js"],"sourcesContent":["import { forwardRef, useEffect, useMemo, useRef } from \"react\";\nimport { StyleSheet, View } from \"react-native-web\";\nimport { KEYBOARD_BORDER_RADIUS, KEYBOARD_HAS_ROUNDED_CORNERS } from \"../../constants\";\nimport { KeyboardController } from \"../../module\";\nimport KeyboardStickyView from \"../KeyboardStickyView\";\nimport { jsx } from \"react/jsx-runtime\";\nconst translucentStack = [];\nlet currentTranslucent = false;\nconst applyTranslucent = () => {\n const next = translucentStack.length > 0 ? translucentStack[translucentStack.length - 1].translucent : false;\n if (next !== currentTranslucent) {\n currentTranslucent = next;\n KeyboardController.setTranslucent(next);\n }\n};\nconst pushTranslucentEntry = (entry) => {\n translucentStack.push(entry);\n applyTranslucent();\n};\nconst removeTranslucentEntry = (entry) => {\n const index = translucentStack.indexOf(entry);\n if (index !== -1) {\n translucentStack.splice(index, 1);\n }\n applyTranslucent();\n};\nconst KeyboardEffects = forwardRef(\n ({ translucent, rounded = true, children, ...props }, ref) => {\n const stackEntry = useRef({\n translucent: Boolean(translucent)\n }).current;\n const containerStyle = useMemo(\n () => [styles.container, KEYBOARD_HAS_ROUNDED_CORNERS && rounded && styles.rounded],\n [rounded]\n );\n useEffect(() => {\n pushTranslucentEntry(stackEntry);\n return () => {\n removeTranslucentEntry(stackEntry);\n };\n }, [stackEntry]);\n useEffect(() => {\n stackEntry.translucent = Boolean(translucent);\n applyTranslucent();\n }, [stackEntry, translucent]);\n return /* @__PURE__ */ jsx(KeyboardStickyView, { ref, ...props, children: /* @__PURE__ */ jsx(View, { style: containerStyle, children }) });\n }\n);\nconst styles = StyleSheet.create({\n container: {\n position: \"absolute\",\n bottom: 0,\n top: 0,\n left: 0,\n right: 0,\n height: 999\n },\n rounded: {\n borderTopLeftRadius: KEYBOARD_BORDER_RADIUS,\n borderTopRightRadius: KEYBOARD_BORDER_RADIUS,\n overflow: \"hidden\"\n }\n});\nvar KeyboardEffects_default = KeyboardEffects;\nexport {\n KeyboardEffects_default as default\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;;;;;AAMA,MAAM,mBAAmB,CAAC;AAC1B,IAAI,qBAAqB;AACzB,MAAM,yBAAyB;CAC7B,MAAM,OAAO,iBAAiB,SAAS,IAAI,iBAAiB,iBAAiB,SAAS,EAAE,CAAC,cAAc;CACvG,IAAI,SAAS,oBAAoB;EAC/B,qBAAqB;EACrB,mBAAmB,eAAe,IAAI;CACxC;AACF;AACA,MAAM,wBAAwB,UAAU;CACtC,iBAAiB,KAAK,KAAK;CAC3B,iBAAiB;AACnB;AACA,MAAM,0BAA0B,UAAU;CACxC,MAAM,QAAQ,iBAAiB,QAAQ,KAAK;CAC5C,IAAI,UAAU,CAAC,GAAG;EAChB,iBAAiB,OAAO,OAAO,CAAC;CAClC;CACA,iBAAiB;AACnB;AACA,MAAM,kBAAkB,YACrB,EAAE,aAAa,UAAU,MAAM,UAAU,GAAG,SAAS,QAAQ;CAC5D,MAAM,aAAa,OAAO,EACxB,aAAa,QAAQ,WAAW,EAClC,CAAC,CAAC,CAAC;CACH,MAAM,iBAAiB,cACf,CAAC,OAAO,WAAW,gCAAgC,WAAW,OAAO,OAAO,GAClF,CAAC,OAAO,CACV;CACA,gBAAgB;EACd,qBAAqB,UAAU;EAC/B,aAAa;GACX,uBAAuB,UAAU;EACnC;CACF,GAAG,CAAC,UAAU,CAAC;CACf,gBAAgB;EACd,WAAW,cAAc,QAAQ,WAAW;EAC5C,iBAAiB;CACnB,GAAG,CAAC,YAAY,WAAW,CAAC;CAC5B,OAAuB,oBAAI,oBAAoB;EAAE;EAAK,GAAG;EAAO,UAA0B,oBAAI,MAAM;GAAE,OAAO;GAAgB;EAAS,CAAC;CAAE,CAAC;AAC5I,CACF;AACA,MAAM,SAAS,WAAW,OAAO;CAC/B,WAAW;EACT,UAAU;EACV,QAAQ;EACR,KAAK;EACL,MAAM;EACN,OAAO;EACP,QAAQ;CACV;CACA,SAAS;EACP,qBAAqB;EACrB,sBAAsB;EACtB,UAAU;CACZ;AACF,CAAC;AACD,IAAI,0BAA0B"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useEffect, useMemo, useRef } from "react";
|
|
3
|
+
import { StyleSheet, View } from "react-native";
|
|
4
|
+
import { KEYBOARD_BORDER_RADIUS, KEYBOARD_HAS_ROUNDED_CORNERS } from "../../constants.native.js";
|
|
5
|
+
import { KeyboardController } from "../../module.native.js";
|
|
6
|
+
import KeyboardStickyView from "../KeyboardStickyView/index.native.js";
|
|
7
|
+
|
|
8
|
+
// dist/esm/keyboard/components/KeyboardEffects/index.native.js
|
|
9
|
+
var translucentStack = [];
|
|
10
|
+
var currentTranslucent = false;
|
|
11
|
+
var applyTranslucent = function applyTranslucent2() {
|
|
12
|
+
var next = translucentStack.length > 0 ? translucentStack[translucentStack.length - 1].translucent : false;
|
|
13
|
+
if (next !== currentTranslucent) {
|
|
14
|
+
currentTranslucent = next;
|
|
15
|
+
KeyboardController.setTranslucent(next);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
var pushTranslucentEntry = function pushTranslucentEntry2(entry) {
|
|
19
|
+
translucentStack.push(entry);
|
|
20
|
+
applyTranslucent();
|
|
21
|
+
};
|
|
22
|
+
var removeTranslucentEntry = function removeTranslucentEntry2(entry) {
|
|
23
|
+
var index = translucentStack.indexOf(entry);
|
|
24
|
+
if (index !== -1) {
|
|
25
|
+
translucentStack.splice(index, 1);
|
|
26
|
+
}
|
|
27
|
+
applyTranslucent();
|
|
28
|
+
};
|
|
29
|
+
var KeyboardEffects = /* @__PURE__ */ forwardRef(function(param, ref) {
|
|
30
|
+
var { translucent, rounded = true, children, ...props } = param;
|
|
31
|
+
var stackEntry = useRef({ translucent: Boolean(translucent) }).current;
|
|
32
|
+
var containerStyle = useMemo(function() {
|
|
33
|
+
return [styles.container, KEYBOARD_HAS_ROUNDED_CORNERS && rounded && styles.rounded];
|
|
34
|
+
}, [rounded]);
|
|
35
|
+
useEffect(function() {
|
|
36
|
+
pushTranslucentEntry(stackEntry);
|
|
37
|
+
return function() {
|
|
38
|
+
removeTranslucentEntry(stackEntry);
|
|
39
|
+
};
|
|
40
|
+
}, [stackEntry]);
|
|
41
|
+
useEffect(function() {
|
|
42
|
+
stackEntry.translucent = Boolean(translucent);
|
|
43
|
+
applyTranslucent();
|
|
44
|
+
}, [stackEntry, translucent]);
|
|
45
|
+
return /* @__PURE__ */ jsx(KeyboardStickyView, {
|
|
46
|
+
ref,
|
|
47
|
+
...props,
|
|
48
|
+
children: /* @__PURE__ */ jsx(View, {
|
|
49
|
+
style: containerStyle,
|
|
50
|
+
children
|
|
51
|
+
})
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
var styles = StyleSheet.create({
|
|
55
|
+
container: {
|
|
56
|
+
position: "absolute",
|
|
57
|
+
bottom: 0,
|
|
58
|
+
top: 0,
|
|
59
|
+
left: 0,
|
|
60
|
+
right: 0,
|
|
61
|
+
height: 999
|
|
62
|
+
},
|
|
63
|
+
rounded: {
|
|
64
|
+
borderTopLeftRadius: KEYBOARD_BORDER_RADIUS,
|
|
65
|
+
borderTopRightRadius: KEYBOARD_BORDER_RADIUS,
|
|
66
|
+
overflow: "hidden"
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
var KeyboardEffects_default = KeyboardEffects;
|
|
70
|
+
|
|
71
|
+
export { KeyboardEffects_default as default };
|
|
72
|
+
//# sourceMappingURL=index.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.native.js","names":[],"sources":["esm/keyboard/components/KeyboardEffects/index.native.js"],"sourcesContent":["import { jsx as _jsx } from \"react/jsx-runtime\";\nimport React, { forwardRef, useEffect, useMemo, useRef } from \"react\";\nimport { StyleSheet, View } from \"react-native\";\nimport { KEYBOARD_BORDER_RADIUS, KEYBOARD_HAS_ROUNDED_CORNERS } from \"../../constants\";\nimport { KeyboardController } from \"../../module\";\nimport KeyboardStickyView from \"../KeyboardStickyView\";\nvar translucentStack = [];\nvar currentTranslucent = false;\nvar applyTranslucent = function applyTranslucent2() {\n var next = translucentStack.length > 0 ? translucentStack[translucentStack.length - 1].translucent : false;\n if (next !== currentTranslucent) {\n currentTranslucent = next;\n KeyboardController.setTranslucent(next);\n }\n};\nvar pushTranslucentEntry = function pushTranslucentEntry2(entry) {\n translucentStack.push(entry);\n applyTranslucent();\n};\nvar removeTranslucentEntry = function removeTranslucentEntry2(entry) {\n var index = translucentStack.indexOf(entry);\n if (index !== -1) {\n translucentStack.splice(index, 1);\n }\n applyTranslucent();\n};\nvar KeyboardEffects = /* @__PURE__ */ forwardRef(function(param, ref) {\n var { translucent, rounded = true, children, ...props } = param;\n var stackEntry = useRef({\n translucent: Boolean(translucent)\n }).current;\n var containerStyle = useMemo(function() {\n return [\n styles.container,\n KEYBOARD_HAS_ROUNDED_CORNERS && rounded && styles.rounded\n ];\n }, [\n rounded\n ]);\n useEffect(function() {\n pushTranslucentEntry(stackEntry);\n return function() {\n removeTranslucentEntry(stackEntry);\n };\n }, [\n stackEntry\n ]);\n useEffect(function() {\n stackEntry.translucent = Boolean(translucent);\n applyTranslucent();\n }, [\n stackEntry,\n translucent\n ]);\n return /* @__PURE__ */ _jsx(KeyboardStickyView, {\n ref,\n ...props,\n children: /* @__PURE__ */ _jsx(View, {\n style: containerStyle,\n children\n })\n });\n});\nvar styles = StyleSheet.create({\n container: {\n position: \"absolute\",\n bottom: 0,\n top: 0,\n left: 0,\n right: 0,\n height: 999\n },\n rounded: {\n borderTopLeftRadius: KEYBOARD_BORDER_RADIUS,\n borderTopRightRadius: KEYBOARD_BORDER_RADIUS,\n overflow: \"hidden\"\n }\n});\nvar KeyboardEffects_default = KeyboardEffects;\nexport {\n KeyboardEffects_default as default\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;;;;;AAMA,IAAI,mBAAmB,CAAC;AACxB,IAAI,qBAAqB;AACzB,IAAI,mBAAmB,SAAS,oBAAoB;CAClD,IAAI,OAAO,iBAAiB,SAAS,IAAI,iBAAiB,iBAAiB,SAAS,EAAE,CAAC,cAAc;CACrG,IAAI,SAAS,oBAAoB;EAC/B,qBAAqB;EACrB,mBAAmB,eAAe,IAAI;CACxC;AACF;AACA,IAAI,uBAAuB,SAAS,sBAAsB,OAAO;CAC/D,iBAAiB,KAAK,KAAK;CAC3B,iBAAiB;AACnB;AACA,IAAI,yBAAyB,SAAS,wBAAwB,OAAO;CACnE,IAAI,QAAQ,iBAAiB,QAAQ,KAAK;CAC1C,IAAI,UAAU,CAAC,GAAG;EAChB,iBAAiB,OAAO,OAAO,CAAC;CAClC;CACA,iBAAiB;AACnB;AACA,IAAI,kBAAkC,2BAAW,SAAS,OAAO,KAAK;CACpE,IAAI,EAAE,aAAa,UAAU,MAAM,UAAU,GAAG,UAAU;CAC1D,IAAI,aAAa,OAAO,EACtB,aAAa,QAAQ,WAAW,EAClC,CAAC,CAAC,CAAC;CACH,IAAI,iBAAiB,QAAQ,WAAW;EACtC,OAAO,CACL,OAAO,WACP,gCAAgC,WAAW,OAAO,OACpD;CACF,GAAG,CACD,OACF,CAAC;CACD,UAAU,WAAW;EACnB,qBAAqB,UAAU;EAC/B,OAAO,WAAW;GAChB,uBAAuB,UAAU;EACnC;CACF,GAAG,CACD,UACF,CAAC;CACD,UAAU,WAAW;EACnB,WAAW,cAAc,QAAQ,WAAW;EAC5C,iBAAiB;CACnB,GAAG,CACD,YACA,WACF,CAAC;CACD,OAAuB,oBAAK,oBAAoB;EAC9C;EACA,GAAG;EACH,UAA0B,oBAAK,MAAM;GACnC,OAAO;GACP;EACF,CAAC;CACH,CAAC;AACH,CAAC;AACD,IAAI,SAAS,WAAW,OAAO;CAC7B,WAAW;EACT,UAAU;EACV,QAAQ;EACR,KAAK;EACL,MAAM;EACN,OAAO;EACP,QAAQ;CACV;CACA,SAAS;EACP,qBAAqB;EACrB,sBAAsB;EACtB,UAAU;CACZ;AACF,CAAC;AACD,IAAI,0BAA0B"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { forwardRef, useMemo } from "react";
|
|
2
|
+
import Reanimated, { interpolate } from "react-native-reanimated";
|
|
3
|
+
import { useReanimatedKeyboardAnimation } from "../../hooks/index.mjs";
|
|
4
|
+
import { useAnimatedStyle } from "../../reanimated.mjs";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
// dist/esm/keyboard/components/KeyboardStickyView/index.js
|
|
8
|
+
const KeyboardStickyView = forwardRef(({ children, offset: { closed = 0, opened = 0 } = {}, style, enabled = true, ...props }, ref) => {
|
|
9
|
+
const { height, progress } = useReanimatedKeyboardAnimation();
|
|
10
|
+
const stickyViewStyle = useAnimatedStyle(() => {
|
|
11
|
+
const offset = interpolate(progress.value, [0, 1], [closed, opened]);
|
|
12
|
+
return { transform: [{ translateY: enabled ? height.value + offset : closed }] };
|
|
13
|
+
}, [
|
|
14
|
+
closed,
|
|
15
|
+
opened,
|
|
16
|
+
enabled
|
|
17
|
+
]);
|
|
18
|
+
const styles = useMemo(() => [style, stickyViewStyle], [style, stickyViewStyle]);
|
|
19
|
+
return /* @__PURE__ */ jsx(Reanimated.View, {
|
|
20
|
+
ref,
|
|
21
|
+
style: styles,
|
|
22
|
+
...props,
|
|
23
|
+
children
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
var KeyboardStickyView_default = KeyboardStickyView;
|
|
27
|
+
|
|
28
|
+
export { KeyboardStickyView_default as default };
|
|
29
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["esm/keyboard/components/KeyboardStickyView/index.js"],"sourcesContent":["import { forwardRef, useMemo } from \"react\";\nimport Reanimated, { interpolate } from \"react-native-reanimated\";\nimport { useReanimatedKeyboardAnimation } from \"../../hooks\";\nimport { useAnimatedStyle } from \"../../reanimated\";\nimport { jsx } from \"react/jsx-runtime\";\nconst KeyboardStickyView = forwardRef(\n ({\n children,\n offset: { closed = 0, opened = 0 } = {},\n style,\n enabled = true,\n ...props\n }, ref) => {\n const { height, progress } = useReanimatedKeyboardAnimation();\n const stickyViewStyle = useAnimatedStyle(() => {\n const offset = interpolate(progress.value, [0, 1], [closed, opened]);\n return {\n transform: [{ translateY: enabled ? height.value + offset : closed }]\n };\n }, [closed, opened, enabled]);\n const styles = useMemo(() => [style, stickyViewStyle], [style, stickyViewStyle]);\n return /* @__PURE__ */ jsx(Reanimated.View, { ref, style: styles, ...props, children });\n }\n);\nvar KeyboardStickyView_default = KeyboardStickyView;\nexport {\n KeyboardStickyView_default as default\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;;;;AAKA,MAAM,qBAAqB,YACxB,EACC,UACA,QAAQ,EAAE,SAAS,GAAG,SAAS,MAAM,CAAC,GACtC,OACA,UAAU,MACV,GAAG,SACF,QAAQ;CACT,MAAM,EAAE,QAAQ,aAAa,+BAA+B;CAC5D,MAAM,kBAAkB,uBAAuB;EAC7C,MAAM,SAAS,YAAY,SAAS,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,MAAM,CAAC;EACnE,OAAO,EACL,WAAW,CAAC,EAAE,YAAY,UAAU,OAAO,QAAQ,SAAS,OAAO,CAAC,EACtE;CACF,GAAG;EAAC;EAAQ;EAAQ;CAAO,CAAC;CAC5B,MAAM,SAAS,cAAc,CAAC,OAAO,eAAe,GAAG,CAAC,OAAO,eAAe,CAAC;CAC/E,OAAuB,oBAAI,WAAW,MAAM;EAAE;EAAK,OAAO;EAAQ,GAAG;EAAO;CAAS,CAAC;AACxF,CACF;AACA,IAAI,6BAA6B"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useMemo } from "react";
|
|
3
|
+
import Reanimated, { interpolate } from "react-native-reanimated";
|
|
4
|
+
import { useReanimatedKeyboardAnimation } from "../../hooks/index.native.js";
|
|
5
|
+
import { useAnimatedStyle } from "../../reanimated.native.js";
|
|
6
|
+
|
|
7
|
+
// dist/esm/keyboard/components/KeyboardStickyView/index.native.js
|
|
8
|
+
var KeyboardStickyView = /* @__PURE__ */ forwardRef(function(param, ref) {
|
|
9
|
+
var { children, offset: { closed = 0, opened = 0 } = {}, style, enabled = true, ...props } = param;
|
|
10
|
+
var { height, progress } = useReanimatedKeyboardAnimation();
|
|
11
|
+
var stickyViewStyle = useAnimatedStyle(function() {
|
|
12
|
+
var offset = interpolate(progress.value, [0, 1], [closed, opened]);
|
|
13
|
+
return { transform: [{ translateY: enabled ? height.value + offset : closed }] };
|
|
14
|
+
}, [
|
|
15
|
+
closed,
|
|
16
|
+
opened,
|
|
17
|
+
enabled
|
|
18
|
+
]);
|
|
19
|
+
var styles = useMemo(function() {
|
|
20
|
+
return [style, stickyViewStyle];
|
|
21
|
+
}, [style, stickyViewStyle]);
|
|
22
|
+
return /* @__PURE__ */ jsx(Reanimated.View, {
|
|
23
|
+
ref,
|
|
24
|
+
style: styles,
|
|
25
|
+
...props,
|
|
26
|
+
children
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
var KeyboardStickyView_default = KeyboardStickyView;
|
|
30
|
+
|
|
31
|
+
export { KeyboardStickyView_default as default };
|
|
32
|
+
//# sourceMappingURL=index.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.native.js","names":[],"sources":["esm/keyboard/components/KeyboardStickyView/index.native.js"],"sourcesContent":["import { jsx as _jsx } from \"react/jsx-runtime\";\nimport React, { forwardRef, useMemo } from \"react\";\nimport Reanimated, { interpolate } from \"react-native-reanimated\";\nimport { useReanimatedKeyboardAnimation } from \"../../hooks\";\nimport { useAnimatedStyle } from \"../../reanimated\";\nvar KeyboardStickyView = /* @__PURE__ */ forwardRef(function(param, ref) {\n var { children, offset: { closed = 0, opened = 0 } = {}, style, enabled = true, ...props } = param;\n var { height, progress } = useReanimatedKeyboardAnimation();\n var stickyViewStyle = useAnimatedStyle(function() {\n var offset = interpolate(progress.value, [\n 0,\n 1\n ], [\n closed,\n opened\n ]);\n return {\n transform: [\n {\n translateY: enabled ? height.value + offset : closed\n }\n ]\n };\n }, [\n closed,\n opened,\n enabled\n ]);\n var styles = useMemo(function() {\n return [\n style,\n stickyViewStyle\n ];\n }, [\n style,\n stickyViewStyle\n ]);\n return /* @__PURE__ */ _jsx(Reanimated.View, {\n ref,\n style: styles,\n ...props,\n children\n });\n});\nvar KeyboardStickyView_default = KeyboardStickyView;\nexport {\n KeyboardStickyView_default as default\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;;;;AAKA,IAAI,qBAAqC,2BAAW,SAAS,OAAO,KAAK;CACvE,IAAI,EAAE,UAAU,QAAQ,EAAE,SAAS,GAAG,SAAS,MAAM,CAAC,GAAG,OAAO,UAAU,MAAM,GAAG,UAAU;CAC7F,IAAI,EAAE,QAAQ,aAAa,+BAA+B;CAC1D,IAAI,kBAAkB,iBAAiB,WAAW;EAChD,IAAI,SAAS,YAAY,SAAS,OAAO,CACvC,GACA,CACF,GAAG,CACD,QACA,MACF,CAAC;EACD,OAAO,EACL,WAAW,CACT,EACE,YAAY,UAAU,OAAO,QAAQ,SAAS,OAChD,CACF,EACF;CACF,GAAG;EACD;EACA;EACA;CACF,CAAC;CACD,IAAI,SAAS,QAAQ,WAAW;EAC9B,OAAO,CACL,OACA,eACF;CACF,GAAG,CACD,OACA,eACF,CAAC;CACD,OAAuB,oBAAK,WAAW,MAAM;EAC3C;EACA,OAAO;EACP,GAAG;EACH;CACF,CAAC;AACH,CAAC;AACD,IAAI,6BAA6B"}
|