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
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
2
|
+
import { Animated, Platform, StyleSheet } from "react-native-web";
|
|
3
|
+
import { controlEdgeToEdgeValues, isEdgeToEdge } from "react-native-is-edge-to-edge";
|
|
4
|
+
import { useSharedValue } from "react-native-reanimated";
|
|
5
|
+
import { FocusedInputEvents, KeyboardControllerView, KeyboardControllerViewCommands } from "./bindings.mjs";
|
|
6
|
+
import { KeyboardContext } from "./context.mjs";
|
|
7
|
+
import { useAnimatedValue, useEventHandlerRegistration } from "./internal.mjs";
|
|
8
|
+
import { KeyboardController } from "./module.mjs";
|
|
9
|
+
import { useAnimatedKeyboardHandler, useFocusedInputLayoutHandler } from "./reanimated.mjs";
|
|
10
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
|
|
12
|
+
// dist/esm/keyboard/animated.js
|
|
13
|
+
const IS_EDGE_TO_EDGE = isEdgeToEdge();
|
|
14
|
+
const styles = StyleSheet.create({
|
|
15
|
+
container: { flex: 1 },
|
|
16
|
+
hidden: {
|
|
17
|
+
display: "none",
|
|
18
|
+
position: "absolute"
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
const OS = Platform.OS;
|
|
22
|
+
const KeyboardProvider = (props) => {
|
|
23
|
+
const { children, statusBarTranslucent, navigationBarTranslucent, preserveEdgeToEdge, enabled: initiallyEnabled = true, preload = true } = props;
|
|
24
|
+
const viewRef = useRef(null);
|
|
25
|
+
const [enabled, setEnabled] = useState(initiallyEnabled);
|
|
26
|
+
const progress = useAnimatedValue(0);
|
|
27
|
+
const height = useAnimatedValue(0);
|
|
28
|
+
const progressSV = useSharedValue(0);
|
|
29
|
+
const heightSV = useSharedValue(0);
|
|
30
|
+
const layout = useSharedValue(null);
|
|
31
|
+
const setKeyboardHandlers = useEventHandlerRegistration(viewRef);
|
|
32
|
+
const setInputHandlers = useEventHandlerRegistration(viewRef);
|
|
33
|
+
const update = useCallback(async () => {
|
|
34
|
+
KeyboardControllerViewCommands.synchronizeFocusedInputLayout(viewRef.current);
|
|
35
|
+
await new Promise((resolve) => {
|
|
36
|
+
const subscription = FocusedInputEvents.addListener("layoutDidSynchronize", () => {
|
|
37
|
+
subscription.remove();
|
|
38
|
+
resolve(null);
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
}, []);
|
|
42
|
+
const context = useMemo(() => ({
|
|
43
|
+
enabled,
|
|
44
|
+
animated: {
|
|
45
|
+
progress,
|
|
46
|
+
height: Animated.multiply(height, -1)
|
|
47
|
+
},
|
|
48
|
+
reanimated: {
|
|
49
|
+
progress: progressSV,
|
|
50
|
+
height: heightSV
|
|
51
|
+
},
|
|
52
|
+
layout,
|
|
53
|
+
update,
|
|
54
|
+
setKeyboardHandlers,
|
|
55
|
+
setInputHandlers,
|
|
56
|
+
setEnabled
|
|
57
|
+
}), [enabled]);
|
|
58
|
+
const style = useMemo(() => [styles.hidden, { transform: [{ translateX: height }, { translateY: progress }] }], []);
|
|
59
|
+
const onKeyboardMove = useMemo(() => Animated.event([{ nativeEvent: {
|
|
60
|
+
progress,
|
|
61
|
+
height
|
|
62
|
+
} }], { useNativeDriver: false }), []);
|
|
63
|
+
const updateSharedValues = (event, platforms) => {
|
|
64
|
+
"worklet";
|
|
65
|
+
if (platforms.includes(OS)) {
|
|
66
|
+
progressSV.value = event.progress;
|
|
67
|
+
heightSV.value = -event.height;
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
const keyboardHandler = useAnimatedKeyboardHandler({
|
|
71
|
+
onKeyboardMoveStart: (event) => {
|
|
72
|
+
"worklet";
|
|
73
|
+
updateSharedValues(event, ["ios"]);
|
|
74
|
+
},
|
|
75
|
+
onKeyboardMove: (event) => {
|
|
76
|
+
"worklet";
|
|
77
|
+
updateSharedValues(event, ["android"]);
|
|
78
|
+
},
|
|
79
|
+
onKeyboardMoveInteractive: (event) => {
|
|
80
|
+
"worklet";
|
|
81
|
+
updateSharedValues(event, ["android", "ios"]);
|
|
82
|
+
},
|
|
83
|
+
onKeyboardMoveEnd: (event) => {
|
|
84
|
+
"worklet";
|
|
85
|
+
updateSharedValues(event, ["android"]);
|
|
86
|
+
}
|
|
87
|
+
}, []);
|
|
88
|
+
const inputLayoutHandler = useFocusedInputLayoutHandler({ onFocusedInputLayoutChanged: (e) => {
|
|
89
|
+
"worklet";
|
|
90
|
+
if (e.target !== -1) {
|
|
91
|
+
layout.value = e;
|
|
92
|
+
} else {
|
|
93
|
+
layout.value = null;
|
|
94
|
+
}
|
|
95
|
+
} }, []);
|
|
96
|
+
useEffect(() => {
|
|
97
|
+
const detachKeyboardHandler = setKeyboardHandlers(keyboardHandler);
|
|
98
|
+
const detachInputLayoutHandler = setInputHandlers(inputLayoutHandler);
|
|
99
|
+
return () => {
|
|
100
|
+
detachKeyboardHandler();
|
|
101
|
+
detachInputLayoutHandler();
|
|
102
|
+
};
|
|
103
|
+
}, [keyboardHandler, inputLayoutHandler]);
|
|
104
|
+
useEffect(() => {
|
|
105
|
+
if (preload) {
|
|
106
|
+
KeyboardController.preload();
|
|
107
|
+
}
|
|
108
|
+
}, [preload]);
|
|
109
|
+
if (__DEV__) {
|
|
110
|
+
controlEdgeToEdgeValues({
|
|
111
|
+
statusBarTranslucent,
|
|
112
|
+
navigationBarTranslucent,
|
|
113
|
+
preserveEdgeToEdge
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
return /* @__PURE__ */ jsxs(KeyboardContext.Provider, {
|
|
117
|
+
value: context,
|
|
118
|
+
children: [/* @__PURE__ */ jsx(KeyboardControllerView, {
|
|
119
|
+
ref: viewRef,
|
|
120
|
+
enabled,
|
|
121
|
+
navigationBarTranslucent: IS_EDGE_TO_EDGE || navigationBarTranslucent,
|
|
122
|
+
statusBarTranslucent: IS_EDGE_TO_EDGE || statusBarTranslucent,
|
|
123
|
+
preserveEdgeToEdge: IS_EDGE_TO_EDGE || preserveEdgeToEdge,
|
|
124
|
+
style: styles.container,
|
|
125
|
+
onKeyboardMoveStart: OS === "ios" ? onKeyboardMove : void 0,
|
|
126
|
+
onKeyboardMove: OS === "android" ? onKeyboardMove : void 0,
|
|
127
|
+
onKeyboardMoveInteractive: onKeyboardMove,
|
|
128
|
+
onKeyboardMoveEnd: OS === "android" ? onKeyboardMove : void 0,
|
|
129
|
+
children
|
|
130
|
+
}), /* @__PURE__ */ jsx(Animated.View, { style })]
|
|
131
|
+
});
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
export { KeyboardProvider };
|
|
135
|
+
//# sourceMappingURL=animated.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"animated.js","names":[],"sources":["esm/keyboard/animated.js"],"sourcesContent":["import { useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { Animated, Platform, StyleSheet } from \"react-native-web\";\nimport { controlEdgeToEdgeValues, isEdgeToEdge } from \"react-native-is-edge-to-edge\";\nimport { useSharedValue } from \"react-native-reanimated\";\nimport {\n FocusedInputEvents,\n KeyboardControllerView,\n KeyboardControllerViewCommands\n} from \"./bindings\";\nimport { KeyboardContext } from \"./context\";\nimport { useAnimatedValue, useEventHandlerRegistration } from \"./internal\";\nimport { KeyboardController } from \"./module\";\nimport { useAnimatedKeyboardHandler, useFocusedInputLayoutHandler } from \"./reanimated\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nconst IS_EDGE_TO_EDGE = isEdgeToEdge();\nconst styles = StyleSheet.create({\n container: {\n flex: 1\n },\n hidden: {\n display: \"none\",\n position: \"absolute\"\n }\n});\nconst OS = Platform.OS;\nconst KeyboardProvider = (props) => {\n const {\n children,\n statusBarTranslucent,\n navigationBarTranslucent,\n preserveEdgeToEdge,\n enabled: initiallyEnabled = true,\n preload = true\n } = props;\n const viewRef = useRef(null);\n const [enabled, setEnabled] = useState(initiallyEnabled);\n const progress = useAnimatedValue(0);\n const height = useAnimatedValue(0);\n const progressSV = useSharedValue(0);\n const heightSV = useSharedValue(0);\n const layout = useSharedValue(null);\n const setKeyboardHandlers = useEventHandlerRegistration(viewRef);\n const setInputHandlers = useEventHandlerRegistration(viewRef);\n const update = useCallback(async () => {\n KeyboardControllerViewCommands.synchronizeFocusedInputLayout(viewRef.current);\n await new Promise((resolve) => {\n const subscription = FocusedInputEvents.addListener(\"layoutDidSynchronize\", () => {\n subscription.remove();\n resolve(null);\n });\n });\n }, []);\n const context = useMemo(\n () => ({\n enabled,\n animated: { progress, height: Animated.multiply(height, -1) },\n reanimated: { progress: progressSV, height: heightSV },\n layout,\n update,\n setKeyboardHandlers,\n setInputHandlers,\n setEnabled\n }),\n [enabled]\n );\n const style = useMemo(\n () => [\n styles.hidden,\n { transform: [{ translateX: height }, { translateY: progress }] }\n ],\n []\n );\n const onKeyboardMove = useMemo(\n () => Animated.event(\n [\n {\n nativeEvent: {\n progress,\n height\n }\n }\n ],\n // the controller view renders without animated wrappers, so this\n // legacy Animated.Value context is js driven; the reanimated values\n // register by view tag below.\n { useNativeDriver: false }\n ),\n []\n );\n const updateSharedValues = (event, platforms) => {\n \"worklet\";\n if (platforms.includes(OS)) {\n progressSV.value = event.progress;\n heightSV.value = -event.height;\n }\n };\n const keyboardHandler = useAnimatedKeyboardHandler(\n {\n onKeyboardMoveStart: (event) => {\n \"worklet\";\n updateSharedValues(event, [\"ios\"]);\n },\n onKeyboardMove: (event) => {\n \"worklet\";\n updateSharedValues(event, [\"android\"]);\n },\n onKeyboardMoveInteractive: (event) => {\n \"worklet\";\n updateSharedValues(event, [\"android\", \"ios\"]);\n },\n onKeyboardMoveEnd: (event) => {\n \"worklet\";\n updateSharedValues(event, [\"android\"]);\n }\n },\n []\n );\n const inputLayoutHandler = useFocusedInputLayoutHandler(\n {\n onFocusedInputLayoutChanged: (e) => {\n \"worklet\";\n if (e.target !== -1) {\n layout.value = e;\n } else {\n layout.value = null;\n }\n }\n },\n []\n );\n useEffect(() => {\n const detachKeyboardHandler = setKeyboardHandlers(keyboardHandler);\n const detachInputLayoutHandler = setInputHandlers(inputLayoutHandler);\n return () => {\n detachKeyboardHandler();\n detachInputLayoutHandler();\n };\n }, [keyboardHandler, inputLayoutHandler]);\n useEffect(() => {\n if (preload) {\n KeyboardController.preload();\n }\n }, [preload]);\n if (__DEV__) {\n controlEdgeToEdgeValues({\n statusBarTranslucent,\n navigationBarTranslucent,\n preserveEdgeToEdge\n });\n }\n return /* @__PURE__ */ jsxs(KeyboardContext.Provider, { value: context, children: [\n /* @__PURE__ */ jsx(\n KeyboardControllerView,\n {\n ref: viewRef,\n enabled,\n navigationBarTranslucent: IS_EDGE_TO_EDGE || navigationBarTranslucent,\n statusBarTranslucent: IS_EDGE_TO_EDGE || statusBarTranslucent,\n preserveEdgeToEdge: IS_EDGE_TO_EDGE || preserveEdgeToEdge,\n style: styles.container,\n onKeyboardMoveStart: OS === \"ios\" ? onKeyboardMove : void 0,\n onKeyboardMove: OS === \"android\" ? onKeyboardMove : void 0,\n onKeyboardMoveInteractive: onKeyboardMove,\n onKeyboardMoveEnd: OS === \"android\" ? onKeyboardMove : void 0,\n children\n }\n ),\n /* @__PURE__ */ jsx(\n Animated.View,\n {\n style\n }\n )\n ] });\n};\nexport {\n KeyboardProvider\n};\n//# sourceMappingURL=animated.js.map\n"],"mappings":"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"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
3
|
+
import { Animated, Platform, StyleSheet } from "react-native";
|
|
4
|
+
import { controlEdgeToEdgeValues, isEdgeToEdge } from "react-native-is-edge-to-edge";
|
|
5
|
+
import { useSharedValue } from "react-native-reanimated";
|
|
6
|
+
import { FocusedInputEvents, KeyboardControllerView, KeyboardControllerViewCommands } from "./bindings.native.js";
|
|
7
|
+
import { KeyboardContext } from "./context.native.js";
|
|
8
|
+
import { useAnimatedValue, useEventHandlerRegistration } from "./internal.native.js";
|
|
9
|
+
import { KeyboardController } from "./module.native.js";
|
|
10
|
+
import { useAnimatedKeyboardHandler, useFocusedInputLayoutHandler } from "./reanimated.native.js";
|
|
11
|
+
|
|
12
|
+
// dist/esm/keyboard/animated.native.js
|
|
13
|
+
var IS_EDGE_TO_EDGE = isEdgeToEdge();
|
|
14
|
+
var styles = StyleSheet.create({
|
|
15
|
+
container: { flex: 1 },
|
|
16
|
+
hidden: {
|
|
17
|
+
display: "none",
|
|
18
|
+
position: "absolute"
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
var OS = Platform.OS;
|
|
22
|
+
var KeyboardProvider = function KeyboardProvider2(props) {
|
|
23
|
+
var { children, statusBarTranslucent, navigationBarTranslucent, preserveEdgeToEdge, enabled: initiallyEnabled = true, preload = true } = props;
|
|
24
|
+
var viewRef = useRef(null);
|
|
25
|
+
var [enabled, setEnabled] = useState(initiallyEnabled);
|
|
26
|
+
var progress = useAnimatedValue(0);
|
|
27
|
+
var height = useAnimatedValue(0);
|
|
28
|
+
var progressSV = useSharedValue(0);
|
|
29
|
+
var heightSV = useSharedValue(0);
|
|
30
|
+
var layout = useSharedValue(null);
|
|
31
|
+
var setKeyboardHandlers = useEventHandlerRegistration(viewRef);
|
|
32
|
+
var setInputHandlers = useEventHandlerRegistration(viewRef);
|
|
33
|
+
var update = useCallback(async function() {
|
|
34
|
+
KeyboardControllerViewCommands.synchronizeFocusedInputLayout(viewRef.current);
|
|
35
|
+
await new Promise(function(resolve) {
|
|
36
|
+
var subscription = FocusedInputEvents.addListener("layoutDidSynchronize", function() {
|
|
37
|
+
subscription.remove();
|
|
38
|
+
resolve(null);
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
}, []);
|
|
42
|
+
var context = useMemo(function() {
|
|
43
|
+
return {
|
|
44
|
+
enabled,
|
|
45
|
+
animated: {
|
|
46
|
+
progress,
|
|
47
|
+
height: Animated.multiply(height, -1)
|
|
48
|
+
},
|
|
49
|
+
reanimated: {
|
|
50
|
+
progress: progressSV,
|
|
51
|
+
height: heightSV
|
|
52
|
+
},
|
|
53
|
+
layout,
|
|
54
|
+
update,
|
|
55
|
+
setKeyboardHandlers,
|
|
56
|
+
setInputHandlers,
|
|
57
|
+
setEnabled
|
|
58
|
+
};
|
|
59
|
+
}, [enabled]);
|
|
60
|
+
var style = useMemo(function() {
|
|
61
|
+
return [styles.hidden, { transform: [{ translateX: height }, { translateY: progress }] }];
|
|
62
|
+
}, []);
|
|
63
|
+
var onKeyboardMove = useMemo(function() {
|
|
64
|
+
return Animated.event([{ nativeEvent: {
|
|
65
|
+
progress,
|
|
66
|
+
height
|
|
67
|
+
} }], { useNativeDriver: false });
|
|
68
|
+
}, []);
|
|
69
|
+
var updateSharedValues = function updateSharedValues2(event, platforms) {
|
|
70
|
+
"worklet";
|
|
71
|
+
if (platforms.includes(OS)) {
|
|
72
|
+
progressSV.value = event.progress;
|
|
73
|
+
heightSV.value = -event.height;
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
var keyboardHandler = useAnimatedKeyboardHandler({
|
|
77
|
+
onKeyboardMoveStart: function onKeyboardMoveStart(event) {
|
|
78
|
+
"worklet";
|
|
79
|
+
updateSharedValues(event, ["ios"]);
|
|
80
|
+
},
|
|
81
|
+
onKeyboardMove: function onKeyboardMove2(event) {
|
|
82
|
+
"worklet";
|
|
83
|
+
updateSharedValues(event, ["android"]);
|
|
84
|
+
},
|
|
85
|
+
onKeyboardMoveInteractive: function onKeyboardMoveInteractive(event) {
|
|
86
|
+
"worklet";
|
|
87
|
+
updateSharedValues(event, ["android", "ios"]);
|
|
88
|
+
},
|
|
89
|
+
onKeyboardMoveEnd: function onKeyboardMoveEnd(event) {
|
|
90
|
+
"worklet";
|
|
91
|
+
updateSharedValues(event, ["android"]);
|
|
92
|
+
}
|
|
93
|
+
}, []);
|
|
94
|
+
var inputLayoutHandler = useFocusedInputLayoutHandler({ onFocusedInputLayoutChanged: function onFocusedInputLayoutChanged(e) {
|
|
95
|
+
"worklet";
|
|
96
|
+
if (e.target !== -1) {
|
|
97
|
+
layout.value = e;
|
|
98
|
+
} else {
|
|
99
|
+
layout.value = null;
|
|
100
|
+
}
|
|
101
|
+
} }, []);
|
|
102
|
+
useEffect(function() {
|
|
103
|
+
var detachKeyboardHandler = setKeyboardHandlers(keyboardHandler);
|
|
104
|
+
var detachInputLayoutHandler = setInputHandlers(inputLayoutHandler);
|
|
105
|
+
return function() {
|
|
106
|
+
detachKeyboardHandler();
|
|
107
|
+
detachInputLayoutHandler();
|
|
108
|
+
};
|
|
109
|
+
}, [keyboardHandler, inputLayoutHandler]);
|
|
110
|
+
useEffect(function() {
|
|
111
|
+
if (preload) {
|
|
112
|
+
KeyboardController.preload();
|
|
113
|
+
}
|
|
114
|
+
}, [preload]);
|
|
115
|
+
if (__DEV__) {
|
|
116
|
+
controlEdgeToEdgeValues({
|
|
117
|
+
statusBarTranslucent,
|
|
118
|
+
navigationBarTranslucent,
|
|
119
|
+
preserveEdgeToEdge
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
return /* @__PURE__ */ jsxs(KeyboardContext.Provider, {
|
|
123
|
+
value: context,
|
|
124
|
+
children: [/* @__PURE__ */ jsx(KeyboardControllerView, {
|
|
125
|
+
ref: viewRef,
|
|
126
|
+
enabled,
|
|
127
|
+
navigationBarTranslucent: IS_EDGE_TO_EDGE || navigationBarTranslucent,
|
|
128
|
+
statusBarTranslucent: IS_EDGE_TO_EDGE || statusBarTranslucent,
|
|
129
|
+
preserveEdgeToEdge: IS_EDGE_TO_EDGE || preserveEdgeToEdge,
|
|
130
|
+
style: styles.container,
|
|
131
|
+
onKeyboardMoveStart: OS === "ios" ? onKeyboardMove : void 0,
|
|
132
|
+
onKeyboardMove: OS === "android" ? onKeyboardMove : void 0,
|
|
133
|
+
onKeyboardMoveInteractive: onKeyboardMove,
|
|
134
|
+
onKeyboardMoveEnd: OS === "android" ? onKeyboardMove : void 0,
|
|
135
|
+
children
|
|
136
|
+
}), /* @__PURE__ */ jsx(Animated.View, { style })]
|
|
137
|
+
});
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
export { KeyboardProvider };
|
|
141
|
+
//# sourceMappingURL=animated.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"animated.native.js","names":[],"sources":["esm/keyboard/animated.native.js"],"sourcesContent":["import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { Animated, Platform, StyleSheet } from \"react-native\";\nimport { controlEdgeToEdgeValues, isEdgeToEdge } from \"react-native-is-edge-to-edge\";\nimport { useSharedValue } from \"react-native-reanimated\";\nimport { FocusedInputEvents, KeyboardControllerView, KeyboardControllerViewCommands } from \"./bindings\";\nimport { KeyboardContext } from \"./context\";\nimport { useAnimatedValue, useEventHandlerRegistration } from \"./internal\";\nimport { KeyboardController } from \"./module\";\nimport { useAnimatedKeyboardHandler, useFocusedInputLayoutHandler } from \"./reanimated\";\nvar IS_EDGE_TO_EDGE = isEdgeToEdge();\nvar styles = StyleSheet.create({\n container: {\n flex: 1\n },\n hidden: {\n display: \"none\",\n position: \"absolute\"\n }\n});\nvar OS = Platform.OS;\nvar KeyboardProvider = function KeyboardProvider2(props) {\n var { children, statusBarTranslucent, navigationBarTranslucent, preserveEdgeToEdge, enabled: initiallyEnabled = true, preload = true } = props;\n var viewRef = useRef(null);\n var [enabled, setEnabled] = useState(initiallyEnabled);\n var progress = useAnimatedValue(0);\n var height = useAnimatedValue(0);\n var progressSV = useSharedValue(0);\n var heightSV = useSharedValue(0);\n var layout = useSharedValue(null);\n var setKeyboardHandlers = useEventHandlerRegistration(viewRef);\n var setInputHandlers = useEventHandlerRegistration(viewRef);\n var update = useCallback(async function() {\n KeyboardControllerViewCommands.synchronizeFocusedInputLayout(viewRef.current);\n await new Promise(function(resolve) {\n var subscription = FocusedInputEvents.addListener(\"layoutDidSynchronize\", function() {\n subscription.remove();\n resolve(null);\n });\n });\n }, []);\n var context = useMemo(function() {\n return {\n enabled,\n animated: {\n progress,\n height: Animated.multiply(height, -1)\n },\n reanimated: {\n progress: progressSV,\n height: heightSV\n },\n layout,\n update,\n setKeyboardHandlers,\n setInputHandlers,\n setEnabled\n };\n }, [\n enabled\n ]);\n var style = useMemo(function() {\n return [\n styles.hidden,\n {\n transform: [\n {\n translateX: height\n },\n {\n translateY: progress\n }\n ]\n }\n ];\n }, []);\n var onKeyboardMove = useMemo(function() {\n return Animated.event(\n [\n {\n nativeEvent: {\n progress,\n height\n }\n }\n ],\n // the controller view renders without animated wrappers, so this\n // legacy Animated.Value context is js driven; the reanimated values\n // register by view tag below.\n {\n useNativeDriver: false\n }\n );\n }, []);\n var updateSharedValues = function updateSharedValues2(event, platforms) {\n \"worklet\";\n if (platforms.includes(OS)) {\n progressSV.value = event.progress;\n heightSV.value = -event.height;\n }\n };\n var keyboardHandler = useAnimatedKeyboardHandler({\n onKeyboardMoveStart: function onKeyboardMoveStart(event) {\n \"worklet\";\n updateSharedValues(event, [\n \"ios\"\n ]);\n },\n onKeyboardMove: function onKeyboardMove2(event) {\n \"worklet\";\n updateSharedValues(event, [\n \"android\"\n ]);\n },\n onKeyboardMoveInteractive: function onKeyboardMoveInteractive(event) {\n \"worklet\";\n updateSharedValues(event, [\n \"android\",\n \"ios\"\n ]);\n },\n onKeyboardMoveEnd: function onKeyboardMoveEnd(event) {\n \"worklet\";\n updateSharedValues(event, [\n \"android\"\n ]);\n }\n }, []);\n var inputLayoutHandler = useFocusedInputLayoutHandler({\n onFocusedInputLayoutChanged: function onFocusedInputLayoutChanged(e) {\n \"worklet\";\n if (e.target !== -1) {\n layout.value = e;\n } else {\n layout.value = null;\n }\n }\n }, []);\n useEffect(function() {\n var detachKeyboardHandler = setKeyboardHandlers(keyboardHandler);\n var detachInputLayoutHandler = setInputHandlers(inputLayoutHandler);\n return function() {\n detachKeyboardHandler();\n detachInputLayoutHandler();\n };\n }, [\n keyboardHandler,\n inputLayoutHandler\n ]);\n useEffect(function() {\n if (preload) {\n KeyboardController.preload();\n }\n }, [\n preload\n ]);\n if (__DEV__) {\n controlEdgeToEdgeValues({\n statusBarTranslucent,\n navigationBarTranslucent,\n preserveEdgeToEdge\n });\n }\n return /* @__PURE__ */ _jsxs(KeyboardContext.Provider, {\n value: context,\n children: [\n /* @__PURE__ */ _jsx(KeyboardControllerView, {\n ref: viewRef,\n enabled,\n navigationBarTranslucent: IS_EDGE_TO_EDGE || navigationBarTranslucent,\n statusBarTranslucent: IS_EDGE_TO_EDGE || statusBarTranslucent,\n preserveEdgeToEdge: IS_EDGE_TO_EDGE || preserveEdgeToEdge,\n style: styles.container,\n onKeyboardMoveStart: OS === \"ios\" ? onKeyboardMove : void 0,\n onKeyboardMove: OS === \"android\" ? onKeyboardMove : void 0,\n onKeyboardMoveInteractive: onKeyboardMove,\n onKeyboardMoveEnd: OS === \"android\" ? onKeyboardMove : void 0,\n children\n }),\n /* @__PURE__ */ _jsx(Animated.View, {\n // we are using this small hack, because if the component (where\n // animated value has been used) is unmounted, then animation will\n // stop receiving events (seems like it's react-native optimization).\n // So we need to keep a reference to the animated value, to keep it's\n // always mounted (keep a reference to an animated value).\n //\n // To test why it's needed, try to open screen which consumes Animated.Value\n // then close it and open it again (for example 'Animated transition').\n style\n })\n ]\n });\n};\nexport {\n KeyboardProvider\n};\n//# sourceMappingURL=animated.js.map\n"],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"architecture.js","names":[],"sources":["esm/keyboard/architecture.js"],"sourcesContent":["const IS_FABRIC = \"nativeFabricUIManager\" in global;\nexport {\n IS_FABRIC\n};\n//# sourceMappingURL=architecture.js.map\n"],"mappings":";AAAA,MAAM,YAAY,2BAA2B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"architecture.native.js","names":[],"sources":["esm/keyboard/architecture.native.js"],"sourcesContent":["var IS_FABRIC = \"nativeFabricUIManager\" in global;\nexport {\n IS_FABRIC\n};\n//# sourceMappingURL=architecture.js.map\n"],"mappings":";AAAA,IAAI,YAAY,2BAA2B"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { View } from "react-native-web";
|
|
2
|
+
|
|
3
|
+
// dist/esm/keyboard/bindings.js
|
|
4
|
+
const NOOP = () => {};
|
|
5
|
+
const KeyboardControllerNative = {
|
|
6
|
+
setDefaultMode: NOOP,
|
|
7
|
+
setInputMode: NOOP,
|
|
8
|
+
preload: NOOP,
|
|
9
|
+
setTranslucent: NOOP,
|
|
10
|
+
dismiss: NOOP,
|
|
11
|
+
setFocusTo: NOOP,
|
|
12
|
+
viewPositionInWindow: () => Promise.resolve({
|
|
13
|
+
x: 0,
|
|
14
|
+
y: 0,
|
|
15
|
+
width: 0,
|
|
16
|
+
height: 0
|
|
17
|
+
}),
|
|
18
|
+
keyboardBorderRadius: 0
|
|
19
|
+
};
|
|
20
|
+
const KeyboardEvents = { addListener: () => ({ remove: NOOP }) };
|
|
21
|
+
const FocusedInputEvents = { addListener: () => ({ remove: NOOP }) };
|
|
22
|
+
const WindowDimensionsEvents = { addListener: () => ({ remove: NOOP }) };
|
|
23
|
+
const KeyboardControllerView = View;
|
|
24
|
+
const KeyboardControllerViewCommands = { synchronizeFocusedInputLayout: (_ref) => {} };
|
|
25
|
+
const KeyboardGestureArea = View;
|
|
26
|
+
const RCTOverKeyboardView = View;
|
|
27
|
+
const KeyboardBackgroundView = View;
|
|
28
|
+
const RCTKeyboardExtender = View;
|
|
29
|
+
const ClippingScrollView = View;
|
|
30
|
+
const RCTKeyboardToolbarGroupView = View;
|
|
31
|
+
|
|
32
|
+
export { ClippingScrollView, FocusedInputEvents, KeyboardBackgroundView, KeyboardControllerNative, KeyboardControllerView, KeyboardControllerViewCommands, KeyboardEvents, KeyboardGestureArea, RCTKeyboardExtender, RCTKeyboardToolbarGroupView, RCTOverKeyboardView, WindowDimensionsEvents };
|
|
33
|
+
//# sourceMappingURL=bindings.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bindings.js","names":[],"sources":["esm/keyboard/bindings.js"],"sourcesContent":["import { View } from \"react-native-web\";\nconst NOOP = () => {\n};\nconst KeyboardControllerNative = {\n setDefaultMode: NOOP,\n setInputMode: NOOP,\n preload: NOOP,\n setTranslucent: NOOP,\n dismiss: NOOP,\n setFocusTo: NOOP,\n viewPositionInWindow: () => Promise.resolve({ x: 0, y: 0, width: 0, height: 0 }),\n keyboardBorderRadius: 0\n};\nconst KeyboardEvents = {\n addListener: () => ({ remove: NOOP })\n};\nconst FocusedInputEvents = {\n addListener: () => ({ remove: NOOP })\n};\nconst WindowDimensionsEvents = {\n addListener: () => ({ remove: NOOP })\n};\nconst KeyboardControllerView = View;\nconst KeyboardControllerViewCommands = {\n synchronizeFocusedInputLayout: (_ref) => {\n }\n};\nconst KeyboardGestureArea = View;\nconst RCTOverKeyboardView = View;\nconst KeyboardBackgroundView = View;\nconst RCTKeyboardExtender = View;\nconst ClippingScrollView = View;\nconst RCTKeyboardToolbarGroupView = View;\nexport {\n ClippingScrollView,\n FocusedInputEvents,\n KeyboardBackgroundView,\n KeyboardControllerNative,\n KeyboardControllerView,\n KeyboardControllerViewCommands,\n KeyboardEvents,\n KeyboardGestureArea,\n RCTKeyboardExtender,\n RCTKeyboardToolbarGroupView,\n RCTOverKeyboardView,\n WindowDimensionsEvents\n};\n//# sourceMappingURL=bindings.js.map\n"],"mappings":";;;AACA,MAAM,aAAa,CACnB;AACA,MAAM,2BAA2B;CAC/B,gBAAgB;CAChB,cAAc;CACd,SAAS;CACT,gBAAgB;CAChB,SAAS;CACT,YAAY;CACZ,4BAA4B,QAAQ,QAAQ;EAAE,GAAG;EAAG,GAAG;EAAG,OAAO;EAAG,QAAQ;CAAE,CAAC;CAC/E,sBAAsB;AACxB;AACA,MAAM,iBAAiB,EACrB,oBAAoB,EAAE,QAAQ,KAAK,GACrC;AACA,MAAM,qBAAqB,EACzB,oBAAoB,EAAE,QAAQ,KAAK,GACrC;AACA,MAAM,yBAAyB,EAC7B,oBAAoB,EAAE,QAAQ,KAAK,GACrC;AACA,MAAM,yBAAyB;AAC/B,MAAM,iCAAiC,EACrC,gCAAgC,SAAS,CACzC,EACF;AACA,MAAM,sBAAsB;AAC5B,MAAM,sBAAsB;AAC5B,MAAM,yBAAyB;AAC/B,MAAM,sBAAsB;AAC5B,MAAM,qBAAqB;AAC3B,MAAM,8BAA8B"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { DeviceEventEmitter } from "react-native";
|
|
2
|
+
import { NitroModules } from "react-native-nitro-modules";
|
|
3
|
+
import OneClippingScrollViewDecoratorView from "../platform/specs/OneClippingScrollViewDecoratorViewNativeComponent.native.js";
|
|
4
|
+
import OneKeyboardBackgroundView from "../platform/specs/OneKeyboardBackgroundViewNativeComponent.native.js";
|
|
5
|
+
import OneKeyboardControllerView, { Commands as OneKeyboardControllerViewCommands } from "../platform/specs/OneKeyboardControllerViewNativeComponent.native.js";
|
|
6
|
+
import OneKeyboardExtender from "../platform/specs/OneKeyboardExtenderNativeComponent.native.js";
|
|
7
|
+
import OneKeyboardGestureArea from "../platform/specs/OneKeyboardGestureAreaNativeComponent.native.js";
|
|
8
|
+
import OneKeyboardToolbarGroupView from "../platform/specs/OneKeyboardToolbarGroupViewNativeComponent.native.js";
|
|
9
|
+
import OneOverKeyboardView from "../platform/specs/OneOverKeyboardViewNativeComponent.native.js";
|
|
10
|
+
|
|
11
|
+
// dist/esm/keyboard/bindings.native.js
|
|
12
|
+
var native = NitroModules.createHybridObject("OneKeyboard");
|
|
13
|
+
native.addAnimationEndListener(function(tag) {
|
|
14
|
+
DeviceEventEmitter.emit("onUserDrivenAnimationEnded", { tags: [tag] });
|
|
15
|
+
});
|
|
16
|
+
var KeyboardControllerNative = {
|
|
17
|
+
setDefaultMode: function setDefaultMode() {
|
|
18
|
+
return native.setDefaultMode();
|
|
19
|
+
},
|
|
20
|
+
setInputMode: function setInputMode(mode) {
|
|
21
|
+
return native.setInputMode(mode);
|
|
22
|
+
},
|
|
23
|
+
preload: function preload() {
|
|
24
|
+
return native.preload();
|
|
25
|
+
},
|
|
26
|
+
setTranslucent: function setTranslucent(translucent) {
|
|
27
|
+
return native.setTranslucent(translucent);
|
|
28
|
+
},
|
|
29
|
+
dismiss: function dismiss(keepFocus, animated) {
|
|
30
|
+
return native.dismiss(keepFocus, animated);
|
|
31
|
+
},
|
|
32
|
+
setFocusTo: function setFocusTo(direction) {
|
|
33
|
+
return native.setFocusTo(direction);
|
|
34
|
+
},
|
|
35
|
+
viewPositionInWindow: function viewPositionInWindow(viewTag) {
|
|
36
|
+
return native.viewPositionInWindow(viewTag);
|
|
37
|
+
},
|
|
38
|
+
get keyboardBorderRadius() {
|
|
39
|
+
return native.keyboardBorderRadius;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
function channel(subscribe) {
|
|
43
|
+
var listeners = /* @__PURE__ */ new Set();
|
|
44
|
+
var stop;
|
|
45
|
+
return function(listener) {
|
|
46
|
+
listeners.add(listener);
|
|
47
|
+
stop !== null && stop !== void 0 ? stop : stop = subscribe(function() {
|
|
48
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
49
|
+
args[_key] = arguments[_key];
|
|
50
|
+
}
|
|
51
|
+
for (var _i = 0, _iter = [...listeners]; _i < _iter.length; _i++) {
|
|
52
|
+
var each = _iter[_i];
|
|
53
|
+
each(...args);
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
return { remove() {
|
|
57
|
+
if (!listeners.delete(listener) || listeners.size) return;
|
|
58
|
+
stop === null || stop === void 0 ? void 0 : stop();
|
|
59
|
+
stop = void 0;
|
|
60
|
+
} };
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
var keyboard = channel(function(emit) {
|
|
64
|
+
return native.addKeyboardListener(function(name, event) {
|
|
65
|
+
return emit(name, event);
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
var focus = channel(function(emit) {
|
|
69
|
+
return native.addFocusListener(emit);
|
|
70
|
+
});
|
|
71
|
+
var layoutSync = channel(function(emit) {
|
|
72
|
+
return native.addLayoutSyncListener(emit);
|
|
73
|
+
});
|
|
74
|
+
var windowResize = channel(function(emit) {
|
|
75
|
+
return native.addWindowResizeListener(function(width, height) {
|
|
76
|
+
return emit({
|
|
77
|
+
width,
|
|
78
|
+
height
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
var KeyboardEvents = { addListener: function addListener(name, cb) {
|
|
83
|
+
return keyboard(function(event, data) {
|
|
84
|
+
return event === name && cb(data);
|
|
85
|
+
});
|
|
86
|
+
} };
|
|
87
|
+
var FocusedInputEvents = { addListener: function addListener2(name, cb) {
|
|
88
|
+
return name === "focusDidSet" ? focus(cb) : layoutSync(function() {
|
|
89
|
+
return cb({
|
|
90
|
+
current: -1,
|
|
91
|
+
count: 0
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
} };
|
|
95
|
+
var WindowDimensionsEvents = { addListener: function addListener3(_name, cb) {
|
|
96
|
+
return windowResize(cb);
|
|
97
|
+
} };
|
|
98
|
+
var KeyboardControllerView = OneKeyboardControllerView;
|
|
99
|
+
var KeyboardGestureArea = OneKeyboardGestureArea;
|
|
100
|
+
var RCTOverKeyboardView = OneOverKeyboardView;
|
|
101
|
+
var KeyboardBackgroundView = OneKeyboardBackgroundView;
|
|
102
|
+
var RCTKeyboardExtender = OneKeyboardExtender;
|
|
103
|
+
var ClippingScrollView = OneClippingScrollViewDecoratorView;
|
|
104
|
+
var RCTKeyboardToolbarGroupView = OneKeyboardToolbarGroupView;
|
|
105
|
+
|
|
106
|
+
export { ClippingScrollView, FocusedInputEvents, KeyboardBackgroundView, KeyboardControllerNative, KeyboardControllerView, OneKeyboardControllerViewCommands as KeyboardControllerViewCommands, KeyboardEvents, KeyboardGestureArea, RCTKeyboardExtender, RCTKeyboardToolbarGroupView, RCTOverKeyboardView, WindowDimensionsEvents };
|
|
107
|
+
//# sourceMappingURL=bindings.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bindings.native.js","names":[],"sources":["esm/keyboard/bindings.native.js"],"sourcesContent":["import { DeviceEventEmitter } from \"react-native\";\nimport { NitroModules } from \"react-native-nitro-modules\";\nimport OneClippingScrollViewDecoratorView from \"../platform/specs/OneClippingScrollViewDecoratorViewNativeComponent\";\nimport OneKeyboardBackgroundView from \"../platform/specs/OneKeyboardBackgroundViewNativeComponent\";\nimport OneKeyboardControllerView, { Commands as OneKeyboardControllerViewCommands } from \"../platform/specs/OneKeyboardControllerViewNativeComponent\";\nimport OneKeyboardExtender from \"../platform/specs/OneKeyboardExtenderNativeComponent\";\nimport OneKeyboardGestureArea from \"../platform/specs/OneKeyboardGestureAreaNativeComponent\";\nimport OneKeyboardToolbarGroupView from \"../platform/specs/OneKeyboardToolbarGroupViewNativeComponent\";\nimport OneOverKeyboardView from \"../platform/specs/OneOverKeyboardViewNativeComponent\";\nvar native = NitroModules.createHybridObject(\"OneKeyboard\");\nnative.addAnimationEndListener(function(tag) {\n DeviceEventEmitter.emit(\"onUserDrivenAnimationEnded\", {\n tags: [\n tag\n ]\n });\n});\nvar KeyboardControllerNative = {\n setDefaultMode: function setDefaultMode() {\n return native.setDefaultMode();\n },\n setInputMode: function setInputMode(mode) {\n return native.setInputMode(mode);\n },\n preload: function preload() {\n return native.preload();\n },\n setTranslucent: function setTranslucent(translucent) {\n return native.setTranslucent(translucent);\n },\n dismiss: function dismiss(keepFocus, animated) {\n return native.dismiss(keepFocus, animated);\n },\n setFocusTo: function setFocusTo(direction) {\n return native.setFocusTo(direction);\n },\n viewPositionInWindow: function viewPositionInWindow(viewTag) {\n return native.viewPositionInWindow(viewTag);\n },\n get keyboardBorderRadius() {\n return native.keyboardBorderRadius;\n }\n};\nfunction channel(subscribe) {\n var listeners = /* @__PURE__ */ new Set();\n var stop;\n return function(listener) {\n listeners.add(listener);\n stop !== null && stop !== void 0 ? stop : stop = subscribe(function() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n for (var _i = 0, _iter = [\n ...listeners\n ]; _i < _iter.length; _i++) {\n var each = _iter[_i];\n each(...args);\n }\n });\n return {\n remove() {\n if (!listeners.delete(listener) || listeners.size) return;\n stop === null || stop === void 0 ? void 0 : stop();\n stop = void 0;\n }\n };\n };\n}\nvar keyboard = channel(function(emit) {\n return native.addKeyboardListener(function(name, event) {\n return emit(name, event);\n });\n});\nvar focus = channel(function(emit) {\n return native.addFocusListener(emit);\n});\nvar layoutSync = channel(function(emit) {\n return native.addLayoutSyncListener(emit);\n});\nvar windowResize = channel(function(emit) {\n return native.addWindowResizeListener(function(width, height) {\n return emit({\n width,\n height\n });\n });\n});\nvar KeyboardEvents = {\n addListener: function addListener(name, cb) {\n return keyboard(function(event, data) {\n return event === name && cb(data);\n });\n }\n};\nvar FocusedInputEvents = {\n addListener: function addListener2(name, cb) {\n return name === \"focusDidSet\" ? focus(cb) : layoutSync(function() {\n return cb({\n current: -1,\n count: 0\n });\n });\n }\n};\nvar WindowDimensionsEvents = {\n addListener: function addListener3(_name, cb) {\n return windowResize(cb);\n }\n};\nvar KeyboardControllerView = OneKeyboardControllerView;\nvar KeyboardGestureArea = OneKeyboardGestureArea;\nvar RCTOverKeyboardView = OneOverKeyboardView;\nvar KeyboardBackgroundView = OneKeyboardBackgroundView;\nvar RCTKeyboardExtender = OneKeyboardExtender;\nvar ClippingScrollView = OneClippingScrollViewDecoratorView;\nvar RCTKeyboardToolbarGroupView = OneKeyboardToolbarGroupView;\nexport {\n ClippingScrollView,\n FocusedInputEvents,\n KeyboardBackgroundView,\n KeyboardControllerNative,\n KeyboardControllerView,\n OneKeyboardControllerViewCommands as KeyboardControllerViewCommands,\n KeyboardEvents,\n KeyboardGestureArea,\n RCTKeyboardExtender,\n RCTKeyboardToolbarGroupView,\n RCTOverKeyboardView,\n WindowDimensionsEvents\n};\n//# sourceMappingURL=bindings.native.js.map\n"],"mappings":"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"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { useSharedValue } from "react-native-reanimated";
|
|
2
|
+
import { useKeyboardHandler } from "./hooks/index.mjs";
|
|
3
|
+
|
|
4
|
+
// dist/esm/keyboard/compat.js
|
|
5
|
+
const KeyboardState = {
|
|
6
|
+
UNKNOWN: 0,
|
|
7
|
+
OPENING: 1,
|
|
8
|
+
OPEN: 2,
|
|
9
|
+
CLOSING: 3,
|
|
10
|
+
CLOSED: 4
|
|
11
|
+
};
|
|
12
|
+
const useAnimatedKeyboard = () => {
|
|
13
|
+
const height = useSharedValue(0);
|
|
14
|
+
const state = useSharedValue(KeyboardState.UNKNOWN);
|
|
15
|
+
useKeyboardHandler({
|
|
16
|
+
onStart: (e) => {
|
|
17
|
+
"worklet";
|
|
18
|
+
state.set(e.height > 0 ? KeyboardState.OPENING : KeyboardState.CLOSING);
|
|
19
|
+
},
|
|
20
|
+
onMove: (e) => {
|
|
21
|
+
"worklet";
|
|
22
|
+
height.set(e.height);
|
|
23
|
+
},
|
|
24
|
+
onInteractive: (e) => {
|
|
25
|
+
"worklet";
|
|
26
|
+
height.set(e.height);
|
|
27
|
+
},
|
|
28
|
+
onEnd: (e) => {
|
|
29
|
+
"worklet";
|
|
30
|
+
state.set(e.height > 0 ? KeyboardState.OPEN : KeyboardState.CLOSED);
|
|
31
|
+
height.set(e.height);
|
|
32
|
+
}
|
|
33
|
+
}, []);
|
|
34
|
+
return {
|
|
35
|
+
height,
|
|
36
|
+
state
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export { KeyboardState, useAnimatedKeyboard };
|
|
41
|
+
//# sourceMappingURL=compat.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compat.js","names":[],"sources":["esm/keyboard/compat.js"],"sourcesContent":["import { useSharedValue } from \"react-native-reanimated\";\nimport { useKeyboardHandler } from \"./hooks\";\nconst KeyboardState = {\n UNKNOWN: 0,\n OPENING: 1,\n OPEN: 2,\n CLOSING: 3,\n CLOSED: 4\n};\nconst useAnimatedKeyboard = () => {\n const height = useSharedValue(0);\n const state = useSharedValue(KeyboardState.UNKNOWN);\n useKeyboardHandler(\n {\n onStart: (e) => {\n \"worklet\";\n state.set(e.height > 0 ? KeyboardState.OPENING : KeyboardState.CLOSING);\n },\n onMove: (e) => {\n \"worklet\";\n height.set(e.height);\n },\n onInteractive: (e) => {\n \"worklet\";\n height.set(e.height);\n },\n onEnd: (e) => {\n \"worklet\";\n state.set(e.height > 0 ? KeyboardState.OPEN : KeyboardState.CLOSED);\n height.set(e.height);\n }\n },\n []\n );\n return { height, state };\n};\nexport {\n KeyboardState,\n useAnimatedKeyboard\n};\n//# sourceMappingURL=compat.js.map\n"],"mappings":";;;;AAEA,MAAM,gBAAgB;CACpB,SAAS;CACT,SAAS;CACT,MAAM;CACN,SAAS;CACT,QAAQ;AACV;AACA,MAAM,4BAA4B;CAChC,MAAM,SAAS,eAAe,CAAC;CAC/B,MAAM,QAAQ,eAAe,cAAc,OAAO;CAClD,mBACE;EACE,UAAU,MAAM;GACd;GACA,MAAM,IAAI,EAAE,SAAS,IAAI,cAAc,UAAU,cAAc,OAAO;EACxE;EACA,SAAS,MAAM;GACb;GACA,OAAO,IAAI,EAAE,MAAM;EACrB;EACA,gBAAgB,MAAM;GACpB;GACA,OAAO,IAAI,EAAE,MAAM;EACrB;EACA,QAAQ,MAAM;GACZ;GACA,MAAM,IAAI,EAAE,SAAS,IAAI,cAAc,OAAO,cAAc,MAAM;GAClE,OAAO,IAAI,EAAE,MAAM;EACrB;CACF,GACA,CAAC,CACH;CACA,OAAO;EAAE;EAAQ;CAAM;AACzB"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { useSharedValue } from "react-native-reanimated";
|
|
2
|
+
import { useKeyboardHandler } from "./hooks/index.native.js";
|
|
3
|
+
|
|
4
|
+
// dist/esm/keyboard/compat.native.js
|
|
5
|
+
var KeyboardState = {
|
|
6
|
+
UNKNOWN: 0,
|
|
7
|
+
OPENING: 1,
|
|
8
|
+
OPEN: 2,
|
|
9
|
+
CLOSING: 3,
|
|
10
|
+
CLOSED: 4
|
|
11
|
+
};
|
|
12
|
+
var useAnimatedKeyboard = function useAnimatedKeyboard2() {
|
|
13
|
+
var height = useSharedValue(0);
|
|
14
|
+
var state = useSharedValue(KeyboardState.UNKNOWN);
|
|
15
|
+
useKeyboardHandler({
|
|
16
|
+
onStart: function onStart(e) {
|
|
17
|
+
"worklet";
|
|
18
|
+
state.set(e.height > 0 ? KeyboardState.OPENING : KeyboardState.CLOSING);
|
|
19
|
+
},
|
|
20
|
+
onMove: function onMove(e) {
|
|
21
|
+
"worklet";
|
|
22
|
+
height.set(e.height);
|
|
23
|
+
},
|
|
24
|
+
onInteractive: function onInteractive(e) {
|
|
25
|
+
"worklet";
|
|
26
|
+
height.set(e.height);
|
|
27
|
+
},
|
|
28
|
+
onEnd: function onEnd(e) {
|
|
29
|
+
"worklet";
|
|
30
|
+
state.set(e.height > 0 ? KeyboardState.OPEN : KeyboardState.CLOSED);
|
|
31
|
+
height.set(e.height);
|
|
32
|
+
}
|
|
33
|
+
}, []);
|
|
34
|
+
return {
|
|
35
|
+
height,
|
|
36
|
+
state
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export { KeyboardState, useAnimatedKeyboard };
|
|
41
|
+
//# sourceMappingURL=compat.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compat.native.js","names":[],"sources":["esm/keyboard/compat.native.js"],"sourcesContent":["import { useSharedValue } from \"react-native-reanimated\";\nimport { useKeyboardHandler } from \"./hooks\";\nvar KeyboardState = {\n UNKNOWN: 0,\n OPENING: 1,\n OPEN: 2,\n CLOSING: 3,\n CLOSED: 4\n};\nvar useAnimatedKeyboard = function useAnimatedKeyboard2() {\n var height = useSharedValue(0);\n var state = useSharedValue(KeyboardState.UNKNOWN);\n useKeyboardHandler({\n onStart: function onStart(e) {\n \"worklet\";\n state.set(e.height > 0 ? KeyboardState.OPENING : KeyboardState.CLOSING);\n },\n onMove: function onMove(e) {\n \"worklet\";\n height.set(e.height);\n },\n onInteractive: function onInteractive(e) {\n \"worklet\";\n height.set(e.height);\n },\n onEnd: function onEnd(e) {\n \"worklet\";\n state.set(e.height > 0 ? KeyboardState.OPEN : KeyboardState.CLOSED);\n height.set(e.height);\n }\n }, []);\n return {\n height,\n state\n };\n};\nexport {\n KeyboardState,\n useAnimatedKeyboard\n};\n//# sourceMappingURL=compat.js.map\n"],"mappings":";;;;AAEA,IAAI,gBAAgB;CAClB,SAAS;CACT,SAAS;CACT,MAAM;CACN,SAAS;CACT,QAAQ;AACV;AACA,IAAI,sBAAsB,SAAS,uBAAuB;CACxD,IAAI,SAAS,eAAe,CAAC;CAC7B,IAAI,QAAQ,eAAe,cAAc,OAAO;CAChD,mBAAmB;EACjB,SAAS,SAAS,QAAQ,GAAG;GAC3B;GACA,MAAM,IAAI,EAAE,SAAS,IAAI,cAAc,UAAU,cAAc,OAAO;EACxE;EACA,QAAQ,SAAS,OAAO,GAAG;GACzB;GACA,OAAO,IAAI,EAAE,MAAM;EACrB;EACA,eAAe,SAAS,cAAc,GAAG;GACvC;GACA,OAAO,IAAI,EAAE,MAAM;EACrB;EACA,OAAO,SAAS,MAAM,GAAG;GACvB;GACA,MAAM,IAAI,EAAE,SAAS,IAAI,cAAc,OAAO,cAAc,MAAM;GAClE,OAAO,IAAI,EAAE,MAAM;EACrB;CACF,GAAG,CAAC,CAAC;CACL,OAAO;EACL;EACA;CACF;AACF"}
|