@mustmove/bottom-sheet 1.0.0 → 1.0.2
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/lib/commonjs/components/bottomSheet/BottomSheet.js +1317 -0
- package/lib/commonjs/components/bottomSheet/BottomSheet.js.map +1 -0
- package/lib/commonjs/components/bottomSheet/BottomSheetBody.js +43 -0
- package/lib/commonjs/components/bottomSheet/BottomSheetBody.js.map +1 -0
- package/lib/commonjs/components/bottomSheet/BottomSheetContent.js +196 -0
- package/lib/commonjs/components/bottomSheet/BottomSheetContent.js.map +1 -0
- package/lib/commonjs/components/bottomSheet/constants.js +34 -0
- package/lib/commonjs/components/bottomSheet/constants.js.map +1 -0
- package/lib/commonjs/components/bottomSheet/index.js +14 -0
- package/lib/commonjs/components/bottomSheet/index.js.map +1 -0
- package/lib/commonjs/components/bottomSheet/styles.js +17 -0
- package/lib/commonjs/components/bottomSheet/styles.js.map +1 -0
- package/lib/commonjs/components/bottomSheetBackdrop/BottomSheetBackdrop.js +115 -0
- package/lib/commonjs/components/bottomSheetBackdrop/BottomSheetBackdrop.js.map +1 -0
- package/lib/commonjs/components/bottomSheetBackdrop/constants.js +16 -0
- package/lib/commonjs/components/bottomSheetBackdrop/constants.js.map +1 -0
- package/lib/commonjs/components/bottomSheetBackdrop/index.js +13 -0
- package/lib/commonjs/components/bottomSheetBackdrop/index.js.map +1 -0
- package/lib/commonjs/components/bottomSheetBackdrop/styles.js +14 -0
- package/lib/commonjs/components/bottomSheetBackdrop/styles.js.map +1 -0
- package/lib/commonjs/components/bottomSheetBackground/BottomSheetBackground.js +24 -0
- package/lib/commonjs/components/bottomSheetBackground/BottomSheetBackground.js.map +1 -0
- package/lib/commonjs/components/bottomSheetBackground/BottomSheetBackgroundContainer.js +33 -0
- package/lib/commonjs/components/bottomSheetBackground/BottomSheetBackgroundContainer.js.map +1 -0
- package/lib/commonjs/components/bottomSheetBackground/index.js +13 -0
- package/lib/commonjs/components/bottomSheetBackground/index.js.map +1 -0
- package/lib/commonjs/components/bottomSheetBackground/styles.js +15 -0
- package/lib/commonjs/components/bottomSheetBackground/styles.js.map +1 -0
- package/lib/commonjs/components/bottomSheetDraggableView/BottomSheetDraggableView.js +94 -0
- package/lib/commonjs/components/bottomSheetDraggableView/BottomSheetDraggableView.js.map +1 -0
- package/lib/commonjs/components/bottomSheetDraggableView/index.js +14 -0
- package/lib/commonjs/components/bottomSheetDraggableView/index.js.map +1 -0
- package/lib/commonjs/components/bottomSheetFooter/BottomSheetFooter.js +111 -0
- package/lib/commonjs/components/bottomSheetFooter/BottomSheetFooter.js.map +1 -0
- package/lib/commonjs/components/bottomSheetFooter/BottomSheetFooterContainer.js +54 -0
- package/lib/commonjs/components/bottomSheetFooter/BottomSheetFooterContainer.js.map +1 -0
- package/lib/commonjs/components/bottomSheetFooter/index.js +20 -0
- package/lib/commonjs/components/bottomSheetFooter/index.js.map +1 -0
- package/lib/commonjs/components/bottomSheetFooter/styles.js +18 -0
- package/lib/commonjs/components/bottomSheetFooter/styles.js.map +1 -0
- package/lib/commonjs/components/bottomSheetGestureHandlersProvider/BottomSheetGestureHandlersProvider.js +53 -0
- package/lib/commonjs/components/bottomSheetGestureHandlersProvider/BottomSheetGestureHandlersProvider.js.map +1 -0
- package/lib/commonjs/components/bottomSheetGestureHandlersProvider/index.js +14 -0
- package/lib/commonjs/components/bottomSheetGestureHandlersProvider/index.js.map +1 -0
- package/lib/commonjs/components/bottomSheetHandle/BottomSheetHandle.js +43 -0
- package/lib/commonjs/components/bottomSheetHandle/BottomSheetHandle.js.map +1 -0
- package/lib/commonjs/components/bottomSheetHandle/BottomSheetHandleContainer.js +153 -0
- package/lib/commonjs/components/bottomSheetHandle/BottomSheetHandleContainer.js.map +1 -0
- package/lib/commonjs/components/bottomSheetHandle/constants.js +11 -0
- package/lib/commonjs/components/bottomSheetHandle/constants.js.map +1 -0
- package/lib/commonjs/components/bottomSheetHandle/index.js +21 -0
- package/lib/commonjs/components/bottomSheetHandle/index.js.map +1 -0
- package/lib/commonjs/components/bottomSheetHandle/styles.js +27 -0
- package/lib/commonjs/components/bottomSheetHandle/styles.js.map +1 -0
- package/lib/commonjs/components/bottomSheetHostingContainer/BottomSheetHostingContainer.js +110 -0
- package/lib/commonjs/components/bottomSheetHostingContainer/BottomSheetHostingContainer.js.map +1 -0
- package/lib/commonjs/components/bottomSheetHostingContainer/index.js +13 -0
- package/lib/commonjs/components/bottomSheetHostingContainer/index.js.map +1 -0
- package/lib/commonjs/components/bottomSheetHostingContainer/styles.js +14 -0
- package/lib/commonjs/components/bottomSheetHostingContainer/styles.js.map +1 -0
- package/lib/commonjs/components/bottomSheetHostingContainer/styles.web.js +17 -0
- package/lib/commonjs/components/bottomSheetHostingContainer/styles.web.js.map +1 -0
- package/lib/commonjs/components/bottomSheetModal/BottomSheetModal.js +387 -0
- package/lib/commonjs/components/bottomSheetModal/BottomSheetModal.js.map +1 -0
- package/lib/commonjs/components/bottomSheetModal/constants.js +9 -0
- package/lib/commonjs/components/bottomSheetModal/constants.js.map +1 -0
- package/lib/commonjs/components/bottomSheetModal/index.js +14 -0
- package/lib/commonjs/components/bottomSheetModal/index.js.map +1 -0
- package/lib/commonjs/components/bottomSheetModalProvider/BottomSheetModalProvider.js +172 -0
- package/lib/commonjs/components/bottomSheetModalProvider/BottomSheetModalProvider.js.map +1 -0
- package/lib/commonjs/components/bottomSheetModalProvider/index.js +14 -0
- package/lib/commonjs/components/bottomSheetModalProvider/index.js.map +1 -0
- package/lib/commonjs/components/bottomSheetRefreshControl/BottomSheetRefreshControl.android.js +64 -0
- package/lib/commonjs/components/bottomSheetRefreshControl/BottomSheetRefreshControl.android.js.map +1 -0
- package/lib/commonjs/components/bottomSheetRefreshControl/BottomSheetRefreshControl.js +9 -0
- package/lib/commonjs/components/bottomSheetRefreshControl/BottomSheetRefreshControl.js.map +1 -0
- package/lib/commonjs/components/bottomSheetRefreshControl/index.js +10 -0
- package/lib/commonjs/components/bottomSheetRefreshControl/index.js.map +1 -0
- package/lib/commonjs/components/bottomSheetScrollable/BottomSheetDraggableScrollable.js +23 -0
- package/lib/commonjs/components/bottomSheetScrollable/BottomSheetDraggableScrollable.js.map +1 -0
- package/lib/commonjs/components/bottomSheetScrollable/BottomSheetFlashList.js +66 -0
- package/lib/commonjs/components/bottomSheetScrollable/BottomSheetFlashList.js.map +1 -0
- package/lib/commonjs/components/bottomSheetScrollable/BottomSheetFlashList.web.js +9 -0
- package/lib/commonjs/components/bottomSheetScrollable/BottomSheetFlashList.web.js.map +1 -0
- package/lib/commonjs/components/bottomSheetScrollable/BottomSheetFlatList.js +18 -0
- package/lib/commonjs/components/bottomSheetScrollable/BottomSheetFlatList.js.map +1 -0
- package/lib/commonjs/components/bottomSheetScrollable/BottomSheetScrollView.js +18 -0
- package/lib/commonjs/components/bottomSheetScrollable/BottomSheetScrollView.js.map +1 -0
- package/lib/commonjs/components/bottomSheetScrollable/BottomSheetSectionList.js +18 -0
- package/lib/commonjs/components/bottomSheetScrollable/BottomSheetSectionList.js.map +1 -0
- package/lib/commonjs/components/bottomSheetScrollable/BottomSheetVirtualizedList.js +18 -0
- package/lib/commonjs/components/bottomSheetScrollable/BottomSheetVirtualizedList.js.map +1 -0
- package/lib/commonjs/components/bottomSheetScrollable/ScrollableContainer.android.js +40 -0
- package/lib/commonjs/components/bottomSheetScrollable/ScrollableContainer.android.js.map +1 -0
- package/lib/commonjs/components/bottomSheetScrollable/ScrollableContainer.js +24 -0
- package/lib/commonjs/components/bottomSheetScrollable/ScrollableContainer.js.map +1 -0
- package/lib/commonjs/components/bottomSheetScrollable/ScrollableContainer.web.js +84 -0
- package/lib/commonjs/components/bottomSheetScrollable/ScrollableContainer.web.js.map +1 -0
- package/lib/commonjs/components/bottomSheetScrollable/createBottomSheetScrollableComponent.js +117 -0
- package/lib/commonjs/components/bottomSheetScrollable/createBottomSheetScrollableComponent.js.map +1 -0
- package/lib/commonjs/components/bottomSheetScrollable/index.js +49 -0
- package/lib/commonjs/components/bottomSheetScrollable/index.js.map +1 -0
- package/lib/commonjs/components/bottomSheetScrollable/styles.js +14 -0
- package/lib/commonjs/components/bottomSheetScrollable/styles.js.map +1 -0
- package/lib/commonjs/components/bottomSheetScrollable/useBottomSheetContentSizeSetter.js +39 -0
- package/lib/commonjs/components/bottomSheetScrollable/useBottomSheetContentSizeSetter.js.map +1 -0
- package/lib/commonjs/components/bottomSheetTextInput/BottomSheetTextInput.js +106 -0
- package/lib/commonjs/components/bottomSheetTextInput/BottomSheetTextInput.js.map +1 -0
- package/lib/commonjs/components/bottomSheetTextInput/index.js +14 -0
- package/lib/commonjs/components/bottomSheetTextInput/index.js.map +1 -0
- package/lib/commonjs/components/bottomSheetTextInput/types.js +6 -0
- package/lib/commonjs/components/bottomSheetTextInput/types.js.map +1 -0
- package/lib/commonjs/components/bottomSheetView/BottomSheetView.js +91 -0
- package/lib/commonjs/components/bottomSheetView/BottomSheetView.js.map +1 -0
- package/lib/commonjs/components/bottomSheetView/index.js +14 -0
- package/lib/commonjs/components/bottomSheetView/index.js.map +1 -0
- package/lib/commonjs/components/bottomSheetView/styles.js +16 -0
- package/lib/commonjs/components/bottomSheetView/styles.js.map +1 -0
- package/lib/commonjs/components/touchables/Touchables.ios.js +25 -0
- package/lib/commonjs/components/touchables/Touchables.ios.js.map +1 -0
- package/lib/commonjs/components/touchables/Touchables.js +25 -0
- package/lib/commonjs/components/touchables/Touchables.js.map +1 -0
- package/lib/commonjs/components/touchables/index.js +13 -0
- package/lib/commonjs/components/touchables/index.js.map +1 -0
- package/lib/commonjs/constants.js +138 -0
- package/lib/commonjs/constants.js.map +1 -0
- package/lib/commonjs/contexts/external.js +10 -0
- package/lib/commonjs/contexts/external.js.map +1 -0
- package/lib/commonjs/contexts/gesture.js +10 -0
- package/lib/commonjs/contexts/gesture.js.map +1 -0
- package/lib/commonjs/contexts/index.js +65 -0
- package/lib/commonjs/contexts/index.js.map +1 -0
- package/lib/commonjs/contexts/internal.js +10 -0
- package/lib/commonjs/contexts/internal.js.map +1 -0
- package/lib/commonjs/contexts/modal/external.js +10 -0
- package/lib/commonjs/contexts/modal/external.js.map +1 -0
- package/lib/commonjs/contexts/modal/internal.js +10 -0
- package/lib/commonjs/contexts/modal/internal.js.map +1 -0
- package/lib/commonjs/hooks/index.js +132 -0
- package/lib/commonjs/hooks/index.js.map +1 -0
- package/lib/commonjs/hooks/useAnimatedDetents.js +95 -0
- package/lib/commonjs/hooks/useAnimatedDetents.js.map +1 -0
- package/lib/commonjs/hooks/useAnimatedKeyboard.js +125 -0
- package/lib/commonjs/hooks/useAnimatedKeyboard.js.map +1 -0
- package/lib/commonjs/hooks/useAnimatedLayout.js +90 -0
- package/lib/commonjs/hooks/useAnimatedLayout.js.map +1 -0
- package/lib/commonjs/hooks/useBottomSheet.js +17 -0
- package/lib/commonjs/hooks/useBottomSheet.js.map +1 -0
- package/lib/commonjs/hooks/useBottomSheetContentContainerStyle.js +77 -0
- package/lib/commonjs/hooks/useBottomSheetContentContainerStyle.js.map +1 -0
- package/lib/commonjs/hooks/useBottomSheetGestureHandlers.js +17 -0
- package/lib/commonjs/hooks/useBottomSheetGestureHandlers.js.map +1 -0
- package/lib/commonjs/hooks/useBottomSheetInternal.js +16 -0
- package/lib/commonjs/hooks/useBottomSheetInternal.js.map +1 -0
- package/lib/commonjs/hooks/useBottomSheetModal.js +17 -0
- package/lib/commonjs/hooks/useBottomSheetModal.js.map +1 -0
- package/lib/commonjs/hooks/useBottomSheetModalInternal.js +16 -0
- package/lib/commonjs/hooks/useBottomSheetModalInternal.js.map +1 -0
- package/lib/commonjs/hooks/useBottomSheetScrollableCreator.js +58 -0
- package/lib/commonjs/hooks/useBottomSheetScrollableCreator.js.map +1 -0
- package/lib/commonjs/hooks/useBottomSheetSpringConfigs.js +15 -0
- package/lib/commonjs/hooks/useBottomSheetSpringConfigs.js.map +1 -0
- package/lib/commonjs/hooks/useBottomSheetTimingConfigs.js +32 -0
- package/lib/commonjs/hooks/useBottomSheetTimingConfigs.js.map +1 -0
- package/lib/commonjs/hooks/useBoundingClientRect.js +66 -0
- package/lib/commonjs/hooks/useBoundingClientRect.js.map +1 -0
- package/lib/commonjs/hooks/useGestureEventsHandlersDefault.js +299 -0
- package/lib/commonjs/hooks/useGestureEventsHandlersDefault.js.map +1 -0
- package/lib/commonjs/hooks/useGestureEventsHandlersDefault.web.js +295 -0
- package/lib/commonjs/hooks/useGestureEventsHandlersDefault.web.js.map +1 -0
- package/lib/commonjs/hooks/useGestureHandler.js +56 -0
- package/lib/commonjs/hooks/useGestureHandler.js.map +1 -0
- package/lib/commonjs/hooks/usePropsValidator.js +54 -0
- package/lib/commonjs/hooks/usePropsValidator.js.map +1 -0
- package/lib/commonjs/hooks/useReactiveSharedValue.js +48 -0
- package/lib/commonjs/hooks/useReactiveSharedValue.js.map +1 -0
- package/lib/commonjs/hooks/useScrollEventsHandlersDefault.js +132 -0
- package/lib/commonjs/hooks/useScrollEventsHandlersDefault.js.map +1 -0
- package/lib/commonjs/hooks/useScrollHandler.js +62 -0
- package/lib/commonjs/hooks/useScrollHandler.js.map +1 -0
- package/lib/commonjs/hooks/useScrollHandler.web.js +130 -0
- package/lib/commonjs/hooks/useScrollHandler.web.js.map +1 -0
- package/lib/commonjs/hooks/useScrollable.js +103 -0
- package/lib/commonjs/hooks/useScrollable.js.map +1 -0
- package/lib/commonjs/hooks/useScrollableSetter.js +47 -0
- package/lib/commonjs/hooks/useScrollableSetter.js.map +1 -0
- package/lib/commonjs/hooks/useStableCallback.js +25 -0
- package/lib/commonjs/hooks/useStableCallback.js.map +1 -0
- package/lib/commonjs/index.js +282 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/utilities/animate.js +41 -0
- package/lib/commonjs/utilities/animate.js.map +1 -0
- package/lib/commonjs/utilities/clamp.js +13 -0
- package/lib/commonjs/utilities/clamp.js.map +1 -0
- package/lib/commonjs/utilities/easingExp.js +19 -0
- package/lib/commonjs/utilities/easingExp.js.map +1 -0
- package/lib/commonjs/utilities/findNodeHandle.js +13 -0
- package/lib/commonjs/utilities/findNodeHandle.js.map +1 -0
- package/lib/commonjs/utilities/findNodeHandle.web.js +32 -0
- package/lib/commonjs/utilities/findNodeHandle.web.js.map +1 -0
- package/lib/commonjs/utilities/getKeyboardAnimationConfigs.js +44 -0
- package/lib/commonjs/utilities/getKeyboardAnimationConfigs.js.map +1 -0
- package/lib/commonjs/utilities/getRefNativeTag.web.js +11 -0
- package/lib/commonjs/utilities/getRefNativeTag.web.js.map +1 -0
- package/lib/commonjs/utilities/id.js +13 -0
- package/lib/commonjs/utilities/id.js.map +1 -0
- package/lib/commonjs/utilities/index.js +61 -0
- package/lib/commonjs/utilities/index.js.map +1 -0
- package/lib/commonjs/utilities/isFabricInstalled.js +16 -0
- package/lib/commonjs/utilities/isFabricInstalled.js.map +1 -0
- package/lib/commonjs/utilities/logger.js +44 -0
- package/lib/commonjs/utilities/logger.js.map +1 -0
- package/lib/commonjs/utilities/noop.js +13 -0
- package/lib/commonjs/utilities/noop.js.map +1 -0
- package/lib/commonjs/utilities/normalizeSnapPoint.js +22 -0
- package/lib/commonjs/utilities/normalizeSnapPoint.js.map +1 -0
- package/lib/commonjs/utilities/snapPoint.js +16 -0
- package/lib/commonjs/utilities/snapPoint.js.map +1 -0
- package/lib/commonjs/utilities/validateSnapPoint.js +15 -0
- package/lib/commonjs/utilities/validateSnapPoint.js.map +1 -0
- package/lib/module/components/bottomSheet/BottomSheet.js +1310 -0
- package/lib/module/components/bottomSheet/BottomSheet.js.map +1 -0
- package/lib/module/components/bottomSheet/BottomSheetBody.js +38 -0
- package/lib/module/components/bottomSheet/BottomSheetBody.js.map +1 -0
- package/lib/module/components/bottomSheet/BottomSheetContent.js +190 -0
- package/lib/module/components/bottomSheet/BottomSheetContent.js.map +1 -0
- package/lib/module/components/bottomSheet/constants.js +38 -0
- package/lib/module/components/bottomSheet/constants.js.map +1 -0
- package/lib/module/components/bottomSheet/index.js +4 -0
- package/lib/module/components/bottomSheet/index.js.map +1 -0
- package/lib/module/components/bottomSheet/styles.js +13 -0
- package/lib/module/components/bottomSheet/styles.js.map +1 -0
- package/lib/module/components/bottomSheetBackdrop/BottomSheetBackdrop.js +110 -0
- package/lib/module/components/bottomSheetBackdrop/BottomSheetBackdrop.js.map +1 -0
- package/lib/module/components/bottomSheetBackdrop/constants.js +13 -0
- package/lib/module/components/bottomSheetBackdrop/constants.js.map +1 -0
- package/lib/module/components/bottomSheetBackdrop/index.js +4 -0
- package/lib/module/components/bottomSheetBackdrop/index.js.map +1 -0
- package/lib/module/components/bottomSheetBackdrop/styles.js +10 -0
- package/lib/module/components/bottomSheetBackdrop/styles.js.map +1 -0
- package/lib/module/components/bottomSheetBackground/BottomSheetBackground.js +19 -0
- package/lib/module/components/bottomSheetBackground/BottomSheetBackground.js.map +1 -0
- package/lib/module/components/bottomSheetBackground/BottomSheetBackgroundContainer.js +28 -0
- package/lib/module/components/bottomSheetBackground/BottomSheetBackgroundContainer.js.map +1 -0
- package/lib/module/components/bottomSheetBackground/index.js +4 -0
- package/lib/module/components/bottomSheetBackground/index.js.map +1 -0
- package/lib/module/components/bottomSheetBackground/styles.js +11 -0
- package/lib/module/components/bottomSheetBackground/styles.js.map +1 -0
- package/lib/module/components/bottomSheetDraggableView/BottomSheetDraggableView.js +88 -0
- package/lib/module/components/bottomSheetDraggableView/BottomSheetDraggableView.js.map +1 -0
- package/lib/module/components/bottomSheetDraggableView/index.js +4 -0
- package/lib/module/components/bottomSheetDraggableView/index.js.map +1 -0
- package/lib/module/components/bottomSheetFooter/BottomSheetFooter.js +106 -0
- package/lib/module/components/bottomSheetFooter/BottomSheetFooter.js.map +1 -0
- package/lib/module/components/bottomSheetFooter/BottomSheetFooterContainer.js +49 -0
- package/lib/module/components/bottomSheetFooter/BottomSheetFooterContainer.js.map +1 -0
- package/lib/module/components/bottomSheetFooter/index.js +5 -0
- package/lib/module/components/bottomSheetFooter/index.js.map +1 -0
- package/lib/module/components/bottomSheetFooter/styles.js +14 -0
- package/lib/module/components/bottomSheetFooter/styles.js.map +1 -0
- package/lib/module/components/bottomSheetGestureHandlersProvider/BottomSheetGestureHandlersProvider.js +48 -0
- package/lib/module/components/bottomSheetGestureHandlersProvider/BottomSheetGestureHandlersProvider.js.map +1 -0
- package/lib/module/components/bottomSheetGestureHandlersProvider/index.js +4 -0
- package/lib/module/components/bottomSheetGestureHandlersProvider/index.js.map +1 -0
- package/lib/module/components/bottomSheetHandle/BottomSheetHandle.js +38 -0
- package/lib/module/components/bottomSheetHandle/BottomSheetHandle.js.map +1 -0
- package/lib/module/components/bottomSheetHandle/BottomSheetHandleContainer.js +147 -0
- package/lib/module/components/bottomSheetHandle/BottomSheetHandleContainer.js.map +1 -0
- package/lib/module/components/bottomSheetHandle/constants.js +8 -0
- package/lib/module/components/bottomSheetHandle/constants.js.map +1 -0
- package/lib/module/components/bottomSheetHandle/index.js +5 -0
- package/lib/module/components/bottomSheetHandle/index.js.map +1 -0
- package/lib/module/components/bottomSheetHandle/styles.js +23 -0
- package/lib/module/components/bottomSheetHandle/styles.js.map +1 -0
- package/lib/module/components/bottomSheetHostingContainer/BottomSheetHostingContainer.js +105 -0
- package/lib/module/components/bottomSheetHostingContainer/BottomSheetHostingContainer.js.map +1 -0
- package/lib/module/components/bottomSheetHostingContainer/index.js +4 -0
- package/lib/module/components/bottomSheetHostingContainer/index.js.map +1 -0
- package/lib/module/components/bottomSheetHostingContainer/styles.js +10 -0
- package/lib/module/components/bottomSheetHostingContainer/styles.js.map +1 -0
- package/lib/module/components/bottomSheetHostingContainer/styles.web.js +13 -0
- package/lib/module/components/bottomSheetHostingContainer/styles.web.js.map +1 -0
- package/lib/module/components/bottomSheetModal/BottomSheetModal.js +381 -0
- package/lib/module/components/bottomSheetModal/BottomSheetModal.js.map +1 -0
- package/lib/module/components/bottomSheetModal/constants.js +6 -0
- package/lib/module/components/bottomSheetModal/constants.js.map +1 -0
- package/lib/module/components/bottomSheetModal/index.js +4 -0
- package/lib/module/components/bottomSheetModal/index.js.map +1 -0
- package/lib/module/components/bottomSheetModalProvider/BottomSheetModalProvider.js +167 -0
- package/lib/module/components/bottomSheetModalProvider/BottomSheetModalProvider.js.map +1 -0
- package/lib/module/components/bottomSheetModalProvider/index.js +4 -0
- package/lib/module/components/bottomSheetModalProvider/index.js.map +1 -0
- package/lib/module/components/bottomSheetRefreshControl/BottomSheetRefreshControl.android.js +59 -0
- package/lib/module/components/bottomSheetRefreshControl/BottomSheetRefreshControl.android.js.map +1 -0
- package/lib/module/components/bottomSheetRefreshControl/BottomSheetRefreshControl.js +4 -0
- package/lib/module/components/bottomSheetRefreshControl/BottomSheetRefreshControl.js.map +1 -0
- package/lib/module/components/bottomSheetRefreshControl/index.js +5 -0
- package/lib/module/components/bottomSheetRefreshControl/index.js.map +1 -0
- package/lib/module/components/bottomSheetScrollable/BottomSheetDraggableScrollable.js +18 -0
- package/lib/module/components/bottomSheetScrollable/BottomSheetDraggableScrollable.js.map +1 -0
- package/lib/module/components/bottomSheetScrollable/BottomSheetFlashList.js +60 -0
- package/lib/module/components/bottomSheetScrollable/BottomSheetFlashList.js.map +1 -0
- package/lib/module/components/bottomSheetScrollable/BottomSheetFlashList.web.js +4 -0
- package/lib/module/components/bottomSheetScrollable/BottomSheetFlashList.web.js.map +1 -0
- package/lib/module/components/bottomSheetScrollable/BottomSheetFlatList.js +13 -0
- package/lib/module/components/bottomSheetScrollable/BottomSheetFlatList.js.map +1 -0
- package/lib/module/components/bottomSheetScrollable/BottomSheetScrollView.js +13 -0
- package/lib/module/components/bottomSheetScrollable/BottomSheetScrollView.js.map +1 -0
- package/lib/module/components/bottomSheetScrollable/BottomSheetSectionList.js +13 -0
- package/lib/module/components/bottomSheetScrollable/BottomSheetSectionList.js.map +1 -0
- package/lib/module/components/bottomSheetScrollable/BottomSheetVirtualizedList.js +13 -0
- package/lib/module/components/bottomSheetScrollable/BottomSheetVirtualizedList.js.map +1 -0
- package/lib/module/components/bottomSheetScrollable/ScrollableContainer.android.js +34 -0
- package/lib/module/components/bottomSheetScrollable/ScrollableContainer.android.js.map +1 -0
- package/lib/module/components/bottomSheetScrollable/ScrollableContainer.js +19 -0
- package/lib/module/components/bottomSheetScrollable/ScrollableContainer.js.map +1 -0
- package/lib/module/components/bottomSheetScrollable/ScrollableContainer.web.js +78 -0
- package/lib/module/components/bottomSheetScrollable/ScrollableContainer.web.js.map +1 -0
- package/lib/module/components/bottomSheetScrollable/createBottomSheetScrollableComponent.js +112 -0
- package/lib/module/components/bottomSheetScrollable/createBottomSheetScrollableComponent.js.map +1 -0
- package/lib/module/components/bottomSheetScrollable/index.js +9 -0
- package/lib/module/components/bottomSheetScrollable/index.js.map +1 -0
- package/lib/module/components/bottomSheetScrollable/styles.js +10 -0
- package/lib/module/components/bottomSheetScrollable/styles.js.map +1 -0
- package/lib/module/components/bottomSheetScrollable/useBottomSheetContentSizeSetter.js +36 -0
- package/lib/module/components/bottomSheetScrollable/useBottomSheetContentSizeSetter.js.map +1 -0
- package/lib/module/components/bottomSheetTextInput/BottomSheetTextInput.js +101 -0
- package/lib/module/components/bottomSheetTextInput/BottomSheetTextInput.js.map +1 -0
- package/lib/module/components/bottomSheetTextInput/index.js +4 -0
- package/lib/module/components/bottomSheetTextInput/index.js.map +1 -0
- package/lib/module/components/bottomSheetTextInput/types.js +4 -0
- package/lib/module/components/bottomSheetTextInput/types.js.map +1 -0
- package/lib/module/components/bottomSheetView/BottomSheetView.js +86 -0
- package/lib/module/components/bottomSheetView/BottomSheetView.js.map +1 -0
- package/lib/module/components/bottomSheetView/index.js +4 -0
- package/lib/module/components/bottomSheetView/index.js.map +1 -0
- package/lib/module/components/bottomSheetView/styles.js +12 -0
- package/lib/module/components/bottomSheetView/styles.js.map +1 -0
- package/lib/module/components/touchables/Touchables.ios.js +4 -0
- package/lib/module/components/touchables/Touchables.ios.js.map +1 -0
- package/lib/module/components/touchables/Touchables.js +4 -0
- package/lib/module/components/touchables/Touchables.js.map +1 -0
- package/lib/module/components/touchables/index.js +11 -0
- package/lib/module/components/touchables/index.js.map +1 -0
- package/lib/module/constants.js +131 -0
- package/lib/module/constants.js.map +1 -0
- package/lib/module/contexts/external.js +6 -0
- package/lib/module/contexts/external.js.map +1 -0
- package/lib/module/contexts/gesture.js +6 -0
- package/lib/module/contexts/gesture.js.map +1 -0
- package/lib/module/contexts/index.js +8 -0
- package/lib/module/contexts/index.js.map +1 -0
- package/lib/module/contexts/internal.js +6 -0
- package/lib/module/contexts/internal.js.map +1 -0
- package/lib/module/contexts/modal/external.js +6 -0
- package/lib/module/contexts/modal/external.js.map +1 -0
- package/lib/module/contexts/modal/internal.js +6 -0
- package/lib/module/contexts/modal/internal.js.map +1 -0
- package/lib/module/hooks/index.js +29 -0
- package/lib/module/hooks/index.js.map +1 -0
- package/lib/module/hooks/useAnimatedDetents.js +91 -0
- package/lib/module/hooks/useAnimatedDetents.js.map +1 -0
- package/lib/module/hooks/useAnimatedKeyboard.js +120 -0
- package/lib/module/hooks/useAnimatedKeyboard.js.map +1 -0
- package/lib/module/hooks/useAnimatedLayout.js +86 -0
- package/lib/module/hooks/useAnimatedLayout.js.map +1 -0
- package/lib/module/hooks/useBottomSheet.js +12 -0
- package/lib/module/hooks/useBottomSheet.js.map +1 -0
- package/lib/module/hooks/useBottomSheetContentContainerStyle.js +73 -0
- package/lib/module/hooks/useBottomSheetContentContainerStyle.js.map +1 -0
- package/lib/module/hooks/useBottomSheetGestureHandlers.js +12 -0
- package/lib/module/hooks/useBottomSheetGestureHandlers.js.map +1 -0
- package/lib/module/hooks/useBottomSheetInternal.js +12 -0
- package/lib/module/hooks/useBottomSheetInternal.js.map +1 -0
- package/lib/module/hooks/useBottomSheetModal.js +12 -0
- package/lib/module/hooks/useBottomSheetModal.js.map +1 -0
- package/lib/module/hooks/useBottomSheetModalInternal.js +12 -0
- package/lib/module/hooks/useBottomSheetModalInternal.js.map +1 -0
- package/lib/module/hooks/useBottomSheetScrollableCreator.js +54 -0
- package/lib/module/hooks/useBottomSheetScrollableCreator.js.map +1 -0
- package/lib/module/hooks/useBottomSheetSpringConfigs.js +10 -0
- package/lib/module/hooks/useBottomSheetSpringConfigs.js.map +1 -0
- package/lib/module/hooks/useBottomSheetTimingConfigs.js +28 -0
- package/lib/module/hooks/useBottomSheetTimingConfigs.js.map +1 -0
- package/lib/module/hooks/useBoundingClientRect.js +62 -0
- package/lib/module/hooks/useBoundingClientRect.js.map +1 -0
- package/lib/module/hooks/useGestureEventsHandlersDefault.js +294 -0
- package/lib/module/hooks/useGestureEventsHandlersDefault.js.map +1 -0
- package/lib/module/hooks/useGestureEventsHandlersDefault.web.js +290 -0
- package/lib/module/hooks/useGestureEventsHandlersDefault.web.js.map +1 -0
- package/lib/module/hooks/useGestureHandler.js +51 -0
- package/lib/module/hooks/useGestureHandler.js.map +1 -0
- package/lib/module/hooks/usePropsValidator.js +49 -0
- package/lib/module/hooks/usePropsValidator.js.map +1 -0
- package/lib/module/hooks/useReactiveSharedValue.js +43 -0
- package/lib/module/hooks/useReactiveSharedValue.js.map +1 -0
- package/lib/module/hooks/useScrollEventsHandlersDefault.js +127 -0
- package/lib/module/hooks/useScrollEventsHandlersDefault.js.map +1 -0
- package/lib/module/hooks/useScrollHandler.js +57 -0
- package/lib/module/hooks/useScrollHandler.js.map +1 -0
- package/lib/module/hooks/useScrollHandler.web.js +125 -0
- package/lib/module/hooks/useScrollHandler.web.js.map +1 -0
- package/lib/module/hooks/useScrollable.js +98 -0
- package/lib/module/hooks/useScrollable.js.map +1 -0
- package/lib/module/hooks/useScrollableSetter.js +42 -0
- package/lib/module/hooks/useScrollableSetter.js.map +1 -0
- package/lib/module/hooks/useStableCallback.js +21 -0
- package/lib/module/hooks/useStableCallback.js.map +1 -0
- package/lib/module/index.js +53 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/utilities/animate.js +36 -0
- package/lib/module/utilities/animate.js.map +1 -0
- package/lib/module/utilities/clamp.js +8 -0
- package/lib/module/utilities/clamp.js.map +1 -0
- package/lib/module/utilities/easingExp.js +14 -0
- package/lib/module/utilities/easingExp.js.map +1 -0
- package/lib/module/utilities/findNodeHandle.js +4 -0
- package/lib/module/utilities/findNodeHandle.js.map +1 -0
- package/lib/module/utilities/findNodeHandle.web.js +28 -0
- package/lib/module/utilities/findNodeHandle.web.js.map +1 -0
- package/lib/module/utilities/getKeyboardAnimationConfigs.js +39 -0
- package/lib/module/utilities/getKeyboardAnimationConfigs.js.map +1 -0
- package/lib/module/utilities/getRefNativeTag.web.js +7 -0
- package/lib/module/utilities/getRefNativeTag.web.js.map +1 -0
- package/lib/module/utilities/id.js +8 -0
- package/lib/module/utilities/id.js.map +1 -0
- package/lib/module/utilities/index.js +10 -0
- package/lib/module/utilities/index.js.map +1 -0
- package/lib/module/utilities/isFabricInstalled.js +12 -0
- package/lib/module/utilities/isFabricInstalled.js.map +1 -0
- package/lib/module/utilities/logger.js +39 -0
- package/lib/module/utilities/logger.js.map +1 -0
- package/lib/module/utilities/noop.js +8 -0
- package/lib/module/utilities/noop.js.map +1 -0
- package/lib/module/utilities/normalizeSnapPoint.js +17 -0
- package/lib/module/utilities/normalizeSnapPoint.js.map +1 -0
- package/lib/module/utilities/snapPoint.js +11 -0
- package/lib/module/utilities/snapPoint.js.map +1 -0
- package/lib/module/utilities/validateSnapPoint.js +9 -0
- package/lib/module/utilities/validateSnapPoint.js.map +1 -0
- package/lib/typescript/components/bottomSheet/BottomSheet.d.ts +7 -0
- package/lib/typescript/components/bottomSheet/BottomSheet.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheet/BottomSheetBody.d.ts +10 -0
- package/lib/typescript/components/bottomSheet/BottomSheetBody.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheet/BottomSheetContent.d.ts +12 -0
- package/lib/typescript/components/bottomSheet/BottomSheetContent.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheet/constants.d.ts +21 -0
- package/lib/typescript/components/bottomSheet/constants.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheet/index.d.ts +3 -0
- package/lib/typescript/components/bottomSheet/index.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheet/styles.d.ts +10 -0
- package/lib/typescript/components/bottomSheet/styles.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheet/types.d.ts +358 -0
- package/lib/typescript/components/bottomSheetBackdrop/BottomSheetBackdrop.d.ts +4 -0
- package/lib/typescript/components/bottomSheetBackdrop/BottomSheetBackdrop.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetBackdrop/constants.d.ts +11 -0
- package/lib/typescript/components/bottomSheetBackdrop/constants.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetBackdrop/index.d.ts +3 -0
- package/lib/typescript/components/bottomSheetBackdrop/index.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetBackdrop/styles.d.ts +11 -0
- package/lib/typescript/components/bottomSheetBackdrop/styles.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetBackdrop/types.d.ts +58 -0
- package/lib/typescript/components/bottomSheetBackground/BottomSheetBackground.d.ts +4 -0
- package/lib/typescript/components/bottomSheetBackground/BottomSheetBackground.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetBackground/BottomSheetBackgroundContainer.d.ts +4 -0
- package/lib/typescript/components/bottomSheetBackground/BottomSheetBackgroundContainer.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetBackground/index.d.ts +3 -0
- package/lib/typescript/components/bottomSheetBackground/index.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetBackground/styles.d.ts +9 -0
- package/lib/typescript/components/bottomSheetBackground/styles.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetBackground/types.d.ts +12 -0
- package/lib/typescript/components/bottomSheetDraggableView/BottomSheetDraggableView.d.ts +5 -0
- package/lib/typescript/components/bottomSheetDraggableView/BottomSheetDraggableView.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetDraggableView/index.d.ts +2 -0
- package/lib/typescript/components/bottomSheetDraggableView/index.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetDraggableView/types.d.ts +9 -0
- package/lib/typescript/components/bottomSheetFooter/BottomSheetFooter.d.ts +6 -0
- package/lib/typescript/components/bottomSheetFooter/BottomSheetFooter.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetFooter/BottomSheetFooterContainer.d.ts +4 -0
- package/lib/typescript/components/bottomSheetFooter/BottomSheetFooterContainer.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetFooter/index.d.ts +4 -0
- package/lib/typescript/components/bottomSheetFooter/index.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetFooter/styles.d.ts +11 -0
- package/lib/typescript/components/bottomSheetFooter/styles.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetFooter/types.d.ts +41 -0
- package/lib/typescript/components/bottomSheetGestureHandlersProvider/BottomSheetGestureHandlersProvider.d.ts +5 -0
- package/lib/typescript/components/bottomSheetGestureHandlersProvider/BottomSheetGestureHandlersProvider.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetGestureHandlersProvider/index.d.ts +2 -0
- package/lib/typescript/components/bottomSheetGestureHandlersProvider/index.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetGestureHandlersProvider/types.d.ts +8 -0
- package/lib/typescript/components/bottomSheetHandle/BottomSheetHandle.d.ts +6 -0
- package/lib/typescript/components/bottomSheetHandle/BottomSheetHandle.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetHandle/BottomSheetHandleContainer.d.ts +6 -0
- package/lib/typescript/components/bottomSheetHandle/BottomSheetHandleContainer.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetHandle/constants.d.ts +6 -0
- package/lib/typescript/components/bottomSheetHandle/constants.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetHandle/index.d.ts +4 -0
- package/lib/typescript/components/bottomSheetHandle/index.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetHandle/styles.d.ts +17 -0
- package/lib/typescript/components/bottomSheetHandle/styles.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetHandle/types.d.ts +52 -0
- package/lib/typescript/components/bottomSheetHostingContainer/BottomSheetHostingContainer.d.ts +6 -0
- package/lib/typescript/components/bottomSheetHostingContainer/BottomSheetHostingContainer.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetHostingContainer/index.d.ts +3 -0
- package/lib/typescript/components/bottomSheetHostingContainer/index.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetHostingContainer/styles.d.ts +11 -0
- package/lib/typescript/components/bottomSheetHostingContainer/styles.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetHostingContainer/styles.web.d.ts +10 -0
- package/lib/typescript/components/bottomSheetHostingContainer/styles.web.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetHostingContainer/types.d.ts +17 -0
- package/lib/typescript/components/bottomSheetModal/BottomSheetModal.d.ts +10 -0
- package/lib/typescript/components/bottomSheetModal/BottomSheetModal.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetModal/constants.d.ts +4 -0
- package/lib/typescript/components/bottomSheetModal/constants.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetModal/index.d.ts +3 -0
- package/lib/typescript/components/bottomSheetModal/index.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetModal/types.d.ts +67 -0
- package/lib/typescript/components/bottomSheetModalProvider/BottomSheetModalProvider.d.ts +5 -0
- package/lib/typescript/components/bottomSheetModalProvider/BottomSheetModalProvider.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetModalProvider/index.d.ts +2 -0
- package/lib/typescript/components/bottomSheetModalProvider/index.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetModalProvider/types.d.ts +12 -0
- package/lib/typescript/components/bottomSheetRefreshControl/BottomSheetRefreshControl.android.d.ts +10 -0
- package/lib/typescript/components/bottomSheetRefreshControl/BottomSheetRefreshControl.android.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetRefreshControl/BottomSheetRefreshControl.d.ts +3 -0
- package/lib/typescript/components/bottomSheetRefreshControl/BottomSheetRefreshControl.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetRefreshControl/index.d.ts +9 -0
- package/lib/typescript/components/bottomSheetRefreshControl/index.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetScrollable/BottomSheetDraggableScrollable.d.ts +9 -0
- package/lib/typescript/components/bottomSheetScrollable/BottomSheetDraggableScrollable.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetScrollable/BottomSheetFlashList.d.ts +11 -0
- package/lib/typescript/components/bottomSheetScrollable/BottomSheetFlashList.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetScrollable/BottomSheetFlashList.web.d.ts +3 -0
- package/lib/typescript/components/bottomSheetScrollable/BottomSheetFlashList.web.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetScrollable/BottomSheetFlatList.d.ts +5 -0
- package/lib/typescript/components/bottomSheetScrollable/BottomSheetFlatList.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetScrollable/BottomSheetScrollView.d.ts +5 -0
- package/lib/typescript/components/bottomSheetScrollable/BottomSheetScrollView.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetScrollable/BottomSheetSectionList.d.ts +6 -0
- package/lib/typescript/components/bottomSheetScrollable/BottomSheetSectionList.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetScrollable/BottomSheetVirtualizedList.d.ts +5 -0
- package/lib/typescript/components/bottomSheetScrollable/BottomSheetVirtualizedList.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetScrollable/ScrollableContainer.android.d.ts +13 -0
- package/lib/typescript/components/bottomSheetScrollable/ScrollableContainer.android.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetScrollable/ScrollableContainer.d.ts +9 -0
- package/lib/typescript/components/bottomSheetScrollable/ScrollableContainer.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetScrollable/ScrollableContainer.web.d.ts +14 -0
- package/lib/typescript/components/bottomSheetScrollable/ScrollableContainer.web.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetScrollable/createBottomSheetScrollableComponent.d.ts +4 -0
- package/lib/typescript/components/bottomSheetScrollable/createBottomSheetScrollableComponent.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetScrollable/index.d.ts +8 -0
- package/lib/typescript/components/bottomSheetScrollable/index.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetScrollable/styles.d.ts +7 -0
- package/lib/typescript/components/bottomSheetScrollable/styles.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetScrollable/types.d.ts +280 -0
- package/lib/typescript/components/bottomSheetScrollable/useBottomSheetContentSizeSetter.d.ts +8 -0
- package/lib/typescript/components/bottomSheetScrollable/useBottomSheetContentSizeSetter.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetTextInput/BottomSheetTextInput.d.ts +6 -0
- package/lib/typescript/components/bottomSheetTextInput/BottomSheetTextInput.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetTextInput/index.d.ts +3 -0
- package/lib/typescript/components/bottomSheetTextInput/index.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetTextInput/types.d.ts +4 -0
- package/lib/typescript/components/bottomSheetTextInput/types.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetView/BottomSheetView.d.ts +6 -0
- package/lib/typescript/components/bottomSheetView/BottomSheetView.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetView/index.d.ts +2 -0
- package/lib/typescript/components/bottomSheetView/index.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetView/styles.d.ts +9 -0
- package/lib/typescript/components/bottomSheetView/styles.d.ts.map +1 -0
- package/lib/typescript/components/bottomSheetView/types.d.ts +24 -0
- package/lib/typescript/components/touchables/Touchables.d.ts +2 -0
- package/lib/typescript/components/touchables/Touchables.d.ts.map +1 -0
- package/lib/typescript/components/touchables/Touchables.ios.d.ts +2 -0
- package/lib/typescript/components/touchables/Touchables.ios.d.ts.map +1 -0
- package/lib/typescript/components/touchables/index.d.ts +8 -0
- package/lib/typescript/components/touchables/index.d.ts.map +1 -0
- package/lib/typescript/constants.d.ts +96 -0
- package/lib/typescript/constants.d.ts.map +1 -0
- package/lib/typescript/contexts/external.d.ts +4 -0
- package/lib/typescript/contexts/external.d.ts.map +1 -0
- package/lib/typescript/contexts/gesture.d.ts +9 -0
- package/lib/typescript/contexts/gesture.d.ts.map +1 -0
- package/lib/typescript/contexts/index.d.ts +7 -0
- package/lib/typescript/contexts/index.d.ts.map +1 -0
- package/lib/typescript/contexts/internal.d.ts +29 -0
- package/lib/typescript/contexts/internal.d.ts.map +1 -0
- package/lib/typescript/contexts/modal/external.d.ts +7 -0
- package/lib/typescript/contexts/modal/external.d.ts.map +1 -0
- package/lib/typescript/contexts/modal/internal.d.ts +14 -0
- package/lib/typescript/contexts/modal/internal.d.ts.map +1 -0
- package/lib/typescript/hooks/index.d.ts +19 -0
- package/lib/typescript/hooks/index.d.ts.map +1 -0
- package/lib/typescript/hooks/useAnimatedDetents.d.ts +20 -0
- package/lib/typescript/hooks/useAnimatedDetents.d.ts.map +1 -0
- package/lib/typescript/hooks/useAnimatedKeyboard.d.ts +6 -0
- package/lib/typescript/hooks/useAnimatedKeyboard.d.ts.map +1 -0
- package/lib/typescript/hooks/useAnimatedLayout.d.ts +26 -0
- package/lib/typescript/hooks/useAnimatedLayout.d.ts.map +1 -0
- package/lib/typescript/hooks/useBottomSheet.d.ts +2 -0
- package/lib/typescript/hooks/useBottomSheet.d.ts.map +1 -0
- package/lib/typescript/hooks/useBottomSheetContentContainerStyle.d.ts +3 -0
- package/lib/typescript/hooks/useBottomSheetContentContainerStyle.d.ts.map +1 -0
- package/lib/typescript/hooks/useBottomSheetGestureHandlers.d.ts +2 -0
- package/lib/typescript/hooks/useBottomSheetGestureHandlers.d.ts.map +1 -0
- package/lib/typescript/hooks/useBottomSheetInternal.d.ts +4 -0
- package/lib/typescript/hooks/useBottomSheetInternal.d.ts.map +1 -0
- package/lib/typescript/hooks/useBottomSheetModal.d.ts +2 -0
- package/lib/typescript/hooks/useBottomSheetModal.d.ts.map +1 -0
- package/lib/typescript/hooks/useBottomSheetModalInternal.d.ts +4 -0
- package/lib/typescript/hooks/useBottomSheetModalInternal.d.ts.map +1 -0
- package/lib/typescript/hooks/useBottomSheetScrollableCreator.d.ts +29 -0
- package/lib/typescript/hooks/useBottomSheetScrollableCreator.d.ts.map +1 -0
- package/lib/typescript/hooks/useBottomSheetSpringConfigs.d.ts +7 -0
- package/lib/typescript/hooks/useBottomSheetSpringConfigs.d.ts.map +1 -0
- package/lib/typescript/hooks/useBottomSheetTimingConfigs.d.ts +21 -0
- package/lib/typescript/hooks/useBottomSheetTimingConfigs.d.ts.map +1 -0
- package/lib/typescript/hooks/useBoundingClientRect.d.ts +42 -0
- package/lib/typescript/hooks/useBoundingClientRect.d.ts.map +1 -0
- package/lib/typescript/hooks/useGestureEventsHandlersDefault.d.ts +3 -0
- package/lib/typescript/hooks/useGestureEventsHandlersDefault.d.ts.map +1 -0
- package/lib/typescript/hooks/useGestureEventsHandlersDefault.web.d.ts +8 -0
- package/lib/typescript/hooks/useGestureEventsHandlersDefault.web.d.ts.map +1 -0
- package/lib/typescript/hooks/useGestureHandler.d.ts +3 -0
- package/lib/typescript/hooks/useGestureHandler.d.ts.map +1 -0
- package/lib/typescript/hooks/usePropsValidator.d.ts +7 -0
- package/lib/typescript/hooks/usePropsValidator.d.ts.map +1 -0
- package/lib/typescript/hooks/useReactiveSharedValue.d.ts +4 -0
- package/lib/typescript/hooks/useReactiveSharedValue.d.ts.map +1 -0
- package/lib/typescript/hooks/useScrollEventsHandlersDefault.d.ts +7 -0
- package/lib/typescript/hooks/useScrollEventsHandlersDefault.d.ts.map +1 -0
- package/lib/typescript/hooks/useScrollHandler.d.ts +7 -0
- package/lib/typescript/hooks/useScrollHandler.d.ts.map +1 -0
- package/lib/typescript/hooks/useScrollHandler.web.d.ts +11 -0
- package/lib/typescript/hooks/useScrollHandler.web.d.ts.map +1 -0
- package/lib/typescript/hooks/useScrollable.d.ts +11 -0
- package/lib/typescript/hooks/useScrollable.d.ts.map +1 -0
- package/lib/typescript/hooks/useScrollableSetter.d.ts +6 -0
- package/lib/typescript/hooks/useScrollableSetter.d.ts.map +1 -0
- package/lib/typescript/hooks/useStableCallback.d.ts +7 -0
- package/lib/typescript/hooks/useStableCallback.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +35 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/types.d.ts +336 -0
- package/lib/typescript/utilities/animate.d.ts +11 -0
- package/lib/typescript/utilities/animate.d.ts.map +1 -0
- package/lib/typescript/utilities/clamp.d.ts +2 -0
- package/lib/typescript/utilities/clamp.d.ts.map +1 -0
- package/lib/typescript/utilities/easingExp.d.ts +8 -0
- package/lib/typescript/utilities/easingExp.d.ts.map +1 -0
- package/lib/typescript/utilities/findNodeHandle.d.ts +2 -0
- package/lib/typescript/utilities/findNodeHandle.d.ts.map +1 -0
- package/lib/typescript/utilities/findNodeHandle.web.d.ts +3 -0
- package/lib/typescript/utilities/findNodeHandle.web.d.ts.map +1 -0
- package/lib/typescript/utilities/getKeyboardAnimationConfigs.d.ts +21 -0
- package/lib/typescript/utilities/getKeyboardAnimationConfigs.d.ts.map +1 -0
- package/lib/typescript/utilities/getRefNativeTag.web.d.ts +3 -0
- package/lib/typescript/utilities/getRefNativeTag.web.d.ts.map +1 -0
- package/lib/typescript/utilities/id.d.ts +2 -0
- package/lib/typescript/utilities/id.d.ts.map +1 -0
- package/lib/typescript/utilities/index.d.ts +8 -0
- package/lib/typescript/utilities/index.d.ts.map +1 -0
- package/lib/typescript/utilities/isFabricInstalled.d.ts +7 -0
- package/lib/typescript/utilities/isFabricInstalled.d.ts.map +1 -0
- package/lib/typescript/utilities/logger.d.ts +11 -0
- package/lib/typescript/utilities/logger.d.ts.map +1 -0
- package/lib/typescript/utilities/noop.d.ts +4 -0
- package/lib/typescript/utilities/noop.d.ts.map +1 -0
- package/lib/typescript/utilities/normalizeSnapPoint.d.ts +5 -0
- package/lib/typescript/utilities/normalizeSnapPoint.d.ts.map +1 -0
- package/lib/typescript/utilities/snapPoint.d.ts +2 -0
- package/lib/typescript/utilities/snapPoint.d.ts.map +1 -0
- package/lib/typescript/utilities/validateSnapPoint.d.ts +2 -0
- package/lib/typescript/utilities/validateSnapPoint.d.ts.map +1 -0
- package/package.json +1 -5
- package/src/components/bottomSheet/BottomSheet.tsx +22 -5
- package/src/components/bottomSheet/BottomSheetContent.tsx +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_constants","_clamp","_snapPoint","_useBottomSheetInternal","INITIAL_CONTEXT","initialPosition","initialKeyboardStatus","KEYBOARD_STATUS","UNDETERMINED","isScrollablePositionLocked","dismissKeyboard","Keyboard","dismiss","resetContext","context","Object","keys","map","key","undefined","useGestureEventsHandlersDefault","animatedPosition","animatedDetentsState","animatedKeyboardState","animatedScrollableState","animatedLayoutState","enableOverDrag","enablePanDownToClose","overDragResistanceFactor","isInTemporaryPosition","enableBlurKeyboardOnGesture","animateToPosition","stopAnimation","useBottomSheetInternal","useSharedValue","handleOnStart","useCallback","__","_","get","status","SHOWN","HIDDEN","runOnJS","value","contentOffsetY","handleOnChange","source","translationY","highestDetentPosition","detents","length","highestSnapPoint","containerHeight","lowestSnapPoint","GESTURE_SOURCE","CONTENT","refreshable","negativeScrollableContentOffset","draggedPosition","accumulatedDraggedPosition","clampedPosition","clamp","HANDLE","type","SCROLLABLE_TYPE","VIEW","resistedPosition","Math","sqrt","handleOnEnd","absoluteY","velocityY","closedDetentPosition","isSheetAtHighestSnapPoint","scrollableIsRefreshable","scrollableContentOffsetY","scrollableType","ANIMATION_SOURCE","GESTURE","isScrollable","Platform","OS","WINDOW_HEIGHT","heightWithinContainer","snapPoints","slice","unshift","destinationPoint","snapPoint","wasGestureHandledByScrollView","handleOnFinalize","exports"],"sourceRoot":"../../../src","sources":["hooks/useGestureEventsHandl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,EACxBP,SAAS,GAAG,CACd,CAAC;EACH,CAAC,EACD,CACE7C,oBAAoB,EACpBE,qBAAqB,EACrBL,uBAAuB,EACvBF,oBAAoB,EACpBC,qBAAqB,EACrBF,gBAAgB,EAChBU,iBAAiB,EACjBjB,OAAO,CAEX,CAAC;EACD,MAAM6E,gBAAiD,GAAG,IAAAvD,kBAAW,EACnE,SAASuD,gBAAgBA,CAAA,EAAG;IAC1B,SAAS;;IACT9E,YAAY,CAACC,OAAO,CAAC;EACvB,CAAC,EACD,CAACA,OAAO,CACV,CAAC;EACD;;EAEA,OAAO;IACLqB,aAAa;IACbW,cAAc;IACdwB,WAAW;IACXqB;EACF,CAAC;AACH,CAAC;AAACC,OAAA,CAAAxE,+BAAA,GAAAA,+BAAA","ignoreList":[]}
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useGestureEventsHandlersDefault = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _reactNativeReanimated = require("react-native-reanimated");
|
|
10
|
+
var _constants = require("../constants");
|
|
11
|
+
var _clamp = require("../utilities/clamp");
|
|
12
|
+
var _snapPoint = require("../utilities/snapPoint");
|
|
13
|
+
var _useBottomSheetInternal = require("./useBottomSheetInternal");
|
|
14
|
+
const INITIAL_CONTEXT = {
|
|
15
|
+
initialPosition: 0,
|
|
16
|
+
initialTranslationY: 0,
|
|
17
|
+
initialKeyboardStatus: _constants.KEYBOARD_STATUS.UNDETERMINED,
|
|
18
|
+
isScrollablePositionLocked: false
|
|
19
|
+
};
|
|
20
|
+
const dismissKeyboardOnJs = (0, _reactNativeReanimated.runOnJS)(_reactNative.Keyboard.dismiss);
|
|
21
|
+
|
|
22
|
+
// biome-ignore lint: to be addressed!
|
|
23
|
+
const resetContext = context => {
|
|
24
|
+
'worklet';
|
|
25
|
+
|
|
26
|
+
Object.keys(context).map(key => {
|
|
27
|
+
context[key] = undefined;
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
const useGestureEventsHandlersDefault = () => {
|
|
31
|
+
//#region variables
|
|
32
|
+
const {
|
|
33
|
+
animatedPosition,
|
|
34
|
+
animatedDetentsState,
|
|
35
|
+
animatedKeyboardState,
|
|
36
|
+
animatedLayoutState,
|
|
37
|
+
animatedScrollableState,
|
|
38
|
+
enableOverDrag,
|
|
39
|
+
enablePanDownToClose,
|
|
40
|
+
overDragResistanceFactor,
|
|
41
|
+
isInTemporaryPosition,
|
|
42
|
+
animateToPosition,
|
|
43
|
+
stopAnimation
|
|
44
|
+
} = (0, _useBottomSheetInternal.useBottomSheetInternal)();
|
|
45
|
+
const context = (0, _reactNativeReanimated.useSharedValue)({
|
|
46
|
+
...INITIAL_CONTEXT
|
|
47
|
+
});
|
|
48
|
+
//#endregion
|
|
49
|
+
|
|
50
|
+
//#region gesture methods
|
|
51
|
+
const handleOnStart = (0, _react.useCallback)(function handleOnStart(__, {
|
|
52
|
+
translationY
|
|
53
|
+
}) {
|
|
54
|
+
'worklet';
|
|
55
|
+
|
|
56
|
+
// cancel current animation
|
|
57
|
+
stopAnimation();
|
|
58
|
+
|
|
59
|
+
// store current animated position
|
|
60
|
+
context.value = {
|
|
61
|
+
...context.value,
|
|
62
|
+
initialPosition: animatedPosition.value,
|
|
63
|
+
initialKeyboardStatus: animatedKeyboardState.get().status,
|
|
64
|
+
initialTranslationY: translationY
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* if the scrollable content is scrolled, then
|
|
69
|
+
* we lock the position.
|
|
70
|
+
*/
|
|
71
|
+
if (animatedScrollableState.get().contentOffsetY > 0) {
|
|
72
|
+
context.value.isScrollablePositionLocked = true;
|
|
73
|
+
}
|
|
74
|
+
}, [stopAnimation, context, animatedPosition, animatedKeyboardState, animatedScrollableState]);
|
|
75
|
+
const handleOnChange = (0, _react.useCallback)(function handleOnChange(source, {
|
|
76
|
+
translationY
|
|
77
|
+
}) {
|
|
78
|
+
'worklet';
|
|
79
|
+
|
|
80
|
+
const {
|
|
81
|
+
highestDetentPosition,
|
|
82
|
+
detents
|
|
83
|
+
} = animatedDetentsState.get();
|
|
84
|
+
if (highestDetentPosition === undefined || detents === undefined) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
let highestSnapPoint = highestDetentPosition;
|
|
88
|
+
translationY = translationY - context.value.initialTranslationY;
|
|
89
|
+
/**
|
|
90
|
+
* if keyboard is shown, then we set the highest point to the current
|
|
91
|
+
* position which includes the keyboard height.
|
|
92
|
+
*/
|
|
93
|
+
if (isInTemporaryPosition.value && context.value.initialKeyboardStatus === _constants.KEYBOARD_STATUS.SHOWN) {
|
|
94
|
+
highestSnapPoint = context.value.initialPosition;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* if current position is out of provided `snapPoints` and smaller then
|
|
99
|
+
* highest snap pont, then we set the highest point to the current position.
|
|
100
|
+
*/
|
|
101
|
+
if (isInTemporaryPosition.value && context.value.initialPosition < highestSnapPoint) {
|
|
102
|
+
highestSnapPoint = context.value.initialPosition;
|
|
103
|
+
}
|
|
104
|
+
const {
|
|
105
|
+
containerHeight
|
|
106
|
+
} = animatedLayoutState.get();
|
|
107
|
+
const lowestSnapPoint = enablePanDownToClose ? containerHeight : detents[0];
|
|
108
|
+
const {
|
|
109
|
+
refreshable: scrollableIsRefreshable,
|
|
110
|
+
contentOffsetY: scrollableContentOffsetY,
|
|
111
|
+
type: scrollableType
|
|
112
|
+
} = animatedScrollableState.get();
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* if scrollable is refreshable and sheet position at the highest
|
|
116
|
+
* point, then do not interact with current gesture.
|
|
117
|
+
*/
|
|
118
|
+
if (source === _constants.GESTURE_SOURCE.CONTENT && scrollableIsRefreshable && animatedPosition.value === highestSnapPoint) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* a negative scrollable content offset to be subtracted from accumulated
|
|
124
|
+
* current position and gesture translation Y to allow user to drag the sheet,
|
|
125
|
+
* when scrollable position at the top.
|
|
126
|
+
* a negative scrollable content offset when the scrollable is not locked.
|
|
127
|
+
*/
|
|
128
|
+
const negativeScrollableContentOffset = context.value.initialPosition === highestSnapPoint && source === _constants.GESTURE_SOURCE.CONTENT || !context.value.isScrollablePositionLocked ? scrollableContentOffsetY * -1 : 0;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* an accumulated value of starting position with gesture translation y.
|
|
132
|
+
*/
|
|
133
|
+
const draggedPosition = context.value.initialPosition + translationY;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* an accumulated value of dragged position and negative scrollable content offset,
|
|
137
|
+
* this will insure locking sheet position when user is scrolling the scrollable until,
|
|
138
|
+
* they reach to the top of the scrollable.
|
|
139
|
+
*/
|
|
140
|
+
const accumulatedDraggedPosition = draggedPosition + negativeScrollableContentOffset;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* a clamped value of the accumulated dragged position, to insure keeping the dragged
|
|
144
|
+
* position between the highest and lowest snap points.
|
|
145
|
+
*/
|
|
146
|
+
const clampedPosition = (0, _clamp.clamp)(accumulatedDraggedPosition, highestSnapPoint, lowestSnapPoint);
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* if scrollable position is locked and the animated position
|
|
150
|
+
* reaches the highest point, then we unlock the scrollable position.
|
|
151
|
+
*/
|
|
152
|
+
if (context.value.isScrollablePositionLocked && source === _constants.GESTURE_SOURCE.CONTENT && animatedPosition.value === highestSnapPoint) {
|
|
153
|
+
context.value.isScrollablePositionLocked = false;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* over-drag implementation.
|
|
158
|
+
*/
|
|
159
|
+
if (enableOverDrag) {
|
|
160
|
+
if ((source === _constants.GESTURE_SOURCE.HANDLE || scrollableType === _constants.SCROLLABLE_TYPE.VIEW) && draggedPosition < highestSnapPoint) {
|
|
161
|
+
const resistedPosition = highestSnapPoint - Math.sqrt(1 + (highestSnapPoint - draggedPosition)) * overDragResistanceFactor;
|
|
162
|
+
animatedPosition.value = resistedPosition;
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
if (source === _constants.GESTURE_SOURCE.HANDLE && draggedPosition > lowestSnapPoint) {
|
|
166
|
+
const resistedPosition = lowestSnapPoint + Math.sqrt(1 + (draggedPosition - lowestSnapPoint)) * overDragResistanceFactor;
|
|
167
|
+
animatedPosition.value = resistedPosition;
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
if (source === _constants.GESTURE_SOURCE.CONTENT && draggedPosition + negativeScrollableContentOffset > lowestSnapPoint) {
|
|
171
|
+
const resistedPosition = lowestSnapPoint + Math.sqrt(1 + (draggedPosition + negativeScrollableContentOffset - lowestSnapPoint)) * overDragResistanceFactor;
|
|
172
|
+
animatedPosition.value = resistedPosition;
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
animatedPosition.value = clampedPosition;
|
|
177
|
+
}, [context, enableOverDrag, enablePanDownToClose, overDragResistanceFactor, isInTemporaryPosition, animatedDetentsState, animatedLayoutState, animatedPosition, animatedScrollableState]);
|
|
178
|
+
const handleOnEnd = (0, _react.useCallback)(function handleOnEnd(source, {
|
|
179
|
+
translationY,
|
|
180
|
+
absoluteY,
|
|
181
|
+
velocityY
|
|
182
|
+
}) {
|
|
183
|
+
'worklet';
|
|
184
|
+
|
|
185
|
+
const {
|
|
186
|
+
highestDetentPosition,
|
|
187
|
+
detents,
|
|
188
|
+
closedDetentPosition
|
|
189
|
+
} = animatedDetentsState.get();
|
|
190
|
+
if (highestDetentPosition === undefined || detents === undefined || closedDetentPosition === undefined) {
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
const highestSnapPoint = highestDetentPosition;
|
|
194
|
+
const isSheetAtHighestSnapPoint = animatedPosition.value === highestSnapPoint;
|
|
195
|
+
const {
|
|
196
|
+
refreshable: scrollableIsRefreshable,
|
|
197
|
+
contentOffsetY: scrollableContentOffsetY,
|
|
198
|
+
type: scrollableType
|
|
199
|
+
} = animatedScrollableState.get();
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* if scrollable is refreshable and sheet position at the highest
|
|
203
|
+
* point, then do not interact with current gesture.
|
|
204
|
+
*/
|
|
205
|
+
if (source === _constants.GESTURE_SOURCE.CONTENT && scrollableIsRefreshable && isSheetAtHighestSnapPoint) {
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* if the sheet is in a temporary position and the gesture ended above
|
|
211
|
+
* the current position, then we snap back to the temporary position.
|
|
212
|
+
*/
|
|
213
|
+
if (isInTemporaryPosition.value && context.value.initialPosition >= animatedPosition.value) {
|
|
214
|
+
if (context.value.initialPosition > animatedPosition.value) {
|
|
215
|
+
animateToPosition(context.value.initialPosition, _constants.ANIMATION_SOURCE.GESTURE, velocityY / 2);
|
|
216
|
+
}
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* close keyboard if current position is below the recorded
|
|
222
|
+
* start position and keyboard still shown.
|
|
223
|
+
*/
|
|
224
|
+
const isScrollable = scrollableType !== _constants.SCROLLABLE_TYPE.UNDETERMINED && scrollableType !== _constants.SCROLLABLE_TYPE.VIEW;
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* if keyboard is shown and the sheet is dragged down,
|
|
228
|
+
* then we dismiss the keyboard.
|
|
229
|
+
*/
|
|
230
|
+
if (context.value.initialKeyboardStatus === _constants.KEYBOARD_STATUS.SHOWN && animatedPosition.value > context.value.initialPosition) {
|
|
231
|
+
/**
|
|
232
|
+
* if the platform is ios, current content is scrollable and
|
|
233
|
+
* the end touch point is below the keyboard position then
|
|
234
|
+
* we exit the method.
|
|
235
|
+
*
|
|
236
|
+
* because the the keyboard dismiss is interactive in iOS.
|
|
237
|
+
*/
|
|
238
|
+
if (!(_reactNative.Platform.OS === 'ios' && isScrollable && absoluteY > _constants.WINDOW_HEIGHT - animatedKeyboardState.get().heightWithinContainer)) {
|
|
239
|
+
dismissKeyboardOnJs();
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* reset isInTemporaryPosition value
|
|
245
|
+
*/
|
|
246
|
+
if (isInTemporaryPosition.value) {
|
|
247
|
+
isInTemporaryPosition.value = false;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* clone snap points array, and insert the container height
|
|
252
|
+
* if pan down to close is enabled.
|
|
253
|
+
*/
|
|
254
|
+
const snapPoints = detents.slice();
|
|
255
|
+
if (enablePanDownToClose) {
|
|
256
|
+
snapPoints.unshift(closedDetentPosition);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* calculate the destination point, using redash.
|
|
261
|
+
*/
|
|
262
|
+
const destinationPoint = (0, _snapPoint.snapPoint)(translationY + context.value.initialPosition, velocityY, snapPoints);
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* if destination point is the same as the current position,
|
|
266
|
+
* then no need to perform animation.
|
|
267
|
+
*/
|
|
268
|
+
if (destinationPoint === animatedPosition.value) {
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
271
|
+
const wasGestureHandledByScrollView = source === _constants.GESTURE_SOURCE.CONTENT && scrollableContentOffsetY > 0;
|
|
272
|
+
/**
|
|
273
|
+
* prevents snapping from top to middle / bottom with repeated interrupted scrolls
|
|
274
|
+
*/
|
|
275
|
+
if (wasGestureHandledByScrollView && isSheetAtHighestSnapPoint) {
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
animateToPosition(destinationPoint, _constants.ANIMATION_SOURCE.GESTURE, velocityY / 2);
|
|
279
|
+
}, [enablePanDownToClose, isInTemporaryPosition, animatedScrollableState, animatedDetentsState, animatedKeyboardState, animatedPosition, animateToPosition, context]);
|
|
280
|
+
const handleOnFinalize = (0, _react.useCallback)(function handleOnFinalize() {
|
|
281
|
+
'worklet';
|
|
282
|
+
|
|
283
|
+
resetContext(context);
|
|
284
|
+
}, [context]);
|
|
285
|
+
//#endregion
|
|
286
|
+
|
|
287
|
+
return {
|
|
288
|
+
handleOnStart,
|
|
289
|
+
handleOnChange,
|
|
290
|
+
handleOnEnd,
|
|
291
|
+
handleOnFinalize
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
exports.useGestureEventsHandlersDefault = useGestureEventsHandlersDefault;
|
|
295
|
+
//# sourceMappingURL=useGestureEventsHandlersDefault.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_constants","_clamp","_snapPoint","_useBottomSheetInternal","INITIAL_CONTEXT","initialPosition","initialTranslationY","initialKeyboardStatus","KEYBOARD_STATUS","UNDETERMINED","isScrollablePositionLocked","dismissKeyboardOnJs","runOnJS","Keyboard","dismiss","resetContext","context","Object","keys","map","key","undefined","useGestureEventsHandlersDefault","animatedPosition","animatedDetentsState","animatedKeyboardState","animatedLayoutState","animatedScrollableState","enableOverDrag","enablePanDownToClose","overDragResistanceFactor","isInTemporaryPosition","animateToPosition","stopAnimation","useBottomSheetInternal","useSharedValue","handleOnStart","useCallback","__","translationY","value","get","status","contentOffsetY","handleOnChange","source","highestDetentPosition","detents","highestSnapPoint","SHOWN","containerHeight","lowestSnapPoint","refreshable","scrollableIsRefreshable","scrollableContentOffsetY","type","scrollableType","GESTURE_SOURCE","CONTENT","negativeScrollableContentOffset","draggedPosition","accumulatedDraggedPosition","clampedPosition","clamp","HANDLE","SCROLLABLE_TYPE","VIEW","resistedPosition","Math","sqrt","handleOnEnd","absoluteY","velocityY","closedDetentPosition","isSheetAtHighestSnapPoint","ANIMATION_SOURCE","GESTURE","isScrollable","Platform","OS","WINDOW_HEIGHT","heightWithinContainer","snapPoints","slice","unshift","destinationPoint","snapPoint","wasGestureHandledByScrollView","handleOnFinalize","exports"],"sourceRoot":"../../../src","sources":["hooks/useGestureEventsHandlersDefault.web.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AAQA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AACA,IAAAM,uBAAA,GAAAN,OAAA;AASA,MAAMO,eAAwC,GAAG;EAC/CC,eAAe,EAAE,CAAC;EAClBC,mBAAmB,EAAE,CAAC;EACtBC,qBAAqB,EAAEC,0BAAe,CAACC,YAAY;EACnDC,0BAA0B,EAAE;AAC9B,CAAC;AAED,MAAMC,mBAAmB,GAAG,IAAAC,8BAAO,EAACC,qBAAQ,CAACC,OAAO,CAAC;;AAErD;AACA,MAAMC,YAAY,GAAIC,OAAY,IAAK;EACrC,SAAS;;EACTC,MAAM,CAACC,IAAI,CAACF,OAAO,CAAC,CAACG,GAAG,CAACC,GAAG,IAAI;IAC9BJ,OAAO,CAACI,GAAG,CAAC,GAAGC,SAAS;EAC1B,CAAC,CAAC;AACJ,CAAC;AAEM,MAAMC,+BAA+B,GAAGA,CAAA,KAAM;EACnD;EACA,MAAM;IACJC,gBAAgB;IAChBC,oBAAoB;IACpBC,qBAAqB;IACrBC,mBAAmB;IACnBC,uBAAuB;IACvBC,cAAc;IACdC,oBAAoB;IACpBC,wBAAwB;IACxBC,qBAAqB;IACrBC,iBAAiB;IACjBC;EACF,CAAC,GAAG,IAAAC,8CAAsB,EAAC,CAAC;EAE5B,MAAMlB,OAAO,GAAG,IAAAmB,qCAAc,EAA0B;IACtD,GAAG/B;EACL,CAAC,CAAC;EACF;;EAEA;EACA,MAAMgC,aAA8C,GAAG,IAAAC,kBAAW,EAChE,SAAS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EAChBS,iBAAiB,EACjBhB,OAAO,CAEX,CAAC;EACD,MAAMwE,gBAAiD,GAAG,IAAAnD,kBAAW,EACnE,SAASmD,gBAAgBA,CAAA,EAAG;IAC1B,SAAS;;IACTzE,YAAY,CAACC,OAAO,CAAC;EACvB,CAAC,EACD,CAACA,OAAO,CACV,CAAC;EACD;;EAEA,OAAO;IACLoB,aAAa;IACbQ,cAAc;IACd0B,WAAW;IACXkB;EACF,CAAC;AACH,CAAC;AAACC,OAAA,CAAAnE,+BAAA,GAAAA,+BAAA","ignoreList":[]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useGestureHandler = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNativeGestureHandler = require("react-native-gesture-handler");
|
|
9
|
+
var _constants = require("../constants");
|
|
10
|
+
const useGestureHandler = (source, state, gestureSource, onStart, onChange, onEnd, onFinalize) => {
|
|
11
|
+
const handleOnStart = (0, _react.useCallback)(event => {
|
|
12
|
+
'worklet';
|
|
13
|
+
|
|
14
|
+
state.value = _reactNativeGestureHandler.State.BEGAN;
|
|
15
|
+
gestureSource.value = source;
|
|
16
|
+
onStart(source, event);
|
|
17
|
+
return;
|
|
18
|
+
}, [state, gestureSource, source, onStart]);
|
|
19
|
+
const handleOnChange = (0, _react.useCallback)(event => {
|
|
20
|
+
'worklet';
|
|
21
|
+
|
|
22
|
+
if (gestureSource.value !== source) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
state.value = event.state;
|
|
26
|
+
onChange(source, event);
|
|
27
|
+
}, [state, gestureSource, source, onChange]);
|
|
28
|
+
const handleOnEnd = (0, _react.useCallback)(event => {
|
|
29
|
+
'worklet';
|
|
30
|
+
|
|
31
|
+
if (gestureSource.value !== source) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
state.value = event.state;
|
|
35
|
+
gestureSource.value = _constants.GESTURE_SOURCE.UNDETERMINED;
|
|
36
|
+
onEnd(source, event);
|
|
37
|
+
}, [state, gestureSource, source, onEnd]);
|
|
38
|
+
const handleOnFinalize = (0, _react.useCallback)(event => {
|
|
39
|
+
'worklet';
|
|
40
|
+
|
|
41
|
+
if (gestureSource.value !== source) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
state.value = event.state;
|
|
45
|
+
gestureSource.value = _constants.GESTURE_SOURCE.UNDETERMINED;
|
|
46
|
+
onFinalize(source, event);
|
|
47
|
+
}, [state, gestureSource, source, onFinalize]);
|
|
48
|
+
return {
|
|
49
|
+
handleOnStart,
|
|
50
|
+
handleOnChange,
|
|
51
|
+
handleOnEnd,
|
|
52
|
+
handleOnFinalize
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
exports.useGestureHandler = useGestureHandler;
|
|
56
|
+
//# sourceMappingURL=useGestureHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNativeGestureHandler","_constants","useGestureHandler","source","state","gestureSource","onStart","onChange","onEnd","onFinalize","handleOnStart","useCallback","event","value","State","BEGAN","handleOnChange","handleOnEnd","GESTURE_SOURCE","UNDETERMINED","handleOnFinalize","exports"],"sourceRoot":"../../../src","sources":["hooks/useGestureHandler.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,0BAAA,GAAAD,OAAA;AAQA,IAAAE,UAAA,GAAAF,OAAA;AAMO,MAAMG,iBAA0C,GAAGA,CACxDC,MAAsB,EACtBC,KAAyB,EACzBC,aAA0C,EAC1CC,OAAwC,EACxCC,QAAyC,EACzCC,KAAsC,EACtCC,UAA2C,KACxC;EACH,MAAMC,aAAa,GAAG,IAAAC,kBAAW,EAC9BC,KAA6D,IAAK;IACjE,SAAS;;IACTR,KAAK,CAACS,KAAK,GAAGC,gCAAK,CAACC,KAAK;IACzB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,cAAc;IACdC,WAAW;IACXG;EACF,CAAC;AACH,CAAC;AAACC,OAAA,CAAAnB,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.usePropsValidator = void 0;
|
|
7
|
+
var _invariant = _interopRequireDefault(require("invariant"));
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
var _constants = require("../components/bottomSheet/constants");
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
/**
|
|
12
|
+
* @todo
|
|
13
|
+
* replace this with `prop-types`.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
const usePropsValidator = ({
|
|
17
|
+
index,
|
|
18
|
+
snapPoints,
|
|
19
|
+
enableDynamicSizing,
|
|
20
|
+
topInset,
|
|
21
|
+
bottomInset,
|
|
22
|
+
containerHeight,
|
|
23
|
+
containerOffset
|
|
24
|
+
}) => {
|
|
25
|
+
(0, _react.useMemo)(() => {
|
|
26
|
+
//#region snap points
|
|
27
|
+
const _snapPoints = snapPoints ? 'get' in snapPoints ? snapPoints.get() : snapPoints : [];
|
|
28
|
+
(0, _invariant.default)(_snapPoints || enableDynamicSizing, `'snapPoints' was not provided! please provide at least one snap point.`);
|
|
29
|
+
_snapPoints.map(snapPoint => {
|
|
30
|
+
const _snapPoint = typeof snapPoint === 'number' ? snapPoint : Number.parseInt(snapPoint.replace('%', ''), 10);
|
|
31
|
+
(0, _invariant.default)(_snapPoint > 0 || _snapPoint === _constants.INITIAL_SNAP_POINT, `Snap point '${snapPoint}' is invalid. if you want to allow user to close the sheet, Please use 'enablePanDownToClose' prop.`);
|
|
32
|
+
});
|
|
33
|
+
(0, _invariant.default)('value' in _snapPoints || _snapPoints.length > 0 || enableDynamicSizing, `'snapPoints' was provided with no points! please provide at least one snap point.`);
|
|
34
|
+
//#endregion
|
|
35
|
+
|
|
36
|
+
//#region index
|
|
37
|
+
(0, _invariant.default)(typeof index === 'number' || typeof index === 'undefined', `'index' was provided but with wrong type ! expected type is a number.`);
|
|
38
|
+
(0, _invariant.default)(enableDynamicSizing || (typeof index === 'number' ? index >= -1 && index <= _snapPoints.length - 1 : true), `'index' was provided but out of the provided snap points range! expected value to be between -1, ${_snapPoints.length - 1}`);
|
|
39
|
+
//#endregion
|
|
40
|
+
|
|
41
|
+
//#region insets
|
|
42
|
+
(0, _invariant.default)(typeof topInset === 'number' || typeof topInset === 'undefined', `'topInset' was provided but with wrong type ! expected type is a number.`);
|
|
43
|
+
(0, _invariant.default)(typeof bottomInset === 'number' || typeof bottomInset === 'undefined', `'bottomInset' was provided but with wrong type ! expected type is a number.`);
|
|
44
|
+
//#endregion
|
|
45
|
+
|
|
46
|
+
//#region container height and offset
|
|
47
|
+
(0, _invariant.default)(containerHeight === undefined, `'containerHeight' is deprecated, please use 'containerLayoutState'.`);
|
|
48
|
+
(0, _invariant.default)(containerOffset === undefined, `'containerHeight' is deprecated, please use 'containerLayoutState'.`);
|
|
49
|
+
|
|
50
|
+
// animations
|
|
51
|
+
}, [index, snapPoints, topInset, bottomInset, enableDynamicSizing, containerHeight, containerOffset]);
|
|
52
|
+
};
|
|
53
|
+
exports.usePropsValidator = usePropsValidator;
|
|
54
|
+
//# sourceMappingURL=usePropsValidator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_invariant","_interopRequireDefault","require","_react","_constants","e","__esModule","default","usePropsValidator","index","snapPoints","enableDynamicSizing","topInset","bottomInset","containerHeight","containerOffset","useMemo","_snapPoints","get","invariant","map","snapPoint","_snapPoint","Number","parseInt","replace","INITIAL_SNAP_POINT","length","undefined","exports"],"sourceRoot":"../../../src","sources":["hooks/usePropsValidator.ts"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC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ACU,MAAM,GAAG,CAAC,GAC9C,IAAI,CAAC,EACX,oGACEV,WAAW,CAACU,MAAM,GAAG,CAAC,EAE1B,CAAC;IACD;;IAEA;IACA,IAAAR,kBAAS,EACP,OAAOP,QAAQ,KAAK,QAAQ,IAAI,OAAOA,QAAQ,KAAK,WAAW,EAC/D,0EACF,CAAC;IACD,IAAAO,kBAAS,EACP,OAAON,WAAW,KAAK,QAAQ,IAAI,OAAOA,WAAW,KAAK,WAAW,EACrE,6EACF,CAAC;IACD;;IAEA;IACA,IAAAM,kBAAS,EACPL,eAAe,KAAKc,SAAS,EAC7B,qEACF,CAAC;IAED,IAAAT,kBAAS,EACPJ,eAAe,KAAKa,SAAS,EAC7B,qEACF,CAAC;;IAED;EACF,CAAC,EAAE,CACDnB,KAAK,EACLC,UAAU,EACVE,QAAQ,EACRC,WAAW,EACXF,mBAAmB,EACnBG,eAAe,EACfC,eAAe,CAChB,CAAC;AACJ,CAAC;AAACc,OAAA,CAAArB,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useReactiveSharedValue = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNativeReanimated = require("react-native-reanimated");
|
|
9
|
+
const useReactiveSharedValue = value => {
|
|
10
|
+
const initialValueRef = (0, _react.useRef)(null);
|
|
11
|
+
const valueRef = (0, _react.useRef)(null);
|
|
12
|
+
if (value && typeof value === 'object' && 'value' in value) {
|
|
13
|
+
/**
|
|
14
|
+
* if provided value is a shared value,
|
|
15
|
+
* then we do not initialize another one.
|
|
16
|
+
*/
|
|
17
|
+
} else if (valueRef.current === null) {
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
initialValueRef.current = value;
|
|
20
|
+
/**
|
|
21
|
+
* if value is an object, then we need to
|
|
22
|
+
* pass a clone.
|
|
23
|
+
*/
|
|
24
|
+
if (typeof value === 'object') {
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
valueRef.current = (0, _reactNativeReanimated.makeMutable)({
|
|
27
|
+
...value
|
|
28
|
+
});
|
|
29
|
+
} else {
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
valueRef.current = (0, _reactNativeReanimated.makeMutable)(value);
|
|
32
|
+
}
|
|
33
|
+
} else if (initialValueRef.current !== value) {
|
|
34
|
+
valueRef.current.value = value;
|
|
35
|
+
}
|
|
36
|
+
(0, _react.useEffect)(() => {
|
|
37
|
+
return () => {
|
|
38
|
+
if (valueRef.current) {
|
|
39
|
+
(0, _reactNativeReanimated.cancelAnimation)(valueRef.current);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
}, []);
|
|
43
|
+
|
|
44
|
+
// @ts-ignore
|
|
45
|
+
return valueRef.current ?? value;
|
|
46
|
+
};
|
|
47
|
+
exports.useReactiveSharedValue = useReactiveSharedValue;
|
|
48
|
+
//# sourceMappingURL=useReactiveSharedValue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNativeReanimated","useReactiveSharedValue","value","initialValueRef","useRef","valueRef","current","makeMutable","useEffect","cancelAnimation","exports"],"sourceRoot":"../../../src","sources":["hooks/useReactiveSharedValue.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,sBAAA,GAAAD,OAAA;AAGO,MAAME,sBAAsB,GACjCC,KAAQ,IACqC;EAC7C,MAAMC,eAAe,GAAG,IAAAC,aAAM,EAAI,IAAI,CAAC;EACvC,MAAMC,QAAQ,GAAG,IAAAD,aAAM,EAAiB,IAAI,CAAC;EAE7C,IAAIF,KAAK,IAAI,OAAOA,KAAK,KAAK,QAAQ,IAAI,OAAO,IAAIA,KAAK,EAAE;IAC1D;AACJ;AACA;AACA;EAHI,CAID,MAAM,IAAIG,QAAQ,CAACC,OAAO,KAAK,IAAI,EAAE;IACpC;IACAH,eAAe,CAACG,OAAO,GAAGJ,KAAK;IAC/B;AACJ;AACA;AACA;IACI,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;MAC7B;MACAG,QAAQ,CAACC,OAAO,GAAG,IAAAC,kCAAW,EAAC;QAAE,GAAGL;MAAM,CAAC,CAAC;IAC9C,CAAC,MAAM;MACL;MACAG,QAAQ,CAACC,OAAO,GAAG,IAAAC,kCAAW,EAACL,KAAK,CAAC;IACvC;EACF,CAAC,MAAM,IAAIC,eAAe,CAACG,OAAO,KAAKJ,KAAK,EAAE;IAC5CG,QAAQ,CAACC,OAAO,CAACJ,KAAK,GAAGA,KAAU;EACrC;EAEA,IAAAM,gBAAS,EAAC,MAAM;IACd,OAAO,MAAM;MACX,IAAIH,QAAQ,CAACC,OAAO,EAAE;QACpB,IAAAG,sCAAe,EAACJ,QAAQ,CAACC,OAAO,CAAC;MACnC;IACF,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;;EAEN;EACA,OAAOD,QAAQ,CAACC,OAAO,IAAIJ,KAAK;AAClC,CAAC;AAACQ,OAAA,CAAAT,sBAAA,GAAAA,sBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useScrollEventsHandlersDefault = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNativeGestureHandler = require("react-native-gesture-handler");
|
|
9
|
+
var _reactNativeReanimated = require("react-native-reanimated");
|
|
10
|
+
var _constants = require("../constants");
|
|
11
|
+
var _useBottomSheetInternal = require("./useBottomSheetInternal");
|
|
12
|
+
const useScrollEventsHandlersDefault = (scrollableRef, scrollableContentOffsetY) => {
|
|
13
|
+
// hooks
|
|
14
|
+
const {
|
|
15
|
+
animatedSheetState,
|
|
16
|
+
animatedScrollableState,
|
|
17
|
+
animatedScrollableStatus,
|
|
18
|
+
animatedAnimationState,
|
|
19
|
+
animatedHandleGestureState
|
|
20
|
+
} = (0, _useBottomSheetInternal.useBottomSheetInternal)();
|
|
21
|
+
|
|
22
|
+
//#region callbacks
|
|
23
|
+
const handleOnScroll = (0, _react.useCallback)(({
|
|
24
|
+
contentOffset: {
|
|
25
|
+
y
|
|
26
|
+
}
|
|
27
|
+
}, context) => {
|
|
28
|
+
'worklet';
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* if sheet position is extended or fill parent, then we reset
|
|
32
|
+
* `shouldLockInitialPosition` value to false.
|
|
33
|
+
*/
|
|
34
|
+
if (animatedSheetState.value === _constants.SHEET_STATE.EXTENDED || animatedSheetState.value === _constants.SHEET_STATE.FILL_PARENT) {
|
|
35
|
+
context.shouldLockInitialPosition = false;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* if handle gesture state is active, then we capture the offset y position
|
|
40
|
+
* and lock the scrollable with it.
|
|
41
|
+
*/
|
|
42
|
+
if (animatedHandleGestureState.value === _reactNativeGestureHandler.State.ACTIVE) {
|
|
43
|
+
context.shouldLockInitialPosition = true;
|
|
44
|
+
context.initialContentOffsetY = y;
|
|
45
|
+
}
|
|
46
|
+
if (animatedScrollableStatus.value === _constants.SCROLLABLE_STATUS.LOCKED) {
|
|
47
|
+
const lockPosition = context.shouldLockInitialPosition ? context.initialContentOffsetY ?? 0 : 0;
|
|
48
|
+
// @ts-ignore
|
|
49
|
+
(0, _reactNativeReanimated.scrollTo)(scrollableRef, 0, lockPosition, false);
|
|
50
|
+
scrollableContentOffsetY.value = lockPosition;
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
}, [scrollableRef, scrollableContentOffsetY, animatedScrollableStatus, animatedSheetState, animatedHandleGestureState]);
|
|
54
|
+
const handleOnBeginDrag = (0, _react.useCallback)(({
|
|
55
|
+
contentOffset: {
|
|
56
|
+
y
|
|
57
|
+
}
|
|
58
|
+
}, context) => {
|
|
59
|
+
'worklet';
|
|
60
|
+
|
|
61
|
+
scrollableContentOffsetY.value = y;
|
|
62
|
+
context.initialContentOffsetY = y;
|
|
63
|
+
animatedScrollableState.set(state => ({
|
|
64
|
+
...state,
|
|
65
|
+
contentOffsetY: y
|
|
66
|
+
}));
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* if sheet position not extended or fill parent and the scrollable position
|
|
70
|
+
* not at the top, then we should lock the initial scrollable position.
|
|
71
|
+
*/
|
|
72
|
+
if (animatedSheetState.value !== _constants.SHEET_STATE.EXTENDED && animatedSheetState.value !== _constants.SHEET_STATE.FILL_PARENT && y > 0) {
|
|
73
|
+
context.shouldLockInitialPosition = true;
|
|
74
|
+
} else {
|
|
75
|
+
context.shouldLockInitialPosition = false;
|
|
76
|
+
}
|
|
77
|
+
}, [scrollableContentOffsetY, animatedSheetState, animatedScrollableState]);
|
|
78
|
+
const handleOnEndDrag = (0, _react.useCallback)(({
|
|
79
|
+
contentOffset: {
|
|
80
|
+
y
|
|
81
|
+
}
|
|
82
|
+
}, context) => {
|
|
83
|
+
'worklet';
|
|
84
|
+
|
|
85
|
+
if (animatedScrollableStatus.value === _constants.SCROLLABLE_STATUS.LOCKED) {
|
|
86
|
+
const lockPosition = context.shouldLockInitialPosition ? context.initialContentOffsetY ?? 0 : 0;
|
|
87
|
+
// @ts-ignore
|
|
88
|
+
(0, _reactNativeReanimated.scrollTo)(scrollableRef, 0, lockPosition, false);
|
|
89
|
+
scrollableContentOffsetY.value = lockPosition;
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
if (animatedAnimationState.get().status !== _constants.ANIMATION_STATUS.RUNNING) {
|
|
93
|
+
scrollableContentOffsetY.value = y;
|
|
94
|
+
animatedScrollableState.set(state => ({
|
|
95
|
+
...state,
|
|
96
|
+
contentOffsetY: y
|
|
97
|
+
}));
|
|
98
|
+
}
|
|
99
|
+
}, [scrollableRef, scrollableContentOffsetY, animatedAnimationState, animatedScrollableStatus, animatedScrollableState]);
|
|
100
|
+
const handleOnMomentumEnd = (0, _react.useCallback)(({
|
|
101
|
+
contentOffset: {
|
|
102
|
+
y
|
|
103
|
+
}
|
|
104
|
+
}, context) => {
|
|
105
|
+
'worklet';
|
|
106
|
+
|
|
107
|
+
if (animatedScrollableStatus.value === _constants.SCROLLABLE_STATUS.LOCKED) {
|
|
108
|
+
const lockPosition = context.shouldLockInitialPosition ? context.initialContentOffsetY ?? 0 : 0;
|
|
109
|
+
// @ts-ignore
|
|
110
|
+
(0, _reactNativeReanimated.scrollTo)(scrollableRef, 0, lockPosition, false);
|
|
111
|
+
scrollableContentOffsetY.value = 0;
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
if (animatedAnimationState.get().status !== _constants.ANIMATION_STATUS.RUNNING) {
|
|
115
|
+
scrollableContentOffsetY.value = y;
|
|
116
|
+
animatedScrollableState.set(state => ({
|
|
117
|
+
...state,
|
|
118
|
+
contentOffsetY: y
|
|
119
|
+
}));
|
|
120
|
+
}
|
|
121
|
+
}, [scrollableContentOffsetY, scrollableRef, animatedAnimationState, animatedScrollableStatus, animatedScrollableState]);
|
|
122
|
+
//#endregion
|
|
123
|
+
|
|
124
|
+
return {
|
|
125
|
+
handleOnScroll,
|
|
126
|
+
handleOnBeginDrag,
|
|
127
|
+
handleOnEndDrag,
|
|
128
|
+
handleOnMomentumEnd
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
exports.useScrollEventsHandlersDefault = useScrollEventsHandlersDefault;
|
|
132
|
+
//# sourceMappingURL=useScrollEventsHandlersDefault.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNativeGestureHandler","_reactNativeReanimated","_constants","_useBottomSheetInternal","useScrollEventsHandlersDefault","scrollableRef","scrollableContentOffsetY","animatedSheetState","animatedScrollableState","animatedScrollableStatus","animatedAnimationState","animatedHandleGestureState","useBottomSheetInternal","handleOnScroll","useCallback","contentOffset","y","context","value","SHEET_STATE","EXTENDED","FILL_PARENT","shouldLockInitialPosition","State","ACTIVE","initialContentOffsetY","SCROLLABLE_STATUS","LOCKED","lockPosition","scrollTo","handleOnBeginDrag","set","state","contentOffsetY","handleOnEndDrag","get","status","ANIMATION_STATUS","RUNNING","handleOnMomentumEnd","exports"],"sourceRoot":"../../../src","sources":["hooks/useScrollEventsHandlersDefault.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,0BAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AAKA,IAAAI,uBAAA,GAAAJ,OAAA;AAOO,MAAMK,8BAA4D,GAAGA,CAC1EC,aAAa,EACbC,wBAAwB,KACrB;EACH;EACA,MAAM;IACJC,kBAAkB;IAClBC,uBAAuB;IACvBC,wBAAwB;IACxBC,sBAAsB;IACtBC;EACF,CAAC,GAAG,IAAAC,8CAAsB,EAAC,CAAC;;EAE5B;EACA,MAAMC,cAAsE,GAC1E,IAAAC,kBAAW,EACT,CAAC;IAAEC,aAAa,EAAE;MAAEC;IAAE;EAAE,CAAC,EAAEC,OAAO,KAAK;IACrC,SAAS;;IACT;AACR;AACA;AACA;IACQ,IACEV,kBAAkB,CAACW,KAAK,KAAKC,sBAAW,CAACC,QAAQ,IACjDb,kBAAkB,CAACW,KAAK,KAAKC,sBAAW,CAACE,WAAW,EACpD;MACAJ,OAAO,CAACK,yBAAyB,GAAG,KAAK;IAC3C;;IAEA;AACR;AACA;AACA;IACQ,IAAIX,0BAA0B,CAACO,KAAK,KAAKK,gCAAK,CAACC,MAAM,EAAE;MACrDP,OAAO,CAACK,yBAAyB,GAAG,IAAI;MACxCL,OAAO,CAACQ,qBAAqB,GAAGT,CAAC;IACnC;IAEA,IAAIP,wBAAwB,CAACS,KAAK,KAAKQ,4BAAiB,CAACC,MAAM,EAAE;MAC/D,MAAMC,YAAY,GAAGX,OAAO,CAACK,yBAAyB,GACjDL,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