@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,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useBottomSheetContentContainerStyle = useBottomSheetContentContainerStyle;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _reactNativeReanimated = require("react-native-reanimated");
|
|
10
|
+
var _useBottomSheetInternal = require("./useBottomSheetInternal");
|
|
11
|
+
function useBottomSheetContentContainerStyle(enableFooterMarginAdjustment, _style) {
|
|
12
|
+
const [footerHeight, setFooterHeight] = (0, _react.useState)(0);
|
|
13
|
+
//#region hooks
|
|
14
|
+
const {
|
|
15
|
+
animatedLayoutState
|
|
16
|
+
} = (0, _useBottomSheetInternal.useBottomSheetInternal)();
|
|
17
|
+
//#endregion
|
|
18
|
+
|
|
19
|
+
//#region styles
|
|
20
|
+
const flattenStyle = (0, _react.useMemo)(() => {
|
|
21
|
+
return !_style ? {} : Array.isArray(_style) ?
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
_reactNative.StyleSheet.compose(..._style) : _style;
|
|
24
|
+
}, [_style]);
|
|
25
|
+
const style = (0, _react.useMemo)(() => {
|
|
26
|
+
if (!enableFooterMarginAdjustment) {
|
|
27
|
+
return flattenStyle;
|
|
28
|
+
}
|
|
29
|
+
let currentBottomPadding = 0;
|
|
30
|
+
if (flattenStyle && typeof flattenStyle === 'object') {
|
|
31
|
+
const {
|
|
32
|
+
paddingBottom,
|
|
33
|
+
padding,
|
|
34
|
+
paddingVertical
|
|
35
|
+
} = flattenStyle;
|
|
36
|
+
if (paddingBottom !== undefined && typeof paddingBottom === 'number') {
|
|
37
|
+
currentBottomPadding = paddingBottom;
|
|
38
|
+
} else if (paddingVertical !== undefined && typeof paddingVertical === 'number') {
|
|
39
|
+
currentBottomPadding = paddingVertical;
|
|
40
|
+
} else if (padding !== undefined && typeof padding === 'number') {
|
|
41
|
+
currentBottomPadding = padding;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return [flattenStyle, {
|
|
45
|
+
paddingBottom: currentBottomPadding + footerHeight,
|
|
46
|
+
overflow: 'visible'
|
|
47
|
+
}];
|
|
48
|
+
}, [footerHeight, enableFooterMarginAdjustment, flattenStyle]);
|
|
49
|
+
//#endregion
|
|
50
|
+
|
|
51
|
+
//#region effects
|
|
52
|
+
(0, _reactNativeReanimated.useAnimatedReaction)(() => animatedLayoutState.get().footerHeight, (result, previousFooterHeight) => {
|
|
53
|
+
if (!enableFooterMarginAdjustment) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
(0, _reactNativeReanimated.runOnJS)(setFooterHeight)(result);
|
|
57
|
+
if (_reactNative.Platform.OS === 'web') {
|
|
58
|
+
/**
|
|
59
|
+
* a reaction that will append the footer height to the content
|
|
60
|
+
* height if margin adjustment is true.
|
|
61
|
+
*
|
|
62
|
+
* This is needed due to the web layout the footer after the content.
|
|
63
|
+
*/
|
|
64
|
+
if (result && !previousFooterHeight) {
|
|
65
|
+
animatedLayoutState.modify(state => {
|
|
66
|
+
'worklet';
|
|
67
|
+
|
|
68
|
+
state.contentHeight = state.contentHeight + result;
|
|
69
|
+
return state;
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}, [animatedLayoutState, enableFooterMarginAdjustment]);
|
|
74
|
+
//#endregion
|
|
75
|
+
return style;
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=useBottomSheetContentContainerStyle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_useBottomSheetInternal","useBottomSheetContentContainerStyle","enableFooterMarginAdjustment","_style","footerHeight","setFooterHeight","useState","animatedLayoutState","useBottomSheetInternal","flattenStyle","useMemo","Array","isArray","StyleSheet","compose","style","currentBottomPadding","paddingBottom","padding","paddingVertical","undefined","overflow","useAnimatedReaction","get","result","previousFooterHeight","runOnJS","Platform","OS","modify","state","contentHeight"],"sourceRoot":"../../../src","sources":["hooks/useBottomSheetContentContainerStyle.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAMA,IAAAE,sBAAA,GAAAF,OAAA;AACA,IAAAG,uBAAA,GAAAH,OAAA;AAEO,SAASI,mCAAmCA,CACjDC,4BAAqC,EACrCC,MAA2B,EAC3B;EACA,MAAM,CAACC,YAAY,EAAEC,eAAe,CAAC,GAAG,IAAAC,eAAQ,EAAC,CAAC,CAAC;EACnD;EACA,MAAM;IAAEC;EAAoB,CAAC,GAAG,IAAAC,8CAAsB,EAAC,CAAC;EACxD;;EAEA;EACA,MAAMC,YAAY,GAAG,IAAAC,cAAO,EAAY,MAAM;IAC5C,OAAO,CAACP,MAAM,GACV,CAAC,CAAC,GACFQ,KAAK,CAACC,OAAO,CAACT,MAAM,CAAC;IACnB;IACCU,uBAAU,CAACC,OAAO,CAAC,GAAGX,MAAM,CAAC,GAC7BA,MAAoB;EAC7B,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;EACZ,MAAMY,KAAK,GAAG,IAAAL,cAAO,EAAqB,MAAM;IAC9C,IAAI,CAACR,4BAA4B,EAAE;MACjC,OAAOO,YAAY;IACrB;IAEA,IAAIO,oBAAoB,GAAG,CAAC;IAC5B,IAAIP,YAAY,IAAI,OAAOA,YAAY,KAAK,QAAQ,EAAE;MACpD,MAAM;QAAEQ,aAAa;QAAEC,OAAO;QAAEC;MAAgB,CAAC,GAAGV,YAAY;MAChE,IAAIQ,aAAa,KAAKG,SAAS,IAAI,OAAOH,aAAa,KAAK,QAAQ,EAAE;QACpED,oBAAoB,GAAGC,aAAa;MACtC,CAAC,MAAM,IACLE,eAAe,KAAKC,SAAS,IAC7B,OAAOD,eAAe,KAAK,QAAQ,EACnC;QACAH,oBAAoB,GAAGG,eAAe;MACxC,CAAC,MAAM,IAAID,OAAO,KAAKE,SAAS,IAAI,OAAOF,OAAO,KAAK,QAAQ,EAAE;QAC/DF,oBAAoB,GAAGE,OAAO;MAChC;IACF;IAEA,OAAO,CACLT,YAAY,EACZ;MACEQ,aAAa,EAAED,oBAAoB,GAAGZ,YAAY;MAClDiB,QAAQ,EAAE;IACZ,CAAC,CACF;EACH,CAAC,EAAE,CAACjB,YAAY,EAAEF,4BAA4B,EAAEO,YAAY,CAAC,CAAC;EAC9D;;EAEA;EACA,IAAAa,0CAAmB,EACjB,MAAMf,mBAAmB,CAACgB,GAAG,CAAC,CAAC,CAACnB,YAAY,EAC5C,CAACoB,MAAM,EAAEC,oBAAoB,KAAK;IAChC,IAAI,CAACvB,4BAA4B,EAAE;MACjC;IACF;IACA,IAAAwB,8BAAO,EAACrB,eAAe,CAAC,CAACmB,MAAM,CAAC;IAEhC,IAAIG,qBAAQ,CAACC,EAAE,KAAK,KAAK,EAAE;MACzB;AACR;AACA;AACA;AACA;AACA;MACQ,IAAIJ,MAAM,IAAI,CAACC,oBAAoB,EAAE;QACnClB,mBAAmB,CAACsB,MAAM,CAACC,KAAK,IAAI;UAClC,SAAS;;UACTA,KAAK,CAACC,aAAa,GAAGD,KAAK,CAACC,aAAa,GAAGP,MAAM;UAClD,OAAOM,KAAK;QACd,CAAC,CAAC;MACJ;IACF;EACF,CAAC,EACD,CAACvB,mBAAmB,EAAEL,4BAA4B,CACpD,CAAC;EACD;EACA,OAAOa,KAAK;AACd","ignoreList":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useBottomSheetGestureHandlers = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _gesture = require("../contexts/gesture");
|
|
9
|
+
const useBottomSheetGestureHandlers = () => {
|
|
10
|
+
const context = (0, _react.useContext)(_gesture.BottomSheetGestureHandlersContext);
|
|
11
|
+
if (context === null) {
|
|
12
|
+
throw "'useBottomSheetGestureHandlers' cannot be used out of the BottomSheet!";
|
|
13
|
+
}
|
|
14
|
+
return context;
|
|
15
|
+
};
|
|
16
|
+
exports.useBottomSheetGestureHandlers = useBottomSheetGestureHandlers;
|
|
17
|
+
//# sourceMappingURL=useBottomSheetGestureHandlers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_gesture","useBottomSheetGestureHandlers","context","useContext","BottomSheetGestureHandlersContext","exports"],"sourceRoot":"../../../src","sources":["hooks/useBottomSheetGestureHandlers.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAEO,MAAME,6BAA6B,GAAGA,CAAA,KAAM;EACjD,MAAMC,OAAO,GAAG,IAAAC,iBAAU,EAACC,0CAAiC,CAAC;EAE7D,IAAIF,OAAO,KAAK,IAAI,EAAE;IACpB,MAAM,wEAAwE;EAChF;EAEA,OAAOA,OAAO;AAChB,CAAC;AAACG,OAAA,CAAAJ,6BAAA,GAAAA,6BAAA","ignoreList":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useBottomSheetInternal = useBottomSheetInternal;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _internal = require("../contexts/internal");
|
|
9
|
+
function useBottomSheetInternal(unsafe) {
|
|
10
|
+
const context = (0, _react.useContext)(_internal.BottomSheetInternalContext);
|
|
11
|
+
if (unsafe !== true && context === null) {
|
|
12
|
+
throw "'useBottomSheetInternal' cannot be used out of the BottomSheet!";
|
|
13
|
+
}
|
|
14
|
+
return context;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=useBottomSheetInternal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_internal","useBottomSheetInternal","unsafe","context","useContext","BottomSheetInternalContext"],"sourceRoot":"../../../src","sources":["hooks/useBottomSheetInternal.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAaO,SAASE,sBAAsBA,CACpCC,MAAgB,EACuB;EACvC,MAAMC,OAAO,GAAG,IAAAC,iBAAU,EAACC,oCAA0B,CAAC;EAEtD,IAAIH,MAAM,KAAK,IAAI,IAAIC,OAAO,KAAK,IAAI,EAAE;IACvC,MAAM,iEAAiE;EACzE;EAEA,OAAOA,OAAO;AAChB","ignoreList":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useBottomSheetModal = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _contexts = require("../contexts");
|
|
9
|
+
const useBottomSheetModal = () => {
|
|
10
|
+
const context = (0, _react.useContext)(_contexts.BottomSheetModalContext);
|
|
11
|
+
if (context === null) {
|
|
12
|
+
throw "'BottomSheetModalContext' cannot be null!";
|
|
13
|
+
}
|
|
14
|
+
return context;
|
|
15
|
+
};
|
|
16
|
+
exports.useBottomSheetModal = useBottomSheetModal;
|
|
17
|
+
//# sourceMappingURL=useBottomSheetModal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_contexts","useBottomSheetModal","context","useContext","BottomSheetModalContext","exports"],"sourceRoot":"../../../src","sources":["hooks/useBottomSheetModal.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAEO,MAAME,mBAAmB,GAAGA,CAAA,KAAM;EACvC,MAAMC,OAAO,GAAG,IAAAC,iBAAU,EAACC,iCAAuB,CAAC;EAEnD,IAAIF,OAAO,KAAK,IAAI,EAAE;IACpB,MAAM,2CAA2C;EACnD;EAEA,OAAOA,OAAO;AAChB,CAAC;AAACG,OAAA,CAAAJ,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useBottomSheetModalInternal = useBottomSheetModalInternal;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _contexts = require("../contexts");
|
|
9
|
+
function useBottomSheetModalInternal(unsafe) {
|
|
10
|
+
const context = (0, _react.useContext)(_contexts.BottomSheetModalInternalContext);
|
|
11
|
+
if (unsafe !== true && context === null) {
|
|
12
|
+
throw "'BottomSheetModalInternalContext' cannot be null!";
|
|
13
|
+
}
|
|
14
|
+
return context;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=useBottomSheetModalInternal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_contexts","useBottomSheetModalInternal","unsafe","context","useContext","BottomSheetModalInternalContext"],"sourceRoot":"../../../src","sources":["hooks/useBottomSheetModalInternal.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAaO,SAASE,2BAA2BA,CACzCC,MAAgB,EAC4B;EAC5C,MAAMC,OAAO,GAAG,IAAAC,iBAAU,EAACC,yCAA+B,CAAC;EAE3D,IAAIH,MAAM,KAAK,IAAI,IAAIC,OAAO,KAAK,IAAI,EAAE;IACvC,MAAM,mDAAmD;EAC3D;EAEA,OAAOA,OAAO;AAChB","ignoreList":[]}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useBottomSheetScrollableCreator = useBottomSheetScrollableCreator;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _bottomSheetScrollable = require("../components/bottomSheetScrollable");
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
/**
|
|
11
|
+
* A custom hook that creates a scrollable component for third-party libraries
|
|
12
|
+
* like `LegendList` or `FlashList` to integrate the interaction and scrolling
|
|
13
|
+
* behaviors with th BottomSheet component.
|
|
14
|
+
*
|
|
15
|
+
* @param configs - Configuration options for the scrollable creator.
|
|
16
|
+
* @param configs.focusHook - This needed when bottom sheet used with multiple scrollables to allow bottom sheet
|
|
17
|
+
* detect the current scrollable ref, especially when used with `React Navigation`.
|
|
18
|
+
* You will need to provide `useFocusEffect` from `@react-navigation/native`.
|
|
19
|
+
* @param configs.scrollEventsHandlersHook - Custom hook to provide scroll events handler, which will allow advance and
|
|
20
|
+
* customize handling for scrollables.
|
|
21
|
+
* @param configs.enableFooterMarginAdjustment - Adjust the scrollable bottom margin to avoid the animated footer.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* const BottomSheetLegendListScrollable = useBottomSheetScrollableCreator();
|
|
26
|
+
*
|
|
27
|
+
* // Usage in JSX
|
|
28
|
+
* <LegendList
|
|
29
|
+
* renderScrollComponent={BottomSheetLegendListScrollable}
|
|
30
|
+
* />
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
// biome-ignore lint/suspicious/noExplicitAny: out of my control
|
|
34
|
+
function useBottomSheetScrollableCreator({
|
|
35
|
+
focusHook,
|
|
36
|
+
scrollEventsHandlersHook,
|
|
37
|
+
enableFooterMarginAdjustment
|
|
38
|
+
} = {}) {
|
|
39
|
+
return (0, _react.useCallback)(function useBottomSheetScrollableCreator(
|
|
40
|
+
// @ts-expect-error
|
|
41
|
+
{
|
|
42
|
+
data: _,
|
|
43
|
+
...props
|
|
44
|
+
}, ref) {
|
|
45
|
+
return (
|
|
46
|
+
/*#__PURE__*/
|
|
47
|
+
// @ts-expect-error
|
|
48
|
+
(0, _jsxRuntime.jsx)(_bottomSheetScrollable.BottomSheetScrollView, {
|
|
49
|
+
ref: ref,
|
|
50
|
+
...props,
|
|
51
|
+
focusHook: focusHook,
|
|
52
|
+
scrollEventsHandlersHook: scrollEventsHandlersHook,
|
|
53
|
+
enableFooterMarginAdjustment: enableFooterMarginAdjustment
|
|
54
|
+
})
|
|
55
|
+
);
|
|
56
|
+
}, [focusHook, scrollEventsHandlersHook, enableFooterMarginAdjustment]);
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=useBottomSheetScrollableCreator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_bottomSheetScrollable","_jsxRuntime","useBottomSheetScrollableCreator","focusHook","scrollEventsHandlersHook","enableFooterMarginAdjustment","useCallback","data","_","props","ref","jsx","BottomSheetScrollView"],"sourceRoot":"../../../src","sources":["hooks/useBottomSheetScrollableCreator.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AAG6C,IAAAE,WAAA,GAAAF,OAAA;AAI7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASG,+BAA+BA,CAAU;EACvDC,SAAS;EACTC,wBAAwB;EACxBC;AACmC,CAAC,GAAG,CAAC,CAAC,EAGtB;EACnB,OAAO,IAAAC,kBAAW,EAChB,SAASJ,+BAA+BA;EACtC;EACA;IAAEK,IAAI,EAAEC,CAAC;IAAE,GAAGC;EAAS,CAAC,EACxBC,GAAW,EACM;IACjB;MAAA;MACE;MACA,IAAAT,WAAA,CAAAU,GAAA,EAACX,sBAAA,CAAAY,qBAAqB;QACpBF,GAAG,EAAEA,GAAI;QAAA,GACLD,KAAK;QACTN,SAAS,EAAEA,SAAU;QACrBC,wBAAwB,EAAEA,wBAAyB;QACnDC,4BAA4B,EAAEA;MAA6B,CAC5D;IAAC;EAEN,CAAC,EACD,CAACF,SAAS,EAAEC,wBAAwB,EAAEC,4BAA4B,CACpE,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useBottomSheetSpringConfigs = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Generate spring animation configs.
|
|
9
|
+
* @param configs overridable configs.
|
|
10
|
+
*/
|
|
11
|
+
const useBottomSheetSpringConfigs = configs => {
|
|
12
|
+
return configs;
|
|
13
|
+
};
|
|
14
|
+
exports.useBottomSheetSpringConfigs = useBottomSheetSpringConfigs;
|
|
15
|
+
//# sourceMappingURL=useBottomSheetSpringConfigs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useBottomSheetSpringConfigs","configs","exports"],"sourceRoot":"../../../src","sources":["hooks/useBottomSheetSpringConfigs.ts"],"mappings":";;;;;;AAEA;AACA;AACA;AACA;AACO,MAAMA,2BAA2B,GACtCC,OAA2C,IACxC;EACH,OAAOA,OAAO;AAChB,CAAC;AAACC,OAAA,CAAAF,2BAAA,GAAAA,2BAAA","ignoreList":[]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useBottomSheetTimingConfigs = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _constants = require("../constants");
|
|
9
|
+
/**
|
|
10
|
+
* this is needed to avoid TS4023
|
|
11
|
+
* https://github.com/microsoft/TypeScript/issues/5711
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Generate timing animation configs.
|
|
16
|
+
* @default
|
|
17
|
+
* - easing: Easing.out(Easing.exp)
|
|
18
|
+
* - duration: 250
|
|
19
|
+
* @param configs overridable configs.
|
|
20
|
+
*/
|
|
21
|
+
const useBottomSheetTimingConfigs = configs => {
|
|
22
|
+
return (0, _react.useMemo)(() => {
|
|
23
|
+
const _configs = {
|
|
24
|
+
easing: configs.easing || _constants.ANIMATION_EASING,
|
|
25
|
+
duration: configs.duration || _constants.ANIMATION_DURATION,
|
|
26
|
+
reduceMotion: configs.reduceMotion
|
|
27
|
+
};
|
|
28
|
+
return _configs;
|
|
29
|
+
}, [configs.duration, configs.easing, configs.reduceMotion]);
|
|
30
|
+
};
|
|
31
|
+
exports.useBottomSheetTimingConfigs = useBottomSheetTimingConfigs;
|
|
32
|
+
//# sourceMappingURL=useBottomSheetTimingConfigs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_constants","useBottomSheetTimingConfigs","configs","useMemo","_configs","easing","ANIMATION_EASING","duration","ANIMATION_DURATION","reduceMotion","exports"],"sourceRoot":"../../../src","sources":["hooks/useBottomSheetTimingConfigs.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAMA,IAAAC,UAAA,GAAAD,OAAA;AAEA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,2BAA2B,GAAIC,OAAqB,IAAK;EACpE,OAAO,IAAAC,cAAO,EAAC,MAAM;IACnB,MAAMC,QAAsB,GAAG;MAC7BC,MAAM,EAAEH,OAAO,CAACG,MAAM,IAAIC,2BAAgB;MAC1CC,QAAQ,EAAEL,OAAO,CAACK,QAAQ,IAAIC,6BAAkB;MAChDC,YAAY,EAAEP,OAAO,CAACO;IACxB,CAAC;IAED,OAAOL,QAAQ;EACjB,CAAC,EAAE,CAACF,OAAO,CAACK,QAAQ,EAAEL,OAAO,CAACG,MAAM,EAAEH,OAAO,CAACO,YAAY,CAAC,CAAC;AAC9D,CAAC;AAACC,OAAA,CAAAT,2BAAA,GAAAA,2BAAA","ignoreList":[]}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useBoundingClientRect = useBoundingClientRect;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _isFabricInstalled = require("../utilities/isFabricInstalled");
|
|
9
|
+
/**
|
|
10
|
+
* A custom hook that retrieves the bounding client rectangle of a given `ref` element
|
|
11
|
+
* and invokes a handler function with the layout information.
|
|
12
|
+
*
|
|
13
|
+
* This hook is designed to work with React Native's Fabric architecture and provides
|
|
14
|
+
* support for both `unstable_getBoundingClientRect` and `getBoundingClientRect` methods.
|
|
15
|
+
*
|
|
16
|
+
* @param ref - A `RefObject` pointing to a `View` or `null`. The bounding client rectangle
|
|
17
|
+
* will be retrieved from this reference.
|
|
18
|
+
* @param handler - A callback function that will be invoked with the layout information
|
|
19
|
+
* of the referenced element.
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
* - The hook uses `useLayoutEffect` to ensure the layout information is retrieved
|
|
23
|
+
* after the DOM updates.
|
|
24
|
+
* - The `isFabricInstalled` function is used to determine if the Fabric architecture
|
|
25
|
+
* is available.
|
|
26
|
+
* - The `unstable_getBoundingClientRect` method is used if available, falling back
|
|
27
|
+
* to `getBoundingClientRect` otherwise.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```tsx
|
|
31
|
+
* const ref = useRef<View | null>(null);
|
|
32
|
+
* useBoundingClientRect(ref, (layout) => {
|
|
33
|
+
* console.log('Bounding client rect:', layout);
|
|
34
|
+
* });
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
function useBoundingClientRect(ref, handler) {
|
|
38
|
+
if (!(0, _isFabricInstalled.isFabricInstalled)()) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// biome-ignore lint/correctness/useHookAtTopLevel: `isFabricInstalled` is a constant that will not change during the runtime
|
|
43
|
+
(0, _react.useLayoutEffect)(() => {
|
|
44
|
+
if (!ref || !ref.current) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
if (
|
|
48
|
+
// @ts-expect-error 👉 https://github.com/facebook/react/commit/53b1f69ba
|
|
49
|
+
ref.current.unstable_getBoundingClientRect !== null &&
|
|
50
|
+
// @ts-expect-error 👉 https://github.com/facebook/react/commit/53b1f69ba
|
|
51
|
+
typeof ref.current.unstable_getBoundingClientRect === 'function') {
|
|
52
|
+
// @ts-expect-error https://github.com/facebook/react/commit/53b1f69ba
|
|
53
|
+
const layout = ref.current.unstable_getBoundingClientRect();
|
|
54
|
+
handler(layout);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// @ts-expect-error once it `unstable_getBoundingClientRect` gets stable 🤞.
|
|
59
|
+
if (ref.current.getBoundingClientRect !== null) {
|
|
60
|
+
// @ts-expect-error once it `unstable_getBoundingClientRect` gets stable.
|
|
61
|
+
const layout = ref.current.getBoundingClientRect();
|
|
62
|
+
handler(layout);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=useBoundingClientRect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_isFabricInstalled","useBoundingClientRect","ref","handler","isFabricInstalled","useLayoutEffect","current","unstable_getBoundingClientRect","layout","getBoundingClientRect"],"sourceRoot":"../../../src","sources":["hooks/useBoundingClientRect.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,kBAAA,GAAAD,OAAA;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,qBAAqBA,CACnCC,GAA2B,EAC3BC,OAA6C,EAC7C;EACA,IAAI,CAAC,IAAAC,oCAAiB,EAAC,CAAC,EAAE;IACxB;EACF;;EAEA;EACA,IAAAC,sBAAe,EAAC,MAAM;IACpB,IAAI,CAACH,GAAG,IAAI,CAACA,GAAG,CAACI,OAAO,EAAE;MACxB;IACF;IAEA;IACE;IACAJ,GAAG,CAACI,OAAO,CAACC,8BAA8B,KAAK,IAAI;IACnD;IACA,OAAOL,GAAG,CAACI,OAAO,CAACC,8BAA8B,KAAK,UAAU,EAChE;MACA;MACA,MAAMC,MAAM,GAAGN,GAAG,CAACI,OAAO,CAACC,8BAA8B,CAAC,CAAC;MAC3DJ,OAAO,CAACK,MAAM,CAAC;MACf;IACF;;IAEA;IACA,IAAIN,GAAG,CAACI,OAAO,CAACG,qBAAqB,KAAK,IAAI,EAAE;MAC9C;MACA,MAAMD,MAAM,GAAGN,GAAG,CAACI,OAAO,CAACG,qBAAqB,CAAC,CAAC;MAClDN,OAAO,CAACK,MAAM,CAAC;IACjB;EACF,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -0,0 +1,299 @@
|
|
|
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
|
+
initialKeyboardStatus: _constants.KEYBOARD_STATUS.UNDETERMINED,
|
|
17
|
+
isScrollablePositionLocked: false
|
|
18
|
+
};
|
|
19
|
+
const dismissKeyboard = _reactNative.Keyboard.dismiss;
|
|
20
|
+
|
|
21
|
+
// biome-ignore lint: to be addressed!
|
|
22
|
+
const resetContext = context => {
|
|
23
|
+
'worklet';
|
|
24
|
+
|
|
25
|
+
Object.keys(context).map(key => {
|
|
26
|
+
context[key] = undefined;
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
const useGestureEventsHandlersDefault = () => {
|
|
30
|
+
//#region variables
|
|
31
|
+
const {
|
|
32
|
+
animatedPosition,
|
|
33
|
+
animatedDetentsState,
|
|
34
|
+
animatedKeyboardState,
|
|
35
|
+
animatedScrollableState,
|
|
36
|
+
animatedLayoutState,
|
|
37
|
+
enableOverDrag,
|
|
38
|
+
enablePanDownToClose,
|
|
39
|
+
overDragResistanceFactor,
|
|
40
|
+
isInTemporaryPosition,
|
|
41
|
+
enableBlurKeyboardOnGesture,
|
|
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
|
+
'worklet';
|
|
53
|
+
|
|
54
|
+
// cancel current animation
|
|
55
|
+
stopAnimation();
|
|
56
|
+
let initialKeyboardStatus = animatedKeyboardState.get().status;
|
|
57
|
+
// blur the keyboard when user start dragging the bottom sheet
|
|
58
|
+
if (enableBlurKeyboardOnGesture && initialKeyboardStatus === _constants.KEYBOARD_STATUS.SHOWN) {
|
|
59
|
+
initialKeyboardStatus = _constants.KEYBOARD_STATUS.HIDDEN;
|
|
60
|
+
(0, _reactNativeReanimated.runOnJS)(dismissKeyboard)();
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// store current animated position
|
|
64
|
+
context.value = {
|
|
65
|
+
...context.value,
|
|
66
|
+
initialPosition: animatedPosition.value,
|
|
67
|
+
initialKeyboardStatus
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* if the scrollable content is scrolled, then
|
|
72
|
+
* we lock the position.
|
|
73
|
+
*/
|
|
74
|
+
if (animatedScrollableState.get().contentOffsetY > 0) {
|
|
75
|
+
context.value = {
|
|
76
|
+
...context.value,
|
|
77
|
+
isScrollablePositionLocked: true
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
}, [stopAnimation, context, enableBlurKeyboardOnGesture, animatedPosition, animatedKeyboardState, animatedScrollableState]);
|
|
81
|
+
const handleOnChange = (0, _react.useCallback)(function handleOnChange(source, {
|
|
82
|
+
translationY
|
|
83
|
+
}) {
|
|
84
|
+
'worklet';
|
|
85
|
+
|
|
86
|
+
const {
|
|
87
|
+
highestDetentPosition,
|
|
88
|
+
detents
|
|
89
|
+
} = animatedDetentsState.get();
|
|
90
|
+
if (highestDetentPosition === undefined || detents === undefined || detents.length === 0) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
let highestSnapPoint = highestDetentPosition;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* if keyboard is shown, then we set the highest point to the current
|
|
97
|
+
* position which includes the keyboard height.
|
|
98
|
+
*/
|
|
99
|
+
if (isInTemporaryPosition.value && context.value.initialKeyboardStatus === _constants.KEYBOARD_STATUS.SHOWN) {
|
|
100
|
+
highestSnapPoint = context.value.initialPosition;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* if current position is out of provided `snapPoints` and smaller then
|
|
105
|
+
* highest snap pont, then we set the highest point to the current position.
|
|
106
|
+
*/
|
|
107
|
+
if (isInTemporaryPosition.value && context.value.initialPosition < highestSnapPoint) {
|
|
108
|
+
highestSnapPoint = context.value.initialPosition;
|
|
109
|
+
}
|
|
110
|
+
const {
|
|
111
|
+
containerHeight
|
|
112
|
+
} = animatedLayoutState.get();
|
|
113
|
+
const lowestSnapPoint = enablePanDownToClose ? containerHeight : detents[0];
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* if scrollable is refreshable and sheet position at the highest
|
|
117
|
+
* point, then do not interact with current gesture.
|
|
118
|
+
*/
|
|
119
|
+
if (source === _constants.GESTURE_SOURCE.CONTENT && animatedScrollableState.get().refreshable && animatedPosition.value === highestSnapPoint) {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* a negative scrollable content offset to be subtracted from accumulated
|
|
125
|
+
* current position and gesture translation Y to allow user to drag the sheet,
|
|
126
|
+
* when scrollable position at the top.
|
|
127
|
+
* a negative scrollable content offset when the scrollable is not locked.
|
|
128
|
+
*/
|
|
129
|
+
const negativeScrollableContentOffset = context.value.initialPosition === highestSnapPoint && source === _constants.GESTURE_SOURCE.CONTENT || !context.value.isScrollablePositionLocked ? animatedScrollableState.get().contentOffsetY * -1 : 0;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* an accumulated value of starting position with gesture translation y.
|
|
133
|
+
*/
|
|
134
|
+
const draggedPosition = context.value.initialPosition + translationY;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* an accumulated value of dragged position and negative scrollable content offset,
|
|
138
|
+
* this will insure locking sheet position when user is scrolling the scrollable until,
|
|
139
|
+
* they reach to the top of the scrollable.
|
|
140
|
+
*/
|
|
141
|
+
const accumulatedDraggedPosition = draggedPosition + negativeScrollableContentOffset;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* a clamped value of the accumulated dragged position, to insure keeping the dragged
|
|
145
|
+
* position between the highest and lowest snap points.
|
|
146
|
+
*/
|
|
147
|
+
const clampedPosition = (0, _clamp.clamp)(accumulatedDraggedPosition, highestSnapPoint, lowestSnapPoint);
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* if scrollable position is locked and the animated position
|
|
151
|
+
* reaches the highest point, then we unlock the scrollable position.
|
|
152
|
+
*/
|
|
153
|
+
if (context.value.isScrollablePositionLocked && source === _constants.GESTURE_SOURCE.CONTENT && animatedPosition.value === highestSnapPoint) {
|
|
154
|
+
context.value = {
|
|
155
|
+
...context.value,
|
|
156
|
+
isScrollablePositionLocked: false
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* over-drag implementation.
|
|
162
|
+
*/
|
|
163
|
+
if (enableOverDrag) {
|
|
164
|
+
if ((source === _constants.GESTURE_SOURCE.HANDLE || animatedScrollableState.get().type === _constants.SCROLLABLE_TYPE.VIEW) && draggedPosition < highestSnapPoint) {
|
|
165
|
+
const resistedPosition = highestSnapPoint - Math.sqrt(1 + (highestSnapPoint - draggedPosition)) * overDragResistanceFactor;
|
|
166
|
+
animatedPosition.value = resistedPosition;
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
if (source === _constants.GESTURE_SOURCE.HANDLE && draggedPosition > lowestSnapPoint) {
|
|
170
|
+
const resistedPosition = lowestSnapPoint + Math.sqrt(1 + (draggedPosition - lowestSnapPoint)) * overDragResistanceFactor;
|
|
171
|
+
animatedPosition.value = resistedPosition;
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
if (source === _constants.GESTURE_SOURCE.CONTENT && draggedPosition + negativeScrollableContentOffset > lowestSnapPoint) {
|
|
175
|
+
const resistedPosition = lowestSnapPoint + Math.sqrt(1 + (draggedPosition + negativeScrollableContentOffset - lowestSnapPoint)) * overDragResistanceFactor;
|
|
176
|
+
animatedPosition.value = resistedPosition;
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
animatedPosition.value = clampedPosition;
|
|
181
|
+
}, [enableOverDrag, enablePanDownToClose, overDragResistanceFactor, isInTemporaryPosition, animatedScrollableState, animatedDetentsState, animatedLayoutState, animatedPosition, context]);
|
|
182
|
+
const handleOnEnd = (0, _react.useCallback)(function handleOnEnd(source, {
|
|
183
|
+
translationY,
|
|
184
|
+
absoluteY,
|
|
185
|
+
velocityY
|
|
186
|
+
}) {
|
|
187
|
+
'worklet';
|
|
188
|
+
|
|
189
|
+
const {
|
|
190
|
+
highestDetentPosition,
|
|
191
|
+
detents,
|
|
192
|
+
closedDetentPosition
|
|
193
|
+
} = animatedDetentsState.get();
|
|
194
|
+
if (highestDetentPosition === undefined || detents === undefined || detents.length === 0 || closedDetentPosition === undefined) {
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
const highestSnapPoint = highestDetentPosition;
|
|
198
|
+
const isSheetAtHighestSnapPoint = animatedPosition.value === highestSnapPoint;
|
|
199
|
+
const {
|
|
200
|
+
refreshable: scrollableIsRefreshable,
|
|
201
|
+
contentOffsetY: scrollableContentOffsetY,
|
|
202
|
+
type: scrollableType
|
|
203
|
+
} = animatedScrollableState.get();
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* if scrollable is refreshable and sheet position at the highest
|
|
207
|
+
* point, then do not interact with current gesture.
|
|
208
|
+
*/
|
|
209
|
+
if (source === _constants.GESTURE_SOURCE.CONTENT && scrollableIsRefreshable && isSheetAtHighestSnapPoint) {
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* if the sheet is in a temporary position and the gesture ended above
|
|
215
|
+
* the current position, then we snap back to the temporary position.
|
|
216
|
+
*/
|
|
217
|
+
if (isInTemporaryPosition.value && context.value.initialPosition >= animatedPosition.value) {
|
|
218
|
+
if (context.value.initialPosition > animatedPosition.value) {
|
|
219
|
+
animateToPosition(context.value.initialPosition, _constants.ANIMATION_SOURCE.GESTURE, velocityY / 2);
|
|
220
|
+
}
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* close keyboard if current position is below the recorded
|
|
226
|
+
* start position and keyboard still shown.
|
|
227
|
+
*/
|
|
228
|
+
const isScrollable = scrollableType !== _constants.SCROLLABLE_TYPE.UNDETERMINED && scrollableType !== _constants.SCROLLABLE_TYPE.VIEW;
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* if keyboard is shown and the sheet is dragged down,
|
|
232
|
+
* then we dismiss the keyboard.
|
|
233
|
+
*/
|
|
234
|
+
if (context.value.initialKeyboardStatus === _constants.KEYBOARD_STATUS.SHOWN && animatedPosition.value > context.value.initialPosition) {
|
|
235
|
+
/**
|
|
236
|
+
* if the platform is ios, current content is scrollable and
|
|
237
|
+
* the end touch point is below the keyboard position then
|
|
238
|
+
* we exit the method.
|
|
239
|
+
*
|
|
240
|
+
* because the the keyboard dismiss is interactive in iOS.
|
|
241
|
+
*/
|
|
242
|
+
if (!(_reactNative.Platform.OS === 'ios' && isScrollable && absoluteY > _constants.WINDOW_HEIGHT - animatedKeyboardState.get().heightWithinContainer)) {
|
|
243
|
+
(0, _reactNativeReanimated.runOnJS)(dismissKeyboard)();
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* reset isInTemporaryPosition value
|
|
249
|
+
*/
|
|
250
|
+
if (isInTemporaryPosition.value) {
|
|
251
|
+
isInTemporaryPosition.value = false;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* clone snap points array, and insert the container height
|
|
256
|
+
* if pan down to close is enabled.
|
|
257
|
+
*/
|
|
258
|
+
const snapPoints = detents.slice();
|
|
259
|
+
if (enablePanDownToClose) {
|
|
260
|
+
snapPoints.unshift(closedDetentPosition);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* calculate the destination point, using redash.
|
|
265
|
+
*/
|
|
266
|
+
const destinationPoint = (0, _snapPoint.snapPoint)(translationY + context.value.initialPosition, velocityY, snapPoints);
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* if destination point is the same as the current position,
|
|
270
|
+
* then no need to perform animation.
|
|
271
|
+
*/
|
|
272
|
+
if (destinationPoint === animatedPosition.value) {
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
const wasGestureHandledByScrollView = source === _constants.GESTURE_SOURCE.CONTENT && scrollableContentOffsetY > 0;
|
|
276
|
+
/**
|
|
277
|
+
* prevents snapping from top to middle / bottom with repeated interrupted scrolls
|
|
278
|
+
*/
|
|
279
|
+
if (wasGestureHandledByScrollView && isSheetAtHighestSnapPoint) {
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
animateToPosition(destinationPoint, _constants.ANIMATION_SOURCE.GESTURE, velocityY / 2);
|
|
283
|
+
}, [enablePanDownToClose, isInTemporaryPosition, animatedScrollableState, animatedDetentsState, animatedKeyboardState, animatedPosition, animateToPosition, context]);
|
|
284
|
+
const handleOnFinalize = (0, _react.useCallback)(function handleOnFinalize() {
|
|
285
|
+
'worklet';
|
|
286
|
+
|
|
287
|
+
resetContext(context);
|
|
288
|
+
}, [context]);
|
|
289
|
+
//#endregion
|
|
290
|
+
|
|
291
|
+
return {
|
|
292
|
+
handleOnStart,
|
|
293
|
+
handleOnChange,
|
|
294
|
+
handleOnEnd,
|
|
295
|
+
handleOnFinalize
|
|
296
|
+
};
|
|
297
|
+
};
|
|
298
|
+
exports.useGestureEventsHandlersDefault = useGestureEventsHandlersDefault;
|
|
299
|
+
//# sourceMappingURL=useGestureEventsHandlersDefault.js.map
|