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,43 @@
|
|
|
1
|
+
import { createContext, useContext } from "react";
|
|
2
|
+
import { Animated } from "react-native-web";
|
|
3
|
+
|
|
4
|
+
// dist/esm/keyboard/context.js
|
|
5
|
+
const NOOP = () => {};
|
|
6
|
+
const NESTED_NOOP = () => NOOP;
|
|
7
|
+
const withSharedValue = (value) => ({
|
|
8
|
+
value,
|
|
9
|
+
addListener: NOOP,
|
|
10
|
+
removeListener: NOOP,
|
|
11
|
+
modify: NOOP,
|
|
12
|
+
get: () => value,
|
|
13
|
+
set: NOOP
|
|
14
|
+
});
|
|
15
|
+
const DEFAULT_SHARED_VALUE = withSharedValue(0);
|
|
16
|
+
const DEFAULT_LAYOUT = withSharedValue(null);
|
|
17
|
+
const defaultContext = {
|
|
18
|
+
enabled: true,
|
|
19
|
+
animated: {
|
|
20
|
+
progress: new Animated.Value(0),
|
|
21
|
+
height: new Animated.Value(0)
|
|
22
|
+
},
|
|
23
|
+
reanimated: {
|
|
24
|
+
progress: DEFAULT_SHARED_VALUE,
|
|
25
|
+
height: DEFAULT_SHARED_VALUE
|
|
26
|
+
},
|
|
27
|
+
layout: DEFAULT_LAYOUT,
|
|
28
|
+
update: Promise.resolve,
|
|
29
|
+
setKeyboardHandlers: NESTED_NOOP,
|
|
30
|
+
setInputHandlers: NESTED_NOOP,
|
|
31
|
+
setEnabled: NOOP
|
|
32
|
+
};
|
|
33
|
+
const KeyboardContext = createContext(defaultContext);
|
|
34
|
+
const useKeyboardContext = () => {
|
|
35
|
+
const context = useContext(KeyboardContext);
|
|
36
|
+
if (__DEV__ && context === defaultContext) {
|
|
37
|
+
console.warn("Couldn't find real values for `KeyboardContext`. Please make sure you're inside of `KeyboardProvider` - otherwise functionality of `one/keyboard` will not work.");
|
|
38
|
+
}
|
|
39
|
+
return context;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export { KeyboardContext, useKeyboardContext };
|
|
43
|
+
//# sourceMappingURL=context.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","names":[],"sources":["esm/keyboard/context.js"],"sourcesContent":["import { createContext, useContext } from \"react\";\nimport { Animated } from \"react-native-web\";\nconst NOOP = () => {\n};\nconst NESTED_NOOP = () => NOOP;\nconst withSharedValue = (value) => ({\n value,\n addListener: NOOP,\n removeListener: NOOP,\n modify: NOOP,\n get: () => value,\n set: NOOP\n});\nconst DEFAULT_SHARED_VALUE = withSharedValue(0);\nconst DEFAULT_LAYOUT = withSharedValue(null);\nconst defaultContext = {\n enabled: true,\n animated: {\n progress: new Animated.Value(0),\n height: new Animated.Value(0)\n },\n reanimated: {\n progress: DEFAULT_SHARED_VALUE,\n height: DEFAULT_SHARED_VALUE\n },\n layout: DEFAULT_LAYOUT,\n update: Promise.resolve,\n setKeyboardHandlers: NESTED_NOOP,\n setInputHandlers: NESTED_NOOP,\n setEnabled: NOOP\n};\nconst KeyboardContext = createContext(defaultContext);\nconst useKeyboardContext = () => {\n const context = useContext(KeyboardContext);\n if (__DEV__ && context === defaultContext) {\n console.warn(\n \"Couldn't find real values for `KeyboardContext`. Please make sure you're inside of `KeyboardProvider` - otherwise functionality of `one/keyboard` will not work.\"\n );\n }\n return context;\n};\nexport {\n KeyboardContext,\n useKeyboardContext\n};\n//# sourceMappingURL=context.js.map\n"],"mappings":";;;;AAEA,MAAM,aAAa,CACnB;AACA,MAAM,oBAAoB;AAC1B,MAAM,mBAAmB,WAAW;CAClC;CACA,aAAa;CACb,gBAAgB;CAChB,QAAQ;CACR,WAAW;CACX,KAAK;AACP;AACA,MAAM,uBAAuB,gBAAgB,CAAC;AAC9C,MAAM,iBAAiB,gBAAgB,IAAI;AAC3C,MAAM,iBAAiB;CACrB,SAAS;CACT,UAAU;EACR,UAAU,IAAI,SAAS,MAAM,CAAC;EAC9B,QAAQ,IAAI,SAAS,MAAM,CAAC;CAC9B;CACA,YAAY;EACV,UAAU;EACV,QAAQ;CACV;CACA,QAAQ;CACR,QAAQ,QAAQ;CAChB,qBAAqB;CACrB,kBAAkB;CAClB,YAAY;AACd;AACA,MAAM,kBAAkB,cAAc,cAAc;AACpD,MAAM,2BAA2B;CAC/B,MAAM,UAAU,WAAW,eAAe;CAC1C,IAAI,WAAW,YAAY,gBAAgB;EACzC,QAAQ,KACN,kKACF;CACF;CACA,OAAO;AACT"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { createContext, useContext } from "react";
|
|
2
|
+
import { Animated } from "react-native";
|
|
3
|
+
|
|
4
|
+
// dist/esm/keyboard/context.native.js
|
|
5
|
+
var NOOP = function NOOP2() {};
|
|
6
|
+
var NESTED_NOOP = function NESTED_NOOP2() {
|
|
7
|
+
return NOOP;
|
|
8
|
+
};
|
|
9
|
+
var withSharedValue = function withSharedValue2(value) {
|
|
10
|
+
return {
|
|
11
|
+
value,
|
|
12
|
+
addListener: NOOP,
|
|
13
|
+
removeListener: NOOP,
|
|
14
|
+
modify: NOOP,
|
|
15
|
+
get: function get() {
|
|
16
|
+
return value;
|
|
17
|
+
},
|
|
18
|
+
set: NOOP
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
var DEFAULT_SHARED_VALUE = withSharedValue(0);
|
|
22
|
+
var DEFAULT_LAYOUT = withSharedValue(null);
|
|
23
|
+
var defaultContext = {
|
|
24
|
+
enabled: true,
|
|
25
|
+
animated: {
|
|
26
|
+
progress: new Animated.Value(0),
|
|
27
|
+
height: new Animated.Value(0)
|
|
28
|
+
},
|
|
29
|
+
reanimated: {
|
|
30
|
+
progress: DEFAULT_SHARED_VALUE,
|
|
31
|
+
height: DEFAULT_SHARED_VALUE
|
|
32
|
+
},
|
|
33
|
+
layout: DEFAULT_LAYOUT,
|
|
34
|
+
update: Promise.resolve,
|
|
35
|
+
setKeyboardHandlers: NESTED_NOOP,
|
|
36
|
+
setInputHandlers: NESTED_NOOP,
|
|
37
|
+
setEnabled: NOOP
|
|
38
|
+
};
|
|
39
|
+
var KeyboardContext = createContext(defaultContext);
|
|
40
|
+
var useKeyboardContext = function useKeyboardContext2() {
|
|
41
|
+
var context = useContext(KeyboardContext);
|
|
42
|
+
if (__DEV__ && context === defaultContext) {
|
|
43
|
+
console.warn("Couldn't find real values for `KeyboardContext`. Please make sure you're inside of `KeyboardProvider` - otherwise functionality of `one/keyboard` will not work.");
|
|
44
|
+
}
|
|
45
|
+
return context;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export { KeyboardContext, useKeyboardContext };
|
|
49
|
+
//# sourceMappingURL=context.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.native.js","names":[],"sources":["esm/keyboard/context.native.js"],"sourcesContent":["import { createContext, useContext } from \"react\";\nimport { Animated } from \"react-native\";\nvar NOOP = function NOOP2() {\n};\nvar NESTED_NOOP = function NESTED_NOOP2() {\n return NOOP;\n};\nvar withSharedValue = function withSharedValue2(value) {\n return {\n value,\n addListener: NOOP,\n removeListener: NOOP,\n modify: NOOP,\n get: function get() {\n return value;\n },\n set: NOOP\n };\n};\nvar DEFAULT_SHARED_VALUE = withSharedValue(0);\nvar DEFAULT_LAYOUT = withSharedValue(null);\nvar defaultContext = {\n enabled: true,\n animated: {\n progress: new Animated.Value(0),\n height: new Animated.Value(0)\n },\n reanimated: {\n progress: DEFAULT_SHARED_VALUE,\n height: DEFAULT_SHARED_VALUE\n },\n layout: DEFAULT_LAYOUT,\n update: Promise.resolve,\n setKeyboardHandlers: NESTED_NOOP,\n setInputHandlers: NESTED_NOOP,\n setEnabled: NOOP\n};\nvar KeyboardContext = createContext(defaultContext);\nvar useKeyboardContext = function useKeyboardContext2() {\n var context = useContext(KeyboardContext);\n if (__DEV__ && context === defaultContext) {\n console.warn(\"Couldn't find real values for `KeyboardContext`. Please make sure you're inside of `KeyboardProvider` - otherwise functionality of `one/keyboard` will not work.\");\n }\n return context;\n};\nexport {\n KeyboardContext,\n useKeyboardContext\n};\n//# sourceMappingURL=context.js.map\n"],"mappings":";;;;AAEA,IAAI,OAAO,SAAS,QAAQ,CAC5B;AACA,IAAI,cAAc,SAAS,eAAe;CACxC,OAAO;AACT;AACA,IAAI,kBAAkB,SAAS,iBAAiB,OAAO;CACrD,OAAO;EACL;EACA,aAAa;EACb,gBAAgB;EAChB,QAAQ;EACR,KAAK,SAAS,MAAM;GAClB,OAAO;EACT;EACA,KAAK;CACP;AACF;AACA,IAAI,uBAAuB,gBAAgB,CAAC;AAC5C,IAAI,iBAAiB,gBAAgB,IAAI;AACzC,IAAI,iBAAiB;CACnB,SAAS;CACT,UAAU;EACR,UAAU,IAAI,SAAS,MAAM,CAAC;EAC9B,QAAQ,IAAI,SAAS,MAAM,CAAC;CAC9B;CACA,YAAY;EACV,UAAU;EACV,QAAQ;CACV;CACA,QAAQ;CACR,QAAQ,QAAQ;CAChB,qBAAqB;CACrB,kBAAkB;CAClB,YAAY;AACd;AACA,IAAI,kBAAkB,cAAc,cAAc;AAClD,IAAI,qBAAqB,SAAS,sBAAsB;CACtD,IAAI,UAAU,WAAW,eAAe;CACxC,IAAI,WAAW,YAAY,gBAAgB;EACzC,QAAQ,KAAK,kKAAkK;CACjL;CACA,OAAO;AACT"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { useEffect, useLayoutEffect } from "react";
|
|
2
|
+
import { useEvent } from "react-native-reanimated";
|
|
3
|
+
import { AndroidSoftInputModes } from "../constants.mjs";
|
|
4
|
+
import { useKeyboardContext } from "../context.mjs";
|
|
5
|
+
import { KeyboardController } from "../module.mjs";
|
|
6
|
+
import { useHandler } from "../reanimated.mjs";
|
|
7
|
+
|
|
8
|
+
export * from "./useWindowDimensions/index.mjs"
|
|
9
|
+
|
|
10
|
+
export * from "./useKeyboardState/index.mjs"
|
|
11
|
+
|
|
12
|
+
// dist/esm/keyboard/hooks/index.js
|
|
13
|
+
const useResizeMode = () => {
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
KeyboardController.setInputMode(AndroidSoftInputModes.SOFT_INPUT_ADJUST_RESIZE);
|
|
16
|
+
return () => KeyboardController.setDefaultMode();
|
|
17
|
+
}, []);
|
|
18
|
+
};
|
|
19
|
+
const useKeyboardAnimation = () => {
|
|
20
|
+
useResizeMode();
|
|
21
|
+
const context = useKeyboardContext();
|
|
22
|
+
return context.animated;
|
|
23
|
+
};
|
|
24
|
+
const useReanimatedKeyboardAnimation = () => {
|
|
25
|
+
useResizeMode();
|
|
26
|
+
const context = useKeyboardContext();
|
|
27
|
+
return context.reanimated;
|
|
28
|
+
};
|
|
29
|
+
function useGenericKeyboardHandler(handler, deps) {
|
|
30
|
+
const context = useKeyboardContext();
|
|
31
|
+
const { doDependenciesDiffer } = useHandler(handler, deps);
|
|
32
|
+
const eventHandler = useEvent((event) => {
|
|
33
|
+
"worklet";
|
|
34
|
+
if (event.eventName.endsWith("onKeyboardMoveStart")) {
|
|
35
|
+
handler.onStart?.(event);
|
|
36
|
+
}
|
|
37
|
+
if (event.eventName.endsWith("onKeyboardMove")) {
|
|
38
|
+
handler.onMove?.(event);
|
|
39
|
+
}
|
|
40
|
+
if (event.eventName.endsWith("onKeyboardMoveEnd")) {
|
|
41
|
+
handler.onEnd?.(event);
|
|
42
|
+
}
|
|
43
|
+
if (event.eventName.endsWith("onKeyboardMoveInteractive")) {
|
|
44
|
+
handler.onInteractive?.(event);
|
|
45
|
+
}
|
|
46
|
+
}, [
|
|
47
|
+
"onKeyboardMoveStart",
|
|
48
|
+
"onKeyboardMove",
|
|
49
|
+
"onKeyboardMoveEnd",
|
|
50
|
+
"onKeyboardMoveInteractive"
|
|
51
|
+
], doDependenciesDiffer);
|
|
52
|
+
useLayoutEffect(() => {
|
|
53
|
+
const cleanup = context.setKeyboardHandlers(eventHandler);
|
|
54
|
+
return () => cleanup();
|
|
55
|
+
}, deps);
|
|
56
|
+
}
|
|
57
|
+
function useKeyboardHandler(handler, deps) {
|
|
58
|
+
useResizeMode();
|
|
59
|
+
useGenericKeyboardHandler(handler, deps);
|
|
60
|
+
}
|
|
61
|
+
function useKeyboardController() {
|
|
62
|
+
const context = useKeyboardContext();
|
|
63
|
+
return {
|
|
64
|
+
setEnabled: context.setEnabled,
|
|
65
|
+
enabled: context.enabled
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
function useReanimatedFocusedInput() {
|
|
69
|
+
const context = useKeyboardContext();
|
|
70
|
+
return {
|
|
71
|
+
input: context.layout,
|
|
72
|
+
update: context.update
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
function useFocusedInputHandler(handler, deps) {
|
|
76
|
+
const context = useKeyboardContext();
|
|
77
|
+
const { doDependenciesDiffer } = useHandler(handler, deps);
|
|
78
|
+
const eventHandler = useEvent((event) => {
|
|
79
|
+
"worklet";
|
|
80
|
+
if (event.eventName.endsWith("onFocusedInputTextChanged")) {
|
|
81
|
+
handler.onChangeText?.(event);
|
|
82
|
+
}
|
|
83
|
+
if (event.eventName.endsWith("onFocusedInputSelectionChanged")) {
|
|
84
|
+
handler.onSelectionChange?.(event);
|
|
85
|
+
}
|
|
86
|
+
}, ["onFocusedInputTextChanged", "onFocusedInputSelectionChanged"], doDependenciesDiffer);
|
|
87
|
+
useLayoutEffect(() => {
|
|
88
|
+
const cleanup = context.setInputHandlers(eventHandler);
|
|
89
|
+
return () => cleanup();
|
|
90
|
+
}, deps);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export { useFocusedInputHandler, useGenericKeyboardHandler, useKeyboardAnimation, useKeyboardController, useKeyboardHandler, useReanimatedFocusedInput, useReanimatedKeyboardAnimation, useResizeMode };
|
|
94
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["esm/keyboard/hooks/index.js"],"sourcesContent":["import { useEffect, useLayoutEffect } from \"react\";\nimport { useEvent } from \"react-native-reanimated\";\nimport { AndroidSoftInputModes } from \"../constants\";\nimport { useKeyboardContext } from \"../context\";\nimport { KeyboardController } from \"../module\";\nimport { useHandler } from \"../reanimated\";\nexport * from \"./useWindowDimensions\";\nexport * from \"./useKeyboardState\";\nconst useResizeMode = () => {\n useEffect(() => {\n KeyboardController.setInputMode(AndroidSoftInputModes.SOFT_INPUT_ADJUST_RESIZE);\n return () => KeyboardController.setDefaultMode();\n }, []);\n};\nconst useKeyboardAnimation = () => {\n useResizeMode();\n const context = useKeyboardContext();\n return context.animated;\n};\nconst useReanimatedKeyboardAnimation = () => {\n useResizeMode();\n const context = useKeyboardContext();\n return context.reanimated;\n};\nfunction useGenericKeyboardHandler(handler, deps) {\n const context = useKeyboardContext();\n const { doDependenciesDiffer } = useHandler(handler, deps);\n const eventHandler = useEvent(\n (event) => {\n \"worklet\";\n if (event.eventName.endsWith(\"onKeyboardMoveStart\")) {\n handler.onStart?.(event);\n }\n if (event.eventName.endsWith(\"onKeyboardMove\")) {\n handler.onMove?.(event);\n }\n if (event.eventName.endsWith(\"onKeyboardMoveEnd\")) {\n handler.onEnd?.(event);\n }\n if (event.eventName.endsWith(\"onKeyboardMoveInteractive\")) {\n handler.onInteractive?.(event);\n }\n },\n [\n \"onKeyboardMoveStart\",\n \"onKeyboardMove\",\n \"onKeyboardMoveEnd\",\n \"onKeyboardMoveInteractive\"\n ],\n doDependenciesDiffer\n );\n useLayoutEffect(() => {\n const cleanup = context.setKeyboardHandlers(eventHandler);\n return () => cleanup();\n }, deps);\n}\nfunction useKeyboardHandler(handler, deps) {\n useResizeMode();\n useGenericKeyboardHandler(handler, deps);\n}\nfunction useKeyboardController() {\n const context = useKeyboardContext();\n return { setEnabled: context.setEnabled, enabled: context.enabled };\n}\nfunction useReanimatedFocusedInput() {\n const context = useKeyboardContext();\n return {\n input: context.layout,\n update: context.update\n };\n}\nfunction useFocusedInputHandler(handler, deps) {\n const context = useKeyboardContext();\n const { doDependenciesDiffer } = useHandler(handler, deps);\n const eventHandler = useEvent(\n (event) => {\n \"worklet\";\n if (event.eventName.endsWith(\"onFocusedInputTextChanged\")) {\n handler.onChangeText?.(event);\n }\n if (event.eventName.endsWith(\"onFocusedInputSelectionChanged\")) {\n handler.onSelectionChange?.(event);\n }\n },\n [\"onFocusedInputTextChanged\", \"onFocusedInputSelectionChanged\"],\n doDependenciesDiffer\n );\n useLayoutEffect(() => {\n const cleanup = context.setInputHandlers(eventHandler);\n return () => cleanup();\n }, deps);\n}\nexport {\n useFocusedInputHandler,\n useGenericKeyboardHandler,\n useKeyboardAnimation,\n useKeyboardController,\n useKeyboardHandler,\n useReanimatedFocusedInput,\n useReanimatedKeyboardAnimation,\n useResizeMode\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;;;;;;;;;AAQA,MAAM,sBAAsB;CAC1B,gBAAgB;EACd,mBAAmB,aAAa,sBAAsB,wBAAwB;EAC9E,aAAa,mBAAmB,eAAe;CACjD,GAAG,CAAC,CAAC;AACP;AACA,MAAM,6BAA6B;CACjC,cAAc;CACd,MAAM,UAAU,mBAAmB;CACnC,OAAO,QAAQ;AACjB;AACA,MAAM,uCAAuC;CAC3C,cAAc;CACd,MAAM,UAAU,mBAAmB;CACnC,OAAO,QAAQ;AACjB;AACA,SAAS,0BAA0B,SAAS,MAAM;CAChD,MAAM,UAAU,mBAAmB;CACnC,MAAM,EAAE,yBAAyB,WAAW,SAAS,IAAI;CACzD,MAAM,eAAe,UAClB,UAAU;EACT;EACA,IAAI,MAAM,UAAU,SAAS,qBAAqB,GAAG;GACnD,QAAQ,UAAU,KAAK;EACzB;EACA,IAAI,MAAM,UAAU,SAAS,gBAAgB,GAAG;GAC9C,QAAQ,SAAS,KAAK;EACxB;EACA,IAAI,MAAM,UAAU,SAAS,mBAAmB,GAAG;GACjD,QAAQ,QAAQ,KAAK;EACvB;EACA,IAAI,MAAM,UAAU,SAAS,2BAA2B,GAAG;GACzD,QAAQ,gBAAgB,KAAK;EAC/B;CACF,GACA;EACE;EACA;EACA;EACA;CACF,GACA,oBACF;CACA,sBAAsB;EACpB,MAAM,UAAU,QAAQ,oBAAoB,YAAY;EACxD,aAAa,QAAQ;CACvB,GAAG,IAAI;AACT;AACA,SAAS,mBAAmB,SAAS,MAAM;CACzC,cAAc;CACd,0BAA0B,SAAS,IAAI;AACzC;AACA,SAAS,wBAAwB;CAC/B,MAAM,UAAU,mBAAmB;CACnC,OAAO;EAAE,YAAY,QAAQ;EAAY,SAAS,QAAQ;CAAQ;AACpE;AACA,SAAS,4BAA4B;CACnC,MAAM,UAAU,mBAAmB;CACnC,OAAO;EACL,OAAO,QAAQ;EACf,QAAQ,QAAQ;CAClB;AACF;AACA,SAAS,uBAAuB,SAAS,MAAM;CAC7C,MAAM,UAAU,mBAAmB;CACnC,MAAM,EAAE,yBAAyB,WAAW,SAAS,IAAI;CACzD,MAAM,eAAe,UAClB,UAAU;EACT;EACA,IAAI,MAAM,UAAU,SAAS,2BAA2B,GAAG;GACzD,QAAQ,eAAe,KAAK;EAC9B;EACA,IAAI,MAAM,UAAU,SAAS,gCAAgC,GAAG;GAC9D,QAAQ,oBAAoB,KAAK;EACnC;CACF,GACA,CAAC,6BAA6B,gCAAgC,GAC9D,oBACF;CACA,sBAAsB;EACpB,MAAM,UAAU,QAAQ,iBAAiB,YAAY;EACrD,aAAa,QAAQ;CACvB,GAAG,IAAI;AACT"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { useEffect, useLayoutEffect } from "react";
|
|
2
|
+
import { useEvent } from "react-native-reanimated";
|
|
3
|
+
import { AndroidSoftInputModes } from "../constants.native.js";
|
|
4
|
+
import { useKeyboardContext } from "../context.native.js";
|
|
5
|
+
import { KeyboardController } from "../module.native.js";
|
|
6
|
+
import { useHandler } from "../reanimated.native.js";
|
|
7
|
+
|
|
8
|
+
export * from "./useWindowDimensions/index.native.js"
|
|
9
|
+
|
|
10
|
+
export * from "./useKeyboardState/index.native.js"
|
|
11
|
+
|
|
12
|
+
// dist/esm/keyboard/hooks/index.native.js
|
|
13
|
+
var useResizeMode = function useResizeMode2() {
|
|
14
|
+
useEffect(function() {
|
|
15
|
+
KeyboardController.setInputMode(AndroidSoftInputModes.SOFT_INPUT_ADJUST_RESIZE);
|
|
16
|
+
return function() {
|
|
17
|
+
return KeyboardController.setDefaultMode();
|
|
18
|
+
};
|
|
19
|
+
}, []);
|
|
20
|
+
};
|
|
21
|
+
var useKeyboardAnimation = function useKeyboardAnimation2() {
|
|
22
|
+
useResizeMode();
|
|
23
|
+
var context = useKeyboardContext();
|
|
24
|
+
return context.animated;
|
|
25
|
+
};
|
|
26
|
+
var useReanimatedKeyboardAnimation = function useReanimatedKeyboardAnimation2() {
|
|
27
|
+
useResizeMode();
|
|
28
|
+
var context = useKeyboardContext();
|
|
29
|
+
return context.reanimated;
|
|
30
|
+
};
|
|
31
|
+
function useGenericKeyboardHandler(handler, deps) {
|
|
32
|
+
var context = useKeyboardContext();
|
|
33
|
+
var { doDependenciesDiffer } = useHandler(handler, deps);
|
|
34
|
+
var eventHandler = useEvent(function(event) {
|
|
35
|
+
"worklet";
|
|
36
|
+
if (event.eventName.endsWith("onKeyboardMoveStart")) {
|
|
37
|
+
var _handler_onStart;
|
|
38
|
+
(_handler_onStart = handler.onStart) === null || _handler_onStart === void 0 ? void 0 : _handler_onStart.call(handler, event);
|
|
39
|
+
}
|
|
40
|
+
if (event.eventName.endsWith("onKeyboardMove")) {
|
|
41
|
+
var _handler_onMove;
|
|
42
|
+
(_handler_onMove = handler.onMove) === null || _handler_onMove === void 0 ? void 0 : _handler_onMove.call(handler, event);
|
|
43
|
+
}
|
|
44
|
+
if (event.eventName.endsWith("onKeyboardMoveEnd")) {
|
|
45
|
+
var _handler_onEnd;
|
|
46
|
+
(_handler_onEnd = handler.onEnd) === null || _handler_onEnd === void 0 ? void 0 : _handler_onEnd.call(handler, event);
|
|
47
|
+
}
|
|
48
|
+
if (event.eventName.endsWith("onKeyboardMoveInteractive")) {
|
|
49
|
+
var _handler_onInteractive;
|
|
50
|
+
(_handler_onInteractive = handler.onInteractive) === null || _handler_onInteractive === void 0 ? void 0 : _handler_onInteractive.call(handler, event);
|
|
51
|
+
}
|
|
52
|
+
}, [
|
|
53
|
+
"onKeyboardMoveStart",
|
|
54
|
+
"onKeyboardMove",
|
|
55
|
+
"onKeyboardMoveEnd",
|
|
56
|
+
"onKeyboardMoveInteractive"
|
|
57
|
+
], doDependenciesDiffer);
|
|
58
|
+
useLayoutEffect(function() {
|
|
59
|
+
var cleanup = context.setKeyboardHandlers(eventHandler);
|
|
60
|
+
return function() {
|
|
61
|
+
return cleanup();
|
|
62
|
+
};
|
|
63
|
+
}, deps);
|
|
64
|
+
}
|
|
65
|
+
function useKeyboardHandler(handler, deps) {
|
|
66
|
+
useResizeMode();
|
|
67
|
+
useGenericKeyboardHandler(handler, deps);
|
|
68
|
+
}
|
|
69
|
+
function useKeyboardController() {
|
|
70
|
+
var context = useKeyboardContext();
|
|
71
|
+
return {
|
|
72
|
+
setEnabled: context.setEnabled,
|
|
73
|
+
enabled: context.enabled
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
function useReanimatedFocusedInput() {
|
|
77
|
+
var context = useKeyboardContext();
|
|
78
|
+
return {
|
|
79
|
+
input: context.layout,
|
|
80
|
+
update: context.update
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
function useFocusedInputHandler(handler, deps) {
|
|
84
|
+
var context = useKeyboardContext();
|
|
85
|
+
var { doDependenciesDiffer } = useHandler(handler, deps);
|
|
86
|
+
var eventHandler = useEvent(function(event) {
|
|
87
|
+
"worklet";
|
|
88
|
+
if (event.eventName.endsWith("onFocusedInputTextChanged")) {
|
|
89
|
+
var _handler_onChangeText;
|
|
90
|
+
(_handler_onChangeText = handler.onChangeText) === null || _handler_onChangeText === void 0 ? void 0 : _handler_onChangeText.call(handler, event);
|
|
91
|
+
}
|
|
92
|
+
if (event.eventName.endsWith("onFocusedInputSelectionChanged")) {
|
|
93
|
+
var _handler_onSelectionChange;
|
|
94
|
+
(_handler_onSelectionChange = handler.onSelectionChange) === null || _handler_onSelectionChange === void 0 ? void 0 : _handler_onSelectionChange.call(handler, event);
|
|
95
|
+
}
|
|
96
|
+
}, ["onFocusedInputTextChanged", "onFocusedInputSelectionChanged"], doDependenciesDiffer);
|
|
97
|
+
useLayoutEffect(function() {
|
|
98
|
+
var cleanup = context.setInputHandlers(eventHandler);
|
|
99
|
+
return function() {
|
|
100
|
+
return cleanup();
|
|
101
|
+
};
|
|
102
|
+
}, deps);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export { useFocusedInputHandler, useGenericKeyboardHandler, useKeyboardAnimation, useKeyboardController, useKeyboardHandler, useReanimatedFocusedInput, useReanimatedKeyboardAnimation, useResizeMode };
|
|
106
|
+
//# sourceMappingURL=index.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.native.js","names":[],"sources":["esm/keyboard/hooks/index.native.js"],"sourcesContent":["import { useEffect, useLayoutEffect } from \"react\";\nimport { useEvent } from \"react-native-reanimated\";\nimport { AndroidSoftInputModes } from \"../constants\";\nimport { useKeyboardContext } from \"../context\";\nimport { KeyboardController } from \"../module\";\nimport { useHandler } from \"../reanimated\";\nexport * from \"./useWindowDimensions\";\nexport * from \"./useKeyboardState\";\nvar useResizeMode = function useResizeMode2() {\n useEffect(function() {\n KeyboardController.setInputMode(AndroidSoftInputModes.SOFT_INPUT_ADJUST_RESIZE);\n return function() {\n return KeyboardController.setDefaultMode();\n };\n }, []);\n};\nvar useKeyboardAnimation = function useKeyboardAnimation2() {\n useResizeMode();\n var context = useKeyboardContext();\n return context.animated;\n};\nvar useReanimatedKeyboardAnimation = function useReanimatedKeyboardAnimation2() {\n useResizeMode();\n var context = useKeyboardContext();\n return context.reanimated;\n};\nfunction useGenericKeyboardHandler(handler, deps) {\n var context = useKeyboardContext();\n var { doDependenciesDiffer } = useHandler(handler, deps);\n var eventHandler = useEvent(function(event) {\n \"worklet\";\n if (event.eventName.endsWith(\"onKeyboardMoveStart\")) {\n var _handler_onStart;\n (_handler_onStart = handler.onStart) === null || _handler_onStart === void 0 ? void 0 : _handler_onStart.call(handler, event);\n }\n if (event.eventName.endsWith(\"onKeyboardMove\")) {\n var _handler_onMove;\n (_handler_onMove = handler.onMove) === null || _handler_onMove === void 0 ? void 0 : _handler_onMove.call(handler, event);\n }\n if (event.eventName.endsWith(\"onKeyboardMoveEnd\")) {\n var _handler_onEnd;\n (_handler_onEnd = handler.onEnd) === null || _handler_onEnd === void 0 ? void 0 : _handler_onEnd.call(handler, event);\n }\n if (event.eventName.endsWith(\"onKeyboardMoveInteractive\")) {\n var _handler_onInteractive;\n (_handler_onInteractive = handler.onInteractive) === null || _handler_onInteractive === void 0 ? void 0 : _handler_onInteractive.call(handler, event);\n }\n }, [\n \"onKeyboardMoveStart\",\n \"onKeyboardMove\",\n \"onKeyboardMoveEnd\",\n \"onKeyboardMoveInteractive\"\n ], doDependenciesDiffer);\n useLayoutEffect(function() {\n var cleanup = context.setKeyboardHandlers(eventHandler);\n return function() {\n return cleanup();\n };\n }, deps);\n}\nfunction useKeyboardHandler(handler, deps) {\n useResizeMode();\n useGenericKeyboardHandler(handler, deps);\n}\nfunction useKeyboardController() {\n var context = useKeyboardContext();\n return {\n setEnabled: context.setEnabled,\n enabled: context.enabled\n };\n}\nfunction useReanimatedFocusedInput() {\n var context = useKeyboardContext();\n return {\n input: context.layout,\n update: context.update\n };\n}\nfunction useFocusedInputHandler(handler, deps) {\n var context = useKeyboardContext();\n var { doDependenciesDiffer } = useHandler(handler, deps);\n var eventHandler = useEvent(function(event) {\n \"worklet\";\n if (event.eventName.endsWith(\"onFocusedInputTextChanged\")) {\n var _handler_onChangeText;\n (_handler_onChangeText = handler.onChangeText) === null || _handler_onChangeText === void 0 ? void 0 : _handler_onChangeText.call(handler, event);\n }\n if (event.eventName.endsWith(\"onFocusedInputSelectionChanged\")) {\n var _handler_onSelectionChange;\n (_handler_onSelectionChange = handler.onSelectionChange) === null || _handler_onSelectionChange === void 0 ? void 0 : _handler_onSelectionChange.call(handler, event);\n }\n }, [\n \"onFocusedInputTextChanged\",\n \"onFocusedInputSelectionChanged\"\n ], doDependenciesDiffer);\n useLayoutEffect(function() {\n var cleanup = context.setInputHandlers(eventHandler);\n return function() {\n return cleanup();\n };\n }, deps);\n}\nexport {\n useFocusedInputHandler,\n useGenericKeyboardHandler,\n useKeyboardAnimation,\n useKeyboardController,\n useKeyboardHandler,\n useReanimatedFocusedInput,\n useReanimatedKeyboardAnimation,\n useResizeMode\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;;;;;;;;;AAQA,IAAI,gBAAgB,SAAS,iBAAiB;CAC5C,UAAU,WAAW;EACnB,mBAAmB,aAAa,sBAAsB,wBAAwB;EAC9E,OAAO,WAAW;GAChB,OAAO,mBAAmB,eAAe;EAC3C;CACF,GAAG,CAAC,CAAC;AACP;AACA,IAAI,uBAAuB,SAAS,wBAAwB;CAC1D,cAAc;CACd,IAAI,UAAU,mBAAmB;CACjC,OAAO,QAAQ;AACjB;AACA,IAAI,iCAAiC,SAAS,kCAAkC;CAC9E,cAAc;CACd,IAAI,UAAU,mBAAmB;CACjC,OAAO,QAAQ;AACjB;AACA,SAAS,0BAA0B,SAAS,MAAM;CAChD,IAAI,UAAU,mBAAmB;CACjC,IAAI,EAAE,yBAAyB,WAAW,SAAS,IAAI;CACvD,IAAI,eAAe,SAAS,SAAS,OAAO;EAC1C;EACA,IAAI,MAAM,UAAU,SAAS,qBAAqB,GAAG;GACnD,IAAI;GACJ,CAAC,mBAAmB,QAAQ,aAAa,QAAQ,qBAAqB,KAAK,IAAI,KAAK,IAAI,iBAAiB,KAAK,SAAS,KAAK;EAC9H;EACA,IAAI,MAAM,UAAU,SAAS,gBAAgB,GAAG;GAC9C,IAAI;GACJ,CAAC,kBAAkB,QAAQ,YAAY,QAAQ,oBAAoB,KAAK,IAAI,KAAK,IAAI,gBAAgB,KAAK,SAAS,KAAK;EAC1H;EACA,IAAI,MAAM,UAAU,SAAS,mBAAmB,GAAG;GACjD,IAAI;GACJ,CAAC,iBAAiB,QAAQ,WAAW,QAAQ,mBAAmB,KAAK,IAAI,KAAK,IAAI,eAAe,KAAK,SAAS,KAAK;EACtH;EACA,IAAI,MAAM,UAAU,SAAS,2BAA2B,GAAG;GACzD,IAAI;GACJ,CAAC,yBAAyB,QAAQ,mBAAmB,QAAQ,2BAA2B,KAAK,IAAI,KAAK,IAAI,uBAAuB,KAAK,SAAS,KAAK;EACtJ;CACF,GAAG;EACD;EACA;EACA;EACA;CACF,GAAG,oBAAoB;CACvB,gBAAgB,WAAW;EACzB,IAAI,UAAU,QAAQ,oBAAoB,YAAY;EACtD,OAAO,WAAW;GAChB,OAAO,QAAQ;EACjB;CACF,GAAG,IAAI;AACT;AACA,SAAS,mBAAmB,SAAS,MAAM;CACzC,cAAc;CACd,0BAA0B,SAAS,IAAI;AACzC;AACA,SAAS,wBAAwB;CAC/B,IAAI,UAAU,mBAAmB;CACjC,OAAO;EACL,YAAY,QAAQ;EACpB,SAAS,QAAQ;CACnB;AACF;AACA,SAAS,4BAA4B;CACnC,IAAI,UAAU,mBAAmB;CACjC,OAAO;EACL,OAAO,QAAQ;EACf,QAAQ,QAAQ;CAClB;AACF;AACA,SAAS,uBAAuB,SAAS,MAAM;CAC7C,IAAI,UAAU,mBAAmB;CACjC,IAAI,EAAE,yBAAyB,WAAW,SAAS,IAAI;CACvD,IAAI,eAAe,SAAS,SAAS,OAAO;EAC1C;EACA,IAAI,MAAM,UAAU,SAAS,2BAA2B,GAAG;GACzD,IAAI;GACJ,CAAC,wBAAwB,QAAQ,kBAAkB,QAAQ,0BAA0B,KAAK,IAAI,KAAK,IAAI,sBAAsB,KAAK,SAAS,KAAK;EAClJ;EACA,IAAI,MAAM,UAAU,SAAS,gCAAgC,GAAG;GAC9D,IAAI;GACJ,CAAC,6BAA6B,QAAQ,uBAAuB,QAAQ,+BAA+B,KAAK,IAAI,KAAK,IAAI,2BAA2B,KAAK,SAAS,KAAK;EACtK;CACF,GAAG,CACD,6BACA,gCACF,GAAG,oBAAoB;CACvB,gBAAgB,WAAW;EACzB,IAAI,UAAU,QAAQ,iBAAiB,YAAY;EACnD,OAAO,WAAW;GAChB,OAAO,QAAQ;EACjB;CACF,GAAG,IAAI;AACT"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
2
|
+
import { KeyboardEvents } from "../../bindings.mjs";
|
|
3
|
+
import { KeyboardController } from "../../module.mjs";
|
|
4
|
+
|
|
5
|
+
// dist/esm/keyboard/hooks/useKeyboardState/index.js
|
|
6
|
+
const EVENTS = ["keyboardWillShow", "keyboardDidHide"];
|
|
7
|
+
const getLatestState = () => ({
|
|
8
|
+
...KeyboardController.state(),
|
|
9
|
+
isVisible: KeyboardController.isVisible()
|
|
10
|
+
});
|
|
11
|
+
const defaultSelector = (state) => state;
|
|
12
|
+
function useKeyboardState(selector = defaultSelector) {
|
|
13
|
+
const [state, setState] = useState(() => selector(getLatestState()));
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
const subscriptions = EVENTS.map((event) => KeyboardEvents.addListener(event, () => setState(selector(getLatestState()))));
|
|
16
|
+
setState(selector(getLatestState()));
|
|
17
|
+
return () => {
|
|
18
|
+
subscriptions.forEach((subscription) => subscription.remove());
|
|
19
|
+
};
|
|
20
|
+
}, []);
|
|
21
|
+
return state;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { useKeyboardState };
|
|
25
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["esm/keyboard/hooks/useKeyboardState/index.js"],"sourcesContent":["import { useEffect, useState } from \"react\";\nimport { KeyboardEvents } from \"../../bindings\";\nimport { KeyboardController } from \"../../module\";\nconst EVENTS = [\"keyboardWillShow\", \"keyboardDidHide\"];\nconst getLatestState = () => ({\n ...KeyboardController.state(),\n isVisible: KeyboardController.isVisible()\n});\nconst defaultSelector = (state) => state;\nfunction useKeyboardState(selector = defaultSelector) {\n const [state, setState] = useState(() => selector(getLatestState()));\n useEffect(() => {\n const subscriptions = EVENTS.map(\n (event) => KeyboardEvents.addListener(\n event,\n () => (\n // state will be updated by global listener first,\n // so we simply read it and don't derive data from the event\n setState(selector(getLatestState()))\n )\n )\n );\n setState(selector(getLatestState()));\n return () => {\n subscriptions.forEach((subscription) => subscription.remove());\n };\n }, []);\n return state;\n}\nexport {\n useKeyboardState\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;;AAGA,MAAM,SAAS,CAAC,oBAAoB,iBAAiB;AACrD,MAAM,wBAAwB;CAC5B,GAAG,mBAAmB,MAAM;CAC5B,WAAW,mBAAmB,UAAU;AAC1C;AACA,MAAM,mBAAmB,UAAU;AACnC,SAAS,iBAAiB,WAAW,iBAAiB;CACpD,MAAM,CAAC,OAAO,YAAY,eAAe,SAAS,eAAe,CAAC,CAAC;CACnE,gBAAgB;EACd,MAAM,gBAAgB,OAAO,KAC1B,UAAU,eAAe,YACxB,aAIE,SAAS,SAAS,eAAe,CAAC,CAAC,CAEvC,CACF;EACA,SAAS,SAAS,eAAe,CAAC,CAAC;EACnC,aAAa;GACX,cAAc,SAAS,iBAAiB,aAAa,OAAO,CAAC;EAC/D;CACF,GAAG,CAAC,CAAC;CACL,OAAO;AACT"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
2
|
+
import { KeyboardEvents } from "../../bindings.native.js";
|
|
3
|
+
import { KeyboardController } from "../../module.native.js";
|
|
4
|
+
|
|
5
|
+
// dist/esm/keyboard/hooks/useKeyboardState/index.native.js
|
|
6
|
+
var EVENTS = ["keyboardWillShow", "keyboardDidHide"];
|
|
7
|
+
var getLatestState = function getLatestState2() {
|
|
8
|
+
return {
|
|
9
|
+
...KeyboardController.state(),
|
|
10
|
+
isVisible: KeyboardController.isVisible()
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
var defaultSelector = function defaultSelector2(state) {
|
|
14
|
+
return state;
|
|
15
|
+
};
|
|
16
|
+
function useKeyboardState() {
|
|
17
|
+
var selector = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : defaultSelector;
|
|
18
|
+
var [state, setState] = useState(function() {
|
|
19
|
+
return selector(getLatestState());
|
|
20
|
+
});
|
|
21
|
+
useEffect(function() {
|
|
22
|
+
var subscriptions = EVENTS.map(function(event) {
|
|
23
|
+
return KeyboardEvents.addListener(event, function() {
|
|
24
|
+
return setState(selector(getLatestState()));
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
setState(selector(getLatestState()));
|
|
28
|
+
return function() {
|
|
29
|
+
subscriptions.forEach(function(subscription) {
|
|
30
|
+
return subscription.remove();
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
}, []);
|
|
34
|
+
return state;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { useKeyboardState };
|
|
38
|
+
//# sourceMappingURL=index.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.native.js","names":[],"sources":["esm/keyboard/hooks/useKeyboardState/index.native.js"],"sourcesContent":["import { useEffect, useState } from \"react\";\nimport { KeyboardEvents } from \"../../bindings\";\nimport { KeyboardController } from \"../../module\";\nvar EVENTS = [\n \"keyboardWillShow\",\n \"keyboardDidHide\"\n];\nvar getLatestState = function getLatestState2() {\n return {\n ...KeyboardController.state(),\n isVisible: KeyboardController.isVisible()\n };\n};\nvar defaultSelector = function defaultSelector2(state) {\n return state;\n};\nfunction useKeyboardState() {\n var selector = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : defaultSelector;\n var [state, setState] = useState(function() {\n return selector(getLatestState());\n });\n useEffect(function() {\n var subscriptions = EVENTS.map(function(event) {\n return KeyboardEvents.addListener(event, function() {\n return (\n // state will be updated by global listener first,\n // so we simply read it and don't derive data from the event\n setState(selector(getLatestState()))\n );\n });\n });\n setState(selector(getLatestState()));\n return function() {\n subscriptions.forEach(function(subscription) {\n return subscription.remove();\n });\n };\n }, []);\n return state;\n}\nexport {\n useKeyboardState\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;;AAGA,IAAI,SAAS,CACX,oBACA,iBACF;AACA,IAAI,iBAAiB,SAAS,kBAAkB;CAC9C,OAAO;EACL,GAAG,mBAAmB,MAAM;EAC5B,WAAW,mBAAmB,UAAU;CAC1C;AACF;AACA,IAAI,kBAAkB,SAAS,iBAAiB,OAAO;CACrD,OAAO;AACT;AACA,SAAS,mBAAmB;CAC1B,IAAI,WAAW,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,KAAK;CAChF,IAAI,CAAC,OAAO,YAAY,SAAS,WAAW;EAC1C,OAAO,SAAS,eAAe,CAAC;CAClC,CAAC;CACD,UAAU,WAAW;EACnB,IAAI,gBAAgB,OAAO,IAAI,SAAS,OAAO;GAC7C,OAAO,eAAe,YAAY,OAAO,WAAW;IAClD,OAGE,SAAS,SAAS,eAAe,CAAC,CAAC;GAEvC,CAAC;EACH,CAAC;EACD,SAAS,SAAS,eAAe,CAAC,CAAC;EACnC,OAAO,WAAW;GAChB,cAAc,QAAQ,SAAS,cAAc;IAC3C,OAAO,aAAa,OAAO;GAC7B,CAAC;EACH;CACF,GAAG,CAAC,CAAC;CACL,OAAO;AACT"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
2
|
+
import { Dimensions } from "react-native-web";
|
|
3
|
+
import { WindowDimensionsEvents } from "../../bindings.mjs";
|
|
4
|
+
|
|
5
|
+
// dist/esm/keyboard/hooks/useWindowDimensions/index.js
|
|
6
|
+
const window = Dimensions.get("window");
|
|
7
|
+
let initialDimensions = {
|
|
8
|
+
width: window.width,
|
|
9
|
+
height: window.height
|
|
10
|
+
};
|
|
11
|
+
WindowDimensionsEvents.addListener("windowDidResize", (e) => {
|
|
12
|
+
initialDimensions = e;
|
|
13
|
+
});
|
|
14
|
+
const useWindowDimensions = () => {
|
|
15
|
+
const [dimensions, setDimensions] = useState(initialDimensions);
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
const subscription = WindowDimensionsEvents.addListener("windowDidResize", (e) => {
|
|
18
|
+
setDimensions(e);
|
|
19
|
+
});
|
|
20
|
+
setDimensions(initialDimensions);
|
|
21
|
+
return () => {
|
|
22
|
+
subscription.remove();
|
|
23
|
+
};
|
|
24
|
+
}, []);
|
|
25
|
+
return dimensions;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export { useWindowDimensions };
|
|
29
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["esm/keyboard/hooks/useWindowDimensions/index.js"],"sourcesContent":["import { useEffect, useState } from \"react\";\nimport { Dimensions } from \"react-native-web\";\nimport { WindowDimensionsEvents } from \"../../bindings\";\nconst window = Dimensions.get(\"window\");\nlet initialDimensions = {\n width: window.width,\n height: window.height\n};\nWindowDimensionsEvents.addListener(\"windowDidResize\", (e) => {\n initialDimensions = e;\n});\nconst useWindowDimensions = () => {\n const [dimensions, setDimensions] = useState(initialDimensions);\n useEffect(() => {\n const subscription = WindowDimensionsEvents.addListener(\"windowDidResize\", (e) => {\n setDimensions(e);\n });\n setDimensions(initialDimensions);\n return () => {\n subscription.remove();\n };\n }, []);\n return dimensions;\n};\nexport {\n useWindowDimensions\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;;AAGA,MAAM,SAAS,WAAW,IAAI,QAAQ;AACtC,IAAI,oBAAoB;CACtB,OAAO,OAAO;CACd,QAAQ,OAAO;AACjB;AACA,uBAAuB,YAAY,oBAAoB,MAAM;CAC3D,oBAAoB;AACtB,CAAC;AACD,MAAM,4BAA4B;CAChC,MAAM,CAAC,YAAY,iBAAiB,SAAS,iBAAiB;CAC9D,gBAAgB;EACd,MAAM,eAAe,uBAAuB,YAAY,oBAAoB,MAAM;GAChF,cAAc,CAAC;EACjB,CAAC;EACD,cAAc,iBAAiB;EAC/B,aAAa;GACX,aAAa,OAAO;EACtB;CACF,GAAG,CAAC,CAAC;CACL,OAAO;AACT"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
2
|
+
import { Dimensions } from "react-native";
|
|
3
|
+
import { WindowDimensionsEvents } from "../../bindings.native.js";
|
|
4
|
+
|
|
5
|
+
// dist/esm/keyboard/hooks/useWindowDimensions/index.native.js
|
|
6
|
+
var window = Dimensions.get("window");
|
|
7
|
+
var initialDimensions = {
|
|
8
|
+
width: window.width,
|
|
9
|
+
height: window.height
|
|
10
|
+
};
|
|
11
|
+
WindowDimensionsEvents.addListener("windowDidResize", function(e) {
|
|
12
|
+
initialDimensions = e;
|
|
13
|
+
});
|
|
14
|
+
var useWindowDimensions = function useWindowDimensions2() {
|
|
15
|
+
var [dimensions, setDimensions] = useState(initialDimensions);
|
|
16
|
+
useEffect(function() {
|
|
17
|
+
var subscription = WindowDimensionsEvents.addListener("windowDidResize", function(e) {
|
|
18
|
+
setDimensions(e);
|
|
19
|
+
});
|
|
20
|
+
setDimensions(initialDimensions);
|
|
21
|
+
return function() {
|
|
22
|
+
subscription.remove();
|
|
23
|
+
};
|
|
24
|
+
}, []);
|
|
25
|
+
return dimensions;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export { useWindowDimensions };
|
|
29
|
+
//# sourceMappingURL=index.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.native.js","names":[],"sources":["esm/keyboard/hooks/useWindowDimensions/index.native.js"],"sourcesContent":["import { useEffect, useState } from \"react\";\nimport { Dimensions } from \"react-native\";\nimport { WindowDimensionsEvents } from \"../../bindings\";\nvar window = Dimensions.get(\"window\");\nvar initialDimensions = {\n width: window.width,\n height: window.height\n};\nWindowDimensionsEvents.addListener(\"windowDidResize\", function(e) {\n initialDimensions = e;\n});\nvar useWindowDimensions = function useWindowDimensions2() {\n var [dimensions, setDimensions] = useState(initialDimensions);\n useEffect(function() {\n var subscription = WindowDimensionsEvents.addListener(\"windowDidResize\", function(e) {\n setDimensions(e);\n });\n setDimensions(initialDimensions);\n return function() {\n subscription.remove();\n };\n }, []);\n return dimensions;\n};\nexport {\n useWindowDimensions\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;;AAGA,IAAI,SAAS,WAAW,IAAI,QAAQ;AACpC,IAAI,oBAAoB;CACtB,OAAO,OAAO;CACd,QAAQ,OAAO;AACjB;AACA,uBAAuB,YAAY,mBAAmB,SAAS,GAAG;CAChE,oBAAoB;AACtB,CAAC;AACD,IAAI,sBAAsB,SAAS,uBAAuB;CACxD,IAAI,CAAC,YAAY,iBAAiB,SAAS,iBAAiB;CAC5D,UAAU,WAAW;EACnB,IAAI,eAAe,uBAAuB,YAAY,mBAAmB,SAAS,GAAG;GACnF,cAAc,CAAC;EACjB,CAAC;EACD,cAAc,iBAAiB;EAC/B,OAAO,WAAW;GAChB,aAAa,OAAO;EACtB;CACF,GAAG,CAAC,CAAC;CACL,OAAO;AACT"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DefaultKeyboardToolbarTheme, KeyboardAvoidingView, KeyboardAwareScrollView, KeyboardChatScrollView, KeyboardEffects, KeyboardStickyView, KeyboardToolbar } from "./components/index.mjs";
|
|
2
|
+
import { KeyboardExtender, OverKeyboardView } from "./views/index.mjs";
|
|
3
|
+
|
|
4
|
+
export * from "./bindings.mjs"
|
|
5
|
+
|
|
6
|
+
export * from "./animated.mjs"
|
|
7
|
+
|
|
8
|
+
export * from "./context.mjs"
|
|
9
|
+
|
|
10
|
+
export * from "./hooks/index.mjs"
|
|
11
|
+
|
|
12
|
+
export * from "./constants.mjs"
|
|
13
|
+
|
|
14
|
+
export * from "./module.mjs"
|
|
15
|
+
|
|
16
|
+
export * from "./typings/index.mjs"
|
|
17
|
+
|
|
18
|
+
export * from "./compat.mjs"
|
|
19
|
+
|
|
20
|
+
export { DefaultKeyboardToolbarTheme, KeyboardAvoidingView, KeyboardAwareScrollView, KeyboardChatScrollView, KeyboardEffects, KeyboardExtender, KeyboardStickyView, KeyboardToolbar, OverKeyboardView };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DefaultKeyboardToolbarTheme, KeyboardAvoidingView, KeyboardAwareScrollView, KeyboardChatScrollView, KeyboardEffects, KeyboardStickyView, KeyboardToolbar } from "./components/index.native.js";
|
|
2
|
+
import { KeyboardExtender, OverKeyboardView } from "./views/index.native.js";
|
|
3
|
+
|
|
4
|
+
export * from "./bindings.native.js"
|
|
5
|
+
|
|
6
|
+
export * from "./animated.native.js"
|
|
7
|
+
|
|
8
|
+
export * from "./context.native.js"
|
|
9
|
+
|
|
10
|
+
export * from "./hooks/index.native.js"
|
|
11
|
+
|
|
12
|
+
export * from "./constants.native.js"
|
|
13
|
+
|
|
14
|
+
export * from "./module.native.js"
|
|
15
|
+
|
|
16
|
+
export * from "./typings/index.native.js"
|
|
17
|
+
|
|
18
|
+
export * from "./compat.native.js"
|
|
19
|
+
|
|
20
|
+
export { DefaultKeyboardToolbarTheme, KeyboardAvoidingView, KeyboardAwareScrollView, KeyboardChatScrollView, KeyboardEffects, KeyboardExtender, KeyboardStickyView, KeyboardToolbar, OverKeyboardView };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { useRef } from "react";
|
|
2
|
+
import { Animated } from "react-native-web";
|
|
3
|
+
import { findNodeHandle } from "./utils/findNodeHandle/index.mjs";
|
|
4
|
+
|
|
5
|
+
// dist/esm/keyboard/internal.js
|
|
6
|
+
function useEventHandlerRegistration(viewTagRef) {
|
|
7
|
+
const onRegisterHandler = (handler) => {
|
|
8
|
+
const currentHandler = handler;
|
|
9
|
+
let registeredViewTag = null;
|
|
10
|
+
let isRegistrationCancelled = false;
|
|
11
|
+
const attachWorkletHandlers = () => {
|
|
12
|
+
if (isRegistrationCancelled) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
const viewTag = findNodeHandle(viewTagRef.current);
|
|
16
|
+
if (__DEV__ && !viewTag) {
|
|
17
|
+
console.warn("Can not attach worklet handlers for `one/keyboard` because view tag can not be resolved. Be sure that `KeyboardProvider` is fully mounted before registering handlers. If you think it is a bug in library, please open an issue.");
|
|
18
|
+
}
|
|
19
|
+
if (viewTag) {
|
|
20
|
+
if ("workletEventHandler" in currentHandler) {
|
|
21
|
+
currentHandler.workletEventHandler.registerForEvents(viewTag);
|
|
22
|
+
} else {
|
|
23
|
+
currentHandler.current.registerForEvents(viewTag);
|
|
24
|
+
}
|
|
25
|
+
registeredViewTag = viewTag;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
if (viewTagRef.current) {
|
|
29
|
+
attachWorkletHandlers();
|
|
30
|
+
} else {
|
|
31
|
+
queueMicrotask(attachWorkletHandlers);
|
|
32
|
+
}
|
|
33
|
+
return () => {
|
|
34
|
+
isRegistrationCancelled = true;
|
|
35
|
+
if (registeredViewTag) {
|
|
36
|
+
if ("workletEventHandler" in currentHandler) {
|
|
37
|
+
currentHandler.workletEventHandler.unregisterFromEvents(registeredViewTag);
|
|
38
|
+
} else {
|
|
39
|
+
currentHandler.current.unregisterFromEvents(registeredViewTag);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
return onRegisterHandler;
|
|
45
|
+
}
|
|
46
|
+
function useAnimatedValue(initialValue, config) {
|
|
47
|
+
const ref = useRef(null);
|
|
48
|
+
if (ref.current === null) {
|
|
49
|
+
ref.current = new Animated.Value(initialValue, config);
|
|
50
|
+
}
|
|
51
|
+
return ref.current;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export { useAnimatedValue, useEventHandlerRegistration };
|
|
55
|
+
//# sourceMappingURL=internal.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.js","names":[],"sources":["esm/keyboard/internal.js"],"sourcesContent":["import { useRef } from \"react\";\nimport { Animated } from \"react-native-web\";\nimport { findNodeHandle } from \"./utils/findNodeHandle\";\nfunction useEventHandlerRegistration(viewTagRef) {\n const onRegisterHandler = (handler) => {\n const currentHandler = handler;\n let registeredViewTag = null;\n let isRegistrationCancelled = false;\n const attachWorkletHandlers = () => {\n if (isRegistrationCancelled) {\n return;\n }\n const viewTag = findNodeHandle(viewTagRef.current);\n if (__DEV__ && !viewTag) {\n console.warn(\n \"Can not attach worklet handlers for `one/keyboard` because view tag can not be resolved. Be sure that `KeyboardProvider` is fully mounted before registering handlers. If you think it is a bug in library, please open an issue.\"\n );\n }\n if (viewTag) {\n if (\"workletEventHandler\" in currentHandler) {\n currentHandler.workletEventHandler.registerForEvents(viewTag);\n } else {\n currentHandler.current.registerForEvents(viewTag);\n }\n registeredViewTag = viewTag;\n }\n };\n if (viewTagRef.current) {\n attachWorkletHandlers();\n } else {\n queueMicrotask(attachWorkletHandlers);\n }\n return () => {\n isRegistrationCancelled = true;\n if (registeredViewTag) {\n if (\"workletEventHandler\" in currentHandler) {\n currentHandler.workletEventHandler.unregisterFromEvents(registeredViewTag);\n } else {\n currentHandler.current.unregisterFromEvents(registeredViewTag);\n }\n }\n };\n };\n return onRegisterHandler;\n}\nfunction useAnimatedValue(initialValue, config) {\n const ref = useRef(null);\n if (ref.current === null) {\n ref.current = new Animated.Value(initialValue, config);\n }\n return ref.current;\n}\nexport {\n useAnimatedValue,\n useEventHandlerRegistration\n};\n//# sourceMappingURL=internal.js.map\n"],"mappings":";;;;;AAGA,SAAS,4BAA4B,YAAY;CAC/C,MAAM,qBAAqB,YAAY;EACrC,MAAM,iBAAiB;EACvB,IAAI,oBAAoB;EACxB,IAAI,0BAA0B;EAC9B,MAAM,8BAA8B;GAClC,IAAI,yBAAyB;IAC3B;GACF;GACA,MAAM,UAAU,eAAe,WAAW,OAAO;GACjD,IAAI,WAAW,CAAC,SAAS;IACvB,QAAQ,KACN,mOACF;GACF;GACA,IAAI,SAAS;IACX,IAAI,yBAAyB,gBAAgB;KAC3C,eAAe,oBAAoB,kBAAkB,OAAO;IAC9D,OAAO;KACL,eAAe,QAAQ,kBAAkB,OAAO;IAClD;IACA,oBAAoB;GACtB;EACF;EACA,IAAI,WAAW,SAAS;GACtB,sBAAsB;EACxB,OAAO;GACL,eAAe,qBAAqB;EACtC;EACA,aAAa;GACX,0BAA0B;GAC1B,IAAI,mBAAmB;IACrB,IAAI,yBAAyB,gBAAgB;KAC3C,eAAe,oBAAoB,qBAAqB,iBAAiB;IAC3E,OAAO;KACL,eAAe,QAAQ,qBAAqB,iBAAiB;IAC/D;GACF;EACF;CACF;CACA,OAAO;AACT;AACA,SAAS,iBAAiB,cAAc,QAAQ;CAC9C,MAAM,MAAM,OAAO,IAAI;CACvB,IAAI,IAAI,YAAY,MAAM;EACxB,IAAI,UAAU,IAAI,SAAS,MAAM,cAAc,MAAM;CACvD;CACA,OAAO,IAAI;AACb"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { useRef } from "react";
|
|
2
|
+
import { Animated } from "react-native";
|
|
3
|
+
import { findNodeHandle } from "./utils/findNodeHandle/index.native.js";
|
|
4
|
+
|
|
5
|
+
// dist/esm/keyboard/internal.native.js
|
|
6
|
+
function useEventHandlerRegistration(viewTagRef) {
|
|
7
|
+
var onRegisterHandler = function onRegisterHandler2(handler) {
|
|
8
|
+
var currentHandler = handler;
|
|
9
|
+
var registeredViewTag = null;
|
|
10
|
+
var isRegistrationCancelled = false;
|
|
11
|
+
var attachWorkletHandlers = function attachWorkletHandlers2() {
|
|
12
|
+
if (isRegistrationCancelled) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
var viewTag = findNodeHandle(viewTagRef.current);
|
|
16
|
+
if (__DEV__ && !viewTag) {
|
|
17
|
+
console.warn("Can not attach worklet handlers for `one/keyboard` because view tag can not be resolved. Be sure that `KeyboardProvider` is fully mounted before registering handlers. If you think it is a bug in library, please open an issue.");
|
|
18
|
+
}
|
|
19
|
+
if (viewTag) {
|
|
20
|
+
if ("workletEventHandler" in currentHandler) {
|
|
21
|
+
currentHandler.workletEventHandler.registerForEvents(viewTag);
|
|
22
|
+
} else {
|
|
23
|
+
currentHandler.current.registerForEvents(viewTag);
|
|
24
|
+
}
|
|
25
|
+
registeredViewTag = viewTag;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
if (viewTagRef.current) {
|
|
29
|
+
attachWorkletHandlers();
|
|
30
|
+
} else {
|
|
31
|
+
queueMicrotask(attachWorkletHandlers);
|
|
32
|
+
}
|
|
33
|
+
return function() {
|
|
34
|
+
isRegistrationCancelled = true;
|
|
35
|
+
if (registeredViewTag) {
|
|
36
|
+
if ("workletEventHandler" in currentHandler) {
|
|
37
|
+
currentHandler.workletEventHandler.unregisterFromEvents(registeredViewTag);
|
|
38
|
+
} else {
|
|
39
|
+
currentHandler.current.unregisterFromEvents(registeredViewTag);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
return onRegisterHandler;
|
|
45
|
+
}
|
|
46
|
+
function useAnimatedValue(initialValue, config) {
|
|
47
|
+
var ref = useRef(null);
|
|
48
|
+
if (ref.current === null) {
|
|
49
|
+
ref.current = new Animated.Value(initialValue, config);
|
|
50
|
+
}
|
|
51
|
+
return ref.current;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export { useAnimatedValue, useEventHandlerRegistration };
|
|
55
|
+
//# sourceMappingURL=internal.native.js.map
|